Skip to content

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.

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.

ListConversationsOptions = {}

Promise<Page<ChatConversation>>


get(conversationId): Promise<ChatConversation>

Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:36

string

Promise<ChatConversation>


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.

CreateConversationInput

Promise<ChatConversation>


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.

string

UpdateConversationInput

Promise<ChatConversation>


delete(conversationId): Promise<void>

Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:51

Soft delete; needs conversations.delete.

string

Promise<void>


listMembers(conversationId, options?): Promise<Page<ChatMember>>

Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:55

string

ListOptions = {}

Promise<Page<ChatMember>>


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.

string

string

Promise<ChatMember>


removeMember(conversationId, userId): Promise<void>

Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:64

string

string

Promise<void>


join(conversationId): Promise<ChatMember>

Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:69

Joins a PUBLIC channel (needs conversations.read).

string

Promise<ChatMember>


leave(conversationId): Promise<void>

Defined in: libs/ccs-chat-user-client/src/resources/conversations.resource.ts:74

Leaves a GROUP or CHANNEL — always allowed.

string

Promise<void>