@ricado/api-client 2.5.18 → 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.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/MAFSizerBatchController.js +46 -1
- package/lib/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +26 -0
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +2 -1
- package/lib/Controllers/Packhouse/Site/PackrunController.js +73 -0
- package/lib/Models/Packhouse/Site/MAFSizerBatchModel.js +321 -15
- package/lib/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +162 -0
- package/lib/Models/Packhouse/Site/PackingLineModel.js +38 -1
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +269 -7
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/MAFSizerBatchController.js +46 -1
- package/src/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +26 -0
- package/src/Controllers/Packhouse/Site/PackingLineController.js +2 -1
- package/src/Controllers/Packhouse/Site/PackrunController.js +94 -0
- package/src/Models/Packhouse/Site/MAFSizerBatchModel.js +397 -15
- package/src/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +207 -0
- package/src/Models/Packhouse/Site/PackingLineModel.js +49 -1
- package/src/PackageVersion.js +1 -1
|
@@ -103,6 +103,14 @@ var MAFSizerPackrunSummaryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
_this.classTypeSummaries = [];
|
|
106
|
+
/**
|
|
107
|
+
* An Array of Packrun Summary Data Objects for each Outlet
|
|
108
|
+
*
|
|
109
|
+
* @type {Array<{name: string, type: string, number: number, totals: Array<{classType: ?string, fruitSize: string, packType: ?string, weight: number, fruitCount: number, packCount: ?number}>}>}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.outletSummaries = [];
|
|
106
114
|
/**
|
|
107
115
|
* An Array that contains the Articles initially Assigned to each Outlet
|
|
108
116
|
*
|
|
@@ -342,6 +350,160 @@ var MAFSizerPackrunSummaryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
342
350
|
}();
|
|
343
351
|
}
|
|
344
352
|
|
|
353
|
+
if ('outletSummaries' in jsonObject) {
|
|
354
|
+
model.outletSummaries = function () {
|
|
355
|
+
if (Array.isArray(jsonObject['outletSummaries']) !== true) {
|
|
356
|
+
return [];
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
return jsonObject['outletSummaries'].map(function (outletSummariesItem) {
|
|
360
|
+
return function () {
|
|
361
|
+
var outletSummariesItemObject = {};
|
|
362
|
+
|
|
363
|
+
if (_typeof(outletSummariesItem) === 'object' && 'name' in outletSummariesItem) {
|
|
364
|
+
outletSummariesItemObject.name = function () {
|
|
365
|
+
if (typeof outletSummariesItem.name !== 'string') {
|
|
366
|
+
return String(outletSummariesItem.name);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
return outletSummariesItem.name;
|
|
370
|
+
}();
|
|
371
|
+
} else {
|
|
372
|
+
outletSummariesItemObject.name = "";
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
if (_typeof(outletSummariesItem) === 'object' && 'type' in outletSummariesItem) {
|
|
376
|
+
outletSummariesItemObject.type = function () {
|
|
377
|
+
if (typeof outletSummariesItem.type !== 'string') {
|
|
378
|
+
return String(outletSummariesItem.type);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
return outletSummariesItem.type;
|
|
382
|
+
}();
|
|
383
|
+
} else {
|
|
384
|
+
outletSummariesItemObject.type = "";
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
if (_typeof(outletSummariesItem) === 'object' && 'number' in outletSummariesItem) {
|
|
388
|
+
outletSummariesItemObject.number = function () {
|
|
389
|
+
if (typeof outletSummariesItem.number !== 'number') {
|
|
390
|
+
return Number.isInteger(Number(outletSummariesItem.number)) ? Number(outletSummariesItem.number) : Math.floor(Number(outletSummariesItem.number));
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return Number.isInteger(outletSummariesItem.number) ? outletSummariesItem.number : Math.floor(outletSummariesItem.number);
|
|
394
|
+
}();
|
|
395
|
+
} else {
|
|
396
|
+
outletSummariesItemObject.number = 0;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (_typeof(outletSummariesItem) === 'object' && 'totals' in outletSummariesItem) {
|
|
400
|
+
outletSummariesItemObject.totals = function () {
|
|
401
|
+
if (Array.isArray(outletSummariesItem.totals) !== true) {
|
|
402
|
+
return [];
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
return outletSummariesItem.totals.map(function (totalsItem) {
|
|
406
|
+
return function () {
|
|
407
|
+
var totalsItemObject = {};
|
|
408
|
+
|
|
409
|
+
if (_typeof(totalsItem) === 'object' && 'classType' in totalsItem) {
|
|
410
|
+
totalsItemObject.classType = function () {
|
|
411
|
+
if (totalsItem.classType === null) {
|
|
412
|
+
return null;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (typeof totalsItem.classType !== 'string') {
|
|
416
|
+
return String(totalsItem.classType);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
return totalsItem.classType;
|
|
420
|
+
}();
|
|
421
|
+
} else {
|
|
422
|
+
totalsItemObject.classType = null;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if (_typeof(totalsItem) === 'object' && 'fruitSize' in totalsItem) {
|
|
426
|
+
totalsItemObject.fruitSize = function () {
|
|
427
|
+
if (typeof totalsItem.fruitSize !== 'string') {
|
|
428
|
+
return String(totalsItem.fruitSize);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return totalsItem.fruitSize;
|
|
432
|
+
}();
|
|
433
|
+
} else {
|
|
434
|
+
totalsItemObject.fruitSize = "";
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (_typeof(totalsItem) === 'object' && 'packType' in totalsItem) {
|
|
438
|
+
totalsItemObject.packType = function () {
|
|
439
|
+
if (totalsItem.packType === null) {
|
|
440
|
+
return null;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (typeof totalsItem.packType !== 'string') {
|
|
444
|
+
return String(totalsItem.packType);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return totalsItem.packType;
|
|
448
|
+
}();
|
|
449
|
+
} else {
|
|
450
|
+
totalsItemObject.packType = null;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
if (_typeof(totalsItem) === 'object' && 'weight' in totalsItem) {
|
|
454
|
+
totalsItemObject.weight = function () {
|
|
455
|
+
if (typeof totalsItem.weight !== 'number') {
|
|
456
|
+
return Number(totalsItem.weight);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
return totalsItem.weight;
|
|
460
|
+
}();
|
|
461
|
+
} else {
|
|
462
|
+
totalsItemObject.weight = 0;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if (_typeof(totalsItem) === 'object' && 'fruitCount' in totalsItem) {
|
|
466
|
+
totalsItemObject.fruitCount = function () {
|
|
467
|
+
if (typeof totalsItem.fruitCount !== 'number') {
|
|
468
|
+
return Number.isInteger(Number(totalsItem.fruitCount)) ? Number(totalsItem.fruitCount) : Math.floor(Number(totalsItem.fruitCount));
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
return Number.isInteger(totalsItem.fruitCount) ? totalsItem.fruitCount : Math.floor(totalsItem.fruitCount);
|
|
472
|
+
}();
|
|
473
|
+
} else {
|
|
474
|
+
totalsItemObject.fruitCount = 0;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
if (_typeof(totalsItem) === 'object' && 'packCount' in totalsItem) {
|
|
478
|
+
totalsItemObject.packCount = function () {
|
|
479
|
+
if (totalsItem.packCount === null) {
|
|
480
|
+
return null;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if (typeof totalsItem.packCount !== 'number') {
|
|
484
|
+
return Number(totalsItem.packCount);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return totalsItem.packCount;
|
|
488
|
+
}();
|
|
489
|
+
} else {
|
|
490
|
+
totalsItemObject.packCount = null;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
return totalsItemObject;
|
|
494
|
+
}();
|
|
495
|
+
});
|
|
496
|
+
}();
|
|
497
|
+
} else {
|
|
498
|
+
outletSummariesItemObject.totals = [];
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
return outletSummariesItemObject;
|
|
502
|
+
}();
|
|
503
|
+
});
|
|
504
|
+
}();
|
|
505
|
+
}
|
|
506
|
+
|
|
345
507
|
if ('initialOutletArticles' in jsonObject) {
|
|
346
508
|
model.initialOutletArticles = function () {
|
|
347
509
|
if (Array.isArray(jsonObject['initialOutletArticles']) !== 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, 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
|
}
|
package/lib/PackageVersion.js
CHANGED