@ricado/api-client 2.3.27 → 2.4.0

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 (59) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Lab/Site/DehydratorController.js +198 -0
  3. package/lib/Controllers/Lab/Site/FruitProfileController.js +204 -0
  4. package/lib/Controllers/Lab/Site/LabController.js +222 -0
  5. package/lib/Controllers/Lab/Site/RackController.js +222 -0
  6. package/lib/Controllers/Lab/Site/RackPositionController.js +207 -0
  7. package/lib/Controllers/Lab/Site/SampleController.js +927 -0
  8. package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +192 -0
  9. package/lib/Controllers/Lab/Site/SampleResultController.js +905 -0
  10. package/lib/Controllers/Lab/Site/index.js +46 -0
  11. package/lib/Controllers/Lab/index.js +25 -0
  12. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +2 -2
  13. package/lib/Controllers/Packhouse/Site/MAFSizerController.js +2 -2
  14. package/lib/Controllers/Packhouse/Site/ShiftController.js +304 -0
  15. package/lib/Controllers/index.js +9 -6
  16. package/lib/Models/Lab/Site/DehydratorModel.js +250 -0
  17. package/lib/Models/Lab/Site/FruitProfileModel.js +303 -0
  18. package/lib/Models/Lab/Site/LabModel.js +365 -0
  19. package/lib/Models/Lab/Site/RackModel.js +358 -0
  20. package/lib/Models/Lab/Site/RackPositionModel.js +525 -0
  21. package/lib/Models/Lab/Site/SampleFailureReasonModel.js +195 -0
  22. package/lib/Models/Lab/Site/SampleModel.js +545 -0
  23. package/lib/Models/Lab/Site/SampleResultModel.js +545 -0
  24. package/lib/Models/Lab/Site/index.js +46 -0
  25. package/lib/Models/Lab/index.js +25 -0
  26. package/lib/Models/Packhouse/Site/CompacSizerModel.js +18 -1
  27. package/lib/Models/Packhouse/Site/MAFSizerModel.js +18 -1
  28. package/lib/Models/index.js +7 -4
  29. package/lib/PackageVersion.js +1 -1
  30. package/lib/index.d.ts +10491 -7674
  31. package/package.json +1 -1
  32. package/src/Controllers/Lab/Site/DehydratorController.js +175 -0
  33. package/src/Controllers/Lab/Site/FruitProfileController.js +181 -0
  34. package/src/Controllers/Lab/Site/LabController.js +199 -0
  35. package/src/Controllers/Lab/Site/RackController.js +199 -0
  36. package/src/Controllers/Lab/Site/RackPositionController.js +184 -0
  37. package/src/Controllers/Lab/Site/SampleController.js +1067 -0
  38. package/src/Controllers/Lab/Site/SampleFailureReasonController.js +169 -0
  39. package/src/Controllers/Lab/Site/SampleResultController.js +1036 -0
  40. package/src/Controllers/Lab/Site/index.js +30 -0
  41. package/src/Controllers/Lab/index.js +16 -0
  42. package/src/Controllers/Packhouse/Site/CompacSizerController.js +2 -2
  43. package/src/Controllers/Packhouse/Site/MAFSizerController.js +2 -2
  44. package/src/Controllers/Packhouse/Site/ShiftController.js +367 -0
  45. package/src/Controllers/index.js +2 -0
  46. package/src/Models/Lab/Site/DehydratorModel.js +234 -0
  47. package/src/Models/Lab/Site/FruitProfileModel.js +290 -0
  48. package/src/Models/Lab/Site/LabModel.js +372 -0
  49. package/src/Models/Lab/Site/RackModel.js +358 -0
  50. package/src/Models/Lab/Site/RackPositionModel.js +600 -0
  51. package/src/Models/Lab/Site/SampleFailureReasonModel.js +170 -0
  52. package/src/Models/Lab/Site/SampleModel.js +565 -0
  53. package/src/Models/Lab/Site/SampleResultModel.js +565 -0
  54. package/src/Models/Lab/Site/index.js +30 -0
  55. package/src/Models/Lab/index.js +16 -0
  56. package/src/Models/Packhouse/Site/CompacSizerModel.js +24 -1
  57. package/src/Models/Packhouse/Site/MAFSizerModel.js +24 -1
  58. package/src/Models/index.js +2 -0
  59. package/src/PackageVersion.js +1 -1
@@ -0,0 +1,565 @@
1
+ /**
2
+ * File Auto-Generated by the RICADO Gen 4 PHP API Project
3
+ *
4
+ * Do Not Edit this File Manually!
5
+ */
6
+
7
+ import BaseModel from '../../../Models/BaseModel';
8
+
9
+ /**
10
+ * Model Class for a Sample Results
11
+ *
12
+ * @class
13
+ * @hideconstructor
14
+ * @extends BaseModel
15
+ */
16
+ class SampleResultModel extends BaseModel
17
+ {
18
+ /**
19
+ * SampleResultModel Constructor
20
+ *
21
+ * @protected
22
+ * @param {number} siteId The Site ID associated with this Sample Results
23
+ */
24
+ constructor(siteId)
25
+ {
26
+ super();
27
+
28
+ /**
29
+ * The Sample Results ID
30
+ *
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ this.id = "";
35
+
36
+ /**
37
+ * The Lab ID this Sample Result is associated with
38
+ *
39
+ * @type {string}
40
+ * @public
41
+ */
42
+ this.labId = "";
43
+
44
+ /**
45
+ * The Sample ID this Sample Result is associated with
46
+ *
47
+ * @type {string}
48
+ * @public
49
+ */
50
+ this.sampleId = "";
51
+
52
+ /**
53
+ * When this Sample Result was Created
54
+ *
55
+ * @type {Date}
56
+ * @public
57
+ */
58
+ this.createdTimestamp = new Date();
59
+
60
+ /**
61
+ * The Total Duration (in seconds) of the Sample
62
+ *
63
+ * @type {number}
64
+ * @public
65
+ */
66
+ this.totalDuration = 0;
67
+
68
+ /**
69
+ * The Warm Up Duration (in seconds) of the Sample
70
+ *
71
+ * @type {number}
72
+ * @public
73
+ */
74
+ this.warmUpDuration = 0;
75
+
76
+ /**
77
+ * Timestamp of when the Warm Up process was Completed - `null` if not Completed
78
+ *
79
+ * @type {?Date}
80
+ * @public
81
+ */
82
+ this.warmUpCompletedTimestamp = null;
83
+
84
+ /**
85
+ * The Below Temperature Target Duration (in seconds) of the Sample
86
+ *
87
+ * @type {number}
88
+ * @public
89
+ */
90
+ this.belowTargetDuration = 0;
91
+
92
+ /**
93
+ * The Above Temperature Target Duration (in seconds) of the Sample
94
+ *
95
+ * @type {number}
96
+ * @public
97
+ */
98
+ this.aboveTargetDuration = 0;
99
+
100
+ /**
101
+ * The Within Temperature Target Duration (in seconds) of the Sample
102
+ *
103
+ * @type {number}
104
+ * @public
105
+ */
106
+ this.withinTargetDuration = 0;
107
+
108
+ /**
109
+ * Timestamp of when the Success Criteria was Met for the Sample - `null` if not Met
110
+ *
111
+ * @type {?Date}
112
+ * @public
113
+ */
114
+ this.successCriteriaMetTimestamp = null;
115
+
116
+ /**
117
+ * Timestamp of when the Failure Criteria was Met for the Sample - `null` if not Met
118
+ *
119
+ * @type {?Date}
120
+ * @public
121
+ */
122
+ this.failureCriteriaMetTimestamp = null;
123
+
124
+ /**
125
+ * The Average Temperature for the Total Duration of the Sample
126
+ *
127
+ * @type {?number}
128
+ * @public
129
+ */
130
+ this.totalAverageTemperature = null;
131
+
132
+ /**
133
+ * The Minimum Temperature seen Below the Temperature Target for the Sample
134
+ *
135
+ * @type {?number}
136
+ * @public
137
+ */
138
+ this.belowTargetMinimumTemperature = null;
139
+
140
+ /**
141
+ * The Average Temperature seen Below the Temperature Target for the Sample
142
+ *
143
+ * @type {?number}
144
+ * @public
145
+ */
146
+ this.belowTargetAverageTemperature = null;
147
+
148
+ /**
149
+ * The Maximum Temperature seen Above the Temperature Target for the Sample
150
+ *
151
+ * @type {?number}
152
+ * @public
153
+ */
154
+ this.aboveTargetMaximumTemperature = null;
155
+
156
+ /**
157
+ * The Average Temperature seen Above the Temperature Target for the Sample
158
+ *
159
+ * @type {?number}
160
+ * @public
161
+ */
162
+ this.aboveTargetAverageTemperature = null;
163
+
164
+ /**
165
+ * The Minimum Temperature seen Within the Temperature Target for the Sample
166
+ *
167
+ * @type {?number}
168
+ * @public
169
+ */
170
+ this.withinTargetMinimumTemperature = null;
171
+
172
+ /**
173
+ * The Maximum Temperature seen Within the Temperature Target for the Sample
174
+ *
175
+ * @type {?number}
176
+ * @public
177
+ */
178
+ this.withinTargetMaximumTemperature = null;
179
+
180
+ /**
181
+ * The Average Temperature seen Within the Temperature Target for the Sample
182
+ *
183
+ * @type {?number}
184
+ * @public
185
+ */
186
+ this.withinTargetAverageTemperature = null;
187
+
188
+ /**
189
+ * Whether the Sample Results has been deleted
190
+ *
191
+ * @type {boolean}
192
+ * @public
193
+ */
194
+ this.deleted = false;
195
+
196
+ /**
197
+ * When the Sample Results was last updated
198
+ *
199
+ * @type {Date}
200
+ * @public
201
+ */
202
+ this.updateTimestamp = new Date();
203
+
204
+ /**
205
+ * The Site ID associated with this Sample Results
206
+ *
207
+ * @type {number}
208
+ * @public
209
+ */
210
+ this.siteId = siteId;
211
+ }
212
+
213
+ /**
214
+ * Create a new **SampleResultModel** from a JSON Object or JSON String
215
+ *
216
+ * @static
217
+ * @public
218
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
219
+ * @param {number} siteId The Site ID associated with this Sample Results
220
+ * @return {SampleResultModel}
221
+ */
222
+ static fromJSON(json, siteId)
223
+ {
224
+ let model = new SampleResultModel(siteId);
225
+
226
+ /**
227
+ * The JSON Object
228
+ *
229
+ * @type {Object<string, any>}
230
+ */
231
+ let jsonObject = {};
232
+
233
+ if(typeof json === 'string')
234
+ {
235
+ jsonObject = JSON.parse(json);
236
+ }
237
+ else if(typeof json === 'object')
238
+ {
239
+ jsonObject = json;
240
+ }
241
+
242
+ if('id' in jsonObject)
243
+ {
244
+ model.id = (function(){
245
+ if(typeof jsonObject['id'] !== 'string')
246
+ {
247
+ return String(jsonObject['id']);
248
+ }
249
+
250
+ return jsonObject['id'];
251
+ }());
252
+ }
253
+
254
+ if('labId' in jsonObject)
255
+ {
256
+ model.labId = (function(){
257
+ if(typeof jsonObject['labId'] !== 'string')
258
+ {
259
+ return String(jsonObject['labId']);
260
+ }
261
+
262
+ return jsonObject['labId'];
263
+ }());
264
+ }
265
+
266
+ if('sampleId' in jsonObject)
267
+ {
268
+ model.sampleId = (function(){
269
+ if(typeof jsonObject['sampleId'] !== 'string')
270
+ {
271
+ return String(jsonObject['sampleId']);
272
+ }
273
+
274
+ return jsonObject['sampleId'];
275
+ }());
276
+ }
277
+
278
+ if('createdTimestamp' in jsonObject)
279
+ {
280
+ model.createdTimestamp = (function(){
281
+ if(typeof jsonObject['createdTimestamp'] !== 'string')
282
+ {
283
+ return new Date(String(jsonObject['createdTimestamp']));
284
+ }
285
+
286
+ return new Date(jsonObject['createdTimestamp']);
287
+ }());
288
+ }
289
+
290
+ if('totalDuration' in jsonObject)
291
+ {
292
+ model.totalDuration = (function(){
293
+ if(typeof jsonObject['totalDuration'] !== 'number')
294
+ {
295
+ return Number.isInteger(Number(jsonObject['totalDuration'])) ? Number(jsonObject['totalDuration']) : Math.floor(Number(jsonObject['totalDuration']));
296
+ }
297
+
298
+ return Number.isInteger(jsonObject['totalDuration']) ? jsonObject['totalDuration'] : Math.floor(jsonObject['totalDuration']);
299
+ }());
300
+ }
301
+
302
+ if('warmUpDuration' in jsonObject)
303
+ {
304
+ model.warmUpDuration = (function(){
305
+ if(typeof jsonObject['warmUpDuration'] !== 'number')
306
+ {
307
+ return Number.isInteger(Number(jsonObject['warmUpDuration'])) ? Number(jsonObject['warmUpDuration']) : Math.floor(Number(jsonObject['warmUpDuration']));
308
+ }
309
+
310
+ return Number.isInteger(jsonObject['warmUpDuration']) ? jsonObject['warmUpDuration'] : Math.floor(jsonObject['warmUpDuration']);
311
+ }());
312
+ }
313
+
314
+ if('warmUpCompletedTimestamp' in jsonObject)
315
+ {
316
+ model.warmUpCompletedTimestamp = (function(){
317
+ if(jsonObject['warmUpCompletedTimestamp'] === null)
318
+ {
319
+ return null;
320
+ }
321
+
322
+ if(typeof jsonObject['warmUpCompletedTimestamp'] !== 'string')
323
+ {
324
+ return new Date(String(jsonObject['warmUpCompletedTimestamp']));
325
+ }
326
+
327
+ return new Date(jsonObject['warmUpCompletedTimestamp']);
328
+ }());
329
+ }
330
+
331
+ if('belowTargetDuration' in jsonObject)
332
+ {
333
+ model.belowTargetDuration = (function(){
334
+ if(typeof jsonObject['belowTargetDuration'] !== 'number')
335
+ {
336
+ return Number.isInteger(Number(jsonObject['belowTargetDuration'])) ? Number(jsonObject['belowTargetDuration']) : Math.floor(Number(jsonObject['belowTargetDuration']));
337
+ }
338
+
339
+ return Number.isInteger(jsonObject['belowTargetDuration']) ? jsonObject['belowTargetDuration'] : Math.floor(jsonObject['belowTargetDuration']);
340
+ }());
341
+ }
342
+
343
+ if('aboveTargetDuration' in jsonObject)
344
+ {
345
+ model.aboveTargetDuration = (function(){
346
+ if(typeof jsonObject['aboveTargetDuration'] !== 'number')
347
+ {
348
+ return Number.isInteger(Number(jsonObject['aboveTargetDuration'])) ? Number(jsonObject['aboveTargetDuration']) : Math.floor(Number(jsonObject['aboveTargetDuration']));
349
+ }
350
+
351
+ return Number.isInteger(jsonObject['aboveTargetDuration']) ? jsonObject['aboveTargetDuration'] : Math.floor(jsonObject['aboveTargetDuration']);
352
+ }());
353
+ }
354
+
355
+ if('withinTargetDuration' in jsonObject)
356
+ {
357
+ model.withinTargetDuration = (function(){
358
+ if(typeof jsonObject['withinTargetDuration'] !== 'number')
359
+ {
360
+ return Number.isInteger(Number(jsonObject['withinTargetDuration'])) ? Number(jsonObject['withinTargetDuration']) : Math.floor(Number(jsonObject['withinTargetDuration']));
361
+ }
362
+
363
+ return Number.isInteger(jsonObject['withinTargetDuration']) ? jsonObject['withinTargetDuration'] : Math.floor(jsonObject['withinTargetDuration']);
364
+ }());
365
+ }
366
+
367
+ if('successCriteriaMetTimestamp' in jsonObject)
368
+ {
369
+ model.successCriteriaMetTimestamp = (function(){
370
+ if(jsonObject['successCriteriaMetTimestamp'] === null)
371
+ {
372
+ return null;
373
+ }
374
+
375
+ if(typeof jsonObject['successCriteriaMetTimestamp'] !== 'string')
376
+ {
377
+ return new Date(String(jsonObject['successCriteriaMetTimestamp']));
378
+ }
379
+
380
+ return new Date(jsonObject['successCriteriaMetTimestamp']);
381
+ }());
382
+ }
383
+
384
+ if('failureCriteriaMetTimestamp' in jsonObject)
385
+ {
386
+ model.failureCriteriaMetTimestamp = (function(){
387
+ if(jsonObject['failureCriteriaMetTimestamp'] === null)
388
+ {
389
+ return null;
390
+ }
391
+
392
+ if(typeof jsonObject['failureCriteriaMetTimestamp'] !== 'string')
393
+ {
394
+ return new Date(String(jsonObject['failureCriteriaMetTimestamp']));
395
+ }
396
+
397
+ return new Date(jsonObject['failureCriteriaMetTimestamp']);
398
+ }());
399
+ }
400
+
401
+ if('totalAverageTemperature' in jsonObject)
402
+ {
403
+ model.totalAverageTemperature = (function(){
404
+ if(jsonObject['totalAverageTemperature'] === null)
405
+ {
406
+ return null;
407
+ }
408
+
409
+ if(typeof jsonObject['totalAverageTemperature'] !== 'number')
410
+ {
411
+ return Number(jsonObject['totalAverageTemperature']);
412
+ }
413
+
414
+ return jsonObject['totalAverageTemperature'];
415
+ }());
416
+ }
417
+
418
+ if('belowTargetMinimumTemperature' in jsonObject)
419
+ {
420
+ model.belowTargetMinimumTemperature = (function(){
421
+ if(jsonObject['belowTargetMinimumTemperature'] === null)
422
+ {
423
+ return null;
424
+ }
425
+
426
+ if(typeof jsonObject['belowTargetMinimumTemperature'] !== 'number')
427
+ {
428
+ return Number(jsonObject['belowTargetMinimumTemperature']);
429
+ }
430
+
431
+ return jsonObject['belowTargetMinimumTemperature'];
432
+ }());
433
+ }
434
+
435
+ if('belowTargetAverageTemperature' in jsonObject)
436
+ {
437
+ model.belowTargetAverageTemperature = (function(){
438
+ if(jsonObject['belowTargetAverageTemperature'] === null)
439
+ {
440
+ return null;
441
+ }
442
+
443
+ if(typeof jsonObject['belowTargetAverageTemperature'] !== 'number')
444
+ {
445
+ return Number(jsonObject['belowTargetAverageTemperature']);
446
+ }
447
+
448
+ return jsonObject['belowTargetAverageTemperature'];
449
+ }());
450
+ }
451
+
452
+ if('aboveTargetMaximumTemperature' in jsonObject)
453
+ {
454
+ model.aboveTargetMaximumTemperature = (function(){
455
+ if(jsonObject['aboveTargetMaximumTemperature'] === null)
456
+ {
457
+ return null;
458
+ }
459
+
460
+ if(typeof jsonObject['aboveTargetMaximumTemperature'] !== 'number')
461
+ {
462
+ return Number(jsonObject['aboveTargetMaximumTemperature']);
463
+ }
464
+
465
+ return jsonObject['aboveTargetMaximumTemperature'];
466
+ }());
467
+ }
468
+
469
+ if('aboveTargetAverageTemperature' in jsonObject)
470
+ {
471
+ model.aboveTargetAverageTemperature = (function(){
472
+ if(jsonObject['aboveTargetAverageTemperature'] === null)
473
+ {
474
+ return null;
475
+ }
476
+
477
+ if(typeof jsonObject['aboveTargetAverageTemperature'] !== 'number')
478
+ {
479
+ return Number(jsonObject['aboveTargetAverageTemperature']);
480
+ }
481
+
482
+ return jsonObject['aboveTargetAverageTemperature'];
483
+ }());
484
+ }
485
+
486
+ if('withinTargetMinimumTemperature' in jsonObject)
487
+ {
488
+ model.withinTargetMinimumTemperature = (function(){
489
+ if(jsonObject['withinTargetMinimumTemperature'] === null)
490
+ {
491
+ return null;
492
+ }
493
+
494
+ if(typeof jsonObject['withinTargetMinimumTemperature'] !== 'number')
495
+ {
496
+ return Number(jsonObject['withinTargetMinimumTemperature']);
497
+ }
498
+
499
+ return jsonObject['withinTargetMinimumTemperature'];
500
+ }());
501
+ }
502
+
503
+ if('withinTargetMaximumTemperature' in jsonObject)
504
+ {
505
+ model.withinTargetMaximumTemperature = (function(){
506
+ if(jsonObject['withinTargetMaximumTemperature'] === null)
507
+ {
508
+ return null;
509
+ }
510
+
511
+ if(typeof jsonObject['withinTargetMaximumTemperature'] !== 'number')
512
+ {
513
+ return Number(jsonObject['withinTargetMaximumTemperature']);
514
+ }
515
+
516
+ return jsonObject['withinTargetMaximumTemperature'];
517
+ }());
518
+ }
519
+
520
+ if('withinTargetAverageTemperature' in jsonObject)
521
+ {
522
+ model.withinTargetAverageTemperature = (function(){
523
+ if(jsonObject['withinTargetAverageTemperature'] === null)
524
+ {
525
+ return null;
526
+ }
527
+
528
+ if(typeof jsonObject['withinTargetAverageTemperature'] !== 'number')
529
+ {
530
+ return Number(jsonObject['withinTargetAverageTemperature']);
531
+ }
532
+
533
+ return jsonObject['withinTargetAverageTemperature'];
534
+ }());
535
+ }
536
+
537
+ if('deleted' in jsonObject)
538
+ {
539
+ model.deleted = (function(){
540
+ if(typeof jsonObject['deleted'] !== 'boolean')
541
+ {
542
+ return Boolean(jsonObject['deleted']);
543
+ }
544
+
545
+ return jsonObject['deleted'];
546
+ }());
547
+ }
548
+
549
+ if('updateTimestamp' in jsonObject)
550
+ {
551
+ model.updateTimestamp = (function(){
552
+ if(typeof jsonObject['updateTimestamp'] !== 'string')
553
+ {
554
+ return new Date(String(jsonObject['updateTimestamp']));
555
+ }
556
+
557
+ return new Date(jsonObject['updateTimestamp']);
558
+ }());
559
+ }
560
+
561
+ return model;
562
+ }
563
+ }
564
+
565
+ export default SampleResultModel;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * File Auto-Generated by the RICADO Gen 4 PHP API Project
3
+ *
4
+ * Do Not Edit this File Manually!
5
+ */
6
+
7
+ /**
8
+ * @namespace Models.Lab.Site
9
+ */
10
+ import DehydratorModel from './DehydratorModel';
11
+ import FruitProfileModel from './FruitProfileModel';
12
+ import LabModel from './LabModel';
13
+ import RackModel from './RackModel';
14
+ import RackPositionModel from './RackPositionModel';
15
+ import SampleFailureReasonModel from './SampleFailureReasonModel';
16
+ import SampleModel from './SampleModel';
17
+ import SampleResultModel from './SampleResultModel';
18
+
19
+ const Site = {
20
+ DehydratorModel,
21
+ FruitProfileModel,
22
+ LabModel,
23
+ RackModel,
24
+ RackPositionModel,
25
+ SampleFailureReasonModel,
26
+ SampleModel,
27
+ SampleResultModel,
28
+ };
29
+
30
+ export default Site;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * File Auto-Generated by the RICADO Gen 4 PHP API Project
3
+ *
4
+ * Do Not Edit this File Manually!
5
+ */
6
+
7
+ /**
8
+ * @namespace Models.Lab
9
+ */
10
+ import Site from './Site/index';
11
+
12
+ const Lab = {
13
+ Site,
14
+ };
15
+
16
+ export default Lab;
@@ -76,7 +76,7 @@ class CompacSizerModel extends BaseModel
76
76
  /**
77
77
  * The Points used by this Compac Sizer
78
78
  *
79
- * @type {{currentBatchId: number, currentBatchName: number, currentBatchGrowerCode: number, currentBatchVarietyId: number, currentBatchVarietyName: number, currentBatchComments: number, currentBatchStartTimestamp: number, currentBatchLayoutId: number, currentBatchLayoutName: number, currentBatchSizingProfileName: ?number, currentBatchFruitSizeProfile: ?number, machineAverageFruitWeight: number, machineAverageFruitSize: number, machineCupFill: number, machineRecycledFruitPerMinute: number, machineTotalFruitPerMinute: number, machineDroppedFruitPerMinute: number, machinePackedFruitPerMinute: number, machineMissedFruitPerMinute: number, machineRejectFruitPerMinute: number, machineTraysPerHour: number, machineTraysPerHourTarget: ?number, machineTonnesPerHour: number, machineRodsPerMinute: number, machineIncomingFruitPerMinuteBySize: ?number, machineRecycleFruitPerMinuteBySize: ?number, machineLanesFruitPerMinuteBySize: ?number, machineLanesFruitPerMinuteByGrade: ?number, createNewBatchRequest: number, createBatchOnPackrunChange: number, createBatchOnTimeBatchChange: number, restartServiceRequest: number, outletGroupSummaries: number, varieties: number, packTypeOutletUtilizationTargets: number}}
79
+ * @type {{currentBatchId: number, currentBatchName: number, currentBatchGrowerCode: number, currentBatchVarietyId: number, currentBatchVarietyName: number, currentBatchComments: number, currentBatchStartTimestamp: number, currentBatchLayoutId: number, currentBatchLayoutName: number, currentBatchSizingProfileName: ?number, currentBatchFruitSizeProfile: ?number, machineAverageFruitWeight: number, machineAverageFruitSize: number, machineCupFill: number, machineRecycledFruitPerMinute: number, machineTotalFruitPerMinute: number, machineDroppedFruitPerMinute: number, machinePackedFruitPerMinute: number, machineMissedFruitPerMinute: number, machineRejectFruitPerMinute: number, machineTraysPerHour: number, machineTraysPerHourTarget: ?number, machineTonnesPerHour: number, machineRodsPerMinute: number, machineIncomingFruitPerMinuteBySize: ?number, machineRecycleFruitPerMinuteBySize: ?number, machineLanesFruitPerMinuteBySize: ?number, machineLanesFruitPerMinuteByGrade: ?number, createNewBatchRequest: number, createBatchOnPackrunChange: number, createBatchOnTimeBatchChange: number, restartServiceRequest: number, outletGroupSummaries: number, varieties: number, packTypeOutletUtilizationTargets: number, class1TraysPerHour: ?number}}
80
80
  * @public
81
81
  */
82
82
  this.points = (function(){
@@ -152,6 +152,8 @@ class CompacSizerModel extends BaseModel
152
152
 
153
153
  pointsDefaultValue.packTypeOutletUtilizationTargets = 0;
154
154
 
155
+ pointsDefaultValue.class1TraysPerHour = null;
156
+
155
157
  return pointsDefaultValue;
156
158
  }());
157
159
 
@@ -933,6 +935,27 @@ class CompacSizerModel extends BaseModel
933
935
  {
934
936
  pointsObject.packTypeOutletUtilizationTargets = 0;
935
937
  }
938
+
939
+ if(typeof jsonObject['points'] === 'object' && 'class1TraysPerHour' in jsonObject['points'])
940
+ {
941
+ pointsObject.class1TraysPerHour = (function(){
942
+ if(jsonObject['points'].class1TraysPerHour === null)
943
+ {
944
+ return null;
945
+ }
946
+
947
+ if(typeof jsonObject['points'].class1TraysPerHour !== 'number')
948
+ {
949
+ return Number.isInteger(Number(jsonObject['points'].class1TraysPerHour)) ? Number(jsonObject['points'].class1TraysPerHour) : Math.floor(Number(jsonObject['points'].class1TraysPerHour));
950
+ }
951
+
952
+ return Number.isInteger(jsonObject['points'].class1TraysPerHour) ? jsonObject['points'].class1TraysPerHour : Math.floor(jsonObject['points'].class1TraysPerHour);
953
+ }());
954
+ }
955
+ else
956
+ {
957
+ pointsObject.class1TraysPerHour = null;
958
+ }
936
959
 
937
960
  return pointsObject;
938
961
  }());