@mtgame/core 0.0.51 → 0.0.52

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.
@@ -9,6 +9,7 @@ import { TournamentSeason } from '../models/tournament-season';
9
9
  import { Game } from '../models/game';
10
10
  import { LeaguePartner } from '../models/league-partner';
11
11
  import { LeagueCourt } from '../models/league-court';
12
+ import { BannerLocation, LeagueBanner } from '../models/league-banner';
12
13
  export declare class LeagueApi {
13
14
  private httpClient;
14
15
  private configService;
@@ -21,5 +22,6 @@ export declare class LeagueApi {
21
22
  getGames(leagueId: number, page: number, size: number, filters: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
22
23
  getSeasons(leagueId: number, notClosed?: boolean): Promise<TournamentSeason[]>;
23
24
  getPartners(leagueId: number): Promise<LeaguePartner[]>;
25
+ getBanners(leagueId: number, location?: BannerLocation): Promise<LeagueBanner[]>;
24
26
  getCourts(leagueId: number): Promise<LeagueCourt[]>;
25
27
  }
@@ -3205,6 +3205,46 @@
3205
3205
  return LeaguePartner;
3206
3206
  }(BaseModel));
3207
3207
 
3208
+
3209
+ (function (BannerLocation) {
3210
+ BannerLocation["slider"] = "slider";
3211
+ BannerLocation["central"] = "central";
3212
+ BannerLocation["media"] = "media";
3213
+ })(exports.BannerLocation || (exports.BannerLocation = {}));
3214
+ var LeagueBanner = /** @class */ (function (_super) {
3215
+ __extends(LeagueBanner, _super);
3216
+ function LeagueBanner() {
3217
+ return _super !== null && _super.apply(this, arguments) || this;
3218
+ }
3219
+ LeagueBanner.toFront = function (data) {
3220
+ };
3221
+ LeagueBanner.toBack = function (data) {
3222
+ };
3223
+ __decorate([
3224
+ ToFrontHook
3225
+ ], LeagueBanner, "toFront", null);
3226
+ __decorate([
3227
+ ToBackHook
3228
+ ], LeagueBanner, "toBack", null);
3229
+ LeagueBanner = __decorate([
3230
+ ModelInstance({
3231
+ mappingFields: {
3232
+ id: 'id',
3233
+ title: 'title',
3234
+ picture: 'picture',
3235
+ link: 'link',
3236
+ sort: 'sort',
3237
+ location: 'location',
3238
+ },
3239
+ relation: {
3240
+ picture: File,
3241
+ location: enumField(exports.BannerLocation),
3242
+ }
3243
+ })
3244
+ ], LeagueBanner);
3245
+ return LeagueBanner;
3246
+ }(BaseModel));
3247
+
3208
3248
  var LeagueApi = /** @class */ (function () {
3209
3249
  function LeagueApi(httpClient, configService) {
3210
3250
  this.httpClient = httpClient;
@@ -3317,6 +3357,15 @@
3317
3357
  });
3318
3358
  });
3319
3359
  };
3360
+ LeagueApi.prototype.getBanners = function (leagueId, location) {
3361
+ return __awaiter(this, void 0, void 0, function () {
3362
+ var params;
3363
+ return __generator(this, function (_a) {
3364
+ params = location ? new http.HttpParams().set('location', location) : new http.HttpParams();
3365
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/banners/", { params: params }).pipe(operators.map(function (result) { return LeagueBanner.toFront(result); })).toPromise()];
3366
+ });
3367
+ });
3368
+ };
3320
3369
  LeagueApi.prototype.getCourts = function (leagueId) {
3321
3370
  return __awaiter(this, void 0, void 0, function () {
3322
3371
  return __generator(this, function (_a) {
@@ -7243,6 +7292,7 @@
7243
7292
  exports.HttpCookieInterceptor = HttpCookieInterceptor;
7244
7293
  exports.League = League;
7245
7294
  exports.LeagueApi = LeagueApi;
7295
+ exports.LeagueBanner = LeagueBanner;
7246
7296
  exports.LeagueCourt = LeagueCourt;
7247
7297
  exports.LeagueNews = LeagueNews;
7248
7298
  exports.LeagueNewsApi = LeagueNewsApi;