Compare commits

..

24 Commits

Author SHA1 Message Date
adf05e3c28 Add computePotAim query and shot-simulation operations
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Schema: computePotAim(simulationInput, targetBallId, pocket) ->
PotAimGQL, the spin/throw-compensated aim solver (regenerated from
backend strawberry definitions; reuses the existing PocketIdentifier
enum). Operations: GetTableState, SimulateShot, and ComputePotAim
documents so both clients get generated hooks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 01:44:02 -07:00
5391466e90 Merge pull request 'Add simulateShot query, cue strike and shot projection types' (#277) from shot-simulation-stubs into master
Reviewed-on: #277
2026-07-02 23:35:30 +00:00
4ff2db1ef4 Add simulateShot query, cue strike and shot projection types
All checks were successful
Tests / Tests (pull_request) Successful in 12s
Generated from backend strawberry definitions for the shot simulation
feature (image -> pooltool scenario -> projected outcome). Backend PR:
shot-simulation-stubs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 16:12:11 -07:00
257dcdc31a Merge pull request 'Add DismissVideoExport mutation (soft-hide exports)' (#276) from dean/export-dismiss-gql into master
Reviewed-on: #276
2026-07-02 22:38:02 +00:00
Dean Wenstrand
b41365e99e Add videoName + videoThumbnailUri to VideoExportJobFields
All checks were successful
Tests / Tests (pull_request) Successful in 13s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 14:41:59 -07:00
Dean Wenstrand
0e8233a5d5 Add DismissVideoExport mutation (soft-hide exports)
All checks were successful
Tests / Tests (pull_request) Successful in 17s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 14:18:55 -07:00
b6adae4949 Merge pull request 'Storage limit enforcement schema' (#275) from storage-limit-enforcement-schema into master
Reviewed-on: #275
2026-07-01 22:29:41 +00:00
459e89d8b8 Select storage limit error fields
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-07-01 14:50:45 -07:00
fa2ff19572 Add storage limit enforcement schema 2026-07-01 14:41:21 -07:00
428286fa5a Merge pull request 'dean/video-export-gql' (#273) from dean/video-export-gql into master
Reviewed-on: #273
2026-06-30 22:48:02 +00:00
Dean Wenstrand
8771350115 Echo shotIds/runId on VideoExportJobGQL for re-export
All checks were successful
Tests / Tests (pull_request) Successful in 13s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 14:00:04 -07:00
Dean Wenstrand
f1594b8492 Video export client operations + myVideoExports list query
RequestVideoExport mutation, VideoExportJob + MyVideoExports queries (with the
VideoExportJobFields fragment) for the mobile fire-and-list flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 13:54:29 -07:00
Dean Wenstrand
3ec3e3d081 Add EXPORT_READY notification type (video export Phase 1b)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 12:51:39 -07:00
Dean Wenstrand
d2c697e4cb Add video export schema: VideoExportJob + request/query + mode/status enums
Generated from the backend video export resolvers (Phase 1a).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 12:35:34 -07:00
3484af9dde Merge pull request 'Add storage usage readiness fields' (#272) from storage-usage-readiness into master
Reviewed-on: #272
2026-06-30 17:12:00 +00:00
bc62cb5e39 Add storage usage readiness fields
All checks were successful
Tests / Tests (pull_request) Successful in 27s
2026-06-29 10:56:33 -07:00
bc52145a9e Merge pull request 'Add storage status schema' (#270) from pr8-storage-status into master
Reviewed-on: #270
2026-06-26 15:33:19 +00:00
5c286f2bcf Add storage status schema
All checks were successful
Tests / Tests (pull_request) Successful in 24s
2026-06-25 17:34:19 -07:00
d636c298f8 Merge pull request 'Add resolved tier capabilities schema' (#269) from tier-capabilities-schema into master
Reviewed-on: #269
2026-06-24 03:37:17 +00:00
681320c62d Add resolved tier capabilities schema
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2026-06-23 15:51:21 -07:00
49f409f60b Merge pull request 'Add resolved tier schema' (#268) from resolved-tier-contract into master
Reviewed-on: #268
2026-06-23 22:10:10 +00:00
e7fc6c147d Add resolved tier schema
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-06-23 14:01:32 -07:00
10c3f6de53 Merge pull request 'Add drill leaderboard run dates to gql' (#267) from dean/add-dates-to-leaderboards-gql into master
Reviewed-on: #267
2026-06-23 15:51:28 +00:00
b477590137 Merge pull request 'VideoCardFields: fetch stream isCompleted + lastSegmentUploadedAt' (#266) from dean/feed-upload-status-fields into master
Reviewed-on: #266
2026-06-20 22:45:07 +00:00
5 changed files with 1164 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,57 @@
query GetTableState(
$b64Image: String!
$tableSize: Float
$useHomography: HomographyInputGQL
) {
getTableState(
b64Image: $b64Image
tableSize: $tableSize
useHomography: $useHomography
) {
identifierToPosition
}
}
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
simulateShot(simulationInput: $simulationInput) {
trajectories {
ballId
points {
time
position
}
}
events {
eventType
time
ballIds
position
}
finalState {
ballId
position
}
pottedBallIds
}
}
query ComputePotAim(
$simulationInput: SimulateShotInputGQL!
$targetBallId: Int!
$pocket: PocketIdentifier!
) {
computePotAim(
simulationInput: $simulationInput
targetBallId: $targetBallId
pocket: $pocket
) {
phi
geometricPhi
cutAngle
requiredPrecision
feasible
potted
converged
occludingBallIds
}
}

View File

@@ -0,0 +1,36 @@
fragment VideoExportJobFields on VideoExportJobGQL {
id
videoId
mode
status
videoName
videoThumbnailUri
shotIds
runId
downloadUrl
fileSizeBytes
expiresAt
createdAt
}
mutation RequestVideoExport($input: RequestVideoExportInput!) {
requestVideoExport(input: $input) {
...VideoExportJobFields
}
}
mutation DismissVideoExport($jobId: Int!) {
dismissVideoExport(jobId: $jobId)
}
query VideoExportJob($jobId: Int!) {
videoExportJob(jobId: $jobId) {
...VideoExportJobFields
}
}
query MyVideoExports($limit: Int = 30, $offset: Int = 0) {
myVideoExports(limit: $limit, offset: $offset) {
...VideoExportJobFields
}
}

View File

@@ -67,6 +67,13 @@ mutation GetHlsInitUploadLink($videoId: Int!) {
... on TooManyInitUploadsErr { ... on TooManyInitUploadsErr {
linksRequested linksRequested
} }
... on StorageLimitExceededErr {
reason
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
remainingStorageBytes
}
} }
} }
} }

View File

@@ -66,6 +66,12 @@ type Query {
tableSize: Float = 100 tableSize: Float = 100
useHomography: HomographyInputGQL = null useHomography: HomographyInputGQL = null
): TableStateGQL! ): TableStateGQL!
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
computePotAim(
simulationInput: SimulateShotInputGQL!
targetBallId: Int!
pocket: PocketIdentifier!
): PotAimGQL!
getOrderedShots( getOrderedShots(
filterInput: FilterInput! filterInput: FilterInput!
ids: [Int!] = null ids: [Int!] = null
@@ -108,8 +114,10 @@ type Query {
): UserRelationshipsResult! ): UserRelationshipsResult!
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL! getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
getUserSubscriptionStatus: UserSubscriptionStatusGQL! getUserSubscriptionStatus: UserSubscriptionStatusGQL!
getResolvedTier: ResolvedTierGQL!
getAppleAppAccountToken: String! getAppleAppAccountToken: String!
getQuotaStatus: QuotaStatusGQL! getQuotaStatus: QuotaStatusGQL!
getStorageStatus: StorageStatusGQL
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL! getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
getUserVideos( getUserVideos(
userId: Int = null userId: Int = null
@@ -119,6 +127,8 @@ type Query {
): VideoHistoryGQL! ): VideoHistoryGQL!
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]! getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
getGameTypeTagMetrics(input: GameTypeTagMetricsInput!): [GameTypeTagMetric!]! getGameTypeTagMetrics(input: GameTypeTagMetricsInput!): [GameTypeTagMetric!]!
videoExportJob(jobId: Int!): VideoExportJobGQL
myVideoExports(limit: Int! = 30, offset: Int! = 0): [VideoExportJobGQL!]!
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL! getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
getVideos(videoIds: [Int!]!): [VideoGQL!]! getVideos(videoIds: [Int!]!): [VideoGQL!]!
} }
@@ -710,6 +720,7 @@ type DeployedConfigGQL {
minimumAllowedAppVersion: String! minimumAllowedAppVersion: String!
subscriptionGatingEnabled: Boolean! subscriptionGatingEnabled: Boolean!
quotaEnforcementEnabled: Boolean! quotaEnforcementEnabled: Boolean!
storageLimitEnforcementEnabled: Boolean!
bannerMessages: [BannerGQL!]! bannerMessages: [BannerGQL!]!
defaultAndroidRecordingFormat: StreamSegmentTypeEnum! defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
bucketUrl: String! bucketUrl: String!
@@ -862,6 +873,7 @@ enum NotificationTypeEnum {
REACTION REACTION
FOLLOW FOLLOW
CHALLENGE_INVITE CHALLENGE_INVITE
EXPORT_READY
} }
input NotificationFilters { input NotificationFilters {
@@ -964,6 +976,76 @@ input IntPoint2DInput {
y: Int! y: Int!
} }
type ShotProjectionGQL {
trajectories: [BallTrajectoryGQL!]!
events: [SimulationEventGQL!]!
finalState: [SimulationBallStateGQL!]!
pottedBallIds: [Int!]!
}
type BallTrajectoryGQL {
ballId: Int!
points: [TrajectoryPointGQL!]!
}
type TrajectoryPointGQL {
time: Float!
position: [Float!]!
}
type SimulationEventGQL {
eventType: SimulationEventType!
time: Float!
ballIds: [Int!]!
position: [Float!]
}
enum SimulationEventType {
STICK_BALL
BALL_BALL
BALL_CUSHION
BALL_POCKET
BALL_STOP
}
type SimulationBallStateGQL {
ballId: Int!
position: [Float!]!
}
input SimulateShotInputGQL {
cueBallId: Int!
strike: CueStrikeInputGQL!
balls: [SimulationBallStateInputGQL!] = null
b64Image: String = null
useHomography: HomographyInputGQL = null
tableSize: Float = null
}
input CueStrikeInputGQL {
v0: Float!
phi: Float!
theta: Float! = 0
a: Float! = 0
b: Float! = 0
}
input SimulationBallStateInputGQL {
ballId: Int!
position: [Float!]!
}
type PotAimGQL {
phi: Float!
geometricPhi: Float!
cutAngle: Float!
requiredPrecision: Float!
feasible: Boolean!
potted: Boolean!
converged: Boolean!
occludingBallIds: [Int!]!
}
type GetShotsResult { type GetShotsResult {
shots: [ShotGQL!]! shots: [ShotGQL!]!
count: Int count: Int
@@ -1071,6 +1153,17 @@ enum StripeSubscriptionStatusEnum {
PAUSED PAUSED
} }
type ResolvedTierGQL {
tierName: String!
tierDisplayName: String!
hasActiveSubscription: Boolean!
entitlementSource: EntitlementSourceTypeEnum
entitlementStatus: String
entitlementStartsAt: DateTime
entitlementEndsAt: DateTime
capabilities: [String!]!
}
type QuotaStatusGQL { type QuotaStatusGQL {
tierName: String! tierName: String!
periodStart: DateTime! periodStart: DateTime!
@@ -1095,6 +1188,27 @@ type QuotaBucketStatusGQL {
canUpload: Boolean! canUpload: Boolean!
} }
type StorageStatusGQL {
userId: Int!
tierName: String!
retainedStorageUsedBytes: BigInt!
retainedStorageLimitBytes: BigInt
isUnlimited: Boolean!
policyConfigured: Boolean!
remainingStorageBytes: BigInt
storageUsageRatio: Float
isNearLimit: Boolean!
isOverLimit: Boolean!
usageCalculated: Boolean!
usageSource: String
lastCalculatedAt: DateTime
}
"""
Integer value that can exceed GraphQL Int's 32-bit range.
"""
scalar BigInt
type UserPlayTimeGQL { type UserPlayTimeGQL {
totalSeconds: Float! totalSeconds: Float!
} }
@@ -1130,6 +1244,36 @@ input GameTypeTagMetricsInput {
includePrivate: IncludePrivateEnum! = MINE includePrivate: IncludePrivateEnum! = MINE
} }
type VideoExportJobGQL {
id: Int!
videoId: Int!
mode: VideoExportModeEnum!
status: VideoExportStatusEnum!
videoName: String
videoThumbnailUri: String
shotIds: [Int!]
runId: Int
downloadUrl: String
fileSizeBytes: Int
expiresAt: DateTime
createdAt: DateTime
}
enum VideoExportModeEnum {
FULL_SESSION
SHOTS
RUN
}
enum VideoExportStatusEnum {
CREATED
QUEUED
RUNNING
SUCCEEDED
FAILED
EXPIRED
}
""" """
The `JSON` scalar type represents JSON values as specified by [ECMA-404](https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf). The `JSON` scalar type represents JSON values as specified by [ECMA-404](https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf).
""" """
@@ -1231,6 +1375,8 @@ type Mutation {
feedback: String = null feedback: String = null
metadata: CancellationFeedbackMetadataInput = null metadata: CancellationFeedbackMetadataInput = null
): Boolean! ): Boolean!
requestVideoExport(input: RequestVideoExportInput!): VideoExportJobGQL!
dismissVideoExport(jobId: Int!): Boolean!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream( createUploadStream(
videoMetadata: VideoMetadataInput! videoMetadata: VideoMetadataInput!
@@ -1413,6 +1559,13 @@ input CancellationFeedbackMetadataInput {
platform: String = null platform: String = null
} }
input RequestVideoExportInput {
videoId: Int!
mode: VideoExportModeEnum!
shotIds: [Int!] = null
runId: Int = null
}
type CreateUploadStreamReturn { type CreateUploadStreamReturn {
videoId: Int! videoId: Int!
} }
@@ -1452,10 +1605,10 @@ type GetUploadLinkReturn {
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
type GetUploadLinkErrors { type GetUploadLinkErrors {
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr! error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr!
} }
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr = union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr =
MustHaveSetForUploadLinkErr MustHaveSetForUploadLinkErr
| SegmentAlreadyUploadedErr | SegmentAlreadyUploadedErr
| ProcessingFailedErr | ProcessingFailedErr
@@ -1463,6 +1616,7 @@ union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoI
| TooManyProfileImageUploadsErr | TooManyProfileImageUploadsErr
| InitUploadAlreadyCompletedErr | InitUploadAlreadyCompletedErr
| TooManyInitUploadsErr | TooManyInitUploadsErr
| StorageLimitExceededErr
type MustHaveSetForUploadLinkErr { type MustHaveSetForUploadLinkErr {
resolution: Boolean resolution: Boolean
@@ -1488,3 +1642,11 @@ type InitUploadAlreadyCompletedErr {
type TooManyInitUploadsErr { type TooManyInitUploadsErr {
linksRequested: Int! linksRequested: Int!
} }
type StorageLimitExceededErr {
reason: String!
tierName: String!
retainedStorageUsedBytes: BigInt!
retainedStorageLimitBytes: BigInt
remainingStorageBytes: BigInt
}