@itentialopensource/adapter-microsoft_office365 0.2.7 → 0.3.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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "ComplianceEntries": [
3
+ {
4
+ "name": "Compliance Summary",
5
+ "numInvalidProjects": 0,
6
+ "numValidProjects": 0
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,5 @@
1
+ ---------------------------------------------------------------------------------------------
2
+ **** Project Compliance Summary ****
3
+ 0 project(s) are not valid
4
+ 0 project(s) are valid
5
+ ---------------------------------------------------------------------------------------------
package/metadata.json CHANGED
@@ -31,13 +31,24 @@
31
31
  "isDeprecated": false
32
32
  },
33
33
  "brokerSince": "",
34
+ "authMethods": [
35
+ {
36
+ "type": "OAuth",
37
+ "primary": true
38
+ }
39
+ ],
34
40
  "documentation": {
35
41
  "storeLink": "",
36
42
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-microsoft_office365",
37
- "repoLink": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-microsoft_office365",
43
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-microsoft_office365",
38
44
  "docLink": "",
39
45
  "demoLinks": [],
40
- "trainingLinks": [],
46
+ "trainingLinks": [
47
+ {
48
+ "title": "Itential Academy",
49
+ "link": "https://www.itential.com/itential-academy/"
50
+ }
51
+ ],
41
52
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
42
53
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
43
54
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
@@ -60,5 +71,6 @@
60
71
  "workflowProjects": [],
61
72
  "transformationProjects": [],
62
73
  "exampleProjects": []
63
- }
74
+ },
75
+ "supportLevel": "community"
64
76
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-microsoft_office365",
3
- "version": "0.2.7",
3
+ "version": "0.3.1",
4
4
  "description": "This adapter integrates with system described as: odataServiceForNamespaceMicrosoft.graph.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Microsoft Office 365",
7
7
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.67.10",
8
+ "engineVersion": "1.67.19",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -16,7 +16,6 @@
16
16
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
17
17
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
18
18
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
19
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
20
19
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
21
20
  "adapter:install": "npm i && node utils/tbScript.js install",
22
21
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -46,33 +45,32 @@
46
45
  ],
47
46
  "license": "Apache-2.0",
48
47
  "engines": {
49
- "node": ">= 8.0.0",
48
+ "node": ">= 14.0.0",
50
49
  "npm": ">= 6.0.0"
51
50
  },
52
51
  "repository": {
53
52
  "type": "git",
54
- "url": "git@gitlab.com:itentialopensource/adapters/itsm-testing/adapter-microsoft_office365.git"
53
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-microsoft_office365.git"
55
54
  },
56
55
  "author": "Itential",
57
- "homepage": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-microsoft_office365#readme",
56
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-microsoft_office365#readme",
58
57
  "dependencies": {
59
- "@itentialopensource/adapter-utils": "^5.3.10",
60
- "acorn": "^8.10.0",
61
- "ajv": "^8.12.0",
62
- "axios": "^1.6.8",
58
+ "@itentialopensource/adapter-utils": "^5.6.0",
59
+ "acorn": "^8.12.1",
60
+ "ajv": "^8.17.1",
61
+ "axios": "^1.7.2",
63
62
  "commander": "^11.0.0",
64
63
  "dns-lookup-promise": "^1.0.4",
65
- "fs-extra": "^11.1.1",
64
+ "fs-extra": "^11.2.0",
66
65
  "json-query": "^2.2.2",
67
- "mocha": "^10.3.0",
66
+ "mocha": "^10.7.0",
68
67
  "mocha-param": "^2.0.1",
69
68
  "mongodb": "^4.16.0",
70
- "nyc": "^15.1.0",
71
69
  "ping": "^0.4.4",
72
70
  "prompts": "^2.4.2",
73
71
  "readline-sync": "^1.4.10",
74
- "semver": "^7.5.3",
75
- "winston": "^3.9.0"
72
+ "semver": "^7.6.3",
73
+ "winston": "^3.13.1"
76
74
  },
77
75
  "devDependencies": {
78
76
  "@babel/helper-function-name": "^7.14.2",
@@ -943,6 +943,11 @@
943
943
  "devicebroker": {
944
944
  "type": "object",
945
945
  "properties": {
946
+ "enabled": {
947
+ "type": "boolean",
948
+ "description": "Whether or not the device broker calls have been mapped",
949
+ "default": false
950
+ },
946
951
  "getDevice": {
947
952
  "type": "array",
948
953
  "description": "Broker call(s) to getDevice",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.2.1",
3
- "configLines": 3280,
2
+ "version": "0.2.7",
3
+ "configLines": 3285,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 3012,
6
- "testLines": 3783,
6
+ "testLines": 3782,
7
7
  "testCases": 177,
8
- "totalCodeLines": 8578,
8
+ "totalCodeLines": 8577,
9
9
  "wfTasks": 35
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": 16
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": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.3.10"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 78
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 344
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": 647
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": 1797
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 88
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 733
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 19
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": 3983
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 107
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -117,30 +117,32 @@
117
117
  }
118
118
  },
119
119
  "devicebroker": {
120
+ "enabled": false,
120
121
  "getDevice": [
121
122
  {
122
- "path": "/get/devices/{id}",
123
+ "path": "/not/mapped",
123
124
  "method": "GET",
124
125
  "query": {},
125
126
  "body": {},
126
127
  "headers": {},
127
128
  "handleFailure": "ignore",
128
129
  "requestFields": {
129
- "id": "name"
130
+ "insample": "{port}"
130
131
  },
131
132
  "responseDatakey": "",
132
133
  "responseFields": {
133
- "name": "host",
134
- "ostype": "os",
135
- "ostypePrefix": "system-",
136
- "ipaddress": "attributes.ipaddr",
137
- "port": "443"
134
+ "name": "{this}{||}{that}",
135
+ "ostype": "{osfield}",
136
+ "ostypePrefix": "meraki-",
137
+ "port": "{port}",
138
+ "ipaddress": "{ip_addr}",
139
+ "serial" : "{serial}"
138
140
  }
139
141
  }
140
142
  ],
141
143
  "getDevicesFiltered": [
142
144
  {
143
- "path": "/get/devices",
145
+ "path": "/not/mapped",
144
146
  "method": "GET",
145
147
  "pagination": {
146
148
  "offsetVar": "",
@@ -155,42 +157,44 @@
155
157
  "requestFields": {},
156
158
  "responseDatakey": "",
157
159
  "responseFields": {
158
- "name": "host",
159
- "ostype": "os",
160
- "ostypePrefix": "system-",
161
- "ipaddress": "attributes.ipaddr",
162
- "port": "443"
160
+ "name": "{this}{||}{that}",
161
+ "ostype": "{osfield}",
162
+ "ostypePrefix": "meraki-",
163
+ "port": "{port}",
164
+ "ipaddress": "{ip_addr}",
165
+ "serial" : "{serial}",
166
+ "id": "{myid}"
163
167
  }
164
168
  }
165
169
  ],
166
170
  "isAlive": [
167
171
  {
168
- "path": "/get/devices/{id}/status",
172
+ "path": "/not/mapped/{devID}",
169
173
  "method": "GET",
170
174
  "query": {},
171
175
  "body": {},
172
176
  "headers": {},
173
177
  "handleFailure": "ignore",
174
178
  "requestFields": {
175
- "id": "name"
179
+ "devID": "{id}"
176
180
  },
177
181
  "responseDatakey": "",
178
182
  "responseFields": {
179
- "status": "status",
180
- "statusValue": "online"
183
+ "status": "return2xx",
184
+ "statusValue": "AD.200"
181
185
  }
182
186
  }
183
187
  ],
184
188
  "getConfig": [
185
189
  {
186
- "path": "/get/devices/{id}/configPart1",
190
+ "path": "/not/mapped/{devID}",
187
191
  "method": "GET",
188
192
  "query": {},
189
193
  "body": {},
190
194
  "headers": {},
191
195
  "handleFailure": "ignore",
192
196
  "requestFields": {
193
- "id": "name"
197
+ "devID": "{id}"
194
198
  },
195
199
  "responseDatakey": "",
196
200
  "responseFields": {}
@@ -198,7 +202,7 @@
198
202
  ],
199
203
  "getCount": [
200
204
  {
201
- "path": "/get/devices",
205
+ "path": "/not/mapped",
202
206
  "method": "GET",
203
207
  "query": {},
204
208
  "body": {},
@@ -214,15 +218,15 @@
214
218
  "enabled": false,
215
219
  "entities": [
216
220
  {
217
- "entityType": "",
218
- "frequency": 1440,
221
+ "entityType": "device",
222
+ "frequency": 3600,
219
223
  "flushOnFail": false,
220
- "limit": 1000,
224
+ "limit": 10000,
221
225
  "retryAttempts": 5,
222
226
  "sort": true,
223
227
  "populate": [
224
228
  {
225
- "path": "",
229
+ "path": "/not/mapped",
226
230
  "method": "GET",
227
231
  "pagination": {
228
232
  "offsetVar": "",
@@ -236,7 +240,15 @@
236
240
  "handleFailure": "ignore",
237
241
  "requestFields": {},
238
242
  "responseDatakey": "",
239
- "responseFields": {}
243
+ "responseFields": {
244
+ "name": "{this}{||}{that}",
245
+ "ostype": "{osfield}",
246
+ "ostypePrefix": "meraki-",
247
+ "port": "{port}",
248
+ "ipaddress": "{ip_addr}",
249
+ "serial" : "{serial}",
250
+ "id": "{myid}"
251
+ }
240
252
  }
241
253
  ],
242
254
  "cachedTasks": [
@@ -46,6 +46,7 @@ samProps.ssl.accept_invalid_cert = false;
46
46
  if (samProps.request.attempt_timeout < 30000) {
47
47
  samProps.request.attempt_timeout = 30000;
48
48
  }
49
+ samProps.devicebroker.enabled = true;
49
50
  const attemptTimeout = samProps.request.attempt_timeout;
50
51
  const { stub } = samProps;
51
52
 
@@ -284,7 +284,6 @@ describe('[unit] MicrosoftOffice365 Adapter Test', () => {
284
284
  assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
285
285
  assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
286
286
  assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
287
- assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
288
287
  assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
289
288
  assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
290
289
  assert.equal('npm run deploy', packageDotJson.scripts.build);
@@ -315,17 +314,16 @@ describe('[unit] MicrosoftOffice365 Adapter Test', () => {
315
314
  assert.notEqual(undefined, packageDotJson.dependencies);
316
315
  assert.notEqual(null, packageDotJson.dependencies);
317
316
  assert.notEqual('', packageDotJson.dependencies);
318
- assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
319
- assert.equal('^1.6.8', packageDotJson.dependencies.axios);
317
+ assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
318
+ assert.equal('^1.7.2', packageDotJson.dependencies.axios);
320
319
  assert.equal('^11.0.0', packageDotJson.dependencies.commander);
321
- assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
322
- assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
320
+ assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
321
+ assert.equal('^10.7.0', packageDotJson.dependencies.mocha);
323
322
  assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
324
- assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
325
323
  assert.equal('^0.4.4', packageDotJson.dependencies.ping);
326
324
  assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
327
- assert.equal('^7.5.3', packageDotJson.dependencies.semver);
328
- assert.equal('^3.9.0', packageDotJson.dependencies.winston);
325
+ assert.equal('^7.6.3', packageDotJson.dependencies.semver);
326
+ assert.equal('^3.13.1', packageDotJson.dependencies.winston);
329
327
  done();
330
328
  } catch (error) {
331
329
  log.error(`Test Failure: ${error}`);