@coveo/quantic 3.36.6 → 3.36.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.
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +14 -14
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-core-generated-answer.d.ts +54 -11
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/generated-answer/headless-generated-answer.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/headless-generated-answer-with-follow-ups.d.ts +16 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-analytics-actions.d.ts +15 -10
- package/force-app/main/default/staticresources/coveoheadless/definitions/index.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +4 -4
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +13 -13
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +2 -2
- package/package.json +3 -3
|
@@ -21,12 +21,24 @@ export interface GeneratedAnswer extends Controller {
|
|
|
21
21
|
retry(): void;
|
|
22
22
|
/**
|
|
23
23
|
* Indicates that the generated answer met the user expectations.
|
|
24
|
+
* @deprecated The no-argument `like` method is deprecated and will be removed in a future major version. The method will now take a required `answerId` parameter to specify which answer is being liked, and will log the like action with the provided `answerId` for analytics.
|
|
24
25
|
*/
|
|
25
26
|
like(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates that the generated answer met the user expectations.
|
|
29
|
+
* @param answerId - Answer Id of the liked answer.
|
|
30
|
+
*/
|
|
31
|
+
like(answerId: string): void;
|
|
26
32
|
/**
|
|
27
33
|
* Marks the generated answer as not relevant to the end user.
|
|
34
|
+
* @deprecated The no-argument `dislike` method is deprecated and will be removed in a future major version. The method will now take a required `answerId` parameter to specify which answer is being disliked, and will log the dislike action with the provided `answerId` for analytics.
|
|
28
35
|
*/
|
|
29
36
|
dislike(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Marks the generated answer as not relevant to the end user.
|
|
39
|
+
* @param answerId - Answer Id of the disliked answer.
|
|
40
|
+
*/
|
|
41
|
+
dislike(answerId: string): void;
|
|
30
42
|
/**
|
|
31
43
|
* Opens the modal to provide feedback about why the generated answer was not relevant.
|
|
32
44
|
*/
|
|
@@ -40,11 +52,6 @@ export interface GeneratedAnswer extends Controller {
|
|
|
40
52
|
* @param feedback - The feedback that the end user wishes to send.
|
|
41
53
|
*/
|
|
42
54
|
sendFeedback(feedback: GeneratedAnswerFeedback): void;
|
|
43
|
-
/**
|
|
44
|
-
* Logs a custom event indicating a cited source link was clicked.
|
|
45
|
-
* @param id - The ID of the clicked citation.
|
|
46
|
-
*/
|
|
47
|
-
logCitationClick(id: string): void;
|
|
48
55
|
/**
|
|
49
56
|
* Displays the generated answer.
|
|
50
57
|
*/
|
|
@@ -71,24 +78,60 @@ export interface GeneratedAnswer extends Controller {
|
|
|
71
78
|
disable(): void;
|
|
72
79
|
/**
|
|
73
80
|
* Logs a custom event indicating the generated answer was copied to the clipboard.
|
|
81
|
+
* @deprecated The `logCopyToClipboard` method is deprecated and will be removed in a future major version. The method will now take a required `answerId` parameter to specify which answer is being copied, and will log the copy action with the provided `answerId` for analytics.
|
|
74
82
|
*/
|
|
75
83
|
logCopyToClipboard(): void;
|
|
76
84
|
/**
|
|
77
|
-
* Logs a custom event indicating
|
|
85
|
+
* Logs a custom event indicating the generated answer was copied to the clipboard.
|
|
86
|
+
* @param answerId - Answer Id of the copied answer.
|
|
87
|
+
*/
|
|
88
|
+
logCopyToClipboard(answerId: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* Logs a custom event indicating a cited source link was clicked.
|
|
91
|
+
* @param citationId - The ID of the clicked citation.
|
|
92
|
+
* @deprecated The `logCitationClick` method is deprecated and will be removed in a future major version. The method will now take a required `answerId` parameter to specify which answer is being clicked, and will log the click action with the provided `answerId` for analytics.
|
|
93
|
+
*/
|
|
94
|
+
logCitationClick(citationId: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* Logs a custom event indicating a cited source link was clicked.
|
|
78
97
|
* @param citationId - The ID of the clicked citation.
|
|
98
|
+
* @param answerId - Answer Id of the clicked citation's answer.
|
|
99
|
+
*/
|
|
100
|
+
logCitationClick(citationId: string, answerId: string): void;
|
|
101
|
+
/**
|
|
102
|
+
* Logs a custom event indicating a cited source link was hovered.
|
|
103
|
+
* @param citationId - The ID of the hovered citation.
|
|
79
104
|
* @param citationHoverTimeMs - The number of milliseconds spent hovering over the citation.
|
|
105
|
+
* @deprecated The `logCitationHover` method is deprecated and will be removed in a future major version. The method will now take a required `answerId` parameter to specify which answer is being hovered, and will log the hover action with the provided `answerId` for analytics.
|
|
80
106
|
*/
|
|
81
107
|
logCitationHover(citationId: string, citationHoverTimeMs: number): void;
|
|
108
|
+
/**
|
|
109
|
+
* Logs a custom event indicating a cited source link was hovered.
|
|
110
|
+
* @param citationId - The ID of the hovered citation.
|
|
111
|
+
* @param citationHoverTimeMs - The number of milliseconds spent hovering over the citation.
|
|
112
|
+
* @param answerId - Answer Id of the hovered citation's answer.
|
|
113
|
+
*/
|
|
114
|
+
logCitationHover(citationId: string, citationHoverTimeMs: number, answerId: string): void;
|
|
82
115
|
}
|
|
83
116
|
export interface GeneratedAnswerAnalyticsClient {
|
|
84
|
-
|
|
85
|
-
|
|
117
|
+
/** @deprecated */
|
|
118
|
+
logLikeGeneratedAnswer(): CustomAction;
|
|
119
|
+
logLikeGeneratedAnswer(answerId?: string): CustomAction;
|
|
120
|
+
/** @deprecated */
|
|
121
|
+
logDislikeGeneratedAnswer(): CustomAction;
|
|
122
|
+
logDislikeGeneratedAnswer(answerId?: string): CustomAction;
|
|
86
123
|
logGeneratedAnswerFeedback: (feedback: GeneratedAnswerFeedback) => CustomAction;
|
|
87
|
-
|
|
88
|
-
|
|
124
|
+
/** @deprecated */
|
|
125
|
+
logOpenGeneratedAnswerSource(citationId: string): CustomAction;
|
|
126
|
+
logOpenGeneratedAnswerSource(citationId: string, answerId?: string): CustomAction;
|
|
127
|
+
/** @deprecated */
|
|
128
|
+
logHoverCitation(citationId: string, citationHoverTimeMs: number): CustomAction;
|
|
129
|
+
logHoverCitation(citationId: string, citationHoverTimeMs: number, answerId?: string): CustomAction;
|
|
89
130
|
logGeneratedAnswerShowAnswers: () => CustomAction;
|
|
90
131
|
logGeneratedAnswerHideAnswers: () => CustomAction;
|
|
91
|
-
|
|
132
|
+
/** @deprecated */
|
|
133
|
+
logCopyGeneratedAnswer(): CustomAction;
|
|
134
|
+
logCopyGeneratedAnswer(answerId?: string): CustomAction;
|
|
92
135
|
logRetryGeneratedAnswer: () => LegacySearchAction;
|
|
93
136
|
logGeneratedAnswerExpand: () => CustomAction;
|
|
94
137
|
logGeneratedAnswerCollapse: () => CustomAction;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { GeneratedAnswerCitation } from '../../api/generated-answer/generated-answer-event-payload.js';
|
|
2
2
|
import type { SearchEngine } from '../../app/search-engine/search-engine.js';
|
|
3
|
-
import type { GeneratedAnswerBase, GeneratedAnswerState, GenerationStep } from '../../features/generated-answer/generated-answer-state.js';
|
|
3
|
+
import type { GeneratedAnswerBase, GeneratedAnswerState, GenerationStep, GenerationStepName } from '../../features/generated-answer/generated-answer-state.js';
|
|
4
4
|
import type { GeneratedResponseFormat } from '../../features/generated-answer/generated-response-format.js';
|
|
5
5
|
import type { GeneratedAnswer, GeneratedAnswerProps, GeneratedAnswerPropsInitialState } from '../core/generated-answer/headless-core-generated-answer.js';
|
|
6
6
|
import { type GeneratedAnswerWithFollowUps, type GeneratedAnswerWithFollowUpsState } from '../knowledge/generated-answer/headless-generated-answer-with-follow-ups.js';
|
|
7
|
-
export type { GeneratedAnswerCitation, GeneratedResponseFormat, GeneratedAnswerState, GeneratedAnswer, GeneratedAnswerWithFollowUps, GeneratedAnswerWithFollowUpsState, GeneratedAnswerBase, GeneratedAnswerProps, GeneratedAnswerPropsInitialState, GenerationStep, };
|
|
7
|
+
export type { GeneratedAnswerCitation, GeneratedResponseFormat, GeneratedAnswerState, GeneratedAnswer, GeneratedAnswerWithFollowUps, GeneratedAnswerWithFollowUpsState, GeneratedAnswerBase, GeneratedAnswerProps, GeneratedAnswerPropsInitialState, GenerationStep, GenerationStepName, };
|
|
8
8
|
/**
|
|
9
9
|
* Creates a `GeneratedAnswer` controller instance.
|
|
10
10
|
|
|
@@ -13,17 +13,30 @@ export interface GeneratedAnswerWithFollowUps extends GeneratedAnswer {
|
|
|
13
13
|
state: GeneratedAnswerWithFollowUpsState;
|
|
14
14
|
/**
|
|
15
15
|
* Marks the answer as liked.
|
|
16
|
-
* @param answerId - Optional ID of the answer to like. Defaults to the
|
|
16
|
+
* @param answerId - Optional ID of the answer to like. Defaults to the first answer.
|
|
17
17
|
*/
|
|
18
18
|
like(answerId?: string): void;
|
|
19
19
|
/**
|
|
20
20
|
* Marks the answer as disliked.
|
|
21
|
-
* @param answerId - Optional ID of the answer to dislike. Defaults to the
|
|
21
|
+
* @param answerId - Optional ID of the answer to dislike. Defaults to the first answer.
|
|
22
22
|
*/
|
|
23
23
|
dislike(answerId?: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* Logs a custom event indicating a cited source link was hovered.
|
|
26
|
+
* @param citationId - The ID of the hovered citation.
|
|
27
|
+
* @param citationHoverTimeMs - The number of milliseconds spent hovering over the citation.
|
|
28
|
+
* @param answerId - Optional ID of the answer for which the citation was hovered. Defaults to the first answer.
|
|
29
|
+
*/
|
|
30
|
+
logCitationHover(citationId: string, citationHoverTimeMs: number, answerId?: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Logs a click on a cited source link for analytics.
|
|
33
|
+
* @param citationId - The ID of the clicked citation.
|
|
34
|
+
* @param answerId - Optional ID of the answer for which the citation was clicked. Defaults to the first answer.
|
|
35
|
+
*/
|
|
36
|
+
logCitationClick(citationId: string, answerId?: string): void;
|
|
24
37
|
/**
|
|
25
38
|
* Logs a copy-to-clipboard interaction for analytics.
|
|
26
|
-
* @param answerId - Optional ID of the copied answer. Defaults to the
|
|
39
|
+
* @param answerId - Optional ID of the copied answer. Defaults to the first answer.
|
|
27
40
|
*/
|
|
28
41
|
logCopyToClipboard(answerId?: string): void;
|
|
29
42
|
/**
|
|
@@ -12,10 +12,14 @@ export type GeneratedAnswerFeedback = {
|
|
|
12
12
|
};
|
|
13
13
|
export declare const parseEvaluationDetails: (detail: "yes" | "no" | "unknown") => boolean | undefined;
|
|
14
14
|
export declare const logRetryGeneratedAnswer: () => LegacySearchAction;
|
|
15
|
-
export declare
|
|
16
|
-
export declare
|
|
17
|
-
export declare
|
|
18
|
-
export declare
|
|
15
|
+
export declare function logOpenGeneratedAnswerSource(citationId: string): CustomAction;
|
|
16
|
+
export declare function logOpenGeneratedAnswerSource(citationId: string, answerId: string): CustomAction;
|
|
17
|
+
export declare function logHoverCitation(citationId: string, citationHoverTimeInMs: number): CustomAction;
|
|
18
|
+
export declare function logHoverCitation(citationId: string, citationHoverTimeInMs: number, answerId: string): CustomAction;
|
|
19
|
+
export declare function logLikeGeneratedAnswer(): CustomAction;
|
|
20
|
+
export declare function logLikeGeneratedAnswer(answerId: string): CustomAction;
|
|
21
|
+
export declare function logDislikeGeneratedAnswer(): CustomAction;
|
|
22
|
+
export declare function logDislikeGeneratedAnswer(answerId: string): CustomAction;
|
|
19
23
|
export declare const logGeneratedAnswerFeedback: (feedback: GeneratedAnswerFeedback) => CustomAction;
|
|
20
24
|
export declare const logGeneratedAnswerStreamEnd: (answerGenerated: boolean) => CustomAction;
|
|
21
25
|
export declare const logGeneratedAnswerResponseLinked: () => CustomAction;
|
|
@@ -23,18 +27,19 @@ export declare const logGeneratedAnswerShowAnswers: () => CustomAction;
|
|
|
23
27
|
export declare const logGeneratedAnswerHideAnswers: () => CustomAction;
|
|
24
28
|
export declare const logGeneratedAnswerExpand: () => CustomAction;
|
|
25
29
|
export declare const logGeneratedAnswerCollapse: () => CustomAction;
|
|
26
|
-
export declare
|
|
30
|
+
export declare function logCopyGeneratedAnswer(): CustomAction;
|
|
31
|
+
export declare function logCopyGeneratedAnswer(answerId: string): CustomAction;
|
|
27
32
|
export declare const retryGeneratedAnswer: () => SearchAction;
|
|
28
33
|
export declare const generatedAnswerAnalyticsClient: {
|
|
29
|
-
logCopyGeneratedAnswer:
|
|
34
|
+
logCopyGeneratedAnswer: typeof logCopyGeneratedAnswer;
|
|
30
35
|
logGeneratedAnswerHideAnswers: () => CustomAction;
|
|
31
36
|
logGeneratedAnswerShowAnswers: () => CustomAction;
|
|
32
37
|
logGeneratedAnswerStreamEnd: (answerGenerated: boolean) => CustomAction;
|
|
33
38
|
logGeneratedAnswerFeedback: (feedback: GeneratedAnswerFeedback) => CustomAction;
|
|
34
|
-
logDislikeGeneratedAnswer:
|
|
35
|
-
logLikeGeneratedAnswer:
|
|
36
|
-
logHoverCitation:
|
|
37
|
-
logOpenGeneratedAnswerSource:
|
|
39
|
+
logDislikeGeneratedAnswer: typeof logDislikeGeneratedAnswer;
|
|
40
|
+
logLikeGeneratedAnswer: typeof logLikeGeneratedAnswer;
|
|
41
|
+
logHoverCitation: typeof logHoverCitation;
|
|
42
|
+
logOpenGeneratedAnswerSource: typeof logOpenGeneratedAnswerSource;
|
|
38
43
|
logRetryGeneratedAnswer: () => LegacySearchAction;
|
|
39
44
|
logGeneratedAnswerExpand: () => CustomAction;
|
|
40
45
|
logGeneratedAnswerCollapse: () => CustomAction;
|
|
@@ -63,7 +63,7 @@ export type { FieldSuggestions, FieldSuggestionsOptions, FieldSuggestionsProps,
|
|
|
63
63
|
export { buildFieldSuggestions } from './controllers/field-suggestions/facet/headless-field-suggestions.js';
|
|
64
64
|
export type { FoldedCollection, FoldedResult, FoldedResultList, FoldedResultListOptions, FoldedResultListProps, FoldedResultListState, FoldingOptions, } from './controllers/folded-result-list/headless-folded-result-list.js';
|
|
65
65
|
export { buildFoldedResultList } from './controllers/folded-result-list/headless-folded-result-list.js';
|
|
66
|
-
export type { GeneratedAnswer, GeneratedAnswerBase, GeneratedAnswerCitation, GeneratedAnswerProps, GeneratedAnswerPropsInitialState, GeneratedAnswerState, GeneratedAnswerWithFollowUps, GeneratedAnswerWithFollowUpsState, GeneratedResponseFormat, GenerationStep, } from './controllers/generated-answer/headless-generated-answer.js';
|
|
66
|
+
export type { GeneratedAnswer, GeneratedAnswerBase, GeneratedAnswerCitation, GeneratedAnswerProps, GeneratedAnswerPropsInitialState, GeneratedAnswerState, GeneratedAnswerWithFollowUps, GeneratedAnswerWithFollowUpsState, GeneratedResponseFormat, GenerationStep, GenerationStepName, } from './controllers/generated-answer/headless-generated-answer.js';
|
|
67
67
|
export { buildGeneratedAnswer } from './controllers/generated-answer/headless-generated-answer.js';
|
|
68
68
|
export type { InteractiveCitation, InteractiveCitationOptions, InteractiveCitationProps, } from './controllers/generated-answer/headless-interactive-citation.js';
|
|
69
69
|
export { buildInteractiveCitation } from './controllers/generated-answer/headless-interactive-citation.js';
|