cadrumo.application.live.justificante_ports module¶
Application ports for live justificante capture.
The capture workflow names only the values it needs from Sede and from local storage. Adapter and entrypoint code implement these ports; this module owns no transport, browser, parser, or secure-store construction.
- class JustificanteDeclaration(modelo, period, expediente_id, estado, presented_at)[source]¶
Bases:
objectPeriod-bearing declaration data used to select an expediente.
- class JustificanteExpediente(expediente_id)[source]¶
Bases:
objectMinimal Sede procedure-tree entry needed to fetch a receipt.
- Parameters:
expediente_id (str)
- class CapturedJustificante(expediente_id, csv, pdf_bytes, pdf_sha256)[source]¶
Bases:
objectAuthenticated receipt bytes and Sede references returned by a live read.
- class JustificanteSnapshotPersistencePort(*args, **kwargs)[source]¶
Bases:
ProtocolBucket-bound encrypted persistence for capture snapshots.
- class JustificanteMetadataPort(*args, **kwargs)[source]¶
Bases:
ProtocolDurable metadata registration for a parsed receipt.
- save(payload)[source]¶
Persist parsed receipt metadata.
- Return type:
- Parameters:
payload (Justificante)
- class JustificanteFilingPort(*args, **kwargs)[source]¶
Bases:
ProtocolLoad and save the local filing catalogue.
- save(catalogue)[source]¶
Persist the local filing catalogue.
- Return type:
- Parameters:
catalogue (ModeloRecordCatalogue)
- class JustificanteRegistrationPorts(parse_pdf, metadata, filing, filing_reconciliation)[source]¶
Bases:
objectApplication-owned local persistence dependencies for receipt enrolment.
- Parameters:
parse_pdf (Callable[[bytes], Justificante])
metadata (JustificanteMetadataPort)
filing (JustificanteFilingPort)
filing_reconciliation (FiledFilingReconciliationPort)
-
parse_pdf:
Callable[[bytes],Justificante]¶
-
metadata:
JustificanteMetadataPort¶
-
filing:
JustificanteFilingPort¶
-
filing_reconciliation:
FiledFilingReconciliationPort¶
- class JustificanteLiveReadPort(*args, **kwargs)[source]¶
Bases:
ProtocolRead the declaration register, procedure tree, and selected receipt.
- async declarations_and_expedientes(*, modelo, year)[source]¶
Read declarations and their matching procedure-tree entries.
- Return type:
tuple[Sequence[JustificanteDeclaration],Sequence[JustificanteExpediente]]- Parameters: