mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +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,
|
||||
@@ -14,10 +11,7 @@ import {
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
getresponseApiRequest,
|
||||
getResponseApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
import { getresponseApiRequest, getResponseApiRequestAllItems } from './GenericFunctions';
|
||||
|
||||
export class GetResponseTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
@@ -39,9 +33,7 @@ export class GetResponseTrigger implements INodeType {
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: [
|
||||
'apiKey',
|
||||
],
|
||||
authentication: ['apiKey'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -50,9 +42,7 @@ export class GetResponseTrigger implements INodeType {
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: [
|
||||
'oAuth2',
|
||||
],
|
||||
authentication: ['oAuth2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -120,7 +110,8 @@ export class GetResponseTrigger implements INodeType {
|
||||
displayName: 'List Names or IDs',
|
||||
name: 'listIds',
|
||||
type: 'multiOptions',
|
||||
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
description:
|
||||
'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getLists',
|
||||
},
|
||||
@@ -176,7 +167,9 @@ export class GetResponseTrigger implements INodeType {
|
||||
|
||||
if (data.url !== webhookUrl) {
|
||||
if (deleteCurrentSubscription === false) {
|
||||
throw new NodeApiError(this.getNode(), data, { message: `The webhook (${data.url}) is active in the account. Delete it manually or set the parameter "Delete Current Subscription" to true, and the node will delete it for you.` });
|
||||
throw new NodeApiError(this.getNode(), data, {
|
||||
message: `The webhook (${data.url}) is active in the account. Delete it manually or set the parameter "Delete Current Subscription" to true, and the node will delete it for you.`,
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -195,10 +188,13 @@ export class GetResponseTrigger implements INodeType {
|
||||
|
||||
const body = {
|
||||
url: webhookUrl,
|
||||
actions: events.reduce((accumulator: { [key: string]: boolean }, currentValue: string) => {
|
||||
accumulator[currentValue] = true;
|
||||
return accumulator;
|
||||
}, {}),
|
||||
actions: events.reduce(
|
||||
(accumulator: { [key: string]: boolean }, currentValue: string) => {
|
||||
accumulator[currentValue] = true;
|
||||
return accumulator;
|
||||
},
|
||||
{},
|
||||
),
|
||||
};
|
||||
|
||||
await getresponseApiRequest.call(this, 'POST', '/accounts/callbacks', body);
|
||||
@@ -226,9 +222,7 @@ export class GetResponseTrigger implements INodeType {
|
||||
}
|
||||
|
||||
return {
|
||||
workflowData: [
|
||||
this.helpers.returnJsonArray(query),
|
||||
],
|
||||
workflowData: [this.helpers.returnJsonArray(query)],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user