@manyos/smileconnect-api 1.50.0 → 1.51.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/conf/clients.json CHANGED
@@ -198,7 +198,7 @@
198
198
  "script2"
199
199
  ],
200
200
  "postMapping": [
201
- "script2"
201
+ "script1"
202
202
  ]
203
203
  },
204
204
  "POST": {
@@ -1,2 +1 @@
1
- //requestData.Name = "Horstdidü";
2
- resolve();
1
+ // requestData.Name = "Horstdidü";
package/docs/adapter.md CHANGED
@@ -221,6 +221,66 @@ const resultUpdate = await adapter.remedy.update(settings.form, settings.id, set
221
221
 
222
222
  Will return return the id of the updated record. e.g. 000000000000115 or throw an error.
223
223
 
224
+ ### getAttachment
225
+
226
+ ```javascript
227
+ async getAttachment(form, entryId, attachmentFieldId, options)
228
+ ```
229
+
230
+ Parameter:
231
+
232
+ * form (string):
233
+
234
+ The form used to where the attachmentField is on
235
+
236
+ * entryId (string):
237
+
238
+ The id of the record on which the attachment is on
239
+
240
+ * attachmentFieldId:
241
+
242
+ The id of the attachment field
243
+
244
+ Full example:
245
+ ```javascript
246
+ const file = adapter.remedy.getAttachment('CHG:WorkLog', 'CWL000000002484', '1000000353')
247
+ const fileName = file.name
248
+ const fileData = file.data
249
+ ```
250
+
251
+ ### setAttachment
252
+
253
+ ```javascript
254
+ async getAttachment(form, entryId, attachmentFieldId, file, options)
255
+ ```
256
+
257
+ Parameter:
258
+
259
+ * form (string):
260
+
261
+ The form used to where the attachmentField is on
262
+
263
+ * entryId (string):
264
+
265
+ The id of the record on which the attachment is on
266
+
267
+ * attachmentFieldId:
268
+
269
+ The id of the attachment field
270
+
271
+ * file
272
+
273
+ An Object containing the file
274
+
275
+ Full example:
276
+ ```javascript
277
+ const file = {
278
+ data: fs.readFileSync('test/files/logo.png'),
279
+ name: 'logo.png',
280
+ mimetype: 'image/png'
281
+ };
282
+ await adapter.remedy.setAttachment('CHG:WorkLog', 'CWL000000002484', '1000000353', file)
283
+ ```
224
284
 
225
285
  ### Options
226
286
 
package/docs/releases.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## API
4
4
 
5
+ ### 1.50.1 - 05.11.21
6
+ Add setAttachment & getAttachment to Remedy Adapter
7
+
5
8
  ### 1.50.0 - 05.11.21
6
9
  Use custom defined id in customForms
7
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.50.0",
3
+ "version": "1.51.0",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {
@@ -38,7 +38,7 @@
38
38
  "request-promise-native": "^1.0.9",
39
39
  "socket.io": "^2.4.1",
40
40
  "uuid": "^3.4.0",
41
- "vm2": "3.9.3"
41
+ "vm2": "^3.9.5"
42
42
  },
43
43
  "devDependencies": {
44
44
  "chai": "^4.3.4",