import { a as BucketFile, F as FileInfo, W as WriteContent, c as WriteOptions, B as Bucket, b as BucketInfo } from '../types-ANca2IFa.js'; type GCSAuth = { clientEmail: string; privateKey: string; } | null; declare class GCSFile implements BucketFile { #private; name: string; path: string; constructor(path: string, bucket: string, authPromise: Promise, url?: string, anonymous?: boolean, prefix?: string); slice(start: number, end?: number): GCSFile; info(): Promise; exists(): Promise; text(): Promise; json(): Promise; arrayBuffer(): Promise; blob(): Promise; bytes(): 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 GCSConfig { /** Override the API host (falls back to `GCS_URL`). Use for the * fake-gcs-server emulator, e.g. `http://localhost:4443`. */ url?: string; /** Skip authentication entirely, required by emulators that don't verify * tokens (falls back to `GCS_ANONYMOUS=true`). */ anonymous?: boolean; } declare class GCSBucket implements Bucket { #private; readonly type = "GCS"; PREFIX: string; constructor(bucket: string, config?: GCSConfig); accessToken(): Promise; info(): Promise; scan(filter?: RegExp): AsyncGenerator; list(filter?: RegExp): Promise; file(name: string): GCSFile; folder(path: string): GCSBucket; remove(filter?: RegExp): Promise; count(filter?: RegExp): Promise; [Symbol.asyncIterator](): AsyncGenerator; } /** * Create a Google Cloud Storage bucket handle. * * @param bucket - Bucket name (falls back to `GCS_BUCKET` env var) * * Credentials are resolved in order: * 1. `GOOGLE_APPLICATION_CREDENTIALS` env var → reads the JSON file it points to * 2. `GCS_CLIENT_EMAIL` + `GCS_PRIVATE_KEY` env vars * 3. GCP metadata server (automatic on Cloud Run, GKE, Compute Engine, etc.) * * @param config.url - Override the API host (falls back to `GCS_URL`), * e.g. `http://localhost:4443` for the fake-gcs-server emulator. * @param config.anonymous - Skip authentication (falls back to `GCS_ANONYMOUS`), * required by emulators that don't verify tokens. * * @example * const bucket = GCS("my-bucket"); * await bucket.file("hello.txt").write("hello"); */ declare function GCS(bucket?: string, config?: GCSConfig): GCSBucket; export { Bucket, BucketFile, BucketInfo, FileInfo, type GCSConfig, WriteContent, WriteOptions, GCS as default };