Skip to content

Dm

Defined in: sdks/js/node-sdk/src/Dm.ts:11

Represents a direct message conversation between two inboxes

This class is not intended to be initialized directly.

ContentTypes = unknown

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

Defined in: sdks/js/node-sdk/src/Dm.ts:23

Creates a new direct message conversation instance

Client<ContentTypes>

The client instance managing this direct message conversation

CodecRegistry

The codec registry instance

Conversation

The underlying conversation instance

Dm<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 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 id(): string

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

Gets the unique identifier for this conversation

string

Conversation.id


get isActive(): boolean

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

Gets whether this conversation is currently active

boolean

Conversation.isActive


get peerInboxId(): string

Defined in: sdks/js/node-sdk/src/Dm.ts:39

Retrieves the inbox ID of the other participant in the DM

string

Promise that resolves with the peer’s inbox ID


get topic(): string

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

string

Conversation.topic

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


duplicateDms(): Promise<Dm<ContentTypes>[]>

Defined in: sdks/js/node-sdk/src/Dm.ts:43

Promise<Dm<ContentTypes>[]>


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


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


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


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


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


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


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


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


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