import { Logger } from '@n8n/backend-common'; import { CredentialsRepository, TagRepository } from '@n8n/db'; import { DataSource, EntityManager } from '@n8n/typeorm'; import { type IWorkflowBase } from 'n8n-workflow'; import { Cipher } from 'n8n-core'; import { ActiveWorkflowManager } from '../active-workflow-manager'; import type { IWorkflowWithVersionMetadata } from '../interfaces'; import { WorkflowIndexService } from '../modules/workflow-index/workflow-index.service'; import { DataTableDDLService } from '../modules/data-table/data-table-ddl.service'; export declare class ImportService { private readonly logger; private readonly credentialsRepository; private readonly tagRepository; private readonly dataSource; private readonly cipher; private readonly activeWorkflowManager; private readonly workflowIndexService; private readonly dataTableDDLService; private dbCredentials; private dbTags; private foreignKeyCommands; constructor(logger: Logger, credentialsRepository: CredentialsRepository, tagRepository: TagRepository, dataSource: DataSource, cipher: Cipher, activeWorkflowManager: ActiveWorkflowManager, workflowIndexService: WorkflowIndexService, dataTableDDLService: DataTableDDLService); initRecords(): Promise; importWorkflows(workflows: IWorkflowWithVersionMetadata[], projectId: string): Promise; replaceInvalidCreds(workflow: IWorkflowBase, projectId: string): Promise; isTableEmpty(tableName: string): Promise; areAllEntityTablesEmpty(tableNames: string[]): Promise; truncateEntityTable(tableName: string, transactionManager: EntityManager): Promise; getImportMetadata(inputDir: string): Promise<{ tableNames: string[]; entityFiles: Record; }>; readEntityFile(filePath: string, customEncryptionKey?: string): Promise>>; private decompressEntitiesZip; importEntities(inputDir: string, truncateTables: boolean, keyFilePath?: string, skipMigrationChecks?: boolean, skipTogglingForeignKeyConstraints?: boolean): Promise; importEntitiesFromFiles(inputDir: string, transactionManager: EntityManager, entityNames: string[], entityFiles: Record, customEncryptionKey?: string): Promise; private toNewCredentialFormat; private normalizeEntityJsonColumns; dropExistingDataTableUserTables(transactionManager: EntityManager): Promise; recreateDataTableUserTablesFromRegistry(transactionManager: EntityManager): Promise; disableForeignKeyConstraints(transactionManager: EntityManager): Promise; enableForeignKeyConstraints(transactionManager: EntityManager): Promise; validateMigrations(inputDir: string, customEncryptionKey?: string): Promise; }