@itentialopensource/adapter-servicenow 2.4.5 → 2.5.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 (39) hide show
  1. package/AUTH.md +11 -14
  2. package/CHANGELOG.md +8 -0
  3. package/CONTRIBUTING.md +1 -160
  4. package/ENHANCE.md +2 -2
  5. package/README.md +23 -18
  6. package/SYSTEMINFO.md +9 -6
  7. package/adapter.js +161 -333
  8. package/adapterBase.js +465 -898
  9. package/changelogs/changelog.md +175 -0
  10. package/metadata.json +20 -52
  11. package/package.json +24 -24
  12. package/pronghorn.json +934 -595
  13. package/propertiesSchema.json +358 -31
  14. package/refs?service=git-upload-pack +0 -0
  15. package/report/adapterInfo.json +8 -8
  16. package/report/updateReport1691172645870.json +120 -0
  17. package/sampleProperties.json +51 -2
  18. package/test/integration/adapterTestBasicGet.js +2 -4
  19. package/test/integration/adapterTestConnectivity.js +91 -42
  20. package/test/integration/adapterTestIntegration.js +130 -2
  21. package/test/unit/adapterBaseTestUnit.js +388 -313
  22. package/test/unit/adapterTestUnit.js +342 -122
  23. package/utils/adapterInfo.js +1 -1
  24. package/utils/addAuth.js +1 -1
  25. package/utils/artifactize.js +1 -1
  26. package/utils/checkMigrate.js +1 -1
  27. package/utils/entitiesToDB.js +2 -2
  28. package/utils/findPath.js +1 -1
  29. package/utils/methodDocumentor.js +225 -0
  30. package/utils/modify.js +13 -15
  31. package/utils/packModificationScript.js +1 -1
  32. package/utils/pre-commit.sh +2 -0
  33. package/utils/taskMover.js +309 -0
  34. package/utils/tbScript.js +89 -34
  35. package/utils/tbUtils.js +41 -21
  36. package/utils/testRunner.js +1 -1
  37. package/utils/troubleshootingAdapter.js +9 -6
  38. package/workflows/README.md +0 -3
  39. package/workflows/ServiceNow - get change, get attachment, create change.json +0 -1
@@ -0,0 +1,175 @@
1
+
2
+ ## 2.4.5 [08-03-2023]
3
+
4
+ * More metadata changes
5
+
6
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!21
7
+
8
+ ---
9
+
10
+ ## 2.4.4 [07-12-2023]
11
+
12
+ * fix meta comma
13
+
14
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!20
15
+
16
+ ---
17
+
18
+ ## 2.4.3 [07-10-2023]
19
+
20
+ * Patch/prototype metadata
21
+
22
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!19
23
+
24
+ ---
25
+
26
+ ## 2.4.2 [04-04-2023]
27
+
28
+ * Utils version has been updated in package.json, and the changes are being migrated to the adapter
29
+
30
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!17
31
+
32
+ ---
33
+
34
+ ## 2.4.1 [11-23-2022]
35
+
36
+ * Changes to System Info Markdown
37
+
38
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!16
39
+
40
+ ---
41
+
42
+ ## 2.4.0 [05-25-2022]
43
+
44
+ * Migration to the latest Adapter Foundation
45
+
46
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!13
47
+
48
+ ---
49
+
50
+ ## 2.3.0 [03-10-2021]
51
+
52
+ - Added calls for Updating a Normal Change Request, Setting Risk Assessment for Change Request and Auto Approving a Change Request. Also needed to change how the data is sent on CreateNormalChangeRequest
53
+
54
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!12
55
+
56
+ ---
57
+
58
+ ## 2.2.2 [03-10-2021]
59
+
60
+ - Migration to bring up to the latest foundation
61
+ - Change to .eslintignore (adapter_modification directory)
62
+ - Change to README.md (new properties, new scripts, new processes)
63
+ - Changes to adapterBase.js (new methods)
64
+ - Changes to package.json (new scripts, dependencies)
65
+ - Changes to propertiesSchema.json (new properties and changes to existing)
66
+ - Changes to the Unit test
67
+ - Adding several test files, utils files and .generic entity
68
+ - Fix order of scripts and dependencies in package.json
69
+ - Fix order of properties in propertiesSchema.json
70
+ - Update sampleProperties, unit and integration tests to have all new properties.
71
+ - Add all new calls to adapter.js and pronghorn.json
72
+ - Add suspend piece to older methods
73
+
74
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!11
75
+
76
+ ---
77
+
78
+ ## 2.2.1 [07-10-2020]
79
+
80
+ - Update the adapter to the latest foundation
81
+
82
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!10
83
+
84
+ ---
85
+
86
+ ## 2.2.0 [04-15-2020]
87
+
88
+ - Added a task to query any table by name with sysparm_limit, sysparm_query and sysparm_fields
89
+
90
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!9
91
+
92
+ ---
93
+
94
+ ## 2.1.2 [01-16-2020]
95
+
96
+ - Update the adapter to the latest foundation
97
+
98
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!8
99
+
100
+ ---
101
+
102
+ ## 2.1.1 [01-16-2020]
103
+
104
+ - Fixes healthcheck not limiting responses to 1 item
105
+
106
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!7
107
+
108
+ ---
109
+
110
+ ## 2.1.0 [11-08-2019]
111
+
112
+ - Update the adapter to the latest adapter foundation.
113
+ - Updating to adapter-utils 4.24.3 (automatic)
114
+ - Add sample token schemas (manual)
115
+ - Adding placement property to getToken response schema (manual - before encrypt)
116
+ - Adding sso default into action.json for getToken (manual - before response object)
117
+ - Add new adapter properties for metrics & mock (save_metric, mongo and return_raw) (automatic - check place manual before stub)
118
+ - Update sample properties to include new properties (manual)
119
+ - Update integration test for raw mockdata (automatic)
120
+ - Update test properties (manual)
121
+ - Changes to artifactize (automatic)
122
+ - Update type in sampleProperties so it is correct for the adapter (manual)
123
+ - Update the readme (automatic)
124
+
125
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!6
126
+
127
+ ---
128
+
129
+ ## 2.0.0 [10-01-2019]
130
+
131
+ - Enhances many of the calls in the adapter (118 of 142 - integration tests now work while integrated to ServiceNow). There are still some calls (24) that require plugins and other things to exist so testing these is very difficult and will require even more time. There are also a couple of calls that have been tested but with data specific to a particular ServiceNow instance so they are likely to fail integrated with another ServiceNow instance.
132
+
133
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!5
134
+
135
+ ---
136
+
137
+ ## 1.0.0 [09-18-2019]
138
+
139
+ - Mimics current itential/adapter-servicenow calls. Adds Oauth token support in action schema's
140
+
141
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!4
142
+
143
+ ---
144
+
145
+ ## [09-06-2019] & 0.4.0 [08-21-2019] & 0.3.0 [07-30-2019] & 0.2.0 [07-17-2019]
146
+
147
+ - Migrate the adapter to the latest foundation, categorize and prepare it for app artifact
148
+
149
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!3
150
+
151
+ ---
152
+
153
+ ## 0.1.4 [06-13-2019]
154
+
155
+ - Added the missing param
156
+
157
+ See merge request itentialopensource/adapters/adapter-servicenow!2
158
+
159
+ ---
160
+
161
+ ## 0.1.3 [06-07-2019] & 0.1.2 [06-05-2019]
162
+
163
+ - Creates mock data from integration test data responses and fixes stub test
164
+
165
+ See merge request itentialopensource/adapters/adapter-servicenow!1
166
+
167
+ ---
168
+
169
+ ## 0.1.1 [05-29-2019]
170
+
171
+ - Initial Commit
172
+
173
+ See commit a4b075a
174
+
175
+ ---
package/metadata.json CHANGED
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "apiVersions": [
21
21
  "Istanbul",
22
- "Jakarta"
22
+ "Madrid"
23
23
  ],
24
24
  "iapVersions": [
25
25
  "2021.1.x",
@@ -58,50 +58,29 @@
58
58
  "webLink": "<TBD>"
59
59
  }
60
60
  },
61
+ "brokerSince": "",
61
62
  "documentation": {
62
63
  "storeLink": "",
63
64
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-servicenow",
64
65
  "repoLink": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-servicenow",
65
66
  "docLink": "https://docs.itential.com/opensource/docs/servicenow",
66
- "faqLink": "https://docs.itential.com/opensource/docs/servicenow",
67
+ "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
67
68
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
68
69
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
69
70
  "webLink": "https://www.itential.com/adapters/servicenow/",
70
71
  "vendorLink": "https://www.servicenow.com/",
71
- "productLink": "https://www.servicenow.comhttps://www.servicenow.com/products/itsm.html",
72
+ "productLink": "https://www.servicenow.com/products/itsm.html",
72
73
  "apiLinks": [
73
74
  "https://developer.servicenow.com/dev.do#!/learn/learning-plans/tokyo/new_to_servicenow/app_store_learnv2_scripting_tokyo_servicenow_apis"
74
75
  ]
75
76
  },
76
77
  "relatedItems": {
77
- "adapters": [
78
- {
79
- "name": "adapter-servicenow JUST EXAMPLE!!!!",
80
- "overview": "1 sentence about this thing",
81
- "versions": [
82
- "^0.9.0"
83
- ],
84
- "repoLink": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-servicenow",
85
- "docLink": "https://docs.itential.com/opensource/docs/servicenow",
86
- "webLink": "<TBD>"
87
- }
88
- ],
89
- "integrations": [
90
- {
91
- "name": "adapter-servicenow JUST EXAMPLE!!!!",
92
- "overview": "1 sentence about this thing",
93
- "versions": [
94
- "^0.9.0"
95
- ],
96
- "repoLink": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-servicenow",
97
- "docLink": "https://docs.itential.com/opensource/docs/servicenow",
98
- "webLink": "<TBD>"
99
- }
100
- ],
78
+ "adapters": [],
79
+ "integrations": [],
101
80
  "ecosystemApplications": [
102
81
  {
103
82
  "name": "Itential ServiceNow App",
104
- "overview": "1 sentence about this thing",
83
+ "overview": "Start automations in the Itential Platform from ServiceNow",
105
84
  "versions": [
106
85
  "^0.9.0"
107
86
  ],
@@ -113,57 +92,46 @@
113
92
  "automations": [
114
93
  {
115
94
  "name": "ServiceNow Create Change Request",
116
- "overview": "1 sentence about this thing",
95
+ "overview": "This pre-built integrates with the ServiceNow Open Source Adapter to create a Change Request in the change_request table in ServiceNow.",
117
96
  "versions": [
118
- "^0.9.0"
97
+ "^0.2.5"
119
98
  ],
120
99
  "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/servicenow-create-change-request",
121
100
  "docLink": "<TBD>",
122
- "webLink": "<TBD>"
101
+ "webLink": "https://www.itential.com/automations/servicenow-create-change-request/"
123
102
  },
124
103
  {
125
104
  "name": "ServiceNow Schedule Automation Using Change Request",
126
- "overview": "1 sentence about this thing",
105
+ "overview": "This pre-built integrates with the ServiceNow Open Source Adapter to schedule an automation via Automation Catalog at the start of the Planned start date.",
127
106
  "versions": [
128
- "^0.9.0"
107
+ "^0.2.5"
129
108
  ],
130
109
  "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/servicenow-schedule-automation-using-change-request",
131
110
  "docLink": "<TBD>",
132
- "webLink": "<TBD>"
111
+ "webLink": "https://www.itential.com/automations/servicenow-schedule-automation-using-change-request/"
133
112
  },
134
113
  {
135
114
  "name": "ServiceNow Incident Creation",
136
- "overview": "1 sentence about this thing",
115
+ "overview": "This Pre-Built integrates with the ServiceNow Open Source Adapter to create an incident in the incident table in ServiceNow.",
137
116
  "versions": [
138
- "^0.9.0"
117
+ "^0.0.21"
139
118
  ],
140
119
  "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/servicenow-incident-creation",
141
120
  "docLink": "<TBD>",
142
- "webLink": "<TBD>"
121
+ "webLink": "https://www.itential.com/automations/servicenow-incident-creation/"
143
122
  },
144
123
  {
145
124
  "name": "ServiceNow Create RITM",
146
- "overview": "1 sentence about this thing",
125
+ "overview": "This Pre-built integrates with the ServiceNow Open Source Adapter to create a Request and a Request Item (RITM) using the Service Catalog API.",
147
126
  "versions": [
148
- "^0.9.0"
127
+ "^0.2.6"
149
128
  ],
150
129
  "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/servicenow-create-ritm",
151
130
  "docLink": "<TBD>",
152
- "webLink": "<TBD>"
153
- }
154
- ],
155
- "transformations": [
156
- {
157
- "name": "Blah",
158
- "overview": "1 sentence about this thing",
159
- "versions": [
160
- "^0.9.0"
161
- ],
162
- "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/servicenow-create-change-request",
163
- "docLink": "<TBD>",
164
- "webLink": "<TBD>"
131
+ "webLink": "https://www.itential.com/automations/servicenow-create-ritm/"
165
132
  }
166
133
  ],
134
+ "transformations": [],
167
135
  "useCases": [
168
136
  {
169
137
  "name": "Create, update and complete change management requests",
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-servicenow",
3
- "version": "2.4.5",
3
+ "version": "2.5.0",
4
4
  "description": "This adapter integrates with system described as: servicenowMadrid.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "ServiceNow",
7
7
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.61.6",
8
+ "engineVersion": "1.67.0",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
12
- "preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
12
+ "preinstall": "node utils/setup.js",
13
+ "deinstall": "node utils/removeHooks.js",
13
14
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
14
15
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
15
16
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
@@ -23,7 +24,7 @@
23
24
  "adapter:migrate": "node utils/modify.js -m",
24
25
  "adapter:update": "node utils/modify.js -u",
25
26
  "adapter:revert": "node utils/modify.js -r",
26
- "troubleshoot": "node utils/tbScript.js",
27
+ "troubleshoot": "node utils/tbScript.js troubleshoot",
27
28
  "healthcheck": "node utils/tbScript.js healthcheck",
28
29
  "basicget": "node utils/tbScript.js basicget",
29
30
  "connectivity": "node utils/tbScript.js connectivity",
@@ -54,32 +55,31 @@
54
55
  "author": "Itential",
55
56
  "homepage": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-servicenow#readme",
56
57
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^4.48.10",
58
- "ajv": "^6.12.0",
59
- "axios": "^0.21.0",
60
- "commander": "^2.20.0",
61
- "fs-extra": "^8.1.0",
58
+ "@itentialopensource/adapter-utils": "^5.1.0",
59
+ "ajv": "^8.12.0",
60
+ "axios": "^1.4.0",
61
+ "commander": "^11.0.0",
62
+ "dns-lookup-promise": "^1.0.4",
63
+ "esprima": "^4.0.1",
64
+ "fs-extra": "^11.1.1",
62
65
  "json-query": "^2.2.2",
63
- "mocha": "^9.0.1",
66
+ "mocha": "^10.2.0",
64
67
  "mocha-param": "^2.0.1",
65
- "mongodb": "^4.1.0",
66
- "network-diagnostics": "^0.5.3",
68
+ "mongodb": "^4.16.0",
67
69
  "nyc": "^15.1.0",
70
+ "ping": "^0.4.4",
71
+ "prompts": "^2.4.2",
68
72
  "readline-sync": "^1.4.10",
69
- "semver": "^7.3.2",
70
- "winston": "^3.3.3"
73
+ "semver": "^7.5.3",
74
+ "winston": "^3.9.0"
71
75
  },
72
76
  "devDependencies": {
73
- "chai": "^4.3.4",
74
- "eslint": "^7.29.0",
75
- "eslint-config-airbnb-base": "^14.2.1",
76
- "eslint-plugin-import": "^2.23.4",
77
- "eslint-plugin-json": "^3.0.0",
78
- "package-json-validator": "^0.6.3",
79
- "testdouble": "^3.16.1"
80
- },
81
- "resolutions": {
82
- "minimist": "^1.2.5"
77
+ "chai": "^4.3.7",
78
+ "eslint": "^8.44.0",
79
+ "eslint-config-airbnb-base": "^15.0.0",
80
+ "eslint-plugin-import": "^2.27.5",
81
+ "eslint-plugin-json": "^3.1.0",
82
+ "testdouble": "^3.18.0"
83
83
  },
84
84
  "private": false
85
85
  }