@mtgame/core 0.0.45 → 0.0.47
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 +1 -0
- package/bundles/mtgame-core.umd.js +22 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +2 -2
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/tournament-api.js +8 -1
- package/esm2015/models/tournament.js +2 -1
- package/esm2015/services/centrifugo.service.js +10 -2
- package/esm5/api/tournament-api.js +10 -1
- package/esm5/models/tournament.js +2 -1
- package/esm5/services/centrifugo.service.js +14 -2
- package/fesm2015/mtgame-core.js +16 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +22 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/tournament.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
- package/services/centrifugo.service.d.ts +2 -0
package/fesm2015/mtgame-core.js
CHANGED
|
@@ -858,6 +858,7 @@ TournamentSettings = __decorate([
|
|
|
858
858
|
volleyball_statistic_type: 'volleyballStatisticType',
|
|
859
859
|
shot_clock_enabled: 'shotClockEnabled',
|
|
860
860
|
game_time_type: 'gameTimeType',
|
|
861
|
+
with_result_table: 'withResultTable'
|
|
861
862
|
},
|
|
862
863
|
relation: {
|
|
863
864
|
type: enumField(TournamentTypes),
|
|
@@ -4265,6 +4266,13 @@ let TournamentApi = class TournamentApi {
|
|
|
4265
4266
|
this.httpClient = httpClient;
|
|
4266
4267
|
this.configService = configService;
|
|
4267
4268
|
}
|
|
4269
|
+
getById(tournamentId) {
|
|
4270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4271
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament/${tournamentId}/`)
|
|
4272
|
+
.pipe(map(result => Tournament.toFront(result)))
|
|
4273
|
+
.toPromise();
|
|
4274
|
+
});
|
|
4275
|
+
}
|
|
4268
4276
|
getByAlias(leagueId, alias) {
|
|
4269
4277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4270
4278
|
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/tournaments/${alias}/`)
|
|
@@ -5425,6 +5433,10 @@ let CentrifugoService = class CentrifugoService {
|
|
|
5425
5433
|
this.configService = configService;
|
|
5426
5434
|
this.channels$ = {};
|
|
5427
5435
|
this.subscriptions = {};
|
|
5436
|
+
this.connectedSubject = new BehaviorSubject(false);
|
|
5437
|
+
}
|
|
5438
|
+
get connected$() {
|
|
5439
|
+
return this.connectedSubject;
|
|
5428
5440
|
}
|
|
5429
5441
|
listen(channel) {
|
|
5430
5442
|
if (channel in this.channels$) {
|
|
@@ -5464,6 +5476,10 @@ let CentrifugoService = class CentrifugoService {
|
|
|
5464
5476
|
this.centrifuge.connect();
|
|
5465
5477
|
this.centrifuge.on('connect', () => {
|
|
5466
5478
|
this.initializeEngineSubject.next(true);
|
|
5479
|
+
this.connectedSubject.next(true);
|
|
5480
|
+
});
|
|
5481
|
+
this.centrifuge.on('disconnect', () => {
|
|
5482
|
+
this.connectedSubject.next(false);
|
|
5467
5483
|
});
|
|
5468
5484
|
});
|
|
5469
5485
|
}
|