Updated responses and endpoint descriptions

This commit is contained in:
Malasaur 2025-12-14 15:00:42 +01:00
parent 44340f20b0
commit 17fc911290
No known key found for this signature in database
2 changed files with 169 additions and 20 deletions

View file

@ -5,6 +5,7 @@ from typing_extensions import TypedDict
class StartResponse(TypedDict):
status: Literal["running", "started"]
message: str
class StatusResponsePlayers(TypedDict):
@ -15,13 +16,39 @@ class StatusResponsePlayers(TypedDict):
class StatusResponse(TypedDict):
status: Literal["online", "offline", "crashed", "maintainance", "starting"]
message: str
reason: NotRequired[str]
motd: NotRequired[str]
icon: NotRequired[str | None]
players: NotRequired[StatusResponsePlayers]
class StopResponse(TypedDict):
status: Literal["stopping"]
message: str
class RestartResponse(TypedDict):
status: Literal["restarting"]
message: str
class MaintainanceResponse(TypedDict):
status: Literal["stopping"]
message: str
class CommandResponse(TypedDict):
status: Literal["executed"]
message: str
output: str
class Responses:
StartResponse = StartResponse
StatusResponsePlayers = StatusResponsePlayers
StatusResponse = StatusResponse
StopResponse = StopResponse
RestartResponse = RestartResponse
MaintainanceResponse = MaintainanceResponse
CommandResponse = CommandResponse