/** * If Node - Version 2.1 * Route items to different branches (true/false) */ // Helper types for special n8n fields type FilterValue = { conditions: Array<{ leftValue: unknown; operator: { type: string; operation: string }; rightValue: unknown }> }; export interface IfV21Params { conditions?: FilterValue; /** * If the type of an expression doesn't match the type of the comparison, n8n will try to cast the expression to the required type. E.g. for booleans <code>"false"</code> or <code>0</code> will be cast to <code>false</code> * @default false */ looseTypeValidation?: boolean | Expression; options?: { /** Whether to ignore letter case when evaluating conditions * @default true */ ignoreCase?: boolean | Expression; /** If the type of an expression doesn't match the type of the comparison, n8n will try to cast the expression to the required type. E.g. for booleans <code>"false"</code> or <code>0</code> will be cast to <code>false</code> * @default true */ looseTypeValidation?: boolean | Expression; }; } interface IfV21NodeBase { type: 'n8n-nodes-base.if'; version: 2.1; } export type IfV21ParamsNode = IfV21NodeBase & { config: NodeConfig; }; export type IfV21Node = IfV21ParamsNode;