export interface FormField { name: string; type: string; label: string; required: boolean; visibility: "form" | "hidden"; placeholder?: string; help?: string; options?: { value: string; label: string; }[]; maxLength?: number; min?: number; max?: number; } export interface NotificationConfig { email?: { to: string[]; cc?: string[]; replyToField?: string; subject: string; body: string; }; webhook?: { url: string; secret?: string; headers?: Record; }; } export interface Delivery { channel: "email" | "webhook" | "afterSave"; status: "sent" | "failed"; attempts: number; lastError: string | null; sentAt: string | null; } export interface ApiToken { id: number; name: string; expiresAt: string | null; } export interface FormDraft { submissionAccess?: "public" | "api-token"; allowedApiTokenIds?: number[]; notifications?: NotificationConfig; slug: string; name: string; targetUid: string; fields: FormField[]; consent: { label: string; version: string; }; } export interface FormDocument extends FormDraft { documentId: string; version: number; targetDisplayName?: string | null; publicUrl?: string; hasSubmissions?: boolean; latestSubmissionAt?: string | null; } export interface FormTarget { uid: string; name: string; } export declare const emptyForm: FormDraft; /** Use the admin's local date when creating a draft or requesting a suggestion. */ export declare function suggestConsentVersion(current?: string, date?: Date, savedVersion?: string): string; export declare function createEmptyForm(): FormDraft; /** Only send notifications after the editor has been opened. */ export declare function savePayload(form: FormDraft, includeNotifications?: boolean, includeAccess?: boolean): FormDraft; export declare function moveField(fields: FormField[], index: number, direction: number): FormField[]; export declare function setRequired(field: FormField, required: boolean, schema: FormField): FormField; export declare function errorMessage(error: unknown): string; export declare function suggestSlug(name: string): string; export declare function missingRequired(fields: FormField[], schema: FormField[]): FormField[]; //# sourceMappingURL=form.d.ts.map