/**
 * Chat Node - Version 1.2
 * Send a message into the chat
 */


export interface LcChatV12Params {
/**
 * Operation
 * @default send
 */
    operation?: 'send' | 'sendAndWait';
  message: string | Expression<string>;
/**
 * Response Type
 * @displayOptions.show { operation: ["sendAndWait"] }
 * @default freeTextChat
 */
    responseType?: 'approval' | 'freeTextChat' | Expression<string>;
/**
 * Whether to block input from the user while waiting for approval
 * @displayOptions.show { responseType: ["approval"] }
 * @default false
 */
    blockUserInput?: boolean | Expression<boolean>;
/**
 * Define Form
 * @displayOptions.show { responseType: ["customForm"], operation: ["sendAndWait"] }
 * @default fields
 */
    defineForm?: 'fields' | 'json';
/**
 * Form Fields
 * @hint &lt;a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/" target="_blank"&gt;See docs&lt;/a&gt; for field syntax
 * @displayOptions.show { defineForm: ["json"], responseType: ["customForm"], operation: ["sendAndWait"] }
 */
    jsonOutput?: IDataObject | string | Expression<string>;
/**
 * Form Elements
 * @displayOptions.show { defineForm: ["fields"], responseType: ["customForm"], operation: ["sendAndWait"] }
 * @default {}
 */
    formFields?: {
        /** Values
     */
    values?: Array<{
      /** The name of the field, used in input attributes and referenced by the workflow
       * @displayOptions.hide { fieldType: ["html"] }
       */
      fieldName?: string | Expression<string>;
      /** Label that appears above the input field
       * @displayOptions.hide { fieldType: ["hiddenField", "html"] }
       */
      fieldLabel?: string | Expression<string>;
      /** Label that appears above the input field
       * @displayOptions.hide { fieldType: ["hiddenField", "html"] }
       */
      fieldLabel?: string | Expression<string>;
      /** The name of the field, used in input attributes and referenced by the workflow
       * @displayOptions.show { fieldType: ["hiddenField"] }
       */
      fieldName?: string | Expression<string>;
      /** The type of field to add to the form
       * @default text
       */
      fieldType?: 'checkbox' | 'html' | 'date' | 'dropdown' | 'email' | 'file' | 'hiddenField' | 'number' | 'password' | 'radio' | 'text' | 'textarea' | Expression<string>;
      /** Optional field. It can be used to include the html in the output.
       * @displayOptions.show { fieldType: ["html"] }
       */
      elementName?: string | Expression<string>;
      /** The name of the field, used in input attributes and referenced by the workflow
       * @displayOptions.hide { fieldType: ["html"] }
       */
      fieldName?: string | Expression<string>;
      /** Sample text to display inside the field
       * @displayOptions.hide { fieldType: ["dropdown", "date", "file", "html", "hiddenField", "radio", "checkbox"] }
       */
      placeholder?: string | Expression<string>;
      /** Default value that will be pre-filled in the form field
       * @displayOptions.show { fieldType: ["text", "number", "email", "textarea"] }
       */
      defaultValue?: string | Expression<string>;
      /** Default date value that will be pre-filled in the form field (format: YYYY-MM-DD)
       * @displayOptions.show { fieldType: ["date"] }
       */
      defaultValue?: string | Expression<string>;
      /** Default value that will be pre-selected. Must match one of the option labels.
       * @displayOptions.show { fieldType: ["dropdown", "radio"] }
       */
      defaultValue?: string | Expression<string>;
      /** Default value(s) that will be pre-selected. Must match one or multiple of the option labels. Separate multiple pre-selected options with a comma.
       * @displayOptions.show { fieldType: ["checkbox"] }
       */
      defaultValue?: string | Expression<string>;
      /** Input value can be set here or will be passed as a query parameter via Field Name if no value is set
       * @displayOptions.show { fieldType: ["hiddenField"] }
       */
      fieldValue?: string | Expression<string>;
      /** List of options that can be selected from the dropdown
       * @displayOptions.show { fieldType: ["dropdown"] }
       * @default {"values":[{"option":""}]}
       */
      fieldOptions?: {
        /** Values
     */
    values?: Array<{
      /** Option
       */
      option?: string | Expression<string>;
    }>;
  };
      /** Checkboxes
       * @displayOptions.show { fieldType: ["checkbox"] }
       * @default {"values":[{"option":""}]}
       */
      fieldOptions?: {
        /** Values
     */
    values?: Array<{
      /** Checkbox Label
       */
      option?: string | Expression<string>;
    }>;
  };
      /** Radio Buttons
       * @displayOptions.show { fieldType: ["radio"] }
       * @default {"values":[{"option":""}]}
       */
      fieldOptions?: {
        /** Values
     */
    values?: Array<{
      /** Radio Button Label
       */
      option?: string | Expression<string>;
    }>;
  };
      /** Whether to allow the user to select multiple options from the dropdown list
       * @displayOptions.show { fieldType: ["dropdown"] }
       * @default false
       */
      multiselect?: boolean | Expression<boolean>;
      /** Limit Selection
       * @displayOptions.show { fieldType: ["checkbox"] }
       * @default unlimited
       */
      limitSelection?: 'exact' | 'range' | 'unlimited' | Expression<string>;
      /** Number of Selections
       * @displayOptions.show { fieldType: ["checkbox"], limitSelection: ["exact"] }
       * @default 1
       */
      numberOfSelections?: number | Expression<number>;
      /** Minimum Selections
       * @displayOptions.show { fieldType: ["checkbox"], limitSelection: ["range"] }
       * @default 0
       */
      minSelections?: number | Expression<number>;
      /** Maximum Selections
       * @displayOptions.show { fieldType: ["checkbox"], limitSelection: ["range"] }
       * @default 1
       */
      maxSelections?: number | Expression<number>;
      /** HTML elements to display on the form page
       * @hint Does not accept &lt;code&gt;&lt;script&gt;&lt;/code&gt;, &lt;code&gt;&lt;style&gt;&lt;/code&gt; or &lt;code&gt;&lt;input&gt;&lt;/code&gt; tags
       * @displayOptions.show { fieldType: ["html"] }
       */
      html?: string;
      /** Whether to allow the user to select multiple files from the file input or just one
       * @displayOptions.show { fieldType: ["file"] }
       * @default true
       */
      multipleFiles?: boolean | Expression<boolean>;
      /** Comma-separated list of allowed file extensions
       * @hint Leave empty to allow all file types
       * @displayOptions.show { fieldType: ["file"] }
       */
      acceptFileTypes?: string | Expression<string>;
      /** Whether to require the user to enter a value for this field before submitting the form
       * @displayOptions.hide { fieldType: ["html", "hiddenField"] }
       * @default false
       */
      requiredField?: boolean | Expression<boolean>;
    }>;
  };
/**
 * Approval Options
 * @displayOptions.show { responseType: ["approval"], operation: ["sendAndWait"] }
 * @default {}
 */
    approvalOptions?: {
        /** Values
     */
    values?: {
      /** Type of Approval
       * @default single
       */
      approvalType?: 'single' | 'double' | Expression<string>;
      /** Approve Button Label
       * @displayOptions.show { approvalType: ["single", "double"] }
       * @default Approve
       */
      approveLabel?: string | Expression<string>;
      /** Approve Button Style
       * @displayOptions.show { approvalType: ["single", "double"] }
       * @default primary
       */
      buttonApprovalStyle?: 'primary' | 'secondary' | Expression<string>;
      /** Disapprove Button Label
       * @displayOptions.show { approvalType: ["double"] }
       * @default Decline
       */
      disapproveLabel?: string | Expression<string>;
      /** Disapprove Button Style
       * @displayOptions.show { approvalType: ["double"] }
       * @default secondary
       */
      buttonDisapprovalStyle?: 'primary' | 'secondary' | Expression<string>;
    };
  };
/**
 * Options
 * @displayOptions.hide { @tool: [true] }
 * @default {}
 */
    options?: {
    /** Add Memory Input Connection
     * @displayOptions.hide { /responseType: ["approval"] }
     * @default false
     */
    memoryConnection?: boolean | Expression<boolean>;
    /** Whether to limit the time this node should wait for a user response before execution resumes
     * @displayOptions.show { /waitUserReply: [true] }
     * @default {"values":{"limitType":"afterTimeInterval","resumeAmount":45,"resumeUnit":"minutes"}}
     */
    limitWaitTime?: {
        /** Values
     */
    values?: {
      /** Sets the condition for the execution to resume. Can be a specified date or after some time.
       * @default afterTimeInterval
       */
      limitType?: 'afterTimeInterval' | 'atSpecifiedTime' | Expression<string>;
      /** The time to wait
       * @displayOptions.show { limitType: ["afterTimeInterval"] }
       * @default 1
       */
      resumeAmount?: number | Expression<number>;
      /** Unit of the interval value
       * @displayOptions.show { limitType: ["afterTimeInterval"] }
       * @default hours
       */
      resumeUnit?: 'minutes' | 'hours' | 'days' | Expression<string>;
      /** Continue execution after the specified date and time
       * @displayOptions.show { limitType: ["atSpecifiedTime"] }
       */
      maxDateAndTime?: string | Expression<string>;
    };
  };
    /** Whether to limit the time this node should wait for a user response before execution resumes
     * @displayOptions.show { /operation: ["sendAndWait"] }
     * @default {"values":{"limitType":"afterTimeInterval","resumeAmount":45,"resumeUnit":"minutes"}}
     */
    limitWaitTime?: {
        /** Values
     */
    values?: {
      /** Sets the condition for the execution to resume. Can be a specified date or after some time.
       * @default afterTimeInterval
       */
      limitType?: 'afterTimeInterval' | 'atSpecifiedTime' | Expression<string>;
      /** The time to wait
       * @displayOptions.show { limitType: ["afterTimeInterval"] }
       * @default 1
       */
      resumeAmount?: number | Expression<number>;
      /** Unit of the interval value
       * @displayOptions.show { limitType: ["afterTimeInterval"] }
       * @default hours
       */
      resumeUnit?: 'minutes' | 'hours' | 'days' | Expression<string>;
      /** Continue execution after the specified date and time
       * @displayOptions.show { limitType: ["atSpecifiedTime"] }
       */
      maxDateAndTime?: string | Expression<string>;
    };
  };
    /** Whether to automatically save &lt;a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executiondata/" target="_blank"&gt;highlighted data&lt;/a&gt;. This data can then be used to filter executions in the Executions view. Available on Pro and Enterprise plans in n8n Cloud, and on Enterprise or registered Community Edition for self-hosted. Defaults to true.
     * @default true
     */
    autoSaveHighlightedData?: boolean | Expression<boolean>;
  };
}

export interface LcChatV12SubnodeConfig {
  memory?: MemoryInstance;
}

interface LcChatV12NodeBase {
  type: '@n8n/n8n-nodes-langchain.chat';
  version: 1.2;
  isTrigger: true;
}

export type LcChatV12ParamsNode = LcChatV12NodeBase & {
  config: NodeConfig<LcChatV12Params> & { subnodes?: LcChatV12SubnodeConfig };
};

export type LcChatV12Node = LcChatV12ParamsNode;