Merge branch 'main' of https://git.ambigrat.com/shenyan/physical-expo
This commit is contained in:
110
types/api.ts
110
types/api.ts
@@ -52,10 +52,10 @@ export interface LiveScoreMatch {
|
||||
event_time: string;
|
||||
event_home_team: string;
|
||||
home_team_key: number;
|
||||
home_team_logo: string;
|
||||
home_team_logo: string | null;
|
||||
event_away_team: string;
|
||||
away_team_key: number;
|
||||
away_team_logo: string;
|
||||
away_team_logo: string | null;
|
||||
event_final_result: string;
|
||||
event_halftime_result: string;
|
||||
event_game_result?: string;
|
||||
@@ -69,14 +69,21 @@ export interface LiveScoreMatch {
|
||||
country_name: string;
|
||||
country_logo: string;
|
||||
event_country_key: number;
|
||||
event_quarter?: string;
|
||||
// Tennis specific
|
||||
event_first_player?: string;
|
||||
event_first_player_logo?: string;
|
||||
event_second_player?: string;
|
||||
event_second_player_logo?: string;
|
||||
event_serve?: string;
|
||||
pointbypoint?: any[];
|
||||
scores?: any[]; // LiveScoreMatch uses array for scores, Match uses string
|
||||
scores?:
|
||||
| any[]
|
||||
| {
|
||||
"1stQuarter"?: Array<{ score_home: string; score_away: string }>;
|
||||
"2ndQuarter"?: Array<{ score_home: string; score_away: string }>;
|
||||
"3rdQuarter"?: Array<{ score_home: string; score_away: string }>;
|
||||
"4thQuarter"?: Array<{ score_home: string; score_away: string }>;
|
||||
};
|
||||
goalscorers?: {
|
||||
time: string;
|
||||
home_scorer: string;
|
||||
@@ -113,7 +120,6 @@ export interface LiveScoreMatch {
|
||||
info_time: string;
|
||||
score: string;
|
||||
}[];
|
||||
lineups?: unknown;
|
||||
statistics?:
|
||||
| {
|
||||
type: string;
|
||||
@@ -142,7 +148,65 @@ export interface LiveScoreMatch {
|
||||
score: string;
|
||||
set_point: null | string;
|
||||
}[];
|
||||
}[];
|
||||
};
|
||||
lineups?: {
|
||||
home_team?: {
|
||||
starting_lineups?: Array<{ player: string; player_id: number }>;
|
||||
substitutes?: Array<{ player: string; player_id: number }>;
|
||||
};
|
||||
away_team?: {
|
||||
starting_lineups?: Array<{ player: string; player_id: number }>;
|
||||
substitutes?: Array<{ player: string; player_id: number }>;
|
||||
};
|
||||
};
|
||||
player_statistics?: {
|
||||
home_team?: Array<{
|
||||
player: string;
|
||||
player_id: number;
|
||||
player_position?: string;
|
||||
player_minutes?: string;
|
||||
player_points?: string;
|
||||
player_total_rebounds?: string;
|
||||
player_offence_rebounds?: string;
|
||||
player_defense_rebounds?: string;
|
||||
player_assists?: string;
|
||||
player_steals?: string;
|
||||
player_blocks?: string;
|
||||
player_turnovers?: string;
|
||||
player_personal_fouls?: string;
|
||||
player_plus_minus?: string;
|
||||
player_field_goals_made?: string;
|
||||
player_field_goals_attempts?: string;
|
||||
player_threepoint_goals_made?: string;
|
||||
player_threepoint_goals_attempts?: string;
|
||||
player_freethrows_goals_made?: string;
|
||||
player_freethrows_goals_attempts?: string;
|
||||
player_oncourt?: string | null;
|
||||
}>;
|
||||
away_team?: Array<{
|
||||
player: string;
|
||||
player_id: number;
|
||||
player_position?: string;
|
||||
player_minutes?: string;
|
||||
player_points?: string;
|
||||
player_total_rebounds?: string;
|
||||
player_offence_rebounds?: string;
|
||||
player_defense_rebounds?: string;
|
||||
player_assists?: string;
|
||||
player_steals?: string;
|
||||
player_blocks?: string;
|
||||
player_turnovers?: string;
|
||||
player_personal_fouls?: string;
|
||||
player_plus_minus?: string;
|
||||
player_field_goals_made?: string;
|
||||
player_field_goals_attempts?: string;
|
||||
player_threepoint_goals_made?: string;
|
||||
player_threepoint_goals_attempts?: string;
|
||||
player_freethrows_goals_made?: string;
|
||||
player_freethrows_goals_attempts?: string;
|
||||
player_oncourt?: string | null;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
@@ -238,6 +302,26 @@ export interface Player {
|
||||
number?: number | string;
|
||||
player_type?: string; // 位置/角色,例如 Goalkeepers
|
||||
position?: string; // 兜底位置字段
|
||||
// 篮球相关字段
|
||||
player_id?: number;
|
||||
player_points?: string;
|
||||
player_assists?: string;
|
||||
player_minutes?: string;
|
||||
player_blocks?: string;
|
||||
player_steals?: string;
|
||||
player_turnovers?: string;
|
||||
player_plus_minus?: string;
|
||||
player_personal_fouls?: string;
|
||||
player_total_rebounds?: string;
|
||||
player_defense_rebounds?: string;
|
||||
player_offence_rebounds?: string;
|
||||
player_field_goals_made?: string;
|
||||
player_field_goals_attempts?: string;
|
||||
player_freethrows_goals_made?: string;
|
||||
player_freethrows_goals_attempts?: string;
|
||||
player_threepoint_goals_made?: string;
|
||||
player_threepoint_goals_attempts?: string;
|
||||
player_oncourt?: string;
|
||||
}
|
||||
|
||||
export interface UpcomingMatch {
|
||||
@@ -337,7 +421,19 @@ export interface MatchDetailData {
|
||||
firstPlayerKey?: string;
|
||||
secondPlayerKey?: string;
|
||||
eventGameResult?: string;
|
||||
scores?: any[];
|
||||
scores?:
|
||||
| any[]
|
||||
| {
|
||||
"1stQuarter"?: Array<{ score_home: string; score_away: string }>;
|
||||
"2ndQuarter"?: Array<{ score_home: string; score_away: string }>;
|
||||
"3rdQuarter"?: Array<{ score_home: string; score_away: string }>;
|
||||
"4thQuarter"?: Array<{ score_home: string; score_away: string }>;
|
||||
};
|
||||
stats?: Array<{
|
||||
type: string;
|
||||
home: string;
|
||||
away: string;
|
||||
}>;
|
||||
events?: MatchEvents;
|
||||
players?: {
|
||||
home_team?: Player[];
|
||||
|
||||
Reference in New Issue
Block a user