@ricado/api-client 2.3.7 → 2.3.10

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 (43) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/BinTipBinController.js +4 -0
  3. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +2 -0
  4. package/lib/Controllers/Packhouse/Site/MAFSizerBatchController.js +926 -0
  5. package/lib/Controllers/Packhouse/Site/MAFSizerController.js +217 -0
  6. package/lib/Controllers/Packhouse/Site/MAFSizerOutletArticleChangeController.js +879 -0
  7. package/lib/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +922 -0
  8. package/lib/Controllers/Packhouse/Site/PackrunController.js +54 -33
  9. package/lib/Controllers/Packhouse/Site/ShiftController.js +23 -0
  10. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +13 -7
  11. package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +1 -0
  12. package/lib/Controllers/Packhouse/Site/index.js +12 -0
  13. package/lib/Models/Packhouse/Site/BinTipBinModel.js +22 -0
  14. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +26 -0
  15. package/lib/Models/Packhouse/Site/MAFSizerBatchModel.js +555 -0
  16. package/lib/Models/Packhouse/Site/MAFSizerModel.js +445 -0
  17. package/lib/Models/Packhouse/Site/MAFSizerOutletArticleChangeModel.js +253 -0
  18. package/lib/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +473 -0
  19. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +75 -5
  20. package/lib/Models/Packhouse/Site/index.js +12 -0
  21. package/lib/PackageVersion.js +1 -1
  22. package/lib/index.d.ts +4937 -3152
  23. package/package.json +1 -1
  24. package/src/Controllers/Packhouse/Site/BinTipBinController.js +4 -0
  25. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +2 -0
  26. package/src/Controllers/Packhouse/Site/MAFSizerBatchController.js +1057 -0
  27. package/src/Controllers/Packhouse/Site/MAFSizerController.js +194 -0
  28. package/src/Controllers/Packhouse/Site/MAFSizerOutletArticleChangeController.js +1010 -0
  29. package/src/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +1053 -0
  30. package/src/Controllers/Packhouse/Site/PackrunController.js +59 -33
  31. package/src/Controllers/Packhouse/Site/ShiftController.js +22 -0
  32. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +13 -7
  33. package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +1 -0
  34. package/src/Controllers/Packhouse/Site/index.js +8 -0
  35. package/src/Models/Packhouse/Site/BinTipBinModel.js +25 -0
  36. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +29 -0
  37. package/src/Models/Packhouse/Site/MAFSizerBatchModel.js +598 -0
  38. package/src/Models/Packhouse/Site/MAFSizerModel.js +450 -0
  39. package/src/Models/Packhouse/Site/MAFSizerOutletArticleChangeModel.js +235 -0
  40. package/src/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +511 -0
  41. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +85 -5
  42. package/src/Models/Packhouse/Site/index.js +8 -0
  43. package/src/PackageVersion.js +1 -1
@@ -1156,39 +1156,59 @@ var PackrunController = /*#__PURE__*/function () {
1156
1156
 
1157
1157
  return result.compacSizers.map(function (compacSizersItem) {
1158
1158
  return function () {
1159
- var compacSizersItemObject = {};
1159
+ if (_typeof(compacSizersItem) !== 'object') {
1160
+ return Object(compacSizersItem);
1161
+ }
1162
+
1163
+ return compacSizersItem;
1164
+ }();
1165
+ });
1166
+ }();
1167
+ } else {
1168
+ resultObject.compacSizers = [];
1169
+ }
1170
+
1171
+ if (_typeof(result) === 'object' && 'sizers' in result) {
1172
+ resultObject.sizers = function () {
1173
+ if (Array.isArray(result.sizers) !== true) {
1174
+ return [];
1175
+ }
1160
1176
 
1161
- if (_typeof(compacSizersItem) === 'object' && 'id' in compacSizersItem) {
1162
- compacSizersItemObject.id = function () {
1163
- if (typeof compacSizersItem.id !== 'string') {
1164
- return String(compacSizersItem.id);
1177
+ return result.sizers.map(function (sizersItem) {
1178
+ return function () {
1179
+ var sizersItemObject = {};
1180
+
1181
+ if (_typeof(sizersItem) === 'object' && 'id' in sizersItem) {
1182
+ sizersItemObject.id = function () {
1183
+ if (typeof sizersItem.id !== 'string') {
1184
+ return String(sizersItem.id);
1165
1185
  }
1166
1186
 
1167
- return compacSizersItem.id;
1187
+ return sizersItem.id;
1168
1188
  }();
1169
1189
  } else {
1170
- compacSizersItemObject.id = "";
1190
+ sizersItemObject.id = "";
1171
1191
  }
1172
1192
 
1173
- if (_typeof(compacSizersItem) === 'object' && 'name' in compacSizersItem) {
1174
- compacSizersItemObject.name = function () {
1175
- if (typeof compacSizersItem.name !== 'string') {
1176
- return String(compacSizersItem.name);
1193
+ if (_typeof(sizersItem) === 'object' && 'name' in sizersItem) {
1194
+ sizersItemObject.name = function () {
1195
+ if (typeof sizersItem.name !== 'string') {
1196
+ return String(sizersItem.name);
1177
1197
  }
1178
1198
 
1179
- return compacSizersItem.name;
1199
+ return sizersItem.name;
1180
1200
  }();
1181
1201
  } else {
1182
- compacSizersItemObject.name = "";
1202
+ sizersItemObject.name = "";
1183
1203
  }
1184
1204
 
1185
- if (_typeof(compacSizersItem) === 'object' && 'batchSummaries' in compacSizersItem) {
1186
- compacSizersItemObject.batchSummaries = function () {
1187
- if (Array.isArray(compacSizersItem.batchSummaries) !== true) {
1205
+ if (_typeof(sizersItem) === 'object' && 'batchSummaries' in sizersItem) {
1206
+ sizersItemObject.batchSummaries = function () {
1207
+ if (Array.isArray(sizersItem.batchSummaries) !== true) {
1188
1208
  return [];
1189
1209
  }
1190
1210
 
1191
- return compacSizersItem.batchSummaries.map(function (batchSummariesItem) {
1211
+ return sizersItem.batchSummaries.map(function (batchSummariesItem) {
1192
1212
  return function () {
1193
1213
  var batchSummariesItemObject = {};
1194
1214
 
@@ -1317,15 +1337,15 @@ var PackrunController = /*#__PURE__*/function () {
1317
1337
  });
1318
1338
  }();
1319
1339
  } else {
1320
- compacSizersItemObject.batchSummaries = [];
1340
+ sizersItemObject.batchSummaries = [];
1321
1341
  }
1322
1342
 
1323
- return compacSizersItemObject;
1343
+ return sizersItemObject;
1324
1344
  }();
1325
1345
  });
1326
1346
  }();
1327
1347
  } else {
1328
- resultObject.compacSizers = [];
1348
+ resultObject.sizers = [];
1329
1349
  }
1330
1350
 
1331
1351
  if (_typeof(result) === 'object' && 'rejectBinSummary' in result) {
@@ -2042,14 +2062,14 @@ var _default = PackrunController;
2042
2062
  */
2043
2063
 
2044
2064
  /**
2045
- * A **CompacSizerBatchSummaryItem** Type
2065
+ * A **SizerBatchSummaryItem** Type
2046
2066
  *
2047
- * @typedef {Object} PackrunController.CompacSizerBatchSummaryItem
2048
- * @property {string} id The Compac Sizer Batch ID
2049
- * @property {number} number The Compac Sizer Batch Number
2050
- * @property {string} name The Compac Sizer Batch Name
2051
- * @property {string} varietyName The Compac Sizer Variety Name
2052
- * @property {Date} timestamp The Compac Sizer Batch Timestamp
2067
+ * @typedef {Object} PackrunController.SizerBatchSummaryItem
2068
+ * @property {string} id The Sizer Batch ID
2069
+ * @property {number} number The Sizer Batch Number
2070
+ * @property {string} name The Sizer Batch Name
2071
+ * @property {string} varietyName The Sizer Variety Name
2072
+ * @property {Date} timestamp The Sizer Batch Timestamp
2053
2073
  * @property {number} totalFruitCount The Total Fruit Count for the Batch
2054
2074
  * @property {number} totalFruitWeight The Total Fruit Weight (kg) for the Batch
2055
2075
  * @property {number} recycleFruitCount The Recycled Fruit Count for the Batch
@@ -2059,12 +2079,12 @@ var _default = PackrunController;
2059
2079
  */
2060
2080
 
2061
2081
  /**
2062
- * A **CompacSizerItem** Type
2082
+ * A **SizerItem** Type
2063
2083
  *
2064
- * @typedef {Object} PackrunController.CompacSizerItem
2065
- * @property {string} id The Compac Sizer ID
2066
- * @property {string} name The Compac Sizer Name
2067
- * @property {Array<PackrunController.CompacSizerBatchSummaryItem>} batchSummaries An Array of Summarized Batches for the Compac Sizer
2084
+ * @typedef {Object} PackrunController.SizerItem
2085
+ * @property {string} id The Sizer ID
2086
+ * @property {string} name The Sizer Name
2087
+ * @property {Array<PackrunController.SizerBatchSummaryItem>} batchSummaries An Array of Summarized Batches for the Sizer
2068
2088
  * @memberof Controllers.Packhouse.Site
2069
2089
  */
2070
2090
 
@@ -2087,7 +2107,8 @@ var _default = PackrunController;
2087
2107
  * @property {string} packingLineId The Packing Line ID
2088
2108
  * @property {?string} packingLineName The Packing Line Name
2089
2109
  * @property {Array<PackrunController.ClassTypeItem>} classTypes An Array of Class Types for the Packing Line
2090
- * @property {Array<PackrunController.CompacSizerItem>} compacSizers
2110
+ * @property {Object[]} compacSizers *DEPRECATED* - An Array of Summarized Compac Sizer Data
2111
+ * @property {Array<PackrunController.SizerItem>} sizers
2091
2112
  * @property {Object} rejectBinSummary The Reject Bin Summary for the Packrun
2092
2113
  * @property {Object} binTipSummary The Bin Tip Summary for the Packrun
2093
2114
  * @property {Object[]} classTypeTotals An Array of Totals for each Class Type within the Packrun
@@ -753,6 +753,29 @@ var ShiftController = /*#__PURE__*/function () {
753
753
  });
754
754
  });
755
755
  }
756
+ /**
757
+ * Retrieve a Shift Summary Report PDF [GET /packhouse/sites/{siteId}/shifts/{id}/summaryReportPdf]
758
+ *
759
+ * Retrieves a Summary Report PDF for a Shift
760
+ *
761
+ * @static
762
+ * @public
763
+ * @param {number} siteId The Site ID
764
+ * @param {string} id The Shift ID
765
+ * @return {Promise<boolean>}
766
+ */
767
+
768
+ }, {
769
+ key: "getSummaryReportPdf",
770
+ value: function getSummaryReportPdf(siteId, id) {
771
+ return new Promise(function (resolve, reject) {
772
+ _RequestHelper.default.getRequest("/packhouse/sites/".concat(siteId, "/shifts/").concat(id, "/summaryReportPdf")).then(function (result) {
773
+ resolve(result !== null && result !== void 0 ? result : true);
774
+ }).catch(function (error) {
775
+ return reject(error);
776
+ });
777
+ });
778
+ }
756
779
  /**
757
780
  * List all Shifts [GET /packhouse/sites/{siteId}/shifts]
758
781
  *
@@ -852,8 +852,11 @@ var _default = ShiftHourlyEntryController;
852
852
  * @property {?number} [class1Manning] The Number of People working in all Areas except Class 2 for this Hour
853
853
  * @property {?number} [class2Manning] The Number of People working in the Class 2 Area for this Hour
854
854
  * @property {?number} [averageManningTarget] The Average Target Number of People that should be working for this Hour
855
+ * @property {?number} [averageClass1ManningTarget] The Average Target Number of People that should be working in all Areas except Class 2 for this Hour
856
+ * @property {?number} [averageClass2ManningTarget] The Average Target Number of People that should be working in the Class 2 Area for this Hour
855
857
  * @property {?number} [averageCostPerManningUnit] The Average Cost per Person working in all Areas for this Hour
856
- * @property {?number} [layeredTrayPercentage] The Percentage of Total Tray Equivalents that are Layered for this Hour
858
+ * @property {?number} [layeredTrayPercentage] The Actual Percentage of Total Tray Equivalents that are Layered for this Hour
859
+ * @property {?number} [layeredTrayPercentageTarget] The Target Percentage of Total Tray Equivalents that should be Layered for this Hour
857
860
  * @property {?number} [averageClass1Percentage] The Average Class 1 Percentage for this Hour
858
861
  * @property {?number} [qualityR600IdealSamplesPercentage] The Number of Quality R600 Samples that were Ideal for this Hour
859
862
  * @property {?number} [averageQualityR600IdealSamplesTarget] The Average Target Number of Quality R600 Samples that should be Ideal for this Hour
@@ -865,9 +868,9 @@ var _default = ShiftHourlyEntryController;
865
868
  * @property {number} [totalClass1Trays] The Total Number of Class 1 Tray Equivalents Packed for this Hour
866
869
  * @property {number} [totalClass2Trays] The Total Number of Class 2 Tray Equivalents Packed for this Hour
867
870
  * @property {number} [class1TraysPerHourExcludingDowntimeTarget] The Target Number of Class 1 Tray Equivalents that should be Packed excluding all Downtime for this Hour
868
- * @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
871
+ * @property {?number} [averageClass1TraysPerHourAdjustedTarget] The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %) for this Hour
869
872
  * @property {?number} [averageCostPerTray] The Average Cost per Tray Equivalent for this Hour
870
- * @property {?number} [averageCostPerTrayTarget] The Average Cost per Tray Equivalent Target for this Hour
873
+ * @property {?number} [averageCostPerTrayTarget] The Average Cost per Tray Equivalent Target after Adjustment (Class 1 %, Soft-Sort %) for this Hour
871
874
  * @property {?string} [primaryIssueCategory] The Primary Issue Category for this Hourly Entry
872
875
  * @property {?string} [primaryIssueTag] The Primary Issue Tag for this Hourly Entry
873
876
  * @property {?number} [primaryIssuePercentage] A Percentage between 0% and 100% indicating how much the Primary Issue impacted Throughput for this Hourly Entry
@@ -891,8 +894,11 @@ var _default = ShiftHourlyEntryController;
891
894
  * @property {?number} [class1Manning] The Number of People working in all Areas except Class 2 for this Hour
892
895
  * @property {?number} [class2Manning] The Number of People working in the Class 2 Area for this Hour
893
896
  * @property {?number} [averageManningTarget] The Average Target Number of People that should be working for this Hour
897
+ * @property {?number} [averageClass1ManningTarget] The Average Target Number of People that should be working in all Areas except Class 2 for this Hour
898
+ * @property {?number} [averageClass2ManningTarget] The Average Target Number of People that should be working in the Class 2 Area for this Hour
894
899
  * @property {?number} [averageCostPerManningUnit] The Average Cost per Person working in all Areas for this Hour
895
- * @property {?number} [layeredTrayPercentage] The Percentage of Total Tray Equivalents that are Layered for this Hour
900
+ * @property {?number} [layeredTrayPercentage] The Actual Percentage of Total Tray Equivalents that are Layered for this Hour
901
+ * @property {?number} [layeredTrayPercentageTarget] The Target Percentage of Total Tray Equivalents that should be Layered for this Hour
896
902
  * @property {?number} [averageClass1Percentage] The Average Class 1 Percentage for this Hour
897
903
  * @property {?number} [qualityR600IdealSamplesPercentage] The Number of Quality R600 Samples that were Ideal for this Hour
898
904
  * @property {?number} [averageQualityR600IdealSamplesTarget] The Average Target Number of Quality R600 Samples that should be Ideal for this Hour
@@ -904,9 +910,9 @@ var _default = ShiftHourlyEntryController;
904
910
  * @property {number} [totalClass1Trays] The Total Number of Class 1 Tray Equivalents Packed for this Hour
905
911
  * @property {number} [totalClass2Trays] The Total Number of Class 2 Tray Equivalents Packed for this Hour
906
912
  * @property {number} [class1TraysPerHourExcludingDowntimeTarget] The Target Number of Class 1 Tray Equivalents that should be Packed excluding all Downtime for this Hour
907
- * @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
913
+ * @property {?number} [averageClass1TraysPerHourAdjustedTarget] The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %) for this Hour
908
914
  * @property {?number} [averageCostPerTray] The Average Cost per Tray Equivalent for this Hour
909
- * @property {?number} [averageCostPerTrayTarget] The Average Cost per Tray Equivalent Target for this Hour
915
+ * @property {?number} [averageCostPerTrayTarget] The Average Cost per Tray Equivalent Target after Adjustment (Class 1 %, Soft-Sort %) for this Hour
910
916
  * @property {?string} [primaryIssueCategory] The Primary Issue Category for this Hourly Entry
911
917
  * @property {?string} [primaryIssueTag] The Primary Issue Tag for this Hourly Entry
912
918
  * @property {?number} [primaryIssuePercentage] A Percentage between 0% and 100% indicating how much the Primary Issue impacted Throughput for this Hourly Entry
@@ -949,7 +955,7 @@ var _default = ShiftHourlyEntryController;
949
955
  * @property {string} name The Name of this Custom Quality Data Item
950
956
  * @property {string} type The Display Type for this Custom Quality Data Item
951
957
  * @property {number} value The Number Value for this Custom Quality Data Item
952
- * @property {number} averageTarget The Average Target for this Custom Quality Data Item
958
+ * @property {?number} averageTarget The Average Target for this Custom Quality Data Item
953
959
  * @memberof Controllers.Packhouse.Site
954
960
  */
955
961
 
@@ -413,6 +413,7 @@ var _default = SoftSortBeltController;
413
413
  * @property {string[]} [beltIds] A List of Soft-Sort Belt IDs to Filter by
414
414
  * @property {Date} [timestampBegin] The Beginning Timestamp of the Soft-Sort Event Results. Defaults to 24 Hours ago
415
415
  * @property {Date} [timestampEnd] The End Timestamp of the Soft-Sort Event Results. Defaults to Now
416
+ * @property {Date} [packrunId] A Packrun ID to Filter by. Forces `timestampBegin` and `timestampEnd` to be Ignored
416
417
  * @memberof Controllers.Packhouse.Site
417
418
  */
418
419
 
@@ -31,6 +31,14 @@ var _FreshQualityPackrunSummaryController = _interopRequireDefault(require("./Fr
31
31
 
32
32
  var _GrowingMethodController = _interopRequireDefault(require("./GrowingMethodController"));
33
33
 
34
+ var _MAFSizerBatchController = _interopRequireDefault(require("./MAFSizerBatchController"));
35
+
36
+ var _MAFSizerController = _interopRequireDefault(require("./MAFSizerController"));
37
+
38
+ var _MAFSizerOutletArticleChangeController = _interopRequireDefault(require("./MAFSizerOutletArticleChangeController"));
39
+
40
+ var _MAFSizerPackrunSummaryController = _interopRequireDefault(require("./MAFSizerPackrunSummaryController"));
41
+
34
42
  var _PackTypeController = _interopRequireDefault(require("./PackTypeController"));
35
43
 
36
44
  var _PackingLineController = _interopRequireDefault(require("./PackingLineController"));
@@ -84,6 +92,10 @@ var Site = {
84
92
  FreshPackPackrunSummaryController: _FreshPackPackrunSummaryController.default,
85
93
  FreshQualityPackrunSummaryController: _FreshQualityPackrunSummaryController.default,
86
94
  GrowingMethodController: _GrowingMethodController.default,
95
+ MAFSizerBatchController: _MAFSizerBatchController.default,
96
+ MAFSizerController: _MAFSizerController.default,
97
+ MAFSizerOutletArticleChangeController: _MAFSizerOutletArticleChangeController.default,
98
+ MAFSizerPackrunSummaryController: _MAFSizerPackrunSummaryController.default,
87
99
  PackTypeController: _PackTypeController.default,
88
100
  PackingLineController: _PackingLineController.default,
89
101
  PackrunController: _PackrunController.default,
@@ -95,6 +95,14 @@ var BinTipBinModel = /*#__PURE__*/function (_BaseModel) {
95
95
  */
96
96
 
97
97
  _this.binNumber = null;
98
+ /**
99
+ * The Source of the Bin Number
100
+ *
101
+ * @type {?string}
102
+ * @public
103
+ */
104
+
105
+ _this.binNumberSource = null;
98
106
  /**
99
107
  * The Time Batch ID associated with this Bin
100
108
  *
@@ -252,6 +260,20 @@ var BinTipBinModel = /*#__PURE__*/function (_BaseModel) {
252
260
  }();
253
261
  }
254
262
 
263
+ if ('binNumberSource' in jsonObject) {
264
+ model.binNumberSource = function () {
265
+ if (jsonObject['binNumberSource'] === null) {
266
+ return null;
267
+ }
268
+
269
+ if (typeof jsonObject['binNumberSource'] !== 'string') {
270
+ return String(jsonObject['binNumberSource']);
271
+ }
272
+
273
+ return jsonObject['binNumberSource'];
274
+ }();
275
+ }
276
+
255
277
  if ('timeBatchId' in jsonObject) {
256
278
  model.timeBatchId = function () {
257
279
  if (jsonObject['timeBatchId'] === null) {
@@ -103,6 +103,14 @@ var FreshPackPackrunSummaryModel = /*#__PURE__*/function (_BaseModel) {
103
103
  */
104
104
 
105
105
  _this.traySummaries = [];
106
+ /**
107
+ * An Array of Clearance Summary Data Objects for all Sizes
108
+ *
109
+ * @type {Object[]}
110
+ * @public
111
+ */
112
+
113
+ _this.clearanceSummaries = [];
106
114
  /**
107
115
  * Whether the FreshPack Packrun Summary has been deleted
108
116
  *
@@ -230,6 +238,24 @@ var FreshPackPackrunSummaryModel = /*#__PURE__*/function (_BaseModel) {
230
238
  }();
231
239
  }
232
240
 
241
+ if ('clearanceSummaries' in jsonObject) {
242
+ model.clearanceSummaries = function () {
243
+ if (Array.isArray(jsonObject['clearanceSummaries']) !== true) {
244
+ return [];
245
+ }
246
+
247
+ return jsonObject['clearanceSummaries'].map(function (clearanceSummariesItem) {
248
+ return function () {
249
+ if (_typeof(clearanceSummariesItem) !== 'object') {
250
+ return Object(clearanceSummariesItem);
251
+ }
252
+
253
+ return clearanceSummariesItem;
254
+ }();
255
+ });
256
+ }();
257
+ }
258
+
233
259
  if ('deleted' in jsonObject) {
234
260
  model.deleted = function () {
235
261
  if (typeof jsonObject['deleted'] !== 'boolean') {