@bluedot-innovation/models 10.6.0 → 10.8.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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 10.8.0
2
+ - Add insightsConfiguration to Project model
3
+
4
+ ## 10.7.0
5
+ - Add liveUpdateEnabled to IosConfig
6
+
1
7
  ## 10.6.0
2
8
  - Add Destination customData
3
9
  - Add new webhook structure 2.1
@@ -135,5 +135,8 @@
135
135
  "timezone": "Australia/Melbourne",
136
136
  "recipients": "abc@example.com"
137
137
  }
138
- ]
138
+ ],
139
+ "insightsConfiguration": {
140
+ "volumeGroupByKeys": ["Operational State", "Store Number", "City"]
141
+ }
139
142
  }
@@ -63,7 +63,8 @@
63
63
  "nativeCheckinAccuracyThreshold" : 101,
64
64
  "nativeCheckoutDistanceAccuracy" : 151,
65
65
  "nativeMinLocationUpdateInterval" : 0.6,
66
- "nativeMaxMonitoringRegions" : 19
66
+ "nativeMaxMonitoringRegions" : 19,
67
+ "liveUpdateEnabled": true
67
68
  }
68
69
  }
69
70
  }
package/models/Project.js CHANGED
@@ -18,6 +18,7 @@ let androidConfig = require('../schemas/AndroidConfig')
18
18
  let projectTempoSchema = require('../schemas/ProjectTempo')
19
19
  let projectHelloSchema = require('../schemas/ProjectHello')
20
20
  let reportConfigurationSchema = require('../schemas/ReportConfiguration')
21
+ let insightsConfigurationSchema = require('../schemas/InsightsConfiguration')
21
22
 
22
23
  let webhooksValidators = [
23
24
  {validator: helpers.validateNotNull},
@@ -57,7 +58,8 @@ let ProjectSchema = new mongoose.Schema({
57
58
  integrations: IntegrationSchema,
58
59
  tempo: projectTempoSchema,
59
60
  hello: projectHelloSchema,
60
- reportConfigurations: {type: [reportConfigurationSchema], validate: reportConfigurationsValidators}
61
+ reportConfigurations: {type: [reportConfigurationSchema], validate: reportConfigurationsValidators},
62
+ insightsConfiguration: insightsConfigurationSchema
61
63
  },
62
64
  {collection: 'project'})
63
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "10.6.0",
3
+ "version": "10.8.0",
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",
@@ -0,0 +1,9 @@
1
+ let mongoose = require('mongoose')
2
+
3
+ let InsightsConfigurationSchema = new mongoose.Schema({
4
+ volumeGroupByKeys: {type: [String]}
5
+ }, {
6
+ _id: false
7
+ })
8
+
9
+ module.exports = InsightsConfigurationSchema
@@ -39,7 +39,8 @@ let IosSchema = new mongoose.Schema({
39
39
  nativeCheckinAccuracyThreshold: {type: Number, default: 100},
40
40
  nativeCheckoutDistanceAccuracy: {type: Number, default: 150},
41
41
  nativeMinLocationUpdateInterval: {type: Number, default: 0.5},
42
- nativeMaxMonitoringRegions: {type: Number, default: 18}
42
+ nativeMaxMonitoringRegions: {type: Number, default: 18},
43
+ liveUpdateEnabled : {type: Boolean}
43
44
  }, {
44
45
  _id: false
45
46
  })