//#region src/modules/dynamic-forms/types.d.ts /** * Input types supported by dynamic form questions. * `inputType` on `Question` is optional so unknown future API values degrade * gracefully to the text fallback rather than requiring this union to be widened. */ type InputType = 'TEXT' | 'DATE' | 'COUNTRY' | 'NATIONALITY' | 'NUMBER' | 'EMAIL' | 'PHONE' | 'CPF' | 'NAME' | 'YESNO' | 'SELECT' | 'MULTISELECT'; /** * A single question within a dynamic form screen. */ type Question = { questionId: string; /** Display label shown to the user */ question: string; inputType?: InputType; /** Fallback type used when `inputType` is absent */ overrides?: InputType; isPredefined?: boolean; isOptional?: boolean; options?: string[]; /** * Form Pre-fill: the interview attribute this question is prefilled from * (`null`/absent = not prefilled). Non-null opts the form into the one-shot * prefill fetch. Distinct from `DynamicFormsConfig.prefillValue` (the * single-question login-hint). `editable` (default true) only matters when * `prefillSource` is set. */ prefillSource?: string | null; editable?: boolean; }; /** * A single screen within the dynamic form flow. */ type Screen = { title?: string; hideTitle?: boolean; questions: Question[]; }; /** * Configuration for the dynamic forms module. * Provide either `screens` (pre-loaded) or `flowId` (fetched from API). */ type DynamicFormsConfig = { /** Flow ID used to fetch screens from the API when `screens` is not provided */ flowId?: string; /** Pre-loaded screens — skips the API fetch when provided */ screens?: Screen[]; /** * Value used to prefill the sole answer of a single-question first screen (e.g. * a login hint read from a URL param by the host). Applied only when the form * is exactly one screen with one question; ignored otherwise. The field stays * editable. The host reads the value — core never touches the URL. */ prefillValue?: string; }; //#endregion export { Screen as i, InputType as n, Question as r, DynamicFormsConfig as t };