@itentialopensource/adapter-microsoft_office365 0.3.6 → 0.4.0
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.
- package/.eslintrc.js +1 -0
- package/AUTH.md +4 -4
- package/BROKER.md +4 -4
- package/CALLS.md +9 -9
- package/ENHANCE.md +3 -3
- package/PROPERTIES.md +24 -9
- package/README.md +24 -23
- package/SUMMARY.md +2 -2
- package/SYSTEMINFO.md +1 -1
- package/TAB1.md +2 -2
- package/TAB2.md +9 -5
- package/TROUBLESHOOT.md +10 -1
- package/UTILITIES.md +473 -0
- package/adapter.js +5 -5
- package/adapterBase.js +52 -16
- package/package.json +24 -30
- package/pronghorn.json +15 -13
- package/propertiesSchema.json +68 -7
- package/report/adapterInfo.json +7 -7
- package/report/auto-adapter-openapi.json +470 -0
- package/report/updateReport1748555443074.json +120 -0
- package/sampleProperties.json +4 -0
- package/test/integration/adapterTestBasicGet.js +88 -54
- package/test/integration/adapterTestConnectivity.js +15 -16
- package/test/integration/adapterTestIntegration.js +1 -38
- package/test/unit/adapterBaseTestUnit.js +641 -39
- package/test/unit/adapterTestUnit.js +17 -54
- package/utils/adapterInfo.js +114 -164
- package/utils/argParser.js +44 -0
- package/utils/checkMigrate.js +77 -38
- package/utils/entitiesToDB.js +53 -42
- package/utils/logger.js +26 -0
- package/utils/modify.js +56 -55
- package/utils/mongoDbConnection.js +79 -0
- package/utils/mongoUtils.js +162 -0
- package/utils/taskMover.js +31 -32
- package/utils/tbScript.js +36 -172
- package/utils/tbUtils.js +84 -226
- package/utils/troubleshootingAdapter.js +68 -84
- package/utils/updateAdapterConfig.js +158 -0
- package/utils/addAuth.js +0 -94
- package/utils/artifactize.js +0 -146
- package/utils/basicGet.js +0 -50
- package/utils/packModificationScript.js +0 -35
- package/utils/patches2bundledDeps.js +0 -90
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-microsoft_office365",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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.
|
|
8
|
+
"engineVersion": "1.69.14",
|
|
9
9
|
"adapterType": "http",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
12
11
|
"preinstall": "node utils/setup.js",
|
|
13
12
|
"deinstall": "node utils/removeHooks.js",
|
|
14
13
|
"lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
|
|
@@ -17,7 +16,6 @@
|
|
|
17
16
|
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
18
17
|
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
19
18
|
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
20
|
-
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
21
19
|
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
22
20
|
"adapter:findPath": "node utils/findPath.js",
|
|
23
21
|
"adapter:migrate": "node utils/modify.js -m",
|
|
@@ -32,10 +30,9 @@
|
|
|
32
30
|
},
|
|
33
31
|
"keywords": [
|
|
34
32
|
"Itential",
|
|
35
|
-
"
|
|
33
|
+
"Itential Platform",
|
|
36
34
|
"Automation",
|
|
37
35
|
"Integration",
|
|
38
|
-
"App-Artifacts",
|
|
39
36
|
"Adapter",
|
|
40
37
|
"ITSM",
|
|
41
38
|
"Testing",
|
|
@@ -55,32 +52,29 @@
|
|
|
55
52
|
"author": "Itential",
|
|
56
53
|
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-microsoft_office365#readme",
|
|
57
54
|
"dependencies": {
|
|
58
|
-
"@itentialopensource/adapter-utils": "
|
|
59
|
-
"acorn": "
|
|
60
|
-
"ajv": "
|
|
61
|
-
"axios": "
|
|
62
|
-
"commander": "
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"mocha": "
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"winston": "^3.17.0"
|
|
55
|
+
"@itentialopensource/adapter-utils": "5.10.16",
|
|
56
|
+
"acorn": "8.14.1",
|
|
57
|
+
"ajv": "8.17.1",
|
|
58
|
+
"axios": "1.9.0",
|
|
59
|
+
"commander": "11.1.0",
|
|
60
|
+
"fs-extra": "11.3.0",
|
|
61
|
+
"json-query": "2.2.2",
|
|
62
|
+
"mocha": "10.8.2",
|
|
63
|
+
"mocha-param": "2.0.1",
|
|
64
|
+
"mongodb": "4.17.2",
|
|
65
|
+
"ping": "0.4.4",
|
|
66
|
+
"prompts": "2.4.2",
|
|
67
|
+
"readline-sync": "1.4.10",
|
|
68
|
+
"semver": "7.7.2",
|
|
69
|
+
"winston": "3.17.0"
|
|
74
70
|
},
|
|
75
71
|
"devDependencies": {
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"eslint": "
|
|
79
|
-
"eslint-
|
|
80
|
-
"eslint-
|
|
81
|
-
"
|
|
82
|
-
"eslint-plugin-json": "^3.1.0",
|
|
83
|
-
"testdouble": "^3.18.0"
|
|
72
|
+
"chai": "4.5.0",
|
|
73
|
+
"eslint": "8.57.0",
|
|
74
|
+
"eslint-config-airbnb-base": "15.0.0",
|
|
75
|
+
"eslint-plugin-import": "2.31.0",
|
|
76
|
+
"eslint-plugin-json": "3.1.0",
|
|
77
|
+
"testdouble": "3.18.0"
|
|
84
78
|
},
|
|
85
79
|
"private": false
|
|
86
80
|
}
|
package/pronghorn.json
CHANGED
|
@@ -226,16 +226,6 @@
|
|
|
226
226
|
"title": "props",
|
|
227
227
|
"type": "object"
|
|
228
228
|
}
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"name": "persistFlag",
|
|
232
|
-
"type": "boolean",
|
|
233
|
-
"info": "Whether the input properties should be saved",
|
|
234
|
-
"required": true,
|
|
235
|
-
"schema": {
|
|
236
|
-
"title": "persistFlag",
|
|
237
|
-
"type": "boolean"
|
|
238
|
-
}
|
|
239
229
|
}
|
|
240
230
|
],
|
|
241
231
|
"output": {
|
|
@@ -306,7 +296,19 @@
|
|
|
306
296
|
"name": "iapRunAdapterBasicGet",
|
|
307
297
|
"summary": "Runs basicGet script for adapter",
|
|
308
298
|
"description": "Runs basicGet script for adapter",
|
|
309
|
-
"input": [
|
|
299
|
+
"input": [
|
|
300
|
+
{
|
|
301
|
+
"name": "maxCalls",
|
|
302
|
+
"required": false,
|
|
303
|
+
"type": "number",
|
|
304
|
+
"info": "How many GET endpoints to test (defaults to 5)",
|
|
305
|
+
"schema": {
|
|
306
|
+
"title": "maxCalls",
|
|
307
|
+
"type": "number",
|
|
308
|
+
"default": 5
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
],
|
|
310
312
|
"output": {
|
|
311
313
|
"name": "result",
|
|
312
314
|
"type": "object",
|
|
@@ -327,8 +329,8 @@
|
|
|
327
329
|
},
|
|
328
330
|
{
|
|
329
331
|
"name": "iapMoveAdapterEntitiesToDB",
|
|
330
|
-
"summary": "Moves entities from an adapter into the
|
|
331
|
-
"description": "Moves entities from an adapter into the
|
|
332
|
+
"summary": "Moves entities from an adapter into the Itential Platform database",
|
|
333
|
+
"description": "Moves entities from an adapter into the Itential Platform database",
|
|
332
334
|
"input": [],
|
|
333
335
|
"output": {
|
|
334
336
|
"name": "res",
|
package/propertiesSchema.json
CHANGED
|
@@ -762,6 +762,14 @@
|
|
|
762
762
|
"security/ca.pem"
|
|
763
763
|
]
|
|
764
764
|
},
|
|
765
|
+
"ca_file_content": {
|
|
766
|
+
"type": "string",
|
|
767
|
+
"description": "The content of the CA file used for SSL",
|
|
768
|
+
"default": "",
|
|
769
|
+
"examples": [
|
|
770
|
+
"-----BEGIN CERTIFICATE-----"
|
|
771
|
+
]
|
|
772
|
+
},
|
|
765
773
|
"key_file": {
|
|
766
774
|
"type": "string",
|
|
767
775
|
"description": "The fully qualified path name to the key file used for SSL",
|
|
@@ -851,32 +859,48 @@
|
|
|
851
859
|
"mongo": {
|
|
852
860
|
"type": "object",
|
|
853
861
|
"properties": {
|
|
862
|
+
"url": {
|
|
863
|
+
"type": "string",
|
|
864
|
+
"description": "Mongo's complete connection URL. This property overrides host, port, database, username, password and replSet settings.",
|
|
865
|
+
"examples": [
|
|
866
|
+
"mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]",
|
|
867
|
+
"mongodb+srv://[username:password@]cluster0.xxxxx.mongodb.net/[defaultauthdb][?options]",
|
|
868
|
+
"mongodb+srv://cluster0.xxxxx.mongodb.net/[defaultauthdb][?options]"
|
|
869
|
+
]
|
|
870
|
+
},
|
|
854
871
|
"host": {
|
|
855
872
|
"type": "string",
|
|
856
|
-
"description": "
|
|
873
|
+
"description": "Host information for the Mongo server",
|
|
857
874
|
"default": "",
|
|
858
875
|
"examples": [
|
|
859
|
-
"localhost"
|
|
876
|
+
"localhost",
|
|
877
|
+
"cluster0.xxxxx.mongodb.net",
|
|
878
|
+
"my-cluster.example.com"
|
|
860
879
|
]
|
|
861
880
|
},
|
|
862
881
|
"port": {
|
|
863
882
|
"type": "integer",
|
|
864
|
-
"description": "
|
|
883
|
+
"description": "Port information for the Mongo server. Not used when using mongodb+srv:// protocol",
|
|
865
884
|
"default": 443,
|
|
866
885
|
"minimum": 0,
|
|
867
886
|
"maximum": 65535
|
|
868
887
|
},
|
|
869
888
|
"database": {
|
|
870
889
|
"type": "string",
|
|
871
|
-
"description": "The
|
|
890
|
+
"description": "The database for the adapter to use for its data.",
|
|
872
891
|
"default": "",
|
|
873
892
|
"examples": [
|
|
874
893
|
"adapter-xyz"
|
|
875
894
|
]
|
|
876
895
|
},
|
|
896
|
+
"dbAuth": {
|
|
897
|
+
"type": "boolean",
|
|
898
|
+
"description": "Whether to use authentication for MongoDB connection. Default is false.",
|
|
899
|
+
"default": false
|
|
900
|
+
},
|
|
877
901
|
"username": {
|
|
878
902
|
"type": "string",
|
|
879
|
-
"description": "
|
|
903
|
+
"description": "If credentials are required to access Mongo, this is the user to login as.",
|
|
880
904
|
"default": "",
|
|
881
905
|
"examples": [
|
|
882
906
|
"username"
|
|
@@ -884,7 +908,7 @@
|
|
|
884
908
|
},
|
|
885
909
|
"password": {
|
|
886
910
|
"type": "string",
|
|
887
|
-
"description": "
|
|
911
|
+
"description": "If credentials are required to access Mongo, this is the password to login with.",
|
|
888
912
|
"default": "",
|
|
889
913
|
"examples": [
|
|
890
914
|
"password"
|
|
@@ -892,12 +916,17 @@
|
|
|
892
916
|
},
|
|
893
917
|
"replSet": {
|
|
894
918
|
"type": "string",
|
|
895
|
-
"description": "
|
|
919
|
+
"description": "If the database is set up to use replica sets, define it here so it can be added to the database connection. Not used when using mongodb+srv:// protocol",
|
|
896
920
|
"default": "",
|
|
897
921
|
"examples": [
|
|
898
922
|
"my_repolica_set"
|
|
899
923
|
]
|
|
900
924
|
},
|
|
925
|
+
"addSrv": {
|
|
926
|
+
"type": "boolean",
|
|
927
|
+
"description": "Whether the connection requires the mongodb+srv:// protocol. If true, uses mongodb+srv:// protocol. Note: mongodb+srv:// can also be used for non-Atlas deployments that support DNS SRV records",
|
|
928
|
+
"default": false
|
|
929
|
+
},
|
|
901
930
|
"db_ssl": {
|
|
902
931
|
"type": "object",
|
|
903
932
|
"description": "SSL for mongo database connection",
|
|
@@ -938,6 +967,38 @@
|
|
|
938
967
|
}
|
|
939
968
|
}
|
|
940
969
|
}
|
|
970
|
+
},
|
|
971
|
+
"dependencies": {
|
|
972
|
+
"dbAuth": {
|
|
973
|
+
"oneOf": [
|
|
974
|
+
{
|
|
975
|
+
"properties": {
|
|
976
|
+
"dbAuth": {
|
|
977
|
+
"const": false
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"properties": {
|
|
983
|
+
"dbAuth": {
|
|
984
|
+
"const": true
|
|
985
|
+
},
|
|
986
|
+
"username": {
|
|
987
|
+
"type": "string",
|
|
988
|
+
"minLength": 1
|
|
989
|
+
},
|
|
990
|
+
"password": {
|
|
991
|
+
"type": "string",
|
|
992
|
+
"minLength": 1
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"required": [
|
|
996
|
+
"username",
|
|
997
|
+
"password"
|
|
998
|
+
]
|
|
999
|
+
}
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
941
1002
|
}
|
|
942
1003
|
},
|
|
943
1004
|
"devicebroker": {
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
3
|
-
"configLines":
|
|
4
|
-
"scriptLines":
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
2
|
+
"version": "0.3.6",
|
|
3
|
+
"configLines": 4123,
|
|
4
|
+
"scriptLines": 2498,
|
|
5
|
+
"codeLines": 3048,
|
|
6
|
+
"testLines": 4327,
|
|
7
|
+
"testCases": 189,
|
|
8
|
+
"totalCodeLines": 9873,
|
|
9
9
|
"wfTasks": 35
|
|
10
10
|
}
|