This commit is contained in:
@@ -62,6 +62,9 @@ export interface MatchResponseDto {
|
||||
status: MatchStatus;
|
||||
state?: string;
|
||||
|
||||
homeTeamId?: string;
|
||||
awayTeamId?: string;
|
||||
|
||||
// Scores
|
||||
scoreHome?: number;
|
||||
scoreAway?: number;
|
||||
@@ -118,11 +121,55 @@ export interface MatchResponseDto {
|
||||
// Match detail enrichments
|
||||
refereeName?: string;
|
||||
sidelined?: Record<string, unknown>;
|
||||
events?: Array<Record<string, unknown>>;
|
||||
events?: MatchEvent[];
|
||||
playerEvents?: MatchEvent[];
|
||||
|
||||
// Additional fields from backend detail endpoint
|
||||
lineupSource?: string;
|
||||
stats?: Record<string, unknown>;
|
||||
stats?: {
|
||||
home?: TeamStats;
|
||||
away?: TeamStats;
|
||||
};
|
||||
footballTeamStats?: TeamStats[];
|
||||
officials?: MatchOfficial[];
|
||||
winner?: string;
|
||||
}
|
||||
|
||||
export interface MatchEvent {
|
||||
id: number;
|
||||
playerId?: string;
|
||||
teamId?: string;
|
||||
eventType: "goal" | "card" | "substitute" | string;
|
||||
eventSubtype?: string | null;
|
||||
timeMinute: string;
|
||||
timeSeconds?: number | null;
|
||||
periodId?: number;
|
||||
assistPlayerId?: string | null;
|
||||
scoreAfter?: string | null;
|
||||
playerOutId?: string | null;
|
||||
position?: "home" | "away" | string;
|
||||
player?: { id: string; name: string };
|
||||
assistPlayer?: { id: string; name: string } | null;
|
||||
substitutedOut?: { id: string; name: string } | null;
|
||||
}
|
||||
|
||||
export interface TeamStats {
|
||||
id?: number;
|
||||
teamId?: string;
|
||||
possessionPercentage?: number | null;
|
||||
shotsOnTarget?: number | null;
|
||||
shotsOffTarget?: number | null;
|
||||
totalShots?: number | null;
|
||||
totalPasses?: number | null;
|
||||
corners?: number | null;
|
||||
fouls?: number | null;
|
||||
offsides?: number | null;
|
||||
}
|
||||
|
||||
export interface MatchOfficial {
|
||||
id: number;
|
||||
name: string;
|
||||
roleId: number;
|
||||
}
|
||||
|
||||
export interface ActiveLeagueDto {
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
|
||||
const getPrediction = (matchId: string) => {
|
||||
return apiRequest<ApiResponse<MatchPredictionDto>>({
|
||||
url: `/predictions/${matchId}`,
|
||||
url: `/predictions/${matchId}?nocache=true`,
|
||||
client: "core",
|
||||
method: "get",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user