@mtgame/core 0.0.16 → 0.0.18

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.
@@ -63,4 +63,5 @@ export declare class TournamentApi {
63
63
  getBasketballStatistic(filters?: StatisticFilters): Promise<BasketballStatistic[]>;
64
64
  getVolleyballStatistic(filters?: StatisticFilters): Promise<VolleyballStatistic[]>;
65
65
  getHockeyStatistic(filters?: StatisticFilters): Promise<HockeyStatistic[]>;
66
+ getTournamentTeamUsers(tournamentTeamId: number): Promise<TournamentTeamUser[]>;
66
67
  }
@@ -223,6 +223,56 @@
223
223
  return value;
224
224
  }
225
225
 
226
+ var HockeyPenaltyTypes = [
227
+ { id: 1, code: 'АГРЕС', title: 'Агрессор в драке' },
228
+ { id: 2, code: 'АТ-В-ГОЛ', title: 'Атака в голову или шею' },
229
+ { id: 3, code: 'АТ-ВР', title: 'Атака вратаря' },
230
+ { id: 4, code: 'АТ-СЗ', title: 'Атака сзади' },
231
+ { id: 5, code: 'БЛОК', title: 'Блокировка' },
232
+ { id: 6, code: 'БР-КЛ', title: 'Бросок клюшки' },
233
+ { id: 7, code: 'ВБ-ШБ', title: 'Выброс шайбы' },
234
+ { id: 8, code: 'ГРУБ', title: 'Грубость' },
235
+ { id: 9, code: 'ДИСЦ', title: 'Дисциплинарный штраф' },
236
+ { id: 10, code: 'ДИС-КН', title: 'Дисциплинарный до конца матча' },
237
+ { id: 11, code: 'ДРАКА', title: 'Драка' },
238
+ { id: 12, code: 'ЗАЧИН', title: 'Зачинщик драки' },
239
+ { id: 13, code: 'ЗД-ИГ', title: 'Задержка игры' },
240
+ { id: 14, code: 'ЗД-КЛ-СП', title: 'Задержка клюшки соперника' },
241
+ { id: 15, code: 'ЗД-КЛ', title: 'Задержка клюшкой' },
242
+ { id: 16, code: 'ЗД-СП', title: 'Задержка соперника' },
243
+ { id: 17, code: 'ЗД-ШБ', title: 'Задержка шайбы руками' },
244
+ { id: 18, code: 'СЛ-КЛ', title: 'Игра со сломанной клюшкой' },
245
+ { id: 19, code: 'ВП-КЛ', title: 'Игра высоко поднятой клюшкой' },
246
+ { id: 20, code: 'КЛ-УД', title: 'Колющий удар' },
247
+ { id: 21, code: 'СК-ШТ', title: 'Малый скамеечный штраф' },
248
+ { id: 22, code: 'МШ', title: 'Матч-штраф' },
249
+ { id: 23, code: 'НП-АТ', title: 'Неправильная атака' },
250
+ { id: 24, code: 'ЧС-СТ', title: 'Нарушение численного состава' },
251
+ { id: 25, code: 'НС-КЛ', title: 'Нестандартная клюшка' },
252
+ { id: 26, code: 'НАР-ЭК', title: 'Опасное снаряжение' },
253
+ { id: 27, code: 'НС-ПВ', title: 'Оскорбление судей и неспортивное поведение' },
254
+ { id: 28, code: 'ОТ-ИГ', title: 'Отказ начать игру' },
255
+ { id: 29, code: 'ОТСЧ', title: 'Отсечение' },
256
+ { id: 30, code: 'ПЛЕВОК', title: 'Плевок' },
257
+ { id: 31, code: 'ПОДН', title: 'Подножка' },
258
+ { id: 32, code: 'ПОДС', title: 'Подсечка' },
259
+ { id: 33, code: 'ПР-ИН', title: 'Предупреждение инфекций' },
260
+ { id: 34, code: 'ПК-СК', title: 'Покидание скамейки во время конфликта' },
261
+ { id: 35, code: 'СД-ВР', title: 'Сдвиг ворот' },
262
+ { id: 36, code: 'СИМ', title: 'Симуляция' },
263
+ { id: 37, code: 'ТЛ-БР', title: 'Толчок на борт' },
264
+ { id: 38, code: 'ТЛ-КЛ', title: 'Толчок клюшкой' },
265
+ { id: 39, code: 'УД-ГОЛ', title: 'Удар головой' },
266
+ { id: 40, code: 'УД-КЛ', title: 'Удар клюшкой' },
267
+ { id: 41, code: 'УД-К-КЛ', title: 'Удар концом клюшки' },
268
+ { id: 42, code: 'УД-КОЛ', title: 'Удар коленом' },
269
+ { id: 43, code: 'УД-ЛОК', title: 'Удар локтем' },
270
+ { id: 44, code: 'УД-НГ', title: 'Удар ногой' },
271
+ { id: 45, code: 'УКУС', title: 'Укус' },
272
+ { id: 46, code: 'КН-ЗР', title: 'Физический контакт со зрителем' },
273
+ { id: 47, code: 'ШТ-ВР', title: 'Штраф вратаря' }
274
+ ];
275
+
226
276
  var MODEL_MAPPING_FIELDS_KEY = '_mapping_fields_';
227
277
  var MODEL_RELATION_KEY = '_relation_';
228
278
  var MODEL_TO_FRONT_KEY = '_to_front_';
@@ -274,6 +324,22 @@
274
324
  }
275
325
  };
276
326
  }
327
+ function penaltyTypeField() {
328
+ return {
329
+ toFront: function (data) {
330
+ if (typeof data === 'object') {
331
+ return data;
332
+ }
333
+ return HockeyPenaltyTypes.find(function (item) { return item.id === data; });
334
+ },
335
+ toBack: function (data) {
336
+ if (typeof data === 'object') {
337
+ return data.id;
338
+ }
339
+ return data;
340
+ }
341
+ };
342
+ }
277
343
  function listField(modelClass) {
278
344
  return {
279
345
  toFront: function (value) {
@@ -884,6 +950,9 @@
884
950
  if (this.sport.isVolleyball()) {
885
951
  classList.push('empty-logo-volleyball');
886
952
  }
953
+ if (this.sport.isHockey()) {
954
+ classList.push('empty-logo-hockey');
955
+ }
887
956
  return classList.join(' ');
888
957
  };
889
958
  Team.toFront = function (data) {
@@ -1152,6 +1221,9 @@
1152
1221
  if (this.sport.isVolleyball()) {
1153
1222
  classList.push('empty-logo-volleyball');
1154
1223
  }
1224
+ if (this.sport.isHockey()) {
1225
+ classList.push('empty-logo-hockey');
1226
+ }
1155
1227
  return classList.join(' ');
1156
1228
  };
1157
1229
  Tournament.toFront = function (data) { };
@@ -2479,6 +2551,13 @@
2479
2551
  HockeyGameLog.prototype.isScoreType = function () {
2480
2552
  return [exports.HockeyGameLogTypes.goal, exports.HockeyGameLogTypes.shootout_goal].indexOf(this.logType) > -1;
2481
2553
  };
2554
+ HockeyGameLog.prototype.isPenaltyType = function () {
2555
+ return [
2556
+ exports.HockeyGameLogTypes.minor_penalty, exports.HockeyGameLogTypes.major_penalty,
2557
+ exports.HockeyGameLogTypes.misconduct_penalty, exports.HockeyGameLogTypes.game_misconduct_penalty,
2558
+ exports.HockeyGameLogTypes.penalty_shot, exports.HockeyGameLogTypes.match_penalty
2559
+ ].indexOf(this.logType) > -1;
2560
+ };
2482
2561
  HockeyGameLog.toFront = function (value) { };
2483
2562
  HockeyGameLog.toBack = function (value) { };
2484
2563
  __decorate([
@@ -2503,11 +2582,13 @@
2503
2582
  is_highlight: 'isHighlight',
2504
2583
  advantage: 'advantage',
2505
2584
  is_goalie: 'isGoalie',
2585
+ penalty_type: 'penaltyType'
2506
2586
  },
2507
2587
  relation: {
2508
2588
  datetime: DateTimeField,
2509
2589
  logType: enumField(exports.HockeyGameLogTypes),
2510
2590
  advantage: enumField(exports.HockeyAdvantageTypes),
2591
+ penaltyType: penaltyTypeField()
2511
2592
  }
2512
2593
  })
2513
2594
  ], HockeyGameLog);
@@ -5090,6 +5171,13 @@
5090
5171
  });
5091
5172
  });
5092
5173
  };
5174
+ TournamentApi.prototype.getTournamentTeamUsers = function (tournamentTeamId) {
5175
+ return __awaiter(this, void 0, void 0, function () {
5176
+ return __generator(this, function (_a) {
5177
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_team/" + tournamentTeamId + "/users/").pipe(operators.map(function (result) { return TournamentTeamUser.toFront(result); })).toPromise()];
5178
+ });
5179
+ });
5180
+ };
5093
5181
  TournamentApi.ctorParameters = function () { return [
5094
5182
  { type: http.HttpClient },
5095
5183
  { type: ConfigService }
@@ -6528,6 +6616,7 @@
6528
6616
  exports.HockeyGameLogTypeLocalization = HockeyGameLogTypeLocalization;
6529
6617
  exports.HockeyGameStatistic = HockeyGameStatistic;
6530
6618
  exports.HockeyGameTeamStatistic = HockeyGameTeamStatistic;
6619
+ exports.HockeyPenaltyTypes = HockeyPenaltyTypes;
6531
6620
  exports.HockeyProfile = HockeyProfile;
6532
6621
  exports.HockeyStatistic = HockeyStatistic;
6533
6622
  exports.HttpCookieInterceptor = HttpCookieInterceptor;
@@ -6629,6 +6718,7 @@
6629
6718
  exports.validateEmail = validateEmail;
6630
6719
  exports.validatePhone = validatePhone;
6631
6720
  exports.validateUrl = validateUrl;
6721
+ exports.ɵa = penaltyTypeField;
6632
6722
 
6633
6723
  Object.defineProperty(exports, '__esModule', { value: true });
6634
6724