import type { UnknownAction } from '@reduxjs/toolkit'; import type { ThunkDispatch } from 'redux-thunk'; import { type CommerceAPIClient, type CommerceAPIResponse } from '../../../api/commerce/commerce-api-client.js'; import type { CommerceAPIErrorStatusResponse } from '../../../api/commerce/commerce-api-error-response.js'; import type { FilterableCommerceAPIRequest } from '../../../api/commerce/common/request.js'; import type { CommerceSearchRequest } from '../../../api/commerce/search/request.js'; import type { SearchCommerceSuccessResponse } from '../../../api/commerce/search/response.js'; import type { ClientThunkExtraArguments } from '../../../app/thunk-extra-arguments.js'; import type { CommerceDidYouMeanSection, CommerceQuerySection, CommerceSearchSection, TriggerSection } from '../../../state/state-sections.js'; import { type StateNeededForFilterableCommerceAPIRequest } from '../common/filterable-commerce-api-request-builder.js'; import type { QuerySearchCommerceAPIThunkReturn } from './search-actions.js'; interface FetchedResponse { response: CommerceAPIResponse; duration: number; queryExecuted: string; requestExecuted: FilterableCommerceAPIRequest; enableResults?: boolean; } export type StateNeededByExecuteSearch = StateNeededForFilterableCommerceAPIRequest & CommerceSearchSection & CommerceQuerySection & CommerceDidYouMeanSection & TriggerSection; export interface AsyncThunkConfig { getState: () => StateNeededByExecuteSearch; dispatch: ThunkDispatch & { apiClient?: CommerceAPIClient | undefined; }, UnknownAction>; rejectWithValue: (err: CommerceAPIErrorStatusResponse) => unknown; extra: ClientThunkExtraArguments; } type ValidReturnTypeFromProcessingStep = QuerySearchCommerceAPIThunkReturn | RejectionType; export declare class AsyncSearchThunkProcessor { private config; constructor(config: AsyncThunkConfig); process(fetched: FetchedResponse): Promise>; fetchFromAPI(request: FilterableCommerceAPIRequest | CommerceSearchRequest): Promise<{ response: CommerceAPIResponse; duration: number; queryExecuted: string; requestExecuted: FilterableCommerceAPIRequest | CommerceSearchRequest; enableResults: boolean; }>; private processSuccessResponse; private processQueryErrorOrContinue; private processQueryCorrectionsOrContinue; private processQueryTriggersOrContinue; private automaticallyRetryQueryWithTriggerModification; private get dispatch(); private get rejectWithValue(); private getState; private get navigatorContext(); private getCurrentQuery; private getSuccessResponse; private get extra(); private onUpdateQueryForCorrection; } export {};