From d6fd68c1f61f3e6d813d50e6d94ad0c76ad98e2a Mon Sep 17 00:00:00 2001 From: Loewy Date: Thu, 28 May 2026 14:40:31 -0700 Subject: [PATCH 1/3] add quotaEnforcementEnabled to deployed config --- src/index.tsx | 3 +++ src/operations/config.gql | 1 + src/schema.gql | 1 + 3 files changed, 5 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 15d1c7d..678e678 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -290,6 +290,7 @@ export type DeployedConfigGql = { environment: Scalars["String"]["output"]; firebase: Scalars["Boolean"]["output"]; minimumAllowedAppVersion: Scalars["String"]["output"]; + quotaEnforcementEnabled: Scalars["Boolean"]["output"]; subscriptionGatingEnabled: Scalars["Boolean"]["output"]; }; @@ -4133,6 +4134,7 @@ export type GetDeployedConfigQuery = { firebase: boolean; minimumAllowedAppVersion: string; subscriptionGatingEnabled: boolean; + quotaEnforcementEnabled: boolean; defaultAndroidRecordingFormat: StreamSegmentTypeEnum; bucketUrl: string; bannerMessages: Array<{ @@ -8591,6 +8593,7 @@ export const GetDeployedConfigDocument = gql` firebase minimumAllowedAppVersion subscriptionGatingEnabled + quotaEnforcementEnabled bannerMessages { color dismissible diff --git a/src/operations/config.gql b/src/operations/config.gql index 5f60e08..67ad05d 100644 --- a/src/operations/config.gql +++ b/src/operations/config.gql @@ -6,6 +6,7 @@ query getDeployedConfig { firebase minimumAllowedAppVersion subscriptionGatingEnabled + quotaEnforcementEnabled bannerMessages { color dismissible diff --git a/src/schema.gql b/src/schema.gql index a907316..4c6dc1c 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -688,6 +688,7 @@ type DeployedConfigGQL { environment: String! minimumAllowedAppVersion: String! subscriptionGatingEnabled: Boolean! + quotaEnforcementEnabled: Boolean! bannerMessages: [BannerGQL!]! defaultAndroidRecordingFormat: StreamSegmentTypeEnum! bucketUrl: String! From 8111042936fd572747a5dc23ea281eb449ae74d8 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 16 Jun 2026 15:41:16 -0700 Subject: [PATCH 2/3] Add pool hall camera claim schema --- src/index.tsx | 153 +++++++++++++++++++++++++++++++++++++++++++++++++ src/schema.gql | 110 +++++++++++++++++++++++++++++++++++ 2 files changed, 263 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 678e678..22be4b2 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -140,6 +140,39 @@ export type BucketSetInputGql = { feature: Scalars["String"]["input"]; }; +export type CameraClaimSession = { + __typename?: "CameraClaimSession"; + camera: PoolHallCamera; + cameraId: Scalars["ID"]["output"]; + challengeCode: Scalars["String"]["output"]; + createdAt: Scalars["DateTime"]["output"]; + detectedAt?: Maybe; + expiresAt: Scalars["DateTime"]["output"]; + failedAt?: Maybe; + failureReason?: Maybe; + id: Scalars["ID"]["output"]; + status: Scalars["String"]["output"]; + updatedAt: Scalars["DateTime"]["output"]; + userId: Scalars["ID"]["output"]; +}; + +export type CameraLease = { + __typename?: "CameraLease"; + camera: PoolHallCamera; + cameraId: Scalars["ID"]["output"]; + claimSessionId?: Maybe; + createdAt: Scalars["DateTime"]["output"]; + endReason?: Maybe; + endedAt?: Maybe; + expiresAt?: Maybe; + id: Scalars["ID"]["output"]; + startedAt: Scalars["DateTime"]["output"]; + status: Scalars["String"]["output"]; + updatedAt: Scalars["DateTime"]["output"]; + userId: Scalars["ID"]["output"]; + videoId?: Maybe; +}; + export type CancellationFeedbackMetadataInput = { appVersion?: InputMaybe; gitRevision?: InputMaybe; @@ -235,6 +268,21 @@ export type CreateCustomerPortalSessionResultGql = { portalUrl: Scalars["String"]["output"]; }; +export type CreatePoolHallCameraInput = { + name: Scalars["String"]["input"]; + poolHallId: Scalars["ID"]["input"]; + streamPath?: InputMaybe; + tableLabel?: InputMaybe; +}; + +export type CreatePoolHallInput = { + address?: InputMaybe; + latitude?: InputMaybe; + longitude?: InputMaybe; + name: Scalars["String"]["input"]; + timezone?: InputMaybe; +}; + export type CreateSubscriptionResultGql = { __typename?: "CreateSubscriptionResultGQL"; checkoutUrl: Scalars["String"]["output"]; @@ -2387,11 +2435,15 @@ export type Mutation = { addAnnotationToShot: AddShotAnnotationReturn; blockContent: Scalars["Boolean"]["output"]; blockUser: Scalars["Boolean"]["output"]; + cancelCameraClaimSession: CameraClaimSession; cancelSubscription: UserSubscriptionStatusGql; commentOnVideo: Scalars["Boolean"]["output"]; createBucketSet: BucketSetGql; + createCameraClaimSession: CameraClaimSession; createChallenge: Challenge; createCustomerPortalSession: CreateCustomerPortalSessionResultGql; + createPoolHall: PoolHall; + createPoolHallCamera: PoolHallCameraStreamCredentials; createRuleSet: RuleSet; createSubscription: CreateSubscriptionResultGql; createUploadStream: CreateUploadStreamReturn; @@ -2424,6 +2476,7 @@ export type Mutation = { respondToChallengeInvitation: ChallengeInvitation; retireTags: Scalars["Boolean"]["output"]; revokeManualEntitlement: UserSubscriptionStatusGql; + rotatePoolHallCameraStreamKey: PoolHallCameraStreamCredentials; setLoggerLevel: Scalars["Boolean"]["output"]; setSegmentDuration: Scalars["Boolean"]["output"]; startChallenge: ChallengeEntry; @@ -2431,6 +2484,8 @@ export type Mutation = { submitChallengeEntry: ChallengeEntry; undismissChallenge: Scalars["Boolean"]["output"]; unfollowUser: UserGql; + updatePoolHall: PoolHall; + updatePoolHallCamera: PoolHallCamera; updateShotAnnotations: UpdateShotAnnotationReturn; }; @@ -2448,6 +2503,10 @@ export type MutationBlockUserArgs = { userId: Scalars["Int"]["input"]; }; +export type MutationCancelCameraClaimSessionArgs = { + claimSessionId: Scalars["ID"]["input"]; +}; + export type MutationCommentOnVideoArgs = { message: Scalars["String"]["input"]; parentCommentId?: InputMaybe; @@ -2458,6 +2517,10 @@ export type MutationCreateBucketSetArgs = { params: CreateBucketSetInput; }; +export type MutationCreateCameraClaimSessionArgs = { + cameraId: Scalars["ID"]["input"]; +}; + export type MutationCreateChallengeArgs = { description?: InputMaybe; endDate: Scalars["DateTime"]["input"]; @@ -2471,6 +2534,14 @@ export type MutationCreateChallengeArgs = { startDate: Scalars["DateTime"]["input"]; }; +export type MutationCreatePoolHallArgs = { + input: CreatePoolHallInput; +}; + +export type MutationCreatePoolHallCameraArgs = { + input: CreatePoolHallCameraInput; +}; + export type MutationCreateRuleSetArgs = { description?: InputMaybe; name: Scalars["String"]["input"]; @@ -2606,6 +2677,10 @@ export type MutationRevokeManualEntitlementArgs = { userId: Scalars["Int"]["input"]; }; +export type MutationRotatePoolHallCameraStreamKeyArgs = { + cameraId: Scalars["ID"]["input"]; +}; + export type MutationSetLoggerLevelArgs = { level: Scalars["String"]["input"]; path: Scalars["String"]["input"]; @@ -2640,6 +2715,14 @@ export type MutationUnfollowUserArgs = { followedUserId: Scalars["Int"]["input"]; }; +export type MutationUpdatePoolHallArgs = { + input: UpdatePoolHallInput; +}; + +export type MutationUpdatePoolHallCameraArgs = { + input: UpdatePoolHallCameraInput; +}; + export type MutationUpdateShotAnnotationsArgs = { annotations: Array; shotId: Scalars["Int"]["input"]; @@ -2791,6 +2874,41 @@ export type PocketingIntentionInfoGql = { pocketId: PocketIdentifier; }; +export type PoolHall = { + __typename?: "PoolHall"; + address?: Maybe; + createdAt: Scalars["DateTime"]["output"]; + id: Scalars["ID"]["output"]; + latitude?: Maybe; + longitude?: Maybe; + name: Scalars["String"]["output"]; + status: Scalars["String"]["output"]; + timezone?: Maybe; + updatedAt: Scalars["DateTime"]["output"]; +}; + +export type PoolHallCamera = { + __typename?: "PoolHallCamera"; + createdAt: Scalars["DateTime"]["output"]; + id: Scalars["ID"]["output"]; + lastPublishedAt?: Maybe; + lastUnpublishedAt?: Maybe; + name: Scalars["String"]["output"]; + poolHall: PoolHall; + poolHallId: Scalars["ID"]["output"]; + status: Scalars["String"]["output"]; + streamPath: Scalars["String"]["output"]; + tableLabel?: Maybe; + updatedAt: Scalars["DateTime"]["output"]; +}; + +export type PoolHallCameraStreamCredentials = { + __typename?: "PoolHallCameraStreamCredentials"; + camera: PoolHallCamera; + rtmpPath: Scalars["String"]["output"]; + streamKey: Scalars["String"]["output"]; +}; + export type ProcessingFailedErr = { __typename?: "ProcessingFailedErr"; processing: VideoProcessingGql; @@ -2809,9 +2927,13 @@ export enum ProcessingStatusEnum { export type Query = { __typename?: "Query"; + activeCameraLease?: Maybe; + cameraClaimSession?: Maybe; challenge?: Maybe; challengeLeaderboard: Array; challenges: Array; + claimableCameras: Array; + claimablePoolHalls: Array; doesUsernameExist: Scalars["Boolean"]["output"]; getAggregatedShotMetrics: Array; getAvailableSubscriptionOptions: StripeSubscriptionOptionsGql; @@ -2847,12 +2969,18 @@ export type Query = { myChallengeInvitations: Array; myDismissedChallenges: Array; notifications: NotificationConnection; + poolHallCameras: Array; + poolHalls: Array; ruleSets: Array; unreadNotificationCount: Scalars["Int"]["output"]; videoPlayerClusters: Array; waitFor: Scalars["Float"]["output"]; }; +export type QueryCameraClaimSessionArgs = { + id: Scalars["ID"]["input"]; +}; + export type QueryChallengeArgs = { id: Scalars["ID"]["input"]; }; @@ -2866,6 +2994,10 @@ export type QueryChallengesArgs = { includeDismissed?: Scalars["Boolean"]["input"]; }; +export type QueryClaimableCamerasArgs = { + poolHallId: Scalars["ID"]["input"]; +}; + export type QueryDoesUsernameExistArgs = { candidateUsername: Scalars["String"]["input"]; }; @@ -3016,6 +3148,10 @@ export type QueryNotificationsArgs = { offset?: Scalars["Int"]["input"]; }; +export type QueryPoolHallCamerasArgs = { + poolHallId: Scalars["ID"]["input"]; +}; + export type QueryVideoPlayerClustersArgs = { videoId: Scalars["Int"]["input"]; }; @@ -3432,6 +3568,23 @@ export type UpdateAnnotationInputGql = { notes?: InputMaybe; }; +export type UpdatePoolHallCameraInput = { + id: Scalars["ID"]["input"]; + name?: InputMaybe; + status?: InputMaybe; + tableLabel?: InputMaybe; +}; + +export type UpdatePoolHallInput = { + address?: InputMaybe; + id: Scalars["ID"]["input"]; + latitude?: InputMaybe; + longitude?: InputMaybe; + name?: InputMaybe; + status?: InputMaybe; + timezone?: InputMaybe; +}; + export type UpdateShotAnnotationReturn = { __typename?: "UpdateShotAnnotationReturn"; error?: Maybe; diff --git a/src/schema.gql b/src/schema.gql index 4c6dc1c..3af0c3a 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -42,6 +42,12 @@ type Query { filters: NotificationFilters = null ): NotificationConnection! unreadNotificationCount: Int! + poolHalls: [PoolHall!]! + claimablePoolHalls: [PoolHall!]! + poolHallCameras(poolHallId: ID!): [PoolHallCamera!]! + claimableCameras(poolHallId: ID!): [PoolHallCamera!]! + cameraClaimSession(id: ID!): CameraClaimSession + activeCameraLease: CameraLease getRuns( filterInput: RunFilterInput! runIds: [Int!] = null @@ -840,6 +846,63 @@ input NotificationFilters { 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! + lastPublishedAt: DateTime + lastUnpublishedAt: DateTime + createdAt: DateTime! + updatedAt: DateTime! + 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 { runs: [RunGQL!]! count: Int @@ -1149,6 +1212,15 @@ type Mutation { markAllNotificationsAsRead: Boolean! markNotificationsAsRead(notificationIds: [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!): CameraClaimSession! + cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession! finalizePlayerAssignments( input: FinalizePlayerAssignmentsInput! ): [PlayerClusterGQL!]! @@ -1223,6 +1295,44 @@ enum ReportReasonEnum { 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 +} + +input UpdatePoolHallCameraInput { + id: ID! + name: String = null + tableLabel: String = null + status: String = null +} + input FinalizePlayerAssignmentsInput { videoId: Int! clusterAssignments: [ClusterAssignmentInput!]! = [] From 64bc5c723ac8c5196db1e34e8ee862a6939d899a Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 2 Jul 2026 21:52:48 -0700 Subject: [PATCH 3/3] Add pool hall camera GraphQL operations --- src/index.tsx | 1494 ++++++++++++++++++++++++++++++++++ src/operations/pool_hall.gql | 152 ++++ 2 files changed, 1646 insertions(+) create mode 100644 src/operations/pool_hall.gql diff --git a/src/index.tsx b/src/index.tsx index 22be4b2..709b736 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -5092,6 +5092,613 @@ export type SubmitCancellationFeedbackMutation = { submitCancellationFeedback: boolean; }; +export type PoolHallFieldsFragment = { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; +}; + +export type PoolHallCameraFieldsFragment = { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; +}; + +export type PoolHallCameraWithHallFieldsFragment = { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; +}; + +export type PoolHallCameraStreamCredentialsFieldsFragment = { + __typename?: "PoolHallCameraStreamCredentials"; + streamKey: string; + rtmpPath: string; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; +}; + +export type CameraClaimSessionFieldsFragment = { + __typename?: "CameraClaimSession"; + id: string; + cameraId: string; + userId: string; + challengeCode: string; + status: string; + expiresAt: any; + detectedAt?: any | null; + failedAt?: any | null; + failureReason?: string | null; + createdAt: any; + updatedAt: any; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; +}; + +export type CameraLeaseFieldsFragment = { + __typename?: "CameraLease"; + id: string; + cameraId: string; + claimSessionId?: string | null; + userId: string; + videoId?: string | null; + status: string; + startedAt: any; + endedAt?: any | null; + expiresAt?: any | null; + endReason?: string | null; + createdAt: any; + updatedAt: any; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; +}; + +export type GetPoolHallsQueryVariables = Exact<{ [key: string]: never }>; + +export type GetPoolHallsQuery = { + __typename?: "Query"; + poolHalls: Array<{ + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }>; +}; + +export type GetClaimablePoolHallsQueryVariables = Exact<{ + [key: string]: never; +}>; + +export type GetClaimablePoolHallsQuery = { + __typename?: "Query"; + claimablePoolHalls: Array<{ + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }>; +}; + +export type GetPoolHallCamerasQueryVariables = Exact<{ + poolHallId: Scalars["ID"]["input"]; +}>; + +export type GetPoolHallCamerasQuery = { + __typename?: "Query"; + poolHallCameras: Array<{ + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }>; +}; + +export type GetClaimableCamerasQueryVariables = Exact<{ + poolHallId: Scalars["ID"]["input"]; +}>; + +export type GetClaimableCamerasQuery = { + __typename?: "Query"; + claimableCameras: Array<{ + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }>; +}; + +export type GetCameraClaimSessionQueryVariables = Exact<{ + id: Scalars["ID"]["input"]; +}>; + +export type GetCameraClaimSessionQuery = { + __typename?: "Query"; + cameraClaimSession?: { + __typename?: "CameraClaimSession"; + id: string; + cameraId: string; + userId: string; + challengeCode: string; + status: string; + expiresAt: any; + detectedAt?: any | null; + failedAt?: any | null; + failureReason?: string | null; + createdAt: any; + updatedAt: any; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; + } | null; +}; + +export type GetActiveCameraLeaseQueryVariables = Exact<{ + [key: string]: never; +}>; + +export type GetActiveCameraLeaseQuery = { + __typename?: "Query"; + activeCameraLease?: { + __typename?: "CameraLease"; + id: string; + cameraId: string; + claimSessionId?: string | null; + userId: string; + videoId?: string | null; + status: string; + startedAt: any; + endedAt?: any | null; + expiresAt?: any | null; + endReason?: string | null; + createdAt: any; + updatedAt: any; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; + } | null; +}; + +export type CreatePoolHallMutationVariables = Exact<{ + input: CreatePoolHallInput; +}>; + +export type CreatePoolHallMutation = { + __typename?: "Mutation"; + createPoolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; +}; + +export type UpdatePoolHallMutationVariables = Exact<{ + input: UpdatePoolHallInput; +}>; + +export type UpdatePoolHallMutation = { + __typename?: "Mutation"; + updatePoolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; +}; + +export type CreatePoolHallCameraMutationVariables = Exact<{ + input: CreatePoolHallCameraInput; +}>; + +export type CreatePoolHallCameraMutation = { + __typename?: "Mutation"; + createPoolHallCamera: { + __typename?: "PoolHallCameraStreamCredentials"; + streamKey: string; + rtmpPath: string; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; + }; +}; + +export type UpdatePoolHallCameraMutationVariables = Exact<{ + input: UpdatePoolHallCameraInput; +}>; + +export type UpdatePoolHallCameraMutation = { + __typename?: "Mutation"; + updatePoolHallCamera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; +}; + +export type RotatePoolHallCameraStreamKeyMutationVariables = Exact<{ + cameraId: Scalars["ID"]["input"]; +}>; + +export type RotatePoolHallCameraStreamKeyMutation = { + __typename?: "Mutation"; + rotatePoolHallCameraStreamKey: { + __typename?: "PoolHallCameraStreamCredentials"; + streamKey: string; + rtmpPath: string; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; + }; +}; + +export type CreateCameraClaimSessionMutationVariables = Exact<{ + cameraId: Scalars["ID"]["input"]; +}>; + +export type CreateCameraClaimSessionMutation = { + __typename?: "Mutation"; + createCameraClaimSession: { + __typename?: "CameraClaimSession"; + id: string; + cameraId: string; + userId: string; + challengeCode: string; + status: string; + expiresAt: any; + detectedAt?: any | null; + failedAt?: any | null; + failureReason?: string | null; + createdAt: any; + updatedAt: any; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; + }; +}; + +export type CancelCameraClaimSessionMutationVariables = Exact<{ + claimSessionId: Scalars["ID"]["input"]; +}>; + +export type CancelCameraClaimSessionMutation = { + __typename?: "Mutation"; + cancelCameraClaimSession: { + __typename?: "CameraClaimSession"; + id: string; + cameraId: string; + userId: string; + challengeCode: string; + status: string; + expiresAt: any; + detectedAt?: any | null; + failedAt?: any | null; + failureReason?: string | null; + createdAt: any; + updatedAt: any; + camera: { + __typename?: "PoolHallCamera"; + id: string; + poolHallId: string; + name: string; + tableLabel?: string | null; + streamPath: string; + status: string; + lastPublishedAt?: any | null; + lastUnpublishedAt?: any | null; + createdAt: any; + updatedAt: any; + poolHall: { + __typename?: "PoolHall"; + id: string; + name: string; + address?: string | null; + latitude?: number | null; + longitude?: number | null; + timezone?: string | null; + status: string; + createdAt: any; + updatedAt: any; + }; + }; + }; +}; + export type ReactToVideoMutationVariables = Exact<{ videoId: Scalars["Int"]["input"]; reaction?: InputMaybe; @@ -7021,6 +7628,92 @@ export const NotificationFragmentDoc = gql` readAt } `; +export const PoolHallCameraFieldsFragmentDoc = gql` + fragment PoolHallCameraFields on PoolHallCamera { + id + poolHallId + name + tableLabel + streamPath + status + lastPublishedAt + lastUnpublishedAt + createdAt + updatedAt + } +`; +export const PoolHallFieldsFragmentDoc = gql` + fragment PoolHallFields on PoolHall { + id + name + address + latitude + longitude + timezone + status + createdAt + updatedAt + } +`; +export const PoolHallCameraWithHallFieldsFragmentDoc = gql` + fragment PoolHallCameraWithHallFields on PoolHallCamera { + ...PoolHallCameraFields + poolHall { + ...PoolHallFields + } + } + ${PoolHallCameraFieldsFragmentDoc} + ${PoolHallFieldsFragmentDoc} +`; +export const PoolHallCameraStreamCredentialsFieldsFragmentDoc = gql` + fragment PoolHallCameraStreamCredentialsFields on PoolHallCameraStreamCredentials { + streamKey + rtmpPath + camera { + ...PoolHallCameraWithHallFields + } + } + ${PoolHallCameraWithHallFieldsFragmentDoc} +`; +export const CameraClaimSessionFieldsFragmentDoc = gql` + fragment CameraClaimSessionFields on CameraClaimSession { + id + cameraId + userId + challengeCode + status + expiresAt + detectedAt + failedAt + failureReason + createdAt + updatedAt + camera { + ...PoolHallCameraWithHallFields + } + } + ${PoolHallCameraWithHallFieldsFragmentDoc} +`; +export const CameraLeaseFieldsFragmentDoc = gql` + fragment CameraLeaseFields on CameraLease { + id + cameraId + claimSessionId + userId + videoId + status + startedAt + endedAt + expiresAt + endReason + createdAt + updatedAt + camera { + ...PoolHallCameraWithHallFields + } + } + ${PoolHallCameraWithHallFieldsFragmentDoc} +`; export const PocketingIntentionFragmentFragmentDoc = gql` fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL { make @@ -10417,6 +11110,807 @@ export type SubmitCancellationFeedbackMutationOptions = SubmitCancellationFeedbackMutation, SubmitCancellationFeedbackMutationVariables >; +export const GetPoolHallsDocument = gql` + query GetPoolHalls { + poolHalls { + ...PoolHallFields + } + } + ${PoolHallFieldsFragmentDoc} +`; + +/** + * __useGetPoolHallsQuery__ + * + * To run a query within a React component, call `useGetPoolHallsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetPoolHallsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetPoolHallsQuery({ + * variables: { + * }, + * }); + */ +export function useGetPoolHallsQuery( + baseOptions?: Apollo.QueryHookOptions< + GetPoolHallsQuery, + GetPoolHallsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + GetPoolHallsDocument, + options, + ); +} +export function useGetPoolHallsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetPoolHallsQuery, + GetPoolHallsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + GetPoolHallsDocument, + options, + ); +} +export function useGetPoolHallsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetPoolHallsQuery, + GetPoolHallsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + GetPoolHallsDocument, + options, + ); +} +export type GetPoolHallsQueryHookResult = ReturnType< + typeof useGetPoolHallsQuery +>; +export type GetPoolHallsLazyQueryHookResult = ReturnType< + typeof useGetPoolHallsLazyQuery +>; +export type GetPoolHallsSuspenseQueryHookResult = ReturnType< + typeof useGetPoolHallsSuspenseQuery +>; +export type GetPoolHallsQueryResult = Apollo.QueryResult< + GetPoolHallsQuery, + GetPoolHallsQueryVariables +>; +export const GetClaimablePoolHallsDocument = gql` + query GetClaimablePoolHalls { + claimablePoolHalls { + ...PoolHallFields + } + } + ${PoolHallFieldsFragmentDoc} +`; + +/** + * __useGetClaimablePoolHallsQuery__ + * + * To run a query within a React component, call `useGetClaimablePoolHallsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetClaimablePoolHallsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetClaimablePoolHallsQuery({ + * variables: { + * }, + * }); + */ +export function useGetClaimablePoolHallsQuery( + baseOptions?: Apollo.QueryHookOptions< + GetClaimablePoolHallsQuery, + GetClaimablePoolHallsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetClaimablePoolHallsQuery, + GetClaimablePoolHallsQueryVariables + >(GetClaimablePoolHallsDocument, options); +} +export function useGetClaimablePoolHallsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetClaimablePoolHallsQuery, + GetClaimablePoolHallsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetClaimablePoolHallsQuery, + GetClaimablePoolHallsQueryVariables + >(GetClaimablePoolHallsDocument, options); +} +export function useGetClaimablePoolHallsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetClaimablePoolHallsQuery, + GetClaimablePoolHallsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetClaimablePoolHallsQuery, + GetClaimablePoolHallsQueryVariables + >(GetClaimablePoolHallsDocument, options); +} +export type GetClaimablePoolHallsQueryHookResult = ReturnType< + typeof useGetClaimablePoolHallsQuery +>; +export type GetClaimablePoolHallsLazyQueryHookResult = ReturnType< + typeof useGetClaimablePoolHallsLazyQuery +>; +export type GetClaimablePoolHallsSuspenseQueryHookResult = ReturnType< + typeof useGetClaimablePoolHallsSuspenseQuery +>; +export type GetClaimablePoolHallsQueryResult = Apollo.QueryResult< + GetClaimablePoolHallsQuery, + GetClaimablePoolHallsQueryVariables +>; +export const GetPoolHallCamerasDocument = gql` + query GetPoolHallCameras($poolHallId: ID!) { + poolHallCameras(poolHallId: $poolHallId) { + ...PoolHallCameraWithHallFields + } + } + ${PoolHallCameraWithHallFieldsFragmentDoc} +`; + +/** + * __useGetPoolHallCamerasQuery__ + * + * To run a query within a React component, call `useGetPoolHallCamerasQuery` and pass it any options that fit your needs. + * When your component renders, `useGetPoolHallCamerasQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetPoolHallCamerasQuery({ + * variables: { + * poolHallId: // value for 'poolHallId' + * }, + * }); + */ +export function useGetPoolHallCamerasQuery( + baseOptions: Apollo.QueryHookOptions< + GetPoolHallCamerasQuery, + GetPoolHallCamerasQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetPoolHallCamerasQuery, + GetPoolHallCamerasQueryVariables + >(GetPoolHallCamerasDocument, options); +} +export function useGetPoolHallCamerasLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetPoolHallCamerasQuery, + GetPoolHallCamerasQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetPoolHallCamerasQuery, + GetPoolHallCamerasQueryVariables + >(GetPoolHallCamerasDocument, options); +} +export function useGetPoolHallCamerasSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetPoolHallCamerasQuery, + GetPoolHallCamerasQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetPoolHallCamerasQuery, + GetPoolHallCamerasQueryVariables + >(GetPoolHallCamerasDocument, options); +} +export type GetPoolHallCamerasQueryHookResult = ReturnType< + typeof useGetPoolHallCamerasQuery +>; +export type GetPoolHallCamerasLazyQueryHookResult = ReturnType< + typeof useGetPoolHallCamerasLazyQuery +>; +export type GetPoolHallCamerasSuspenseQueryHookResult = ReturnType< + typeof useGetPoolHallCamerasSuspenseQuery +>; +export type GetPoolHallCamerasQueryResult = Apollo.QueryResult< + GetPoolHallCamerasQuery, + GetPoolHallCamerasQueryVariables +>; +export const GetClaimableCamerasDocument = gql` + query GetClaimableCameras($poolHallId: ID!) { + claimableCameras(poolHallId: $poolHallId) { + ...PoolHallCameraWithHallFields + } + } + ${PoolHallCameraWithHallFieldsFragmentDoc} +`; + +/** + * __useGetClaimableCamerasQuery__ + * + * To run a query within a React component, call `useGetClaimableCamerasQuery` and pass it any options that fit your needs. + * When your component renders, `useGetClaimableCamerasQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetClaimableCamerasQuery({ + * variables: { + * poolHallId: // value for 'poolHallId' + * }, + * }); + */ +export function useGetClaimableCamerasQuery( + baseOptions: Apollo.QueryHookOptions< + GetClaimableCamerasQuery, + GetClaimableCamerasQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetClaimableCamerasQuery, + GetClaimableCamerasQueryVariables + >(GetClaimableCamerasDocument, options); +} +export function useGetClaimableCamerasLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetClaimableCamerasQuery, + GetClaimableCamerasQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetClaimableCamerasQuery, + GetClaimableCamerasQueryVariables + >(GetClaimableCamerasDocument, options); +} +export function useGetClaimableCamerasSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetClaimableCamerasQuery, + GetClaimableCamerasQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetClaimableCamerasQuery, + GetClaimableCamerasQueryVariables + >(GetClaimableCamerasDocument, options); +} +export type GetClaimableCamerasQueryHookResult = ReturnType< + typeof useGetClaimableCamerasQuery +>; +export type GetClaimableCamerasLazyQueryHookResult = ReturnType< + typeof useGetClaimableCamerasLazyQuery +>; +export type GetClaimableCamerasSuspenseQueryHookResult = ReturnType< + typeof useGetClaimableCamerasSuspenseQuery +>; +export type GetClaimableCamerasQueryResult = Apollo.QueryResult< + GetClaimableCamerasQuery, + GetClaimableCamerasQueryVariables +>; +export const GetCameraClaimSessionDocument = gql` + query GetCameraClaimSession($id: ID!) { + cameraClaimSession(id: $id) { + ...CameraClaimSessionFields + } + } + ${CameraClaimSessionFieldsFragmentDoc} +`; + +/** + * __useGetCameraClaimSessionQuery__ + * + * To run a query within a React component, call `useGetCameraClaimSessionQuery` and pass it any options that fit your needs. + * When your component renders, `useGetCameraClaimSessionQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetCameraClaimSessionQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useGetCameraClaimSessionQuery( + baseOptions: Apollo.QueryHookOptions< + GetCameraClaimSessionQuery, + GetCameraClaimSessionQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetCameraClaimSessionQuery, + GetCameraClaimSessionQueryVariables + >(GetCameraClaimSessionDocument, options); +} +export function useGetCameraClaimSessionLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetCameraClaimSessionQuery, + GetCameraClaimSessionQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetCameraClaimSessionQuery, + GetCameraClaimSessionQueryVariables + >(GetCameraClaimSessionDocument, options); +} +export function useGetCameraClaimSessionSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetCameraClaimSessionQuery, + GetCameraClaimSessionQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetCameraClaimSessionQuery, + GetCameraClaimSessionQueryVariables + >(GetCameraClaimSessionDocument, options); +} +export type GetCameraClaimSessionQueryHookResult = ReturnType< + typeof useGetCameraClaimSessionQuery +>; +export type GetCameraClaimSessionLazyQueryHookResult = ReturnType< + typeof useGetCameraClaimSessionLazyQuery +>; +export type GetCameraClaimSessionSuspenseQueryHookResult = ReturnType< + typeof useGetCameraClaimSessionSuspenseQuery +>; +export type GetCameraClaimSessionQueryResult = Apollo.QueryResult< + GetCameraClaimSessionQuery, + GetCameraClaimSessionQueryVariables +>; +export const GetActiveCameraLeaseDocument = gql` + query GetActiveCameraLease { + activeCameraLease { + ...CameraLeaseFields + } + } + ${CameraLeaseFieldsFragmentDoc} +`; + +/** + * __useGetActiveCameraLeaseQuery__ + * + * To run a query within a React component, call `useGetActiveCameraLeaseQuery` and pass it any options that fit your needs. + * When your component renders, `useGetActiveCameraLeaseQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetActiveCameraLeaseQuery({ + * variables: { + * }, + * }); + */ +export function useGetActiveCameraLeaseQuery( + baseOptions?: Apollo.QueryHookOptions< + GetActiveCameraLeaseQuery, + GetActiveCameraLeaseQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetActiveCameraLeaseQuery, + GetActiveCameraLeaseQueryVariables + >(GetActiveCameraLeaseDocument, options); +} +export function useGetActiveCameraLeaseLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetActiveCameraLeaseQuery, + GetActiveCameraLeaseQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetActiveCameraLeaseQuery, + GetActiveCameraLeaseQueryVariables + >(GetActiveCameraLeaseDocument, options); +} +export function useGetActiveCameraLeaseSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetActiveCameraLeaseQuery, + GetActiveCameraLeaseQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetActiveCameraLeaseQuery, + GetActiveCameraLeaseQueryVariables + >(GetActiveCameraLeaseDocument, options); +} +export type GetActiveCameraLeaseQueryHookResult = ReturnType< + typeof useGetActiveCameraLeaseQuery +>; +export type GetActiveCameraLeaseLazyQueryHookResult = ReturnType< + typeof useGetActiveCameraLeaseLazyQuery +>; +export type GetActiveCameraLeaseSuspenseQueryHookResult = ReturnType< + typeof useGetActiveCameraLeaseSuspenseQuery +>; +export type GetActiveCameraLeaseQueryResult = Apollo.QueryResult< + GetActiveCameraLeaseQuery, + GetActiveCameraLeaseQueryVariables +>; +export const CreatePoolHallDocument = gql` + mutation CreatePoolHall($input: CreatePoolHallInput!) { + createPoolHall(input: $input) { + ...PoolHallFields + } + } + ${PoolHallFieldsFragmentDoc} +`; +export type CreatePoolHallMutationFn = Apollo.MutationFunction< + CreatePoolHallMutation, + CreatePoolHallMutationVariables +>; + +/** + * __useCreatePoolHallMutation__ + * + * To run a mutation, you first call `useCreatePoolHallMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreatePoolHallMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createPoolHallMutation, { data, loading, error }] = useCreatePoolHallMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreatePoolHallMutation( + baseOptions?: Apollo.MutationHookOptions< + CreatePoolHallMutation, + CreatePoolHallMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + CreatePoolHallMutation, + CreatePoolHallMutationVariables + >(CreatePoolHallDocument, options); +} +export type CreatePoolHallMutationHookResult = ReturnType< + typeof useCreatePoolHallMutation +>; +export type CreatePoolHallMutationResult = + Apollo.MutationResult; +export type CreatePoolHallMutationOptions = Apollo.BaseMutationOptions< + CreatePoolHallMutation, + CreatePoolHallMutationVariables +>; +export const UpdatePoolHallDocument = gql` + mutation UpdatePoolHall($input: UpdatePoolHallInput!) { + updatePoolHall(input: $input) { + ...PoolHallFields + } + } + ${PoolHallFieldsFragmentDoc} +`; +export type UpdatePoolHallMutationFn = Apollo.MutationFunction< + UpdatePoolHallMutation, + UpdatePoolHallMutationVariables +>; + +/** + * __useUpdatePoolHallMutation__ + * + * To run a mutation, you first call `useUpdatePoolHallMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdatePoolHallMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updatePoolHallMutation, { data, loading, error }] = useUpdatePoolHallMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUpdatePoolHallMutation( + baseOptions?: Apollo.MutationHookOptions< + UpdatePoolHallMutation, + UpdatePoolHallMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + UpdatePoolHallMutation, + UpdatePoolHallMutationVariables + >(UpdatePoolHallDocument, options); +} +export type UpdatePoolHallMutationHookResult = ReturnType< + typeof useUpdatePoolHallMutation +>; +export type UpdatePoolHallMutationResult = + Apollo.MutationResult; +export type UpdatePoolHallMutationOptions = Apollo.BaseMutationOptions< + UpdatePoolHallMutation, + UpdatePoolHallMutationVariables +>; +export const CreatePoolHallCameraDocument = gql` + mutation CreatePoolHallCamera($input: CreatePoolHallCameraInput!) { + createPoolHallCamera(input: $input) { + ...PoolHallCameraStreamCredentialsFields + } + } + ${PoolHallCameraStreamCredentialsFieldsFragmentDoc} +`; +export type CreatePoolHallCameraMutationFn = Apollo.MutationFunction< + CreatePoolHallCameraMutation, + CreatePoolHallCameraMutationVariables +>; + +/** + * __useCreatePoolHallCameraMutation__ + * + * To run a mutation, you first call `useCreatePoolHallCameraMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreatePoolHallCameraMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createPoolHallCameraMutation, { data, loading, error }] = useCreatePoolHallCameraMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreatePoolHallCameraMutation( + baseOptions?: Apollo.MutationHookOptions< + CreatePoolHallCameraMutation, + CreatePoolHallCameraMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + CreatePoolHallCameraMutation, + CreatePoolHallCameraMutationVariables + >(CreatePoolHallCameraDocument, options); +} +export type CreatePoolHallCameraMutationHookResult = ReturnType< + typeof useCreatePoolHallCameraMutation +>; +export type CreatePoolHallCameraMutationResult = + Apollo.MutationResult; +export type CreatePoolHallCameraMutationOptions = Apollo.BaseMutationOptions< + CreatePoolHallCameraMutation, + CreatePoolHallCameraMutationVariables +>; +export const UpdatePoolHallCameraDocument = gql` + mutation UpdatePoolHallCamera($input: UpdatePoolHallCameraInput!) { + updatePoolHallCamera(input: $input) { + ...PoolHallCameraWithHallFields + } + } + ${PoolHallCameraWithHallFieldsFragmentDoc} +`; +export type UpdatePoolHallCameraMutationFn = Apollo.MutationFunction< + UpdatePoolHallCameraMutation, + UpdatePoolHallCameraMutationVariables +>; + +/** + * __useUpdatePoolHallCameraMutation__ + * + * To run a mutation, you first call `useUpdatePoolHallCameraMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdatePoolHallCameraMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updatePoolHallCameraMutation, { data, loading, error }] = useUpdatePoolHallCameraMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUpdatePoolHallCameraMutation( + baseOptions?: Apollo.MutationHookOptions< + UpdatePoolHallCameraMutation, + UpdatePoolHallCameraMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + UpdatePoolHallCameraMutation, + UpdatePoolHallCameraMutationVariables + >(UpdatePoolHallCameraDocument, options); +} +export type UpdatePoolHallCameraMutationHookResult = ReturnType< + typeof useUpdatePoolHallCameraMutation +>; +export type UpdatePoolHallCameraMutationResult = + Apollo.MutationResult; +export type UpdatePoolHallCameraMutationOptions = Apollo.BaseMutationOptions< + UpdatePoolHallCameraMutation, + UpdatePoolHallCameraMutationVariables +>; +export const RotatePoolHallCameraStreamKeyDocument = gql` + mutation RotatePoolHallCameraStreamKey($cameraId: ID!) { + rotatePoolHallCameraStreamKey(cameraId: $cameraId) { + ...PoolHallCameraStreamCredentialsFields + } + } + ${PoolHallCameraStreamCredentialsFieldsFragmentDoc} +`; +export type RotatePoolHallCameraStreamKeyMutationFn = Apollo.MutationFunction< + RotatePoolHallCameraStreamKeyMutation, + RotatePoolHallCameraStreamKeyMutationVariables +>; + +/** + * __useRotatePoolHallCameraStreamKeyMutation__ + * + * To run a mutation, you first call `useRotatePoolHallCameraStreamKeyMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRotatePoolHallCameraStreamKeyMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [rotatePoolHallCameraStreamKeyMutation, { data, loading, error }] = useRotatePoolHallCameraStreamKeyMutation({ + * variables: { + * cameraId: // value for 'cameraId' + * }, + * }); + */ +export function useRotatePoolHallCameraStreamKeyMutation( + baseOptions?: Apollo.MutationHookOptions< + RotatePoolHallCameraStreamKeyMutation, + RotatePoolHallCameraStreamKeyMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + RotatePoolHallCameraStreamKeyMutation, + RotatePoolHallCameraStreamKeyMutationVariables + >(RotatePoolHallCameraStreamKeyDocument, options); +} +export type RotatePoolHallCameraStreamKeyMutationHookResult = ReturnType< + typeof useRotatePoolHallCameraStreamKeyMutation +>; +export type RotatePoolHallCameraStreamKeyMutationResult = + Apollo.MutationResult; +export type RotatePoolHallCameraStreamKeyMutationOptions = + Apollo.BaseMutationOptions< + RotatePoolHallCameraStreamKeyMutation, + RotatePoolHallCameraStreamKeyMutationVariables + >; +export const CreateCameraClaimSessionDocument = gql` + mutation CreateCameraClaimSession($cameraId: ID!) { + createCameraClaimSession(cameraId: $cameraId) { + ...CameraClaimSessionFields + } + } + ${CameraClaimSessionFieldsFragmentDoc} +`; +export type CreateCameraClaimSessionMutationFn = Apollo.MutationFunction< + CreateCameraClaimSessionMutation, + CreateCameraClaimSessionMutationVariables +>; + +/** + * __useCreateCameraClaimSessionMutation__ + * + * To run a mutation, you first call `useCreateCameraClaimSessionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateCameraClaimSessionMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createCameraClaimSessionMutation, { data, loading, error }] = useCreateCameraClaimSessionMutation({ + * variables: { + * cameraId: // value for 'cameraId' + * }, + * }); + */ +export function useCreateCameraClaimSessionMutation( + baseOptions?: Apollo.MutationHookOptions< + CreateCameraClaimSessionMutation, + CreateCameraClaimSessionMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + CreateCameraClaimSessionMutation, + CreateCameraClaimSessionMutationVariables + >(CreateCameraClaimSessionDocument, options); +} +export type CreateCameraClaimSessionMutationHookResult = ReturnType< + typeof useCreateCameraClaimSessionMutation +>; +export type CreateCameraClaimSessionMutationResult = + Apollo.MutationResult; +export type CreateCameraClaimSessionMutationOptions = + Apollo.BaseMutationOptions< + CreateCameraClaimSessionMutation, + CreateCameraClaimSessionMutationVariables + >; +export const CancelCameraClaimSessionDocument = gql` + mutation CancelCameraClaimSession($claimSessionId: ID!) { + cancelCameraClaimSession(claimSessionId: $claimSessionId) { + ...CameraClaimSessionFields + } + } + ${CameraClaimSessionFieldsFragmentDoc} +`; +export type CancelCameraClaimSessionMutationFn = Apollo.MutationFunction< + CancelCameraClaimSessionMutation, + CancelCameraClaimSessionMutationVariables +>; + +/** + * __useCancelCameraClaimSessionMutation__ + * + * To run a mutation, you first call `useCancelCameraClaimSessionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCancelCameraClaimSessionMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [cancelCameraClaimSessionMutation, { data, loading, error }] = useCancelCameraClaimSessionMutation({ + * variables: { + * claimSessionId: // value for 'claimSessionId' + * }, + * }); + */ +export function useCancelCameraClaimSessionMutation( + baseOptions?: Apollo.MutationHookOptions< + CancelCameraClaimSessionMutation, + CancelCameraClaimSessionMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + CancelCameraClaimSessionMutation, + CancelCameraClaimSessionMutationVariables + >(CancelCameraClaimSessionDocument, options); +} +export type CancelCameraClaimSessionMutationHookResult = ReturnType< + typeof useCancelCameraClaimSessionMutation +>; +export type CancelCameraClaimSessionMutationResult = + Apollo.MutationResult; +export type CancelCameraClaimSessionMutationOptions = + Apollo.BaseMutationOptions< + CancelCameraClaimSessionMutation, + CancelCameraClaimSessionMutationVariables + >; export const ReactToVideoDocument = gql` mutation ReactToVideo($videoId: Int!, $reaction: ReactionEnum) { reactToVideo(videoId: $videoId, reaction: $reaction) diff --git a/src/operations/pool_hall.gql b/src/operations/pool_hall.gql new file mode 100644 index 0000000..0308b6b --- /dev/null +++ b/src/operations/pool_hall.gql @@ -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 + } +}