/** * Utilities for file handling and validation */ import type { DocumentType, FileMetadata, ValidationResult, StorageConfig } from '../types'; /** * Get document type from MIME type */ export declare function getDocumentType(mimeType: string): DocumentType; /** * Get file extension from filename */ export declare function getFileExtension(filename: string): string; /** * Extract file metadata */ export declare function getFileMetadata(file: File): FileMetadata; /** * Validate file against storage configuration */ export declare function validateFile(file: File, config: StorageConfig): ValidationResult; /** * Format file size in human readable format */ export declare function formatFileSize(bytes: number): string; /** * Generate unique filename */ export declare function generateUniqueFilename(originalName: string): string; /** * Generate storage path */ export declare function generateStoragePath(file: File, options?: { prefix?: string; leadId?: string; productId?: string; userId?: string; category?: string; generateUnique?: boolean; }): string; /** * Calculate upload progress */ export declare function calculateProgress(loaded: number, total: number): { percentage: number; speed?: number; timeRemaining?: number; }; /** * Sanitize filename for storage */ export declare function sanitizeFilename(filename: string): string; /** * Check if file is an image */ export declare function isImage(file: File): boolean; /** * Check if file is a PDF */ export declare function isPDF(file: File): boolean; /** * Check if file is a document */ export declare function isDocument(file: File): boolean; /** * Get MIME type from file extension (fallback) */ export declare function getMimeTypeFromExtension(extension: string): string; /** * Default storage configuration */ export declare const DEFAULT_STORAGE_CONFIG: StorageConfig; export declare const DEFAULT_DATABASE_CONFIG: { enableRLS: boolean; autoSelect: boolean; maxRetries: number; retryDelay: number; timeout: number; cacheTimeout: number; enableOptimisticUpdates: boolean; enableRealtime: boolean; enableCache: boolean; }; export declare const DEFAULT_REALTIME_CONFIG: { enablePresence: boolean; enableBroadcast: boolean; autoConnect: boolean; reconnectDelay: number; maxReconnectAttempts: number; heartbeatInterval: number; presenceTimeout: number; }; //# sourceMappingURL=index.d.ts.map