@mtgame/core 0.1.29 → 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.
Files changed (43) hide show
  1. package/api/league-player-api.d.ts +1 -1
  2. package/api/tournament-season-api.d.ts +1 -1
  3. package/bundles/mtgame-core.umd.js +86 -4
  4. package/bundles/mtgame-core.umd.js.map +1 -1
  5. package/bundles/mtgame-core.umd.min.js +2 -2
  6. package/bundles/mtgame-core.umd.min.js.map +1 -1
  7. package/esm2015/api/league-player-api.js +8 -4
  8. package/esm2015/api/tournament-season-api.js +7 -3
  9. package/esm2015/models/base-statistic.js +1 -1
  10. package/esm2015/models/basketball-statistic.js +4 -1
  11. package/esm2015/models/football-statistic.js +4 -1
  12. package/esm2015/models/game.js +29 -1
  13. package/esm2015/models/handball-statistic.js +4 -1
  14. package/esm2015/models/hockey-statistic.js +4 -1
  15. package/esm2015/models/tournament-team.js +5 -1
  16. package/esm2015/models/tournament.js +4 -1
  17. package/esm2015/models/volleyball-statistic.js +4 -1
  18. package/esm5/api/league-player-api.js +8 -4
  19. package/esm5/api/tournament-season-api.js +8 -3
  20. package/esm5/models/base-statistic.js +1 -1
  21. package/esm5/models/basketball-statistic.js +8 -1
  22. package/esm5/models/football-statistic.js +8 -1
  23. package/esm5/models/game.js +34 -1
  24. package/esm5/models/handball-statistic.js +8 -1
  25. package/esm5/models/hockey-statistic.js +8 -1
  26. package/esm5/models/tournament-team.js +5 -1
  27. package/esm5/models/tournament.js +4 -1
  28. package/esm5/models/volleyball-statistic.js +8 -1
  29. package/fesm2015/mtgame-core.js +60 -5
  30. package/fesm2015/mtgame-core.js.map +1 -1
  31. package/fesm5/mtgame-core.js +86 -5
  32. package/fesm5/mtgame-core.js.map +1 -1
  33. package/models/base-statistic.d.ts +1 -0
  34. package/models/basketball-statistic.d.ts +1 -0
  35. package/models/football-statistic.d.ts +1 -0
  36. package/models/game.d.ts +10 -0
  37. package/models/handball-statistic.d.ts +1 -0
  38. package/models/hockey-statistic.d.ts +1 -0
  39. package/models/tournament-team.d.ts +3 -0
  40. package/models/tournament.d.ts +2 -0
  41. package/models/volleyball-statistic.d.ts +1 -0
  42. package/mtgame-core.metadata.json +1 -1
  43. package/package.json +1 -1
@@ -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,
@@ -2640,6 +2677,13 @@
2640
2677
  enumerable: true,
2641
2678
  configurable: true
2642
2679
  });
2680
+ Object.defineProperty(BasketballStatistic.prototype, "tournamentTeamPoints", {
2681
+ get: function () {
2682
+ return this.tournamentTeam && this.tournamentTeam.points;
2683
+ },
2684
+ enumerable: true,
2685
+ configurable: true
2686
+ });
2643
2687
  BasketballStatistic.toFront = function (data) { };
2644
2688
  BasketballStatistic.toBack = function (data) { };
2645
2689
  __decorate([
@@ -3542,6 +3586,13 @@
3542
3586
  enumerable: true,
3543
3587
  configurable: true
3544
3588
  });
3589
+ Object.defineProperty(HockeyStatistic.prototype, "tournamentTeamPoints", {
3590
+ get: function () {
3591
+ return this.tournamentTeam && this.tournamentTeam.points;
3592
+ },
3593
+ enumerable: true,
3594
+ configurable: true
3595
+ });
3545
3596
  HockeyStatistic.toFront = function (data) { };
3546
3597
  HockeyStatistic.toBack = function (data) { };
3547
3598
  __decorate([
@@ -4047,6 +4098,13 @@
4047
4098
  enumerable: true,
4048
4099
  configurable: true
4049
4100
  });
4101
+ Object.defineProperty(FootballStatistic.prototype, "tournamentTeamPoints", {
4102
+ get: function () {
4103
+ return this.tournamentTeam && this.tournamentTeam.points;
4104
+ },
4105
+ enumerable: true,
4106
+ configurable: true
4107
+ });
4050
4108
  FootballStatistic.toFront = function (data) { };
4051
4109
  FootballStatistic.toBack = function (data) { };
4052
4110
  __decorate([
@@ -4497,6 +4555,13 @@
4497
4555
  enumerable: true,
4498
4556
  configurable: true
4499
4557
  });
4558
+ Object.defineProperty(HandballStatistic.prototype, "tournamentTeamPoints", {
4559
+ get: function () {
4560
+ return this.tournamentTeam && this.tournamentTeam.points;
4561
+ },
4562
+ enumerable: true,
4563
+ configurable: true
4564
+ });
4500
4565
  HandballStatistic.toFront = function (data) { };
4501
4566
  HandballStatistic.toBack = function (data) { };
4502
4567
  __decorate([
@@ -4792,6 +4857,13 @@
4792
4857
  function VolleyballStatistic() {
4793
4858
  return _super !== null && _super.apply(this, arguments) || this;
4794
4859
  }
4860
+ Object.defineProperty(VolleyballStatistic.prototype, "tournamentTeamPoints", {
4861
+ get: function () {
4862
+ return this.tournamentTeam && this.tournamentTeam.points;
4863
+ },
4864
+ enumerable: true,
4865
+ configurable: true
4866
+ });
4795
4867
  VolleyballStatistic.toFront = function (data) { };
4796
4868
  VolleyballStatistic.toBack = function (data) { };
4797
4869
  __decorate([
@@ -5864,8 +5936,12 @@
5864
5936
  LeaguePlayerApi.prototype.getById = function (leaguePlayerId) {
5865
5937
  return this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_player/" + leaguePlayerId + "/").pipe(operators.map(function (item) { return LeaguePlayer.toFront(item); })).toPromise();
5866
5938
  };
5867
- LeaguePlayerApi.prototype.getTournamentUsers = function (leaguePlayerId) {
5868
- 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();
5869
5945
  };
5870
5946
  LeaguePlayerApi.ctorParameters = function () { return [
5871
5947
  { type: http.HttpClient },
@@ -7582,10 +7658,15 @@
7582
7658
  });
7583
7659
  });
7584
7660
  };
7585
- TournamentSeasonApi.prototype.getTeams = function (seasonId) {
7661
+ TournamentSeasonApi.prototype.getTeams = function (seasonId, short) {
7586
7662
  return __awaiter(this, void 0, void 0, function () {
7663
+ var params;
7587
7664
  return __generator(this, function (_a) {
7588
- 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()];
7589
7670
  });
7590
7671
  });
7591
7672
  };
@@ -9228,6 +9309,7 @@
9228
9309
  exports.TournamentStageApi = TournamentStageApi;
9229
9310
  exports.TournamentStageTeam = TournamentStageTeam;
9230
9311
  exports.TournamentTeam = TournamentTeam;
9312
+ exports.TournamentTeamShort = TournamentTeamShort;
9231
9313
  exports.TournamentTeamUser = TournamentTeamUser;
9232
9314
  exports.TournamentTeamUserInvite = TournamentTeamUserInvite;
9233
9315
  exports.TournamentTeamWinner = TournamentTeamWinner;