@ricado/api-client 2.6.0 → 2.6.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.
@@ -666,7 +666,7 @@ var _default = PackingLineController;
666
666
  * A **FreshQualityIntegration** Type
667
667
  *
668
668
  * @typedef {Object} PackingLineController.FreshQualityIntegration
669
- * @property {{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}} points The Points used for this FreshQuality Integration
669
+ * @property {{currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, currentPackrunMaturityAreaSamples: ?number, currentPackrunCustomSamples: ?number, sampleTypes: ?number}} points The Points used for this FreshQuality Integration
670
670
  * @property {boolean} enabled Whether the FreshQuality Integration is Enabled on this Packing Line
671
671
  * @property {string} username Username for Authenticating with the FreshQuality API
672
672
  * @property {string} password Password for Authenticating with the FreshQuality API
@@ -674,6 +674,7 @@ var _default = PackingLineController;
674
674
  * @property {number[]} sampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Class 1 R600 on this Packing Line
675
675
  * @property {number[]} rejectAnalysisSampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Reject Analysis on this Packing Line
676
676
  * @property {number[]} maturityAreaSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Maturity Area Samples on this Packing Line
677
+ * @property {number[]} customSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Custom Samples on this Packing Line
677
678
  * @memberof Controllers.Packhouse.Site
678
679
  */
679
680
 
@@ -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, currentPackrunMaturityAreaSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: 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, currentPackrunCustomSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: number[]}}
225
225
  * @public
226
226
  */
227
227
 
@@ -4922,6 +4922,22 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4922
4922
  pointsObject.currentPackrunMaturityAreaSamples = null;
4923
4923
  }
4924
4924
 
4925
+ if (_typeof(jsonObject['freshQualityIntegration'].points) === 'object' && 'currentPackrunCustomSamples' in jsonObject['freshQualityIntegration'].points) {
4926
+ pointsObject.currentPackrunCustomSamples = function () {
4927
+ if (jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples === null) {
4928
+ return null;
4929
+ }
4930
+
4931
+ if (typeof jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples !== 'number') {
4932
+ return Number.isInteger(Number(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples)) ? Number(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples) : Math.floor(Number(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples));
4933
+ }
4934
+
4935
+ return Number.isInteger(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples) ? jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples : Math.floor(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples);
4936
+ }();
4937
+ } else {
4938
+ pointsObject.currentPackrunCustomSamples = null;
4939
+ }
4940
+
4925
4941
  if (_typeof(jsonObject['freshQualityIntegration'].points) === 'object' && 'sampleTypes' in jsonObject['freshQualityIntegration'].points) {
4926
4942
  pointsObject.sampleTypes = function () {
4927
4943
  if (jsonObject['freshQualityIntegration'].points.sampleTypes === null) {
@@ -4955,6 +4971,7 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4955
4971
  pointsDefaultValue.currentPackrunFutureStorageDefectsCount = 0;
4956
4972
  pointsDefaultValue.currentPackrunRejectAnalysisSamples = null;
4957
4973
  pointsDefaultValue.currentPackrunMaturityAreaSamples = null;
4974
+ pointsDefaultValue.currentPackrunCustomSamples = null;
4958
4975
  pointsDefaultValue.sampleTypes = null;
4959
4976
  return pointsDefaultValue;
4960
4977
  }();
@@ -5068,6 +5085,26 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
5068
5085
  freshQualityIntegrationObject.maturityAreaSampleTypeIds = [];
5069
5086
  }
5070
5087
 
5088
+ if (_typeof(jsonObject['freshQualityIntegration']) === 'object' && 'customSampleTypeIds' in jsonObject['freshQualityIntegration']) {
5089
+ freshQualityIntegrationObject.customSampleTypeIds = function () {
5090
+ if (Array.isArray(jsonObject['freshQualityIntegration'].customSampleTypeIds) !== true) {
5091
+ return [];
5092
+ }
5093
+
5094
+ return jsonObject['freshQualityIntegration'].customSampleTypeIds.map(function (customSampleTypeIdsItem) {
5095
+ return function () {
5096
+ if (typeof customSampleTypeIdsItem !== 'number') {
5097
+ return Number.isInteger(Number(customSampleTypeIdsItem)) ? Number(customSampleTypeIdsItem) : Math.floor(Number(customSampleTypeIdsItem));
5098
+ }
5099
+
5100
+ return Number.isInteger(customSampleTypeIdsItem) ? customSampleTypeIdsItem : Math.floor(customSampleTypeIdsItem);
5101
+ }();
5102
+ });
5103
+ }();
5104
+ } else {
5105
+ freshQualityIntegrationObject.customSampleTypeIds = [];
5106
+ }
5107
+
5071
5108
  return freshQualityIntegrationObject;
5072
5109
  }();
5073
5110
  }
@@ -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.6.0';
8
+ var version = '2.6.1';
9
9
  exports.version = version;
package/lib/index.d.ts CHANGED
@@ -17063,6 +17063,7 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackingLineControl
17063
17063
  currentPackrunFutureStorageDefectsCount: number;
17064
17064
  currentPackrunRejectAnalysisSamples: number | null;
17065
17065
  currentPackrunMaturityAreaSamples: number | null;
17066
+ currentPackrunCustomSamples: number | null;
17066
17067
  sampleTypes: number | null;
17067
17068
  };
17068
17069
  /**
@@ -17093,6 +17094,10 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackingLineControl
17093
17094
  * An Array of FreshQuality Sample Type IDs that should be fetched for Maturity Area Samples on this Packing Line
17094
17095
  */
17095
17096
  maturityAreaSampleTypeIds: number[];
17097
+ /**
17098
+ * An Array of FreshQuality Sample Type IDs that should be fetched for Custom Samples on this Packing Line
17099
+ */
17100
+ customSampleTypeIds: number[];
17096
17101
  };
17097
17102
  }
17098
17103
  import PackingLineModel from "@ricado/api-client/Models/Packhouse/Site/PackingLineModel";
@@ -28068,7 +28073,7 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
28068
28073
  /**
28069
28074
  * The FreshQuality Integration Configuration for this Packing Line
28070
28075
  *
28071
- * @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[]}}
28076
+ * @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, currentPackrunCustomSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: number[]}}
28072
28077
  * @public
28073
28078
  */
28074
28079
  freshQualityIntegration: {
@@ -28085,6 +28090,7 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
28085
28090
  currentPackrunFutureStorageDefectsCount: number;
28086
28091
  currentPackrunRejectAnalysisSamples: number | null;
28087
28092
  currentPackrunMaturityAreaSamples: number | null;
28093
+ currentPackrunCustomSamples: number | null;
28088
28094
  sampleTypes: number | null;
28089
28095
  };
28090
28096
  enabled: boolean;
@@ -28094,6 +28100,7 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
28094
28100
  sampleTypeIds: number[];
28095
28101
  rejectAnalysisSampleTypeIds: number[];
28096
28102
  maturityAreaSampleTypeIds: number[];
28103
+ customSampleTypeIds: number[];
28097
28104
  } | null;
28098
28105
  /**
28099
28106
  * Whether the Packing Line has been deleted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricado/api-client",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "RICADO Gen 4 API Client Library for NodeJS and Browsers",
5
5
  "author": {
6
6
  "name": "Ash Neilson"
@@ -645,7 +645,7 @@ export default PackingLineController;
645
645
  * A **FreshQualityIntegration** Type
646
646
  *
647
647
  * @typedef {Object} PackingLineController.FreshQualityIntegration
648
- * @property {{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}} points The Points used for this FreshQuality Integration
648
+ * @property {{currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, currentPackrunMaturityAreaSamples: ?number, currentPackrunCustomSamples: ?number, sampleTypes: ?number}} points The Points used for this FreshQuality Integration
649
649
  * @property {boolean} enabled Whether the FreshQuality Integration is Enabled on this Packing Line
650
650
  * @property {string} username Username for Authenticating with the FreshQuality API
651
651
  * @property {string} password Password for Authenticating with the FreshQuality API
@@ -653,5 +653,6 @@ export default PackingLineController;
653
653
  * @property {number[]} sampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Class 1 R600 on this Packing Line
654
654
  * @property {number[]} rejectAnalysisSampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Reject Analysis on this Packing Line
655
655
  * @property {number[]} maturityAreaSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Maturity Area Samples on this Packing Line
656
+ * @property {number[]} customSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Custom Samples on this Packing Line
656
657
  * @memberof Controllers.Packhouse.Site
657
658
  */
@@ -222,7 +222,7 @@ class PackingLineModel extends BaseModel
222
222
  /**
223
223
  * The FreshQuality Integration Configuration for this Packing Line
224
224
  *
225
- * @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
+ * @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, currentPackrunCustomSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: number[]}}
226
226
  * @public
227
227
  */
228
228
  this.freshQualityIntegration = null;
@@ -6447,6 +6447,27 @@ class PackingLineModel extends BaseModel
6447
6447
  pointsObject.currentPackrunMaturityAreaSamples = null;
6448
6448
  }
6449
6449
 
6450
+ if(typeof jsonObject['freshQualityIntegration'].points === 'object' && 'currentPackrunCustomSamples' in jsonObject['freshQualityIntegration'].points)
6451
+ {
6452
+ pointsObject.currentPackrunCustomSamples = (function(){
6453
+ if(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples === null)
6454
+ {
6455
+ return null;
6456
+ }
6457
+
6458
+ if(typeof jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples !== 'number')
6459
+ {
6460
+ return Number.isInteger(Number(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples)) ? Number(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples) : Math.floor(Number(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples));
6461
+ }
6462
+
6463
+ return Number.isInteger(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples) ? jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples : Math.floor(jsonObject['freshQualityIntegration'].points.currentPackrunCustomSamples);
6464
+ }());
6465
+ }
6466
+ else
6467
+ {
6468
+ pointsObject.currentPackrunCustomSamples = null;
6469
+ }
6470
+
6450
6471
  if(typeof jsonObject['freshQualityIntegration'].points === 'object' && 'sampleTypes' in jsonObject['freshQualityIntegration'].points)
6451
6472
  {
6452
6473
  pointsObject.sampleTypes = (function(){
@@ -6500,6 +6521,8 @@ class PackingLineModel extends BaseModel
6500
6521
 
6501
6522
  pointsDefaultValue.currentPackrunMaturityAreaSamples = null;
6502
6523
 
6524
+ pointsDefaultValue.currentPackrunCustomSamples = null;
6525
+
6503
6526
  pointsDefaultValue.sampleTypes = null;
6504
6527
 
6505
6528
  return pointsDefaultValue;
@@ -6644,6 +6667,31 @@ class PackingLineModel extends BaseModel
6644
6667
  {
6645
6668
  freshQualityIntegrationObject.maturityAreaSampleTypeIds = [];
6646
6669
  }
6670
+
6671
+ if(typeof jsonObject['freshQualityIntegration'] === 'object' && 'customSampleTypeIds' in jsonObject['freshQualityIntegration'])
6672
+ {
6673
+ freshQualityIntegrationObject.customSampleTypeIds = (function(){
6674
+ if(Array.isArray(jsonObject['freshQualityIntegration'].customSampleTypeIds) !== true)
6675
+ {
6676
+ return [];
6677
+ }
6678
+
6679
+ return jsonObject['freshQualityIntegration'].customSampleTypeIds.map((customSampleTypeIdsItem) => {
6680
+ return (function(){
6681
+ if(typeof customSampleTypeIdsItem !== 'number')
6682
+ {
6683
+ return Number.isInteger(Number(customSampleTypeIdsItem)) ? Number(customSampleTypeIdsItem) : Math.floor(Number(customSampleTypeIdsItem));
6684
+ }
6685
+
6686
+ return Number.isInteger(customSampleTypeIdsItem) ? customSampleTypeIdsItem : Math.floor(customSampleTypeIdsItem);
6687
+ }());
6688
+ });
6689
+ }());
6690
+ }
6691
+ else
6692
+ {
6693
+ freshQualityIntegrationObject.customSampleTypeIds = [];
6694
+ }
6647
6695
 
6648
6696
  return freshQualityIntegrationObject;
6649
6697
  }());
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '2.6.0';
2
+ export const version = '2.6.1';