aeat.domain.modelos._filing_repository module

Domain-side filing-record catalogue port surface.

This module owns the pure filing-record catalogue vocabulary: the ModeloRecordPersistenceError raised at the storage boundary, the upsert_filing_record() pure mutator, and the namespace / schema-version constants that name the persisted envelope contract. The concrete encrypted SQL repository lives in the persistence adapter ModeloRecordCatalogueRepository, behind the read-side ModeloRecordCatalogueRepositoryProtocol; the domain package depends only on the structural port.

exception ModeloRecordPersistenceError(message=None, *, context=None, suggestion=None, translated_message=None)[source]

Bases: ModeloError

Raised when the filing-record catalogue cannot be persisted or loaded.

This wraps storage-boundary failures from ModeloRecordCatalogueRepository while preserving translated recovery context for callers.

Parameters:
  • message (str | None)

  • context (Mapping[str, object] | None)

  • suggestion (str | None)

  • translated_message (str | None)

Return type:

None

code: ClassVar[ErrorCode]
upsert_filing_record(catalogue, record)[source]

Return a new ModeloRecordCatalogue with record inserted or replaced.

Parameters:
Return type:

ModeloRecordCatalogue