import { DataSource } from "../storage.mjs"; interface R2GetOptions { range?: { offset: number; length: number; }; } interface R2ObjectBody { arrayBuffer: () => Promise; } interface R2HeadObject { size: number; } interface R2ListResult { objects: Array<{ key: string; }>; truncated: boolean; cursor?: string; } interface R2ListOptions { prefix?: string; cursor?: string; limit?: number; } interface R2BucketLike { get: (key: string, options?: R2GetOptions) => Promise; put: (key: string, bytes: Uint8Array) => Promise; delete: (keys: string | string[]) => Promise; list: (options?: R2ListOptions) => Promise; head: (key: string) => Promise; } interface R2DataSourceOptions { /** * R2 bucket binding. Structurally typed — pass a Cloudflare `R2Bucket` or * any object with the same get/put/delete/list/head surface. */ bucket: R2BucketLike; /** * When set, `uri(key)` returns `r2://{bucketName}/{key}` for DuckDB httpfs * reads. Omit if the backing DuckDB can't resolve `r2://` URIs and the * caller should fall back to `read(key)` for bytes. */ bucketName?: string; } declare function createR2DataSource(options: R2DataSourceOptions): DataSource; export { R2DataSourceOptions, createR2DataSource };