Link personal bests to their recorded matches
This commit is contained in:
@@ -14,11 +14,27 @@ export const leaderboardMetrics = [
|
||||
export type LeaderboardMetric = typeof leaderboardMetrics[number]['key'];
|
||||
|
||||
export type PlayerStats = Record<LeaderboardMetric, number>;
|
||||
export type PersonalBestMetric = 'highestRound' | 'bestKills' | 'bestScore';
|
||||
export interface RecordEvidence {
|
||||
matchId: number;
|
||||
game: string;
|
||||
mapKey: string;
|
||||
mapName: string;
|
||||
server: string;
|
||||
startedAt: string;
|
||||
endedAt: string | null;
|
||||
startObserved: boolean;
|
||||
presentAtStart: boolean | null;
|
||||
firstObservedRound: number | null;
|
||||
value: number;
|
||||
}
|
||||
export type PersonalBestRecords = Record<PersonalBestMetric, RecordEvidence>;
|
||||
export interface PlayerMapRecord extends PlayerStats {
|
||||
game: string;
|
||||
key: string;
|
||||
name: string;
|
||||
lastSeen: string;
|
||||
records: PersonalBestRecords;
|
||||
}
|
||||
export interface PlayerMatch {
|
||||
id: number;
|
||||
@@ -44,6 +60,7 @@ export interface PlayerProfile {
|
||||
firstSeen: string;
|
||||
lastSeen: string;
|
||||
stats: PlayerStats;
|
||||
records: PersonalBestRecords;
|
||||
maps: PlayerMapRecord[];
|
||||
matches: PlayerMatch[];
|
||||
offset: number;
|
||||
@@ -69,6 +86,7 @@ export interface LeaderboardEntry {
|
||||
bestKills: number;
|
||||
bestScore: number;
|
||||
lastSeen: string;
|
||||
records: PersonalBestRecords;
|
||||
}
|
||||
|
||||
export interface LeaderboardMap {
|
||||
|
||||
Reference in New Issue
Block a user