This commit is contained in:
2026-10-04 13:19:25 +07:00
parent 9aa824711b
commit c04e60ffb8
5 changed files with 385 additions and 40 deletions
+110 -39
View File
@@ -685,6 +685,36 @@ service EveningDetectiveServer {
};
}
rpc GetScreenPlan(GetScreenPlanReq) returns (GetScreenPlanRsp) {
option (google.api.http) = { get: "/api/games/{gameID}/screen-plan" };
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Экраны";
summary: "Получить план экранов";
};
}
rpc SaveScreenPlan(SaveScreenPlanReq) returns (SaveScreenPlanRsp) {
option (google.api.http) = {
put: "/api/games/{gameID}/screen-plan"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Экраны";
summary: "Сохранить план экранов";
};
}
rpc SetScreenPlanStep(SetScreenPlanStepReq) returns (SetScreenPlanStepRsp) {
option (google.api.http) = {
post: "/api/games/{gameID}/screen-plan/step"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Экраны";
summary: "Перейти на шаг плана экранов";
};
}
rpc GetScreenResults(GetScreenResultsReq) returns (GetScreenResultsRsp) {
option (google.api.http) = { post: "/api/screens/results" body: "*" };
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
@@ -1045,19 +1075,19 @@ message DeleteAccountRsp {
message GetTermsReq {}
message GetTermsRsp {
string text = 1;
string text = 1;
}
message GetPrivacyReq {}
message GetPrivacyRsp {
string text = 1;
string text = 1;
}
message GetConsentReq {}
message GetConsentRsp {
string text = 1;
string text = 1;
}
message GetUsersReq {}
@@ -1080,13 +1110,13 @@ message GetUserByIDReq {
}
message GetUserByIDRsp {
User user = 1;
User user = 1;
}
message GetMeReq {}
message GetMeRsp {
User user = 1;
User user = 1;
}
message ChangeUserPasswordReq {
@@ -1139,7 +1169,7 @@ message AddScenarioReq {
}
message AddScenarioRsp {
int32 ID = 1;
int32 ID = 1;
}
message GetMyScenariosReq {}
@@ -1179,11 +1209,11 @@ message Scenario {
}
message Story {
repeated Place places = 1;
Introduction introduction = 2;
repeated Question questions = 3;
string background = 4;
Conclusion conclusion = 5; // Только в полном сценарии, игрокам не передаётся.
repeated Place places = 1;
Introduction introduction = 2;
repeated Question questions = 3;
string background = 4;
Conclusion conclusion = 5; // Только в полном сценарии, игрокам не передаётся.
}
message Conclusion {
@@ -1365,20 +1395,20 @@ message DownloadScenarioArchiveReq {
}
message UploadScenarioArchiveRsp {
int32 ID = 1;
int32 ID = 1;
}
message AddGameReq {
string name = 1;
string description = 2;
google.protobuf.Timestamp start_at = 3;
int32 scenarioID = 4;
int32 scenarioID = 4;
string format = 5;
string location = 6;
}
message AddGameRsp {
int32 ID = 1;
int32 ID = 1;
}
message GetGamesReq {}
@@ -1410,6 +1440,7 @@ enum ScreenMode {
SCREEN_MODE_CONCLUSION_DONE = 5;
SCREEN_MODE_RESULTS = 6;
SCREEN_MODE_TIMER = 7;
SCREEN_MODE_TEXT = 8;
}
enum ScreenTimerState {
@@ -1438,7 +1469,7 @@ enum ScreenCommand {
message ScreenState {
string ID = 1;
string status = 2;
optional int32 gameID = 3;
optional int32 gameID = 3;
ScreenMode mode = 4;
bool sound_enabled = 5;
string error = 6;
@@ -1455,12 +1486,13 @@ message ScreenState {
int64 timer_duration_seconds = 17;
int64 timer_remaining_seconds = 18;
ScreenTimerState timer_state = 19;
string text = 20;
}
message CreateScreenSessionReq {}
message CreateScreenSessionRsp {
string screenID = 1;
string screenID = 1;
string access_token = 2;
}
@@ -1508,7 +1540,7 @@ message SetScreenSoundRsp {
message MapItem {
string kind = 1;
int32 itemID = 2;
int32 itemID = 2;
string label = 3;
int32 x = 4;
int32 y = 5;
@@ -1563,6 +1595,45 @@ message SendScreenCommandReq {
message SendScreenCommandRsp {
}
message ScreenPlanStep {
ScreenMode mode = 1;
string text = 2;
string timer_label = 3;
int64 timer_duration_seconds = 4;
}
message ScreenPlan {
repeated ScreenPlanStep steps = 1;
int32 current_step = 2;
}
message GetScreenPlanReq {
int32 gameID = 1;
}
message GetScreenPlanRsp {
ScreenPlan plan = 1;
}
message SaveScreenPlanReq {
int32 gameID = 1;
repeated ScreenPlanStep steps = 2;
int32 current_step = 3;
}
message SaveScreenPlanRsp {
ScreenPlan plan = 1;
}
message SetScreenPlanStepReq {
int32 gameID = 1;
int32 current_step = 2;
}
message SetScreenPlanStepRsp {
ScreenPlan plan = 1;
}
message GetScreenResultsReq {
string screenID = 1;
string accessToken = 2;
@@ -1602,22 +1673,22 @@ message ParticipationRsp {
}
message Team {
int32 ID = 1;
string name = 2;
string status = 3;
string password = 4;
int32 actions_count = 5;
repeated Application applications = 6;
string captain_email = 7;
int32 participants_count = 8;
int32 ID = 1;
string name = 2;
string status = 3;
string password = 4;
int32 actions_count = 5;
repeated Application applications = 6;
string captain_email = 7;
int32 participants_count = 8;
// Статус участия: pending, confirmed или cancelled. Поле панели организатора.
string participation_status = 9;
string participation_status = 9;
// Источник решения: captain, automatic либо пустая строка до ответа.
string participation_source = 10;
// Последняя ошибка отправки; пустая строка, если ошибки нет.
string participation_email_error = 11;
// Письмо принято SMTP-сервером; не означает прочтение или доставку во входящие.
bool participation_email_sent = 12;
bool participation_email_sent = 12;
}
message GetGameReq {
@@ -1625,7 +1696,7 @@ message GetGameReq {
}
message GetGameRsp {
Game game = 1;
Game game = 1;
}
message GetGameAnswersReq {
@@ -1669,8 +1740,8 @@ message GetGameResultsRsp {
message GameReview {
int32 ID = 1;
int32 gameID = 2;
int32 teamID = 3;
int32 gameID = 2;
int32 teamID = 3;
string team_name = 4;
int32 rating = 5;
string text = 6;
@@ -1681,11 +1752,11 @@ message GameReview {
}
message CreateGameReviewReq {
int32 gameID = 1;
int32 teamID = 2;
string password = 3;
int32 rating = 4;
string text = 5;
int32 gameID = 1;
int32 teamID = 2;
string password = 3;
int32 rating = 4;
string text = 5;
int32 difficulty = 6;
}
@@ -1723,7 +1794,7 @@ message UpdateGameReq {
string name = 2;
string description = 3;
google.protobuf.Timestamp start_at = 4;
int32 scenarioID = 5;
int32 scenarioID = 5;
string format = 6;
string location = 7;
}
@@ -1774,9 +1845,9 @@ message DeleteGameRsp {
}
message AddTeamReq {
int32 gameID = 1;
string name = 2;
string captain_email = 3;
int32 gameID = 1;
string name = 2;
string captain_email = 3;
int32 participants_count = 4;
}