@itentialopensource/adapter-microsoft_office365 0.1.1 → 0.2.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.
Files changed (56) hide show
  1. package/AUTH.md +41 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +222 -0
  4. package/CHANGELOG.md +8 -1
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +3 -148
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +235 -576
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +20 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +391 -263
  14. package/adapterBase.js +854 -408
  15. package/changelogs/changelog.md +9 -0
  16. package/entities/.generic/action.json +110 -5
  17. package/entities/.generic/schema.json +6 -1
  18. package/error.json +6 -0
  19. package/metadata.json +57 -0
  20. package/package.json +28 -22
  21. package/pronghorn.json +691 -88
  22. package/propertiesDecorators.json +14 -0
  23. package/propertiesSchema.json +829 -8
  24. package/refs?service=git-upload-pack +0 -0
  25. package/report/adapter-openapi.json +509 -0
  26. package/report/adapter-openapi.yaml +349 -0
  27. package/report/adapterInfo.json +10 -0
  28. package/report/updateReport1691511327831.json +120 -0
  29. package/report/updateReport1692202817366.json +120 -0
  30. package/report/updateReport1694463941759.json +120 -0
  31. package/report/updateReport1698421603077.json +120 -0
  32. package/sampleProperties.json +153 -3
  33. package/test/integration/adapterTestBasicGet.js +3 -5
  34. package/test/integration/adapterTestConnectivity.js +91 -42
  35. package/test/integration/adapterTestIntegration.js +166 -114
  36. package/test/unit/adapterBaseTestUnit.js +388 -308
  37. package/test/unit/adapterTestUnit.js +490 -252
  38. package/utils/adapterInfo.js +206 -0
  39. package/utils/addAuth.js +94 -0
  40. package/utils/artifactize.js +1 -1
  41. package/utils/basicGet.js +1 -14
  42. package/utils/checkMigrate.js +1 -1
  43. package/utils/entitiesToDB.js +179 -0
  44. package/utils/findPath.js +1 -1
  45. package/utils/methodDocumentor.js +273 -0
  46. package/utils/modify.js +14 -16
  47. package/utils/packModificationScript.js +1 -1
  48. package/utils/patches2bundledDeps.js +90 -0
  49. package/utils/pre-commit.sh +5 -0
  50. package/utils/removeHooks.js +20 -0
  51. package/utils/taskMover.js +309 -0
  52. package/utils/tbScript.js +129 -53
  53. package/utils/tbUtils.js +125 -25
  54. package/utils/testRunner.js +17 -17
  55. package/utils/troubleshootingAdapter.js +10 -31
  56. package/workflows/README.md +0 -3
@@ -18,6 +18,11 @@
18
18
  "minimum": 1,
19
19
  "maximum": 65535
20
20
  },
21
+ "choosepath": {
22
+ "type": "string",
23
+ "description": "choose the path to use -- requires entityPath choices",
24
+ "default": ""
25
+ },
21
26
  "base_path": {
22
27
  "type": "string",
23
28
  "description": "a base path that is consistent across api calls",
@@ -93,6 +98,25 @@
93
98
  },
94
99
  "mongo": {
95
100
  "$ref": "#/definitions/mongo"
101
+ },
102
+ "encode_queryvars": {
103
+ "type": "boolean",
104
+ "description": "When true the query parameters are encoded in the url",
105
+ "default": true
106
+ },
107
+ "devicebroker": {
108
+ "$ref": "#/definitions/devicebroker"
109
+ },
110
+ "cache": {
111
+ "$ref": "#/definitions/cache"
112
+ },
113
+ "service": {
114
+ "type": "string",
115
+ "description": "Service we are integrating with -- used with AWS Authentication",
116
+ "examples": [
117
+ "ec2",
118
+ "route53"
119
+ ]
96
120
  }
97
121
  },
98
122
  "required": [
@@ -114,7 +138,9 @@
114
138
  "static_token",
115
139
  "jwt_token",
116
140
  "request_token",
117
- "no_authentication"
141
+ "no_authentication",
142
+ "multi_step_authentication",
143
+ "aws_authentication"
118
144
  ]
119
145
  },
120
146
  "username": {
@@ -247,6 +273,74 @@
247
273
  "type": "string",
248
274
  "description": "The grant type for OAuth requests - can also provide in schema",
249
275
  "default": ""
276
+ },
277
+ "sensitive": {
278
+ "type": "array",
279
+ "description": "List of sensitive keys to search and hide values from being logged",
280
+ "default": [],
281
+ "items": {
282
+ "type": "string"
283
+ }
284
+ },
285
+ "sso": {
286
+ "type": "object",
287
+ "properties": {
288
+ "protocol": {
289
+ "type": "string",
290
+ "description": "the protocol to request token from system",
291
+ "default": "",
292
+ "enum": [
293
+ "http",
294
+ "https",
295
+ ""
296
+ ]
297
+ },
298
+ "host": {
299
+ "type": "string",
300
+ "description": "hostname of the authentication system",
301
+ "default": "",
302
+ "examples": [
303
+ "systemx.customer.com"
304
+ ]
305
+ },
306
+ "port": {
307
+ "type": "integer",
308
+ "description": "port on which to connect to the authentication system",
309
+ "default": 0,
310
+ "minimum": 0,
311
+ "maximum": 65535
312
+ }
313
+ }
314
+ },
315
+ "multiStepAuthCalls": {
316
+ "type": "array",
317
+ "items": {
318
+ "type": "object",
319
+ "properties": {
320
+ "name": {
321
+ "type": "string",
322
+ "description": "Id of the step call",
323
+ "examples": [
324
+ "getAccessToken"
325
+ ]
326
+ },
327
+ "requestFields": {
328
+ "type": "object",
329
+ "description": "The fields set in step request"
330
+ },
331
+ "responseFields": {
332
+ "type": "object",
333
+ "description": "The fields from the step result"
334
+ },
335
+ "successfullResponseCode": {
336
+ "type": "integer",
337
+ "description": "Expected response code for given step, if not set any successfull http response is accepted",
338
+ "examples": [
339
+ 200
340
+ ]
341
+ }
342
+ }
343
+ }
250
344
  }
251
345
  },
252
346
  "required": [
@@ -347,7 +441,13 @@
347
441
  },
348
442
  "query_object": {
349
443
  "type": "object",
350
- "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
444
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter",
445
+ "default": {}
446
+ },
447
+ "addlHeaders": {
448
+ "type": "object",
449
+ "description": "headers that will be appended to the headers for the call",
450
+ "default": {}
351
451
  }
352
452
  },
353
453
  "required": [
@@ -405,7 +505,7 @@
405
505
  },
406
506
  "concurrent_max": {
407
507
  "type": "integer",
408
- "description": "defines the number of request that Pronghorn can send Microsoft_Office365 at one time",
508
+ "description": "defines the number of request that Pronghorn can send microsoft_office365 at one time",
409
509
  "default": 1,
410
510
  "minimum": 0,
411
511
  "maximum": 1000
@@ -419,7 +519,7 @@
419
519
  },
420
520
  "avg_runtime": {
421
521
  "type": "integer",
422
- "description": "an approximate average of how long it takes Microsoft_Office365 to handle each request",
522
+ "description": "an approximate average of how long it takes microsoft_office365 to handle each request",
423
523
  "default": 200,
424
524
  "minimum": 50,
425
525
  "maximum": 60000
@@ -427,6 +527,7 @@
427
527
  "priorities": {
428
528
  "type": "array",
429
529
  "description": "define your priorities here",
530
+ "default": [],
430
531
  "items": {
431
532
  "type": "object",
432
533
  "properties": {
@@ -497,6 +598,7 @@
497
598
  "failover_codes": {
498
599
  "type": "array",
499
600
  "description": "An array of codes where it is ok to try another method",
601
+ "default": [],
500
602
  "items": {
501
603
  "type": "integer"
502
604
  }
@@ -514,19 +616,23 @@
514
616
  "properties": {
515
617
  "payload": {
516
618
  "type": "object",
517
- "description": "payload fields that will be appended to the provided payload (excluding GET calls)"
619
+ "description": "payload fields that will be appended to the provided payload (excluding GET calls)",
620
+ "default": {}
518
621
  },
519
622
  "uriOptions": {
520
623
  "type": "object",
521
- "description": "options that will be appended to all GET calls"
624
+ "description": "options that will be appended to all GET calls",
625
+ "default": {}
522
626
  },
523
627
  "addlHeaders": {
524
628
  "type": "object",
525
- "description": "headers that will be appended to the headers for the call"
629
+ "description": "headers that will be appended to the headers for the call",
630
+ "default": {}
526
631
  },
527
632
  "authData": {
528
633
  "type": "object",
529
- "description": "authentication data that will be appended to the payload for authentication calls"
634
+ "description": "authentication data that will be appended to the payload for authentication calls",
635
+ "default": {}
530
636
  }
531
637
  }
532
638
  },
@@ -833,6 +939,721 @@
833
939
  }
834
940
  }
835
941
  }
942
+ },
943
+ "devicebroker": {
944
+ "type": "object",
945
+ "properties": {
946
+ "getDevice": {
947
+ "type": "array",
948
+ "description": "Broker call(s) to getDevice",
949
+ "items": {
950
+ "type": "object",
951
+ "properties": {
952
+ "path": {
953
+ "type": "string",
954
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
955
+ "default": ""
956
+ },
957
+ "method": {
958
+ "type": "string",
959
+ "description": "The method of the call to getDevice",
960
+ "default": "GET"
961
+ },
962
+ "query": {
963
+ "type": "object",
964
+ "description": "The json object with query parameters of the call to getDevice",
965
+ "additionalProperties": {
966
+ "type": [
967
+ "string",
968
+ "number"
969
+ ]
970
+ }
971
+ },
972
+ "body": {
973
+ "type": "object",
974
+ "description": "The json object with body of the call to getDevice",
975
+ "additionalProperties": {
976
+ "type": [
977
+ "string",
978
+ "number"
979
+ ]
980
+ }
981
+ },
982
+ "headers": {
983
+ "type": "object",
984
+ "description": "The json object with headers of the call to getDevice",
985
+ "additionalProperties": {
986
+ "type": [
987
+ "string",
988
+ "number"
989
+ ]
990
+ }
991
+ },
992
+ "handleFailure": {
993
+ "type": "string",
994
+ "enum": [
995
+ "ignore",
996
+ "fail"
997
+ ],
998
+ "description": "return failure or ignore failure",
999
+ "default": "ignore"
1000
+ },
1001
+ "requestFields": {
1002
+ "type": "object",
1003
+ "description": "The json object with response fields of the call to getDevice",
1004
+ "additionalProperties": {
1005
+ "type": [
1006
+ "string",
1007
+ "number"
1008
+ ]
1009
+ },
1010
+ "properties": {}
1011
+ },
1012
+ "responseDatakey": {
1013
+ "type": "string",
1014
+ "description": "place in the response where the data is - supports jsonquery",
1015
+ "default": ""
1016
+ },
1017
+ "responseFields": {
1018
+ "type": "object",
1019
+ "description": "The json object with response fields of the call to getDevice",
1020
+ "additionalProperties": {
1021
+ "type": [
1022
+ "string",
1023
+ "number"
1024
+ ]
1025
+ },
1026
+ "properties": {
1027
+ "name": {
1028
+ "type": "string",
1029
+ "description": "The field in response to getDevice that contains the name of the device",
1030
+ "default": "name"
1031
+ },
1032
+ "ostype": {
1033
+ "type": "string",
1034
+ "description": "The field in response to getDevice that contains the ostype of the device",
1035
+ "default": "ostype"
1036
+ },
1037
+ "ostypePrefix": {
1038
+ "type": "string",
1039
+ "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1040
+ "default": ""
1041
+ },
1042
+ "port": {
1043
+ "type": "string",
1044
+ "description": "The field in response to getDevice that contains the port of the device",
1045
+ "default": ""
1046
+ },
1047
+ "ipaddress": {
1048
+ "type": "string",
1049
+ "description": "The field in response to getDevice that contains the ip address of the device",
1050
+ "default": ""
1051
+ }
1052
+ }
1053
+ }
1054
+ }
1055
+ }
1056
+ },
1057
+ "getDevicesFiltered": {
1058
+ "type": "array",
1059
+ "description": "Broker call(s) to getDevicesFiltered",
1060
+ "items": {
1061
+ "type": "object",
1062
+ "properties": {
1063
+ "path": {
1064
+ "type": "string",
1065
+ "description": "The fully qualified path of the call to getDevicesFiltered (e.g. /rest/api/device/{deviceid})",
1066
+ "default": ""
1067
+ },
1068
+ "method": {
1069
+ "type": "string",
1070
+ "description": "The method of the call to getDevicesFiltered",
1071
+ "default": "GET"
1072
+ },
1073
+ "pagination": {
1074
+ "type": "object",
1075
+ "description": "todo",
1076
+ "properties": {
1077
+ "offsetVar": {
1078
+ "type": "string",
1079
+ "description": "Name of variable that defines how to go to next set of results"
1080
+ },
1081
+ "limitVar": {
1082
+ "type": "string",
1083
+ "description": "Name of variable that defines the max results returned in a request"
1084
+ },
1085
+ "incrementBy": {
1086
+ "type": "string",
1087
+ "enum": [
1088
+ "limit",
1089
+ "page"
1090
+ ],
1091
+ "description": "How to incremenet offset. Default limit",
1092
+ "default": "limit"
1093
+ },
1094
+ "requestLocation": {
1095
+ "type": "string",
1096
+ "enum": [
1097
+ "query",
1098
+ "body"
1099
+ ],
1100
+ "description": "Where in request the pagination data goes",
1101
+ "default": "query"
1102
+ }
1103
+ }
1104
+ },
1105
+ "query": {
1106
+ "type": "object",
1107
+ "description": "The json object with query parameters of the call to getDevicesFiltered",
1108
+ "additionalProperties": {
1109
+ "type": [
1110
+ "string",
1111
+ "number"
1112
+ ]
1113
+ }
1114
+ },
1115
+ "body": {
1116
+ "type": "object",
1117
+ "description": "The json object with body of the call to getDevicesFiltered",
1118
+ "additionalProperties": {
1119
+ "type": [
1120
+ "string",
1121
+ "number"
1122
+ ]
1123
+ }
1124
+ },
1125
+ "headers": {
1126
+ "type": "object",
1127
+ "description": "The json object with headers of the call to getDevicesFiltered",
1128
+ "additionalProperties": {
1129
+ "type": [
1130
+ "string",
1131
+ "number"
1132
+ ]
1133
+ }
1134
+ },
1135
+ "handleFailure": {
1136
+ "type": "string",
1137
+ "enum": [
1138
+ "ignore",
1139
+ "fail"
1140
+ ],
1141
+ "description": "return failure or ignore failure",
1142
+ "default": "ignore"
1143
+ },
1144
+ "requestFields": {
1145
+ "type": "object",
1146
+ "description": "The json object with response fields of the call to getDevice",
1147
+ "additionalProperties": {
1148
+ "type": [
1149
+ "string",
1150
+ "number"
1151
+ ]
1152
+ },
1153
+ "properties": {}
1154
+ },
1155
+ "responseDatakey": {
1156
+ "type": "string",
1157
+ "description": "place in the response where the data is - supports jsonquery",
1158
+ "default": ""
1159
+ },
1160
+ "responseFields": {
1161
+ "type": "object",
1162
+ "description": "The json object with response fields of the call to getDevicesFiltered",
1163
+ "additionalProperties": {
1164
+ "type": [
1165
+ "string",
1166
+ "number"
1167
+ ]
1168
+ },
1169
+ "properties": {
1170
+ "name": {
1171
+ "type": "string",
1172
+ "description": "The field in response to getDevicesFiltered that contains the name of the device",
1173
+ "default": "name"
1174
+ },
1175
+ "ostype": {
1176
+ "type": "string",
1177
+ "description": "The field in response to getDevicesFiltered that contains the ostype of the device",
1178
+ "default": "ostype"
1179
+ },
1180
+ "ostypePrefix": {
1181
+ "type": "string",
1182
+ "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1183
+ "default": ""
1184
+ },
1185
+ "port": {
1186
+ "type": "string",
1187
+ "description": "The field in response to getDevicesFiltered that contains the port of the device",
1188
+ "default": ""
1189
+ },
1190
+ "ipaddress": {
1191
+ "type": "string",
1192
+ "description": "The field in response to getDevicesFiltered that contains the ip address of the device",
1193
+ "default": ""
1194
+ }
1195
+ }
1196
+ }
1197
+ }
1198
+ }
1199
+ },
1200
+ "isAlive": {
1201
+ "type": "array",
1202
+ "description": "Broker call(s) to determine if the device isAlive",
1203
+ "items": {
1204
+ "type": "object",
1205
+ "properties": {
1206
+ "path": {
1207
+ "type": "string",
1208
+ "description": "The fully qualified path of the call to isAlive (e.g. /rest/api/device/{deviceid})",
1209
+ "default": ""
1210
+ },
1211
+ "method": {
1212
+ "type": "string",
1213
+ "description": "The method of the call to isAlive",
1214
+ "default": "GET"
1215
+ },
1216
+ "query": {
1217
+ "type": "object",
1218
+ "description": "The json object with query parameters of the call to isAlive",
1219
+ "additionalProperties": {
1220
+ "type": [
1221
+ "string",
1222
+ "number"
1223
+ ]
1224
+ }
1225
+ },
1226
+ "body": {
1227
+ "type": "object",
1228
+ "description": "The json object with body of the call to isAlive",
1229
+ "additionalProperties": {
1230
+ "type": [
1231
+ "string",
1232
+ "number"
1233
+ ]
1234
+ }
1235
+ },
1236
+ "headers": {
1237
+ "type": "object",
1238
+ "description": "The json object with headers of the call to isAlive",
1239
+ "additionalProperties": {
1240
+ "type": [
1241
+ "string",
1242
+ "number"
1243
+ ]
1244
+ }
1245
+ },
1246
+ "handleFailure": {
1247
+ "type": "string",
1248
+ "enum": [
1249
+ "ignore",
1250
+ "fail"
1251
+ ],
1252
+ "description": "return failure or ignore isAlive",
1253
+ "default": "ignore"
1254
+ },
1255
+ "requestFields": {
1256
+ "type": "object",
1257
+ "description": "The json object with response fields of the call to getDevice",
1258
+ "additionalProperties": {
1259
+ "type": [
1260
+ "string",
1261
+ "number"
1262
+ ]
1263
+ },
1264
+ "properties": {}
1265
+ },
1266
+ "responseDatakey": {
1267
+ "type": "string",
1268
+ "description": "place in the response where the data is - supports jsonquery",
1269
+ "default": ""
1270
+ },
1271
+ "responseFields": {
1272
+ "type": "object",
1273
+ "description": "The json object with response fields of the call to isAlive",
1274
+ "additionalProperties": {
1275
+ "type": [
1276
+ "string",
1277
+ "number"
1278
+ ]
1279
+ },
1280
+ "properties": {
1281
+ "status": {
1282
+ "type": "string",
1283
+ "description": "The field in response to isAlive that contains the status of the device",
1284
+ "default": "name"
1285
+ },
1286
+ "statusValue": {
1287
+ "type": "string",
1288
+ "description": "The expected value in the status field",
1289
+ "default": "true"
1290
+ }
1291
+ }
1292
+ }
1293
+ }
1294
+ }
1295
+ },
1296
+ "getConfig": {
1297
+ "type": "array",
1298
+ "description": "Broker call(s) to getConfig",
1299
+ "items": {
1300
+ "type": "object",
1301
+ "properties": {
1302
+ "path": {
1303
+ "type": "string",
1304
+ "description": "The fully qualified path of the call to getConfig (e.g. /rest/api/device/{deviceid})",
1305
+ "default": ""
1306
+ },
1307
+ "method": {
1308
+ "type": "string",
1309
+ "description": "The method of the call to getConfig",
1310
+ "default": "GET"
1311
+ },
1312
+ "query": {
1313
+ "type": "object",
1314
+ "description": "The json object with query parameters of the call to getConfig",
1315
+ "additionalProperties": {
1316
+ "type": [
1317
+ "string",
1318
+ "number"
1319
+ ]
1320
+ }
1321
+ },
1322
+ "body": {
1323
+ "type": "object",
1324
+ "description": "The json object with body of the call to getConfig",
1325
+ "additionalProperties": {
1326
+ "type": [
1327
+ "string",
1328
+ "number"
1329
+ ]
1330
+ }
1331
+ },
1332
+ "headers": {
1333
+ "type": "object",
1334
+ "description": "The json object with headers of the call to getConfig",
1335
+ "additionalProperties": {
1336
+ "type": [
1337
+ "string",
1338
+ "number"
1339
+ ]
1340
+ }
1341
+ },
1342
+ "handleFailure": {
1343
+ "type": "string",
1344
+ "enum": [
1345
+ "ignore",
1346
+ "fail"
1347
+ ],
1348
+ "description": "return failure or ignore getConfig",
1349
+ "default": "ignore"
1350
+ },
1351
+ "requestFields": {
1352
+ "type": "object",
1353
+ "description": "The json object with response fields of the call to getDevice",
1354
+ "additionalProperties": {
1355
+ "type": [
1356
+ "string",
1357
+ "number"
1358
+ ]
1359
+ },
1360
+ "properties": {}
1361
+ },
1362
+ "responseDatakey": {
1363
+ "type": "string",
1364
+ "description": "place in the response where the data is - supports jsonquery",
1365
+ "default": ""
1366
+ },
1367
+ "responseFields": {
1368
+ "type": "object",
1369
+ "description": "The json object with response fields of the call to getConfig",
1370
+ "additionalProperties": {
1371
+ "type": [
1372
+ "string",
1373
+ "number"
1374
+ ]
1375
+ },
1376
+ "properties": {}
1377
+ }
1378
+ }
1379
+ }
1380
+ },
1381
+ "getCount": {
1382
+ "type": "array",
1383
+ "description": "Broker call(s) to getCount",
1384
+ "items": {
1385
+ "type": "object",
1386
+ "properties": {
1387
+ "path": {
1388
+ "type": "string",
1389
+ "description": "The fully qualified path of the call to getCount (e.g. /rest/api/device/{deviceid})",
1390
+ "default": ""
1391
+ },
1392
+ "method": {
1393
+ "type": "string",
1394
+ "description": "The method of the call to getCount",
1395
+ "default": "GET"
1396
+ },
1397
+ "query": {
1398
+ "type": "object",
1399
+ "description": "The json object with query parameters of the call to getCount",
1400
+ "additionalProperties": {
1401
+ "type": [
1402
+ "string",
1403
+ "number"
1404
+ ]
1405
+ }
1406
+ },
1407
+ "body": {
1408
+ "type": "object",
1409
+ "description": "The json object with body of the call to getCount",
1410
+ "additionalProperties": {
1411
+ "type": [
1412
+ "string",
1413
+ "number"
1414
+ ]
1415
+ }
1416
+ },
1417
+ "headers": {
1418
+ "type": "object",
1419
+ "description": "The json object with headers of the call to getCount",
1420
+ "additionalProperties": {
1421
+ "type": [
1422
+ "string",
1423
+ "number"
1424
+ ]
1425
+ }
1426
+ },
1427
+ "handleFailure": {
1428
+ "type": "string",
1429
+ "enum": [
1430
+ "ignore",
1431
+ "fail"
1432
+ ],
1433
+ "description": "return failure or ignore getCount",
1434
+ "default": "ignore"
1435
+ },
1436
+ "requestFields": {
1437
+ "type": "object",
1438
+ "description": "The json object with response fields of the call to getDevice",
1439
+ "additionalProperties": {
1440
+ "type": [
1441
+ "string",
1442
+ "number"
1443
+ ]
1444
+ },
1445
+ "properties": {}
1446
+ },
1447
+ "responseDatakey": {
1448
+ "type": "string",
1449
+ "description": "place in the response where the data is - supports jsonquery",
1450
+ "default": ""
1451
+ },
1452
+ "responseFields": {
1453
+ "type": "object",
1454
+ "description": "The json object with response fields of the call to getConfig",
1455
+ "additionalProperties": {
1456
+ "type": [
1457
+ "string",
1458
+ "number"
1459
+ ]
1460
+ },
1461
+ "properties": {}
1462
+ }
1463
+ }
1464
+ }
1465
+ }
1466
+ }
1467
+ },
1468
+ "cache": {
1469
+ "type": "object",
1470
+ "properties": {
1471
+ "enabled": {
1472
+ "type": "boolean",
1473
+ "description": "Whether or not cache is enabled for adapter",
1474
+ "default": false
1475
+ },
1476
+ "entities": {
1477
+ "type": "array",
1478
+ "description": "Information for the cached entities",
1479
+ "items": {
1480
+ "type": "object",
1481
+ "properties": {
1482
+ "entityType": {
1483
+ "type": "string",
1484
+ "description": "The name of the entity - should match adapter entity configuration or a broker (e.g. Device)",
1485
+ "default": ""
1486
+ },
1487
+ "frequency": {
1488
+ "type": "integer",
1489
+ "description": "how long (in minutes) we wait to re-populate the cache",
1490
+ "default": 1440,
1491
+ "maximum": 10080
1492
+ },
1493
+ "flushOnFail": {
1494
+ "type": "boolean",
1495
+ "description": "Whether to clear the cache we have if the populate failed",
1496
+ "default": false
1497
+ },
1498
+ "limit": {
1499
+ "type": "integer",
1500
+ "description": "maximum number of items to keep in cache",
1501
+ "default": 1000
1502
+ },
1503
+ "retryAttempts": {
1504
+ "type": "integer",
1505
+ "description": "number of times to retry the populate call before failure",
1506
+ "default": 5
1507
+ },
1508
+ "sort": {
1509
+ "type": "boolean",
1510
+ "description": "whether to sort the data or not",
1511
+ "default": true
1512
+ },
1513
+ "populate": {
1514
+ "type": "array",
1515
+ "description": "Information for the call(s) used to populate the cache",
1516
+ "items": {
1517
+ "type": "object",
1518
+ "properties": {
1519
+ "path": {
1520
+ "type": "string",
1521
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
1522
+ "default": ""
1523
+ },
1524
+ "method": {
1525
+ "type": "string",
1526
+ "description": "The method of the call to getDevice",
1527
+ "default": "GET"
1528
+ },
1529
+ "pagination": {
1530
+ "type": "object",
1531
+ "description": "todo",
1532
+ "properties": {
1533
+ "offsetVar": {
1534
+ "type": "string",
1535
+ "description": "Name of variable that defines how to go to next set of results"
1536
+ },
1537
+ "limitVar": {
1538
+ "type": "string",
1539
+ "description": "Name of variable that defines the max results returned in a request"
1540
+ },
1541
+ "incrementBy": {
1542
+ "type": "string",
1543
+ "enum": [
1544
+ "limit",
1545
+ "page"
1546
+ ],
1547
+ "description": "How to incremenet offset. Default limit",
1548
+ "default": "limit"
1549
+ },
1550
+ "requestLocation": {
1551
+ "type": "string",
1552
+ "enum": [
1553
+ "query",
1554
+ "body"
1555
+ ],
1556
+ "description": "Where in request the pagination data goes",
1557
+ "default": "query"
1558
+ }
1559
+ }
1560
+ },
1561
+ "query": {
1562
+ "type": "object",
1563
+ "description": "The json object with query parameters of the call to getDevice",
1564
+ "additionalProperties": {
1565
+ "type": [
1566
+ "string",
1567
+ "number"
1568
+ ]
1569
+ }
1570
+ },
1571
+ "body": {
1572
+ "type": "object",
1573
+ "description": "The json object with body of the call to getDevice",
1574
+ "additionalProperties": {
1575
+ "type": [
1576
+ "string",
1577
+ "number"
1578
+ ]
1579
+ }
1580
+ },
1581
+ "headers": {
1582
+ "type": "object",
1583
+ "description": "The json object with headers of the call to getDevice",
1584
+ "additionalProperties": {
1585
+ "type": [
1586
+ "string",
1587
+ "number"
1588
+ ]
1589
+ }
1590
+ },
1591
+ "handleFailure": {
1592
+ "type": "string",
1593
+ "enum": [
1594
+ "ignore",
1595
+ "fail"
1596
+ ],
1597
+ "description": "return failure or ignore failure",
1598
+ "default": "ignore"
1599
+ },
1600
+ "requestFields": {
1601
+ "type": "object",
1602
+ "description": "The json object with response fields of the call to getDevice",
1603
+ "additionalProperties": {
1604
+ "type": [
1605
+ "string",
1606
+ "number"
1607
+ ]
1608
+ },
1609
+ "properties": {}
1610
+ },
1611
+ "responseDatakey": {
1612
+ "type": "string",
1613
+ "description": "place in the response where the data is - supports jsonquery",
1614
+ "default": ""
1615
+ },
1616
+ "responseFields": {
1617
+ "type": "object",
1618
+ "description": "The json object with response fields of the call to getDevice",
1619
+ "additionalProperties": {
1620
+ "type": [
1621
+ "string",
1622
+ "number"
1623
+ ]
1624
+ }
1625
+ }
1626
+ }
1627
+ }
1628
+ },
1629
+ "cachedTasks": {
1630
+ "type": "array",
1631
+ "description": "Information for the call(s) used to populate the cache",
1632
+ "items": {
1633
+ "type": "object",
1634
+ "properties": {
1635
+ "name": {
1636
+ "type": "string",
1637
+ "description": "the name of the task/action that should utilize cached information",
1638
+ "default": ""
1639
+ },
1640
+ "filterField": {
1641
+ "type": "string",
1642
+ "description": "the field that contains filter information for this call",
1643
+ "default": ""
1644
+ },
1645
+ "filterLoc": {
1646
+ "type": "string",
1647
+ "description": "the field that contains the location of the filter field",
1648
+ "default": ""
1649
+ }
1650
+ }
1651
+ }
1652
+ }
1653
+ }
1654
+ }
1655
+ }
1656
+ }
836
1657
  }
837
1658
  }
838
1659
  }