coveo.analytics 2.19.6 → 2.19.7

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.
@@ -40,6 +40,7 @@ export interface RateDocumentSuggestionMetadata {
40
40
  }
41
41
  export interface MoveToNextCaseStepMetadata {
42
42
  ticket: TicketProperties;
43
+ stage?: string;
43
44
  }
44
45
  export interface CaseCancelledMetadata {
45
46
  ticket: TicketProperties;
@@ -1701,7 +1701,9 @@ class CaseAssistClient {
1701
1701
  return this.sendClickEvent();
1702
1702
  }
1703
1703
  logMoveToNextCaseStep(meta) {
1704
- this.svc.setAction(CaseAssistActions.nextCaseStep);
1704
+ this.svc.setAction(CaseAssistActions.nextCaseStep, {
1705
+ stage: meta === null || meta === void 0 ? void 0 : meta.stage,
1706
+ });
1705
1707
  this.svc.setTicket(meta.ticket);
1706
1708
  return this.sendClickEvent();
1707
1709
  }
package/dist/library.js CHANGED
@@ -84081,7 +84081,9 @@ var CaseAssistClient = (function () {
84081
84081
  return this.sendClickEvent();
84082
84082
  };
84083
84083
  CaseAssistClient.prototype.logMoveToNextCaseStep = function (meta) {
84084
- this.svc.setAction(CaseAssistActions.nextCaseStep);
84084
+ this.svc.setAction(CaseAssistActions.nextCaseStep, {
84085
+ stage: meta === null || meta === void 0 ? void 0 : meta.stage,
84086
+ });
84085
84087
  this.svc.setTicket(meta.ticket);
84086
84088
  return this.sendClickEvent();
84087
84089
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coveo.analytics",
3
- "version": "2.19.6",
3
+ "version": "2.19.7",
4
4
  "description": "📈 Coveo analytics client (node and browser compatible) ",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.es.js",
@@ -49,6 +49,7 @@ export interface RateDocumentSuggestionMetadata {
49
49
 
50
50
  export interface MoveToNextCaseStepMetadata {
51
51
  ticket: TicketProperties;
52
+ stage?: string;
52
53
  }
53
54
 
54
55
  export interface CaseCancelledMetadata {
@@ -263,11 +263,14 @@ describe('CaseAssistClient', () => {
263
263
  });
264
264
 
265
265
  it('should send proper payload for #logMoveToNextCaseStep', async () => {
266
+ const stageName = 'stage 1';
267
+
266
268
  await client.logMoveToNextCaseStep({
267
269
  ticket: fakeTicket,
270
+ stage: stageName,
268
271
  });
269
272
 
270
- expectMatchPayload(CaseAssistActions.nextCaseStep, noActionData, fakeTicket);
273
+ expectMatchPayload(CaseAssistActions.nextCaseStep, {stage: stageName}, fakeTicket);
271
274
  });
272
275
 
273
276
  it('should send proper payload for #logCaseCancelled', async () => {
@@ -84,7 +84,9 @@ export class CaseAssistClient {
84
84
  }
85
85
 
86
86
  public logMoveToNextCaseStep(meta: MoveToNextCaseStepMetadata) {
87
- this.svc.setAction(CaseAssistActions.nextCaseStep);
87
+ this.svc.setAction(CaseAssistActions.nextCaseStep, {
88
+ stage: meta?.stage,
89
+ });
88
90
  this.svc.setTicket(meta.ticket);
89
91
  return this.sendClickEvent();
90
92
  }