Add pool hall camera GraphQL operations
All checks were successful
Tests / Tests (pull_request) Successful in 9s

This commit is contained in:
2026-07-02 21:52:48 -07:00
parent 8111042936
commit 64bc5c723a
2 changed files with 1646 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,152 @@
fragment PoolHallFields on PoolHall {
id
name
address
latitude
longitude
timezone
status
createdAt
updatedAt
}
fragment PoolHallCameraFields on PoolHallCamera {
id
poolHallId
name
tableLabel
streamPath
status
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!) {
createCameraClaimSession(cameraId: $cameraId) {
...CameraClaimSessionFields
}
}
mutation CancelCameraClaimSession($claimSessionId: ID!) {
cancelCameraClaimSession(claimSessionId: $claimSessionId) {
...CameraClaimSessionFields
}
}