2020-08-18 03:40:19 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-08-18 03:40:19 -07:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
const scopes = [
|
|
|
|
'https://www.googleapis.com/auth/gmail.labels',
|
|
|
|
'https://www.googleapis.com/auth/gmail.addons.current.action.compose',
|
|
|
|
'https://www.googleapis.com/auth/gmail.addons.current.message.action',
|
|
|
|
'https://mail.google.com/',
|
|
|
|
'https://www.googleapis.com/auth/gmail.modify',
|
|
|
|
'https://www.googleapis.com/auth/gmail.compose',
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
export class GmailOAuth2Api implements ICredentialType {
|
|
|
|
name = 'gmailOAuth2';
|
|
|
|
extends = [
|
|
|
|
'googleOAuth2Api',
|
|
|
|
];
|
|
|
|
displayName = 'Gmail OAuth2 API';
|
2020-08-20 06:34:45 -07:00
|
|
|
documentationUrl = 'google';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-08-18 03:40:19 -07:00
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-08-18 03:40:19 -07:00
|
|
|
default: scopes.join(' '),
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|