n8n/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts
Michael Kret 2c146cca62
feat(Microsoft Teams Node): Overhaul (#7477)
Co-authored-by: Giulio Andreini <andreini@netseven.it>
2024-01-22 18:35:09 +02:00

27 lines
821 B
TypeScript

import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
import { VersionedNodeType } from 'n8n-workflow';
import { MicrosoftTeamsV1 } from './v1/MicrosoftTeamsV1.node';
import { MicrosoftTeamsV2 } from './v2/MicrosoftTeamsV2.node';
export class MicrosoftTeams extends VersionedNodeType {
constructor() {
const baseDescription: INodeTypeBaseDescription = {
displayName: 'Microsoft Teams',
name: 'microsoftTeams',
icon: 'file:teams.svg',
group: ['input'],
description: 'Consume Microsoft Teams API',
defaultVersion: 2,
};
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
1: new MicrosoftTeamsV1(baseDescription),
1.1: new MicrosoftTeamsV1(baseDescription),
2: new MicrosoftTeamsV2(baseDescription),
};
super(nodeVersions, baseDescription);
}
}