import { DataSource } from '@n8n/typeorm'; import { DiffMetaData, DiffRule } from 'n8n-workflow'; import { WorkflowHistory } from '../entities'; import { BaseRepository } from './base-repository'; import type { OperationContext } from '../services/transaction'; import { TransactionRunner } from '../services/transaction'; export declare class WorkflowHistoryRepository extends BaseRepository { constructor(dataSource: DataSource, transactionRunner: TransactionRunner); insertVersion(version: Pick & { name?: string; description?: string; nodeGroups?: WorkflowHistory['nodeGroups']; }, ctx: OperationContext): Promise; findRecentAuthorsByWorkflowIds(workflowIds: string[], perWorkflow: number): Promise>>; deleteEarlierThan(date: Date): Promise; findNewestVersionNodes(workflowId: string, limit: number): Promise>>; findVersionSummaries(workflowId: string, versionIds: string[]): Promise>; updateVersionMetadata({ workflowId, versionId, name, description, }: { workflowId: string; versionId: string; name: string; description?: string | null; }, ctx: OperationContext): Promise; deleteEarlierThanExceptCurrentAndActive(date: Date, preserveNamedVersions?: boolean): Promise; private makeSkipActiveAndNamedVersionsRule; getWorkflowIdsInRange(startDate: Date, endDate: Date): Promise; pruneHistory(workflowId: string, startDate: Date, endDate: Date, rules?: DiffRule[], skipRules?: DiffRule[], metaData?: Partial>): Promise<{ seen: number; deleted: number; }>; }