cadrumo.adapters.persistence.profile.m145_communication_records module

Persistence adapters for the Modelo 145 communication-record capability.

The application service speaks only the focused records ports. This module binds those ports to the existing secure-object and bucket-event repositories, translating their storage failures and keeping their envelope/blob details outside the application boundary.

class M145CommunicationRecordRepositoryAdapter(*, repository)[source]

Bases: M145CommunicationRecordRepositoryPort

Translate the generic secure snapshot repository to the records port.

Parameters:

repository (SecureSnapshotRepository[M145CommunicationRecord])

exists(communication_record_id)[source]

Report record presence without exposing storage failures.

Return type:

bool

Parameters:

communication_record_id (str)

load(communication_record_id)[source]

Load one record by full id while preserving application lookup errors.

Return type:

M145CommunicationRecord

Parameters:

communication_record_id (str)

resolve(communication_record_id)[source]

Resolve one full id or unique prefix while hiding adapter errors.

Return type:

M145CommunicationRecord

Parameters:

communication_record_id (str)

save_with_secure_object_writes(record, extra_writes)[source]

Commit a record and its related secure writes atomically.

Return type:

None

Parameters:
build_m145_communication_records_ports(*, bucket_id)[source]

Bind secure record and event repositories for one profile bucket.

Return type:

M145CommunicationRecordsPorts

Parameters:

bucket_id (str)