mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Minor improvements to ActiveCampaign-Node
This commit is contained in:
@@ -474,7 +474,7 @@ export class ActiveCampaign implements INodeType {
|
|||||||
} else {
|
} else {
|
||||||
throw new Error(`The operation "${operation}" is not known`);
|
throw new Error(`The operation "${operation}" is not known`);
|
||||||
}
|
}
|
||||||
} else if (resource === 'accountContact') {
|
} else if (resource === 'accountContact') {
|
||||||
if (operation === 'create') {
|
if (operation === 'create') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// account:create
|
// account:create
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export class ActiveCampaignTrigger implements INodeType {
|
|||||||
const webhookData = this.getWorkflowStaticData('node');
|
const webhookData = this.getWorkflowStaticData('node');
|
||||||
try {
|
try {
|
||||||
await activeCampaignApiRequest.call(this, 'DELETE', `/api/3/webhooks/${webhookData.webhookId}`, {});
|
await activeCampaignApiRequest.call(this, 'DELETE', `/api/3/webhooks/${webhookData.webhookId}`, {});
|
||||||
} catch(error) {
|
} catch (error) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
delete webhookData.webhookId;
|
delete webhookData.webhookId;
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ export async function activeCampaignApiRequest(this: IHookFunctions | IExecuteFu
|
|||||||
options.body = body;
|
options.body = body;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(options);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const responseData = await this.helpers.request!(options);
|
const responseData = await this.helpers.request!(options);
|
||||||
|
|
||||||
@@ -127,11 +125,11 @@ export async function activeCampaignApiRequestAllItems(this: IHookFunctions | IE
|
|||||||
return returnData;
|
return returnData;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function activeCampaignDefaultGetAllProperties (resource: string, operation: string): INodeProperties [] {
|
export function activeCampaignDefaultGetAllProperties(resource: string, operation: string): INodeProperties[] {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
displayName: 'Return All',
|
displayName: 'Return All',
|
||||||
name: 'returnAll',
|
name: 'returnAll',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
@@ -148,26 +146,26 @@ export function activeCampaignDefaultGetAllProperties (resource: string, operati
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Limit',
|
displayName: 'Limit',
|
||||||
name: 'limit',
|
name: 'limit',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
operation: [
|
operation: [
|
||||||
operation,
|
operation,
|
||||||
],
|
],
|
||||||
resource: [
|
resource: [
|
||||||
resource,
|
resource,
|
||||||
],
|
],
|
||||||
returnAll: [
|
returnAll: [
|
||||||
false,
|
false,
|
||||||
],
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
typeOptions: {
|
||||||
typeOptions: {
|
minValue: 1,
|
||||||
minValue: 1,
|
maxValue: 500,
|
||||||
maxValue: 500,
|
},
|
||||||
},
|
default: 100,
|
||||||
default: 100,
|
|
||||||
description: 'How many results to return.',
|
description: 'How many results to return.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -185,7 +183,7 @@ export function activeCampaignDefaultGetAllProperties (resource: string, operati
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: true,
|
default: true,
|
||||||
description: 'When set to true a simplify version of the response will be used else the raw data will be used',
|
description: 'When set to true a simplify version of the response will be used else the raw data.',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user