From 6f229f1f47dd0f6b86f5d0ced4da714830e4516e Mon Sep 17 00:00:00 2001 From: Rob Cunning Date: Thu, 8 Oct 2020 00:25:57 -0600 Subject: [PATCH] Add additional parameters to Pipedrive notes getAll --- .../nodes-base/nodes/Pipedrive/Pipedrive.node.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts index dba5142e4f..4d68980aa8 100644 --- a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts @@ -1420,6 +1420,7 @@ export class Pipedrive implements INodeType { show: { operation: [ 'create', + 'getAll' ], resource: [ 'note', @@ -2516,13 +2517,25 @@ export class Pipedrive implements INodeType { // ---------------------------------- requestMethod = 'GET'; + endpoint = `/notes`; returnAll = this.getNodeParameter('returnAll', i) as boolean; if (returnAll === false) { qs.limit = this.getNodeParameter('limit', i) as number; } + const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject; - endpoint = `/notes`; + if (additionalFields.deal_id) { + qs.deal_id = parseInt(additionalFields.deal_id as string, 10); + } + + if (additionalFields.org_id) { + qs.org_id = parseInt(additionalFields.org_id as string, 10); + } + + if (additionalFields.person_id) { + qs.person_id = parseInt(additionalFields.person_id as string, 10); + } } else if (operation === 'update') { // ----------------------------------