/** * R2Adapter - Cloudflare R2 storage adapter * Optimized for blob storage, large objects, and cold tier data */ import { BlobAdapter, StorageResult, PerformanceMetrics, AdapterConfig } from '../interfaces/storage-engine'; export interface R2Config extends AdapterConfig { bucket: R2Bucket; defaultCacheControl: string; maxObjectSize: number; enableMultipartThreshold: number; compressionEnabled: boolean; enableChecksums: boolean; customMetadataLimit: number; } export interface R2ObjectMetadata { contentType?: string; contentEncoding?: string; cacheControl?: string; contentDisposition?: string; contentLanguage?: string; expires?: string; customMetadata?: Record; checksums?: { md5?: string; sha1?: string; sha256?: string; }; } export interface R2ListResult { objects: Array<{ key: string; size: number; etag: string; lastModified: Date; storageClass?: string; checksums?: Record; }>; truncated: boolean; continuationToken?: string; } export declare class R2Adapter implements BlobAdapter { readonly backend = "r2"; private r2; private config; private metrics; private uploadProgressCallbacks; constructor(config: R2Config); initialize(): Promise; destroy(): Promise; health(): Promise; getMetrics(): Promise; put(key: string, data: ArrayBuffer | Uint8Array, metadata?: Record): Promise>; get(key: string): Promise; }>>; delete(key: string): Promise>; list(prefix?: string, limit?: number): Promise>>; head(key: string): Promise; }>>; getRange(key: string, start: number, end: number): Promise>; putMany(objects: Array<{ key: string; data: ArrayBuffer | Uint8Array; metadata?: Record; }>): Promise>; deleteMany(keys: string[]): Promise>; putDocument(collection: string, id: string, document: any, compress?: boolean): Promise>; putVector(collection: string, id: string, vector: Float32Array, metadata?: any): Promise>; putTimeSeries(metric: string, timeRange: string, data: ArrayBuffer): Promise>; private validateKey; private validateObjectSize; private preprocessData; private postprocessData; private buildR2Metadata; private extractMetadata; private isHttpMetadata; private putMultipart; private chunkArray; private updateMetrics; private createStorageError; private isRetryableError; } //# sourceMappingURL=r2-adapter.d.ts.map