@mtgame/core 0.1.38 → 0.1.40

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.
@@ -18,6 +18,7 @@ import { FootballStatistic } from '../models/football-statistic';
18
18
  import { LeagueUserPermissions } from '../models/league-user';
19
19
  import { HandballStatistic } from '../models/handball-statistic';
20
20
  import { RugbyStatistic } from '../models/rugby-statistic';
21
+ import { TournamentGroup } from '../models/tournament-group';
21
22
  export interface TournamentGamesFilters {
22
23
  tournamentIds?: number[];
23
24
  tournamentSeasonId?: number;
@@ -94,7 +95,8 @@ export declare class TournamentApi {
94
95
  getPlayoffGames(playoffId: number, playoffNumber?: string): Promise<Game[]>;
95
96
  getGamesStages(tournamentId: number): Promise<GameTimelineStages>;
96
97
  getGames(tournamentId: number, page: number, size: number, filters?: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
97
- getTeams(tournamentId: number): Promise<TournamentTeam[]>;
98
+ getGroups(tournamentId: number): Promise<TournamentGroup[]>;
99
+ getTeams(tournamentId: number, groupId?: number): Promise<TournamentTeam[]>;
98
100
  getStageTeams(tournamentId: number): Promise<TournamentStageTeam[]>;
99
101
  getTeamById(tournamentTeamId: number): Promise<TournamentTeam>;
100
102
  getUserById(userId: number): Promise<TournamentTeamUser>;
@@ -5511,10 +5511,24 @@
5511
5511
  });
5512
5512
  });
5513
5513
  };
5514
- TournamentApi.prototype.getTeams = function (tournamentId) {
5514
+ TournamentApi.prototype.getGroups = function (tournamentId) {
5515
5515
  return __awaiter(this, void 0, void 0, function () {
5516
5516
  return __generator(this, function (_a) {
5517
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/teams/")
5517
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/groups/")
5518
+ .pipe(operators.map(function (result) { return TournamentGroup.toFront(result); }))
5519
+ .toPromise()];
5520
+ });
5521
+ });
5522
+ };
5523
+ TournamentApi.prototype.getTeams = function (tournamentId, groupId) {
5524
+ return __awaiter(this, void 0, void 0, function () {
5525
+ var params;
5526
+ return __generator(this, function (_a) {
5527
+ params = new http.HttpParams();
5528
+ if (groupId) {
5529
+ params = params.set('group_id', groupId.toString());
5530
+ }
5531
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/teams/", { params: params })
5518
5532
  .pipe(operators.map(function (result) { return TournamentTeam.toFront(result); }))
5519
5533
  .toPromise()];
5520
5534
  });