59 lines
1.5 KiB
Plaintext
59 lines
1.5 KiB
Plaintext
// lobby contains FlatBuffers payloads used by the authenticated gateway
|
|
// boundary for Game Lobby. The wire shapes here mirror the trusted
|
|
// internal lobby REST surface; gateway derives the calling `user_id`
|
|
// from the verified session and forwards it as `X-User-Id` to lobby.
|
|
namespace lobby;
|
|
|
|
// GameSummary stores one game record returned by `lobby.my.games.list`.
|
|
// The shape matches `lobby/openapi.yaml` `MyGameSummary`.
|
|
table GameSummary {
|
|
game_id:string;
|
|
game_name:string;
|
|
game_type:string;
|
|
status:string;
|
|
owner_user_id:string;
|
|
min_players:int32;
|
|
max_players:int32;
|
|
enrollment_ends_at_ms:int64;
|
|
created_at_ms:int64;
|
|
updated_at_ms:int64;
|
|
}
|
|
|
|
// MyGamesListRequest stores the authenticated read request for the
|
|
// caller's games. Empty body — gateway derives identity from the
|
|
// authenticated session.
|
|
table MyGamesListRequest {
|
|
}
|
|
|
|
// MyGamesListResponse stores the list of games the caller participates
|
|
// in.
|
|
table MyGamesListResponse {
|
|
items:[GameSummary];
|
|
}
|
|
|
|
// OpenEnrollmentRequest stores the owner-only command that transitions
|
|
// a game from `draft` to `enrollment_open`.
|
|
table OpenEnrollmentRequest {
|
|
game_id:string;
|
|
}
|
|
|
|
// OpenEnrollmentResponse stores the resulting game status.
|
|
table OpenEnrollmentResponse {
|
|
game_id:string;
|
|
status:string;
|
|
}
|
|
|
|
// ErrorBody stores the canonical lobby error envelope code/message
|
|
// pair.
|
|
table ErrorBody {
|
|
code:string;
|
|
message:string;
|
|
}
|
|
|
|
// ErrorResponse wraps ErrorBody for the FlatBuffers payload boundary.
|
|
table ErrorResponse {
|
|
error:ErrorBody;
|
|
}
|
|
|
|
root_type MyGamesListResponse;
|