@bluedot-innovation/models 7.2.1 → 7.3.1

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
+ ## 7.3.1
2
+ - Renamed dataInsights feature to insights
3
+
4
+ ## 7.3.0
5
+ - Added dataInsights feature to account
6
+
1
7
  ## 7.2.1
2
8
  - Added validation for required fields for tealium webhooks
3
9
  - Added validation that webhook headers and body keys cannot contain spaces
@@ -15,6 +15,9 @@
15
15
  },
16
16
  "screens": {
17
17
  "enabled": true
18
+ },
19
+ "insights": {
20
+ "enabled": true
18
21
  }
19
22
  },
20
23
  "integrations": {
@@ -405,11 +405,11 @@ describe('Project', () => {
405
405
  })
406
406
  })
407
407
 
408
- it('should not validate if webhooks contains a webhook of the same type and url but different structure', () => {
408
+ describe('should not validate if webhooks contains a webhook of the same type and url but different structure', () => {
409
409
  const webhookTypes = ['tempo', 'wave', 'trigger']
410
410
 
411
411
  webhookTypes.map(webhookType => {
412
- assertions(`should not validate if there are duplicate ${webhookType} webhooks`, (done) => {
412
+ it(`should not validate if there are duplicate ${webhookType} webhooks`, (done) => {
413
413
  project.webhooks.push({
414
414
  "type": webhookType,
415
415
  "url": "https://webhooklistener.bluedotinnovation.com",
@@ -422,7 +422,7 @@ describe('Project', () => {
422
422
  let Project = new ProjectModel(project)
423
423
  Project.validate((err, res) => {
424
424
  assert.exists(err)
425
- assert.match(err.message, /Duplicate webhooks found. Only have one webhook of each type is allowed/)
425
+ assert.match(err.message, /Duplicate webhooks found with the same type and url as another. Only one is allowed/)
426
426
  done()
427
427
  })
428
428
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "7.2.1",
3
+ "version": "7.3.1",
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",
@@ -5,7 +5,8 @@ let AccountBasicFeatureSchema = require('./AccountBasicFeature')
5
5
  let AccountFeaturesSchema = new mongoose.Schema({
6
6
  tempo: AccountTempoSchema,
7
7
  realTimeDashboard: AccountBasicFeatureSchema,
8
- screens: AccountBasicFeatureSchema
8
+ screens: AccountBasicFeatureSchema,
9
+ insights: AccountBasicFeatureSchema
9
10
  }, {
10
11
  _id: false
11
12
  })