n8n-nodes-hudu 1.3.5 → 1.4.1
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/README.md +28 -12
- package/dist/nodes/Hudu/Hudu.node.js +2 -18
- package/dist/nodes/Hudu/Hudu.node.js.map +1 -1
- package/dist/nodes/Hudu/Hudu.node.ts +2 -30
- package/dist/nodes/Hudu/descriptions/asset_layout_fields.description.js +38 -32
- package/dist/nodes/Hudu/descriptions/asset_layout_fields.description.js.map +1 -1
- package/dist/nodes/Hudu/descriptions/asset_layout_fields.description.ts +450 -446
- package/dist/nodes/Hudu/descriptions/asset_layouts.description.js +112 -18
- package/dist/nodes/Hudu/descriptions/asset_layouts.description.js.map +1 -1
- package/dist/nodes/Hudu/descriptions/asset_layouts.description.ts +112 -18
- package/dist/nodes/Hudu/descriptions/assets.description.js +100 -123
- package/dist/nodes/Hudu/descriptions/assets.description.js.map +1 -1
- package/dist/nodes/Hudu/descriptions/assets.description.ts +587 -609
- package/dist/nodes/Hudu/descriptions/index.js +0 -3
- package/dist/nodes/Hudu/descriptions/index.js.map +1 -1
- package/dist/nodes/Hudu/descriptions/index.ts +0 -3
- package/dist/nodes/Hudu/descriptions/resources.js +0 -12
- package/dist/nodes/Hudu/descriptions/resources.js.map +1 -1
- package/dist/nodes/Hudu/descriptions/resources.ts +0 -12
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/getAssetLayoutFields.js +122 -70
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/getAssetLayoutFields.js.map +1 -1
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/getAssetLayoutFields.ts +143 -107
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/index.js +0 -1
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/index.js.map +1 -1
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/index.ts +0 -1
- package/dist/nodes/Hudu/optionLoaders/assets/index.js +1 -2
- package/dist/nodes/Hudu/optionLoaders/assets/index.js.map +1 -1
- package/dist/nodes/Hudu/optionLoaders/assets/index.ts +1 -2
- package/dist/nodes/Hudu/resources/asset_layout_fields/asset_layout_fields.handler.js +32 -75
- package/dist/nodes/Hudu/resources/asset_layout_fields/asset_layout_fields.handler.js.map +1 -1
- package/dist/nodes/Hudu/resources/asset_layout_fields/asset_layout_fields.handler.ts +43 -139
- package/dist/nodes/Hudu/resources/asset_layouts/asset_layouts.handler.js +9 -11
- package/dist/nodes/Hudu/resources/asset_layouts/asset_layouts.handler.js.map +1 -1
- package/dist/nodes/Hudu/resources/asset_layouts/asset_layouts.handler.ts +12 -12
- package/dist/nodes/Hudu/resources/assets/assets.handler.js +116 -56
- package/dist/nodes/Hudu/resources/assets/assets.handler.js.map +1 -1
- package/dist/nodes/Hudu/resources/assets/assets.handler.ts +171 -60
- package/dist/nodes/Hudu/resources/assets/assets.types.ts +43 -43
- package/dist/nodes/Hudu/resources/index.js +0 -6
- package/dist/nodes/Hudu/resources/index.js.map +1 -1
- package/dist/nodes/Hudu/resources/index.ts +0 -12
- package/dist/nodes/Hudu/resources/procedures/procedures.handler.js +1 -3
- package/dist/nodes/Hudu/resources/procedures/procedures.handler.js.map +1 -1
- package/dist/nodes/Hudu/resources/procedures/procedures.handler.ts +1 -3
- package/dist/nodes/Hudu/utils/assetFieldUtils.js +273 -0
- package/dist/nodes/Hudu/utils/assetFieldUtils.js.map +1 -0
- package/dist/nodes/Hudu/utils/assetFieldUtils.ts +437 -0
- package/dist/nodes/Hudu/utils/constants.js +1 -0
- package/dist/nodes/Hudu/utils/constants.js.map +1 -1
- package/dist/nodes/Hudu/utils/constants.ts +1 -0
- package/dist/nodes/Hudu/utils/debugConfig.js +4 -1
- package/dist/nodes/Hudu/utils/debugConfig.js.map +1 -1
- package/dist/nodes/Hudu/utils/debugConfig.ts +6 -1
- package/dist/nodes/Hudu/utils/errorParser.js +57 -0
- package/dist/nodes/Hudu/utils/errorParser.js.map +1 -0
- package/dist/nodes/Hudu/utils/errorParser.ts +90 -0
- package/dist/nodes/Hudu/utils/fieldErrorUtils.js +17 -0
- package/dist/nodes/Hudu/utils/fieldErrorUtils.js.map +1 -0
- package/dist/nodes/Hudu/utils/fieldErrorUtils.ts +57 -0
- package/dist/nodes/Hudu/utils/fieldTypeUtils.js +145 -0
- package/dist/nodes/Hudu/utils/fieldTypeUtils.js.map +1 -0
- package/dist/nodes/Hudu/utils/fieldTypeUtils.ts +220 -0
- package/dist/nodes/Hudu/utils/index.js +3 -0
- package/dist/nodes/Hudu/utils/index.js.map +1 -1
- package/dist/nodes/Hudu/utils/index.ts +25 -19
- package/dist/nodes/Hudu/utils/requestUtils.js +71 -24
- package/dist/nodes/Hudu/utils/requestUtils.js.map +1 -1
- package/dist/nodes/Hudu/utils/requestUtils.ts +88 -26
- package/package.json +1 -1
- package/dist/nodes/Hudu/descriptions/HuduAssetCustomFieldDescription.js +0 -75
- package/dist/nodes/Hudu/descriptions/HuduAssetCustomFieldDescription.js.map +0 -1
- package/dist/nodes/Hudu/descriptions/HuduAssetCustomFieldDescription.ts +0 -73
- package/dist/nodes/Hudu/descriptions/HuduAssetLinkFieldDescription.js +0 -77
- package/dist/nodes/Hudu/descriptions/HuduAssetLinkFieldDescription.js.map +0 -1
- package/dist/nodes/Hudu/descriptions/HuduAssetLinkFieldDescription.ts +0 -75
- package/dist/nodes/Hudu/descriptions/HuduAssetStandardFieldDescription.js +0 -74
- package/dist/nodes/Hudu/descriptions/HuduAssetStandardFieldDescription.js.map +0 -1
- package/dist/nodes/Hudu/descriptions/HuduAssetStandardFieldDescription.ts +0 -72
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/getAssetLinkFields.js +0 -51
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/getAssetLinkFields.js.map +0 -1
- package/dist/nodes/Hudu/optionLoaders/asset_layouts/getAssetLinkFields.ts +0 -70
- package/dist/nodes/Hudu/optionLoaders/assets/getAssetCustomFields.js +0 -71
- package/dist/nodes/Hudu/optionLoaders/assets/getAssetCustomFields.js.map +0 -1
- package/dist/nodes/Hudu/optionLoaders/assets/getAssetCustomFields.ts +0 -80
- package/dist/nodes/Hudu/optionLoaders/assets/getLinkableAssets.js +0 -117
- package/dist/nodes/Hudu/optionLoaders/assets/getLinkableAssets.js.map +0 -1
- package/dist/nodes/Hudu/optionLoaders/assets/getLinkableAssets.ts +0 -147
- package/dist/nodes/Hudu/resources/assetCustomField/assetCustomField.handler.js +0 -222
- package/dist/nodes/Hudu/resources/assetCustomField/assetCustomField.handler.js.map +0 -1
- package/dist/nodes/Hudu/resources/assetCustomField/assetCustomField.handler.ts +0 -293
- package/dist/nodes/Hudu/resources/assetCustomField/assetCustomField.types.js +0 -3
- package/dist/nodes/Hudu/resources/assetCustomField/assetCustomField.types.js.map +0 -1
- package/dist/nodes/Hudu/resources/assetCustomField/assetCustomField.types.ts +0 -1
- package/dist/nodes/Hudu/resources/assetLinkField/assetLinkField.handler.js +0 -262
- package/dist/nodes/Hudu/resources/assetLinkField/assetLinkField.handler.js.map +0 -1
- package/dist/nodes/Hudu/resources/assetLinkField/assetLinkField.handler.ts +0 -363
- package/dist/nodes/Hudu/resources/assetLinkField/assetLinkField.types.js +0 -3
- package/dist/nodes/Hudu/resources/assetLinkField/assetLinkField.types.js.map +0 -1
- package/dist/nodes/Hudu/resources/assetLinkField/assetLinkField.types.ts +0 -1
- package/dist/nodes/Hudu/resources/assetStandardField/assetStandardField.handler.js +0 -93
- package/dist/nodes/Hudu/resources/assetStandardField/assetStandardField.handler.js.map +0 -1
- package/dist/nodes/Hudu/resources/assetStandardField/assetStandardField.handler.ts +0 -141
- package/dist/nodes/Hudu/resources/assetStandardField/assetStandardField.types.js +0 -3
- package/dist/nodes/Hudu/resources/assetStandardField/assetStandardField.types.js.map +0 -1
- package/dist/nodes/Hudu/resources/assetStandardField/assetStandardField.types.ts +0 -1
|
@@ -4,15 +4,24 @@ import type { IDateRange } from '../../utils';
|
|
|
4
4
|
import {
|
|
5
5
|
handleGetAllOperation,
|
|
6
6
|
handleCreateOperation,
|
|
7
|
-
handleUpdateOperation,
|
|
8
7
|
handleDeleteOperation,
|
|
9
8
|
handleArchiveOperation,
|
|
9
|
+
handleGetOperation,
|
|
10
10
|
} from '../../utils/operations';
|
|
11
11
|
import type { AssetsOperations } from './assets.types';
|
|
12
|
-
import { NodeOperationError } from 'n8n-workflow';
|
|
12
|
+
import { NodeOperationError, NodeApiError } from 'n8n-workflow';
|
|
13
13
|
import { debugLog } from '../../utils/debugConfig';
|
|
14
14
|
import { HUDU_API_CONSTANTS } from '../../utils/constants';
|
|
15
15
|
import { getCompanyIdForAsset } from '../../utils/operations/getCompanyIdForAsset';
|
|
16
|
+
import {
|
|
17
|
+
getAssetWithMetadata,
|
|
18
|
+
validateFieldForMapping,
|
|
19
|
+
transformFieldValueForUpdate,
|
|
20
|
+
updateAssetWithMappedFields,
|
|
21
|
+
} from '../../utils/assetFieldUtils';
|
|
22
|
+
import type { IAssetLayoutFieldEntity } from '../asset_layout_fields/asset_layout_fields.types';
|
|
23
|
+
import { isStandardField } from '../../utils/fieldTypeUtils';
|
|
24
|
+
import { parseHuduApiErrorWithContext } from '../../utils/errorParser';
|
|
16
25
|
|
|
17
26
|
export async function handleAssetsOperation(
|
|
18
27
|
this: IExecuteFunctions,
|
|
@@ -31,35 +40,101 @@ export async function handleAssetsOperation(
|
|
|
31
40
|
this.getNode(),
|
|
32
41
|
'Company ID'
|
|
33
42
|
);
|
|
34
|
-
const name = this.getNodeParameter('name', i) as string;
|
|
35
43
|
const layoutId = this.getNodeParameter('asset_layout_id', i) as number;
|
|
36
44
|
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
const primary_manufacturer = this.getNodeParameter('primary_manufacturer', i, '') as string;
|
|
40
|
-
const hostname = this.getNodeParameter('hostname', i, '') as string;
|
|
41
|
-
const notes = this.getNodeParameter('notes', i, '') as string;
|
|
45
|
+
const rawMappedFields = this.getNodeParameter('mappedFields', i, {}) as IDataObject;
|
|
46
|
+
let mappedFields: IDataObject;
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
if (rawMappedFields.value && typeof rawMappedFields.value === 'object' && rawMappedFields.value !== null) {
|
|
49
|
+
mappedFields = rawMappedFields.value as IDataObject;
|
|
50
|
+
} else {
|
|
51
|
+
mappedFields = { ...rawMappedFields };
|
|
52
|
+
delete mappedFields.mappingMode;
|
|
53
|
+
}
|
|
44
54
|
|
|
45
55
|
const body: IDataObject = {
|
|
46
|
-
name,
|
|
47
56
|
asset_layout_id: layoutId,
|
|
48
57
|
};
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
const customFields: IDataObject[] = [];
|
|
60
|
+
|
|
61
|
+
if (Object.keys(mappedFields).length === 0) {
|
|
62
|
+
throw new NodeOperationError(this.getNode(), 'No fields provided to create the asset. Please map at least the "Asset Name" field.', { itemIndex: i });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Fetch layout fields for validation of custom fields
|
|
66
|
+
const layoutResponse = await handleGetOperation.call(this, '/asset_layouts', String(layoutId)) as IDataObject;
|
|
67
|
+
|
|
68
|
+
const layout = layoutResponse.asset_layout as { fields: IAssetLayoutFieldEntity[] } | undefined;
|
|
69
|
+
|
|
70
|
+
if (!layout || !Array.isArray(layout.fields)) {
|
|
71
|
+
throw new NodeOperationError(this.getNode(), `Asset layout with ID '${layoutId}' not found or has no fields.`, { itemIndex: i });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Process each mapped field
|
|
75
|
+
for (const [fieldId, fieldValue] of Object.entries(mappedFields)) {
|
|
76
|
+
if (isStandardField(fieldId)) {
|
|
77
|
+
// It's a standard field, add it to the top-level body
|
|
78
|
+
body[fieldId] = fieldValue;
|
|
79
|
+
debugLog('[RESOURCE_PROCESSING] Mapped standard field', { fieldKey: fieldId, fieldValue });
|
|
80
|
+
} else {
|
|
81
|
+
// It's a custom field, validate and transform it
|
|
82
|
+
const fieldDef = validateFieldForMapping(
|
|
83
|
+
this,
|
|
84
|
+
layout.fields,
|
|
85
|
+
fieldId,
|
|
86
|
+
typeof fieldValue,
|
|
87
|
+
i
|
|
88
|
+
);
|
|
89
|
+
const transformedValue = transformFieldValueForUpdate(fieldValue, fieldDef.fieldType);
|
|
90
|
+
const customFieldObject = { [fieldDef.label]: transformedValue };
|
|
91
|
+
customFields.push(customFieldObject);
|
|
92
|
+
debugLog('[RESOURCE_PROCESSING] Mapped custom field', { fieldId, fieldLabel: fieldDef.label, field: customFieldObject });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (!body.name) {
|
|
97
|
+
throw new NodeOperationError(this.getNode(), 'The "Asset Name" field is required for asset creation.', { itemIndex: i });
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (customFields.length > 0) {
|
|
101
|
+
body.custom_fields = customFields;
|
|
102
|
+
}
|
|
55
103
|
|
|
56
104
|
debugLog('[API_REQUEST] Creating asset with body', body);
|
|
57
105
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
106
|
+
const requestBody = { asset: body };
|
|
107
|
+
debugLog('[API_REQUEST] Final request payload for asset creation', requestBody);
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
responseData = await handleCreateOperation.call(
|
|
111
|
+
this,
|
|
112
|
+
`/companies/${companyId}/assets`,
|
|
113
|
+
requestBody,
|
|
114
|
+
);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
debugLog('[API_ERROR] Caught error in assets handler', {
|
|
117
|
+
errorType: error.constructor.name,
|
|
118
|
+
isNodeApiError: error instanceof NodeApiError,
|
|
119
|
+
httpCode: (error as any).httpCode,
|
|
120
|
+
statusCode: (error as any).statusCode,
|
|
121
|
+
message: (error as any).message,
|
|
122
|
+
description: (error as any).description
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
if (error instanceof NodeApiError) {
|
|
126
|
+
// Apply error parsing to all API errors, not just 422s
|
|
127
|
+
const parsedErrorMessage = parseHuduApiErrorWithContext(error, 'asset creation');
|
|
128
|
+
debugLog('[API_ERROR] Parsed API error message', {
|
|
129
|
+
httpCode: error.httpCode,
|
|
130
|
+
original: error.message,
|
|
131
|
+
parsed: parsedErrorMessage
|
|
132
|
+
});
|
|
133
|
+
throw new NodeOperationError(this.getNode(), parsedErrorMessage, { itemIndex: i });
|
|
134
|
+
}
|
|
135
|
+
// Re-throw original error if it's not a NodeApiError
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
63
138
|
|
|
64
139
|
debugLog('[API_RESPONSE] Create asset response', responseData);
|
|
65
140
|
break;
|
|
@@ -92,24 +167,16 @@ export async function handleAssetsOperation(
|
|
|
92
167
|
case 'getAll': {
|
|
93
168
|
debugLog('[OPERATION_GET_ALL] Processing get all assets operation');
|
|
94
169
|
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
|
95
|
-
const
|
|
170
|
+
const companyId = this.getNodeParameter('company_id', i) as string;
|
|
171
|
+
const filters = this.getNodeParameter('filters', i, {}) as IDataObject;
|
|
96
172
|
const limit = this.getNodeParameter('limit', i, HUDU_API_CONSTANTS.PAGE_SIZE) as number;
|
|
97
173
|
|
|
98
|
-
debugLog('[RESOURCE_PARAMS] Get all assets parameters', { returnAll, filters, limit });
|
|
174
|
+
debugLog('[RESOURCE_PARAMS] Get all assets parameters', { returnAll, filters, limit, companyId });
|
|
175
|
+
|
|
176
|
+
const endpoint = companyId ? `/companies/${companyId}/assets` : '/assets';
|
|
99
177
|
|
|
100
178
|
const mappedFilters: IDataObject = { ...filters };
|
|
101
|
-
if (mappedFilters.company_id) {
|
|
102
|
-
mappedFilters.company_id = validateCompanyId(
|
|
103
|
-
mappedFilters.company_id as string,
|
|
104
|
-
this.getNode(),
|
|
105
|
-
'Company ID'
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
179
|
|
|
109
|
-
if (mappedFilters.filter_layout_id) {
|
|
110
|
-
mappedFilters.asset_layout_id = mappedFilters.filter_layout_id;
|
|
111
|
-
delete mappedFilters.filter_layout_id;
|
|
112
|
-
}
|
|
113
180
|
if (mappedFilters.hasOwnProperty('archived')) {
|
|
114
181
|
mappedFilters.archived = String(mappedFilters.archived).toLowerCase() === 'true';
|
|
115
182
|
}
|
|
@@ -135,7 +202,7 @@ export async function handleAssetsOperation(
|
|
|
135
202
|
|
|
136
203
|
responseData = await handleGetAllOperation.call(
|
|
137
204
|
this,
|
|
138
|
-
|
|
205
|
+
endpoint,
|
|
139
206
|
'assets',
|
|
140
207
|
qs,
|
|
141
208
|
returnAll,
|
|
@@ -149,35 +216,79 @@ export async function handleAssetsOperation(
|
|
|
149
216
|
case 'update': {
|
|
150
217
|
debugLog('[OPERATION_UPDATE] Processing update asset operation');
|
|
151
218
|
const assetId = this.getNodeParameter('assetId', i) as string;
|
|
152
|
-
|
|
153
|
-
const name = this.getNodeParameter('name', i, undefined) as string | undefined;
|
|
154
|
-
const primary_serial = this.getNodeParameter('primary_serial', i, undefined) as string | undefined;
|
|
155
|
-
const primary_model = this.getNodeParameter('primary_model', i, undefined) as string | undefined;
|
|
156
|
-
const primary_manufacturer = this.getNodeParameter('primary_manufacturer', i, undefined) as string | undefined;
|
|
157
|
-
const hostname = this.getNodeParameter('hostname', i, undefined) as string | undefined;
|
|
158
|
-
const notes = this.getNodeParameter('notes', i, undefined) as string | undefined;
|
|
159
|
-
|
|
160
|
-
const body: IDataObject = {};
|
|
161
|
-
if (name !== undefined) body.name = name;
|
|
162
|
-
if (primary_serial !== undefined) body.primary_serial = primary_serial;
|
|
163
|
-
if (primary_model !== undefined) body.primary_model = primary_model;
|
|
164
|
-
if (primary_manufacturer !== undefined) body.primary_manufacturer = primary_manufacturer;
|
|
165
|
-
if (hostname !== undefined) body.hostname = hostname;
|
|
166
|
-
if (notes !== undefined) body.notes = notes;
|
|
167
|
-
|
|
168
|
-
debugLog('[RESOURCE_PARAMS] Update asset parameters', { assetId, body });
|
|
169
|
-
|
|
170
|
-
if (Object.keys(body).length === 0) {
|
|
171
|
-
throw new NodeOperationError(this.getNode(), "No fields provided to update for asset.", { itemIndex: i });
|
|
172
|
-
}
|
|
173
219
|
|
|
174
|
-
|
|
220
|
+
// --- Enhanced Resource Mapper Logic Start ---
|
|
221
|
+
const rawMappedFieldsUpdate = this.getNodeParameter('mappedFields', i, undefined) as IDataObject | undefined;
|
|
222
|
+
|
|
223
|
+
if (rawMappedFieldsUpdate && Object.keys(rawMappedFieldsUpdate).length > 0) {
|
|
224
|
+
let mappedFields: IDataObject;
|
|
225
|
+
if (rawMappedFieldsUpdate.value && typeof rawMappedFieldsUpdate.value === 'object' && rawMappedFieldsUpdate.value !== null) {
|
|
226
|
+
mappedFields = rawMappedFieldsUpdate.value as IDataObject;
|
|
227
|
+
} else {
|
|
228
|
+
mappedFields = { ...rawMappedFieldsUpdate };
|
|
229
|
+
delete mappedFields.mappingMode;
|
|
230
|
+
}
|
|
175
231
|
|
|
176
|
-
|
|
232
|
+
debugLog('[RESOURCE_MAPPER] Using enhanced resource mapper for asset update', { assetId, mappedFields });
|
|
233
|
+
// Fetch asset context
|
|
234
|
+
const assetMeta = await getAssetWithMetadata(this, Number(assetId), i);
|
|
235
|
+
|
|
236
|
+
// Fetch layout fields for efficient validation
|
|
237
|
+
const layoutResponse = await handleGetOperation.call(this, '/asset_layouts', String(assetMeta.assetLayoutId)) as IDataObject;
|
|
238
|
+
const layout = layoutResponse.asset_layout as { fields: IAssetLayoutFieldEntity[] } | undefined;
|
|
177
239
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
240
|
+
if (!layout || !Array.isArray(layout.fields)) {
|
|
241
|
+
throw new NodeOperationError(this.getNode(), `Asset layout with ID '${assetMeta.assetLayoutId}' not found or has no fields.`, { itemIndex: i });
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const updatePayload: IDataObject = {};
|
|
245
|
+
const customUpdateFields: IDataObject[] = [];
|
|
246
|
+
|
|
247
|
+
for (const [fieldId, fieldValue] of Object.entries(mappedFields)) {
|
|
248
|
+
if (isStandardField(fieldId)) {
|
|
249
|
+
updatePayload[fieldId] = fieldValue;
|
|
250
|
+
} else {
|
|
251
|
+
try {
|
|
252
|
+
const fieldDef = validateFieldForMapping(
|
|
253
|
+
this,
|
|
254
|
+
layout.fields,
|
|
255
|
+
fieldId,
|
|
256
|
+
typeof fieldValue,
|
|
257
|
+
i
|
|
258
|
+
);
|
|
259
|
+
const transformedValue = transformFieldValueForUpdate(fieldValue, fieldDef.fieldType);
|
|
260
|
+
const customFieldObject = { [fieldDef.label]: transformedValue };
|
|
261
|
+
customUpdateFields.push(customFieldObject);
|
|
262
|
+
} catch (error) {
|
|
263
|
+
debugLog(`[RESOURCE_VALIDATION] Error validating field id '${fieldId}' for update.`, { error: (error as Error).message });
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (customUpdateFields.length > 0) {
|
|
269
|
+
updatePayload.custom_fields = customUpdateFields;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Always include name and asset_layout_id, but don't overwrite name if it was provided
|
|
273
|
+
if (assetMeta.name && !updatePayload.hasOwnProperty('name')) {
|
|
274
|
+
updatePayload.name = assetMeta.name;
|
|
275
|
+
}
|
|
276
|
+
updatePayload.asset_layout_id = assetMeta.assetLayoutId;
|
|
277
|
+
|
|
278
|
+
// Perform the update
|
|
279
|
+
responseData = await updateAssetWithMappedFields(
|
|
280
|
+
this,
|
|
281
|
+
assetMeta.assetId,
|
|
282
|
+
assetMeta.companyId,
|
|
283
|
+
updatePayload,
|
|
284
|
+
i
|
|
285
|
+
);
|
|
286
|
+
debugLog('[RESOURCE_MAPPER] Asset updated via resource mapper', responseData);
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// If we reach here, it means no mapped fields were provided, which is an error.
|
|
291
|
+
throw new NodeOperationError(this.getNode(), "The 'Asset Fields' parameter is required for the update operation. Please map at least one field to update.", { itemIndex: i });
|
|
181
292
|
}
|
|
182
293
|
|
|
183
294
|
case 'archive':
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type { IDataObject } from 'n8n-workflow';
|
|
2
|
-
|
|
3
|
-
interface IAssetField extends IDataObject {
|
|
4
|
-
id: number; // The identifier of the field
|
|
5
|
-
value: string; // The value stored in the field
|
|
6
|
-
label: string; // The label of the field
|
|
7
|
-
position: number; // The position of the field in the asset's layout
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface IAsset extends IDataObject {
|
|
11
|
-
id: number; // The unique identifier of the asset
|
|
12
|
-
company_id: number; // The identifier of the company to which the asset belongs
|
|
13
|
-
asset_layout_id: number; // The identifier of the asset layout associated with the asset
|
|
14
|
-
slug: string; // The URL slug used to identify the asset
|
|
15
|
-
name: string; // The name of the asset
|
|
16
|
-
primary_serial?: string; // The primary serial number of the asset (if available)
|
|
17
|
-
primary_mail?: string; // The primary email associated with the asset (if available)
|
|
18
|
-
primary_model?: string; // The primary model of the asset (if available)
|
|
19
|
-
primary_manufacturer?: string; // The primary manufacturer of the asset (if available)
|
|
20
|
-
company_name: string; // The name of the company to which the asset belongs
|
|
21
|
-
object_type: string; // The type of object the asset represents
|
|
22
|
-
asset_type: string; // The category of the asset
|
|
23
|
-
archived: boolean; // Indicates whether the asset is archived or not
|
|
24
|
-
url: string; // The URL of the asset page
|
|
25
|
-
created_at?: string; // The date and time when the asset was created (format: date-time)
|
|
26
|
-
updated_at?: string; // The date and time when the asset was last updated (format: date-time)
|
|
27
|
-
fields: IAssetField[]; // A list of fields associated with the asset
|
|
28
|
-
cards?: IDataObject[]; // A list of cards associated with the asset (if available)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface IAssetResponse extends IDataObject {
|
|
32
|
-
assets: IAsset[];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type AssetsOperations =
|
|
36
|
-
| 'create'
|
|
37
|
-
| 'get'
|
|
38
|
-
| 'getAll'
|
|
39
|
-
| 'update'
|
|
40
|
-
| 'delete'
|
|
41
|
-
| 'archive'
|
|
42
|
-
| 'unarchive'
|
|
43
|
-
| 'moveLayout';
|
|
1
|
+
import type { IDataObject } from 'n8n-workflow';
|
|
2
|
+
|
|
3
|
+
interface IAssetField extends IDataObject {
|
|
4
|
+
id: number; // The identifier of the field
|
|
5
|
+
value: string; // The value stored in the field
|
|
6
|
+
label: string; // The label of the field
|
|
7
|
+
position: number; // The position of the field in the asset's layout
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IAsset extends IDataObject {
|
|
11
|
+
id: number; // The unique identifier of the asset
|
|
12
|
+
company_id: number; // The identifier of the company to which the asset belongs
|
|
13
|
+
asset_layout_id: number; // The identifier of the asset layout associated with the asset
|
|
14
|
+
slug: string; // The URL slug used to identify the asset
|
|
15
|
+
name: string; // The name of the asset
|
|
16
|
+
primary_serial?: string; // The primary serial number of the asset (if available)
|
|
17
|
+
primary_mail?: string; // The primary email associated with the asset (if available)
|
|
18
|
+
primary_model?: string; // The primary model of the asset (if available)
|
|
19
|
+
primary_manufacturer?: string; // The primary manufacturer of the asset (if available)
|
|
20
|
+
company_name: string; // The name of the company to which the asset belongs
|
|
21
|
+
object_type: string; // The type of object the asset represents
|
|
22
|
+
asset_type: string; // The category of the asset
|
|
23
|
+
archived: boolean; // Indicates whether the asset is archived or not
|
|
24
|
+
url: string; // The URL of the asset page
|
|
25
|
+
created_at?: string; // The date and time when the asset was created (format: date-time)
|
|
26
|
+
updated_at?: string; // The date and time when the asset was last updated (format: date-time)
|
|
27
|
+
fields: IAssetField[]; // A list of fields associated with the asset
|
|
28
|
+
cards?: IDataObject[]; // A list of cards associated with the asset (if available)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface IAssetResponse extends IDataObject {
|
|
32
|
+
assets: IAsset[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type AssetsOperations =
|
|
36
|
+
| 'create'
|
|
37
|
+
| 'get'
|
|
38
|
+
| 'getAll'
|
|
39
|
+
| 'update'
|
|
40
|
+
| 'delete'
|
|
41
|
+
| 'archive'
|
|
42
|
+
| 'unarchive'
|
|
43
|
+
| 'moveLayout';
|
|
@@ -72,10 +72,4 @@ __exportStar(require("./vlans/vlans.handler"), exports);
|
|
|
72
72
|
__exportStar(require("./vlans/vlans.types"), exports);
|
|
73
73
|
__exportStar(require("./vlan_zones/vlan_zones.handler"), exports);
|
|
74
74
|
__exportStar(require("./vlan_zones/vlan_zones.types"), exports);
|
|
75
|
-
__exportStar(require("./assetCustomField/assetCustomField.types"), exports);
|
|
76
|
-
__exportStar(require("./assetCustomField/assetCustomField.handler"), exports);
|
|
77
|
-
__exportStar(require("./assetLinkField/assetLinkField.types"), exports);
|
|
78
|
-
__exportStar(require("./assetLinkField/assetLinkField.handler"), exports);
|
|
79
|
-
__exportStar(require("./assetStandardField/assetStandardField.types"), exports);
|
|
80
|
-
__exportStar(require("./assetStandardField/assetStandardField.handler"), exports);
|
|
81
75
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/resources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,wEAAsD;AACtD,sEAAoD;AACpD,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,4DAA0C;AAC1C,wEAAsD;AACtD,sEAAoD;AACpD,oFAAkE;AAClE,kFAAgE;AAChE,4EAA0D;AAC1D,0EAAwD;AACxD,0DAAwC;AACxC,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC;AACpC,gEAA8C;AAC9C,8DAA4C;AAC5C,oEAAkD;AAClD,kEAAgD;AAChD,4DAA0C;AAC1C,0DAAwC;AACxC,sEAAoD;AACpD,oEAAkD;AAClD,sEAAoD;AACpD,oEAAkD;AAClD,kEAAgD;AAChD,gEAA8C;AAC9C,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,4DAA0C;AAC1C,8EAA4D;AAC5D,4EAA0D;AAC1D,kEAAgD;AAChD,gEAA8C;AAC9C,4EAA0D;AAC1D,0EAAwD;AACxD,wEAAsD;AACtD,sEAAoD;AACpD,wEAAsD;AACtD,sEAAoD;AACpD,kFAAgE;AAChE,gFAA8D;AAC9D,gEAA8C;AAC9C,8DAA4C;AAC5C,4DAA0C;AAC1C,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,8DAA4C;AAC5C,4DAA0C;AAC1C,wDAAsC;AACtC,sDAAoC;AACpC,wDAAsC;AACtC,sDAAoC;AACpC,kEAAgD;AAChD,gEAA8C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/resources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,wEAAsD;AACtD,sEAAoD;AACpD,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,4DAA0C;AAC1C,wEAAsD;AACtD,sEAAoD;AACpD,oFAAkE;AAClE,kFAAgE;AAChE,4EAA0D;AAC1D,0EAAwD;AACxD,0DAAwC;AACxC,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC;AACpC,gEAA8C;AAC9C,8DAA4C;AAC5C,oEAAkD;AAClD,kEAAgD;AAChD,4DAA0C;AAC1C,0DAAwC;AACxC,sEAAoD;AACpD,oEAAkD;AAClD,sEAAoD;AACpD,oEAAkD;AAClD,kEAAgD;AAChD,gEAA8C;AAC9C,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,4DAA0C;AAC1C,8EAA4D;AAC5D,4EAA0D;AAC1D,kEAAgD;AAChD,gEAA8C;AAC9C,4EAA0D;AAC1D,0EAAwD;AACxD,wEAAsD;AACtD,sEAAoD;AACpD,wEAAsD;AACtD,sEAAoD;AACpD,kFAAgE;AAChE,gFAA8D;AAC9D,gEAA8C;AAC9C,8DAA4C;AAC5C,4DAA0C;AAC1C,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,8DAA4C;AAC5C,4DAA0C;AAC1C,wDAAsC;AACtC,sDAAoC;AACpC,wDAAsC;AACtC,sDAAoC;AACpC,kEAAgD;AAChD,gEAA8C"}
|
|
@@ -57,15 +57,3 @@ export * from './vlans/vlans.handler';
|
|
|
57
57
|
export * from './vlans/vlans.types';
|
|
58
58
|
export * from './vlan_zones/vlan_zones.handler';
|
|
59
59
|
export * from './vlan_zones/vlan_zones.types';
|
|
60
|
-
|
|
61
|
-
// Asset Field Custom
|
|
62
|
-
export * from './assetCustomField/assetCustomField.types';
|
|
63
|
-
export * from './assetCustomField/assetCustomField.handler';
|
|
64
|
-
|
|
65
|
-
// Asset Link Field
|
|
66
|
-
export * from './assetLinkField/assetLinkField.types';
|
|
67
|
-
export * from './assetLinkField/assetLinkField.handler';
|
|
68
|
-
|
|
69
|
-
// Asset Standard Field
|
|
70
|
-
export * from './assetStandardField/assetStandardField.types';
|
|
71
|
-
export * from './assetStandardField/assetStandardField.handler';
|
|
@@ -62,9 +62,7 @@ async function handleProceduresOperation(operation, i) {
|
|
|
62
62
|
if (updateFields.company_id) {
|
|
63
63
|
updateFields.company_id = (0, index_1.validateCompanyId)(updateFields.company_id, this.getNode(), 'Company ID');
|
|
64
64
|
}
|
|
65
|
-
const body =
|
|
66
|
-
procedure: updateFields,
|
|
67
|
-
};
|
|
65
|
+
const body = updateFields;
|
|
68
66
|
responseData = await operations_1.handleUpdateOperation.call(this, resourceEndpoint, procedureId, body);
|
|
69
67
|
break;
|
|
70
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedures.handler.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/resources/procedures/procedures.handler.ts"],"names":[],"mappings":";;;AACA,6CAAwE;AACxE,uDAOgC;AAChC,kEAAoF;AAGpF,qDAA2D;AAEpD,KAAK,UAAU,yBAAyB,CAE7C,SAA+B,EAC/B,CAAS;IAET,MAAM,gBAAgB,GAA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
|
+
{"version":3,"file":"procedures.handler.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/resources/procedures/procedures.handler.ts"],"names":[],"mappings":";;;AACA,6CAAwE;AACxE,uDAOgC;AAChC,kEAAoF;AAGpF,qDAA2D;AAEpD,KAAK,UAAU,yBAAyB,CAE7C,SAA+B,EAC/B,CAAS;IAET,MAAM,gBAAgB,GAAG,aAAa,CAAC;IACvC,IAAI,YAAY,GAAgC,EAAE,CAAC;IAEnD,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ,CAAC,CAAC;YACb,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAW,CAAC;YACxD,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAgB,CAAC;YAGrF,IAAI,gBAAgB,CAAC,UAAU,EAAE;gBAC/B,gBAAgB,CAAC,UAAU,GAAG,IAAA,yBAAiB,EAC7C,gBAAgB,CAAC,UAAU,EAC3B,IAAI,CAAC,OAAO,EAAE,EACd,YAAY,CACb,CAAC;aACH;YAED,MAAM,IAAI,GAAgB;gBACxB,IAAI;gBACJ,GAAG,gBAAgB;aACpB,CAAC;YAEF,YAAY,GAAG,MAAM,kCAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7F,MAAM;SACP;QAED,KAAK,KAAK,CAAC,CAAC;YACV,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAW,CAAC;YAC7D,YAAY,GAAG,MAAM,+BAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC;YAClF,MAAM;SACP;QAED,KAAK,QAAQ,CAAC,CAAC;YACb,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAY,CAAC;YACnE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AM,4CAA+B,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;YAC/F,MAAM;SACP;KACF;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAnLD,8DAmLC"}
|
|
@@ -109,9 +109,7 @@ export async function handleProceduresOperation(
|
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const body: IDataObject =
|
|
113
|
-
procedure: updateFields,
|
|
114
|
-
};
|
|
112
|
+
const body: IDataObject = updateFields;
|
|
115
113
|
|
|
116
114
|
responseData = await handleUpdateOperation.call(this, resourceEndpoint, procedureId, body);
|
|
117
115
|
break;
|