@hostwebhook/node-types 1.35.0 → 1.36.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.
@@ -18,7 +18,7 @@ exports.isNodeType = isNodeType;
18
18
  const PROCESSING_OUTPUTS = [
19
19
  'endpoint', 'router', 'filter', 'transform', 'cache', 'code', 'rateLimiter',
20
20
  'aggregator', 'conditional', 'delay', 'schemaValidator', 'split', 'markdown', 'fileTransform',
21
- 'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', 'whatsappAction', 'googleContactsAction', 'vectorStore', 'loop',
21
+ 'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', 'whatsappAction', 'discordAction', 'googleContactsAction', 'vectorStore', 'loop',
22
22
  ];
23
23
  /** Standard processing input sources */
24
24
  const STANDARD_INPUTS = [
@@ -26,7 +26,7 @@ const STANDARD_INPUTS = [
26
26
  'cache', 'code', 'rateLimiter', 'aggregator', 'conditional', 'delay', 'schemaValidator', 'split', 'loop', 'markdown', 'fileTransform',
27
27
  ];
28
28
  /** Action nodes that can chain (non-terminal) */
29
- const CHAINABLE_ACTIONS = ['httpAction', 'mongoAction', 'postgresAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', 'whatsappAction', 'googleContactsAction', 'vectorStore'];
29
+ const CHAINABLE_ACTIONS = ['httpAction', 'mongoAction', 'postgresAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', 'whatsappAction', 'discordAction', 'googleContactsAction', 'vectorStore'];
30
30
  /** Full input list for action nodes (standard + chainable actions) */
31
31
  const ACTION_INPUTS = [...STANDARD_INPUTS, ...CHAINABLE_ACTIONS];
32
32
  exports.NODE_CONNECTIONS = {
@@ -57,7 +57,7 @@ exports.NODE_CONNECTIONS = {
57
57
  // approval is the generic "human-in-the-loop gate" — it should be
58
58
  // able to gate ANY action, not the hand-picked subset that existed
59
59
  // when this entry was last touched. Same staleness pattern as merge.
60
- approval: { acceptsInputFrom: ['endpoint', 'filter', 'transform'], canOutputTo: ['endpoint', 'filter', 'transform', 'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', 'whatsappAction', 'googleContactsAction', 'vectorStore'], special: { hasRejectionOutputNodes: true } },
60
+ approval: { acceptsInputFrom: ['endpoint', 'filter', 'transform'], canOutputTo: ['endpoint', 'filter', 'transform', 'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', 'whatsappAction', 'discordAction', 'googleContactsAction', 'vectorStore'], special: { hasRejectionOutputNodes: true } },
61
61
  loop: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS, special: { hasLoopBack: true } },
62
62
  // ── Routing nodes ──
63
63
  router: { acceptsInputFrom: ['endpoint', 'scheduledWebhook', 'filter', 'transform'], canOutputTo: PROCESSING_OUTPUTS.filter(t => t !== 'endpoint') },
@@ -74,6 +74,7 @@ exports.NODE_CONNECTIONS = {
74
74
  firecrawlAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
75
75
  telegramAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
76
76
  whatsappAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
77
+ discordAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
77
78
  googleContactsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
78
79
  vectorStore: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
79
80
  // ── Processing (transform-like) ──
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Discord Bot API operation enum — single source of truth across the
3
+ * API, Dashboard, and any future consumers (Message Broker, MCP server).
4
+ * Used by:
5
+ * - discordAction entity / DTO (api): operation field + validation
6
+ * - dashboard DiscordAction operation picker
7
+ * - MCP toolkit-specs expansion (one aiEnabled discordAction → N tools)
8
+ *
9
+ * Targets Discord API v10 (the current stable as of 2026). Each op maps
10
+ * to a single REST call — most go through the Bot Token to the channel/
11
+ * guild/user resource. createThread + createChannel + sendDM each have
12
+ * their own multi-step flows handled inside the dispatcher.
13
+ *
14
+ * Phase 1 covers 17 ops that handle the bulk of bot automation
15
+ * (messaging, channel CRUD, threads, DMs, role membership, lookups).
16
+ * Phase 1.5 candidates (kick / ban / timeout / role CRUD / bulk delete /
17
+ * forum-post create) extend this list — bump the package and re-install
18
+ * in consumers, same pattern as Gmail / Calendar / Drive / Telegram.
19
+ */
20
+ export declare const DISCORD_OPERATIONS: readonly ["sendMessage", "editMessage", "deleteMessage", "getMessage", "addReaction", "removeReaction", "pinMessage", "createChannel", "editChannel", "deleteChannel", "getChannel", "listChannels", "createThread", "sendDM", "addRole", "removeRole", "getMember"];
21
+ export type DiscordOperation = (typeof DISCORD_OPERATIONS)[number];
22
+ /** Type guard — useful when validating untrusted input (DTOs, tool calls). */
23
+ export declare function isDiscordOperation(value: unknown): value is DiscordOperation;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DISCORD_OPERATIONS = void 0;
4
+ exports.isDiscordOperation = isDiscordOperation;
5
+ /**
6
+ * Discord Bot API operation enum — single source of truth across the
7
+ * API, Dashboard, and any future consumers (Message Broker, MCP server).
8
+ * Used by:
9
+ * - discordAction entity / DTO (api): operation field + validation
10
+ * - dashboard DiscordAction operation picker
11
+ * - MCP toolkit-specs expansion (one aiEnabled discordAction → N tools)
12
+ *
13
+ * Targets Discord API v10 (the current stable as of 2026). Each op maps
14
+ * to a single REST call — most go through the Bot Token to the channel/
15
+ * guild/user resource. createThread + createChannel + sendDM each have
16
+ * their own multi-step flows handled inside the dispatcher.
17
+ *
18
+ * Phase 1 covers 17 ops that handle the bulk of bot automation
19
+ * (messaging, channel CRUD, threads, DMs, role membership, lookups).
20
+ * Phase 1.5 candidates (kick / ban / timeout / role CRUD / bulk delete /
21
+ * forum-post create) extend this list — bump the package and re-install
22
+ * in consumers, same pattern as Gmail / Calendar / Drive / Telegram.
23
+ */
24
+ exports.DISCORD_OPERATIONS = [
25
+ // Messages
26
+ 'sendMessage',
27
+ 'editMessage',
28
+ 'deleteMessage',
29
+ 'getMessage',
30
+ 'addReaction',
31
+ 'removeReaction',
32
+ 'pinMessage',
33
+ // Channels
34
+ 'createChannel',
35
+ 'editChannel',
36
+ 'deleteChannel',
37
+ 'getChannel',
38
+ 'listChannels',
39
+ // Threads
40
+ 'createThread',
41
+ // DMs
42
+ 'sendDM',
43
+ // Members & roles
44
+ 'addRole',
45
+ 'removeRole',
46
+ 'getMember',
47
+ ];
48
+ /** Type guard — useful when validating untrusted input (DTOs, tool calls). */
49
+ function isDiscordOperation(value) {
50
+ return (typeof value === 'string' &&
51
+ exports.DISCORD_OPERATIONS.includes(value));
52
+ }
package/dist/dispatch.js CHANGED
@@ -49,6 +49,7 @@ exports.NODE_DISPATCH = {
49
49
  firecrawlAction: { service: 'firecrawlActionsService', collection: 'firecrawlactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
50
50
  telegramAction: { service: 'telegramActionsService', collection: 'telegramactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
51
51
  whatsappAction: { service: 'whatsappActionsService', collection: 'whatsappactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
52
+ discordAction: { service: 'discordActionsService', collection: 'discordactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
52
53
  googleContactsAction: { service: 'googleContactsActionsService', collection: 'googlecontactsactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
53
54
  // ── Sources — start the flow themselves, not dispatched ──
54
55
  endpoint: { service: 'endpointsService', collection: 'endpoints', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
package/dist/index.d.ts CHANGED
@@ -15,6 +15,8 @@ export { TELEGRAM_OPERATIONS, isTelegramOperation, } from './telegram-operations
15
15
  export type { TelegramOperation } from './telegram-operations';
16
16
  export { WHATSAPP_OPERATIONS, isWhatsAppOperation, } from './whatsapp-operations';
17
17
  export type { WhatsAppOperation } from './whatsapp-operations';
18
+ export { DISCORD_OPERATIONS, isDiscordOperation, } from './discord-operations';
19
+ export type { DiscordOperation } from './discord-operations';
18
20
  export { GOOGLE_CONTACTS_OPERATIONS, GOOGLE_CONTACTS_OPERATIONS_V1, GOOGLE_CONTACTS_OPERATIONS_V2, isGoogleContactsOperation, } from './google-contacts-operations';
19
21
  export type { GoogleContactsOperation } from './google-contacts-operations';
20
22
  export type { CredentialTypeRegistration, CredentialType } from './credentials';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isCredentialType = exports.getCredentialType = exports.credentialTypeValues = exports.CREDENTIAL_TYPE_VALUES = exports.CREDENTIAL_TYPES = exports.isGoogleContactsOperation = exports.GOOGLE_CONTACTS_OPERATIONS_V2 = exports.GOOGLE_CONTACTS_OPERATIONS_V1 = exports.GOOGLE_CONTACTS_OPERATIONS = exports.isWhatsAppOperation = exports.WHATSAPP_OPERATIONS = exports.isTelegramOperation = exports.TELEGRAM_OPERATIONS = exports.isDriveOperation = exports.DRIVE_OPERATIONS = exports.isGoogleCalendarOperation = exports.GOOGLE_CALENDAR_OPERATIONS = exports.isGmailOperation = exports.GMAIL_OPERATIONS = 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;
3
+ exports.isCredentialType = exports.getCredentialType = exports.credentialTypeValues = exports.CREDENTIAL_TYPE_VALUES = exports.CREDENTIAL_TYPES = exports.isGoogleContactsOperation = exports.GOOGLE_CONTACTS_OPERATIONS_V2 = exports.GOOGLE_CONTACTS_OPERATIONS_V1 = exports.GOOGLE_CONTACTS_OPERATIONS = exports.isDiscordOperation = exports.DISCORD_OPERATIONS = exports.isWhatsAppOperation = exports.WHATSAPP_OPERATIONS = exports.isTelegramOperation = exports.TELEGRAM_OPERATIONS = exports.isDriveOperation = exports.DRIVE_OPERATIONS = exports.isGoogleCalendarOperation = exports.GOOGLE_CALENDAR_OPERATIONS = exports.isGmailOperation = exports.GMAIL_OPERATIONS = 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; } });
@@ -47,6 +47,9 @@ Object.defineProperty(exports, "isTelegramOperation", { enumerable: true, get: f
47
47
  var whatsapp_operations_1 = require("./whatsapp-operations");
48
48
  Object.defineProperty(exports, "WHATSAPP_OPERATIONS", { enumerable: true, get: function () { return whatsapp_operations_1.WHATSAPP_OPERATIONS; } });
49
49
  Object.defineProperty(exports, "isWhatsAppOperation", { enumerable: true, get: function () { return whatsapp_operations_1.isWhatsAppOperation; } });
50
+ var discord_operations_1 = require("./discord-operations");
51
+ Object.defineProperty(exports, "DISCORD_OPERATIONS", { enumerable: true, get: function () { return discord_operations_1.DISCORD_OPERATIONS; } });
52
+ Object.defineProperty(exports, "isDiscordOperation", { enumerable: true, get: function () { return discord_operations_1.isDiscordOperation; } });
50
53
  var google_contacts_operations_1 = require("./google-contacts-operations");
51
54
  Object.defineProperty(exports, "GOOGLE_CONTACTS_OPERATIONS", { enumerable: true, get: function () { return google_contacts_operations_1.GOOGLE_CONTACTS_OPERATIONS; } });
52
55
  Object.defineProperty(exports, "GOOGLE_CONTACTS_OPERATIONS_V1", { enumerable: true, get: function () { return google_contacts_operations_1.GOOGLE_CONTACTS_OPERATIONS_V1; } });
package/dist/registry.js CHANGED
@@ -241,6 +241,17 @@ exports.NODE_REGISTRY = {
241
241
  // fields the LLM is supposed to populate.
242
242
  isToolOnly: (e) => e.aiEnabled === true,
243
243
  },
244
+ discordAction: {
245
+ type: 'discordAction', prefix: 'dc', label: 'Discord Action',
246
+ group: 'Actions', detailPath: '/dashboard/discord-actions', apiPath: '/discord-actions',
247
+ stateKey: 'discordActions', allStateKey: 'allDiscordActions',
248
+ // Discord brand "Blurple" (#5865F2).
249
+ color: '#5865F2', testable: true,
250
+ // Same toolkit pattern as telegramAction / whatsappAction. Hide
251
+ // canvas handles when aiEnabled so the user can't manually wire a
252
+ // multi-op tool surface — the LLM picks the operation per call.
253
+ isToolOnly: (e) => e.aiEnabled === true,
254
+ },
244
255
  googleContactsAction: {
245
256
  type: 'googleContactsAction', prefix: 'gc', label: 'Google Contacts',
246
257
  group: 'Actions', detailPath: '/dashboard/google-contacts-actions', apiPath: '/google-contacts-actions',
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** All valid node type identifiers */
2
- export type NodeType = 'endpoint' | 'scheduledWebhook' | 'chatTrigger' | 'serviceTrigger' | 'voiceAgent' | 'filter' | 'transform' | 'schemaValidator' | 'conditional' | 'delay' | 'rateLimiter' | 'aggregator' | 'cache' | 'code' | 'ai' | 'merge' | 'approval' | 'split' | 'loop' | 'markdown' | 'fileTransform' | 'router' | 'emailAction' | 'httpAction' | 'mongoAction' | 'postgresAction' | 'notificationAction' | 'sheetsAction' | 'calendarAction' | 'docsAction' | 'driveAction' | 'firecrawlAction' | 'telegramAction' | 'whatsappAction' | 'googleContactsAction' | 'vectorStore' | 'stickyNote';
2
+ export type NodeType = 'endpoint' | 'scheduledWebhook' | 'chatTrigger' | 'serviceTrigger' | 'voiceAgent' | 'filter' | 'transform' | 'schemaValidator' | 'conditional' | 'delay' | 'rateLimiter' | 'aggregator' | 'cache' | 'code' | 'ai' | 'merge' | 'approval' | 'split' | 'loop' | 'markdown' | 'fileTransform' | 'router' | 'emailAction' | 'httpAction' | 'mongoAction' | 'postgresAction' | 'notificationAction' | 'sheetsAction' | 'calendarAction' | 'docsAction' | 'driveAction' | 'firecrawlAction' | 'telegramAction' | 'whatsappAction' | 'discordAction' | 'googleContactsAction' | 'vectorStore' | '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
@@ -51,6 +51,7 @@ exports.NODE_UI = {
51
51
  firecrawlAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
52
52
  telegramAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'telegram' } },
53
53
  whatsappAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'whatsapp' } },
54
+ discordAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'discord' } },
54
55
  googleContactsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
55
56
  vectorStore: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
56
57
  // ── Annotations ──
@@ -66,6 +67,7 @@ exports.PREFIX_TO_TYPE = [
66
67
  { prefix: 'ea-', type: 'emailAction', canvasType: 'emailAction' },
67
68
  { prefix: 'tg-', type: 'telegramAction', canvasType: 'telegramAction' },
68
69
  { prefix: 'wa-', type: 'whatsappAction', canvasType: 'whatsappAction' },
70
+ { prefix: 'dc-', type: 'discordAction', canvasType: 'discordAction' },
69
71
  { prefix: 'gc-', type: 'googleContactsAction', canvasType: 'googleContactsAction' },
70
72
  { prefix: 'ha-', type: 'httpAction', canvasType: 'httpAction' },
71
73
  { prefix: 'ma-', type: 'mongoAction', canvasType: 'mongoAction' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostwebhook/node-types",
3
- "version": "1.35.0",
3
+ "version": "1.36.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",