UseChatNotificationsOptions
Defined in: react/use-chat-notifications.ts:5
Extends
Section titled “Extends”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
Inherited from
Section titled “Inherited from”ChatNotificationsClientOptions.chatApiUrl
tenantId
Section titled “tenantId”tenantId:
string
Defined in: core/types.ts:115
The tenant (Identity Server tenant id) whose Chat events to receive.
Inherited from
Section titled “Inherited from”ChatNotificationsClientOptions.tenantId
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).
Inherited from
Section titled “Inherited from”ChatNotificationsClientOptions.applicationId
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
Inherited from
Section titled “Inherited from”ChatNotificationsClientOptions.getAccessToken
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>
Inherited from
Section titled “Inherited from”ChatNotificationsClientOptions.fetch
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”Inherited from
Section titled “Inherited from”ChatNotificationsClientOptions.eventSourceFactory
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.
Inherited from
Section titled “Inherited from”ChatNotificationsClientOptions.tokenRefreshBufferSeconds
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.
Inherited from
Section titled “Inherited from”ChatNotificationsClientOptions.debug
enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: react/use-chat-notifications.ts:7
When false, the client stays (or becomes) disconnected — flip to true once e.g. the user is authenticated. Defaults to true.