using doc forge
This commit is contained in:
4
mail_intake/adapters/__init__.pyi
Normal file
4
mail_intake/adapters/__init__.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from .base import MailIntakeAdapter
|
||||
from .gmail import MailIntakeGmailAdapter
|
||||
|
||||
__all__ = ["MailIntakeAdapter", "MailIntakeGmailAdapter"]
|
||||
10
mail_intake/adapters/base.pyi
Normal file
10
mail_intake/adapters/base.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
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]: ...
|
||||
11
mail_intake/adapters/gmail.pyi
Normal file
11
mail_intake/adapters/gmail.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Iterator, Dict, Any
|
||||
from mail_intake.adapters.base import MailIntakeAdapter
|
||||
from mail_intake.auth.base import MailIntakeAuthProvider
|
||||
|
||||
class MailIntakeGmailAdapter(MailIntakeAdapter):
|
||||
def __init__(self, auth_provider: MailIntakeAuthProvider, user_id: str = ...) -> None: ...
|
||||
@property
|
||||
def service(self) -> Any: ...
|
||||
def iter_message_refs(self, query: str) -> Iterator[Dict[str, str]]: ...
|
||||
def fetch_message(self, message_id: str) -> Dict[str, Any]: ...
|
||||
def fetch_thread(self, thread_id: str) -> Dict[str, Any]: ...
|
||||
Reference in New Issue
Block a user