@manyos/smileconnect-api 1.36.0 → 1.36.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/conf/clients.json
CHANGED
package/conf/scripts/script2.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
requestData.Status = "Horstdi2";
|
|
2
2
|
resolve();
|
|
@@ -176,6 +176,15 @@ async function handleCMDBObjectResult(cmdbObject, mapping, clientConfig, include
|
|
|
176
176
|
if (deleteClassId === true) {
|
|
177
177
|
delete cmdbObject[CMDBOBJECT];
|
|
178
178
|
}
|
|
179
|
+
|
|
180
|
+
const scripts = clientConfig[CMDBOBJECT].scripts.GET;
|
|
181
|
+
//const fields = clientConfig[ticketConfig.requestType].fields
|
|
182
|
+
|
|
183
|
+
//run preScripts
|
|
184
|
+
if (scripts && scripts.preMapping) {
|
|
185
|
+
await scriptController.runScripts(scripts.preMapping, cmdbObject, clientConfig.clientId);
|
|
186
|
+
}
|
|
187
|
+
|
|
179
188
|
//Apply mapping
|
|
180
189
|
mapping.forEach(function (mappingEntry) {
|
|
181
190
|
try {
|
|
@@ -225,6 +234,11 @@ async function handleCMDBObjectResult(cmdbObject, mapping, clientConfig, include
|
|
|
225
234
|
|
|
226
235
|
relationUtil.getRelatedObjectList(cmdbObject, includeArray, globalRelationObjects);
|
|
227
236
|
|
|
237
|
+
//run preScripts
|
|
238
|
+
if (scripts && scripts.postMapping) {
|
|
239
|
+
await scriptController.runScripts(scripts.postMapping, cmdbObject, clientConfig.clientId);
|
|
240
|
+
}
|
|
241
|
+
|
|
228
242
|
return cmdbObject;
|
|
229
243
|
}
|
|
230
244
|
|