n8n/packages/nodes-base/nodes/Form/interfaces.ts
Michael Kret d2a0e860dc
fix: Form trigger and Wait Form mode basic authentication fix for form POST request (#23795)
Co-authored-by: Dimitri Lavrenük <20122620+dlavrenuek@users.noreply.github.com>
Co-authored-by: Dimitri Lavrenük <dimitri.lavrenuek@n8n.io>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: yehorkardash <yehor.kardash@n8n.io>
2026-01-14 10:33:17 +00:00

55 lines
1.2 KiB
TypeScript

import type { GenericValue } from 'n8n-workflow';
export type FormField = {
id: string;
errorId: string;
label: string;
placeholder?: string;
inputRequired: 'form-required' | '';
type?: 'text' | 'number' | 'date' | 'email';
defaultValue: GenericValue;
isInput?: boolean;
isTextarea?: boolean;
isSelect?: boolean;
selectOptions?: string[];
isMultiSelect?: boolean;
radioSelect?: 'radio';
exactSelectedOptions?: number;
minSelectedOptions?: number;
maxSelectedOptions?: number;
multiSelectOptions?: Array<{ id: string; label: string }>;
isFileInput?: boolean;
acceptFileTypes?: string;
multipleFiles?: 'multiple' | '';
isHtml?: boolean;
html?: string;
isHidden?: boolean;
hiddenName?: string;
hiddenValue?: GenericValue;
};
export type FormTriggerData = {
testRun: boolean;
formTitle: string;
formDescription?: string;
formDescriptionMetadata?: string;
formSubmittedHeader?: string;
formSubmittedText?: string;
redirectUrl?: string;
n8nWebsiteLink: string;
formFields: FormField[];
useResponseData?: boolean;
appendAttribution?: boolean;
buttonLabel?: string;
dangerousCustomCss?: string;
authToken?: string;
};
export const FORM_TRIGGER_AUTHENTICATION_PROPERTY = 'authentication';