@mtgame/core 0.1.92 → 0.1.94
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/api/tournament-stage-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +87 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/tournament-api.js +9 -1
- package/esm2015/api/tournament-stage-api.js +9 -1
- package/esm2015/models/achievement.js +33 -0
- package/esm2015/models/public-api.js +3 -1
- package/esm2015/models/team-achievement.js +34 -0
- package/esm2015/models/tournament-disqualification.js +2 -1
- package/fesm2015/mtgame-core.js +74 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/achievement.d.ts +14 -0
- package/models/public-api.d.ts +2 -0
- package/models/team-achievement.d.ts +14 -0
- package/models/tournament-disqualification.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/tournament-api.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { LeagueUserPermissions } from '../models/league-user';
|
|
|
19
19
|
import { HandballStatistic } from '../models/handball-statistic';
|
|
20
20
|
import { RugbyStatistic } from '../models/rugby-statistic';
|
|
21
21
|
import { TournamentGroup } from '../models/tournament-group';
|
|
22
|
+
import { TeamAchievement } from '../models/team-achievement';
|
|
22
23
|
export interface TournamentGamesFilters {
|
|
23
24
|
tournamentIds?: number[];
|
|
24
25
|
tournamentSeasonId?: number;
|
|
@@ -101,6 +102,7 @@ export declare class TournamentApi {
|
|
|
101
102
|
getGroups(tournamentId: number): Promise<TournamentGroup[]>;
|
|
102
103
|
getTeams(tournamentId: number, groupId?: number): Promise<TournamentTeam[]>;
|
|
103
104
|
getStageTeams(tournamentId: number): Promise<TournamentStageTeam[]>;
|
|
105
|
+
getTeamsAchievements(tournamentId: number): Promise<TeamAchievement[]>;
|
|
104
106
|
getTeamById(tournamentTeamId: number): Promise<TournamentTeam>;
|
|
105
107
|
getUserById(userId: number): Promise<TournamentTeamUser>;
|
|
106
108
|
getUserGames(tournamentUserId: number): Promise<Game[]>;
|
|
@@ -4,12 +4,14 @@ import { TournamentGroup } from '../models/tournament-group';
|
|
|
4
4
|
import { Playoff } from '../models/playoff';
|
|
5
5
|
import { TournamentStageTeam } from '../models/tournament-stage-team';
|
|
6
6
|
import { ConfigService } from '../services/config.service';
|
|
7
|
+
import { TeamAchievement } from '../models/team-achievement';
|
|
7
8
|
export declare class TournamentStageApi {
|
|
8
9
|
private httpClient;
|
|
9
10
|
private configService;
|
|
10
11
|
constructor(httpClient: HttpClient, configService: ConfigService);
|
|
11
12
|
getById(id: number): Promise<TournamentStage>;
|
|
12
13
|
getGroups(stageId: number): Promise<TournamentGroup[]>;
|
|
14
|
+
getTeamsAchievements(stageId: number): Promise<TeamAchievement[]>;
|
|
13
15
|
getPlayoffs(stageId: number): Promise<Playoff[]>;
|
|
14
16
|
getTeams(stageId: number): Promise<TournamentStageTeam[]>;
|
|
15
17
|
}
|
|
@@ -2858,6 +2858,7 @@
|
|
|
2858
2858
|
date_from: 'dateFrom',
|
|
2859
2859
|
date_to: 'dateTo',
|
|
2860
2860
|
matches_count: 'matchesCount',
|
|
2861
|
+
reason: 'reason',
|
|
2861
2862
|
},
|
|
2862
2863
|
relation: {
|
|
2863
2864
|
dateFrom: DateField,
|
|
@@ -5945,6 +5946,74 @@
|
|
|
5945
5946
|
})
|
|
5946
5947
|
], exports.RugbyStatistic);
|
|
5947
5948
|
|
|
5949
|
+
exports.AchievementTypes = void 0;
|
|
5950
|
+
(function (AchievementTypes) {
|
|
5951
|
+
AchievementTypes[AchievementTypes["by_game"] = 1] = "by_game";
|
|
5952
|
+
AchievementTypes[AchievementTypes["by_stage"] = 2] = "by_stage";
|
|
5953
|
+
})(exports.AchievementTypes || (exports.AchievementTypes = {}));
|
|
5954
|
+
exports.Achievement = /** @class */ (function (_super) {
|
|
5955
|
+
__extends(Achievement, _super);
|
|
5956
|
+
function Achievement() {
|
|
5957
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5958
|
+
}
|
|
5959
|
+
Achievement.toFront = function (data) { };
|
|
5960
|
+
Achievement.toBack = function (data) { };
|
|
5961
|
+
return Achievement;
|
|
5962
|
+
}(BaseModel));
|
|
5963
|
+
__decorate([
|
|
5964
|
+
ToFrontHook
|
|
5965
|
+
], exports.Achievement, "toFront", null);
|
|
5966
|
+
__decorate([
|
|
5967
|
+
ToBackHook
|
|
5968
|
+
], exports.Achievement, "toBack", null);
|
|
5969
|
+
exports.Achievement = __decorate([
|
|
5970
|
+
ModelInstance({
|
|
5971
|
+
mappingFields: {
|
|
5972
|
+
id: 'id',
|
|
5973
|
+
name: 'name',
|
|
5974
|
+
alias: 'type',
|
|
5975
|
+
value: 'value',
|
|
5976
|
+
type: 'type',
|
|
5977
|
+
},
|
|
5978
|
+
relation: {
|
|
5979
|
+
type: enumField(exports.AchievementTypes),
|
|
5980
|
+
}
|
|
5981
|
+
})
|
|
5982
|
+
], exports.Achievement);
|
|
5983
|
+
|
|
5984
|
+
exports.TeamAchievement = /** @class */ (function (_super) {
|
|
5985
|
+
__extends(TeamAchievement, _super);
|
|
5986
|
+
function TeamAchievement() {
|
|
5987
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5988
|
+
}
|
|
5989
|
+
TeamAchievement.toFront = function (data) { };
|
|
5990
|
+
TeamAchievement.toBack = function (data) { };
|
|
5991
|
+
return TeamAchievement;
|
|
5992
|
+
}(BaseModel));
|
|
5993
|
+
__decorate([
|
|
5994
|
+
ToFrontHook
|
|
5995
|
+
], exports.TeamAchievement, "toFront", null);
|
|
5996
|
+
__decorate([
|
|
5997
|
+
ToBackHook
|
|
5998
|
+
], exports.TeamAchievement, "toBack", null);
|
|
5999
|
+
exports.TeamAchievement = __decorate([
|
|
6000
|
+
ModelInstance({
|
|
6001
|
+
mappingFields: {
|
|
6002
|
+
id: 'id',
|
|
6003
|
+
achievement: 'achievement',
|
|
6004
|
+
tournament_stage: 'tournamentStage',
|
|
6005
|
+
team_id: 'teamId',
|
|
6006
|
+
game: 'game',
|
|
6007
|
+
mt_points: 'mtPoints',
|
|
6008
|
+
},
|
|
6009
|
+
relation: {
|
|
6010
|
+
achievement: exports.Achievement,
|
|
6011
|
+
tournamentStage: exports.TournamentStage,
|
|
6012
|
+
game: exports.Game
|
|
6013
|
+
}
|
|
6014
|
+
})
|
|
6015
|
+
], exports.TeamAchievement);
|
|
6016
|
+
|
|
5948
6017
|
var TournamentApi = /** @class */ (function () {
|
|
5949
6018
|
function TournamentApi(httpClient, configService) {
|
|
5950
6019
|
this.httpClient = httpClient;
|
|
@@ -6098,6 +6167,15 @@
|
|
|
6098
6167
|
});
|
|
6099
6168
|
});
|
|
6100
6169
|
};
|
|
6170
|
+
TournamentApi.prototype.getTeamsAchievements = function (tournamentId) {
|
|
6171
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6172
|
+
return __generator(this, function (_a) {
|
|
6173
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/achievements/")
|
|
6174
|
+
.pipe(operators.map(function (result) { return exports.TeamAchievement.toFront(result); }))
|
|
6175
|
+
.toPromise()];
|
|
6176
|
+
});
|
|
6177
|
+
});
|
|
6178
|
+
};
|
|
6101
6179
|
TournamentApi.prototype.getTeamById = function (tournamentTeamId) {
|
|
6102
6180
|
return __awaiter(this, void 0, void 0, function () {
|
|
6103
6181
|
return __generator(this, function (_a) {
|
|
@@ -8920,6 +8998,15 @@
|
|
|
8920
8998
|
});
|
|
8921
8999
|
});
|
|
8922
9000
|
};
|
|
9001
|
+
TournamentStageApi.prototype.getTeamsAchievements = function (stageId) {
|
|
9002
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
9003
|
+
return __generator(this, function (_a) {
|
|
9004
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_stage/" + stageId + "/achievements/")
|
|
9005
|
+
.pipe(operators.map(function (result) { return exports.TeamAchievement.toFront(result); }))
|
|
9006
|
+
.toPromise()];
|
|
9007
|
+
});
|
|
9008
|
+
});
|
|
9009
|
+
};
|
|
8923
9010
|
TournamentStageApi.prototype.getPlayoffs = function (stageId) {
|
|
8924
9011
|
return __awaiter(this, void 0, void 0, function () {
|
|
8925
9012
|
return __generator(this, function (_a) {
|