feat: connect tournament views to APIs and recover archived stats
Remove development previews and complete hall of fame, match history, official results, and multi-kill API integration. Fix active match pagination and team-ready controls, preserve basic scoreboards, and recover statistics when Riot archives arrive. Use bounded in-process cache invalidation retries and add the Riot match lookup index migration with regression coverage.
This commit is contained in:
1 parent
20e1e6ec04
commit
0d7617e2d2
70 files changed
+3739
-1793
No files matched your search
@@ -14,6 +14,7 @@ import {
|
||||
} from '../../competition/competition.schema';
|
||||
import { ModelDefinition } from './types';
|
||||
import { AUCTION_CANCELLATION_CLEANUP_INDEX } from './auction-cancellation-index';
|
||||
import { MATCH_STATS_RIOT_MATCH_INDEX } from './match-stats-raw-index';
|
||||
|
||||
export type Position = 'TOP' | 'JGL' | 'MID' | 'ADC' | 'SUP';
|
||||
export const POSITIONS: Position[] = ['TOP', 'JGL', 'MID', 'ADC', 'SUP'];
|
||||
@@ -1019,6 +1020,14 @@ export interface MatchStatsRecord {
|
||||
championLevel: number;
|
||||
teamPosition: string;
|
||||
kills: number;
|
||||
multiKills?: {
|
||||
doubleKills: number;
|
||||
tripleKills: number;
|
||||
quadraKills: number;
|
||||
pentaKills: number;
|
||||
largestMultiKill: number;
|
||||
};
|
||||
tier?: TierInfo;
|
||||
deaths: number;
|
||||
assists: number;
|
||||
win: boolean;
|
||||
@@ -1051,6 +1060,7 @@ export interface MatchStatsGameDetail {
|
||||
gameCreation: number;
|
||||
gameDuration: number;
|
||||
gameVersion?: string;
|
||||
rawAvailable?: boolean;
|
||||
winnerSide: TeamSide;
|
||||
timeline: MatchStatsTimelinePoint[];
|
||||
timelineLoaded?: boolean;
|
||||
@@ -2535,7 +2545,7 @@ export const MatchStatsSchema: mongoose.Schema<MatchStats> = new Schema(
|
||||
{ timestamps: true, collection: 'match_stats' },
|
||||
) as mongoose.Schema<MatchStats>;
|
||||
|
||||
MatchStatsSchema.index({ communityId: 1, scheduledAt: -1 });
|
||||
MatchStatsSchema.index({ communityId: 1, scheduledAt: -1, matchId: -1 });
|
||||
MatchStatsSchema.index({
|
||||
communityId: 1,
|
||||
gameCreationMin: 1,
|
||||
@@ -2544,6 +2554,7 @@ MatchStatsSchema.index({
|
||||
MatchStatsSchema.index({ communityId: 1, userIds: 1 });
|
||||
MatchStatsSchema.index({ communityId: 1, userIds: 1, scheduledAt: -1 });
|
||||
MatchStatsSchema.index({ communityId: 1, championIds: 1 });
|
||||
MatchStatsSchema.index(MATCH_STATS_RIOT_MATCH_INDEX.key, MATCH_STATS_RIOT_MATCH_INDEX.options);
|
||||
|
||||
export const tournamentModelDefinitions: Array<
|
||||
ModelDefinition & { name: keyof TournamentModelTypes }
|
||||
|
||||
Reference in new issue
Block a user