@mtgame/core 0.0.76 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1266,6 +1266,7 @@
1266
1266
  status: 'status',
1267
1267
  start_date: 'startDate',
1268
1268
  closed_date: 'closedDate',
1269
+ tournaments: 'tournaments',
1269
1270
  },
1270
1271
  relation: {
1271
1272
  logo: File,
@@ -2178,12 +2179,14 @@
2178
2179
  lose_normal_time_games_count: 'loseNormalTimeGamesCount',
2179
2180
  win_overtime_games_count: 'winOvertimeGamesCount',
2180
2181
  lose_overtime_games_count: 'loseOvertimeGamesCount',
2182
+ last_five_games: 'lastFiveGames'
2181
2183
  },
2182
2184
  relation: {
2183
2185
  tournament: Tournament,
2184
2186
  team: Team,
2185
2187
  group: TournamentGroup,
2186
2188
  games: Game,
2189
+ lastFiveGames: Game,
2187
2190
  }
2188
2191
  })
2189
2192
  ], TournamentTeam);
@@ -4941,10 +4944,140 @@
4941
4944
  });
4942
4945
  });
4943
4946
  };
4947
+ TournamentApi.prototype.getBasketballStatisticLeaders = function (filters) {
4948
+ return __awaiter(this, void 0, void 0, function () {
4949
+ var params;
4950
+ return __generator(this, function (_a) {
4951
+ params = new http.HttpParams();
4952
+ params = applyStatisticLeadersFilters(filters, params);
4953
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/basketball_statistic_leaders/", { params: params }).pipe(operators.map(function (result) {
4954
+ var e_1, _a;
4955
+ try {
4956
+ for (var _b = __values(Object.keys(result)), _c = _b.next(); !_c.done; _c = _b.next()) {
4957
+ var key = _c.value;
4958
+ result[key] = BasketballStatistic.toFront(result[key]);
4959
+ }
4960
+ }
4961
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
4962
+ finally {
4963
+ try {
4964
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
4965
+ }
4966
+ finally { if (e_1) throw e_1.error; }
4967
+ }
4968
+ return result;
4969
+ })).toPromise()];
4970
+ });
4971
+ });
4972
+ };
4973
+ TournamentApi.prototype.getVolleyballStatisticLeaders = function (filters) {
4974
+ return __awaiter(this, void 0, void 0, function () {
4975
+ var params;
4976
+ return __generator(this, function (_a) {
4977
+ params = new http.HttpParams();
4978
+ params = applyStatisticLeadersFilters(filters, params);
4979
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/volleyball_statistic_leaders/", { params: params }).pipe(operators.map(function (result) {
4980
+ var e_2, _a;
4981
+ try {
4982
+ for (var _b = __values(Object.keys(result)), _c = _b.next(); !_c.done; _c = _b.next()) {
4983
+ var key = _c.value;
4984
+ result[key] = VolleyballStatistic.toFront(result[key]);
4985
+ }
4986
+ }
4987
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
4988
+ finally {
4989
+ try {
4990
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
4991
+ }
4992
+ finally { if (e_2) throw e_2.error; }
4993
+ }
4994
+ return result;
4995
+ })).toPromise()];
4996
+ });
4997
+ });
4998
+ };
4999
+ TournamentApi.prototype.getHockeyStatisticLeaders = function (filters) {
5000
+ return __awaiter(this, void 0, void 0, function () {
5001
+ var params;
5002
+ return __generator(this, function (_a) {
5003
+ params = new http.HttpParams();
5004
+ params = applyStatisticLeadersFilters(filters, params);
5005
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/hockey_statistic_leaders/", { params: params }).pipe(operators.map(function (result) {
5006
+ var e_3, _a;
5007
+ try {
5008
+ for (var _b = __values(Object.keys(result)), _c = _b.next(); !_c.done; _c = _b.next()) {
5009
+ var key = _c.value;
5010
+ result[key] = HockeyStatistic.toFront(result[key]);
5011
+ }
5012
+ }
5013
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
5014
+ finally {
5015
+ try {
5016
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
5017
+ }
5018
+ finally { if (e_3) throw e_3.error; }
5019
+ }
5020
+ return result;
5021
+ })).toPromise()];
5022
+ });
5023
+ });
5024
+ };
5025
+ TournamentApi.prototype.getFootballStatisticLeaders = function (filters) {
5026
+ return __awaiter(this, void 0, void 0, function () {
5027
+ var params;
5028
+ return __generator(this, function (_a) {
5029
+ params = new http.HttpParams();
5030
+ params = applyStatisticLeadersFilters(filters, params);
5031
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/football_statistic_leaders/", { params: params }).pipe(operators.map(function (result) {
5032
+ var e_4, _a;
5033
+ try {
5034
+ for (var _b = __values(Object.keys(result)), _c = _b.next(); !_c.done; _c = _b.next()) {
5035
+ var key = _c.value;
5036
+ result[key] = FootballStatistic.toFront(result[key]);
5037
+ }
5038
+ }
5039
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
5040
+ finally {
5041
+ try {
5042
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
5043
+ }
5044
+ finally { if (e_4) throw e_4.error; }
5045
+ }
5046
+ return result;
5047
+ })).toPromise()];
5048
+ });
5049
+ });
5050
+ };
5051
+ TournamentApi.prototype.getHandballStatisticLeaders = function (filters) {
5052
+ return __awaiter(this, void 0, void 0, function () {
5053
+ var params;
5054
+ return __generator(this, function (_a) {
5055
+ params = new http.HttpParams();
5056
+ params = applyStatisticLeadersFilters(filters, params);
5057
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/handball_statistic_leaders/", { params: params }).pipe(operators.map(function (result) {
5058
+ var e_5, _a;
5059
+ try {
5060
+ for (var _b = __values(Object.keys(result)), _c = _b.next(); !_c.done; _c = _b.next()) {
5061
+ var key = _c.value;
5062
+ result[key] = HandballStatistic.toFront(result[key]);
5063
+ }
5064
+ }
5065
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
5066
+ finally {
5067
+ try {
5068
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
5069
+ }
5070
+ finally { if (e_5) throw e_5.error; }
5071
+ }
5072
+ return result;
5073
+ })).toPromise()];
5074
+ });
5075
+ });
5076
+ };
4944
5077
  TournamentApi.prototype.getBasketballStatistic = function (filters) {
4945
5078
  return __awaiter(this, void 0, void 0, function () {
4946
5079
  var params, _a, _b, key;
4947
- var e_1, _c;
5080
+ var e_6, _c;
4948
5081
  return __generator(this, function (_d) {
4949
5082
  params = new http.HttpParams();
4950
5083
  if (filters) {
@@ -4956,12 +5089,12 @@
4956
5089
  }
4957
5090
  }
4958
5091
  }
4959
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
5092
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
4960
5093
  finally {
4961
5094
  try {
4962
5095
  if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
4963
5096
  }
4964
- finally { if (e_1) throw e_1.error; }
5097
+ finally { if (e_6) throw e_6.error; }
4965
5098
  }
4966
5099
  if (filters.per_game !== undefined) {
4967
5100
  params = params.set('per_game', filters.per_game ? '1' : '0');
@@ -4970,14 +5103,17 @@
4970
5103
  params = params.set('tournament_ids', filters.tournament_ids.join(','));
4971
5104
  }
4972
5105
  }
4973
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/basketball_statistic/", { params: params }).pipe(operators.map(function (result) { return BasketballStatistic.toFront(result); })).toPromise()];
5106
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/basketball_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5107
+ total: +result.headers.get('X-Page-Count'),
5108
+ data: BasketballStatistic.toFront(result.body)
5109
+ }); })).toPromise()];
4974
5110
  });
4975
5111
  });
4976
5112
  };
4977
5113
  TournamentApi.prototype.getVolleyballStatistic = function (filters) {
4978
5114
  return __awaiter(this, void 0, void 0, function () {
4979
5115
  var params, _a, _b, key;
4980
- var e_2, _c;
5116
+ var e_7, _c;
4981
5117
  return __generator(this, function (_d) {
4982
5118
  params = new http.HttpParams();
4983
5119
  if (filters) {
@@ -4989,12 +5125,12 @@
4989
5125
  }
4990
5126
  }
4991
5127
  }
4992
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
5128
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
4993
5129
  finally {
4994
5130
  try {
4995
5131
  if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
4996
5132
  }
4997
- finally { if (e_2) throw e_2.error; }
5133
+ finally { if (e_7) throw e_7.error; }
4998
5134
  }
4999
5135
  if (filters.per_game !== undefined) {
5000
5136
  params = params.set('per_game', filters.per_game ? '1' : '0');
@@ -5003,14 +5139,17 @@
5003
5139
  params = params.set('tournament_ids', filters.tournament_ids.join(','));
5004
5140
  }
5005
5141
  }
5006
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/volleyball_statistic/", { params: params }).pipe(operators.map(function (result) { return VolleyballStatistic.toFront(result); })).toPromise()];
5142
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/volleyball_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5143
+ total: +result.headers.get('X-Page-Count'),
5144
+ data: VolleyballStatistic.toFront(result)
5145
+ }); })).toPromise()];
5007
5146
  });
5008
5147
  });
5009
5148
  };
5010
5149
  TournamentApi.prototype.getHockeyStatistic = function (filters) {
5011
5150
  return __awaiter(this, void 0, void 0, function () {
5012
5151
  var params, _a, _b, key;
5013
- var e_3, _c;
5152
+ var e_8, _c;
5014
5153
  return __generator(this, function (_d) {
5015
5154
  params = new http.HttpParams();
5016
5155
  if (filters) {
@@ -5022,12 +5161,12 @@
5022
5161
  }
5023
5162
  }
5024
5163
  }
5025
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
5164
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
5026
5165
  finally {
5027
5166
  try {
5028
5167
  if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
5029
5168
  }
5030
- finally { if (e_3) throw e_3.error; }
5169
+ finally { if (e_8) throw e_8.error; }
5031
5170
  }
5032
5171
  if (filters.per_game !== undefined) {
5033
5172
  params = params.set('per_game', filters.per_game ? '1' : '0');
@@ -5036,14 +5175,17 @@
5036
5175
  params = params.set('tournament_ids', filters.tournament_ids.join(','));
5037
5176
  }
5038
5177
  }
5039
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/hockey_statistic/", { params: params }).pipe(operators.map(function (result) { return HockeyStatistic.toFront(result); })).toPromise()];
5178
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/hockey_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5179
+ total: +result.headers.get('X-Page-Count'),
5180
+ data: HockeyStatistic.toFront(result)
5181
+ }); })).toPromise()];
5040
5182
  });
5041
5183
  });
5042
5184
  };
5043
5185
  TournamentApi.prototype.getFootballStatistic = function (filters) {
5044
5186
  return __awaiter(this, void 0, void 0, function () {
5045
5187
  var params, _a, _b, key;
5046
- var e_4, _c;
5188
+ var e_9, _c;
5047
5189
  return __generator(this, function (_d) {
5048
5190
  params = new http.HttpParams();
5049
5191
  if (filters) {
@@ -5055,12 +5197,12 @@
5055
5197
  }
5056
5198
  }
5057
5199
  }
5058
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
5200
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
5059
5201
  finally {
5060
5202
  try {
5061
5203
  if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
5062
5204
  }
5063
- finally { if (e_4) throw e_4.error; }
5205
+ finally { if (e_9) throw e_9.error; }
5064
5206
  }
5065
5207
  if (filters.per_game !== undefined) {
5066
5208
  params = params.set('per_game', filters.per_game ? '1' : '0');
@@ -5069,14 +5211,17 @@
5069
5211
  params = params.set('tournament_ids', filters.tournament_ids.join(','));
5070
5212
  }
5071
5213
  }
5072
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/football_statistic/", { params: params }).pipe(operators.map(function (result) { return FootballStatistic.toFront(result); })).toPromise()];
5214
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/football_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5215
+ total: +result.headers.get('X-Page-Count'),
5216
+ data: FootballStatistic.toFront(result)
5217
+ }); })).toPromise()];
5073
5218
  });
5074
5219
  });
5075
5220
  };
5076
5221
  TournamentApi.prototype.getHandballStatistic = function (filters) {
5077
5222
  return __awaiter(this, void 0, void 0, function () {
5078
5223
  var params, _a, _b, key;
5079
- var e_5, _c;
5224
+ var e_10, _c;
5080
5225
  return __generator(this, function (_d) {
5081
5226
  params = new http.HttpParams();
5082
5227
  if (filters) {
@@ -5088,12 +5233,12 @@
5088
5233
  }
5089
5234
  }
5090
5235
  }
5091
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
5236
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
5092
5237
  finally {
5093
5238
  try {
5094
5239
  if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
5095
5240
  }
5096
- finally { if (e_5) throw e_5.error; }
5241
+ finally { if (e_10) throw e_10.error; }
5097
5242
  }
5098
5243
  if (filters.per_game !== undefined) {
5099
5244
  params = params.set('per_game', filters.per_game ? '1' : '0');
@@ -5102,7 +5247,10 @@
5102
5247
  params = params.set('tournament_ids', filters.tournament_ids.join(','));
5103
5248
  }
5104
5249
  }
5105
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/handball_statistic/", { params: params }).pipe(operators.map(function (result) { return HandballStatistic.toFront(result); })).toPromise()];
5250
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/handball_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5251
+ total: +result.headers.get('X-Page-Count'),
5252
+ data: HandballStatistic.toFront(result)
5253
+ }); })).toPromise()];
5106
5254
  });
5107
5255
  });
5108
5256
  };
@@ -5173,6 +5321,62 @@
5173
5321
  if (filters.userId) {
5174
5322
  params = params.set('user_id', filters.userId.toString());
5175
5323
  }
5324
+ if (filters.query) {
5325
+ params = params.set('query', filters.query);
5326
+ }
5327
+ return params;
5328
+ }
5329
+ function applyStatisticFilters(filters, params) {
5330
+ var e_11, _a;
5331
+ try {
5332
+ for (var _b = __values(Object.keys(filters)), _c = _b.next(); !_c.done; _c = _b.next()) {
5333
+ var key = _c.value;
5334
+ if (filters[key]) {
5335
+ params = params.set(key, filters[key]);
5336
+ }
5337
+ }
5338
+ }
5339
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
5340
+ finally {
5341
+ try {
5342
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
5343
+ }
5344
+ finally { if (e_11) throw e_11.error; }
5345
+ }
5346
+ if (filters.per_game !== undefined) {
5347
+ params = params.set('per_game', filters.per_game ? '1' : '0');
5348
+ }
5349
+ if (filters.tournament_ids) {
5350
+ params = params.set('tournament_ids', filters.tournament_ids.join(','));
5351
+ }
5352
+ return params;
5353
+ }
5354
+ function applyStatisticLeadersFilters(filters, params) {
5355
+ var e_12, _a;
5356
+ try {
5357
+ for (var _b = __values(Object.keys(filters)), _c = _b.next(); !_c.done; _c = _b.next()) {
5358
+ var key = _c.value;
5359
+ if (filters[key]) {
5360
+ params = params.set(key, filters[key]);
5361
+ }
5362
+ }
5363
+ }
5364
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
5365
+ finally {
5366
+ try {
5367
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
5368
+ }
5369
+ finally { if (e_12) throw e_12.error; }
5370
+ }
5371
+ if (filters.per_game !== undefined) {
5372
+ params = params.set('per_game', filters.per_game ? '1' : '0');
5373
+ }
5374
+ if (filters.tournament_ids) {
5375
+ params = params.set('tournament_ids', filters.tournament_ids.join(','));
5376
+ }
5377
+ if (filters.fields) {
5378
+ params = params.set('fields', filters.fields.join(','));
5379
+ }
5176
5380
  return params;
5177
5381
  }
5178
5382
 
@@ -5265,10 +5469,17 @@
5265
5469
  });
5266
5470
  });
5267
5471
  };
5268
- LeagueApi.prototype.getTournaments = function (leagueId) {
5472
+ LeagueApi.prototype.getTournaments = function (leagueId, filters) {
5269
5473
  return __awaiter(this, void 0, void 0, function () {
5474
+ var params;
5270
5475
  return __generator(this, function (_a) {
5271
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournaments/").pipe(operators.map(function (result) { return Tournament.toFront(result); })).toPromise()];
5476
+ params = new http.HttpParams();
5477
+ if (filters) {
5478
+ if (filters.statuses) {
5479
+ params = params.set('statuses', filters.statuses.map(function (s) { return exports.TournamentStatuses[s]; }).join(','));
5480
+ }
5481
+ }
5482
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournaments/", { params: params }).pipe(operators.map(function (result) { return Tournament.toFront(result); })).toPromise()];
5272
5483
  });
5273
5484
  });
5274
5485
  };
@@ -5319,13 +5530,22 @@
5319
5530
  });
5320
5531
  });
5321
5532
  };
5322
- LeagueApi.prototype.getSeasons = function (leagueId, notClosed) {
5533
+ LeagueApi.prototype.getSeasons = function (leagueId, page, size, notClosed, include) {
5534
+ if (page === void 0) { page = 1; }
5535
+ if (size === void 0) { size = 20; }
5323
5536
  return __awaiter(this, void 0, void 0, function () {
5324
5537
  var params;
5325
5538
  return __generator(this, function (_a) {
5326
- params = new http.HttpParams().set('not_closed', notClosed ? '1' : '');
5327
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournament_seasons/", { params: params })
5328
- .pipe(operators.map(function (result) { return TournamentSeason.toFront(result); }))
5539
+ params = new http.HttpParams()
5540
+ .set('page', page.toString())
5541
+ .set('size', size.toString())
5542
+ .set('not_closed', notClosed ? '1' : '')
5543
+ .set('include', include ? include.join(',') : '');
5544
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournament_seasons/", { params: params, observe: 'response' })
5545
+ .pipe(operators.map(function (result) { return ({
5546
+ total: +result.headers.get('X-Page-Count'),
5547
+ data: TournamentSeason.toFront(result.body)
5548
+ }); }))
5329
5549
  .toPromise()];
5330
5550
  });
5331
5551
  });
@@ -5353,6 +5573,14 @@
5353
5573
  });
5354
5574
  });
5355
5575
  };
5576
+ LeagueApi.prototype.getGraphicSettings = function (leagueId) {
5577
+ return __awaiter(this, void 0, void 0, function () {
5578
+ return __generator(this, function (_a) {
5579
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/graphic_settings/")
5580
+ .toPromise()];
5581
+ });
5582
+ });
5583
+ };
5356
5584
  LeagueApi.ctorParameters = function () { return [
5357
5585
  { type: http.HttpClient },
5358
5586
  { type: ConfigService }
@@ -5453,26 +5681,7 @@
5453
5681
  var params;
5454
5682
  return __generator(this, function (_a) {
5455
5683
  params = new http.HttpParams().set('page', page.toString()).set('size', size.toString());
5456
- if (filters) {
5457
- if (filters.tournamentTour) {
5458
- params = params.set('tournament_tour', filters.tournamentTour.toString());
5459
- }
5460
- if (filters.teamId) {
5461
- params = params.set('team_id', filters.teamId.toString());
5462
- }
5463
- if (filters.tournamentStageId) {
5464
- params = params.set('tournament_stage_id', filters.tournamentStageId.toString());
5465
- }
5466
- if (filters.playoffId) {
5467
- params = params.set('playoff_id', filters.playoffId.toString());
5468
- }
5469
- if (filters.playoffStage) {
5470
- params = params.set('playoff_stage', filters.playoffStage.toString());
5471
- }
5472
- if (filters.status) {
5473
- params = params.set('status', exports.GameStatuses[filters.status]);
5474
- }
5475
- }
5684
+ params = applyGameMediaFilters(filters, params);
5476
5685
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/game_media/", { observe: 'response', params: params }).pipe(operators.map(function (response) {
5477
5686
  return {
5478
5687
  total: +response.headers.get('X-Page-Count'),
@@ -5487,26 +5696,7 @@
5487
5696
  var params;
5488
5697
  return __generator(this, function (_a) {
5489
5698
  params = new http.HttpParams().set('page', page.toString()).set('size', size.toString());
5490
- if (filters) {
5491
- if (filters.tournamentTour) {
5492
- params = params.set('tournament_tour', filters.tournamentTour.toString());
5493
- }
5494
- if (filters.teamId) {
5495
- params = params.set('team_id', filters.teamId.toString());
5496
- }
5497
- if (filters.tournamentStageId) {
5498
- params = params.set('tournament_stage_id', filters.tournamentStageId.toString());
5499
- }
5500
- if (filters.playoffId) {
5501
- params = params.set('playoff_id', filters.playoffId.toString());
5502
- }
5503
- if (filters.playoffStage) {
5504
- params = params.set('playoff_stage', filters.playoffStage.toString());
5505
- }
5506
- if (filters.status) {
5507
- params = params.set('status', exports.GameStatuses[filters.status]);
5508
- }
5509
- }
5699
+ params = applyGameMediaFilters(filters, params);
5510
5700
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/game_media/", { observe: 'response', params: params }).pipe(operators.map(function (response) {
5511
5701
  return {
5512
5702
  total: +response.headers.get('X-Page-Count'),
@@ -5577,6 +5767,33 @@
5577
5767
  ], MediaApi);
5578
5768
  return MediaApi;
5579
5769
  }());
5770
+ function applyGameMediaFilters(filters, params) {
5771
+ if (filters) {
5772
+ params = applyGamesFilters(filters, params);
5773
+ if (filters.tournamentTour) {
5774
+ params = params.set('tournament_tour', filters.tournamentTour.toString());
5775
+ }
5776
+ if (filters.teamId) {
5777
+ params = params.set('team_id', filters.teamId.toString());
5778
+ }
5779
+ if (filters.tournamentStageId) {
5780
+ params = params.set('tournament_stage_id', filters.tournamentStageId.toString());
5781
+ }
5782
+ if (filters.playoffId) {
5783
+ params = params.set('playoff_id', filters.playoffId.toString());
5784
+ }
5785
+ if (filters.playoffStage) {
5786
+ params = params.set('playoff_stage', filters.playoffStage.toString());
5787
+ }
5788
+ if (filters.status) {
5789
+ params = params.set('status', exports.GameStatuses[filters.status]);
5790
+ }
5791
+ if (filters.mediaCount) {
5792
+ params = params.set('media_count', filters.mediaCount.toString());
5793
+ }
5794
+ }
5795
+ return params;
5796
+ }
5580
5797
 
5581
5798
 
5582
5799
  (function (PollStatuses) {
@@ -7137,26 +7354,7 @@
7137
7354
  var params;
7138
7355
  return __generator(this, function (_a) {
7139
7356
  params = new http.HttpParams().set('page', page.toString()).set('size', size.toString());
7140
- if (filters) {
7141
- if (filters.tournamentTour) {
7142
- params = params.set('tournament_tour', filters.tournamentTour.toString());
7143
- }
7144
- if (filters.teamId) {
7145
- params = params.set('team_id', filters.teamId.toString());
7146
- }
7147
- if (filters.tournamentStageId) {
7148
- params = params.set('tournament_stage_id', filters.tournamentStageId.toString());
7149
- }
7150
- if (filters.playoffId) {
7151
- params = params.set('playoff_id', filters.playoffId.toString());
7152
- }
7153
- if (filters.playoffStage) {
7154
- params = params.set('playoff_stage', filters.playoffStage.toString());
7155
- }
7156
- if (filters.status) {
7157
- params = params.set('status', exports.GameStatuses[filters.status]);
7158
- }
7159
- }
7357
+ params = applyGameMediaFilters(filters, params);
7160
7358
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_season/" + seasonId + "/game_media/", { observe: 'response', params: params })
7161
7359
  .pipe(operators.map(function (response) {
7162
7360
  return {
@@ -8727,6 +8925,10 @@
8727
8925
  exports.LeaguePartner = LeaguePartner;
8728
8926
  exports.LeaguePlaylist = LeaguePlaylist;
8729
8927
  exports.LocalStorageEngine = LocalStorageEngine;
8928
+ exports.MODEL_MAPPING_FIELDS_KEY = MODEL_MAPPING_FIELDS_KEY;
8929
+ exports.MODEL_RELATION_KEY = MODEL_RELATION_KEY;
8930
+ exports.MODEL_TO_BACK_KEY = MODEL_TO_BACK_KEY;
8931
+ exports.MODEL_TO_FRONT_KEY = MODEL_TO_FRONT_KEY;
8730
8932
  exports.MediaApi = MediaApi;
8731
8933
  exports.MediaItem = MediaItem;
8732
8934
  exports.ModelInstance = ModelInstance;
@@ -8817,14 +9019,14 @@
8817
9019
  exports.markFormGroupTouched = markFormGroupTouched;
8818
9020
  exports.minLengthArrayValidator = minLengthArrayValidator;
8819
9021
  exports.patchItemInArray = patchItemInArray;
9022
+ exports.penaltyTypeField = penaltyTypeField;
8820
9023
  exports.updateItemInArray = updateItemInArray;
8821
9024
  exports.updateItemsInArray = updateItemsInArray;
8822
9025
  exports.validateDate = validateDate;
8823
9026
  exports.validateEmail = validateEmail;
8824
9027
  exports.validatePhone = validatePhone;
8825
9028
  exports.validateUrl = validateUrl;
8826
- exports.ɵa = penaltyTypeField;
8827
- exports.ɵb = GameBaseApi;
9029
+ exports.ɵa = GameBaseApi;
8828
9030
 
8829
9031
  Object.defineProperty(exports, '__esModule', { value: true });
8830
9032