/**
 * Todoist Node - Version 2.1
 * Discriminator: resource=task, operation=create
 */


interface Credentials {
  todoistApi: CredentialReference;
  todoistOAuth2Api: CredentialReference;
}

/** Task resource */
export type TodoistV21TaskCreateParams = {
  resource: 'task';
  operation: 'create';
  authentication?: 'apiKey' | 'oAuth2' | Expression<string>;
/**
 * 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 &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
 * @default []
 */
    labels?: string[];
/**
 * Task content
 */
    content?: string | Expression<string> | PlaceholderValue;
/**
 * Additional Fields
 * @default {}
 */
    options?: {
    /** A description for the task
     */
    description?: string | Expression<string> | PlaceholderValue;
    /** Specific date and time in RFC3339 format in UTC
     */
    dueDateTime?: string | Expression<string>;
    /** 2-letter code specifying language in case due_string is not written in English
     */
    dueLang?: string | Expression<string> | PlaceholderValue;
    /** Human defined task due date (ex.: “next Monday”, “Tomorrow”). Value is set using local (not UTC) time.
     */
    dueString?: string | Expression<string> | PlaceholderValue;
    /** The parent task you want to operate on. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     * @default {}
     */
    parentId?: string | Expression<string>;
    /** Task priority from 1 (normal) to 4 (urgent)
     * @default 1
     */
    priority?: number | Expression<number>;
    /** The section you want to operate on. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     * @default {}
     */
    section?: string | Expression<string>;
    /** Non-zero integer used to sort tasks under the same parent
     * @default 0
     */
    order?: number | Expression<number>;
    /** Specific date in YYYY-MM-DD format
     */
    dueDate?: string | Expression<string> | PlaceholderValue;
    /** Responsible user ID (for shared tasks)
     */
    assigneeId?: string | Expression<string> | PlaceholderValue;
    /** Positive integer for task duration (must be used with Duration Unit)
     * @default 0
     */
    duration?: number | Expression<number>;
    /** Unit of time for duration (must be used with Duration)
     * @default minute
     */
    durationUnit?: 'minute' | 'day' | Expression<string>;
    /** Specific deadline date in YYYY-MM-DD format
     */
    deadlineDate?: string | Expression<string> | PlaceholderValue;
  };
};

export type TodoistV21TaskCreateOutput = {
  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<string>;
  order?: number;
  priority?: number;
  project_id?: string;
  url?: string;
};

export type TodoistV21TaskCreateNode = {
  type: 'n8n-nodes-base.todoist';
  version: 2.1;
  credentials?: Credentials;
  config: NodeConfig<TodoistV21TaskCreateParams>;
  output?: Items<TodoistV21TaskCreateOutput>;
};