Skip to main content

FlowDefinitionStore

@retinue/monorepo


@retinue/monorepo / backend/src / FlowDefinitionStore

Interface: FlowDefinitionStore

Defined in: backend/src/persistence/index.ts:1805

Stored flow and team definitions, immutable per version.

put writes a new version rather than overwriting one, and get takes a version. That is not over-engineering: an execution pins the version it started with and reads it for its whole life, so a definition that could change under a running execution would change the shape of an automation halfway through — and the person who edited step 4 has no idea an execution is sitting at step 3.

latest exists for starting something new, which is the only moment "the current version" is the right question.

Methods​

get()​

get(input): Promise<StoredFlowDefinition | null>

Defined in: backend/src/persistence/index.ts:1808

Parameters​

input​

TenantScope & object

Returns​

Promise<StoredFlowDefinition | null>


latest()​

latest(input): Promise<StoredFlowDefinition | null>

Defined in: backend/src/persistence/index.ts:1809

Parameters​

input​

TenantScope & object

Returns​

Promise<StoredFlowDefinition | null>


list()​

list(input): Promise<Page<StoredFlowDefinition>>

Defined in: backend/src/persistence/index.ts:1810

Parameters​

input​

TenantScope & PageRequest

Returns​

Promise<Page<StoredFlowDefinition>>


put()​

put(input): Promise<void>

Defined in: backend/src/persistence/index.ts:1807

Refuses to overwrite an existing (id, version) — a version that changed is not a version.

Parameters​

input​

TenantScope & object

Returns​

Promise<void>