aeat.core.secure_object_write module

Boundary DTO for one prepared secure-object upsert.

SecureObjectWrite is the persistence-boundary contract between a domain repository port — which declares to_secure_object_write(...) -> SecureObjectWrite in modelos — and the storage adapter that persists it. It is a pure value object depending only on core (STRICT_FROZEN_CONFIG, SensitivityClass), so a domain port can name it in a method signature without importing the aeat.adapters layer. The storage adapter (storage) re-exports it unchanged.

See also

SecureObjectWrite

Public core facade export for this DTO.

SensitivityClass

Classification carried by every prepared secure-object write.

CalculationRevisionCatalogueRepositoryProtocol

Domain repository port that can prepare a calculation catalogue write without importing adapters.

ModeloRecordCatalogueRepositoryProtocol

Domain repository port that can co-write filing records through the same DTO.

SecureObjectRepository

Storage adapter that consumes these prepared writes.

save_many()

Unit-of-work API that persists one or more prepared writes atomically.

class SecureObjectWrite(**data)[source]

Bases: BaseModel

One encrypted secure-object upsert prepared for a unit of work.

Parameters:
namespace: str
object_key: str
classification: SensitivityClass
schema_version: int
written_at: datetime
payload: bytes
write_provenance: str
source_event_id: str | None
expected_revision_id: str | None