@itentialopensource/adapter-alkira 0.1.7 → 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.
@@ -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",
@@ -101,6 +106,9 @@
101
106
  },
102
107
  "devicebroker": {
103
108
  "$ref": "#/definitions/devicebroker"
109
+ },
110
+ "cache": {
111
+ "$ref": "#/definitions/cache"
104
112
  }
105
113
  },
106
114
  "required": [
@@ -122,7 +130,8 @@
122
130
  "static_token",
123
131
  "jwt_token",
124
132
  "request_token",
125
- "no_authentication"
133
+ "no_authentication",
134
+ "multi_step_authentication"
126
135
  ]
127
136
  },
128
137
  "username": {
@@ -255,6 +264,74 @@
255
264
  "type": "string",
256
265
  "description": "The grant type for OAuth requests - can also provide in schema",
257
266
  "default": ""
267
+ },
268
+ "sensitive": {
269
+ "type": "array",
270
+ "description": "List of sensitive keys to search and hide values from being logged",
271
+ "default": [],
272
+ "items": {
273
+ "type": "string"
274
+ }
275
+ },
276
+ "sso": {
277
+ "type": "object",
278
+ "properties": {
279
+ "protocol": {
280
+ "type": "string",
281
+ "description": "the protocol to request token from system",
282
+ "default": "",
283
+ "enum": [
284
+ "http",
285
+ "https",
286
+ ""
287
+ ]
288
+ },
289
+ "host": {
290
+ "type": "string",
291
+ "description": "hostname of the authentication system",
292
+ "default": "",
293
+ "examples": [
294
+ "systemx.customer.com"
295
+ ]
296
+ },
297
+ "port": {
298
+ "type": "integer",
299
+ "description": "port on which to connect to the authentication system",
300
+ "default": 0,
301
+ "minimum": 0,
302
+ "maximum": 65535
303
+ }
304
+ }
305
+ },
306
+ "multiStepAuthCalls": {
307
+ "type": "array",
308
+ "items": {
309
+ "type": "object",
310
+ "properties": {
311
+ "name": {
312
+ "type": "string",
313
+ "description": "Id of the step call",
314
+ "examples": [
315
+ "getAccessToken"
316
+ ]
317
+ },
318
+ "requestFields": {
319
+ "type": "object",
320
+ "description": "The fields set in step request"
321
+ },
322
+ "responseFields": {
323
+ "type": "object",
324
+ "description": "The fields from the step result"
325
+ },
326
+ "successfullResponseCode": {
327
+ "type": "integer",
328
+ "description": "Expected response code for given step, if not set any successfull http response is accepted",
329
+ "examples": [
330
+ 200
331
+ ]
332
+ }
333
+ }
334
+ }
258
335
  }
259
336
  },
260
337
  "required": [
@@ -357,7 +434,13 @@
357
434
  },
358
435
  "query_object": {
359
436
  "type": "object",
360
- "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
437
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter",
438
+ "default": {}
439
+ },
440
+ "addlHeaders": {
441
+ "type": "object",
442
+ "description": "headers that will be appended to the headers for the call",
443
+ "default": {}
361
444
  }
362
445
  },
363
446
  "required": [
@@ -437,6 +520,7 @@
437
520
  "priorities": {
438
521
  "type": "array",
439
522
  "description": "define your priorities here",
523
+ "default": [],
440
524
  "items": {
441
525
  "type": "object",
442
526
  "properties": {
@@ -507,6 +591,7 @@
507
591
  "failover_codes": {
508
592
  "type": "array",
509
593
  "description": "An array of codes where it is ok to try another method",
594
+ "default": [],
510
595
  "items": {
511
596
  "type": "integer"
512
597
  }
@@ -524,19 +609,23 @@
524
609
  "properties": {
525
610
  "payload": {
526
611
  "type": "object",
527
- "description": "payload fields that will be appended to the provided payload (excluding GET calls)"
612
+ "description": "payload fields that will be appended to the provided payload (excluding GET calls)",
613
+ "default": {}
528
614
  },
529
615
  "uriOptions": {
530
616
  "type": "object",
531
- "description": "options that will be appended to all GET calls"
617
+ "description": "options that will be appended to all GET calls",
618
+ "default": {}
532
619
  },
533
620
  "addlHeaders": {
534
621
  "type": "object",
535
- "description": "headers that will be appended to the headers for the call"
622
+ "description": "headers that will be appended to the headers for the call",
623
+ "default": {}
536
624
  },
537
625
  "authData": {
538
626
  "type": "object",
539
- "description": "authentication data that will be appended to the payload for authentication calls"
627
+ "description": "authentication data that will be appended to the payload for authentication calls",
628
+ "default": {}
540
629
  }
541
630
  }
542
631
  },
@@ -851,6 +940,7 @@
851
940
  "type": "array",
852
941
  "description": "Broker call(s) to getDevice",
853
942
  "items": {
943
+ "type": "object",
854
944
  "properties": {
855
945
  "path": {
856
946
  "type": "string",
@@ -866,26 +956,38 @@
866
956
  "type": "object",
867
957
  "description": "The json object with query parameters of the call to getDevice",
868
958
  "additionalProperties": {
869
- "type": "string"
959
+ "type": [
960
+ "string",
961
+ "number"
962
+ ]
870
963
  }
871
964
  },
872
965
  "body": {
873
966
  "type": "object",
874
967
  "description": "The json object with body of the call to getDevice",
875
968
  "additionalProperties": {
876
- "type": "string"
969
+ "type": [
970
+ "string",
971
+ "number"
972
+ ]
877
973
  }
878
974
  },
879
975
  "headers": {
880
976
  "type": "object",
881
977
  "description": "The json object with headers of the call to getDevice",
882
978
  "additionalProperties": {
883
- "type": "string"
979
+ "type": [
980
+ "string",
981
+ "number"
982
+ ]
884
983
  }
885
984
  },
886
985
  "handleFailure": {
887
986
  "type": "string",
888
- "enum": ["ignore", "fail"],
987
+ "enum": [
988
+ "ignore",
989
+ "fail"
990
+ ],
889
991
  "description": "return failure or ignore failure",
890
992
  "default": "ignore"
891
993
  },
@@ -893,7 +995,10 @@
893
995
  "type": "object",
894
996
  "description": "The json object with response fields of the call to getDevice",
895
997
  "additionalProperties": {
896
- "type": "string"
998
+ "type": [
999
+ "string",
1000
+ "number"
1001
+ ]
897
1002
  },
898
1003
  "properties": {}
899
1004
  },
@@ -906,7 +1011,10 @@
906
1011
  "type": "object",
907
1012
  "description": "The json object with response fields of the call to getDevice",
908
1013
  "additionalProperties": {
909
- "type": "string"
1014
+ "type": [
1015
+ "string",
1016
+ "number"
1017
+ ]
910
1018
  },
911
1019
  "properties": {
912
1020
  "name": {
@@ -943,6 +1051,7 @@
943
1051
  "type": "array",
944
1052
  "description": "Broker call(s) to getDevicesFiltered",
945
1053
  "items": {
1054
+ "type": "object",
946
1055
  "properties": {
947
1056
  "path": {
948
1057
  "type": "string",
@@ -958,26 +1067,38 @@
958
1067
  "type": "object",
959
1068
  "description": "The json object with query parameters of the call to getDevicesFiltered",
960
1069
  "additionalProperties": {
961
- "type": "string"
1070
+ "type": [
1071
+ "string",
1072
+ "number"
1073
+ ]
962
1074
  }
963
1075
  },
964
1076
  "body": {
965
1077
  "type": "object",
966
1078
  "description": "The json object with body of the call to getDevicesFiltered",
967
1079
  "additionalProperties": {
968
- "type": "string"
1080
+ "type": [
1081
+ "string",
1082
+ "number"
1083
+ ]
969
1084
  }
970
1085
  },
971
1086
  "headers": {
972
1087
  "type": "object",
973
1088
  "description": "The json object with headers of the call to getDevicesFiltered",
974
1089
  "additionalProperties": {
975
- "type": "string"
1090
+ "type": [
1091
+ "string",
1092
+ "number"
1093
+ ]
976
1094
  }
977
1095
  },
978
1096
  "handleFailure": {
979
1097
  "type": "string",
980
- "enum": ["ignore", "fail"],
1098
+ "enum": [
1099
+ "ignore",
1100
+ "fail"
1101
+ ],
981
1102
  "description": "return failure or ignore failure",
982
1103
  "default": "ignore"
983
1104
  },
@@ -985,7 +1106,10 @@
985
1106
  "type": "object",
986
1107
  "description": "The json object with response fields of the call to getDevice",
987
1108
  "additionalProperties": {
988
- "type": "string"
1109
+ "type": [
1110
+ "string",
1111
+ "number"
1112
+ ]
989
1113
  },
990
1114
  "properties": {}
991
1115
  },
@@ -998,7 +1122,10 @@
998
1122
  "type": "object",
999
1123
  "description": "The json object with response fields of the call to getDevicesFiltered",
1000
1124
  "additionalProperties": {
1001
- "type": "string"
1125
+ "type": [
1126
+ "string",
1127
+ "number"
1128
+ ]
1002
1129
  },
1003
1130
  "properties": {
1004
1131
  "name": {
@@ -1035,6 +1162,7 @@
1035
1162
  "type": "array",
1036
1163
  "description": "Broker call(s) to determine if the device isAlive",
1037
1164
  "items": {
1165
+ "type": "object",
1038
1166
  "properties": {
1039
1167
  "path": {
1040
1168
  "type": "string",
@@ -1050,26 +1178,38 @@
1050
1178
  "type": "object",
1051
1179
  "description": "The json object with query parameters of the call to isAlive",
1052
1180
  "additionalProperties": {
1053
- "type": "string"
1181
+ "type": [
1182
+ "string",
1183
+ "number"
1184
+ ]
1054
1185
  }
1055
1186
  },
1056
1187
  "body": {
1057
1188
  "type": "object",
1058
1189
  "description": "The json object with body of the call to isAlive",
1059
1190
  "additionalProperties": {
1060
- "type": "string"
1191
+ "type": [
1192
+ "string",
1193
+ "number"
1194
+ ]
1061
1195
  }
1062
1196
  },
1063
1197
  "headers": {
1064
1198
  "type": "object",
1065
1199
  "description": "The json object with headers of the call to isAlive",
1066
1200
  "additionalProperties": {
1067
- "type": "string"
1201
+ "type": [
1202
+ "string",
1203
+ "number"
1204
+ ]
1068
1205
  }
1069
1206
  },
1070
1207
  "handleFailure": {
1071
1208
  "type": "string",
1072
- "enum": ["ignore", "fail"],
1209
+ "enum": [
1210
+ "ignore",
1211
+ "fail"
1212
+ ],
1073
1213
  "description": "return failure or ignore isAlive",
1074
1214
  "default": "ignore"
1075
1215
  },
@@ -1077,7 +1217,10 @@
1077
1217
  "type": "object",
1078
1218
  "description": "The json object with response fields of the call to getDevice",
1079
1219
  "additionalProperties": {
1080
- "type": "string"
1220
+ "type": [
1221
+ "string",
1222
+ "number"
1223
+ ]
1081
1224
  },
1082
1225
  "properties": {}
1083
1226
  },
@@ -1090,7 +1233,10 @@
1090
1233
  "type": "object",
1091
1234
  "description": "The json object with response fields of the call to isAlive",
1092
1235
  "additionalProperties": {
1093
- "type": "string"
1236
+ "type": [
1237
+ "string",
1238
+ "number"
1239
+ ]
1094
1240
  },
1095
1241
  "properties": {
1096
1242
  "status": {
@@ -1112,6 +1258,7 @@
1112
1258
  "type": "array",
1113
1259
  "description": "Broker call(s) to getConfig",
1114
1260
  "items": {
1261
+ "type": "object",
1115
1262
  "properties": {
1116
1263
  "path": {
1117
1264
  "type": "string",
@@ -1127,26 +1274,38 @@
1127
1274
  "type": "object",
1128
1275
  "description": "The json object with query parameters of the call to getConfig",
1129
1276
  "additionalProperties": {
1130
- "type": "string"
1277
+ "type": [
1278
+ "string",
1279
+ "number"
1280
+ ]
1131
1281
  }
1132
1282
  },
1133
1283
  "body": {
1134
1284
  "type": "object",
1135
1285
  "description": "The json object with body of the call to getConfig",
1136
1286
  "additionalProperties": {
1137
- "type": "string"
1287
+ "type": [
1288
+ "string",
1289
+ "number"
1290
+ ]
1138
1291
  }
1139
1292
  },
1140
1293
  "headers": {
1141
1294
  "type": "object",
1142
1295
  "description": "The json object with headers of the call to getConfig",
1143
1296
  "additionalProperties": {
1144
- "type": "string"
1297
+ "type": [
1298
+ "string",
1299
+ "number"
1300
+ ]
1145
1301
  }
1146
1302
  },
1147
1303
  "handleFailure": {
1148
1304
  "type": "string",
1149
- "enum": ["ignore", "fail"],
1305
+ "enum": [
1306
+ "ignore",
1307
+ "fail"
1308
+ ],
1150
1309
  "description": "return failure or ignore getConfig",
1151
1310
  "default": "ignore"
1152
1311
  },
@@ -1154,7 +1313,10 @@
1154
1313
  "type": "object",
1155
1314
  "description": "The json object with response fields of the call to getDevice",
1156
1315
  "additionalProperties": {
1157
- "type": "string"
1316
+ "type": [
1317
+ "string",
1318
+ "number"
1319
+ ]
1158
1320
  },
1159
1321
  "properties": {}
1160
1322
  },
@@ -1167,10 +1329,12 @@
1167
1329
  "type": "object",
1168
1330
  "description": "The json object with response fields of the call to getConfig",
1169
1331
  "additionalProperties": {
1170
- "type": "string"
1332
+ "type": [
1333
+ "string",
1334
+ "number"
1335
+ ]
1171
1336
  },
1172
- "properties": {
1173
- }
1337
+ "properties": {}
1174
1338
  }
1175
1339
  }
1176
1340
  }
@@ -1179,6 +1343,7 @@
1179
1343
  "type": "array",
1180
1344
  "description": "Broker call(s) to getCount",
1181
1345
  "items": {
1346
+ "type": "object",
1182
1347
  "properties": {
1183
1348
  "path": {
1184
1349
  "type": "string",
@@ -1194,26 +1359,38 @@
1194
1359
  "type": "object",
1195
1360
  "description": "The json object with query parameters of the call to getCount",
1196
1361
  "additionalProperties": {
1197
- "type": "string"
1362
+ "type": [
1363
+ "string",
1364
+ "number"
1365
+ ]
1198
1366
  }
1199
1367
  },
1200
1368
  "body": {
1201
1369
  "type": "object",
1202
1370
  "description": "The json object with body of the call to getCount",
1203
1371
  "additionalProperties": {
1204
- "type": "string"
1372
+ "type": [
1373
+ "string",
1374
+ "number"
1375
+ ]
1205
1376
  }
1206
1377
  },
1207
1378
  "headers": {
1208
1379
  "type": "object",
1209
1380
  "description": "The json object with headers of the call to getCount",
1210
1381
  "additionalProperties": {
1211
- "type": "string"
1382
+ "type": [
1383
+ "string",
1384
+ "number"
1385
+ ]
1212
1386
  }
1213
1387
  },
1214
1388
  "handleFailure": {
1215
1389
  "type": "string",
1216
- "enum": ["ignore", "fail"],
1390
+ "enum": [
1391
+ "ignore",
1392
+ "fail"
1393
+ ],
1217
1394
  "description": "return failure or ignore getCount",
1218
1395
  "default": "ignore"
1219
1396
  },
@@ -1221,7 +1398,10 @@
1221
1398
  "type": "object",
1222
1399
  "description": "The json object with response fields of the call to getDevice",
1223
1400
  "additionalProperties": {
1224
- "type": "string"
1401
+ "type": [
1402
+ "string",
1403
+ "number"
1404
+ ]
1225
1405
  },
1226
1406
  "properties": {}
1227
1407
  },
@@ -1234,9 +1414,169 @@
1234
1414
  "type": "object",
1235
1415
  "description": "The json object with response fields of the call to getConfig",
1236
1416
  "additionalProperties": {
1237
- "type": "string"
1417
+ "type": [
1418
+ "string",
1419
+ "number"
1420
+ ]
1238
1421
  },
1239
- "properties": {
1422
+ "properties": {}
1423
+ }
1424
+ }
1425
+ }
1426
+ }
1427
+ }
1428
+ },
1429
+ "cache": {
1430
+ "type": "object",
1431
+ "properties": {
1432
+ "enabled": {
1433
+ "type": "boolean",
1434
+ "description": "Whether or not cache is enabled for adapter",
1435
+ "default": false
1436
+ },
1437
+ "entities": {
1438
+ "type": "array",
1439
+ "description": "Information for the cached entities",
1440
+ "items": {
1441
+ "type": "object",
1442
+ "properties": {
1443
+ "entityType": {
1444
+ "type": "string",
1445
+ "description": "The name of the entity - should match adapter entity configuration or a broker (e.g. Device)",
1446
+ "default": ""
1447
+ },
1448
+ "frequency": {
1449
+ "type": "integer",
1450
+ "description": "how long (in minutes) we wait to re-populate the cache",
1451
+ "default": 1440,
1452
+ "maximum": 10080
1453
+ },
1454
+ "flushOnFail": {
1455
+ "type": "boolean",
1456
+ "description": "Whether to clear the cache we have if the populate failed",
1457
+ "default": false
1458
+ },
1459
+ "limit": {
1460
+ "type": "integer",
1461
+ "description": "maximum number of items to keep in cache",
1462
+ "default": 1000
1463
+ },
1464
+ "retryAttempts": {
1465
+ "type": "integer",
1466
+ "description": "number of times to retry the populate call before failure",
1467
+ "default": 5
1468
+ },
1469
+ "sort": {
1470
+ "type": "boolean",
1471
+ "description": "whether to sort the data or not",
1472
+ "default": true
1473
+ },
1474
+ "populate": {
1475
+ "type": "array",
1476
+ "description": "Information for the call(s) used to populate the cache",
1477
+ "items": {
1478
+ "type": "object",
1479
+ "properties": {
1480
+ "path": {
1481
+ "type": "string",
1482
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
1483
+ "default": ""
1484
+ },
1485
+ "method": {
1486
+ "type": "string",
1487
+ "description": "The method of the call to getDevice",
1488
+ "default": "GET"
1489
+ },
1490
+ "query": {
1491
+ "type": "object",
1492
+ "description": "The json object with query parameters of the call to getDevice",
1493
+ "additionalProperties": {
1494
+ "type": [
1495
+ "string",
1496
+ "number"
1497
+ ]
1498
+ }
1499
+ },
1500
+ "body": {
1501
+ "type": "object",
1502
+ "description": "The json object with body of the call to getDevice",
1503
+ "additionalProperties": {
1504
+ "type": [
1505
+ "string",
1506
+ "number"
1507
+ ]
1508
+ }
1509
+ },
1510
+ "headers": {
1511
+ "type": "object",
1512
+ "description": "The json object with headers of the call to getDevice",
1513
+ "additionalProperties": {
1514
+ "type": [
1515
+ "string",
1516
+ "number"
1517
+ ]
1518
+ }
1519
+ },
1520
+ "handleFailure": {
1521
+ "type": "string",
1522
+ "enum": [
1523
+ "ignore",
1524
+ "fail"
1525
+ ],
1526
+ "description": "return failure or ignore failure",
1527
+ "default": "ignore"
1528
+ },
1529
+ "requestFields": {
1530
+ "type": "object",
1531
+ "description": "The json object with response fields of the call to getDevice",
1532
+ "additionalProperties": {
1533
+ "type": [
1534
+ "string",
1535
+ "number"
1536
+ ]
1537
+ },
1538
+ "properties": {}
1539
+ },
1540
+ "responseDatakey": {
1541
+ "type": "string",
1542
+ "description": "place in the response where the data is - supports jsonquery",
1543
+ "default": ""
1544
+ },
1545
+ "responseFields": {
1546
+ "type": "object",
1547
+ "description": "The json object with response fields of the call to getDevice",
1548
+ "additionalProperties": {
1549
+ "type": [
1550
+ "string",
1551
+ "number"
1552
+ ]
1553
+ }
1554
+ }
1555
+ }
1556
+ }
1557
+ },
1558
+ "cachedTasks": {
1559
+ "type": "array",
1560
+ "description": "Information for the call(s) used to populate the cache",
1561
+ "items": {
1562
+ "type": "object",
1563
+ "properties": {
1564
+ "name": {
1565
+ "type": "string",
1566
+ "description": "the name of the task/action that should utilize cached information",
1567
+ "default": ""
1568
+ },
1569
+ "filterField": {
1570
+ "type": "string",
1571
+ "description": "the field that contains filter information for this call",
1572
+ "default": ""
1573
+ },
1574
+ "filterLoc": {
1575
+ "type": "string",
1576
+ "description": "the field that contains the location of the filter field",
1577
+ "default": ""
1578
+ }
1579
+ }
1240
1580
  }
1241
1581
  }
1242
1582
  }
@@ -1245,4 +1585,4 @@
1245
1585
  }
1246
1586
  }
1247
1587
  }
1248
- }
1588
+ }