/** * File Storage Engine - CBD Universal Data Platform * 6th Paradigm: File/Blob Storage with AI Intelligence * * Features: * - Multi-cloud file storage (AWS S3, Azure Blob, GCP Storage) * - AI-powered content analysis and indexing * - Intelligent cloud selection and cost optimization * - Seamless integration with structured data paradigms * - Universal search across all data types */ import { Buffer } from 'buffer'; import { EventEmitter } from 'events'; export interface FileDocument { readonly id?: string; readonly filename: string; readonly contentType: string; readonly size: number; readonly content: Buffer; readonly metadata?: Record; readonly tags?: string[]; readonly bucket?: string; } export interface FileResult { readonly id: string; readonly filename: string; readonly contentType: string; readonly size: number; readonly url: string; readonly cdnUrl?: string; readonly hash: string; readonly metadata: FileMetadata; readonly timestamp: Date; readonly cloudProvider?: string; readonly bucket: string; } export interface FileMetadata { readonly contentType: string; readonly size: number; readonly hash: string; readonly lastModified: Date; readonly tags: string[]; readonly analysis?: ContentAnalysis; readonly custom?: Record; } export interface ContentAnalysis { readonly textContent?: string; readonly language?: string; readonly sentiment?: number; readonly keywords: string[]; readonly categories: string[]; readonly confidence: number; readonly embeddings?: number[]; readonly duplicateOf?: string; } export interface FileSearchOptions { readonly limit?: number; readonly offset?: number; readonly contentType?: string; readonly tags?: string[]; readonly similarity?: number; readonly includeContent?: boolean; } export interface FileSearchResult { readonly files: FileResult[]; readonly total: number; readonly searchTime: number; readonly query: string; } export interface CloudStorageAdapter { store(bucket: string, key: string, file: Buffer, metadata: FileMetadata): Promise; retrieve(bucket: string, key: string): Promise; delete(bucket: string, key: string): Promise; exists(bucket: string, key: string): Promise; list(bucket: string, prefix?: string): Promise; } export interface CloudStorageResult { readonly url: string; readonly cloudProvider: string; readonly region: string; readonly storageClass?: string; readonly requestId: string; } export declare class FileStorageEngine extends EventEmitter { private fileStore; private buckets; private contentAnalyzer; private cloudSelector; private _cloudAdapters; constructor(); private initializeCloudAdapters; initialize(): Promise; upload(bucket: string, file: FileDocument): Promise; download(bucket: string, key: string): Promise; getContent(bucket: string, key: string): Promise; delete(bucket: string, key: string): Promise; list(bucket: string, prefix?: string): Promise; search(bucket: string, query: string, options?: FileSearchOptions): Promise; getStats(): Record; private storeInCloud; private deleteFromCloud; private selectStorageClass; private calculateRelevanceScore; private getContentTypeStats; private getCloudProviderStats; } //# sourceMappingURL=FileStorageEngine.d.ts.map