@manyos/smileconnect-api 1.28.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.
Files changed (141) hide show
  1. package/.github/workflows/nodejs.yml +26 -0
  2. package/CHANGELOG.md +75 -0
  3. package/Dockerfile +21 -0
  4. package/README.md +1 -0
  5. package/app.js +316 -0
  6. package/conf/clients.json +2491 -0
  7. package/conf/mapping.json +1048 -0
  8. package/conf/scripts/p1.js +11 -0
  9. package/conf/scripts/p2.js +1 -0
  10. package/conf/scripts/p3.js +1 -0
  11. package/conf/scripts/p4.js +2 -0
  12. package/conf/scripts/script1.js +2 -0
  13. package/conf/scripts/script2.js +2 -0
  14. package/conf/scripts/script3.js +2 -0
  15. package/controller/cmdbobjectController.js +291 -0
  16. package/controller/eventLogController.js +78 -0
  17. package/controller/orgdataController.js +440 -0
  18. package/controller/relatedObjectsController.js +194 -0
  19. package/controller/scriptController.js +213 -0
  20. package/controller/taskController.js +368 -0
  21. package/controller/templateController.js +97 -0
  22. package/controller/ticketCIRelationController.js +522 -0
  23. package/controller/ticketController.js +329 -0
  24. package/controller/ticketWorkLogController.js +195 -0
  25. package/docs/.gitattributes +48 -0
  26. package/docs/404.html +13 -0
  27. package/docs/CNAME +1 -0
  28. package/docs/Gemfile +7 -0
  29. package/docs/Gemfile.lock +249 -0
  30. package/docs/_config.yml +257 -0
  31. package/docs/_data/SocialNetworks.yml +92 -0
  32. package/docs/_data/ui-text.yml +494 -0
  33. package/docs/_includes/disqus.html +17 -0
  34. package/docs/_includes/ext-css.html +7 -0
  35. package/docs/_includes/ext-js.html +7 -0
  36. package/docs/_includes/fb-comment.html +14 -0
  37. package/docs/_includes/footer-minimal.html +16 -0
  38. package/docs/_includes/footer-scripts.html +32 -0
  39. package/docs/_includes/footer.html +51 -0
  40. package/docs/_includes/google_analytics.html +14 -0
  41. package/docs/_includes/gtag.html +11 -0
  42. package/docs/_includes/gtm_body.html +6 -0
  43. package/docs/_includes/gtm_head.html +9 -0
  44. package/docs/_includes/head.html +131 -0
  45. package/docs/_includes/header.html +76 -0
  46. package/docs/_includes/just_comments.html +4 -0
  47. package/docs/_includes/matomo.html +17 -0
  48. package/docs/_includes/nav.html +57 -0
  49. package/docs/_includes/social-share.html +42 -0
  50. package/docs/_includes/staticman-comment.html +22 -0
  51. package/docs/_includes/staticman-comments.html +81 -0
  52. package/docs/_layouts/base.html +35 -0
  53. package/docs/_layouts/default.html +9 -0
  54. package/docs/_layouts/minimal.html +26 -0
  55. package/docs/_layouts/page.html +26 -0
  56. package/docs/_layouts/post.html +82 -0
  57. package/docs/_posts/2015-02-28-test-markdown.md +77 -0
  58. package/docs/aboutme.md +18 -0
  59. package/docs/css/bootstrap-social.css +147 -0
  60. package/docs/css/bootstrap-theme.css +476 -0
  61. package/docs/css/bootstrap-theme.css.map +1 -0
  62. package/docs/css/bootstrap-theme.min.css +5 -0
  63. package/docs/css/bootstrap.css +6566 -0
  64. package/docs/css/bootstrap.css.map +1 -0
  65. package/docs/css/bootstrap.min.css +5 -0
  66. package/docs/css/main-minimal.css +13 -0
  67. package/docs/css/main.css +788 -0
  68. package/docs/css/normalize.css +427 -0
  69. package/docs/css/pygment_highlights.css +61 -0
  70. package/docs/css/staticman.css +180 -0
  71. package/docs/eventlog/events.md +65 -0
  72. package/docs/feed.xml +24 -0
  73. package/docs/general/architecture.md +10 -0
  74. package/docs/general/config.md +192 -0
  75. package/docs/general/field-management.md +119 -0
  76. package/docs/general/release-notes.md +9 -0
  77. package/docs/getting-started.md +19 -0
  78. package/docs/howto/cmdbobjects.md +339 -0
  79. package/docs/howto/incident-worklogs.md +186 -0
  80. package/docs/howto/incidents.md +244 -0
  81. package/docs/howto/sample-config.md +518 -0
  82. package/docs/howto/token.md +71 -0
  83. package/docs/howto/worklog-attachment.md +113 -0
  84. package/docs/img/404-southpark.jpg +0 -0
  85. package/docs/img/architecture.jpeg +0 -0
  86. package/docs/img/attachment-upload.png +0 -0
  87. package/docs/img/avatar-icon.png +0 -0
  88. package/docs/img/bgimage.png +0 -0
  89. package/docs/img/gb-isapi.jpg +0 -0
  90. package/docs/img/install-steps.gif +0 -0
  91. package/docs/img/workflow.png +0 -0
  92. package/docs/index.md +41 -0
  93. package/docs/installation.md +123 -0
  94. package/docs/js/bootstrap.js +2306 -0
  95. package/docs/js/bootstrap.min.js +7 -0
  96. package/docs/js/jquery-1.11.2.min.js +4 -0
  97. package/docs/js/main.js +140 -0
  98. package/docs/js/staticman.js +54 -0
  99. package/docs/openapi.json +15097 -0
  100. package/docs/postinstall.md +169 -0
  101. package/docs/preinstall.md +19 -0
  102. package/docs/spec/index.html +24 -0
  103. package/docs/staticman.yml +110 -0
  104. package/docs/tags.html +34 -0
  105. package/docs/workflow.md +127 -0
  106. package/nodemon.json +3 -0
  107. package/package.json +46 -0
  108. package/routes/appConfigRoutes.js +352 -0
  109. package/routes/ciRelationRoutes.js +38 -0
  110. package/routes/cmdbObjectRoutes.js +154 -0
  111. package/routes/organisationRoutes.js +121 -0
  112. package/routes/peopleRelationRoutes.js +38 -0
  113. package/routes/personRoutes.js +131 -0
  114. package/routes/supportgroupRoutes.js +122 -0
  115. package/routes/taskRoutes.js +306 -0
  116. package/routes/templateRoutes.js +67 -0
  117. package/routes/ticketRoutes.js +181 -0
  118. package/routes/ticketWorkLogRoutes.js +185 -0
  119. package/screwdriver.yaml +52 -0
  120. package/test/appTest.js +3 -0
  121. package/test/changeTest.js +541 -0
  122. package/test/cmdbobjectTest.js +167 -0
  123. package/test/files/logo.png +0 -0
  124. package/test/incidentTest.js +539 -0
  125. package/test/orgdataTest.js +156 -0
  126. package/test/problemTest.js +512 -0
  127. package/test/templateTest.js +80 -0
  128. package/test/testUtils.js +21 -0
  129. package/test/workorderTest.js +544 -0
  130. package/util/arquery.js +416 -0
  131. package/util/auth.js +37 -0
  132. package/util/cache.service.js +52 -0
  133. package/util/config.js +361 -0
  134. package/util/constants.js +73 -0
  135. package/util/mappingUtil.js +96 -0
  136. package/util/paramHelper.js +43 -0
  137. package/util/relationUtil.js +63 -0
  138. package/util/responsehandler.js +92 -0
  139. package/util/schemas/clientConfigSchema.js +180 -0
  140. package/util/schemas/fieldMappingSchema.js +211 -0
  141. package/util/searchUtil.js +148 -0
@@ -0,0 +1,244 @@
1
+ ---
2
+ layout: page
3
+ title: Incident handling
4
+ subtitle: In this guide you will learn to do the basic operations with an incident.
5
+ use-site-title: true
6
+ gh-badge: [star, fork, follow]
7
+ gh-repo: daattali/beautiful-jekyll
8
+ ---
9
+
10
+ In this guide we model the full lifecylce of a simple inbound API that delivers Incidents into your system. First we'll create one. We will then read it again and later resolve it.
11
+
12
+ # Create an Incident
13
+
14
+ Let's assume we're an external system and we want to create incidents in the ITSM Suite.
15
+
16
+ ## Request Definition
17
+
18
+ To create an incident you need to do a POST to the /v1/incidents endpoint of your API
19
+
20
+ ### URL
21
+
22
+ *URL*: https://*api-fqdn*/v1/incidents
23
+
24
+ *api-fqdn*: The hostname of your API Server
25
+
26
+ ### Headers
27
+
28
+ *Content-Type*: application/json
29
+
30
+ ### Authorization
31
+
32
+ *Type*: Bearer
33
+
34
+ Use your [API Token](token.md)
35
+
36
+ ### Body
37
+
38
+ Provide all your needed incident data (see mapping -> new Incident) within the *data* attribute.
39
+
40
+ ### Sample Request
41
+
42
+ POST:https://*api-fqdn*/v1/incidents
43
+
44
+ {% highlight json linenos %}
45
+ {
46
+ "data": {
47
+ "summary": "New Incident",
48
+ "detailedDescription": "Here are the details"
49
+ }
50
+ }
51
+ {% endhighlight %}
52
+
53
+ ### Sample Response
54
+
55
+ {% highlight json linenos %}
56
+ {
57
+ "data": {
58
+ "id": "INC000000000217",
59
+ "opsCat1": null,
60
+ "opsCat2": null,
61
+ "opsCat3": null,
62
+ "resolutionCat1": null,
63
+ "resolutionCat2": null,
64
+ "resolutionCat3": null,
65
+ "prodCat1": null,
66
+ "prodCat2": null,
67
+ "prodCat3": null,
68
+ "productName": null,
69
+ "manufacturer": null,
70
+ "detailedDescription": "Here are the details",
71
+ "summary": "New Incident",
72
+ "statusReason": null,
73
+ "status": "Assigned",
74
+ "assignedGroup": "SGP000000000011",
75
+ "ownerGroup": "SGP000000000011",
76
+ "vendorGroup": null,
77
+ "customerId": "PPL000000000013",
78
+ "contactId": null,
79
+ "impact": "4-Minor/Localized",
80
+ "urgency": "4-Low",
81
+ "priority": "Low",
82
+ "vendorTicketId": null
83
+ },
84
+ "included": {
85
+ "persons": [
86
+ "PPL000000000013"
87
+ ],
88
+ "organisations": [],
89
+ "supportgroups": [
90
+ "SGP000000000011"
91
+ ]
92
+ }
93
+ }
94
+ {% endhighlight %}
95
+
96
+ # Read an Incident
97
+
98
+ We can query every incident we have access to with a simple get request.
99
+
100
+ ## Request Definition
101
+
102
+ To read an incident you need to do a GET request to the /v1/incidents/*incidentId* endpoint of your API
103
+
104
+ ### URL
105
+
106
+ *URL*: https://*api-fqdn*/v1/incidents/*incidentId*
107
+
108
+ *api-fqdn*: The hostname of your API Server
109
+
110
+ *incidentId*: The id of the incident you want to read.
111
+
112
+ ### Headers
113
+
114
+ *Content-Type*: application/json
115
+
116
+ ### Authorization
117
+
118
+ *Type*: Bearer
119
+
120
+ Use your [API Token](token.md)
121
+
122
+ ### Sample Response
123
+
124
+ GET:https://*api-fqdn*/v1/incidents/INC000000000217
125
+
126
+ {% highlight json linenos %}
127
+ {
128
+ "data": {
129
+ "id": "INC000000000217",
130
+ "opsCat1": null,
131
+ "opsCat2": null,
132
+ "opsCat3": null,
133
+ "resolutionCat1": null,
134
+ "resolutionCat2": null,
135
+ "resolutionCat3": null,
136
+ "prodCat1": null,
137
+ "prodCat2": null,
138
+ "prodCat3": null,
139
+ "productName": null,
140
+ "manufacturer": null,
141
+ "detailedDescription": "Here are the details",
142
+ "summary": "New Incident",
143
+ "statusReason": null,
144
+ "status": "Assigned",
145
+ "assignedGroup": "SGP000000000011",
146
+ "ownerGroup": "SGP000000000011",
147
+ "vendorGroup": null,
148
+ "customerId": "PPL000000000013",
149
+ "contactId": null,
150
+ "impact": "4-Minor/Localized",
151
+ "urgency": "4-Low",
152
+ "priority": "Low",
153
+ "vendorTicketId": null
154
+ },
155
+ "included": {
156
+ "persons": [
157
+ "PPL000000000013"
158
+ ],
159
+ "organisations": [],
160
+ "supportgroups": [
161
+ "SGP000000000011"
162
+ ]
163
+ }
164
+ }
165
+ {% endhighlight %}
166
+
167
+ # Update an Incident
168
+
169
+ You can update an Incident by sending a PUT request. Let's assume you want to resolve the incident that we created earlier. We need to set the status to "Resolved", provide a valid status reason and a Resolution.
170
+
171
+ ## Request Definition
172
+
173
+ To up an incident you need to do a PUT to the /v1/incidents/*incidentId* endpoint of your API
174
+
175
+ ### URL
176
+
177
+ *URL*: https://*api-fqdn*/v1/incidents/*incidentId*
178
+
179
+ *api-fqdn*: The hostname of your API Server
180
+
181
+ *incidentId*: Id of the incident that you want to update
182
+
183
+ ### Headers
184
+
185
+ *Content-Type*: application/json
186
+
187
+ ### Authorization
188
+
189
+ *Type*: Bearer
190
+
191
+ Use your [API Token](token.md)
192
+
193
+ ### Body
194
+
195
+ Provide all the attributes you want to update.
196
+
197
+ ### Sample Request
198
+
199
+ PUT:https://*api-fqdn*/v1/incidents/INC000000000217
200
+
201
+ {% highlight json linenos %}
202
+ {
203
+ "data": {
204
+ "status": "Resolved",
205
+ "statusReason" : "No Further Action Required",
206
+ "resolution": "Please restart your computer."
207
+ }
208
+ }
209
+ {% endhighlight %}
210
+
211
+ ### Sample Response
212
+
213
+ {% highlight json linenos %}
214
+ {
215
+ "data": {
216
+ "id": "INC000000000217",
217
+ "opsCat1": null,
218
+ "opsCat2": null,
219
+ "opsCat3": null,
220
+ "resolutionCat1": null,
221
+ "resolutionCat2": null,
222
+ "resolutionCat3": null,
223
+ "prodCat1": null,
224
+ "prodCat2": null,
225
+ "prodCat3": null,
226
+ "productName": null,
227
+ "manufacturer": null,
228
+ "detailedDescription": "Here are the details",
229
+ "summary": "New Incident",
230
+ "statusReason": "No Further Action Required",
231
+ "status": "Resolved",
232
+ "assignedGroup": "SGP000000000011",
233
+ "ownerGroup": "SGP000000000011",
234
+ "vendorGroup": null,
235
+ "customerId": "PPL000000000013",
236
+ "contactId": null,
237
+ "impact": "4-Minor/Localized",
238
+ "urgency": "4-Low",
239
+ "priority": "Low",
240
+ "vendorTicketId": null
241
+ },
242
+ "included": {}
243
+ }
244
+ {% endhighlight %}