mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -08:00
26 lines
749 B
TypeScript
26 lines
749 B
TypeScript
import { INodeTypeBaseDescription, IVersionedNodeType, VersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { NotionV1 } from './v1/NotionV1.node';
|
|
import { NotionV2 } from './v2/NotionV2.node';
|
|
|
|
export class Notion extends VersionedNodeType {
|
|
constructor() {
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
displayName: 'Notion (Beta)',
|
|
name: 'notion',
|
|
icon: 'file:notion.svg',
|
|
group: ['output'],
|
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
description: 'Consume Notion API (Beta)',
|
|
defaultVersion: 2,
|
|
};
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
1: new NotionV1(baseDescription),
|
|
2: new NotionV2(baseDescription),
|
|
};
|
|
|
|
super(nodeVersions, baseDescription);
|
|
}
|
|
}
|