updated api endpoint to v1.10 and fixed projects resource
This commit is contained in:
commit
03cb3bbce3
|
@ -0,0 +1,17 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[package.json]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
|
@ -0,0 +1,51 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
|
||||
env: {
|
||||
browser: true,
|
||||
es6: true,
|
||||
node: true,
|
||||
},
|
||||
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.json'],
|
||||
sourceType: 'module',
|
||||
extraFileExtensions: ['.json'],
|
||||
},
|
||||
ignorePatterns: [
|
||||
'.eslintrc.js',
|
||||
'**/*.js',
|
||||
'**/node_modules/**',
|
||||
'**/dist/**',
|
||||
],
|
||||
|
||||
overrides: [
|
||||
{
|
||||
files: ['package.json'],
|
||||
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||
extends: ['plugin:n8n-nodes-base/community'],
|
||||
},
|
||||
{
|
||||
files: ['./credentials/**/*.ts'],
|
||||
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||
extends: ['plugin:n8n-nodes-base/credentials'],
|
||||
rules: {
|
||||
'n8n-nodes-base/cred-class-field-documentation-url-missing': 'off',
|
||||
'n8n-nodes-base/cred-class-field-documentation-url-miscased': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['./nodes/**/*.ts'],
|
||||
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||
extends: ['plugin:n8n-nodes-base/nodes'],
|
||||
rules: {
|
||||
'n8n-nodes-base/node-execute-block-missing-continue-on-fail': 'off',
|
||||
'n8n-nodes-base/node-resource-description-filename-against-convention': 'off',
|
||||
'n8n-nodes-base/node-param-fixed-collection-type-unsorted-items': 'off',
|
||||
'n8n-nodes-base/node-execute-block-operation-missing-singular-pairing': 'off',
|
||||
'n8n-nodes-base/node-execute-block-operation-missing-plural-pairing': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
|
@ -0,0 +1,8 @@
|
|||
node_modules
|
||||
.DS_Store
|
||||
.tmp
|
||||
tmp
|
||||
dist
|
||||
npm-debug.log*
|
||||
yarn.lock
|
||||
.vscode/launch.json
|
|
@ -0,0 +1,51 @@
|
|||
module.exports = {
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#semicolons
|
||||
*/
|
||||
semi: true,
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#trailing-commas
|
||||
*/
|
||||
trailingComma: 'all',
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#bracket-spacing
|
||||
*/
|
||||
bracketSpacing: true,
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#tabs
|
||||
*/
|
||||
useTabs: true,
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#tab-width
|
||||
*/
|
||||
tabWidth: 2,
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#arrow-function-parentheses
|
||||
*/
|
||||
arrowParens: 'always',
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#quotes
|
||||
*/
|
||||
singleQuote: true,
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#quote-props
|
||||
*/
|
||||
quoteProps: 'as-needed',
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#end-of-line
|
||||
*/
|
||||
endOfLine: 'lf',
|
||||
|
||||
/**
|
||||
* https://prettier.io/docs/en/options.html#print-width
|
||||
*/
|
||||
printWidth: 100,
|
||||
};
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"EditorConfig.EditorConfig",
|
||||
"esbenp.prettier-vscode",
|
||||
]
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
Copyright <YEAR> <COPYRIGHT HOLDER>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,29 @@
|
|||
# n8n-nodes-plutio
|
||||
This repo contains the N8N Plutio node created by Chykalophia.
|
||||
|
||||
We created this N8N module so that we could internet our internal tools together. This module connects via the Plutio API to manage:
|
||||
|
||||
- Tasks
|
||||
- Projects
|
||||
- Comments
|
||||
- Invoices
|
||||
|
||||
# About Chykalophia
|
||||
|
||||
We are a team of dedicated nerds and creatived working with women-led brands to fast-forward their business in all things brand and web. We provide brand strategy, brand design, marketing strategy, tech infrastructure, business process and change management, SaaS and website creation services.
|
||||
|
||||
## About Plutio
|
||||
|
||||
[Plutio](https://plutio.com) is a project management tool that includes tasks, projects, invoices and more.
|
||||
|
||||
## Using this Custom node & Installtion
|
||||
|
||||
Update N8N to version 0.193.5 or higher.
|
||||
|
||||
Go to N8N Settings -> Community nodes -> Install a community node -> write `n8n-nodes-plutio`
|
||||
|
||||
Note: You need to have owner/administrator privilege to install community node.
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
|
|
@ -0,0 +1,116 @@
|
|||
import {
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
ICredentialDataDecryptedObject,
|
||||
IAuthenticateGeneric,
|
||||
IExecuteFunctions,
|
||||
ICredentialTestRequest,
|
||||
NodeApiError,
|
||||
IDataObject,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class PlutioApi implements ICredentialType {
|
||||
name = 'plutioApi';
|
||||
displayName = 'Plutio API';
|
||||
extends = ['oAuth2Api'];
|
||||
properties: INodeProperties[] = [
|
||||
// {
|
||||
// displayName: 'Grant Type',
|
||||
// name: 'grantType',
|
||||
// type: 'hidden',
|
||||
// default: 'client_credentials',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Scope',
|
||||
// name: 'scope',
|
||||
// type: 'hidden',
|
||||
// default: '*',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Authentication',
|
||||
// name: 'authentication',
|
||||
// type: 'hidden',
|
||||
// default: 'header',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Access Token URL',
|
||||
// name: 'accessTokenUrl',
|
||||
// type: 'hidden',
|
||||
// default: 'https://api.plutio.com/v1.10/oauth/token',
|
||||
// },
|
||||
{
|
||||
displayName: 'Client ID',
|
||||
name: 'clientId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Client Secret',
|
||||
name: 'clientSecret',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Business',
|
||||
name: 'business',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
// async preAuthentication(this: IExecuteFunctions, credentials: ICredentialDataDecryptedObject) {
|
||||
// const endpoint = 'api.plutio.com/v1.10';
|
||||
// const returnData: IDataObject[] = [];
|
||||
// let access_token;
|
||||
// try {
|
||||
// access_token = await this.helpers.httpRequest({
|
||||
// method: 'POST',
|
||||
// url: `https://${endpoint}/oauth/token`,
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// 'business': `${credentials.business}`,
|
||||
// },
|
||||
// body: {
|
||||
// 'client_id': `${credentials.clientId}`,
|
||||
// 'client_secret': `${credentials.clientSecret}`,
|
||||
// 'grant_type': 'client_credentials',
|
||||
// },
|
||||
// json: true,
|
||||
// }) as {access_token: IDataObject};
|
||||
// if (Array.isArray(access_token)) {
|
||||
// returnData.push.apply(returnData, access_token as IDataObject[]);
|
||||
// } else {
|
||||
// if (access_token === undefined) {
|
||||
// access_token = {
|
||||
// success: true,
|
||||
// };
|
||||
// }
|
||||
// returnData.push(access_token as IDataObject);
|
||||
// }
|
||||
// if (returnData[0].accessToken) {
|
||||
// return {accessToken: returnData[0].accessToken};
|
||||
// }
|
||||
// } catch (error) {
|
||||
// throw new NodeApiError(this.getNode(), error);
|
||||
// }
|
||||
// }
|
||||
// authenticate: IAuthenticateGeneric = {
|
||||
// type: 'generic',
|
||||
// properties: {
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// 'Business': '={{$credentials.business}}',
|
||||
// 'Authorization': '=Bearer {{$credentials.accessToken}}',
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
// test: ICredentialTestRequest = {
|
||||
// request: {
|
||||
// baseURL: 'https://api.plutio.com/v1.10',
|
||||
// url: '/templates',
|
||||
// },
|
||||
// };
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
const path = require('path');
|
||||
const { task, src, dest } = require('gulp');
|
||||
|
||||
task('build:icons', copyIcons);
|
||||
|
||||
function copyIcons() {
|
||||
const nodeSource = path.resolve('nodes', '**', '*.{png,svg}');
|
||||
const nodeDestination = path.resolve('dist', 'nodes');
|
||||
|
||||
src(nodeSource).pipe(dest(nodeDestination));
|
||||
|
||||
const credSource = path.resolve('credentials', '**', '*.{png,svg}');
|
||||
const credDestination = path.resolve('dist', 'credentials');
|
||||
|
||||
return src(credSource).pipe(dest(credDestination));
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject, NodeApiError
|
||||
} from 'n8n-workflow';
|
||||
|
||||
// Rest API for generating access token
|
||||
async function plutioApiRequestToken(this: IExecuteFunctions | ILoadOptionsFunctions): Promise<any> { // tslint:disable-line:no-any
|
||||
const credentials = await this.getCredentials('plutioApi');
|
||||
const clientId = `${credentials.clientId}`;
|
||||
const clientSecret = `${credentials.clientSecret}`;
|
||||
const business = `${credentials.business}`;
|
||||
const endpoint = 'api.plutio.com/v1.10';
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
let responseData;
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'business': business,
|
||||
},
|
||||
method: 'POST',
|
||||
body: {
|
||||
'client_id': clientId,
|
||||
'client_secret': clientSecret,
|
||||
'grant_type': 'client_credentials',
|
||||
},
|
||||
uri: `https://${endpoint}/oauth/token`,
|
||||
json: true,
|
||||
};
|
||||
try {
|
||||
responseData = await this.helpers.request!(options);
|
||||
if (Array.isArray(responseData)) {
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
} else {
|
||||
if (responseData === undefined) {
|
||||
responseData = {
|
||||
success: true,
|
||||
};
|
||||
}
|
||||
returnData.push(responseData as IDataObject);
|
||||
}
|
||||
if (returnData[0].accessToken) {
|
||||
return returnData[0].accessToken;
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
}
|
||||
|
||||
// Rest API function for plutio node.
|
||||
export async function plutioApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
const endpoint = 'api.plutio.com/v1.10';
|
||||
const credentials = await this.getCredentials('plutioApi');
|
||||
const plutioApiToken = await plutioApiRequestToken.call(this);
|
||||
const business = `${credentials.business}`;
|
||||
|
||||
let options: OptionsWithUri = {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${Buffer.from(plutioApiToken).toString()}`,
|
||||
'Business': business,
|
||||
},
|
||||
method,
|
||||
body,
|
||||
qs: query,
|
||||
uri: uri || `https://${endpoint}${resource}`,
|
||||
json: true,
|
||||
};
|
||||
if (!Object.keys(body).length) {
|
||||
delete options.body;
|
||||
}
|
||||
if (!Object.keys(query).length) {
|
||||
delete options.qs;
|
||||
}
|
||||
options = Object.assign({}, options, option);
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
}
|
||||
|
||||
export function capitalize(s: string): string {
|
||||
if (typeof s !== 'string') return '';
|
||||
return s.charAt(0).toUpperCase() + s.slice(1);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -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',
|
||||
},
|
||||
];
|
|
@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
|
@ -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',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
|
@ -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: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
|
@ -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,
|
||||
};
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "n8n-nodes-plutio",
|
||||
"version": "0.1.0",
|
||||
"description": "Custom n8n node module for Plutio.",
|
||||
"keywords": [
|
||||
"n8n-community-node-package"
|
||||
],
|
||||
"license": "MIT",
|
||||
"homepage": "https://chykalophia.com",
|
||||
"author": {
|
||||
"name": "Joel Sanguenza",
|
||||
"email": "joel@chykalophia.com"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://git.cklph.dev/Chykalophia-Internal/n8n-custom-nodes.git"
|
||||
},
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc && gulp build:icons",
|
||||
"dev": "tsc --watch",
|
||||
"format": "prettier nodes credentials --write",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json",
|
||||
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json",
|
||||
"prepare": "npm run build && npm run lint"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"n8n": {
|
||||
"n8nNodesApiVersion": 1,
|
||||
"credentials": [
|
||||
"dist/credentials/PlutioApi.credentials.js"
|
||||
],
|
||||
"nodes": [
|
||||
"dist/nodes/Plutio/Plutio.node.js"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/request-promise-native": "~1.0.15",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"eslint-plugin-n8n-nodes-base": "^1.5.1",
|
||||
"gulp": "^4.0.2",
|
||||
"n8n-core": "^0.125.0",
|
||||
"n8n-workflow": "^0.107.0",
|
||||
"prettier": "^2.7.1",
|
||||
"tslint": "^6.1.2",
|
||||
"typescript": "~4.6.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"es2017",
|
||||
"es2019"
|
||||
],
|
||||
"types": [
|
||||
"node",
|
||||
],
|
||||
"module": "commonjs",
|
||||
"noImplicitAny": true,
|
||||
"removeComments": true,
|
||||
"strictNullChecks": true,
|
||||
"strict": true,
|
||||
"preserveConstEnums": true,
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true,
|
||||
"outDir": "./dist/",
|
||||
"target": "es2019",
|
||||
"sourceMap": true,
|
||||
"esModuleInterop": true,
|
||||
"useUnknownInCatchVariables": false,
|
||||
},
|
||||
"include": [
|
||||
"credentials/**/*",
|
||||
"nodes/**/*",
|
||||
"nodes/**/*.json",
|
||||
// "package.json",
|
||||
],
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
{
|
||||
"linterOptions": {
|
||||
"exclude": [
|
||||
"node_modules/**/*"
|
||||
]
|
||||
},
|
||||
"defaultSeverity": "error",
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"array-type": [
|
||||
true,
|
||||
"array-simple"
|
||||
],
|
||||
"arrow-return-shorthand": true,
|
||||
"ban": [
|
||||
true,
|
||||
{
|
||||
"name": "Array",
|
||||
"message": "tsstyle#array-constructor"
|
||||
}
|
||||
],
|
||||
"ban-types": [
|
||||
true,
|
||||
[
|
||||
"Object",
|
||||
"Use {} instead."
|
||||
],
|
||||
[
|
||||
"String",
|
||||
"Use 'string' instead."
|
||||
],
|
||||
[
|
||||
"Number",
|
||||
"Use 'number' instead."
|
||||
],
|
||||
[
|
||||
"Boolean",
|
||||
"Use 'boolean' instead."
|
||||
]
|
||||
],
|
||||
"class-name": true,
|
||||
"curly": [
|
||||
true,
|
||||
"ignore-same-line"
|
||||
],
|
||||
"forin": true,
|
||||
"jsdoc-format": true,
|
||||
"label-position": true,
|
||||
"indent": [
|
||||
true,
|
||||
"tabs",
|
||||
2
|
||||
],
|
||||
"member-access": [
|
||||
true,
|
||||
"no-public"
|
||||
],
|
||||
"new-parens": true,
|
||||
"no-angle-bracket-type-assertion": true,
|
||||
"no-any": true,
|
||||
"no-arg": true,
|
||||
"no-conditional-assignment": true,
|
||||
"no-construct": true,
|
||||
"no-debugger": true,
|
||||
"no-default-export": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-inferrable-types": true,
|
||||
"ordered-imports": [
|
||||
true,
|
||||
{
|
||||
"import-sources-order": "any",
|
||||
"named-imports-order": "case-insensitive"
|
||||
}
|
||||
],
|
||||
"no-namespace": [
|
||||
true,
|
||||
"allow-declarations"
|
||||
],
|
||||
"no-reference": true,
|
||||
"no-string-throw": true,
|
||||
"no-unused-expression": true,
|
||||
"no-var-keyword": true,
|
||||
"object-literal-shorthand": true,
|
||||
"only-arrow-functions": [
|
||||
true,
|
||||
"allow-declarations",
|
||||
"allow-named-functions"
|
||||
],
|
||||
"prefer-const": true,
|
||||
"radix": true,
|
||||
"semicolon": [
|
||||
true,
|
||||
"always",
|
||||
"ignore-bound-class-methods"
|
||||
],
|
||||
"switch-default": true,
|
||||
"trailing-comma": [
|
||||
true,
|
||||
{
|
||||
"multiline": {
|
||||
"objects": "always",
|
||||
"arrays": "always",
|
||||
"functions": "always",
|
||||
"typeLiterals": "ignore"
|
||||
},
|
||||
"esSpecCompliant": true
|
||||
}
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"use-isnan": true,
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"variable-name": [
|
||||
true,
|
||||
"check-format",
|
||||
"ban-keywords",
|
||||
"allow-leading-underscore",
|
||||
"allow-trailing-underscore"
|
||||
]
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
Loading…
Reference in New Issue