@coveo/quantic 3.11.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 +1 -1
- package/docs/out/quantic-docs.json +27 -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/quanticPager/e2e/pagerObject.ts +1 -1
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/pageObject.ts +1 -1
- 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/common.d.ts +12 -2
- 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/commerce.index.d.ts +1 -1
- 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 +7 -6
- 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/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 +14 -14
|
@@ -6,7 +6,7 @@ export declare class InstantResultsAnalyticsProvider extends SearchAnalyticsProv
|
|
|
6
6
|
constructor(getState: () => StateNeededByInstantResultsAnalyticsProvider);
|
|
7
7
|
private get activeInstantResultQuery();
|
|
8
8
|
private get activeInstantResultCache();
|
|
9
|
-
protected get results(): import("../../
|
|
9
|
+
protected get results(): import("../../ssr.index.js").Result[] | undefined;
|
|
10
10
|
protected get queryText(): string;
|
|
11
11
|
protected get responseTime(): number;
|
|
12
12
|
protected get numberOfResults(): number;
|
|
@@ -85,7 +85,7 @@ export declare class SearchAnalyticsProvider extends BaseAnalyticsProvider<State
|
|
|
85
85
|
};
|
|
86
86
|
getGeneratedAnswerMetadata(): Record<string, string | boolean>;
|
|
87
87
|
private get resultURIs();
|
|
88
|
-
protected get results(): import("../../
|
|
88
|
+
protected get results(): import("../../ssr.index.js").Result[] | undefined;
|
|
89
89
|
protected get queryText(): string;
|
|
90
90
|
protected get responseTime(): number;
|
|
91
91
|
protected get numberOfResults(): number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventSourceMessage } from '@microsoft/fetch-event-source';
|
|
2
|
+
import { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit';
|
|
2
3
|
import { GeneratedContentFormat } from '../../features/generated-answer/generated-response-format.js';
|
|
3
4
|
import { SearchAppState } from '../../state/search-app-state.js';
|
|
4
5
|
import { ConfigurationSection, GeneratedAnswerSection, InsightConfigurationSection } from '../../state/state-sections.js';
|
|
@@ -22,6 +23,7 @@ export interface GeneratedAnswerStream {
|
|
|
22
23
|
code: number;
|
|
23
24
|
};
|
|
24
25
|
}
|
|
26
|
+
export declare const updateCacheWithEvent: (event: EventSourceMessage, draft: GeneratedAnswerStream, dispatch: ThunkDispatch<StateNeededByAnswerAPI, unknown, UnknownAction>) => void;
|
|
25
27
|
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, {}>, {
|
|
26
28
|
getAnswer: import("@reduxjs/toolkit/query").QueryDefinition<Partial<SearchRequest>, 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">;
|
|
27
29
|
}, "answer", never, typeof import("@reduxjs/toolkit/query").coreModuleName>;
|
|
@@ -13,6 +13,8 @@ export interface CommerceEngineDefinition<TControllers extends ControllerDefinit
|
|
|
13
13
|
* @param options - The commerce engine definition
|
|
14
14
|
* @returns Three utility functions to fetch the initial state of the engine in SSR, hydrate the state in CSR,
|
|
15
15
|
* and a build function that can be used for edge cases requiring more control.
|
|
16
|
+
*
|
|
17
|
+
* @group Engine
|
|
16
18
|
*/
|
|
17
19
|
export declare function defineCommerceEngine<TControllerDefinitions extends ControllerDefinitionsMap<Controller>>(options: CommerceEngineDefinitionOptions<TControllerDefinitions>): {
|
|
18
20
|
listingEngineDefinition: CommerceEngineDefinition<TControllerDefinitions, SolutionType.listing>;
|
|
@@ -5,6 +5,8 @@ import { ControllerDefinitionsMap, SolutionType } from '../types/common.js';
|
|
|
5
5
|
import { BuildParameters, CommerceControllerDefinitionsMap, EngineDefinitionOptions } from '../types/core-engine.js';
|
|
6
6
|
/**
|
|
7
7
|
* The SSR commerce engine.
|
|
8
|
+
*
|
|
9
|
+
* @group Engine
|
|
8
10
|
*/
|
|
9
11
|
export interface SSRCommerceEngine extends CommerceEngine {
|
|
10
12
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Controller } from '../../../../controllers/controller/headless-controller.js';
|
|
2
|
+
import { ControllerDefinitionsMap } from '../../types/common.js';
|
|
3
|
+
export declare function filterRecommendationControllers<TControllerDefinitions extends ControllerDefinitionsMap<Controller>>(controllers: Record<string, Controller>, controllerDefinitions: TControllerDefinitions): {
|
|
4
|
+
/**
|
|
5
|
+
* Go through all the controllers passed in argument and only refresh recommendation controllers.
|
|
6
|
+
*
|
|
7
|
+
* @param controllers - A record of all controllers where the key is the controller name and the value is the controller instance.
|
|
8
|
+
* @param controllerNames - A list of all recommendation controllers to refresh
|
|
9
|
+
*/
|
|
10
|
+
refresh(whitelist?: string[]): void;
|
|
11
|
+
};
|
|
@@ -3,6 +3,7 @@ import type { Controller } from '../../../controllers/controller/headless-contro
|
|
|
3
3
|
import type { InvalidControllerDefinition } from '../../../utils/errors.js';
|
|
4
4
|
import type { HasKey, InferControllerStaticStateMapFromControllers, InferControllerStaticStateFromController, ControllerStaticStateMap, EngineDefinitionBuildResult, HydratedState, OptionsTuple, ControllersPropsMap, HasKeys, HasRequiredKeys, HasOptionalKeys } from '../../ssr-engine/types/common.js';
|
|
5
5
|
import { SSRCommerceEngine } from '../factories/build-factory.js';
|
|
6
|
+
import { Kind } from './kind.js';
|
|
6
7
|
export type { EngineDefinitionBuildResult, HydratedState, OptionsTuple, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, };
|
|
7
8
|
export declare enum SolutionType {
|
|
8
9
|
search = "search",
|
|
@@ -30,6 +31,9 @@ export interface ControllerDefinitionWithoutProps<TController extends Controller
|
|
|
30
31
|
*/
|
|
31
32
|
build(engine: SSRCommerceEngine, solutionType?: SolutionType): TController;
|
|
32
33
|
}
|
|
34
|
+
export interface ControllerWithKind extends Controller {
|
|
35
|
+
_kind: Kind;
|
|
36
|
+
}
|
|
33
37
|
export interface ControllerDefinitionWithProps<TController extends Controller, TProps> {
|
|
34
38
|
/**
|
|
35
39
|
* Creates an instance of the given controller.
|
|
@@ -39,13 +43,19 @@ export interface ControllerDefinitionWithProps<TController extends Controller, T
|
|
|
39
43
|
* @param solutionType - The type of solution for which the controller should be built (e.g. search or listing). This option only applies to sub-controllers.
|
|
40
44
|
* @returns The created controller instance.
|
|
41
45
|
*/
|
|
42
|
-
buildWithProps(engine: SSRCommerceEngine, props: TProps, solutionType?: SolutionType): TController;
|
|
46
|
+
buildWithProps(engine: SSRCommerceEngine, props: TProps, solutionType?: SolutionType): TController & ControllerWithKind;
|
|
43
47
|
}
|
|
44
48
|
export interface EngineStaticState<TSearchAction extends UnknownAction, TControllers extends ControllerStaticStateMap> {
|
|
45
49
|
searchActions: TSearchAction[];
|
|
46
50
|
controllers: TControllers;
|
|
47
51
|
}
|
|
48
|
-
export
|
|
52
|
+
export interface SolutionTypeAvailability {
|
|
53
|
+
[SolutionType.search]?: boolean;
|
|
54
|
+
[SolutionType.listing]?: boolean;
|
|
55
|
+
[SolutionType.standalone]?: boolean;
|
|
56
|
+
[SolutionType.recommendation]?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export type ControllerDefinition<TController extends Controller> = SolutionTypeAvailability & (ControllerDefinitionWithoutProps<TController> | ControllerDefinitionWithProps<TController, unknown>);
|
|
49
59
|
export interface ControllerDefinitionsMap<TController extends Controller> {
|
|
50
60
|
[customName: string]: ControllerDefinition<TController>;
|
|
51
61
|
}
|
package/force-app/main/default/staticresources/coveoheadless/definitions/commerce.index.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ export type { InstantProducts, InstantProductsState, InstantProductsOptions, Ins
|
|
|
102
102
|
export { buildStandaloneSearchBox } from './controllers/commerce/standalone-search-box/headless-standalone-search-box.js';
|
|
103
103
|
export type { StandaloneSearchBox, StandaloneSearchBoxState, } from './controllers/commerce/standalone-search-box/headless-standalone-search-box.js';
|
|
104
104
|
export type { StandaloneSearchBoxProps, StandaloneSearchBoxOptions, } from './controllers/standalone-search-box/headless-standalone-search-box.ts';
|
|
105
|
-
export type { UrlManagerProps, UrlManagerInitialState, UrlManagerState, UrlManager, } from './controllers/commerce/core/url-manager/headless-core-url-manager.js';
|
|
105
|
+
export type { BaseUrlManagerProps, UrlManagerProps, UrlManagerInitialState, UrlManagerState, UrlManager, } from './controllers/commerce/core/url-manager/headless-core-url-manager.js';
|
|
106
106
|
export type { Template } from './features/templates/templates-manager.ts';
|
|
107
107
|
export type { ProductTemplate, ProductTemplateCondition, ProductTemplatesManager, } from './features/commerce/product-templates/product-templates-manager.js';
|
|
108
108
|
export { buildProductTemplatesManager } from './features/commerce/product-templates/product-templates-manager.js';
|
|
@@ -3,6 +3,7 @@ import { BreadcrumbManager, BreadcrumbManagerState } from './headless-core-bread
|
|
|
3
3
|
export type { BreadcrumbManager, BreadcrumbManagerState };
|
|
4
4
|
/**
|
|
5
5
|
* Defines a `BreadcrumbManager` controller instance.
|
|
6
|
+
* @group Definers
|
|
6
7
|
*
|
|
7
8
|
* @returns The `BreadcrumbManager` controller definition.
|
|
8
9
|
*
|
|
@@ -17,6 +17,9 @@ export type { FacetType };
|
|
|
17
17
|
export type MappedFacetState = {
|
|
18
18
|
[T in FacetType]: T extends 'numericalRange' ? NumericFacetState : T extends 'regular' ? RegularFacetState : T extends 'dateRange' ? DateFacetState : T extends 'hierarchical' ? CategoryFacetState : T extends 'location' ? LocationFacetState : never;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* @group Definers
|
|
22
|
+
*/
|
|
20
23
|
export declare function defineFacetGenerator<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<FacetGenerator, TOptions>;
|
|
21
24
|
/**
|
|
22
25
|
* The `FacetGenerator` headless sub-controller creates commerce facet sub-controllers from the Commerce API search or
|
|
@@ -10,6 +10,13 @@ export interface ParameterManagerProps<T extends Parameters> {
|
|
|
10
10
|
* The initial state that should be applied to the `ParameterManager` sub-controller.
|
|
11
11
|
*/
|
|
12
12
|
initialState?: ParameterManagerInitialState<T>;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the controller's state should exclude the default parameters returned by the Commerce API, and only include
|
|
15
|
+
* the parameters that were set explicitly set through dispatched actions.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to `false`.
|
|
18
|
+
*/
|
|
19
|
+
excludeDefaultParameters?: boolean;
|
|
13
20
|
}
|
|
14
21
|
export interface CoreParameterManagerProps<T extends Parameters> extends ParameterManagerProps<T> {
|
|
15
22
|
/**
|
|
@@ -28,12 +35,6 @@ export interface CoreParameterManagerProps<T extends Parameters> extends Paramet
|
|
|
28
35
|
* The action to dispatch to fetch more results.
|
|
29
36
|
*/
|
|
30
37
|
fetchProductsActionCreator: FetchProductsActionCreator;
|
|
31
|
-
/**
|
|
32
|
-
* Enriches the parameters with the active parameters.
|
|
33
|
-
* @param state
|
|
34
|
-
* @param activeParams
|
|
35
|
-
*/
|
|
36
|
-
enrichParameters(state: CommerceEngine[typeof stateKey], activeParams: T): Required<T>;
|
|
37
38
|
}
|
|
38
39
|
export interface ParameterManagerInitialState<T> {
|
|
39
40
|
/**
|
|
@@ -12,7 +12,9 @@ export type { ParameterManager, ParameterManagerProps, ParameterManagerState, Pa
|
|
|
12
12
|
*
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
export declare function defineParameterManager<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithProps<ParameterManager<
|
|
15
|
+
export declare function defineParameterManager<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithProps<ParameterManager<MappedParameterTypes<TOptions>>, TOptions, SSRParameterManagerProps<MappedParameterTypes<TOptions>>>;
|
|
16
|
+
export interface SSRParameterManagerProps<T extends Parameters> extends Omit<ParameterManagerProps<T>, 'excludeDefaultParameters'> {
|
|
17
|
+
}
|
|
16
18
|
type MappedParameterTypes<TOptions extends ControllerDefinitionOption | undefined> = TOptions extends {
|
|
17
19
|
listing: true;
|
|
18
20
|
search: true;
|
|
@@ -68,7 +68,7 @@ export interface SearchAndListingSubControllers<P extends Parameters, S extends
|
|
|
68
68
|
* @param props - Properties for the `ParameterManager` sub-controller.
|
|
69
69
|
* @returns A `ParameterManager` sub-controller.
|
|
70
70
|
*/
|
|
71
|
-
parameterManager(props
|
|
71
|
+
parameterManager(props?: ParameterManagerProps<P>): ParameterManager<P>;
|
|
72
72
|
}
|
|
73
73
|
export interface SearchSubControllers extends SearchAndListingSubControllers<CommerceSearchParameters, SearchSummaryState> {
|
|
74
74
|
/**
|
|
@@ -98,7 +98,6 @@ export interface SearchAndListingSubControllerProps<P extends Parameters, S exte
|
|
|
98
98
|
parametersDefinition: SchemaDefinition<Required<P>>;
|
|
99
99
|
activeParametersSelector: (state: CommerceEngine[typeof stateKey]) => P;
|
|
100
100
|
restoreActionCreator: (parameters: P) => UnknownAction;
|
|
101
|
-
enrichParameters: (state: CommerceEngine[typeof stateKey], activeParams: P) => Required<P>;
|
|
102
101
|
facetSearchType: FacetSearchType;
|
|
103
102
|
}
|
|
104
103
|
/**
|
|
@@ -2,9 +2,18 @@ import { CommerceEngine } from '../../../../app/commerce-engine/commerce-engine.
|
|
|
2
2
|
import { stateKey } from '../../../../app/state-key.js';
|
|
3
3
|
import { Parameters } from '../../../../features/commerce/parameters/parameters-actions.js';
|
|
4
4
|
import { Serializer } from '../../../../features/commerce/parameters/parameters-serializer.js';
|
|
5
|
-
import { UrlManager, UrlManagerInitialState, type UrlManagerProps, UrlManagerState } from '../../../url-manager/headless-url-manager.js';
|
|
5
|
+
import { UrlManager, UrlManagerInitialState, type UrlManagerProps as BaseUrlManagerProps, UrlManagerState } from '../../../url-manager/headless-url-manager.js';
|
|
6
6
|
import { ParameterManager, ParameterManagerProps } from '../parameter-manager/headless-core-parameter-manager.js';
|
|
7
|
-
export type {
|
|
7
|
+
export type { UrlManager, UrlManagerInitialState, UrlManagerState, BaseUrlManagerProps, };
|
|
8
|
+
export interface UrlManagerProps extends BaseUrlManagerProps {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the controller's state should exclude the default parameters returned by the Commerce API, and only include
|
|
11
|
+
* the parameters that were set explicitly set through dispatched actions.
|
|
12
|
+
*
|
|
13
|
+
* Defaults to `false`.
|
|
14
|
+
*/
|
|
15
|
+
excludeDefaultParameters?: boolean;
|
|
16
|
+
}
|
|
8
17
|
interface CoreUrlManagerProps<T extends Parameters> extends UrlManagerProps {
|
|
9
18
|
requestIdSelector: (state: CommerceEngine[typeof stateKey]) => string;
|
|
10
19
|
parameterManagerBuilder: (engine: CommerceEngine, props: ParameterManagerProps<T>) => ParameterManager<T>;
|
|
@@ -2,7 +2,7 @@ import { ControllerDefinitionOption, SubControllerDefinitionWithoutProps } from
|
|
|
2
2
|
import { ProductListing } from '../product-listing/headless-product-listing.js';
|
|
3
3
|
import { Search } from '../search/headless-search.js';
|
|
4
4
|
export type { ProductListingState as ProductListState } from '../product-listing/headless-product-listing.js';
|
|
5
|
-
export type ProductList = Pick<ProductListing | Search, 'state' | 'subscribe' | 'interactiveProduct'>;
|
|
5
|
+
export type ProductList = Pick<ProductListing | Search, 'state' | 'subscribe' | 'interactiveProduct' | 'promoteChildToParent'>;
|
|
6
6
|
/**
|
|
7
7
|
* Defines a `ProductList` controller instance.
|
|
8
8
|
* @group Definers
|
|
@@ -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 {
|
|
@@ -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);
|