Skip to content

Conversation

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

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

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

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

string


get createdAt(): Date

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

Gets the date when the conversation was created

Date


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


get id(): string

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

Gets the unique identifier for this conversation

string


get isActive(): boolean

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

Gets whether this conversation is currently active

boolean


get topic(): string

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

string

beginningDeliveryCursor(): DeliveryCursor

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

DeliveryCursor


consentState(): ConsentState

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

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


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


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


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


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


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)


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


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


messageHistorySnapshot(limit): MessageHistorySnapshot

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

number

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


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


notificationsEnabled(): Promise<boolean>

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

Read the effective notification value for this conversation.

Promise<boolean>


pausedForVersion(): string | undefined

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

string | undefined


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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>


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


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


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


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