n8n-nodes-hudu 2.4.0 → 2.4.2

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.
@@ -19,6 +19,7 @@ const OPERATION_LABELS = {
19
19
  getIdByName: 'Resolve name to ID',
20
20
  move: 'Move asset between companies',
21
21
  getByLayout: 'List assets by layout (labelled custom fields)',
22
+ help: 'Help / workflow notes',
22
23
  };
23
24
  const runtimeSchemas = (0, schema_generator_1.getRuntimeSchemaBuilders)(runtime_1.runtimeZod);
24
25
  const EXECUTE_METADATA_FIELDS = new Set([
@@ -143,9 +144,8 @@ class HuduAiTools {
143
144
  }
144
145
  const getAllSchema = runtimeSchemas.buildUnifiedSchema(resource, ['getAll'], config);
145
146
  const supportsSearch = 'search' in getAllSchema.shape;
146
- const referenceUtc = new Date().toISOString().replace(/\.\d{3}Z$/, 'Z');
147
147
  const unifiedSchema = runtimeSchemas.buildUnifiedSchema(resource, enabledOperations, config);
148
- const unifiedDescription = (0, description_builders_1.buildUnifiedDescription)(resourceLabel, resource, enabledOperations, referenceUtc, supportsSearch, config);
148
+ const unifiedDescription = (0, description_builders_1.buildUnifiedDescription)(resourceLabel, resource, enabledOperations, supportsSearch, config);
149
149
  const hasWriteOps = enabledOperations.some((op) => resource_config_1.WRITE_OPERATIONS.includes(op));
150
150
  const hasDestructiveOps = enabledOperations.some((op) => op === 'delete');
151
151
  const unifiedTool = new runtime_1.RuntimeDynamicStructuredTool({
@@ -1 +1 @@
1
- {"version":3,"file":"HuduAiTools.node.js","sourceRoot":"","sources":["../../../nodes/Hudu/HuduAiTools.node.ts"],"names":[],"mappings":";;;AAAA,+CAEsB;AActB,gEAAoF;AAEpF,4DAA6D;AAC7D,0EAA0E;AAC1E,kEAEqC;AACrC,gDAA8E;AAC9E,gEAAoE;AAEpE,MAAM,gBAAgB,GAA2B;IAC7C,GAAG,EAAE,WAAW;IAChB,MAAM,EAAE,yBAAyB;IACjC,MAAM,EAAE,QAAQ;IA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AC;YACT,IAAI,EAAE,MAAM,CAAC,KAAK;YAClB,KAAK;YACL,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,WAAW;SAC1C,CAAC,CAAC;IACP,CAAC;IACD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,KAAK,UAAU,yBAAyB;;IACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAW,CAAC;IACpE,MAAM,oBAAoB,GAAG,CAAC,MAAA,IAAI,CAAC,uBAAuB,CAAC,sBAAsB,CAAC,mCAAI,KAAK,CAAY,CAAC;IAExG,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,MAAM,GAAG,sCAAoB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEvB,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,GAAG,EAAE,CAAC;QAC1B,IAAI,kCAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB;YAAE,SAAS;QACrE,OAAO,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,MAAA,gBAAgB,CAAC,EAAE,CAAC,mCAAI,EAAE;YAChC,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,GAAG,EAAE,kBAAkB,MAAM,CAAC,KAAK,EAAE;SACrD,CAAC,CAAC;IACP,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC"}
@@ -1,11 +1,3 @@
1
- export declare function dateTimeReferenceSnippet(referenceUtc: string): string;
2
- export declare function getRequiredFields(resource: string): string[];
3
- export declare function buildGetDescription(label: string, resourceName: string, supportsSearch?: boolean): string;
4
- export declare function buildGetAllDescription(label: string, referenceUtc?: string, supportsSearch?: boolean, resource?: string): string;
5
- export declare function buildCreateDescription(label: string, requiredFields: string[], referenceUtc?: string, supportsSearch?: boolean, resource?: string): string;
6
- export declare function buildUpdateDescription(label: string, resourceName: string, supportsSearch?: boolean): string;
7
- export declare function buildDeleteDescription(label: string, resourceName: string, supportsSearch?: boolean): string;
8
- export declare function buildArchiveDescription(label: string, operation: 'archive' | 'unarchive', resourceName?: string, supportsSearch?: boolean): string;
9
- export declare function buildUnifiedDescription(resourceLabel: string, resource: string, operations: string[], referenceUtc: string, supportsSearch: boolean, config: {
1
+ export declare function buildUnifiedDescription(resourceLabel: string, resource: string, operations: string[], supportsSearch: boolean, config: {
10
2
  requiresCompanyEndpoint?: boolean;
11
3
  }): string;
@@ -1,232 +1,43 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dateTimeReferenceSnippet = dateTimeReferenceSnippet;
4
- exports.getRequiredFields = getRequiredFields;
5
- exports.buildGetDescription = buildGetDescription;
6
- exports.buildGetAllDescription = buildGetAllDescription;
7
- exports.buildCreateDescription = buildCreateDescription;
8
- exports.buildUpdateDescription = buildUpdateDescription;
9
- exports.buildDeleteDescription = buildDeleteDescription;
10
- exports.buildArchiveDescription = buildArchiveDescription;
11
3
  exports.buildUnifiedDescription = buildUnifiedDescription;
12
- function dateTimeReferenceSnippet(referenceUtc) {
13
- return `Reference: current UTC date-time when these tools were loaded is ${referenceUtc}. Use this for "today", "recent", or date-based filtering do not assume a different date. `;
14
- }
15
- const REQUIRED_FIELDS_BY_RESOURCE = {
16
- companies: ['name'],
17
- articles: ['name'],
18
- assets: ['company_id', 'asset_layout_id', 'name'],
19
- websites: ['name', 'company_id'],
20
- asset_passwords: ['name', 'company_id', 'password'],
21
- procedures: ['name'],
22
- folders: ['name'],
23
- networks: ['name', 'company_id', 'address'],
24
- ip_addresses: ['address', 'status', 'company_id'],
25
- relations: ['fromable_id', 'fromable_type', 'toable_id', 'toable_type'],
26
- expirations: ['resource_id', 'resource_type', 'expiration_date'],
27
- vlans: ['name', 'company_id'],
28
- vlan_zones: ['name', 'vlan_id_ranges'],
29
- photos: ['caption'],
30
- procedure_tasks: ['name', 'procedure_id'],
4
+ const RESOURCE_HINTS = {
5
+ articles: "'name' = fuzzy title; 'search' = full-text (both re-rank exact-title to top). include_content/include_photos opt-in. folder_id auto-resolves company_id. operation=help topic=overview for workflow notes.",
6
+ companies: 'Use getIdByName for fuzzy name→id resolution. operation=help topic=overview for filters and archive rules.',
7
+ folders: 'Folders carry company_id (powers hudu_articles folder_id auto-narrowing). operation=help topic=overview.',
8
+ websites: "'name' IS the URL (must include https:// or http://). operation=help topic=overview.",
9
+ procedures: "Nested 'tasks' on reads (each with optional 'assignee'). operation=help topic=overview.",
10
+ procedure_tasks: "Task carries 'assignee:{id,name,initials}' only when assigned. operation=help topic=overview for cross-procedure filtering.",
11
+ relations: 'fromable_/toable_ pairs declare both ends; types from RESOURCE_TYPES. operation=help topic=overview for data model.',
12
+ assets: 'Use getIdByName for name→id. move recreates+deletes via /companies/{id}/assets. getByLayout labels custom fields.',
13
+ asset_passwords: 'Use getIdByName for fuzzy name→id resolution.',
14
+ asset_layouts: 'Use getIdByName for EXACT name→id resolution.',
15
+ activity_logs: 'Filter by user, resource_type+resource_id, action_message, or date range.',
16
+ ip_addresses: 'Filter by address, network_id, fqdn, status, or asset_id.',
17
+ networks: 'Use getIdByName for EXACT name→id resolution.',
18
+ vlans: 'Use getIdByName for EXACT name→id resolution.',
19
+ vlan_zones: 'Use getIdByName for EXACT name→id resolution.',
20
+ matchers: 'Filter by integration_id.',
21
+ groups: 'Use getIdByName for fuzzy name→id resolution.',
22
+ users: 'Use getIdByName for fuzzy name→id resolution.',
23
+ expirations: 'Filter by company_id or resource_type.',
24
+ photos: 'Internal photo records (not the embedded public_photos / numeric_id flow).',
25
+ public_photos: 'Slim shape: {numeric_id, url, file_name, size}. operation=help topic=overview for the verification workflow.',
31
26
  };
32
- function getRequiredFields(resource) {
27
+ const ENVELOPE_PREAMBLE = "Envelope v2 — 'error' key = failure; default-valued fields omitted.";
28
+ function buildUnifiedDescription(resourceLabel, resource, operations, supportsSearch, config) {
33
29
  var _a;
34
- return (_a = REQUIRED_FIELDS_BY_RESOURCE[resource]) !== null && _a !== void 0 ? _a : [];
35
- }
36
- function buildGetDescription(label, resourceName, supportsSearch = true) {
37
- if (resourceName === 'articles') {
38
- return ("Fetch a single article record by its numeric ID. " +
39
- "ONLY call when you already have a numeric ID — if you only have a title, call hudu_articles with operation 'getAll' and 'name' first. " +
40
- "By default the HTML content field is stripped — set include_content=true only when you need to read or quote the article body; leave false when you need only metadata. " +
41
- "When reading content (include_content=true): the response includes a 'public_photos' array — objects with 'numeric_id' (integer) for each embedded image. " +
42
- "Call hudu_public_photos with operation 'get' and each photo's 'numeric_id' BEFORE editing or redacting the article — this verifies each embedded photo still exists so your edits do not accidentally break or remove valid image references. " +
43
- "Skip this verification step when you are only reading, summarising, or quoting the article (no write-back). " +
44
- "Do NOT use the slug from '/public_photo/<slug>' HTML links as the id — the API returns 404 for slugs; use 'numeric_id' only.");
45
- }
46
- if (resourceName === 'public_photos') {
47
- return ("Fetch public photo slim METADATA by numeric ID — returns numeric_id, url, file_name, size. " +
48
- "Returns METADATA ONLY — NEVER returns binary image bytes or image content. n8n's tool architecture forcibly JSON-stringifies every tool result, so binary data in AI tool responses is impossible by design. Do NOT attempt to return, decode, or analyse image content from this call. " +
49
- "PRIMARY use: before editing or redacting an article (or company record) that contains embedded '/public_photo/<slug>' images, call this with each photo's 'numeric_id' to verify the photo still exists — this prevents your edits from breaking or removing references to photos that were already deleted upstream. " +
50
- "SECONDARY use: surface the 'url' (a publicly accessible absolute URL, no Hudu auth required) or 'file_name' / 'size' to the user so they can open the image in their browser. " +
51
- "NOT useful for: visual analysis of image content, describing what a diagram or screenshot shows, or OCR — this tool cannot see images. If the user asks what an image depicts, explain you can only supply the URL for them to view. " +
52
- "Pass the 'numeric_id' (integer) from a prior article or company response's 'public_photos' array. Do NOT pass the slug string from '/public_photo/<slug>' HTML links — the API only accepts integers and returns 404 for slugs.");
53
- }
54
- const lookupHint = supportsSearch
55
- ? `call hudu_${resourceName} with operation 'getAll' and 'search' first, extract the 'id' from results, then call this.`
56
- : `call hudu_${resourceName} with operation 'getAll' and the available filters to find the record, extract the 'id' from results, then call this.`;
57
- return (`Fetch a single ${label} record by its numeric ID. ` +
58
- `ONLY call this when you already have a numeric ID — never pass a name or text. ` +
59
- `If you only have a name or description, ${lookupHint}`);
60
- }
61
- function buildGetAllDescription(label, referenceUtc, supportsSearch, resource) {
62
- const ref = referenceUtc ? dateTimeReferenceSnippet(referenceUtc) : '';
63
- if (resource === 'articles') {
64
- return (ref +
65
- "Search and list articles in Hudu. " +
66
- "For title-based lookup (resolving a known title to an ID) use 'name' — fuzzy-matches titles with title-overlap ranking and auto-fetches up to 100 candidates. " +
67
- "For topic or content-phrase exploration use 'search' — partial text match across title AND body. " +
68
- "Content is stripped from results by default (set include_content=true to include). " +
69
- "Narrow with company_id, folder_id, draft, enable_sharing, or updated_at_start/end date range. " +
70
- "Results contain numeric 'id' on each record — capture for get, update, delete, or archive. " +
71
- "Article HTML (fetched via 'get' with include_content=true) contains embedded images; the response includes a 'public_photos' array with 'numeric_id' per image — when editing or redacting the article, call hudu_public_photos 'get' with that integer FIRST to verify each embedded photo still exists (prevents breaking image references). Skip this step when just reading or summarising. Use 'numeric_id', NOT the slug from HTML links. " +
72
- "If results are unexpectedly empty, verify API key permissions.");
73
- }
74
- if (resource === 'public_photos') {
75
- return (ref +
76
- "List public photo records in Hudu. Public photos are images embedded in article or company HTML content as '/public_photo/<slug>' links. " +
77
- "WARNING: Hudu has no server-side filters on this endpoint — record_type and record_id are applied client-side after paging the full photo corpus. ALWAYS provide both record_type ('Article' or 'Company') AND record_id to keep the fetch bounded. " +
78
- "Each result's 'id' is a string slug (display only); 'numeric_id' is the integer required for operation 'get' — do NOT pass the slug string; 'url' is the direct image URL for display or download. " +
79
- "Increase 'limit' toward 100 only if you expect a record to have many embedded photos. " +
80
- "If results are empty, verify record_type and record_id match a record that actually has embedded photos.");
81
- }
82
- if (supportsSearch) {
83
- return (ref +
84
- `Search and list ${label} records in Hudu. ` +
85
- `ALWAYS use 'search' for any text or name lookup (partial match across multiple fields) — do not use 'name' for text lookups. ` +
86
- `Results contain a numeric 'id' field on each record — capture this ID for subsequent getById, update, delete, or archive calls. ` +
87
- `Increase 'limit' (max 100) if you expect many results. ` +
88
- `If results are unexpectedly empty, verify API key permissions.`);
89
- }
90
- return (ref +
91
- `List ${label} records in Hudu using the available filters. ` +
92
- `This resource has no partial-text search — to find a record by name use the 'name' filter (EXACT full-name match, case-sensitive). ` +
93
- `Results contain a numeric 'id' field on each record — capture this ID for subsequent getById, update, delete, or archive calls. ` +
94
- `Increase 'limit' (max 100) if you expect many results. ` +
95
- `If results are unexpectedly empty, verify API key permissions.`);
96
- }
97
- function buildCreateDescription(label, requiredFields, referenceUtc, supportsSearch = true, resource = '') {
98
- const ref = referenceUtc ? dateTimeReferenceSnippet(referenceUtc) : '';
99
- if (resource === 'articles') {
100
- return (ref +
101
- 'Create a new article in Hudu. ' +
102
- 'SCOPE — provide ONE of: (a) company_id (numeric, use hudu_companies_get_id_by_name if unknown), ' +
103
- '(b) folder_id (company_id auto-resolved internally — no extra call needed), ' +
104
- 'or (c) global=true for a global article not tied to any company. ' +
105
- 'folder_id is optional when global=true (places article in a global folder). ' +
106
- 'global=true takes precedence over any provided company_id. ' +
107
- 'content accepts HTML or Markdown. ' +
108
- 'Confirm field values with user before executing when acting autonomously. ' +
109
- 'On success returns the created article including its numeric id.');
110
- }
111
- const reqList = requiredFields.length > 0 ? `Required fields: ${requiredFields.join(', ')}. ` : '';
112
- const idFields = requiredFields.filter((f) => f.endsWith('_id') && f !== 'id');
113
- const foreignKeyHint = idFields.length > 0
114
- ? supportsSearch
115
- ? `For unknown IDs (${idFields.join(', ')}): call the relevant resource's getAll with 'search' to find the numeric ID first. `
116
- : `For unknown IDs (${idFields.join(', ')}): call the relevant resource's getAll with available filters to find the numeric ID first. `
117
- : '';
118
- return (ref +
119
- `Create a new ${label} record in Hudu. ` +
120
- reqList +
121
- foreignKeyHint +
122
- `Confirm field values with user before executing when acting autonomously. ` +
123
- `On success returns the created record including its assigned numeric 'id' (use for subsequent operations). ` +
124
- `If you receive a validation error, check that all required fields are provided with valid values.`);
125
- }
126
- function buildUpdateDescription(label, resourceName, supportsSearch = true) {
127
- const lookupHint = supportsSearch
128
- ? `call hudu_${resourceName} with operation 'getAll' and 'search' first to get the 'id'.`
129
- : `call hudu_${resourceName} with operation 'getAll' and available filters to find the record and get the 'id'.`;
130
- return (`Update an existing ${label} record in Hudu by numeric ID. ` +
131
- `PREREQUISITE: you need the numeric ID. If you only have a name or text, ${lookupHint} ` +
132
- `Provide only the fields you want to change — unchanged fields can be omitted (PATCH semantics). ` +
133
- `Confirm field values with user before executing when acting autonomously. ` +
134
- `Returns the updated record.`);
135
- }
136
- function buildDeleteDescription(label, resourceName, supportsSearch = true) {
137
- const confirmHint = supportsSearch
138
- ? `call hudu_${resourceName} with operation 'getAll' and 'search' if unsure.`
139
- : `call hudu_${resourceName} with operation 'getAll' and available filters if unsure.`;
140
- return (`Permanently and irreversibly delete a ${label} record from Hudu by numeric ID. ` +
141
- `Consider using 'archive' instead — it hides the record while preserving data for later restoration. ` +
142
- `PREREQUISITE: confirm the correct ID — ${confirmHint} ` +
143
- `ONLY on explicit user intent. Do not infer from context. Confirm ID is correct before proceeding. ` +
144
- `Returns deletion confirmation.`);
145
- }
146
- function buildArchiveDescription(label, operation, resourceName, supportsSearch = true) {
147
- if (operation === 'archive') {
148
- const prereq = resourceName
149
- ? supportsSearch
150
- ? `If unsure of the ID, call hudu_${resourceName} with operation 'getAll' and 'search' first. `
151
- : `If unsure of the ID, call hudu_${resourceName} with operation 'getAll' and available filters to find the record first. `
152
- : '';
153
- return (`Archive a ${label} record in Hudu by numeric ID. ` +
154
- `Archived records are hidden from active views but NOT deleted — data is preserved and can be restored with 'unarchive'. ` +
155
- `Prefer this over 'delete' when you want to deactivate rather than permanently remove a record. ` +
156
- prereq);
157
- }
158
- return (`Restore a previously archived ${label} record in Hudu by numeric ID. ` +
159
- `The record becomes visible in active views again. Returns confirmation.`);
160
- }
161
- function buildGetIdByNameDescription(resourceLabel, resource) {
162
- const exactResources = new Set(['asset_layouts', 'folders', 'networks', 'procedures', 'vlans', 'vlan_zones']);
163
- const isExact = exactResources.has(resource);
164
- const matchNote = isExact
165
- ? 'EXACT case-sensitive match required.'
166
- : 'Partial/fuzzy match — shorter terms return more results.';
167
- return (`Resolve a ${resourceLabel} name to its numeric Hudu ID. ${matchNote} ` +
168
- `Returns up to [limit] slim records (id, name, plus a few key reference fields). ` +
169
- `Use before any operation requiring a numeric ${resourceLabel} ID. ` +
170
- `Prefer this over operation 'getAll' just to find an ID. Requires field: name. Optional: limit (default 5, max 20).`);
171
- }
172
- function buildMoveDescription() {
173
- return ('Move an asset between companies. Recreates the asset under the target company (preserving standard and custom field values) ' +
174
- 'then deletes the original. There is no native Hudu API endpoint for this operation. ' +
175
- 'IMPORTANT: Relations pointing to the original asset will NOT be automatically updated — ' +
176
- 'use hudu_relations to re-establish them after the move if needed. ' +
177
- 'Set delete_original=false to create a copy without removing the original (verify before committing the move). ' +
178
- 'PREREQUISITE: confirm the correct asset_id and target_company_id before calling — this operation cannot be undone automatically if delete_original=true. ' +
179
- 'Requires fields: asset_id, target_company_id. Optional: delete_original (default true).');
180
- }
181
- function buildGetByLayoutDescription() {
182
- return ('List all assets of a specific type (layout) for a company, with custom field values labelled by field name. ' +
183
- 'Accepts company name or ID, and layout name or ID. Layout name must be an EXACT case-sensitive match — ' +
184
- 'use hudu_asset_layouts with operation getIdByName if unsure of the exact name. ' +
185
- 'Returns assets with a labelled fields object (e.g., {"Hostname": "SRV01", "IP Address": "10.0.0.1"}) ' +
186
- 'instead of raw numeric field IDs. ' +
187
- "This is the preferred operation for 'show me all [servers/switches/firewalls] for [company]' queries. " +
188
- 'Requires either company_id or company_name, and either layout_id or layout_name. Optional: include_archived (default false).');
189
- }
190
- function buildUnifiedDescription(resourceLabel, resource, operations, referenceUtc, supportsSearch, config) {
30
+ void supportsSearch;
31
+ void config;
191
32
  const enabledOps = Array.from(new Set(operations));
192
- const requiredFields = getRequiredFields(resource);
193
- const operationLines = enabledOps.map((operation) => {
194
- switch (operation) {
195
- case 'get':
196
- return `- get: ${buildGetDescription(resourceLabel, resource, supportsSearch)}`;
197
- case 'getAll':
198
- return `- getAll: ${buildGetAllDescription(resourceLabel, undefined, supportsSearch, resource)}`;
199
- case 'create':
200
- return `- create: ${buildCreateDescription(resourceLabel, requiredFields, undefined, supportsSearch, resource)}`;
201
- case 'update':
202
- return `- update: ${buildUpdateDescription(resourceLabel, resource, supportsSearch)}`;
203
- case 'delete':
204
- return `- delete: ${buildDeleteDescription(resourceLabel, resource, supportsSearch)}`;
205
- case 'archive':
206
- case 'unarchive':
207
- return `- ${operation}: ${buildArchiveDescription(resourceLabel, operation, resource, supportsSearch)}`;
208
- case 'getIdByName':
209
- return `- getIdByName: ${buildGetIdByNameDescription(resourceLabel, resource)}`;
210
- case 'move':
211
- return `- move: ${buildMoveDescription()}`;
212
- case 'getByLayout':
213
- return `- getByLayout: ${buildGetByLayoutDescription()}`;
214
- default:
215
- return `- ${operation}: Operation available for this resource.`;
216
- }
217
- });
218
- const companyEndpointHint = config.requiresCompanyEndpoint
219
- ? 'This resource can require company-scoped endpoints for write operations. Provide company_id when required.'
220
- : '';
33
+ const hint = (_a = RESOURCE_HINTS[resource]) !== null && _a !== void 0 ? _a : '';
221
34
  return [
222
- `${dateTimeReferenceSnippet(referenceUtc)}Manage ${resourceLabel} records in Hudu.`,
223
- "Response envelope: schemaVersion '2'. Presence of an 'error' key indicates failure; absence indicates success (no `success` boolean field). Fields holding their resource-documented default value (null / false / empty array) are omitted — treat an absent field as the default. Procedure read responses expose tasks under `tasks` (Rails-style `procedure_tasks_attributes` write-key is renamed on read); each task carries an `assignee:{id,name,initials}` block only when assigned.",
224
- 'Pass one of the following values in the required "operation" field:',
225
- ...operationLines,
226
- 'Prefer running getAll first to discover numeric IDs before get, update, delete, archive, or unarchive.',
227
- companyEndpointHint,
35
+ `Manage Hudu ${resourceLabel} records.`,
36
+ `Operations: ${enabledOps.join(', ')}.`,
37
+ hint,
38
+ ENVELOPE_PREAMBLE,
228
39
  ]
229
40
  .filter(Boolean)
230
- .join('\n');
41
+ .join(' ');
231
42
  }
232
43
  //# sourceMappingURL=description-builders.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"description-builders.js","sourceRoot":"","sources":["../../../../nodes/Hudu/ai-tools/description-builders.ts"],"names":[],"mappings":";;AACA,4DAEC;AAoBD,8CAEC;AAED,kDAkCC;AAED,wDAgDC;AAED,wDA0CC;AAED,wDAeC;AAED,wDAeC;AAED,0DAuBC;AAwCD,0DAkDC;AA/SD,SAAgB,wBAAwB,CAAC,YAAoB;IAC3D,OAAO,oEAAoE,YAAY,8FAA8F,CAAC;AACxL,CAAC;AAED,MAAM,2BAA2B,GAA6B;IAC5D,SAAS,EAAE,CAAC,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,MAAM,CAAC;IACjD,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC;IAChC,eAAe,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC;IACnD,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,CAAC;IAC3C,YAAY,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY,CAAC;IACjD,SAAS,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,CAAC;IACvE,WAAW,EAAE,CAAC,aAAa,EAAE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E,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,mBAAmB,GAAG,MAAM,CAAC,uBAAuB;QACxD,CAAC,CAAC,4GAA4G;QAC9G,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO;QACL,GAAG,wBAAwB,CAAC,YAAY,CAAC,UAAU,aAAa,mBAAmB;QACnF,+dAA+d;QAC/d,qEAAqE;QACrE,GAAG,cAAc;QACjB,wGAAwG;QACxG,mBAAmB;KACpB;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"description-builders.js","sourceRoot":"","sources":["../../../../nodes/Hudu/ai-tools/description-builders.ts"],"names":[],"mappings":";;AAmDA,0DAqBC;AAnED,MAAM,cAAc,GAA2B;IAC7C,QAAQ,EACN,4MAA4M;IAC9M,SAAS,EACP,4GAA4G;IAC9G,OAAO,EACL,0GAA0G;IAC5G,QAAQ,EACN,sFAAsF;IACxF,UAAU,EACR,yFAAyF;IAC3F,eAAe,EACb,6HAA6H;IAC/H,SAAS,EACP,qHAAqH;IACvH,MAAM,EACJ,mHAAmH;IACrH,eAAe,EAAE,+CAA+C;IAChE,aAAa,EAAE,+CAA+C;IAC9D,aAAa,EAAE,2EAA2E;IAC1F,YAAY,EAAE,2DAA2D;IACzE,QAAQ,EAAE,+CAA+C;IACzD,KAAK,EAAE,+CAA+C;IACtD,UAAU,EAAE,+CAA+C;IAC3D,QAAQ,EAAE,2BAA2B;IACrC,MAAM,EAAE,+CAA+C;IACvD,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,wCAAwC;IACrD,MAAM,EAAE,4EAA4E;IACpF,aAAa,EACX,8GAA8G;CACjH,CAAC;AAEF,MAAM,iBAAiB,GACrB,qEAAqE,CAAC;AAYxE,SAAgB,uBAAuB,CACrC,aAAqB,EACrB,QAAgB,EAChB,UAAoB,EACpB,cAAuB,EACvB,MAA6C;;IAI7C,KAAK,cAAc,CAAC;IACpB,KAAK,MAAM,CAAC;IACZ,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,MAAA,cAAc,CAAC,QAAQ,CAAC,mCAAI,EAAE,CAAC;IAC5C,OAAO;QACL,eAAe,aAAa,WAAW;QACvC,eAAe,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QACvC,IAAI;QACJ,iBAAiB;KAClB;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const HELP_TOPICS: Record<string, Record<string, string>>;
2
+ export declare const HELP_ENABLED_RESOURCES: string[];
3
+ export declare function runHelp(resource: string, params: Record<string, unknown>): string;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HELP_ENABLED_RESOURCES = exports.HELP_TOPICS = void 0;
4
+ exports.runHelp = runHelp;
5
+ const error_formatter_1 = require("./error-formatter");
6
+ exports.HELP_TOPICS = {
7
+ articles: {
8
+ overview: "Hudu KB articles — full workflow.\n" +
9
+ "ID resolution: when you only have a title, call getAll with `name` (fuzzy, two-tier re-rank — full-substring boost +1000, then word-overlap; auto-fetches 100 candidates, returns top `limit`). For topic/content exploration call getAll with `search` (same re-rank but matches across title AND body). Both surface exact-title hits at position 0.\n" +
10
+ "Body content: stripped by default. Set include_content=true on get/getAll to include HTML.\n" +
11
+ "Photos: stripped by default. Set include_photos=true to include the `public_photos` array (slim shape: {numeric_id, url, file_name, size}).\n" +
12
+ "Filters on getAll: company_id, folder_id, slug (12-char short hash only — SEO suffix not queryable), draft, enable_sharing, updated_at_start/end range.\n" +
13
+ "Folder filtering: folder_id is not a native Hudu /articles query param. The executor pre-resolves the folder→owning company_id (one /folders GET) and injects company_id natively, then post-filters by folder_id. Global folders (company_id:null) fall back to a bounded scan (≤20 pages × 100 records).\n" +
14
+ "Truncation signal: result.truncated:true means more matches exist beyond the cap — narrow with company_id or search.\n" +
15
+ "Envelope v2 — 'error' key = failure; default-valued fields omitted from records (treat absent field as default).\n" +
16
+ "See also: topic=photos (verification dance), topic=search (ranking detail), topic=create (scope rules).",
17
+ photos: "Article photo verification workflow.\n" +
18
+ "Article HTML embeds images as `<a href=\"/public_photo/<slug>\">…</a>` links. The article get/getAll response with include_photos=true returns a `public_photos` array of slim metadata: {numeric_id, url, file_name, size}. The slug string is display-only — the Hudu API only accepts the integer numeric_id; it returns 404 for slug strings.\n" +
19
+ "BEFORE editing or redacting an article (with write-back): call hudu_public_photos get with each photo's numeric_id to verify the photo still exists upstream. This prevents your edits from breaking or removing references to photos that were deleted upstream.\n" +
20
+ "SKIP this verification when you are only reading, summarising, or quoting the article (no write-back).\n" +
21
+ "Photo records can NEVER carry binary image bytes through n8n's tool architecture — JSON-stringification at the executor boundary strips any binary payload. Use the `url` field (public, no auth required) to surface the image to a human; never attempt visual analysis from the tool result.",
22
+ search: "Search vs name on hudu_articles getAll.\n" +
23
+ "`name`: send a known full or partial title. The executor translates to upstream search, fetches up to 100 candidates, and re-ranks with the two-tier title scorer (full-substring boost +1000, then per-word overlap). Best when the LLM has a title in hand.\n" +
24
+ "`search`: send a topic phrase or content keyword. Same upstream call, same re-rank — but matches body text too. Use when the LLM is exploring rather than resolving a title to an ID.\n" +
25
+ "Ranking guarantees: exact-title matches surface at position 0 when the full query appears as a substring of the title. Word-overlap is the fallback tier.\n" +
26
+ "If you get unexpected zero results, check API key permissions or relax filters; the re-rank cannot synthesise records that the upstream did not return.",
27
+ create: "Hudu article create — scope rules.\n" +
28
+ "Provide ONE of (a) numeric company_id, (b) folder_id (company_id auto-resolved internally via /folders GET), (c) global=true for a non-company-scoped article.\n" +
29
+ "Precedence: global=true wins over company_id. folder_id is optional when global=true (article lands in a global folder).\n" +
30
+ "content accepts HTML or Markdown.\n" +
31
+ "Confirm field values with the user before executing when acting autonomously.\n" +
32
+ "Returns the created article including its numeric id (use for subsequent get/update/archive/delete).",
33
+ },
34
+ public_photos: {
35
+ overview: "Hudu public_photos — slim metadata only, never binary.\n" +
36
+ "Returns {numeric_id, url, file_name, size}. The slug `id` field returned by Hudu is dropped (display-only, not callable via the API). `record_type` and `record_id` are also dropped (caller already has the parent's context).\n" +
37
+ "n8n's tool architecture forcibly JSON-stringifies every tool result, so binary image bytes can NEVER reach the LLM through this call — by design.\n" +
38
+ "PRIMARY use: before editing or redacting an article (or company record) that contains embedded `/public_photo/<slug>` images, call hudu_public_photos get with each photo's numeric_id to verify the photo still exists upstream. This prevents your edits from breaking or removing references to photos that were already deleted.\n" +
39
+ "SECONDARY use: surface `url` (a publicly accessible absolute URL — no Hudu auth required) and `file_name`/`size` to the user so they can open the image in their browser.\n" +
40
+ "NOT useful for: visual analysis, OCR, image description. The tool cannot see image content. If the user asks what an image depicts, supply the URL and explain you can only link it.\n" +
41
+ "Pass the integer numeric_id from a prior article or company response's `public_photos` array. The API returns 404 for slug strings.",
42
+ },
43
+ companies: {
44
+ overview: "Hudu companies — full workflow.\n" +
45
+ "ID resolution: prefer operation=getIdByName (fuzzy partial match, returns id+name+key FKs only). getAll with `search` matches across name/city/phone/website but returns full records.\n" +
46
+ "Filters on getAll: search (partial), name (EXACT case-sensitive), slug, id_in_integration, city, state, phone_number, website, archived. `search` re-ranks within Hudu — local re-rank not applied.\n" +
47
+ "Create requires: name. Optional: company_type (Customer/Prospect/Vendor/Partner/Reseller/Internal), parent_company_id (resolve via getIdByName first), plus address/contact fields.\n" +
48
+ "Archive vs delete: archive preserves data and is restorable via unarchive; delete is permanent. Always prefer archive unless user explicitly requested deletion.\n" +
49
+ "Envelope v2 — `error` key = failure; default-valued fields (parent_company_id:null, archived:false, etc.) omitted from records.",
50
+ },
51
+ folders: {
52
+ overview: "Hudu folders — article and photo folders.\n" +
53
+ "Filters on getAll: name (EXACT case-sensitive — folders have no search), company_id, parent_folder_id, folder_type ('article' or 'photo').\n" +
54
+ "Folder records carry `company_id` — that's what powers hudu_articles' folder_id auto-narrowing (the executor looks up the folder once, injects its company_id as native upstream filter, drastically narrowing the bounded scan).\n" +
55
+ "Global folders: company_id is null. Articles in a global folder can't be narrowed by company — the scan runs unnarrowed (up to 20 pages × 100 records).\n" +
56
+ "Create requires: name. Optional: company_id (omit for global), parent_folder_id (nested), folder_type (default 'article', immutable after creation), description, icon.\n" +
57
+ "ID resolution: operation=getIdByName (EXACT case-sensitive match).\n" +
58
+ "Envelope v2 — `error` key = failure; default-valued fields omitted.",
59
+ },
60
+ websites: {
61
+ overview: "Hudu websites — monitored URLs.\n" +
62
+ "GOTCHA: the `name` field IS the URL (must include https:// or http://). It is NOT a display name. Hudu uses the URL itself as the identifier.\n" +
63
+ "Filters on getAll: search (partial — matches URL and other fields), name (EXACT URL match), company_id, slug, archived.\n" +
64
+ "Monitoring flags: paused, disable_dns, disable_ssl, disable_whois, enable_dmarc_tracking, enable_dkim_tracking, enable_spf_tracking. monitor_type controls the type of monitoring.\n" +
65
+ "Create requires: name (URL with protocol), company_id. Optional: keyword (page-content monitor), notes, all the disable_*/enable_* flags.\n" +
66
+ "ID resolution: operation=getIdByName (fuzzy partial match).\n" +
67
+ "Envelope v2 — `error` key = failure; default-valued fields (keyword:null, headers:null, paused:false, archived:false, etc.) omitted.",
68
+ },
69
+ procedures: {
70
+ overview: "Hudu procedures — processes (templates) AND runs (active instances).\n" +
71
+ "Type filter: `type=process` returns templates, `type=run` returns active instances, `type=all` returns both (default).\n" +
72
+ "Process scope: process_scope filter narrows processes by global/company.\n" +
73
+ "Read responses expose nested tasks under `tasks` (renamed on read from Hudu's Rails-style `procedure_tasks_attributes` write-key). Each task carries an `assignee:{id,name,initials}` block ONLY when a user is assigned; legacy `*_user_*` keys are stripped.\n" +
74
+ "Filters on getAll: name (EXACT match, case-insensitive — no fuzzy search), company_id, slug, type, process_scope, parent_process_id (filter runs by their parent process), created_at (date or range), archived.\n" +
75
+ "Create requires: name. Optional: company_id (omit for global template), description.\n" +
76
+ "Update of `archived` only affects company processes — global processes and runs follow their parent.\n" +
77
+ "ID resolution: operation=getIdByName (EXACT case-sensitive match).\n" +
78
+ "Envelope v2 — `error` key = failure; default-valued fields (parent_procedure:null, paused:false, archived:false) omitted.",
79
+ },
80
+ procedure_tasks: {
81
+ overview: "Hudu procedure tasks — individual task records within a procedure run.\n" +
82
+ "Filters on getAll: procedure_id (filter by parent process or run ID), name (EXACT match — no fuzzy search), company_id.\n" +
83
+ "Each task record carries `assignee:{id,name,initials}` ONLY when a user is assigned. When unassigned, the field is absent — do NOT assume null means 'unassigned-but-acknowledged'. Legacy `*_user_*` keys and `assigned_users:[]` / `subtask_ids:[]` are stripped from the response (use the rename map: first_assigned_user_* → assignee.*).\n" +
84
+ "Read-only at the AI Tools layer (no create/update/delete/archive operations exposed). Tasks are created and modified through their parent procedure.\n" +
85
+ "To enumerate tasks for a procedure, call hudu_procedures get with the procedure id — the response carries `tasks` inline. hudu_procedure_tasks getAll is for cross-procedure filtering (e.g. by name across all runs for a company).\n" +
86
+ "Envelope v2 — `error` key = failure; default-valued fields (completed:false, description:null, due_date:null) omitted.",
87
+ },
88
+ relations: {
89
+ overview: "Hudu relations — typed links between two records (fromable/toable pair).\n" +
90
+ "Data model: each relation has a `from` end (`fromable_type` + `fromable_id`) and a `to` end (`toable_type` + `toable_id`). Both ends must be valid Hudu resource types from RESOURCE_TYPES (e.g. 'Article', 'Asset', 'AssetPassword', 'Company', 'Folder', 'IPAddress', 'Network', 'Procedure', 'Vlan', 'Website'). The `is_inverse` flag distinguishes the canonical direction.\n" +
91
+ "Filters on getAll: id, fromable_id, fromable_type, toable_id, toable_type. All applied client-side via post-process filter (Hudu /relations has no native filter params) — combine specific ID+type pairs to keep the result bounded.\n" +
92
+ "GOTCHA: type field names are `fromable_type` / `toable_type` (NOT `froable_*` — easy typo).\n" +
93
+ "Create requires all four: fromable_id, fromable_type, toable_id, toable_type. Optional: is_inverse, description.\n" +
94
+ "When an asset is moved between companies via hudu_assets move, relations pointing to the original asset are NOT auto-rewritten — re-establish them using hudu_relations create after the move.\n" +
95
+ "Envelope v2 — `error` key = failure.",
96
+ },
97
+ };
98
+ exports.HELP_ENABLED_RESOURCES = Object.keys(exports.HELP_TOPICS);
99
+ function runHelp(resource, params) {
100
+ var _a;
101
+ const topics = exports.HELP_TOPICS[resource];
102
+ if (!topics) {
103
+ return JSON.stringify((0, error_formatter_1.wrapError)(resource, 'help', error_formatter_1.ERROR_TYPES.UNKNOWN_RESOURCE, `help is not registered for resource: ${resource}.`, `Resources with help topics: ${exports.HELP_ENABLED_RESOURCES.join(', ')}.`));
104
+ }
105
+ const requestedTopic = (_a = params.topic) !== null && _a !== void 0 ? _a : 'overview';
106
+ const content = topics[requestedTopic];
107
+ if (!content) {
108
+ return JSON.stringify((0, error_formatter_1.wrapError)(resource, 'help', error_formatter_1.ERROR_TYPES.VALIDATION_ERROR, `Unknown help topic '${requestedTopic}' for ${resource}.`, `Available topics: ${Object.keys(topics).join(', ')}.`));
109
+ }
110
+ return JSON.stringify((0, error_formatter_1.wrapSuccess)(resource, 'help', {
111
+ topic: requestedTopic,
112
+ availableTopics: Object.keys(topics),
113
+ content,
114
+ }));
115
+ }
116
+ //# sourceMappingURL=help-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-registry.js","sourceRoot":"","sources":["../../../../nodes/Hudu/ai-tools/help-registry.ts"],"names":[],"mappings":";;;AAkHA,0BAiCC;AAnJD,uDAAwE;AAO3D,QAAA,WAAW,GAA2C;IACjE,QAAQ,EAAE;QACR,QAAQ,EACN,qCAAqC;YACrC,0VAA0V;YAC1V,8FAA8F;YAC9F,+IAA+I;YAC/I,2JAA2J;YAC3J,8SAA8S;YAC9S,wHAAwH;YACxH,oHAAoH;YACpH,yGAAyG;QAC3G,MAAM,EACJ,wCAAwC;YACxC,qVAAqV;YACrV,qQAAqQ;YACrQ,0GAA0G;YAC1G,iSAAiS;QACnS,MAAM,EACJ,2CA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AAE/D,SAAgB,OAAO,CAAC,QAAgB,EAAE,MAA+B;;IACvE,MAAM,MAAM,GAAG,mBAAW,CAAC,QAAQ,CAAC,CAAC;IACrC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC,SAAS,CACnB,IAAA,2BAAS,EACP,QAAQ,EACR,MAAM,EACN,6BAAW,CAAC,gBAAgB,EAC5B,wCAAwC,QAAQ,GAAG,EACnD,+BAA+B,8BAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACpE,CACF,CAAC;IACJ,CAAC;IACD,MAAM,cAAc,GAAG,MAAC,MAAM,CAAC,KAA4B,mCAAI,UAAU,CAAC;IAC1E,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC,SAAS,CACnB,IAAA,2BAAS,EACP,QAAQ,EACR,MAAM,EACN,6BAAW,CAAC,gBAAgB,EAC5B,uBAAuB,cAAc,SAAS,QAAQ,GAAG,EACzD,qBAAqB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACvD,CACF,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CACnB,IAAA,6BAAW,EAAC,QAAQ,EAAE,MAAM,EAAE;QAC5B,KAAK,EAAE,cAAc;QACrB,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACpC,OAAO;KACR,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- export type HuduOperation = 'get' | 'getAll' | 'create' | 'update' | 'delete' | 'archive' | 'unarchive' | 'getIdByName' | 'move' | 'getByLayout';
1
+ export type HuduOperation = 'get' | 'getAll' | 'create' | 'update' | 'delete' | 'archive' | 'unarchive' | 'getIdByName' | 'move' | 'getByLayout' | 'help';
2
2
  export interface HuduResourceConfig {
3
3
  endpoint: string;
4
4
  pluralKey: string | null;
@@ -7,7 +7,7 @@ exports.HUDU_RESOURCE_CONFIG = {
7
7
  pluralKey: 'companies',
8
8
  singularKey: 'company',
9
9
  bodyKey: 'company',
10
- ops: ['get', 'getAll', 'create', 'update', 'delete', 'archive', 'unarchive', 'getIdByName'],
10
+ ops: ['get', 'getAll', 'create', 'update', 'delete', 'archive', 'unarchive', 'getIdByName', 'help'],
11
11
  supportsPagination: true,
12
12
  label: 'Company',
13
13
  },
@@ -16,7 +16,7 @@ exports.HUDU_RESOURCE_CONFIG = {
16
16
  pluralKey: 'articles',
17
17
  singularKey: 'article',
18
18
  bodyKey: 'article',
19
- ops: ['get', 'getAll', 'create', 'update', 'delete', 'archive', 'unarchive'],
19
+ ops: ['get', 'getAll', 'create', 'update', 'delete', 'archive', 'unarchive', 'help'],
20
20
  supportsPagination: true,
21
21
  label: 'Article',
22
22
  supportsContentField: true,
@@ -38,7 +38,7 @@ exports.HUDU_RESOURCE_CONFIG = {
38
38
  pluralKey: 'websites',
39
39
  singularKey: 'website',
40
40
  bodyKey: 'website',
41
- ops: ['get', 'getAll', 'create', 'update', 'delete', 'getIdByName'],
41
+ ops: ['get', 'getAll', 'create', 'update', 'delete', 'getIdByName', 'help'],
42
42
  supportsPagination: true,
43
43
  label: 'Website',
44
44
  },
@@ -65,7 +65,7 @@ exports.HUDU_RESOURCE_CONFIG = {
65
65
  pluralKey: 'procedures',
66
66
  singularKey: 'procedure',
67
67
  bodyKey: null,
68
- ops: ['get', 'getAll', 'create', 'update', 'delete', 'archive', 'unarchive', 'getIdByName'],
68
+ ops: ['get', 'getAll', 'create', 'update', 'delete', 'archive', 'unarchive', 'getIdByName', 'help'],
69
69
  supportsPagination: true,
70
70
  label: 'Procedure',
71
71
  },
@@ -83,7 +83,7 @@ exports.HUDU_RESOURCE_CONFIG = {
83
83
  pluralKey: 'folders',
84
84
  singularKey: 'folder',
85
85
  bodyKey: 'folder',
86
- ops: ['get', 'getAll', 'create', 'update', 'delete', 'getIdByName'],
86
+ ops: ['get', 'getAll', 'create', 'update', 'delete', 'getIdByName', 'help'],
87
87
  supportsPagination: true,
88
88
  label: 'Folder',
89
89
  },
@@ -101,7 +101,7 @@ exports.HUDU_RESOURCE_CONFIG = {
101
101
  pluralKey: 'public_photos',
102
102
  singularKey: null,
103
103
  bodyKey: null,
104
- ops: ['get'],
104
+ ops: ['get', 'help'],
105
105
  supportsPagination: true,
106
106
  label: 'Public Photo',
107
107
  },
@@ -110,7 +110,7 @@ exports.HUDU_RESOURCE_CONFIG = {
110
110
  pluralKey: 'procedure_tasks',
111
111
  singularKey: 'procedure_task',
112
112
  bodyKey: null,
113
- ops: ['get', 'getAll'],
113
+ ops: ['get', 'getAll', 'help'],
114
114
  supportsPagination: false,
115
115
  label: 'Procedure Task',
116
116
  },
@@ -146,7 +146,7 @@ exports.HUDU_RESOURCE_CONFIG = {
146
146
  pluralKey: 'relations',
147
147
  singularKey: 'relation',
148
148
  bodyKey: 'relation',
149
- ops: ['getAll', 'create', 'delete'],
149
+ ops: ['getAll', 'create', 'delete', 'help'],
150
150
  supportsPagination: true,
151
151
  label: 'Relation',
152
152
  },