{ "module": "mail_intake.models.thread", "content": { "path": "mail_intake.models.thread", "docstring": "Thread domain models for Mail Intake.\n\nThis module defines the **canonical, provider-agnostic representation**\nof an email thread as used internally by the Mail Intake ingestion pipeline.\n\nThreads group related messages and serve as the primary unit of reasoning\nfor higher-level correspondence workflows.", "objects": { "dataclass": { "name": "dataclass", "kind": "alias", "path": "mail_intake.models.thread.dataclass", "signature": "", "docstring": null }, "field": { "name": "field", "kind": "alias", "path": "mail_intake.models.thread.field", "signature": "", "docstring": null }, "datetime": { "name": "datetime", "kind": "alias", "path": "mail_intake.models.thread.datetime", "signature": "", "docstring": null }, "List": { "name": "List", "kind": "alias", "path": "mail_intake.models.thread.List", "signature": "", "docstring": null }, "Set": { "name": "Set", "kind": "alias", "path": "mail_intake.models.thread.Set", "signature": "", "docstring": null }, "MailIntakeMessage": { "name": "MailIntakeMessage", "kind": "class", "path": "mail_intake.models.thread.MailIntakeMessage", "signature": "", "docstring": "Canonical internal representation of a single email message.\n\nThis model represents a fully parsed and normalized email message.\nIt is intentionally provider-agnostic and suitable for persistence,\nindexing, and downstream processing.\n\nNo provider-specific identifiers, payloads, or API semantics\nshould appear in this model.", "members": { "message_id": { "name": "message_id", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.message_id", "signature": "", "docstring": "Provider-specific message identifier." }, "thread_id": { "name": "thread_id", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.thread_id", "signature": "", "docstring": "Provider-specific thread identifier to which this message belongs." }, "timestamp": { "name": "timestamp", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.timestamp", "signature": "", "docstring": "Message timestamp as a timezone-naive UTC datetime." }, "from_email": { "name": "from_email", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.from_email", "signature": "", "docstring": "Sender email address." }, "from_name": { "name": "from_name", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.from_name", "signature": "", "docstring": "Optional human-readable sender name." }, "subject": { "name": "subject", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.subject", "signature": "", "docstring": "Raw subject line of the message." }, "body_text": { "name": "body_text", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.body_text", "signature": "", "docstring": "Extracted plain-text body content of the message." }, "snippet": { "name": "snippet", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.snippet", "signature": "", "docstring": "Short provider-supplied preview snippet of the message." }, "raw_headers": { "name": "raw_headers", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeMessage.raw_headers", "signature": "", "docstring": "Normalized mapping of message headers (header name → value)." } } }, "MailIntakeThread": { "name": "MailIntakeThread", "kind": "class", "path": "mail_intake.models.thread.MailIntakeThread", "signature": "", "docstring": "Canonical internal representation of an email thread.\n\nA thread groups multiple related messages under a single subject\nand participant set. It is designed to support reasoning over\nconversational context such as job applications, interviews,\nfollow-ups, and ongoing discussions.\n\nThis model is provider-agnostic and safe to persist.", "members": { "thread_id": { "name": "thread_id", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeThread.thread_id", "signature": null, "docstring": "Provider-specific thread identifier." }, "normalized_subject": { "name": "normalized_subject", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeThread.normalized_subject", "signature": null, "docstring": "Normalized subject line used to group related messages." }, "participants": { "name": "participants", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeThread.participants", "signature": null, "docstring": "Set of unique participant email addresses observed in the thread." }, "messages": { "name": "messages", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeThread.messages", "signature": null, "docstring": "Ordered list of messages belonging to this thread." }, "last_activity_at": { "name": "last_activity_at", "kind": "attribute", "path": "mail_intake.models.thread.MailIntakeThread.last_activity_at", "signature": null, "docstring": "Timestamp of the most recent message in the thread." }, "add_message": { "name": "add_message", "kind": "function", "path": "mail_intake.models.thread.MailIntakeThread.add_message", "signature": "", "docstring": "Add a message to the thread and update derived fields.\n\nThis method:\n- Appends the message to the thread\n- Tracks unique participants\n- Updates the last activity timestamp\n\nArgs:\n message: Parsed mail message to add to the thread." } } }, "Optional": { "name": "Optional", "kind": "alias", "path": "mail_intake.models.thread.Optional", "signature": "", "docstring": null } } } }