mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
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:
@@ -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 person’s name, location and Twitter handle',
|
||||
description:
|
||||
'The Person API lets you retrieve social information associated with an email address, such as a person’s 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)) {
|
||||
|
||||
Reference in New Issue
Block a user