aeat.domain.attachments._enums module¶
Closed enumerations for attachment records.
Defines the closed taxonomy used by domain.attachments.Attachment
to classify what an attachment is (AttachmentKind) and where it came
from (AttachmentSource).
- class AttachmentKind(*values)[source]¶
Bases:
StrEnumClosed taxonomy of supported attachment document kinds.
Used by
domain.attachments.Attachment.kindto disambiguate payload semantics for downstream renderers, validators, and reporting.- Variables:
INVOICE_PDF – Vendor or customer invoice in PDF form.
RECEIPT_IMAGE – Photographed or scanned receipt.
EMAIL_MESSAGE – Captured email message body or eml export.
DRIVE_DOCUMENT – Document captured from Google Drive.
CONTRACT_PDF – Contract or agreement in PDF form.
BANK_STATEMENT – Bank-issued statement document.
METADATA_BLOB – Opaque metadata payload that supplements another record.
OTHER – Catch-all for documents that do not fit the above categories.
- INVOICE_PDF¶
- RECEIPT_IMAGE¶
- EMAIL_MESSAGE¶
- DRIVE_DOCUMENT¶
- CONTRACT_PDF¶
- BANK_STATEMENT¶
- METADATA_BLOB¶
- OTHER¶
- class AttachmentSource(*values)[source]¶
Bases:
StrEnumClosed taxonomy of channels an attachment can originate from.
Used by
domain.attachments.Attachment.sourceto record where bytes were captured from for provenance and re-fetch logic.- Variables:
LOCAL_FILE – A file read from the local filesystem.
GMAIL – A message body or attachment captured via the Gmail API.
GOOGLE_DRIVE – A document fetched from Google Drive.
URL – A document downloaded from an arbitrary URL.
INLINE – Bytes provided inline rather than fetched from a channel.
- LOCAL_FILE¶
- GMAIL¶
- GOOGLE_DRIVE¶
- URL¶
- INLINE¶
- class DocumentLinkSource(*values)[source]¶
Bases:
StrEnumChannels that can back an operator-recorded document link.
A document link records a reference to a document held elsewhere (a Gmail message, a Drive document, an arbitrary URL); it never carries local bytes. The full
AttachmentSourcetaxonomy also includesLOCAL_FILEandINLINE, which name byte-bearing captures that are not link sources. Theaeat app ledger doclink --sourceoption advertises exactly this narrowed set so the choices it shows match the sources its handler accepts (audit2026-06-10-cli-operator-surface-auditF5(c), decision D5). Each member’s value equals the matchingAttachmentSourcemember’s value, soto_attachment_source()is a total mapping.- Variables:
GMAIL – A message captured via the Gmail API.
GOOGLE_DRIVE – A document fetched from Google Drive.
URL – A document referenced by an arbitrary URL.
- GMAIL¶
- GOOGLE_DRIVE¶
- URL¶
- to_attachment_source()[source]¶
Map a document-link source to its
AttachmentSourcemember.- Return type: