import type { MetaObject, MetaRoot } from "@metaobjectsdev/metadata"; /** One documented field in a model / payload shape. Structured so BOTH renderers * (the human field table + the agent inline shape) format it without re-deriving. */ export interface FieldShape { /** The field name (the property key). */ name: string; /** The TS type expression, e.g. `string`, `number`, `"active" | "archived"`, * `Address[]`. Enum unions are inlined (self-contained for an agent). */ type: string; /** Whether the property is optional in this shape (`name?: T`). */ optional: boolean; /** A short note, e.g. `pinned "Bridge"` (TPH discriminator) or `server-set` * (@autoSet). Undefined when there is nothing extra to say. */ note?: string; } /** * The entity MODEL field shape — every field, with the value-object interface's * TS type and the docs nullable rule (optional iff not required and not the PK). * Mirrors `InferSelectModel` field-presence; the PK is reported required. */ export declare function modelFieldShapes(obj: MetaObject): FieldShape[]; /** The create-payload (InsertSchema) field shape — what `create` / POST * accepts. */ export declare function createFieldShapes(obj: MetaObject): FieldShape[]; /** The update-payload (UpdateSchema) field shape — what `update` / PATCH * accepts (typically all-optional partial). */ export declare function updateFieldShapes(obj: MetaObject): FieldShape[]; /** * The extractor PAYLOAD field shape — the field interface of the value object * `extract` returns (the `@payloadRef` target). Same `fieldTsTypeString` * mapping + `isFieldRequired` optionality the VO interface emitter uses, so it * matches the emitted payload type. Returns undefined when the ref does not * resolve to a loaded object. */ export declare function payloadFieldShapes(root: MetaRoot, payloadRef: string): FieldShape[] | undefined; /** Format a list of field shapes as a compact inline TS object type, e.g. * `{ name: string; status?: "active" | "archived" }`. Empty list → `{}`. */ export declare function inlineShape(fields: FieldShape[]): string; //# sourceMappingURL=api-field-shape.d.ts.map