mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
91d7e16c81
* 🔨 formatting nodes with prettier
29 lines
656 B
TypeScript
29 lines
656 B
TypeScript
import { IDataObject, INodeProperties } from 'n8n-workflow';
|
|
|
|
import { groups } from './Json/Groups';
|
|
|
|
const finalGroups = {
|
|
displayName: 'Resource',
|
|
name: 'group',
|
|
type: 'options',
|
|
default: 'communication',
|
|
options: [],
|
|
};
|
|
|
|
const options = [];
|
|
|
|
for (const group of (groups as IDataObject).groups as IDataObject[]) {
|
|
const item = {
|
|
name: group.translated,
|
|
value: group.name,
|
|
description: 'The ' + group.translated + ' Resource allows you to get tools from this resource',
|
|
};
|
|
options.push(item);
|
|
}
|
|
|
|
//@ts-ignore
|
|
finalGroups.options = options;
|
|
const mappedGroups = [finalGroups];
|
|
|
|
export const groupOptions = mappedGroups as INodeProperties[];
|