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.
Properties
Section titled “Properties”authRouteFragments?
Section titled “authRouteFragments?”
optionalauthRouteFragments?: readonlystring[]
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.
baseURL?
Section titled “baseURL?”
optionalbaseURL?:string
Defined in: packages/api-client/src/rest/client/RestClient.ts:39
Base URL prepended to every relative request path.
debugSigning?
Section titled “debugSigning?”
optionaldebugSigning?: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.
getLanguage?
Section titled “getLanguage?”
optionalgetLanguage?: () =>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).
Returns
Section titled “Returns”Awaitable<string | null | undefined>
getSessionToken?
Section titled “getSessionToken?”
optionalgetSessionToken?: () =>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.
Returns
Section titled “Returns”Awaitable<string | null | undefined>
getSigningSecret?
Section titled “getSigningSecret?”
optionalgetSigningSecret?: () =>string|undefined
Defined in: packages/api-client/src/rest/client/RestClient.ts:56
Resolver for the HMAC signing secret. Returning undefined disables signing.
Returns
Section titled “Returns”string | undefined
headers?
Section titled “headers?”
optionalheaders?:Record<string,string>
Defined in: packages/api-client/src/rest/client/RestClient.ts:43
Default headers applied to every request.
logger?
Section titled “logger?”
optionallogger?:Logger
Defined in: packages/api-client/src/rest/client/RestClient.ts:60
Optional logger for non-throwing diagnostics.
onUnauthorized?
Section titled “onUnauthorized?”
optionalonUnauthorized?: () =>void
Defined in: packages/api-client/src/rest/client/RestClient.ts:58
Invoked on every 401 response.
Returns
Section titled “Returns”void
signingWhitelist?
Section titled “signingWhitelist?”
optionalsigningWhitelist?: readonlyobject[]
Defined in: packages/api-client/src/rest/client/RestClient.ts:69
Override of the signing whitelist. Defaults to SIGNING_WHITELIST.
storage?
Section titled “storage?”
optionalstorage?: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.
timeout?
Section titled “timeout?”
optionaltimeout?:number
Defined in: packages/api-client/src/rest/client/RestClient.ts:41
Per-request timeout in milliseconds, forwarded to apisauce/axios.