import type { NodeState, PendingApproval, WorkflowRun, WorkflowStatus } from "../types.js"; /** Options accepted by use workflow. */ export interface UseWorkflowOptions { runId: string; apiBase?: string; /** Additional headers, such as a cross-origin authorization token. */ headers?: HeadersInit; /** Fetch credential mode for cross-origin cookie-backed sessions. */ credentials?: RequestCredentials; pollInterval?: number; autoRefresh?: boolean; onStatusChange?: (status: WorkflowStatus, previousStatus: WorkflowStatus) => void; onComplete?: (run: WorkflowRun) => void; onError?: (error: Error, run?: WorkflowRun) => void; onApprovalRequired?: (approval: PendingApproval) => void; } /** Result returned from use workflow. */ export interface UseWorkflowResult { run: WorkflowRun | null; status: WorkflowStatus; progress: number; currentNodes: string[]; nodeStates: Record; pendingApprovals: PendingApproval[]; refresh: () => Promise; cancel: () => Promise; retry: () => Promise; isLoading: boolean; error: Error | null; } /** React hook for workflow. */ export declare function useWorkflow(options: UseWorkflowOptions): UseWorkflowResult; //# sourceMappingURL=use-workflow.d.ts.map