@manyos/smileconnect-api 1.39.1 → 1.40.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.
Files changed (105) hide show
  1. package/app.js +13 -0
  2. package/conf/clients.json +2 -1
  3. package/conf/scripts/p4.js +24 -1
  4. package/docs/.nojekyll +0 -0
  5. package/docs/README.md +1 -0
  6. package/docs/_coverpage.md +12 -0
  7. package/docs/_media/dataflow.png +0 -0
  8. package/docs/_media/gui_client_fields.png +0 -0
  9. package/docs/_media/gui_clients_scripts.png +0 -0
  10. package/docs/_media/gui_mapping_inc.png +0 -0
  11. package/docs/_media/gui_scripts_edit.png +0 -0
  12. package/docs/_media/gui_scripts_usage.png +0 -0
  13. package/docs/_media/gui_scripts_warning.png +0 -0
  14. package/docs/_media/logo.png +0 -0
  15. package/docs/_sidebar.md +25 -0
  16. package/docs/{configuration/adapter.md → adapter.md} +8 -16
  17. package/docs/architecture.md +8 -0
  18. package/docs/configuration/clients.md +589 -0
  19. package/docs/configuration/config.md +323 -0
  20. package/docs/{eventlog → configuration}/events.md +11 -8
  21. package/docs/configuration/mapping.md +60 -0
  22. package/docs/howto/{worklog-attachment.md → attachments.md} +8 -15
  23. package/docs/howto/cmdbobjects.md +11 -17
  24. package/docs/howto/incidents.md +16 -23
  25. package/docs/howto/token.md +14 -18
  26. package/docs/howto/{incident-worklogs.md → worklogs.md} +14 -21
  27. package/docs/index.html +27 -0
  28. package/docs/openapi.json +2054 -1354
  29. package/docs/quickstart.md +9 -0
  30. package/docs/releases.md +21 -0
  31. package/docs/scripts.md +272 -0
  32. package/package.json +1 -1
  33. package/docs/.gitattributes +0 -48
  34. package/docs/404.html +0 -13
  35. package/docs/Gemfile +0 -7
  36. package/docs/Gemfile.lock +0 -249
  37. package/docs/_config.yml +0 -259
  38. package/docs/_data/SocialNetworks.yml +0 -92
  39. package/docs/_data/ui-text.yml +0 -494
  40. package/docs/_includes/disqus.html +0 -17
  41. package/docs/_includes/ext-css.html +0 -7
  42. package/docs/_includes/ext-js.html +0 -7
  43. package/docs/_includes/fb-comment.html +0 -14
  44. package/docs/_includes/footer-minimal.html +0 -16
  45. package/docs/_includes/footer-scripts.html +0 -32
  46. package/docs/_includes/footer.html +0 -51
  47. package/docs/_includes/google_analytics.html +0 -14
  48. package/docs/_includes/gtag.html +0 -11
  49. package/docs/_includes/gtm_body.html +0 -6
  50. package/docs/_includes/gtm_head.html +0 -9
  51. package/docs/_includes/head.html +0 -131
  52. package/docs/_includes/header.html +0 -76
  53. package/docs/_includes/just_comments.html +0 -4
  54. package/docs/_includes/matomo.html +0 -17
  55. package/docs/_includes/nav.html +0 -57
  56. package/docs/_includes/social-share.html +0 -42
  57. package/docs/_includes/staticman-comment.html +0 -22
  58. package/docs/_includes/staticman-comments.html +0 -81
  59. package/docs/_layouts/base.html +0 -35
  60. package/docs/_layouts/default.html +0 -9
  61. package/docs/_layouts/minimal.html +0 -26
  62. package/docs/_layouts/page.html +0 -26
  63. package/docs/_layouts/post.html +0 -82
  64. package/docs/_posts/2015-02-28-test-markdown.md +0 -77
  65. package/docs/aboutme.md +0 -18
  66. package/docs/configuration/scripts.md +0 -207
  67. package/docs/css/bootstrap-social.css +0 -147
  68. package/docs/css/bootstrap-theme.css +0 -476
  69. package/docs/css/bootstrap-theme.css.map +0 -1
  70. package/docs/css/bootstrap-theme.min.css +0 -5
  71. package/docs/css/bootstrap.css +0 -6566
  72. package/docs/css/bootstrap.css.map +0 -1
  73. package/docs/css/bootstrap.min.css +0 -5
  74. package/docs/css/main-minimal.css +0 -13
  75. package/docs/css/main.css +0 -788
  76. package/docs/css/normalize.css +0 -427
  77. package/docs/css/pygment_highlights.css +0 -61
  78. package/docs/css/staticman.css +0 -180
  79. package/docs/feed.xml +0 -24
  80. package/docs/general/architecture.md +0 -10
  81. package/docs/general/config.md +0 -201
  82. package/docs/general/field-management.md +0 -119
  83. package/docs/general/release-notes.md +0 -9
  84. package/docs/howto/sample-config.md +0 -518
  85. package/docs/img/404-southpark.jpg +0 -0
  86. package/docs/img/avatar-icon.png +0 -0
  87. package/docs/img/bgimage.png +0 -0
  88. package/docs/img/gb-isapi.jpg +0 -0
  89. package/docs/img/install-steps.gif +0 -0
  90. package/docs/img/workflow.png +0 -0
  91. package/docs/js/bootstrap.js +0 -2306
  92. package/docs/js/bootstrap.min.js +0 -7
  93. package/docs/js/jquery-1.11.2.min.js +0 -4
  94. package/docs/js/main.js +0 -140
  95. package/docs/js/staticman.js +0 -54
  96. package/docs/staticman.yml +0 -110
  97. /package/docs/{img → _media}/architecture.jpeg +0 -0
  98. /package/docs/{img → _media}/attachment-upload.png +0 -0
  99. /package/docs/{getting-started.md → old/getting-started.md} +0 -0
  100. /package/docs/{index.md → old/index.md} +0 -0
  101. /package/docs/{installation.md → old/installation.md} +0 -0
  102. /package/docs/{postinstall.md → old/postinstall.md} +0 -0
  103. /package/docs/{preinstall.md → old/preinstall.md} +0 -0
  104. /package/docs/{tags.html → old/tags.html} +0 -0
  105. /package/docs/{workflow.md → old/workflow.md} +0 -0
package/app.js CHANGED
@@ -233,6 +233,19 @@ app.get('/debug', function (req, res, next) {
233
233
  //global authentication
234
234
  app.use(passport.authenticate('jwt', {session: false}), responseHandler.logRequest);
235
235
 
236
+ //Check for dynamic impersonate
237
+ app.use(function (req, res, next) {
238
+ if (req.user) {
239
+ const clientConfig = req.user.config;
240
+ const dynamicARUser = req.query.impersonateUser;
241
+ if (clientConfig && clientConfig.options && clientConfig.options.allowDynamicImpersonate === true && dynamicARUser) {
242
+ log.debug('Dynamic impersonate to user', dynamicARUser)
243
+ clientConfig.options.impersonateUser = dynamicARUser
244
+ }
245
+ }
246
+ next()
247
+ })
248
+
236
249
  //set globalscript params
237
250
  app.use(function (req, res, next) {
238
251
  req.globalScriptParams = {
package/conf/clients.json CHANGED
@@ -133,6 +133,7 @@
133
133
  "dateFormati": "dd.MM.yyyy HH:mm.ss",
134
134
  "clientLimit": 100000,
135
135
  "impersonateUser": "rhannemann",
136
+ "allowDynamicImpersonate": true,
136
137
  "translateSelectionFieldsX": false
137
138
  },
138
139
  "custom_Sample:Enrollments": {
@@ -403,7 +404,7 @@
403
404
  "checkGlobalParams"
404
405
  ],
405
406
  "postMapping": [
406
- "p2"
407
+ "p4"
407
408
  ],
408
409
  "afterExecution": [
409
410
  "script3"
@@ -1,2 +1,25 @@
1
- //requestData.horst="da"
1
+ try {
2
+ const settings = {
3
+ "createForm":"HPD:IncidentInterface_Create",
4
+ "entry": {
5
+ "Description": "incident01_new",
6
+ "Detailed_Decription": "new ticket creation 02_08_2021",
7
+ "Impact": "4-Minor/Localized",
8
+ "Urgency": "4-Low",
9
+ "Priority": "Low",
10
+ "Status": "Assigned",
11
+ "Service_Type": 0,
12
+ "Reported Source": 1000,
13
+ "Login_ID": "Allen"
14
+ }
15
+ };
16
+ //Create Request
17
+ const resultCreate = await adapter.remedy.create(settings.createForm, settings.entry);
18
+ } catch (e) {
19
+ log.debug(`>>> in FCT_TEST: ERROR: ` + e)
20
+ //console.log(requestData.token)
21
+ reject (e)
22
+ }
23
+
24
+
2
25
  resolve();
package/docs/.nojekyll ADDED
File without changes
package/docs/README.md ADDED
@@ -0,0 +1 @@
1
+ Our ITSM API creates a RESTful layer on-top of BMCs ITSM Suite. It allows you to expose all of your services with an easy and powerful REST-API. You can perform create, read and update operations on Incidents, Changes, Problems, Work Orders, Tasks and Assets. With no need for customization.
@@ -0,0 +1,12 @@
1
+ ![logo](_media/logo.png)
2
+
3
+ # SMILEconnect
4
+
5
+ > Learn all about manyos ITSM API on these pages
6
+
7
+ - The easy way to integrate providers
8
+ - Reduce efforts and license cost
9
+ - State of the art ITSM REST API
10
+
11
+ [manyos](https://manyos.it)
12
+ [Get Started](quickstart#Introduction)
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ - Getting started
2
+
3
+ - [Quick start](quickstart.md)
4
+ - [Architecture](architecture.md)
5
+ - [API Specification](https://smileconnect.manyosdocs.de/spec/index.html)
6
+
7
+ - Configuration
8
+
9
+ - [Global Settings](configuration/config.md)
10
+ - [Mapping](configuration/mapping.md)
11
+ - [Client Configuration](configuration/clients.md)
12
+ - [Events](configuration/events.md)
13
+
14
+ - Data manipulation
15
+
16
+ - [Scripts](scripts.md)
17
+ - [Adapter](adapter.md)
18
+
19
+ - How-Tos
20
+
21
+ - [Authentication](howto/token.md)
22
+ - [Incident Requests](howto/incidents.md)
23
+ - [Handle Worklogs](howto/worklogs.md)
24
+ - [Handle Attachments](howto/attachments.md)
25
+ - [Read Configuration Items](howto/cmdbobjects.md)
@@ -1,13 +1,4 @@
1
- ---
2
- layout: page
3
- title: Adapter
4
- subtitle: Talk to the outside world
5
- use-site-title: true
6
- bigimg: /img/gb-isapi.jpg
7
- toc: true
8
- ---
9
-
10
- # Introduction
1
+ # Adapter
11
2
 
12
3
  Adapter are used to integrate with different systems. SMILEconnect comes with a flexible adapter architecture. Multiple types of adapters can be used and also multiple adapters of the same type can be configured. This can be useful if you need to interact e.g. with two different LDAP Systems.
13
4
 
@@ -15,7 +6,7 @@ Adapter are used to integrate with different systems. SMILEconnect comes with a
15
6
 
16
7
  Adapter are configured in the file *adapterConfig.js* in the root of the conf folder. Within the configuration file the variable *env* can be used to access system environment variables. E.g. *env.AR_USER* reflects the value of the system variable *AR_USER*.
17
8
 
18
- For security, it is advised to store confidential information, like passwords, in the environment variables and not in the configuration file itself.
9
+ For security, it is advised to store confidential information, like passwords, in the environment variables and not in the configuration file itself.
19
10
 
20
11
  Configuration example:
21
12
  ```javascript
@@ -74,7 +65,7 @@ The Remedy Adapter is used to connect to BMC Remedy Action Request Servers. It a
74
65
 
75
66
  **rapiUri**: The URL of the RAPI Server wich is used as middleware to connect to the arsystem server. e.g. https://rapi.mydomain.com
76
67
 
77
- **cacheTime**: The default time in seconds in which the result of queries is stored in a cache. This is used to increase performance dramatically. Defaults to 300s.
68
+ **cacheTime**: The default time in seconds in which the result of queries is stored in a cache. This is used to increase performance dramatically. Defaults to 300s.
78
69
 
79
70
  **limitDefault**: The default limit of records retrieved in a query. This value is used whenever no value is specified. Can be overwritten in queries.
80
71
 
@@ -148,7 +139,7 @@ The form in which a new record is created. e.g. CTM:People
148
139
 
149
140
  * entry (object):
150
141
 
151
- The entry object that is ceated.
142
+ The entry object that is ceated.
152
143
 
153
144
  e.g.
154
145
 
@@ -157,7 +148,7 @@ e.g.
157
148
  "Source Keyword": "SMILEcatalog",
158
149
  "Company": "Calbro Services",
159
150
  "AppRequestSummary": "New Request from SMILEcatalog",
160
- "TitleInstanceID": "SRGAA5V0GEfds7LO5YL6Q945Z",
151
+ "TitleInstanceID": "SRGAA5V0GEfds7LO5YL6Q945Z",
161
152
  "Login ID": "Allen"
162
153
  }
163
154
  ```
@@ -207,6 +198,7 @@ e.g.
207
198
  }
208
199
  ```
209
200
 
201
+
210
202
  * countOnly (only search)
211
203
 
212
204
  Can be used to retrieve only the size of the results without any payload. This improves performance.
@@ -312,6 +304,6 @@ The SMILEconnect Adapter can be used to do calls against SMILEconnect. It will a
312
304
 
313
305
  ### Functions
314
306
 
315
- The SMILEconnect adapter is an open source project.
307
+ The SMILEconnect adapter is an open source project.
316
308
 
317
- [Visit the project homepage for details]https://github.com/manyosit/smileconnect-client
309
+ [Visit the project homepage for details](https://github.com/manyosit/smileconnect-client)
@@ -0,0 +1,8 @@
1
+ # Architecture
2
+
3
+ In this guide we will explain the different components of ISAPI and how you can use them.
4
+
5
+ ![architecure of smileconnect](_media/architecture.jpeg)
6
+
7
+
8
+ ![architecure of smileconnect](_media/dataflow.png)