n8n/packages/nodes-base/nodes/Google/Task/TaskDescription.ts

511 lines
10 KiB
TypeScript
Raw Normal View History

import {
INodeProperties,
} from 'n8n-workflow';
2020-06-15 15:47:44 -07:00
export const taskOperations: INodeProperties[] = [
2020-06-15 15:47:44 -07:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
options: [
{
name: 'Create',
value: 'create',
2020-06-17 12:49:37 -07:00
description: 'Add a task to tasklist',
2020-06-15 15:47:44 -07:00
},
{
name: 'Delete',
value: 'delete',
2020-06-17 12:49:37 -07:00
description: 'Delete a task',
2020-06-15 15:47:44 -07:00
},
{
name: 'Get',
value: 'get',
2020-06-17 12:49:37 -07:00
description: 'Retrieve a task',
2020-06-15 15:47:44 -07:00
},
{
name: 'Get All',
value: 'getAll',
2020-06-17 12:49:37 -07:00
description: 'Retrieve all tasks from a tasklist',
2020-06-15 15:47:44 -07:00
},
{
name: 'Update',
value: 'update',
2020-06-17 12:49:37 -07:00
description: 'Update a task',
2020-10-22 06:46:03 -07:00
},
2020-06-15 15:47:44 -07:00
],
default: 'create',
2020-06-17 12:49:37 -07:00
description: 'The operation to perform.',
2020-10-22 06:46:03 -07:00
},
];
2020-06-15 15:47:44 -07:00
export const taskFields: INodeProperties[] = [
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
/* task:create */
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
{
displayName: 'TaskList',
name: 'task',
type: 'options',
typeOptions: {
2020-06-17 12:49:37 -07:00
loadOptionsMethod: 'getTasks',
2020-06-15 15:47:44 -07:00
},
required: true,
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'create',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
2020-06-17 12:49:37 -07:00
default: '',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
description: 'Title of the task.',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'task',
],
},
},
},
2020-06-15 15:47:44 -07:00
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'create',
],
resource: [
'task',
],
2020-10-22 06:46:03 -07:00
},
2020-06-15 15:47:44 -07:00
},
options: [
{
displayName: 'Completion Date',
2020-06-15 15:47:44 -07:00
name: 'completed',
type: 'dateTime',
default: '',
2020-06-17 12:49:37 -07:00
description: `Completion date of the task (as a RFC 3339 timestamp). This field is omitted if the task has not been completed.`,
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Deleted',
2020-06-15 15:47:44 -07:00
name: 'deleted',
type: 'boolean',
default: false,
2020-06-17 12:49:37 -07:00
description: 'Flag indicating whether the task has been deleted.',
2020-06-15 15:47:44 -07:00
},
{
2020-06-17 12:49:37 -07:00
displayName: 'Due Date',
name: 'dueDate',
type: 'dateTime',
default: '',
description: 'Due date of the task.',
},
{
displayName: 'Notes',
name: 'notes',
type: 'string',
default: '',
description: 'Additional Notes.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Parent',
name: 'parent',
type: 'string',
default: '',
2020-06-17 12:49:37 -07:00
description: 'Parent task identifier. If the task is created at the top level, this parameter is omitted.',
2020-06-15 15:47:44 -07:00
},
{
2020-06-17 12:49:37 -07:00
displayName: 'Previous',
name: 'previous',
2020-06-15 15:47:44 -07:00
type: 'string',
default: '',
2020-06-17 12:49:37 -07:00
description: 'Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted.',
2020-06-15 15:47:44 -07:00
},
{
2020-06-17 12:49:37 -07:00
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Needs Action',
2020-06-17 12:49:37 -07:00
value: 'needsAction',
},
{
name: 'Completed',
2020-06-17 12:49:37 -07:00
value: 'completed',
2020-10-22 06:46:03 -07:00
},
2020-06-17 12:49:37 -07:00
],
default: '',
description: 'Current status of the task.',
},
],
2020-06-15 15:47:44 -07:00
},
/* -------------------------------------------------------------------------- */
/* task:delete */
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
{
displayName: 'TaskList',
name: 'task',
type: 'options',
typeOptions: {
2020-06-17 12:49:37 -07:00
loadOptionsMethod: 'getTasks',
2020-06-15 15:47:44 -07:00
},
required: true,
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'delete',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
2020-06-17 12:49:37 -07:00
default: '',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Task ID',
name: 'taskId',
type: 'string',
required: true,
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'delete',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
2020-06-17 12:49:37 -07:00
default: '',
2020-06-15 15:47:44 -07:00
},
/* -------------------------------------------------------------------------- */
/* task:get */
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
{
displayName: 'TaskList',
name: 'task',
type: 'options',
typeOptions: {
2020-06-17 12:49:37 -07:00
loadOptionsMethod: 'getTasks',
2020-06-15 15:47:44 -07:00
},
required: true,
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'get',
],
resource: [
'task',
],
2020-10-22 06:46:03 -07:00
},
2020-06-15 15:47:44 -07:00
},
2020-06-17 12:49:37 -07:00
default: '',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Task ID',
name: 'taskId',
type: 'string',
required: true,
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'get',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
2020-06-17 12:49:37 -07:00
default: '',
2020-06-15 15:47:44 -07:00
},
/* -------------------------------------------------------------------------- */
/* task:getAll */
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
{
displayName: 'TaskList',
name: 'task',
type: 'options',
typeOptions: {
2020-06-17 12:49:37 -07:00
loadOptionsMethod: 'getTasks',
2020-06-15 15:47:44 -07:00
},
required: true,
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'getAll',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
2020-06-17 12:49:37 -07:00
default: '',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'getAll',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
default: false,
2020-06-17 12:49:37 -07:00
description: 'If all results should be returned or only up to a given limit.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'getAll',
],
resource: [
'task',
],
returnAll: [
false,
],
},
2020-06-15 15:47:44 -07:00
},
typeOptions: {
minValue: 1,
2020-10-22 06:46:03 -07:00
maxValue: 100,
2020-06-15 15:47:44 -07:00
},
default: 20,
2020-06-17 12:49:37 -07:00
description: 'How many results to return.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'getAll',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
options: [
{
displayName: 'Completed Max',
name: 'completedMax',
type: 'dateTime',
default: '',
2020-06-17 12:49:37 -07:00
description: 'Upper bound for a task completion date (as a RFC 3339 timestamp) to filter by.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Completed Min',
name: 'completedMin',
type: 'dateTime',
default: '',
2020-06-17 12:49:37 -07:00
description: 'Lower bound for a task completion date (as a RFC 3339 timestamp) to filter by.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Due Min',
name: 'dueMin',
type: 'dateTime',
default: '',
2020-06-17 12:49:37 -07:00
description: 'Lower bound for a task due date (as a RFC 3339 timestamp) to filter by.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Due Max',
name: 'dueMax',
type: 'dateTime',
default: '',
2020-06-17 12:49:37 -07:00
description: 'Upper bound for a task due date (as a RFC 3339 timestamp) to filter by.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Show Completed',
name: 'showCompleted',
type: 'boolean',
default: true,
description: 'Flag indicating whether completed tasks are returned in the result. <strong>Show Hidden</strong> must also be True to show tasks completed in first party clients such as the web UI or Google\'s mobile apps.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Show Deleted',
name: 'showDeleted',
type: 'boolean',
default: false,
description: 'Flag indicating whether deleted tasks are returned in the result.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Show Hidden',
name: 'showHidden',
type: 'boolean',
default: false,
description: 'Flag indicating whether hidden tasks are returned in the result.',
2020-06-15 15:47:44 -07:00
},
{
2020-06-16 10:28:22 -07:00
displayName: 'Updated Min',
2020-06-15 15:47:44 -07:00
name: 'updatedMin',
type: 'dateTime',
2020-06-17 12:49:37 -07:00
default: '',
description: 'Lower bound for a task last modification time (as a RFC 3339 timestamp) to filter by.',
},
2020-10-22 06:46:03 -07:00
],
2020-06-15 15:47:44 -07:00
},
/* -------------------------------------------------------------------------- */
/* task:update */
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
{
displayName: 'TaskList',
name: 'task',
type: 'options',
typeOptions: {
2020-06-17 12:49:37 -07:00
loadOptionsMethod: 'getTasks',
2020-06-15 15:47:44 -07:00
},
required: true,
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'update',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
2020-06-17 12:49:37 -07:00
default: '',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Task ID',
name: 'taskId',
type: 'string',
required: true,
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'update',
],
resource: [
'task',
],
},
2020-06-15 15:47:44 -07:00
},
2020-06-17 12:49:37 -07:00
default: '',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Update Field',
default: {},
displayOptions: {
show: {
2020-06-17 12:49:37 -07:00
operation: [
'update',
],
resource: [
'task',
],
2020-10-22 06:46:03 -07:00
},
2020-06-15 15:47:44 -07:00
},
options: [
{
displayName: 'Completion Date',
2020-06-15 15:47:44 -07:00
name: 'completed',
type: 'dateTime',
default: '',
2020-06-17 12:49:37 -07:00
description: `Completion date of the task (as a RFC 3339 timestamp). This field is omitted if the task has not been completed.`,
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Deleted',
2020-06-15 15:47:44 -07:00
name: 'deleted',
type: 'boolean',
default: false,
2020-06-17 12:49:37 -07:00
description: 'Flag indicating whether the task has been deleted.',
2020-06-15 15:47:44 -07:00
},
{
displayName: 'Due Date',
name: 'dueDate',
type: 'dateTime',
default: '',
description: 'Due date of the task.',
},
2020-06-15 15:47:44 -07:00
{
2020-06-17 12:49:37 -07:00
displayName: 'Notes',
name: 'notes',
2020-06-15 15:47:44 -07:00
type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
2020-06-15 15:47:44 -07:00
default: '',
2020-06-17 12:49:37 -07:00
description: 'Additional Notes.',
2020-06-15 15:47:44 -07:00
},
{
2020-06-17 12:49:37 -07:00
displayName: 'Previous',
name: 'previous',
2020-06-15 15:47:44 -07:00
type: 'string',
default: '',
2020-06-17 12:49:37 -07:00
description: 'Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted.',
2020-06-15 15:47:44 -07:00
},
{
2020-06-17 12:49:37 -07:00
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Needs Update',
2020-06-17 12:49:37 -07:00
value: 'needsAction',
},
{
name: 'Completed',
2020-06-17 12:49:37 -07:00
value: 'completed',
2020-10-22 06:46:03 -07:00
},
2020-06-17 12:49:37 -07:00
],
default: '',
description: 'Current status of the task.',
},
{
displayName: 'Title',
name: 'title',
2020-06-15 15:47:44 -07:00
type: 'string',
default: '',
2020-06-17 12:49:37 -07:00
description: 'Title of the task.',
},
],
},
];