@mtgame/core 0.1.108 → 0.1.109
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 -1
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/league-api.js +12 -2
- package/esm2015/models/public-api.js +2 -1
- package/esm2015/models/teams-and-users.js +22 -0
- package/fesm2015/mtgame-core.js +30 -2
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/public-api.d.ts +1 -0
- package/models/teams-and-users.d.ts +9 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/league-api.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { LeaguePartner } from '../models/league-partner';
|
|
|
11
11
|
import { LeagueCourt } from '../models/league-court';
|
|
12
12
|
import { BannerLocation, LeagueBanner } from '../models/league-banner';
|
|
13
13
|
import { LeagueDocument } from '../models/league-document';
|
|
14
|
+
import { TeamsAndUsers } from '../models/teams-and-users';
|
|
14
15
|
export interface TournamentListFilters {
|
|
15
16
|
statuses: TournamentStatuses[];
|
|
16
17
|
}
|
|
@@ -30,4 +31,5 @@ export declare class LeagueApi {
|
|
|
30
31
|
getCourts(leagueId: number): Promise<LeagueCourt[]>;
|
|
31
32
|
getGraphicSettings(leagueId: number): Promise<any>;
|
|
32
33
|
getDocuments(leagueId: number): Promise<LeagueDocument[]>;
|
|
34
|
+
searchTeamsAndUsers(leagueId: number, query: string): Promise<TeamsAndUsers>;
|
|
33
35
|
}
|
|
@@ -6719,6 +6719,30 @@
|
|
|
6719
6719
|
})
|
|
6720
6720
|
], exports.LeagueDocument);
|
|
6721
6721
|
|
|
6722
|
+
exports.TeamsAndUsers = /** @class */ (function (_super) {
|
|
6723
|
+
__extends(TeamsAndUsers, _super);
|
|
6724
|
+
function TeamsAndUsers() {
|
|
6725
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
6726
|
+
}
|
|
6727
|
+
TeamsAndUsers.toFront = function (data) { };
|
|
6728
|
+
TeamsAndUsers.toBack = function (data) { };
|
|
6729
|
+
return TeamsAndUsers;
|
|
6730
|
+
}(BaseModel));
|
|
6731
|
+
__decorate([
|
|
6732
|
+
ToFrontHook
|
|
6733
|
+
], exports.TeamsAndUsers, "toFront", null);
|
|
6734
|
+
__decorate([
|
|
6735
|
+
ToBackHook
|
|
6736
|
+
], exports.TeamsAndUsers, "toBack", null);
|
|
6737
|
+
exports.TeamsAndUsers = __decorate([
|
|
6738
|
+
ModelInstance({
|
|
6739
|
+
mappingFields: {
|
|
6740
|
+
teams: 'teams',
|
|
6741
|
+
leaguePlayers: 'leaguePlayers',
|
|
6742
|
+
}
|
|
6743
|
+
})
|
|
6744
|
+
], exports.TeamsAndUsers);
|
|
6745
|
+
|
|
6722
6746
|
var LeagueApi = /** @class */ (function () {
|
|
6723
6747
|
function LeagueApi(httpClient, configService) {
|
|
6724
6748
|
this.httpClient = httpClient;
|
|
@@ -6810,7 +6834,10 @@
|
|
|
6810
6834
|
.set('size', size.toString())
|
|
6811
6835
|
.set('not_closed', notClosed ? '1' : '')
|
|
6812
6836
|
.set('include', include ? include.join(',') : '');
|
|
6813
|
-
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournament_seasons/", {
|
|
6837
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournament_seasons/", {
|
|
6838
|
+
params: params,
|
|
6839
|
+
observe: 'response'
|
|
6840
|
+
})
|
|
6814
6841
|
.pipe(operators.map(function (result) { return ({
|
|
6815
6842
|
total: +result.headers.get('X-Page-Count'),
|
|
6816
6843
|
data: exports.TournamentSeason.toFront(result.body)
|
|
@@ -6857,6 +6884,15 @@
|
|
|
6857
6884
|
});
|
|
6858
6885
|
});
|
|
6859
6886
|
};
|
|
6887
|
+
LeagueApi.prototype.searchTeamsAndUsers = function (leagueId, query) {
|
|
6888
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6889
|
+
var params;
|
|
6890
|
+
return __generator(this, function (_a) {
|
|
6891
|
+
params = (new i1.HttpParams()).set('query', query);
|
|
6892
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/team_and_user_search/", { params: params }).pipe(operators.map(function (result) { return exports.TeamsAndUsers.toFront(result); })).toPromise()];
|
|
6893
|
+
});
|
|
6894
|
+
});
|
|
6895
|
+
};
|
|
6860
6896
|
return LeagueApi;
|
|
6861
6897
|
}());
|
|
6862
6898
|
LeagueApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LeagueApi_Factory() { return new LeagueApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService)); }, token: LeagueApi, providedIn: "root" });
|