mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
IHookFunctions,
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IHookFunctions, IWebhookFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
@@ -13,9 +10,7 @@ import {
|
||||
NodeApiError,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
import {
|
||||
mailchimpApiRequest,
|
||||
} from './GenericFunctions';
|
||||
import { mailchimpApiRequest } from './GenericFunctions';
|
||||
|
||||
export class MailchimpTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
@@ -36,9 +31,7 @@ export class MailchimpTrigger implements INodeType {
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: [
|
||||
'apiKey',
|
||||
],
|
||||
authentication: ['apiKey'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -47,9 +40,7 @@ export class MailchimpTrigger implements INodeType {
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: [
|
||||
'oAuth2',
|
||||
],
|
||||
authentication: ['oAuth2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -91,7 +82,8 @@ export class MailchimpTrigger implements INodeType {
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: '',
|
||||
description: 'The list that is gonna fire the event. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'The list that is gonna fire the event. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getLists',
|
||||
},
|
||||
@@ -113,17 +105,19 @@ export class MailchimpTrigger implements INodeType {
|
||||
{
|
||||
name: 'Cleaned',
|
||||
value: 'cleaned',
|
||||
description: 'Whether the webhook is triggered when a subscriber\'s email address is cleaned from the list',
|
||||
description:
|
||||
"Whether the webhook is triggered when a subscriber's email address is cleaned from the list",
|
||||
},
|
||||
{
|
||||
name: 'Email Address Updated',
|
||||
value: 'upemail',
|
||||
description: 'Whether the webhook is triggered when a subscriber\'s email address is changed',
|
||||
description:
|
||||
"Whether the webhook is triggered when a subscriber's email address is changed",
|
||||
},
|
||||
{
|
||||
name: 'Profile Updated',
|
||||
value: 'profile',
|
||||
description: 'Whether the webhook is triggered when a subscriber\'s profile is updated',
|
||||
description: "Whether the webhook is triggered when a subscriber's profile is updated",
|
||||
},
|
||||
{
|
||||
name: 'Subscribe',
|
||||
@@ -143,7 +137,8 @@ export class MailchimpTrigger implements INodeType {
|
||||
type: 'multiOptions',
|
||||
required: true,
|
||||
default: [],
|
||||
description: 'The possible sources of any events that can trigger the webhook and whether they are enabled',
|
||||
description:
|
||||
'The possible sources of any events that can trigger the webhook and whether they are enabled',
|
||||
options: [
|
||||
{
|
||||
name: 'User',
|
||||
@@ -153,7 +148,8 @@ export class MailchimpTrigger implements INodeType {
|
||||
{
|
||||
name: 'Admin',
|
||||
value: 'admin',
|
||||
description: 'Whether the webhook is triggered by admin-initiated actions in the web interface',
|
||||
description:
|
||||
'Whether the webhook is triggered by admin-initiated actions in the web interface',
|
||||
},
|
||||
{
|
||||
name: 'API',
|
||||
@@ -283,16 +279,17 @@ export class MailchimpTrigger implements INodeType {
|
||||
if (req.body.id !== webhookData.id) {
|
||||
return {};
|
||||
}
|
||||
// @ts-ignore
|
||||
if (!webhookData.events.includes(req.body.type)
|
||||
|
||||
if (
|
||||
// @ts-ignore
|
||||
&& !webhookData.sources.includes(req.body.type)) {
|
||||
!webhookData.events.includes(req.body.type) &&
|
||||
// @ts-ignore
|
||||
!webhookData.sources.includes(req.body.type)
|
||||
) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
workflowData: [
|
||||
this.helpers.returnJsonArray(req.body),
|
||||
],
|
||||
workflowData: [this.helpers.returnJsonArray(req.body)],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user