@ricado/api-client 2.7.2 → 2.7.4

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.
@@ -645,12 +645,13 @@ export default PackingLineController;
645
645
  * A **FreshQualityIntegration** Type
646
646
  *
647
647
  * @typedef {Object} PackingLineController.FreshQualityIntegration
648
- * @property {{currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, currentPackrunMaturityAreaSamples: ?number, currentPackrunCustomSamples: ?number, sampleTypes: ?number}} points The Points used for this FreshQuality Integration
648
+ * @property {{currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, currentPackrunMaturityAreaSamples: ?number, currentPackrunCustomSamples: ?number, sampleTypes: ?number, currentPackrunClass2Samples: ?number}} points The Points used for this FreshQuality Integration
649
649
  * @property {boolean} enabled Whether the FreshQuality Integration is Enabled on this Packing Line
650
650
  * @property {string} username Username for Authenticating with the FreshQuality API
651
651
  * @property {string} password Password for Authenticating with the FreshQuality API
652
652
  * @property {string} apiBaseUrl Base URL of the FreshQuality API
653
653
  * @property {number[]} sampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Class 1 R600 on this Packing Line
654
+ * @property {number[]} class2SampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Class 2 R600 on this Packing Line
654
655
  * @property {number[]} rejectAnalysisSampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Reject Analysis on this Packing Line
655
656
  * @property {number[]} maturityAreaSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Maturity Area Samples on this Packing Line
656
657
  * @property {number[]} customSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Custom Samples on this Packing Line
@@ -73,6 +73,14 @@ class FreshQualityPackrunSummaryModel extends BaseModel
73
73
  */
74
74
  this.class1R600Samples = [];
75
75
 
76
+ /**
77
+ * An Array of Class 2 R600 Samples
78
+ *
79
+ * @type {Array<{fruitSize: string, packType: string, timestamp: Date, fruitCount: number, defects: Array<{name: string, group: string, fruitCount: number}>}>}
80
+ * @public
81
+ */
82
+ this.class2R600Samples = [];
83
+
76
84
  /**
77
85
  * An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
78
86
  *
@@ -360,6 +368,158 @@ class FreshQualityPackrunSummaryModel extends BaseModel
360
368
  }());
361
369
  }
362
370
 
371
+ if('class2R600Samples' in jsonObject)
372
+ {
373
+ model.class2R600Samples = (function(){
374
+ if(Array.isArray(jsonObject['class2R600Samples']) !== true)
375
+ {
376
+ return [];
377
+ }
378
+
379
+ return jsonObject['class2R600Samples'].map((class2R600SamplesItem) => {
380
+ return (function(){
381
+ let class2R600SamplesItemObject = {};
382
+
383
+ if(typeof class2R600SamplesItem === 'object' && 'fruitSize' in class2R600SamplesItem)
384
+ {
385
+ class2R600SamplesItemObject.fruitSize = (function(){
386
+ if(typeof class2R600SamplesItem.fruitSize !== 'string')
387
+ {
388
+ return String(class2R600SamplesItem.fruitSize);
389
+ }
390
+
391
+ return class2R600SamplesItem.fruitSize;
392
+ }());
393
+ }
394
+ else
395
+ {
396
+ class2R600SamplesItemObject.fruitSize = "";
397
+ }
398
+
399
+ if(typeof class2R600SamplesItem === 'object' && 'packType' in class2R600SamplesItem)
400
+ {
401
+ class2R600SamplesItemObject.packType = (function(){
402
+ if(typeof class2R600SamplesItem.packType !== 'string')
403
+ {
404
+ return String(class2R600SamplesItem.packType);
405
+ }
406
+
407
+ return class2R600SamplesItem.packType;
408
+ }());
409
+ }
410
+ else
411
+ {
412
+ class2R600SamplesItemObject.packType = "";
413
+ }
414
+
415
+ if(typeof class2R600SamplesItem === 'object' && 'timestamp' in class2R600SamplesItem)
416
+ {
417
+ class2R600SamplesItemObject.timestamp = (function(){
418
+ if(typeof class2R600SamplesItem.timestamp !== 'string')
419
+ {
420
+ return new Date(String(class2R600SamplesItem.timestamp));
421
+ }
422
+
423
+ return new Date(class2R600SamplesItem.timestamp);
424
+ }());
425
+ }
426
+ else
427
+ {
428
+ class2R600SamplesItemObject.timestamp = new Date();
429
+ }
430
+
431
+ if(typeof class2R600SamplesItem === 'object' && 'fruitCount' in class2R600SamplesItem)
432
+ {
433
+ class2R600SamplesItemObject.fruitCount = (function(){
434
+ if(typeof class2R600SamplesItem.fruitCount !== 'number')
435
+ {
436
+ return Number.isInteger(Number(class2R600SamplesItem.fruitCount)) ? Number(class2R600SamplesItem.fruitCount) : Math.floor(Number(class2R600SamplesItem.fruitCount));
437
+ }
438
+
439
+ return Number.isInteger(class2R600SamplesItem.fruitCount) ? class2R600SamplesItem.fruitCount : Math.floor(class2R600SamplesItem.fruitCount);
440
+ }());
441
+ }
442
+ else
443
+ {
444
+ class2R600SamplesItemObject.fruitCount = 0;
445
+ }
446
+
447
+ if(typeof class2R600SamplesItem === 'object' && 'defects' in class2R600SamplesItem)
448
+ {
449
+ class2R600SamplesItemObject.defects = (function(){
450
+ if(Array.isArray(class2R600SamplesItem.defects) !== true)
451
+ {
452
+ return [];
453
+ }
454
+
455
+ return class2R600SamplesItem.defects.map((defectsItem) => {
456
+ return (function(){
457
+ let defectsItemObject = {};
458
+
459
+ if(typeof defectsItem === 'object' && 'name' in defectsItem)
460
+ {
461
+ defectsItemObject.name = (function(){
462
+ if(typeof defectsItem.name !== 'string')
463
+ {
464
+ return String(defectsItem.name);
465
+ }
466
+
467
+ return defectsItem.name;
468
+ }());
469
+ }
470
+ else
471
+ {
472
+ defectsItemObject.name = "";
473
+ }
474
+
475
+ if(typeof defectsItem === 'object' && 'group' in defectsItem)
476
+ {
477
+ defectsItemObject.group = (function(){
478
+ if(typeof defectsItem.group !== 'string')
479
+ {
480
+ return String(defectsItem.group);
481
+ }
482
+
483
+ return defectsItem.group;
484
+ }());
485
+ }
486
+ else
487
+ {
488
+ defectsItemObject.group = "";
489
+ }
490
+
491
+ if(typeof defectsItem === 'object' && 'fruitCount' in defectsItem)
492
+ {
493
+ defectsItemObject.fruitCount = (function(){
494
+ if(typeof defectsItem.fruitCount !== 'number')
495
+ {
496
+ return Number.isInteger(Number(defectsItem.fruitCount)) ? Number(defectsItem.fruitCount) : Math.floor(Number(defectsItem.fruitCount));
497
+ }
498
+
499
+ return Number.isInteger(defectsItem.fruitCount) ? defectsItem.fruitCount : Math.floor(defectsItem.fruitCount);
500
+ }());
501
+ }
502
+ else
503
+ {
504
+ defectsItemObject.fruitCount = 0;
505
+ }
506
+
507
+ return defectsItemObject;
508
+ }());
509
+ });
510
+ }());
511
+ }
512
+ else
513
+ {
514
+ class2R600SamplesItemObject.defects = [];
515
+ }
516
+
517
+ return class2R600SamplesItemObject;
518
+ }());
519
+ });
520
+ }());
521
+ }
522
+
363
523
  if('categorySummaries' in jsonObject)
364
524
  {
365
525
  model.categorySummaries = (function(){
@@ -222,7 +222,7 @@ class PackingLineModel extends BaseModel
222
222
  /**
223
223
  * The FreshQuality Integration Configuration for this Packing Line
224
224
  *
225
- * @type {?{points: {currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, currentPackrunMaturityAreaSamples: ?number, currentPackrunCustomSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: number[]}}
225
+ * @type {?{points: {currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, currentPackrunMaturityAreaSamples: ?number, currentPackrunCustomSamples: ?number, sampleTypes: ?number, currentPackrunClass2Samples: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], class2SampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: number[]}}
226
226
  * @public
227
227
  */
228
228
  this.freshQualityIntegration = null;
@@ -6488,6 +6488,27 @@ class PackingLineModel extends BaseModel
6488
6488
  {
6489
6489
  pointsObject.sampleTypes = null;
6490
6490
  }
6491
+
6492
+ if(typeof jsonObject['freshQualityIntegration'].points === 'object' && 'currentPackrunClass2Samples' in jsonObject['freshQualityIntegration'].points)
6493
+ {
6494
+ pointsObject.currentPackrunClass2Samples = (function(){
6495
+ if(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples === null)
6496
+ {
6497
+ return null;
6498
+ }
6499
+
6500
+ if(typeof jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples !== 'number')
6501
+ {
6502
+ return Number.isInteger(Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples)) ? Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples) : Math.floor(Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples));
6503
+ }
6504
+
6505
+ return Number.isInteger(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples) ? jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples : Math.floor(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples);
6506
+ }());
6507
+ }
6508
+ else
6509
+ {
6510
+ pointsObject.currentPackrunClass2Samples = null;
6511
+ }
6491
6512
 
6492
6513
  return pointsObject;
6493
6514
  }());
@@ -6525,6 +6546,8 @@ class PackingLineModel extends BaseModel
6525
6546
 
6526
6547
  pointsDefaultValue.sampleTypes = null;
6527
6548
 
6549
+ pointsDefaultValue.currentPackrunClass2Samples = null;
6550
+
6528
6551
  return pointsDefaultValue;
6529
6552
  }());
6530
6553
  }
@@ -6618,6 +6641,31 @@ class PackingLineModel extends BaseModel
6618
6641
  freshQualityIntegrationObject.sampleTypeIds = [];
6619
6642
  }
6620
6643
 
6644
+ if(typeof jsonObject['freshQualityIntegration'] === 'object' && 'class2SampleTypeIds' in jsonObject['freshQualityIntegration'])
6645
+ {
6646
+ freshQualityIntegrationObject.class2SampleTypeIds = (function(){
6647
+ if(Array.isArray(jsonObject['freshQualityIntegration'].class2SampleTypeIds) !== true)
6648
+ {
6649
+ return [];
6650
+ }
6651
+
6652
+ return jsonObject['freshQualityIntegration'].class2SampleTypeIds.map((class2SampleTypeIdsItem) => {
6653
+ return (function(){
6654
+ if(typeof class2SampleTypeIdsItem !== 'number')
6655
+ {
6656
+ return Number.isInteger(Number(class2SampleTypeIdsItem)) ? Number(class2SampleTypeIdsItem) : Math.floor(Number(class2SampleTypeIdsItem));
6657
+ }
6658
+
6659
+ return Number.isInteger(class2SampleTypeIdsItem) ? class2SampleTypeIdsItem : Math.floor(class2SampleTypeIdsItem);
6660
+ }());
6661
+ });
6662
+ }());
6663
+ }
6664
+ else
6665
+ {
6666
+ freshQualityIntegrationObject.class2SampleTypeIds = [];
6667
+ }
6668
+
6621
6669
  if(typeof jsonObject['freshQualityIntegration'] === 'object' && 'rejectAnalysisSampleTypeIds' in jsonObject['freshQualityIntegration'])
6622
6670
  {
6623
6671
  freshQualityIntegrationObject.rejectAnalysisSampleTypeIds = (function(){
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '2.7.2';
2
+ export const version = '2.7.4';