From d06b38c5ff15366530a9ba886579de98d55814fe Mon Sep 17 00:00:00 2001 From: trojanh Date: Mon, 3 Feb 2020 18:25:21 +0530 Subject: [PATCH] Capitalize display title --- .../nodes/Harvest/ClientDescription.ts | 216 +++++++++--------- .../nodes/Harvest/ContactDescription.ts | 30 +-- .../nodes/Harvest/EstimateDescription.ts | 8 +- .../nodes/Harvest/GenericFunctions.ts | 2 +- .../nodes/Harvest/InvoiceDescription.ts | 4 +- 5 files changed, 130 insertions(+), 130 deletions(-) diff --git a/packages/nodes-base/nodes/Harvest/ClientDescription.ts b/packages/nodes-base/nodes/Harvest/ClientDescription.ts index 0ee743018b..5bc339ae62 100644 --- a/packages/nodes-base/nodes/Harvest/ClientDescription.ts +++ b/packages/nodes-base/nodes/Harvest/ClientDescription.ts @@ -1,6 +1,6 @@ import { INodeProperties } from "n8n-workflow"; -const resource = [ 'clients' ]; +const resource = ['clients']; export const clientOperations = [ { @@ -47,124 +47,124 @@ export const clientOperations = [ export const clientFields = [ -/* -------------------------------------------------------------------------- */ -/* client:getAll */ -/* -------------------------------------------------------------------------- */ + /* -------------------------------------------------------------------------- */ + /* client:getAll */ + /* -------------------------------------------------------------------------- */ -{ - displayName: 'Return All', - name: 'returnAll', - type: 'boolean', - displayOptions: { - show: { - resource, - operation: [ - 'getAll', - ], + { + displayName: 'Return All', + name: 'returnAll', + type: 'boolean', + displayOptions: { + show: { + resource, + operation: [ + 'getAll', + ], + }, }, + default: false, + description: 'Returns a list of your clients.', }, - default: false, - description: 'Returns a list of your clients.', -}, -{ - displayName: 'Limit', - name: 'limit', - type: 'number', - displayOptions: { - show: { - resource, - operation: [ - 'getAll', - ], - returnAll: [ - false, - ], + { + displayName: 'Limit', + name: 'limit', + type: 'number', + displayOptions: { + show: { + resource, + operation: [ + 'getAll', + ], + returnAll: [ + false, + ], + }, }, - }, - typeOptions: { - minValue: 1, - maxValue: 100, - }, - default: 100, - description: 'How many results to return.', -}, -{ - displayName: 'Filters', - name: 'filters', - type: 'collection', - placeholder: 'Add Filter', - default: {}, - displayOptions: { - show: { - resource, - operation: [ - 'getAll', - ], + typeOptions: { + minValue: 1, + maxValue: 100, }, + default: 100, + description: 'How many results to return.', }, - options: [ - { - displayName: 'Is Active', - name: 'is_active', - type: 'boolean', - default: true, - description: 'Pass true to only return active clients and false to return inactive clients.', + { + displayName: 'Filters', + name: 'filters', + type: 'collection', + placeholder: 'Add Filter', + default: {}, + displayOptions: { + show: { + resource, + operation: [ + 'getAll', + ], + }, }, - { - displayName: 'Updated Since', - name: 'updated_since', - type: 'dateTime', - default: '', - description: 'Only return clients that have been updated since the given date and time.', - } - ] -}, + options: [ + { + displayName: 'Is Active', + name: 'is_active', + type: 'boolean', + default: true, + description: 'Pass true to only return active clients and false to return inactive clients.', + }, + { + displayName: 'Updated Since', + name: 'updated_since', + type: 'dateTime', + default: '', + description: 'Only return clients that have been updated since the given date and time.', + } + ] + }, -/* -------------------------------------------------------------------------- */ -/* client:get */ -/* -------------------------------------------------------------------------- */ -{ - displayName: 'Client Id', - name: 'id', - type: 'string', - default: '', - required: true, - displayOptions: { - show: { - operation: [ - 'get', - ], - resource + /* -------------------------------------------------------------------------- */ + /* client:get */ + /* -------------------------------------------------------------------------- */ + { + displayName: 'Client Id', + name: 'id', + type: 'string', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'get', + ], + resource + }, }, + description: 'The ID of the client you are retrieving.', }, - description: 'The ID of the client you are retrieving.', -}, -/* -------------------------------------------------------------------------- */ -/* client:delete */ -/* -------------------------------------------------------------------------- */ -{ - displayName: 'Client Id', - name: 'id', - type: 'string', - default: '', - required: true, - displayOptions: { - show: { - operation: [ - 'delete', - ], - resource + /* -------------------------------------------------------------------------- */ + /* client:delete */ + /* -------------------------------------------------------------------------- */ + { + displayName: 'Client Id', + name: 'id', + type: 'string', + default: '', + required: true, + displayOptions: { + show: { + operation: [ + 'delete', + ], + resource + }, }, + description: 'The ID of the client you want to delete.', }, - description: 'The ID of the client you want to delete.', -}, /* -------------------------------------------------------------------------- */ /* client:create */ /* -------------------------------------------------------------------------- */ { - displayName: 'name', + displayName: 'Name', name: 'name', type: 'string', displayOptions: { @@ -195,14 +195,14 @@ export const clientFields = [ default: {}, options: [ { - displayName: 'is_active', + displayName: 'Is Active', name: 'is_active', type: 'string', default: '', description: 'Whether the client is active, or archived. Defaults to true.' }, { - displayName: 'address', + displayName: 'Address', name: 'address', type: 'string', default: '', @@ -218,11 +218,11 @@ export const clientFields = [ ], }, - /* -------------------------------------------------------------------------- */ + /* -------------------------------------------------------------------------- */ /* client:update */ /* -------------------------------------------------------------------------- */ { - displayName: 'client Id', + displayName: 'Client Id', name: 'id', type: 'string', default: '', @@ -253,21 +253,21 @@ export const clientFields = [ default: {}, options: [ { - displayName: 'name', + displayName: 'Name', name: 'name', type: 'string', default: '', description: 'Whether the client is active, or archived. Defaults to true.' }, { - displayName: 'is_active', + displayName: 'Is Active', name: 'is_active', type: 'string', default: '', description: 'Whether the client is active, or archived. Defaults to true.' }, { - displayName: 'address', + displayName: 'Address', name: 'address', type: 'string', default: '', diff --git a/packages/nodes-base/nodes/Harvest/ContactDescription.ts b/packages/nodes-base/nodes/Harvest/ContactDescription.ts index 1532809f51..fa11943a66 100644 --- a/packages/nodes-base/nodes/Harvest/ContactDescription.ts +++ b/packages/nodes-base/nodes/Harvest/ContactDescription.ts @@ -180,7 +180,7 @@ export const contactFields = [ description: 'The first name of the contact.', }, { - displayName: 'client_id', + displayName: 'Client Id', name: 'client_id', type: 'string', displayOptions: { @@ -211,42 +211,42 @@ export const contactFields = [ default: {}, options: [ { - displayName: 'last_name', + displayName: 'Last Name', name: 'last_name', type: 'string', default: '', description: 'The last name of the contact.' }, { - displayName: 'title', + displayName: 'Title', name: 'title', type: 'string', default: '', description: 'The title of the contact.' }, { - displayName: 'email', + displayName: 'Email', name: 'email', type: 'string', default: '', description: 'The contact’s email address.' }, { - displayName: 'phone_office', + displayName: 'Phone Office', name: 'phone_office', type: 'string', default: '', description: 'The contact’s office phone number.' }, { - displayName: 'phone_mobile', + displayName: 'Phone Mobile', name: 'phone_mobile', type: 'string', default: '', description: 'The contact’s mobile phone number.' }, { - displayName: 'fax', + displayName: 'Fax', name: 'fax', type: 'string', default: '', @@ -259,7 +259,7 @@ export const contactFields = [ /* contact:update */ /* -------------------------------------------------------------------------- */ { - displayName: 'contact Id', + displayName: 'Contact Id', name: 'id', type: 'string', default: '', @@ -290,7 +290,7 @@ export const contactFields = [ default: {}, options: [ { - displayName: 'client_id', + displayName: 'Client Id', name: 'client_id', type: 'string', default: '', @@ -304,42 +304,42 @@ export const contactFields = [ description: 'The first name of the contact.', }, { - displayName: 'last_name', + displayName: 'Last Name', name: 'last_name', type: 'string', default: '', description: 'The last name of the contact.' }, { - displayName: 'title', + displayName: 'Title', name: 'title', type: 'string', default: '', description: 'The title of the contact.' }, { - displayName: 'email', + displayName: 'Email', name: 'email', type: 'string', default: '', description: 'The contact’s email address.' }, { - displayName: 'phone_office', + displayName: 'Phone Office', name: 'phone_office', type: 'string', default: '', description: 'The contact’s office phone number.' }, { - displayName: 'phone_mobile', + displayName: 'Phone Mobile', name: 'phone_mobile', type: 'string', default: '', description: 'The contact’s mobile phone number.' }, { - displayName: 'fax', + displayName: 'Fax', name: 'fax', type: 'string', default: '', diff --git a/packages/nodes-base/nodes/Harvest/EstimateDescription.ts b/packages/nodes-base/nodes/Harvest/EstimateDescription.ts index 1bb35601f1..f9ea2297ca 100644 --- a/packages/nodes-base/nodes/Harvest/EstimateDescription.ts +++ b/packages/nodes-base/nodes/Harvest/EstimateDescription.ts @@ -192,10 +192,10 @@ export const estimateFields = [ }, /* -------------------------------------------------------------------------- */ - /* invoice:create */ + /* estimate:create */ /* -------------------------------------------------------------------------- */ { - displayName: 'client_id', + displayName: 'Client Id', name: 'client_id', type: 'string', displayOptions: { @@ -293,7 +293,7 @@ export const estimateFields = [ }, /* -------------------------------------------------------------------------- */ - /* invoice:update */ + /* estimate:update */ /* -------------------------------------------------------------------------- */ { displayName: 'Invoice Id', @@ -327,7 +327,7 @@ export const estimateFields = [ default: {}, options: [ { - displayName: 'client_id', + displayName: 'Client Id', name: 'client_id', type: 'string', default: '', diff --git a/packages/nodes-base/nodes/Harvest/GenericFunctions.ts b/packages/nodes-base/nodes/Harvest/GenericFunctions.ts index c0eced039c..276405df3b 100644 --- a/packages/nodes-base/nodes/Harvest/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Harvest/GenericFunctions.ts @@ -50,7 +50,7 @@ export async function harvestApiRequest( if (Object.keys(options.body).length === 0) { delete options.body; } - console.log(options) + try { const result = await this.helpers.request!(options); diff --git a/packages/nodes-base/nodes/Harvest/InvoiceDescription.ts b/packages/nodes-base/nodes/Harvest/InvoiceDescription.ts index ebab65a532..694a99ed9e 100644 --- a/packages/nodes-base/nodes/Harvest/InvoiceDescription.ts +++ b/packages/nodes-base/nodes/Harvest/InvoiceDescription.ts @@ -220,7 +220,7 @@ export const invoiceFields = [ /* invoice:create */ /* -------------------------------------------------------------------------- */ { - displayName: 'client_id', + displayName: 'Client Id', name: 'client_id', type: 'string', displayOptions: { @@ -380,7 +380,7 @@ export const invoiceFields = [ default: {}, options: [ { - displayName: 'client_id', + displayName: 'Client Id', name: 'client_id', type: 'string', default: '',