iotagent-node-lib 4.5.0 → 4.6.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 (84) hide show
  1. package/README.md +67 -272
  2. package/doc/README.md +1 -1
  3. package/doc/admin.md +3 -15
  4. package/doc/api.md +469 -134
  5. package/doc/deprecated.md +4 -0
  6. package/doc/devel/architecture.md +5 -135
  7. package/doc/devel/development.md +224 -12
  8. package/doc/getting-started.md +114 -53
  9. package/doc/roadmap.md +5 -5
  10. package/docker/Mosquitto/Dockerfile +2 -2
  11. package/docker/Mosquitto/README.md +14 -11
  12. package/lib/constants.js +3 -0
  13. package/lib/fiware-iotagent-lib.js +12 -15
  14. package/lib/jexlTranformsMap.js +3 -1
  15. package/lib/model/dbConn.js +1 -4
  16. package/lib/services/common/alarmManagement.js +3 -0
  17. package/lib/services/groups/groupService.js +1 -1
  18. package/lib/services/ngsi/entities-NGSI-LD.js +320 -570
  19. package/lib/services/ngsi/entities-NGSI-v2.js +36 -1
  20. package/lib/services/ngsi/ngsiService.js +3 -1
  21. package/lib/services/northBound/deviceGroupAdministrationServer.js +42 -6
  22. package/lib/services/northBound/deviceProvisioningServer.js +0 -1
  23. package/lib/services/northBound/northboundServer.js +2 -0
  24. package/lib/services/stats/statsRegistry.js +128 -101
  25. package/lib/templates/createDevice.json +0 -24
  26. package/lib/templates/createDeviceLax.json +0 -23
  27. package/lib/templates/deviceGroup.json +1 -25
  28. package/lib/templates/updateDevice.json +0 -24
  29. package/lib/templates/updateDeviceLax.json +0 -23
  30. package/package.json +2 -2
  31. package/scripts/legacy_expression_tool/README.md +0 -1
  32. package/test/functional/README.md +22 -17
  33. package/test/functional/functional-tests-runner.js +9 -4
  34. package/test/functional/functional-tests.js +4 -4
  35. package/test/functional/testCases.js +245 -4
  36. package/test/unit/examples/deviceProvisioningRequests/provisionFullDevice.json +1 -13
  37. package/test/unit/examples/groupProvisioningRequests/multipleConfigGroupsCreation.json +44 -0
  38. package/test/unit/examples/groupProvisioningRequests/provisionDuplicateConfigGroup.json +35 -0
  39. package/test/unit/examples/groupProvisioningRequests/provisionFullConfigGroup.json +36 -0
  40. package/test/unit/examples/groupProvisioningRequests/provisionFullConfigGroupAlternate.json +36 -0
  41. package/test/unit/general/deviceService-test.js +102 -0
  42. package/test/unit/general/statistics-service_test.js +1 -74
  43. package/test/unit/mongodb/mongodb-configGroup-registry-test.js +452 -0
  44. package/test/unit/mongodb/mongodb-connectionoptions-test.js +2 -3
  45. package/test/unit/mongodb/mongodb-group-registry-test.js +34 -33
  46. package/test/unit/mongodb/mongodb-service-registry-test.js +477 -0
  47. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin1a.json +4 -4
  48. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin2.json +22 -22
  49. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin29.json +4 -4
  50. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin32.json +14 -15
  51. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin1.json +23 -23
  52. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin15.json +0 -5
  53. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin4.json +11 -16
  54. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin5.json +23 -28
  55. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin6.json +8 -13
  56. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin7.json +0 -5
  57. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin8.json +24 -29
  58. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin2.json +12 -17
  59. package/test/unit/ngsi-ld/examples/contextRequests/updateContextStaticLinkedAttributes.json +12 -10
  60. package/test/unit/ngsi-ld/expressions/jexlBasedTransformations-test.js +0 -102
  61. package/test/unit/ngsi-ld/plugins/multientity-plugin_test.js +4 -5
  62. package/test/unit/ngsi-ld/provisioning/listProvisionedDevices-test.js +0 -4
  63. package/test/unit/ngsiv2/general/deviceService-test.js +94 -1
  64. package/test/unit/ngsiv2/general/iotam-autoregistration-test.js +195 -0
  65. package/test/unit/ngsiv2/provisioning/device-group-api-test.js +259 -0
  66. package/test/unit/ngsiv2/provisioning/device-provisioning-configGroup-api_test.js +1189 -0
  67. package/test/unit/ngsiv2/provisioning/listProvisionedDevices-test.js +0 -4
  68. package/test/unit/statsRegistry/openmetrics-test.js +167 -0
  69. package/lib/templates/queryContext.json +0 -25
  70. package/test/unit/examples/deviceProvisioningRequests/provisionBidirectionalDevice.json +0 -35
  71. package/test/unit/examples/deviceProvisioningRequests/provisionDeviceBidirectionalGroup.json +0 -17
  72. package/test/unit/examples/groupProvisioningRequests/bidirectionalGroup.json +0 -31
  73. package/test/unit/general/statistics-persistence_test.js +0 -121
  74. package/test/unit/ngsi-ld/examples/contextRequests/createBidirectionalDevice.json +0 -17
  75. package/test/unit/ngsi-ld/examples/contextRequests/updateContextProcessTimestamp.json +0 -12
  76. package/test/unit/ngsi-ld/examples/subscriptionRequests/bidirectionalNotification.json +0 -13
  77. package/test/unit/ngsi-ld/examples/subscriptionRequests/bidirectionalNotificationWithDatasetId.json +0 -21
  78. package/test/unit/ngsi-ld/examples/subscriptionRequests/bidirectionalNotificationWithMetadata.json +0 -17
  79. package/test/unit/ngsi-ld/examples/subscriptionRequests/bidirectionalSubscriptionRequest.json +0 -23
  80. package/test/unit/ngsi-ld/plugins/timestamp-processing-plugin_test.js +0 -132
  81. package/test/unit/ngsiv2/examples/contextRequests/createBidirectionalDevice.json +0 -8
  82. package/test/unit/ngsiv2/examples/subscriptionRequests/bidirectionalNotification.json +0 -13
  83. package/test/unit/ngsiv2/examples/subscriptionRequests/bidirectionalNotificationWithMetadata.json +0 -19
  84. package/test/unit/ngsiv2/examples/subscriptionRequests/bidirectionalSubscriptionRequest.json +0 -24
@@ -1,13 +0,0 @@
1
- {
2
- "subscriptionId": "51c0ac9ed714fb3b37d7d5a8",
3
- "data": [
4
- {
5
- "location": {
6
- "type": "geo:point",
7
- "value": "12.4, -9.6"
8
- },
9
- "type": "TheLightType",
10
- "id": "TheFirstLight"
11
- }
12
- ]
13
- }
@@ -1,19 +0,0 @@
1
- {
2
- "subscriptionId": "51c0ac9ed714fb3b37d7d5a8",
3
- "data": [
4
- {
5
- "location": {
6
- "type": "geo:point",
7
- "value": "12.4, -9.6",
8
- "metadata": {
9
- "qos": {
10
- "type": "Number",
11
- "value": 1
12
- }
13
- }
14
- },
15
- "type": "TheLightType",
16
- "id": "TheFirstLight"
17
- }
18
- ]
19
- }
@@ -1,24 +0,0 @@
1
- {
2
- "subject":{
3
- "entities": [
4
- {
5
- "id": "TheFirstLight",
6
- "type": "TheLightType"
7
- }
8
- ],
9
- "condition":{
10
- "attrs":[
11
- "location"
12
- ]
13
- }
14
- },
15
- "notification":{
16
- "http":{
17
- "url":"http://smartgondor.com/notify"
18
- },
19
- "attrs":[
20
- "location"
21
- ],
22
- "attrsFormat": "normalized"
23
- }
24
- }