@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 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 URL. The **first** entry whose `url`
383
- appears in the page's URL wins, so specific paths belong above general ones, and
384
- the `teaser` block itself covers everywhere else.
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({
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @moveo-ai/web-client v0.116.0-true.2
3
+ * @moveo-ai/web-client v0.116.0-true.4
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.116.0-true.2
3
+ * @moveo-ai/web-client v0.116.0-true.4
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.116.0-true.2
3
+ * @moveo-ai/web-client v0.116.0-true.4
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.116.0-true.2
3
+ * @moveo-ai/web-client v0.116.0-true.4
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.116.0-true.2
3
+ * @moveo-ai/web-client v0.116.0-true.4
4
4
  * Copyright (c) Moveo.ai (TM)
5
5
  *
6
6
  */