/** * Aggregate Node - Version 1 * Combine a field from many items into a list in a single item */ export interface AggregateV1Params { aggregate?: 'aggregateIndividualFields' | 'aggregateAllItemData' | Expression; /** * Fields To Aggregate * @displayOptions.show { aggregate: ["aggregateIndividualFields"] } * @default {"fieldToAggregate":[{"fieldToAggregate":"","renameField":false}]} */ fieldsToAggregate?: { fieldToAggregate?: Array<{ /** The name of a field in the input items to aggregate together * @hint Enter the field name as text */ fieldToAggregate?: string | Expression | PlaceholderValue; /** Whether to give the field a different name in the output * @default false */ renameField?: boolean | Expression; /** The name of the field to put the aggregated data in. Leave blank to use the input field name. * @displayOptions.show { renameField: [true] } */ outputFieldName?: string | Expression | PlaceholderValue; }>; }; /** * The name of the output field to put the data in * @displayOptions.show { aggregate: ["aggregateAllItemData"] } * @default data */ destinationFieldName?: string | Expression | PlaceholderValue; /** * Include * @displayOptions.show { aggregate: ["aggregateAllItemData"] } * @default allFields */ include?: 'allFields' | 'specifiedFields' | 'allFieldsExcept' | Expression; /** * Fields To Exclude * @displayOptions.show { aggregate: ["aggregateAllItemData"], include: ["allFieldsExcept"] } */ fieldsToExclude?: string | Expression | PlaceholderValue; /** * Fields To Include * @displayOptions.show { aggregate: ["aggregateAllItemData"], include: ["specifiedFields"] } */ fieldsToInclude?: string | Expression | PlaceholderValue; options?: { /** Whether to disallow referencing child fields using `parent.child` in the field name * @displayOptions.hide { /aggregate: ["aggregateAllItemData"] } * @default false */ disableDotNotation?: boolean | Expression; /** Whether to merge the output into a single flat list (rather than a list of lists), if the field to aggregate is a list * @displayOptions.hide { /aggregate: ["aggregateAllItemData"] } * @default false */ mergeLists?: boolean | Expression; /** Whether to include the binary data in the new item * @default false */ includeBinaries?: boolean | Expression; /** Whether to keep only unique binaries by comparing mime types, file types, file sizes and file extensions * @displayOptions.show { includeBinaries: [true] } * @default false */ keepOnlyUnique?: boolean | Expression; /** Whether to add a null entry to the aggregated list when there is a missing or null value * @displayOptions.hide { /aggregate: ["aggregateAllItemData"] } * @default false */ keepMissing?: boolean | Expression; }; } interface AggregateV1NodeBase { type: 'n8n-nodes-base.aggregate'; version: 1; } export type AggregateV1ParamsNode = AggregateV1NodeBase & { config: NodeConfig; }; export type AggregateV1Node = AggregateV1ParamsNode;