import { Field } from 'contensis-core-api'; import { CaptchaSettings, ConfirmationRuleReturnContent, FieldDataFormat, FieldDataType, FieldEditor, FieldValidations, FormRule, Nullable } from './FormContentType'; import { ContentTypeBase, ContentTypeGroup } from 'contensis-core-api/lib/models/ContentTypeBase'; export interface FormContentType extends ContentTypeBase<'form'> { defaultLanguage?: string; entryTitleField?: string; supportedLanguages?: string[]; groups?: ContentTypeGroup[]; fields: FormField[]; properties?: Nullable; dataFormat: 'form'; } export type FormField = Field & { dataType: FieldDataType; dataFormat?: FieldDataFormat; validations?: Nullable; editor?: Nullable; }; export type FormProperties = { captcha: CaptchaSettings; localizations: Nullable<{ submit?: Nullable; next?: Nullable; previous?: Nullable; errorSummaryTitle?: Nullable; }>; confirmationRules: FormRule[]; autoSaveProgress: boolean; mode?: 'survey'; }; /** Unique to Management API */ export type ConfirmationRuleReturnNodeId = { link: { sys: { node: { id: string; }; }; }; }; export type ConfirmationRuleReturn = ConfirmationRuleReturnNodeId | ConfirmationRuleReturnContent;