@ada-support/web-storage 0.6.0 → 0.7.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.
@@ -0,0 +1,35 @@
1
+ name: "Deploy HTML page"
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: "Checkout source code"
12
+ uses: "actions/checkout@v2"
13
+ env:
14
+ GITHUB_TOKEN: ${{ secrets.PUSH_ACCESS_TOKEN }}
15
+ with:
16
+ ref: ${{ github.ref }}
17
+
18
+ - uses: actions/setup-node@v2
19
+ with:
20
+ node-version: "16.x"
21
+ registry-url: "https://registry.npmjs.org"
22
+
23
+ - name: "Compile"
24
+ run: |
25
+ yarn install
26
+ yarn compile
27
+
28
+ - name: "Upload ada-web-storage-list.html"
29
+ run: |
30
+ aws s3 cp dist/ada-web-storage-list.html s3://ada-static-cdn-prod/ada-web-storage-list.html
31
+
32
+ env:
33
+ AWS_ACCESS_KEY_ID: ${{ secrets.ADA_STATIC_CDN_PROD_ACCESS_KEY_ID }}
34
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.ADA_STATIC_CDN_PROD_SECRET_ACCESS_KEY }}
35
+ AWS_DEFAULT_REGION: us-east-1
@@ -0,0 +1,133 @@
1
+ <html lang="en">
2
+ <head>
3
+ <title>Ada Web Storage Items</title>
4
+ <meta charset="utf-8">
5
+ <style>
6
+ body {
7
+ font-family: sans-serif;
8
+ }
9
+ h1 {
10
+ font-size: 1.4em;
11
+ }
12
+ table {
13
+ border-collapse: collapse;
14
+ }
15
+ table th, table td {
16
+ text-align: left;
17
+ padding: 10px;
18
+ border: 1px solid;
19
+ }
20
+ </style>
21
+ </head>
22
+ <body>
23
+ <h1>Ada Web Storage Items (“Cookies”)</h1>
24
+ <table>
25
+ <thead>
26
+ <tr>
27
+ <th>Name</th><th>Description</th><th>Type</th><th>Duration</th>
28
+ <tr>
29
+ </thead>
30
+ <tbody>
31
+ <tr>
32
+ <td>_dd_s</td><td>Used to monitor user sessions for DataDog RUM Tracking.</td><td>Cookie</td><td>10-15 Minutes</td>
33
+ </tr>
34
+ <tr>
35
+ <td>ada-embed_chat-assigned-version</td><td>Used to store the Chat version assigned to a user.</td><td>Web Storage</td><td>Persistent</td>
36
+ </tr>
37
+ <tr>
38
+ <td>ada-embed_chat-manifest-cache</td><td>Used to store information about current versions of Chat available (“canary” or “stable”).</td><td>Web Storage</td><td>Persistent</td>
39
+ </tr>
40
+ <tr>
41
+ <td>ada-embed_chatter-created</td><td>Used to determine whether chatter session is expired.</td><td>Web Storage</td><td>Persistent</td>
42
+ </tr>
43
+ <tr>
44
+ <td>ada-embed_is-drawer-open</td><td>Used to determine if the drawer was opened previously so when users navigate to other pages we can automatically open chat.</td><td>Web Storage</td><td>Persistent</td>
45
+ </tr>
46
+ <tr>
47
+ <td>ada-embed_session_token</td><td>Used for chatter authentication.</td><td>Web Storage</td><td>Persistent</td>
48
+ </tr>
49
+ <tr>
50
+ <td>ada-embed_zd-messaging-chatter-created</td><td>Used to determine whether Zendesk session is expired.</td><td>Web Storage</td><td>Persistent</td>
51
+ </tr>
52
+ <tr>
53
+ <td>ada-embed_zd-messaging-external-user-id</td><td>Stores Zendesk internal user id.</td><td>Web Storage</td><td>Persistent</td>
54
+ </tr>
55
+ <tr>
56
+ <td>ada-embed_zd-previous-tags</td><td>Used to cache Zendesk tags assigned to a conversation.</td><td>Web Storage</td><td>Persistent</td>
57
+ </tr>
58
+ <tr>
59
+ <td>ada-embed_zd-session-id</td><td>Stores Zendesk session id.</td><td>Web Storage</td><td>Persistent</td>
60
+ </tr>
61
+ <tr>
62
+ <td>ada-embed-assigned-version</td><td>Used to store the Web SDK version assigned to a user.</td><td>Web Storage</td><td>Persistent</td>
63
+ </tr>
64
+ <tr>
65
+ <td>ada-embed-manifest-cache</td><td>Used to store information about current versions of Web SDK available (“canary” or “stable”).</td><td>Web Storage</td><td>Persistent</td>
66
+ </tr>
67
+ <tr>
68
+ <td>ada-functional-storage</td><td>Used to store general information about Ada application state.</td><td>Web Storage</td><td>Persistent</td>
69
+ </tr>
70
+ <tr>
71
+ <td>chatter</td><td>Used to identify the user within Ada.</td><td>Web Storage</td><td>Persistent</td>
72
+ </tr>
73
+ <tr>
74
+ <td>created</td><td>Used to determine whether chatter session is expired. This is stored on Ada domain.</td><td>Web Storage</td><td>Persistent</td>
75
+ </tr>
76
+ <tr>
77
+ <td>delayMessageAfterLiveChatEndTimeStamp</td><td>Used for live chat messaging functionality.</td><td>Web Storage</td><td>Persistent</td>
78
+ </tr>
79
+ <tr>
80
+ <td>fs_uid</td><td>Used to identify and distinguish data for each user</td><td>Cookie</td><td>3 Months</td>
81
+ </tr>
82
+ <tr>
83
+ <td>inLiveChat</td><td>Indicates whether user is connected to a live agent.</td><td>Web Storage</td><td>Persistent</td>
84
+ </tr>
85
+ <tr>
86
+ <td>liveChatPending</td><td>Indicates whether user is waiting to connect to a live agent.</td><td>Web Storage</td><td>Persistent</td>
87
+ </tr>
88
+ <tr>
89
+ <td>netDisruptionMsgStartTime</td><td>Used to implement Chat reconnection after an interruption.</td><td>Web Storage</td><td>Persistent</td>
90
+ </tr>
91
+ <tr>
92
+ <td>parentOrigin</td><td>Stores Chat iFrame parent window origin.</td><td>Web Storage</td><td>Persistent</td>
93
+ </tr>
94
+ <tr>
95
+ <td>previouslyAuthenticated</td><td>Used for Zendesk authentication functionality.</td><td>Web Storage</td><td>Persistent</td>
96
+ </tr>
97
+ <tr>
98
+ <td>previousZDTags</td><td>Used to cache Zendesk tags assigned to a conversation. This is stored on Ada domain.</td><td>Web Storage</td><td>Persistent</td>
99
+ </tr>
100
+ <tr>
101
+ <td>secretButton</td><td>Used during Oracle handoffs to indicate whether the agent has sent a request for a secret message. Allows the state to persist between page changes.</td><td>Web Storage</td><td>Persistent</td>
102
+ </tr>
103
+ <tr>
104
+ <td>sessionToken</td><td>Used for chatter authentication. This is stored on Ada domain.</td><td>Web Storage</td><td>Persistent</td>
105
+ </tr>
106
+ <tr>
107
+ <td>vuid</td><td>Used by Vimeo to store the user’s usage history (loaded only if a video has been included).</td><td>Cookie</td><td>2 Years</td>
108
+ </tr>
109
+ <tr>
110
+ <td>zd_isChatterAuthenticated</td><td>Used for Zendesk authentication functionality.</td><td>Web Storage</td><td>Persistent</td>
111
+ </tr>
112
+ <tr>
113
+ <td>zdAuthChatPending</td><td>Used for Zendesk authentication functionality.</td><td>Web Storage</td><td>Persistent</td>
114
+ </tr>
115
+ <tr>
116
+ <td>zdCid</td><td>Used for Zendesk SDK functionality.</td><td>Web Storage</td><td>Persistent</td>
117
+ </tr>
118
+ <tr>
119
+ <td>zdCStore</td><td>Used for Zendesk SDK functionality.</td><td>Web Storage</td><td>Persistent</td>
120
+ </tr>
121
+ <tr>
122
+ <td>zdMessagingChatterCreated</td><td>Used for Zendesk SDK functionality.</td><td>Web Storage</td><td>Persistent</td>
123
+ </tr>
124
+ <tr>
125
+ <td>zdMessagingExternalUserId</td><td>Used for Zendesk SDK functionality.</td><td>Web Storage</td><td>Persistent</td>
126
+ </tr>
127
+ <tr>
128
+ <td>zdSessionId</td><td>Used for Zendesk SDK functionality.</td><td>Web Storage</td><td>Persistent</td>
129
+ </tr>
130
+ </tbody>
131
+ </table>
132
+ </body>
133
+ </html>
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
+ if (ar || !(i in from)) {
5
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
+ ar[i] = from[i];
7
+ }
8
+ }
9
+ return to.concat(ar || Array.prototype.slice.call(from));
10
+ };
11
+ exports.__esModule = true;
12
+ var fs_1 = require("fs");
13
+ var third_party_items_1 = require("../third-party-items");
14
+ var OUTPUT_DIR = "dist";
15
+ var OUTPUT_FILENAME = "ada-web-storage-list.html";
16
+ var PARSE_ERROR_MESSAGE = "Could not parse StorageValueByKey interface";
17
+ function runScript() {
18
+ var data = (0, fs_1.readFileSync)("./src/storage-keys.ts", "utf-8");
19
+ var matches = data.match(/StorageValueByKey \{([^}]+)}/);
20
+ if (!matches) {
21
+ throw new Error(PARSE_ERROR_MESSAGE);
22
+ }
23
+ var items = matches[0].split("\n\n").map(function (item) { return item.trim(); });
24
+ var records = __spreadArray(__spreadArray([], items.map(function (item) {
25
+ var nameMatches = item.match(/"([^}]+)": /);
26
+ var descriptionMatches = item.match(/\/\*\*([^}]+)\*\//);
27
+ if (!nameMatches || !descriptionMatches) {
28
+ throw new Error(PARSE_ERROR_MESSAGE);
29
+ }
30
+ return {
31
+ keyName: nameMatches[1],
32
+ description: descriptionMatches[1].trim(),
33
+ type: "Web Storage",
34
+ duration: "Persistent"
35
+ };
36
+ }), true), third_party_items_1.THIRD_PARTY_ITEMS, true).sort(function (a, b) { return a.keyName.localeCompare(b.keyName); });
37
+ var html = "\n <html lang=\"en\">\n <head>\n <title>Ada Web Storage Items</title>\n <meta charset=\"utf-8\">\n <style>\n body {\n font-family: sans-serif;\n }\n \n h1 {\n font-size: 1.4em;\n }\n \n table {\n border-collapse: collapse;\n }\n \n table th, table td {\n text-align: left;\n padding: 10px;\n border: 1px solid;\n } \n </style>\n </head>\n <body>\n <h1>Ada Web Storage Items (\u201CCookies\u201D)</h1>\n <table>\n <thead>\n <tr>\n <th>Name</th><th>Description</th><th>Type</th><th>Duration</th>\n <tr>\n </thead>\n <tbody>\n ".concat(records.map(function (record) { return "\n <tr>\n <td>".concat(record.keyName, "</td><td>").concat(record.description, "</td><td>").concat(record.type, "</td><td>").concat(record.duration, "</td>\n </tr>\n "); }).join("\n").trim(), "\n </tbody>\n </table>\n </body>\n </html>\n ")
38
+ .trim()
39
+ .replace(/ {2}/g, "")
40
+ .replace(/\n+/g, "\n");
41
+ (0, fs_1.writeFileSync)("./".concat(OUTPUT_DIR, "/").concat(OUTPUT_FILENAME), html);
42
+ }
43
+ runScript();
@@ -1,14 +1,24 @@
1
1
  import type { AdaFunctionalStorageValue } from "./functional-storage";
2
+ /**
3
+ * IMPORTANT
4
+ * The interface is being parsed by `./src/cli/generate-html.ts` script.
5
+ * The format of code here must be consistent, i.e.
6
+ * each key should have a comment, the key name must be quoted, and keys must be separated by an empty line.
7
+ */
2
8
  export interface StorageValueByKey {
3
- /** Used to store the chat version assigned to a user (for A/B testing purposes). */
9
+ /** Used to store the Web SDK version assigned to a user. */
10
+ "ada-embed-assigned-version": string;
11
+ /** Used to store information about current versions of Web SDK available (“canary” or “stable”). */
12
+ "ada-embed-manifest-cache": string;
13
+ /** Used to store the Chat version assigned to a user. */
4
14
  "ada-embed_chat-assigned-version": string;
5
- /** Used to store information about current versions available (“canary” or “stable”). */
15
+ /** Used to store information about current versions of Chat available (“canary” or “stable”). */
6
16
  "ada-embed_chat-manifest-cache": string;
7
17
  /** Used to determine whether chatter session is expired. */
8
18
  "ada-embed_chatter-created": string;
9
19
  /** Used to determine if the drawer was opened previously so when users navigate to other pages we can automatically open chat. */
10
20
  "ada-embed_is-drawer-open": boolean;
11
- /** Use to cache Zendesk tags assigned to a conversation. */
21
+ /** Used to cache Zendesk tags assigned to a conversation. */
12
22
  "ada-embed_zd-previous-tags": string;
13
23
  /** Stores Zendesk session id. */
14
24
  "ada-embed_zd-session-id": string;
@@ -22,15 +32,37 @@ export interface StorageValueByKey {
22
32
  "chatter": string;
23
33
  /** Used to determine whether chatter session is expired. This is stored on Ada domain. */
24
34
  "created": string;
35
+ /** Used for live chat messaging functionality. */
36
+ "delayMessageAfterLiveChatEndTimeStamp": number;
25
37
  /** Indicates whether user is connected to a live agent. */
26
38
  "inLiveChat": boolean;
27
39
  /** Indicates whether user is waiting to connect to a live agent. */
28
40
  "liveChatPending": boolean;
41
+ /** Used to implement Chat reconnection after an interruption. */
42
+ "netDisruptionMsgStartTime": number;
29
43
  /** Stores Chat iFrame parent window origin. */
30
44
  "parentOrigin": string;
45
+ /** Used to cache Zendesk tags assigned to a conversation. This is stored on Ada domain. */
46
+ "previousZDTags": string;
47
+ /** Used for Zendesk authentication functionality. */
48
+ "previouslyAuthenticated": boolean;
31
49
  /** Used for chatter authentication. */
32
- "session_token": string;
50
+ "ada-embed_session_token": string;
33
51
  /** Used for chatter authentication. This is stored on Ada domain. */
34
52
  "sessionToken": string;
53
+ /** Used for Zendesk authentication functionality. */
54
+ "zdAuthChatPending": boolean;
55
+ /** Used for Zendesk SDK functionality. */
56
+ "zdCid": string;
57
+ /** Used for Zendesk SDK functionality. */
58
+ "zdCStore": string;
59
+ /** Used for Zendesk SDK functionality. */
60
+ "zdMessagingExternalUserId": string;
61
+ /** Used for Zendesk SDK functionality. */
62
+ "zdMessagingChatterCreated": string;
63
+ /** Used for Zendesk SDK functionality. */
64
+ "zdSessionId": string;
65
+ /** Used for Zendesk authentication functionality. */
66
+ "zd_isChatterAuthenticated": boolean;
35
67
  }
36
68
  export declare type StorageKey = keyof StorageValueByKey;
@@ -0,0 +1,12 @@
1
+ interface WebStorageItem {
2
+ keyName: string;
3
+ description: string;
4
+ type: "Web Storage" | "Cookie";
5
+ duration: string;
6
+ }
7
+ /**
8
+ * This is the list of third party cookies and local storage items that we don't use directly,
9
+ * but must include in the list: https://static.ada.support/ada-web-storage-list.html
10
+ */
11
+ export declare const THIRD_PARTY_ITEMS: WebStorageItem[];
12
+ export {};
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.THIRD_PARTY_ITEMS = void 0;
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
7
+ */
8
+ exports.THIRD_PARTY_ITEMS = [
9
+ {
10
+ keyName: "secretButton",
11
+ description: "Used during Oracle handoffs to indicate whether the agent has sent a request for a secret message. Allows the state to persist between page changes.",
12
+ type: "Web Storage",
13
+ duration: "Persistent"
14
+ },
15
+ {
16
+ keyName: "vuid",
17
+ description: "Used by Vimeo to store the user’s usage history (loaded only if a video has been included).",
18
+ type: "Cookie",
19
+ duration: "2 Years"
20
+ },
21
+ {
22
+ keyName: "_dd_s",
23
+ description: "Used to monitor user sessions for DataDog RUM Tracking.",
24
+ type: "Cookie",
25
+ duration: "10-15 Minutes"
26
+ },
27
+ {
28
+ keyName: "fs_uid",
29
+ description: "Used to identify and distinguish data for each user",
30
+ type: "Cookie",
31
+ duration: "3 Months"
32
+ },
33
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/web-storage",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "A package to provide access to Web Storage API",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
@@ -9,7 +9,7 @@
9
9
  "scripts": {
10
10
  "lint": "tsc --noEmit && npx eslint --ext .ts .",
11
11
  "check-package-version": "./ci-tools/check-package-version.sh",
12
- "compile": "rm -rf dist && npx tsc"
12
+ "compile": "rm -rf dist && npx tsc && npx ts-node ./src/cli/generate-html.ts"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -19,10 +19,12 @@
19
19
  "license": "ISC",
20
20
  "homepage": "https://github.com/AdaSupport/web-storage#readme",
21
21
  "dependencies": {
22
+ "ts-node": "^10.9.1",
22
23
  "typescript": "^4.8.4"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@ada-support/eslint-config-ada": "^1.2.4",
27
+ "@types/node": "^18.8.2",
26
28
  "eslint": "^8.24.0"
27
29
  }
28
30
  }
@@ -0,0 +1,91 @@
1
+ import { readFileSync, writeFileSync } from "fs";
2
+
3
+ import { THIRD_PARTY_ITEMS } from "../third-party-items";
4
+
5
+ const OUTPUT_DIR = "dist";
6
+ const OUTPUT_FILENAME = "ada-web-storage-list.html";
7
+
8
+ const PARSE_ERROR_MESSAGE = "Could not parse StorageValueByKey interface";
9
+
10
+ function runScript() {
11
+ const data = readFileSync("./src/storage-keys.ts", "utf-8");
12
+
13
+ const matches = data.match(/StorageValueByKey \{([^}]+)}/);
14
+
15
+ if (!matches) {
16
+ throw new Error(PARSE_ERROR_MESSAGE);
17
+ }
18
+
19
+ const items = matches[0].split("\n\n").map(item => item.trim());
20
+
21
+ const records: (typeof THIRD_PARTY_ITEMS) = [
22
+ ...items.map((item) => {
23
+ const nameMatches = item.match(/"([^}]+)": /);
24
+ const descriptionMatches = item.match(/\/\*\*([^}]+)\*\//);
25
+
26
+ if (!nameMatches || !descriptionMatches) {
27
+ throw new Error(PARSE_ERROR_MESSAGE);
28
+ }
29
+
30
+ return {
31
+ keyName: nameMatches[1],
32
+ description: descriptionMatches[1].trim(),
33
+ type: "Web Storage",
34
+ duration: "Persistent",
35
+ } as const;
36
+ }),
37
+ ...THIRD_PARTY_ITEMS,
38
+ ].sort((a, b) => a.keyName.localeCompare(b.keyName));
39
+
40
+ const html = `
41
+ <html lang="en">
42
+ <head>
43
+ <title>Ada Web Storage Items</title>
44
+ <meta charset="utf-8">
45
+ <style>
46
+ body {
47
+ font-family: sans-serif;
48
+ }
49
+
50
+ h1 {
51
+ font-size: 1.4em;
52
+ }
53
+
54
+ table {
55
+ border-collapse: collapse;
56
+ }
57
+
58
+ table th, table td {
59
+ text-align: left;
60
+ padding: 10px;
61
+ border: 1px solid;
62
+ }
63
+ </style>
64
+ </head>
65
+ <body>
66
+ <h1>Ada Web Storage Items (“Cookies”)</h1>
67
+ <table>
68
+ <thead>
69
+ <tr>
70
+ <th>Name</th><th>Description</th><th>Type</th><th>Duration</th>
71
+ <tr>
72
+ </thead>
73
+ <tbody>
74
+ ${records.map(record => `
75
+ <tr>
76
+ <td>${record.keyName}</td><td>${record.description}</td><td>${record.type}</td><td>${record.duration}</td>
77
+ </tr>
78
+ `).join("\n").trim()}
79
+ </tbody>
80
+ </table>
81
+ </body>
82
+ </html>
83
+ `
84
+ .trim()
85
+ .replace(/ {2}/g, "")
86
+ .replace(/\n+/g, "\n");
87
+
88
+ writeFileSync(`./${OUTPUT_DIR}/${OUTPUT_FILENAME}`, html);
89
+ }
90
+
91
+ runScript();
@@ -1,10 +1,22 @@
1
1
  import type { AdaFunctionalStorageValue } from "./functional-storage";
2
2
 
3
+ /**
4
+ * IMPORTANT
5
+ * The interface is being parsed by `./src/cli/generate-html.ts` script.
6
+ * The format of code here must be consistent, i.e.
7
+ * each key should have a comment, the key name must be quoted, and keys must be separated by an empty line.
8
+ */
3
9
  export interface StorageValueByKey {
4
- /** Used to store the chat version assigned to a user (for A/B testing purposes). */
10
+ /** Used to store the Web SDK version assigned to a user. */
11
+ "ada-embed-assigned-version": string;
12
+
13
+ /** Used to store information about current versions of Web SDK available (“canary” or “stable”). */
14
+ "ada-embed-manifest-cache": string;
15
+
16
+ /** Used to store the Chat version assigned to a user. */
5
17
  "ada-embed_chat-assigned-version": string;
6
18
 
7
- /** Used to store information about current versions available (“canary” or “stable”). */
19
+ /** Used to store information about current versions of Chat available (“canary” or “stable”). */
8
20
  "ada-embed_chat-manifest-cache": string;
9
21
 
10
22
  /** Used to determine whether chatter session is expired. */
@@ -13,7 +25,7 @@ export interface StorageValueByKey {
13
25
  /** Used to determine if the drawer was opened previously so when users navigate to other pages we can automatically open chat. */
14
26
  "ada-embed_is-drawer-open": boolean;
15
27
 
16
- /** Use to cache Zendesk tags assigned to a conversation. */
28
+ /** Used to cache Zendesk tags assigned to a conversation. */
17
29
  "ada-embed_zd-previous-tags": string;
18
30
 
19
31
  /** Stores Zendesk session id. */
@@ -34,20 +46,53 @@ export interface StorageValueByKey {
34
46
  /** Used to determine whether chatter session is expired. This is stored on Ada domain. */
35
47
  "created": string;
36
48
 
49
+ /** Used for live chat messaging functionality. */
50
+ "delayMessageAfterLiveChatEndTimeStamp": number;
51
+
37
52
  /** Indicates whether user is connected to a live agent. */
38
53
  "inLiveChat": boolean;
39
54
 
40
55
  /** Indicates whether user is waiting to connect to a live agent. */
41
56
  "liveChatPending": boolean;
42
57
 
58
+ /** Used to implement Chat reconnection after an interruption. */
59
+ "netDisruptionMsgStartTime": number;
60
+
43
61
  /** Stores Chat iFrame parent window origin. */
44
62
  "parentOrigin": string;
45
63
 
64
+ /** Used to cache Zendesk tags assigned to a conversation. This is stored on Ada domain. */
65
+ "previousZDTags": string;
66
+
67
+ /** Used for Zendesk authentication functionality. */
68
+ "previouslyAuthenticated": boolean;
69
+
46
70
  /** Used for chatter authentication. */
47
- "session_token": string;
71
+ "ada-embed_session_token": string;
48
72
 
49
73
  /** Used for chatter authentication. This is stored on Ada domain. */
50
74
  "sessionToken": string;
75
+
76
+ /** Used for Zendesk authentication functionality. */
77
+ "zdAuthChatPending": boolean;
78
+
79
+ /** Used for Zendesk SDK functionality. */
80
+ "zdCid": string;
81
+
82
+ /** Used for Zendesk SDK functionality. */
83
+ "zdCStore": string;
84
+
85
+ /** Used for Zendesk SDK functionality. */
86
+ "zdMessagingExternalUserId": string;
87
+
88
+ /** Used for Zendesk SDK functionality. */
89
+ "zdMessagingChatterCreated": string;
90
+
91
+ /** Used for Zendesk SDK functionality. */
92
+ "zdSessionId": string;
93
+
94
+ /** Used for Zendesk authentication functionality. */
95
+ "zd_isChatterAuthenticated": boolean;
51
96
  }
52
97
 
53
98
  export type StorageKey = keyof StorageValueByKey;
@@ -0,0 +1,37 @@
1
+ interface WebStorageItem {
2
+ keyName: string;
3
+ description: string;
4
+ type: "Web Storage" | "Cookie";
5
+ duration: string;
6
+ }
7
+
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
11
+ */
12
+ export const THIRD_PARTY_ITEMS: WebStorageItem[] = [
13
+ {
14
+ keyName: "secretButton",
15
+ description: "Used during Oracle handoffs to indicate whether the agent has sent a request for a secret message. Allows the state to persist between page changes.",
16
+ type: "Web Storage",
17
+ duration: "Persistent",
18
+ },
19
+ {
20
+ keyName: "vuid",
21
+ description: "Used by Vimeo to store the user’s usage history (loaded only if a video has been included).",
22
+ type: "Cookie",
23
+ duration: "2 Years",
24
+ },
25
+ {
26
+ keyName: "_dd_s",
27
+ description: "Used to monitor user sessions for DataDog RUM Tracking.",
28
+ type: "Cookie",
29
+ duration: "10-15 Minutes",
30
+ },
31
+ {
32
+ keyName: "fs_uid",
33
+ description: "Used to identify and distinguish data for each user",
34
+ type: "Cookie",
35
+ duration: "3 Months",
36
+ },
37
+ ];