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,27 +1,12 @@
import {
IExecuteFunctions,
} from 'n8n-core';
import { IExecuteFunctions } from 'n8n-core';
import {
IDataObject,
INodeExecutionData,
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { IDataObject, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
import {
clearbitApiRequest,
} from './GenericFunctions';
import { clearbitApiRequest } from './GenericFunctions';
import {
companyFields,
companyOperations,
} from './CompanyDescription';
import { companyFields, companyOperations } from './CompanyDescription';
import {
personFields,
personOperations,
} from './PersonDescription';
import { personFields, personOperations } from './PersonDescription';
export class Clearbit implements INodeType {
description: INodeTypeDescription = {
@@ -58,7 +43,8 @@ export class Clearbit implements INodeType {
{
name: 'Person',
value: 'person',
description: 'The Person API lets you retrieve social information associated with an email address, such as a persons name, location and Twitter handle',
description:
'The Person API lets you retrieve social information associated with an email address, such as a persons name, location and Twitter handle',
},
],
default: 'company',
@@ -112,7 +98,14 @@ export class Clearbit implements INodeType {
if (additionalFields.facebook) {
qs.facebook = additionalFields.facebook as string;
}
responseData = await clearbitApiRequest.call(this, 'GET', `${resource}-stream`, '/v2/people/find', {}, qs);
responseData = await clearbitApiRequest.call(
this,
'GET',
`${resource}-stream`,
'/v2/people/find',
{},
qs,
);
}
}
if (resource === 'company') {
@@ -132,12 +125,26 @@ export class Clearbit implements INodeType {
if (additionalFields.facebook) {
qs.facebook = additionalFields.facebook as string;
}
responseData = await clearbitApiRequest.call(this, 'GET', `${resource}-stream`, '/v2/companies/find', {}, qs);
responseData = await clearbitApiRequest.call(
this,
'GET',
`${resource}-stream`,
'/v2/companies/find',
{},
qs,
);
}
if (operation === 'autocomplete') {
const name = this.getNodeParameter('name', i) as string;
qs.query = name;
responseData = await clearbitApiRequest.call(this, 'GET', 'autocomplete', '/v1/companies/suggest', {}, qs);
responseData = await clearbitApiRequest.call(
this,
'GET',
'autocomplete',
'/v1/companies/suggest',
{},
qs,
);
}
}
if (Array.isArray(responseData)) {