Skip to content

WarmHubClientOptions

Options for constructing a WarmHubClient.

optional apiUrl?: string

Override the WarmHub API URL. Defaults to the public WarmHub API.


optional fetch?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Custom fetch implementation for non-standard runtimes or tests.

(input, init?): Promise<Response>

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | URL | Request

RequestInit

Promise<Response>


optional accessToken?: AccessTokenProvider

Static token or sync/async token provider used for authenticated requests.


optional auth?: object

Authentication provider object. Prefer auth.getToken when integrating with an existing session system.

getToken: () => Promise<string | undefined>

Promise<string | undefined>


optional functionLogs?: FunctionLogMode

Control replay of backend function log lines. Defaults to off.


optional client?: object

Self-identification sent on the X-WarmHub-Client header (name/version) for backend observability + read-analytics surface attribution. Defaults to @warmhub/sdk-ts/<SDK_VERSION>. A wrapper such as the WarmHub CLI overrides name (and usually version) to identify itself instead. An untrusted hint — never an authz signal. A per-request X-WarmHub-Client header on a raw request still wins over this default.

optional name?: string

optional version?: string