Skip to content

Group

Defined in: sdks/js/node-sdk/src/Group.ts:18

Represents a group conversation between multiple inboxes

This class is not intended to be initialized directly.

ContentTypes = unknown

new Group<ContentTypes>(client, codecRegistry, conversation): Group<ContentTypes>

Defined in: sdks/js/node-sdk/src/Group.ts:28

Creates a new group conversation instance

Client<ContentTypes>

The client instance managing this group conversation

CodecRegistry

The codec registry instance

Conversation

The underlying conversation object

Group<ContentTypes>

Conversation.constructor

get addedByInboxId(): string

Defined in: sdks/js/node-sdk/src/Conversation.ts:94

Gets the inbox ID that added this client’s inbox to the conversation

string

Conversation.addedByInboxId


get appData(): string

Defined in: sdks/js/node-sdk/src/Group.ts:88

The app data of the group

string


get createdAt(): Date

Defined in: sdks/js/node-sdk/src/Conversation.ts:108

Gets the date when the conversation was created

Date

Conversation.createdAt


get createdAtNs(): bigint

Defined in: sdks/js/node-sdk/src/Conversation.ts:101

Gets the timestamp when the conversation was created in nanoseconds

bigint

Conversation.createdAtNs


get description(): string

Defined in: sdks/js/node-sdk/src/Group.ts:72

The description of the group

string


get id(): string

Defined in: sdks/js/node-sdk/src/Conversation.ts:66

Gets the unique identifier for this conversation

string

Conversation.id


get imageUrl(): string

Defined in: sdks/js/node-sdk/src/Group.ts:56

The image URL of the group

string


get isActive(): boolean

Defined in: sdks/js/node-sdk/src/Conversation.ts:73

Gets whether this conversation is currently active

boolean

Conversation.isActive


get name(): string

Defined in: sdks/js/node-sdk/src/Group.ts:40

The name of the group

string


get topic(): string

Defined in: sdks/js/node-sdk/src/Conversation.ts:112

string

Conversation.topic

addAdmin(inboxId): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:216

Promotes a group member to admin status

string

The inbox ID of the member to promote

Promise<void>


addMembers(inboxIds): Promise<UpdateGroupMembershipResult>

Defined in: sdks/js/node-sdk/src/Group.ts:189

Adds members to the group using inbox IDs

string[]

Array of inbox IDs to add

Promise<UpdateGroupMembershipResult>


addMembersByIdentifiers(identifiers): Promise<UpdateGroupMembershipResult>

Defined in: sdks/js/node-sdk/src/Group.ts:180

Adds members to the group using identifiers

Identifier[]

Array of member identifiers to add

Promise<UpdateGroupMembershipResult>


addSuperAdmin(inboxId): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:234

Promotes a group member to super admin status

string

The inbox ID of the member to promote

Promise<void>


beginningDeliveryCursor(): DeliveryCursor

Defined in: sdks/js/node-sdk/src/Conversation.ts:192

DeliveryCursor

Conversation.beginningDeliveryCursor


consentState(): ConsentState

Defined in: sdks/js/node-sdk/src/Conversation.ts:430

Gets the consent state for this conversation

ConsentState

Conversation.consentState


countMessages(options?): Promise<number>

Defined in: sdks/js/node-sdk/src/Conversation.ts:404

Counts messages in this conversation

Omit<ListMessagesOptions, "limit" | "direction">

Optional filtering options

Promise<number>

Promise that resolves with the count of messages

Conversation.countMessages


debugInfo(): Promise<ConversationDebugInfo>

Defined in: sdks/js/node-sdk/src/Conversation.ts:489

Retrieves information for this conversation to help with debugging

Promise<ConversationDebugInfo>

The debug information for this conversation

Conversation.debugInfo


hmacKeys(): Record<string, HmacKey[]>

Defined in: sdks/js/node-sdk/src/Conversation.ts:125

Gets HMAC keys for this conversation

Record<string, HmacKey[]>

The HMAC keys for this conversation

Conversation.hmacKeys


isAdmin(inboxId): boolean

Defined in: sdks/js/node-sdk/src/Group.ts:161

Checks if an inbox is an admin of the group

string

The inbox ID to check

boolean

Boolean indicating if the inbox is an admin


isMessageDisappearingEnabled(): boolean

Defined in: sdks/js/node-sdk/src/Conversation.ts:480

Checks if message disappearing is enabled for this conversation

boolean

Whether message disappearing is enabled

Conversation.isMessageDisappearingEnabled


isPendingRemoval(): boolean

Defined in: sdks/js/node-sdk/src/Group.ts:259

Checks if the current user has requested to leave the group

boolean

Boolean


isSuperAdmin(inboxId): boolean

Defined in: sdks/js/node-sdk/src/Group.ts:171

Checks if an inbox is a super admin of the group

string

The inbox ID to check

boolean

Boolean indicating if the inbox is a super admin


lastMessage(): Promise<DecodedMessage<ContentTypes> | undefined>

Defined in: sdks/js/node-sdk/src/Conversation.ts:416

Gets the last message in this conversation

Promise<DecodedMessage<ContentTypes> | undefined>

Promise that resolves with the last message or undefined if none exists

Conversation.lastMessage


lastReadTimes(): Promise<Record<string, number>>

Defined in: sdks/js/node-sdk/src/Conversation.ts:499

Retrieves the last read times for this conversation

Promise<Record<string, number>>

A map keyed by inbox ID with the last read timestamp (nanoseconds since epoch)

Conversation.lastReadTimes


listAdmins(): string[]

Defined in: sdks/js/node-sdk/src/Group.ts:144

The list of admins of the group

string[]


listSuperAdmins(): string[]

Defined in: sdks/js/node-sdk/src/Group.ts:151

The list of super admins of the group

string[]


members(): Promise<GroupMember[]>

Defined in: sdks/js/node-sdk/src/Conversation.ts:147

Gets the members of this conversation

Promise<GroupMember[]>

Promise that resolves with the conversation members

Conversation.members


messageDisappearingSettings(): MessageDisappearingSettings | undefined

Defined in: sdks/js/node-sdk/src/Conversation.ts:448

Gets the message disappearing settings for this conversation

MessageDisappearingSettings | undefined

The current message disappearing settings or undefined if not set

Conversation.messageDisappearingSettings


messageHistorySnapshot(limit): MessageHistorySnapshot

Defined in: sdks/js/node-sdk/src/Conversation.ts:188

number

MessageHistorySnapshot

Conversation.messageHistorySnapshot


messages(options?): Promise<DecodedMessage<ContentTypes>[]>

Defined in: sdks/js/node-sdk/src/Conversation.ts:390

Lists messages in this conversation

ListMessagesOptions

Optional filtering and pagination options

Promise<DecodedMessage<ContentTypes>[]>

Promise that resolves with an array of decoded messages

Conversation.messages


metadata(): Promise<{ conversationType: ConversationType; creatorInboxId: string; }>

Defined in: sdks/js/node-sdk/src/Conversation.ts:134

Gets the metadata for this conversation

Promise<{ conversationType: ConversationType; creatorInboxId: string; }>

Promise that resolves with the conversation metadata

Conversation.metadata


notificationsEnabled(): Promise<boolean>

Defined in: sdks/js/node-sdk/src/Conversation.ts:85

Read the effective notification value for this conversation.

Promise<boolean>

Conversation.notificationsEnabled


pausedForVersion(): string | undefined

Defined in: sdks/js/node-sdk/src/Conversation.ts:116

string | undefined

Conversation.pausedForVersion


permissions(): object

Defined in: sdks/js/node-sdk/src/Group.ts:114

The permissions of the group

object

policySet: PermissionPolicySet

policyType: GroupPermissionsOptions


processStreamedMessage(envelopeBytes): Promise<Message[]>

Defined in: sdks/js/node-sdk/src/Conversation.ts:202

Decodes, decrypts, and persists a raw envelope from a group message stream.

Uint8Array

Raw protobuf-encoded envelope bytes from the stream

Promise<Message[]>

The processed and stored messages

Conversation.processStreamedMessage


publishMessages(): Promise<void>

Defined in: sdks/js/node-sdk/src/Conversation.ts:211

Publishes pending messages that were sent optimistically

Promise<void>

Promise that resolves when publishing is complete

Conversation.publishMessages


removeAdmin(inboxId): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:225

Removes admin status from a group member

string

The inbox ID of the admin to demote

Promise<void>


removeMembers(inboxIds): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:207

Removes members from the group using inbox IDs

string[]

Array of inbox IDs to remove

Promise<void>


removeMembersByIdentifiers(identifiers): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:198

Removes members from the group using identifiers

Identifier[]

Array of member identifiers to remove

Promise<void>


removeMessageDisappearingSettings(): Promise<void>

Defined in: sdks/js/node-sdk/src/Conversation.ts:471

Removes message disappearing settings from this conversation

Promise<void>

Promise that resolves when the settings are removed

Conversation.removeMessageDisappearingSettings


removeSuperAdmin(inboxId): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:243

Removes super admin status from a group member

string

The inbox ID of the super admin to demote

Promise<void>


requestRemoval(): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:250

Request to leave the group

Promise<void>


send(encodedContent, sendOptions?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:228

Sends a message with configurable delivery behavior

EncodedContent

The encoded content to send

SendMessageOpts

Options for sending the message

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.send


sendActions(actions, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:327

Sends a actions message

Actions

The actions to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendActions


sendAttachment(attachment, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:349

Sends an attachment message

Attachment

The attachment to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendAttachment


sendIntent(intent, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:338

Sends a intent message

Intent

The intent to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendIntent


sendMarkdown(markdown, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:256

Sends a markdown message

string

The markdown to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendMarkdown


sendMultiRemoteAttachment(multiRemoteAttachment, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:360

Sends a multi remote attachment message

MultiRemoteAttachment

The multi remote attachment to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendMultiRemoteAttachment


sendReaction(reaction, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:267

Sends a reaction message

Reaction

The reaction to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendReaction


sendReadReceipt(opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:277

Sends a read receipt message

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendReadReceipt


sendRemoteAttachment(remoteAttachment, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:377

Sends a remote attachment message

RemoteAttachment

The remote attachment to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendRemoteAttachment


sendReply(reply, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:288

Sends a reply message

Reply

The reply to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendReply


sendText(text, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:245

Sends a text message

string

The text to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendText


sendTransactionReference(transactionReference, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:299

Sends a transaction reference message

TransactionReference

The transaction reference to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendTransactionReference


sendWalletSendCalls(walletSendCalls, opts?): Promise<string>

Defined in: sdks/js/node-sdk/src/Conversation.ts:316

Sends a wallet send calls message

WalletSendCalls

The wallet send calls to send

SendOpts

Send options (optimistic delivery, idempotency key)

Promise<string>

Promise that resolves with the message ID after it has been sent

Conversation.sendWalletSendCalls


setNotifications(value): Promise<void>

Defined in: sdks/js/node-sdk/src/Conversation.ts:78

Override notification rules, or reset the override with “default”.

NotificationOverride

Promise<void>

Conversation.setNotifications


stream(options?): Promise<MessageStream<Message, DecodedMessage<ContentTypes>>>

Defined in: sdks/js/node-sdk/src/Conversation.ts:169

Reads retained messages after the default acknowledgement position. Set from to replay after a cursor without changing default progress. Set onValue for callback mode, or request items with the iterator. Core owns network recovery. Legacy retry options and disableSync do not apply.

StreamOptions<Message, DecodedMessage<ContentTypes>> & object

Optional delivery callbacks and replay cursor

Promise<MessageStream<Message, DecodedMessage<ContentTypes>>>

Stream instance for new messages

Conversation.stream


sync(): Promise<void>

Defined in: sdks/js/node-sdk/src/Conversation.ts:156

Synchronizes conversation data from the network

Promise<void>

Promise that resolves when synchronization is complete

Conversation.sync


updateAppData(appData, expectedAppData?): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:104

Updates the group’s app data (max 8192 bytes)

string

The new app data for the group

string

Optional compare-and-swap guard. When provided, the update is abandoned — rather than overwriting — if the committed value is no longer this, including when another member’s commit wins the race after this update was published. Callers reconciling structured state should pass the value they merged against, so a concurrent write surfaces as an error instead of silently discarding someone else’s change. Omit for last-writer-wins.

Promise<void>


updateConsentState(consentState): void

Defined in: sdks/js/node-sdk/src/Conversation.ts:439

Updates the consent state for this conversation

ConsentState

The new consent state to set

void

Conversation.updateConsentState


updateDescription(description): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:81

Updates the group’s description

string

The new description for the group

Promise<void>


updateImageUrl(imageUrl): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:65

Updates the group’s image URL

string

The new image URL for the group

Promise<void>


updateMessageDisappearingSettings(fromNs, inNs): Promise<void>

Defined in: sdks/js/node-sdk/src/Conversation.ts:459

Updates message disappearing settings for this conversation

bigint

The timestamp from which messages should start disappearing

bigint

The duration after which messages should disappear

Promise<void>

Promise that resolves when the update is complete

Conversation.updateMessageDisappearingSettings


updateName(name): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:49

Updates the group’s name

string

The new name for the group

Promise<void>


updatePermission(permissionType, policy, metadataField?): Promise<void>

Defined in: sdks/js/node-sdk/src/Group.ts:129

Updates a specific permission policy for the group

PermissionUpdateType

The type of permission to update

PermissionPolicy

The new permission policy

MetadataField

Optional metadata field for the permission

Promise<void>