Properties
Default lock scope for this adapter.
'thread'(default): lock per threadId'channel': lock per channelId (for channel-based platforms like WhatsApp, Telegram)
ChatConfig.lockScope.When true, the SDK persists per-thread message history in the state
adapter for this platform. Use for platforms that lack server-side
message history APIs (e.g. WhatsApp, Telegram).
Methods
addReaction()
Parameters
Type:
EmojiValueReturns
Promise<void>
channelIdFromThreadId()
Parameters
Returns
string
decodeThreadId()
Parameters
Returns
TThreadId
deleteMessage()
Parameters
Returns
Promise<void>
disconnect()
Returns
Promise<void>
editMessage()
Parameters
Returns
RawMessage
editObject()
Parameters
Returns
RawMessage
encodeThreadId()
Parameters
Returns
string
endTyping()
Parameters
Returns
Promise<void>
fetchChannelInfo()
Parameters
Returns
ChannelInfo
fetchChannelMessages()
Parameters
Returns
FetchResult
fetchMessage()
Parameters
Returns
Message
The message, or null if not found/not supported
fetchMessages()
backward(default): Fetches the most recent messages. Use this for loading a chat view. ThenextCursorpoints to older messages.forward: Fetches the oldest messages first. Use this for iterating through message history. ThenextCursorpoints to newer messages.
Parameters
Returns
FetchResult
fetchSubject()
Parameters
Returns
MessageSubject
fetchThread()
Parameters
Returns
ThreadInfo
getChannelVisibility()
Parameters
Returns
ChannelVisibility
The channel visibility scope
getUser()
Parameters
Returns
UserInfo
User info, or null if user not found
handleWebhook()
Parameters
Returns
Promise<Response>
initialize()
Parameters
Returns
Promise<void>
isDM()
Parameters
Returns
boolean
True if the thread is a DM, false otherwise
listThreads()
Parameters
Returns
ListThreadsResult
markAsRead()
Thread.markAsRead() throws NotImplementedError when an
adapter leaves this out. The full message is passed alongside its ID when
the caller has one, so adapters can read platform data off message.raw
instead of resolving the ID themselves.
Parameters
Type:
MessageThe message itself, when the caller has itReturns
Promise<void>
onThreadSubscribe()
Parameters
Returns
Promise<void>
openDM()
Parameters
Returns
Promise<string>
The thread ID for the DM conversation
openModal()
Parameters
Returns
Promise<{ viewId: string }>
The view/dialog ID
parseMessage()
Parameters
Returns
Message
postChannelMessage()
Parameters
Returns
RawMessage
postEphemeral()
Parameters
Returns
EphemeralMessage
EphemeralMessage with usedFallback indicating private delivery, or null if unsupported
postMessage()
Parameters
Returns
RawMessage
postObject()
Parameters
Returns
RawMessage
rehydrateAttachment()
Parameters
Returns
Attachment
removeReaction()
Parameters
Type:
EmojiValueReturns
Promise<void>
renderFormatted()
Parameters
Returns
string
reply()
Parameters
Returns
RawMessage
scheduleMessage()
Parameters
Returns
ScheduledMessage
A ScheduledMessage with cancel() capability
startTyping()
Parameters
Returns
Promise<void>
stream()
null before consuming any chunks to delegate back to
Chat SDK’s built-in post+edit fallback for the current thread.
The stream can yield plain strings (text chunks) or StreamChunk objects
for rich content like task progress cards. Adapters that don’t support structured
chunks will extract text from markdown_text chunks and ignore other types.
Parameters
Type:
StreamChunkAsync iterable of text chunks or structured StreamChunk objectsPlatform-specific streaming options
Returns
RawMessage
The raw message after streaming completes, or null to use core fallback