@ricado/api-client 2.3.16 → 2.3.18

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.
Files changed (79) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Integrations/ExternalShiftManagementController.js +76 -0
  3. package/lib/Controllers/Packhouse/Integrations/index.js +25 -0
  4. package/lib/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +198 -0
  5. package/lib/Controllers/Packhouse/Site/BinTipBinController.js +14 -2
  6. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +186 -2
  7. package/lib/Controllers/Packhouse/Site/CompacSizerBinWeightController.js +959 -0
  8. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +89 -15
  9. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +1 -1
  10. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +35 -4
  11. package/lib/Controllers/Packhouse/Site/MAFSizerController.js +101 -19
  12. package/lib/Controllers/Packhouse/Site/PackingLineController.js +435 -23
  13. package/lib/Controllers/Packhouse/Site/PackrunController.js +11 -2
  14. package/lib/Controllers/Packhouse/Site/RejectBinController.js +38 -2
  15. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +52 -6
  16. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +70 -4
  17. package/lib/Controllers/Packhouse/Site/ShiftController.js +1 -1
  18. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
  19. package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +2 -2
  20. package/lib/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +14 -2
  21. package/lib/Controllers/Packhouse/Site/index.js +6 -0
  22. package/lib/Controllers/Packhouse/index.js +5 -2
  23. package/lib/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +263 -0
  24. package/lib/Models/Packhouse/Site/BinTipBinModel.js +75 -5
  25. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +1276 -5
  26. package/lib/Models/Packhouse/Site/CompacSizerBinWeightModel.js +627 -0
  27. package/lib/Models/Packhouse/Site/CompacSizerModel.js +966 -72
  28. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +260 -8
  29. package/lib/Models/Packhouse/Site/MAFSizerModel.js +660 -85
  30. package/lib/Models/Packhouse/Site/PackingLineModel.js +3860 -551
  31. package/lib/Models/Packhouse/Site/PackrunModel.js +26 -4
  32. package/lib/Models/Packhouse/Site/RejectBinModel.js +214 -4
  33. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +576 -14
  34. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +113 -9
  35. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +98 -0
  36. package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +50 -5
  37. package/lib/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +75 -5
  38. package/lib/Models/Packhouse/Site/index.js +6 -0
  39. package/lib/PackageVersion.js +1 -1
  40. package/lib/index.d.ts +6146 -2111
  41. package/package.json +1 -1
  42. package/src/Controllers/Packhouse/Integrations/ExternalShiftManagementController.js +58 -0
  43. package/src/Controllers/Packhouse/Integrations/index.js +16 -0
  44. package/src/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +175 -0
  45. package/src/Controllers/Packhouse/Site/BinTipBinController.js +14 -2
  46. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +186 -2
  47. package/src/Controllers/Packhouse/Site/CompacSizerBinWeightController.js +1090 -0
  48. package/src/Controllers/Packhouse/Site/CompacSizerController.js +89 -15
  49. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +1 -1
  50. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +35 -4
  51. package/src/Controllers/Packhouse/Site/MAFSizerController.js +101 -19
  52. package/src/Controllers/Packhouse/Site/PackingLineController.js +435 -23
  53. package/src/Controllers/Packhouse/Site/PackrunController.js +11 -2
  54. package/src/Controllers/Packhouse/Site/RejectBinController.js +38 -2
  55. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +52 -6
  56. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +70 -4
  57. package/src/Controllers/Packhouse/Site/ShiftController.js +1 -1
  58. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
  59. package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +2 -2
  60. package/src/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +14 -2
  61. package/src/Controllers/Packhouse/Site/index.js +4 -0
  62. package/src/Controllers/Packhouse/index.js +2 -0
  63. package/src/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +252 -0
  64. package/src/Models/Packhouse/Site/BinTipBinModel.js +97 -5
  65. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +1682 -5
  66. package/src/Models/Packhouse/Site/CompacSizerBinWeightModel.js +715 -0
  67. package/src/Models/Packhouse/Site/CompacSizerModel.js +1319 -109
  68. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +339 -8
  69. package/src/Models/Packhouse/Site/MAFSizerModel.js +869 -92
  70. package/src/Models/Packhouse/Site/PackingLineModel.js +5086 -671
  71. package/src/Models/Packhouse/Site/PackrunModel.js +33 -4
  72. package/src/Models/Packhouse/Site/RejectBinModel.js +280 -4
  73. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +775 -15
  74. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +147 -10
  75. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +120 -0
  76. package/src/Models/Packhouse/Site/SoftSortBeltModel.js +65 -5
  77. package/src/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +97 -5
  78. package/src/Models/Packhouse/Site/index.js +4 -0
  79. package/src/PackageVersion.js +1 -1
@@ -50,65 +50,101 @@ class MAFSizerModel extends BaseModel
50
50
  this.name = "";
51
51
 
52
52
  /**
53
- * The Lanes defined for this MAF Sizer
53
+ * The Packing Line ID that manages this MAF Sizer
54
54
  *
55
- * @type {Object[]}
55
+ * @type {string}
56
56
  * @public
57
57
  */
58
- this.lanes = [];
58
+ this.packingLineId = "";
59
59
 
60
60
  /**
61
- * The Points used by this MAF Sizer
61
+ * The Sizer Type
62
62
  *
63
- * @type {Object}
63
+ * @type {string}
64
64
  * @public
65
65
  */
66
- this.points = {}
66
+ this.sizerType = "";
67
67
 
68
68
  /**
69
- * The Outlets defined for this MAF Sizer
69
+ * The Auto Create Batch Delay in Seconds for this MAF Sizer
70
70
  *
71
- * @type {Object[]}
71
+ * @type {number}
72
72
  * @public
73
73
  */
74
- this.outlets = [];
74
+ this.autoCreateBatchDelay = 0;
75
75
 
76
76
  /**
77
- * The Sizer Type
77
+ * The Points used by this MAF Sizer
78
78
  *
79
- * @type {string}
79
+ * @type {{currentBatchId: number, currentBatchName: number, currentBatchGrowerCode: number, currentBatchGrowerName: number, currentBatchVarietyCode: number, currentBatchVarietyName: number, machineAverageFruitWeight: number, machineAverageFruitSize: number, machineCupFill: number, machineRecycledFruitPerMinute: number, machineTotalFruitPerMinute: number, machineTraysPerHour: number, machineTonnesPerHour: number, machineRodsPerMinute: number, outletGroupSummaries: number, packTypeOutletUtilizationTargets: number}}
80
80
  * @public
81
81
  */
82
- this.sizerType = "";
82
+ this.points = (function(){
83
+ let pointsDefaultValue = {};
84
+
85
+ pointsDefaultValue.currentBatchId = 0;
86
+
87
+ pointsDefaultValue.currentBatchName = 0;
88
+
89
+ pointsDefaultValue.currentBatchGrowerCode = 0;
90
+
91
+ pointsDefaultValue.currentBatchGrowerName = 0;
92
+
93
+ pointsDefaultValue.currentBatchVarietyCode = 0;
94
+
95
+ pointsDefaultValue.currentBatchVarietyName = 0;
96
+
97
+ pointsDefaultValue.machineAverageFruitWeight = 0;
98
+
99
+ pointsDefaultValue.machineAverageFruitSize = 0;
100
+
101
+ pointsDefaultValue.machineCupFill = 0;
102
+
103
+ pointsDefaultValue.machineRecycledFruitPerMinute = 0;
104
+
105
+ pointsDefaultValue.machineTotalFruitPerMinute = 0;
106
+
107
+ pointsDefaultValue.machineTraysPerHour = 0;
108
+
109
+ pointsDefaultValue.machineTonnesPerHour = 0;
110
+
111
+ pointsDefaultValue.machineRodsPerMinute = 0;
112
+
113
+ pointsDefaultValue.outletGroupSummaries = 0;
114
+
115
+ pointsDefaultValue.packTypeOutletUtilizationTargets = 0;
116
+
117
+ return pointsDefaultValue;
118
+ }());
83
119
 
84
120
  /**
85
- * The Auto Create Batch Delay in Seconds for this MAF Sizer
121
+ * The Lanes defined for this MAF Sizer
86
122
  *
87
- * @type {number}
123
+ * @type {Array<{id: string, number: number, points: {cupFill: number}}>}
88
124
  * @public
89
125
  */
90
- this.autoCreateBatchDelay = 0;
126
+ this.lanes = [];
91
127
 
92
128
  /**
93
- * The Fruit Sizes defined and handled by this MAF Sizer
129
+ * The Outlets defined for this MAF Sizer
94
130
  *
95
- * @type {Object[]}
131
+ * @type {Array<{id: string, number: number, type: string, points: {name: number, fruitPerMinute: number, articleName: number, utilization: number}}>}
96
132
  * @public
97
133
  */
98
- this.fruitSizes = [];
134
+ this.outlets = [];
99
135
 
100
136
  /**
101
- * The Packing Line ID that manages this MAF Sizer
137
+ * The Fruit Sizes defined and handled by this MAF Sizer
102
138
  *
103
- * @type {string}
139
+ * @type {Array<{fruitSize: string, points: {incomingFruitPerMinute: number, recycledFruitPerMinute: number, allocatedFruitPerMinute: number}}>}
104
140
  * @public
105
141
  */
106
- this.packingLineId = "";
142
+ this.fruitSizes = [];
107
143
 
108
144
  /**
109
145
  * The FreshPack Integration Configuration for this MAF Sizer
110
146
  *
111
- * @type {?Object}
147
+ * @type {?{points: Object, enabled: boolean, materialGroupId: number, binTypeId: number, bulkWeightClassTypes: string[]}}
112
148
  * @public
113
149
  */
114
150
  this.freshPackIntegration = null;
@@ -116,7 +152,7 @@ class MAFSizerModel extends BaseModel
116
152
  /**
117
153
  * The MAF Integration Configuration for this MAF Sizer
118
154
  *
119
- * @type {?Object}
155
+ * @type {?{points: {stopBatchRequired: number}, enabled: boolean, sizerNumber: number, dumpSizerName: string, statSizerName: string}}
120
156
  * @public
121
157
  */
122
158
  this.mafIntegration = null;
@@ -124,7 +160,7 @@ class MAFSizerModel extends BaseModel
124
160
  /**
125
161
  * An Array of Sources that deliver Fruit to this MAF Sizer
126
162
  *
127
- * @type {Object[]}
163
+ * @type {{type: string, riserId: string}|{type: string, sizerId: string, outletNumbers: number[]}[]}
128
164
  * @public
129
165
  */
130
166
  this.sources = [];
@@ -132,7 +168,7 @@ class MAFSizerModel extends BaseModel
132
168
  /**
133
169
  * An Array of Article to Class Type Maps for this MAF Sizer
134
170
  *
135
- * @type {Object[]}
171
+ * @type {Array<{articleName: string, classType: string}>}
136
172
  * @public
137
173
  */
138
174
  this.articleClassTypes = [];
@@ -232,114 +268,649 @@ class MAFSizerModel extends BaseModel
232
268
  }());
233
269
  }
234
270
 
235
- if('lanes' in jsonObject)
271
+ if('packingLineId' in jsonObject)
236
272
  {
237
- model.lanes = (function(){
238
- if(Array.isArray(jsonObject['lanes']) !== true)
273
+ model.packingLineId = (function(){
274
+ if(typeof jsonObject['packingLineId'] !== 'string')
239
275
  {
240
- return [];
276
+ return String(jsonObject['packingLineId']);
241
277
  }
242
278
 
243
- return jsonObject['lanes'].map((lanesItem) => {
244
- return (function(){
245
- if(typeof lanesItem !== 'object')
246
- {
247
- return Object(lanesItem);
248
- }
279
+ return jsonObject['packingLineId'];
280
+ }());
281
+ }
249
282
 
250
- return lanesItem;
251
- }());
252
- });
283
+ if('sizerType' in jsonObject)
284
+ {
285
+ model.sizerType = (function(){
286
+ if(typeof jsonObject['sizerType'] !== 'string')
287
+ {
288
+ return String(jsonObject['sizerType']);
289
+ }
290
+
291
+ return jsonObject['sizerType'];
253
292
  }());
254
293
  }
255
294
 
256
- if('points' in jsonObject)
295
+ if('autoCreateBatchDelay' in jsonObject)
257
296
  {
258
- model.points = (function(){
259
- if(typeof jsonObject['points'] !== 'object')
297
+ model.autoCreateBatchDelay = (function(){
298
+ if(typeof jsonObject['autoCreateBatchDelay'] !== 'number')
260
299
  {
261
- return Object(jsonObject['points']);
300
+ return Number.isInteger(Number(jsonObject['autoCreateBatchDelay'])) ? Number(jsonObject['autoCreateBatchDelay']) : Math.floor(Number(jsonObject['autoCreateBatchDelay']));
262
301
  }
263
302
 
264
- return jsonObject['points'];
303
+ return Number.isInteger(jsonObject['autoCreateBatchDelay']) ? jsonObject['autoCreateBatchDelay'] : Math.floor(jsonObject['autoCreateBatchDelay']);
265
304
  }());
266
305
  }
267
306
 
268
- if('outlets' in jsonObject)
307
+ if('points' in jsonObject)
269
308
  {
270
- model.outlets = (function(){
271
- if(Array.isArray(jsonObject['outlets']) !== true)
309
+ model.points = (function(){
310
+ let pointsObject = {};
311
+
312
+ if(typeof jsonObject['points'] === 'object' && 'currentBatchId' in jsonObject['points'])
272
313
  {
273
- return [];
314
+ pointsObject.currentBatchId = (function(){
315
+ if(typeof jsonObject['points'].currentBatchId !== 'number')
316
+ {
317
+ return Number.isInteger(Number(jsonObject['points'].currentBatchId)) ? Number(jsonObject['points'].currentBatchId) : Math.floor(Number(jsonObject['points'].currentBatchId));
318
+ }
319
+
320
+ return Number.isInteger(jsonObject['points'].currentBatchId) ? jsonObject['points'].currentBatchId : Math.floor(jsonObject['points'].currentBatchId);
321
+ }());
274
322
  }
323
+ else
324
+ {
325
+ pointsObject.currentBatchId = 0;
326
+ }
327
+
328
+ if(typeof jsonObject['points'] === 'object' && 'currentBatchName' in jsonObject['points'])
329
+ {
330
+ pointsObject.currentBatchName = (function(){
331
+ if(typeof jsonObject['points'].currentBatchName !== 'number')
332
+ {
333
+ return Number.isInteger(Number(jsonObject['points'].currentBatchName)) ? Number(jsonObject['points'].currentBatchName) : Math.floor(Number(jsonObject['points'].currentBatchName));
334
+ }
275
335
 
276
- return jsonObject['outlets'].map((outletsItem) => {
277
- return (function(){
278
- if(typeof outletsItem !== 'object')
336
+ return Number.isInteger(jsonObject['points'].currentBatchName) ? jsonObject['points'].currentBatchName : Math.floor(jsonObject['points'].currentBatchName);
337
+ }());
338
+ }
339
+ else
340
+ {
341
+ pointsObject.currentBatchName = 0;
342
+ }
343
+
344
+ if(typeof jsonObject['points'] === 'object' && 'currentBatchGrowerCode' in jsonObject['points'])
345
+ {
346
+ pointsObject.currentBatchGrowerCode = (function(){
347
+ if(typeof jsonObject['points'].currentBatchGrowerCode !== 'number')
279
348
  {
280
- return Object(outletsItem);
349
+ return Number.isInteger(Number(jsonObject['points'].currentBatchGrowerCode)) ? Number(jsonObject['points'].currentBatchGrowerCode) : Math.floor(Number(jsonObject['points'].currentBatchGrowerCode));
281
350
  }
282
351
 
283
- return outletsItem;
352
+ return Number.isInteger(jsonObject['points'].currentBatchGrowerCode) ? jsonObject['points'].currentBatchGrowerCode : Math.floor(jsonObject['points'].currentBatchGrowerCode);
284
353
  }());
285
- });
286
- }());
287
- }
354
+ }
355
+ else
356
+ {
357
+ pointsObject.currentBatchGrowerCode = 0;
358
+ }
359
+
360
+ if(typeof jsonObject['points'] === 'object' && 'currentBatchGrowerName' in jsonObject['points'])
361
+ {
362
+ pointsObject.currentBatchGrowerName = (function(){
363
+ if(typeof jsonObject['points'].currentBatchGrowerName !== 'number')
364
+ {
365
+ return Number.isInteger(Number(jsonObject['points'].currentBatchGrowerName)) ? Number(jsonObject['points'].currentBatchGrowerName) : Math.floor(Number(jsonObject['points'].currentBatchGrowerName));
366
+ }
288
367
 
289
- if('sizerType' in jsonObject)
290
- {
291
- model.sizerType = (function(){
292
- if(typeof jsonObject['sizerType'] !== 'string')
368
+ return Number.isInteger(jsonObject['points'].currentBatchGrowerName) ? jsonObject['points'].currentBatchGrowerName : Math.floor(jsonObject['points'].currentBatchGrowerName);
369
+ }());
370
+ }
371
+ else
293
372
  {
294
- return String(jsonObject['sizerType']);
373
+ pointsObject.currentBatchGrowerName = 0;
295
374
  }
375
+
376
+ if(typeof jsonObject['points'] === 'object' && 'currentBatchVarietyCode' in jsonObject['points'])
377
+ {
378
+ pointsObject.currentBatchVarietyCode = (function(){
379
+ if(typeof jsonObject['points'].currentBatchVarietyCode !== 'number')
380
+ {
381
+ return Number.isInteger(Number(jsonObject['points'].currentBatchVarietyCode)) ? Number(jsonObject['points'].currentBatchVarietyCode) : Math.floor(Number(jsonObject['points'].currentBatchVarietyCode));
382
+ }
296
383
 
297
- return jsonObject['sizerType'];
384
+ return Number.isInteger(jsonObject['points'].currentBatchVarietyCode) ? jsonObject['points'].currentBatchVarietyCode : Math.floor(jsonObject['points'].currentBatchVarietyCode);
385
+ }());
386
+ }
387
+ else
388
+ {
389
+ pointsObject.currentBatchVarietyCode = 0;
390
+ }
391
+
392
+ if(typeof jsonObject['points'] === 'object' && 'currentBatchVarietyName' in jsonObject['points'])
393
+ {
394
+ pointsObject.currentBatchVarietyName = (function(){
395
+ if(typeof jsonObject['points'].currentBatchVarietyName !== 'number')
396
+ {
397
+ return Number.isInteger(Number(jsonObject['points'].currentBatchVarietyName)) ? Number(jsonObject['points'].currentBatchVarietyName) : Math.floor(Number(jsonObject['points'].currentBatchVarietyName));
398
+ }
399
+
400
+ return Number.isInteger(jsonObject['points'].currentBatchVarietyName) ? jsonObject['points'].currentBatchVarietyName : Math.floor(jsonObject['points'].currentBatchVarietyName);
401
+ }());
402
+ }
403
+ else
404
+ {
405
+ pointsObject.currentBatchVarietyName = 0;
406
+ }
407
+
408
+ if(typeof jsonObject['points'] === 'object' && 'machineAverageFruitWeight' in jsonObject['points'])
409
+ {
410
+ pointsObject.machineAverageFruitWeight = (function(){
411
+ if(typeof jsonObject['points'].machineAverageFruitWeight !== 'number')
412
+ {
413
+ return Number.isInteger(Number(jsonObject['points'].machineAverageFruitWeight)) ? Number(jsonObject['points'].machineAverageFruitWeight) : Math.floor(Number(jsonObject['points'].machineAverageFruitWeight));
414
+ }
415
+
416
+ return Number.isInteger(jsonObject['points'].machineAverageFruitWeight) ? jsonObject['points'].machineAverageFruitWeight : Math.floor(jsonObject['points'].machineAverageFruitWeight);
417
+ }());
418
+ }
419
+ else
420
+ {
421
+ pointsObject.machineAverageFruitWeight = 0;
422
+ }
423
+
424
+ if(typeof jsonObject['points'] === 'object' && 'machineAverageFruitSize' in jsonObject['points'])
425
+ {
426
+ pointsObject.machineAverageFruitSize = (function(){
427
+ if(typeof jsonObject['points'].machineAverageFruitSize !== 'number')
428
+ {
429
+ return Number.isInteger(Number(jsonObject['points'].machineAverageFruitSize)) ? Number(jsonObject['points'].machineAverageFruitSize) : Math.floor(Number(jsonObject['points'].machineAverageFruitSize));
430
+ }
431
+
432
+ return Number.isInteger(jsonObject['points'].machineAverageFruitSize) ? jsonObject['points'].machineAverageFruitSize : Math.floor(jsonObject['points'].machineAverageFruitSize);
433
+ }());
434
+ }
435
+ else
436
+ {
437
+ pointsObject.machineAverageFruitSize = 0;
438
+ }
439
+
440
+ if(typeof jsonObject['points'] === 'object' && 'machineCupFill' in jsonObject['points'])
441
+ {
442
+ pointsObject.machineCupFill = (function(){
443
+ if(typeof jsonObject['points'].machineCupFill !== 'number')
444
+ {
445
+ return Number.isInteger(Number(jsonObject['points'].machineCupFill)) ? Number(jsonObject['points'].machineCupFill) : Math.floor(Number(jsonObject['points'].machineCupFill));
446
+ }
447
+
448
+ return Number.isInteger(jsonObject['points'].machineCupFill) ? jsonObject['points'].machineCupFill : Math.floor(jsonObject['points'].machineCupFill);
449
+ }());
450
+ }
451
+ else
452
+ {
453
+ pointsObject.machineCupFill = 0;
454
+ }
455
+
456
+ if(typeof jsonObject['points'] === 'object' && 'machineRecycledFruitPerMinute' in jsonObject['points'])
457
+ {
458
+ pointsObject.machineRecycledFruitPerMinute = (function(){
459
+ if(typeof jsonObject['points'].machineRecycledFruitPerMinute !== 'number')
460
+ {
461
+ return Number.isInteger(Number(jsonObject['points'].machineRecycledFruitPerMinute)) ? Number(jsonObject['points'].machineRecycledFruitPerMinute) : Math.floor(Number(jsonObject['points'].machineRecycledFruitPerMinute));
462
+ }
463
+
464
+ return Number.isInteger(jsonObject['points'].machineRecycledFruitPerMinute) ? jsonObject['points'].machineRecycledFruitPerMinute : Math.floor(jsonObject['points'].machineRecycledFruitPerMinute);
465
+ }());
466
+ }
467
+ else
468
+ {
469
+ pointsObject.machineRecycledFruitPerMinute = 0;
470
+ }
471
+
472
+ if(typeof jsonObject['points'] === 'object' && 'machineTotalFruitPerMinute' in jsonObject['points'])
473
+ {
474
+ pointsObject.machineTotalFruitPerMinute = (function(){
475
+ if(typeof jsonObject['points'].machineTotalFruitPerMinute !== 'number')
476
+ {
477
+ return Number.isInteger(Number(jsonObject['points'].machineTotalFruitPerMinute)) ? Number(jsonObject['points'].machineTotalFruitPerMinute) : Math.floor(Number(jsonObject['points'].machineTotalFruitPerMinute));
478
+ }
479
+
480
+ return Number.isInteger(jsonObject['points'].machineTotalFruitPerMinute) ? jsonObject['points'].machineTotalFruitPerMinute : Math.floor(jsonObject['points'].machineTotalFruitPerMinute);
481
+ }());
482
+ }
483
+ else
484
+ {
485
+ pointsObject.machineTotalFruitPerMinute = 0;
486
+ }
487
+
488
+ if(typeof jsonObject['points'] === 'object' && 'machineTraysPerHour' in jsonObject['points'])
489
+ {
490
+ pointsObject.machineTraysPerHour = (function(){
491
+ if(typeof jsonObject['points'].machineTraysPerHour !== 'number')
492
+ {
493
+ return Number.isInteger(Number(jsonObject['points'].machineTraysPerHour)) ? Number(jsonObject['points'].machineTraysPerHour) : Math.floor(Number(jsonObject['points'].machineTraysPerHour));
494
+ }
495
+
496
+ return Number.isInteger(jsonObject['points'].machineTraysPerHour) ? jsonObject['points'].machineTraysPerHour : Math.floor(jsonObject['points'].machineTraysPerHour);
497
+ }());
498
+ }
499
+ else
500
+ {
501
+ pointsObject.machineTraysPerHour = 0;
502
+ }
503
+
504
+ if(typeof jsonObject['points'] === 'object' && 'machineTonnesPerHour' in jsonObject['points'])
505
+ {
506
+ pointsObject.machineTonnesPerHour = (function(){
507
+ if(typeof jsonObject['points'].machineTonnesPerHour !== 'number')
508
+ {
509
+ return Number.isInteger(Number(jsonObject['points'].machineTonnesPerHour)) ? Number(jsonObject['points'].machineTonnesPerHour) : Math.floor(Number(jsonObject['points'].machineTonnesPerHour));
510
+ }
511
+
512
+ return Number.isInteger(jsonObject['points'].machineTonnesPerHour) ? jsonObject['points'].machineTonnesPerHour : Math.floor(jsonObject['points'].machineTonnesPerHour);
513
+ }());
514
+ }
515
+ else
516
+ {
517
+ pointsObject.machineTonnesPerHour = 0;
518
+ }
519
+
520
+ if(typeof jsonObject['points'] === 'object' && 'machineRodsPerMinute' in jsonObject['points'])
521
+ {
522
+ pointsObject.machineRodsPerMinute = (function(){
523
+ if(typeof jsonObject['points'].machineRodsPerMinute !== 'number')
524
+ {
525
+ return Number.isInteger(Number(jsonObject['points'].machineRodsPerMinute)) ? Number(jsonObject['points'].machineRodsPerMinute) : Math.floor(Number(jsonObject['points'].machineRodsPerMinute));
526
+ }
527
+
528
+ return Number.isInteger(jsonObject['points'].machineRodsPerMinute) ? jsonObject['points'].machineRodsPerMinute : Math.floor(jsonObject['points'].machineRodsPerMinute);
529
+ }());
530
+ }
531
+ else
532
+ {
533
+ pointsObject.machineRodsPerMinute = 0;
534
+ }
535
+
536
+ if(typeof jsonObject['points'] === 'object' && 'outletGroupSummaries' in jsonObject['points'])
537
+ {
538
+ pointsObject.outletGroupSummaries = (function(){
539
+ if(typeof jsonObject['points'].outletGroupSummaries !== 'number')
540
+ {
541
+ return Number.isInteger(Number(jsonObject['points'].outletGroupSummaries)) ? Number(jsonObject['points'].outletGroupSummaries) : Math.floor(Number(jsonObject['points'].outletGroupSummaries));
542
+ }
543
+
544
+ return Number.isInteger(jsonObject['points'].outletGroupSummaries) ? jsonObject['points'].outletGroupSummaries : Math.floor(jsonObject['points'].outletGroupSummaries);
545
+ }());
546
+ }
547
+ else
548
+ {
549
+ pointsObject.outletGroupSummaries = 0;
550
+ }
551
+
552
+ if(typeof jsonObject['points'] === 'object' && 'packTypeOutletUtilizationTargets' in jsonObject['points'])
553
+ {
554
+ pointsObject.packTypeOutletUtilizationTargets = (function(){
555
+ if(typeof jsonObject['points'].packTypeOutletUtilizationTargets !== 'number')
556
+ {
557
+ return Number.isInteger(Number(jsonObject['points'].packTypeOutletUtilizationTargets)) ? Number(jsonObject['points'].packTypeOutletUtilizationTargets) : Math.floor(Number(jsonObject['points'].packTypeOutletUtilizationTargets));
558
+ }
559
+
560
+ return Number.isInteger(jsonObject['points'].packTypeOutletUtilizationTargets) ? jsonObject['points'].packTypeOutletUtilizationTargets : Math.floor(jsonObject['points'].packTypeOutletUtilizationTargets);
561
+ }());
562
+ }
563
+ else
564
+ {
565
+ pointsObject.packTypeOutletUtilizationTargets = 0;
566
+ }
567
+
568
+ return pointsObject;
298
569
  }());
299
570
  }
300
571
 
301
- if('autoCreateBatchDelay' in jsonObject)
572
+ if('lanes' in jsonObject)
302
573
  {
303
- model.autoCreateBatchDelay = (function(){
304
- if(typeof jsonObject['autoCreateBatchDelay'] !== 'number')
574
+ model.lanes = (function(){
575
+ if(Array.isArray(jsonObject['lanes']) !== true)
305
576
  {
306
- return Number.isInteger(Number(jsonObject['autoCreateBatchDelay'])) ? Number(jsonObject['autoCreateBatchDelay']) : Math.floor(Number(jsonObject['autoCreateBatchDelay']));
577
+ return [];
307
578
  }
308
579
 
309
- return Number.isInteger(jsonObject['autoCreateBatchDelay']) ? jsonObject['autoCreateBatchDelay'] : Math.floor(jsonObject['autoCreateBatchDelay']);
580
+ return jsonObject['lanes'].map((lanesItem) => {
581
+ return (function(){
582
+ let lanesItemObject = {};
583
+
584
+ if(typeof lanesItem === 'object' && 'id' in lanesItem)
585
+ {
586
+ lanesItemObject.id = (function(){
587
+ if(typeof lanesItem.id !== 'string')
588
+ {
589
+ return String(lanesItem.id);
590
+ }
591
+
592
+ return lanesItem.id;
593
+ }());
594
+ }
595
+ else
596
+ {
597
+ lanesItemObject.id = "";
598
+ }
599
+
600
+ if(typeof lanesItem === 'object' && 'number' in lanesItem)
601
+ {
602
+ lanesItemObject.number = (function(){
603
+ if(typeof lanesItem.number !== 'number')
604
+ {
605
+ return Number.isInteger(Number(lanesItem.number)) ? Number(lanesItem.number) : Math.floor(Number(lanesItem.number));
606
+ }
607
+
608
+ return Number.isInteger(lanesItem.number) ? lanesItem.number : Math.floor(lanesItem.number);
609
+ }());
610
+ }
611
+ else
612
+ {
613
+ lanesItemObject.number = 0;
614
+ }
615
+
616
+ if(typeof lanesItem === 'object' && 'points' in lanesItem)
617
+ {
618
+ lanesItemObject.points = (function(){
619
+ let pointsObject = {};
620
+
621
+ if(typeof lanesItem.points === 'object' && 'cupFill' in lanesItem.points)
622
+ {
623
+ pointsObject.cupFill = (function(){
624
+ if(typeof lanesItem.points.cupFill !== 'number')
625
+ {
626
+ return Number.isInteger(Number(lanesItem.points.cupFill)) ? Number(lanesItem.points.cupFill) : Math.floor(Number(lanesItem.points.cupFill));
627
+ }
628
+
629
+ return Number.isInteger(lanesItem.points.cupFill) ? lanesItem.points.cupFill : Math.floor(lanesItem.points.cupFill);
630
+ }());
631
+ }
632
+ else
633
+ {
634
+ pointsObject.cupFill = 0;
635
+ }
636
+
637
+ return pointsObject;
638
+ }());
639
+ }
640
+ else
641
+ {
642
+ lanesItemObject.points = (function(){
643
+ let pointsDefaultValue = {};
644
+
645
+ pointsDefaultValue.cupFill = 0;
646
+
647
+ return pointsDefaultValue;
648
+ }());
649
+ }
650
+
651
+ return lanesItemObject;
652
+ }());
653
+ });
310
654
  }());
311
655
  }
312
656
 
313
- if('fruitSizes' in jsonObject)
657
+ if('outlets' in jsonObject)
314
658
  {
315
- model.fruitSizes = (function(){
316
- if(Array.isArray(jsonObject['fruitSizes']) !== true)
659
+ model.outlets = (function(){
660
+ if(Array.isArray(jsonObject['outlets']) !== true)
317
661
  {
318
662
  return [];
319
663
  }
320
664
 
321
- return jsonObject['fruitSizes'].map((fruitSizesItem) => {
665
+ return jsonObject['outlets'].map((outletsItem) => {
322
666
  return (function(){
323
- if(typeof fruitSizesItem !== 'object')
667
+ let outletsItemObject = {};
668
+
669
+ if(typeof outletsItem === 'object' && 'id' in outletsItem)
324
670
  {
325
- return Object(fruitSizesItem);
671
+ outletsItemObject.id = (function(){
672
+ if(typeof outletsItem.id !== 'string')
673
+ {
674
+ return String(outletsItem.id);
675
+ }
676
+
677
+ return outletsItem.id;
678
+ }());
679
+ }
680
+ else
681
+ {
682
+ outletsItemObject.id = "";
683
+ }
684
+
685
+ if(typeof outletsItem === 'object' && 'number' in outletsItem)
686
+ {
687
+ outletsItemObject.number = (function(){
688
+ if(typeof outletsItem.number !== 'number')
689
+ {
690
+ return Number.isInteger(Number(outletsItem.number)) ? Number(outletsItem.number) : Math.floor(Number(outletsItem.number));
691
+ }
692
+
693
+ return Number.isInteger(outletsItem.number) ? outletsItem.number : Math.floor(outletsItem.number);
694
+ }());
695
+ }
696
+ else
697
+ {
698
+ outletsItemObject.number = 0;
699
+ }
700
+
701
+ if(typeof outletsItem === 'object' && 'type' in outletsItem)
702
+ {
703
+ outletsItemObject.type = (function(){
704
+ if(typeof outletsItem.type !== 'string')
705
+ {
706
+ return String(outletsItem.type);
707
+ }
708
+
709
+ return outletsItem.type;
710
+ }());
711
+ }
712
+ else
713
+ {
714
+ outletsItemObject.type = "";
715
+ }
716
+
717
+ if(typeof outletsItem === 'object' && 'points' in outletsItem)
718
+ {
719
+ outletsItemObject.points = (function(){
720
+ let pointsObject = {};
721
+
722
+ if(typeof outletsItem.points === 'object' && 'name' in outletsItem.points)
723
+ {
724
+ pointsObject.name = (function(){
725
+ if(typeof outletsItem.points.name !== 'number')
726
+ {
727
+ return Number.isInteger(Number(outletsItem.points.name)) ? Number(outletsItem.points.name) : Math.floor(Number(outletsItem.points.name));
728
+ }
729
+
730
+ return Number.isInteger(outletsItem.points.name) ? outletsItem.points.name : Math.floor(outletsItem.points.name);
731
+ }());
732
+ }
733
+ else
734
+ {
735
+ pointsObject.name = 0;
736
+ }
737
+
738
+ if(typeof outletsItem.points === 'object' && 'fruitPerMinute' in outletsItem.points)
739
+ {
740
+ pointsObject.fruitPerMinute = (function(){
741
+ if(typeof outletsItem.points.fruitPerMinute !== 'number')
742
+ {
743
+ return Number.isInteger(Number(outletsItem.points.fruitPerMinute)) ? Number(outletsItem.points.fruitPerMinute) : Math.floor(Number(outletsItem.points.fruitPerMinute));
744
+ }
745
+
746
+ return Number.isInteger(outletsItem.points.fruitPerMinute) ? outletsItem.points.fruitPerMinute : Math.floor(outletsItem.points.fruitPerMinute);
747
+ }());
748
+ }
749
+ else
750
+ {
751
+ pointsObject.fruitPerMinute = 0;
752
+ }
753
+
754
+ if(typeof outletsItem.points === 'object' && 'articleName' in outletsItem.points)
755
+ {
756
+ pointsObject.articleName = (function(){
757
+ if(typeof outletsItem.points.articleName !== 'number')
758
+ {
759
+ return Number.isInteger(Number(outletsItem.points.articleName)) ? Number(outletsItem.points.articleName) : Math.floor(Number(outletsItem.points.articleName));
760
+ }
761
+
762
+ return Number.isInteger(outletsItem.points.articleName) ? outletsItem.points.articleName : Math.floor(outletsItem.points.articleName);
763
+ }());
764
+ }
765
+ else
766
+ {
767
+ pointsObject.articleName = 0;
768
+ }
769
+
770
+ if(typeof outletsItem.points === 'object' && 'utilization' in outletsItem.points)
771
+ {
772
+ pointsObject.utilization = (function(){
773
+ if(typeof outletsItem.points.utilization !== 'number')
774
+ {
775
+ return Number.isInteger(Number(outletsItem.points.utilization)) ? Number(outletsItem.points.utilization) : Math.floor(Number(outletsItem.points.utilization));
776
+ }
777
+
778
+ return Number.isInteger(outletsItem.points.utilization) ? outletsItem.points.utilization : Math.floor(outletsItem.points.utilization);
779
+ }());
780
+ }
781
+ else
782
+ {
783
+ pointsObject.utilization = 0;
784
+ }
785
+
786
+ return pointsObject;
787
+ }());
788
+ }
789
+ else
790
+ {
791
+ outletsItemObject.points = (function(){
792
+ let pointsDefaultValue = {};
793
+
794
+ pointsDefaultValue.name = 0;
795
+
796
+ pointsDefaultValue.fruitPerMinute = 0;
797
+
798
+ pointsDefaultValue.articleName = 0;
799
+
800
+ pointsDefaultValue.utilization = 0;
801
+
802
+ return pointsDefaultValue;
803
+ }());
326
804
  }
327
805
 
328
- return fruitSizesItem;
806
+ return outletsItemObject;
329
807
  }());
330
808
  });
331
809
  }());
332
810
  }
333
811
 
334
- if('packingLineId' in jsonObject)
812
+ if('fruitSizes' in jsonObject)
335
813
  {
336
- model.packingLineId = (function(){
337
- if(typeof jsonObject['packingLineId'] !== 'string')
814
+ model.fruitSizes = (function(){
815
+ if(Array.isArray(jsonObject['fruitSizes']) !== true)
338
816
  {
339
- return String(jsonObject['packingLineId']);
817
+ return [];
340
818
  }
341
819
 
342
- return jsonObject['packingLineId'];
820
+ return jsonObject['fruitSizes'].map((fruitSizesItem) => {
821
+ return (function(){
822
+ let fruitSizesItemObject = {};
823
+
824
+ if(typeof fruitSizesItem === 'object' && 'fruitSize' in fruitSizesItem)
825
+ {
826
+ fruitSizesItemObject.fruitSize = (function(){
827
+ if(typeof fruitSizesItem.fruitSize !== 'string')
828
+ {
829
+ return String(fruitSizesItem.fruitSize);
830
+ }
831
+
832
+ return fruitSizesItem.fruitSize;
833
+ }());
834
+ }
835
+ else
836
+ {
837
+ fruitSizesItemObject.fruitSize = "";
838
+ }
839
+
840
+ if(typeof fruitSizesItem === 'object' && 'points' in fruitSizesItem)
841
+ {
842
+ fruitSizesItemObject.points = (function(){
843
+ let pointsObject = {};
844
+
845
+ if(typeof fruitSizesItem.points === 'object' && 'incomingFruitPerMinute' in fruitSizesItem.points)
846
+ {
847
+ pointsObject.incomingFruitPerMinute = (function(){
848
+ if(typeof fruitSizesItem.points.incomingFruitPerMinute !== 'number')
849
+ {
850
+ return Number.isInteger(Number(fruitSizesItem.points.incomingFruitPerMinute)) ? Number(fruitSizesItem.points.incomingFruitPerMinute) : Math.floor(Number(fruitSizesItem.points.incomingFruitPerMinute));
851
+ }
852
+
853
+ return Number.isInteger(fruitSizesItem.points.incomingFruitPerMinute) ? fruitSizesItem.points.incomingFruitPerMinute : Math.floor(fruitSizesItem.points.incomingFruitPerMinute);
854
+ }());
855
+ }
856
+ else
857
+ {
858
+ pointsObject.incomingFruitPerMinute = 0;
859
+ }
860
+
861
+ if(typeof fruitSizesItem.points === 'object' && 'recycledFruitPerMinute' in fruitSizesItem.points)
862
+ {
863
+ pointsObject.recycledFruitPerMinute = (function(){
864
+ if(typeof fruitSizesItem.points.recycledFruitPerMinute !== 'number')
865
+ {
866
+ return Number.isInteger(Number(fruitSizesItem.points.recycledFruitPerMinute)) ? Number(fruitSizesItem.points.recycledFruitPerMinute) : Math.floor(Number(fruitSizesItem.points.recycledFruitPerMinute));
867
+ }
868
+
869
+ return Number.isInteger(fruitSizesItem.points.recycledFruitPerMinute) ? fruitSizesItem.points.recycledFruitPerMinute : Math.floor(fruitSizesItem.points.recycledFruitPerMinute);
870
+ }());
871
+ }
872
+ else
873
+ {
874
+ pointsObject.recycledFruitPerMinute = 0;
875
+ }
876
+
877
+ if(typeof fruitSizesItem.points === 'object' && 'allocatedFruitPerMinute' in fruitSizesItem.points)
878
+ {
879
+ pointsObject.allocatedFruitPerMinute = (function(){
880
+ if(typeof fruitSizesItem.points.allocatedFruitPerMinute !== 'number')
881
+ {
882
+ return Number.isInteger(Number(fruitSizesItem.points.allocatedFruitPerMinute)) ? Number(fruitSizesItem.points.allocatedFruitPerMinute) : Math.floor(Number(fruitSizesItem.points.allocatedFruitPerMinute));
883
+ }
884
+
885
+ return Number.isInteger(fruitSizesItem.points.allocatedFruitPerMinute) ? fruitSizesItem.points.allocatedFruitPerMinute : Math.floor(fruitSizesItem.points.allocatedFruitPerMinute);
886
+ }());
887
+ }
888
+ else
889
+ {
890
+ pointsObject.allocatedFruitPerMinute = 0;
891
+ }
892
+
893
+ return pointsObject;
894
+ }());
895
+ }
896
+ else
897
+ {
898
+ fruitSizesItemObject.points = (function(){
899
+ let pointsDefaultValue = {};
900
+
901
+ pointsDefaultValue.incomingFruitPerMinute = 0;
902
+
903
+ pointsDefaultValue.recycledFruitPerMinute = 0;
904
+
905
+ pointsDefaultValue.allocatedFruitPerMinute = 0;
906
+
907
+ return pointsDefaultValue;
908
+ }());
909
+ }
910
+
911
+ return fruitSizesItemObject;
912
+ }());
913
+ });
343
914
  }());
344
915
  }
345
916
 
@@ -351,12 +922,98 @@ class MAFSizerModel extends BaseModel
351
922
  return null;
352
923
  }
353
924
 
354
- if(typeof jsonObject['freshPackIntegration'] !== 'object')
925
+ let freshPackIntegrationObject = {};
926
+
927
+ if(typeof jsonObject['freshPackIntegration'] === 'object' && 'points' in jsonObject['freshPackIntegration'])
928
+ {
929
+ freshPackIntegrationObject.points = (function(){
930
+ if(typeof jsonObject['freshPackIntegration'].points !== 'object')
931
+ {
932
+ return Object(jsonObject['freshPackIntegration'].points);
933
+ }
934
+
935
+ return jsonObject['freshPackIntegration'].points;
936
+ }());
937
+ }
938
+ else
939
+ {
940
+ freshPackIntegrationObject.points = {}
941
+ }
942
+
943
+ if(typeof jsonObject['freshPackIntegration'] === 'object' && 'enabled' in jsonObject['freshPackIntegration'])
944
+ {
945
+ freshPackIntegrationObject.enabled = (function(){
946
+ if(typeof jsonObject['freshPackIntegration'].enabled !== 'boolean')
947
+ {
948
+ return Boolean(jsonObject['freshPackIntegration'].enabled);
949
+ }
950
+
951
+ return jsonObject['freshPackIntegration'].enabled;
952
+ }());
953
+ }
954
+ else
355
955
  {
356
- return Object(jsonObject['freshPackIntegration']);
956
+ freshPackIntegrationObject.enabled = false;
357
957
  }
958
+
959
+ if(typeof jsonObject['freshPackIntegration'] === 'object' && 'materialGroupId' in jsonObject['freshPackIntegration'])
960
+ {
961
+ freshPackIntegrationObject.materialGroupId = (function(){
962
+ if(typeof jsonObject['freshPackIntegration'].materialGroupId !== 'number')
963
+ {
964
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].materialGroupId)) ? Number(jsonObject['freshPackIntegration'].materialGroupId) : Math.floor(Number(jsonObject['freshPackIntegration'].materialGroupId));
965
+ }
358
966
 
359
- return jsonObject['freshPackIntegration'];
967
+ return Number.isInteger(jsonObject['freshPackIntegration'].materialGroupId) ? jsonObject['freshPackIntegration'].materialGroupId : Math.floor(jsonObject['freshPackIntegration'].materialGroupId);
968
+ }());
969
+ }
970
+ else
971
+ {
972
+ freshPackIntegrationObject.materialGroupId = 0;
973
+ }
974
+
975
+ if(typeof jsonObject['freshPackIntegration'] === 'object' && 'binTypeId' in jsonObject['freshPackIntegration'])
976
+ {
977
+ freshPackIntegrationObject.binTypeId = (function(){
978
+ if(typeof jsonObject['freshPackIntegration'].binTypeId !== 'number')
979
+ {
980
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].binTypeId)) ? Number(jsonObject['freshPackIntegration'].binTypeId) : Math.floor(Number(jsonObject['freshPackIntegration'].binTypeId));
981
+ }
982
+
983
+ return Number.isInteger(jsonObject['freshPackIntegration'].binTypeId) ? jsonObject['freshPackIntegration'].binTypeId : Math.floor(jsonObject['freshPackIntegration'].binTypeId);
984
+ }());
985
+ }
986
+ else
987
+ {
988
+ freshPackIntegrationObject.binTypeId = 0;
989
+ }
990
+
991
+ if(typeof jsonObject['freshPackIntegration'] === 'object' && 'bulkWeightClassTypes' in jsonObject['freshPackIntegration'])
992
+ {
993
+ freshPackIntegrationObject.bulkWeightClassTypes = (function(){
994
+ if(Array.isArray(jsonObject['freshPackIntegration'].bulkWeightClassTypes) !== true)
995
+ {
996
+ return [];
997
+ }
998
+
999
+ return jsonObject['freshPackIntegration'].bulkWeightClassTypes.map((bulkWeightClassTypesItem) => {
1000
+ return (function(){
1001
+ if(typeof bulkWeightClassTypesItem !== 'string')
1002
+ {
1003
+ return String(bulkWeightClassTypesItem);
1004
+ }
1005
+
1006
+ return bulkWeightClassTypesItem;
1007
+ }());
1008
+ });
1009
+ }());
1010
+ }
1011
+ else
1012
+ {
1013
+ freshPackIntegrationObject.bulkWeightClassTypes = [];
1014
+ }
1015
+
1016
+ return freshPackIntegrationObject;
360
1017
  }());
361
1018
  }
362
1019
 
@@ -368,12 +1025,108 @@ class MAFSizerModel extends BaseModel
368
1025
  return null;
369
1026
  }
370
1027
 
371
- if(typeof jsonObject['mafIntegration'] !== 'object')
1028
+ let mafIntegrationObject = {};
1029
+
1030
+ if(typeof jsonObject['mafIntegration'] === 'object' && 'points' in jsonObject['mafIntegration'])
1031
+ {
1032
+ mafIntegrationObject.points = (function(){
1033
+ let pointsObject = {};
1034
+
1035
+ if(typeof jsonObject['mafIntegration'].points === 'object' && 'stopBatchRequired' in jsonObject['mafIntegration'].points)
1036
+ {
1037
+ pointsObject.stopBatchRequired = (function(){
1038
+ if(typeof jsonObject['mafIntegration'].points.stopBatchRequired !== 'number')
1039
+ {
1040
+ return Number.isInteger(Number(jsonObject['mafIntegration'].points.stopBatchRequired)) ? Number(jsonObject['mafIntegration'].points.stopBatchRequired) : Math.floor(Number(jsonObject['mafIntegration'].points.stopBatchRequired));
1041
+ }
1042
+
1043
+ return Number.isInteger(jsonObject['mafIntegration'].points.stopBatchRequired) ? jsonObject['mafIntegration'].points.stopBatchRequired : Math.floor(jsonObject['mafIntegration'].points.stopBatchRequired);
1044
+ }());
1045
+ }
1046
+ else
1047
+ {
1048
+ pointsObject.stopBatchRequired = 0;
1049
+ }
1050
+
1051
+ return pointsObject;
1052
+ }());
1053
+ }
1054
+ else
1055
+ {
1056
+ mafIntegrationObject.points = (function(){
1057
+ let pointsDefaultValue = {};
1058
+
1059
+ pointsDefaultValue.stopBatchRequired = 0;
1060
+
1061
+ return pointsDefaultValue;
1062
+ }());
1063
+ }
1064
+
1065
+ if(typeof jsonObject['mafIntegration'] === 'object' && 'enabled' in jsonObject['mafIntegration'])
1066
+ {
1067
+ mafIntegrationObject.enabled = (function(){
1068
+ if(typeof jsonObject['mafIntegration'].enabled !== 'boolean')
1069
+ {
1070
+ return Boolean(jsonObject['mafIntegration'].enabled);
1071
+ }
1072
+
1073
+ return jsonObject['mafIntegration'].enabled;
1074
+ }());
1075
+ }
1076
+ else
1077
+ {
1078
+ mafIntegrationObject.enabled = false;
1079
+ }
1080
+
1081
+ if(typeof jsonObject['mafIntegration'] === 'object' && 'sizerNumber' in jsonObject['mafIntegration'])
1082
+ {
1083
+ mafIntegrationObject.sizerNumber = (function(){
1084
+ if(typeof jsonObject['mafIntegration'].sizerNumber !== 'number')
1085
+ {
1086
+ return Number(jsonObject['mafIntegration'].sizerNumber);
1087
+ }
1088
+
1089
+ return jsonObject['mafIntegration'].sizerNumber;
1090
+ }());
1091
+ }
1092
+ else
372
1093
  {
373
- return Object(jsonObject['mafIntegration']);
1094
+ mafIntegrationObject.sizerNumber = 0;
374
1095
  }
1096
+
1097
+ if(typeof jsonObject['mafIntegration'] === 'object' && 'dumpSizerName' in jsonObject['mafIntegration'])
1098
+ {
1099
+ mafIntegrationObject.dumpSizerName = (function(){
1100
+ if(typeof jsonObject['mafIntegration'].dumpSizerName !== 'string')
1101
+ {
1102
+ return String(jsonObject['mafIntegration'].dumpSizerName);
1103
+ }
375
1104
 
376
- return jsonObject['mafIntegration'];
1105
+ return jsonObject['mafIntegration'].dumpSizerName;
1106
+ }());
1107
+ }
1108
+ else
1109
+ {
1110
+ mafIntegrationObject.dumpSizerName = "";
1111
+ }
1112
+
1113
+ if(typeof jsonObject['mafIntegration'] === 'object' && 'statSizerName' in jsonObject['mafIntegration'])
1114
+ {
1115
+ mafIntegrationObject.statSizerName = (function(){
1116
+ if(typeof jsonObject['mafIntegration'].statSizerName !== 'string')
1117
+ {
1118
+ return String(jsonObject['mafIntegration'].statSizerName);
1119
+ }
1120
+
1121
+ return jsonObject['mafIntegration'].statSizerName;
1122
+ }());
1123
+ }
1124
+ else
1125
+ {
1126
+ mafIntegrationObject.statSizerName = "";
1127
+ }
1128
+
1129
+ return mafIntegrationObject;
377
1130
  }());
378
1131
  }
379
1132
 
@@ -387,11 +1140,6 @@ class MAFSizerModel extends BaseModel
387
1140
 
388
1141
  return jsonObject['sources'].map((sourcesItem) => {
389
1142
  return (function(){
390
- if(typeof sourcesItem !== 'object')
391
- {
392
- return Object(sourcesItem);
393
- }
394
-
395
1143
  return sourcesItem;
396
1144
  }());
397
1145
  });
@@ -408,12 +1156,41 @@ class MAFSizerModel extends BaseModel
408
1156
 
409
1157
  return jsonObject['articleClassTypes'].map((articleClassTypesItem) => {
410
1158
  return (function(){
411
- if(typeof articleClassTypesItem !== 'object')
1159
+ let articleClassTypesItemObject = {};
1160
+
1161
+ if(typeof articleClassTypesItem === 'object' && 'articleName' in articleClassTypesItem)
1162
+ {
1163
+ articleClassTypesItemObject.articleName = (function(){
1164
+ if(typeof articleClassTypesItem.articleName !== 'string')
1165
+ {
1166
+ return String(articleClassTypesItem.articleName);
1167
+ }
1168
+
1169
+ return articleClassTypesItem.articleName;
1170
+ }());
1171
+ }
1172
+ else
1173
+ {
1174
+ articleClassTypesItemObject.articleName = "";
1175
+ }
1176
+
1177
+ if(typeof articleClassTypesItem === 'object' && 'classType' in articleClassTypesItem)
1178
+ {
1179
+ articleClassTypesItemObject.classType = (function(){
1180
+ if(typeof articleClassTypesItem.classType !== 'string')
1181
+ {
1182
+ return String(articleClassTypesItem.classType);
1183
+ }
1184
+
1185
+ return articleClassTypesItem.classType;
1186
+ }());
1187
+ }
1188
+ else
412
1189
  {
413
- return Object(articleClassTypesItem);
1190
+ articleClassTypesItemObject.classType = "";
414
1191
  }
415
1192
 
416
- return articleClassTypesItem;
1193
+ return articleClassTypesItemObject;
417
1194
  }());
418
1195
  });
419
1196
  }());