/** * Prefix for react-query keys. */ export declare const QUERY_KEY_PREFIX = "zenstack"; export type QueryKey = [ string, string, string, unknown, { infinite: boolean; optimisticUpdate: boolean; } ]; /** * Computes query key for the given model, operation and query args. * @param model Model name. * @param operation Query operation (e.g, `findMany`) or request URL. If it's a URL, the last path segment will be used as the operation name. * @param args Query arguments. * @param options Query options, including `infinite` indicating if it's an infinite query (defaults to false), and `optimisticUpdate` indicating if optimistic updates are enabled (defaults to true). * @returns Query key */ export declare function getQueryKey(model: string, operation: string, args: unknown, options?: { infinite: boolean; optimisticUpdate: boolean; }): QueryKey; /** * Parses the given query key into its components. */ export declare function parseQueryKey(queryKey: readonly unknown[]): { model: string; operation: string; args: unknown; flags: { infinite: boolean; optimisticUpdate: boolean; }; } | undefined; export declare function isZenStackQueryKey(queryKey: readonly unknown[]): queryKey is QueryKey;