@moveo-ai/web-client 0.123.0-true.2 → 0.123.0-true.21

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.
Files changed (48) hide show
  1. package/README.md +26 -8
  2. package/dist/752.min.js.LICENSE.txt +1 -1
  3. package/dist/882.min.js.LICENSE.txt +1 -1
  4. package/dist/929.min.js.LICENSE.txt +1 -1
  5. package/dist/audio-client.min.js +1 -1
  6. package/dist/audio-client.min.js.LICENSE.txt +1 -1
  7. package/dist/continue/index.html +1 -1
  8. package/dist/iframe.min.js +1 -1
  9. package/dist/iframe.min.js.LICENSE.txt +1 -1
  10. package/dist/index.html +1 -1
  11. package/dist/preview/index.html +2 -2
  12. package/dist/preview.css.min.js.LICENSE.txt +1 -1
  13. package/dist/public/locales/ar.json +23 -1
  14. package/dist/public/locales/bg.json +23 -1
  15. package/dist/public/locales/cs.json +23 -1
  16. package/dist/public/locales/da.json +23 -1
  17. package/dist/public/locales/de.json +23 -1
  18. package/dist/public/locales/el.json +23 -1
  19. package/dist/public/locales/en.json +23 -1
  20. package/dist/public/locales/es.json +23 -1
  21. package/dist/public/locales/fr.json +23 -1
  22. package/dist/public/locales/id.json +23 -1
  23. package/dist/public/locales/it.json +23 -1
  24. package/dist/public/locales/ja.json +23 -1
  25. package/dist/public/locales/me.json +23 -1
  26. package/dist/public/locales/nl-be.json +23 -1
  27. package/dist/public/locales/nl.json +23 -1
  28. package/dist/public/locales/pl.json +23 -1
  29. package/dist/public/locales/pt-br.json +23 -1
  30. package/dist/public/locales/pt.json +23 -1
  31. package/dist/public/locales/ro.json +23 -1
  32. package/dist/public/locales/ru.json +23 -1
  33. package/dist/public/locales/sq.json +23 -1
  34. package/dist/public/locales/sr.json +23 -1
  35. package/dist/public/locales/sv.json +23 -1
  36. package/dist/public/locales/tl.json +23 -1
  37. package/dist/public/locales/tr.json +23 -1
  38. package/dist/public/locales/zh.json +23 -1
  39. package/dist/telnyx-client.min.js +1 -1
  40. package/dist/telnyx-client.min.js.LICENSE.txt +1 -1
  41. package/dist/web-client.min.js +1 -1
  42. package/dist/web-client.min.js.LICENSE.txt +1 -1
  43. package/dist/webrtc-client.min.js +1 -1
  44. package/dist/webrtc-client.min.js.LICENSE.txt +1 -1
  45. package/package.json +5 -3
  46. package/web-client.d.ts +16 -2
  47. package/dist/63.min.js +0 -2
  48. package/dist/63.min.js.LICENSE.txt +0 -6
package/README.md CHANGED
@@ -103,6 +103,9 @@ MoveoAI.init({ integrationId: 'YOUR_INTEGRATION_ID' }).then((controller) => {
103
103
  // Send a message programmatically
104
104
  controller.sendMessage({ text: 'Hello!' });
105
105
 
106
+ // Run a dialog node directly, with no text
107
+ controller.sendMessage({ trigger_node_id: 'YOUR_NODE_ID' });
108
+
106
109
  // Update the conversation context
107
110
  controller.updateContext({ custom_field: 'custom_value' });
108
111
 
@@ -191,11 +194,26 @@ Any other key passes through as a widget-config override for the loaded integrat
191
194
  | `closeWindow()` | Closes the chat window |
192
195
  | `closeConversation({ hide })` | Ends the conversation; the widget hides unless `hide: false` |
193
196
  | `sendMessage({ text })` | Sends a message to the agent |
197
+ | `sendMessage({ trigger_node_id })` | Runs a dialog node directly. Send it without text |
194
198
  | `showTeaserMessage(message?)` | Shows the teaser bubble |
195
199
  | `updateContext(ctx)` | Updates the conversation context |
196
200
  | `setCSSVariables(vars)` | Overrides widget CSS variables |
197
201
  | `setLocale(locale)` | Switches the widget language |
198
202
  | `destroy()` | Removes the widget from the page |
203
+ | `setVisitorConsent(granted)` | Passes the visitor's cookie consent for the visitor id |
204
+
205
+ The widget reads or writes the `moveo_visitor_id` cookie only after the visitor
206
+ acts in the widget: opens it, taps a teaser or a reply, or types. A panel that
207
+ opens by itself does not count. The cookie is set on your registrable domain,
208
+ so `www` and other subdomains share one id. If the page runs
209
+ OneTrust, the widget follows the visitor's choice there: the category your
210
+ OneTrust lists the cookie in, or Performance (`C0002`) if it is not listed. If
211
+ the page runs Cookiebot, the widget follows the Statistics category.
212
+ `setVisitorConsent(granted)` wins over all of them. After `setVisitorConsent(true)`,
213
+ the widget writes the cookie at once, without a visitor action. After `setVisitorConsent(false)`,
214
+ the widget never reads or writes the cookie, and removes one that is already
215
+ there. In the EU, the cookie needs the visitor's consent. If your site uses
216
+ another consent tool, call `setVisitorConsent` from it.
199
217
 
200
218
  `updateContext` calls made inside a 300 ms window merge into one update, so a
201
219
  burst of calls costs one round trip and the first call still ships at once.
@@ -226,7 +244,8 @@ payload listed below.
226
244
 
227
245
  `onAnalyticsEvent` receives every interaction the widget tracks, identified by
228
246
  the `event` field: `session_start`, `session_end`, `message_sent` (the user sent
229
- a message — never carries the text), `launcher_clicked`,
247
+ a message — never carries the text), `launcher_clicked`, `teaser_clicked`
248
+ (the visitor tapped the teaser line, which opens the chat),
230
249
  `teaser_quick_reply_clicked` (a teaser reply the visitor tapped, carrying its
231
250
  configured `label`), `teaser_composer_submitted` (the visitor sent their own
232
251
  line from the teaser — carries no properties, because the text is theirs),
@@ -256,9 +275,9 @@ runs the end-of-chat survey when the account has one. On an empty chat, or
256
275
  while a prompt or webview owns the panel, it just hides the panel. Set
257
276
  `close_minimizes_window: true` and the button always minimizes and never ends.
258
277
 
259
- **Restart**, in the header title menu, does not ask. It ends the conversation
260
- and opens the next one in place, with the panel still open, and shows no
261
- end-of-chat survey.
278
+ **New conversation**, in the header title menu, does not ask. It ends the
279
+ conversation and opens the next one in place, with the panel still open, and
280
+ shows no end-of-chat survey.
262
281
 
263
282
  During a voice call the close button asks first, then ends the call and hides
264
283
  the panel. The conversation stays open, and the call's turns stay in the thread.
@@ -270,7 +289,7 @@ Which event to count:
270
289
  | `close_icon_clicked` | The visitor presses X, before they answer the confirmation | No |
271
290
  | `popover_end_chat_clicked` | They confirm **End conversation** | Yes |
272
291
  | `popover_end_chat_continue_clicked` | They pick **Minimize** instead | No |
273
- | `restart_conversation_clicked` | They pick **Restart** from the menu | Yes |
292
+ | `restart_conversation_clicked` | They pick **New conversation** from the menu | Yes |
274
293
 
275
294
  Add `popover_end_chat_clicked` and `restart_conversation_clicked` for the
276
295
  number of conversations visitors ended themselves. `close_icon_clicked` counts
@@ -512,9 +531,8 @@ teaser steps aside while the panel is up, and a visitor who opens it, reads
512
531
  whatever the bot opened with and closes it again has said nothing — so the
513
532
  teaser comes back, waiting out `show_after` once more. It goes away for good
514
533
  the moment the visitor sends anything of their own, a tapped chip included. On
515
- a sticky session that reload does not tell us anything until they open the
516
- chat, so a returning visitor sees the teaser again and loses it as soon as
517
- their earlier conversation loads.
534
+ a sticky session the reload waits for the earlier conversation to load before
535
+ the teaser shows, so a visitor who already talked never sees it flash.
518
536
 
519
537
  **Sections belong to their page.** A single-page-app navigation rebuilds the
520
538
  watch against the new page's sections, and clears the current section so
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @moveo-ai/web-client v0.123.0-true.2
3
+ * @moveo-ai/web-client v0.123.0-true.21
4
4
  * Copyright (c) Moveo.ai (TM)
5
5
  *
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @moveo-ai/web-client v0.123.0-true.2
3
+ * @moveo-ai/web-client v0.123.0-true.21
4
4
  * Copyright (c) Moveo.ai (TM)
5
5
  *
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @moveo-ai/web-client v0.123.0-true.2
3
+ * @moveo-ai/web-client v0.123.0-true.21
4
4
  * Copyright (c) Moveo.ai (TM)
5
5
  *
6
6
  */