@justair/justair-library 1.3.7 → 2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "1.3.7",
3
+ "version": "2.0.0",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -0,0 +1,23 @@
1
+ import mongoose from 'mongoose';
2
+
3
+ const lightMonitorSchema = mongoose.Schema({
4
+ monitorId: {type: mongoose.Types.ObjectId, ref: 'Monitors'},
5
+ currentColor: {type: String, default: '16000'},
6
+ isActive: { type: Boolean, default: false },
7
+ configuration: {
8
+ hueUsername: { type: String},
9
+ clientId: { type: String, required: true },
10
+ clientSecret: { type: String, required: true },
11
+ lightId: { type: String, required: true },
12
+ accessTokenInfo: Object,
13
+ refreshTokenInfo: Object,
14
+ hueCode: { type: String, required: true}
15
+ }
16
+ },
17
+ {
18
+ timestamps: true
19
+ });
20
+
21
+ const LightMonitors = mongoose.model('LightMonitor', lightMonitorSchema);
22
+
23
+ export default LightMonitors;
@@ -17,7 +17,7 @@ const usersSchema = mongoose.Schema({
17
17
  isActive: { type: Boolean, default: true },
18
18
  hasOnboarded: {type: Boolean, default: false},
19
19
  isSharingLocation: {type: Boolean, default: false},
20
- toolTips: [Object]
20
+ toolTips: Object
21
21
  },
22
22
  {
23
23
  timestamps: true