Skip to content

Conversation

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

Represents a conversation

This class is not intended to be initialized directly.

ContentTypes = unknown

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

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

Creates a new conversation instance

Client<ContentTypes>

The client instance managing the conversation

CodecRegistry

The codec registry instance

Conversation

The underlying conversation instance

Conversation<ContentTypes>

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


get createdAt(): Date

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

Gets the date when the conversation was created

Date


get createdAtNs(): bigint

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

Gets the timestamp when the conversation was created in nanoseconds

bigint


get id(): string

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

Gets the unique identifier for this conversation

string


get isActive(): boolean

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

Gets whether this conversation is currently active

boolean


get topic(): string

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

string

beginningDeliveryCursor(): DeliveryCursor

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

DeliveryCursor


consentState(): ConsentState

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

Gets the consent state for this 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


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


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


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


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


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)


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


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


messageHistorySnapshot(limit): MessageHistorySnapshot

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

number

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


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


notificationsEnabled(): Promise<boolean>

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

Read the effective notification value for this conversation.

Promise<boolean>


pausedForVersion(): string | undefined

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

string | undefined


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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>


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


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


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


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