@coveo/relay-event-types 10.1.2 → 11.0.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 +1 -1
- package/relay-event-types.d.ts +137 -73
package/package.json
CHANGED
package/relay-event-types.d.ts
CHANGED
|
@@ -27,14 +27,6 @@ interface BaseItemClick extends Base {
|
|
|
27
27
|
itemMetadata: ItemMetaData;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/**
|
|
31
|
-
* A document suggestion.
|
|
32
|
-
*/
|
|
33
|
-
interface DocumentSuggestion {
|
|
34
|
-
id: string;
|
|
35
|
-
responseId: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
30
|
/**
|
|
39
31
|
* 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
32
|
*/
|
|
@@ -94,28 +86,6 @@ interface ProductQuantity {
|
|
|
94
86
|
quantity: number;
|
|
95
87
|
}
|
|
96
88
|
|
|
97
|
-
interface QnaAnswer {
|
|
98
|
-
/**
|
|
99
|
-
* The id of the response associated with the service that delivered the answer (e.g. for the Search API, that would be `searchUid`).
|
|
100
|
-
*/
|
|
101
|
-
responseId: string;
|
|
102
|
-
/**
|
|
103
|
-
* The type of the answer.
|
|
104
|
-
*/
|
|
105
|
-
type: "SmartSnippet" | "SmartSnippetSuggestion" | "RGA";
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
interface QnaCitation {
|
|
109
|
-
/**
|
|
110
|
-
* The citation id. This value needs to match the unique identifier of the answer's citation.
|
|
111
|
-
*/
|
|
112
|
-
id: string;
|
|
113
|
-
/**
|
|
114
|
-
* The type of the citation.
|
|
115
|
-
*/
|
|
116
|
-
type: "Source" | "InlineLink";
|
|
117
|
-
}
|
|
118
|
-
|
|
119
89
|
/**
|
|
120
90
|
* A support ticket.
|
|
121
91
|
*/
|
|
@@ -143,11 +113,6 @@ interface Ticket {
|
|
|
143
113
|
}
|
|
144
114
|
|
|
145
115
|
export namespace CaseAssist {
|
|
146
|
-
/**
|
|
147
|
-
* The caseAssist.start event is emitted when a user initiates a Case Assist flow.
|
|
148
|
-
*/
|
|
149
|
-
export type Start = Base;
|
|
150
|
-
|
|
151
116
|
/**
|
|
152
117
|
* The caseAssist.cancel event is emitted when a user cancels the Case Assist flow.
|
|
153
118
|
*/
|
|
@@ -169,14 +134,26 @@ export namespace CaseAssist {
|
|
|
169
134
|
* The caseAssist.documentSuggestionClick event is emitted when a user clicks on a Case Assist document suggestion.
|
|
170
135
|
*/
|
|
171
136
|
export interface DocumentSuggestionClick extends Base {
|
|
172
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Response ID linked to the Case Assist API request that returned the clicked suggestion.
|
|
139
|
+
*/
|
|
140
|
+
responseId: UuidNotNull;
|
|
141
|
+
/**
|
|
142
|
+
* Indicates the clicked suggestion's 1-based position within the returned results.
|
|
143
|
+
*/
|
|
144
|
+
position: number;
|
|
145
|
+
itemMetadata: ItemMetaData;
|
|
173
146
|
}
|
|
174
147
|
|
|
175
148
|
/**
|
|
176
149
|
* The caseAssist.documentSuggestionFeedback event is emitted when a user gives feedback on a Case Assist document suggestion.
|
|
177
150
|
*/
|
|
178
151
|
export interface DocumentSuggestionFeedback extends Base {
|
|
179
|
-
|
|
152
|
+
/**
|
|
153
|
+
* Response ID linked to the Case Assist API request that returned the document suggestion.
|
|
154
|
+
*/
|
|
155
|
+
responseId: UuidNotNull;
|
|
156
|
+
itemMetadata: ItemMetaData;
|
|
180
157
|
/**
|
|
181
158
|
* Whether the user liked the document suggestion or not.
|
|
182
159
|
*/
|
|
@@ -187,22 +164,26 @@ export namespace CaseAssist {
|
|
|
187
164
|
* The caseAssist.selectFieldClassification event is emitted when a user selects a Case Assist field recommendation.
|
|
188
165
|
*/
|
|
189
166
|
export interface SelectFieldClassification extends Base {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
responseId: string;
|
|
199
|
-
};
|
|
167
|
+
/**
|
|
168
|
+
* The unique identifier of the response that contains the field classification.
|
|
169
|
+
*/
|
|
170
|
+
responseId: string;
|
|
171
|
+
/**
|
|
172
|
+
* The unique identifier of the field classification.
|
|
173
|
+
*/
|
|
174
|
+
classificationId: string;
|
|
200
175
|
/**
|
|
201
176
|
* Whether the field classification was automatically selected by Coveo Case Assist.
|
|
202
177
|
*/
|
|
203
178
|
autoselected: boolean;
|
|
204
179
|
}
|
|
205
180
|
|
|
181
|
+
/**
|
|
182
|
+
* The caseAssist.start event is emitted when a user initiates a Case Assist flow.
|
|
183
|
+
*/
|
|
184
|
+
export interface Start extends Base {
|
|
185
|
+
}
|
|
186
|
+
|
|
206
187
|
/**
|
|
207
188
|
* The caseAssist.updateField event is emitted when a user edits a Case Assist form field.
|
|
208
189
|
*/
|
|
@@ -347,46 +328,84 @@ export namespace InsightPanel {
|
|
|
347
328
|
}
|
|
348
329
|
}
|
|
349
330
|
|
|
350
|
-
export namespace
|
|
331
|
+
export namespace Rga {
|
|
351
332
|
/**
|
|
352
|
-
* Event to emit when interacting with a
|
|
333
|
+
* Event to emit when interacting with a generated answer.
|
|
353
334
|
*/
|
|
354
335
|
export interface AnswerAction extends Base {
|
|
355
|
-
|
|
336
|
+
/**
|
|
337
|
+
* The id of the response associated with the service that delivered the answer.
|
|
338
|
+
*/
|
|
339
|
+
responseId: string;
|
|
340
|
+
/**
|
|
341
|
+
* The action taken on the answer.
|
|
342
|
+
*/
|
|
356
343
|
action: "copyToClipboard" | "hide" | "show" | "expand" | "collapse" | "like" | "dislike";
|
|
357
344
|
}
|
|
358
345
|
|
|
359
346
|
/**
|
|
360
|
-
* Event to emit when a
|
|
347
|
+
* Event to emit when a generated answer citation item has been clicked.
|
|
361
348
|
*/
|
|
362
349
|
export interface CitationClick extends Base {
|
|
363
|
-
|
|
364
|
-
|
|
350
|
+
/**
|
|
351
|
+
* The id of the response associated with the service that delivered the answer.
|
|
352
|
+
*/
|
|
353
|
+
responseId: string;
|
|
354
|
+
/**
|
|
355
|
+
* The citation id. This value needs to match the unique identifier of the answer's citation.
|
|
356
|
+
*/
|
|
357
|
+
citationId: string;
|
|
358
|
+
itemMetadata: ItemMetaData;
|
|
365
359
|
}
|
|
366
360
|
|
|
367
361
|
/**
|
|
368
|
-
* Event to emit when a
|
|
362
|
+
* Event to emit when a generated answer citation has been hovered.
|
|
369
363
|
*/
|
|
370
364
|
export interface CitationHover extends Base {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
365
|
+
/**
|
|
366
|
+
* The id of the response associated with the service that delivered the answer.
|
|
367
|
+
*/
|
|
368
|
+
responseId: string;
|
|
369
|
+
/**
|
|
370
|
+
* The citation id. This value needs to match the unique identifier of the answer's citation.
|
|
371
|
+
*/
|
|
372
|
+
citationId: string;
|
|
373
|
+
itemMetadata: ItemMetaData;
|
|
374
|
+
/**
|
|
375
|
+
* The time in milliseconds the citation was hovered.
|
|
376
|
+
*/
|
|
377
|
+
citationHoverTimeInMs: number;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Event to emit when a generated answer stream has ended.
|
|
382
|
+
*/
|
|
383
|
+
export interface StreamEnd extends Base {
|
|
384
|
+
/**
|
|
385
|
+
* The id of the response associated with the service that delivered the answer.
|
|
386
|
+
*/
|
|
387
|
+
responseId: string;
|
|
388
|
+
/**
|
|
389
|
+
* Indicates if the answer was generated or not.
|
|
390
|
+
*/
|
|
391
|
+
answerGenerated: boolean;
|
|
374
392
|
}
|
|
375
393
|
|
|
376
394
|
/**
|
|
377
395
|
* Event to emit when submitting feedback following the evaluation rubric for a generated answer.
|
|
378
396
|
*/
|
|
379
|
-
export interface
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
responseId: string;
|
|
385
|
-
};
|
|
397
|
+
export interface SubmitFeedback extends Base {
|
|
398
|
+
/**
|
|
399
|
+
* The id of the response associated with the service that delivered the answer.
|
|
400
|
+
*/
|
|
401
|
+
responseId: string;
|
|
386
402
|
/**
|
|
387
403
|
* Whether or not the answer is helpful.
|
|
388
404
|
*/
|
|
389
405
|
helpful: boolean;
|
|
406
|
+
/**
|
|
407
|
+
* Details about the evaluation of the answer.
|
|
408
|
+
*/
|
|
390
409
|
details: {
|
|
391
410
|
/**
|
|
392
411
|
* Whether or not the answer is clear and easy to read.
|
|
@@ -405,24 +424,69 @@ export namespace Qna {
|
|
|
405
424
|
*/
|
|
406
425
|
hallucinationFree?: boolean;
|
|
407
426
|
};
|
|
427
|
+
/**
|
|
428
|
+
* Additional notes about the evaluation.
|
|
429
|
+
*/
|
|
408
430
|
additionalNotes?: string;
|
|
431
|
+
/**
|
|
432
|
+
* The URL of the correct answer.
|
|
433
|
+
*/
|
|
409
434
|
correctAnswerUrl?: string;
|
|
410
435
|
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export namespace SmartSnippets {
|
|
439
|
+
/**
|
|
440
|
+
* Event to emit when interacting with a snippet.
|
|
441
|
+
*/
|
|
442
|
+
export interface AnswerAction extends Base {
|
|
443
|
+
/**
|
|
444
|
+
* The id of the response associated with the service that delivered the snippet.
|
|
445
|
+
*/
|
|
446
|
+
responseId: string;
|
|
447
|
+
/**
|
|
448
|
+
* The type of snippet the answer belongs to.
|
|
449
|
+
*/
|
|
450
|
+
snippetType: "SmartSnippet" | "SmartSnippetSuggestion";
|
|
451
|
+
itemMetadata: ItemMetaData;
|
|
452
|
+
/**
|
|
453
|
+
* The action taken on the snippet.
|
|
454
|
+
*/
|
|
455
|
+
action: "expand" | "collapse" | "like" | "dislike";
|
|
456
|
+
}
|
|
411
457
|
|
|
412
458
|
/**
|
|
413
|
-
* Event to emit when
|
|
459
|
+
* Event to emit when a snippet source has been clicked.
|
|
414
460
|
*/
|
|
415
|
-
export interface
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
461
|
+
export interface SourceClick extends Base {
|
|
462
|
+
/**
|
|
463
|
+
* The id of the response associated with the service that delivered the snippet.
|
|
464
|
+
*/
|
|
465
|
+
responseId: string;
|
|
466
|
+
/**
|
|
467
|
+
* The type of snippet the answer belongs to.
|
|
468
|
+
*/
|
|
469
|
+
snippetType: "SmartSnippet" | "SmartSnippetSuggestion";
|
|
470
|
+
itemMetadata: ItemMetaData;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Event to emit when submitting the reason of a negative feedback on a snippet.
|
|
475
|
+
*/
|
|
476
|
+
export interface SubmitFeedback extends Base {
|
|
477
|
+
/**
|
|
478
|
+
* The id of the response associated with the service that delivered the snippet.
|
|
479
|
+
*/
|
|
480
|
+
responseId: string;
|
|
481
|
+
/**
|
|
482
|
+
* The type of snippet the answer belongs to.
|
|
483
|
+
*/
|
|
484
|
+
snippetType: "SmartSnippet" | "SmartSnippetSuggestion";
|
|
485
|
+
itemMetadata: ItemMetaData;
|
|
422
486
|
/**
|
|
423
487
|
* The reason for the negative feedback.
|
|
424
488
|
*/
|
|
425
|
-
reason: "
|
|
489
|
+
reason: "doesNotAnswer" | "partiallyAnswers" | "wasNotAQuestion" | "other";
|
|
426
490
|
/**
|
|
427
491
|
* Additional details written in free text.
|
|
428
492
|
*/
|