ChatClient
Defined in: libs/ccs-chat-client/src/chat-client.ts:57
Server-side SDK for a trusted tenant backend integrating with Chat through a machine client — e.g. a Fitness backend that decides which coach may talk to which client, then creates that conversation and posts on behalf of one of them.
- Tokens: RFC 6749
client_credentials, form-encoded at{issuerUrl}/oauth/tokenwith HTTP Basic auth,scopeandresource; cached untilexp - 60 s. - Every call goes to
/tenants/:tenant_id/applications/:application_id/...for the configured context, which must be the client’s own (Chat binds a machine client to its tenant/app, D9). - Errors are typed: ChatUnauthorizedError (401), ChatForbiddenError (403), ChatNotFoundError (404), ChatUnprocessableError (422), otherwise ChatApiError.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ChatClient(
options):ChatClient
Defined in: libs/ccs-chat-client/src/chat-client.ts:75
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”ChatClient
Properties
Section titled “Properties”conversations
Section titled “conversations”
readonlyconversations:ConversationsResource
Defined in: libs/ccs-chat-client/src/chat-client.ts:58
channels
Section titled “channels”
readonlychannels:ChannelsResource
Defined in: libs/ccs-chat-client/src/chat-client.ts:60
Convenience over conversations with type: 'CHANNEL'.
messages
Section titled “messages”
readonlymessages:MessagesResource
Defined in: libs/ccs-chat-client/src/chat-client.ts:61
readonlyusers:UsersResource
Defined in: libs/ccs-chat-client/src/chat-client.ts:62