diff --git a/src/index.tsx b/src/index.tsx index e1c47f0..2f84e2b 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -34,6 +34,16 @@ export type Scalars = { JSON: { input: any; output: any }; }; +export type AddShotAnnotationErrors = { + __typename?: "AddShotAnnotationErrors"; + error: DoesNotOwnShotErrOtherErrorNeedsNote; +}; + +export type AddShotAnnotationReturn = { + __typename?: "AddShotAnnotationReturn"; + value: SuccessfulAddAddShotAnnotationErrors; +}; + export type AggregateInputGql = { aggregations: Array; filterInput?: InputMaybe; @@ -114,6 +124,7 @@ export type CueObjectFeaturesGql = { cueObjectAngle?: Maybe; cueObjectDistance?: Maybe; shotDirection?: Maybe; + spinType?: Maybe; }; export type DeployedConfigGql = { @@ -131,6 +142,16 @@ export enum DeviceTypeEnum { Ios = "IOS", } +export type DoesNotOwnShotErr = { + __typename?: "DoesNotOwnShotErr"; + msg?: Maybe; + shotId: Scalars["Int"]["output"]; +}; + +export type DoesNotOwnShotErrOtherErrorNeedsNote = + | DoesNotOwnShotErr + | OtherErrorNeedsNote; + export type EnumAggregation = { feature: Scalars["String"]["input"]; }; @@ -929,7 +950,7 @@ export type FilterInput = notFilter?: never; orFilters?: never; shotDirection?: never; - spinType: Array; + spinType: Array; tableSize?: never; tags?: never; targetPocketDistance?: never; @@ -1179,7 +1200,7 @@ export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailed export type Mutation = { __typename?: "Mutation"; - addAnnotationToShot: Scalars["Boolean"]["output"]; + addAnnotationToShot: AddShotAnnotationReturn; createBucketSet: BucketSetGql; createUploadStream: CreateUploadStreamReturn; deleteVideo: Scalars["Boolean"]["output"]; @@ -1194,6 +1215,7 @@ export type Mutation = { export type MutationAddAnnotationToShotArgs = { annotationName: Scalars["String"]["input"]; + notes?: InputMaybe; shotId: Scalars["Int"]["input"]; }; @@ -1247,6 +1269,11 @@ export type NoInitForChunkedUploadErr = { segmentType: StreamSegmentTypeEnum; }; +export type OtherErrorNeedsNote = { + __typename?: "OtherErrorNeedsNote"; + msg?: Maybe; +}; + export type PageInfoGql = { __typename?: "PageInfoGQL"; endCursor?: Maybe; @@ -1323,6 +1350,10 @@ export type QueryGetPlayTimeArgs = { userId: Scalars["Int"]["input"]; }; +export type QueryGetShotAnnotationTypesArgs = { + errorTypes?: InputMaybe; +}; + export type QueryGetShotsArgs = { filterInput: FilterInput; limit?: Scalars["Int"]["input"]; @@ -1387,6 +1418,7 @@ export type ShotAnnotationGql = { __typename?: "ShotAnnotationGQL"; createdAt?: Maybe; creator: UserGql; + errorDefault: Scalars["Boolean"]["output"]; notes: Scalars["String"]["output"]; shotId: Scalars["Int"]["output"]; type: ShotAnnotationTypeGql; @@ -1427,6 +1459,13 @@ export type ShotGql = { videoId: Scalars["Int"]["output"]; }; +export enum SpinTypeEnum { + Center = "CENTER", + Draw = "DRAW", + Follow = "FOLLOW", + Unknown = "UNKNOWN", +} + export type StreamErrorGql = { __typename?: "StreamErrorGQL"; message: Scalars["String"]["output"]; @@ -1437,6 +1476,15 @@ export enum StreamSegmentTypeEnum { RbChunkedMp4 = "RB_CHUNKED_MP4", } +export type SuccessfulAdd = { + __typename?: "SuccessfulAdd"; + value: Scalars["Boolean"]["output"]; +}; + +export type SuccessfulAddAddShotAnnotationErrors = + | AddShotAnnotationErrors + | SuccessfulAdd; + export type TagGql = { __typename?: "TagGQL"; group?: Maybe; @@ -2034,13 +2082,11 @@ export type GetVideosQuery = { getVideos: Array<{ __typename?: "VideoGQL"; id: number; - playlist?: { - __typename?: "HLSPlaylistGQL"; - segmentDurations: Array; - } | null; + framesPerSecond: number; stream?: { __typename?: "UploadStreamGQL"; id: string; + streamSegmentType: StreamSegmentTypeEnum; segments: Array<{ __typename?: "UploadSegmentGQL"; uploaded: boolean; @@ -2050,6 +2096,10 @@ export type GetVideosQuery = { framesPerSecond?: number | null; }>; } | null; + playlist?: { + __typename?: "HLSPlaylistGQL"; + segmentDurations: Array; + } | null; }>; }; @@ -3678,11 +3728,10 @@ export const GetVideosDocument = gql` query GetVideos($videoIds: [Int!]!) { getVideos(videoIds: $videoIds) { id - playlist { - segmentDurations - } + framesPerSecond stream { id + streamSegmentType segments { uploaded valid @@ -3691,6 +3740,9 @@ export const GetVideosDocument = gql` framesPerSecond } } + playlist { + segmentDurations + } } } `; diff --git a/src/operations/video.gql b/src/operations/video.gql index 0729041..3b786ce 100644 --- a/src/operations/video.gql +++ b/src/operations/video.gql @@ -118,11 +118,10 @@ query GetVideoDetails($videoId: Int!) { query GetVideos($videoIds: [Int!]!) { getVideos(videoIds: $videoIds) { id - playlist { - segmentDurations - } + framesPerSecond stream { id + streamSegmentType segments { uploaded valid @@ -131,6 +130,9 @@ query GetVideos($videoIds: [Int!]!) { framesPerSecond } } + playlist { + segmentDurations + } } } diff --git a/src/schema.gql b/src/schema.gql index 60ee6df..0a74bbe 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -14,7 +14,7 @@ type Query { shotsPagination: GetShotsPagination = null limit: Int! = 500 ): [ShotGQL!]! - getShotAnnotationTypes: [ShotAnnotationTypeGQL!]! + getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]! getUser(userId: Int!): UserGQL getLoggedInUser: UserGQL getUsernames( @@ -102,8 +102,8 @@ input FilterInput @oneOf { kickAngle: RangeFilter kickDistance: RangeFilter cueAngleAfterObject: RangeFilter + spinType: [SpinTypeEnum!] cueSpeedAfterObject: RangeFilter - spinType: [String!] falsePositiveScore: RangeFilter } @@ -140,6 +140,13 @@ input ShotAnnotationInput { name: String! } +enum SpinTypeEnum { + DRAW + FOLLOW + CENTER + UNKNOWN +} + type BucketSetGQL { keyName: String! feature: String! @@ -191,6 +198,7 @@ type CueObjectFeaturesGQL { cueObjectAngle: Float cueBallSpeed: Float shotDirection: ShotDirectionEnum + spinType: SpinTypeEnum } type PocketingIntentionFeaturesGQL { @@ -231,6 +239,7 @@ type ShotAnnotationGQL { type: ShotAnnotationTypeGQL! creator: UserGQL! notes: String! + errorDefault: Boolean! createdAt: DateTime updatedAt: DateTime } @@ -434,7 +443,11 @@ scalar JSON type Mutation { createBucketSet(params: CreateBucketSetInput!): BucketSetGQL! setLoggerLevel(path: String!, level: String!): Boolean! - addAnnotationToShot(shotId: Int!, annotationName: String!): Boolean! + addAnnotationToShot( + shotId: Int! + annotationName: String! + notes: String = null + ): AddShotAnnotationReturn! getProfileImageUploadLink( fileExt: String = ".png" ): GetProfileUploadLinkReturn! @@ -459,6 +472,35 @@ input CreateBucketSetInput { buckets: [BucketInputGQL!]! } +type AddShotAnnotationReturn { + value: SuccessfulAddAddShotAnnotationErrors! +} + +union SuccessfulAddAddShotAnnotationErrors = + SuccessfulAdd + | AddShotAnnotationErrors + +type SuccessfulAdd { + value: Boolean! +} + +type AddShotAnnotationErrors { + error: DoesNotOwnShotErrOtherErrorNeedsNote! +} + +union DoesNotOwnShotErrOtherErrorNeedsNote = + DoesNotOwnShotErr + | OtherErrorNeedsNote + +type DoesNotOwnShotErr { + shotId: Int! + msg: String +} + +type OtherErrorNeedsNote { + msg: String +} + type GetProfileUploadLinkReturn { value: UploadLinkGetProfileUploadLinkErrors! }