n8n/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts
agobrech aa2beaa800
fix(Item Lists Node): Tweak item list summarize field naming (#5572)
* Remove brackets and double quotes from fieldname

* Fix bug with duplicate field

* Parse field names from splitbyfield

* Fix error with field name remove console.logs

* Add versioning to itemlist

* Fix naming

* Remove comment
2023-02-28 18:00:39 +01:00

28 lines
846 B
TypeScript

import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
import { VersionedNodeType } from 'n8n-workflow';
import { ItemListsV1 } from './V1/ItemListsV1.node';
import { ItemListsV2 } from './V2/ItemListsV2.node';
export class ItemLists extends VersionedNodeType {
constructor() {
const baseDescription: INodeTypeBaseDescription = {
displayName: 'Item Lists',
name: 'itemLists',
icon: 'file:itemLists.svg',
group: ['input'],
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Helper for working with lists of items and transforming arrays',
defaultVersion: 2,
};
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
1: new ItemListsV1(baseDescription),
2: new ItemListsV2(baseDescription),
};
super(nodeVersions, baseDescription);
}
}