@ricado/api-client 2.5.11 → 2.5.13

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.
@@ -221,7 +221,7 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
221
221
  /**
222
222
  * The FreshQuality Integration Configuration for this Packing Line
223
223
  *
224
- * @type {?{points: {currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[]}}
224
+ * @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, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[]}}
225
225
  * @public
226
226
  */
227
227
 
@@ -4906,6 +4906,22 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4906
4906
  pointsObject.currentPackrunRejectAnalysisSamples = null;
4907
4907
  }
4908
4908
 
4909
+ if (_typeof(jsonObject['freshQualityIntegration'].points) === 'object' && 'currentPackrunMaturityAreaSamples' in jsonObject['freshQualityIntegration'].points) {
4910
+ pointsObject.currentPackrunMaturityAreaSamples = function () {
4911
+ if (jsonObject['freshQualityIntegration'].points.currentPackrunMaturityAreaSamples === null) {
4912
+ return null;
4913
+ }
4914
+
4915
+ if (typeof jsonObject['freshQualityIntegration'].points.currentPackrunMaturityAreaSamples !== 'number') {
4916
+ return Number.isInteger(Number(jsonObject['freshQualityIntegration'].points.currentPackrunMaturityAreaSamples)) ? Number(jsonObject['freshQualityIntegration'].points.currentPackrunMaturityAreaSamples) : Math.floor(Number(jsonObject['freshQualityIntegration'].points.currentPackrunMaturityAreaSamples));
4917
+ }
4918
+
4919
+ return Number.isInteger(jsonObject['freshQualityIntegration'].points.currentPackrunMaturityAreaSamples) ? jsonObject['freshQualityIntegration'].points.currentPackrunMaturityAreaSamples : Math.floor(jsonObject['freshQualityIntegration'].points.currentPackrunMaturityAreaSamples);
4920
+ }();
4921
+ } else {
4922
+ pointsObject.currentPackrunMaturityAreaSamples = null;
4923
+ }
4924
+
4909
4925
  if (_typeof(jsonObject['freshQualityIntegration'].points) === 'object' && 'sampleTypes' in jsonObject['freshQualityIntegration'].points) {
4910
4926
  pointsObject.sampleTypes = function () {
4911
4927
  if (jsonObject['freshQualityIntegration'].points.sampleTypes === null) {
@@ -4938,6 +4954,7 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4938
4954
  pointsDefaultValue.currentPackrunTotalPackingDefectsCount = 0;
4939
4955
  pointsDefaultValue.currentPackrunFutureStorageDefectsCount = 0;
4940
4956
  pointsDefaultValue.currentPackrunRejectAnalysisSamples = null;
4957
+ pointsDefaultValue.currentPackrunMaturityAreaSamples = null;
4941
4958
  pointsDefaultValue.sampleTypes = null;
4942
4959
  return pointsDefaultValue;
4943
4960
  }();
@@ -5031,6 +5048,26 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
5031
5048
  freshQualityIntegrationObject.rejectAnalysisSampleTypeIds = [];
5032
5049
  }
5033
5050
 
5051
+ if (_typeof(jsonObject['freshQualityIntegration']) === 'object' && 'maturityAreaSampleTypeIds' in jsonObject['freshQualityIntegration']) {
5052
+ freshQualityIntegrationObject.maturityAreaSampleTypeIds = function () {
5053
+ if (Array.isArray(jsonObject['freshQualityIntegration'].maturityAreaSampleTypeIds) !== true) {
5054
+ return [];
5055
+ }
5056
+
5057
+ return jsonObject['freshQualityIntegration'].maturityAreaSampleTypeIds.map(function (maturityAreaSampleTypeIdsItem) {
5058
+ return function () {
5059
+ if (typeof maturityAreaSampleTypeIdsItem !== 'number') {
5060
+ return Number.isInteger(Number(maturityAreaSampleTypeIdsItem)) ? Number(maturityAreaSampleTypeIdsItem) : Math.floor(Number(maturityAreaSampleTypeIdsItem));
5061
+ }
5062
+
5063
+ return Number.isInteger(maturityAreaSampleTypeIdsItem) ? maturityAreaSampleTypeIdsItem : Math.floor(maturityAreaSampleTypeIdsItem);
5064
+ }();
5065
+ });
5066
+ }();
5067
+ } else {
5068
+ freshQualityIntegrationObject.maturityAreaSampleTypeIds = [];
5069
+ }
5070
+
5034
5071
  return freshQualityIntegrationObject;
5035
5072
  }();
5036
5073
  }
@@ -205,6 +205,15 @@ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
205
205
  scheduleDefaultValue.breaks = [];
206
206
  return scheduleDefaultValue;
207
207
  }();
208
+ /**
209
+ * The Score Weightings used for this Shift. Represented as a Number between 0.0 and 1.0
210
+ *
211
+ * @type {?{class1TraysPerHour: number, costPerTray: number, qualityR600Ideal: number, customQualities: Array<{id: string, weighting: number}>}}
212
+ * @public
213
+ */
214
+
215
+
216
+ _this.scoreWeightings = null;
208
217
  /**
209
218
  * The Status of this Shift
210
219
  *
@@ -212,7 +221,6 @@ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
212
221
  * @public
213
222
  */
214
223
 
215
-
216
224
  _this.status = "";
217
225
  /**
218
226
  * Whether the Shift has been deleted
@@ -629,6 +637,96 @@ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
629
637
  }();
630
638
  }
631
639
 
640
+ if ('scoreWeightings' in jsonObject) {
641
+ model.scoreWeightings = function () {
642
+ if (jsonObject['scoreWeightings'] === null) {
643
+ return null;
644
+ }
645
+
646
+ var scoreWeightingsObject = {};
647
+
648
+ if (_typeof(jsonObject['scoreWeightings']) === 'object' && 'class1TraysPerHour' in jsonObject['scoreWeightings']) {
649
+ scoreWeightingsObject.class1TraysPerHour = function () {
650
+ if (typeof jsonObject['scoreWeightings'].class1TraysPerHour !== 'number') {
651
+ return Number(jsonObject['scoreWeightings'].class1TraysPerHour);
652
+ }
653
+
654
+ return jsonObject['scoreWeightings'].class1TraysPerHour;
655
+ }();
656
+ } else {
657
+ scoreWeightingsObject.class1TraysPerHour = 0;
658
+ }
659
+
660
+ if (_typeof(jsonObject['scoreWeightings']) === 'object' && 'costPerTray' in jsonObject['scoreWeightings']) {
661
+ scoreWeightingsObject.costPerTray = function () {
662
+ if (typeof jsonObject['scoreWeightings'].costPerTray !== 'number') {
663
+ return Number(jsonObject['scoreWeightings'].costPerTray);
664
+ }
665
+
666
+ return jsonObject['scoreWeightings'].costPerTray;
667
+ }();
668
+ } else {
669
+ scoreWeightingsObject.costPerTray = 0;
670
+ }
671
+
672
+ if (_typeof(jsonObject['scoreWeightings']) === 'object' && 'qualityR600Ideal' in jsonObject['scoreWeightings']) {
673
+ scoreWeightingsObject.qualityR600Ideal = function () {
674
+ if (typeof jsonObject['scoreWeightings'].qualityR600Ideal !== 'number') {
675
+ return Number(jsonObject['scoreWeightings'].qualityR600Ideal);
676
+ }
677
+
678
+ return jsonObject['scoreWeightings'].qualityR600Ideal;
679
+ }();
680
+ } else {
681
+ scoreWeightingsObject.qualityR600Ideal = 0;
682
+ }
683
+
684
+ if (_typeof(jsonObject['scoreWeightings']) === 'object' && 'customQualities' in jsonObject['scoreWeightings']) {
685
+ scoreWeightingsObject.customQualities = function () {
686
+ if (Array.isArray(jsonObject['scoreWeightings'].customQualities) !== true) {
687
+ return [];
688
+ }
689
+
690
+ return jsonObject['scoreWeightings'].customQualities.map(function (customQualitiesItem) {
691
+ return function () {
692
+ var customQualitiesItemObject = {};
693
+
694
+ if (_typeof(customQualitiesItem) === 'object' && 'id' in customQualitiesItem) {
695
+ customQualitiesItemObject.id = function () {
696
+ if (typeof customQualitiesItem.id !== 'string') {
697
+ return String(customQualitiesItem.id);
698
+ }
699
+
700
+ return customQualitiesItem.id;
701
+ }();
702
+ } else {
703
+ customQualitiesItemObject.id = "";
704
+ }
705
+
706
+ if (_typeof(customQualitiesItem) === 'object' && 'weighting' in customQualitiesItem) {
707
+ customQualitiesItemObject.weighting = function () {
708
+ if (typeof customQualitiesItem.weighting !== 'number') {
709
+ return Number(customQualitiesItem.weighting);
710
+ }
711
+
712
+ return customQualitiesItem.weighting;
713
+ }();
714
+ } else {
715
+ customQualitiesItemObject.weighting = 0;
716
+ }
717
+
718
+ return customQualitiesItemObject;
719
+ }();
720
+ });
721
+ }();
722
+ } else {
723
+ scoreWeightingsObject.customQualities = [];
724
+ }
725
+
726
+ return scoreWeightingsObject;
727
+ }();
728
+ }
729
+
632
730
  if ('status' in jsonObject) {
633
731
  model.status = function () {
634
732
  if (typeof jsonObject['status'] !== 'string') {
@@ -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.5.11';
8
+ var version = '2.5.13';
9
9
  exports.version = version;