2022-09-08 05:44:34 -07:00
|
|
|
import { INodeTypeBaseDescription, INodeVersionedType } from 'n8n-workflow';
|
2020-08-18 03:40:19 -07:00
|
|
|
|
2022-09-08 05:44:34 -07:00
|
|
|
import { NodeVersionedType } from '../../../src/NodeVersionedType';
|
2020-08-18 03:40:19 -07:00
|
|
|
|
2022-09-08 05:44:34 -07:00
|
|
|
import { GmailV1 } from './v1/GmailV1.node';
|
2020-08-18 03:40:19 -07:00
|
|
|
|
2022-09-08 05:44:34 -07:00
|
|
|
import { GmailV2 } from './v2/GmailV2.node';
|
2020-08-18 03:40:19 -07:00
|
|
|
|
2022-09-08 05:44:34 -07:00
|
|
|
export class Gmail extends NodeVersionedType {
|
|
|
|
constructor() {
|
|
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
|
|
displayName: 'Gmail',
|
|
|
|
name: 'gmail',
|
|
|
|
icon: 'file:gmail.svg',
|
|
|
|
group: ['transform'],
|
|
|
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
|
|
description: 'Consume the Gmail API',
|
|
|
|
defaultVersion: 2,
|
|
|
|
};
|
2020-08-18 03:40:19 -07:00
|
|
|
|
2022-09-08 05:44:34 -07:00
|
|
|
const nodeVersions: INodeVersionedType['nodeVersions'] = {
|
|
|
|
1: new GmailV1(baseDescription),
|
|
|
|
2: new GmailV2(baseDescription),
|
|
|
|
};
|
2020-08-18 03:40:19 -07:00
|
|
|
|
2022-09-08 05:44:34 -07:00
|
|
|
super(nodeVersions, baseDescription);
|
2020-08-18 03:40:19 -07:00
|
|
|
}
|
|
|
|
}
|