@ricado/api-client 2.0.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.
- package/README.md +5 -7
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/AccountPolicyController.js +1 -1
- package/lib/Controllers/ApiAccountController.js +2 -2
- package/lib/Controllers/CompanyController.js +1 -1
- package/lib/Controllers/FirebaseTokenController.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +5 -5
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +5 -5
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +6 -6
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackrunController.js +292 -6
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +6 -6
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +29 -7
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +453 -0
- package/lib/Controllers/Packhouse/Site/VarietyController.js +5 -5
- package/lib/Controllers/Packhouse/Site/index.js +3 -0
- package/lib/Controllers/RTU/GlobalSettingsController.js +2 -2
- package/lib/Controllers/RTU/PluginSettingsController.js +2 -2
- package/lib/Controllers/RTUController.js +1 -1
- package/lib/Controllers/RTUPluginController.js +1 -1
- package/lib/Controllers/Site/AlarmController.js +6 -6
- package/lib/Controllers/Site/AlarmGroupController.js +5 -5
- package/lib/Controllers/Site/DefinitionController.js +5 -5
- package/lib/Controllers/Site/PermanentObjectController.js +5 -5
- package/lib/Controllers/Site/PermanentObjectDataController.js +6 -6
- package/lib/Controllers/Site/PointController.js +6 -6
- package/lib/Controllers/Site/TemporaryObjectController.js +5 -5
- package/lib/Controllers/SiteController.js +1 -1
- package/lib/Controllers/TokenController.js +2 -2
- package/lib/Controllers/ToolsController.js +1 -1
- package/lib/Controllers/UserAccountActionTokenController.js +2 -2
- package/lib/Controllers/UserAccountController.js +2 -2
- package/lib/DataItems/PointValueItem.js +2 -2
- package/lib/Errors/BadRequestError.js +7 -3
- package/lib/Errors/ForbiddenError.js +7 -3
- package/lib/Errors/NetworkError.js +7 -3
- package/lib/Errors/NotAllowedError.js +7 -3
- package/lib/Errors/NotFoundError.js +7 -3
- package/lib/Errors/ServerError.js +7 -3
- package/lib/Errors/UnauthorizedError.js +7 -3
- package/lib/Models/AccountPolicyModel.js +3 -3
- package/lib/Models/ApiAccountModel.js +3 -3
- package/lib/Models/BaseModel.js +6 -2
- package/lib/Models/CompanyModel.js +3 -3
- package/lib/Models/FirebaseTokenModel.js +3 -3
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +16 -6
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +16 -6
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +16 -6
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackTypeModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackingLineModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackrunModel.js +16 -6
- package/lib/Models/Packhouse/Site/RejectBinModel.js +16 -6
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +276 -10
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftModel.js +16 -6
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +235 -0
- package/lib/Models/Packhouse/Site/VarietyModel.js +16 -6
- package/lib/Models/Packhouse/Site/index.js +3 -0
- package/lib/Models/RTUModel.js +3 -3
- package/lib/Models/RTUPluginModel.js +3 -3
- package/lib/Models/Site/AlarmGroupModel.js +16 -6
- package/lib/Models/Site/AlarmModel.js +16 -6
- package/lib/Models/Site/DefinitionModel.js +16 -6
- package/lib/Models/Site/PermanentObjectDataModel.js +16 -6
- package/lib/Models/Site/PermanentObjectModel.js +16 -6
- package/lib/Models/Site/PointModel.js +16 -6
- package/lib/Models/Site/TemporaryObjectModel.js +16 -6
- package/lib/Models/SiteModel.js +3 -3
- package/lib/Models/TokenModel.js +3 -3
- package/lib/Models/UserAccountActionTokenModel.js +3 -3
- package/lib/Models/UserAccountModel.js +3 -3
- package/lib/PackageVersion.js +1 -1
- package/lib/Points.js +1 -1
- package/lib/RequestHelper.js +2 -2
- package/lib/WebSocketHelper.js +1 -1
- package/lib/index.d.ts +1038 -76
- package/package.json +3 -3
- package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
- package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
- package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackrunController.js +365 -4
- package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +28 -6
- package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
- package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +474 -0
- package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
- package/src/Controllers/Packhouse/Site/index.js +2 -0
- package/src/Controllers/Site/AlarmController.js +4 -4
- package/src/Controllers/Site/AlarmGroupController.js +4 -4
- package/src/Controllers/Site/DefinitionController.js +4 -4
- package/src/Controllers/Site/PermanentObjectController.js +4 -4
- package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
- package/src/Controllers/Site/PointController.js +4 -4
- package/src/Controllers/Site/TemporaryObjectController.js +4 -4
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +13 -3
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +13 -3
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +13 -3
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +13 -3
- package/src/Models/Packhouse/Site/PackTypeModel.js +13 -3
- package/src/Models/Packhouse/Site/PackingLineModel.js +13 -3
- package/src/Models/Packhouse/Site/PackrunModel.js +13 -3
- package/src/Models/Packhouse/Site/RejectBinModel.js +13 -3
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +310 -7
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftModel.js +13 -3
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +215 -0
- package/src/Models/Packhouse/Site/VarietyModel.js +13 -3
- package/src/Models/Packhouse/Site/index.js +2 -0
- package/src/Models/Site/AlarmGroupModel.js +13 -3
- package/src/Models/Site/AlarmModel.js +13 -3
- package/src/Models/Site/DefinitionModel.js +13 -3
- package/src/Models/Site/PermanentObjectDataModel.js +13 -3
- package/src/Models/Site/PermanentObjectModel.js +13 -3
- package/src/Models/Site/PointModel.js +13 -3
- package/src/Models/Site/TemporaryObjectModel.js +13 -3
- package/src/PackageVersion.js +1 -1
|
@@ -19,8 +19,9 @@ class RejectBinScaleModel extends BaseModel
|
|
|
19
19
|
* RejectBinScaleModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Reject Bin Scale
|
|
22
23
|
*/
|
|
23
|
-
constructor()
|
|
24
|
+
constructor(siteId)
|
|
24
25
|
{
|
|
25
26
|
super();
|
|
26
27
|
|
|
@@ -91,11 +92,99 @@ class RejectBinScaleModel extends BaseModel
|
|
|
91
92
|
/**
|
|
92
93
|
* The Auto Packrun Change Configuration for this Reject Bin Scale
|
|
93
94
|
*
|
|
94
|
-
* @type {?number}
|
|
95
|
+
* @type {?{delay: ?number}}
|
|
95
96
|
* @public
|
|
96
97
|
*/
|
|
97
98
|
this.autoPackrunChange = undefined;
|
|
98
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Whether this Reject Bin Scale supports Live Weighing
|
|
102
|
+
*
|
|
103
|
+
* @type {?boolean}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.supportsLiveWeighing = undefined;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The Minimum Weight Change Required to Automatically Start Live Weighing
|
|
110
|
+
*
|
|
111
|
+
* @type {?number}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.autoWeighingStartThreshold = undefined;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The Delay in Milliseconds before Auto Live Weighing would Start
|
|
118
|
+
*
|
|
119
|
+
* @type {?number}
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
this.autoWeighingStartDelay = undefined;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The Minimum Weight Change Required to Automatically Finish Live Weighing
|
|
126
|
+
*
|
|
127
|
+
* @type {?number}
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
this.autoWeighingFinishThreshold = undefined;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The Delay in Milliseconds before Auto Live Weighing would Finish
|
|
134
|
+
*
|
|
135
|
+
* @type {?number}
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
this.autoWeighingFinishDelay = undefined;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The Maximum Duration in Milliseconds before a Manual Intervention would end
|
|
142
|
+
*
|
|
143
|
+
* @type {?number}
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
this.manualInterventionMaximumDuration = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The Maximum Weight Increase allowed within a single Live Weighing Update Interval
|
|
150
|
+
*
|
|
151
|
+
* @type {?number}
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
154
|
+
this.liveWeighingIncreaseTolerance = undefined;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The Maximum Weight Decrease allowed within a single Live Weighing Update Interval
|
|
158
|
+
*
|
|
159
|
+
* @type {?number}
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
this.liveWeighingDecreaseTolerance = undefined;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* The Interval in Milliseconds between Live Weighing Updates
|
|
166
|
+
*
|
|
167
|
+
* @type {?number}
|
|
168
|
+
* @public
|
|
169
|
+
*/
|
|
170
|
+
this.liveWeighingUpdateInterval = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Whether the Loadcell Stable Status is used to ignore Changes during Live Weighing
|
|
174
|
+
*
|
|
175
|
+
* @type {?boolean}
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
this.liveWeighingUsesStableStatus = undefined;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The Maximum Weight Change allowed while Live Weighing before an Incorrect Operation is Logged
|
|
182
|
+
*
|
|
183
|
+
* @type {?number}
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
this.incorrectOperationTolerance = undefined;
|
|
187
|
+
|
|
99
188
|
/**
|
|
100
189
|
* The FreshPack Integration Configuration for this Reject Bin Scale
|
|
101
190
|
*
|
|
@@ -119,6 +208,14 @@ class RejectBinScaleModel extends BaseModel
|
|
|
119
208
|
* @public
|
|
120
209
|
*/
|
|
121
210
|
this.updateTimestamp = undefined;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The Site ID associated with this Reject Bin Scale
|
|
214
|
+
*
|
|
215
|
+
* @type {number}
|
|
216
|
+
* @public
|
|
217
|
+
*/
|
|
218
|
+
this.siteId = siteId;
|
|
122
219
|
}
|
|
123
220
|
|
|
124
221
|
/**
|
|
@@ -127,11 +224,12 @@ class RejectBinScaleModel extends BaseModel
|
|
|
127
224
|
* @static
|
|
128
225
|
* @public
|
|
129
226
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
227
|
+
* @param {number} siteId The Site ID associated with this Reject Bin Scale
|
|
130
228
|
* @return {RejectBinScaleModel}
|
|
131
229
|
*/
|
|
132
|
-
static fromJSON(json)
|
|
230
|
+
static fromJSON(json, siteId)
|
|
133
231
|
{
|
|
134
|
-
let model = new RejectBinScaleModel();
|
|
232
|
+
let model = new RejectBinScaleModel(siteId);
|
|
135
233
|
|
|
136
234
|
/**
|
|
137
235
|
* The JSON Object
|
|
@@ -277,12 +375,217 @@ class RejectBinScaleModel extends BaseModel
|
|
|
277
375
|
return null;
|
|
278
376
|
}
|
|
279
377
|
|
|
280
|
-
|
|
378
|
+
let autoPackrunChangeObject = {};
|
|
379
|
+
|
|
380
|
+
if(typeof jsonObject['autoPackrunChange'] === 'object' && 'delay' in jsonObject['autoPackrunChange'])
|
|
381
|
+
{
|
|
382
|
+
autoPackrunChangeObject.delay = (function(){
|
|
383
|
+
if(jsonObject['autoPackrunChange'].delay === null)
|
|
384
|
+
{
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
if(typeof jsonObject['autoPackrunChange'].delay !== 'number')
|
|
389
|
+
{
|
|
390
|
+
return Number.isInteger(Number(jsonObject['autoPackrunChange'].delay)) ? Number(jsonObject['autoPackrunChange'].delay) : Math.floor(Number(jsonObject['autoPackrunChange'].delay));
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return Number.isInteger(jsonObject['autoPackrunChange'].delay) ? jsonObject['autoPackrunChange'].delay : Math.floor(jsonObject['autoPackrunChange'].delay);
|
|
394
|
+
}());
|
|
395
|
+
}
|
|
396
|
+
else
|
|
397
|
+
{
|
|
398
|
+
autoPackrunChangeObject.delay = null;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return autoPackrunChangeObject;
|
|
402
|
+
}());
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
if('supportsLiveWeighing' in jsonObject)
|
|
406
|
+
{
|
|
407
|
+
model.supportsLiveWeighing = (function(){
|
|
408
|
+
if(jsonObject['supportsLiveWeighing'] === null)
|
|
409
|
+
{
|
|
410
|
+
return null;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
if(typeof jsonObject['supportsLiveWeighing'] !== 'boolean')
|
|
414
|
+
{
|
|
415
|
+
return Boolean(jsonObject['supportsLiveWeighing']);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return jsonObject['supportsLiveWeighing'];
|
|
419
|
+
}());
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if('autoWeighingStartThreshold' in jsonObject)
|
|
423
|
+
{
|
|
424
|
+
model.autoWeighingStartThreshold = (function(){
|
|
425
|
+
if(jsonObject['autoWeighingStartThreshold'] === null)
|
|
426
|
+
{
|
|
427
|
+
return null;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if(typeof jsonObject['autoWeighingStartThreshold'] !== 'number')
|
|
431
|
+
{
|
|
432
|
+
return Number(jsonObject['autoWeighingStartThreshold']);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
return jsonObject['autoWeighingStartThreshold'];
|
|
436
|
+
}());
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if('autoWeighingStartDelay' in jsonObject)
|
|
440
|
+
{
|
|
441
|
+
model.autoWeighingStartDelay = (function(){
|
|
442
|
+
if(jsonObject['autoWeighingStartDelay'] === null)
|
|
443
|
+
{
|
|
444
|
+
return null;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
if(typeof jsonObject['autoWeighingStartDelay'] !== 'number')
|
|
448
|
+
{
|
|
449
|
+
return Number.isInteger(Number(jsonObject['autoWeighingStartDelay'])) ? Number(jsonObject['autoWeighingStartDelay']) : Math.floor(Number(jsonObject['autoWeighingStartDelay']));
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
return Number.isInteger(jsonObject['autoWeighingStartDelay']) ? jsonObject['autoWeighingStartDelay'] : Math.floor(jsonObject['autoWeighingStartDelay']);
|
|
453
|
+
}());
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if('autoWeighingFinishThreshold' in jsonObject)
|
|
457
|
+
{
|
|
458
|
+
model.autoWeighingFinishThreshold = (function(){
|
|
459
|
+
if(jsonObject['autoWeighingFinishThreshold'] === null)
|
|
460
|
+
{
|
|
461
|
+
return null;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
if(typeof jsonObject['autoWeighingFinishThreshold'] !== 'number')
|
|
465
|
+
{
|
|
466
|
+
return Number(jsonObject['autoWeighingFinishThreshold']);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return jsonObject['autoWeighingFinishThreshold'];
|
|
470
|
+
}());
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
if('autoWeighingFinishDelay' in jsonObject)
|
|
474
|
+
{
|
|
475
|
+
model.autoWeighingFinishDelay = (function(){
|
|
476
|
+
if(jsonObject['autoWeighingFinishDelay'] === null)
|
|
477
|
+
{
|
|
478
|
+
return null;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
if(typeof jsonObject['autoWeighingFinishDelay'] !== 'number')
|
|
482
|
+
{
|
|
483
|
+
return Number.isInteger(Number(jsonObject['autoWeighingFinishDelay'])) ? Number(jsonObject['autoWeighingFinishDelay']) : Math.floor(Number(jsonObject['autoWeighingFinishDelay']));
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
return Number.isInteger(jsonObject['autoWeighingFinishDelay']) ? jsonObject['autoWeighingFinishDelay'] : Math.floor(jsonObject['autoWeighingFinishDelay']);
|
|
487
|
+
}());
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if('manualInterventionMaximumDuration' in jsonObject)
|
|
491
|
+
{
|
|
492
|
+
model.manualInterventionMaximumDuration = (function(){
|
|
493
|
+
if(jsonObject['manualInterventionMaximumDuration'] === null)
|
|
494
|
+
{
|
|
495
|
+
return null;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
if(typeof jsonObject['manualInterventionMaximumDuration'] !== 'number')
|
|
499
|
+
{
|
|
500
|
+
return Number.isInteger(Number(jsonObject['manualInterventionMaximumDuration'])) ? Number(jsonObject['manualInterventionMaximumDuration']) : Math.floor(Number(jsonObject['manualInterventionMaximumDuration']));
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return Number.isInteger(jsonObject['manualInterventionMaximumDuration']) ? jsonObject['manualInterventionMaximumDuration'] : Math.floor(jsonObject['manualInterventionMaximumDuration']);
|
|
504
|
+
}());
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if('liveWeighingIncreaseTolerance' in jsonObject)
|
|
508
|
+
{
|
|
509
|
+
model.liveWeighingIncreaseTolerance = (function(){
|
|
510
|
+
if(jsonObject['liveWeighingIncreaseTolerance'] === null)
|
|
511
|
+
{
|
|
512
|
+
return null;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
if(typeof jsonObject['liveWeighingIncreaseTolerance'] !== 'number')
|
|
516
|
+
{
|
|
517
|
+
return Number(jsonObject['liveWeighingIncreaseTolerance']);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
return jsonObject['liveWeighingIncreaseTolerance'];
|
|
521
|
+
}());
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if('liveWeighingDecreaseTolerance' in jsonObject)
|
|
525
|
+
{
|
|
526
|
+
model.liveWeighingDecreaseTolerance = (function(){
|
|
527
|
+
if(jsonObject['liveWeighingDecreaseTolerance'] === null)
|
|
528
|
+
{
|
|
529
|
+
return null;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
if(typeof jsonObject['liveWeighingDecreaseTolerance'] !== 'number')
|
|
533
|
+
{
|
|
534
|
+
return Number(jsonObject['liveWeighingDecreaseTolerance']);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
return jsonObject['liveWeighingDecreaseTolerance'];
|
|
538
|
+
}());
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
if('liveWeighingUpdateInterval' in jsonObject)
|
|
542
|
+
{
|
|
543
|
+
model.liveWeighingUpdateInterval = (function(){
|
|
544
|
+
if(jsonObject['liveWeighingUpdateInterval'] === null)
|
|
545
|
+
{
|
|
546
|
+
return null;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if(typeof jsonObject['liveWeighingUpdateInterval'] !== 'number')
|
|
550
|
+
{
|
|
551
|
+
return Number.isInteger(Number(jsonObject['liveWeighingUpdateInterval'])) ? Number(jsonObject['liveWeighingUpdateInterval']) : Math.floor(Number(jsonObject['liveWeighingUpdateInterval']));
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
return Number.isInteger(jsonObject['liveWeighingUpdateInterval']) ? jsonObject['liveWeighingUpdateInterval'] : Math.floor(jsonObject['liveWeighingUpdateInterval']);
|
|
555
|
+
}());
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
if('liveWeighingUsesStableStatus' in jsonObject)
|
|
559
|
+
{
|
|
560
|
+
model.liveWeighingUsesStableStatus = (function(){
|
|
561
|
+
if(jsonObject['liveWeighingUsesStableStatus'] === null)
|
|
562
|
+
{
|
|
563
|
+
return null;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
if(typeof jsonObject['liveWeighingUsesStableStatus'] !== 'boolean')
|
|
567
|
+
{
|
|
568
|
+
return Boolean(jsonObject['liveWeighingUsesStableStatus']);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
return jsonObject['liveWeighingUsesStableStatus'];
|
|
572
|
+
}());
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
if('incorrectOperationTolerance' in jsonObject)
|
|
576
|
+
{
|
|
577
|
+
model.incorrectOperationTolerance = (function(){
|
|
578
|
+
if(jsonObject['incorrectOperationTolerance'] === null)
|
|
579
|
+
{
|
|
580
|
+
return null;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
if(typeof jsonObject['incorrectOperationTolerance'] !== 'number')
|
|
281
584
|
{
|
|
282
|
-
return Number
|
|
585
|
+
return Number(jsonObject['incorrectOperationTolerance']);
|
|
283
586
|
}
|
|
284
587
|
|
|
285
|
-
return
|
|
588
|
+
return jsonObject['incorrectOperationTolerance'];
|
|
286
589
|
}());
|
|
287
590
|
}
|
|
288
591
|
|
|
@@ -19,8 +19,9 @@ class RejectBinWeightModel extends BaseModel
|
|
|
19
19
|
* RejectBinWeightModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Reject Bin Weight
|
|
22
23
|
*/
|
|
23
|
-
constructor()
|
|
24
|
+
constructor(siteId)
|
|
24
25
|
{
|
|
25
26
|
super();
|
|
26
27
|
|
|
@@ -103,6 +104,14 @@ class RejectBinWeightModel extends BaseModel
|
|
|
103
104
|
* @public
|
|
104
105
|
*/
|
|
105
106
|
this.updateTimestamp = undefined;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The Site ID associated with this Reject Bin Weight
|
|
110
|
+
*
|
|
111
|
+
* @type {number}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.siteId = siteId;
|
|
106
115
|
}
|
|
107
116
|
|
|
108
117
|
/**
|
|
@@ -111,11 +120,12 @@ class RejectBinWeightModel extends BaseModel
|
|
|
111
120
|
* @static
|
|
112
121
|
* @public
|
|
113
122
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
123
|
+
* @param {number} siteId The Site ID associated with this Reject Bin Weight
|
|
114
124
|
* @return {RejectBinWeightModel}
|
|
115
125
|
*/
|
|
116
|
-
static fromJSON(json)
|
|
126
|
+
static fromJSON(json, siteId)
|
|
117
127
|
{
|
|
118
|
-
let model = new RejectBinWeightModel();
|
|
128
|
+
let model = new RejectBinWeightModel(siteId);
|
|
119
129
|
|
|
120
130
|
/**
|
|
121
131
|
* The JSON Object
|
|
@@ -19,8 +19,9 @@ class ShiftFocusMeetingModel extends BaseModel
|
|
|
19
19
|
* ShiftFocusMeetingModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Shift Focus Meeting
|
|
22
23
|
*/
|
|
23
|
-
constructor()
|
|
24
|
+
constructor(siteId)
|
|
24
25
|
{
|
|
25
26
|
super();
|
|
26
27
|
|
|
@@ -119,6 +120,14 @@ class ShiftFocusMeetingModel extends BaseModel
|
|
|
119
120
|
* @public
|
|
120
121
|
*/
|
|
121
122
|
this.updateTimestamp = undefined;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The Site ID associated with this Shift Focus Meeting
|
|
126
|
+
*
|
|
127
|
+
* @type {number}
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
this.siteId = siteId;
|
|
122
131
|
}
|
|
123
132
|
|
|
124
133
|
/**
|
|
@@ -127,11 +136,12 @@ class ShiftFocusMeetingModel extends BaseModel
|
|
|
127
136
|
* @static
|
|
128
137
|
* @public
|
|
129
138
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
139
|
+
* @param {number} siteId The Site ID associated with this Shift Focus Meeting
|
|
130
140
|
* @return {ShiftFocusMeetingModel}
|
|
131
141
|
*/
|
|
132
|
-
static fromJSON(json)
|
|
142
|
+
static fromJSON(json, siteId)
|
|
133
143
|
{
|
|
134
|
-
let model = new ShiftFocusMeetingModel();
|
|
144
|
+
let model = new ShiftFocusMeetingModel(siteId);
|
|
135
145
|
|
|
136
146
|
/**
|
|
137
147
|
* The JSON Object
|
|
@@ -19,8 +19,9 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
19
19
|
* ShiftHourlyEntryModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Shift Hourly Entry
|
|
22
23
|
*/
|
|
23
|
-
constructor()
|
|
24
|
+
constructor(siteId)
|
|
24
25
|
{
|
|
25
26
|
super();
|
|
26
27
|
|
|
@@ -319,6 +320,14 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
319
320
|
* @public
|
|
320
321
|
*/
|
|
321
322
|
this.updateTimestamp = undefined;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* The Site ID associated with this Shift Hourly Entry
|
|
326
|
+
*
|
|
327
|
+
* @type {number}
|
|
328
|
+
* @public
|
|
329
|
+
*/
|
|
330
|
+
this.siteId = siteId;
|
|
322
331
|
}
|
|
323
332
|
|
|
324
333
|
/**
|
|
@@ -327,11 +336,12 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
327
336
|
* @static
|
|
328
337
|
* @public
|
|
329
338
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
339
|
+
* @param {number} siteId The Site ID associated with this Shift Hourly Entry
|
|
330
340
|
* @return {ShiftHourlyEntryModel}
|
|
331
341
|
*/
|
|
332
|
-
static fromJSON(json)
|
|
342
|
+
static fromJSON(json, siteId)
|
|
333
343
|
{
|
|
334
|
-
let model = new ShiftHourlyEntryModel();
|
|
344
|
+
let model = new ShiftHourlyEntryModel(siteId);
|
|
335
345
|
|
|
336
346
|
/**
|
|
337
347
|
* The JSON Object
|
|
@@ -19,8 +19,9 @@ class ShiftModel extends BaseModel
|
|
|
19
19
|
* ShiftModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Shift
|
|
22
23
|
*/
|
|
23
|
-
constructor()
|
|
24
|
+
constructor(siteId)
|
|
24
25
|
{
|
|
25
26
|
super();
|
|
26
27
|
|
|
@@ -175,6 +176,14 @@ class ShiftModel extends BaseModel
|
|
|
175
176
|
* @public
|
|
176
177
|
*/
|
|
177
178
|
this.updateTimestamp = undefined;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The Site ID associated with this Shift
|
|
182
|
+
*
|
|
183
|
+
* @type {number}
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
this.siteId = siteId;
|
|
178
187
|
}
|
|
179
188
|
|
|
180
189
|
/**
|
|
@@ -183,11 +192,12 @@ class ShiftModel extends BaseModel
|
|
|
183
192
|
* @static
|
|
184
193
|
* @public
|
|
185
194
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
195
|
+
* @param {number} siteId The Site ID associated with this Shift
|
|
186
196
|
* @return {ShiftModel}
|
|
187
197
|
*/
|
|
188
|
-
static fromJSON(json)
|
|
198
|
+
static fromJSON(json, siteId)
|
|
189
199
|
{
|
|
190
|
-
let model = new ShiftModel();
|
|
200
|
+
let model = new ShiftModel(siteId);
|
|
191
201
|
|
|
192
202
|
/**
|
|
193
203
|
* The JSON Object
|