@bluedot-innovation/models 9.0.3 → 9.1.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
|
@@ -1010,6 +1010,18 @@ describe('Project', () => {
|
|
|
1010
1010
|
})
|
|
1011
1011
|
})
|
|
1012
1012
|
})
|
|
1013
|
+
|
|
1014
|
+
describe("UberEats integration validation", () => {
|
|
1015
|
+
it('should throw an error when signingKey is missing', (done) => {
|
|
1016
|
+
delete project.integrations.uberEats.signingKey
|
|
1017
|
+
let Project = new ProjectModel(project)
|
|
1018
|
+
Project.validate((err, res) => {
|
|
1019
|
+
assert.exists(err)
|
|
1020
|
+
assert.match(err.message, /`signingKey` is required/)
|
|
1021
|
+
done()
|
|
1022
|
+
})
|
|
1023
|
+
})
|
|
1024
|
+
})
|
|
1013
1025
|
})
|
|
1014
1026
|
|
|
1015
1027
|
describe('should throw an error when any of the values of the array contains a falsy value', () => {
|
package/package.json
CHANGED
package/schemas/Integration.js
CHANGED
|
@@ -9,6 +9,7 @@ const incentivioIntegrationSchema = require('./IncentivioIntegration')
|
|
|
9
9
|
const mparticleIntegrationSchema = require('./MparticleIntegration')
|
|
10
10
|
const klaviyoIntegrationSchema = require('./KlaviyoIntegration')
|
|
11
11
|
const doordashIntegrationSchema = require('./DoordashIntegration')
|
|
12
|
+
const uberEatsIntegrationSchema = require('./UberEatsIntegration')
|
|
12
13
|
|
|
13
14
|
function mParticleValidator(value) {
|
|
14
15
|
const { androidApiKey, iosApiKey, webApiKey } = value;
|
|
@@ -25,7 +26,8 @@ const IntegrationSchema = new mongoose.Schema({
|
|
|
25
26
|
attentive: { type: projectAttentiveIntegrationSchema },
|
|
26
27
|
incentivio: { type: incentivioIntegrationSchema },
|
|
27
28
|
klaviyo: { type: klaviyoIntegrationSchema },
|
|
28
|
-
doordash: { type: doordashIntegrationSchema }
|
|
29
|
+
doordash: { type: doordashIntegrationSchema },
|
|
30
|
+
uberEats: { type: uberEatsIntegrationSchema }
|
|
29
31
|
},{ _id : false });
|
|
30
32
|
|
|
31
33
|
module.exports = IntegrationSchema
|