import type { DynamicFieldOption, DynamicFieldType } from "./field.js"; export type DomainScalar = "ID" | "String" | "Int" | "Float" | "Boolean" | "Enum" | "Money"; /** The widget a domain field renders as — the same union as DynamicFieldType. */ export type DomainWidget = DynamicFieldType; export type DomainFieldConstraint = { min?: number; max?: number; minLength?: number; maxLength?: number; pattern?: string; }; export type DomainFieldDefinition = { name: TName; label: string; scalar: DomainScalar; /** The SDL type as written, e.g. "String!" or "ProjectStatus!". */ graphqlType: string; required: boolean; widget: DomainWidget; constraints?: DomainFieldConstraint; placeholder?: string; description?: string; section?: string; order: number; /** Set when scalar === "Enum": the GraphQL enum type name. */ enumName?: string; /** Set when scalar === "Enum": the generated options export to render. */ optionsKey?: string; }; export type CreateInputDefinition = { name: string; graphqlInputName: string; formId: string; formKey: string; title: string; fields: readonly DomainFieldDefinition[]; }; export type EntityDefinition = { name: string; graphqlTypeName: string; detailId: string; title: string; /** Detail-visible fields: every entity field except `id` and any @detail(hidden: true). */ fields: readonly DomainFieldDefinition[]; }; export type DomainDefinition = { name: string; entity: EntityDefinition; createInput: CreateInputDefinition; }; /** Map of generated option exports, keyed by a field's `optionsKey`. */ export type DomainOptionsMap = Record; //# sourceMappingURL=domain.d.ts.map