@hostwebhook/node-types 1.25.0 → 1.26.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/dispatch.js +1 -0
- package/dist/drive-operations.d.ts +22 -0
- package/dist/drive-operations.js +40 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/registry.js +9 -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', 'firecrawlAction', 'vectorStore', 'loop',
|
|
21
|
+
'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', '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', 'firecrawlAction', 'vectorStore'];
|
|
29
|
+
const CHAINABLE_ACTIONS = ['httpAction', 'mongoAction', 'postgresAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', '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 = {
|
|
@@ -56,7 +56,7 @@ exports.NODE_CONNECTIONS = {
|
|
|
56
56
|
// approval is the generic "human-in-the-loop gate" — it should be
|
|
57
57
|
// able to gate ANY action, not the hand-picked subset that existed
|
|
58
58
|
// when this entry was last touched. Same staleness pattern as merge.
|
|
59
|
-
approval: { acceptsInputFrom: ['endpoint', 'filter', 'transform'], canOutputTo: ['endpoint', 'filter', 'transform', 'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'firecrawlAction', 'vectorStore'], special: { hasRejectionOutputNodes: true } },
|
|
59
|
+
approval: { acceptsInputFrom: ['endpoint', 'filter', 'transform'], canOutputTo: ['endpoint', 'filter', 'transform', 'emailAction', 'httpAction', 'mongoAction', 'postgresAction', 'notificationAction', 'sheetsAction', 'calendarAction', 'docsAction', 'driveAction', 'firecrawlAction', 'vectorStore'], special: { hasRejectionOutputNodes: true } },
|
|
60
60
|
loop: { acceptsInputFrom: STANDARD_INPUTS, canOutputTo: PROCESSING_OUTPUTS, special: { hasLoopBack: true } },
|
|
61
61
|
// ── Routing nodes ──
|
|
62
62
|
router: { acceptsInputFrom: ['endpoint', 'scheduledWebhook', 'filter', 'transform'], canOutputTo: PROCESSING_OUTPUTS.filter(t => t !== 'endpoint') },
|
|
@@ -69,6 +69,7 @@ exports.NODE_CONNECTIONS = {
|
|
|
69
69
|
sheetsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
70
70
|
calendarAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
71
71
|
docsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
72
|
+
driveAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
72
73
|
firecrawlAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
73
74
|
vectorStore: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
74
75
|
// ── Processing (transform-like) ──
|
package/dist/dispatch.js
CHANGED
|
@@ -45,6 +45,7 @@ exports.NODE_DISPATCH = {
|
|
|
45
45
|
sheetsAction: { service: 'sheetsActionsService', collection: 'sheetsactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
46
46
|
calendarAction: { service: 'calendarActionsService', collection: 'calendaractions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
47
47
|
docsAction: { service: 'docsActionsService', collection: 'docsactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
48
|
+
driveAction: { service: 'driveActionsService', collection: 'driveactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
48
49
|
firecrawlAction: { service: 'firecrawlActionsService', collection: 'firecrawlactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
49
50
|
// ── Sources — start the flow themselves, not dispatched ──
|
|
50
51
|
endpoint: { service: 'endpointsService', collection: 'endpoints', hasFilters: false, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Drive operation enum — single source of truth across the API,
|
|
3
|
+
* Dashboard, and Message Broker. Used by:
|
|
4
|
+
* - driveAction entity / DTO (api): operation field + validation
|
|
5
|
+
* - dashboard DriveAction operation type
|
|
6
|
+
* - broker hostwebhook types + tool schemas
|
|
7
|
+
* - MCP toolkit specs (when aiEnabled: true)
|
|
8
|
+
*
|
|
9
|
+
* Same pattern as gmail-operations.ts and calendar-operations.ts.
|
|
10
|
+
*
|
|
11
|
+
* Op semantics (anti-n8n choices):
|
|
12
|
+
* - delete = move to trash (recoverable for 30 days), NOT permanent erase
|
|
13
|
+
* - upload / download stream via the api Files / R2 layer, never load
|
|
14
|
+
* full file contents into memory (n8n breaks past ~70MB)
|
|
15
|
+
* - download returns a `_file` ref so downstream FileTransform / AI /
|
|
16
|
+
* HTTP nodes can chain on it directly (n8n returns raw binary, often
|
|
17
|
+
* misformatted as HTML on errors)
|
|
18
|
+
*/
|
|
19
|
+
export declare const DRIVE_OPERATIONS: readonly ["upload", "download", "copy", "move", "delete", "share", "update", "list", "get", "createFolder", "export", "getPermissions"];
|
|
20
|
+
export type DriveOperation = (typeof DRIVE_OPERATIONS)[number];
|
|
21
|
+
/** Type guard — useful when validating untrusted input (DTOs, tool calls). */
|
|
22
|
+
export declare function isDriveOperation(value: unknown): value is DriveOperation;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DRIVE_OPERATIONS = void 0;
|
|
4
|
+
exports.isDriveOperation = isDriveOperation;
|
|
5
|
+
/**
|
|
6
|
+
* Google Drive operation enum — single source of truth across the API,
|
|
7
|
+
* Dashboard, and Message Broker. Used by:
|
|
8
|
+
* - driveAction entity / DTO (api): operation field + validation
|
|
9
|
+
* - dashboard DriveAction operation type
|
|
10
|
+
* - broker hostwebhook types + tool schemas
|
|
11
|
+
* - MCP toolkit specs (when aiEnabled: true)
|
|
12
|
+
*
|
|
13
|
+
* Same pattern as gmail-operations.ts and calendar-operations.ts.
|
|
14
|
+
*
|
|
15
|
+
* Op semantics (anti-n8n choices):
|
|
16
|
+
* - delete = move to trash (recoverable for 30 days), NOT permanent erase
|
|
17
|
+
* - upload / download stream via the api Files / R2 layer, never load
|
|
18
|
+
* full file contents into memory (n8n breaks past ~70MB)
|
|
19
|
+
* - download returns a `_file` ref so downstream FileTransform / AI /
|
|
20
|
+
* HTTP nodes can chain on it directly (n8n returns raw binary, often
|
|
21
|
+
* misformatted as HTML on errors)
|
|
22
|
+
*/
|
|
23
|
+
exports.DRIVE_OPERATIONS = [
|
|
24
|
+
'upload', // upload a file (from _file ref or inline content)
|
|
25
|
+
'download', // download a file → _file ref
|
|
26
|
+
'copy', // duplicate a file in place or to another folder
|
|
27
|
+
'move', // relocate a file to a different folder
|
|
28
|
+
'delete', // trash a file (recoverable; permanent erase is opt-in)
|
|
29
|
+
'share', // grant viewer/commenter/editor permission to email/domain/anyone
|
|
30
|
+
'update', // rename or set metadata (description, starred, etc.)
|
|
31
|
+
'list', // search by name / mimeType / parent / query → iterable output
|
|
32
|
+
'get', // get metadata for one file
|
|
33
|
+
'createFolder', // create a new folder (with optional parent)
|
|
34
|
+
'export', // export Google native doc → PDF / DOCX / XLSX / etc.
|
|
35
|
+
'getPermissions', // list current permissions on a file
|
|
36
|
+
];
|
|
37
|
+
/** Type guard — useful when validating untrusted input (DTOs, tool calls). */
|
|
38
|
+
function isDriveOperation(value) {
|
|
39
|
+
return typeof value === 'string' && exports.DRIVE_OPERATIONS.includes(value);
|
|
40
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,5 +9,7 @@ export { GMAIL_OPERATIONS, isGmailOperation, } from './gmail-operations';
|
|
|
9
9
|
export type { GmailOperation } from './gmail-operations';
|
|
10
10
|
export { GOOGLE_CALENDAR_OPERATIONS, isGoogleCalendarOperation, } from './calendar-operations';
|
|
11
11
|
export type { GoogleCalendarOperation } from './calendar-operations';
|
|
12
|
+
export { DRIVE_OPERATIONS, isDriveOperation, } from './drive-operations';
|
|
13
|
+
export type { DriveOperation } from './drive-operations';
|
|
12
14
|
export type { CredentialTypeRegistration, CredentialType } from './credentials';
|
|
13
15
|
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.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.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; } });
|
|
@@ -38,6 +38,9 @@ Object.defineProperty(exports, "isGmailOperation", { enumerable: true, get: func
|
|
|
38
38
|
var calendar_operations_1 = require("./calendar-operations");
|
|
39
39
|
Object.defineProperty(exports, "GOOGLE_CALENDAR_OPERATIONS", { enumerable: true, get: function () { return calendar_operations_1.GOOGLE_CALENDAR_OPERATIONS; } });
|
|
40
40
|
Object.defineProperty(exports, "isGoogleCalendarOperation", { enumerable: true, get: function () { return calendar_operations_1.isGoogleCalendarOperation; } });
|
|
41
|
+
var drive_operations_1 = require("./drive-operations");
|
|
42
|
+
Object.defineProperty(exports, "DRIVE_OPERATIONS", { enumerable: true, get: function () { return drive_operations_1.DRIVE_OPERATIONS; } });
|
|
43
|
+
Object.defineProperty(exports, "isDriveOperation", { enumerable: true, get: function () { return drive_operations_1.isDriveOperation; } });
|
|
41
44
|
var credentials_1 = require("./credentials");
|
|
42
45
|
Object.defineProperty(exports, "CREDENTIAL_TYPES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPES; } });
|
|
43
46
|
Object.defineProperty(exports, "CREDENTIAL_TYPE_VALUES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPE_VALUES; } });
|
package/dist/registry.js
CHANGED
|
@@ -195,6 +195,15 @@ exports.NODE_REGISTRY = {
|
|
|
195
195
|
stateKey: 'docsActions', allStateKey: 'allDocsActions',
|
|
196
196
|
color: '#4285F4', testable: true,
|
|
197
197
|
},
|
|
198
|
+
driveAction: {
|
|
199
|
+
type: 'driveAction', prefix: 'drv', label: 'Google Drive',
|
|
200
|
+
group: 'Actions', detailPath: '/dashboard/drive-actions', apiPath: '/drive-actions',
|
|
201
|
+
stateKey: 'driveActions', allStateKey: 'allDriveActions',
|
|
202
|
+
color: '#22c55e', testable: true,
|
|
203
|
+
// AI Toolkit mode wires the node through the upstream AI Node's
|
|
204
|
+
// tools[] list, not via canvas edges — same pattern as emailAction.
|
|
205
|
+
isToolOnly: (e) => e.aiEnabled === true,
|
|
206
|
+
},
|
|
198
207
|
firecrawlAction: {
|
|
199
208
|
type: 'firecrawlAction', prefix: 'fc', label: 'Firecrawl',
|
|
200
209
|
group: 'Actions', detailPath: '/dashboard/firecrawl-actions', apiPath: '/firecrawl-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' | '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' | 'firecrawlAction' | 'vectorStore' | 'stickyNote';
|
|
2
|
+
export type NodeType = 'endpoint' | 'scheduledWebhook' | 'chatTrigger' | 'serviceTrigger' | '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';
|
|
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
|
@@ -41,6 +41,7 @@ exports.NODE_UI = {
|
|
|
41
41
|
sheetsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
42
42
|
calendarAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
43
43
|
docsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
44
|
+
driveAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
44
45
|
firecrawlAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
45
46
|
vectorStore: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
46
47
|
// ── Annotations ──
|
|
@@ -77,6 +78,7 @@ exports.PREFIX_TO_TYPE = [
|
|
|
77
78
|
{ prefix: 'md-', type: 'markdown', canvasType: 'markdown' },
|
|
78
79
|
{ prefix: 'ft-', type: 'fileTransform', canvasType: 'fileTransform' },
|
|
79
80
|
{ prefix: 'doc-', type: 'docsAction', canvasType: 'docsAction' },
|
|
81
|
+
{ prefix: 'drv-', type: 'driveAction', canvasType: 'driveAction' },
|
|
80
82
|
{ prefix: 'fc-', type: 'firecrawlAction', canvasType: 'firecrawlAction' },
|
|
81
83
|
{ prefix: 'vs-', type: 'vectorStore', canvasType: 'vectorStore' },
|
|
82
84
|
{ prefix: 'note-', type: 'stickyNote', canvasType: 'stickyNote' },
|
package/package.json
CHANGED