coveo.analytics 2.30.45 → 2.30.46

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 (47) hide show
  1. package/README.md +41 -41
  2. package/dist/browser.mjs +34 -16
  3. package/dist/coveoua.browser.js +1 -1
  4. package/dist/coveoua.browser.js.map +1 -1
  5. package/dist/coveoua.debug.js +54 -36
  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 +2 -2
  10. package/dist/definitions/insight/insightClient.d.ts +2 -0
  11. package/dist/definitions/version.d.ts +1 -1
  12. package/dist/library.cjs +151 -43
  13. package/dist/library.es.js +34 -16
  14. package/dist/library.js +151 -43
  15. package/dist/library.mjs +151 -43
  16. package/dist/react-native.es.js +34 -16
  17. package/package.json +7 -7
  18. package/src/caseAssist/caseAssistClient.spec.ts +5 -5
  19. package/src/caseAssist/caseAssistClient.ts +7 -4
  20. package/src/client/analytics.spec.ts +1 -1
  21. package/src/client/analytics.ts +11 -11
  22. package/src/client/analyticsBeaconClient.spec.ts +10 -10
  23. package/src/client/analyticsBeaconClient.ts +4 -4
  24. package/src/client/analyticsFetchClient.ts +1 -1
  25. package/src/client/analyticsRequestClient.ts +1 -1
  26. package/src/client/measurementProtocolMapper.ts +2 -2
  27. package/src/client/measurementProtocolMapping/baseMeasurementProtocolMapper.ts +1 -1
  28. package/src/client/measurementProtocolMapping/commerceMeasurementProtocolMapper.ts +5 -5
  29. package/src/client/noopAnalytics.ts +1 -1
  30. package/src/client/utils.spec.ts +6 -6
  31. package/src/coveoua/browser.ts +2 -2
  32. package/src/coveoua/plugins.ts +1 -1
  33. package/src/coveoua/simpleanalytics.spec.ts +5 -5
  34. package/src/coveoua/simpleanalytics.ts +1 -1
  35. package/src/donottrack.spec.ts +1 -1
  36. package/src/history.spec.ts +1 -1
  37. package/src/insight/insightClient.spec.ts +42 -8
  38. package/src/insight/insightClient.ts +82 -63
  39. package/src/plugins/ec.spec.ts +6 -6
  40. package/src/plugins/ec.ts +5 -5
  41. package/src/plugins/link.spec.ts +5 -5
  42. package/src/plugins/link.ts +1 -1
  43. package/src/plugins/svc.ts +1 -1
  44. package/src/searchPage/searchPageClient.spec.ts +3 -3
  45. package/src/searchPage/searchPageClient.ts +27 -24
  46. package/src/searchPage/searchPageEvents.ts +2 -1
  47. package/src/version.ts +1 -1
package/dist/library.js CHANGED
@@ -21,7 +21,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
21
21
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
22
  PERFORMANCE OF THIS SOFTWARE.
23
23
  ***************************************************************************** */
24
- /* global Reflect, Promise */
24
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
25
25
 
26
26
  var extendStatics = function(d, b) {
27
27
  extendStatics = Object.setPrototypeOf ||
@@ -72,8 +72,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
72
72
  }
73
73
 
74
74
  function __generator(thisArg, body) {
75
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
76
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
75
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
76
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
77
77
  function verb(n) { return function (v) { return step([n, v]); }; }
78
78
  function step(op) {
79
79
  if (f) throw new TypeError("Generator is already executing.");
@@ -107,7 +107,12 @@ function __spreadArray(to, from, pack) {
107
107
  }
108
108
  }
109
109
  return to.concat(ar || Array.prototype.slice.call(from));
110
- }
110
+ }
111
+
112
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
113
+ var e = new Error(message);
114
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
115
+ };
111
116
 
112
117
  exports.EventType = void 0;
113
118
  (function (EventType) {
@@ -505,7 +510,7 @@ for (let i = 0; i < 256; ++i) {
505
510
  function unsafeStringify(arr, offset = 0) {
506
511
  // Note: Be careful editing this code! It's been tuned for performance
507
512
  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
508
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
513
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
509
514
  }
510
515
 
511
516
  function parse(uuid) {
@@ -731,7 +736,7 @@ function sha1(bytes) {
731
736
  const v5 = v35('v5', 0x50, sha1);
732
737
  var uuidv5 = v5;
733
738
 
734
- var libVersion = "2.30.45" ;
739
+ var libVersion = "2.30.46";
735
740
 
736
741
  var getFormattedLocation = function (location) {
737
742
  return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
@@ -82515,10 +82520,6 @@ publicApi.parseURL = urlStateMachineExports.parseURL;
82515
82520
  agent = agent(parsedURL);
82516
82521
  }
82517
82522
 
82518
- if (!headers.has('Connection') && !agent) {
82519
- headers.set('Connection', 'close');
82520
- }
82521
-
82522
82523
  // HTTP-network fetch step 4.2
82523
82524
  // chunked encoding is handled by Node.js
82524
82525
 
@@ -82567,6 +82568,20 @@ publicApi.parseURL = urlStateMachineExports.parseURL;
82567
82568
  return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
82568
82569
  };
82569
82570
 
82571
+ /**
82572
+ * isSameProtocol reports whether the two provided URLs use the same protocol.
82573
+ *
82574
+ * Both domains must already be in canonical form.
82575
+ * @param {string|URL} original
82576
+ * @param {string|URL} destination
82577
+ */
82578
+ const isSameProtocol = function isSameProtocol(destination, original) {
82579
+ const orig = new URL$1(original).protocol;
82580
+ const dest = new URL$1(destination).protocol;
82581
+
82582
+ return orig === dest;
82583
+ };
82584
+
82570
82585
  /**
82571
82586
  * Fetch function
82572
82587
  *
@@ -82598,7 +82613,7 @@ publicApi.parseURL = urlStateMachineExports.parseURL;
82598
82613
  let error = new AbortError('The user aborted a request.');
82599
82614
  reject(error);
82600
82615
  if (request.body && request.body instanceof Stream.Readable) {
82601
- request.body.destroy(error);
82616
+ destroyStream(request.body, error);
82602
82617
  }
82603
82618
  if (!response || !response.body) return;
82604
82619
  response.body.emit('error', error);
@@ -82639,9 +82654,43 @@ publicApi.parseURL = urlStateMachineExports.parseURL;
82639
82654
 
82640
82655
  req.on('error', function (err) {
82641
82656
  reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
82657
+
82658
+ if (response && response.body) {
82659
+ destroyStream(response.body, err);
82660
+ }
82661
+
82642
82662
  finalize();
82643
82663
  });
82644
82664
 
82665
+ fixResponseChunkedTransferBadEnding(req, function (err) {
82666
+ if (signal && signal.aborted) {
82667
+ return;
82668
+ }
82669
+
82670
+ if (response && response.body) {
82671
+ destroyStream(response.body, err);
82672
+ }
82673
+ });
82674
+
82675
+ /* c8 ignore next 18 */
82676
+ if (parseInt(process.version.substring(1)) < 14) {
82677
+ // Before Node.js 14, pipeline() does not fully support async iterators and does not always
82678
+ // properly handle when the socket close/end events are out of order.
82679
+ req.on('socket', function (s) {
82680
+ s.addListener('close', function (hadError) {
82681
+ // if a data listener is still present we didn't end cleanly
82682
+ const hasDataListener = s.listenerCount('data') > 0;
82683
+
82684
+ // if end happened before close but the socket didn't emit an error, do it now
82685
+ if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
82686
+ const err = new Error('Premature close');
82687
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
82688
+ response.body.emit('error', err);
82689
+ }
82690
+ });
82691
+ });
82692
+ }
82693
+
82645
82694
  req.on('response', function (res) {
82646
82695
  clearTimeout(reqTimeout);
82647
82696
 
@@ -82713,7 +82762,7 @@ publicApi.parseURL = urlStateMachineExports.parseURL;
82713
82762
  size: request.size
82714
82763
  };
82715
82764
 
82716
- if (!isDomainOrSubdomain(request.url, locationURL)) {
82765
+ if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
82717
82766
  for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
82718
82767
  requestOpts.headers.delete(name);
82719
82768
  }
@@ -82806,6 +82855,13 @@ publicApi.parseURL = urlStateMachineExports.parseURL;
82806
82855
  response = new Response(body, response_options);
82807
82856
  resolve(response);
82808
82857
  });
82858
+ raw.on('end', function () {
82859
+ // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
82860
+ if (!response) {
82861
+ response = new Response(body, response_options);
82862
+ resolve(response);
82863
+ }
82864
+ });
82809
82865
  return;
82810
82866
  }
82811
82867
 
@@ -82825,6 +82881,44 @@ publicApi.parseURL = urlStateMachineExports.parseURL;
82825
82881
  writeToStream(req, request);
82826
82882
  });
82827
82883
  }
82884
+ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
82885
+ let socket;
82886
+
82887
+ request.on('socket', function (s) {
82888
+ socket = s;
82889
+ });
82890
+
82891
+ request.on('response', function (response) {
82892
+ const headers = response.headers;
82893
+
82894
+ if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
82895
+ response.once('close', function (hadError) {
82896
+ // tests for socket presence, as in some situations the
82897
+ // the 'socket' event is not triggered for the request
82898
+ // (happens in deno), avoids `TypeError`
82899
+ // if a data listener is still present we didn't end cleanly
82900
+ const hasDataListener = socket && socket.listenerCount('data') > 0;
82901
+
82902
+ if (hasDataListener && !hadError) {
82903
+ const err = new Error('Premature close');
82904
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
82905
+ errorCallback(err);
82906
+ }
82907
+ });
82908
+ }
82909
+ });
82910
+ }
82911
+
82912
+ function destroyStream(stream, err) {
82913
+ if (stream.destroy) {
82914
+ stream.destroy(err);
82915
+ } else {
82916
+ // node < 8
82917
+ stream.emit('error', err);
82918
+ stream.end();
82919
+ }
82920
+ }
82921
+
82828
82922
  /**
82829
82923
  * Redirect code matching
82830
82924
  *
@@ -82844,7 +82938,8 @@ publicApi.parseURL = urlStateMachineExports.parseURL;
82844
82938
  exports.Headers = Headers;
82845
82939
  exports.Request = Request;
82846
82940
  exports.Response = Response;
82847
- exports.FetchError = FetchError;
82941
+ exports.FetchError = FetchError;
82942
+ exports.AbortError = AbortError;
82848
82943
  } (lib$1, lib$1.exports));
82849
82944
 
82850
82945
  var libExports = lib$1.exports;
@@ -83529,8 +83624,8 @@ var CoveoAnalyticsClient = (function () {
83529
83624
  });
83530
83625
  };
83531
83626
  CoveoAnalyticsClient.prototype.sendSearchEvent = function (_a) {
83532
- var searchQueryUid = _a.searchQueryUid, preparedRequest = __rest(_a, ["searchQueryUid"]);
83533
83627
  return __awaiter(this, void 0, void 0, function () {
83628
+ var searchQueryUid = _a.searchQueryUid, preparedRequest = __rest(_a, ["searchQueryUid"]);
83534
83629
  return __generator(this, function (_b) {
83535
83630
  switch (_b.label) {
83536
83631
  case 0: return [4, this.makeSearchEvent(preparedRequest)];
@@ -83547,8 +83642,8 @@ var CoveoAnalyticsClient = (function () {
83547
83642
  });
83548
83643
  };
83549
83644
  CoveoAnalyticsClient.prototype.sendClickEvent = function (_a) {
83550
- var searchQueryUid = _a.searchQueryUid, preparedRequest = __rest(_a, ["searchQueryUid"]);
83551
83645
  return __awaiter(this, void 0, void 0, function () {
83646
+ var searchQueryUid = _a.searchQueryUid, preparedRequest = __rest(_a, ["searchQueryUid"]);
83552
83647
  return __generator(this, function (_b) {
83553
83648
  switch (_b.label) {
83554
83649
  case 0: return [4, this.makeClickEvent(preparedRequest)];
@@ -83565,8 +83660,8 @@ var CoveoAnalyticsClient = (function () {
83565
83660
  });
83566
83661
  };
83567
83662
  CoveoAnalyticsClient.prototype.sendCustomEvent = function (_a) {
83568
- var lastSearchQueryUid = _a.lastSearchQueryUid, preparedRequest = __rest(_a, ["lastSearchQueryUid"]);
83569
83663
  return __awaiter(this, void 0, void 0, function () {
83664
+ var lastSearchQueryUid = _a.lastSearchQueryUid, preparedRequest = __rest(_a, ["lastSearchQueryUid"]);
83570
83665
  return __generator(this, function (_b) {
83571
83666
  switch (_b.label) {
83572
83667
  case 0: return [4, this.makeCustomEvent(preparedRequest)];
@@ -84347,7 +84442,6 @@ var CustomEventsTypes = (_a = {},
84347
84442
  _a[exports.SearchPageEvents.triggerExecute] = 'queryPipelineTriggers',
84348
84443
  _a[exports.SearchPageEvents.triggerQuery] = 'queryPipelineTriggers',
84349
84444
  _a[exports.SearchPageEvents.triggerRedirect] = 'queryPipelineTriggers',
84350
- _a[exports.SearchPageEvents.queryError] = 'errors',
84351
84445
  _a[exports.SearchPageEvents.queryErrorBack] = 'errors',
84352
84446
  _a[exports.SearchPageEvents.queryErrorClear] = 'errors',
84353
84447
  _a[exports.SearchPageEvents.queryErrorRetry] = 'errors',
@@ -85486,10 +85580,10 @@ var CoveoSearchPageClient = (function () {
85486
85580
  var _a;
85487
85581
  return { actionCause: actionCause, customData: (_a = preparedEvent.payload) === null || _a === void 0 ? void 0 : _a.customData };
85488
85582
  };
85489
- CoveoSearchPageClient.prototype.makeCustomEvent = function (event, metadata, eventType) {
85490
- if (eventType === void 0) { eventType = CustomEventsTypes[event]; }
85491
- return __awaiter(this, void 0, void 0, function () {
85583
+ CoveoSearchPageClient.prototype.makeCustomEvent = function (event_1, metadata_1) {
85584
+ return __awaiter(this, arguments, void 0, function (event, metadata, eventType) {
85492
85585
  var customData, request, _a, preparedEvent;
85586
+ if (eventType === void 0) { eventType = CustomEventsTypes[event]; }
85493
85587
  return __generator(this, function (_b) {
85494
85588
  switch (_b.label) {
85495
85589
  case 0:
@@ -85513,9 +85607,9 @@ var CoveoSearchPageClient = (function () {
85513
85607
  });
85514
85608
  });
85515
85609
  };
85516
- CoveoSearchPageClient.prototype.logCustomEvent = function (event, metadata, eventType) {
85517
- if (eventType === void 0) { eventType = CustomEventsTypes[event]; }
85518
- return __awaiter(this, void 0, void 0, function () {
85610
+ CoveoSearchPageClient.prototype.logCustomEvent = function (event_1, metadata_1) {
85611
+ return __awaiter(this, arguments, void 0, function (event, metadata, eventType) {
85612
+ if (eventType === void 0) { eventType = CustomEventsTypes[event]; }
85519
85613
  return __generator(this, function (_a) {
85520
85614
  switch (_a.label) {
85521
85615
  case 0: return [4, this.makeCustomEvent(event, metadata, eventType)];
@@ -85630,15 +85724,15 @@ var CoveoSearchPageClient = (function () {
85630
85724
  });
85631
85725
  };
85632
85726
  CoveoSearchPageClient.prototype.getBaseSearchEventRequest = function (event, metadata) {
85633
- var _a, _b;
85634
85727
  return __awaiter(this, void 0, void 0, function () {
85635
- var _c;
85728
+ var _a;
85729
+ var _b, _c;
85636
85730
  return __generator(this, function (_d) {
85637
85731
  switch (_d.label) {
85638
85732
  case 0:
85639
- _c = [{}];
85640
- return [4, this.getBaseEventRequest(__assign(__assign({}, metadata), (_b = (_a = this.provider).getGeneratedAnswerMetadata) === null || _b === void 0 ? void 0 : _b.call(_a)))];
85641
- case 1: return [2, __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_d.sent())])), this.provider.getSearchEventRequestPayload()]), { queryPipeline: this.provider.getPipeline(), actionCause: event }])];
85733
+ _a = [{}];
85734
+ return [4, this.getBaseEventRequest(__assign(__assign({}, metadata), (_c = (_b = this.provider).getGeneratedAnswerMetadata) === null || _c === void 0 ? void 0 : _c.call(_b)))];
85735
+ case 1: return [2, __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_d.sent())])), this.provider.getSearchEventRequestPayload()]), { queryPipeline: this.provider.getPipeline(), actionCause: event }])];
85642
85736
  }
85643
85737
  });
85644
85738
  });
@@ -86008,18 +86102,18 @@ var CaseAssistClient = (function () {
86008
86102
  : null);
86009
86103
  };
86010
86104
  CaseAssistClient.prototype.getBaseEventRequest = function (metadata) {
86011
- var _a, _b;
86012
86105
  return __awaiter(this, void 0, void 0, function () {
86013
- var customData, _c;
86014
- var _d;
86106
+ var customData, _a;
86107
+ var _b;
86108
+ var _c, _d;
86015
86109
  return __generator(this, function (_e) {
86016
86110
  switch (_e.label) {
86017
86111
  case 0:
86018
86112
  customData = __assign({}, metadata);
86019
- _c = [__assign({}, this.getOrigins())];
86020
- _d = { customData: customData, language: (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getLanguage(), anonymous: (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getIsAnonymous() };
86113
+ _a = [__assign({}, this.getOrigins())];
86114
+ _b = { customData: customData, language: (_c = this.provider) === null || _c === void 0 ? void 0 : _c.getLanguage(), anonymous: (_d = this.provider) === null || _d === void 0 ? void 0 : _d.getIsAnonymous() };
86021
86115
  return [4, this.getClientId()];
86022
- case 1: return [2, __assign.apply(void 0, _c.concat([(_d.clientId = _e.sent(), _d)]))];
86116
+ case 1: return [2, __assign.apply(void 0, _a.concat([(_b.clientId = _e.sent(), _b)]))];
86023
86117
  }
86024
86118
  });
86025
86119
  });
@@ -86039,16 +86133,16 @@ var CaseAssistClient = (function () {
86039
86133
  };
86040
86134
  };
86041
86135
  CaseAssistClient.prototype.logClickEvent = function (event, info, identifier, metadata) {
86042
- var _a, _b;
86043
86136
  return __awaiter(this, void 0, void 0, function () {
86044
- var payload, _c;
86137
+ var payload, _a;
86138
+ var _b, _c;
86045
86139
  return __generator(this, function (_d) {
86046
86140
  switch (_d.label) {
86047
86141
  case 0:
86048
- _c = [__assign({}, info)];
86142
+ _a = [__assign({}, info)];
86049
86143
  return [4, this.getBaseEventRequest(__assign(__assign({}, identifier), metadata))];
86050
86144
  case 1:
86051
- payload = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_d.sent())])), { searchQueryUid: (_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSearchUID()) !== null && _b !== void 0 ? _b : '', actionCause: event }]);
86145
+ payload = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_d.sent())])), { searchQueryUid: (_c = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getSearchUID()) !== null && _c !== void 0 ? _c : '', actionCause: event }]);
86052
86146
  return [2, this.coveoAnalyticsClient.sendClickEvent(payload)];
86053
86147
  }
86054
86148
  });
@@ -86097,6 +86191,20 @@ var CoveoInsightClient = (function () {
86097
86191
  }
86098
86192
  return this.logSearchEvent(exports.SearchPageEvents.interfaceLoad);
86099
86193
  };
86194
+ CoveoInsightClient.prototype.logRecentQueryClick = function (metadata) {
86195
+ if (metadata) {
86196
+ var metadataToSend = generateMetadataToSend(metadata);
86197
+ return this.logSearchEvent(exports.SearchPageEvents.recentQueryClick, metadataToSend);
86198
+ }
86199
+ return this.logSearchEvent(exports.SearchPageEvents.recentQueryClick);
86200
+ };
86201
+ CoveoInsightClient.prototype.logClearRecentQueries = function (metadata) {
86202
+ if (metadata) {
86203
+ var metadataToSend = generateMetadataToSend(metadata);
86204
+ return this.logCustomEvent(exports.SearchPageEvents.clearRecentQueries, metadataToSend);
86205
+ }
86206
+ return this.logCustomEvent(exports.SearchPageEvents.clearRecentQueries);
86207
+ };
86100
86208
  CoveoInsightClient.prototype.logInterfaceChange = function (metadata) {
86101
86209
  var metadataToSend = generateMetadataToSend(metadata);
86102
86210
  return this.logSearchEvent(exports.SearchPageEvents.interfaceChange, metadataToSend);
@@ -86428,15 +86536,15 @@ var CoveoInsightClient = (function () {
86428
86536
  });
86429
86537
  };
86430
86538
  CoveoInsightClient.prototype.getBaseSearchEventRequest = function (event, metadata) {
86431
- var _a, _b;
86432
86539
  return __awaiter(this, void 0, void 0, function () {
86433
- var _c;
86540
+ var _a;
86541
+ var _b, _c;
86434
86542
  return __generator(this, function (_d) {
86435
86543
  switch (_d.label) {
86436
86544
  case 0:
86437
- _c = [{}];
86438
- return [4, this.getBaseEventRequest(__assign(__assign({}, metadata), (_b = (_a = this.provider).getGeneratedAnswerMetadata) === null || _b === void 0 ? void 0 : _b.call(_a)))];
86439
- case 1: return [2, __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_d.sent())])), this.provider.getSearchEventRequestPayload()]), { searchQueryUid: this.provider.getSearchUID(), queryPipeline: this.provider.getPipeline(), actionCause: event }])];
86545
+ _a = [{}];
86546
+ return [4, this.getBaseEventRequest(__assign(__assign({}, metadata), (_c = (_b = this.provider).getGeneratedAnswerMetadata) === null || _c === void 0 ? void 0 : _c.call(_b)))];
86547
+ case 1: return [2, __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_d.sent())])), this.provider.getSearchEventRequestPayload()]), { searchQueryUid: this.provider.getSearchUID(), queryPipeline: this.provider.getPipeline(), actionCause: event }])];
86440
86548
  }
86441
86549
  });
86442
86550
  });