@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.
@@ -957,9 +957,7 @@ var Organization = /** @class */ (function (_super) {
957
957
  var League = /** @class */ (function (_super) {
958
958
  __extends(League, _super);
959
959
  function League() {
960
- var _this = _super !== null && _super.apply(this, arguments) || this;
961
- _this.documents = [];
962
- return _this;
960
+ return _super !== null && _super.apply(this, arguments) || this;
963
961
  }
964
962
  League.toFront = function (data) { };
965
963
  League.toBack = function (data) { };
@@ -1008,14 +1006,12 @@ var League = /** @class */ (function (_super) {
1008
1006
  closest_game_datetime: 'closestGameDatetime',
1009
1007
  cover: 'cover',
1010
1008
  about: 'about',
1011
- documents: 'documents',
1012
1009
  },
1013
1010
  relation: {
1014
1011
  organization: Organization,
1015
1012
  logo: File,
1016
1013
  cover: File,
1017
1014
  sport: Sport,
1018
- documents: listField(File),
1019
1015
  }
1020
1016
  })
1021
1017
  ], League);
@@ -5267,6 +5263,33 @@ var LeagueBanner = /** @class */ (function (_super) {
5267
5263
  return LeagueBanner;
5268
5264
  }(BaseModel));
5269
5265
 
5266
+ var LeagueDocument = /** @class */ (function (_super) {
5267
+ __extends(LeagueDocument, _super);
5268
+ function LeagueDocument() {
5269
+ return _super !== null && _super.apply(this, arguments) || this;
5270
+ }
5271
+ LeagueDocument.toFront = function (data) { };
5272
+ LeagueDocument.toBack = function (data) { };
5273
+ __decorate([
5274
+ ToFrontHook
5275
+ ], LeagueDocument, "toFront", null);
5276
+ __decorate([
5277
+ ToBackHook
5278
+ ], LeagueDocument, "toBack", null);
5279
+ LeagueDocument = __decorate([
5280
+ ModelInstance({
5281
+ mappingFields: {
5282
+ id: 'id',
5283
+ file: 'file',
5284
+ },
5285
+ relation: {
5286
+ file: File,
5287
+ }
5288
+ })
5289
+ ], LeagueDocument);
5290
+ return LeagueDocument;
5291
+ }(BaseModel));
5292
+
5270
5293
  var LeagueApi = /** @class */ (function () {
5271
5294
  function LeagueApi(httpClient, configService) {
5272
5295
  this.httpClient = httpClient;
@@ -5398,6 +5421,13 @@ var LeagueApi = /** @class */ (function () {
5398
5421
  });
5399
5422
  });
5400
5423
  };
5424
+ LeagueApi.prototype.getDocuments = function (leagueId) {
5425
+ return __awaiter(this, void 0, void 0, function () {
5426
+ return __generator(this, function (_a) {
5427
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/documents/").pipe(map(function (result) { return LeagueDocument.toFront(result); })).toPromise()];
5428
+ });
5429
+ });
5430
+ };
5401
5431
  LeagueApi.ctorParameters = function () { return [
5402
5432
  { type: HttpClient },
5403
5433
  { type: ConfigService }