fix(Google Sheets Node): Versioning fix

This commit is contained in:
Michael Kret 2022-11-18 14:33:54 +02:00 committed by GitHub
parent e1a491edce
commit 4e66672df2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 4 deletions

View file

@ -10,14 +10,15 @@ export class GoogleSheets extends VersionedNodeType {
name: 'googleSheets',
icon: 'file:googleSheets.svg',
group: ['input', 'output'],
defaultVersion: 2,
defaultVersion: 3,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Read, update and write data to Google Sheets',
};
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
1: new GoogleSheetsV1(baseDescription),
2: new GoogleSheetsV2(baseDescription),
2: new GoogleSheetsV1(baseDescription),
3: new GoogleSheetsV2(baseDescription),
};
super(nodeVersions, baseDescription);

View file

@ -6,7 +6,7 @@ export const versionDescription: INodeTypeDescription = {
name: 'googleSheets',
icon: 'file:googleSheets.svg',
group: ['input', 'output'],
version: 1,
version: [1, 2],
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Read, update and write data to Google Sheets',
defaults: {
@ -51,6 +51,33 @@ export const versionDescription: INodeTypeDescription = {
},
],
default: 'serviceAccount',
displayOptions: {
show: {
'@version': [1],
},
},
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
name: 'OAuth2 (recommended)',
value: 'oAuth2',
},
{
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',
displayOptions: {
show: {
'@version': [2],
},
},
},
{
displayName: 'Resource',

View file

@ -9,7 +9,7 @@ export const versionDescription: INodeTypeDescription = {
name: 'googleSheets',
icon: 'file:googleSheets.svg',
group: ['input', 'output'],
version: 2,
version: 3,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Read, update and write data to Google Sheets',
defaults: {