@manyos/smileconnect-api 1.53.2 → 1.54.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/app.js CHANGED
@@ -266,6 +266,14 @@ app.use(function (req, res, next) {
266
266
  req.globalScriptParams = {
267
267
  query: req.query
268
268
  }
269
+ // Für Scripte einen globalen parameter bereitstellen, der den org. Body enthält. Damit hat man auch noch in Post Scripten Zugriff auf customAttributes die beim Mapping entfernt werden.
270
+ if (req.body) {
271
+ try {
272
+ req.globalScriptParams.sourceData = JSON.parse(JSON.stringify(req.body))
273
+ } catch (e) {
274
+ log.warn('Could not parse body', e)
275
+ }
276
+ }
269
277
  next()
270
278
  });
271
279
 
@@ -1,3 +1,5 @@
1
+ reject(globalScriptParams)
2
+
1
3
  try {
2
4
  const settings = {
3
5
  "createForm":"HPD:IncidentInterface_Create",
package/docs/releases.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## API
4
4
 
5
+ ### 1.54.0 - 04.02.22
6
+ Add sourceData to globalScriptParams
7
+
5
8
  ### 1.53.2 - 03.02.22
6
9
  Fix issue: Remove error message on custom form mapping
7
10
 
@@ -149,6 +152,12 @@ The eventmanager will check all outbound webhooks for an event. If one fails, th
149
152
 
150
153
  ## GUI
151
154
 
155
+ ### 1.8.0 - 3.2.22
156
+ Fixed wrong Script Config for Custom Form Scripts (attribute clients instead of scripts)
157
+ Fixed Scrolling
158
+ Fixed navigation error from "Import/Export" to a client
159
+ Prepared GUI for open API
160
+
152
161
  ### 1.7.0 - 09.11.21
153
162
  Added Parameter REACT_APP_DISABLED_MODULES to disable Modules
154
163
 
package/docs/scripts.md CHANGED
@@ -115,6 +115,8 @@ Global script params are set by the application and handed over to the script. T
115
115
 
116
116
  **classId**: the classId of cmdbobjects. Only set in POST & PUT actions
117
117
 
118
+ **sourceData**: Contains the original body for PUT/POST request. This can be used scripts to access custom data that was removed during mapping.
119
+
118
120
  ```json
119
121
  {
120
122
  "query": {
@@ -122,6 +124,15 @@ Global script params are set by the application and handed over to the script. T
122
124
  "limit": "3",
123
125
  "include": "supportGroupRelations,persons"
124
126
  },
127
+ "sourceData": {
128
+ "data": {
129
+ "summary": "Short summary",
130
+ "notes": "Some details here",
131
+ },
132
+ "customData": {
133
+ "foo": "bar"
134
+ }
135
+ },
125
136
  "id": "INC000000001507"
126
137
  }
127
138
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.53.2",
3
+ "version": "1.54.0",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {