@mtgame/core 0.1.30 → 0.1.32
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/league-player-api.d.ts +1 -1
- package/api/tournament-season-api.d.ts +1 -1
- package/bundles/mtgame-core.umd.js +60 -5
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/league-player-api.js +8 -4
- package/esm2015/api/tournament-season-api.js +7 -3
- package/esm2015/localization/hockey-game-log-types.js +3 -1
- package/esm2015/models/game.js +29 -1
- package/esm2015/models/hockey-game-log.js +4 -2
- package/esm2015/models/hockey-game-statistic.js +3 -1
- package/esm2015/models/hockey-statistic.js +3 -1
- package/esm2015/models/tournament-team.js +5 -1
- package/esm2015/models/tournament.js +4 -1
- package/esm5/api/league-player-api.js +8 -4
- package/esm5/api/tournament-season-api.js +8 -3
- package/esm5/localization/hockey-game-log-types.js +3 -1
- package/esm5/models/game.js +34 -1
- package/esm5/models/hockey-game-log.js +4 -2
- package/esm5/models/hockey-game-statistic.js +3 -1
- package/esm5/models/hockey-statistic.js +3 -1
- package/esm5/models/tournament-team.js +5 -1
- package/esm5/models/tournament.js +4 -1
- package/fesm2015/mtgame-core.js +54 -6
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +60 -6
- package/fesm5/mtgame-core.js.map +1 -1
- package/localization/hockey-game-log-types.d.ts +2 -0
- package/models/game.d.ts +10 -0
- package/models/hockey-game-log.d.ts +3 -1
- package/models/hockey-game-statistic.d.ts +2 -0
- package/models/hockey-statistic.d.ts +2 -0
- package/models/tournament-team.d.ts +3 -0
- package/models/tournament.d.ts +2 -0
- package/mtgame-core.metadata.json +1 -1
- 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,
|
|
@@ -3249,6 +3286,8 @@
|
|
|
3249
3286
|
HockeyGameLogTypes[HockeyGameLogTypes["timeout"] = 20] = "timeout";
|
|
3250
3287
|
HockeyGameLogTypes[HockeyGameLogTypes["penalty_start"] = 21] = "penalty_start";
|
|
3251
3288
|
HockeyGameLogTypes[HockeyGameLogTypes["penalty_end"] = 22] = "penalty_end";
|
|
3289
|
+
HockeyGameLogTypes[HockeyGameLogTypes["after_game_shootout_attempt"] = 23] = "after_game_shootout_attempt";
|
|
3290
|
+
HockeyGameLogTypes[HockeyGameLogTypes["after_game_shootout_goal"] = 24] = "after_game_shootout_goal";
|
|
3252
3291
|
})(exports.HockeyGameLogTypes || (exports.HockeyGameLogTypes = {}));
|
|
3253
3292
|
|
|
3254
3293
|
(function (HockeyAdvantageTypes) {
|
|
@@ -3295,7 +3334,7 @@
|
|
|
3295
3334
|
configurable: true
|
|
3296
3335
|
});
|
|
3297
3336
|
HockeyGameLog.prototype.isScoreType = function () {
|
|
3298
|
-
return [exports.HockeyGameLogTypes.goal, exports.HockeyGameLogTypes.shootout_goal].indexOf(this.logType) > -1;
|
|
3337
|
+
return [exports.HockeyGameLogTypes.goal, exports.HockeyGameLogTypes.shootout_goal, exports.HockeyGameLogTypes.after_game_shootout_goal].indexOf(this.logType) > -1;
|
|
3299
3338
|
};
|
|
3300
3339
|
HockeyGameLog.prototype.isPenaltyType = function () {
|
|
3301
3340
|
return [
|
|
@@ -3497,6 +3536,8 @@
|
|
|
3497
3536
|
sh_assists: 'shAssists',
|
|
3498
3537
|
shootout_attempts: 'shootoutAttempts',
|
|
3499
3538
|
shootout_goals: 'shootoutGoals',
|
|
3539
|
+
after_game_shootout_attempts: 'afterGameShootoutAttempts',
|
|
3540
|
+
after_game_shootout_goals: 'afterGameShootoutGoals',
|
|
3500
3541
|
block_shots: 'blockShots',
|
|
3501
3542
|
face_off_losses: 'faceOffLosses',
|
|
3502
3543
|
face_off_wins: 'faceOffWins',
|
|
@@ -3610,6 +3651,8 @@
|
|
|
3610
3651
|
sh_assists: 'shAssists',
|
|
3611
3652
|
shootout_attempts: 'shootoutAttempts',
|
|
3612
3653
|
shootout_goals: 'shootoutGoals',
|
|
3654
|
+
after_game_shootout_attempts: 'afterGameShootoutAttempts',
|
|
3655
|
+
after_game_shootout_goals: 'afterGameShootoutGoals',
|
|
3613
3656
|
block_shots: 'blockShots',
|
|
3614
3657
|
face_off_losses: 'faceOffLosses',
|
|
3615
3658
|
face_off_wins: 'faceOffWins',
|
|
@@ -5899,8 +5942,12 @@
|
|
|
5899
5942
|
LeaguePlayerApi.prototype.getById = function (leaguePlayerId) {
|
|
5900
5943
|
return this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_player/" + leaguePlayerId + "/").pipe(operators.map(function (item) { return LeaguePlayer.toFront(item); })).toPromise();
|
|
5901
5944
|
};
|
|
5902
|
-
LeaguePlayerApi.prototype.getTournamentUsers = function (leaguePlayerId) {
|
|
5903
|
-
|
|
5945
|
+
LeaguePlayerApi.prototype.getTournamentUsers = function (leaguePlayerId, seasonId) {
|
|
5946
|
+
var params = new http.HttpParams();
|
|
5947
|
+
if (seasonId) {
|
|
5948
|
+
params = params.set('season_id', seasonId.toString());
|
|
5949
|
+
}
|
|
5950
|
+
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
5951
|
};
|
|
5905
5952
|
LeaguePlayerApi.ctorParameters = function () { return [
|
|
5906
5953
|
{ type: http.HttpClient },
|
|
@@ -7617,10 +7664,15 @@
|
|
|
7617
7664
|
});
|
|
7618
7665
|
});
|
|
7619
7666
|
};
|
|
7620
|
-
TournamentSeasonApi.prototype.getTeams = function (seasonId) {
|
|
7667
|
+
TournamentSeasonApi.prototype.getTeams = function (seasonId, short) {
|
|
7621
7668
|
return __awaiter(this, void 0, void 0, function () {
|
|
7669
|
+
var params;
|
|
7622
7670
|
return __generator(this, function (_a) {
|
|
7623
|
-
|
|
7671
|
+
params = new http.HttpParams();
|
|
7672
|
+
if (short) {
|
|
7673
|
+
params = params.set('short', '1');
|
|
7674
|
+
}
|
|
7675
|
+
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
7676
|
});
|
|
7625
7677
|
});
|
|
7626
7678
|
};
|
|
@@ -8493,6 +8545,8 @@
|
|
|
8493
8545
|
_a$2[exports.HockeyGameLogTypes.goal] = 'Гол',
|
|
8494
8546
|
_a$2[exports.HockeyGameLogTypes.shootout_attempt] = 'Булит промах',
|
|
8495
8547
|
_a$2[exports.HockeyGameLogTypes.shootout_goal] = 'Булит гол',
|
|
8548
|
+
_a$2[exports.HockeyGameLogTypes.after_game_shootout_attempt] = 'Булит промах',
|
|
8549
|
+
_a$2[exports.HockeyGameLogTypes.after_game_shootout_goal] = 'Булит гол',
|
|
8496
8550
|
_a$2[exports.HockeyGameLogTypes.assist] = 'Передача',
|
|
8497
8551
|
_a$2[exports.HockeyGameLogTypes.block_shot] = 'Блокировка броска',
|
|
8498
8552
|
_a$2[exports.HockeyGameLogTypes.minor_penalty] = 'Малый штраф',
|
|
@@ -9263,6 +9317,7 @@
|
|
|
9263
9317
|
exports.TournamentStageApi = TournamentStageApi;
|
|
9264
9318
|
exports.TournamentStageTeam = TournamentStageTeam;
|
|
9265
9319
|
exports.TournamentTeam = TournamentTeam;
|
|
9320
|
+
exports.TournamentTeamShort = TournamentTeamShort;
|
|
9266
9321
|
exports.TournamentTeamUser = TournamentTeamUser;
|
|
9267
9322
|
exports.TournamentTeamUserInvite = TournamentTeamUserInvite;
|
|
9268
9323
|
exports.TournamentTeamWinner = TournamentTeamWinner;
|