interface ConditionQueueConfig {
    accumulate?: AccumulateConfig;
    assignee?: string;
    batch?: string[];
    description?: string;
    durationMinutes?: number;
    entity?: string;
    envelope?: Record<string, unknown>;
    expiresAt?: Date;
    initiatedBy?: string;
    metadata?: Record<string, unknown>;
    originId?: string;
    parentId?: string;
    partialOnTimeout?: boolean;
    priority?: number;
    role?: string;
    spanId?: string;
    subtype?: string;
    taskQueue?: string;
    timeout?: string;
    traceId?: string;
    type?: string;
    workflowType?: string;
}

Properties

accumulate?: AccumulateConfig

Declares the wait as an open accumulator: items arrive over time via accumulateItem() and the collection is delivered on every terminal path except cancel. Resolves with { $accumulated, $trigger } when max items are held ($trigger: 'count'), when timeout fires ('timeout', status expired), or on a manual resolve() ('resolve', merged with the resolver payload). Folded at creation into metadata.accumulate_count / accumulate_max / accumulate_keys and envelope.accumulate_items / accumulate_config — one atomic INSERT with the workflow checkpoint. Mutually exclusive with batch.

assignee?: string

Born-assigned: writes assigned_to in the same atomic INSERT that creates the row — on the condition() path, one commit with the workflow's Leg1 checkpoint. Alone it is a durable pre-assignment: the row surfaces in the assignee's list({ assignedTo }) immediately, is resolvable by the assignee with assertClaim, and remains claimable by others (a routing hint). With durationMinutes it is a hard claim at creation. The created event payload carries the assignment.

batch?: string[]

Declares the wait as a batch accumulator: the escalation only resolves once every named item has been submitted via resolveBatchItem(). Each entry is an item key a contributor fills exactly once; the wait's signal fires with the full collection (Record<itemKey, payload>) when the LAST item lands. Folded at creation into the row's queryable facets (metadata.batch_pending / batch_count / batch_keys) and payload accumulator (envelope.batch_items) — one atomic INSERT with the workflow checkpoint. timeout and cancel() semantics are unchanged: false / null, with any partially filled items preserved on the terminal row for audit.

description?: string
durationMinutes?: number

With assignee, arms the claim TTL window (assigned_until / claim_expires_at) at creation — the row is born locked to the assignee, exactly as a post-create claim() locks it.

entity?: string
envelope?: Record<string, unknown>

Unindexed display/form context for resolver UIs

expiresAt?: Date
initiatedBy?: string
metadata?: Record<string, unknown>

GIN-indexed; put claim/filter keys here

originId?: string
parentId?: string
partialOnTimeout?: boolean

With batch, a timeout resumes the wait with the items filled so far plus $trigger: 'timeout' instead of false. Off by default, so existing batch waiters are unchanged.

priority?: number
role?: string
spanId?: string
subtype?: string
taskQueue?: string
timeout?: string

SLA timer for the wait itself (e.g. '30m', '24h'). Arms the same resume timer as condition(signalId, '30m'): when it fires first, the workflow resumes with false and the escalation row transitions pending → expired (a later resolve fails as already-expired). A signal that arrives first resolves normally and the timer is inert.

traceId?: string
type?: string
workflowType?: string