import type { IDataObject, IExecuteResponsePromiseData, INode, IRun, IRunExecutionData, ITaskData, ITaskStartedData, IWorkflowBase, StructuredChunk, Workflow, WorkflowExecuteMode } from 'n8n-workflow'; export type ExecutionLifecycleHookHandlers = { nodeExecuteBefore: Array<(this: ExecutionLifecycleHooks, nodeName: string, data: ITaskStartedData) => Promise | void>; nodeExecuteAfter: Array<(this: ExecutionLifecycleHooks, nodeName: string, data: ITaskData, executionData: IRunExecutionData) => Promise | void>; workflowExecuteBefore: Array<(this: ExecutionLifecycleHooks, workflow: Workflow, data?: IRunExecutionData) => Promise | void>; workflowExecuteResume: Array<(this: ExecutionLifecycleHooks, workflow: Workflow, data?: IRunExecutionData) => Promise | void>; workflowExecuteAfter: Array<(this: ExecutionLifecycleHooks, data: IRun, newStaticData: IDataObject) => Promise | void>; sendResponse: Array<(this: ExecutionLifecycleHooks, response: IExecuteResponsePromiseData) => Promise | void>; sendChunk: Array<(this: ExecutionLifecycleHooks, chunk: StructuredChunk) => Promise | void>; nodeFetchedData: Array<(this: ExecutionLifecycleHooks, workflowId: string, node: INode) => Promise | void>; }; export type ExecutionLifecycleHookName = keyof ExecutionLifecycleHookHandlers; export declare class ExecutionLifecycleHooks { readonly mode: WorkflowExecuteMode; readonly executionId: string; readonly workflowData: IWorkflowBase; readonly handlers: ExecutionLifecycleHookHandlers; constructor(mode: WorkflowExecuteMode, executionId: string, workflowData: IWorkflowBase); addHandler(hookName: Hook, ...handlers: Array): void; runHook[number]>>(hookName: Hook, parameters: Params): Promise; }