UNPKG

@codai/memorai

Version:

Universal Database & Storage Service for CODAI Ecosystem - CBD Backend

32 lines 1.14 kB
/** * Storage Service - Production Implementation */ import { EventEmitter } from 'events'; import type { StorageFile, StorageUpload, MemoraiConfig } from '../types'; export declare class StorageService extends EventEmitter { private config; private isInitialized; private storagePath; constructor(config: MemoraiConfig['storage']); initialize(): Promise<void>; shutdown(): Promise<void>; upload(file: StorageUpload, filePath: string): Promise<StorageFile>; download(filePath: string): Promise<Buffer>; delete(filePath: string): Promise<boolean>; getUrl(filePath: string, expiresIn?: number): Promise<string>; list(prefix?: string): Promise<StorageFile[]>; copy(fromPath: string, toPath: string): Promise<boolean>; move(fromPath: string, toPath: string): Promise<boolean>; getHealth(): Promise<{ status: string; details?: any; }>; private validateFile; private generateFilePath; private processImage; private isImageFile; private calculateFileHash; private getMimeType; private generateUrl; } //# sourceMappingURL=StorageService.d.ts.map