@cepseudo/ngsi-ld 1.0.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 (142) hide show
  1. package/README.md +425 -0
  2. package/dist/cache/entity_cache.d.ts +42 -0
  3. package/dist/cache/entity_cache.d.ts.map +1 -0
  4. package/dist/cache/entity_cache.js +93 -0
  5. package/dist/cache/entity_cache.js.map +1 -0
  6. package/dist/components/ngsi_ld_collector.d.ts +25 -0
  7. package/dist/components/ngsi_ld_collector.d.ts.map +1 -0
  8. package/dist/components/ngsi_ld_collector.js +13 -0
  9. package/dist/components/ngsi_ld_collector.js.map +1 -0
  10. package/dist/components/ngsi_ld_harvester.d.ts +25 -0
  11. package/dist/components/ngsi_ld_harvester.d.ts.map +1 -0
  12. package/dist/components/ngsi_ld_harvester.js +13 -0
  13. package/dist/components/ngsi_ld_harvester.js.map +1 -0
  14. package/dist/components/type_guards.d.ts +15 -0
  15. package/dist/components/type_guards.d.ts.map +1 -0
  16. package/dist/components/type_guards.js +25 -0
  17. package/dist/components/type_guards.js.map +1 -0
  18. package/dist/endpoints/attrs.d.ts +7 -0
  19. package/dist/endpoints/attrs.d.ts.map +1 -0
  20. package/dist/endpoints/attrs.js +37 -0
  21. package/dist/endpoints/attrs.js.map +1 -0
  22. package/dist/endpoints/entities.d.ts +9 -0
  23. package/dist/endpoints/entities.d.ts.map +1 -0
  24. package/dist/endpoints/entities.js +149 -0
  25. package/dist/endpoints/entities.js.map +1 -0
  26. package/dist/endpoints/subscriptions.d.ts +8 -0
  27. package/dist/endpoints/subscriptions.d.ts.map +1 -0
  28. package/dist/endpoints/subscriptions.js +109 -0
  29. package/dist/endpoints/subscriptions.js.map +1 -0
  30. package/dist/endpoints/types.d.ts +7 -0
  31. package/dist/endpoints/types.d.ts.map +1 -0
  32. package/dist/endpoints/types.js +45 -0
  33. package/dist/endpoints/types.js.map +1 -0
  34. package/dist/helpers/property.d.ts +33 -0
  35. package/dist/helpers/property.d.ts.map +1 -0
  36. package/dist/helpers/property.js +40 -0
  37. package/dist/helpers/property.js.map +1 -0
  38. package/dist/helpers/urn.d.ts +26 -0
  39. package/dist/helpers/urn.d.ts.map +1 -0
  40. package/dist/helpers/urn.js +30 -0
  41. package/dist/helpers/urn.js.map +1 -0
  42. package/dist/index.d.ts +22 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +19 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/models/agrifood/agri_parcel.d.ts +17 -0
  47. package/dist/models/agrifood/agri_parcel.d.ts.map +1 -0
  48. package/dist/models/agrifood/agri_parcel.js +27 -0
  49. package/dist/models/agrifood/agri_parcel.js.map +1 -0
  50. package/dist/models/agrifood/agri_soil_measurement.d.ts +17 -0
  51. package/dist/models/agrifood/agri_soil_measurement.d.ts.map +1 -0
  52. package/dist/models/agrifood/agri_soil_measurement.js +31 -0
  53. package/dist/models/agrifood/agri_soil_measurement.js.map +1 -0
  54. package/dist/models/agrifood/agri_weather_observed.d.ts +20 -0
  55. package/dist/models/agrifood/agri_weather_observed.d.ts.map +1 -0
  56. package/dist/models/agrifood/agri_weather_observed.js +34 -0
  57. package/dist/models/agrifood/agri_weather_observed.js.map +1 -0
  58. package/dist/models/device/device.d.ts +24 -0
  59. package/dist/models/device/device.d.ts.map +1 -0
  60. package/dist/models/device/device.js +39 -0
  61. package/dist/models/device/device.js.map +1 -0
  62. package/dist/models/device/device_measurement.d.ts +16 -0
  63. package/dist/models/device/device_measurement.d.ts.map +1 -0
  64. package/dist/models/device/device_measurement.js +34 -0
  65. package/dist/models/device/device_measurement.js.map +1 -0
  66. package/dist/models/environment/air_quality_observed.d.ts +22 -0
  67. package/dist/models/environment/air_quality_observed.d.ts.map +1 -0
  68. package/dist/models/environment/air_quality_observed.js +50 -0
  69. package/dist/models/environment/air_quality_observed.js.map +1 -0
  70. package/dist/models/environment/noise_level_observed.d.ts +17 -0
  71. package/dist/models/environment/noise_level_observed.d.ts.map +1 -0
  72. package/dist/models/environment/noise_level_observed.js +31 -0
  73. package/dist/models/environment/noise_level_observed.js.map +1 -0
  74. package/dist/models/environment/water_quality_observed.d.ts +20 -0
  75. package/dist/models/environment/water_quality_observed.d.ts.map +1 -0
  76. package/dist/models/environment/water_quality_observed.js +46 -0
  77. package/dist/models/environment/water_quality_observed.js.map +1 -0
  78. package/dist/models/environment/weather_observed.d.ts +19 -0
  79. package/dist/models/environment/weather_observed.d.ts.map +1 -0
  80. package/dist/models/environment/weather_observed.js +46 -0
  81. package/dist/models/environment/weather_observed.js.map +1 -0
  82. package/dist/models/index.d.ts +25 -0
  83. package/dist/models/index.d.ts.map +1 -0
  84. package/dist/models/index.js +17 -0
  85. package/dist/models/index.js.map +1 -0
  86. package/dist/models/smart_city/parking_spot.d.ts +14 -0
  87. package/dist/models/smart_city/parking_spot.d.ts.map +1 -0
  88. package/dist/models/smart_city/parking_spot.js +27 -0
  89. package/dist/models/smart_city/parking_spot.js.map +1 -0
  90. package/dist/models/smart_city/street_light.d.ts +16 -0
  91. package/dist/models/smart_city/street_light.d.ts.map +1 -0
  92. package/dist/models/smart_city/street_light.js +33 -0
  93. package/dist/models/smart_city/street_light.js.map +1 -0
  94. package/dist/models/smart_city/traffic_flow_observed.d.ts +19 -0
  95. package/dist/models/smart_city/traffic_flow_observed.d.ts.map +1 -0
  96. package/dist/models/smart_city/traffic_flow_observed.js +37 -0
  97. package/dist/models/smart_city/traffic_flow_observed.js.map +1 -0
  98. package/dist/notifications/notification_sender.d.ts +16 -0
  99. package/dist/notifications/notification_sender.d.ts.map +1 -0
  100. package/dist/notifications/notification_sender.js +70 -0
  101. package/dist/notifications/notification_sender.js.map +1 -0
  102. package/dist/notifications/notification_worker.d.ts +19 -0
  103. package/dist/notifications/notification_worker.d.ts.map +1 -0
  104. package/dist/notifications/notification_worker.js +65 -0
  105. package/dist/notifications/notification_worker.js.map +1 -0
  106. package/dist/plugin.d.ts +35 -0
  107. package/dist/plugin.d.ts.map +1 -0
  108. package/dist/plugin.js +113 -0
  109. package/dist/plugin.js.map +1 -0
  110. package/dist/subscriptions/q_parser.d.ts +42 -0
  111. package/dist/subscriptions/q_parser.d.ts.map +1 -0
  112. package/dist/subscriptions/q_parser.js +113 -0
  113. package/dist/subscriptions/q_parser.js.map +1 -0
  114. package/dist/subscriptions/subscription_cache.d.ts +46 -0
  115. package/dist/subscriptions/subscription_cache.d.ts.map +1 -0
  116. package/dist/subscriptions/subscription_cache.js +105 -0
  117. package/dist/subscriptions/subscription_cache.js.map +1 -0
  118. package/dist/subscriptions/subscription_matcher.d.ts +23 -0
  119. package/dist/subscriptions/subscription_matcher.d.ts.map +1 -0
  120. package/dist/subscriptions/subscription_matcher.js +84 -0
  121. package/dist/subscriptions/subscription_matcher.js.map +1 -0
  122. package/dist/subscriptions/subscription_store.d.ts +42 -0
  123. package/dist/subscriptions/subscription_store.d.ts.map +1 -0
  124. package/dist/subscriptions/subscription_store.js +189 -0
  125. package/dist/subscriptions/subscription_store.js.map +1 -0
  126. package/dist/types/context.d.ts +9 -0
  127. package/dist/types/context.d.ts.map +1 -0
  128. package/dist/types/context.js +5 -0
  129. package/dist/types/context.js.map +1 -0
  130. package/dist/types/entity.d.ts +46 -0
  131. package/dist/types/entity.d.ts.map +1 -0
  132. package/dist/types/entity.js +2 -0
  133. package/dist/types/entity.js.map +1 -0
  134. package/dist/types/notification.d.ts +22 -0
  135. package/dist/types/notification.d.ts.map +1 -0
  136. package/dist/types/notification.js +2 -0
  137. package/dist/types/notification.js.map +1 -0
  138. package/dist/types/subscription.d.ts +54 -0
  139. package/dist/types/subscription.d.ts.map +1 -0
  140. package/dist/types/subscription.js +2 -0
  141. package/dist/types/subscription.js.map +1 -0
  142. package/package.json +74 -0
@@ -0,0 +1,22 @@
1
+ export { registerNgsiLd } from './plugin.js';
2
+ export type { NgsiLdPluginOptions } from './plugin.js';
3
+ export type { NgsiLdEntity, NgsiLdProperty, NgsiLdGeoProperty, NgsiLdRelationship, GeoJsonGeometry } from './types/entity.js';
4
+ export type { Subscription, SubscriptionCreate, NotificationEndpoint, NotificationFormat } from './types/subscription.js';
5
+ export type { NotificationPayload, NotificationJobData } from './types/notification.js';
6
+ export type { JsonLdContext } from './types/context.js';
7
+ export { NGSI_LD_CORE_CONTEXT } from './types/context.js';
8
+ export { property, geoProperty, relationship } from './helpers/property.js';
9
+ export { buildUrn, parseUrn } from './helpers/urn.js';
10
+ export type { ParsedUrn } from './helpers/urn.js';
11
+ export { NgsiLdCollector } from './components/ngsi_ld_collector.js';
12
+ export { NgsiLdHarvester } from './components/ngsi_ld_harvester.js';
13
+ export { isNgsiLdCollector, isNgsiLdHarvester } from './components/type_guards.js';
14
+ export { EntityCache } from './cache/entity_cache.js';
15
+ export { SubscriptionStore } from './subscriptions/subscription_store.js';
16
+ export { SubscriptionCache } from './subscriptions/subscription_cache.js';
17
+ export { SubscriptionMatcher } from './subscriptions/subscription_matcher.js';
18
+ export { parseQ, evaluateQ } from './subscriptions/q_parser.js';
19
+ export type { QExpr, QComparison, QAnd, QOperator } from './subscriptions/q_parser.js';
20
+ export { buildAirQualityObserved, buildWeatherObserved, buildWaterQualityObserved, buildNoiseLevelObserved, buildStreetLight, buildParkingSpot, buildTrafficFlowObserved, buildAgriParcel, buildAgriSoilMeasurement, buildAgriWeatherObserved, buildDevice, buildDeviceMeasurement, } from './models/index.js';
21
+ export type { AirQualityObservedAttributes, WeatherObservedAttributes, WaterQualityObservedAttributes, NoiseLevelObservedAttributes, StreetLightAttributes, ParkingSpotAttributes, TrafficFlowObservedAttributes, AgriParcelAttributes, AgriSoilMeasurementAttributes, AgriWeatherObservedAttributes, DeviceAttributes, DeviceMeasurementAttributes, } from './models/index.js';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,YAAY,EAAE,mBAAmB,EAAE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B,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,EACX,sBAAsB,GACzB,MAAM,mBAAmB,CAAA;AAE1B,YAAY,EACR,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,EAC9B,4BAA4B,EAC5B,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,oBAAoB,EACpB,6BAA6B,EAC7B,6BAA6B,EAC7B,gBAAgB,EAChB,2BAA2B,GAC9B,MAAM,mBAAmB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ // Plugin entry point
2
+ export { registerNgsiLd } from './plugin.js';
3
+ export { NGSI_LD_CORE_CONTEXT } from './types/context.js';
4
+ // Helpers
5
+ export { property, geoProperty, relationship } from './helpers/property.js';
6
+ export { buildUrn, parseUrn } from './helpers/urn.js';
7
+ // Abstract components
8
+ export { NgsiLdCollector } from './components/ngsi_ld_collector.js';
9
+ export { NgsiLdHarvester } from './components/ngsi_ld_harvester.js';
10
+ export { isNgsiLdCollector, isNgsiLdHarvester } from './components/type_guards.js';
11
+ // Subsystems (for advanced usage)
12
+ export { EntityCache } from './cache/entity_cache.js';
13
+ export { SubscriptionStore } from './subscriptions/subscription_store.js';
14
+ export { SubscriptionCache } from './subscriptions/subscription_cache.js';
15
+ export { SubscriptionMatcher } from './subscriptions/subscription_matcher.js';
16
+ export { parseQ, evaluateQ } from './subscriptions/q_parser.js';
17
+ // Smart Data Models
18
+ export { buildAirQualityObserved, buildWeatherObserved, buildWaterQualityObserved, buildNoiseLevelObserved, buildStreetLight, buildParkingSpot, buildTrafficFlowObserved, buildAgriParcel, buildAgriSoilMeasurement, buildAgriWeatherObserved, buildDevice, buildDeviceMeasurement, } from './models/index.js';
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAQ5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,UAAU;AACV,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGrD,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAElF,kCAAkC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAG/D,oBAAoB;AACpB,OAAO,EACH,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,EACX,sBAAsB,GACzB,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { NgsiLdEntity } from '../../types/entity.js';
2
+ export interface AgriParcelAttributes {
3
+ localId: string;
4
+ name?: string;
5
+ area?: number;
6
+ cropStatus?: string;
7
+ lastPlantedAt?: string;
8
+ hasAgriSoil?: string;
9
+ hasAgriCrop?: string;
10
+ ownedBy?: string;
11
+ belongsTo?: string;
12
+ }
13
+ /**
14
+ * Builds an NGSI-LD AgriParcel entity.
15
+ */
16
+ export declare function buildAgriParcel(attrs: AgriParcelAttributes): NgsiLdEntity;
17
+ //# sourceMappingURL=agri_parcel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agri_parcel.d.ts","sourceRoot":"","sources":["../../../src/models/agrifood/agri_parcel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAqBzE"}
@@ -0,0 +1,27 @@
1
+ import { property } from '../../helpers/property.js';
2
+ import { buildUrn } from '../../helpers/urn.js';
3
+ import { NGSI_LD_CORE_CONTEXT } from '../../types/context.js';
4
+ /**
5
+ * Builds an NGSI-LD AgriParcel entity.
6
+ */
7
+ export function buildAgriParcel(attrs) {
8
+ const entity = {
9
+ id: buildUrn('AgriParcel', attrs.localId),
10
+ type: 'AgriParcel',
11
+ '@context': NGSI_LD_CORE_CONTEXT,
12
+ };
13
+ if (attrs.name !== undefined) {
14
+ entity['name'] = property(attrs.name);
15
+ }
16
+ if (attrs.area !== undefined) {
17
+ entity['area'] = property(attrs.area);
18
+ }
19
+ if (attrs.cropStatus !== undefined) {
20
+ entity['cropStatus'] = property(attrs.cropStatus);
21
+ }
22
+ if (attrs.lastPlantedAt !== undefined) {
23
+ entity['lastPlantedAt'] = property(attrs.lastPlantedAt);
24
+ }
25
+ return entity;
26
+ }
27
+ //# sourceMappingURL=agri_parcel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agri_parcel.js","sourceRoot":"","sources":["../../../src/models/agrifood/agri_parcel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAc7D;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACvD,MAAM,MAAM,GAAiB;QACzB,EAAE,EAAE,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC;QACzC,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,oBAAoB;KACnC,CAAA;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACzC,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,IAAI,CAA2B,CAAA;IAC3E,CAAC;IACD,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IACrD,CAAC;IACD,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3D,CAAC;IAED,OAAO,MAAM,CAAA;AACjB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { NgsiLdEntity } from '../../types/entity.js';
2
+ export interface AgriSoilMeasurementAttributes {
3
+ localId: string;
4
+ dateObserved?: string;
5
+ soilTemperature?: number;
6
+ soilMoistureVwc?: number;
7
+ soilMoistureEc?: number;
8
+ soilSalinity?: number;
9
+ pH?: number;
10
+ soilDepth?: number;
11
+ refAgriParcel?: string;
12
+ }
13
+ /**
14
+ * Builds an NGSI-LD AgriSoilMeasurement entity (custom Smart Data Model).
15
+ */
16
+ export declare function buildAgriSoilMeasurement(attrs: AgriSoilMeasurementAttributes): NgsiLdEntity;
17
+ //# sourceMappingURL=agri_soil_measurement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agri_soil_measurement.d.ts","sourceRoot":"","sources":["../../../src/models/agrifood/agri_soil_measurement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,6BAA6B;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,GAAG,YAAY,CA0B3F"}
@@ -0,0 +1,31 @@
1
+ import { property } from '../../helpers/property.js';
2
+ import { buildUrn } from '../../helpers/urn.js';
3
+ import { NGSI_LD_CORE_CONTEXT } from '../../types/context.js';
4
+ /**
5
+ * Builds an NGSI-LD AgriSoilMeasurement entity (custom Smart Data Model).
6
+ */
7
+ export function buildAgriSoilMeasurement(attrs) {
8
+ const entity = {
9
+ id: buildUrn('AgriSoilMeasurement', attrs.localId),
10
+ type: 'AgriSoilMeasurement',
11
+ '@context': NGSI_LD_CORE_CONTEXT,
12
+ };
13
+ const observedAt = attrs.dateObserved;
14
+ if (attrs.dateObserved !== undefined) {
15
+ entity['dateObserved'] = property(attrs.dateObserved);
16
+ }
17
+ if (attrs.soilTemperature !== undefined) {
18
+ entity['soilTemperature'] = property(attrs.soilTemperature, observedAt ? { observedAt } : undefined);
19
+ }
20
+ if (attrs.soilMoistureVwc !== undefined) {
21
+ entity['soilMoistureVwc'] = property(attrs.soilMoistureVwc, observedAt ? { observedAt } : undefined);
22
+ }
23
+ if (attrs.soilMoistureEc !== undefined) {
24
+ entity['soilMoistureEc'] = property(attrs.soilMoistureEc, observedAt ? { observedAt } : undefined);
25
+ }
26
+ if (attrs.pH !== undefined) {
27
+ entity['pH'] = property(attrs.pH, observedAt ? { observedAt } : undefined);
28
+ }
29
+ return entity;
30
+ }
31
+ //# sourceMappingURL=agri_soil_measurement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agri_soil_measurement.js","sourceRoot":"","sources":["../../../src/models/agrifood/agri_soil_measurement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAc7D;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IACzE,MAAM,MAAM,GAAiB;QACzB,EAAE,EAAE,QAAQ,CAAC,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC;QAClD,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,oBAAoB;KACnC,CAAA;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAA;IAErC,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACzD,CAAC;IACD,IAAI,KAAK,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACtC,MAAM,CAAC,iBAAiB,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAC1I,CAAC;IACD,IAAI,KAAK,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACtC,MAAM,CAAC,iBAAiB,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAC1I,CAAC;IACD,IAAI,KAAK,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QACrC,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IACxI,CAAC;IACD,IAAI,KAAK,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAChH,CAAC;IAED,OAAO,MAAM,CAAA;AACjB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { NgsiLdEntity } from '../../types/entity.js';
2
+ export interface AgriWeatherObservedAttributes {
3
+ localId: string;
4
+ dateObserved?: string;
5
+ temperature?: number;
6
+ relativeHumidity?: number;
7
+ atmosphericPressure?: number;
8
+ solarRadiation?: number;
9
+ precipitation?: number;
10
+ windSpeed?: number;
11
+ windDirection?: number;
12
+ leafWetness?: number;
13
+ dewPoint?: number;
14
+ refAgriParcel?: string;
15
+ }
16
+ /**
17
+ * Builds an NGSI-LD AgriWeatherObserved entity.
18
+ */
19
+ export declare function buildAgriWeatherObserved(attrs: AgriWeatherObservedAttributes): NgsiLdEntity;
20
+ //# sourceMappingURL=agri_weather_observed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agri_weather_observed.d.ts","sourceRoot":"","sources":["../../../src/models/agrifood/agri_weather_observed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,6BAA6B;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,GAAG,YAAY,CA6B3F"}
@@ -0,0 +1,34 @@
1
+ import { property } from '../../helpers/property.js';
2
+ import { buildUrn } from '../../helpers/urn.js';
3
+ import { NGSI_LD_CORE_CONTEXT } from '../../types/context.js';
4
+ /**
5
+ * Builds an NGSI-LD AgriWeatherObserved entity.
6
+ */
7
+ export function buildAgriWeatherObserved(attrs) {
8
+ const entity = {
9
+ id: buildUrn('AgriWeatherObserved', attrs.localId),
10
+ type: 'AgriWeatherObserved',
11
+ '@context': NGSI_LD_CORE_CONTEXT,
12
+ };
13
+ const observedAt = attrs.dateObserved;
14
+ if (attrs.dateObserved !== undefined) {
15
+ entity['dateObserved'] = property(attrs.dateObserved);
16
+ }
17
+ if (attrs.temperature !== undefined) {
18
+ entity['temperature'] = property(attrs.temperature, observedAt ? { observedAt } : undefined);
19
+ }
20
+ if (attrs.relativeHumidity !== undefined) {
21
+ entity['relativeHumidity'] = property(attrs.relativeHumidity, observedAt ? { observedAt } : undefined);
22
+ }
23
+ if (attrs.solarRadiation !== undefined) {
24
+ entity['solarRadiation'] = property(attrs.solarRadiation, observedAt ? { observedAt } : undefined);
25
+ }
26
+ if (attrs.precipitation !== undefined) {
27
+ entity['precipitation'] = property(attrs.precipitation, observedAt ? { observedAt } : undefined);
28
+ }
29
+ if (attrs.windSpeed !== undefined) {
30
+ entity['windSpeed'] = property(attrs.windSpeed, observedAt ? { observedAt } : undefined);
31
+ }
32
+ return entity;
33
+ }
34
+ //# sourceMappingURL=agri_weather_observed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agri_weather_observed.js","sourceRoot":"","sources":["../../../src/models/agrifood/agri_weather_observed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAiB7D;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IACzE,MAAM,MAAM,GAAiB;QACzB,EAAE,EAAE,QAAQ,CAAC,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC;QAClD,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,oBAAoB;KACnC,CAAA;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAA;IAErC,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACzD,CAAC;IACD,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAClI,CAAC;IACD,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,CAAC,kBAAkB,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAC5I,CAAC;IACD,IAAI,KAAK,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QACrC,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IACxI,CAAC;IACD,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IACtI,CAAC;IACD,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAC9H,CAAC;IAED,OAAO,MAAM,CAAA;AACjB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { NgsiLdEntity } from '../../types/entity.js';
2
+ export interface DeviceAttributes {
3
+ localId: string;
4
+ category?: string[];
5
+ controlledAsset?: string[];
6
+ ipAddress?: string[];
7
+ deviceState?: string;
8
+ dateLastValueReported?: string;
9
+ value?: string;
10
+ serialNumber?: string;
11
+ refDeviceModel?: string;
12
+ batteryLevel?: number;
13
+ rssi?: number;
14
+ firmwareVersion?: string;
15
+ osVersion?: string;
16
+ softwareVersion?: string;
17
+ hardwareVersion?: string;
18
+ name?: string;
19
+ }
20
+ /**
21
+ * Builds an NGSI-LD Device entity.
22
+ */
23
+ export declare function buildDevice(attrs: DeviceAttributes): NgsiLdEntity;
24
+ //# sourceMappingURL=device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../src/models/device/device.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAiCjE"}
@@ -0,0 +1,39 @@
1
+ import { property } from '../../helpers/property.js';
2
+ import { buildUrn } from '../../helpers/urn.js';
3
+ import { NGSI_LD_CORE_CONTEXT } from '../../types/context.js';
4
+ /**
5
+ * Builds an NGSI-LD Device entity.
6
+ */
7
+ export function buildDevice(attrs) {
8
+ const entity = {
9
+ id: buildUrn('Device', attrs.localId),
10
+ type: 'Device',
11
+ '@context': NGSI_LD_CORE_CONTEXT,
12
+ };
13
+ if (attrs.category !== undefined) {
14
+ entity['category'] = property(attrs.category);
15
+ }
16
+ if (attrs.deviceState !== undefined) {
17
+ entity['deviceState'] = property(attrs.deviceState);
18
+ }
19
+ if (attrs.dateLastValueReported !== undefined) {
20
+ entity['dateLastValueReported'] = property(attrs.dateLastValueReported);
21
+ }
22
+ if (attrs.batteryLevel !== undefined) {
23
+ entity['batteryLevel'] = property(attrs.batteryLevel);
24
+ }
25
+ if (attrs.rssi !== undefined) {
26
+ entity['rssi'] = property(attrs.rssi);
27
+ }
28
+ if (attrs.firmwareVersion !== undefined) {
29
+ entity['firmwareVersion'] = property(attrs.firmwareVersion);
30
+ }
31
+ if (attrs.name !== undefined) {
32
+ entity['name'] = property(attrs.name);
33
+ }
34
+ if (attrs.serialNumber !== undefined) {
35
+ entity['serialNumber'] = property(attrs.serialNumber);
36
+ }
37
+ return entity;
38
+ }
39
+ //# sourceMappingURL=device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.js","sourceRoot":"","sources":["../../../src/models/device/device.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAqB7D;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IAC/C,MAAM,MAAM,GAAiB;QACzB,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC;QACrC,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,oBAAoB;KACnC,CAAA;IAED,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CA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eviceMeasurementAttributes {
3
+ localId: string;
4
+ dateObserved?: string;
5
+ numValue?: number;
6
+ textValue?: string;
7
+ controlledProperty?: string;
8
+ refDevice?: string;
9
+ measurementType?: string;
10
+ unitCode?: string;
11
+ }
12
+ /**
13
+ * Builds an NGSI-LD DeviceMeasurement entity.
14
+ */
15
+ export declare function buildDeviceMeasurement(attrs: DeviceMeasurementAttributes): NgsiLdEntity;
16
+ //# sourceMappingURL=device_measurement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device_measurement.d.ts","sourceRoot":"","sources":["../../../src/models/device/device_measurement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,2BAA2B;IACxC,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,YAAY,CAgCvF"}
@@ -0,0 +1,34 @@
1
+ import { property } from '../../helpers/property.js';
2
+ import { buildUrn } from '../../helpers/urn.js';
3
+ import { NGSI_LD_CORE_CONTEXT } from '../../types/context.js';
4
+ /**
5
+ * Builds an NGSI-LD DeviceMeasurement entity.
6
+ */
7
+ export function buildDeviceMeasurement(attrs) {
8
+ const entity = {
9
+ id: buildUrn('DeviceMeasurement', attrs.localId),
10
+ type: 'DeviceMeasurement',
11
+ '@context': NGSI_LD_CORE_CONTEXT,
12
+ };
13
+ const observedAt = attrs.dateObserved;
14
+ if (attrs.dateObserved !== undefined) {
15
+ entity['dateObserved'] = property(attrs.dateObserved);
16
+ }
17
+ if (attrs.numValue !== undefined) {
18
+ entity['numValue'] = property(attrs.numValue, {
19
+ ...(observedAt ? { observedAt } : {}),
20
+ ...(attrs.unitCode ? { unitCode: attrs.unitCode } : {}),
21
+ });
22
+ }
23
+ if (attrs.textValue !== undefined) {
24
+ entity['textValue'] = property(attrs.textValue);
25
+ }
26
+ if (attrs.controlledProperty !== undefined) {
27
+ entity['controlledProperty'] = property(attrs.controlledProperty);
28
+ }
29
+ if (attrs.measurementType !== undefined) {
30
+ entity['measurementType'] = property(attrs.measurementType);
31
+ }
32
+ return entity;
33
+ }
34
+ //# sourceMappingURL=device_measurement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device_measurement.js","sourceRoot":"","sources":["../../../src/models/device/device_measurement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAa7D;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAkC;IACrE,MAAM,MAAM,GAAiB;QACzB,EAAE,EAAE,QAAQ,CAAC,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC;QAChD,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,oBAAoB;KACnC,CAAA;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAA;IAErC,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACzD,CAAC;IACD,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC/B,MAAM,CAAC,UAAU,CAAC,GAAG,QAAQ,CACzB,KAAK,CAAC,QAAQ,EACd;YACI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACrC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1D,CACsB,CAAA;IAC/B,CAAC;IACD,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IACnD,CAAC;IACD,IAAI,KAAK,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QACzC,MAAM,CAAC,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;IACrE,CAAC;IACD,IAAI,KAAK,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACtC,MAAM,CAAC,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;IAC/D,CAAC;IAED,OAAO,MAAM,CAAA;AACjB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { NgsiLdEntity } from '../../types/entity.js';
2
+ export interface AirQualityObservedAttributes {
3
+ localId: string;
4
+ dateObserved?: string;
5
+ pm25?: number;
6
+ pm10?: number;
7
+ no2?: number;
8
+ o3?: number;
9
+ co?: number;
10
+ so2?: number;
11
+ temperature?: number;
12
+ relativeHumidity?: number;
13
+ airQualityIndex?: number;
14
+ airQualityLevel?: string;
15
+ location?: string;
16
+ }
17
+ /**
18
+ * Builds an NGSI-LD AirQualityObserved entity.
19
+ * Conforms to the FIWARE Smart Data Models AirQualityObserved schema.
20
+ */
21
+ export declare function buildAirQualityObserved(attrs: AirQualityObservedAttributes): NgsiLdEntity;
22
+ //# sourceMappingURL=air_quality_observed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"air_quality_observed.d.ts","sourceRoot":"","sources":["../../../src/models/environment/air_quality_observed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,4BAA4B;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,YAAY,CA4CzF"}
@@ -0,0 +1,50 @@
1
+ import { property } from '../../helpers/property.js';
2
+ import { buildUrn } from '../../helpers/urn.js';
3
+ import { NGSI_LD_CORE_CONTEXT } from '../../types/context.js';
4
+ /**
5
+ * Builds an NGSI-LD AirQualityObserved entity.
6
+ * Conforms to the FIWARE Smart Data Models AirQualityObserved schema.
7
+ */
8
+ export function buildAirQualityObserved(attrs) {
9
+ const entity = {
10
+ id: buildUrn('AirQualityObserved', attrs.localId),
11
+ type: 'AirQualityObserved',
12
+ '@context': NGSI_LD_CORE_CONTEXT,
13
+ };
14
+ const observedAt = attrs.dateObserved;
15
+ if (attrs.dateObserved !== undefined) {
16
+ entity['dateObserved'] = property(attrs.dateObserved);
17
+ }
18
+ if (attrs.pm25 !== undefined) {
19
+ entity['pm25'] = property(attrs.pm25, observedAt ? { observedAt } : undefined);
20
+ }
21
+ if (attrs.pm10 !== undefined) {
22
+ entity['pm10'] = property(attrs.pm10, observedAt ? { observedAt } : undefined);
23
+ }
24
+ if (attrs.no2 !== undefined) {
25
+ entity['no2'] = property(attrs.no2, observedAt ? { observedAt } : undefined);
26
+ }
27
+ if (attrs.o3 !== undefined) {
28
+ entity['o3'] = property(attrs.o3, observedAt ? { observedAt } : undefined);
29
+ }
30
+ if (attrs.co !== undefined) {
31
+ entity['co'] = property(attrs.co, observedAt ? { observedAt } : undefined);
32
+ }
33
+ if (attrs.so2 !== undefined) {
34
+ entity['so2'] = property(attrs.so2, observedAt ? { observedAt } : undefined);
35
+ }
36
+ if (attrs.temperature !== undefined) {
37
+ entity['temperature'] = property(attrs.temperature, observedAt ? { observedAt } : undefined);
38
+ }
39
+ if (attrs.relativeHumidity !== undefined) {
40
+ entity['relativeHumidity'] = property(attrs.relativeHumidity, observedAt ? { observedAt } : undefined);
41
+ }
42
+ if (attrs.airQualityIndex !== undefined) {
43
+ entity['airQualityIndex'] = property(attrs.airQualityIndex, observedAt ? { observedAt } : undefined);
44
+ }
45
+ if (attrs.airQualityLevel !== undefined) {
46
+ entity['airQualityLevel'] = property(attrs.airQualityLevel);
47
+ }
48
+ return entity;
49
+ }
50
+ //# sourceMappingURL=air_quality_observed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"air_quality_observed.js","sourceRoot":"","sources":["../../../src/models/environment/air_quality_observed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAkB7D;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAmC;IACvE,MAAM,MAAM,GAAiB;QACzB,EAAE,EAAE,QAAQ,CAAC,oBAAoB,EAAE,KAAK,CAAC,OAAO,CAAC;QACjD,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,oBAAoB;KACnC,CA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: string;
5
+ LAeq?: number;
6
+ LAmax?: number;
7
+ LAmin?: number;
8
+ LAeq_d?: number;
9
+ LAeq_e?: number;
10
+ LAeq_n?: number;
11
+ sonometerClass?: string;
12
+ }
13
+ /**
14
+ * Builds an NGSI-LD NoiseLevelObserved entity.
15
+ */
16
+ export declare function buildNoiseLevelObserved(attrs: NoiseLevelObservedAttributes): NgsiLdEntity;
17
+ //# sourceMappingURL=noise_level_observed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noise_level_observed.d.ts","sourceRoot":"","sources":["../../../src/models/environment/noise_level_observed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,4BAA4B;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,YAAY,CA0BzF"}
@@ -0,0 +1,31 @@
1
+ import { property } from '../../helpers/property.js';
2
+ import { buildUrn } from '../../helpers/urn.js';
3
+ import { NGSI_LD_CORE_CONTEXT } from '../../types/context.js';
4
+ /**
5
+ * Builds an NGSI-LD NoiseLevelObserved entity.
6
+ */
7
+ export function buildNoiseLevelObserved(attrs) {
8
+ const entity = {
9
+ id: buildUrn('NoiseLevelObserved', attrs.localId),
10
+ type: 'NoiseLevelObserved',
11
+ '@context': NGSI_LD_CORE_CONTEXT,
12
+ };
13
+ const observedAt = attrs.dateObserved;
14
+ if (attrs.dateObserved !== undefined) {
15
+ entity['dateObserved'] = property(attrs.dateObserved);
16
+ }
17
+ if (attrs.LAeq !== undefined) {
18
+ entity['LAeq'] = property(attrs.LAeq, observedAt ? { observedAt } : undefined);
19
+ }
20
+ if (attrs.LAmax !== undefined) {
21
+ entity['LAmax'] = property(attrs.LAmax, observedAt ? { observedAt } : undefined);
22
+ }
23
+ if (attrs.LAmin !== undefined) {
24
+ entity['LAmin'] = property(attrs.LAmin, observedAt ? { observedAt } : undefined);
25
+ }
26
+ if (attrs.sonometerClass !== undefined) {
27
+ entity['sonometerClass'] = property(attrs.sonometerClass);
28
+ }
29
+ return entity;
30
+ }
31
+ //# sourceMappingURL=noise_level_observed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noise_level_observed.js","sourceRoot":"","sources":["../../../src/models/environment/noise_level_observed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAc7D;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAmC;IACvE,MAAM,MAAM,GAAiB;QACzB,EAAE,EAAE,QAAQ,CAAC,oBAAoB,EAAE,KAAK,CAAC,OAAO,CAAC;QACjD,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,oBAAoB;KACnC,CAAA;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAA;IAErC,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACzD,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IACpH,CAAC;IACD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IACtH,CAAC;IACD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IACtH,CAAC;IACD,IAAI,KAAK,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QACrC,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;IAC7D,CAAC;IAED,OAAO,MAAM,CAAA;AACjB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { NgsiLdEntity } from '../../types/entity.js';
2
+ export interface WaterQualityObservedAttributes {
3
+ localId: string;
4
+ dateObserved?: string;
5
+ temperature?: number;
6
+ pH?: number;
7
+ conductivity?: number;
8
+ conductance?: number;
9
+ tss?: number;
10
+ tds?: number;
11
+ turbidity?: number;
12
+ salinity?: number;
13
+ dissolvedOxygen?: number;
14
+ orp?: number;
15
+ }
16
+ /**
17
+ * Builds an NGSI-LD WaterQualityObserved entity.
18
+ */
19
+ export declare function buildWaterQualityObserved(attrs: WaterQualityObservedAttributes): NgsiLdEntity;
20
+ //# sourceMappingURL=water_quality_observed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"water_quality_observed.d.ts","sourceRoot":"","sources":["../../../src/models/environment/water_quality_observed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,8BAA8B;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,GAAG,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,GAAG,YAAY,CAyC7F"}
@@ -0,0 +1,46 @@
1
+ import { property } from '../../helpers/property.js';
2
+ import { buildUrn } from '../../helpers/urn.js';
3
+ import { NGSI_LD_CORE_CONTEXT } from '../../types/context.js';
4
+ /**
5
+ * Builds an NGSI-LD WaterQualityObserved entity.
6
+ */
7
+ export function buildWaterQualityObserved(attrs) {
8
+ const entity = {
9
+ id: buildUrn('WaterQualityObserved', attrs.localId),
10
+ type: 'WaterQualityObserved',
11
+ '@context': NGSI_LD_CORE_CONTEXT,
12
+ };
13
+ const observedAt = attrs.dateObserved;
14
+ if (attrs.dateObserved !== undefined) {
15
+ entity['dateObserved'] = property(attrs.dateObserved);
16
+ }
17
+ if (attrs.temperature !== undefined) {
18
+ entity['temperature'] = property(attrs.temperature, observedAt ? { observedAt } : undefined);
19
+ }
20
+ if (attrs.pH !== undefined) {
21
+ entity['pH'] = property(attrs.pH, observedAt ? { observedAt } : undefined);
22
+ }
23
+ if (attrs.conductivity !== undefined) {
24
+ entity['conductivity'] = property(attrs.conductivity, observedAt ? { observedAt } : undefined);
25
+ }
26
+ if (attrs.turbidity !== undefined) {
27
+ entity['turbidity'] = property(attrs.turbidity, observedAt ? { observedAt } : undefined);
28
+ }
29
+ if (attrs.salinity !== undefined) {
30
+ entity['salinity'] = property(attrs.salinity, observedAt ? { observedAt } : undefined);
31
+ }
32
+ if (attrs.dissolvedOxygen !== undefined) {
33
+ entity['dissolvedOxygen'] = property(attrs.dissolvedOxygen, observedAt ? { observedAt } : undefined);
34
+ }
35
+ if (attrs.tss !== undefined) {
36
+ entity['tss'] = property(attrs.tss, observedAt ? { observedAt } : undefined);
37
+ }
38
+ if (attrs.tds !== undefined) {
39
+ entity['tds'] = property(attrs.tds, observedAt ? { observedAt } : undefined);
40
+ }
41
+ if (attrs.orp !== undefined) {
42
+ entity['orp'] = property(attrs.orp, observedAt ? { observedAt } : undefined);
43
+ }
44
+ return entity;
45
+ }
46
+ //# sourceMappingURL=water_quality_observed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"water_quality_observed.js","sourceRoot":"","sources":["../../../src/models/environment/water_quality_observed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAiB7D;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAqC;IAC3E,MAAM,MAAM,GAAiB;QACzB,EAAE,EAAE,QAAQ,CAAC,sBAAsB,EAAE,KAAK,CAAC,OAAO,CAAC;QACnD,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,oBAAoB;KACnC,CAAA;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAA;IAErC,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACzD,CAAC;IACD,I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AC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAC1I,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAClH,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAClH,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAA2B,CAAA;IAClH,CAAC;IAED,OAAO,MAAM,CAAA;AACjB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { NgsiLdEntity } from '../../types/entity.js';
2
+ export interface WeatherObservedAttributes {
3
+ localId: string;
4
+ dateObserved?: string;
5
+ temperature?: number;
6
+ relativeHumidity?: number;
7
+ windSpeed?: number;
8
+ windDirection?: number;
9
+ atmosphericPressure?: number;
10
+ precipitation?: number;
11
+ snowHeight?: number;
12
+ visibility?: number;
13
+ weatherType?: string;
14
+ }
15
+ /**
16
+ * Builds an NGSI-LD WeatherObserved entity.
17
+ */
18
+ export declare function buildWeatherObserved(attrs: WeatherObservedAttributes): NgsiLdEntity;
19
+ //# sourceMappingURL=weather_observed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weather_observed.d.ts","sourceRoot":"","sources":["../../../src/models/environment/weather_observed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAA;AAKzE,MAAM,WAAW,yBAAyB;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,YAAY,CAyCnF"}