@bluedot-innovation/models 4.0.0 → 5.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/.eslintrc.js +42 -0
- package/.gitlab-ci.yml +43 -0
- package/CHANGELOG.md +156 -0
- package/Models.js +55 -10
- package/README.MD +36 -0
- package/__tests__/account/account.data.json +12 -0
- package/__tests__/account/account.rules.js +8 -0
- package/__tests__/account/account.spec.js +83 -0
- package/__tests__/action/message/messageAction.data.json +5 -0
- package/__tests__/action/message/messageAction.rules.json +3 -0
- package/__tests__/action/message/messageAction.spec.js +61 -0
- package/__tests__/action/url/urlAction.data.json +4 -0
- package/__tests__/action/url/urlAction.rules.json +3 -0
- package/__tests__/action/url/urlAction.spec.js +74 -0
- package/__tests__/beacon/beacon.data.json +15 -0
- package/__tests__/beacon/beacon.rules.json +13 -0
- package/__tests__/beacon/beacon.spec.js +104 -0
- package/__tests__/condition/beacon/beaconFilter.data.json +1 -0
- package/__tests__/condition/beacon/beaconFilter.rules.json +3 -0
- package/__tests__/condition/beacon/beaconFilter.spec.js +1 -0
- package/__tests__/condition/dayRange/dayRange.data.json +5 -0
- package/__tests__/condition/dayRange/dayRange.rules.json +3 -0
- package/__tests__/condition/dayRange/dayRange.spec.js +74 -0
- package/__tests__/condition/percentageCrossed/travelPath.data.json +5 -0
- package/__tests__/condition/percentageCrossed/travelPath.rules.json +3 -0
- package/__tests__/condition/percentageCrossed/travelPath.spec.js +62 -0
- package/__tests__/condition/speed/speed.data.json +5 -0
- package/__tests__/condition/speed/speed.rules.json +3 -0
- package/__tests__/condition/speed/speed.spec.js +73 -0
- package/__tests__/condition/timeActive/timeActive.data.json +5 -0
- package/__tests__/condition/timeActive/timeActive.rules.json +7 -0
- package/__tests__/condition/timeActive/timeActive.spec.js +94 -0
- package/__tests__/condition/travelDirection/travelDirection.data.json +5 -0
- package/__tests__/condition/travelDirection/travelDirection.rules.json +3 -0
- package/__tests__/condition/travelDirection/travelDirection.spec.js +132 -0
- package/__tests__/dailyStats/checkDailyStats.js +31 -0
- package/__tests__/geofeature/boundingBox/boundingBox.data.json +12 -0
- package/__tests__/geofeature/boundingBox/boundingBox.rules.json +3 -0
- package/__tests__/geofeature/boundingBox/boundingBox.spec.js +78 -0
- package/__tests__/geofeature/circle/circle.data.json +9 -0
- package/__tests__/geofeature/circle/circle.rules.json +3 -0
- package/__tests__/geofeature/circle/circle.spec.js +71 -0
- package/__tests__/geofeature/geoline/geoline.data.json +46 -0
- package/__tests__/geofeature/geoline/geoline.rules.json +3 -0
- package/__tests__/geofeature/geoline/geoline.spec.js +70 -0
- package/__tests__/geofeature/polygon/polygon.data.json +46 -0
- package/__tests__/geofeature/polygon/polygon.rules.json +3 -0
- package/__tests__/geofeature/polygon/polygon.spec.js +127 -0
- package/__tests__/geofeature/zoneBeacon/zoneBeacon.data.json +16 -0
- package/__tests__/geofeature/zoneBeacon/zoneBeacon.rules.json +13 -0
- package/__tests__/geofeature/zoneBeacon/zoneBeacon.spec.js +62 -0
- package/__tests__/monthlyStats/monthlyStats.data.json +29 -0
- package/__tests__/monthlyStats/monthlyStats.spec.js +66 -0
- package/__tests__/project/project.data.json +18 -0
- package/__tests__/project/project.rules.json +9 -0
- package/__tests__/project/project.spec.js +92 -0
- package/__tests__/ruleRequestAggregation/ruleRequestAggregation.data.json +8 -0
- package/__tests__/ruleRequestAggregation/ruleRequestAggregation.spec.js +69 -0
- package/__tests__/setup.js +7 -0
- package/__tests__/user/user.data.js +19 -0
- package/__tests__/user/user.rules.js +8 -0
- package/__tests__/user/user.spec.js +130 -0
- package/__tests__/utils/utils.spec.js +24 -0
- package/__tests__/zone/zone.action.spec.js +50 -0
- package/__tests__/zone/zone.condition.spec.js +94 -0
- package/__tests__/zone/zone.data.json +157 -0
- package/__tests__/zone/zone.geofeatures.spec.js +75 -0
- package/__tests__/zone/zone.spec.js +134 -0
- package/constants/errorMessages.js +2 -0
- package/helpers.js +117 -0
- package/models/Account.js +50 -0
- package/models/AdminPortalUser.js +10 -11
- package/models/Beacon.js +84 -32
- package/models/Contract.js +37 -38
- package/models/CustomerLogin.js +9 -10
- package/models/DBEvent.js +13 -14
- package/models/DailyStats.js +7 -7
- package/models/DeviceRulesRequest.js +27 -28
- package/models/MessageAction.js +28 -26
- package/models/MonthlyStats.js +35 -19
- package/models/NotificationLogEntry.js +7 -8
- package/models/POILocation.js +6 -7
- package/models/POILookup.js +8 -9
- package/models/POIResult.js +7 -8
- package/models/PartnerCustomer.js +12 -13
- package/models/PartnerPasswordReset.js +8 -9
- package/models/PartnerUser.js +10 -11
- package/models/Partners.js +11 -12
- package/models/Project.js +55 -0
- package/models/RuleRequestAggregation.js +33 -17
- package/models/SingleUseToken.js +7 -8
- package/models/TestDevice.js +11 -12
- package/models/TestDeviceCluster.js +9 -10
- package/models/TestInstance.js +9 -10
- package/models/TestScenario.js +9 -10
- package/models/TimeOfDayRange.js +16 -16
- package/models/UrlAction.js +46 -0
- package/models/User.js +61 -0
- package/models/Zone.js +126 -0
- package/models/ZoneUIState.js +18 -18
- package/models/conditions/DayRange.js +52 -0
- package/models/conditions/Speed.js +42 -0
- package/models/conditions/TimeActive.js +50 -0
- package/models/conditions/TravelDirection.js +67 -0
- package/models/conditions/TravelPath.js +36 -0
- package/models/geofeatures/BoundingBox.js +44 -0
- package/models/geofeatures/Circle.js +39 -0
- package/models/geofeatures/Geoline.js +34 -0
- package/models/geofeatures/Polygon.js +45 -0
- package/models/geofeatures/ZoneBeacon.js +28 -0
- package/package.json +30 -6
- package/schemas/MultiLineStringGeometry.js +14 -0
- package/schemas/Point.js +13 -0
- package/schemas/PointGeometry.js +14 -0
- package/schemas/PolygonGeometry.js +14 -0
- package/schemas/ProjectPermission.js +21 -0
- package/schemas/Webhook.js +27 -0
- package/utils/index.js +39 -0
- package/validators/checkDistanceBetweenVertices.js +21 -0
- package/yarn.lock +2796 -0
- package/models/AdminUser.js +0 -10
- package/models/Application.js +0 -38
- package/models/ApplicationNotificationAction.js +0 -30
- package/models/ApplicationUsage.js +0 -11
- package/models/BeaconFilter.js +0 -23
- package/models/BearingFilter.js +0 -19
- package/models/BoundingBox.js +0 -17
- package/models/Circle.js +0 -21
- package/models/ConfigurationParameters.js +0 -20
- package/models/Customer.js +0 -38
- package/models/DateRangeFilter.js +0 -20
- package/models/Fence.js +0 -21
- package/models/FormattedBeacon.js +0 -16
- package/models/FormattedCircle.js +0 -12
- package/models/FormattedConditions.js +0 -11
- package/models/FormattedDateRange.js +0 -11
- package/models/FormattedPercentageCrossed.js +0 -12
- package/models/FormattedPoint.js +0 -10
- package/models/FormattedPolygon.js +0 -11
- package/models/FormattedPolyline.js +0 -11
- package/models/FormattedRectangle.js +0 -12
- package/models/FormattedTimeActive.js +0 -17
- package/models/FormattedZone.js +0 -28
- package/models/GeoFence.js +0 -23
- package/models/Geofeature.js +0 -26
- package/models/PercentageCrossedFilter.js +0 -19
- package/models/Point.js +0 -20
- package/models/Polygon.js +0 -18
- package/models/Polyline.js +0 -18
- package/models/PropertyMapping.js +0 -17
- package/models/Reference.js +0 -19
- package/models/SequenceFilter.js +0 -18
- package/models/SimpleCheckInZone.js +0 -29
- package/models/SoundAction.js +0 -28
- package/models/SpeedFilter.js +0 -19
- package/models/TimeOfDayRangeFilter.js +0 -19
- package/models/URLAction.js +0 -31
- package/models/VibrationAction.js +0 -28
- package/models/property.js +0 -25
- package/package-lock.json.bak +0 -170
package/models/AdminUser.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var mongoose = require('mongoose');
|
|
7
|
-
var AdminUser = mongoose.model('AdminUser', new mongoose.Schema({},
|
|
8
|
-
{ collection : 'AdminUser' }
|
|
9
|
-
));
|
|
10
|
-
module.exports = AdminUser;
|
package/models/Application.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
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
|
-
var Application = mongoose.model('Application', ApplicationSchema);
|
|
37
|
-
|
|
38
|
-
module.exports = Application;
|
|
@@ -1,30 +0,0 @@
|
|
|
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 ApplicationNotificationActionSchema = 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: 'applicationNotification'},
|
|
15
|
-
_class: {type: String, default: 'au.com.bluedot.application.spring.action.ApplicationNotificationAction'},
|
|
16
|
-
description : String,
|
|
17
|
-
lastUpdateTime : Date,
|
|
18
|
-
customData : Schema.Types.Mixed,
|
|
19
|
-
state: {type: String, default : StateEnum.active, select: false},
|
|
20
|
-
filters: []
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
_id: false
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
var ApplicationNotificationAction = mongoose.model('ApplicationNotificationAction', ApplicationNotificationActionSchema);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
module.exports = ApplicationNotificationAction;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var mongoose = require('mongoose');
|
|
7
|
-
|
|
8
|
-
var ApplicationUsage = mongoose.model('ApplicationUsage', new mongoose.Schema({},
|
|
9
|
-
{ collection : 'applicationUsage' }
|
|
10
|
-
));
|
|
11
|
-
module.exports = ApplicationUsage;
|
package/models/BeaconFilter.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
|
|
9
|
-
var BeaconFilterSchema = new mongoose.Schema(
|
|
10
|
-
{
|
|
11
|
-
"_class" : {type:String, default : "au.com.bluedot.application.spring.filter.spatial.BeaconFilter"},
|
|
12
|
-
"beacon" : {},
|
|
13
|
-
"guid" : String,
|
|
14
|
-
"type" : {type:String, default: "beacon"}
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
_id: false
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
var BeaconFilter = mongoose.model('BeaconFilter', BeaconFilterSchema);
|
|
22
|
-
|
|
23
|
-
module.exports = BeaconFilter;
|
package/models/BearingFilter.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Andrew on 30/01/2017.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
var mongoose = require('mongoose');
|
|
7
|
-
|
|
8
|
-
var BearingFilter = mongoose.model('BearingFilter', mongoose.Schema({
|
|
9
|
-
guid: {type: String},
|
|
10
|
-
_class : {type: String, default:"au.com.bluedot.application.spring.filter.action.BearingFilter"},
|
|
11
|
-
fromAngle : Number,
|
|
12
|
-
toAngle : Number,
|
|
13
|
-
type : {type: String, default:"bearingFilter"}
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
_id: false
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
module.exports = BearingFilter;
|
package/models/BoundingBox.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Bluedot01 on 30/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var mongoose = require('mongoose');
|
|
7
|
-
Schema = mongoose.Schema;
|
|
8
|
-
|
|
9
|
-
var BoundingBox = mongoose.model('BoundingBox', mongoose.Schema({
|
|
10
|
-
type: {type: String, default: "MultiLineString"},
|
|
11
|
-
"coordinates" : []
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
_id: false
|
|
15
|
-
}
|
|
16
|
-
));
|
|
17
|
-
module.exports = BoundingBox;
|
package/models/Circle.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Bluedot01 on 30/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
/*
|
|
7
|
-
Right now mongoose does not support 1-1 relationships.
|
|
8
|
-
https://github.com/LearnBoost/mongoose/pull/585.
|
|
9
|
-
it can be wrapped around array like polygon.
|
|
10
|
-
*/
|
|
11
|
-
var mongoose = require('mongoose');
|
|
12
|
-
Schema = mongoose.Schema;
|
|
13
|
-
var Circle = mongoose.model('Circle', mongoose.Schema({
|
|
14
|
-
"type": {type: String, default: "MultiLineString"},
|
|
15
|
-
"coordinates" : Array
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
_id: false
|
|
19
|
-
}
|
|
20
|
-
));
|
|
21
|
-
module.exports = Circle;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright : Bluedot Innovations.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
var mongoose = require('mongoose'),
|
|
6
|
-
Schema = mongoose.Schema;
|
|
7
|
-
|
|
8
|
-
var ConfigurationParameters = mongoose.model('ConfigurationParameters', new Schema(
|
|
9
|
-
{
|
|
10
|
-
name: String,
|
|
11
|
-
iosConfig: {type: Schema.Types.Mixed, default: {}},
|
|
12
|
-
androidConfig: {type: Schema.Types.Mixed, default: {}},
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
collection : 'configurationParameters'
|
|
16
|
-
}
|
|
17
|
-
)
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
module.exports = ConfigurationParameters;
|
package/models/Customer.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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 Customer = mongoose.model('Customer', new mongoose.Schema(
|
|
10
|
-
{
|
|
11
|
-
_id: String,
|
|
12
|
-
customerApiKey: String,
|
|
13
|
-
email: String,
|
|
14
|
-
password: String,
|
|
15
|
-
name: String,
|
|
16
|
-
userName: String,
|
|
17
|
-
state: {type:String, default: StateEnum.active},
|
|
18
|
-
"creationTime" : {type: Date, default: Date.now},
|
|
19
|
-
"lastUpdateTime" : {type: Date, default: Date.now},
|
|
20
|
-
"dataSource" : {type:String, select: false, default : 'openApi'},
|
|
21
|
-
integrations: Schema.Types.Mixed,
|
|
22
|
-
firstName: String,
|
|
23
|
-
lastName: String,
|
|
24
|
-
oldPassword: String,
|
|
25
|
-
organisationWebsite: String,
|
|
26
|
-
organisationName: String,
|
|
27
|
-
phoneNumber: String,
|
|
28
|
-
createdBy: String,
|
|
29
|
-
poiCredits: {type: Number, default: 0},
|
|
30
|
-
address: []
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
collection : 'customer'
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
module.exports = Customer;
|
|
@@ -1,20 +0,0 @@
|
|
|
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 DateRangeFilter = mongoose.model('DateRangeFilter', mongoose.Schema({
|
|
10
|
-
guid: {type: String},
|
|
11
|
-
_class : {type: String, default:"au.com.bluedot.application.spring.filter.action.DateRangeFilter"},
|
|
12
|
-
startDate: {type: String},
|
|
13
|
-
endDate: {type: String},
|
|
14
|
-
type : {type: String, default:"dateRangeFilter"},
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
_id: false
|
|
18
|
-
}
|
|
19
|
-
));
|
|
20
|
-
module.exports = DateRangeFilter;
|
package/models/Fence.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
|
|
9
|
-
var FenceSchema = new mongoose.Schema({
|
|
10
|
-
"_id" : {type: String},
|
|
11
|
-
"creationTime" : {type: Date, default: Date.now},
|
|
12
|
-
"lastUpdateTime" : {type: Date, default: Date.now},
|
|
13
|
-
"type" : {type:String, default: "Feature"},
|
|
14
|
-
"dataSource" : {type:String, select: false, default : 'openApi'},
|
|
15
|
-
"geometry" : {type: Schema.Types.Mixed, default: {}}
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
var Fence = mongoose.model('Fence', FenceSchema);
|
|
20
|
-
|
|
21
|
-
module.exports = Fence;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var FormattedBeacon = function () {
|
|
7
|
-
this.beaconId = null;
|
|
8
|
-
this.name = null;
|
|
9
|
-
this.proximityUUID = null;
|
|
10
|
-
this.longitude = null;
|
|
11
|
-
this.latitude = null;
|
|
12
|
-
this.major = null;
|
|
13
|
-
this.minor = null;
|
|
14
|
-
this.macAddress = null;
|
|
15
|
-
};
|
|
16
|
-
module.exports = FormattedBeacon;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var FormattedCircle = function () {
|
|
7
|
-
this.name = null;
|
|
8
|
-
this.color = null;
|
|
9
|
-
this.radius = null;
|
|
10
|
-
this.center = null;
|
|
11
|
-
};
|
|
12
|
-
module.exports = FormattedCircle;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var FormattedConditions = function () {
|
|
7
|
-
this.percentageCrossed = [];
|
|
8
|
-
this.dateRange = [];
|
|
9
|
-
this.timeActive = [];
|
|
10
|
-
};
|
|
11
|
-
module.exports = FormattedConditions;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
var FormattedPercentageCrossed = function (id, percentage, timeout) {
|
|
8
|
-
this.conditionId = id;
|
|
9
|
-
this.percentage = percentage;
|
|
10
|
-
this.timeoutPeriod = timeout;
|
|
11
|
-
};
|
|
12
|
-
module.exports = FormattedPercentageCrossed;
|
package/models/FormattedPoint.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var FormattedRectangle = function () {
|
|
7
|
-
this.name = null;
|
|
8
|
-
this.color = null;
|
|
9
|
-
this.northEast = null;
|
|
10
|
-
this.southWest = null;
|
|
11
|
-
};
|
|
12
|
-
module.exports = FormattedRectangle;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var FormattedTimeActive = function (id, fromTime, fromPhase, toTime, toPhase) {
|
|
7
|
-
this.conditionId = id;
|
|
8
|
-
this.from = {
|
|
9
|
-
"time": fromTime,
|
|
10
|
-
"period": fromPhase
|
|
11
|
-
};
|
|
12
|
-
this.to = {
|
|
13
|
-
"time": toTime,
|
|
14
|
-
"period": toPhase
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
module.exports = FormattedTimeActive;
|
package/models/FormattedZone.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Arun on 10/09/2014.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var FormattedZone = function () {
|
|
7
|
-
this.zoneName = null;
|
|
8
|
-
this.zoneId = null;
|
|
9
|
-
this.minimumRetriggerTime = null;
|
|
10
|
-
this.timeActive = null;
|
|
11
|
-
this.checkout = null;
|
|
12
|
-
this.actions = {
|
|
13
|
-
soundActions: [],
|
|
14
|
-
customActions: [],
|
|
15
|
-
vibrationActions: [],
|
|
16
|
-
messageActions: [],
|
|
17
|
-
urlActions: []
|
|
18
|
-
};
|
|
19
|
-
this.fences =
|
|
20
|
-
{
|
|
21
|
-
circles: [],
|
|
22
|
-
rectangles: [],
|
|
23
|
-
polygons: [],
|
|
24
|
-
polylines: []
|
|
25
|
-
};
|
|
26
|
-
this.beacons = [];
|
|
27
|
-
};
|
|
28
|
-
module.exports = FormattedZone;
|
package/models/GeoFence.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
|
|
9
|
-
var FenceSchema = new mongoose.Schema({
|
|
10
|
-
_id : {type: String},
|
|
11
|
-
"geometry": {
|
|
12
|
-
"type": { type: String, required: true },
|
|
13
|
-
"coordinates": { type: Array, required: true}
|
|
14
|
-
},
|
|
15
|
-
"fenceId" : String,
|
|
16
|
-
"fenceName" : String
|
|
17
|
-
},
|
|
18
|
-
{ collection : 'GeoFence' }
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
var GeoFence = mongoose.model('GeoFence', FenceSchema);
|
|
22
|
-
|
|
23
|
-
module.exports = GeoFence;
|
package/models/Geofeature.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Andrew on 7/06/2016.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
var mongoose = require('mongoose'),
|
|
7
|
-
Schema = mongoose.Schema;
|
|
8
|
-
|
|
9
|
-
var GeofeatureSchema = new Schema({
|
|
10
|
-
_id: Schema.Types.ObjectId,
|
|
11
|
-
_class: {type: String, default: "au.com.bluedot.application.spring.GeoFeature"},
|
|
12
|
-
geometry: Schema.Types.Mixed,
|
|
13
|
-
referenceId: String,
|
|
14
|
-
apiKey: String,
|
|
15
|
-
zoneId: String,
|
|
16
|
-
type: String,
|
|
17
|
-
name: String,
|
|
18
|
-
beaconType: String,
|
|
19
|
-
creationTime : {type: Date, default: Date.now},
|
|
20
|
-
lastUpdateTime : {type: Date, default: Date.now},
|
|
21
|
-
},
|
|
22
|
-
{ collection : 'geofeature' });
|
|
23
|
-
|
|
24
|
-
var Geofeature = mongoose.model('Geofeature', GeofeatureSchema);
|
|
25
|
-
|
|
26
|
-
module.exports = Geofeature;
|
|
@@ -1,19 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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;
|
package/models/Polygon.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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;
|
package/models/Polyline.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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;
|
|
@@ -1,17 +0,0 @@
|
|
|
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;
|
package/models/Reference.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
|
package/models/SequenceFilter.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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;
|
|
@@ -1,29 +0,0 @@
|
|
|
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;
|