Skip to content

@oneplatform/sdk


@oneplatform/sdk / ClientOptions

Interface: ClientOptions

Defined in: packages/sdk/src/types/client-options.ts:83

Properties

auth?

readonly optional auth?: AuthConfig

Defined in: packages/sdk/src/types/client-options.ts:94

Authentication configuration. Omit to auto-detect (browser → PKCE, Node.js → throws ConfigurationError).


baseUrl

readonly baseUrl: string

Defined in: packages/sdk/src/types/client-options.ts:88

Base URL of the OnePlatform instance. Must NOT have a trailing slash.


fetch?

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

Defined in: packages/sdk/src/types/client-options.ts:112

Custom fetch implementation. Defaults to globalThis.fetch. Inject a mock here for testing.

Call Signature

(input, init?): Promise\<Response>

MDN Reference

Parameters
input

URL | RequestInfo

init?

RequestInit

Returns

Promise\<Response>

Call Signature

(input, init?): Promise\<Response>

MDN Reference

Parameters
input

string | URL | Request

init?

RequestInit

Returns

Promise\<Response>


headers?

readonly optional headers?: Record\<string, string>

Defined in: packages/sdk/src/types/client-options.ts:115

Custom headers merged onto every request. Lower precedence than SDK-managed headers.


logLevel?

readonly optional logLevel?: "debug" | "info" | "warn" | "error" | "silent"

Defined in: packages/sdk/src/types/client-options.ts:118

SDK diagnostic log level. Default: 'warn'


retry?

readonly optional retry?: false | RetryPolicy

Defined in: packages/sdk/src/types/client-options.ts:100

Retry policy. Set to false to disable all retry logic. Defaults to sensible values when omitted.


timeout?

readonly optional timeout?: number

Defined in: packages/sdk/src/types/client-options.ts:106

Per-request timeout in milliseconds. Default: 30000. Set to 0 to disable (not recommended).