import { ActivateWorkflowDto, ArchiveWorkflowDto, CreateWorkflowDto, DeactivateWorkflowDto, ImportWorkflowFromUrlDto, TransferWorkflowBodyDto, UpdateWorkflowDto } from '@n8n/api-types';
import { Logger } from '@n8n/backend-common';
import { GlobalConfig } from '@n8n/config';
import { SharedWorkflow, ProjectRelationRepository, ProjectRepository, WorkflowRepository, AuthenticatedRequest } from '@n8n/db';
import express from 'express';
import { CollaborationService } from '../collaboration/collaboration.service';
import { WorkflowCreationService } from './workflow-creation.service';
import { WorkflowExecutionService } from './workflow-execution.service';
import { WorkflowFinderService } from './workflow-finder.service';
import { WorkflowRequest } from './workflow.request';
import { WorkflowService } from './workflow.service';
import { EnterpriseWorkflowService } from './workflow.service.ee';
import { EventService } from '../events/event.service';
import { ExecutionService } from '../executions/execution.service';
import type { IWorkflowResponse } from '../interfaces';
import { License } from '../license';
import { NamingService } from '../services/naming.service';
import { ProjectService } from '../services/project.service.ee';
import { UserManagementMailer } from '../user-management/email';
export declare class WorkflowsController {
    private readonly logger;
    private readonly enterpriseWorkflowService;
    private readonly namingService;
    private readonly workflowRepository;
    private readonly workflowService;
    private readonly workflowCreationService;
    private readonly workflowExecutionService;
    private readonly license;
    private readonly mailer;
    private readonly projectRepository;
    private readonly projectService;
    private readonly projectRelationRepository;
    private readonly eventService;
    private readonly globalConfig;
    private readonly workflowFinderService;
    private readonly executionService;
    private readonly collaborationService;
    constructor(logger: Logger, enterpriseWorkflowService: EnterpriseWorkflowService, namingService: NamingService, workflowRepository: WorkflowRepository, workflowService: WorkflowService, workflowCreationService: WorkflowCreationService, workflowExecutionService: WorkflowExecutionService, license: License, mailer: UserManagementMailer, projectRepository: ProjectRepository, projectService: ProjectService, projectRelationRepository: ProjectRelationRepository, eventService: EventService, globalConfig: GlobalConfig, workflowFinderService: WorkflowFinderService, executionService: ExecutionService, collaborationService: CollaborationService);
    create(req: AuthenticatedRequest, _res: unknown, body: CreateWorkflowDto): Promise<{
        scopes: import("@n8n/permissions").Scope[];
        checksum: string;
        homeProject?: import("@n8n/db").SlimProject | null;
        sharedWithProjects: import("@n8n/db").SlimProject[];
        usedCredentials?: import("@n8n/db").CredentialUsedByWorkflow[];
        description: string | null;
        tags?: import("@n8n/db").TagEntity[] | undefined;
        id: string;
        name: string;
        active: boolean;
        versionId: string;
        activeVersionId: string | null;
        createdAt: Date;
        updatedAt: Date;
        generateId: () => void;
        nodes: import("n8n-workflow").INode[];
        connections: import("n8n-workflow").IConnections;
        setUpdateDate: () => void;
        meta?: import("n8n-workflow").WorkflowFEMeta | undefined;
        isArchived: boolean;
        parentFolder: import("@n8n/db").Folder | null;
        settings?: import("n8n-workflow").IWorkflowSettings | undefined;
        staticData?: import("n8n-workflow").IDataObject | undefined;
        pinData?: import("@n8n/db").ISimplifiedPinData | undefined;
        activeVersion: import("@n8n/db").WorkflowHistory | null;
        versionCounter: number;
        tagMappings: import("@n8n/db").WorkflowTagMapping[];
        triggerCount: number;
        testRuns: import("@n8n/db").TestRun[];
    }>;
    getAll(req: WorkflowRequest.GetMany, res: express.Response): Promise<void>;
    getNewName(req: WorkflowRequest.NewName): Promise<{
        name: string;
    }>;
    getFromUrl(req: AuthenticatedRequest, _res: express.Response, query: ImportWorkflowFromUrlDto): Promise<IWorkflowResponse>;
    getWorkflow(req: WorkflowRequest.Get): Promise<{
        scopes: import("@n8n/permissions").Scope[];
        checksum: string;
        homeProject?: import("@n8n/db").SlimProject | null;
        sharedWithProjects: import("@n8n/db").SlimProject[];
        usedCredentials?: import("@n8n/db").CredentialUsedByWorkflow[];
        description: string | null;
        tags?: import("@n8n/db").TagEntity[] | undefined;
        id: string;
        name: string;
        active: boolean;
        versionId: string;
        activeVersionId: string | null;
        createdAt: Date;
        updatedAt: Date;
        generateId: () => void;
        nodes: import("n8n-workflow").INode[];
        connections: import("n8n-workflow").IConnections;
        setUpdateDate: () => void;
        meta?: import("n8n-workflow").WorkflowFEMeta | undefined;
        isArchived: boolean;
        parentFolder: import("@n8n/db").Folder | null;
        settings?: import("n8n-workflow").IWorkflowSettings | undefined;
        staticData?: import("n8n-workflow").IDataObject | undefined;
        pinData?: import("@n8n/db").ISimplifiedPinData | undefined;
        activeVersion: import("@n8n/db").WorkflowHistory | null;
        versionCounter: number;
        tagMappings: import("@n8n/db").WorkflowTagMapping[];
        triggerCount: number;
        testRuns: import("@n8n/db").TestRun[];
    } | {
        scopes: import("@n8n/permissions").Scope[];
        checksum: string;
        name: string;
        description: string | null;
        active: boolean;
        isArchived: boolean;
        nodes: import("n8n-workflow").INode[];
        connections: import("n8n-workflow").IConnections;
        settings?: import("n8n-workflow").IWorkflowSettings;
        staticData?: import("n8n-workflow").IDataObject;
        meta?: import("n8n-workflow").WorkflowFEMeta;
        tags?: import("@n8n/db").TagEntity[];
        tagMappings: import("@n8n/db").WorkflowTagMapping[];
        shared: SharedWorkflow[];
        pinData?: import("@n8n/db").ISimplifiedPinData;
        versionId: string;
        activeVersionId: string | null;
        activeVersion: import("@n8n/db").WorkflowHistory | null;
        versionCounter: number;
        triggerCount: number;
        parentFolder: import("@n8n/db").Folder | null;
        testRuns: import("@n8n/db").TestRun[];
        id: string;
        generateId(): void;
        createdAt: Date;
        updatedAt: Date;
        setUpdateDate(): void;
    }>;
    exists(req: WorkflowRequest.Get): Promise<{
        exists: boolean;
    }>;
    update(req: WorkflowRequest.Update, _res: unknown, workflowId: string, body: UpdateWorkflowDto): Promise<{
        scopes: import("@n8n/permissions").Scope[];
        checksum: string;
        name: string;
        description: string | null;
        active: boolean;
        isArchived: boolean;
        nodes: import("n8n-workflow").INode[];
        connections: import("n8n-workflow").IConnections;
        settings?: import("n8n-workflow").IWorkflowSettings;
        staticData?: import("n8n-workflow").IDataObject;
        meta?: import("n8n-workflow").WorkflowFEMeta;
        tags?: import("@n8n/db").TagEntity[];
        tagMappings: import("@n8n/db").WorkflowTagMapping[];
        shared: SharedWorkflow[];
        pinData?: import("@n8n/db").ISimplifiedPinData;
        versionId: string;
        activeVersionId: string | null;
        activeVersion: import("@n8n/db").WorkflowHistory | null;
        versionCounter: number;
        triggerCount: number;
        parentFolder: import("@n8n/db").Folder | null;
        testRuns: import("@n8n/db").TestRun[];
        id: string;
        generateId(): void;
        createdAt: Date;
        updatedAt: Date;
        setUpdateDate(): void;
    }>;
    getWriteLock(req: AuthenticatedRequest, _res: Response, workflowId: string): Promise<{
        clientId: string;
        userId: string;
    } | null>;
    delete(req: AuthenticatedRequest, _res: Response, workflowId: string): Promise<boolean>;
    archive(req: AuthenticatedRequest, _res: Response, workflowId: string, body: ArchiveWorkflowDto): Promise<{
        checksum: string;
        name: string;
        description: string | null;
        active: boolean;
        isArchived: boolean;
        nodes: import("n8n-workflow").INode[];
        connections: import("n8n-workflow").IConnections;
        settings?: import("n8n-workflow").IWorkflowSettings;
        staticData?: import("n8n-workflow").IDataObject;
        meta?: import("n8n-workflow").WorkflowFEMeta;
        tags?: import("@n8n/db").TagEntity[];
        tagMappings: import("@n8n/db").WorkflowTagMapping[];
        shared: SharedWorkflow[];
        pinData?: import("@n8n/db").ISimplifiedPinData;
        versionId: string;
        activeVersionId: string | null;
        activeVersion: import("@n8n/db").WorkflowHistory | null;
        versionCounter: number;
        triggerCount: number;
        parentFolder: import("@n8n/db").Folder | null;
        testRuns: import("@n8n/db").TestRun[];
        id: string;
        generateId(): void;
        createdAt: Date;
        updatedAt: Date;
        setUpdateDate(): void;
    }>;
    unarchive(req: AuthenticatedRequest, _res: Response, workflowId: string): Promise<{
        checksum: string;
        name: string;
        description: string | null;
        active: boolean;
        isArchived: boolean;
        nodes: import("n8n-workflow").INode[];
        connections: import("n8n-workflow").IConnections;
        settings?: import("n8n-workflow").IWorkflowSettings;
        staticData?: import("n8n-workflow").IDataObject;
        meta?: import("n8n-workflow").WorkflowFEMeta;
        tags?: import("@n8n/db").TagEntity[];
        tagMappings: import("@n8n/db").WorkflowTagMapping[];
        shared: SharedWorkflow[];
        pinData?: import("@n8n/db").ISimplifiedPinData;
        versionId: string;
        activeVersionId: string | null;
        activeVersion: import("@n8n/db").WorkflowHistory | null;
        versionCounter: number;
        triggerCount: number;
        parentFolder: import("@n8n/db").Folder | null;
        testRuns: import("@n8n/db").TestRun[];
        id: string;
        generateId(): void;
        createdAt: Date;
        updatedAt: Date;
        setUpdateDate(): void;
    }>;
    activate(req: WorkflowRequest.Activate, _res: unknown, workflowId: string, body: ActivateWorkflowDto): Promise<{
        scopes: import("@n8n/permissions").Scope[];
        checksum: string;
        name: string;
        description: string | null;
        active: boolean;
        isArchived: boolean;
        nodes: import("n8n-workflow").INode[];
        connections: import("n8n-workflow").IConnections;
        settings?: import("n8n-workflow").IWorkflowSettings;
        staticData?: import("n8n-workflow").IDataObject;
        meta?: import("n8n-workflow").WorkflowFEMeta;
        tags?: import("@n8n/db").TagEntity[];
        tagMappings: import("@n8n/db").WorkflowTagMapping[];
        shared: SharedWorkflow[];
        pinData?: import("@n8n/db").ISimplifiedPinData;
        versionId: string;
        activeVersionId: string | null;
        activeVersion: import("@n8n/db").WorkflowHistory | null;
        versionCounter: number;
        triggerCount: number;
        parentFolder: import("@n8n/db").Folder | null;
        testRuns: import("@n8n/db").TestRun[];
        id: string;
        generateId(): void;
        createdAt: Date;
        updatedAt: Date;
        setUpdateDate(): void;
    }>;
    deactivate(req: WorkflowRequest.Deactivate, _res: unknown, workflowId: string, body: DeactivateWorkflowDto): Promise<{
        scopes: import("@n8n/permissions").Scope[];
        checksum: string;
        name: string;
        description: string | null;
        active: boolean;
        isArchived: boolean;
        nodes: import("n8n-workflow").INode[];
        connections: import("n8n-workflow").IConnections;
        settings?: import("n8n-workflow").IWorkflowSettings;
        staticData?: import("n8n-workflow").IDataObject;
        meta?: import("n8n-workflow").WorkflowFEMeta;
        tags?: import("@n8n/db").TagEntity[];
        tagMappings: import("@n8n/db").WorkflowTagMapping[];
        shared: SharedWorkflow[];
        pinData?: import("@n8n/db").ISimplifiedPinData;
        versionId: string;
        activeVersionId: string | null;
        activeVersion: import("@n8n/db").WorkflowHistory | null;
        versionCounter: number;
        triggerCount: number;
        parentFolder: import("@n8n/db").Folder | null;
        testRuns: import("@n8n/db").TestRun[];
        id: string;
        generateId(): void;
        createdAt: Date;
        updatedAt: Date;
        setUpdateDate(): void;
    }>;
    runManually(req: WorkflowRequest.ManualRun, _res: unknown): Promise<{
        executionId: string;
    } | {
        waitingForWebhook: boolean;
    }>;
    share(req: WorkflowRequest.Share): Promise<void>;
    transfer(req: AuthenticatedRequest, _res: unknown, workflowId: string, body: TransferWorkflowBodyDto): Promise<{
        error: {
            message: string;
            lineNumber: number | undefined;
            timestamp: number;
            name: string;
            description: string | null | undefined;
            context: import("n8n-workflow").IDataObject;
            cause: Error | undefined;
        } | {
            name: string;
            message: string;
        };
    } | undefined>;
    getLastSuccessfulExecution(req: AuthenticatedRequest, _res: unknown, workflowId: string): Promise<import("@n8n/db").IExecutionResponse | null>;
    getWorkflowsWithNodesIncluded(req: AuthenticatedRequest, res: express.Response): Promise<void>;
}
