Type Alias: EffectStore {#type-alias-effectstore}

EffectStore = object

Storage backend for durable side effects. Tracks effect state to enable replay on retry without re-executing the side-effect function.

Methods {#methods}

deleteEffectsForRuns() {#deleteeffectsforruns}

deleteEffectsForRuns(runIds): number

Delete all effect records for the given run IDs. Returns the number of records removed.

Parameters {#deleteeffectsforruns-parameters}

runIds {#deleteeffectsforruns-runids}

string[]

Returns {#deleteeffectsforruns-returns}

number


getEffect() {#geteffect}

getEffect(runId, effectKey): EffectRecord | null

Retrieve an effect record by run ID and effect key, or null if not found.

Parameters {#geteffect-parameters}

runId {#geteffect-runid}

string

effectKey {#geteffect-effectkey}

string

Returns {#geteffect-returns}

EffectRecord | null


getEffects() {#geteffects}

getEffects(runId): EffectRecord[]

Retrieve all effect records for a given run.

Parameters {#geteffects-parameters}

runId {#geteffects-runid}

string

Returns {#geteffects-returns}

EffectRecord[]


markCompleted() {#markcompleted}

markCompleted(runId, effectKey, output): void

Mark an effect as completed and persist its output.

Parameters {#markcompleted-parameters}

runId {#markcompleted-runid}

string

effectKey {#markcompleted-effectkey}

string

output {#markcompleted-output}

unknown

Returns {#markcompleted-returns}

void


markFailed() {#markfailed}

markFailed(runId, effectKey, error): void

Mark an effect as failed and persist the error message.

Parameters {#markfailed-parameters}

runId {#markfailed-runid}

string

effectKey {#markfailed-effectkey}

string

error {#markfailed-error}

string

Returns {#markfailed-returns}

void


markStarted() {#markstarted}

markStarted(runId, effectKey): void

Mark an effect as started (first execution attempt).

Parameters {#markstarted-parameters}

runId {#markstarted-runid}

string

effectKey {#markstarted-effectkey}

string

Returns {#markstarted-returns}

void