UNPKG

@trophyso/node

Version:
43 lines (42 loc) 2.03 kB
import type * as TrophyApi from "../index"; /** * A leaderboard with its configuration details. */ export interface LeaderboardResponse { /** The unique ID of the leaderboard. */ id: string; /** The user-facing name of the leaderboard. */ name: string; /** The unique key used to reference the leaderboard in APIs. */ key: string; /** What the leaderboard ranks by. */ rankBy: TrophyApi.LeaderboardResponseRankBy; /** Deprecated. The key of the attribute to break down this leaderboard by. */ breakdownAttribute?: string; /** The user attribute keys that this leaderboard is broken down by. */ breakdownAttributes: string[]; /** The key of the metric to rank by, if rankBy is 'metric'. */ metricKey?: string; /** The name of the metric to rank by, if rankBy is 'metric'. */ metricName?: string; /** The key of the points system to rank by, if rankBy is 'points'. */ pointsSystemKey?: string; /** The name of the points system to rank by, if rankBy is 'points'. */ pointsSystemName?: string; /** The user-facing description of the leaderboard. */ description?: string; /** The start date of the leaderboard in YYYY-MM-DD format. */ start: string; /** The end date of the leaderboard in YYYY-MM-DD format, or null if it runs forever. */ end?: string; /** When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format). */ startTime?: string; /** When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format). */ endTime?: string; /** The maximum number of participants in the leaderboard. */ maxParticipants?: number; /** The repetition type for recurring leaderboards, or null for one-time leaderboards. */ runUnit?: TrophyApi.LeaderboardResponseRunUnit; /** The interval between repetitions, relative to the start date and repetition type. Null for one-time leaderboards. */ runInterval?: number; }