@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/api/league-api.d.ts
CHANGED
|
@@ -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
|
-
|
|
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 }
|