@bp1222/stats-api 0.2.3 → 0.2.5

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.js CHANGED
@@ -60,6 +60,14 @@ __export(src_exports, {
60
60
  BASE_PATH: () => BASE_PATH,
61
61
  BaseAPI: () => BaseAPI,
62
62
  BlobApiResponse: () => BlobApiResponse,
63
+ BoxscoreFromJSON: () => BoxscoreFromJSON,
64
+ BoxscoreFromJSONTyped: () => BoxscoreFromJSONTyped,
65
+ BoxscoreTeamsFromJSON: () => BoxscoreTeamsFromJSON,
66
+ BoxscoreTeamsFromJSONTyped: () => BoxscoreTeamsFromJSONTyped,
67
+ BoxscoreTeamsToJSON: () => BoxscoreTeamsToJSON,
68
+ BoxscoreTeamsToJSONTyped: () => BoxscoreTeamsToJSONTyped,
69
+ BoxscoreToJSON: () => BoxscoreToJSON,
70
+ BoxscoreToJSONTyped: () => BoxscoreToJSONTyped,
63
71
  COLLECTION_FORMATS: () => COLLECTION_FORMATS,
64
72
  Configuration: () => Configuration,
65
73
  DefaultConfig: () => DefaultConfig,
@@ -70,100 +78,143 @@ __export(src_exports, {
70
78
  DivisionStandingsListFromJSON: () => DivisionStandingsListFromJSON,
71
79
  DivisionStandingsListFromJSONTyped: () => DivisionStandingsListFromJSONTyped,
72
80
  DivisionStandingsListToJSON: () => DivisionStandingsListToJSON,
81
+ DivisionStandingsListToJSONTyped: () => DivisionStandingsListToJSONTyped,
73
82
  DivisionStandingsToJSON: () => DivisionStandingsToJSON,
83
+ DivisionStandingsToJSONTyped: () => DivisionStandingsToJSONTyped,
74
84
  DivisionToJSON: () => DivisionToJSON,
85
+ DivisionToJSONTyped: () => DivisionToJSONTyped,
75
86
  FetchError: () => FetchError,
76
87
  GameFromJSON: () => GameFromJSON,
77
88
  GameFromJSONTyped: () => GameFromJSONTyped,
89
+ GameOfficialFromJSON: () => GameOfficialFromJSON,
90
+ GameOfficialFromJSONTyped: () => GameOfficialFromJSONTyped,
91
+ GameOfficialToJSON: () => GameOfficialToJSON,
92
+ GameOfficialToJSONTyped: () => GameOfficialToJSONTyped,
78
93
  GameStatusCode: () => GameStatusCode,
79
94
  GameStatusCodeFromJSON: () => GameStatusCodeFromJSON,
80
95
  GameStatusCodeFromJSONTyped: () => GameStatusCodeFromJSONTyped,
81
96
  GameStatusCodeToJSON: () => GameStatusCodeToJSON,
97
+ GameStatusCodeToJSONTyped: () => GameStatusCodeToJSONTyped,
82
98
  GameStatusFromJSON: () => GameStatusFromJSON,
83
99
  GameStatusFromJSONTyped: () => GameStatusFromJSONTyped,
84
100
  GameStatusToJSON: () => GameStatusToJSON,
101
+ GameStatusToJSONTyped: () => GameStatusToJSONTyped,
85
102
  GameTeamFromJSON: () => GameTeamFromJSON,
86
103
  GameTeamFromJSONTyped: () => GameTeamFromJSONTyped,
87
104
  GameTeamToJSON: () => GameTeamToJSON,
105
+ GameTeamToJSONTyped: () => GameTeamToJSONTyped,
88
106
  GameTeamsFromJSON: () => GameTeamsFromJSON,
89
107
  GameTeamsFromJSONTyped: () => GameTeamsFromJSONTyped,
90
108
  GameTeamsToJSON: () => GameTeamsToJSON,
109
+ GameTeamsToJSONTyped: () => GameTeamsToJSONTyped,
91
110
  GameToJSON: () => GameToJSON,
111
+ GameToJSONTyped: () => GameToJSONTyped,
92
112
  GameType: () => GameType,
93
113
  GameTypeFromJSON: () => GameTypeFromJSON,
94
114
  GameTypeFromJSONTyped: () => GameTypeFromJSONTyped,
95
115
  GameTypeToJSON: () => GameTypeToJSON,
116
+ GameTypeToJSONTyped: () => GameTypeToJSONTyped,
96
117
  InningFromJSON: () => InningFromJSON,
97
118
  InningFromJSONTyped: () => InningFromJSONTyped,
98
- InningTeamFromJSON: () => InningTeamFromJSON,
99
- InningTeamFromJSONTyped: () => InningTeamFromJSONTyped,
100
- InningTeamToJSON: () => InningTeamToJSON,
101
119
  InningToJSON: () => InningToJSON,
120
+ InningToJSONTyped: () => InningToJSONTyped,
102
121
  JSONApiResponse: () => JSONApiResponse,
103
122
  LeagueDatesFromJSON: () => LeagueDatesFromJSON,
104
123
  LeagueDatesFromJSONTyped: () => LeagueDatesFromJSONTyped,
105
124
  LeagueDatesToJSON: () => LeagueDatesToJSON,
125
+ LeagueDatesToJSONTyped: () => LeagueDatesToJSONTyped,
106
126
  LeagueFromJSON: () => LeagueFromJSON,
107
127
  LeagueFromJSONTyped: () => LeagueFromJSONTyped,
108
128
  LeagueRecordFromJSON: () => LeagueRecordFromJSON,
109
129
  LeagueRecordFromJSONTyped: () => LeagueRecordFromJSONTyped,
110
130
  LeagueRecordToJSON: () => LeagueRecordToJSON,
131
+ LeagueRecordToJSONTyped: () => LeagueRecordToJSONTyped,
111
132
  LeagueToJSON: () => LeagueToJSON,
133
+ LeagueToJSONTyped: () => LeagueToJSONTyped,
112
134
  LinescoreFromJSON: () => LinescoreFromJSON,
113
135
  LinescoreFromJSONTyped: () => LinescoreFromJSONTyped,
136
+ LinescoreTeamFromJSON: () => LinescoreTeamFromJSON,
137
+ LinescoreTeamFromJSONTyped: () => LinescoreTeamFromJSONTyped,
138
+ LinescoreTeamToJSON: () => LinescoreTeamToJSON,
139
+ LinescoreTeamToJSONTyped: () => LinescoreTeamToJSONTyped,
140
+ LinescoreTeamsFromJSON: () => LinescoreTeamsFromJSON,
141
+ LinescoreTeamsFromJSONTyped: () => LinescoreTeamsFromJSONTyped,
142
+ LinescoreTeamsToJSON: () => LinescoreTeamsToJSON,
143
+ LinescoreTeamsToJSONTyped: () => LinescoreTeamsToJSONTyped,
114
144
  LinescoreToJSON: () => LinescoreToJSON,
145
+ LinescoreToJSONTyped: () => LinescoreToJSONTyped,
115
146
  MlbApi: () => MlbApi,
147
+ OfficialFromJSON: () => OfficialFromJSON,
148
+ OfficialFromJSONTyped: () => OfficialFromJSONTyped,
149
+ OfficialToJSON: () => OfficialToJSON,
150
+ OfficialToJSONTyped: () => OfficialToJSONTyped,
151
+ RecordFromJSON: () => RecordFromJSON,
152
+ RecordFromJSONTyped: () => RecordFromJSONTyped,
153
+ RecordToJSON: () => RecordToJSON,
154
+ RecordToJSONTyped: () => RecordToJSONTyped,
116
155
  RequiredError: () => RequiredError,
117
156
  ResponseError: () => ResponseError,
118
157
  ScheduleDayFromJSON: () => ScheduleDayFromJSON,
119
158
  ScheduleDayFromJSONTyped: () => ScheduleDayFromJSONTyped,
120
159
  ScheduleDayToJSON: () => ScheduleDayToJSON,
160
+ ScheduleDayToJSONTyped: () => ScheduleDayToJSONTyped,
121
161
  ScheduleFromJSON: () => ScheduleFromJSON,
122
162
  ScheduleFromJSONTyped: () => ScheduleFromJSONTyped,
123
163
  ScheduleToJSON: () => ScheduleToJSON,
164
+ ScheduleToJSONTyped: () => ScheduleToJSONTyped,
124
165
  SeasonFromJSON: () => SeasonFromJSON,
125
166
  SeasonFromJSONTyped: () => SeasonFromJSONTyped,
126
167
  SeasonToJSON: () => SeasonToJSON,
168
+ SeasonToJSONTyped: () => SeasonToJSONTyped,
127
169
  SeasonsFromJSON: () => SeasonsFromJSON,
128
170
  SeasonsFromJSONTyped: () => SeasonsFromJSONTyped,
129
171
  SeasonsToJSON: () => SeasonsToJSON,
172
+ SeasonsToJSONTyped: () => SeasonsToJSONTyped,
130
173
  SportFromJSON: () => SportFromJSON,
131
174
  SportFromJSONTyped: () => SportFromJSONTyped,
132
175
  SportToJSON: () => SportToJSON,
176
+ SportToJSONTyped: () => SportToJSONTyped,
133
177
  StreakFromJSON: () => StreakFromJSON,
134
178
  StreakFromJSONTyped: () => StreakFromJSONTyped,
135
179
  StreakStreakTypeEnum: () => StreakStreakTypeEnum,
136
180
  StreakToJSON: () => StreakToJSON,
181
+ StreakToJSONTyped: () => StreakToJSONTyped,
137
182
  TeamFromJSON: () => TeamFromJSON,
138
- TeamFromJSONTyped: () => TeamFromJSONTyped,
139
- TeamRecordFromJSON: () => TeamRecordFromJSON,
140
- TeamRecordFromJSONTyped: () => TeamRecordFromJSONTyped,
141
- TeamRecordToJSON: () => TeamRecordToJSON,
183
+ TeamFromJSONTyped: () => TeamFromJSONTyped2,
142
184
  TeamToJSON: () => TeamToJSON,
185
+ TeamToJSONTyped: () => TeamToJSONTyped2,
143
186
  TeamsFromJSON: () => TeamsFromJSON,
144
187
  TeamsFromJSONTyped: () => TeamsFromJSONTyped,
145
188
  TeamsToJSON: () => TeamsToJSON,
189
+ TeamsToJSONTyped: () => TeamsToJSONTyped,
146
190
  TextApiResponse: () => TextApiResponse,
147
191
  VenueFromJSON: () => VenueFromJSON,
148
192
  VenueFromJSONTyped: () => VenueFromJSONTyped,
149
193
  VenueToJSON: () => VenueToJSON,
194
+ VenueToJSONTyped: () => VenueToJSONTyped,
150
195
  VoidApiResponse: () => VoidApiResponse,
151
196
  canConsumeForm: () => canConsumeForm,
197
+ instanceOfBoxscore: () => instanceOfBoxscore,
198
+ instanceOfBoxscoreTeams: () => instanceOfBoxscoreTeams,
152
199
  instanceOfDivision: () => instanceOfDivision,
153
200
  instanceOfDivisionStandings: () => instanceOfDivisionStandings,
154
201
  instanceOfDivisionStandingsList: () => instanceOfDivisionStandingsList,
155
202
  instanceOfGame: () => instanceOfGame,
203
+ instanceOfGameOfficial: () => instanceOfGameOfficial,
156
204
  instanceOfGameStatus: () => instanceOfGameStatus,
157
205
  instanceOfGameStatusCode: () => instanceOfGameStatusCode,
158
206
  instanceOfGameTeam: () => instanceOfGameTeam,
159
207
  instanceOfGameTeams: () => instanceOfGameTeams,
160
208
  instanceOfGameType: () => instanceOfGameType,
161
209
  instanceOfInning: () => instanceOfInning,
162
- instanceOfInningTeam: () => instanceOfInningTeam,
163
210
  instanceOfLeague: () => instanceOfLeague,
164
211
  instanceOfLeagueDates: () => instanceOfLeagueDates,
165
212
  instanceOfLeagueRecord: () => instanceOfLeagueRecord,
166
213
  instanceOfLinescore: () => instanceOfLinescore,
214
+ instanceOfLinescoreTeam: () => instanceOfLinescoreTeam,
215
+ instanceOfLinescoreTeams: () => instanceOfLinescoreTeams,
216
+ instanceOfOfficial: () => instanceOfOfficial,
217
+ instanceOfRecord: () => instanceOfRecord,
167
218
  instanceOfSchedule: () => instanceOfSchedule,
168
219
  instanceOfScheduleDay: () => instanceOfScheduleDay,
169
220
  instanceOfSeason: () => instanceOfSeason,
@@ -171,7 +222,6 @@ __export(src_exports, {
171
222
  instanceOfSport: () => instanceOfSport,
172
223
  instanceOfStreak: () => instanceOfStreak,
173
224
  instanceOfTeam: () => instanceOfTeam,
174
- instanceOfTeamRecord: () => instanceOfTeamRecord,
175
225
  instanceOfTeams: () => instanceOfTeams,
176
226
  instanceOfVenue: () => instanceOfVenue,
177
227
  mapValues: () => mapValues,
@@ -476,6 +526,66 @@ var TextApiResponse = class {
476
526
  }
477
527
  };
478
528
 
529
+ // src/models/Official.ts
530
+ function instanceOfOfficial(value) {
531
+ return true;
532
+ }
533
+ function OfficialFromJSON(json) {
534
+ return OfficialFromJSONTyped(json, false);
535
+ }
536
+ function OfficialFromJSONTyped(json, ignoreDiscriminator) {
537
+ if (json == null) {
538
+ return json;
539
+ }
540
+ return {
541
+ "id": json["id"] == null ? void 0 : json["id"],
542
+ "fullName": json["fullName"] == null ? void 0 : json["fullName"],
543
+ "link": json["link"] == null ? void 0 : json["link"]
544
+ };
545
+ }
546
+ function OfficialToJSON(json) {
547
+ return OfficialToJSONTyped(json, false);
548
+ }
549
+ function OfficialToJSONTyped(value, ignoreDiscriminator = false) {
550
+ if (value == null) {
551
+ return value;
552
+ }
553
+ return {
554
+ "id": value["id"],
555
+ "fullName": value["fullName"],
556
+ "link": value["link"]
557
+ };
558
+ }
559
+
560
+ // src/models/GameOfficial.ts
561
+ function instanceOfGameOfficial(value) {
562
+ return true;
563
+ }
564
+ function GameOfficialFromJSON(json) {
565
+ return GameOfficialFromJSONTyped(json, false);
566
+ }
567
+ function GameOfficialFromJSONTyped(json, ignoreDiscriminator) {
568
+ if (json == null) {
569
+ return json;
570
+ }
571
+ return {
572
+ "official": json["official"] == null ? void 0 : OfficialFromJSON(json["official"]),
573
+ "officialType": json["officialType"] == null ? void 0 : json["officialType"]
574
+ };
575
+ }
576
+ function GameOfficialToJSON(json) {
577
+ return GameOfficialToJSONTyped(json, false);
578
+ }
579
+ function GameOfficialToJSONTyped(value, ignoreDiscriminator = false) {
580
+ if (value == null) {
581
+ return value;
582
+ }
583
+ return {
584
+ "official": OfficialToJSON(value["official"]),
585
+ "officialType": value["officialType"]
586
+ };
587
+ }
588
+
479
589
  // src/models/LeagueDates.ts
480
590
  function instanceOfLeagueDates(value) {
481
591
  return true;
@@ -500,7 +610,10 @@ function LeagueDatesFromJSONTyped(json, ignoreDiscriminator) {
500
610
  "gameLevelGamedayType": json["gameLevelGamedayType"] == null ? void 0 : json["gameLevelGamedayType"]
501
611
  };
502
612
  }
503
- function LeagueDatesToJSON(value) {
613
+ function LeagueDatesToJSON(json) {
614
+ return LeagueDatesToJSONTyped(json, false);
615
+ }
616
+ function LeagueDatesToJSONTyped(value, ignoreDiscriminator = false) {
504
617
  if (value == null) {
505
618
  return value;
506
619
  }
@@ -550,7 +663,10 @@ function LeagueFromJSONTyped(json, ignoreDiscriminator) {
550
663
  "active": json["active"] == null ? void 0 : json["active"]
551
664
  };
552
665
  }
553
- function LeagueToJSON(value) {
666
+ function LeagueToJSON(json) {
667
+ return LeagueToJSONTyped(json, false);
668
+ }
669
+ function LeagueToJSONTyped(value, ignoreDiscriminator = false) {
554
670
  if (value == null) {
555
671
  return value;
556
672
  }
@@ -596,7 +712,10 @@ function SportFromJSONTyped(json, ignoreDiscriminator) {
596
712
  "activeStatus": json["activeStatus"] == null ? void 0 : json["activeStatus"]
597
713
  };
598
714
  }
599
- function SportToJSON(value) {
715
+ function SportToJSON(json) {
716
+ return SportToJSONTyped(json, false);
717
+ }
718
+ function SportToJSONTyped(value, ignoreDiscriminator = false) {
600
719
  if (value == null) {
601
720
  return value;
602
721
  }
@@ -611,6 +730,43 @@ function SportToJSON(value) {
611
730
  };
612
731
  }
613
732
 
733
+ // src/models/Venue.ts
734
+ function instanceOfVenue(value) {
735
+ if (!("id" in value) || value["id"] === void 0) return false;
736
+ if (!("name" in value) || value["name"] === void 0) return false;
737
+ return true;
738
+ }
739
+ function VenueFromJSON(json) {
740
+ return VenueFromJSONTyped(json, false);
741
+ }
742
+ function VenueFromJSONTyped(json, ignoreDiscriminator) {
743
+ if (json == null) {
744
+ return json;
745
+ }
746
+ return {
747
+ "id": json["id"],
748
+ "name": json["name"],
749
+ "link": json["link"] == null ? void 0 : json["link"],
750
+ "active": json["active"] == null ? void 0 : json["active"],
751
+ "season": json["season"] == null ? void 0 : json["season"]
752
+ };
753
+ }
754
+ function VenueToJSON(json) {
755
+ return VenueToJSONTyped(json, false);
756
+ }
757
+ function VenueToJSONTyped(value, ignoreDiscriminator = false) {
758
+ if (value == null) {
759
+ return value;
760
+ }
761
+ return {
762
+ "id": value["id"],
763
+ "name": value["name"],
764
+ "link": value["link"],
765
+ "active": value["active"],
766
+ "season": value["season"]
767
+ };
768
+ }
769
+
614
770
  // src/models/Division.ts
615
771
  function instanceOfDivision(value) {
616
772
  if (!("id" in value) || value["id"] === void 0) return false;
@@ -639,7 +795,10 @@ function DivisionFromJSONTyped(json, ignoreDiscriminator) {
639
795
  "active": json["active"] == null ? void 0 : json["active"]
640
796
  };
641
797
  }
642
- function DivisionToJSON(value) {
798
+ function DivisionToJSON(json) {
799
+ return DivisionToJSONTyped(json, false);
800
+ }
801
+ function DivisionToJSONTyped(value, ignoreDiscriminator = false) {
643
802
  if (value == null) {
644
803
  return value;
645
804
  }
@@ -660,10 +819,11 @@ function DivisionToJSON(value) {
660
819
  }
661
820
 
662
821
  // src/models/Streak.ts
663
- var StreakStreakTypeEnum = {
664
- Losing: "losses",
665
- Winning: "wins"
666
- };
822
+ var StreakStreakTypeEnum = /* @__PURE__ */ ((StreakStreakTypeEnum2) => {
823
+ StreakStreakTypeEnum2["Losing"] = "losses";
824
+ StreakStreakTypeEnum2["Winning"] = "wins";
825
+ return StreakStreakTypeEnum2;
826
+ })(StreakStreakTypeEnum || {});
667
827
  function instanceOfStreak(value) {
668
828
  return true;
669
829
  }
@@ -678,112 +838,15 @@ function StreakFromJSONTyped(json, ignoreDiscriminator) {
678
838
  "streakType": json["streakType"] == null ? void 0 : json["streakType"]
679
839
  };
680
840
  }
681
- function StreakToJSON(value) {
682
- if (value == null) {
683
- return value;
684
- }
685
- return {
686
- "streakType": value["streakType"]
687
- };
841
+ function StreakToJSON(json) {
842
+ return StreakToJSONTyped(json, false);
688
843
  }
689
-
690
- // src/models/Venue.ts
691
- function instanceOfVenue(value) {
692
- if (!("id" in value) || value["id"] === void 0) return false;
693
- if (!("name" in value) || value["name"] === void 0) return false;
694
- return true;
695
- }
696
- function VenueFromJSON(json) {
697
- return VenueFromJSONTyped(json, false);
698
- }
699
- function VenueFromJSONTyped(json, ignoreDiscriminator) {
700
- if (json == null) {
701
- return json;
702
- }
703
- return {
704
- "id": json["id"],
705
- "name": json["name"],
706
- "link": json["link"] == null ? void 0 : json["link"],
707
- "active": json["active"] == null ? void 0 : json["active"],
708
- "season": json["season"] == null ? void 0 : json["season"]
709
- };
710
- }
711
- function VenueToJSON(value) {
712
- if (value == null) {
713
- return value;
714
- }
715
- return {
716
- "id": value["id"],
717
- "name": value["name"],
718
- "link": value["link"],
719
- "active": value["active"],
720
- "season": value["season"]
721
- };
722
- }
723
-
724
- // src/models/Team.ts
725
- function instanceOfTeam(value) {
726
- if (!("id" in value) || value["id"] === void 0) return false;
727
- if (!("name" in value) || value["name"] === void 0) return false;
728
- return true;
729
- }
730
- function TeamFromJSON(json) {
731
- return TeamFromJSONTyped(json, false);
732
- }
733
- function TeamFromJSONTyped(json, ignoreDiscriminator) {
734
- if (json == null) {
735
- return json;
736
- }
737
- return {
738
- "id": json["id"],
739
- "name": json["name"],
740
- "link": json["link"] == null ? void 0 : json["link"],
741
- "allStarStatus": json["allStarStatus"] == null ? void 0 : json["allStarStatus"],
742
- "season": json["season"] == null ? void 0 : json["season"],
743
- "venue": json["venue"] == null ? void 0 : VenueFromJSON(json["venue"]),
744
- "springVenue": json["springVenue"] == null ? void 0 : VenueFromJSON(json["springVenue"]),
745
- "teamCode": json["teamCode"] == null ? void 0 : json["teamCode"],
746
- "fileCode": json["fileCode"] == null ? void 0 : json["fileCode"],
747
- "abbreviation": json["abbreviation"] == null ? void 0 : json["abbreviation"],
748
- "teamName": json["teamName"] == null ? void 0 : json["teamName"],
749
- "locationName": json["locationName"] == null ? void 0 : json["locationName"],
750
- "firstYearOfPlay": json["firstYearOfPlay"] == null ? void 0 : json["firstYearOfPlay"],
751
- "league": json["league"] == null ? void 0 : LeagueFromJSON(json["league"]),
752
- "springLeague": json["springLeague"] == null ? void 0 : LeagueFromJSON(json["springLeague"]),
753
- "division": json["division"] == null ? void 0 : DivisionFromJSON(json["division"]),
754
- "sport": json["sport"] == null ? void 0 : SportFromJSON(json["sport"]),
755
- "shortName": json["shortName"] == null ? void 0 : json["shortName"],
756
- "franchiseName": json["franchiseName"] == null ? void 0 : json["franchiseName"],
757
- "clubName": json["clubName"] == null ? void 0 : json["clubName"],
758
- "active": json["active"] == null ? void 0 : json["active"]
759
- };
760
- }
761
- function TeamToJSON(value) {
844
+ function StreakToJSONTyped(value, ignoreDiscriminator = false) {
762
845
  if (value == null) {
763
846
  return value;
764
847
  }
765
848
  return {
766
- "id": value["id"],
767
- "name": value["name"],
768
- "link": value["link"],
769
- "allStarStatus": value["allStarStatus"],
770
- "season": value["season"],
771
- "venue": VenueToJSON(value["venue"]),
772
- "springVenue": VenueToJSON(value["springVenue"]),
773
- "teamCode": value["teamCode"],
774
- "fileCode": value["fileCode"],
775
- "abbreviation": value["abbreviation"],
776
- "teamName": value["teamName"],
777
- "locationName": value["locationName"],
778
- "firstYearOfPlay": value["firstYearOfPlay"],
779
- "league": LeagueToJSON(value["league"]),
780
- "springLeague": LeagueToJSON(value["springLeague"]),
781
- "division": DivisionToJSON(value["division"]),
782
- "sport": SportToJSON(value["sport"]),
783
- "shortName": value["shortName"],
784
- "franchiseName": value["franchiseName"],
785
- "clubName": value["clubName"],
786
- "active": value["active"]
849
+ "streakType": value["streakType"]
787
850
  };
788
851
  }
789
852
 
@@ -808,7 +871,10 @@ function LeagueRecordFromJSONTyped(json, ignoreDiscriminator) {
808
871
  "pct": json["pct"]
809
872
  };
810
873
  }
811
- function LeagueRecordToJSON(value) {
874
+ function LeagueRecordToJSON(json) {
875
+ return LeagueRecordToJSONTyped(json, false);
876
+ }
877
+ function LeagueRecordToJSONTyped(value, ignoreDiscriminator = false) {
812
878
  if (value == null) {
813
879
  return value;
814
880
  }
@@ -820,8 +886,8 @@ function LeagueRecordToJSON(value) {
820
886
  };
821
887
  }
822
888
 
823
- // src/models/TeamRecord.ts
824
- function instanceOfTeamRecord(value) {
889
+ // src/models/Record.ts
890
+ function instanceOfRecord(value) {
825
891
  if (!("team" in value) || value["team"] === void 0) return false;
826
892
  if (!("season" in value) || value["season"] === void 0) return false;
827
893
  if (!("streak" in value) || value["streak"] === void 0) return false;
@@ -833,10 +899,10 @@ function instanceOfTeamRecord(value) {
833
899
  if (!("losses" in value) || value["losses"] === void 0) return false;
834
900
  return true;
835
901
  }
836
- function TeamRecordFromJSON(json) {
837
- return TeamRecordFromJSONTyped(json, false);
902
+ function RecordFromJSON(json) {
903
+ return RecordFromJSONTyped(json, false);
838
904
  }
839
- function TeamRecordFromJSONTyped(json, ignoreDiscriminator) {
905
+ function RecordFromJSONTyped(json, ignoreDiscriminator) {
840
906
  if (json == null) {
841
907
  return json;
842
908
  }
@@ -875,7 +941,10 @@ function TeamRecordFromJSONTyped(json, ignoreDiscriminator) {
875
941
  "winningPercentage": json["winningPercentage"] == null ? void 0 : json["winningPercentage"]
876
942
  };
877
943
  }
878
- function TeamRecordToJSON(value) {
944
+ function RecordToJSON(json) {
945
+ return RecordToJSONTyped(json, false);
946
+ }
947
+ function RecordToJSONTyped(value, ignoreDiscriminator = false) {
879
948
  if (value == null) {
880
949
  return value;
881
950
  }
@@ -915,6 +984,135 @@ function TeamRecordToJSON(value) {
915
984
  };
916
985
  }
917
986
 
987
+ // src/models/Team.ts
988
+ function instanceOfTeam(value) {
989
+ if (!("id" in value) || value["id"] === void 0) return false;
990
+ if (!("name" in value) || value["name"] === void 0) return false;
991
+ return true;
992
+ }
993
+ function TeamFromJSON(json) {
994
+ return TeamFromJSONTyped2(json, false);
995
+ }
996
+ function TeamFromJSONTyped2(json, ignoreDiscriminator) {
997
+ if (json == null) {
998
+ return json;
999
+ }
1000
+ return {
1001
+ "id": json["id"],
1002
+ "name": json["name"],
1003
+ "link": json["link"] == null ? void 0 : json["link"],
1004
+ "allStarStatus": json["allStarStatus"] == null ? void 0 : json["allStarStatus"],
1005
+ "season": json["season"] == null ? void 0 : json["season"],
1006
+ "venue": json["venue"] == null ? void 0 : VenueFromJSON(json["venue"]),
1007
+ "springVenue": json["springVenue"] == null ? void 0 : VenueFromJSON(json["springVenue"]),
1008
+ "teamCode": json["teamCode"] == null ? void 0 : json["teamCode"],
1009
+ "fileCode": json["fileCode"] == null ? void 0 : json["fileCode"],
1010
+ "abbreviation": json["abbreviation"] == null ? void 0 : json["abbreviation"],
1011
+ "teamName": json["teamName"] == null ? void 0 : json["teamName"],
1012
+ "locationName": json["locationName"] == null ? void 0 : json["locationName"],
1013
+ "firstYearOfPlay": json["firstYearOfPlay"] == null ? void 0 : json["firstYearOfPlay"],
1014
+ "league": json["league"] == null ? void 0 : LeagueFromJSON(json["league"]),
1015
+ "springLeague": json["springLeague"] == null ? void 0 : LeagueFromJSON(json["springLeague"]),
1016
+ "division": json["division"] == null ? void 0 : DivisionFromJSON(json["division"]),
1017
+ "sport": json["sport"] == null ? void 0 : SportFromJSON(json["sport"]),
1018
+ "record": json["record"] == null ? void 0 : RecordFromJSON(json["record"]),
1019
+ "shortName": json["shortName"] == null ? void 0 : json["shortName"],
1020
+ "franchiseName": json["franchiseName"] == null ? void 0 : json["franchiseName"],
1021
+ "clubName": json["clubName"] == null ? void 0 : json["clubName"],
1022
+ "active": json["active"] == null ? void 0 : json["active"]
1023
+ };
1024
+ }
1025
+ function TeamToJSON(json) {
1026
+ return TeamToJSONTyped2(json, false);
1027
+ }
1028
+ function TeamToJSONTyped2(value, ignoreDiscriminator = false) {
1029
+ if (value == null) {
1030
+ return value;
1031
+ }
1032
+ return {
1033
+ "id": value["id"],
1034
+ "name": value["name"],
1035
+ "link": value["link"],
1036
+ "allStarStatus": value["allStarStatus"],
1037
+ "season": value["season"],
1038
+ "venue": VenueToJSON(value["venue"]),
1039
+ "springVenue": VenueToJSON(value["springVenue"]),
1040
+ "teamCode": value["teamCode"],
1041
+ "fileCode": value["fileCode"],
1042
+ "abbreviation": value["abbreviation"],
1043
+ "teamName": value["teamName"],
1044
+ "locationName": value["locationName"],
1045
+ "firstYearOfPlay": value["firstYearOfPlay"],
1046
+ "league": LeagueToJSON(value["league"]),
1047
+ "springLeague": LeagueToJSON(value["springLeague"]),
1048
+ "division": DivisionToJSON(value["division"]),
1049
+ "sport": SportToJSON(value["sport"]),
1050
+ "record": RecordToJSON(value["record"]),
1051
+ "shortName": value["shortName"],
1052
+ "franchiseName": value["franchiseName"],
1053
+ "clubName": value["clubName"],
1054
+ "active": value["active"]
1055
+ };
1056
+ }
1057
+
1058
+ // src/models/BoxscoreTeams.ts
1059
+ function instanceOfBoxscoreTeams(value) {
1060
+ return true;
1061
+ }
1062
+ function BoxscoreTeamsFromJSON(json) {
1063
+ return BoxscoreTeamsFromJSONTyped(json, false);
1064
+ }
1065
+ function BoxscoreTeamsFromJSONTyped(json, ignoreDiscriminator) {
1066
+ if (json == null) {
1067
+ return json;
1068
+ }
1069
+ return {
1070
+ "away": json["away"] == null ? void 0 : TeamFromJSON(json["away"]),
1071
+ "home": json["home"] == null ? void 0 : TeamFromJSON(json["home"])
1072
+ };
1073
+ }
1074
+ function BoxscoreTeamsToJSON(json) {
1075
+ return BoxscoreTeamsToJSONTyped(json, false);
1076
+ }
1077
+ function BoxscoreTeamsToJSONTyped(value, ignoreDiscriminator = false) {
1078
+ if (value == null) {
1079
+ return value;
1080
+ }
1081
+ return {
1082
+ "away": TeamToJSON(value["away"]),
1083
+ "home": TeamToJSON(value["home"])
1084
+ };
1085
+ }
1086
+
1087
+ // src/models/Boxscore.ts
1088
+ function instanceOfBoxscore(value) {
1089
+ return true;
1090
+ }
1091
+ function BoxscoreFromJSON(json) {
1092
+ return BoxscoreFromJSONTyped(json, false);
1093
+ }
1094
+ function BoxscoreFromJSONTyped(json, ignoreDiscriminator) {
1095
+ if (json == null) {
1096
+ return json;
1097
+ }
1098
+ return {
1099
+ "teams": json["teams"] == null ? void 0 : BoxscoreTeamsFromJSON(json["teams"]),
1100
+ "officials": json["officials"] == null ? void 0 : json["officials"].map(GameOfficialFromJSON)
1101
+ };
1102
+ }
1103
+ function BoxscoreToJSON(json) {
1104
+ return BoxscoreToJSONTyped(json, false);
1105
+ }
1106
+ function BoxscoreToJSONTyped(value, ignoreDiscriminator = false) {
1107
+ if (value == null) {
1108
+ return value;
1109
+ }
1110
+ return {
1111
+ "teams": BoxscoreTeamsToJSON(value["teams"]),
1112
+ "officials": value["officials"] == null ? void 0 : value["officials"].map(GameOfficialToJSON)
1113
+ };
1114
+ }
1115
+
918
1116
  // src/models/DivisionStandings.ts
919
1117
  function instanceOfDivisionStandings(value) {
920
1118
  if (!("league" in value) || value["league"] === void 0) return false;
@@ -936,10 +1134,13 @@ function DivisionStandingsFromJSONTyped(json, ignoreDiscriminator) {
936
1134
  "division": DivisionFromJSON(json["division"]),
937
1135
  "sport": SportFromJSON(json["sport"]),
938
1136
  "lastUpdated": json["lastUpdated"] == null ? void 0 : json["lastUpdated"],
939
- "teamRecords": json["teamRecords"].map(TeamRecordFromJSON)
1137
+ "teamRecords": json["teamRecords"].map(RecordFromJSON)
940
1138
  };
941
1139
  }
942
- function DivisionStandingsToJSON(value) {
1140
+ function DivisionStandingsToJSON(json) {
1141
+ return DivisionStandingsToJSONTyped(json, false);
1142
+ }
1143
+ function DivisionStandingsToJSONTyped(value, ignoreDiscriminator = false) {
943
1144
  if (value == null) {
944
1145
  return value;
945
1146
  }
@@ -949,7 +1150,7 @@ function DivisionStandingsToJSON(value) {
949
1150
  "division": DivisionToJSON(value["division"]),
950
1151
  "sport": SportToJSON(value["sport"]),
951
1152
  "lastUpdated": value["lastUpdated"],
952
- "teamRecords": value["teamRecords"].map(TeamRecordToJSON)
1153
+ "teamRecords": value["teamRecords"].map(RecordToJSON)
953
1154
  };
954
1155
  }
955
1156
 
@@ -968,7 +1169,10 @@ function DivisionStandingsListFromJSONTyped(json, ignoreDiscriminator) {
968
1169
  "records": json["records"] == null ? void 0 : json["records"].map(DivisionStandingsFromJSON)
969
1170
  };
970
1171
  }
971
- function DivisionStandingsListToJSON(value) {
1172
+ function DivisionStandingsListToJSON(json) {
1173
+ return DivisionStandingsListToJSONTyped(json, false);
1174
+ }
1175
+ function DivisionStandingsListToJSONTyped(value, ignoreDiscriminator = false) {
972
1176
  if (value == null) {
973
1177
  return value;
974
1178
  }
@@ -978,15 +1182,16 @@ function DivisionStandingsListToJSON(value) {
978
1182
  }
979
1183
 
980
1184
  // src/models/GameStatusCode.ts
981
- var GameStatusCode = {
982
- Final: "F",
983
- Postponed: "D",
984
- Scheduled: "S",
985
- InProgress: "I",
986
- Pregame: "P",
987
- GameOver: "O",
988
- Canceled: "C"
989
- };
1185
+ var GameStatusCode = /* @__PURE__ */ ((GameStatusCode2) => {
1186
+ GameStatusCode2["Final"] = "F";
1187
+ GameStatusCode2["Postponed"] = "D";
1188
+ GameStatusCode2["Scheduled"] = "S";
1189
+ GameStatusCode2["InProgress"] = "I";
1190
+ GameStatusCode2["Pregame"] = "P";
1191
+ GameStatusCode2["GameOver"] = "O";
1192
+ GameStatusCode2["Canceled"] = "C";
1193
+ return GameStatusCode2;
1194
+ })(GameStatusCode || {});
990
1195
  function instanceOfGameStatusCode(value) {
991
1196
  for (const key in GameStatusCode) {
992
1197
  if (Object.prototype.hasOwnProperty.call(GameStatusCode, key)) {
@@ -1006,6 +1211,9 @@ function GameStatusCodeFromJSONTyped(json, ignoreDiscriminator) {
1006
1211
  function GameStatusCodeToJSON(value) {
1007
1212
  return value;
1008
1213
  }
1214
+ function GameStatusCodeToJSONTyped(value, ignoreDiscriminator) {
1215
+ return value;
1216
+ }
1009
1217
 
1010
1218
  // src/models/GameStatus.ts
1011
1219
  function instanceOfGameStatus(value) {
@@ -1027,7 +1235,10 @@ function GameStatusFromJSONTyped(json, ignoreDiscriminator) {
1027
1235
  "abstractGameCode": json["abstractGameCode"] == null ? void 0 : json["abstractGameCode"]
1028
1236
  };
1029
1237
  }
1030
- function GameStatusToJSON(value) {
1238
+ function GameStatusToJSON(json) {
1239
+ return GameStatusToJSONTyped(json, false);
1240
+ }
1241
+ function GameStatusToJSONTyped(value, ignoreDiscriminator = false) {
1031
1242
  if (value == null) {
1032
1243
  return value;
1033
1244
  }
@@ -1064,7 +1275,10 @@ function GameTeamFromJSONTyped(json, ignoreDiscriminator) {
1064
1275
  "seriesNumber": json["seriesNumber"] == null ? void 0 : json["seriesNumber"]
1065
1276
  };
1066
1277
  }
1067
- function GameTeamToJSON(value) {
1278
+ function GameTeamToJSON(json) {
1279
+ return GameTeamToJSONTyped(json, false);
1280
+ }
1281
+ function GameTeamToJSONTyped(value, ignoreDiscriminator = false) {
1068
1282
  if (value == null) {
1069
1283
  return value;
1070
1284
  }
@@ -1096,7 +1310,10 @@ function GameTeamsFromJSONTyped(json, ignoreDiscriminator) {
1096
1310
  "home": GameTeamFromJSON(json["home"])
1097
1311
  };
1098
1312
  }
1099
- function GameTeamsToJSON(value) {
1313
+ function GameTeamsToJSON(json) {
1314
+ return GameTeamsToJSONTyped(json, false);
1315
+ }
1316
+ function GameTeamsToJSONTyped(value, ignoreDiscriminator = false) {
1100
1317
  if (value == null) {
1101
1318
  return value;
1102
1319
  }
@@ -1107,15 +1324,16 @@ function GameTeamsToJSON(value) {
1107
1324
  }
1108
1325
 
1109
1326
  // src/models/GameType.ts
1110
- var GameType = {
1111
- Exhibition: "E",
1112
- SpringTraining: "S",
1113
- Regular: "R",
1114
- WildCardSeries: "F",
1115
- DivisionSeries: "D",
1116
- LeagueChampionshipSeries: "L",
1117
- WorldSeries: "W"
1118
- };
1327
+ var GameType = /* @__PURE__ */ ((GameType2) => {
1328
+ GameType2["Exhibition"] = "E";
1329
+ GameType2["SpringTraining"] = "S";
1330
+ GameType2["Regular"] = "R";
1331
+ GameType2["WildCardSeries"] = "F";
1332
+ GameType2["DivisionSeries"] = "D";
1333
+ GameType2["LeagueChampionshipSeries"] = "L";
1334
+ GameType2["WorldSeries"] = "W";
1335
+ return GameType2;
1336
+ })(GameType || {});
1119
1337
  function instanceOfGameType(value) {
1120
1338
  for (const key in GameType) {
1121
1339
  if (Object.prototype.hasOwnProperty.call(GameType, key)) {
@@ -1135,6 +1353,9 @@ function GameTypeFromJSONTyped(json, ignoreDiscriminator) {
1135
1353
  function GameTypeToJSON(value) {
1136
1354
  return value;
1137
1355
  }
1356
+ function GameTypeToJSONTyped(value, ignoreDiscriminator) {
1357
+ return value;
1358
+ }
1138
1359
 
1139
1360
  // src/models/Game.ts
1140
1361
  function instanceOfGame(value) {
@@ -1194,7 +1415,10 @@ function GameFromJSONTyped(json, ignoreDiscriminator) {
1194
1415
  "ifNecessaryDescription": json["ifNecessaryDescription"] == null ? void 0 : json["ifNecessaryDescription"]
1195
1416
  };
1196
1417
  }
1197
- function GameToJSON(value) {
1418
+ function GameToJSON(json) {
1419
+ return GameToJSONTyped(json, false);
1420
+ }
1421
+ function GameToJSONTyped(value, ignoreDiscriminator = false) {
1198
1422
  if (value == null) {
1199
1423
  return value;
1200
1424
  }
@@ -1235,28 +1459,33 @@ function GameToJSON(value) {
1235
1459
  };
1236
1460
  }
1237
1461
 
1238
- // src/models/InningTeam.ts
1239
- function instanceOfInningTeam(value) {
1462
+ // src/models/LinescoreTeam.ts
1463
+ function instanceOfLinescoreTeam(value) {
1240
1464
  return true;
1241
1465
  }
1242
- function InningTeamFromJSON(json) {
1243
- return InningTeamFromJSONTyped(json, false);
1466
+ function LinescoreTeamFromJSON(json) {
1467
+ return LinescoreTeamFromJSONTyped(json, false);
1244
1468
  }
1245
- function InningTeamFromJSONTyped(json, ignoreDiscriminator) {
1469
+ function LinescoreTeamFromJSONTyped(json, ignoreDiscriminator) {
1246
1470
  if (json == null) {
1247
1471
  return json;
1248
1472
  }
1249
1473
  return {
1474
+ "runs": json["runs"] == null ? void 0 : json["runs"],
1250
1475
  "hits": json["hits"] == null ? void 0 : json["hits"],
1251
1476
  "errors": json["errors"] == null ? void 0 : json["errors"],
1252
1477
  "leftOnBase": json["leftOnBase"] == null ? void 0 : json["leftOnBase"]
1253
1478
  };
1254
1479
  }
1255
- function InningTeamToJSON(value) {
1480
+ function LinescoreTeamToJSON(json) {
1481
+ return LinescoreTeamToJSONTyped(json, false);
1482
+ }
1483
+ function LinescoreTeamToJSONTyped(value, ignoreDiscriminator = false) {
1256
1484
  if (value == null) {
1257
1485
  return value;
1258
1486
  }
1259
1487
  return {
1488
+ "runs": value["runs"],
1260
1489
  "hits": value["hits"],
1261
1490
  "errors": value["errors"],
1262
1491
  "leftOnBase": value["leftOnBase"]
@@ -1277,19 +1506,51 @@ function InningFromJSONTyped(json, ignoreDiscriminator) {
1277
1506
  return {
1278
1507
  "num": json["num"] == null ? void 0 : json["num"],
1279
1508
  "ordinalNum": json["ordinalNum"] == null ? void 0 : json["ordinalNum"],
1280
- "home": json["home"] == null ? void 0 : InningTeamFromJSON(json["home"]),
1281
- "away": json["away"] == null ? void 0 : InningTeamFromJSON(json["away"])
1509
+ "home": json["home"] == null ? void 0 : LinescoreTeamFromJSON(json["home"]),
1510
+ "away": json["away"] == null ? void 0 : LinescoreTeamFromJSON(json["away"])
1282
1511
  };
1283
1512
  }
1284
- function InningToJSON(value) {
1513
+ function InningToJSON(json) {
1514
+ return InningToJSONTyped(json, false);
1515
+ }
1516
+ function InningToJSONTyped(value, ignoreDiscriminator = false) {
1285
1517
  if (value == null) {
1286
1518
  return value;
1287
1519
  }
1288
1520
  return {
1289
1521
  "num": value["num"],
1290
1522
  "ordinalNum": value["ordinalNum"],
1291
- "home": InningTeamToJSON(value["home"]),
1292
- "away": InningTeamToJSON(value["away"])
1523
+ "home": LinescoreTeamToJSON(value["home"]),
1524
+ "away": LinescoreTeamToJSON(value["away"])
1525
+ };
1526
+ }
1527
+
1528
+ // src/models/LinescoreTeams.ts
1529
+ function instanceOfLinescoreTeams(value) {
1530
+ return true;
1531
+ }
1532
+ function LinescoreTeamsFromJSON(json) {
1533
+ return LinescoreTeamsFromJSONTyped(json, false);
1534
+ }
1535
+ function LinescoreTeamsFromJSONTyped(json, ignoreDiscriminator) {
1536
+ if (json == null) {
1537
+ return json;
1538
+ }
1539
+ return {
1540
+ "away": json["away"] == null ? void 0 : LinescoreTeamFromJSON(json["away"]),
1541
+ "home": json["home"] == null ? void 0 : LinescoreTeamFromJSON(json["home"])
1542
+ };
1543
+ }
1544
+ function LinescoreTeamsToJSON(json) {
1545
+ return LinescoreTeamsToJSONTyped(json, false);
1546
+ }
1547
+ function LinescoreTeamsToJSONTyped(value, ignoreDiscriminator = false) {
1548
+ if (value == null) {
1549
+ return value;
1550
+ }
1551
+ return {
1552
+ "away": LinescoreTeamToJSON(value["away"]),
1553
+ "home": LinescoreTeamToJSON(value["home"])
1293
1554
  };
1294
1555
  }
1295
1556
 
@@ -1312,12 +1573,16 @@ function LinescoreFromJSONTyped(json, ignoreDiscriminator) {
1312
1573
  "isTopInning": json["isTopInning"] == null ? void 0 : json["isTopInning"],
1313
1574
  "scheduledInnings": json["scheduledInnings"] == null ? void 0 : json["scheduledInnings"],
1314
1575
  "innings": json["innings"] == null ? void 0 : json["innings"].map(InningFromJSON),
1576
+ "teams": json["teams"] == null ? void 0 : LinescoreTeamsFromJSON(json["teams"]),
1315
1577
  "balls": json["balls"] == null ? void 0 : json["balls"],
1316
1578
  "strikes": json["strikes"] == null ? void 0 : json["strikes"],
1317
1579
  "outs": json["outs"] == null ? void 0 : json["outs"]
1318
1580
  };
1319
1581
  }
1320
- function LinescoreToJSON(value) {
1582
+ function LinescoreToJSON(json) {
1583
+ return LinescoreToJSONTyped(json, false);
1584
+ }
1585
+ function LinescoreToJSONTyped(value, ignoreDiscriminator = false) {
1321
1586
  if (value == null) {
1322
1587
  return value;
1323
1588
  }
@@ -1329,6 +1594,7 @@ function LinescoreToJSON(value) {
1329
1594
  "isTopInning": value["isTopInning"],
1330
1595
  "scheduledInnings": value["scheduledInnings"],
1331
1596
  "innings": value["innings"] == null ? void 0 : value["innings"].map(InningToJSON),
1597
+ "teams": LinescoreTeamsToJSON(value["teams"]),
1332
1598
  "balls": value["balls"],
1333
1599
  "strikes": value["strikes"],
1334
1600
  "outs": value["outs"]
@@ -1356,7 +1622,10 @@ function ScheduleDayFromJSONTyped(json, ignoreDiscriminator) {
1356
1622
  "games": json["games"].map(GameFromJSON)
1357
1623
  };
1358
1624
  }
1359
- function ScheduleDayToJSON(value) {
1625
+ function ScheduleDayToJSON(json) {
1626
+ return ScheduleDayToJSONTyped(json, false);
1627
+ }
1628
+ function ScheduleDayToJSONTyped(value, ignoreDiscriminator = false) {
1360
1629
  if (value == null) {
1361
1630
  return value;
1362
1631
  }
@@ -1394,7 +1663,10 @@ function ScheduleFromJSONTyped(json, ignoreDiscriminator) {
1394
1663
  "dates": json["dates"].map(ScheduleDayFromJSON)
1395
1664
  };
1396
1665
  }
1397
- function ScheduleToJSON(value) {
1666
+ function ScheduleToJSON(json) {
1667
+ return ScheduleToJSONTyped(json, false);
1668
+ }
1669
+ function ScheduleToJSONTyped(value, ignoreDiscriminator = false) {
1398
1670
  if (value == null) {
1399
1671
  return value;
1400
1672
  }
@@ -1447,7 +1719,10 @@ function SeasonFromJSONTyped(json, ignoreDiscriminator) {
1447
1719
  "qualifierOutsPitched": json["qualifierOutsPitched"] == null ? void 0 : json["qualifierOutsPitched"]
1448
1720
  };
1449
1721
  }
1450
- function SeasonToJSON(value) {
1722
+ function SeasonToJSON(json) {
1723
+ return SeasonToJSONTyped(json, false);
1724
+ }
1725
+ function SeasonToJSONTyped(value, ignoreDiscriminator = false) {
1451
1726
  if (value == null) {
1452
1727
  return value;
1453
1728
  }
@@ -1491,7 +1766,10 @@ function SeasonsFromJSONTyped(json, ignoreDiscriminator) {
1491
1766
  "seasons": json["seasons"] == null ? void 0 : json["seasons"].map(SeasonFromJSON)
1492
1767
  };
1493
1768
  }
1494
- function SeasonsToJSON(value) {
1769
+ function SeasonsToJSON(json) {
1770
+ return SeasonsToJSONTyped(json, false);
1771
+ }
1772
+ function SeasonsToJSONTyped(value, ignoreDiscriminator = false) {
1495
1773
  if (value == null) {
1496
1774
  return value;
1497
1775
  }
@@ -1515,7 +1793,10 @@ function TeamsFromJSONTyped(json, ignoreDiscriminator) {
1515
1793
  "teams": json["teams"] == null ? void 0 : json["teams"].map(TeamFromJSON)
1516
1794
  };
1517
1795
  }
1518
- function TeamsToJSON(value) {
1796
+ function TeamsToJSON(json) {
1797
+ return TeamsToJSONTyped(json, false);
1798
+ }
1799
+ function TeamsToJSONTyped(value, ignoreDiscriminator = false) {
1519
1800
  if (value == null) {
1520
1801
  return value;
1521
1802
  }
@@ -1562,6 +1843,42 @@ var MlbApi = class extends BaseAPI {
1562
1843
  return yield response.value();
1563
1844
  });
1564
1845
  }
1846
+ /**
1847
+ * Returns Boxscore
1848
+ * Retrieves boxscore
1849
+ */
1850
+ getBoxscoreRaw(requestParameters, initOverrides) {
1851
+ return __async(this, null, function* () {
1852
+ if (requestParameters["gamePk"] == null) {
1853
+ throw new RequiredError(
1854
+ "gamePk",
1855
+ 'Required parameter "gamePk" was null or undefined when calling getBoxscore().'
1856
+ );
1857
+ }
1858
+ const queryParameters = {};
1859
+ if (requestParameters["fields"] != null) {
1860
+ queryParameters["fields"] = requestParameters["fields"].join(COLLECTION_FORMATS["csv"]);
1861
+ }
1862
+ const headerParameters = {};
1863
+ const response = yield this.request({
1864
+ path: `/v1/game/{gamePk}/boxscore`.replace(`{${"gamePk"}}`, encodeURIComponent(String(requestParameters["gamePk"]))),
1865
+ method: "GET",
1866
+ headers: headerParameters,
1867
+ query: queryParameters
1868
+ }, initOverrides);
1869
+ return new JSONApiResponse(response, (jsonValue) => BoxscoreFromJSON(jsonValue));
1870
+ });
1871
+ }
1872
+ /**
1873
+ * Returns Boxscore
1874
+ * Retrieves boxscore
1875
+ */
1876
+ getBoxscore(requestParameters, initOverrides) {
1877
+ return __async(this, null, function* () {
1878
+ const response = yield this.getBoxscoreRaw(requestParameters, initOverrides);
1879
+ return yield response.value();
1880
+ });
1881
+ }
1565
1882
  /**
1566
1883
  * Returns Linescore
1567
1884
  * Retrieves linescore
@@ -1575,6 +1892,9 @@ var MlbApi = class extends BaseAPI {
1575
1892
  );
1576
1893
  }
1577
1894
  const queryParameters = {};
1895
+ if (requestParameters["fields"] != null) {
1896
+ queryParameters["fields"] = requestParameters["fields"].join(COLLECTION_FORMATS["csv"]);
1897
+ }
1578
1898
  const headerParameters = {};
1579
1899
  const response = yield this.request({
1580
1900
  path: `/v1/game/{gamePk}/linescore`.replace(`{${"gamePk"}}`, encodeURIComponent(String(requestParameters["gamePk"]))),
@@ -1802,6 +2122,14 @@ var MlbApi = class extends BaseAPI {
1802
2122
  BASE_PATH,
1803
2123
  BaseAPI,
1804
2124
  BlobApiResponse,
2125
+ BoxscoreFromJSON,
2126
+ BoxscoreFromJSONTyped,
2127
+ BoxscoreTeamsFromJSON,
2128
+ BoxscoreTeamsFromJSONTyped,
2129
+ BoxscoreTeamsToJSON,
2130
+ BoxscoreTeamsToJSONTyped,
2131
+ BoxscoreToJSON,
2132
+ BoxscoreToJSONTyped,
1805
2133
  COLLECTION_FORMATS,
1806
2134
  Configuration,
1807
2135
  DefaultConfig,
@@ -1812,100 +2140,143 @@ var MlbApi = class extends BaseAPI {
1812
2140
  DivisionStandingsListFromJSON,
1813
2141
  DivisionStandingsListFromJSONTyped,
1814
2142
  DivisionStandingsListToJSON,
2143
+ DivisionStandingsListToJSONTyped,
1815
2144
  DivisionStandingsToJSON,
2145
+ DivisionStandingsToJSONTyped,
1816
2146
  DivisionToJSON,
2147
+ DivisionToJSONTyped,
1817
2148
  FetchError,
1818
2149
  GameFromJSON,
1819
2150
  GameFromJSONTyped,
2151
+ GameOfficialFromJSON,
2152
+ GameOfficialFromJSONTyped,
2153
+ GameOfficialToJSON,
2154
+ GameOfficialToJSONTyped,
1820
2155
  GameStatusCode,
1821
2156
  GameStatusCodeFromJSON,
1822
2157
  GameStatusCodeFromJSONTyped,
1823
2158
  GameStatusCodeToJSON,
2159
+ GameStatusCodeToJSONTyped,
1824
2160
  GameStatusFromJSON,
1825
2161
  GameStatusFromJSONTyped,
1826
2162
  GameStatusToJSON,
2163
+ GameStatusToJSONTyped,
1827
2164
  GameTeamFromJSON,
1828
2165
  GameTeamFromJSONTyped,
1829
2166
  GameTeamToJSON,
2167
+ GameTeamToJSONTyped,
1830
2168
  GameTeamsFromJSON,
1831
2169
  GameTeamsFromJSONTyped,
1832
2170
  GameTeamsToJSON,
2171
+ GameTeamsToJSONTyped,
1833
2172
  GameToJSON,
2173
+ GameToJSONTyped,
1834
2174
  GameType,
1835
2175
  GameTypeFromJSON,
1836
2176
  GameTypeFromJSONTyped,
1837
2177
  GameTypeToJSON,
2178
+ GameTypeToJSONTyped,
1838
2179
  InningFromJSON,
1839
2180
  InningFromJSONTyped,
1840
- InningTeamFromJSON,
1841
- InningTeamFromJSONTyped,
1842
- InningTeamToJSON,
1843
2181
  InningToJSON,
2182
+ InningToJSONTyped,
1844
2183
  JSONApiResponse,
1845
2184
  LeagueDatesFromJSON,
1846
2185
  LeagueDatesFromJSONTyped,
1847
2186
  LeagueDatesToJSON,
2187
+ LeagueDatesToJSONTyped,
1848
2188
  LeagueFromJSON,
1849
2189
  LeagueFromJSONTyped,
1850
2190
  LeagueRecordFromJSON,
1851
2191
  LeagueRecordFromJSONTyped,
1852
2192
  LeagueRecordToJSON,
2193
+ LeagueRecordToJSONTyped,
1853
2194
  LeagueToJSON,
2195
+ LeagueToJSONTyped,
1854
2196
  LinescoreFromJSON,
1855
2197
  LinescoreFromJSONTyped,
2198
+ LinescoreTeamFromJSON,
2199
+ LinescoreTeamFromJSONTyped,
2200
+ LinescoreTeamToJSON,
2201
+ LinescoreTeamToJSONTyped,
2202
+ LinescoreTeamsFromJSON,
2203
+ LinescoreTeamsFromJSONTyped,
2204
+ LinescoreTeamsToJSON,
2205
+ LinescoreTeamsToJSONTyped,
1856
2206
  LinescoreToJSON,
2207
+ LinescoreToJSONTyped,
1857
2208
  MlbApi,
2209
+ OfficialFromJSON,
2210
+ OfficialFromJSONTyped,
2211
+ OfficialToJSON,
2212
+ OfficialToJSONTyped,
2213
+ RecordFromJSON,
2214
+ RecordFromJSONTyped,
2215
+ RecordToJSON,
2216
+ RecordToJSONTyped,
1858
2217
  RequiredError,
1859
2218
  ResponseError,
1860
2219
  ScheduleDayFromJSON,
1861
2220
  ScheduleDayFromJSONTyped,
1862
2221
  ScheduleDayToJSON,
2222
+ ScheduleDayToJSONTyped,
1863
2223
  ScheduleFromJSON,
1864
2224
  ScheduleFromJSONTyped,
1865
2225
  ScheduleToJSON,
2226
+ ScheduleToJSONTyped,
1866
2227
  SeasonFromJSON,
1867
2228
  SeasonFromJSONTyped,
1868
2229
  SeasonToJSON,
2230
+ SeasonToJSONTyped,
1869
2231
  SeasonsFromJSON,
1870
2232
  SeasonsFromJSONTyped,
1871
2233
  SeasonsToJSON,
2234
+ SeasonsToJSONTyped,
1872
2235
  SportFromJSON,
1873
2236
  SportFromJSONTyped,
1874
2237
  SportToJSON,
2238
+ SportToJSONTyped,
1875
2239
  StreakFromJSON,
1876
2240
  StreakFromJSONTyped,
1877
2241
  StreakStreakTypeEnum,
1878
2242
  StreakToJSON,
2243
+ StreakToJSONTyped,
1879
2244
  TeamFromJSON,
1880
2245
  TeamFromJSONTyped,
1881
- TeamRecordFromJSON,
1882
- TeamRecordFromJSONTyped,
1883
- TeamRecordToJSON,
1884
2246
  TeamToJSON,
2247
+ TeamToJSONTyped,
1885
2248
  TeamsFromJSON,
1886
2249
  TeamsFromJSONTyped,
1887
2250
  TeamsToJSON,
2251
+ TeamsToJSONTyped,
1888
2252
  TextApiResponse,
1889
2253
  VenueFromJSON,
1890
2254
  VenueFromJSONTyped,
1891
2255
  VenueToJSON,
2256
+ VenueToJSONTyped,
1892
2257
  VoidApiResponse,
1893
2258
  canConsumeForm,
2259
+ instanceOfBoxscore,
2260
+ instanceOfBoxscoreTeams,
1894
2261
  instanceOfDivision,
1895
2262
  instanceOfDivisionStandings,
1896
2263
  instanceOfDivisionStandingsList,
1897
2264
  instanceOfGame,
2265
+ instanceOfGameOfficial,
1898
2266
  instanceOfGameStatus,
1899
2267
  instanceOfGameStatusCode,
1900
2268
  instanceOfGameTeam,
1901
2269
  instanceOfGameTeams,
1902
2270
  instanceOfGameType,
1903
2271
  instanceOfInning,
1904
- instanceOfInningTeam,
1905
2272
  instanceOfLeague,
1906
2273
  instanceOfLeagueDates,
1907
2274
  instanceOfLeagueRecord,
1908
2275
  instanceOfLinescore,
2276
+ instanceOfLinescoreTeam,
2277
+ instanceOfLinescoreTeams,
2278
+ instanceOfOfficial,
2279
+ instanceOfRecord,
1909
2280
  instanceOfSchedule,
1910
2281
  instanceOfScheduleDay,
1911
2282
  instanceOfSeason,
@@ -1913,7 +2284,6 @@ var MlbApi = class extends BaseAPI {
1913
2284
  instanceOfSport,
1914
2285
  instanceOfStreak,
1915
2286
  instanceOfTeam,
1916
- instanceOfTeamRecord,
1917
2287
  instanceOfTeams,
1918
2288
  instanceOfVenue,
1919
2289
  mapValues,