@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.
@@ -51,6 +51,7 @@ export declare class TournamentApi {
51
51
  private httpClient;
52
52
  private configService;
53
53
  constructor(httpClient: HttpClient, configService: ConfigService);
54
+ getById(tournamentId: number): Promise<Tournament>;
54
55
  getByAlias(leagueId: number, alias: string): Promise<Tournament>;
55
56
  getNews(tournamentId: number): Promise<TournamentNews[]>;
56
57
  getEvents(tournamentId: number, page: number, size: number, filters?: TournamentEventsListFilter): Promise<PaginatedResponse<TournamentEvent[]>>;
@@ -1221,6 +1221,7 @@
1221
1221
  volleyball_statistic_type: 'volleyballStatisticType',
1222
1222
  shot_clock_enabled: 'shotClockEnabled',
1223
1223
  game_time_type: 'gameTimeType',
1224
+ with_result_table: 'withResultTable'
1224
1225
  },
1225
1226
  relation: {
1226
1227
  type: enumField(exports.TournamentTypes),
@@ -5316,6 +5317,15 @@
5316
5317
  this.httpClient = httpClient;
5317
5318
  this.configService = configService;
5318
5319
  }
5320
+ TournamentApi.prototype.getById = function (tournamentId) {
5321
+ return __awaiter(this, void 0, void 0, function () {
5322
+ return __generator(this, function (_a) {
5323
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/")
5324
+ .pipe(operators.map(function (result) { return Tournament.toFront(result); }))
5325
+ .toPromise()];
5326
+ });
5327
+ });
5328
+ };
5319
5329
  TournamentApi.prototype.getByAlias = function (leagueId, alias) {
5320
5330
  return __awaiter(this, void 0, void 0, function () {
5321
5331
  return __generator(this, function (_a) {
@@ -6727,7 +6737,15 @@
6727
6737
  this.configService = configService;
6728
6738
  this.channels$ = {};
6729
6739
  this.subscriptions = {};
6740
+ this.connectedSubject = new rxjs.BehaviorSubject(false);
6730
6741
  }
6742
+ Object.defineProperty(CentrifugoService.prototype, "connected$", {
6743
+ get: function () {
6744
+ return this.connectedSubject;
6745
+ },
6746
+ enumerable: true,
6747
+ configurable: true
6748
+ });
6731
6749
  CentrifugoService.prototype.listen = function (channel) {
6732
6750
  var _this = this;
6733
6751
  if (channel in this.channels$) {
@@ -6768,6 +6786,10 @@
6768
6786
  _this.centrifuge.connect();
6769
6787
  _this.centrifuge.on('connect', function () {
6770
6788
  _this.initializeEngineSubject.next(true);
6789
+ _this.connectedSubject.next(true);
6790
+ });
6791
+ _this.centrifuge.on('disconnect', function () {
6792
+ _this.connectedSubject.next(false);
6771
6793
  });
6772
6794
  });
6773
6795
  }