refactor: Change Google nodes to use OAuth2 as default (#3713)

* upstream merge

*  oAuth2 by default for Google nodes

*  lockfile fix
This commit is contained in:
Michael Kret 2022-07-18 11:15:03 +03:00 committed by GitHub
parent 68fb1c64dc
commit f958e6ffab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 197 additions and 17 deletions

View file

@ -71,12 +71,12 @@ export class GoogleBigQuery implements INodeType {
noDataExpression: true,
options: [
{
name: 'Service Account',
value: 'serviceAccount',
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'OAuth2',
value: 'oAuth2',
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',

View file

@ -26,7 +26,7 @@ export class GoogleBooks implements INodeType {
name: 'googleBooks',
icon: 'file:googlebooks.svg',
group: ['input', 'output'],
version: 1,
version: [1, 2],
description: 'Read data from Google Books',
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
defaults: {
@ -74,6 +74,36 @@ export class GoogleBooks implements INodeType {
},
],
default: 'serviceAccount',
displayOptions: {
show: {
'@version': [
1,
],
}
},
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',
displayOptions: {
show: {
'@version': [
2,
],
}
},
},
{
displayName: 'Resource',

View file

@ -36,7 +36,7 @@ export class GoogleDocs implements INodeType {
name: 'googleDocs',
icon: 'file:googleDocs.svg',
group: ['input'],
version: 1,
version: [1, 2],
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Consume Google Docs API.',
defaults: {
@ -84,6 +84,36 @@ export class GoogleDocs implements INodeType {
},
],
default: 'serviceAccount',
displayOptions: {
show: {
'@version': [
1,
],
}
},
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',
displayOptions: {
show: {
'@version': [
2,
],
}
},
},
{
displayName: 'Resource',

View file

@ -69,6 +69,36 @@ export class GoogleDrive implements INodeType {
},
],
default: 'serviceAccount',
displayOptions: {
show: {
'@version': [
1,
],
}
},
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',
displayOptions: {
show: {
'@version': [
2,
],
}
},
},
{
displayName: 'Resource',

View file

@ -66,12 +66,12 @@ export class GoogleDriveTrigger implements INodeType {
type: 'options',
options: [
{
name: 'Service Account',
value: 'serviceAccount',
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'OAuth2',
value: 'oAuth2',
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',

View file

@ -108,12 +108,12 @@ export class Gmail implements INodeType {
type: 'options',
options: [
{
name: 'Service Account',
value: 'serviceAccount',
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'OAuth2',
value: 'oAuth2',
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',

View file

@ -38,7 +38,7 @@ export class GoogleSheets implements INodeType {
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: {
@ -87,6 +87,36 @@ export class GoogleSheets implements INodeType {
},
],
default: 'serviceAccount',
displayOptions: {
show: {
'@version': [
1,
],
}
},
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',
displayOptions: {
show: {
'@version': [
2,
],
}
},
},
{
displayName: 'Resource',

View file

@ -21,7 +21,7 @@ export class GoogleSlides implements INodeType {
name: 'googleSlides',
icon: 'file:googleslides.svg',
group: ['input', 'output'],
version: 1,
version: [1, 2],
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Consume the Google Slides API',
defaults: {
@ -69,6 +69,36 @@ export class GoogleSlides implements INodeType {
},
],
default: 'serviceAccount',
displayOptions: {
show: {
'@version': [
1,
],
}
},
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',
displayOptions: {
show: {
'@version': [
2,
],
}
},
},
{
displayName: 'Resource',

View file

@ -27,7 +27,7 @@ export class GoogleTranslate implements INodeType {
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
icon: 'file:googletranslate.png',
group: ['input', 'output'],
version: 1,
version: [1, 2],
description: 'Translate data using Google Translate',
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
defaults: {
@ -75,6 +75,36 @@ export class GoogleTranslate implements INodeType {
},
],
default: 'serviceAccount',
displayOptions: {
show: {
'@version': [
1,
],
}
},
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',
displayOptions: {
show: {
'@version': [
2,
],
}
},
},
{
displayName: 'Resource',