/** * Todoist Node - Version 2 * Discriminator: resource=task, operation=create */ interface Credentials { todoistApi: CredentialReference; todoistOAuth2Api: CredentialReference; } /** Task resource */ export type TodoistV2TaskCreateParams = { resource: 'task'; operation: 'create'; authentication?: 'apiKey' | 'oAuth2' | Expression; /** * The destination project. Choose from the list, or specify an ID. * @default {"mode":"list","value":""} */ project?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string }; /** * Optional labels that will be assigned to a created task. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @default [] */ labels?: string[]; /** * Task content */ content?: string | Expression | PlaceholderValue; /** * Additional Fields * @default {} */ options?: { /** A description for the task */ description?: string | Expression | PlaceholderValue; /** Specific date and time in RFC3339 format in UTC */ dueDateTime?: string | Expression; /** 2-letter code specifying language in case due_string is not written in English */ dueLang?: string | Expression | PlaceholderValue; /** Human defined task due date (ex.: “next Monday”, “Tomorrow”). Value is set using local (not UTC) time. */ dueString?: string | Expression | PlaceholderValue; /** The parent task you want to operate on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @default {} */ parentId?: string | Expression; /** Task priority from 1 (normal) to 4 (urgent) * @default 1 */ priority?: number | Expression; /** The section you want to operate on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @default {} */ section?: string | Expression; /** Non-zero integer used to sort tasks under the same parent * @default 0 */ order?: number | Expression; /** Specific date in YYYY-MM-DD format */ dueDate?: string | Expression | PlaceholderValue; /** Responsible user ID (for shared tasks) */ assigneeId?: string | Expression | PlaceholderValue; /** Positive integer for task duration (must be used with Duration Unit) * @default 0 */ duration?: number | Expression; /** Unit of time for duration (must be used with Duration) * @default minute */ durationUnit?: 'minute' | 'day' | Expression; /** Specific deadline date in YYYY-MM-DD format */ deadlineDate?: string | Expression | PlaceholderValue; }; }; export type TodoistV2TaskCreateOutput = { assignee_id?: null; assigner_id?: null; comment_count?: number; content?: string; created_at?: string; creator_id?: string; deadline?: null; description?: string; duration?: null; id?: string; is_completed?: boolean; labels?: Array; order?: number; priority?: number; project_id?: string; url?: string; }; export type TodoistV2TaskCreateNode = { type: 'n8n-nodes-base.todoist'; version: 2; credentials?: Credentials; config: NodeConfig; output?: Items; };