updated api endpoint to v1.10 and fixed projects resource
This commit is contained in:
commit
03cb3bbce3
22 changed files with 8413 additions and 0 deletions
289
nodes/Plutio/descriptions/ProjectDescription.ts
Normal file
289
nodes/Plutio/descriptions/ProjectDescription.ts
Normal file
|
@ -0,0 +1,289 @@
|
|||
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: 'Chykalophia',
|
||||
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: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'project',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Project Name',
|
||||
name: 'name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Name of Project',
|
||||
},
|
||||
{
|
||||
displayName: 'Template Name or ID',
|
||||
name: 'templateId',
|
||||
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: 'getProjectTemplateId',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName: 'Custom Fields',
|
||||
name: 'customFields',
|
||||
type: 'fixedCollection',
|
||||
placeholder: 'Add Custom Field',
|
||||
typeOptions: {
|
||||
multipleValues: true,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'project',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'Key value pairs containing the name and value of the custom field. Only dates in the format YYYY-MM-DD are accepted as input for custom date fields.',
|
||||
default: [],
|
||||
options: [
|
||||
{
|
||||
displayName: 'Custom Field',
|
||||
name: 'customField',
|
||||
values: [
|
||||
{
|
||||
displayName: 'Custom Field Name or ID',
|
||||
name: '_id',
|
||||
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: 'getProjectCustomField',
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Value Name or ID',
|
||||
name: 'value',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Custom Field\'s values',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName: 'Contributors',
|
||||
name: 'contributorsUi',
|
||||
type: 'fixedCollection',
|
||||
default: [],
|
||||
placeholder: 'Add Person',
|
||||
typeOptions: {
|
||||
multipleValues: true,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'project',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Contributors',
|
||||
name: 'contributors',
|
||||
values: [
|
||||
{
|
||||
displayName: 'Contributors: Name or ID',
|
||||
name: 'value',
|
||||
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: 'getUsers',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
description: 'Name or ID of the user to whom the task has been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
|
||||
},
|
||||
{
|
||||
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: '_id',
|
||||
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',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue