/** * Build a `FormDefinition` from a Zod schema. * * The Python SDK has `extract_form()` driven by Pydantic; the server * uses `form_definition` to decide things like whether the email * channel emits Approve/Reject magic-link buttons or just a "Review * in dashboard" link-out (single Switch primitive → buttons; anything * else → link-out). * * Without this synthesis, every TS-created task got the link-out * fallback, even for the simple `z.object({ approved: z.boolean() })` * case where the magic-link path is the obvious DX win. * * Coverage today: boolean (Switch), string (ShortText / LongText), * number (ShortText), enum (SingleSelect). Enough for the email * magic-link path, which only fires for a single Switch or a small * SingleSelect anyway. The other 23 server primitives require * explicit `Annotated` decoration on Pydantic — Zod has no equivalent * affordance, so the long tail is intentionally left to a future * explicit-DSL escape hatch. * * Returns `null` when the schema isn't a `ZodObject`. Caller should * treat null as "no form_definition" and let the server / dashboard * fall back to JSON-schema rendering. */ import type { ZodType } from "zod"; import type { FormDefinition } from "./definition.js"; export declare function extractForm(schema: ZodType): FormDefinition | null; //# sourceMappingURL=extract.d.ts.map