@bluedot-innovation/models 1.0.26-alpha → 2.0.0-alpha.10
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 +6 -0
- package/.gitlab-ci.yml +43 -0
- package/.nyc_output/.gitkeep +0 -0
- package/Models.js +8 -8
- package/README.MD +36 -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 +62 -0
- package/__tests__/dailyStats/checkDailyStats.js +30 -0
- package/__tests__/filter/beacon/beaconFilter.data.json +1 -0
- package/__tests__/filter/beacon/beaconFilter.rules.json +3 -0
- package/__tests__/filter/beacon/beaconFilter.spec.js +1 -0
- package/__tests__/filter/bearing/bearingFilter.data.json +5 -0
- package/__tests__/filter/bearing/bearingFilter.rules.json +3 -0
- package/__tests__/filter/bearing/bearingFilter.spec.js +95 -0
- package/__tests__/filter/calendarDateRange/calendarDateRangeFilter.data.json +5 -0
- package/__tests__/filter/calendarDateRange/calendarDateRangeFilter.rules.json +3 -0
- package/__tests__/filter/calendarDateRange/calendarDateRangeFilter.spec.js +62 -0
- package/__tests__/filter/percentageCrossed/percentageCrossedFilter.data.json +5 -0
- package/__tests__/filter/percentageCrossed/percentageCrossedFilter.rules.json +3 -0
- package/__tests__/filter/percentageCrossed/percentageCrossedFilter.spec.js +62 -0
- package/__tests__/filter/speed/speedFilter.data.json +5 -0
- package/__tests__/filter/speed/speedFilter.rules.json +3 -0
- package/__tests__/filter/speed/speedFilter.spec.js +73 -0
- package/__tests__/filter/timeOfDayRange/timeOfDayRange.data.json +5 -0
- package/__tests__/filter/timeOfDayRange/timeOfDayRange.rules.json +3 -0
- package/__tests__/filter/timeOfDayRange/timeOfDayRange.spec.js +73 -0
- package/__tests__/geofeature/beacon/beacon.data.json +12 -0
- package/__tests__/geofeature/beacon/beacon.rules.json +13 -0
- package/__tests__/geofeature/beacon/beacon.spec.js +95 -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 +61 -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 +62 -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 +61 -0
- package/__tests__/geofeature/polyline/polyline.data.json +46 -0
- package/__tests__/geofeature/polyline/polyline.rules.json +3 -0
- package/__tests__/geofeature/polyline/polyline.spec.js +61 -0
- package/__tests__/zone/zone.action.spec.js +50 -0
- package/__tests__/zone/zone.data.json +154 -0
- package/__tests__/zone/zone.filter.spec.js +50 -0
- package/__tests__/zone/zone.geofeatures.spec.js +64 -0
- package/__tests__/zone/zone.spec.js +98 -0
- package/models/AdminPortalUser.js +10 -11
- package/models/AdminUser.js +6 -5
- package/models/Application.js +31 -30
- package/models/Beacon.js +102 -32
- package/models/BeaconFilter.js +30 -12
- package/models/BearingFilter.js +56 -17
- package/models/BoundingBox.js +36 -14
- package/models/CalendarDateRangeFilter.js +41 -0
- package/models/Circle.js +37 -19
- package/models/Contract.js +37 -38
- package/models/Customer.js +31 -31
- 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/Fence.js +12 -13
- package/models/GeoFence.js +12 -14
- package/models/Geofeature.js +16 -18
- package/models/MessageAction.js +32 -25
- 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/PercentageCrossedFilter.js +30 -16
- package/models/Polygon.js +34 -15
- package/models/Polyline.js +35 -15
- package/models/RuleRequestAggregation.js +14 -17
- package/models/SimpleCheckInZone.js +21 -21
- package/models/SingleUseToken.js +7 -8
- package/models/SpeedFilter.js +43 -16
- 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/TimeOfDayRangeFilter.js +39 -16
- package/models/UrlAction.js +51 -0
- package/models/Zone.js +97 -0
- package/models/ZoneUIState.js +18 -18
- package/package.json +25 -4
- package/schemas/Point.js +13 -0
- package/NodeModels.iml +0 -9
- package/models/ApplicationNotificationAction.js +0 -30
- package/models/ApplicationUsage.js +0 -11
- package/models/ConfigurationParameters.js +0 -20
- package/models/DateRangeFilter.js +0 -20
- 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/MonthlyStats.js +0 -28
- package/models/Point.js +0 -20
- package/models/PropertyMapping.js +0 -17
- package/models/Reference.js +0 -19
- package/models/SequenceFilter.js +0 -18
- package/models/SoundAction.js +0 -28
- package/models/URLAction.js +0 -31
- package/models/VibrationAction.js +0 -28
- package/models/property.js +0 -25
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/MonthlyStats.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Daniel on 08/02/2018.
|
|
3
|
-
* Copyright : Bluedot Innovations.
|
|
4
|
-
* Owner :
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const mongoose = require('mongoose'),
|
|
8
|
-
Schema = mongoose.Schema;
|
|
9
|
-
|
|
10
|
-
const MonthlyStats = mongoose.model(
|
|
11
|
-
'MonthlyStats',
|
|
12
|
-
new Schema(
|
|
13
|
-
{
|
|
14
|
-
_id: { type: String },
|
|
15
|
-
customerId: String,
|
|
16
|
-
totalMonthlyUsers: Number,
|
|
17
|
-
applications: [],
|
|
18
|
-
countMonth: { type: Date },
|
|
19
|
-
creationDate: { type: Date, default: Date.now }
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
collection: 'monthlyStats',
|
|
23
|
-
versionKey: false
|
|
24
|
-
}
|
|
25
|
-
)
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
module.exports = MonthlyStats;
|
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;
|
|
@@ -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;
|
package/models/SoundAction.js
DELETED
|
@@ -1,28 +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 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;
|
package/models/URLAction.js
DELETED
|
@@ -1,31 +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 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;
|
|
@@ -1,28 +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 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;
|
package/models/property.js
DELETED
|
@@ -1,25 +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 property = new mongoose.Schema({
|
|
8
|
-
_id : String,
|
|
9
|
-
Agent : String,
|
|
10
|
-
StreetNumber : Number,
|
|
11
|
-
Address : String,
|
|
12
|
-
Suburb : String,
|
|
13
|
-
NumberOfBedrooms: Number,
|
|
14
|
-
GarageCount: Number,
|
|
15
|
-
CarportCount: Number,
|
|
16
|
-
NumberBathrooms: Number,
|
|
17
|
-
OpenForInspection: String,
|
|
18
|
-
Latitude: Number,
|
|
19
|
-
Longitude: Number,
|
|
20
|
-
filename: String
|
|
21
|
-
}, { collection : 'property' });
|
|
22
|
-
|
|
23
|
-
var property = mongoose.model('property', property);
|
|
24
|
-
|
|
25
|
-
module.exports = property;
|