From 88801f9186f079e04231cc51eb3f00407c8563bb Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 10 Jul 2024 16:17:25 -0600 Subject: [PATCH 1/9] Add not support to filter input gql --- src/index.tsx | 41 +++++++++++++++++++++++++++++++++++++++++ src/schema.gql | 1 + 2 files changed, 42 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 6d7e3be..d0964ae 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -143,6 +143,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -164,6 +165,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -185,6 +187,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -206,6 +209,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -227,6 +231,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -248,6 +253,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -269,6 +275,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -290,6 +297,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -311,6 +319,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -332,6 +341,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -353,6 +363,7 @@ export type FilterInput = isRightMiss: Array; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -374,6 +385,7 @@ export type FilterInput = isRightMiss?: never; isStraight: Array; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -395,6 +407,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make: Array; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -416,6 +429,29 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter: FilterInput; + orFilters?: never; + shotDirection?: never; + tags?: never; + targetPocketDistance?: never; + userId?: never; + videoId?: never; + } + | { + andFilters?: never; + annotations?: never; + cueBallSpeed?: never; + cueObjectAngle?: never; + cueObjectDistance?: never; + difficulty?: never; + intendedPocketType?: never; + isLeft?: never; + isLeftMiss?: never; + isRight?: never; + isRightMiss?: never; + isStraight?: never; + make?: never; + notFilter?: never; orFilters: Array; shotDirection?: never; tags?: never; @@ -437,6 +473,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection: Array; tags?: never; @@ -458,6 +495,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags: Array; @@ -479,6 +517,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -500,6 +539,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; @@ -521,6 +561,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; make?: never; + notFilter?: never; orFilters?: never; shotDirection?: never; tags?: never; diff --git a/src/schema.gql b/src/schema.gql index 67552d4..eebc939 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -66,6 +66,7 @@ input EnumAggregation { input FilterInput @oneOf { andFilters: [FilterInput!] orFilters: [FilterInput!] + notFilter: FilterInput cueObjectDistance: RangeFilter targetPocketDistance: RangeFilter cueObjectAngle: RangeFilter From ee73443374fc3273bfeefa574ad647342826273b Mon Sep 17 00:00:00 2001 From: Dean Wenstrand Date: Fri, 12 Jul 2024 23:52:06 +0000 Subject: [PATCH 2/9] Add new filters --- src/index.tsx | 235 +++++++++++++++++++++++++++++++++++++++++++++++++ src/schema.gql | 5 ++ 2 files changed, 240 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index d0964ae..cdbda7a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -132,16 +132,21 @@ export type FilterInput = | { andFilters: Array; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -154,16 +159,21 @@ export type FilterInput = | { andFilters?: never; annotations: Array; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -176,16 +186,75 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle: RangeFilter; + bankDistance?: never; + cueBallSpeed?: never; + cueObjectAngle?: never; + cueObjectDistance?: never; + difficulty?: never; + intendedPocketType?: never; + isDirect?: never; + isLeft?: never; + isLeftMiss?: never; + isRight?: never; + isRightMiss?: never; + isStraight?: never; + kickAngle?: never; + kickDistance?: never; + make?: never; + notFilter?: never; + orFilters?: never; + shotDirection?: never; + tags?: never; + targetPocketDistance?: never; + userId?: never; + videoId?: never; + } + | { + andFilters?: never; + annotations?: never; + bankAngle?: never; + bankDistance: RangeFilter; + cueBallSpeed?: never; + cueObjectAngle?: never; + cueObjectDistance?: never; + difficulty?: never; + intendedPocketType?: never; + isDirect?: never; + isLeft?: never; + isLeftMiss?: never; + isRight?: never; + isRightMiss?: never; + isStraight?: never; + kickAngle?: never; + kickDistance?: never; + make?: never; + notFilter?: never; + orFilters?: never; + shotDirection?: never; + tags?: never; + targetPocketDistance?: never; + userId?: never; + videoId?: never; + } + | { + andFilters?: never; + annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed: RangeFilter; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -198,16 +267,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle: RangeFilter; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -220,16 +294,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance: RangeFilter; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -242,16 +321,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty: RangeFilter; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -264,16 +348,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType: Array; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -286,16 +375,48 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect: Array; + isLeft?: never; + isLeftMiss?: never; + isRight?: never; + isRightMiss?: never; + isStraight?: never; + kickAngle?: never; + kickDistance?: never; + make?: never; + notFilter?: never; + orFilters?: never; + shotDirection?: never; + tags?: never; + targetPocketDistance?: never; + userId?: never; + videoId?: never; + } + | { + andFilters?: never; + annotations?: never; + bankAngle?: never; + bankDistance?: never; + cueBallSpeed?: never; + cueObjectAngle?: never; + cueObjectDistance?: never; + difficulty?: never; + intendedPocketType?: never; + isDirect?: never; isLeft: Array; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -308,16 +429,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss: Array; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -330,16 +456,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight: Array; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -352,16 +483,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss: Array; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -374,16 +510,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight: Array; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -396,16 +537,75 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle: RangeFilter; + kickDistance?: never; + make?: never; + notFilter?: never; + orFilters?: never; + shotDirection?: never; + tags?: never; + targetPocketDistance?: never; + userId?: never; + videoId?: never; + } + | { + andFilters?: never; + annotations?: never; + bankAngle?: never; + bankDistance?: never; + cueBallSpeed?: never; + cueObjectAngle?: never; + cueObjectDistance?: never; + difficulty?: never; + intendedPocketType?: never; + isDirect?: never; + isLeft?: never; + isLeftMiss?: never; + isRight?: never; + isRightMiss?: never; + isStraight?: never; + kickAngle?: never; + kickDistance: RangeFilter; + make?: never; + notFilter?: never; + orFilters?: never; + shotDirection?: never; + tags?: never; + targetPocketDistance?: never; + userId?: never; + videoId?: never; + } + | { + andFilters?: never; + annotations?: never; + bankAngle?: never; + bankDistance?: never; + cueBallSpeed?: never; + cueObjectAngle?: never; + cueObjectDistance?: never; + difficulty?: never; + intendedPocketType?: never; + isDirect?: never; + isLeft?: never; + isLeftMiss?: never; + isRight?: never; + isRightMiss?: never; + isStraight?: never; + kickAngle?: never; + kickDistance?: never; make: Array; notFilter?: never; orFilters?: never; @@ -418,16 +618,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter: FilterInput; orFilters?: never; @@ -440,16 +645,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters: Array; @@ -462,16 +672,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -484,16 +699,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -506,16 +726,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -528,16 +753,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; @@ -550,16 +780,21 @@ export type FilterInput = | { andFilters?: never; annotations?: never; + bankAngle?: never; + bankDistance?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; difficulty?: never; intendedPocketType?: never; + isDirect?: never; isLeft?: never; isLeftMiss?: never; isRight?: never; isRightMiss?: never; isStraight?: never; + kickAngle?: never; + kickDistance?: never; make?: never; notFilter?: never; orFilters?: never; diff --git a/src/schema.gql b/src/schema.gql index eebc939..8615145 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -84,6 +84,11 @@ input FilterInput @oneOf { isLeft: [Boolean!] isLeftMiss: [Boolean!] isRightMiss: [Boolean!] + isDirect: [Boolean!] + bankAngle: RangeFilter + bankDistance: RangeFilter + kickAngle: RangeFilter + kickDistance: RangeFilter } input RangeFilter { From 194c258dcd26f16554717c6e25968335807f5b6b Mon Sep 17 00:00:00 2001 From: Mike Kalange Date: Fri, 12 Jul 2024 17:50:03 -0700 Subject: [PATCH 3/9] Expand GQL Interfaces To Accomodate Multiple Stream Types --- src/index.tsx | 18 ++++++++++++++++++ src/schema.gql | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index cdbda7a..8d3bdb4 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -852,9 +852,11 @@ export type Mutation = { deleteVideo: Scalars["Boolean"]["output"]; editProfileImageUri: UserGql; editUploadStream: Scalars["Boolean"]["output"]; + getHlsInitUploadLink: GetUploadLinkReturn; getProfileImageUploadLink: GetUploadLinkReturn; getUploadLink: GetUploadLinkReturn; setLoggerLevel: Scalars["Boolean"]["output"]; + setSegmentDuration: Scalars["Boolean"]["output"]; }; export type MutationCreateBucketSetArgs = { @@ -878,6 +880,10 @@ export type MutationEditUploadStreamArgs = { videoMetadata: VideoMetadataInput; }; +export type MutationGetHlsInitUploadLinkArgs = { + videoId: Scalars["Int"]["input"]; +}; + export type MutationGetProfileImageUploadLinkArgs = { fileExt?: InputMaybe; }; @@ -892,6 +898,12 @@ export type MutationSetLoggerLevelArgs = { path: Scalars["String"]["input"]; }; +export type MutationSetSegmentDurationArgs = { + duration: Scalars["Float"]["input"]; + segmentId: Scalars["Int"]["input"]; + videoId: Scalars["Int"]["input"]; +}; + export type PageInfoGql = { __typename?: "PageInfoGQL"; endCursor?: Maybe; @@ -1023,6 +1035,11 @@ export type StreamErrorGql = { message: Scalars["String"]["output"]; }; +export enum StreamSegmentTypeEnum { + FragmentedMp4 = "FRAGMENTED_MP4", + RbChunkedMp4 = "RB_CHUNKED_MP4", +} + export type TargetMetricsGql = { __typename?: "TargetMetricsGQL"; averageDifficulty?: Maybe; @@ -1127,6 +1144,7 @@ export type VideoMetadataInput = { gameType?: InputMaybe; lastIntendedSegmentBound?: InputMaybe; startTime?: InputMaybe; + streamSegmentType?: InputMaybe; tableSize?: InputMaybe; uploadStreamMetadataInput?: InputMaybe; videoName?: InputMaybe; diff --git a/src/schema.gql b/src/schema.gql index 8615145..b9479d2 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -341,6 +341,8 @@ type Mutation { videoMetadata: VideoMetadataInput! ): CreateUploadStreamReturn! getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn! + getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn! + setSegmentDuration(videoId: Int!, segmentId: Int!, duration: Float!): Boolean! editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean! deleteVideo(videoId: Int!): Boolean! } @@ -373,6 +375,7 @@ input VideoMetadataInput { tableSize: String = null uploadStreamMetadataInput: UploadStreamMetadataInput = null lastIntendedSegmentBound: Int = null + streamSegmentType: StreamSegmentTypeEnum = null endStream: Boolean! = false } @@ -393,3 +396,8 @@ enum DeviceTypeEnum { ANDROID BROWSER } + +enum StreamSegmentTypeEnum { + FRAGMENTED_MP4 + RB_CHUNKED_MP4 +} From cc36a8b51d42b59aa2f468d718b6cd97103cce0d Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 13 Jul 2024 17:40:30 -0600 Subject: [PATCH 4/9] Add isAdmin --- src/index.tsx | 1 + src/schema.gql | 1 + 2 files changed, 2 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 8d3bdb4..baa8c74 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1092,6 +1092,7 @@ export type UserGql = { createdAt?: Maybe; firebaseUid: Scalars["String"]["output"]; id: Scalars["Int"]["output"]; + isAdmin: Scalars["Boolean"]["output"]; profileImageUri?: Maybe; updatedAt?: Maybe; username: Scalars["String"]["output"]; diff --git a/src/schema.gql b/src/schema.gql index b9479d2..aed271c 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -195,6 +195,7 @@ type UserGQL { id: Int! firebaseUid: String! username: String! + isAdmin: Boolean! activeVideoId: Int profileImageUri: String createdAt: DateTime From 03c1d08d8c319e2d0edef07d69c3e928337452a1 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 13 Jul 2024 17:47:41 -0600 Subject: [PATCH 5/9] Request isAdmin in getLoggedInUser --- src/index.tsx | 2 ++ src/operations/user.gql | 1 + 2 files changed, 3 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index baa8c74..4d80ae5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1360,6 +1360,7 @@ export type GetLoggedInUserQuery = { id: number; firebaseUid: string; username: string; + isAdmin: boolean; profileImageUri?: string | null; activeVideoId?: number | null; createdAt?: any | null; @@ -2243,6 +2244,7 @@ export const GetLoggedInUserDocument = gql` id firebaseUid username + isAdmin profileImageUri activeVideoId createdAt diff --git a/src/operations/user.gql b/src/operations/user.gql index 3cf6306..b63b767 100644 --- a/src/operations/user.gql +++ b/src/operations/user.gql @@ -24,6 +24,7 @@ query getLoggedInUser { id firebaseUid username + isAdmin profileImageUri activeVideoId createdAt From 235f4a58e95e22ff579a00b6692293cd2d5afe77 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 13 Jul 2024 23:42:12 -0600 Subject: [PATCH 6/9] Add getUsernames --- src/index.tsx | 7 +++++++ src/schema.gql | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 4d80ae5..7abcbaa 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -944,6 +944,7 @@ export type Query = { getShots: Array; getUser?: Maybe; getUserVideos: VideoHistoryGql; + getUsernames: Array; getVideo: VideoGql; getVideoMakePercentageIntervals: Array; getVideos: Array; @@ -976,6 +977,12 @@ export type QueryGetUserVideosArgs = { userId?: InputMaybe; }; +export type QueryGetUsernamesArgs = { + after?: InputMaybe; + limit?: InputMaybe; + matchString?: InputMaybe; +}; + export type QueryGetVideoArgs = { videoId: Scalars["Int"]["input"]; }; diff --git a/src/schema.gql b/src/schema.gql index aed271c..59c83c3 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -12,6 +12,11 @@ type Query { getShotAnnotationTypes: [ShotAnnotationTypeGQL!]! getUser(userId: Int!): UserGQL getLoggedInUser: UserGQL + getUsernames( + matchString: String = null + limit: Int = null + after: String = null + ): [String!]! getPlayTime(userId: Int!): UserPlayTimeGQL! getUserVideos( userId: Int = null From d669dba320863a62ea3111862691777f6ff0efd8 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 14 Jul 2024 00:16:02 -0600 Subject: [PATCH 7/9] Add getUsernames operation --- src/index.tsx | 88 +++++++++++++++++++++++++++++++++++++++++ src/operations/user.gql | 8 ++++ 2 files changed, 96 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 7abcbaa..a007ee3 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1384,6 +1384,17 @@ export type GetUserPlayTimeQuery = { getPlayTime: { __typename?: "UserPlayTimeGQL"; totalSeconds: number }; }; +export type GetUsernamesQueryVariables = Exact<{ + matchString: Scalars["String"]["input"]; + limit?: InputMaybe; + after?: InputMaybe; +}>; + +export type GetUsernamesQuery = { + __typename?: "Query"; + getUsernames: Array; +}; + export type GetStreamMonitoringDetailsQueryVariables = Exact<{ videoId: Scalars["Int"]["input"]; }>; @@ -2397,6 +2408,83 @@ export type GetUserPlayTimeQueryResult = Apollo.QueryResult< GetUserPlayTimeQuery, GetUserPlayTimeQueryVariables >; +export const GetUsernamesDocument = gql` + query getUsernames( + $matchString: String! + $limit: Int = null + $after: String = null + ) { + getUsernames(matchString: $matchString, limit: $limit, after: $after) + } +`; + +/** + * __useGetUsernamesQuery__ + * + * To run a query within a React component, call `useGetUsernamesQuery` and pass it any options that fit your needs. + * When your component renders, `useGetUsernamesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetUsernamesQuery({ + * variables: { + * matchString: // value for 'matchString' + * limit: // value for 'limit' + * after: // value for 'after' + * }, + * }); + */ +export function useGetUsernamesQuery( + baseOptions: Apollo.QueryHookOptions< + GetUsernamesQuery, + GetUsernamesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + GetUsernamesDocument, + options, + ); +} +export function useGetUsernamesLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetUsernamesQuery, + GetUsernamesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + GetUsernamesDocument, + options, + ); +} +export function useGetUsernamesSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetUsernamesQuery, + GetUsernamesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + GetUsernamesDocument, + options, + ); +} +export type GetUsernamesQueryHookResult = ReturnType< + typeof useGetUsernamesQuery +>; +export type GetUsernamesLazyQueryHookResult = ReturnType< + typeof useGetUsernamesLazyQuery +>; +export type GetUsernamesSuspenseQueryHookResult = ReturnType< + typeof useGetUsernamesSuspenseQuery +>; +export type GetUsernamesQueryResult = Apollo.QueryResult< + GetUsernamesQuery, + GetUsernamesQueryVariables +>; export const GetStreamMonitoringDetailsDocument = gql` query GetStreamMonitoringDetails($videoId: Int!) { getVideo(videoId: $videoId) { diff --git a/src/operations/user.gql b/src/operations/user.gql index b63b767..841767f 100644 --- a/src/operations/user.gql +++ b/src/operations/user.gql @@ -37,3 +37,11 @@ query GetUserPlayTime($userId: Int!) { totalSeconds } } + +query getUsernames( + $matchString: String! + $limit: Int = null + $after: String = null +) { + getUsernames(matchString: $matchString, limit: $limit, after: $after) +} From dc214e878f1a769bd2e67f2ac4055bddd5617c37 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 15 Jul 2024 15:32:21 -0600 Subject: [PATCH 8/9] Add annotations to shot gql --- src/index.tsx | 11 +++++++++++ src/schema.gql | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index a007ee3..eb5984e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1006,6 +1006,16 @@ export type SerializedShotPathsGql = { b64EncodedBuffer?: Maybe; }; +export type ShotAnnotationGql = { + __typename?: "ShotAnnotationGQL"; + createdAt?: Maybe; + creator: UserGql; + notes: Scalars["String"]["output"]; + shotId: Scalars["Int"]["output"]; + type: ShotAnnotationTypeGql; + updatedAt?: Maybe; +}; + export type ShotAnnotationInput = { name: Scalars["String"]["input"]; }; @@ -1024,6 +1034,7 @@ export enum ShotDirectionEnum { export type ShotGql = { __typename?: "ShotGQL"; + annotations: Array; bankFeatures?: Maybe; createdAt?: Maybe; cueObjectFeatures?: Maybe; diff --git a/src/schema.gql b/src/schema.gql index 59c83c3..d10d003 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -160,6 +160,7 @@ type ShotGQL { bankFeatures: BankFeaturesGQL serializedShotPaths: SerializedShotPathsGQL user: UserGQL + annotations: [ShotAnnotationGQL!]! } """ @@ -207,6 +208,15 @@ type UserGQL { updatedAt: DateTime } +type ShotAnnotationGQL { + shotId: Int! + type: ShotAnnotationTypeGQL! + creator: UserGQL! + notes: String! + createdAt: DateTime + updatedAt: DateTime +} + type ShotAnnotationTypeGQL { id: Int! name: String! From 4ca27317b443b2669e622c4fb9c57b96ca6ca9d2 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 15 Jul 2024 15:37:43 -0600 Subject: [PATCH 9/9] Add operation for shot annotation types --- src/index.tsx | 86 ++++++++++++++++++++++++++++++++++++++++ src/operations/shots.gql | 7 ++++ 2 files changed, 93 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index eb5984e..5a3a533 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1335,6 +1335,19 @@ export type GetShotsQuery = { }>; }; +export type GetShotAnnotationTypesQueryVariables = Exact<{ + [key: string]: never; +}>; + +export type GetShotAnnotationTypesQuery = { + __typename?: "Query"; + getShotAnnotationTypes: Array<{ + __typename?: "ShotAnnotationTypeGQL"; + id: number; + name: string; + }>; +}; + export type GetProfileImageUploadLinkMutationVariables = Exact<{ fileExt?: InputMaybe; }>; @@ -2157,6 +2170,79 @@ export type GetShotsQueryResult = Apollo.QueryResult< GetShotsQuery, GetShotsQueryVariables >; +export const GetShotAnnotationTypesDocument = gql` + query GetShotAnnotationTypes { + getShotAnnotationTypes { + id + name + } + } +`; + +/** + * __useGetShotAnnotationTypesQuery__ + * + * To run a query within a React component, call `useGetShotAnnotationTypesQuery` and pass it any options that fit your needs. + * When your component renders, `useGetShotAnnotationTypesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetShotAnnotationTypesQuery({ + * variables: { + * }, + * }); + */ +export function useGetShotAnnotationTypesQuery( + baseOptions?: Apollo.QueryHookOptions< + GetShotAnnotationTypesQuery, + GetShotAnnotationTypesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetShotAnnotationTypesQuery, + GetShotAnnotationTypesQueryVariables + >(GetShotAnnotationTypesDocument, options); +} +export function useGetShotAnnotationTypesLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetShotAnnotationTypesQuery, + GetShotAnnotationTypesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetShotAnnotationTypesQuery, + GetShotAnnotationTypesQueryVariables + >(GetShotAnnotationTypesDocument, options); +} +export function useGetShotAnnotationTypesSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetShotAnnotationTypesQuery, + GetShotAnnotationTypesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetShotAnnotationTypesQuery, + GetShotAnnotationTypesQueryVariables + >(GetShotAnnotationTypesDocument, options); +} +export type GetShotAnnotationTypesQueryHookResult = ReturnType< + typeof useGetShotAnnotationTypesQuery +>; +export type GetShotAnnotationTypesLazyQueryHookResult = ReturnType< + typeof useGetShotAnnotationTypesLazyQuery +>; +export type GetShotAnnotationTypesSuspenseQueryHookResult = ReturnType< + typeof useGetShotAnnotationTypesSuspenseQuery +>; +export type GetShotAnnotationTypesQueryResult = Apollo.QueryResult< + GetShotAnnotationTypesQuery, + GetShotAnnotationTypesQueryVariables +>; export const GetProfileImageUploadLinkDocument = gql` mutation getProfileImageUploadLink($fileExt: String = ".png") { getProfileImageUploadLink(fileExt: $fileExt) { diff --git a/src/operations/shots.gql b/src/operations/shots.gql index 1a842b6..f52f0aa 100644 --- a/src/operations/shots.gql +++ b/src/operations/shots.gql @@ -36,3 +36,10 @@ query GetShots( } } } + +query GetShotAnnotationTypes { + getShotAnnotationTypes { + id + name + } +}