@mtgame/core 0.0.46 → 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.
@@ -5104,6 +5104,15 @@ var TournamentApi = /** @class */ (function () {
5104
5104
  this.httpClient = httpClient;
5105
5105
  this.configService = configService;
5106
5106
  }
5107
+ TournamentApi.prototype.getById = function (tournamentId) {
5108
+ return __awaiter(this, void 0, void 0, function () {
5109
+ return __generator(this, function (_a) {
5110
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/")
5111
+ .pipe(map(function (result) { return Tournament.toFront(result); }))
5112
+ .toPromise()];
5113
+ });
5114
+ });
5115
+ };
5107
5116
  TournamentApi.prototype.getByAlias = function (leagueId, alias) {
5108
5117
  return __awaiter(this, void 0, void 0, function () {
5109
5118
  return __generator(this, function (_a) {
@@ -6515,7 +6524,15 @@ var CentrifugoService = /** @class */ (function () {
6515
6524
  this.configService = configService;
6516
6525
  this.channels$ = {};
6517
6526
  this.subscriptions = {};
6527
+ this.connectedSubject = new BehaviorSubject(false);
6518
6528
  }
6529
+ Object.defineProperty(CentrifugoService.prototype, "connected$", {
6530
+ get: function () {
6531
+ return this.connectedSubject;
6532
+ },
6533
+ enumerable: true,
6534
+ configurable: true
6535
+ });
6519
6536
  CentrifugoService.prototype.listen = function (channel) {
6520
6537
  var _this = this;
6521
6538
  if (channel in this.channels$) {
@@ -6556,6 +6573,10 @@ var CentrifugoService = /** @class */ (function () {
6556
6573
  _this.centrifuge.connect();
6557
6574
  _this.centrifuge.on('connect', function () {
6558
6575
  _this.initializeEngineSubject.next(true);
6576
+ _this.connectedSubject.next(true);
6577
+ });
6578
+ _this.centrifuge.on('disconnect', function () {
6579
+ _this.connectedSubject.next(false);
6559
6580
  });
6560
6581
  });
6561
6582
  }