diff --git a/src/index.tsx b/src/index.tsx index 21669ae..349b07f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -155,6 +155,11 @@ export type DateRangeFilter = { lessThanInclusive?: Scalars["Boolean"]["input"]; }; +export type DatetimeOrdering = { + descending?: Scalars["Boolean"]["input"]; + startingAt?: InputMaybe; +}; + export type DatetimeRangeAggregationInput = { endDatetime?: InputMaybe; feature?: Scalars["String"]["input"]; @@ -162,11 +167,6 @@ export type DatetimeRangeAggregationInput = { startDatetime?: InputMaybe; }; -export type DatetimeShotOrdering = { - descending?: Scalars["Boolean"]["input"]; - startingAt?: InputMaybe; -}; - export type DeployedConfigGql = { __typename?: "DeployedConfigGQL"; allowNewUsers: Scalars["Boolean"]["output"]; @@ -1878,6 +1878,11 @@ export type FilterInput = videoId: Array; }; +export type FloatOrdering = { + descending?: Scalars["Boolean"]["input"]; + startingAt?: InputMaybe; +}; + export type FloatRangeFilter = { greaterThan?: InputMaybe; greaterThanEqualTo?: InputMaybe; @@ -1887,11 +1892,6 @@ export type FloatRangeFilter = { lessThanInclusive?: Scalars["Boolean"]["input"]; }; -export type FloatShotOrdering = { - descending?: Scalars["Boolean"]["input"]; - startingAt?: InputMaybe; -}; - export type GetProfileUploadLinkErrors = { __typename?: "GetProfileUploadLinkErrors"; error: TooManyProfileImageUploadsErr; @@ -1902,6 +1902,17 @@ export type GetProfileUploadLinkReturn = { value: UploadLinkGetProfileUploadLinkErrors; }; +export type GetRunsOrdering = { + orderings: Array; +}; + +export type GetRunsResult = { + __typename?: "GetRunsResult"; + count?: Maybe; + runIds: Array; + runs: Array; +}; + export type GetShotsOrdering = { orderings: Array; }; @@ -1964,17 +1975,17 @@ export type InitUploadAlreadyCompletedErr = { segmentType: StreamSegmentTypeEnum; }; +export type IntOrdering = { + descending?: Scalars["Boolean"]["input"]; + startingAt?: InputMaybe; +}; + export type IntPoint2D = { __typename?: "IntPoint2D"; x: Scalars["Int"]["output"]; y: Scalars["Int"]["output"]; }; -export type IntShotOrdering = { - descending?: Scalars["Boolean"]["input"]; - startingAt?: InputMaybe; -}; - export type MakePercentageIntervalGql = { __typename?: "MakePercentageIntervalGQL"; elapsedTime: Scalars["Float"]["output"]; @@ -2186,6 +2197,7 @@ export type Query = { getMedals: RequestedMedalsGql; getOrderedShots: GetShotsResult; getPlayTime: UserPlayTimeGql; + getRuns: GetRunsResult; getShotAnnotationTypes: Array; getShots: Array; getShotsByIds: Array; @@ -2238,6 +2250,14 @@ export type QueryGetPlayTimeArgs = { userId: Scalars["Int"]["input"]; }; +export type QueryGetRunsArgs = { + countRespectsLimit?: Scalars["Boolean"]["input"]; + filterInput: FilterInput; + limit?: Scalars["Int"]["input"]; + runIds?: InputMaybe>; + runsOrdering?: InputMaybe; +}; + export type QueryGetShotAnnotationTypesArgs = { errorTypes?: InputMaybe; }; @@ -2330,6 +2350,20 @@ export type RequestedMedalsGql = { totalMakes1000?: Maybe; }; +export type RunGql = { + __typename?: "RunGQL"; + id: Scalars["Int"]["output"]; + runLength: Scalars["Int"]["output"]; + shots: Array; + userId: Scalars["Int"]["output"]; + videoId: Scalars["Int"]["output"]; +}; + +export type RunsOrderingComponent = + | { runLength: IntOrdering; videoCreation?: never; videoId?: never } + | { runLength?: never; videoCreation: DatetimeOrdering; videoId?: never } + | { runLength?: never; videoCreation?: never; videoId: IntOrdering }; + export type SegmentAlreadyUploadedErr = { __typename?: "SegmentAlreadyUploadedErr"; segmentId: Scalars["Int"]["output"]; @@ -2409,7 +2443,7 @@ export type ShotGql = { export type ShotsOrderingComponent = | { - marginOfError: FloatShotOrdering; + marginOfError: FloatOrdering; runLength?: never; startFrame?: never; videoCreation?: never; @@ -2417,7 +2451,7 @@ export type ShotsOrderingComponent = } | { marginOfError?: never; - runLength: IntShotOrdering; + runLength: IntOrdering; startFrame?: never; videoCreation?: never; videoId?: never; @@ -2425,7 +2459,7 @@ export type ShotsOrderingComponent = | { marginOfError?: never; runLength?: never; - startFrame: IntShotOrdering; + startFrame: IntOrdering; videoCreation?: never; videoId?: never; } @@ -2433,7 +2467,7 @@ export type ShotsOrderingComponent = marginOfError?: never; runLength?: never; startFrame?: never; - videoCreation: DatetimeShotOrdering; + videoCreation: DatetimeOrdering; videoId?: never; } | { @@ -2441,7 +2475,7 @@ export type ShotsOrderingComponent = runLength?: never; startFrame?: never; videoCreation?: never; - videoId: IntShotOrdering; + videoId: IntOrdering; }; export type SpinTypeCountsGql = { diff --git a/src/schema.gql b/src/schema.gql index fe9f1f8..0942fc7 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -10,6 +10,13 @@ type Query { intervalDuration: Int! = 300 ): [MakePercentageIntervalGQL!]! getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL! + getRuns( + filterInput: FilterInput! + runIds: [Int!] = null + runsOrdering: GetRunsOrdering = null + limit: Int! = 500 + countRespectsLimit: Boolean! = false + ): GetRunsResult! getOrderedShots( filterInput: FilterInput! ids: [Int!] = null @@ -308,10 +315,18 @@ input MedalScope @oneOf { interval: TimeInterval } -type GetShotsResult { - shots: [ShotGQL!]! +type GetRunsResult { + runs: [RunGQL!]! count: Int - ids: [Int!]! + runIds: [Int!]! +} + +type RunGQL { + id: Int! + runLength: Int! + videoId: Int! + userId: Int! + shots: [ShotGQL!]! } type ShotGQL { @@ -569,33 +584,49 @@ type VideoProcessingStatusGQL { updatedAt: DateTime } +input GetRunsOrdering { + orderings: [RunsOrderingComponent!]! +} + +input RunsOrderingComponent @oneOf { + runLength: IntOrdering + videoId: IntOrdering + videoCreation: DatetimeOrdering +} + +input IntOrdering { + descending: Boolean! = true + startingAt: Int = null +} + +input DatetimeOrdering { + descending: Boolean! = true + startingAt: DateTime = null +} + +type GetShotsResult { + shots: [ShotGQL!]! + count: Int + ids: [Int!]! +} + input GetShotsOrdering { orderings: [ShotsOrderingComponent!]! } input ShotsOrderingComponent @oneOf { - videoCreation: DatetimeShotOrdering - marginOfError: FloatShotOrdering - videoId: IntShotOrdering - startFrame: IntShotOrdering - runLength: IntShotOrdering + videoCreation: DatetimeOrdering + marginOfError: FloatOrdering + videoId: IntOrdering + startFrame: IntOrdering + runLength: IntOrdering } -input DatetimeShotOrdering { - descending: Boolean! = true - startingAt: DateTime = null -} - -input FloatShotOrdering { +input FloatOrdering { descending: Boolean! = true startingAt: Float = null } -input IntShotOrdering { - descending: Boolean! = true - startingAt: Int = null -} - input GetShotsPagination { createdAfter: CreatedAfter! startFrameAfter: Int!