@coveo/quantic 3.45.4 → 3.45.5
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 +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/cart/headless-cart.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/generator/headless-commerce-facet-generator.ssr.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/pagination/headless-core-commerce-pagination.ssr.d.ts +3 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/parameter-manager/headless-core-parameter-manager.ssr.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/product-list/headless-product-list.ssr.d.ts +3 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/sort/headless-core-commerce-sort.ssr.d.ts +3 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/summary/headless-core-summary.ssr.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-definitions.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/fetch-static-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/build.d.ts +5 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/engine.d.ts +9 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/fetch-static-state.d.ts +12 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/hydrate-static-state.d.ts +11 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +3 -3
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +3 -3
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +3 -3
- package/package.json +2 -2
|
@@ -5,6 +5,8 @@ export type { BreadcrumbManager, BreadcrumbManagerState };
|
|
|
5
5
|
* Defines a `BreadcrumbManager` controller instance.
|
|
6
6
|
* @group Definers
|
|
7
7
|
*
|
|
8
|
+
* @param options - Deprecated `listing` and `search` options, which will be removed in the next
|
|
9
|
+
* major version: omit them to build the controller for both search and product listing pages.
|
|
8
10
|
* @returns The `BreadcrumbManager` controller definition.
|
|
9
11
|
*/
|
|
10
12
|
export declare function defineBreadcrumbManager<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<BreadcrumbManager, TOptions>;
|
|
@@ -7,7 +7,7 @@ export interface CartBuildProps {
|
|
|
7
7
|
export interface CartDefinition extends UniversalControllerDefinitionWithProps<Cart, CartBuildProps> {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* @deprecated In the future, the
|
|
10
|
+
* @deprecated In the future, the cart controller will be included by default in the engine definition. You will no longer need to define it manually
|
|
11
11
|
* Defines a `Cart` controller instance.
|
|
12
12
|
* @group Definers
|
|
13
13
|
*
|
|
@@ -20,6 +20,9 @@ export type MappedFacetState = {
|
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* @group Definers
|
|
23
|
+
*
|
|
24
|
+
* @param options - Deprecated `listing` and `search` options, which will be removed in the next
|
|
25
|
+
* major version: omit them to build the controller for both search and product listing pages.
|
|
23
26
|
*/
|
|
24
27
|
export declare function defineFacetGenerator<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<FacetGenerator, TOptions>;
|
|
25
28
|
/**
|
|
@@ -5,7 +5,9 @@ export type { CorePaginationOptions, Pagination, PaginationOptions, PaginationPr
|
|
|
5
5
|
* Defines a `Pagination` controller instance.
|
|
6
6
|
* @group Definers
|
|
7
7
|
*
|
|
8
|
-
* @param props - The configurable `Pagination` properties.
|
|
8
|
+
* @param props - The configurable `Pagination` properties. The `listing` and `search` options are
|
|
9
|
+
* deprecated and will be removed in the next major version: omit them to build the controller for
|
|
10
|
+
* both search and product listing pages.
|
|
9
11
|
* @returns The `Pagination` controller definition.
|
|
10
12
|
*/
|
|
11
13
|
export declare function definePagination<TOptions extends ControllerDefinitionOption | undefined>(props?: PaginationProps & TOptions): SubControllerDefinitionWithoutProps<Pagination, TOptions>;
|
|
@@ -9,6 +9,8 @@ export type { CommerceSearchParameters, ParameterManager, ParameterManagerProps,
|
|
|
9
9
|
* Defines a `ParameterManager` controller instance.
|
|
10
10
|
* @group Definers
|
|
11
11
|
*
|
|
12
|
+
* @param options - Deprecated `listing` and `search` options, which will be removed in the next
|
|
13
|
+
* major version: omit them to build the controller for both search and product listing pages.
|
|
12
14
|
* @returns The `ParameterManager` controller definition.
|
|
13
15
|
*/
|
|
14
16
|
export declare function defineParameterManager<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithProps<ParameterManager<MappedParameterTypes<TOptions>>, TOptions, SSRParameterManagerProps<MappedParameterTypes<TOptions>>>;
|
|
@@ -18,7 +18,9 @@ interface ProductListOptions {
|
|
|
18
18
|
* Defines a `ProductList` controller instance.
|
|
19
19
|
* @group Definers
|
|
20
20
|
*
|
|
21
|
-
* @param options - The configurable `ProductList` controller options.
|
|
21
|
+
* @param options - The configurable `ProductList` controller options. The `listing` and `search`
|
|
22
|
+
* options are deprecated and will be removed in the next major version: omit them to build the
|
|
23
|
+
* controller for both search and product listing pages.
|
|
22
24
|
* @returns The `ProductList` controller definition.
|
|
23
25
|
*/
|
|
24
26
|
export declare function defineProductList<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions & ProductListOptions): SubControllerDefinitionWithoutProps<ProductList, TOptions>;
|
|
@@ -5,7 +5,9 @@ export type { Sort, SortProps, SortState };
|
|
|
5
5
|
* Defines a `Sort` controller instance.
|
|
6
6
|
* @group Definers
|
|
7
7
|
*
|
|
8
|
-
* @param props - The configurable `Sort` properties.
|
|
8
|
+
* @param props - The configurable `Sort` properties. The `listing` and `search` options are
|
|
9
|
+
* deprecated and will be removed in the next major version: omit them to build the controller for
|
|
10
|
+
* both search and product listing pages.
|
|
9
11
|
* @returns The `Sort` controller definition.
|
|
10
12
|
*/
|
|
11
13
|
export declare function defineSort<TOptions extends ControllerDefinitionOption | undefined>(props?: SortProps & TOptions): SubControllerDefinitionWithoutProps<Sort, TOptions>;
|
|
@@ -8,6 +8,8 @@ export type { ProductListingSummaryState, RecommendationsSummaryState, SearchSum
|
|
|
8
8
|
* Defines a `Summary` controller instance.
|
|
9
9
|
* @group Definers
|
|
10
10
|
*
|
|
11
|
+
* @param options - Deprecated `listing` and `search` options, which will be removed in the next
|
|
12
|
+
* major version: omit them to build the controller for both search and product listing pages.
|
|
11
13
|
* @returns The `Summary` controller definition.
|
|
12
14
|
*/
|
|
13
15
|
export declare function defineSummary<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<Summary<ProductListingSummaryState | SearchSummaryState | RecommendationsSummaryState>, TOptions>;
|
|
@@ -180,7 +180,8 @@ type DefaultControllerProps<TControllers extends ControllerDefinitionsMap<Contro
|
|
|
180
180
|
};
|
|
181
181
|
type ConditionalControllerProps<TControllers extends ControllerDefinitionsMap<Controller>, TControllersPropsMap extends ControllersPropsMap, TSolutionType extends SolutionType, K extends keyof TControllers> = TSolutionType extends SolutionType.recommendation ? RecommendationControllerProps<TControllers, TControllersPropsMap, K> : DefaultControllerProps<TControllers, TControllersPropsMap, K>;
|
|
182
182
|
/**
|
|
183
|
-
* @deprecated
|
|
183
|
+
* @deprecated The `listing` and `search` options will be removed in the next major version. Omit
|
|
184
|
+
* them to build the controller for both search and product listing pages.
|
|
184
185
|
*/
|
|
185
186
|
export interface ControllerDefinitionOption {
|
|
186
187
|
/**
|
|
@@ -7,8 +7,8 @@ import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption,
|
|
|
7
7
|
import type { EngineStaticState } from './engine.js';
|
|
8
8
|
import type { FromBuildResult } from './from-build-result.js';
|
|
9
9
|
/**
|
|
10
|
-
* @deprecated This
|
|
11
|
-
*
|
|
10
|
+
* @deprecated This type will be removed in the next major version. The `accessToken` and
|
|
11
|
+
* `navigatorContext` options of `fetchStaticState()` aren't affected.
|
|
12
12
|
*/
|
|
13
13
|
export type FetchStaticStateOptions = {
|
|
14
14
|
/**
|
package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/build.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
|
|
2
|
+
import type { NavigatorContext } from '../../../app/navigator-context-provider.js';
|
|
2
3
|
import type { ControllersMap, ControllersPropsMap } from './controllers.js';
|
|
3
4
|
import type { EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './engine.js';
|
|
4
5
|
import type { OptionsExtender, OptionsTuple } from './utilities.js';
|
|
@@ -10,6 +11,10 @@ interface BuildOptions<TEngineOptions> {
|
|
|
10
11
|
* @deprecated This option will be removed in the next major version.
|
|
11
12
|
*/
|
|
12
13
|
extend?: OptionsExtender<TEngineOptions>;
|
|
14
|
+
/**
|
|
15
|
+
* A per-request navigator context applied to this call only, without mutating the shared definition.
|
|
16
|
+
*/
|
|
17
|
+
navigatorContext?: NavigatorContext;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* This type should not be used directly.
|
|
@@ -29,8 +29,8 @@ export interface EngineDefinition<TEngine extends CoreEngine | CoreEngineNext, T
|
|
|
29
29
|
/**
|
|
30
30
|
* @deprecated This method will be removed in a future major version. It mutates the shared engine
|
|
31
31
|
* definition, so on a server handling concurrent requests one request can overwrite another
|
|
32
|
-
* request's navigator context.
|
|
33
|
-
*
|
|
32
|
+
* request's navigator context. Pass a per-request `navigatorContext` to `fetchStaticState()` and
|
|
33
|
+
* `hydrateStaticState()` instead, or a `navigatorContextProvider` to `defineSearchEngine()`.
|
|
34
34
|
*
|
|
35
35
|
* Sets the navigator context provider.
|
|
36
36
|
* This provider is essential for retrieving navigation-related data such as referrer, userAgent, location, and clientId, which are crucial for handling both server-side and client-side API requests effectively.
|
|
@@ -45,10 +45,17 @@ export interface EngineDefinition<TEngine extends CoreEngine | CoreEngineNext, T
|
|
|
45
45
|
*/
|
|
46
46
|
build: Build<TEngine, TEngineOptions, InferControllersMapFromDefinition<TControllers>, InferControllerPropsMapFromDefinitions<TControllers>>;
|
|
47
47
|
/**
|
|
48
|
+
* @deprecated This method will be removed in the next major version. Use the access token from
|
|
49
|
+
* your engine configuration instead.
|
|
50
|
+
*
|
|
48
51
|
* Returns the access token.
|
|
49
52
|
*/
|
|
50
53
|
getAccessToken: () => string;
|
|
51
54
|
/**
|
|
55
|
+
* @deprecated This method will be removed in the next major version. To renew an expiring token,
|
|
56
|
+
* configure `renewAccessToken`; to change the token of an engine you already have, dispatch
|
|
57
|
+
* `loadConfigurationActions(engine).updateBasicConfiguration({accessToken})` on it.
|
|
58
|
+
*
|
|
52
59
|
* Updates the access token.
|
|
53
60
|
* @param accessToken - The access token to update.
|
|
54
61
|
*/
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import type { UnknownAction } from '@reduxjs/toolkit';
|
|
2
2
|
import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
|
|
3
|
+
import type { NavigatorContext } from '../../../app/navigator-context-provider.js';
|
|
3
4
|
import type { ControllerStaticStateMap, ControllersMap, ControllersPropsMap } from './controllers.js';
|
|
4
5
|
import type { EngineDefinitionControllersPropsOption, EngineStaticState } from './engine.js';
|
|
5
6
|
import type { FromBuildResult } from './from-build-result.js';
|
|
6
7
|
import type { OptionsTuple } from './utilities.js';
|
|
7
|
-
type FetchStaticStateOptions = {
|
|
8
|
+
type FetchStaticStateOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* The navigator context to use for this request only.
|
|
11
|
+
*
|
|
12
|
+
* When provided, it is applied to this request's engine without mutating the shared definition,
|
|
13
|
+
* so concurrent requests do not read each other's client ID, user agent, or forwarded-for values.
|
|
14
|
+
* When omitted, the provider set with `setNavigatorContextProvider` is used.
|
|
15
|
+
*/
|
|
16
|
+
navigatorContext?: NavigatorContext;
|
|
17
|
+
};
|
|
8
18
|
export type FetchStaticState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap, TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap> = {
|
|
9
19
|
/**
|
|
10
20
|
* Executes only the initial search for a given configuration, then returns a resumable snapshot of engine state along with the state of the controllers.
|
|
@@ -15,6 +25,6 @@ export type FetchStaticState<TEngine extends CoreEngine | CoreEngineNext, TContr
|
|
|
15
25
|
/**
|
|
16
26
|
* @deprecated Use the fetchStaticState() method instead
|
|
17
27
|
*/
|
|
18
|
-
fromBuildResult: FromBuildResult<TEngine, TControllers, FetchStaticStateOptions, EngineStaticState<TSearchAction, TControllersStaticState>>;
|
|
28
|
+
fromBuildResult: FromBuildResult<TEngine, TControllers, Omit<FetchStaticStateOptions, 'navigatorContext'>, EngineStaticState<TSearchAction, TControllersStaticState>>;
|
|
19
29
|
};
|
|
20
30
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UnknownAction } from '@reduxjs/toolkit';
|
|
2
2
|
import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
|
|
3
|
+
import type { NavigatorContext } from '../../../app/navigator-context-provider.js';
|
|
3
4
|
import type { ControllersMap, ControllersPropsMap } from './controllers.js';
|
|
4
5
|
import type { EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './engine.js';
|
|
5
6
|
import type { FromBuildResult } from './from-build-result.js';
|
|
@@ -10,6 +11,15 @@ interface HydrateStaticStateOptions<TSearchAction> {
|
|
|
10
11
|
* The new property will accept an array of actions instead of a single action to support multiple search operations (e.g. search and recommendation).
|
|
11
12
|
*/
|
|
12
13
|
searchAction: TSearchAction;
|
|
14
|
+
/**
|
|
15
|
+
* The navigator context to use for this `hydrateStaticState()` call only.
|
|
16
|
+
*
|
|
17
|
+
* When provided, it is applied to this call's engine without mutating the shared definition.
|
|
18
|
+
* Pass the same navigator context that was used to fetch the static state so the hydrated engine
|
|
19
|
+
* reports the same client ID and keeps the analytics session continuous. When omitted, the provider
|
|
20
|
+
* set with `setNavigatorContextProvider` is used.
|
|
21
|
+
*/
|
|
22
|
+
navigatorContext?: NavigatorContext;
|
|
13
23
|
}
|
|
14
24
|
export interface HydratedState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> extends EngineDefinitionBuildResult<TEngine, TControllers> {
|
|
15
25
|
}
|
|
@@ -23,6 +33,6 @@ export type HydrateStaticState<TEngine extends CoreEngine | CoreEngineNext, TCon
|
|
|
23
33
|
/**
|
|
24
34
|
* @deprecated Use the hydrateStaticState() method instead
|
|
25
35
|
*/
|
|
26
|
-
fromBuildResult: FromBuildResult<TEngine, TControllers, HydrateStaticStateOptions<TSearchAction>, HydratedState<TEngine, TControllers>>;
|
|
36
|
+
fromBuildResult: FromBuildResult<TEngine, TControllers, Omit<HydrateStaticStateOptions<TSearchAction>, 'navigatorContext'>, HydratedState<TEngine, TControllers>>;
|
|
27
37
|
};
|
|
28
38
|
export {};
|