import { SchemaBase } from './dsl.js'; // Prototype definitions: high-level design of a page. A prototype lists only // the fields a page needs — no types, no bindings to apps/APIs/tables. Field // details (DTO/table definitions) are written separately and connected later. /** Display metadata for a prototype field. */ export interface PrototypeFieldMeta { label: string; description?: string; } export interface PrototypeSchema extends SchemaBase { /** Field requirements: key is the field name, value is display metadata. */ fields: Record; } /** * Defines a page prototype. The field keys become the names referenced by * later DTO/table definitions; here they only carry label/description. */ export function definePrototype( name: string, schema: { description?: string; fields: Record; }, ): PrototypeSchema { return { name, ...schema }; }