refactor(editor): Migrate versions api to @n8n/rest-client-api (no-changelog) (#16147)

This commit is contained in:
Alex Grozav
2025-06-10 09:47:51 +02:00
committed by GitHub
parent 5deab75c7d
commit 07ed01d9fc
11 changed files with 65 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
import { type INodeTypeDescription } from 'n8n-workflow';
import type { IVersionNode } from '../Interface';
import type { VersionNode } from '@n8n/rest-api-client/api/versions';
import { useRootStore } from '@n8n/stores/useRootStore';
import { useUIStore } from '../stores/ui.store';
import { getThemedValue } from './nodeTypesUtils';
@@ -20,7 +20,7 @@ type IconNodeTypeDescription = Pick<
INodeTypeDescription,
'icon' | 'iconUrl' | 'iconColor' | 'defaults' | 'badgeIconUrl' | 'name'
>;
type IconVersionNode = Pick<IVersionNode, 'icon' | 'iconUrl' | 'iconData' | 'defaults' | 'name'>;
type IconVersionNode = Pick<VersionNode, 'icon' | 'iconUrl' | 'iconData' | 'defaults' | 'name'>;
export type IconNodeType = IconNodeTypeDescription | IconVersionNode;
export const getNodeIcon = (nodeType: IconNodeType): string | null => {