import type { SchemaDefinition } from '@coveo/bueno'; import type { UnknownAction } from '@reduxjs/toolkit'; import type { CommerceAPIErrorStatusResponse } from '../../../../api/commerce/commerce-api-error-response.js'; import type { FacetSearchType } from '../../../../api/commerce/facet-search/facet-search-request.js'; import type { CommerceEngine, CommerceEngineState } from '../../../../app/commerce-engine/commerce-engine.js'; import type { stateKey } from '../../../../app/state-key.js'; import type { AnyFacetResponse } from '../../../../features/commerce/facets/facet-set/interfaces/response.js'; import type { Parameters } from '../../../../features/commerce/parameters/parameters-actions.js'; import type { Serializer } from '../../../../features/commerce/parameters/parameters-serializer.js'; import type { ProductListingParameters } from '../../../../features/commerce/product-listing-parameters/product-listing-parameters-actions.js'; import type { CommerceSearchParameters } from '../../../../features/commerce/search-parameters/search-parameters-actions.js'; import type { ProductListingSummaryState } from '../../product-listing/summary/headless-product-listing-summary.js'; import { type DidYouMean } from '../../search/did-you-mean/headless-did-you-mean.js'; import type { SearchSummaryState } from '../../search/summary/headless-search-summary.js'; import { type BreadcrumbManager } from '../breadcrumb-manager/headless-core-breadcrumb-manager.js'; import type { FetchProductsActionCreator } from '../common.js'; import { type FacetGenerator } from '../facets/generator/headless-commerce-facet-generator.js'; import { type InteractiveProduct, type InteractiveProductProps } from '../interactive-product/headless-core-interactive-product.js'; import { type InteractiveSpotlightContent, type InteractiveSpotlightContentProps } from '../interactive-spotlight-content/headless-core-interactive-spotlight-content.js'; import { type Pagination, type PaginationProps } from '../pagination/headless-core-commerce-pagination.js'; import { type ParameterManager, type ParameterManagerProps } from '../parameter-manager/headless-core-parameter-manager.js'; import { type Sort, type SortProps } from '../sort/headless-core-commerce-sort.js'; import { type Summary, type SummaryState } from '../summary/headless-core-summary.js'; import { type UrlManager, type UrlManagerProps } from '../url-manager/headless-core-url-manager.js'; export interface BaseSolutionTypeSubControllers { /** * Creates an `InteractiveProduct` sub-controller. * @param props - The properties for the `InteractiveProduct` sub-controller. * @returns An `InteractiveProduct` sub-controller. */ interactiveProduct(props: InteractiveProductProps): InteractiveProduct; /** * Creates a `Pagination` sub-controller. * @param props - The optional properties for the `Pagination` sub-controller. * @returns A `Pagination` sub-controller. */ pagination(props?: PaginationProps): Pagination; /** * Creates a `Summary` sub-controller. * @returns A `Summary` sub-controller. */ summary(): Summary; } export interface SearchAndListingSubControllers

extends BaseSolutionTypeSubControllers { /** * Creates a `Sort` sub-controller. * @param props - Optional properties for the `Sort` sub-controller. * @returns A `Sort` sub-controller. */ sort(props?: SortProps): Sort; /** * Creates a `FacetGenerator` sub-controller. * @returns A `FacetGenerator` sub-controller. */ facetGenerator(): FacetGenerator; /** * Creates a `BreadcrumbManager` sub-controller. * @returns A `BreadcrumbManager` sub-controller. */ breadcrumbManager(): BreadcrumbManager; /** * Creates a `UrlManager` sub-controller with the specified properties. * @param props - Properties for the `UrlManager` sub-controller. * @returns A `UrlManager` sub-controller. */ urlManager(props: UrlManagerProps): UrlManager; /** * Creates a `ParameterManager` sub-controller with the specified properties. * @param props - Properties for the `ParameterManager` sub-controller. * @returns A `ParameterManager` sub-controller. */ parameterManager(props?: ParameterManagerProps

): ParameterManager

; /** * Creates an `InteractiveSpotlightContent` sub-controller, for use when `enableResults` is set on the controller. * @param props - The properties for the `InteractiveSpotlightContent` sub-controller. * @returns An `InteractiveSpotlightContent` sub-controller. */ interactiveSpotlightContent(props: InteractiveSpotlightContentProps): InteractiveSpotlightContent; } export interface SearchSubControllers extends SearchAndListingSubControllers { /** * Creates a `DidYouMean` sub-controller. * @returns A `DidYouMean` sub-controller. */ didYouMean(): DidYouMean; } interface BaseSubControllerProps { responseIdSelector: (state: CommerceEngineState) => string; isLoadingSelector: (state: CommerceEngineState) => boolean; numberOfProductsSelector: (state: CommerceEngineState) => number; errorSelector: (state: CommerceEngineState) => CommerceAPIErrorStatusResponse | null; pageSelector: (state: CommerceEngineState) => number; perPageSelector: (state: CommerceEngineState) => number; totalEntriesSelector: (state: CommerceEngineState) => number; fetchProductsActionCreator: FetchProductsActionCreator; fetchMoreProductsActionCreator: FetchProductsActionCreator; enrichSummary?: (state: CommerceEngineState) => Partial; slotId?: string; } export interface SearchAndListingSubControllerProps

extends BaseSubControllerProps { facetResponseSelector: (state: CommerceEngine[typeof stateKey], facetId: string) => AnyFacetResponse | undefined; isFacetLoadingResponseSelector: (state: CommerceEngine[typeof stateKey]) => boolean; requestIdSelector: (state: CommerceEngine[typeof stateKey]) => string; serializer: Serializer

; parametersDefinition: SchemaDefinition>; activeParametersSelector: (state: CommerceEngine[typeof stateKey]) => P; restoreActionCreator: (parameters: P) => UnknownAction; facetSearchType: FacetSearchType; } /** * Builds the sub-controllers for the commerce search use case. * * @param engine - The commerce engine. * @param subControllerProps - The properties for the search sub-controllers. * @returns The search sub-controllers. */ export declare function buildSearchSubControllers(engine: CommerceEngine, subControllerProps: Omit, 'facetSearchType'>): SearchSubControllers; /** * Builds the sub-controllers for the commerce product listing use case. * * @param engine - The commerce engine. * @param subControllerProps - The properties for the listing sub-controllers. * @returns The product listing sub-controllers. */ export declare function buildProductListingSubControllers(engine: CommerceEngine, subControllerProps: Omit, 'facetSearchType'>): SearchAndListingSubControllers; /** * Builds the sub-controllers for the commerce search and product listing use cases. * * @param engine - The commerce engine. * @param subControllerProps - The properties for the search and product listing sub-controllers. * @returns The search and product listing sub-controllers. */ export declare function buildSearchAndListingsSubControllers

(engine: CommerceEngine, subControllerProps: SearchAndListingSubControllerProps): SearchAndListingSubControllers; /** * Builds the `InteractiveProduct` and `Pagination` sub-controllers for a commerce engine. * @param engine - The commerce engine. * @param subControllerProps - The properties for the `InteractiveProduct` and `Pagination` sub-controllers. * @returns The `InteractiveProduct` and `Pagination` sub-controllers. */ export declare function buildBaseSubControllers(engine: CommerceEngine, subControllerProps: BaseSubControllerProps): BaseSolutionTypeSubControllers; export {};