@justair/justair-library 4.4.8 → 4.4.9

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.4.8",
3
+ "version": "4.4.9",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1,31 +1,55 @@
1
- import mongoose from 'mongoose';
1
+ import mongoose from "mongoose";
2
2
 
3
- const usersSchema = mongoose.Schema({
3
+ const usersSchema = mongoose.Schema(
4
+ {
4
5
  name: String,
5
6
  phone: String,
6
7
  email: String,
7
8
  zipCode: String,
8
9
  location: [Object],
9
- organizations: [{ type: mongoose.Types.ObjectId, ref: 'Organizations' }],
10
+ organizations: [{ type: mongoose.Types.ObjectId, ref: "Organizations" }],
10
11
  alertPhone: String,
11
12
  alertCount: { type: Number, default: 0 },
12
- subscribedMonitors: [{ type: mongoose.Types.ObjectId, ref: 'Monitors' }],
13
- currentAlertMode: { type: String, enum: ['Good', 'Unhealthy','Moderate', 'Unhealthy for SG', 'Very Unhealthy', 'Hazardous'], default: 'Good' },
13
+ subscribedMonitors: [{ type: mongoose.Types.ObjectId, ref: "Monitors" }],
14
+ currentAlertMode: {
15
+ type: String,
16
+ enum: [
17
+ "Good",
18
+ "Unhealthy",
19
+ "Moderate",
20
+ "Unhealthy for SG",
21
+ "Very Unhealthy",
22
+ "Hazardous",
23
+ ],
24
+ default: "Good",
25
+ },
14
26
  latestAlerts: [Object],
15
27
  optInPhone: { type: Boolean, default: true },
16
- optInEmail: { type: Boolean, default: true },
28
+ optInEmail: { type: Boolean, default: false },
17
29
  isActive: { type: Boolean, default: true },
18
- hasOnboarded: {type: Boolean, default: false},
19
- isSharingLocation: {type: Boolean, default: false},
30
+ hasOnboarded: { type: Boolean, default: false },
31
+ isSharingLocation: { type: Boolean, default: false },
20
32
  toolTips: Object,
21
- alertPreferenceLevel: { type: String, enum: ['Good', 'Moderate', 'Unhealthy for SG', 'Unhealthy', 'Very Unhealthy', 'Hazardous'], default: 'Good' }
22
- },
23
- {
24
- timestamps: true
25
- });
33
+ alertPreferenceLevel: {
34
+ type: String,
35
+ enum: [
36
+ "Good",
37
+ "Moderate",
38
+ "Unhealthy for SG",
39
+ "Unhealthy",
40
+ "Very Unhealthy",
41
+ "Hazardous",
42
+ ],
43
+ default: "Good",
44
+ },
45
+ },
46
+ {
47
+ timestamps: true,
48
+ }
49
+ );
26
50
 
27
- usersSchema.index({phone: 1});
51
+ usersSchema.index({ phone: 1 });
28
52
 
29
- const Users = mongoose.model('Users', usersSchema);
53
+ const Users = mongoose.model("Users", usersSchema);
30
54
 
31
- export {usersSchema, Users};
55
+ export { usersSchema, Users };
@@ -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>