/** * Type definitions for UDP profile field configuration. * * Mirrors the dating-schema profile-fields/types.ts pattern. * These types describe field metadata — NOT the user's actual profile data. */ export interface FieldOption { value: string; label: string; /** Short description — shown on chips/cards */ description?: string; } export interface BaseField { /** Display order within the step */ order: number; /** Unique key — maps to DB field name */ key: string; /** Human-readable label */ label: string; /** Field type for form rendering */ type: 'text' | 'textarea' | 'number' | 'date' | 'single_select' | 'multi_select' | 'object' | 'object_array' | 'address'; /** Step number (1-12) this field belongs to */ step: number; /** Whether this field is collected during onboarding */ isOnboarding: boolean; /** * All UDP fields are optional — users can skip any question. * This flag is kept for metadata/documentation but does not affect form flow. */ optional?: boolean; /** Help text shown below the field */ description?: string; /** Mark as sensitive (shown with privacy notice) */ sensitive?: boolean; /** * If set, field visibility is conditional on another field's value. * - `values`: positive match — only visible when referenced field's (single) * value is in the list. * - `notIn`: negative match — only visible when referenced field's (single) * value is NOT in the list. An undefined referenced value counts as * "not in the list" (field is shown). * - `includesAny`: array-intersection match — for multi_select fields, only * visible when the referenced array shares at least one value with the * list. Used by step-12's link sub-steps which gate on `familyMembers` * (a multi-select) including the relevant relation type. */ conditionalOn?: { field: string; values: string[]; } | { field: string; notIn: string[]; } | { field: string; includesAny: string[]; }; } export interface SelectField extends BaseField { type: 'single_select'; options: FieldOption[]; } export interface MultiSelectField extends BaseField { type: 'multi_select'; options: FieldOption[]; maxSelect?: number; } export interface TextField extends BaseField { type: 'text' | 'textarea'; maxLength?: number; } export interface NumberField extends BaseField { type: 'number'; min?: number; max?: number; } export type ProfileField = SelectField | MultiSelectField | TextField | NumberField | (BaseField & { type: 'date' | 'object' | 'object_array' | 'address'; }); export interface FieldGroup { key: string; label: string; description?: string; step: number; fields: ProfileField[]; } //# sourceMappingURL=types.d.ts.map