@mtgame/core 0.1.39 → 0.1.41

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,6 +95,7 @@ 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[]>>;
98
+ getGroups(tournamentId: number): Promise<TournamentGroup[]>;
97
99
  getTeams(tournamentId: number, groupId?: number): Promise<TournamentTeam[]>;
98
100
  getStageTeams(tournamentId: number): Promise<TournamentStageTeam[]>;
99
101
  getTeamById(tournamentTeamId: number): Promise<TournamentTeam>;
@@ -1997,6 +1997,41 @@
1997
1997
  return TournamentGroup;
1998
1998
  }(BaseModel));
1999
1999
 
2000
+ var RugbyGameConfig = /** @class */ (function (_super) {
2001
+ __extends(RugbyGameConfig, _super);
2002
+ function RugbyGameConfig() {
2003
+ return _super !== null && _super.apply(this, arguments) || this;
2004
+ }
2005
+ RugbyGameConfig.toFront = function (data) { };
2006
+ RugbyGameConfig.toBack = function (data) { };
2007
+ __decorate([
2008
+ ToFrontHook
2009
+ ], RugbyGameConfig, "toFront", null);
2010
+ __decorate([
2011
+ ToBackHook
2012
+ ], RugbyGameConfig, "toBack", null);
2013
+ RugbyGameConfig = __decorate([
2014
+ ModelInstance({
2015
+ mappingFields: {
2016
+ periods_count: 'periodsCount',
2017
+ period_time: 'periodTime',
2018
+ overtime_type: 'overtimeType',
2019
+ overtime_time: 'overtimeTime',
2020
+ overtime_periods: 'overtimePeriods',
2021
+ max_game_players: 'maxGamePlayers',
2022
+ game_time_type: 'gameTimeType',
2023
+ substitute_count: 'substituteCount',
2024
+ free_substitute_enabled: 'freeSubstituteEnabled',
2025
+ },
2026
+ relation: {
2027
+ overtimeType: enumField(exports.OvertimeTypes),
2028
+ gameTimeType: enumField(exports.GameTimeTypes),
2029
+ }
2030
+ })
2031
+ ], RugbyGameConfig);
2032
+ return RugbyGameConfig;
2033
+ }(BaseModel));
2034
+
2000
2035
 
2001
2036
  (function (GameStatuses) {
2002
2037
  GameStatuses[GameStatuses["open"] = 1] = "open";
@@ -2124,6 +2159,22 @@
2124
2159
  enumerable: true,
2125
2160
  configurable: true
2126
2161
  });
2162
+ Object.defineProperty(Game.prototype, "rugbyGameConfig", {
2163
+ get: function () {
2164
+ if (this._rugbyGameConfig && this._rugbyGameConfig.periodsCount) {
2165
+ return this._rugbyGameConfig;
2166
+ }
2167
+ if (this.gameConfig) {
2168
+ this._rugbyGameConfig = RugbyGameConfig.toFront(this.gameConfig);
2169
+ }
2170
+ return this._rugbyGameConfig;
2171
+ },
2172
+ set: function (value) {
2173
+ this._rugbyGameConfig = value;
2174
+ },
2175
+ enumerable: true,
2176
+ configurable: true
2177
+ });
2127
2178
  Object.defineProperty(Game.prototype, "scoreByPeriodList", {
2128
2179
  get: function () {
2129
2180
  var _this = this;
@@ -2214,6 +2265,7 @@
2214
2265
  hockey_game_config: 'hockeyGameConfig',
2215
2266
  football_game_config: 'footballGameConfig',
2216
2267
  handball_game_config: 'handballGameConfig',
2268
+ rugby_game_config: 'rugbyGameConfig',
2217
2269
  score_by_period: 'scoreByPeriod',
2218
2270
  playoff_stage: 'playoffStage',
2219
2271
  tournament_stage_id: 'tournamentStageId',
@@ -5357,13 +5409,19 @@
5357
5409
  points: 'points',
5358
5410
  tries: 'tries',
5359
5411
  penalty_tries: 'penaltyTries',
5412
+ conversion_shots: 'conversionShots',
5360
5413
  conversion_goals: 'conversionGoals',
5361
5414
  conversion_misses: 'conversionMisses',
5415
+ conversion_goals_percent: 'conversionGoalsPercent',
5362
5416
  drawing_ball: 'drawingBall',
5417
+ penalty_shots: 'penaltyShots',
5363
5418
  penalty_misses: 'penaltyMisses',
5364
5419
  penalty_goals: 'penaltyGoals',
5420
+ penalty_goals_percent: 'penaltyGoalsPercent',
5421
+ drop_goal_shots: 'dropGoalShots',
5365
5422
  drop_goals: 'dropGoals',
5366
5423
  drop_goal_misses: 'dropGoalMisses',
5424
+ drop_goal_percent: 'dropGoalPercent',
5367
5425
  free_kicks: 'freeKicks',
5368
5426
  yellow_cards: 'yellowCards',
5369
5427
  red_cards: 'redCards',
@@ -5375,16 +5433,24 @@
5375
5433
  plus_minus: 'plusMinus',
5376
5434
  game_time: 'gameTime',
5377
5435
  // Team statistic
5436
+ scrums: 'scrums',
5378
5437
  scrums_won: 'scrumsWon',
5379
5438
  scrum_losses: 'scrumLosses',
5439
+ scrums_won_percent: 'scrumsWonPercent',
5380
5440
  scrums_won_free: 'scrumsWonFree',
5441
+ lineouts: 'lineouts',
5381
5442
  lineouts_success: 'lineoutsSuccess',
5443
+ lineout_loses: 'lineoutLoses',
5382
5444
  lineouts_steal: 'lineoutsSteal',
5383
5445
  quick_throws: 'quickThrows',
5446
+ rucks: 'rucks',
5384
5447
  rucks_won: 'rucksWon',
5385
5448
  ruck_losses: 'ruckLosses',
5449
+ rucks_won_percent: 'rucksWonPercent',
5450
+ mauls: 'mauls',
5386
5451
  mauls_won: 'maulsWon',
5387
5452
  maul_losses: 'maulLosses',
5453
+ mauls_won_percent: 'maulWonPercent',
5388
5454
  fouls: 'fouls'
5389
5455
  },
5390
5456
  relation: {
@@ -5511,6 +5577,15 @@
5511
5577
  });
5512
5578
  });
5513
5579
  };
5580
+ TournamentApi.prototype.getGroups = function (tournamentId) {
5581
+ return __awaiter(this, void 0, void 0, function () {
5582
+ return __generator(this, function (_a) {
5583
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/groups/")
5584
+ .pipe(operators.map(function (result) { return TournamentGroup.toFront(result); }))
5585
+ .toPromise()];
5586
+ });
5587
+ });
5588
+ };
5514
5589
  TournamentApi.prototype.getTeams = function (tournamentId, groupId) {
5515
5590
  return __awaiter(this, void 0, void 0, function () {
5516
5591
  var params;
@@ -9366,41 +9441,6 @@
9366
9441
  return LeaguePlaylist;
9367
9442
  }(BaseModel));
9368
9443
 
9369
- var RugbyGameConfig = /** @class */ (function (_super) {
9370
- __extends(RugbyGameConfig, _super);
9371
- function RugbyGameConfig() {
9372
- return _super !== null && _super.apply(this, arguments) || this;
9373
- }
9374
- RugbyGameConfig.toFront = function (data) { };
9375
- RugbyGameConfig.toBack = function (data) { };
9376
- __decorate([
9377
- ToFrontHook
9378
- ], RugbyGameConfig, "toFront", null);
9379
- __decorate([
9380
- ToBackHook
9381
- ], RugbyGameConfig, "toBack", null);
9382
- RugbyGameConfig = __decorate([
9383
- ModelInstance({
9384
- mappingFields: {
9385
- periods_count: 'periodsCount',
9386
- period_time: 'periodTime',
9387
- overtime_type: 'overtimeType',
9388
- overtime_time: 'overtimeTime',
9389
- overtime_periods: 'overtimePeriods',
9390
- max_game_players: 'maxGamePlayers',
9391
- game_time_type: 'gameTimeType',
9392
- substitute_count: 'substituteCount',
9393
- free_substitute_enabled: 'freeSubstituteEnabled',
9394
- },
9395
- relation: {
9396
- overtimeType: enumField(exports.OvertimeTypes),
9397
- gameTimeType: enumField(exports.GameTimeTypes),
9398
- }
9399
- })
9400
- ], RugbyGameConfig);
9401
- return RugbyGameConfig;
9402
- }(BaseModel));
9403
-
9404
9444
  var CentrifugoService = /** @class */ (function () {
9405
9445
  function CentrifugoService(httpClient, configService) {
9406
9446
  this.httpClient = httpClient;