@hostwebhook/node-types 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connections.js +4 -3
- package/dist/dispatch.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -1
- package/dist/registry.d.ts +44 -0
- package/dist/registry.js +178 -0
- package/dist/types.d.ts +1 -1
- package/dist/ui.js +2 -0
- package/package.json +1 -1
package/dist/connections.js
CHANGED
|
@@ -17,13 +17,13 @@ exports.isNodeType = isNodeType;
|
|
|
17
17
|
/** All node types that can appear as pipeline outputs */
|
|
18
18
|
const PROCESSING_OUTPUTS = [
|
|
19
19
|
'endpoint', 'router', 'filter', 'transform', 'cache', 'code', 'rateLimiter',
|
|
20
|
-
'aggregator', 'conditional', 'delay', 'schemaValidator',
|
|
20
|
+
'aggregator', 'conditional', 'delay', 'schemaValidator', 'split',
|
|
21
21
|
'emailAction', 'httpAction', 'mongoAction', 'notificationAction', 'sheetsAction',
|
|
22
22
|
];
|
|
23
23
|
/** Standard processing input sources */
|
|
24
24
|
const STANDARD_INPUTS = [
|
|
25
25
|
'endpoint', 'scheduledWebhook', 'router', 'filter', 'transform',
|
|
26
|
-
'cache', 'code', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator',
|
|
26
|
+
'cache', 'code', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator', 'split',
|
|
27
27
|
];
|
|
28
28
|
/** Action nodes that can chain (non-terminal) */
|
|
29
29
|
const CHAINABLE_ACTIONS = ['httpAction', 'mongoAction', 'sheetsAction'];
|
|
@@ -45,7 +45,8 @@ exports.NODE_CONNECTIONS = {
|
|
|
45
45
|
code: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
46
46
|
ai: { acceptsInputFrom: [...ACTION_INPUTS], canOutputTo: PROCESSING_OUTPUTS },
|
|
47
47
|
// ── Flow control nodes ──
|
|
48
|
-
|
|
48
|
+
split: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS, special: { hasBranches: true } },
|
|
49
|
+
merge: { acceptsInputFrom: ['endpoint', 'filter', 'transform', 'cache', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator', 'split'], canOutputTo: PROCESSING_OUTPUTS },
|
|
49
50
|
approval: { acceptsInputFrom: ['endpoint', 'filter', 'transform'], canOutputTo: ['endpoint', 'filter', 'transform', 'emailAction', 'httpAction', 'mongoAction', 'notificationAction', 'sheetsAction'], special: { hasRejectionOutputNodes: true } },
|
|
50
51
|
// ── Routing nodes ──
|
|
51
52
|
router: { acceptsInputFrom: ['endpoint', 'scheduledWebhook', 'filter', 'transform'], canOutputTo: ['endpoint', 'notificationAction', 'filter', 'transform', 'emailAction', 'httpAction', 'mongoAction', 'sheetsAction'] },
|
package/dist/dispatch.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.NODE_DISPATCH = {
|
|
|
19
19
|
code: { service: 'codeNodesService', collection: 'codenodes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
20
20
|
ai: { service: 'aiNodesService', collection: 'ainodes', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true },
|
|
21
21
|
// ── Flow control ──
|
|
22
|
+
split: { service: 'splitNodesService', collection: 'splitnodes', hasFilters: false, outputFields: ['outputNodes', 'remainderOutputNodes'], customDispatch: true },
|
|
22
23
|
conditional: { service: 'conditionalNodesService', collection: 'conditionalnodes', hasFilters: false, outputFields: ['outputNodes', 'elseOutputNodes'], customDispatch: true },
|
|
23
24
|
merge: { service: 'mergeNodesService', collection: 'mergenodes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
24
25
|
approval: { service: 'approvalNodesService', collection: 'approvalnodes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
package/dist/index.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ export { singleMeta, iterableMeta } from './types';
|
|
|
3
3
|
export { NODE_CONNECTIONS, canReceiveFrom, canReceiveFromNodes, canSendToNodes, isTerminal, isNodeType, ALL_NODE_TYPES, } from './connections';
|
|
4
4
|
export { NODE_UI, PREFIX_TO_TYPE, resolveNodeId, } from './ui';
|
|
5
5
|
export { NODE_DISPATCH, getAllNodeCollections, getNodeDispatchConfig, } from './dispatch';
|
|
6
|
+
export type { NodeRegistryEntry, NodeGroup } from './registry';
|
|
7
|
+
export { NODE_REGISTRY, getNodeRegistryEntry, NODE_DETAIL_PATHS, NODE_COLORS, NODE_STATE_KEYS, PREFIX_TO_NODE_TYPE, NODE_TYPE_TO_PREFIX, } from './registry';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNodeDispatchConfig = exports.getAllNodeCollections = exports.NODE_DISPATCH = exports.resolveNodeId = exports.PREFIX_TO_TYPE = exports.NODE_UI = exports.ALL_NODE_TYPES = exports.isNodeType = exports.isTerminal = exports.canSendToNodes = exports.canReceiveFromNodes = exports.canReceiveFrom = exports.NODE_CONNECTIONS = exports.iterableMeta = exports.singleMeta = void 0;
|
|
3
|
+
exports.NODE_TYPE_TO_PREFIX = exports.PREFIX_TO_NODE_TYPE = exports.NODE_STATE_KEYS = exports.NODE_COLORS = exports.NODE_DETAIL_PATHS = exports.getNodeRegistryEntry = exports.NODE_REGISTRY = exports.getNodeDispatchConfig = exports.getAllNodeCollections = exports.NODE_DISPATCH = exports.resolveNodeId = exports.PREFIX_TO_TYPE = exports.NODE_UI = exports.ALL_NODE_TYPES = exports.isNodeType = exports.isTerminal = exports.canSendToNodes = exports.canReceiveFromNodes = exports.canReceiveFrom = exports.NODE_CONNECTIONS = exports.iterableMeta = exports.singleMeta = void 0;
|
|
4
4
|
var types_1 = require("./types");
|
|
5
5
|
Object.defineProperty(exports, "singleMeta", { enumerable: true, get: function () { return types_1.singleMeta; } });
|
|
6
6
|
Object.defineProperty(exports, "iterableMeta", { enumerable: true, get: function () { return types_1.iterableMeta; } });
|
|
@@ -23,3 +23,11 @@ var dispatch_1 = require("./dispatch");
|
|
|
23
23
|
Object.defineProperty(exports, "NODE_DISPATCH", { enumerable: true, get: function () { return dispatch_1.NODE_DISPATCH; } });
|
|
24
24
|
Object.defineProperty(exports, "getAllNodeCollections", { enumerable: true, get: function () { return dispatch_1.getAllNodeCollections; } });
|
|
25
25
|
Object.defineProperty(exports, "getNodeDispatchConfig", { enumerable: true, get: function () { return dispatch_1.getNodeDispatchConfig; } });
|
|
26
|
+
var registry_1 = require("./registry");
|
|
27
|
+
Object.defineProperty(exports, "NODE_REGISTRY", { enumerable: true, get: function () { return registry_1.NODE_REGISTRY; } });
|
|
28
|
+
Object.defineProperty(exports, "getNodeRegistryEntry", { enumerable: true, get: function () { return registry_1.getNodeRegistryEntry; } });
|
|
29
|
+
Object.defineProperty(exports, "NODE_DETAIL_PATHS", { enumerable: true, get: function () { return registry_1.NODE_DETAIL_PATHS; } });
|
|
30
|
+
Object.defineProperty(exports, "NODE_COLORS", { enumerable: true, get: function () { return registry_1.NODE_COLORS; } });
|
|
31
|
+
Object.defineProperty(exports, "NODE_STATE_KEYS", { enumerable: true, get: function () { return registry_1.NODE_STATE_KEYS; } });
|
|
32
|
+
Object.defineProperty(exports, "PREFIX_TO_NODE_TYPE", { enumerable: true, get: function () { return registry_1.PREFIX_TO_NODE_TYPE; } });
|
|
33
|
+
Object.defineProperty(exports, "NODE_TYPE_TO_PREFIX", { enumerable: true, get: function () { return registry_1.NODE_TYPE_TO_PREFIX; } });
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized NODE_REGISTRY — single source of truth for all node metadata.
|
|
3
|
+
*
|
|
4
|
+
* When adding a new node type, add ONE entry here. The dashboard derives
|
|
5
|
+
* all per-node maps (colors, URLs, Redux keys, palette, delete, etc.)
|
|
6
|
+
* from this registry. No more 18+ touch points.
|
|
7
|
+
*/
|
|
8
|
+
import type { NodeType } from './types';
|
|
9
|
+
export type NodeGroup = 'Sources' | 'Flow Control' | 'Actions' | 'Monitoring' | 'Annotations';
|
|
10
|
+
export interface NodeRegistryEntry {
|
|
11
|
+
/** Canonical type (e.g., "httpAction") */
|
|
12
|
+
type: NodeType;
|
|
13
|
+
/** Canvas ID prefix (e.g., "ha") */
|
|
14
|
+
prefix: string;
|
|
15
|
+
/** Display label (e.g., "HTTP Action") */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Group in palette */
|
|
18
|
+
group: NodeGroup;
|
|
19
|
+
/** Detail page path (e.g., "/dashboard/http-actions") */
|
|
20
|
+
detailPath: string;
|
|
21
|
+
/** API endpoint base (e.g., "/http-actions") */
|
|
22
|
+
apiPath: string;
|
|
23
|
+
/** Redux state key for filtered array (e.g., "httpActions") */
|
|
24
|
+
stateKey: string;
|
|
25
|
+
/** Redux state key for all array (e.g., "allHttpActions") */
|
|
26
|
+
allStateKey: string;
|
|
27
|
+
/** MiniMap hex color */
|
|
28
|
+
color: string;
|
|
29
|
+
/** Whether this node supports test execution */
|
|
30
|
+
testable: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare const NODE_REGISTRY: Record<NodeType, NodeRegistryEntry>;
|
|
33
|
+
/** Get registry entry by canonical type */
|
|
34
|
+
export declare function getNodeRegistryEntry(type: string): NodeRegistryEntry | undefined;
|
|
35
|
+
/** type → detail page path */
|
|
36
|
+
export declare const NODE_DETAIL_PATHS: Record<string, string>;
|
|
37
|
+
/** type → minimap color */
|
|
38
|
+
export declare const NODE_COLORS: Record<string, string>;
|
|
39
|
+
/** type → [stateKey, allStateKey] */
|
|
40
|
+
export declare const NODE_STATE_KEYS: Record<string, [string, string]>;
|
|
41
|
+
/** prefix → type */
|
|
42
|
+
export declare const PREFIX_TO_NODE_TYPE: Record<string, NodeType>;
|
|
43
|
+
/** type → prefix */
|
|
44
|
+
export declare const NODE_TYPE_TO_PREFIX: Record<string, string>;
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Centralized NODE_REGISTRY — single source of truth for all node metadata.
|
|
4
|
+
*
|
|
5
|
+
* When adding a new node type, add ONE entry here. The dashboard derives
|
|
6
|
+
* all per-node maps (colors, URLs, Redux keys, palette, delete, etc.)
|
|
7
|
+
* from this registry. No more 18+ touch points.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.NODE_TYPE_TO_PREFIX = exports.PREFIX_TO_NODE_TYPE = exports.NODE_STATE_KEYS = exports.NODE_COLORS = exports.NODE_DETAIL_PATHS = exports.NODE_REGISTRY = void 0;
|
|
11
|
+
exports.getNodeRegistryEntry = getNodeRegistryEntry;
|
|
12
|
+
exports.NODE_REGISTRY = {
|
|
13
|
+
// ── Sources ──
|
|
14
|
+
endpoint: {
|
|
15
|
+
type: 'endpoint', prefix: 'ep', label: 'Endpoint',
|
|
16
|
+
group: 'Sources', detailPath: '/dashboard/endpoints', apiPath: '/endpoints',
|
|
17
|
+
stateKey: 'endpoints', allStateKey: 'allEndpoints',
|
|
18
|
+
color: '#a78bfa', testable: false,
|
|
19
|
+
},
|
|
20
|
+
scheduledWebhook: {
|
|
21
|
+
type: 'scheduledWebhook', prefix: 'sw', label: 'Scheduled Webhook',
|
|
22
|
+
group: 'Sources', detailPath: '/dashboard/scheduled-webhooks', apiPath: '/scheduled-webhooks',
|
|
23
|
+
stateKey: 'scheduledWebhooks', allStateKey: 'allScheduledWebhooks',
|
|
24
|
+
color: '#2dd4bf', testable: true,
|
|
25
|
+
},
|
|
26
|
+
// ── Flow Control ──
|
|
27
|
+
filter: {
|
|
28
|
+
type: 'filter', prefix: 'fi', label: 'Filter',
|
|
29
|
+
group: 'Flow Control', detailPath: '/dashboard/filter-nodes', apiPath: '/filter-nodes',
|
|
30
|
+
stateKey: 'filterNodes', allStateKey: 'allFilterNodes',
|
|
31
|
+
color: '#facc15', testable: true,
|
|
32
|
+
},
|
|
33
|
+
transform: {
|
|
34
|
+
type: 'transform', prefix: 'tr', label: 'Transform',
|
|
35
|
+
group: 'Flow Control', detailPath: '/dashboard/transform-nodes', apiPath: '/transform-nodes',
|
|
36
|
+
stateKey: 'transformNodes', allStateKey: 'allTransformNodes',
|
|
37
|
+
color: '#fbbf24', testable: true,
|
|
38
|
+
},
|
|
39
|
+
schemaValidator: {
|
|
40
|
+
type: 'schemaValidator', prefix: 'sv', label: 'Schema Validator',
|
|
41
|
+
group: 'Flow Control', detailPath: '/dashboard/schema-validators', apiPath: '/schema-validators',
|
|
42
|
+
stateKey: 'schemaValidators', allStateKey: 'allSchemaValidators',
|
|
43
|
+
color: '#818cf8', testable: false,
|
|
44
|
+
},
|
|
45
|
+
conditional: {
|
|
46
|
+
type: 'conditional', prefix: 'cond', label: 'Conditional',
|
|
47
|
+
group: 'Flow Control', detailPath: '/dashboard/conditional-nodes', apiPath: '/conditional-nodes',
|
|
48
|
+
stateKey: 'conditionalNodes', allStateKey: 'allConditionalNodes',
|
|
49
|
+
color: '#c084fc', testable: false,
|
|
50
|
+
},
|
|
51
|
+
delay: {
|
|
52
|
+
type: 'delay', prefix: 'delay', label: 'Delay',
|
|
53
|
+
group: 'Flow Control', detailPath: '/dashboard/delay-nodes', apiPath: '/delay-nodes',
|
|
54
|
+
stateKey: 'delayNodes', allStateKey: 'allDelayNodes',
|
|
55
|
+
color: '#94a3b8', testable: false,
|
|
56
|
+
},
|
|
57
|
+
rateLimiter: {
|
|
58
|
+
type: 'rateLimiter', prefix: 'rl', label: 'Rate Limiter',
|
|
59
|
+
group: 'Flow Control', detailPath: '/dashboard/rate-limiter-nodes', apiPath: '/rate-limiter-nodes',
|
|
60
|
+
stateKey: 'rateLimiterNodes', allStateKey: 'allRateLimiterNodes',
|
|
61
|
+
color: '#f97316', testable: false,
|
|
62
|
+
},
|
|
63
|
+
aggregator: {
|
|
64
|
+
type: 'aggregator', prefix: 'agg', label: 'Aggregator',
|
|
65
|
+
group: 'Flow Control', detailPath: '/dashboard/aggregator-nodes', apiPath: '/aggregator-nodes',
|
|
66
|
+
stateKey: 'aggregatorNodes', allStateKey: 'allAggregatorNodes',
|
|
67
|
+
color: '#84cc16', testable: true,
|
|
68
|
+
},
|
|
69
|
+
cache: {
|
|
70
|
+
type: 'cache', prefix: 'cache', label: 'Cache',
|
|
71
|
+
group: 'Flow Control', detailPath: '/dashboard/cache-nodes', apiPath: '/cache-nodes',
|
|
72
|
+
stateKey: 'cacheNodes', allStateKey: 'allCacheNodes',
|
|
73
|
+
color: '#d946ef', testable: false,
|
|
74
|
+
},
|
|
75
|
+
code: {
|
|
76
|
+
type: 'code', prefix: 'code', label: 'Code',
|
|
77
|
+
group: 'Flow Control', detailPath: '/dashboard/code-nodes', apiPath: '/code-nodes',
|
|
78
|
+
stateKey: 'codeNodes', allStateKey: 'allCodeNodes',
|
|
79
|
+
color: '#a855f7', testable: true,
|
|
80
|
+
},
|
|
81
|
+
ai: {
|
|
82
|
+
type: 'ai', prefix: 'ai', label: 'AI',
|
|
83
|
+
group: 'Flow Control', detailPath: '/dashboard/ai-nodes', apiPath: '/ai-nodes',
|
|
84
|
+
stateKey: 'aiNodes', allStateKey: 'allAiNodes',
|
|
85
|
+
color: '#d946ef', testable: false,
|
|
86
|
+
},
|
|
87
|
+
split: {
|
|
88
|
+
type: 'split', prefix: 'split', label: 'Split',
|
|
89
|
+
group: 'Flow Control', detailPath: '/dashboard/split-nodes', apiPath: '/split-nodes',
|
|
90
|
+
stateKey: 'splitNodes', allStateKey: 'allSplitNodes',
|
|
91
|
+
color: '#38bdf8', testable: true,
|
|
92
|
+
},
|
|
93
|
+
merge: {
|
|
94
|
+
type: 'merge', prefix: 'merge', label: 'Merge',
|
|
95
|
+
group: 'Flow Control', detailPath: '/dashboard/merge-nodes', apiPath: '/merge-nodes',
|
|
96
|
+
stateKey: 'mergeNodes', allStateKey: 'allMergeNodes',
|
|
97
|
+
color: '#94a3b8', testable: false,
|
|
98
|
+
},
|
|
99
|
+
approval: {
|
|
100
|
+
type: 'approval', prefix: 'appr', label: 'Approval',
|
|
101
|
+
group: 'Flow Control', detailPath: '/dashboard/approval-nodes', apiPath: '/approval-nodes',
|
|
102
|
+
stateKey: 'approvalNodes', allStateKey: 'allApprovalNodes',
|
|
103
|
+
color: '#94a3b8', testable: false,
|
|
104
|
+
},
|
|
105
|
+
// ── Routing ──
|
|
106
|
+
router: {
|
|
107
|
+
type: 'router', prefix: 'ro', label: 'Router',
|
|
108
|
+
group: 'Flow Control', detailPath: '/dashboard/routers', apiPath: '/routers',
|
|
109
|
+
stateKey: 'routers', allStateKey: 'allRouters',
|
|
110
|
+
color: '#38bdf8', testable: false,
|
|
111
|
+
},
|
|
112
|
+
fanout: {
|
|
113
|
+
type: 'fanout', prefix: 'fo', label: 'Fan-out',
|
|
114
|
+
group: 'Sources', detailPath: '/dashboard/fan-out', apiPath: '/fan-out',
|
|
115
|
+
stateKey: 'fanOuts', allStateKey: 'allFanOuts',
|
|
116
|
+
color: '#a78bfa', testable: false,
|
|
117
|
+
},
|
|
118
|
+
// ── Actions ──
|
|
119
|
+
emailAction: {
|
|
120
|
+
type: 'emailAction', prefix: 'ea', label: 'Email Action',
|
|
121
|
+
group: 'Actions', detailPath: '/dashboard/email-actions', apiPath: '/email-actions',
|
|
122
|
+
stateKey: 'emailActions', allStateKey: 'allEmailActions',
|
|
123
|
+
color: '#f472b6', testable: true,
|
|
124
|
+
},
|
|
125
|
+
httpAction: {
|
|
126
|
+
type: 'httpAction', prefix: 'ha', label: 'HTTP Action',
|
|
127
|
+
group: 'Actions', detailPath: '/dashboard/http-actions', apiPath: '/http-actions',
|
|
128
|
+
stateKey: 'httpActions', allStateKey: 'allHttpActions',
|
|
129
|
+
color: '#3b82f6', testable: true,
|
|
130
|
+
},
|
|
131
|
+
mongoAction: {
|
|
132
|
+
type: 'mongoAction', prefix: 'ma', label: 'MongoDB Action',
|
|
133
|
+
group: 'Actions', detailPath: '/dashboard/mongo-actions', apiPath: '/mongo-actions',
|
|
134
|
+
stateKey: 'mongoActions', allStateKey: 'allMongoActions',
|
|
135
|
+
color: '#34d399', testable: false,
|
|
136
|
+
},
|
|
137
|
+
notificationAction: {
|
|
138
|
+
type: 'notificationAction', prefix: 'na', label: 'Notification',
|
|
139
|
+
group: 'Actions', detailPath: '/dashboard/notification-actions', apiPath: '/notification-actions',
|
|
140
|
+
stateKey: 'notificationActions', allStateKey: 'allNotificationActions',
|
|
141
|
+
color: '#f472b6', testable: false,
|
|
142
|
+
},
|
|
143
|
+
sheetsAction: {
|
|
144
|
+
type: 'sheetsAction', prefix: 'sheet', label: 'Google Sheets Action',
|
|
145
|
+
group: 'Actions', detailPath: '/dashboard/sheets-actions', apiPath: '/sheets-actions',
|
|
146
|
+
stateKey: 'sheetsActions', allStateKey: 'allSheetsActions',
|
|
147
|
+
color: '#34d399', testable: true,
|
|
148
|
+
},
|
|
149
|
+
// ── Monitoring ──
|
|
150
|
+
alert: {
|
|
151
|
+
type: 'alert', prefix: 'al', label: 'Alert',
|
|
152
|
+
group: 'Monitoring', detailPath: '/dashboard/alerts', apiPath: '/alerts',
|
|
153
|
+
stateKey: 'alerts', allStateKey: 'allAlerts',
|
|
154
|
+
color: '#ef4444', testable: false,
|
|
155
|
+
},
|
|
156
|
+
// ── Annotations ──
|
|
157
|
+
stickyNote: {
|
|
158
|
+
type: 'stickyNote', prefix: 'note', label: 'Sticky Note',
|
|
159
|
+
group: 'Annotations', detailPath: '', apiPath: '/sticky-notes',
|
|
160
|
+
stateKey: 'stickyNotes', allStateKey: 'allStickyNotes',
|
|
161
|
+
color: '#fbbf24', testable: false,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
// ── Derived helpers ──
|
|
165
|
+
/** Get registry entry by canonical type */
|
|
166
|
+
function getNodeRegistryEntry(type) {
|
|
167
|
+
return exports.NODE_REGISTRY[type];
|
|
168
|
+
}
|
|
169
|
+
/** type → detail page path */
|
|
170
|
+
exports.NODE_DETAIL_PATHS = Object.fromEntries(Object.values(exports.NODE_REGISTRY).filter(n => n.detailPath).map(n => [n.type, n.detailPath]));
|
|
171
|
+
/** type → minimap color */
|
|
172
|
+
exports.NODE_COLORS = Object.fromEntries(Object.values(exports.NODE_REGISTRY).map(n => [n.type, n.color]));
|
|
173
|
+
/** type → [stateKey, allStateKey] */
|
|
174
|
+
exports.NODE_STATE_KEYS = Object.fromEntries(Object.values(exports.NODE_REGISTRY).map(n => [n.type, [n.stateKey, n.allStateKey]]));
|
|
175
|
+
/** prefix → type */
|
|
176
|
+
exports.PREFIX_TO_NODE_TYPE = Object.fromEntries(Object.values(exports.NODE_REGISTRY).map(n => [n.prefix, n.type]));
|
|
177
|
+
/** type → prefix */
|
|
178
|
+
exports.NODE_TYPE_TO_PREFIX = Object.fromEntries(Object.values(exports.NODE_REGISTRY).map(n => [n.type, n.prefix]));
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** All valid node type identifiers */
|
|
2
|
-
export type NodeType = 'endpoint' | 'scheduledWebhook' | 'filter' | 'transform' | 'schemaValidator' | 'conditional' | 'delay' | 'rateLimiter' | 'aggregator' | 'cache' | 'code' | 'ai' | 'merge' | 'approval' | 'router' | 'fanout' | 'emailAction' | 'httpAction' | 'mongoAction' | 'notificationAction' | 'sheetsAction' | 'alert' | 'stickyNote';
|
|
2
|
+
export type NodeType = 'endpoint' | 'scheduledWebhook' | 'filter' | 'transform' | 'schemaValidator' | 'conditional' | 'delay' | 'rateLimiter' | 'aggregator' | 'cache' | 'code' | 'ai' | 'merge' | 'approval' | 'split' | 'router' | 'fanout' | 'emailAction' | 'httpAction' | 'mongoAction' | 'notificationAction' | 'sheetsAction' | 'alert' | 'stickyNote';
|
|
3
3
|
/** Node role in the pipeline */
|
|
4
4
|
export type NodeRole = 'source' | 'processing' | 'flowControl' | 'routing' | 'action' | 'monitoring';
|
|
5
5
|
/** Handle positions on the canvas node */
|
package/dist/ui.js
CHANGED
|
@@ -22,6 +22,7 @@ exports.NODE_UI = {
|
|
|
22
22
|
code: { fromNodes: true, toNodes: true },
|
|
23
23
|
ai: { fromNodes: true, toNodes: true },
|
|
24
24
|
// ── Flow control nodes ──
|
|
25
|
+
split: { fromNodes: true, toNodes: true, outputHandles: ['right', 'bottom'], special: { hasBranches: true, connectModal: 'branch' } },
|
|
25
26
|
merge: { fromNodes: true, toNodes: true, inputHandles: ['left', 'top'] },
|
|
26
27
|
approval: { fromNodes: true, toNodes: true, outputHandles: ['right', 'bottom'], special: { rejectionEndpoints: 'rejectionEndpointIds' } },
|
|
27
28
|
// ── Routing nodes ──
|
|
@@ -62,6 +63,7 @@ exports.PREFIX_TO_TYPE = [
|
|
|
62
63
|
{ prefix: 'cache-', type: 'cache', canvasType: 'cache-node' },
|
|
63
64
|
{ prefix: 'code-', type: 'code', canvasType: 'code-node' },
|
|
64
65
|
{ prefix: 'ai-', type: 'ai', canvasType: 'ai-node' },
|
|
66
|
+
{ prefix: 'split-', type: 'split', canvasType: 'split-node' },
|
|
65
67
|
{ prefix: 'note-', type: 'stickyNote', canvasType: 'sticky-note' },
|
|
66
68
|
];
|
|
67
69
|
/** Resolve canvas node ID to { type, entityId } */
|
package/package.json
CHANGED