@ricado/api-client 2.3.19 → 2.3.21
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/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +4 -2
- package/lib/Controllers/Packhouse/Site/BinTipBarcodeScannerResultController.js +207 -0
- package/lib/Controllers/Packhouse/Site/index.js +3 -0
- package/lib/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +156 -8
- package/lib/Models/Packhouse/Site/BinTipBarcodeScannerResultModel.js +315 -0
- package/lib/Models/Packhouse/Site/index.js +3 -0
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +329 -7
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +4 -2
- package/src/Controllers/Packhouse/Site/BinTipBarcodeScannerResultController.js +184 -0
- package/src/Controllers/Packhouse/Site/index.js +2 -0
- package/src/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +208 -8
- package/src/Models/Packhouse/Site/BinTipBarcodeScannerResultModel.js +305 -0
- package/src/Models/Packhouse/Site/index.js +2 -0
- package/src/PackageVersion.js +1 -1
|
@@ -180,8 +180,9 @@ var _default = BinTipBarcodeScannerController;
|
|
|
180
180
|
* @typedef {Object} BinTipBarcodeScannerController.CreateData
|
|
181
181
|
* @property {?number} [rtuId] The RTU this Bin Tip Barcode Scanner Belt belongs to
|
|
182
182
|
* @property {string} name The Name of this Bin Tip Barcode Scanner
|
|
183
|
-
* @property {{scannerErrorBeepRequest: number, restartServiceRequest: number}} points The Points used by this Bin Tip Barcode Scanner
|
|
184
183
|
* @property {string} binTipId The Bin Tip that owns this Barcode Scanner
|
|
184
|
+
* @property {{scannerCommunicationStatus: number, scannerChargingStatus: number, scannerChargingTimeRemaining: number, scannerBatteryTemperature: number, scannerBatteryPercentage: number, scannerBatteryCurrent: number, scannerBatteryVoltage: number, scannerErrorBeepRequest: number, serviceCommunicationStatus: number, serviceCommunicationLatency: number, restartServiceRequest: number, recentScanResults: number}} points The Points used by this Bin Tip Barcode Scanner
|
|
185
|
+
* @property {string} mode The Mode for this Bin Tip Barcode Scanner
|
|
185
186
|
* @memberof Controllers.Packhouse.Site
|
|
186
187
|
*/
|
|
187
188
|
|
|
@@ -190,8 +191,9 @@ var _default = BinTipBarcodeScannerController;
|
|
|
190
191
|
*
|
|
191
192
|
* @typedef {Object} BinTipBarcodeScannerController.UpdateData
|
|
192
193
|
* @property {string} [name] The Name of this Bin Tip Barcode Scanner
|
|
193
|
-
* @property {{scannerErrorBeepRequest: number, restartServiceRequest: number}} [points] The Points used by this Bin Tip Barcode Scanner
|
|
194
194
|
* @property {string} [binTipId] The Bin Tip that owns this Barcode Scanner
|
|
195
|
+
* @property {{scannerCommunicationStatus: number, scannerChargingStatus: number, scannerChargingTimeRemaining: number, scannerBatteryTemperature: number, scannerBatteryPercentage: number, scannerBatteryCurrent: number, scannerBatteryVoltage: number, scannerErrorBeepRequest: number, serviceCommunicationStatus: number, serviceCommunicationLatency: number, restartServiceRequest: number, recentScanResults: number}} [points] The Points used by this Bin Tip Barcode Scanner
|
|
196
|
+
* @property {string} [mode] The Mode for this Bin Tip Barcode Scanner
|
|
195
197
|
* @memberof Controllers.Packhouse.Site
|
|
196
198
|
*/
|
|
197
199
|
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _RequestHelper = _interopRequireDefault(require("../../../RequestHelper"));
|
|
9
|
+
|
|
10
|
+
var _BinTipBarcodeScannerResultModel = _interopRequireDefault(require("../../../Models/Packhouse/Site/BinTipBarcodeScannerResultModel"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
|
|
16
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
17
|
+
|
|
18
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Controller Class for Bin Tip Barcode Scanner Results
|
|
22
|
+
*
|
|
23
|
+
* @class
|
|
24
|
+
*/
|
|
25
|
+
var BinTipBarcodeScannerResultController = /*#__PURE__*/function () {
|
|
26
|
+
function BinTipBarcodeScannerResultController() {
|
|
27
|
+
_classCallCheck(this, BinTipBarcodeScannerResultController);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
_createClass(BinTipBarcodeScannerResultController, null, [{
|
|
31
|
+
key: "getOne",
|
|
32
|
+
value:
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve a Bin Tip Barcode Scanner Result [GET /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
|
|
35
|
+
*
|
|
36
|
+
* @static
|
|
37
|
+
* @public
|
|
38
|
+
* @param {number} siteId The Site ID
|
|
39
|
+
* @param {string} id The Bin Tip Barcode Scanner Result ID
|
|
40
|
+
* @return {Promise<BinTipBarcodeScannerResultModel>}
|
|
41
|
+
*/
|
|
42
|
+
function getOne(siteId, id) {
|
|
43
|
+
return new Promise(function (resolve, reject) {
|
|
44
|
+
_RequestHelper.default.getRequest("/packhouse/sites/".concat(siteId, "/bin-tip-barcode-scanner-results/").concat(id)).then(function (result) {
|
|
45
|
+
var resolveValue = function () {
|
|
46
|
+
return _BinTipBarcodeScannerResultModel.default.fromJSON(result, siteId);
|
|
47
|
+
}();
|
|
48
|
+
|
|
49
|
+
resolve(resolveValue);
|
|
50
|
+
}).catch(function (error) {
|
|
51
|
+
return reject(error);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Update a Bin Tip Barcode Scanner Result [PATCH /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
|
|
57
|
+
*
|
|
58
|
+
* @static
|
|
59
|
+
* @public
|
|
60
|
+
* @param {number} siteId The Site ID
|
|
61
|
+
* @param {string} id The Bin Tip Barcode Scanner Result ID
|
|
62
|
+
* @param {BinTipBarcodeScannerResultController.UpdateData} updateData The Bin Tip Barcode Scanner Result Update Data
|
|
63
|
+
* @return {Promise<BinTipBarcodeScannerResultModel>}
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
}, {
|
|
67
|
+
key: "update",
|
|
68
|
+
value: function update(siteId, id, updateData) {
|
|
69
|
+
return new Promise(function (resolve, reject) {
|
|
70
|
+
_RequestHelper.default.patchRequest("/packhouse/sites/".concat(siteId, "/bin-tip-barcode-scanner-results/").concat(id), updateData).then(function (result) {
|
|
71
|
+
var resolveValue = function () {
|
|
72
|
+
return _BinTipBarcodeScannerResultModel.default.fromJSON(result, siteId);
|
|
73
|
+
}();
|
|
74
|
+
|
|
75
|
+
resolve(resolveValue);
|
|
76
|
+
}).catch(function (error) {
|
|
77
|
+
return reject(error);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Delete a Bin Tip Barcode Scanner Result [DELETE /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
|
|
83
|
+
*
|
|
84
|
+
* @static
|
|
85
|
+
* @public
|
|
86
|
+
* @param {number} siteId The Site ID
|
|
87
|
+
* @param {string} id The Bin Tip Barcode Scanner Result ID
|
|
88
|
+
* @return {Promise<boolean>}
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
}, {
|
|
92
|
+
key: "delete",
|
|
93
|
+
value: function _delete(siteId, id) {
|
|
94
|
+
return new Promise(function (resolve, reject) {
|
|
95
|
+
_RequestHelper.default.deleteRequest("/packhouse/sites/".concat(siteId, "/bin-tip-barcode-scanner-results/").concat(id)).then(function (result) {
|
|
96
|
+
resolve(result !== null && result !== void 0 ? result : true);
|
|
97
|
+
}).catch(function (error) {
|
|
98
|
+
return reject(error);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* List all Bin Tip Barcode Scanner Results [GET /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results]
|
|
104
|
+
*
|
|
105
|
+
* @static
|
|
106
|
+
* @public
|
|
107
|
+
* @param {number} siteId The Site ID
|
|
108
|
+
* @param {BinTipBarcodeScannerResultController.GetAllQueryParameters} [queryParameters] The Optional Query Parameters
|
|
109
|
+
* @return {Promise<BinTipBarcodeScannerResultModel[]>}
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
}, {
|
|
113
|
+
key: "getAll",
|
|
114
|
+
value: function getAll(siteId) {
|
|
115
|
+
var queryParameters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
116
|
+
return new Promise(function (resolve, reject) {
|
|
117
|
+
_RequestHelper.default.getRequest("/packhouse/sites/".concat(siteId, "/bin-tip-barcode-scanner-results"), queryParameters).then(function (result) {
|
|
118
|
+
var resolveValue = function () {
|
|
119
|
+
if (Array.isArray(result) !== true) {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return result.map(function (resultItem) {
|
|
124
|
+
return function () {
|
|
125
|
+
return _BinTipBarcodeScannerResultModel.default.fromJSON(resultItem, siteId);
|
|
126
|
+
}();
|
|
127
|
+
});
|
|
128
|
+
}();
|
|
129
|
+
|
|
130
|
+
resolve(resolveValue);
|
|
131
|
+
}).catch(function (error) {
|
|
132
|
+
return reject(error);
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Create a Bin Tip Barcode Scanner Result [POST /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results]
|
|
138
|
+
*
|
|
139
|
+
* @static
|
|
140
|
+
* @public
|
|
141
|
+
* @param {number} siteId The Site ID
|
|
142
|
+
* @param {BinTipBarcodeScannerResultController.CreateData} createData The Bin Tip Barcode Scanner Result Create Data
|
|
143
|
+
* @return {Promise<BinTipBarcodeScannerResultModel>}
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
}, {
|
|
147
|
+
key: "create",
|
|
148
|
+
value: function create(siteId, createData) {
|
|
149
|
+
return new Promise(function (resolve, reject) {
|
|
150
|
+
_RequestHelper.default.postRequest("/packhouse/sites/".concat(siteId, "/bin-tip-barcode-scanner-results"), createData).then(function (result) {
|
|
151
|
+
var resolveValue = function () {
|
|
152
|
+
return _BinTipBarcodeScannerResultModel.default.fromJSON(result, siteId);
|
|
153
|
+
}();
|
|
154
|
+
|
|
155
|
+
resolve(resolveValue);
|
|
156
|
+
}).catch(function (error) {
|
|
157
|
+
return reject(error);
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}]);
|
|
162
|
+
|
|
163
|
+
return BinTipBarcodeScannerResultController;
|
|
164
|
+
}();
|
|
165
|
+
|
|
166
|
+
var _default = BinTipBarcodeScannerResultController;
|
|
167
|
+
/**
|
|
168
|
+
* The Optional Query Parameters for the getAll Function
|
|
169
|
+
*
|
|
170
|
+
* @typedef {Object} BinTipBarcodeScannerResultController.GetAllQueryParameters
|
|
171
|
+
* @property {string} [barcodeScannerId] The Bin Tip Barcode Scanner ID associated with this Result
|
|
172
|
+
* @property {string} [binNumber] A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
|
|
173
|
+
* @property {string} [scanMode] The Mode of the Barcode Scanner when creating this Barcode Scanner Result
|
|
174
|
+
* @property {?string} [packrunId] The Packrun ID associated with this Barcode Scanner Result
|
|
175
|
+
* @property {Date} [createdTimestampBegin] Filter by the Timestamp when this Barcode Scanner Result was Created. Results Greater than or Equal to Timestamp
|
|
176
|
+
* @property {Date} [createdTimestampEnd] Filter by the Timestamp when this Barcode Scanner Result was Created. Results Less than or Equal to Timestamp
|
|
177
|
+
* @memberof Controllers.Packhouse.Site
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The Create Data for a Bin Tip Barcode Scanner Result
|
|
182
|
+
*
|
|
183
|
+
* @typedef {Object} BinTipBarcodeScannerResultController.CreateData
|
|
184
|
+
* @property {string} barcodeScannerId The Bin Tip Barcode Scanner ID associated with this Result
|
|
185
|
+
* @property {string} [binNumber] A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
|
|
186
|
+
* @property {Date} [createdTimestamp] When this Barcode Scanner Result was Created
|
|
187
|
+
* @property {string} scanMode The Mode of the Barcode Scanner when creating this Barcode Scanner Result
|
|
188
|
+
* @property {?string} [packrunId] The Packrun ID associated with this Barcode Scanner Result
|
|
189
|
+
* @property {boolean} result Whether the Bin Number was Valid and could be matched with a Current or Scheduled Packrun
|
|
190
|
+
* @property {?string} resultMessage An Optional Message to accompany the Result. Typically only present when the Result is **false**
|
|
191
|
+
* @memberof Controllers.Packhouse.Site
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* The Update Data for a Bin Tip Barcode Scanner Result
|
|
196
|
+
*
|
|
197
|
+
* @typedef {Object} BinTipBarcodeScannerResultController.UpdateData
|
|
198
|
+
* @property {string} [barcodeScannerId] The Bin Tip Barcode Scanner ID associated with this Result
|
|
199
|
+
* @property {Date} [createdTimestamp] When this Barcode Scanner Result was Created
|
|
200
|
+
* @property {string} [scanMode] The Mode of the Barcode Scanner when creating this Barcode Scanner Result
|
|
201
|
+
* @property {?string} [packrunId] The Packrun ID associated with this Barcode Scanner Result
|
|
202
|
+
* @property {boolean} [result] Whether the Bin Number was Valid and could be matched with a Current or Scheduled Packrun
|
|
203
|
+
* @property {?string} [resultMessage] An Optional Message to accompany the Result. Typically only present when the Result is **false**
|
|
204
|
+
* @memberof Controllers.Packhouse.Site
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
exports.default = _default;
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _BinTipBarcodeScannerController = _interopRequireDefault(require("./BinTipBarcodeScannerController"));
|
|
9
9
|
|
|
10
|
+
var _BinTipBarcodeScannerResultController = _interopRequireDefault(require("./BinTipBarcodeScannerResultController"));
|
|
11
|
+
|
|
10
12
|
var _BinTipBinCardController = _interopRequireDefault(require("./BinTipBinCardController"));
|
|
11
13
|
|
|
12
14
|
var _BinTipBinController = _interopRequireDefault(require("./BinTipBinController"));
|
|
@@ -86,6 +88,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
86
88
|
*/
|
|
87
89
|
var Site = {
|
|
88
90
|
BinTipBarcodeScannerController: _BinTipBarcodeScannerController.default,
|
|
91
|
+
BinTipBarcodeScannerResultController: _BinTipBarcodeScannerResultController.default,
|
|
89
92
|
BinTipBinCardController: _BinTipBinCardController.default,
|
|
90
93
|
BinTipBinController: _BinTipBinController.default,
|
|
91
94
|
BinTipWeightController: _BinTipWeightController.default,
|
|
@@ -79,28 +79,46 @@ var BinTipBarcodeScannerModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
79
79
|
*/
|
|
80
80
|
|
|
81
81
|
_this.name = "";
|
|
82
|
+
/**
|
|
83
|
+
* The Bin Tip that owns this Barcode Scanner
|
|
84
|
+
*
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.binTipId = "";
|
|
82
90
|
/**
|
|
83
91
|
* The Points used by this Bin Tip Barcode Scanner
|
|
84
92
|
*
|
|
85
|
-
* @type {{scannerErrorBeepRequest: number, restartServiceRequest: number}}
|
|
93
|
+
* @type {{scannerCommunicationStatus: number, scannerChargingStatus: number, scannerChargingTimeRemaining: number, scannerBatteryTemperature: number, scannerBatteryPercentage: number, scannerBatteryCurrent: number, scannerBatteryVoltage: number, scannerErrorBeepRequest: number, serviceCommunicationStatus: number, serviceCommunicationLatency: number, restartServiceRequest: number, recentScanResults: number}}
|
|
86
94
|
* @public
|
|
87
95
|
*/
|
|
88
96
|
|
|
89
97
|
_this.points = function () {
|
|
90
98
|
var pointsDefaultValue = {};
|
|
99
|
+
pointsDefaultValue.scannerCommunicationStatus = 0;
|
|
100
|
+
pointsDefaultValue.scannerChargingStatus = 0;
|
|
101
|
+
pointsDefaultValue.scannerChargingTimeRemaining = 0;
|
|
102
|
+
pointsDefaultValue.scannerBatteryTemperature = 0;
|
|
103
|
+
pointsDefaultValue.scannerBatteryPercentage = 0;
|
|
104
|
+
pointsDefaultValue.scannerBatteryCurrent = 0;
|
|
105
|
+
pointsDefaultValue.scannerBatteryVoltage = 0;
|
|
91
106
|
pointsDefaultValue.scannerErrorBeepRequest = 0;
|
|
107
|
+
pointsDefaultValue.serviceCommunicationStatus = 0;
|
|
108
|
+
pointsDefaultValue.serviceCommunicationLatency = 0;
|
|
92
109
|
pointsDefaultValue.restartServiceRequest = 0;
|
|
110
|
+
pointsDefaultValue.recentScanResults = 0;
|
|
93
111
|
return pointsDefaultValue;
|
|
94
112
|
}();
|
|
95
113
|
/**
|
|
96
|
-
* The
|
|
114
|
+
* The Mode for this Bin Tip Barcode Scanner
|
|
97
115
|
*
|
|
98
116
|
* @type {string}
|
|
99
117
|
* @public
|
|
100
118
|
*/
|
|
101
119
|
|
|
102
120
|
|
|
103
|
-
_this.
|
|
121
|
+
_this.mode = "";
|
|
104
122
|
/**
|
|
105
123
|
* Whether the Bin Tip Barcode Scanner has been deleted
|
|
106
124
|
*
|
|
@@ -190,10 +208,104 @@ var BinTipBarcodeScannerModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
190
208
|
}();
|
|
191
209
|
}
|
|
192
210
|
|
|
211
|
+
if ('binTipId' in jsonObject) {
|
|
212
|
+
model.binTipId = function () {
|
|
213
|
+
if (typeof jsonObject['binTipId'] !== 'string') {
|
|
214
|
+
return String(jsonObject['binTipId']);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return jsonObject['binTipId'];
|
|
218
|
+
}();
|
|
219
|
+
}
|
|
220
|
+
|
|
193
221
|
if ('points' in jsonObject) {
|
|
194
222
|
model.points = function () {
|
|
195
223
|
var pointsObject = {};
|
|
196
224
|
|
|
225
|
+
if (_typeof(jsonObject['points']) === 'object' && 'scannerCommunicationStatus' in jsonObject['points']) {
|
|
226
|
+
pointsObject.scannerCommunicationStatus = function () {
|
|
227
|
+
if (typeof jsonObject['points'].scannerCommunicationStatus !== 'number') {
|
|
228
|
+
return Number.isInteger(Number(jsonObject['points'].scannerCommunicationStatus)) ? Number(jsonObject['points'].scannerCommunicationStatus) : Math.floor(Number(jsonObject['points'].scannerCommunicationStatus));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return Number.isInteger(jsonObject['points'].scannerCommunicationStatus) ? jsonObject['points'].scannerCommunicationStatus : Math.floor(jsonObject['points'].scannerCommunicationStatus);
|
|
232
|
+
}();
|
|
233
|
+
} else {
|
|
234
|
+
pointsObject.scannerCommunicationStatus = 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (_typeof(jsonObject['points']) === 'object' && 'scannerChargingStatus' in jsonObject['points']) {
|
|
238
|
+
pointsObject.scannerChargingStatus = function () {
|
|
239
|
+
if (typeof jsonObject['points'].scannerChargingStatus !== 'number') {
|
|
240
|
+
return Number.isInteger(Number(jsonObject['points'].scannerChargingStatus)) ? Number(jsonObject['points'].scannerChargingStatus) : Math.floor(Number(jsonObject['points'].scannerChargingStatus));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return Number.isInteger(jsonObject['points'].scannerChargingStatus) ? jsonObject['points'].scannerChargingStatus : Math.floor(jsonObject['points'].scannerChargingStatus);
|
|
244
|
+
}();
|
|
245
|
+
} else {
|
|
246
|
+
pointsObject.scannerChargingStatus = 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (_typeof(jsonObject['points']) === 'object' && 'scannerChargingTimeRemaining' in jsonObject['points']) {
|
|
250
|
+
pointsObject.scannerChargingTimeRemaining = function () {
|
|
251
|
+
if (typeof jsonObject['points'].scannerChargingTimeRemaining !== 'number') {
|
|
252
|
+
return Number.isInteger(Number(jsonObject['points'].scannerChargingTimeRemaining)) ? Number(jsonObject['points'].scannerChargingTimeRemaining) : Math.floor(Number(jsonObject['points'].scannerChargingTimeRemaining));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return Number.isInteger(jsonObject['points'].scannerChargingTimeRemaining) ? jsonObject['points'].scannerChargingTimeRemaining : Math.floor(jsonObject['points'].scannerChargingTimeRemaining);
|
|
256
|
+
}();
|
|
257
|
+
} else {
|
|
258
|
+
pointsObject.scannerChargingTimeRemaining = 0;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (_typeof(jsonObject['points']) === 'object' && 'scannerBatteryTemperature' in jsonObject['points']) {
|
|
262
|
+
pointsObject.scannerBatteryTemperature = function () {
|
|
263
|
+
if (typeof jsonObject['points'].scannerBatteryTemperature !== 'number') {
|
|
264
|
+
return Number.isInteger(Number(jsonObject['points'].scannerBatteryTemperature)) ? Number(jsonObject['points'].scannerBatteryTemperature) : Math.floor(Number(jsonObject['points'].scannerBatteryTemperature));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return Number.isInteger(jsonObject['points'].scannerBatteryTemperature) ? jsonObject['points'].scannerBatteryTemperature : Math.floor(jsonObject['points'].scannerBatteryTemperature);
|
|
268
|
+
}();
|
|
269
|
+
} else {
|
|
270
|
+
pointsObject.scannerBatteryTemperature = 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (_typeof(jsonObject['points']) === 'object' && 'scannerBatteryPercentage' in jsonObject['points']) {
|
|
274
|
+
pointsObject.scannerBatteryPercentage = function () {
|
|
275
|
+
if (typeof jsonObject['points'].scannerBatteryPercentage !== 'number') {
|
|
276
|
+
return Number.isInteger(Number(jsonObject['points'].scannerBatteryPercentage)) ? Number(jsonObject['points'].scannerBatteryPercentage) : Math.floor(Number(jsonObject['points'].scannerBatteryPercentage));
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return Number.isInteger(jsonObject['points'].scannerBatteryPercentage) ? jsonObject['points'].scannerBatteryPercentage : Math.floor(jsonObject['points'].scannerBatteryPercentage);
|
|
280
|
+
}();
|
|
281
|
+
} else {
|
|
282
|
+
pointsObject.scannerBatteryPercentage = 0;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (_typeof(jsonObject['points']) === 'object' && 'scannerBatteryCurrent' in jsonObject['points']) {
|
|
286
|
+
pointsObject.scannerBatteryCurrent = function () {
|
|
287
|
+
if (typeof jsonObject['points'].scannerBatteryCurrent !== 'number') {
|
|
288
|
+
return Number.isInteger(Number(jsonObject['points'].scannerBatteryCurrent)) ? Number(jsonObject['points'].scannerBatteryCurrent) : Math.floor(Number(jsonObject['points'].scannerBatteryCurrent));
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return Number.isInteger(jsonObject['points'].scannerBatteryCurrent) ? jsonObject['points'].scannerBatteryCurrent : Math.floor(jsonObject['points'].scannerBatteryCurrent);
|
|
292
|
+
}();
|
|
293
|
+
} else {
|
|
294
|
+
pointsObject.scannerBatteryCurrent = 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if (_typeof(jsonObject['points']) === 'object' && 'scannerBatteryVoltage' in jsonObject['points']) {
|
|
298
|
+
pointsObject.scannerBatteryVoltage = function () {
|
|
299
|
+
if (typeof jsonObject['points'].scannerBatteryVoltage !== 'number') {
|
|
300
|
+
return Number.isInteger(Number(jsonObject['points'].scannerBatteryVoltage)) ? Number(jsonObject['points'].scannerBatteryVoltage) : Math.floor(Number(jsonObject['points'].scannerBatteryVoltage));
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return Number.isInteger(jsonObject['points'].scannerBatteryVoltage) ? jsonObject['points'].scannerBatteryVoltage : Math.floor(jsonObject['points'].scannerBatteryVoltage);
|
|
304
|
+
}();
|
|
305
|
+
} else {
|
|
306
|
+
pointsObject.scannerBatteryVoltage = 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
197
309
|
if (_typeof(jsonObject['points']) === 'object' && 'scannerErrorBeepRequest' in jsonObject['points']) {
|
|
198
310
|
pointsObject.scannerErrorBeepRequest = function () {
|
|
199
311
|
if (typeof jsonObject['points'].scannerErrorBeepRequest !== 'number') {
|
|
@@ -206,6 +318,30 @@ var BinTipBarcodeScannerModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
206
318
|
pointsObject.scannerErrorBeepRequest = 0;
|
|
207
319
|
}
|
|
208
320
|
|
|
321
|
+
if (_typeof(jsonObject['points']) === 'object' && 'serviceCommunicationStatus' in jsonObject['points']) {
|
|
322
|
+
pointsObject.serviceCommunicationStatus = function () {
|
|
323
|
+
if (typeof jsonObject['points'].serviceCommunicationStatus !== 'number') {
|
|
324
|
+
return Number.isInteger(Number(jsonObject['points'].serviceCommunicationStatus)) ? Number(jsonObject['points'].serviceCommunicationStatus) : Math.floor(Number(jsonObject['points'].serviceCommunicationStatus));
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return Number.isInteger(jsonObject['points'].serviceCommunicationStatus) ? jsonObject['points'].serviceCommunicationStatus : Math.floor(jsonObject['points'].serviceCommunicationStatus);
|
|
328
|
+
}();
|
|
329
|
+
} else {
|
|
330
|
+
pointsObject.serviceCommunicationStatus = 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if (_typeof(jsonObject['points']) === 'object' && 'serviceCommunicationLatency' in jsonObject['points']) {
|
|
334
|
+
pointsObject.serviceCommunicationLatency = function () {
|
|
335
|
+
if (typeof jsonObject['points'].serviceCommunicationLatency !== 'number') {
|
|
336
|
+
return Number.isInteger(Number(jsonObject['points'].serviceCommunicationLatency)) ? Number(jsonObject['points'].serviceCommunicationLatency) : Math.floor(Number(jsonObject['points'].serviceCommunicationLatency));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return Number.isInteger(jsonObject['points'].serviceCommunicationLatency) ? jsonObject['points'].serviceCommunicationLatency : Math.floor(jsonObject['points'].serviceCommunicationLatency);
|
|
340
|
+
}();
|
|
341
|
+
} else {
|
|
342
|
+
pointsObject.serviceCommunicationLatency = 0;
|
|
343
|
+
}
|
|
344
|
+
|
|
209
345
|
if (_typeof(jsonObject['points']) === 'object' && 'restartServiceRequest' in jsonObject['points']) {
|
|
210
346
|
pointsObject.restartServiceRequest = function () {
|
|
211
347
|
if (typeof jsonObject['points'].restartServiceRequest !== 'number') {
|
|
@@ -218,17 +354,29 @@ var BinTipBarcodeScannerModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
218
354
|
pointsObject.restartServiceRequest = 0;
|
|
219
355
|
}
|
|
220
356
|
|
|
357
|
+
if (_typeof(jsonObject['points']) === 'object' && 'recentScanResults' in jsonObject['points']) {
|
|
358
|
+
pointsObject.recentScanResults = function () {
|
|
359
|
+
if (typeof jsonObject['points'].recentScanResults !== 'number') {
|
|
360
|
+
return Number.isInteger(Number(jsonObject['points'].recentScanResults)) ? Number(jsonObject['points'].recentScanResults) : Math.floor(Number(jsonObject['points'].recentScanResults));
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
return Number.isInteger(jsonObject['points'].recentScanResults) ? jsonObject['points'].recentScanResults : Math.floor(jsonObject['points'].recentScanResults);
|
|
364
|
+
}();
|
|
365
|
+
} else {
|
|
366
|
+
pointsObject.recentScanResults = 0;
|
|
367
|
+
}
|
|
368
|
+
|
|
221
369
|
return pointsObject;
|
|
222
370
|
}();
|
|
223
371
|
}
|
|
224
372
|
|
|
225
|
-
if ('
|
|
226
|
-
model.
|
|
227
|
-
if (typeof jsonObject['
|
|
228
|
-
return String(jsonObject['
|
|
373
|
+
if ('mode' in jsonObject) {
|
|
374
|
+
model.mode = function () {
|
|
375
|
+
if (typeof jsonObject['mode'] !== 'string') {
|
|
376
|
+
return String(jsonObject['mode']);
|
|
229
377
|
}
|
|
230
378
|
|
|
231
|
-
return jsonObject['
|
|
379
|
+
return jsonObject['mode'];
|
|
232
380
|
}();
|
|
233
381
|
}
|
|
234
382
|
|