Compare commits

..

1 Commits

Author SHA1 Message Date
a68bb67926 Expose per-ball detector boxes on TableStateGQL
Regenerated from the backend branch that adds identifierToBox, so this
commit's schema matches that branch's Python export exactly. Kept off gql
master because the export also reorders the share-link declarations that
gql master carries in their pre-alphabetical positions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 18:53:12 -07:00
4 changed files with 51 additions and 317 deletions

View File

@@ -4319,7 +4319,7 @@ export type VideoExportJobGql = {
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
downloadUrl?: Maybe<Scalars["String"]["output"]>;
expiresAt?: Maybe<Scalars["DateTime"]["output"]>;
fileSizeBytes?: Maybe<Scalars["BigInt"]["output"]>;
fileSizeBytes?: Maybe<Scalars["Int"]["output"]>;
id: Scalars["Int"]["output"];
mode: VideoExportModeEnum;
runId?: Maybe<Scalars["Int"]["output"]>;
@@ -6891,10 +6891,8 @@ export type ReactToVideoMutation = {
};
export type GetShotLabVideosQueryVariables = Exact<{
feedInput: VideoFeedInputGql;
includePrivate: IncludePrivateEnum;
userId: Scalars["Int"]["input"];
limit?: Scalars["Int"]["input"];
after?: InputMaybe<Scalars["String"]["input"]>;
}>;
export type GetShotLabVideosQuery = {
@@ -6922,11 +6920,6 @@ export type GetShotLabVideosQuery = {
lastSegmentUploadedAt?: any | null;
} | null;
}>;
pageInfo: {
__typename?: "PageInfoGQL";
hasNextPage: boolean;
endCursor?: string | null;
};
};
};
@@ -7481,76 +7474,6 @@ export type FinalizePlayerAssignmentsMutation = {
}>;
};
export type TableStateLayoutFieldsFragment = {
__typename?: "TableStateGQL";
identifierToPosition: Array<Array<number>>;
identifierToColor: Array<{ __typename?: "RGBColorGQL"; hex: string } | null>;
};
export type DetectionBoxFieldsFragment = {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
export type DetectionPocketPointFieldsFragment = {
__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 };
};
export type TableStateDetectionFieldsFragment = {
__typename?: "TableStateGQL";
identifierToBox: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
homography?: {
__typename?: "HomographyInfoGQL";
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 };
};
destPoints: {
__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 GetTableStateQueryVariables = Exact<{
b64Image: Scalars["String"]["input"];
tableSize?: InputMaybe<Scalars["Float"]["input"]>;
@@ -7566,48 +7489,6 @@ export type GetTableStateQuery = {
__typename?: "RGBColorGQL";
hex: string;
} | null>;
identifierToBox: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
homography?: {
__typename?: "HomographyInfoGQL";
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 };
};
destPoints: {
__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;
};
};
@@ -9394,7 +9275,7 @@ export type VideoExportJobFieldsFragment = {
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
fileSizeBytes?: any | null;
fileSizeBytes?: number | null;
expiresAt?: any | null;
createdAt?: any | null;
};
@@ -9416,7 +9297,7 @@ export type RequestVideoExportMutation = {
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
fileSizeBytes?: any | null;
fileSizeBytes?: number | null;
expiresAt?: any | null;
createdAt?: any | null;
};
@@ -9448,7 +9329,7 @@ export type VideoExportJobQuery = {
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
fileSizeBytes?: any | null;
fileSizeBytes?: number | null;
expiresAt?: any | null;
createdAt?: any | null;
} | null;
@@ -9472,7 +9353,7 @@ export type MyVideoExportsQuery = {
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
fileSizeBytes?: any | null;
fileSizeBytes?: number | null;
expiresAt?: any | null;
createdAt?: any | null;
}>;
@@ -10093,73 +9974,6 @@ export const PlayerClusterFieldsFragmentDoc = gql`
}
${PlayerClusterShotFieldsFragmentDoc}
`;
export const TableStateLayoutFieldsFragmentDoc = gql`
fragment TableStateLayoutFields on TableStateGQL {
identifierToPosition
identifierToColor {
hex
}
}
`;
export const DetectionBoxFieldsFragmentDoc = gql`
fragment DetectionBoxFields on BoundingBoxGQL {
left
top
width
height
}
`;
export const DetectionPocketPointFieldsFragmentDoc = gql`
fragment DetectionPocketPointFields on PocketPointsGQL {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
`;
export const TableStateDetectionFieldsFragmentDoc = gql`
fragment TableStateDetectionFields on TableStateGQL {
identifierToBox {
...DetectionBoxFields
}
homography {
crop {
...DetectionBoxFields
}
pockets {
...DetectionBoxFields
}
sourcePoints {
...DetectionPocketPointFields
}
destPoints {
...DetectionPocketPointFields
}
}
}
${DetectionBoxFieldsFragmentDoc}
${DetectionPocketPointFieldsFragmentDoc}
`;
export const ShotClipRangeFragmentDoc = gql`
fragment ShotClipRange on ShotGQL {
id
@@ -15357,18 +15171,12 @@ export type ReactToVideoMutationOptions = Apollo.BaseMutationOptions<
ReactToVideoMutationVariables
>;
export const GetShotLabVideosDocument = gql`
query GetShotLabVideos(
$feedInput: VideoFeedInputGQL!
$includePrivate: IncludePrivateEnum!
$limit: Int! = 25
$after: String = null
) {
query GetShotLabVideos($userId: Int!, $limit: Int! = 25) {
getFeedVideos(
limit: $limit
after: $after
includeCallersVideos: false
includePrivate: $includePrivate
feedInput: $feedInput
includePrivate: MINE
feedInput: { userId: $userId }
) {
videos {
id
@@ -15388,10 +15196,6 @@ export const GetShotLabVideosDocument = gql`
lastSegmentUploadedAt
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
`;
@@ -15408,10 +15212,8 @@ export const GetShotLabVideosDocument = gql`
* @example
* const { data, loading, error } = useGetShotLabVideosQuery({
* variables: {
* feedInput: // value for 'feedInput'
* includePrivate: // value for 'includePrivate'
* userId: // value for 'userId'
* limit: // value for 'limit'
* after: // value for 'after'
* },
* });
*/
@@ -16111,12 +15913,12 @@ export const GetTableStateDocument = gql`
tableSize: $tableSize
useHomography: $useHomography
) {
...TableStateLayoutFields
...TableStateDetectionFields
identifierToPosition
identifierToColor {
hex
}
}
}
${TableStateLayoutFieldsFragmentDoc}
${TableStateDetectionFieldsFragmentDoc}
`;
/**
@@ -16192,11 +15994,13 @@ export const GetLiveTableStateDocument = gql`
videoId
frameIndex
tableState {
...TableStateLayoutFields
identifierToPosition
identifierToColor {
hex
}
}
}
}
${TableStateLayoutFieldsFragmentDoc}
`;
/**
@@ -16271,11 +16075,13 @@ export const GetShotTableStateDocument = gql`
videoId
frameIndex
tableState {
...TableStateLayoutFields
identifierToPosition
identifierToColor {
hex
}
}
}
}
${TableStateLayoutFieldsFragmentDoc}
`;
/**

View File

@@ -1,19 +1,12 @@
# Lightweight two-step picker data for Shot Lab's video-first source: recent
# videos from the requested audience (mine, followed users, or public), then
# that video's shots. The stream fields hint at "actively updating" without
# gating.
query GetShotLabVideos(
$feedInput: VideoFeedInputGQL!
$includePrivate: IncludePrivateEnum!
$limit: Int! = 25
$after: String = null
) {
# Lightweight two-step picker data for Shot Lab's video-first source: the
# caller's recent videos (completed or still uploading), then that video's
# shots. The stream fields hint at "actively updating" without gating.
query GetShotLabVideos($userId: Int!, $limit: Int! = 25) {
getFeedVideos(
limit: $limit
after: $after
includeCallersVideos: false
includePrivate: $includePrivate
feedInput: $feedInput
includePrivate: MINE
feedInput: { userId: $userId }
) {
videos {
id
@@ -33,10 +26,6 @@ query GetShotLabVideos(
lastSegmentUploadedAt
}
}
pageInfo {
hasNextPage
endCursor
}
}
}

View File

@@ -1,72 +1,3 @@
fragment TableStateLayoutFields on TableStateGQL {
identifierToPosition
identifierToColor {
hex
}
}
fragment DetectionBoxFields on BoundingBoxGQL {
left
top
width
height
}
fragment DetectionPocketPointFields on PocketPointsGQL {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
# Everything needed to redraw a detection over the image it came from:
# the detector's boxes plus the homography that turned them into plane
# positions. Boxes, pocket boxes, and source points share the crop's
# coordinate space; the crop locates that space in the full frame.
#
# Only the photo query selects this. The live and shot queries read a
# frame out of a video the app never holds, so there is no image to
# overlay, and getLiveTableState is polled every five seconds.
fragment TableStateDetectionFields on TableStateGQL {
identifierToBox {
...DetectionBoxFields
}
homography {
crop {
...DetectionBoxFields
}
pockets {
...DetectionBoxFields
}
sourcePoints {
...DetectionPocketPointFields
}
destPoints {
...DetectionPocketPointFields
}
}
}
query GetTableState(
$b64Image: String!
$tableSize: Float
@@ -77,8 +8,10 @@ query GetTableState(
tableSize: $tableSize
useHomography: $useHomography
) {
...TableStateLayoutFields
...TableStateDetectionFields
identifierToPosition
identifierToColor {
hex
}
}
}
@@ -87,7 +20,10 @@ query GetLiveTableState($videoId: Int!) {
videoId
frameIndex
tableState {
...TableStateLayoutFields
identifierToPosition
identifierToColor {
hex
}
}
}
}
@@ -98,7 +34,10 @@ query GetShotTableState($shotId: Int!) {
videoId
frameIndex
tableState {
...TableStateLayoutFields
identifierToPosition
identifierToColor {
hex
}
}
}
}

View File

@@ -249,11 +249,6 @@ input CreatePoolHallCameraInput {
claimTermsText: String = null
}
input CreateShotShareLinkInput {
shotIds: [Int!]!
paddingSeconds: Float = null
}
input CreatePoolHallInput {
name: String!
address: String = null
@@ -264,6 +259,11 @@ input CreatePoolHallInput {
timezone: String = null
}
input CreateShotShareLinkInput {
shotIds: [Int!]!
paddingSeconds: Float = null
}
type CreateSubscriptionResultGQL {
checkoutUrl: String!
sessionId: String!
@@ -1459,6 +1459,11 @@ enum SessionCoachStateEnum {
FAILED
}
type ShareLinkGQL {
slug: String!
url: String!
}
type ShotAnnotationGQL {
shotId: Int!
type: ShotAnnotationTypeGQL!
@@ -1920,11 +1925,6 @@ type UserSubscriptionStatusGQL {
stripeSubscriptionId: String
}
type ShareLinkGQL {
slug: String!
url: String!
}
type VideoExportJobGQL {
id: Int!
videoId: Int!
@@ -1935,7 +1935,7 @@ type VideoExportJobGQL {
shotIds: [Int!]
runId: Int
downloadUrl: String
fileSizeBytes: BigInt
fileSizeBytes: Int
expiresAt: DateTime
createdAt: DateTime
}