@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 +1 -1
- package/conf/scripts/script1.js +1 -2
- package/docs/adapter.md +60 -0
- package/docs/releases.md +3 -0
- package/package.json +2 -2
package/conf/clients.json
CHANGED
package/conf/scripts/script1.js
CHANGED
|
@@ -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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manyos/smileconnect-api",
|
|
3
|
-
"version": "1.
|
|
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.
|
|
41
|
+
"vm2": "^3.9.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"chai": "^4.3.4",
|