import type { WorkflowBlockConfigFriendlyStruct } from "../../shared/workflow/config-schema/index.js"; import type { WorkflowOutcomeDataNode, WorkflowOutcomeDataRuntimeValueOf } from "../../shared/workflow/outcome-data-schema/index.js"; import type { WorkflowOutcomeIdentifier } from "../../shared/workflow/outcome-identifier.js"; import type { WorkflowBlockExecutorConfig, WorkflowBlockExecutorMetadata } from "./execute.js"; export type WorkflowBlockFinisherReturn = ({ /** Finish the block execution with an outcome. */ type: "outcome"; data: WorkflowOutcomeDataRuntimeValueOf | null; } & WorkflowOutcomeIdentifier) | { /** Finish the block execution without an outcome. */ type: "exit"; } | { /** Raise an error. */ type: "error"; errorMessage: string; retryable?: boolean; } | { /** Return without updating the block execution. */ type: "no-op"; }; /** Context passed into a step block's `finish` handler, alongside the request. */ export type WorkflowBlockFinisherContext = { config: WorkflowBlockExecutorConfig; metadata: WorkflowBlockExecutorMetadata; }; export type WorkflowBlockFinisher = (req: Request, ctx: WorkflowBlockFinisherContext) => Promise | WorkflowBlockFinisherReturn; //# sourceMappingURL=finish.d.ts.map