@justair/justair-library 4.5.0 → 4.5.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -28,6 +28,7 @@ const alertsSchema = mongoose.Schema(
28
28
  type: String,
29
29
  enum: ["Active", "Ack", "Mute"],
30
30
  },
31
+ activeUntil: { type: Date },
31
32
  actionBy: { type: mongoose.Types.ObjectId, ref: "Admin" },
32
33
  actionDate: { type: Date, default: Date.now },
33
34
  recipients: [recipientSchema],
@@ -64,6 +65,7 @@ const alertsAuditSchema = mongoose.Schema(
64
65
  type: String,
65
66
  enum: ["Active", "Ack", "Mute"],
66
67
  },
68
+ activeUntil: {type: Date},
67
69
  actionBy: { type: mongoose.Types.ObjectId, ref: "Admin" },
68
70
  actionDate: { type: Date, default: Date.now },
69
71
  recipients: [recipientSchema],
@@ -94,6 +96,7 @@ alertsSchema.pre("findOneAndDelete", async function () {
94
96
  alertConfigurationId: docToDelete.alertConfigurationId,
95
97
  monitorId: docToDelete.monitorId,
96
98
  status: docToDelete.status,
99
+ activeUntil: docToDelete.activeUntil,
97
100
  actionBy: docToDelete.actionBy,
98
101
  actionDate: docToDelete.actionDate,
99
102
  recipients: docToDelete.recipients,
@@ -118,6 +121,7 @@ alertsSchema.pre("deleteMany", async function () {
118
121
  orgId: doc.orgId,
119
122
  monitorId: doc.monitorId,
120
123
  status: doc.status,
124
+ activeUntil: doc.activeUntil,
121
125
  actionBy: doc.actionBy,
122
126
  actionDate: doc.actionDate,
123
127
  recipients: doc.recipients,
@@ -143,6 +147,7 @@ alertsSchema.pre("deleteOne", async function () {
143
147
  orgId: docToDelete.orgId,
144
148
  monitorId: docToDelete.monitorId,
145
149
  status: docToDelete.status,
150
+ activeUntil: docToDelete.activeUntil,
146
151
  actionBy: docToDelete.actionBy,
147
152
  actionDate: docToDelete.actionDate,
148
153
  recipients: docToDelete.recipients,
@@ -165,6 +170,7 @@ alertsSchema.pre("findOneAndUpdate", async function () {
165
170
  orgId: docToUpdate.orgId,
166
171
  monitorId: docToUpdate.monitorId,
167
172
  status: docToUpdate.status,
173
+ activeUntil: docToUpdate.activeUntil,
168
174
  actionBy: docToUpdate.actionBy,
169
175
  actionDate: docToUpdate.actionDate,
170
176
  recipients: docToUpdate.recipients,
@@ -187,6 +193,7 @@ alertsSchema.pre("updateMany", async function () {
187
193
  orgId: doc.orgId,
188
194
  monitorId: doc.monitorId,
189
195
  status: doc.status,
196
+ activeUntil: doc.activeUntil,
190
197
  actionBy: doc.actionBy,
191
198
  actionDate: doc.actionDate,
192
199
  recipients: doc.recipients,
@@ -131,7 +131,9 @@ const monitorsSchema = mongoose.Schema(
131
131
  "blue sky",
132
132
  "aq mesh",
133
133
  "quant aq",
134
- "airgradient"
134
+ "airgradient",
135
+ "oizom",
136
+ "metOne"
135
137
  ],
136
138
  },
137
139
  monitorType: String,
@@ -194,7 +196,10 @@ const monitorsSchema = mongoose.Schema(
194
196
  default: [],
195
197
  },
196
198
  applyCorrections: { type: Boolean, default: false },
197
- pausedParameters: { type: [{ parameter: String, timestamp: Date, isPaused: Boolean }], default: [] }
199
+ pausedParameters: {
200
+ type: [{ parameter: String, timestamp: Date, isPaused: Boolean }],
201
+ default: [],
202
+ },
198
203
  },
199
204
  {
200
205
  timestamps: true,
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
package/.idea/misc.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/justair-library.iml" filepath="$PROJECT_DIR$/.idea/justair-library.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>