From 4ced3d39dfbc73e170f70b486efa05ac390019b8 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 8 Mar 2024 17:15:37 -0700 Subject: [PATCH] Update gql for get-video resolver changes --- src/index.tsx | 42 ++++++++++++++++++++++++++++++++++++++---- src/schema.gql | 41 +++++++++++++++++++++++++++++++++++------ 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index f6e3a23..f395570 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -51,6 +51,14 @@ export type BankFeaturesGql = { wallsHit: Array; }; +export type BoundingBoxGql = { + __typename?: "BoundingBoxGQL"; + height: Scalars["Int"]["output"]; + left: Scalars["Int"]["output"]; + top: Scalars["Int"]["output"]; + width: Scalars["Int"]["output"]; +}; + export type BucketGql = { __typename?: "BucketGQL"; lowerBound: Scalars["Float"]["output"]; @@ -124,8 +132,6 @@ export type FilterInput = { orFilters?: InputMaybe; shotDirection?: InputMaybe; targetPocketDistance?: InputMaybe; - userId?: InputMaybe; - videoId?: InputMaybe; }; export type GetUploadLinkReturn = { @@ -140,8 +146,18 @@ export type Header = { value: Scalars["String"]["output"]; }; -export type InListFilter = { - inList?: InputMaybe>; +export type HomographyInfoGql = { + __typename?: "HomographyInfoGQL"; + crop: BoundingBoxGql; + destPoints: PocketPointsGql; + pockets: Array; + sourcePoints: PocketPointsGql; +}; + +export type IntPoint2D = { + __typename?: "IntPoint2D"; + x: Scalars["Int"]["output"]; + y: Scalars["Int"]["output"]; }; export type IntendedPocketTypeInput = { @@ -197,6 +213,16 @@ export enum PocketEnum { Side = "SIDE", } +export type PocketPointsGql = { + __typename?: "PocketPointsGQL"; + bottomLeft: IntPoint2D; + bottomRight: IntPoint2D; + bottomSide: IntPoint2D; + topLeft: IntPoint2D; + topRight: IntPoint2D; + topSide: IntPoint2D; +}; + export type PocketingIntentionFeaturesGql = { __typename?: "PocketingIntentionFeaturesGQL"; intendedPocketType?: Maybe; @@ -284,6 +310,11 @@ export type ShotGql = { videoId?: Maybe; }; +export type StreamErrorGql = { + __typename?: "StreamErrorGQL"; + message: Scalars["String"]["output"]; +}; + export type TargetFloatFeatureGql = { __typename?: "TargetFloatFeatureGQL"; average?: Maybe; @@ -305,9 +336,12 @@ export type TargetPocketDistanceInput = { export type UploadStreamGql = { __typename?: "UploadStreamGQL"; createdAt: Scalars["DateTime"]["output"]; + errors: Array; + homographyHistory: Array; id: Scalars["ID"]["output"]; isCompleted: Scalars["Boolean"]["output"]; linksRequested: Scalars["Int"]["output"]; + segmentProcessingCursor: Scalars["Int"]["output"]; updatedAt: Scalars["DateTime"]["output"]; uploadsCompleted: Scalars["Int"]["output"]; }; diff --git a/src/schema.gql b/src/schema.gql index f5b463e..999a377 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -149,11 +149,46 @@ type UploadStreamGQL { id: ID! linksRequested: Int! uploadsCompleted: Int! + segmentProcessingCursor: Int! isCompleted: Boolean! + homographyHistory: [HomographyInfoGQL!]! + errors: [StreamErrorGQL!]! createdAt: DateTime! updatedAt: DateTime! } +type HomographyInfoGQL { + crop: BoundingBoxGQL! + pockets: [BoundingBoxGQL!]! + sourcePoints: PocketPointsGQL! + destPoints: PocketPointsGQL! +} + +type BoundingBoxGQL { + left: Int! + top: Int! + width: Int! + height: Int! +} + +type PocketPointsGQL { + topLeft: IntPoint2D! + topSide: IntPoint2D! + topRight: IntPoint2D! + bottomLeft: IntPoint2D! + bottomSide: IntPoint2D! + bottomRight: IntPoint2D! +} + +type IntPoint2D { + x: Int! + y: Int! +} + +type StreamErrorGQL { + message: String! +} + input FilterInput { andFilters: AndFilter = null orFilters: OrFilter = null @@ -163,8 +198,6 @@ input FilterInput { cueBallSpeed: CueBallSpeedInput = null intendedPocketType: IntendedPocketTypeInput = null shotDirection: ShotDirectionInput = null - videoId: InListFilter = null - userId: InListFilter = null } input AndFilter { @@ -208,10 +241,6 @@ input ShotDirectionInput { value: EnumFilter! } -input InListFilter { - inList: [Int!] = null -} - type BucketSetGQL { keyName: String! feature: String!