From f1589d4f0f9f7cc7beec12d9f6598f8286484989 Mon Sep 17 00:00:00 2001 From: agobrech <45268029+agobrech@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:49:59 +0100 Subject: [PATCH] feat: Add Required path name mapping to multiple nodes (#5369) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ Add requiresDataPath to Set * Add Data path mapping to rename keys * Add required path name to airtable * Add required data path * Add required data path to airtable trigger * Fix multiple keyword for required path * ⚡️use multiple for Airtable ignore fields --------- Co-authored-by: Marcus --- packages/nodes-base/nodes/Airtable/Airtable.node.ts | 5 +++++ packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts | 1 + packages/nodes-base/nodes/MySql/MySql.node.ts | 2 ++ packages/nodes-base/nodes/Postgres/Postgres.node.ts | 1 + packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts | 1 + packages/nodes-base/nodes/Set/Set.node.ts | 3 +++ 6 files changed, 13 insertions(+) diff --git a/packages/nodes-base/nodes/Airtable/Airtable.node.ts b/packages/nodes-base/nodes/Airtable/Airtable.node.ts index 0cc6e96c6e..7dde15bb0d 100644 --- a/packages/nodes-base/nodes/Airtable/Airtable.node.ts +++ b/packages/nodes-base/nodes/Airtable/Airtable.node.ts @@ -186,6 +186,7 @@ export class Airtable implements INodeType { multipleValues: true, multipleValueButtonText: 'Add Field', }, + requiresDataPath: 'single', displayOptions: { show: { addAllFields: [false], @@ -264,6 +265,7 @@ export class Airtable implements INodeType { name: 'downloadFieldNames', type: 'string', required: true, + requiresDataPath: 'multiple', displayOptions: { show: { operation: ['list'], @@ -291,6 +293,7 @@ export class Airtable implements INodeType { displayName: 'Fields', name: 'fields', type: 'string', + requiresDataPath: 'single', typeOptions: { multipleValues: true, multipleValueButtonText: 'Add Field', @@ -419,6 +422,7 @@ export class Airtable implements INodeType { multipleValues: true, multipleValueButtonText: 'Add Field', }, + requiresDataPath: 'single', displayOptions: { show: { updateAllFields: [false], @@ -461,6 +465,7 @@ export class Airtable implements INodeType { displayName: 'Ignore Fields', name: 'ignoreFields', type: 'string', + requiresDataPath: 'multiple', displayOptions: { show: { '/operation': ['update'], diff --git a/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts b/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts index 1b16d6a2b4..5ca532fe05 100644 --- a/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts +++ b/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts @@ -163,6 +163,7 @@ export class AirtableTrigger implements INodeType { displayName: 'Fields', name: 'fields', type: 'string', + requiresDataPath: 'multiple', default: '', // eslint-disable-next-line n8n-nodes-base/node-param-description-miscased-id description: diff --git a/packages/nodes-base/nodes/MySql/MySql.node.ts b/packages/nodes-base/nodes/MySql/MySql.node.ts index 6bf107ed35..0182a83af1 100644 --- a/packages/nodes-base/nodes/MySql/MySql.node.ts +++ b/packages/nodes-base/nodes/MySql/MySql.node.ts @@ -126,6 +126,7 @@ export class MySql implements INodeType { operation: ['insert'], }, }, + requiresDataPath: 'multiple', default: '', placeholder: 'id,name,description', description: @@ -231,6 +232,7 @@ export class MySql implements INodeType { displayName: 'Columns', name: 'columns', type: 'string', + requiresDataPath: 'multiple', displayOptions: { show: { operation: ['update'], diff --git a/packages/nodes-base/nodes/Postgres/Postgres.node.ts b/packages/nodes-base/nodes/Postgres/Postgres.node.ts index d93620741a..2fe841c2d7 100644 --- a/packages/nodes-base/nodes/Postgres/Postgres.node.ts +++ b/packages/nodes-base/nodes/Postgres/Postgres.node.ts @@ -193,6 +193,7 @@ export class Postgres implements INodeType { displayName: 'Return Fields', name: 'returnFields', type: 'string', + requiresDataPath: 'multiple', displayOptions: { show: { operation: ['insert', 'update'], diff --git a/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts b/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts index 8ebb028682..092303ebb1 100644 --- a/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts +++ b/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts @@ -51,6 +51,7 @@ export class RenameKeys implements INodeType { type: 'string', default: '', placeholder: 'currentKey', + requiresDataPath: 'single', description: 'The current name of the key. It is also possible to define deep keys by using dot-notation like for example: "level1.level2.currentKey".', }, diff --git a/packages/nodes-base/nodes/Set/Set.node.ts b/packages/nodes-base/nodes/Set/Set.node.ts index de669880c5..7ae7b9f3c0 100644 --- a/packages/nodes-base/nodes/Set/Set.node.ts +++ b/packages/nodes-base/nodes/Set/Set.node.ts @@ -52,6 +52,7 @@ export class Set implements INodeType { displayName: 'Name', name: 'name', type: 'string', + requiresDataPath: 'single', default: 'propertyName', description: 'Name of the property to write data to. Supports dot-notation. Example: "data.person[0].name"', @@ -75,6 +76,7 @@ export class Set implements INodeType { name: 'name', type: 'string', default: 'propertyName', + requiresDataPath: 'single', description: 'Name of the property to write data to. Supports dot-notation. Example: "data.person[0].name"', }, @@ -96,6 +98,7 @@ export class Set implements INodeType { name: 'name', type: 'string', default: 'propertyName', + requiresDataPath: 'single', description: 'Name of the property to write data to. Supports dot-notation. Example: "data.person[0].name"', },