| 12345678910111213141516171819202122 |
- from typing import Any, Protocol, runtime_checkable
- from .types import DayInfo, Reservation
- @runtime_checkable
- class ServiceClient(Protocol):
- async def get_calendar(self, date_from: str, date_to: str) -> dict[str, DayInfo]: ...
- async def get_reservations(self, date_from: str, date_to: str) -> list[Reservation]: ...
- async def set_price(self, d: str, price: int) -> None: ...
- async def set_availability(self, d: str, available: bool) -> None: ...
- async def probe(self) -> None:
- """Liveness check used by the health monitor. Raises ServiceAuthError on failure."""
- ...
- @runtime_checkable
- class ChatClient(ServiceClient, Protocol):
- # chat_id maps to each platform's native thread/conversation identifier
- async def get_thread(self, chat_id: str) -> Any: ...
- async def send_message(self, chat_id: str, body: str) -> None: ...
- def send_ready(self) -> bool: ...
|