@ricado/api-client 2.3.9 → 2.3.12

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 (39) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/MAFSizerBatchController.js +926 -0
  3. package/lib/Controllers/Packhouse/Site/MAFSizerController.js +217 -0
  4. package/lib/Controllers/Packhouse/Site/MAFSizerOutletArticleChangeController.js +879 -0
  5. package/lib/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +922 -0
  6. package/lib/Controllers/Packhouse/Site/PackrunController.js +54 -33
  7. package/lib/Controllers/Packhouse/Site/ShiftController.js +23 -0
  8. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +13 -7
  9. package/lib/Controllers/Packhouse/Site/ShiftSummaryReportController.js +908 -0
  10. package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +1 -0
  11. package/lib/Controllers/Packhouse/Site/index.js +15 -0
  12. package/lib/Models/Packhouse/Site/MAFSizerBatchModel.js +555 -0
  13. package/lib/Models/Packhouse/Site/MAFSizerModel.js +445 -0
  14. package/lib/Models/Packhouse/Site/MAFSizerOutletArticleChangeModel.js +253 -0
  15. package/lib/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +473 -0
  16. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +75 -5
  17. package/lib/Models/Packhouse/Site/ShiftSummaryReportModel.js +427 -0
  18. package/lib/Models/Packhouse/Site/index.js +15 -0
  19. package/lib/PackageVersion.js +2 -2
  20. package/lib/index.d.ts +5434 -3242
  21. package/package.json +1 -1
  22. package/src/Controllers/Packhouse/Site/MAFSizerBatchController.js +1057 -0
  23. package/src/Controllers/Packhouse/Site/MAFSizerController.js +194 -0
  24. package/src/Controllers/Packhouse/Site/MAFSizerOutletArticleChangeController.js +1010 -0
  25. package/src/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +1053 -0
  26. package/src/Controllers/Packhouse/Site/PackrunController.js +59 -33
  27. package/src/Controllers/Packhouse/Site/ShiftController.js +22 -0
  28. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +13 -7
  29. package/src/Controllers/Packhouse/Site/ShiftSummaryReportController.js +1039 -0
  30. package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +1 -0
  31. package/src/Controllers/Packhouse/Site/index.js +10 -0
  32. package/src/Models/Packhouse/Site/MAFSizerBatchModel.js +598 -0
  33. package/src/Models/Packhouse/Site/MAFSizerModel.js +450 -0
  34. package/src/Models/Packhouse/Site/MAFSizerOutletArticleChangeModel.js +235 -0
  35. package/src/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +511 -0
  36. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +85 -5
  37. package/src/Models/Packhouse/Site/ShiftSummaryReportModel.js +451 -0
  38. package/src/Models/Packhouse/Site/index.js +10 -0
  39. package/src/PackageVersion.js +2 -2
@@ -1420,49 +1420,74 @@ class PackrunController
1420
1420
 
1421
1421
  return result.compacSizers.map((compacSizersItem) => {
1422
1422
  return (function(){
1423
- let compacSizersItemObject = {};
1423
+ if(typeof compacSizersItem !== 'object')
1424
+ {
1425
+ return Object(compacSizersItem);
1426
+ }
1427
+
1428
+ return compacSizersItem;
1429
+ }());
1430
+ });
1431
+ }());
1432
+ }
1433
+ else
1434
+ {
1435
+ resultObject.compacSizers = [];
1436
+ }
1437
+
1438
+ if(typeof result === 'object' && 'sizers' in result)
1439
+ {
1440
+ resultObject.sizers = (function(){
1441
+ if(Array.isArray(result.sizers) !== true)
1442
+ {
1443
+ return [];
1444
+ }
1445
+
1446
+ return result.sizers.map((sizersItem) => {
1447
+ return (function(){
1448
+ let sizersItemObject = {};
1424
1449
 
1425
- if(typeof compacSizersItem === 'object' && 'id' in compacSizersItem)
1450
+ if(typeof sizersItem === 'object' && 'id' in sizersItem)
1426
1451
  {
1427
- compacSizersItemObject.id = (function(){
1428
- if(typeof compacSizersItem.id !== 'string')
1452
+ sizersItemObject.id = (function(){
1453
+ if(typeof sizersItem.id !== 'string')
1429
1454
  {
1430
- return String(compacSizersItem.id);
1455
+ return String(sizersItem.id);
1431
1456
  }
1432
1457
 
1433
- return compacSizersItem.id;
1458
+ return sizersItem.id;
1434
1459
  }());
1435
1460
  }
1436
1461
  else
1437
1462
  {
1438
- compacSizersItemObject.id = "";
1463
+ sizersItemObject.id = "";
1439
1464
  }
1440
1465
 
1441
- if(typeof compacSizersItem === 'object' && 'name' in compacSizersItem)
1466
+ if(typeof sizersItem === 'object' && 'name' in sizersItem)
1442
1467
  {
1443
- compacSizersItemObject.name = (function(){
1444
- if(typeof compacSizersItem.name !== 'string')
1468
+ sizersItemObject.name = (function(){
1469
+ if(typeof sizersItem.name !== 'string')
1445
1470
  {
1446
- return String(compacSizersItem.name);
1471
+ return String(sizersItem.name);
1447
1472
  }
1448
1473
 
1449
- return compacSizersItem.name;
1474
+ return sizersItem.name;
1450
1475
  }());
1451
1476
  }
1452
1477
  else
1453
1478
  {
1454
- compacSizersItemObject.name = "";
1479
+ sizersItemObject.name = "";
1455
1480
  }
1456
1481
 
1457
- if(typeof compacSizersItem === 'object' && 'batchSummaries' in compacSizersItem)
1482
+ if(typeof sizersItem === 'object' && 'batchSummaries' in sizersItem)
1458
1483
  {
1459
- compacSizersItemObject.batchSummaries = (function(){
1460
- if(Array.isArray(compacSizersItem.batchSummaries) !== true)
1484
+ sizersItemObject.batchSummaries = (function(){
1485
+ if(Array.isArray(sizersItem.batchSummaries) !== true)
1461
1486
  {
1462
1487
  return [];
1463
1488
  }
1464
1489
 
1465
- return compacSizersItem.batchSummaries.map((batchSummariesItem) => {
1490
+ return sizersItem.batchSummaries.map((batchSummariesItem) => {
1466
1491
  return (function(){
1467
1492
  let batchSummariesItemObject = {};
1468
1493
 
@@ -1633,17 +1658,17 @@ class PackrunController
1633
1658
  }
1634
1659
  else
1635
1660
  {
1636
- compacSizersItemObject.batchSummaries = [];
1661
+ sizersItemObject.batchSummaries = [];
1637
1662
  }
1638
1663
 
1639
- return compacSizersItemObject;
1664
+ return sizersItemObject;
1640
1665
  }());
1641
1666
  });
1642
1667
  }());
1643
1668
  }
1644
1669
  else
1645
1670
  {
1646
- resultObject.compacSizers = [];
1671
+ resultObject.sizers = [];
1647
1672
  }
1648
1673
 
1649
1674
  if(typeof result === 'object' && 'rejectBinSummary' in result)
@@ -2502,14 +2527,14 @@ export default PackrunController;
2502
2527
  */
2503
2528
 
2504
2529
  /**
2505
- * A **CompacSizerBatchSummaryItem** Type
2530
+ * A **SizerBatchSummaryItem** Type
2506
2531
  *
2507
- * @typedef {Object} PackrunController.CompacSizerBatchSummaryItem
2508
- * @property {string} id The Compac Sizer Batch ID
2509
- * @property {number} number The Compac Sizer Batch Number
2510
- * @property {string} name The Compac Sizer Batch Name
2511
- * @property {string} varietyName The Compac Sizer Variety Name
2512
- * @property {Date} timestamp The Compac Sizer Batch Timestamp
2532
+ * @typedef {Object} PackrunController.SizerBatchSummaryItem
2533
+ * @property {string} id The Sizer Batch ID
2534
+ * @property {number} number The Sizer Batch Number
2535
+ * @property {string} name The Sizer Batch Name
2536
+ * @property {string} varietyName The Sizer Variety Name
2537
+ * @property {Date} timestamp The Sizer Batch Timestamp
2513
2538
  * @property {number} totalFruitCount The Total Fruit Count for the Batch
2514
2539
  * @property {number} totalFruitWeight The Total Fruit Weight (kg) for the Batch
2515
2540
  * @property {number} recycleFruitCount The Recycled Fruit Count for the Batch
@@ -2519,12 +2544,12 @@ export default PackrunController;
2519
2544
  */
2520
2545
 
2521
2546
  /**
2522
- * A **CompacSizerItem** Type
2547
+ * A **SizerItem** Type
2523
2548
  *
2524
- * @typedef {Object} PackrunController.CompacSizerItem
2525
- * @property {string} id The Compac Sizer ID
2526
- * @property {string} name The Compac Sizer Name
2527
- * @property {Array<PackrunController.CompacSizerBatchSummaryItem>} batchSummaries An Array of Summarized Batches for the Compac Sizer
2549
+ * @typedef {Object} PackrunController.SizerItem
2550
+ * @property {string} id The Sizer ID
2551
+ * @property {string} name The Sizer Name
2552
+ * @property {Array<PackrunController.SizerBatchSummaryItem>} batchSummaries An Array of Summarized Batches for the Sizer
2528
2553
  * @memberof Controllers.Packhouse.Site
2529
2554
  */
2530
2555
 
@@ -2547,7 +2572,8 @@ export default PackrunController;
2547
2572
  * @property {string} packingLineId The Packing Line ID
2548
2573
  * @property {?string} packingLineName The Packing Line Name
2549
2574
  * @property {Array<PackrunController.ClassTypeItem>} classTypes An Array of Class Types for the Packing Line
2550
- * @property {Array<PackrunController.CompacSizerItem>} compacSizers
2575
+ * @property {Object[]} compacSizers *DEPRECATED* - An Array of Summarized Compac Sizer Data
2576
+ * @property {Array<PackrunController.SizerItem>} sizers
2551
2577
  * @property {Object} rejectBinSummary The Reject Bin Summary for the Packrun
2552
2578
  * @property {Object} binTipSummary The Bin Tip Summary for the Packrun
2553
2579
  * @property {Object[]} classTypeTotals An Array of Totals for each Class Type within the Packrun
@@ -891,6 +891,28 @@ class ShiftController
891
891
  });
892
892
  }
893
893
 
894
+ /**
895
+ * Retrieve a Shift Summary Report PDF [GET /packhouse/sites/{siteId}/shifts/{id}/summaryReportPdf]
896
+ *
897
+ * Retrieves a Summary Report PDF for a Shift
898
+ *
899
+ * @static
900
+ * @public
901
+ * @param {number} siteId The Site ID
902
+ * @param {string} id The Shift ID
903
+ * @return {Promise<boolean>}
904
+ */
905
+ static getSummaryReportPdf(siteId, id)
906
+ {
907
+ return new Promise((resolve, reject) => {
908
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/shifts/${id}/summaryReportPdf`)
909
+ .then((result) => {
910
+ resolve(result ?? true);
911
+ })
912
+ .catch(error => reject(error));
913
+ });
914
+ }
915
+
894
916
  /**
895
917
  * List all Shifts [GET /packhouse/sites/{siteId}/shifts]
896
918
  *
@@ -985,8 +985,11 @@ export default ShiftHourlyEntryController;
985
985
  * @property {?number} [class1Manning] The Number of People working in all Areas except Class 2 for this Hour
986
986
  * @property {?number} [class2Manning] The Number of People working in the Class 2 Area for this Hour
987
987
  * @property {?number} [averageManningTarget] The Average Target Number of People that should be working for this Hour
988
+ * @property {?number} [averageClass1ManningTarget] The Average Target Number of People that should be working in all Areas except Class 2 for this Hour
989
+ * @property {?number} [averageClass2ManningTarget] The Average Target Number of People that should be working in the Class 2 Area for this Hour
988
990
  * @property {?number} [averageCostPerManningUnit] The Average Cost per Person working in all Areas for this Hour
989
- * @property {?number} [layeredTrayPercentage] The Percentage of Total Tray Equivalents that are Layered for this Hour
991
+ * @property {?number} [layeredTrayPercentage] The Actual Percentage of Total Tray Equivalents that are Layered for this Hour
992
+ * @property {?number} [layeredTrayPercentageTarget] The Target Percentage of Total Tray Equivalents that should be Layered for this Hour
990
993
  * @property {?number} [averageClass1Percentage] The Average Class 1 Percentage for this Hour
991
994
  * @property {?number} [qualityR600IdealSamplesPercentage] The Number of Quality R600 Samples that were Ideal for this Hour
992
995
  * @property {?number} [averageQualityR600IdealSamplesTarget] The Average Target Number of Quality R600 Samples that should be Ideal for this Hour
@@ -998,9 +1001,9 @@ export default ShiftHourlyEntryController;
998
1001
  * @property {number} [totalClass1Trays] The Total Number of Class 1 Tray Equivalents Packed for this Hour
999
1002
  * @property {number} [totalClass2Trays] The Total Number of Class 2 Tray Equivalents Packed for this Hour
1000
1003
  * @property {number} [class1TraysPerHourExcludingDowntimeTarget] The Target Number of Class 1 Tray Equivalents that should be Packed excluding all Downtime for this Hour
1001
- * @property {?number} [averageClass1TraysPerHourAdjustedTarget] The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %, Class 1 %, Soft-Sort %) for this Hour
1004
+ * @property {?number} [averageClass1TraysPerHourAdjustedTarget] The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %) for this Hour
1002
1005
  * @property {?number} [averageCostPerTray] The Average Cost per Tray Equivalent for this Hour
1003
- * @property {?number} [averageCostPerTrayTarget] The Average Cost per Tray Equivalent Target for this Hour
1006
+ * @property {?number} [averageCostPerTrayTarget] The Average Cost per Tray Equivalent Target after Adjustment (Class 1 %, Soft-Sort %) for this Hour
1004
1007
  * @property {?string} [primaryIssueCategory] The Primary Issue Category for this Hourly Entry
1005
1008
  * @property {?string} [primaryIssueTag] The Primary Issue Tag for this Hourly Entry
1006
1009
  * @property {?number} [primaryIssuePercentage] A Percentage between 0% and 100% indicating how much the Primary Issue impacted Throughput for this Hourly Entry
@@ -1024,8 +1027,11 @@ export default ShiftHourlyEntryController;
1024
1027
  * @property {?number} [class1Manning] The Number of People working in all Areas except Class 2 for this Hour
1025
1028
  * @property {?number} [class2Manning] The Number of People working in the Class 2 Area for this Hour
1026
1029
  * @property {?number} [averageManningTarget] The Average Target Number of People that should be working for this Hour
1030
+ * @property {?number} [averageClass1ManningTarget] The Average Target Number of People that should be working in all Areas except Class 2 for this Hour
1031
+ * @property {?number} [averageClass2ManningTarget] The Average Target Number of People that should be working in the Class 2 Area for this Hour
1027
1032
  * @property {?number} [averageCostPerManningUnit] The Average Cost per Person working in all Areas for this Hour
1028
- * @property {?number} [layeredTrayPercentage] The Percentage of Total Tray Equivalents that are Layered for this Hour
1033
+ * @property {?number} [layeredTrayPercentage] The Actual Percentage of Total Tray Equivalents that are Layered for this Hour
1034
+ * @property {?number} [layeredTrayPercentageTarget] The Target Percentage of Total Tray Equivalents that should be Layered for this Hour
1029
1035
  * @property {?number} [averageClass1Percentage] The Average Class 1 Percentage for this Hour
1030
1036
  * @property {?number} [qualityR600IdealSamplesPercentage] The Number of Quality R600 Samples that were Ideal for this Hour
1031
1037
  * @property {?number} [averageQualityR600IdealSamplesTarget] The Average Target Number of Quality R600 Samples that should be Ideal for this Hour
@@ -1037,9 +1043,9 @@ export default ShiftHourlyEntryController;
1037
1043
  * @property {number} [totalClass1Trays] The Total Number of Class 1 Tray Equivalents Packed for this Hour
1038
1044
  * @property {number} [totalClass2Trays] The Total Number of Class 2 Tray Equivalents Packed for this Hour
1039
1045
  * @property {number} [class1TraysPerHourExcludingDowntimeTarget] The Target Number of Class 1 Tray Equivalents that should be Packed excluding all Downtime for this Hour
1040
- * @property {?number} [averageClass1TraysPerHourAdjustedTarget] The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %, Class 1 %, Soft-Sort %) for this Hour
1046
+ * @property {?number} [averageClass1TraysPerHourAdjustedTarget] The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %) for this Hour
1041
1047
  * @property {?number} [averageCostPerTray] The Average Cost per Tray Equivalent for this Hour
1042
- * @property {?number} [averageCostPerTrayTarget] The Average Cost per Tray Equivalent Target for this Hour
1048
+ * @property {?number} [averageCostPerTrayTarget] The Average Cost per Tray Equivalent Target after Adjustment (Class 1 %, Soft-Sort %) for this Hour
1043
1049
  * @property {?string} [primaryIssueCategory] The Primary Issue Category for this Hourly Entry
1044
1050
  * @property {?string} [primaryIssueTag] The Primary Issue Tag for this Hourly Entry
1045
1051
  * @property {?number} [primaryIssuePercentage] A Percentage between 0% and 100% indicating how much the Primary Issue impacted Throughput for this Hourly Entry
@@ -1082,6 +1088,6 @@ export default ShiftHourlyEntryController;
1082
1088
  * @property {string} name The Name of this Custom Quality Data Item
1083
1089
  * @property {string} type The Display Type for this Custom Quality Data Item
1084
1090
  * @property {number} value The Number Value for this Custom Quality Data Item
1085
- * @property {number} averageTarget The Average Target for this Custom Quality Data Item
1091
+ * @property {?number} averageTarget The Average Target for this Custom Quality Data Item
1086
1092
  * @memberof Controllers.Packhouse.Site
1087
1093
  */