@mtgame/core 0.1.3 → 0.1.5

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 @@ import { Game } from '../models/game';
10
10
  import { LeaguePartner } from '../models/league-partner';
11
11
  import { LeagueCourt } from '../models/league-court';
12
12
  import { BannerLocation, LeagueBanner } from '../models/league-banner';
13
+ import { LeagueDocument } from '../models/league-document';
13
14
  export interface TournamentListFilters {
14
15
  statuses: TournamentStatuses[];
15
16
  }
@@ -28,4 +29,5 @@ export declare class LeagueApi {
28
29
  getBanners(leagueId: number, location?: BannerLocation): Promise<LeagueBanner[]>;
29
30
  getCourts(leagueId: number): Promise<LeagueCourt[]>;
30
31
  getGraphicSettings(leagueId: number): Promise<any>;
32
+ getDocuments(leagueId: number): Promise<LeagueDocument[]>;
31
33
  }
@@ -1170,9 +1170,7 @@
1170
1170
  var League = /** @class */ (function (_super) {
1171
1171
  __extends(League, _super);
1172
1172
  function League() {
1173
- var _this = _super !== null && _super.apply(this, arguments) || this;
1174
- _this.documents = [];
1175
- return _this;
1173
+ return _super !== null && _super.apply(this, arguments) || this;
1176
1174
  }
1177
1175
  League.toFront = function (data) { };
1178
1176
  League.toBack = function (data) { };
@@ -1218,17 +1216,16 @@
1218
1216
  links: 'links',
1219
1217
  organization: 'organization',
1220
1218
  tournaments_count: 'tournamentsCount',
1219
+ documents_count: 'documentsCount',
1221
1220
  closest_game_datetime: 'closestGameDatetime',
1222
1221
  cover: 'cover',
1223
1222
  about: 'about',
1224
- documents: 'documents',
1225
1223
  },
1226
1224
  relation: {
1227
1225
  organization: Organization,
1228
1226
  logo: File,
1229
1227
  cover: File,
1230
1228
  sport: Sport,
1231
- documents: listField(File),
1232
1229
  }
1233
1230
  })
1234
1231
  ], League);
@@ -5480,6 +5477,33 @@
5480
5477
  return LeagueBanner;
5481
5478
  }(BaseModel));
5482
5479
 
5480
+ var LeagueDocument = /** @class */ (function (_super) {
5481
+ __extends(LeagueDocument, _super);
5482
+ function LeagueDocument() {
5483
+ return _super !== null && _super.apply(this, arguments) || this;
5484
+ }
5485
+ LeagueDocument.toFront = function (data) { };
5486
+ LeagueDocument.toBack = function (data) { };
5487
+ __decorate([
5488
+ ToFrontHook
5489
+ ], LeagueDocument, "toFront", null);
5490
+ __decorate([
5491
+ ToBackHook
5492
+ ], LeagueDocument, "toBack", null);
5493
+ LeagueDocument = __decorate([
5494
+ ModelInstance({
5495
+ mappingFields: {
5496
+ id: 'id',
5497
+ file: 'file',
5498
+ },
5499
+ relation: {
5500
+ file: File,
5501
+ }
5502
+ })
5503
+ ], LeagueDocument);
5504
+ return LeagueDocument;
5505
+ }(BaseModel));
5506
+
5483
5507
  var LeagueApi = /** @class */ (function () {
5484
5508
  function LeagueApi(httpClient, configService) {
5485
5509
  this.httpClient = httpClient;
@@ -5611,6 +5635,13 @@
5611
5635
  });
5612
5636
  });
5613
5637
  };
5638
+ LeagueApi.prototype.getDocuments = function (leagueId) {
5639
+ return __awaiter(this, void 0, void 0, function () {
5640
+ return __generator(this, function (_a) {
5641
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/documents/").pipe(operators.map(function (result) { return LeagueDocument.toFront(result); })).toPromise()];
5642
+ });
5643
+ });
5644
+ };
5614
5645
  LeagueApi.ctorParameters = function () { return [
5615
5646
  { type: http.HttpClient },
5616
5647
  { type: ConfigService }
@@ -8953,6 +8984,7 @@
8953
8984
  exports.LeagueApi = LeagueApi;
8954
8985
  exports.LeagueBanner = LeagueBanner;
8955
8986
  exports.LeagueCourt = LeagueCourt;
8987
+ exports.LeagueDocument = LeagueDocument;
8956
8988
  exports.LeagueNews = LeagueNews;
8957
8989
  exports.LeagueNewsApi = LeagueNewsApi;
8958
8990
  exports.LeaguePartner = LeaguePartner;