import { a as BucketFile, b as BucketInfo, F as FileInfo, W as WriteContent, c as WriteOptions, B as Bucket } from '../types-ANca2IFa.js'; interface B2BucketContext { info(): Promise; fetch(url: string, options?: RequestInit): Promise; /** Part size for chunked uploads, resolved from the account's auth. */ partSize(): Promise; apiBase: string; PREFIX: string; } declare class B2File implements BucketFile { #private; name: string; path: string; constructor(path: string, bucket: B2BucketContext); slice(start: number, end?: number): B2File; info(): Promise; text(): Promise; json(): Promise; arrayBuffer(): Promise; blob(): Promise; bytes(): Promise; exists(): Promise; write(content: WriteContent, options?: WriteOptions): Promise; copyTo(dest: string | BucketFile): Promise; moveTo(dest: string | BucketFile): Promise; rename(name: string): Promise; remove(): Promise; unlink(): Promise; stream(): ReadableStream; nodeReadable(): NodeJS.ReadableStream; writable(options?: WriteOptions): WritableStream; nodeWritable(options?: WriteOptions): NodeJS.WritableStream; publicUrl(): Promise; signedUrl(opts: { expires: number | string; }): Promise; uploadUrl(_opts: { expires: number | string; }): Promise; } interface B2Config { id?: string; secret?: string; /** Authenticate immediately in the constructor (the default). folder() * clones pass `false` and adopt the parent's resolved auth instead, so a * folder never triggers its own network round-trip. */ eager?: boolean; } declare class BackBlazeInstance implements Bucket { #private; readonly type = "BACKBLAZE"; name: string; id: string; apiBase: string; base: string; PREFIX: string; constructor(name?: string, config?: B2Config); info(): Promise; fetch(url: string, options?: RequestInit): Promise; file(name: string): B2File; folder(path: string): BackBlazeInstance; count(filter?: RegExp): Promise; [Symbol.asyncIterator](): AsyncGenerator; private pages; scan(filter?: RegExp): AsyncGenerator; list(filter?: RegExp): Promise; remove(filter?: RegExp): Promise; } /** * Create a Backblaze B2 bucket handle. * * @param name - Bucket name (falls back to `B2_BUCKET` env var) * @param opts.id - Application Key ID (falls back to `B2_APPLICATION_KEY_ID`) * @param opts.secret - Application Key (falls back to `B2_APPLICATION_KEY`) * * @example * const bucket = BackBlaze("my-bucket", { id: "keyId", secret: "appKey" }); * await bucket.file("hello.txt").write("hello"); */ declare function BackBlaze(name?: string, opts?: { id?: string; secret?: string; }): BackBlazeInstance; export { Bucket, BucketFile, BucketInfo, FileInfo, WriteContent, WriteOptions, BackBlaze as default };