@ricado/api-client 2.6.1 → 2.7.1

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 (31) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/MAFSizerController.js +1 -0
  3. package/lib/Controllers/Packhouse/Site/PackrunController.js +139 -0
  4. package/lib/Controllers/Packhouse/Site/ReemoonSizerBatchController.js +915 -0
  5. package/lib/Controllers/Packhouse/Site/ReemoonSizerController.js +300 -0
  6. package/lib/Controllers/Packhouse/Site/ReemoonSizerOutletProductChangeController.js +885 -0
  7. package/lib/Controllers/Packhouse/Site/ReemoonSizerPackrunSummaryController.js +914 -0
  8. package/lib/Controllers/Packhouse/Site/index.js +12 -0
  9. package/lib/Models/Packhouse/Site/MAFSizerModel.js +13 -1
  10. package/lib/Models/Packhouse/Site/ReemoonSizerBatchModel.js +547 -0
  11. package/lib/Models/Packhouse/Site/ReemoonSizerModel.js +1272 -0
  12. package/lib/Models/Packhouse/Site/ReemoonSizerOutletProductChangeModel.js +293 -0
  13. package/lib/Models/Packhouse/Site/ReemoonSizerPackrunSummaryModel.js +461 -0
  14. package/lib/Models/Packhouse/Site/index.js +12 -0
  15. package/lib/PackageVersion.js +1 -1
  16. package/lib/index.d.ts +7155 -5149
  17. package/package.json +1 -1
  18. package/src/Controllers/Packhouse/Site/MAFSizerController.js +1 -0
  19. package/src/Controllers/Packhouse/Site/PackrunController.js +150 -0
  20. package/src/Controllers/Packhouse/Site/ReemoonSizerBatchController.js +1046 -0
  21. package/src/Controllers/Packhouse/Site/ReemoonSizerController.js +277 -0
  22. package/src/Controllers/Packhouse/Site/ReemoonSizerOutletProductChangeController.js +1016 -0
  23. package/src/Controllers/Packhouse/Site/ReemoonSizerPackrunSummaryController.js +1045 -0
  24. package/src/Controllers/Packhouse/Site/index.js +8 -0
  25. package/src/Models/Packhouse/Site/MAFSizerModel.js +17 -1
  26. package/src/Models/Packhouse/Site/ReemoonSizerBatchModel.js +596 -0
  27. package/src/Models/Packhouse/Site/ReemoonSizerModel.js +1576 -0
  28. package/src/Models/Packhouse/Site/ReemoonSizerOutletProductChangeModel.js +280 -0
  29. package/src/Models/Packhouse/Site/ReemoonSizerPackrunSummaryModel.js +501 -0
  30. package/src/Models/Packhouse/Site/index.js +8 -0
  31. package/src/PackageVersion.js +1 -1
@@ -293,6 +293,7 @@ var _default = MAFSizerController;
293
293
  * @typedef {Object} MAFSizerController.ArticleClassType
294
294
  * @property {string} articleName Name of the MAF Sizer Article
295
295
  * @property {string} classType The Class Type for this MAF Sizer Article
296
+ * @property {string} matchType The Match Type used when Evaluating the Product Name
296
297
  * @memberof Controllers.Packhouse.Site
297
298
  */
298
299
 
@@ -2483,6 +2483,136 @@ var PackrunController = /*#__PURE__*/function () {
2483
2483
  return _PackrunModel.default.fromJSON(result, siteId);
2484
2484
  }();
2485
2485
 
2486
+ resolve(resolveValue);
2487
+ }).catch(function (error) {
2488
+ return reject(error);
2489
+ });
2490
+ });
2491
+ }
2492
+ /**
2493
+ * Retrieve Tipped Bins for all Packruns [GET /packhouse/sites/{siteId}/packruns/tippedBins]
2494
+ *
2495
+ * Retrieves the Tipped Bins for all Packruns
2496
+ *
2497
+ * @static
2498
+ * @public
2499
+ * @param {number} siteId The Site ID
2500
+ * @param {Date} createdTimestampBegin Filter by the Timestamp when Packruns were Created. Results Greater than or Equal to Timestamp
2501
+ * @param {Date} createdTimestampEnd Filter by the Timestamp when Packruns were Created. Results Less than or Equal to Timestamp
2502
+ * @return {Promise<Array<PackrunController.PackrunTippedBinsItem>>}
2503
+ */
2504
+
2505
+ }, {
2506
+ key: "getAllTippedBins",
2507
+ value: function getAllTippedBins(siteId, createdTimestampBegin, createdTimestampEnd) {
2508
+ return new Promise(function (resolve, reject) {
2509
+ var queryParameters = {};
2510
+
2511
+ _RequestHelper.default.getRequest("/packhouse/sites/".concat(siteId, "/packruns/tippedBins"), Object.assign(queryParameters, {
2512
+ createdTimestampBegin: createdTimestampBegin,
2513
+ createdTimestampEnd: createdTimestampEnd
2514
+ })).then(function (result) {
2515
+ var resolveValue = function () {
2516
+ if (Array.isArray(result) !== true) {
2517
+ return [];
2518
+ }
2519
+
2520
+ return result.map(function (resultItem) {
2521
+ return function () {
2522
+ var resultItemObject = {};
2523
+
2524
+ if (_typeof(resultItem) === 'object' && 'packrunId' in resultItem) {
2525
+ resultItemObject.packrunId = function () {
2526
+ if (typeof resultItem.packrunId !== 'string') {
2527
+ return String(resultItem.packrunId);
2528
+ }
2529
+
2530
+ return resultItem.packrunId;
2531
+ }();
2532
+ } else {
2533
+ resultItemObject.packrunId = "";
2534
+ }
2535
+
2536
+ if (_typeof(resultItem) === 'object' && 'tippedBins' in resultItem) {
2537
+ resultItemObject.tippedBins = function () {
2538
+ if (typeof resultItem.tippedBins !== 'number') {
2539
+ return Number.isInteger(Number(resultItem.tippedBins)) ? Number(resultItem.tippedBins) : Math.floor(Number(resultItem.tippedBins));
2540
+ }
2541
+
2542
+ return Number.isInteger(resultItem.tippedBins) ? resultItem.tippedBins : Math.floor(resultItem.tippedBins);
2543
+ }();
2544
+ } else {
2545
+ resultItemObject.tippedBins = 0;
2546
+ }
2547
+
2548
+ return resultItemObject;
2549
+ }();
2550
+ });
2551
+ }();
2552
+
2553
+ resolve(resolveValue);
2554
+ }).catch(function (error) {
2555
+ return reject(error);
2556
+ });
2557
+ });
2558
+ }
2559
+ /**
2560
+ * Retrieve Tipped Bins for specified Packruns [POST /packhouse/sites/{siteId}/packruns/tippedBins]
2561
+ *
2562
+ * Retrieves the Tipped Bins for specified Packruns
2563
+ *
2564
+ * @static
2565
+ * @public
2566
+ * @param {number} siteId The Site ID
2567
+ * @param {string[]} packrunIds An Array of Packrun IDs to Fetch Tipped Bins for
2568
+ * @return {Promise<Array<PackrunController.PackrunTippedBinsItem>>}
2569
+ */
2570
+
2571
+ }, {
2572
+ key: "getSpecificTippedBins",
2573
+ value: function getSpecificTippedBins(siteId, packrunIds) {
2574
+ return new Promise(function (resolve, reject) {
2575
+ _RequestHelper.default.postRequest("/packhouse/sites/".concat(siteId, "/packruns/tippedBins"), {
2576
+ packrunIds: packrunIds
2577
+ }).then(function (result) {
2578
+ var resolveValue = function () {
2579
+ if (Array.isArray(result) !== true) {
2580
+ return [];
2581
+ }
2582
+
2583
+ return result.map(function (resultItem) {
2584
+ return function () {
2585
+ var resultItemObject = {};
2586
+
2587
+ if (_typeof(resultItem) === 'object' && 'packrunId' in resultItem) {
2588
+ resultItemObject.packrunId = function () {
2589
+ if (typeof resultItem.packrunId !== 'string') {
2590
+ return String(resultItem.packrunId);
2591
+ }
2592
+
2593
+ return resultItem.packrunId;
2594
+ }();
2595
+ } else {
2596
+ resultItemObject.packrunId = "";
2597
+ }
2598
+
2599
+ if (_typeof(resultItem) === 'object' && 'tippedBins' in resultItem) {
2600
+ resultItemObject.tippedBins = function () {
2601
+ if (typeof resultItem.tippedBins !== 'number') {
2602
+ return Number.isInteger(Number(resultItem.tippedBins)) ? Number(resultItem.tippedBins) : Math.floor(Number(resultItem.tippedBins));
2603
+ }
2604
+
2605
+ return Number.isInteger(resultItem.tippedBins) ? resultItem.tippedBins : Math.floor(resultItem.tippedBins);
2606
+ }();
2607
+ } else {
2608
+ resultItemObject.tippedBins = 0;
2609
+ }
2610
+
2611
+ return resultItemObject;
2612
+ }();
2613
+ });
2614
+ }();
2615
+
2486
2616
  resolve(resolveValue);
2487
2617
  }).catch(function (error) {
2488
2618
  return reject(error);
@@ -2770,6 +2900,15 @@ var _default = PackrunController;
2770
2900
  * @memberof Controllers.Packhouse.Site
2771
2901
  */
2772
2902
 
2903
+ /**
2904
+ * A **PackrunTippedBinsItem** Type
2905
+ *
2906
+ * @typedef {Object} PackrunController.PackrunTippedBinsItem
2907
+ * @property {string} packrunId The Packrun ID
2908
+ * @property {number} tippedBins The Total Tipped Bins for the Packrun
2909
+ * @memberof Controllers.Packhouse.Site
2910
+ */
2911
+
2773
2912
  /**
2774
2913
  * A **TimeBatch** Type
2775
2914
  *