@itentialopensource/adapter-slack 2.5.3 → 2.6.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 (48) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +169 -0
  4. package/CHANGELOG.md +55 -52
  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 +1021 -245
  15. package/entities/.generic/action.json +110 -5
  16. package/entities/.generic/schema.json +6 -1
  17. package/entities/Channels/schema.json +12 -1
  18. package/entities/Chat/schema.json +12 -1
  19. package/entities/Groups/schema.json +12 -1
  20. package/entities/Im/schema.json +12 -1
  21. package/entities/Mpim/schema.json +12 -1
  22. package/error.json +12 -0
  23. package/package.json +20 -13
  24. package/pronghorn.json +642 -378
  25. package/propertiesDecorators.json +14 -0
  26. package/propertiesSchema.json +436 -0
  27. package/refs?service=git-upload-pack +0 -0
  28. package/report/adapterInfo.json +10 -0
  29. package/report/updateReport1653493672906.json +120 -0
  30. package/sampleProperties.json +96 -4
  31. package/storage/metrics.json +2228 -0
  32. package/test/integration/adapterTestBasicGet.js +2 -2
  33. package/test/integration/adapterTestIntegration.js +32 -106
  34. package/test/unit/adapterBaseTestUnit.js +35 -27
  35. package/test/unit/adapterTestUnit.js +542 -144
  36. package/utils/adapterInfo.js +206 -0
  37. package/utils/addAuth.js +94 -0
  38. package/utils/basicGet.js +1 -14
  39. package/utils/entitiesToDB.js +179 -0
  40. package/utils/modify.js +1 -1
  41. package/utils/packModificationScript.js +1 -1
  42. package/utils/patches2bundledDeps.js +90 -0
  43. package/utils/pre-commit.sh +3 -0
  44. package/utils/removeHooks.js +20 -0
  45. package/utils/tbScript.js +43 -22
  46. package/utils/tbUtils.js +126 -29
  47. package/utils/testRunner.js +16 -16
  48. package/utils/troubleshootingAdapter.js +2 -26
@@ -4,7 +4,7 @@
4
4
  "name": "getGenerics",
5
5
  "protocol": "REST",
6
6
  "method": "GET",
7
- "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}?{query}",
7
+ "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
8
8
  "requestSchema": "schema.json",
9
9
  "responseSchema": "schema.json",
10
10
  "timeout": 0,
@@ -25,7 +25,7 @@
25
25
  "name": "createGeneric",
26
26
  "protocol": "REST",
27
27
  "method": "POST",
28
- "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}?{query}",
28
+ "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
29
29
  "requestSchema": "schema.json",
30
30
  "responseSchema": "schema.json",
31
31
  "timeout": 0,
@@ -46,7 +46,7 @@
46
46
  "name": "updateGeneric",
47
47
  "protocol": "REST",
48
48
  "method": "PUT",
49
- "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}?{query}",
49
+ "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
50
50
  "requestSchema": "schema.json",
51
51
  "responseSchema": "schema.json",
52
52
  "timeout": 0,
@@ -67,7 +67,7 @@
67
67
  "name": "patchGeneric",
68
68
  "protocol": "REST",
69
69
  "method": "PATCH",
70
- "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}?{query}",
70
+ "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
71
71
  "requestSchema": "schema.json",
72
72
  "responseSchema": "schema.json",
73
73
  "timeout": 0,
@@ -88,7 +88,112 @@
88
88
  "name": "deleteGeneric",
89
89
  "protocol": "REST",
90
90
  "method": "DELETE",
91
- "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}?{query}",
91
+ "entitypath": "{base_path}/{version}/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
92
+ "requestSchema": "schema.json",
93
+ "responseSchema": "schema.json",
94
+ "timeout": 0,
95
+ "sendEmpty": false,
96
+ "sendGetBody": false,
97
+ "requestDatatype": "JSON",
98
+ "responseDatatype": "JSON",
99
+ "headers": {},
100
+ "responseObjects": [
101
+ {
102
+ "type": "default",
103
+ "key": "",
104
+ "mockFile": ""
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "name": "getGenericsNoBase",
110
+ "protocol": "REST",
111
+ "method": "GET",
112
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
113
+ "requestSchema": "schema.json",
114
+ "responseSchema": "schema.json",
115
+ "timeout": 0,
116
+ "sendEmpty": false,
117
+ "sendGetBody": false,
118
+ "requestDatatype": "JSON",
119
+ "responseDatatype": "JSON",
120
+ "headers": {},
121
+ "responseObjects": [
122
+ {
123
+ "type": "default",
124
+ "key": "",
125
+ "mockFile": ""
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "name": "createGenericNoBase",
131
+ "protocol": "REST",
132
+ "method": "POST",
133
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
134
+ "requestSchema": "schema.json",
135
+ "responseSchema": "schema.json",
136
+ "timeout": 0,
137
+ "sendEmpty": false,
138
+ "sendGetBody": false,
139
+ "requestDatatype": "JSON",
140
+ "responseDatatype": "JSON",
141
+ "headers": {},
142
+ "responseObjects": [
143
+ {
144
+ "type": "default",
145
+ "key": "",
146
+ "mockFile": ""
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "name": "updateGenericNoBase",
152
+ "protocol": "REST",
153
+ "method": "PUT",
154
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
155
+ "requestSchema": "schema.json",
156
+ "responseSchema": "schema.json",
157
+ "timeout": 0,
158
+ "sendEmpty": false,
159
+ "sendGetBody": false,
160
+ "requestDatatype": "JSON",
161
+ "responseDatatype": "JSON",
162
+ "headers": {},
163
+ "responseObjects": [
164
+ {
165
+ "type": "default",
166
+ "key": "",
167
+ "mockFile": ""
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "name": "patchGenericNoBase",
173
+ "protocol": "REST",
174
+ "method": "PATCH",
175
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
176
+ "requestSchema": "schema.json",
177
+ "responseSchema": "schema.json",
178
+ "timeout": 0,
179
+ "sendEmpty": false,
180
+ "sendGetBody": false,
181
+ "requestDatatype": "JSON",
182
+ "responseDatatype": "JSON",
183
+ "headers": {},
184
+ "responseObjects": [
185
+ {
186
+ "type": "default",
187
+ "key": "",
188
+ "mockFile": ""
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ "name": "deleteGenericNoBase",
194
+ "protocol": "REST",
195
+ "method": "DELETE",
196
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
92
197
  "requestSchema": "schema.json",
93
198
  "responseSchema": "schema.json",
94
199
  "timeout": 0,
@@ -14,7 +14,12 @@
14
14
  "createGeneric",
15
15
  "updateGeneric",
16
16
  "patchGeneric",
17
- "deleteGeneric"
17
+ "deleteGeneric",
18
+ "getGenericsNoBase",
19
+ "createGenericNoBase",
20
+ "updateGenericNoBase",
21
+ "patchGenericNoBase",
22
+ "deleteGenericNoBase"
18
23
  ],
19
24
  "external_name": "ph_request_type"
20
25
  }
@@ -2,7 +2,7 @@
2
2
  "$id": "schema.json",
3
3
  "type": "object",
4
4
  "schema": "http://json-schema.org/draft-07/schema#",
5
- "translate": false,
5
+ "translate": true,
6
6
  "dynamicfields": true,
7
7
  "properties": {
8
8
  "ph_request_type": {
@@ -27,6 +27,17 @@
27
27
  "postChannelsunarchive"
28
28
  ],
29
29
  "external_name": "ph_request_type"
30
+ },
31
+ "threadTs": {
32
+ "type": "string",
33
+ "description": "Unique identifier of a thread's parent message",
34
+ "parse": false,
35
+ "encode": false,
36
+ "encrypt": {
37
+ "type": "AES",
38
+ "key": ""
39
+ },
40
+ "external_name": "thread_ts"
30
41
  }
31
42
  },
32
43
  "definitions": {}
@@ -2,7 +2,7 @@
2
2
  "$id": "schema.json",
3
3
  "type": "object",
4
4
  "schema": "http://json-schema.org/draft-07/schema#",
5
- "translate": false,
5
+ "translate": true,
6
6
  "dynamicfields": true,
7
7
  "properties": {
8
8
  "ph_request_type": {
@@ -19,6 +19,17 @@
19
19
  "postChatupdate"
20
20
  ],
21
21
  "external_name": "ph_request_type"
22
+ },
23
+ "threadTs": {
24
+ "type": "string",
25
+ "description": "Unique identifier of a thread's parent message",
26
+ "parse": false,
27
+ "encode": false,
28
+ "encrypt": {
29
+ "type": "AES",
30
+ "key": ""
31
+ },
32
+ "external_name": "thread_ts"
22
33
  }
23
34
  },
24
35
  "definitions": {}
@@ -2,7 +2,7 @@
2
2
  "$id": "schema.json",
3
3
  "type": "object",
4
4
  "schema": "http://json-schema.org/draft-07/schema#",
5
- "translate": false,
5
+ "translate": true,
6
6
  "dynamicfields": true,
7
7
  "properties": {
8
8
  "ph_request_type": {
@@ -28,6 +28,17 @@
28
28
  "postGroupsunarchive"
29
29
  ],
30
30
  "external_name": "ph_request_type"
31
+ },
32
+ "threadTs": {
33
+ "type": "string",
34
+ "description": "Unique identifier of a thread's parent message",
35
+ "parse": false,
36
+ "encode": false,
37
+ "encrypt": {
38
+ "type": "AES",
39
+ "key": ""
40
+ },
41
+ "external_name": "thread_ts"
31
42
  }
32
43
  },
33
44
  "definitions": {}
@@ -2,7 +2,7 @@
2
2
  "$id": "schema.json",
3
3
  "type": "object",
4
4
  "schema": "http://json-schema.org/draft-07/schema#",
5
- "translate": false,
5
+ "translate": true,
6
6
  "dynamicfields": true,
7
7
  "properties": {
8
8
  "ph_request_type": {
@@ -18,6 +18,17 @@
18
18
  "getImreplies"
19
19
  ],
20
20
  "external_name": "ph_request_type"
21
+ },
22
+ "threadTs": {
23
+ "type": "string",
24
+ "description": "Unique identifier of a thread's parent message",
25
+ "parse": false,
26
+ "encode": false,
27
+ "encrypt": {
28
+ "type": "AES",
29
+ "key": ""
30
+ },
31
+ "external_name": "thread_ts"
21
32
  }
22
33
  },
23
34
  "definitions": {}
@@ -2,7 +2,7 @@
2
2
  "$id": "schema.json",
3
3
  "type": "object",
4
4
  "schema": "http://json-schema.org/draft-07/schema#",
5
- "translate": false,
5
+ "translate": true,
6
6
  "dynamicfields": true,
7
7
  "properties": {
8
8
  "ph_request_type": {
@@ -18,6 +18,17 @@
18
18
  "getMpimreplies"
19
19
  ],
20
20
  "external_name": "ph_request_type"
21
+ },
22
+ "threadTs": {
23
+ "type": "string",
24
+ "description": "Unique identifier of a thread's parent message",
25
+ "parse": false,
26
+ "encode": false,
27
+ "encrypt": {
28
+ "type": "AES",
29
+ "key": ""
30
+ },
31
+ "external_name": "thread_ts"
21
32
  }
22
33
  },
23
34
  "definitions": {}
package/error.json CHANGED
@@ -96,6 +96,12 @@
96
96
  "displayString": "Invalid properties: $VARIABLE$",
97
97
  "recommendation": "Verify the properties for the adapter"
98
98
  },
99
+ {
100
+ "key": "Missing Properties",
101
+ "icode": "AD.306",
102
+ "displayString": "Property $VARIABLE$ is required",
103
+ "recommendation": "Please provide the required property"
104
+ },
99
105
  {
100
106
  "key": "Query Not Translated",
101
107
  "icode": "AD.310",
@@ -168,6 +174,12 @@
168
174
  "displayString": "Failure response received for $VARIABLE$",
169
175
  "recommendation": "Check the reason for failure in the stack trace"
170
176
  },
177
+ {
178
+ "key": "Suspended Adapter",
179
+ "icode": "AD.600",
180
+ "displayString": "Adapter is suspended",
181
+ "recommendation": "Check if external system is functional and unsuspend if appropriate"
182
+ },
171
183
  {
172
184
  "key": "Caught Exception",
173
185
  "icode": "AD.900",
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-slack",
3
- "version": "2.5.3",
3
+ "version": "2.6.1",
4
4
  "description": "This adapter integrates with system Slack",
5
5
  "main": "adapter.js",
6
- "wizardVersion": "2.43.12",
7
- "engineVersion": "1.58.6",
6
+ "systemName": "Slack",
7
+ "wizardVersion": "2.44.7",
8
+ "engineVersion": "1.61.6",
9
+ "adapterType": "http",
8
10
  "scripts": {
9
11
  "artifactize": "npm i && node utils/packModificationScript.js",
10
- "preinstall": "node utils/setup.js",
12
+ "preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
11
13
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
12
14
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
13
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
@@ -16,7 +18,7 @@
16
18
  "test:system": "nyc --reporter html --reporter text mocha test/integration/adapterTestIntegration.js --LOG=error -g \"System Integration Tests\"",
17
19
  "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
18
20
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
19
- "adapter:install": "node utils/tbScript.js install",
21
+ "adapter:install": "npm i && node utils/tbScript.js install",
20
22
  "adapter:checkMigrate": "node utils/checkMigrate.js",
21
23
  "adapter:findPath": "node utils/findPath.js",
22
24
  "adapter:migrate": "node utils/modify.js -m",
@@ -26,7 +28,7 @@
26
28
  "healthcheck": "node utils/tbScript.js healthcheck",
27
29
  "basicget": "node utils/tbScript.js basicget",
28
30
  "connectivity": "node utils/tbScript.js connectivity",
29
- "deploy": "npm publish --registry=http://registry.npmjs.org --access=public",
31
+ "deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
30
32
  "build": "npm run deploy"
31
33
  },
32
34
  "keywords": [
@@ -53,13 +55,15 @@
53
55
  "author": "Itential",
54
56
  "homepage": "https://gitlab.com/itentialopensource/adapters/notification-messaging/adapter-slack#readme",
55
57
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^4.39.2",
58
+ "@itentialopensource/adapter-utils": "^4.45.6",
57
59
  "ajv": "^6.12.0",
58
60
  "axios": "^0.21.0",
59
61
  "commander": "^2.20.0",
60
62
  "fs-extra": "^8.1.0",
61
- "mocha": "^8.1.1",
63
+ "json-query": "^2.2.2",
64
+ "mocha": "^9.0.1",
62
65
  "mocha-param": "^2.0.1",
66
+ "mongodb": "^4.1.0",
63
67
  "network-diagnostics": "^0.5.3",
64
68
  "nyc": "^15.1.0",
65
69
  "readline-sync": "^1.4.10",
@@ -67,13 +71,16 @@
67
71
  "winston": "^3.3.3"
68
72
  },
69
73
  "devDependencies": {
70
- "chai": "^4.2.0",
71
- "eslint": "^7.2.0",
72
- "eslint-config-airbnb-base": "^14.2.0",
73
- "eslint-plugin-import": "^2.21.2",
74
- "eslint-plugin-json": "^2.1.1",
74
+ "chai": "^4.3.4",
75
+ "eslint": "^7.29.0",
76
+ "eslint-config-airbnb-base": "^14.2.1",
77
+ "eslint-plugin-import": "^2.23.4",
78
+ "eslint-plugin-json": "^3.0.0",
75
79
  "package-json-validator": "^0.6.3",
76
80
  "testdouble": "^3.16.1"
77
81
  },
82
+ "resolutions": {
83
+ "minimist": "^1.2.5"
84
+ },
78
85
  "private": false
79
86
  }