diff --git a/src/index.tsx b/src/index.tsx index fa7a950..07eaf23 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -124,7 +124,7 @@ export enum ClientUploadStatusEnum { export type CountLeaderboardGql = { __typename?: "CountLeaderboardGQL"; - entries: Array; + entries: Array; }; export type CreateBucketSetInput = { @@ -2014,12 +2014,6 @@ export type IntPoint2D = { y: Scalars["Int"]["output"]; }; -export type IntUserLeaderboardEntry = { - __typename?: "IntUserLeaderboardEntry"; - user: UserGql; - value: Scalars["Int"]["output"]; -}; - export type MakePercentageIntervalGql = { __typename?: "MakePercentageIntervalGQL"; elapsedTime: Scalars["Float"]["output"]; @@ -2243,6 +2237,7 @@ export type Query = { getDeployedConfig: DeployedConfigGql; getFeedVideos: VideoHistoryGql; getLoggedInUser?: Maybe; + getLongestRunsLeaderboard: RunLeaderboardGql; getMakesLeaderboard: CountLeaderboardGql; getMedals: RequestedMedalsGql; getOrderedShots: GetShotsResult; @@ -2284,6 +2279,12 @@ export type QueryGetFeedVideosArgs = { limit?: Scalars["Int"]["input"]; }; +export type QueryGetLongestRunsLeaderboardArgs = { + interval?: InputMaybe; + requiredTags?: InputMaybe>; + when?: InputMaybe; +}; + export type QueryGetMakesLeaderboardArgs = { interval?: InputMaybe; when?: InputMaybe; @@ -2421,6 +2422,12 @@ export type RequestedMedalsGql = { totalMakes10000?: Maybe; }; +export type RunEntry = { + __typename?: "RunEntry"; + run: RunGql; + user: UserGql; +}; + export type RunFilterInput = { andFilters?: InputMaybe>; createdAt?: InputMaybe; @@ -2439,9 +2446,15 @@ export type RunGql = { runLength: Scalars["Int"]["output"]; shots: Array; userId: Scalars["Int"]["output"]; + video: VideoGql; videoId: Scalars["Int"]["output"]; }; +export type RunLeaderboardGql = { + __typename?: "RunLeaderboardGQL"; + entries: Array; +}; + export type RunsOrderingComponent = | { runLength: IntOrdering; videoCreation?: never; videoId?: never } | { runLength?: never; videoCreation: DatetimeOrdering; videoId?: never } @@ -2734,6 +2747,14 @@ export type UserRelationshipsResult = { relationships: Array; }; +export type UserShotCountEntry = { + __typename?: "UserShotCountEntry"; + proportionMade: Scalars["Float"]["output"]; + total: Scalars["Int"]["output"]; + user: UserGql; + value: Scalars["Int"]["output"]; +}; + export type VideoFeedInputGql = | { allUsers: Scalars["Boolean"]["input"]; @@ -3084,7 +3105,7 @@ export type GetMakesLeaderboardQuery = { getMakesLeaderboard: { __typename?: "CountLeaderboardGQL"; entries: Array<{ - __typename?: "IntUserLeaderboardEntry"; + __typename?: "UserShotCountEntry"; value: number; user: { __typename?: "UserGQL"; diff --git a/src/schema.gql b/src/schema.gql index c2450e3..56f03e4 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -71,6 +71,11 @@ type Query { filters: VideoFilterInput = null feedInput: VideoFeedInputGQL = null ): VideoHistoryGQL! + getLongestRunsLeaderboard( + interval: TimeInterval = null + when: DateTime = null + requiredTags: [String!] = null + ): RunLeaderboardGQL! getMakesLeaderboard( interval: TimeInterval = null when: DateTime = null @@ -342,6 +347,7 @@ type RunGQL { videoId: Int! userId: Int! shots: [ShotGQL!]! + video: VideoGQL! } type ShotGQL { @@ -723,13 +729,24 @@ input VideoFeedInputGQL @oneOf { allUsers: Boolean } -type CountLeaderboardGQL { - entries: [IntUserLeaderboardEntry!]! +type RunLeaderboardGQL { + entries: [RunEntry!]! } -type IntUserLeaderboardEntry { +type RunEntry { + user: UserGQL! + run: RunGQL! +} + +type CountLeaderboardGQL { + entries: [UserShotCountEntry!]! +} + +type UserShotCountEntry { user: UserGQL! value: Int! + total: Int! + proportionMade: Float! } type Mutation {