From e151f39582902ced1c723c79c0a7bde9755ae2bb Mon Sep 17 00:00:00 2001 From: Mike Kalange Date: Mon, 2 Dec 2024 18:57:36 -0800 Subject: [PATCH] Add edit shot data stuff --- src/index.tsx | 23 +++++++++++++++++++++++ src/schema.gql | 30 +++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 2d8ce09..066b8be 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -186,12 +186,29 @@ export type DoesNotOwnShotErrOtherErrorNeedsNote = | DoesNotOwnShotErr | OtherErrorNeedsNote; +export type EditShotReturn = { + __typename?: "EditShotReturn"; + error?: Maybe; + shot?: Maybe; +}; + export type EditUserInputGql = { fargoRating?: InputMaybe; username?: InputMaybe; videosPrivateByDefault?: InputMaybe; }; +export type EditableShotFieldInputGql = { + backcut?: InputMaybe; + excludeFromStats?: InputMaybe; + intendedPocketType?: InputMaybe; + make?: InputMaybe; + notes?: InputMaybe; + shotDirection?: InputMaybe; + spinType?: InputMaybe; + targetPocketAngleDirection?: InputMaybe; +}; + export type EnumAggregation = { feature: Scalars["String"]["input"]; }; @@ -2034,6 +2051,7 @@ export type Mutation = { createUploadStream: CreateUploadStreamReturn; deleteVideo: Scalars["Boolean"]["output"]; editProfileImageUri: UserGql; + editShot: EditShotReturn; editUploadStream: Scalars["Boolean"]["output"]; editUser: UserGql; findPrerecordTableLayout?: Maybe; @@ -2069,6 +2087,11 @@ export type MutationEditProfileImageUriArgs = { profileImageUri: Scalars["String"]["input"]; }; +export type MutationEditShotArgs = { + fieldsToEdit: EditableShotFieldInputGql; + shotId: Scalars["Int"]["input"]; +}; + export type MutationEditUploadStreamArgs = { videoId: Scalars["Int"]["input"]; videoMetadata: VideoMetadataInput; diff --git a/src/schema.gql b/src/schema.gql index 0c5fa89..2bdea99 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -707,6 +707,10 @@ scalar JSON type Mutation { createBucketSet(params: CreateBucketSetInput!): BucketSetGQL! setLoggerLevel(path: String!, level: String!): Boolean! + editShot( + shotId: Int! + fieldsToEdit: EditableShotFieldInputGQL! + ): EditShotReturn! addAnnotationToShot( shotId: Int! annotationName: String! @@ -744,6 +748,27 @@ input CreateBucketSetInput { buckets: [BucketInputGQL!]! } +type EditShotReturn { + shot: ShotGQL + error: DoesNotOwnShotErr +} + +type DoesNotOwnShotErr { + shotId: Int! + msg: String +} + +input EditableShotFieldInputGQL { + intendedPocketType: PocketEnum + shotDirection: ShotDirectionEnum + spinType: SpinTypeEnum + targetPocketAngleDirection: ShotDirectionEnum + make: Boolean + backcut: Boolean + excludeFromStats: Boolean + notes: String +} + type AddShotAnnotationReturn { value: SuccessfulAddAddShotAnnotationErrors! } @@ -764,11 +789,6 @@ union DoesNotOwnShotErrOtherErrorNeedsNote = DoesNotOwnShotErr | OtherErrorNeedsNote -type DoesNotOwnShotErr { - shotId: Int! - msg: String -} - type OtherErrorNeedsNote { msg: String } -- 2.47.0