From ddd7e2d50b1830894f81cb27643c25cc822e7c11 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 1 Apr 2024 20:46:21 -0600 Subject: [PATCH] Add devMode --- src/index.tsx | 8 +++ src/schema.gql | 149 +++++++++++++++++++++++++------------------------ 2 files changed, 84 insertions(+), 73 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 86787db..3fc588a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -118,6 +118,8 @@ export type CueObjectFeaturesGql = { export type DeployedConfigGql = { __typename?: "DeployedConfigGQL"; allowNewUsers: Scalars["Boolean"]["output"]; + devMode: Scalars["Boolean"]["output"]; + firebase: Scalars["Boolean"]["output"]; }; export enum DeviceTypeEnum { @@ -187,6 +189,7 @@ export type Mutation = { editUploadStream: Scalars["Boolean"]["output"]; getProfileImageUploadLink: GetUploadLinkReturn; getUploadLink: GetUploadLinkReturn; + setLoggerLevel: Scalars["Boolean"]["output"]; }; export type MutationCreateBucketSetArgs = { @@ -219,6 +222,11 @@ export type MutationGetUploadLinkArgs = { videoId: Scalars["Int"]["input"]; }; +export type MutationSetLoggerLevelArgs = { + level: Scalars["String"]["input"]; + path: Scalars["String"]["input"]; +}; + export type OrFilter = { filters: Array; }; diff --git a/src/schema.gql b/src/schema.gql index 45d6cfd..a460b20 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -2,18 +2,18 @@ type Query { getAggregatedShotMetrics( aggregateInput: AggregateInputGQL! ): [AggregateResultGQL!]! - getUser(userId: Int!): UserGQL - getLoggedInUser: UserGQL - getDeployedConfig: DeployedConfigGQL! - getPlayTime(userId: Int!): UserPlayTimeGQL! - getVideo(videoId: Int!): VideoGQL! - getShots(filterInput: FilterInput!): [ShotGQL!]! getBucketSet(keyName: String!): BucketSetGQL - getVideoFeedForUser(limit: Int! = 5, after: String = null): VideoFeedGQL! + getDeployedConfig: DeployedConfigGQL! getVideoMakePercentageIntervals( videoId: ID! intervalDuration: Int! = 300 ): [MakePercentageIntervalGQL!]! + getShots(filterInput: FilterInput!): [ShotGQL!]! + getUser(userId: Int!): UserGQL + getLoggedInUser: UserGQL + getPlayTime(userId: Int!): UserPlayTimeGQL! + getVideoFeedForUser(limit: Int! = 5, after: String = null): VideoFeedGQL! + getVideo(videoId: Int!): VideoGQL! } type AggregateResultGQL { @@ -103,47 +103,26 @@ input VideoTagClassInput { name: String! } -type UserGQL { - id: Int! - firebaseUid: String! - username: String! - profileImageUri: String - createdAt: DateTime - updatedAt: DateTime +type BucketSetGQL { + keyName: String! + feature: String! + buckets: [BucketGQL!]! } -""" -Date with time (isoformat) -""" -scalar DateTime +type BucketGQL { + rangeKey: String! + lowerBound: Float! +} type DeployedConfigGQL { allowNewUsers: Boolean! + firebase: Boolean! + devMode: Boolean! } -type UserPlayTimeGQL { - totalSeconds: Float! -} - -type VideoGQL { - id: Int! - owner: UserGQL - name: String - totalShotsMade: Int! - totalShots: Int! +type MakePercentageIntervalGQL { makePercentage: Float! - medianRun: Float - averageTimeBetweenShots: Float - createdAt: DateTime - updatedAt: DateTime - shots: [ShotGQL!]! - startTime: DateTime - endTime: DateTime - elapsedTime: Float - framesPerSecond: Int! - stream: UploadStreamGQL - tags: [VideoTag!]! - homographyHistory: [HomographyInfoGQL!]! + elapsedTime: Float! } type ShotGQL { @@ -158,6 +137,11 @@ type ShotGQL { bankFeatures: BankFeaturesGQL } +""" +Date with time (isoformat) +""" +scalar DateTime + type CueObjectFeaturesGQL { cueObjectDistance: Float cueObjectAngle: Float @@ -182,6 +166,45 @@ enum WallTypeEnum { SHORT } +type UserGQL { + id: Int! + firebaseUid: String! + username: String! + profileImageUri: String + createdAt: DateTime + updatedAt: DateTime +} + +type UserPlayTimeGQL { + totalSeconds: Float! +} + +type VideoFeedGQL { + videos: [VideoGQL!]! + pageInfo: PageInfoGQL! +} + +type VideoGQL { + id: Int! + owner: UserGQL + name: String + totalShotsMade: Int! + totalShots: Int! + makePercentage: Float! + medianRun: Float + averageTimeBetweenShots: Float + createdAt: DateTime + updatedAt: DateTime + shots: [ShotGQL!]! + startTime: DateTime + endTime: DateTime + elapsedTime: Float + framesPerSecond: Int! + stream: UploadStreamGQL + tags: [VideoTag!]! + homographyHistory: [HomographyInfoGQL!]! +} + type UploadStreamGQL { id: ID! linksRequested: Int! @@ -235,42 +258,22 @@ type IntPoint2D { y: Int! } -type BucketSetGQL { - keyName: String! - feature: String! - buckets: [BucketGQL!]! -} - -type BucketGQL { - rangeKey: String! - lowerBound: Float! -} - -type VideoFeedGQL { - videos: [VideoGQL!]! - pageInfo: PageInfoGQL! -} - type PageInfoGQL { hasNextPage: Boolean! endCursor: String } -type MakePercentageIntervalGQL { - makePercentage: Float! - elapsedTime: Float! -} - type Mutation { createBucketSet(params: CreateBucketSetInput!): BucketSetGQL! + setLoggerLevel(path: String!, level: String!): Boolean! + getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn! + editProfileImageUri(profileImageUri: String!): UserGQL! createUploadStream( videoMetadata: VideoMetadataInput! ): CreateUploadStreamReturn! getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn! editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean! deleteVideo(videoId: Int!): Boolean! - getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn! - editProfileImageUri(profileImageUri: String!): UserGQL! } input CreateBucketSetInput { @@ -279,6 +282,16 @@ input CreateBucketSetInput { buckets: [BucketInputGQL!]! } +type GetUploadLinkReturn { + uploadUrl: String! + headers: [Header]! +} + +type Header { + key: String! + value: String! +} + type CreateUploadStreamReturn { videoId: Int! } @@ -310,13 +323,3 @@ enum DeviceTypeEnum { ANDROID BROWSER } - -type GetUploadLinkReturn { - uploadUrl: String! - headers: [Header]! -} - -type Header { - key: String! - value: String! -}