aeat.application.live._filed_data_capture module¶
Filed-declaration capture services for live AEAT workflows.
The listing helpers read AEAT declaration-register rows without downloading
artefacts. The capture helpers download the selected filed-declaration artefacts
through the authenticated Sede adapter, persist encrypted
FiledDeclaracionObservation
payloads and artefacts, promote extracted casillas into registry-grounded
calculation observations, and attempt to stamp matching current
ModeloRecord filings with live
ExternalEvidence.
Source capture resolves a
ValidatedRegistryAuthority before
asking the Sede adapter which prior declarations a target filing needs, so
cross-period inputs remain registry-authored rather than adapter-inferred. The
module never creates a remote submission or mutates AEAT state; filing-record
stamping is local evidence enrollment against an existing current record.
See also
aeat.application.live._session.active_verified_session()Enforces the read-only live gate before the register walker is opened.
aeat.application.live._filed_observation_persistence.persist_latest_filed_calculation_observations()Persists the latest captured filed observations as calculation-history evidence.
aeat.application.live._filed_observation_persistence.enroll_filed_justificante_evidence()Persists matching justificante metadata and stamps current filing records when the receipt matches.
- filed_data_capture_failure_row(*, modelo, year, error, declaration=None)[source]¶
Map one failed capture into a
FiledDataCaptureFailureRow.- Return type:
- Parameters:
modelo (str)
year (int)
error (BaseException)
declaration (Declaracion | None)
- async list_filed_data(*, modelo, year_from, year_to)[source]¶
List declarations via AEAT and return a
FiledDataListingReport.- Return type:
- Parameters:
- async list_filed_data_bulk(*, year_from, year_to, modelos=None)[source]¶
List filed declarations across modelos with one authenticated register session.
- Return type:
- Returns:
A
BulkFiledDataListingReportof the per-modelo rows and failures.- Parameters:
- async capture_filed_data(*, modelo, year, output_root, period=None, expediente_id=None, limit=None)[source]¶
Capture filed-declaration artefacts and return a
FiledDataCaptureReport.The report accounts for persisted observation manifests, encrypted artefact references, saved justificante CSVs, stamped
aeat.domain.modelos.ModeloRecordids, conflicts, and calculation observation keys produced from the captured AEAT rows.
- async capture_filed_data_bulk(*, year_from, year_to, output_root, modelos=None, limit=None)[source]¶
Capture filed declarations across a year range and return a
BulkFiledDataCaptureReport.Unsupported modelo/year pairs are recorded as failures before live contact. Supported pairs share one authenticated register session and then follow the same persistence, justificante enrolment, and calculation-observation path as
capture_filed_data().
- async capture_source_filed_data(*, modelo, year, period, output_root, registry_root=None, source_root=None)[source]¶
Capture source observations and return a
SourceFiledDataCaptureReport.