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

Properties

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.

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
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