@coveo/quantic 3.43.3 → 3.43.4
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/lwc/quanticBreadcrumbManager/e2e/data.ts +130 -0
- package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/fixture.ts +25 -14
- package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/quanticBreadcrumbManager.e2e.ts +57 -16
- package/force-app/main/default/lwc/quanticCardContainer/quanticCardContainer.css +3 -4
- package/force-app/main/default/lwc/quanticCardContainer/quanticCardContainer.html +1 -1
- package/force-app/main/default/lwc/quanticCarousel/quanticCarousel.css +5 -5
- package/force-app/main/default/lwc/quanticCaseClassification/quanticCaseClassification.css +3 -3
- package/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.css +1 -1
- package/force-app/main/default/lwc/quanticCitation/quanticCitation.css +12 -11
- package/force-app/main/default/lwc/quanticDidYouMean/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticDocumentSuggestion/quanticDocumentSuggestion.css +2 -2
- package/force-app/main/default/lwc/quanticFacet/quanticFacet.css +1 -1
- package/force-app/main/default/lwc/quanticFacetManager/e2e/data.ts +59 -0
- package/force-app/main/default/lwc/quanticFacetManager/e2e/fixture.ts +26 -15
- package/force-app/main/default/lwc/quanticFacetManager/e2e/quanticFacetManager.e2e.ts +7 -7
- package/force-app/main/default/lwc/quanticFacetStyles/quanticFacetStyles.css +10 -10
- package/force-app/main/default/lwc/quanticFeedbackModalQna/templates/quanticFeedbackModalQna.css +1 -1
- package/force-app/main/default/lwc/quanticFoldedResultList/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/agentData.ts +32 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/pageObject.ts +6 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswerAgent.e2e.ts +66 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.css +1 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.css +3 -3
- package/force-app/main/default/lwc/quanticGeneratedAnswerBody/__tests__/quanticGeneratedAnswerBody.test.js +39 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswerBody/quanticGeneratedAnswerBody.js +4 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswerContent/templates/generatedMarkdownContent.css +21 -21
- package/force-app/main/default/lwc/quanticGeneratedAnswerContent/templates/generatedTextContent.css +2 -2
- package/force-app/main/default/lwc/quanticGeneratedAnswerFollowUpInput/quanticGeneratedAnswerFollowUpInput.css +9 -9
- package/force-app/main/default/lwc/quanticGeneratedAnswerStreamOfThought/quanticGeneratedAnswerStreamOfThought.css +2 -2
- package/force-app/main/default/lwc/quanticGeneratedAnswerThread/quanticGeneratedAnswerThread.css +8 -8
- package/force-app/main/default/lwc/quanticInsightSummary/quanticInsightSummary.css +2 -1
- package/force-app/main/default/lwc/quanticModal/quanticModal.css +3 -3
- package/force-app/main/default/lwc/quanticNotifications/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticNotifications/quanticNotifications.css +2 -2
- package/force-app/main/default/lwc/quanticPill/quanticPill.css +2 -2
- package/force-app/main/default/lwc/quanticPlaceholder/quanticPlaceholder.css +2 -6
- package/force-app/main/default/lwc/quanticPlaceholder/quanticPlaceholder.html +1 -1
- package/force-app/main/default/lwc/quanticRadioButtonsGroup/quanticRadioButtonsGroup.css +9 -9
- package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/fixture.ts +1 -0
- package/force-app/main/default/lwc/quanticRecentQueriesList/quanticRecentQueriesList.css +3 -7
- package/force-app/main/default/lwc/quanticRecentQueriesList/quanticRecentQueriesList.html +1 -1
- package/force-app/main/default/lwc/quanticRecentResultsList/e2e/fixture.ts +1 -0
- package/force-app/main/default/lwc/quanticRecentResultsList/quanticRecentResultsList.css +2 -6
- package/force-app/main/default/lwc/quanticRecentResultsList/quanticRecentResultsList.html +1 -1
- package/force-app/main/default/lwc/quanticRecommendationList/e2e/fixture.ts +1 -0
- package/force-app/main/default/lwc/quanticRecommendationList/quanticRecommendationList.css +1 -1
- package/force-app/main/default/lwc/quanticRefineToggle/quanticRefineToggle.css +4 -4
- package/force-app/main/default/lwc/quanticResultActionStyles/quanticResultActionStyles.css +2 -2
- package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/fixture.ts +5 -2
- package/force-app/main/default/lwc/quanticResultLink/quanticResultLink.css +1 -1
- package/force-app/main/default/lwc/quanticResultList/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticResultPrintableUri/quanticResultPrintableUri.css +1 -1
- package/force-app/main/default/lwc/quanticResultQuickview/e2e/fixture.ts +7 -3
- package/force-app/main/default/lwc/quanticResultQuickview/quanticResultQuickview.css +6 -6
- package/force-app/main/default/lwc/quanticResultTag/quanticResultTag.css +2 -0
- package/force-app/main/default/lwc/quanticResultTemplate/quanticResultTemplate.css +1 -1
- package/force-app/main/default/lwc/quanticResultsPerPage/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticSearchBox/e2e/fixture.ts +3 -1
- package/force-app/main/default/lwc/quanticSearchBoxInput/templates/defaultSearchBoxInput.css +1 -1
- package/force-app/main/default/lwc/quanticSearchBoxInput/templates/expandableSearchBoxInput.css +4 -12
- package/force-app/main/default/lwc/quanticSearchBoxInput/templates/expandableSearchBoxInput.html +2 -2
- package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/fixture.ts +3 -0
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/fixture.ts +6 -4
- package/force-app/main/default/lwc/quanticSmartSnippetSource/quanticSmartSnippetSource.css +1 -1
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/fixture.ts +6 -4
- package/force-app/main/default/lwc/quanticSort/quanticSort.css +3 -3
- package/force-app/main/default/lwc/quanticSourceCitations/quanticSourceCitations.css +1 -1
- package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/fixture.ts +2 -1
- package/force-app/main/default/lwc/quanticStatefulButton/quanticStatefulButton.css +2 -2
- package/force-app/main/default/lwc/quanticTab/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticTabBar/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticTabBar/e2e/quanticTabBar.e2e.ts +3 -2
- package/force-app/main/default/lwc/quanticThreadItem/quanticThreadItem.css +6 -6
- package/force-app/main/default/lwc/quanticThreadItem/quanticThreadItem.js +0 -1
- package/force-app/main/default/lwc/quanticTimeframeFacet/quanticTimeframeFacet.css +1 -1
- package/force-app/main/default/lwc/quanticTooltip/quanticTooltip.css +3 -3
- package/force-app/main/default/lwc/quanticUserAction/quanticUserAction.css +7 -7
- package/force-app/main/default/lwc/quanticUserActionsSession/quanticUserActionsSession.css +3 -3
- package/force-app/main/default/lwc/quanticUserActionsTimeline/templates/userActionsTimeline.css +2 -2
- package/force-app/main/default/lwc/searchBoxStyle/searchBoxStyle.css +10 -10
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +17 -17
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/case-assist-analytics.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/insight-analytics.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/search-analytics.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/engine-configuration.d.ts +34 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/insight-thunk-extra-arguments.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/search-thunk-extra-arguments.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/thunk-extra-arguments.d.ts +9 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-core-generated-answer.d.ts +1 -25
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-searchapi-generated-answer.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/field-suggestions/facet/headless-field-suggestions.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/headless-answerapi-generated-answer.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/headless-generated-answer-with-follow-ups.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-utils.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/attached-results/attached-results-analytics-actions.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-analytics-client.d.ts +38 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-insight-analytics-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/result/result-insight-analytics-actions.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/headless.js +17 -17
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +16 -16
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +16 -16
- package/package.json +3 -3
|
@@ -13,6 +13,7 @@ interface ConfigureCaseAssistAnalyticsOptions {
|
|
|
13
13
|
analyticsClientMiddleware?: AnalyticsClientSendEventHook;
|
|
14
14
|
preprocessRequest?: PreprocessRequest;
|
|
15
15
|
provider?: CaseAssistClientProvider;
|
|
16
|
+
disableBrowserPrivacySignals?: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare const configureCaseAssistAnalytics: ({ logger, getState, analyticsClientMiddleware, preprocessRequest, provider, }: ConfigureCaseAssistAnalyticsOptions) => CaseAssistClient;
|
|
18
|
+
export declare const configureCaseAssistAnalytics: ({ logger, getState, analyticsClientMiddleware, preprocessRequest, provider, disableBrowserPrivacySignals, }: ConfigureCaseAssistAnalyticsOptions) => CaseAssistClient;
|
|
18
19
|
export {};
|
|
@@ -27,6 +27,7 @@ interface ConfigureInsightAnalyticsOptions {
|
|
|
27
27
|
preprocessRequest?: PreprocessRequest;
|
|
28
28
|
provider?: InsightClientProvider;
|
|
29
29
|
getState(): StateNeededByInsightAnalyticsProvider;
|
|
30
|
+
disableBrowserPrivacySignals?: boolean;
|
|
30
31
|
}
|
|
31
|
-
export declare const configureInsightAnalytics: ({ logger, getState, analyticsClientMiddleware, preprocessRequest, provider, }: ConfigureInsightAnalyticsOptions) => CoveoInsightClient;
|
|
32
|
+
export declare const configureInsightAnalytics: ({ logger, getState, analyticsClientMiddleware, preprocessRequest, provider, disableBrowserPrivacySignals, }: ConfigureInsightAnalyticsOptions) => CoveoInsightClient;
|
|
32
33
|
export {};
|
|
@@ -96,8 +96,9 @@ interface LegacyConfigureAnalyticsOptions<State extends ConfigurationSection = S
|
|
|
96
96
|
preprocessRequest?: PreprocessRequest;
|
|
97
97
|
provider?: SearchPageClientProvider;
|
|
98
98
|
getState(): State;
|
|
99
|
+
disableBrowserPrivacySignals?: boolean;
|
|
99
100
|
}
|
|
100
|
-
export declare const configureLegacyAnalytics: <State extends ConfigurationSection = StateNeededBySearchAnalyticsProvider>({ logger, getState, analyticsClientMiddleware, preprocessRequest, provider, }: LegacyConfigureAnalyticsOptions<State> & {
|
|
101
|
+
export declare const configureLegacyAnalytics: <State extends ConfigurationSection = StateNeededBySearchAnalyticsProvider>({ logger, getState, analyticsClientMiddleware, preprocessRequest, provider, disableBrowserPrivacySignals, }: LegacyConfigureAnalyticsOptions<State> & {
|
|
101
102
|
provider: SearchPageClientProvider;
|
|
102
103
|
}) => CoveoSearchPageClient;
|
|
103
104
|
export declare const getPageID: () => string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { GeneratedAnswerAnalyticsClient } from '../../features/generated-answer/generated-answer-analytics-client.js';
|
|
2
3
|
import type { AnswerApiQueryParams } from '../../features/generated-answer/generated-answer-request.js';
|
|
3
4
|
import type { EventSourceMessage } from '../../utils/fetch-event-source/parse.js';
|
|
4
5
|
import type { GeneratedAnswerStream } from './generated-answer-stream.js';
|
|
5
6
|
import type { StreamAnswerAPIState } from './stream-answer-api-state.js';
|
|
6
|
-
export declare const updateCacheWithEvent: (event: EventSourceMessage, draft: GeneratedAnswerStream, dispatch: ThunkDispatch<StreamAnswerAPIState, unknown, UnknownAction
|
|
7
|
+
export declare const updateCacheWithEvent: (event: EventSourceMessage, draft: GeneratedAnswerStream, dispatch: ThunkDispatch<StreamAnswerAPIState, unknown, UnknownAction>, generatedAnswerAnalyticsClient: GeneratedAnswerAnalyticsClient) => void;
|
|
7
8
|
export declare const buildAnswerEndpoint: (platformEndpoint: string, organizationId: string, answerConfigurationId: string, insightId?: string) => string;
|
|
8
9
|
export declare const answerApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, {
|
|
9
10
|
getAnswer: import("@reduxjs/toolkit/query").QueryDefinition<AnswerApiQueryParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GeneratedAnswerStream, "answer", unknown>;
|
|
@@ -138,6 +138,40 @@ export interface AnalyticsConfiguration {
|
|
|
138
138
|
* See [Headless proxy: Analytics](https://docs.coveo.com/en/headless/latest/usage/proxy#analytics).
|
|
139
139
|
*/
|
|
140
140
|
proxyBaseUrl?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Whether to stop honoring browser privacy signals — Do Not Track (DNT) and
|
|
143
|
+
* Global Privacy Control (GPC) — when deciding whether to send **legacy**
|
|
144
|
+
* analytics (`analyticsMode: 'legacy'`).
|
|
145
|
+
*
|
|
146
|
+
* By default (`false`), Coveo libraries honor these signals: when the browser
|
|
147
|
+
* presents DNT or GPC, legacy analytics is automatically disabled. Setting this
|
|
148
|
+
* option to `true` is a deliberate choice that you configure in your own
|
|
149
|
+
* application code; legacy analytics events are then sent even when the browser
|
|
150
|
+
* presents a DNT or GPC signal.
|
|
151
|
+
*
|
|
152
|
+
* Coveo honors these signals by default and cannot determine whether overriding
|
|
153
|
+
* them is appropriate for your use case. If you enable this option, you are
|
|
154
|
+
* responsible for ensuring that doing so complies with the privacy laws and
|
|
155
|
+
* obligations that apply to you. Note that GPC is legally recognized as a valid
|
|
156
|
+
* opt-out mechanism in some jurisdictions (for example, under the California
|
|
157
|
+
* Consumer Privacy Act (CCPA) as amended by the California Privacy Rights Act
|
|
158
|
+
* (CPRA)).
|
|
159
|
+
*
|
|
160
|
+
* This option:
|
|
161
|
+
* - applies only when `analyticsMode` is explicitly set to `'legacy'`;
|
|
162
|
+
* - has no effect with `analyticsMode: 'next'`, which does not honor these signals;
|
|
163
|
+
* - does not override an explicit `enabled: false` or a runtime
|
|
164
|
+
* `disableAnalytics()` call, which always disable analytics.
|
|
165
|
+
*
|
|
166
|
+
* @deprecated Introduced as deprecated on purpose to signal that it is
|
|
167
|
+
* transitional. This option exists only to bridge legacy-analytics deployments
|
|
168
|
+
* where a browser privacy signal is enforced by policy, and it will be removed
|
|
169
|
+
* when legacy analytics is removed (see KIT-2844). Migrate to Event Protocol
|
|
170
|
+
* (`analyticsMode: 'next'`) rather than relying on this option long term.
|
|
171
|
+
*
|
|
172
|
+
* @defaultValue `false`
|
|
173
|
+
*/
|
|
174
|
+
disableBrowserPrivacySignals?: boolean;
|
|
141
175
|
}
|
|
142
176
|
export type AnalyticsRuntimeEnvironment = IRuntimeEnvironment;
|
|
143
177
|
export declare const engineConfigurationDefinitions: SchemaDefinition<EngineConfiguration>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { InsightAPIClient } from '../api/service/insight/insight-api-client.js';
|
|
2
|
+
import type { GeneratedAnswerAnalyticsClient } from '../features/generated-answer/generated-answer-analytics-client.js';
|
|
2
3
|
import type { ClientThunkExtraArguments } from './thunk-extra-arguments.js';
|
|
3
4
|
export interface InsightThunkExtraArguments extends ClientThunkExtraArguments<InsightAPIClient> {
|
|
5
|
+
generatedAnswerAnalyticsClient: GeneratedAnswerAnalyticsClient;
|
|
4
6
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { GeneratedAnswerAPIClient } from '../api/generated-answer/generated-answer-client.js';
|
|
2
2
|
import type { SearchAPIClient } from '../api/search/search-api-client.js';
|
|
3
|
+
import type { GeneratedAnswerAnalyticsClient } from '../features/generated-answer/generated-answer-analytics-client.js';
|
|
3
4
|
import type { ClientThunkExtraArguments } from './thunk-extra-arguments.js';
|
|
4
5
|
export interface SearchThunkExtraArguments extends ClientThunkExtraArguments<SearchAPIClient, GeneratedAnswerAPIClient> {
|
|
6
|
+
generatedAnswerAnalyticsClient: GeneratedAnswerAnalyticsClient;
|
|
5
7
|
}
|
|
@@ -3,6 +3,7 @@ import type { AnalyticsClientSendEventHook } from 'coveo.analytics';
|
|
|
3
3
|
import type { Logger } from 'pino';
|
|
4
4
|
import type { GeneratedAnswerAPIClient } from '../api/generated-answer/generated-answer-client.js';
|
|
5
5
|
import { type PreprocessRequest } from '../api/preprocess-request.js';
|
|
6
|
+
import type { GeneratedAnswerAnalyticsClient } from '../features/generated-answer/generated-answer-analytics-client.js';
|
|
6
7
|
import { validatePayloadAndThrow } from '../utils/validate-payload.js';
|
|
7
8
|
import type { EngineConfiguration } from './engine-configuration.js';
|
|
8
9
|
import type { NavigatorContext } from './navigator-context-provider.js';
|
|
@@ -11,11 +12,19 @@ export interface ClientThunkExtraArguments<T, K = GeneratedAnswerAPIClient> exte
|
|
|
11
12
|
streamingClient?: K;
|
|
12
13
|
relay: Relay;
|
|
13
14
|
navigatorContext: NavigatorContext;
|
|
15
|
+
generatedAnswerAnalyticsClient?: GeneratedAnswerAnalyticsClient;
|
|
14
16
|
}
|
|
15
17
|
export interface ThunkExtraArguments {
|
|
16
18
|
preprocessRequest?: PreprocessRequest;
|
|
17
19
|
analyticsClientMiddleware: AnalyticsClientSendEventHook;
|
|
18
20
|
logger: Logger;
|
|
19
21
|
validatePayload: typeof validatePayloadAndThrow;
|
|
22
|
+
/**
|
|
23
|
+
* Legacy-analytics-only, immutable engine policy. When `true`, browser privacy
|
|
24
|
+
* signals (Do Not Track and Global Privacy Control) are not honored. Sourced from
|
|
25
|
+
* the engine configuration at build time and intentionally kept out of Redux
|
|
26
|
+
* analytics state so it cannot be mutated at runtime.
|
|
27
|
+
*/
|
|
28
|
+
disableBrowserPrivacySignals?: boolean;
|
|
20
29
|
}
|
|
21
30
|
export declare function buildThunkExtraArguments(configuration: EngineConfiguration, logger: Logger): ThunkExtraArguments;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CoreEngine } from '../../../app/engine.js';
|
|
2
|
-
import type { CustomAction, LegacySearchAction } from '../../../features/analytics/analytics-utils.js';
|
|
3
2
|
import type { GeneratedAnswerFeedback } from '../../../features/generated-answer/generated-answer-analytics-actions.js';
|
|
3
|
+
import type { GeneratedAnswerAnalyticsClient } from '../../../features/generated-answer/generated-answer-analytics-client.js';
|
|
4
4
|
import type { GeneratedAnswerState } from '../../../features/generated-answer/generated-answer-state.js';
|
|
5
5
|
import type { GeneratedResponseFormat } from '../../../features/generated-answer/generated-response-format.js';
|
|
6
6
|
import { type Controller } from '../../controller/headless-controller.js';
|
|
@@ -101,30 +101,6 @@ export interface GeneratedAnswer extends Controller {
|
|
|
101
101
|
*/
|
|
102
102
|
logCitationHover(citationId: string, citationHoverTimeMs: number, answerId: string): void;
|
|
103
103
|
}
|
|
104
|
-
export interface GeneratedAnswerAnalyticsClient {
|
|
105
|
-
/** @deprecated */
|
|
106
|
-
logLikeGeneratedAnswer(): CustomAction;
|
|
107
|
-
logLikeGeneratedAnswer(answerId?: string): CustomAction;
|
|
108
|
-
/** @deprecated */
|
|
109
|
-
logDislikeGeneratedAnswer(): CustomAction;
|
|
110
|
-
logDislikeGeneratedAnswer(answerId?: string): CustomAction;
|
|
111
|
-
logGeneratedAnswerFeedback: (feedback: GeneratedAnswerFeedback) => CustomAction;
|
|
112
|
-
/** @deprecated */
|
|
113
|
-
logOpenGeneratedAnswerSource(citationId: string): CustomAction;
|
|
114
|
-
logOpenGeneratedAnswerSource(citationId: string, answerId?: string): CustomAction;
|
|
115
|
-
logOpenGeneratedAnswerFollowUpSource?(citationId: string, answerId: string): CustomAction;
|
|
116
|
-
/** @deprecated */
|
|
117
|
-
logHoverCitation(citationId: string, citationHoverTimeMs: number): CustomAction;
|
|
118
|
-
logHoverCitation(citationId: string, citationHoverTimeMs: number, answerId?: string): CustomAction;
|
|
119
|
-
logGeneratedAnswerShowAnswers: () => CustomAction;
|
|
120
|
-
logGeneratedAnswerHideAnswers: () => CustomAction;
|
|
121
|
-
/** @deprecated */
|
|
122
|
-
logCopyGeneratedAnswer(): CustomAction;
|
|
123
|
-
logCopyGeneratedAnswer(answerId?: string): CustomAction;
|
|
124
|
-
logRetryGeneratedAnswer: () => LegacySearchAction;
|
|
125
|
-
logGeneratedAnswerExpand: () => CustomAction;
|
|
126
|
-
logGeneratedAnswerCollapse: () => CustomAction;
|
|
127
|
-
}
|
|
128
104
|
export interface GeneratedAnswerPropsInitialState {
|
|
129
105
|
initialState?: {
|
|
130
106
|
/**
|
|
@@ -6,7 +6,8 @@ import type { SearchEngine } from '../../../app/search-engine/search-engine.js';
|
|
|
6
6
|
import type { ClientThunkExtraArguments } from '../../../app/thunk-extra-arguments.js';
|
|
7
7
|
import type { ConfigurationState } from '../../../features/configuration/configuration-state.js';
|
|
8
8
|
import type { DebugSection, GeneratedAnswerSection, SearchSection } from '../../../state/state-sections.js';
|
|
9
|
-
import { type GeneratedAnswer, type
|
|
9
|
+
import { type GeneratedAnswer, type GeneratedAnswerProps } from './headless-core-generated-answer.js';
|
|
10
|
+
import type { GeneratedAnswerAnalyticsClient } from '../../../features/generated-answer/generated-answer-analytics-client.js';
|
|
10
11
|
interface SearchAPIGeneratedAnswer extends GeneratedAnswer {
|
|
11
12
|
}
|
|
12
13
|
interface SubscribeStateManager {
|
|
@@ -47,6 +47,7 @@ export interface FieldSuggestionsState {
|
|
|
47
47
|
*
|
|
48
48
|
* This controller is a wrapper around the basic facet controller search functionality, and thus exposes similar options and properties.
|
|
49
49
|
*
|
|
50
|
+
* Example: [field-suggestions.tsx](https://github.com/coveo/ui-kit/blob/main/samples/headless/search-react/src/components/field-suggestions.tsx)
|
|
50
51
|
*
|
|
51
52
|
* @group Controllers
|
|
52
53
|
* @category FieldSuggestions
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { InsightEngine } from '../../../app/insight-engine/insight-engine.js';
|
|
2
2
|
import type { SearchEngine } from '../../../app/search-engine/search-engine.js';
|
|
3
3
|
import type { GeneratedAnswerFeedback } from '../../../features/generated-answer/generated-answer-analytics-actions.js';
|
|
4
|
-
import { type GeneratedAnswer, type
|
|
4
|
+
import { type GeneratedAnswer, type GeneratedAnswerProps } from '../../core/generated-answer/headless-core-generated-answer.js';
|
|
5
|
+
import type { GeneratedAnswerAnalyticsClient } from '../../../features/generated-answer/generated-answer-analytics-client.js';
|
|
5
6
|
interface AnswerApiGeneratedAnswer extends Omit<GeneratedAnswer, 'sendFeedback'> {
|
|
6
7
|
/**
|
|
7
8
|
* Resets the last answer.
|
|
@@ -2,7 +2,8 @@ import type { InsightEngine } from '../../../app/insight-engine/insight-engine.j
|
|
|
2
2
|
import type { SearchEngine } from '../../../app/search-engine/search-engine.js';
|
|
3
3
|
import type { FollowUpAnswersState } from '../../../features/follow-up-answers/follow-up-answers-state.js';
|
|
4
4
|
import type { GeneratedAnswerState } from '../../../index.js';
|
|
5
|
-
import { type GeneratedAnswer, type
|
|
5
|
+
import { type GeneratedAnswer, type GeneratedAnswerProps } from '../../core/generated-answer/headless-core-generated-answer.js';
|
|
6
|
+
import type { GeneratedAnswerAnalyticsClient } from '../../../features/generated-answer/generated-answer-analytics-client.js';
|
|
6
7
|
export interface GeneratedAnswerWithFollowUpsState extends GeneratedAnswerState {
|
|
7
8
|
followUpAnswers: FollowUpAnswersState;
|
|
8
9
|
}
|
|
@@ -21,6 +21,7 @@ type PreparableAnalyticsActionOptions<StateNeeded extends ConfigurationSection>
|
|
|
21
21
|
preprocessRequest: PreprocessRequest | undefined;
|
|
22
22
|
logger: Logger;
|
|
23
23
|
getState(): StateNeeded;
|
|
24
|
+
disableBrowserPrivacySignals?: boolean;
|
|
24
25
|
};
|
|
25
26
|
export type AnalyticsAsyncThunk<StateNeeded extends ConfigurationSection = StateNeededBySearchAnalyticsProvider> = AsyncThunk<void, void, AsyncThunkAnalyticsOptions<StateNeeded>> & UnknownAction;
|
|
26
27
|
export declare function makeBasicNewSearchAnalyticsAction(actionCause: string, getState: () => StateNeededBySearchAnalyticsProvider): {
|
|
@@ -47,6 +47,7 @@ export declare const logCaseAttach: (result: Result) => ((arg?: undefined, confi
|
|
|
47
47
|
preprocessRequest: import("../../api/preprocess-request.js").PreprocessRequest | undefined;
|
|
48
48
|
logger: import("pino").Logger;
|
|
49
49
|
getState(): import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider;
|
|
50
|
+
disableBrowserPrivacySignals?: boolean;
|
|
50
51
|
}) => Promise<{
|
|
51
52
|
description?: import("coveo.analytics").EventDescription;
|
|
52
53
|
action: import("../analytics/analytics-utils.js").AnalyticsAsyncThunk<import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider>;
|
|
@@ -99,6 +100,7 @@ export declare const logCaseDetach: (result: Result) => ((arg?: undefined, confi
|
|
|
99
100
|
preprocessRequest: import("../../api/preprocess-request.js").PreprocessRequest | undefined;
|
|
100
101
|
logger: import("pino").Logger;
|
|
101
102
|
getState(): import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider;
|
|
103
|
+
disableBrowserPrivacySignals?: boolean;
|
|
102
104
|
}) => Promise<{
|
|
103
105
|
description?: import("coveo.analytics").EventDescription;
|
|
104
106
|
action: import("../analytics/analytics-utils.js").AnalyticsAsyncThunk<import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider>;
|
|
@@ -151,6 +153,7 @@ export declare const logCitationDocumentAttach: (citation: GeneratedAnswerCitati
|
|
|
151
153
|
preprocessRequest: import("../../api/preprocess-request.js").PreprocessRequest | undefined;
|
|
152
154
|
logger: import("pino").Logger;
|
|
153
155
|
getState(): import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider;
|
|
156
|
+
disableBrowserPrivacySignals?: boolean;
|
|
154
157
|
}) => Promise<{
|
|
155
158
|
description?: import("coveo.analytics").EventDescription;
|
|
156
159
|
action: import("../analytics/analytics-utils.js").AnalyticsAsyncThunk<import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider>;
|
|
@@ -203,6 +206,7 @@ export declare const logCitationDocumentDetach: (citation: GeneratedAnswerCitati
|
|
|
203
206
|
preprocessRequest: import("../../api/preprocess-request.js").PreprocessRequest | undefined;
|
|
204
207
|
logger: import("pino").Logger;
|
|
205
208
|
getState(): import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider;
|
|
209
|
+
disableBrowserPrivacySignals?: boolean;
|
|
206
210
|
}) => Promise<{
|
|
207
211
|
description?: import("coveo.analytics").EventDescription;
|
|
208
212
|
action: import("../analytics/analytics-utils.js").AnalyticsAsyncThunk<import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CustomAction, LegacySearchAction } from '../analytics/analytics-utils.js';
|
|
2
|
+
import type { GeneratedAnswerFeedback } from './generated-answer-analytics-actions.js';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the analytics actions that a `GeneratedAnswer` controller needs to log
|
|
5
|
+
* analytics events for generated answers.
|
|
6
|
+
*
|
|
7
|
+
* This interface is implemented separately for each use case (e.g., `generatedAnswerAnalyticsClient`
|
|
8
|
+
* for Search, `generatedAnswerInsightAnalyticsClient` for Insight), and the appropriate
|
|
9
|
+
* implementation is registered as a thunk extra argument at engine-build time.
|
|
10
|
+
*
|
|
11
|
+
* @group Controllers
|
|
12
|
+
* @category GeneratedAnswer
|
|
13
|
+
*/
|
|
14
|
+
export interface GeneratedAnswerAnalyticsClient {
|
|
15
|
+
/** @deprecated */
|
|
16
|
+
logLikeGeneratedAnswer(): CustomAction;
|
|
17
|
+
logLikeGeneratedAnswer(answerId?: string): CustomAction;
|
|
18
|
+
/** @deprecated */
|
|
19
|
+
logDislikeGeneratedAnswer(): CustomAction;
|
|
20
|
+
logDislikeGeneratedAnswer(answerId?: string): CustomAction;
|
|
21
|
+
logGeneratedAnswerFeedback: (feedback: GeneratedAnswerFeedback) => CustomAction;
|
|
22
|
+
/** @deprecated */
|
|
23
|
+
logOpenGeneratedAnswerSource(citationId: string): CustomAction;
|
|
24
|
+
logOpenGeneratedAnswerSource(citationId: string, answerId?: string): CustomAction;
|
|
25
|
+
logOpenGeneratedAnswerFollowUpSource?(citationId: string, answerId: string): CustomAction;
|
|
26
|
+
/** @deprecated */
|
|
27
|
+
logHoverCitation(citationId: string, citationHoverTimeMs: number): CustomAction;
|
|
28
|
+
logHoverCitation(citationId: string, citationHoverTimeMs: number, answerId?: string): CustomAction;
|
|
29
|
+
logGeneratedAnswerShowAnswers: () => CustomAction;
|
|
30
|
+
logGeneratedAnswerHideAnswers: () => CustomAction;
|
|
31
|
+
/** @deprecated */
|
|
32
|
+
logCopyGeneratedAnswer(): CustomAction;
|
|
33
|
+
logCopyGeneratedAnswer(answerId?: string): CustomAction;
|
|
34
|
+
logRetryGeneratedAnswer: () => LegacySearchAction;
|
|
35
|
+
logGeneratedAnswerExpand: () => CustomAction;
|
|
36
|
+
logGeneratedAnswerCollapse: () => CustomAction;
|
|
37
|
+
logGeneratedAnswerStreamEnd(answerGenerated: boolean, answerId?: string, answerTextIsEmpty?: boolean): CustomAction;
|
|
38
|
+
}
|
|
@@ -6,7 +6,7 @@ export declare const logHoverCitation: (citationId: string, citationHoverTimeInM
|
|
|
6
6
|
export declare const logLikeGeneratedAnswer: () => InsightAction;
|
|
7
7
|
export declare const logDislikeGeneratedAnswer: () => InsightAction;
|
|
8
8
|
export declare const logGeneratedAnswerFeedback: (feedback: GeneratedAnswerFeedback) => InsightAction;
|
|
9
|
-
export declare const logGeneratedAnswerStreamEnd: (answerGenerated: boolean) => InsightAction;
|
|
9
|
+
export declare const logGeneratedAnswerStreamEnd: (answerGenerated: boolean, answerId?: string, answerTextIsEmpty?: boolean) => InsightAction;
|
|
10
10
|
export declare const logGeneratedAnswerResponseLinked: () => InsightAction;
|
|
11
11
|
export declare const logGeneratedAnswerShowAnswers: () => InsightAction;
|
|
12
12
|
export declare const logGeneratedAnswerHideAnswers: () => InsightAction;
|
|
@@ -17,7 +17,7 @@ export declare const generatedAnswerInsightAnalyticsClient: {
|
|
|
17
17
|
logCopyGeneratedAnswer: () => InsightAction;
|
|
18
18
|
logGeneratedAnswerHideAnswers: () => InsightAction;
|
|
19
19
|
logGeneratedAnswerShowAnswers: () => InsightAction;
|
|
20
|
-
logGeneratedAnswerStreamEnd: (answerGenerated: boolean) => InsightAction;
|
|
20
|
+
logGeneratedAnswerStreamEnd: (answerGenerated: boolean, answerId?: string, answerTextIsEmpty?: boolean) => InsightAction;
|
|
21
21
|
logGeneratedAnswerFeedback: (feedback: GeneratedAnswerFeedback) => InsightAction;
|
|
22
22
|
logDislikeGeneratedAnswer: () => InsightAction;
|
|
23
23
|
logLikeGeneratedAnswer: () => InsightAction;
|
|
@@ -46,6 +46,7 @@ export declare const logDocumentOpen: (result: Result) => ((arg?: undefined, con
|
|
|
46
46
|
preprocessRequest: import("../../api/preprocess-request.js").PreprocessRequest | undefined;
|
|
47
47
|
logger: import("pino").Logger;
|
|
48
48
|
getState(): import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider;
|
|
49
|
+
disableBrowserPrivacySignals?: boolean;
|
|
49
50
|
}) => Promise<{
|
|
50
51
|
description?: import("coveo.analytics").EventDescription;
|
|
51
52
|
action: import("../analytics/analytics-utils.js").AnalyticsAsyncThunk<import("../../api/analytics/insight-analytics.js").StateNeededByInsightAnalyticsProvider>;
|