import { FileKeyEncoded, FileKeyParts } from "../keys.js"; import { StorageAdapterCapabilities, StorageAdapterRecommendations, UploadChecksum } from "./types.js"; import { S3CompatibleStorageAdapterOptions } from "./s3.js"; //#region src/storage/r2.d.ts type R2StorageAdapterOptions = Omit & { maxMetadataBytes?: number; }; declare function createR2StorageAdapter(options: R2StorageAdapterOptions): { name: string; limits: { maxMetadataBytes: number; maxSingleUploadBytes?: number; maxMultipartUploadBytes?: number; minMultipartPartSizeBytes?: number; maxMultipartPartSizeBytes?: number; maxMultipartParts?: number; maxStorageKeyLengthBytes?: number; }; capabilities: StorageAdapterCapabilities; recommendations?: StorageAdapterRecommendations; resolveStorageKey(input: { fileKey: FileKeyEncoded; fileKeyParts: FileKeyParts; }): string; initUpload(input: { fileKey: FileKeyEncoded; fileKeyParts: FileKeyParts; sizeBytes: bigint; contentType: string; checksum?: UploadChecksum | null; metadata?: Record | null; }): Promise<{ strategy: "direct-single" | "direct-multipart" | "proxy"; storageKey: string; storageUploadId?: string; partSizeBytes?: number; expiresAt: Date; uploadUrl?: string; uploadHeaders?: Record; }>; getPartUploadUrls?(input: { storageKey: string; storageUploadId: string; partNumbers: number[]; partSizeBytes: number; }): Promise<{ partNumber: number; url: string; headers?: Record; }[]>; completeMultipartUpload?(input: { storageKey: string; storageUploadId: string; parts: { partNumber: number; etag: string; }[]; }): Promise<{ etag?: string; }>; abortMultipartUpload?(input: { storageKey: string; storageUploadId: string; }): Promise; writeStream?(input: { storageKey: string; body: ReadableStream; contentType?: string | null; sizeBytes?: bigint | null; }): Promise<{ etag?: string; sizeBytes?: bigint; }>; finalizeUpload?(input: { storageKey: string; expectedSizeBytes: bigint; checksum?: UploadChecksum | null; }): Promise<{ sizeBytes?: bigint; etag?: string; }>; deleteObject(input: { storageKey: string; }): Promise; getDownloadUrl?(input: { storageKey: string; expiresInSeconds: number; contentDisposition?: string; contentType?: string; }): Promise<{ url: string; headers?: Record; expiresAt: Date; }>; getDownloadStream?(input: { storageKey: string; }): Promise; }; //# sourceMappingURL=r2.d.ts.map //#endregion export { R2StorageAdapterOptions, createR2StorageAdapter }; //# sourceMappingURL=r2.d.ts.map