Host API
The public integration surface exposed by actor-scoped host helpers.
exposeChatApi creates Convex functions that resolve the actor in your host application before calling the component.
Conversations and messages
listConversationsreturns conversation summaries for the actor and accepts an optional boundedlimit.listMessagesreturns ordered message projections after membership checks and accepts optionalbeforeSequenceandlimitarguments for older-page loading.sendTextsends an idempotent text message.sendAttachmentsends a provider-neutral attachment descriptor.editOwnTextPartreplaces the actor's text part when its expected revision matches.deleteOwnMessagecreates a delete-for-everyone tombstone and returns attachment keys for host cleanup.setReactiontoggles an allowlisted reaction.markReadThroughadvances the actor's read watermark monotonically.
Presence
heartbeatOnline,disconnectOnline, andlistOnlinemaintain app-level availability scoped to chat participants.heartbeatPresence,disconnectPresence, andlistPresencemaintain conversation sessions used for typing.setTypingupdates the actor's conversation-scoped typing state.
Applications may omit the presence wrappers when presence is disabled by product policy.
Trusted membership access
Hosts can call components.chat.conversations.getMemberAccess and
components.chat.conversations.setMemberAccess from trusted Convex functions.
The mutation requires the current membership revision. It projects host policy
to read_write, read_only, or none without moving relationship rules into
the component.
Do not expose these component functions directly to clients. Authenticate the caller and apply product policy in the host mutation first. A nested component mutation participates in the host mutation transaction, so both changes roll back if either operation fails.
See the generated TypeScript declarations and package README for the exact arguments available in the current release candidate.