Compare commits

...

26 Commits

Author SHA1 Message Date
31f9852f4b Add clientUploadStatus to VideoCardFields stream fragment
All checks were successful
Tests / Tests (pull_request) Successful in 12s
Lets the feed/session card distinguish camera/bridge recordings
(clientUploadStatus UPLOAD_DISABLED, phone never uploads) from phone
uploads, so it can stop showing 'UPLOAD PAUSED' for recordings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 09:57:50 -07:00
0b4016c601 Merge pull request 'Add tier-aware subscription options' (#286) from loewy/backend-tier-aware-subscription-options into master
Reviewed-on: #286
2026-07-07 23:57:44 +00:00
8e85fddb0a Merge pull request 'Add capability enforcement config field' (#285) from loewy/mobile-capability-config-field into master
Reviewed-on: #285
2026-07-07 23:27:17 +00:00
338798ea5a Add tier-aware subscription options
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2026-07-07 16:10:43 -07:00
6bd92ae991 Add capability enforcement config field
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-07-07 14:44:27 -07:00
8dd9f6df40 Merge pull request 'Add storage status query' (#274) from loewy/storage-status-card-readiness into master
Reviewed-on: #274
2026-07-07 18:20:58 +00:00
f60950a6f6 Select storage limit fields for upload links
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-07-06 23:51:30 -07:00
739451f250 Select storage limit config flag 2026-07-06 23:51:29 -07:00
146af8d713 Add resolved tier query 2026-07-06 23:51:29 -07:00
43b99c447b Add storage status readiness query fields 2026-07-06 23:51:29 -07:00
cba07aa69e Add storage status query 2026-07-06 23:51:29 -07:00
f626054662 Merge pull request 'Add tags arg to createCameraClaimSession' (#284) from dean/camera-session-tags into master
Reviewed-on: #284
2026-07-07 05:56:05 +00:00
Dean Wenstrand
6bc02ec47c Add tags arg to createCameraClaimSession
All checks were successful
Tests / Tests (pull_request) Successful in 11s
Lets the table-camera claim carry session tags (+ the player-count tag), for
parity with the phone recording flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 22:49:28 -07:00
c92246510b Merge pull request 'Add city/state to PoolHall type + create/update inputs' (#283) from dean/pool-hall-city-state into master
Reviewed-on: #283
2026-07-07 01:33:21 +00:00
Dean Wenstrand
3ce2a7be61 Add per-camera recording policy (terms + private allowance) to schema
All checks were successful
Tests / Tests (pull_request) Successful in 10s
allowsPrivateVideos / claimTermsText / claimTermsVersion on PoolHallCamera,
agreedTermsVersion on CameraClaimSession + the create-claim mutation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 18:21:58 -07:00
Dean Wenstrand
fc921c3ae7 Add city/state to PoolHall type + create/update inputs
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Full address stays on `address`; city/state let the UI show a compact locality.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 16:59:15 -07:00
0b6ac787d8 Merge pull request 'Camera claim flow: lease end/extend, claim preferences, inUse' (#282) from dean/camera-claim-flow into master
Reviewed-on: #282
2026-07-05 18:55:01 +00:00
Dean Wenstrand
ac479dc7e4 Camera claim flow: lease end/extend, claim preferences, inUse
All checks were successful
Tests / Tests (pull_request) Successful in 25s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 18:44:01 -07:00
c6a754cc2d Merge pull request 'Add tableSize/pocketSize to pool hall camera schema' (#281) from dean/camera-table-dimensions into master
Reviewed-on: #281
2026-07-05 00:23:56 +00:00
Dean Wenstrand
2c047292f0 Add tableSize/pocketSize to pool hall camera schema
All checks were successful
Tests / Tests (pull_request) Successful in 11s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 17:13:23 -07:00
9267cd8180 Merge pull request 'dean/pool-hall-gql' (#280) from dean/pool-hall-gql into master
Reviewed-on: #280
2026-07-04 16:35:00 +00:00
Dean Wenstrand
fa14becc12 Regenerate schema + client from merged backend
All checks were successful
Tests / Tests (pull_request) Successful in 9s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 09:31:53 -07:00
fea506af1b Add pool hall camera GraphQL operations
Hand-written pool hall camera claim operations (schema.gql + index.tsx are
regenerated from the backend in the following commit).
2026-07-04 09:31:15 -07:00
2f9dc86ad9 Merge pull request 'Add capability enforcement config to schema' (#279) from capability-enforcement-config into master
Reviewed-on: #279
2026-07-03 21:02:11 +00:00
e2fe6cadda Add capability enforcement config to schema
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-07-03 12:01:58 -07:00
aafdab5d4d Merge pull request 'Add computePotAim query and shot-simulation operations' (#278) from compute-pot-aim into master 2026-07-03 17:58:48 +00:00
7 changed files with 2732 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@@ -49,6 +49,20 @@ query GetAvailableSubscriptionOptions {
proMonthlyProductId proMonthlyProductId
productIds productIds
} }
tierOptions {
tierName
tierDisplayName
billingInterval
platform
isConfigured
isAvailable
stripeProductId
stripePriceId
appleProductId
currency
unitAmount
recurringIntervalCount
}
} }
} }
@@ -67,6 +81,37 @@ 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 { query GetAppleAppAccountToken {
getAppleAppAccountToken getAppleAppAccountToken
} }

View File

@@ -0,0 +1,187 @@
fragment PoolHallFields on PoolHall {
id
name
address
city
state
latitude
longitude
timezone
status
createdAt
updatedAt
}
fragment PoolHallCameraFields on PoolHallCamera {
id
poolHallId
name
tableLabel
streamPath
status
tableSize
pocketSize
allowsPrivateVideos
claimTermsText
claimTermsVersion
inUse
lastPublishedAt
lastUnpublishedAt
createdAt
updatedAt
}
fragment PoolHallCameraWithHallFields on PoolHallCamera {
...PoolHallCameraFields
poolHall {
...PoolHallFields
}
}
fragment PoolHallCameraStreamCredentialsFields on PoolHallCameraStreamCredentials {
streamKey
rtmpPath
camera {
...PoolHallCameraWithHallFields
}
}
fragment CameraClaimSessionFields on CameraClaimSession {
id
cameraId
userId
challengeCode
status
expiresAt
detectedAt
failedAt
failureReason
agreedTermsVersion
createdAt
updatedAt
camera {
...PoolHallCameraWithHallFields
}
}
fragment CameraLeaseFields on CameraLease {
id
cameraId
claimSessionId
userId
videoId
status
startedAt
endedAt
expiresAt
endReason
createdAt
updatedAt
camera {
...PoolHallCameraWithHallFields
}
}
query GetPoolHalls {
poolHalls {
...PoolHallFields
}
}
query GetClaimablePoolHalls {
claimablePoolHalls {
...PoolHallFields
}
}
query GetPoolHallCameras($poolHallId: ID!) {
poolHallCameras(poolHallId: $poolHallId) {
...PoolHallCameraWithHallFields
}
}
query GetClaimableCameras($poolHallId: ID!) {
claimableCameras(poolHallId: $poolHallId) {
...PoolHallCameraWithHallFields
}
}
query GetCameraClaimSession($id: ID!) {
cameraClaimSession(id: $id) {
...CameraClaimSessionFields
}
}
query GetActiveCameraLease {
activeCameraLease {
...CameraLeaseFields
}
}
mutation CreatePoolHall($input: CreatePoolHallInput!) {
createPoolHall(input: $input) {
...PoolHallFields
}
}
mutation UpdatePoolHall($input: UpdatePoolHallInput!) {
updatePoolHall(input: $input) {
...PoolHallFields
}
}
mutation CreatePoolHallCamera($input: CreatePoolHallCameraInput!) {
createPoolHallCamera(input: $input) {
...PoolHallCameraStreamCredentialsFields
}
}
mutation UpdatePoolHallCamera($input: UpdatePoolHallCameraInput!) {
updatePoolHallCamera(input: $input) {
...PoolHallCameraWithHallFields
}
}
mutation RotatePoolHallCameraStreamKey($cameraId: ID!) {
rotatePoolHallCameraStreamKey(cameraId: $cameraId) {
...PoolHallCameraStreamCredentialsFields
}
}
mutation CreateCameraClaimSession(
$cameraId: ID!
$durationMinutes: Int
$videoName: String
$videoPrivate: Boolean
$agreedTermsVersion: Int
$tags: [VideoTagInput!]
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
agreedTermsVersion: $agreedTermsVersion
tags: $tags
) {
...CameraClaimSessionFields
}
}
mutation CancelCameraClaimSession($claimSessionId: ID!) {
cancelCameraClaimSession(claimSessionId: $claimSessionId) {
...CameraClaimSessionFields
}
}
mutation EndCameraLease($leaseId: ID!) {
endCameraLease(leaseId: $leaseId) {
...CameraLeaseFields
}
}
mutation ExtendCameraLease($leaseId: ID!, $additionalMinutes: Int! = 60) {
extendCameraLease(leaseId: $leaseId, additionalMinutes: $additionalMinutes) {
...CameraLeaseFields
}
}

View File

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

View File

@@ -52,6 +52,12 @@ type Query {
filters: NotificationFilters = null filters: NotificationFilters = null
): NotificationConnection! ): NotificationConnection!
unreadNotificationCount: Int! unreadNotificationCount: Int!
poolHalls: [PoolHall!]!
claimablePoolHalls: [PoolHall!]!
poolHallCameras(poolHallId: ID!): [PoolHallCamera!]!
claimableCameras(poolHallId: ID!): [PoolHallCamera!]!
cameraClaimSession(id: ID!): CameraClaimSession
activeCameraLease: CameraLease
getRuns( getRuns(
filterInput: RunFilterInput! filterInput: RunFilterInput!
runIds: [Int!] = null runIds: [Int!] = null
@@ -721,6 +727,7 @@ type DeployedConfigGQL {
subscriptionGatingEnabled: Boolean! subscriptionGatingEnabled: Boolean!
quotaEnforcementEnabled: Boolean! quotaEnforcementEnabled: Boolean!
storageLimitEnforcementEnabled: Boolean! storageLimitEnforcementEnabled: Boolean!
capabilityEnforcementEnabled: Boolean!
bannerMessages: [BannerGQL!]! bannerMessages: [BannerGQL!]!
defaultAndroidRecordingFormat: StreamSegmentTypeEnum! defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
bucketUrl: String! bucketUrl: String!
@@ -881,6 +888,72 @@ input NotificationFilters {
notificationTypes: [NotificationTypeEnum!] = null notificationTypes: [NotificationTypeEnum!] = null
} }
type PoolHall {
id: ID!
name: String!
address: String
city: String
state: String
latitude: Float
longitude: Float
timezone: String
status: String!
createdAt: DateTime!
updatedAt: DateTime!
}
type PoolHallCamera {
id: ID!
poolHallId: ID!
name: String!
tableLabel: String
streamPath: String!
status: String!
tableSize: Float
pocketSize: Float
allowsPrivateVideos: Boolean!
claimTermsText: String
claimTermsVersion: Int
lastPublishedAt: DateTime
lastUnpublishedAt: DateTime
createdAt: DateTime!
updatedAt: DateTime!
inUse: Boolean!
poolHall: PoolHall!
}
type CameraClaimSession {
id: ID!
cameraId: ID!
userId: ID!
challengeCode: String!
status: String!
expiresAt: DateTime!
detectedAt: DateTime
failedAt: DateTime
failureReason: String
agreedTermsVersion: Int
createdAt: DateTime!
updatedAt: DateTime!
camera: PoolHallCamera!
}
type CameraLease {
id: ID!
cameraId: ID!
claimSessionId: ID
userId: ID!
videoId: ID
status: String!
startedAt: DateTime!
endedAt: DateTime
expiresAt: DateTime
endReason: String
createdAt: DateTime!
updatedAt: DateTime!
camera: PoolHallCamera!
}
type GetRunsResult { type GetRunsResult {
runs: [RunGQL!]! runs: [RunGQL!]!
count: Int count: Int
@@ -1095,6 +1168,7 @@ type StripeSubscriptionOptionsGQL {
products: [StripeProductGQL!]! products: [StripeProductGQL!]!
trialPeriodDays: Int trialPeriodDays: Int
appleIap: AppleIapSubscriptionOptionsGQL! appleIap: AppleIapSubscriptionOptionsGQL!
tierOptions: [SubscriptionTierPurchaseOptionGQL!]!
} }
type StripeProductGQL { type StripeProductGQL {
@@ -1121,6 +1195,21 @@ type AppleIapSubscriptionOptionsGQL {
productIds: [String!]! 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 { type UserSubscriptionStatusGQL {
hasActiveSubscription: Boolean! hasActiveSubscription: Boolean!
entitlementSource: EntitlementSourceTypeEnum entitlementSource: EntitlementSourceTypeEnum
@@ -1330,6 +1419,24 @@ type Mutation {
markAllNotificationsAsRead: Boolean! markAllNotificationsAsRead: Boolean!
markNotificationsAsRead(notificationIds: [Int!]!): Boolean! markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
deleteNotification(notificationId: Int!): Boolean! deleteNotification(notificationId: Int!): Boolean!
createPoolHall(input: CreatePoolHallInput!): PoolHall!
updatePoolHall(input: UpdatePoolHallInput!): PoolHall!
createPoolHallCamera(
input: CreatePoolHallCameraInput!
): PoolHallCameraStreamCredentials!
updatePoolHallCamera(input: UpdatePoolHallCameraInput!): PoolHallCamera!
rotatePoolHallCameraStreamKey(cameraId: ID!): PoolHallCameraStreamCredentials!
createCameraClaimSession(
cameraId: ID!
durationMinutes: Int = null
videoName: String = null
videoPrivate: Boolean = null
agreedTermsVersion: Int = null
tags: [VideoTagInput!] = null
): CameraClaimSession!
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
endCameraLease(leaseId: ID!): CameraLease!
extendCameraLease(leaseId: ID!, additionalMinutes: Int! = 60): CameraLease!
finalizePlayerAssignments( finalizePlayerAssignments(
input: FinalizePlayerAssignmentsInput! input: FinalizePlayerAssignmentsInput!
): [PlayerClusterGQL!]! ): [PlayerClusterGQL!]!
@@ -1409,6 +1516,56 @@ enum ReportReasonEnum {
OTHER OTHER
} }
input CreatePoolHallInput {
name: String!
address: String = null
city: String = null
state: String = null
latitude: Float = null
longitude: Float = null
timezone: String = null
}
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
status: String = null
}
type PoolHallCameraStreamCredentials {
camera: PoolHallCamera!
streamKey: String!
rtmpPath: String!
}
input CreatePoolHallCameraInput {
poolHallId: ID!
name: String!
tableLabel: String = null
streamPath: String = null
tableSize: Float = null
pocketSize: Float = null
allowsPrivateVideos: Boolean = null
claimTermsText: String = null
}
input UpdatePoolHallCameraInput {
id: ID!
name: String = null
tableLabel: String = null
status: String = null
tableSize: Float = null
pocketSize: Float = null
allowsPrivateVideos: Boolean = null
claimTermsText: String = null
}
input FinalizePlayerAssignmentsInput { input FinalizePlayerAssignmentsInput {
videoId: Int! videoId: Int!
clusterAssignments: [ClusterAssignmentInput!]! = [] clusterAssignments: [ClusterAssignmentInput!]! = []