@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.
Files changed (120) hide show
  1. package/.eslintrc.js +6 -0
  2. package/.gitlab-ci.yml +43 -0
  3. package/.nyc_output/.gitkeep +0 -0
  4. package/Models.js +8 -8
  5. package/README.MD +36 -0
  6. package/__tests__/action/message/messageAction.data.json +5 -0
  7. package/__tests__/action/message/messageAction.rules.json +3 -0
  8. package/__tests__/action/message/messageAction.spec.js +61 -0
  9. package/__tests__/action/url/urlAction.data.json +4 -0
  10. package/__tests__/action/url/urlAction.rules.json +3 -0
  11. package/__tests__/action/url/urlAction.spec.js +62 -0
  12. package/__tests__/dailyStats/checkDailyStats.js +30 -0
  13. package/__tests__/filter/beacon/beaconFilter.data.json +1 -0
  14. package/__tests__/filter/beacon/beaconFilter.rules.json +3 -0
  15. package/__tests__/filter/beacon/beaconFilter.spec.js +1 -0
  16. package/__tests__/filter/bearing/bearingFilter.data.json +5 -0
  17. package/__tests__/filter/bearing/bearingFilter.rules.json +3 -0
  18. package/__tests__/filter/bearing/bearingFilter.spec.js +95 -0
  19. package/__tests__/filter/calendarDateRange/calendarDateRangeFilter.data.json +5 -0
  20. package/__tests__/filter/calendarDateRange/calendarDateRangeFilter.rules.json +3 -0
  21. package/__tests__/filter/calendarDateRange/calendarDateRangeFilter.spec.js +62 -0
  22. package/__tests__/filter/percentageCrossed/percentageCrossedFilter.data.json +5 -0
  23. package/__tests__/filter/percentageCrossed/percentageCrossedFilter.rules.json +3 -0
  24. package/__tests__/filter/percentageCrossed/percentageCrossedFilter.spec.js +62 -0
  25. package/__tests__/filter/speed/speedFilter.data.json +5 -0
  26. package/__tests__/filter/speed/speedFilter.rules.json +3 -0
  27. package/__tests__/filter/speed/speedFilter.spec.js +73 -0
  28. package/__tests__/filter/timeOfDayRange/timeOfDayRange.data.json +5 -0
  29. package/__tests__/filter/timeOfDayRange/timeOfDayRange.rules.json +3 -0
  30. package/__tests__/filter/timeOfDayRange/timeOfDayRange.spec.js +73 -0
  31. package/__tests__/geofeature/beacon/beacon.data.json +12 -0
  32. package/__tests__/geofeature/beacon/beacon.rules.json +13 -0
  33. package/__tests__/geofeature/beacon/beacon.spec.js +95 -0
  34. package/__tests__/geofeature/boundingBox/boundingBox.data.json +12 -0
  35. package/__tests__/geofeature/boundingBox/boundingBox.rules.json +3 -0
  36. package/__tests__/geofeature/boundingBox/boundingBox.spec.js +61 -0
  37. package/__tests__/geofeature/circle/circle.data.json +9 -0
  38. package/__tests__/geofeature/circle/circle.rules.json +3 -0
  39. package/__tests__/geofeature/circle/circle.spec.js +62 -0
  40. package/__tests__/geofeature/polygon/polygon.data.json +46 -0
  41. package/__tests__/geofeature/polygon/polygon.rules.json +3 -0
  42. package/__tests__/geofeature/polygon/polygon.spec.js +61 -0
  43. package/__tests__/geofeature/polyline/polyline.data.json +46 -0
  44. package/__tests__/geofeature/polyline/polyline.rules.json +3 -0
  45. package/__tests__/geofeature/polyline/polyline.spec.js +61 -0
  46. package/__tests__/zone/zone.action.spec.js +50 -0
  47. package/__tests__/zone/zone.data.json +154 -0
  48. package/__tests__/zone/zone.filter.spec.js +50 -0
  49. package/__tests__/zone/zone.geofeatures.spec.js +64 -0
  50. package/__tests__/zone/zone.spec.js +98 -0
  51. package/models/AdminPortalUser.js +10 -11
  52. package/models/AdminUser.js +6 -5
  53. package/models/Application.js +31 -30
  54. package/models/Beacon.js +102 -32
  55. package/models/BeaconFilter.js +30 -12
  56. package/models/BearingFilter.js +56 -17
  57. package/models/BoundingBox.js +36 -14
  58. package/models/CalendarDateRangeFilter.js +41 -0
  59. package/models/Circle.js +37 -19
  60. package/models/Contract.js +37 -38
  61. package/models/Customer.js +31 -31
  62. package/models/CustomerLogin.js +9 -10
  63. package/models/DBEvent.js +13 -14
  64. package/models/DailyStats.js +7 -7
  65. package/models/DeviceRulesRequest.js +27 -28
  66. package/models/Fence.js +12 -13
  67. package/models/GeoFence.js +12 -14
  68. package/models/Geofeature.js +16 -18
  69. package/models/MessageAction.js +32 -25
  70. package/models/NotificationLogEntry.js +7 -8
  71. package/models/POILocation.js +6 -7
  72. package/models/POILookup.js +8 -9
  73. package/models/POIResult.js +7 -8
  74. package/models/PartnerCustomer.js +12 -13
  75. package/models/PartnerPasswordReset.js +8 -9
  76. package/models/PartnerUser.js +10 -11
  77. package/models/Partners.js +11 -12
  78. package/models/PercentageCrossedFilter.js +30 -16
  79. package/models/Polygon.js +34 -15
  80. package/models/Polyline.js +35 -15
  81. package/models/RuleRequestAggregation.js +14 -17
  82. package/models/SimpleCheckInZone.js +21 -21
  83. package/models/SingleUseToken.js +7 -8
  84. package/models/SpeedFilter.js +43 -16
  85. package/models/TestDevice.js +11 -12
  86. package/models/TestDeviceCluster.js +9 -10
  87. package/models/TestInstance.js +9 -10
  88. package/models/TestScenario.js +9 -10
  89. package/models/TimeOfDayRange.js +16 -16
  90. package/models/TimeOfDayRangeFilter.js +39 -16
  91. package/models/UrlAction.js +51 -0
  92. package/models/Zone.js +97 -0
  93. package/models/ZoneUIState.js +18 -18
  94. package/package.json +25 -4
  95. package/schemas/Point.js +13 -0
  96. package/NodeModels.iml +0 -9
  97. package/models/ApplicationNotificationAction.js +0 -30
  98. package/models/ApplicationUsage.js +0 -11
  99. package/models/ConfigurationParameters.js +0 -20
  100. package/models/DateRangeFilter.js +0 -20
  101. package/models/FormattedBeacon.js +0 -16
  102. package/models/FormattedCircle.js +0 -12
  103. package/models/FormattedConditions.js +0 -11
  104. package/models/FormattedDateRange.js +0 -11
  105. package/models/FormattedPercentageCrossed.js +0 -12
  106. package/models/FormattedPoint.js +0 -10
  107. package/models/FormattedPolygon.js +0 -11
  108. package/models/FormattedPolyline.js +0 -11
  109. package/models/FormattedRectangle.js +0 -12
  110. package/models/FormattedTimeActive.js +0 -17
  111. package/models/FormattedZone.js +0 -28
  112. package/models/MonthlyStats.js +0 -28
  113. package/models/Point.js +0 -20
  114. package/models/PropertyMapping.js +0 -17
  115. package/models/Reference.js +0 -19
  116. package/models/SequenceFilter.js +0 -18
  117. package/models/SoundAction.js +0 -28
  118. package/models/URLAction.js +0 -31
  119. package/models/VibrationAction.js +0 -28
  120. package/models/property.js +0 -25
@@ -1,10 +0,0 @@
1
- /**
2
- * Created by Arun on 10/09/2014.
3
- * Copyright : Bluedot Innovations.
4
- * Owner :
5
- */
6
- var FormattedPoint = function (latitude,longitude) {
7
- this.latitude = latitude;
8
- this.longitude = longitude;
9
- };
10
- module.exports = FormattedPoint;
@@ -1,11 +0,0 @@
1
- /**
2
- * Created by Arun on 10/09/2014.
3
- * Copyright : Bluedot Innovations.
4
- * Owner :
5
- */
6
- var FormattedPolygon = function () {
7
- this.name = null;
8
- this.color = null;
9
- this.vertices = [];
10
- };
11
- module.exports = FormattedPolygon;
@@ -1,11 +0,0 @@
1
- /**
2
- * Created by Arun on 10/09/2014.
3
- * Copyright : Bluedot Innovations.
4
- * Owner :
5
- */
6
- var FormattedPolyline = function () {
7
- this.name = null;
8
- this.color = null;
9
- this.vertices = [];
10
- };
11
- module.exports = FormattedPolyline;
@@ -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;
@@ -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;
@@ -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;
@@ -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
-
@@ -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,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;
@@ -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;
@@ -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;