@ricado/api-client 2.1.0 → 2.1.1

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.
@@ -122,11 +122,99 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
122
122
  /**
123
123
  * The Auto Packrun Change Configuration for this Reject Bin Scale
124
124
  *
125
- * @type {?number}
125
+ * @type {?{delay: ?number}}
126
126
  * @public
127
127
  */
128
128
 
129
129
  _this.autoPackrunChange = undefined;
130
+ /**
131
+ * Whether this Reject Bin Scale supports Live Weighing
132
+ *
133
+ * @type {?boolean}
134
+ * @public
135
+ */
136
+
137
+ _this.supportsLiveWeighing = undefined;
138
+ /**
139
+ * The Minimum Weight Change Required to Automatically Start Live Weighing
140
+ *
141
+ * @type {?number}
142
+ * @public
143
+ */
144
+
145
+ _this.autoWeighingStartThreshold = undefined;
146
+ /**
147
+ * The Delay in Milliseconds before Auto Live Weighing would Start
148
+ *
149
+ * @type {?number}
150
+ * @public
151
+ */
152
+
153
+ _this.autoWeighingStartDelay = undefined;
154
+ /**
155
+ * The Minimum Weight Change Required to Automatically Finish Live Weighing
156
+ *
157
+ * @type {?number}
158
+ * @public
159
+ */
160
+
161
+ _this.autoWeighingFinishThreshold = undefined;
162
+ /**
163
+ * The Delay in Milliseconds before Auto Live Weighing would Finish
164
+ *
165
+ * @type {?number}
166
+ * @public
167
+ */
168
+
169
+ _this.autoWeighingFinishDelay = undefined;
170
+ /**
171
+ * The Maximum Duration in Milliseconds before a Manual Intervention would end
172
+ *
173
+ * @type {?number}
174
+ * @public
175
+ */
176
+
177
+ _this.manualInterventionMaximumDuration = undefined;
178
+ /**
179
+ * The Maximum Weight Increase allowed within a single Live Weighing Update Interval
180
+ *
181
+ * @type {?number}
182
+ * @public
183
+ */
184
+
185
+ _this.liveWeighingIncreaseTolerance = undefined;
186
+ /**
187
+ * The Maximum Weight Decrease allowed within a single Live Weighing Update Interval
188
+ *
189
+ * @type {?number}
190
+ * @public
191
+ */
192
+
193
+ _this.liveWeighingDecreaseTolerance = undefined;
194
+ /**
195
+ * The Interval in Milliseconds between Live Weighing Updates
196
+ *
197
+ * @type {?number}
198
+ * @public
199
+ */
200
+
201
+ _this.liveWeighingUpdateInterval = undefined;
202
+ /**
203
+ * Whether the Loadcell Stable Status is used to ignore Changes during Live Weighing
204
+ *
205
+ * @type {?boolean}
206
+ * @public
207
+ */
208
+
209
+ _this.liveWeighingUsesStableStatus = undefined;
210
+ /**
211
+ * The Maximum Weight Change allowed while Live Weighing before an Incorrect Operation is Logged
212
+ *
213
+ * @type {?number}
214
+ * @public
215
+ */
216
+
217
+ _this.incorrectOperationTolerance = undefined;
130
218
  /**
131
219
  * The FreshPack Integration Configuration for this Reject Bin Scale
132
220
  *
@@ -296,11 +384,179 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
296
384
  return null;
297
385
  }
298
386
 
299
- if (typeof jsonObject['autoPackrunChange'] !== 'number') {
300
- return Number.isInteger(Number(jsonObject['autoPackrunChange'])) ? Number(jsonObject['autoPackrunChange']) : Math.floor(Number(jsonObject['autoPackrunChange']));
387
+ var autoPackrunChangeObject = {};
388
+
389
+ if (_typeof(jsonObject['autoPackrunChange']) === 'object' && 'delay' in jsonObject['autoPackrunChange']) {
390
+ autoPackrunChangeObject.delay = function () {
391
+ if (jsonObject['autoPackrunChange'].delay === null) {
392
+ return null;
393
+ }
394
+
395
+ if (typeof jsonObject['autoPackrunChange'].delay !== 'number') {
396
+ return Number.isInteger(Number(jsonObject['autoPackrunChange'].delay)) ? Number(jsonObject['autoPackrunChange'].delay) : Math.floor(Number(jsonObject['autoPackrunChange'].delay));
397
+ }
398
+
399
+ return Number.isInteger(jsonObject['autoPackrunChange'].delay) ? jsonObject['autoPackrunChange'].delay : Math.floor(jsonObject['autoPackrunChange'].delay);
400
+ }();
401
+ } else {
402
+ autoPackrunChangeObject.delay = null;
403
+ }
404
+
405
+ return autoPackrunChangeObject;
406
+ }();
407
+ }
408
+
409
+ if ('supportsLiveWeighing' in jsonObject) {
410
+ model.supportsLiveWeighing = function () {
411
+ if (jsonObject['supportsLiveWeighing'] === null) {
412
+ return null;
413
+ }
414
+
415
+ if (typeof jsonObject['supportsLiveWeighing'] !== 'boolean') {
416
+ return Boolean(jsonObject['supportsLiveWeighing']);
417
+ }
418
+
419
+ return jsonObject['supportsLiveWeighing'];
420
+ }();
421
+ }
422
+
423
+ if ('autoWeighingStartThreshold' in jsonObject) {
424
+ model.autoWeighingStartThreshold = function () {
425
+ if (jsonObject['autoWeighingStartThreshold'] === null) {
426
+ return null;
427
+ }
428
+
429
+ if (typeof jsonObject['autoWeighingStartThreshold'] !== 'number') {
430
+ return Number(jsonObject['autoWeighingStartThreshold']);
431
+ }
432
+
433
+ return jsonObject['autoWeighingStartThreshold'];
434
+ }();
435
+ }
436
+
437
+ if ('autoWeighingStartDelay' in jsonObject) {
438
+ model.autoWeighingStartDelay = function () {
439
+ if (jsonObject['autoWeighingStartDelay'] === null) {
440
+ return null;
441
+ }
442
+
443
+ if (typeof jsonObject['autoWeighingStartDelay'] !== 'number') {
444
+ return Number.isInteger(Number(jsonObject['autoWeighingStartDelay'])) ? Number(jsonObject['autoWeighingStartDelay']) : Math.floor(Number(jsonObject['autoWeighingStartDelay']));
445
+ }
446
+
447
+ return Number.isInteger(jsonObject['autoWeighingStartDelay']) ? jsonObject['autoWeighingStartDelay'] : Math.floor(jsonObject['autoWeighingStartDelay']);
448
+ }();
449
+ }
450
+
451
+ if ('autoWeighingFinishThreshold' in jsonObject) {
452
+ model.autoWeighingFinishThreshold = function () {
453
+ if (jsonObject['autoWeighingFinishThreshold'] === null) {
454
+ return null;
455
+ }
456
+
457
+ if (typeof jsonObject['autoWeighingFinishThreshold'] !== 'number') {
458
+ return Number(jsonObject['autoWeighingFinishThreshold']);
459
+ }
460
+
461
+ return jsonObject['autoWeighingFinishThreshold'];
462
+ }();
463
+ }
464
+
465
+ if ('autoWeighingFinishDelay' in jsonObject) {
466
+ model.autoWeighingFinishDelay = function () {
467
+ if (jsonObject['autoWeighingFinishDelay'] === null) {
468
+ return null;
469
+ }
470
+
471
+ if (typeof jsonObject['autoWeighingFinishDelay'] !== 'number') {
472
+ return Number.isInteger(Number(jsonObject['autoWeighingFinishDelay'])) ? Number(jsonObject['autoWeighingFinishDelay']) : Math.floor(Number(jsonObject['autoWeighingFinishDelay']));
473
+ }
474
+
475
+ return Number.isInteger(jsonObject['autoWeighingFinishDelay']) ? jsonObject['autoWeighingFinishDelay'] : Math.floor(jsonObject['autoWeighingFinishDelay']);
476
+ }();
477
+ }
478
+
479
+ if ('manualInterventionMaximumDuration' in jsonObject) {
480
+ model.manualInterventionMaximumDuration = function () {
481
+ if (jsonObject['manualInterventionMaximumDuration'] === null) {
482
+ return null;
483
+ }
484
+
485
+ if (typeof jsonObject['manualInterventionMaximumDuration'] !== 'number') {
486
+ return Number.isInteger(Number(jsonObject['manualInterventionMaximumDuration'])) ? Number(jsonObject['manualInterventionMaximumDuration']) : Math.floor(Number(jsonObject['manualInterventionMaximumDuration']));
487
+ }
488
+
489
+ return Number.isInteger(jsonObject['manualInterventionMaximumDuration']) ? jsonObject['manualInterventionMaximumDuration'] : Math.floor(jsonObject['manualInterventionMaximumDuration']);
490
+ }();
491
+ }
492
+
493
+ if ('liveWeighingIncreaseTolerance' in jsonObject) {
494
+ model.liveWeighingIncreaseTolerance = function () {
495
+ if (jsonObject['liveWeighingIncreaseTolerance'] === null) {
496
+ return null;
497
+ }
498
+
499
+ if (typeof jsonObject['liveWeighingIncreaseTolerance'] !== 'number') {
500
+ return Number(jsonObject['liveWeighingIncreaseTolerance']);
501
+ }
502
+
503
+ return jsonObject['liveWeighingIncreaseTolerance'];
504
+ }();
505
+ }
506
+
507
+ if ('liveWeighingDecreaseTolerance' in jsonObject) {
508
+ model.liveWeighingDecreaseTolerance = function () {
509
+ if (jsonObject['liveWeighingDecreaseTolerance'] === null) {
510
+ return null;
511
+ }
512
+
513
+ if (typeof jsonObject['liveWeighingDecreaseTolerance'] !== 'number') {
514
+ return Number(jsonObject['liveWeighingDecreaseTolerance']);
515
+ }
516
+
517
+ return jsonObject['liveWeighingDecreaseTolerance'];
518
+ }();
519
+ }
520
+
521
+ if ('liveWeighingUpdateInterval' in jsonObject) {
522
+ model.liveWeighingUpdateInterval = function () {
523
+ if (jsonObject['liveWeighingUpdateInterval'] === null) {
524
+ return null;
525
+ }
526
+
527
+ if (typeof jsonObject['liveWeighingUpdateInterval'] !== 'number') {
528
+ return Number.isInteger(Number(jsonObject['liveWeighingUpdateInterval'])) ? Number(jsonObject['liveWeighingUpdateInterval']) : Math.floor(Number(jsonObject['liveWeighingUpdateInterval']));
529
+ }
530
+
531
+ return Number.isInteger(jsonObject['liveWeighingUpdateInterval']) ? jsonObject['liveWeighingUpdateInterval'] : Math.floor(jsonObject['liveWeighingUpdateInterval']);
532
+ }();
533
+ }
534
+
535
+ if ('liveWeighingUsesStableStatus' in jsonObject) {
536
+ model.liveWeighingUsesStableStatus = function () {
537
+ if (jsonObject['liveWeighingUsesStableStatus'] === null) {
538
+ return null;
539
+ }
540
+
541
+ if (typeof jsonObject['liveWeighingUsesStableStatus'] !== 'boolean') {
542
+ return Boolean(jsonObject['liveWeighingUsesStableStatus']);
543
+ }
544
+
545
+ return jsonObject['liveWeighingUsesStableStatus'];
546
+ }();
547
+ }
548
+
549
+ if ('incorrectOperationTolerance' in jsonObject) {
550
+ model.incorrectOperationTolerance = function () {
551
+ if (jsonObject['incorrectOperationTolerance'] === null) {
552
+ return null;
553
+ }
554
+
555
+ if (typeof jsonObject['incorrectOperationTolerance'] !== 'number') {
556
+ return Number(jsonObject['incorrectOperationTolerance']);
301
557
  }
302
558
 
303
- return Number.isInteger(jsonObject['autoPackrunChange']) ? jsonObject['autoPackrunChange'] : Math.floor(jsonObject['autoPackrunChange']);
559
+ return jsonObject['incorrectOperationTolerance'];
304
560
  }();
305
561
  }
306
562
 
@@ -0,0 +1,235 @@
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 Soft Sort Belt
36
+ *
37
+ * @class
38
+ * @hideconstructor
39
+ * @extends BaseModel
40
+ */
41
+ var SoftSortBeltModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(SoftSortBeltModel, _BaseModel);
43
+
44
+ var _super = _createSuper(SoftSortBeltModel);
45
+
46
+ /**
47
+ * SoftSortBeltModel Constructor
48
+ *
49
+ * @protected
50
+ * @param {number} siteId The Site ID associated with this Soft Sort Belt
51
+ */
52
+ function SoftSortBeltModel(siteId) {
53
+ var _this;
54
+
55
+ _classCallCheck(this, SoftSortBeltModel);
56
+
57
+ _this = _super.call(this);
58
+ /**
59
+ * The Soft Sort Belt ID
60
+ *
61
+ * @type {string}
62
+ * @public
63
+ */
64
+
65
+ _this.id = undefined;
66
+ /**
67
+ * The RTU this Soft Sort Belt belongs to
68
+ *
69
+ * @type {?number}
70
+ * @public
71
+ */
72
+
73
+ _this.rtuId = undefined;
74
+ /**
75
+ * The Name of this Soft Sort Belt
76
+ *
77
+ * @type {string}
78
+ * @public
79
+ */
80
+
81
+ _this.name = undefined;
82
+ /**
83
+ * The Points used by this Soft Sort Belt
84
+ *
85
+ * @type {Object}
86
+ * @public
87
+ */
88
+
89
+ _this.points = undefined;
90
+ /**
91
+ * The Packing Line that owns this Soft Sort Belt
92
+ *
93
+ * @type {string}
94
+ * @public
95
+ */
96
+
97
+ _this.packingLineId = undefined;
98
+ /**
99
+ * Whether the Soft Sort Belt has been deleted
100
+ *
101
+ * @type {boolean}
102
+ * @public
103
+ */
104
+
105
+ _this.deleted = undefined;
106
+ /**
107
+ * When the Soft Sort Belt was last updated
108
+ *
109
+ * @type {Date}
110
+ * @public
111
+ */
112
+
113
+ _this.updateTimestamp = undefined;
114
+ /**
115
+ * The Site ID associated with this Soft Sort Belt
116
+ *
117
+ * @type {number}
118
+ * @public
119
+ */
120
+
121
+ _this.siteId = siteId;
122
+ return _this;
123
+ }
124
+ /**
125
+ * Create a new **SoftSortBeltModel** from a JSON Object or JSON String
126
+ *
127
+ * @static
128
+ * @public
129
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
130
+ * @param {number} siteId The Site ID associated with this Soft Sort Belt
131
+ * @return {SoftSortBeltModel}
132
+ */
133
+
134
+
135
+ _createClass(SoftSortBeltModel, null, [{
136
+ key: "fromJSON",
137
+ value: function fromJSON(json, siteId) {
138
+ var model = new SoftSortBeltModel(siteId);
139
+ /**
140
+ * The JSON Object
141
+ *
142
+ * @type {Object<string, any>}
143
+ */
144
+
145
+ var jsonObject = {};
146
+
147
+ if (typeof json === 'string') {
148
+ jsonObject = JSON.parse(json);
149
+ } else if (_typeof(json) === 'object') {
150
+ jsonObject = json;
151
+ }
152
+
153
+ if ('id' in jsonObject) {
154
+ model.id = function () {
155
+ if (typeof jsonObject['id'] !== 'string') {
156
+ return String(jsonObject['id']);
157
+ }
158
+
159
+ return jsonObject['id'];
160
+ }();
161
+ }
162
+
163
+ if ('rtuId' in jsonObject) {
164
+ model.rtuId = function () {
165
+ if (jsonObject['rtuId'] === null) {
166
+ return null;
167
+ }
168
+
169
+ if (typeof jsonObject['rtuId'] !== 'number') {
170
+ return Number.isInteger(Number(jsonObject['rtuId'])) ? Number(jsonObject['rtuId']) : Math.floor(Number(jsonObject['rtuId']));
171
+ }
172
+
173
+ return Number.isInteger(jsonObject['rtuId']) ? jsonObject['rtuId'] : Math.floor(jsonObject['rtuId']);
174
+ }();
175
+ }
176
+
177
+ if ('name' in jsonObject) {
178
+ model.name = function () {
179
+ if (typeof jsonObject['name'] !== 'string') {
180
+ return String(jsonObject['name']);
181
+ }
182
+
183
+ return jsonObject['name'];
184
+ }();
185
+ }
186
+
187
+ if ('points' in jsonObject) {
188
+ model.points = function () {
189
+ if (_typeof(jsonObject['points']) !== 'object') {
190
+ return Object(jsonObject['points']);
191
+ }
192
+
193
+ return jsonObject['points'];
194
+ }();
195
+ }
196
+
197
+ if ('packingLineId' in jsonObject) {
198
+ model.packingLineId = function () {
199
+ if (typeof jsonObject['packingLineId'] !== 'string') {
200
+ return String(jsonObject['packingLineId']);
201
+ }
202
+
203
+ return jsonObject['packingLineId'];
204
+ }();
205
+ }
206
+
207
+ if ('deleted' in jsonObject) {
208
+ model.deleted = function () {
209
+ if (typeof jsonObject['deleted'] !== 'boolean') {
210
+ return Boolean(jsonObject['deleted']);
211
+ }
212
+
213
+ return jsonObject['deleted'];
214
+ }();
215
+ }
216
+
217
+ if ('updateTimestamp' in jsonObject) {
218
+ model.updateTimestamp = function () {
219
+ if (typeof jsonObject['updateTimestamp'] !== 'string') {
220
+ return new Date(String(jsonObject['updateTimestamp']));
221
+ }
222
+
223
+ return new Date(jsonObject['updateTimestamp']);
224
+ }();
225
+ }
226
+
227
+ return model;
228
+ }
229
+ }]);
230
+
231
+ return SoftSortBeltModel;
232
+ }(_BaseModel2.default);
233
+
234
+ var _default = SoftSortBeltModel;
235
+ exports.default = _default;
@@ -43,6 +43,8 @@ var _ShiftHourlyEntryModel = _interopRequireDefault(require("./ShiftHourlyEntryM
43
43
 
44
44
  var _ShiftModel = _interopRequireDefault(require("./ShiftModel"));
45
45
 
46
+ var _SoftSortBeltModel = _interopRequireDefault(require("./SoftSortBeltModel"));
47
+
46
48
  var _VarietyModel = _interopRequireDefault(require("./VarietyModel"));
47
49
 
48
50
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -76,6 +78,7 @@ var Site = {
76
78
  ShiftFocusMeetingModel: _ShiftFocusMeetingModel.default,
77
79
  ShiftHourlyEntryModel: _ShiftHourlyEntryModel.default,
78
80
  ShiftModel: _ShiftModel.default,
81
+ SoftSortBeltModel: _SoftSortBeltModel.default,
79
82
  VarietyModel: _VarietyModel.default
80
83
  };
81
84
  var _default = Site;
@@ -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.1.0';
8
+ var version = '2.1.1';
9
9
  exports.version = version;