import type { JsonObject, NodeAttempt, RegistryRefId, WorkflowDefinition, WorkflowDiagnostic, WorkflowErrorSummary, WorkflowEventEmitter, WorkflowHumanActionId, WorkflowHumanActionKind, WorkflowHumanActionRecord, WorkflowRegistry, WorkflowRun, WorkflowRuntimeEvent, WorkflowValue, WorkflowWaitToken, WorkflowWaitTokenId, WorkflowWakeup, WorkflowWakeupId } from "../types/index.js"; import type { WorkflowHumanActionStore, WorkflowRunStore, WorkflowWaitTokenStore } from "../store/index.js"; export type WorkflowHumanActionDecisionKind = "approved" | "rejected" | "submitted" | "cancelled"; export type WorkflowHumanActionApplyRequest = { waitTokenId: WorkflowWaitTokenId; actionId?: RegistryRefId; kind?: WorkflowHumanActionKind; actor?: JsonObject; payload?: WorkflowValue; }; export type WorkflowHumanActionApplyOptions = { registry: Pick; store: WorkflowRunStore & WorkflowWaitTokenStore & WorkflowHumanActionStore; now?: () => Date | string; createHumanActionId?: () => WorkflowHumanActionId; createWakeupId?: () => WorkflowWakeupId; emitEvent?: WorkflowEventEmitter; }; export type WorkflowHumanActionApplySuccess = { ok: true; run: WorkflowRun; waitToken: WorkflowWaitToken; humanAction: WorkflowHumanActionRecord; events: WorkflowRuntimeEvent[]; decision: { kind: WorkflowHumanActionDecisionKind; actionId: RegistryRefId; actionKind: WorkflowHumanActionKind; }; wakeup?: WorkflowWakeup; nodeAttempt?: NodeAttempt; }; export type WorkflowHumanActionApplyFailure = { ok: false; run: WorkflowRun; waitToken?: WorkflowWaitToken; events: WorkflowRuntimeEvent[]; diagnostics: WorkflowDiagnostic[]; error: WorkflowErrorSummary; }; export type WorkflowHumanActionApplyResult = WorkflowHumanActionApplySuccess | WorkflowHumanActionApplyFailure; export declare function applyWorkflowHumanAction(definition: WorkflowDefinition, run: WorkflowRun, request: WorkflowHumanActionApplyRequest, options: WorkflowHumanActionApplyOptions): Promise; //# sourceMappingURL=human-action.d.ts.map