@mtgame/core 0.1.93 → 0.1.95
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/tournament-join-api.d.ts +7 -0
- package/bundles/mtgame-core.umd.js +29 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/tournament-join-api.js +21 -1
- package/esm2015/models/sport.js +5 -1
- package/esm2015/models/tournament-disqualification.js +2 -1
- package/fesm2015/mtgame-core.js +26 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/sport.d.ts +3 -1
- package/models/tournament-disqualification.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,11 @@ import { TeamUser } from '../models/team-user';
|
|
|
4
4
|
import { TournamentTeamUserInvite } from '../models/tournament-team-user-invite';
|
|
5
5
|
import { TournamentInvite } from '../models/tournament-invite';
|
|
6
6
|
import { ConfigService } from '../services/config.service';
|
|
7
|
+
export declare enum TournamentJoin1x1Status {
|
|
8
|
+
not_sent = 1,
|
|
9
|
+
invite_sent = 2,
|
|
10
|
+
in_tournament = 3
|
|
11
|
+
}
|
|
7
12
|
export declare class TournamentJoinApi {
|
|
8
13
|
private httpClient;
|
|
9
14
|
private configService;
|
|
@@ -11,4 +16,6 @@ export declare class TournamentJoinApi {
|
|
|
11
16
|
getTeamsForJoin(tournamentId: number): Promise<TournamentJoinTeam[]>;
|
|
12
17
|
getTeamUsers(teamId: number): Promise<TeamUser[]>;
|
|
13
18
|
joinTournament(tournamentId: number, teamId: number, invites: TournamentTeamUserInvite[]): Promise<TournamentInvite>;
|
|
19
|
+
join1x1Tournament(tournamentId: number): Promise<TournamentInvite>;
|
|
20
|
+
join1x1TournamentStatus(tournamentId: number): Promise<TournamentJoin1x1Status>;
|
|
14
21
|
}
|
|
@@ -776,6 +776,7 @@
|
|
|
776
776
|
SportTypes[SportTypes["rugby"] = 15] = "rugby";
|
|
777
777
|
SportTypes[SportTypes["rugby7"] = 16] = "rugby7";
|
|
778
778
|
SportTypes[SportTypes["rugby15"] = 17] = "rugby15";
|
|
779
|
+
SportTypes[SportTypes["basketball_1x1"] = 18] = "basketball_1x1";
|
|
779
780
|
})(exports.SportTypes || (exports.SportTypes = {}));
|
|
780
781
|
exports.Sport = /** @class */ (function (_super) {
|
|
781
782
|
__extends(Sport, _super);
|
|
@@ -791,6 +792,9 @@
|
|
|
791
792
|
Sport.prototype.isStreetball = function () {
|
|
792
793
|
return this.id === exports.SportTypes.streetball;
|
|
793
794
|
};
|
|
795
|
+
Sport.prototype.isBasketball1x1 = function () {
|
|
796
|
+
return this.id === exports.SportTypes.basketball_1x1;
|
|
797
|
+
};
|
|
794
798
|
Sport.prototype.isVolleyball = function () {
|
|
795
799
|
return this.id === exports.SportTypes.volleyball || this.parentId === exports.SportTypes.volleyball;
|
|
796
800
|
};
|
|
@@ -2858,6 +2862,7 @@
|
|
|
2858
2862
|
date_from: 'dateFrom',
|
|
2859
2863
|
date_to: 'dateTo',
|
|
2860
2864
|
matches_count: 'matchesCount',
|
|
2865
|
+
reason: 'reason',
|
|
2861
2866
|
},
|
|
2862
2867
|
relation: {
|
|
2863
2868
|
dateFrom: DateField,
|
|
@@ -8812,6 +8817,12 @@
|
|
|
8812
8817
|
})
|
|
8813
8818
|
], exports.TournamentJoinTeam);
|
|
8814
8819
|
|
|
8820
|
+
exports.TournamentJoin1x1Status = void 0;
|
|
8821
|
+
(function (TournamentJoin1x1Status) {
|
|
8822
|
+
TournamentJoin1x1Status[TournamentJoin1x1Status["not_sent"] = 1] = "not_sent";
|
|
8823
|
+
TournamentJoin1x1Status[TournamentJoin1x1Status["invite_sent"] = 2] = "invite_sent";
|
|
8824
|
+
TournamentJoin1x1Status[TournamentJoin1x1Status["in_tournament"] = 3] = "in_tournament";
|
|
8825
|
+
})(exports.TournamentJoin1x1Status || (exports.TournamentJoin1x1Status = {}));
|
|
8815
8826
|
var TournamentJoinApi = /** @class */ (function () {
|
|
8816
8827
|
function TournamentJoinApi(httpClient, configService) {
|
|
8817
8828
|
this.httpClient = httpClient;
|
|
@@ -8847,6 +8858,24 @@
|
|
|
8847
8858
|
});
|
|
8848
8859
|
});
|
|
8849
8860
|
};
|
|
8861
|
+
TournamentJoinApi.prototype.join1x1Tournament = function (tournamentId) {
|
|
8862
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8863
|
+
return __generator(this, function (_a) {
|
|
8864
|
+
return [2 /*return*/, this.httpClient.post(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/join_1x1/", {})
|
|
8865
|
+
.pipe(operators.map(function (data) { return exports.TournamentInvite.toFront(data); }))
|
|
8866
|
+
.toPromise()];
|
|
8867
|
+
});
|
|
8868
|
+
});
|
|
8869
|
+
};
|
|
8870
|
+
TournamentJoinApi.prototype.join1x1TournamentStatus = function (tournamentId) {
|
|
8871
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8872
|
+
return __generator(this, function (_a) {
|
|
8873
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/join_1x1_status/")
|
|
8874
|
+
.pipe(operators.map(function (data) { return exports.TournamentJoin1x1Status[data.status]; }))
|
|
8875
|
+
.toPromise()];
|
|
8876
|
+
});
|
|
8877
|
+
});
|
|
8878
|
+
};
|
|
8850
8879
|
return TournamentJoinApi;
|
|
8851
8880
|
}());
|
|
8852
8881
|
TournamentJoinApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TournamentJoinApi_Factory() { return new TournamentJoinApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService)); }, token: TournamentJoinApi, providedIn: "root" });
|