From a1fed27229a15e00ecd3a133c7a728bd9cc45245 Mon Sep 17 00:00:00 2001 From: quansenB Date: Thu, 24 Oct 2019 20:15:57 +0200 Subject: [PATCH] add CRUD deal descriptions --- packages/editor-ui/jsnon cop passte | 1 + packages/editor-ui/package.json | 4 +- .../ActiveCampaign/ActiveCampaign.node.ts | 496 +++++++++++++++++- 3 files changed, 498 insertions(+), 3 deletions(-) create mode 100644 packages/editor-ui/jsnon cop passte diff --git a/packages/editor-ui/jsnon cop passte b/packages/editor-ui/jsnon cop passte new file mode 100644 index 0000000000..dbfd27f67f --- /dev/null +++ b/packages/editor-ui/jsnon cop passte @@ -0,0 +1 @@ +//VUE_APP_URL_BASE_API=http://localhost:5678/ \ No newline at end of file diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 7047295fba..82534d8a87 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -17,7 +17,7 @@ "build": "vue-cli-service build", "dev": "npm run serve", "lint": "vue-cli-service lint", - "serve": "VUE_APP_URL_BASE_API=http://localhost:5678/ vue-cli-service serve", + "serve": "vue-cli-service serve", "test": "npm run test:unit", "tslint": "tslint -p tsconfig.json -c tslint.json", "test:e2e": "vue-cli-service test:e2e", @@ -78,4 +78,4 @@ "vue-typed-mixins": "^0.1.0", "vuex": "^3.1.1" } -} +} \ No newline at end of file diff --git a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts index e6efe97457..d4fb4edcac 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts @@ -59,6 +59,10 @@ export class ActiveCampaign implements INodeType { } ], properties: [ + + // ---------------------------------- + // resources + // ---------------------------------- { displayName: 'Resource', name: 'resource', @@ -68,6 +72,10 @@ export class ActiveCampaign implements INodeType { name: 'Contact', value: 'contact', }, + { + name: 'Deal', + value: 'deal', + } ], default: 'contact', description: 'The resource to operate on.', @@ -120,6 +128,48 @@ export class ActiveCampaign implements INodeType { description: 'The operation to perform.', }, + { + displayName: 'Operation', + name: 'operation', + type: 'options', + displayOptions: { + show: { + resource: [ + 'deal', + ], + }, + }, + options: [ + { + name: 'Create', + value: 'create', + description: 'Create a deal', + }, + { + name: 'Delete', + value: 'delete', + description: 'Delete a deal', + }, + { + name: 'Get', + value: 'get', + description: 'Get data of a deal', + }, + { + name: 'Get All', + value: 'getAll', + description: 'Get data of all deals', + }, + { + name: 'Update', + value: 'update', + description: 'Update a deal', + }, + ], + default: 'create', + description: 'The operation to perform.', + }, + // ---------------------------------- @@ -261,7 +311,7 @@ export class ActiveCampaign implements INodeType { }, // ---------------------------------- - // person:get + // contact:get // ---------------------------------- { displayName: 'Contact ID', @@ -429,7 +479,451 @@ export class ActiveCampaign implements INodeType { }, ], }, + // ---------------------------------- + // deal + // ---------------------------------- + // ---------------------------------- + // deal:create + // ---------------------------------- + { + displayName: 'Title', + name: 'title', + type: 'string', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The title of the deal', + }, + { + displayName: 'Description', + name: 'description', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The description of the deal', + }, + { + displayName: 'Deal ID', + name: 'dealId', + type: 'number', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The ID of the deal', + }, + { + displayName: 'Deal value', + name: 'dealValue', + type: 'number', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The value of the deal in cents', + }, + { + displayName: 'Currency', + name: 'currency', + type: 'string', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The currency of the deal in 3-character ISO format', + }, + { + displayName: 'Deal group ID', + name: 'dealGroup', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The group ID of the deal', + }, + { + displayName: 'Deal stage ID', + name: 'dealStage', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The stage ID of the deal', + }, + { + displayName: 'Deal owner ID', + name: 'dealOwner', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The owner ID of the deal', + }, + { + displayName: 'Deal percentage', + name: 'dealPercentage', + type: 'number', + default: '', + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The percentage of the deal', + }, + { + displayName: 'Deal status', + name: 'dealStatus', + type: 'number', + default: '', + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The status of the deal', + }, + + // ---------------------------------- + // deal:delete + // ---------------------------------- + { + displayName: 'Deal ID', + name: 'dealId', + type: 'number', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'delete', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The ID of the deal', + }, + + // ---------------------------------- + // deal:get + // ---------------------------------- + { + displayName: 'Deal ID', + name: 'dealId', + type: 'number', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'get', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The ID of the deal', + }, + + // ---------------------------------- + // deal:getAll + // ---------------------------------- + { + displayName: 'Return All', + name: 'returnAll', + type: 'boolean', + displayOptions: { + show: { + operation: [ + 'getAll', + ], + resource: [ + 'deal', + ], + }, + }, + default: false, + description: 'If all results should be returned or only up to a given limit.', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + displayOptions: { + show: { + operation: [ + 'getAll', + ], + resource: [ + 'deal', + ], + returnAll: [ + false, + ], + }, + }, + typeOptions: { + minValue: 1, + maxValue: 500, + }, + default: 100, + description: 'How many results to return.', + }, + + // ---------------------------------- + // deal:update + // ---------------------------------- + { + displayName: 'Title', + name: 'title', + type: 'string', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The title of the deal', + }, + { + displayName: 'Description', + name: 'description', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The description of the deal', + }, + { + displayName: 'Deal ID', + name: 'dealId', + type: 'number', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The ID of the deal', + }, + { + displayName: 'Deal value', + name: 'dealValue', + type: 'number', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The value of the deal in cents', + }, + { + displayName: 'Currency', + name: 'currency', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The currency of the deal in 3-character ISO format', + }, + { + displayName: 'Deal group ID', + name: 'dealGroup', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The group ID of the deal', + }, + { + displayName: 'Deal stage ID', + name: 'dealStage', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The stage ID of the deal', + }, + { + displayName: 'Deal owner ID', + name: 'dealOwner', + type: 'string', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The owner ID of the deal', + }, + { + displayName: 'Deal percentage', + name: 'dealPercentage', + type: 'number', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The percentage of the deal', + }, + { + displayName: 'Deal status', + name: 'dealStatus', + type: 'number', + default: '', + displayOptions: { + show: { + operation: [ + 'update', + ], + resource: [ + 'deal', + ], + }, + }, + description: 'The status of the deal', + }, ], };