2023-09-19 03:16:35 -07:00
|
|
|
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
|
|
|
|
|
|
|
import { SetV1 } from './v1/SetV1.node';
|
|
|
|
import { SetV2 } from './v2/SetV2.node';
|
|
|
|
|
|
|
|
export class Set extends VersionedNodeType {
|
|
|
|
constructor() {
|
|
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
|
|
displayName: 'Set',
|
|
|
|
name: 'set',
|
|
|
|
icon: 'fa:pen',
|
|
|
|
group: ['input'],
|
|
|
|
description: 'Add or edit fields on an input item and optionally remove other fields',
|
2023-10-12 08:07:12 -07:00
|
|
|
defaultVersion: 3.2,
|
2023-09-19 03:16:35 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
|
|
1: new SetV1(baseDescription),
|
|
|
|
2: new SetV1(baseDescription),
|
|
|
|
3: new SetV2(baseDescription),
|
2023-10-03 01:18:33 -07:00
|
|
|
3.1: new SetV2(baseDescription),
|
2023-10-12 08:07:12 -07:00
|
|
|
3.2: new SetV2(baseDescription),
|
2023-09-19 03:16:35 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
super(nodeVersions, baseDescription);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
}
|