@ada-support/web-storage 1.4.8 → 1.5.1

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.
@@ -41,6 +41,12 @@ border: 1px solid;
41
41
  <td>Session (as long as the browser application is open)</td>
42
42
  </tr>
43
43
  <tr>
44
+ <td>__Host-ada-session-[session ID]-[generation]</td>
45
+ <td>Stores the rotating session refresh credential in a server-set HttpOnly cookie. Used to authenticate the visitor's generative chat session with Ada. Set on the bot's Ada subdomain.</td>
46
+ <td>Cookie (essential, security)</td>
47
+ <td>Session (up to 7 days)</td>
48
+ </tr>
49
+ <tr>
44
50
  <td>__Secure-[alphanumeric ID]</td>
45
51
  <td>Used by Youtube to deliver relevant advertisements</td>
46
52
  <td>Cookie (marketing)</td>
@@ -233,6 +239,12 @@ border: 1px solid;
233
239
  <td>Persistent</td>
234
240
  </tr>
235
241
  <tr>
242
+ <td>liveChatTransition</td>
243
+ <td>Records when the live-agent connection state above last changed, so another Ada product on the same domain can tell a current handoff from a stale flag.</td>
244
+ <td>Web Storage (functional)</td>
245
+ <td>Persistent</td>
246
+ </tr>
247
+ <tr>
236
248
  <td>messagingAuthState</td>
237
249
  <td>Stores the messaging authentication state (its owner chatter, a short-lived messaging access token and expiry, a rotating session refresh token, and a refresh counter) used to authenticate the visitor's generative chat session with Ada. Set on the bot's Ada subdomain.</td>
238
250
  <td>Web Storage (functional)</td>
@@ -11,6 +11,15 @@ export interface MessagingAuthState {
11
11
  sessionRefreshToken: string;
12
12
  refreshGeneration: number;
13
13
  }
14
+ /**
15
+ * When the live-chat pair (`inLiveChat`/`liveChatPending`) last changed, and to what.
16
+ * Named for the same reason as `MessagingAuthState` above — `generate-html.ts` truncates
17
+ * an inline object value at its first `}`.
18
+ */
19
+ export interface LiveChatTransition {
20
+ open: boolean;
21
+ at: number;
22
+ }
14
23
  /**
15
24
  * IMPORTANT
16
25
  * You most likely don't need to modify anything here.
@@ -54,6 +63,8 @@ export interface StorageValueByKey {
54
63
  inLiveChat: boolean;
55
64
  /** Indicates whether user is waiting to connect to a live agent. */
56
65
  liveChatPending: boolean;
66
+ /** Records when the live-agent connection state above last changed, so another Ada product on the same domain can tell a current handoff from a stale flag. */
67
+ liveChatTransition: LiveChatTransition;
57
68
  /** Used to implement Chat reconnection after an interruption. */
58
69
  netDisruptionMsgStartTime: number;
59
70
  /** Stores Chat iFrame parent window origin. */
@@ -6,8 +6,9 @@ interface WebStorageItem {
6
6
  duration: string;
7
7
  }
8
8
  /**
9
- * This is the list of third party cookies and local storage items that we don't use directly,
10
- * but must include in the list: https://static.ada.support/ada-web-storage-list.html
9
+ * Manually listed cookies and local storage items for the disclosure list:
10
+ * https://static.ada.support/ada-web-storage-list.html
11
+ * Includes Ada-set cookies and third-party items outside this package's Web Storage API.
11
12
  */
12
13
  export declare const THIRD_PARTY_ITEMS: WebStorageItem[];
13
14
  export {};
@@ -2,10 +2,18 @@
2
2
  exports.__esModule = true;
3
3
  exports.THIRD_PARTY_ITEMS = void 0;
4
4
  /**
5
- * This is the list of third party cookies and local storage items that we don't use directly,
6
- * but must include in the list: https://static.ada.support/ada-web-storage-list.html
5
+ * Manually listed cookies and local storage items for the disclosure list:
6
+ * https://static.ada.support/ada-web-storage-list.html
7
+ * Includes Ada-set cookies and third-party items outside this package's Web Storage API.
7
8
  */
8
9
  exports.THIRD_PARTY_ITEMS = [
10
+ {
11
+ keyName: "__Host-ada-session-[session ID]-[generation]",
12
+ description: "Stores the rotating session refresh credential in a server-set HttpOnly cookie. Used to authenticate the visitor's generative chat session with Ada. Set on the bot's Ada subdomain.",
13
+ type: "Cookie",
14
+ duration: "Session (up to 7 days)",
15
+ purpose: ["Essential", "Security"]
16
+ },
9
17
  {
10
18
  keyName: "vuid",
11
19
  description: "Used by Vimeo to store the user’s usage history (loaded only if a video has been included).",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/web-storage",
3
- "version": "1.4.8",
3
+ "version": "1.5.1",
4
4
  "description": "A package to provide access to Web Storage API",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
@@ -13,6 +13,16 @@ export interface MessagingAuthState {
13
13
  refreshGeneration: number;
14
14
  }
15
15
 
16
+ /**
17
+ * When the live-chat pair (`inLiveChat`/`liveChatPending`) last changed, and to what.
18
+ * Named for the same reason as `MessagingAuthState` above — `generate-html.ts` truncates
19
+ * an inline object value at its first `}`.
20
+ */
21
+ export interface LiveChatTransition {
22
+ open: boolean;
23
+ at: number;
24
+ }
25
+
16
26
  /**
17
27
  * IMPORTANT
18
28
  * You most likely don't need to modify anything here.
@@ -72,6 +82,9 @@ export interface StorageValueByKey {
72
82
  /** Indicates whether user is waiting to connect to a live agent. */
73
83
  liveChatPending: boolean;
74
84
 
85
+ /** Records when the live-agent connection state above last changed, so another Ada product on the same domain can tell a current handoff from a stale flag. */
86
+ liveChatTransition: LiveChatTransition;
87
+
75
88
  /** Used to implement Chat reconnection after an interruption. */
76
89
  netDisruptionMsgStartTime: number;
77
90
 
@@ -9,10 +9,19 @@ interface WebStorageItem {
9
9
  }
10
10
 
11
11
  /**
12
- * This is the list of third party cookies and local storage items that we don't use directly,
13
- * but must include in the list: https://static.ada.support/ada-web-storage-list.html
12
+ * Manually listed cookies and local storage items for the disclosure list:
13
+ * https://static.ada.support/ada-web-storage-list.html
14
+ * Includes Ada-set cookies and third-party items outside this package's Web Storage API.
14
15
  */
15
16
  export const THIRD_PARTY_ITEMS: WebStorageItem[] = [
17
+ {
18
+ keyName: "__Host-ada-session-[session ID]-[generation]",
19
+ description:
20
+ "Stores the rotating session refresh credential in a server-set HttpOnly cookie. Used to authenticate the visitor's generative chat session with Ada. Set on the bot's Ada subdomain.",
21
+ type: "Cookie",
22
+ duration: "Session (up to 7 days)",
23
+ purpose: ["Essential", "Security"],
24
+ },
16
25
  {
17
26
  keyName: "vuid",
18
27
  description: