from typing import Any, Protocol


class QResultBackendProtocol(Protocol):
    async def store_result(self, task_id: str, result: Any, status: str = "SUCCESS") -> None: ...

    async def get_result(self, task_id: str, timeout: float | None = None) -> Any: ...

    async def delete_result(self, task_id: str) -> None: ...

    async def result_exists(self, task_id: str) -> bool: ...
