coveo.analytics 2.30.56 → 2.32.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/README.md +37 -43
- package/dist/browser.mjs +513 -357
- package/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +542 -359
- package/dist/coveoua.debug.js.map +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/coveoua.js.map +1 -1
- package/dist/definitions/client/analytics.d.ts +3 -2
- package/dist/definitions/client/runtimeEnvironment.d.ts +1 -1
- package/dist/definitions/donottrack.d.ts +1 -0
- package/dist/definitions/react-native/index.d.ts +1 -2
- package/dist/definitions/version.d.ts +1 -1
- package/dist/library.cjs +15350 -3699
- package/dist/library.es.js +513 -357
- package/dist/library.js +15350 -3699
- package/dist/library.mjs +15350 -3699
- package/dist/react-native.es.js +634 -460
- package/modules/package.json +9 -9
- package/package.json +60 -91
- package/react-native/package.json +7 -7
- package/src/caseAssist/caseAssistActions.ts +51 -50
- package/src/caseAssist/caseAssistClient.spec.ts +328 -297
- package/src/caseAssist/caseAssistClient.ts +201 -185
- package/src/client/analytics.spec.ts +724 -703
- package/src/client/analytics.ts +677 -602
- package/src/client/analyticsBeaconClient.spec.ts +195 -188
- package/src/client/analyticsBeaconClient.ts +99 -88
- package/src/client/analyticsFetchClient.ts +77 -61
- package/src/client/analyticsRequestClient.ts +17 -17
- package/src/client/location.ts +3 -3
- package/src/client/measurementProtocolMapper.ts +54 -45
- package/src/client/measurementProtocolMapping/baseMeasurementProtocolMapper.ts +48 -44
- package/src/client/measurementProtocolMapping/commerceMeasurementProtocolMapper.ts +133 -121
- package/src/client/measurementProtocolMapping/serviceMeasurementProtocolMapper.ts +17 -17
- package/src/client/noopAnalytics.ts +80 -68
- package/src/client/runtimeEnvironment.ts +50 -41
- package/src/client/utils.spec.ts +112 -97
- package/src/client/utils.ts +39 -39
- package/src/cookieutils.spec.ts +59 -0
- package/src/cookieutils.ts +40 -39
- package/src/coveoua/browser.ts +14 -12
- package/src/coveoua/library.ts +4 -4
- package/src/coveoua/plugins.ts +36 -34
- package/src/coveoua/simpleanalytics.spec.ts +467 -452
- package/src/coveoua/simpleanalytics.ts +146 -140
- package/src/detector.ts +17 -17
- package/src/donottrack.spec.ts +199 -121
- package/src/donottrack.ts +31 -8
- package/src/events.ts +86 -79
- package/src/formatting/format-array-for-coveo-custom-data.spec.ts +13 -12
- package/src/formatting/format-array-for-coveo-custom-data.ts +18 -18
- package/src/formatting/format-omnibox-metadata.ts +16 -12
- package/src/history.spec.ts +197 -195
- package/src/history.ts +143 -133
- package/src/hook/addDefaultValues.ts +13 -8
- package/src/hook/enhanceViewEvent.ts +17 -17
- package/src/insight/insightClient.spec.ts +1848 -1717
- package/src/insight/insightClient.ts +866 -761
- package/src/insight/insightEvents.ts +57 -56
- package/src/plugins/BasePlugin.ts +125 -121
- package/src/plugins/ec.spec.ts +457 -429
- package/src/plugins/ec.ts +202 -199
- package/src/plugins/link.spec.ts +183 -159
- package/src/plugins/link.ts +88 -85
- package/src/plugins/svc.spec.ts +161 -155
- package/src/plugins/svc.ts +93 -91
- package/src/react-native/index.ts +8 -1
- package/src/react-native/react-native-runtime.ts +33 -33
- package/src/react-native/react-native-utils.ts +1 -1
- package/src/react-native/react-native.spec.ts +31 -21
- package/src/searchPage/searchPageClient.spec.ts +1944 -1794
- package/src/searchPage/searchPageClient.ts +1261 -1040
- package/src/searchPage/searchPageEvents.ts +524 -511
- package/src/storage.spec.ts +51 -51
- package/src/storage.ts +47 -47
- package/dist/definitions/bundle/browser-fetch.d.ts +0 -1
- package/dist/definitions/src/coveoua/browser.d.ts +0 -6
- package/dist/definitions/src/coveoua/headless.d.ts +0 -6
- package/dist/definitions/src/coveoua/library.d.ts +0 -17
- package/dist/definitions/src/coveoua/plugins.d.ts +0 -10
- package/dist/definitions/src/coveoua/simpleanalytics.d.ts +0 -33
- package/dist/definitions/src/react-native/index.d.ts +0 -3
- package/dist/definitions/src/react-native/react-native-runtime.d.ts +0 -19
|
@@ -2,645 +2,658 @@ import {DocumentInformation, FacetStateRequest} from '../events';
|
|
|
2
2
|
import {InsightEvents} from '../insight/insightEvents';
|
|
3
3
|
|
|
4
4
|
export enum SearchPageEvents {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Identifies the search event that gets logged when the initial query is performed as a result of loading a search interface.
|
|
7
|
+
*/
|
|
8
|
+
interfaceLoad = 'interfaceLoad',
|
|
9
|
+
/**
|
|
10
|
+
* Identifies the search event that gets logged when a new tab is selected in the search interface.
|
|
11
|
+
*/
|
|
12
|
+
interfaceChange = 'interfaceChange',
|
|
13
|
+
/**
|
|
14
|
+
* Identifies the search event that gets logged when `enableAutoCorrection: true` and the query is automatically corrected.
|
|
15
|
+
*/
|
|
16
|
+
didyoumeanAutomatic = 'didyoumeanAutomatic',
|
|
17
|
+
/**
|
|
18
|
+
* Identifies the search event that gets logged when the query suggestion with the corrected term is selected and successfully updates the query.
|
|
19
|
+
*/
|
|
20
|
+
didyoumeanClick = 'didyoumeanClick',
|
|
21
|
+
/**
|
|
22
|
+
* Identifies the search event that gets logged when a sorting method is selected.
|
|
23
|
+
*/
|
|
24
|
+
resultsSort = 'resultsSort',
|
|
25
|
+
/**
|
|
26
|
+
* Identifies the search event that gets logged when a submit button is selected on a search box.
|
|
27
|
+
*/
|
|
28
|
+
searchboxSubmit = 'searchboxSubmit',
|
|
29
|
+
/**
|
|
30
|
+
* Identifies the search event that gets logged when a clear button is selected on a search box.
|
|
31
|
+
*/
|
|
32
|
+
searchboxClear = 'searchboxClear',
|
|
33
|
+
/**
|
|
34
|
+
* The search-as-you-type event that gets logged when a query is automatically generated, and results are displayed while a user is entering text in the search box before they voluntarily submit the query.
|
|
35
|
+
*/
|
|
36
|
+
searchboxAsYouType = 'searchboxAsYouType',
|
|
37
|
+
/**
|
|
38
|
+
* The event that gets logged when a breadcrumb facet is selected and the query is updated.
|
|
39
|
+
*/
|
|
40
|
+
breadcrumbFacet = 'breadcrumbFacet',
|
|
41
|
+
/**
|
|
42
|
+
* Identifies the search event that gets logged when the event to clear the current breadcrumbs is triggered.
|
|
43
|
+
*/
|
|
44
|
+
breadcrumbResetAll = 'breadcrumbResetAll',
|
|
45
|
+
/**
|
|
46
|
+
* Identifies the click event that gets logged when the Quick View element is selected and a Quick View modal of the document is displayed.
|
|
47
|
+
*/
|
|
48
|
+
documentQuickview = 'documentQuickview',
|
|
49
|
+
/**
|
|
50
|
+
* Identifies the click event that gets logged when a user clicks on a search result to open an item.
|
|
51
|
+
*/
|
|
52
|
+
documentOpen = 'documentOpen',
|
|
53
|
+
/**
|
|
54
|
+
* Identifies the search event that gets logged when a user clicks a query suggestion based on the usage analytics recorded queries.
|
|
55
|
+
*/
|
|
56
|
+
omniboxAnalytics = 'omniboxAnalytics',
|
|
57
|
+
/**
|
|
58
|
+
* Identifies the search event that gets logged when a suggested search query is selected from a standalone searchbox.
|
|
59
|
+
*/
|
|
60
|
+
omniboxFromLink = 'omniboxFromLink',
|
|
61
|
+
/**
|
|
62
|
+
* Identifies the search event that gets logged when the search page loads with a query, such as when a user clicks a link pointing to a search results page with a query or enters a query in a standalone search box that points to a search page.
|
|
63
|
+
*/
|
|
64
|
+
searchFromLink = 'searchFromLink',
|
|
65
|
+
/**
|
|
66
|
+
* Identifies the custom event that gets logged when a user action triggers a notification set in the effective query pipeline on the search page.
|
|
67
|
+
*/
|
|
68
|
+
triggerNotify = 'notify',
|
|
69
|
+
/**
|
|
70
|
+
* Identifies the custom event that gets logged when a user action executes a JavaScript function set in the effective query pipeline on the search page.
|
|
71
|
+
*/
|
|
72
|
+
triggerExecute = 'execute',
|
|
73
|
+
/**
|
|
74
|
+
* Identifies the custom event that gets logged when a user action triggers a new query set in the effective query pipeline on the search page.
|
|
75
|
+
*/
|
|
76
|
+
// oxlint-disable-next-line typescript/no-duplicate-enum-values
|
|
77
|
+
triggerQuery = 'query',
|
|
78
|
+
/**
|
|
79
|
+
* Identifies the custom event that gets logged when a user undoes a query set in the effective query pipeline on the search page.
|
|
80
|
+
*/
|
|
81
|
+
undoTriggerQuery = 'undoQuery',
|
|
82
|
+
/**
|
|
83
|
+
* Identifies the custom event that gets logged when a user action redirects them to a URL set in the effective query pipeline on the search page.
|
|
84
|
+
*/
|
|
85
|
+
triggerRedirect = 'redirect',
|
|
86
|
+
/**
|
|
87
|
+
* Identifies the custom event that gets logged when the Results per page component is selected.
|
|
88
|
+
*/
|
|
89
|
+
pagerResize = 'pagerResize',
|
|
90
|
+
/**
|
|
91
|
+
* Identifies the custom event that gets logged when a page number is selected and more items are loaded.
|
|
92
|
+
*/
|
|
93
|
+
pagerNumber = 'pagerNumber',
|
|
94
|
+
/**
|
|
95
|
+
* Identifies the custom event that gets logged when the Next Page link is selected and more items are loaded.
|
|
96
|
+
*/
|
|
97
|
+
pagerNext = 'pagerNext',
|
|
98
|
+
/**
|
|
99
|
+
* Identifies the custom event that gets logged when the Previous Page link is selected and more items are loaded.
|
|
100
|
+
*/
|
|
101
|
+
pagerPrevious = 'pagerPrevious',
|
|
102
|
+
/**
|
|
103
|
+
* Identifies the custom event that gets logged when the user scrolls to the bottom of the item page and more results are loaded.
|
|
104
|
+
*/
|
|
105
|
+
pagerScrolling = 'pagerScrolling',
|
|
106
|
+
/**
|
|
107
|
+
* Identifies the search event that gets logged when the clearing all selected values of a static filter.
|
|
108
|
+
*/
|
|
109
|
+
staticFilterClearAll = 'staticFilterClearAll',
|
|
110
|
+
/**
|
|
111
|
+
* Identifies the search event that gets logged when a static filter check box is selected and the query is updated.
|
|
112
|
+
*/
|
|
113
|
+
staticFilterSelect = 'staticFilterSelect',
|
|
114
|
+
/**
|
|
115
|
+
* Identifies the search event that gets logged when a static filter check box is deselected and the query is updated.
|
|
116
|
+
*/
|
|
117
|
+
staticFilterDeselect = 'staticFilterDeselect',
|
|
118
|
+
/**
|
|
119
|
+
* Identifies the search event that gets logged when the Clear Facet button is selected.
|
|
120
|
+
*/
|
|
121
|
+
facetClearAll = 'facetClearAll',
|
|
122
|
+
/**
|
|
123
|
+
* Identifies the custom event that gets logged when a query is being typed into the facet search box.
|
|
124
|
+
*/
|
|
125
|
+
facetSearch = 'facetSearch',
|
|
126
|
+
/**
|
|
127
|
+
* Identifies the search event that gets logged when a facet check box is selected and the query is updated.
|
|
128
|
+
*/
|
|
129
|
+
facetSelect = 'facetSelect',
|
|
130
|
+
/**
|
|
131
|
+
* Identifies the search event that gets logged when all filters on a facet are selected.
|
|
132
|
+
*/
|
|
133
|
+
facetSelectAll = 'facetSelectAll',
|
|
134
|
+
/**
|
|
135
|
+
* Identifies the search event that gets logged when a facet check box is deselected and the query is updated.
|
|
136
|
+
*/
|
|
137
|
+
facetDeselect = 'facetDeselect',
|
|
138
|
+
/**
|
|
139
|
+
* Identifies the search event that gets logged when a user clicks a facet value to filter out results containing the facet value.
|
|
140
|
+
*/
|
|
141
|
+
facetExclude = 'facetExclude',
|
|
142
|
+
/**
|
|
143
|
+
* Identifies the search event that gets logged when a user clicks a facet value to not filter out results containing the facet value.
|
|
144
|
+
*/
|
|
145
|
+
facetUnexclude = 'facetUnexclude',
|
|
146
|
+
/**
|
|
147
|
+
* Identifies the search event that gets logged when the sort criteria on a facet is updated.
|
|
148
|
+
*/
|
|
149
|
+
facetUpdateSort = 'facetUpdateSort',
|
|
150
|
+
/**
|
|
151
|
+
* The custom event that gets logged when an end-user expands a facet to see additional values.
|
|
152
|
+
*/
|
|
153
|
+
facetShowMore = 'showMoreFacetResults',
|
|
154
|
+
/**
|
|
155
|
+
* The custom event that gets logged when an end-user collapses a facet to see less values.
|
|
156
|
+
*/
|
|
157
|
+
facetShowLess = 'showLessFacetResults',
|
|
158
|
+
/**
|
|
159
|
+
* Identifies the custom event that gets logged when a user query encounters an error during execution.
|
|
160
|
+
*/
|
|
161
|
+
queryError = 'query',
|
|
162
|
+
/**
|
|
163
|
+
* Identifies the search and custom event that gets logged when a user clicks the Go Back link after an error page.
|
|
164
|
+
*/
|
|
165
|
+
queryErrorBack = 'errorBack',
|
|
166
|
+
/**
|
|
167
|
+
* Identifies the search and custom event that gets logged when a user clears the query box after an error page.
|
|
168
|
+
*/
|
|
169
|
+
queryErrorClear = 'errorClearQuery',
|
|
170
|
+
/**
|
|
171
|
+
* Identifies the search and custom event that gets logged when a user clicks the Retry link after an error page.
|
|
172
|
+
*/
|
|
173
|
+
queryErrorRetry = 'errorRetry',
|
|
174
|
+
/**
|
|
175
|
+
* Identifies the custom event that gets logged when a user performs a query that returns recommendations in the Recommendations panel.
|
|
176
|
+
*/
|
|
177
|
+
recommendation = 'recommendation',
|
|
178
|
+
/**
|
|
179
|
+
* Identifies the search event that gets logged when a user action (that is not a query) reloads the Recommendations panel with new recommendations.
|
|
180
|
+
*/
|
|
181
|
+
recommendationInterfaceLoad = 'recommendationInterfaceLoad',
|
|
182
|
+
/**
|
|
183
|
+
* Identifies the click event that gets logged when a user clicks a recommendation in the Recommendations panel.
|
|
184
|
+
*/
|
|
185
|
+
recommendationOpen = 'recommendationOpen',
|
|
186
|
+
/**
|
|
187
|
+
* Identifies the custom event that gets logged when a user identifies a smart snippet answer as relevant.
|
|
188
|
+
*/
|
|
189
|
+
likeSmartSnippet = 'likeSmartSnippet',
|
|
190
|
+
/**
|
|
191
|
+
* Identifies the custom event that gets logged when a user identifies a smart snippet answer as irrelevant.
|
|
192
|
+
*/
|
|
193
|
+
dislikeSmartSnippet = 'dislikeSmartSnippet',
|
|
194
|
+
/**
|
|
195
|
+
* Identifies the custom event that gets logged when a user expand a smart snippet answer.
|
|
196
|
+
*/
|
|
197
|
+
expandSmartSnippet = 'expandSmartSnippet',
|
|
198
|
+
/**
|
|
199
|
+
* Identifies the custom event that gets logged when a user collapse a smart snippet answer.
|
|
200
|
+
*/
|
|
201
|
+
collapseSmartSnippet = 'collapseSmartSnippet',
|
|
202
|
+
/**
|
|
203
|
+
* Identifies the custom event that gets logged when a user open a smart snippet explanation modal for feedback.
|
|
204
|
+
*/
|
|
205
|
+
openSmartSnippetFeedbackModal = 'openSmartSnippetFeedbackModal',
|
|
206
|
+
/**
|
|
207
|
+
* Identifies the custom event that gets logged when a user close a smart snippet explanation modal for feedback.
|
|
208
|
+
*/
|
|
209
|
+
closeSmartSnippetFeedbackModal = 'closeSmartSnippetFeedbackModal',
|
|
210
|
+
/**
|
|
211
|
+
* Identifies the custom event that gets logged when a user sends an explanation for a smart snippet irrelevant answer.
|
|
212
|
+
*/
|
|
213
|
+
sendSmartSnippetReason = 'sendSmartSnippetReason',
|
|
214
|
+
/**
|
|
215
|
+
* Identifies the custom event that gets logged when a snippet suggestion for a related question is expanded.
|
|
216
|
+
*/
|
|
217
|
+
expandSmartSnippetSuggestion = 'expandSmartSnippetSuggestion',
|
|
218
|
+
/**
|
|
219
|
+
* Identifies the custom event that gets logged when a snippet suggestion for a related question is collapsed.
|
|
220
|
+
*/
|
|
221
|
+
collapseSmartSnippetSuggestion = 'collapseSmartSnippetSuggestion',
|
|
222
|
+
/**
|
|
223
|
+
* Identifies the custom event that gets logged when the user presses "show more" on a snippet suggestion for a related question.
|
|
224
|
+
*
|
|
225
|
+
* @deprecated
|
|
226
|
+
*/
|
|
227
|
+
showMoreSmartSnippetSuggestion = 'showMoreSmartSnippetSuggestion',
|
|
228
|
+
/**
|
|
229
|
+
* Identifies the custom event that gets logged when the user presses "show less" on a snippet suggestion for a related question.
|
|
230
|
+
*
|
|
231
|
+
* @deprecated
|
|
232
|
+
*/
|
|
233
|
+
showLessSmartSnippetSuggestion = 'showLessSmartSnippetSuggestion',
|
|
234
|
+
/**
|
|
235
|
+
* Identifies the custom event that gets logged when a user clicks on the source of an answer in a smart snippet.
|
|
236
|
+
*/
|
|
237
|
+
openSmartSnippetSource = 'openSmartSnippetSource',
|
|
238
|
+
/**
|
|
239
|
+
* Identifies the custom event that gets logged when a user clicks on the source of a snippet suggestion for a related question.
|
|
240
|
+
*/
|
|
241
|
+
openSmartSnippetSuggestionSource = 'openSmartSnippetSuggestionSource',
|
|
242
|
+
/**
|
|
243
|
+
* Identifies the custom event that gets logged when a user clicks on a link in the answer of a smart snippet.
|
|
244
|
+
*/
|
|
245
|
+
openSmartSnippetInlineLink = 'openSmartSnippetInlineLink',
|
|
246
|
+
/**
|
|
247
|
+
* Identifies the custom event that gets logged when a user clicks on a link in the snippet suggestion for a related question.
|
|
248
|
+
*/
|
|
249
|
+
openSmartSnippetSuggestionInlineLink = 'openSmartSnippetSuggestionInlineLink',
|
|
250
|
+
/**
|
|
251
|
+
* Identifies the search event that gets logged when a recent queries list item gets clicked.
|
|
252
|
+
*/
|
|
253
|
+
recentQueryClick = 'recentQueriesClick',
|
|
254
|
+
/**
|
|
255
|
+
* Identifies the custom event that gets logged when a recent queries list gets cleared.
|
|
256
|
+
*/
|
|
257
|
+
clearRecentQueries = 'clearRecentQueries',
|
|
258
|
+
/**
|
|
259
|
+
* Identifies the custom event that gets logged when a recently clicked results list item gets clicked.
|
|
260
|
+
*/
|
|
261
|
+
recentResultClick = 'recentResultClick',
|
|
262
|
+
/**
|
|
263
|
+
* Identifies the custom event that gets logged when a recently clicked results list gets cleared.
|
|
264
|
+
*/
|
|
265
|
+
clearRecentResults = 'clearRecentResults',
|
|
266
|
+
/**
|
|
267
|
+
* Identifies the search event that gets logged when a user clicks the Cancel last action link when no results are returned following their last action.
|
|
268
|
+
*/
|
|
269
|
+
noResultsBack = 'noResultsBack',
|
|
270
|
+
/**
|
|
271
|
+
* Identifies the click event that gets logged when a user clicks the Show More link under a search result that support the folding component.
|
|
272
|
+
*/
|
|
273
|
+
showMoreFoldedResults = 'showMoreFoldedResults',
|
|
274
|
+
/**
|
|
275
|
+
* Identifies the custom event that gets logged when a user clicks the Show Less link under a search result that support the folding component.
|
|
276
|
+
*/
|
|
277
|
+
showLessFoldedResults = 'showLessFoldedResults',
|
|
278
|
+
/**
|
|
279
|
+
* Identifies the click event that gets logged when a user clicks the Copy To Clipboard result action.
|
|
280
|
+
*/
|
|
281
|
+
copyToClipboard = 'copyToClipboard',
|
|
282
|
+
/**
|
|
283
|
+
* Identifies the click event that gets logged when a user clicks the Send As Email result action.
|
|
284
|
+
*/
|
|
285
|
+
caseSendEmail = 'Case.SendEmail',
|
|
286
|
+
/**
|
|
287
|
+
* Identifies the click event that gets logged when a user clicks the Post To Feed result action.
|
|
288
|
+
*/
|
|
289
|
+
feedItemTextPost = 'FeedItem.TextPost',
|
|
290
|
+
/**
|
|
291
|
+
* Identifies the click event that gets logged when a user clicks the Attach To Case result action.
|
|
292
|
+
*/
|
|
293
|
+
caseAttach = 'caseAttach',
|
|
294
|
+
/**
|
|
295
|
+
* Identifies the custom event that gets logged when a user clicks the Detach From Case result action.
|
|
296
|
+
*/
|
|
297
|
+
caseDetach = 'caseDetach',
|
|
298
|
+
/**
|
|
299
|
+
* Identifies the cause of a search request being retried in order to regenerate an answer stream that failed.
|
|
300
|
+
*/
|
|
301
|
+
retryGeneratedAnswer = 'retryGeneratedAnswer',
|
|
302
|
+
/**
|
|
303
|
+
* Identifies the custom event that gets logged when a user identifies a generated answer as relevant.
|
|
304
|
+
*/
|
|
305
|
+
likeGeneratedAnswer = 'likeGeneratedAnswer',
|
|
306
|
+
/**
|
|
307
|
+
* Identifies the custom event that gets logged when a user identifies a generated answer as irrelevant.
|
|
308
|
+
*/
|
|
309
|
+
dislikeGeneratedAnswer = 'dislikeGeneratedAnswer',
|
|
310
|
+
/**
|
|
311
|
+
* Identifies the custom event that gets logged when a user opens a generated answer citation.
|
|
312
|
+
*/
|
|
313
|
+
openGeneratedAnswerSource = 'openGeneratedAnswerSource',
|
|
314
|
+
/**
|
|
315
|
+
* Identifies the custom event that gets logged when a user clicks an inline link in a generated answer.
|
|
316
|
+
*/
|
|
317
|
+
generatedAnswerOpenInlineLink = 'generatedAnswerOpenInlineLink',
|
|
318
|
+
/**
|
|
319
|
+
* Identified the custom event that gets logged when a generated answer stream is completed.
|
|
320
|
+
*/
|
|
321
|
+
generatedAnswerStreamEnd = 'generatedAnswerStreamEnd',
|
|
322
|
+
/**
|
|
323
|
+
* Identifies the custom event that gets logged when a user hovers over a generated answer citation.
|
|
324
|
+
*/
|
|
325
|
+
generatedAnswerSourceHover = 'generatedAnswerSourceHover',
|
|
326
|
+
/**
|
|
327
|
+
* Identifies the custom event that gets logged when a user clicks the copy to clip board button of a generated answer.
|
|
328
|
+
*/
|
|
329
|
+
generatedAnswerCopyToClipboard = 'generatedAnswerCopyToClipboard',
|
|
330
|
+
/**
|
|
331
|
+
* Identifies the custom event that gets logged when a user deactivates the genQA feature.
|
|
332
|
+
*/
|
|
333
|
+
generatedAnswerHideAnswers = 'generatedAnswerHideAnswers',
|
|
334
|
+
/**
|
|
335
|
+
* Identifies the custom event that gets logged when a user activates the genQA feature.
|
|
336
|
+
*/
|
|
337
|
+
generatedAnswerShowAnswers = 'generatedAnswerShowAnswers',
|
|
338
|
+
/**
|
|
339
|
+
* Identifies the custom event that gets logged when a user expand a generated answer.
|
|
340
|
+
*/
|
|
341
|
+
generatedAnswerExpand = 'generatedAnswerExpand',
|
|
342
|
+
/**
|
|
343
|
+
* Identifies the custom event that gets logged when a user collapse a generated answer.
|
|
344
|
+
*/
|
|
345
|
+
generatedAnswerCollapse = 'generatedAnswerCollapse',
|
|
346
|
+
/**
|
|
347
|
+
* Identifies the custom event that gets logged when a user submits a feedback of a generated answer.
|
|
348
|
+
*/
|
|
349
|
+
generatedAnswerFeedbackSubmit = 'generatedAnswerFeedbackSubmit',
|
|
350
|
+
/**
|
|
351
|
+
* Identifies the search event that gets logged when a user clicks the rephrase button in a generated answer.
|
|
352
|
+
*/
|
|
353
|
+
rephraseGeneratedAnswer = 'rephraseGeneratedAnswer',
|
|
354
|
+
/**
|
|
355
|
+
* Identifies the new version of custom event that gets logged when a user submits a feedback of a generated answer.
|
|
356
|
+
*/
|
|
357
|
+
generatedAnswerFeedbackSubmitV2 = 'generatedAnswerFeedbackSubmitV2',
|
|
358
|
+
/**
|
|
359
|
+
* Identifies the click event that gets logged when the user clicks on a generated answer citation.
|
|
360
|
+
*/
|
|
361
|
+
generatedAnswerCitationClick = 'generatedAnswerCitationClick',
|
|
362
|
+
/**
|
|
363
|
+
* Identifies the custom event that gets logged when the user clicks on a generated answer citation.
|
|
364
|
+
*/
|
|
365
|
+
generatedAnswerFollowupOpenSource = 'generatedAnswerFollowupOpenSource',
|
|
366
|
+
/**
|
|
367
|
+
* Identifies the click event that gets logged when a user clicks the Attach Citation action.
|
|
368
|
+
*/
|
|
369
|
+
generatedAnswerCitationDocumentAttach = 'generatedAnswerCitationDocumentAttach',
|
|
369
370
|
}
|
|
370
371
|
|
|
371
372
|
export const CustomEventsTypes: Partial<Record<SearchPageEvents | InsightEvents, string>> = {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
373
|
+
[SearchPageEvents.triggerNotify]: 'queryPipelineTriggers',
|
|
374
|
+
[SearchPageEvents.triggerExecute]: 'queryPipelineTriggers',
|
|
375
|
+
[SearchPageEvents.triggerQuery]: 'queryPipelineTriggers',
|
|
376
|
+
[SearchPageEvents.triggerRedirect]: 'queryPipelineTriggers',
|
|
377
|
+
// This value is the same as SearchPageEvents.triggerQuery, which is very likely a mistake.
|
|
378
|
+
//[SearchPageEvents.queryError]: 'errors',
|
|
379
|
+
[SearchPageEvents.queryErrorBack]: 'errors',
|
|
380
|
+
[SearchPageEvents.queryErrorClear]: 'errors',
|
|
381
|
+
[SearchPageEvents.queryErrorRetry]: 'errors',
|
|
382
|
+
[SearchPageEvents.pagerNext]: 'getMoreResults',
|
|
383
|
+
[SearchPageEvents.pagerPrevious]: 'getMoreResults',
|
|
384
|
+
[SearchPageEvents.pagerNumber]: 'getMoreResults',
|
|
385
|
+
[SearchPageEvents.pagerResize]: 'getMoreResults',
|
|
386
|
+
[SearchPageEvents.pagerScrolling]: 'getMoreResults',
|
|
387
|
+
[SearchPageEvents.facetSearch]: 'facet',
|
|
388
|
+
[SearchPageEvents.facetShowLess]: 'facet',
|
|
389
|
+
[SearchPageEvents.facetShowMore]: 'facet',
|
|
390
|
+
[SearchPageEvents.recommendation]: 'recommendation',
|
|
391
|
+
[SearchPageEvents.likeSmartSnippet]: 'smartSnippet',
|
|
392
|
+
[SearchPageEvents.dislikeSmartSnippet]: 'smartSnippet',
|
|
393
|
+
[SearchPageEvents.expandSmartSnippet]: 'smartSnippet',
|
|
394
|
+
[SearchPageEvents.collapseSmartSnippet]: 'smartSnippet',
|
|
395
|
+
[SearchPageEvents.openSmartSnippetFeedbackModal]: 'smartSnippet',
|
|
396
|
+
[SearchPageEvents.closeSmartSnippetFeedbackModal]: 'smartSnippet',
|
|
397
|
+
[SearchPageEvents.sendSmartSnippetReason]: 'smartSnippet',
|
|
398
|
+
[SearchPageEvents.expandSmartSnippetSuggestion]: 'smartSnippetSuggestions',
|
|
399
|
+
[SearchPageEvents.collapseSmartSnippetSuggestion]: 'smartSnippetSuggestions',
|
|
400
|
+
[SearchPageEvents.showMoreSmartSnippetSuggestion]: 'smartSnippetSuggestions',
|
|
401
|
+
[SearchPageEvents.showLessSmartSnippetSuggestion]: 'smartSnippetSuggestions',
|
|
402
|
+
[SearchPageEvents.clearRecentQueries]: 'recentQueries',
|
|
403
|
+
[SearchPageEvents.recentResultClick]: 'recentlyClickedDocuments',
|
|
404
|
+
[SearchPageEvents.clearRecentResults]: 'recentlyClickedDocuments',
|
|
405
|
+
[SearchPageEvents.showLessFoldedResults]: 'folding',
|
|
406
|
+
[SearchPageEvents.caseDetach]: 'case',
|
|
407
|
+
[SearchPageEvents.likeGeneratedAnswer]: 'generatedAnswer',
|
|
408
|
+
[SearchPageEvents.dislikeGeneratedAnswer]: 'generatedAnswer',
|
|
409
|
+
[SearchPageEvents.openGeneratedAnswerSource]: 'generatedAnswer',
|
|
410
|
+
[SearchPageEvents.generatedAnswerOpenInlineLink]: 'generatedAnswer',
|
|
411
|
+
[SearchPageEvents.generatedAnswerFollowupOpenSource]: 'generatedAnswer',
|
|
412
|
+
[SearchPageEvents.generatedAnswerStreamEnd]: 'generatedAnswer',
|
|
413
|
+
[SearchPageEvents.generatedAnswerSourceHover]: 'generatedAnswer',
|
|
414
|
+
[SearchPageEvents.generatedAnswerCopyToClipboard]: 'generatedAnswer',
|
|
415
|
+
[SearchPageEvents.generatedAnswerHideAnswers]: 'generatedAnswer',
|
|
416
|
+
[SearchPageEvents.generatedAnswerShowAnswers]: 'generatedAnswer',
|
|
417
|
+
[SearchPageEvents.generatedAnswerExpand]: 'generatedAnswer',
|
|
418
|
+
[SearchPageEvents.generatedAnswerCollapse]: 'generatedAnswer',
|
|
419
|
+
[SearchPageEvents.generatedAnswerFeedbackSubmit]: 'generatedAnswer',
|
|
420
|
+
[SearchPageEvents.generatedAnswerFeedbackSubmitV2]: 'generatedAnswer',
|
|
421
|
+
[InsightEvents.expandToFullUI]: 'interface',
|
|
422
|
+
[InsightEvents.openUserActions]: 'User Actions',
|
|
423
|
+
[InsightEvents.showPrecedingSessions]: 'User Actions',
|
|
424
|
+
[InsightEvents.showFollowingSessions]: 'User Actions',
|
|
425
|
+
[InsightEvents.clickViewedDocument]: 'User Actions',
|
|
426
|
+
[InsightEvents.clickPageView]: 'User Actions',
|
|
427
|
+
[InsightEvents.createArticle]: 'createArticle',
|
|
427
428
|
};
|
|
428
429
|
|
|
429
430
|
export interface StaticFilterMetadata {
|
|
430
|
-
|
|
431
|
+
staticFilterId: string;
|
|
431
432
|
}
|
|
432
433
|
|
|
433
434
|
export interface StaticFilterToggleValueMetadata extends StaticFilterMetadata {
|
|
434
|
-
|
|
435
|
+
staticFilterValue: StaticFilterValueMetadata;
|
|
435
436
|
}
|
|
436
437
|
|
|
437
438
|
interface StaticFilterValueMetadata {
|
|
438
|
-
|
|
439
|
-
|
|
439
|
+
caption: string;
|
|
440
|
+
expression: string;
|
|
440
441
|
}
|
|
441
442
|
|
|
442
443
|
export interface FacetMetadata {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
444
|
+
facetId: string;
|
|
445
|
+
facetField: string;
|
|
446
|
+
facetValue: string;
|
|
447
|
+
facetTitle: string;
|
|
447
448
|
}
|
|
448
449
|
|
|
449
450
|
export type FacetStateMetadata = FacetStateRequest;
|
|
450
451
|
export interface FacetRangeMetadata extends Omit<FacetMetadata, 'facetValue'> {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
452
|
+
facetRangeStart: string;
|
|
453
|
+
facetRangeEnd: string;
|
|
454
|
+
facetRangeEndInclusive: boolean;
|
|
454
455
|
}
|
|
455
456
|
|
|
456
457
|
export interface CategoryFacetMetadata {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
458
|
+
categoryFacetId: string;
|
|
459
|
+
categoryFacetField: string;
|
|
460
|
+
categoryFacetPath: string[];
|
|
461
|
+
categoryFacetTitle: string;
|
|
461
462
|
}
|
|
462
463
|
|
|
463
464
|
export interface OmniboxSuggestionsMetadata {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
465
|
+
suggestionRanking: number;
|
|
466
|
+
partialQueries: string | string[];
|
|
467
|
+
suggestions: string | string[];
|
|
468
|
+
partialQuery: string;
|
|
469
|
+
querySuggestResponseId: string;
|
|
469
470
|
}
|
|
470
471
|
|
|
471
472
|
export interface DocumentIdentifier {
|
|
472
|
-
|
|
473
|
-
|
|
473
|
+
contentIDKey: string;
|
|
474
|
+
contentIDValue: string;
|
|
474
475
|
}
|
|
475
476
|
|
|
476
477
|
export interface InterfaceChangeMetadata {
|
|
477
|
-
|
|
478
|
+
interfaceChangeTo: string;
|
|
478
479
|
}
|
|
479
480
|
|
|
480
481
|
export interface ResultsSortMetadata {
|
|
481
|
-
|
|
482
|
+
resultsSortBy: string;
|
|
482
483
|
}
|
|
483
484
|
|
|
484
485
|
export interface TriggerNotifyMetadata {
|
|
485
|
-
|
|
486
|
+
notifications: string[];
|
|
486
487
|
}
|
|
487
488
|
|
|
488
489
|
export interface TriggerExecution {
|
|
489
|
-
|
|
490
|
-
|
|
490
|
+
functionName: string;
|
|
491
|
+
params: (string | number | boolean)[];
|
|
491
492
|
}
|
|
492
493
|
|
|
493
494
|
export interface TriggerExecuteMetadata {
|
|
494
|
-
|
|
495
|
+
executions: TriggerExecution[];
|
|
495
496
|
}
|
|
496
497
|
|
|
497
498
|
export interface UndoTriggerRedirectMetadata {
|
|
498
|
-
|
|
499
|
+
undoneQuery: string;
|
|
499
500
|
}
|
|
500
501
|
|
|
501
502
|
export interface TriggerRedirectMetadata {
|
|
502
|
-
|
|
503
|
+
redirectedTo: string;
|
|
503
504
|
}
|
|
504
505
|
|
|
505
506
|
export interface PagerResizeMetadata {
|
|
506
|
-
|
|
507
|
+
currentResultsPerPage: number;
|
|
507
508
|
}
|
|
508
509
|
|
|
509
510
|
export interface PagerMetadata {
|
|
510
|
-
|
|
511
|
+
pagerNumber: number;
|
|
511
512
|
}
|
|
512
513
|
|
|
513
514
|
export interface FacetBaseMeta {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
515
|
+
facetId: string;
|
|
516
|
+
facetField: string;
|
|
517
|
+
facetTitle: string;
|
|
517
518
|
}
|
|
518
519
|
|
|
519
520
|
export interface FacetMetadata extends FacetBaseMeta {
|
|
520
|
-
|
|
521
|
+
facetValue: string;
|
|
521
522
|
}
|
|
522
523
|
|
|
523
524
|
export interface FacetRangeMetadata extends FacetBaseMeta {
|
|
524
|
-
|
|
525
|
-
|
|
525
|
+
facetRangeStart: string;
|
|
526
|
+
facetRangeEnd: string;
|
|
526
527
|
}
|
|
527
528
|
|
|
528
529
|
export interface FacetSortMeta extends FacetBaseMeta {
|
|
529
|
-
|
|
530
|
+
criteria: string;
|
|
530
531
|
}
|
|
531
532
|
|
|
532
533
|
export interface QueryErrorMeta {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
534
|
+
query: string;
|
|
535
|
+
aq: string;
|
|
536
|
+
cq: string;
|
|
537
|
+
dq: string;
|
|
538
|
+
errorType: string;
|
|
539
|
+
errorMessage: string;
|
|
539
540
|
}
|
|
540
541
|
|
|
541
|
-
export type SmartSnippetFeedbackReason =
|
|
542
|
+
export type SmartSnippetFeedbackReason =
|
|
543
|
+
| 'does_not_answer'
|
|
544
|
+
| 'partially_answers'
|
|
545
|
+
| 'was_not_a_question'
|
|
546
|
+
| 'other';
|
|
542
547
|
|
|
543
548
|
export interface SmartSnippetSuggestionMeta {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
549
|
+
question: string;
|
|
550
|
+
answerSnippet: string;
|
|
551
|
+
documentId: SmartSnippetDocumentIdentifier;
|
|
547
552
|
}
|
|
548
553
|
|
|
549
554
|
export interface LinkMeta {
|
|
550
|
-
|
|
551
|
-
|
|
555
|
+
linkText: string;
|
|
556
|
+
linkURL: string;
|
|
552
557
|
}
|
|
553
558
|
|
|
554
559
|
export interface SmartSnippetLinkMeta extends LinkMeta {}
|
|
555
560
|
|
|
556
561
|
export interface SmartSnippetDocumentIdentifier {
|
|
557
|
-
|
|
558
|
-
|
|
562
|
+
contentIdKey: string;
|
|
563
|
+
contentIdValue: string;
|
|
559
564
|
}
|
|
560
565
|
|
|
561
|
-
export type PartialDocumentInformation = Omit<
|
|
566
|
+
export type PartialDocumentInformation = Omit<
|
|
567
|
+
DocumentInformation,
|
|
568
|
+
'actionCause' | 'searchQueryUid'
|
|
569
|
+
>;
|
|
562
570
|
|
|
563
571
|
export type PartialCitationInformation = Omit<
|
|
564
|
-
|
|
565
|
-
|
|
572
|
+
DocumentInformation,
|
|
573
|
+
'actionCause' | 'searchQueryUid' | 'documentPosition'
|
|
566
574
|
>;
|
|
567
575
|
|
|
568
576
|
interface AnswerGeneratedWithAnswerAPI {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
577
|
+
answerAPIStreamId: string;
|
|
578
|
+
generativeQuestionAnsweringId?: never;
|
|
579
|
+
conversationId?: never;
|
|
572
580
|
}
|
|
573
581
|
|
|
574
582
|
interface AnswerGeneratedWithSearchAPI {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
583
|
+
answerAPIStreamId?: never;
|
|
584
|
+
generativeQuestionAnsweringId: string;
|
|
585
|
+
conversationId?: never;
|
|
578
586
|
}
|
|
579
587
|
|
|
580
588
|
interface AnswerGeneratedWithAgent {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
589
|
+
answerAPIStreamId?: never;
|
|
590
|
+
generativeQuestionAnsweringId: string;
|
|
591
|
+
conversationId: string;
|
|
584
592
|
}
|
|
585
593
|
|
|
586
594
|
export type GeneratedAnswerBaseMeta =
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
595
|
+
| AnswerGeneratedWithAnswerAPI
|
|
596
|
+
| AnswerGeneratedWithSearchAPI
|
|
597
|
+
| AnswerGeneratedWithAgent;
|
|
590
598
|
|
|
591
599
|
export type GeneratedAnswerStreamEndMeta = GeneratedAnswerBaseMeta & {
|
|
592
|
-
|
|
593
|
-
|
|
600
|
+
answerGenerated: boolean;
|
|
601
|
+
answerTextIsEmpty?: boolean;
|
|
594
602
|
};
|
|
595
603
|
|
|
596
604
|
export type GeneratedAnswerCitationMeta = GeneratedAnswerBaseMeta & {
|
|
597
|
-
|
|
598
|
-
|
|
605
|
+
permanentId: string;
|
|
606
|
+
citationId: string;
|
|
599
607
|
};
|
|
600
608
|
|
|
601
609
|
export type GeneratedAnswerInlineLinkMeta = GeneratedAnswerBaseMeta & LinkMeta;
|
|
602
610
|
|
|
603
611
|
export type GeneratedAnswerCitationClickMeta = GeneratedAnswerBaseMeta & {
|
|
604
|
-
|
|
605
|
-
|
|
612
|
+
citationId: string;
|
|
613
|
+
documentId: GeneratedAnswerDocumentIdentifier;
|
|
606
614
|
};
|
|
607
615
|
|
|
608
616
|
type GeneratedAnswerDocumentIdentifier = {
|
|
609
|
-
|
|
610
|
-
|
|
617
|
+
contentIdKey: string;
|
|
618
|
+
contentIdValue: string;
|
|
611
619
|
};
|
|
612
620
|
|
|
613
|
-
export type GeneratedAnswerFeedbackReason =
|
|
621
|
+
export type GeneratedAnswerFeedbackReason =
|
|
622
|
+
| 'irrelevant'
|
|
623
|
+
| 'notAccurate'
|
|
624
|
+
| 'outOfDate'
|
|
625
|
+
| 'harmful'
|
|
626
|
+
| 'other';
|
|
614
627
|
|
|
615
628
|
export type GeneratedAnswerRephraseFormat = 'step' | 'bullet' | 'concise' | 'default';
|
|
616
629
|
|
|
617
630
|
export type GeneratedAnswerSourceHoverMeta = GeneratedAnswerCitationMeta & {
|
|
618
|
-
|
|
631
|
+
citationHoverTimeMs: number;
|
|
619
632
|
};
|
|
620
633
|
|
|
621
634
|
export type GeneratedAnswerFollowupOpenSourceMeta = PartialCitationInformation &
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
635
|
+
AnswerGeneratedWithAgent & {
|
|
636
|
+
citationId: string;
|
|
637
|
+
permanentId: string;
|
|
638
|
+
};
|
|
626
639
|
|
|
627
640
|
export type GeneratedAnswerRephraseMeta = GeneratedAnswerBaseMeta & {
|
|
628
|
-
|
|
641
|
+
rephraseFormat: GeneratedAnswerRephraseFormat;
|
|
629
642
|
};
|
|
630
643
|
|
|
631
644
|
export type GeneratedAnswerFeedbackMeta = GeneratedAnswerBaseMeta & {
|
|
632
|
-
|
|
633
|
-
|
|
645
|
+
reason: GeneratedAnswerFeedbackReason;
|
|
646
|
+
details?: string;
|
|
634
647
|
};
|
|
635
648
|
|
|
636
649
|
export type GeneratedAnswerFeedbackReasonOption = 'yes' | 'unknown' | 'no';
|
|
637
650
|
|
|
638
651
|
export type GeneratedAnswerFeedbackMetaV2 = GeneratedAnswerBaseMeta & {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
652
|
+
helpful: boolean;
|
|
653
|
+
readable: GeneratedAnswerFeedbackReasonOption;
|
|
654
|
+
documented: GeneratedAnswerFeedbackReasonOption;
|
|
655
|
+
correctTopic: GeneratedAnswerFeedbackReasonOption;
|
|
656
|
+
hallucinationFree: GeneratedAnswerFeedbackReasonOption;
|
|
657
|
+
details?: string;
|
|
658
|
+
documentUrl?: string;
|
|
646
659
|
};
|