generated from VLADIMIR/template_frontend
fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-typescript-http. DO NOT EDIT.
|
||||
/* eslint-disable camelcase */
|
||||
|
||||
// @ts-nocheck
|
||||
|
||||
export type PingReq = {
|
||||
@@ -507,8 +507,8 @@ export function createEveningDetectiveServerClient(
|
||||
handler: RequestHandler
|
||||
): EveningDetectiveServer {
|
||||
return {
|
||||
Ping(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/test/ping`; // eslint-disable-line quotes
|
||||
Ping(request) {
|
||||
const path = `api/test/ping`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -524,8 +524,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "Ping",
|
||||
}) as Promise<PingRsp>;
|
||||
},
|
||||
Echo(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/test/echo`; // eslint-disable-line quotes
|
||||
Echo(request) {
|
||||
const path = `api/test/echo`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
if (request.text) {
|
||||
@@ -544,8 +544,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "Echo",
|
||||
}) as Promise<EchoRsp>;
|
||||
},
|
||||
Signup(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/auth/signup`; // eslint-disable-line quotes
|
||||
Signup(request) {
|
||||
const path = `api/auth/signup`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -561,8 +561,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "Signup",
|
||||
}) as Promise<SignupRsp>;
|
||||
},
|
||||
RefreshPassword(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/auth/refresh-password`; // eslint-disable-line quotes
|
||||
RefreshPassword(request) {
|
||||
const path = `api/auth/refresh-password`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -578,8 +578,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "RefreshPassword",
|
||||
}) as Promise<RefreshPasswordRsp>;
|
||||
},
|
||||
Login(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/auth/login`; // eslint-disable-line quotes
|
||||
Login(request) {
|
||||
const path = `api/auth/login`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -595,8 +595,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "Login",
|
||||
}) as Promise<LoginRsp>;
|
||||
},
|
||||
Refresh(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/auth/refresh`; // eslint-disable-line quotes
|
||||
Refresh(request) {
|
||||
const path = `api/auth/refresh`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -612,8 +612,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "Refresh",
|
||||
}) as Promise<RefreshRsp>;
|
||||
},
|
||||
GetUsers(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/users`; // eslint-disable-line quotes
|
||||
GetUsers(request) {
|
||||
const path = `api/users`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -629,11 +629,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetUsers",
|
||||
}) as Promise<GetUsersRsp>;
|
||||
},
|
||||
GetUserById(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
GetUserById(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/users/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/users/${request.id}`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -649,8 +649,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetUserById",
|
||||
}) as Promise<GetUserByIdRsp>;
|
||||
},
|
||||
GetMe(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/users/me`; // eslint-disable-line quotes
|
||||
GetMe(request) {
|
||||
const path = `api/users/me`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -666,11 +666,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetMe",
|
||||
}) as Promise<GetMeRsp>;
|
||||
},
|
||||
AddUserRole(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
AddUserRole(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/users/${request.id}/role/add`; // eslint-disable-line quotes
|
||||
const path = `api/users/${request.id}/role/add`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -686,11 +686,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "AddUserRole",
|
||||
}) as Promise<AddUserRoleRsp>;
|
||||
},
|
||||
DeleteUserRole(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
DeleteUserRole(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/users/${request.id}/role/delete`; // eslint-disable-line quotes
|
||||
const path = `api/users/${request.id}/role/delete`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -706,8 +706,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "DeleteUserRole",
|
||||
}) as Promise<DeleteUserRoleRsp>;
|
||||
},
|
||||
GetPermissions(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/ui/permissions`; // eslint-disable-line quotes
|
||||
GetPermissions(request) {
|
||||
const path = `api/ui/permissions`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -723,8 +723,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetPermissions",
|
||||
}) as Promise<GetPermissionsRsp>;
|
||||
},
|
||||
UploadFile(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/files/upload`; // eslint-disable-line quotes
|
||||
UploadFile(request) {
|
||||
const path = `api/files/upload`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -740,11 +740,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "UploadFile",
|
||||
}) as Promise<UploadFileRsp>;
|
||||
},
|
||||
DownloadFile(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
DownloadFile(request) {
|
||||
if (!request.filename) {
|
||||
throw new Error("missing required field request.filename");
|
||||
}
|
||||
const path = `api/files/${request.filename}`; // eslint-disable-line quotes
|
||||
const path = `api/files/${request.filename}`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -760,8 +760,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "DownloadFile",
|
||||
}) as Promise<googleapi_HttpBody>;
|
||||
},
|
||||
AddScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/scenario`; // eslint-disable-line quotes
|
||||
AddScenario(request) {
|
||||
const path = `api/scenario`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -777,8 +777,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "AddScenario",
|
||||
}) as Promise<AddScenarioRsp>;
|
||||
},
|
||||
GetMyScenarios(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/my-scenarios`; // eslint-disable-line quotes
|
||||
GetMyScenarios(request) {
|
||||
const path = `api/my-scenarios`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -794,8 +794,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetMyScenarios",
|
||||
}) as Promise<GetMyScenariosRsp>;
|
||||
},
|
||||
GetScenariosCatalog(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/catalog`; // eslint-disable-line quotes
|
||||
GetScenariosCatalog(request) {
|
||||
const path = `api/catalog`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -811,11 +811,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetScenariosCatalog",
|
||||
}) as Promise<GetScenariosCatalogRsp>;
|
||||
},
|
||||
GetFullScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
GetFullScenario(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}/full`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}/full`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -831,11 +831,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetFullScenario",
|
||||
}) as Promise<GetScenarioRsp>;
|
||||
},
|
||||
GetScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
GetScenario(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -851,11 +851,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetScenario",
|
||||
}) as Promise<GetScenarioRsp>;
|
||||
},
|
||||
UpdateScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
UpdateScenario(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -871,11 +871,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "UpdateScenario",
|
||||
}) as Promise<UpdateScenarioRsp>;
|
||||
},
|
||||
PublicScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
PublicScenario(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}/public`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}/public`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -891,11 +891,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "PublicScenario",
|
||||
}) as Promise<PublicScenarioRsp>;
|
||||
},
|
||||
DraftScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
DraftScenario(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}/draft`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}/draft`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -911,11 +911,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "DraftScenario",
|
||||
}) as Promise<DraftScenarioRsp>;
|
||||
},
|
||||
DeleteScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
DeleteScenario(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -931,11 +931,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "DeleteScenario",
|
||||
}) as Promise<DeleteScenarioRsp>;
|
||||
},
|
||||
AddScenarioPlace(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
AddScenarioPlace(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}/places`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}/places`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -951,14 +951,14 @@ export function createEveningDetectiveServerClient(
|
||||
method: "AddScenarioPlace",
|
||||
}) as Promise<AddScenarioPlaceRsp>;
|
||||
},
|
||||
UpdateScenarioPlace(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
UpdateScenarioPlace(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
if (!request.code) {
|
||||
throw new Error("missing required field request.code");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}/places/${request.code}`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}/places/${request.code}`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -974,14 +974,14 @@ export function createEveningDetectiveServerClient(
|
||||
method: "UpdateScenarioPlace",
|
||||
}) as Promise<UpdateScenarioPlaceRsp>;
|
||||
},
|
||||
DeleteScenarioPlace(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
DeleteScenarioPlace(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
if (!request.code) {
|
||||
throw new Error("missing required field request.code");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}/places/${request.code}`; // eslint-disable-line quotes
|
||||
const path = `api/scenarios/${request.id}/places/${request.code}`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -997,8 +997,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "DeleteScenarioPlace",
|
||||
}) as Promise<DeleteScenarioPlaceRsp>;
|
||||
},
|
||||
AddGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/games`; // eslint-disable-line quotes
|
||||
AddGame(request) {
|
||||
const path = `api/games`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1014,8 +1014,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "AddGame",
|
||||
}) as Promise<AddGameRsp>;
|
||||
},
|
||||
GetGames(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/games`; // eslint-disable-line quotes
|
||||
GetGames(request) {
|
||||
const path = `api/games`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1031,11 +1031,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetGames",
|
||||
}) as Promise<GetGamesRsp>;
|
||||
},
|
||||
GetGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
GetGame(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/games/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/games/${request.id}`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1051,11 +1051,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetGame",
|
||||
}) as Promise<GetGameRsp>;
|
||||
},
|
||||
UpdateGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
UpdateGame(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/games/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/games/${request.id}`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1071,11 +1071,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "UpdateGame",
|
||||
}) as Promise<UpdateGameRsp>;
|
||||
},
|
||||
StartGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
StartGame(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/games/${request.id}/start`; // eslint-disable-line quotes
|
||||
const path = `api/games/${request.id}/start`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1091,11 +1091,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "StartGame",
|
||||
}) as Promise<StartGameRsp>;
|
||||
},
|
||||
PauseGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
PauseGame(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/games/${request.id}/pause`; // eslint-disable-line quotes
|
||||
const path = `api/games/${request.id}/pause`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1111,11 +1111,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "PauseGame",
|
||||
}) as Promise<PauseGameRsp>;
|
||||
},
|
||||
PlayGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
PlayGame(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/games/${request.id}/play`; // eslint-disable-line quotes
|
||||
const path = `api/games/${request.id}/play`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1131,11 +1131,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "PlayGame",
|
||||
}) as Promise<PlayGameRsp>;
|
||||
},
|
||||
FinishGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
FinishGame(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/games/${request.id}/finish`; // eslint-disable-line quotes
|
||||
const path = `api/games/${request.id}/finish`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1151,11 +1151,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "FinishGame",
|
||||
}) as Promise<FinishGameRsp>;
|
||||
},
|
||||
ResetGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
ResetGame(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/games/${request.id}/reset`; // eslint-disable-line quotes
|
||||
const path = `api/games/${request.id}/reset`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1171,11 +1171,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "ResetGame",
|
||||
}) as Promise<ResetGameRsp>;
|
||||
},
|
||||
DeleteGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
DeleteGame(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/games/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/games/${request.id}`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1191,8 +1191,8 @@ export function createEveningDetectiveServerClient(
|
||||
method: "DeleteGame",
|
||||
}) as Promise<DeleteGameRsp>;
|
||||
},
|
||||
AddTeam(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
const path = `api/teams`; // eslint-disable-line quotes
|
||||
AddTeam(request) {
|
||||
const path = `api/teams`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1208,11 +1208,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "AddTeam",
|
||||
}) as Promise<AddTeamRsp>;
|
||||
},
|
||||
UpdateTeam(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
UpdateTeam(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/teams/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/teams/${request.id}`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1228,11 +1228,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "UpdateTeam",
|
||||
}) as Promise<UpdateTeamRsp>;
|
||||
},
|
||||
DeleteTeam(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
DeleteTeam(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/teams/${request.id}`; // eslint-disable-line quotes
|
||||
const path = `api/teams/${request.id}`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1248,11 +1248,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "DeleteTeam",
|
||||
}) as Promise<DeleteTeamRsp>;
|
||||
},
|
||||
GiveTeamApplications(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
GiveTeamApplications(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/teams/${request.id}/applications`; // eslint-disable-line quotes
|
||||
const path = `api/teams/${request.id}/applications`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1268,11 +1268,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GiveTeamApplications",
|
||||
}) as Promise<GiveTeamApplicationsRsp>;
|
||||
},
|
||||
GetTeamStory(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
GetTeamStory(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/teams/${request.id}/story`; // eslint-disable-line quotes
|
||||
const path = `api/teams/${request.id}/story`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
if (request.password) {
|
||||
@@ -1291,11 +1291,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "GetTeamStory",
|
||||
}) as Promise<GetTeamStoryRsp>;
|
||||
},
|
||||
AddTeamAction(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
AddTeamAction(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/teams/${request.id}/actions`; // eslint-disable-line quotes
|
||||
const path = `api/teams/${request.id}/actions`;
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
@@ -1311,11 +1311,11 @@ export function createEveningDetectiveServerClient(
|
||||
method: "AddTeamAction",
|
||||
}) as Promise<AddTeamActionRsp>;
|
||||
},
|
||||
DeleteLastTeamAction(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
DeleteLastTeamAction(request) {
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/teams/${request.id}/last-actions`; // eslint-disable-line quotes
|
||||
const path = `api/teams/${request.id}/last-actions`;
|
||||
const body = null;
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import BeltBlock from './BeltBlock.vue';
|
||||
import MetalPlate from './MetalPlate.vue';
|
||||
import HeaderText from './HeaderText.vue';
|
||||
import { ref, type PropType } from 'vue';
|
||||
|
||||
import { Footsteps } from '@vicons/ionicons5'
|
||||
import { ContactMailRound } from '@vicons/material'
|
||||
import { Icon } from '@vicons/utils'
|
||||
import { type PropType,ref } from 'vue';
|
||||
|
||||
import BeltBlock from './BeltBlock.vue';
|
||||
import HeaderText from './HeaderText.vue';
|
||||
import MetalPlate from './MetalPlate.vue';
|
||||
|
||||
const code = ref('')
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import { Settings, Play, Pause, Reset, Flag } from '@vicons/carbon'
|
||||
import { getAuthClient } from '@/api/auth_client';
|
||||
import { Flag, Pause, Play, Reset, Settings } from '@vicons/carbon'
|
||||
import { Icon } from '@vicons/utils'
|
||||
import { NButton, NTag } from 'naive-ui'
|
||||
import type { Application, Game, Team } from '@/api/generated/crabs/evening_detective_server';
|
||||
import { NCard, NInput, NModal, NSpace, NFlex, NText, NQrCode } from 'naive-ui'
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import { NCard, NFlex, NInput, NModal, NQrCode, NSpace, NText } from 'naive-ui'
|
||||
import { useMessage } from 'naive-ui';
|
||||
import { ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { getAuthClient } from '@/api/auth_client';
|
||||
import type { Application, Game, Team } from '@/api/generated/crabs/evening_detective_server';
|
||||
import { getURL } from '@/api/generated/crabs/evening_detective_server/client';
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import { useSimplePolling } from '@/composables/useSimplePolling';
|
||||
|
||||
const client = getAuthClient()
|
||||
@@ -237,11 +238,11 @@ async function finishGame() {
|
||||
|
||||
function parseDateWithoutTimezone(dateStr: string): Date {
|
||||
// Разбираем ISO строку: "2024-01-01T12:30:00"
|
||||
let [datePart, timePart] = dateStr.split('T');
|
||||
const [datePart, timePart] = dateStr.split('T');
|
||||
const [year, month, day] = datePart.split('-').map(Number);
|
||||
|
||||
timePart = timePart.split('.')[0]
|
||||
const [hours, minutes, seconds] = (timePart || '00:00:00').split(':').map(Number);
|
||||
const correctTimePart = timePart.split('.')[0]
|
||||
const [hours, minutes, seconds] = (correctTimePart || '00:00:00').split(':').map(Number);
|
||||
|
||||
// Создаем дату в UTC, чтобы избежать сдвига
|
||||
return new Date(Date.UTC(year, month - 1, day, hours, minutes, seconds || 0));
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { getAuthClient } from '@/api/auth_client';
|
||||
import type { Game } from '@/api/generated/crabs/evening_detective_server';
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import { useMessage } from 'naive-ui';
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { getAuthClient } from '@/api/auth_client';
|
||||
import type { Game } from '@/api/generated/crabs/evening_detective_server';
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
|
||||
const client = getAuthClient()
|
||||
const message = useMessage()
|
||||
const router = useRouter()
|
||||
@@ -31,7 +32,7 @@ async function toGame(id: number) {
|
||||
<template>
|
||||
<div class="center-block-custom">
|
||||
<div class="width1200">
|
||||
<div v-for="game in games" class="game-block" @click="toGame(game.id!)">
|
||||
<div v-for="game in games" :key="game.id" class="game-block" @click="toGame(game.id!)">
|
||||
<div class="game-title">
|
||||
{{ game.name }}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { NAlert } from 'naive-ui'
|
||||
import { ref } from 'vue'
|
||||
import { NCard, NFlex, NInput, NModal, NSpace, NText, NUpload, NUploadDragger, NAlert, NTag } from 'naive-ui'
|
||||
|
||||
import { getAuthClient } from '@/api/auth_client'
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { Key24Regular } from '@vicons/fluent'
|
||||
import { LockOutlined } from '@vicons/material'
|
||||
import MessagePaper from './MessagePaper.vue';
|
||||
import { Icon } from '@vicons/utils'
|
||||
import { NButton, NDynamicInput, NInput, NInputGroup, NSpace, NSwitch, NText, NUpload, NUploadDragger } from 'naive-ui'
|
||||
import type { PropType } from 'vue'
|
||||
|
||||
import type { Application, Door, Key, Place } from '@/api/generated/crabs/evening_detective_server'
|
||||
|
||||
import MessagePaper from './MessagePaper.vue';
|
||||
|
||||
const props = defineProps({
|
||||
newPlaceCode: {
|
||||
type: String,
|
||||
@@ -105,7 +106,7 @@ function onCreateKey(): Key {
|
||||
</div>
|
||||
|
||||
<div v-for="door in props.place?.doors" v-bind:key="door.code" class="door-block">
|
||||
{{ door.name }} <span v-for="key in door.keys" class="key-block">
|
||||
{{ door.name }} <span v-for="key in door.keys" :key="key.name" class="key-block">
|
||||
<Icon class="lock-icon">
|
||||
<LockOutlined />
|
||||
</Icon> {{ key.name }}
|
||||
@@ -172,22 +173,22 @@ function onCreateKey(): Key {
|
||||
<div v-if="mode == 'edit'" class="place-block">
|
||||
<n-space vertical>
|
||||
<n-input-group>
|
||||
<n-input :style="{ width: '20%' }" v-model:value="props.place.code" type="text" placeholder="Ы-1" />
|
||||
<n-input :style="{ width: '80%' }" v-model:value="props.place.name" type="text" placeholder="Дом №Ы" />
|
||||
<n-input :style="{ width: '20%' }" v-model:value="props.place!.code" type="text" placeholder="Ы-1" />
|
||||
<n-input :style="{ width: '80%' }" v-model:value="props.place!.name" type="text" placeholder="Дом №Ы" />
|
||||
</n-input-group>
|
||||
<n-input v-model:value="props.place.text" type="textarea" :autosize="{ minRows: 3 }"
|
||||
<n-input v-model:value="props.place!.text" type="textarea" :autosize="{ minRows: 3 }"
|
||||
placeholder="В начале было слово..." />
|
||||
|
||||
<p class="settings-header">Картинка</p>
|
||||
<div>
|
||||
<n-space>
|
||||
<n-space vertical>
|
||||
<img :src="props.place.image" class="message-edit-image">
|
||||
<n-button @click="props.place.image = '', props.place.fileList = null">Убрать картинку</n-button>
|
||||
<img :src="props.place!.image" class="message-edit-image">
|
||||
<n-button @click="props.place!.image = '', props.place!.fileList = null">Убрать картинку</n-button>
|
||||
</n-space>
|
||||
<n-space vertical>
|
||||
<n-input v-model:value="props.place.image" type="text" placeholder="Не задано" disabled />
|
||||
<n-upload directory-dnd :max="1" v-model:file-list="props.place.fileList">
|
||||
<n-input v-model:value="props.place!.image" type="text" placeholder="Не задано" disabled />
|
||||
<n-upload directory-dnd :max="1" v-model:file-list="props.place!.fileList">
|
||||
<n-upload-dragger>
|
||||
<n-text style="font-size: 16px">
|
||||
Щелкните или перетащите файл в эту область для загрузки
|
||||
@@ -199,7 +200,7 @@ function onCreateKey(): Key {
|
||||
</div>
|
||||
|
||||
<p class="settings-header">Видимость точки</p>
|
||||
<n-switch v-model:value="props.place.hidden">
|
||||
<n-switch v-model:value="props.place!.hidden">
|
||||
<template #checked>
|
||||
Скрытая точка
|
||||
</template>
|
||||
@@ -209,7 +210,7 @@ function onCreateKey(): Key {
|
||||
</n-switch>
|
||||
|
||||
Улики
|
||||
<n-dynamic-input v-model:value="props.place.applications" :on-create="onCreateApplication">
|
||||
<n-dynamic-input v-model:value="props.place!.applications" :on-create="onCreateApplication">
|
||||
<template #create-button-default> Добавить улику </template>
|
||||
<template #default="{ value }">
|
||||
<div style="display: flex; align-items: center; width: 100%">
|
||||
@@ -219,7 +220,7 @@ function onCreateKey(): Key {
|
||||
</n-dynamic-input>
|
||||
|
||||
Действия
|
||||
<n-dynamic-input v-model:value="props.place.doors" :on-create="onCreateDoor">
|
||||
<n-dynamic-input v-model:value="props.place!.doors" :on-create="onCreateDoor">
|
||||
<template #create-button-default> Добавить действие </template>
|
||||
<template #action="{ index, create, remove }">
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
@@ -254,7 +255,7 @@ function onCreateKey(): Key {
|
||||
</n-dynamic-input>
|
||||
|
||||
Получаемые ключи
|
||||
<n-dynamic-input v-model:value="props.place.keys" :on-create="onCreateKey">
|
||||
<n-dynamic-input v-model:value="props.place!.keys" :on-create="onCreateKey">
|
||||
<template #create-button-default> Добавить ключ </template>
|
||||
<template #default="{ value: key }">
|
||||
<div style="display: flex; align-items: center; width: 100%">
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { NTag } from 'naive-ui'
|
||||
import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import { getAuthClient } from '@/api/auth_client'
|
||||
import type { Scenario } from '@/api/generated/crabs/evening_detective_server'
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { NTag } from 'naive-ui'
|
||||
|
||||
const message = useMessage()
|
||||
const client = getAuthClient()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { Settings } from '@vicons/carbon'
|
||||
import { Icon } from '@vicons/utils'
|
||||
import { NButton, type UploadFileInfo, useMessage } from 'naive-ui'
|
||||
import { NCard, NFlex, NInput, NModal, NSpace, NText, NUpload, NUploadDragger, NAlert, NTag } from 'naive-ui'
|
||||
import { NAlert, NCard, NFlex, NInput, NModal, NSpace, NTag,NText, NUpload, NUploadDragger } from 'naive-ui'
|
||||
import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { NButton, NCard, NInput, NModal, NTag, NFlex } from 'naive-ui'
|
||||
import { NButton, NCard, NFlex,NInput, NModal, NTag } from 'naive-ui'
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { getAuthClient } from '@/api/auth_client';
|
||||
import type { Game, Place, Story } from '@/api/generated/crabs/evening_detective_server';
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import { NCard, NFlex, NInput, NModal, NSpace, NText, NUpload, NUploadDragger, NAlert, NTag, NButton } from 'naive-ui'
|
||||
import { NButton, NFlex } from 'naive-ui'
|
||||
import { useMessage } from 'naive-ui';
|
||||
import { nextTick, onMounted, ref } from 'vue';
|
||||
import { nextTick, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import PlaceBlock from '@/components/PlaceBlock.vue'
|
||||
|
||||
import { getAuthClient } from '@/api/auth_client';
|
||||
import type { Game, Place } from '@/api/generated/crabs/evening_detective_server';
|
||||
import GameInputForm from '@/components/GameInputForm.vue'
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import PlaceBlock from '@/components/PlaceBlock.vue'
|
||||
import { useSimplePolling } from '@/composables/useSimplePolling';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ref, onMounted, onUnmounted } from 'vue';
|
||||
import { onMounted, onUnmounted,ref } from 'vue';
|
||||
|
||||
export function useSimplePolling(callback: () => void, interval = 5000) {
|
||||
const isActive = ref(true);
|
||||
|
||||
+4
-4
@@ -1,18 +1,18 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
import CatalogView from '../views/CatalogView.vue'
|
||||
import GamesView from '../views/GamesView.vue'
|
||||
import GameView from '../views/GameView.vue'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
import LoginView from '../views/LoginView.vue'
|
||||
import OfficeView from '../views/OfficeView.vue'
|
||||
import PrivacyPolicyView from '../views/PrivacyPolicyView.vue'
|
||||
import ScenariosEditorView from '../views/ScenariosEditorView.vue'
|
||||
import ScenariosView from '../views/ScenariosView.vue'
|
||||
import ScenarioView from '../views/ScenarioView.vue'
|
||||
import TeamStoryView from '../views/TeamStoryView.vue'
|
||||
import UserAgreementView from '../views/UserAgreementView.vue'
|
||||
import UsersView from '../views/UsersView.vue'
|
||||
import CatalogView from '../views/CatalogView.vue'
|
||||
import ScenarioView from '../views/ScenarioView.vue'
|
||||
import GameView from '../views/GameView.vue'
|
||||
import TeamStoryView from '../views/TeamStoryView.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import LoginPage from '@/components/LoginPage.vue'
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import LoginPage from '@/components/LoginPage.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user