coveo.analytics 2.30.55 → 2.31.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 +525 -357
- package/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +559 -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 -1
- package/dist/definitions/searchPage/searchPageClient.d.ts +3 -1
- package/dist/definitions/searchPage/searchPageEvents.d.ts +6 -0
- package/dist/definitions/version.d.ts +1 -1
- package/dist/library.cjs +15367 -3699
- package/dist/library.es.js +525 -357
- package/dist/library.js +15367 -3699
- package/dist/library.mjs +15367 -3699
- package/dist/react-native.es.js +646 -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 +5 -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 +22 -21
- package/src/searchPage/searchPageClient.spec.ts +1944 -1766
- package/src/searchPage/searchPageClient.ts +1261 -1029
- package/src/searchPage/searchPageEvents.ts +529 -500
- 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,629 +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
|
-
|
|
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',
|
|
365
370
|
}
|
|
366
371
|
|
|
367
372
|
export const CustomEventsTypes: Partial<Record<SearchPageEvents | InsightEvents, string>> = {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
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
|
-
|
|
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',
|
|
422
428
|
};
|
|
423
429
|
|
|
424
430
|
export interface StaticFilterMetadata {
|
|
425
|
-
|
|
431
|
+
staticFilterId: string;
|
|
426
432
|
}
|
|
427
433
|
|
|
428
434
|
export interface StaticFilterToggleValueMetadata extends StaticFilterMetadata {
|
|
429
|
-
|
|
435
|
+
staticFilterValue: StaticFilterValueMetadata;
|
|
430
436
|
}
|
|
431
437
|
|
|
432
438
|
interface StaticFilterValueMetadata {
|
|
433
|
-
|
|
434
|
-
|
|
439
|
+
caption: string;
|
|
440
|
+
expression: string;
|
|
435
441
|
}
|
|
436
442
|
|
|
437
443
|
export interface FacetMetadata {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
444
|
+
facetId: string;
|
|
445
|
+
facetField: string;
|
|
446
|
+
facetValue: string;
|
|
447
|
+
facetTitle: string;
|
|
442
448
|
}
|
|
443
449
|
|
|
444
450
|
export type FacetStateMetadata = FacetStateRequest;
|
|
445
451
|
export interface FacetRangeMetadata extends Omit<FacetMetadata, 'facetValue'> {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
452
|
+
facetRangeStart: string;
|
|
453
|
+
facetRangeEnd: string;
|
|
454
|
+
facetRangeEndInclusive: boolean;
|
|
449
455
|
}
|
|
450
456
|
|
|
451
457
|
export interface CategoryFacetMetadata {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
458
|
+
categoryFacetId: string;
|
|
459
|
+
categoryFacetField: string;
|
|
460
|
+
categoryFacetPath: string[];
|
|
461
|
+
categoryFacetTitle: string;
|
|
456
462
|
}
|
|
457
463
|
|
|
458
464
|
export interface OmniboxSuggestionsMetadata {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
465
|
+
suggestionRanking: number;
|
|
466
|
+
partialQueries: string | string[];
|
|
467
|
+
suggestions: string | string[];
|
|
468
|
+
partialQuery: string;
|
|
469
|
+
querySuggestResponseId: string;
|
|
464
470
|
}
|
|
465
471
|
|
|
466
472
|
export interface DocumentIdentifier {
|
|
467
|
-
|
|
468
|
-
|
|
473
|
+
contentIDKey: string;
|
|
474
|
+
contentIDValue: string;
|
|
469
475
|
}
|
|
470
476
|
|
|
471
477
|
export interface InterfaceChangeMetadata {
|
|
472
|
-
|
|
478
|
+
interfaceChangeTo: string;
|
|
473
479
|
}
|
|
474
480
|
|
|
475
481
|
export interface ResultsSortMetadata {
|
|
476
|
-
|
|
482
|
+
resultsSortBy: string;
|
|
477
483
|
}
|
|
478
484
|
|
|
479
485
|
export interface TriggerNotifyMetadata {
|
|
480
|
-
|
|
486
|
+
notifications: string[];
|
|
481
487
|
}
|
|
482
488
|
|
|
483
489
|
export interface TriggerExecution {
|
|
484
|
-
|
|
485
|
-
|
|
490
|
+
functionName: string;
|
|
491
|
+
params: (string | number | boolean)[];
|
|
486
492
|
}
|
|
487
493
|
|
|
488
494
|
export interface TriggerExecuteMetadata {
|
|
489
|
-
|
|
495
|
+
executions: TriggerExecution[];
|
|
490
496
|
}
|
|
491
497
|
|
|
492
498
|
export interface UndoTriggerRedirectMetadata {
|
|
493
|
-
|
|
499
|
+
undoneQuery: string;
|
|
494
500
|
}
|
|
495
501
|
|
|
496
502
|
export interface TriggerRedirectMetadata {
|
|
497
|
-
|
|
503
|
+
redirectedTo: string;
|
|
498
504
|
}
|
|
499
505
|
|
|
500
506
|
export interface PagerResizeMetadata {
|
|
501
|
-
|
|
507
|
+
currentResultsPerPage: number;
|
|
502
508
|
}
|
|
503
509
|
|
|
504
510
|
export interface PagerMetadata {
|
|
505
|
-
|
|
511
|
+
pagerNumber: number;
|
|
506
512
|
}
|
|
507
513
|
|
|
508
514
|
export interface FacetBaseMeta {
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
515
|
+
facetId: string;
|
|
516
|
+
facetField: string;
|
|
517
|
+
facetTitle: string;
|
|
512
518
|
}
|
|
513
519
|
|
|
514
520
|
export interface FacetMetadata extends FacetBaseMeta {
|
|
515
|
-
|
|
521
|
+
facetValue: string;
|
|
516
522
|
}
|
|
517
523
|
|
|
518
524
|
export interface FacetRangeMetadata extends FacetBaseMeta {
|
|
519
|
-
|
|
520
|
-
|
|
525
|
+
facetRangeStart: string;
|
|
526
|
+
facetRangeEnd: string;
|
|
521
527
|
}
|
|
522
528
|
|
|
523
529
|
export interface FacetSortMeta extends FacetBaseMeta {
|
|
524
|
-
|
|
530
|
+
criteria: string;
|
|
525
531
|
}
|
|
526
532
|
|
|
527
533
|
export interface QueryErrorMeta {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
+
query: string;
|
|
535
|
+
aq: string;
|
|
536
|
+
cq: string;
|
|
537
|
+
dq: string;
|
|
538
|
+
errorType: string;
|
|
539
|
+
errorMessage: string;
|
|
534
540
|
}
|
|
535
541
|
|
|
536
|
-
export type SmartSnippetFeedbackReason =
|
|
542
|
+
export type SmartSnippetFeedbackReason =
|
|
543
|
+
| 'does_not_answer'
|
|
544
|
+
| 'partially_answers'
|
|
545
|
+
| 'was_not_a_question'
|
|
546
|
+
| 'other';
|
|
537
547
|
|
|
538
548
|
export interface SmartSnippetSuggestionMeta {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
549
|
+
question: string;
|
|
550
|
+
answerSnippet: string;
|
|
551
|
+
documentId: SmartSnippetDocumentIdentifier;
|
|
542
552
|
}
|
|
543
553
|
|
|
544
554
|
export interface LinkMeta {
|
|
545
|
-
|
|
546
|
-
|
|
555
|
+
linkText: string;
|
|
556
|
+
linkURL: string;
|
|
547
557
|
}
|
|
548
558
|
|
|
549
559
|
export interface SmartSnippetLinkMeta extends LinkMeta {}
|
|
550
560
|
|
|
551
561
|
export interface SmartSnippetDocumentIdentifier {
|
|
552
|
-
|
|
553
|
-
|
|
562
|
+
contentIdKey: string;
|
|
563
|
+
contentIdValue: string;
|
|
554
564
|
}
|
|
555
565
|
|
|
556
|
-
export type PartialDocumentInformation = Omit<
|
|
566
|
+
export type PartialDocumentInformation = Omit<
|
|
567
|
+
DocumentInformation,
|
|
568
|
+
'actionCause' | 'searchQueryUid'
|
|
569
|
+
>;
|
|
570
|
+
|
|
571
|
+
export type PartialCitationInformation = Omit<
|
|
572
|
+
DocumentInformation,
|
|
573
|
+
'actionCause' | 'searchQueryUid' | 'documentPosition'
|
|
574
|
+
>;
|
|
557
575
|
|
|
558
576
|
interface AnswerGeneratedWithAnswerAPI {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
577
|
+
answerAPIStreamId: string;
|
|
578
|
+
generativeQuestionAnsweringId?: never;
|
|
579
|
+
conversationId?: never;
|
|
562
580
|
}
|
|
563
581
|
|
|
564
582
|
interface AnswerGeneratedWithSearchAPI {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
583
|
+
answerAPIStreamId?: never;
|
|
584
|
+
generativeQuestionAnsweringId: string;
|
|
585
|
+
conversationId?: never;
|
|
568
586
|
}
|
|
569
587
|
|
|
570
588
|
interface AnswerGeneratedWithAgent {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
589
|
+
answerAPIStreamId?: never;
|
|
590
|
+
generativeQuestionAnsweringId: string;
|
|
591
|
+
conversationId: string;
|
|
574
592
|
}
|
|
575
593
|
|
|
576
594
|
export type GeneratedAnswerBaseMeta =
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
595
|
+
| AnswerGeneratedWithAnswerAPI
|
|
596
|
+
| AnswerGeneratedWithSearchAPI
|
|
597
|
+
| AnswerGeneratedWithAgent;
|
|
580
598
|
|
|
581
599
|
export type GeneratedAnswerStreamEndMeta = GeneratedAnswerBaseMeta & {
|
|
582
|
-
|
|
583
|
-
|
|
600
|
+
answerGenerated: boolean;
|
|
601
|
+
answerTextIsEmpty?: boolean;
|
|
584
602
|
};
|
|
585
603
|
|
|
586
604
|
export type GeneratedAnswerCitationMeta = GeneratedAnswerBaseMeta & {
|
|
587
|
-
|
|
588
|
-
|
|
605
|
+
permanentId: string;
|
|
606
|
+
citationId: string;
|
|
589
607
|
};
|
|
590
608
|
|
|
591
609
|
export type GeneratedAnswerInlineLinkMeta = GeneratedAnswerBaseMeta & LinkMeta;
|
|
592
610
|
|
|
593
611
|
export type GeneratedAnswerCitationClickMeta = GeneratedAnswerBaseMeta & {
|
|
594
|
-
|
|
595
|
-
|
|
612
|
+
citationId: string;
|
|
613
|
+
documentId: GeneratedAnswerDocumentIdentifier;
|
|
596
614
|
};
|
|
597
615
|
|
|
598
616
|
type GeneratedAnswerDocumentIdentifier = {
|
|
599
|
-
|
|
600
|
-
|
|
617
|
+
contentIdKey: string;
|
|
618
|
+
contentIdValue: string;
|
|
601
619
|
};
|
|
602
620
|
|
|
603
|
-
export type GeneratedAnswerFeedbackReason =
|
|
621
|
+
export type GeneratedAnswerFeedbackReason =
|
|
622
|
+
| 'irrelevant'
|
|
623
|
+
| 'notAccurate'
|
|
624
|
+
| 'outOfDate'
|
|
625
|
+
| 'harmful'
|
|
626
|
+
| 'other';
|
|
604
627
|
|
|
605
628
|
export type GeneratedAnswerRephraseFormat = 'step' | 'bullet' | 'concise' | 'default';
|
|
606
629
|
|
|
607
630
|
export type GeneratedAnswerSourceHoverMeta = GeneratedAnswerCitationMeta & {
|
|
608
|
-
|
|
631
|
+
citationHoverTimeMs: number;
|
|
609
632
|
};
|
|
610
633
|
|
|
634
|
+
export type GeneratedAnswerFollowupOpenSourceMeta = PartialCitationInformation &
|
|
635
|
+
AnswerGeneratedWithAgent & {
|
|
636
|
+
citationId: string;
|
|
637
|
+
permanentId: string;
|
|
638
|
+
};
|
|
639
|
+
|
|
611
640
|
export type GeneratedAnswerRephraseMeta = GeneratedAnswerBaseMeta & {
|
|
612
|
-
|
|
641
|
+
rephraseFormat: GeneratedAnswerRephraseFormat;
|
|
613
642
|
};
|
|
614
643
|
|
|
615
644
|
export type GeneratedAnswerFeedbackMeta = GeneratedAnswerBaseMeta & {
|
|
616
|
-
|
|
617
|
-
|
|
645
|
+
reason: GeneratedAnswerFeedbackReason;
|
|
646
|
+
details?: string;
|
|
618
647
|
};
|
|
619
648
|
|
|
620
649
|
export type GeneratedAnswerFeedbackReasonOption = 'yes' | 'unknown' | 'no';
|
|
621
650
|
|
|
622
651
|
export type GeneratedAnswerFeedbackMetaV2 = GeneratedAnswerBaseMeta & {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
652
|
+
helpful: boolean;
|
|
653
|
+
readable: GeneratedAnswerFeedbackReasonOption;
|
|
654
|
+
documented: GeneratedAnswerFeedbackReasonOption;
|
|
655
|
+
correctTopic: GeneratedAnswerFeedbackReasonOption;
|
|
656
|
+
hallucinationFree: GeneratedAnswerFeedbackReasonOption;
|
|
657
|
+
details?: string;
|
|
658
|
+
documentUrl?: string;
|
|
630
659
|
};
|