@mtgame/core 0.0.48 → 0.0.50

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.
@@ -23,6 +23,7 @@ export interface TournamentGamesFilters {
23
23
  playoffId?: number;
24
24
  status?: GameStatuses;
25
25
  statuses?: GameStatuses[];
26
+ tournamentCourtId?: number;
26
27
  }
27
28
  export declare type StatisticGroupByTypes = 'team' | 'user' | 'team_user' | 'tournament_team' | 'tournament_team_user' | 'month' | 'win_loses';
28
29
  export interface StatisticFilters {
@@ -1121,12 +1121,16 @@
1121
1121
  cover: 'cover',
1122
1122
  preview_image: 'previewImage',
1123
1123
  status: 'status',
1124
+ start_date: 'startDate',
1125
+ closed_date: 'closedDate',
1124
1126
  },
1125
1127
  relation: {
1126
1128
  logo: File,
1127
1129
  cover: File,
1128
1130
  previewImage: File,
1129
1131
  status: enumField(exports.TournamentSeasonStatuses),
1132
+ startDate: DateField,
1133
+ closedDate: DateField,
1130
1134
  }
1131
1135
  })
1132
1136
  ], TournamentSeason);
@@ -2824,6 +2828,13 @@
2824
2828
  enumerable: true,
2825
2829
  configurable: true
2826
2830
  });
2831
+ Object.defineProperty(HockeyGameStatistic.prototype, "gameMinutes", {
2832
+ get: function () {
2833
+ return Math.floor(this.gameTime / 60);
2834
+ },
2835
+ enumerable: true,
2836
+ configurable: true
2837
+ });
2827
2838
  HockeyGameStatistic.toFront = function (data) { };
2828
2839
  HockeyGameStatistic.toBack = function (data) { };
2829
2840
  __decorate([
@@ -3278,6 +3289,9 @@
3278
3289
  statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
3279
3290
  params = params.set('statuses', statuses.join(','));
3280
3291
  }
3292
+ if (filters.tournamentCourtId) {
3293
+ params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
3294
+ }
3281
3295
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/games/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
3282
3296
  total: +result.headers.get('X-Page-Count'),
3283
3297
  data: Game.toFront(result.body)
@@ -5435,6 +5449,9 @@
5435
5449
  statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
5436
5450
  params = params.set('statuses', statuses.join(','));
5437
5451
  }
5452
+ if (filters.tournamentCourtId) {
5453
+ params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
5454
+ }
5438
5455
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/games/", { params: params, observe: 'response' })
5439
5456
  .pipe(operators.map(function (result) { return ({
5440
5457
  total: +result.headers.get('X-Page-Count'),
@@ -5763,6 +5780,9 @@
5763
5780
  statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
5764
5781
  params = params.set('statuses', statuses.join(','));
5765
5782
  }
5783
+ if (filters.tournamentCourtId) {
5784
+ params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
5785
+ }
5766
5786
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_season/" + seasonId + "/games/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5767
5787
  total: +result.headers.get('X-Page-Count'),
5768
5788
  data: Game.toFront(result.body)