@mtgame/core 0.0.42 → 0.0.43

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.
@@ -7,6 +7,7 @@ import { PaginatedResponse } from './paginated-response.interface';
7
7
  import { TournamentEvent } from '../models/tournament-event';
8
8
  import { TournamentSeason } from '../models/tournament-season';
9
9
  import { Game } from '../models/game';
10
+ import { LeaguePartner } from '../models/league-partner';
10
11
  export declare class LeagueApi {
11
12
  private httpClient;
12
13
  private configService;
@@ -18,4 +19,5 @@ export declare class LeagueApi {
18
19
  getTournamentSeasons(leagueId: number): Promise<TournamentSeason[]>;
19
20
  getGames(leagueId: number, page: number, size: number, filters: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
20
21
  getSeasons(leagueId: number, notClosed?: boolean): Promise<TournamentSeason[]>;
22
+ getPartners(leagueId: number): Promise<LeaguePartner[]>;
21
23
  }
@@ -3152,6 +3152,36 @@
3152
3152
  return TournamentEvent;
3153
3153
  }(BaseModel));
3154
3154
 
3155
+ var LeaguePartner = /** @class */ (function (_super) {
3156
+ __extends(LeaguePartner, _super);
3157
+ function LeaguePartner() {
3158
+ return _super !== null && _super.apply(this, arguments) || this;
3159
+ }
3160
+ LeaguePartner.toFront = function (data) { };
3161
+ LeaguePartner.toBack = function (data) { };
3162
+ __decorate([
3163
+ ToFrontHook
3164
+ ], LeaguePartner, "toFront", null);
3165
+ __decorate([
3166
+ ToBackHook
3167
+ ], LeaguePartner, "toBack", null);
3168
+ LeaguePartner = __decorate([
3169
+ ModelInstance({
3170
+ mappingFields: {
3171
+ id: 'id',
3172
+ title: 'title',
3173
+ picture: 'picture',
3174
+ link: 'link',
3175
+ sort: 'sort',
3176
+ },
3177
+ relation: {
3178
+ picture: File
3179
+ }
3180
+ })
3181
+ ], LeaguePartner);
3182
+ return LeaguePartner;
3183
+ }(BaseModel));
3184
+
3155
3185
  var LeagueApi = /** @class */ (function () {
3156
3186
  function LeagueApi(httpClient, configService) {
3157
3187
  this.httpClient = httpClient;
@@ -3254,6 +3284,13 @@
3254
3284
  });
3255
3285
  });
3256
3286
  };
3287
+ LeagueApi.prototype.getPartners = function (leagueId) {
3288
+ return __awaiter(this, void 0, void 0, function () {
3289
+ return __generator(this, function (_a) {
3290
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/partners/").pipe(operators.map(function (result) { return LeaguePartner.toFront(result); })).toPromise()];
3291
+ });
3292
+ });
3293
+ };
3257
3294
  LeagueApi.ctorParameters = function () { return [
3258
3295
  { type: http.HttpClient },
3259
3296
  { type: ConfigService }
@@ -7118,6 +7155,7 @@
7118
7155
  exports.LeagueCourt = LeagueCourt;
7119
7156
  exports.LeagueNews = LeagueNews;
7120
7157
  exports.LeagueNewsApi = LeagueNewsApi;
7158
+ exports.LeaguePartner = LeaguePartner;
7121
7159
  exports.LocalStorageEngine = LocalStorageEngine;
7122
7160
  exports.MediaApi = MediaApi;
7123
7161
  exports.MediaItem = MediaItem;