/**
 * Execute Sub-workflow Node - Version 1
 * Execute another workflow
 */


export interface ExecuteWorkflowV1Params {
  operation?: unknown;
/**
 * Where to get the workflow to execute from
 * @default database
 */
    source?: 'database' | 'localFile' | 'parameter' | 'url' | Expression<string>;
/**
 * Note on using an expression here: if this node is set to run once with all items, they will all be sent to the &lt;em&gt;same&lt;/em&gt; workflow. That workflow's ID will be calculated by evaluating the expression for the &lt;strong&gt;first input item&lt;/strong&gt;.
 * @hint Can be found in the URL of the workflow
 * @displayOptions.show { source: ["database"] }
 */
    workflowId?: string | Expression<string> | PlaceholderValue;
/**
 * The path to local JSON workflow file to execute
 * @displayOptions.show { source: ["localFile"] }
 */
    workflowPath?: string | Expression<string> | PlaceholderValue;
/**
 * The workflow JSON code to execute
 * @displayOptions.show { source: ["parameter"] }
 */
    workflowJson?: IDataObject | string | Expression<string>;
/**
 * The URL from which to load the workflow from
 * @displayOptions.show { source: ["url"] }
 */
    workflowUrl?: string | Expression<string> | PlaceholderValue;
  mode?: 'once' | 'each';
  options?: {
    /** Whether the main workflow should wait for the sub-workflow to complete its execution before proceeding
     * @default true
     */
    waitForSubWorkflow?: boolean | Expression<boolean>;
  };
}

interface ExecuteWorkflowV1NodeBase {
  type: 'n8n-nodes-base.executeWorkflow';
  version: 1;
}

export type ExecuteWorkflowV1ParamsNode = ExecuteWorkflowV1NodeBase & {
  config: NodeConfig<ExecuteWorkflowV1Params>;
};

export type ExecuteWorkflowV1Node = ExecuteWorkflowV1ParamsNode;