/**
 * Sort Node - Version 1
 * Change items order
 */


export interface SortV1Params {
/**
 * The type of sorting to perform
 * @default simple
 */
    type?: 'simple' | 'random' | 'code' | Expression<string>;
/**
 * 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<string> | PlaceholderValue;
      /** The order to sort by
       * @default ascending
       */
      order?: 'ascending' | 'descending' | Expression<string>;
    }>;
  };
/**
 * Javascript code to determine the order of any two items
 * @displayOptions.show { type: ["code"] }
 */
    code?: string | Expression<string> | 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<boolean>;
  };
}

interface SortV1NodeBase {
  type: 'n8n-nodes-base.sort';
  version: 1;
}

export type SortV1ParamsNode = SortV1NodeBase & {
  config: NodeConfig<SortV1Params>;
};

export type SortV1Node = SortV1ParamsNode;