import type { AsyncThunkAction, PayloadAction } from '@reduxjs/toolkit'; import type { AsyncThunkCommerceOptions } from '../../../api/commerce/commerce-api-client.js'; import type { CommerceEngine } from '../../../app/commerce-engine/commerce-engine.js'; import { type FetchSearchPayload, type PrepareForSearchWithQueryPayload, type PromoteChildToParentPayload, type QuerySearchCommerceAPIThunkReturn } from './search-actions.js'; import type { StateNeededByExecuteSearch } from './search-actions-thunk-processor.js'; export type { FetchSearchPayload, PrepareForSearchWithQueryPayload }; /** * The search action creators. * * @group Actions * @category Search */ export interface SearchActionCreators { /** * Executes a search query. * * @param payload - The action creator payload. * @returns A dispatchable action. */ executeSearch(payload?: FetchSearchPayload): AsyncThunkAction>; /** * Fetches and additional page of products and appends it to the current list. * * @param payload - The action creator payload. * @returns A dispatchable action. */ fetchMoreProducts(payload?: FetchSearchPayload): AsyncThunkAction>; /** * Updates the query, resets the pagination, and optionally clears all facets in preparation for a new search query. * * @param payload - The action creator payload. * @returns A dispatchable action. */ prepareForSearchWithQuery(payload: PrepareForSearchWithQueryPayload): AsyncThunkAction>; /** * Promotes a child product to a parent product. * * @param payload - The action creator payload. * @returns A dispatchable action. */ promoteChildToParent(payload: PromoteChildToParentPayload): PayloadAction; } /** * Loads the commerce search reducer and returns the available search action creators. * * @param engine - The headless commerce engine. * @returns An object holding the search action creators. * * @group Actions * @category Search */ export declare function loadSearchActions(engine: CommerceEngine): SearchActionCreators;