@bluedot-innovation/models 1.0.6 → 1.0.8

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 CHANGED
@@ -4,9 +4,11 @@
4
4
 
5
5
  var Models = {};
6
6
  var normalizedPath = require("path").join(__dirname, "models");
7
-
8
- require("fs").readdirSync(normalizedPath).forEach(function(file) {
9
- Models[file.substring(0, file.length-3)] = require("./models/" + file);
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
+ }
10
12
  });
11
13
 
12
14
  module.exports = Models;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Copyright : Bluedot Innovations.
3
3
  */
4
+
4
5
  var mongoose = require('mongoose');
5
6
  var Enums = require('@bluedot-innovation/enums');
6
7
 
@@ -13,7 +14,8 @@ var AdminPortalUser = mongoose.model('AdminPortalUser', new mongoose.Schema(
13
14
  state: {type:String, default: Enums.StateEnum.active},
14
15
  "creationTime" : {type: Date, default: Date.now},
15
16
  "dataSource" : {type:String, select: false, default : 'AdminPortal'},
16
- adminId: String
17
+ adminId: String,
18
+ secret: String
17
19
  },
18
20
  {
19
21
  collection : 'adminPortalUser'
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Created by andrewstirling on 12/4/17.
3
+ */
4
+ var mongoose = require('mongoose');
5
+
6
+ var POIResult = mongoose.model('POIResult', new mongoose.Schema(
7
+ {
8
+ _id: String,
9
+ lookupId: String,
10
+ page: Number,
11
+ "lastUpdateTime" : {type: Date, default: Date.now},
12
+ results: []
13
+ },
14
+ {
15
+ collection : 'poiResult'
16
+ }
17
+ )
18
+ );
19
+
20
+ module.exports = POIResult;
@@ -14,14 +14,17 @@ var TestDevice = mongoose.model('TestDevice', new mongoose.Schema(
14
14
  osVersion: String,
15
15
  hostToken: String,
16
16
  batteryToken: String,
17
+ model: String,
17
18
  trackingDevice: {type: Boolean, default : false},
18
- "creationTime" : {type: Date, default: Date.now},
19
- "lastUpdateTime" : {type: Date, default: Date.now},
20
- "serialNumber": String,
19
+ creationTime : {type: Date, default: Date.now},
20
+ lastUpdateTime : {type: Date, default: Date.now},
21
+ serialNumber: String,
21
22
  mobileNumber: String,
22
23
  deviceType: String,
23
24
  state: {type:String, default: StateEnum.active},
24
- comments: String
25
+ comments: String,
26
+ imei: String,
27
+ udid: String
25
28
  },
26
29
  {
27
30
  collection : 'testDevice'
@@ -14,12 +14,15 @@ var TestInstance = mongoose.model('TestInstance', new mongoose.Schema(
14
14
  mode: String,
15
15
  startTime: Date,
16
16
  endTime: Date,
17
+ duration: Number,
17
18
  endPoint: String,
18
19
  trackedLocations: {type: Array, default: []},
19
20
  "creationTime" : {type: Date, default: Date.now},
20
21
  "lastUpdateTime" : {type: Date, default: Date.now},
21
22
  state: {type: String, default: StateEnum.active},
22
- comments: String
23
+ comments: String,
24
+ isProduction: Boolean,
25
+ sdkVersion: String
23
26
  },
24
27
  {
25
28
  collection : 'testInstance'
@@ -15,6 +15,7 @@ var TestScenario = mongoose.model('TestScenario', new mongoose.Schema(
15
15
  "creationTime" : {type: Date, default: Date.now},
16
16
  "lastUpdateTime" : {type: Date, default: Date.now},
17
17
  state: {type: String, default: StateEnum.active},
18
+ numberZones: String,
18
19
  comments: String,
19
20
  environment: String
20
21
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "Models.js",
6
6
  "scripts": {