A Wabery flow is data, not code — there is no runtime flow() engine. You
describe a FlowDraft (screens + typed fields + navigation) and Wabery compiles
it to Meta WhatsApp Flow JSON, handles the encryption handshake, and validates
submissions for you. These builders are thin, pure helpers that return a typed
FlowDraft with less boilerplate than a raw object literal.
Prefer to hand-author canonical Meta Flow JSON instead? Use MetaFlowJson
with a flow's flow_json field and Wabery stores it as-is.
NOTE: The FlowDraft / DraftField / DraftScreen shapes below are the public
mirror of the server compiler's input types in
apps/web/src/lib/flows/compile-flow-json.ts. Keep the two in sync.
Flow authoring types and builders.
A Wabery flow is data, not code — there is no runtime
flow()engine. You describe aFlowDraft(screens + typed fields + navigation) and Wabery compiles it to Meta WhatsApp Flow JSON, handles the encryption handshake, and validates submissions for you. These builders are thin, pure helpers that return a typedFlowDraftwith less boilerplate than a raw object literal.Prefer to hand-author canonical Meta Flow JSON instead? Use MetaFlowJson with a flow's
flow_jsonfield and Wabery stores it as-is.NOTE: The
FlowDraft/DraftField/DraftScreenshapes below are the public mirror of the server compiler's input types inapps/web/src/lib/flows/compile-flow-json.ts. Keep the two in sync.