@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
|
@@ -73,6 +73,14 @@ class MAFSizerPackrunSummaryModel extends BaseModel
|
|
|
73
73
|
*/
|
|
74
74
|
this.classTypeSummaries = [];
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* An Array of Packrun Summary Data Objects for each Outlet
|
|
78
|
+
*
|
|
79
|
+
* @type {Array<{name: string, type: string, number: number, totals: Array<{classType: ?string, fruitSize: string, packType: ?string, weight: number, fruitCount: number, packCount: ?number}>}>}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.outletSummaries = [];
|
|
83
|
+
|
|
76
84
|
/**
|
|
77
85
|
* An Array that contains the Articles initially Assigned to each Outlet
|
|
78
86
|
*
|
|
@@ -354,6 +362,205 @@ class MAFSizerPackrunSummaryModel extends BaseModel
|
|
|
354
362
|
}());
|
|
355
363
|
}
|
|
356
364
|
|
|
365
|
+
if('outletSummaries' in jsonObject)
|
|
366
|
+
{
|
|
367
|
+
model.outletSummaries = (function(){
|
|
368
|
+
if(Array.isArray(jsonObject['outletSummaries']) !== true)
|
|
369
|
+
{
|
|
370
|
+
return [];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return jsonObject['outletSummaries'].map((outletSummariesItem) => {
|
|
374
|
+
return (function(){
|
|
375
|
+
let outletSummariesItemObject = {};
|
|
376
|
+
|
|
377
|
+
if(typeof outletSummariesItem === 'object' && 'name' in outletSummariesItem)
|
|
378
|
+
{
|
|
379
|
+
outletSummariesItemObject.name = (function(){
|
|
380
|
+
if(typeof outletSummariesItem.name !== 'string')
|
|
381
|
+
{
|
|
382
|
+
return String(outletSummariesItem.name);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
return outletSummariesItem.name;
|
|
386
|
+
}());
|
|
387
|
+
}
|
|
388
|
+
else
|
|
389
|
+
{
|
|
390
|
+
outletSummariesItemObject.name = "";
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if(typeof outletSummariesItem === 'object' && 'type' in outletSummariesItem)
|
|
394
|
+
{
|
|
395
|
+
outletSummariesItemObject.type = (function(){
|
|
396
|
+
if(typeof outletSummariesItem.type !== 'string')
|
|
397
|
+
{
|
|
398
|
+
return String(outletSummariesItem.type);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return outletSummariesItem.type;
|
|
402
|
+
}());
|
|
403
|
+
}
|
|
404
|
+
else
|
|
405
|
+
{
|
|
406
|
+
outletSummariesItemObject.type = "";
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if(typeof outletSummariesItem === 'object' && 'number' in outletSummariesItem)
|
|
410
|
+
{
|
|
411
|
+
outletSummariesItemObject.number = (function(){
|
|
412
|
+
if(typeof outletSummariesItem.number !== 'number')
|
|
413
|
+
{
|
|
414
|
+
return Number.isInteger(Number(outletSummariesItem.number)) ? Number(outletSummariesItem.number) : Math.floor(Number(outletSummariesItem.number));
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return Number.isInteger(outletSummariesItem.number) ? outletSummariesItem.number : Math.floor(outletSummariesItem.number);
|
|
418
|
+
}());
|
|
419
|
+
}
|
|
420
|
+
else
|
|
421
|
+
{
|
|
422
|
+
outletSummariesItemObject.number = 0;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if(typeof outletSummariesItem === 'object' && 'totals' in outletSummariesItem)
|
|
426
|
+
{
|
|
427
|
+
outletSummariesItemObject.totals = (function(){
|
|
428
|
+
if(Array.isArray(outletSummariesItem.totals) !== true)
|
|
429
|
+
{
|
|
430
|
+
return [];
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
return outletSummariesItem.totals.map((totalsItem) => {
|
|
434
|
+
return (function(){
|
|
435
|
+
let totalsItemObject = {};
|
|
436
|
+
|
|
437
|
+
if(typeof totalsItem === 'object' && 'classType' in totalsItem)
|
|
438
|
+
{
|
|
439
|
+
totalsItemObject.classType = (function(){
|
|
440
|
+
if(totalsItem.classType === null)
|
|
441
|
+
{
|
|
442
|
+
return null;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
if(typeof totalsItem.classType !== 'string')
|
|
446
|
+
{
|
|
447
|
+
return String(totalsItem.classType);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
return totalsItem.classType;
|
|
451
|
+
}());
|
|
452
|
+
}
|
|
453
|
+
else
|
|
454
|
+
{
|
|
455
|
+
totalsItemObject.classType = null;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
if(typeof totalsItem === 'object' && 'fruitSize' in totalsItem)
|
|
459
|
+
{
|
|
460
|
+
totalsItemObject.fruitSize = (function(){
|
|
461
|
+
if(typeof totalsItem.fruitSize !== 'string')
|
|
462
|
+
{
|
|
463
|
+
return String(totalsItem.fruitSize);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return totalsItem.fruitSize;
|
|
467
|
+
}());
|
|
468
|
+
}
|
|
469
|
+
else
|
|
470
|
+
{
|
|
471
|
+
totalsItemObject.fruitSize = "";
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if(typeof totalsItem === 'object' && 'packType' in totalsItem)
|
|
475
|
+
{
|
|
476
|
+
totalsItemObject.packType = (function(){
|
|
477
|
+
if(totalsItem.packType === null)
|
|
478
|
+
{
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
if(typeof totalsItem.packType !== 'string')
|
|
483
|
+
{
|
|
484
|
+
return String(totalsItem.packType);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return totalsItem.packType;
|
|
488
|
+
}());
|
|
489
|
+
}
|
|
490
|
+
else
|
|
491
|
+
{
|
|
492
|
+
totalsItemObject.packType = null;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if(typeof totalsItem === 'object' && 'weight' in totalsItem)
|
|
496
|
+
{
|
|
497
|
+
totalsItemObject.weight = (function(){
|
|
498
|
+
if(typeof totalsItem.weight !== 'number')
|
|
499
|
+
{
|
|
500
|
+
return Number(totalsItem.weight);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return totalsItem.weight;
|
|
504
|
+
}());
|
|
505
|
+
}
|
|
506
|
+
else
|
|
507
|
+
{
|
|
508
|
+
totalsItemObject.weight = 0;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
if(typeof totalsItem === 'object' && 'fruitCount' in totalsItem)
|
|
512
|
+
{
|
|
513
|
+
totalsItemObject.fruitCount = (function(){
|
|
514
|
+
if(typeof totalsItem.fruitCount !== 'number')
|
|
515
|
+
{
|
|
516
|
+
return Number.isInteger(Number(totalsItem.fruitCount)) ? Number(totalsItem.fruitCount) : Math.floor(Number(totalsItem.fruitCount));
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return Number.isInteger(totalsItem.fruitCount) ? totalsItem.fruitCount : Math.floor(totalsItem.fruitCount);
|
|
520
|
+
}());
|
|
521
|
+
}
|
|
522
|
+
else
|
|
523
|
+
{
|
|
524
|
+
totalsItemObject.fruitCount = 0;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if(typeof totalsItem === 'object' && 'packCount' in totalsItem)
|
|
528
|
+
{
|
|
529
|
+
totalsItemObject.packCount = (function(){
|
|
530
|
+
if(totalsItem.packCount === null)
|
|
531
|
+
{
|
|
532
|
+
return null;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if(typeof totalsItem.packCount !== 'number')
|
|
536
|
+
{
|
|
537
|
+
return Number(totalsItem.packCount);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
return totalsItem.packCount;
|
|
541
|
+
}());
|
|
542
|
+
}
|
|
543
|
+
else
|
|
544
|
+
{
|
|
545
|
+
totalsItemObject.packCount = null;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
return totalsItemObject;
|
|
549
|
+
}());
|
|
550
|
+
});
|
|
551
|
+
}());
|
|
552
|
+
}
|
|
553
|
+
else
|
|
554
|
+
{
|
|
555
|
+
outletSummariesItemObject.totals = [];
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
return outletSummariesItemObject;
|
|
559
|
+
}());
|
|
560
|
+
});
|
|
561
|
+
}());
|
|
562
|
+
}
|
|
563
|
+
|
|
357
564
|
if('initialOutletArticles' in jsonObject)
|
|
358
565
|
{
|
|
359
566
|
model.initialOutletArticles = (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, 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
|
}());
|
package/src/PackageVersion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '2.
|
|
2
|
+
export const version = '2.6.1';
|