Compare commits

..

11 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
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
5 changed files with 2569 additions and 0 deletions

File diff suppressed because it is too large Load Diff

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

@@ -0,0 +1,177 @@
fragment PoolHallFields on PoolHall {
id
name
address
latitude
longitude
timezone
status
createdAt
updatedAt
}
fragment PoolHallCameraFields on PoolHallCamera {
id
poolHallId
name
tableLabel
streamPath
status
tableSize
pocketSize
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
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
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
) {
...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

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

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
@@ -66,6 +72,7 @@ type Query {
tableSize: Float = 100 tableSize: Float = 100
useHomography: HomographyInputGQL = null useHomography: HomographyInputGQL = null
): TableStateGQL! ): TableStateGQL!
getLiveTableState(videoId: Int!): LiveTableStateGQL!
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL! simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
computePotAim( computePotAim(
simulationInput: SimulateShotInputGQL! simulationInput: SimulateShotInputGQL!
@@ -721,6 +728,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 +889,66 @@ input NotificationFilters {
notificationTypes: [NotificationTypeEnum!] = null notificationTypes: [NotificationTypeEnum!] = null
} }
type PoolHall {
id: ID!
name: String!
address: 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
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
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
@@ -976,6 +1044,12 @@ input IntPoint2DInput {
y: Int! y: Int!
} }
type LiveTableStateGQL {
videoId: Int!
frameIndex: Int!
tableState: TableStateGQL!
}
type ShotProjectionGQL { type ShotProjectionGQL {
trajectories: [BallTrajectoryGQL!]! trajectories: [BallTrajectoryGQL!]!
events: [SimulationEventGQL!]! events: [SimulationEventGQL!]!
@@ -1330,6 +1404,22 @@ 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
): 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 +1499,48 @@ enum ReportReasonEnum {
OTHER OTHER
} }
input CreatePoolHallInput {
name: String!
address: String = null
latitude: Float = null
longitude: Float = null
timezone: String = null
}
input UpdatePoolHallInput {
id: ID!
name: String = null
address: 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
}
input UpdatePoolHallCameraInput {
id: ID!
name: String = null
tableLabel: String = null
status: String = null
tableSize: Float = null
pocketSize: Float = null
}
input FinalizePlayerAssignmentsInput { input FinalizePlayerAssignmentsInput {
videoId: Int! videoId: Int!
clusterAssignments: [ClusterAssignmentInput!]! = [] clusterAssignments: [ClusterAssignmentInput!]! = []