@mtgame/core 0.1.3 → 0.1.4

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) { };
@@ -1221,14 +1219,12 @@
1221
1219
  closest_game_datetime: 'closestGameDatetime',
1222
1220
  cover: 'cover',
1223
1221
  about: 'about',
1224
- documents: 'documents',
1225
1222
  },
1226
1223
  relation: {
1227
1224
  organization: Organization,
1228
1225
  logo: File,
1229
1226
  cover: File,
1230
1227
  sport: Sport,
1231
- documents: listField(File),
1232
1228
  }
1233
1229
  })
1234
1230
  ], League);
@@ -5480,6 +5476,33 @@
5480
5476
  return LeagueBanner;
5481
5477
  }(BaseModel));
5482
5478
 
5479
+ var LeagueDocument = /** @class */ (function (_super) {
5480
+ __extends(LeagueDocument, _super);
5481
+ function LeagueDocument() {
5482
+ return _super !== null && _super.apply(this, arguments) || this;
5483
+ }
5484
+ LeagueDocument.toFront = function (data) { };
5485
+ LeagueDocument.toBack = function (data) { };
5486
+ __decorate([
5487
+ ToFrontHook
5488
+ ], LeagueDocument, "toFront", null);
5489
+ __decorate([
5490
+ ToBackHook
5491
+ ], LeagueDocument, "toBack", null);
5492
+ LeagueDocument = __decorate([
5493
+ ModelInstance({
5494
+ mappingFields: {
5495
+ id: 'id',
5496
+ file: 'file',
5497
+ },
5498
+ relation: {
5499
+ file: File,
5500
+ }
5501
+ })
5502
+ ], LeagueDocument);
5503
+ return LeagueDocument;
5504
+ }(BaseModel));
5505
+
5483
5506
  var LeagueApi = /** @class */ (function () {
5484
5507
  function LeagueApi(httpClient, configService) {
5485
5508
  this.httpClient = httpClient;
@@ -5611,6 +5634,13 @@
5611
5634
  });
5612
5635
  });
5613
5636
  };
5637
+ LeagueApi.prototype.getDocuments = function (leagueId) {
5638
+ return __awaiter(this, void 0, void 0, function () {
5639
+ return __generator(this, function (_a) {
5640
+ 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()];
5641
+ });
5642
+ });
5643
+ };
5614
5644
  LeagueApi.ctorParameters = function () { return [
5615
5645
  { type: http.HttpClient },
5616
5646
  { type: ConfigService }