export type Nullable = undefined | null | T; export type Dictionary = Record; export type VersionStatus = null | 'latest' | 'published'; export type FormContentType = { id: string; dataFormat: 'form'; name: string; description: string; fields: Field[]; groups?: Group[]; properties?: Nullable; language: string; version?: { versionNo?: string; }; }; export type Field = { id: string; name: string; dataType: FieldDataType; dataFormat?: FieldDataFormat; description?: Nullable; default?: unknown; groupId: string; validations?: Nullable; editor?: Nullable; }; export type Group = { id: string; name: string; description?: Nullable; }; export type CaptchaSettings = { enabled: boolean; siteKey?: Nullable; }; export type FormProperties = { captcha: CaptchaSettings; localizations: Nullable<{ submit?: Nullable; next?: Nullable; previous?: Nullable; errorSummaryTitle?: Nullable; }>; confirmationRules: FormRule[]; autoSaveProgress: boolean; mode?: 'survey'; }; export type FieldDataType = 'boolean' | 'dateTime' | 'decimal' | 'integer' | 'string' | 'stringArray'; export type FieldDataFormat = 'email' | 'phone' | 'reference' | 'time' | 'url'; export type FieldEditorId = 'datetime' | 'date' | 'decimal' | 'integer' | 'list-dropdown' | 'list' | 'multiline' | 'text'; export type AllowedValues = { values?: Nullable; labeledValues?: Nullable<{ value: string; label: string; }[]>; }; export type FieldValidations = { required?: Nullable; min?: Nullable>; max?: Nullable>; minLength?: Nullable>; maxLength?: Nullable>; minCount?: Nullable>; maxCount?: Nullable>; regex?: Nullable; allowedValue?: Nullable>; allowedValues?: Nullable; pastDateTime?: Nullable; }; export type FieldValidation = { message?: Nullable; }; export type FieldValidationWithValue = FieldValidation & { value: T; }; export type FieldEditor = { id?: Nullable; instructions?: Nullable; label?: Nullable; properties?: FieldEditorProperties; }; export type FieldLabelPosition = 'top' | 'leftAligned'; type FieldEditorProperties = { autoFill?: string; rows?: number; labelPosition?: FieldLabelPosition; cssClass?: string; hidden?: boolean; placeholderText?: string; }; export type FormRule = { return: TReturn; }; export type ConfirmationRuleReturnUri = { link: { sys: { uri: string; }; }; }; export type ConfirmationRuleReturnContent = { content: string; }; export type ConfirmationRuleReturn = ConfirmationRuleReturnUri | ConfirmationRuleReturnContent; export {};