@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.
- package/api/league-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +35 -5
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/league-api.js +7 -1
- package/esm2015/models/league-document.js +26 -0
- package/esm2015/models/league.js +2 -8
- package/esm5/api/league-api.js +9 -1
- package/esm5/models/league-document.js +31 -0
- package/esm5/models/league.js +3 -7
- package/fesm2015/mtgame-core.js +27 -6
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +35 -5
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/league-document.d.ts +8 -0
- package/models/league.d.ts +0 -1
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/mtgame-core.js
CHANGED
|
@@ -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
|
-
|
|
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 }
|