import { S3Client } from '@aws-sdk/client-s3'; import { Adapter } from '../index.js'; interface IbmCosAdapterOptions { bucket: string; /** * IBM Cloud Object Storage region code, e.g. `"us-south"`, `"us-east"`, * `"eu-de"`, `"eu-gb"`, `"eu-es"`, `"jp-tok"`, `"jp-osa"`, `"au-syd"`, * `"br-sao"`, `"ca-tor"`. Drives the endpoint host * (`https://s3..cloud-object-storage.appdomain.cloud`); there's * no env-var fallback. Doubles as the SigV4 region. */ region: string; /** * Override the IBM COS endpoint. When unset, defaults to the public * `https://s3.${region}.cloud-object-storage.appdomain.cloud`. For * direct (no-egress) access from inside the same IBM Cloud region, pass * `https://s3.direct.${region}.cloud-object-storage.appdomain.cloud` * (or the equivalent `private` host). IBM COS routes by Host header. */ endpoint?: string; /** * HMAC access key ID. Generate HMAC credentials when creating the IBM COS * service credential (Advanced options → "Include HMAC Credential") — * separate from IBM Cloud IAM API keys. */ accessKeyId?: string; secretAccessKey?: string; /** * Use path-style addressing (`//`) rather than virtual-hosted * style. Defaults to `false` — virtual-hosted is canonical for IBM COS. */ forcePathStyle?: boolean; /** * Origin used to build URLs from `url()`. When set, `url(key)` returns * `${publicBaseUrl}/${key}` and skips signing. For buckets with a public * access policy the natural value is * `https://${bucket}.s3.${region}.cloud-object-storage.appdomain.cloud`; * a custom CNAME fronting the bucket also works. 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 IbmCosAdapter = Adapter; declare const ibmCos: (opts: IbmCosAdapterOptions) => IbmCosAdapter; export { type IbmCosAdapter, type IbmCosAdapterOptions, ibmCos };