Initial commit to public repo
This commit is contained in:
		
							parent
							
								
									47b4fc9edc
								
							
						
					
					
						commit
						8dbfbb1b8d
					
				
					 17 changed files with 14953 additions and 1 deletions
				
			
		
							
								
								
									
										137
									
								
								nodes/Plutio/descriptions/CommentDescription.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										137
									
								
								nodes/Plutio/descriptions/CommentDescription.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,137 @@ | |||
| import { | ||||
| 	INodeProperties, | ||||
| } from 'n8n-workflow'; | ||||
| 
 | ||||
| export const commentOperations: INodeProperties[] = [ | ||||
| 	{ | ||||
| 		displayName: 'Operation', | ||||
| 		name: 'operation', | ||||
| 		type: 'options', | ||||
| 		noDataExpression: true, | ||||
| 		required: true, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'comment', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				name: 'Create', | ||||
| 				value: 'create', | ||||
| 				description: 'Create a new comment', | ||||
| 				action: 'Create a comment', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Get', | ||||
| 				value: 'get', | ||||
| 				description: 'Get Comments', | ||||
| 				action: 'Get a comment', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Update', | ||||
| 				value: 'update', | ||||
| 				description: 'Update a comment', | ||||
| 				action: 'Update a comment', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Delete', | ||||
| 				value: 'delete', | ||||
| 				description: 'Delete a comment', | ||||
| 				action: 'Delete a comment', | ||||
| 			}, | ||||
| 		], | ||||
| 		default: 'create', | ||||
| 	}, | ||||
| ]; | ||||
| 
 | ||||
| export const commentDescription: INodeProperties[] = [ | ||||
| 	{ | ||||
| 		displayName: 'Entity ID', | ||||
| 		name: 'entityId', | ||||
| 		type: 'string', | ||||
| 		default: '', | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'comment', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'create', | ||||
| 					'get', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		description: 'Entity ID of comment(could be task ID, conversation ID or file ID)', | ||||
| 	}, | ||||
| 	{ | ||||
| 		displayName: 'Entity Type', | ||||
| 		name: 'entityType', | ||||
| 		type: 'options', | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'comment', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'create', | ||||
| 					'get', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				name: 'File', | ||||
| 				value: 'file', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Conversation', | ||||
| 				value: 'conversation', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Task', | ||||
| 				value: 'task', | ||||
| 			}, | ||||
| 		], | ||||
| 		default: 'task', | ||||
| 	}, | ||||
| 	{ | ||||
| 		displayName: 'Comment ID', | ||||
| 		name: '_id', | ||||
| 		required: true, | ||||
| 		type: 'string', | ||||
| 		default: '', | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'comment', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'update', | ||||
| 					'delete', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		description: 'For GET operation Comment ID or entityType & entityID is required', | ||||
| 	}, | ||||
| 	{ | ||||
| 		displayName: 'Body', | ||||
| 		name: 'bodyHTML', | ||||
| 		type: 'string', | ||||
| 		default: '', | ||||
| 		required: true, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'comment', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'update', | ||||
| 					'create', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		description: 'Comment Body', | ||||
| 	}, | ||||
| ]; | ||||
							
								
								
									
										377
									
								
								nodes/Plutio/descriptions/InvoiceDescription.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										377
									
								
								nodes/Plutio/descriptions/InvoiceDescription.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,377 @@ | |||
| import { | ||||
| 	INodeProperties, | ||||
| } from 'n8n-workflow'; | ||||
| 
 | ||||
| export const invoiceOperations: INodeProperties[] = [ | ||||
| 	{ | ||||
| 		displayName: 'Operation', | ||||
| 		name: 'operation', | ||||
| 		type: 'options', | ||||
| 		noDataExpression: true, | ||||
| 		required: true, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'invoice', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				name: 'Create', | ||||
| 				value: 'create', | ||||
| 				description: 'Create a new invoice', | ||||
| 				action: 'Create an invoice', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Get', | ||||
| 				value: 'get', | ||||
| 				description: 'Get invoices', | ||||
| 				action: 'Get an invoice', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Update', | ||||
| 				value: 'update', | ||||
| 				description: 'Update an invoice', | ||||
| 				action: 'Update an invoice', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Delete', | ||||
| 				value: 'delete', | ||||
| 				description: 'Delete an invoice', | ||||
| 				action: 'Delete an invoice', | ||||
| 			}, | ||||
| 		], | ||||
| 		default: 'create', | ||||
| 	}, | ||||
| ]; | ||||
| 
 | ||||
| export const invoiceDescription: INodeProperties[] = [ | ||||
| 	{ | ||||
| 		displayName: 'Invoice ID', | ||||
| 		name: '_id', | ||||
| 		type: 'string', | ||||
| 		default: '', | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'invoice', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'update', | ||||
| 					'delete', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		description: 'Should be a number or string for discount percentage', | ||||
| 	}, | ||||
| 	{ | ||||
| 		displayName: 'Tax', | ||||
| 		name: 'taxUi', | ||||
| 		type: 'fixedCollection', | ||||
| 		placeholder: 'Add Tax', | ||||
| 		description: 'Key value pairs containing the title and value of the tax', | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'invoice', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'create', | ||||
| 					'update', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		typeOptions: { | ||||
| 			multipleValues: true, | ||||
| 		}, | ||||
| 		default: [], | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				displayName: 'Tax', | ||||
| 				name: 'tax', | ||||
| 				values: [ | ||||
| 					{ | ||||
| 						displayName: 'Title', | ||||
| 						name: 'title', | ||||
| 						type: 'string', | ||||
| 						default: '', | ||||
| 						description: 'Tax title', | ||||
| 					}, | ||||
| 					{ | ||||
| 						displayName: 'Value', | ||||
| 						name: 'value', | ||||
| 						type: 'number', | ||||
| 						default: '', | ||||
| 						description: 'Tax value', | ||||
| 					}, | ||||
| 				], | ||||
| 			}, | ||||
| 		], | ||||
| 	}, | ||||
| 	{ | ||||
| 		displayName: 'Client', | ||||
| 		name: 'clientUi', | ||||
| 		type: 'fixedCollection', | ||||
| 		placeholder: 'Add Client', | ||||
| 		description: 'Key value pairs containing the title and value of the tax', | ||||
| 		default: [], | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'invoice', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'create', | ||||
| 					'update', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				displayName: 'Client', | ||||
| 				name: 'client', | ||||
| 				values: [ | ||||
| 					{ | ||||
| 						displayName: 'Entity Type', | ||||
| 						name: 'entityType', | ||||
| 						type: 'options', | ||||
| 						default: 'person', | ||||
| 						options: [ | ||||
| 							{ | ||||
| 								name: 'Person', | ||||
| 								value: 'person', | ||||
| 							}, | ||||
| 							{ | ||||
| 								name: 'Company', | ||||
| 								value: 'company', | ||||
| 							}, | ||||
| 						], | ||||
| 						description: 'Entity Type could be a person or company', | ||||
| 					}, | ||||
| 					{ | ||||
| 						displayName: 'Entity Name or ID', | ||||
| 						name: '_id', | ||||
| 						type: 'string', | ||||
| 						default: '', | ||||
| 						description: 'Could be a person or company\'s name or ID', | ||||
| 					}, | ||||
| 				], | ||||
| 			}, | ||||
| 		], | ||||
| 	}, | ||||
| 	{ | ||||
| 		displayName: 'Options', | ||||
| 		name: 'options', | ||||
| 		type: 'collection', | ||||
| 		placeholder: 'Add Option', | ||||
| 		default: {}, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'invoice', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'create', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				displayName: 'Invoice Name', | ||||
| 				name: 'name', | ||||
| 				type: 'string', | ||||
| 				default: '', | ||||
| 				description: 'Min-Max Character: 1-500', | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Currency', | ||||
| 				name: 'currency', | ||||
| 				type: 'options', | ||||
| 				default: 'USD', | ||||
| 				options: [ | ||||
| 					{ | ||||
| 						name: 'USD', | ||||
| 						value: 'USD', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'EUR', | ||||
| 						value: 'EUR', | ||||
| 					}, | ||||
| 				], | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Discount', | ||||
| 				name: 'discount', | ||||
| 				type: 'number', | ||||
| 				default: '', | ||||
| 				description: 'Should be a number for discount percentage', | ||||
| 			}, | ||||
| 			{ | ||||
| 				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: 'getInvoiceTemplateId', | ||||
| 				}, | ||||
| 			}, | ||||
| 		], | ||||
| 	}, | ||||
| 	// Options for GET Request
 | ||||
| 	{ | ||||
| 		displayName: 'Options', | ||||
| 		name: 'options', | ||||
| 		type: 'collection', | ||||
| 		placeholder: 'Add Option', | ||||
| 		default: {}, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'invoice', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'get', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				displayName: 'Invoice ID', | ||||
| 				name: '_id', | ||||
| 				type: 'string', | ||||
| 				default: '', | ||||
| 				description: 'Should be a number for discount percentage', | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Invoice Name', | ||||
| 				name: 'name', | ||||
| 				type: 'string', | ||||
| 				default: '', | ||||
| 				description: 'Min-Max Character: 1-500', | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Currency', | ||||
| 				name: 'currency', | ||||
| 				type: 'options', | ||||
| 				default: 'USD', | ||||
| 				options: [ | ||||
| 					{ | ||||
| 						name: 'USD', | ||||
| 						value: 'USD', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'EUR', | ||||
| 						value: 'EUR', | ||||
| 					}, | ||||
| 				], | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Status', | ||||
| 				name: 'status', | ||||
| 				type: 'options', | ||||
| 				default: 'draft', | ||||
| 				options: [ | ||||
| 					{ | ||||
| 						name: 'Draft', | ||||
| 						value: 'draft', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'Pending', | ||||
| 						value: 'pending', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'Paid', | ||||
| 						value: 'paid', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'Cancelled', | ||||
| 						value: 'cancelled', | ||||
| 					}, | ||||
| 				], | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Discount', | ||||
| 				name: 'discount', | ||||
| 				type: 'number', | ||||
| 				default: '', | ||||
| 				description: 'Should be a number for discount percentage', | ||||
| 			}, | ||||
| 		], | ||||
| 	}, | ||||
| 	// Options for Update Operation
 | ||||
| 	{ | ||||
| 		displayName: 'Options', | ||||
| 		name: 'options', | ||||
| 		type: 'collection', | ||||
| 		placeholder: 'Add Option', | ||||
| 		default: {}, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'invoice', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'update', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				displayName: 'Invoice Name', | ||||
| 				name: 'name', | ||||
| 				type: 'string', | ||||
| 				default: '', | ||||
| 				description: 'Min-Max Character: 1-500', | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Currency', | ||||
| 				name: 'currency', | ||||
| 				type: 'options', | ||||
| 				default: 'USD', | ||||
| 				options: [ | ||||
| 					{ | ||||
| 						name: 'USD', | ||||
| 						value: 'USD', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'EUR', | ||||
| 						value: 'EUR', | ||||
| 					}, | ||||
| 				], | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Status', | ||||
| 				name: 'status', | ||||
| 				type: 'options', | ||||
| 				default: 'draft', | ||||
| 				options: [ | ||||
| 					{ | ||||
| 						name: 'Draft', | ||||
| 						value: 'draft', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'Pending', | ||||
| 						value: 'pending', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'Paid', | ||||
| 						value: 'paid', | ||||
| 					}, | ||||
| 					{ | ||||
| 						name: 'Cancelled', | ||||
| 						value: 'cancelled', | ||||
| 					}, | ||||
| 				], | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Discount', | ||||
| 				name: 'discount', | ||||
| 				type: 'number', | ||||
| 				default: '', | ||||
| 				description: 'Should be a number for discount percentage', | ||||
| 			}, | ||||
| 		], | ||||
| 	}, | ||||
| ]; | ||||
							
								
								
									
										175
									
								
								nodes/Plutio/descriptions/ProjectDescription.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										175
									
								
								nodes/Plutio/descriptions/ProjectDescription.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,175 @@ | |||
| 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', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| ]; | ||||
							
								
								
									
										358
									
								
								nodes/Plutio/descriptions/TaskDescription.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										358
									
								
								nodes/Plutio/descriptions/TaskDescription.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,358 @@ | |||
| import { | ||||
| 	INodeProperties, | ||||
| } from 'n8n-workflow'; | ||||
| 
 | ||||
| export const taskOperations: INodeProperties[] = [ | ||||
| 	{ | ||||
| 		displayName: 'Operation', | ||||
| 		name: 'operation', | ||||
| 		type: 'options', | ||||
| 		noDataExpression: true, | ||||
| 		required: true, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'task', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				name: 'Copy', | ||||
| 				value: 'copy', | ||||
| 				description: 'Copy a task', | ||||
| 				action: 'Copy a task', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Create', | ||||
| 				value: 'create', | ||||
| 				description: 'Create a new task', | ||||
| 				action: 'Create a task', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Delete', | ||||
| 				value: 'delete', | ||||
| 				description: 'Delete a task', | ||||
| 				action: 'Delete a task', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Get', | ||||
| 				value: 'get', | ||||
| 				description: 'Get tasks', | ||||
| 				action: 'Get a task', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Move', | ||||
| 				value: 'move', | ||||
| 				description: 'Move a task', | ||||
| 				action: 'Move a task', | ||||
| 			}, | ||||
| 			{ | ||||
| 				name: 'Update', | ||||
| 				value: 'update', | ||||
| 				description: 'Update a task', | ||||
| 				action: 'Update a task', | ||||
| 			}, | ||||
| 		], | ||||
| 		default: 'create', | ||||
| 	}, | ||||
| ]; | ||||
| 
 | ||||
| export const taskDescription: INodeProperties[] = [ | ||||
| 	{ | ||||
| 		displayName: 'Task ID', | ||||
| 		name: '_id', | ||||
| 		type: 'string', | ||||
| 		default: '', | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'task', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'update', | ||||
| 					'move', | ||||
| 					'copy', | ||||
| 					'delete', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		description: 'ID of task', | ||||
| 	}, | ||||
| 	// Options for creating and updating task.
 | ||||
| 	{ | ||||
| 		displayName: 'Options', | ||||
| 		name: 'options', | ||||
| 		type: 'collection', | ||||
| 		placeholder: 'Add Option', | ||||
| 		default: {}, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'task', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'create', | ||||
| 					'update', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				displayName: 'Project Name or ID', | ||||
| 				name: 'projectId', | ||||
| 				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: 'Task Board Name or ID', | ||||
| 				name: 'taskBoardId', | ||||
| 				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: 'getTaskBoardId', | ||||
| 				}, | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Task Group Name or ID', | ||||
| 				name: 'taskGroupId', | ||||
| 				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: 'getTaskGroupId', | ||||
| 				}, | ||||
| 			}, | ||||
| 			{ | ||||
| 				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: 'getTaskTemplateId', | ||||
| 				}, | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Creator Name or ID', | ||||
| 				name: 'createdBy', | ||||
| 				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', | ||||
| 				}, | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Title', | ||||
| 				name: 'title', | ||||
| 				type: 'string', | ||||
| 				default: '', | ||||
| 				description: 'Title of the task', | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Description', | ||||
| 				name: 'descriptionHTML', | ||||
| 				type: 'string', | ||||
| 				default: '', | ||||
| 				description: 'Request Description', | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Custom Fields', | ||||
| 				name: 'customFields', | ||||
| 				type: 'fixedCollection', | ||||
| 				placeholder: 'Add Custom Field', | ||||
| 				typeOptions: { | ||||
| 					multipleValues: true, | ||||
| 				}, | ||||
| 				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: 'getCustomFieldTitle', | ||||
| 								}, | ||||
| 
 | ||||
| 							}, | ||||
| 							{ | ||||
| 								displayName: 'Value Name or ID', | ||||
| 								name: 'value', | ||||
| 								type: 'string', | ||||
| 								default: '', | ||||
| 								description: 'Custom Field\'s values', | ||||
| 							}, | ||||
| 						], | ||||
| 					}, | ||||
| 				], | ||||
| 			}, | ||||
| 		], | ||||
| 	}, | ||||
| 	{ | ||||
| 		displayName: 'Assigned To: Name or ID', | ||||
| 		name: 'assignees', | ||||
| 		type: 'fixedCollection', | ||||
| 		default: [], | ||||
| 		placeholder: 'Add Person', | ||||
| 		typeOptions: { | ||||
| 			multipleValues: true, | ||||
| 		}, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'task', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'update', | ||||
| 					'create', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				displayName: 'Assignee', | ||||
| 				name: 'assignee', | ||||
| 				values: [ | ||||
| 					{ | ||||
| 						displayName: 'Assigned To: 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>.', | ||||
| 	}, | ||||
| 	// move & copy task operation
 | ||||
| 	{ | ||||
| 		displayName: 'Task Group Name or ID', | ||||
| 		name: 'taskGroupId', | ||||
| 		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: 'getTaskGroupId', | ||||
| 		}, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'task', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'move', | ||||
| 					'copy', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		displayName: 'Position', | ||||
| 		name: 'position', | ||||
| 		type: 'number', | ||||
| 		default: '', | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'task', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'move', | ||||
| 					'copy', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		description: 'Should be a number representing task ID after which task should be moved', | ||||
| 	}, | ||||
| 	// Options for GET request
 | ||||
| 	{ | ||||
| 		displayName: 'Options', | ||||
| 		name: 'options', | ||||
| 		type: 'collection', | ||||
| 		placeholder: 'Add Option', | ||||
| 		default: {}, | ||||
| 		displayOptions: { | ||||
| 			show: { | ||||
| 				resource: [ | ||||
| 					'task', | ||||
| 				], | ||||
| 				operation: [ | ||||
| 					'get', | ||||
| 				], | ||||
| 			}, | ||||
| 		}, | ||||
| 		options: [ | ||||
| 			{ | ||||
| 				displayName: 'Task ID', | ||||
| 				name: '_id', | ||||
| 				type: 'string', | ||||
| 				default: '', | ||||
| 				description: 'ID of task', | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Project Name or ID', | ||||
| 				name: 'projectId', | ||||
| 				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: 'Task Board Name or ID', | ||||
| 				name: 'taskBoardId', | ||||
| 				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: 'getTaskBoardId', | ||||
| 				}, | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Task Group Name or ID', | ||||
| 				name: 'taskGroupId', | ||||
| 				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: 'getTaskGroupId', | ||||
| 				}, | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Creator Name or ID', | ||||
| 				name: 'createdBy', | ||||
| 				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', | ||||
| 				}, | ||||
| 			}, | ||||
| 			{ | ||||
| 				displayName: 'Title', | ||||
| 				name: 'title', | ||||
| 				type: 'string', | ||||
| 				default: '', | ||||
| 			}, | ||||
| 		], | ||||
| 	}, | ||||
| ]; | ||||
							
								
								
									
										15
									
								
								nodes/Plutio/descriptions/index.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								nodes/Plutio/descriptions/index.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| import { taskDescription, taskOperations } from './TaskDescription'; | ||||
| import { commentDescription, commentOperations } from './CommentDescription'; | ||||
| import { invoiceDescription, invoiceOperations } from './InvoiceDescription'; | ||||
| import { projectDescription, projectOperations } from './ProjectDescription'; | ||||
| 
 | ||||
| export { | ||||
| 	taskOperations, | ||||
| 	taskDescription, | ||||
| 	commentOperations, | ||||
| 	commentDescription, | ||||
| 	invoiceOperations, | ||||
| 	invoiceDescription, | ||||
| 	projectOperations, | ||||
| 	projectDescription, | ||||
| }; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue