@ricado/api-client 2.7.1 → 2.7.2

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.
@@ -1460,6 +1460,72 @@ var PackrunController = /*#__PURE__*/function () {
1460
1460
  resultObject.classTypeTotals = [];
1461
1461
  }
1462
1462
 
1463
+ if (_typeof(result) === 'object' && 'classTypeFruitSizeTotals' in result) {
1464
+ resultObject.classTypeFruitSizeTotals = function () {
1465
+ if (Array.isArray(result.classTypeFruitSizeTotals) !== true) {
1466
+ return [];
1467
+ }
1468
+
1469
+ return result.classTypeFruitSizeTotals.map(function (classTypeFruitSizeTotalsItem) {
1470
+ return function () {
1471
+ var classTypeFruitSizeTotalsItemObject = {};
1472
+
1473
+ if (_typeof(classTypeFruitSizeTotalsItem) === 'object' && 'classType' in classTypeFruitSizeTotalsItem) {
1474
+ classTypeFruitSizeTotalsItemObject.classType = function () {
1475
+ if (typeof classTypeFruitSizeTotalsItem.classType !== 'string') {
1476
+ return String(classTypeFruitSizeTotalsItem.classType);
1477
+ }
1478
+
1479
+ return classTypeFruitSizeTotalsItem.classType;
1480
+ }();
1481
+ } else {
1482
+ classTypeFruitSizeTotalsItemObject.classType = "";
1483
+ }
1484
+
1485
+ if (_typeof(classTypeFruitSizeTotalsItem) === 'object' && 'fruitSize' in classTypeFruitSizeTotalsItem) {
1486
+ classTypeFruitSizeTotalsItemObject.fruitSize = function () {
1487
+ if (typeof classTypeFruitSizeTotalsItem.fruitSize !== 'string') {
1488
+ return String(classTypeFruitSizeTotalsItem.fruitSize);
1489
+ }
1490
+
1491
+ return classTypeFruitSizeTotalsItem.fruitSize;
1492
+ }();
1493
+ } else {
1494
+ classTypeFruitSizeTotalsItemObject.fruitSize = "";
1495
+ }
1496
+
1497
+ if (_typeof(classTypeFruitSizeTotalsItem) === 'object' && 'fruitCount' in classTypeFruitSizeTotalsItem) {
1498
+ classTypeFruitSizeTotalsItemObject.fruitCount = function () {
1499
+ if (typeof classTypeFruitSizeTotalsItem.fruitCount !== 'number') {
1500
+ return Number.isInteger(Number(classTypeFruitSizeTotalsItem.fruitCount)) ? Number(classTypeFruitSizeTotalsItem.fruitCount) : Math.floor(Number(classTypeFruitSizeTotalsItem.fruitCount));
1501
+ }
1502
+
1503
+ return Number.isInteger(classTypeFruitSizeTotalsItem.fruitCount) ? classTypeFruitSizeTotalsItem.fruitCount : Math.floor(classTypeFruitSizeTotalsItem.fruitCount);
1504
+ }();
1505
+ } else {
1506
+ classTypeFruitSizeTotalsItemObject.fruitCount = 0;
1507
+ }
1508
+
1509
+ if (_typeof(classTypeFruitSizeTotalsItem) === 'object' && 'fruitWeight' in classTypeFruitSizeTotalsItem) {
1510
+ classTypeFruitSizeTotalsItemObject.fruitWeight = function () {
1511
+ if (typeof classTypeFruitSizeTotalsItem.fruitWeight !== 'number') {
1512
+ return Number(classTypeFruitSizeTotalsItem.fruitWeight);
1513
+ }
1514
+
1515
+ return classTypeFruitSizeTotalsItem.fruitWeight;
1516
+ }();
1517
+ } else {
1518
+ classTypeFruitSizeTotalsItemObject.fruitWeight = 0;
1519
+ }
1520
+
1521
+ return classTypeFruitSizeTotalsItemObject;
1522
+ }();
1523
+ });
1524
+ }();
1525
+ } else {
1526
+ resultObject.classTypeFruitSizeTotals = [];
1527
+ }
1528
+
1463
1529
  if (_typeof(result) === 'object' && 'class1SizerSummary' in result) {
1464
1530
  resultObject.class1SizerSummary = function () {
1465
1531
  if (Array.isArray(result.class1SizerSummary) !== true) {
@@ -2784,6 +2850,17 @@ var _default = PackrunController;
2784
2850
  * @memberof Controllers.Packhouse.Site
2785
2851
  */
2786
2852
 
2853
+ /**
2854
+ * A **ClassTypeFruitSizeTotalItem** Type
2855
+ *
2856
+ * @typedef {Object} PackrunController.ClassTypeFruitSizeTotalItem
2857
+ * @property {string} classType The Class Type
2858
+ * @property {string} fruitSize The Fruit Size
2859
+ * @property {number} fruitCount The Fruit Count
2860
+ * @property {number} fruitWeight The Fruit Weight
2861
+ * @memberof Controllers.Packhouse.Site
2862
+ */
2863
+
2787
2864
  /**
2788
2865
  * A **PackrunSummaryReport** Type
2789
2866
  *
@@ -2811,6 +2888,7 @@ var _default = PackrunController;
2811
2888
  * @property {Object} rejectBinSummary The Reject Bin Summary for the Packrun
2812
2889
  * @property {Object} binTipSummary The Bin Tip Summary for the Packrun
2813
2890
  * @property {Object[]} classTypeTotals An Array of Totals for each Class Type within the Packrun
2891
+ * @property {Array<PackrunController.ClassTypeFruitSizeTotalItem>} classTypeFruitSizeTotals An Array of Totals for each Class Type by Fruit Size within the Packrun
2814
2892
  * @property {Object[]} class1SizerSummary An Array of Class 1 Fruit Summaries by Size for all Sizers within the Packrun
2815
2893
  * @property {number} class1TotalTrays The Total Class 1 Trays for this Packrun
2816
2894
  * @property {number} class1AverageTrayWeight The Average Class 1 Tray Weight for this Packrun
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- var version = '2.7.1';
8
+ var version = '2.7.2';
9
9
  exports.version = version;
package/lib/index.d.ts CHANGED
@@ -17690,6 +17690,27 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackrunController'
17690
17690
  */
17691
17691
  batchSummaries: SizerBatchSummaryItem[];
17692
17692
  };
17693
+ /**
17694
+ * A **ClassTypeFruitSizeTotalItem** Type
17695
+ */
17696
+ type ClassTypeFruitSizeTotalItem = {
17697
+ /**
17698
+ * The Class Type
17699
+ */
17700
+ classType: string;
17701
+ /**
17702
+ * The Fruit Size
17703
+ */
17704
+ fruitSize: string;
17705
+ /**
17706
+ * The Fruit Count
17707
+ */
17708
+ fruitCount: number;
17709
+ /**
17710
+ * The Fruit Weight
17711
+ */
17712
+ fruitWeight: number;
17713
+ };
17693
17714
  /**
17694
17715
  * A **PackrunSummaryReport** Type
17695
17716
  */
@@ -17783,6 +17804,10 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackrunController'
17783
17804
  * An Array of Totals for each Class Type within the Packrun
17784
17805
  */
17785
17806
  classTypeTotals: any[];
17807
+ /**
17808
+ * An Array of Totals for each Class Type by Fruit Size within the Packrun
17809
+ */
17810
+ classTypeFruitSizeTotals: ClassTypeFruitSizeTotalItem[];
17786
17811
  /**
17787
17812
  * An Array of Class 1 Fruit Summaries by Size for all Sizers within the Packrun
17788
17813
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricado/api-client",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "RICADO Gen 4 API Client Library for NodeJS and Browsers",
5
5
  "author": {
6
6
  "name": "Ash Neilson"
@@ -1817,6 +1817,92 @@ class PackrunController
1817
1817
  resultObject.classTypeTotals = [];
1818
1818
  }
1819
1819
 
1820
+ if(typeof result === 'object' && 'classTypeFruitSizeTotals' in result)
1821
+ {
1822
+ resultObject.classTypeFruitSizeTotals = (function(){
1823
+ if(Array.isArray(result.classTypeFruitSizeTotals) !== true)
1824
+ {
1825
+ return [];
1826
+ }
1827
+
1828
+ return result.classTypeFruitSizeTotals.map((classTypeFruitSizeTotalsItem) => {
1829
+ return (function(){
1830
+ let classTypeFruitSizeTotalsItemObject = {};
1831
+
1832
+ if(typeof classTypeFruitSizeTotalsItem === 'object' && 'classType' in classTypeFruitSizeTotalsItem)
1833
+ {
1834
+ classTypeFruitSizeTotalsItemObject.classType = (function(){
1835
+ if(typeof classTypeFruitSizeTotalsItem.classType !== 'string')
1836
+ {
1837
+ return String(classTypeFruitSizeTotalsItem.classType);
1838
+ }
1839
+
1840
+ return classTypeFruitSizeTotalsItem.classType;
1841
+ }());
1842
+ }
1843
+ else
1844
+ {
1845
+ classTypeFruitSizeTotalsItemObject.classType = "";
1846
+ }
1847
+
1848
+ if(typeof classTypeFruitSizeTotalsItem === 'object' && 'fruitSize' in classTypeFruitSizeTotalsItem)
1849
+ {
1850
+ classTypeFruitSizeTotalsItemObject.fruitSize = (function(){
1851
+ if(typeof classTypeFruitSizeTotalsItem.fruitSize !== 'string')
1852
+ {
1853
+ return String(classTypeFruitSizeTotalsItem.fruitSize);
1854
+ }
1855
+
1856
+ return classTypeFruitSizeTotalsItem.fruitSize;
1857
+ }());
1858
+ }
1859
+ else
1860
+ {
1861
+ classTypeFruitSizeTotalsItemObject.fruitSize = "";
1862
+ }
1863
+
1864
+ if(typeof classTypeFruitSizeTotalsItem === 'object' && 'fruitCount' in classTypeFruitSizeTotalsItem)
1865
+ {
1866
+ classTypeFruitSizeTotalsItemObject.fruitCount = (function(){
1867
+ if(typeof classTypeFruitSizeTotalsItem.fruitCount !== 'number')
1868
+ {
1869
+ return Number.isInteger(Number(classTypeFruitSizeTotalsItem.fruitCount)) ? Number(classTypeFruitSizeTotalsItem.fruitCount) : Math.floor(Number(classTypeFruitSizeTotalsItem.fruitCount));
1870
+ }
1871
+
1872
+ return Number.isInteger(classTypeFruitSizeTotalsItem.fruitCount) ? classTypeFruitSizeTotalsItem.fruitCount : Math.floor(classTypeFruitSizeTotalsItem.fruitCount);
1873
+ }());
1874
+ }
1875
+ else
1876
+ {
1877
+ classTypeFruitSizeTotalsItemObject.fruitCount = 0;
1878
+ }
1879
+
1880
+ if(typeof classTypeFruitSizeTotalsItem === 'object' && 'fruitWeight' in classTypeFruitSizeTotalsItem)
1881
+ {
1882
+ classTypeFruitSizeTotalsItemObject.fruitWeight = (function(){
1883
+ if(typeof classTypeFruitSizeTotalsItem.fruitWeight !== 'number')
1884
+ {
1885
+ return Number(classTypeFruitSizeTotalsItem.fruitWeight);
1886
+ }
1887
+
1888
+ return classTypeFruitSizeTotalsItem.fruitWeight;
1889
+ }());
1890
+ }
1891
+ else
1892
+ {
1893
+ classTypeFruitSizeTotalsItemObject.fruitWeight = 0;
1894
+ }
1895
+
1896
+ return classTypeFruitSizeTotalsItemObject;
1897
+ }());
1898
+ });
1899
+ }());
1900
+ }
1901
+ else
1902
+ {
1903
+ resultObject.classTypeFruitSizeTotals = [];
1904
+ }
1905
+
1820
1906
  if(typeof result === 'object' && 'class1SizerSummary' in result)
1821
1907
  {
1822
1908
  resultObject.class1SizerSummary = (function(){
@@ -3436,6 +3522,17 @@ export default PackrunController;
3436
3522
  * @memberof Controllers.Packhouse.Site
3437
3523
  */
3438
3524
 
3525
+ /**
3526
+ * A **ClassTypeFruitSizeTotalItem** Type
3527
+ *
3528
+ * @typedef {Object} PackrunController.ClassTypeFruitSizeTotalItem
3529
+ * @property {string} classType The Class Type
3530
+ * @property {string} fruitSize The Fruit Size
3531
+ * @property {number} fruitCount The Fruit Count
3532
+ * @property {number} fruitWeight The Fruit Weight
3533
+ * @memberof Controllers.Packhouse.Site
3534
+ */
3535
+
3439
3536
  /**
3440
3537
  * A **PackrunSummaryReport** Type
3441
3538
  *
@@ -3463,6 +3560,7 @@ export default PackrunController;
3463
3560
  * @property {Object} rejectBinSummary The Reject Bin Summary for the Packrun
3464
3561
  * @property {Object} binTipSummary The Bin Tip Summary for the Packrun
3465
3562
  * @property {Object[]} classTypeTotals An Array of Totals for each Class Type within the Packrun
3563
+ * @property {Array<PackrunController.ClassTypeFruitSizeTotalItem>} classTypeFruitSizeTotals An Array of Totals for each Class Type by Fruit Size within the Packrun
3466
3564
  * @property {Object[]} class1SizerSummary An Array of Class 1 Fruit Summaries by Size for all Sizers within the Packrun
3467
3565
  * @property {number} class1TotalTrays The Total Class 1 Trays for this Packrun
3468
3566
  * @property {number} class1AverageTrayWeight The Average Class 1 Tray Weight for this Packrun
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '2.7.1';
2
+ export const version = '2.7.2';