@empathyco/x-components
Version:
Empathy X Components
19 lines • 1.07 kB
TypeScript
import type { QueryPreviewInfo, QueryPreviewItem } from '../store/index';
/**
* Creates a query hash to store a QueryPreview, so the same query
* with different filters can be saved more than once in the state.
*
* @param queryPreview - The {@link QueryPreviewItem | QueryPreviewItem} used in the request.
* @param lang - The language used in the request.
* @returns A unique id that will be used as a key to store the QueryPreviewItem in the state.
*/
export declare const getHashFromQueryPreviewItem: (queryPreview: QueryPreviewItem, lang: string) => string;
/**
* Creates a query hash to check if a QueryPreview has already been saved in the state.
*
* @param queryPreviewInfo - The {@link QueryPreviewInfo | QueryPreviewInfo} of a QueryPreview.
* @param lang - The language used in the request.
* @returns A unique id that will be used as a key to check the QueryPreview in the state.
*/
export declare const getHashFromQueryPreviewInfo: (queryPreviewInfo: QueryPreviewInfo, lang: string) => string;
//# sourceMappingURL=get-hash-from-query-preview.d.ts.map