diff --git a/src/index.tsx b/src/index.tsx index da1a932..bc47730 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4102,7 +4102,6 @@ export type SyncAppleSubscriptionResultGql = { export type TableStateGql = { __typename?: "TableStateGQL"; homography?: Maybe; - identifierToBox: Array; identifierToColor: Array>; identifierToPosition: Array>; }; @@ -7535,76 +7534,6 @@ export type FinalizePlayerAssignmentsMutation = { }>; }; -export type TableStateLayoutFieldsFragment = { - __typename?: "TableStateGQL"; - identifierToPosition: Array>; - 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; @@ -7620,48 +7549,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; }; }; @@ -10154,73 +10041,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 @@ -16234,12 +16054,12 @@ export const GetTableStateDocument = gql` tableSize: $tableSize useHomography: $useHomography ) { - ...TableStateLayoutFields - ...TableStateDetectionFields + identifierToPosition + identifierToColor { + hex + } } } - ${TableStateLayoutFieldsFragmentDoc} - ${TableStateDetectionFieldsFragmentDoc} `; /** @@ -16315,11 +16135,13 @@ export const GetLiveTableStateDocument = gql` videoId frameIndex tableState { - ...TableStateLayoutFields + identifierToPosition + identifierToColor { + hex + } } } } - ${TableStateLayoutFieldsFragmentDoc} `; /** @@ -16394,11 +16216,13 @@ export const GetShotTableStateDocument = gql` videoId frameIndex tableState { - ...TableStateLayoutFields + identifierToPosition + identifierToColor { + hex + } } } } - ${TableStateLayoutFieldsFragmentDoc} `; /** diff --git a/src/operations/shot_simulation.gql b/src/operations/shot_simulation.gql index a4604c8..e4ccc29 100644 --- a/src/operations/shot_simulation.gql +++ b/src/operations/shot_simulation.gql @@ -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 + } } } } diff --git a/src/schema.gql b/src/schema.gql index f16ddee..4903b36 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -250,6 +250,11 @@ input CreatePoolHallCameraInput { claimTermsText: String = null } +input CreateShotShareLinkInput { + shotIds: [Int!]! + paddingSeconds: Float = null +} + input CreatePoolHallInput { name: String! address: String = null @@ -1734,7 +1739,6 @@ type TableStateGQL { identifierToPosition: [[Float!]!]! homography: HomographyInfoGQL identifierToColor: [RGBColorGQL]! - identifierToBox: [BoundingBoxGQL!]! } type TagClassGQL { @@ -1946,6 +1950,11 @@ type UserSubscriptionStatusGQL { stripeSubscriptionId: String } +type ShareLinkGQL { + slug: String! + url: String! +} + type VideoExportJobGQL { id: Int! videoId: Int!