"""Protocol клиента CRM — позволяет подменять реализацию в тестах (`StubCrmClient`).""" from __future__ import annotations from typing import Protocol from app.schemas.orders import OrderOut class CrmError(Exception): """CRM ответила `status: ERROR` (см. поле `errors` в ответе API).""" class CrmClient(Protocol): async def get_orders(self, *, status: str) -> list[OrderOut]: ... async def set_status(self, *, order_id: str, status: str) -> None: ...