n8n/packages/nodes-base/credentials/GoogleDriveOAuth2Api.credentials.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
899 B
TypeScript
Raw Normal View History

import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2020-06-06 11:57:42 -07:00
const scopes = [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.appdata',
'https://www.googleapis.com/auth/drive.photos.readonly',
];
export class GoogleDriveOAuth2Api implements ICredentialType {
name = 'googleDriveOAuth2Api';
extends = ['googleOAuth2Api'];
2020-06-06 11:57:42 -07:00
displayName = 'Google Drive OAuth2 API';
documentationUrl = 'google/oauth-single-service';
properties: INodeProperties[] = [
2020-06-06 11:57:42 -07:00
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
2020-06-06 11:57:42 -07:00
default: scopes.join(' '),
},
{
displayName:
'Make sure that you have enabled the Google Drive API in the Google Cloud Console. <a href="https://docs.n8n.io/integrations/builtin/credentials/google/oauth-generic/#scopes" target="_blank">More info</a>.',
name: 'notice',
type: 'notice',
default: '',
},
2020-06-06 11:57:42 -07:00
];
}