@bluedot-innovation/models 5.0.1 → 5.0.3

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,4 +1,7 @@
1
1
 
2
+ ## 5.0.3
3
+ - Update Project nextRuleUpdateInterval minimum to 300
4
+
2
5
  ## 4.0.0
3
6
  - Webhooks schema no longer allow headers of more than 1 key- value pair
4
7
  - Webhooks no longer require enabled field
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "requiredFields": ["name", "nextRuleUpdateInterval", "accountId"],
3
3
  "customValidators": [
4
- {"name": "nextRuleUpdateInterval", "invalidInput": [5000.5556]},
4
+ {"name": "nextRuleUpdateInterval", "invalidInput": [5000.5556, "200", 290]},
5
5
  {"name": "lastUpdateTime", "invalidInput": ["21/07/2017", "saturday"]},
6
6
  {"name": "creationTime", "invalidInput": ["21/07/2017", "thursday"]},
7
7
  {"name": "accountId", "invalidInput": ["21/07/2017", 21072017, "qwe123-21321-ad"]}
@@ -97,4 +97,4 @@ testCase('Project', () => {
97
97
  })
98
98
  })
99
99
  })
100
- })
100
+ })
package/models/Project.js CHANGED
@@ -20,7 +20,7 @@ let ProjectSchema = new mongoose.Schema({
20
20
  nextRuleUpdateInterval: {
21
21
  type: Number,
22
22
  required: [true, 'nextRuleUpdateInterval is required'],
23
- min: 5,
23
+ min: 300,
24
24
  max: 172800,
25
25
  validate: {
26
26
  validator: Number.isInteger,
@@ -34,9 +34,6 @@ let ProjectSchema = new mongoose.Schema({
34
34
  accountId: {type: String, required: true, validate: {isAsync: false, validator: helpers.validateUUIDv4, msg: 'default error message'}},
35
35
  webhooks: [WebhookSchema],
36
36
  configurationParameters: {
37
- paymentGatewayPrivateKey: {type: String, required: false},
38
- creationTime: {type: Date, required: true, default: Date.now()},
39
- lastUpdateTime: {type: Date, default: Date.now()},
40
37
  iosConfig: iosConfig, // when we want to enable this {type: iosConfig, required: true}
41
38
  androidConfig: androidConfig, // when we want to enable this {type: androidConfig, required: true}
42
39
  }, // http://collab.bluedot.io/display/PD/Remote+configuration => https://bluedotinnovation.atlassian.net/wiki/spaces/ENG/pages/223150126/Remote+Config+details
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
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",