@mtgame/core 0.0.51 → 0.0.53
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 +51 -0
- 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 +8 -1
- package/esm2015/models/league-banner.js +39 -0
- package/esm2015/models/public-api.js +2 -1
- package/esm2015/models/tournament-team-user.js +2 -1
- package/esm5/api/league-api.js +11 -1
- package/esm5/models/league-banner.js +44 -0
- package/esm5/models/public-api.js +2 -1
- package/esm5/models/tournament-team-user.js +2 -1
- package/fesm2015/mtgame-core.js +43 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +51 -1
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/league-banner.d.ts +17 -0
- package/models/public-api.d.ts +1 -0
- package/models/tournament-team-user.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/league-api.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { TournamentSeason } from '../models/tournament-season';
|
|
|
9
9
|
import { Game } from '../models/game';
|
|
10
10
|
import { LeaguePartner } from '../models/league-partner';
|
|
11
11
|
import { LeagueCourt } from '../models/league-court';
|
|
12
|
+
import { BannerLocation, LeagueBanner } from '../models/league-banner';
|
|
12
13
|
export declare class LeagueApi {
|
|
13
14
|
private httpClient;
|
|
14
15
|
private configService;
|
|
@@ -21,5 +22,6 @@ export declare class LeagueApi {
|
|
|
21
22
|
getGames(leagueId: number, page: number, size: number, filters: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
|
|
22
23
|
getSeasons(leagueId: number, notClosed?: boolean): Promise<TournamentSeason[]>;
|
|
23
24
|
getPartners(leagueId: number): Promise<LeaguePartner[]>;
|
|
25
|
+
getBanners(leagueId: number, location?: BannerLocation): Promise<LeagueBanner[]>;
|
|
24
26
|
getCourts(leagueId: number): Promise<LeagueCourt[]>;
|
|
25
27
|
}
|
|
@@ -1873,6 +1873,7 @@
|
|
|
1873
1873
|
photo: 'photo',
|
|
1874
1874
|
disqualification: 'disqualification',
|
|
1875
1875
|
has_changes: 'hasChanges',
|
|
1876
|
+
rating: 'rating'
|
|
1876
1877
|
},
|
|
1877
1878
|
relation: {
|
|
1878
1879
|
tournamentTeam: TournamentTeam,
|
|
@@ -3205,6 +3206,46 @@
|
|
|
3205
3206
|
return LeaguePartner;
|
|
3206
3207
|
}(BaseModel));
|
|
3207
3208
|
|
|
3209
|
+
|
|
3210
|
+
(function (BannerLocation) {
|
|
3211
|
+
BannerLocation["slider"] = "slider";
|
|
3212
|
+
BannerLocation["central"] = "central";
|
|
3213
|
+
BannerLocation["media"] = "media";
|
|
3214
|
+
})(exports.BannerLocation || (exports.BannerLocation = {}));
|
|
3215
|
+
var LeagueBanner = /** @class */ (function (_super) {
|
|
3216
|
+
__extends(LeagueBanner, _super);
|
|
3217
|
+
function LeagueBanner() {
|
|
3218
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3219
|
+
}
|
|
3220
|
+
LeagueBanner.toFront = function (data) {
|
|
3221
|
+
};
|
|
3222
|
+
LeagueBanner.toBack = function (data) {
|
|
3223
|
+
};
|
|
3224
|
+
__decorate([
|
|
3225
|
+
ToFrontHook
|
|
3226
|
+
], LeagueBanner, "toFront", null);
|
|
3227
|
+
__decorate([
|
|
3228
|
+
ToBackHook
|
|
3229
|
+
], LeagueBanner, "toBack", null);
|
|
3230
|
+
LeagueBanner = __decorate([
|
|
3231
|
+
ModelInstance({
|
|
3232
|
+
mappingFields: {
|
|
3233
|
+
id: 'id',
|
|
3234
|
+
title: 'title',
|
|
3235
|
+
picture: 'picture',
|
|
3236
|
+
link: 'link',
|
|
3237
|
+
sort: 'sort',
|
|
3238
|
+
location: 'location',
|
|
3239
|
+
},
|
|
3240
|
+
relation: {
|
|
3241
|
+
picture: File,
|
|
3242
|
+
location: enumField(exports.BannerLocation),
|
|
3243
|
+
}
|
|
3244
|
+
})
|
|
3245
|
+
], LeagueBanner);
|
|
3246
|
+
return LeagueBanner;
|
|
3247
|
+
}(BaseModel));
|
|
3248
|
+
|
|
3208
3249
|
var LeagueApi = /** @class */ (function () {
|
|
3209
3250
|
function LeagueApi(httpClient, configService) {
|
|
3210
3251
|
this.httpClient = httpClient;
|
|
@@ -3317,6 +3358,15 @@
|
|
|
3317
3358
|
});
|
|
3318
3359
|
});
|
|
3319
3360
|
};
|
|
3361
|
+
LeagueApi.prototype.getBanners = function (leagueId, location) {
|
|
3362
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3363
|
+
var params;
|
|
3364
|
+
return __generator(this, function (_a) {
|
|
3365
|
+
params = location ? new http.HttpParams().set('location', location) : new http.HttpParams();
|
|
3366
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/banners/", { params: params }).pipe(operators.map(function (result) { return LeagueBanner.toFront(result); })).toPromise()];
|
|
3367
|
+
});
|
|
3368
|
+
});
|
|
3369
|
+
};
|
|
3320
3370
|
LeagueApi.prototype.getCourts = function (leagueId) {
|
|
3321
3371
|
return __awaiter(this, void 0, void 0, function () {
|
|
3322
3372
|
return __generator(this, function (_a) {
|
|
@@ -7243,6 +7293,7 @@
|
|
|
7243
7293
|
exports.HttpCookieInterceptor = HttpCookieInterceptor;
|
|
7244
7294
|
exports.League = League;
|
|
7245
7295
|
exports.LeagueApi = LeagueApi;
|
|
7296
|
+
exports.LeagueBanner = LeagueBanner;
|
|
7246
7297
|
exports.LeagueCourt = LeagueCourt;
|
|
7247
7298
|
exports.LeagueNews = LeagueNews;
|
|
7248
7299
|
exports.LeagueNewsApi = LeagueNewsApi;
|