n8n-nodes-plutio/nodes/Plutio/descriptions/ProjectDescription.ts

176 lines
3.4 KiB
TypeScript

import {
INodeProperties,
} from 'n8n-workflow';
export const projectOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
required: true,
displayOptions: {
show: {
resource: [
'project',
],
},
},
options: [
{
name: 'Copy',
value: 'copy',
description: 'Copy a project',
action: 'Copy a project',
},
{
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 projects',
action: 'Get a project',
},
{
name: 'Get CKLPH',
value: 'getCklph',
description: 'Get projects by contributor\'s email for CKLPH',
action: 'Get a project',
},
{
name: 'Move',
value: 'move',
description: 'Move a project',
action: 'Move a project',
},
{
name: 'Update',
value: 'update',
description: 'Update a project',
action: 'Update a project',
},
],
default: 'getCklph',
},
];
export const projectDescription: INodeProperties[] = [
{
displayName: 'Project ID',
name: '_id',
type: 'string',
default: '',
displayOptions: {
show: {
resource: [
'project',
],
operation: [
'update',
'move',
'copy',
'delete',
],
},
},
description: 'ID of Project',
},
{
displayName: 'Index',
name: 'index',
type: 'number',
default: '',
displayOptions: {
show: {
resource: [
'project',
],
operation: [
'move',
'copy',
],
},
},
description: 'Should be a number representing project ID after which project should be moved',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
show: {
resource: [
'project',
],
operation: [
'get',
],
},
},
options: [
{
displayName: 'Contributor\'s Email\, Name or ID',
name: 'contributor',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getEmails',
},
},
{
displayName: 'Project Name or ID',
name: 'name',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getProjectId',
},
},
{
displayName: 'Client Name or ID',
name: 'name',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getProjectId',
},
},
],
},
{
displayName: 'Contributor\'s Email\, Name or ID',
name: 'contributor',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getEmails',
},
displayOptions: {
show: {
resource: [
'project',
],
operation: [
'getCklph',
],
},
},
},
];