@ricado/api-client 2.7.3 → 2.7.4
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.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +2 -0
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +2 -1
- package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +126 -0
- package/lib/Models/Packhouse/Site/PackingLineModel.js +38 -1
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +33 -1
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +2 -0
- package/src/Controllers/Packhouse/Site/PackingLineController.js +2 -1
- package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +160 -0
- package/src/Models/Packhouse/Site/PackingLineModel.js +49 -1
- package/src/PackageVersion.js +1 -1
|
@@ -839,6 +839,7 @@ var _default = FreshQualityPackrunSummaryController;
|
|
|
839
839
|
* @property {Date} [createdTimestamp] When this Summary was Created
|
|
840
840
|
* @property {?string} [timeBatchId] The Time Batch this Summary is associated with
|
|
841
841
|
* @property {Array<FreshQualityPackrunSummaryController.Sample>} [class1R600Samples] An Array of Class 1 R600 Samples
|
|
842
|
+
* @property {Array<FreshQualityPackrunSummaryController.Sample>} [class2R600Samples] An Array of Class 2 R600 Samples
|
|
842
843
|
* @property {Array<FreshQualityPackrunSummaryController.CategorySummary>} [categorySummaries] An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
843
844
|
* @property {number} [totalFruitSampled] The Total Number of Fruit Sampled in this Packrun Summary
|
|
844
845
|
* @memberof Controllers.Packhouse.Site
|
|
@@ -852,6 +853,7 @@ var _default = FreshQualityPackrunSummaryController;
|
|
|
852
853
|
* @property {Date} [createdTimestamp] When this Summary was Created
|
|
853
854
|
* @property {?string} [timeBatchId] The Time Batch this Summary is associated with
|
|
854
855
|
* @property {Array<FreshQualityPackrunSummaryController.Sample>} [class1R600Samples] An Array of Class 1 R600 Samples
|
|
856
|
+
* @property {Array<FreshQualityPackrunSummaryController.Sample>} [class2R600Samples] An Array of Class 2 R600 Samples
|
|
855
857
|
* @property {Array<FreshQualityPackrunSummaryController.CategorySummary>} [categorySummaries] An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
856
858
|
* @property {number} [totalFruitSampled] The Total Number of Fruit Sampled in this Packrun Summary
|
|
857
859
|
* @memberof Controllers.Packhouse.Site
|
|
@@ -666,12 +666,13 @@ 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, currentPackrunCustomSamples: ?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, currentPackrunClass2Samples: ?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
|
|
673
673
|
* @property {string} apiBaseUrl Base URL of the FreshQuality API
|
|
674
674
|
* @property {number[]} sampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Class 1 R600 on this Packing Line
|
|
675
|
+
* @property {number[]} class2SampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Class 2 R600 on this Packing Line
|
|
675
676
|
* @property {number[]} rejectAnalysisSampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Reject Analysis on this Packing Line
|
|
676
677
|
* @property {number[]} maturityAreaSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Maturity Area Samples on this Packing Line
|
|
677
678
|
* @property {number[]} customSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Custom Samples on this Packing Line
|
|
@@ -103,6 +103,14 @@ var FreshQualityPackrunSummaryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
_this.class1R600Samples = [];
|
|
106
|
+
/**
|
|
107
|
+
* An Array of Class 2 R600 Samples
|
|
108
|
+
*
|
|
109
|
+
* @type {Array<{fruitSize: string, packType: string, timestamp: Date, fruitCount: number, defects: Array<{name: string, group: string, fruitCount: number}>}>}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.class2R600Samples = [];
|
|
106
114
|
/**
|
|
107
115
|
* An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
108
116
|
*
|
|
@@ -346,6 +354,124 @@ var FreshQualityPackrunSummaryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
346
354
|
}();
|
|
347
355
|
}
|
|
348
356
|
|
|
357
|
+
if ('class2R600Samples' in jsonObject) {
|
|
358
|
+
model.class2R600Samples = function () {
|
|
359
|
+
if (Array.isArray(jsonObject['class2R600Samples']) !== true) {
|
|
360
|
+
return [];
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
return jsonObject['class2R600Samples'].map(function (class2R600SamplesItem) {
|
|
364
|
+
return function () {
|
|
365
|
+
var class2R600SamplesItemObject = {};
|
|
366
|
+
|
|
367
|
+
if (_typeof(class2R600SamplesItem) === 'object' && 'fruitSize' in class2R600SamplesItem) {
|
|
368
|
+
class2R600SamplesItemObject.fruitSize = function () {
|
|
369
|
+
if (typeof class2R600SamplesItem.fruitSize !== 'string') {
|
|
370
|
+
return String(class2R600SamplesItem.fruitSize);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return class2R600SamplesItem.fruitSize;
|
|
374
|
+
}();
|
|
375
|
+
} else {
|
|
376
|
+
class2R600SamplesItemObject.fruitSize = "";
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (_typeof(class2R600SamplesItem) === 'object' && 'packType' in class2R600SamplesItem) {
|
|
380
|
+
class2R600SamplesItemObject.packType = function () {
|
|
381
|
+
if (typeof class2R600SamplesItem.packType !== 'string') {
|
|
382
|
+
return String(class2R600SamplesItem.packType);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
return class2R600SamplesItem.packType;
|
|
386
|
+
}();
|
|
387
|
+
} else {
|
|
388
|
+
class2R600SamplesItemObject.packType = "";
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if (_typeof(class2R600SamplesItem) === 'object' && 'timestamp' in class2R600SamplesItem) {
|
|
392
|
+
class2R600SamplesItemObject.timestamp = function () {
|
|
393
|
+
if (typeof class2R600SamplesItem.timestamp !== 'string') {
|
|
394
|
+
return new Date(String(class2R600SamplesItem.timestamp));
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return new Date(class2R600SamplesItem.timestamp);
|
|
398
|
+
}();
|
|
399
|
+
} else {
|
|
400
|
+
class2R600SamplesItemObject.timestamp = new Date();
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
if (_typeof(class2R600SamplesItem) === 'object' && 'fruitCount' in class2R600SamplesItem) {
|
|
404
|
+
class2R600SamplesItemObject.fruitCount = function () {
|
|
405
|
+
if (typeof class2R600SamplesItem.fruitCount !== 'number') {
|
|
406
|
+
return Number.isInteger(Number(class2R600SamplesItem.fruitCount)) ? Number(class2R600SamplesItem.fruitCount) : Math.floor(Number(class2R600SamplesItem.fruitCount));
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
return Number.isInteger(class2R600SamplesItem.fruitCount) ? class2R600SamplesItem.fruitCount : Math.floor(class2R600SamplesItem.fruitCount);
|
|
410
|
+
}();
|
|
411
|
+
} else {
|
|
412
|
+
class2R600SamplesItemObject.fruitCount = 0;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (_typeof(class2R600SamplesItem) === 'object' && 'defects' in class2R600SamplesItem) {
|
|
416
|
+
class2R600SamplesItemObject.defects = function () {
|
|
417
|
+
if (Array.isArray(class2R600SamplesItem.defects) !== true) {
|
|
418
|
+
return [];
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return class2R600SamplesItem.defects.map(function (defectsItem) {
|
|
422
|
+
return function () {
|
|
423
|
+
var defectsItemObject = {};
|
|
424
|
+
|
|
425
|
+
if (_typeof(defectsItem) === 'object' && 'name' in defectsItem) {
|
|
426
|
+
defectsItemObject.name = function () {
|
|
427
|
+
if (typeof defectsItem.name !== 'string') {
|
|
428
|
+
return String(defectsItem.name);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return defectsItem.name;
|
|
432
|
+
}();
|
|
433
|
+
} else {
|
|
434
|
+
defectsItemObject.name = "";
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (_typeof(defectsItem) === 'object' && 'group' in defectsItem) {
|
|
438
|
+
defectsItemObject.group = function () {
|
|
439
|
+
if (typeof defectsItem.group !== 'string') {
|
|
440
|
+
return String(defectsItem.group);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
return defectsItem.group;
|
|
444
|
+
}();
|
|
445
|
+
} else {
|
|
446
|
+
defectsItemObject.group = "";
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
if (_typeof(defectsItem) === 'object' && 'fruitCount' in defectsItem) {
|
|
450
|
+
defectsItemObject.fruitCount = function () {
|
|
451
|
+
if (typeof defectsItem.fruitCount !== 'number') {
|
|
452
|
+
return Number.isInteger(Number(defectsItem.fruitCount)) ? Number(defectsItem.fruitCount) : Math.floor(Number(defectsItem.fruitCount));
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return Number.isInteger(defectsItem.fruitCount) ? defectsItem.fruitCount : Math.floor(defectsItem.fruitCount);
|
|
456
|
+
}();
|
|
457
|
+
} else {
|
|
458
|
+
defectsItemObject.fruitCount = 0;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
return defectsItemObject;
|
|
462
|
+
}();
|
|
463
|
+
});
|
|
464
|
+
}();
|
|
465
|
+
} else {
|
|
466
|
+
class2R600SamplesItemObject.defects = [];
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return class2R600SamplesItemObject;
|
|
470
|
+
}();
|
|
471
|
+
});
|
|
472
|
+
}();
|
|
473
|
+
}
|
|
474
|
+
|
|
349
475
|
if ('categorySummaries' in jsonObject) {
|
|
350
476
|
model.categorySummaries = function () {
|
|
351
477
|
if (Array.isArray(jsonObject['categorySummaries']) !== true) {
|
|
@@ -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, currentPackrunCustomSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: 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, currentPackrunClass2Samples: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], class2SampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: number[]}}
|
|
225
225
|
* @public
|
|
226
226
|
*/
|
|
227
227
|
|
|
@@ -4954,6 +4954,22 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
4954
4954
|
pointsObject.sampleTypes = null;
|
|
4955
4955
|
}
|
|
4956
4956
|
|
|
4957
|
+
if (_typeof(jsonObject['freshQualityIntegration'].points) === 'object' && 'currentPackrunClass2Samples' in jsonObject['freshQualityIntegration'].points) {
|
|
4958
|
+
pointsObject.currentPackrunClass2Samples = function () {
|
|
4959
|
+
if (jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples === null) {
|
|
4960
|
+
return null;
|
|
4961
|
+
}
|
|
4962
|
+
|
|
4963
|
+
if (typeof jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples !== 'number') {
|
|
4964
|
+
return Number.isInteger(Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples)) ? Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples) : Math.floor(Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples));
|
|
4965
|
+
}
|
|
4966
|
+
|
|
4967
|
+
return Number.isInteger(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples) ? jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples : Math.floor(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples);
|
|
4968
|
+
}();
|
|
4969
|
+
} else {
|
|
4970
|
+
pointsObject.currentPackrunClass2Samples = null;
|
|
4971
|
+
}
|
|
4972
|
+
|
|
4957
4973
|
return pointsObject;
|
|
4958
4974
|
}();
|
|
4959
4975
|
} else {
|
|
@@ -4973,6 +4989,7 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
4973
4989
|
pointsDefaultValue.currentPackrunMaturityAreaSamples = null;
|
|
4974
4990
|
pointsDefaultValue.currentPackrunCustomSamples = null;
|
|
4975
4991
|
pointsDefaultValue.sampleTypes = null;
|
|
4992
|
+
pointsDefaultValue.currentPackrunClass2Samples = null;
|
|
4976
4993
|
return pointsDefaultValue;
|
|
4977
4994
|
}();
|
|
4978
4995
|
}
|
|
@@ -5045,6 +5062,26 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
5045
5062
|
freshQualityIntegrationObject.sampleTypeIds = [];
|
|
5046
5063
|
}
|
|
5047
5064
|
|
|
5065
|
+
if (_typeof(jsonObject['freshQualityIntegration']) === 'object' && 'class2SampleTypeIds' in jsonObject['freshQualityIntegration']) {
|
|
5066
|
+
freshQualityIntegrationObject.class2SampleTypeIds = function () {
|
|
5067
|
+
if (Array.isArray(jsonObject['freshQualityIntegration'].class2SampleTypeIds) !== true) {
|
|
5068
|
+
return [];
|
|
5069
|
+
}
|
|
5070
|
+
|
|
5071
|
+
return jsonObject['freshQualityIntegration'].class2SampleTypeIds.map(function (class2SampleTypeIdsItem) {
|
|
5072
|
+
return function () {
|
|
5073
|
+
if (typeof class2SampleTypeIdsItem !== 'number') {
|
|
5074
|
+
return Number.isInteger(Number(class2SampleTypeIdsItem)) ? Number(class2SampleTypeIdsItem) : Math.floor(Number(class2SampleTypeIdsItem));
|
|
5075
|
+
}
|
|
5076
|
+
|
|
5077
|
+
return Number.isInteger(class2SampleTypeIdsItem) ? class2SampleTypeIdsItem : Math.floor(class2SampleTypeIdsItem);
|
|
5078
|
+
}();
|
|
5079
|
+
});
|
|
5080
|
+
}();
|
|
5081
|
+
} else {
|
|
5082
|
+
freshQualityIntegrationObject.class2SampleTypeIds = [];
|
|
5083
|
+
}
|
|
5084
|
+
|
|
5048
5085
|
if (_typeof(jsonObject['freshQualityIntegration']) === 'object' && 'rejectAnalysisSampleTypeIds' in jsonObject['freshQualityIntegration']) {
|
|
5049
5086
|
freshQualityIntegrationObject.rejectAnalysisSampleTypeIds = function () {
|
|
5050
5087
|
if (Array.isArray(jsonObject['freshQualityIntegration'].rejectAnalysisSampleTypeIds) !== true) {
|
package/lib/PackageVersion.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -13867,6 +13867,10 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/FreshQualityPackru
|
|
|
13867
13867
|
* An Array of Class 1 R600 Samples
|
|
13868
13868
|
*/
|
|
13869
13869
|
class1R600Samples?: Sample[] | undefined;
|
|
13870
|
+
/**
|
|
13871
|
+
* An Array of Class 2 R600 Samples
|
|
13872
|
+
*/
|
|
13873
|
+
class2R600Samples?: Sample[] | undefined;
|
|
13870
13874
|
/**
|
|
13871
13875
|
* An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
13872
13876
|
*/
|
|
@@ -13896,6 +13900,10 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/FreshQualityPackru
|
|
|
13896
13900
|
* An Array of Class 1 R600 Samples
|
|
13897
13901
|
*/
|
|
13898
13902
|
class1R600Samples?: Sample[] | undefined;
|
|
13903
|
+
/**
|
|
13904
|
+
* An Array of Class 2 R600 Samples
|
|
13905
|
+
*/
|
|
13906
|
+
class2R600Samples?: Sample[] | undefined;
|
|
13899
13907
|
/**
|
|
13900
13908
|
* An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
13901
13909
|
*/
|
|
@@ -17110,6 +17118,7 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackingLineControl
|
|
|
17110
17118
|
currentPackrunMaturityAreaSamples: number | null;
|
|
17111
17119
|
currentPackrunCustomSamples: number | null;
|
|
17112
17120
|
sampleTypes: number | null;
|
|
17121
|
+
currentPackrunClass2Samples: number | null;
|
|
17113
17122
|
};
|
|
17114
17123
|
/**
|
|
17115
17124
|
* Whether the FreshQuality Integration is Enabled on this Packing Line
|
|
@@ -17131,6 +17140,10 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackingLineControl
|
|
|
17131
17140
|
* An Array of FreshQuality Sample Type IDs that are used for Class 1 R600 on this Packing Line
|
|
17132
17141
|
*/
|
|
17133
17142
|
sampleTypeIds: number[];
|
|
17143
|
+
/**
|
|
17144
|
+
* An Array of FreshQuality Sample Type IDs that are used for Class 2 R600 on this Packing Line
|
|
17145
|
+
*/
|
|
17146
|
+
class2SampleTypeIds: number[];
|
|
17134
17147
|
/**
|
|
17135
17148
|
* An Array of FreshQuality Sample Type IDs that are used for Reject Analysis on this Packing Line
|
|
17136
17149
|
*/
|
|
@@ -28061,6 +28074,23 @@ declare module '@ricado/api-client/Models/Packhouse/Site/FreshQualityPackrunSumm
|
|
|
28061
28074
|
fruitCount: number;
|
|
28062
28075
|
}[];
|
|
28063
28076
|
}[];
|
|
28077
|
+
/**
|
|
28078
|
+
* An Array of Class 2 R600 Samples
|
|
28079
|
+
*
|
|
28080
|
+
* @type {Array<{fruitSize: string, packType: string, timestamp: Date, fruitCount: number, defects: Array<{name: string, group: string, fruitCount: number}>}>}
|
|
28081
|
+
* @public
|
|
28082
|
+
*/
|
|
28083
|
+
class2R600Samples: {
|
|
28084
|
+
fruitSize: string;
|
|
28085
|
+
packType: string;
|
|
28086
|
+
timestamp: Date;
|
|
28087
|
+
fruitCount: number;
|
|
28088
|
+
defects: {
|
|
28089
|
+
name: string;
|
|
28090
|
+
group: string;
|
|
28091
|
+
fruitCount: number;
|
|
28092
|
+
}[];
|
|
28093
|
+
}[];
|
|
28064
28094
|
/**
|
|
28065
28095
|
* An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
28066
28096
|
*
|
|
@@ -29522,7 +29552,7 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
|
|
|
29522
29552
|
/**
|
|
29523
29553
|
* The FreshQuality Integration Configuration for this Packing Line
|
|
29524
29554
|
*
|
|
29525
|
-
* @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[]}}
|
|
29555
|
+
* @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, currentPackrunClass2Samples: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], class2SampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: number[]}}
|
|
29526
29556
|
* @public
|
|
29527
29557
|
*/
|
|
29528
29558
|
freshQualityIntegration: {
|
|
@@ -29541,12 +29571,14 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
|
|
|
29541
29571
|
currentPackrunMaturityAreaSamples: number | null;
|
|
29542
29572
|
currentPackrunCustomSamples: number | null;
|
|
29543
29573
|
sampleTypes: number | null;
|
|
29574
|
+
currentPackrunClass2Samples: number | null;
|
|
29544
29575
|
};
|
|
29545
29576
|
enabled: boolean;
|
|
29546
29577
|
username: string;
|
|
29547
29578
|
password: string;
|
|
29548
29579
|
apiBaseUrl: string;
|
|
29549
29580
|
sampleTypeIds: number[];
|
|
29581
|
+
class2SampleTypeIds: number[];
|
|
29550
29582
|
rejectAnalysisSampleTypeIds: number[];
|
|
29551
29583
|
maturityAreaSampleTypeIds: number[];
|
|
29552
29584
|
customSampleTypeIds: number[];
|
package/package.json
CHANGED
|
@@ -972,6 +972,7 @@ export default FreshQualityPackrunSummaryController;
|
|
|
972
972
|
* @property {Date} [createdTimestamp] When this Summary was Created
|
|
973
973
|
* @property {?string} [timeBatchId] The Time Batch this Summary is associated with
|
|
974
974
|
* @property {Array<FreshQualityPackrunSummaryController.Sample>} [class1R600Samples] An Array of Class 1 R600 Samples
|
|
975
|
+
* @property {Array<FreshQualityPackrunSummaryController.Sample>} [class2R600Samples] An Array of Class 2 R600 Samples
|
|
975
976
|
* @property {Array<FreshQualityPackrunSummaryController.CategorySummary>} [categorySummaries] An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
976
977
|
* @property {number} [totalFruitSampled] The Total Number of Fruit Sampled in this Packrun Summary
|
|
977
978
|
* @memberof Controllers.Packhouse.Site
|
|
@@ -985,6 +986,7 @@ export default FreshQualityPackrunSummaryController;
|
|
|
985
986
|
* @property {Date} [createdTimestamp] When this Summary was Created
|
|
986
987
|
* @property {?string} [timeBatchId] The Time Batch this Summary is associated with
|
|
987
988
|
* @property {Array<FreshQualityPackrunSummaryController.Sample>} [class1R600Samples] An Array of Class 1 R600 Samples
|
|
989
|
+
* @property {Array<FreshQualityPackrunSummaryController.Sample>} [class2R600Samples] An Array of Class 2 R600 Samples
|
|
988
990
|
* @property {Array<FreshQualityPackrunSummaryController.CategorySummary>} [categorySummaries] An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
989
991
|
* @property {number} [totalFruitSampled] The Total Number of Fruit Sampled in this Packrun Summary
|
|
990
992
|
* @memberof Controllers.Packhouse.Site
|
|
@@ -645,12 +645,13 @@ 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, currentPackrunCustomSamples: ?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, currentPackrunClass2Samples: ?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
|
|
652
652
|
* @property {string} apiBaseUrl Base URL of the FreshQuality API
|
|
653
653
|
* @property {number[]} sampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Class 1 R600 on this Packing Line
|
|
654
|
+
* @property {number[]} class2SampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Class 2 R600 on this Packing Line
|
|
654
655
|
* @property {number[]} rejectAnalysisSampleTypeIds An Array of FreshQuality Sample Type IDs that are used for Reject Analysis on this Packing Line
|
|
655
656
|
* @property {number[]} maturityAreaSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Maturity Area Samples on this Packing Line
|
|
656
657
|
* @property {number[]} customSampleTypeIds An Array of FreshQuality Sample Type IDs that should be fetched for Custom Samples on this Packing Line
|
|
@@ -73,6 +73,14 @@ class FreshQualityPackrunSummaryModel extends BaseModel
|
|
|
73
73
|
*/
|
|
74
74
|
this.class1R600Samples = [];
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* An Array of Class 2 R600 Samples
|
|
78
|
+
*
|
|
79
|
+
* @type {Array<{fruitSize: string, packType: string, timestamp: Date, fruitCount: number, defects: Array<{name: string, group: string, fruitCount: number}>}>}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.class2R600Samples = [];
|
|
83
|
+
|
|
76
84
|
/**
|
|
77
85
|
* An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
|
|
78
86
|
*
|
|
@@ -360,6 +368,158 @@ class FreshQualityPackrunSummaryModel extends BaseModel
|
|
|
360
368
|
}());
|
|
361
369
|
}
|
|
362
370
|
|
|
371
|
+
if('class2R600Samples' in jsonObject)
|
|
372
|
+
{
|
|
373
|
+
model.class2R600Samples = (function(){
|
|
374
|
+
if(Array.isArray(jsonObject['class2R600Samples']) !== true)
|
|
375
|
+
{
|
|
376
|
+
return [];
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
return jsonObject['class2R600Samples'].map((class2R600SamplesItem) => {
|
|
380
|
+
return (function(){
|
|
381
|
+
let class2R600SamplesItemObject = {};
|
|
382
|
+
|
|
383
|
+
if(typeof class2R600SamplesItem === 'object' && 'fruitSize' in class2R600SamplesItem)
|
|
384
|
+
{
|
|
385
|
+
class2R600SamplesItemObject.fruitSize = (function(){
|
|
386
|
+
if(typeof class2R600SamplesItem.fruitSize !== 'string')
|
|
387
|
+
{
|
|
388
|
+
return String(class2R600SamplesItem.fruitSize);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
return class2R600SamplesItem.fruitSize;
|
|
392
|
+
}());
|
|
393
|
+
}
|
|
394
|
+
else
|
|
395
|
+
{
|
|
396
|
+
class2R600SamplesItemObject.fruitSize = "";
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if(typeof class2R600SamplesItem === 'object' && 'packType' in class2R600SamplesItem)
|
|
400
|
+
{
|
|
401
|
+
class2R600SamplesItemObject.packType = (function(){
|
|
402
|
+
if(typeof class2R600SamplesItem.packType !== 'string')
|
|
403
|
+
{
|
|
404
|
+
return String(class2R600SamplesItem.packType);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
return class2R600SamplesItem.packType;
|
|
408
|
+
}());
|
|
409
|
+
}
|
|
410
|
+
else
|
|
411
|
+
{
|
|
412
|
+
class2R600SamplesItemObject.packType = "";
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if(typeof class2R600SamplesItem === 'object' && 'timestamp' in class2R600SamplesItem)
|
|
416
|
+
{
|
|
417
|
+
class2R600SamplesItemObject.timestamp = (function(){
|
|
418
|
+
if(typeof class2R600SamplesItem.timestamp !== 'string')
|
|
419
|
+
{
|
|
420
|
+
return new Date(String(class2R600SamplesItem.timestamp));
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
return new Date(class2R600SamplesItem.timestamp);
|
|
424
|
+
}());
|
|
425
|
+
}
|
|
426
|
+
else
|
|
427
|
+
{
|
|
428
|
+
class2R600SamplesItemObject.timestamp = new Date();
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if(typeof class2R600SamplesItem === 'object' && 'fruitCount' in class2R600SamplesItem)
|
|
432
|
+
{
|
|
433
|
+
class2R600SamplesItemObject.fruitCount = (function(){
|
|
434
|
+
if(typeof class2R600SamplesItem.fruitCount !== 'number')
|
|
435
|
+
{
|
|
436
|
+
return Number.isInteger(Number(class2R600SamplesItem.fruitCount)) ? Number(class2R600SamplesItem.fruitCount) : Math.floor(Number(class2R600SamplesItem.fruitCount));
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
return Number.isInteger(class2R600SamplesItem.fruitCount) ? class2R600SamplesItem.fruitCount : Math.floor(class2R600SamplesItem.fruitCount);
|
|
440
|
+
}());
|
|
441
|
+
}
|
|
442
|
+
else
|
|
443
|
+
{
|
|
444
|
+
class2R600SamplesItemObject.fruitCount = 0;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
if(typeof class2R600SamplesItem === 'object' && 'defects' in class2R600SamplesItem)
|
|
448
|
+
{
|
|
449
|
+
class2R600SamplesItemObject.defects = (function(){
|
|
450
|
+
if(Array.isArray(class2R600SamplesItem.defects) !== true)
|
|
451
|
+
{
|
|
452
|
+
return [];
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return class2R600SamplesItem.defects.map((defectsItem) => {
|
|
456
|
+
return (function(){
|
|
457
|
+
let defectsItemObject = {};
|
|
458
|
+
|
|
459
|
+
if(typeof defectsItem === 'object' && 'name' in defectsItem)
|
|
460
|
+
{
|
|
461
|
+
defectsItemObject.name = (function(){
|
|
462
|
+
if(typeof defectsItem.name !== 'string')
|
|
463
|
+
{
|
|
464
|
+
return String(defectsItem.name);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
return defectsItem.name;
|
|
468
|
+
}());
|
|
469
|
+
}
|
|
470
|
+
else
|
|
471
|
+
{
|
|
472
|
+
defectsItemObject.name = "";
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if(typeof defectsItem === 'object' && 'group' in defectsItem)
|
|
476
|
+
{
|
|
477
|
+
defectsItemObject.group = (function(){
|
|
478
|
+
if(typeof defectsItem.group !== 'string')
|
|
479
|
+
{
|
|
480
|
+
return String(defectsItem.group);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
return defectsItem.group;
|
|
484
|
+
}());
|
|
485
|
+
}
|
|
486
|
+
else
|
|
487
|
+
{
|
|
488
|
+
defectsItemObject.group = "";
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
if(typeof defectsItem === 'object' && 'fruitCount' in defectsItem)
|
|
492
|
+
{
|
|
493
|
+
defectsItemObject.fruitCount = (function(){
|
|
494
|
+
if(typeof defectsItem.fruitCount !== 'number')
|
|
495
|
+
{
|
|
496
|
+
return Number.isInteger(Number(defectsItem.fruitCount)) ? Number(defectsItem.fruitCount) : Math.floor(Number(defectsItem.fruitCount));
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
return Number.isInteger(defectsItem.fruitCount) ? defectsItem.fruitCount : Math.floor(defectsItem.fruitCount);
|
|
500
|
+
}());
|
|
501
|
+
}
|
|
502
|
+
else
|
|
503
|
+
{
|
|
504
|
+
defectsItemObject.fruitCount = 0;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
return defectsItemObject;
|
|
508
|
+
}());
|
|
509
|
+
});
|
|
510
|
+
}());
|
|
511
|
+
}
|
|
512
|
+
else
|
|
513
|
+
{
|
|
514
|
+
class2R600SamplesItemObject.defects = [];
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
return class2R600SamplesItemObject;
|
|
518
|
+
}());
|
|
519
|
+
});
|
|
520
|
+
}());
|
|
521
|
+
}
|
|
522
|
+
|
|
363
523
|
if('categorySummaries' in jsonObject)
|
|
364
524
|
{
|
|
365
525
|
model.categorySummaries = (function(){
|
|
@@ -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, currentPackrunCustomSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: 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, currentPackrunClass2Samples: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], class2SampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[], maturityAreaSampleTypeIds: number[], customSampleTypeIds: number[]}}
|
|
226
226
|
* @public
|
|
227
227
|
*/
|
|
228
228
|
this.freshQualityIntegration = null;
|
|
@@ -6488,6 +6488,27 @@ class PackingLineModel extends BaseModel
|
|
|
6488
6488
|
{
|
|
6489
6489
|
pointsObject.sampleTypes = null;
|
|
6490
6490
|
}
|
|
6491
|
+
|
|
6492
|
+
if(typeof jsonObject['freshQualityIntegration'].points === 'object' && 'currentPackrunClass2Samples' in jsonObject['freshQualityIntegration'].points)
|
|
6493
|
+
{
|
|
6494
|
+
pointsObject.currentPackrunClass2Samples = (function(){
|
|
6495
|
+
if(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples === null)
|
|
6496
|
+
{
|
|
6497
|
+
return null;
|
|
6498
|
+
}
|
|
6499
|
+
|
|
6500
|
+
if(typeof jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples !== 'number')
|
|
6501
|
+
{
|
|
6502
|
+
return Number.isInteger(Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples)) ? Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples) : Math.floor(Number(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples));
|
|
6503
|
+
}
|
|
6504
|
+
|
|
6505
|
+
return Number.isInteger(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples) ? jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples : Math.floor(jsonObject['freshQualityIntegration'].points.currentPackrunClass2Samples);
|
|
6506
|
+
}());
|
|
6507
|
+
}
|
|
6508
|
+
else
|
|
6509
|
+
{
|
|
6510
|
+
pointsObject.currentPackrunClass2Samples = null;
|
|
6511
|
+
}
|
|
6491
6512
|
|
|
6492
6513
|
return pointsObject;
|
|
6493
6514
|
}());
|
|
@@ -6525,6 +6546,8 @@ class PackingLineModel extends BaseModel
|
|
|
6525
6546
|
|
|
6526
6547
|
pointsDefaultValue.sampleTypes = null;
|
|
6527
6548
|
|
|
6549
|
+
pointsDefaultValue.currentPackrunClass2Samples = null;
|
|
6550
|
+
|
|
6528
6551
|
return pointsDefaultValue;
|
|
6529
6552
|
}());
|
|
6530
6553
|
}
|
|
@@ -6618,6 +6641,31 @@ class PackingLineModel extends BaseModel
|
|
|
6618
6641
|
freshQualityIntegrationObject.sampleTypeIds = [];
|
|
6619
6642
|
}
|
|
6620
6643
|
|
|
6644
|
+
if(typeof jsonObject['freshQualityIntegration'] === 'object' && 'class2SampleTypeIds' in jsonObject['freshQualityIntegration'])
|
|
6645
|
+
{
|
|
6646
|
+
freshQualityIntegrationObject.class2SampleTypeIds = (function(){
|
|
6647
|
+
if(Array.isArray(jsonObject['freshQualityIntegration'].class2SampleTypeIds) !== true)
|
|
6648
|
+
{
|
|
6649
|
+
return [];
|
|
6650
|
+
}
|
|
6651
|
+
|
|
6652
|
+
return jsonObject['freshQualityIntegration'].class2SampleTypeIds.map((class2SampleTypeIdsItem) => {
|
|
6653
|
+
return (function(){
|
|
6654
|
+
if(typeof class2SampleTypeIdsItem !== 'number')
|
|
6655
|
+
{
|
|
6656
|
+
return Number.isInteger(Number(class2SampleTypeIdsItem)) ? Number(class2SampleTypeIdsItem) : Math.floor(Number(class2SampleTypeIdsItem));
|
|
6657
|
+
}
|
|
6658
|
+
|
|
6659
|
+
return Number.isInteger(class2SampleTypeIdsItem) ? class2SampleTypeIdsItem : Math.floor(class2SampleTypeIdsItem);
|
|
6660
|
+
}());
|
|
6661
|
+
});
|
|
6662
|
+
}());
|
|
6663
|
+
}
|
|
6664
|
+
else
|
|
6665
|
+
{
|
|
6666
|
+
freshQualityIntegrationObject.class2SampleTypeIds = [];
|
|
6667
|
+
}
|
|
6668
|
+
|
|
6621
6669
|
if(typeof jsonObject['freshQualityIntegration'] === 'object' && 'rejectAnalysisSampleTypeIds' in jsonObject['freshQualityIntegration'])
|
|
6622
6670
|
{
|
|
6623
6671
|
freshQualityIntegrationObject.rejectAnalysisSampleTypeIds = (function(){
|
package/src/PackageVersion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '2.7.
|
|
2
|
+
export const version = '2.7.4';
|