@mtgame/core 0.0.19 → 0.0.21

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.
@@ -14,4 +14,6 @@ export declare class HockeyGameApi {
14
14
  getTeamStatistic(gameId: number): Promise<HockeyGameTeamStatistic>;
15
15
  getUserStatistic(gameId: number): Promise<HockeyGameStatistic[]>;
16
16
  getLogs(gameId: number): Promise<HockeyGameLog[]>;
17
+ downloadProtocol(gameId: number, format: 'pdf' | 'xlsx'): Promise<any>;
18
+ downloadApplication(gameId: number, format: 'pdf' | 'xlsx', type: 'game_user' | 'tournament_user'): Promise<any>;
17
19
  }
@@ -2564,6 +2564,15 @@
2564
2564
  exports.HockeyGameLogTypes.penalty_shot, exports.HockeyGameLogTypes.match_penalty
2565
2565
  ].indexOf(this.logType) > -1;
2566
2566
  };
2567
+ HockeyGameLog.prototype.isAfter = function (log) {
2568
+ if (this.time === log.time && this.period === log.period) {
2569
+ return this.id > log.id;
2570
+ }
2571
+ if (this.period === log.period) {
2572
+ return this.time > log.time;
2573
+ }
2574
+ return this.period > log.period;
2575
+ };
2567
2576
  HockeyGameLog.toFront = function (value) { };
2568
2577
  HockeyGameLog.toBack = function (value) { };
2569
2578
  __decorate([
@@ -2876,6 +2885,26 @@
2876
2885
  });
2877
2886
  });
2878
2887
  };
2888
+ HockeyGameApi.prototype.downloadProtocol = function (gameId, format) {
2889
+ return __awaiter(this, void 0, void 0, function () {
2890
+ return __generator(this, function (_a) {
2891
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_hockey_game/" + gameId + "/game_protocol/", {
2892
+ params: new http.HttpParams().set('file_type', format),
2893
+ responseType: 'blob'
2894
+ }).toPromise()];
2895
+ });
2896
+ });
2897
+ };
2898
+ HockeyGameApi.prototype.downloadApplication = function (gameId, format, type) {
2899
+ return __awaiter(this, void 0, void 0, function () {
2900
+ return __generator(this, function (_a) {
2901
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_hockey_game/" + gameId + "/game_application_file/", {
2902
+ params: new http.HttpParams().set('file_type', format).set('application_type', type),
2903
+ responseType: 'blob'
2904
+ }).toPromise()];
2905
+ });
2906
+ });
2907
+ };
2879
2908
  HockeyGameApi.ctorParameters = function () { return [
2880
2909
  { type: http.HttpClient },
2881
2910
  { type: ConfigService }