@bluedot-innovation/models 5.1.43 → 5.1.44
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 +3 -0
- package/Models.js +4 -0
- package/models/Application.js +48 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Models.js
CHANGED
|
@@ -32,6 +32,9 @@ Models.TestDevice = require('./models/TestDevice').Model
|
|
|
32
32
|
Models.TestDeviceCluster = require('./models/TestDeviceCluster').Model
|
|
33
33
|
Models.TestInstance = require('./models/TestInstance').Model
|
|
34
34
|
Models.TestScenario = require('./models/TestScenario').Model
|
|
35
|
+
// Added V1 Application model to get Remote Config details for Test Management Portal.
|
|
36
|
+
// This model can be removed once we start using V2 models.
|
|
37
|
+
Models.Application = require('./models/Application').Model
|
|
35
38
|
|
|
36
39
|
// Blue Connect
|
|
37
40
|
Models.AdminPortalUser = require('./models/AdminPortalUser').Model
|
|
@@ -52,6 +55,7 @@ let Schemas = {}
|
|
|
52
55
|
Schemas.Account = require('./models/Account').Schema
|
|
53
56
|
Schemas.Beacon = require('./models/Beacon').Schema
|
|
54
57
|
Schemas.MessageAction = require('./models/MessageAction').Schema
|
|
58
|
+
Schemas.Application = require('./models/Application').Schema
|
|
55
59
|
Schemas.Project = require('./models/Project').Schema
|
|
56
60
|
Schemas.UrlAction = require('./models/UrlAction').Schema
|
|
57
61
|
Schemas.User = require('./models/User').Schema
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a V1 Application model, used to get Remote Config details used for Test Management Portal.
|
|
3
|
+
* This model can be removed once TMP only uses V2 models.
|
|
4
|
+
* */
|
|
5
|
+
|
|
6
|
+
var mongoose = require('mongoose')
|
|
7
|
+
var Enums = require('@bluedot-innovation/enums')
|
|
8
|
+
Schema = mongoose.Schema
|
|
9
|
+
|
|
10
|
+
var ApplicationSchema = new mongoose.Schema({
|
|
11
|
+
_id : {type: String},
|
|
12
|
+
_class : {type: String, default:"au.com.bluedot.application.model.client.Application"},
|
|
13
|
+
state : {type: String, default : Enums.StateEnum.active, select: false},
|
|
14
|
+
nextRuleUpdateInterval: {type: Number, select: false},
|
|
15
|
+
nextRuleUpdateIntervalFormatted: {type:String, required: true},
|
|
16
|
+
lastUpdateTime: {type: Date, select: false},
|
|
17
|
+
creationTime: {type: Date, select: false},
|
|
18
|
+
"administrator" : {type: String, select: false},
|
|
19
|
+
enableDataAnonymisation: {type: Boolean, select: false},
|
|
20
|
+
apiKey: String,
|
|
21
|
+
dataSource: {type:String, select: false, default : 'openApi'},
|
|
22
|
+
name: {type: String},
|
|
23
|
+
packageName: {type: String},
|
|
24
|
+
customerId : String,
|
|
25
|
+
firebaseApiKey: String,
|
|
26
|
+
lastPushSync: Date,
|
|
27
|
+
webhook : {
|
|
28
|
+
url: String,
|
|
29
|
+
enabled: Boolean,
|
|
30
|
+
params: {}
|
|
31
|
+
},
|
|
32
|
+
configurationParameters:{type: Schema.Types.Mixed, default: null}
|
|
33
|
+
},
|
|
34
|
+
{ collection : 'application' })
|
|
35
|
+
|
|
36
|
+
// optional mongoose
|
|
37
|
+
let model = (mongooseInstance) => {
|
|
38
|
+
let Application
|
|
39
|
+
if (mongooseInstance) {
|
|
40
|
+
Application = mongooseInstance.model('Application', ApplicationSchema)
|
|
41
|
+
} else {
|
|
42
|
+
Application = mongoose.model('Application', ApplicationSchema)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return Application
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
module.exports = { Model: model, Schema: ApplicationSchema }
|
package/package.json
CHANGED