/** * Sort Node - Version 1 * Change items order */ export interface SortV1Params { /** * The type of sorting to perform * @default simple */ type?: 'simple' | 'random' | 'code' | Expression; /** * The fields of the input items to sort by * @displayOptions.show { type: ["simple"] } * @default {} */ sortFieldsUi?: { sortField?: Array<{ /** The field to sort by * @hint Enter the field name as text */ fieldName?: string | Expression | PlaceholderValue; /** The order to sort by * @default ascending */ order?: 'ascending' | 'descending' | Expression; }>; }; /** * Javascript code to determine the order of any two items * @displayOptions.show { type: ["code"] } */ code?: string | Expression | PlaceholderValue; /** * Options * @displayOptions.show { type: ["simple"] } * @default {} */ options?: { /** Whether to disallow referencing child fields using `parent.child` in the field name * @default false */ disableDotNotation?: boolean | Expression; }; } interface SortV1NodeBase { type: 'n8n-nodes-base.sort'; version: 1; } export type SortV1ParamsNode = SortV1NodeBase & { config: NodeConfig; }; export type SortV1Node = SortV1ParamsNode;