@mtgame/core 0.1.108 → 0.1.110
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 +41 -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 +28 -0
- package/fesm2015/mtgame-core.js +34 -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,34 @@
|
|
|
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: 'league_players',
|
|
6742
|
+
},
|
|
6743
|
+
relation: {
|
|
6744
|
+
teams: listField(exports.Team),
|
|
6745
|
+
leaguePlayers: listField(exports.LeaguePlayer),
|
|
6746
|
+
}
|
|
6747
|
+
})
|
|
6748
|
+
], exports.TeamsAndUsers);
|
|
6749
|
+
|
|
6722
6750
|
var LeagueApi = /** @class */ (function () {
|
|
6723
6751
|
function LeagueApi(httpClient, configService) {
|
|
6724
6752
|
this.httpClient = httpClient;
|
|
@@ -6810,7 +6838,10 @@
|
|
|
6810
6838
|
.set('size', size.toString())
|
|
6811
6839
|
.set('not_closed', notClosed ? '1' : '')
|
|
6812
6840
|
.set('include', include ? include.join(',') : '');
|
|
6813
|
-
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournament_seasons/", {
|
|
6841
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournament_seasons/", {
|
|
6842
|
+
params: params,
|
|
6843
|
+
observe: 'response'
|
|
6844
|
+
})
|
|
6814
6845
|
.pipe(operators.map(function (result) { return ({
|
|
6815
6846
|
total: +result.headers.get('X-Page-Count'),
|
|
6816
6847
|
data: exports.TournamentSeason.toFront(result.body)
|
|
@@ -6857,6 +6888,15 @@
|
|
|
6857
6888
|
});
|
|
6858
6889
|
});
|
|
6859
6890
|
};
|
|
6891
|
+
LeagueApi.prototype.searchTeamsAndUsers = function (leagueId, query) {
|
|
6892
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6893
|
+
var params;
|
|
6894
|
+
return __generator(this, function (_a) {
|
|
6895
|
+
params = (new i1.HttpParams()).set('query', query);
|
|
6896
|
+
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()];
|
|
6897
|
+
});
|
|
6898
|
+
});
|
|
6899
|
+
};
|
|
6860
6900
|
return LeagueApi;
|
|
6861
6901
|
}());
|
|
6862
6902
|
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" });
|