@hostwebhook/node-types 1.1.0 → 1.3.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 +5 -2
- package/dist/dispatch.js +3 -0
- package/dist/types.d.ts +1 -1
- package/dist/ui.js +5 -0
- package/package.json +1 -1
package/dist/connections.js
CHANGED
|
@@ -16,14 +16,14 @@ exports.isTerminal = isTerminal;
|
|
|
16
16
|
exports.isNodeType = isNodeType;
|
|
17
17
|
/** All node types that can appear as pipeline outputs */
|
|
18
18
|
const PROCESSING_OUTPUTS = [
|
|
19
|
-
'endpoint', 'router', 'filter', 'transform', 'cache', 'rateLimiter',
|
|
19
|
+
'endpoint', 'router', 'filter', 'transform', 'cache', 'code', 'rateLimiter',
|
|
20
20
|
'aggregator', 'conditional', 'delay', 'schemaValidator',
|
|
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', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator',
|
|
26
|
+
'cache', 'code', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator',
|
|
27
27
|
];
|
|
28
28
|
/** Action nodes that can chain (non-terminal) */
|
|
29
29
|
const CHAINABLE_ACTIONS = ['httpAction', 'mongoAction', 'sheetsAction'];
|
|
@@ -42,6 +42,7 @@ exports.NODE_CONNECTIONS = {
|
|
|
42
42
|
rateLimiter: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
43
43
|
aggregator: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
44
44
|
cache: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
45
|
+
code: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
45
46
|
ai: { acceptsInputFrom: [...ACTION_INPUTS], canOutputTo: PROCESSING_OUTPUTS },
|
|
46
47
|
// ── Flow control nodes ──
|
|
47
48
|
merge: { acceptsInputFrom: ['endpoint', 'filter', 'transform', 'cache', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator'], canOutputTo: PROCESSING_OUTPUTS },
|
|
@@ -57,6 +58,8 @@ exports.NODE_CONNECTIONS = {
|
|
|
57
58
|
sheetsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
58
59
|
// ── Monitoring ──
|
|
59
60
|
alert: { acceptsInputFrom: ['endpoint', 'scheduledWebhook'], canOutputTo: [], special: { isTerminal: true } },
|
|
61
|
+
// ── Annotations (visual only, no pipeline processing) ──
|
|
62
|
+
stickyNote: { acceptsInputFrom: [], canOutputTo: [] },
|
|
60
63
|
};
|
|
61
64
|
// ── Helper functions ──
|
|
62
65
|
function canReceiveFrom(targetType, sourceType) {
|
package/dist/dispatch.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.NODE_DISPATCH = {
|
|
|
16
16
|
rateLimiter: { service: 'rateLimiterNodesService', collection: 'ratelimiternodes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
17
17
|
aggregator: { service: 'aggregatorNodesService', collection: 'aggregatornodes', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true },
|
|
18
18
|
cache: { service: 'cacheNodesService', collection: 'cachenodes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
19
|
+
code: { service: 'codeNodesService', collection: 'codenodes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
19
20
|
ai: { service: 'aiNodesService', collection: 'ainodes', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true },
|
|
20
21
|
// ── Flow control ──
|
|
21
22
|
conditional: { service: 'conditionalNodesService', collection: 'conditionalnodes', hasFilters: false, outputFields: ['outputNodes', 'elseOutputNodes'], customDispatch: true },
|
|
@@ -34,6 +35,8 @@ exports.NODE_DISPATCH = {
|
|
|
34
35
|
alert: { service: 'alertService', collection: 'alerts', hasFilters: false, outputFields: [], customDispatch: true },
|
|
35
36
|
endpoint: { service: 'endpointsService', collection: 'endpoints', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
36
37
|
scheduledWebhook: { service: 'scheduledWebhooksService', collection: 'scheduledwebhooks', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
38
|
+
// ── Annotations ──
|
|
39
|
+
stickyNote: { service: 'stickyNotesService', collection: 'stickynotes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
|
|
37
40
|
};
|
|
38
41
|
/** Get all MongoDB collection names for cascade cleanup */
|
|
39
42
|
function getAllNodeCollections() {
|
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' | 'ai' | 'merge' | 'approval' | 'router' | 'fanout' | 'emailAction' | 'httpAction' | 'mongoAction' | 'notificationAction' | 'sheetsAction' | 'alert';
|
|
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';
|
|
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
|
@@ -19,6 +19,7 @@ exports.NODE_UI = {
|
|
|
19
19
|
rateLimiter: { fromNodes: true, toNodes: true },
|
|
20
20
|
aggregator: { fromNodes: true, toNodes: true },
|
|
21
21
|
cache: { fromNodes: true, toNodes: true },
|
|
22
|
+
code: { fromNodes: true, toNodes: true },
|
|
22
23
|
ai: { fromNodes: true, toNodes: true },
|
|
23
24
|
// ── Flow control nodes ──
|
|
24
25
|
merge: { fromNodes: true, toNodes: true, inputHandles: ['left', 'top'] },
|
|
@@ -34,6 +35,8 @@ exports.NODE_UI = {
|
|
|
34
35
|
sheetsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] } },
|
|
35
36
|
// ── Monitoring ──
|
|
36
37
|
alert: { fromNodes: true, toNodes: false, inputHandles: ['bottom'], special: { isTerminal: true } },
|
|
38
|
+
// ── Annotations ──
|
|
39
|
+
stickyNote: { fromNodes: false, toNodes: false },
|
|
37
40
|
};
|
|
38
41
|
/** Canvas prefix → node type mapping (used by FlowCanvas to identify node type from XYFlow node ID) */
|
|
39
42
|
exports.PREFIX_TO_TYPE = [
|
|
@@ -57,7 +60,9 @@ exports.PREFIX_TO_TYPE = [
|
|
|
57
60
|
{ prefix: 'rl-', type: 'rateLimiter' },
|
|
58
61
|
{ prefix: 'agg-', type: 'aggregator' },
|
|
59
62
|
{ prefix: 'cache-', type: 'cache' },
|
|
63
|
+
{ prefix: 'code-', type: 'code' },
|
|
60
64
|
{ prefix: 'ai-', type: 'ai' },
|
|
65
|
+
{ prefix: 'note-', type: 'stickyNote' },
|
|
61
66
|
];
|
|
62
67
|
/** Resolve canvas node ID to { type, entityId } */
|
|
63
68
|
function resolveNodeId(canvasId) {
|
package/package.json
CHANGED