@mtgame/core 0.1.0 → 0.1.2

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.
@@ -10,6 +10,7 @@ export interface GameMediaFilters extends TournamentGamesFilters {
10
10
  export interface MediaFilters {
11
11
  mediaType?: 'photo' | 'video' | 'live_video';
12
12
  sort?: string;
13
+ teamId?: number;
13
14
  }
14
15
  export declare class MediaApi {
15
16
  private httpClient;
@@ -2272,32 +2272,68 @@
2272
2272
  return TournamentDisqualification;
2273
2273
  }(BaseModel));
2274
2274
 
2275
- var TournamentTeamUser = /** @class */ (function (_super) {
2276
- __extends(TournamentTeamUser, _super);
2277
- function TournamentTeamUser() {
2275
+ var LeaguePlayer = /** @class */ (function (_super) {
2276
+ __extends(LeaguePlayer, _super);
2277
+ function LeaguePlayer() {
2278
2278
  return _super !== null && _super.apply(this, arguments) || this;
2279
2279
  }
2280
- Object.defineProperty(TournamentTeamUser.prototype, "fullName", {
2280
+ Object.defineProperty(LeaguePlayer.prototype, "fullName", {
2281
2281
  get: function () {
2282
2282
  return [this.lastName, this.firstName, this.middleName].filter(function (s) { return s; }).join(' ');
2283
2283
  },
2284
2284
  enumerable: true,
2285
2285
  configurable: true
2286
2286
  });
2287
- Object.defineProperty(TournamentTeamUser.prototype, "shortName", {
2287
+ Object.defineProperty(LeaguePlayer.prototype, "shortName", {
2288
2288
  get: function () {
2289
2289
  return [this.lastName, this.firstName].filter(function (s) { return s; }).join(' ');
2290
2290
  },
2291
2291
  enumerable: true,
2292
2292
  configurable: true
2293
2293
  });
2294
- Object.defineProperty(TournamentTeamUser.prototype, "initials", {
2294
+ Object.defineProperty(LeaguePlayer.prototype, "initials", {
2295
2295
  get: function () {
2296
2296
  return [this.lastName, this.firstName].filter(function (s) { return s; }).map(function (s) { return s.substr(0, 1); }).join('');
2297
2297
  },
2298
2298
  enumerable: true,
2299
2299
  configurable: true
2300
2300
  });
2301
+ LeaguePlayer.toFront = function (data) {
2302
+ };
2303
+ LeaguePlayer.toBack = function (data) {
2304
+ };
2305
+ __decorate([
2306
+ ToFrontHook
2307
+ ], LeaguePlayer, "toFront", null);
2308
+ __decorate([
2309
+ ToBackHook
2310
+ ], LeaguePlayer, "toBack", null);
2311
+ LeaguePlayer = __decorate([
2312
+ ModelInstance({
2313
+ mappingFields: {
2314
+ id: 'id',
2315
+ user_id: 'userId',
2316
+ league_id: 'leagueId',
2317
+ first_name: 'firstName',
2318
+ last_name: 'lastName',
2319
+ middle_name: 'middleName',
2320
+ photo: 'photo',
2321
+ has_changes: 'hasChanges',
2322
+ rating: 'rating'
2323
+ },
2324
+ relation: {
2325
+ photo: File,
2326
+ }
2327
+ })
2328
+ ], LeaguePlayer);
2329
+ return LeaguePlayer;
2330
+ }(BaseModel));
2331
+
2332
+ var TournamentTeamUser = /** @class */ (function (_super) {
2333
+ __extends(TournamentTeamUser, _super);
2334
+ function TournamentTeamUser() {
2335
+ return _super !== null && _super.apply(this, arguments) || this;
2336
+ }
2301
2337
  TournamentTeamUser.toFront = function (data) { };
2302
2338
  TournamentTeamUser.toBack = function (data) { };
2303
2339
  __decorate([
@@ -2313,19 +2349,15 @@
2313
2349
  tournament_team: 'tournamentTeam',
2314
2350
  team_user: 'teamUser',
2315
2351
  disqualified: 'disqualified',
2316
- first_name: 'firstName',
2317
- last_name: 'lastName',
2318
- middle_name: 'middleName',
2319
- photo: 'photo',
2320
2352
  disqualification: 'disqualification',
2321
- has_changes: 'hasChanges',
2322
- rating: 'rating'
2353
+ league_player: 'leaguePlayer',
2323
2354
  },
2324
2355
  relation: {
2325
2356
  tournamentTeam: TournamentTeam,
2326
2357
  teamUser: TeamUser,
2327
2358
  photo: File,
2328
2359
  disqualification: TournamentDisqualification,
2360
+ leaguePlayer: LeaguePlayer,
2329
2361
  }
2330
2362
  })
2331
2363
  ], TournamentTeamUser);
@@ -5141,7 +5173,7 @@
5141
5173
  }
5142
5174
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/volleyball_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5143
5175
  total: +result.headers.get('X-Page-Count'),
5144
- data: VolleyballStatistic.toFront(result)
5176
+ data: VolleyballStatistic.toFront(result.body)
5145
5177
  }); })).toPromise()];
5146
5178
  });
5147
5179
  });
@@ -5177,7 +5209,7 @@
5177
5209
  }
5178
5210
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/hockey_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5179
5211
  total: +result.headers.get('X-Page-Count'),
5180
- data: HockeyStatistic.toFront(result)
5212
+ data: HockeyStatistic.toFront(result.body)
5181
5213
  }); })).toPromise()];
5182
5214
  });
5183
5215
  });
@@ -5213,7 +5245,7 @@
5213
5245
  }
5214
5246
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/football_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5215
5247
  total: +result.headers.get('X-Page-Count'),
5216
- data: FootballStatistic.toFront(result)
5248
+ data: FootballStatistic.toFront(result.body)
5217
5249
  }); })).toPromise()];
5218
5250
  });
5219
5251
  });
@@ -5249,7 +5281,7 @@
5249
5281
  }
5250
5282
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/handball_statistic/", { params: params, observe: 'response' }).pipe(operators.map(function (result) { return ({
5251
5283
  total: +result.headers.get('X-Page-Count'),
5252
- data: HandballStatistic.toFront(result)
5284
+ data: HandballStatistic.toFront(result.body)
5253
5285
  }); })).toPromise()];
5254
5286
  });
5255
5287
  });
@@ -5718,6 +5750,9 @@
5718
5750
  if (filters.sort) {
5719
5751
  params = params.set('sort', filters.sort);
5720
5752
  }
5753
+ if (filters.teamId) {
5754
+ params = params.set('team_id', filters.teamId.toString());
5755
+ }
5721
5756
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/media/", { params: params, observe: 'response' })
5722
5757
  .pipe(operators.map(function (response) { return ({
5723
5758
  total: +response.headers.get('X-Page-Count'),
@@ -9027,6 +9062,7 @@
9027
9062
  exports.validatePhone = validatePhone;
9028
9063
  exports.validateUrl = validateUrl;
9029
9064
  exports.ɵa = GameBaseApi;
9065
+ exports.ɵb = LeaguePlayer;
9030
9066
 
9031
9067
  Object.defineProperty(exports, '__esModule', { value: true });
9032
9068