@bluedot-innovation/models 1.0.8 → 1.0.9

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 (61) hide show
  1. package/.npmignore +3 -3
  2. package/Models.js +13 -13
  3. package/models/AdminPortalUser.js +26 -26
  4. package/models/AdminUser.js +9 -9
  5. package/models/Application.js +38 -38
  6. package/models/ApplicationNotificationAction.js +29 -29
  7. package/models/ApplicationUsage.js +10 -10
  8. package/models/Beacon.js +36 -36
  9. package/models/BeaconFilter.js +23 -23
  10. package/models/BearingFilter.js +18 -18
  11. package/models/BoundingBox.js +16 -16
  12. package/models/Circle.js +20 -20
  13. package/models/Contract.js +41 -41
  14. package/models/Customer.js +38 -38
  15. package/models/DBEvent.js +21 -21
  16. package/models/DateRangeFilter.js +19 -19
  17. package/models/Fence.js +21 -21
  18. package/models/FormattedBeacon.js +15 -15
  19. package/models/FormattedCircle.js +11 -11
  20. package/models/FormattedConditions.js +10 -10
  21. package/models/FormattedDateRange.js +10 -10
  22. package/models/FormattedPercentageCrossed.js +11 -11
  23. package/models/FormattedPoint.js +9 -9
  24. package/models/FormattedPolygon.js +10 -10
  25. package/models/FormattedPolyline.js +10 -10
  26. package/models/FormattedRectangle.js +11 -11
  27. package/models/FormattedTimeActive.js +16 -16
  28. package/models/FormattedZone.js +27 -27
  29. package/models/GeoFence.js +23 -23
  30. package/models/Geofeature.js +26 -26
  31. package/models/MessageAction.js +28 -28
  32. package/models/NotificationLogEntry.js +19 -19
  33. package/models/POILocation.js +20 -20
  34. package/models/POILookup.js +30 -30
  35. package/models/POIResult.js +20 -20
  36. package/models/PartnerCustomer.js +35 -35
  37. package/models/PartnerPasswordReset.js +20 -20
  38. package/models/PartnerUser.js +30 -30
  39. package/models/Partners.js +18 -18
  40. package/models/PercentageCrossedFilter.js +18 -18
  41. package/models/Point.js +20 -20
  42. package/models/Polygon.js +17 -17
  43. package/models/Polyline.js +17 -17
  44. package/models/PropertyMapping.js +17 -17
  45. package/models/Reference.js +19 -19
  46. package/models/SequenceFilter.js +17 -17
  47. package/models/SimpleCheckInZone.js +29 -29
  48. package/models/SingleUseToken.js +19 -19
  49. package/models/SoundAction.js +27 -27
  50. package/models/SpeedFilter.js +18 -18
  51. package/models/TestDevice.js +35 -35
  52. package/models/TestDeviceCluster.js +24 -24
  53. package/models/TestInstance.js +33 -33
  54. package/models/TestScenario.js +29 -28
  55. package/models/TimeOfDayRange.js +21 -21
  56. package/models/TimeOfDayRangeFilter.js +18 -18
  57. package/models/URLAction.js +30 -30
  58. package/models/VibrationAction.js +27 -27
  59. package/models/ZoneUIState.js +24 -24
  60. package/models/property.js +25 -25
  61. package/package.json +15 -15
package/.npmignore CHANGED
@@ -1,3 +1,3 @@
1
- .idea
2
- node_modules
3
- *.tgz
1
+ .idea
2
+ node_modules
3
+ *.tgz
package/Models.js CHANGED
@@ -1,14 +1,14 @@
1
- /**
2
- * Created by andrewstirling on 22/12/16.
3
- */
4
-
5
- var Models = {};
6
- var normalizedPath = require("path").join(__dirname, "models");
7
- var fs = require("fs");
8
- fs.readdirSync(normalizedPath).forEach(function(file) {
9
- if( !fs.lstatSync(normalizedPath+'/'+file).isDirectory() ) {
10
- Models[file.substring(0, file.length - 3)] = require("./models/" + file);
11
- }
12
- });
13
-
1
+ /**
2
+ * Created by andrewstirling on 22/12/16.
3
+ */
4
+
5
+ var Models = {};
6
+ var normalizedPath = require("path").join(__dirname, "models");
7
+ var fs = require("fs");
8
+ fs.readdirSync(normalizedPath).forEach(function(file) {
9
+ if( !fs.lstatSync(normalizedPath+'/'+file).isDirectory() ) {
10
+ Models[file.substring(0, file.length - 3)] = require("./models/" + file);
11
+ }
12
+ });
13
+
14
14
  module.exports = Models;
@@ -1,26 +1,26 @@
1
- /**
2
- * Copyright : Bluedot Innovations.
3
- */
4
-
5
- var mongoose = require('mongoose');
6
- var Enums = require('@bluedot-innovation/enums');
7
-
8
- var AdminPortalUser = mongoose.model('AdminPortalUser', new mongoose.Schema(
9
- {
10
- emailAddress: String,
11
- password: String,
12
- firstName: String,
13
- lastName: String,
14
- state: {type:String, default: Enums.StateEnum.active},
15
- "creationTime" : {type: Date, default: Date.now},
16
- "dataSource" : {type:String, select: false, default : 'AdminPortal'},
17
- adminId: String,
18
- secret: String
19
- },
20
- {
21
- collection : 'adminPortalUser'
22
- }
23
- )
24
- );
25
-
26
- module.exports = AdminPortalUser;
1
+ /**
2
+ * Copyright : Bluedot Innovations.
3
+ */
4
+
5
+ var mongoose = require('mongoose');
6
+ var Enums = require('@bluedot-innovation/enums');
7
+
8
+ var AdminPortalUser = mongoose.model('AdminPortalUser', new mongoose.Schema(
9
+ {
10
+ emailAddress: String,
11
+ password: String,
12
+ firstName: String,
13
+ lastName: String,
14
+ state: {type:String, default: Enums.StateEnum.active},
15
+ "creationTime" : {type: Date, default: Date.now},
16
+ "dataSource" : {type:String, select: false, default : 'AdminPortal'},
17
+ adminId: String,
18
+ secret: String
19
+ },
20
+ {
21
+ collection : 'adminPortalUser'
22
+ }
23
+ )
24
+ );
25
+
26
+ module.exports = AdminPortalUser;
@@ -1,10 +1,10 @@
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
- ));
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
10
  module.exports = AdminUser;
@@ -1,38 +1,38 @@
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
+ /**
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 +1,30 @@
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
-
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
30
  module.exports = ApplicationNotificationAction;
@@ -1,11 +1,11 @@
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
- ));
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
11
  module.exports = ApplicationUsage;
package/models/Beacon.js CHANGED
@@ -1,36 +1,36 @@
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
- Schema = mongoose.Schema;
10
- var BeaconSchema = new mongoose.Schema({
11
- "_id" : {type: String},
12
- "creationTime" : {type: Date, default: Date.now},
13
- "lastUpdateTime" : {type: Date, default: Date.now},
14
- "state": {type: String, default: StateEnum.active},
15
- "range": Number,
16
- "major": Number,
17
- "minor": Number,
18
- "description": String,
19
- "txPower": Number,
20
- "name": String,
21
- "macAddress": String,
22
- "proximityUUID": String,
23
- "customerId": String,
24
- "beaconType": String,
25
- "altitude": Number,
26
- "altitudeAccuracy": Number,
27
- "dataSource" : {type:String, select: false, default : 'openApi'},
28
- "geometry" : {type: Schema.Types.Mixed, default: {}}
29
- },
30
- { collection : 'beacon' }
31
- );
32
-
33
- var Beacon = mongoose.model('Beacon', BeaconSchema);
34
-
35
- module.exports = Beacon;
36
-
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
+ Schema = mongoose.Schema;
10
+ var BeaconSchema = new mongoose.Schema({
11
+ "_id" : {type: String},
12
+ "creationTime" : {type: Date, default: Date.now},
13
+ "lastUpdateTime" : {type: Date, default: Date.now},
14
+ "state": {type: String, default: StateEnum.active},
15
+ "range": Number,
16
+ "major": Number,
17
+ "minor": Number,
18
+ "description": String,
19
+ "txPower": Number,
20
+ "name": String,
21
+ "macAddress": String,
22
+ "proximityUUID": String,
23
+ "customerId": String,
24
+ "beaconType": String,
25
+ "altitude": Number,
26
+ "altitudeAccuracy": Number,
27
+ "dataSource" : {type:String, select: false, default : 'openApi'},
28
+ "geometry" : {type: Schema.Types.Mixed, default: {}}
29
+ },
30
+ { collection : 'beacon' }
31
+ );
32
+
33
+ var Beacon = mongoose.model('Beacon', BeaconSchema);
34
+
35
+ module.exports = Beacon;
36
+
@@ -1,23 +1,23 @@
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;
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;
@@ -1,19 +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 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
- ));
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
19
  module.exports = BearingFilter;
@@ -1,17 +1,17 @@
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
- ));
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
17
  module.exports = BoundingBox;
package/models/Circle.js CHANGED
@@ -1,21 +1,21 @@
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
- ));
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
21
  module.exports = Circle;
@@ -1,41 +1,41 @@
1
- /**
2
- * Created by Arun on 10/09/2014.
3
- * Copyright : Bluedot Innovations.
4
- * Owner :
5
- */
6
- var mongoose = require('mongoose');
7
-
8
- var Contract = mongoose.model('Contract', new mongoose.Schema(
9
- {
10
- customerId: String,
11
- organisationName: String,
12
- addressLine1: String,
13
- addressLine2: String,
14
- addressCity: String,
15
- addressRegion: String,
16
- addressPostcode: String,
17
- addressCountry: String,
18
- billingFirstName: String,
19
- billingLastName: String,
20
- billingTaxNumber: String,
21
- billingEmail: String,
22
- tradingName: String,
23
- salesforceUrl: String,
24
- startDate : {type: Date, default: Date.now},
25
- endDate : {type: Date, default: Date.now},
26
- frequency : mongoose.Schema.Types.Number,
27
- monthEntries: [],
28
- template: String,
29
- addedBy: String,
30
- xeroContactId: String,
31
- creationTime : {type: Date, default: Date.now},
32
- lastUpdateTime : {type: Date, default: Date.now},
33
- dataSource : {type:String, select: false, default : 'adminPortal'}
34
- },
35
- {
36
- collection : 'contract'
37
- }
38
- )
39
- );
40
-
41
- module.exports = Contract;
1
+ /**
2
+ * Created by Arun on 10/09/2014.
3
+ * Copyright : Bluedot Innovations.
4
+ * Owner :
5
+ */
6
+ var mongoose = require('mongoose');
7
+
8
+ var Contract = mongoose.model('Contract', new mongoose.Schema(
9
+ {
10
+ customerId: String,
11
+ organisationName: String,
12
+ addressLine1: String,
13
+ addressLine2: String,
14
+ addressCity: String,
15
+ addressRegion: String,
16
+ addressPostcode: String,
17
+ addressCountry: String,
18
+ billingFirstName: String,
19
+ billingLastName: String,
20
+ billingTaxNumber: String,
21
+ billingEmail: String,
22
+ tradingName: String,
23
+ salesforceUrl: String,
24
+ startDate : {type: Date, default: Date.now},
25
+ endDate : {type: Date, default: Date.now},
26
+ frequency : mongoose.Schema.Types.Number,
27
+ monthEntries: [],
28
+ template: String,
29
+ addedBy: String,
30
+ xeroContactId: String,
31
+ creationTime : {type: Date, default: Date.now},
32
+ lastUpdateTime : {type: Date, default: Date.now},
33
+ dataSource : {type:String, select: false, default : 'adminPortal'}
34
+ },
35
+ {
36
+ collection : 'contract'
37
+ }
38
+ )
39
+ );
40
+
41
+ module.exports = Contract;