@hostwebhook/node-types 1.17.0 → 1.19.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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Google Calendar operation enum — single source of truth across the API,
3
+ * Dashboard, and Message Broker. Used by:
4
+ * - calendarAction entity / DTO (api): operation field + validation
5
+ * - dashboard CalendarActionGoogleOperation type
6
+ * - broker hostwebhook types + tool schemas
7
+ * - any future calendar-related node
8
+ *
9
+ * Adding a new Calendar operation = add it here, bump this package's
10
+ * version, publish to npm, and re-install in the consuming repos.
11
+ * Each consumer still owns its operation-specific config schema (the
12
+ * dashboard owns the UI form schema, the api owns the dispatch logic),
13
+ * but the canonical list of valid operation strings lives here.
14
+ */
15
+ export declare const GOOGLE_CALENDAR_OPERATIONS: readonly ["createEvent", "updateEvent", "deleteEvent", "listEvents", "getEvent", "listCalendars", "findFreeSlots", "proposeEvent", "confirmEvent"];
16
+ export type GoogleCalendarOperation = (typeof GOOGLE_CALENDAR_OPERATIONS)[number];
17
+ /** Type guard — useful when validating untrusted input (DTOs, tool calls). */
18
+ export declare function isGoogleCalendarOperation(value: unknown): value is GoogleCalendarOperation;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GOOGLE_CALENDAR_OPERATIONS = void 0;
4
+ exports.isGoogleCalendarOperation = isGoogleCalendarOperation;
5
+ /**
6
+ * Google Calendar operation enum — single source of truth across the API,
7
+ * Dashboard, and Message Broker. Used by:
8
+ * - calendarAction entity / DTO (api): operation field + validation
9
+ * - dashboard CalendarActionGoogleOperation type
10
+ * - broker hostwebhook types + tool schemas
11
+ * - any future calendar-related node
12
+ *
13
+ * Adding a new Calendar operation = add it here, bump this package's
14
+ * version, publish to npm, and re-install in the consuming repos.
15
+ * Each consumer still owns its operation-specific config schema (the
16
+ * dashboard owns the UI form schema, the api owns the dispatch logic),
17
+ * but the canonical list of valid operation strings lives here.
18
+ */
19
+ exports.GOOGLE_CALENDAR_OPERATIONS = [
20
+ 'createEvent',
21
+ 'updateEvent',
22
+ 'deleteEvent',
23
+ 'listEvents',
24
+ 'getEvent',
25
+ /** List all calendars the user can write to. Lets the LLM discover
26
+ * ids before passing `calendarId` to other ops. */
27
+ 'listCalendars',
28
+ /** freebusy.query — returns free windows in a date range. Optionally
29
+ * combine across attendees to find common availability. */
30
+ 'findFreeSlots',
31
+ /** Create a tentative event (status: tentative, no invites sent). The
32
+ * user sees it greyed out in their calendar; LLM follows up with
33
+ * confirmEvent to promote. Mirrors emailAction's createDraft → sendDraft. */
34
+ 'proposeEvent',
35
+ /** Promote a tentative event to confirmed + send invites. Mirrors
36
+ * emailAction's sendDraft. */
37
+ 'confirmEvent',
38
+ ];
39
+ /** Type guard — useful when validating untrusted input (DTOs, tool calls). */
40
+ function isGoogleCalendarOperation(value) {
41
+ return (typeof value === 'string' &&
42
+ exports.GOOGLE_CALENDAR_OPERATIONS.includes(value));
43
+ }
package/dist/index.d.ts CHANGED
@@ -7,3 +7,5 @@ export type { NodeRegistryEntry, NodeGroup } from './registry';
7
7
  export { NODE_REGISTRY, getNodeRegistryEntry, NODE_DETAIL_PATHS, NODE_COLORS, NODE_STATE_KEYS, PREFIX_TO_NODE_TYPE, NODE_TYPE_TO_PREFIX, } from './registry';
8
8
  export { GMAIL_OPERATIONS, isGmailOperation, } from './gmail-operations';
9
9
  export type { GmailOperation } from './gmail-operations';
10
+ export { GOOGLE_CALENDAR_OPERATIONS, isGoogleCalendarOperation, } from './calendar-operations';
11
+ export type { GoogleCalendarOperation } from './calendar-operations';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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; } });
@@ -35,3 +35,6 @@ Object.defineProperty(exports, "NODE_TYPE_TO_PREFIX", { enumerable: true, get: f
35
35
  var gmail_operations_1 = require("./gmail-operations");
36
36
  Object.defineProperty(exports, "GMAIL_OPERATIONS", { enumerable: true, get: function () { return gmail_operations_1.GMAIL_OPERATIONS; } });
37
37
  Object.defineProperty(exports, "isGmailOperation", { enumerable: true, get: function () { return gmail_operations_1.isGmailOperation; } });
38
+ var calendar_operations_1 = require("./calendar-operations");
39
+ Object.defineProperty(exports, "GOOGLE_CALENDAR_OPERATIONS", { enumerable: true, get: function () { return calendar_operations_1.GOOGLE_CALENDAR_OPERATIONS; } });
40
+ Object.defineProperty(exports, "isGoogleCalendarOperation", { enumerable: true, get: function () { return calendar_operations_1.isGoogleCalendarOperation; } });
package/dist/registry.js CHANGED
@@ -179,6 +179,9 @@ exports.NODE_REGISTRY = {
179
179
  group: 'Actions', detailPath: '/dashboard/calendar-actions', apiPath: '/calendar-actions',
180
180
  stateKey: 'calendarActions', allStateKey: 'allCalendarActions',
181
181
  color: '#60a5fa', testable: true,
182
+ // AI Toolkit mode wires the node through the upstream AI Node's
183
+ // tools[] list, not via canvas edges — same pattern as emailAction.
184
+ isToolOnly: (e) => e.aiEnabled === true,
182
185
  },
183
186
  docsAction: {
184
187
  type: 'docsAction', prefix: 'doc', label: 'Google Docs',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostwebhook/node-types",
3
- "version": "1.17.0",
3
+ "version": "1.19.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",