@hostwebhook/node-types 1.0.1 → 1.2.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.
@@ -57,6 +57,8 @@ exports.NODE_CONNECTIONS = {
57
57
  sheetsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
58
58
  // ── Monitoring ──
59
59
  alert: { acceptsInputFrom: ['endpoint', 'scheduledWebhook'], canOutputTo: [], special: { isTerminal: true } },
60
+ // ── Annotations (visual only, no pipeline processing) ──
61
+ stickyNote: { acceptsInputFrom: [], canOutputTo: [] },
60
62
  };
61
63
  // ── Helper functions ──
62
64
  function canReceiveFrom(targetType, sourceType) {
package/dist/dispatch.js CHANGED
@@ -34,6 +34,8 @@ exports.NODE_DISPATCH = {
34
34
  alert: { service: 'alertService', collection: 'alerts', hasFilters: false, outputFields: [], customDispatch: true },
35
35
  endpoint: { service: 'endpointsService', collection: 'endpoints', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
36
36
  scheduledWebhook: { service: 'scheduledWebhooksService', collection: 'scheduledwebhooks', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
37
+ // ── Annotations ──
38
+ stickyNote: { service: 'stickyNotesService', collection: 'stickynotes', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true },
37
39
  };
38
40
  /** Get all MongoDB collection names for cascade cleanup */
39
41
  function getAllNodeCollections() {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export type { NodeType, NodeRole, HandlePosition, NodeConnectionConfig, NodeUIConfig, NodeDispatchConfig, PrefixMapping, } from './types';
1
+ export type { NodeType, NodeRole, HandlePosition, NodeConnectionConfig, NodeUIConfig, NodeDispatchConfig, PrefixMapping, PayloadMeta, } from './types';
2
+ export { singleMeta, iterableMeta } from './types';
2
3
  export { NODE_CONNECTIONS, canReceiveFrom, canReceiveFromNodes, canSendToNodes, isTerminal, isNodeType, ALL_NODE_TYPES, } from './connections';
3
4
  export { NODE_UI, PREFIX_TO_TYPE, resolveNodeId, } from './ui';
4
5
  export { NODE_DISPATCH, getAllNodeCollections, getNodeDispatchConfig, } from './dispatch';
package/dist/index.js CHANGED
@@ -1,6 +1,9 @@
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 = void 0;
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;
4
+ var types_1 = require("./types");
5
+ Object.defineProperty(exports, "singleMeta", { enumerable: true, get: function () { return types_1.singleMeta; } });
6
+ Object.defineProperty(exports, "iterableMeta", { enumerable: true, get: function () { return types_1.iterableMeta; } });
4
7
  // ── Connection rules (used by ALL repos) ──
5
8
  var connections_1 = require("./connections");
6
9
  Object.defineProperty(exports, "NODE_CONNECTIONS", { enumerable: true, get: function () { return connections_1.NODE_CONNECTIONS; } });
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' | '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 */
@@ -41,6 +41,16 @@ export interface NodeDispatchConfig {
41
41
  outputFields: string[];
42
42
  customDispatch: boolean;
43
43
  }
44
+ /** Standardized payload metadata — every node output MUST include _meta */
45
+ export interface PayloadMeta {
46
+ iterable: boolean;
47
+ count: number;
48
+ iterateField?: string;
49
+ }
50
+ /** Helper to create _meta for single-object outputs */
51
+ export declare function singleMeta(): PayloadMeta;
52
+ /** Helper to create _meta for iterable array outputs */
53
+ export declare function iterableMeta(field: string, count: number): PayloadMeta;
44
54
  /** Canvas prefix → node type mapping */
45
55
  export interface PrefixMapping {
46
56
  prefix: string;
package/dist/types.js CHANGED
@@ -1,2 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.singleMeta = singleMeta;
4
+ exports.iterableMeta = iterableMeta;
5
+ /** Helper to create _meta for single-object outputs */
6
+ function singleMeta() {
7
+ return { iterable: false, count: 1 };
8
+ }
9
+ /** Helper to create _meta for iterable array outputs */
10
+ function iterableMeta(field, count) {
11
+ return { iterable: true, iterateField: field, count };
12
+ }
package/dist/ui.js CHANGED
@@ -34,6 +34,8 @@ exports.NODE_UI = {
34
34
  sheetsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] } },
35
35
  // ── Monitoring ──
36
36
  alert: { fromNodes: true, toNodes: false, inputHandles: ['bottom'], special: { isTerminal: true } },
37
+ // ── Annotations ──
38
+ stickyNote: { fromNodes: false, toNodes: false },
37
39
  };
38
40
  /** Canvas prefix → node type mapping (used by FlowCanvas to identify node type from XYFlow node ID) */
39
41
  exports.PREFIX_TO_TYPE = [
@@ -58,6 +60,7 @@ exports.PREFIX_TO_TYPE = [
58
60
  { prefix: 'agg-', type: 'aggregator' },
59
61
  { prefix: 'cache-', type: 'cache' },
60
62
  { prefix: 'ai-', type: 'ai' },
63
+ { prefix: 'note-', type: 'stickyNote' },
61
64
  ];
62
65
  /** Resolve canvas node ID to { type, entityId } */
63
66
  function resolveNodeId(canvasId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostwebhook/node-types",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "Shared node type definitions, connection rules, and dispatch config for HostWebhook",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",