@cometchat/skills-cli 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -0
- package/bin/cometchat.mjs +7 -0
- package/dist/index.js +4395 -0
- package/dist/registry/schemas/template.schema.json +142 -0
- package/dist/registry/v6/experiences/1-conversation-list/astro.template.json +89 -0
- package/dist/registry/v6/experiences/1-conversation-list/nextjs-pages.template.json +83 -0
- package/dist/registry/v6/experiences/1-conversation-list/nextjs.template.json +83 -0
- package/dist/registry/v6/experiences/1-conversation-list/react-router.template.json +102 -0
- package/dist/registry/v6/experiences/1-conversation-list/reactjs.template.json +86 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/astro/ChatApp.css.tpl +39 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/astro/ChatApp.tsx.tpl +86 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/astro/CometChatSelector.tsx.tpl +40 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/astro/chat.astro.tpl +17 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs/CometChatNoSSR.css.tpl +39 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs/CometChatNoSSR.tsx.tpl +86 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs/CometChatSelector.tsx.tpl +41 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs/chat-page.tsx.tpl +11 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs-pages/CometChatNoSSR.css.tpl +39 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs-pages/CometChatNoSSR.tsx.tpl +88 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs-pages/CometChatSelector.tsx.tpl +41 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs-pages/chat-page.tsx.tpl +15 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/react-router/CometChat-route.tsx.tpl +22 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/react-router/CometChatNoSSR.css.tpl +39 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/react-router/CometChatNoSSR.tsx.tpl +87 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/react-router/CometChatSelector.tsx.tpl +40 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs/App.css.tpl +32 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs/App.tsx.tpl +55 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs/CometChatSelector.tsx.tpl +40 -0
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs/main.tsx.tpl +46 -0
- package/dist/registry/v6/experiences/2-one-to-one/astro.template.json +81 -0
- package/dist/registry/v6/experiences/2-one-to-one/nextjs.template.json +77 -0
- package/dist/registry/v6/experiences/2-one-to-one/react-router.template.json +93 -0
- package/dist/registry/v6/experiences/2-one-to-one/reactjs.template.json +77 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/astro/ChatApp.css.tpl +21 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/astro/ChatApp.tsx.tpl +66 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/astro/chat.astro.tpl +17 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/nextjs/CometChatNoSSR.css.tpl +21 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/nextjs/CometChatNoSSR.tsx.tpl +66 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/nextjs/chat-page.tsx.tpl +11 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/react-router/CometChat-route.tsx.tpl +21 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/react-router/CometChatNoSSR.css.tpl +21 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/react-router/CometChatNoSSR.tsx.tpl +67 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs/App.css.tpl +4 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs/App.tsx.tpl +44 -0
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs/main.tsx.tpl +46 -0
- package/dist/registry/v6/experiences/3-tab-based/astro.template.json +93 -0
- package/dist/registry/v6/experiences/3-tab-based/nextjs.template.json +90 -0
- package/dist/registry/v6/experiences/3-tab-based/react-router.template.json +105 -0
- package/dist/registry/v6/experiences/3-tab-based/reactjs.template.json +90 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/ChatApp.css.tpl +39 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/ChatApp.tsx.tpl +93 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/CometChatTabs.css.tpl +43 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/CometChatTabs.tsx.tpl +72 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/chat.astro.tpl +17 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/CometChatNoSSR.css.tpl +39 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/CometChatNoSSR.tsx.tpl +93 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/CometChatTabs.css.tpl +43 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/CometChatTabs.tsx.tpl +73 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/chat-page.tsx.tpl +11 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChat-route.tsx.tpl +21 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChatNoSSR.css.tpl +39 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChatNoSSR.tsx.tpl +94 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChatTabs.css.tpl +43 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChatTabs.tsx.tpl +72 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/App.css.tpl +7 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/App.tsx.tpl +62 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/CometChatTabs.css.tpl +43 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/CometChatTabs.tsx.tpl +72 -0
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/main.tsx.tpl +46 -0
- package/dist/registry/v6/features/catalog.json +344 -0
- package/dist/registry/v6/production/astro/cometchat-token.ts.tpl +86 -0
- package/dist/registry/v6/production/astro.template.json +51 -0
- package/dist/registry/v6/production/nextjs/route.ts.tpl +79 -0
- package/dist/registry/v6/production/nextjs.template.json +50 -0
- package/dist/registry/v6/production/react-router/api.cometchat-token.ts.tpl +73 -0
- package/dist/registry/v6/production/react-router.template.json +58 -0
- package/dist/registry/v6/user-mgmt/astro/cometchat-user.ts.tpl +164 -0
- package/dist/registry/v6/user-mgmt/astro.template.json +33 -0
- package/dist/registry/v6/user-mgmt/nextjs/route.ts.tpl +212 -0
- package/dist/registry/v6/user-mgmt/nextjs.template.json +57 -0
- package/dist/registry/v6/user-mgmt/react-router/api.cometchat-user.ts.tpl +176 -0
- package/dist/registry/v6/user-mgmt/react-router.template.json +40 -0
- package/dist/registry/v6/widget/astro/CometChatWidget.css.tpl +105 -0
- package/dist/registry/v6/widget/astro/CometChatWidget.tsx.tpl +88 -0
- package/dist/registry/v6/widget/astro.template.json +38 -0
- package/dist/registry/v6/widget/nextjs/CometChatWidget.css.tpl +105 -0
- package/dist/registry/v6/widget/nextjs/CometChatWidget.tsx.tpl +88 -0
- package/dist/registry/v6/widget/nextjs.template.json +40 -0
- package/dist/registry/v6/widget/react-router/CometChatWidget.css.tpl +105 -0
- package/dist/registry/v6/widget/react-router/CometChatWidget.tsx.tpl +98 -0
- package/dist/registry/v6/widget/react-router.template.json +36 -0
- package/dist/registry/v6/widget/reactjs/CometChatWidget.css.tpl +105 -0
- package/dist/registry/v6/widget/reactjs/CometChatWidget.tsx.tpl +89 -0
- package/dist/registry/v6/widget/reactjs.template.json +36 -0
- package/package.json +53 -0
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"sdk_compatibility": ">=6.0.0 <7.0.0",
|
|
5
|
+
"description": "Catalog of CometChat features available in the React UI Kit. Categorized by what work is needed to enable each one.",
|
|
6
|
+
"feature_types": {
|
|
7
|
+
"default": "Already enabled by default in the UI Kit components your integration uses. Zero code changes needed — the skill just shows you which component renders it.",
|
|
8
|
+
"dashboard-toggle": "Requires flipping a toggle in the CometChat Dashboard at https://app.cometchat.com. Some have their UI decorator auto-attached by the UI Kit (auto_wired_in_uikit: true) — the dashboard flip is the only thing needed. Others additionally require passing the extension to UIKitSettingsBuilder.setExtensions([...]) before init.",
|
|
9
|
+
"package-install": "Requires installing an additional npm package. The UI Kit's initiateAfterLogin() auto-calls enableCalling() which detects the calls SDK and wires up call buttons. Currently calls only.",
|
|
10
|
+
"component-swap": "Requires replacing one UI Kit component with a drop-in variant. One-line change. The SDK currently ships exactly one such variant (CometChatCompactMessageComposer for rich text formatting); more variants will become catalog entries here as the SDK adds them."
|
|
11
|
+
},
|
|
12
|
+
"features": [
|
|
13
|
+
{
|
|
14
|
+
"id": "instant-messaging",
|
|
15
|
+
"name": "Instant Messaging",
|
|
16
|
+
"type": "default",
|
|
17
|
+
"description": "Real-time text messaging via CometChatMessageList + CometChatMessageComposer. The core of every chat experience.",
|
|
18
|
+
"components": ["CometChatMessageList", "CometChatMessageComposer"],
|
|
19
|
+
"docs_topic": "core-features#instant-messaging"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "media-sharing",
|
|
23
|
+
"name": "Media Sharing",
|
|
24
|
+
"type": "default",
|
|
25
|
+
"description": "Send images, videos, audio, and documents within conversations. Built into CometChatMessageComposer's ActionSheet.",
|
|
26
|
+
"components": ["CometChatMessageComposer"],
|
|
27
|
+
"docs_topic": "core-features#media-sharing"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "read-receipts",
|
|
31
|
+
"name": "Read Receipts",
|
|
32
|
+
"type": "default",
|
|
33
|
+
"description": "See when messages have been delivered and read. Visible in message bubbles and the Conversations list.",
|
|
34
|
+
"components": ["CometChatMessageList", "CometChatConversations"],
|
|
35
|
+
"docs_topic": "core-features#read-receipts"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "mark-as-unread",
|
|
39
|
+
"name": "Mark as Unread",
|
|
40
|
+
"type": "default",
|
|
41
|
+
"description": "Manually mark conversations or messages as unread.",
|
|
42
|
+
"components": ["CometChatMessageList"],
|
|
43
|
+
"docs_topic": "core-features#mark-as-unread"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "typing-indicator",
|
|
47
|
+
"name": "Typing Indicator",
|
|
48
|
+
"type": "default",
|
|
49
|
+
"description": "Real-time typing awareness. Shows in CometChatMessageHeader and CometChatConversations.",
|
|
50
|
+
"components": ["CometChatMessageHeader", "CometChatConversations"],
|
|
51
|
+
"docs_topic": "core-features#typing-indicator"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "user-presence",
|
|
55
|
+
"name": "User Presence",
|
|
56
|
+
"type": "default",
|
|
57
|
+
"description": "Online/offline status across Conversations, Message Header, Users, and Group Members.",
|
|
58
|
+
"components": ["CometChatConversations", "CometChatMessageHeader", "CometChatUsers", "CometChatGroupMembers"],
|
|
59
|
+
"docs_topic": "core-features#user-presence"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "reactions",
|
|
63
|
+
"name": "Reactions",
|
|
64
|
+
"type": "default",
|
|
65
|
+
"description": "React to messages with emojis without typing a full response.",
|
|
66
|
+
"components": ["CometChatMessageList"],
|
|
67
|
+
"docs_topic": "core-features#reactions"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "mentions",
|
|
71
|
+
"name": "Mentions",
|
|
72
|
+
"type": "default",
|
|
73
|
+
"description": "Address specific users with @username, including @all for groups.",
|
|
74
|
+
"components": ["CometChatMessageComposer", "CometChatMessageList"],
|
|
75
|
+
"docs_topic": "core-features#mentions"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "threaded-conversations",
|
|
79
|
+
"name": "Threaded Conversations",
|
|
80
|
+
"type": "default",
|
|
81
|
+
"description": "Reply to specific messages in a thread, keeping conversations organized.",
|
|
82
|
+
"components": ["CometChatMessageList", "CometChatThreadHeader"],
|
|
83
|
+
"docs_topic": "core-features#threaded-conversations"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "quoted-replies",
|
|
87
|
+
"name": "Quoted Replies",
|
|
88
|
+
"type": "default",
|
|
89
|
+
"description": "Quote a specific message when replying to maintain context.",
|
|
90
|
+
"components": ["CometChatMessageComposer", "CometChatMessageList"],
|
|
91
|
+
"docs_topic": "core-features#quoted-replies"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "group-chat",
|
|
95
|
+
"name": "Group Chat",
|
|
96
|
+
"type": "default",
|
|
97
|
+
"description": "Multi-participant conversations via CometChatGroups.",
|
|
98
|
+
"components": ["CometChatGroups"],
|
|
99
|
+
"docs_topic": "core-features#group-chat"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "report-message",
|
|
103
|
+
"name": "Report Message",
|
|
104
|
+
"type": "default",
|
|
105
|
+
"description": "Users can flag inappropriate messages with predefined reasons.",
|
|
106
|
+
"components": ["CometChatMessageList"],
|
|
107
|
+
"docs_topic": "core-features#report-message"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "search",
|
|
111
|
+
"name": "Conversation and Advanced Search",
|
|
112
|
+
"type": "default",
|
|
113
|
+
"description": "Full-text search across conversations, messages, and media.",
|
|
114
|
+
"components": ["CometChatSearch"],
|
|
115
|
+
"docs_topic": "core-features#search"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "moderation",
|
|
119
|
+
"name": "Moderation",
|
|
120
|
+
"type": "default",
|
|
121
|
+
"description": "Automatic content filtering. Requires moderation rule configuration in the dashboard.",
|
|
122
|
+
"components": ["CometChatMessageList"],
|
|
123
|
+
"docs_topic": "core-features#moderation",
|
|
124
|
+
"requires_dashboard_setup": true
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "bitly",
|
|
128
|
+
"name": "Bitly URL Shortening",
|
|
129
|
+
"type": "dashboard-toggle",
|
|
130
|
+
"description": "Automatically shorten long URLs in messages using Bitly.",
|
|
131
|
+
"dashboard_path": "Extensions → Bitly → Toggle on",
|
|
132
|
+
"docs_topic": "extensions#bitly"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "link-preview",
|
|
136
|
+
"name": "Link Preview",
|
|
137
|
+
"type": "dashboard-toggle",
|
|
138
|
+
"auto_wired_in_uikit": true,
|
|
139
|
+
"description": "Show URL previews with title, description, and thumbnail. UI decorator auto-attached by the UI Kit (in defaultExtensions[]).",
|
|
140
|
+
"dashboard_path": "Extensions → Link Preview → Toggle on",
|
|
141
|
+
"docs_topic": "extensions#link-preview"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "message-shortcuts",
|
|
145
|
+
"name": "Message Shortcuts",
|
|
146
|
+
"type": "dashboard-toggle",
|
|
147
|
+
"description": "Expand predefined short codes into full messages.",
|
|
148
|
+
"dashboard_path": "Extensions → Message Shortcuts → Configure shortcuts",
|
|
149
|
+
"docs_topic": "extensions#message-shortcuts"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "pin-message",
|
|
153
|
+
"name": "Pin Message",
|
|
154
|
+
"type": "dashboard-toggle",
|
|
155
|
+
"description": "Pin important messages for easy access.",
|
|
156
|
+
"dashboard_path": "Extensions → Pin Message → Toggle on",
|
|
157
|
+
"docs_topic": "extensions#pin-message"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "rich-media-preview",
|
|
161
|
+
"name": "Rich Media Preview",
|
|
162
|
+
"type": "dashboard-toggle",
|
|
163
|
+
"description": "Generate rich preview panels for URLs via iFramely.",
|
|
164
|
+
"dashboard_path": "Extensions → Rich Media Preview → Toggle on",
|
|
165
|
+
"docs_topic": "extensions#rich-media-preview"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id": "save-message",
|
|
169
|
+
"name": "Save Message",
|
|
170
|
+
"type": "dashboard-toggle",
|
|
171
|
+
"description": "Bookmark messages privately for later.",
|
|
172
|
+
"dashboard_path": "Extensions → Save Message → Toggle on",
|
|
173
|
+
"docs_topic": "extensions#save-message"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id": "thumbnail-generation",
|
|
177
|
+
"name": "Thumbnail Generation",
|
|
178
|
+
"type": "dashboard-toggle",
|
|
179
|
+
"auto_wired_in_uikit": true,
|
|
180
|
+
"description": "Auto-generate thumbnails for shared media to reduce bandwidth. UI decorator auto-attached by the UI Kit (in defaultExtensions[]).",
|
|
181
|
+
"dashboard_path": "Extensions → Thumbnail Generation → Toggle on",
|
|
182
|
+
"docs_topic": "extensions#thumbnail-generation"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "tinyurl",
|
|
186
|
+
"name": "TinyURL Shortening",
|
|
187
|
+
"type": "dashboard-toggle",
|
|
188
|
+
"description": "Shorten URLs using TinyURL service.",
|
|
189
|
+
"dashboard_path": "Extensions → TinyURL → Toggle on",
|
|
190
|
+
"docs_topic": "extensions#tinyurl"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"id": "voice-transcription",
|
|
194
|
+
"name": "Voice Transcription",
|
|
195
|
+
"type": "dashboard-toggle",
|
|
196
|
+
"description": "Convert audio messages to text automatically.",
|
|
197
|
+
"dashboard_path": "Extensions → Voice Transcription → Toggle on",
|
|
198
|
+
"docs_topic": "extensions#voice-transcription"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "giphy",
|
|
202
|
+
"name": "Giphy GIFs",
|
|
203
|
+
"type": "dashboard-toggle",
|
|
204
|
+
"description": "Search and share GIFs from Giphy.",
|
|
205
|
+
"dashboard_path": "Extensions → Giphy → Configure API key",
|
|
206
|
+
"docs_topic": "extensions#giphy"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"id": "message-translation",
|
|
210
|
+
"name": "Message Translation",
|
|
211
|
+
"type": "dashboard-toggle",
|
|
212
|
+
"auto_wired_in_uikit": true,
|
|
213
|
+
"description": "Translate messages into the user's locale. UI decorator auto-attached by the UI Kit (in defaultExtensions[]).",
|
|
214
|
+
"dashboard_path": "Extensions → Message Translation → Toggle on",
|
|
215
|
+
"docs_topic": "extensions#message-translation"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"id": "polls",
|
|
219
|
+
"name": "Polls",
|
|
220
|
+
"type": "dashboard-toggle",
|
|
221
|
+
"auto_wired_in_uikit": true,
|
|
222
|
+
"description": "Create polls in group discussions with preset answers. UI decorator auto-attached by the UI Kit (in defaultExtensions[]).",
|
|
223
|
+
"dashboard_path": "Extensions → Polls → Toggle on",
|
|
224
|
+
"docs_topic": "extensions#polls"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "reminders",
|
|
228
|
+
"name": "Reminders",
|
|
229
|
+
"type": "dashboard-toggle",
|
|
230
|
+
"description": "Set message reminders or personal notifications via bot.",
|
|
231
|
+
"dashboard_path": "Extensions → Reminders → Toggle on",
|
|
232
|
+
"docs_topic": "extensions#reminders"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "stickers",
|
|
236
|
+
"name": "Stickers",
|
|
237
|
+
"type": "dashboard-toggle",
|
|
238
|
+
"auto_wired_in_uikit": true,
|
|
239
|
+
"description": "Send pre-designed stickers in conversations. UI decorator auto-attached by the UI Kit (in defaultExtensions[]).",
|
|
240
|
+
"dashboard_path": "Extensions → Stickers → Toggle on",
|
|
241
|
+
"docs_topic": "extensions#stickers"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "stipop",
|
|
245
|
+
"name": "Stipop Sticker Library",
|
|
246
|
+
"type": "dashboard-toggle",
|
|
247
|
+
"description": "Integrates the Stipop sticker library.",
|
|
248
|
+
"dashboard_path": "Extensions → Stipop → Configure API key",
|
|
249
|
+
"docs_topic": "extensions#stipop"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "tenor",
|
|
253
|
+
"name": "Tenor GIFs",
|
|
254
|
+
"type": "dashboard-toggle",
|
|
255
|
+
"description": "Search and share GIFs from Tenor.",
|
|
256
|
+
"dashboard_path": "Extensions → Tenor → Configure API key",
|
|
257
|
+
"docs_topic": "extensions#tenor"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "collaborative-document",
|
|
261
|
+
"name": "Collaborative Document",
|
|
262
|
+
"type": "dashboard-toggle",
|
|
263
|
+
"auto_wired_in_uikit": true,
|
|
264
|
+
"description": "Real-time shared document editing. UI decorator auto-attached by the UI Kit (in defaultExtensions[]).",
|
|
265
|
+
"dashboard_path": "Extensions → Collaborative Document → Toggle on",
|
|
266
|
+
"docs_topic": "extensions#collaborative-document"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"id": "collaborative-whiteboard",
|
|
270
|
+
"name": "Collaborative Whiteboard",
|
|
271
|
+
"type": "dashboard-toggle",
|
|
272
|
+
"auto_wired_in_uikit": true,
|
|
273
|
+
"description": "Shared whiteboard for drawing and brainstorming. UI decorator auto-attached by the UI Kit (in defaultExtensions[]).",
|
|
274
|
+
"dashboard_path": "Extensions → Collaborative Whiteboard → Toggle on",
|
|
275
|
+
"docs_topic": "extensions#collaborative-whiteboard"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"id": "disappearing-messages",
|
|
279
|
+
"name": "Disappearing Messages",
|
|
280
|
+
"type": "dashboard-toggle",
|
|
281
|
+
"description": "Messages auto-delete after a specified interval.",
|
|
282
|
+
"dashboard_path": "Extensions → Disappearing Messages → Configure interval",
|
|
283
|
+
"docs_topic": "extensions#disappearing-messages"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"id": "chatwoot",
|
|
287
|
+
"name": "Chatwoot Integration",
|
|
288
|
+
"type": "dashboard-toggle",
|
|
289
|
+
"description": "Route messages to Chatwoot for customer support.",
|
|
290
|
+
"dashboard_path": "Extensions → Chatwoot → Configure webhook",
|
|
291
|
+
"docs_topic": "extensions#chatwoot"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"id": "intercom",
|
|
295
|
+
"name": "Intercom Integration",
|
|
296
|
+
"type": "dashboard-toggle",
|
|
297
|
+
"description": "Integrate Intercom for in-app customer support.",
|
|
298
|
+
"dashboard_path": "Extensions → Intercom → Configure API key",
|
|
299
|
+
"docs_topic": "extensions#intercom"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"id": "conversation-starter",
|
|
303
|
+
"name": "AI Conversation Starter",
|
|
304
|
+
"type": "dashboard-toggle",
|
|
305
|
+
"description": "AI-generated opening messages for new chats.",
|
|
306
|
+
"dashboard_path": "AI Features → Conversation Starter → Toggle on",
|
|
307
|
+
"docs_topic": "ai-features#conversation-starter"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"id": "smart-replies",
|
|
311
|
+
"name": "AI Smart Replies",
|
|
312
|
+
"type": "dashboard-toggle",
|
|
313
|
+
"description": "AI-generated contextual response suggestions.",
|
|
314
|
+
"dashboard_path": "AI Features → Smart Replies → Toggle on",
|
|
315
|
+
"docs_topic": "ai-features#smart-replies"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"id": "conversation-summary",
|
|
319
|
+
"name": "AI Conversation Summary",
|
|
320
|
+
"type": "dashboard-toggle",
|
|
321
|
+
"description": "AI-generated recaps of extended conversations.",
|
|
322
|
+
"dashboard_path": "AI Features → Conversation Summary → Toggle on",
|
|
323
|
+
"docs_topic": "ai-features#conversation-summary"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"id": "calls",
|
|
327
|
+
"name": "Audio/Video Calls",
|
|
328
|
+
"type": "package-install",
|
|
329
|
+
"description": "1:1 and group audio/video calling. Includes call buttons in headers, incoming/outgoing call UI, and call logs. Requires installing @cometchat/calls-sdk-javascript.",
|
|
330
|
+
"package": "@cometchat/calls-sdk-javascript",
|
|
331
|
+
"components": ["CometChatIncomingCall", "CometChatOutgoingCall", "CometChatCallLogs"],
|
|
332
|
+
"docs_topic": "call-features"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"id": "rich-text-formatting",
|
|
336
|
+
"name": "Rich Text Formatting",
|
|
337
|
+
"type": "component-swap",
|
|
338
|
+
"description": "Bold, italic, underline, code, links, lists in messages. Replace CometChatMessageComposer with CometChatCompactMessageComposer.",
|
|
339
|
+
"swap_from": "CometChatMessageComposer",
|
|
340
|
+
"swap_to": "CometChatCompactMessageComposer",
|
|
341
|
+
"docs_topic": "core-features#rich-text-formatting"
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* /api/cometchat-token — server-side endpoint that mints CometChat auth tokens.
|
|
3
|
+
*
|
|
4
|
+
* Astro API route. The Auth Key NEVER leaves the server. The client calls
|
|
5
|
+
* this endpoint to get a short-lived auth token, then passes it to
|
|
6
|
+
* CometChatUIKit.loginWithAuthToken().
|
|
7
|
+
*
|
|
8
|
+
* Generated by `cometchat production-auth`. Customize freely:
|
|
9
|
+
* - Add real authentication: read the user's session cookie / JWT here
|
|
10
|
+
* - Map your app's user IDs to CometChat UIDs
|
|
11
|
+
* - Add rate limiting if exposed publicly
|
|
12
|
+
*
|
|
13
|
+
* Astro requirement: your astro.config.mjs must have `output: 'server'` or
|
|
14
|
+
* `output: 'hybrid'` for API routes to work. Static-only Astro builds
|
|
15
|
+
* cannot run server-side endpoints.
|
|
16
|
+
*
|
|
17
|
+
* Security note: this file MUST NOT use PUBLIC_* env vars for the Auth Key.
|
|
18
|
+
* The whole point is to keep the Auth Key out of the browser.
|
|
19
|
+
*/
|
|
20
|
+
import type { APIRoute } from "astro";
|
|
21
|
+
|
|
22
|
+
const COMETCHAT_APP_ID = import.meta.env.PUBLIC_COMETCHAT_APP_ID!;
|
|
23
|
+
const COMETCHAT_REGION = import.meta.env.PUBLIC_COMETCHAT_REGION!;
|
|
24
|
+
// IMPORTANT: server-only — no PUBLIC_ prefix
|
|
25
|
+
const COMETCHAT_AUTH_KEY = import.meta.env.COMETCHAT_AUTH_KEY!;
|
|
26
|
+
|
|
27
|
+
export const GET: APIRoute = async ({ request }) => {
|
|
28
|
+
const url = new URL(request.url);
|
|
29
|
+
// ⚠ Replace this with your real auth: read the session, extract the user ID,
|
|
30
|
+
// then map it to a CometChat UID. Do not trust the query param in production.
|
|
31
|
+
const uid = url.searchParams.get("uid") ?? "cometchat-uid-1";
|
|
32
|
+
|
|
33
|
+
if (!COMETCHAT_APP_ID || !COMETCHAT_REGION || !COMETCHAT_AUTH_KEY) {
|
|
34
|
+
return new Response(
|
|
35
|
+
JSON.stringify({ error: "CometChat credentials not configured on the server" }),
|
|
36
|
+
{ status: 500, headers: { "Content-Type": "application/json" } },
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const res = await fetch(
|
|
42
|
+
`https://${COMETCHAT_APP_ID}.api-${COMETCHAT_REGION}.cometchat.io/v3/users/${encodeURIComponent(uid)}/auth_tokens`,
|
|
43
|
+
{
|
|
44
|
+
method: "POST",
|
|
45
|
+
headers: {
|
|
46
|
+
"Content-Type": "application/json",
|
|
47
|
+
appid: COMETCHAT_APP_ID,
|
|
48
|
+
apikey: COMETCHAT_AUTH_KEY,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
if (!res.ok) {
|
|
54
|
+
const text = await res.text();
|
|
55
|
+
return new Response(
|
|
56
|
+
JSON.stringify({ error: `CometChat token mint failed (${res.status})`, detail: text }),
|
|
57
|
+
{ status: 502, headers: { "Content-Type": "application/json" } },
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const body = (await res.json()) as { data?: { authToken?: string } };
|
|
62
|
+
const authToken = body.data?.authToken;
|
|
63
|
+
if (!authToken) {
|
|
64
|
+
return new Response(
|
|
65
|
+
JSON.stringify({ error: "CometChat returned no authToken in response" }),
|
|
66
|
+
{ status: 502, headers: { "Content-Type": "application/json" } },
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return new Response(JSON.stringify({ authToken, uid }), {
|
|
71
|
+
status: 200,
|
|
72
|
+
headers: { "Content-Type": "application/json" },
|
|
73
|
+
});
|
|
74
|
+
} catch (err) {
|
|
75
|
+
return new Response(
|
|
76
|
+
JSON.stringify({
|
|
77
|
+
error: "Token mint failed",
|
|
78
|
+
detail: err instanceof Error ? err.message : String(err),
|
|
79
|
+
}),
|
|
80
|
+
{ status: 500, headers: { "Content-Type": "application/json" } },
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Astro requires this for non-static routes
|
|
86
|
+
export const prerender = false;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schemas/template.schema.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"experience_id": 1,
|
|
5
|
+
"framework": "astro",
|
|
6
|
+
"sdk_compatibility": ">=6.0.0 <7.0.0",
|
|
7
|
+
"default_placement": "dedicated-route",
|
|
8
|
+
"deps": [],
|
|
9
|
+
"env_vars": [
|
|
10
|
+
{
|
|
11
|
+
"name": "COMETCHAT_AUTH_KEY",
|
|
12
|
+
"required": true,
|
|
13
|
+
"secret": true,
|
|
14
|
+
"description": "Server-side only Auth Key (no PUBLIC_ prefix). Used by the /api/cometchat-token endpoint to mint user-scoped auth tokens. Remove PUBLIC_COMETCHAT_AUTH_KEY from .env — that variable is for development only and exposes the key to the browser."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "PUBLIC_COMETCHAT_APP_ID",
|
|
18
|
+
"required": true,
|
|
19
|
+
"description": "Same as before — App ID is safe to expose"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "PUBLIC_COMETCHAT_REGION",
|
|
23
|
+
"required": true,
|
|
24
|
+
"description": "Same as before — region is safe to expose"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"files": [
|
|
28
|
+
{
|
|
29
|
+
"path": "src/pages/api/cometchat-token.ts",
|
|
30
|
+
"action": "create",
|
|
31
|
+
"template_ref": "cometchat-token.ts.tpl",
|
|
32
|
+
"owned": true
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"verify_rules": [],
|
|
36
|
+
"next_steps": [
|
|
37
|
+
"1. Make sure your astro.config.mjs has output: 'server' or 'hybrid' (API endpoints need SSR-capable output).",
|
|
38
|
+
"2. Add COMETCHAT_AUTH_KEY (NO PUBLIC_ prefix) to .env with your CometChat Auth Key.",
|
|
39
|
+
"3. REMOVE PUBLIC_COMETCHAT_AUTH_KEY from .env (keep APP_ID and REGION).",
|
|
40
|
+
"4. In src/cometchat/ChatApp.tsx, replace the login flow:",
|
|
41
|
+
" FROM: CometChatUIKit.login('cometchat-uid-1').then(setUser).catch(setError);",
|
|
42
|
+
" TO: fetch('/api/cometchat-token?uid=' + encodeURIComponent(userId))",
|
|
43
|
+
" .then(r => r.json())",
|
|
44
|
+
" .then(data => CometChatUIKit.loginWithAuthToken(data.authToken))",
|
|
45
|
+
" .then(setUser)",
|
|
46
|
+
" .catch(e => setError(String(e)));",
|
|
47
|
+
"5. Replace 'cometchat-uid-1' with your real authenticated user's ID.",
|
|
48
|
+
"6. Restart the dev server (`npm run dev`) so the new env var takes effect.",
|
|
49
|
+
"7. The Auth Key is now ONLY in server memory — never sent to the browser."
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* /api/cometchat-token — server-side endpoint that mints CometChat auth tokens.
|
|
3
|
+
*
|
|
4
|
+
* This is the production-mode replacement for client-side login(UID) + Auth Key.
|
|
5
|
+
* The Auth Key NEVER leaves the server. The client calls this endpoint to get
|
|
6
|
+
* a short-lived auth token, then passes it to CometChatUIKit.loginWithAuthToken().
|
|
7
|
+
*
|
|
8
|
+
* Generated by `cometchat production-auth`. Customize freely:
|
|
9
|
+
* - Add real authentication: read the user's session cookie / JWT here, do
|
|
10
|
+
* not trust the `?uid=` query param in production.
|
|
11
|
+
* - Map your app's user IDs to CometChat UIDs.
|
|
12
|
+
* - Add rate limiting if exposed publicly.
|
|
13
|
+
* - Cache tokens per UID for short windows to reduce CometChat API load.
|
|
14
|
+
*
|
|
15
|
+
* Security note: this file MUST NOT use NEXT_PUBLIC_* env vars for the Auth Key.
|
|
16
|
+
* The whole point of this endpoint is to keep the Auth Key out of the browser.
|
|
17
|
+
*/
|
|
18
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
19
|
+
|
|
20
|
+
const COMETCHAT_APP_ID = process.env.NEXT_PUBLIC_COMETCHAT_APP_ID!;
|
|
21
|
+
const COMETCHAT_REGION = process.env.NEXT_PUBLIC_COMETCHAT_REGION!;
|
|
22
|
+
// IMPORTANT: server-only — no NEXT_PUBLIC_ prefix
|
|
23
|
+
const COMETCHAT_AUTH_KEY = process.env.COMETCHAT_AUTH_KEY!;
|
|
24
|
+
|
|
25
|
+
export async function GET(request: NextRequest) {
|
|
26
|
+
// ⚠ Replace this with your real auth: read the session, extract the user ID,
|
|
27
|
+
// then map it to a CometChat UID. Do not trust the query param in production.
|
|
28
|
+
const uid = request.nextUrl.searchParams.get("uid") ?? "cometchat-uid-1";
|
|
29
|
+
|
|
30
|
+
if (!COMETCHAT_APP_ID || !COMETCHAT_REGION || !COMETCHAT_AUTH_KEY) {
|
|
31
|
+
return NextResponse.json(
|
|
32
|
+
{ error: "CometChat credentials not configured on the server" },
|
|
33
|
+
{ status: 500 },
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
// Mint a fresh auth token for this UID via the CometChat REST API.
|
|
39
|
+
// Endpoint: POST https://{appId}.api-{region}.cometchat.io/v3/users/{uid}/auth_tokens
|
|
40
|
+
const res = await fetch(
|
|
41
|
+
`https://${COMETCHAT_APP_ID}.api-${COMETCHAT_REGION}.cometchat.io/v3/users/${encodeURIComponent(uid)}/auth_tokens`,
|
|
42
|
+
{
|
|
43
|
+
method: "POST",
|
|
44
|
+
headers: {
|
|
45
|
+
"Content-Type": "application/json",
|
|
46
|
+
appid: COMETCHAT_APP_ID,
|
|
47
|
+
apikey: COMETCHAT_AUTH_KEY,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
if (!res.ok) {
|
|
53
|
+
const text = await res.text();
|
|
54
|
+
return NextResponse.json(
|
|
55
|
+
{ error: `CometChat token mint failed (${res.status})`, detail: text },
|
|
56
|
+
{ status: 502 },
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const body = (await res.json()) as { data?: { authToken?: string } };
|
|
61
|
+
const authToken = body.data?.authToken;
|
|
62
|
+
if (!authToken) {
|
|
63
|
+
return NextResponse.json(
|
|
64
|
+
{ error: "CometChat returned no authToken in response" },
|
|
65
|
+
{ status: 502 },
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return NextResponse.json({ authToken, uid });
|
|
70
|
+
} catch (err) {
|
|
71
|
+
return NextResponse.json(
|
|
72
|
+
{ error: "Token mint failed", detail: err instanceof Error ? err.message : String(err) },
|
|
73
|
+
{ status: 500 },
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Disable static rendering — this is a dynamic API route
|
|
79
|
+
export const dynamic = "force-dynamic";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schemas/template.schema.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"experience_id": 1,
|
|
5
|
+
"framework": "nextjs",
|
|
6
|
+
"sdk_compatibility": ">=6.0.0 <7.0.0",
|
|
7
|
+
"default_placement": "dedicated-route",
|
|
8
|
+
"deps": [],
|
|
9
|
+
"env_vars": [
|
|
10
|
+
{
|
|
11
|
+
"name": "COMETCHAT_AUTH_KEY",
|
|
12
|
+
"required": true,
|
|
13
|
+
"secret": true,
|
|
14
|
+
"description": "Server-side only Auth Key (no NEXT_PUBLIC_ prefix). Used by the /api/cometchat-token endpoint to mint user-scoped auth tokens. Remove NEXT_PUBLIC_COMETCHAT_AUTH_KEY from .env.local — that variable is for development only and exposes the key to the browser."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "NEXT_PUBLIC_COMETCHAT_APP_ID",
|
|
18
|
+
"required": true,
|
|
19
|
+
"description": "Same as before — App ID is safe to expose"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "NEXT_PUBLIC_COMETCHAT_REGION",
|
|
23
|
+
"required": true,
|
|
24
|
+
"description": "Same as before — region is safe to expose"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"files": [
|
|
28
|
+
{
|
|
29
|
+
"path": "src/app/api/cometchat-token/route.ts",
|
|
30
|
+
"action": "create",
|
|
31
|
+
"template_ref": "route.ts.tpl",
|
|
32
|
+
"owned": true
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"verify_rules": [],
|
|
36
|
+
"next_steps": [
|
|
37
|
+
"1. Add COMETCHAT_AUTH_KEY (NO NEXT_PUBLIC_ prefix) to .env.local with your CometChat Auth Key.",
|
|
38
|
+
"2. REMOVE NEXT_PUBLIC_COMETCHAT_AUTH_KEY from .env.local (keep APP_ID and REGION).",
|
|
39
|
+
"3. In src/app/cometchat/CometChatNoSSR.tsx, replace the login flow:",
|
|
40
|
+
" FROM: CometChatUIKit.login('cometchat-uid-1').then(setUser).catch(setError);",
|
|
41
|
+
" TO: fetch('/api/cometchat-token?uid=' + encodeURIComponent(userId))",
|
|
42
|
+
" .then(r => r.json())",
|
|
43
|
+
" .then(data => CometChatUIKit.loginWithAuthToken(data.authToken))",
|
|
44
|
+
" .then(setUser)",
|
|
45
|
+
" .catch(e => setError(String(e)));",
|
|
46
|
+
"4. Replace the hardcoded 'cometchat-uid-1' with your real authenticated user's ID.",
|
|
47
|
+
"5. Restart the dev server (`npm run dev`) so the new env var takes effect.",
|
|
48
|
+
"6. The Auth Key is now ONLY in server memory — never sent to the browser."
|
|
49
|
+
]
|
|
50
|
+
}
|