mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Add strong typing for INodeTypeBaseDescription['group'] (no-changelog) (#14047)
This commit is contained in:
committed by
GitHub
parent
8f46371d77
commit
a24e8abe8c
@@ -47,7 +47,7 @@ describe('LoadNodesAndCredentials', () => {
|
|||||||
description: {
|
description: {
|
||||||
displayName: 'Test Node',
|
displayName: 'Test Node',
|
||||||
name: 'testNode',
|
name: 'testNode',
|
||||||
group: ['test'],
|
group: ['input'],
|
||||||
description: 'A test node',
|
description: 'A test node',
|
||||||
version: 1,
|
version: 1,
|
||||||
defaults: {},
|
defaults: {},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const mockSimplifiedNodeType = (
|
|||||||
name: 'sampleName',
|
name: 'sampleName',
|
||||||
icon: 'fa:sampleIcon',
|
icon: 'fa:sampleIcon',
|
||||||
iconUrl: 'https://example.com/icon.png',
|
iconUrl: 'https://example.com/icon.png',
|
||||||
group: ['group1', 'group2'],
|
group: ['input', 'output'],
|
||||||
description: 'Sample description',
|
description: 'Sample description',
|
||||||
codex: {
|
codex: {
|
||||||
categories: ['category1', 'category2'],
|
categories: ['category1', 'category2'],
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ function resourceCategories(nodeTypeDescription: INodeTypeDescription): ActionTy
|
|||||||
},
|
},
|
||||||
displayName,
|
displayName,
|
||||||
group: ['trigger'],
|
group: ['trigger'],
|
||||||
};
|
} as ActionTypeDescription;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ describe('useUniqueNodeName', () => {
|
|||||||
version: 1,
|
version: 1,
|
||||||
inputs: [],
|
inputs: [],
|
||||||
outputs: [],
|
outputs: [],
|
||||||
group: [''],
|
group: ['input'],
|
||||||
properties: [],
|
properties: [],
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'S3',
|
name: 'S3',
|
||||||
|
|||||||
@@ -1699,6 +1699,8 @@ export type IconRef = `fa:${string}` | `node:${string}.${string}`;
|
|||||||
export type IconFile = `file:${string}.png` | `file:${string}.svg`;
|
export type IconFile = `file:${string}.png` | `file:${string}.svg`;
|
||||||
export type Icon = IconRef | Themed<IconFile>;
|
export type Icon = IconRef | Themed<IconFile>;
|
||||||
|
|
||||||
|
type NodeGroupType = 'input' | 'output' | 'organization' | 'schedule' | 'transform' | 'trigger';
|
||||||
|
|
||||||
export interface INodeTypeBaseDescription {
|
export interface INodeTypeBaseDescription {
|
||||||
displayName: string;
|
displayName: string;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -1706,7 +1708,7 @@ export interface INodeTypeBaseDescription {
|
|||||||
iconColor?: ThemeIconColor;
|
iconColor?: ThemeIconColor;
|
||||||
iconUrl?: Themed<string>;
|
iconUrl?: Themed<string>;
|
||||||
badgeIconUrl?: Themed<string>;
|
badgeIconUrl?: Themed<string>;
|
||||||
group: string[];
|
group: NodeGroupType[];
|
||||||
description: string;
|
description: string;
|
||||||
documentationUrl?: string;
|
documentationUrl?: string;
|
||||||
subtitle?: string;
|
subtitle?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user