Link personal bests to their recorded matches

This commit is contained in:
2026-10-01 12:12:21 -04:00
parent 13963cba1c
commit c7d71c63ba
13 changed files with 304 additions and 14 deletions
+18
View File
@@ -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 {