n8n/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts
2022-11-15 15:57:07 +02:00

26 lines
832 B
TypeScript

import { INodeTypeBaseDescription, IVersionedNodeType, VersionedNodeType } from 'n8n-workflow';
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'],
defaultVersion: 2,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Read, update and write data to Google Sheets',
};
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
1: new GoogleSheetsV1(baseDescription),
2: new GoogleSheetsV2(baseDescription),
};
super(nodeVersions, baseDescription);
}
}