@mtgame/core 0.2.68 → 0.2.69
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 +168 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/tournament-api.js +12 -1
- package/esm2015/models/tournament.js +5 -1
- package/esm2015/models/wrestball-statistic.js +123 -0
- package/fesm2015/mtgame-core.js +129 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/tournament.d.ts +3 -0
- package/models/wrestball-statistic.d.ts +72 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/tournament-api.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ import { GameWaterpoloPosition } from '../models/waterpolo-profile';
|
|
|
32
32
|
import { GameBasketballPosition } from '../models/basketball-profile';
|
|
33
33
|
import { GameVolleyballPosition } from '../models/volleyball-profile';
|
|
34
34
|
import { GameRugbyPosition } from '../models/rugby-profile';
|
|
35
|
+
import { WrestballStatistic } from '../models/wrestball-statistic';
|
|
35
36
|
export interface TournamentGamesFilters {
|
|
36
37
|
tournamentIds?: number[];
|
|
37
38
|
tournamentSeasonId?: number;
|
|
@@ -165,6 +166,7 @@ export declare class TournamentApi {
|
|
|
165
166
|
getHandballStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<HandballStatistic[]>>;
|
|
166
167
|
getRugbyStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<RugbyStatistic[]>>;
|
|
167
168
|
getWaterpoloStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<WaterpoloStatistic[]>>;
|
|
169
|
+
getWrestballStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<WrestballStatistic[]>>;
|
|
168
170
|
getTournamentTeamUsers(tournamentTeamId: number, includes?: string[]): Promise<TournamentTeamUser[]>;
|
|
169
171
|
myPermission(tournamentId: number): Promise<LeagueUserPermissions[]>;
|
|
170
172
|
getTournamentTeamTournaments(tournamentTeamId: number): Promise<Tournament[]>;
|
|
@@ -1620,6 +1620,10 @@
|
|
|
1620
1620
|
WaterpoloStatisticTypes[WaterpoloStatisticTypes["standard"] = 1] = "standard";
|
|
1621
1621
|
WaterpoloStatisticTypes[WaterpoloStatisticTypes["light"] = 2] = "light";
|
|
1622
1622
|
})(exports.WaterpoloStatisticTypes || (exports.WaterpoloStatisticTypes = {}));
|
|
1623
|
+
exports.WrestballStatisticTypes = void 0;
|
|
1624
|
+
(function (WrestballStatisticTypes) {
|
|
1625
|
+
WrestballStatisticTypes[WrestballStatisticTypes["standard"] = 1] = "standard";
|
|
1626
|
+
})(exports.WrestballStatisticTypes || (exports.WrestballStatisticTypes = {}));
|
|
1623
1627
|
exports.GameTimeTypes = void 0;
|
|
1624
1628
|
(function (GameTimeTypes) {
|
|
1625
1629
|
GameTimeTypes[GameTimeTypes["clean"] = 1] = "clean";
|
|
@@ -7339,6 +7343,157 @@
|
|
|
7339
7343
|
})
|
|
7340
7344
|
], exports.TournamentRound);
|
|
7341
7345
|
|
|
7346
|
+
var WrestballStatistic = /** @class */ (function (_super) {
|
|
7347
|
+
__extends(WrestballStatistic, _super);
|
|
7348
|
+
function WrestballStatistic() {
|
|
7349
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
7350
|
+
}
|
|
7351
|
+
Object.defineProperty(WrestballStatistic.prototype, "totalFouls", {
|
|
7352
|
+
get: function () {
|
|
7353
|
+
return Math.floor(10 * ((this.personalFouls || 0))) / 10;
|
|
7354
|
+
},
|
|
7355
|
+
enumerable: false,
|
|
7356
|
+
configurable: true
|
|
7357
|
+
});
|
|
7358
|
+
Object.defineProperty(WrestballStatistic.prototype, "gameMinutes", {
|
|
7359
|
+
get: function () {
|
|
7360
|
+
return Math.floor(this.gameTime / 60);
|
|
7361
|
+
},
|
|
7362
|
+
enumerable: false,
|
|
7363
|
+
configurable: true
|
|
7364
|
+
});
|
|
7365
|
+
Object.defineProperty(WrestballStatistic.prototype, "tournamentTeamPoints", {
|
|
7366
|
+
get: function () {
|
|
7367
|
+
return this.tournamentTeam && this.tournamentTeam.points;
|
|
7368
|
+
},
|
|
7369
|
+
enumerable: false,
|
|
7370
|
+
configurable: true
|
|
7371
|
+
});
|
|
7372
|
+
Object.defineProperty(WrestballStatistic.prototype, "onePointsPercent", {
|
|
7373
|
+
get: function () {
|
|
7374
|
+
if (!this.onePointsMade || !this.onePointAttempts) {
|
|
7375
|
+
return 0;
|
|
7376
|
+
}
|
|
7377
|
+
return Math.round(1000 * this.onePointsMade / this.onePointAttempts) / 10;
|
|
7378
|
+
},
|
|
7379
|
+
enumerable: false,
|
|
7380
|
+
configurable: true
|
|
7381
|
+
});
|
|
7382
|
+
Object.defineProperty(WrestballStatistic.prototype, "twoPointsPercent", {
|
|
7383
|
+
get: function () {
|
|
7384
|
+
if (!this.twoPointsMade || !this.twoPointAttempts) {
|
|
7385
|
+
return 0;
|
|
7386
|
+
}
|
|
7387
|
+
return Math.round(1000 * this.twoPointsMade / this.twoPointAttempts) / 10;
|
|
7388
|
+
},
|
|
7389
|
+
enumerable: false,
|
|
7390
|
+
configurable: true
|
|
7391
|
+
});
|
|
7392
|
+
Object.defineProperty(WrestballStatistic.prototype, "threePointsPercent", {
|
|
7393
|
+
get: function () {
|
|
7394
|
+
if (!this.threePointsMade || !this.threePointAttempts) {
|
|
7395
|
+
return 0;
|
|
7396
|
+
}
|
|
7397
|
+
return Math.round(1000 * this.threePointsMade / this.threePointAttempts) / 10;
|
|
7398
|
+
},
|
|
7399
|
+
enumerable: false,
|
|
7400
|
+
configurable: true
|
|
7401
|
+
});
|
|
7402
|
+
Object.defineProperty(WrestballStatistic.prototype, "freeThrowsPercent", {
|
|
7403
|
+
get: function () {
|
|
7404
|
+
if (!this.freeThrowsMade || !this.freeThrowAttempts) {
|
|
7405
|
+
return 0;
|
|
7406
|
+
}
|
|
7407
|
+
return Math.round(1000 * this.freeThrowsMade / this.freeThrowAttempts) / 10;
|
|
7408
|
+
},
|
|
7409
|
+
enumerable: false,
|
|
7410
|
+
configurable: true
|
|
7411
|
+
});
|
|
7412
|
+
Object.defineProperty(WrestballStatistic.prototype, "totalRebounds", {
|
|
7413
|
+
get: function () {
|
|
7414
|
+
return Math.floor(10 * ((this.offensiveRebounds || 0) + (this.defensiveRebounds || 0))) / 10;
|
|
7415
|
+
},
|
|
7416
|
+
enumerable: false,
|
|
7417
|
+
configurable: true
|
|
7418
|
+
});
|
|
7419
|
+
WrestballStatistic.toFront = function (data) { };
|
|
7420
|
+
WrestballStatistic.toBack = function (data) { };
|
|
7421
|
+
return WrestballStatistic;
|
|
7422
|
+
}(BaseModel));
|
|
7423
|
+
__decorate([
|
|
7424
|
+
ToFrontHook
|
|
7425
|
+
], WrestballStatistic, "toFront", null);
|
|
7426
|
+
__decorate([
|
|
7427
|
+
ToBackHook
|
|
7428
|
+
], WrestballStatistic, "toBack", null);
|
|
7429
|
+
WrestballStatistic = __decorate([
|
|
7430
|
+
ModelInstance({
|
|
7431
|
+
mappingFields: {
|
|
7432
|
+
league_player: 'leaguePlayer',
|
|
7433
|
+
tournament_team_user: 'tournamentTeamUser',
|
|
7434
|
+
team: 'team',
|
|
7435
|
+
team_user: 'teamUser',
|
|
7436
|
+
user: 'user',
|
|
7437
|
+
tournament_team: 'tournamentTeam',
|
|
7438
|
+
month: 'month',
|
|
7439
|
+
win_lose: 'winLose',
|
|
7440
|
+
games_count: 'gamesCount',
|
|
7441
|
+
won_games_count: 'wonGamesCount',
|
|
7442
|
+
team_score_sum: 'teamScoreSum',
|
|
7443
|
+
team_missed_sum: 'teamMissedSum',
|
|
7444
|
+
tournament_points: 'tournamentPoints',
|
|
7445
|
+
points: 'points',
|
|
7446
|
+
two_points_made: 'twoPointsMade',
|
|
7447
|
+
three_points_made: 'threePointsMade',
|
|
7448
|
+
free_throws_made: 'freeThrowsMade',
|
|
7449
|
+
one_points_made: 'onePointsMade',
|
|
7450
|
+
two_point_attempts: 'twoPointAttempts',
|
|
7451
|
+
three_point_attempts: 'threePointAttempts',
|
|
7452
|
+
free_throw_attempts: 'freeThrowAttempts',
|
|
7453
|
+
one_point_attempts: 'onePointAttempts',
|
|
7454
|
+
two_point_percent: 'twoPointPercent',
|
|
7455
|
+
three_point_percent: 'threePointPercent',
|
|
7456
|
+
free_throw_percent: 'freeThrowPercent',
|
|
7457
|
+
one_point_percent: 'onePointPercent',
|
|
7458
|
+
assists: 'assists',
|
|
7459
|
+
blocks: 'blocks',
|
|
7460
|
+
rebounds: 'rebounds',
|
|
7461
|
+
offensive_rebounds: 'offensiveRebounds',
|
|
7462
|
+
defensive_rebounds: 'defensiveRebounds',
|
|
7463
|
+
steals: 'steals',
|
|
7464
|
+
turnovers: 'turnovers',
|
|
7465
|
+
personal_fouls: 'personalFouls',
|
|
7466
|
+
drawn_fouls: 'drawnFouls',
|
|
7467
|
+
wrestler_scrums_won: 'wrestlerScrumsWon',
|
|
7468
|
+
wrestler_scrums_lost: 'wrestlerScrumsLost',
|
|
7469
|
+
wrestler_scrums_tie: 'wrestlerScrumsTie',
|
|
7470
|
+
wrestler_scrum_points: 'wrestlerScrumPoints',
|
|
7471
|
+
scrums_won: 'scrumsWon',
|
|
7472
|
+
scrums_lost: 'scrumsLost',
|
|
7473
|
+
scrums_tie: 'scrumsTie',
|
|
7474
|
+
scrum_points: 'scrumPoints',
|
|
7475
|
+
yellow_cards: 'yellowCards',
|
|
7476
|
+
red_cards: 'redCards',
|
|
7477
|
+
wrestler_scrums: 'wrestlerScrums',
|
|
7478
|
+
wrestler_scrums_won_percent: 'wrestlerScrumsWonPercent',
|
|
7479
|
+
scrums: 'scrums',
|
|
7480
|
+
scrums_won_percent: 'scrumsWonPercent',
|
|
7481
|
+
game_time: 'gameTime',
|
|
7482
|
+
newbie: 'newbie',
|
|
7483
|
+
rank: 'rank',
|
|
7484
|
+
},
|
|
7485
|
+
relation: {
|
|
7486
|
+
leaguePlayer: exports.LeaguePlayer,
|
|
7487
|
+
tournamentTeamUser: exports.TournamentTeamUser,
|
|
7488
|
+
team: exports.Team,
|
|
7489
|
+
teamUser: exports.TeamUser,
|
|
7490
|
+
user: exports.User,
|
|
7491
|
+
tournamentTeam: exports.TournamentTeam,
|
|
7492
|
+
month: DateField
|
|
7493
|
+
}
|
|
7494
|
+
})
|
|
7495
|
+
], WrestballStatistic);
|
|
7496
|
+
|
|
7342
7497
|
var TournamentApi = /** @class */ (function () {
|
|
7343
7498
|
function TournamentApi(httpClient, configService) {
|
|
7344
7499
|
this.httpClient = httpClient;
|
|
@@ -7821,6 +7976,19 @@
|
|
|
7821
7976
|
});
|
|
7822
7977
|
});
|
|
7823
7978
|
};
|
|
7979
|
+
TournamentApi.prototype.getWrestballStatistic = function (filters) {
|
|
7980
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7981
|
+
var params;
|
|
7982
|
+
return __generator(this, function (_a) {
|
|
7983
|
+
params = new i1.HttpParams();
|
|
7984
|
+
params = applyStatisticFilters(filters, params);
|
|
7985
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/wrestball_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
|
|
7986
|
+
total: +result.headers.get('X-Page-Count'),
|
|
7987
|
+
data: WrestballStatistic.toFront(result.body)
|
|
7988
|
+
}); })).toPromise()];
|
|
7989
|
+
});
|
|
7990
|
+
});
|
|
7991
|
+
};
|
|
7824
7992
|
TournamentApi.prototype.getTournamentTeamUsers = function (tournamentTeamId, includes) {
|
|
7825
7993
|
if (includes === void 0) { includes = []; }
|
|
7826
7994
|
return __awaiter(this, void 0, void 0, function () {
|