1import { z } from "zod"; 2 3/** 4 * The cached column-metadata entry shape (TASK-0135). Defined in its own 5 * module — imported by BOTH `database.service.ts` (`listProperties`) and 6 * `query.service.ts` (record-open) — because those two already import each 7 * other (circular): a third module keeps the shared cache key 8 * `perf:metadata:{db}:properties` validated with the SAME schema on both 9 * read paths, so neither path can write an entry the other rejects (a 10 * rejected entry = a cache miss on every cross read). 11 */ 12export const PROPERTY_CACHE = z.object({ 13 id: z.string(), 14 databaseId: z.string(), 15 name: z.string(), 16 type: z.string(), 17 position: z.string(), 18 isTitle: z.boolean(), 19 isVisible: z.boolean(), 20 required: z.boolean(), 21 config: z.unknown(), 22 default: z.unknown().nullable(), 23 deletedAt: z.string().nullable(), 24 createdAt: z.string(), 25 updatedAt: z.string() 26}); 27