@coveo/relay-event-types 7.5.1 → 7.5.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/relay-event-types",
3
- "version": "7.5.1",
3
+ "version": "7.5.3",
4
4
  "description": "Typescript types for Coveo Events, intended to be used with the Relay package.",
5
5
  "types": "./relay-event-types.d.ts",
6
6
  "author": "Coveo",
@@ -15,6 +15,18 @@ type UuidNotNull = string;
15
15
  interface Base {
16
16
  }
17
17
 
18
+ interface BaseItemClick extends Base {
19
+ /**
20
+ * A unique identifier identifying the query made to a search system.
21
+ */
22
+ searchUid: string;
23
+ /**
24
+ * Indicates the clicked item's 1-based position within the returned results.
25
+ */
26
+ position: number;
27
+ itemMetadata: ItemMetaData;
28
+ }
29
+
18
30
  /**
19
31
  * A document suggestion.
20
32
  */
@@ -38,17 +50,11 @@ interface Feedback {
38
50
  /**
39
51
  * Represents the Coveo Analytics Item Click Event. Use this schema when sending data related to a user's click on an item returned by Coveo.
40
52
  */
41
- export interface ItemClick extends Base {
53
+ export interface ItemClick extends BaseItemClick {
42
54
  /**
43
55
  * The type of operation that triggered this event.
44
56
  */
45
57
  actionCause?: "preview" | "open";
46
- /**
47
- * A unique identifier identifying the query made to a search system.
48
- */
49
- searchUid: string;
50
- position: number;
51
- itemMetadata: ItemMetaData;
52
58
  }
53
59
 
54
60
  interface ItemMetaData {
@@ -321,4 +327,73 @@ export namespace Ec {
321
327
  revenue: number;
322
328
  };
323
329
  }
330
+ }
331
+
332
+ export namespace InsightPanel {
333
+ /**
334
+ * The context in which the insight panel is used. Generally, this will be a support case.
335
+ */
336
+ interface Context {
337
+ /**
338
+ * The target's unique id in the original source system. (Example, a Case's id in Salesforce).
339
+ */
340
+ targetId: string;
341
+ /**
342
+ * The target's type in the original source system. (Example: 'Case').
343
+ */
344
+ targetType: "Case";
345
+ }
346
+
347
+ /**
348
+ * Insight Panel event signaling that the agent created an article from a case.
349
+ */
350
+ export interface CreateArticle extends Base {
351
+ /**
352
+ * The context in which the insight panel is used.
353
+ */
354
+ context: Context;
355
+ /**
356
+ * The type of article the agent started to create.
357
+ */
358
+ articleType?: string;
359
+ }
360
+
361
+ /**
362
+ * Insight Panel event signaling that an item was detached from a record
363
+ */
364
+ export interface DetachItem extends Base {
365
+ /**
366
+ * The context in which the insight panel is used.
367
+ */
368
+ context: Context;
369
+ itemMetadata: ItemMetaData;
370
+ }
371
+
372
+ /**
373
+ * Insight Panel event signaling that the agent expanded the panel.
374
+ */
375
+ export interface ExpandToFullUI extends Base {
376
+ /**
377
+ * The context in which the insight panel is used.
378
+ */
379
+ context: Context;
380
+ }
381
+
382
+ /**
383
+ * Interaction on a search item inside an insight panel.
384
+ */
385
+ export interface ItemAction extends BaseItemClick {
386
+ /**
387
+ * How the user interacted with the item.
388
+ */
389
+ action: "attach" | "open" | "copyToClipboard" | "sendEmail" | "postToFeed";
390
+ /**
391
+ * The context in which the insight panel is used.
392
+ */
393
+ context: Context;
394
+ /**
395
+ * The id of the item in the source repository (ex: A knowledge article record ID in Saleforce).
396
+ */
397
+ sourceEntityId?: string;
398
+ }
324
399
  }