@itentialopensource/adapter-sharepoint 0.1.1 → 0.2.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.
@@ -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",
@@ -78,6 +83,14 @@
78
83
  "https"
79
84
  ]
80
85
  },
86
+ "service": {
87
+ "type": "string",
88
+ "description": "Service we are integrating with -- used with AWS Authentication",
89
+ "examples": [
90
+ "ec2",
91
+ "route53"
92
+ ]
93
+ },
81
94
  "authentication": {
82
95
  "$ref": "#/definitions/authentication"
83
96
  },
@@ -101,6 +114,9 @@
101
114
  },
102
115
  "devicebroker": {
103
116
  "$ref": "#/definitions/devicebroker"
117
+ },
118
+ "cache": {
119
+ "$ref": "#/definitions/cache"
104
120
  }
105
121
  },
106
122
  "required": [
@@ -122,7 +138,9 @@
122
138
  "static_token",
123
139
  "jwt_token",
124
140
  "request_token",
125
- "no_authentication"
141
+ "no_authentication",
142
+ "multi_step_authentication",
143
+ "aws_authentication"
126
144
  ]
127
145
  },
128
146
  "username": {
@@ -255,6 +273,74 @@
255
273
  "type": "string",
256
274
  "description": "The grant type for OAuth requests - can also provide in schema",
257
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
+ }
258
344
  }
259
345
  },
260
346
  "required": [
@@ -357,7 +443,13 @@
357
443
  },
358
444
  "query_object": {
359
445
  "type": "object",
360
- "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
446
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter",
447
+ "default": {}
448
+ },
449
+ "addlHeaders": {
450
+ "type": "object",
451
+ "description": "headers that will be appended to the headers for the call",
452
+ "default": {}
361
453
  }
362
454
  },
363
455
  "required": [
@@ -437,6 +529,7 @@
437
529
  "priorities": {
438
530
  "type": "array",
439
531
  "description": "define your priorities here",
532
+ "default": [],
440
533
  "items": {
441
534
  "type": "object",
442
535
  "properties": {
@@ -507,6 +600,7 @@
507
600
  "failover_codes": {
508
601
  "type": "array",
509
602
  "description": "An array of codes where it is ok to try another method",
603
+ "default": [],
510
604
  "items": {
511
605
  "type": "integer"
512
606
  }
@@ -524,19 +618,23 @@
524
618
  "properties": {
525
619
  "payload": {
526
620
  "type": "object",
527
- "description": "payload fields that will be appended to the provided payload (excluding GET calls)"
621
+ "description": "payload fields that will be appended to the provided payload (excluding GET calls)",
622
+ "default": {}
528
623
  },
529
624
  "uriOptions": {
530
625
  "type": "object",
531
- "description": "options that will be appended to all GET calls"
626
+ "description": "options that will be appended to all GET calls",
627
+ "default": {}
532
628
  },
533
629
  "addlHeaders": {
534
630
  "type": "object",
535
- "description": "headers that will be appended to the headers for the call"
631
+ "description": "headers that will be appended to the headers for the call",
632
+ "default": {}
536
633
  },
537
634
  "authData": {
538
635
  "type": "object",
539
- "description": "authentication data that will be appended to the payload for authentication calls"
636
+ "description": "authentication data that will be appended to the payload for authentication calls",
637
+ "default": {}
540
638
  }
541
639
  }
542
640
  },
@@ -851,6 +949,7 @@
851
949
  "type": "array",
852
950
  "description": "Broker call(s) to getDevice",
853
951
  "items": {
952
+ "type": "object",
854
953
  "properties": {
855
954
  "path": {
856
955
  "type": "string",
@@ -866,26 +965,38 @@
866
965
  "type": "object",
867
966
  "description": "The json object with query parameters of the call to getDevice",
868
967
  "additionalProperties": {
869
- "type": "string"
968
+ "type": [
969
+ "string",
970
+ "number"
971
+ ]
870
972
  }
871
973
  },
872
974
  "body": {
873
975
  "type": "object",
874
976
  "description": "The json object with body of the call to getDevice",
875
977
  "additionalProperties": {
876
- "type": "string"
978
+ "type": [
979
+ "string",
980
+ "number"
981
+ ]
877
982
  }
878
983
  },
879
984
  "headers": {
880
985
  "type": "object",
881
986
  "description": "The json object with headers of the call to getDevice",
882
987
  "additionalProperties": {
883
- "type": "string"
988
+ "type": [
989
+ "string",
990
+ "number"
991
+ ]
884
992
  }
885
993
  },
886
994
  "handleFailure": {
887
995
  "type": "string",
888
- "enum": ["ignore", "fail"],
996
+ "enum": [
997
+ "ignore",
998
+ "fail"
999
+ ],
889
1000
  "description": "return failure or ignore failure",
890
1001
  "default": "ignore"
891
1002
  },
@@ -893,7 +1004,10 @@
893
1004
  "type": "object",
894
1005
  "description": "The json object with response fields of the call to getDevice",
895
1006
  "additionalProperties": {
896
- "type": "string"
1007
+ "type": [
1008
+ "string",
1009
+ "number"
1010
+ ]
897
1011
  },
898
1012
  "properties": {}
899
1013
  },
@@ -906,7 +1020,10 @@
906
1020
  "type": "object",
907
1021
  "description": "The json object with response fields of the call to getDevice",
908
1022
  "additionalProperties": {
909
- "type": "string"
1023
+ "type": [
1024
+ "string",
1025
+ "number"
1026
+ ]
910
1027
  },
911
1028
  "properties": {
912
1029
  "name": {
@@ -943,6 +1060,7 @@
943
1060
  "type": "array",
944
1061
  "description": "Broker call(s) to getDevicesFiltered",
945
1062
  "items": {
1063
+ "type": "object",
946
1064
  "properties": {
947
1065
  "path": {
948
1066
  "type": "string",
@@ -954,30 +1072,74 @@
954
1072
  "description": "The method of the call to getDevicesFiltered",
955
1073
  "default": "GET"
956
1074
  },
1075
+ "pagination": {
1076
+ "type": "object",
1077
+ "description": "todo",
1078
+ "properties": {
1079
+ "offsetVar": {
1080
+ "type": "string",
1081
+ "description": "Name of variable that defines how to go to next set of results"
1082
+ },
1083
+ "limitVar": {
1084
+ "type": "string",
1085
+ "description": "Name of variable that defines the max results returned in a request"
1086
+ },
1087
+ "incrementBy": {
1088
+ "type": "string",
1089
+ "enum": [
1090
+ "limit",
1091
+ "page"
1092
+ ],
1093
+ "description": "How to incremenet offset. Default limit",
1094
+ "default": "limit"
1095
+ },
1096
+ "requestLocation": {
1097
+ "type": "string",
1098
+ "enum": [
1099
+ "query",
1100
+ "body"
1101
+ ],
1102
+ "description": "Where in request the pagination data goes",
1103
+ "default": "query"
1104
+ }
1105
+ }
1106
+ },
957
1107
  "query": {
958
1108
  "type": "object",
959
1109
  "description": "The json object with query parameters of the call to getDevicesFiltered",
960
1110
  "additionalProperties": {
961
- "type": "string"
1111
+ "type": [
1112
+ "string",
1113
+ "number"
1114
+ ]
962
1115
  }
963
1116
  },
964
1117
  "body": {
965
1118
  "type": "object",
966
1119
  "description": "The json object with body of the call to getDevicesFiltered",
967
1120
  "additionalProperties": {
968
- "type": "string"
1121
+ "type": [
1122
+ "string",
1123
+ "number"
1124
+ ]
969
1125
  }
970
1126
  },
971
1127
  "headers": {
972
1128
  "type": "object",
973
1129
  "description": "The json object with headers of the call to getDevicesFiltered",
974
1130
  "additionalProperties": {
975
- "type": "string"
1131
+ "type": [
1132
+ "string",
1133
+ "number"
1134
+ ]
976
1135
  }
977
1136
  },
978
1137
  "handleFailure": {
979
1138
  "type": "string",
980
- "enum": ["ignore", "fail"],
1139
+ "enum": [
1140
+ "ignore",
1141
+ "fail"
1142
+ ],
981
1143
  "description": "return failure or ignore failure",
982
1144
  "default": "ignore"
983
1145
  },
@@ -985,7 +1147,10 @@
985
1147
  "type": "object",
986
1148
  "description": "The json object with response fields of the call to getDevice",
987
1149
  "additionalProperties": {
988
- "type": "string"
1150
+ "type": [
1151
+ "string",
1152
+ "number"
1153
+ ]
989
1154
  },
990
1155
  "properties": {}
991
1156
  },
@@ -998,7 +1163,10 @@
998
1163
  "type": "object",
999
1164
  "description": "The json object with response fields of the call to getDevicesFiltered",
1000
1165
  "additionalProperties": {
1001
- "type": "string"
1166
+ "type": [
1167
+ "string",
1168
+ "number"
1169
+ ]
1002
1170
  },
1003
1171
  "properties": {
1004
1172
  "name": {
@@ -1035,6 +1203,7 @@
1035
1203
  "type": "array",
1036
1204
  "description": "Broker call(s) to determine if the device isAlive",
1037
1205
  "items": {
1206
+ "type": "object",
1038
1207
  "properties": {
1039
1208
  "path": {
1040
1209
  "type": "string",
@@ -1050,26 +1219,38 @@
1050
1219
  "type": "object",
1051
1220
  "description": "The json object with query parameters of the call to isAlive",
1052
1221
  "additionalProperties": {
1053
- "type": "string"
1222
+ "type": [
1223
+ "string",
1224
+ "number"
1225
+ ]
1054
1226
  }
1055
1227
  },
1056
1228
  "body": {
1057
1229
  "type": "object",
1058
1230
  "description": "The json object with body of the call to isAlive",
1059
1231
  "additionalProperties": {
1060
- "type": "string"
1232
+ "type": [
1233
+ "string",
1234
+ "number"
1235
+ ]
1061
1236
  }
1062
1237
  },
1063
1238
  "headers": {
1064
1239
  "type": "object",
1065
1240
  "description": "The json object with headers of the call to isAlive",
1066
1241
  "additionalProperties": {
1067
- "type": "string"
1242
+ "type": [
1243
+ "string",
1244
+ "number"
1245
+ ]
1068
1246
  }
1069
1247
  },
1070
1248
  "handleFailure": {
1071
1249
  "type": "string",
1072
- "enum": ["ignore", "fail"],
1250
+ "enum": [
1251
+ "ignore",
1252
+ "fail"
1253
+ ],
1073
1254
  "description": "return failure or ignore isAlive",
1074
1255
  "default": "ignore"
1075
1256
  },
@@ -1077,7 +1258,10 @@
1077
1258
  "type": "object",
1078
1259
  "description": "The json object with response fields of the call to getDevice",
1079
1260
  "additionalProperties": {
1080
- "type": "string"
1261
+ "type": [
1262
+ "string",
1263
+ "number"
1264
+ ]
1081
1265
  },
1082
1266
  "properties": {}
1083
1267
  },
@@ -1090,7 +1274,10 @@
1090
1274
  "type": "object",
1091
1275
  "description": "The json object with response fields of the call to isAlive",
1092
1276
  "additionalProperties": {
1093
- "type": "string"
1277
+ "type": [
1278
+ "string",
1279
+ "number"
1280
+ ]
1094
1281
  },
1095
1282
  "properties": {
1096
1283
  "status": {
@@ -1112,6 +1299,7 @@
1112
1299
  "type": "array",
1113
1300
  "description": "Broker call(s) to getConfig",
1114
1301
  "items": {
1302
+ "type": "object",
1115
1303
  "properties": {
1116
1304
  "path": {
1117
1305
  "type": "string",
@@ -1127,26 +1315,38 @@
1127
1315
  "type": "object",
1128
1316
  "description": "The json object with query parameters of the call to getConfig",
1129
1317
  "additionalProperties": {
1130
- "type": "string"
1318
+ "type": [
1319
+ "string",
1320
+ "number"
1321
+ ]
1131
1322
  }
1132
1323
  },
1133
1324
  "body": {
1134
1325
  "type": "object",
1135
1326
  "description": "The json object with body of the call to getConfig",
1136
1327
  "additionalProperties": {
1137
- "type": "string"
1328
+ "type": [
1329
+ "string",
1330
+ "number"
1331
+ ]
1138
1332
  }
1139
1333
  },
1140
1334
  "headers": {
1141
1335
  "type": "object",
1142
1336
  "description": "The json object with headers of the call to getConfig",
1143
1337
  "additionalProperties": {
1144
- "type": "string"
1338
+ "type": [
1339
+ "string",
1340
+ "number"
1341
+ ]
1145
1342
  }
1146
1343
  },
1147
1344
  "handleFailure": {
1148
1345
  "type": "string",
1149
- "enum": ["ignore", "fail"],
1346
+ "enum": [
1347
+ "ignore",
1348
+ "fail"
1349
+ ],
1150
1350
  "description": "return failure or ignore getConfig",
1151
1351
  "default": "ignore"
1152
1352
  },
@@ -1154,7 +1354,10 @@
1154
1354
  "type": "object",
1155
1355
  "description": "The json object with response fields of the call to getDevice",
1156
1356
  "additionalProperties": {
1157
- "type": "string"
1357
+ "type": [
1358
+ "string",
1359
+ "number"
1360
+ ]
1158
1361
  },
1159
1362
  "properties": {}
1160
1363
  },
@@ -1167,10 +1370,12 @@
1167
1370
  "type": "object",
1168
1371
  "description": "The json object with response fields of the call to getConfig",
1169
1372
  "additionalProperties": {
1170
- "type": "string"
1373
+ "type": [
1374
+ "string",
1375
+ "number"
1376
+ ]
1171
1377
  },
1172
- "properties": {
1173
- }
1378
+ "properties": {}
1174
1379
  }
1175
1380
  }
1176
1381
  }
@@ -1179,6 +1384,7 @@
1179
1384
  "type": "array",
1180
1385
  "description": "Broker call(s) to getCount",
1181
1386
  "items": {
1387
+ "type": "object",
1182
1388
  "properties": {
1183
1389
  "path": {
1184
1390
  "type": "string",
@@ -1194,26 +1400,38 @@
1194
1400
  "type": "object",
1195
1401
  "description": "The json object with query parameters of the call to getCount",
1196
1402
  "additionalProperties": {
1197
- "type": "string"
1403
+ "type": [
1404
+ "string",
1405
+ "number"
1406
+ ]
1198
1407
  }
1199
1408
  },
1200
1409
  "body": {
1201
1410
  "type": "object",
1202
1411
  "description": "The json object with body of the call to getCount",
1203
1412
  "additionalProperties": {
1204
- "type": "string"
1413
+ "type": [
1414
+ "string",
1415
+ "number"
1416
+ ]
1205
1417
  }
1206
1418
  },
1207
1419
  "headers": {
1208
1420
  "type": "object",
1209
1421
  "description": "The json object with headers of the call to getCount",
1210
1422
  "additionalProperties": {
1211
- "type": "string"
1423
+ "type": [
1424
+ "string",
1425
+ "number"
1426
+ ]
1212
1427
  }
1213
1428
  },
1214
1429
  "handleFailure": {
1215
1430
  "type": "string",
1216
- "enum": ["ignore", "fail"],
1431
+ "enum": [
1432
+ "ignore",
1433
+ "fail"
1434
+ ],
1217
1435
  "description": "return failure or ignore getCount",
1218
1436
  "default": "ignore"
1219
1437
  },
@@ -1221,7 +1439,10 @@
1221
1439
  "type": "object",
1222
1440
  "description": "The json object with response fields of the call to getDevice",
1223
1441
  "additionalProperties": {
1224
- "type": "string"
1442
+ "type": [
1443
+ "string",
1444
+ "number"
1445
+ ]
1225
1446
  },
1226
1447
  "properties": {}
1227
1448
  },
@@ -1234,9 +1455,201 @@
1234
1455
  "type": "object",
1235
1456
  "description": "The json object with response fields of the call to getConfig",
1236
1457
  "additionalProperties": {
1237
- "type": "string"
1458
+ "type": [
1459
+ "string",
1460
+ "number"
1461
+ ]
1238
1462
  },
1239
- "properties": {
1463
+ "properties": {}
1464
+ }
1465
+ }
1466
+ }
1467
+ }
1468
+ }
1469
+ },
1470
+ "cache": {
1471
+ "type": "object",
1472
+ "properties": {
1473
+ "enabled": {
1474
+ "type": "boolean",
1475
+ "description": "Whether or not cache is enabled for adapter",
1476
+ "default": false
1477
+ },
1478
+ "entities": {
1479
+ "type": "array",
1480
+ "description": "Information for the cached entities",
1481
+ "items": {
1482
+ "type": "object",
1483
+ "properties": {
1484
+ "entityType": {
1485
+ "type": "string",
1486
+ "description": "The name of the entity - should match adapter entity configuration or a broker (e.g. Device)",
1487
+ "default": ""
1488
+ },
1489
+ "frequency": {
1490
+ "type": "integer",
1491
+ "description": "how long (in minutes) we wait to re-populate the cache",
1492
+ "default": 1440,
1493
+ "maximum": 10080
1494
+ },
1495
+ "flushOnFail": {
1496
+ "type": "boolean",
1497
+ "description": "Whether to clear the cache we have if the populate failed",
1498
+ "default": false
1499
+ },
1500
+ "limit": {
1501
+ "type": "integer",
1502
+ "description": "maximum number of items to keep in cache",
1503
+ "default": 1000
1504
+ },
1505
+ "retryAttempts": {
1506
+ "type": "integer",
1507
+ "description": "number of times to retry the populate call before failure",
1508
+ "default": 5
1509
+ },
1510
+ "sort": {
1511
+ "type": "boolean",
1512
+ "description": "whether to sort the data or not",
1513
+ "default": true
1514
+ },
1515
+ "populate": {
1516
+ "type": "array",
1517
+ "description": "Information for the call(s) used to populate the cache",
1518
+ "items": {
1519
+ "type": "object",
1520
+ "properties": {
1521
+ "path": {
1522
+ "type": "string",
1523
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
1524
+ "default": ""
1525
+ },
1526
+ "method": {
1527
+ "type": "string",
1528
+ "description": "The method of the call to getDevice",
1529
+ "default": "GET"
1530
+ },
1531
+ "pagination": {
1532
+ "type": "object",
1533
+ "description": "todo",
1534
+ "properties": {
1535
+ "offsetVar": {
1536
+ "type": "string",
1537
+ "description": "Name of variable that defines how to go to next set of results"
1538
+ },
1539
+ "limitVar": {
1540
+ "type": "string",
1541
+ "description": "Name of variable that defines the max results returned in a request"
1542
+ },
1543
+ "incrementBy": {
1544
+ "type": "string",
1545
+ "enum": [
1546
+ "limit",
1547
+ "page"
1548
+ ],
1549
+ "description": "How to incremenet offset. Default limit",
1550
+ "default": "limit"
1551
+ },
1552
+ "requestLocation": {
1553
+ "type": "string",
1554
+ "enum": [
1555
+ "query",
1556
+ "body"
1557
+ ],
1558
+ "description": "Where in request the pagination data goes",
1559
+ "default": "query"
1560
+ }
1561
+ }
1562
+ },
1563
+ "query": {
1564
+ "type": "object",
1565
+ "description": "The json object with query parameters of the call to getDevice",
1566
+ "additionalProperties": {
1567
+ "type": [
1568
+ "string",
1569
+ "number"
1570
+ ]
1571
+ }
1572
+ },
1573
+ "body": {
1574
+ "type": "object",
1575
+ "description": "The json object with body of the call to getDevice",
1576
+ "additionalProperties": {
1577
+ "type": [
1578
+ "string",
1579
+ "number"
1580
+ ]
1581
+ }
1582
+ },
1583
+ "headers": {
1584
+ "type": "object",
1585
+ "description": "The json object with headers of the call to getDevice",
1586
+ "additionalProperties": {
1587
+ "type": [
1588
+ "string",
1589
+ "number"
1590
+ ]
1591
+ }
1592
+ },
1593
+ "handleFailure": {
1594
+ "type": "string",
1595
+ "enum": [
1596
+ "ignore",
1597
+ "fail"
1598
+ ],
1599
+ "description": "return failure or ignore failure",
1600
+ "default": "ignore"
1601
+ },
1602
+ "requestFields": {
1603
+ "type": "object",
1604
+ "description": "The json object with response fields of the call to getDevice",
1605
+ "additionalProperties": {
1606
+ "type": [
1607
+ "string",
1608
+ "number"
1609
+ ]
1610
+ },
1611
+ "properties": {}
1612
+ },
1613
+ "responseDatakey": {
1614
+ "type": "string",
1615
+ "description": "place in the response where the data is - supports jsonquery",
1616
+ "default": ""
1617
+ },
1618
+ "responseFields": {
1619
+ "type": "object",
1620
+ "description": "The json object with response fields of the call to getDevice",
1621
+ "additionalProperties": {
1622
+ "type": [
1623
+ "string",
1624
+ "number"
1625
+ ]
1626
+ }
1627
+ }
1628
+ }
1629
+ }
1630
+ },
1631
+ "cachedTasks": {
1632
+ "type": "array",
1633
+ "description": "Information for the call(s) used to populate the cache",
1634
+ "items": {
1635
+ "type": "object",
1636
+ "properties": {
1637
+ "name": {
1638
+ "type": "string",
1639
+ "description": "the name of the task/action that should utilize cached information",
1640
+ "default": ""
1641
+ },
1642
+ "filterField": {
1643
+ "type": "string",
1644
+ "description": "the field that contains filter information for this call",
1645
+ "default": ""
1646
+ },
1647
+ "filterLoc": {
1648
+ "type": "string",
1649
+ "description": "the field that contains the location of the filter field",
1650
+ "default": ""
1651
+ }
1652
+ }
1240
1653
  }
1241
1654
  }
1242
1655
  }
@@ -1245,4 +1658,4 @@
1245
1658
  }
1246
1659
  }
1247
1660
  }
1248
- }
1661
+ }