import type { SourceControlledFile } from '@n8n/api-types';
import { Logger } from '@n8n/backend-common';
import { FolderRepository, ProjectRepository, SharedCredentialsRepository, SharedWorkflowRepository, TagRepository, WorkflowRepository, WorkflowTagMappingRepository } from '@n8n/db';
import { InstanceSettings } from 'n8n-core';
import { SourceControlScopedService } from './source-control-scoped.service';
import type { ExportResult } from './types/export-result';
import type { SourceControlContext } from './types/source-control-context';
import { VariablesService } from '../../environments.ee/variables/variables.service.ee';
import { DataTableRepository } from '../../modules/data-table/data-table.repository';
export declare class SourceControlExportService {
    private readonly logger;
    private readonly variablesService;
    private readonly tagRepository;
    private readonly projectRepository;
    private readonly sharedCredentialsRepository;
    private readonly sharedWorkflowRepository;
    private readonly workflowRepository;
    private readonly workflowTagMappingRepository;
    private readonly folderRepository;
    private readonly sourceControlScopedService;
    private readonly dataTableRepository;
    private gitFolder;
    private workflowExportFolder;
    private projectExportFolder;
    private credentialExportFolder;
    private dataTableExportFolder;
    constructor(logger: Logger, variablesService: VariablesService, tagRepository: TagRepository, projectRepository: ProjectRepository, sharedCredentialsRepository: SharedCredentialsRepository, sharedWorkflowRepository: SharedWorkflowRepository, workflowRepository: WorkflowRepository, workflowTagMappingRepository: WorkflowTagMappingRepository, folderRepository: FolderRepository, sourceControlScopedService: SourceControlScopedService, instanceSettings: InstanceSettings, dataTableRepository: DataTableRepository);
    getWorkflowPath(workflowId: string): string;
    getCredentialsPath(credentialsId: string): string;
    getDataTablePath(dataTableId: string): string;
    deleteRepositoryFolder(): Promise<void>;
    rmFilesFromExportFolder(filesToBeDeleted: Set<string>): Promise<Set<string>>;
    private writeExportableWorkflowsToExportFolder;
    exportWorkflowsToWorkFolder(candidates: SourceControlledFile[]): Promise<ExportResult>;
    exportGlobalVariablesToWorkFolder(): Promise<ExportResult>;
    exportDataTablesToWorkFolder(candidates: SourceControlledFile[], _context: SourceControlContext): Promise<ExportResult>;
    exportFoldersToWorkFolder(context: SourceControlContext): Promise<ExportResult>;
    exportTagsToWorkFolder(context: SourceControlContext): Promise<ExportResult>;
    exportCredentialsToWorkFolder(candidates: SourceControlledFile[]): Promise<ExportResult>;
    exportTeamProjectsToWorkFolder(candidates: SourceControlledFile[]): Promise<ExportResult>;
}
