@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.
- package/api/league-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +37 -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 +3 -8
- package/esm2015/models/public-api.js +2 -1
- package/esm5/api/league-api.js +9 -1
- package/esm5/models/league-document.js +31 -0
- package/esm5/models/league.js +4 -7
- package/esm5/models/public-api.js +2 -1
- package/fesm2015/mtgame-core.js +29 -7
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +37 -6
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/league-document.d.ts +8 -0
- package/models/league.d.ts +1 -1
- package/models/public-api.d.ts +1 -0
- 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) { };
|
|
@@ -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;
|