update api

This commit is contained in:
2026-07-27 22:01:26 +07:00
parent 6fc19833d3
commit 73c55afb4c
+116
View File
@@ -375,6 +375,70 @@ service EveningDetectiveServer {
summary: "Удалить игру";
};
}
rpc AddTeam(AddTeamReq) returns (AddTeamRsp) {
option (google.api.http) = {
post: "/api/teams",
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Команда";
summary: "Создать команду";
};
}
rpc UpdateTeam(UpdateTeamReq) returns (UpdateTeamRsp) {
option (google.api.http) = {
put : "/api/teams/{id}",
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Команда";
summary: "Обновить команду";
};
}
rpc DeleteTeam(DeleteTeamReq) returns (DeleteTeamRsp) {
option (google.api.http) = {
delete: "/api/teams/{id}"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Команда";
summary: "Удалить команду";
};
}
rpc GiveTeamApplications(GiveTeamApplicationsReq) returns (GiveTeamApplicationsRsp) {
option (google.api.http) = {
post: "/api/teams/{id}/applications",
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Команда";
summary: "Выдать улику";
};
}
rpc GetTeamActions(GetTeamActionsReq) returns (GetTeamActionsRsp) {
option (google.api.http) = {
get: "/api/teams/{id}/actions"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Ходы";
summary: "Получить ходы";
};
}
rpc AddTeamAction(AddTeamActionReq) returns (AddTeamActionRsp) {
option (google.api.http) = {
post: "/api/teams/{id}/actions",
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Ходы";
summary: "Сделать ход";
};
}
}
message PingReq {}
@@ -698,3 +762,55 @@ message DeleteGameReq {
message DeleteGameRsp {
string error = 1;
}
message AddTeamReq {
int32 id = 1;
string name = 2;
}
message AddTeamRsp {
string error = 1;
}
message UpdateTeamReq {
string name = 1;
}
message UpdateTeamRsp {
string error = 1;
}
message DeleteTeamReq {
int64 id = 1;
}
message DeleteTeamRsp {
string error = 1;
}
message GiveTeamApplicationsReq {
int64 id = 1;
string name = 2;
}
message GiveTeamApplicationsRsp {
string error = 1;
}
message GetTeamActionsReq {
int64 id = 1;
}
message GetTeamActionsRsp {
string error = 1;
repeated Place places = 2;
}
message AddTeamActionReq {
int64 id = 1;
string code = 2;
}
message AddTeamActionRsp {
string error = 1;
}