@bluedot-innovation/models 10.7.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,6 @@
1
+ ## 10.8.0
2
+ - Add insightsConfiguration to Project model
3
+
1
4
  ## 10.7.0
2
5
  - Add liveUpdateEnabled to IosConfig
3
6
 
@@ -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
  }
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.7.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