n8n-3867-progressively-apply-prettier-to-all (#3873)

* 🔨 formatting nodes with prettier
This commit is contained in:
Michael Kret
2022-08-17 18:50:24 +03:00
committed by GitHub
parent f2d326c7f0
commit 91d7e16c81
1072 changed files with 42357 additions and 59109 deletions

View File

@@ -1,10 +1,6 @@
import {
CustomerProperties,
} from '../../Interfaces';
import { CustomerProperties } from '../../Interfaces';
import {
addressFixedCollection
} from '../../../methods/sharedFields';
import { addressFixedCollection } from '../../../methods/sharedFields';
export const customerCreateDescription: CustomerProperties = [
{
@@ -14,12 +10,8 @@ export const customerCreateDescription: CustomerProperties = [
placeholder: 'name@email.com',
displayOptions: {
show: {
resource: [
'customer',
],
operation: [
'create',
],
resource: ['customer'],
operation: ['create'],
},
},
default: '',
@@ -31,12 +23,8 @@ export const customerCreateDescription: CustomerProperties = [
placeholder: 'Add Field',
displayOptions: {
show: {
resource: [
'customer',
],
operation: [
'create',
],
resource: ['customer'],
operation: ['create'],
},
},
default: {},
@@ -95,9 +83,7 @@ export const customerCreateDescription: CustomerProperties = [
default: '',
displayOptions: {
show: {
noEmail: [
false,
],
noEmail: [false],
},
},
},
@@ -112,7 +98,8 @@ export const customerCreateDescription: CustomerProperties = [
name: 'referredBy',
type: 'string',
default: '',
description: 'Source from which customer is referred to the platform like Linkedin, Google, Customer name etc',
description:
'Source from which customer is referred to the platform like Linkedin, Google, Customer name etc',
},
],
},

View File

@@ -1,19 +1,27 @@
import {
IExecuteFunctions,
} from 'n8n-core';
import { IExecuteFunctions } from 'n8n-core';
import {
IDataObject,
INodeExecutionData,
} from 'n8n-workflow';
import { IDataObject, INodeExecutionData } from 'n8n-workflow';
import {
apiRequest,
} from '../../../transport';
import { apiRequest } from '../../../transport';
export async function addCustomer(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]> {
export async function addCustomer(
this: IExecuteFunctions,
index: number,
): Promise<INodeExecutionData[]> {
const email = this.getNodeParameter('email', index) as IDataObject;
const { address, getSms, businessName, lastname, firstName, invoiceCcEmails, noEmail, notes, notificationEmail, phone, referredBy } = this.getNodeParameter('additionalFields', index) as IDataObject;
const {
address,
getSms,
businessName,
lastname,
firstName,
invoiceCcEmails,
noEmail,
notes,
notificationEmail,
phone,
referredBy,
} = this.getNodeParameter('additionalFields', index) as IDataObject;
const qs = {} as IDataObject;
const requestMethod = 'POST';
@@ -32,7 +40,7 @@ export async function addCustomer(this: IExecuteFunctions, index: number): Promi
email,
firstname: firstName,
get_sms: getSms,
invoice_cc_emails: (invoiceCcEmails as string[] || []).join(','),
invoice_cc_emails: ((invoiceCcEmails as string[]) || []).join(','),
lastname,
no_email: noEmail,
notes,

View File

@@ -1,7 +1,4 @@
import { addCustomer as execute } from './execute';
import { customerCreateDescription as description } from './description';
export {
description,
execute,
};
export { description, execute };