@mtgame/core 0.0.42 → 0.0.44
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 +39 -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 +7 -1
- package/esm2015/models/league-partner.js +29 -0
- package/esm2015/models/media-item.js +2 -1
- package/esm2015/models/public-api.js +2 -1
- package/esm5/api/league-api.js +9 -1
- package/esm5/models/league-partner.js +34 -0
- package/esm5/models/media-item.js +2 -1
- package/esm5/models/public-api.js +2 -1
- package/fesm2015/mtgame-core.js +32 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +39 -1
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/league-partner.d.ts +11 -0
- package/models/media-item.d.ts +1 -0
- 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
|
@@ -7,6 +7,7 @@ import { PaginatedResponse } from './paginated-response.interface';
|
|
|
7
7
|
import { TournamentEvent } from '../models/tournament-event';
|
|
8
8
|
import { TournamentSeason } from '../models/tournament-season';
|
|
9
9
|
import { Game } from '../models/game';
|
|
10
|
+
import { LeaguePartner } from '../models/league-partner';
|
|
10
11
|
export declare class LeagueApi {
|
|
11
12
|
private httpClient;
|
|
12
13
|
private configService;
|
|
@@ -18,4 +19,5 @@ export declare class LeagueApi {
|
|
|
18
19
|
getTournamentSeasons(leagueId: number): Promise<TournamentSeason[]>;
|
|
19
20
|
getGames(leagueId: number, page: number, size: number, filters: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
|
|
20
21
|
getSeasons(leagueId: number, notClosed?: boolean): Promise<TournamentSeason[]>;
|
|
22
|
+
getPartners(leagueId: number): Promise<LeaguePartner[]>;
|
|
21
23
|
}
|
|
@@ -1483,6 +1483,7 @@
|
|
|
1483
1483
|
tournament_id: 'tournament_id',
|
|
1484
1484
|
video_url: 'videoUrl',
|
|
1485
1485
|
video_preview: 'videoPreview',
|
|
1486
|
+
is_live: 'isLive',
|
|
1486
1487
|
},
|
|
1487
1488
|
relation: {
|
|
1488
1489
|
originalPhoto: File,
|
|
@@ -3152,6 +3153,36 @@
|
|
|
3152
3153
|
return TournamentEvent;
|
|
3153
3154
|
}(BaseModel));
|
|
3154
3155
|
|
|
3156
|
+
var LeaguePartner = /** @class */ (function (_super) {
|
|
3157
|
+
__extends(LeaguePartner, _super);
|
|
3158
|
+
function LeaguePartner() {
|
|
3159
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3160
|
+
}
|
|
3161
|
+
LeaguePartner.toFront = function (data) { };
|
|
3162
|
+
LeaguePartner.toBack = function (data) { };
|
|
3163
|
+
__decorate([
|
|
3164
|
+
ToFrontHook
|
|
3165
|
+
], LeaguePartner, "toFront", null);
|
|
3166
|
+
__decorate([
|
|
3167
|
+
ToBackHook
|
|
3168
|
+
], LeaguePartner, "toBack", null);
|
|
3169
|
+
LeaguePartner = __decorate([
|
|
3170
|
+
ModelInstance({
|
|
3171
|
+
mappingFields: {
|
|
3172
|
+
id: 'id',
|
|
3173
|
+
title: 'title',
|
|
3174
|
+
picture: 'picture',
|
|
3175
|
+
link: 'link',
|
|
3176
|
+
sort: 'sort',
|
|
3177
|
+
},
|
|
3178
|
+
relation: {
|
|
3179
|
+
picture: File
|
|
3180
|
+
}
|
|
3181
|
+
})
|
|
3182
|
+
], LeaguePartner);
|
|
3183
|
+
return LeaguePartner;
|
|
3184
|
+
}(BaseModel));
|
|
3185
|
+
|
|
3155
3186
|
var LeagueApi = /** @class */ (function () {
|
|
3156
3187
|
function LeagueApi(httpClient, configService) {
|
|
3157
3188
|
this.httpClient = httpClient;
|
|
@@ -3254,6 +3285,13 @@
|
|
|
3254
3285
|
});
|
|
3255
3286
|
});
|
|
3256
3287
|
};
|
|
3288
|
+
LeagueApi.prototype.getPartners = function (leagueId) {
|
|
3289
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3290
|
+
return __generator(this, function (_a) {
|
|
3291
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/partners/").pipe(operators.map(function (result) { return LeaguePartner.toFront(result); })).toPromise()];
|
|
3292
|
+
});
|
|
3293
|
+
});
|
|
3294
|
+
};
|
|
3257
3295
|
LeagueApi.ctorParameters = function () { return [
|
|
3258
3296
|
{ type: http.HttpClient },
|
|
3259
3297
|
{ type: ConfigService }
|
|
@@ -7118,6 +7156,7 @@
|
|
|
7118
7156
|
exports.LeagueCourt = LeagueCourt;
|
|
7119
7157
|
exports.LeagueNews = LeagueNews;
|
|
7120
7158
|
exports.LeagueNewsApi = LeagueNewsApi;
|
|
7159
|
+
exports.LeaguePartner = LeaguePartner;
|
|
7121
7160
|
exports.LocalStorageEngine = LocalStorageEngine;
|
|
7122
7161
|
exports.MediaApi = MediaApi;
|
|
7123
7162
|
exports.MediaItem = MediaItem;
|