import { Logger } from '@n8n/backend-common'; import { GlobalConfig } from '@n8n/config'; import type { Project, User } from '@n8n/db'; import { WorkflowRepository } from '@n8n/db'; import type { Response } from 'express'; import { ErrorReporter } from 'n8n-core'; import type { IDeferredPromise, IExecuteResponsePromiseData, INode, INodeExecutionData, IPinData, IRunExecutionData, IWorkflowExecuteAdditionalData, WorkflowExecuteMode, IWorkflowBase } from 'n8n-workflow'; import { EventService } from '../events/event.service'; import { ExecutionPersistence } from '../executions/execution-persistence'; import { FailedRunFactory } from '../executions/failed-run-factory'; import { SubworkflowPolicyChecker } from '../executions/pre-execution-checks'; import type { IWorkflowErrorData } from '../interfaces'; import { NodeTypes } from '../node-types'; import { OwnershipService } from '../services/ownership.service'; import { TestWebhooks } from '../webhooks/test-webhooks'; import { WorkflowRunner } from '../workflow-runner'; import type { WorkflowRequest } from '../workflows/workflow.request'; export declare class WorkflowExecutionService { private readonly logger; private readonly errorReporter; private readonly executionPersistence; private readonly workflowRepository; private readonly nodeTypes; private readonly testWebhooks; private readonly workflowRunner; private readonly globalConfig; private readonly subworkflowPolicyChecker; private readonly failedRunFactory; private readonly eventService; private readonly ownershipService; constructor(logger: Logger, errorReporter: ErrorReporter, executionPersistence: ExecutionPersistence, workflowRepository: WorkflowRepository, nodeTypes: NodeTypes, testWebhooks: TestWebhooks, workflowRunner: WorkflowRunner, globalConfig: GlobalConfig, subworkflowPolicyChecker: SubworkflowPolicyChecker, failedRunFactory: FailedRunFactory, eventService: EventService, ownershipService: OwnershipService); runWorkflow(workflowData: IWorkflowBase, node: INode, data: INodeExecutionData[][], additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, responsePromise?: IDeferredPromise, deduplicationKey?: string): Promise; private isDestinationNodeATrigger; executeManually(workflowData: IWorkflowBase, payload: WorkflowRequest.ManualRunPayload, user: User, pushRef?: string): Promise<{ executionId: string; } | { waitingForWebhook: boolean; }>; executeChatWorkflow(user: User, workflowData: IWorkflowBase, executionData: IRunExecutionData, httpResponse?: Response, streamingEnabled?: boolean, executionMode?: WorkflowExecuteMode, pushRef?: string): Promise<{ executionId: string; }>; executeErrorWorkflow(workflowId: string, workflowErrorData: IWorkflowErrorData, runningProject: Project): Promise; selectPinnedTrigger(workflow: IWorkflowBase, destinationNode: string, pinData: IPinData): INode | undefined; private findAllPinnedTriggers; private partialExecutionFulfilsPreconditions; }