/** * A function that wraps a query function, returning a decorated version. * Used to inject logging, caching, profiling, etc. into all queries globally. * * @param queryName - The name of the query property (e.g. "queryEVaultInfoFull") * @param fn - The original query function * @returns A wrapped version of the query function */ export interface BuildQueryContext { /** * Returns a deterministic cache key, or `null` when this invocation must run * without caching. Custom builders must preserve `null` as a no-cache signal. */ getCacheKey: (args: unknown[]) => string | null; } export type BuildQueryFn = Promise>(queryName: string, fn: T, target: object, context?: BuildQueryContext) => T; export interface QueryCacheConfig { enabled?: boolean; ttlMs?: number; failureTtlMs?: number; } export declare function normalizeQueryKeyValue(value: unknown): unknown; export declare function normalizeQueryKeySet(value: unknown[]): unknown[]; export declare function normalizeQueryKeyObjectSets(value: object): object; export declare function serializeQueryArgs(args: unknown[]): string | null; export declare function getEulerSdkQueryKey(_queryName: string, args: unknown[]): string | null; export declare function createQueryCacheBuildQuery(config?: QueryCacheConfig): BuildQueryFn; /** * Applies a buildQuery decorator to all `query*` properties on a target object. * Call this at the end of a constructor to decorate all queries. */ export declare function applyBuildQuery(target: object, buildQuery: BuildQueryFn): void; //# sourceMappingURL=buildQuery.d.ts.map