/** * A `fetch`-compatible transport. Matches the platform `fetch` signature so * the global can be used directly, and so Node callers can inject a * proxy-tunneling implementation (see the CLI's `getProxyFetch`, which wraps * undici's `ProxyAgent`) — the global `fetch` does not honor `HTTPS_PROXY` / * `HTTP_PROXY` on its own. */ export type FetchLike = (input: string | URL, init?: RequestInit) => Promise; /** * Optional transport overrides for the underlying HTTP client. * * The client is `fetch`-based (edge/browser/Node all expose `fetch`), so the * only override that matters now is `fetch` itself. Node callers behind an * HTTP/HTTPS proxy pass a proxy-tunneling `fetch` here; browser and edge * builds omit it and use the platform global. */ export type ClientTransport = { /** * Override the `fetch` implementation used for every request. Defaults to * the platform global when omitted. Node callers behind an HTTP/HTTPS proxy * pass a proxy-tunneling `fetch` (undici `ProxyAgent`) here, since the global * `fetch` does not honor proxy env vars. */ fetch?: FetchLike; }; export type ClientDependencies = { baseUrl: string; transport?: ClientTransport; }; /** * The resolved HTTP client: a base URL (with the `/v1` prefix already * applied) and the `fetch` implementation to use. */ export type Client = { /** Base URL including the `/v1` API prefix. */ baseUrl: string; transport: ClientTransport | undefined; fetchImpl: FetchLike; }; export declare const buildClient: (dependencies: ClientDependencies) => Client; //# sourceMappingURL=client.d.ts.map