Coverage for src / lexigram / contracts / data / searchable.py: 0%
5 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-08-15 18:57 +0800
« prev ^ index » next coverage.py v7.13.5, created at 2026-08-15 18:57 +0800
1from __future__ import annotations
3from typing import TYPE_CHECKING, Any, Protocol, runtime_checkable
5if TYPE_CHECKING:
6 from lexigram.contracts.data import QueryResult
9@runtime_checkable
10class SearchableProtocol(Protocol):
11 """Protocol for searchable admin entities."""
13 async def search(
14 self,
15 query: str,
16 fields: list[str] | None = None,
17 filters: dict[str, Any] | None = None,
18 ) -> QueryResult: ...
21__all__ = ["SearchableProtocol"]