Feature/extended active campaign (#928)

* feat: 🎸 node/activecampaign account, tag, account contact

* feat: 🎸 node/ActiveCampaign Update an accountContact assoc

* feat: 🎸 node/activecampaign Update an account

* feat: 🎸 node/activecampaign Get an account

* feat: 🎸 node/activecampaign GetAll & Delete an account

* feat: 🎸 node/activecampaign change ID's type to number

* refactor: 💡 node/activecampaign merge getAll properties

*  Improvements to #923

*  Improvements

*  Improvements

*  Add breaking change message

Co-authored-by: Ronald Diquélou <rdiquelou@opensafepro.com>
This commit is contained in:
Ricardo Espinoza
2020-09-18 03:42:01 -04:00
committed by GitHub
parent e18d7934ad
commit a552febab4
13 changed files with 1584 additions and 316 deletions

View File

@@ -4,7 +4,7 @@ import {
} from 'n8n-core';
import {
IDataObject, ILoadOptionsFunctions,
IDataObject, ILoadOptionsFunctions, INodeProperties,
} from 'n8n-workflow';
import { OptionsWithUri } from 'request';
@@ -49,6 +49,8 @@ export async function activeCampaignApiRequest(this: IHookFunctions | IExecuteFu
options.body = body;
}
console.log(options);
try {
const responseData = await this.helpers.request!(options);
@@ -124,3 +126,66 @@ export async function activeCampaignApiRequestAllItems(this: IHookFunctions | IE
return returnData;
}
export function activeCampaignDefaultGetAllProperties (resource: string, operation: string): INodeProperties [] {
return [
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: [
operation,
],
resource: [
resource,
],
},
},
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: [
operation,
],
resource: [
resource,
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'How many results to return.',
},
{
displayName: 'Simple',
name: 'simple',
type: 'boolean',
displayOptions: {
show: {
operation: [
operation,
],
resource: [
resource,
],
},
},
default: true,
description: 'When set to true a simplify version of the response will be used else the raw data will be used',
},
];
}