@itentialopensource/adapter-servicenow 2.3.0 → 2.4.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 (44) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +169 -0
  4. package/CHANGELOG.md +48 -42
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +88 -74
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +225 -502
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +349 -58
  14. package/adapterBase.js +1022 -246
  15. package/entities/.generic/action.json +110 -5
  16. package/entities/.generic/schema.json +6 -1
  17. package/entities/.system/action.json +3 -2
  18. package/error.json +12 -0
  19. package/package.json +20 -13
  20. package/pronghorn.json +642 -378
  21. package/propertiesDecorators.json +14 -0
  22. package/propertiesSchema.json +436 -0
  23. package/refs?service=git-upload-pack +0 -0
  24. package/report/adapterInfo.json +10 -0
  25. package/report/updateReport1653406010548.json +120 -0
  26. package/sampleProperties.json +94 -2
  27. package/storage/metrics.json +2205 -0
  28. package/test/integration/adapterTestBasicGet.js +2 -2
  29. package/test/integration/adapterTestIntegration.js +29 -103
  30. package/test/unit/adapterBaseTestUnit.js +35 -27
  31. package/test/unit/adapterTestUnit.js +641 -113
  32. package/utils/adapterInfo.js +206 -0
  33. package/utils/addAuth.js +94 -0
  34. package/utils/basicGet.js +1 -14
  35. package/utils/entitiesToDB.js +179 -0
  36. package/utils/modify.js +1 -1
  37. package/utils/packModificationScript.js +1 -1
  38. package/utils/patches2bundledDeps.js +90 -0
  39. package/utils/pre-commit.sh +3 -0
  40. package/utils/removeHooks.js +20 -0
  41. package/utils/tbScript.js +43 -22
  42. package/utils/tbUtils.js +126 -29
  43. package/utils/testRunner.js +16 -16
  44. package/utils/troubleshootingAdapter.js +2 -26
@@ -8,7 +8,8 @@
8
8
  "version": "",
9
9
  "cache_location": "none",
10
10
  "encode_pathvars": true,
11
- "save_metric": true,
11
+ "encode_queryvars": true,
12
+ "save_metric": false,
12
13
  "stub": true,
13
14
  "protocol": "https",
14
15
  "authentication": {
@@ -21,7 +22,10 @@
21
22
  "invalid_token_error": 401,
22
23
  "auth_field": "header.headers.Authorization",
23
24
  "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
24
- "auth_logging": false
25
+ "auth_logging": false,
26
+ "client_id": "",
27
+ "client_secret": "",
28
+ "grant_type": ""
25
29
  },
26
30
  "healthcheck": {
27
31
  "type": "startup",
@@ -95,6 +99,94 @@
95
99
  "key_file": "",
96
100
  "cert_file": ""
97
101
  }
102
+ },
103
+ "devicebroker": {
104
+ "getDevice": [
105
+ {
106
+ "path": "/get/devices/{id}",
107
+ "method": "GET",
108
+ "query": {},
109
+ "body": {},
110
+ "headers": {},
111
+ "handleFailure": "ignore",
112
+ "requestFields": {
113
+ "id": "name"
114
+ },
115
+ "responseDatakey": "",
116
+ "responseFields": {
117
+ "name": "host",
118
+ "ostype": "os",
119
+ "ostypePrefix": "system-",
120
+ "ipaddress": "attributes.ipaddr",
121
+ "port": "443"
122
+ }
123
+ }
124
+ ],
125
+ "getDevicesFiltered": [
126
+ {
127
+ "path": "/get/devices",
128
+ "method": "GET",
129
+ "query": {},
130
+ "body": {},
131
+ "headers": {},
132
+ "handleFailure": "ignore",
133
+ "requestFields": {},
134
+ "responseDatakey": "",
135
+ "responseFields": {
136
+ "name": "host",
137
+ "ostype": "os",
138
+ "ostypePrefix": "system-",
139
+ "ipaddress": "attributes.ipaddr",
140
+ "port": "443"
141
+ }
142
+ }
143
+ ],
144
+ "isAlive": [
145
+ {
146
+ "path": "/get/devices/{id}/status",
147
+ "method": "GET",
148
+ "query": {},
149
+ "body": {},
150
+ "headers": {},
151
+ "handleFailure": "ignore",
152
+ "requestFields": {
153
+ "id": "name"
154
+ },
155
+ "responseDatakey": "",
156
+ "responseFields": {
157
+ "status": "status",
158
+ "statusValue": "online"
159
+ }
160
+ }
161
+ ],
162
+ "getConfig": [
163
+ {
164
+ "path": "/get/devices/{id}/configPart1",
165
+ "method": "GET",
166
+ "query": {},
167
+ "body": {},
168
+ "headers": {},
169
+ "handleFailure": "ignore",
170
+ "requestFields": {
171
+ "id": "name"
172
+ },
173
+ "responseDatakey": "",
174
+ "responseFields": {}
175
+ }
176
+ ],
177
+ "getCount": [
178
+ {
179
+ "path": "/get/devices",
180
+ "method": "GET",
181
+ "query": {},
182
+ "body": {},
183
+ "headers": {},
184
+ "handleFailure": "ignore",
185
+ "requestFields": {},
186
+ "responseDatakey": "",
187
+ "responseFields": {}
188
+ }
189
+ ]
98
190
  }
99
191
  },
100
192
  "groups": [],