@coveo/quantic 3.28.1 → 3.28.2-pre.04d5730f85
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 +10 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/search-analytics.d.ts +5 -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 +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/tests/stream-answer-api-state-mock.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/platform-client.d.ts +2 -2
- 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/features/commerce/product-listing/product-listing-selectors.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-selectors.d.ts +2 -2
- 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/error/error-actions.d.ts +16 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-selectors.d.ts +1 -2
- 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/controller-utils.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +10 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/cart/headless-cart.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/context/headless-context.ssr.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +10 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/generator/headless-commerce-facet-generator.ssr.d.ts +66 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/instant-products/headless-instant-products.ssr.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/pagination/headless-core-commerce-pagination.ssr.d.ts +11 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/parameter-manager/headless-core-parameter-manager.ssr.d.ts +25 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/product-list/headless-product-list.ssr.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/product-view/headless-product-view.ssr.d.ts +20 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/recent-queries-list/headless-recent-queries-list.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/recommendations/headless-recommendations.ssr.d.ts +17 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/search-box/headless-search-box.ssr.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/sort/headless-core-commerce-sort.ssr.d.ts +11 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/standalone-search-box/headless-standalone-search-box.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/summary/headless-core-summary.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/triggers/headless-notify-trigger.ssr.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/triggers/headless-query-trigger.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/triggers/headless-redirection-trigger.ssr.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/engine/commerce-engine.ssr.d.ts +25 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/build-factory.d.ts +22 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/hydrated-state-factory.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/recommendation-hydrated-state-factory.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/recommendation-static-state-factory.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/static-state-factory.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/build.d.ts +10 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-constants.d.ts +7 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-definitions.d.ts +220 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-inference.d.ts +24 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-scopes.d.ts +71 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/engine.d.ts +75 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/fetch-static-state.d.ts +17 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/from-build-result.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/hydrate-static-state.d.ts +20 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/kind.d.ts +9 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/utils/recommendation-filter.d.ts +11 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/augment-preprocess-request.d.ts +9 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/controller-utils.d.ts +16 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/errors.d.ts +9 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/build.d.ts +9 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/controllers.d.ts +37 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/engine.d.ts +60 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/fetch-static-state.d.ts +17 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/from-build-result.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/hydrate-static-state.d.ts +21 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/inference.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/utilities.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/breadcrumb-manager/headless-breadcrumb-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/context/headless-context.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/dictionary-field-context/headless-dictionary-field-context.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facet-manager/headless-facet-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/automatic-facet-generator/headless-automatic-facet-generator.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/category-facet/headless-category-facet.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/facet/headless-facet.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/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/facets/range-facet/date-facet/headless-date-filter.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/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/facets/range-facet/numeric-facet/headless-numeric-filter.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/field-suggestions/category-facet/headless-category-field-suggestions.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/field-suggestions/facet/headless-field-suggestions.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/folded-result-list/headless-folded-result-list.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/history-manager/headless-history-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/instant-results/instant-results.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/pager/headless-pager.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/query-error/headless-query-error.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/query-summary/headless-query-summary.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/quickview/headless-quickview.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/recent-queries-list/headless-recent-queries-list.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/recent-results-list/headless-recent-results-list.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/relevance-inspector/headless-relevance-inspector.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/result-list/headless-result-list.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/results-per-page/headless-results-per-page.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/search-box/headless-search-box.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/search-parameter-manager/headless-search-parameter-manager.ssr.d.ts +16 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/search-status/headless-search-status.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/smart-snippet/headless-smart-snippet.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/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/sort/headless-sort.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/standalone-search-box/headless-standalone-search-box.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/static-filter/headless-static-filter.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/tab/headless-tab.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/tab-manager/headless-tab-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-execute-trigger.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-notify-trigger.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-query-trigger.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-redirection-trigger.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/url-manager/headless-url-manager.ssr.d.ts +16 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/engine/search-engine.ssr.d.ts +35 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce-next.index.d.ts +170 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +48 -47
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine/common.d.ts → ssr-next/commerce/controller-utils.d.ts} +5 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core → ssr-next/commerce/controllers}/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/context → ssr-next/commerce/controllers}/cart/headless-cart.ssr.d.ts +3 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/context/headless-context.ssr.d.ts +3 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/search → ssr-next/commerce/controllers}/did-you-mean/headless-did-you-mean.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core/facets → ssr-next/commerce/controllers}/generator/headless-commerce-facet-generator.ssr.d.ts +13 -12
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/instant-products/headless-instant-products.ssr.d.ts +3 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core → ssr-next/commerce/controllers}/pagination/headless-core-commerce-pagination.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core → ssr-next/commerce/controllers}/parameter-manager/headless-core-parameter-manager.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/product-list/headless-product-list.ssr.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/product-view/headless-product-view.ssr.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/recent-queries-list/headless-recent-queries-list.ssr.d.ts +3 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/recommendations/headless-recommendations.ssr.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/search-box/headless-search-box.ssr.d.ts +3 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core → ssr-next/commerce/controllers}/sort/headless-core-commerce-sort.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/standalone-search-box/headless-standalone-search-box.ssr.d.ts +4 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/summary/headless-core-summary.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/triggers/headless-notify-trigger.ssr.d.ts +3 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/triggers/headless-query-trigger.ssr.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/triggers/headless-redirection-trigger.ssr.d.ts +3 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-engine → ssr-next/commerce/engine}/commerce-engine.ssr.d.ts +6 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/build-factory.d.ts +5 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/hydrated-state-factory.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/recommendation-hydrated-state-factory.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/recommendation-static-state-factory.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/static-state-factory.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/build.d.ts +4 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-constants.d.ts +7 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine/types/common.d.ts → ssr-next/commerce/types/controller-definitions.d.ts} +10 -97
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-inference.d.ts +24 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-scopes.d.ts +71 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine/types/core-engine.d.ts → ssr-next/commerce/types/engine.d.ts} +12 -14
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/fetch-static-state.d.ts +4 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/from-build-result.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/hydrate-static-state.d.ts +4 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine/factories → ssr-next/commerce}/utils/recommendation-filter.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/augment-preprocess-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine/common.d.ts → ssr-next/common/controller-utils.d.ts} +4 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/errors.d.ts +9 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/types/build.d.ts +4 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/controllers.d.ts +37 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine/types/core-engine.d.ts → ssr-next/common/types/engine.d.ts} +18 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/types/fetch-static-state.d.ts +4 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/types/from-build-result.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/types/hydrate-static-state.d.ts +6 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/inference.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/utilities.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/breadcrumb-manager/headless-breadcrumb-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/context/headless-context.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/dictionary-field-context/headless-dictionary-field-context.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facet-manager/headless-facet-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/automatic-facet-generator/headless-automatic-facet-generator.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/category-facet/headless-category-facet.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/facet/headless-facet.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/range-facet/date-facet/headless-date-filter.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/range-facet/numeric-facet/headless-numeric-filter.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/field-suggestions/category-facet/headless-category-field-suggestions.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/field-suggestions/facet/headless-field-suggestions.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/folded-result-list/headless-folded-result-list.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/history-manager/headless-history-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/instant-results/instant-results.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/pager/headless-pager.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/query-error/headless-query-error.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/query-summary/headless-query-summary.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/quickview/headless-quickview.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/recent-queries-list/headless-recent-queries-list.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/recent-results-list/headless-recent-results-list.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/relevance-inspector/headless-relevance-inspector.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/result-list/headless-result-list.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/results-per-page/headless-results-per-page.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/search-box/headless-search-box.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/search-parameter-manager/headless-search-parameter-manager.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/search-status/headless-search-status.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/smart-snippet/headless-smart-snippet.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/sort/headless-sort.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/standalone-search-box/headless-standalone-search-box.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/static-filter/headless-static-filter.ssr.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/tab/headless-tab.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/tab-manager/headless-tab-manager.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/triggers/headless-execute-trigger.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/triggers/headless-notify-trigger.ssr.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/triggers/headless-query-trigger.ssr.d.ts +14 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/triggers/headless-redirection-trigger.ssr.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/url-manager/headless-url-manager.ssr.d.ts +16 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/{app/search-engine → ssr-next/search/engine}/search-engine.ssr.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next.index.d.ts +219 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr.index.d.ts +88 -87
- 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 +1 -10
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/facet-utils.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +12 -10
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +11 -9
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +9 -7
- package/package.json +16 -17
- package/docs/out/quantic-docs.json +0 -6431
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/common.d.ts +0 -80
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/breadcrumb-manager/headless-breadcrumb-manager.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/summary/headless-core-summary.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +0 -16
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-list/headless-product-list.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/context/headless-context.ssr.d.ts +0 -14
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/dictionary-field-context/headless-dictionary-field-context.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facet-manager/headless-facet-manager.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/history-manager/headless-history-manager.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-error/headless-query-error.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-summary/headless-query-summary.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/search-status/headless-search-status.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/static-filter/headless-static-filter.ssr.d.ts +0 -15
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/tab-manager/headless-tab-manager.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-execute-trigger.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-notify-trigger.ssr.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-query-trigger.ssr.d.ts +0 -14
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/url-manager/headless-url-manager.ssr.d.ts +0 -16
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-context/case-context-slice.spec.d.ts +0 -1
- /package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/kind.d.ts +0 -0
|
@@ -90,13 +90,15 @@ export declare class SearchAnalyticsProvider extends BaseAnalyticsProvider<State
|
|
|
90
90
|
protected get responseTime(): number;
|
|
91
91
|
protected get numberOfResults(): number;
|
|
92
92
|
}
|
|
93
|
-
interface LegacyConfigureAnalyticsOptions {
|
|
93
|
+
interface LegacyConfigureAnalyticsOptions<State extends ConfigurationSection = StateNeededBySearchAnalyticsProvider> {
|
|
94
94
|
logger: Logger;
|
|
95
95
|
analyticsClientMiddleware?: AnalyticsClientSendEventHook;
|
|
96
96
|
preprocessRequest?: PreprocessRequest;
|
|
97
97
|
provider?: SearchPageClientProvider;
|
|
98
|
-
getState():
|
|
98
|
+
getState(): State;
|
|
99
99
|
}
|
|
100
|
-
export declare const configureLegacyAnalytics: ({ logger, getState, analyticsClientMiddleware, preprocessRequest, provider, }: LegacyConfigureAnalyticsOptions
|
|
100
|
+
export declare const configureLegacyAnalytics: <State extends ConfigurationSection = StateNeededBySearchAnalyticsProvider>({ logger, getState, analyticsClientMiddleware, preprocessRequest, provider, }: LegacyConfigureAnalyticsOptions<State> & {
|
|
101
|
+
provider: SearchPageClientProvider;
|
|
102
|
+
}) => CoveoSearchPageClient;
|
|
101
103
|
export declare const getPageID: () => string;
|
|
102
104
|
export {};
|
package/force-app/main/default/staticresources/coveoheadless/definitions/api/api-client-utils.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { BaseParam } from './platform-service-params.js';
|
|
|
3
3
|
import type { AllSearchAPIResponse } from './search/search-api-client.js';
|
|
4
4
|
import type { SearchAPIErrorWithStatusCode } from './search/search-api-error-response.js';
|
|
5
5
|
import type { AuthenticationParam } from './search/search-api-params.js';
|
|
6
|
-
export declare function pickNonBaseParams<Params extends BaseParam & AuthenticationParam>(req: Params): Omit<Params, "
|
|
6
|
+
export declare function pickNonBaseParams<Params extends BaseParam & AuthenticationParam>(req: Params): Omit<Params, "accessToken" | "url" | "organizationId" | "authentication">;
|
|
7
7
|
export declare const unwrapError: (payload: PlatformResponse<AllSearchAPIResponse>) => SearchAPIErrorWithStatusCode;
|
|
@@ -28,10 +28,10 @@ export declare const getRequestOptions: (req: FilterableCommerceAPIRequest, path
|
|
|
28
28
|
facets: import("../../../features/commerce/facets/facet-set/interfaces/request.js").AnyFacetRequest[] | undefined;
|
|
29
29
|
sort: import("./sort.js").SortOption | undefined;
|
|
30
30
|
};
|
|
31
|
-
url: string;
|
|
32
31
|
accessToken: string;
|
|
33
32
|
method: import("../../platform-client.js").HttpMethods;
|
|
34
33
|
contentType: import("../../platform-client.js").HTTPContentType;
|
|
34
|
+
url: string;
|
|
35
35
|
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
36
36
|
requestMetadata?: import("../../preprocess-request.js").RequestMetadata | undefined;
|
|
37
37
|
};
|
|
@@ -24,10 +24,10 @@ export declare const buildRecommendationsRequest: (req: CommerceRecommendationsR
|
|
|
24
24
|
page: number | undefined;
|
|
25
25
|
perPage: number | undefined;
|
|
26
26
|
};
|
|
27
|
-
url: string;
|
|
28
27
|
accessToken: string;
|
|
29
28
|
method: import("../../platform-client.js").HttpMethods;
|
|
30
29
|
contentType: import("../../platform-client.js").HTTPContentType;
|
|
30
|
+
url: string;
|
|
31
31
|
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
32
32
|
requestMetadata?: import("../../preprocess-request.js").RequestMetadata | undefined;
|
|
33
33
|
};
|
|
@@ -21,10 +21,10 @@ export declare const getQuerySuggestRequestOptions: (req: QuerySuggestRequest) =
|
|
|
21
21
|
country: string;
|
|
22
22
|
currency: string;
|
|
23
23
|
};
|
|
24
|
-
url: string;
|
|
25
24
|
accessToken: string;
|
|
26
25
|
method: import("../../../platform-client.js").HttpMethods;
|
|
27
26
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
27
|
+
url: string;
|
|
28
28
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
29
29
|
requestMetadata?: import("../../../preprocess-request.js").RequestMetadata | undefined;
|
|
30
30
|
};
|
|
@@ -100,7 +100,7 @@ export declare const constructAnswerQueryParams: (state: StateNeededByAnswerAPI,
|
|
|
100
100
|
} | undefined;
|
|
101
101
|
enableDidYouMean?: boolean | undefined;
|
|
102
102
|
fieldsToInclude?: string[] | undefined;
|
|
103
|
-
facets?: (import("../../features/facets/facet-set/interfaces/request.js").FacetRequest | import("../../features/facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../../features/facets/range-facets/
|
|
103
|
+
facets?: (import("../../features/facets/facet-set/interfaces/request.js").FacetRequest | import("../../features/facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../../features/facets/range-facets/numeric-facet-set/interfaces/request.js").NumericFacetRequest | import("../../features/facets/range-facets/date-facet-set/interfaces/request.js").DateFacetRequest)[] | undefined;
|
|
104
104
|
pipeline?: string | undefined;
|
|
105
105
|
searchHub?: string | undefined;
|
|
106
106
|
pipelineRuleParameters: {
|
|
@@ -110,6 +110,7 @@ export declare const constructAnswerQueryParams: (state: StateNeededByAnswerAPI,
|
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
context?: import("../../ssr.index.js").ContextPayload | undefined;
|
|
113
|
+
enableQuerySyntax?: boolean | undefined;
|
|
113
114
|
lq?: string | undefined;
|
|
114
115
|
dq?: string | undefined;
|
|
115
116
|
cq?: string | undefined;
|
|
@@ -136,8 +137,8 @@ export declare const selectAnswer: (state: StateNeededByAnswerAPI, navigatorCont
|
|
|
136
137
|
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
137
138
|
error: undefined;
|
|
138
139
|
requestId: string;
|
|
139
|
-
endpointName: string;
|
|
140
140
|
originalArgs: Partial<SearchRequest>;
|
|
141
|
+
endpointName: string;
|
|
141
142
|
startedTimeStamp: number;
|
|
142
143
|
data: GeneratedAnswerStream;
|
|
143
144
|
fulfilledTimeStamp: number;
|
|
@@ -166,9 +167,9 @@ export declare const selectAnswer: (state: StateNeededByAnswerAPI, navigatorCont
|
|
|
166
167
|
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
167
168
|
requestId: string;
|
|
168
169
|
data?: GeneratedAnswerStream | undefined;
|
|
169
|
-
endpointName: string;
|
|
170
170
|
fulfilledTimeStamp?: number | undefined;
|
|
171
171
|
originalArgs: Partial<SearchRequest>;
|
|
172
|
+
endpointName: string;
|
|
172
173
|
startedTimeStamp: number;
|
|
173
174
|
error: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/query").FetchBaseQueryError;
|
|
174
175
|
} & {
|
|
@@ -73,6 +73,7 @@ export declare const expectedStreamAnswerAPIParam: {
|
|
|
73
73
|
cq: string;
|
|
74
74
|
dq: string;
|
|
75
75
|
lq: string;
|
|
76
|
+
enableQuerySyntax: boolean;
|
|
76
77
|
context: {
|
|
77
78
|
testKey: string;
|
|
78
79
|
};
|
|
@@ -197,6 +198,7 @@ export declare const expectedStreamAnswerAPIParamWithATabWithAnExpression: {
|
|
|
197
198
|
aq: string;
|
|
198
199
|
dq: string;
|
|
199
200
|
lq: string;
|
|
201
|
+
enableQuerySyntax: boolean;
|
|
200
202
|
context: {
|
|
201
203
|
testKey: string;
|
|
202
204
|
};
|
|
@@ -320,6 +322,7 @@ export declare const expectedStreamAnswerAPIParamWithoutAnyTab: {
|
|
|
320
322
|
cq: string;
|
|
321
323
|
dq: string;
|
|
322
324
|
lq: string;
|
|
325
|
+
enableQuerySyntax: boolean;
|
|
323
326
|
context: {
|
|
324
327
|
testKey: string;
|
|
325
328
|
};
|
|
@@ -442,6 +445,7 @@ export declare const expectedStreamAnswerAPIParamWithStaticFiltersSelected: {
|
|
|
442
445
|
aq: string;
|
|
443
446
|
dq: string;
|
|
444
447
|
lq: string;
|
|
448
|
+
enableQuerySyntax: boolean;
|
|
445
449
|
context: {
|
|
446
450
|
testKey: string;
|
|
447
451
|
};
|
|
@@ -565,6 +569,7 @@ export declare const expectedStreamAnswerAPIParamWithStaticFiltersAndTabExpressi
|
|
|
565
569
|
aq: string;
|
|
566
570
|
dq: string;
|
|
567
571
|
lq: string;
|
|
572
|
+
enableQuerySyntax: boolean;
|
|
568
573
|
context: {
|
|
569
574
|
testKey: string;
|
|
570
575
|
};
|
|
@@ -688,6 +693,7 @@ export declare const expectedStreamAnswerAPIParamWithStaticFiltersAndTabExpressi
|
|
|
688
693
|
aq: string;
|
|
689
694
|
dq: string;
|
|
690
695
|
lq: string;
|
|
696
|
+
enableQuerySyntax: boolean;
|
|
691
697
|
context: {
|
|
692
698
|
testKey: string;
|
|
693
699
|
};
|
|
@@ -821,6 +827,7 @@ export declare const expectedStreamAnswerAPIParamWithoutSearchAction: {
|
|
|
821
827
|
cq: string;
|
|
822
828
|
dq: string;
|
|
823
829
|
lq: string;
|
|
830
|
+
enableQuerySyntax: boolean;
|
|
824
831
|
context: {
|
|
825
832
|
testKey: string;
|
|
826
833
|
};
|
|
@@ -934,6 +941,7 @@ export declare const expectedStreamAnswerAPIParamForSelect: {
|
|
|
934
941
|
cq: string;
|
|
935
942
|
dq: string;
|
|
936
943
|
lq: string;
|
|
944
|
+
enableQuerySyntax: boolean;
|
|
937
945
|
context: {
|
|
938
946
|
testKey: string;
|
|
939
947
|
};
|
package/force-app/main/default/staticresources/coveoheadless/definitions/api/platform-client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Logger } from 'pino';
|
|
2
|
-
import { DisconnectedError,
|
|
2
|
+
import { DisconnectedError, UnauthorizedTokenError } from '../utils/errors.js';
|
|
3
3
|
import type { PlatformEnvironment } from '../utils/url-utils.js';
|
|
4
4
|
import type { PlatformClientOrigin, PreprocessRequest, RequestMetadata } from './preprocess-request.js';
|
|
5
5
|
export type HttpMethods = 'POST' | 'GET' | 'DELETE' | 'PUT';
|
|
@@ -21,7 +21,7 @@ export interface PlatformResponse<T> {
|
|
|
21
21
|
body: T;
|
|
22
22
|
response: Response;
|
|
23
23
|
}
|
|
24
|
-
export type PlatformClientCallError =
|
|
24
|
+
export type PlatformClientCallError = UnauthorizedTokenError | DisconnectedError | Error;
|
|
25
25
|
export declare class PlatformClient {
|
|
26
26
|
static call(options: PlatformClientCallOptions): Promise<Response | PlatformClientCallError>;
|
|
27
27
|
private static preprocessRequest;
|
|
@@ -11,9 +11,9 @@ export declare const buildGetCaseClassificationsRequest: (req: GetCaseClassifica
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
url: string;
|
|
15
14
|
accessToken: string;
|
|
16
15
|
method: import("../../../platform-client.js").HttpMethods;
|
|
17
16
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
17
|
+
url: string;
|
|
18
18
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
19
19
|
};
|
|
@@ -28,9 +28,9 @@ export declare const buildGetDocumentSuggestionsRequest: (req: GetDocumentSugges
|
|
|
28
28
|
source?: string[];
|
|
29
29
|
} | undefined;
|
|
30
30
|
};
|
|
31
|
-
url: string;
|
|
32
31
|
accessToken: string;
|
|
33
32
|
method: import("../../../platform-client.js").HttpMethods;
|
|
34
33
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
34
|
+
url: string;
|
|
35
35
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
36
36
|
};
|
|
@@ -3,9 +3,9 @@ import { type InsightIdParam } from '../insight-params.js';
|
|
|
3
3
|
export type GetInsightInterfaceConfigRequest = BaseParam & InsightIdParam;
|
|
4
4
|
export declare const buildGetInsightInterfaceConfigRequest: (req: GetInsightInterfaceConfigRequest) => {
|
|
5
5
|
requestParams: {};
|
|
6
|
-
url: string;
|
|
7
6
|
accessToken: string;
|
|
8
7
|
method: import("../../../platform-client.js").HttpMethods;
|
|
9
8
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
9
|
+
url: string;
|
|
10
10
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
11
11
|
};
|
|
@@ -8,18 +8,18 @@ interface CaseContextParam {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const buildInsightQueryRequest: (req: InsightQueryRequest) => {
|
|
10
10
|
requestParams: {};
|
|
11
|
-
url: string;
|
|
12
11
|
accessToken: string;
|
|
13
12
|
method: import("../../../platform-client.js").HttpMethods;
|
|
14
13
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
14
|
+
url: string;
|
|
15
15
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
16
16
|
};
|
|
17
17
|
export declare const buildInsightQuerySuggestRequest: (req: InsightQuerySuggestRequest) => {
|
|
18
18
|
requestParams: {};
|
|
19
|
-
url: string;
|
|
20
19
|
accessToken: string;
|
|
21
20
|
method: import("../../../platform-client.js").HttpMethods;
|
|
22
21
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
22
|
+
url: string;
|
|
23
23
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
24
24
|
};
|
|
25
25
|
export {};
|
|
@@ -10,10 +10,10 @@ export declare const buildInsightUserActionsRequest: (req: InsightUserActionsReq
|
|
|
10
10
|
requestParams: {
|
|
11
11
|
objectId: string;
|
|
12
12
|
};
|
|
13
|
-
url: string;
|
|
14
13
|
accessToken: string;
|
|
15
14
|
method: import("../../../platform-client.js").HttpMethods;
|
|
16
15
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
16
|
+
url: string;
|
|
17
17
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
18
18
|
};
|
|
19
19
|
export {};
|
|
@@ -42,7 +42,7 @@ export declare const responseIdSelector: ((state: {
|
|
|
42
42
|
cart: import("../context/cart/cart-state.js").CartState;
|
|
43
43
|
didYouMean: import("../did-you-mean/did-you-mean-state.js").DidYouMeanState;
|
|
44
44
|
triggers: import("../../triggers/triggers-state.js").TriggerState;
|
|
45
|
-
} & Partial<import("../../../ssr-commerce.index.js").CommerceAppState>) => string) & {
|
|
45
|
+
} & Partial<import("../../../ssr-commerce-next.index.js").CommerceAppState>) => string) & {
|
|
46
46
|
clearCache: () => void;
|
|
47
47
|
resultsCount: () => number;
|
|
48
48
|
resetResultsCount: () => void;
|
|
@@ -80,7 +80,7 @@ export declare const requestIdSelector: ((state: {
|
|
|
80
80
|
cart: import("../context/cart/cart-state.js").CartState;
|
|
81
81
|
didYouMean: import("../did-you-mean/did-you-mean-state.js").DidYouMeanState;
|
|
82
82
|
triggers: import("../../triggers/triggers-state.js").TriggerState;
|
|
83
|
-
} & Partial<import("../../../ssr-commerce.index.js").CommerceAppState>) => string) & {
|
|
83
|
+
} & Partial<import("../../../ssr-commerce-next.index.js").CommerceAppState>) => string) & {
|
|
84
84
|
clearCache: () => void;
|
|
85
85
|
resultsCount: () => number;
|
|
86
86
|
resetResultsCount: () => void;
|
|
@@ -45,7 +45,7 @@ export declare const responseIdSelector: ((state: {
|
|
|
45
45
|
cart: import("../context/cart/cart-state.js").CartState;
|
|
46
46
|
didYouMean: import("../did-you-mean/did-you-mean-state.js").DidYouMeanState;
|
|
47
47
|
triggers: import("../../triggers/triggers-state.js").TriggerState;
|
|
48
|
-
} & Partial<import("../../../ssr-commerce.index.js").CommerceAppState>) => string) & {
|
|
48
|
+
} & Partial<import("../../../ssr-commerce-next.index.js").CommerceAppState>) => string) & {
|
|
49
49
|
clearCache: () => void;
|
|
50
50
|
resultsCount: () => number;
|
|
51
51
|
resetResultsCount: () => void;
|
|
@@ -83,7 +83,7 @@ export declare const requestIdSelector: ((state: {
|
|
|
83
83
|
cart: import("../context/cart/cart-state.js").CartState;
|
|
84
84
|
didYouMean: import("../did-you-mean/did-you-mean-state.js").DidYouMeanState;
|
|
85
85
|
triggers: import("../../triggers/triggers-state.js").TriggerState;
|
|
86
|
-
} & Partial<import("../../../ssr-commerce.index.js").CommerceAppState>) => string) & {
|
|
86
|
+
} & Partial<import("../../../ssr-commerce-next.index.js").CommerceAppState>) => string) & {
|
|
87
87
|
clearCache: () => void;
|
|
88
88
|
resultsCount: () => number;
|
|
89
89
|
resetResultsCount: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DidYouMeanState as CommerceDidYouMeanState } from '../commerce/did-you-mean/did-you-mean-state.js';
|
|
2
2
|
import type { DidYouMeanState } from './did-you-mean-state.js';
|
|
3
|
-
export declare const hasQueryCorrectionSelector: ((state:
|
|
3
|
+
export declare const hasQueryCorrectionSelector: ((state: DidYouMeanState | CommerceDidYouMeanState) => boolean) & {
|
|
4
4
|
clearCache: () => void;
|
|
5
5
|
resultsCount: () => number;
|
|
6
6
|
resetResultsCount: () => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface GenericAPIError {
|
|
2
|
+
status: number;
|
|
3
|
+
statusCode: number;
|
|
4
|
+
message: string;
|
|
5
|
+
type: string;
|
|
6
|
+
ignored?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Action creator for setting a generic API error in the application state.
|
|
10
|
+
*
|
|
11
|
+
* This action is used by the renew access token middleware to handle
|
|
12
|
+
* authentication-related errors. It should be added to any Redux slice that may
|
|
13
|
+
* receive a 401 (Unauthorized) or 419 (Authentication Timeout) error from an API call.
|
|
14
|
+
*/
|
|
15
|
+
export declare const setError: import("@reduxjs/toolkit").ActionCreatorWithPayload<GenericAPIError, string>;
|
|
16
|
+
export {};
|
|
@@ -2,8 +2,7 @@ import type { GeneratedAnswerCitation } from '../../controllers/generated-answer
|
|
|
2
2
|
import type { SearchAppState } from '../../state/search-app-state.js';
|
|
3
3
|
import type { GeneratedAnswerSection } from '../../state/state-sections.js';
|
|
4
4
|
export declare const generativeQuestionAnsweringIdSelector: (state: Partial<SearchAppState>) => {
|
|
5
|
-
|
|
6
|
-
id: string | undefined;
|
|
5
|
+
generativeQuestionAnsweringId: string | undefined;
|
|
7
6
|
};
|
|
8
7
|
export declare const selectFieldsToIncludeInCitation: (state: Partial<GeneratedAnswerSection>) => string[] | undefined;
|
|
9
8
|
export declare const citationSourceSelector: ((state: Partial<GeneratedAnswerSection>, citationId: string) => GeneratedAnswerCitation | undefined) & {
|
|
@@ -25,7 +25,7 @@ export declare class AsyncInsightSearchThunkProcessor<RejectionType> {
|
|
|
25
25
|
private onUpdateQueryForCorrection;
|
|
26
26
|
constructor(config: AsyncThunkConfig, onUpdateQueryForCorrection?: QueryCorrectionCallback);
|
|
27
27
|
fetchFromAPI({ request, mappings }: MappedSearchRequest<InsightQueryRequest>, options?: SearchOptions): Promise<{
|
|
28
|
-
response:
|
|
28
|
+
response: SuccessResponse | ErrorResponse;
|
|
29
29
|
duration: number;
|
|
30
30
|
queryExecuted: string;
|
|
31
31
|
requestExecuted: InsightQueryRequest;
|
|
@@ -8,7 +8,7 @@ import { type ExecuteSearchThunkReturn, type SearchAction } from '../search/sear
|
|
|
8
8
|
import { type MappedSearchRequest } from '../search/search-mappings.js';
|
|
9
9
|
export type StateNeededByExecuteSearch = ConfigurationSection & InsightConfigurationSection & Partial<InsightCaseContextSection & SearchSection & QuerySection & FacetSection & NumericFacetSection & DateFacetSection & CategoryFacetSection & PaginationSection & TabSection & FieldsSection & DidYouMeanSection & SortSection & FoldingSection & ContextSection>;
|
|
10
10
|
export declare const fetchFromAPI: (client: InsightAPIClient, state: StateNeededByExecuteSearch, { request, mappings }: MappedSearchRequest<InsightQueryRequest>, options?: SearchOptions) => Promise<{
|
|
11
|
-
response: import("../search/search-mappings.js").
|
|
11
|
+
response: import("../search/search-mappings.js").SuccessResponse | import("../search/search-mappings.js").ErrorResponse;
|
|
12
12
|
duration: number;
|
|
13
13
|
queryExecuted: string;
|
|
14
14
|
requestExecuted: InsightQueryRequest;
|
|
@@ -36,7 +36,7 @@ export declare class AsyncSearchThunkProcessor<RejectionType> {
|
|
|
36
36
|
private onUpdateQueryForCorrection;
|
|
37
37
|
constructor(config: AsyncThunkConfig, onUpdateQueryForCorrection?: QueryCorrectionCallback);
|
|
38
38
|
fetchFromAPI({ mappings, request }: MappedSearchRequest, options: FetchFromAPIOptions): Promise<{
|
|
39
|
-
response:
|
|
39
|
+
response: SuccessResponse | ErrorResponse;
|
|
40
40
|
duration: number;
|
|
41
41
|
queryExecuted: string;
|
|
42
42
|
requestExecuted: SearchRequest;
|
|
@@ -24,7 +24,7 @@ export declare const buildSearchRequest: (state: StateNeededBySearchRequest, eve
|
|
|
24
24
|
facetOptions?: import("../../facet-options/facet-options.js").FacetOptions;
|
|
25
25
|
numberOfResults?: number;
|
|
26
26
|
firstResult?: number;
|
|
27
|
-
facets?: (import("../../facets/facet-set/interfaces/request.js").FacetRequest | import("../../facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../../facets/range-facets/
|
|
27
|
+
facets?: (import("../../facets/facet-set/interfaces/request.js").FacetRequest | import("../../facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../../facets/range-facets/numeric-facet-set/interfaces/request.js").NumericFacetRequest | import("../../facets/range-facets/date-facet-set/interfaces/request.js").DateFacetRequest)[] | undefined;
|
|
28
28
|
cq?: string;
|
|
29
29
|
queryCorrection?: {
|
|
30
30
|
enabled?: boolean;
|
|
@@ -38,7 +38,7 @@ export declare class AsyncSearchThunkProcessor<RejectionType> {
|
|
|
38
38
|
private onUpdateQueryForCorrection;
|
|
39
39
|
constructor(config: AsyncThunkConfig, onUpdateQueryForCorrection?: QueryCorrectionCallback);
|
|
40
40
|
fetchFromAPI({ mappings, request }: MappedSearchRequest, options: FetchFromAPIOptions): Promise<{
|
|
41
|
-
response:
|
|
41
|
+
response: SuccessResponse | ErrorResponse;
|
|
42
42
|
duration: number;
|
|
43
43
|
queryExecuted: string;
|
|
44
44
|
requestExecuted: SearchRequest;
|
|
@@ -25,7 +25,7 @@ export declare const buildSearchRequest: (state: StateNeededBySearchRequest, nav
|
|
|
25
25
|
facetOptions?: import("../facet-options/facet-options.js").FacetOptions;
|
|
26
26
|
numberOfResults?: number;
|
|
27
27
|
firstResult?: number;
|
|
28
|
-
facets?: (import("../facets/facet-set/interfaces/request.js").FacetRequest | import("../facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../facets/range-facets/
|
|
28
|
+
facets?: (import("../facets/facet-set/interfaces/request.js").FacetRequest | import("../facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../facets/range-facets/numeric-facet-set/interfaces/request.js").NumericFacetRequest | import("../facets/range-facets/date-facet-set/interfaces/request.js").DateFacetRequest)[] | undefined;
|
|
29
29
|
cq?: string;
|
|
30
30
|
queryCorrection?: {
|
|
31
31
|
enabled?: boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { UnknownAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { Controller } from '../../controllers/controller/headless-controller.js';
|
|
3
|
+
import type { ControllersMap } from '../common/types/controllers.js';
|
|
4
|
+
import type { SSRCommerceEngine } from './factories/build-factory.js';
|
|
5
|
+
import type { SolutionType } from './types/controller-constants.js';
|
|
6
|
+
import type { ControllerDefinitionOption, ControllerDefinitionsMap, InferControllerStaticStateMapFromControllers } from './types/controller-definitions.js';
|
|
7
|
+
import type { InferControllerPropsMapFromDefinitions, InferControllersMapFromDefinition } from './types/controller-inference.js';
|
|
8
|
+
import type { EngineStaticState } from './types/engine.js';
|
|
9
|
+
export declare function createStaticState<TSearchAction extends UnknownAction>({ searchActions, controllers, }: {
|
|
10
|
+
searchActions: TSearchAction[];
|
|
11
|
+
controllers: ControllersMap;
|
|
12
|
+
}): EngineStaticState<TSearchAction, InferControllerStaticStateMapFromControllers<ControllersMap>>;
|
|
13
|
+
export declare function buildControllerDefinitions<TControllerDefinitionsMap extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType>({ definitionsMap, engine, solutionType, propsMap, }: {
|
|
14
|
+
definitionsMap: TControllerDefinitionsMap;
|
|
15
|
+
engine: SSRCommerceEngine;
|
|
16
|
+
solutionType: TSolutionType;
|
|
17
|
+
propsMap: InferControllerPropsMapFromDefinitions<TControllerDefinitionsMap>;
|
|
18
|
+
}): InferControllersMapFromDefinition<TControllerDefinitionsMap, TSolutionType>;
|
|
19
|
+
export declare function ensureAtLeastOneSolutionType(options?: ControllerDefinitionOption): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BreadcrumbManager, BreadcrumbManagerState } from '../../../../controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.js';
|
|
2
|
+
import type { ControllerDefinitionOption, SubControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
|
|
3
|
+
export type { BreadcrumbManager, BreadcrumbManagerState };
|
|
4
|
+
/**
|
|
5
|
+
* Defines a `BreadcrumbManager` controller instance.
|
|
6
|
+
* @group Definers
|
|
7
|
+
*
|
|
8
|
+
* @returns The `BreadcrumbManager` controller definition.
|
|
9
|
+
*/
|
|
10
|
+
export declare function defineBreadcrumbManager<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<BreadcrumbManager, TOptions>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Cart, type CartInitialState, type CartItem, type CartProps, type CartState } from '../../../../controllers/commerce/context/cart/headless-cart.js';
|
|
2
|
+
import type { UniversalControllerDefinitionWithProps } from '../../types/controller-definitions.js';
|
|
3
|
+
export type { Cart, CartInitialState, CartItem, CartProps, CartState };
|
|
4
|
+
export interface CartBuildProps {
|
|
5
|
+
initialState: CartInitialState;
|
|
6
|
+
}
|
|
7
|
+
export interface CartDefinition extends UniversalControllerDefinitionWithProps<Cart, CartBuildProps> {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Defines a `Cart` controller instance.
|
|
11
|
+
* @group Definers
|
|
12
|
+
*
|
|
13
|
+
* @returns The `Cart` controller definition.
|
|
14
|
+
*/
|
|
15
|
+
export declare function defineCart(): CartDefinition;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Context, type ContextOptions, type ContextProps, type ContextState, type UserLocation, type View } from '../../../../controllers/commerce/context/headless-context.js';
|
|
2
|
+
import type { UniversalControllerDefinitionWithProps } from '../../types/controller-definitions.js';
|
|
3
|
+
export type { Context, ContextProps, ContextState, View, UserLocation, ContextOptions, };
|
|
4
|
+
export interface ContextDefinition extends UniversalControllerDefinitionWithProps<Context, ContextOptions> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Defines a `Context` controller instance.
|
|
8
|
+
* @group Definers
|
|
9
|
+
*
|
|
10
|
+
* @returns The `Context` controller definition.
|
|
11
|
+
*/
|
|
12
|
+
export declare function defineContext(): ContextDefinition;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DidYouMean, DidYouMeanState } from '../../../../controllers/commerce/search/did-you-mean/headless-did-you-mean.js';
|
|
2
|
+
import type { SearchOnlyControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
|
|
3
|
+
export type { DidYouMean, DidYouMeanState };
|
|
4
|
+
/**
|
|
5
|
+
* Defines a `DidYouMean` controller instance.
|
|
6
|
+
* @group Definers
|
|
7
|
+
*
|
|
8
|
+
* @returns The `DidYouMean` controller definition.
|
|
9
|
+
*/
|
|
10
|
+
export declare function defineDidYouMean(): SearchOnlyControllerDefinitionWithoutProps<DidYouMean>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FieldSuggestionsFacet } from '../../../../api/commerce/search/query-suggest/query-suggest-response.js';
|
|
2
|
+
import type { CategoryFilterSuggestions, CategoryFilterSuggestionsState } from '../../../../controllers/commerce/filter-suggestions/headless-category-filter-suggestions.js';
|
|
3
|
+
import type { FilterSuggestions, FilterSuggestionsState } from '../../../../controllers/commerce/filter-suggestions/headless-filter-suggestions.js';
|
|
4
|
+
import { type FilterSuggestionsGenerator, type GeneratedFilterSuggestionsControllers } from '../../../../controllers/commerce/filter-suggestions/headless-filter-suggestions-generator.js';
|
|
5
|
+
import type { NonRecommendationControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
|
|
6
|
+
export type { FilterSuggestionsGenerator, GeneratedFilterSuggestionsControllers, FieldSuggestionsFacet, CategoryFilterSuggestions, CategoryFilterSuggestionsState, FilterSuggestions, FilterSuggestionsState, };
|
|
7
|
+
export interface FilterSuggestionsGeneratorDefinition extends NonRecommendationControllerDefinitionWithoutProps<FilterSuggestionsGenerator> {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Defines the `FilterSuggestionsGenerator` controller for the purpose of server-side rendering.
|
|
11
|
+
* @group Definers
|
|
12
|
+
*
|
|
13
|
+
* @returns The `FilterSuggestionsGenerator` controller definition.
|
|
14
|
+
*/
|
|
15
|
+
export declare function defineFilterSuggestionsGenerator(): FilterSuggestionsGeneratorDefinition;
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { CategoryFacet, CategoryFacetState } from '../../../../controllers/commerce/core/facets/category/headless-commerce-category-facet.js';
|
|
5
|
+
import type { DateFacet, DateFacetState, DateFacetValue } from '../../../../controllers/commerce/core/facets/date/headless-commerce-date-facet.js';
|
|
6
|
+
import type { FacetGenerator as CSRFacetGenerator, MappedGeneratedFacetController } from '../../../../controllers/commerce/core/facets/generator/headless-commerce-facet-generator.js';
|
|
7
|
+
import type { CategoryFacetValue, CoreCommerceFacet, FacetType } from '../../../../controllers/commerce/core/facets/headless-core-commerce-facet.js';
|
|
8
|
+
import type { LocationFacet, LocationFacetState } from '../../../../controllers/commerce/core/facets/location/headless-commerce-location-facet.js';
|
|
9
|
+
import type { NumericFacet, NumericFacetState, NumericFacetValue } from '../../../../controllers/commerce/core/facets/numeric/headless-commerce-numeric-facet.js';
|
|
10
|
+
import type { RegularFacet, RegularFacetState } from '../../../../controllers/commerce/core/facets/regular/headless-commerce-regular-facet.js';
|
|
11
|
+
import type { LocationFacetValue, RegularFacetValue } from '../../../../features/commerce/facets/facet-set/interfaces/response.js';
|
|
12
|
+
import { SolutionType } from '../../types/controller-constants.js';
|
|
13
|
+
import type { ControllerDefinitionOption, SubControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
|
|
14
|
+
export type { BaseFacetSearchResult, CategoryFacet, CategoryFacetState, CategoryFacetValue, CategoryFacetSearchResult, CoreCommerceFacet, DateFacet, DateFacetValue, DateFacetState, NumericFacet, NumericFacetValue, NumericFacetState, RegularFacet, RegularFacetState, RegularFacetValue, LocationFacet, LocationFacetState, LocationFacetValue, MappedGeneratedFacetController, };
|
|
15
|
+
export type FacetGeneratorState = MappedFacetStates;
|
|
16
|
+
export type MappedFacetStates = Array<MappedFacetState[FacetType]>;
|
|
17
|
+
export type { FacetType };
|
|
18
|
+
export type MappedFacetState = {
|
|
19
|
+
[T in FacetType]: T extends 'numericalRange' ? NumericFacetState : T extends 'regular' ? RegularFacetState : T extends 'dateRange' ? DateFacetState : T extends 'hierarchical' ? CategoryFacetState : T extends 'location' ? LocationFacetState : never;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @group Definers
|
|
23
|
+
*/
|
|
24
|
+
export declare function defineFacetGenerator<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<FacetGenerator, TOptions>;
|
|
25
|
+
/**
|
|
26
|
+
* The `FacetGenerator` headless sub-controller creates commerce facet sub-controllers from the Commerce API search or
|
|
27
|
+
* product listing response.
|
|
28
|
+
*
|
|
29
|
+
* Commerce facets are not requested by the implementer, but rather pre-configured through the Coveo Merchandising Hub
|
|
30
|
+
* (CMH). The implementer is only responsible for leveraging the facet controllers created by this sub-controller to
|
|
31
|
+
* properly render facets in their application.
|
|
32
|
+
*/
|
|
33
|
+
export interface FacetGenerator extends Omit<CSRFacetGenerator, 'state' | 'facets'> {
|
|
34
|
+
/**
|
|
35
|
+
* The state of each every facet returned by the Commerce API.
|
|
36
|
+
*
|
|
37
|
+
* In a server-side rendering (SSR) scenario, use this state to render the facet UI components before the
|
|
38
|
+
* facet controller is hydrated on the client side.
|
|
39
|
+
*
|
|
40
|
+
* Once the facet generator controller has been hydrated, use the `getFacetController` method to retrieve
|
|
41
|
+
* the individual facet controllers and subscribe to their respective states.
|
|
42
|
+
*/
|
|
43
|
+
state: FacetGeneratorState;
|
|
44
|
+
/**
|
|
45
|
+
* Builds a facet controller for the specified facet ID.
|
|
46
|
+
*
|
|
47
|
+
* @param facetId The unique identifier of the facet.
|
|
48
|
+
* @param facetType The type of facet to build.
|
|
49
|
+
* @returns A facet controller of the specified type, or `undefined` if the facet does not exist in the state.
|
|
50
|
+
*/
|
|
51
|
+
getFacetController: <T extends FacetType>(facetId: string, facetType: T) => MappedGeneratedFacetController[T] | undefined;
|
|
52
|
+
}
|
|
53
|
+
export interface FacetGeneratorOptions {
|
|
54
|
+
props: FacetGeneratorProps;
|
|
55
|
+
}
|
|
56
|
+
interface FacetGeneratorProps {
|
|
57
|
+
solutionType: SolutionType;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Creates a `FacetGenerator` sub-controller for server-side rendering purposes (SSR).
|
|
61
|
+
*
|
|
62
|
+
* @param engine - The SSR commerce engine.
|
|
63
|
+
* @param options - The facet generator options used internally.
|
|
64
|
+
* @returns A `FacetGenerator` sub-controller.
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildFacetGenerator(engine: CommerceEngine, options: FacetGeneratorOptions): FacetGenerator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type InstantProducts, type InstantProductsOptions, type InstantProductsProps, type InstantProductsState } from '../../../../controllers/commerce/instant-products/headless-instant-products.js';
|
|
2
|
+
import type { NonRecommendationControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
|
|
3
|
+
export type { InstantProductsOptions, InstantProductsState, InstantProducts, InstantProductsProps, };
|
|
4
|
+
export interface InstantProductsDefinition extends NonRecommendationControllerDefinitionWithoutProps<InstantProducts> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Defines the `InstantProducts` controller for the purpose of server-side rendering.
|
|
8
|
+
* @group Definers
|
|
9
|
+
*
|
|
10
|
+
* @returns The `InstantProducts` controller definition.
|
|
11
|
+
*/
|
|
12
|
+
export declare function defineInstantProducts(props?: InstantProductsProps): InstantProductsDefinition;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CorePaginationOptions, Pagination, PaginationOptions, PaginationProps, PaginationState } from '../../../../controllers/commerce/core/pagination/headless-core-commerce-pagination.js';
|
|
2
|
+
import type { ControllerDefinitionOption, SubControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
|
|
3
|
+
export type { Pagination, PaginationProps, PaginationState, PaginationOptions, CorePaginationOptions, };
|
|
4
|
+
/**
|
|
5
|
+
* Defines a `Pagination` controller instance.
|
|
6
|
+
* @group Definers
|
|
7
|
+
*
|
|
8
|
+
* @param props - The configurable `Pagination` properties.
|
|
9
|
+
* @returns The `Pagination` controller definition.
|
|
10
|
+
*/
|
|
11
|
+
export declare function definePagination<TOptions extends ControllerDefinitionOption | undefined>(props?: PaginationProps & TOptions): SubControllerDefinitionWithoutProps<Pagination, TOptions>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ParameterManager, ParameterManagerProps, ParameterManagerState } from '../../../../controllers/commerce/core/parameter-manager/headless-core-parameter-manager.js';
|
|
2
|
+
import type { Parameters } from '../../../../features/commerce/parameters/parameters-actions.js';
|
|
3
|
+
import type { ProductListingParameters } from '../../../../features/commerce/product-listing-parameters/product-listing-parameters-actions.js';
|
|
4
|
+
import type { CommerceSearchParameters } from '../../../../features/commerce/search-parameters/search-parameters-actions.js';
|
|
5
|
+
import type { ControllerDefinitionOption, SubControllerDefinitionWithProps } from '../../types/controller-definitions.js';
|
|
6
|
+
export type { ParameterManager, ParameterManagerProps, ParameterManagerState, Parameters, ProductListingParameters, CommerceSearchParameters, };
|
|
7
|
+
/**
|
|
8
|
+
* Defines a `ParameterManager` controller instance.
|
|
9
|
+
* @group Definers
|
|
10
|
+
*
|
|
11
|
+
* @returns The `ParameterManager` controller definition.
|
|
12
|
+
*/
|
|
13
|
+
export declare function defineParameterManager<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithProps<ParameterManager<MappedParameterTypes<TOptions>>, TOptions, SSRParameterManagerProps<MappedParameterTypes<TOptions>>>;
|
|
14
|
+
export interface SSRParameterManagerProps<T extends Parameters> extends Omit<ParameterManagerProps<T>, 'excludeDefaultParameters'> {
|
|
15
|
+
}
|
|
16
|
+
type MappedParameterTypes<TOptions extends ControllerDefinitionOption | undefined> = TOptions extends {
|
|
17
|
+
listing: true;
|
|
18
|
+
search: true;
|
|
19
|
+
} | undefined ? ProductListingParameters | CommerceSearchParameters : TOptions extends {
|
|
20
|
+
listing: true;
|
|
21
|
+
search: false;
|
|
22
|
+
} ? ProductListingParameters : TOptions extends {
|
|
23
|
+
listing: false;
|
|
24
|
+
search: true;
|
|
25
|
+
} ? CommerceSearchParameters : never;
|