@bluedot-innovation/models 5.1.35 → 5.1.37

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 5.1.37
2
+ - Added missing @turf/helpers package
3
+
4
+ ## 5.1.36
5
+ - Added ConfigurationParameters model
6
+
1
7
  ## 5.1.35
2
8
  - Update moongose-json-patch module
3
9
 
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright : Bluedot Innovations.
3
+ */
4
+
5
+ let mongoose = require('mongoose')
6
+ let Schema = mongoose.Schema
7
+
8
+ // Schemas
9
+ let iosConfigSchema = require('../schemas/IosConfig')
10
+ let androidConfigSchema = require('../schemas/AndroidConfig')
11
+
12
+ let ConfigurationParametersSchema = new Schema({
13
+ name: { type: String, required: true },
14
+ iosConfig: { type: iosConfigSchema, required: true },
15
+ androidConfig: { type: androidConfigSchema, required: true },
16
+ },
17
+ {collection: 'configurationParameters'})
18
+
19
+ // optional mongoose
20
+ let model = (mongooseInstance) => {
21
+ let ConfigurationParameters
22
+ if (mongooseInstance) {
23
+ ConfigurationParameters = mongooseInstance.model('ConfigurationParameters', ConfigurationParametersSchema)
24
+ } else {
25
+ ConfigurationParameters = mongoose.model('ConfigurationParameters', ConfigurationParametersSchema)
26
+ }
27
+
28
+ return ConfigurationParameters
29
+ }
30
+
31
+ // Exports Mongoose Model, Mongoose Schema, JSON schema (required locally for discriminators)
32
+ module.exports = { Model: model, Schema: ConfigurationParametersSchema }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "5.1.35",
3
+ "version": "5.1.37",
4
4
  "main": "Models.js",
5
5
  "scripts": {
6
6
  "lint": "./node_modules/.bin/eslint -c .eslintrc.js ./models/*.js ./__tests__/**/*.js ./__tests__/**/**/*.js ./schemas/*.js",
@@ -32,6 +32,7 @@
32
32
  "@bluedot-innovation/mongoose-json-patch": "0.0.8",
33
33
  "@mongoosejs/double": "^0.1.2",
34
34
  "@turf/area": "^6.0.1",
35
+ "@turf/helpers": "^6.1.4",
35
36
  "deep-equal": "^1.0.1",
36
37
  "fast-deep-equal": "^2.0.1",
37
38
  "lodash.clonedeep": "4.5.0",