2023-12-13 07:00:51 -08:00
|
|
|
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'],
|
2024-10-17 06:59:53 -07:00
|
|
|
description: 'Generate webforms in n8n and pass their responses to the workflow',
|
|
|
|
defaultVersion: 2.2,
|
2023-12-13 07:00:51 -08:00
|
|
|
};
|
2023-10-16 21:09:30 -07:00
|
|
|
|
2023-12-13 07:00:51 -08:00
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
|
|
1: new FormTriggerV1(baseDescription),
|
|
|
|
2: new FormTriggerV2(baseDescription),
|
2024-07-29 05:58:03 -07:00
|
|
|
2.1: new FormTriggerV2(baseDescription),
|
2024-10-17 06:59:53 -07:00
|
|
|
2.2: new FormTriggerV2(baseDescription),
|
2023-10-16 21:09:30 -07:00
|
|
|
};
|
2023-12-13 07:00:51 -08:00
|
|
|
|
|
|
|
super(nodeVersions, baseDescription);
|
2023-10-16 21:09:30 -07:00
|
|
|
}
|
|
|
|
}
|