refactor: Format nodes-base package (A-F) (#3800)

* 🔨 prettier formated nodes - A

* 🔨 prettier formated nodes - B

*  prettier formated nodes - C

*  prettier formated nodes - D

*  prettier formated nodes - E-F

* 🎨 Adjust nodes-base formatting command (#3805)

* Format additional files in nodes A-F (#3811)

*  fixes

* 🎨 Add Mindee to ignored dirs

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
Michael Kret
2022-08-01 23:47:55 +03:00
committed by GitHub
parent 2c17e6f3ca
commit 0ecbb4a19d
411 changed files with 12906 additions and 20148 deletions

View File

@@ -8,11 +8,7 @@ import {
IWebhookResponseData,
} from 'n8n-workflow';
import {
emeliaApiRequest,
emeliaApiTest,
emeliaGraphqlRequest,
} from './GenericFunctions';
import { emeliaApiRequest, emeliaApiTest, emeliaGraphqlRequest } from './GenericFunctions';
interface Campaign {
_id: string;
@@ -53,7 +49,8 @@ export class EmeliaTrigger implements INodeType {
displayName: 'Campaign Name or ID',
name: 'campaignId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getCampaigns',
},
@@ -115,12 +112,10 @@ export class EmeliaTrigger implements INodeType {
variables: '{}',
});
return responseData.data.campaigns.map(
(campaign: Campaign) => ({
name: campaign.name,
value: campaign._id,
}),
);
return responseData.data.campaigns.map((campaign: Campaign) => ({
name: campaign.name,
value: campaign._id,
}));
},
},
};
@@ -147,7 +142,7 @@ export class EmeliaTrigger implements INodeType {
const campaignId = this.getNodeParameter('campaignId') as string;
const body = {
hookUrl: webhookUrl,
events: events.map(e => e.toUpperCase()),
events: events.map((e) => e.toUpperCase()),
campaignId,
};
@@ -179,9 +174,7 @@ export class EmeliaTrigger implements INodeType {
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
const req = this.getRequestObject();
return {
workflowData: [
this.helpers.returnJsonArray(req.body),
],
workflowData: [this.helpers.returnJsonArray(req.body)],
};
}
}