n8n-nodes-base
Version:
Base nodes of n8n
1,317 lines • 91.4 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Asana = void 0;
const change_case_1 = require("change-case");
const moment_timezone_1 = __importDefault(require("moment-timezone"));
const n8n_workflow_1 = require("n8n-workflow");
const GenericFunctions_1 = require("./GenericFunctions");
class Asana {
description = {
displayName: 'Asana',
name: 'asana',
icon: 'file:asana.svg',
group: ['input'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Consume Asana REST API',
defaults: {
name: 'Asana',
},
usableAsTool: true,
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
credentials: [
{
name: 'asanaApi',
required: true,
displayOptions: {
show: {
authentication: ['accessToken'],
},
},
testedBy: {
request: {
method: 'GET',
url: '/users/me',
},
},
},
{
name: 'asanaOAuth2Api',
required: true,
displayOptions: {
show: {
authentication: ['oAuth2'],
},
},
},
],
requestDefaults: {
baseURL: 'https://app.asana.com/api/1.0',
url: '',
},
properties: [
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'Access Token',
value: 'accessToken',
},
{
name: 'OAuth2',
value: 'oAuth2',
},
],
default: 'accessToken',
},
{
displayName: 'Resource',
name: 'resource',
type: 'options',
noDataExpression: true,
options: [
{
name: 'Project',
value: 'project',
},
{
name: 'Subtask',
value: 'subtask',
},
{
name: 'Task',
value: 'task',
},
{
name: 'Task Comment',
value: 'taskComment',
},
{
name: 'Task Project',
value: 'taskProject',
},
{
name: 'Task Tag',
value: 'taskTag',
},
{
name: 'User',
value: 'user',
},
],
default: 'task',
},
// ----------------------------------
// subtask
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['subtask'],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a subtask',
action: 'Create a subtask',
},
{
name: 'Get Many',
value: 'getAll',
description: 'Get many subtasks',
action: 'Get many subtasks',
},
],
default: 'create',
},
// ----------------------------------
// subtask:create
// ----------------------------------
{
displayName: 'Parent Task ID',
name: 'taskId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['create'],
resource: ['subtask'],
},
},
description: 'The task to operate on',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['create'],
resource: ['subtask'],
},
},
description: 'The name of the subtask to create',
},
{
displayName: 'Additional Fields',
name: 'otherProperties',
type: 'collection',
displayOptions: {
show: {
resource: ['subtask'],
operation: ['create'],
},
},
default: {},
placeholder: 'Add Field',
options: [
{
displayName: 'Assignee Name or ID',
name: 'assignee',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'Set Assignee on the subtask. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Assignee Status',
name: 'assignee_status',
type: 'options',
options: [
{
name: 'Inbox',
value: 'inbox',
},
{
name: 'Today',
value: 'today',
},
{
name: 'Upcoming',
value: 'upcoming',
},
{
name: 'Later',
value: 'later',
},
],
default: 'inbox',
description: 'Set Assignee status on the subtask (requires Assignee)',
},
{
displayName: 'Completed',
name: 'completed',
type: 'boolean',
default: false,
description: 'Whether the subtask should be marked completed',
},
{
displayName: 'Due On',
name: 'due_on',
type: 'dateTime',
default: '',
description: 'Date on which the time is due',
},
{
displayName: 'Liked',
name: 'liked',
type: 'boolean',
default: false,
description: 'Whether the task is liked by the authorized user',
},
{
displayName: 'Notes',
name: 'notes',
type: 'string',
typeOptions: {
rows: 5,
},
default: '',
description: 'The task notes',
},
{
displayName: 'Workspace Name or ID',
name: 'workspace',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getWorkspaces',
},
default: '',
description: 'The workspace to create the subtask in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
],
},
// ----------------------------------
// subtask:getAll
// ----------------------------------
{
displayName: 'Parent Task ID',
name: 'taskId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['getAll'],
resource: ['subtask'],
},
},
description: 'The task to operate on',
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: ['getAll'],
resource: ['subtask'],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: ['getAll'],
resource: ['subtask'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'Max number of results to return',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
displayOptions: {
show: {
operation: ['getAll'],
resource: ['subtask'],
},
},
default: {},
placeholder: 'Add Field',
options: [
{
displayName: 'Field Names or IDs',
name: 'opt_fields',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getTaskFields',
},
default: ['gid', 'name', 'resource_type'],
description: 'Defines fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Pretty',
name: 'opt_pretty',
type: 'boolean',
default: false,
description: 'Whether to provide “pretty” output',
},
],
},
// ----------------------------------
// task
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['task'],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a task',
action: 'Create a task',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a task',
action: 'Delete a task',
},
{
name: 'Get',
value: 'get',
description: 'Get a task',
action: 'Get a task',
},
{
name: 'Get Many',
value: 'getAll',
description: 'Get many tasks',
action: 'Get many tasks',
},
{
name: 'Move',
value: 'move',
description: 'Move a task',
action: 'Move a task',
},
{
name: 'Search',
value: 'search',
description: 'Search for tasks',
action: 'Search a task',
},
{
name: 'Update',
value: 'update',
description: 'Update a task',
action: 'Update a task',
},
],
default: 'create',
},
// ----------------------------------
// task:create
// ----------------------------------
{
displayName: 'Workspace Name or ID',
name: 'workspace',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getWorkspaces',
},
options: [],
default: '',
required: true,
displayOptions: {
show: {
operation: ['create'],
resource: ['task'],
},
},
description: 'The workspace to create the task in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['create'],
resource: ['task'],
},
},
description: 'The name of the task to create',
},
// ----------------------------------
// task:delete
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['delete'],
resource: ['task'],
},
},
description: 'The ID of the task to delete',
},
// ----------------------------------
// task:get
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['get'],
resource: ['task'],
},
},
description: 'The ID of the task to get the data of',
},
// ----------------------------------
// task:getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: ['getAll'],
resource: ['task'],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: ['getAll'],
resource: ['task'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'Max number of results to return',
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
displayOptions: {
show: {
operation: ['getAll'],
resource: ['task'],
},
},
default: {},
description: 'Properties to search for',
placeholder: 'Add Filter',
options: [
{
displayName: 'Assignee Name or ID',
name: 'assignee',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'The assignee to filter tasks on. Note: If you specify assignee, you must also specify the workspace to filter on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Field Names or IDs',
name: 'opt_fields',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getTaskFields',
},
default: ['gid', 'name', 'resource_type'],
description: 'Defines fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Pretty',
name: 'opt_pretty',
type: 'boolean',
default: false,
description: 'Whether to provide “pretty” output',
},
{
displayName: 'Project Name or ID',
name: 'project',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
default: '',
description: 'The project to filter tasks on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Section Name or ID',
name: 'section',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getSections',
},
default: '',
description: 'The section to filter tasks on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Workspace Name or ID',
name: 'workspace',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getWorkspaces',
},
default: '',
description: 'The workspace to filter tasks on. Note: If you specify workspace, you must also specify the assignee to filter on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Completed Since',
name: 'completed_since',
type: 'dateTime',
default: '',
description: 'Only return tasks that are either incomplete or that have been completed since this time',
},
{
displayName: 'Modified Since',
name: 'modified_since',
type: 'dateTime',
default: '',
description: 'Only return tasks that have been modified since the given time',
},
],
},
// ----------------------------------
// task:move
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['move'],
resource: ['task'],
},
},
description: 'The ID of the task to be moved',
},
{
displayName: 'Project Name or ID',
name: 'projectId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
options: [],
default: '',
required: true,
displayOptions: {
show: {
operation: ['move'],
resource: ['task'],
},
},
description: 'Project to show the sections of. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Section Name or ID',
name: 'section',
type: 'options',
typeOptions: {
loadOptionsDependsOn: ['projectId'],
loadOptionsMethod: 'getSections',
},
options: [],
default: '',
required: true,
displayOptions: {
show: {
operation: ['move'],
resource: ['task'],
},
},
description: 'The Section to move the task to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
// ----------------------------------
// task:update
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['update'],
resource: ['task'],
},
},
description: 'The ID of the task to update the data of',
},
// ----------------------------------
// task:search
// ----------------------------------
{
displayName: 'Workspace Name or ID',
name: 'workspace',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getWorkspaces',
},
options: [],
default: '',
required: true,
displayOptions: {
show: {
operation: ['search'],
resource: ['task'],
},
},
description: 'The workspace in which the task is searched. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Filters',
name: 'searchTaskProperties',
type: 'collection',
displayOptions: {
show: {
operation: ['search'],
resource: ['task'],
},
},
default: {},
description: 'Properties to search for',
placeholder: 'Add Filter',
options: [
{
displayName: 'Completed',
name: 'completed',
type: 'boolean',
default: false,
description: 'Whether the task is marked completed',
},
{
displayName: 'Text',
name: 'text',
type: 'string',
typeOptions: {
rows: 5,
},
default: '',
description: 'Text to search for in name or notes',
},
],
},
// ----------------------------------
// task:create/update
// ----------------------------------
{
displayName: 'Additional Fields',
name: 'otherProperties',
type: 'collection',
displayOptions: {
show: {
resource: ['task'],
operation: ['create', 'update'],
},
},
default: {},
placeholder: 'Add Field',
options: [
{
displayName: 'Assignee Name or ID',
name: 'assignee',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'Set Assignee on the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Assignee Status',
name: 'assignee_status',
type: 'options',
options: [
{
name: 'Inbox',
value: 'inbox',
},
{
name: 'Today',
value: 'today',
},
{
name: 'Upcoming',
value: 'upcoming',
},
{
name: 'Later',
value: 'later',
},
],
default: 'inbox',
description: 'Set Assignee status on the task (requires Assignee)',
},
{
displayName: 'Completed',
name: 'completed',
type: 'boolean',
default: false,
description: 'Whether the task should be marked completed',
},
{
displayName: 'Due On',
name: 'due_on',
type: 'dateTime',
default: '',
description: 'Date on which the time is due',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
displayOptions: {
show: {
'/operation': ['update'],
},
},
description: 'The new name of the task',
},
{
displayName: 'Liked',
name: 'liked',
type: 'boolean',
default: false,
description: 'Whether the task is liked by the authorized user',
},
{
displayName: 'Notes',
name: 'notes',
type: 'string',
typeOptions: {
rows: 5,
},
default: '',
description: 'The task notes',
},
{
displayName: 'Project Names or IDs',
name: 'projects',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
default: [],
description: 'The project to filter tasks on. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
],
},
// ----------------------------------
// taskComment
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['taskComment'],
},
},
options: [
{
name: 'Add',
value: 'add',
description: 'Add a comment to a task',
action: 'Add a task comment',
},
{
name: 'Remove',
value: 'remove',
description: 'Remove a comment from a task',
action: 'Remove a task comment',
},
],
default: 'add',
},
// ----------------------------------
// taskComment:add
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['add'],
resource: ['taskComment'],
},
},
description: 'The ID of the task to add the comment to',
},
{
displayName: 'Is Text HTML',
name: 'isTextHtml',
type: 'boolean',
displayOptions: {
show: {
operation: ['add'],
resource: ['taskComment'],
},
},
default: false,
description: 'Whether body is HTML or simple text',
},
{
displayName: 'Text',
name: 'text',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['add'],
resource: ['taskComment'],
isTextHtml: [false],
},
},
description: 'The plain text of the comment to add',
},
{
displayName: 'HTML Text',
name: 'text',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['add'],
resource: ['taskComment'],
isTextHtml: [true],
},
},
description: 'Comment as HTML string. Do not use together with plain text.',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
displayOptions: {
show: {
operation: ['add'],
resource: ['taskComment'],
},
},
default: {},
description: 'Properties of the task comment',
placeholder: 'Add Field',
options: [
{
displayName: 'Pinned',
name: 'is_pinned',
type: 'boolean',
default: false,
description: 'Whether to pin the comment',
},
],
},
// ----------------------------------
// taskComment:remove
// ----------------------------------
{
displayName: 'Comment ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['remove'],
resource: ['taskComment'],
},
},
description: 'The ID of the comment to be removed',
},
// ----------------------------------
// taskProject
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['taskProject'],
},
},
options: [
{
name: 'Add',
value: 'add',
description: 'Add a task to a project',
action: 'Add a task project',
},
{
name: 'Remove',
value: 'remove',
description: 'Remove a task from a project',
action: 'Remove a task project',
},
],
default: 'add',
},
// ----------------------------------
// taskProject:add
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['add'],
resource: ['taskProject'],
},
},
description: 'The ID of the task to add the project to',
},
{
displayName: 'Project Name or ID',
name: 'project',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
default: '',
required: true,
displayOptions: {
show: {
operation: ['add'],
resource: ['taskProject'],
},
},
description: 'The project where the task will be added. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
displayOptions: {
show: {
resource: ['taskProject'],
operation: ['add'],
},
},
default: {},
description: 'Other properties to set',
placeholder: 'Add Field',
options: [
{
displayName: 'Insert After',
name: 'insert_after',
type: 'string',
default: '',
description: 'A task in the project to insert the task after, or null to insert at the beginning of the list',
},
{
displayName: 'Insert Before',
name: 'insert_before',
type: 'string',
default: '',
description: 'A task in the project to insert the task before, or null to insert at the end of the list',
},
{
displayName: 'Section',
name: 'section',
type: 'string',
default: '',
description: 'A section in the project to insert the task into. The task will be inserted at the bottom of the section.',
},
],
},
// ----------------------------------
// taskProject:remove
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['remove'],
resource: ['taskProject'],
},
},
description: 'The ID of the task to add the project to',
},
{
displayName: 'Project Name or ID',
name: 'project',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProjects',
},
default: '',
required: true,
displayOptions: {
show: {
operation: ['remove'],
resource: ['taskProject'],
},
},
description: 'The project where the task will be removed from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
// ----------------------------------
// taskTag
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['taskTag'],
},
},
options: [
{
name: 'Add',
value: 'add',
description: 'Add a tag to a task',
action: 'Add a task tag',
},
{
name: 'Remove',
value: 'remove',
description: 'Remove a tag from a task',
action: 'Remove a task tag',
},
],
default: 'add',
},
// ----------------------------------
// taskTag:add
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['add'],
resource: ['taskTag'],
},
},
description: 'The ID of the task to add the tag to',
},
{
displayName: 'Tags Name or ID',
name: 'tag',
type: 'options',
typeOptions: {
loadOptionsDependsOn: ['id'],
loadOptionsMethod: 'getTags',
},
default: '',
required: true,
displayOptions: {
show: {
operation: ['add'],
resource: ['taskTag'],
},
},
description: 'The tag that should be added. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
// ----------------------------------
// taskTag:remove
// ----------------------------------
{
displayName: 'Task ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['remove'],
resource: ['taskTag'],
},
},
description: 'The ID of the task to add the tag to',
},
{
displayName: 'Tags Name or ID',
name: 'tag',
type: 'options',
typeOptions: {
loadOptionsDependsOn: ['id'],
loadOptionsMethod: 'getTags',
},
default: '',
required: true,
displayOptions: {
show: {
operation: ['remove'],
resource: ['taskTag'],
},
},
description: 'The tag that should be added. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
// ----------------------------------
// user
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['user'],
},
},
options: [
{
name: 'Get',
value: 'get',
description: 'Get a user',
action: 'Get a user',
},
{
name: 'Get Many',
value: 'getAll',
description: 'Get many users',
action: 'Get many users',
},
],
default: 'get',
},
// ----------------------------------
// user:get
// ----------------------------------
{
displayName: 'User ID',
name: 'userId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['get'],
resource: ['user'],
},
},
description: 'An identifier for the user to get data of. Can be one of an email address,the globally unique identifier for the user, or the keyword me to indicate the current user making the request.',
},
// ----------------------------------
// user:getAll
// ----------------------------------
{
displayName: 'Workspace Name or ID',
name: 'workspace',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getWorkspaces',
},
options: [],
default: '',
required: true,
displayOptions: {
show: {
operation: ['getAll'],
resource: ['user'],
},
},
description: 'The workspace in which to get users. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
// ----------------------------------
// Project
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['project'],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new project',
action: 'Create a project',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a project',
action: 'Delete a project',
},
{
name: 'Get',
value: 'get',
description: 'Get a project',
action: 'Get a project',
},
{
name: 'Get Many',
value: 'getAll',
description: 'Get many projects',
action: 'Get many projects',
},
{
name: 'Update',
value: 'update',
description: 'Update a project',
action: 'Update a project',
},
],
default: 'get',
},
// ----------------------------------
// project:create
// ----------------------------------
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: ['create'],
resource: ['project'],
},
},
description: 'The name of the project to create',
},
{
displayName: 'Workspace Name or ID',
name: 'workspace',
type: