Camera claim flow: lease end/extend, claim preferences, inUse
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
259
src/index.tsx
259
src/index.tsx
@@ -2497,7 +2497,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;
|
||||
@@ -2560,6 +2562,9 @@ export type MutationCreateBucketSetArgs = {
|
||||
|
||||
export type MutationCreateCameraClaimSessionArgs = {
|
||||
cameraId: Scalars["ID"]["input"];
|
||||
durationMinutes?: InputMaybe<Scalars["Int"]["input"]>;
|
||||
videoName?: InputMaybe<Scalars["String"]["input"]>;
|
||||
videoPrivate?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
};
|
||||
|
||||
export type MutationCreateChallengeArgs = {
|
||||
@@ -2647,6 +2652,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;
|
||||
};
|
||||
@@ -2947,6 +2961,7 @@ export type PoolHallCamera = {
|
||||
__typename?: "PoolHallCamera";
|
||||
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"];
|
||||
@@ -5537,6 +5552,7 @@ export type PoolHallCameraFieldsFragment = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5553,6 +5569,7 @@ export type PoolHallCameraWithHallFieldsFragment = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5585,6 +5602,7 @@ export type PoolHallCameraStreamCredentialsFieldsFragment = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5627,6 +5645,7 @@ export type CameraClaimSessionFieldsFragment = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5670,6 +5689,7 @@ export type CameraLeaseFieldsFragment = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5743,6 +5763,7 @@ export type GetPoolHallCamerasQuery = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5778,6 +5799,7 @@ export type GetClaimableCamerasQuery = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5826,6 +5848,7 @@ export type GetCameraClaimSessionQuery = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5876,6 +5899,7 @@ export type GetActiveCameraLeaseQuery = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5956,6 +5980,7 @@ export type CreatePoolHallCameraMutation = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -5992,6 +6017,7 @@ export type UpdatePoolHallCameraMutation = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -6031,6 +6057,7 @@ export type RotatePoolHallCameraStreamKeyMutation = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -6053,6 +6080,9 @@ 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"]>;
|
||||
}>;
|
||||
|
||||
export type CreateCameraClaimSessionMutation = {
|
||||
@@ -6080,6 +6110,7 @@ export type CreateCameraClaimSessionMutation = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -6129,6 +6160,110 @@ export type CancelCameraClaimSessionMutation = {
|
||||
status: string;
|
||||
tableSize?: number | null;
|
||||
pocketSize?: number | null;
|
||||
inUse: boolean;
|
||||
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 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;
|
||||
inUse: boolean;
|
||||
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 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;
|
||||
inUse: boolean;
|
||||
lastPublishedAt?: any | null;
|
||||
lastUnpublishedAt?: any | null;
|
||||
createdAt: any;
|
||||
@@ -8468,6 +8603,7 @@ export const PoolHallCameraFieldsFragmentDoc = gql`
|
||||
status
|
||||
tableSize
|
||||
pocketSize
|
||||
inUse
|
||||
lastPublishedAt
|
||||
lastUnpublishedAt
|
||||
createdAt
|
||||
@@ -13094,8 +13230,18 @@ 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
|
||||
) {
|
||||
createCameraClaimSession(
|
||||
cameraId: $cameraId
|
||||
durationMinutes: $durationMinutes
|
||||
videoName: $videoName
|
||||
videoPrivate: $videoPrivate
|
||||
) {
|
||||
...CameraClaimSessionFields
|
||||
}
|
||||
}
|
||||
@@ -13120,6 +13266,9 @@ 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'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
@@ -13197,6 +13346,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)
|
||||
|
||||
@@ -19,6 +19,7 @@ fragment PoolHallCameraFields on PoolHallCamera {
|
||||
status
|
||||
tableSize
|
||||
pocketSize
|
||||
inUse
|
||||
lastPublishedAt
|
||||
lastUnpublishedAt
|
||||
createdAt
|
||||
@@ -141,8 +142,18 @@ mutation RotatePoolHallCameraStreamKey($cameraId: ID!) {
|
||||
}
|
||||
}
|
||||
|
||||
mutation CreateCameraClaimSession($cameraId: ID!) {
|
||||
createCameraClaimSession(cameraId: $cameraId) {
|
||||
mutation CreateCameraClaimSession(
|
||||
$cameraId: ID!
|
||||
$durationMinutes: Int
|
||||
$videoName: String
|
||||
$videoPrivate: Boolean
|
||||
) {
|
||||
createCameraClaimSession(
|
||||
cameraId: $cameraId
|
||||
durationMinutes: $durationMinutes
|
||||
videoName: $videoName
|
||||
videoPrivate: $videoPrivate
|
||||
) {
|
||||
...CameraClaimSessionFields
|
||||
}
|
||||
}
|
||||
@@ -152,3 +163,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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -913,6 +913,7 @@ type PoolHallCamera {
|
||||
lastUnpublishedAt: DateTime
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
inUse: Boolean!
|
||||
poolHall: PoolHall!
|
||||
}
|
||||
|
||||
@@ -1403,8 +1404,15 @@ 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
|
||||
): CameraClaimSession!
|
||||
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
|
||||
endCameraLease(leaseId: ID!): CameraLease!
|
||||
extendCameraLease(leaseId: ID!, additionalMinutes: Int! = 60): CameraLease!
|
||||
finalizePlayerAssignments(
|
||||
input: FinalizePlayerAssignmentsInput!
|
||||
): [PlayerClusterGQL!]!
|
||||
|
||||
Reference in New Issue
Block a user