/// <reference types="node" />
import { IDeferredPromise, IExecuteResponsePromiseData, IRun } from 'n8n-workflow';
import { ChildProcess } from 'child_process';
import * as PCancelable from 'p-cancelable';
import { IExecutionsCurrentSummary, IWorkflowExecutionDataProcess } from '.';
export declare class ActiveExecutions {
    private activeExecutions;
    add(executionData: IWorkflowExecutionDataProcess, process?: ChildProcess, executionId?: string): Promise<string>;
    attachWorkflowExecution(executionId: string, workflowExecution: PCancelable<IRun>): void;
    attachResponsePromise(executionId: string, responsePromise: IDeferredPromise<IExecuteResponsePromiseData>): void;
    resolveResponsePromise(executionId: string, response: IExecuteResponsePromiseData): void;
    remove(executionId: string, fullRunData?: IRun): void;
    stopExecution(executionId: string, timeout?: string): Promise<IRun | undefined>;
    getPostExecutePromise(executionId: string): Promise<IRun | undefined>;
    getActiveExecutions(): IExecutionsCurrentSummary[];
}
export declare function getInstance(): ActiveExecutions;
