@mtgame/core 1.0.35 → 1.0.37

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.
@@ -15,4 +15,5 @@ export declare class HockeyGameApi extends GameBaseApi {
15
15
  getLogs(gameId: number): Promise<HockeyGameLog[]>;
16
16
  downloadProtocol(gameId: number, format: 'pdf' | 'xlsx' | 'html'): Promise<any>;
17
17
  downloadApplication(gameId: number, format: 'pdf' | 'xlsx' | 'html', type: 'game_user' | 'tournament_user'): Promise<any>;
18
+ downloadShlApplication(gameId: number, format: 'pdf' | 'xlsx' | 'html', type: 'game_user' | 'tournament_user'): Promise<any>;
18
19
  }
@@ -21,6 +21,7 @@ export declare enum TournamentFilterStatusEnum {
21
21
  closed = 4
22
22
  }
23
23
  export interface TournamentListFilters {
24
+ search?: string;
24
25
  statuses?: TournamentStatuses[];
25
26
  tournamentStatus?: TournamentFilterStatusEnum;
26
27
  seasonId?: number;
@@ -5680,6 +5680,16 @@
5680
5680
  });
5681
5681
  });
5682
5682
  };
5683
+ HockeyGameApi.prototype.downloadShlApplication = function (gameId, format, type) {
5684
+ return __awaiter(this, void 0, void 0, function () {
5685
+ return __generator(this, function (_a) {
5686
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_hockey_game/" + gameId + "/shl_game_application_file/", {
5687
+ params: new i1.HttpParams().set('file_type', format).set('application_type', type),
5688
+ responseType: 'blob'
5689
+ }).toPromise()];
5690
+ });
5691
+ });
5692
+ };
5683
5693
  return HockeyGameApi;
5684
5694
  }(GameBaseApi));
5685
5695
  HockeyGameApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function HockeyGameApi_Factory() { return new HockeyGameApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService)); }, token: HockeyGameApi, providedIn: "root" });
@@ -8977,7 +8987,7 @@
8977
8987
  })
8978
8988
  ], exports.TeamsAndUsers);
8979
8989
 
8980
- var SeasonTournament = /** @class */ (function (_super) {
8990
+ exports.SeasonTournament = /** @class */ (function (_super) {
8981
8991
  __extends(SeasonTournament, _super);
8982
8992
  function SeasonTournament() {
8983
8993
  return _super !== null && _super.apply(this, arguments) || this;
@@ -8988,18 +8998,18 @@
8988
8998
  }(BaseModel));
8989
8999
  __decorate([
8990
9000
  ToFrontHook
8991
- ], SeasonTournament, "toFront", null);
9001
+ ], exports.SeasonTournament, "toFront", null);
8992
9002
  __decorate([
8993
9003
  ToBackHook
8994
- ], SeasonTournament, "toBack", null);
8995
- SeasonTournament = __decorate([
9004
+ ], exports.SeasonTournament, "toBack", null);
9005
+ exports.SeasonTournament = __decorate([
8996
9006
  ModelInstance({
8997
9007
  mappingFields: {
8998
9008
  id: 'id',
8999
9009
  name: 'name',
9000
9010
  },
9001
9011
  })
9002
- ], SeasonTournament);
9012
+ ], exports.SeasonTournament);
9003
9013
 
9004
9014
  exports.TournamentFilterStatusEnum = void 0;
9005
9015
  (function (TournamentFilterStatusEnum) {
@@ -9030,7 +9040,7 @@
9030
9040
  LeagueApi.prototype.getSeasonTournaments = function (leagueId) {
9031
9041
  return __awaiter(this, void 0, void 0, function () {
9032
9042
  return __generator(this, function (_a) {
9033
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/season_tournaments/").pipe(operators.map(function (response) { return SeasonTournament.toFront(response); })).toPromise()];
9043
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/season_tournaments/").pipe(operators.map(function (response) { return exports.SeasonTournament.toFront(response); })).toPromise()];
9034
9044
  });
9035
9045
  });
9036
9046
  };
@@ -9196,6 +9206,9 @@
9196
9206
  { type: ConfigService }
9197
9207
  ]; };
9198
9208
  function applyTournamentListFilters(params, filters) {
9209
+ if (filters.search) {
9210
+ params = params.set('search', filters.search);
9211
+ }
9199
9212
  if (filters.statuses) {
9200
9213
  params = params.set('statuses', filters.statuses.map(function (s) { return exports.TournamentStatuses[s]; }).join(','));
9201
9214
  }