/* eslint-disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * The main heading displayed at the top of the form. Use to describe the form's purpose (e.g., 'Add New Device', 'Submit Feedback', 'Configuration Settings'). */ export type Title = string; /** * Secondary text displayed below the title. Use for instructions, context, or additional information about the form. */ export type Subtitle = string; /** * When enabled, shows a button that opens the form in a modal dialog when clicked. When disabled, the form fields are displayed directly in the widget area. Use button mode for space-constrained layouts or optional data entry. */ export type FormOpenButton = boolean; /** * When enabled, shows a delete button that allows users to remove existing entries. */ export type ShowDeleteButton = boolean; /** * The destination path to route to after delete. Use for navigating to a home or main page. */ export type PostDeleteNavigation = string; /** * The variable name used in the route string. Reference this in your route using the {{label}} syntax. Use descriptive names like 'temperature', 'status', 'deviceName'. */ export type Label = string; /** * The replacement text that will appear in place of {{label}} in the rendered output. Can be a static value or bound to a data column for dynamic updates. */ export type Value = string; /** * Array of variable definitions for dynamic route segment substitution. Each variable has a label (used in the route string as {{label}}) and a value (the replacement text). Values can be static or bound to data columns for real-time updates. */ export type PostDeleteNavigationVariables = { label?: Label; value?: Value; [k: string]: unknown; }[]; /** * The text label displayed next to this form field. Should clearly describe what data the user should enter. */ export type Label1 = string; /** * The input control type: 'dropdown' for selection from predefined options, 'textfield' for single-line text, 'numberfield' for numeric values, 'checkbox' for boolean yes/no, 'textarea' for multi-line text, 'datetime' for date and time selection. */ export type FieldType = "dropdown" | "textfield" | "numberfield" | "checkbox" | "textarea" | "datetime"; /** * When enabled, this field is hidden from users but its value (typically a default or data-bound value) is still submitted with the form. Useful for including metadata, timestamps, or user IDs automatically. */ export type HiddenField = boolean; /** * When enabled, users must fill out this field before the form can be submitted. The form will show a validation error if left empty. Ignored when a default value is provided. */ export type Required = boolean; /** * Helper text displayed below the field to guide users on what to enter. Use for format hints, examples, or clarifying instructions. */ export type HintText = string; /** * Pre-filled value for this field when the form loads. Can be a static value or bound to a data source. */ export type PreFilledValue = string; /** * Default value for this field when the form loads. If the user does not provide a value, this default will be used. Can be a static value or bound to a data source. */ export type DefaultValue = string; /** * The minimum allowed numeric value for numberfield types. Values below this will fail validation. */ export type MinimumValue = number; /** * The maximum allowed numeric value for numberfield types. Values above this will fail validation. */ export type MaximumValue = number; /** * A regular expression pattern to validate text input (e.g., '^[A-Z]{2}[0-9]{4}$' for format like 'AB1234'). Leave empty to accept any text. */ export type ValidationRegex = string; /** * The text shown to users in the dropdown list. */ export type DisplayLabel = string; /** * The actual value stored in the database when this option is selected. May differ from the display label. */ export type Value1 = string; /** * The list of selectable options for dropdown field types. Each option has a display label and a stored value. */ export type DropdownValues = { displayLabel?: DisplayLabel; value?: Value1; [k: string]: unknown; }[]; /** * Array of input fields that make up the form. Each field defines its type, validation rules, and target database column for storage. Fields are rendered in the order specified. */ export type FormFields = { label?: Label1; type?: FieldType; hiddenField?: HiddenField; required?: Required; description?: HintText; targetColumn?: TargetColumn; preFilledValue?: PreFilledValue; defaultValue?: DefaultValue; min?: MinimumValue; max?: MaximumValue; validation?: ValidationRegex; values?: DropdownValues; [k: string]: unknown; }[]; /** * A form widget for collecting user input and storing it in database tables. Use this widget to create data entry interfaces for manual input, configuration settings, user feedback, or any scenario requiring structured data collection. Supports various field types including text, numbers, dropdowns, checkboxes, textareas, and datetime pickers. Each field maps to a database column, enabling direct data persistence. Can display as a button-triggered modal or inline form. */ export interface InputData { title?: Title; subTitle?: Subtitle; formButton?: FormOpenButton; deleteButton?: ShowDeleteButton; deleteFlagColumn?: DeleteFlagColumn; deleteNavigationRoute?: PostDeleteNavigation; variables?: PostDeleteNavigationVariables; formFields?: FormFields; [k: string]: unknown; } /** * The target table column used to mark records as deleted when the delete button is clicked. This MUST be a boolean column. If the target table has such a deleted_flag column, it should be specified here regardless of the delete button setting. */ export interface DeleteFlagColumn { [k: string]: unknown; } /** * The database table and column where this field's value will be stored on form submission. Select from available tables and columns. All fields targeting the same table will be combined into a single row insert. */ export interface TargetColumn { [k: string]: unknown; }