@coveo/quantic 3.10.0 → 3.11.1
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/README.md +52 -12
- package/docs/out/quantic-docs.json +27 -0
- package/force-app/main/default/labels/CustomLabels.labels-meta.xml +7 -0
- package/force-app/main/default/lwc/quanticBreadcrumbManager/__tests__/quanticBreadcrumbManager.test.js +341 -0
- package/force-app/main/default/lwc/quanticBreadcrumbManager/quanticBreadcrumbManager.html +8 -8
- package/force-app/main/default/lwc/quanticBreadcrumbManager/quanticBreadcrumbManager.js +8 -8
- package/force-app/main/default/lwc/quanticFeedbackModalQna/templates/quanticFeedbackModalQna.html +1 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/__tests__/quanticGeneratedAnswer.test.js +538 -21
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/data.ts +56 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/fixture.ts +87 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/pageObject.ts +279 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswer.e2e.ts +178 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.html +24 -10
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/retryPrompt.html +2 -2
- package/force-app/main/default/lwc/quanticGeneratedAnswerToggle/quanticGeneratedAnswerToggle.html +1 -1
- package/force-app/main/default/lwc/quanticNotifications/__tests__/quanticNotifications.test.js +112 -4
- package/force-app/main/default/lwc/quanticNotifications/quanticNotifications.css +8 -0
- package/force-app/main/default/lwc/quanticNotifications/quanticNotifications.html +20 -7
- package/force-app/main/default/lwc/quanticNotifications/quanticNotifications.js +57 -18
- package/force-app/main/default/lwc/quanticPager/e2e/pagerObject.ts +1 -1
- package/force-app/main/default/lwc/quanticUserActionsToggle/__tests__/quanticUserActionsToggle.test.js +18 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/data.ts +32 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/fixture.ts +32 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/pageObject.ts +71 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/quanticUserActionsToggle.e2e.ts +39 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/quanticUserActionsToggle.js +4 -0
- package/force-app/main/default/staticresources/coveobueno/browser/bueno.js +4 -4
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +8 -10
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/instant-result-analytics.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/search-analytics.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +3 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-engine/commerce-engine.ssr.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/build-factory.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/utils/recommendation-filter.d.ts +11 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/build.d.ts +4 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/common.d.ts +178 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/core-engine.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/fetch-static-state.d.ts +4 -12
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/from-build-result.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/hydrate-static-state.d.ts +4 -11
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/kind.d.ts +6 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/common.d.ts +6 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/commerce.index.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/context/cart/headless-cart.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/context/headless-context.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.d.ts +8 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.d.ts +3 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/sub-controller/headless-sub-controller.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/url-manager/headless-core-url-manager.d.ts +11 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-list/headless-product-list.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-view/headless-product-view.ssr.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recommendations/headless-recommendations.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recommendations/headless-recommendations.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-actions.d.ts +22 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-schema.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-selectors.d.ts +0 -11
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-serializer.d.ts +6 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-serializer.ssr.d.ts +44 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-slice.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-state.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-actions.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-state.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-selectors.d.ts +0 -12
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/debug/debug-selectors.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/question-answering/question-answering-selectors.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-selectors.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-serializer.d.ts +5 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/state/commerce-app-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/state/state-sections.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/errors.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/headless.js +10 -12
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +9 -11
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +8 -10
- package/force-app/main/default/staticresources/dompurify/purify.min.js +2 -1339
- package/package.json +23 -19
|
@@ -13,6 +13,7 @@ export interface ProductViewDefinition extends NonRecommendationControllerDefini
|
|
|
13
13
|
* @returns The `ProductView` controller definition.
|
|
14
14
|
*
|
|
15
15
|
* @internal
|
|
16
|
+
* @group Definers
|
|
16
17
|
*/
|
|
17
18
|
export declare function defineProductView(): ProductViewDefinition;
|
|
18
19
|
export interface ProductView extends BaseProductView, Controller {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RecommendationsState } from '../recommendations/headless-recommendations.js';
|
|
1
|
+
import { recommendationInternalOptionKey, RecommendationOnlyControllerDefinitionWithProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { RecommendationsOptions, RecommendationsState } from '../recommendations/headless-recommendations.js';
|
|
3
3
|
import { RecommendationsProps, Recommendations } from './headless-recommendations.js';
|
|
4
4
|
export type { Recommendations, RecommendationsState };
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
* */
|
|
8
8
|
export type RecommendationsDefinitionMeta = {
|
|
9
|
-
|
|
9
|
+
[recommendationInternalOptionKey]: {} & RecommendationsProps['options'];
|
|
10
10
|
};
|
|
11
|
-
export interface RecommendationsDefinition extends
|
|
11
|
+
export interface RecommendationsDefinition extends RecommendationOnlyControllerDefinitionWithProps<Recommendations, Partial<RecommendationsOptions>> {
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListingAndStandaloneControllerWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { StandaloneSearchBoxProps } from '../../standalone-search-box/headless-standalone-search-box.js';
|
|
3
3
|
import { StandaloneSearchBox } from './headless-standalone-search-box.js';
|
|
4
4
|
export type { StandaloneSearchBoxOptions } from './headless-standalone-search-box-options.js';
|
|
5
5
|
export type { StandaloneSearchBoxState } from './headless-standalone-search-box.js';
|
|
6
6
|
export type { StandaloneSearchBox, StandaloneSearchBoxProps };
|
|
7
|
-
export interface StandaloneSearchBoxDefinition extends
|
|
7
|
+
export interface StandaloneSearchBoxDefinition extends ListingAndStandaloneControllerWithoutProps<StandaloneSearchBox> {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Defines the `StandaloneSearchBox` controller for the purpose of server-side rendering.
|
|
@@ -3,29 +3,45 @@ import { NumericRangeRequest } from '../../facets/range-facets/numeric-facet-set
|
|
|
3
3
|
import { SortCriterion } from '../sort/sort.js';
|
|
4
4
|
export interface Parameters {
|
|
5
5
|
/**
|
|
6
|
-
* A record of the facets, where the key is the facet id, and value is an array containing the selected values.
|
|
6
|
+
* A record of the facets, where the key is the facet id, and the value is an array containing the selected values.
|
|
7
7
|
*/
|
|
8
8
|
f?: Record<string, string[]>;
|
|
9
9
|
/**
|
|
10
|
-
* A record of the
|
|
10
|
+
* A record of the facets, where the key is the facet id, and the value is an array containing the excluded values.
|
|
11
|
+
*/
|
|
12
|
+
fExcluded?: Record<string, string[]>;
|
|
13
|
+
/**
|
|
14
|
+
* A record of the location facets, where the key is the facet id, and the value is an array containing the selected values.
|
|
11
15
|
*/
|
|
12
16
|
lf?: Record<string, string[]>;
|
|
13
17
|
/**
|
|
14
|
-
* A record of the category facets, where the key is the facet id, and value is an array containing the parts of the selected path.
|
|
18
|
+
* A record of the category facets, where the key is the facet id, and the value is an array containing the parts of the selected path.
|
|
15
19
|
*/
|
|
16
20
|
cf?: Record<string, string[]>;
|
|
17
21
|
/**
|
|
18
|
-
* A record of the date facets, where the key is the facet id, and value is an array containing the date ranges
|
|
22
|
+
* A record of the date facets, where the key is the facet id, and the value is an array containing the selected date ranges.
|
|
19
23
|
*/
|
|
20
24
|
df?: Record<string, DateRangeRequest[]>;
|
|
21
25
|
/**
|
|
22
|
-
* A record of the
|
|
26
|
+
* A record of the date facets, where the key is the facet id, and the value is an array containing the excluded date ranges.
|
|
27
|
+
*/
|
|
28
|
+
dfExcluded?: Record<string, DateRangeRequest[]>;
|
|
29
|
+
/**
|
|
30
|
+
* A record of the numeric facets, where the key is the facet id, and the value is an array containing the selected numeric ranges.
|
|
23
31
|
*/
|
|
24
32
|
nf?: Record<string, NumericRangeRequest[]>;
|
|
25
33
|
/**
|
|
26
|
-
* A record of
|
|
34
|
+
* A record of the numeric facets, where the key is the facet id, and the value is an array containing the excluded numeric ranges.
|
|
35
|
+
*/
|
|
36
|
+
nfExcluded?: Record<string, NumericRangeRequest[]>;
|
|
37
|
+
/**
|
|
38
|
+
* A record of manual numeric facets, where the key is the facet id, and the the value is an array containing the selected manual numeric ranges.
|
|
27
39
|
*/
|
|
28
40
|
mnf?: Record<string, NumericRangeRequest[]>;
|
|
41
|
+
/**
|
|
42
|
+
* A record of manual numeric facets, where the key is the facet id, and the value is an array containing the excluded manual numeric ranges.
|
|
43
|
+
*/
|
|
44
|
+
mnfExcluded?: Record<string, NumericRangeRequest[]>;
|
|
29
45
|
/**
|
|
30
46
|
* The sort expression to order returned results by.
|
|
31
47
|
*/
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { NumberValue, RecordValue } from '@coveo/bueno';
|
|
2
2
|
export declare const parametersDefinition: {
|
|
3
3
|
f: RecordValue;
|
|
4
|
+
fExcluded: RecordValue;
|
|
4
5
|
lf: RecordValue;
|
|
5
6
|
cf: RecordValue;
|
|
6
7
|
nf: RecordValue;
|
|
8
|
+
nfExcluded: RecordValue;
|
|
7
9
|
mnf: RecordValue;
|
|
10
|
+
mnfExcluded: RecordValue;
|
|
8
11
|
df: RecordValue;
|
|
12
|
+
dfExcluded: RecordValue;
|
|
9
13
|
sortCriteria: RecordValue;
|
|
10
14
|
page: NumberValue;
|
|
11
15
|
perPage: NumberValue;
|
|
@@ -3,14 +3,3 @@ import { stateKey } from '../../../app/state-key.js';
|
|
|
3
3
|
import { Parameters as ManagedParameters } from './parameters-actions.js';
|
|
4
4
|
export declare function initialParametersSelector(state: CommerceEngine[typeof stateKey]): Required<ManagedParameters>;
|
|
5
5
|
export declare function activeParametersSelector(state: CommerceEngine[typeof stateKey]): ManagedParameters;
|
|
6
|
-
export declare function enrichedParametersSelector(state: CommerceEngine[typeof stateKey], activeParams: ManagedParameters): {
|
|
7
|
-
f: Record<string, string[]>;
|
|
8
|
-
lf: Record<string, string[]>;
|
|
9
|
-
cf: Record<string, string[]>;
|
|
10
|
-
df: Record<string, import("../../../ssr.index.js").DateRangeRequest[]>;
|
|
11
|
-
nf: Record<string, import("../../../ssr.index.js").NumericRangeRequest[]>;
|
|
12
|
-
mnf: Record<string, import("../../../ssr.index.js").NumericRangeRequest[]>;
|
|
13
|
-
sortCriteria: import("../sort/sort.js").SortCriterion;
|
|
14
|
-
page: number;
|
|
15
|
-
perPage: number;
|
|
16
|
-
};
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { SearchParameterKey } from '../../search-parameters/search-parameter-serializer.js';
|
|
2
2
|
import { CommerceSearchParameters } from '../search-parameters/search-parameters-actions.js';
|
|
3
|
+
import { SortCriterion } from '../sort/sort.js';
|
|
3
4
|
import { Parameters } from './parameters-actions.js';
|
|
5
|
+
export declare const commerceFacetsRegex: RegExp;
|
|
4
6
|
export interface Serializer<T extends Parameters> {
|
|
5
7
|
serialize: (parameters: T) => string;
|
|
6
8
|
deserialize: (fragment: string) => T;
|
|
7
9
|
}
|
|
8
10
|
export declare const searchSerializer: Serializer<CommerceSearchParameters>;
|
|
9
11
|
export declare const productListingSerializer: Serializer<Parameters>;
|
|
10
|
-
type
|
|
12
|
+
export type ParametersKey = keyof CommerceSearchParameters;
|
|
13
|
+
export type FacetParameters = keyof Pick<Parameters, 'f' | 'fExcluded' | 'lf' | 'cf' | 'nf' | 'nfExcluded' | 'df' | 'dfExcluded' | 'mnf' | 'mnfExcluded'>;
|
|
11
14
|
type FacetKey = keyof typeof supportedFacetParameters;
|
|
12
15
|
declare const supportedFacetParameters: Record<FacetParameters, boolean>;
|
|
16
|
+
export declare function buildCriterionExpression(criterion: SortCriterion | undefined): string;
|
|
13
17
|
export declare function isValidBasicKey(key: string): key is Exclude<SearchParameterKey, FacetKey>;
|
|
14
18
|
export declare function keyHasObjectValue(key: string): key is FacetKey;
|
|
19
|
+
export declare function deserializeSortCriteria(value: string): SortCriterion | undefined;
|
|
15
20
|
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DateRangeRequest, NumericRangeRequest } from '../../../controllers/commerce/core/facets/headless-core-commerce-facet.js';
|
|
2
|
+
import { FacetValueSearchParam, SearchParamValue as CommerceSearchParamValue } from '../../search-parameters/search-parameter-utils.js';
|
|
3
|
+
import { CommerceSearchParameters } from '../search-parameters/search-parameters-actions.js';
|
|
4
|
+
import { SortCriterion } from '../sort/sort.js';
|
|
5
|
+
import { FacetParameters } from './parameters-serializer.js';
|
|
6
|
+
type CommerceSearchParametersKey = keyof CommerceSearchParameters;
|
|
7
|
+
type CommerceSearchParamPair<T> = [CommerceSearchParametersKey, T];
|
|
8
|
+
type RangeFacetValueSearchParam = Record<string, DateRangeRequest[] | NumericRangeRequest[]>;
|
|
9
|
+
export declare function buildParameterSerializer(): {
|
|
10
|
+
deserialize: typeof deserialize;
|
|
11
|
+
serialize: typeof serialize;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Converts URLSearchParams or a record of commerce search parameters into a {@link CommerceSearchParameters} object.
|
|
15
|
+
*
|
|
16
|
+
* @param urlCommerceSearchParams - The URLSearchParams or record of commerce search parameters.
|
|
17
|
+
* @returns The converted CommerceSearchParameters object.
|
|
18
|
+
*/
|
|
19
|
+
declare function deserialize(urlCommerceSearchParams: URLSearchParams | Record<string, CommerceSearchParamValue>): CommerceSearchParameters;
|
|
20
|
+
/**
|
|
21
|
+
* Serializes the commerce search parameters to the provided URL.
|
|
22
|
+
*
|
|
23
|
+
* @param commerceSearchParameters - The commerce search parameters to be serialized.
|
|
24
|
+
* @param initialUrl - The initial URL to which the commerce search parameters will be added.
|
|
25
|
+
* @returns The serialized URL.
|
|
26
|
+
*/
|
|
27
|
+
declare function serialize(commerceSearchParameters: CommerceSearchParameters, initialUrl: URL): string;
|
|
28
|
+
export declare function isValidKey(key: string): key is CommerceSearchParametersKey;
|
|
29
|
+
export declare function isValidBasicKey(key: string): key is Exclude<CommerceSearchParametersKey, keyof FacetParameters>;
|
|
30
|
+
/**
|
|
31
|
+
* Extends the search parameters with the given key-value pair. If the key-value pair is not valid or if the value is undefined, the search parameters are not modified.
|
|
32
|
+
* @param commerceSearchParams - The search parameters object to extend.
|
|
33
|
+
* @param key - The key of the search parameter.
|
|
34
|
+
* @param value - The value of the search parameter.
|
|
35
|
+
*/
|
|
36
|
+
export declare function extendSearchParams(commerceSearchParams: Record<string, unknown>, key: string, value: CommerceSearchParamValue): void;
|
|
37
|
+
export declare function cast<K extends CommerceSearchParametersKey>(pair: [K, string], decode?: boolean): [K, unknown];
|
|
38
|
+
export declare function isValidSearchParam(key: string): boolean;
|
|
39
|
+
export declare function isSortPair(pair: [CommerceSearchParametersKey, unknown]): pair is CommerceSearchParamPair<SortCriterion>;
|
|
40
|
+
export declare function isFacetPair(pair: [CommerceSearchParametersKey, unknown]): pair is CommerceSearchParamPair<FacetValueSearchParam>;
|
|
41
|
+
export declare function isRangeFacetPair(pair: [CommerceSearchParametersKey, unknown]): pair is CommerceSearchParamPair<RangeFacetValueSearchParam>;
|
|
42
|
+
export declare function isRangeFacetObject(obj: unknown): obj is Record<string, (DateRangeRequest | NumericRangeRequest)[]>;
|
|
43
|
+
export declare function addFacetValuesToSearchParams(facetId: string, paramKey: CommerceSearchParametersKey): (searchParams: Record<string, unknown>, valueArray: unknown[]) => void;
|
|
44
|
+
export {};
|
|
@@ -38,6 +38,7 @@ export declare const fetchMoreRecommendations: import("@reduxjs/toolkit").AsyncT
|
|
|
38
38
|
}>;
|
|
39
39
|
export interface SlotIdPayload {
|
|
40
40
|
slotId: string;
|
|
41
|
+
productId?: string;
|
|
41
42
|
}
|
|
42
43
|
export type RegisterRecommendationsSlotPayload = SlotIdPayload;
|
|
43
44
|
export declare const registerRecommendationsSlot: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: SlotIdPayload], SlotIdPayload, "commerce/recommendations/registerSlot", never, never>;
|
|
@@ -241,18 +241,6 @@ export declare const queryExecutedSelector: ((state: CommerceSearchSection) => s
|
|
|
241
241
|
};
|
|
242
242
|
export declare const queryExecutedFromResponseSelector: (state: CommerceQuerySection, response: SearchCommerceSuccessResponse) => string;
|
|
243
243
|
export declare const activeParametersSelector: (state: CommerceEngine[typeof stateKey]) => CommerceSearchParameters;
|
|
244
|
-
export declare function enrichedParametersSelector(state: CommerceEngine[typeof stateKey], activeParams: CommerceSearchParameters): {
|
|
245
|
-
f: Record<string, string[]>;
|
|
246
|
-
lf: Record<string, string[]>;
|
|
247
|
-
cf: Record<string, string[]>;
|
|
248
|
-
df: Record<string, import("../../../ssr.index.js").DateRangeRequest[]>;
|
|
249
|
-
nf: Record<string, import("../../../ssr.index.js").NumericRangeRequest[]>;
|
|
250
|
-
mnf: Record<string, import("../../../ssr.index.js").NumericRangeRequest[]>;
|
|
251
|
-
sortCriteria: import("../sort/sort.js").SortCriterion;
|
|
252
|
-
page: number;
|
|
253
|
-
perPage: number;
|
|
254
|
-
q: string;
|
|
255
|
-
};
|
|
256
244
|
export declare function enrichedSummarySelector(state: CommerceEngineState): {
|
|
257
245
|
query: string;
|
|
258
246
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SearchSection } from '../../state/state-sections.js';
|
|
2
2
|
export declare function rankingInformationSelector(state: SearchSection): {
|
|
3
|
-
result: import("../../
|
|
3
|
+
result: import("../../ssr.index.js").Result;
|
|
4
4
|
ranking: {
|
|
5
5
|
documentWeights: import("./ranking-info-parser.js").DocumentWeights | null;
|
|
6
6
|
termsWeight: import("./ranking-info-parser.js").TermWeightReport | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { QuestionAnswerDocumentIdentifier } from '../../api/search/search/question-answering.js';
|
|
2
2
|
import { QuestionAnsweringSection, SearchSection } from '../../state/state-sections.js';
|
|
3
|
-
export declare function answerSourceSelector(state: Partial<SearchSection & QuestionAnsweringSection>, documentIdentifier?: QuestionAnswerDocumentIdentifier): import("../../
|
|
3
|
+
export declare function answerSourceSelector(state: Partial<SearchSection & QuestionAnsweringSection>, documentIdentifier?: QuestionAnswerDocumentIdentifier): import("../../ssr.index.js").Result | undefined;
|
|
4
4
|
export declare function relatedQuestionSelector(state: Partial<SearchSection & QuestionAnsweringSection>, questionAnswerId: string): import("../../api/search/search/question-answering.js").QuestionAnswer | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SearchSection } from '../../state/state-sections.js';
|
|
2
2
|
export declare function firstSearchExecutedSelector(state: SearchSection): boolean;
|
|
3
|
-
export declare function resultFromFieldSelector(state: SearchSection, contentIdKey: string, contentIdValue: string): import("../../
|
|
3
|
+
export declare function resultFromFieldSelector(state: SearchSection, contentIdKey: string, contentIdValue: string): import("../../ssr.index.js").Result | undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DateRangeRequest } from '../../controllers/facets/range-facet/date-facet/headless-date-facet.js';
|
|
2
|
+
import { FacetValueState } from '../../ssr.index.js';
|
|
1
3
|
import { RangeValueRequest } from '../facets/range-facets/generic/interfaces/range-facet.js';
|
|
2
4
|
import { SearchParameters } from './search-parameter-actions.js';
|
|
3
5
|
export declare const rangeDelimiterExclusive = "..";
|
|
@@ -26,13 +28,14 @@ export declare function serializeSpecialCharacters(key: string, val: unknown): s
|
|
|
26
28
|
export declare function isFacetObject(obj: unknown): obj is Record<string, string[]>;
|
|
27
29
|
export declare function isRangeFacetObject(obj: unknown): obj is Record<string, RangeValueRequest[]>;
|
|
28
30
|
export declare function isObject(obj: unknown): obj is object;
|
|
31
|
+
export declare function allEntriesAreValid(obj: object, isValidValue: (v: unknown) => boolean): boolean;
|
|
29
32
|
export declare function serializeFacets(key: string, facets: Record<string, string[]>): string;
|
|
30
33
|
export declare function serializeRangeFacets(key: string, facets: Record<string, RangeValueRequest[]>): string;
|
|
31
34
|
declare function deserialize(fragment: string): SearchParameters;
|
|
32
35
|
export declare function splitOnFirstEqual(str: string): string[];
|
|
33
36
|
export declare function preprocessObjectPairs(pair: string[], regex?: RegExp): string[];
|
|
34
|
-
export declare function buildNumericRanges(ranges: string[]): import("
|
|
35
|
-
export declare function buildDateRanges(ranges: string[]):
|
|
37
|
+
export declare function buildNumericRanges(ranges: string[], state: FacetValueState): import("../../ssr.index.js").NumericRangeRequest[];
|
|
38
|
+
export declare function buildDateRanges(ranges: string[], state: FacetValueState): DateRangeRequest[];
|
|
36
39
|
export declare function cast<K extends SearchParameterKey>(pair: [K, string], decode?: boolean): [K, unknown];
|
|
37
40
|
export declare function castUnknownObject(value: string): UnknownObject;
|
|
38
41
|
export {};
|
package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts
CHANGED
|
@@ -77,7 +77,8 @@ export { getSampleCommerceEngineConfiguration } from './app/commerce-engine/comm
|
|
|
77
77
|
export type { CoreEngineNext, ExternalEngineOptions } from './app/engine.js';
|
|
78
78
|
export type { EngineConfiguration, AnalyticsConfiguration, AnalyticsRuntimeEnvironment, } from './app/engine-configuration.js';
|
|
79
79
|
export { SolutionType } from './app/commerce-ssr-engine/types/common.js';
|
|
80
|
-
export type { ControllerDefinitionsMap, InferControllerFromDefinition, InferControllersMapFromDefinition, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, InferControllerStaticStateMapFromDefinitionsWithSolutionType, InferControllerPropsMapFromDefinitions, EngineStaticState, EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption, HydratedState, OptionsTuple, } from './app/commerce-ssr-engine/types/common.js';
|
|
80
|
+
export type { ControllerDefinition, ControllerDefinitionsMap, InferControllerFromDefinition, InferControllersMapFromDefinition, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, InferControllerStaticStateMapFromDefinitionsWithSolutionType, InferControllerPropsMapFromDefinitions, EngineStaticState, EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption, HydratedState, OptionsTuple, ControllerWithKind, } from './app/commerce-ssr-engine/types/common.js';
|
|
81
|
+
export { Kind } from './app/commerce-ssr-engine/types/kind.js';
|
|
81
82
|
export type { EngineDefinition, InferStaticState, InferHydratedState, InferBuildResult, HydrateStaticState, FetchStaticState, FetchStaticStateOptions, HydrateStaticStateOptions, Build, BuildOptions, FromBuildResult, FromBuildResultOptions, } from './app/commerce-ssr-engine/types/core-engine.js';
|
|
82
83
|
export type { LoggerOptions } from './app/logger.js';
|
|
83
84
|
export type { NavigatorContext, BrowserNavigatorContextProvider, NavigatorContextProvider, } from './app/navigatorContextProvider.js';
|
|
@@ -90,7 +91,7 @@ export type { BaseFacetSearchResult, CategoryFacet, CategoryFacetState, Category
|
|
|
90
91
|
export { defineFacetGenerator } from './controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.js';
|
|
91
92
|
export type { Pagination, PaginationProps, PaginationState, } from './controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.js';
|
|
92
93
|
export { definePagination } from './controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.js';
|
|
93
|
-
export type { ParameterManager, ParameterManagerProps, ParameterManagerState, Parameters, ProductListingParameters, CommerceSearchParameters, } from './controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
94
|
+
export type { ParameterManager, ParameterManagerProps, SSRParameterManagerProps, ParameterManagerState, Parameters, ProductListingParameters, CommerceSearchParameters, } from './controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
94
95
|
export { defineParameterManager } from './controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
95
96
|
export type { ProductList, ProductListState, } from './controllers/commerce/product-list/headless-product-list.ssr.js';
|
|
96
97
|
export { defineProductList } from './controllers/commerce/product-list/headless-product-list.ssr.js';
|
|
@@ -158,7 +159,7 @@ export type { Template } from './features/templates/templates-manager.js';
|
|
|
158
159
|
export type { ProductTemplate, ProductTemplateCondition, ProductTemplatesManager, } from './features/commerce/product-templates/product-templates-manager.js';
|
|
159
160
|
export { ProductTemplatesHelpers } from './features/commerce/product-templates/product-templates-helpers.js';
|
|
160
161
|
export type { PlatformEnvironment } from './utils/url-utils.js';
|
|
161
|
-
export {
|
|
162
|
+
export { buildParameterSerializer } from './features/commerce/parameters/parameters-serializer.ssr.js';
|
|
162
163
|
export type { HighlightKeyword } from './utils/highlight.js';
|
|
163
164
|
export { VERSION } from './utils/version.js';
|
|
164
165
|
export type { RelativeDate, RelativeDatePeriod, RelativeDateUnit, } from './api/search/date/relative-date.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommercePaginationSection, CartSection, CommerceContextSection, ProductListingSection, RecommendationsSection, VersionSection, CommerceSortSection, CommerceSearchSection, CommerceQuerySection, CommerceFacetSetSection, FacetOrderSection, QuerySuggestionSection, QuerySetSection, FacetSearchSection, CategoryFacetSearchSection, CommerceDidYouMeanSection, InstantProductsSection, CommerceStandaloneSearchBoxSection, RecentQueriesSection, FieldSuggestionsOrderSection, TriggerSection, ManualRangeSection, CommerceConfigurationSection } from './state-sections.js';
|
|
1
|
+
import { CommercePaginationSection, CartSection, CommerceContextSection, ProductListingSection, RecommendationsSection, VersionSection, CommerceSortSection, CommerceSearchSection, CommerceQuerySection, CommerceFacetSetSection, FacetOrderSection, QuerySuggestionSection, QuerySetSection, FacetSearchSection, CategoryFacetSearchSection, CommerceDidYouMeanSection, InstantProductsSection, CommerceStandaloneSearchBoxSection, RecentQueriesSection, FieldSuggestionsOrderSection, TriggerSection, ManualRangeSection, CommerceConfigurationSection, CommerceParametersSection } from './state-sections.js';
|
|
2
2
|
export type CommerceProductListingParametersState = CommerceFacetSetSection & CommerceSortSection & CommercePaginationSection;
|
|
3
3
|
export type CommerceSearchParametersState = CommerceProductListingParametersState & CommerceQuerySection;
|
|
4
|
-
export type CommerceAppState = CommerceConfigurationSection & CommerceStandaloneSearchBoxSection & ProductListingSection & RecommendationsSection & CommerceSearchSection & CommerceQuerySection & FacetOrderSection & FacetSearchSection & CategoryFacetSearchSection & CommerceFacetSetSection & CommercePaginationSection & CommerceSortSection & CommerceContextSection & CartSection & RecentQueriesSection & QuerySuggestionSection & QuerySetSection & CommerceDidYouMeanSection & InstantProductsSection & FieldSuggestionsOrderSection & TriggerSection & ManualRangeSection & VersionSection;
|
|
4
|
+
export type CommerceAppState = CommerceConfigurationSection & CommerceStandaloneSearchBoxSection & ProductListingSection & RecommendationsSection & CommerceSearchSection & CommerceQuerySection & FacetOrderSection & FacetSearchSection & CategoryFacetSearchSection & CommerceFacetSetSection & CommercePaginationSection & CommerceSortSection & CommerceContextSection & CommerceParametersSection & CartSection & RecentQueriesSection & QuerySuggestionSection & QuerySetSection & CommerceDidYouMeanSection & InstantProductsSection & FieldSuggestionsOrderSection & TriggerSection & ManualRangeSection & VersionSection;
|
package/force-app/main/default/staticresources/coveoheadless/definitions/state/state-sections.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { FieldSuggestionsOrderState } from '../features/commerce/facets/field-su
|
|
|
14
14
|
import { ManualNumericFacetSetState } from '../features/commerce/facets/numeric-facet/manual-numeric-facet-state.js';
|
|
15
15
|
import { InstantProductsState } from '../features/commerce/instant-products/instant-products-state.js';
|
|
16
16
|
import { CommercePaginationState } from '../features/commerce/pagination/pagination-state.js';
|
|
17
|
+
import { CommerceParametersState } from '../features/commerce/parameters/parameters-state.js';
|
|
17
18
|
import { ProductListingState } from '../features/commerce/product-listing/product-listing-state.js';
|
|
18
19
|
import { CommerceQueryState } from '../features/commerce/query/query-state.js';
|
|
19
20
|
import { RecommendationsState as CommerceRecommendationsState } from '../features/commerce/recommendations/recommendations-state.js';
|
|
@@ -71,6 +72,9 @@ export interface AdvancedSearchQueriesSection {
|
|
|
71
72
|
*/
|
|
72
73
|
advancedSearchQueries: AdvancedSearchQueriesState;
|
|
73
74
|
}
|
|
75
|
+
export interface CommerceParametersSection {
|
|
76
|
+
commerceParameters: CommerceParametersState;
|
|
77
|
+
}
|
|
74
78
|
export interface StaticFilterSection {
|
|
75
79
|
/**
|
|
76
80
|
* The set of static filters.
|
|
@@ -5,6 +5,9 @@ export declare class ExpiredTokenError extends Error {
|
|
|
5
5
|
export declare class InvalidControllerDefinition extends Error {
|
|
6
6
|
constructor();
|
|
7
7
|
}
|
|
8
|
+
export declare class MultipleRecommendationError extends Error {
|
|
9
|
+
constructor(slotId: string);
|
|
10
|
+
}
|
|
8
11
|
export declare class DisconnectedError extends Error {
|
|
9
12
|
statusCode: number;
|
|
10
13
|
constructor(url: string, statusCode?: number);
|