// AUTO-GENERATED — do not edit by hand
// Upstream: https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts
// To implement: copy to ../impl/berryred.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 BerryredNode;

static META: NodeMetadata = NodeMetadata {
    name: "berryred",
    display_name: "Todoist",
    version: &[1],
    group: &["transform"],
    description: "Consume Todoist API",
    inputs: 1,
    outputs: 1,
    properties: &[
    PropertyDef { name: "authentication", display_name: "Authentication", kind: PropertyKind::Options, required: false, default: Some("apiKey") },
    PropertyDef { name: "resource", display_name: "Resource", kind: PropertyKind::Options, required: true, default: Some("task") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: true, default: Some("create") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: true, default: Some("create") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: true, default: Some("create") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: true, default: Some("create") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: true, default: Some("create") },
    PropertyDef { name: "operation", display_name: "Operation", kind: PropertyKind::Options, required: true, default: Some("create") },
    PropertyDef { name: "taskId", display_name: "Task ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "project", display_name: "Project Name or ID", kind: PropertyKind::ResourceLocator, required: true, default: None },
    PropertyDef { name: "section", display_name: "Section Name or ID", kind: PropertyKind::Options, required: false, default: Some("") },
    PropertyDef { name: "options", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "labels", display_name: "Label Names", kind: PropertyKind::MultiOptions, required: false, default: None },
    PropertyDef { name: "content", display_name: "Content", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "text", display_name: "Text", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "options", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "options", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "returnAll", display_name: "Return All", kind: PropertyKind::Boolean, required: false, default: None },
    PropertyDef { name: "limit", display_name: "Limit", kind: PropertyKind::Number, required: false, default: None },
    PropertyDef { name: "filters", display_name: "Filters", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "updateFields", display_name: "Update Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "projectId", display_name: "Project ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "name", display_name: "Name", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "projectOptions", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "projectUpdateFields", display_name: "Update Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "sectionId", display_name: "Section ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "sectionProject", display_name: "Project Name or ID", kind: PropertyKind::ResourceLocator, required: true, default: None },
    PropertyDef { name: "sectionName", display_name: "Name", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "sectionOptions", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: None },
    PropertyDef { name: "sectionUpdateFields", display_name: "Update Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "sectionFilters", display_name: "Filters", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "commentId", display_name: "Comment ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "commentTaskId", display_name: "Task ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "commentContent", display_name: "Content", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "commentUpdateFields", display_name: "Update Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "commentFilters", display_name: "Filters", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "labelId", display_name: "Label ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "labelName", display_name: "Name", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "labelOptions", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "labelUpdateFields", display_name: "Update Fields", kind: PropertyKind::Collection, required: false, default: Some("") },
    PropertyDef { name: "reminderId", display_name: "Reminder ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "itemId", display_name: "Task ID", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "dueDateType", display_name: "Due Date Type", kind: PropertyKind::Options, required: true, default: Some("natural_language") },
    PropertyDef { name: "natural_language_representation", display_name: "Natural Language Representation", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "date", display_name: "Date", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "datetime", display_name: "Date Time", kind: PropertyKind::DateTime, required: true, default: Some("") },
    PropertyDef { name: "datetime", display_name: "Date Time", kind: PropertyKind::DateTime, required: true, default: Some("") },
    PropertyDef { name: "timezone", display_name: "Timezone", kind: PropertyKind::String, required: true, default: Some("") },
    PropertyDef { name: "reminderOptions", display_name: "Additional Fields", kind: PropertyKind::Collection, required: false, default: Some("absolute") },
    PropertyDef { name: "reminderUpdateFields", display_name: "Update Fields", kind: PropertyKind::Collection, required: false, default: Some("") }
],
    credentials: &[
    CredentialRef { name: "todoistApi", required: true },
    CredentialRef { name: "todoistOAuth2Api", required: true }
],
};

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

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

inventory::submit! { NodeFactory::new("berryred", || Arc::new(BerryredNode)) }
