@bp1222/stats-api 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +565 -0
- package/dist/index.d.ts +565 -0
- package/dist/index.js +1696 -0
- package/dist/index.mjs +1574 -0
- package/package.json +5 -4
- package/.github/workflows/publish.yaml +0 -24
- package/Makefile +0 -27
- package/openapitools.json +0 -17
- package/spec/components/parameters/parameters.yaml +0 -21
- package/spec/components/parameters/query/date.yaml +0 -5
- package/spec/components/parameters/query/endDate.yaml +0 -5
- package/spec/components/parameters/query/fields.yaml +0 -10
- package/spec/components/parameters/query/hydrate.yaml +0 -5
- package/spec/components/parameters/query/leagueId.yaml +0 -5
- package/spec/components/parameters/query/leagueIds.yaml +0 -7
- package/spec/components/parameters/query/season.yaml +0 -5
- package/spec/components/parameters/query/sportId.yaml +0 -6
- package/spec/components/parameters/query/startDate.yaml +0 -5
- package/spec/components/parameters/query/teamId.yaml +0 -5
- package/spec/components/schemas/division.yaml +0 -32
- package/spec/components/schemas/game.yaml +0 -153
- package/spec/components/schemas/gameTeam.yaml +0 -22
- package/spec/components/schemas/league.yaml +0 -62
- package/spec/components/schemas/leagueRecord.yaml +0 -15
- package/spec/components/schemas/record.yaml +0 -95
- package/spec/components/schemas/schedule.yaml +0 -41
- package/spec/components/schemas/schemas.yaml +0 -24
- package/spec/components/schemas/season.yaml +0 -53
- package/spec/components/schemas/sport.yaml +0 -21
- package/spec/components/schemas/standings.yaml +0 -24
- package/spec/components/schemas/team.yaml +0 -50
- package/spec/components/schemas/venue.yaml +0 -18
- package/spec/openapi.yaml +0 -32
- package/spec/paths/allSeasons.yaml +0 -23
- package/spec/paths/schedule.yaml +0 -20
- package/spec/paths/season.yaml +0 -18
- package/spec/paths/standings.yaml +0 -27
- package/spec/paths/teams.yaml +0 -33
- package/src/.openapi-generator/FILES +0 -25
- package/src/.openapi-generator/VERSION +0 -1
- package/src/.openapi-generator-ignore +0 -23
- package/src/apis/MlbApi.ts +0 -427
- package/src/apis/index.ts +0 -3
- package/src/index.ts +0 -5
- package/src/models/MLBDivision.ts +0 -164
- package/src/models/MLBGame.ts +0 -371
- package/src/models/MLBGameStatus.ts +0 -122
- package/src/models/MLBGameTeam.ts +0 -117
- package/src/models/MLBGameTeams.ts +0 -77
- package/src/models/MLBLeague.ts +0 -190
- package/src/models/MLBLeagueDates.ts +0 -132
- package/src/models/MLBLeagueRecord.ts +0 -87
- package/src/models/MLBRecord.ts +0 -337
- package/src/models/MLBSchedule.ts +0 -105
- package/src/models/MLBScheduleDay.ts +0 -108
- package/src/models/MLBScheduleDays.ts +0 -108
- package/src/models/MLBSeason.ts +0 -226
- package/src/models/MLBSeasons.ts +0 -67
- package/src/models/MLBSport.ts +0 -110
- package/src/models/MLBStandings.ts +0 -130
- package/src/models/MLBStandingsList.ts +0 -67
- package/src/models/MLBStreak.ts +0 -74
- package/src/models/MLBTeam.ts +0 -248
- package/src/models/MLBTeams.ts +0 -67
- package/src/models/MLBVenue.ts +0 -95
- package/src/models/index.ts +0 -22
- package/src/runtime.ts +0 -426
- package/tsconfig.json +0 -108
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
declare const BASE_PATH: string;
|
|
2
|
+
interface ConfigurationParameters {
|
|
3
|
+
basePath?: string;
|
|
4
|
+
fetchApi?: FetchAPI;
|
|
5
|
+
middleware?: Middleware[];
|
|
6
|
+
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
7
|
+
username?: string;
|
|
8
|
+
password?: string;
|
|
9
|
+
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>);
|
|
10
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
|
|
11
|
+
headers?: HTTPHeaders;
|
|
12
|
+
credentials?: RequestCredentials;
|
|
13
|
+
}
|
|
14
|
+
declare class Configuration {
|
|
15
|
+
private configuration;
|
|
16
|
+
constructor(configuration?: ConfigurationParameters);
|
|
17
|
+
set config(configuration: Configuration);
|
|
18
|
+
get basePath(): string;
|
|
19
|
+
get fetchApi(): FetchAPI | undefined;
|
|
20
|
+
get middleware(): Middleware[];
|
|
21
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
22
|
+
get username(): string | undefined;
|
|
23
|
+
get password(): string | undefined;
|
|
24
|
+
get apiKey(): ((name: string) => string | Promise<string>) | undefined;
|
|
25
|
+
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
26
|
+
get headers(): HTTPHeaders | undefined;
|
|
27
|
+
get credentials(): RequestCredentials | undefined;
|
|
28
|
+
}
|
|
29
|
+
declare const DefaultConfig: Configuration;
|
|
30
|
+
declare class BaseAPI {
|
|
31
|
+
protected configuration: Configuration;
|
|
32
|
+
private static readonly jsonRegex;
|
|
33
|
+
private middleware;
|
|
34
|
+
constructor(configuration?: Configuration);
|
|
35
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
36
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
37
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
38
|
+
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
39
|
+
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
40
|
+
private createFetchParams;
|
|
41
|
+
private fetchApi;
|
|
42
|
+
private clone;
|
|
43
|
+
}
|
|
44
|
+
declare class ResponseError extends Error {
|
|
45
|
+
response: Response;
|
|
46
|
+
name: "ResponseError";
|
|
47
|
+
constructor(response: Response, msg?: string);
|
|
48
|
+
}
|
|
49
|
+
declare class FetchError extends Error {
|
|
50
|
+
cause: Error;
|
|
51
|
+
name: "FetchError";
|
|
52
|
+
constructor(cause: Error, msg?: string);
|
|
53
|
+
}
|
|
54
|
+
declare class RequiredError extends Error {
|
|
55
|
+
field: string;
|
|
56
|
+
name: "RequiredError";
|
|
57
|
+
constructor(field: string, msg?: string);
|
|
58
|
+
}
|
|
59
|
+
declare const COLLECTION_FORMATS: {
|
|
60
|
+
csv: string;
|
|
61
|
+
ssv: string;
|
|
62
|
+
tsv: string;
|
|
63
|
+
pipes: string;
|
|
64
|
+
};
|
|
65
|
+
type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
66
|
+
type Json = any;
|
|
67
|
+
type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
68
|
+
type HTTPHeaders = {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
};
|
|
71
|
+
type HTTPQuery = {
|
|
72
|
+
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
73
|
+
};
|
|
74
|
+
type HTTPBody = Json | FormData | URLSearchParams;
|
|
75
|
+
type HTTPRequestInit = {
|
|
76
|
+
headers?: HTTPHeaders;
|
|
77
|
+
method: HTTPMethod;
|
|
78
|
+
credentials?: RequestCredentials;
|
|
79
|
+
body?: HTTPBody;
|
|
80
|
+
};
|
|
81
|
+
type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
82
|
+
type InitOverrideFunction = (requestContext: {
|
|
83
|
+
init: HTTPRequestInit;
|
|
84
|
+
context: RequestOpts;
|
|
85
|
+
}) => Promise<RequestInit>;
|
|
86
|
+
interface FetchParams {
|
|
87
|
+
url: string;
|
|
88
|
+
init: RequestInit;
|
|
89
|
+
}
|
|
90
|
+
interface RequestOpts {
|
|
91
|
+
path: string;
|
|
92
|
+
method: HTTPMethod;
|
|
93
|
+
headers: HTTPHeaders;
|
|
94
|
+
query?: HTTPQuery;
|
|
95
|
+
body?: HTTPBody;
|
|
96
|
+
}
|
|
97
|
+
declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
98
|
+
declare function mapValues(data: any, fn: (item: any) => any): {};
|
|
99
|
+
declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
100
|
+
interface Consume {
|
|
101
|
+
contentType: string;
|
|
102
|
+
}
|
|
103
|
+
interface RequestContext {
|
|
104
|
+
fetch: FetchAPI;
|
|
105
|
+
url: string;
|
|
106
|
+
init: RequestInit;
|
|
107
|
+
}
|
|
108
|
+
interface ResponseContext {
|
|
109
|
+
fetch: FetchAPI;
|
|
110
|
+
url: string;
|
|
111
|
+
init: RequestInit;
|
|
112
|
+
response: Response;
|
|
113
|
+
}
|
|
114
|
+
interface ErrorContext {
|
|
115
|
+
fetch: FetchAPI;
|
|
116
|
+
url: string;
|
|
117
|
+
init: RequestInit;
|
|
118
|
+
error: unknown;
|
|
119
|
+
response?: Response;
|
|
120
|
+
}
|
|
121
|
+
interface Middleware {
|
|
122
|
+
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
123
|
+
post?(context: ResponseContext): Promise<Response | void>;
|
|
124
|
+
onError?(context: ErrorContext): Promise<Response | void>;
|
|
125
|
+
}
|
|
126
|
+
interface ApiResponse<T> {
|
|
127
|
+
raw: Response;
|
|
128
|
+
value(): Promise<T>;
|
|
129
|
+
}
|
|
130
|
+
interface ResponseTransformer<T> {
|
|
131
|
+
(json: any): T;
|
|
132
|
+
}
|
|
133
|
+
declare class JSONApiResponse<T> {
|
|
134
|
+
raw: Response;
|
|
135
|
+
private transformer;
|
|
136
|
+
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
137
|
+
value(): Promise<T>;
|
|
138
|
+
}
|
|
139
|
+
declare class VoidApiResponse {
|
|
140
|
+
raw: Response;
|
|
141
|
+
constructor(raw: Response);
|
|
142
|
+
value(): Promise<void>;
|
|
143
|
+
}
|
|
144
|
+
declare class BlobApiResponse {
|
|
145
|
+
raw: Response;
|
|
146
|
+
constructor(raw: Response);
|
|
147
|
+
value(): Promise<Blob>;
|
|
148
|
+
}
|
|
149
|
+
declare class TextApiResponse {
|
|
150
|
+
raw: Response;
|
|
151
|
+
constructor(raw: Response);
|
|
152
|
+
value(): Promise<string>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
interface MLBLeagueDates {
|
|
156
|
+
seasonId?: string;
|
|
157
|
+
preSeasonStartDate?: string;
|
|
158
|
+
preSeasonEndDate?: string;
|
|
159
|
+
seasonStartDate?: string;
|
|
160
|
+
springStartDate?: string;
|
|
161
|
+
springEndDate?: string;
|
|
162
|
+
offseasonStartDate?: string;
|
|
163
|
+
offseasonEndDate?: string;
|
|
164
|
+
seasonLevelGamedayType?: string;
|
|
165
|
+
gameLevelGamedayType?: string;
|
|
166
|
+
}
|
|
167
|
+
declare function instanceOfMLBLeagueDates(value: object): value is MLBLeagueDates;
|
|
168
|
+
declare function MLBLeagueDatesFromJSON(json: any): MLBLeagueDates;
|
|
169
|
+
declare function MLBLeagueDatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBLeagueDates;
|
|
170
|
+
declare function MLBLeagueDatesToJSON(value?: MLBLeagueDates | null): any;
|
|
171
|
+
|
|
172
|
+
interface MLBLeague {
|
|
173
|
+
id: number;
|
|
174
|
+
name: string;
|
|
175
|
+
link?: string;
|
|
176
|
+
abbreviation?: string;
|
|
177
|
+
nameShort?: string;
|
|
178
|
+
seasonState?: string;
|
|
179
|
+
hasWildCard?: boolean;
|
|
180
|
+
hasSplitSeason?: boolean;
|
|
181
|
+
hasPlayoffPoints?: boolean;
|
|
182
|
+
seasonDateInfo?: MLBLeagueDates;
|
|
183
|
+
season?: string;
|
|
184
|
+
orgCode?: string;
|
|
185
|
+
conferencesInUse?: boolean;
|
|
186
|
+
divisionsInUse?: boolean;
|
|
187
|
+
sortOrder?: number;
|
|
188
|
+
active?: boolean;
|
|
189
|
+
}
|
|
190
|
+
declare function instanceOfMLBLeague(value: object): value is MLBLeague;
|
|
191
|
+
declare function MLBLeagueFromJSON(json: any): MLBLeague;
|
|
192
|
+
declare function MLBLeagueFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBLeague;
|
|
193
|
+
declare function MLBLeagueToJSON(value?: MLBLeague | null): any;
|
|
194
|
+
|
|
195
|
+
interface MLBSport {
|
|
196
|
+
id: number;
|
|
197
|
+
code?: string;
|
|
198
|
+
link?: string;
|
|
199
|
+
name?: string;
|
|
200
|
+
abbreviation?: string;
|
|
201
|
+
sortOrder?: number;
|
|
202
|
+
activeStatus?: boolean;
|
|
203
|
+
}
|
|
204
|
+
declare function instanceOfMLBSport(value: object): value is MLBSport;
|
|
205
|
+
declare function MLBSportFromJSON(json: any): MLBSport;
|
|
206
|
+
declare function MLBSportFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBSport;
|
|
207
|
+
declare function MLBSportToJSON(value?: MLBSport | null): any;
|
|
208
|
+
|
|
209
|
+
interface MLBDivision {
|
|
210
|
+
id: number;
|
|
211
|
+
name: string;
|
|
212
|
+
season?: string;
|
|
213
|
+
nameShort?: string;
|
|
214
|
+
link?: string;
|
|
215
|
+
abbreviation?: string;
|
|
216
|
+
league?: MLBLeague;
|
|
217
|
+
sport?: MLBSport;
|
|
218
|
+
hasWildcard?: boolean;
|
|
219
|
+
sortOrder?: number;
|
|
220
|
+
numPlayoffTeams?: number;
|
|
221
|
+
active?: boolean;
|
|
222
|
+
}
|
|
223
|
+
declare function instanceOfMLBDivision(value: object): value is MLBDivision;
|
|
224
|
+
declare function MLBDivisionFromJSON(json: any): MLBDivision;
|
|
225
|
+
declare function MLBDivisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBDivision;
|
|
226
|
+
declare function MLBDivisionToJSON(value?: MLBDivision | null): any;
|
|
227
|
+
|
|
228
|
+
interface MLBVenue {
|
|
229
|
+
id: number;
|
|
230
|
+
name: string;
|
|
231
|
+
link?: string;
|
|
232
|
+
active?: boolean;
|
|
233
|
+
season?: string;
|
|
234
|
+
}
|
|
235
|
+
declare function instanceOfMLBVenue(value: object): value is MLBVenue;
|
|
236
|
+
declare function MLBVenueFromJSON(json: any): MLBVenue;
|
|
237
|
+
declare function MLBVenueFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBVenue;
|
|
238
|
+
declare function MLBVenueToJSON(value?: MLBVenue | null): any;
|
|
239
|
+
|
|
240
|
+
interface MLBGameStatus {
|
|
241
|
+
abstractGameState?: string;
|
|
242
|
+
codedGameState?: MLBGameStatusCodedGameStateEnum;
|
|
243
|
+
detailedState?: string;
|
|
244
|
+
statusCode?: string;
|
|
245
|
+
startTimeTBD?: boolean;
|
|
246
|
+
abstractGameCode?: string;
|
|
247
|
+
}
|
|
248
|
+
declare const MLBGameStatusCodedGameStateEnum: {
|
|
249
|
+
readonly Final: "F";
|
|
250
|
+
readonly Postponed: "D";
|
|
251
|
+
readonly Scheduled: "S";
|
|
252
|
+
readonly InProgress: "I";
|
|
253
|
+
readonly Pregame: "P";
|
|
254
|
+
readonly GameOver: "O";
|
|
255
|
+
};
|
|
256
|
+
type MLBGameStatusCodedGameStateEnum = typeof MLBGameStatusCodedGameStateEnum[keyof typeof MLBGameStatusCodedGameStateEnum];
|
|
257
|
+
declare function instanceOfMLBGameStatus(value: object): value is MLBGameStatus;
|
|
258
|
+
declare function MLBGameStatusFromJSON(json: any): MLBGameStatus;
|
|
259
|
+
declare function MLBGameStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGameStatus;
|
|
260
|
+
declare function MLBGameStatusToJSON(value?: MLBGameStatus | null): any;
|
|
261
|
+
|
|
262
|
+
interface MLBTeam {
|
|
263
|
+
id: number;
|
|
264
|
+
name: string;
|
|
265
|
+
link?: string;
|
|
266
|
+
allStarStatus?: string;
|
|
267
|
+
season?: number;
|
|
268
|
+
venue?: MLBVenue;
|
|
269
|
+
springVenue?: MLBVenue;
|
|
270
|
+
teamCode?: string;
|
|
271
|
+
fileCode?: string;
|
|
272
|
+
abbreviation?: string;
|
|
273
|
+
teamName?: string;
|
|
274
|
+
locationName?: string;
|
|
275
|
+
firstYearOfPlay?: string;
|
|
276
|
+
league?: MLBLeague;
|
|
277
|
+
springLeague?: MLBLeague;
|
|
278
|
+
division?: MLBDivision;
|
|
279
|
+
sport?: MLBSport;
|
|
280
|
+
shortName?: string;
|
|
281
|
+
franchiseName?: string;
|
|
282
|
+
clubName?: string;
|
|
283
|
+
active?: boolean;
|
|
284
|
+
}
|
|
285
|
+
declare function instanceOfMLBTeam(value: object): value is MLBTeam;
|
|
286
|
+
declare function MLBTeamFromJSON(json: any): MLBTeam;
|
|
287
|
+
declare function MLBTeamFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBTeam;
|
|
288
|
+
declare function MLBTeamToJSON(value?: MLBTeam | null): any;
|
|
289
|
+
|
|
290
|
+
interface MLBLeagueRecord {
|
|
291
|
+
wins: number;
|
|
292
|
+
losses: number;
|
|
293
|
+
ties?: number;
|
|
294
|
+
pct: string;
|
|
295
|
+
}
|
|
296
|
+
declare function instanceOfMLBLeagueRecord(value: object): value is MLBLeagueRecord;
|
|
297
|
+
declare function MLBLeagueRecordFromJSON(json: any): MLBLeagueRecord;
|
|
298
|
+
declare function MLBLeagueRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBLeagueRecord;
|
|
299
|
+
declare function MLBLeagueRecordToJSON(value?: MLBLeagueRecord | null): any;
|
|
300
|
+
|
|
301
|
+
interface MLBGameTeam {
|
|
302
|
+
leagueRecord?: MLBLeagueRecord;
|
|
303
|
+
score: number;
|
|
304
|
+
team: MLBTeam;
|
|
305
|
+
isWinner: boolean;
|
|
306
|
+
splitSquad?: boolean;
|
|
307
|
+
seriesNumber?: number;
|
|
308
|
+
}
|
|
309
|
+
declare function instanceOfMLBGameTeam(value: object): value is MLBGameTeam;
|
|
310
|
+
declare function MLBGameTeamFromJSON(json: any): MLBGameTeam;
|
|
311
|
+
declare function MLBGameTeamFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGameTeam;
|
|
312
|
+
declare function MLBGameTeamToJSON(value?: MLBGameTeam | null): any;
|
|
313
|
+
|
|
314
|
+
interface MLBGameTeams {
|
|
315
|
+
away: MLBGameTeam;
|
|
316
|
+
home: MLBGameTeam;
|
|
317
|
+
}
|
|
318
|
+
declare function instanceOfMLBGameTeams(value: object): value is MLBGameTeams;
|
|
319
|
+
declare function MLBGameTeamsFromJSON(json: any): MLBGameTeams;
|
|
320
|
+
declare function MLBGameTeamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGameTeams;
|
|
321
|
+
declare function MLBGameTeamsToJSON(value?: MLBGameTeams | null): any;
|
|
322
|
+
|
|
323
|
+
interface MLBGame {
|
|
324
|
+
gamePk: number;
|
|
325
|
+
gameGuid: string;
|
|
326
|
+
link?: string;
|
|
327
|
+
gameType: MLBGameGameTypeEnum;
|
|
328
|
+
season: number;
|
|
329
|
+
gameDate: string;
|
|
330
|
+
officialDate: string;
|
|
331
|
+
rescheduledTo?: number;
|
|
332
|
+
rescheduledToDate?: string;
|
|
333
|
+
rescheduledFrom?: number;
|
|
334
|
+
rescheduledFromDate?: string;
|
|
335
|
+
status: MLBGameStatus;
|
|
336
|
+
teams: MLBGameTeams;
|
|
337
|
+
venue?: MLBVenue;
|
|
338
|
+
isTie?: boolean;
|
|
339
|
+
gameNumber: number;
|
|
340
|
+
publicFacing?: boolean;
|
|
341
|
+
doubleHeader?: string;
|
|
342
|
+
gamedayType?: string;
|
|
343
|
+
tiebreaker?: string;
|
|
344
|
+
calendarEventID?: string;
|
|
345
|
+
seasonDisplay?: string;
|
|
346
|
+
dayNight?: string;
|
|
347
|
+
description?: string;
|
|
348
|
+
scheduledInnings?: number;
|
|
349
|
+
reverseHomeAwayStatus?: boolean;
|
|
350
|
+
inningBreakLength?: number;
|
|
351
|
+
gamesInSeries: number;
|
|
352
|
+
seriesGameNumber: number;
|
|
353
|
+
seriesDescription?: string;
|
|
354
|
+
recordSource?: string;
|
|
355
|
+
ifNecessary?: string;
|
|
356
|
+
ifNecessaryDescription?: string;
|
|
357
|
+
}
|
|
358
|
+
declare const MLBGameGameTypeEnum: {
|
|
359
|
+
readonly Exhibition: "E";
|
|
360
|
+
readonly SpringTraining: "S";
|
|
361
|
+
readonly Regular: "R";
|
|
362
|
+
readonly WildCardSeries: "F";
|
|
363
|
+
readonly DivisionSeries: "D";
|
|
364
|
+
readonly LeagueChampionshipSeries: "L";
|
|
365
|
+
readonly WorldSeries: "W";
|
|
366
|
+
};
|
|
367
|
+
type MLBGameGameTypeEnum = typeof MLBGameGameTypeEnum[keyof typeof MLBGameGameTypeEnum];
|
|
368
|
+
declare function instanceOfMLBGame(value: object): value is MLBGame;
|
|
369
|
+
declare function MLBGameFromJSON(json: any): MLBGame;
|
|
370
|
+
declare function MLBGameFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGame;
|
|
371
|
+
declare function MLBGameToJSON(value?: MLBGame | null): any;
|
|
372
|
+
|
|
373
|
+
interface MLBStreak {
|
|
374
|
+
streakType?: MLBStreakStreakTypeEnum;
|
|
375
|
+
}
|
|
376
|
+
declare const MLBStreakStreakTypeEnum: {
|
|
377
|
+
readonly Losing: "losses";
|
|
378
|
+
readonly Winning: "wins";
|
|
379
|
+
};
|
|
380
|
+
type MLBStreakStreakTypeEnum = typeof MLBStreakStreakTypeEnum[keyof typeof MLBStreakStreakTypeEnum];
|
|
381
|
+
declare function instanceOfMLBStreak(value: object): value is MLBStreak;
|
|
382
|
+
declare function MLBStreakFromJSON(json: any): MLBStreak;
|
|
383
|
+
declare function MLBStreakFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBStreak;
|
|
384
|
+
declare function MLBStreakToJSON(value?: MLBStreak | null): any;
|
|
385
|
+
|
|
386
|
+
interface MLBRecord {
|
|
387
|
+
team: MLBTeam;
|
|
388
|
+
season: string;
|
|
389
|
+
streak: MLBStreak;
|
|
390
|
+
divisionRank: string;
|
|
391
|
+
leagueRank: string;
|
|
392
|
+
sportRank?: string;
|
|
393
|
+
gamesPlayed?: number;
|
|
394
|
+
gamesBack: string;
|
|
395
|
+
wildCardGamesBack?: string;
|
|
396
|
+
leagueGamesBack?: string;
|
|
397
|
+
sportGamesBack?: string;
|
|
398
|
+
divisionGamesBack?: string;
|
|
399
|
+
conferenceGamesBack?: string;
|
|
400
|
+
leagueRecord: MLBLeagueRecord;
|
|
401
|
+
lastUpdated?: string;
|
|
402
|
+
runsAllowed?: number;
|
|
403
|
+
runsScored?: number;
|
|
404
|
+
divisionChamp?: boolean;
|
|
405
|
+
divisionLeader?: boolean;
|
|
406
|
+
hasWildcard?: boolean;
|
|
407
|
+
clinched?: boolean;
|
|
408
|
+
eliminationNumber?: string;
|
|
409
|
+
eliminationNumberSport?: string;
|
|
410
|
+
eliminationNumberLeague?: string;
|
|
411
|
+
eliminationNumberDivision?: string;
|
|
412
|
+
eliminationNumberConference?: string;
|
|
413
|
+
wildCardEliminationNumber?: string;
|
|
414
|
+
magicNumber?: string;
|
|
415
|
+
wins: number;
|
|
416
|
+
losses: number;
|
|
417
|
+
runDifferential?: number;
|
|
418
|
+
winningPercentage?: string;
|
|
419
|
+
}
|
|
420
|
+
declare function instanceOfMLBRecord(value: object): value is MLBRecord;
|
|
421
|
+
declare function MLBRecordFromJSON(json: any): MLBRecord;
|
|
422
|
+
declare function MLBRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBRecord;
|
|
423
|
+
declare function MLBRecordToJSON(value?: MLBRecord | null): any;
|
|
424
|
+
|
|
425
|
+
interface MLBScheduleDay {
|
|
426
|
+
date?: string;
|
|
427
|
+
totalItems?: number;
|
|
428
|
+
totalEvents?: number;
|
|
429
|
+
totalGames?: number;
|
|
430
|
+
totalGamesInProgress?: number;
|
|
431
|
+
games: Array<MLBGame>;
|
|
432
|
+
}
|
|
433
|
+
declare function instanceOfMLBScheduleDay(value: object): value is MLBScheduleDay;
|
|
434
|
+
declare function MLBScheduleDayFromJSON(json: any): MLBScheduleDay;
|
|
435
|
+
declare function MLBScheduleDayFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBScheduleDay;
|
|
436
|
+
declare function MLBScheduleDayToJSON(value?: MLBScheduleDay | null): any;
|
|
437
|
+
|
|
438
|
+
interface MLBSchedule {
|
|
439
|
+
totalItems: number;
|
|
440
|
+
totalEvents: number;
|
|
441
|
+
totalGames: number;
|
|
442
|
+
totalGamesInProgress: number;
|
|
443
|
+
dates: Array<MLBScheduleDay>;
|
|
444
|
+
}
|
|
445
|
+
declare function instanceOfMLBSchedule(value: object): value is MLBSchedule;
|
|
446
|
+
declare function MLBScheduleFromJSON(json: any): MLBSchedule;
|
|
447
|
+
declare function MLBScheduleFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBSchedule;
|
|
448
|
+
declare function MLBScheduleToJSON(value?: MLBSchedule | null): any;
|
|
449
|
+
|
|
450
|
+
interface MLBSeason {
|
|
451
|
+
seasonId: string;
|
|
452
|
+
hasWildcard?: boolean;
|
|
453
|
+
preSeasonStartDate?: string;
|
|
454
|
+
preSeasonEndDate?: string;
|
|
455
|
+
seasonStartDate: string;
|
|
456
|
+
seasonEndDate: string;
|
|
457
|
+
springStartDate?: string;
|
|
458
|
+
springEndDate?: string;
|
|
459
|
+
regularSeasonStartDate: string;
|
|
460
|
+
lastDate1stHalf?: string;
|
|
461
|
+
allStartDate?: string;
|
|
462
|
+
firstDate2ndHalf?: string;
|
|
463
|
+
regularSeasonEndDate: string;
|
|
464
|
+
postSeasonStartDate?: string;
|
|
465
|
+
postSeasonEndDate?: string;
|
|
466
|
+
offSeasonStartDate?: string;
|
|
467
|
+
offSeasonEndDate?: string;
|
|
468
|
+
seasonLevelGamedayType?: string;
|
|
469
|
+
gameLevelGamedayType?: string;
|
|
470
|
+
qualifierPlateAppearances?: number;
|
|
471
|
+
qualifierOutsPitched?: number;
|
|
472
|
+
}
|
|
473
|
+
declare function instanceOfMLBSeason(value: object): value is MLBSeason;
|
|
474
|
+
declare function MLBSeasonFromJSON(json: any): MLBSeason;
|
|
475
|
+
declare function MLBSeasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBSeason;
|
|
476
|
+
declare function MLBSeasonToJSON(value?: MLBSeason | null): any;
|
|
477
|
+
|
|
478
|
+
interface MLBSeasons {
|
|
479
|
+
seasons?: Array<MLBSeason>;
|
|
480
|
+
}
|
|
481
|
+
declare function instanceOfMLBSeasons(value: object): value is MLBSeasons;
|
|
482
|
+
declare function MLBSeasonsFromJSON(json: any): MLBSeasons;
|
|
483
|
+
declare function MLBSeasonsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBSeasons;
|
|
484
|
+
declare function MLBSeasonsToJSON(value?: MLBSeasons | null): any;
|
|
485
|
+
|
|
486
|
+
interface MLBStandings {
|
|
487
|
+
standingsType?: string;
|
|
488
|
+
league: MLBLeague;
|
|
489
|
+
division: MLBDivision;
|
|
490
|
+
sport: MLBSport;
|
|
491
|
+
lastUpdated?: string;
|
|
492
|
+
teamRecords: Array<MLBRecord>;
|
|
493
|
+
}
|
|
494
|
+
declare function instanceOfMLBStandings(value: object): value is MLBStandings;
|
|
495
|
+
declare function MLBStandingsFromJSON(json: any): MLBStandings;
|
|
496
|
+
declare function MLBStandingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBStandings;
|
|
497
|
+
declare function MLBStandingsToJSON(value?: MLBStandings | null): any;
|
|
498
|
+
|
|
499
|
+
interface MLBStandingsList {
|
|
500
|
+
records?: Array<MLBStandings>;
|
|
501
|
+
}
|
|
502
|
+
declare function instanceOfMLBStandingsList(value: object): value is MLBStandingsList;
|
|
503
|
+
declare function MLBStandingsListFromJSON(json: any): MLBStandingsList;
|
|
504
|
+
declare function MLBStandingsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBStandingsList;
|
|
505
|
+
declare function MLBStandingsListToJSON(value?: MLBStandingsList | null): any;
|
|
506
|
+
|
|
507
|
+
interface MLBTeams {
|
|
508
|
+
teams?: Array<MLBTeam>;
|
|
509
|
+
}
|
|
510
|
+
declare function instanceOfMLBTeams(value: object): value is MLBTeams;
|
|
511
|
+
declare function MLBTeamsFromJSON(json: any): MLBTeams;
|
|
512
|
+
declare function MLBTeamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBTeams;
|
|
513
|
+
declare function MLBTeamsToJSON(value?: MLBTeams | null): any;
|
|
514
|
+
|
|
515
|
+
interface GetAllSeasonsRequest {
|
|
516
|
+
sportId: number;
|
|
517
|
+
}
|
|
518
|
+
interface GetScheduleRequest {
|
|
519
|
+
sportId: number;
|
|
520
|
+
teamId?: number;
|
|
521
|
+
startDate?: string;
|
|
522
|
+
endDate?: string;
|
|
523
|
+
}
|
|
524
|
+
interface GetSeasonRequest {
|
|
525
|
+
sportId: number;
|
|
526
|
+
season: string;
|
|
527
|
+
}
|
|
528
|
+
interface GetStandingsRequest {
|
|
529
|
+
leagueId: number;
|
|
530
|
+
season: string;
|
|
531
|
+
date?: string;
|
|
532
|
+
fields?: Array<string>;
|
|
533
|
+
hydrate?: string;
|
|
534
|
+
}
|
|
535
|
+
interface GetTeamsRequest {
|
|
536
|
+
sportId: number;
|
|
537
|
+
season: string;
|
|
538
|
+
leagueIds?: Array<number>;
|
|
539
|
+
}
|
|
540
|
+
interface MlbApiInterface {
|
|
541
|
+
getAllSeasonsRaw(requestParameters: GetAllSeasonsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBSeasons>>;
|
|
542
|
+
getAllSeasons(requestParameters: GetAllSeasonsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBSeasons>;
|
|
543
|
+
getScheduleRaw(requestParameters: GetScheduleRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBSchedule>>;
|
|
544
|
+
getSchedule(requestParameters: GetScheduleRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBSchedule>;
|
|
545
|
+
getSeasonRaw(requestParameters: GetSeasonRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBSeasons>>;
|
|
546
|
+
getSeason(requestParameters: GetSeasonRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBSeasons>;
|
|
547
|
+
getStandingsRaw(requestParameters: GetStandingsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBStandingsList>>;
|
|
548
|
+
getStandings(requestParameters: GetStandingsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBStandingsList>;
|
|
549
|
+
getTeamsRaw(requestParameters: GetTeamsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBTeams>>;
|
|
550
|
+
getTeams(requestParameters: GetTeamsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBTeams>;
|
|
551
|
+
}
|
|
552
|
+
declare class MlbApi extends BaseAPI implements MlbApiInterface {
|
|
553
|
+
getAllSeasonsRaw(requestParameters: GetAllSeasonsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBSeasons>>;
|
|
554
|
+
getAllSeasons(requestParameters: GetAllSeasonsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBSeasons>;
|
|
555
|
+
getScheduleRaw(requestParameters: GetScheduleRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBSchedule>>;
|
|
556
|
+
getSchedule(requestParameters: GetScheduleRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBSchedule>;
|
|
557
|
+
getSeasonRaw(requestParameters: GetSeasonRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBSeasons>>;
|
|
558
|
+
getSeason(requestParameters: GetSeasonRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBSeasons>;
|
|
559
|
+
getStandingsRaw(requestParameters: GetStandingsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBStandingsList>>;
|
|
560
|
+
getStandings(requestParameters: GetStandingsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBStandingsList>;
|
|
561
|
+
getTeamsRaw(requestParameters: GetTeamsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<MLBTeams>>;
|
|
562
|
+
getTeams(requestParameters: GetTeamsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<MLBTeams>;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export { type ApiResponse, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, type ConfigurationParameters, type Consume, DefaultConfig, type ErrorContext, type FetchAPI, FetchError, type FetchParams, type GetAllSeasonsRequest, type GetScheduleRequest, type GetSeasonRequest, type GetStandingsRequest, type GetTeamsRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type InitOverrideFunction, JSONApiResponse, type Json, type MLBDivision, MLBDivisionFromJSON, MLBDivisionFromJSONTyped, MLBDivisionToJSON, type MLBGame, MLBGameFromJSON, MLBGameFromJSONTyped, MLBGameGameTypeEnum, type MLBGameStatus, MLBGameStatusCodedGameStateEnum, MLBGameStatusFromJSON, MLBGameStatusFromJSONTyped, MLBGameStatusToJSON, type MLBGameTeam, MLBGameTeamFromJSON, MLBGameTeamFromJSONTyped, MLBGameTeamToJSON, type MLBGameTeams, MLBGameTeamsFromJSON, MLBGameTeamsFromJSONTyped, MLBGameTeamsToJSON, MLBGameToJSON, type MLBLeague, type MLBLeagueDates, MLBLeagueDatesFromJSON, MLBLeagueDatesFromJSONTyped, MLBLeagueDatesToJSON, MLBLeagueFromJSON, MLBLeagueFromJSONTyped, type MLBLeagueRecord, MLBLeagueRecordFromJSON, MLBLeagueRecordFromJSONTyped, MLBLeagueRecordToJSON, MLBLeagueToJSON, type MLBRecord, MLBRecordFromJSON, MLBRecordFromJSONTyped, MLBRecordToJSON, type MLBSchedule, type MLBScheduleDay, MLBScheduleDayFromJSON, MLBScheduleDayFromJSONTyped, MLBScheduleDayToJSON, MLBScheduleFromJSON, MLBScheduleFromJSONTyped, MLBScheduleToJSON, type MLBSeason, MLBSeasonFromJSON, MLBSeasonFromJSONTyped, MLBSeasonToJSON, type MLBSeasons, MLBSeasonsFromJSON, MLBSeasonsFromJSONTyped, MLBSeasonsToJSON, type MLBSport, MLBSportFromJSON, MLBSportFromJSONTyped, MLBSportToJSON, type MLBStandings, MLBStandingsFromJSON, MLBStandingsFromJSONTyped, type MLBStandingsList, MLBStandingsListFromJSON, MLBStandingsListFromJSONTyped, MLBStandingsListToJSON, MLBStandingsToJSON, type MLBStreak, MLBStreakFromJSON, MLBStreakFromJSONTyped, MLBStreakStreakTypeEnum, MLBStreakToJSON, type MLBTeam, MLBTeamFromJSON, MLBTeamFromJSONTyped, MLBTeamToJSON, type MLBTeams, MLBTeamsFromJSON, MLBTeamsFromJSONTyped, MLBTeamsToJSON, type MLBVenue, MLBVenueFromJSON, MLBVenueFromJSONTyped, MLBVenueToJSON, type Middleware, MlbApi, type MlbApiInterface, type ModelPropertyNaming, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, TextApiResponse, VoidApiResponse, canConsumeForm, instanceOfMLBDivision, instanceOfMLBGame, instanceOfMLBGameStatus, instanceOfMLBGameTeam, instanceOfMLBGameTeams, instanceOfMLBLeague, instanceOfMLBLeagueDates, instanceOfMLBLeagueRecord, instanceOfMLBRecord, instanceOfMLBSchedule, instanceOfMLBScheduleDay, instanceOfMLBSeason, instanceOfMLBSeasons, instanceOfMLBSport, instanceOfMLBStandings, instanceOfMLBStandingsList, instanceOfMLBStreak, instanceOfMLBTeam, instanceOfMLBTeams, instanceOfMLBVenue, mapValues, querystring };
|