import type { DynamicFieldSchema, TypedDynamicFieldSchema, TypedDetailFieldSchema } from "./field.js"; export type FormSection = { key: string; title: string; description?: string; /** Field columns within this section (overrides the component default). */ columns?: 1 | 2 | 3; }; export type RegistrationSchema = { id: string; key: string; name: string; description?: string; isDefault?: boolean; sections?: FormSection[]; fields: DynamicFieldSchema[]; }; /** * Structural validator a form may carry to validate its input. Zod's `ZodType` * satisfies this (its `safeParse` returns `{ success: boolean; ... }`), so apps can * pass a real Zod schema while this package keeps zero dependency on Zod. */ export type ValidatorLike = { safeParse(value: unknown): { success: true; data: T; } | { success: false; }; }; /** A form schema whose field `name`s/`type`s are checked against the input type T. */ export type TypedRegistrationSchema> = Omit & { /** A directive-aware validator for this input (the single validation source). */ inputSchema?: ValidatorLike; fields: readonly TypedDynamicFieldSchema[]; }; export type TypedDetailSchema> = { id: string; name: string; sections?: FormSection[]; fields: readonly TypedDetailFieldSchema[]; }; export type OrgFormSchemasResponse = { organizationId: string; schemas: RegistrationSchema[]; }; //# sourceMappingURL=form.d.ts.map