/** * Use TypeScript to enforce 'camox' as the first query key to ensure they're all namespaced. * This is because the Tanstack Query client on the frontend may be shared with the user's routes, * so we ensure there won't be any key collisions. */ export type QueryKey = [first: "camox", ...rest: Array]; /** * Source axis on read query keys. `'live'` reads the page's live published * checkpoint snapshot; `'draft'` reads the live editor rows. The two render * through the same component — only the cache slot differs, so toggling the * source select is instant once both have been seeded. * * Block / page-read query keys include the source as the trailing key segment. * Omitting it on `invalidateQueries` is a prefix invalidation that hits every * source — used for navigation events and other source-agnostic invalidations. * Edit-time invalidations (which only touch draft data) pass `'draft'` * explicitly so the `'live'` cache stays untouched. */ export type ReadSource = "draft" | "live"; export declare const queryKeys: { pages: { list: ["camox", string, string]; getByPath: (path: string, source?: ReadSource) => ["camox", string, string, string] | ["camox", string, string, string, ReadSource]; getByPathAll: ["camox", string, string]; getById: (id: number) => ["camox", string, string, number]; }; files: { list: ["camox", string, string]; get: (id: number) => ["camox", string, string, number]; }; blocks: { get: (id: number, source?: ReadSource) => ["camox", string, string, number] | ["camox", string, string, number, ReadSource]; getUsageCounts: ["camox", string, string]; getPageMarkdown: (pageId: number) => ["camox", string, string, number]; }; repeatableItems: { get: (id: number) => ["camox", string, string, number]; }; layouts: { all: ["camox", string]; }; environments: { all: ["camox", string]; checkCompatibility: ["camox", string, string]; }; }; export type InvalidationMessage = { type: "invalidate"; targets: QueryKey[]; };