coveo.analytics 2.28.5 → 2.28.6

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.
@@ -54,6 +54,8 @@ export declare class CoveoInsightClient {
54
54
  logPageViewClick(pageView: UserActionsPageViewMetadata, metadata: CaseMetadata): Promise<void | import("../events").CustomEventResponse>;
55
55
  logDocumentOpen(info: PartialDocumentInformation, identifier: DocumentIdentifier, metadata?: CaseMetadata): Promise<void | import("../events").ClickEventResponse>;
56
56
  logCopyToClipboard(info: PartialDocumentInformation, identifier: DocumentIdentifier, metadata?: CaseMetadata): Promise<void | import("../events").ClickEventResponse>;
57
+ logCaseSendEmail(info: PartialDocumentInformation, identifier: DocumentIdentifier, metadata?: CaseMetadata): Promise<void | import("../events").ClickEventResponse>;
58
+ logFeedItemTextPost(info: PartialDocumentInformation, identifier: DocumentIdentifier, metadata?: CaseMetadata): Promise<void | import("../events").ClickEventResponse>;
57
59
  logDocumentQuickview(info: PartialDocumentInformation, identifier: DocumentIdentifier, caseMetadata?: CaseMetadata): Promise<void | import("../events").ClickEventResponse>;
58
60
  logCaseAttach(info: PartialDocumentInformation, identifier: DocumentIdentifier, caseMetadata?: CaseMetadata): Promise<void | import("../events").ClickEventResponse>;
59
61
  logCaseDetach(resultUriHash: string, metadata?: CaseMetadata): Promise<void | import("../events").CustomEventResponse>;
@@ -69,6 +69,8 @@ export declare enum SearchPageEvents {
69
69
  showMoreFoldedResults = "showMoreFoldedResults",
70
70
  showLessFoldedResults = "showLessFoldedResults",
71
71
  copyToClipboard = "copyToClipboard",
72
+ caseSendEmail = "Case.SendEmail",
73
+ feedItemTextPost = "FeedItem.TextPost",
72
74
  caseAttach = "caseAttach",
73
75
  caseDetach = "caseDetach"
74
76
  }
@@ -1 +1 @@
1
- export declare const libVersion = "2.28.5";
1
+ export declare const libVersion = "2.28.6";
@@ -596,7 +596,7 @@ function sha1(bytes) {
596
596
  const v5 = v35('v5', 0x50, sha1);
597
597
  var uuidv5 = v5;
598
598
 
599
- const libVersion = "2.28.5" ;
599
+ const libVersion = "2.28.6" ;
600
600
 
601
601
  const getFormattedLocation = (location) => `${location.protocol}//${location.hostname}${location.pathname.indexOf('/') === 0 ? location.pathname : `/${location.pathname}`}${location.search}`;
602
602
 
@@ -1712,6 +1712,8 @@ var SearchPageEvents;
1712
1712
  SearchPageEvents["showMoreFoldedResults"] = "showMoreFoldedResults";
1713
1713
  SearchPageEvents["showLessFoldedResults"] = "showLessFoldedResults";
1714
1714
  SearchPageEvents["copyToClipboard"] = "copyToClipboard";
1715
+ SearchPageEvents["caseSendEmail"] = "Case.SendEmail";
1716
+ SearchPageEvents["feedItemTextPost"] = "FeedItem.TextPost";
1715
1717
  SearchPageEvents["caseAttach"] = "caseAttach";
1716
1718
  SearchPageEvents["caseDetach"] = "caseDetach";
1717
1719
  })(SearchPageEvents || (SearchPageEvents = {}));
@@ -2904,6 +2906,12 @@ class CoveoInsightClient {
2904
2906
  logCopyToClipboard(info, identifier, metadata) {
2905
2907
  return this.logClickEvent(SearchPageEvents.copyToClipboard, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
2906
2908
  }
2909
+ logCaseSendEmail(info, identifier, metadata) {
2910
+ return this.logClickEvent(SearchPageEvents.caseSendEmail, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
2911
+ }
2912
+ logFeedItemTextPost(info, identifier, metadata) {
2913
+ return this.logClickEvent(SearchPageEvents.feedItemTextPost, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
2914
+ }
2907
2915
  logDocumentQuickview(info, identifier, caseMetadata) {
2908
2916
  const metadata = {
2909
2917
  documentTitle: info.documentTitle,
package/dist/library.js CHANGED
@@ -731,7 +731,7 @@ function sha1(bytes) {
731
731
  const v5 = v35('v5', 0x50, sha1);
732
732
  var uuidv5 = v5;
733
733
 
734
- var libVersion = "2.28.5" ;
734
+ var libVersion = "2.28.6" ;
735
735
 
736
736
  var getFormattedLocation = function (location) {
737
737
  return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
@@ -84225,6 +84225,8 @@ exports.SearchPageEvents = void 0;
84225
84225
  SearchPageEvents["showMoreFoldedResults"] = "showMoreFoldedResults";
84226
84226
  SearchPageEvents["showLessFoldedResults"] = "showLessFoldedResults";
84227
84227
  SearchPageEvents["copyToClipboard"] = "copyToClipboard";
84228
+ SearchPageEvents["caseSendEmail"] = "Case.SendEmail";
84229
+ SearchPageEvents["feedItemTextPost"] = "FeedItem.TextPost";
84228
84230
  SearchPageEvents["caseAttach"] = "caseAttach";
84229
84231
  SearchPageEvents["caseDetach"] = "caseDetach";
84230
84232
  })(exports.SearchPageEvents || (exports.SearchPageEvents = {}));
@@ -85835,6 +85837,12 @@ var CoveoInsightClient = (function () {
85835
85837
  CoveoInsightClient.prototype.logCopyToClipboard = function (info, identifier, metadata) {
85836
85838
  return this.logClickEvent(exports.SearchPageEvents.copyToClipboard, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
85837
85839
  };
85840
+ CoveoInsightClient.prototype.logCaseSendEmail = function (info, identifier, metadata) {
85841
+ return this.logClickEvent(exports.SearchPageEvents.caseSendEmail, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
85842
+ };
85843
+ CoveoInsightClient.prototype.logFeedItemTextPost = function (info, identifier, metadata) {
85844
+ return this.logClickEvent(exports.SearchPageEvents.feedItemTextPost, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
85845
+ };
85838
85846
  CoveoInsightClient.prototype.logDocumentQuickview = function (info, identifier, caseMetadata) {
85839
85847
  var metadata = {
85840
85848
  documentTitle: info.documentTitle,
@@ -658,7 +658,7 @@ const addPageViewToHistory = (pageViewValue) => __awaiter(void 0, void 0, void 0
658
658
  yield store.addElementAsync(historyElement);
659
659
  });
660
660
 
661
- const libVersion = "2.28.5" ;
661
+ const libVersion = "2.28.6" ;
662
662
 
663
663
  const getFormattedLocation = (location) => `${location.protocol}//${location.hostname}${location.pathname.indexOf('/') === 0 ? location.pathname : `/${location.pathname}`}${location.search}`;
664
664
 
@@ -1730,6 +1730,8 @@ var SearchPageEvents;
1730
1730
  SearchPageEvents["showMoreFoldedResults"] = "showMoreFoldedResults";
1731
1731
  SearchPageEvents["showLessFoldedResults"] = "showLessFoldedResults";
1732
1732
  SearchPageEvents["copyToClipboard"] = "copyToClipboard";
1733
+ SearchPageEvents["caseSendEmail"] = "Case.SendEmail";
1734
+ SearchPageEvents["feedItemTextPost"] = "FeedItem.TextPost";
1733
1735
  SearchPageEvents["caseAttach"] = "caseAttach";
1734
1736
  SearchPageEvents["caseDetach"] = "caseDetach";
1735
1737
  })(SearchPageEvents || (SearchPageEvents = {}));
@@ -2922,6 +2924,12 @@ class CoveoInsightClient {
2922
2924
  logCopyToClipboard(info, identifier, metadata) {
2923
2925
  return this.logClickEvent(SearchPageEvents.copyToClipboard, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
2924
2926
  }
2927
+ logCaseSendEmail(info, identifier, metadata) {
2928
+ return this.logClickEvent(SearchPageEvents.caseSendEmail, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
2929
+ }
2930
+ logFeedItemTextPost(info, identifier, metadata) {
2931
+ return this.logClickEvent(SearchPageEvents.feedItemTextPost, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined);
2932
+ }
2925
2933
  logDocumentQuickview(info, identifier, caseMetadata) {
2926
2934
  const metadata = {
2927
2935
  documentTitle: info.documentTitle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coveo.analytics",
3
- "version": "2.28.5",
3
+ "version": "2.28.6",
4
4
  "description": "📈 Coveo analytics client (node and browser compatible) ",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.es.js",
@@ -324,6 +324,16 @@ describe('InsightClient', () => {
324
324
  expectMatchDocumentPayload(SearchPageEvents.copyToClipboard, fakeDocInfo, fakeDocID);
325
325
  });
326
326
 
327
+ it('should send proper payload for #caseSendEmail', async () => {
328
+ await client.logCaseSendEmail(fakeDocInfo, fakeDocID);
329
+ expectMatchDocumentPayload(SearchPageEvents.caseSendEmail, fakeDocInfo, fakeDocID);
330
+ });
331
+
332
+ it('should send proper payload for #feedItemTextPost', async () => {
333
+ await client.logFeedItemTextPost(fakeDocInfo, fakeDocID);
334
+ expectMatchDocumentPayload(SearchPageEvents.feedItemTextPost, fakeDocInfo, fakeDocID);
335
+ });
336
+
327
337
  it('should send proper payload for #documentQuickview', async () => {
328
338
  const expectedMetadata = {
329
339
  ...fakeDocID,
@@ -856,6 +866,28 @@ describe('InsightClient', () => {
856
866
  expectMatchDocumentPayload(SearchPageEvents.copyToClipboard, fakeDocInfo, expectedMetadata);
857
867
  });
858
868
 
869
+ it('should send proper payload for #caseSendEmail', async () => {
870
+ const metadata = baseCaseMetadata;
871
+
872
+ const expectedMetadata = {
873
+ ...fakeDocID,
874
+ ...expectedBaseCaseMetadata,
875
+ };
876
+ await client.logCaseSendEmail(fakeDocInfo, fakeDocID, metadata);
877
+ expectMatchDocumentPayload(SearchPageEvents.caseSendEmail, fakeDocInfo, expectedMetadata);
878
+ });
879
+
880
+ it('should send proper payload for #feedItemTextPost', async () => {
881
+ const metadata = baseCaseMetadata;
882
+
883
+ const expectedMetadata = {
884
+ ...fakeDocID,
885
+ ...expectedBaseCaseMetadata,
886
+ };
887
+ await client.logFeedItemTextPost(fakeDocInfo, fakeDocID, metadata);
888
+ expectMatchDocumentPayload(SearchPageEvents.feedItemTextPost, fakeDocInfo, expectedMetadata);
889
+ });
890
+
859
891
  it('should send proper payload for #documentQuickview', async () => {
860
892
  const metadata = baseCaseMetadata;
861
893
 
@@ -276,6 +276,28 @@ export class CoveoInsightClient {
276
276
  );
277
277
  }
278
278
 
279
+ public logCaseSendEmail(info: PartialDocumentInformation, identifier: DocumentIdentifier, metadata?: CaseMetadata) {
280
+ return this.logClickEvent(
281
+ SearchPageEvents.caseSendEmail,
282
+ info,
283
+ identifier,
284
+ metadata ? generateMetadataToSend(metadata, false) : undefined
285
+ );
286
+ }
287
+
288
+ public logFeedItemTextPost(
289
+ info: PartialDocumentInformation,
290
+ identifier: DocumentIdentifier,
291
+ metadata?: CaseMetadata
292
+ ) {
293
+ return this.logClickEvent(
294
+ SearchPageEvents.feedItemTextPost,
295
+ info,
296
+ identifier,
297
+ metadata ? generateMetadataToSend(metadata, false) : undefined
298
+ );
299
+ }
300
+
279
301
  public logDocumentQuickview(
280
302
  info: PartialDocumentInformation,
281
303
  identifier: DocumentIdentifier,
@@ -278,6 +278,14 @@ export enum SearchPageEvents {
278
278
  * Identifies the click event that gets logged when a user clicks the Copy To Clipboard result action.
279
279
  */
280
280
  copyToClipboard = 'copyToClipboard',
281
+ /**
282
+ * Identifies the click event that gets logged when a user clicks the Send As Email result action.
283
+ */
284
+ caseSendEmail = 'Case.SendEmail',
285
+ /**
286
+ * Identifies the click event that gets logged when a user clicks the Post To Feed result action.
287
+ */
288
+ feedItemTextPost = 'FeedItem.TextPost',
281
289
  /**
282
290
  * Identifies the click event that gets logged when a user clicks the Attach To Case result action.
283
291
  */