ConversationsResource
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:18
The caller’s conversations in the client’s tenant/application context. In an embedded
integration, the tenant’s backend usually creates conversations (it owns the business rules for
who may talk to whom), and users only read and write in them — create answers 403 unless the
user’s roles hold conversations.create in this context.
Methods
Section titled “Methods”list()
Section titled “list()”list(
options?):Promise<Page<ChatConversation>>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:32
Conversations the caller is a member of, plus PUBLIC channels; most recently active first.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<Page<ChatConversation>>
get(
conversationId):Promise<ChatConversation>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:36
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
Returns
Section titled “Returns”Promise<ChatConversation>
create()
Section titled “create()”create(
input):Promise<ChatConversation>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:41
Needs conversations.create (+ groups.create / channels.create). DIRECT dedupes on its two members.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ChatConversation>
update()
Section titled “update()”update(
conversationId,patch):Promise<ChatConversation>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:46
GROUP/CHANNEL owners and admins, or groups.manage / channels.manage. DIRECT conversations can’t be changed.
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
Returns
Section titled “Returns”Promise<ChatConversation>
delete()
Section titled “delete()”delete(
conversationId):Promise<void>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:51
Soft delete; needs conversations.delete.
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
Returns
Section titled “Returns”Promise<void>
listMembers()
Section titled “listMembers()”listMembers(
conversationId,options?):Promise<Page<ChatMember>>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:55
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
options?
Section titled “options?”ListOptions = {}
Returns
Section titled “Returns”Promise<Page<ChatMember>>
addMember()
Section titled “addMember()”addMember(
conversationId,userId):Promise<ChatMember>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:60
GROUP owners/admins with groups.create, groups.manage, or channels.manage for a CHANNEL.
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
userId
Section titled “userId”string
Returns
Section titled “Returns”Promise<ChatMember>
removeMember()
Section titled “removeMember()”removeMember(
conversationId,userId):Promise<void>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:64
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
userId
Section titled “userId”string
Returns
Section titled “Returns”Promise<void>
join()
Section titled “join()”join(
conversationId):Promise<ChatMember>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:69
Joins a PUBLIC channel (needs conversations.read).
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
Returns
Section titled “Returns”Promise<ChatMember>
leave()
Section titled “leave()”leave(
conversationId):Promise<void>
Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:74
Leaves a GROUP or CHANNEL — always allowed.
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
Returns
Section titled “Returns”Promise<void>