Skip to content

RestClientOptions

Defined in: packages/api-client/src/rest/client/RestClient.ts:37

Options passed to RestClient. All callbacks are awaited where applicable so consumers may resolve secrets/tokens lazily.

optional authRouteFragments?: readonly string[]

Defined in: packages/api-client/src/rest/client/RestClient.ts:65

Override the auth-route fragments (paths skipped by token injection). Defaults to DEFAULT_AUTH_ROUTE_FRAGMENTS.


optional baseURL?: string

Defined in: packages/api-client/src/rest/client/RestClient.ts:39

Base URL prepended to every relative request path.


optional debugSigning?: boolean

Defined in: packages/api-client/src/rest/client/RestClient.ts:74

When true, the signing interceptor throws on missing secret instead of silently passing the request through unsigned. Default false.


optional getLanguage?: () => Awaitable<string | null | undefined>

Defined in: packages/api-client/src/rest/client/RestClient.ts:54

Resolver for the user’s preferred language (sent as X-Accept-Language).

Awaitable<string | null | undefined>


optional getSessionToken?: () => Awaitable<string | null | undefined>

Defined in: packages/api-client/src/rest/client/RestClient.ts:52

Resolver for the bearer token. null/undefined triggers anonymous fallback.

Awaitable<string | null | undefined>


optional getSigningSecret?: () => string | undefined

Defined in: packages/api-client/src/rest/client/RestClient.ts:56

Resolver for the HMAC signing secret. Returning undefined disables signing.

string | undefined


optional headers?: Record<string, string>

Defined in: packages/api-client/src/rest/client/RestClient.ts:43

Default headers applied to every request.


optional logger?: Logger

Defined in: packages/api-client/src/rest/client/RestClient.ts:60

Optional logger for non-throwing diagnostics.


optional onUnauthorized?: () => void

Defined in: packages/api-client/src/rest/client/RestClient.ts:58

Invoked on every 401 response.

void


optional signingWhitelist?: readonly object[]

Defined in: packages/api-client/src/rest/client/RestClient.ts:69

Override of the signing whitelist. Defaults to SIGNING_WHITELIST.


optional storage?: StorageAdapter

Defined in: packages/api-client/src/rest/client/RestClient.ts:50

Storage used by the anonymous-id provider. Defaults to a fresh MemoryStorageAdapter() — suitable for SSR and tests but does NOT persist across page loads. Web consumers should pass createWebSessionStorageAdapter() from @eventista/sdk-api-client/adapters/web.


optional timeout?: number

Defined in: packages/api-client/src/rest/client/RestClient.ts:41

Per-request timeout in milliseconds, forwarded to apisauce/axios.