first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled

This commit is contained in:
2026-03-17 16:22:57 +03:30
commit 3d5eaf9445
15349 changed files with 2847338 additions and 0 deletions
@@ -0,0 +1,88 @@
import type { INodeProperties } from 'n8n-workflow';
export const billAdditionalFieldsOptions: INodeProperties[] = [
{
displayName: 'Accounts Payable Account',
name: 'APAccountRef',
placeholder: 'Add APA Fields',
description: 'Accounts Payable account to which the bill will be credited',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Details',
name: 'details',
values: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
},
{
displayName: 'ID',
name: 'value',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Balance',
name: 'Balance',
description: 'The balance reflecting any payments made against the transaction',
type: 'string',
default: '',
},
{
displayName: 'Due Date',
name: 'DueDate',
description: 'Date when the payment of the transaction is due',
type: 'dateTime',
default: '',
},
{
displayName: 'Sales Term',
name: 'SalesTermRef',
description: 'Sales term associated with the transaction',
placeholder: 'Add Sales Term Fields',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Details',
name: 'details',
values: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
},
{
displayName: 'ID',
name: 'value',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Total Amount',
name: 'TotalAmt',
description: 'Total amount of the transaction',
type: 'number',
default: 0,
},
{
displayName: 'Transaction Date',
name: 'TxnDate',
description: 'Date when the transaction occurred',
type: 'dateTime',
default: '',
},
];
@@ -0,0 +1,287 @@
import type { INodeProperties } from 'n8n-workflow';
import { billAdditionalFieldsOptions } from './BillAdditionalFieldsOptions';
export const billOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Create',
value: 'create',
action: 'Create a bill',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete a bill',
},
{
name: 'Get',
value: 'get',
action: 'Get a bill',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many bills',
},
{
name: 'Update',
value: 'update',
action: 'Update a bill',
},
],
displayOptions: {
show: {
resource: ['bill'],
},
},
},
];
export const billFields: INodeProperties[] = [
// ----------------------------------
// bill: create
// ----------------------------------
{
displayName: 'For Vendor Name or ID',
name: 'VendorRef',
type: 'options',
required: true,
description:
'The ID of the vendor who the bill is for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
default: [],
typeOptions: {
loadOptionsMethod: 'getVendors',
},
displayOptions: {
show: {
resource: ['bill'],
operation: ['create'],
},
},
},
{
displayName: 'Line',
name: 'Line',
type: 'collection',
placeholder: 'Add Line Item Property',
description: 'Individual line item of a transaction',
typeOptions: {
multipleValues: true,
},
default: {},
displayOptions: {
show: {
resource: ['bill'],
operation: ['create'],
},
},
options: [
{
displayName: 'Account ID',
name: 'accountId',
type: 'string',
default: '',
},
{
displayName: 'Amount',
name: 'Amount',
description: 'Monetary amount of the line item',
type: 'number',
default: 0,
},
{
displayName: 'Description',
name: 'Description',
description: 'Textual description of the line item',
type: 'string',
default: '',
},
{
displayName: 'Detail Type',
name: 'DetailType',
type: 'options',
default: 'ItemBasedExpenseLineDetail',
options: [
{
name: 'Account-Based Expense Line Detail',
value: 'AccountBasedExpenseLineDetail',
},
{
name: 'Item-Based Expense Line Detail',
value: 'ItemBasedExpenseLineDetail',
},
],
},
{
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/expressions/">expression</a>',
default: [],
typeOptions: {
loadOptionsMethod: 'getItems',
},
},
{
displayName: 'Position',
name: 'LineNum',
description: 'Position of the line item relative to others',
type: 'number',
default: 1,
},
],
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['bill'],
operation: ['create'],
},
},
options: billAdditionalFieldsOptions,
},
// ----------------------------------
// bill: delete
// ----------------------------------
{
displayName: 'Bill ID',
name: 'billId',
type: 'string',
required: true,
default: '',
description: 'The ID of the bill to delete',
displayOptions: {
show: {
resource: ['bill'],
operation: ['delete'],
},
},
},
// ----------------------------------
// bill: get
// ----------------------------------
{
displayName: 'Bill ID',
name: 'billId',
type: 'string',
required: true,
default: '',
description: 'The ID of the bill to retrieve',
displayOptions: {
show: {
resource: ['bill'],
operation: ['get'],
},
},
},
// ----------------------------------
// bill: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['bill'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['bill'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
description:
'The condition for selecting bills. 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.',
},
],
displayOptions: {
show: {
resource: ['bill'],
operation: ['getAll'],
},
},
},
// ----------------------------------
// bill: update
// ----------------------------------
{
displayName: 'Bill ID',
name: 'billId',
type: 'string',
required: true,
default: '',
description: 'The ID of the bill to update',
displayOptions: {
show: {
resource: ['bill'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
required: true,
displayOptions: {
show: {
resource: ['bill'],
operation: ['update'],
},
},
// filter out fields that cannot be updated
options: billAdditionalFieldsOptions.filter(
(property) => property.name !== 'TotalAmt' && property.name !== 'Balance',
),
},
];
@@ -0,0 +1,153 @@
import type { INodeProperties } from 'n8n-workflow';
export const customerAdditionalFieldsOptions: INodeProperties[] = [
{
displayName: 'Active',
name: 'Active',
description: 'Whether the customer is currently enabled for use by QuickBooks',
type: 'boolean',
default: true,
},
{
displayName: 'Balance',
name: 'Balance',
description: 'Open balance amount or amount unpaid by the customer',
type: 'string',
default: '',
},
{
displayName: 'Balance With Jobs',
name: 'BalanceWithJobs',
description: 'Cumulative open balance amount for the customer (or job) and all its sub-jobs',
type: 'number',
default: 0,
},
{
displayName: 'Billing Address',
name: 'BillAddr',
placeholder: 'Add Billing Address Fields',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Details',
name: 'details',
values: [
{
displayName: 'City',
name: 'City',
type: 'string',
default: '',
},
{
displayName: 'Line 1',
name: 'Line1',
type: 'string',
default: '',
},
{
displayName: 'Postal Code',
name: 'PostalCode',
type: 'string',
default: '',
},
{
displayName: 'Latitude',
name: 'Lat',
type: 'string',
default: '',
},
{
displayName: 'Longitude',
name: 'Long',
type: 'string',
default: '',
},
{
displayName: 'Country Subdivision Code',
name: 'CountrySubDivisionCode',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Bill With Parent',
name: 'BillWithParent',
description: 'Whether to bill this customer together with its parent',
type: 'boolean',
default: false,
},
{
displayName: 'Company Name',
name: 'CompanyName',
type: 'string',
default: '',
},
{
displayName: 'Family Name',
name: 'FamilyName',
type: 'string',
default: '',
},
{
displayName: 'Fully Qualified Name',
name: 'FullyQualifiedName',
type: 'string',
default: '',
},
{
displayName: 'Given Name',
name: 'GivenName',
type: 'string',
default: '',
},
{
displayName: 'Preferred Delivery Method',
name: 'PreferredDeliveryMethod',
type: 'options',
default: 'Print',
options: [
{
name: 'Print',
value: 'Print',
},
{
name: 'Email',
value: 'Email',
},
{
name: 'None',
value: 'None',
},
],
},
{
displayName: 'Primary Email Address',
name: 'PrimaryEmailAddr',
type: 'string',
default: '',
},
{
displayName: 'Primary Phone',
name: 'PrimaryPhone',
type: 'string',
default: '',
},
{
displayName: 'Print-On-Check Name',
name: 'PrintOnCheckName',
description: 'Name of the customer as printed on a check',
type: 'string',
default: '',
},
{
displayName: 'Taxable',
name: 'Taxable',
description: 'Whether transactions for this customer are taxable',
type: 'boolean',
default: false,
},
];
@@ -0,0 +1,184 @@
import type { INodeProperties } from 'n8n-workflow';
import { customerAdditionalFieldsOptions } from './CustomerAdditionalFieldsOptions';
export const customerOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Create',
value: 'create',
action: 'Create a customer',
},
{
name: 'Get',
value: 'get',
action: 'Get a customer',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many customers',
},
{
name: 'Update',
value: 'update',
action: 'Update a customer',
},
],
displayOptions: {
show: {
resource: ['customer'],
},
},
},
];
export const customerFields: INodeProperties[] = [
// ----------------------------------
// customer: create
// ----------------------------------
{
displayName: 'Display Name',
name: 'displayName',
type: 'string',
required: true,
default: '',
description: 'The display name of the customer to create',
displayOptions: {
show: {
resource: ['customer'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['customer'],
operation: ['create'],
},
},
options: customerAdditionalFieldsOptions,
},
// ----------------------------------
// customer: get
// ----------------------------------
{
displayName: 'Customer ID',
name: 'customerId',
type: 'string',
required: true,
default: '',
description: 'The ID of the customer to retrieve',
displayOptions: {
show: {
resource: ['customer'],
operation: ['get'],
},
},
},
// ----------------------------------
// customer: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['customer'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['customer'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
description:
'The condition for selecting customers. 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.',
},
],
displayOptions: {
show: {
resource: ['customer'],
operation: ['getAll'],
},
},
},
// ----------------------------------
// customer: update
// ----------------------------------
{
displayName: 'Customer ID',
name: 'customerId',
type: 'string',
required: true,
default: '',
description: 'The ID of the customer to update',
displayOptions: {
show: {
resource: ['customer'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
required: true,
displayOptions: {
show: {
resource: ['customer'],
operation: ['update'],
},
},
options: customerAdditionalFieldsOptions,
},
];
@@ -0,0 +1,93 @@
import type { INodeProperties } from 'n8n-workflow';
export const employeeAdditionalFieldsOptions: INodeProperties[] = [
{
displayName: 'Active',
name: 'Active',
description: 'Whether the employee is currently enabled for use by QuickBooks',
type: 'boolean',
default: false,
},
{
displayName: 'Billable Time',
name: 'BillableTime',
type: 'boolean',
default: false,
},
{
displayName: 'Display Name',
name: 'DisplayName',
type: 'string',
default: '',
},
{
displayName: 'Billing Address',
name: 'BillAddr',
placeholder: 'Add Billing Address Fields',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Details',
name: 'details',
values: [
{
displayName: 'City',
name: 'City',
type: 'string',
default: '',
},
{
displayName: 'Line 1',
name: 'Line1',
type: 'string',
default: '',
},
{
displayName: 'Postal Code',
name: 'PostalCode',
type: 'string',
default: '',
},
{
displayName: 'Latitude',
name: 'Lat',
type: 'string',
default: '',
},
{
displayName: 'Longitude',
name: 'Long',
type: 'string',
default: '',
},
{
displayName: 'Country Subdivision Code',
name: 'CountrySubDivisionCode',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Primary Phone',
name: 'PrimaryPhone',
type: 'string',
default: '',
},
{
displayName: 'Print-On-Check Name',
name: 'PrintOnCheckName',
description: 'Name of the employee as printed on a check',
type: 'string',
default: '',
},
{
displayName: 'Social Security Number',
name: 'SSN',
type: 'string',
default: '',
},
];
@@ -0,0 +1,194 @@
import type { INodeProperties } from 'n8n-workflow';
import { employeeAdditionalFieldsOptions } from './EmployeeAdditionalFieldsOptions';
export const employeeOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Create',
value: 'create',
action: 'Create an employee',
},
{
name: 'Get',
value: 'get',
action: 'Get an employee',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many employees',
},
{
name: 'Update',
value: 'update',
action: 'Update an employee',
},
],
displayOptions: {
show: {
resource: ['employee'],
},
},
},
];
export const employeeFields: INodeProperties[] = [
// ----------------------------------
// employee: create
// ----------------------------------
{
displayName: 'Family Name',
name: 'FamilyName',
type: 'string',
default: '',
displayOptions: {
show: {
resource: ['employee'],
operation: ['create'],
},
},
},
{
displayName: 'Given Name',
name: 'GivenName',
type: 'string',
default: '',
displayOptions: {
show: {
resource: ['employee'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['employee'],
operation: ['create'],
},
},
options: employeeAdditionalFieldsOptions,
},
// ----------------------------------
// employee: get
// ----------------------------------
{
displayName: 'Employee ID',
name: 'employeeId',
type: 'string',
required: true,
default: '',
description: 'The ID of the employee to retrieve',
displayOptions: {
show: {
resource: ['employee'],
operation: ['get'],
},
},
},
// ----------------------------------
// employee: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['employee'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['employee'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
description:
'The condition for selecting employees. 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.',
},
],
displayOptions: {
show: {
resource: ['employee'],
operation: ['getAll'],
},
},
},
// ----------------------------------
// employee: update
// ----------------------------------
{
displayName: 'Employee ID',
name: 'employeeId',
type: 'string',
required: true,
default: '',
description: 'The ID of the employee to update',
displayOptions: {
show: {
resource: ['employee'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
required: true,
displayOptions: {
show: {
resource: ['employee'],
operation: ['update'],
},
},
options: employeeAdditionalFieldsOptions,
},
];
@@ -0,0 +1,231 @@
import type { INodeProperties } from 'n8n-workflow';
export const estimateAdditionalFieldsOptions: INodeProperties[] = [
{
displayName: 'Apply Tax After Discount',
name: 'ApplyTaxAfterDiscount',
type: 'boolean',
default: false,
},
{
displayName: 'Billing Address',
name: 'BillAddr',
placeholder: 'Add Billing Address Fields',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Details',
name: 'details',
values: [
{
displayName: 'City',
name: 'City',
type: 'string',
default: '',
},
{
displayName: 'Line 1',
name: 'Line1',
type: 'string',
default: '',
},
{
displayName: 'Postal Code',
name: 'PostalCode',
type: 'string',
default: '',
},
{
displayName: 'Latitude',
name: 'Lat',
type: 'string',
default: '',
},
{
displayName: 'Longitude',
name: 'Long',
type: 'string',
default: '',
},
{
displayName: 'Country Subdivision Code',
name: 'CountrySubDivisionCode',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Billing Email',
name: 'BillEmail',
description: 'E-mail address to which the estimate will be sent',
type: 'string',
default: '',
},
{
displayName: 'Custom Fields',
name: 'CustomFields',
placeholder: 'Add Custom Fields',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
default: {},
options: [
{
displayName: 'Field',
name: 'Field',
values: [
{
displayName: 'Field Definition Name or ID',
name: 'DefinitionId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getCustomFields',
},
default: '',
description:
'ID of the field to set. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Field Value',
name: 'StringValue',
type: 'string',
default: '',
description: 'Value of the field to set',
},
],
},
],
},
{
displayName: 'Customer Memo',
name: 'CustomerMemo',
description:
'User-entered message to the customer. This message is visible to end user on their transactions.',
type: 'string',
default: '',
},
{
displayName: 'Document Number',
name: 'DocNumber',
description: 'Reference number for the transaction',
type: 'string',
default: '',
},
{
displayName: 'Email Status',
name: 'EmailStatus',
type: 'options',
default: 'NotSet',
options: [
{
name: 'Not Set',
value: 'NotSet',
},
{
name: 'Need To Send',
value: 'NeedToSend',
},
{
name: 'Email Sent',
value: 'EmailSent',
},
],
},
{
displayName: 'Print Status',
name: 'PrintStatus',
type: 'options',
default: 'NotSet',
options: [
{
name: 'Not Set',
value: 'NotSet',
},
{
name: 'Need To Print',
value: 'NeedToPrint',
},
{
name: 'PrintComplete',
value: 'PrintComplete',
},
],
},
{
displayName: 'Shipping Address',
name: 'ShipAddr',
placeholder: 'Add Shippping Address Fields',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Details',
name: 'details',
values: [
{
displayName: 'City',
name: 'City',
type: 'string',
default: '',
},
{
displayName: 'Line 1',
name: 'Line1',
type: 'string',
default: '',
},
{
displayName: 'Postal Code',
name: 'PostalCode',
type: 'string',
default: '',
},
{
displayName: 'Latitude',
name: 'Lat',
type: 'string',
default: '',
},
{
displayName: 'Longitude',
name: 'Long',
type: 'string',
default: '',
},
{
displayName: 'Country Subdivision Code',
name: 'CountrySubDivisionCode',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Total Amount',
name: 'TotalAmt',
description: 'Total amount of the transaction',
type: 'number',
default: 0,
},
{
displayName: 'Transaction Date',
name: 'TxnDate',
description: 'Date when the transaction occurred',
type: 'dateTime',
default: '',
},
{
displayName: 'Total Tax',
name: 'TotalTax',
description: 'Total amount of tax incurred',
type: 'number',
default: 0,
},
];
@@ -0,0 +1,371 @@
import type { INodeProperties } from 'n8n-workflow';
import { estimateAdditionalFieldsOptions } from './EstimateAdditionalFieldsOptions';
export const estimateOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Create',
value: 'create',
action: 'Create an estimate',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete an estimate',
},
{
name: 'Get',
value: 'get',
action: 'Get an estimate',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many estimates',
},
{
name: 'Send',
value: 'send',
action: 'Send an estimate',
},
{
name: 'Update',
value: 'update',
action: 'Update an estimate',
},
],
displayOptions: {
show: {
resource: ['estimate'],
},
},
},
];
export const estimateFields: INodeProperties[] = [
// ----------------------------------
// estimate: create
// ----------------------------------
{
displayName: 'For Customer Name or ID',
name: 'CustomerRef',
type: 'options',
required: true,
description:
'The ID of the customer who the estimate is for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
default: [],
typeOptions: {
loadOptionsMethod: 'getCustomers',
},
displayOptions: {
show: {
resource: ['estimate'],
operation: ['create'],
},
},
},
{
displayName: 'Line',
name: 'Line',
type: 'collection',
placeholder: 'Add Line Item Property',
description: 'Individual line item of a transaction',
typeOptions: {
multipleValues: true,
},
default: {},
displayOptions: {
show: {
resource: ['estimate'],
operation: ['create'],
},
},
options: [
{
displayName: 'Amount',
name: 'Amount',
description: 'Monetary amount of the line item',
type: 'number',
default: 0,
},
{
displayName: 'Description',
name: 'Description',
description: 'Textual description of the line item',
type: 'string',
default: '',
},
{
displayName: 'Detail Type',
name: 'DetailType',
type: 'options',
default: 'SalesItemLineDetail',
options: [
{
name: 'Sales Item Line Detail',
value: 'SalesItemLineDetail',
},
],
},
{
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/expressions/">expression</a>',
default: [],
typeOptions: {
loadOptionsMethod: 'getItems',
},
},
{
displayName: 'Position',
name: 'LineNum',
description: 'Position of the line item relative to others',
type: 'number',
default: 1,
},
{
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/expressions/">expression</a>',
default: [],
typeOptions: {
loadOptionsMethod: 'getTaxCodeRefs',
},
},
],
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['estimate'],
operation: ['create'],
},
},
options: estimateAdditionalFieldsOptions,
},
// ----------------------------------
// estimate: delete
// ----------------------------------
{
displayName: 'Estimate ID',
name: 'estimateId',
type: 'string',
required: true,
default: '',
description: 'The ID of the estimate to delete',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['delete'],
},
},
},
// ----------------------------------
// estimate: get
// ----------------------------------
{
displayName: 'Estimate ID',
name: 'estimateId',
type: 'string',
required: true,
default: '',
description: 'The ID of the estimate to retrieve',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['get'],
},
},
},
{
displayName: 'Download',
name: 'download',
type: 'boolean',
required: true,
default: false,
description: 'Whether to download the estimate as a PDF file',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['get'],
},
},
},
{
displayName: 'Put Output File in Field',
name: 'binaryProperty',
type: 'string',
required: true,
default: 'data',
hint: 'The name of the output binary field to put the file in',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['get'],
download: [true],
},
},
},
{
displayName: 'File Name',
name: 'fileName',
type: 'string',
required: true,
default: '',
placeholder: 'data.pdf',
description: 'Name of the file that will be downloaded',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['get'],
download: [true],
},
},
},
// ----------------------------------
// estimate: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['estimate'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
description:
'The condition for selecting estimates. 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.',
},
],
displayOptions: {
show: {
resource: ['estimate'],
operation: ['getAll'],
},
},
},
// ----------------------------------
// estimate: send
// ----------------------------------
{
displayName: 'Estimate ID',
name: 'estimateId',
type: 'string',
required: true,
default: '',
description: 'The ID of the estimate to send',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['send'],
},
},
},
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@email.com',
required: true,
default: '',
description: 'The email of the recipient of the estimate',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['send'],
},
},
},
// ----------------------------------
// estimate: update
// ----------------------------------
{
displayName: 'Estimate ID',
name: 'estimateId',
type: 'string',
required: true,
default: '',
description: 'The ID of the estimate to update',
displayOptions: {
show: {
resource: ['estimate'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
required: true,
displayOptions: {
show: {
resource: ['estimate'],
operation: ['update'],
},
},
// filter out fields that cannot be updated
options: estimateAdditionalFieldsOptions.filter(
(property) => property.name !== 'TotalAmt' && property.name !== 'TotalTax',
),
},
];
@@ -0,0 +1,187 @@
import type { INodeProperties } from 'n8n-workflow';
export const invoiceAdditionalFieldsOptions: INodeProperties[] = [
{
displayName: 'Balance',
name: 'Balance',
description: 'The balance reflecting any payments made against the transaction',
type: 'number',
default: 0,
},
{
displayName: 'Billing Address',
name: 'BillAddr',
placeholder: 'Add Billing Address Fields',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Details',
name: 'details',
values: [
{
displayName: 'City',
name: 'City',
type: 'string',
default: '',
},
{
displayName: 'Line 1',
name: 'Line1',
type: 'string',
default: '',
},
{
displayName: 'Postal Code',
name: 'PostalCode',
type: 'string',
default: '',
},
{
displayName: 'Latitude',
name: 'Lat',
type: 'string',
default: '',
},
{
displayName: 'Longitude',
name: 'Long',
type: 'string',
default: '',
},
{
displayName: 'Country Subdivision Code',
name: 'CountrySubDivisionCode',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Billing Email',
name: 'BillEmail',
description: 'E-mail address to which the invoice will be sent',
type: 'string',
default: '',
},
{
displayName: 'Customer Memo',
name: 'CustomerMemo',
description:
'User-entered message to the customer. This message is visible to end user on their transactions.',
type: 'string',
default: '',
},
{
displayName: 'Custom Fields',
name: 'CustomFields',
placeholder: 'Add Custom Fields',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
default: {},
options: [
{
displayName: 'Field',
name: 'Field',
values: [
{
displayName: 'Field Definition Name or ID',
name: 'DefinitionId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getCustomFields',
},
default: '',
description:
'ID of the field to set. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},
{
displayName: 'Field Value',
name: 'StringValue',
type: 'string',
default: '',
description: 'Value of the field to set',
},
],
},
],
},
{
displayName: 'Document Number',
name: 'DocNumber',
description: 'Reference number for the transaction',
type: 'string',
default: '',
},
{
displayName: 'Due Date',
name: 'DueDate',
description: 'Date when the payment of the transaction is due',
type: 'dateTime',
default: '',
},
{
displayName: 'Email Status',
name: 'EmailStatus',
type: 'options',
default: 'NotSet',
options: [
{
name: 'Not Set',
value: 'NotSet',
},
{
name: 'Need To Send',
value: 'NeedToSend',
},
{
name: 'Email Sent',
value: 'EmailSent',
},
],
},
{
displayName: 'Print Status',
name: 'PrintStatus',
type: 'options',
default: 'NotSet',
options: [
{
name: 'Not Set',
value: 'NotSet',
},
{
name: 'Need To Print',
value: 'NeedToPrint',
},
{
name: 'PrintComplete',
value: 'PrintComplete',
},
],
},
{
displayName: 'Shipping Address',
name: 'ShipAddr',
type: 'string',
default: '',
},
{
displayName: 'Total Amount',
name: 'TotalAmt',
description: 'Total amount of the transaction',
type: 'number',
default: 0,
},
{
displayName: 'Transaction Date',
name: 'TxnDate',
description: 'Date when the transaction occurred',
type: 'dateTime',
default: '',
},
];
@@ -0,0 +1,401 @@
import type { INodeProperties } from 'n8n-workflow';
import { invoiceAdditionalFieldsOptions } from './InvoiceAdditionalFieldsOptions';
export const invoiceOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Create',
value: 'create',
action: 'Create an invoice',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete an invoice',
},
{
name: 'Get',
value: 'get',
action: 'Get an invoice',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many invoices',
},
{
name: 'Send',
value: 'send',
action: 'Send an invoice',
},
{
name: 'Update',
value: 'update',
action: 'Update an invoice',
},
{
name: 'Void',
value: 'void',
action: 'Void an invoice',
},
],
displayOptions: {
show: {
resource: ['invoice'],
},
},
},
];
export const invoiceFields: INodeProperties[] = [
// ----------------------------------
// invoice: create
// ----------------------------------
{
displayName: 'For Customer Name or ID',
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/expressions/">expression</a>.',
default: [],
typeOptions: {
loadOptionsMethod: 'getCustomers',
},
displayOptions: {
show: {
resource: ['invoice'],
operation: ['create'],
},
},
},
{
displayName: 'Line',
name: 'Line',
type: 'collection',
placeholder: 'Add Line Item Property',
description: 'Individual line item of a transaction',
typeOptions: {
multipleValues: true,
},
default: {},
displayOptions: {
show: {
resource: ['invoice'],
operation: ['create'],
},
},
options: [
{
displayName: 'Amount',
name: 'Amount',
description: 'Monetary amount of the line item',
type: 'number',
default: 0,
},
{
displayName: 'Description',
name: 'Description',
description: 'Textual description of the line item',
type: 'string',
default: '',
},
{
displayName: 'Detail Type',
name: 'DetailType',
type: 'options',
default: 'SalesItemLineDetail',
options: [
{
name: 'Sales Item Line Detail',
value: 'SalesItemLineDetail',
},
],
},
{
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/expressions/">expression</a>',
default: [],
typeOptions: {
loadOptionsMethod: 'getItems',
},
},
{
displayName: 'Position',
name: 'LineNum',
description: 'Position of the line item relative to others',
type: 'number',
default: 1,
},
{
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/expressions/">expression</a>',
default: [],
typeOptions: {
loadOptionsMethod: 'getTaxCodeRefs',
},
},
{
displayName: 'Quantity',
name: 'Qty',
description: 'Number of units of the line item',
type: 'number',
default: 0,
},
],
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['invoice'],
operation: ['create'],
},
},
options: invoiceAdditionalFieldsOptions,
},
// ----------------------------------
// invoice: delete
// ----------------------------------
{
displayName: 'Invoice ID',
name: 'invoiceId',
type: 'string',
required: true,
default: '',
description: 'The ID of the invoice to delete',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['delete'],
},
},
},
// ----------------------------------
// invoice: get
// ----------------------------------
{
displayName: 'Invoice ID',
name: 'invoiceId',
type: 'string',
required: true,
default: '',
description: 'The ID of the invoice to retrieve',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['get'],
},
},
},
{
displayName: 'Download',
name: 'download',
type: 'boolean',
required: true,
default: false,
description: 'Whether to download the invoice as a PDF file',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['get'],
},
},
},
{
displayName: 'Put Output File in Field',
name: 'binaryProperty',
type: 'string',
required: true,
default: 'data',
hint: 'The name of the output binary field to put the file in',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['get'],
download: [true],
},
},
},
{
displayName: 'File Name',
name: 'fileName',
type: 'string',
required: true,
default: '',
placeholder: 'data.pdf',
description: 'Name of the file that will be downloaded',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['get'],
download: [true],
},
},
},
// ----------------------------------
// invoice: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['invoice'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
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.',
},
],
displayOptions: {
show: {
resource: ['invoice'],
operation: ['getAll'],
},
},
},
// ----------------------------------
// invoice: send
// ----------------------------------
{
displayName: 'Invoice ID',
name: 'invoiceId',
type: 'string',
required: true,
default: '',
description: 'The ID of the invoice to send',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['send'],
},
},
},
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@email.com',
required: true,
default: '',
description: 'The email of the recipient of the invoice',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['send'],
},
},
},
// ----------------------------------
// invoice: void
// ----------------------------------
{
displayName: 'Invoice ID',
name: 'invoiceId',
type: 'string',
required: true,
default: '',
description: 'The ID of the invoice to void',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['void'],
},
},
},
// ----------------------------------
// invoice: update
// ----------------------------------
{
displayName: 'Invoice ID',
name: 'invoiceId',
type: 'string',
required: true,
default: '',
description: 'The ID of the invoice to update',
displayOptions: {
show: {
resource: ['invoice'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
required: true,
displayOptions: {
show: {
resource: ['invoice'],
operation: ['update'],
},
},
// filter out fields that cannot be updated
options: invoiceAdditionalFieldsOptions.filter(
(property) => property.name !== 'TotalAmt' && property.name !== 'Balance',
),
},
];
@@ -0,0 +1,107 @@
import type { INodeProperties } from 'n8n-workflow';
export const itemOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Get',
value: 'get',
action: 'Get an item',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many items',
},
],
displayOptions: {
show: {
resource: ['item'],
},
},
},
];
export const itemFields: INodeProperties[] = [
// ----------------------------------
// item: get
// ----------------------------------
{
displayName: 'Item ID',
name: 'itemId',
type: 'string',
required: true,
default: '',
description: 'The ID of the item to retrieve',
displayOptions: {
show: {
resource: ['item'],
operation: ['get'],
},
},
},
// ----------------------------------
// item: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['item'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['item'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
description:
'The condition for selecting items. 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.',
},
],
displayOptions: {
show: {
resource: ['item'],
operation: ['getAll'],
},
},
},
];
@@ -0,0 +1,11 @@
import type { INodeProperties } from 'n8n-workflow';
export const paymentAdditionalFieldsOptions: INodeProperties[] = [
{
displayName: 'Transaction Date',
name: 'TxnDate',
description: 'Date when the transaction occurred',
type: 'dateTime',
default: '',
},
];
@@ -0,0 +1,330 @@
import type { INodeProperties } from 'n8n-workflow';
import { paymentAdditionalFieldsOptions } from './PaymentAdditionalFieldsOptions';
export const paymentOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Create',
value: 'create',
action: 'Create a payment',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete a payment',
},
{
name: 'Get',
value: 'get',
action: 'Get a payment',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many payments',
},
{
name: 'Send',
value: 'send',
action: 'Send a payment',
},
{
name: 'Update',
value: 'update',
action: 'Update a payment',
},
{
name: 'Void',
value: 'void',
action: 'Void a payment',
},
],
displayOptions: {
show: {
resource: ['payment'],
},
},
},
];
export const paymentFields: INodeProperties[] = [
// ----------------------------------
// payment: create
// ----------------------------------
{
displayName: 'For Customer Name or ID',
name: 'CustomerRef',
type: 'options',
required: true,
description:
'The ID of the customer who the payment is for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
default: [],
typeOptions: {
loadOptionsMethod: 'getCustomers',
},
displayOptions: {
show: {
resource: ['payment'],
operation: ['create'],
},
},
},
{
displayName: 'Total Amount',
name: 'TotalAmt',
description: 'Total amount of the transaction',
type: 'number',
default: 0,
displayOptions: {
show: {
resource: ['payment'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['payment'],
operation: ['create'],
},
},
options: paymentAdditionalFieldsOptions,
},
// ----------------------------------
// payment: delete
// ----------------------------------
{
displayName: 'Payment ID',
name: 'paymentId',
type: 'string',
required: true,
default: '',
description: 'The ID of the payment to delete',
displayOptions: {
show: {
resource: ['payment'],
operation: ['delete'],
},
},
},
// ----------------------------------
// payment: get
// ----------------------------------
{
displayName: 'Payment ID',
name: 'paymentId',
type: 'string',
required: true,
default: '',
description: 'The ID of the payment to retrieve',
displayOptions: {
show: {
resource: ['payment'],
operation: ['get'],
},
},
},
{
displayName: 'Download',
name: 'download',
type: 'boolean',
required: true,
default: false,
description: 'Whether to download estimate as PDF file',
displayOptions: {
show: {
resource: ['payment'],
operation: ['get'],
},
},
},
{
displayName: 'Put Output File in Field',
name: 'binaryProperty',
type: 'string',
required: true,
default: 'data',
hint: 'The name of the output binary field to put the file in',
displayOptions: {
show: {
resource: ['payment'],
operation: ['get'],
download: [true],
},
},
},
{
displayName: 'File Name',
name: 'fileName',
type: 'string',
required: true,
default: '',
placeholder: 'data.pdf',
description: 'Name of the file that will be downloaded',
displayOptions: {
show: {
resource: ['payment'],
operation: ['get'],
download: [true],
},
},
},
// ----------------------------------
// payment: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['payment'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['payment'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
description:
'The condition for selecting payments. 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.',
},
],
displayOptions: {
show: {
resource: ['payment'],
operation: ['getAll'],
},
},
},
// ----------------------------------
// payment: send
// ----------------------------------
{
displayName: 'Payment ID',
name: 'paymentId',
type: 'string',
required: true,
default: '',
description: 'The ID of the payment to send',
displayOptions: {
show: {
resource: ['payment'],
operation: ['send'],
},
},
},
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@email.com',
required: true,
default: '',
description: 'The email of the recipient of the payment',
displayOptions: {
show: {
resource: ['payment'],
operation: ['send'],
},
},
},
// ----------------------------------
// payment: void
// ----------------------------------
{
displayName: 'Payment ID',
name: 'paymentId',
type: 'string',
required: true,
default: '',
description: 'The ID of the payment to void',
displayOptions: {
show: {
resource: ['payment'],
operation: ['void'],
},
},
},
// ----------------------------------
// payment: update
// ----------------------------------
{
displayName: 'Payment ID',
name: 'paymentId',
type: 'string',
required: true,
default: '',
description: 'The ID of the payment to update',
displayOptions: {
show: {
resource: ['payment'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
required: true,
displayOptions: {
show: {
resource: ['payment'],
operation: ['update'],
},
},
options: paymentAdditionalFieldsOptions,
},
];
@@ -0,0 +1,107 @@
import type { INodeProperties } from 'n8n-workflow';
export const purchaseOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Get',
value: 'get',
action: 'Get a purchase',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many purchases',
},
],
displayOptions: {
show: {
resource: ['purchase'],
},
},
},
];
export const purchaseFields: INodeProperties[] = [
// ----------------------------------
// purchase: get
// ----------------------------------
{
displayName: 'Purchase ID',
name: 'purchaseId',
type: 'string',
required: true,
default: '',
description: 'The ID of the purchase to retrieve',
displayOptions: {
show: {
resource: ['purchase'],
operation: ['get'],
},
},
},
// ----------------------------------
// purchase: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['purchase'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['purchase'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
description:
'The condition for selecting purchases. 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.',
},
],
displayOptions: {
show: {
resource: ['purchase'],
operation: ['getAll'],
},
},
},
];
@@ -0,0 +1,48 @@
export interface BillingAddress {
Line4: string;
Line3: string;
Line2: string;
Line1: string;
Long: string;
Lat: string;
}
export interface BillEmail {
Address: string;
}
export interface CustomField {
DefinitionId: string;
Name: string;
}
export interface CustomerMemo {
value: string;
}
export interface GeneralAddress {
City: string;
Line1: string;
PostalCode: string;
Lat: string;
Long: string;
CountrySubDivisionCode: string;
}
export interface LinkedTxn {
TxnId: string;
TxnType: string;
}
export interface PrimaryEmailAddr {
Address: string;
}
export interface PrimaryPhone {
FreeFormNumber: string;
}
export interface Ref {
value: string;
name?: string;
}
@@ -0,0 +1,388 @@
import type { INodeProperties } from 'n8n-workflow';
import {
GROUP_BY_OPTIONS,
PAYMENT_METHODS,
PREDEFINED_DATE_RANGES,
SOURCE_ACCOUNT_TYPES,
TRANSACTION_REPORT_COLUMNS,
TRANSACTION_TYPES,
} from './constants';
import { toDisplayName, toOptions } from '../../GenericFunctions';
export const transactionOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'getReport',
options: [
{
name: 'Get Report',
value: 'getReport',
action: 'Get a report',
},
],
displayOptions: {
show: {
resource: ['transaction'],
},
},
},
];
export const transactionFields: INodeProperties[] = [
// ----------------------------------
// transaction: getReport
// ----------------------------------
{
displayName: 'Simplify',
name: 'simple',
type: 'boolean',
displayOptions: {
show: {
resource: ['transaction'],
operation: ['getReport'],
},
},
default: true,
description: 'Whether to return a simplified version of the response instead of the raw data',
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['transaction'],
operation: ['getReport'],
},
},
options: [
{
displayName: 'Accounts Payable Paid',
name: 'appaid',
type: 'options',
default: 'All',
options: ['All', 'Paid', 'Unpaid'].map(toOptions),
},
{
displayName: 'Accounts Receivable Paid',
name: 'arpaid',
type: 'options',
default: 'All',
options: ['All', 'Paid', 'Unpaid'].map(toOptions),
},
{
displayName: 'Cleared Status',
name: 'cleared',
type: 'options',
default: 'Reconciled',
options: ['Cleared', 'Uncleared', 'Reconciled', 'Deposited'].map(toOptions),
},
{
displayName: 'Columns',
name: 'columns',
type: 'multiOptions',
default: [],
description: 'Columns to return',
options: TRANSACTION_REPORT_COLUMNS,
},
{
displayName: 'Customer Names or IDs',
name: 'customer',
type: 'multiOptions',
default: [],
description:
'Customer to filter results by. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getCustomers',
},
},
{
displayName: 'Date Range (Custom)',
name: 'dateRangeCustom',
placeholder: 'Add Date Range',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Date Range Properties',
name: 'dateRangeCustomProperties',
values: [
{
displayName: 'Start Date',
name: 'start_date',
type: 'dateTime',
default: '',
description: 'Start date of the date range to filter results by',
},
{
displayName: 'End Date',
name: 'end_date',
type: 'dateTime',
default: '',
description: 'End date of the date range to filter results by',
},
],
},
],
},
{
displayName: 'Date Range (Predefined)',
name: 'date_macro',
type: 'options',
default: 'This Month',
description: 'Predefined date range to filter results by',
options: PREDEFINED_DATE_RANGES.map(toOptions),
},
{
displayName: 'Date Range for Creation Date (Custom)',
name: 'dateRangeCreationCustom',
placeholder: 'Add Creation Date Range',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Creation Date Range Properties',
name: 'dateRangeCreationCustomProperties',
values: [
{
displayName: 'Start Creation Date',
name: 'start_createdate',
type: 'dateTime',
default: '',
description: 'Start date of the account creation date range to filter results by',
},
{
displayName: 'End Creation Date',
name: 'end_createdate',
type: 'dateTime',
default: '',
description: 'End date of the account creation date range to filter results by',
},
],
},
],
},
{
displayName: 'Date Range for Creation Date (Predefined)',
name: 'createdate_macro',
type: 'options',
default: 'This Month',
options: PREDEFINED_DATE_RANGES.map(toOptions),
description: 'Predefined report account creation date range',
},
{
displayName: 'Date Range for Due Date (Custom)',
name: 'dateRangeDueCustom',
placeholder: 'Add Due Date Range',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Due Date Range Properties',
name: 'dateRangeDueCustomProperties',
values: [
{
displayName: 'Start Due Date',
name: 'start_duedate',
type: 'dateTime',
default: '',
description: 'Start date of the due date range to filter results by',
},
{
displayName: 'End Due Date',
name: 'end_duedate',
type: 'dateTime',
default: '',
description: 'End date of the due date range to filter results by',
},
],
},
],
},
{
displayName: 'Date Range for Due Date (Predefined)',
name: 'duedate_macro',
type: 'options',
default: 'This Month',
description: 'Predefined due date range to filter results by',
options: PREDEFINED_DATE_RANGES.map(toOptions),
},
{
displayName: 'Date Range for Modification Date (Custom)',
name: 'dateRangeModificationCustom',
placeholder: 'Add Modification Date Range',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Modification Date Range Properties',
name: 'dateRangeModificationCustomProperties',
values: [
{
displayName: 'Start Modification Date',
name: 'start_moddate',
type: 'dateTime',
default: '',
description:
'Start date of the account modification date range to filter results by',
},
{
displayName: 'End Modification Date',
name: 'end_moddate',
type: 'dateTime',
default: '',
description: 'End date of the account modification date range to filter results by',
},
],
},
],
},
{
displayName: 'Date Range for Modification Date (Predefined)',
name: 'moddate_macro',
type: 'options',
default: 'This Month',
description: 'Predefined account modifiction date range to filter results by',
options: PREDEFINED_DATE_RANGES.map(toOptions),
},
{
displayName: 'Department Names or IDs',
name: 'department',
type: 'multiOptions',
default: [],
description:
'Department to filter results by. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
},
{
displayName: 'Document Number',
name: 'docnum',
type: 'string',
default: '',
description: 'Transaction document number to filter results by',
},
{
displayName: 'Group By',
name: 'group_by',
default: 'Account',
type: 'options',
description: 'Transaction field to group results by',
options: GROUP_BY_OPTIONS.map(toOptions),
},
{
displayName: 'Memo Names or IDs',
name: 'memo',
type: 'multiOptions',
default: [],
description:
'Memo to filter results by. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getMemos',
},
},
{
displayName: 'Payment Method',
name: 'payment_Method',
type: 'options',
default: 'Cash',
description: 'Payment method to filter results by',
options: PAYMENT_METHODS.map(toOptions),
},
{
displayName: 'Printed Status',
name: 'printed',
type: 'options',
default: 'Printed',
description: 'Printed state to filter results by',
options: [
{
name: 'Printed',
value: 'Printed',
},
{
name: 'To Be Printed',
value: 'To_be_printed',
},
],
},
{
displayName: 'Quick Zoom URL',
name: 'qzurl',
type: 'boolean',
default: true,
description: 'Whether Quick Zoom URL information should be generated',
},
{
displayName: 'Sort By',
name: 'sort_by',
type: 'options',
default: 'account_name',
description: 'Column to sort results by',
options: TRANSACTION_REPORT_COLUMNS,
},
{
displayName: 'Sort Order',
name: 'sort_order',
type: 'options',
default: 'Ascend',
options: ['Ascend', 'Descend'].map(toOptions),
},
{
displayName: 'Source Account Type',
name: 'source_account_type',
default: 'Bank',
type: 'options',
description: 'Account type to filter results by',
options: SOURCE_ACCOUNT_TYPES.map(toOptions).map(toDisplayName),
},
{
displayName: 'Term Names or IDs',
name: 'term',
type: 'multiOptions',
default: [],
description:
'Term to filter results by. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getTerms',
},
},
{
displayName: 'Transaction Amount',
name: 'bothamount',
type: 'number',
default: 0,
typeOptions: {
numberPrecision: 2,
},
description: 'Monetary amount to filter results by',
},
{
displayName: 'Transaction Type',
name: 'transaction_type',
type: 'options',
default: 'CreditCardCharge',
description: 'Transaction type to filter results by',
options: TRANSACTION_TYPES.map(toOptions).map(toDisplayName),
},
{
displayName: 'Vendor Names or IDs',
name: 'vendor',
type: 'multiOptions',
default: [],
description:
'Vendor to filter results by. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getVendors',
},
},
],
},
];
@@ -0,0 +1,204 @@
export const PREDEFINED_DATE_RANGES = [
'Today',
'Yesterday',
'This Week',
'Last Week',
'This Week-to-Date',
'Last Week-to-Date',
'Next Week',
'Next 4 Weeks',
'This Month',
'Last Month',
'This Month-to-Date',
'Last Month-to-Date',
'Next Month',
'This Fiscal Quarter',
'Last Fiscal Quarter',
'This Fiscal Quarter-to-Date',
'Last Fiscal Quarter-to-Date',
'Next Fiscal Quarter',
'This Fiscal Year',
'Last Fiscal Year',
'This Fiscal Year-to-Date',
'Last Fiscal Year-to-Date',
'Next Fiscal Year',
];
export const TRANSACTION_REPORT_COLUMNS = [
{
name: 'Account Name',
value: 'account_name',
},
{
name: 'Created By',
value: 'create_by',
},
{
name: 'Create Date',
value: 'create_date',
},
{
name: 'Customer Message',
value: 'cust_msg',
},
{
name: 'Department Name',
value: 'dept_name',
},
{
name: 'Due Date',
value: 'due_date',
},
{
name: 'Document Number',
value: 'doc_num',
},
{
name: 'Invoice Date',
value: 'inv_date',
},
{
name: 'Is Account Payable Paid',
value: 'is_ap_paid',
},
{
name: 'Is Cleared',
value: 'is_cleared',
},
{
name: 'Last Modified By',
value: 'last_mod_by',
},
{
name: 'Memo',
value: 'memo',
},
{
name: 'Name',
value: 'name',
},
{
name: 'Other Account',
value: 'other_account',
},
{
name: 'Payment Method',
value: 'pmt_mthod',
},
{
name: 'Posting',
value: 'is_no_post',
},
{
name: 'Printed Status',
value: 'printed',
},
{
name: 'Sales Customer 1',
value: 'sales_cust1',
},
{
name: 'Sales Customer 2',
value: 'sales_cust2',
},
{
name: 'Sales Customer 3',
value: 'sales_cust3',
},
{
name: 'Term Name',
value: 'term_name',
},
{
name: 'Tracking Number',
value: 'tracking_num',
},
{
name: 'Transaction Date',
value: 'tx_date',
},
{
name: 'Transaction Type',
value: 'txn_type',
},
];
export const PAYMENT_METHODS = [
'American Express',
'Cash',
'Check',
'Dinners Club',
'Discover',
'Master Card',
'Visa',
];
export const TRANSACTION_TYPES = [
'Bill',
'BillPaymentCheck',
'BillPaymentCreditCard',
'BillableCharge',
'CashPurchase',
'Charge',
'Check',
'Credit',
'CreditCardCharge',
'CreditCardCredit',
'CreditMemo',
'CreditRefund',
'Deposit',
'Estimate',
'GlobalTaxAdjustment',
'GlobalTaxPayment',
'InventoryQuantityAdjustment',
'Invoice',
'JournalEntry',
'PurchaseOrder',
'ReceivePayment',
'SalesReceipt',
'Service Tax Defer',
'Service Tax Gross Adjustment',
'Service Tax Partial Utilisation',
'Service Tax Refund',
'Service Tax Reversal',
'Statement',
'TimeActivity',
'Transfer',
'VendorCredit',
];
export const SOURCE_ACCOUNT_TYPES = [
'AccountsPayable',
'AccountsReceivable',
'Bank',
'CostOfGoodsSold',
'CreditCard',
'Equity',
'Expense',
'FixedAsset',
'Income',
'LongTermLiability',
'NonPosting',
'OtherAsset',
'OtherCurrentAsset',
'OtherCurrentLiability',
'OtherExpense',
'OtherIncome',
];
export const GROUP_BY_OPTIONS = [
'Account',
'Customer',
'Day',
'Employee',
'Location',
'Month',
'Name',
'None',
'Payment Method',
'Quarter',
'Transaction Type',
'Vendor',
'Week',
'Year',
];
@@ -0,0 +1,120 @@
import type { INodeProperties } from 'n8n-workflow';
export const vendorAdditionalFieldsOptions: INodeProperties[] = [
{
displayName: 'Account Number',
name: 'AcctNum',
type: 'string',
default: '',
},
{
displayName: 'Active',
name: 'Active',
description: 'Whether the employee is currently enabled for use by QuickBooks',
type: 'boolean',
default: false,
},
{
displayName: 'Balance',
name: 'Balance',
description: 'The balance reflecting any payments made against the transaction',
type: 'number',
default: 0,
},
{
displayName: 'Billing Address',
name: 'BillAddr',
placeholder: 'Add Billing Address Fields',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Details',
name: 'details',
values: [
{
displayName: 'City',
name: 'City',
type: 'string',
default: '',
},
{
displayName: 'Line 1',
name: 'Line1',
type: 'string',
default: '',
},
{
displayName: 'Postal Code',
name: 'PostalCode',
type: 'string',
default: '',
},
{
displayName: 'Latitude',
name: 'Lat',
type: 'string',
default: '',
},
{
displayName: 'Longitude',
name: 'Long',
type: 'string',
default: '',
},
{
displayName: 'Country Subdivision Code',
name: 'CountrySubDivisionCode',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Company Name',
name: 'CompanyName',
type: 'string',
default: '',
},
{
displayName: 'Family Name',
name: 'FamilyName',
type: 'string',
default: '',
},
{
displayName: 'Given Name',
name: 'GivenName',
type: 'string',
default: '',
},
{
displayName: 'Primary Email Address',
name: 'PrimaryEmailAddr',
type: 'string',
default: '',
},
{
displayName: 'Primary Phone',
name: 'PrimaryPhone',
type: 'string',
default: '',
},
{
displayName: 'Print-On-Check Name',
name: 'PrintOnCheckName',
description: 'Name of the vendor as printed on a check',
type: 'string',
default: '',
},
{
displayName: 'Vendor 1099',
name: 'Vendor1099',
description:
'Whether the vendor is an independent contractor, given a 1099-MISC form at the end of the year',
type: 'boolean',
default: false,
},
];
@@ -0,0 +1,184 @@
import type { INodeProperties } from 'n8n-workflow';
import { vendorAdditionalFieldsOptions } from './VendorAdditionalFieldsOptions';
export const vendorOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
options: [
{
name: 'Create',
value: 'create',
action: 'Create a vendor',
},
{
name: 'Get',
value: 'get',
action: 'Get a vendor',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many vendors',
},
{
name: 'Update',
value: 'update',
action: 'Update a vendor',
},
],
displayOptions: {
show: {
resource: ['vendor'],
},
},
},
];
export const vendorFields: INodeProperties[] = [
// ----------------------------------
// vendor: create
// ----------------------------------
{
displayName: 'Display Name',
name: 'displayName',
type: 'string',
required: true,
default: '',
description: 'The display name of the vendor to create',
displayOptions: {
show: {
resource: ['vendor'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['vendor'],
operation: ['create'],
},
},
options: vendorAdditionalFieldsOptions,
},
// ----------------------------------
// vendor: get
// ----------------------------------
{
displayName: 'Vendor ID',
name: 'vendorId',
type: 'string',
required: true,
default: '',
description: 'The ID of the vendor to retrieve',
displayOptions: {
show: {
resource: ['vendor'],
operation: ['get'],
},
},
},
// ----------------------------------
// vendor: getAll
// ----------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['vendor'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
maxValue: 1000,
},
displayOptions: {
show: {
resource: ['vendor'],
operation: ['getAll'],
returnAll: [false],
},
},
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
placeholder: "WHERE Metadata.LastUpdatedTime > '2021-01-01'",
description:
'The condition for selecting vendors. 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.',
},
],
displayOptions: {
show: {
resource: ['vendor'],
operation: ['getAll'],
},
},
},
// ----------------------------------
// vendor: update
// ----------------------------------
{
displayName: 'Vendor ID',
name: 'vendorId',
type: 'string',
required: true,
default: '',
description: 'The ID of the vendor to update',
displayOptions: {
show: {
resource: ['vendor'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
required: true,
displayOptions: {
show: {
resource: ['vendor'],
operation: ['update'],
},
},
options: vendorAdditionalFieldsOptions,
},
];
@@ -0,0 +1,10 @@
export * from './Bill/BillDescription';
export * from './Customer/CustomerDescription';
export * from './Employee/EmployeeDescription';
export * from './Estimate/EstimateDescription';
export * from './Invoice/InvoiceDescription';
export * from './Item/ItemDescription';
export * from './Payment/PaymentDescription';
export * from './Vendor/VendorDescription';
export * from './Purchase/PurchaseDescription';
export * from './Transaction/TransactionDescription';