coveo.analytics 2.22.3 → 2.23.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.
@@ -116,10 +116,14 @@ export interface ResultsSortMetadata {
116
116
  resultsSortBy: string;
117
117
  }
118
118
  export interface TriggerNotifyMetadata {
119
- notification: string;
119
+ notifications: string[];
120
+ }
121
+ export interface TriggerExecution {
122
+ functionName: string;
123
+ params: (string | number | boolean)[];
120
124
  }
121
125
  export interface TriggerExecuteMetadata {
122
- executed: string;
126
+ executions: TriggerExecution[];
123
127
  }
124
128
  export interface UndoTriggerRedirectMetadata {
125
129
  undoneQuery: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coveo.analytics",
3
- "version": "2.22.3",
3
+ "version": "2.23.1",
4
4
  "description": "📈 Coveo analytics client (node and browser compatible) ",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.es.js",
@@ -389,7 +389,7 @@ describe('SearchPageClient', () => {
389
389
 
390
390
  it('should send proper payload for #logTriggerNotify', async () => {
391
391
  const meta = {
392
- notification: 'foo',
392
+ notifications: ['foo', 'bar'],
393
393
  };
394
394
  await client.logTriggerNotify(meta);
395
395
  expectMatchCustomEventPayload(SearchPageEvents.triggerNotify, meta);
@@ -397,7 +397,7 @@ describe('SearchPageClient', () => {
397
397
 
398
398
  it('should send proper payload for #makeTriggerNotify', async () => {
399
399
  const meta = {
400
- notification: 'foo',
400
+ notifications: ['foo', 'bar'],
401
401
  };
402
402
  const built = client.makeTriggerNotify(meta);
403
403
  await built.log();
@@ -407,7 +407,10 @@ describe('SearchPageClient', () => {
407
407
 
408
408
  it('should send proper payload for #logTriggerExecute', async () => {
409
409
  const meta = {
410
- executed: 'foo',
410
+ executions: [
411
+ {functionName: 'foo', params: [true, 3, 'hello']},
412
+ {functionName: 'world', params: []},
413
+ ],
411
414
  };
412
415
  await client.logTriggerExecute(meta);
413
416
  expectMatchCustomEventPayload(SearchPageEvents.triggerExecute, meta);
@@ -415,7 +418,10 @@ describe('SearchPageClient', () => {
415
418
 
416
419
  it('should send proper payload for #makeTriggerExecute', async () => {
417
420
  const meta = {
418
- executed: 'foo',
421
+ executions: [
422
+ {functionName: 'foo', params: [true, 3, 'hello']},
423
+ {functionName: 'world', params: []},
424
+ ],
419
425
  };
420
426
  const built = client.makeTriggerExecute(meta);
421
427
  await built.log();
@@ -368,11 +368,16 @@ export interface ResultsSortMetadata {
368
368
  }
369
369
 
370
370
  export interface TriggerNotifyMetadata {
371
- notification: string;
371
+ notifications: string[];
372
+ }
373
+
374
+ export interface TriggerExecution {
375
+ functionName: string;
376
+ params: (string | number | boolean)[];
372
377
  }
373
378
 
374
379
  export interface TriggerExecuteMetadata {
375
- executed: string;
380
+ executions: TriggerExecution[];
376
381
  }
377
382
 
378
383
  export interface UndoTriggerRedirectMetadata {