updated docs strings and added README.md
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"module": "mail_intake.adapters.gmail",
|
||||
"content": {
|
||||
"path": "mail_intake.adapters.gmail",
|
||||
"docstring": "Gmail adapter implementation for Mail Intake.\n\n---\n\n## Summary\n\nThis module provides a **Gmail-specific implementation** of the\n`MailIntakeAdapter` contract.\n\nIt is the only place in the codebase where:\n- `googleapiclient` is imported\n- Gmail REST API semantics are known\n- Low-level `.execute()` calls are made\n\nAll Gmail-specific behavior must be strictly contained within this module.",
|
||||
"docstring": "# Summary\n\nGmail adapter implementation for Mail Intake.\n\nThis module provides a **Gmail-specific implementation** of the\n`MailIntakeAdapter` contract.\n\nIt is the only place in the codebase where:\n\n- `googleapiclient` is imported.\n- Gmail REST API semantics are known.\n- Low-level `.execute()` calls are made.\n\nAll Gmail-specific behavior must be strictly contained within this module.",
|
||||
"objects": {
|
||||
"Iterator": {
|
||||
"name": "Iterator",
|
||||
@@ -44,14 +44,14 @@
|
||||
"kind": "class",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeAdapter",
|
||||
"signature": "<bound method Alias.signature of Alias('MailIntakeAdapter', 'mail_intake.adapters.base.MailIntakeAdapter')>",
|
||||
"docstring": "Base adapter interface for mail providers.\n\nNotes:\n **Guarantees:**\n\n - discover messages matching a query\n - retrieve full message payloads\n - retrieve full thread payloads\n\n **Lifecycle:**\n\n - adapters are intentionally read-only and must not mutate provider state",
|
||||
"docstring": "Base adapter interface for mail providers.\n\nNotes:\n **Guarantees:**\n\n - Discover messages matching a query.\n - Retrieve full message payloads.\n - Retrieve full thread payloads.\n\n **Lifecycle:**\n\n - Adapters are intentionally read-only and must not mutate provider state.",
|
||||
"members": {
|
||||
"iter_message_refs": {
|
||||
"name": "iter_message_refs",
|
||||
"kind": "function",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeAdapter.iter_message_refs",
|
||||
"signature": "<bound method Alias.signature of Alias('iter_message_refs', 'mail_intake.adapters.base.MailIntakeAdapter.iter_message_refs')>",
|
||||
"docstring": "Iterate over lightweight message references matching a query.\n\nArgs:\n query (str):\n Provider-specific query string used to filter messages.\n\nYields:\n Dict[str, str]:\n Dictionaries containing message and thread identifiers.\n\nNotes:\n **Guarantees:**\n\n - Implementations must yield dictionaries containing at least ``message_id`` and ``thread_id``\n\nExample:\n Typical yield:\n\n {\n \"message_id\": \"...\",\n \"thread_id\": \"...\"\n }"
|
||||
"docstring": "Iterate over lightweight message references matching a query.\n\nArgs:\n query (str):\n Provider-specific query string used to filter messages.\n\nYields:\n Dict[str, str]:\n Dictionaries containing message and thread identifiers.\n\nNotes:\n **Guarantees:**\n\n - Implementations must yield dictionaries containing at least\n `message_id` and `thread_id`.\n\nExample:\n Typical yield:\n\n ```python\n {\n \"message_id\": \"...\",\n \"thread_id\": \"...\"\n }\n ```"
|
||||
},
|
||||
"fetch_message": {
|
||||
"name": "fetch_message",
|
||||
@@ -74,21 +74,21 @@
|
||||
"kind": "class",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeAdapterError",
|
||||
"signature": "<bound method Alias.signature of Alias('MailIntakeAdapterError', 'mail_intake.exceptions.MailIntakeAdapterError')>",
|
||||
"docstring": "Errors raised by mail provider adapters.\n\nNotes:\n **Lifecycle:**\n\n - Raised when a provider adapter encounters API errors, transport failures, or invalid provider responses"
|
||||
"docstring": "Errors raised by mail provider adapters.\n\nNotes:\n **Lifecycle:**\n\n - Raised when a provider adapter encounters API errors, transport\n failures, or invalid provider responses."
|
||||
},
|
||||
"MailIntakeAuthProvider": {
|
||||
"name": "MailIntakeAuthProvider",
|
||||
"kind": "class",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeAuthProvider",
|
||||
"signature": "<bound method Alias.signature of Alias('MailIntakeAuthProvider', 'mail_intake.auth.base.MailIntakeAuthProvider')>",
|
||||
"docstring": "Abstract base class for authentication providers.\n\nThis interface enforces a strict contract between authentication\nproviders and mail adapters by requiring providers to explicitly\ndeclare the type of credentials they return.\n\nNotes:\n **Responsibilities:**\n\n - Acquire credentials from an external provider\n - Refresh or revalidate credentials as needed\n - Handle authentication-specific failure modes\n - Coordinate with credential persistence layers where applicable\n\n **Constraints:**\n \n - Mail adapters must treat returned credentials as opaque and provider-specific\n - Mail adapters rely only on the declared credential type expected by the adapter",
|
||||
"docstring": "Abstract base class for authentication providers.\n\nThis interface enforces a strict contract between authentication\nproviders and mail adapters by requiring providers to explicitly\ndeclare the type of credentials they return.\n\nNotes:\n **Responsibilities:**\n\n - Acquire credentials from an external provider.\n - Refresh or revalidate credentials as needed.\n - Handle authentication-specific failure modes.\n - Coordinate with credential persistence layers where applicable.\n\n **Constraints:**\n\n - Mail adapters must treat returned credentials as opaque and\n provider-specific.\n - Mail adapters rely only on the declared credential type expected\n by the adapter.",
|
||||
"members": {
|
||||
"get_credentials": {
|
||||
"name": "get_credentials",
|
||||
"kind": "function",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeAuthProvider.get_credentials",
|
||||
"signature": "<bound method Alias.signature of Alias('get_credentials', 'mail_intake.auth.base.MailIntakeAuthProvider.get_credentials')>",
|
||||
"docstring": "Retrieve valid, provider-specific credentials.\n\nReturns:\n T:\n Credentials of type ``T`` suitable for immediate use by the\n corresponding mail adapter.\n\nRaises:\n Exception:\n An authentication-specific exception indicating that\n credentials could not be obtained or validated.\n\nNotes:\n **Guarantees:**\n\n - This method is synchronous by design\n - Represents the sole entry point through which adapters obtain authentication material\n - Implementations must either return credentials of the declared type ``T`` that are valid at the time of return or raise an exception"
|
||||
"docstring": "Retrieve valid, provider-specific credentials.\n\nReturns:\n T:\n Credentials of type `T` suitable for immediate use by the\n corresponding mail adapter.\n\nRaises:\n Exception:\n An authentication-specific exception indicating that\n credentials could not be obtained or validated.\n\nNotes:\n **Guarantees:**\n\n - This method is synchronous by design.\n - Represents the sole entry point through which adapters obtain\n authentication material.\n - Implementations must either return credentials of the declared\n type `T` that are valid at the time of return or raise an exception."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -96,8 +96,8 @@
|
||||
"name": "MailIntakeGmailAdapter",
|
||||
"kind": "class",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeGmailAdapter",
|
||||
"signature": "<bound method Class.signature of Class('MailIntakeGmailAdapter', 29, 190)>",
|
||||
"docstring": "Gmail read-only adapter.\n\nThis adapter implements the `MailIntakeAdapter` interface using the\nGmail REST API. It translates the generic mail intake contract into\nGmail-specific API calls.\n\nNotes:\n **Responsibilities:**\n\n - This class is the ONLY place where googleapiclient is imported\n - Gmail REST semantics are known\n - .execute() is called\n\n **Constraints:**\n \n - Must remain thin and imperative\n - Must not perform parsing or interpretation\n - Must not expose Gmail-specific types beyond this class",
|
||||
"signature": "<bound method Class.signature of Class('MailIntakeGmailAdapter', 28, 189)>",
|
||||
"docstring": "Gmail read-only adapter.\n\nThis adapter implements the `MailIntakeAdapter` interface using the\nGmail REST API. It translates the generic mail intake contract into\nGmail-specific API calls.\n\nNotes:\n **Responsibilities:**\n\n - This class is the ONLY place where `googleapiclient` is imported.\n - Gmail REST semantics are known.\n - `.execute()` is called.\n\n **Constraints:**\n\n - Must remain thin and imperative.\n - Must not perform parsing or interpretation.\n - Must not expose Gmail-specific types beyond this class.",
|
||||
"members": {
|
||||
"service": {
|
||||
"name": "service",
|
||||
@@ -110,21 +110,21 @@
|
||||
"name": "iter_message_refs",
|
||||
"kind": "function",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeGmailAdapter.iter_message_refs",
|
||||
"signature": "<bound method Function.signature of Function('iter_message_refs', 93, 134)>",
|
||||
"signature": "<bound method Function.signature of Function('iter_message_refs', 92, 133)>",
|
||||
"docstring": "Iterate over message references matching the query.\n\nArgs:\n query (str):\n Gmail search query string.\n\nYields:\n Dict[str, str]:\n Dictionaries containing ``message_id`` and ``thread_id``.\n\nRaises:\n MailIntakeAdapterError:\n If the Gmail API returns an error."
|
||||
},
|
||||
"fetch_message": {
|
||||
"name": "fetch_message",
|
||||
"kind": "function",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeGmailAdapter.fetch_message",
|
||||
"signature": "<bound method Function.signature of Function('fetch_message', 136, 162)>",
|
||||
"signature": "<bound method Function.signature of Function('fetch_message', 135, 161)>",
|
||||
"docstring": "Fetch a full Gmail message by message ID.\n\nArgs:\n message_id (str):\n Gmail message identifier.\n\nReturns:\n Dict[str, Any]:\n Provider-native Gmail message payload.\n\nRaises:\n MailIntakeAdapterError:\n If the Gmail API returns an error."
|
||||
},
|
||||
"fetch_thread": {
|
||||
"name": "fetch_thread",
|
||||
"kind": "function",
|
||||
"path": "mail_intake.adapters.gmail.MailIntakeGmailAdapter.fetch_thread",
|
||||
"signature": "<bound method Function.signature of Function('fetch_thread', 164, 190)>",
|
||||
"signature": "<bound method Function.signature of Function('fetch_thread', 163, 189)>",
|
||||
"docstring": "Fetch a full Gmail thread by thread ID.\n\nArgs:\n thread_id (str):\n Gmail thread identifier.\n\nReturns:\n Dict[str, Any]:\n Provider-native Gmail thread payload.\n\nRaises:\n MailIntakeAdapterError:\n If the Gmail API returns an error."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user