@coveo/relay-event-types 7.5.2 → 7.6.0

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.2",
3
+ "version": "7.6.0",
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",
@@ -112,14 +112,10 @@ interface QnaAnswer {
112
112
  * The answer id. This value needs to match the unique identifier of a Q&A answer.
113
113
  */
114
114
  id: string;
115
- }
116
-
117
- /**
118
- * Event to emit when interacting with a Q&A answer.
119
- */
120
- export interface QnaAnswerAction extends Base {
121
- answer: QnaAnswer;
122
- action: "copyToClipboard" | "hide" | "show" | "expand" | "collapse";
115
+ /**
116
+ * The type of the answer.
117
+ */
118
+ type: "SmartSnippet" | "SmartSnippetSuggestion" | "CRGA";
123
119
  }
124
120
 
125
121
  interface QnaCitation {
@@ -129,31 +125,6 @@ interface QnaCitation {
129
125
  id: string;
130
126
  }
131
127
 
132
- /**
133
- * Event to emit when a Q&A answer citation has been hovered.
134
- */
135
- export interface QnaCitationHover extends Base {
136
- answer: QnaAnswer;
137
- citation: QnaCitation;
138
- citationHoverTimeInMs?: number;
139
- }
140
-
141
- /**
142
- * Event to emit when a Q&A answer citation item has been clicked.
143
- */
144
- export interface QnaCitationItemClick extends Base {
145
- answer: QnaAnswer;
146
- citation: QnaCitation;
147
- }
148
-
149
- /**
150
- * Event to emit when submitting feedback for a Q&A answer.
151
- */
152
- export interface QnaFeedback extends Base {
153
- answer: QnaAnswer;
154
- feedback: Feedback;
155
- }
156
-
157
128
  /**
158
129
  * Represents the Coveo Analytics Search Event. Send this schema exclusively when conducting A/B tests against a competitor's search solution.
159
130
  */
@@ -396,4 +367,39 @@ export namespace InsightPanel {
396
367
  */
397
368
  sourceEntityId?: string;
398
369
  }
370
+ }
371
+
372
+ export namespace Qna {
373
+ /**
374
+ * Event to emit when interacting with a Q&A answer.
375
+ */
376
+ export interface AnswerAction extends Base {
377
+ answer: QnaAnswer;
378
+ action: "copyToClipboard" | "hide" | "show" | "expand" | "collapse";
379
+ }
380
+
381
+ /**
382
+ * Event to emit when a Q&A answer citation has been hovered.
383
+ */
384
+ export interface CitationHover extends Base {
385
+ answer: QnaAnswer;
386
+ citation: QnaCitation;
387
+ citationHoverTimeInMs?: number;
388
+ }
389
+
390
+ /**
391
+ * Event to emit when a Q&A answer citation item has been clicked.
392
+ */
393
+ export interface CitationItemClick extends Base {
394
+ answer: QnaAnswer;
395
+ citation: QnaCitation;
396
+ }
397
+
398
+ /**
399
+ * Event to emit when submitting feedback for a Q&A answer.
400
+ */
401
+ export interface Feedback extends Base {
402
+ answer: QnaAnswer;
403
+ feedback: Feedback;
404
+ }
399
405
  }