/** * Filter Node - Version 1 * Keep only items matching a condition */ export interface FilterV1Params { /** * 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; }>; }; /** * How to combine the conditions: AND requires all conditions to be true, OR requires at least one condition to be true * @default AND */ combineConditions?: 'AND' | 'OR' | Expression; } interface FilterV1NodeBase { type: 'n8n-nodes-base.filter'; version: 1; } export type FilterV1ParamsNode = FilterV1NodeBase & { config: NodeConfig; }; export type FilterV1Node = FilterV1ParamsNode;