Add support for getRuns
All checks were successful
Tests / Tests (pull_request) Successful in 31s

This commit is contained in:
Mike Kalange 2024-11-19 14:05:21 -08:00
parent 8fabfd67cf
commit da21627f15
2 changed files with 104 additions and 39 deletions

View File

@ -155,6 +155,11 @@ export type DateRangeFilter = {
lessThanInclusive?: Scalars["Boolean"]["input"]; lessThanInclusive?: Scalars["Boolean"]["input"];
}; };
export type DatetimeOrdering = {
descending?: Scalars["Boolean"]["input"];
startingAt?: InputMaybe<Scalars["DateTime"]["input"]>;
};
export type DatetimeRangeAggregationInput = { export type DatetimeRangeAggregationInput = {
endDatetime?: InputMaybe<Scalars["DateTime"]["input"]>; endDatetime?: InputMaybe<Scalars["DateTime"]["input"]>;
feature?: Scalars["String"]["input"]; feature?: Scalars["String"]["input"];
@ -162,11 +167,6 @@ export type DatetimeRangeAggregationInput = {
startDatetime?: InputMaybe<Scalars["DateTime"]["input"]>; startDatetime?: InputMaybe<Scalars["DateTime"]["input"]>;
}; };
export type DatetimeShotOrdering = {
descending?: Scalars["Boolean"]["input"];
startingAt?: InputMaybe<Scalars["DateTime"]["input"]>;
};
export type DeployedConfigGql = { export type DeployedConfigGql = {
__typename?: "DeployedConfigGQL"; __typename?: "DeployedConfigGQL";
allowNewUsers: Scalars["Boolean"]["output"]; allowNewUsers: Scalars["Boolean"]["output"];
@ -1878,6 +1878,11 @@ export type FilterInput =
videoId: Array<Scalars["Int"]["input"]>; videoId: Array<Scalars["Int"]["input"]>;
}; };
export type FloatOrdering = {
descending?: Scalars["Boolean"]["input"];
startingAt?: InputMaybe<Scalars["Float"]["input"]>;
};
export type FloatRangeFilter = { export type FloatRangeFilter = {
greaterThan?: InputMaybe<Scalars["Float"]["input"]>; greaterThan?: InputMaybe<Scalars["Float"]["input"]>;
greaterThanEqualTo?: InputMaybe<Scalars["Float"]["input"]>; greaterThanEqualTo?: InputMaybe<Scalars["Float"]["input"]>;
@ -1887,11 +1892,6 @@ export type FloatRangeFilter = {
lessThanInclusive?: Scalars["Boolean"]["input"]; lessThanInclusive?: Scalars["Boolean"]["input"];
}; };
export type FloatShotOrdering = {
descending?: Scalars["Boolean"]["input"];
startingAt?: InputMaybe<Scalars["Float"]["input"]>;
};
export type GetProfileUploadLinkErrors = { export type GetProfileUploadLinkErrors = {
__typename?: "GetProfileUploadLinkErrors"; __typename?: "GetProfileUploadLinkErrors";
error: TooManyProfileImageUploadsErr; error: TooManyProfileImageUploadsErr;
@ -1902,6 +1902,17 @@ export type GetProfileUploadLinkReturn = {
value: UploadLinkGetProfileUploadLinkErrors; value: UploadLinkGetProfileUploadLinkErrors;
}; };
export type GetRunsOrdering = {
orderings: Array<RunsOrderingComponent>;
};
export type GetRunsResult = {
__typename?: "GetRunsResult";
count?: Maybe<Scalars["Int"]["output"]>;
runIds: Array<Scalars["Int"]["output"]>;
runs: Array<RunGql>;
};
export type GetShotsOrdering = { export type GetShotsOrdering = {
orderings: Array<ShotsOrderingComponent>; orderings: Array<ShotsOrderingComponent>;
}; };
@ -1964,17 +1975,17 @@ export type InitUploadAlreadyCompletedErr = {
segmentType: StreamSegmentTypeEnum; segmentType: StreamSegmentTypeEnum;
}; };
export type IntOrdering = {
descending?: Scalars["Boolean"]["input"];
startingAt?: InputMaybe<Scalars["Int"]["input"]>;
};
export type IntPoint2D = { export type IntPoint2D = {
__typename?: "IntPoint2D"; __typename?: "IntPoint2D";
x: Scalars["Int"]["output"]; x: Scalars["Int"]["output"];
y: Scalars["Int"]["output"]; y: Scalars["Int"]["output"];
}; };
export type IntShotOrdering = {
descending?: Scalars["Boolean"]["input"];
startingAt?: InputMaybe<Scalars["Int"]["input"]>;
};
export type MakePercentageIntervalGql = { export type MakePercentageIntervalGql = {
__typename?: "MakePercentageIntervalGQL"; __typename?: "MakePercentageIntervalGQL";
elapsedTime: Scalars["Float"]["output"]; elapsedTime: Scalars["Float"]["output"];
@ -2186,6 +2197,7 @@ export type Query = {
getMedals: RequestedMedalsGql; getMedals: RequestedMedalsGql;
getOrderedShots: GetShotsResult; getOrderedShots: GetShotsResult;
getPlayTime: UserPlayTimeGql; getPlayTime: UserPlayTimeGql;
getRuns: GetRunsResult;
getShotAnnotationTypes: Array<ShotAnnotationTypeGql>; getShotAnnotationTypes: Array<ShotAnnotationTypeGql>;
getShots: Array<ShotGql>; getShots: Array<ShotGql>;
getShotsByIds: Array<ShotGql>; getShotsByIds: Array<ShotGql>;
@ -2238,6 +2250,14 @@ export type QueryGetPlayTimeArgs = {
userId: Scalars["Int"]["input"]; userId: Scalars["Int"]["input"];
}; };
export type QueryGetRunsArgs = {
countRespectsLimit?: Scalars["Boolean"]["input"];
filterInput: FilterInput;
limit?: Scalars["Int"]["input"];
runIds?: InputMaybe<Array<Scalars["Int"]["input"]>>;
runsOrdering?: InputMaybe<GetRunsOrdering>;
};
export type QueryGetShotAnnotationTypesArgs = { export type QueryGetShotAnnotationTypesArgs = {
errorTypes?: InputMaybe<Scalars["Boolean"]["input"]>; errorTypes?: InputMaybe<Scalars["Boolean"]["input"]>;
}; };
@ -2330,6 +2350,20 @@ export type RequestedMedalsGql = {
totalMakes1000?: Maybe<MedalGql>; totalMakes1000?: Maybe<MedalGql>;
}; };
export type RunGql = {
__typename?: "RunGQL";
id: Scalars["Int"]["output"];
runLength: Scalars["Int"]["output"];
shots: Array<ShotGql>;
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 = { export type SegmentAlreadyUploadedErr = {
__typename?: "SegmentAlreadyUploadedErr"; __typename?: "SegmentAlreadyUploadedErr";
segmentId: Scalars["Int"]["output"]; segmentId: Scalars["Int"]["output"];
@ -2409,7 +2443,7 @@ export type ShotGql = {
export type ShotsOrderingComponent = export type ShotsOrderingComponent =
| { | {
marginOfError: FloatShotOrdering; marginOfError: FloatOrdering;
runLength?: never; runLength?: never;
startFrame?: never; startFrame?: never;
videoCreation?: never; videoCreation?: never;
@ -2417,7 +2451,7 @@ export type ShotsOrderingComponent =
} }
| { | {
marginOfError?: never; marginOfError?: never;
runLength: IntShotOrdering; runLength: IntOrdering;
startFrame?: never; startFrame?: never;
videoCreation?: never; videoCreation?: never;
videoId?: never; videoId?: never;
@ -2425,7 +2459,7 @@ export type ShotsOrderingComponent =
| { | {
marginOfError?: never; marginOfError?: never;
runLength?: never; runLength?: never;
startFrame: IntShotOrdering; startFrame: IntOrdering;
videoCreation?: never; videoCreation?: never;
videoId?: never; videoId?: never;
} }
@ -2433,7 +2467,7 @@ export type ShotsOrderingComponent =
marginOfError?: never; marginOfError?: never;
runLength?: never; runLength?: never;
startFrame?: never; startFrame?: never;
videoCreation: DatetimeShotOrdering; videoCreation: DatetimeOrdering;
videoId?: never; videoId?: never;
} }
| { | {
@ -2441,7 +2475,7 @@ export type ShotsOrderingComponent =
runLength?: never; runLength?: never;
startFrame?: never; startFrame?: never;
videoCreation?: never; videoCreation?: never;
videoId: IntShotOrdering; videoId: IntOrdering;
}; };
export type SpinTypeCountsGql = { export type SpinTypeCountsGql = {

View File

@ -10,6 +10,13 @@ type Query {
intervalDuration: Int! = 300 intervalDuration: Int! = 300
): [MakePercentageIntervalGQL!]! ): [MakePercentageIntervalGQL!]!
getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL! getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL!
getRuns(
filterInput: FilterInput!
runIds: [Int!] = null
runsOrdering: GetRunsOrdering = null
limit: Int! = 500
countRespectsLimit: Boolean! = false
): GetRunsResult!
getOrderedShots( getOrderedShots(
filterInput: FilterInput! filterInput: FilterInput!
ids: [Int!] = null ids: [Int!] = null
@ -308,10 +315,18 @@ input MedalScope @oneOf {
interval: TimeInterval interval: TimeInterval
} }
type GetShotsResult { type GetRunsResult {
shots: [ShotGQL!]! runs: [RunGQL!]!
count: Int count: Int
ids: [Int!]! runIds: [Int!]!
}
type RunGQL {
id: Int!
runLength: Int!
videoId: Int!
userId: Int!
shots: [ShotGQL!]!
} }
type ShotGQL { type ShotGQL {
@ -569,33 +584,49 @@ type VideoProcessingStatusGQL {
updatedAt: DateTime 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 { input GetShotsOrdering {
orderings: [ShotsOrderingComponent!]! orderings: [ShotsOrderingComponent!]!
} }
input ShotsOrderingComponent @oneOf { input ShotsOrderingComponent @oneOf {
videoCreation: DatetimeShotOrdering videoCreation: DatetimeOrdering
marginOfError: FloatShotOrdering marginOfError: FloatOrdering
videoId: IntShotOrdering videoId: IntOrdering
startFrame: IntShotOrdering startFrame: IntOrdering
runLength: IntShotOrdering runLength: IntOrdering
} }
input DatetimeShotOrdering { input FloatOrdering {
descending: Boolean! = true
startingAt: DateTime = null
}
input FloatShotOrdering {
descending: Boolean! = true descending: Boolean! = true
startingAt: Float = null startingAt: Float = null
} }
input IntShotOrdering {
descending: Boolean! = true
startingAt: Int = null
}
input GetShotsPagination { input GetShotsPagination {
createdAfter: CreatedAfter! createdAfter: CreatedAfter!
startFrameAfter: Int! startFrameAfter: Int!