@mtgame/core 0.0.50 → 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) {
@@ -6758,6 +6807,35 @@
6758
6807
  _a$6[exports.VolleyballGameLogType.yellow_card] = 'Предупреждение',
6759
6808
  _a$6);
6760
6809
 
6810
+ var LeaguePlaylist = /** @class */ (function (_super) {
6811
+ __extends(LeaguePlaylist, _super);
6812
+ function LeaguePlaylist() {
6813
+ return _super !== null && _super.apply(this, arguments) || this;
6814
+ }
6815
+ LeaguePlaylist.toFront = function (data) { };
6816
+ LeaguePlaylist.toBack = function (data) { };
6817
+ __decorate([
6818
+ ToFrontHook
6819
+ ], LeaguePlaylist, "toFront", null);
6820
+ __decorate([
6821
+ ToBackHook
6822
+ ], LeaguePlaylist, "toBack", null);
6823
+ LeaguePlaylist = __decorate([
6824
+ ModelInstance({
6825
+ mappingFields: {
6826
+ id: 'id',
6827
+ name: 'name',
6828
+ files: 'files',
6829
+ key_code: 'keyCode',
6830
+ },
6831
+ relation: {
6832
+ files: listField(File)
6833
+ }
6834
+ })
6835
+ ], LeaguePlaylist);
6836
+ return LeaguePlaylist;
6837
+ }(BaseModel));
6838
+
6761
6839
  var CentrifugoService = /** @class */ (function () {
6762
6840
  function CentrifugoService(httpClient, configService) {
6763
6841
  this.httpClient = httpClient;
@@ -7214,10 +7292,12 @@
7214
7292
  exports.HttpCookieInterceptor = HttpCookieInterceptor;
7215
7293
  exports.League = League;
7216
7294
  exports.LeagueApi = LeagueApi;
7295
+ exports.LeagueBanner = LeagueBanner;
7217
7296
  exports.LeagueCourt = LeagueCourt;
7218
7297
  exports.LeagueNews = LeagueNews;
7219
7298
  exports.LeagueNewsApi = LeagueNewsApi;
7220
7299
  exports.LeaguePartner = LeaguePartner;
7300
+ exports.LeaguePlaylist = LeaguePlaylist;
7221
7301
  exports.LocalStorageEngine = LocalStorageEngine;
7222
7302
  exports.MediaApi = MediaApi;
7223
7303
  exports.MediaItem = MediaItem;