Skip to content
Français

WorkflowJobState

import type { WorkflowJobState } from "@elie-laloum/outpost/queues";
  • jobStatusRequired
    "failed" | "done" | "cancelled" | "active" | "pending"
    Queue delivery status. done means the handler saved a settled workflow result, which may still be paused or waiting for input.
  • runIdRequired
    string
    Checkpoint run ID carried by the job input; use it to answer, decide or inspect the run.
  • workflowStatusOptional
    "failed" | "done" | "cancelled" | "rejected" | "waiting-input" | "paused" | undefined
    Saved workflow status; absent while the job is pending or active, or when the handler failed before saving a summary.
  • nextActionOptional
    WorkflowJobNextAction | undefined
    Operator action for the saved workflow status: none, answer, inspect-pause or inspect. inspect never authorizes replay or checkpoint-owner recovery.
export interface WorkflowJobState {
  /** Queue delivery state; `done` means the handler saved a settled workflow result. */
  readonly jobStatus: QueueJob["status"];
  readonly runId: string;
  /** Absent until a handler saved the workflow result. */
  readonly workflowStatus?: WorkflowResult["status"];
  readonly nextAction?: WorkflowJobNextAction;
}