ChatNotificationsClientOptions
Defined in: core/types.ts:111
Extended by
Section titled “Extended by”Properties
Section titled “Properties”chatApiUrl
Section titled “chatApiUrl”chatApiUrl:
string
Defined in: core/types.ts:113
Base URL of the Chat API, e.g. https://chat.centralcodestation.com/api/v1
tenantId
Section titled “tenantId”tenantId:
string
Defined in: core/types.ts:115
The tenant (Identity Server tenant id) whose Chat events to receive.
applicationId
Section titled “applicationId”applicationId:
string
Defined in: core/types.ts:117
The application context within that tenant (the Chat app itself, or a tenant application).
getAccessToken
Section titled “getAccessToken”getAccessToken: () =>
string|Promise<string|null|undefined> |null|undefined
Defined in: core/types.ts:119
Returns the current user’s own CCS access token (a user-session JWT) — sync or async, re-read on every (re)connect so a refreshed token is picked up automatically.
Returns
Section titled “Returns”string | Promise<string | null | undefined> | null | undefined
fetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: core/types.ts:121
Override the fetch implementation (tests, or a runtime with no global fetch). Defaults to globalThis.fetch.
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>
eventSourceFactory?
Section titled “eventSourceFactory?”
optionaleventSourceFactory?: (url) =>ChatEventSourceLike
Defined in: core/types.ts:123
Override how an event stream connection is created (tests, or a runtime needing an EventSource polyfill). Defaults to new globalThis.EventSource(url).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”tokenRefreshBufferSeconds?
Section titled “tokenRefreshBufferSeconds?”
optionaltokenRefreshBufferSeconds?:number
Defined in: core/types.ts:125
Seconds before the minted realtime token’s expiry to proactively reconnect with a fresh one. Default 30.
debug?
Section titled “debug?”
optionaldebug?:boolean
Defined in: core/types.ts:127
Logs connection lifecycle and error detail to the console (prefixed [ChatNotificationsClient]) — off by default, since stream errors are otherwise swallowed on purpose (a flaky realtime connection must never throw into caller code). Turn on while developing/debugging a connection issue.