generated from VLADIMIR/template_frontend
up proto
This commit is contained in:
@@ -203,9 +203,15 @@ export type Scenario = {
|
||||
};
|
||||
|
||||
export type Story = {
|
||||
introduction: Introduction | undefined;
|
||||
places: Place[] | undefined;
|
||||
};
|
||||
|
||||
export type Introduction = {
|
||||
text: string | undefined;
|
||||
audio: string | undefined;
|
||||
};
|
||||
|
||||
export type Place = {
|
||||
code: string | undefined;
|
||||
name: string | undefined;
|
||||
@@ -312,6 +318,15 @@ export type DeleteScenarioPlaceRsp = {
|
||||
error: string | undefined;
|
||||
};
|
||||
|
||||
export type UpdateScenarioIntroReq = {
|
||||
id: number | undefined;
|
||||
introduction: Introduction | undefined;
|
||||
};
|
||||
|
||||
export type UpdateScenarioIntroRsp = {
|
||||
error: string | undefined;
|
||||
};
|
||||
|
||||
export type DownloadScenarioArchiveReq = {
|
||||
id: number | undefined;
|
||||
};
|
||||
@@ -528,6 +543,7 @@ export interface EveningDetectiveServer {
|
||||
AddScenarioPlace(request: AddScenarioPlaceReq): Promise<AddScenarioPlaceRsp>;
|
||||
UpdateScenarioPlace(request: UpdateScenarioPlaceReq): Promise<UpdateScenarioPlaceRsp>;
|
||||
DeleteScenarioPlace(request: DeleteScenarioPlaceReq): Promise<DeleteScenarioPlaceRsp>;
|
||||
UpdateScenarioIntro(request: UpdateScenarioIntroReq): Promise<UpdateScenarioIntroRsp>;
|
||||
DownloadScenarioArchive(request: DownloadScenarioArchiveReq): Promise<googleapi_HttpBody>;
|
||||
UploadScenarioArchive(request: googleapi_HttpBody): Promise<UploadScenarioArchiveRsp>;
|
||||
AddGame(request: AddGameReq): Promise<AddGameRsp>;
|
||||
@@ -1119,6 +1135,26 @@ export function createEveningDetectiveServerClient(
|
||||
method: "DeleteScenarioPlace",
|
||||
}) as Promise<DeleteScenarioPlaceRsp>;
|
||||
},
|
||||
UpdateScenarioIntro(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}/introduction`; // eslint-disable-line quotes
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
if (queryParams.length > 0) {
|
||||
uri += `?${queryParams.join("&")}`
|
||||
}
|
||||
return handler({
|
||||
path: uri,
|
||||
method: "PUT",
|
||||
body,
|
||||
}, {
|
||||
service: "EveningDetectiveServer",
|
||||
method: "UpdateScenarioIntro",
|
||||
}) as Promise<UpdateScenarioIntroRsp>;
|
||||
},
|
||||
DownloadScenarioArchive(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
|
||||
Reference in New Issue
Block a user