@mtgame/core 0.1.30 → 0.1.31

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.
@@ -7,5 +7,5 @@ export declare class LeaguePlayerApi {
7
7
  private configService;
8
8
  constructor(httpClient: HttpClient, configService: ConfigService);
9
9
  getById(leaguePlayerId: number): Promise<LeaguePlayer>;
10
- getTournamentUsers(leaguePlayerId: number): Promise<TournamentTeamUser[]>;
10
+ getTournamentUsers(leaguePlayerId: number, seasonId?: number): Promise<TournamentTeamUser[]>;
11
11
  }
@@ -19,7 +19,7 @@ export declare class TournamentSeasonApi {
19
19
  getGames(seasonId: number, page: number, size: number, filters: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
20
20
  getEvents(seasonId: number, page: number, size: number, filters?: TournamentEventsListFilter): Promise<PaginatedResponse<TournamentEvent[]>>;
21
21
  getGameMedia(seasonId: number, page: number, size: number, filters: GameMediaFilters): Promise<PaginatedResponse<Game[]>>;
22
- getTeams(seasonId: number): Promise<TournamentTeam[]>;
22
+ getTeams(seasonId: number, short?: boolean): Promise<TournamentTeam[]>;
23
23
  getPlayoffs(seasonId: number): Promise<Playoff[]>;
24
24
  getGamesStages(seasonId: number): Promise<GameTimelineStages>;
25
25
  }
@@ -1425,10 +1425,13 @@
1425
1425
  id: 'id',
1426
1426
  team_id: 'teamId',
1427
1427
  tournament_id: 'tournamentId',
1428
+ name: 'name',
1429
+ logo: 'logo',
1428
1430
  team: 'team',
1429
1431
  points: 'points',
1430
1432
  },
1431
1433
  relation: {
1434
+ logo: File,
1432
1435
  team: Team,
1433
1436
  }
1434
1437
  })
@@ -1954,6 +1957,33 @@
1954
1957
  GameResultTypes[GameResultTypes["team_technical_defeat"] = 3] = "team_technical_defeat";
1955
1958
  GameResultTypes[GameResultTypes["competitor_team_technical_defeat"] = 4] = "competitor_team_technical_defeat";
1956
1959
  })(exports.GameResultTypes || (exports.GameResultTypes = {}));
1960
+ var TournamentTeamShort = /** @class */ (function (_super) {
1961
+ __extends(TournamentTeamShort, _super);
1962
+ function TournamentTeamShort() {
1963
+ return _super !== null && _super.apply(this, arguments) || this;
1964
+ }
1965
+ TournamentTeamShort.toFront = function (data) { };
1966
+ TournamentTeamShort.toBack = function (data) { };
1967
+ __decorate([
1968
+ ToFrontHook
1969
+ ], TournamentTeamShort, "toFront", null);
1970
+ __decorate([
1971
+ ToBackHook
1972
+ ], TournamentTeamShort, "toBack", null);
1973
+ TournamentTeamShort = __decorate([
1974
+ ModelInstance({
1975
+ mappingFields: {
1976
+ id: 'id',
1977
+ name: 'name',
1978
+ logo: 'logo',
1979
+ },
1980
+ relation: {
1981
+ logo: File
1982
+ }
1983
+ })
1984
+ ], TournamentTeamShort);
1985
+ return TournamentTeamShort;
1986
+ }(BaseModel));
1957
1987
  var Game = /** @class */ (function (_super) {
1958
1988
  __extends(Game, _super);
1959
1989
  function Game() {
@@ -2107,9 +2137,11 @@
2107
2137
  id: 'id',
2108
2138
  status: 'status',
2109
2139
  team: 'team',
2140
+ tournament_team: 'tournamentTeam',
2110
2141
  tournament_team_id: 'tournamentTeamId',
2111
2142
  team_id: 'teamId',
2112
2143
  competitor_team: 'competitorTeam',
2144
+ competitor_tournament_team: 'competitorTournamentTeam',
2113
2145
  competitor_tournament_team_id: 'competitorTournamentTeamId',
2114
2146
  competitor_team_id: 'competitorTeamId',
2115
2147
  competitor_team_name: 'competitorTeamName',
@@ -2142,7 +2174,9 @@
2142
2174
  relation: {
2143
2175
  status: enumField(exports.GameStatuses),
2144
2176
  team: Team,
2177
+ tournamentTeam: TournamentTeamShort,
2145
2178
  competitorTeam: Team,
2179
+ competitorTournamentTeam: TournamentTeamShort,
2146
2180
  datetime: DateTimeField,
2147
2181
  resultType: enumField(exports.GameResultTypes),
2148
2182
  basketballGameConfig: BasketballGameConfig,
@@ -2399,6 +2433,8 @@
2399
2433
  ModelInstance({
2400
2434
  mappingFields: {
2401
2435
  id: 'id',
2436
+ name: 'name',
2437
+ logo: 'logo',
2402
2438
  team_id: 'teamId',
2403
2439
  tournament_id: 'tournamentId',
2404
2440
  tournament: 'tournament',
@@ -2425,6 +2461,7 @@
2425
2461
  last_five_games: 'lastFiveGames'
2426
2462
  },
2427
2463
  relation: {
2464
+ logo: File,
2428
2465
  tournament: Tournament,
2429
2466
  team: Team,
2430
2467
  group: TournamentGroup,
@@ -5899,8 +5936,12 @@
5899
5936
  LeaguePlayerApi.prototype.getById = function (leaguePlayerId) {
5900
5937
  return this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_player/" + leaguePlayerId + "/").pipe(operators.map(function (item) { return LeaguePlayer.toFront(item); })).toPromise();
5901
5938
  };
5902
- LeaguePlayerApi.prototype.getTournamentUsers = function (leaguePlayerId) {
5903
- return this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_player/" + leaguePlayerId + "/tournament_users/").pipe(operators.map(function (item) { return TournamentTeamUser.toFront(item); })).toPromise();
5939
+ LeaguePlayerApi.prototype.getTournamentUsers = function (leaguePlayerId, seasonId) {
5940
+ var params = new http.HttpParams();
5941
+ if (seasonId) {
5942
+ params = params.set('season_id', seasonId.toString());
5943
+ }
5944
+ return this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_player/" + leaguePlayerId + "/tournament_users/", { params: params }).pipe(operators.map(function (item) { return TournamentTeamUser.toFront(item); })).toPromise();
5904
5945
  };
5905
5946
  LeaguePlayerApi.ctorParameters = function () { return [
5906
5947
  { type: http.HttpClient },
@@ -7617,10 +7658,15 @@
7617
7658
  });
7618
7659
  });
7619
7660
  };
7620
- TournamentSeasonApi.prototype.getTeams = function (seasonId) {
7661
+ TournamentSeasonApi.prototype.getTeams = function (seasonId, short) {
7621
7662
  return __awaiter(this, void 0, void 0, function () {
7663
+ var params;
7622
7664
  return __generator(this, function (_a) {
7623
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_season/" + seasonId + "/teams/").pipe(operators.map(function (result) { return TournamentTeam.toFront(result); })).toPromise()];
7665
+ params = new http.HttpParams();
7666
+ if (short) {
7667
+ params = params.set('short', '1');
7668
+ }
7669
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_season/" + seasonId + "/teams/", { params: params }).pipe(operators.map(function (result) { return TournamentTeam.toFront(result); })).toPromise()];
7624
7670
  });
7625
7671
  });
7626
7672
  };
@@ -9263,6 +9309,7 @@
9263
9309
  exports.TournamentStageApi = TournamentStageApi;
9264
9310
  exports.TournamentStageTeam = TournamentStageTeam;
9265
9311
  exports.TournamentTeam = TournamentTeam;
9312
+ exports.TournamentTeamShort = TournamentTeamShort;
9266
9313
  exports.TournamentTeamUser = TournamentTeamUser;
9267
9314
  exports.TournamentTeamUserInvite = TournamentTeamUserInvite;
9268
9315
  exports.TournamentTeamWinner = TournamentTeamWinner;