from typing import Literal, NotRequired from typing_extensions import TypedDict class StartResponse(TypedDict): status: Literal["running", "starting"] message: str class StatusResponsePlayers(TypedDict): online: int max: int list: list[str] 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