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