Skip to content

Group

Defined in: sdks/js/node-sdk/dist/index.d.ts:768

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/dist/index.d.ts:777

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/dist/index.d.ts:494

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/dist/index.d.ts:811

The app data of the group

string


get createdAt(): Date

Defined in: sdks/js/node-sdk/dist/index.d.ts:502

Gets the date when the conversation was created

Date

Conversation.createdAt


get createdAtNs(): bigint

Defined in: sdks/js/node-sdk/dist/index.d.ts:498

Gets the timestamp when the conversation was created in nanoseconds

bigint

Conversation.createdAtNs


get description(): string

Defined in: sdks/js/node-sdk/dist/index.d.ts:801

The description of the group

string


get id(): string

Defined in: sdks/js/node-sdk/dist/index.d.ts:482

Gets the unique identifier for this conversation

string

Conversation.id


get imageUrl(): string

Defined in: sdks/js/node-sdk/dist/index.d.ts:791

The image URL of the group

string


get isActive(): boolean

Defined in: sdks/js/node-sdk/dist/index.d.ts:486

Gets whether this conversation is currently active

boolean

Conversation.isActive


get name(): string

Defined in: sdks/js/node-sdk/dist/index.d.ts:781

The name of the group

string


get topic(): string

Defined in: sdks/js/node-sdk/dist/index.d.ts:503

string

Conversation.topic

addAdmin(inboxId): Promise<void>

Defined in: sdks/js/node-sdk/dist/index.d.ts:891

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/dist/index.d.ts:873

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/dist/index.d.ts:867

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/dist/index.d.ts:903

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/dist/index.d.ts:545

DeliveryCursor

Conversation.beginningDeliveryCursor


consentState(): ConsentState

Defined in: sdks/js/node-sdk/dist/index.d.ts:691

Gets the consent state for this conversation

ConsentState

Conversation.consentState


countMessages(options?): Promise<number>

Defined in: sdks/js/node-sdk/dist/index.d.ts:681

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/dist/index.d.ts:729

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/dist/index.d.ts:510

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/dist/index.d.ts:854

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/dist/index.d.ts:723

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/dist/index.d.ts:919

Checks if the current user has requested to leave the group

boolean

Boolean


isSuperAdmin(inboxId): boolean

Defined in: sdks/js/node-sdk/dist/index.d.ts:861

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/dist/index.d.ts:687

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/dist/index.d.ts:736

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/dist/index.d.ts:843

The list of admins of the group

string[]


listSuperAdmins(): string[]

Defined in: sdks/js/node-sdk/dist/index.d.ts:847

The list of super admins of the group

string[]


members(): Promise<GroupMember[]>

Defined in: sdks/js/node-sdk/dist/index.d.ts:525

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/dist/index.d.ts:703

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/dist/index.d.ts:544

number

MessageHistorySnapshot

Conversation.messageHistorySnapshot


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

Defined in: sdks/js/node-sdk/dist/index.d.ts:674

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/dist/index.d.ts:516

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/dist/index.d.ts:490

Read the effective notification value for this conversation.

Promise<boolean>

Conversation.notificationsEnabled


pausedForVersion(): string | undefined

Defined in: sdks/js/node-sdk/dist/index.d.ts:504

string | undefined

Conversation.pausedForVersion


permissions(): object

Defined in: sdks/js/node-sdk/dist/index.d.ts:828

The permissions of the group

object

policySet: PermissionPolicySet

policyType: GroupPermissionsOptions


processStreamedMessage(envelopeBytes): Promise<Message[]>

Defined in: sdks/js/node-sdk/dist/index.d.ts:552

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/dist/index.d.ts:558

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/dist/index.d.ts:897

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/dist/index.d.ts:885

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/dist/index.d.ts:879

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/dist/index.d.ts:717

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/dist/index.d.ts:909

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/dist/index.d.ts:913

Request to leave the group

Promise<void>


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

Defined in: sdks/js/node-sdk/dist/index.d.ts:572

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/dist/index.d.ts:635

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/dist/index.d.ts:651

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/dist/index.d.ts:643

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/dist/index.d.ts:588

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/dist/index.d.ts:659

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/dist/index.d.ts:596

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/dist/index.d.ts:603

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/dist/index.d.ts:667

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/dist/index.d.ts:611

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/dist/index.d.ts:580

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/dist/index.d.ts:619

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/dist/index.d.ts:627

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/dist/index.d.ts:488

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/dist/index.d.ts:541

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/dist/index.d.ts:531

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/dist/index.d.ts:824

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/dist/index.d.ts:697

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/dist/index.d.ts:807

Updates the group’s description

string

The new description for the group

Promise<void>


updateImageUrl(imageUrl): Promise<void>

Defined in: sdks/js/node-sdk/dist/index.d.ts:797

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/dist/index.d.ts:711

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/dist/index.d.ts:787

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/dist/index.d.ts:839

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>