@mtgame/core 0.2.71 → 0.2.73
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/public-api.d.ts +1 -0
- package/api/wrestball-game-api.d.ts +16 -0
- package/bundles/mtgame-core.umd.js +369 -22
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/public-api.js +2 -1
- package/esm2015/api/wrestball-game-api.js +49 -0
- package/esm2015/models/public-api.js +7 -1
- package/esm2015/models/wrestball-game-log.js +128 -0
- package/esm2015/models/wrestball-game-statistic.js +100 -0
- package/esm2015/models/wrestball-game-team-statistic.js +27 -0
- package/esm2015/mtgame-core.js +1 -3
- package/fesm2015/mtgame-core.js +282 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/public-api.d.ts +6 -0
- package/models/wrestball-game-log.d.ts +64 -0
- package/models/wrestball-game-statistic.d.ts +52 -0
- package/models/wrestball-game-team-statistic.d.ts +9 -0
- package/mtgame-core.d.ts +0 -2
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/public-api.d.ts
CHANGED
|
@@ -25,5 +25,6 @@ export * from './tournament-stage-api';
|
|
|
25
25
|
export * from './user-api';
|
|
26
26
|
export * from './volleyball-game-api';
|
|
27
27
|
export * from './waterpolo-game-api';
|
|
28
|
+
export * from './wrestball-game-api';
|
|
28
29
|
export * from './public-team-api';
|
|
29
30
|
export * from './public-user-api';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Game } from '../models/game';
|
|
3
|
+
import { ConfigService } from '../services/config.service';
|
|
4
|
+
import { GameBaseApi } from './game-base-api';
|
|
5
|
+
import { WrestballGameTeamStatistic } from '../models/wrestball-game-team-statistic';
|
|
6
|
+
import { WrestballGameStatistic } from '../models/wrestball-game-statistic';
|
|
7
|
+
import { WrestballGameLog } from '../models/wrestball-game-log';
|
|
8
|
+
export declare class WrestballGameApi extends GameBaseApi {
|
|
9
|
+
protected httpClient: HttpClient;
|
|
10
|
+
protected configService: ConfigService;
|
|
11
|
+
constructor(httpClient: HttpClient, configService: ConfigService);
|
|
12
|
+
getById(gameId: number): Promise<Game>;
|
|
13
|
+
getTeamStatistic(gameId: number): Promise<WrestballGameTeamStatistic>;
|
|
14
|
+
getUserStatistic(gameId: number): Promise<WrestballGameStatistic[]>;
|
|
15
|
+
getLogs(gameId: number): Promise<WrestballGameLog[]>;
|
|
16
|
+
}
|
|
@@ -1235,12 +1235,12 @@
|
|
|
1235
1235
|
})
|
|
1236
1236
|
], exports.WaterpoloProfile);
|
|
1237
1237
|
|
|
1238
|
-
exports
|
|
1238
|
+
exports.WrestballWorkHand = void 0;
|
|
1239
1239
|
(function (WrestballWorkHand) {
|
|
1240
1240
|
WrestballWorkHand[WrestballWorkHand["left"] = 1] = "left";
|
|
1241
1241
|
WrestballWorkHand[WrestballWorkHand["right"] = 2] = "right";
|
|
1242
|
-
})(exports
|
|
1243
|
-
exports
|
|
1242
|
+
})(exports.WrestballWorkHand || (exports.WrestballWorkHand = {}));
|
|
1243
|
+
exports.WrestballProfile = /** @class */ (function (_super) {
|
|
1244
1244
|
__extends(WrestballProfile, _super);
|
|
1245
1245
|
function WrestballProfile() {
|
|
1246
1246
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -1253,11 +1253,11 @@
|
|
|
1253
1253
|
}(BaseModel));
|
|
1254
1254
|
__decorate([
|
|
1255
1255
|
ToFrontHook
|
|
1256
|
-
], exports
|
|
1256
|
+
], exports.WrestballProfile, "toFront", null);
|
|
1257
1257
|
__decorate([
|
|
1258
1258
|
ToBackHook
|
|
1259
|
-
], exports
|
|
1260
|
-
exports
|
|
1259
|
+
], exports.WrestballProfile, "toBack", null);
|
|
1260
|
+
exports.WrestballProfile = __decorate([
|
|
1261
1261
|
ModelInstance({
|
|
1262
1262
|
mappingFields: {
|
|
1263
1263
|
id: 'id',
|
|
@@ -1265,10 +1265,10 @@
|
|
|
1265
1265
|
work_hand: 'workHand'
|
|
1266
1266
|
},
|
|
1267
1267
|
relation: {
|
|
1268
|
-
workHand: enumField(exports
|
|
1268
|
+
workHand: enumField(exports.WrestballWorkHand)
|
|
1269
1269
|
}
|
|
1270
1270
|
})
|
|
1271
|
-
], exports
|
|
1271
|
+
], exports.WrestballProfile);
|
|
1272
1272
|
|
|
1273
1273
|
exports.UserGender = void 0;
|
|
1274
1274
|
(function (UserGender) {
|
|
@@ -1364,7 +1364,7 @@
|
|
|
1364
1364
|
handballProfile: exports.HandballProfile,
|
|
1365
1365
|
rugbyProfile: exports.RugbyProfile,
|
|
1366
1366
|
waterpoloProfile: exports.WaterpoloProfile,
|
|
1367
|
-
wrestballProfile: exports
|
|
1367
|
+
wrestballProfile: exports.WrestballProfile,
|
|
1368
1368
|
city: exports.City,
|
|
1369
1369
|
gender: enumField(exports.UserGender)
|
|
1370
1370
|
}
|
|
@@ -2480,7 +2480,7 @@
|
|
|
2480
2480
|
})
|
|
2481
2481
|
], exports.WaterpoloGameConfig);
|
|
2482
2482
|
|
|
2483
|
-
exports
|
|
2483
|
+
exports.WrestballGameConfig = /** @class */ (function (_super) {
|
|
2484
2484
|
__extends(WrestballGameConfig, _super);
|
|
2485
2485
|
function WrestballGameConfig() {
|
|
2486
2486
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -2491,11 +2491,11 @@
|
|
|
2491
2491
|
}(BaseModel));
|
|
2492
2492
|
__decorate([
|
|
2493
2493
|
ToFrontHook
|
|
2494
|
-
], exports
|
|
2494
|
+
], exports.WrestballGameConfig, "toFront", null);
|
|
2495
2495
|
__decorate([
|
|
2496
2496
|
ToBackHook
|
|
2497
|
-
], exports
|
|
2498
|
-
exports
|
|
2497
|
+
], exports.WrestballGameConfig, "toBack", null);
|
|
2498
|
+
exports.WrestballGameConfig = __decorate([
|
|
2499
2499
|
ModelInstance({
|
|
2500
2500
|
mappingFields: {
|
|
2501
2501
|
periods_count: 'periodsCount',
|
|
@@ -2522,7 +2522,7 @@
|
|
|
2522
2522
|
timerType: enumField(exports.TimerTypes),
|
|
2523
2523
|
}
|
|
2524
2524
|
})
|
|
2525
|
-
], exports
|
|
2525
|
+
], exports.WrestballGameConfig);
|
|
2526
2526
|
|
|
2527
2527
|
exports.GameStatuses = void 0;
|
|
2528
2528
|
(function (GameStatuses) {
|
|
@@ -2713,7 +2713,7 @@
|
|
|
2713
2713
|
return this._wrestballGameConfig;
|
|
2714
2714
|
}
|
|
2715
2715
|
if (this.gameConfig) {
|
|
2716
|
-
this._wrestballGameConfig = exports
|
|
2716
|
+
this._wrestballGameConfig = exports.WrestballGameConfig.toFront(this.gameConfig);
|
|
2717
2717
|
}
|
|
2718
2718
|
return this._wrestballGameConfig;
|
|
2719
2719
|
},
|
|
@@ -2876,7 +2876,7 @@
|
|
|
2876
2876
|
handballGameConfig: exports.HandballGameConfig,
|
|
2877
2877
|
rugbyGameConfig: exports.RugbyGameConfig,
|
|
2878
2878
|
waterpoloGameConfig: exports.WaterpoloGameConfig,
|
|
2879
|
-
wrestballGameConfig: exports
|
|
2879
|
+
wrestballGameConfig: exports.WrestballGameConfig,
|
|
2880
2880
|
tournamentPlayoff: exports.Playoff,
|
|
2881
2881
|
tournamentCourt: exports.LeagueCourt,
|
|
2882
2882
|
media: listField(exports.MediaItem),
|
|
@@ -7455,7 +7455,7 @@
|
|
|
7455
7455
|
})
|
|
7456
7456
|
], exports.TournamentRound);
|
|
7457
7457
|
|
|
7458
|
-
|
|
7458
|
+
exports.WrestballStatistic = /** @class */ (function (_super) {
|
|
7459
7459
|
__extends(WrestballStatistic, _super);
|
|
7460
7460
|
function WrestballStatistic() {
|
|
7461
7461
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -7534,11 +7534,11 @@
|
|
|
7534
7534
|
}(BaseModel));
|
|
7535
7535
|
__decorate([
|
|
7536
7536
|
ToFrontHook
|
|
7537
|
-
], WrestballStatistic, "toFront", null);
|
|
7537
|
+
], exports.WrestballStatistic, "toFront", null);
|
|
7538
7538
|
__decorate([
|
|
7539
7539
|
ToBackHook
|
|
7540
|
-
], WrestballStatistic, "toBack", null);
|
|
7541
|
-
WrestballStatistic = __decorate([
|
|
7540
|
+
], exports.WrestballStatistic, "toBack", null);
|
|
7541
|
+
exports.WrestballStatistic = __decorate([
|
|
7542
7542
|
ModelInstance({
|
|
7543
7543
|
mappingFields: {
|
|
7544
7544
|
league_player: 'leaguePlayer',
|
|
@@ -7604,7 +7604,7 @@
|
|
|
7604
7604
|
month: DateField
|
|
7605
7605
|
}
|
|
7606
7606
|
})
|
|
7607
|
-
], WrestballStatistic);
|
|
7607
|
+
], exports.WrestballStatistic);
|
|
7608
7608
|
|
|
7609
7609
|
var TournamentApi = /** @class */ (function () {
|
|
7610
7610
|
function TournamentApi(httpClient, configService) {
|
|
@@ -8096,7 +8096,7 @@
|
|
|
8096
8096
|
params = applyStatisticFilters(filters, params);
|
|
8097
8097
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/wrestball_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
|
|
8098
8098
|
total: +result.headers.get('X-Page-Count'),
|
|
8099
|
-
data: WrestballStatistic.toFront(result.body)
|
|
8099
|
+
data: exports.WrestballStatistic.toFront(result.body)
|
|
8100
8100
|
}); })).toPromise()];
|
|
8101
8101
|
});
|
|
8102
8102
|
});
|
|
@@ -13332,6 +13332,352 @@
|
|
|
13332
13332
|
{ type: ConfigService }
|
|
13333
13333
|
]; };
|
|
13334
13334
|
|
|
13335
|
+
exports.WrestballGameTeamStatistic = /** @class */ (function (_super) {
|
|
13336
|
+
__extends(WrestballGameTeamStatistic, _super);
|
|
13337
|
+
function WrestballGameTeamStatistic() {
|
|
13338
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
13339
|
+
}
|
|
13340
|
+
WrestballGameTeamStatistic.toFront = function (data) { };
|
|
13341
|
+
WrestballGameTeamStatistic.toBack = function (data) { };
|
|
13342
|
+
return WrestballGameTeamStatistic;
|
|
13343
|
+
}(BaseModel));
|
|
13344
|
+
__decorate([
|
|
13345
|
+
ToFrontHook
|
|
13346
|
+
], exports.WrestballGameTeamStatistic, "toFront", null);
|
|
13347
|
+
__decorate([
|
|
13348
|
+
ToBackHook
|
|
13349
|
+
], exports.WrestballGameTeamStatistic, "toBack", null);
|
|
13350
|
+
exports.WrestballGameTeamStatistic = __decorate([
|
|
13351
|
+
ModelInstance({
|
|
13352
|
+
mappingFields: {
|
|
13353
|
+
team: 'team',
|
|
13354
|
+
competitor_team: 'competitorTeam'
|
|
13355
|
+
},
|
|
13356
|
+
relation: {
|
|
13357
|
+
team: exports.WrestballStatistic,
|
|
13358
|
+
competitorTeam: exports.WrestballStatistic
|
|
13359
|
+
}
|
|
13360
|
+
})
|
|
13361
|
+
], exports.WrestballGameTeamStatistic);
|
|
13362
|
+
|
|
13363
|
+
exports.WrestballGameStatistic = /** @class */ (function (_super) {
|
|
13364
|
+
__extends(WrestballGameStatistic, _super);
|
|
13365
|
+
function WrestballGameStatistic() {
|
|
13366
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
13367
|
+
}
|
|
13368
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "id", {
|
|
13369
|
+
get: function () {
|
|
13370
|
+
return this.gameUserId;
|
|
13371
|
+
},
|
|
13372
|
+
enumerable: false,
|
|
13373
|
+
configurable: true
|
|
13374
|
+
});
|
|
13375
|
+
WrestballGameStatistic.toFront = function (data) { };
|
|
13376
|
+
WrestballGameStatistic.toBack = function (data) { };
|
|
13377
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "totalFouls", {
|
|
13378
|
+
get: function () {
|
|
13379
|
+
return (this.personalFouls || 0) + (this.technicalFouls || 0) + (this.unsportsmanlikeFouls || 0) + (this.disqualificationFouls || 0);
|
|
13380
|
+
},
|
|
13381
|
+
enumerable: false,
|
|
13382
|
+
configurable: true
|
|
13383
|
+
});
|
|
13384
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "onePointPercent", {
|
|
13385
|
+
get: function () {
|
|
13386
|
+
if (!this.onePointsMade || !this.onePointAttempts) {
|
|
13387
|
+
return 0;
|
|
13388
|
+
}
|
|
13389
|
+
return Math.round(1000 * this.onePointsMade / this.onePointAttempts) / 10;
|
|
13390
|
+
},
|
|
13391
|
+
set: function (v) { },
|
|
13392
|
+
enumerable: false,
|
|
13393
|
+
configurable: true
|
|
13394
|
+
});
|
|
13395
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "twoPointPercent", {
|
|
13396
|
+
get: function () {
|
|
13397
|
+
if (!this.twoPointsMade || !this.twoPointAttempts) {
|
|
13398
|
+
return 0;
|
|
13399
|
+
}
|
|
13400
|
+
return Math.round(1000 * this.twoPointsMade / this.twoPointAttempts) / 10;
|
|
13401
|
+
},
|
|
13402
|
+
set: function (v) { },
|
|
13403
|
+
enumerable: false,
|
|
13404
|
+
configurable: true
|
|
13405
|
+
});
|
|
13406
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "threePointPercent", {
|
|
13407
|
+
get: function () {
|
|
13408
|
+
if (!this.threePointsMade || !this.threePointAttempts) {
|
|
13409
|
+
return 0;
|
|
13410
|
+
}
|
|
13411
|
+
return Math.round(1000 * this.threePointsMade / this.threePointAttempts) / 10;
|
|
13412
|
+
},
|
|
13413
|
+
set: function (v) { },
|
|
13414
|
+
enumerable: false,
|
|
13415
|
+
configurable: true
|
|
13416
|
+
});
|
|
13417
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "freeThrowPercent", {
|
|
13418
|
+
get: function () {
|
|
13419
|
+
if (!this.freeThrowsMade || !this.freeThrowAttempts) {
|
|
13420
|
+
return 0;
|
|
13421
|
+
}
|
|
13422
|
+
return Math.round(1000 * this.freeThrowsMade / this.freeThrowAttempts) / 10;
|
|
13423
|
+
},
|
|
13424
|
+
set: function (v) { },
|
|
13425
|
+
enumerable: false,
|
|
13426
|
+
configurable: true
|
|
13427
|
+
});
|
|
13428
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "totalRebounds", {
|
|
13429
|
+
get: function () {
|
|
13430
|
+
return Math.floor(10 * ((this.offensiveRebounds || 0) + (this.defensiveRebounds || 0))) / 10;
|
|
13431
|
+
},
|
|
13432
|
+
enumerable: false,
|
|
13433
|
+
configurable: true
|
|
13434
|
+
});
|
|
13435
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "wrestlerScrums", {
|
|
13436
|
+
get: function () {
|
|
13437
|
+
return (this.wrestlerScrumsWon || 0) + (this.wrestlerScrumsLost || 0) + (this.wrestlerScrumsTie || 0);
|
|
13438
|
+
},
|
|
13439
|
+
enumerable: false,
|
|
13440
|
+
configurable: true
|
|
13441
|
+
});
|
|
13442
|
+
Object.defineProperty(WrestballGameStatistic.prototype, "scrums", {
|
|
13443
|
+
get: function () {
|
|
13444
|
+
return (this.scrumsWon || 0) + (this.scrumsLost || 0) + (this.scrumsTie || 0);
|
|
13445
|
+
},
|
|
13446
|
+
enumerable: false,
|
|
13447
|
+
configurable: true
|
|
13448
|
+
});
|
|
13449
|
+
return WrestballGameStatistic;
|
|
13450
|
+
}(BaseModel));
|
|
13451
|
+
__decorate([
|
|
13452
|
+
ToFrontHook
|
|
13453
|
+
], exports.WrestballGameStatistic, "toFront", null);
|
|
13454
|
+
__decorate([
|
|
13455
|
+
ToBackHook
|
|
13456
|
+
], exports.WrestballGameStatistic, "toBack", null);
|
|
13457
|
+
exports.WrestballGameStatistic = __decorate([
|
|
13458
|
+
ModelInstance({
|
|
13459
|
+
mappingFields: {
|
|
13460
|
+
game_user_id: 'gameUserId',
|
|
13461
|
+
points: 'points',
|
|
13462
|
+
free_throws_made: 'freeThrowsMade',
|
|
13463
|
+
two_points_made: 'twoPointsMade',
|
|
13464
|
+
three_points_made: 'threePointsMade',
|
|
13465
|
+
one_points_made: 'onePointsMade',
|
|
13466
|
+
two_point_attempts: 'twoPointAttempts',
|
|
13467
|
+
three_point_attempts: 'threePointAttempts',
|
|
13468
|
+
free_throw_attempts: 'freeThrowAttempts',
|
|
13469
|
+
one_point_attempts: 'onePointAttempts',
|
|
13470
|
+
one_point_percent: 'onePointPercent',
|
|
13471
|
+
two_point_percent: 'twoPointPercent',
|
|
13472
|
+
three_point_percent: 'threePointPercent',
|
|
13473
|
+
free_throw_percent: 'freeThrowPercent',
|
|
13474
|
+
assists: 'assists',
|
|
13475
|
+
blocks: 'blocks',
|
|
13476
|
+
rebounds: 'rebounds',
|
|
13477
|
+
offensive_rebounds: 'offensiveRebounds',
|
|
13478
|
+
defensive_rebounds: 'defensiveRebounds',
|
|
13479
|
+
steals: 'steals',
|
|
13480
|
+
turnovers: 'turnovers',
|
|
13481
|
+
personal_fouls: 'personalFouls',
|
|
13482
|
+
drawn_fouls: 'drawnFouls',
|
|
13483
|
+
wrestler_scrums_won: 'wrestlerScrumsWon',
|
|
13484
|
+
wrestler_scrums_lost: 'wrestlerScrumsLost',
|
|
13485
|
+
wrestler_scrums_tie: 'wrestlerScrumsTie',
|
|
13486
|
+
wrestler_scrum_points: 'wrestlerScrumPoints',
|
|
13487
|
+
scrums_won: 'scrumsWon',
|
|
13488
|
+
scrums_lost: 'scrumsLost',
|
|
13489
|
+
scrums_tie: 'scrumsTie',
|
|
13490
|
+
scrum_points: 'scrumPoints',
|
|
13491
|
+
yellow_cards: 'yellowCards',
|
|
13492
|
+
red_cards: 'redCards',
|
|
13493
|
+
updated_at: 'updatedAt',
|
|
13494
|
+
},
|
|
13495
|
+
relation: {
|
|
13496
|
+
updatedAt: DateTimeField,
|
|
13497
|
+
}
|
|
13498
|
+
})
|
|
13499
|
+
], exports.WrestballGameStatistic);
|
|
13500
|
+
|
|
13501
|
+
exports.WrestballGameLogTypes = void 0;
|
|
13502
|
+
(function (WrestballGameLogTypes) {
|
|
13503
|
+
WrestballGameLogTypes[WrestballGameLogTypes["enter_game"] = 1] = "enter_game";
|
|
13504
|
+
WrestballGameLogTypes[WrestballGameLogTypes["exit_game"] = 2] = "exit_game";
|
|
13505
|
+
WrestballGameLogTypes[WrestballGameLogTypes["remove_game"] = 3] = "remove_game";
|
|
13506
|
+
WrestballGameLogTypes[WrestballGameLogTypes["one_point_made"] = 4] = "one_point_made";
|
|
13507
|
+
WrestballGameLogTypes[WrestballGameLogTypes["one_point_attempt"] = 5] = "one_point_attempt";
|
|
13508
|
+
WrestballGameLogTypes[WrestballGameLogTypes["two_point_made"] = 6] = "two_point_made";
|
|
13509
|
+
WrestballGameLogTypes[WrestballGameLogTypes["two_point_attempt"] = 7] = "two_point_attempt";
|
|
13510
|
+
WrestballGameLogTypes[WrestballGameLogTypes["three_point_made"] = 8] = "three_point_made";
|
|
13511
|
+
WrestballGameLogTypes[WrestballGameLogTypes["three_point_attempt"] = 9] = "three_point_attempt";
|
|
13512
|
+
WrestballGameLogTypes[WrestballGameLogTypes["free_throw_made"] = 10] = "free_throw_made";
|
|
13513
|
+
WrestballGameLogTypes[WrestballGameLogTypes["free_throw_attempt"] = 11] = "free_throw_attempt";
|
|
13514
|
+
WrestballGameLogTypes[WrestballGameLogTypes["assist"] = 12] = "assist";
|
|
13515
|
+
WrestballGameLogTypes[WrestballGameLogTypes["block"] = 13] = "block";
|
|
13516
|
+
WrestballGameLogTypes[WrestballGameLogTypes["rebound"] = 14] = "rebound";
|
|
13517
|
+
WrestballGameLogTypes[WrestballGameLogTypes["offensive_rebound"] = 15] = "offensive_rebound";
|
|
13518
|
+
WrestballGameLogTypes[WrestballGameLogTypes["defensive_rebound"] = 16] = "defensive_rebound";
|
|
13519
|
+
WrestballGameLogTypes[WrestballGameLogTypes["team_rebound"] = 17] = "team_rebound";
|
|
13520
|
+
WrestballGameLogTypes[WrestballGameLogTypes["steal"] = 18] = "steal";
|
|
13521
|
+
WrestballGameLogTypes[WrestballGameLogTypes["turnover"] = 19] = "turnover";
|
|
13522
|
+
WrestballGameLogTypes[WrestballGameLogTypes["personal_foul"] = 20] = "personal_foul";
|
|
13523
|
+
WrestballGameLogTypes[WrestballGameLogTypes["timeout"] = 21] = "timeout";
|
|
13524
|
+
WrestballGameLogTypes[WrestballGameLogTypes["wrestler_scrum"] = 22] = "wrestler_scrum";
|
|
13525
|
+
WrestballGameLogTypes[WrestballGameLogTypes["wrestler_scrum_won"] = 23] = "wrestler_scrum_won";
|
|
13526
|
+
WrestballGameLogTypes[WrestballGameLogTypes["wrestler_scrum_lost"] = 24] = "wrestler_scrum_lost";
|
|
13527
|
+
WrestballGameLogTypes[WrestballGameLogTypes["wrestler_scrum_tie"] = 25] = "wrestler_scrum_tie";
|
|
13528
|
+
WrestballGameLogTypes[WrestballGameLogTypes["scrum"] = 26] = "scrum";
|
|
13529
|
+
WrestballGameLogTypes[WrestballGameLogTypes["scrum_won"] = 27] = "scrum_won";
|
|
13530
|
+
WrestballGameLogTypes[WrestballGameLogTypes["scrum_lost"] = 28] = "scrum_lost";
|
|
13531
|
+
WrestballGameLogTypes[WrestballGameLogTypes["scrum_tie"] = 29] = "scrum_tie";
|
|
13532
|
+
WrestballGameLogTypes[WrestballGameLogTypes["yellow_card"] = 30] = "yellow_card";
|
|
13533
|
+
WrestballGameLogTypes[WrestballGameLogTypes["red_card"] = 31] = "red_card";
|
|
13534
|
+
})(exports.WrestballGameLogTypes || (exports.WrestballGameLogTypes = {}));
|
|
13535
|
+
exports.WrestballGameLog = /** @class */ (function (_super) {
|
|
13536
|
+
__extends(WrestballGameLog, _super);
|
|
13537
|
+
function WrestballGameLog() {
|
|
13538
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
13539
|
+
_this.active = true;
|
|
13540
|
+
return _this;
|
|
13541
|
+
}
|
|
13542
|
+
WrestballGameLog.prototype.isPointsType = function () {
|
|
13543
|
+
return [
|
|
13544
|
+
exports.WrestballGameLogTypes.two_point_made,
|
|
13545
|
+
exports.WrestballGameLogTypes.three_point_made,
|
|
13546
|
+
exports.WrestballGameLogTypes.free_throw_made,
|
|
13547
|
+
exports.WrestballGameLogTypes.one_point_made,
|
|
13548
|
+
exports.WrestballGameLogTypes.scrum_won,
|
|
13549
|
+
exports.WrestballGameLogTypes.wrestler_scrum_won,
|
|
13550
|
+
].indexOf(this.logType) > -1;
|
|
13551
|
+
};
|
|
13552
|
+
WrestballGameLog.prototype.isReboundType = function () {
|
|
13553
|
+
return [
|
|
13554
|
+
exports.WrestballGameLogTypes.rebound,
|
|
13555
|
+
exports.WrestballGameLogTypes.offensive_rebound,
|
|
13556
|
+
exports.WrestballGameLogTypes.defensive_rebound,
|
|
13557
|
+
exports.WrestballGameLogTypes.team_rebound,
|
|
13558
|
+
].indexOf(this.logType) > -1;
|
|
13559
|
+
};
|
|
13560
|
+
WrestballGameLog.prototype.isFoulType = function () {
|
|
13561
|
+
return [
|
|
13562
|
+
exports.WrestballGameLogTypes.personal_foul,
|
|
13563
|
+
].indexOf(this.logType) > -1;
|
|
13564
|
+
};
|
|
13565
|
+
WrestballGameLog.prototype.getScore = function () {
|
|
13566
|
+
var _a;
|
|
13567
|
+
var scoreMapping = (_a = {},
|
|
13568
|
+
_a[exports.WrestballGameLogTypes.one_point_made] = 1,
|
|
13569
|
+
_a[exports.WrestballGameLogTypes.free_throw_made] = 1,
|
|
13570
|
+
_a[exports.WrestballGameLogTypes.two_point_made] = 2,
|
|
13571
|
+
_a[exports.WrestballGameLogTypes.three_point_made] = 3,
|
|
13572
|
+
_a[exports.WrestballGameLogTypes.scrum_won] = 2,
|
|
13573
|
+
_a[exports.WrestballGameLogTypes.wrestler_scrum_won] = 2,
|
|
13574
|
+
_a);
|
|
13575
|
+
return scoreMapping[this.logType] || 0;
|
|
13576
|
+
};
|
|
13577
|
+
WrestballGameLog.prototype.compare = function (model) {
|
|
13578
|
+
if (this.time === model.time && this.period === model.period) {
|
|
13579
|
+
if (this.datetime.getTime() === model.datetime.getTime()) {
|
|
13580
|
+
return this.id > model.id ? 1 : -1;
|
|
13581
|
+
}
|
|
13582
|
+
return this.datetime.getTime() < model.datetime.getTime() ? 1 : -1;
|
|
13583
|
+
}
|
|
13584
|
+
if (this.period === model.period) {
|
|
13585
|
+
return this.time < model.time ? 1 : -1;
|
|
13586
|
+
}
|
|
13587
|
+
return this.period < model.period ? 1 : -1;
|
|
13588
|
+
};
|
|
13589
|
+
Object.defineProperty(WrestballGameLog.prototype, "timeFormatted", {
|
|
13590
|
+
get: function () {
|
|
13591
|
+
var minutes = Math.floor(this.time / 60);
|
|
13592
|
+
var seconds = this.time - minutes * 60;
|
|
13593
|
+
return "" + (minutes < 10 ? '0' : '') + minutes + ":" + (seconds < 10 ? '0' : '') + seconds;
|
|
13594
|
+
},
|
|
13595
|
+
enumerable: false,
|
|
13596
|
+
configurable: true
|
|
13597
|
+
});
|
|
13598
|
+
WrestballGameLog.toFront = function (value) { };
|
|
13599
|
+
WrestballGameLog.toBack = function (value) { };
|
|
13600
|
+
return WrestballGameLog;
|
|
13601
|
+
}(BaseModel));
|
|
13602
|
+
__decorate([
|
|
13603
|
+
ToFrontHook
|
|
13604
|
+
], exports.WrestballGameLog, "toFront", null);
|
|
13605
|
+
__decorate([
|
|
13606
|
+
ToBackHook
|
|
13607
|
+
], exports.WrestballGameLog, "toBack", null);
|
|
13608
|
+
exports.WrestballGameLog = __decorate([
|
|
13609
|
+
ModelInstance({
|
|
13610
|
+
mappingFields: {
|
|
13611
|
+
id: 'id',
|
|
13612
|
+
unique_id: 'uniqueId',
|
|
13613
|
+
game_id: 'gameId',
|
|
13614
|
+
game_user_id: 'gameUserId',
|
|
13615
|
+
team_id: 'teamId',
|
|
13616
|
+
log_type: 'logType',
|
|
13617
|
+
datetime: 'datetime',
|
|
13618
|
+
time: 'time',
|
|
13619
|
+
period: 'period',
|
|
13620
|
+
active: 'active',
|
|
13621
|
+
is_highlight: 'isHighlight',
|
|
13622
|
+
foul_on_game_user_id: 'foulOnGameUserId',
|
|
13623
|
+
is_coach: 'isCoach',
|
|
13624
|
+
is_bench: 'isBench',
|
|
13625
|
+
marked: 'marked',
|
|
13626
|
+
},
|
|
13627
|
+
relation: {
|
|
13628
|
+
datetime: DateTimeField,
|
|
13629
|
+
logType: enumField(exports.WrestballGameLogTypes),
|
|
13630
|
+
}
|
|
13631
|
+
})
|
|
13632
|
+
], exports.WrestballGameLog);
|
|
13633
|
+
|
|
13634
|
+
var WrestballGameApi = /** @class */ (function (_super) {
|
|
13635
|
+
__extends(WrestballGameApi, _super);
|
|
13636
|
+
function WrestballGameApi(httpClient, configService) {
|
|
13637
|
+
var _this = _super.call(this, httpClient, configService) || this;
|
|
13638
|
+
_this.httpClient = httpClient;
|
|
13639
|
+
_this.configService = configService;
|
|
13640
|
+
return _this;
|
|
13641
|
+
}
|
|
13642
|
+
WrestballGameApi.prototype.getById = function (gameId) {
|
|
13643
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
13644
|
+
return __generator(this, function (_a) {
|
|
13645
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_wrestball_game/" + gameId + "/").pipe(operators.map(function (result) { return exports.Game.toFront(result); })).toPromise()];
|
|
13646
|
+
});
|
|
13647
|
+
});
|
|
13648
|
+
};
|
|
13649
|
+
WrestballGameApi.prototype.getTeamStatistic = function (gameId) {
|
|
13650
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
13651
|
+
return __generator(this, function (_a) {
|
|
13652
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_wrestball_game/" + gameId + "/team_statistic/").pipe(operators.map(function (result) { return exports.WrestballGameTeamStatistic.toFront(result); })).toPromise()];
|
|
13653
|
+
});
|
|
13654
|
+
});
|
|
13655
|
+
};
|
|
13656
|
+
WrestballGameApi.prototype.getUserStatistic = function (gameId) {
|
|
13657
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
13658
|
+
return __generator(this, function (_a) {
|
|
13659
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_wrestball_game/" + gameId + "/user_statistic/").pipe(operators.map(function (result) { return exports.WrestballGameStatistic.toFront(result); })).toPromise()];
|
|
13660
|
+
});
|
|
13661
|
+
});
|
|
13662
|
+
};
|
|
13663
|
+
WrestballGameApi.prototype.getLogs = function (gameId) {
|
|
13664
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
13665
|
+
return __generator(this, function (_a) {
|
|
13666
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_wrestball_game/" + gameId + "/logs/").pipe(operators.map(function (result) { return exports.WrestballGameLog.toFront(result); })).toPromise()];
|
|
13667
|
+
});
|
|
13668
|
+
});
|
|
13669
|
+
};
|
|
13670
|
+
return WrestballGameApi;
|
|
13671
|
+
}(GameBaseApi));
|
|
13672
|
+
WrestballGameApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function WrestballGameApi_Factory() { return new WrestballGameApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService)); }, token: WrestballGameApi, providedIn: "root" });
|
|
13673
|
+
WrestballGameApi.decorators = [
|
|
13674
|
+
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
13675
|
+
];
|
|
13676
|
+
WrestballGameApi.ctorParameters = function () { return [
|
|
13677
|
+
{ type: i1.HttpClient },
|
|
13678
|
+
{ type: ConfigService }
|
|
13679
|
+
]; };
|
|
13680
|
+
|
|
13335
13681
|
var PublicTeamApi = /** @class */ (function () {
|
|
13336
13682
|
function PublicTeamApi(httpClient, configService) {
|
|
13337
13683
|
this.httpClient = httpClient;
|
|
@@ -14601,6 +14947,7 @@
|
|
|
14601
14947
|
exports.WaterpoloGameLogTypeLocalization = WaterpoloGameLogTypeLocalization;
|
|
14602
14948
|
exports.WaterpoloWorkHandLocalization = WaterpoloWorkHandLocalization;
|
|
14603
14949
|
exports.WorkHandLocalization = WorkHandLocalization;
|
|
14950
|
+
exports.WrestballGameApi = WrestballGameApi;
|
|
14604
14951
|
exports.addItemInArray = addItemInArray;
|
|
14605
14952
|
exports.addItemsInArray = addItemsInArray;
|
|
14606
14953
|
exports.applyGameMediaFilters = applyGameMediaFilters;
|