UNPKG

@empathyco/x-components

Version:
19 lines 1.11 kB
import type { Dictionary } from '@empathyco/x-utils'; import type { QueryPreviewInfo, QueryPreviewItem } from '../store/index'; /** * Creates a query hash to store a QueryPreview, so the same query * with different filters and extra params can be saved more than once in the state. * * @param queryPreview - The {@link QueryPreviewItem | QueryPreviewItem} 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) => 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 extraParams - The extra params 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, extraParams: Dictionary<unknown>) => string; //# sourceMappingURL=get-hash-from-query-preview.d.ts.map