@hostwebhook/node-types 1.8.0 → 1.10.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 +3 -3
- package/dist/dispatch.js +1 -1
- package/dist/registry.js +6 -6
- package/dist/types.d.ts +2 -1
- package/dist/ui.js +2 -2
- package/package.json +1 -1
package/dist/connections.js
CHANGED
|
@@ -18,12 +18,12 @@ exports.isNodeType = isNodeType;
|
|
|
18
18
|
const PROCESSING_OUTPUTS = [
|
|
19
19
|
'endpoint', 'router', 'filter', 'transform', 'cache', 'code', 'rateLimiter',
|
|
20
20
|
'aggregator', 'conditional', 'delay', 'schemaValidator', 'split',
|
|
21
|
-
'emailAction', 'httpAction', 'mongoAction', 'notificationAction', 'sheetsAction',
|
|
21
|
+
'emailAction', 'httpAction', 'mongoAction', 'notificationAction', 'sheetsAction', 'loop',
|
|
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', 'split',
|
|
26
|
+
'cache', 'code', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator', 'split', 'loop',
|
|
27
27
|
];
|
|
28
28
|
/** Action nodes that can chain (non-terminal) */
|
|
29
29
|
const CHAINABLE_ACTIONS = ['httpAction', 'mongoAction', 'sheetsAction'];
|
|
@@ -48,9 +48,9 @@ exports.NODE_CONNECTIONS = {
|
|
|
48
48
|
split: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
49
49
|
merge: { acceptsInputFrom: ['endpoint', 'filter', 'transform', 'cache', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator', 'split'], canOutputTo: PROCESSING_OUTPUTS },
|
|
50
50
|
approval: { acceptsInputFrom: ['endpoint', 'filter', 'transform'], canOutputTo: ['endpoint', 'filter', 'transform', 'emailAction', 'httpAction', 'mongoAction', 'notificationAction', 'sheetsAction'], special: { hasRejectionOutputNodes: true } },
|
|
51
|
+
loop: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS, special: { hasLoopBack: true } },
|
|
51
52
|
// ── Routing nodes ──
|
|
52
53
|
router: { acceptsInputFrom: ['endpoint', 'scheduledWebhook', 'filter', 'transform'], canOutputTo: ['endpoint', 'notificationAction', 'filter', 'transform', 'emailAction', 'httpAction', 'mongoAction', 'sheetsAction'] },
|
|
53
|
-
fanout: { acceptsInputFrom: ['endpoint'], canOutputTo: [] },
|
|
54
54
|
// ── Action nodes ──
|
|
55
55
|
emailAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: [], special: { isTerminal: true } },
|
|
56
56
|
httpAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
package/dist/dispatch.js
CHANGED
|
@@ -23,6 +23,7 @@ exports.NODE_DISPATCH = {
|
|
|
23
23
|
conditional: { service: 'conditionalNodesService', collection: 'conditionalnodes', hasFilters: false, outputFields: ['outputNodes', 'elseOutputNodes'], customDispatch: true },
|
|
24
24
|
merge: { service: 'mergeNodesService', collection: 'mergenodes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
25
25
|
approval: { service: 'approvalNodesService', collection: 'approvalnodes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
26
|
+
loop: { service: 'loopNodesService', collection: 'loopnodes', hasFilters: false, outputFields: ['loopOutputNodes', 'doneOutputNodes'], customDispatch: true },
|
|
26
27
|
// ── Routing ──
|
|
27
28
|
router: { service: 'routersService', collection: 'routers', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
28
29
|
// ── Action nodes ──
|
|
@@ -32,7 +33,6 @@ exports.NODE_DISPATCH = {
|
|
|
32
33
|
notificationAction: { service: 'notificationActionsService', collection: 'notificationactions', hasFilters: true, outputFields: [], customDispatch: true },
|
|
33
34
|
sheetsAction: { service: 'sheetsActionsService', collection: 'sheetsactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true },
|
|
34
35
|
// ── Source + monitoring ──
|
|
35
|
-
fanout: { service: 'fanOutService', collection: 'fanouts', hasFilters: true, outputFields: [], customDispatch: true },
|
|
36
36
|
alert: { service: 'alertService', collection: 'alerts', hasFilters: false, outputFields: [], customDispatch: true },
|
|
37
37
|
endpoint: { service: 'endpointsService', collection: 'endpoints', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
38
38
|
scheduledWebhook: { service: 'scheduledWebhooksService', collection: 'scheduledwebhooks', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
package/dist/registry.js
CHANGED
|
@@ -102,6 +102,12 @@ exports.NODE_REGISTRY = {
|
|
|
102
102
|
stateKey: 'approvalNodes', allStateKey: 'allApprovalNodes',
|
|
103
103
|
color: '#94a3b8', testable: false,
|
|
104
104
|
},
|
|
105
|
+
loop: {
|
|
106
|
+
type: 'loop', prefix: 'loop', label: 'Loop',
|
|
107
|
+
group: 'Flow Control', detailPath: '/dashboard/loop-nodes', apiPath: '/loop-nodes',
|
|
108
|
+
stateKey: 'loopNodes', allStateKey: 'allLoopNodes',
|
|
109
|
+
color: '#f59e0b', testable: false,
|
|
110
|
+
},
|
|
105
111
|
// ── Routing ──
|
|
106
112
|
router: {
|
|
107
113
|
type: 'router', prefix: 'ro', label: 'Router',
|
|
@@ -109,12 +115,6 @@ exports.NODE_REGISTRY = {
|
|
|
109
115
|
stateKey: 'routers', allStateKey: 'allRouters',
|
|
110
116
|
color: '#38bdf8', testable: false,
|
|
111
117
|
},
|
|
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
118
|
// ── Actions ──
|
|
119
119
|
emailAction: {
|
|
120
120
|
type: 'emailAction', prefix: 'ea', label: 'Email Action',
|
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' | 'split' | '
|
|
2
|
+
export type NodeType = 'endpoint' | 'scheduledWebhook' | 'filter' | 'transform' | 'schemaValidator' | 'conditional' | 'delay' | 'rateLimiter' | 'aggregator' | 'cache' | 'code' | 'ai' | 'merge' | 'approval' | 'split' | 'loop' | 'router' | '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 */
|
|
@@ -12,6 +12,7 @@ export interface NodeConnectionConfig {
|
|
|
12
12
|
hasRejectionOutputNodes?: boolean;
|
|
13
13
|
hasBranches?: boolean;
|
|
14
14
|
isTerminal?: boolean;
|
|
15
|
+
hasLoopBack?: boolean;
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
18
|
/** UI-specific config for the dashboard canvas */
|
package/dist/ui.js
CHANGED
|
@@ -25,9 +25,9 @@ exports.NODE_UI = {
|
|
|
25
25
|
split: { fromNodes: true, toNodes: true, outputHandles: ['right', 'bottom'], special: { connectModal: 'output-group', outputGroups: { field: 'outputs', nameField: 'name', summaryField: 'field', label: 'output' } } },
|
|
26
26
|
merge: { fromNodes: true, toNodes: true, inputHandles: ['left', 'top'] },
|
|
27
27
|
approval: { fromNodes: true, toNodes: true, outputHandles: ['right', 'bottom'], special: { rejectionEndpoints: 'rejectionEndpointIds' } },
|
|
28
|
+
loop: { fromNodes: true, toNodes: true, inputHandles: ['left'], outputHandles: ['right'], dotHandles: { input: ['left-in', 'left-in-loopback'], output: ['right-out-loop', 'right-out-done'] } },
|
|
28
29
|
// ── Routing nodes ──
|
|
29
30
|
router: { fromNodes: true, toNodes: true, outputHandles: ['right', 'bottom'], dotHandles: { output: ['right-out', 'bottom-out'] }, special: { connectModal: 'rule' } },
|
|
30
|
-
fanout: { fromNodes: true, toNodes: false },
|
|
31
31
|
// ── Action nodes ──
|
|
32
32
|
emailAction: { fromNodes: true, toNodes: false, inputHandles: ['left', 'top'], dotHandles: { input: ['left-in', 'top-in'] }, special: { isTerminal: true, routerTargetLabel: 'email' } },
|
|
33
33
|
httpAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] } },
|
|
@@ -43,7 +43,6 @@ exports.NODE_UI = {
|
|
|
43
43
|
exports.PREFIX_TO_TYPE = [
|
|
44
44
|
{ prefix: 'ep-', type: 'endpoint', canvasType: 'endpoint' },
|
|
45
45
|
{ prefix: 'sw-', type: 'scheduledWebhook', canvasType: 'scheduled-webhook' },
|
|
46
|
-
{ prefix: 'fo-', type: 'fanout', canvasType: 'fanout' },
|
|
47
46
|
{ prefix: 'al-', type: 'alert', canvasType: 'alert' },
|
|
48
47
|
{ prefix: 'ea-', type: 'emailAction', canvasType: 'email-action' },
|
|
49
48
|
{ prefix: 'ha-', type: 'httpAction', canvasType: 'http-action' },
|
|
@@ -64,6 +63,7 @@ exports.PREFIX_TO_TYPE = [
|
|
|
64
63
|
{ prefix: 'code-', type: 'code', canvasType: 'code-node' },
|
|
65
64
|
{ prefix: 'ai-', type: 'ai', canvasType: 'ai-node' },
|
|
66
65
|
{ prefix: 'split-', type: 'split', canvasType: 'split' },
|
|
66
|
+
{ prefix: 'loop-', type: 'loop', canvasType: 'loop' },
|
|
67
67
|
{ prefix: 'note-', type: 'stickyNote', canvasType: 'sticky-note' },
|
|
68
68
|
];
|
|
69
69
|
/** Resolve canvas node ID to { type, entityId } */
|
package/package.json
CHANGED