@moveo-ai/web-client 0.116.0-true.2 → 0.116.0-true.4
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 +14 -5
- package/dist/63.min.js.LICENSE.txt +1 -1
- package/dist/752.min.js.LICENSE.txt +1 -1
- package/dist/882.min.js.LICENSE.txt +1 -1
- package/dist/929.min.js.LICENSE.txt +1 -1
- package/dist/audio-client.min.js.LICENSE.txt +1 -1
- package/dist/iframe.min.js +1 -1
- package/dist/iframe.min.js.LICENSE.txt +1 -1
- package/dist/index.html +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/preview.css.min.js.LICENSE.txt +1 -1
- package/dist/telnyx-client.min.js.LICENSE.txt +1 -1
- package/dist/web-client.min.js +1 -1
- package/dist/web-client.min.js.LICENSE.txt +1 -1
- package/dist/webrtc-client.min.js.LICENSE.txt +1 -1
- package/package.json +1 -1
- package/web-client.d.ts +10 -4
package/README.md
CHANGED
|
@@ -213,7 +213,7 @@ payload listed below.
|
|
|
213
213
|
| -------------------------- | ---------------------------------------------- | ----------------------------------------------- |
|
|
214
214
|
| `onSessionCreated(cb)` | A new session opens | `{ user_id, session_id, display_name }` |
|
|
215
215
|
| `onSessionReconnected(cb)` | An existing session reconnects | `{ user_id, session_id, display_name }` |
|
|
216
|
-
| `onSessionClosed(cb)` | The session closes |
|
|
216
|
+
| `onSessionClosed(cb)` | The session closes | `{ restarting: true }` on a restart, else none |
|
|
217
217
|
| `onConversationClosed(cb)` | The user ends the conversation | — |
|
|
218
218
|
| `onWebchatOpened(cb)` | The user opens the widget | `{ isFull, is_mobile? }` |
|
|
219
219
|
| `onWebchatClosed(cb)` | The user closes the widget | `{ isFull }` |
|
|
@@ -275,7 +275,14 @@ Add `popover_end_chat_clicked` and `restart_conversation_clicked` for the
|
|
|
275
275
|
number of conversations visitors ended themselves. `close_icon_clicked` counts
|
|
276
276
|
presses, not conversations: count it as an end and you overstate your totals.
|
|
277
277
|
`onSessionClosed` covers the visitor-confirmed end, and `onConversationClosed`
|
|
278
|
-
covers a close that came from the agent side, so neither alone is a total.
|
|
278
|
+
covers a close that came from the agent side, so neither alone is a total. A
|
|
279
|
+
restart fires `onSessionClosed` with `{ restarting: true }`, immediately
|
|
280
|
+
followed by `onSessionCreated` for the conversation that replaces it; count it
|
|
281
|
+
as an end, and ignore it if you only want the ends that left no conversation
|
|
282
|
+
behind. A session that timed out fires neither: nothing ended it, so neither
|
|
283
|
+
button on the expired prompt reports a close — **Start new chat** opens the
|
|
284
|
+
replacement, and **Close** puts the panel away, both in silence after the
|
|
285
|
+
`onSessionExpired` you already heard.
|
|
279
286
|
|
|
280
287
|
### Forward widget events into your analytics
|
|
281
288
|
|
|
@@ -379,9 +386,11 @@ With no `variant`, replies mean `question_chips` and their absence means
|
|
|
379
386
|
|
|
380
387
|
#### A different teaser per page
|
|
381
388
|
|
|
382
|
-
`teaser.pages[]` varies the teaser by
|
|
383
|
-
|
|
384
|
-
|
|
389
|
+
`teaser.pages[]` varies the teaser by page. Of the entries whose `url` appears
|
|
390
|
+
in the page's **path**, the **longest** wins, so order does not matter and
|
|
391
|
+
`/flex-pocket` beats `/flex`. A hint is matched against the path alone, so a
|
|
392
|
+
domain or a query parameter is not a page hint; the `teaser` block itself covers
|
|
393
|
+
everywhere else.
|
|
385
394
|
|
|
386
395
|
```javascript
|
|
387
396
|
MoveoAI.init({
|