add CRUD deal descriptions

This commit is contained in:
quansenB 2019-10-24 20:15:57 +02:00
parent a2b589880f
commit a1fed27229
3 changed files with 498 additions and 3 deletions

View file

@ -0,0 +1 @@
//VUE_APP_URL_BASE_API=http://localhost:5678/

View file

@ -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"
}
}
}

View file

@ -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',
},
],
};