generated from VLADIMIR/template_frontend
up proto
This commit is contained in:
+27
-1
@@ -365,6 +365,17 @@ service EveningDetectiveServer {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpc UpdateScenarioIntro(UpdateScenarioIntroReq) returns (UpdateScenarioIntroRsp) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
put : "/api/scenarios/{id}/introduction"
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
tags : "Сценарии";
|
||||||
|
summary: "Обновить введение сценария";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
rpc DownloadScenarioArchive(DownloadScenarioArchiveReq) returns (google.api.HttpBody) {
|
rpc DownloadScenarioArchive(DownloadScenarioArchiveReq) returns (google.api.HttpBody) {
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
get: "/api/scenarios/{id}/archive"
|
get: "/api/scenarios/{id}/archive"
|
||||||
@@ -776,7 +787,13 @@ message Scenario {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message Story {
|
message Story {
|
||||||
repeated Place places = 1;
|
Introduction introduction = 2;
|
||||||
|
repeated Place places = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Introduction {
|
||||||
|
string text = 1;
|
||||||
|
string audio = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Place {
|
message Place {
|
||||||
@@ -868,6 +885,15 @@ message DeleteScenarioPlaceRsp {
|
|||||||
string error = 1;
|
string error = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message UpdateScenarioIntroReq {
|
||||||
|
int32 id = 1;
|
||||||
|
Introduction introduction = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateScenarioIntroRsp {
|
||||||
|
string error = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message DownloadScenarioArchiveReq {
|
message DownloadScenarioArchiveReq {
|
||||||
int32 id = 1;
|
int32 id = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,9 +203,15 @@ export type Scenario = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type Story = {
|
export type Story = {
|
||||||
|
introduction: Introduction | undefined;
|
||||||
places: Place[] | undefined;
|
places: Place[] | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type Introduction = {
|
||||||
|
text: string | undefined;
|
||||||
|
audio: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
export type Place = {
|
export type Place = {
|
||||||
code: string | undefined;
|
code: string | undefined;
|
||||||
name: string | undefined;
|
name: string | undefined;
|
||||||
@@ -312,6 +318,15 @@ export type DeleteScenarioPlaceRsp = {
|
|||||||
error: string | undefined;
|
error: string | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type UpdateScenarioIntroReq = {
|
||||||
|
id: number | undefined;
|
||||||
|
introduction: Introduction | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdateScenarioIntroRsp = {
|
||||||
|
error: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
export type DownloadScenarioArchiveReq = {
|
export type DownloadScenarioArchiveReq = {
|
||||||
id: number | undefined;
|
id: number | undefined;
|
||||||
};
|
};
|
||||||
@@ -528,6 +543,7 @@ export interface EveningDetectiveServer {
|
|||||||
AddScenarioPlace(request: AddScenarioPlaceReq): Promise<AddScenarioPlaceRsp>;
|
AddScenarioPlace(request: AddScenarioPlaceReq): Promise<AddScenarioPlaceRsp>;
|
||||||
UpdateScenarioPlace(request: UpdateScenarioPlaceReq): Promise<UpdateScenarioPlaceRsp>;
|
UpdateScenarioPlace(request: UpdateScenarioPlaceReq): Promise<UpdateScenarioPlaceRsp>;
|
||||||
DeleteScenarioPlace(request: DeleteScenarioPlaceReq): Promise<DeleteScenarioPlaceRsp>;
|
DeleteScenarioPlace(request: DeleteScenarioPlaceReq): Promise<DeleteScenarioPlaceRsp>;
|
||||||
|
UpdateScenarioIntro(request: UpdateScenarioIntroReq): Promise<UpdateScenarioIntroRsp>;
|
||||||
DownloadScenarioArchive(request: DownloadScenarioArchiveReq): Promise<googleapi_HttpBody>;
|
DownloadScenarioArchive(request: DownloadScenarioArchiveReq): Promise<googleapi_HttpBody>;
|
||||||
UploadScenarioArchive(request: googleapi_HttpBody): Promise<UploadScenarioArchiveRsp>;
|
UploadScenarioArchive(request: googleapi_HttpBody): Promise<UploadScenarioArchiveRsp>;
|
||||||
AddGame(request: AddGameReq): Promise<AddGameRsp>;
|
AddGame(request: AddGameReq): Promise<AddGameRsp>;
|
||||||
@@ -1119,6 +1135,26 @@ export function createEveningDetectiveServerClient(
|
|||||||
method: "DeleteScenarioPlace",
|
method: "DeleteScenarioPlace",
|
||||||
}) as Promise<DeleteScenarioPlaceRsp>;
|
}) 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
|
DownloadScenarioArchive(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||||
if (!request.id) {
|
if (!request.id) {
|
||||||
throw new Error("missing required field request.id");
|
throw new Error("missing required field request.id");
|
||||||
|
|||||||
Reference in New Issue
Block a user