import { type PutOptions, type StorageAdapter, type StoredObject } from './types.js'; /** * Structural type for the R2 Workers binding — only the surface actually used, declared locally so * `@taprootcms/core` does not need `@cloudflare/workers-types` to be installed downstream. */ export interface R2BucketLike { put(key: string, value: ArrayBuffer | Uint8Array, options?: { httpMetadata?: { contentType?: string; cacheControl?: string; }; }): Promise; get(key: string): Promise<{ arrayBuffer(): Promise; } | null>; delete(key: string): Promise; head(key: string): Promise; } export interface R2StorageConfig { bucket: R2BucketLike; /** * Public base URL the bucket is served from — either an R2 custom domain or a Worker route that * proxies it. Without one, uploaded media has no reachable URL. */ publicBaseUrl: string; } /** R2-backed storage for the Cloudflare Workers deployment target. */ export declare class R2StorageAdapter implements StorageAdapter { #private; readonly name: "r2"; constructor(config: R2StorageConfig); put(key: string, body: Uint8Array | ArrayBuffer, options?: PutOptions): Promise; get(key: string): Promise; delete(key: string): Promise; exists(key: string): Promise; publicUrl(key: string): string; }