/** * If Node - Version 1 * Route items to different branches (true/false) */ export interface IfV1Params { /** * The type of values to compare * @default {} */ conditions?: { /** Boolean */ boolean?: Array<{ /** The value to compare with the second one * @default false */ value1?: boolean | Expression; /** Operation to decide where the data should be mapped to * @default equal */ operation?: 'equal' | 'notEqual' | Expression; /** The value to compare with the first one * @default false */ value2?: boolean | Expression; }>; /** Date & Time */ dateTime?: Array<{ /** The value to compare with the second one */ value1?: string | Expression; /** Operation to decide where the data should be mapped to * @default after */ operation?: 'after' | 'before' | Expression; /** The value to compare with the first one */ value2?: string | Expression; }>; /** Number */ number?: Array<{ /** The value to compare with the second one * @default 0 */ value1?: number | Expression; /** Operation to decide where the data should be mapped to * @default smaller */ operation?: 'smaller' | 'smallerEqual' | 'equal' | 'notEqual' | 'larger' | 'largerEqual' | 'isEmpty' | 'isNotEmpty'; /** The value to compare with the first one * @displayOptions.hide { operation: ["isEmpty", "isNotEmpty"] } * @default 0 */ value2?: number | Expression; }>; /** String */ string?: Array<{ /** The value to compare with the second one */ value1?: string | Expression | PlaceholderValue; /** Operation to decide where the data should be mapped to * @default equal */ operation?: 'contains' | 'notContains' | 'endsWith' | 'notEndsWith' | 'equal' | 'notEqual' | 'regex' | 'notRegex' | 'startsWith' | 'notStartsWith' | 'isEmpty' | 'isNotEmpty'; /** The value to compare with the first one * @displayOptions.hide { operation: ["isEmpty", "isNotEmpty", "regex", "notRegex"] } */ value2?: string | Expression | PlaceholderValue; /** The regex which has to match * @displayOptions.show { operation: ["regex", "notRegex"] } */ value2?: string | Expression | PlaceholderValue; }>; }; /** * If multiple rules got set this settings decides if it is true as soon as ANY condition matches or only if ALL get meet * @default all */ combineOperation?: 'all' | 'any' | Expression; } interface IfV1NodeBase { type: 'n8n-nodes-base.if'; version: 1; } export type IfV1ParamsNode = IfV1NodeBase & { config: NodeConfig; }; export type IfV1Node = IfV1ParamsNode;