import { AwsClient } from "aws4fetch"; import type { Adapter } from "../index.js"; export interface S3FetchAdapterOptions { /** Bucket name. All operations are scoped to it. */ bucket: string; /** * Service endpoint origin, e.g. `https://ACCOUNT.r2.cloudflarestorage.com` * or `https://s3.us-east-1.amazonaws.com`. */ endpoint: string; /** SigV4 signing region. Defaults to `us-east-1`; R2 uses `auto`. */ region?: string; accessKeyId: string; secretAccessKey: string; sessionToken?: string; /** * Use path-style addressing (`https://endpoint/bucket/key`) instead of * virtual-hosted style (`https://bucket.endpoint/key`). */ forcePathStyle?: boolean; /** See {@link import("../s3/index.js").S3AdapterOptions.publicBaseUrl}. */ publicBaseUrl?: string; /** Default expiry, in seconds, for presigned `url()`s. Defaults to 3600. */ defaultUrlExpiresIn?: number; /** Fallback message for unclassified provider errors, e.g. `"R2 error"`. */ providerLabel?: string; /** Adapter `name` to report, e.g. `"r2-http-fetch"`. */ name?: string; /** * Override the `fetch` implementation used for every request — for tests, * or runtimes that hand out a bound/instrumented fetch. Defaults to * `globalThis.fetch`. */ fetch?: (request: Request) => Promise; } export type S3FetchAdapter = Adapter & { readonly bucket: string; }; export declare const s3FetchAdapter: (opts: S3FetchAdapterOptions) => S3FetchAdapter; //# sourceMappingURL=s3-fetch.d.ts.map