@itentialopensource/adapter-salesforce 0.8.0 → 0.9.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 (45) hide show
  1. package/CALLS.md +285 -0
  2. package/CHANGELOG.md +16 -0
  3. package/CONTRIBUTING.md +1 -160
  4. package/ENHANCE.md +2 -2
  5. package/README.md +32 -23
  6. package/adapter.js +161 -333
  7. package/adapterBase.js +549 -879
  8. package/changelogs/changelog.md +94 -0
  9. package/entities/.system/action.json +4 -4
  10. package/entities/.system/schemaTokenReq.json +33 -4
  11. package/entities/.system/schemaTokenResp.json +1 -34
  12. package/metadata.json +49 -0
  13. package/package.json +24 -25
  14. package/pronghorn.json +470 -138
  15. package/propertiesSchema.json +431 -31
  16. package/refs?service=git-upload-pack +0 -0
  17. package/report/adapter-openapi.json +1543 -0
  18. package/report/adapter-openapi.yaml +1201 -0
  19. package/report/adapterInfo.json +8 -8
  20. package/report/updateReport1691511372644.json +120 -0
  21. package/report/updateReport1692202876451.json +120 -0
  22. package/report/updateReport1694464610053.json +120 -0
  23. package/report/updateReport1698421735618.json +120 -0
  24. package/sampleProperties.json +63 -2
  25. package/test/integration/adapterTestBasicGet.js +2 -4
  26. package/test/integration/adapterTestConnectivity.js +91 -42
  27. package/test/integration/adapterTestIntegration.js +130 -2
  28. package/test/unit/adapterBaseTestUnit.js +388 -313
  29. package/test/unit/adapterTestUnit.js +338 -112
  30. package/utils/adapterInfo.js +1 -1
  31. package/utils/addAuth.js +1 -1
  32. package/utils/artifactize.js +1 -1
  33. package/utils/checkMigrate.js +1 -1
  34. package/utils/entitiesToDB.js +2 -2
  35. package/utils/findPath.js +1 -1
  36. package/utils/methodDocumentor.js +273 -0
  37. package/utils/modify.js +13 -15
  38. package/utils/packModificationScript.js +1 -1
  39. package/utils/pre-commit.sh +2 -0
  40. package/utils/taskMover.js +309 -0
  41. package/utils/tbScript.js +89 -34
  42. package/utils/tbUtils.js +41 -21
  43. package/utils/testRunner.js +1 -1
  44. package/utils/troubleshootingAdapter.js +9 -6
  45. package/workflows/README.md +0 -3
@@ -0,0 +1,94 @@
1
+
2
+ ## 0.8.0 [05-25-2022]
3
+
4
+ * Migration to the latest Adapter Foundation
5
+
6
+ See merge request itentialopensource/adapters/itsm-testing/adapter-salesforce!8
7
+
8
+ ---
9
+
10
+ ## 0.7.4 [03-13-2021]
11
+
12
+ - Migration to bring up to the latest foundation
13
+ - Change to .eslintignore (adapter_modification directory)
14
+ - Change to README.md (new properties, new scripts, new processes)
15
+ - Changes to adapterBase.js (new methods)
16
+ - Changes to package.json (new scripts, dependencies)
17
+ - Changes to propertiesSchema.json (new properties and changes to existing)
18
+ - Changes to the Unit test
19
+ - Adding several test files, utils files and .generic entity
20
+ - Fix order of scripts and dependencies in package.json
21
+ - Fix order of properties in propertiesSchema.json
22
+ - Update sampleProperties, unit and integration tests to have all new properties.
23
+ - Add all new calls to adapter.js and pronghorn.json
24
+ - Add suspend piece to older methods
25
+
26
+ See merge request itentialopensource/adapters/itsm-testing/adapter-salesforce!7
27
+
28
+ ---
29
+
30
+ ## 0.7.3 [07-10-2020]
31
+
32
+ - Update the adapter to the latest foundation
33
+
34
+ See merge request itentialopensource/adapters/itsm-testing/adapter-salesforce!6
35
+
36
+ ---
37
+
38
+ ## 0.7.2 [01-14-2020]
39
+
40
+ - Update the adapter to the latest foundation
41
+
42
+ See merge request itentialopensource/adapters/itsm-testing/adapter-salesforce!5
43
+
44
+ ---
45
+
46
+ ## 0.7.1 [11-19-2019]
47
+
48
+ - Update the healthcheck url to one that has been used in the lab
49
+
50
+ See merge request itentialopensource/adapters/itsm-testing/adapter-salesforce!4
51
+
52
+ ---
53
+
54
+ ## 0.7.0 [11-08-2019]
55
+
56
+ - Update the adapter to the latest adapter foundation.
57
+ - Updating to adapter-utils 4.24.3 (automatic)
58
+ - Add sample token schemas (manual)
59
+ - Adding placement property to getToken response schema (manual - before encrypt)
60
+ - Adding sso default into action.json for getToken (manual - before response object)
61
+ - Add new adapter properties for metrics & mock (save_metric, mongo and return_raw) (automatic - check place manual before stub)
62
+ - Update sample properties to include new properties (manual)
63
+ - Update integration test for raw mockdata (automatic)
64
+ - Update test properties (manual)
65
+ - Changes to artifactize (automatic)
66
+ - Update type in sampleProperties so it is correct for the adapter (manual)
67
+ - Update the readme (automatic)
68
+
69
+ See merge request itentialopensource/adapters/itsm-testing/adapter-salesforce!3
70
+
71
+ ---
72
+
73
+ ## 0.6.0 [09-16-2019]
74
+
75
+ - Update the adapter to the latest adapter foundation
76
+
77
+ See merge request itentialopensource/adapters/itsm-testing/adapter-salesforce!2
78
+
79
+ ---
80
+ ## 0.5.0 [07-30-2019] & 0.4.0 [07-18-2019] & 0.3.0 [07-16-2019] & 0.2.0 [07-16-2019]
81
+
82
+ - Updates to the adapter foundation
83
+
84
+ See merge request itentialopensource/adapters/adapter-salesforce!1
85
+
86
+ ---
87
+
88
+ ## 0.1.1 [05-03-2019]
89
+
90
+ - Initial Commit
91
+
92
+ See commit e3e0165
93
+
94
+ ---
@@ -4,7 +4,7 @@
4
4
  "name": "getToken",
5
5
  "protocol": "REST",
6
6
  "method": "POST",
7
- "entitypath": "{base_path}/{version}/login",
7
+ "entitypath": "/services/oath2/token",
8
8
  "requestSchema": "schemaTokenReq.json",
9
9
  "responseSchema": "schemaTokenResp.json",
10
10
  "timeout": 0,
@@ -14,9 +14,9 @@
14
14
  "responseDatatype": "JSON",
15
15
  "headers": {},
16
16
  "sso": {
17
- "protocol": "",
18
- "host": "",
19
- "port": 0
17
+ "protocol": "https",
18
+ "host": "login.salesforce.com",
19
+ "port": 443
20
20
  },
21
21
  "responseObjects": [
22
22
  {
@@ -34,11 +34,40 @@
34
34
  "key": ""
35
35
  },
36
36
  "external_name": "password"
37
+ },
38
+ "client_id": {
39
+ "type": "string",
40
+ "description": "client id to log in with",
41
+ "parse": false,
42
+ "encode": false,
43
+ "encrypt": {
44
+ "type": "AES",
45
+ "key": ""
46
+ },
47
+ "external_name": "client_id"
48
+ },
49
+ "client_secret": {
50
+ "type": "string",
51
+ "description": "client secret to log in with",
52
+ "parse": false,
53
+ "encode": false,
54
+ "encrypt": {
55
+ "type": "AES",
56
+ "key": ""
57
+ },
58
+ "external_name": "client_secret"
59
+ },
60
+ "grant_type": {
61
+ "type": "string",
62
+ "description": "grant type to log in with",
63
+ "parse": false,
64
+ "encode": false,
65
+ "encrypt": {
66
+ "type": "AES",
67
+ "key": ""
68
+ },
69
+ "external_name": "grant_type"
37
70
  }
38
71
  },
39
- "required": [
40
- "username",
41
- "password"
42
- ],
43
72
  "definitions": {}
44
73
  }
@@ -13,28 +13,6 @@
13
13
  ],
14
14
  "external_name": "ph_request_type"
15
15
  },
16
- "code": {
17
- "type": "number",
18
- "description": "the https/http code",
19
- "parse": false,
20
- "encode": false,
21
- "encrypt": {
22
- "type": "AES",
23
- "key": ""
24
- },
25
- "external_name": "code"
26
- },
27
- "success": {
28
- "type": "boolean",
29
- "description": "the api execution",
30
- "parse": false,
31
- "encode": false,
32
- "encrypt": {
33
- "type": "AES",
34
- "key": ""
35
- },
36
- "external_name": "success"
37
- },
38
16
  "token": {
39
17
  "type": "string",
40
18
  "description": "the token returned from system",
@@ -44,18 +22,7 @@
44
22
  "type": "AES",
45
23
  "key": ""
46
24
  },
47
- "external_name": "data.token"
48
- },
49
- "expires": {
50
- "type": "string",
51
- "description": "the command being run on the device",
52
- "parse": false,
53
- "encode": false,
54
- "encrypt": {
55
- "type": "AES",
56
- "key": ""
57
- },
58
- "external_name": "data.expires"
25
+ "external_name": "access_token"
59
26
  }
60
27
  },
61
28
  "definitions": {}
package/metadata.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "adapter-salesforce",
3
+ "webName": "Adapter for Integration to Salesforce",
4
+ "vendor": "Salesforce",
5
+ "product": "Salesforce",
6
+ "osVersion": [],
7
+ "apiVersions": [],
8
+ "iapVersions": [
9
+ "2021.1.x",
10
+ "2021.2.x",
11
+ "2022.1.x",
12
+ "2023.1.x"
13
+ ],
14
+ "method": "REST",
15
+ "type": "Adapter",
16
+ "domains": [
17
+ "ITSM (Service Management)"
18
+ ],
19
+ "tags": [],
20
+ "useCases": [],
21
+ "deprecated": {
22
+ "isDeprecated": false
23
+ },
24
+ "brokerSince": "",
25
+ "documentation": {
26
+ "storeLink": "",
27
+ "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-salesforce",
28
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-salesforce",
29
+ "docLink": "",
30
+ "demoLinks": [],
31
+ "trainingLinks": [],
32
+ "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
33
+ "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
34
+ "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
35
+ "webLink": "https://www.itential.com/adapters/salesforce/",
36
+ "vendorLink": "",
37
+ "productLink": "",
38
+ "apiLinks": []
39
+ },
40
+ "assets": [],
41
+ "relatedItems": {
42
+ "adapters": [],
43
+ "integrations": [],
44
+ "ecosystemApplications": [],
45
+ "workflowProjects": [],
46
+ "transformationProjects": [],
47
+ "exampleProjects": []
48
+ }
49
+ }
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-salesforce",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "This adapter integrates with system Salesforce",
5
5
  "main": "adapter.js",
6
- "systemName": "Salesforce",
7
6
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.61.6",
7
+ "engineVersion": "1.67.14",
9
8
  "adapterType": "http",
10
9
  "scripts": {
11
10
  "artifactize": "npm i && node utils/packModificationScript.js",
12
- "preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
11
+ "preinstall": "node utils/setup.js",
12
+ "deinstall": "node utils/removeHooks.js",
13
13
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
14
14
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
15
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
@@ -23,7 +23,7 @@
23
23
  "adapter:migrate": "node utils/modify.js -m",
24
24
  "adapter:update": "node utils/modify.js -u",
25
25
  "adapter:revert": "node utils/modify.js -r",
26
- "troubleshoot": "node utils/tbScript.js",
26
+ "troubleshoot": "node utils/tbScript.js troubleshoot",
27
27
  "healthcheck": "node utils/tbScript.js healthcheck",
28
28
  "basicget": "node utils/tbScript.js basicget",
29
29
  "connectivity": "node utils/tbScript.js connectivity",
@@ -54,32 +54,31 @@
54
54
  "author": "Itential",
55
55
  "homepage": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-salesforce#readme",
56
56
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^4.45.6",
58
- "ajv": "^6.12.0",
59
- "axios": "^0.21.0",
60
- "commander": "^2.20.0",
61
- "fs-extra": "^8.1.0",
57
+ "@itentialopensource/adapter-utils": "^5.3.8",
58
+ "acorn": "^8.10.0",
59
+ "ajv": "^8.12.0",
60
+ "axios": "^1.6.7",
61
+ "commander": "^11.0.0",
62
+ "dns-lookup-promise": "^1.0.4",
63
+ "fs-extra": "^11.1.1",
62
64
  "json-query": "^2.2.2",
63
- "mocha": "^9.0.1",
65
+ "mocha": "^10.3.0",
64
66
  "mocha-param": "^2.0.1",
65
- "mongodb": "^4.1.0",
66
- "network-diagnostics": "^0.5.3",
67
+ "mongodb": "^4.16.0",
67
68
  "nyc": "^15.1.0",
69
+ "ping": "^0.4.4",
70
+ "prompts": "^2.4.2",
68
71
  "readline-sync": "^1.4.10",
69
- "semver": "^7.3.2",
70
- "winston": "^3.3.3"
72
+ "semver": "^7.5.3",
73
+ "winston": "^3.9.0"
71
74
  },
72
75
  "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"
76
+ "chai": "^4.3.7",
77
+ "eslint": "^8.44.0",
78
+ "eslint-config-airbnb-base": "^15.0.0",
79
+ "eslint-plugin-import": "^2.27.5",
80
+ "eslint-plugin-json": "^3.1.0",
81
+ "testdouble": "^3.18.0"
83
82
  },
84
83
  "private": false
85
84
  }