Interface: ClientOptions
Defined in: packages/sdk/src/types.ts:24
Per-request lifecycle hooks for logging / telemetry.
Extends
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
apiKey | string | Secret API key (pk_live_…). Server-to-server only — never ship to a browser. | - | packages/sdk/src/types.ts:26 |
baseUrl | string | Base URL of the Mailroom deployment, e.g. https://mailroom.example.com | - | packages/sdk/src/types.ts:28 |
defaultBrand? | string | Brand applied to send()/campaign() when the call omits one. | - | packages/sdk/src/types.ts:36 |
fetch? | { (input: URL | RequestInfo, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | Override fetch (tests / non-global-fetch runtimes). | - | packages/sdk/src/types.ts:30 |
headers? | Record<string, string> | Extra headers added to every request (e.g. tracing). | - | packages/sdk/src/types.ts:38 |
maxRetries? | number | Max retries on 429/5xx/network errors. Default 2. | - | packages/sdk/src/types.ts:34 |
onRequest? | (info: { attempt: number; method: string; url: string; }) => void | - | RequestHooks.onRequest | packages/sdk/src/types.ts:19 |
onResponse? | (info: { attempt: number; method: string; status: number; url: string; }) => void | - | RequestHooks.onResponse | packages/sdk/src/types.ts:20 |
onRetry? | (info: { attempt: number; delayMs: number; method: string; reason: string; url: string; }) => void | - | RequestHooks.onRetry | packages/sdk/src/types.ts:21 |
timeoutMs? | number | Per-attempt timeout in ms. Default 30000. | - | packages/sdk/src/types.ts:32 |