@itentialopensource/adapter-slack 2.5.5 → 2.6.2

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 (49) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +169 -0
  4. package/CHANGELOG.md +58 -55
  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 +352 -60
  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/Files/schema.json +12 -1
  20. package/entities/Groups/schema.json +12 -1
  21. package/entities/Im/schema.json +12 -1
  22. package/entities/Mpim/schema.json +12 -1
  23. package/error.json +12 -0
  24. package/package.json +20 -13
  25. package/pronghorn.json +652 -378
  26. package/propertiesDecorators.json +14 -0
  27. package/propertiesSchema.json +436 -0
  28. package/refs?service=git-upload-pack +0 -0
  29. package/report/adapterInfo.json +10 -0
  30. package/report/updateReport1653493672906.json +120 -0
  31. package/sampleProperties.json +96 -4
  32. package/storage/metrics.json +2228 -0
  33. package/test/integration/adapterTestBasicGet.js +2 -2
  34. package/test/integration/adapterTestIntegration.js +34 -108
  35. package/test/unit/adapterBaseTestUnit.js +35 -27
  36. package/test/unit/adapterTestUnit.js +543 -145
  37. package/utils/adapterInfo.js +206 -0
  38. package/utils/addAuth.js +94 -0
  39. package/utils/basicGet.js +1 -14
  40. package/utils/entitiesToDB.js +179 -0
  41. package/utils/modify.js +1 -1
  42. package/utils/packModificationScript.js +1 -1
  43. package/utils/patches2bundledDeps.js +90 -0
  44. package/utils/pre-commit.sh +3 -0
  45. package/utils/removeHooks.js +20 -0
  46. package/utils/tbScript.js +43 -22
  47. package/utils/tbUtils.js +126 -29
  48. package/utils/testRunner.js +16 -16
  49. package/utils/troubleshootingAdapter.js +2 -26
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "slack",
3
- "type": "Slack",
3
+ "type": "Slacktest",
4
4
  "properties": {
5
5
  "host": "slack.com",
6
6
  "port": 443,
@@ -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,8 +21,11 @@
20
21
  "token_cache": "local",
21
22
  "invalid_token_error": 401,
22
23
  "auth_field": "header.headers.Authorization",
23
- "auth_field_format": "{token}",
24
- "auth_logging": false
24
+ "auth_field_format": "Bearer {token}",
25
+ "auth_logging": false,
26
+ "client_id": "",
27
+ "client_secret": "",
28
+ "grant_type": ""
25
29
  },
26
30
  "healthcheck": {
27
31
  "type": "intermittent",
@@ -92,6 +96,94 @@
92
96
  "key_file": "",
93
97
  "cert_file": ""
94
98
  }
99
+ },
100
+ "devicebroker": {
101
+ "getDevice": [
102
+ {
103
+ "path": "/get/devices/{id}",
104
+ "method": "GET",
105
+ "query": {},
106
+ "body": {},
107
+ "headers": {},
108
+ "handleFailure": "ignore",
109
+ "requestFields": {
110
+ "id": "name"
111
+ },
112
+ "responseDatakey": "",
113
+ "responseFields": {
114
+ "name": "host",
115
+ "ostype": "os",
116
+ "ostypePrefix": "system-",
117
+ "ipaddress": "attributes.ipaddr",
118
+ "port": "443"
119
+ }
120
+ }
121
+ ],
122
+ "getDevicesFiltered": [
123
+ {
124
+ "path": "/get/devices",
125
+ "method": "GET",
126
+ "query": {},
127
+ "body": {},
128
+ "headers": {},
129
+ "handleFailure": "ignore",
130
+ "requestFields": {},
131
+ "responseDatakey": "",
132
+ "responseFields": {
133
+ "name": "host",
134
+ "ostype": "os",
135
+ "ostypePrefix": "system-",
136
+ "ipaddress": "attributes.ipaddr",
137
+ "port": "443"
138
+ }
139
+ }
140
+ ],
141
+ "isAlive": [
142
+ {
143
+ "path": "/get/devices/{id}/status",
144
+ "method": "GET",
145
+ "query": {},
146
+ "body": {},
147
+ "headers": {},
148
+ "handleFailure": "ignore",
149
+ "requestFields": {
150
+ "id": "name"
151
+ },
152
+ "responseDatakey": "",
153
+ "responseFields": {
154
+ "status": "status",
155
+ "statusValue": "online"
156
+ }
157
+ }
158
+ ],
159
+ "getConfig": [
160
+ {
161
+ "path": "/get/devices/{id}/configPart1",
162
+ "method": "GET",
163
+ "query": {},
164
+ "body": {},
165
+ "headers": {},
166
+ "handleFailure": "ignore",
167
+ "requestFields": {
168
+ "id": "name"
169
+ },
170
+ "responseDatakey": "",
171
+ "responseFields": {}
172
+ }
173
+ ],
174
+ "getCount": [
175
+ {
176
+ "path": "/get/devices",
177
+ "method": "GET",
178
+ "query": {},
179
+ "body": {},
180
+ "headers": {},
181
+ "handleFailure": "ignore",
182
+ "requestFields": {},
183
+ "responseDatakey": "",
184
+ "responseFields": {}
185
+ }
186
+ ]
95
187
  }
96
188
  },
97
189
  "groups": [],