mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 00:54:06 -08:00
643d66c0ae
Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
27 lines
879 B
TypeScript
27 lines
879 B
TypeScript
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
|
import { FormTriggerV1 } from './v1/FormTriggerV1.node';
|
|
import { FormTriggerV2 } from './v2/FormTriggerV2.node';
|
|
|
|
export class FormTrigger extends VersionedNodeType {
|
|
constructor() {
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
displayName: 'n8n Form Trigger',
|
|
name: 'formTrigger',
|
|
icon: 'file:form.svg',
|
|
group: ['trigger'],
|
|
description: 'Generate webforms in n8n and pass their responses to the workflow',
|
|
defaultVersion: 2.2,
|
|
};
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
1: new FormTriggerV1(baseDescription),
|
|
2: new FormTriggerV2(baseDescription),
|
|
2.1: new FormTriggerV2(baseDescription),
|
|
2.2: new FormTriggerV2(baseDescription),
|
|
};
|
|
|
|
super(nodeVersions, baseDescription);
|
|
}
|
|
}
|