@manyos/smileconnect-api 1.40.1 → 1.41.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 +2 -1
- package/conf/scripts/update.js +12 -0
- package/docs/adapter.md +51 -1
- package/docs/releases.md +5 -0
- package/package.json +1 -1
package/conf/clients.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const settings = {
|
|
2
|
+
"form":"Sample:Cities",
|
|
3
|
+
"id": "000000000000115",
|
|
4
|
+
"entry": {
|
|
5
|
+
"Airport Code": "MUC3",
|
|
6
|
+
"City": "Munich"
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//Create Service Request
|
|
10
|
+
const resultUpdate = await adapter.remedy.update(settings.form, settings.id, settings.entry);
|
|
11
|
+
|
|
12
|
+
resolve(resultUpdate);
|
package/docs/adapter.md
CHANGED
|
@@ -170,7 +170,57 @@ const settings = {
|
|
|
170
170
|
const resultCreate = await adapter.remedy.create(settings.createForm, settings.entry);
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
Will return return the id of the created record. e.g. REQ00000002893
|
|
173
|
+
Will return return the id of the created record. e.g. REQ00000002893 or throw an error.
|
|
174
|
+
|
|
175
|
+
#### Update
|
|
176
|
+
|
|
177
|
+
```javascript
|
|
178
|
+
async function update(form, id, entry, options)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Parameter:
|
|
182
|
+
|
|
183
|
+
* form (string):
|
|
184
|
+
|
|
185
|
+
The form in which a record is updated. e.g. CTM:People
|
|
186
|
+
|
|
187
|
+
* id (string):
|
|
188
|
+
|
|
189
|
+
The id of the entry that should be updated
|
|
190
|
+
|
|
191
|
+
* entry (object):
|
|
192
|
+
|
|
193
|
+
The entry object that is updated.
|
|
194
|
+
|
|
195
|
+
e.g.
|
|
196
|
+
|
|
197
|
+
```javascript
|
|
198
|
+
{
|
|
199
|
+
"Source Keyword": "SMILEcatalog",
|
|
200
|
+
"Company": "Calbro Services",
|
|
201
|
+
"AppRequestSummary": "New Request from SMILEcatalog",
|
|
202
|
+
"TitleInstanceID": "SRGAA5V0GEfds7LO5YL6Q945Z",
|
|
203
|
+
"Login ID": "Allen"
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Full example:
|
|
208
|
+
|
|
209
|
+
```javascript
|
|
210
|
+
const settings = {
|
|
211
|
+
"form":"Sample:Cities",
|
|
212
|
+
"id": "000000000000115",
|
|
213
|
+
"entry": {
|
|
214
|
+
"Airport Code": "MUC1",
|
|
215
|
+
"City": "Munich"
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
//Create Service Request
|
|
219
|
+
const resultUpdate = await adapter.remedy.update(settings.form, settings.id, settings.entry);
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Will return return the id of the updated record. e.g. 000000000000115 or throw an error.
|
|
223
|
+
|
|
174
224
|
|
|
175
225
|
#### Options
|
|
176
226
|
|
package/docs/releases.md
CHANGED