import { S3Client } from '@aws-sdk/client-s3'; import { Adapter } from '../index.js'; interface BackblazeB2AdapterOptions { bucket: string; /** * Backblaze B2 cluster code, e.g. `"us-west-000"`, `"us-west-001"`, * `"us-west-002"`, `"us-east-004"`, `"us-east-005"`, `"eu-central-003"`. * Drives the endpoint host (`https://s3..backblazeb2.com`); there's * no env-var fallback. Doubles as the SigV4 region. The cluster a bucket * lives in is shown in the B2 console; pick the wrong one and you'll see * a `301` redirect from B2. */ region: string; /** * Override the B2 endpoint. When unset, defaults to * `https://s3.${region}.backblazeb2.com`. B2 routes by Host header — the * SDK prepends the bucket subdomain for virtual-hosted style. */ endpoint?: string; accessKeyId?: string; secretAccessKey?: string; /** * Use path-style addressing (`//`) rather than virtual-hosted * style. Defaults to `false` — virtual-hosted is canonical for B2. */ forcePathStyle?: boolean; /** * Origin used to build URLs from `url()`. When set, `url(key)` returns * `${publicBaseUrl}/${key}` and skips signing. For public buckets the * natural value is the friendly download URL prefix * `https://f.backblazeb2.com/file/` (look it up in the B2 * console under your bucket → "Endpoint"), or a custom domain proxied * through Cloudflare. When unset, `url()` falls back to a presigned * GetObject (default expiry: 1 hour). */ publicBaseUrl?: string; /** * Default expiry, in seconds, for the presigned URLs returned by `url()` * when `publicBaseUrl` is not set. Defaults to 3600 (1 hour). */ defaultUrlExpiresIn?: number; } type BackblazeB2Adapter = Adapter; declare const backblazeB2: (opts: BackblazeB2AdapterOptions) => BackblazeB2Adapter; export { type BackblazeB2Adapter, type BackblazeB2AdapterOptions, backblazeB2 };