import type { FetchFn } from "./types.js"; /** * Configuration for the bearer-token fetch wrapper. */ export interface BearerFetchOptions { /** * When `true` (default), the returned `FetchFn` is also wrapped with * `retryFetch` for automatic retry on HTTP 429. * Pass `false` for raw bearer injection only. * @default true */ retry?: boolean; } /** * Create a `FetchFn` that injects a Bearer Authorization header into every request. * * When `accessToken` is `undefined` or empty, requests are sent without an * Authorization header (useful for public/anonymous access). * * By default the returned function is also wrapped with `retryFetch` (retry * on 429 with linear backoff). Pass `{ retry: false }` to opt out. * * Usage: * ```ts * const fetchFn = bearerFetch(session.accessToken); * const client = new FhirReadClient(baseUrl, "Patient", fetchFn); * ``` */ export declare function bearerFetch(accessToken?: string, options?: BearerFetchOptions): FetchFn; //# sourceMappingURL=bearer-fetch.d.ts.map