@mtgame/core 0.1.24 → 0.1.26

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.
@@ -0,0 +1,11 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ConfigService } from '../services/config.service';
3
+ import { LeaguePlayer } from '../models/league-player';
4
+ import { TournamentTeamUser } from '../models/tournament-team-user';
5
+ export declare class LeaguePlayerApi {
6
+ private httpClient;
7
+ private configService;
8
+ constructor(httpClient: HttpClient, configService: ConfigService);
9
+ getById(leaguePlayerId: number): Promise<LeaguePlayer>;
10
+ getTournamentUsers(leaguePlayerId: number): Promise<TournamentTeamUser[]>;
11
+ }
@@ -7,6 +7,7 @@ export * from './football-game-api';
7
7
  export * from './handball-game-api';
8
8
  export { LeagueApi } from './league-api';
9
9
  export * from './league-news-api';
10
+ export * from './league-player-api';
10
11
  export { MediaApi, GameMediaFilters } from './media-api';
11
12
  export * from './notification-api';
12
13
  export * from './notification-base-api';
@@ -32,12 +32,13 @@ export interface TournamentGamesFilters {
32
32
  userId?: number;
33
33
  query?: string;
34
34
  }
35
- export declare type StatisticGroupByTypes = 'team' | 'user' | 'team_user' | 'tournament_team' | 'tournament_team_user' | 'month' | 'win_loses';
35
+ export declare type StatisticGroupByTypes = 'team' | 'user' | 'team_user' | 'tournament_team' | 'league_player' | 'tournament_team_user' | 'month' | 'win_loses';
36
36
  export interface StatisticFilters {
37
37
  tournament_id?: number;
38
38
  tournament_ids?: number[];
39
39
  tournament_season_id?: number;
40
40
  tournament_team_id?: number;
41
+ league_player_id?: number;
41
42
  tournament_team_user_id?: number;
42
43
  team_id?: number;
43
44
  team_user_id?: number;
@@ -1959,6 +1959,86 @@
1959
1959
  function Game() {
1960
1960
  return _super !== null && _super.apply(this, arguments) || this;
1961
1961
  }
1962
+ Object.defineProperty(Game.prototype, "basketballGameConfig", {
1963
+ get: function () {
1964
+ if (this._basketballGameConfig && this._basketballGameConfig.periodsCount) {
1965
+ return this._basketballGameConfig;
1966
+ }
1967
+ if (this.gameConfig) {
1968
+ this._basketballGameConfig = BasketballGameConfig.toFront(this.gameConfig);
1969
+ }
1970
+ return this._basketballGameConfig;
1971
+ },
1972
+ set: function (value) {
1973
+ this._basketballGameConfig = value;
1974
+ },
1975
+ enumerable: true,
1976
+ configurable: true
1977
+ });
1978
+ Object.defineProperty(Game.prototype, "volleyballGameConfig", {
1979
+ get: function () {
1980
+ if (this._volleyballGameConfig && this._volleyballGameConfig.setsCount) {
1981
+ return this._volleyballGameConfig;
1982
+ }
1983
+ if (this.gameConfig) {
1984
+ this._volleyballGameConfig = VolleyballGameConfig.toFront(this.gameConfig);
1985
+ }
1986
+ return this._volleyballGameConfig;
1987
+ },
1988
+ set: function (value) {
1989
+ this._volleyballGameConfig = value;
1990
+ },
1991
+ enumerable: true,
1992
+ configurable: true
1993
+ });
1994
+ Object.defineProperty(Game.prototype, "hockeyGameConfig", {
1995
+ get: function () {
1996
+ if (this._hockeyGameConfig && this._hockeyGameConfig.periodsCount) {
1997
+ return this._hockeyGameConfig;
1998
+ }
1999
+ if (this.gameConfig) {
2000
+ this._hockeyGameConfig = HockeyGameConfig.toFront(this.gameConfig);
2001
+ }
2002
+ return this._hockeyGameConfig;
2003
+ },
2004
+ set: function (value) {
2005
+ this._hockeyGameConfig = value;
2006
+ },
2007
+ enumerable: true,
2008
+ configurable: true
2009
+ });
2010
+ Object.defineProperty(Game.prototype, "handballGameConfig", {
2011
+ get: function () {
2012
+ if (this._handballGameConfig && this._handballGameConfig.periodsCount) {
2013
+ return this._handballGameConfig;
2014
+ }
2015
+ if (this.gameConfig) {
2016
+ this._handballGameConfig = HandballGameConfig.toFront(this.gameConfig);
2017
+ }
2018
+ return this._handballGameConfig;
2019
+ },
2020
+ set: function (value) {
2021
+ this._handballGameConfig = value;
2022
+ },
2023
+ enumerable: true,
2024
+ configurable: true
2025
+ });
2026
+ Object.defineProperty(Game.prototype, "footballGameConfig", {
2027
+ get: function () {
2028
+ if (this._footballGameConfig && this._footballGameConfig.periodsCount) {
2029
+ return this._footballGameConfig;
2030
+ }
2031
+ if (this.gameConfig) {
2032
+ this._footballGameConfig = FootballGameConfig.toFront(this.gameConfig);
2033
+ }
2034
+ return this._footballGameConfig;
2035
+ },
2036
+ set: function (value) {
2037
+ this._footballGameConfig = value;
2038
+ },
2039
+ enumerable: true,
2040
+ configurable: true
2041
+ });
1962
2042
  Object.defineProperty(Game.prototype, "scoreByPeriodList", {
1963
2043
  get: function () {
1964
2044
  var _this = this;
@@ -2041,6 +2121,7 @@
2041
2121
  playoff_number: 'playoffNumber',
2042
2122
  tournament_id: 'tournamentId',
2043
2123
  tournament_tour: 'tournamentTour',
2124
+ game_config: 'gameConfig',
2044
2125
  basketball_game_config: 'basketballGameConfig',
2045
2126
  volleyball_game_config: 'volleyballGameConfig',
2046
2127
  hockey_game_config: 'hockeyGameConfig',
@@ -5740,6 +5821,28 @@
5740
5821
  return LeagueNewsApi;
5741
5822
  }());
5742
5823
 
5824
+ var LeaguePlayerApi = /** @class */ (function () {
5825
+ function LeaguePlayerApi(httpClient, configService) {
5826
+ this.httpClient = httpClient;
5827
+ this.configService = configService;
5828
+ }
5829
+ LeaguePlayerApi.prototype.getById = function (leaguePlayerId) {
5830
+ return this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_player/" + leaguePlayerId + "/").pipe(operators.map(function (item) { return LeaguePlayer.toFront(item); })).toPromise();
5831
+ };
5832
+ LeaguePlayerApi.prototype.getTournamentUsers = function (leaguePlayerId) {
5833
+ return this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_player/" + leaguePlayerId + "/tournament_users/").pipe(operators.map(function (item) { return TournamentTeamUser.toFront(item); })).toPromise();
5834
+ };
5835
+ LeaguePlayerApi.ctorParameters = function () { return [
5836
+ { type: http.HttpClient },
5837
+ { type: ConfigService }
5838
+ ]; };
5839
+ LeaguePlayerApi.ɵprov = core.ɵɵdefineInjectable({ factory: function LeaguePlayerApi_Factory() { return new LeaguePlayerApi(core.ɵɵinject(http.HttpClient), core.ɵɵinject(ConfigService)); }, token: LeaguePlayerApi, providedIn: "root" });
5840
+ LeaguePlayerApi = __decorate([
5841
+ core.Injectable({ providedIn: 'root' })
5842
+ ], LeaguePlayerApi);
5843
+ return LeaguePlayerApi;
5844
+ }());
5845
+
5743
5846
  var MediaApi = /** @class */ (function () {
5744
5847
  function MediaApi(httpClient, configService) {
5745
5848
  this.httpClient = httpClient;
@@ -8363,6 +8466,7 @@
8363
8466
  _a$3[exports.FootballGameLogTypes.steal] = 'Перехват',
8364
8467
  _a$3[exports.FootballGameLogTypes.out] = 'Аут',
8365
8468
  _a$3[exports.FootballGameLogTypes.timeout] = 'Таймаут',
8469
+ _a$3[exports.FootballGameLogTypes.auto_goal] = 'Автогол',
8366
8470
  _a$3);
8367
8471
 
8368
8472
  var _a$4;
@@ -9028,6 +9132,7 @@
9028
9132
  exports.LeagueNewsApi = LeagueNewsApi;
9029
9133
  exports.LeaguePartner = LeaguePartner;
9030
9134
  exports.LeaguePlayer = LeaguePlayer;
9135
+ exports.LeaguePlayerApi = LeaguePlayerApi;
9031
9136
  exports.LeaguePlaylist = LeaguePlaylist;
9032
9137
  exports.LocalStorageEngine = LocalStorageEngine;
9033
9138
  exports.MODEL_MAPPING_FIELDS_KEY = MODEL_MAPPING_FIELDS_KEY;