190 lines
3.3 KiB
TypeScript
190 lines
3.3 KiB
TypeScript
// Generated by https://jsonformatter.org/json-to-typescript for Bundesliga api
|
|
export default interface Bundesliga {
|
|
match_day_uid: string;
|
|
agent: Agent;
|
|
offerings: Offerings;
|
|
transaction: Transaction;
|
|
squad: Checkups;
|
|
checkups: Checkups;
|
|
filter_data: FilterData;
|
|
opening_hour: OpeningHour;
|
|
}
|
|
|
|
export interface Agent {
|
|
budget: number;
|
|
transfers_left: number;
|
|
bonus_transfers_left: number;
|
|
first_transaction: boolean;
|
|
pending: boolean;
|
|
}
|
|
|
|
export interface Checkups {
|
|
items: CheckupsItem[];
|
|
}
|
|
|
|
export interface CheckupsItem {
|
|
key: string;
|
|
args: ItemArgs;
|
|
}
|
|
|
|
export interface ItemArgs {
|
|
position: Position;
|
|
current: number | null;
|
|
minimal: number;
|
|
maximum: number;
|
|
}
|
|
|
|
export enum Position {
|
|
All = "all",
|
|
Att = "att",
|
|
Def = "def",
|
|
Gk = "gk",
|
|
Mid = "mid",
|
|
}
|
|
|
|
export interface FilterData {
|
|
selectable_teams: SelectableTeam[];
|
|
selectable_positions: Position[];
|
|
selectable_statistics: string[];
|
|
min_price: number;
|
|
max_price: number;
|
|
}
|
|
|
|
export interface SelectableTeam {
|
|
uid: string;
|
|
team_code: string;
|
|
eliminated: boolean;
|
|
image_urls: ImageUrls;
|
|
}
|
|
|
|
export interface ImageUrls {
|
|
default: Default;
|
|
}
|
|
|
|
export interface Default {
|
|
default: string;
|
|
"1x": string;
|
|
"2x": string;
|
|
"3x": string;
|
|
}
|
|
|
|
export interface Offerings {
|
|
offset: number;
|
|
per_page: number;
|
|
total_offerings: number;
|
|
sorted_by: string;
|
|
items: OfferingsItem[];
|
|
}
|
|
|
|
export interface OfferingsItem {
|
|
buyable: boolean;
|
|
active: boolean;
|
|
interactive: boolean;
|
|
denials_for_buying: unknown[];
|
|
transfer_value: number;
|
|
favorite: boolean;
|
|
player: Player;
|
|
attendance: Attendance;
|
|
}
|
|
|
|
export interface Attendance {
|
|
forecast: Forecast;
|
|
details: Detail[];
|
|
}
|
|
|
|
export interface Detail {
|
|
key: Key;
|
|
args: DetailArgs;
|
|
}
|
|
|
|
export interface DetailArgs {
|
|
state: Forecast;
|
|
}
|
|
|
|
export enum Key {
|
|
InitialStateInSquad = "initial_state_in_squad",
|
|
Injured = "injured",
|
|
}
|
|
|
|
export enum Forecast {
|
|
Attending = "attending",
|
|
Missing = "missing",
|
|
Unknown = "unknown",
|
|
}
|
|
|
|
export interface Player {
|
|
uid: string;
|
|
external_uid: string;
|
|
transfer_value: number;
|
|
statistics: Statistics;
|
|
statistics_path: string;
|
|
image_urls: Default;
|
|
nickname: string;
|
|
positions: Position[];
|
|
is_locked: boolean;
|
|
is_eliminated: boolean;
|
|
is_available: boolean;
|
|
match_starts_in: number;
|
|
total_scores: TotalScores;
|
|
team: Team;
|
|
next_opponent: NextOpponent;
|
|
past_attendances: unknown[];
|
|
}
|
|
|
|
export interface NextOpponent {
|
|
team_code: string;
|
|
match_venue: MatchVenue;
|
|
home_score: number;
|
|
away_score: number;
|
|
starts_at: Date;
|
|
}
|
|
|
|
export enum MatchVenue {
|
|
Away = "away",
|
|
Home = "home",
|
|
}
|
|
|
|
export interface Statistics {
|
|
total_points: number;
|
|
average_points: number;
|
|
best_value_rank: number;
|
|
form: number;
|
|
popularity: number;
|
|
last_match_points: number;
|
|
last_season_points: number;
|
|
}
|
|
|
|
export interface Team {
|
|
uid: string;
|
|
team_code: string;
|
|
image_urls: Default;
|
|
}
|
|
|
|
export interface TotalScores {
|
|
att: number;
|
|
def: number;
|
|
mid: number;
|
|
gk: number;
|
|
}
|
|
|
|
export interface OpeningHour {
|
|
opened: boolean;
|
|
countdown: number;
|
|
}
|
|
|
|
export interface Transaction {
|
|
pending: boolean;
|
|
first_transaction: boolean;
|
|
commit_denials: CommitDenial[];
|
|
}
|
|
|
|
export interface CommitDenial {
|
|
reason: string;
|
|
args: CommitDenialArgs;
|
|
}
|
|
|
|
export interface CommitDenialArgs {
|
|
squad_size?: number;
|
|
missing?: number;
|
|
position?: Position;
|
|
}
|