Compare commits

..

5 Commits

Author SHA1 Message Date
Dean Wenstrand
3ce2a7be61 Add per-camera recording policy (terms + private allowance) to schema
All checks were successful
Tests / Tests (pull_request) Successful in 10s
allowsPrivateVideos / claimTermsText / claimTermsVersion on PoolHallCamera,
agreedTermsVersion on CameraClaimSession + the create-claim mutation.

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 16:59:15 -07:00
0b6ac787d8 Merge pull request 'Camera claim flow: lease end/extend, claim preferences, inUse' (#282) from dean/camera-claim-flow into master
Reviewed-on: #282
2026-07-05 18:55:01 +00:00
Dean Wenstrand
ac479dc7e4 Camera claim flow: lease end/extend, claim preferences, inUse
All checks were successful
Tests / Tests (pull_request) Successful in 25s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 18:44:01 -07:00
c6a754cc2d Merge pull request 'Add tableSize/pocketSize to pool hall camera schema' (#281) from dean/camera-table-dimensions into master
Reviewed-on: #281
2026-07-05 00:23:56 +00:00
3 changed files with 431 additions and 5 deletions

View File

@@ -157,6 +157,7 @@ export type BucketSetInputGql = {
export type CameraClaimSession = {
__typename?: "CameraClaimSession";
agreedTermsVersion?: Maybe<Scalars["Int"]["output"]>;
camera: PoolHallCamera;
cameraId: Scalars["ID"]["output"];
challengeCode: Scalars["String"]["output"];
@@ -284,6 +285,8 @@ export type CreateCustomerPortalSessionResultGql = {
};
export type CreatePoolHallCameraInput = {
allowsPrivateVideos?: InputMaybe<Scalars["Boolean"]["input"]>;
claimTermsText?: InputMaybe<Scalars["String"]["input"]>;
name: Scalars["String"]["input"];
pocketSize?: InputMaybe<Scalars["Float"]["input"]>;
poolHallId: Scalars["ID"]["input"];
@@ -294,9 +297,11 @@ export type CreatePoolHallCameraInput = {
export type CreatePoolHallInput = {
address?: InputMaybe<Scalars["String"]["input"]>;
city?: InputMaybe<Scalars["String"]["input"]>;
latitude?: InputMaybe<Scalars["Float"]["input"]>;
longitude?: InputMaybe<Scalars["Float"]["input"]>;
name: Scalars["String"]["input"];
state?: InputMaybe<Scalars["String"]["input"]>;
timezone?: InputMaybe<Scalars["String"]["input"]>;
};
@@ -2497,7 +2502,9 @@ export type Mutation = {
editShot: EditShotReturn;
editUploadStream: Scalars["Boolean"]["output"];
editUser: UserGql;
endCameraLease: CameraLease;
ensureStripeCustomerExists: UserGql;
extendCameraLease: CameraLease;
finalizePlayerAssignments: Array<PlayerClusterGql>;
findPrerecordTableLayout?: Maybe<HomographyInfoGql>;
followUser: UserGql;
@@ -2559,7 +2566,11 @@ export type MutationCreateBucketSetArgs = {
};
export type MutationCreateCameraClaimSessionArgs = {
agreedTermsVersion?: InputMaybe<Scalars["Int"]["input"]>;
cameraId: Scalars["ID"]["input"];
durationMinutes?: InputMaybe<Scalars["Int"]["input"]>;
videoName?: InputMaybe<Scalars["String"]["input"]>;
videoPrivate?: InputMaybe<Scalars["Boolean"]["input"]>;
};
export type MutationCreateChallengeArgs = {
@@ -2647,6 +2658,15 @@ export type MutationEditUserArgs = {
input: EditUserInputGql;
};
export type MutationEndCameraLeaseArgs = {
leaseId: Scalars["ID"]["input"];
};
export type MutationExtendCameraLeaseArgs = {
additionalMinutes?: Scalars["Int"]["input"];
leaseId: Scalars["ID"]["input"];
};
export type MutationFinalizePlayerAssignmentsArgs = {
input: FinalizePlayerAssignmentsInput;
};
@@ -2933,11 +2953,13 @@ export type PocketingIntentionInfoGql = {
export type PoolHall = {
__typename?: "PoolHall";
address?: Maybe<Scalars["String"]["output"]>;
city?: Maybe<Scalars["String"]["output"]>;
createdAt: Scalars["DateTime"]["output"];
id: Scalars["ID"]["output"];
latitude?: Maybe<Scalars["Float"]["output"]>;
longitude?: Maybe<Scalars["Float"]["output"]>;
name: Scalars["String"]["output"];
state?: Maybe<Scalars["String"]["output"]>;
status: Scalars["String"]["output"];
timezone?: Maybe<Scalars["String"]["output"]>;
updatedAt: Scalars["DateTime"]["output"];
@@ -2945,8 +2967,12 @@ export type PoolHall = {
export type PoolHallCamera = {
__typename?: "PoolHallCamera";
allowsPrivateVideos: Scalars["Boolean"]["output"];
claimTermsText?: Maybe<Scalars["String"]["output"]>;
claimTermsVersion?: Maybe<Scalars["Int"]["output"]>;
createdAt: Scalars["DateTime"]["output"];
id: Scalars["ID"]["output"];
inUse: Scalars["Boolean"]["output"];
lastPublishedAt?: Maybe<Scalars["DateTime"]["output"]>;
lastUnpublishedAt?: Maybe<Scalars["DateTime"]["output"]>;
name: Scalars["String"]["output"];
@@ -3806,6 +3832,8 @@ export type UpdateAnnotationInputGql = {
};
export type UpdatePoolHallCameraInput = {
allowsPrivateVideos?: InputMaybe<Scalars["Boolean"]["input"]>;
claimTermsText?: InputMaybe<Scalars["String"]["input"]>;
id: Scalars["ID"]["input"];
name?: InputMaybe<Scalars["String"]["input"]>;
pocketSize?: InputMaybe<Scalars["Float"]["input"]>;
@@ -3816,10 +3844,12 @@ export type UpdatePoolHallCameraInput = {
export type UpdatePoolHallInput = {
address?: InputMaybe<Scalars["String"]["input"]>;
city?: InputMaybe<Scalars["String"]["input"]>;
id: Scalars["ID"]["input"];
latitude?: InputMaybe<Scalars["Float"]["input"]>;
longitude?: InputMaybe<Scalars["Float"]["input"]>;
name?: InputMaybe<Scalars["String"]["input"]>;
state?: InputMaybe<Scalars["String"]["input"]>;
status?: InputMaybe<Scalars["String"]["input"]>;
timezone?: InputMaybe<Scalars["String"]["input"]>;
};
@@ -5519,6 +5549,8 @@ export type PoolHallFieldsFragment = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5537,6 +5569,10 @@ export type PoolHallCameraFieldsFragment = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5553,6 +5589,10 @@ export type PoolHallCameraWithHallFieldsFragment = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5562,6 +5602,8 @@ export type PoolHallCameraWithHallFieldsFragment = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5585,6 +5627,10 @@ export type PoolHallCameraStreamCredentialsFieldsFragment = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5594,6 +5640,8 @@ export type PoolHallCameraStreamCredentialsFieldsFragment = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5615,6 +5663,7 @@ export type CameraClaimSessionFieldsFragment = {
detectedAt?: any | null;
failedAt?: any | null;
failureReason?: string | null;
agreedTermsVersion?: number | null;
createdAt: any;
updatedAt: any;
camera: {
@@ -5627,6 +5676,10 @@ export type CameraClaimSessionFieldsFragment = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5636,6 +5689,8 @@ export type CameraClaimSessionFieldsFragment = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5670,6 +5725,10 @@ export type CameraLeaseFieldsFragment = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5679,6 +5738,8 @@ export type CameraLeaseFieldsFragment = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5698,6 +5759,8 @@ export type GetPoolHallsQuery = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5718,6 +5781,8 @@ export type GetClaimablePoolHallsQuery = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5743,6 +5808,10 @@ export type GetPoolHallCamerasQuery = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5752,6 +5821,8 @@ export type GetPoolHallCamerasQuery = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5778,6 +5849,10 @@ export type GetClaimableCamerasQuery = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5787,6 +5862,8 @@ export type GetClaimableCamerasQuery = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5814,6 +5891,7 @@ export type GetCameraClaimSessionQuery = {
detectedAt?: any | null;
failedAt?: any | null;
failureReason?: string | null;
agreedTermsVersion?: number | null;
createdAt: any;
updatedAt: any;
camera: {
@@ -5826,6 +5904,10 @@ export type GetCameraClaimSessionQuery = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5835,6 +5917,8 @@ export type GetCameraClaimSessionQuery = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5876,6 +5960,10 @@ export type GetActiveCameraLeaseQuery = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5885,6 +5973,8 @@ export type GetActiveCameraLeaseQuery = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5907,6 +5997,8 @@ export type CreatePoolHallMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5927,6 +6019,8 @@ export type UpdatePoolHallMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5956,6 +6050,10 @@ export type CreatePoolHallCameraMutation = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5965,6 +6063,8 @@ export type CreatePoolHallCameraMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -5992,6 +6092,10 @@ export type UpdatePoolHallCameraMutation = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6001,6 +6105,8 @@ export type UpdatePoolHallCameraMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -6031,6 +6137,10 @@ export type RotatePoolHallCameraStreamKeyMutation = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6040,6 +6150,8 @@ export type RotatePoolHallCameraStreamKeyMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -6053,6 +6165,10 @@ export type RotatePoolHallCameraStreamKeyMutation = {
export type CreateCameraClaimSessionMutationVariables = Exact<{
cameraId: Scalars["ID"]["input"];
durationMinutes?: InputMaybe<Scalars["Int"]["input"]>;
videoName?: InputMaybe<Scalars["String"]["input"]>;
videoPrivate?: InputMaybe<Scalars["Boolean"]["input"]>;
agreedTermsVersion?: InputMaybe<Scalars["Int"]["input"]>;
}>;
export type CreateCameraClaimSessionMutation = {
@@ -6068,6 +6184,7 @@ export type CreateCameraClaimSessionMutation = {
detectedAt?: any | null;
failedAt?: any | null;
failureReason?: string | null;
agreedTermsVersion?: number | null;
createdAt: any;
updatedAt: any;
camera: {
@@ -6080,6 +6197,10 @@ export type CreateCameraClaimSessionMutation = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6089,6 +6210,8 @@ export type CreateCameraClaimSessionMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -6117,6 +6240,7 @@ export type CancelCameraClaimSessionMutation = {
detectedAt?: any | null;
failedAt?: any | null;
failureReason?: string | null;
agreedTermsVersion?: number | null;
createdAt: any;
updatedAt: any;
camera: {
@@ -6129,6 +6253,10 @@ export type CancelCameraClaimSessionMutation = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6138,6 +6266,121 @@ export type CancelCameraClaimSessionMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
status: string;
createdAt: any;
updatedAt: any;
};
};
};
};
export type EndCameraLeaseMutationVariables = Exact<{
leaseId: Scalars["ID"]["input"];
}>;
export type EndCameraLeaseMutation = {
__typename?: "Mutation";
endCameraLease: {
__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;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
updatedAt: any;
poolHall: {
__typename?: "PoolHall";
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
status: string;
createdAt: any;
updatedAt: any;
};
};
};
};
export type ExtendCameraLeaseMutationVariables = Exact<{
leaseId: Scalars["ID"]["input"];
additionalMinutes?: Scalars["Int"]["input"];
}>;
export type ExtendCameraLeaseMutation = {
__typename?: "Mutation";
extendCameraLease: {
__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;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
updatedAt: any;
poolHall: {
__typename?: "PoolHall";
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -8468,6 +8711,10 @@ export const PoolHallCameraFieldsFragmentDoc = gql`
status
tableSize
pocketSize
allowsPrivateVideos
claimTermsText
claimTermsVersion
inUse
lastPublishedAt
lastUnpublishedAt
createdAt
@@ -8479,6 +8726,8 @@ export const PoolHallFieldsFragmentDoc = gql`
id
name
address
city
state
latitude
longitude
timezone
@@ -8518,6 +8767,7 @@ export const CameraClaimSessionFieldsFragmentDoc = gql`
detectedAt
failedAt
failureReason
agreedTermsVersion
createdAt
updatedAt
camera {
@@ -13094,8 +13344,20 @@ export type RotatePoolHallCameraStreamKeyMutationOptions =
RotatePoolHallCameraStreamKeyMutationVariables
>;
export const CreateCameraClaimSessionDocument = gql`
mutation CreateCameraClaimSession($cameraId: ID!) {
createCameraClaimSession(cameraId: $cameraId) {
mutation CreateCameraClaimSession(
$cameraId: ID!
$durationMinutes: Int
$videoName: String
$videoPrivate: Boolean
$agreedTermsVersion: Int
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
agreedTermsVersion: $agreedTermsVersion
) {
...CameraClaimSessionFields
}
}
@@ -13120,6 +13382,10 @@ export type CreateCameraClaimSessionMutationFn = Apollo.MutationFunction<
* const [createCameraClaimSessionMutation, { data, loading, error }] = useCreateCameraClaimSessionMutation({
* variables: {
* cameraId: // value for 'cameraId'
* durationMinutes: // value for 'durationMinutes'
* videoName: // value for 'videoName'
* videoPrivate: // value for 'videoPrivate'
* agreedTermsVersion: // value for 'agreedTermsVersion'
* },
* });
*/
@@ -13197,6 +13463,112 @@ export type CancelCameraClaimSessionMutationOptions =
CancelCameraClaimSessionMutation,
CancelCameraClaimSessionMutationVariables
>;
export const EndCameraLeaseDocument = gql`
mutation EndCameraLease($leaseId: ID!) {
endCameraLease(leaseId: $leaseId) {
...CameraLeaseFields
}
}
${CameraLeaseFieldsFragmentDoc}
`;
export type EndCameraLeaseMutationFn = Apollo.MutationFunction<
EndCameraLeaseMutation,
EndCameraLeaseMutationVariables
>;
/**
* __useEndCameraLeaseMutation__
*
* To run a mutation, you first call `useEndCameraLeaseMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useEndCameraLeaseMutation` 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 [endCameraLeaseMutation, { data, loading, error }] = useEndCameraLeaseMutation({
* variables: {
* leaseId: // value for 'leaseId'
* },
* });
*/
export function useEndCameraLeaseMutation(
baseOptions?: Apollo.MutationHookOptions<
EndCameraLeaseMutation,
EndCameraLeaseMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
EndCameraLeaseMutation,
EndCameraLeaseMutationVariables
>(EndCameraLeaseDocument, options);
}
export type EndCameraLeaseMutationHookResult = ReturnType<
typeof useEndCameraLeaseMutation
>;
export type EndCameraLeaseMutationResult =
Apollo.MutationResult<EndCameraLeaseMutation>;
export type EndCameraLeaseMutationOptions = Apollo.BaseMutationOptions<
EndCameraLeaseMutation,
EndCameraLeaseMutationVariables
>;
export const ExtendCameraLeaseDocument = gql`
mutation ExtendCameraLease($leaseId: ID!, $additionalMinutes: Int! = 60) {
extendCameraLease(
leaseId: $leaseId
additionalMinutes: $additionalMinutes
) {
...CameraLeaseFields
}
}
${CameraLeaseFieldsFragmentDoc}
`;
export type ExtendCameraLeaseMutationFn = Apollo.MutationFunction<
ExtendCameraLeaseMutation,
ExtendCameraLeaseMutationVariables
>;
/**
* __useExtendCameraLeaseMutation__
*
* To run a mutation, you first call `useExtendCameraLeaseMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useExtendCameraLeaseMutation` 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 [extendCameraLeaseMutation, { data, loading, error }] = useExtendCameraLeaseMutation({
* variables: {
* leaseId: // value for 'leaseId'
* additionalMinutes: // value for 'additionalMinutes'
* },
* });
*/
export function useExtendCameraLeaseMutation(
baseOptions?: Apollo.MutationHookOptions<
ExtendCameraLeaseMutation,
ExtendCameraLeaseMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
ExtendCameraLeaseMutation,
ExtendCameraLeaseMutationVariables
>(ExtendCameraLeaseDocument, options);
}
export type ExtendCameraLeaseMutationHookResult = ReturnType<
typeof useExtendCameraLeaseMutation
>;
export type ExtendCameraLeaseMutationResult =
Apollo.MutationResult<ExtendCameraLeaseMutation>;
export type ExtendCameraLeaseMutationOptions = Apollo.BaseMutationOptions<
ExtendCameraLeaseMutation,
ExtendCameraLeaseMutationVariables
>;
export const ReactToVideoDocument = gql`
mutation ReactToVideo($videoId: Int!, $reaction: ReactionEnum) {
reactToVideo(videoId: $videoId, reaction: $reaction)

View File

@@ -2,6 +2,8 @@ fragment PoolHallFields on PoolHall {
id
name
address
city
state
latitude
longitude
timezone
@@ -19,6 +21,10 @@ fragment PoolHallCameraFields on PoolHallCamera {
status
tableSize
pocketSize
allowsPrivateVideos
claimTermsText
claimTermsVersion
inUse
lastPublishedAt
lastUnpublishedAt
createdAt
@@ -50,6 +56,7 @@ fragment CameraClaimSessionFields on CameraClaimSession {
detectedAt
failedAt
failureReason
agreedTermsVersion
createdAt
updatedAt
camera {
@@ -141,8 +148,20 @@ mutation RotatePoolHallCameraStreamKey($cameraId: ID!) {
}
}
mutation CreateCameraClaimSession($cameraId: ID!) {
createCameraClaimSession(cameraId: $cameraId) {
mutation CreateCameraClaimSession(
$cameraId: ID!
$durationMinutes: Int
$videoName: String
$videoPrivate: Boolean
$agreedTermsVersion: Int
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
agreedTermsVersion: $agreedTermsVersion
) {
...CameraClaimSessionFields
}
}
@@ -152,3 +171,15 @@ mutation CancelCameraClaimSession($claimSessionId: ID!) {
...CameraClaimSessionFields
}
}
mutation EndCameraLease($leaseId: ID!) {
endCameraLease(leaseId: $leaseId) {
...CameraLeaseFields
}
}
mutation ExtendCameraLease($leaseId: ID!, $additionalMinutes: Int! = 60) {
extendCameraLease(leaseId: $leaseId, additionalMinutes: $additionalMinutes) {
...CameraLeaseFields
}
}

View File

@@ -892,6 +892,8 @@ type PoolHall {
id: ID!
name: String!
address: String
city: String
state: String
latitude: Float
longitude: Float
timezone: String
@@ -909,10 +911,14 @@ type PoolHallCamera {
status: String!
tableSize: Float
pocketSize: Float
allowsPrivateVideos: Boolean!
claimTermsText: String
claimTermsVersion: Int
lastPublishedAt: DateTime
lastUnpublishedAt: DateTime
createdAt: DateTime!
updatedAt: DateTime!
inUse: Boolean!
poolHall: PoolHall!
}
@@ -926,6 +932,7 @@ type CameraClaimSession {
detectedAt: DateTime
failedAt: DateTime
failureReason: String
agreedTermsVersion: Int
createdAt: DateTime!
updatedAt: DateTime!
camera: PoolHallCamera!
@@ -1403,8 +1410,16 @@ type Mutation {
): PoolHallCameraStreamCredentials!
updatePoolHallCamera(input: UpdatePoolHallCameraInput!): PoolHallCamera!
rotatePoolHallCameraStreamKey(cameraId: ID!): PoolHallCameraStreamCredentials!
createCameraClaimSession(cameraId: ID!): CameraClaimSession!
createCameraClaimSession(
cameraId: ID!
durationMinutes: Int = null
videoName: String = null
videoPrivate: Boolean = null
agreedTermsVersion: Int = null
): CameraClaimSession!
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
endCameraLease(leaseId: ID!): CameraLease!
extendCameraLease(leaseId: ID!, additionalMinutes: Int! = 60): CameraLease!
finalizePlayerAssignments(
input: FinalizePlayerAssignmentsInput!
): [PlayerClusterGQL!]!
@@ -1487,6 +1502,8 @@ enum ReportReasonEnum {
input CreatePoolHallInput {
name: String!
address: String = null
city: String = null
state: String = null
latitude: Float = null
longitude: Float = null
timezone: String = null
@@ -1496,6 +1513,8 @@ input UpdatePoolHallInput {
id: ID!
name: String = null
address: String = null
city: String = null
state: String = null
latitude: Float = null
longitude: Float = null
timezone: String = null
@@ -1515,6 +1534,8 @@ input CreatePoolHallCameraInput {
streamPath: String = null
tableSize: Float = null
pocketSize: Float = null
allowsPrivateVideos: Boolean = null
claimTermsText: String = null
}
input UpdatePoolHallCameraInput {
@@ -1524,6 +1545,8 @@ input UpdatePoolHallCameraInput {
status: String = null
tableSize: Float = null
pocketSize: Float = null
allowsPrivateVideos: Boolean = null
claimTermsText: String = null
}
input FinalizePlayerAssignmentsInput {