import * as BunnyStorageSDK from "@bunny.net/storage-sdk"; import type { Adapter } from "../index.js"; import { FilesError } from "../internal/errors.js"; export type BunnyStorageRegion = `${BunnyStorageSDK.regions.StorageRegion}`; export interface BunnyStorageAdapterOptions { /** * Bunny Storage zone name. Falls back to `BUNNY_STORAGE_ZONE`, then * `STORAGE_ZONE` (the convention used in the SDK's README example). */ zone?: string; /** * Bunny Storage zone password / API access key. Falls back to * `BUNNY_STORAGE_ACCESS_KEY`, then `STORAGE_ACCESS_KEY` (the convention * used in the SDK's README example). */ accessKey?: string; /** * Primary Bunny Storage region. Pass one of * `BunnyStorageSDK.regions.StorageRegion.*`, e.g. `"de"`, `"ny"`, `"syd"`. * Falls back to `BUNNY_STORAGE_REGION`, then `STORAGE_REGION`. */ region?: BunnyStorageRegion; /** * Existing connected storage zone from `@bunny.net/storage-sdk`. Highest * precedence; when provided, `zone`, `accessKey`, and `region` are ignored. */ client?: BunnyStorageClient; /** * Origin used to build URLs from `url()`, typically a Bunny Pull Zone or * custom CDN hostname in front of the Storage Zone. When unset, `url()` * throws because the Storage API requires an `AccessKey` header and has no * signed-read URL primitive. */ publicBaseUrl?: string; } export type BunnyStorageClient = ReturnType; export type BunnyStorageAdapter = Adapter & { readonly zone: string; }; export declare const mapBunnyStorageError: (err: unknown) => FilesError; export declare const bunnyStorage: (opts?: BunnyStorageAdapterOptions) => BunnyStorageAdapter; //# sourceMappingURL=index.d.ts.map