This commit is contained in:
2025-12-29 22:27:33 +01:00
parent 3f610c1cb6
commit 7a853d4e43
96 changed files with 14790 additions and 111 deletions

View File

@@ -0,0 +1,33 @@
/**
* Port: IRaceResultsProvider
*
* Provider interface for race results data needed for rating calculations.
* This is an application layer port that bridges racing context to identity context.
*/
export interface RaceResultData {
userId: string;
startPos: number;
finishPos: number;
incidents: number;
status: 'finished' | 'dnf' | 'dns' | 'dsq' | 'afk';
sof?: number; // Optional strength of field
}
export interface RaceResultsData {
raceId: string;
results: RaceResultData[];
}
export interface IRaceResultsProvider {
/**
* Get race results by race ID
* Returns null if race not found or no results
*/
getRaceResults(raceId: string): Promise<RaceResultsData | null>;
/**
* Check if race results exist for a race
*/
hasRaceResults(raceId: string): Promise<boolean>;
}