2023-03-22 04:05:07 -07:00
|
|
|
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
|
|
|
|
|
|
|
import { SplitInBatchesV1 } from './v1/SplitInBatchesV1.node';
|
|
|
|
import { SplitInBatchesV2 } from './v2/SplitInBatchesV2.node';
|
2023-10-06 06:31:18 -07:00
|
|
|
import { SplitInBatchesV3 } from './v3/SplitInBatchesV3.node';
|
2023-03-22 04:05:07 -07:00
|
|
|
|
|
|
|
export class SplitInBatches extends VersionedNodeType {
|
|
|
|
constructor() {
|
|
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
|
|
displayName: 'Split In Batches',
|
|
|
|
name: 'splitInBatches',
|
|
|
|
icon: 'fa:th-large',
|
|
|
|
group: ['organization'],
|
|
|
|
description: 'Split data into batches and iterate over each batch',
|
2023-10-06 06:31:18 -07:00
|
|
|
defaultVersion: 3,
|
2023-03-22 04:05:07 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
|
|
1: new SplitInBatchesV1(),
|
|
|
|
2: new SplitInBatchesV2(),
|
2023-10-06 06:31:18 -07:00
|
|
|
3: new SplitInBatchesV3(),
|
2023-03-22 04:05:07 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
super(nodeVersions, baseDescription);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
}
|