n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import { addCustomer as execute } from './execute';
|
||||
import { customerCreateDescription as description } from './description';
|
||||
|
||||
export {
|
||||
description,
|
||||
execute,
|
||||
};
|
||||
export { description, execute };
|
||||
|
||||
Reference in New Issue
Block a user