// AUTO-GENERATED — do not edit by hand
// Upstream: https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.ts
// To implement: copy to ../impl/executeworkflowtrigger.rs, fill in execute(), add to ../impl/mod.rs
// r8r: rust port of n8n.io
// License: Unlicense

use async_trait::async_trait;
use crate::core::error::NodeError;
use crate::core::types::*;
use crate::engine::{ExecuteCtx, Node, NodeFactory};
use std::sync::Arc;

pub struct ExecuteworkflowtriggerNode;

static META: NodeMetadata = NodeMetadata {
    name: "executeworkflowtrigger",
    display_name: "Execute Workflow Trigger",
    version: &[1],
    group: &["transform"],
    description: "Helpers for calling other n8n workflows. Used for designing modular, microservice-like workflows.",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "events", display_name: "Events", kind: PropertyKind::String, required: false, default: Some("worklfow_call") },
    PropertyDef { name: "notice", display_name: "When an ‘execute workflow’ node calls this workflow, the execution starts here. Any data passed into the ", kind: PropertyKind::Notice, required: false, default: Some("") },
    PropertyDef { name: "outdatedVersionWarning", display_name: "This node is out of date. Please upgrade by removing it and adding a new one", kind: PropertyKind::Notice, required: false, default: Some("") },
    PropertyDef { name: "Define using fields below", display_name: "Input data mode", kind: PropertyKind::Options, required: false, default: None },
    PropertyDef { name: "${JSON_EXAMPLE}_notice", display_name: "Provide an example object to infer fields and their types.<br>To allow any type for a given field, set the value to null.", kind: PropertyKind::Notice, required: false, default: Some("") },
    PropertyDef { name: "name", display_name: "Workflow Input Schema", kind: PropertyKind::FixedCollection, required: true, default: Some("") }
],
    credentials: &[],
};

#[async_trait]
impl Node for ExecuteworkflowtriggerNode {
    fn metadata(&self) -> &'static NodeMetadata { &META }

    async fn execute(&self, _ctx: &mut ExecuteCtx<'_>) -> Result<NodeOutput, NodeError> {
    Err(NodeError::NotYetPorted { node: "executeworkflowtrigger", upstream: "https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.ts" })
    }
}

inventory::submit! { NodeFactory::new("executeworkflowtrigger", || Arc::new(ExecuteworkflowtriggerNode)) }
