@itentialopensource/adapter-servicenow 2.2.1 → 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 (52) hide show
  1. package/.eslintignore +1 -0
  2. package/AUTH.md +39 -0
  3. package/BROKER.md +199 -0
  4. package/CALLS.md +169 -0
  5. package/CHANGELOG.md +62 -40
  6. package/CODE_OF_CONDUCT.md +12 -17
  7. package/CONTRIBUTING.md +88 -74
  8. package/ENHANCE.md +69 -0
  9. package/PROPERTIES.md +641 -0
  10. package/README.md +228 -420
  11. package/SUMMARY.md +9 -0
  12. package/SYSTEMINFO.md +11 -0
  13. package/TROUBLESHOOT.md +47 -0
  14. package/adapter.js +1665 -52
  15. package/adapterBase.js +1270 -238
  16. package/entities/.generic/action.json +214 -0
  17. package/entities/.generic/schema.json +28 -0
  18. package/entities/.system/action.json +3 -2
  19. package/entities/ChangeManagement/action.json +63 -0
  20. package/entities/ChangeManagement/schema.json +4 -1
  21. package/error.json +12 -0
  22. package/package.json +45 -20
  23. package/pronghorn.json +767 -77
  24. package/propertiesDecorators.json +14 -0
  25. package/propertiesSchema.json +476 -8
  26. package/refs?service=git-upload-pack +0 -0
  27. package/report/adapterInfo.json +10 -0
  28. package/report/updateReport1615339875463.json +95 -0
  29. package/report/updateReport1653406010548.json +120 -0
  30. package/sampleProperties.json +102 -5
  31. package/storage/metrics.json +2205 -0
  32. package/test/integration/adapterTestBasicGet.js +85 -0
  33. package/test/integration/adapterTestConnectivity.js +93 -0
  34. package/test/integration/adapterTestIntegration.js +29 -98
  35. package/test/unit/adapterBaseTestUnit.js +949 -0
  36. package/test/unit/adapterTestUnit.js +780 -109
  37. package/utils/adapterInfo.js +206 -0
  38. package/utils/addAuth.js +94 -0
  39. package/utils/basicGet.js +50 -0
  40. package/utils/checkMigrate.js +63 -0
  41. package/utils/entitiesToDB.js +179 -0
  42. package/utils/findPath.js +74 -0
  43. package/utils/modify.js +154 -0
  44. package/utils/packModificationScript.js +1 -1
  45. package/utils/patches2bundledDeps.js +90 -0
  46. package/utils/pre-commit.sh +3 -0
  47. package/utils/removeHooks.js +20 -0
  48. package/utils/tbScript.js +184 -0
  49. package/utils/tbUtils.js +469 -0
  50. package/utils/testRunner.js +16 -16
  51. package/utils/troubleshootingAdapter.js +190 -0
  52. package/img/adapter.png +0 -0
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 2
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 29
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 14
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 7
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^4.45.4"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 70
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 338
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 642
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 6152
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 381
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 4101
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 144
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1783
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 12036
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 525
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -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": {
@@ -20,11 +21,16 @@
20
21
  "token_cache": "local",
21
22
  "invalid_token_error": 401,
22
23
  "auth_field": "header.headers.Authorization",
23
- "auth_field_format": "Basic {b64}{username}:{password}{/b64}"
24
+ "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
25
+ "auth_logging": false,
26
+ "client_id": "",
27
+ "client_secret": "",
28
+ "grant_type": ""
24
29
  },
25
30
  "healthcheck": {
26
31
  "type": "startup",
27
- "frequency": 300000
32
+ "frequency": 300000,
33
+ "query_object": {}
28
34
  },
29
35
  "throttle": {
30
36
  "throttle_enabled": false,
@@ -58,13 +64,16 @@
58
64
  },
59
65
  "healthcheck_on_timeout": false,
60
66
  "return_raw": false,
61
- "archiving": false
67
+ "archiving": false,
68
+ "return_request": false
62
69
  },
63
70
  "proxy": {
64
71
  "enabled": false,
65
72
  "host": "",
66
73
  "port": 1,
67
- "protocol": "http"
74
+ "protocol": "http",
75
+ "username": "",
76
+ "password": ""
68
77
  },
69
78
  "ssl": {
70
79
  "ecdhCurve": "",
@@ -90,6 +99,94 @@
90
99
  "key_file": "",
91
100
  "cert_file": ""
92
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
+ ]
93
190
  }
94
191
  },
95
192
  "groups": [],