import fs from 'node:fs'; import { FileInfo, IStorageProvider, StorageResult, StorageSizeResult } from './IStorageProvider'; export declare abstract class BaseStorageProvider implements IStorageProvider { protected storagePath: string; constructor(); abstract getStorageType(): string; abstract getConfig(): any; abstract addBase64FilesToStorage(fileBase64: string, chatflowid: string, fileNames: string[], orgId: string): Promise; abstract addArrayFilesToStorage(mime: string, bf: Buffer, fileName: string, fileNames: string[], ...paths: string[]): Promise; abstract addSingleFileToStorage(mime: string, bf: Buffer, fileName: string, ...paths: string[]): Promise; abstract getFileFromUpload(filePath: string): Promise; abstract getFileFromStorage(file: string, ...paths: string[]): Promise; abstract getFilesListFromStorage(...paths: string[]): Promise; abstract streamStorageFile(chatflowId: string, chatId: string, fileName: string, orgId: string): Promise; abstract removeFilesFromStorage(...paths: string[]): Promise; abstract removeSpecificFileFromUpload(filePath: string): Promise; abstract removeSpecificFileFromStorage(...paths: string[]): Promise; abstract removeFolderFromStorage(...paths: string[]): Promise; abstract getStorageSize(orgId: string): Promise; abstract getMulterStorage(): any; abstract getLoggerTransports(logType: 'server' | 'error' | 'requests' | 'audit', config?: any): any[]; /** * Shared utility for sanitizing filenames to prevent path traversal and other issues */ protected sanitizeFilename(filename: string): string; /** * Shared utility for getting the base storage path */ protected getStoragePath(): string; /** * Shared utility for validating chatflowId format (UUID) */ protected validateChatflowId(chatflowId: string): void; /** * Shared utility for checking path traversal attempts */ protected validatePathSecurity(...paths: string[]): void; /** * Shared utility for building a storage path from components */ protected buildPath(...paths: string[]): string; }