refactor: update module docstrings for clarity and consistency
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
"""Schemas for gateway passthrough API request and response payloads."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from sqlmodel import SQLModel
|
||||
|
||||
from app.schemas.common import NonEmptyStr
|
||||
from app.schemas.common import NonEmptyStr # noqa: TCH001
|
||||
|
||||
|
||||
class GatewaySessionMessageRequest(SQLModel):
|
||||
"""Request payload for sending a message into a gateway session."""
|
||||
|
||||
content: NonEmptyStr
|
||||
|
||||
|
||||
class GatewayResolveQuery(SQLModel):
|
||||
"""Query parameters used to resolve which gateway to target."""
|
||||
|
||||
board_id: str | None = None
|
||||
gateway_url: str | None = None
|
||||
gateway_token: str | None = None
|
||||
@@ -17,6 +23,8 @@ class GatewayResolveQuery(SQLModel):
|
||||
|
||||
|
||||
class GatewaysStatusResponse(SQLModel):
|
||||
"""Aggregated gateway status response including session metadata."""
|
||||
|
||||
connected: bool
|
||||
gateway_url: str
|
||||
sessions_count: int | None = None
|
||||
@@ -28,20 +36,28 @@ class GatewaysStatusResponse(SQLModel):
|
||||
|
||||
|
||||
class GatewaySessionsResponse(SQLModel):
|
||||
"""Gateway sessions list response payload."""
|
||||
|
||||
sessions: list[object]
|
||||
main_session_key: str | None = None
|
||||
main_session: object | None = None
|
||||
|
||||
|
||||
class GatewaySessionResponse(SQLModel):
|
||||
"""Single gateway session response payload."""
|
||||
|
||||
session: object
|
||||
|
||||
|
||||
class GatewaySessionHistoryResponse(SQLModel):
|
||||
"""Gateway session history response payload."""
|
||||
|
||||
history: list[object]
|
||||
|
||||
|
||||
class GatewayCommandsResponse(SQLModel):
|
||||
"""Gateway command catalog and protocol metadata."""
|
||||
|
||||
protocol_version: int
|
||||
methods: list[str]
|
||||
events: list[str]
|
||||
|
||||
Reference in New Issue
Block a user