@mtgame/core 0.0.32 → 0.0.35
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/basketball-game-api.d.ts +1 -0
- package/api/tournament-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +72 -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/basketball-game-api.js +7 -1
- package/esm2015/api/tournament-api.js +7 -1
- package/esm2015/models/league-user.js +52 -0
- package/esm5/api/basketball-game-api.js +9 -1
- package/esm5/api/tournament-api.js +9 -1
- package/esm5/models/league-user.js +61 -0
- package/fesm2015/mtgame-core.js +59 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +72 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/league-user.d.ts +27 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -14,4 +14,5 @@ export declare class BasketballGameApi {
|
|
|
14
14
|
getTeamStatistic(gameId: number): Promise<BasketballGameTeamStatistic>;
|
|
15
15
|
getUserStatistic(gameId: number): Promise<BasketballGameStatistic[]>;
|
|
16
16
|
getLogs(gameId: number): Promise<BasketballGameLog[]>;
|
|
17
|
+
downloadProtocol(gameId: number): Promise<any>;
|
|
17
18
|
}
|
package/api/tournament-api.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { TournamentStageTeam } from '../models/tournament-stage-team';
|
|
|
14
14
|
import { TournamentEvent, TournamentEventTypes } from '../models/tournament-event';
|
|
15
15
|
import { ConfigService } from '../services/config.service';
|
|
16
16
|
import { HockeyStatistic } from '../models/hockey-statistic';
|
|
17
|
+
import { LeagueUserPermissions } from '../models/league-user';
|
|
17
18
|
export interface TournamentGamesFilters {
|
|
18
19
|
tournamentStageId?: number;
|
|
19
20
|
tournamentTour?: number;
|
|
@@ -64,4 +65,5 @@ export declare class TournamentApi {
|
|
|
64
65
|
getVolleyballStatistic(filters?: StatisticFilters): Promise<VolleyballStatistic[]>;
|
|
65
66
|
getHockeyStatistic(filters?: StatisticFilters): Promise<HockeyStatistic[]>;
|
|
66
67
|
getTournamentTeamUsers(tournamentTeamId: number): Promise<TournamentTeamUser[]>;
|
|
68
|
+
myPermission(tournamentId: number): Promise<LeagueUserPermissions[]>;
|
|
67
69
|
}
|
|
@@ -2389,6 +2389,14 @@
|
|
|
2389
2389
|
});
|
|
2390
2390
|
});
|
|
2391
2391
|
};
|
|
2392
|
+
BasketballGameApi.prototype.downloadProtocol = function (gameId) {
|
|
2393
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2394
|
+
return __generator(this, function (_a) {
|
|
2395
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_basketball_game/" + gameId + "/game_protocol/", { responseType: 'blob' })
|
|
2396
|
+
.toPromise()];
|
|
2397
|
+
});
|
|
2398
|
+
});
|
|
2399
|
+
};
|
|
2392
2400
|
BasketballGameApi.ctorParameters = function () { return [
|
|
2393
2401
|
{ type: http.HttpClient },
|
|
2394
2402
|
{ type: ConfigService }
|
|
@@ -5037,6 +5045,63 @@
|
|
|
5037
5045
|
return TournamentStageTeam;
|
|
5038
5046
|
}(BaseModel));
|
|
5039
5047
|
|
|
5048
|
+
var LeagueUserRoles;
|
|
5049
|
+
(function (LeagueUserRoles) {
|
|
5050
|
+
LeagueUserRoles[LeagueUserRoles["admin"] = 1] = "admin";
|
|
5051
|
+
LeagueUserRoles[LeagueUserRoles["moderator"] = 2] = "moderator";
|
|
5052
|
+
LeagueUserRoles[LeagueUserRoles["game_manager"] = 3] = "game_manager";
|
|
5053
|
+
})(LeagueUserRoles || (LeagueUserRoles = {}));
|
|
5054
|
+
var LeagueUserPermissions;
|
|
5055
|
+
(function (LeagueUserPermissions) {
|
|
5056
|
+
LeagueUserPermissions[LeagueUserPermissions["settings"] = 1] = "settings";
|
|
5057
|
+
LeagueUserPermissions[LeagueUserPermissions["users"] = 2] = "users";
|
|
5058
|
+
LeagueUserPermissions[LeagueUserPermissions["teams"] = 3] = "teams";
|
|
5059
|
+
LeagueUserPermissions[LeagueUserPermissions["media"] = 4] = "media";
|
|
5060
|
+
LeagueUserPermissions[LeagueUserPermissions["news"] = 5] = "news";
|
|
5061
|
+
LeagueUserPermissions[LeagueUserPermissions["game_export"] = 6] = "game_export";
|
|
5062
|
+
LeagueUserPermissions[LeagueUserPermissions["schedule"] = 7] = "schedule";
|
|
5063
|
+
LeagueUserPermissions[LeagueUserPermissions["game_management"] = 8] = "game_management";
|
|
5064
|
+
})(LeagueUserPermissions || (LeagueUserPermissions = {}));
|
|
5065
|
+
var LeagueUser = /** @class */ (function (_super) {
|
|
5066
|
+
__extends(LeagueUser, _super);
|
|
5067
|
+
function LeagueUser() {
|
|
5068
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5069
|
+
}
|
|
5070
|
+
Object.defineProperty(LeagueUser.prototype, "role", {
|
|
5071
|
+
get: function () {
|
|
5072
|
+
return this._role;
|
|
5073
|
+
},
|
|
5074
|
+
set: function (value) {
|
|
5075
|
+
this._role = LeagueUserRoles[value];
|
|
5076
|
+
},
|
|
5077
|
+
enumerable: true,
|
|
5078
|
+
configurable: true
|
|
5079
|
+
});
|
|
5080
|
+
LeagueUser.toFront = function (data) { };
|
|
5081
|
+
LeagueUser.toBack = function (data) { };
|
|
5082
|
+
__decorate([
|
|
5083
|
+
ToFrontHook
|
|
5084
|
+
], LeagueUser, "toFront", null);
|
|
5085
|
+
__decorate([
|
|
5086
|
+
ToBackHook
|
|
5087
|
+
], LeagueUser, "toBack", null);
|
|
5088
|
+
LeagueUser = __decorate([
|
|
5089
|
+
ModelInstance({
|
|
5090
|
+
mappingFields: {
|
|
5091
|
+
id: 'id',
|
|
5092
|
+
user: 'user',
|
|
5093
|
+
role: 'role',
|
|
5094
|
+
permissions: 'permissions'
|
|
5095
|
+
},
|
|
5096
|
+
relation: {
|
|
5097
|
+
user: User,
|
|
5098
|
+
permissions: listField(enumField(LeagueUserPermissions))
|
|
5099
|
+
}
|
|
5100
|
+
})
|
|
5101
|
+
], LeagueUser);
|
|
5102
|
+
return LeagueUser;
|
|
5103
|
+
}(BaseModel));
|
|
5104
|
+
|
|
5040
5105
|
var TournamentApi = /** @class */ (function () {
|
|
5041
5106
|
function TournamentApi(httpClient, configService) {
|
|
5042
5107
|
this.httpClient = httpClient;
|
|
@@ -5287,6 +5352,13 @@
|
|
|
5287
5352
|
});
|
|
5288
5353
|
});
|
|
5289
5354
|
};
|
|
5355
|
+
TournamentApi.prototype.myPermission = function (tournamentId) {
|
|
5356
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5357
|
+
return __generator(this, function (_a) {
|
|
5358
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/permission/").pipe(operators.map(function (data) { return (data.permissions || []).map(function (item) { return LeagueUserPermissions[item]; }); })).toPromise()];
|
|
5359
|
+
});
|
|
5360
|
+
});
|
|
5361
|
+
};
|
|
5290
5362
|
TournamentApi.ctorParameters = function () { return [
|
|
5291
5363
|
{ type: http.HttpClient },
|
|
5292
5364
|
{ type: ConfigService }
|