@bluedot-innovation/models 2.0.19-alpha.16 → 2.0.19-alpha.18

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/models/Zone.js CHANGED
@@ -13,7 +13,7 @@ let circleSchema = require('./geofeatures/Circle').rawSchema
13
13
  let boundingBoxSchema = require('./geofeatures/BoundingBox').rawSchema
14
14
  let polylineSchema = require('./geofeatures/Polyline').rawSchema
15
15
  let polygonSchema = require('./geofeatures/Polygon').rawSchema
16
- let beaconSchema = require('./ZoneBeacon').rawSchema
16
+ let beaconSchema = require('./geofeatures/ZoneBeacon').rawSchema
17
17
  let speedFilterSchema = require('./SpeedFilter').speedFilterSchema
18
18
  let bearingFilterSchema = require('./BearingFilter').bearingFilterSchema
19
19
  let timeOfDayRangeFilterSchema = require('./TimeOfDayRangeFilter').timeOfDayRangeFilterSchema
@@ -11,13 +11,17 @@ schema.proximity = {
11
11
  enum: [BeaconEnum.NEAR, BeaconEnum.FAR]
12
12
  }
13
13
 
14
- const ZoneBeaconSchema = new mongoose.Schema(schema)
14
+ const zoneBeaconSchema = new mongoose.Schema(schema)
15
+
16
+ zoneBeaconSchema.add({
17
+ type: {type: String, required: true}
18
+ })
15
19
 
16
20
  // optional mongoose
17
21
  let ZoneBeaconModel = (mongooseInstance) => {
18
22
  const instance = mongooseInstance || mongoose
19
- return instance.model('ZoneBeacon', ZoneBeaconSchema)
23
+ return instance.model('ZoneBeacon', zoneBeaconSchema)
20
24
  }
21
25
 
22
26
  // Exports Mongoose Model, Mongoose Schema, JSON schema (required locally for discriminators)
23
- module.exports = { Model: ZoneBeaconModel, Schema: ZoneBeaconSchema, rawSchema: schema }
27
+ module.exports = { Model: ZoneBeaconModel, Schema: zoneBeaconSchema, rawSchema: schema }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "2.0.19-alpha.16",
3
+ "version": "2.0.19-alpha.18",
4
4
  "description": "",
5
5
  "main": "Models.js",
6
6
  "scripts": {