/** * Switch Node - Version 2 * Discriminator: mode=rules */ /** Rules decide how to route data */ export type SwitchV2RulesParams = { mode: 'rules'; /** * The type of data to route on * @default number */ dataType?: 'boolean' | 'dateTime' | 'number' | 'string' | Expression; /** * The value to compare with the first one * @displayOptions.show { dataType: ["boolean"] } * @default false */ value1?: boolean | Expression; /** * Routing Rules * @displayOptions.show { dataType: ["boolean"] } * @default {} */ rules?: { /** Boolean */ rules?: Array<{ /** 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; /** The label of output to which to send data to if rule matches */ outputKey?: string | Expression | PlaceholderValue; }>; }; /** * The output to which to route all items which do not match any of the rules. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @default -1 */ fallbackOutput?: string | Expression; }; export type SwitchV2RulesNode = { type: 'n8n-nodes-base.switch'; version: 2; config: NodeConfig; };