@coveo/usage-analytics-event-types 0.0.0 → 6.24.1

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/package.json CHANGED
@@ -1,11 +1,24 @@
1
1
  {
2
2
  "name": "@coveo/usage-analytics-event-types",
3
- "version": "0.0.0",
4
- "description": "",
3
+ "version": "6.24.1",
4
+ "description": "Typescript types for Coveo Usage Analytics Events",
5
+ "types": "./usage-analytics-types.d.ts",
6
+ "author": "Coveo",
7
+ "license": "Apache-2.0",
8
+ "keywords": [
9
+ "Coveo",
10
+ "analytics",
11
+ "event",
12
+ "types"
13
+ ],
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/coveo/analytics_schema.git"
20
+ },
5
21
  "scripts": {
6
22
  "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "keywords": [],
9
- "author": "",
10
- "license": "Apache-2.0"
23
+ }
11
24
  }
@@ -0,0 +1,768 @@
1
+ /**
2
+ * Copyright (c) Coveo Solutions Inc. These types are automatically generated. Do not modify manually!
3
+ */
4
+
5
+ /**
6
+ * Standardized currency type for commerce.
7
+ */
8
+ type Currency = string | number;
9
+
10
+ /**
11
+ * List of supported currencies.
12
+ */
13
+ type CurrencyCodeISO4217 = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTC" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNH" | "CNY" | "COP" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GGP" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "IMP" | "INR" | "IQD" | "IRR" | "ISK" | "JEP" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STD" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VEF" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "YER" | "ZAR" | "ZMW" | "ZWL";
14
+
15
+ /**
16
+ * ISO693-1 language code.
17
+ */
18
+ type LanguageISO639 = string | null;
19
+
20
+ /**
21
+ * ISO693-1 language codes supported by Coveo.
22
+ */
23
+ type SupportedLanguageISO639 = string;
24
+
25
+ /**
26
+ * Tracking identifier.
27
+ */
28
+ type TrackingId = string | null;
29
+
30
+ /**
31
+ * Unix epoch timestamp, represented in milliseconds.
32
+ */
33
+ type UnixTimestampWithMs = number;
34
+
35
+ /**
36
+ * A UUID which cannot be null.
37
+ */
38
+ type UuidNotNull = string;
39
+
40
+ /**
41
+ * A UUID which can be null.
42
+ */
43
+ type UuidNull = string | null;
44
+
45
+ /**
46
+ * The facet state information in JSON ARRAY format at the time the search operation was performed.
47
+ */
48
+ interface FacetState {
49
+ /**
50
+ * The facet field.
51
+ */
52
+ field: string;
53
+ /**
54
+ * The unique identifier of the facet in the search interface. Must match the regex "^[a-zA-Z0-9@\-_]{1,60}$".
55
+ */
56
+ id: string;
57
+ /**
58
+ * The name of the facet value.
59
+ */
60
+ value: string;
61
+ /**
62
+ * The display name of the facet value that was interacted with.
63
+ */
64
+ displayValue?: string;
65
+ /**
66
+ * The facet action type.
67
+ */
68
+ state: "auto_selected" | "selected" | "excluded";
69
+ /**
70
+ * The facet data type.
71
+ */
72
+ facetType: string;
73
+ /**
74
+ * The 1-based position of the facet.
75
+ */
76
+ facetPosition?: number;
77
+ /**
78
+ * The 1-based position of the value in the facet
79
+ */
80
+ valuePosition?: number;
81
+ /**
82
+ * The facet title.
83
+ */
84
+ title?: string;
85
+ }
86
+
87
+ interface SearchResult {
88
+ /**
89
+ * The @sysuri of this item.
90
+ */
91
+ documentUri: string;
92
+ /**
93
+ * The @sysurihash of this item.
94
+ */
95
+ documentUriHash: string;
96
+ }
97
+
98
+ /**
99
+ * UA analytics click request
100
+ */
101
+ export interface UsageAnalyticsClick {
102
+ actionCause: "interfaceLoad" | "interfaceChange" | "contextRemove" | "didyoumeanAutomatic" | "didyoumeanClick" | "resultsSort" | "searchboxSubmit" | "searchboxClear" | "searchboxAsYouType" | "breadcrumbFacet" | "breadcrumbAdvancedSearch" | "breadcrumbResetAll" | "documentTag" | "documentField" | "documentQuickview" | "documentOpen" | "omniboxFacetSelect" | "omniboxFacetExclude" | "omniboxFacetDeselect" | "omniboxFacetUnexclude" | "omniboxAnalytics" | "omniboxFromLink" | "omniboxField" | "facetClearAll" | "facetSearch" | "facetToggle" | "facetRangeSlider" | "facetRangeGraph" | "facetSelect" | "facetSelectAll" | "facetDeselect" | "facetExclude" | "facetUnexclude" | "facetUpdateSort" | "showMoreFacetResults" | "showLessFacetResults" | "categoryFacetSelect" | "categoryFacetReload" | "categoryFacetClear" | "categoryFacetBreadcrumb" | "categoryFacetSearch" | "errorBack" | "errorClearQuery" | "errorRetry" | "noResultsBack" | "expandToFullUI" | "inputChange" | "submitButton" | "cancelButton" | "unloadPage" | "casecontextAdd" | "casecontextRemove" | "contextChanged" | "preferencesChange" | "getUserHistory" | "userActionDocumentClick" | "caseAttach" | "caseDetach" | "customfiltersChange" | "pagerNumber" | "pagerNext" | "pagerPrevious" | "pagerScrolling" | "pagerResize" | "positionSet" | "searchFromLink" | "notify" | "execute" | "query" | "redirect" | "exportToExcel" | "recommendation" | "recommendationInterfaceLoad" | "recommendationOpen" | "advancedSearch" | "followDocument" | "followQuery" | "updateSubscription" | "deleteSubscription" | "unfollowDocument" | "unfollowQuery" | "selectValue" | "deselectValue" | "clearAll" | "changeResultsLayout" | "showMoreFoldedResults" | "showLessFoldedResults" | "addMissingTerm" | "removeMissingTerm" | "showQuerySuggestPreview" | "clickQuerySuggestPreview" | "likeSmartSnippet" | "dislikeSmartSnippet" | "expandSmartSnippet" | "collapseSmartSnippet" | "openSmartSnippetFeedbackModal" | "closeSmartSnippetFeedbackModal" | "sendSmartSnippetReason" | "openSmartSnippetSource" | "expandSmartSnippetSuggestion" | "collapseSmartSnippetSuggestion" | "openSmartSnippetSuggestionSource" | "staticFilterClearAll" | "staticFilterSelect" | "staticFilterDeselect" | "recentQueriesClick" | "clearRecentQueries" | "recentResultClick" | "clearRecentResults" | "copyToClipboard" | "topQueriesClick" | "userActionLoad" | "userActionsSubmit" | "openUserActions" | "historyBackward" | "enterOnSearchbox" | "quickviewLoaded" | "openQuickview" | "sendAsEmail" | "postToFeed" | "sendToLiveAgent" | "attachToCaseStateChanged" | "attachedResultsLoad" | "CaseInputChange" | "attachedResultsChange" | "openSmartSnippetInlineLink" | "openSmartSnippetSuggestionInlineLink" | "Case.SendEmail" | "FeedItem.TextPost";
103
+ /**
104
+ * The 1-based index position of the item that was clicked in the result list. This number must take into consideration pagination settings. If the pages contain ten results each, the third item of the second page is at the position 23.
105
+ */
106
+ documentPosition: number;
107
+ /**
108
+ * The @uri of the item that was clicked.
109
+ */
110
+ documentUri?: string | null;
111
+ /**
112
+ * The @urihash of the item that was clicked.
113
+ */
114
+ documentUriHash: string;
115
+ /**
116
+ * The content language. Prefix must be a valid ISO 639-1 code.
117
+ */
118
+ language: SupportedLanguageISO639;
119
+ /**
120
+ * The unique identifier of the event which led the search interface to log the click event. It is recommend to use the searchUid in the response of the corresponding search request to the Search API, or any UUID v4 of length less than or equal to 36 characters. UUIDs longer than 36 characters are truncated by the service. This must be a valid searchQueryUid for an event that contains the provided documentUri and documentUriHash.
121
+ */
122
+ searchQueryUid: UuidNotNull;
123
+ /**
124
+ * The @source of the item that was clicked.
125
+ */
126
+ sourceName: string;
127
+ /**
128
+ * Whether the interaction that caused the search interface to log the event was triggered by an anonymous user. If set to true, the Usage Analytics Write API will not extract the name and userDisplayName, if present, from the search token.
129
+ */
130
+ anonymous?: boolean;
131
+ /**
132
+ * A value that uniquely identifies the browser which is logging the event. Must be a valid UUID.
133
+ */
134
+ clientId: UuidNotNull;
135
+ /**
136
+ * The @syscollection of the item that was clicked.
137
+ */
138
+ collectionName?: string | null;
139
+ /**
140
+ * The author of the item that was clicked.
141
+ */
142
+ documentAuthor?: string | null;
143
+ /**
144
+ * The category of the item that was clicked.
145
+ */
146
+ documentCategory?: string | null;
147
+ /**
148
+ * The title of the item that was clicked.
149
+ */
150
+ documentTitle?: string | null;
151
+ /**
152
+ * The url of the item that was clicked.
153
+ */
154
+ documentUrl?: string | null;
155
+ /**
156
+ * The origin of the event. Used to specify the deployment from which the user performs the action.
157
+ */
158
+ originContext?: string | null;
159
+ /**
160
+ * The name/identifier of the search interface from which the event originates.
161
+ */
162
+ originLevel1?: string | null;
163
+ /**
164
+ * The name/identifier of the tab from which the event originates.
165
+ */
166
+ originLevel2?: string | null;
167
+ /**
168
+ * The URL of the page that redirected the browser to the search interface from which the event originates.
169
+ */
170
+ originLevel3?: string | null;
171
+ /**
172
+ * An indication of how good the outcome of this event is. No longer in use.
173
+ */
174
+ outcome?: number | null;
175
+ /**
176
+ * The name of the query pipeline which processed the query that led to the click event.
177
+ */
178
+ queryPipeline?: string | null;
179
+ /**
180
+ * The ranking modifier that affected the clicked item.
181
+ */
182
+ rankingModifier?: string | null;
183
+ /**
184
+ * The name of the A/B test run, if one is active.
185
+ */
186
+ splitTestRunName?: string | null;
187
+ /**
188
+ * The version of the A/B test run, if one is active.
189
+ */
190
+ splitTestRunVersion?: string | null;
191
+ /**
192
+ * Information about the browser and operating system of the end-user who caused the search interface to log an event.
193
+ */
194
+ userAgent?: string;
195
+ /**
196
+ * The display name of the user performing the event.
197
+ */
198
+ userDisplayName?: string | null;
199
+ /**
200
+ * The name of the user security identity who caused the search interface to log the event.
201
+ */
202
+ username?: string | null;
203
+ /**
204
+ * The user defined dimensions and their values. Keys can only contain alphanumeric or underscore characters. Whitespaces in keys are converted to underscores. Uppercase characters in keys are converted to lowercase characters. The value could be any valid JSON, but it is handled as string over Coveo usage analytics. It is highly recommended that you create your custom dimension before adding customData.
205
+ */
206
+ customData?: {
207
+ [index: string]: unknown;
208
+ } | null;
209
+ /**
210
+ * The trackingId for your analytics event. A string that consists of one or more characters that are lowercase letters (a-z), uppercase letters (A-Z), digits (0-9), underscores (_), dash (-) or dot (.), and does not allow any other characters.
211
+ */
212
+ trackingId?: TrackingId;
213
+ }
214
+
215
+ export interface UsageAnalyticsCollect {
216
+ /**
217
+ * The protocol version for all hit types. The current value is 1.
218
+ */
219
+ v?: string;
220
+ /**
221
+ * The tracking or web property ID for all hit types. The tid is the org query parameter in a Coveo search interface. For more information, see Log Usage Analytics Events.
222
+ */
223
+ tid?: string;
224
+ /**
225
+ * Whether the IP address of the sender is anonymized.
226
+ */
227
+ aip?: boolean | string | number;
228
+ /**
229
+ * Whether an event is marked as disabled for advertising personalization, including for events from a property with a setting that otherwise permits ads personalization.
230
+ */
231
+ npa?: boolean;
232
+ /**
233
+ * Indicates the data source of the hit. E.g. 'web' or 'app'.
234
+ */
235
+ ds?: string | null;
236
+ /**
237
+ * Collects offline and latent hits.
238
+ */
239
+ qt?: number;
240
+ /**
241
+ * Indicates the name or identifier of the search interface from which the query originated. Forwards to 'originLevel1'.
242
+ */
243
+ searchHub?: string | null;
244
+ /**
245
+ * The ranking modifier that affected the clicked item.
246
+ */
247
+ rankingModifier?: string | null;
248
+ /**
249
+ * Indicates the name or identifier of the selected tab from which the query originated. Forwards to 'originLevel2'.
250
+ */
251
+ tab?: string | null;
252
+ /**
253
+ * Sends a random number in GET requests to ensure browsers and proxies don’t cache hits. This value is not used in reporting.
254
+ */
255
+ z?: string | null;
256
+ /**
257
+ * Pseudonymously identifies a particular browser or app instance.
258
+ */
259
+ cid: UuidNotNull;
260
+ /**
261
+ * Represents the user ID and identifies a user through the credentials used to log in to a certain website (e.g., the user’s hashed email address).
262
+ */
263
+ uid?: string | null;
264
+ /**
265
+ * Controls the session duration. Values of 'start' and 'end' are used.
266
+ */
267
+ sc?: "start" | "end";
268
+ /**
269
+ * Represents the IP address of the user. When specified, Coveo uses this IP address. Otherwise, it uses the IP address from the request, the same as UA events. In the UA report, an IP address from the Collect endpoint or a UA event is hashed in the same way (results into the same non-reversible hash value). The following dimensions are determined with the IP address: City, Country, and Region. For more information about IP addresses, see Analytics Data.
270
+ */
271
+ uip?: string;
272
+ /**
273
+ * Represents the user agent of the browser. It works in the same way as userAgent in UA events.
274
+ */
275
+ ua?: string | null;
276
+ /**
277
+ * Provides the geographical location of the user. The geographical ID should be a two-letter country code or a criteria ID representing a city or region.
278
+ */
279
+ geoid?: string | null;
280
+ /**
281
+ * Specifies the document referral source which brought traffic to a website. Maximum length of 2048 bytes. It’s also used to compute the traffic source and works in the same way as originLevel3 in UA events.
282
+ */
283
+ dr?: string | null;
284
+ /**
285
+ * Specifies the campaign name.
286
+ */
287
+ cn?: string | null;
288
+ /**
289
+ * Specifies the campaign source.
290
+ */
291
+ cs?: string | null;
292
+ /**
293
+ * Specifies the campaign medium.
294
+ */
295
+ cm?: string | null;
296
+ /**
297
+ * Specifies the campaign keyword.
298
+ */
299
+ ck?: string | null;
300
+ /**
301
+ * Specifies the campaign content.
302
+ */
303
+ cc?: string | null;
304
+ /**
305
+ * Specifies the campaign id.
306
+ */
307
+ ci?: string | null;
308
+ /**
309
+ * Specifies the screen resolution. Maximum length of 20 bytes. It must use the following format: <INTEGER>x<INTEGER>. Both integers have a positive value (e.g., 1280x1024). The x isn’t case-sensitive and a space is allowed before and after.
310
+ */
311
+ sr?: string | null;
312
+ /**
313
+ * Specifies the viewport size of the browser or device.
314
+ */
315
+ vp?: string | null;
316
+ /**
317
+ * Specifies the character set used to encode the page or the document. Maximum length of 20 bytes.
318
+ */
319
+ de?: string | null;
320
+ /**
321
+ * Specifies the screen color depth. Maximum length of 20 bytes.
322
+ */
323
+ sd?: string | null;
324
+ /**
325
+ * Specifies the locale setting of the user’s browser. Automatically sent using Coveo’s libraries and is specified with ISO-639 standards (e.g., 'en-us').
326
+ */
327
+ ul?: LanguageISO639;
328
+ /**
329
+ * Specifies if Java is enabled.
330
+ */
331
+ je?: boolean;
332
+ /**
333
+ * Specifies the Flash version.
334
+ */
335
+ fl?: string | null;
336
+ /**
337
+ * This must be one of the following: pageview, screenview, event, transaction, item, social, or timing. The Collect event is converted to a UA event based on this value. The original event from the Collect endpoint is then stored as a UA event as custom_datas, under the c_original_event_data attribute name. UA dimensions can be then used to access those parameters over UA reports.
338
+ */
339
+ t: "pageview" | "screenview" | "event" | "transaction" | "item" | "social" | "timing";
340
+ /**
341
+ * Specifies if a hit is non-interactive
342
+ */
343
+ ni?: boolean;
344
+ /**
345
+ * Identifies a unique page load. Randomly generated on a pageview.
346
+ */
347
+ pid?: UuidNotNull;
348
+ /**
349
+ * Sends the document location URL of the page on which the content resides. Maximum length of 2048 bytes. You can use the dh and dp parameters to override the host name, path, and query portions of the document location accordingly. Based on the event type, the document URL is converted to either a view, search, or click event.
350
+ */
351
+ dl?: string | null;
352
+ /**
353
+ * Specifies the document host name from which the content is hosted. Maximum length of 2048 bytes. If converted to a UA view event and the dl is empty, then the location becomes the concatenation of the dh and dp parameters.
354
+ */
355
+ dh?: string | null;
356
+ /**
357
+ * Represents the document path portion of the page URL. Starts with a slash.
358
+ */
359
+ dp?: string | null;
360
+ /**
361
+ * Represents the document title.
362
+ */
363
+ dt?: string | null;
364
+ /**
365
+ * Describes the content of a screenview hit on mobile.
366
+ */
367
+ cd?: string | null;
368
+ /**
369
+ * The ID of a clicked DOM element, used to disambiguate multiple links to the same URL.
370
+ */
371
+ linkid?: string | null;
372
+ /**
373
+ * Specifies the application name.
374
+ */
375
+ an?: string | null;
376
+ /**
377
+ * Application identifier.
378
+ */
379
+ aid?: string | null;
380
+ /**
381
+ * Specifies the application version.
382
+ */
383
+ av?: string | null;
384
+ /**
385
+ * Application installer identifier.
386
+ */
387
+ aiid?: string | null;
388
+ /**
389
+ * Specifies the event category. Must not be empty.
390
+ */
391
+ ec?: string;
392
+ /**
393
+ * Specifies the event action. Must not be empty.
394
+ */
395
+ ea?: string;
396
+ /**
397
+ * Specifies the event label.
398
+ */
399
+ el?: string | null;
400
+ /**
401
+ * Specifies the event value. Values must be non-negative.
402
+ */
403
+ ev?: number | null;
404
+ /**
405
+ * A unique identifier for the transaction. This value should be the same for both the Transaction hit and Items hits associated to the particular transaction.
406
+ */
407
+ ti?: string | null;
408
+ /**
409
+ * Specifies the affiliation or store name.
410
+ */
411
+ ta?: string | null;
412
+ /**
413
+ * Specifies the total revenue associated with the transaction. This value should include any shipping or tax costs.
414
+ */
415
+ tr?: Currency;
416
+ /**
417
+ * Specifies the total shipping cost of the transaction.
418
+ */
419
+ ts?: Currency;
420
+ /**
421
+ * Specifies the total tax of the transaction.
422
+ */
423
+ tt?: Currency;
424
+ /**
425
+ * Specifies the item name. Required for item hit type.
426
+ */
427
+ in?: string | null;
428
+ /**
429
+ * Specifies the price for a single item / unit.
430
+ */
431
+ ip?: Currency;
432
+ /**
433
+ * Specifies the number of items purchased.
434
+ */
435
+ iq?: number;
436
+ /**
437
+ * Specifies the SKU or item code.
438
+ */
439
+ ic?: string | null;
440
+ /**
441
+ * Specifies the category that the item belongs to.
442
+ */
443
+ iv?: string | null;
444
+ /**
445
+ * The role of the products included in a hit.
446
+ */
447
+ pa?: "detail" | "click" | "add" | "remove" | "checkout" | "checkout_option" | "purchase" | "refund" | "impression" | "quickview" | "bookmark_add" | "bookmark_remove" | "compare_add" | "compare_remove" | "review_add" | "review_remove" | "quote";
448
+ /**
449
+ * The transaction coupon redeemed with the transaction. This is an additional parameter that can be sent when Product Action is set to 'purchase' or 'refund'.
450
+ */
451
+ tcc?: string | null;
452
+ /**
453
+ * The list or collection from which a product action occurred. This is an additional parameter that can be sent when Product Action is set to 'detail' or 'click'.
454
+ */
455
+ pal?: string | null;
456
+ /**
457
+ * The step number in a checkout funnel. This is an additional parameter that can be sent when Product Action is set to 'checkout'.
458
+ */
459
+ cos?: number;
460
+ /**
461
+ * Additional information about a checkout step. This is an additional parameter that can be sent when Product Action is set to 'checkout'.
462
+ */
463
+ col?: string | null;
464
+ /**
465
+ * Specifies the role of the promotions included in a hit.
466
+ */
467
+ promoa?: string | null;
468
+ /**
469
+ * When present indicates the local currency for all transaction currency values.
470
+ */
471
+ cu?: CurrencyCodeISO4217;
472
+ /**
473
+ * Client side event timestamp. Collect protocol specific.
474
+ */
475
+ tm?: UnixTimestampWithMs;
476
+ /**
477
+ * Used by service integrations specifically to forward the custom event type, e.g. 'ticket_field_update'.
478
+ */
479
+ svc_action?: string;
480
+ /**
481
+ * The trackingId for your analytics event. A string that consists of one or more characters that are lowercase letters (a-z), uppercase letters (A-Z), digits (0-9), underscores (_), dash (-) or dot (.), and does not allow any other characters.
482
+ */
483
+ trackingId?: TrackingId;
484
+ [index: string]: unknown;
485
+ }
486
+
487
+ /**
488
+ * UA analytics custom request
489
+ */
490
+ export interface UsageAnalyticsCustom {
491
+ /**
492
+ * The custom event type.
493
+ */
494
+ eventType: string;
495
+ /**
496
+ * The custom event value.
497
+ */
498
+ eventValue: string;
499
+ /**
500
+ * The content language. Prefix must be a valid ISO 639-1 code.
501
+ */
502
+ language: SupportedLanguageISO639;
503
+ /**
504
+ * Whether the interaction that caused the search interface to log the event was triggered by an anonymous user. If set to 'true', the Usage Analytics Write API will not extract the name and userDisplayName, if present, from the search token.
505
+ */
506
+ anonymous?: boolean;
507
+ /**
508
+ * A value that uniquely identifies the browser which is logging the event. Must be a valid UUID.
509
+ */
510
+ clientId: UuidNotNull;
511
+ /**
512
+ * The user defined dimensions and their values. Keys can only contain alphanumeric or underscore characters. Whitespaces in keys are converted to underscores. Uppercase characters in keys are converted to lowercase characters. The value could be any valid JSON, but it is handled as string over Coveo usage analytics. It is highly recommended that you create your custom dimension before adding customData.
513
+ */
514
+ customData?: {
515
+ [index: string]: unknown;
516
+ } | null;
517
+ /**
518
+ * The unique identifier (typically, the searchUid) of the query that caused the search interface to log the custom event, if applicable.
519
+ */
520
+ lastSearchQueryUid?: UuidNull;
521
+ /**
522
+ * The origin of the event. Used to specify the deployment from which the user performs the action.
523
+ */
524
+ originContext?: string | null;
525
+ /**
526
+ * The name/identifier of the search interface from which the event originates.
527
+ */
528
+ originLevel1?: string | null;
529
+ /**
530
+ * The name/identifier of the tab from which the event originates.
531
+ */
532
+ originLevel2?: string | null;
533
+ /**
534
+ * The URL of the page that redirected the browser to the search interface from which the event originates.
535
+ */
536
+ originLevel3?: string | null;
537
+ /**
538
+ * An indication of how good the outcome of this event is.
539
+ */
540
+ outcome?: number | null;
541
+ /**
542
+ * The name of the A/B test run, if one is active.
543
+ */
544
+ splitTestRunName?: string | null;
545
+ /**
546
+ * The version of the A/B test run, if one is active.
547
+ */
548
+ splitTestRunVersion?: string | null;
549
+ /**
550
+ * Information about the browser and operating system of the end-user who caused the search interface to log an event.
551
+ */
552
+ userAgent?: string | null;
553
+ /**
554
+ * The display name of the user performing the event.
555
+ */
556
+ userDisplayName?: string | null;
557
+ /**
558
+ * The name of the user security identity who caused the search interface to log the event.
559
+ */
560
+ username?: string | null;
561
+ /**
562
+ * The trackingId for your analytics event. A string that consists of one or more characters that are lowercase letters (a-z), uppercase letters (A-Z), digits (0-9), underscores (_), dash (-) or dot (.), and does not allow any other characters.
563
+ */
564
+ trackingId?: TrackingId;
565
+ }
566
+
567
+ /**
568
+ * UA analytics search request
569
+ */
570
+ export interface UsageAnalyticsSearch {
571
+ actionCause: "interfaceLoad" | "interfaceChange" | "contextRemove" | "didyoumeanAutomatic" | "didyoumeanClick" | "resultsSort" | "searchboxSubmit" | "searchboxClear" | "searchboxAsYouType" | "breadcrumbFacet" | "breadcrumbAdvancedSearch" | "breadcrumbResetAll" | "documentTag" | "documentField" | "documentQuickview" | "documentOpen" | "omniboxFacetSelect" | "omniboxFacetExclude" | "omniboxFacetDeselect" | "omniboxFacetUnexclude" | "omniboxAnalytics" | "omniboxFromLink" | "omniboxField" | "facetClearAll" | "facetSearch" | "facetToggle" | "facetRangeSlider" | "facetRangeGraph" | "facetSelect" | "facetSelectAll" | "facetDeselect" | "facetExclude" | "facetUnexclude" | "facetUpdateSort" | "showMoreFacetResults" | "showLessFacetResults" | "categoryFacetSelect" | "categoryFacetReload" | "categoryFacetClear" | "categoryFacetBreadcrumb" | "categoryFacetSearch" | "errorBack" | "errorClearQuery" | "errorRetry" | "noResultsBack" | "expandToFullUI" | "inputChange" | "submitButton" | "cancelButton" | "unloadPage" | "casecontextAdd" | "casecontextRemove" | "contextChanged" | "preferencesChange" | "getUserHistory" | "userActionDocumentClick" | "caseAttach" | "caseDetach" | "customfiltersChange" | "pagerNumber" | "pagerNext" | "pagerPrevious" | "pagerScrolling" | "pagerResize" | "positionSet" | "searchFromLink" | "notify" | "execute" | "query" | "redirect" | "exportToExcel" | "recommendation" | "recommendationInterfaceLoad" | "recommendationOpen" | "advancedSearch" | "followDocument" | "followQuery" | "updateSubscription" | "deleteSubscription" | "unfollowDocument" | "unfollowQuery" | "selectValue" | "deselectValue" | "clearAll" | "changeResultsLayout" | "showMoreFoldedResults" | "showLessFoldedResults" | "addMissingTerm" | "removeMissingTerm" | "showQuerySuggestPreview" | "clickQuerySuggestPreview" | "likeSmartSnippet" | "dislikeSmartSnippet" | "expandSmartSnippet" | "collapseSmartSnippet" | "openSmartSnippetFeedbackModal" | "closeSmartSnippetFeedbackModal" | "sendSmartSnippetReason" | "openSmartSnippetSource" | "expandSmartSnippetSuggestion" | "collapseSmartSnippetSuggestion" | "openSmartSnippetSuggestionSource" | "staticFilterClearAll" | "staticFilterSelect" | "staticFilterDeselect" | "recentQueriesClick" | "clearRecentQueries" | "recentResultClick" | "clearRecentResults" | "copyToClipboard" | "topQueriesClick" | "userActionLoad" | "userActionsSubmit" | "openUserActions" | "historyBackward" | "enterOnSearchbox" | "quickviewLoaded" | "openQuickview" | "sendAsEmail" | "postToFeed" | "sendToLiveAgent" | "attachToCaseStateChanged" | "attachedResultsLoad" | "CaseInputChange" | "attachedResultsChange" | "openSmartSnippetInlineLink" | "openSmartSnippetSuggestionInlineLink" | "retryGeneratedAnswer";
572
+ /**
573
+ * The content language. Prefix must be a valid ISO 639-1 code.
574
+ */
575
+ language: SupportedLanguageISO639;
576
+ /**
577
+ * The original basic query expression ('q') in the corresponding search request.
578
+ */
579
+ queryText: string;
580
+ /**
581
+ * The amount of time (in milliseconds) between the moment the query that caused the search interface to log a search event was sent to the Search API and the moment the Search API returned the results. Must be greater than zero.
582
+ */
583
+ responseTime: number;
584
+ /**
585
+ * It is recommended to use the searchUid in the response of the corresponding search request to the Search API, or any UUID v4 of length less than or equal to 36 characters. UUIDs longer than 36 characters are truncated by the service.
586
+ */
587
+ searchQueryUid: UuidNotNull;
588
+ /**
589
+ * The original advanced query expression ('aq') in the corresponding search request. Usually, this contains various query elements that were not manually added by the user.
590
+ */
591
+ advancedQuery?: string | null;
592
+ /**
593
+ * Whether the interaction that caused the search interface to log the event was triggered by an anonymous user. If set to 'true', the Usage Analytics Write API will not extract the name and userDisplayName, if present, from the search token.
594
+ */
595
+ anonymous?: boolean;
596
+ /**
597
+ * A value that uniquely identifies the browser which is logging the event. Must be a valid UUID.
598
+ */
599
+ clientId: UuidNotNull;
600
+ /**
601
+ * Indicates if the query is modified by contextual filters (for instance, a query to find similar items).
602
+ */
603
+ contextual?: boolean;
604
+ /**
605
+ * The user defined dimensions and their values. Keys can only contain alphanumeric or underscore characters. Whitespaces in keys are converted to underscores. Uppercase characters in keys are converted to lowercase characters. The value could be any valid JSON, but it is handled as string over Coveo usage analytics. It is highly recommended that you create your custom dimension before adding customData. Notes: ml/qs and ml/pqs rely on suggestion metadata and ml/dne rely on additional facet metadata attached in customData.
606
+ */
607
+ customData?: {
608
+ [index: string]: unknown;
609
+ } | null;
610
+ facetState?: FacetState[] | null;
611
+ /**
612
+ * The index name the search query performed against.
613
+ */
614
+ indexId?: string | null;
615
+ /**
616
+ * The number of results which were returned by the query that caused the search interface to log a search event. Must be equal to or greater than zero.
617
+ */
618
+ numberOfResults?: number;
619
+ /**
620
+ * The origin of the event. Used to specify the deployment from which the user performs the action.
621
+ */
622
+ originContext?: string | null;
623
+ /**
624
+ * The name/identifier of the search interface from which the event originates.
625
+ */
626
+ originLevel1?: string | null;
627
+ /**
628
+ * The name/identifier of the tab from which the event originates.
629
+ */
630
+ originLevel2?: string | null;
631
+ /**
632
+ * The URL of the page that redirected the browser to the search interface from which the event originates.
633
+ */
634
+ originLevel3?: string | null;
635
+ /**
636
+ * An indication of how good the outcome of this event is. No longer in use.
637
+ */
638
+ outcome?: number | null;
639
+ /**
640
+ * The name of the query pipeline which processed the query that led to the search event.
641
+ */
642
+ queryPipeline?: string | null;
643
+ /**
644
+ * The results of this search event. Deprecated.
645
+ */
646
+ results?: SearchResult[] | null;
647
+ /**
648
+ * The name of the A/B test run, if one is active.
649
+ */
650
+ splitTestRunName?: string | null;
651
+ /**
652
+ * The version of the A/B test run, if one is active.
653
+ */
654
+ splitTestRunVersion?: string | null;
655
+ /**
656
+ * Information about the browser and operating system of the end-user who caused the search interface to log an event.
657
+ */
658
+ userAgent?: string | null;
659
+ /**
660
+ * The display name of the user performing the event.
661
+ */
662
+ userDisplayName?: string | null;
663
+ /**
664
+ * The groups that the end-user performing the event is a member of.
665
+ */
666
+ userGroups?: string[] | null;
667
+ /**
668
+ * The name of the user security identity who caused the search interface to log the event.
669
+ */
670
+ username?: string | null;
671
+ /**
672
+ * The trackingId for your analytics event. A string that consists of one or more characters that are lowercase letters (a-z), uppercase letters (A-Z), digits (0-9), underscores (_), dash (-) or dot (.), and does not allow any other characters.
673
+ */
674
+ trackingId?: TrackingId;
675
+ }
676
+
677
+ /**
678
+ * UA analytics view request
679
+ */
680
+ export interface UsageAnalyticsView {
681
+ /**
682
+ * The content language. Prefix must be a valid ISO 639-1 code.
683
+ */
684
+ language?: SupportedLanguageISO639;
685
+ /**
686
+ * The URL of the viewed page or component, usually 'document.location.href'.
687
+ */
688
+ location: string;
689
+ /**
690
+ * Information about the browser and operating system of the end-user who caused the search interface to log an event.
691
+ */
692
+ userAgent?: string;
693
+ /**
694
+ * The user defined dimensions and their values.
695
+ */
696
+ customData?: {
697
+ [index: string]: unknown;
698
+ } | null;
699
+ /**
700
+ * Whether the interaction that caused the search interface to log the event was triggered by an anonymous user.
701
+ */
702
+ anonymous?: boolean;
703
+ /**
704
+ * The name of the user security identity who caused the search interface to log the event.
705
+ */
706
+ username?: string | null;
707
+ /**
708
+ * The display name of the user performing the event.
709
+ */
710
+ userDisplayName?: string | null;
711
+ /**
712
+ * The name of the A/B test run, if one is active.
713
+ */
714
+ splitTestRunName?: string | null;
715
+ /**
716
+ * The version of the A/B test run
717
+ */
718
+ splitTestRunVersion?: string | null;
719
+ /**
720
+ * The name/identifier of the search interface from which the event originates.
721
+ */
722
+ originLevel1?: string | null;
723
+ /**
724
+ * The name/identifier of the tab from which the event originates.
725
+ */
726
+ originLevel2?: string | null;
727
+ /**
728
+ * The URL of the page that redirected the browser to the search interface from which the event originates.
729
+ */
730
+ originLevel3?: string | null;
731
+ /**
732
+ * An indication of how good the outcome of this event is.
733
+ */
734
+ outcome?: number | null;
735
+ /**
736
+ * The origin of the event. Used to specify the deployment from which the user performs the action.
737
+ */
738
+ originContext?: string | null;
739
+ /**
740
+ * A value that uniquely identifies the browser which is logging the event. Must be a valid UUID.
741
+ */
742
+ clientId: UuidNotNull;
743
+ /**
744
+ * This parameter is exposed for backward compatibility reasons. Use originLevel3 instead.
745
+ */
746
+ referrer?: string | null;
747
+ /**
748
+ * The title of the item or page.
749
+ */
750
+ title?: string | null;
751
+ /**
752
+ * The name of a field in the index that identifies the item uniquely.
753
+ */
754
+ contentIdKey?: string | null;
755
+ /**
756
+ * The value of the field selected as contentIdKey.
757
+ */
758
+ contentIdValue?: string | null;
759
+ /**
760
+ * The type of content in the page.
761
+ */
762
+ contentType?: string | null;
763
+ /**
764
+ * The trackingId for your analytics event. A string that consists of one or more characters that are lowercase letters (a-z), uppercase letters (A-Z), digits (0-9), underscores (_), dash (-) or dot (.), and does not allow any other characters.
765
+ */
766
+ trackingId?: TrackingId;
767
+ }
768
+