@coveo/quantic 3.27.0-pre.e4f0574e6b → 3.27.0
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/lwc/quanticCaseClassification/quanticCaseClassification.css +1 -6
- package/force-app/main/default/lwc/quanticCaseClassification/quanticCaseClassification.html +3 -3
- package/force-app/main/default/lwc/quanticResultActionStyles/quanticResultActionStyles.css +4 -4
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +8 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/base-analytics.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/coveo.analytics/history-store.d.ts +1 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/commerce-api-client.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/commerce-api-params.d.ts +5 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +11 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/recommendations/recommendations-request.d.ts +11 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-request.d.ts +11 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-response.d.ts +2 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/common/trigger.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/generated-answer/generated-answer-client.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/generated-answer/generated-answer-event-payload.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/tests/stream-answer-api-state-mock.d.ts +119 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/platform-client.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/fields/fields-response.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/search-api-params.d.ts +7 -20
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/case-assist-api-client.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/case-assist-params.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-case-classifications/get-case-classifications-request.d.ts +5 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-document-suggestions/get-document-suggestions-request.d.ts +5 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-response.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/insight-api-client.d.ts +5 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/insight-params.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/common.d.ts +9 -12
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/core-engine.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/from-build-result.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/search-engine/jwt-reducer.d.ts +0 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/build.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/common.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/fetch-static-state.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/hydrate-static-state.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/headless-core-commerce-facet.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/field-suggestions/headless-category-field-suggestions.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-category-filter-suggestions.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-view/headless-product-view.ssr.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search-box/headless-search-box.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/breadcrumb-manager/headless-core-breadcrumb-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-context-reserved-keys.d.ts +1 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-core-context.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/did-you-mean/headless-core-did-you-mean.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/_common/facet-option-definitions.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/facet/headless-core-facet.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/date-facet/headless-date-facet-options.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/headless-core-range-facet.d.ts +7 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-core-numeric-facet.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-numeric-facet-options.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/folded-result-list/headless-core-folded-result-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-core-generated-answer.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-core-interactive-citation.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-searchapi-generated-answer.d.ts +2 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/search-box/headless-core-search-box-options.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/search-parameter-manager/headless-core-search-parameter-manager.d.ts +0 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/smart-snippet/headless-core-smart-snippet.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/smart-snippet-questions-list/headless-core-smart-snippet-questions-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-notify-trigger.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/automatic-facet/headless-automatic-facet.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/category-facet/headless-category-facet.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/facets/category-facet/headless-insight-category-facet.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/facets/range-facet/numeric-facet/headless-insight-numeric-facet.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/generated-answer/headless-insight-generated-answer.d.ts +1 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/smart-snippet/headless-insight-smart-snippet-interactive-inline-links.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/smart-snippet-questions-list/headless-insight-smart-snippet-interactive-questions.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/smart-snippet-questions-list/headless-insight-smart-snippet-questions-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/instant-results/instant-results-options.d.ts +1 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/headless-answerapi-generated-answer.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recent-queries-list/headless-recent-queries-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recent-results-list/headless-recent-results-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet/headless-smart-snippet-interactive-inline-links.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-interactive-questions.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/tab-manager/headless-tab-manager.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-notify-trigger.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-notify-trigger.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-redirection-trigger.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/advanced-search-queries/advanced-search-queries-state.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-actions.d.ts +0 -33
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-utils.d.ts +11 -17
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/legacy-search-action-cause.d.ts +1 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/attached-results/attached-results-actions.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/attached-results/attached-results-analytics-actions.d.ts +104 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-assist-configuration/case-assist-configuration-actions.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-field/case-field-actions.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-field/case-field-state.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-input/case-input-state.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-search-set/commerce-facet-search-actions.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-set/facet-set-reducers.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-set/interfaces/request.d.ts +2 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-set/interfaces/response.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/numeric-facet/manual-numeric-facet-state.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/pagination/pagination-actions.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-selectors.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-serializer.ssr.d.ts +1 -23
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-actions.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-templates/product-templates-helpers.d.ts +0 -33
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recent-queries/recent-queries-actions.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-actions.d.ts +2 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-actions.d.ts +3 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-selectors.d.ts +0 -21
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/plan-request-builder.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/standalone-search-box-set-actions.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/debug/ranking-info-parser.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/document-suggestion/document-suggestion-state.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/category-facet-set/category-facet-validate-payload.d.ts +0 -9
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-insight-analytics-actions.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-insight-utils.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/generic/facet-reducer-helpers.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/date-facet-set/interfaces/response.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/interfaces/options.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/interfaces/range-facet.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/interfaces/request.d.ts +1 -11
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/range-facet-utils.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/numeric-facet-set/interfaces/response.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/folding/folding-analytics-actions.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-selectors.d.ts +0 -33
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-configuration/insight-configuration-actions.d.ts +2 -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/insight-user-actions/insight-user-actions-actions.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-user-actions/insight-user-actions-preprocessing.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/instant-results/instant-results-actions.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-suggest/query-suggest-actions.d.ts +0 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/result/result-insight-analytics-actions.d.ts +52 -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-actions.d.ts +0 -82
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-request.d.ts +8 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions-thunk-processor.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions.d.ts +0 -65
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-request.d.ts +8 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-actions.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-serializer.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/standalone-search-box-set/standalone-search-box-set-actions.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/templates/templates-manager.d.ts +0 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/index.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/insight.index.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/state/insight-app-state.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/state/state-sections.d.ts +0 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-commerce-api-request.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-engine-v2.d.ts +0 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-search-request.d.ts +8 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/fetch-event-source/fetch.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/url-utils.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/utils.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +10 -10
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +9 -9
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +7 -7
- package/package.json +6 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/sub-controller/headless-sub-controller.ssr.d.ts +0 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-listing/utils/load-product-listing-reducers.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search/utils/load-search-reducers.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/example-deleteme-headless-case-context.d.ts +0 -32
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-core-internal-context.d.ts +0 -31
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-strict-context-factory.d.ts +0 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/interfaces/response.d.ts +0 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort-actions-loader.d.ts +0 -35
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort-actions.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort-slice.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort-state.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-insight-api-client.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/fetch-event-source/index.d.ts +0 -2
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ConfigurationSection, ContextSection, PipelineSection, QuerySection, SearchHubSection } from '../../state/state-sections.js';
|
|
2
|
-
export declare const getLanguage: (state: ConfigurationSection) => string;
|
|
3
2
|
export type StateNeededByBaseAnalyticsProvider = ConfigurationSection & Partial<SearchHubSection & PipelineSection & QuerySection & ContextSection>;
|
|
4
3
|
export declare abstract class BaseAnalyticsProvider<T extends StateNeededByBaseAnalyticsProvider> {
|
|
5
4
|
protected getState: () => T;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type WebStorage } from './storage.js';
|
|
2
2
|
export declare const STORE_KEY: string;
|
|
3
3
|
export declare const MAX_NUMBER_OF_HISTORY_ELEMENTS: number;
|
|
4
|
-
export declare const MIN_THRESHOLD_FOR_DUPLICATE_VALUE: number;
|
|
5
4
|
export declare const MAX_VALUE_SIZE = 75;
|
|
6
|
-
|
|
5
|
+
declare class HistoryStore {
|
|
7
6
|
private static instance;
|
|
8
7
|
static getInstance(store?: WebStorage): HistoryStore;
|
|
9
8
|
private store;
|
|
@@ -35,7 +34,4 @@ export interface HistoryElement {
|
|
|
35
34
|
time: string;
|
|
36
35
|
internalTime?: number;
|
|
37
36
|
}
|
|
38
|
-
export interface HistoryViewElement extends HistoryElement {
|
|
39
|
-
title?: string;
|
|
40
|
-
}
|
|
41
37
|
export default HistoryStore;
|
|
@@ -27,7 +27,7 @@ export interface CommerceAPIClientOptions {
|
|
|
27
27
|
preprocessRequest: PreprocessRequest;
|
|
28
28
|
}
|
|
29
29
|
export type CommerceAPIResponse<T> = CommerceAPISuccessResponse<T> | CommerceAPIErrorResponse;
|
|
30
|
-
|
|
30
|
+
interface CommerceAPISuccessResponse<T> {
|
|
31
31
|
success: T;
|
|
32
32
|
}
|
|
33
33
|
export declare const isErrorResponse: <T>(r: CommerceAPIResponse<T>) => r is CommerceAPIErrorResponse;
|
|
@@ -44,3 +44,4 @@ export declare class CommerceAPIClient implements CommerceFacetSearchAPIClient {
|
|
|
44
44
|
private query;
|
|
45
45
|
}
|
|
46
46
|
export declare function getCommerceApiBaseUrl(organizationId: string, environment?: PlatformEnvironment): string;
|
|
47
|
+
export {};
|
|
@@ -18,10 +18,10 @@ export interface ClientIdParam {
|
|
|
18
18
|
export interface ContextParam {
|
|
19
19
|
context: ContextParams;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
type ProductParam = {
|
|
22
22
|
productId: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
23
|
+
};
|
|
24
|
+
type ContextParams = {
|
|
25
25
|
view: ViewParams;
|
|
26
26
|
user?: UserParams;
|
|
27
27
|
product?: ProductParam;
|
|
@@ -29,7 +29,7 @@ export interface ContextParams {
|
|
|
29
29
|
purchased?: CartItemParam[];
|
|
30
30
|
capture: boolean;
|
|
31
31
|
source: string[];
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
export interface ViewParams {
|
|
34
34
|
url: string;
|
|
35
35
|
referrer?: string;
|
|
@@ -76,3 +76,4 @@ export interface IgnorePathsParam {
|
|
|
76
76
|
export interface SlotIdParam {
|
|
77
77
|
slotId: string;
|
|
78
78
|
}
|
|
79
|
+
export {};
|
|
@@ -9,7 +9,17 @@ export declare const getRequestOptions: (req: FilterableCommerceAPIRequest, path
|
|
|
9
9
|
requestParams: {
|
|
10
10
|
trackingId: string;
|
|
11
11
|
clientId: string | undefined;
|
|
12
|
-
context:
|
|
12
|
+
context: {
|
|
13
|
+
view: import("../commerce-api-params.js").ViewParams;
|
|
14
|
+
user?: import("../commerce-api-params.js").UserParams;
|
|
15
|
+
product?: {
|
|
16
|
+
productId: string;
|
|
17
|
+
};
|
|
18
|
+
cart?: import("../commerce-api-params.js").CartItemParam[];
|
|
19
|
+
purchased?: import("../commerce-api-params.js").CartItemParam[];
|
|
20
|
+
capture: boolean;
|
|
21
|
+
source: string[];
|
|
22
|
+
};
|
|
13
23
|
language: string;
|
|
14
24
|
country: string;
|
|
15
25
|
currency: string;
|
|
@@ -7,7 +7,17 @@ export declare const buildRecommendationsRequest: (req: CommerceRecommendationsR
|
|
|
7
7
|
slotId: string;
|
|
8
8
|
trackingId: string;
|
|
9
9
|
clientId: string | undefined;
|
|
10
|
-
context:
|
|
10
|
+
context: {
|
|
11
|
+
view: import("../commerce-api-params.js").ViewParams;
|
|
12
|
+
user?: import("../commerce-api-params.js").UserParams;
|
|
13
|
+
product?: {
|
|
14
|
+
productId: string;
|
|
15
|
+
};
|
|
16
|
+
cart?: import("../commerce-api-params.js").CartItemParam[];
|
|
17
|
+
purchased?: import("../commerce-api-params.js").CartItemParam[];
|
|
18
|
+
capture: boolean;
|
|
19
|
+
source: string[];
|
|
20
|
+
};
|
|
11
21
|
language: string;
|
|
12
22
|
country: string;
|
|
13
23
|
currency: string;
|
|
@@ -6,7 +6,17 @@ export declare const getQuerySuggestRequestOptions: (req: QuerySuggestRequest) =
|
|
|
6
6
|
trackingId: string;
|
|
7
7
|
query: string | undefined;
|
|
8
8
|
clientId: string | undefined;
|
|
9
|
-
context:
|
|
9
|
+
context: {
|
|
10
|
+
view: import("../../commerce-api-params.js").ViewParams;
|
|
11
|
+
user?: import("../../commerce-api-params.js").UserParams;
|
|
12
|
+
product?: {
|
|
13
|
+
productId: string;
|
|
14
|
+
};
|
|
15
|
+
cart?: import("../../commerce-api-params.js").CartItemParam[];
|
|
16
|
+
purchased?: import("../../commerce-api-params.js").CartItemParam[];
|
|
17
|
+
capture: boolean;
|
|
18
|
+
source: string[];
|
|
19
|
+
};
|
|
10
20
|
language: string;
|
|
11
21
|
country: string;
|
|
12
22
|
currency: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { SearchAPIErrorWithExceptionInBody, SearchAPIErrorWithStatusCode } from '../../../search/search-api-error-response.js';
|
|
2
1
|
/**
|
|
3
2
|
* A Coveo ML query suggestion.
|
|
4
3
|
*/
|
|
5
|
-
|
|
4
|
+
interface QuerySuggestCompletion {
|
|
6
5
|
/**
|
|
7
6
|
* The original query expression.
|
|
8
7
|
*/
|
|
@@ -50,4 +49,4 @@ export interface QuerySuggestSuccessResponse {
|
|
|
50
49
|
*/
|
|
51
50
|
fieldSuggestionsFacets: FieldSuggestionsFacet[];
|
|
52
51
|
}
|
|
53
|
-
export
|
|
52
|
+
export {};
|
package/force-app/main/default/staticresources/coveoheadless/definitions/api/common/trigger.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export interface TriggerNotify {
|
|
|
10
10
|
type: 'notify';
|
|
11
11
|
content: string;
|
|
12
12
|
}
|
|
13
|
-
export declare function isNotifyTrigger(trigger: Trigger): trigger is TriggerNotify;
|
|
14
13
|
/**
|
|
15
14
|
* Redirect the user to another url
|
|
16
15
|
*/
|
|
@@ -26,7 +25,6 @@ export interface TriggerQuery {
|
|
|
26
25
|
type: 'query';
|
|
27
26
|
content: string;
|
|
28
27
|
}
|
|
29
|
-
export declare function isQueryTrigger(trigger: Trigger): trigger is TriggerQuery;
|
|
30
28
|
/**
|
|
31
29
|
* Execute a javascript function present in the page.
|
|
32
30
|
*/
|
|
@@ -41,4 +39,3 @@ export interface TriggerExecute {
|
|
|
41
39
|
* The type of the parameters for a Trigger Execute object.
|
|
42
40
|
*/
|
|
43
41
|
export type ExecuteTriggerParams = (string | number | boolean)[];
|
|
44
|
-
export declare function isExecuteTrigger(trigger: Trigger): trigger is TriggerExecute;
|
|
@@ -5,7 +5,7 @@ import type { GeneratedAnswerErrorPayload } from '../../features/generated-answe
|
|
|
5
5
|
import type { SearchAppState } from '../../state/search-app-state.js';
|
|
6
6
|
import type { GeneratedAnswerStreamEventData } from './generated-answer-event-payload.js';
|
|
7
7
|
import type { GeneratedAnswerStreamRequest } from './generated-answer-request.js';
|
|
8
|
-
|
|
8
|
+
interface GeneratedAnswerAPIClientOptions {
|
|
9
9
|
logger: Logger;
|
|
10
10
|
}
|
|
11
11
|
export interface AsyncThunkGeneratedAnswerOptions<T extends Partial<SearchAppState>> extends AsyncThunkOptions<T, ClientThunkExtraArguments<GeneratedAnswerAPIClient>> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GeneratedContentFormat } from '../../features/generated-answer/generated-response-format.js';
|
|
2
2
|
import type { Raw } from '../search/search/raw.js';
|
|
3
|
-
|
|
3
|
+
type GeneratedAnswerStreamFinishReason = 'COMPLETED' | 'ERROR';
|
|
4
4
|
export type GeneratedAnswerPayloadType = 'genqa.headerMessageType' | 'genqa.messageType' | 'genqa.citationsType' | 'genqa.endOfStreamType';
|
|
5
5
|
export interface GeneratedAnswerCitation {
|
|
6
6
|
id: string;
|
|
@@ -31,3 +31,4 @@ export interface GeneratedAnswerStreamEventData {
|
|
|
31
31
|
errorMessage?: string;
|
|
32
32
|
statusCode?: number;
|
|
33
33
|
}
|
|
34
|
+
export {};
|
|
@@ -32,6 +32,8 @@ export declare const selectAnswerTriggerParams: ((state: any, ...params: any[])
|
|
|
32
32
|
q: any;
|
|
33
33
|
requestId: any;
|
|
34
34
|
cannotAnswer: any;
|
|
35
|
+
analyticsMode: any;
|
|
36
|
+
actionCause: any;
|
|
35
37
|
}) & {
|
|
36
38
|
clearCache: () => void;
|
|
37
39
|
resultsCount: () => number;
|
|
@@ -41,11 +43,15 @@ export declare const selectAnswerTriggerParams: ((state: any, ...params: any[])
|
|
|
41
43
|
q: any;
|
|
42
44
|
requestId: any;
|
|
43
45
|
cannotAnswer: any;
|
|
46
|
+
analyticsMode: any;
|
|
47
|
+
actionCause: any;
|
|
44
48
|
};
|
|
45
49
|
memoizedResultFunc: ((...resultFuncArgs: readonly any[]) => {
|
|
46
50
|
q: any;
|
|
47
51
|
requestId: any;
|
|
48
52
|
cannotAnswer: any;
|
|
53
|
+
analyticsMode: any;
|
|
54
|
+
actionCause: any;
|
|
49
55
|
}) & {
|
|
50
56
|
clearCache: () => void;
|
|
51
57
|
resultsCount: () => number;
|
|
@@ -55,6 +61,8 @@ export declare const selectAnswerTriggerParams: ((state: any, ...params: any[])
|
|
|
55
61
|
q: any;
|
|
56
62
|
requestId: any;
|
|
57
63
|
cannotAnswer: any;
|
|
64
|
+
analyticsMode: any;
|
|
65
|
+
actionCause: any;
|
|
58
66
|
};
|
|
59
67
|
dependencies: import("reselect").SelectorArray<any>;
|
|
60
68
|
recomputations: () => number;
|
|
@@ -17,7 +17,12 @@ export declare const streamAnswerAPIStateMockWithStaticFiltersAndTabExpressionWi
|
|
|
17
17
|
lqWasSet?: boolean | undefined;
|
|
18
18
|
dq?: string | undefined;
|
|
19
19
|
dqWasSet?: boolean | undefined;
|
|
20
|
-
defaultFilters?:
|
|
20
|
+
defaultFilters?: {
|
|
21
|
+
cq: string;
|
|
22
|
+
aq: string;
|
|
23
|
+
lq: string;
|
|
24
|
+
dq: string;
|
|
25
|
+
} | undefined;
|
|
21
26
|
};
|
|
22
27
|
searchHub: string;
|
|
23
28
|
pipeline: string;
|
|
@@ -923,3 +928,116 @@ export declare const expectedStreamAnswerAPIParamWithoutSearchAction: {
|
|
|
923
928
|
firstResult: number;
|
|
924
929
|
tab: string;
|
|
925
930
|
};
|
|
931
|
+
export declare const expectedStreamAnswerAPIParamForSelect: {
|
|
932
|
+
q: string;
|
|
933
|
+
aq: string;
|
|
934
|
+
cq: string;
|
|
935
|
+
dq: string;
|
|
936
|
+
lq: string;
|
|
937
|
+
context: {
|
|
938
|
+
testKey: string;
|
|
939
|
+
};
|
|
940
|
+
pipelineRuleParameters: {
|
|
941
|
+
mlGenerativeQuestionAnswering: {
|
|
942
|
+
responseFormat: {
|
|
943
|
+
contentFormat: string[];
|
|
944
|
+
};
|
|
945
|
+
citationsFieldToInclude: never[];
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
searchHub: string;
|
|
949
|
+
facets: ({
|
|
950
|
+
filterFacetCount: boolean;
|
|
951
|
+
injectionDepth: number;
|
|
952
|
+
numberOfValues: number;
|
|
953
|
+
sortCriteria: string;
|
|
954
|
+
resultsMustMatch: string;
|
|
955
|
+
type: string;
|
|
956
|
+
currentValues: never[];
|
|
957
|
+
freezeCurrentValues: boolean;
|
|
958
|
+
isFieldExpanded: boolean;
|
|
959
|
+
preventAutoSelect: boolean;
|
|
960
|
+
facetId: string;
|
|
961
|
+
field: string;
|
|
962
|
+
rangeAlgorithm?: undefined;
|
|
963
|
+
generateAutomaticRanges?: undefined;
|
|
964
|
+
delimitingCharacter?: undefined;
|
|
965
|
+
basePath?: undefined;
|
|
966
|
+
filterByBasePath?: undefined;
|
|
967
|
+
} | {
|
|
968
|
+
filterFacetCount: boolean;
|
|
969
|
+
injectionDepth: number;
|
|
970
|
+
numberOfValues: number;
|
|
971
|
+
sortCriteria: string;
|
|
972
|
+
rangeAlgorithm: string;
|
|
973
|
+
resultsMustMatch: string;
|
|
974
|
+
currentValues: {
|
|
975
|
+
start: string;
|
|
976
|
+
end: string;
|
|
977
|
+
endInclusive: boolean;
|
|
978
|
+
state: string;
|
|
979
|
+
}[];
|
|
980
|
+
preventAutoSelect: boolean;
|
|
981
|
+
type: string;
|
|
982
|
+
facetId: string;
|
|
983
|
+
field: string;
|
|
984
|
+
generateAutomaticRanges: boolean;
|
|
985
|
+
freezeCurrentValues?: undefined;
|
|
986
|
+
isFieldExpanded?: undefined;
|
|
987
|
+
delimitingCharacter?: undefined;
|
|
988
|
+
basePath?: undefined;
|
|
989
|
+
filterByBasePath?: undefined;
|
|
990
|
+
} | {
|
|
991
|
+
delimitingCharacter: string;
|
|
992
|
+
filterFacetCount: boolean;
|
|
993
|
+
injectionDepth: number;
|
|
994
|
+
numberOfValues: number;
|
|
995
|
+
sortCriteria: string;
|
|
996
|
+
basePath: never[];
|
|
997
|
+
filterByBasePath: boolean;
|
|
998
|
+
resultsMustMatch: string;
|
|
999
|
+
currentValues: never[];
|
|
1000
|
+
preventAutoSelect: boolean;
|
|
1001
|
+
type: string;
|
|
1002
|
+
facetId: string;
|
|
1003
|
+
field: string;
|
|
1004
|
+
freezeCurrentValues?: undefined;
|
|
1005
|
+
isFieldExpanded?: undefined;
|
|
1006
|
+
rangeAlgorithm?: undefined;
|
|
1007
|
+
generateAutomaticRanges?: undefined;
|
|
1008
|
+
} | {
|
|
1009
|
+
filterFacetCount: boolean;
|
|
1010
|
+
injectionDepth: number;
|
|
1011
|
+
numberOfValues: number;
|
|
1012
|
+
sortCriteria: string;
|
|
1013
|
+
rangeAlgorithm: string;
|
|
1014
|
+
resultsMustMatch: string;
|
|
1015
|
+
currentValues: {
|
|
1016
|
+
endInclusive: boolean;
|
|
1017
|
+
state: string;
|
|
1018
|
+
start: number;
|
|
1019
|
+
end: number;
|
|
1020
|
+
}[];
|
|
1021
|
+
preventAutoSelect: boolean;
|
|
1022
|
+
type: string;
|
|
1023
|
+
facetId: string;
|
|
1024
|
+
field: string;
|
|
1025
|
+
generateAutomaticRanges: boolean;
|
|
1026
|
+
freezeCurrentValues?: undefined;
|
|
1027
|
+
isFieldExpanded?: undefined;
|
|
1028
|
+
delimitingCharacter?: undefined;
|
|
1029
|
+
basePath?: undefined;
|
|
1030
|
+
filterByBasePath?: undefined;
|
|
1031
|
+
})[];
|
|
1032
|
+
fieldsToInclude: string[];
|
|
1033
|
+
queryCorrection: {
|
|
1034
|
+
enabled: boolean;
|
|
1035
|
+
options: {
|
|
1036
|
+
automaticallyCorrect: string;
|
|
1037
|
+
};
|
|
1038
|
+
};
|
|
1039
|
+
enableDidYouMean: boolean;
|
|
1040
|
+
numberOfResults: number;
|
|
1041
|
+
firstResult: number;
|
|
1042
|
+
tab: string;
|
|
1043
|
+
};
|
package/force-app/main/default/staticresources/coveoheadless/definitions/api/platform-client.d.ts
CHANGED
|
@@ -35,6 +35,5 @@ export declare class PlatformClient {
|
|
|
35
35
|
* @returns The endpoint URL for the organization.
|
|
36
36
|
*/
|
|
37
37
|
export declare function getOrganizationEndpoint(organizationId: string, environment?: PlatformEnvironment, endpointType?: 'admin' | 'analytics' | 'platform'): string;
|
|
38
|
-
export declare function getAdministrationOrganizationEndpoint(organizationId: string, environment?: PlatformEnvironment): string;
|
|
39
38
|
export declare function getSearchApiBaseUrl(organizationId: string, environment?: PlatformEnvironment): string;
|
|
40
39
|
export declare function getAnalyticsNextApiBaseUrl(organizationId: string, environment?: PlatformEnvironment): string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SearchAPIErrorWithExceptionInBody, SearchAPIErrorWithStatusCode } from '../search-api-error-response.js';
|
|
2
1
|
/**
|
|
3
2
|
* Field description
|
|
4
3
|
*/
|
|
@@ -57,4 +56,3 @@ export interface FieldDescriptionsResponseSuccess {
|
|
|
57
56
|
*/
|
|
58
57
|
fields: FieldDescription[];
|
|
59
58
|
}
|
|
60
|
-
export type FieldDescriptions = FieldDescriptionsResponseSuccess | SearchAPIErrorWithExceptionInBody | SearchAPIErrorWithStatusCode;
|
|
@@ -64,20 +64,6 @@ export interface ReferrerParam {
|
|
|
64
64
|
export interface RecommendationParam {
|
|
65
65
|
recommendation: string;
|
|
66
66
|
}
|
|
67
|
-
export interface MachineLearningParam {
|
|
68
|
-
mlParameters: MachineLearningECommerceParameters;
|
|
69
|
-
}
|
|
70
|
-
export interface MachineLearningECommerceParameters {
|
|
71
|
-
itemIds?: string[];
|
|
72
|
-
categoryFilter?: string;
|
|
73
|
-
brandFilter?: string;
|
|
74
|
-
itemIdsToFilterOut?: string[];
|
|
75
|
-
removeRecentlySeen?: boolean;
|
|
76
|
-
recentlySeenConsideredMinutes?: number;
|
|
77
|
-
}
|
|
78
|
-
export interface MaximumAgeParam {
|
|
79
|
-
maximumAge: number;
|
|
80
|
-
}
|
|
81
67
|
export interface ActionsHistoryParam {
|
|
82
68
|
actionsHistory?: HistoryElement[];
|
|
83
69
|
}
|
|
@@ -117,16 +103,17 @@ export interface AutomaticFacetsParams {
|
|
|
117
103
|
export interface PipelineRuleParams {
|
|
118
104
|
pipelineRuleParameters?: PipelineRuleParameters;
|
|
119
105
|
}
|
|
120
|
-
|
|
106
|
+
type PipelineRuleParameters = {
|
|
121
107
|
mlGenerativeQuestionAnswering?: GenQAParameters;
|
|
122
|
-
}
|
|
123
|
-
|
|
108
|
+
};
|
|
109
|
+
type GenQAParameters = {
|
|
124
110
|
responseFormat: ResponseFormatParameters;
|
|
125
111
|
citationsFieldToInclude: string[];
|
|
126
|
-
}
|
|
127
|
-
|
|
112
|
+
};
|
|
113
|
+
type ResponseFormatParameters = {
|
|
128
114
|
contentFormat?: GeneratedContentFormat[];
|
|
129
|
-
}
|
|
115
|
+
};
|
|
130
116
|
export declare const baseSearchRequest: (req: BaseParam & AuthenticationParam, method: HttpMethods, contentType: HTTPContentType, path: string) => Pick<PlatformClientCallOptions, "accessToken" | "method" | "contentType" | "url" | "origin">;
|
|
131
117
|
export declare const getOrganizationIdQueryParam: (req: BaseParam) => string;
|
|
132
118
|
export declare const getAuthenticationQueryParam: (req: AuthenticationParam) => string;
|
|
119
|
+
export {};
|
|
@@ -18,11 +18,11 @@ export interface AsyncThunkCaseAssistOptions<T extends Partial<CaseAssistAppStat
|
|
|
18
18
|
/**
|
|
19
19
|
* Defines a Case Assist API response. It can represent an error or a successful response.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
type CaseAssistAPIResponse<TSuccessContent> = CaseAssistAPISuccessResponse<TSuccessContent> | CaseAssistAPIErrorResponse;
|
|
22
22
|
/**
|
|
23
23
|
* Defines a Case Assist API successful response.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
interface CaseAssistAPISuccessResponse<TContent> {
|
|
26
26
|
success: TContent;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
@@ -37,7 +37,7 @@ export interface CaseAssistAPIErrorStatusResponse {
|
|
|
37
37
|
/**
|
|
38
38
|
* Defines a Case Assist API error response.
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
interface CaseAssistAPIErrorResponse {
|
|
41
41
|
error: CaseAssistAPIErrorStatusResponse;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -72,3 +72,4 @@ export declare class CaseAssistAPIClient {
|
|
|
72
72
|
success?: undefined;
|
|
73
73
|
}>;
|
|
74
74
|
}
|
|
75
|
+
export {};
|
|
@@ -3,11 +3,11 @@ import type { BaseParam } from '../../platform-service-params.js';
|
|
|
3
3
|
export interface CaseAssistIdParam {
|
|
4
4
|
caseAssistId: string;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type CaseFields = {
|
|
7
7
|
[fieldName: string]: {
|
|
8
8
|
value: string;
|
|
9
9
|
};
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
export interface FieldsParam {
|
|
12
12
|
fields: CaseFields;
|
|
13
13
|
}
|
|
@@ -25,3 +25,4 @@ export type CaseAssistParam = BaseParam & CaseAssistIdParam;
|
|
|
25
25
|
export declare const baseCaseAssistRequest: (req: CaseAssistParam, method: HttpMethods, contentType: HTTPContentType, path: string, queryStringArguments?: Record<string, string>) => Pick<PlatformClientCallOptions, "accessToken" | "method" | "contentType" | "url" | "origin">;
|
|
26
26
|
export declare const prepareSuggestionRequestFields: (fields: CaseFields) => CaseFields;
|
|
27
27
|
export declare const prepareContextFromFields: (fields: CaseFields) => Record<string, string | string[]>;
|
|
28
|
+
export {};
|
|
@@ -5,7 +5,11 @@ export declare const buildGetCaseClassificationsRequest: (req: GetCaseClassifica
|
|
|
5
5
|
requestParams: {
|
|
6
6
|
clientId: string | undefined;
|
|
7
7
|
locale: string | undefined;
|
|
8
|
-
fields:
|
|
8
|
+
fields: {
|
|
9
|
+
[fieldName: string]: {
|
|
10
|
+
value: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
9
13
|
};
|
|
10
14
|
url: string;
|
|
11
15
|
accessToken: string;
|
|
@@ -6,7 +6,11 @@ export declare const buildGetDocumentSuggestionsRequest: (req: GetDocumentSugges
|
|
|
6
6
|
requestParams: {
|
|
7
7
|
clientId: string | undefined;
|
|
8
8
|
locale: string | undefined;
|
|
9
|
-
fields:
|
|
9
|
+
fields: {
|
|
10
|
+
[fieldName: string]: {
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
10
14
|
context: Record<string, string | string[]> | undefined;
|
|
11
15
|
analytics: {
|
|
12
16
|
actionCause?: string;
|
|
@@ -32,14 +32,14 @@ interface Badge {
|
|
|
32
32
|
label?: string;
|
|
33
33
|
color: string;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
type InsightFieldType = 'string' | 'date' | 'number' | 'multi';
|
|
36
36
|
interface Detail {
|
|
37
37
|
field: string;
|
|
38
38
|
label?: string;
|
|
39
39
|
fieldType?: InsightFieldType;
|
|
40
40
|
}
|
|
41
41
|
type ResultAction = 'attachToCase' | 'copyToClipboard' | 'quickview' | 'sendAsEmail' | 'sendToFeed';
|
|
42
|
-
|
|
42
|
+
type InsightFacetType = 'standard' | 'numeric' | 'timeframe';
|
|
43
43
|
interface InsightOption {
|
|
44
44
|
enabled: boolean;
|
|
45
45
|
}
|
|
@@ -17,15 +17,15 @@ import type { InsightUserActionsResponse } from './user-actions/user-actions-res
|
|
|
17
17
|
/**
|
|
18
18
|
* Initialization options for the `InsightAPIClient`.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
interface InsightAPIClientOptions extends HtmlAPIClientOptions {
|
|
21
21
|
logger: Logger;
|
|
22
22
|
preprocessRequest: PreprocessRequest;
|
|
23
23
|
}
|
|
24
24
|
export interface AsyncThunkInsightOptions<T extends Partial<InsightAppState>> extends AsyncThunkOptions<T, ClientThunkExtraArguments<InsightAPIClient>> {
|
|
25
25
|
rejectValue: InsightAPIErrorStatusResponse;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
type InsightAPIResponse<TSuccessContent> = InsightAPISuccessResponse<TSuccessContent> | InsightAPIErrorResponse;
|
|
28
|
+
interface InsightAPISuccessResponse<TContent> {
|
|
29
29
|
success: TContent;
|
|
30
30
|
}
|
|
31
31
|
export interface InsightAPIErrorStatusResponse {
|
|
@@ -34,7 +34,7 @@ export interface InsightAPIErrorStatusResponse {
|
|
|
34
34
|
type: string;
|
|
35
35
|
ignored?: boolean;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
interface InsightAPIErrorResponse {
|
|
38
38
|
error: InsightAPIErrorStatusResponse;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
@@ -55,3 +55,4 @@ export declare class InsightAPIClient {
|
|
|
55
55
|
success?: undefined;
|
|
56
56
|
}>;
|
|
57
57
|
}
|
|
58
|
+
export {};
|
|
@@ -6,7 +6,6 @@ export interface InsightIdParam {
|
|
|
6
6
|
}
|
|
7
7
|
export type InsightParam = BaseParam & InsightIdParam;
|
|
8
8
|
export declare const baseInsightUrl: (req: InsightParam, path?: string) => string;
|
|
9
|
-
export declare const baseInsightUserActionsUrl: (req: InsightUserActionsRequest) => string;
|
|
10
9
|
export declare const baseInsightRequest: (req: InsightParam, method: HttpMethods, contentType: HTTPContentType, path: string) => Pick<PlatformClientCallOptions, "accessToken" | "method" | "contentType" | "url" | "origin">;
|
|
11
10
|
export declare const baseInsightUserActionRequest: (req: InsightUserActionsRequest, method: HttpMethods, contentType: HTTPContentType) => Pick<PlatformClientCallOptions, "accessToken" | "method" | "contentType" | "url" | "origin">;
|
|
12
11
|
export declare const pickNonInsightParams: (req: InsightParam) => {};
|
|
@@ -21,7 +21,7 @@ export type RecommendationControllerSettings = {
|
|
|
21
21
|
*/
|
|
22
22
|
enabled?: boolean;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
interface ControllerDefinitionWithoutProps<TController extends Controller> {
|
|
25
25
|
/**
|
|
26
26
|
* Creates an instance of the given controller.
|
|
27
27
|
*
|
|
@@ -34,7 +34,7 @@ export interface ControllerDefinitionWithoutProps<TController extends Controller
|
|
|
34
34
|
export interface ControllerWithKind extends Controller {
|
|
35
35
|
_kind: Kind;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
interface ControllerDefinitionWithProps<TController extends Controller, TProps> {
|
|
38
38
|
/**
|
|
39
39
|
* Creates an instance of the given controller.
|
|
40
40
|
*
|
|
@@ -49,7 +49,7 @@ export interface EngineStaticState<TSearchAction extends UnknownAction, TControl
|
|
|
49
49
|
searchActions: TSearchAction[];
|
|
50
50
|
controllers: TControllers;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
interface SolutionTypeAvailability {
|
|
53
53
|
[SolutionType.search]?: boolean;
|
|
54
54
|
[SolutionType.listing]?: boolean;
|
|
55
55
|
[SolutionType.standalone]?: boolean;
|
|
@@ -114,7 +114,7 @@ export type EngineDefinitionControllersPropsOption<TControllers extends Controll
|
|
|
114
114
|
* recommendationEngineDefinition.fetchStaticState()
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
|
-
|
|
117
|
+
type OptionalEngineDefinitionControllersPropsOption<TControllers extends ControllerDefinitionsMap<Controller>, TControllersPropsMap extends ControllersPropsMap, TSolutionType extends SolutionType> = {
|
|
118
118
|
[K in keyof TControllers as HasKey<TControllers[K], TSolutionType> extends never ? never : HasOptionalKeys<ConditionalControllerProps<TControllers, TControllersPropsMap, TSolutionType, K>> extends false ? never : 'controllers']?: ConditionalControllerProps<TControllers, TControllersPropsMap, TSolutionType, K>;
|
|
119
119
|
};
|
|
120
120
|
/**
|
|
@@ -148,7 +148,7 @@ export type OptionalEngineDefinitionControllersPropsOption<TControllers extends
|
|
|
148
148
|
* ```
|
|
149
149
|
*
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
type RequiredEngineDefinitionControllersPropsOption<TControllers extends ControllerDefinitionsMap<Controller>, TControllersPropsMap extends ControllersPropsMap, TSolutionType extends SolutionType> = {
|
|
152
152
|
[K in keyof TControllers as HasKey<TControllers[K], TSolutionType> extends never ? never : HasRequiredKeys<ConditionalControllerProps<TControllers, TControllersPropsMap, TSolutionType, K>> extends false ? never : 'controllers']: ConditionalControllerProps<TControllers, TControllersPropsMap, TSolutionType, K>;
|
|
153
153
|
};
|
|
154
154
|
type IsRecommendationController<TController extends ControllerDefinition<Controller>> = HasKey<TController, typeof recommendationInternalOptionKey>;
|
|
@@ -270,18 +270,15 @@ interface ListingAndStandaloneController {
|
|
|
270
270
|
[SolutionType.standalone]: true;
|
|
271
271
|
}
|
|
272
272
|
export type SearchOnlyControllerDefinitionWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & SearchOnlyController;
|
|
273
|
-
|
|
273
|
+
type SearchOnlyControllerDefinitionWithProps<TController extends Controller, TProps> = ControllerDefinitionWithProps<TController, TProps> & SearchOnlyController;
|
|
274
274
|
export type ListingAndStandaloneControllerWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & ListingAndStandaloneController;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
export type RecommendationOnlyControllerDefinitionWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & RecommendationOnlyController;
|
|
275
|
+
type ListingOnlyControllerDefinitionWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & ListingOnlyController;
|
|
276
|
+
type ListingOnlyControllerDefinitionWithProps<TController extends Controller, TProps> = ControllerDefinitionWithProps<TController, TProps> & ListingOnlyController;
|
|
278
277
|
export type RecommendationOnlyControllerDefinitionWithProps<TController extends Controller, TProps> = ControllerDefinitionWithProps<TController, TProps> & RecommendationOnlyController;
|
|
279
278
|
export type NonRecommendationControllerDefinitionWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & NonRecommendationController;
|
|
280
|
-
export type NonRecommendationControllerDefinitionWithProps<TController extends Controller, TProps> = ControllerDefinitionWithProps<TController, TProps> & NonRecommendationController;
|
|
281
|
-
export type UniversalControllerDefinitionWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & UniversalController;
|
|
282
279
|
export type UniversalControllerDefinitionWithProps<TController extends Controller, TProps> = ControllerDefinitionWithProps<TController, TProps> & UniversalController;
|
|
283
280
|
export type SearchAndListingControllerDefinitionWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & SearchAndListingController;
|
|
284
|
-
|
|
281
|
+
type SearchAndListingControllerDefinitionWithProps<TController extends Controller, TProps> = ControllerDefinitionWithProps<TController, TProps> & SearchAndListingController;
|
|
285
282
|
export type SubControllerDefinitionWithoutProps<TController extends Controller, TDefinition extends ControllerDefinitionOption | undefined> = TDefinition extends {
|
|
286
283
|
listing?: true;
|
|
287
284
|
search?: true;
|
|
@@ -60,17 +60,17 @@ export type InferBuildResult<T extends {
|
|
|
60
60
|
}> = Awaited<ReturnType<T['build']>>;
|
|
61
61
|
export type CommerceControllerDefinitionsMap = ControllerDefinitionsMap<Controller>;
|
|
62
62
|
type Definition<TControllerDefinitions extends CommerceControllerDefinitionsMap> = CommerceEngineDefinition<TControllerDefinitions, SolutionType>;
|
|
63
|
-
|
|
63
|
+
type BuildFunction<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Definition<TControllerDefinitions>['build'];
|
|
64
64
|
export type FetchStaticStateFunction<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Definition<TControllerDefinitions>['fetchStaticState'];
|
|
65
65
|
export type HydrateStaticStateFunction<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Definition<TControllerDefinitions>['hydrateStaticState'];
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
type FetchStaticStateFromBuildResultFunction<TControllerDefinitions extends CommerceControllerDefinitionsMap> = FetchStaticStateFunction<TControllerDefinitions>['fromBuildResult'];
|
|
67
|
+
type HydrateStaticStateFromBuildResultFunction<TControllerDefinitions extends CommerceControllerDefinitionsMap> = HydrateStaticStateFunction<TControllerDefinitions>['fromBuildResult'];
|
|
68
68
|
export type BuildParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<BuildFunction<TControllerDefinitions>>;
|
|
69
69
|
export type FetchStaticStateParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<FetchStaticStateFunction<TControllerDefinitions>>;
|
|
70
70
|
export type HydrateStaticStateParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<HydrateStaticStateFunction<TControllerDefinitions>>;
|
|
71
71
|
export type FetchStaticStateFromBuildResultParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<FetchStaticStateFromBuildResultFunction<TControllerDefinitions>>;
|
|
72
72
|
export type HydrateStaticStateFromBuildResultParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<HydrateStaticStateFromBuildResultFunction<TControllerDefinitions>>;
|
|
73
|
-
|
|
73
|
+
type Controllers<TControllerDefinitions extends CommerceControllerDefinitionsMap> = InferControllersMapFromDefinition<TControllerDefinitions, SolutionType>;
|
|
74
74
|
export type BuildResult<TControllerDefinitions extends CommerceControllerDefinitionsMap> = {
|
|
75
75
|
engine: SSRCommerceEngine;
|
|
76
76
|
controllers: Controllers<TControllerDefinitions>;
|