@ada-support/web-storage 1.4.8 → 1.5.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.
- package/dist/ada-web-storage-list.html +6 -0
- package/dist/storage-keys.d.ts +11 -0
- package/package.json +1 -1
- package/src/storage-keys.ts +13 -0
|
@@ -233,6 +233,12 @@ border: 1px solid;
|
|
|
233
233
|
<td>Persistent</td>
|
|
234
234
|
</tr>
|
|
235
235
|
<tr>
|
|
236
|
+
<td>liveChatTransition</td>
|
|
237
|
+
<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>
|
|
238
|
+
<td>Web Storage (functional)</td>
|
|
239
|
+
<td>Persistent</td>
|
|
240
|
+
</tr>
|
|
241
|
+
<tr>
|
|
236
242
|
<td>messagingAuthState</td>
|
|
237
243
|
<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
244
|
<td>Web Storage (functional)</td>
|
package/dist/storage-keys.d.ts
CHANGED
|
@@ -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. */
|
package/package.json
CHANGED
package/src/storage-keys.ts
CHANGED
|
@@ -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
|
|