WarmHubClientOptions
Options for constructing a WarmHubClient.
Properties
Section titled “Properties”apiUrl?
Section titled “apiUrl?”
optionalapiUrl?:string
Override the WarmHub API URL. Defaults to the public WarmHub API.
fetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Custom fetch implementation for non-standard runtimes or tests.
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
accessToken?
Section titled “accessToken?”
optionalaccessToken?:AccessTokenProvider
Static token or sync/async token provider used for authenticated requests.
optionalauth?:object
Authentication provider object. Prefer auth.getToken when integrating with an existing session system.
getToken
Section titled “getToken”getToken: () =>
Promise<string|undefined>
Returns
Section titled “Returns”Promise<string | undefined>
functionLogs?
Section titled “functionLogs?”
optionalfunctionLogs?:FunctionLogMode
Control replay of backend function log lines. Defaults to off.
client?
Section titled “client?”
optionalclient?:object
Self-identification sent on the X-WarmHub-Client header (name/version)
for backend observability, compatibility admission, and read-analytics
surface attribution. Defaults to @warmhub/sdk-ts/<SDK_VERSION>. A wrapper
such as the WarmHub CLI overrides both values to identify its actual
released artifact. An untrusted safety hint — never an authz signal. A
per-request X-WarmHub-Client header on a raw request still wins over this
default.
optionalname?:string
version?
Section titled “version?”
optionalversion?:string
clientFlags?
Section titled “clientFlags?”
optionalclientFlags?: readonlystring[]
Client-declared opt-in flags sent on X-WarmHub-Client-Flags. Flag names
are defined by the backend deployment; see your deployment’s
documentation. Grammar-checked here; validated and honored only by the
server. Untrusted intent — never an authz signal.
decorateResponses?
Section titled “decorateResponses?”
optionaldecorateResponses?:boolean
Opt into response auto-decoration. Query results are walked for durable
reference tokens; one batched thing.headVersions lookup resolves them
under this caller’s authority, and the result carries an additive
decorations record mapping each bare durable id to its canonical wref.
Unreadable and nonexistent ids get no entry. Costs one extra request per
decorated response, chunked into further requests past 500 distinct ids;
a failed lookup fails the read with the error marked
WarmHubError.decorationFailure. Defaults to false.