@mtgame/core 0.0.47 → 0.0.49

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.
@@ -8,6 +8,7 @@ import { TournamentEvent } from '../models/tournament-event';
8
8
  import { TournamentSeason } from '../models/tournament-season';
9
9
  import { Game } from '../models/game';
10
10
  import { LeaguePartner } from '../models/league-partner';
11
+ import { LeagueCourt } from '../models/league-court';
11
12
  export declare class LeagueApi {
12
13
  private httpClient;
13
14
  private configService;
@@ -20,4 +21,5 @@ export declare class LeagueApi {
20
21
  getGames(leagueId: number, page: number, size: number, filters: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
21
22
  getSeasons(leagueId: number, notClosed?: boolean): Promise<TournamentSeason[]>;
22
23
  getPartners(leagueId: number): Promise<LeaguePartner[]>;
24
+ getCourts(leagueId: number): Promise<LeagueCourt[]>;
23
25
  }
@@ -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 {
@@ -3278,6 +3278,9 @@
3278
3278
  statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
3279
3279
  params = params.set('statuses', statuses.join(','));
3280
3280
  }
3281
+ if (filters.tournamentCourtId) {
3282
+ params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
3283
+ }
3281
3284
  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
3285
  total: +result.headers.get('X-Page-Count'),
3283
3286
  data: Game.toFront(result.body)
@@ -3303,6 +3306,13 @@
3303
3306
  });
3304
3307
  });
3305
3308
  };
3309
+ LeagueApi.prototype.getCourts = function (leagueId) {
3310
+ return __awaiter(this, void 0, void 0, function () {
3311
+ return __generator(this, function (_a) {
3312
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/courts/").pipe(operators.map(function (result) { return LeagueCourt.toFront(result); })).toPromise()];
3313
+ });
3314
+ });
3315
+ };
3306
3316
  LeagueApi.ctorParameters = function () { return [
3307
3317
  { type: http.HttpClient },
3308
3318
  { type: ConfigService }
@@ -5428,6 +5438,9 @@
5428
5438
  statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
5429
5439
  params = params.set('statuses', statuses.join(','));
5430
5440
  }
5441
+ if (filters.tournamentCourtId) {
5442
+ params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
5443
+ }
5431
5444
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/games/", { params: params, observe: 'response' })
5432
5445
  .pipe(operators.map(function (result) { return ({
5433
5446
  total: +result.headers.get('X-Page-Count'),
@@ -5756,6 +5769,9 @@
5756
5769
  statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
5757
5770
  params = params.set('statuses', statuses.join(','));
5758
5771
  }
5772
+ if (filters.tournamentCourtId) {
5773
+ params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
5774
+ }
5759
5775
  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 ({
5760
5776
  total: +result.headers.get('X-Page-Count'),
5761
5777
  data: Game.toFront(result.body)