Skip to content

docs(js-sdk): document card message support (ENG-36071)#420

Open
aanshisingh-cometchat wants to merge 2 commits into
mainfrom
feature/ENG-36071-js-sdk-card-messages-docs
Open

docs(js-sdk): document card message support (ENG-36071)#420
aanshisingh-cometchat wants to merge 2 commits into
mainfrom
feature/ENG-36071-js-sdk-card-messages-docs

Conversation

@aanshisingh-cometchat

Copy link
Copy Markdown
Contributor

Add a dedicated JavaScript SDK "Card Messages" page covering the three receive-only card mechanisms: standalone CardMessage (onCardMessageReceived), inline cards on AIAssistantMessage via getElements()/AIAssistantElement, and real-time card streaming events (card_start/card/card_end) on the AIAssistantListener.

  • Add sdk/javascript/card-messages.mdx with TS + JS receive/render examples
  • Add reference entries for CardMessage, AIAssistantElement, the elements accessor on AIAssistantMessage, and the three card events (messages.mdx)
  • Add onCardMessageReceived + card-events note to all-real-time-listeners.mdx
  • Add the card category to message-structure-and-hierarchy.mdx
  • Cross-link card handling from ai-agents.mdx
  • Register the new page in the Messaging nav group (docs.json)

Description

Related Issue(s)

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

Additional Information

Screenshots (if applicable)

Add a dedicated JavaScript SDK "Card Messages" page covering the three
receive-only card mechanisms: standalone CardMessage (onCardMessageReceived),
inline cards on AIAssistantMessage via getElements()/AIAssistantElement, and
real-time card streaming events (card_start/card/card_end) on the
AIAssistantListener.

- Add sdk/javascript/card-messages.mdx with TS + JS receive/render examples
- Add reference entries for CardMessage, AIAssistantElement, the elements
  accessor on AIAssistantMessage, and the three card events (messages.mdx)
- Add onCardMessageReceived + card-events note to all-real-time-listeners.mdx
- Add the card category to message-structure-and-hierarchy.mdx
- Cross-link card handling from ai-agents.mdx
- Register the new page in the Messaging nav group (docs.json)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Jul 2, 2026, 4:12 PM

…verability

Align the JS SDK card-message docs with the parallel React Native card
docs after cross-referencing that branch:

- Explain cards are authored server-side via the Platform (REST) API or
  Dashboard Bubble Builder (receive-only), with a link to the REST reference
- Point to the CometChat Cards renderer (@cometchat/cards-react →
  CometChatCardView) and Campaigns "Rendering Cards" / "Supported Card
  Actions"; adopt the shared "Card Schema JSON" terminology
- Document getTags() on CardMessage (page + reference)
- Add a receive-only "Card Message" section to send-message.mdx so devs
  looking to send a card learn it must be created server-side
- Note that a card-only assistant reply may have empty getText(), so prefer
  getElements()

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant