@coveo/quantic 3.36.6 → 3.36.8
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/api/api-client-utils.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/result.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/product-enrichment/product-enrichment-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/recommendations/recommendations-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/plan/plan-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/agents/answer-agent/head-answer-strategy.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-slice.d.ts +0 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-case-classifications/get-case-classifications-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-document-suggestions/get-document-suggestions-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/query/query-request.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/user-actions/user-actions-request.d.ts +2 -2
- 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/core/generated-answer/headless-core-interactive-citation.d.ts +5 -1
- 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/follow-up-answers/follow-up-answers-actions.d.ts +0 -12
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-actions.d.ts +1 -19
- 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/features/generated-answer/generated-answer-request.d.ts +13 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-selectors.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/index.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/product-list/headless-product-list.ssr.d.ts +14 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce-next.index.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/product-list/headless-product-list.ssr.d.ts +14 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/triggers/headless-query-trigger.ssr.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/recommendation-static-state-factory.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/static-state-factory.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-controller.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-product-listing-controller.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-search-controller.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/facet-utils.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +19 -19
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +18 -18
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +13 -13
- package/package.json +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/answer-generation-api-state.d.ts +0 -29
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/answer-generation-api.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/endpoints/answer/answer-endpoint.d.ts +0 -30
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/endpoints/answer/url-builders/endpoint-url-builder.d.ts +0 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/endpoints/follow-up/follow-up-endpoint.d.ts +0 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/endpoints/follow-up/url-builders/endpoint-url-builder.d.ts +0 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/streaming/answer-draft-reducer/answer-draft-reducer.d.ts +0 -26
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/streaming/answer-streaming-runner.d.ts +0 -26
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/streaming/server-state-event-handler/server-state-event-handler.d.ts +0 -21
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/streaming/strategies/streaming-strategy-creators.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/answer-generation/streaming/types.d.ts +0 -41
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/follow-up-answers/follow-up-answer-request.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/follow-up-answers/follow-up-answer-strategy.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/head-answer-strategy.d.ts +0 -3
package/force-app/main/default/staticresources/coveoheadless/definitions/api/api-client-utils.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { BaseParam } from './platform-service-params.js';
|
|
|
3
3
|
import type { AllSearchAPIResponse } from './search/search-api-client.js';
|
|
4
4
|
import type { SearchAPIErrorWithStatusCode } from './search/search-api-error-response.js';
|
|
5
5
|
import type { AuthenticationParam } from './search/search-api-params.js';
|
|
6
|
-
export declare function pickNonBaseParams<Params extends BaseParam & AuthenticationParam>(req: Params): Omit<Params, "
|
|
6
|
+
export declare function pickNonBaseParams<Params extends BaseParam & AuthenticationParam>(req: Params): Omit<Params, "accessToken" | "organizationId" | "url" | "authentication">;
|
|
7
7
|
export declare const unwrapError: (payload: PlatformResponse<AllSearchAPIResponse>) => SearchAPIErrorWithStatusCode;
|
|
@@ -29,11 +29,11 @@ export declare const getRequestOptions: (req: FilterableCommerceAPIRequest, path
|
|
|
29
29
|
facets: import("../../../features/commerce/facets/facet-set/interfaces/request.js").AnyFacetRequest[] | undefined;
|
|
30
30
|
sort: import("./sort.js").SortOption | undefined;
|
|
31
31
|
};
|
|
32
|
-
method: import("../../platform-client.js").HttpMethods;
|
|
33
32
|
accessToken: string;
|
|
34
|
-
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
35
33
|
url: string;
|
|
34
|
+
method: import("../../platform-client.js").HttpMethods;
|
|
36
35
|
contentType: import("../../platform-client.js").HTTPContentType;
|
|
36
|
+
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
37
37
|
requestMetadata?: import("../../preprocess-request.js").RequestMetadata | undefined;
|
|
38
38
|
};
|
|
39
39
|
export declare const baseRequest: (req: BaseCommerceAPIRequest, path: CommerceApiMethod) => Pick<PlatformClientCallOptions, "accessToken" | "method" | "contentType" | "url" | "origin" | "requestMetadata">;
|
|
@@ -25,10 +25,22 @@ export interface BaseSpotlightContent {
|
|
|
25
25
|
* The name of the spotlight content.
|
|
26
26
|
*/
|
|
27
27
|
name?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The font color for the name text in hex format (e.g. `#ffffff`).
|
|
30
|
+
*/
|
|
31
|
+
nameFontColor?: string;
|
|
28
32
|
/**
|
|
29
33
|
* The description of the spotlight content.
|
|
30
34
|
*/
|
|
31
35
|
description?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The font color for the description text in hex format (e.g. `#ffffff`).
|
|
38
|
+
*/
|
|
39
|
+
descriptionFontColor?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The accessibility text for the image.
|
|
42
|
+
*/
|
|
43
|
+
altText?: string;
|
|
32
44
|
/**
|
|
33
45
|
* The ID of the response that returned the spotlight content.
|
|
34
46
|
*/
|
|
@@ -21,10 +21,10 @@ export declare const buildProductEnrichmentBadgesRequest: (req: ProductEnrichmen
|
|
|
21
21
|
custom?: Record<string, unknown>;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
method: import("../../platform-client.js").HttpMethods;
|
|
25
24
|
accessToken: string;
|
|
26
|
-
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
27
25
|
url: string;
|
|
26
|
+
method: import("../../platform-client.js").HttpMethods;
|
|
28
27
|
contentType: import("../../platform-client.js").HTTPContentType;
|
|
28
|
+
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
29
29
|
requestMetadata?: import("../../preprocess-request.js").RequestMetadata | undefined;
|
|
30
30
|
};
|
|
@@ -25,10 +25,10 @@ export declare const buildRecommendationsRequest: (req: CommerceRecommendationsR
|
|
|
25
25
|
page: number | undefined;
|
|
26
26
|
perPage: number | undefined;
|
|
27
27
|
};
|
|
28
|
-
method: import("../../platform-client.js").HttpMethods;
|
|
29
28
|
accessToken: string;
|
|
30
|
-
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
31
29
|
url: string;
|
|
30
|
+
method: import("../../platform-client.js").HttpMethods;
|
|
32
31
|
contentType: import("../../platform-client.js").HTTPContentType;
|
|
32
|
+
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
33
33
|
requestMetadata?: import("../../preprocess-request.js").RequestMetadata | undefined;
|
|
34
34
|
};
|
|
@@ -22,10 +22,10 @@ export declare const getPlanRequestOptions: (req: CommercePlanRequest) => {
|
|
|
22
22
|
country: string;
|
|
23
23
|
currency: string;
|
|
24
24
|
};
|
|
25
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
26
25
|
accessToken: string;
|
|
27
|
-
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
28
26
|
url: string;
|
|
27
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
29
28
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
29
|
+
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
30
30
|
requestMetadata?: import("../../../preprocess-request.js").RequestMetadata | undefined;
|
|
31
31
|
};
|
|
@@ -22,10 +22,10 @@ export declare const getQuerySuggestRequestOptions: (req: QuerySuggestRequest) =
|
|
|
22
22
|
country: string;
|
|
23
23
|
currency: string;
|
|
24
24
|
};
|
|
25
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
26
25
|
accessToken: string;
|
|
27
|
-
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
28
26
|
url: string;
|
|
27
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
29
28
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
29
|
+
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
30
30
|
requestMetadata?: import("../../../preprocess-request.js").RequestMetadata | undefined;
|
|
31
31
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentSubscriber } from '@ag-ui/client';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit';
|
|
3
3
|
/**
|
|
4
4
|
* Creates an AgentSubscriber that handles answer streaming events
|
|
5
5
|
*/
|
|
6
|
-
export declare const createHeadAnswerStrategy: (dispatch:
|
|
6
|
+
export declare const createHeadAnswerStrategy: (dispatch: ThunkDispatch<unknown, unknown, UnknownAction>) => AgentSubscriber;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import { type BaseQueryFn, type FetchArgs, type FetchBaseQueryError } from '@reduxjs/toolkit/query';
|
|
2
|
-
/**
|
|
3
|
-
* `dynamicBaseQuery` is passed to the baseQuery of the createApi,
|
|
4
|
-
* but note that the baseQuery will not be used if a queryFn is provided in the createApi endpoint
|
|
5
|
-
*/
|
|
6
|
-
export declare const dynamicBaseQuery: BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>;
|
|
7
2
|
export declare const answerSlice: import("@reduxjs/toolkit/query").Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, {}, "answer", never, typeof import("@reduxjs/toolkit/query").coreModuleName>;
|
|
@@ -44,7 +44,7 @@ export declare const selectAnswer: (state: StreamAnswerAPIState) => ({
|
|
|
44
44
|
originalArgs: AnswerApiQueryParams;
|
|
45
45
|
requestId: string;
|
|
46
46
|
data?: GeneratedAnswerStream | undefined;
|
|
47
|
-
error?: import("@reduxjs/toolkit
|
|
47
|
+
error?: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/query").FetchBaseQueryError | undefined;
|
|
48
48
|
endpointName: string;
|
|
49
49
|
startedTimeStamp: number;
|
|
50
50
|
fulfilledTimeStamp?: number | undefined;
|
|
@@ -56,13 +56,13 @@ export declare const selectAnswer: (state: StreamAnswerAPIState) => ({
|
|
|
56
56
|
isError: false;
|
|
57
57
|
}) | ({
|
|
58
58
|
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
59
|
-
data?: GeneratedAnswerStream | undefined;
|
|
60
59
|
requestId: string;
|
|
60
|
+
data?: GeneratedAnswerStream | undefined;
|
|
61
61
|
fulfilledTimeStamp?: number | undefined;
|
|
62
62
|
originalArgs: AnswerApiQueryParams;
|
|
63
63
|
endpointName: string;
|
|
64
64
|
startedTimeStamp: number;
|
|
65
|
-
error: import("@reduxjs/toolkit
|
|
65
|
+
error: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/query").FetchBaseQueryError;
|
|
66
66
|
} & {
|
|
67
67
|
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
68
68
|
isUninitialized: false;
|
|
@@ -11,9 +11,9 @@ export declare const buildGetCaseClassificationsRequest: (req: GetCaseClassifica
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
15
14
|
accessToken: string;
|
|
16
|
-
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
17
15
|
url: string;
|
|
16
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
18
17
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
18
|
+
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
19
19
|
};
|
|
@@ -28,9 +28,9 @@ export declare const buildGetDocumentSuggestionsRequest: (req: GetDocumentSugges
|
|
|
28
28
|
source?: string[];
|
|
29
29
|
} | undefined;
|
|
30
30
|
};
|
|
31
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
32
31
|
accessToken: string;
|
|
33
|
-
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
34
32
|
url: string;
|
|
33
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
35
34
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
35
|
+
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
36
36
|
};
|
|
@@ -3,9 +3,9 @@ import { type InsightIdParam } from '../insight-params.js';
|
|
|
3
3
|
export type GetInsightInterfaceConfigRequest = BaseParam & InsightIdParam;
|
|
4
4
|
export declare const buildGetInsightInterfaceConfigRequest: (req: GetInsightInterfaceConfigRequest) => {
|
|
5
5
|
requestParams: {};
|
|
6
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
7
6
|
accessToken: string;
|
|
8
|
-
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
9
7
|
url: string;
|
|
8
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
10
9
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
10
|
+
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
11
11
|
};
|
|
@@ -8,17 +8,17 @@ export interface CaseContextParam {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const buildInsightQueryRequest: (req: InsightQueryRequest) => {
|
|
10
10
|
requestParams: {};
|
|
11
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
12
11
|
accessToken: string;
|
|
13
|
-
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
14
12
|
url: string;
|
|
13
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
15
14
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
15
|
+
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
16
16
|
};
|
|
17
17
|
export declare const buildInsightQuerySuggestRequest: (req: InsightQuerySuggestRequest) => {
|
|
18
18
|
requestParams: {};
|
|
19
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
20
19
|
accessToken: string;
|
|
21
|
-
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
22
20
|
url: string;
|
|
21
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
23
22
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
23
|
+
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
24
24
|
};
|
|
@@ -10,10 +10,10 @@ export declare const buildInsightUserActionsRequest: (req: InsightUserActionsReq
|
|
|
10
10
|
requestParams: {
|
|
11
11
|
objectId: string;
|
|
12
12
|
};
|
|
13
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
14
13
|
accessToken: string;
|
|
15
|
-
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
16
14
|
url: string;
|
|
15
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
17
16
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
17
|
+
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
18
18
|
};
|
|
19
19
|
export {};
|
|
@@ -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;
|
|
@@ -7,6 +7,10 @@ export interface InteractiveCitationOptions extends InteractiveResultCoreOptions
|
|
|
7
7
|
* The generated answer citation.
|
|
8
8
|
*/
|
|
9
9
|
citation: GeneratedAnswerCitation;
|
|
10
|
+
/**
|
|
11
|
+
* The unique identifier of the generated answer associated with the citation.
|
|
12
|
+
*/
|
|
13
|
+
answerId?: string;
|
|
10
14
|
}
|
|
11
15
|
export interface InteractiveCitationProps extends InteractiveResultCoreProps {
|
|
12
16
|
/**
|
|
@@ -23,7 +27,7 @@ export interface InteractiveCitationProps extends InteractiveResultCoreProps {
|
|
|
23
27
|
export interface InteractiveCitation extends InteractiveResultCore {
|
|
24
28
|
}
|
|
25
29
|
interface InteractiveCitationAnalyticsClient {
|
|
26
|
-
logOpenGeneratedAnswerSource(citationId: string): CustomAction;
|
|
30
|
+
logOpenGeneratedAnswerSource(citationId: string, answerId?: string): CustomAction;
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
33
|
* Creates a core `InteractiveCitation` controller instance.
|
|
@@ -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
|
/**
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { GeneratedAnswerCitation } from '../../api/generated-answer/generated-answer-event-payload.js';
|
|
2
|
-
import type { SearchThunkExtraArguments } from '../../app/search-thunk-extra-arguments.js';
|
|
3
2
|
import { type GenerationStepName } from '../generated-answer/generated-answer-state.js';
|
|
4
3
|
import type { GeneratedContentFormat } from '../generated-answer/generated-response-format.js';
|
|
5
|
-
import { type StateNeededForFollowUpAnswerParams } from './follow-up-answer-request.js';
|
|
6
4
|
export declare const setIsEnabled: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: boolean], boolean, "followUpAnswers/setIsEnabled", never, never>;
|
|
7
5
|
export declare const setFollowUpAnswersConversationId: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: string], string, "followUpAnswers/setFollowUpAnswersConversationId", never, never>;
|
|
8
6
|
export declare const createFollowUpAnswer: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
@@ -101,13 +99,3 @@ export declare const followUpStepFinished: import("@reduxjs/toolkit").ActionCrea
|
|
|
101
99
|
name: GenerationStepName;
|
|
102
100
|
finishedAt: number;
|
|
103
101
|
}, "followUpAnswers/stepFinished", never, never>;
|
|
104
|
-
export declare const generateFollowUpAnswer: import("@reduxjs/toolkit").AsyncThunk<void, string, {
|
|
105
|
-
state: StateNeededForFollowUpAnswerParams;
|
|
106
|
-
extra: SearchThunkExtraArguments;
|
|
107
|
-
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("@reduxjs/toolkit").UnknownAction> | undefined;
|
|
108
|
-
rejectValue?: unknown;
|
|
109
|
-
serializedErrorType?: unknown;
|
|
110
|
-
pendingMeta?: unknown;
|
|
111
|
-
fulfilledMeta?: unknown;
|
|
112
|
-
rejectedMeta?: unknown;
|
|
113
|
-
}>;
|
|
@@ -2,7 +2,7 @@ import { StringValue } from '@coveo/bueno';
|
|
|
2
2
|
import type { GeneratedAnswerCitationsPayload, GeneratedAnswerMessagePayload } from '../../api/generated-answer/generated-answer-event-payload.js';
|
|
3
3
|
import type { StreamAnswerAPIState } from '../../api/knowledge/stream-answer-api-state.js';
|
|
4
4
|
import type { SearchThunkExtraArguments } from '../../app/search-thunk-extra-arguments.js';
|
|
5
|
-
import type { AnswerApiQueryParams
|
|
5
|
+
import type { AnswerApiQueryParams } from '../../features/generated-answer/generated-answer-request.js';
|
|
6
6
|
import type { ConfigurationSection, DebugSection, GeneratedAnswerSection, SearchSection } from '../../state/state-sections.js';
|
|
7
7
|
import { type GenerationStepName } from './generated-answer-state.js';
|
|
8
8
|
import { type GeneratedResponseFormat } from './generated-response-format.js';
|
|
@@ -98,22 +98,4 @@ export declare const generateAnswer: import("@reduxjs/toolkit").AsyncThunk<void,
|
|
|
98
98
|
fulfilledMeta?: unknown;
|
|
99
99
|
rejectedMeta?: unknown;
|
|
100
100
|
}>;
|
|
101
|
-
/**
|
|
102
|
-
* Thunk to generate the head answer as part of the generated answer with follow-ups feature.
|
|
103
|
-
*
|
|
104
|
-
* This action initiates the generation of the main answer when using the Answer Generation API
|
|
105
|
-
* with an agent configuration. It requires an **agent ID** to be present in the engine configuration.
|
|
106
|
-
*
|
|
107
|
-
* @internal
|
|
108
|
-
*/
|
|
109
|
-
export declare const generateHeadAnswer: import("@reduxjs/toolkit").AsyncThunk<void, void, {
|
|
110
|
-
state: StateNeededForHeadAnswerParams;
|
|
111
|
-
extra: SearchThunkExtraArguments;
|
|
112
|
-
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("@reduxjs/toolkit").UnknownAction> | undefined;
|
|
113
|
-
rejectValue?: unknown;
|
|
114
|
-
serializedErrorType?: unknown;
|
|
115
|
-
pendingMeta?: unknown;
|
|
116
|
-
fulfilledMeta?: unknown;
|
|
117
|
-
rejectedMeta?: unknown;
|
|
118
|
-
}>;
|
|
119
101
|
export {};
|
|
@@ -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;
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import type { GeneratedAnswerStreamRequest } from '../../api/generated-answer/generated-answer-request.js';
|
|
2
|
-
import type { AnswerParams } from '../../api/knowledge/answer-generation/endpoints/answer/answer-endpoint.js';
|
|
3
2
|
import type { StreamAnswerAPIState } from '../../api/knowledge/stream-answer-api-state.js';
|
|
4
3
|
import type { BaseParam } from '../../api/platform-service-params.js';
|
|
5
4
|
import type { SearchRequest } from '../../api/search/search/search-request.js';
|
|
6
|
-
import type { AuthenticationParam, AutomaticFacetsParams } from '../../api/search/search-api-params.js';
|
|
5
|
+
import type { AnalyticsParam, AuthenticationParam, AutomaticFacetsParams, PipelineRuleParameters } from '../../api/search/search-api-params.js';
|
|
7
6
|
import type { CaseContextParam } from '../../api/service/insight/query/query-request.js';
|
|
8
7
|
import type { NavigatorContext } from '../../app/navigator-context-provider.js';
|
|
9
8
|
import type { SearchAppState } from '../../state/search-app-state.js';
|
|
10
9
|
import type { ConfigurationSection, GeneratedAnswerSection, SearchSection, TabSection } from '../../state/state-sections.js';
|
|
10
|
+
import type { AnyFacetRequest } from '../facets/generic/interfaces/generic-facet-request.js';
|
|
11
11
|
type StateNeededByGeneratedAnswerStream = ConfigurationSection & SearchSection & GeneratedAnswerSection;
|
|
12
12
|
export interface AnswerApiQueryParams extends Omit<SearchRequest, keyof (BaseParam & AuthenticationParam & AutomaticFacetsParams)>, CaseContextParam {
|
|
13
13
|
}
|
|
14
14
|
export declare const buildStreamingRequest: (state: StateNeededByGeneratedAnswerStream) => Promise<GeneratedAnswerStreamRequest>;
|
|
15
15
|
export declare const constructAnswerAPIQueryParams: (state: StreamAnswerAPIState, navigatorContext: NavigatorContext) => AnswerApiQueryParams;
|
|
16
16
|
export type StateNeededForHeadAnswerParams = ConfigurationSection & Partial<SearchAppState> & GeneratedAnswerSection & Partial<TabSection>;
|
|
17
|
+
/**
|
|
18
|
+
* Parameters for answer generation requests.
|
|
19
|
+
*/
|
|
20
|
+
type AnswerParams = {
|
|
21
|
+
q: string;
|
|
22
|
+
facets?: AnyFacetRequest[];
|
|
23
|
+
searchHub?: string;
|
|
24
|
+
pipeline?: string;
|
|
25
|
+
pipelineRuleParameters: PipelineRuleParameters;
|
|
26
|
+
locale: string;
|
|
27
|
+
} & AnalyticsParam;
|
|
17
28
|
export declare const constructGenerateHeadAnswerParams: (state: StateNeededForHeadAnswerParams, navigatorContext: NavigatorContext) => AnswerParams;
|
|
18
29
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { GeneratedAnswerCitation } from '../../controllers/generated-answer
|
|
|
3
3
|
import type { SearchAppState } from '../../state/search-app-state.js';
|
|
4
4
|
import type { GeneratedAnswerSection } from '../../state/state-sections.js';
|
|
5
5
|
export declare const generativeQuestionAnsweringIdSelector: (state: Partial<SearchAppState>) => string | undefined;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const isGeneratedAnswerFeatureEnabledWithAgentAPI: (state: Partial<SearchAppState>) => state is StreamAnswerAPIState;
|
|
7
7
|
export declare const selectFieldsToIncludeInCitation: (state: Partial<GeneratedAnswerSection>) => string[] | undefined;
|
|
8
8
|
export declare const citationSourceSelector: ((state: Partial<GeneratedAnswerSection>, citationId: string) => GeneratedAnswerCitation | undefined) & {
|
|
9
9
|
clearCache: () => void;
|
|
@@ -17,7 +17,7 @@ export declare const buildSearchRequest: (state: StateNeededBySearchRequest, eve
|
|
|
17
17
|
facetOptions?: import("../../facet-options/facet-options.js").FacetOptions;
|
|
18
18
|
numberOfResults?: number;
|
|
19
19
|
firstResult?: number;
|
|
20
|
-
facets?: (import("../../facets/facet-set/interfaces/request.js").FacetRequest | import("../../facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../../facets/range-facets/
|
|
20
|
+
facets?: (import("../../facets/facet-set/interfaces/request.js").FacetRequest | import("../../facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../../facets/range-facets/numeric-facet-set/interfaces/request.js").NumericFacetRequest | import("../../facets/range-facets/date-facet-set/interfaces/request.js").DateFacetRequest)[] | undefined;
|
|
21
21
|
cq?: string;
|
|
22
22
|
queryCorrection?: {
|
|
23
23
|
enabled?: boolean;
|
|
@@ -18,7 +18,7 @@ export declare const buildSearchRequest: (state: StateNeededBySearchRequest, nav
|
|
|
18
18
|
facetOptions?: import("../facet-options/facet-options.js").FacetOptions;
|
|
19
19
|
numberOfResults?: number;
|
|
20
20
|
firstResult?: number;
|
|
21
|
-
facets?: (import("../facets/facet-set/interfaces/request.js").FacetRequest | import("../facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../facets/range-facets/
|
|
21
|
+
facets?: (import("../facets/facet-set/interfaces/request.js").FacetRequest | import("../facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../facets/range-facets/numeric-facet-set/interfaces/request.js").NumericFacetRequest | import("../facets/range-facets/date-facet-set/interfaces/request.js").DateFacetRequest)[] | undefined;
|
|
22
22
|
cq?: string;
|
|
23
23
|
queryCorrection?: {
|
|
24
24
|
enabled?: boolean;
|
|
@@ -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';
|
|
@@ -2,11 +2,23 @@ import { type ProductListing, type ProductListingState } from '../../../../contr
|
|
|
2
2
|
import { type Search } from '../../../../controllers/commerce/search/headless-search.js';
|
|
3
3
|
import type { ControllerDefinitionOption, SubControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
|
|
4
4
|
export type { Search, ProductListing, ProductListingState as ProductListState };
|
|
5
|
-
export type ProductList = Pick<ProductListing | Search, 'state' | 'subscribe' | 'interactiveProduct' | 'promoteChildToParent'>;
|
|
5
|
+
export type ProductList = Pick<ProductListing | Search, 'state' | 'subscribe' | 'interactiveProduct' | 'interactiveSpotlightContent' | 'promoteChildToParent'>;
|
|
6
|
+
/**
|
|
7
|
+
* Options for configuring the `ProductList` controller.
|
|
8
|
+
*/
|
|
9
|
+
interface ProductListOptions {
|
|
10
|
+
/**
|
|
11
|
+
* When set to true, fills the `results` field rather than the `products` field
|
|
12
|
+
* in the response. It may also include Spotlight Content in the results.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
enableResults?: boolean;
|
|
16
|
+
}
|
|
6
17
|
/**
|
|
7
18
|
* Defines a `ProductList` controller instance.
|
|
8
19
|
* @group Definers
|
|
9
20
|
*
|
|
21
|
+
* @param options - The configurable `ProductList` controller options.
|
|
10
22
|
* @returns The `ProductList` controller definition.
|
|
11
23
|
*/
|
|
12
|
-
export declare function defineProductList<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<ProductList, TOptions>;
|
|
24
|
+
export declare function defineProductList<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions & ProductListOptions): SubControllerDefinitionWithoutProps<ProductList, TOptions>;
|