@bp1222/stats-api 0.1.8 → 0.2.0

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.mjs CHANGED
@@ -335,14 +335,14 @@ var TextApiResponse = class {
335
335
  }
336
336
  };
337
337
 
338
- // src/models/MLBLeagueDates.ts
339
- function instanceOfMLBLeagueDates(value) {
338
+ // src/models/LeagueDates.ts
339
+ function instanceOfLeagueDates(value) {
340
340
  return true;
341
341
  }
342
- function MLBLeagueDatesFromJSON(json) {
343
- return MLBLeagueDatesFromJSONTyped(json, false);
342
+ function LeagueDatesFromJSON(json) {
343
+ return LeagueDatesFromJSONTyped(json, false);
344
344
  }
345
- function MLBLeagueDatesFromJSONTyped(json, ignoreDiscriminator) {
345
+ function LeagueDatesFromJSONTyped(json, ignoreDiscriminator) {
346
346
  if (json == null) {
347
347
  return json;
348
348
  }
@@ -359,7 +359,7 @@ function MLBLeagueDatesFromJSONTyped(json, ignoreDiscriminator) {
359
359
  "gameLevelGamedayType": json["gameLevelGamedayType"] == null ? void 0 : json["gameLevelGamedayType"]
360
360
  };
361
361
  }
362
- function MLBLeagueDatesToJSON(value) {
362
+ function LeagueDatesToJSON(value) {
363
363
  if (value == null) {
364
364
  return value;
365
365
  }
@@ -377,16 +377,16 @@ function MLBLeagueDatesToJSON(value) {
377
377
  };
378
378
  }
379
379
 
380
- // src/models/MLBLeague.ts
381
- function instanceOfMLBLeague(value) {
380
+ // src/models/League.ts
381
+ function instanceOfLeague(value) {
382
382
  if (!("id" in value) || value["id"] === void 0) return false;
383
383
  if (!("name" in value) || value["name"] === void 0) return false;
384
384
  return true;
385
385
  }
386
- function MLBLeagueFromJSON(json) {
387
- return MLBLeagueFromJSONTyped(json, false);
386
+ function LeagueFromJSON(json) {
387
+ return LeagueFromJSONTyped(json, false);
388
388
  }
389
- function MLBLeagueFromJSONTyped(json, ignoreDiscriminator) {
389
+ function LeagueFromJSONTyped(json, ignoreDiscriminator) {
390
390
  if (json == null) {
391
391
  return json;
392
392
  }
@@ -400,7 +400,7 @@ function MLBLeagueFromJSONTyped(json, ignoreDiscriminator) {
400
400
  "hasWildCard": json["hasWildCard"] == null ? void 0 : json["hasWildCard"],
401
401
  "hasSplitSeason": json["hasSplitSeason"] == null ? void 0 : json["hasSplitSeason"],
402
402
  "hasPlayoffPoints": json["hasPlayoffPoints"] == null ? void 0 : json["hasPlayoffPoints"],
403
- "seasonDateInfo": json["seasonDateInfo"] == null ? void 0 : MLBLeagueDatesFromJSON(json["seasonDateInfo"]),
403
+ "seasonDateInfo": json["seasonDateInfo"] == null ? void 0 : LeagueDatesFromJSON(json["seasonDateInfo"]),
404
404
  "season": json["season"] == null ? void 0 : json["season"],
405
405
  "orgCode": json["orgCode"] == null ? void 0 : json["orgCode"],
406
406
  "conferencesInUse": json["conferencesInUse"] == null ? void 0 : json["conferencesInUse"],
@@ -409,7 +409,7 @@ function MLBLeagueFromJSONTyped(json, ignoreDiscriminator) {
409
409
  "active": json["active"] == null ? void 0 : json["active"]
410
410
  };
411
411
  }
412
- function MLBLeagueToJSON(value) {
412
+ function LeagueToJSON(value) {
413
413
  if (value == null) {
414
414
  return value;
415
415
  }
@@ -423,7 +423,7 @@ function MLBLeagueToJSON(value) {
423
423
  "hasWildCard": value["hasWildCard"],
424
424
  "hasSplitSeason": value["hasSplitSeason"],
425
425
  "hasPlayoffPoints": value["hasPlayoffPoints"],
426
- "seasonDateInfo": MLBLeagueDatesToJSON(value["seasonDateInfo"]),
426
+ "seasonDateInfo": LeagueDatesToJSON(value["seasonDateInfo"]),
427
427
  "season": value["season"],
428
428
  "orgCode": value["orgCode"],
429
429
  "conferencesInUse": value["conferencesInUse"],
@@ -433,15 +433,15 @@ function MLBLeagueToJSON(value) {
433
433
  };
434
434
  }
435
435
 
436
- // src/models/MLBSport.ts
437
- function instanceOfMLBSport(value) {
436
+ // src/models/Sport.ts
437
+ function instanceOfSport(value) {
438
438
  if (!("id" in value) || value["id"] === void 0) return false;
439
439
  return true;
440
440
  }
441
- function MLBSportFromJSON(json) {
442
- return MLBSportFromJSONTyped(json, false);
441
+ function SportFromJSON(json) {
442
+ return SportFromJSONTyped(json, false);
443
443
  }
444
- function MLBSportFromJSONTyped(json, ignoreDiscriminator) {
444
+ function SportFromJSONTyped(json, ignoreDiscriminator) {
445
445
  if (json == null) {
446
446
  return json;
447
447
  }
@@ -455,7 +455,7 @@ function MLBSportFromJSONTyped(json, ignoreDiscriminator) {
455
455
  "activeStatus": json["activeStatus"] == null ? void 0 : json["activeStatus"]
456
456
  };
457
457
  }
458
- function MLBSportToJSON(value) {
458
+ function SportToJSON(value) {
459
459
  if (value == null) {
460
460
  return value;
461
461
  }
@@ -470,16 +470,16 @@ function MLBSportToJSON(value) {
470
470
  };
471
471
  }
472
472
 
473
- // src/models/MLBDivision.ts
474
- function instanceOfMLBDivision(value) {
473
+ // src/models/Division.ts
474
+ function instanceOfDivision(value) {
475
475
  if (!("id" in value) || value["id"] === void 0) return false;
476
476
  if (!("name" in value) || value["name"] === void 0) return false;
477
477
  return true;
478
478
  }
479
- function MLBDivisionFromJSON(json) {
480
- return MLBDivisionFromJSONTyped(json, false);
479
+ function DivisionFromJSON(json) {
480
+ return DivisionFromJSONTyped(json, false);
481
481
  }
482
- function MLBDivisionFromJSONTyped(json, ignoreDiscriminator) {
482
+ function DivisionFromJSONTyped(json, ignoreDiscriminator) {
483
483
  if (json == null) {
484
484
  return json;
485
485
  }
@@ -490,15 +490,15 @@ function MLBDivisionFromJSONTyped(json, ignoreDiscriminator) {
490
490
  "nameShort": json["nameShort"] == null ? void 0 : json["nameShort"],
491
491
  "link": json["link"] == null ? void 0 : json["link"],
492
492
  "abbreviation": json["abbreviation"] == null ? void 0 : json["abbreviation"],
493
- "league": json["league"] == null ? void 0 : MLBLeagueFromJSON(json["league"]),
494
- "sport": json["sport"] == null ? void 0 : MLBSportFromJSON(json["sport"]),
493
+ "league": json["league"] == null ? void 0 : LeagueFromJSON(json["league"]),
494
+ "sport": json["sport"] == null ? void 0 : SportFromJSON(json["sport"]),
495
495
  "hasWildcard": json["hasWildcard"] == null ? void 0 : json["hasWildcard"],
496
496
  "sortOrder": json["sortOrder"] == null ? void 0 : json["sortOrder"],
497
497
  "numPlayoffTeams": json["numPlayoffTeams"] == null ? void 0 : json["numPlayoffTeams"],
498
498
  "active": json["active"] == null ? void 0 : json["active"]
499
499
  };
500
500
  }
501
- function MLBDivisionToJSON(value) {
501
+ function DivisionToJSON(value) {
502
502
  if (value == null) {
503
503
  return value;
504
504
  }
@@ -509,8 +509,8 @@ function MLBDivisionToJSON(value) {
509
509
  "nameShort": value["nameShort"],
510
510
  "link": value["link"],
511
511
  "abbreviation": value["abbreviation"],
512
- "league": MLBLeagueToJSON(value["league"]),
513
- "sport": MLBSportToJSON(value["sport"]),
512
+ "league": LeagueToJSON(value["league"]),
513
+ "sport": SportToJSON(value["sport"]),
514
514
  "hasWildcard": value["hasWildcard"],
515
515
  "sortOrder": value["sortOrder"],
516
516
  "numPlayoffTeams": value["numPlayoffTeams"],
@@ -518,92 +518,78 @@ function MLBDivisionToJSON(value) {
518
518
  };
519
519
  }
520
520
 
521
- // src/models/MLBVenue.ts
522
- function instanceOfMLBVenue(value) {
523
- if (!("id" in value) || value["id"] === void 0) return false;
524
- if (!("name" in value) || value["name"] === void 0) return false;
521
+ // src/models/Streak.ts
522
+ var StreakStreakTypeEnum = {
523
+ Losing: "losses",
524
+ Winning: "wins"
525
+ };
526
+ function instanceOfStreak(value) {
525
527
  return true;
526
528
  }
527
- function MLBVenueFromJSON(json) {
528
- return MLBVenueFromJSONTyped(json, false);
529
+ function StreakFromJSON(json) {
530
+ return StreakFromJSONTyped(json, false);
529
531
  }
530
- function MLBVenueFromJSONTyped(json, ignoreDiscriminator) {
532
+ function StreakFromJSONTyped(json, ignoreDiscriminator) {
531
533
  if (json == null) {
532
534
  return json;
533
535
  }
534
536
  return {
535
- "id": json["id"],
536
- "name": json["name"],
537
- "link": json["link"] == null ? void 0 : json["link"],
538
- "active": json["active"] == null ? void 0 : json["active"],
539
- "season": json["season"] == null ? void 0 : json["season"]
537
+ "streakType": json["streakType"] == null ? void 0 : json["streakType"]
540
538
  };
541
539
  }
542
- function MLBVenueToJSON(value) {
540
+ function StreakToJSON(value) {
543
541
  if (value == null) {
544
542
  return value;
545
543
  }
546
544
  return {
547
- "id": value["id"],
548
- "name": value["name"],
549
- "link": value["link"],
550
- "active": value["active"],
551
- "season": value["season"]
545
+ "streakType": value["streakType"]
552
546
  };
553
547
  }
554
548
 
555
- // src/models/MLBGameStatus.ts
556
- var MLBGameStatusCodedGameStateEnum = {
557
- Final: "F",
558
- Postponed: "D",
559
- Scheduled: "S",
560
- InProgress: "I",
561
- Pregame: "P",
562
- GameOver: "O"
563
- };
564
- function instanceOfMLBGameStatus(value) {
549
+ // src/models/Venue.ts
550
+ function instanceOfVenue(value) {
551
+ if (!("id" in value) || value["id"] === void 0) return false;
552
+ if (!("name" in value) || value["name"] === void 0) return false;
565
553
  return true;
566
554
  }
567
- function MLBGameStatusFromJSON(json) {
568
- return MLBGameStatusFromJSONTyped(json, false);
555
+ function VenueFromJSON(json) {
556
+ return VenueFromJSONTyped(json, false);
569
557
  }
570
- function MLBGameStatusFromJSONTyped(json, ignoreDiscriminator) {
558
+ function VenueFromJSONTyped(json, ignoreDiscriminator) {
571
559
  if (json == null) {
572
560
  return json;
573
561
  }
574
562
  return {
575
- "abstractGameState": json["abstractGameState"] == null ? void 0 : json["abstractGameState"],
576
- "codedGameState": json["codedGameState"] == null ? void 0 : json["codedGameState"],
577
- "detailedState": json["detailedState"] == null ? void 0 : json["detailedState"],
578
- "statusCode": json["statusCode"] == null ? void 0 : json["statusCode"],
579
- "startTimeTBD": json["startTimeTBD"] == null ? void 0 : json["startTimeTBD"],
580
- "abstractGameCode": json["abstractGameCode"] == null ? void 0 : json["abstractGameCode"]
563
+ "id": json["id"],
564
+ "name": json["name"],
565
+ "link": json["link"] == null ? void 0 : json["link"],
566
+ "active": json["active"] == null ? void 0 : json["active"],
567
+ "season": json["season"] == null ? void 0 : json["season"]
581
568
  };
582
569
  }
583
- function MLBGameStatusToJSON(value) {
570
+ function VenueToJSON(value) {
584
571
  if (value == null) {
585
572
  return value;
586
573
  }
587
574
  return {
588
- "abstractGameState": value["abstractGameState"],
589
- "codedGameState": value["codedGameState"],
590
- "detailedState": value["detailedState"],
591
- "statusCode": value["statusCode"],
592
- "startTimeTBD": value["startTimeTBD"],
593
- "abstractGameCode": value["abstractGameCode"]
575
+ "id": value["id"],
576
+ "name": value["name"],
577
+ "link": value["link"],
578
+ "active": value["active"],
579
+ "season": value["season"]
594
580
  };
595
581
  }
596
582
 
597
- // src/models/MLBTeam.ts
598
- function instanceOfMLBTeam(value) {
583
+ // src/models/Team.ts
584
+ function instanceOfTeam(value) {
599
585
  if (!("id" in value) || value["id"] === void 0) return false;
600
586
  if (!("name" in value) || value["name"] === void 0) return false;
601
587
  return true;
602
588
  }
603
- function MLBTeamFromJSON(json) {
604
- return MLBTeamFromJSONTyped(json, false);
589
+ function TeamFromJSON(json) {
590
+ return TeamFromJSONTyped(json, false);
605
591
  }
606
- function MLBTeamFromJSONTyped(json, ignoreDiscriminator) {
592
+ function TeamFromJSONTyped(json, ignoreDiscriminator) {
607
593
  if (json == null) {
608
594
  return json;
609
595
  }
@@ -613,25 +599,25 @@ function MLBTeamFromJSONTyped(json, ignoreDiscriminator) {
613
599
  "link": json["link"] == null ? void 0 : json["link"],
614
600
  "allStarStatus": json["allStarStatus"] == null ? void 0 : json["allStarStatus"],
615
601
  "season": json["season"] == null ? void 0 : json["season"],
616
- "venue": json["venue"] == null ? void 0 : MLBVenueFromJSON(json["venue"]),
617
- "springVenue": json["springVenue"] == null ? void 0 : MLBVenueFromJSON(json["springVenue"]),
602
+ "venue": json["venue"] == null ? void 0 : VenueFromJSON(json["venue"]),
603
+ "springVenue": json["springVenue"] == null ? void 0 : VenueFromJSON(json["springVenue"]),
618
604
  "teamCode": json["teamCode"] == null ? void 0 : json["teamCode"],
619
605
  "fileCode": json["fileCode"] == null ? void 0 : json["fileCode"],
620
606
  "abbreviation": json["abbreviation"] == null ? void 0 : json["abbreviation"],
621
607
  "teamName": json["teamName"] == null ? void 0 : json["teamName"],
622
608
  "locationName": json["locationName"] == null ? void 0 : json["locationName"],
623
609
  "firstYearOfPlay": json["firstYearOfPlay"] == null ? void 0 : json["firstYearOfPlay"],
624
- "league": json["league"] == null ? void 0 : MLBLeagueFromJSON(json["league"]),
625
- "springLeague": json["springLeague"] == null ? void 0 : MLBLeagueFromJSON(json["springLeague"]),
626
- "division": json["division"] == null ? void 0 : MLBDivisionFromJSON(json["division"]),
627
- "sport": json["sport"] == null ? void 0 : MLBSportFromJSON(json["sport"]),
610
+ "league": json["league"] == null ? void 0 : LeagueFromJSON(json["league"]),
611
+ "springLeague": json["springLeague"] == null ? void 0 : LeagueFromJSON(json["springLeague"]),
612
+ "division": json["division"] == null ? void 0 : DivisionFromJSON(json["division"]),
613
+ "sport": json["sport"] == null ? void 0 : SportFromJSON(json["sport"]),
628
614
  "shortName": json["shortName"] == null ? void 0 : json["shortName"],
629
615
  "franchiseName": json["franchiseName"] == null ? void 0 : json["franchiseName"],
630
616
  "clubName": json["clubName"] == null ? void 0 : json["clubName"],
631
617
  "active": json["active"] == null ? void 0 : json["active"]
632
618
  };
633
619
  }
634
- function MLBTeamToJSON(value) {
620
+ function TeamToJSON(value) {
635
621
  if (value == null) {
636
622
  return value;
637
623
  }
@@ -641,18 +627,18 @@ function MLBTeamToJSON(value) {
641
627
  "link": value["link"],
642
628
  "allStarStatus": value["allStarStatus"],
643
629
  "season": value["season"],
644
- "venue": MLBVenueToJSON(value["venue"]),
645
- "springVenue": MLBVenueToJSON(value["springVenue"]),
630
+ "venue": VenueToJSON(value["venue"]),
631
+ "springVenue": VenueToJSON(value["springVenue"]),
646
632
  "teamCode": value["teamCode"],
647
633
  "fileCode": value["fileCode"],
648
634
  "abbreviation": value["abbreviation"],
649
635
  "teamName": value["teamName"],
650
636
  "locationName": value["locationName"],
651
637
  "firstYearOfPlay": value["firstYearOfPlay"],
652
- "league": MLBLeagueToJSON(value["league"]),
653
- "springLeague": MLBLeagueToJSON(value["springLeague"]),
654
- "division": MLBDivisionToJSON(value["division"]),
655
- "sport": MLBSportToJSON(value["sport"]),
638
+ "league": LeagueToJSON(value["league"]),
639
+ "springLeague": LeagueToJSON(value["springLeague"]),
640
+ "division": DivisionToJSON(value["division"]),
641
+ "sport": SportToJSON(value["sport"]),
656
642
  "shortName": value["shortName"],
657
643
  "franchiseName": value["franchiseName"],
658
644
  "clubName": value["clubName"],
@@ -660,17 +646,17 @@ function MLBTeamToJSON(value) {
660
646
  };
661
647
  }
662
648
 
663
- // src/models/MLBLeagueRecord.ts
664
- function instanceOfMLBLeagueRecord(value) {
649
+ // src/models/LeagueRecord.ts
650
+ function instanceOfLeagueRecord(value) {
665
651
  if (!("wins" in value) || value["wins"] === void 0) return false;
666
652
  if (!("losses" in value) || value["losses"] === void 0) return false;
667
653
  if (!("pct" in value) || value["pct"] === void 0) return false;
668
654
  return true;
669
655
  }
670
- function MLBLeagueRecordFromJSON(json) {
671
- return MLBLeagueRecordFromJSONTyped(json, false);
656
+ function LeagueRecordFromJSON(json) {
657
+ return LeagueRecordFromJSONTyped(json, false);
672
658
  }
673
- function MLBLeagueRecordFromJSONTyped(json, ignoreDiscriminator) {
659
+ function LeagueRecordFromJSONTyped(json, ignoreDiscriminator) {
674
660
  if (json == null) {
675
661
  return json;
676
662
  }
@@ -681,7 +667,7 @@ function MLBLeagueRecordFromJSONTyped(json, ignoreDiscriminator) {
681
667
  "pct": json["pct"]
682
668
  };
683
669
  }
684
- function MLBLeagueRecordToJSON(value) {
670
+ function LeagueRecordToJSON(value) {
685
671
  if (value == null) {
686
672
  return value;
687
673
  }
@@ -693,73 +679,293 @@ function MLBLeagueRecordToJSON(value) {
693
679
  };
694
680
  }
695
681
 
696
- // src/models/MLBGameTeam.ts
697
- function instanceOfMLBGameTeam(value) {
682
+ // src/models/TeamRecord.ts
683
+ function instanceOfTeamRecord(value) {
684
+ if (!("team" in value) || value["team"] === void 0) return false;
685
+ if (!("season" in value) || value["season"] === void 0) return false;
686
+ if (!("streak" in value) || value["streak"] === void 0) return false;
687
+ if (!("divisionRank" in value) || value["divisionRank"] === void 0) return false;
688
+ if (!("leagueRank" in value) || value["leagueRank"] === void 0) return false;
689
+ if (!("gamesBack" in value) || value["gamesBack"] === void 0) return false;
690
+ if (!("leagueRecord" in value) || value["leagueRecord"] === void 0) return false;
691
+ if (!("wins" in value) || value["wins"] === void 0) return false;
692
+ if (!("losses" in value) || value["losses"] === void 0) return false;
693
+ return true;
694
+ }
695
+ function TeamRecordFromJSON(json) {
696
+ return TeamRecordFromJSONTyped(json, false);
697
+ }
698
+ function TeamRecordFromJSONTyped(json, ignoreDiscriminator) {
699
+ if (json == null) {
700
+ return json;
701
+ }
702
+ return {
703
+ "team": TeamFromJSON(json["team"]),
704
+ "season": json["season"],
705
+ "streak": StreakFromJSON(json["streak"]),
706
+ "divisionRank": json["divisionRank"],
707
+ "leagueRank": json["leagueRank"],
708
+ "sportRank": json["sportRank"] == null ? void 0 : json["sportRank"],
709
+ "gamesPlayed": json["gamesPlayed"] == null ? void 0 : json["gamesPlayed"],
710
+ "gamesBack": json["gamesBack"],
711
+ "wildCardGamesBack": json["wildCardGamesBack"] == null ? void 0 : json["wildCardGamesBack"],
712
+ "leagueGamesBack": json["leagueGamesBack"] == null ? void 0 : json["leagueGamesBack"],
713
+ "sportGamesBack": json["sportGamesBack"] == null ? void 0 : json["sportGamesBack"],
714
+ "divisionGamesBack": json["divisionGamesBack"] == null ? void 0 : json["divisionGamesBack"],
715
+ "conferenceGamesBack": json["conferenceGamesBack"] == null ? void 0 : json["conferenceGamesBack"],
716
+ "leagueRecord": LeagueRecordFromJSON(json["leagueRecord"]),
717
+ "lastUpdated": json["lastUpdated"] == null ? void 0 : json["lastUpdated"],
718
+ "runsAllowed": json["runsAllowed"] == null ? void 0 : json["runsAllowed"],
719
+ "runsScored": json["runsScored"] == null ? void 0 : json["runsScored"],
720
+ "divisionChamp": json["divisionChamp"] == null ? void 0 : json["divisionChamp"],
721
+ "divisionLeader": json["divisionLeader"] == null ? void 0 : json["divisionLeader"],
722
+ "hasWildcard": json["hasWildcard"] == null ? void 0 : json["hasWildcard"],
723
+ "clinched": json["clinched"] == null ? void 0 : json["clinched"],
724
+ "eliminationNumber": json["eliminationNumber"] == null ? void 0 : json["eliminationNumber"],
725
+ "eliminationNumberSport": json["eliminationNumberSport"] == null ? void 0 : json["eliminationNumberSport"],
726
+ "eliminationNumberLeague": json["eliminationNumberLeague"] == null ? void 0 : json["eliminationNumberLeague"],
727
+ "eliminationNumberDivision": json["eliminationNumberDivision"] == null ? void 0 : json["eliminationNumberDivision"],
728
+ "eliminationNumberConference": json["eliminationNumberConference"] == null ? void 0 : json["eliminationNumberConference"],
729
+ "wildCardEliminationNumber": json["wildCardEliminationNumber"] == null ? void 0 : json["wildCardEliminationNumber"],
730
+ "magicNumber": json["magicNumber"] == null ? void 0 : json["magicNumber"],
731
+ "wins": json["wins"],
732
+ "losses": json["losses"],
733
+ "runDifferential": json["runDifferential"] == null ? void 0 : json["runDifferential"],
734
+ "winningPercentage": json["winningPercentage"] == null ? void 0 : json["winningPercentage"]
735
+ };
736
+ }
737
+ function TeamRecordToJSON(value) {
738
+ if (value == null) {
739
+ return value;
740
+ }
741
+ return {
742
+ "team": TeamToJSON(value["team"]),
743
+ "season": value["season"],
744
+ "streak": StreakToJSON(value["streak"]),
745
+ "divisionRank": value["divisionRank"],
746
+ "leagueRank": value["leagueRank"],
747
+ "sportRank": value["sportRank"],
748
+ "gamesPlayed": value["gamesPlayed"],
749
+ "gamesBack": value["gamesBack"],
750
+ "wildCardGamesBack": value["wildCardGamesBack"],
751
+ "leagueGamesBack": value["leagueGamesBack"],
752
+ "sportGamesBack": value["sportGamesBack"],
753
+ "divisionGamesBack": value["divisionGamesBack"],
754
+ "conferenceGamesBack": value["conferenceGamesBack"],
755
+ "leagueRecord": LeagueRecordToJSON(value["leagueRecord"]),
756
+ "lastUpdated": value["lastUpdated"],
757
+ "runsAllowed": value["runsAllowed"],
758
+ "runsScored": value["runsScored"],
759
+ "divisionChamp": value["divisionChamp"],
760
+ "divisionLeader": value["divisionLeader"],
761
+ "hasWildcard": value["hasWildcard"],
762
+ "clinched": value["clinched"],
763
+ "eliminationNumber": value["eliminationNumber"],
764
+ "eliminationNumberSport": value["eliminationNumberSport"],
765
+ "eliminationNumberLeague": value["eliminationNumberLeague"],
766
+ "eliminationNumberDivision": value["eliminationNumberDivision"],
767
+ "eliminationNumberConference": value["eliminationNumberConference"],
768
+ "wildCardEliminationNumber": value["wildCardEliminationNumber"],
769
+ "magicNumber": value["magicNumber"],
770
+ "wins": value["wins"],
771
+ "losses": value["losses"],
772
+ "runDifferential": value["runDifferential"],
773
+ "winningPercentage": value["winningPercentage"]
774
+ };
775
+ }
776
+
777
+ // src/models/DivisionStandings.ts
778
+ function instanceOfDivisionStandings(value) {
779
+ if (!("league" in value) || value["league"] === void 0) return false;
780
+ if (!("division" in value) || value["division"] === void 0) return false;
781
+ if (!("sport" in value) || value["sport"] === void 0) return false;
782
+ if (!("teamRecords" in value) || value["teamRecords"] === void 0) return false;
783
+ return true;
784
+ }
785
+ function DivisionStandingsFromJSON(json) {
786
+ return DivisionStandingsFromJSONTyped(json, false);
787
+ }
788
+ function DivisionStandingsFromJSONTyped(json, ignoreDiscriminator) {
789
+ if (json == null) {
790
+ return json;
791
+ }
792
+ return {
793
+ "standingsType": json["standingsType"] == null ? void 0 : json["standingsType"],
794
+ "league": LeagueFromJSON(json["league"]),
795
+ "division": DivisionFromJSON(json["division"]),
796
+ "sport": SportFromJSON(json["sport"]),
797
+ "lastUpdated": json["lastUpdated"] == null ? void 0 : json["lastUpdated"],
798
+ "teamRecords": json["teamRecords"].map(TeamRecordFromJSON)
799
+ };
800
+ }
801
+ function DivisionStandingsToJSON(value) {
802
+ if (value == null) {
803
+ return value;
804
+ }
805
+ return {
806
+ "standingsType": value["standingsType"],
807
+ "league": LeagueToJSON(value["league"]),
808
+ "division": DivisionToJSON(value["division"]),
809
+ "sport": SportToJSON(value["sport"]),
810
+ "lastUpdated": value["lastUpdated"],
811
+ "teamRecords": value["teamRecords"].map(TeamRecordToJSON)
812
+ };
813
+ }
814
+
815
+ // src/models/DivisionStandingsList.ts
816
+ function instanceOfDivisionStandingsList(value) {
817
+ return true;
818
+ }
819
+ function DivisionStandingsListFromJSON(json) {
820
+ return DivisionStandingsListFromJSONTyped(json, false);
821
+ }
822
+ function DivisionStandingsListFromJSONTyped(json, ignoreDiscriminator) {
823
+ if (json == null) {
824
+ return json;
825
+ }
826
+ return {
827
+ "records": json["records"] == null ? void 0 : json["records"].map(DivisionStandingsFromJSON)
828
+ };
829
+ }
830
+ function DivisionStandingsListToJSON(value) {
831
+ if (value == null) {
832
+ return value;
833
+ }
834
+ return {
835
+ "records": value["records"] == null ? void 0 : value["records"].map(DivisionStandingsToJSON)
836
+ };
837
+ }
838
+
839
+ // src/models/GameStatusCode.ts
840
+ var GameStatusCode = {
841
+ Final: "F",
842
+ Postponed: "D",
843
+ Scheduled: "S",
844
+ InProgress: "I",
845
+ Pregame: "P",
846
+ GameOver: "O"
847
+ };
848
+ function instanceOfGameStatusCode(value) {
849
+ for (const key in GameStatusCode) {
850
+ if (Object.prototype.hasOwnProperty.call(GameStatusCode, key)) {
851
+ if (GameStatusCode[key] === value) {
852
+ return true;
853
+ }
854
+ }
855
+ }
856
+ return false;
857
+ }
858
+ function GameStatusCodeFromJSON(json) {
859
+ return GameStatusCodeFromJSONTyped(json, false);
860
+ }
861
+ function GameStatusCodeFromJSONTyped(json, ignoreDiscriminator) {
862
+ return json;
863
+ }
864
+ function GameStatusCodeToJSON(value) {
865
+ return value;
866
+ }
867
+
868
+ // src/models/GameStatus.ts
869
+ function instanceOfGameStatus(value) {
870
+ return true;
871
+ }
872
+ function GameStatusFromJSON(json) {
873
+ return GameStatusFromJSONTyped(json, false);
874
+ }
875
+ function GameStatusFromJSONTyped(json, ignoreDiscriminator) {
876
+ if (json == null) {
877
+ return json;
878
+ }
879
+ return {
880
+ "abstractGameState": json["abstractGameState"] == null ? void 0 : json["abstractGameState"],
881
+ "codedGameState": json["codedGameState"] == null ? void 0 : GameStatusCodeFromJSON(json["codedGameState"]),
882
+ "detailedState": json["detailedState"] == null ? void 0 : json["detailedState"],
883
+ "statusCode": json["statusCode"] == null ? void 0 : json["statusCode"],
884
+ "startTimeTBD": json["startTimeTBD"] == null ? void 0 : json["startTimeTBD"],
885
+ "abstractGameCode": json["abstractGameCode"] == null ? void 0 : json["abstractGameCode"]
886
+ };
887
+ }
888
+ function GameStatusToJSON(value) {
889
+ if (value == null) {
890
+ return value;
891
+ }
892
+ return {
893
+ "abstractGameState": value["abstractGameState"],
894
+ "codedGameState": GameStatusCodeToJSON(value["codedGameState"]),
895
+ "detailedState": value["detailedState"],
896
+ "statusCode": value["statusCode"],
897
+ "startTimeTBD": value["startTimeTBD"],
898
+ "abstractGameCode": value["abstractGameCode"]
899
+ };
900
+ }
901
+
902
+ // src/models/GameTeam.ts
903
+ function instanceOfGameTeam(value) {
698
904
  if (!("score" in value) || value["score"] === void 0) return false;
699
905
  if (!("team" in value) || value["team"] === void 0) return false;
700
906
  if (!("isWinner" in value) || value["isWinner"] === void 0) return false;
701
907
  return true;
702
908
  }
703
- function MLBGameTeamFromJSON(json) {
704
- return MLBGameTeamFromJSONTyped(json, false);
909
+ function GameTeamFromJSON(json) {
910
+ return GameTeamFromJSONTyped(json, false);
705
911
  }
706
- function MLBGameTeamFromJSONTyped(json, ignoreDiscriminator) {
912
+ function GameTeamFromJSONTyped(json, ignoreDiscriminator) {
707
913
  if (json == null) {
708
914
  return json;
709
915
  }
710
916
  return {
711
- "leagueRecord": json["leagueRecord"] == null ? void 0 : MLBLeagueRecordFromJSON(json["leagueRecord"]),
917
+ "leagueRecord": json["leagueRecord"] == null ? void 0 : LeagueRecordFromJSON(json["leagueRecord"]),
712
918
  "score": json["score"],
713
- "team": MLBTeamFromJSON(json["team"]),
919
+ "team": TeamFromJSON(json["team"]),
714
920
  "isWinner": json["isWinner"],
715
921
  "splitSquad": json["splitSquad"] == null ? void 0 : json["splitSquad"],
716
922
  "seriesNumber": json["seriesNumber"] == null ? void 0 : json["seriesNumber"]
717
923
  };
718
924
  }
719
- function MLBGameTeamToJSON(value) {
925
+ function GameTeamToJSON(value) {
720
926
  if (value == null) {
721
927
  return value;
722
928
  }
723
929
  return {
724
- "leagueRecord": MLBLeagueRecordToJSON(value["leagueRecord"]),
930
+ "leagueRecord": LeagueRecordToJSON(value["leagueRecord"]),
725
931
  "score": value["score"],
726
- "team": MLBTeamToJSON(value["team"]),
932
+ "team": TeamToJSON(value["team"]),
727
933
  "isWinner": value["isWinner"],
728
934
  "splitSquad": value["splitSquad"],
729
935
  "seriesNumber": value["seriesNumber"]
730
936
  };
731
937
  }
732
938
 
733
- // src/models/MLBGameTeams.ts
734
- function instanceOfMLBGameTeams(value) {
939
+ // src/models/GameTeams.ts
940
+ function instanceOfGameTeams(value) {
735
941
  if (!("away" in value) || value["away"] === void 0) return false;
736
942
  if (!("home" in value) || value["home"] === void 0) return false;
737
943
  return true;
738
944
  }
739
- function MLBGameTeamsFromJSON(json) {
740
- return MLBGameTeamsFromJSONTyped(json, false);
945
+ function GameTeamsFromJSON(json) {
946
+ return GameTeamsFromJSONTyped(json, false);
741
947
  }
742
- function MLBGameTeamsFromJSONTyped(json, ignoreDiscriminator) {
948
+ function GameTeamsFromJSONTyped(json, ignoreDiscriminator) {
743
949
  if (json == null) {
744
950
  return json;
745
951
  }
746
952
  return {
747
- "away": MLBGameTeamFromJSON(json["away"]),
748
- "home": MLBGameTeamFromJSON(json["home"])
953
+ "away": GameTeamFromJSON(json["away"]),
954
+ "home": GameTeamFromJSON(json["home"])
749
955
  };
750
956
  }
751
- function MLBGameTeamsToJSON(value) {
957
+ function GameTeamsToJSON(value) {
752
958
  if (value == null) {
753
959
  return value;
754
960
  }
755
961
  return {
756
- "away": MLBGameTeamToJSON(value["away"]),
757
- "home": MLBGameTeamToJSON(value["home"])
962
+ "away": GameTeamToJSON(value["away"]),
963
+ "home": GameTeamToJSON(value["home"])
758
964
  };
759
965
  }
760
966
 
761
- // src/models/MLBGame.ts
762
- var MLBGameGameTypeEnum = {
967
+ // src/models/GameType.ts
968
+ var GameType = {
763
969
  Exhibition: "E",
764
970
  SpringTraining: "S",
765
971
  Regular: "R",
@@ -768,7 +974,28 @@ var MLBGameGameTypeEnum = {
768
974
  LeagueChampionshipSeries: "L",
769
975
  WorldSeries: "W"
770
976
  };
771
- function instanceOfMLBGame(value) {
977
+ function instanceOfGameType(value) {
978
+ for (const key in GameType) {
979
+ if (Object.prototype.hasOwnProperty.call(GameType, key)) {
980
+ if (GameType[key] === value) {
981
+ return true;
982
+ }
983
+ }
984
+ }
985
+ return false;
986
+ }
987
+ function GameTypeFromJSON(json) {
988
+ return GameTypeFromJSONTyped(json, false);
989
+ }
990
+ function GameTypeFromJSONTyped(json, ignoreDiscriminator) {
991
+ return json;
992
+ }
993
+ function GameTypeToJSON(value) {
994
+ return value;
995
+ }
996
+
997
+ // src/models/Game.ts
998
+ function instanceOfGame(value) {
772
999
  if (!("gamePk" in value) || value["gamePk"] === void 0) return false;
773
1000
  if (!("gameGuid" in value) || value["gameGuid"] === void 0) return false;
774
1001
  if (!("gameType" in value) || value["gameType"] === void 0) return false;
@@ -782,10 +1009,10 @@ function instanceOfMLBGame(value) {
782
1009
  if (!("seriesGameNumber" in value) || value["seriesGameNumber"] === void 0) return false;
783
1010
  return true;
784
1011
  }
785
- function MLBGameFromJSON(json) {
786
- return MLBGameFromJSONTyped(json, false);
1012
+ function GameFromJSON(json) {
1013
+ return GameFromJSONTyped(json, false);
787
1014
  }
788
- function MLBGameFromJSONTyped(json, ignoreDiscriminator) {
1015
+ function GameFromJSONTyped(json, ignoreDiscriminator) {
789
1016
  if (json == null) {
790
1017
  return json;
791
1018
  }
@@ -793,7 +1020,7 @@ function MLBGameFromJSONTyped(json, ignoreDiscriminator) {
793
1020
  "gamePk": json["gamePk"],
794
1021
  "gameGuid": json["gameGuid"],
795
1022
  "link": json["link"] == null ? void 0 : json["link"],
796
- "gameType": json["gameType"],
1023
+ "gameType": GameTypeFromJSON(json["gameType"]),
797
1024
  "season": json["season"],
798
1025
  "gameDate": json["gameDate"],
799
1026
  "officialDate": json["officialDate"],
@@ -801,9 +1028,9 @@ function MLBGameFromJSONTyped(json, ignoreDiscriminator) {
801
1028
  "rescheduledToDate": json["rescheduledToDate"] == null ? void 0 : json["rescheduledToDate"],
802
1029
  "rescheduledFrom": json["rescheduledFrom"] == null ? void 0 : json["rescheduledFrom"],
803
1030
  "rescheduledFromDate": json["rescheduledFromDate"] == null ? void 0 : json["rescheduledFromDate"],
804
- "status": MLBGameStatusFromJSON(json["status"]),
805
- "teams": MLBGameTeamsFromJSON(json["teams"]),
806
- "venue": json["venue"] == null ? void 0 : MLBVenueFromJSON(json["venue"]),
1031
+ "status": GameStatusFromJSON(json["status"]),
1032
+ "teams": GameTeamsFromJSON(json["teams"]),
1033
+ "venue": json["venue"] == null ? void 0 : VenueFromJSON(json["venue"]),
807
1034
  "isTie": json["isTie"] == null ? void 0 : json["isTie"],
808
1035
  "gameNumber": json["gameNumber"],
809
1036
  "publicFacing": json["publicFacing"] == null ? void 0 : json["publicFacing"],
@@ -825,7 +1052,7 @@ function MLBGameFromJSONTyped(json, ignoreDiscriminator) {
825
1052
  "ifNecessaryDescription": json["ifNecessaryDescription"] == null ? void 0 : json["ifNecessaryDescription"]
826
1053
  };
827
1054
  }
828
- function MLBGameToJSON(value) {
1055
+ function GameToJSON(value) {
829
1056
  if (value == null) {
830
1057
  return value;
831
1058
  }
@@ -833,7 +1060,7 @@ function MLBGameToJSON(value) {
833
1060
  "gamePk": value["gamePk"],
834
1061
  "gameGuid": value["gameGuid"],
835
1062
  "link": value["link"],
836
- "gameType": value["gameType"],
1063
+ "gameType": GameTypeToJSON(value["gameType"]),
837
1064
  "season": value["season"],
838
1065
  "gameDate": value["gameDate"],
839
1066
  "officialDate": value["officialDate"],
@@ -841,9 +1068,9 @@ function MLBGameToJSON(value) {
841
1068
  "rescheduledToDate": value["rescheduledToDate"],
842
1069
  "rescheduledFrom": value["rescheduledFrom"],
843
1070
  "rescheduledFromDate": value["rescheduledFromDate"],
844
- "status": MLBGameStatusToJSON(value["status"]),
845
- "teams": MLBGameTeamsToJSON(value["teams"]),
846
- "venue": MLBVenueToJSON(value["venue"]),
1071
+ "status": GameStatusToJSON(value["status"]),
1072
+ "teams": GameTeamsToJSON(value["teams"]),
1073
+ "venue": VenueToJSON(value["venue"]),
847
1074
  "isTie": value["isTie"],
848
1075
  "gameNumber": value["gameNumber"],
849
1076
  "publicFacing": value["publicFacing"],
@@ -866,138 +1093,15 @@ function MLBGameToJSON(value) {
866
1093
  };
867
1094
  }
868
1095
 
869
- // src/models/MLBStreak.ts
870
- var MLBStreakStreakTypeEnum = {
871
- Losing: "losses",
872
- Winning: "wins"
873
- };
874
- function instanceOfMLBStreak(value) {
875
- return true;
876
- }
877
- function MLBStreakFromJSON(json) {
878
- return MLBStreakFromJSONTyped(json, false);
879
- }
880
- function MLBStreakFromJSONTyped(json, ignoreDiscriminator) {
881
- if (json == null) {
882
- return json;
883
- }
884
- return {
885
- "streakType": json["streakType"] == null ? void 0 : json["streakType"]
886
- };
887
- }
888
- function MLBStreakToJSON(value) {
889
- if (value == null) {
890
- return value;
891
- }
892
- return {
893
- "streakType": value["streakType"]
894
- };
895
- }
896
-
897
- // src/models/MLBRecord.ts
898
- function instanceOfMLBRecord(value) {
899
- if (!("team" in value) || value["team"] === void 0) return false;
900
- if (!("season" in value) || value["season"] === void 0) return false;
901
- if (!("streak" in value) || value["streak"] === void 0) return false;
902
- if (!("divisionRank" in value) || value["divisionRank"] === void 0) return false;
903
- if (!("leagueRank" in value) || value["leagueRank"] === void 0) return false;
904
- if (!("gamesBack" in value) || value["gamesBack"] === void 0) return false;
905
- if (!("leagueRecord" in value) || value["leagueRecord"] === void 0) return false;
906
- if (!("wins" in value) || value["wins"] === void 0) return false;
907
- if (!("losses" in value) || value["losses"] === void 0) return false;
908
- return true;
909
- }
910
- function MLBRecordFromJSON(json) {
911
- return MLBRecordFromJSONTyped(json, false);
912
- }
913
- function MLBRecordFromJSONTyped(json, ignoreDiscriminator) {
914
- if (json == null) {
915
- return json;
916
- }
917
- return {
918
- "team": MLBTeamFromJSON(json["team"]),
919
- "season": json["season"],
920
- "streak": MLBStreakFromJSON(json["streak"]),
921
- "divisionRank": json["divisionRank"],
922
- "leagueRank": json["leagueRank"],
923
- "sportRank": json["sportRank"] == null ? void 0 : json["sportRank"],
924
- "gamesPlayed": json["gamesPlayed"] == null ? void 0 : json["gamesPlayed"],
925
- "gamesBack": json["gamesBack"],
926
- "wildCardGamesBack": json["wildCardGamesBack"] == null ? void 0 : json["wildCardGamesBack"],
927
- "leagueGamesBack": json["leagueGamesBack"] == null ? void 0 : json["leagueGamesBack"],
928
- "sportGamesBack": json["sportGamesBack"] == null ? void 0 : json["sportGamesBack"],
929
- "divisionGamesBack": json["divisionGamesBack"] == null ? void 0 : json["divisionGamesBack"],
930
- "conferenceGamesBack": json["conferenceGamesBack"] == null ? void 0 : json["conferenceGamesBack"],
931
- "leagueRecord": MLBLeagueRecordFromJSON(json["leagueRecord"]),
932
- "lastUpdated": json["lastUpdated"] == null ? void 0 : json["lastUpdated"],
933
- "runsAllowed": json["runsAllowed"] == null ? void 0 : json["runsAllowed"],
934
- "runsScored": json["runsScored"] == null ? void 0 : json["runsScored"],
935
- "divisionChamp": json["divisionChamp"] == null ? void 0 : json["divisionChamp"],
936
- "divisionLeader": json["divisionLeader"] == null ? void 0 : json["divisionLeader"],
937
- "hasWildcard": json["hasWildcard"] == null ? void 0 : json["hasWildcard"],
938
- "clinched": json["clinched"] == null ? void 0 : json["clinched"],
939
- "eliminationNumber": json["eliminationNumber"] == null ? void 0 : json["eliminationNumber"],
940
- "eliminationNumberSport": json["eliminationNumberSport"] == null ? void 0 : json["eliminationNumberSport"],
941
- "eliminationNumberLeague": json["eliminationNumberLeague"] == null ? void 0 : json["eliminationNumberLeague"],
942
- "eliminationNumberDivision": json["eliminationNumberDivision"] == null ? void 0 : json["eliminationNumberDivision"],
943
- "eliminationNumberConference": json["eliminationNumberConference"] == null ? void 0 : json["eliminationNumberConference"],
944
- "wildCardEliminationNumber": json["wildCardEliminationNumber"] == null ? void 0 : json["wildCardEliminationNumber"],
945
- "magicNumber": json["magicNumber"] == null ? void 0 : json["magicNumber"],
946
- "wins": json["wins"],
947
- "losses": json["losses"],
948
- "runDifferential": json["runDifferential"] == null ? void 0 : json["runDifferential"],
949
- "winningPercentage": json["winningPercentage"] == null ? void 0 : json["winningPercentage"]
950
- };
951
- }
952
- function MLBRecordToJSON(value) {
953
- if (value == null) {
954
- return value;
955
- }
956
- return {
957
- "team": MLBTeamToJSON(value["team"]),
958
- "season": value["season"],
959
- "streak": MLBStreakToJSON(value["streak"]),
960
- "divisionRank": value["divisionRank"],
961
- "leagueRank": value["leagueRank"],
962
- "sportRank": value["sportRank"],
963
- "gamesPlayed": value["gamesPlayed"],
964
- "gamesBack": value["gamesBack"],
965
- "wildCardGamesBack": value["wildCardGamesBack"],
966
- "leagueGamesBack": value["leagueGamesBack"],
967
- "sportGamesBack": value["sportGamesBack"],
968
- "divisionGamesBack": value["divisionGamesBack"],
969
- "conferenceGamesBack": value["conferenceGamesBack"],
970
- "leagueRecord": MLBLeagueRecordToJSON(value["leagueRecord"]),
971
- "lastUpdated": value["lastUpdated"],
972
- "runsAllowed": value["runsAllowed"],
973
- "runsScored": value["runsScored"],
974
- "divisionChamp": value["divisionChamp"],
975
- "divisionLeader": value["divisionLeader"],
976
- "hasWildcard": value["hasWildcard"],
977
- "clinched": value["clinched"],
978
- "eliminationNumber": value["eliminationNumber"],
979
- "eliminationNumberSport": value["eliminationNumberSport"],
980
- "eliminationNumberLeague": value["eliminationNumberLeague"],
981
- "eliminationNumberDivision": value["eliminationNumberDivision"],
982
- "eliminationNumberConference": value["eliminationNumberConference"],
983
- "wildCardEliminationNumber": value["wildCardEliminationNumber"],
984
- "magicNumber": value["magicNumber"],
985
- "wins": value["wins"],
986
- "losses": value["losses"],
987
- "runDifferential": value["runDifferential"],
988
- "winningPercentage": value["winningPercentage"]
989
- };
990
- }
991
-
992
- // src/models/MLBScheduleDay.ts
993
- function instanceOfMLBScheduleDay(value) {
1096
+ // src/models/ScheduleDay.ts
1097
+ function instanceOfScheduleDay(value) {
994
1098
  if (!("games" in value) || value["games"] === void 0) return false;
995
1099
  return true;
996
1100
  }
997
- function MLBScheduleDayFromJSON(json) {
998
- return MLBScheduleDayFromJSONTyped(json, false);
1101
+ function ScheduleDayFromJSON(json) {
1102
+ return ScheduleDayFromJSONTyped(json, false);
999
1103
  }
1000
- function MLBScheduleDayFromJSONTyped(json, ignoreDiscriminator) {
1104
+ function ScheduleDayFromJSONTyped(json, ignoreDiscriminator) {
1001
1105
  if (json == null) {
1002
1106
  return json;
1003
1107
  }
@@ -1007,10 +1111,10 @@ function MLBScheduleDayFromJSONTyped(json, ignoreDiscriminator) {
1007
1111
  "totalEvents": json["totalEvents"] == null ? void 0 : json["totalEvents"],
1008
1112
  "totalGames": json["totalGames"] == null ? void 0 : json["totalGames"],
1009
1113
  "totalGamesInProgress": json["totalGamesInProgress"] == null ? void 0 : json["totalGamesInProgress"],
1010
- "games": json["games"].map(MLBGameFromJSON)
1114
+ "games": json["games"].map(GameFromJSON)
1011
1115
  };
1012
1116
  }
1013
- function MLBScheduleDayToJSON(value) {
1117
+ function ScheduleDayToJSON(value) {
1014
1118
  if (value == null) {
1015
1119
  return value;
1016
1120
  }
@@ -1020,12 +1124,12 @@ function MLBScheduleDayToJSON(value) {
1020
1124
  "totalEvents": value["totalEvents"],
1021
1125
  "totalGames": value["totalGames"],
1022
1126
  "totalGamesInProgress": value["totalGamesInProgress"],
1023
- "games": value["games"].map(MLBGameToJSON)
1127
+ "games": value["games"].map(GameToJSON)
1024
1128
  };
1025
1129
  }
1026
1130
 
1027
- // src/models/MLBSchedule.ts
1028
- function instanceOfMLBSchedule(value) {
1131
+ // src/models/Schedule.ts
1132
+ function instanceOfSchedule(value) {
1029
1133
  if (!("totalItems" in value) || value["totalItems"] === void 0) return false;
1030
1134
  if (!("totalEvents" in value) || value["totalEvents"] === void 0) return false;
1031
1135
  if (!("totalGames" in value) || value["totalGames"] === void 0) return false;
@@ -1033,10 +1137,10 @@ function instanceOfMLBSchedule(value) {
1033
1137
  if (!("dates" in value) || value["dates"] === void 0) return false;
1034
1138
  return true;
1035
1139
  }
1036
- function MLBScheduleFromJSON(json) {
1037
- return MLBScheduleFromJSONTyped(json, false);
1140
+ function ScheduleFromJSON(json) {
1141
+ return ScheduleFromJSONTyped(json, false);
1038
1142
  }
1039
- function MLBScheduleFromJSONTyped(json, ignoreDiscriminator) {
1143
+ function ScheduleFromJSONTyped(json, ignoreDiscriminator) {
1040
1144
  if (json == null) {
1041
1145
  return json;
1042
1146
  }
@@ -1045,10 +1149,10 @@ function MLBScheduleFromJSONTyped(json, ignoreDiscriminator) {
1045
1149
  "totalEvents": json["totalEvents"],
1046
1150
  "totalGames": json["totalGames"],
1047
1151
  "totalGamesInProgress": json["totalGamesInProgress"],
1048
- "dates": json["dates"].map(MLBScheduleDayFromJSON)
1152
+ "dates": json["dates"].map(ScheduleDayFromJSON)
1049
1153
  };
1050
1154
  }
1051
- function MLBScheduleToJSON(value) {
1155
+ function ScheduleToJSON(value) {
1052
1156
  if (value == null) {
1053
1157
  return value;
1054
1158
  }
@@ -1057,12 +1161,12 @@ function MLBScheduleToJSON(value) {
1057
1161
  "totalEvents": value["totalEvents"],
1058
1162
  "totalGames": value["totalGames"],
1059
1163
  "totalGamesInProgress": value["totalGamesInProgress"],
1060
- "dates": value["dates"].map(MLBScheduleDayToJSON)
1164
+ "dates": value["dates"].map(ScheduleDayToJSON)
1061
1165
  };
1062
1166
  }
1063
1167
 
1064
- // src/models/MLBSeason.ts
1065
- function instanceOfMLBSeason(value) {
1168
+ // src/models/Season.ts
1169
+ function instanceOfSeason(value) {
1066
1170
  if (!("seasonId" in value) || value["seasonId"] === void 0) return false;
1067
1171
  if (!("seasonStartDate" in value) || value["seasonStartDate"] === void 0) return false;
1068
1172
  if (!("seasonEndDate" in value) || value["seasonEndDate"] === void 0) return false;
@@ -1070,10 +1174,10 @@ function instanceOfMLBSeason(value) {
1070
1174
  if (!("regularSeasonEndDate" in value) || value["regularSeasonEndDate"] === void 0) return false;
1071
1175
  return true;
1072
1176
  }
1073
- function MLBSeasonFromJSON(json) {
1074
- return MLBSeasonFromJSONTyped(json, false);
1177
+ function SeasonFromJSON(json) {
1178
+ return SeasonFromJSONTyped(json, false);
1075
1179
  }
1076
- function MLBSeasonFromJSONTyped(json, ignoreDiscriminator) {
1180
+ function SeasonFromJSONTyped(json, ignoreDiscriminator) {
1077
1181
  if (json == null) {
1078
1182
  return json;
1079
1183
  }
@@ -1101,7 +1205,7 @@ function MLBSeasonFromJSONTyped(json, ignoreDiscriminator) {
1101
1205
  "qualifierOutsPitched": json["qualifierOutsPitched"] == null ? void 0 : json["qualifierOutsPitched"]
1102
1206
  };
1103
1207
  }
1104
- function MLBSeasonToJSON(value) {
1208
+ function SeasonToJSON(value) {
1105
1209
  if (value == null) {
1106
1210
  return value;
1107
1211
  }
@@ -1130,113 +1234,51 @@ function MLBSeasonToJSON(value) {
1130
1234
  };
1131
1235
  }
1132
1236
 
1133
- // src/models/MLBSeasons.ts
1134
- function instanceOfMLBSeasons(value) {
1237
+ // src/models/Seasons.ts
1238
+ function instanceOfSeasons(value) {
1135
1239
  return true;
1136
1240
  }
1137
- function MLBSeasonsFromJSON(json) {
1138
- return MLBSeasonsFromJSONTyped(json, false);
1241
+ function SeasonsFromJSON(json) {
1242
+ return SeasonsFromJSONTyped(json, false);
1139
1243
  }
1140
- function MLBSeasonsFromJSONTyped(json, ignoreDiscriminator) {
1244
+ function SeasonsFromJSONTyped(json, ignoreDiscriminator) {
1141
1245
  if (json == null) {
1142
1246
  return json;
1143
1247
  }
1144
1248
  return {
1145
- "seasons": json["seasons"] == null ? void 0 : json["seasons"].map(MLBSeasonFromJSON)
1249
+ "seasons": json["seasons"] == null ? void 0 : json["seasons"].map(SeasonFromJSON)
1146
1250
  };
1147
1251
  }
1148
- function MLBSeasonsToJSON(value) {
1252
+ function SeasonsToJSON(value) {
1149
1253
  if (value == null) {
1150
1254
  return value;
1151
1255
  }
1152
1256
  return {
1153
- "seasons": value["seasons"] == null ? void 0 : value["seasons"].map(MLBSeasonToJSON)
1257
+ "seasons": value["seasons"] == null ? void 0 : value["seasons"].map(SeasonToJSON)
1154
1258
  };
1155
1259
  }
1156
1260
 
1157
- // src/models/MLBStandings.ts
1158
- function instanceOfMLBStandings(value) {
1159
- if (!("league" in value) || value["league"] === void 0) return false;
1160
- if (!("division" in value) || value["division"] === void 0) return false;
1161
- if (!("sport" in value) || value["sport"] === void 0) return false;
1162
- if (!("teamRecords" in value) || value["teamRecords"] === void 0) return false;
1261
+ // src/models/Teams.ts
1262
+ function instanceOfTeams(value) {
1163
1263
  return true;
1164
1264
  }
1165
- function MLBStandingsFromJSON(json) {
1166
- return MLBStandingsFromJSONTyped(json, false);
1265
+ function TeamsFromJSON(json) {
1266
+ return TeamsFromJSONTyped(json, false);
1167
1267
  }
1168
- function MLBStandingsFromJSONTyped(json, ignoreDiscriminator) {
1268
+ function TeamsFromJSONTyped(json, ignoreDiscriminator) {
1169
1269
  if (json == null) {
1170
1270
  return json;
1171
1271
  }
1172
1272
  return {
1173
- "standingsType": json["standingsType"] == null ? void 0 : json["standingsType"],
1174
- "league": MLBLeagueFromJSON(json["league"]),
1175
- "division": MLBDivisionFromJSON(json["division"]),
1176
- "sport": MLBSportFromJSON(json["sport"]),
1177
- "lastUpdated": json["lastUpdated"] == null ? void 0 : json["lastUpdated"],
1178
- "teamRecords": json["teamRecords"].map(MLBRecordFromJSON)
1273
+ "teams": json["teams"] == null ? void 0 : json["teams"].map(TeamFromJSON)
1179
1274
  };
1180
1275
  }
1181
- function MLBStandingsToJSON(value) {
1276
+ function TeamsToJSON(value) {
1182
1277
  if (value == null) {
1183
1278
  return value;
1184
1279
  }
1185
1280
  return {
1186
- "standingsType": value["standingsType"],
1187
- "league": MLBLeagueToJSON(value["league"]),
1188
- "division": MLBDivisionToJSON(value["division"]),
1189
- "sport": MLBSportToJSON(value["sport"]),
1190
- "lastUpdated": value["lastUpdated"],
1191
- "teamRecords": value["teamRecords"].map(MLBRecordToJSON)
1192
- };
1193
- }
1194
-
1195
- // src/models/MLBStandingsList.ts
1196
- function instanceOfMLBStandingsList(value) {
1197
- return true;
1198
- }
1199
- function MLBStandingsListFromJSON(json) {
1200
- return MLBStandingsListFromJSONTyped(json, false);
1201
- }
1202
- function MLBStandingsListFromJSONTyped(json, ignoreDiscriminator) {
1203
- if (json == null) {
1204
- return json;
1205
- }
1206
- return {
1207
- "records": json["records"] == null ? void 0 : json["records"].map(MLBStandingsFromJSON)
1208
- };
1209
- }
1210
- function MLBStandingsListToJSON(value) {
1211
- if (value == null) {
1212
- return value;
1213
- }
1214
- return {
1215
- "records": value["records"] == null ? void 0 : value["records"].map(MLBStandingsToJSON)
1216
- };
1217
- }
1218
-
1219
- // src/models/MLBTeams.ts
1220
- function instanceOfMLBTeams(value) {
1221
- return true;
1222
- }
1223
- function MLBTeamsFromJSON(json) {
1224
- return MLBTeamsFromJSONTyped(json, false);
1225
- }
1226
- function MLBTeamsFromJSONTyped(json, ignoreDiscriminator) {
1227
- if (json == null) {
1228
- return json;
1229
- }
1230
- return {
1231
- "teams": json["teams"] == null ? void 0 : json["teams"].map(MLBTeamFromJSON)
1232
- };
1233
- }
1234
- function MLBTeamsToJSON(value) {
1235
- if (value == null) {
1236
- return value;
1237
- }
1238
- return {
1239
- "teams": value["teams"] == null ? void 0 : value["teams"].map(MLBTeamToJSON)
1281
+ "teams": value["teams"] == null ? void 0 : value["teams"].map(TeamToJSON)
1240
1282
  };
1241
1283
  }
1242
1284
 
@@ -1265,7 +1307,7 @@ var MlbApi = class extends BaseAPI {
1265
1307
  headers: headerParameters,
1266
1308
  query: queryParameters
1267
1309
  }, initOverrides);
1268
- return new JSONApiResponse(response, (jsonValue) => MLBSeasonsFromJSON(jsonValue));
1310
+ return new JSONApiResponse(response, (jsonValue) => SeasonsFromJSON(jsonValue));
1269
1311
  });
1270
1312
  }
1271
1313
  /**
@@ -1297,6 +1339,9 @@ var MlbApi = class extends BaseAPI {
1297
1339
  if (requestParameters["teamId"] != null) {
1298
1340
  queryParameters["teamId"] = requestParameters["teamId"];
1299
1341
  }
1342
+ if (requestParameters["gameTypes"] != null) {
1343
+ queryParameters["gameTypes"] = requestParameters["gameTypes"];
1344
+ }
1300
1345
  if (requestParameters["startDate"] != null) {
1301
1346
  queryParameters["startDate"] = requestParameters["startDate"];
1302
1347
  }
@@ -1313,7 +1358,7 @@ var MlbApi = class extends BaseAPI {
1313
1358
  headers: headerParameters,
1314
1359
  query: queryParameters
1315
1360
  }, initOverrides);
1316
- return new JSONApiResponse(response, (jsonValue) => MLBScheduleFromJSON(jsonValue));
1361
+ return new JSONApiResponse(response, (jsonValue) => ScheduleFromJSON(jsonValue));
1317
1362
  });
1318
1363
  }
1319
1364
  /**
@@ -1358,7 +1403,7 @@ var MlbApi = class extends BaseAPI {
1358
1403
  headers: headerParameters,
1359
1404
  query: queryParameters
1360
1405
  }, initOverrides);
1361
- return new JSONApiResponse(response, (jsonValue) => MLBSeasonsFromJSON(jsonValue));
1406
+ return new JSONApiResponse(response, (jsonValue) => SeasonsFromJSON(jsonValue));
1362
1407
  });
1363
1408
  }
1364
1409
  /**
@@ -1412,7 +1457,7 @@ var MlbApi = class extends BaseAPI {
1412
1457
  headers: headerParameters,
1413
1458
  query: queryParameters
1414
1459
  }, initOverrides);
1415
- return new JSONApiResponse(response, (jsonValue) => MLBStandingsListFromJSON(jsonValue));
1460
+ return new JSONApiResponse(response, (jsonValue) => DivisionStandingsListFromJSON(jsonValue));
1416
1461
  });
1417
1462
  }
1418
1463
  /**
@@ -1460,7 +1505,7 @@ var MlbApi = class extends BaseAPI {
1460
1505
  headers: headerParameters,
1461
1506
  query: queryParameters
1462
1507
  }, initOverrides);
1463
- return new JSONApiResponse(response, (jsonValue) => MLBTeamsFromJSON(jsonValue));
1508
+ return new JSONApiResponse(response, (jsonValue) => TeamsFromJSON(jsonValue));
1464
1509
  });
1465
1510
  }
1466
1511
  /**
@@ -1481,97 +1526,105 @@ export {
1481
1526
  COLLECTION_FORMATS,
1482
1527
  Configuration,
1483
1528
  DefaultConfig,
1529
+ DivisionFromJSON,
1530
+ DivisionFromJSONTyped,
1531
+ DivisionStandingsFromJSON,
1532
+ DivisionStandingsFromJSONTyped,
1533
+ DivisionStandingsListFromJSON,
1534
+ DivisionStandingsListFromJSONTyped,
1535
+ DivisionStandingsListToJSON,
1536
+ DivisionStandingsToJSON,
1537
+ DivisionToJSON,
1484
1538
  FetchError,
1539
+ GameFromJSON,
1540
+ GameFromJSONTyped,
1541
+ GameStatusCode,
1542
+ GameStatusCodeFromJSON,
1543
+ GameStatusCodeFromJSONTyped,
1544
+ GameStatusCodeToJSON,
1545
+ GameStatusFromJSON,
1546
+ GameStatusFromJSONTyped,
1547
+ GameStatusToJSON,
1548
+ GameTeamFromJSON,
1549
+ GameTeamFromJSONTyped,
1550
+ GameTeamToJSON,
1551
+ GameTeamsFromJSON,
1552
+ GameTeamsFromJSONTyped,
1553
+ GameTeamsToJSON,
1554
+ GameToJSON,
1555
+ GameType,
1556
+ GameTypeFromJSON,
1557
+ GameTypeFromJSONTyped,
1558
+ GameTypeToJSON,
1485
1559
  JSONApiResponse,
1486
- MLBDivisionFromJSON,
1487
- MLBDivisionFromJSONTyped,
1488
- MLBDivisionToJSON,
1489
- MLBGameFromJSON,
1490
- MLBGameFromJSONTyped,
1491
- MLBGameGameTypeEnum,
1492
- MLBGameStatusCodedGameStateEnum,
1493
- MLBGameStatusFromJSON,
1494
- MLBGameStatusFromJSONTyped,
1495
- MLBGameStatusToJSON,
1496
- MLBGameTeamFromJSON,
1497
- MLBGameTeamFromJSONTyped,
1498
- MLBGameTeamToJSON,
1499
- MLBGameTeamsFromJSON,
1500
- MLBGameTeamsFromJSONTyped,
1501
- MLBGameTeamsToJSON,
1502
- MLBGameToJSON,
1503
- MLBLeagueDatesFromJSON,
1504
- MLBLeagueDatesFromJSONTyped,
1505
- MLBLeagueDatesToJSON,
1506
- MLBLeagueFromJSON,
1507
- MLBLeagueFromJSONTyped,
1508
- MLBLeagueRecordFromJSON,
1509
- MLBLeagueRecordFromJSONTyped,
1510
- MLBLeagueRecordToJSON,
1511
- MLBLeagueToJSON,
1512
- MLBRecordFromJSON,
1513
- MLBRecordFromJSONTyped,
1514
- MLBRecordToJSON,
1515
- MLBScheduleDayFromJSON,
1516
- MLBScheduleDayFromJSONTyped,
1517
- MLBScheduleDayToJSON,
1518
- MLBScheduleFromJSON,
1519
- MLBScheduleFromJSONTyped,
1520
- MLBScheduleToJSON,
1521
- MLBSeasonFromJSON,
1522
- MLBSeasonFromJSONTyped,
1523
- MLBSeasonToJSON,
1524
- MLBSeasonsFromJSON,
1525
- MLBSeasonsFromJSONTyped,
1526
- MLBSeasonsToJSON,
1527
- MLBSportFromJSON,
1528
- MLBSportFromJSONTyped,
1529
- MLBSportToJSON,
1530
- MLBStandingsFromJSON,
1531
- MLBStandingsFromJSONTyped,
1532
- MLBStandingsListFromJSON,
1533
- MLBStandingsListFromJSONTyped,
1534
- MLBStandingsListToJSON,
1535
- MLBStandingsToJSON,
1536
- MLBStreakFromJSON,
1537
- MLBStreakFromJSONTyped,
1538
- MLBStreakStreakTypeEnum,
1539
- MLBStreakToJSON,
1540
- MLBTeamFromJSON,
1541
- MLBTeamFromJSONTyped,
1542
- MLBTeamToJSON,
1543
- MLBTeamsFromJSON,
1544
- MLBTeamsFromJSONTyped,
1545
- MLBTeamsToJSON,
1546
- MLBVenueFromJSON,
1547
- MLBVenueFromJSONTyped,
1548
- MLBVenueToJSON,
1560
+ LeagueDatesFromJSON,
1561
+ LeagueDatesFromJSONTyped,
1562
+ LeagueDatesToJSON,
1563
+ LeagueFromJSON,
1564
+ LeagueFromJSONTyped,
1565
+ LeagueRecordFromJSON,
1566
+ LeagueRecordFromJSONTyped,
1567
+ LeagueRecordToJSON,
1568
+ LeagueToJSON,
1549
1569
  MlbApi,
1550
1570
  RequiredError,
1551
1571
  ResponseError,
1572
+ ScheduleDayFromJSON,
1573
+ ScheduleDayFromJSONTyped,
1574
+ ScheduleDayToJSON,
1575
+ ScheduleFromJSON,
1576
+ ScheduleFromJSONTyped,
1577
+ ScheduleToJSON,
1578
+ SeasonFromJSON,
1579
+ SeasonFromJSONTyped,
1580
+ SeasonToJSON,
1581
+ SeasonsFromJSON,
1582
+ SeasonsFromJSONTyped,
1583
+ SeasonsToJSON,
1584
+ SportFromJSON,
1585
+ SportFromJSONTyped,
1586
+ SportToJSON,
1587
+ StreakFromJSON,
1588
+ StreakFromJSONTyped,
1589
+ StreakStreakTypeEnum,
1590
+ StreakToJSON,
1591
+ TeamFromJSON,
1592
+ TeamFromJSONTyped,
1593
+ TeamRecordFromJSON,
1594
+ TeamRecordFromJSONTyped,
1595
+ TeamRecordToJSON,
1596
+ TeamToJSON,
1597
+ TeamsFromJSON,
1598
+ TeamsFromJSONTyped,
1599
+ TeamsToJSON,
1552
1600
  TextApiResponse,
1601
+ VenueFromJSON,
1602
+ VenueFromJSONTyped,
1603
+ VenueToJSON,
1553
1604
  VoidApiResponse,
1554
1605
  canConsumeForm,
1555
- instanceOfMLBDivision,
1556
- instanceOfMLBGame,
1557
- instanceOfMLBGameStatus,
1558
- instanceOfMLBGameTeam,
1559
- instanceOfMLBGameTeams,
1560
- instanceOfMLBLeague,
1561
- instanceOfMLBLeagueDates,
1562
- instanceOfMLBLeagueRecord,
1563
- instanceOfMLBRecord,
1564
- instanceOfMLBSchedule,
1565
- instanceOfMLBScheduleDay,
1566
- instanceOfMLBSeason,
1567
- instanceOfMLBSeasons,
1568
- instanceOfMLBSport,
1569
- instanceOfMLBStandings,
1570
- instanceOfMLBStandingsList,
1571
- instanceOfMLBStreak,
1572
- instanceOfMLBTeam,
1573
- instanceOfMLBTeams,
1574
- instanceOfMLBVenue,
1606
+ instanceOfDivision,
1607
+ instanceOfDivisionStandings,
1608
+ instanceOfDivisionStandingsList,
1609
+ instanceOfGame,
1610
+ instanceOfGameStatus,
1611
+ instanceOfGameStatusCode,
1612
+ instanceOfGameTeam,
1613
+ instanceOfGameTeams,
1614
+ instanceOfGameType,
1615
+ instanceOfLeague,
1616
+ instanceOfLeagueDates,
1617
+ instanceOfLeagueRecord,
1618
+ instanceOfSchedule,
1619
+ instanceOfScheduleDay,
1620
+ instanceOfSeason,
1621
+ instanceOfSeasons,
1622
+ instanceOfSport,
1623
+ instanceOfStreak,
1624
+ instanceOfTeam,
1625
+ instanceOfTeamRecord,
1626
+ instanceOfTeams,
1627
+ instanceOfVenue,
1575
1628
  mapValues,
1576
1629
  querystring
1577
1630
  };