import { DateRangeRequest, NumericRangeRequest } from '../../../controllers/commerce/core/facets/headless-core-commerce-facet.js';
import { FacetValueSearchParam, SearchParamValue as CommerceSearchParamValue } from '../../search-parameters/search-parameter-utils.js';
import { CommerceSearchParameters } from '../search-parameters/search-parameters-actions.js';
import { SortCriterion } from '../sort/sort.js';
import { FacetParameters } from './parameters-serializer.js';
type CommerceSearchParametersKey = keyof CommerceSearchParameters;
type CommerceSearchParamPair<T> = [CommerceSearchParametersKey, T];
type RangeFacetValueSearchParam = Record<string, DateRangeRequest[] | NumericRangeRequest[]>;
export declare function buildParameterSerializer(): {
    deserialize: typeof deserialize;
    serialize: typeof serialize;
};
/**
 * Converts URLSearchParams or a record of commerce search parameters into a {@link CommerceSearchParameters} object.
 *
 * @param urlCommerceSearchParams - The URLSearchParams or record of commerce search parameters.
 * @returns The converted CommerceSearchParameters object.
 */
declare function deserialize(urlCommerceSearchParams: URLSearchParams | Record<string, CommerceSearchParamValue>): CommerceSearchParameters;
/**
 * Serializes the commerce search parameters to the provided URL.
 *
 * @param commerceSearchParameters - The commerce search parameters to be serialized.
 * @param initialUrl - The initial URL to which the commerce search parameters will be added.
 * @returns The serialized URL.
 */
declare function serialize(commerceSearchParameters: CommerceSearchParameters, initialUrl: URL): string;
export declare function isValidKey(key: string): key is CommerceSearchParametersKey;
export declare function isValidBasicKey(key: string): key is Exclude<CommerceSearchParametersKey, keyof FacetParameters>;
/**
 * Extends the search parameters with the given key-value pair. If the key-value pair is not valid or if the value is undefined, the search parameters are not modified.
 * @param commerceSearchParams - The search parameters object to extend.
 * @param key - The key of the search parameter.
 * @param value - The value of the search parameter.
 */
export declare function extendSearchParams(commerceSearchParams: Record<string, unknown>, key: string, value: CommerceSearchParamValue): void;
export declare function cast<K extends CommerceSearchParametersKey>(pair: [K, string], decode?: boolean): [K, unknown];
export declare function isValidSearchParam(key: string): boolean;
export declare function isSortPair(pair: [CommerceSearchParametersKey, unknown]): pair is CommerceSearchParamPair<SortCriterion>;
export declare function isFacetPair(pair: [CommerceSearchParametersKey, unknown]): pair is CommerceSearchParamPair<FacetValueSearchParam>;
export declare function isRangeFacetPair(pair: [CommerceSearchParametersKey, unknown]): pair is CommerceSearchParamPair<RangeFacetValueSearchParam>;
export declare function isRangeFacetObject(obj: unknown): obj is Record<string, (DateRangeRequest | NumericRangeRequest)[]>;
export declare function addFacetValuesToSearchParams(facetId: string, paramKey: CommerceSearchParametersKey): (searchParams: Record<string, unknown>, valueArray: unknown[]) => void;
export {};
