cadrumo.adapters.persistence.profile.workflow_gate module

Persistence adapters for the Modelo workflow-gate capabilities.

class WorkflowGateDraftRepositoryAdapter(*, repository)[source]

Bases: WorkflowGateDraftRepositoryProtocol

Translate the encrypted filing-draft repository to the app contract.

Parameters:

repository (ModeloDraftRepository)

save(payload, /)[source]

Persist an approved draft and translate storage failures.

Core types: ModeloDraft.

Return type:

None

Parameters:

payload (ModeloDraft)

class WorkflowGateSubmissionRepositoryAdapter(*, repository)[source]

Bases: WorkflowGateSubmissionRepositoryProtocol

Translate the encrypted submission repository to the app contract.

Parameters:

repository (SubmissionRepository)

load(record_id, /)[source]

Load one historical submission and translate storage failures.

Return type:

ModeloPresentado | None

Parameters:

record_id (str)

iter_submissions()[source]

Yield historical submissions while translating iteration failures.

Return type:

Iterator[ModeloPresentado]

list_submission_ids()[source]

List historical submission ids and translate storage failures.

Return type:

tuple[str, ...]

build_workflow_gate_ports(*, bucket_id)[source]

Compose workflow-gate persistence capabilities for one profile bucket.

Return type:

WorkflowGatePorts

Parameters:

bucket_id (str)