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

@@ -1,21 +1,13 @@
import {
IHookFunctions,
IWebhookFunctions,
} from 'n8n-core';
import { IHookFunctions, IWebhookFunctions } from 'n8n-core';
import {
IDataObject,
INodeType,
INodeTypeDescription,
IWebhookResponseData,
} from 'n8n-workflow';
import { IDataObject, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
import {
apiRequest,
getFields,
getForms,
getSubmission,
IFormstackWebhookResponseBody
IFormstackWebhookResponseBody,
} from './GenericFunctions';
export class FormstackTrigger implements INodeType {
@@ -38,9 +30,7 @@ export class FormstackTrigger implements INodeType {
required: true,
displayOptions: {
show: {
authentication: [
'accessToken',
],
authentication: ['accessToken'],
},
},
},
@@ -49,9 +39,7 @@ export class FormstackTrigger implements INodeType {
required: true,
displayOptions: {
show: {
authentication: [
'oAuth2',
],
authentication: ['oAuth2'],
},
},
},
@@ -90,14 +78,16 @@ export class FormstackTrigger implements INodeType {
},
default: '',
required: true,
description: 'The Formstack form to monitor for new submissions. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The Formstack form to monitor for new submissions. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Simplify',
name: 'simple',
type: 'boolean',
default: true,
description: 'Whether to return a simplified version of the response instead of the raw data',
description:
'Whether to return a simplified version of the response instead of the raw data',
},
],
};
@@ -175,7 +165,7 @@ export class FormstackTrigger implements INodeType {
// @ts-ignore
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
const bodyData = (this.getBodyData() as unknown) as IFormstackWebhookResponseBody;
const bodyData = this.getBodyData() as unknown as IFormstackWebhookResponseBody;
const simple = this.getNodeParameter('simple') as string;
const response = bodyData as unknown as IDataObject;
@@ -189,9 +179,7 @@ export class FormstackTrigger implements INodeType {
}
return {
workflowData: [
this.helpers.returnJsonArray([response as unknown as IDataObject]),
],
workflowData: [this.helpers.returnJsonArray([response as unknown as IDataObject])],
};
}
}