n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
invoiceAdditionalFieldsOptions
|
||||
} from './InvoiceAdditionalFieldsOptions';
|
||||
import { invoiceAdditionalFieldsOptions } from './InvoiceAdditionalFieldsOptions';
|
||||
|
||||
export const invoiceOperations: INodeProperties[] = [
|
||||
{
|
||||
@@ -52,9 +48,7 @@ export const invoiceOperations: INodeProperties[] = [
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -69,19 +63,16 @@ export const invoiceFields: INodeProperties[] = [
|
||||
name: 'CustomerRef',
|
||||
type: 'options',
|
||||
required: true,
|
||||
description: 'The ID of the customer who the invoice is for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'The ID of the customer who the invoice is for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCustomers',
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -97,12 +88,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -139,7 +126,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
displayName: 'Item Name or ID',
|
||||
name: 'itemId',
|
||||
type: 'options',
|
||||
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getItems',
|
||||
@@ -156,7 +144,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
displayName: 'Tax Code Ref Name or ID',
|
||||
name: 'TaxCodeRef',
|
||||
type: 'options',
|
||||
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTaxCodeRefs',
|
||||
@@ -172,12 +161,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
options: invoiceAdditionalFieldsOptions,
|
||||
@@ -195,12 +180,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'The ID of the invoice to delete',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -217,12 +198,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'The ID of the invoice to retrieve',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -235,12 +212,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'Whether to download the invoice as a PDF file',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -253,15 +226,9 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'Name of the binary property to which to write to',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
download: [
|
||||
true,
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['get'],
|
||||
download: [true],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -275,15 +242,9 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'Name of the file that will be downloaded',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
download: [
|
||||
true,
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['get'],
|
||||
download: [true],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -299,12 +260,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -320,15 +277,9 @@ export const invoiceFields: INodeProperties[] = [
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -344,8 +295,9 @@ export const invoiceFields: INodeProperties[] = [
|
||||
name: 'query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
placeholder: 'WHERE Metadata.LastUpdatedTime > \'2021-01-01\'',
|
||||
description: 'The condition for selecting invoices. See the <a href="https://developer.intuit.com/app/developer/qbo/docs/develop/explore-the-quickbooks-online-api/data-queries">guide</a> for supported syntax.',
|
||||
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
|
||||
description:
|
||||
'The condition for selecting invoices. See the <a href="https://developer.intuit.com/app/developer/qbo/docs/develop/explore-the-quickbooks-online-api/data-queries">guide</a> for supported syntax.',
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
@@ -353,12 +305,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -375,12 +323,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'The ID of the invoice to send',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'send',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['send'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -394,12 +338,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'The email of the recipient of the invoice',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'send',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['send'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -416,12 +356,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'The ID of the invoice to void',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'void',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['void'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -438,12 +374,8 @@ export const invoiceFields: INodeProperties[] = [
|
||||
description: 'The ID of the invoice to update',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -456,15 +388,13 @@ export const invoiceFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'invoice',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['invoice'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
// filter out fields that cannot be updated
|
||||
options: invoiceAdditionalFieldsOptions.filter(property => property.name !== 'TotalAmt' && property.name !== 'Balance'),
|
||||
options: invoiceAdditionalFieldsOptions.filter(
|
||||
(property) => property.name !== 'TotalAmt' && property.name !== 'Balance',
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user