@bp1222/stats-api 0.1.8 → 0.2.1

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,294 @@ 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
+ Canceled: "C"
848
+ };
849
+ function instanceOfGameStatusCode(value) {
850
+ for (const key in GameStatusCode) {
851
+ if (Object.prototype.hasOwnProperty.call(GameStatusCode, key)) {
852
+ if (GameStatusCode[key] === value) {
853
+ return true;
854
+ }
855
+ }
856
+ }
857
+ return false;
858
+ }
859
+ function GameStatusCodeFromJSON(json) {
860
+ return GameStatusCodeFromJSONTyped(json, false);
861
+ }
862
+ function GameStatusCodeFromJSONTyped(json, ignoreDiscriminator) {
863
+ return json;
864
+ }
865
+ function GameStatusCodeToJSON(value) {
866
+ return value;
867
+ }
868
+
869
+ // src/models/GameStatus.ts
870
+ function instanceOfGameStatus(value) {
871
+ return true;
872
+ }
873
+ function GameStatusFromJSON(json) {
874
+ return GameStatusFromJSONTyped(json, false);
875
+ }
876
+ function GameStatusFromJSONTyped(json, ignoreDiscriminator) {
877
+ if (json == null) {
878
+ return json;
879
+ }
880
+ return {
881
+ "abstractGameState": json["abstractGameState"] == null ? void 0 : json["abstractGameState"],
882
+ "codedGameState": json["codedGameState"] == null ? void 0 : GameStatusCodeFromJSON(json["codedGameState"]),
883
+ "detailedState": json["detailedState"] == null ? void 0 : json["detailedState"],
884
+ "statusCode": json["statusCode"] == null ? void 0 : json["statusCode"],
885
+ "startTimeTBD": json["startTimeTBD"] == null ? void 0 : json["startTimeTBD"],
886
+ "abstractGameCode": json["abstractGameCode"] == null ? void 0 : json["abstractGameCode"]
887
+ };
888
+ }
889
+ function GameStatusToJSON(value) {
890
+ if (value == null) {
891
+ return value;
892
+ }
893
+ return {
894
+ "abstractGameState": value["abstractGameState"],
895
+ "codedGameState": GameStatusCodeToJSON(value["codedGameState"]),
896
+ "detailedState": value["detailedState"],
897
+ "statusCode": value["statusCode"],
898
+ "startTimeTBD": value["startTimeTBD"],
899
+ "abstractGameCode": value["abstractGameCode"]
900
+ };
901
+ }
902
+
903
+ // src/models/GameTeam.ts
904
+ function instanceOfGameTeam(value) {
698
905
  if (!("score" in value) || value["score"] === void 0) return false;
699
906
  if (!("team" in value) || value["team"] === void 0) return false;
700
907
  if (!("isWinner" in value) || value["isWinner"] === void 0) return false;
701
908
  return true;
702
909
  }
703
- function MLBGameTeamFromJSON(json) {
704
- return MLBGameTeamFromJSONTyped(json, false);
910
+ function GameTeamFromJSON(json) {
911
+ return GameTeamFromJSONTyped(json, false);
705
912
  }
706
- function MLBGameTeamFromJSONTyped(json, ignoreDiscriminator) {
913
+ function GameTeamFromJSONTyped(json, ignoreDiscriminator) {
707
914
  if (json == null) {
708
915
  return json;
709
916
  }
710
917
  return {
711
- "leagueRecord": json["leagueRecord"] == null ? void 0 : MLBLeagueRecordFromJSON(json["leagueRecord"]),
918
+ "leagueRecord": json["leagueRecord"] == null ? void 0 : LeagueRecordFromJSON(json["leagueRecord"]),
712
919
  "score": json["score"],
713
- "team": MLBTeamFromJSON(json["team"]),
920
+ "team": TeamFromJSON(json["team"]),
714
921
  "isWinner": json["isWinner"],
715
922
  "splitSquad": json["splitSquad"] == null ? void 0 : json["splitSquad"],
716
923
  "seriesNumber": json["seriesNumber"] == null ? void 0 : json["seriesNumber"]
717
924
  };
718
925
  }
719
- function MLBGameTeamToJSON(value) {
926
+ function GameTeamToJSON(value) {
720
927
  if (value == null) {
721
928
  return value;
722
929
  }
723
930
  return {
724
- "leagueRecord": MLBLeagueRecordToJSON(value["leagueRecord"]),
931
+ "leagueRecord": LeagueRecordToJSON(value["leagueRecord"]),
725
932
  "score": value["score"],
726
- "team": MLBTeamToJSON(value["team"]),
933
+ "team": TeamToJSON(value["team"]),
727
934
  "isWinner": value["isWinner"],
728
935
  "splitSquad": value["splitSquad"],
729
936
  "seriesNumber": value["seriesNumber"]
730
937
  };
731
938
  }
732
939
 
733
- // src/models/MLBGameTeams.ts
734
- function instanceOfMLBGameTeams(value) {
940
+ // src/models/GameTeams.ts
941
+ function instanceOfGameTeams(value) {
735
942
  if (!("away" in value) || value["away"] === void 0) return false;
736
943
  if (!("home" in value) || value["home"] === void 0) return false;
737
944
  return true;
738
945
  }
739
- function MLBGameTeamsFromJSON(json) {
740
- return MLBGameTeamsFromJSONTyped(json, false);
946
+ function GameTeamsFromJSON(json) {
947
+ return GameTeamsFromJSONTyped(json, false);
741
948
  }
742
- function MLBGameTeamsFromJSONTyped(json, ignoreDiscriminator) {
949
+ function GameTeamsFromJSONTyped(json, ignoreDiscriminator) {
743
950
  if (json == null) {
744
951
  return json;
745
952
  }
746
953
  return {
747
- "away": MLBGameTeamFromJSON(json["away"]),
748
- "home": MLBGameTeamFromJSON(json["home"])
954
+ "away": GameTeamFromJSON(json["away"]),
955
+ "home": GameTeamFromJSON(json["home"])
749
956
  };
750
957
  }
751
- function MLBGameTeamsToJSON(value) {
958
+ function GameTeamsToJSON(value) {
752
959
  if (value == null) {
753
960
  return value;
754
961
  }
755
962
  return {
756
- "away": MLBGameTeamToJSON(value["away"]),
757
- "home": MLBGameTeamToJSON(value["home"])
963
+ "away": GameTeamToJSON(value["away"]),
964
+ "home": GameTeamToJSON(value["home"])
758
965
  };
759
966
  }
760
967
 
761
- // src/models/MLBGame.ts
762
- var MLBGameGameTypeEnum = {
968
+ // src/models/GameType.ts
969
+ var GameType = {
763
970
  Exhibition: "E",
764
971
  SpringTraining: "S",
765
972
  Regular: "R",
@@ -768,7 +975,28 @@ var MLBGameGameTypeEnum = {
768
975
  LeagueChampionshipSeries: "L",
769
976
  WorldSeries: "W"
770
977
  };
771
- function instanceOfMLBGame(value) {
978
+ function instanceOfGameType(value) {
979
+ for (const key in GameType) {
980
+ if (Object.prototype.hasOwnProperty.call(GameType, key)) {
981
+ if (GameType[key] === value) {
982
+ return true;
983
+ }
984
+ }
985
+ }
986
+ return false;
987
+ }
988
+ function GameTypeFromJSON(json) {
989
+ return GameTypeFromJSONTyped(json, false);
990
+ }
991
+ function GameTypeFromJSONTyped(json, ignoreDiscriminator) {
992
+ return json;
993
+ }
994
+ function GameTypeToJSON(value) {
995
+ return value;
996
+ }
997
+
998
+ // src/models/Game.ts
999
+ function instanceOfGame(value) {
772
1000
  if (!("gamePk" in value) || value["gamePk"] === void 0) return false;
773
1001
  if (!("gameGuid" in value) || value["gameGuid"] === void 0) return false;
774
1002
  if (!("gameType" in value) || value["gameType"] === void 0) return false;
@@ -782,10 +1010,10 @@ function instanceOfMLBGame(value) {
782
1010
  if (!("seriesGameNumber" in value) || value["seriesGameNumber"] === void 0) return false;
783
1011
  return true;
784
1012
  }
785
- function MLBGameFromJSON(json) {
786
- return MLBGameFromJSONTyped(json, false);
1013
+ function GameFromJSON(json) {
1014
+ return GameFromJSONTyped(json, false);
787
1015
  }
788
- function MLBGameFromJSONTyped(json, ignoreDiscriminator) {
1016
+ function GameFromJSONTyped(json, ignoreDiscriminator) {
789
1017
  if (json == null) {
790
1018
  return json;
791
1019
  }
@@ -793,7 +1021,7 @@ function MLBGameFromJSONTyped(json, ignoreDiscriminator) {
793
1021
  "gamePk": json["gamePk"],
794
1022
  "gameGuid": json["gameGuid"],
795
1023
  "link": json["link"] == null ? void 0 : json["link"],
796
- "gameType": json["gameType"],
1024
+ "gameType": GameTypeFromJSON(json["gameType"]),
797
1025
  "season": json["season"],
798
1026
  "gameDate": json["gameDate"],
799
1027
  "officialDate": json["officialDate"],
@@ -801,9 +1029,9 @@ function MLBGameFromJSONTyped(json, ignoreDiscriminator) {
801
1029
  "rescheduledToDate": json["rescheduledToDate"] == null ? void 0 : json["rescheduledToDate"],
802
1030
  "rescheduledFrom": json["rescheduledFrom"] == null ? void 0 : json["rescheduledFrom"],
803
1031
  "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"]),
1032
+ "status": GameStatusFromJSON(json["status"]),
1033
+ "teams": GameTeamsFromJSON(json["teams"]),
1034
+ "venue": json["venue"] == null ? void 0 : VenueFromJSON(json["venue"]),
807
1035
  "isTie": json["isTie"] == null ? void 0 : json["isTie"],
808
1036
  "gameNumber": json["gameNumber"],
809
1037
  "publicFacing": json["publicFacing"] == null ? void 0 : json["publicFacing"],
@@ -825,7 +1053,7 @@ function MLBGameFromJSONTyped(json, ignoreDiscriminator) {
825
1053
  "ifNecessaryDescription": json["ifNecessaryDescription"] == null ? void 0 : json["ifNecessaryDescription"]
826
1054
  };
827
1055
  }
828
- function MLBGameToJSON(value) {
1056
+ function GameToJSON(value) {
829
1057
  if (value == null) {
830
1058
  return value;
831
1059
  }
@@ -833,7 +1061,7 @@ function MLBGameToJSON(value) {
833
1061
  "gamePk": value["gamePk"],
834
1062
  "gameGuid": value["gameGuid"],
835
1063
  "link": value["link"],
836
- "gameType": value["gameType"],
1064
+ "gameType": GameTypeToJSON(value["gameType"]),
837
1065
  "season": value["season"],
838
1066
  "gameDate": value["gameDate"],
839
1067
  "officialDate": value["officialDate"],
@@ -841,9 +1069,9 @@ function MLBGameToJSON(value) {
841
1069
  "rescheduledToDate": value["rescheduledToDate"],
842
1070
  "rescheduledFrom": value["rescheduledFrom"],
843
1071
  "rescheduledFromDate": value["rescheduledFromDate"],
844
- "status": MLBGameStatusToJSON(value["status"]),
845
- "teams": MLBGameTeamsToJSON(value["teams"]),
846
- "venue": MLBVenueToJSON(value["venue"]),
1072
+ "status": GameStatusToJSON(value["status"]),
1073
+ "teams": GameTeamsToJSON(value["teams"]),
1074
+ "venue": VenueToJSON(value["venue"]),
847
1075
  "isTie": value["isTie"],
848
1076
  "gameNumber": value["gameNumber"],
849
1077
  "publicFacing": value["publicFacing"],
@@ -866,138 +1094,15 @@ function MLBGameToJSON(value) {
866
1094
  };
867
1095
  }
868
1096
 
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) {
1097
+ // src/models/ScheduleDay.ts
1098
+ function instanceOfScheduleDay(value) {
994
1099
  if (!("games" in value) || value["games"] === void 0) return false;
995
1100
  return true;
996
1101
  }
997
- function MLBScheduleDayFromJSON(json) {
998
- return MLBScheduleDayFromJSONTyped(json, false);
1102
+ function ScheduleDayFromJSON(json) {
1103
+ return ScheduleDayFromJSONTyped(json, false);
999
1104
  }
1000
- function MLBScheduleDayFromJSONTyped(json, ignoreDiscriminator) {
1105
+ function ScheduleDayFromJSONTyped(json, ignoreDiscriminator) {
1001
1106
  if (json == null) {
1002
1107
  return json;
1003
1108
  }
@@ -1007,10 +1112,10 @@ function MLBScheduleDayFromJSONTyped(json, ignoreDiscriminator) {
1007
1112
  "totalEvents": json["totalEvents"] == null ? void 0 : json["totalEvents"],
1008
1113
  "totalGames": json["totalGames"] == null ? void 0 : json["totalGames"],
1009
1114
  "totalGamesInProgress": json["totalGamesInProgress"] == null ? void 0 : json["totalGamesInProgress"],
1010
- "games": json["games"].map(MLBGameFromJSON)
1115
+ "games": json["games"].map(GameFromJSON)
1011
1116
  };
1012
1117
  }
1013
- function MLBScheduleDayToJSON(value) {
1118
+ function ScheduleDayToJSON(value) {
1014
1119
  if (value == null) {
1015
1120
  return value;
1016
1121
  }
@@ -1020,12 +1125,12 @@ function MLBScheduleDayToJSON(value) {
1020
1125
  "totalEvents": value["totalEvents"],
1021
1126
  "totalGames": value["totalGames"],
1022
1127
  "totalGamesInProgress": value["totalGamesInProgress"],
1023
- "games": value["games"].map(MLBGameToJSON)
1128
+ "games": value["games"].map(GameToJSON)
1024
1129
  };
1025
1130
  }
1026
1131
 
1027
- // src/models/MLBSchedule.ts
1028
- function instanceOfMLBSchedule(value) {
1132
+ // src/models/Schedule.ts
1133
+ function instanceOfSchedule(value) {
1029
1134
  if (!("totalItems" in value) || value["totalItems"] === void 0) return false;
1030
1135
  if (!("totalEvents" in value) || value["totalEvents"] === void 0) return false;
1031
1136
  if (!("totalGames" in value) || value["totalGames"] === void 0) return false;
@@ -1033,10 +1138,10 @@ function instanceOfMLBSchedule(value) {
1033
1138
  if (!("dates" in value) || value["dates"] === void 0) return false;
1034
1139
  return true;
1035
1140
  }
1036
- function MLBScheduleFromJSON(json) {
1037
- return MLBScheduleFromJSONTyped(json, false);
1141
+ function ScheduleFromJSON(json) {
1142
+ return ScheduleFromJSONTyped(json, false);
1038
1143
  }
1039
- function MLBScheduleFromJSONTyped(json, ignoreDiscriminator) {
1144
+ function ScheduleFromJSONTyped(json, ignoreDiscriminator) {
1040
1145
  if (json == null) {
1041
1146
  return json;
1042
1147
  }
@@ -1045,10 +1150,10 @@ function MLBScheduleFromJSONTyped(json, ignoreDiscriminator) {
1045
1150
  "totalEvents": json["totalEvents"],
1046
1151
  "totalGames": json["totalGames"],
1047
1152
  "totalGamesInProgress": json["totalGamesInProgress"],
1048
- "dates": json["dates"].map(MLBScheduleDayFromJSON)
1153
+ "dates": json["dates"].map(ScheduleDayFromJSON)
1049
1154
  };
1050
1155
  }
1051
- function MLBScheduleToJSON(value) {
1156
+ function ScheduleToJSON(value) {
1052
1157
  if (value == null) {
1053
1158
  return value;
1054
1159
  }
@@ -1057,12 +1162,12 @@ function MLBScheduleToJSON(value) {
1057
1162
  "totalEvents": value["totalEvents"],
1058
1163
  "totalGames": value["totalGames"],
1059
1164
  "totalGamesInProgress": value["totalGamesInProgress"],
1060
- "dates": value["dates"].map(MLBScheduleDayToJSON)
1165
+ "dates": value["dates"].map(ScheduleDayToJSON)
1061
1166
  };
1062
1167
  }
1063
1168
 
1064
- // src/models/MLBSeason.ts
1065
- function instanceOfMLBSeason(value) {
1169
+ // src/models/Season.ts
1170
+ function instanceOfSeason(value) {
1066
1171
  if (!("seasonId" in value) || value["seasonId"] === void 0) return false;
1067
1172
  if (!("seasonStartDate" in value) || value["seasonStartDate"] === void 0) return false;
1068
1173
  if (!("seasonEndDate" in value) || value["seasonEndDate"] === void 0) return false;
@@ -1070,10 +1175,10 @@ function instanceOfMLBSeason(value) {
1070
1175
  if (!("regularSeasonEndDate" in value) || value["regularSeasonEndDate"] === void 0) return false;
1071
1176
  return true;
1072
1177
  }
1073
- function MLBSeasonFromJSON(json) {
1074
- return MLBSeasonFromJSONTyped(json, false);
1178
+ function SeasonFromJSON(json) {
1179
+ return SeasonFromJSONTyped(json, false);
1075
1180
  }
1076
- function MLBSeasonFromJSONTyped(json, ignoreDiscriminator) {
1181
+ function SeasonFromJSONTyped(json, ignoreDiscriminator) {
1077
1182
  if (json == null) {
1078
1183
  return json;
1079
1184
  }
@@ -1101,7 +1206,7 @@ function MLBSeasonFromJSONTyped(json, ignoreDiscriminator) {
1101
1206
  "qualifierOutsPitched": json["qualifierOutsPitched"] == null ? void 0 : json["qualifierOutsPitched"]
1102
1207
  };
1103
1208
  }
1104
- function MLBSeasonToJSON(value) {
1209
+ function SeasonToJSON(value) {
1105
1210
  if (value == null) {
1106
1211
  return value;
1107
1212
  }
@@ -1130,113 +1235,51 @@ function MLBSeasonToJSON(value) {
1130
1235
  };
1131
1236
  }
1132
1237
 
1133
- // src/models/MLBSeasons.ts
1134
- function instanceOfMLBSeasons(value) {
1238
+ // src/models/Seasons.ts
1239
+ function instanceOfSeasons(value) {
1135
1240
  return true;
1136
1241
  }
1137
- function MLBSeasonsFromJSON(json) {
1138
- return MLBSeasonsFromJSONTyped(json, false);
1242
+ function SeasonsFromJSON(json) {
1243
+ return SeasonsFromJSONTyped(json, false);
1139
1244
  }
1140
- function MLBSeasonsFromJSONTyped(json, ignoreDiscriminator) {
1245
+ function SeasonsFromJSONTyped(json, ignoreDiscriminator) {
1141
1246
  if (json == null) {
1142
1247
  return json;
1143
1248
  }
1144
1249
  return {
1145
- "seasons": json["seasons"] == null ? void 0 : json["seasons"].map(MLBSeasonFromJSON)
1250
+ "seasons": json["seasons"] == null ? void 0 : json["seasons"].map(SeasonFromJSON)
1146
1251
  };
1147
1252
  }
1148
- function MLBSeasonsToJSON(value) {
1253
+ function SeasonsToJSON(value) {
1149
1254
  if (value == null) {
1150
1255
  return value;
1151
1256
  }
1152
1257
  return {
1153
- "seasons": value["seasons"] == null ? void 0 : value["seasons"].map(MLBSeasonToJSON)
1258
+ "seasons": value["seasons"] == null ? void 0 : value["seasons"].map(SeasonToJSON)
1154
1259
  };
1155
1260
  }
1156
1261
 
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;
1262
+ // src/models/Teams.ts
1263
+ function instanceOfTeams(value) {
1163
1264
  return true;
1164
1265
  }
1165
- function MLBStandingsFromJSON(json) {
1166
- return MLBStandingsFromJSONTyped(json, false);
1266
+ function TeamsFromJSON(json) {
1267
+ return TeamsFromJSONTyped(json, false);
1167
1268
  }
1168
- function MLBStandingsFromJSONTyped(json, ignoreDiscriminator) {
1269
+ function TeamsFromJSONTyped(json, ignoreDiscriminator) {
1169
1270
  if (json == null) {
1170
1271
  return json;
1171
1272
  }
1172
1273
  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)
1274
+ "teams": json["teams"] == null ? void 0 : json["teams"].map(TeamFromJSON)
1179
1275
  };
1180
1276
  }
1181
- function MLBStandingsToJSON(value) {
1277
+ function TeamsToJSON(value) {
1182
1278
  if (value == null) {
1183
1279
  return value;
1184
1280
  }
1185
1281
  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)
1282
+ "teams": value["teams"] == null ? void 0 : value["teams"].map(TeamToJSON)
1240
1283
  };
1241
1284
  }
1242
1285
 
@@ -1265,7 +1308,7 @@ var MlbApi = class extends BaseAPI {
1265
1308
  headers: headerParameters,
1266
1309
  query: queryParameters
1267
1310
  }, initOverrides);
1268
- return new JSONApiResponse(response, (jsonValue) => MLBSeasonsFromJSON(jsonValue));
1311
+ return new JSONApiResponse(response, (jsonValue) => SeasonsFromJSON(jsonValue));
1269
1312
  });
1270
1313
  }
1271
1314
  /**
@@ -1297,6 +1340,9 @@ var MlbApi = class extends BaseAPI {
1297
1340
  if (requestParameters["teamId"] != null) {
1298
1341
  queryParameters["teamId"] = requestParameters["teamId"];
1299
1342
  }
1343
+ if (requestParameters["gameTypes"] != null) {
1344
+ queryParameters["gameTypes"] = requestParameters["gameTypes"];
1345
+ }
1300
1346
  if (requestParameters["startDate"] != null) {
1301
1347
  queryParameters["startDate"] = requestParameters["startDate"];
1302
1348
  }
@@ -1313,7 +1359,7 @@ var MlbApi = class extends BaseAPI {
1313
1359
  headers: headerParameters,
1314
1360
  query: queryParameters
1315
1361
  }, initOverrides);
1316
- return new JSONApiResponse(response, (jsonValue) => MLBScheduleFromJSON(jsonValue));
1362
+ return new JSONApiResponse(response, (jsonValue) => ScheduleFromJSON(jsonValue));
1317
1363
  });
1318
1364
  }
1319
1365
  /**
@@ -1358,7 +1404,7 @@ var MlbApi = class extends BaseAPI {
1358
1404
  headers: headerParameters,
1359
1405
  query: queryParameters
1360
1406
  }, initOverrides);
1361
- return new JSONApiResponse(response, (jsonValue) => MLBSeasonsFromJSON(jsonValue));
1407
+ return new JSONApiResponse(response, (jsonValue) => SeasonsFromJSON(jsonValue));
1362
1408
  });
1363
1409
  }
1364
1410
  /**
@@ -1412,7 +1458,7 @@ var MlbApi = class extends BaseAPI {
1412
1458
  headers: headerParameters,
1413
1459
  query: queryParameters
1414
1460
  }, initOverrides);
1415
- return new JSONApiResponse(response, (jsonValue) => MLBStandingsListFromJSON(jsonValue));
1461
+ return new JSONApiResponse(response, (jsonValue) => DivisionStandingsListFromJSON(jsonValue));
1416
1462
  });
1417
1463
  }
1418
1464
  /**
@@ -1460,7 +1506,7 @@ var MlbApi = class extends BaseAPI {
1460
1506
  headers: headerParameters,
1461
1507
  query: queryParameters
1462
1508
  }, initOverrides);
1463
- return new JSONApiResponse(response, (jsonValue) => MLBTeamsFromJSON(jsonValue));
1509
+ return new JSONApiResponse(response, (jsonValue) => TeamsFromJSON(jsonValue));
1464
1510
  });
1465
1511
  }
1466
1512
  /**
@@ -1481,97 +1527,105 @@ export {
1481
1527
  COLLECTION_FORMATS,
1482
1528
  Configuration,
1483
1529
  DefaultConfig,
1530
+ DivisionFromJSON,
1531
+ DivisionFromJSONTyped,
1532
+ DivisionStandingsFromJSON,
1533
+ DivisionStandingsFromJSONTyped,
1534
+ DivisionStandingsListFromJSON,
1535
+ DivisionStandingsListFromJSONTyped,
1536
+ DivisionStandingsListToJSON,
1537
+ DivisionStandingsToJSON,
1538
+ DivisionToJSON,
1484
1539
  FetchError,
1540
+ GameFromJSON,
1541
+ GameFromJSONTyped,
1542
+ GameStatusCode,
1543
+ GameStatusCodeFromJSON,
1544
+ GameStatusCodeFromJSONTyped,
1545
+ GameStatusCodeToJSON,
1546
+ GameStatusFromJSON,
1547
+ GameStatusFromJSONTyped,
1548
+ GameStatusToJSON,
1549
+ GameTeamFromJSON,
1550
+ GameTeamFromJSONTyped,
1551
+ GameTeamToJSON,
1552
+ GameTeamsFromJSON,
1553
+ GameTeamsFromJSONTyped,
1554
+ GameTeamsToJSON,
1555
+ GameToJSON,
1556
+ GameType,
1557
+ GameTypeFromJSON,
1558
+ GameTypeFromJSONTyped,
1559
+ GameTypeToJSON,
1485
1560
  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,
1561
+ LeagueDatesFromJSON,
1562
+ LeagueDatesFromJSONTyped,
1563
+ LeagueDatesToJSON,
1564
+ LeagueFromJSON,
1565
+ LeagueFromJSONTyped,
1566
+ LeagueRecordFromJSON,
1567
+ LeagueRecordFromJSONTyped,
1568
+ LeagueRecordToJSON,
1569
+ LeagueToJSON,
1549
1570
  MlbApi,
1550
1571
  RequiredError,
1551
1572
  ResponseError,
1573
+ ScheduleDayFromJSON,
1574
+ ScheduleDayFromJSONTyped,
1575
+ ScheduleDayToJSON,
1576
+ ScheduleFromJSON,
1577
+ ScheduleFromJSONTyped,
1578
+ ScheduleToJSON,
1579
+ SeasonFromJSON,
1580
+ SeasonFromJSONTyped,
1581
+ SeasonToJSON,
1582
+ SeasonsFromJSON,
1583
+ SeasonsFromJSONTyped,
1584
+ SeasonsToJSON,
1585
+ SportFromJSON,
1586
+ SportFromJSONTyped,
1587
+ SportToJSON,
1588
+ StreakFromJSON,
1589
+ StreakFromJSONTyped,
1590
+ StreakStreakTypeEnum,
1591
+ StreakToJSON,
1592
+ TeamFromJSON,
1593
+ TeamFromJSONTyped,
1594
+ TeamRecordFromJSON,
1595
+ TeamRecordFromJSONTyped,
1596
+ TeamRecordToJSON,
1597
+ TeamToJSON,
1598
+ TeamsFromJSON,
1599
+ TeamsFromJSONTyped,
1600
+ TeamsToJSON,
1552
1601
  TextApiResponse,
1602
+ VenueFromJSON,
1603
+ VenueFromJSONTyped,
1604
+ VenueToJSON,
1553
1605
  VoidApiResponse,
1554
1606
  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,
1607
+ instanceOfDivision,
1608
+ instanceOfDivisionStandings,
1609
+ instanceOfDivisionStandingsList,
1610
+ instanceOfGame,
1611
+ instanceOfGameStatus,
1612
+ instanceOfGameStatusCode,
1613
+ instanceOfGameTeam,
1614
+ instanceOfGameTeams,
1615
+ instanceOfGameType,
1616
+ instanceOfLeague,
1617
+ instanceOfLeagueDates,
1618
+ instanceOfLeagueRecord,
1619
+ instanceOfSchedule,
1620
+ instanceOfScheduleDay,
1621
+ instanceOfSeason,
1622
+ instanceOfSeasons,
1623
+ instanceOfSport,
1624
+ instanceOfStreak,
1625
+ instanceOfTeam,
1626
+ instanceOfTeamRecord,
1627
+ instanceOfTeams,
1628
+ instanceOfVenue,
1575
1629
  mapValues,
1576
1630
  querystring
1577
1631
  };