@ricado/api-client 2.3.19 → 2.3.20

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.
@@ -0,0 +1,315 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(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
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
21
+
22
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
+
24
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
+
26
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
27
+
28
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
29
+
30
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
+
32
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
+
34
+ /**
35
+ * Model Class for a Bin Tip Barcode Scanner Result
36
+ *
37
+ * @class
38
+ * @hideconstructor
39
+ * @extends BaseModel
40
+ */
41
+ var BinTipBarcodeScannerResultModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(BinTipBarcodeScannerResultModel, _BaseModel);
43
+
44
+ var _super = _createSuper(BinTipBarcodeScannerResultModel);
45
+
46
+ /**
47
+ * BinTipBarcodeScannerResultModel Constructor
48
+ *
49
+ * @protected
50
+ * @param {number} siteId The Site ID associated with this Bin Tip Barcode Scanner Result
51
+ */
52
+ function BinTipBarcodeScannerResultModel(siteId) {
53
+ var _this;
54
+
55
+ _classCallCheck(this, BinTipBarcodeScannerResultModel);
56
+
57
+ _this = _super.call(this);
58
+ /**
59
+ * The Bin Tip Barcode Scanner Result ID
60
+ *
61
+ * @type {string}
62
+ * @public
63
+ */
64
+
65
+ _this.id = "";
66
+ /**
67
+ * The Bin Tip Barcode Scanner ID associated with this Result
68
+ *
69
+ * @type {string}
70
+ * @public
71
+ */
72
+
73
+ _this.barcodeScannerId = "";
74
+ /**
75
+ * A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
76
+ *
77
+ * @type {string}
78
+ * @public
79
+ */
80
+
81
+ _this.binNumber = "";
82
+ /**
83
+ * When this Barcode Scanner Result was Created
84
+ *
85
+ * @type {Date}
86
+ * @public
87
+ */
88
+
89
+ _this.createdTimestamp = new Date();
90
+ /**
91
+ * The Type of this Barcode Scanner Result
92
+ *
93
+ * @type {string}
94
+ * @public
95
+ */
96
+
97
+ _this.type = "";
98
+ /**
99
+ * The Packrun ID associated with this Barcode Scanner Result
100
+ *
101
+ * @type {?string}
102
+ * @public
103
+ */
104
+
105
+ _this.packrunId = null;
106
+ /**
107
+ * Whether the Bin Number was Valid and could be matched with a Current or Scheduled Packrun
108
+ *
109
+ * @type {boolean}
110
+ * @public
111
+ */
112
+
113
+ _this.result = false;
114
+ /**
115
+ * An Optional Message to accompany the Result. Typically only present when the Result is **false**
116
+ *
117
+ * @type {?string}
118
+ * @public
119
+ */
120
+
121
+ _this.resultMessage = null;
122
+ /**
123
+ * The Bin Lot Code of this Barcode Scanner Result
124
+ *
125
+ * @type {?string}
126
+ * @public
127
+ */
128
+
129
+ _this.binLotCode = null;
130
+ /**
131
+ * Whether the Bin Tip Barcode Scanner Result has been deleted
132
+ *
133
+ * @type {boolean}
134
+ * @public
135
+ */
136
+
137
+ _this.deleted = false;
138
+ /**
139
+ * When the Bin Tip Barcode Scanner Result was last updated
140
+ *
141
+ * @type {Date}
142
+ * @public
143
+ */
144
+
145
+ _this.updateTimestamp = new Date();
146
+ /**
147
+ * The Site ID associated with this Bin Tip Barcode Scanner Result
148
+ *
149
+ * @type {number}
150
+ * @public
151
+ */
152
+
153
+ _this.siteId = siteId;
154
+ return _this;
155
+ }
156
+ /**
157
+ * Create a new **BinTipBarcodeScannerResultModel** from a JSON Object or JSON String
158
+ *
159
+ * @static
160
+ * @public
161
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
162
+ * @param {number} siteId The Site ID associated with this Bin Tip Barcode Scanner Result
163
+ * @return {BinTipBarcodeScannerResultModel}
164
+ */
165
+
166
+
167
+ _createClass(BinTipBarcodeScannerResultModel, null, [{
168
+ key: "fromJSON",
169
+ value: function fromJSON(json, siteId) {
170
+ var model = new BinTipBarcodeScannerResultModel(siteId);
171
+ /**
172
+ * The JSON Object
173
+ *
174
+ * @type {Object<string, any>}
175
+ */
176
+
177
+ var jsonObject = {};
178
+
179
+ if (typeof json === 'string') {
180
+ jsonObject = JSON.parse(json);
181
+ } else if (_typeof(json) === 'object') {
182
+ jsonObject = json;
183
+ }
184
+
185
+ if ('id' in jsonObject) {
186
+ model.id = function () {
187
+ if (typeof jsonObject['id'] !== 'string') {
188
+ return String(jsonObject['id']);
189
+ }
190
+
191
+ return jsonObject['id'];
192
+ }();
193
+ }
194
+
195
+ if ('barcodeScannerId' in jsonObject) {
196
+ model.barcodeScannerId = function () {
197
+ if (typeof jsonObject['barcodeScannerId'] !== 'string') {
198
+ return String(jsonObject['barcodeScannerId']);
199
+ }
200
+
201
+ return jsonObject['barcodeScannerId'];
202
+ }();
203
+ }
204
+
205
+ if ('binNumber' in jsonObject) {
206
+ model.binNumber = function () {
207
+ if (typeof jsonObject['binNumber'] !== 'string') {
208
+ return String(jsonObject['binNumber']);
209
+ }
210
+
211
+ return jsonObject['binNumber'];
212
+ }();
213
+ }
214
+
215
+ if ('createdTimestamp' in jsonObject) {
216
+ model.createdTimestamp = function () {
217
+ if (typeof jsonObject['createdTimestamp'] !== 'string') {
218
+ return new Date(String(jsonObject['createdTimestamp']));
219
+ }
220
+
221
+ return new Date(jsonObject['createdTimestamp']);
222
+ }();
223
+ }
224
+
225
+ if ('type' in jsonObject) {
226
+ model.type = function () {
227
+ if (typeof jsonObject['type'] !== 'string') {
228
+ return String(jsonObject['type']);
229
+ }
230
+
231
+ return jsonObject['type'];
232
+ }();
233
+ }
234
+
235
+ if ('packrunId' in jsonObject) {
236
+ model.packrunId = function () {
237
+ if (jsonObject['packrunId'] === null) {
238
+ return null;
239
+ }
240
+
241
+ if (typeof jsonObject['packrunId'] !== 'string') {
242
+ return String(jsonObject['packrunId']);
243
+ }
244
+
245
+ return jsonObject['packrunId'];
246
+ }();
247
+ }
248
+
249
+ if ('result' in jsonObject) {
250
+ model.result = function () {
251
+ if (typeof jsonObject['result'] !== 'boolean') {
252
+ return Boolean(jsonObject['result']);
253
+ }
254
+
255
+ return jsonObject['result'];
256
+ }();
257
+ }
258
+
259
+ if ('resultMessage' in jsonObject) {
260
+ model.resultMessage = function () {
261
+ if (jsonObject['resultMessage'] === null) {
262
+ return null;
263
+ }
264
+
265
+ if (typeof jsonObject['resultMessage'] !== 'string') {
266
+ return String(jsonObject['resultMessage']);
267
+ }
268
+
269
+ return jsonObject['resultMessage'];
270
+ }();
271
+ }
272
+
273
+ if ('binLotCode' in jsonObject) {
274
+ model.binLotCode = function () {
275
+ if (jsonObject['binLotCode'] === null) {
276
+ return null;
277
+ }
278
+
279
+ if (typeof jsonObject['binLotCode'] !== 'string') {
280
+ return String(jsonObject['binLotCode']);
281
+ }
282
+
283
+ return jsonObject['binLotCode'];
284
+ }();
285
+ }
286
+
287
+ if ('deleted' in jsonObject) {
288
+ model.deleted = function () {
289
+ if (typeof jsonObject['deleted'] !== 'boolean') {
290
+ return Boolean(jsonObject['deleted']);
291
+ }
292
+
293
+ return jsonObject['deleted'];
294
+ }();
295
+ }
296
+
297
+ if ('updateTimestamp' in jsonObject) {
298
+ model.updateTimestamp = function () {
299
+ if (typeof jsonObject['updateTimestamp'] !== 'string') {
300
+ return new Date(String(jsonObject['updateTimestamp']));
301
+ }
302
+
303
+ return new Date(jsonObject['updateTimestamp']);
304
+ }();
305
+ }
306
+
307
+ return model;
308
+ }
309
+ }]);
310
+
311
+ return BinTipBarcodeScannerResultModel;
312
+ }(_BaseModel2.default);
313
+
314
+ var _default = BinTipBarcodeScannerResultModel;
315
+ exports.default = _default;
@@ -7,6 +7,8 @@ exports.default = void 0;
7
7
 
8
8
  var _BinTipBarcodeScannerModel = _interopRequireDefault(require("./BinTipBarcodeScannerModel"));
9
9
 
10
+ var _BinTipBarcodeScannerResultModel = _interopRequireDefault(require("./BinTipBarcodeScannerResultModel"));
11
+
10
12
  var _BinTipBinCardModel = _interopRequireDefault(require("./BinTipBinCardModel"));
11
13
 
12
14
  var _BinTipBinModel = _interopRequireDefault(require("./BinTipBinModel"));
@@ -86,6 +88,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
86
88
  */
87
89
  var Site = {
88
90
  BinTipBarcodeScannerModel: _BinTipBarcodeScannerModel.default,
91
+ BinTipBarcodeScannerResultModel: _BinTipBarcodeScannerResultModel.default,
89
92
  BinTipBinCardModel: _BinTipBinCardModel.default,
90
93
  BinTipBinModel: _BinTipBinModel.default,
91
94
  BinTipWeightModel: _BinTipWeightModel.default,
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- var version = '2.3.19';
8
+ var version = '2.3.20';
9
9
  exports.version = version;