import { Logger } from '@n8n/backend-common'; import { UpdateWorkflowHistoryVersionDto } from '@n8n/api-types'; import type { User } from '@n8n/db'; import { WorkflowHistory, WorkflowHistoryRepository, WorkflowPublishHistoryRepository, WorkflowRepository } from '@n8n/db'; import type { EntityManager } from '@n8n/typeorm'; import type { IWorkflowBase } from 'n8n-workflow'; import { WorkflowFinderService } from '../workflow-finder.service'; import { EventService } from '../../events/event.service'; export declare class WorkflowHistoryService { private readonly logger; private readonly workflowHistoryRepository; private readonly workflowPublishHistoryRepository; private readonly workflowRepository; private readonly workflowFinderService; private readonly eventService; constructor(logger: Logger, workflowHistoryRepository: WorkflowHistoryRepository, workflowPublishHistoryRepository: WorkflowPublishHistoryRepository, workflowRepository: WorkflowRepository, workflowFinderService: WorkflowFinderService, eventService: EventService); getList(user: User, workflowId: string, take: number, skip: number): Promise>>; getVersion(user: User, workflowId: string, versionId: string, settings?: { includePublishHistory?: boolean; }): Promise; findVersion(workflowId: string, versionId: string): Promise; snapshotCurrent(workflowId: string): Promise<{ versionId: string; }>; saveVersion(user: User | string, workflow: { versionId: string; nodes: IWorkflowBase['nodes']; connections: IWorkflowBase['connections']; nodeGroups?: IWorkflowBase['nodeGroups']; }, workflowId: string, autosaved?: boolean, transactionManager?: EntityManager): Promise; updateVersionForUser(user: User, workflowId: string, versionId: string, updateData: UpdateWorkflowHistoryVersionDto): Promise; updateVersion(workflowId: string, versionId: string, updateData: Omit, 'versionId' | 'workflowId' | 'createdAt' | 'updatedAt'>): Promise; getVersionsByIds(user: User, workflowId: string, versionIds: string[]): Promise>; getPublishTimeline(user: User, workflowId: string): Promise<{ id: number; workflowId: string; versionId: string | null; event: "activated" | "deactivated"; createdAt: Date; user: User | null; versionName: string | null; }[]>; }