2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
2022-11-15 05:57:07 -08:00
|
|
|
|
|
|
|
import { GoogleSheetsV1 } from './v1/GoogleSheetsV1.node';
|
|
|
|
import { GoogleSheetsV2 } from './v2/GoogleSheetsV2.node';
|
|
|
|
|
|
|
|
export class GoogleSheets extends VersionedNodeType {
|
|
|
|
constructor() {
|
|
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
|
|
displayName: 'Google Sheets ',
|
|
|
|
name: 'googleSheets',
|
|
|
|
icon: 'file:googleSheets.svg',
|
|
|
|
group: ['input', 'output'],
|
2022-11-18 04:33:54 -08:00
|
|
|
defaultVersion: 3,
|
2022-11-15 05:57:07 -08:00
|
|
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
|
|
description: 'Read, update and write data to Google Sheets',
|
|
|
|
};
|
|
|
|
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
|
|
1: new GoogleSheetsV1(baseDescription),
|
2022-11-18 04:33:54 -08:00
|
|
|
2: new GoogleSheetsV1(baseDescription),
|
|
|
|
3: new GoogleSheetsV2(baseDescription),
|
2022-11-15 05:57:07 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
super(nodeVersions, baseDescription);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
}
|