Compare commits

..

5 Commits

Author SHA1 Message Date
Dean Wenstrand
8655cb75fc Regenerate schema + client from merged backend
All checks were successful
Tests / Tests (pull_request) Successful in 11s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 17:05:11 -07:00
Dean Wenstrand
87d40eb990 Merge pool hall camera claim schema onto gql master
Generated files (schema.gql, index.tsx) resolved arbitrarily here; the next
commit regenerates them from the merged backend via just gql.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 17:02:20 -07:00
64bc5c723a Add pool hall camera GraphQL operations
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2026-07-02 21:52:48 -07:00
8111042936 Add pool hall camera claim schema
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2026-06-16 15:41:16 -07:00
d6fd68c1f6 add quotaEnforcementEnabled to deployed config
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-05-28 14:40:31 -07:00
5 changed files with 5 additions and 663 deletions

View File

@@ -285,11 +285,9 @@ export type CreateCustomerPortalSessionResultGql = {
export type CreatePoolHallCameraInput = {
name: Scalars["String"]["input"];
pocketSize?: InputMaybe<Scalars["Float"]["input"]>;
poolHallId: Scalars["ID"]["input"];
streamPath?: InputMaybe<Scalars["String"]["input"]>;
tableLabel?: InputMaybe<Scalars["String"]["input"]>;
tableSize?: InputMaybe<Scalars["Float"]["input"]>;
};
export type CreatePoolHallInput = {
@@ -2426,13 +2424,6 @@ export type IntPoint2DInput = {
y: Scalars["Int"]["input"];
};
export type LiveTableStateGql = {
__typename?: "LiveTableStateGQL";
frameIndex: Scalars["Int"]["output"];
tableState: TableStateGql;
videoId: Scalars["Int"]["output"];
};
export type MakePercentageIntervalGql = {
__typename?: "MakePercentageIntervalGQL";
elapsedTime: Scalars["Float"]["output"];
@@ -2504,9 +2495,7 @@ 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;
@@ -2569,9 +2558,6 @@ 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 = {
@@ -2659,15 +2645,6 @@ 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;
};
@@ -2968,17 +2945,14 @@ 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"];
pocketSize?: Maybe<Scalars["Float"]["output"]>;
poolHall: PoolHall;
poolHallId: Scalars["ID"]["output"];
status: Scalars["String"]["output"];
streamPath: Scalars["String"]["output"];
tableLabel?: Maybe<Scalars["String"]["output"]>;
tableSize?: Maybe<Scalars["Float"]["output"]>;
updatedAt: Scalars["DateTime"]["output"];
};
@@ -3036,7 +3010,6 @@ export type Query = {
getDrillRunLeaderboard: DrillRunLeaderboardGql;
getFeedVideos: VideoHistoryGql;
getGameTypeTagMetrics: Array<GameTypeTagMetric>;
getLiveTableState: LiveTableStateGql;
getLoggedInUser?: Maybe<UserGql>;
getLongestRunsLeaderboard: RunLeaderboardGql;
getMakesLeaderboard: CountLeaderboardGql;
@@ -3141,10 +3114,6 @@ export type QueryGetGameTypeTagMetricsArgs = {
input: GameTypeTagMetricsInput;
};
export type QueryGetLiveTableStateArgs = {
videoId: Scalars["Int"]["input"];
};
export type QueryGetLongestRunsLeaderboardArgs = {
interval?: InputMaybe<TimeInterval>;
limit?: Scalars["Int"]["input"];
@@ -3835,10 +3804,8 @@ export type UpdateAnnotationInputGql = {
export type UpdatePoolHallCameraInput = {
id: Scalars["ID"]["input"];
name?: InputMaybe<Scalars["String"]["input"]>;
pocketSize?: InputMaybe<Scalars["Float"]["input"]>;
status?: InputMaybe<Scalars["String"]["input"]>;
tableLabel?: InputMaybe<Scalars["String"]["input"]>;
tableSize?: InputMaybe<Scalars["Float"]["input"]>;
};
export type UpdatePoolHallInput = {
@@ -5113,43 +5080,6 @@ export type GetMyDrillRunsQuery = {
}>;
};
export type GetLiveStreamsQueryVariables = Exact<{
limit?: Scalars["Int"]["input"];
}>;
export type GetLiveStreamsQuery = {
__typename?: "Query";
getFeedVideos: {
__typename?: "VideoHistoryGQL";
videos: Array<{
__typename?: "VideoGQL";
id: number;
name?: string | null;
startTime?: any | null;
createdAt?: any | null;
screenshotUri?: string | null;
elapsedTime?: number | null;
owner?: {
__typename?: "UserGQL";
id: number;
username: string;
profileImageUri?: string | null;
} | null;
stream?: {
__typename?: "UploadStreamGQL";
id: string;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
}>;
pageInfo: {
__typename?: "PageInfoGQL";
hasNextPage: boolean;
endCursor?: string | null;
};
};
};
export type GetVideoMakePercentageIntervalsQueryVariables = Exact<{
videoId: Scalars["ID"]["input"];
intervalDuration: Scalars["Int"]["input"];
@@ -5599,9 +5529,6 @@ export type PoolHallCameraFieldsFragment = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5616,9 +5543,6 @@ export type PoolHallCameraWithHallFieldsFragment = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5649,9 +5573,6 @@ export type PoolHallCameraStreamCredentialsFieldsFragment = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5692,9 +5613,6 @@ export type CameraClaimSessionFieldsFragment = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5736,9 +5654,6 @@ export type CameraLeaseFieldsFragment = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5810,9 +5725,6 @@ export type GetPoolHallCamerasQuery = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5846,9 +5758,6 @@ export type GetClaimableCamerasQuery = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5895,9 +5804,6 @@ export type GetCameraClaimSessionQuery = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -5946,9 +5852,6 @@ export type GetActiveCameraLeaseQuery = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6027,9 +5930,6 @@ export type CreatePoolHallCameraMutation = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6064,9 +5964,6 @@ export type UpdatePoolHallCameraMutation = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6104,9 +6001,6 @@ export type RotatePoolHallCameraStreamKeyMutation = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6129,9 +6023,6 @@ 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 = {
@@ -6157,9 +6048,6 @@ export type CreateCameraClaimSessionMutation = {
tableLabel?: string | null;
streamPath: string;
status: string;
tableSize?: number | null;
pocketSize?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
createdAt: any;
@@ -6207,112 +6095,6 @@ export type CancelCameraClaimSessionMutation = {
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 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;
@@ -6553,51 +6335,6 @@ export type GetTableStateQuery = {
};
};
export type GetLiveTableStateQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
}>;
export type GetLiveTableStateQuery = {
__typename?: "Query";
getLiveTableState: {
__typename?: "LiveTableStateGQL";
videoId: number;
frameIndex: number;
tableState: {
__typename?: "TableStateGQL";
identifierToPosition: Array<Array<number>>;
homography?: {
__typename?: "HomographyInfoGQL";
id: number;
frameIndex: number;
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
} | null;
};
};
};
export type SimulateShotQueryVariables = Exact<{
simulationInput: SimulateShotInputGql;
}>;
@@ -8695,9 +8432,6 @@ export const PoolHallCameraFieldsFragmentDoc = gql`
tableLabel
streamPath
status
tableSize
pocketSize
inUse
lastPublishedAt
lastUnpublishedAt
createdAt
@@ -11480,105 +11214,6 @@ export type GetMyDrillRunsQueryResult = Apollo.QueryResult<
GetMyDrillRunsQuery,
GetMyDrillRunsQueryVariables
>;
export const GetLiveStreamsDocument = gql`
query GetLiveStreams($limit: Int! = 25) {
getFeedVideos(
limit: $limit
filters: { isStreamCompleted: false, requireCursorCompletion: false }
includePrivate: MINE
feedInput: { allUsers: true }
) {
videos {
id
name
startTime
createdAt
screenshotUri
elapsedTime
owner {
id
username
profileImageUri
}
stream {
id
isCompleted
lastSegmentUploadedAt
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
`;
/**
* __useGetLiveStreamsQuery__
*
* To run a query within a React component, call `useGetLiveStreamsQuery` and pass it any options that fit your needs.
* When your component renders, `useGetLiveStreamsQuery` 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 } = useGetLiveStreamsQuery({
* variables: {
* limit: // value for 'limit'
* },
* });
*/
export function useGetLiveStreamsQuery(
baseOptions?: Apollo.QueryHookOptions<
GetLiveStreamsQuery,
GetLiveStreamsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetLiveStreamsQuery, GetLiveStreamsQueryVariables>(
GetLiveStreamsDocument,
options,
);
}
export function useGetLiveStreamsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetLiveStreamsQuery,
GetLiveStreamsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<GetLiveStreamsQuery, GetLiveStreamsQueryVariables>(
GetLiveStreamsDocument,
options,
);
}
export function useGetLiveStreamsSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetLiveStreamsQuery,
GetLiveStreamsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetLiveStreamsQuery,
GetLiveStreamsQueryVariables
>(GetLiveStreamsDocument, options);
}
export type GetLiveStreamsQueryHookResult = ReturnType<
typeof useGetLiveStreamsQuery
>;
export type GetLiveStreamsLazyQueryHookResult = ReturnType<
typeof useGetLiveStreamsLazyQuery
>;
export type GetLiveStreamsSuspenseQueryHookResult = ReturnType<
typeof useGetLiveStreamsSuspenseQuery
>;
export type GetLiveStreamsQueryResult = Apollo.QueryResult<
GetLiveStreamsQuery,
GetLiveStreamsQueryVariables
>;
export const GetVideoMakePercentageIntervalsDocument = gql`
query GetVideoMakePercentageIntervals(
$videoId: ID!
@@ -13423,18 +13058,8 @@ export type RotatePoolHallCameraStreamKeyMutationOptions =
RotatePoolHallCameraStreamKeyMutationVariables
>;
export const CreateCameraClaimSessionDocument = gql`
mutation CreateCameraClaimSession(
$cameraId: ID!
$durationMinutes: Int
$videoName: String
$videoPrivate: Boolean
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
) {
mutation CreateCameraClaimSession($cameraId: ID!) {
createCameraClaimSession(cameraId: $cameraId) {
...CameraClaimSessionFields
}
}
@@ -13459,9 +13084,6 @@ 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'
* },
* });
*/
@@ -13539,112 +13161,6 @@ 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)
@@ -14102,87 +13618,6 @@ export type GetTableStateQueryResult = Apollo.QueryResult<
GetTableStateQuery,
GetTableStateQueryVariables
>;
export const GetLiveTableStateDocument = gql`
query GetLiveTableState($videoId: Int!) {
getLiveTableState(videoId: $videoId) {
videoId
frameIndex
tableState {
identifierToPosition
homography {
...HomographyInfo
}
}
}
}
${HomographyInfoFragmentDoc}
`;
/**
* __useGetLiveTableStateQuery__
*
* To run a query within a React component, call `useGetLiveTableStateQuery` and pass it any options that fit your needs.
* When your component renders, `useGetLiveTableStateQuery` 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 } = useGetLiveTableStateQuery({
* variables: {
* videoId: // value for 'videoId'
* },
* });
*/
export function useGetLiveTableStateQuery(
baseOptions: Apollo.QueryHookOptions<
GetLiveTableStateQuery,
GetLiveTableStateQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetLiveTableStateQuery,
GetLiveTableStateQueryVariables
>(GetLiveTableStateDocument, options);
}
export function useGetLiveTableStateLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetLiveTableStateQuery,
GetLiveTableStateQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetLiveTableStateQuery,
GetLiveTableStateQueryVariables
>(GetLiveTableStateDocument, options);
}
export function useGetLiveTableStateSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetLiveTableStateQuery,
GetLiveTableStateQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetLiveTableStateQuery,
GetLiveTableStateQueryVariables
>(GetLiveTableStateDocument, options);
}
export type GetLiveTableStateQueryHookResult = ReturnType<
typeof useGetLiveTableStateQuery
>;
export type GetLiveTableStateLazyQueryHookResult = ReturnType<
typeof useGetLiveTableStateLazyQuery
>;
export type GetLiveTableStateSuspenseQueryHookResult = ReturnType<
typeof useGetLiveTableStateSuspenseQuery
>;
export type GetLiveTableStateQueryResult = Apollo.QueryResult<
GetLiveTableStateQuery,
GetLiveTableStateQueryVariables
>;
export const SimulateShotDocument = gql`
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
simulateShot(simulationInput: $simulationInput) {

View File

@@ -1,34 +0,0 @@
# Lightweight listing of live (in-progress) streams for pickers like the
# Shot Lab "follow a live stream" flow. Selects only what a picker card
# needs; intentionally avoids the heavy VideoCardFields fragment.
query GetLiveStreams($limit: Int! = 25) {
getFeedVideos(
limit: $limit
filters: { isStreamCompleted: false, requireCursorCompletion: false }
includePrivate: MINE
feedInput: { allUsers: true }
) {
videos {
id
name
startTime
createdAt
screenshotUri
elapsedTime
owner {
id
username
profileImageUri
}
stream {
id
isCompleted
lastSegmentUploadedAt
}
}
pageInfo {
hasNextPage
endCursor
}
}
}

View File

@@ -17,9 +17,6 @@ fragment PoolHallCameraFields on PoolHallCamera {
tableLabel
streamPath
status
tableSize
pocketSize
inUse
lastPublishedAt
lastUnpublishedAt
createdAt
@@ -142,18 +139,8 @@ mutation RotatePoolHallCameraStreamKey($cameraId: ID!) {
}
}
mutation CreateCameraClaimSession(
$cameraId: ID!
$durationMinutes: Int
$videoName: String
$videoPrivate: Boolean
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
) {
mutation CreateCameraClaimSession($cameraId: ID!) {
createCameraClaimSession(cameraId: $cameraId) {
...CameraClaimSessionFields
}
}
@@ -163,15 +150,3 @@ 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

@@ -12,19 +12,6 @@ query GetTableState(
}
}
query GetLiveTableState($videoId: Int!) {
getLiveTableState(videoId: $videoId) {
videoId
frameIndex
tableState {
identifierToPosition
homography {
...HomographyInfo
}
}
}
}
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
simulateShot(simulationInput: $simulationInput) {
trajectories {

View File

@@ -72,7 +72,6 @@ type Query {
tableSize: Float = 100
useHomography: HomographyInputGQL = null
): TableStateGQL!
getLiveTableState(videoId: Int!): LiveTableStateGQL!
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
computePotAim(
simulationInput: SimulateShotInputGQL!
@@ -908,13 +907,10 @@ type PoolHallCamera {
tableLabel: String
streamPath: String!
status: String!
tableSize: Float
pocketSize: Float
lastPublishedAt: DateTime
lastUnpublishedAt: DateTime
createdAt: DateTime!
updatedAt: DateTime!
inUse: Boolean!
poolHall: PoolHall!
}
@@ -1044,12 +1040,6 @@ input IntPoint2DInput {
y: Int!
}
type LiveTableStateGQL {
videoId: Int!
frameIndex: Int!
tableState: TableStateGQL!
}
type ShotProjectionGQL {
trajectories: [BallTrajectoryGQL!]!
events: [SimulationEventGQL!]!
@@ -1411,15 +1401,8 @@ type Mutation {
): PoolHallCameraStreamCredentials!
updatePoolHallCamera(input: UpdatePoolHallCameraInput!): PoolHallCamera!
rotatePoolHallCameraStreamKey(cameraId: ID!): PoolHallCameraStreamCredentials!
createCameraClaimSession(
cameraId: ID!
durationMinutes: Int = null
videoName: String = null
videoPrivate: Boolean = null
): CameraClaimSession!
createCameraClaimSession(cameraId: ID!): CameraClaimSession!
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
endCameraLease(leaseId: ID!): CameraLease!
extendCameraLease(leaseId: ID!, additionalMinutes: Int! = 60): CameraLease!
finalizePlayerAssignments(
input: FinalizePlayerAssignmentsInput!
): [PlayerClusterGQL!]!
@@ -1528,8 +1511,6 @@ input CreatePoolHallCameraInput {
name: String!
tableLabel: String = null
streamPath: String = null
tableSize: Float = null
pocketSize: Float = null
}
input UpdatePoolHallCameraInput {
@@ -1537,8 +1518,6 @@ input UpdatePoolHallCameraInput {
name: String = null
tableLabel: String = null
status: String = null
tableSize: Float = null
pocketSize: Float = null
}
input FinalizePlayerAssignmentsInput {