import type { Logger } from 'pino';
import type { CommerceThunkExtraArguments } from '../../app/commerce-thunk-extra-arguments.js';
import type { CommerceAppState } from '../../state/commerce-app-state.js';
import type { PlatformEnvironment } from '../../utils/url-utils.js';
import type { PreprocessRequest } from '../preprocess-request.js';
import type { SpecificFacetSearchResponse } from '../search/facet-search/specific-facet-search/specific-facet-search-response.js';
import type { CommerceAPIErrorResponse, CommerceAPIErrorStatusResponse } from './commerce-api-error-response.js';
import { type FilterableCommerceAPIRequest } from './common/request.js';
import type { CommerceSuccessResponse } from './common/response.js';
import type { CommerceFacetSearchRequest, FacetSearchType } from './facet-search/facet-search-request.js';
import { type CommerceRecommendationsRequest } from './recommendations/recommendations-request.js';
import type { RecommendationsCommerceSuccessResponse } from './recommendations/recommendations-response.js';
import { type QuerySuggestRequest } from './search/query-suggest/query-suggest-request.js';
import type { QuerySuggestSuccessResponse } from './search/query-suggest/query-suggest-response.js';
import type { CommerceSearchRequest } from './search/request.js';
import type { SearchCommerceSuccessResponse } from './search/response.js';
export interface CommerceFacetSearchAPIClient {
    facetSearch(req: CommerceFacetSearchRequest, facetSearchOrigin: string): Promise<CommerceAPIResponse<SpecificFacetSearchResponse>>;
}
export interface AsyncThunkCommerceOptions<T extends Partial<CommerceAppState>> {
    state: T;
    rejectValue: CommerceAPIErrorStatusResponse;
    extra: CommerceThunkExtraArguments;
}
export interface CommerceAPIClientOptions {
    logger: Logger;
    preprocessRequest: PreprocessRequest;
}
export type CommerceAPIResponse<T> = CommerceAPISuccessResponse<T> | CommerceAPIErrorResponse;
interface CommerceAPISuccessResponse<T> {
    success: T;
}
export declare const isErrorResponse: <T>(r: CommerceAPIResponse<T>) => r is CommerceAPIErrorResponse;
export declare class CommerceAPIClient implements CommerceFacetSearchAPIClient {
    private options;
    constructor(options: CommerceAPIClientOptions);
    getProductListing(req: FilterableCommerceAPIRequest): Promise<CommerceAPIResponse<CommerceSuccessResponse>>;
    search(req: CommerceSearchRequest): Promise<CommerceAPIResponse<SearchCommerceSuccessResponse>>;
    getRecommendations(req: CommerceRecommendationsRequest): Promise<CommerceAPIResponse<RecommendationsCommerceSuccessResponse>>;
    productSuggestions(req: CommerceSearchRequest): Promise<CommerceAPIResponse<SearchCommerceSuccessResponse>>;
    querySuggest(req: QuerySuggestRequest): Promise<CommerceAPIResponse<QuerySuggestSuccessResponse>>;
    facetSearch(req: CommerceFacetSearchRequest, type: FacetSearchType): Promise<CommerceAPIResponse<SpecificFacetSearchResponse>>;
    plan(req: CommerceSearchRequest): Promise<CommerceAPIResponse<CommerceSuccessResponse>>;
    private query;
}
export declare function getCommerceApiBaseUrl(organizationId: string, environment?: PlatformEnvironment): string;
export {};
