@hostwebhook/node-types 1.28.0 → 1.30.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 +4 -3
- package/dist/credentials.js +1 -0
- package/dist/dispatch.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/registry.js +12 -0
- package/dist/telegram-operations.d.ts +17 -0
- package/dist/telegram-operations.js +32 -0
- package/dist/types.d.ts +1 -1
- package/dist/ui.js +2 -0
- package/package.json +1 -1
package/dist/connections.js
CHANGED
|
@@ -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', 'vectorStore', 'loop',
|
|
21
|
+
'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', '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', 'vectorStore'];
|
|
29
|
+
const CHAINABLE_ACTIONS = ['httpAction', 'mongoAction', 'postgresAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'telegramAction', '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', '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', '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') },
|
|
@@ -72,6 +72,7 @@ exports.NODE_CONNECTIONS = {
|
|
|
72
72
|
docsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
73
73
|
driveAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
74
74
|
firecrawlAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
75
|
+
telegramAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
75
76
|
vectorStore: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
76
77
|
// ── Processing (transform-like) ──
|
|
77
78
|
markdown: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
package/dist/credentials.js
CHANGED
package/dist/dispatch.js
CHANGED
|
@@ -47,6 +47,7 @@ exports.NODE_DISPATCH = {
|
|
|
47
47
|
docsAction: { service: 'docsActionsService', collection: 'docsactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
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
|
+
telegramAction: { service: 'telegramActionsService', collection: 'telegramactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
50
51
|
// ── Sources — start the flow themselves, not dispatched ──
|
|
51
52
|
endpoint: { service: 'endpointsService', collection: 'endpoints', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
52
53
|
scheduledWebhook: { service: 'scheduledWebhooksService', collection: 'scheduledwebhooks', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
package/dist/index.d.ts
CHANGED
|
@@ -11,5 +11,7 @@ export { GOOGLE_CALENDAR_OPERATIONS, isGoogleCalendarOperation, } from './calend
|
|
|
11
11
|
export type { GoogleCalendarOperation } from './calendar-operations';
|
|
12
12
|
export { DRIVE_OPERATIONS, isDriveOperation, } from './drive-operations';
|
|
13
13
|
export type { DriveOperation } from './drive-operations';
|
|
14
|
+
export { TELEGRAM_OPERATIONS, isTelegramOperation, } from './telegram-operations';
|
|
15
|
+
export type { TelegramOperation } from './telegram-operations';
|
|
14
16
|
export type { CredentialTypeRegistration, CredentialType } from './credentials';
|
|
15
17
|
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.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.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; } });
|
|
@@ -41,6 +41,9 @@ Object.defineProperty(exports, "isGoogleCalendarOperation", { enumerable: true,
|
|
|
41
41
|
var drive_operations_1 = require("./drive-operations");
|
|
42
42
|
Object.defineProperty(exports, "DRIVE_OPERATIONS", { enumerable: true, get: function () { return drive_operations_1.DRIVE_OPERATIONS; } });
|
|
43
43
|
Object.defineProperty(exports, "isDriveOperation", { enumerable: true, get: function () { return drive_operations_1.isDriveOperation; } });
|
|
44
|
+
var telegram_operations_1 = require("./telegram-operations");
|
|
45
|
+
Object.defineProperty(exports, "TELEGRAM_OPERATIONS", { enumerable: true, get: function () { return telegram_operations_1.TELEGRAM_OPERATIONS; } });
|
|
46
|
+
Object.defineProperty(exports, "isTelegramOperation", { enumerable: true, get: function () { return telegram_operations_1.isTelegramOperation; } });
|
|
44
47
|
var credentials_1 = require("./credentials");
|
|
45
48
|
Object.defineProperty(exports, "CREDENTIAL_TYPES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPES; } });
|
|
46
49
|
Object.defineProperty(exports, "CREDENTIAL_TYPE_VALUES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPE_VALUES; } });
|
package/dist/registry.js
CHANGED
|
@@ -216,6 +216,18 @@ exports.NODE_REGISTRY = {
|
|
|
216
216
|
stateKey: 'firecrawlActions', allStateKey: 'allFirecrawlActions',
|
|
217
217
|
color: '#f97316', testable: true,
|
|
218
218
|
},
|
|
219
|
+
telegramAction: {
|
|
220
|
+
type: 'telegramAction', prefix: 'tg', label: 'Telegram Action',
|
|
221
|
+
group: 'Actions', detailPath: '/dashboard/telegram-actions', apiPath: '/telegram-actions',
|
|
222
|
+
stateKey: 'telegramActions', allStateKey: 'allTelegramActions',
|
|
223
|
+
color: '#0ea5e9', testable: true,
|
|
224
|
+
// AI Toolkit mode — same pattern as emailAction. One aiEnabled
|
|
225
|
+
// telegramAction expands into N MCP tools (one per operation) in
|
|
226
|
+
// the upstream AI Node's tool list, so we hide canvas handles to
|
|
227
|
+
// prevent accidental misrouting that would silently fire with
|
|
228
|
+
// empty fields.
|
|
229
|
+
isToolOnly: (e) => e.aiEnabled === true,
|
|
230
|
+
},
|
|
219
231
|
vectorStore: {
|
|
220
232
|
type: 'vectorStore', prefix: 'vs', label: 'Vector Store',
|
|
221
233
|
group: 'Actions', detailPath: '/dashboard/vector-store-nodes', apiPath: '/vector-store-nodes',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telegram Bot API operation enum — single source of truth across the API,
|
|
3
|
+
* Dashboard, and any future consumers (Message Broker, MCP server). Used by:
|
|
4
|
+
* - telegramAction entity / DTO (api): operation field + validation
|
|
5
|
+
* - dashboard TelegramAction operation picker
|
|
6
|
+
* - MCP toolkit-specs expansion (one aiEnabled telegramAction → N tools)
|
|
7
|
+
*
|
|
8
|
+
* Phase 1 covers the eight ops that handle ~95% of bot send use cases.
|
|
9
|
+
* Phase 2 candidates (sendMediaGroup, voice/video uploads, chat admin,
|
|
10
|
+
* setMyCommands, message reactions, inline-mode answers) get added by
|
|
11
|
+
* extending this list, bumping the package, and re-installing in
|
|
12
|
+
* consumers — same pattern as Gmail / Calendar / Drive.
|
|
13
|
+
*/
|
|
14
|
+
export declare const TELEGRAM_OPERATIONS: readonly ["sendMessage", "sendPhoto", "sendDocument", "editMessageText", "deleteMessage", "answerCallbackQuery", "forwardMessage", "sendPoll"];
|
|
15
|
+
export type TelegramOperation = (typeof TELEGRAM_OPERATIONS)[number];
|
|
16
|
+
/** Type guard — useful when validating untrusted input (DTOs, tool calls). */
|
|
17
|
+
export declare function isTelegramOperation(value: unknown): value is TelegramOperation;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TELEGRAM_OPERATIONS = void 0;
|
|
4
|
+
exports.isTelegramOperation = isTelegramOperation;
|
|
5
|
+
/**
|
|
6
|
+
* Telegram Bot API operation enum — single source of truth across the API,
|
|
7
|
+
* Dashboard, and any future consumers (Message Broker, MCP server). Used by:
|
|
8
|
+
* - telegramAction entity / DTO (api): operation field + validation
|
|
9
|
+
* - dashboard TelegramAction operation picker
|
|
10
|
+
* - MCP toolkit-specs expansion (one aiEnabled telegramAction → N tools)
|
|
11
|
+
*
|
|
12
|
+
* Phase 1 covers the eight ops that handle ~95% of bot send use cases.
|
|
13
|
+
* Phase 2 candidates (sendMediaGroup, voice/video uploads, chat admin,
|
|
14
|
+
* setMyCommands, message reactions, inline-mode answers) get added by
|
|
15
|
+
* extending this list, bumping the package, and re-installing in
|
|
16
|
+
* consumers — same pattern as Gmail / Calendar / Drive.
|
|
17
|
+
*/
|
|
18
|
+
exports.TELEGRAM_OPERATIONS = [
|
|
19
|
+
'sendMessage',
|
|
20
|
+
'sendPhoto',
|
|
21
|
+
'sendDocument',
|
|
22
|
+
'editMessageText',
|
|
23
|
+
'deleteMessage',
|
|
24
|
+
'answerCallbackQuery',
|
|
25
|
+
'forwardMessage',
|
|
26
|
+
'sendPoll',
|
|
27
|
+
];
|
|
28
|
+
/** Type guard — useful when validating untrusted input (DTOs, tool calls). */
|
|
29
|
+
function isTelegramOperation(value) {
|
|
30
|
+
return (typeof value === 'string' &&
|
|
31
|
+
exports.TELEGRAM_OPERATIONS.includes(value));
|
|
32
|
+
}
|
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' | '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' | '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
|
@@ -49,6 +49,7 @@ exports.NODE_UI = {
|
|
|
49
49
|
docsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
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
|
+
telegramAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'telegram' } },
|
|
52
53
|
vectorStore: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
53
54
|
// ── Annotations ──
|
|
54
55
|
stickyNote: { fromNodes: false, toNodes: false },
|
|
@@ -61,6 +62,7 @@ exports.PREFIX_TO_TYPE = [
|
|
|
61
62
|
{ prefix: 'svc-', type: 'serviceTrigger', canvasType: 'serviceTrigger' },
|
|
62
63
|
{ prefix: 'va-', type: 'voiceAgent', canvasType: 'voiceAgent' },
|
|
63
64
|
{ prefix: 'ea-', type: 'emailAction', canvasType: 'emailAction' },
|
|
65
|
+
{ prefix: 'tg-', type: 'telegramAction', canvasType: 'telegramAction' },
|
|
64
66
|
{ prefix: 'ha-', type: 'httpAction', canvasType: 'httpAction' },
|
|
65
67
|
{ prefix: 'ma-', type: 'mongoAction', canvasType: 'mongoAction' },
|
|
66
68
|
{ prefix: 'pg-', type: 'postgresAction', canvasType: 'postgresAction' },
|
package/package.json
CHANGED