@justair/justair-library 4.3.3-alpha → 4.3.4-alpha

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "4.3.3-alpha",
3
+ "version": "4.3.4-alpha",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -48,6 +48,7 @@ import {
48
48
  alertsSchema,
49
49
  alertsAuditSchema,
50
50
  } from "./models/alerts.js";
51
+ import { Features, featuresSchema } from "./models/features.js";
51
52
  import Database from "./config/db.js"; // Import the new Database class
52
53
  import CustomLogger from "./config/logger.js";
53
54
 
@@ -101,4 +102,6 @@ export {
101
102
  Alerts,
102
103
  alertsSchema,
103
104
  alertsAuditSchema,
105
+ Features,
106
+ featuresSchema,
104
107
  };
@@ -6,7 +6,7 @@ const eventsAuditSchema = mongoose.Schema(
6
6
  monitorId: { type: mongoose.Types.ObjectId, ref: "Monitors" },
7
7
  parameter: {
8
8
  type: String,
9
- enum: ["AQI", "PID"],
9
+ enum: ["AQI", "PID", "AQI-Daily"],
10
10
  },
11
11
  values: Object,
12
12
  alertLevels: Object,
@@ -14,10 +14,6 @@ const eventsAuditSchema = mongoose.Schema(
14
14
  type: String,
15
15
  enum: ["Collocation", "Deployed", "Maintenance", "Pending Deployment"],
16
16
  },
17
- pollutantsFlags: {
18
- type: Object,
19
- default: {},
20
- },
21
17
  deletedAt: { type: Date, default: null },
22
18
  },
23
19
  {
@@ -41,10 +37,6 @@ const eventsSchema = mongoose.Schema(
41
37
  type: String,
42
38
  enum: ["Collocation", "Deployed", "Maintenance", "Pending Deployment"],
43
39
  },
44
- pollutantsFlags: {
45
- type: Object,
46
- default: {},
47
- },
48
40
  },
49
41
  {
50
42
  timestamps: true,
@@ -0,0 +1,14 @@
1
+ import mongoose from "mongoose";
2
+
3
+ const featuresSchema = mongoose.Schema(
4
+ {
5
+ name: String,
6
+ },
7
+ {
8
+ timestamps: true,
9
+ }
10
+ );
11
+
12
+ const Features = mongoose.model("Features", featuresSchema);
13
+
14
+ export { featuresSchema, Features };
@@ -1,12 +1,21 @@
1
1
  import mongoose from "mongoose";
2
2
 
3
- const monitorSuppliersSchema = mongoose.Schema({
4
- name : String
5
- },
6
- {
7
- timestamps: true
8
- });
3
+ const monitorSuppliersSchema = mongoose.Schema(
4
+ {
5
+ name: String,
6
+ supplierTypes: [String],
7
+ authenticationStructure: [String],
8
+ defaultParameterThresholds: Object,
9
+ defaultCompletenessThresholdCount: Number,
10
+ },
11
+ {
12
+ timestamps: true,
13
+ }
14
+ );
9
15
 
10
- const MonitorSuppliers = mongoose.model("MonitorSuppliers", monitorSuppliersSchema);
16
+ const MonitorSuppliers = mongoose.model(
17
+ "MonitorSuppliers",
18
+ monitorSuppliersSchema
19
+ );
11
20
 
12
- export {monitorSuppliersSchema, MonitorSuppliers};
21
+ export { monitorSuppliersSchema, MonitorSuppliers };