from abc import ABC, abstractmethod from typing import Iterator, Dict, Any class MailIntakeAdapter(ABC): @abstractmethod def iter_message_refs(self, query: str) -> Iterator[Dict[str, str]]: ... @abstractmethod def fetch_message(self, message_id: str) -> Dict[str, Any]: ... @abstractmethod def fetch_thread(self, thread_id: str) -> Dict[str, Any]: ...