@itentialopensource/adapter-microsoft_graph 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/.eslintignore +0 -1
  2. package/.jshintrc +3 -0
  3. package/AUTH.md +20 -16
  4. package/CALLS.md +63 -28
  5. package/CHANGELOG.md +8 -0
  6. package/CONTRIBUTING.md +1 -160
  7. package/ENHANCE.md +2 -2
  8. package/README.md +31 -22
  9. package/SUMMARY.md +2 -2
  10. package/SYSTEMINFO.md +15 -5
  11. package/adapter.js +159 -330
  12. package/adapterBase.js +538 -873
  13. package/changelogs/changelog.md +6 -0
  14. package/metadata.json +52 -0
  15. package/package.json +22 -25
  16. package/pronghorn.json +475 -143
  17. package/propertiesSchema.json +444 -40
  18. package/refs?service=git-upload-pack +0 -0
  19. package/report/adapter-openapi.json +14709 -0
  20. package/report/adapter-openapi.yaml +9744 -0
  21. package/report/adapterInfo.json +8 -8
  22. package/report/updateReport1691507370664.json +120 -0
  23. package/report/updateReport1692202407231.json +120 -0
  24. package/report/updateReport1694460353234.json +120 -0
  25. package/report/updateReport1695667793473.json +120 -0
  26. package/sampleProperties.json +63 -2
  27. package/test/integration/adapterTestBasicGet.js +1 -1
  28. package/test/integration/adapterTestConnectivity.js +91 -42
  29. package/test/integration/adapterTestIntegration.js +130 -2
  30. package/test/unit/adapterBaseTestUnit.js +395 -292
  31. package/test/unit/adapterTestUnit.js +306 -109
  32. package/utils/adapterInfo.js +1 -1
  33. package/utils/addAuth.js +1 -1
  34. package/utils/artifactize.js +1 -1
  35. package/utils/checkMigrate.js +1 -1
  36. package/utils/entitiesToDB.js +1 -0
  37. package/utils/findPath.js +1 -1
  38. package/utils/methodDocumentor.js +57 -22
  39. package/utils/modify.js +13 -15
  40. package/utils/packModificationScript.js +1 -1
  41. package/utils/taskMover.js +309 -0
  42. package/utils/tbScript.js +3 -10
  43. package/utils/tbUtils.js +2 -3
  44. package/utils/testRunner.js +1 -1
  45. package/utils/troubleshootingAdapter.js +1 -3
  46. package/workflows/README.md +0 -3
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "1.0.0",
3
- "configLines": 10093,
4
- "scriptLines": 1795,
5
- "codeLines": 20587,
6
- "testLines": 14653,
7
- "testCases": 741,
8
- "totalCodeLines": 37035,
9
- "wfTasks": 219
2
+ "version": "1.0.2",
3
+ "configLines": 10828,
4
+ "scriptLines": 1783,
5
+ "codeLines": 20081,
6
+ "testLines": 15130,
7
+ "testCases": 772,
8
+ "totalCodeLines": 36994,
9
+ "wfTasks": 227
10
10
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
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": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 17
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
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": "^5.1.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 343
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": 7684
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 491
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 6188
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 211
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1350
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": 15222
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 702
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
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": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 17
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
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": "^5.1.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 343
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": 7684
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 491
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 6188
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 211
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1350
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": 15222
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 702
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
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": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 17
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
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": "^5.1.7"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 347
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": 7690
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 491
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 6188
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 211
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
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": 15331
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 702
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
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": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 17
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
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": "^5.1.7"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 76
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 347
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": 7690
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 491
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 6188
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 211
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
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": 15331
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 702
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -5,6 +5,7 @@
5
5
  "host": "localhost",
6
6
  "port": 443,
7
7
  "base_path": "/",
8
+ "choosepath": "",
8
9
  "version": "",
9
10
  "cache_location": "none",
10
11
  "encode_pathvars": true,
@@ -26,12 +27,27 @@
26
27
  "auth_logging": false,
27
28
  "client_id": "",
28
29
  "client_secret": "",
29
- "grant_type": "client_credentials"
30
+ "grant_type": "client_credentials",
31
+ "sensitive": [],
32
+ "sso": {
33
+ "protocol": "",
34
+ "host": "",
35
+ "port": 0
36
+ },
37
+ "multiStepAuthCalls": [
38
+ {
39
+ "name": "",
40
+ "requestFields": {},
41
+ "responseFields": {},
42
+ "successfullResponseCode": 200
43
+ }
44
+ ]
30
45
  },
31
46
  "healthcheck": {
32
47
  "type": "none",
33
48
  "frequency": 60000,
34
- "query_object": {}
49
+ "query_object": {},
50
+ "addlHeaders": {}
35
51
  },
36
52
  "throttle": {
37
53
  "throttle_enabled": false,
@@ -128,6 +144,12 @@
128
144
  {
129
145
  "path": "/get/devices",
130
146
  "method": "GET",
147
+ "pagination": {
148
+ "offsetVar": "",
149
+ "limitVar": "",
150
+ "incrementBy": "limit",
151
+ "requestLocation": "query"
152
+ },
131
153
  "query": {},
132
154
  "body": {},
133
155
  "headers": {},
@@ -189,6 +211,45 @@
189
211
  "responseFields": {}
190
212
  }
191
213
  ]
214
+ },
215
+ "cache": {
216
+ "enabled": false,
217
+ "entities": [
218
+ {
219
+ "entityType": "",
220
+ "frequency": 1440,
221
+ "flushOnFail": false,
222
+ "limit": 1000,
223
+ "retryAttempts": 5,
224
+ "sort": true,
225
+ "populate": [
226
+ {
227
+ "path": "",
228
+ "method": "GET",
229
+ "pagination": {
230
+ "offsetVar": "",
231
+ "limitVar": "",
232
+ "incrementBy": "limit",
233
+ "requestLocation": "query"
234
+ },
235
+ "query": {},
236
+ "body": {},
237
+ "headers": {},
238
+ "handleFailure": "ignore",
239
+ "requestFields": {},
240
+ "responseDatakey": "",
241
+ "responseFields": {}
242
+ }
243
+ ],
244
+ "cachedTasks": [
245
+ {
246
+ "name": "",
247
+ "filterField": "",
248
+ "filterLoc": ""
249
+ }
250
+ ]
251
+ }
252
+ ]
192
253
  }
193
254
  },
194
255
  "groups": [],
@@ -7,9 +7,9 @@
7
7
  /* eslint import/no-dynamic-require: warn */
8
8
  /* eslint import/no-unresolved: warn */
9
9
 
10
- const mocha = require('mocha');
11
10
  const path = require('path');
12
11
  const assert = require('assert');
12
+ const mocha = require('mocha');
13
13
  const itParam = require('mocha-param');
14
14
 
15
15
  const utils = require('../../utils/tbUtils');