import { DownloadResult, ListOptions, ListResult, SignedUploadOptions, SignedUploadUrl, Storage, UploadResult } from "emdash"; //#region src/storage/r2.d.ts /** * R2 Storage implementation using native bindings */ declare class R2Storage implements Storage { private bucket; private publicUrl?; constructor(bucket: R2Bucket, publicUrl?: string); upload(options: { key: string; body: Buffer | Uint8Array | ReadableStream; contentType: string; }): Promise; download(key: string): Promise; delete(key: string): Promise; exists(key: string): Promise; list(options?: ListOptions): Promise; getSignedUploadUrl(_options: SignedUploadOptions): Promise; getPublicUrl(key: string): string; } /** * Create R2 storage adapter * This is the factory function called at runtime * * Uses cloudflare:workers to access bindings directly. */ declare function createStorage(config: Record): Storage; //#endregion export { R2Storage, createStorage };