coveo.analytics 2.20.24 → 2.20.26

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/dist/library.js CHANGED
@@ -83745,275 +83745,504 @@ var CoveoSearchPageClient = (function () {
83745
83745
  CoveoSearchPageClient.prototype.enable = function () {
83746
83746
  this.coveoAnalyticsClient = new CoveoAnalyticsClient(this.opts);
83747
83747
  };
83748
+ CoveoSearchPageClient.prototype.makeInterfaceLoad = function () {
83749
+ return this.makeSearchEvent(SearchPageEvents.interfaceLoad);
83750
+ };
83748
83751
  CoveoSearchPageClient.prototype.logInterfaceLoad = function () {
83749
- return this.logSearchEvent(SearchPageEvents.interfaceLoad);
83752
+ return this.makeInterfaceLoad().log();
83753
+ };
83754
+ CoveoSearchPageClient.prototype.makeRecommendationInterfaceLoad = function () {
83755
+ return this.makeSearchEvent(SearchPageEvents.recommendationInterfaceLoad);
83750
83756
  };
83751
83757
  CoveoSearchPageClient.prototype.logRecommendationInterfaceLoad = function () {
83752
- return this.logSearchEvent(SearchPageEvents.recommendationInterfaceLoad);
83758
+ return this.makeRecommendationInterfaceLoad().log();
83759
+ };
83760
+ CoveoSearchPageClient.prototype.makeRecommendation = function () {
83761
+ return this.makeCustomEvent(SearchPageEvents.recommendation);
83753
83762
  };
83754
83763
  CoveoSearchPageClient.prototype.logRecommendation = function () {
83755
- return this.logCustomEvent(SearchPageEvents.recommendation);
83764
+ return this.makeRecommendation().log();
83765
+ };
83766
+ CoveoSearchPageClient.prototype.makeRecommendationOpen = function (info, identifier) {
83767
+ return this.makeClickEvent(SearchPageEvents.recommendationOpen, info, identifier);
83756
83768
  };
83757
83769
  CoveoSearchPageClient.prototype.logRecommendationOpen = function (info, identifier) {
83758
- return this.logClickEvent(SearchPageEvents.recommendationOpen, info, identifier);
83770
+ return this.makeRecommendationOpen(info, identifier).log();
83771
+ };
83772
+ CoveoSearchPageClient.prototype.makeStaticFilterClearAll = function (meta) {
83773
+ return this.makeSearchEvent(SearchPageEvents.staticFilterClearAll, meta);
83759
83774
  };
83760
83775
  CoveoSearchPageClient.prototype.logStaticFilterClearAll = function (meta) {
83761
- return this.logSearchEvent(SearchPageEvents.staticFilterClearAll, meta);
83776
+ return this.makeStaticFilterClearAll(meta).log();
83777
+ };
83778
+ CoveoSearchPageClient.prototype.makeStaticFilterSelect = function (meta) {
83779
+ return this.makeSearchEvent(SearchPageEvents.staticFilterSelect, meta);
83762
83780
  };
83763
83781
  CoveoSearchPageClient.prototype.logStaticFilterSelect = function (meta) {
83764
- return this.logSearchEvent(SearchPageEvents.staticFilterSelect, meta);
83782
+ return this.makeStaticFilterSelect(meta).log();
83783
+ };
83784
+ CoveoSearchPageClient.prototype.makeStaticFilterDeselect = function (meta) {
83785
+ return this.makeSearchEvent(SearchPageEvents.staticFilterDeselect, meta);
83765
83786
  };
83766
83787
  CoveoSearchPageClient.prototype.logStaticFilterDeselect = function (meta) {
83767
- return this.logSearchEvent(SearchPageEvents.staticFilterDeselect, meta);
83788
+ return this.makeStaticFilterDeselect(meta).log();
83789
+ };
83790
+ CoveoSearchPageClient.prototype.makeFetchMoreResults = function () {
83791
+ return this.makeCustomEvent(SearchPageEvents.pagerScrolling, { type: 'getMoreResults' });
83768
83792
  };
83769
83793
  CoveoSearchPageClient.prototype.logFetchMoreResults = function () {
83770
- return this.logCustomEvent(SearchPageEvents.pagerScrolling, { type: 'getMoreResults' });
83794
+ return this.makeFetchMoreResults().log();
83795
+ };
83796
+ CoveoSearchPageClient.prototype.makeInterfaceChange = function (metadata) {
83797
+ return this.makeSearchEvent(SearchPageEvents.interfaceChange, metadata);
83771
83798
  };
83772
83799
  CoveoSearchPageClient.prototype.logInterfaceChange = function (metadata) {
83773
- return this.logSearchEvent(SearchPageEvents.interfaceChange, metadata);
83800
+ return this.makeInterfaceChange(metadata).log();
83801
+ };
83802
+ CoveoSearchPageClient.prototype.makeDidYouMeanAutomatic = function () {
83803
+ return this.makeSearchEvent(SearchPageEvents.didyoumeanAutomatic);
83774
83804
  };
83775
83805
  CoveoSearchPageClient.prototype.logDidYouMeanAutomatic = function () {
83776
- return this.logSearchEvent(SearchPageEvents.didyoumeanAutomatic);
83806
+ return this.makeDidYouMeanAutomatic().log();
83807
+ };
83808
+ CoveoSearchPageClient.prototype.makeDidYouMeanClick = function () {
83809
+ return this.makeSearchEvent(SearchPageEvents.didyoumeanClick);
83777
83810
  };
83778
83811
  CoveoSearchPageClient.prototype.logDidYouMeanClick = function () {
83779
- return this.logSearchEvent(SearchPageEvents.didyoumeanClick);
83812
+ return this.makeDidYouMeanClick().log();
83813
+ };
83814
+ CoveoSearchPageClient.prototype.makeResultsSort = function (metadata) {
83815
+ return this.makeSearchEvent(SearchPageEvents.resultsSort, metadata);
83780
83816
  };
83781
83817
  CoveoSearchPageClient.prototype.logResultsSort = function (metadata) {
83782
- return this.logSearchEvent(SearchPageEvents.resultsSort, metadata);
83818
+ return this.makeResultsSort(metadata).log();
83819
+ };
83820
+ CoveoSearchPageClient.prototype.makeSearchboxSubmit = function () {
83821
+ return this.makeSearchEvent(SearchPageEvents.searchboxSubmit);
83783
83822
  };
83784
83823
  CoveoSearchPageClient.prototype.logSearchboxSubmit = function () {
83785
- return this.logSearchEvent(SearchPageEvents.searchboxSubmit);
83824
+ return this.makeSearchboxSubmit().log();
83825
+ };
83826
+ CoveoSearchPageClient.prototype.makeSearchboxClear = function () {
83827
+ return this.makeSearchEvent(SearchPageEvents.searchboxClear);
83786
83828
  };
83787
83829
  CoveoSearchPageClient.prototype.logSearchboxClear = function () {
83788
- return this.logSearchEvent(SearchPageEvents.searchboxClear);
83830
+ return this.makeSearchboxClear().log();
83831
+ };
83832
+ CoveoSearchPageClient.prototype.makeSearchboxAsYouType = function () {
83833
+ return this.makeSearchEvent(SearchPageEvents.searchboxAsYouType);
83789
83834
  };
83790
83835
  CoveoSearchPageClient.prototype.logSearchboxAsYouType = function () {
83791
- return this.logSearchEvent(SearchPageEvents.searchboxAsYouType);
83836
+ return this.makeSearchboxAsYouType().log();
83837
+ };
83838
+ CoveoSearchPageClient.prototype.makeBreadcrumbFacet = function (metadata) {
83839
+ return this.makeSearchEvent(SearchPageEvents.breadcrumbFacet, metadata);
83792
83840
  };
83793
83841
  CoveoSearchPageClient.prototype.logBreadcrumbFacet = function (metadata) {
83794
- return this.logSearchEvent(SearchPageEvents.breadcrumbFacet, metadata);
83842
+ return this.makeBreadcrumbFacet(metadata).log();
83843
+ };
83844
+ CoveoSearchPageClient.prototype.makeBreadcrumbResetAll = function () {
83845
+ return this.makeSearchEvent(SearchPageEvents.breadcrumbResetAll);
83795
83846
  };
83796
83847
  CoveoSearchPageClient.prototype.logBreadcrumbResetAll = function () {
83797
- return this.logSearchEvent(SearchPageEvents.breadcrumbResetAll);
83848
+ return this.makeBreadcrumbResetAll().log();
83849
+ };
83850
+ CoveoSearchPageClient.prototype.makeDocumentQuickview = function (info, identifier) {
83851
+ return this.makeClickEvent(SearchPageEvents.documentQuickview, info, identifier);
83798
83852
  };
83799
83853
  CoveoSearchPageClient.prototype.logDocumentQuickview = function (info, identifier) {
83800
- return this.logClickEvent(SearchPageEvents.documentQuickview, info, identifier);
83854
+ return this.makeDocumentQuickview(info, identifier).log();
83855
+ };
83856
+ CoveoSearchPageClient.prototype.makeDocumentOpen = function (info, identifier) {
83857
+ return this.makeClickEvent(SearchPageEvents.documentOpen, info, identifier);
83801
83858
  };
83802
83859
  CoveoSearchPageClient.prototype.logDocumentOpen = function (info, identifier) {
83803
- return this.logClickEvent(SearchPageEvents.documentOpen, info, identifier);
83860
+ return this.makeDocumentOpen(info, identifier).log();
83861
+ };
83862
+ CoveoSearchPageClient.prototype.makeOmniboxAnalytics = function (meta) {
83863
+ return this.makeSearchEvent(SearchPageEvents.omniboxAnalytics, formatOmniboxMetadata(meta));
83804
83864
  };
83805
83865
  CoveoSearchPageClient.prototype.logOmniboxAnalytics = function (meta) {
83806
- return this.logSearchEvent(SearchPageEvents.omniboxAnalytics, formatOmniboxMetadata(meta));
83866
+ return this.makeOmniboxAnalytics(meta).log();
83867
+ };
83868
+ CoveoSearchPageClient.prototype.makeOmniboxFromLink = function (meta) {
83869
+ return this.makeSearchEvent(SearchPageEvents.omniboxFromLink, formatOmniboxMetadata(meta));
83807
83870
  };
83808
83871
  CoveoSearchPageClient.prototype.logOmniboxFromLink = function (meta) {
83809
- return this.logSearchEvent(SearchPageEvents.omniboxFromLink, formatOmniboxMetadata(meta));
83872
+ return this.makeOmniboxFromLink(meta).log();
83873
+ };
83874
+ CoveoSearchPageClient.prototype.makeSearchFromLink = function () {
83875
+ return this.makeSearchEvent(SearchPageEvents.searchFromLink);
83810
83876
  };
83811
83877
  CoveoSearchPageClient.prototype.logSearchFromLink = function () {
83812
- return this.logSearchEvent(SearchPageEvents.searchFromLink);
83878
+ return this.makeSearchFromLink().log();
83879
+ };
83880
+ CoveoSearchPageClient.prototype.makeTriggerNotify = function (meta) {
83881
+ return this.makeCustomEvent(SearchPageEvents.triggerNotify, meta);
83813
83882
  };
83814
83883
  CoveoSearchPageClient.prototype.logTriggerNotify = function (meta) {
83815
- return this.logCustomEvent(SearchPageEvents.triggerNotify, meta);
83884
+ return this.makeTriggerNotify(meta).log();
83885
+ };
83886
+ CoveoSearchPageClient.prototype.makeTriggerExecute = function (meta) {
83887
+ return this.makeCustomEvent(SearchPageEvents.triggerExecute, meta);
83816
83888
  };
83817
83889
  CoveoSearchPageClient.prototype.logTriggerExecute = function (meta) {
83818
- return this.logCustomEvent(SearchPageEvents.triggerExecute, meta);
83890
+ return this.makeTriggerExecute(meta).log();
83891
+ };
83892
+ CoveoSearchPageClient.prototype.makeTriggerQuery = function () {
83893
+ return this.makeCustomEvent(SearchPageEvents.triggerQuery, { query: this.provider.getSearchEventRequestPayload().queryText }, 'queryPipelineTriggers');
83819
83894
  };
83820
83895
  CoveoSearchPageClient.prototype.logTriggerQuery = function () {
83821
- var meta = { query: this.provider.getSearchEventRequestPayload().queryText };
83822
- return this.logCustomEvent(SearchPageEvents.triggerQuery, meta, 'queryPipelineTriggers');
83896
+ return this.makeTriggerQuery().log();
83897
+ };
83898
+ CoveoSearchPageClient.prototype.makeUndoTriggerQuery = function (meta) {
83899
+ return this.makeSearchEvent(SearchPageEvents.undoTriggerQuery, meta);
83823
83900
  };
83824
83901
  CoveoSearchPageClient.prototype.logUndoTriggerQuery = function (meta) {
83825
- return this.logSearchEvent(SearchPageEvents.undoTriggerQuery, meta);
83902
+ return this.makeUndoTriggerQuery(meta).log();
83903
+ };
83904
+ CoveoSearchPageClient.prototype.makeTriggerRedirect = function (meta) {
83905
+ return this.makeCustomEvent(SearchPageEvents.triggerRedirect, __assign(__assign({}, meta), { query: this.provider.getSearchEventRequestPayload().queryText }));
83826
83906
  };
83827
83907
  CoveoSearchPageClient.prototype.logTriggerRedirect = function (meta) {
83828
- var allMeta = __assign(__assign({}, meta), { query: this.provider.getSearchEventRequestPayload().queryText });
83829
- return this.logCustomEvent(SearchPageEvents.triggerRedirect, allMeta);
83908
+ return this.makeTriggerRedirect(meta).log();
83909
+ };
83910
+ CoveoSearchPageClient.prototype.makePagerResize = function (meta) {
83911
+ return this.makeCustomEvent(SearchPageEvents.pagerResize, meta);
83830
83912
  };
83831
83913
  CoveoSearchPageClient.prototype.logPagerResize = function (meta) {
83832
- return this.logCustomEvent(SearchPageEvents.pagerResize, meta);
83914
+ return this.makePagerResize(meta).log();
83915
+ };
83916
+ CoveoSearchPageClient.prototype.makePagerNumber = function (meta) {
83917
+ return this.makeCustomEvent(SearchPageEvents.pagerNumber, meta);
83833
83918
  };
83834
83919
  CoveoSearchPageClient.prototype.logPagerNumber = function (meta) {
83835
- return this.logCustomEvent(SearchPageEvents.pagerNumber, meta);
83920
+ return this.makePagerNumber(meta).log();
83921
+ };
83922
+ CoveoSearchPageClient.prototype.makePagerNext = function (meta) {
83923
+ return this.makeCustomEvent(SearchPageEvents.pagerNext, meta);
83836
83924
  };
83837
83925
  CoveoSearchPageClient.prototype.logPagerNext = function (meta) {
83838
- return this.logCustomEvent(SearchPageEvents.pagerNext, meta);
83926
+ return this.makePagerNext(meta).log();
83927
+ };
83928
+ CoveoSearchPageClient.prototype.makePagerPrevious = function (meta) {
83929
+ return this.makeCustomEvent(SearchPageEvents.pagerPrevious, meta);
83839
83930
  };
83840
83931
  CoveoSearchPageClient.prototype.logPagerPrevious = function (meta) {
83841
- return this.logCustomEvent(SearchPageEvents.pagerPrevious, meta);
83932
+ return this.makePagerPrevious(meta).log();
83933
+ };
83934
+ CoveoSearchPageClient.prototype.makePagerScrolling = function () {
83935
+ return this.makeCustomEvent(SearchPageEvents.pagerScrolling);
83842
83936
  };
83843
83937
  CoveoSearchPageClient.prototype.logPagerScrolling = function () {
83844
- return this.logCustomEvent(SearchPageEvents.pagerScrolling);
83938
+ return this.makePagerScrolling().log();
83939
+ };
83940
+ CoveoSearchPageClient.prototype.makeFacetClearAll = function (meta) {
83941
+ return this.makeSearchEvent(SearchPageEvents.facetClearAll, meta);
83845
83942
  };
83846
83943
  CoveoSearchPageClient.prototype.logFacetClearAll = function (meta) {
83847
- return this.logSearchEvent(SearchPageEvents.facetClearAll, meta);
83944
+ return this.makeFacetClearAll(meta).log();
83945
+ };
83946
+ CoveoSearchPageClient.prototype.makeFacetSearch = function (meta) {
83947
+ return this.makeSearchEvent(SearchPageEvents.facetSearch, meta);
83848
83948
  };
83849
83949
  CoveoSearchPageClient.prototype.logFacetSearch = function (meta) {
83850
- return this.logSearchEvent(SearchPageEvents.facetSearch, meta);
83950
+ return this.makeFacetSearch(meta).log();
83951
+ };
83952
+ CoveoSearchPageClient.prototype.makeFacetSelect = function (meta) {
83953
+ return this.makeSearchEvent(SearchPageEvents.facetSelect, meta);
83851
83954
  };
83852
83955
  CoveoSearchPageClient.prototype.logFacetSelect = function (meta) {
83853
- return this.logSearchEvent(SearchPageEvents.facetSelect, meta);
83956
+ return this.makeFacetSelect(meta).log();
83957
+ };
83958
+ CoveoSearchPageClient.prototype.makeFacetDeselect = function (meta) {
83959
+ return this.makeSearchEvent(SearchPageEvents.facetDeselect, meta);
83854
83960
  };
83855
83961
  CoveoSearchPageClient.prototype.logFacetDeselect = function (meta) {
83856
- return this.logSearchEvent(SearchPageEvents.facetDeselect, meta);
83962
+ return this.makeFacetDeselect(meta).log();
83963
+ };
83964
+ CoveoSearchPageClient.prototype.makeFacetExclude = function (meta) {
83965
+ return this.makeSearchEvent(SearchPageEvents.facetExclude, meta);
83857
83966
  };
83858
83967
  CoveoSearchPageClient.prototype.logFacetExclude = function (meta) {
83859
- return this.logSearchEvent(SearchPageEvents.facetExclude, meta);
83968
+ return this.makeFacetExclude(meta).log();
83969
+ };
83970
+ CoveoSearchPageClient.prototype.makeFacetUnexclude = function (meta) {
83971
+ return this.makeSearchEvent(SearchPageEvents.facetUnexclude, meta);
83860
83972
  };
83861
83973
  CoveoSearchPageClient.prototype.logFacetUnexclude = function (meta) {
83862
- return this.logSearchEvent(SearchPageEvents.facetUnexclude, meta);
83974
+ return this.makeFacetUnexclude(meta).log();
83975
+ };
83976
+ CoveoSearchPageClient.prototype.makeFacetSelectAll = function (meta) {
83977
+ return this.makeSearchEvent(SearchPageEvents.facetSelectAll, meta);
83863
83978
  };
83864
83979
  CoveoSearchPageClient.prototype.logFacetSelectAll = function (meta) {
83865
- return this.logSearchEvent(SearchPageEvents.facetSelectAll, meta);
83980
+ return this.makeFacetSelectAll(meta).log();
83981
+ };
83982
+ CoveoSearchPageClient.prototype.makeFacetUpdateSort = function (meta) {
83983
+ return this.makeSearchEvent(SearchPageEvents.facetUpdateSort, meta);
83866
83984
  };
83867
83985
  CoveoSearchPageClient.prototype.logFacetUpdateSort = function (meta) {
83868
- return this.logSearchEvent(SearchPageEvents.facetUpdateSort, meta);
83986
+ return this.makeFacetUpdateSort(meta).log();
83987
+ };
83988
+ CoveoSearchPageClient.prototype.makeFacetShowMore = function (meta) {
83989
+ return this.makeCustomEvent(SearchPageEvents.facetShowMore, meta);
83869
83990
  };
83870
83991
  CoveoSearchPageClient.prototype.logFacetShowMore = function (meta) {
83871
- return this.logCustomEvent(SearchPageEvents.facetShowMore, meta);
83992
+ return this.makeFacetShowMore(meta).log();
83993
+ };
83994
+ CoveoSearchPageClient.prototype.makeFacetShowLess = function (meta) {
83995
+ return this.makeCustomEvent(SearchPageEvents.facetShowLess, meta);
83872
83996
  };
83873
83997
  CoveoSearchPageClient.prototype.logFacetShowLess = function (meta) {
83874
- return this.logCustomEvent(SearchPageEvents.facetShowLess, meta);
83998
+ return this.makeFacetShowLess(meta).log();
83999
+ };
84000
+ CoveoSearchPageClient.prototype.makeQueryError = function (meta) {
84001
+ return this.makeCustomEvent(SearchPageEvents.queryError, meta);
83875
84002
  };
83876
84003
  CoveoSearchPageClient.prototype.logQueryError = function (meta) {
83877
- return this.logCustomEvent(SearchPageEvents.queryError, meta);
84004
+ return this.makeQueryError(meta).log();
84005
+ };
84006
+ CoveoSearchPageClient.prototype.makeQueryErrorBack = function () {
84007
+ var _this = this;
84008
+ return {
84009
+ description: this.makeDescription(SearchPageEvents.queryErrorBack),
84010
+ log: function () { return __awaiter(_this, void 0, void 0, function () {
84011
+ return __generator(this, function (_a) {
84012
+ switch (_a.label) {
84013
+ case 0: return [4, this.logCustomEvent(SearchPageEvents.queryErrorBack)];
84014
+ case 1:
84015
+ _a.sent();
84016
+ return [2, this.logSearchEvent(SearchPageEvents.queryErrorBack)];
84017
+ }
84018
+ });
84019
+ }); },
84020
+ };
83878
84021
  };
83879
84022
  CoveoSearchPageClient.prototype.logQueryErrorBack = function () {
83880
- return __awaiter(this, void 0, void 0, function () {
83881
- return __generator(this, function (_a) {
83882
- switch (_a.label) {
83883
- case 0: return [4, this.logCustomEvent(SearchPageEvents.queryErrorBack)];
83884
- case 1:
83885
- _a.sent();
83886
- return [2, this.logSearchEvent(SearchPageEvents.queryErrorBack)];
83887
- }
83888
- });
83889
- });
84023
+ return this.makeQueryErrorBack().log();
84024
+ };
84025
+ CoveoSearchPageClient.prototype.makeQueryErrorRetry = function () {
84026
+ var _this = this;
84027
+ return {
84028
+ description: this.makeDescription(SearchPageEvents.queryErrorRetry),
84029
+ log: function () { return __awaiter(_this, void 0, void 0, function () {
84030
+ return __generator(this, function (_a) {
84031
+ switch (_a.label) {
84032
+ case 0: return [4, this.logCustomEvent(SearchPageEvents.queryErrorRetry)];
84033
+ case 1:
84034
+ _a.sent();
84035
+ return [2, this.logSearchEvent(SearchPageEvents.queryErrorRetry)];
84036
+ }
84037
+ });
84038
+ }); },
84039
+ };
83890
84040
  };
83891
84041
  CoveoSearchPageClient.prototype.logQueryErrorRetry = function () {
83892
- return __awaiter(this, void 0, void 0, function () {
83893
- return __generator(this, function (_a) {
83894
- switch (_a.label) {
83895
- case 0: return [4, this.logCustomEvent(SearchPageEvents.queryErrorRetry)];
83896
- case 1:
83897
- _a.sent();
83898
- return [2, this.logSearchEvent(SearchPageEvents.queryErrorRetry)];
83899
- }
83900
- });
83901
- });
84042
+ return this.makeQueryErrorRetry().log();
84043
+ };
84044
+ CoveoSearchPageClient.prototype.makeQueryErrorClear = function () {
84045
+ var _this = this;
84046
+ return {
84047
+ description: this.makeDescription(SearchPageEvents.queryErrorClear),
84048
+ log: function () { return __awaiter(_this, void 0, void 0, function () {
84049
+ return __generator(this, function (_a) {
84050
+ switch (_a.label) {
84051
+ case 0: return [4, this.logCustomEvent(SearchPageEvents.queryErrorClear)];
84052
+ case 1:
84053
+ _a.sent();
84054
+ return [2, this.logSearchEvent(SearchPageEvents.queryErrorClear)];
84055
+ }
84056
+ });
84057
+ }); },
84058
+ };
83902
84059
  };
83903
84060
  CoveoSearchPageClient.prototype.logQueryErrorClear = function () {
83904
- return __awaiter(this, void 0, void 0, function () {
83905
- return __generator(this, function (_a) {
83906
- switch (_a.label) {
83907
- case 0: return [4, this.logCustomEvent(SearchPageEvents.queryErrorClear)];
83908
- case 1:
83909
- _a.sent();
83910
- return [2, this.logSearchEvent(SearchPageEvents.queryErrorClear)];
83911
- }
83912
- });
83913
- });
84061
+ return this.makeQueryErrorClear().log();
84062
+ };
84063
+ CoveoSearchPageClient.prototype.makeLikeSmartSnippet = function () {
84064
+ return this.makeCustomEvent(SearchPageEvents.likeSmartSnippet);
83914
84065
  };
83915
84066
  CoveoSearchPageClient.prototype.logLikeSmartSnippet = function () {
83916
- return this.logCustomEvent(SearchPageEvents.likeSmartSnippet);
84067
+ return this.makeLikeSmartSnippet().log();
84068
+ };
84069
+ CoveoSearchPageClient.prototype.makeDislikeSmartSnippet = function () {
84070
+ return this.makeCustomEvent(SearchPageEvents.dislikeSmartSnippet);
83917
84071
  };
83918
84072
  CoveoSearchPageClient.prototype.logDislikeSmartSnippet = function () {
83919
- return this.logCustomEvent(SearchPageEvents.dislikeSmartSnippet);
84073
+ return this.makeDislikeSmartSnippet().log();
84074
+ };
84075
+ CoveoSearchPageClient.prototype.makeExpandSmartSnippet = function () {
84076
+ return this.makeCustomEvent(SearchPageEvents.expandSmartSnippet);
83920
84077
  };
83921
84078
  CoveoSearchPageClient.prototype.logExpandSmartSnippet = function () {
83922
- return this.logCustomEvent(SearchPageEvents.expandSmartSnippet);
84079
+ return this.makeExpandSmartSnippet().log();
84080
+ };
84081
+ CoveoSearchPageClient.prototype.makeCollapseSmartSnippet = function () {
84082
+ return this.makeCustomEvent(SearchPageEvents.collapseSmartSnippet);
83923
84083
  };
83924
84084
  CoveoSearchPageClient.prototype.logCollapseSmartSnippet = function () {
83925
- return this.logCustomEvent(SearchPageEvents.collapseSmartSnippet);
84085
+ return this.makeCollapseSmartSnippet().log();
84086
+ };
84087
+ CoveoSearchPageClient.prototype.makeOpenSmartSnippetFeedbackModal = function () {
84088
+ return this.makeCustomEvent(SearchPageEvents.openSmartSnippetFeedbackModal);
83926
84089
  };
83927
84090
  CoveoSearchPageClient.prototype.logOpenSmartSnippetFeedbackModal = function () {
83928
- return this.logCustomEvent(SearchPageEvents.openSmartSnippetFeedbackModal);
84091
+ return this.makeOpenSmartSnippetFeedbackModal().log();
84092
+ };
84093
+ CoveoSearchPageClient.prototype.makeCloseSmartSnippetFeedbackModal = function () {
84094
+ return this.makeCustomEvent(SearchPageEvents.closeSmartSnippetFeedbackModal);
83929
84095
  };
83930
84096
  CoveoSearchPageClient.prototype.logCloseSmartSnippetFeedbackModal = function () {
83931
- return this.logCustomEvent(SearchPageEvents.closeSmartSnippetFeedbackModal);
84097
+ return this.makeCloseSmartSnippetFeedbackModal().log();
84098
+ };
84099
+ CoveoSearchPageClient.prototype.makeSmartSnippetFeedbackReason = function (reason, details) {
84100
+ return this.makeCustomEvent(SearchPageEvents.sendSmartSnippetReason, { reason: reason, details: details });
83932
84101
  };
83933
84102
  CoveoSearchPageClient.prototype.logSmartSnippetFeedbackReason = function (reason, details) {
83934
- return this.logCustomEvent(SearchPageEvents.sendSmartSnippetReason, { reason: reason, details: details });
84103
+ return this.makeSmartSnippetFeedbackReason(reason, details).log();
84104
+ };
84105
+ CoveoSearchPageClient.prototype.makeExpandSmartSnippetSuggestion = function (snippet) {
84106
+ return this.makeCustomEvent(SearchPageEvents.expandSmartSnippetSuggestion, 'documentId' in snippet ? snippet : { documentId: snippet });
83935
84107
  };
83936
84108
  CoveoSearchPageClient.prototype.logExpandSmartSnippetSuggestion = function (snippet) {
83937
- return this.logCustomEvent(SearchPageEvents.expandSmartSnippetSuggestion, 'documentId' in snippet ? snippet : { documentId: snippet });
84109
+ return this.makeExpandSmartSnippetSuggestion(snippet).log();
84110
+ };
84111
+ CoveoSearchPageClient.prototype.makeCollapseSmartSnippetSuggestion = function (snippet) {
84112
+ return this.makeCustomEvent(SearchPageEvents.collapseSmartSnippetSuggestion, 'documentId' in snippet ? snippet : { documentId: snippet });
83938
84113
  };
83939
84114
  CoveoSearchPageClient.prototype.logCollapseSmartSnippetSuggestion = function (snippet) {
83940
- return this.logCustomEvent(SearchPageEvents.collapseSmartSnippetSuggestion, 'documentId' in snippet ? snippet : { documentId: snippet });
84115
+ return this.makeCollapseSmartSnippetSuggestion(snippet).log();
84116
+ };
84117
+ CoveoSearchPageClient.prototype.makeShowMoreSmartSnippetSuggestion = function (snippet) {
84118
+ return this.makeCustomEvent(SearchPageEvents.showMoreSmartSnippetSuggestion, snippet);
83941
84119
  };
83942
84120
  CoveoSearchPageClient.prototype.logShowMoreSmartSnippetSuggestion = function (snippet) {
83943
- return this.logCustomEvent(SearchPageEvents.showMoreSmartSnippetSuggestion, snippet);
84121
+ return this.makeShowMoreSmartSnippetSuggestion(snippet).log();
84122
+ };
84123
+ CoveoSearchPageClient.prototype.makeShowLessSmartSnippetSuggestion = function (snippet) {
84124
+ return this.makeCustomEvent(SearchPageEvents.showLessSmartSnippetSuggestion, snippet);
83944
84125
  };
83945
84126
  CoveoSearchPageClient.prototype.logShowLessSmartSnippetSuggestion = function (snippet) {
83946
- return this.logCustomEvent(SearchPageEvents.showLessSmartSnippetSuggestion, snippet);
84127
+ return this.makeShowLessSmartSnippetSuggestion(snippet).log();
84128
+ };
84129
+ CoveoSearchPageClient.prototype.makeOpenSmartSnippetSource = function (info, identifier) {
84130
+ return this.makeClickEvent(SearchPageEvents.openSmartSnippetSource, info, identifier);
83947
84131
  };
83948
84132
  CoveoSearchPageClient.prototype.logOpenSmartSnippetSource = function (info, identifier) {
83949
- return this.logClickEvent(SearchPageEvents.openSmartSnippetSource, info, identifier);
84133
+ return this.makeOpenSmartSnippetSource(info, identifier).log();
84134
+ };
84135
+ CoveoSearchPageClient.prototype.makeOpenSmartSnippetSuggestionSource = function (info, snippet) {
84136
+ return this.makeClickEvent(SearchPageEvents.openSmartSnippetSuggestionSource, info, { contentIDKey: snippet.documentId.contentIdKey, contentIDValue: snippet.documentId.contentIdValue }, snippet);
83950
84137
  };
83951
84138
  CoveoSearchPageClient.prototype.logOpenSmartSnippetSuggestionSource = function (info, snippet) {
83952
- return this.logClickEvent(SearchPageEvents.openSmartSnippetSuggestionSource, info, { contentIDKey: snippet.documentId.contentIdKey, contentIDValue: snippet.documentId.contentIdValue }, snippet);
84139
+ return this.makeOpenSmartSnippetSuggestionSource(info, snippet).log();
84140
+ };
84141
+ CoveoSearchPageClient.prototype.makeOpenSmartSnippetInlineLink = function (info, identifierAndLink) {
84142
+ return this.makeClickEvent(SearchPageEvents.openSmartSnippetInlineLink, info, { contentIDKey: identifierAndLink.contentIDKey, contentIDValue: identifierAndLink.contentIDValue }, identifierAndLink);
83953
84143
  };
83954
84144
  CoveoSearchPageClient.prototype.logOpenSmartSnippetInlineLink = function (info, identifierAndLink) {
83955
- return this.logClickEvent(SearchPageEvents.openSmartSnippetInlineLink, info, { contentIDKey: identifierAndLink.contentIDKey, contentIDValue: identifierAndLink.contentIDValue }, identifierAndLink);
84145
+ return this.makeOpenSmartSnippetInlineLink(info, identifierAndLink).log();
83956
84146
  };
83957
- CoveoSearchPageClient.prototype.logOpenSmartSnippetSuggestionInlineLink = function (info, snippetAndLink) {
83958
- return this.logClickEvent(SearchPageEvents.openSmartSnippetSuggestionInlineLink, info, {
84147
+ CoveoSearchPageClient.prototype.makeOpenSmartSnippetSuggestionInlineLink = function (info, snippetAndLink) {
84148
+ return this.makeClickEvent(SearchPageEvents.openSmartSnippetSuggestionInlineLink, info, {
83959
84149
  contentIDKey: snippetAndLink.documentId.contentIdKey,
83960
84150
  contentIDValue: snippetAndLink.documentId.contentIdValue,
83961
84151
  }, snippetAndLink);
83962
84152
  };
84153
+ CoveoSearchPageClient.prototype.logOpenSmartSnippetSuggestionInlineLink = function (info, snippetAndLink) {
84154
+ return this.makeOpenSmartSnippetSuggestionInlineLink(info, snippetAndLink).log();
84155
+ };
84156
+ CoveoSearchPageClient.prototype.makeRecentQueryClick = function () {
84157
+ return this.makeSearchEvent(SearchPageEvents.recentQueryClick);
84158
+ };
83963
84159
  CoveoSearchPageClient.prototype.logRecentQueryClick = function () {
83964
- return this.logSearchEvent(SearchPageEvents.recentQueryClick);
84160
+ return this.makeRecentQueryClick().log();
84161
+ };
84162
+ CoveoSearchPageClient.prototype.makeClearRecentQueries = function () {
84163
+ return this.makeCustomEvent(SearchPageEvents.clearRecentQueries);
83965
84164
  };
83966
84165
  CoveoSearchPageClient.prototype.logClearRecentQueries = function () {
83967
- return this.logCustomEvent(SearchPageEvents.clearRecentQueries);
84166
+ return this.makeClearRecentQueries().log();
84167
+ };
84168
+ CoveoSearchPageClient.prototype.makeRecentResultClick = function (info, identifier) {
84169
+ return this.makeCustomEvent(SearchPageEvents.recentResultClick, { info: info, identifier: identifier });
83968
84170
  };
83969
84171
  CoveoSearchPageClient.prototype.logRecentResultClick = function (info, identifier) {
83970
- return this.logCustomEvent(SearchPageEvents.recentResultClick, { info: info, identifier: identifier });
84172
+ return this.makeRecentResultClick(info, identifier).log();
84173
+ };
84174
+ CoveoSearchPageClient.prototype.makeClearRecentResults = function () {
84175
+ return this.makeCustomEvent(SearchPageEvents.clearRecentResults);
83971
84176
  };
83972
84177
  CoveoSearchPageClient.prototype.logClearRecentResults = function () {
83973
- return this.logCustomEvent(SearchPageEvents.clearRecentResults);
84178
+ return this.makeClearRecentResults().log();
84179
+ };
84180
+ CoveoSearchPageClient.prototype.makeNoResultsBack = function () {
84181
+ return this.makeSearchEvent(SearchPageEvents.noResultsBack);
83974
84182
  };
83975
84183
  CoveoSearchPageClient.prototype.logNoResultsBack = function () {
83976
- return this.logSearchEvent(SearchPageEvents.noResultsBack);
84184
+ return this.makeNoResultsBack().log();
84185
+ };
84186
+ CoveoSearchPageClient.prototype.makeShowMoreFoldedResults = function (info, identifier) {
84187
+ return this.makeClickEvent(SearchPageEvents.showMoreFoldedResults, info, identifier);
83977
84188
  };
83978
84189
  CoveoSearchPageClient.prototype.logShowMoreFoldedResults = function (info, identifier) {
83979
- return this.logClickEvent(SearchPageEvents.showMoreFoldedResults, info, identifier);
84190
+ return this.makeShowMoreFoldedResults(info, identifier).log();
84191
+ };
84192
+ CoveoSearchPageClient.prototype.makeShowLessFoldedResults = function () {
84193
+ return this.makeCustomEvent(SearchPageEvents.showLessFoldedResults);
83980
84194
  };
83981
84195
  CoveoSearchPageClient.prototype.logShowLessFoldedResults = function () {
83982
- return this.logCustomEvent(SearchPageEvents.showLessFoldedResults);
84196
+ return this.makeShowLessFoldedResults().log();
84197
+ };
84198
+ CoveoSearchPageClient.prototype.makeCustomEvent = function (event, metadata, eventType) {
84199
+ var _this = this;
84200
+ if (eventType === void 0) { eventType = CustomEventsTypes[event]; }
84201
+ var customData = __assign(__assign({}, this.provider.getBaseMetadata()), metadata);
84202
+ return {
84203
+ description: this.makeDescription(event, metadata),
84204
+ log: function () { return __awaiter(_this, void 0, void 0, function () {
84205
+ var payload, _a;
84206
+ return __generator(this, function (_b) {
84207
+ switch (_b.label) {
84208
+ case 0:
84209
+ _a = [{}];
84210
+ return [4, this.getBaseCustomEventRequest(customData)];
84211
+ case 1:
84212
+ payload = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), { eventType: eventType, eventValue: event }]);
84213
+ return [2, this.coveoAnalyticsClient.sendCustomEvent(payload)];
84214
+ }
84215
+ });
84216
+ }); },
84217
+ };
83983
84218
  };
83984
84219
  CoveoSearchPageClient.prototype.logCustomEvent = function (event, metadata, eventType) {
83985
84220
  if (eventType === void 0) { eventType = CustomEventsTypes[event]; }
83986
- return __awaiter(this, void 0, void 0, function () {
83987
- var customData, payload, _a;
83988
- return __generator(this, function (_b) {
83989
- switch (_b.label) {
83990
- case 0:
83991
- customData = __assign(__assign({}, this.provider.getBaseMetadata()), metadata);
83992
- _a = [{}];
83993
- return [4, this.getBaseCustomEventRequest(customData)];
83994
- case 1:
83995
- payload = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), { eventType: eventType, eventValue: event }]);
83996
- return [2, this.coveoAnalyticsClient.sendCustomEvent(payload)];
83997
- }
83998
- });
83999
- });
84221
+ return this.makeCustomEvent(event, metadata, eventType).log();
84222
+ };
84223
+ CoveoSearchPageClient.prototype.makeCustomEventWithType = function (eventValue, eventType, metadata) {
84224
+ var _this = this;
84225
+ var customData = __assign(__assign({}, this.provider.getBaseMetadata()), metadata);
84226
+ return {
84227
+ description: { actionCause: eventValue, customData: customData },
84228
+ log: function () { return __awaiter(_this, void 0, void 0, function () {
84229
+ var payload, _a;
84230
+ return __generator(this, function (_b) {
84231
+ switch (_b.label) {
84232
+ case 0:
84233
+ _a = [{}];
84234
+ return [4, this.getBaseCustomEventRequest(customData)];
84235
+ case 1:
84236
+ payload = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), { eventType: eventType,
84237
+ eventValue: eventValue }]);
84238
+ return [2, this.coveoAnalyticsClient.sendCustomEvent(payload)];
84239
+ }
84240
+ });
84241
+ }); },
84242
+ };
84000
84243
  };
84001
84244
  CoveoSearchPageClient.prototype.logCustomEventWithType = function (eventValue, eventType, metadata) {
84002
- return __awaiter(this, void 0, void 0, function () {
84003
- var customData, payload, _a;
84004
- return __generator(this, function (_b) {
84005
- switch (_b.label) {
84006
- case 0:
84007
- customData = __assign(__assign({}, this.provider.getBaseMetadata()), metadata);
84008
- _a = [{}];
84009
- return [4, this.getBaseCustomEventRequest(customData)];
84010
- case 1:
84011
- payload = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), { eventType: eventType,
84012
- eventValue: eventValue }]);
84013
- return [2, this.coveoAnalyticsClient.sendCustomEvent(payload)];
84014
- }
84015
- });
84016
- });
84245
+ return this.makeCustomEventWithType(eventValue, eventType, metadata).log();
84017
84246
  };
84018
84247
  CoveoSearchPageClient.prototype.logSearchEvent = function (event, metadata) {
84019
84248
  return __awaiter(this, void 0, void 0, function () {
@@ -84028,6 +84257,16 @@ var CoveoSearchPageClient = (function () {
84028
84257
  });
84029
84258
  });
84030
84259
  };
84260
+ CoveoSearchPageClient.prototype.makeDescription = function (actionCause, metadata) {
84261
+ return { actionCause: actionCause, customData: __assign(__assign({}, this.provider.getBaseMetadata()), metadata) };
84262
+ };
84263
+ CoveoSearchPageClient.prototype.makeSearchEvent = function (event, metadata) {
84264
+ var _this = this;
84265
+ return {
84266
+ description: this.makeDescription(event, metadata),
84267
+ log: function () { return _this.logSearchEvent(event, metadata); },
84268
+ };
84269
+ };
84031
84270
  CoveoSearchPageClient.prototype.logClickEvent = function (event, info, identifier, metadata) {
84032
84271
  return __awaiter(this, void 0, void 0, function () {
84033
84272
  var payload, _a;
@@ -84043,6 +84282,13 @@ var CoveoSearchPageClient = (function () {
84043
84282
  });
84044
84283
  });
84045
84284
  };
84285
+ CoveoSearchPageClient.prototype.makeClickEvent = function (event, info, identifier, metadata) {
84286
+ var _this = this;
84287
+ return {
84288
+ description: this.makeDescription(event, __assign(__assign({}, identifier), metadata)),
84289
+ log: function () { return _this.logClickEvent(event, info, identifier, metadata); },
84290
+ };
84291
+ };
84046
84292
  CoveoSearchPageClient.prototype.getBaseSearchEventRequest = function (event, metadata) {
84047
84293
  return __awaiter(this, void 0, void 0, function () {
84048
84294
  var _a;
@@ -84221,12 +84467,24 @@ var CaseAssistClient = (function () {
84221
84467
 
84222
84468
  var extractContextFromMetadata = function (meta) {
84223
84469
  var context = {};
84224
- Object.keys(meta.caseContext).forEach(function (contextKey) {
84225
- var keyToBeSent = "context_" + contextKey;
84226
- context[keyToBeSent] = meta.caseContext[contextKey];
84227
- });
84470
+ if (meta.caseContext) {
84471
+ Object.keys(meta.caseContext).forEach(function (contextKey) {
84472
+ var _a;
84473
+ var value = (_a = meta.caseContext) === null || _a === void 0 ? void 0 : _a[contextKey];
84474
+ if (value) {
84475
+ var keyToBeSent = "context_" + contextKey;
84476
+ context[keyToBeSent] = value;
84477
+ }
84478
+ });
84479
+ }
84228
84480
  return context;
84229
84481
  };
84482
+ var generateMetadataToSend = function (metadata, includeContext) {
84483
+ if (includeContext === void 0) { includeContext = true; }
84484
+ metadata.caseContext; var caseId = metadata.caseId, caseNumber = metadata.caseNumber, metadataWithoutContext = __rest(metadata, ["caseContext", "caseId", "caseNumber"]);
84485
+ var context = extractContextFromMetadata(metadata);
84486
+ return __assign(__assign(__assign({ CaseId: caseId, CaseNumber: caseNumber }, metadataWithoutContext), (!!context.context_Case_Subject && { CaseSubject: context.context_Case_Subject })), (includeContext && context));
84487
+ };
84230
84488
  var CoveoInsightClient = (function () {
84231
84489
  function CoveoInsightClient(opts, provider) {
84232
84490
  this.opts = opts;
@@ -84243,44 +84501,111 @@ var CoveoInsightClient = (function () {
84243
84501
  CoveoInsightClient.prototype.enable = function () {
84244
84502
  this.coveoAnalyticsClient = new CoveoAnalyticsClient(this.opts);
84245
84503
  };
84246
- CoveoInsightClient.prototype.logInterfaceLoad = function () {
84504
+ CoveoInsightClient.prototype.logInterfaceLoad = function (metadata) {
84505
+ if (metadata) {
84506
+ var metadataToSend = generateMetadataToSend(metadata);
84507
+ return this.logSearchEvent(SearchPageEvents.interfaceLoad, metadataToSend);
84508
+ }
84247
84509
  return this.logSearchEvent(SearchPageEvents.interfaceLoad);
84248
84510
  };
84249
84511
  CoveoInsightClient.prototype.logInterfaceChange = function (metadata) {
84250
- return this.logSearchEvent(SearchPageEvents.interfaceChange, metadata);
84512
+ var metadataToSend = generateMetadataToSend(metadata);
84513
+ return this.logSearchEvent(SearchPageEvents.interfaceChange, metadataToSend);
84251
84514
  };
84252
- CoveoInsightClient.prototype.logStaticFilterDeselect = function (meta) {
84253
- return this.logSearchEvent(SearchPageEvents.staticFilterDeselect, meta);
84515
+ CoveoInsightClient.prototype.logStaticFilterDeselect = function (metadata) {
84516
+ var metadataToSend = generateMetadataToSend(metadata);
84517
+ return this.logSearchEvent(SearchPageEvents.staticFilterDeselect, metadataToSend);
84254
84518
  };
84255
- CoveoInsightClient.prototype.logFetchMoreResults = function () {
84519
+ CoveoInsightClient.prototype.logFetchMoreResults = function (metadata) {
84520
+ if (metadata) {
84521
+ var metadataToSend = generateMetadataToSend(metadata);
84522
+ return this.logCustomEvent(SearchPageEvents.pagerScrolling, __assign(__assign({}, metadataToSend), { type: 'getMoreResults' }));
84523
+ }
84256
84524
  return this.logCustomEvent(SearchPageEvents.pagerScrolling, { type: 'getMoreResults' });
84257
84525
  };
84258
84526
  CoveoInsightClient.prototype.logBreadcrumbFacet = function (metadata) {
84259
- return this.logSearchEvent(SearchPageEvents.breadcrumbFacet, metadata);
84527
+ var metadataToSend = generateMetadataToSend(metadata);
84528
+ return this.logSearchEvent(SearchPageEvents.breadcrumbFacet, metadataToSend);
84260
84529
  };
84261
- CoveoInsightClient.prototype.logBreadcrumbResetAll = function () {
84530
+ CoveoInsightClient.prototype.logBreadcrumbResetAll = function (metadata) {
84531
+ if (metadata) {
84532
+ var metadataToSend = generateMetadataToSend(metadata);
84533
+ return this.logSearchEvent(SearchPageEvents.breadcrumbResetAll, metadataToSend);
84534
+ }
84262
84535
  return this.logSearchEvent(SearchPageEvents.breadcrumbResetAll);
84263
84536
  };
84264
- CoveoInsightClient.prototype.logFacetSelect = function (meta) {
84265
- return this.logSearchEvent(SearchPageEvents.facetSelect, meta);
84537
+ CoveoInsightClient.prototype.logFacetSelect = function (metadata) {
84538
+ var metadataToSend = generateMetadataToSend(metadata);
84539
+ return this.logSearchEvent(SearchPageEvents.facetSelect, metadataToSend);
84266
84540
  };
84267
- CoveoInsightClient.prototype.logFacetDeselect = function (meta) {
84268
- return this.logSearchEvent(SearchPageEvents.facetDeselect, meta);
84541
+ CoveoInsightClient.prototype.logFacetDeselect = function (metadata) {
84542
+ var metadataToSend = generateMetadataToSend(metadata);
84543
+ return this.logSearchEvent(SearchPageEvents.facetDeselect, metadataToSend);
84269
84544
  };
84270
- CoveoInsightClient.prototype.logFacetUpdateSort = function (meta) {
84271
- return this.logSearchEvent(SearchPageEvents.facetUpdateSort, meta);
84545
+ CoveoInsightClient.prototype.logFacetUpdateSort = function (metadata) {
84546
+ var metadataToSend = generateMetadataToSend(metadata);
84547
+ return this.logSearchEvent(SearchPageEvents.facetUpdateSort, metadataToSend);
84272
84548
  };
84273
- CoveoInsightClient.prototype.logFacetClearAll = function (meta) {
84274
- return this.logSearchEvent(SearchPageEvents.facetClearAll, meta);
84549
+ CoveoInsightClient.prototype.logFacetClearAll = function (metadata) {
84550
+ var metadataToSend = generateMetadataToSend(metadata);
84551
+ return this.logSearchEvent(SearchPageEvents.facetClearAll, metadataToSend);
84275
84552
  };
84276
- CoveoInsightClient.prototype.logFacetShowMore = function (meta) {
84277
- return this.logCustomEvent(SearchPageEvents.facetShowMore, meta);
84553
+ CoveoInsightClient.prototype.logFacetShowMore = function (metadata) {
84554
+ var metadataToSend = generateMetadataToSend(metadata, false);
84555
+ return this.logCustomEvent(SearchPageEvents.facetShowMore, metadataToSend);
84278
84556
  };
84279
- CoveoInsightClient.prototype.logFacetShowLess = function (meta) {
84280
- return this.logCustomEvent(SearchPageEvents.facetShowLess, meta);
84557
+ CoveoInsightClient.prototype.logFacetShowLess = function (metadata) {
84558
+ var metadataToSend = generateMetadataToSend(metadata, false);
84559
+ return this.logCustomEvent(SearchPageEvents.facetShowLess, metadataToSend);
84281
84560
  };
84282
- CoveoInsightClient.prototype.logQueryError = function (meta) {
84283
- return this.logCustomEvent(SearchPageEvents.queryError, meta);
84561
+ CoveoInsightClient.prototype.logQueryError = function (metadata) {
84562
+ var metadataToSend = generateMetadataToSend(metadata, false);
84563
+ return this.logCustomEvent(SearchPageEvents.queryError, metadataToSend);
84564
+ };
84565
+ CoveoInsightClient.prototype.logPagerNumber = function (metadata) {
84566
+ var metadataToSend = generateMetadataToSend(metadata, false);
84567
+ return this.logCustomEvent(SearchPageEvents.pagerNumber, metadataToSend);
84568
+ };
84569
+ CoveoInsightClient.prototype.logPagerNext = function (metadata) {
84570
+ var metadataToSend = generateMetadataToSend(metadata, false);
84571
+ return this.logCustomEvent(SearchPageEvents.pagerNext, metadataToSend);
84572
+ };
84573
+ CoveoInsightClient.prototype.logPagerPrevious = function (metadata) {
84574
+ var metadataToSend = generateMetadataToSend(metadata, false);
84575
+ return this.logCustomEvent(SearchPageEvents.pagerPrevious, metadataToSend);
84576
+ };
84577
+ CoveoInsightClient.prototype.logDidYouMeanAutomatic = function (metadata) {
84578
+ if (metadata) {
84579
+ var metadataToSend = generateMetadataToSend(metadata);
84580
+ return this.logSearchEvent(SearchPageEvents.didyoumeanAutomatic, metadataToSend);
84581
+ }
84582
+ return this.logSearchEvent(SearchPageEvents.didyoumeanAutomatic);
84583
+ };
84584
+ CoveoInsightClient.prototype.logDidYouMeanClick = function (metadata) {
84585
+ if (metadata) {
84586
+ var metadataToSend = generateMetadataToSend(metadata);
84587
+ return this.logSearchEvent(SearchPageEvents.didyoumeanClick, metadataToSend);
84588
+ }
84589
+ return this.logSearchEvent(SearchPageEvents.didyoumeanClick);
84590
+ };
84591
+ CoveoInsightClient.prototype.logResultsSort = function (metadata) {
84592
+ var metadataToSend = generateMetadataToSend(metadata);
84593
+ return this.logSearchEvent(SearchPageEvents.resultsSort, metadataToSend);
84594
+ };
84595
+ CoveoInsightClient.prototype.logSearchboxSubmit = function (metadata) {
84596
+ if (metadata) {
84597
+ var metadataToSend = generateMetadataToSend(metadata);
84598
+ return this.logSearchEvent(SearchPageEvents.searchboxSubmit, metadataToSend);
84599
+ }
84600
+ return this.logSearchEvent(SearchPageEvents.searchboxSubmit);
84601
+ };
84602
+ CoveoInsightClient.prototype.logContextChanged = function (metadata) {
84603
+ var metadataToSend = generateMetadataToSend(metadata);
84604
+ return this.logSearchEvent(InsightEvents.contextChanged, metadataToSend);
84605
+ };
84606
+ CoveoInsightClient.prototype.logExpandToFullUI = function (metadata) {
84607
+ var metadataToSend = generateMetadataToSend(metadata);
84608
+ return this.logCustomEvent(InsightEvents.expandToFullUI, metadataToSend);
84284
84609
  };
84285
84610
  CoveoInsightClient.prototype.logCustomEvent = function (event, metadata) {
84286
84611
  return __awaiter(this, void 0, void 0, function () {
@@ -84311,40 +84636,6 @@ var CoveoInsightClient = (function () {
84311
84636
  });
84312
84637
  });
84313
84638
  };
84314
- CoveoInsightClient.prototype.logPagerNumber = function (meta) {
84315
- return this.logCustomEvent(SearchPageEvents.pagerNumber, meta);
84316
- };
84317
- CoveoInsightClient.prototype.logPagerNext = function (meta) {
84318
- return this.logCustomEvent(SearchPageEvents.pagerNext, meta);
84319
- };
84320
- CoveoInsightClient.prototype.logPagerPrevious = function (meta) {
84321
- return this.logCustomEvent(SearchPageEvents.pagerPrevious, meta);
84322
- };
84323
- CoveoInsightClient.prototype.logDidYouMeanAutomatic = function () {
84324
- return this.logSearchEvent(SearchPageEvents.didyoumeanAutomatic);
84325
- };
84326
- CoveoInsightClient.prototype.logDidYouMeanClick = function () {
84327
- return this.logSearchEvent(SearchPageEvents.didyoumeanClick);
84328
- };
84329
- CoveoInsightClient.prototype.logResultsSort = function (metadata) {
84330
- return this.logSearchEvent(SearchPageEvents.resultsSort, metadata);
84331
- };
84332
- CoveoInsightClient.prototype.logSearchboxSubmit = function () {
84333
- return this.logSearchEvent(SearchPageEvents.searchboxSubmit);
84334
- };
84335
- CoveoInsightClient.prototype.logContextChanged = function (meta) {
84336
- var context = extractContextFromMetadata(meta);
84337
- var caseId = meta.caseId, caseNumber = meta.caseNumber;
84338
- var metaToBeSent = __assign(__assign({ CaseId: caseId, CaseNumber: caseNumber }, (!!context.context_Case_Subject && { CaseSubject: context.context_Case_Subject })), context);
84339
- return this.logSearchEvent(InsightEvents.contextChanged, metaToBeSent);
84340
- };
84341
- CoveoInsightClient.prototype.logExpandToFullUI = function (meta) {
84342
- var context = extractContextFromMetadata(meta);
84343
- var caseId = meta.caseId, caseNumber = meta.caseNumber, triggeredBy = meta.triggeredBy, fullSearchComponentName = meta.fullSearchComponentName;
84344
- var metaToBeSent = __assign({ CaseId: caseId, CaseNumber: caseNumber, triggeredBy: triggeredBy,
84345
- fullSearchComponentName: fullSearchComponentName }, (!!context.context_Case_Subject && { CaseSubject: context.context_Case_Subject }));
84346
- return this.logCustomEvent(InsightEvents.expandToFullUI, metaToBeSent);
84347
- };
84348
84639
  CoveoInsightClient.prototype.getBaseCustomEventRequest = function (metadata) {
84349
84640
  return __awaiter(this, void 0, void 0, function () {
84350
84641
  var _a;