@mtgame/core 1.0.37 → 1.0.39
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.
- package/api/tournament-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +110 -102
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/tournament-api.js +7 -1
- package/esm2015/models/tournament-round-team.js +2 -1
- package/fesm2015/mtgame-core.js +95 -89
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/tournament-round-team.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/tournament-api.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import { GameBasketballPosition } from '../models/basketball-profile';
|
|
|
33
33
|
import { GameVolleyballPosition } from '../models/volleyball-profile';
|
|
34
34
|
import { GameRugbyPosition } from '../models/rugby-profile';
|
|
35
35
|
import { WrestballStatistic } from '../models/wrestball-statistic';
|
|
36
|
+
import { TournamentRoundTeam } from '../models/tournament-round-team';
|
|
36
37
|
export interface TournamentGamesFilters {
|
|
37
38
|
tournamentIds?: number[];
|
|
38
39
|
tournamentSeasonId?: number;
|
|
@@ -146,6 +147,7 @@ export declare class TournamentApi {
|
|
|
146
147
|
getStageTeams(tournamentId: number): Promise<TournamentStageTeam[]>;
|
|
147
148
|
getTeamsAchievements(tournamentId: number): Promise<TeamAchievement[]>;
|
|
148
149
|
getTeamById(tournamentTeamId: number): Promise<TournamentTeam>;
|
|
150
|
+
getTeamRoundTeams(tournamentTeamId: number): Promise<TournamentRoundTeam[]>;
|
|
149
151
|
getUserById(userId: number): Promise<TournamentTeamUser>;
|
|
150
152
|
getUserGames(tournamentUserId: number): Promise<Game[]>;
|
|
151
153
|
downloadTable(tournamentId: number, format: 'pdf' | 'xlsx', isChess?: boolean): Promise<any>;
|
|
@@ -8144,6 +8144,109 @@
|
|
|
8144
8144
|
})
|
|
8145
8145
|
], exports.WrestballStatistic);
|
|
8146
8146
|
|
|
8147
|
+
exports.RoundTeamGame = /** @class */ (function (_super) {
|
|
8148
|
+
__extends(RoundTeamGame, _super);
|
|
8149
|
+
function RoundTeamGame() {
|
|
8150
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
8151
|
+
}
|
|
8152
|
+
RoundTeamGame.toFront = function (data) { };
|
|
8153
|
+
RoundTeamGame.toBack = function (data) { };
|
|
8154
|
+
return RoundTeamGame;
|
|
8155
|
+
}(BaseModel));
|
|
8156
|
+
__decorate([
|
|
8157
|
+
ToFrontHook
|
|
8158
|
+
], exports.RoundTeamGame, "toFront", null);
|
|
8159
|
+
__decorate([
|
|
8160
|
+
ToBackHook
|
|
8161
|
+
], exports.RoundTeamGame, "toBack", null);
|
|
8162
|
+
exports.RoundTeamGame = __decorate([
|
|
8163
|
+
ModelInstance({
|
|
8164
|
+
mappingFields: {
|
|
8165
|
+
id: 'id',
|
|
8166
|
+
team_id: 'teamId',
|
|
8167
|
+
competitor_team_id: 'competitorTeamId',
|
|
8168
|
+
team_score: 'teamScore',
|
|
8169
|
+
competitor_team_score: 'competitorTeamScore',
|
|
8170
|
+
}
|
|
8171
|
+
})
|
|
8172
|
+
], exports.RoundTeamGame);
|
|
8173
|
+
exports.TournamentRoundTeam = /** @class */ (function (_super) {
|
|
8174
|
+
__extends(TournamentRoundTeam, _super);
|
|
8175
|
+
function TournamentRoundTeam() {
|
|
8176
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
8177
|
+
_this.gamesMapping = {};
|
|
8178
|
+
return _this;
|
|
8179
|
+
}
|
|
8180
|
+
Object.defineProperty(TournamentRoundTeam.prototype, "games", {
|
|
8181
|
+
get: function () {
|
|
8182
|
+
return this._games;
|
|
8183
|
+
},
|
|
8184
|
+
set: function (value) {
|
|
8185
|
+
var _this = this;
|
|
8186
|
+
this._games = value;
|
|
8187
|
+
this.gamesMapping = value.reduce(function (acc, game) {
|
|
8188
|
+
var _a;
|
|
8189
|
+
var competitorTeamId = game.teamId === _this.tournamentTeam.team.id ? game.competitorTeamId : game.teamId;
|
|
8190
|
+
return Object.assign(Object.assign({}, acc), (_a = {}, _a[competitorTeamId] = __spreadArray(__spreadArray([], __read((acc[competitorTeamId] || []))), [
|
|
8191
|
+
game,
|
|
8192
|
+
]), _a));
|
|
8193
|
+
}, {});
|
|
8194
|
+
},
|
|
8195
|
+
enumerable: false,
|
|
8196
|
+
configurable: true
|
|
8197
|
+
});
|
|
8198
|
+
TournamentRoundTeam.toFront = function (data) { };
|
|
8199
|
+
TournamentRoundTeam.toBack = function (data) { };
|
|
8200
|
+
return TournamentRoundTeam;
|
|
8201
|
+
}(BaseModel));
|
|
8202
|
+
__decorate([
|
|
8203
|
+
ToFrontHook
|
|
8204
|
+
], exports.TournamentRoundTeam, "toFront", null);
|
|
8205
|
+
__decorate([
|
|
8206
|
+
ToBackHook
|
|
8207
|
+
], exports.TournamentRoundTeam, "toBack", null);
|
|
8208
|
+
exports.TournamentRoundTeam = __decorate([
|
|
8209
|
+
ModelInstance({
|
|
8210
|
+
mappingFields: {
|
|
8211
|
+
id: 'id',
|
|
8212
|
+
tournament_round_id: 'tournamentRoundId',
|
|
8213
|
+
tournament_team: 'tournamentTeam',
|
|
8214
|
+
group: 'group',
|
|
8215
|
+
division: 'division',
|
|
8216
|
+
division_id: 'divisionId',
|
|
8217
|
+
points: 'points',
|
|
8218
|
+
handicap: 'handicap',
|
|
8219
|
+
games_count: 'gamesCount',
|
|
8220
|
+
won_games_count: 'wonGamesCount',
|
|
8221
|
+
lose_games_count: 'loseGamesCount',
|
|
8222
|
+
draw_games_count: 'drawGamesCount',
|
|
8223
|
+
score_sum: 'scoreSum',
|
|
8224
|
+
missed_sum: 'missedSum',
|
|
8225
|
+
games_won_percent: 'gamesWonPercent',
|
|
8226
|
+
score_points_sum: 'scorePointsSum',
|
|
8227
|
+
missed_points_sum: 'missedPointsSum',
|
|
8228
|
+
win_normal_time_games_count: 'winNormalTimeGamesCount',
|
|
8229
|
+
lose_normal_time_games_count: 'loseNormalTimeGamesCount',
|
|
8230
|
+
win_overtime_games_count: 'winOvertimeGamesCount',
|
|
8231
|
+
lose_overtime_games_count: 'loseOvertimeGamesCount',
|
|
8232
|
+
last_games_won: 'lastGamesWon',
|
|
8233
|
+
last_games_count: 'lastGamesCount',
|
|
8234
|
+
tries_scored: 'triesScored',
|
|
8235
|
+
tries_missed: 'triesMissed',
|
|
8236
|
+
attack_bonuses: 'attackBonuses',
|
|
8237
|
+
defense_bonuses: 'defenseBonuses',
|
|
8238
|
+
games_by_score_count: 'gamesByScoreCount',
|
|
8239
|
+
games: 'games',
|
|
8240
|
+
},
|
|
8241
|
+
relation: {
|
|
8242
|
+
group: exports.TournamentGroup,
|
|
8243
|
+
division: exports.TournamentDivision,
|
|
8244
|
+
tournamentTeam: exports.TournamentTeam,
|
|
8245
|
+
games: listField(exports.RoundTeamGame),
|
|
8246
|
+
}
|
|
8247
|
+
})
|
|
8248
|
+
], exports.TournamentRoundTeam);
|
|
8249
|
+
|
|
8147
8250
|
var TournamentApi = /** @class */ (function () {
|
|
8148
8251
|
function TournamentApi(httpClient, configService) {
|
|
8149
8252
|
this.httpClient = httpClient;
|
|
@@ -8349,6 +8452,13 @@
|
|
|
8349
8452
|
});
|
|
8350
8453
|
});
|
|
8351
8454
|
};
|
|
8455
|
+
TournamentApi.prototype.getTeamRoundTeams = function (tournamentTeamId) {
|
|
8456
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8457
|
+
return __generator(this, function (_a) {
|
|
8458
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_team/" + tournamentTeamId + "/tournament_round_teams/").pipe(operators.map(function (response) { return exports.TournamentRoundTeam.toFront(response); })).toPromise()];
|
|
8459
|
+
});
|
|
8460
|
+
});
|
|
8461
|
+
};
|
|
8352
8462
|
TournamentApi.prototype.getUserById = function (userId) {
|
|
8353
8463
|
return __awaiter(this, void 0, void 0, function () {
|
|
8354
8464
|
return __generator(this, function (_a) {
|
|
@@ -11504,108 +11614,6 @@
|
|
|
11504
11614
|
{ type: ConfigService }
|
|
11505
11615
|
]; };
|
|
11506
11616
|
|
|
11507
|
-
exports.RoundTeamGame = /** @class */ (function (_super) {
|
|
11508
|
-
__extends(RoundTeamGame, _super);
|
|
11509
|
-
function RoundTeamGame() {
|
|
11510
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
11511
|
-
}
|
|
11512
|
-
RoundTeamGame.toFront = function (data) { };
|
|
11513
|
-
RoundTeamGame.toBack = function (data) { };
|
|
11514
|
-
return RoundTeamGame;
|
|
11515
|
-
}(BaseModel));
|
|
11516
|
-
__decorate([
|
|
11517
|
-
ToFrontHook
|
|
11518
|
-
], exports.RoundTeamGame, "toFront", null);
|
|
11519
|
-
__decorate([
|
|
11520
|
-
ToBackHook
|
|
11521
|
-
], exports.RoundTeamGame, "toBack", null);
|
|
11522
|
-
exports.RoundTeamGame = __decorate([
|
|
11523
|
-
ModelInstance({
|
|
11524
|
-
mappingFields: {
|
|
11525
|
-
id: 'id',
|
|
11526
|
-
team_id: 'teamId',
|
|
11527
|
-
competitor_team_id: 'competitorTeamId',
|
|
11528
|
-
team_score: 'teamScore',
|
|
11529
|
-
competitor_team_score: 'competitorTeamScore',
|
|
11530
|
-
}
|
|
11531
|
-
})
|
|
11532
|
-
], exports.RoundTeamGame);
|
|
11533
|
-
exports.TournamentRoundTeam = /** @class */ (function (_super) {
|
|
11534
|
-
__extends(TournamentRoundTeam, _super);
|
|
11535
|
-
function TournamentRoundTeam() {
|
|
11536
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
11537
|
-
_this.gamesMapping = {};
|
|
11538
|
-
return _this;
|
|
11539
|
-
}
|
|
11540
|
-
Object.defineProperty(TournamentRoundTeam.prototype, "games", {
|
|
11541
|
-
get: function () {
|
|
11542
|
-
return this._games;
|
|
11543
|
-
},
|
|
11544
|
-
set: function (value) {
|
|
11545
|
-
var _this = this;
|
|
11546
|
-
this._games = value;
|
|
11547
|
-
this.gamesMapping = value.reduce(function (acc, game) {
|
|
11548
|
-
var _a;
|
|
11549
|
-
var competitorTeamId = game.teamId === _this.tournamentTeam.team.id ? game.competitorTeamId : game.teamId;
|
|
11550
|
-
return Object.assign(Object.assign({}, acc), (_a = {}, _a[competitorTeamId] = __spreadArray(__spreadArray([], __read((acc[competitorTeamId] || []))), [
|
|
11551
|
-
game,
|
|
11552
|
-
]), _a));
|
|
11553
|
-
}, {});
|
|
11554
|
-
},
|
|
11555
|
-
enumerable: false,
|
|
11556
|
-
configurable: true
|
|
11557
|
-
});
|
|
11558
|
-
TournamentRoundTeam.toFront = function (data) { };
|
|
11559
|
-
TournamentRoundTeam.toBack = function (data) { };
|
|
11560
|
-
return TournamentRoundTeam;
|
|
11561
|
-
}(BaseModel));
|
|
11562
|
-
__decorate([
|
|
11563
|
-
ToFrontHook
|
|
11564
|
-
], exports.TournamentRoundTeam, "toFront", null);
|
|
11565
|
-
__decorate([
|
|
11566
|
-
ToBackHook
|
|
11567
|
-
], exports.TournamentRoundTeam, "toBack", null);
|
|
11568
|
-
exports.TournamentRoundTeam = __decorate([
|
|
11569
|
-
ModelInstance({
|
|
11570
|
-
mappingFields: {
|
|
11571
|
-
id: 'id',
|
|
11572
|
-
tournament_team: 'tournamentTeam',
|
|
11573
|
-
group: 'group',
|
|
11574
|
-
division: 'division',
|
|
11575
|
-
division_id: 'divisionId',
|
|
11576
|
-
points: 'points',
|
|
11577
|
-
handicap: 'handicap',
|
|
11578
|
-
games_count: 'gamesCount',
|
|
11579
|
-
won_games_count: 'wonGamesCount',
|
|
11580
|
-
lose_games_count: 'loseGamesCount',
|
|
11581
|
-
draw_games_count: 'drawGamesCount',
|
|
11582
|
-
score_sum: 'scoreSum',
|
|
11583
|
-
missed_sum: 'missedSum',
|
|
11584
|
-
games_won_percent: 'gamesWonPercent',
|
|
11585
|
-
score_points_sum: 'scorePointsSum',
|
|
11586
|
-
missed_points_sum: 'missedPointsSum',
|
|
11587
|
-
win_normal_time_games_count: 'winNormalTimeGamesCount',
|
|
11588
|
-
lose_normal_time_games_count: 'loseNormalTimeGamesCount',
|
|
11589
|
-
win_overtime_games_count: 'winOvertimeGamesCount',
|
|
11590
|
-
lose_overtime_games_count: 'loseOvertimeGamesCount',
|
|
11591
|
-
last_games_won: 'lastGamesWon',
|
|
11592
|
-
last_games_count: 'lastGamesCount',
|
|
11593
|
-
tries_scored: 'triesScored',
|
|
11594
|
-
tries_missed: 'triesMissed',
|
|
11595
|
-
attack_bonuses: 'attackBonuses',
|
|
11596
|
-
defense_bonuses: 'defenseBonuses',
|
|
11597
|
-
games_by_score_count: 'gamesByScoreCount',
|
|
11598
|
-
games: 'games',
|
|
11599
|
-
},
|
|
11600
|
-
relation: {
|
|
11601
|
-
group: exports.TournamentGroup,
|
|
11602
|
-
division: exports.TournamentDivision,
|
|
11603
|
-
tournamentTeam: exports.TournamentTeam,
|
|
11604
|
-
games: listField(exports.RoundTeamGame),
|
|
11605
|
-
}
|
|
11606
|
-
})
|
|
11607
|
-
], exports.TournamentRoundTeam);
|
|
11608
|
-
|
|
11609
11617
|
var TournamentRoundApi = /** @class */ (function () {
|
|
11610
11618
|
function TournamentRoundApi(httpClient, configService) {
|
|
11611
11619
|
this.httpClient = httpClient;
|