@coveo/quantic 3.28.2-pre.e8eda4acf9 → 3.28.2-pre.f527c8a944
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/api/api-client-utils.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/recommendations/recommendations-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-case-classifications/get-case-classifications-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-document-suggestions/get-document-suggestions-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/query/query-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/user-actions/user-actions-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/engine → app/commerce-engine}/commerce-engine.ssr.d.ts +5 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controller-utils.d.ts → app/commerce-ssr-engine/common.d.ts} +2 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/factories/build-factory.d.ts +4 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/factories/hydrated-state-factory.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/factories/recommendation-hydrated-state-factory.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/factories/recommendation-static-state-factory.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/factories/static-state-factory.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine/factories}/utils/recommendation-filter.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/types/build.d.ts +2 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/types/controller-definitions.d.ts → app/commerce-ssr-engine/types/common.d.ts} +97 -10
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/types/engine.d.ts → app/commerce-ssr-engine/types/core-engine.d.ts} +14 -12
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/types/fetch-static-state.d.ts +2 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/types/from-build-result.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/types/hydrate-static-state.d.ts +2 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/engine → app/search-engine}/search-engine.ssr.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/common → app/ssr-engine}/augment-preprocess-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/common/controller-utils.d.ts → app/ssr-engine/common.d.ts} +2 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/common → app/ssr-engine}/types/build.d.ts +2 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/common.d.ts +80 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/common/types/engine.d.ts → app/ssr-engine/types/core-engine.d.ts} +5 -18
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/common → app/ssr-engine}/types/fetch-static-state.d.ts +2 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/common → app/ssr-engine}/types/from-build-result.d.ts +2 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/common → app/ssr-engine}/types/hydrate-static-state.d.ts +2 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/breadcrumb-manager/headless-breadcrumb-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce/context}/cart/headless-cart.ssr.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/context/headless-context.ssr.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce/core}/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce/core/facets}/generator/headless-commerce-facet-generator.ssr.d.ts +12 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce/core}/pagination/headless-core-commerce-pagination.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce/core}/parameter-manager/headless-core-parameter-manager.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce/core}/sort/headless-core-commerce-sort.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/summary/headless-core-summary.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +16 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/instant-products/headless-instant-products.ssr.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-list/headless-product-list.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/product-view/headless-product-view.ssr.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/recent-queries-list/headless-recent-queries-list.ssr.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/recommendations/headless-recommendations.ssr.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce/search}/did-you-mean/headless-did-you-mean.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/search-box/headless-search-box.ssr.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/standalone-search-box/headless-standalone-search-box.ssr.d.ts +5 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/triggers/headless-notify-trigger.ssr.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/triggers/headless-query-trigger.ssr.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce/controllers → controllers/commerce}/triggers/headless-redirection-trigger.ssr.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/context/headless-context.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/dictionary-field-context/headless-dictionary-field-context.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facet-manager/headless-facet-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/facets/automatic-facet-generator/headless-automatic-facet-generator.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/facets/category-facet/headless-category-facet.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/facets/facet/headless-facet.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/facets/range-facet/date-facet/headless-date-filter.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/facets/range-facet/numeric-facet/headless-numeric-filter.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/field-suggestions/category-facet/headless-category-field-suggestions.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/field-suggestions/facet/headless-field-suggestions.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/folded-result-list/headless-folded-result-list.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/history-manager/headless-history-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/instant-results/instant-results.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/pager/headless-pager.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-error/headless-query-error.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-summary/headless-query-summary.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/quickview/headless-quickview.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/recent-queries-list/headless-recent-queries-list.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/recent-results-list/headless-recent-results-list.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/relevance-inspector/headless-relevance-inspector.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/result-list/headless-result-list.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/results-per-page/headless-results-per-page.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/search-box/headless-search-box.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/search-parameter-manager/headless-search-parameter-manager.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/search-status/headless-search-status.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/smart-snippet/headless-smart-snippet.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/sort/headless-sort.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/standalone-search-box/headless-standalone-search-box.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/static-filter/headless-static-filter.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/tab/headless-tab.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/tab-manager/headless-tab-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-execute-trigger.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-notify-trigger.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-query-trigger.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/search/controllers → controllers}/triggers/headless-redirection-trigger.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/url-manager/headless-url-manager.ssr.d.ts +16 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/did-you-mean/did-you-mean-selectors.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions-thunk-processor.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-actions-thunk-processor.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions-thunk-processor.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +47 -48
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr.index.d.ts +87 -88
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-engine-v2.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/errors.d.ts +9 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/facet-utils.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +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 +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/product-list/headless-product-list.ssr.d.ts +0 -12
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/summary/headless-core-summary.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-constants.d.ts +0 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-inference.d.ts +0 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-scopes.d.ts +0 -71
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/errors.d.ts +0 -9
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/controllers.d.ts +0 -37
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/inference.d.ts +0 -19
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/utilities.d.ts +0 -14
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/breadcrumb-manager/headless-breadcrumb-manager.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/context/headless-context.ssr.d.ts +0 -14
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/dictionary-field-context/headless-dictionary-field-context.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facet-manager/headless-facet-manager.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/history-manager/headless-history-manager.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/query-error/headless-query-error.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/query-summary/headless-query-summary.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/search-status/headless-search-status.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/static-filter/headless-static-filter.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/tab-manager/headless-tab-manager.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-execute-trigger.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-notify-trigger.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-query-trigger.ssr.d.ts +0 -14
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/url-manager/headless-url-manager.ssr.d.ts +0 -16
- /package/force-app/main/default/staticresources/coveoheadless/definitions/{ssr/commerce → app/commerce-ssr-engine}/types/kind.d.ts +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { UnknownAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { Controller } from '../../../controllers/controller/headless-controller.js';
|
|
3
|
+
import type { CoreEngine, CoreEngineNext } from '../../engine.js';
|
|
4
|
+
export type HasKey<T, K extends PropertyKey> = T extends unknown ? K extends keyof T ? T[K] extends never ? never : true : never : never;
|
|
5
|
+
export type HasKeys<TObject> = TObject extends {} ? keyof TObject extends never ? false : true : boolean;
|
|
6
|
+
export type HasRequiredKeys<TObject> = TObject extends {} ? {
|
|
7
|
+
[K in keyof TObject]-?: {} extends Pick<TObject, K> ? never : K;
|
|
8
|
+
}[keyof TObject] extends never ? false : true : boolean;
|
|
9
|
+
export type HasOptionalKeys<TObject> = TObject extends {} ? {
|
|
10
|
+
[K in keyof TObject]-?: {} extends Pick<TObject, K> ? K : never;
|
|
11
|
+
}[keyof TObject] extends never ? false : true : boolean;
|
|
12
|
+
type ExtractRequiredOptions<TOptions> = {
|
|
13
|
+
[TKey in keyof TOptions as Pick<TOptions, TKey> extends Required<Pick<TOptions, TKey>> ? TKey : never]: TOptions[TKey];
|
|
14
|
+
};
|
|
15
|
+
export type OptionsTuple<TOptions> = HasKeys<TOptions> extends false ? [] : HasKeys<ExtractRequiredOptions<TOptions>> extends false ? [options?: TOptions] : [options: TOptions];
|
|
16
|
+
export type OptionsExtender<TOptions> = (options: TOptions) => TOptions | Promise<TOptions>;
|
|
17
|
+
export interface ControllersPropsMap {
|
|
18
|
+
[customName: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface ControllersMap {
|
|
21
|
+
[customName: string]: Controller;
|
|
22
|
+
}
|
|
23
|
+
interface ControllerStaticState<TState> {
|
|
24
|
+
state: TState;
|
|
25
|
+
}
|
|
26
|
+
export interface ControllerStaticStateMap {
|
|
27
|
+
[customName: string]: ControllerStaticState<unknown>;
|
|
28
|
+
}
|
|
29
|
+
export interface ControllerDefinitionWithoutProps<TEngine extends CoreEngine | CoreEngineNext, TController extends Controller> {
|
|
30
|
+
/**
|
|
31
|
+
* Creates an instance of the given controller.
|
|
32
|
+
*
|
|
33
|
+
* @param engine - The search engine.
|
|
34
|
+
* @returns The controller.
|
|
35
|
+
*/
|
|
36
|
+
build(engine: TEngine): TController;
|
|
37
|
+
}
|
|
38
|
+
export interface ControllerDefinitionWithProps<TEngine extends CoreEngine | CoreEngineNext, TController extends Controller, TProps> {
|
|
39
|
+
/**
|
|
40
|
+
* Creates an instance of the given controller.
|
|
41
|
+
*
|
|
42
|
+
* @param engine - The search engine.
|
|
43
|
+
* @param props - The controller properties.
|
|
44
|
+
* @returns The controller.
|
|
45
|
+
*/
|
|
46
|
+
buildWithProps(engine: TEngine, props?: TProps): TController;
|
|
47
|
+
}
|
|
48
|
+
export type ControllerDefinition<TEngine extends CoreEngine | CoreEngineNext, TController extends Controller> = ControllerDefinitionWithoutProps<TEngine, TController> | ControllerDefinitionWithProps<TEngine, TController, unknown>;
|
|
49
|
+
export interface ControllerDefinitionsMap<TEngine extends CoreEngine | CoreEngineNext, TController extends Controller> {
|
|
50
|
+
[customName: string]: ControllerDefinition<TEngine, TController>;
|
|
51
|
+
}
|
|
52
|
+
export interface EngineDefinitionBuildResult<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> {
|
|
53
|
+
engine: TEngine;
|
|
54
|
+
controllers: TControllers;
|
|
55
|
+
}
|
|
56
|
+
export interface EngineStaticState<TSearchAction extends UnknownAction, TControllers extends ControllerStaticStateMap> {
|
|
57
|
+
searchAction: TSearchAction;
|
|
58
|
+
controllers: TControllers;
|
|
59
|
+
}
|
|
60
|
+
export interface HydratedState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> extends EngineDefinitionBuildResult<TEngine, TControllers> {
|
|
61
|
+
}
|
|
62
|
+
export type InferControllerPropsFromDefinition<TController extends ControllerDefinition<CoreEngine | CoreEngineNext, Controller>> = TController extends ControllerDefinitionWithProps<CoreEngine | CoreEngineNext, Controller, infer Props> ? Props : TController extends ControllerDefinitionWithoutProps<CoreEngine | CoreEngineNext, Controller> ? {} : unknown;
|
|
63
|
+
export type InferControllerPropsMapFromDefinitions<TControllers extends ControllerDefinitionsMap<CoreEngine | CoreEngineNext, Controller>> = {
|
|
64
|
+
[K in keyof TControllers as HasKeys<InferControllerPropsFromDefinition<TControllers[K]>> extends false ? never : K]: InferControllerPropsFromDefinition<TControllers[K]>;
|
|
65
|
+
};
|
|
66
|
+
export type InferControllerFromDefinition<TDefinition extends ControllerDefinition<CoreEngine | CoreEngineNext, Controller>> = TDefinition extends ControllerDefinition<infer _, infer TController> ? TController : never;
|
|
67
|
+
export type InferControllersMapFromDefinition<TControllers extends ControllerDefinitionsMap<CoreEngine | CoreEngineNext, Controller>> = {
|
|
68
|
+
[K in keyof TControllers]: InferControllerFromDefinition<TControllers[K]>;
|
|
69
|
+
};
|
|
70
|
+
export type InferControllerStaticStateFromController<TController extends Controller> = ControllerStaticState<TController['state']>;
|
|
71
|
+
export type InferControllerStaticStateMapFromDefinitions<TControllers extends ControllerDefinitionsMap<CoreEngine | CoreEngineNext, Controller>> = {
|
|
72
|
+
[K in keyof TControllers]: InferControllerStaticStateFromController<InferControllerFromDefinition<TControllers[K]>>;
|
|
73
|
+
};
|
|
74
|
+
export type InferControllerStaticStateMapFromControllers<TControllers extends ControllersMap> = {
|
|
75
|
+
[K in keyof TControllers]: InferControllerStaticStateFromController<TControllers[K]>;
|
|
76
|
+
};
|
|
77
|
+
export type EngineDefinitionControllersPropsOption<TControllersPropsMap extends ControllersPropsMap> = HasKeys<TControllersPropsMap> extends false ? {} : {
|
|
78
|
+
controllers: TControllersPropsMap;
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import type { AnyAction
|
|
2
|
-
import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
|
|
3
|
-
import type { EngineConfiguration } from '../../../app/engine-configuration.js';
|
|
4
|
-
import type { NavigatorContextProvider } from '../../../app/navigator-context-provider.js';
|
|
1
|
+
import type { AnyAction } from '@reduxjs/toolkit';
|
|
5
2
|
import type { Controller } from '../../../controllers/controller/headless-controller.js';
|
|
3
|
+
import type { CoreEngine, CoreEngineNext } from '../../engine.js';
|
|
4
|
+
import type { EngineConfiguration } from '../../engine-configuration.js';
|
|
5
|
+
import type { NavigatorContextProvider } from '../../navigator-context-provider.js';
|
|
6
6
|
import type { Build } from './build.js';
|
|
7
|
-
import type { ControllerDefinitionsMap,
|
|
7
|
+
import type { ControllerDefinitionsMap, InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromDefinitions, InferControllersMapFromDefinition } from './common.js';
|
|
8
8
|
import type { FetchStaticState } from './fetch-static-state.js';
|
|
9
9
|
import type { HydrateStaticState } from './hydrate-static-state.js';
|
|
10
|
-
import type { InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromDefinitions, InferControllersMapFromDefinition } from './inference.js';
|
|
11
|
-
import type { HasKeys } from './utilities.js';
|
|
12
10
|
export type EngineDefinitionOptions<TOptions extends {
|
|
13
11
|
configuration: EngineConfiguration;
|
|
14
12
|
}, TControllers extends ControllerDefinitionsMap<CoreEngine | CoreEngineNext, Controller>> = TOptions & {
|
|
@@ -38,17 +36,6 @@ export interface EngineDefinition<TEngine extends CoreEngine | CoreEngineNext, T
|
|
|
38
36
|
*/
|
|
39
37
|
build: Build<TEngine, TEngineOptions, InferControllersMapFromDefinition<TControllers>, InferControllerPropsMapFromDefinitions<TControllers>>;
|
|
40
38
|
}
|
|
41
|
-
export interface EngineDefinitionBuildResult<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> {
|
|
42
|
-
engine: TEngine;
|
|
43
|
-
controllers: TControllers;
|
|
44
|
-
}
|
|
45
|
-
export type EngineDefinitionControllersPropsOption<TControllersPropsMap extends ControllersPropsMap> = HasKeys<TControllersPropsMap> extends false ? {} : {
|
|
46
|
-
controllers: TControllersPropsMap;
|
|
47
|
-
};
|
|
48
|
-
export interface EngineStaticState<TSearchAction extends UnknownAction, TControllers extends ControllerStaticStateMap> {
|
|
49
|
-
searchAction: TSearchAction;
|
|
50
|
-
controllers: TControllers;
|
|
51
|
-
}
|
|
52
39
|
export type InferStaticState<T extends {
|
|
53
40
|
fetchStaticState(...args: unknown[]): Promise<unknown>;
|
|
54
41
|
}> = Awaited<ReturnType<T['fetchStaticState']>>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { UnknownAction } from '@reduxjs/toolkit';
|
|
2
|
-
import type { CoreEngine, CoreEngineNext } from '
|
|
3
|
-
import type { ControllerStaticStateMap, ControllersMap, ControllersPropsMap } from './
|
|
4
|
-
import type { EngineDefinitionControllersPropsOption, EngineStaticState } from './engine.js';
|
|
2
|
+
import type { CoreEngine, CoreEngineNext } from '../../engine.js';
|
|
3
|
+
import type { ControllerStaticStateMap, ControllersMap, ControllersPropsMap, EngineDefinitionControllersPropsOption, EngineStaticState, OptionsTuple } from './common.js';
|
|
5
4
|
import type { FromBuildResult } from './from-build-result.js';
|
|
6
|
-
import type { OptionsTuple } from './utilities.js';
|
|
7
5
|
type FetchStaticStateOptions = {};
|
|
8
6
|
export type FetchStaticState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap, TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap> = {
|
|
9
7
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { CoreEngine, CoreEngineNext } from '
|
|
2
|
-
import type { ControllersMap } from './
|
|
3
|
-
import type { EngineDefinitionBuildResult } from './engine.js';
|
|
1
|
+
import type { CoreEngine, CoreEngineNext } from '../../engine.js';
|
|
2
|
+
import type { ControllersMap, EngineDefinitionBuildResult } from './common.js';
|
|
4
3
|
export interface FromBuildResultOptions<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> {
|
|
5
4
|
buildResult: EngineDefinitionBuildResult<TEngine, TControllers>;
|
|
6
5
|
allowedRecommendationKeys?: (keyof TControllers)[];
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import type { UnknownAction } from '@reduxjs/toolkit';
|
|
2
|
-
import type { CoreEngine, CoreEngineNext } from '
|
|
3
|
-
import type { ControllersMap, ControllersPropsMap } from './
|
|
4
|
-
import type { EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './engine.js';
|
|
2
|
+
import type { CoreEngine, CoreEngineNext } from '../../engine.js';
|
|
3
|
+
import type { ControllersMap, ControllersPropsMap, EngineDefinitionControllersPropsOption, HydratedState, OptionsTuple } from './common.js';
|
|
5
4
|
import type { FromBuildResult } from './from-build-result.js';
|
|
6
|
-
import type { OptionsTuple } from './utilities.js';
|
|
7
5
|
interface HydrateStaticStateOptions<TSearchAction> {
|
|
8
6
|
searchAction: TSearchAction;
|
|
9
7
|
}
|
|
10
|
-
export interface HydratedState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> extends EngineDefinitionBuildResult<TEngine, TControllers> {
|
|
11
|
-
}
|
|
12
8
|
export type HydrateStaticState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap, TSearchAction extends UnknownAction, TControllersProps extends ControllersPropsMap> = {
|
|
13
9
|
/**
|
|
14
10
|
* Creates a new engine from the snapshot of the engine created in SSR with fetchStaticState.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SearchEngine } from '../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type BreadcrumbManager } from './headless-breadcrumb-manager.js';
|
|
4
|
+
export * from './headless-breadcrumb-manager.js';
|
|
5
|
+
export interface BreadcrumbManagerDefinition extends ControllerDefinitionWithoutProps<SearchEngine, BreadcrumbManager> {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Defines a `BreadcrumbManager` controller instance.
|
|
9
|
+
* @group Definers
|
|
10
|
+
*
|
|
11
|
+
* @returns The `BreadcrumbManager` controller definition.
|
|
12
|
+
* */
|
|
13
|
+
export declare function defineBreadcrumbManager(): BreadcrumbManagerDefinition;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
export type {
|
|
1
|
+
import type { UniversalControllerDefinitionWithProps } from '../../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { type Cart, type CartInitialState } from './headless-cart.js';
|
|
3
|
+
export type { CartItem, CartProps, CartState } from './headless-cart.js';
|
|
4
|
+
export type { Cart, CartInitialState };
|
|
4
5
|
export interface CartBuildProps {
|
|
5
6
|
initialState: CartInitialState;
|
|
6
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
export type { Context, ContextProps, ContextState
|
|
1
|
+
import type { UniversalControllerDefinitionWithProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { type Context, type ContextOptions, type UserLocation, type View } from './headless-context.js';
|
|
3
|
+
export type { Context, ContextProps, ContextState } from './headless-context.js';
|
|
4
|
+
export type { View, UserLocation, ContextOptions };
|
|
4
5
|
export interface ContextDefinition extends UniversalControllerDefinitionWithProps<Context, ContextOptions> {
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
1
|
+
import { type ControllerDefinitionOption, type SubControllerDefinitionWithoutProps } from '../../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { BreadcrumbManager, BreadcrumbManagerState } from './headless-core-breadcrumb-manager.js';
|
|
3
3
|
export type { BreadcrumbManager, BreadcrumbManagerState };
|
|
4
4
|
/**
|
|
5
5
|
* Defines a `BreadcrumbManager` controller instance.
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import type { BaseFacetSearchResult } from '
|
|
2
|
-
import type { CategoryFacetSearchResult } from '
|
|
3
|
-
import type { CommerceEngine } from '
|
|
4
|
-
import type
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import {
|
|
13
|
-
import type { ControllerDefinitionOption, SubControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
|
|
1
|
+
import type { BaseFacetSearchResult } from '../../../../../api/search/facet-search/base/base-facet-search-response.js';
|
|
2
|
+
import type { CategoryFacetSearchResult } from '../../../../../api/search/facet-search/category-facet-search/category-facet-search-response.js';
|
|
3
|
+
import type { CommerceEngine } from '../../../../../app/commerce-engine/commerce-engine.js';
|
|
4
|
+
import { type ControllerDefinitionOption, SolutionType, type SubControllerDefinitionWithoutProps } from '../../../../../app/commerce-ssr-engine/types/common.js';
|
|
5
|
+
import type { LocationFacetValue, RegularFacetValue } from '../../../../../features/commerce/facets/facet-set/interfaces/response.js';
|
|
6
|
+
import type { CategoryFacet, CategoryFacetState } from '../category/headless-commerce-category-facet.js';
|
|
7
|
+
import type { DateFacet, DateFacetState, DateFacetValue } from '../date/headless-commerce-date-facet.js';
|
|
8
|
+
import type { CategoryFacetValue, CoreCommerceFacet, FacetType } from '../headless-core-commerce-facet.js';
|
|
9
|
+
import type { LocationFacet, LocationFacetState } from '../location/headless-commerce-location-facet.js';
|
|
10
|
+
import type { NumericFacet, NumericFacetState, NumericFacetValue } from '../numeric/headless-commerce-numeric-facet.js';
|
|
11
|
+
import type { RegularFacet, RegularFacetState } from '../regular/headless-commerce-regular-facet.js';
|
|
12
|
+
import type { FacetGenerator as CSRFacetGenerator, MappedGeneratedFacetController } from './headless-commerce-facet-generator.js';
|
|
14
13
|
export type { BaseFacetSearchResult, CategoryFacet, CategoryFacetState, CategoryFacetValue, CategoryFacetSearchResult, CoreCommerceFacet, DateFacet, DateFacetValue, DateFacetState, NumericFacet, NumericFacetValue, NumericFacetState, RegularFacet, RegularFacetState, RegularFacetValue, LocationFacet, LocationFacetState, LocationFacetValue, MappedGeneratedFacetController, };
|
|
15
14
|
export type FacetGeneratorState = MappedFacetStates;
|
|
16
15
|
export type MappedFacetStates = Array<MappedFacetState[FacetType]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { type ControllerDefinitionOption, type SubControllerDefinitionWithoutProps } from '../../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { CorePaginationOptions, Pagination, PaginationOptions, PaginationProps, PaginationState } from './headless-core-commerce-pagination.js';
|
|
3
3
|
export type { Pagination, PaginationProps, PaginationState, PaginationOptions, CorePaginationOptions, };
|
|
4
4
|
/**
|
|
5
5
|
* Defines a `Pagination` controller instance.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ControllerDefinitionOption, type SubControllerDefinitionWithProps } from '../../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import type { Parameters } from '../../../../features/commerce/parameters/parameters-actions.js';
|
|
3
3
|
import type { ProductListingParameters } from '../../../../features/commerce/product-listing-parameters/product-listing-parameters-actions.js';
|
|
4
4
|
import type { CommerceSearchParameters } from '../../../../features/commerce/search-parameters/search-parameters-actions.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { ParameterManager, ParameterManagerProps, ParameterManagerState } from './headless-core-parameter-manager.js';
|
|
6
6
|
export type { ParameterManager, ParameterManagerProps, ParameterManagerState, Parameters, ProductListingParameters, CommerceSearchParameters, };
|
|
7
7
|
/**
|
|
8
8
|
* Defines a `ParameterManager` controller instance.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { type ControllerDefinitionOption, type SubControllerDefinitionWithoutProps } from '../../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { Sort, SortProps, SortState } from './headless-core-commerce-sort.js';
|
|
3
3
|
export type { Sort, SortProps, SortState };
|
|
4
4
|
/**
|
|
5
5
|
* Defines a `Sort` controller instance.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ControllerDefinitionOption, type SubControllerDefinitionWithoutProps } from '../../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { ProductListingSummaryState } from '../../product-listing/summary/headless-product-listing-summary.js';
|
|
3
|
+
import type { RecommendationsSummaryState } from '../../recommendations/summary/headless-recommendations-summary.js';
|
|
4
|
+
import type { SearchSummaryState } from '../../search/summary/headless-search-summary.js';
|
|
5
|
+
import type { Summary, SummaryState } from './headless-core-summary.js';
|
|
6
|
+
export type { Summary, ProductListingSummaryState, RecommendationsSummaryState, SearchSummaryState, SummaryState, };
|
|
7
|
+
/**
|
|
8
|
+
* Defines a `Summary` controller instance.
|
|
9
|
+
* @group Definers
|
|
10
|
+
*
|
|
11
|
+
* @returns The `Summary` controller definition.
|
|
12
|
+
*/
|
|
13
|
+
export declare function defineSummary<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<Summary<ProductListingSummaryState | SearchSummaryState | RecommendationsSummaryState>, TOptions>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { NonRecommendationControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { type FilterSuggestionsGenerator } from './headless-filter-suggestions-generator.js';
|
|
3
|
+
export type { FieldSuggestionsFacet } from '../../../features/commerce/facets/field-suggestions-order/field-suggestions-order-state.js';
|
|
4
|
+
export type { CategoryFilterSuggestions, CategoryFilterSuggestionsState, } from './headless-category-filter-suggestions.js';
|
|
5
|
+
export type { FilterSuggestions, FilterSuggestionsState, } from './headless-filter-suggestions.js';
|
|
6
|
+
export type { GeneratedFilterSuggestionsControllers } from './headless-filter-suggestions-generator.js';
|
|
7
|
+
export type { FilterSuggestionsGenerator };
|
|
8
|
+
export interface FilterSuggestionsGeneratorDefinition extends NonRecommendationControllerDefinitionWithoutProps<FilterSuggestionsGenerator> {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Defines the `FilterSuggestionsGenerator` controller for the purpose of server-side rendering.
|
|
12
|
+
* @group Definers
|
|
13
|
+
*
|
|
14
|
+
* @returns The `FilterSuggestionsGenerator` controller definition.
|
|
15
|
+
*/
|
|
16
|
+
export declare function defineFilterSuggestionsGenerator(): FilterSuggestionsGeneratorDefinition;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
export type { InstantProductsOptions, InstantProductsState,
|
|
1
|
+
import type { NonRecommendationControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { type InstantProducts, type InstantProductsProps } from './headless-instant-products.js';
|
|
3
|
+
export type { InstantProductsOptions, InstantProductsState, } from './headless-instant-products.js';
|
|
4
|
+
export type { InstantProducts, InstantProductsProps };
|
|
4
5
|
export interface InstantProductsDefinition extends NonRecommendationControllerDefinitionWithoutProps<InstantProducts> {
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ControllerDefinitionOption, type SubControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { type ProductListing } from '../product-listing/headless-product-listing.js';
|
|
3
|
+
import { type Search } from '../search/headless-search.js';
|
|
4
|
+
export type { ProductListing, ProductListingState as ProductListState, } from '../product-listing/headless-product-listing.js';
|
|
5
|
+
export type { Search } from '../search/headless-search.js';
|
|
6
|
+
export type ProductList = Pick<ProductListing | Search, 'state' | 'subscribe' | 'interactiveProduct' | 'promoteChildToParent'>;
|
|
7
|
+
/**
|
|
8
|
+
* Defines a `ProductList` controller instance.
|
|
9
|
+
* @group Definers
|
|
10
|
+
*
|
|
11
|
+
* @returns The `ProductList` controller definition.
|
|
12
|
+
*/
|
|
13
|
+
export declare function defineProductList<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<ProductList, TOptions>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type Controller } from '
|
|
3
|
-
import type
|
|
1
|
+
import type { NonRecommendationControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { type Controller } from '../../controller/headless-controller.js';
|
|
3
|
+
import { type ProductView as BaseProductView } from './headless-product-view.js';
|
|
4
4
|
interface ProductViewDefinition extends NonRecommendationControllerDefinitionWithoutProps<ProductView> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
export type { RecentQueriesListInitialState, RecentQueriesListOptions, RecentQueriesState,
|
|
1
|
+
import type { NonRecommendationControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { type RecentQueriesList, type RecentQueriesListProps } from './headless-recent-queries-list.js';
|
|
3
|
+
export type { RecentQueriesListInitialState, RecentQueriesListOptions, RecentQueriesState, } from './headless-recent-queries-list.js';
|
|
4
|
+
export type { RecentQueriesList, RecentQueriesListProps };
|
|
4
5
|
export interface RecentQueriesListDefinition extends NonRecommendationControllerDefinitionWithoutProps<RecentQueriesList> {
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
1
|
+
import { type RecommendationOnlyControllerDefinitionWithProps, recommendationInternalOptionKey } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { RecommendationsOptions, RecommendationsState } from '../recommendations/headless-recommendations.js';
|
|
3
|
+
import { type Recommendations, type RecommendationsProps } from './headless-recommendations.js';
|
|
4
4
|
export type { Recommendations, RecommendationsState };
|
|
5
5
|
export type RecommendationsDefinitionMeta = {
|
|
6
6
|
[recommendationInternalOptionKey]: {} & RecommendationsProps['options'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { SearchOnlyControllerDefinitionWithoutProps } from '../../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { DidYouMean, DidYouMeanState } from './headless-did-you-mean.js';
|
|
3
3
|
export type { DidYouMean, DidYouMeanState };
|
|
4
4
|
/**
|
|
5
5
|
* Defines a `DidYouMean` controller instance.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
export type { CoreSearchBox, SearchBox, SearchBoxProps, SearchBoxState,
|
|
1
|
+
import type { SearchOnlyControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import { type SearchBox, type SearchBoxOptions, type SearchBoxProps, type Suggestion } from './headless-search-box.js';
|
|
3
|
+
export type { CoreSearchBox, SearchBox, SearchBoxProps, SearchBoxState, } from './headless-search-box.js';
|
|
4
|
+
export type { SearchBoxOptions, Suggestion };
|
|
4
5
|
export interface SearchBoxDefinition extends SearchOnlyControllerDefinitionWithoutProps<SearchBox> {
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { StandaloneSearchBoxProps } from '
|
|
3
|
-
import type
|
|
4
|
-
export type { StandaloneSearchBoxState
|
|
1
|
+
import type { ListingAndStandaloneControllerWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { StandaloneSearchBoxProps } from '../../standalone-search-box/headless-standalone-search-box.js';
|
|
3
|
+
import { type StandaloneSearchBox } from './headless-standalone-search-box.js';
|
|
4
|
+
export type { StandaloneSearchBoxState } from './headless-standalone-search-box.js';
|
|
5
|
+
export type { StandaloneSearchBox, StandaloneSearchBoxProps };
|
|
5
6
|
export interface StandaloneSearchBoxDefinition extends ListingAndStandaloneControllerWithoutProps<StandaloneSearchBox> {
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export type {
|
|
1
|
+
import type { SearchAndListingControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { NotifyTrigger } from '../../core/triggers/headless-core-notify-trigger.js';
|
|
3
|
+
export type { NotifyTriggerState } from '../../core/triggers/headless-core-notify-trigger.js';
|
|
4
|
+
export type { NotifyTrigger };
|
|
4
5
|
export interface NotifyTriggerDefinition extends SearchAndListingControllerDefinitionWithoutProps<NotifyTrigger> {
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export type { QueryTriggerState } from '
|
|
1
|
+
import type { SearchOnlyControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { QueryTrigger } from '../../core/triggers/headless-core-query-trigger.js';
|
|
3
|
+
export type { QueryTriggerState } from '../../core/triggers/headless-core-query-trigger.js';
|
|
4
4
|
export type { QueryTrigger };
|
|
5
5
|
export interface QueryTriggerDefinition extends SearchOnlyControllerDefinitionWithoutProps<QueryTrigger> {
|
|
6
6
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export type {
|
|
1
|
+
import type { SearchOnlyControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
|
+
import type { RedirectionTrigger } from '../../core/triggers/headless-core-redirection-trigger.js';
|
|
3
|
+
export type { RedirectionTriggerState } from '../../core/triggers/headless-core-redirection-trigger.js';
|
|
4
|
+
export type { RedirectionTrigger };
|
|
4
5
|
export interface RedirectionTriggerDefinition extends SearchOnlyControllerDefinitionWithoutProps<RedirectionTrigger> {
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SearchEngine } from '../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithProps } from '../../app/ssr-engine/types/common.js';
|
|
3
|
+
import type { ContextProps } from '../core/context/headless-core-context.js';
|
|
4
|
+
import { type Context } from './headless-context.js';
|
|
5
|
+
export * from './headless-context.js';
|
|
6
|
+
export interface ContextDefinition extends ControllerDefinitionWithProps<SearchEngine, Context, ContextProps> {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Defines a `Context` controller instance.
|
|
10
|
+
* @group Definers
|
|
11
|
+
*
|
|
12
|
+
* @returns The `Context` controller definition.
|
|
13
|
+
* */
|
|
14
|
+
export declare function defineContext(): ContextDefinition;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CoreEngine } from '../../app/engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type DictionaryFieldContext } from './headless-dictionary-field-context.js';
|
|
4
|
+
export * from './headless-dictionary-field-context.js';
|
|
5
|
+
export interface DictionaryFieldContextDefinition extends ControllerDefinitionWithoutProps<CoreEngine, DictionaryFieldContext> {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Defines a `DictionaryFieldContext` controller instance.
|
|
9
|
+
* @group Definers
|
|
10
|
+
*
|
|
11
|
+
* @returns The `DictionaryFieldContext` controller definition.
|
|
12
|
+
* */
|
|
13
|
+
export declare function defineDictionaryFieldContext(): DictionaryFieldContextDefinition;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SearchEngine } from '../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type DidYouMean } from './headless-did-you-mean.js';
|
|
4
|
+
export * from './headless-did-you-mean.js';
|
|
5
|
+
export interface DidYouMeanDefinition extends ControllerDefinitionWithoutProps<SearchEngine, DidYouMean> {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Defines a `DidYouMean` controller instance.
|
|
9
|
+
* @group Definers
|
|
10
|
+
*
|
|
11
|
+
* @returns The `DidYouMean` controller definition.
|
|
12
|
+
* */
|
|
13
|
+
export declare function defineDidYouMean(): DidYouMeanDefinition;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SearchEngine } from '../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type FacetManager } from './headless-facet-manager.js';
|
|
4
|
+
export * from './headless-facet-manager.js';
|
|
5
|
+
export interface FacetManagerDefinition extends ControllerDefinitionWithoutProps<SearchEngine, FacetManager> {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Defines a `FacetManager` controller instance.
|
|
9
|
+
* @group Definers
|
|
10
|
+
*
|
|
11
|
+
* @returns The `FacetManager` controller definition.
|
|
12
|
+
* */
|
|
13
|
+
export declare function defineFacetManager(): FacetManagerDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SearchEngine } from '
|
|
2
|
-
import
|
|
3
|
-
import type
|
|
4
|
-
export * from '
|
|
1
|
+
import type { SearchEngine } from '../../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type AutomaticFacetGenerator, type AutomaticFacetGeneratorProps } from './headless-automatic-facet-generator.js';
|
|
4
|
+
export * from './headless-automatic-facet-generator.js';
|
|
5
5
|
export interface AutomaticFacetGeneratorDefinition extends ControllerDefinitionWithoutProps<SearchEngine, AutomaticFacetGenerator> {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SearchEngine } from '
|
|
2
|
-
import
|
|
3
|
-
import type
|
|
4
|
-
export * from '
|
|
1
|
+
import type { SearchEngine } from '../../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type CategoryFacet, type CategoryFacetProps } from './headless-category-facet.js';
|
|
4
|
+
export * from './headless-category-facet.js';
|
|
5
5
|
export interface CategoryFacetDefinition extends ControllerDefinitionWithoutProps<SearchEngine, CategoryFacet> {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SearchEngine } from '
|
|
2
|
-
import
|
|
3
|
-
import type
|
|
4
|
-
export * from '
|
|
1
|
+
import type { SearchEngine } from '../../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type Facet, type FacetProps } from './headless-facet.js';
|
|
4
|
+
export * from './headless-facet.js';
|
|
5
5
|
export interface FacetDefinition extends ControllerDefinitionWithoutProps<SearchEngine, Facet> {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SearchEngine } from '../../../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type DateFacet, type DateFacetProps } from './headless-date-facet.js';
|
|
4
|
+
export * from './headless-date-facet.js';
|
|
5
|
+
export { buildDateRange } from './headless-date-facet.js';
|
|
6
|
+
export interface DateFacetDefinition extends ControllerDefinitionWithoutProps<SearchEngine, DateFacet> {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Defines a `DateFacet` controller instance.
|
|
10
|
+
* @group Definers
|
|
11
|
+
*
|
|
12
|
+
* @param props - The configurable `DateFacet` properties.
|
|
13
|
+
* @returns The `DateFacet` controller definition.
|
|
14
|
+
* */
|
|
15
|
+
export declare function defineDateFacet(props: DateFacetProps): DateFacetDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SearchEngine } from '
|
|
2
|
-
import
|
|
3
|
-
import type
|
|
4
|
-
export * from '
|
|
1
|
+
import type { SearchEngine } from '../../../../app/search-engine/search-engine.js';
|
|
2
|
+
import type { ControllerDefinitionWithoutProps } from '../../../../app/ssr-engine/types/common.js';
|
|
3
|
+
import { type DateFilter, type DateFilterProps } from './headless-date-filter.js';
|
|
4
|
+
export * from './headless-date-filter.js';
|
|
5
5
|
export interface DateFilterDefinition extends ControllerDefinitionWithoutProps<SearchEngine, DateFilter> {
|
|
6
6
|
}
|
|
7
7
|
/**
|