Compare commits

..

2 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
5 changed files with 140 additions and 328 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"]>;
};
@@ -2426,13 +2431,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"];
@@ -2568,6 +2566,7 @@ 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"]>;
@@ -2954,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"];
@@ -2966,6 +2967,9 @@ 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"];
@@ -3036,7 +3040,6 @@ export type Query = {
getDrillRunLeaderboard: DrillRunLeaderboardGql;
getFeedVideos: VideoHistoryGql;
getGameTypeTagMetrics: Array<GameTypeTagMetric>;
getLiveTableState: LiveTableStateGql;
getLoggedInUser?: Maybe<UserGql>;
getLongestRunsLeaderboard: RunLeaderboardGql;
getMakesLeaderboard: CountLeaderboardGql;
@@ -3141,10 +3144,6 @@ export type QueryGetGameTypeTagMetricsArgs = {
input: GameTypeTagMetricsInput;
};
export type QueryGetLiveTableStateArgs = {
videoId: Scalars["Int"]["input"];
};
export type QueryGetLongestRunsLeaderboardArgs = {
interval?: InputMaybe<TimeInterval>;
limit?: Scalars["Int"]["input"];
@@ -3833,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"]>;
@@ -3843,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"]>;
};
@@ -5113,43 +5116,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"];
@@ -5583,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;
@@ -5601,6 +5569,9 @@ 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;
@@ -5618,6 +5589,9 @@ 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;
@@ -5628,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;
@@ -5651,6 +5627,9 @@ 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;
@@ -5661,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;
@@ -5682,6 +5663,7 @@ export type CameraClaimSessionFieldsFragment = {
detectedAt?: any | null;
failedAt?: any | null;
failureReason?: string | null;
agreedTermsVersion?: number | null;
createdAt: any;
updatedAt: any;
camera: {
@@ -5694,6 +5676,9 @@ 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;
@@ -5704,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;
@@ -5738,6 +5725,9 @@ 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;
@@ -5748,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;
@@ -5767,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;
@@ -5787,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;
@@ -5812,6 +5808,9 @@ 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;
@@ -5822,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;
@@ -5848,6 +5849,9 @@ 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;
@@ -5858,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;
@@ -5885,6 +5891,7 @@ export type GetCameraClaimSessionQuery = {
detectedAt?: any | null;
failedAt?: any | null;
failureReason?: string | null;
agreedTermsVersion?: number | null;
createdAt: any;
updatedAt: any;
camera: {
@@ -5897,6 +5904,9 @@ 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;
@@ -5907,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;
@@ -5948,6 +5960,9 @@ 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;
@@ -5958,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;
@@ -5980,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;
@@ -6000,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;
@@ -6029,6 +6050,9 @@ 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;
@@ -6039,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;
@@ -6066,6 +6092,9 @@ 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;
@@ -6076,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;
@@ -6106,6 +6137,9 @@ 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;
@@ -6116,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;
@@ -6132,6 +6168,7 @@ export type CreateCameraClaimSessionMutationVariables = Exact<{
durationMinutes?: InputMaybe<Scalars["Int"]["input"]>;
videoName?: InputMaybe<Scalars["String"]["input"]>;
videoPrivate?: InputMaybe<Scalars["Boolean"]["input"]>;
agreedTermsVersion?: InputMaybe<Scalars["Int"]["input"]>;
}>;
export type CreateCameraClaimSessionMutation = {
@@ -6147,6 +6184,7 @@ export type CreateCameraClaimSessionMutation = {
detectedAt?: any | null;
failedAt?: any | null;
failureReason?: string | null;
agreedTermsVersion?: number | null;
createdAt: any;
updatedAt: any;
camera: {
@@ -6159,6 +6197,9 @@ 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;
@@ -6169,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;
@@ -6197,6 +6240,7 @@ export type CancelCameraClaimSessionMutation = {
detectedAt?: any | null;
failedAt?: any | null;
failureReason?: string | null;
agreedTermsVersion?: number | null;
createdAt: any;
updatedAt: any;
camera: {
@@ -6209,6 +6253,9 @@ 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;
@@ -6219,6 +6266,8 @@ 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;
@@ -6260,6 +6309,9 @@ export type EndCameraLeaseMutation = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
@@ -6270,6 +6322,8 @@ export type EndCameraLeaseMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -6312,6 +6366,9 @@ export type ExtendCameraLeaseMutation = {
status: string;
tableSize?: number | null;
pocketSize?: number | null;
allowsPrivateVideos: boolean;
claimTermsText?: string | null;
claimTermsVersion?: number | null;
inUse: boolean;
lastPublishedAt?: any | null;
lastUnpublishedAt?: any | null;
@@ -6322,6 +6379,8 @@ export type ExtendCameraLeaseMutation = {
id: string;
name: string;
address?: string | null;
city?: string | null;
state?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
@@ -6553,51 +6612,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;
}>;
@@ -8697,6 +8711,9 @@ export const PoolHallCameraFieldsFragmentDoc = gql`
status
tableSize
pocketSize
allowsPrivateVideos
claimTermsText
claimTermsVersion
inUse
lastPublishedAt
lastUnpublishedAt
@@ -8709,6 +8726,8 @@ export const PoolHallFieldsFragmentDoc = gql`
id
name
address
city
state
latitude
longitude
timezone
@@ -8748,6 +8767,7 @@ export const CameraClaimSessionFieldsFragmentDoc = gql`
detectedAt
failedAt
failureReason
agreedTermsVersion
createdAt
updatedAt
camera {
@@ -11480,105 +11500,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!
@@ -13428,12 +13349,14 @@ export const CreateCameraClaimSessionDocument = gql`
$durationMinutes: Int
$videoName: String
$videoPrivate: Boolean
$agreedTermsVersion: Int
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
agreedTermsVersion: $agreedTermsVersion
) {
...CameraClaimSessionFields
}
@@ -13462,6 +13385,7 @@ export type CreateCameraClaimSessionMutationFn = Apollo.MutationFunction<
* durationMinutes: // value for 'durationMinutes'
* videoName: // value for 'videoName'
* videoPrivate: // value for 'videoPrivate'
* agreedTermsVersion: // value for 'agreedTermsVersion'
* },
* });
*/
@@ -14102,87 +14026,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

@@ -2,6 +2,8 @@ fragment PoolHallFields on PoolHall {
id
name
address
city
state
latitude
longitude
timezone
@@ -19,6 +21,9 @@ fragment PoolHallCameraFields on PoolHallCamera {
status
tableSize
pocketSize
allowsPrivateVideos
claimTermsText
claimTermsVersion
inUse
lastPublishedAt
lastUnpublishedAt
@@ -51,6 +56,7 @@ fragment CameraClaimSessionFields on CameraClaimSession {
detectedAt
failedAt
failureReason
agreedTermsVersion
createdAt
updatedAt
camera {
@@ -147,12 +153,14 @@ mutation CreateCameraClaimSession(
$durationMinutes: Int
$videoName: String
$videoPrivate: Boolean
$agreedTermsVersion: Int
) {
createCameraClaimSession(
cameraId: $cameraId
durationMinutes: $durationMinutes
videoName: $videoName
videoPrivate: $videoPrivate
agreedTermsVersion: $agreedTermsVersion
) {
...CameraClaimSessionFields
}

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!
@@ -893,6 +892,8 @@ type PoolHall {
id: ID!
name: String!
address: String
city: String
state: String
latitude: Float
longitude: Float
timezone: String
@@ -910,6 +911,9 @@ type PoolHallCamera {
status: String!
tableSize: Float
pocketSize: Float
allowsPrivateVideos: Boolean!
claimTermsText: String
claimTermsVersion: Int
lastPublishedAt: DateTime
lastUnpublishedAt: DateTime
createdAt: DateTime!
@@ -928,6 +932,7 @@ type CameraClaimSession {
detectedAt: DateTime
failedAt: DateTime
failureReason: String
agreedTermsVersion: Int
createdAt: DateTime!
updatedAt: DateTime!
camera: PoolHallCamera!
@@ -1044,12 +1049,6 @@ input IntPoint2DInput {
y: Int!
}
type LiveTableStateGQL {
videoId: Int!
frameIndex: Int!
tableState: TableStateGQL!
}
type ShotProjectionGQL {
trajectories: [BallTrajectoryGQL!]!
events: [SimulationEventGQL!]!
@@ -1416,6 +1415,7 @@ type Mutation {
durationMinutes: Int = null
videoName: String = null
videoPrivate: Boolean = null
agreedTermsVersion: Int = null
): CameraClaimSession!
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
endCameraLease(leaseId: ID!): CameraLease!
@@ -1502,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
@@ -1511,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
@@ -1530,6 +1534,8 @@ input CreatePoolHallCameraInput {
streamPath: String = null
tableSize: Float = null
pocketSize: Float = null
allowsPrivateVideos: Boolean = null
claimTermsText: String = null
}
input UpdatePoolHallCameraInput {
@@ -1539,6 +1545,8 @@ input UpdatePoolHallCameraInput {
status: String = null
tableSize: Float = null
pocketSize: Float = null
allowsPrivateVideos: Boolean = null
claimTermsText: String = null
}
input FinalizePlayerAssignmentsInput {