@hostwebhook/node-types 1.32.0 → 1.34.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', 'vectorStore', 'loop',
21
+ 'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', 'whatsappAction', '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', 'vectorStore'];
29
+ const CHAINABLE_ACTIONS = ['httpAction', 'mongoAction', 'postgresAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', 'whatsappAction', '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', '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', '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') },
@@ -73,6 +73,8 @@ exports.NODE_CONNECTIONS = {
73
73
  driveAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
74
74
  firecrawlAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
75
75
  telegramAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
76
+ whatsappAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
77
+ googleContactsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
76
78
  vectorStore: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
77
79
  // ── Processing (transform-like) ──
78
80
  markdown: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
@@ -27,6 +27,7 @@ exports.CREDENTIAL_TYPES = [
27
27
  { type: 'mcp_server' },
28
28
  { type: 'voice_agent' },
29
29
  { type: 'telegram_bot' },
30
+ { type: 'whatsapp_business' },
30
31
  ];
31
32
  /**
32
33
  * Plain string array — what the Mongoose `enum` field and the
package/dist/dispatch.js CHANGED
@@ -48,6 +48,8 @@ exports.NODE_DISPATCH = {
48
48
  driveAction: { service: 'driveActionsService', collection: 'driveactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
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
+ whatsappAction: { service: 'whatsappActionsService', collection: 'whatsappactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
52
+ googleContactsAction: { service: 'googleContactsActionsService', collection: 'googlecontactsactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
51
53
  // ── Sources — start the flow themselves, not dispatched ──
52
54
  endpoint: { service: 'endpointsService', collection: 'endpoints', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
53
55
  scheduledWebhook: { service: 'scheduledWebhooksService', collection: 'scheduledwebhooks', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Google People API operation enum — single source of truth across the
3
+ * API, Dashboard, and Message Broker. Used by:
4
+ * - googleContactsAction entity / DTO (api): operation field + validation
5
+ * - dashboard OperationSection
6
+ * - broker hostwebhook types + tool schemas
7
+ *
8
+ * Two tiers because the action shipped V1 first (read + simple writes)
9
+ * and V2 second (bulk + group management). Both ship in the same package
10
+ * version; the api-side DTO gates which tier its accept-list includes.
11
+ */
12
+ export declare const GOOGLE_CONTACTS_OPERATIONS_V1: readonly ["listContacts", "searchContacts", "getContact", "createContact", "updateContact", "deleteContact", "listContactGroups", "addContactToGroup", "removeContactFromGroup"];
13
+ export declare const GOOGLE_CONTACTS_OPERATIONS_V2: readonly ["batchCreateContacts", "batchUpdateContacts", "batchDeleteContacts", "createContactGroup", "updateContactGroup", "deleteContactGroup"];
14
+ export declare const GOOGLE_CONTACTS_OPERATIONS: readonly ["listContacts", "searchContacts", "getContact", "createContact", "updateContact", "deleteContact", "listContactGroups", "addContactToGroup", "removeContactFromGroup", "batchCreateContacts", "batchUpdateContacts", "batchDeleteContacts", "createContactGroup", "updateContactGroup", "deleteContactGroup"];
15
+ export type GoogleContactsOperation = (typeof GOOGLE_CONTACTS_OPERATIONS)[number];
16
+ export declare function isGoogleContactsOperation(value: unknown): value is GoogleContactsOperation;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * Google People API operation enum — single source of truth across the
4
+ * API, Dashboard, and Message Broker. Used by:
5
+ * - googleContactsAction entity / DTO (api): operation field + validation
6
+ * - dashboard OperationSection
7
+ * - broker hostwebhook types + tool schemas
8
+ *
9
+ * Two tiers because the action shipped V1 first (read + simple writes)
10
+ * and V2 second (bulk + group management). Both ship in the same package
11
+ * version; the api-side DTO gates which tier its accept-list includes.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.GOOGLE_CONTACTS_OPERATIONS = exports.GOOGLE_CONTACTS_OPERATIONS_V2 = exports.GOOGLE_CONTACTS_OPERATIONS_V1 = void 0;
15
+ exports.isGoogleContactsOperation = isGoogleContactsOperation;
16
+ exports.GOOGLE_CONTACTS_OPERATIONS_V1 = [
17
+ 'listContacts',
18
+ 'searchContacts',
19
+ 'getContact',
20
+ 'createContact',
21
+ 'updateContact',
22
+ 'deleteContact',
23
+ 'listContactGroups',
24
+ 'addContactToGroup',
25
+ 'removeContactFromGroup',
26
+ ];
27
+ exports.GOOGLE_CONTACTS_OPERATIONS_V2 = [
28
+ 'batchCreateContacts',
29
+ 'batchUpdateContacts',
30
+ 'batchDeleteContacts',
31
+ 'createContactGroup',
32
+ 'updateContactGroup',
33
+ 'deleteContactGroup',
34
+ ];
35
+ exports.GOOGLE_CONTACTS_OPERATIONS = [
36
+ ...exports.GOOGLE_CONTACTS_OPERATIONS_V1,
37
+ ...exports.GOOGLE_CONTACTS_OPERATIONS_V2,
38
+ ];
39
+ function isGoogleContactsOperation(value) {
40
+ return (typeof value === 'string' &&
41
+ exports.GOOGLE_CONTACTS_OPERATIONS.includes(value));
42
+ }
package/dist/index.d.ts CHANGED
@@ -13,5 +13,9 @@ export { DRIVE_OPERATIONS, isDriveOperation, } from './drive-operations';
13
13
  export type { DriveOperation } from './drive-operations';
14
14
  export { TELEGRAM_OPERATIONS, isTelegramOperation, } from './telegram-operations';
15
15
  export type { TelegramOperation } from './telegram-operations';
16
+ export { WHATSAPP_OPERATIONS, isWhatsAppOperation, } from './whatsapp-operations';
17
+ export type { WhatsAppOperation } from './whatsapp-operations';
18
+ export { GOOGLE_CONTACTS_OPERATIONS, GOOGLE_CONTACTS_OPERATIONS_V1, GOOGLE_CONTACTS_OPERATIONS_V2, isGoogleContactsOperation, } from './google-contacts-operations';
19
+ export type { GoogleContactsOperation } from './google-contacts-operations';
16
20
  export type { CredentialTypeRegistration, CredentialType } from './credentials';
17
21
  export { CREDENTIAL_TYPES, CREDENTIAL_TYPE_VALUES, credentialTypeValues, getCredentialType, isCredentialType, } 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.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.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; } });
@@ -44,6 +44,14 @@ Object.defineProperty(exports, "isDriveOperation", { enumerable: true, get: func
44
44
  var telegram_operations_1 = require("./telegram-operations");
45
45
  Object.defineProperty(exports, "TELEGRAM_OPERATIONS", { enumerable: true, get: function () { return telegram_operations_1.TELEGRAM_OPERATIONS; } });
46
46
  Object.defineProperty(exports, "isTelegramOperation", { enumerable: true, get: function () { return telegram_operations_1.isTelegramOperation; } });
47
+ var whatsapp_operations_1 = require("./whatsapp-operations");
48
+ Object.defineProperty(exports, "WHATSAPP_OPERATIONS", { enumerable: true, get: function () { return whatsapp_operations_1.WHATSAPP_OPERATIONS; } });
49
+ Object.defineProperty(exports, "isWhatsAppOperation", { enumerable: true, get: function () { return whatsapp_operations_1.isWhatsAppOperation; } });
50
+ var google_contacts_operations_1 = require("./google-contacts-operations");
51
+ Object.defineProperty(exports, "GOOGLE_CONTACTS_OPERATIONS", { enumerable: true, get: function () { return google_contacts_operations_1.GOOGLE_CONTACTS_OPERATIONS; } });
52
+ Object.defineProperty(exports, "GOOGLE_CONTACTS_OPERATIONS_V1", { enumerable: true, get: function () { return google_contacts_operations_1.GOOGLE_CONTACTS_OPERATIONS_V1; } });
53
+ Object.defineProperty(exports, "GOOGLE_CONTACTS_OPERATIONS_V2", { enumerable: true, get: function () { return google_contacts_operations_1.GOOGLE_CONTACTS_OPERATIONS_V2; } });
54
+ Object.defineProperty(exports, "isGoogleContactsOperation", { enumerable: true, get: function () { return google_contacts_operations_1.isGoogleContactsOperation; } });
47
55
  var credentials_1 = require("./credentials");
48
56
  Object.defineProperty(exports, "CREDENTIAL_TYPES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPES; } });
49
57
  Object.defineProperty(exports, "CREDENTIAL_TYPE_VALUES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPE_VALUES; } });
package/dist/registry.js CHANGED
@@ -228,6 +228,31 @@ exports.NODE_REGISTRY = {
228
228
  // empty fields.
229
229
  isToolOnly: (e) => e.aiEnabled === true,
230
230
  },
231
+ whatsappAction: {
232
+ type: 'whatsappAction', prefix: 'wa', label: 'WhatsApp Action',
233
+ group: 'Actions', detailPath: '/dashboard/whatsapp-actions', apiPath: '/whatsapp-actions',
234
+ stateKey: 'whatsappActions', allStateKey: 'allWhatsappActions',
235
+ // WhatsApp brand green (#25d366) — instantly recognisable on the canvas.
236
+ color: '#25d366', testable: true,
237
+ // Same toolkit pattern as telegramAction — when aiEnabled the
238
+ // entity stops being a manually-wired single-op action and becomes
239
+ // a multi-op tool surface for an upstream AI Node. Hide canvas
240
+ // handles to prevent accidental wiring that would fire with empty
241
+ // fields the LLM is supposed to populate.
242
+ isToolOnly: (e) => e.aiEnabled === true,
243
+ },
244
+ googleContactsAction: {
245
+ type: 'googleContactsAction', prefix: 'gc', label: 'Google Contacts',
246
+ group: 'Actions', detailPath: '/dashboard/google-contacts-actions', apiPath: '/google-contacts-actions',
247
+ stateKey: 'googleContactsActions', allStateKey: 'allGoogleContactsActions',
248
+ // Google "blue" used by Google Drive / Docs (#4285F4) — same family.
249
+ color: '#4285F4', testable: true,
250
+ // AI toolkit mode mirrors emailAction / calendarAction — when
251
+ // aiEnabled the node expands into N MCP tools (one per People API
252
+ // operation) in the upstream AI Node's tool list. Hide canvas
253
+ // handles to keep manual + tool modes from being mixed.
254
+ isToolOnly: (e) => e.aiEnabled === true,
255
+ },
231
256
  vectorStore: {
232
257
  type: 'vectorStore', prefix: 'vs', label: 'Vector Store',
233
258
  group: 'Actions', detailPath: '/dashboard/vector-store-nodes', apiPath: '/vector-store-nodes',
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' | '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' | '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
@@ -50,6 +50,8 @@ exports.NODE_UI = {
50
50
  driveAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
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
+ whatsappAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'whatsapp' } },
54
+ googleContactsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
53
55
  vectorStore: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
54
56
  // ── Annotations ──
55
57
  stickyNote: { fromNodes: false, toNodes: false },
@@ -63,6 +65,8 @@ exports.PREFIX_TO_TYPE = [
63
65
  { prefix: 'va-', type: 'voiceAgent', canvasType: 'voiceAgent' },
64
66
  { prefix: 'ea-', type: 'emailAction', canvasType: 'emailAction' },
65
67
  { prefix: 'tg-', type: 'telegramAction', canvasType: 'telegramAction' },
68
+ { prefix: 'wa-', type: 'whatsappAction', canvasType: 'whatsappAction' },
69
+ { prefix: 'gc-', type: 'googleContactsAction', canvasType: 'googleContactsAction' },
66
70
  { prefix: 'ha-', type: 'httpAction', canvasType: 'httpAction' },
67
71
  { prefix: 'ma-', type: 'mongoAction', canvasType: 'mongoAction' },
68
72
  { prefix: 'pg-', type: 'postgresAction', canvasType: 'postgresAction' },
@@ -0,0 +1,23 @@
1
+ /**
2
+ * WhatsApp Business Cloud API operation enum — single source of truth
3
+ * across the API, Dashboard, and any future consumers (Message Broker,
4
+ * MCP server). Used by:
5
+ * - whatsappAction entity / DTO (api): operation field + validation
6
+ * - dashboard WhatsAppAction operation picker
7
+ * - MCP toolkit-specs expansion (one aiEnabled whatsappAction → N tools)
8
+ *
9
+ * Targets Meta Cloud API v21+ (the only supported variant after the
10
+ * On-Premises sunset on 2025-10-23). Each op maps to a single POST to
11
+ * `https://graph.facebook.com/v21.0/<phone_number_id>/messages` with
12
+ * a different `type` discriminator in the body.
13
+ *
14
+ * Phase 1 covers the ten ops that handle ~95% of business messaging.
15
+ * Phase 2 candidates (sendInteractiveButtons, sendInteractiveList,
16
+ * sendSticker, sendContacts) extend this list — bump the package and
17
+ * re-install in consumers, same pattern as Gmail / Calendar / Drive
18
+ * / Telegram.
19
+ */
20
+ export declare const WHATSAPP_OPERATIONS: readonly ["sendText", "sendImage", "sendAudio", "sendVideo", "sendDocument", "sendLocation", "sendTemplate", "replyToMessage", "markAsRead", "sendReaction"];
21
+ export type WhatsAppOperation = (typeof WHATSAPP_OPERATIONS)[number];
22
+ /** Type guard — useful when validating untrusted input (DTOs, tool calls). */
23
+ export declare function isWhatsAppOperation(value: unknown): value is WhatsAppOperation;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WHATSAPP_OPERATIONS = void 0;
4
+ exports.isWhatsAppOperation = isWhatsAppOperation;
5
+ /**
6
+ * WhatsApp Business Cloud API operation enum — single source of truth
7
+ * across the API, Dashboard, and any future consumers (Message Broker,
8
+ * MCP server). Used by:
9
+ * - whatsappAction entity / DTO (api): operation field + validation
10
+ * - dashboard WhatsAppAction operation picker
11
+ * - MCP toolkit-specs expansion (one aiEnabled whatsappAction → N tools)
12
+ *
13
+ * Targets Meta Cloud API v21+ (the only supported variant after the
14
+ * On-Premises sunset on 2025-10-23). Each op maps to a single POST to
15
+ * `https://graph.facebook.com/v21.0/<phone_number_id>/messages` with
16
+ * a different `type` discriminator in the body.
17
+ *
18
+ * Phase 1 covers the ten ops that handle ~95% of business messaging.
19
+ * Phase 2 candidates (sendInteractiveButtons, sendInteractiveList,
20
+ * sendSticker, sendContacts) extend this list — bump the package and
21
+ * re-install in consumers, same pattern as Gmail / Calendar / Drive
22
+ * / Telegram.
23
+ */
24
+ exports.WHATSAPP_OPERATIONS = [
25
+ 'sendText',
26
+ 'sendImage',
27
+ 'sendAudio',
28
+ 'sendVideo',
29
+ 'sendDocument',
30
+ 'sendLocation',
31
+ 'sendTemplate',
32
+ 'replyToMessage',
33
+ 'markAsRead',
34
+ 'sendReaction',
35
+ ];
36
+ /** Type guard — useful when validating untrusted input (DTOs, tool calls). */
37
+ function isWhatsAppOperation(value) {
38
+ return (typeof value === 'string' &&
39
+ exports.WHATSAPP_OPERATIONS.includes(value));
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostwebhook/node-types",
3
- "version": "1.32.0",
3
+ "version": "1.34.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",