@justair/justair-library 1.1.1 → 1.1.2
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.
package/package.json
CHANGED
|
@@ -4,7 +4,8 @@ const configurationsSchema = mongoose.Schema({
|
|
|
4
4
|
type: { type: String, enum: ['flag'] },
|
|
5
5
|
name: String,
|
|
6
6
|
properties: Object,
|
|
7
|
-
isActive: { type: Boolean, default: false }
|
|
7
|
+
isActive: { type: Boolean, default: false },
|
|
8
|
+
firstRun: {type: Boolean, default: false}
|
|
8
9
|
}, {
|
|
9
10
|
timestamps: true
|
|
10
11
|
});
|
package/src/models/events.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
|
-
|
|
2
|
+
//TODO: Capture historical data, every hour record AQI values for monitors
|
|
3
3
|
const eventsSchema = mongoose.Schema(
|
|
4
4
|
{
|
|
5
5
|
monitorId: {type: mongoose.Types.ObjectId, ref: "Monitors"},
|
|
6
|
-
parameter:
|
|
7
|
-
|
|
6
|
+
parameter: {
|
|
7
|
+
type: String,
|
|
8
|
+
enum: ["AQI"] },
|
|
9
|
+
values: Object,
|
|
8
10
|
alertLevel:{
|
|
9
11
|
type: String,
|
|
10
12
|
enum: ["Good","Moderate", "Unhealthy for SG", "Unhealthy", "Very Unhealthy", "Hazardous"]
|
|
File without changes
|