@bluedot-innovation/models 3.1.1 → 4.0.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/Models.js +10 -55
- package/models/AdminPortalUser.js +11 -10
- package/models/AdminUser.js +10 -0
- package/models/Application.js +38 -0
- package/models/ApplicationNotificationAction.js +30 -0
- package/models/ApplicationUsage.js +11 -0
- package/models/Beacon.js +32 -84
- package/models/BeaconFilter.js +23 -0
- package/models/BearingFilter.js +19 -0
- package/models/BoundingBox.js +17 -0
- package/models/Circle.js +21 -0
- package/models/ConfigurationParameters.js +20 -0
- package/models/Contract.js +38 -37
- package/models/Customer.js +38 -0
- package/models/CustomerLogin.js +10 -9
- package/models/DBEvent.js +14 -13
- package/models/DailyStats.js +7 -7
- package/models/DateRangeFilter.js +20 -0
- package/models/DeviceRulesRequest.js +28 -27
- package/models/Fence.js +21 -0
- package/models/FormattedBeacon.js +16 -0
- package/models/FormattedCircle.js +12 -0
- package/models/FormattedConditions.js +11 -0
- package/models/FormattedDateRange.js +11 -0
- package/models/FormattedPercentageCrossed.js +12 -0
- package/models/FormattedPoint.js +10 -0
- package/models/FormattedPolygon.js +11 -0
- package/models/FormattedPolyline.js +11 -0
- package/models/FormattedRectangle.js +12 -0
- package/models/FormattedTimeActive.js +17 -0
- package/models/FormattedZone.js +28 -0
- package/models/GeoFence.js +23 -0
- package/models/Geofeature.js +26 -0
- package/models/MessageAction.js +26 -28
- package/models/MonthlyStats.js +19 -35
- package/models/NotificationLogEntry.js +8 -7
- package/models/POILocation.js +7 -6
- package/models/POILookup.js +9 -8
- package/models/POIResult.js +8 -7
- package/models/PartnerCustomer.js +13 -12
- package/models/PartnerPasswordReset.js +9 -8
- package/models/PartnerUser.js +11 -10
- package/models/Partners.js +12 -11
- package/models/PercentageCrossedFilter.js +19 -0
- package/models/Point.js +20 -0
- package/models/Polygon.js +18 -0
- package/models/Polyline.js +18 -0
- package/models/PropertyMapping.js +17 -0
- package/models/Reference.js +19 -0
- package/models/RuleRequestAggregation.js +17 -33
- package/models/SequenceFilter.js +18 -0
- package/models/SimpleCheckInZone.js +29 -0
- package/models/SingleUseToken.js +8 -7
- package/models/SoundAction.js +28 -0
- package/models/SpeedFilter.js +19 -0
- package/models/TestDevice.js +12 -11
- package/models/TestDeviceCluster.js +10 -9
- package/models/TestInstance.js +10 -9
- package/models/TestScenario.js +10 -9
- package/models/TimeOfDayRange.js +16 -16
- package/models/TimeOfDayRangeFilter.js +19 -0
- package/models/URLAction.js +31 -0
- package/models/VibrationAction.js +28 -0
- package/models/ZoneUIState.js +18 -18
- package/models/property.js +25 -0
- package/package-lock.json.bak +170 -0
- package/package.json +6 -30
- package/.eslintrc.js +0 -42
- package/.gitlab-ci.yml +0 -43
- package/CHANGELOG.md +0 -152
- package/README.MD +0 -36
- package/__tests__/account/account.data.json +0 -12
- package/__tests__/account/account.rules.js +0 -8
- package/__tests__/account/account.spec.js +0 -83
- package/__tests__/action/message/messageAction.data.json +0 -5
- package/__tests__/action/message/messageAction.rules.json +0 -3
- package/__tests__/action/message/messageAction.spec.js +0 -61
- package/__tests__/action/url/urlAction.data.json +0 -4
- package/__tests__/action/url/urlAction.rules.json +0 -3
- package/__tests__/action/url/urlAction.spec.js +0 -74
- package/__tests__/beacon/beacon.data.json +0 -15
- package/__tests__/beacon/beacon.rules.json +0 -13
- package/__tests__/beacon/beacon.spec.js +0 -104
- package/__tests__/condition/beacon/beaconFilter.data.json +0 -1
- package/__tests__/condition/beacon/beaconFilter.rules.json +0 -3
- package/__tests__/condition/beacon/beaconFilter.spec.js +0 -1
- package/__tests__/condition/dayRange/dayRange.data.json +0 -5
- package/__tests__/condition/dayRange/dayRange.rules.json +0 -3
- package/__tests__/condition/dayRange/dayRange.spec.js +0 -74
- package/__tests__/condition/percentageCrossed/travelPath.data.json +0 -5
- package/__tests__/condition/percentageCrossed/travelPath.rules.json +0 -3
- package/__tests__/condition/percentageCrossed/travelPath.spec.js +0 -62
- package/__tests__/condition/speed/speed.data.json +0 -5
- package/__tests__/condition/speed/speed.rules.json +0 -3
- package/__tests__/condition/speed/speed.spec.js +0 -73
- package/__tests__/condition/timeActive/timeActive.data.json +0 -5
- package/__tests__/condition/timeActive/timeActive.rules.json +0 -7
- package/__tests__/condition/timeActive/timeActive.spec.js +0 -94
- package/__tests__/condition/travelDirection/travelDirection.data.json +0 -5
- package/__tests__/condition/travelDirection/travelDirection.rules.json +0 -3
- package/__tests__/condition/travelDirection/travelDirection.spec.js +0 -132
- package/__tests__/dailyStats/checkDailyStats.js +0 -31
- package/__tests__/geofeature/boundingBox/boundingBox.data.json +0 -12
- package/__tests__/geofeature/boundingBox/boundingBox.rules.json +0 -3
- package/__tests__/geofeature/boundingBox/boundingBox.spec.js +0 -78
- package/__tests__/geofeature/circle/circle.data.json +0 -9
- package/__tests__/geofeature/circle/circle.rules.json +0 -3
- package/__tests__/geofeature/circle/circle.spec.js +0 -71
- package/__tests__/geofeature/geoline/geoline.data.json +0 -46
- package/__tests__/geofeature/geoline/geoline.rules.json +0 -3
- package/__tests__/geofeature/geoline/geoline.spec.js +0 -70
- package/__tests__/geofeature/polygon/polygon.data.json +0 -46
- package/__tests__/geofeature/polygon/polygon.rules.json +0 -3
- package/__tests__/geofeature/polygon/polygon.spec.js +0 -127
- package/__tests__/geofeature/zoneBeacon/zoneBeacon.data.json +0 -16
- package/__tests__/geofeature/zoneBeacon/zoneBeacon.rules.json +0 -13
- package/__tests__/geofeature/zoneBeacon/zoneBeacon.spec.js +0 -62
- package/__tests__/monthlyStats/monthlyStats.data.json +0 -29
- package/__tests__/monthlyStats/monthlyStats.spec.js +0 -66
- package/__tests__/project/project.data.json +0 -18
- package/__tests__/project/project.rules.json +0 -9
- package/__tests__/project/project.spec.js +0 -81
- package/__tests__/ruleRequestAggregation/ruleRequestAggregation.data.json +0 -8
- package/__tests__/ruleRequestAggregation/ruleRequestAggregation.spec.js +0 -69
- package/__tests__/setup.js +0 -7
- package/__tests__/user/user.data.js +0 -19
- package/__tests__/user/user.rules.js +0 -8
- package/__tests__/user/user.spec.js +0 -130
- package/__tests__/utils/utils.spec.js +0 -24
- package/__tests__/zone/zone.action.spec.js +0 -50
- package/__tests__/zone/zone.condition.spec.js +0 -76
- package/__tests__/zone/zone.data.json +0 -157
- package/__tests__/zone/zone.geofeatures.spec.js +0 -75
- package/__tests__/zone/zone.spec.js +0 -134
- package/constants/errorMessages.js +0 -2
- package/helpers.js +0 -102
- package/models/Account.js +0 -50
- package/models/Project.js +0 -55
- package/models/UrlAction.js +0 -46
- package/models/User.js +0 -61
- package/models/Zone.js +0 -123
- package/models/conditions/DayRange.js +0 -52
- package/models/conditions/Speed.js +0 -42
- package/models/conditions/TimeActive.js +0 -50
- package/models/conditions/TravelDirection.js +0 -67
- package/models/conditions/TravelPath.js +0 -36
- package/models/geofeatures/BoundingBox.js +0 -44
- package/models/geofeatures/Circle.js +0 -39
- package/models/geofeatures/Geoline.js +0 -34
- package/models/geofeatures/Polygon.js +0 -45
- package/models/geofeatures/ZoneBeacon.js +0 -28
- package/schemas/MultiLineStringGeometry.js +0 -14
- package/schemas/Point.js +0 -13
- package/schemas/PointGeometry.js +0 -14
- package/schemas/PolygonGeometry.js +0 -14
- package/schemas/ProjectPermission.js +0 -21
- package/schemas/Webhook.js +0 -22
- package/utils/index.js +0 -39
- package/validators/checkDistanceBetweenVertices.js +0 -21
- package/yarn.lock +0 -2796
package/models/PartnerUser.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright : Bluedot Innovations.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var mongoose = require('mongoose');
|
|
5
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
var PartnerUser = mongoose.model('PartnerUser', new mongoose.Schema(
|
|
8
8
|
{
|
|
9
9
|
emailAddress: String,
|
|
10
10
|
password: String,
|
|
@@ -16,14 +16,15 @@ let PartnerUser = mongoose.model('PartnerUser', new mongoose.Schema(
|
|
|
16
16
|
approvalToken: String,
|
|
17
17
|
phoneNumber: String,
|
|
18
18
|
partnerCompany: String,
|
|
19
|
-
state: {type:
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
state: {type:String, default: StateEnum.active},
|
|
20
|
+
"creationTime" : {type: Date, default: Date.now},
|
|
21
|
+
"dataSource" : {type:String, select: false, default : 'PartnerPortal'},
|
|
22
22
|
partnerId: String
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
collection: 'partnerUser'
|
|
26
|
-
}
|
|
27
|
-
)
|
|
25
|
+
collection : 'partnerUser'
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
);
|
|
28
29
|
|
|
29
|
-
module.exports = PartnerUser
|
|
30
|
+
module.exports = PartnerUser;
|
package/models/Partners.js
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
* Created by Ram on 8/12/2016.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
var mongoose = require('mongoose');
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
7
|
+
var Partners = mongoose.model('Partners', new mongoose.Schema(
|
|
8
|
+
{
|
|
9
|
+
name: String,
|
|
10
|
+
notificationEmail: String
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
collection : 'partners'
|
|
14
|
+
}
|
|
15
|
+
)
|
|
16
|
+
);
|
|
16
17
|
|
|
17
|
-
module.exports = Partners
|
|
18
|
+
module.exports = Partners;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 30/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
|
|
8
|
+
var PercentageCrossedFilter = mongoose.model('PercentageCrossedFilter', mongoose.Schema({
|
|
9
|
+
guid: {type: String},
|
|
10
|
+
_class : {type: String, default:"au.com.bluedot.application.spring.filter.action.PercentageCrossedFilter"},
|
|
11
|
+
percentage : Number,
|
|
12
|
+
timeOutSeconds : Number,
|
|
13
|
+
type : {type: String, default:"percentageCrossedFilter"},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
_id: false
|
|
17
|
+
}
|
|
18
|
+
));
|
|
19
|
+
module.exports = PercentageCrossedFilter;
|
package/models/Point.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 30/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var mongoose = require('mongoose');
|
|
8
|
+
Schema = mongoose.Schema;
|
|
9
|
+
|
|
10
|
+
var Point = mongoose.model('Point', mongoose.Schema(
|
|
11
|
+
{
|
|
12
|
+
"type" : {type:String, default : "Point"},
|
|
13
|
+
"coordinates" : Array
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
_id: false
|
|
17
|
+
}
|
|
18
|
+
));
|
|
19
|
+
|
|
20
|
+
module.exports = Point;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 30/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
|
|
8
|
+
Schema = mongoose.Schema;
|
|
9
|
+
var Polygon = mongoose.model('Polygon', mongoose.Schema(
|
|
10
|
+
{
|
|
11
|
+
type: {type: String, default: "MultiLineString"},
|
|
12
|
+
"coordinates" : Array
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
_id: false
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
module.exports = Polygon;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 30/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
|
|
8
|
+
Schema = mongoose.Schema;
|
|
9
|
+
var Polyline = mongoose.model('Polyline', mongoose.Schema(
|
|
10
|
+
{
|
|
11
|
+
type: {type: String, default: "LineString"},
|
|
12
|
+
"coordinates" : Array
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
_id: false
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
module.exports = Polyline;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 10/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var PropertyMapping = new mongoose.Schema({
|
|
8
|
+
_id : String,
|
|
9
|
+
first_property : String,
|
|
10
|
+
second_property : String,
|
|
11
|
+
frequency : Number,
|
|
12
|
+
dateUpdated : Date
|
|
13
|
+
}, { collection : 'PropertyMapping' });
|
|
14
|
+
|
|
15
|
+
var PropertyMapping = mongoose.model('PropertyMapping', PropertyMapping);
|
|
16
|
+
|
|
17
|
+
module.exports = PropertyMapping;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 30/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
Schema = mongoose.Schema;
|
|
8
|
+
|
|
9
|
+
var Reference = mongoose.model('Reference', mongoose.Schema(
|
|
10
|
+
{
|
|
11
|
+
r: String
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
_id: false
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
|
|
18
|
+
module.exports = Reference;
|
|
19
|
+
|
|
@@ -3,38 +3,22 @@
|
|
|
3
3
|
* Copyright : Bluedot Innovations.
|
|
4
4
|
* Owner :
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
const uuidv4 = require('uuid/v4')
|
|
8
|
-
const helpers = require('../helpers')
|
|
6
|
+
var mongoose = require('mongoose');
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
var RuleRequestAggregation = mongoose.model('RuleRequestAggregation', new mongoose.Schema(
|
|
9
|
+
{
|
|
10
|
+
_id : String,
|
|
11
|
+
creationDate : {type: Date, default: Date.now },
|
|
12
|
+
applicationId : String,
|
|
13
|
+
customerId : String,
|
|
14
|
+
iosCount : Number,
|
|
15
|
+
androidCount : Number,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
collection: 'ruleRequestAggregation',
|
|
19
|
+
versionKey: false
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
schema,
|
|
21
|
-
{
|
|
22
|
-
collection: 'ruleRequestAggregation',
|
|
23
|
-
versionKey: false
|
|
24
|
-
}
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
// optional mongoose
|
|
28
|
-
let model = (mongooseInstance) => {
|
|
29
|
-
let RuleRequestAggregation
|
|
30
|
-
if (mongooseInstance) {
|
|
31
|
-
RuleRequestAggregation = mongooseInstance.model('RuleRequestAggregation', RuleRequestAggregationSchema)
|
|
32
|
-
} else {
|
|
33
|
-
RuleRequestAggregation = mongoose.model('RuleRequestAggregation', RuleRequestAggregationSchema)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return RuleRequestAggregation
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Exports Mongoose Model, Mongoose Schema, JSON schema (required locally for discriminators)
|
|
40
|
-
module.exports = { Model: model, Schema: RuleRequestAggregationSchema }
|
|
24
|
+
module.exports = RuleRequestAggregation;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Andrew on 24/01/2017.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
*/
|
|
5
|
+
var mongoose = require('mongoose');
|
|
6
|
+
|
|
7
|
+
var SequenceFilter = mongoose.model('SequenceFilter', mongoose.Schema({
|
|
8
|
+
guid: {type: String},
|
|
9
|
+
_class : {type: String, default:"au.com.bluedot.application.spring.filter.action.SequenceFilter"},
|
|
10
|
+
percentage : Number,
|
|
11
|
+
timeOutSeconds : Number,
|
|
12
|
+
type : {type: String, default:"sequenceFilter"},
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
_id: false
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
module.exports = SequenceFilter;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 10/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose'),
|
|
7
|
+
Schema = mongoose.Schema;
|
|
8
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
9
|
+
|
|
10
|
+
var SimpleCheckInZoneSchema = new Schema({
|
|
11
|
+
_id: {type:String},
|
|
12
|
+
name: String,
|
|
13
|
+
description : {type: String, default: ''},
|
|
14
|
+
minimumRetriggerTime : {type: Number},
|
|
15
|
+
checkout: {type: Boolean, default : false},
|
|
16
|
+
dataSource: {type: String, select: false, default : 'openApi'},
|
|
17
|
+
conditionalActions: [],
|
|
18
|
+
spatialFilters: [],
|
|
19
|
+
creationTime : {type: Date, default: Date.now},
|
|
20
|
+
lastUpdateTime : {type: Date, default: Date.now},
|
|
21
|
+
activeTimeRange: Schema.Types.Mixed,
|
|
22
|
+
applicationId: String,
|
|
23
|
+
state: {type: String, default : StateEnum.active, select: false}
|
|
24
|
+
},
|
|
25
|
+
{ collection : 'zone' });
|
|
26
|
+
|
|
27
|
+
var SimpleCheckInZone = mongoose.model('SimpleCheckInZone', SimpleCheckInZoneSchema);
|
|
28
|
+
|
|
29
|
+
module.exports = SimpleCheckInZone;
|
package/models/SingleUseToken.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright : Bluedot Innovations.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
var mongoose = require('mongoose');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
var SingleUseToken = mongoose.model('SingleUseToken', new mongoose.Schema(
|
|
7
7
|
{
|
|
8
8
|
tokenString: String,
|
|
9
9
|
customerId: String,
|
|
10
10
|
customerLoginId: String,
|
|
11
|
-
integration: {type:
|
|
11
|
+
integration: {type:String, default : 'admin'},
|
|
12
12
|
expiration: Date
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
collection: 'singleUseToken'
|
|
16
|
-
}
|
|
17
|
-
)
|
|
15
|
+
collection : 'singleUseToken'
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
18
19
|
|
|
19
|
-
module.exports = SingleUseToken
|
|
20
|
+
module.exports = SingleUseToken;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 10/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
8
|
+
|
|
9
|
+
var SoundActionSchema = new mongoose.Schema({
|
|
10
|
+
guid : {type: String},
|
|
11
|
+
creationTime : {type: Date, default: Date.now},
|
|
12
|
+
dataSource: {type:String, select: false, default : 'openApi'},
|
|
13
|
+
actionName : String,
|
|
14
|
+
type: {type: String, default: 'sound'},
|
|
15
|
+
_class: {type: String, default: 'au.com.bluedot.application.spring.action.SoundAction'},
|
|
16
|
+
description : String,
|
|
17
|
+
lastUpdateTime : Date,
|
|
18
|
+
state: {type: String, default : StateEnum.active, select: false},
|
|
19
|
+
filters: []
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
_id: false
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
var SoundAction = mongoose.model('SoundAction', SoundActionSchema);
|
|
27
|
+
|
|
28
|
+
module.exports = SoundAction;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Andrew on 30/01/2017.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
|
|
8
|
+
var SpeedFilter = mongoose.model('SpeedFilter', mongoose.Schema({
|
|
9
|
+
guid: {type: String},
|
|
10
|
+
_class : {type: String, default:"au.com.bluedot.application.spring.filter.action.SpeedFilter"},
|
|
11
|
+
minimumSpeed : Number,
|
|
12
|
+
maximumSpeed : Number,
|
|
13
|
+
type : {type: String, default:"speedFilter"}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
_id: false
|
|
17
|
+
}
|
|
18
|
+
));
|
|
19
|
+
module.exports = SpeedFilter;
|
package/models/TestDevice.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright : Bluedot Innovations.
|
|
4
4
|
* Owner :
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
var TestDevice = mongoose.model('TestDevice', new mongoose.Schema(
|
|
10
10
|
{
|
|
11
11
|
name: String,
|
|
12
12
|
identifier: String,
|
|
@@ -15,20 +15,21 @@ let TestDevice = mongoose.model('TestDevice', new mongoose.Schema(
|
|
|
15
15
|
hostToken: String,
|
|
16
16
|
batteryToken: String,
|
|
17
17
|
model: String,
|
|
18
|
-
trackingDevice: {type: Boolean, default: false},
|
|
19
|
-
creationTime: {type: Date, default: Date.now},
|
|
20
|
-
lastUpdateTime: {type: Date, default: Date.now},
|
|
18
|
+
trackingDevice: {type: Boolean, default : false},
|
|
19
|
+
creationTime : {type: Date, default: Date.now},
|
|
20
|
+
lastUpdateTime : {type: Date, default: Date.now},
|
|
21
21
|
serialNumber: String,
|
|
22
22
|
mobileNumber: String,
|
|
23
23
|
deviceType: String,
|
|
24
|
-
state: {type:
|
|
24
|
+
state: {type:String, default: StateEnum.active},
|
|
25
25
|
comments: String,
|
|
26
26
|
imei: String,
|
|
27
27
|
udid: String
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
collection: 'testDevice'
|
|
31
|
-
}
|
|
32
|
-
)
|
|
30
|
+
collection : 'testDevice'
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
);
|
|
33
34
|
|
|
34
|
-
module.exports = TestDevice
|
|
35
|
+
module.exports = TestDevice;
|
|
@@ -3,21 +3,22 @@
|
|
|
3
3
|
* Copyright : Bluedot Innovations.
|
|
4
4
|
* Owner :
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
var TestDeviceCluster = mongoose.model('TestDeviceCluster', new mongoose.Schema(
|
|
10
10
|
{
|
|
11
11
|
name: String,
|
|
12
12
|
devices: [],
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
"creationTime" : {type: Date, default: Date.now},
|
|
14
|
+
"lastUpdateTime" : {type: Date, default: Date.now},
|
|
15
15
|
comments: String,
|
|
16
16
|
state: {type: String, default: StateEnum.active}
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
collection: 'testDeviceCluster'
|
|
20
|
-
}
|
|
21
|
-
)
|
|
19
|
+
collection : 'testDeviceCluster'
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
22
23
|
|
|
23
|
-
module.exports = TestDeviceCluster
|
|
24
|
+
module.exports = TestDeviceCluster;
|
package/models/TestInstance.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright : Bluedot Innovations.
|
|
4
4
|
* Owner :
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
var TestInstance = mongoose.model('TestInstance', new mongoose.Schema(
|
|
10
10
|
{
|
|
11
11
|
name: String,
|
|
12
12
|
scenarioId: String,
|
|
@@ -17,16 +17,17 @@ let TestInstance = mongoose.model('TestInstance', new mongoose.Schema(
|
|
|
17
17
|
duration: Number,
|
|
18
18
|
endPoint: String,
|
|
19
19
|
trackedLocations: {type: Array, default: []},
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
"creationTime" : {type: Date, default: Date.now},
|
|
21
|
+
"lastUpdateTime" : {type: Date, default: Date.now},
|
|
22
22
|
state: {type: String, default: StateEnum.active},
|
|
23
23
|
comments: String,
|
|
24
24
|
isProduction: Boolean,
|
|
25
25
|
sdkVersion: String
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
collection: 'testInstance'
|
|
29
|
-
}
|
|
30
|
-
)
|
|
28
|
+
collection : 'testInstance'
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
);
|
|
31
32
|
|
|
32
|
-
module.exports = TestInstance
|
|
33
|
+
module.exports = TestInstance;
|
package/models/TestScenario.js
CHANGED
|
@@ -3,26 +3,27 @@
|
|
|
3
3
|
* Copyright : Bluedot Innovations.
|
|
4
4
|
* Owner :
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
var TestScenario = mongoose.model('TestScenario', new mongoose.Schema(
|
|
10
10
|
{
|
|
11
11
|
name: String,
|
|
12
12
|
apiKey: String,
|
|
13
13
|
customerApiKey: String,
|
|
14
14
|
email: String,
|
|
15
15
|
package: String,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
"creationTime" : {type: Date, default: Date.now},
|
|
17
|
+
"lastUpdateTime" : {type: Date, default: Date.now},
|
|
18
18
|
state: {type: String, default: StateEnum.active},
|
|
19
19
|
numberZones: String,
|
|
20
20
|
comments: String,
|
|
21
21
|
environment: String
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
collection: 'testScenario'
|
|
25
|
-
}
|
|
26
|
-
)
|
|
24
|
+
collection : 'testScenario'
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
);
|
|
27
28
|
|
|
28
|
-
module.exports = TestScenario
|
|
29
|
+
module.exports = TestScenario;
|
package/models/TimeOfDayRange.js
CHANGED
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
* Copyright : Bluedot Innovations.
|
|
4
4
|
* Owner :
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var SchemaTypes = mongoose.Schema.Types;
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
))
|
|
21
|
-
|
|
22
|
-
module.exports = TimeOfDayRange
|
|
9
|
+
var TimeOfDayRange = mongoose.model('TimeOfDayRange', mongoose.Schema({
|
|
10
|
+
start: {
|
|
11
|
+
"_class": { type: String, default: "au.com.bluedot.schedule.model.value.TimeOfDay"},
|
|
12
|
+
hour: Number,
|
|
13
|
+
seconds: Number,
|
|
14
|
+
minute: Number
|
|
15
|
+
},
|
|
16
|
+
interval: Number
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
_id: false
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
module.exports = TimeOfDayRange;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 30/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var SchemaTypes = mongoose.Schema.Types;
|
|
8
|
+
|
|
9
|
+
var TimeOfDayRangeFilter = mongoose.model('TimeOfDayRangeFilter', mongoose.Schema({
|
|
10
|
+
guid: {type: String},
|
|
11
|
+
_class : {type: String, default:"au.com.bluedot.application.spring.filter.action.TimeOfDayRangeFilter"},
|
|
12
|
+
type : {type:String, default:"timeOfDayRangeFilter"},
|
|
13
|
+
timeOfDayRange : Schema.Types.Mixed,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
_id: false
|
|
17
|
+
}
|
|
18
|
+
));
|
|
19
|
+
module.exports = TimeOfDayRangeFilter;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 10/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
8
|
+
|
|
9
|
+
var URLActionSchema = new mongoose.Schema({
|
|
10
|
+
guid : {type: String},
|
|
11
|
+
creationTime : {type: Date, default: Date.now},
|
|
12
|
+
dataSource: {type:String, select: false, default : 'openApi'},
|
|
13
|
+
actionName : String,
|
|
14
|
+
type: {type: String, default: 'url'},
|
|
15
|
+
_class: {type: String, default: 'au.com.bluedot.application.spring.action.URLAction'},
|
|
16
|
+
url: String,
|
|
17
|
+
description : String,
|
|
18
|
+
lastUpdateTime : Date,
|
|
19
|
+
filters: [],
|
|
20
|
+
state: {type: String, default : StateEnum.active, select: false}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
_id: false
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
var URLAction = mongoose.model('URLAction', URLActionSchema);
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
module.exports = URLAction;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Arun on 10/09/2014.
|
|
3
|
+
* Copyright : Bluedot Innovations.
|
|
4
|
+
* Owner :
|
|
5
|
+
*/
|
|
6
|
+
var mongoose = require('mongoose');
|
|
7
|
+
var StateEnum = require('@bluedot-innovation/enums').StateEnum;
|
|
8
|
+
|
|
9
|
+
var VibrationActionSchema = new mongoose.Schema({
|
|
10
|
+
guid : {type: String},
|
|
11
|
+
creationTime : {type: Date, default: Date.now},
|
|
12
|
+
dataSource: {type:String, select: false, default : 'openApi'},
|
|
13
|
+
actionName : String,
|
|
14
|
+
type: {type: String, default: 'vibration'},
|
|
15
|
+
_class: {type: String, default: 'au.com.bluedot.application.spring.action.VibrationAction'},
|
|
16
|
+
description : String,
|
|
17
|
+
lastUpdateTime : Date,
|
|
18
|
+
filters: [],
|
|
19
|
+
state: {type: String, default : StateEnum.active, select: false}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
_id: false
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
var VibrationAction = mongoose.model('VibrationAction', VibrationActionSchema);
|
|
27
|
+
|
|
28
|
+
module.exports = VibrationAction;
|