diff --git a/src/index.tsx b/src/index.tsx index 7ecb8d9..879ba91 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -155,6 +155,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; @@ -250,6 +283,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"]; @@ -2423,11 +2471,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; @@ -2462,6 +2514,7 @@ export type Mutation = { respondToChallengeInvitation: ChallengeInvitation; retireTags: Scalars["Boolean"]["output"]; revokeManualEntitlement: UserSubscriptionStatusGql; + rotatePoolHallCameraStreamKey: PoolHallCameraStreamCredentials; setLoggerLevel: Scalars["Boolean"]["output"]; setSegmentDuration: Scalars["Boolean"]["output"]; startChallenge: ChallengeEntry; @@ -2470,6 +2523,8 @@ export type Mutation = { syncAppleSubscription: SyncAppleSubscriptionResultGql; undismissChallenge: Scalars["Boolean"]["output"]; unfollowUser: UserGql; + updatePoolHall: PoolHall; + updatePoolHallCamera: PoolHallCamera; updateShotAnnotations: UpdateShotAnnotationReturn; }; @@ -2487,6 +2542,10 @@ export type MutationBlockUserArgs = { userId: Scalars["Int"]["input"]; }; +export type MutationCancelCameraClaimSessionArgs = { + claimSessionId: Scalars["ID"]["input"]; +}; + export type MutationCommentOnVideoArgs = { message: Scalars["String"]["input"]; parentCommentId?: InputMaybe; @@ -2497,6 +2556,10 @@ export type MutationCreateBucketSetArgs = { params: CreateBucketSetInput; }; +export type MutationCreateCameraClaimSessionArgs = { + cameraId: Scalars["ID"]["input"]; +}; + export type MutationCreateChallengeArgs = { description?: InputMaybe; endDate: Scalars["DateTime"]["input"]; @@ -2510,6 +2573,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"]; @@ -2653,6 +2724,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"]; @@ -2691,6 +2766,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"]; @@ -2845,6 +2928,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 PotAimGql = { __typename?: "PotAimGQL"; converged: Scalars["Boolean"]["output"]; @@ -2875,9 +2993,13 @@ export enum ProcessingStatusEnum { export type Query = { __typename?: "Query"; + activeCameraLease?: Maybe; + cameraClaimSession?: Maybe; challenge?: Maybe; challengeLeaderboard: Array; challenges: Array; + claimableCameras: Array; + claimablePoolHalls: Array; computePotAim: PotAimGql; doesUsernameExist: Scalars["Boolean"]["output"]; getAggregatedShotMetrics: Array; @@ -2920,6 +3042,8 @@ export type Query = { myDismissedChallenges: Array; myVideoExports: Array; notifications: NotificationConnection; + poolHallCameras: Array; + poolHalls: Array; ruleSets: Array; simulateShot: ShotProjectionGql; unreadNotificationCount: Scalars["Int"]["output"]; @@ -2928,6 +3052,10 @@ export type Query = { waitFor: Scalars["Float"]["output"]; }; +export type QueryCameraClaimSessionArgs = { + id: Scalars["ID"]["input"]; +}; + export type QueryChallengeArgs = { id: Scalars["ID"]["input"]; }; @@ -2941,6 +3069,10 @@ export type QueryChallengesArgs = { includeDismissed?: Scalars["Boolean"]["input"]; }; +export type QueryClaimableCamerasArgs = { + poolHallId: Scalars["ID"]["input"]; +}; + export type QueryComputePotAimArgs = { pocket: PocketIdentifier; simulationInput: SimulateShotInputGql; @@ -3117,6 +3249,10 @@ export type QueryNotificationsArgs = { offset?: Scalars["Int"]["input"]; }; +export type QueryPoolHallCamerasArgs = { + poolHallId: Scalars["ID"]["input"]; +}; + export type QuerySimulateShotArgs = { simulationInput: SimulateShotInputGql; }; @@ -3665,6 +3801,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; @@ -5355,6 +5508,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; @@ -7664,6 +8424,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 @@ -11514,6 +12360,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/schema.gql b/src/schema.gql index a7e8b1b..931af76 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -52,6 +52,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 @@ -882,6 +888,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 @@ -1331,6 +1394,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!]! @@ -1410,6 +1482,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!]! = []