Compare commits

..

1 Commits

Author SHA1 Message Date
71116165bc Add getLiveTableState query and live-stream operations
- schema: getLiveTableState(videoId) returning LiveTableStateGQL
  (videoId, frameIndex, tableState)
- operations: GetLiveTableState in shot_simulation.gql, lightweight
  GetLiveStreams listing in live_streams.gql
- regenerated TS client outputs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 00:54:37 -07:00
9 changed files with 329 additions and 491 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7,8 +7,6 @@ query getDeployedConfig {
minimumAllowedAppVersion
subscriptionGatingEnabled
quotaEnforcementEnabled
storageLimitEnforcementEnabled
capabilityEnforcementEnabled
bannerMessages {
color
dismissible

View File

@@ -44,7 +44,6 @@ fragment VideoCardFields on VideoGQL {
streamSegmentType
isCompleted
lastSegmentUploadedAt
clientUploadStatus
}
tableSize
pocketSize

View File

@@ -0,0 +1,34 @@
# Lightweight listing of live (in-progress) streams for pickers like the
# Shot Lab "follow a live stream" flow. Selects only what a picker card
# needs; intentionally avoids the heavy VideoCardFields fragment.
query GetLiveStreams($limit: Int! = 25) {
getFeedVideos(
limit: $limit
filters: { isStreamCompleted: false, requireCursorCompletion: false }
includePrivate: MINE
feedInput: { allUsers: true }
) {
videos {
id
name
startTime
createdAt
screenshotUri
elapsedTime
owner {
id
username
profileImageUri
}
stream {
id
isCompleted
lastSegmentUploadedAt
}
}
pageInfo {
hasNextPage
endCursor
}
}
}

View File

@@ -49,20 +49,6 @@ query GetAvailableSubscriptionOptions {
proMonthlyProductId
productIds
}
tierOptions {
tierName
tierDisplayName
billingInterval
platform
isConfigured
isAvailable
stripeProductId
stripePriceId
appleProductId
currency
unitAmount
recurringIntervalCount
}
}
}
@@ -81,37 +67,6 @@ query GetSubscriptionStatus {
}
}
query GetResolvedTier {
getResolvedTier {
tierName
tierDisplayName
hasActiveSubscription
entitlementSource
entitlementStatus
entitlementStartsAt
entitlementEndsAt
capabilities
}
}
query GetStorageStatus {
getStorageStatus {
userId
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
isUnlimited
policyConfigured
remainingStorageBytes
storageUsageRatio
isNearLimit
isOverLimit
usageCalculated
usageSource
lastCalculatedAt
}
}
query GetAppleAppAccountToken {
getAppleAppAccountToken
}

View File

@@ -2,8 +2,6 @@ fragment PoolHallFields on PoolHall {
id
name
address
city
state
latitude
longitude
timezone
@@ -21,9 +19,6 @@ fragment PoolHallCameraFields on PoolHallCamera {
status
tableSize
pocketSize
allowsPrivateVideos
claimTermsText
claimTermsVersion
inUse
lastPublishedAt
lastUnpublishedAt
@@ -56,7 +51,6 @@ fragment CameraClaimSessionFields on CameraClaimSession {
detectedAt
failedAt
failureReason
agreedTermsVersion
createdAt
updatedAt
camera {
@@ -153,16 +147,12 @@ mutation CreateCameraClaimSession(
$durationMinutes: Int
$videoName: String
$videoPrivate: Boolean
$agreedTermsVersion: Int
$tags: [VideoTagInput!]
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
agreedTermsVersion: $agreedTermsVersion
tags: $tags
) {
...CameraClaimSessionFields
}

View File

@@ -12,6 +12,19 @@ query GetTableState(
}
}
query GetLiveTableState($videoId: Int!) {
getLiveTableState(videoId: $videoId) {
videoId
frameIndex
tableState {
identifierToPosition
homography {
...HomographyInfo
}
}
}
}
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
simulateShot(simulationInput: $simulationInput) {
trajectories {

View File

@@ -37,13 +37,6 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
}
}
}
... on StorageLimitExceededErr {
reason
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
remainingStorageBytes
}
}
}
}

View File

@@ -72,6 +72,7 @@ type Query {
tableSize: Float = 100
useHomography: HomographyInputGQL = null
): TableStateGQL!
getLiveTableState(videoId: Int!): LiveTableStateGQL!
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
computePotAim(
simulationInput: SimulateShotInputGQL!
@@ -892,8 +893,6 @@ type PoolHall {
id: ID!
name: String!
address: String
city: String
state: String
latitude: Float
longitude: Float
timezone: String
@@ -911,9 +910,6 @@ type PoolHallCamera {
status: String!
tableSize: Float
pocketSize: Float
allowsPrivateVideos: Boolean!
claimTermsText: String
claimTermsVersion: Int
lastPublishedAt: DateTime
lastUnpublishedAt: DateTime
createdAt: DateTime!
@@ -932,7 +928,6 @@ type CameraClaimSession {
detectedAt: DateTime
failedAt: DateTime
failureReason: String
agreedTermsVersion: Int
createdAt: DateTime!
updatedAt: DateTime!
camera: PoolHallCamera!
@@ -1049,6 +1044,12 @@ input IntPoint2DInput {
y: Int!
}
type LiveTableStateGQL {
videoId: Int!
frameIndex: Int!
tableState: TableStateGQL!
}
type ShotProjectionGQL {
trajectories: [BallTrajectoryGQL!]!
events: [SimulationEventGQL!]!
@@ -1168,7 +1169,6 @@ type StripeSubscriptionOptionsGQL {
products: [StripeProductGQL!]!
trialPeriodDays: Int
appleIap: AppleIapSubscriptionOptionsGQL!
tierOptions: [SubscriptionTierPurchaseOptionGQL!]!
}
type StripeProductGQL {
@@ -1195,21 +1195,6 @@ type AppleIapSubscriptionOptionsGQL {
productIds: [String!]!
}
type SubscriptionTierPurchaseOptionGQL {
tierName: String!
tierDisplayName: String!
billingInterval: String!
platform: String!
isConfigured: Boolean!
isAvailable: Boolean!
stripeProductId: String
stripePriceId: String
appleProductId: String
currency: String
unitAmount: Int
recurringIntervalCount: Int
}
type UserSubscriptionStatusGQL {
hasActiveSubscription: Boolean!
entitlementSource: EntitlementSourceTypeEnum
@@ -1431,8 +1416,6 @@ type Mutation {
durationMinutes: Int = null
videoName: String = null
videoPrivate: Boolean = null
agreedTermsVersion: Int = null
tags: [VideoTagInput!] = null
): CameraClaimSession!
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
endCameraLease(leaseId: ID!): CameraLease!
@@ -1519,8 +1502,6 @@ enum ReportReasonEnum {
input CreatePoolHallInput {
name: String!
address: String = null
city: String = null
state: String = null
latitude: Float = null
longitude: Float = null
timezone: String = null
@@ -1530,8 +1511,6 @@ input UpdatePoolHallInput {
id: ID!
name: String = null
address: String = null
city: String = null
state: String = null
latitude: Float = null
longitude: Float = null
timezone: String = null
@@ -1551,8 +1530,6 @@ input CreatePoolHallCameraInput {
streamPath: String = null
tableSize: Float = null
pocketSize: Float = null
allowsPrivateVideos: Boolean = null
claimTermsText: String = null
}
input UpdatePoolHallCameraInput {
@@ -1562,8 +1539,6 @@ input UpdatePoolHallCameraInput {
status: String = null
tableSize: Float = null
pocketSize: Float = null
allowsPrivateVideos: Boolean = null
claimTermsText: String = null
}
input FinalizePlayerAssignmentsInput {