/** * Typed HTTP wrappers for the form-caches backend API. * * Mirrors Architecture §9.5. `createFormCacheApi` receives the consumer's * httpClient so auth headers and base URL are fully controlled by the caller. */ import type { HttpClient, FormCacheDTO } from './FormCacheSelector.types'; /** * TanStack Query key factory for form-cache resources. * * Always invoke `formCacheKeys.all(cacheId)` instead of hardcoding the key * tuple in components — it keeps invalidation calls in sync. */ export declare const formCacheKeys: { all: (cacheId: string) => readonly ["form-caches", string]; }; export declare function createFormCacheApi(client: HttpClient): { /** * List all form-cache entries for the given `cacheId` and the current user. * * `cacheId` is URL-encoded so it can safely contain `/`, `?`, `#`, etc. */ getAllByUser: (cacheId: string) => Promise; /** * Fetch a single entry by id. Returns `unknown` because the persisted JSON * shape depends on `TFilter` and is validated by `safeParse` at the call site. */ getById: (id: string) => Promise; upsert: (payload: { cacheId: string; name: string; filter: unknown; }) => Promise<{ id: string; }>; updateLastInUse: (id: string) => Promise; delete: (id: string) => Promise; rename: (id: string, newName: string) => Promise; }; export type FormCacheApi = ReturnType; //# sourceMappingURL=FormCacheSelector.api.d.ts.map