lib init
This commit is contained in:
26
mail_intake/models/message.py
Normal file
26
mail_intake/models/message.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from typing import Optional, Dict
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class MailIntakeMessage:
|
||||
"""
|
||||
Canonical internal representation of a single email message.
|
||||
|
||||
This model is provider-agnostic and safe to persist.
|
||||
No Gmail-specific fields should appear here.
|
||||
"""
|
||||
|
||||
message_id: str
|
||||
thread_id: str
|
||||
timestamp: datetime
|
||||
|
||||
from_email: str
|
||||
from_name: Optional[str]
|
||||
|
||||
subject: str
|
||||
body_text: str
|
||||
snippet: str
|
||||
|
||||
raw_headers: Dict[str, str]
|
||||
Reference in New Issue
Block a user