Docs / built-apps / DmThread

DmThread

typesince 0.2.2

A private message thread between the caller and one counterpart.

import type { DmThread } from 'flowstack-sdk'

The shape returned by useThreads/listThreads. The backend only ever returns threads the caller participates in.

Signature

interface DmThread { pair_key: string; with_user_key: string; status: 'pending' | 'open'; last_message: DmMessage | null; unread_count: number; updated_at: string | null }

Returns

FieldTypeDescription
pair_keystringDeterministic, order-independent thread key (see dmPairKey).
with_user_keystringThe counterpart's user key.
status'pending' | 'open'open once both parties have consented; only then are sends allowed.
last_messageDmMessage | nullThe most recent message, or null for an empty thread.
unread_countnumberCount of unread messages for the caller.
updated_atstring | nullISO timestamp of the last activity, or null.

See also

useThreads · listThreads · DmMessage · dmPairKey

Source: README.md#private-messaging-dms · Also available in llms-full.txt and registry.json.