mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ 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:
@@ -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',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user