@ricado/api-client 2.4.1 → 2.5.0
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/Lab/Site/FruitProfileController.js +12 -9
- package/lib/Controllers/Lab/Site/ProbeCalibrationController.js +921 -0
- package/lib/Controllers/Lab/Site/RackPositionController.js +2 -2
- package/lib/Controllers/Lab/Site/SampleController.js +15 -15
- package/lib/Controllers/Lab/Site/SampleResultController.js +29 -27
- package/lib/Controllers/Lab/Site/index.js +3 -3
- package/lib/Models/Lab/Site/FruitProfileModel.js +22 -4
- package/lib/Models/Lab/Site/{SampleFailureReasonModel.js → ProbeCalibrationModel.js} +141 -33
- package/lib/Models/Lab/Site/RackPositionModel.js +67 -15
- package/lib/Models/Lab/Site/SampleModel.js +51 -73
- package/lib/Models/Lab/Site/SampleResultModel.js +45 -23
- package/lib/Models/Lab/Site/index.js +3 -3
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +577 -305
- package/package.json +1 -1
- package/src/Controllers/Lab/Site/FruitProfileController.js +12 -9
- package/src/Controllers/Lab/Site/ProbeCalibrationController.js +1052 -0
- package/src/Controllers/Lab/Site/RackPositionController.js +2 -2
- package/src/Controllers/Lab/Site/SampleController.js +15 -15
- package/src/Controllers/Lab/Site/SampleResultController.js +29 -27
- package/src/Controllers/Lab/Site/index.js +2 -2
- package/src/Models/Lab/Site/FruitProfileModel.js +24 -4
- package/src/Models/Lab/Site/ProbeCalibrationModel.js +290 -0
- package/src/Models/Lab/Site/RackPositionModel.js +87 -15
- package/src/Models/Lab/Site/SampleModel.js +57 -82
- package/src/Models/Lab/Site/SampleResultModel.js +48 -23
- package/src/Models/Lab/Site/index.js +2 -2
- package/src/PackageVersion.js +1 -1
- package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +0 -192
- package/src/Controllers/Lab/Site/SampleFailureReasonController.js +0 -169
- package/src/Models/Lab/Site/SampleFailureReasonModel.js +0 -170
|
@@ -52,7 +52,7 @@ class RackPositionModel extends BaseModel
|
|
|
52
52
|
/**
|
|
53
53
|
* The Points used by this Rack Position
|
|
54
54
|
*
|
|
55
|
-
* @type {{pushButton: number, indicatorLight: number, temperature: number, calibrationOffset: number, disabled: number, currentSampleId: number, currentSampleStatus: number, nextSampleId: number, startCurrentSampleRequest: number, finishCurrentSampleRequest: number, currentSampleTotalDuration: number, currentSampleWarmUpDuration: number, currentSampleWarmUpCompleted: number, currentSampleBelowTargetDuration: number, currentSampleAboveTargetDuration: number, currentSampleWithinTargetDuration: number,
|
|
55
|
+
* @type {{pushButton: number, indicatorLight: number, temperature: number, calibrationOffset: number, disabled: number, currentSampleId: number, currentSampleStatus: number, nextSampleId: number, loadCurrentSampleRequest: number, startCurrentSampleRequest: number, finishCurrentSampleRequest: number, unloadCurrentSampleRequest: number, currentSampleTotalDuration: number, currentSampleWarmUpDuration: number, currentSampleWarmUpRateOfChange: number, currentSampleWarmUpWarning: number, currentSampleWarmUpCompleted: number, currentSampleBelowTargetDuration: number, currentSampleAboveTargetDuration: number, currentSampleWithinTargetDuration: number, currentSampleFinishCriteriaMet: number, currentSampleLatestUnloadTimestamp: number}}
|
|
56
56
|
* @public
|
|
57
57
|
*/
|
|
58
58
|
this.points = (function(){
|
|
@@ -74,14 +74,22 @@ class RackPositionModel extends BaseModel
|
|
|
74
74
|
|
|
75
75
|
pointsDefaultValue.nextSampleId = 0;
|
|
76
76
|
|
|
77
|
+
pointsDefaultValue.loadCurrentSampleRequest = 0;
|
|
78
|
+
|
|
77
79
|
pointsDefaultValue.startCurrentSampleRequest = 0;
|
|
78
80
|
|
|
79
81
|
pointsDefaultValue.finishCurrentSampleRequest = 0;
|
|
80
82
|
|
|
83
|
+
pointsDefaultValue.unloadCurrentSampleRequest = 0;
|
|
84
|
+
|
|
81
85
|
pointsDefaultValue.currentSampleTotalDuration = 0;
|
|
82
86
|
|
|
83
87
|
pointsDefaultValue.currentSampleWarmUpDuration = 0;
|
|
84
88
|
|
|
89
|
+
pointsDefaultValue.currentSampleWarmUpRateOfChange = 0;
|
|
90
|
+
|
|
91
|
+
pointsDefaultValue.currentSampleWarmUpWarning = 0;
|
|
92
|
+
|
|
85
93
|
pointsDefaultValue.currentSampleWarmUpCompleted = 0;
|
|
86
94
|
|
|
87
95
|
pointsDefaultValue.currentSampleBelowTargetDuration = 0;
|
|
@@ -90,9 +98,9 @@ class RackPositionModel extends BaseModel
|
|
|
90
98
|
|
|
91
99
|
pointsDefaultValue.currentSampleWithinTargetDuration = 0;
|
|
92
100
|
|
|
93
|
-
pointsDefaultValue.
|
|
101
|
+
pointsDefaultValue.currentSampleFinishCriteriaMet = 0;
|
|
94
102
|
|
|
95
|
-
pointsDefaultValue.
|
|
103
|
+
pointsDefaultValue.currentSampleLatestUnloadTimestamp = 0;
|
|
96
104
|
|
|
97
105
|
return pointsDefaultValue;
|
|
98
106
|
}());
|
|
@@ -357,6 +365,22 @@ class RackPositionModel extends BaseModel
|
|
|
357
365
|
pointsObject.nextSampleId = 0;
|
|
358
366
|
}
|
|
359
367
|
|
|
368
|
+
if(typeof jsonObject['points'] === 'object' && 'loadCurrentSampleRequest' in jsonObject['points'])
|
|
369
|
+
{
|
|
370
|
+
pointsObject.loadCurrentSampleRequest = (function(){
|
|
371
|
+
if(typeof jsonObject['points'].loadCurrentSampleRequest !== 'number')
|
|
372
|
+
{
|
|
373
|
+
return Number.isInteger(Number(jsonObject['points'].loadCurrentSampleRequest)) ? Number(jsonObject['points'].loadCurrentSampleRequest) : Math.floor(Number(jsonObject['points'].loadCurrentSampleRequest));
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return Number.isInteger(jsonObject['points'].loadCurrentSampleRequest) ? jsonObject['points'].loadCurrentSampleRequest : Math.floor(jsonObject['points'].loadCurrentSampleRequest);
|
|
377
|
+
}());
|
|
378
|
+
}
|
|
379
|
+
else
|
|
380
|
+
{
|
|
381
|
+
pointsObject.loadCurrentSampleRequest = 0;
|
|
382
|
+
}
|
|
383
|
+
|
|
360
384
|
if(typeof jsonObject['points'] === 'object' && 'startCurrentSampleRequest' in jsonObject['points'])
|
|
361
385
|
{
|
|
362
386
|
pointsObject.startCurrentSampleRequest = (function(){
|
|
@@ -389,6 +413,22 @@ class RackPositionModel extends BaseModel
|
|
|
389
413
|
pointsObject.finishCurrentSampleRequest = 0;
|
|
390
414
|
}
|
|
391
415
|
|
|
416
|
+
if(typeof jsonObject['points'] === 'object' && 'unloadCurrentSampleRequest' in jsonObject['points'])
|
|
417
|
+
{
|
|
418
|
+
pointsObject.unloadCurrentSampleRequest = (function(){
|
|
419
|
+
if(typeof jsonObject['points'].unloadCurrentSampleRequest !== 'number')
|
|
420
|
+
{
|
|
421
|
+
return Number.isInteger(Number(jsonObject['points'].unloadCurrentSampleRequest)) ? Number(jsonObject['points'].unloadCurrentSampleRequest) : Math.floor(Number(jsonObject['points'].unloadCurrentSampleRequest));
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
return Number.isInteger(jsonObject['points'].unloadCurrentSampleRequest) ? jsonObject['points'].unloadCurrentSampleRequest : Math.floor(jsonObject['points'].unloadCurrentSampleRequest);
|
|
425
|
+
}());
|
|
426
|
+
}
|
|
427
|
+
else
|
|
428
|
+
{
|
|
429
|
+
pointsObject.unloadCurrentSampleRequest = 0;
|
|
430
|
+
}
|
|
431
|
+
|
|
392
432
|
if(typeof jsonObject['points'] === 'object' && 'currentSampleTotalDuration' in jsonObject['points'])
|
|
393
433
|
{
|
|
394
434
|
pointsObject.currentSampleTotalDuration = (function(){
|
|
@@ -421,6 +461,38 @@ class RackPositionModel extends BaseModel
|
|
|
421
461
|
pointsObject.currentSampleWarmUpDuration = 0;
|
|
422
462
|
}
|
|
423
463
|
|
|
464
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleWarmUpRateOfChange' in jsonObject['points'])
|
|
465
|
+
{
|
|
466
|
+
pointsObject.currentSampleWarmUpRateOfChange = (function(){
|
|
467
|
+
if(typeof jsonObject['points'].currentSampleWarmUpRateOfChange !== 'number')
|
|
468
|
+
{
|
|
469
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleWarmUpRateOfChange)) ? Number(jsonObject['points'].currentSampleWarmUpRateOfChange) : Math.floor(Number(jsonObject['points'].currentSampleWarmUpRateOfChange));
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
return Number.isInteger(jsonObject['points'].currentSampleWarmUpRateOfChange) ? jsonObject['points'].currentSampleWarmUpRateOfChange : Math.floor(jsonObject['points'].currentSampleWarmUpRateOfChange);
|
|
473
|
+
}());
|
|
474
|
+
}
|
|
475
|
+
else
|
|
476
|
+
{
|
|
477
|
+
pointsObject.currentSampleWarmUpRateOfChange = 0;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleWarmUpWarning' in jsonObject['points'])
|
|
481
|
+
{
|
|
482
|
+
pointsObject.currentSampleWarmUpWarning = (function(){
|
|
483
|
+
if(typeof jsonObject['points'].currentSampleWarmUpWarning !== 'number')
|
|
484
|
+
{
|
|
485
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleWarmUpWarning)) ? Number(jsonObject['points'].currentSampleWarmUpWarning) : Math.floor(Number(jsonObject['points'].currentSampleWarmUpWarning));
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
return Number.isInteger(jsonObject['points'].currentSampleWarmUpWarning) ? jsonObject['points'].currentSampleWarmUpWarning : Math.floor(jsonObject['points'].currentSampleWarmUpWarning);
|
|
489
|
+
}());
|
|
490
|
+
}
|
|
491
|
+
else
|
|
492
|
+
{
|
|
493
|
+
pointsObject.currentSampleWarmUpWarning = 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
424
496
|
if(typeof jsonObject['points'] === 'object' && 'currentSampleWarmUpCompleted' in jsonObject['points'])
|
|
425
497
|
{
|
|
426
498
|
pointsObject.currentSampleWarmUpCompleted = (function(){
|
|
@@ -485,36 +557,36 @@ class RackPositionModel extends BaseModel
|
|
|
485
557
|
pointsObject.currentSampleWithinTargetDuration = 0;
|
|
486
558
|
}
|
|
487
559
|
|
|
488
|
-
if(typeof jsonObject['points'] === 'object' && '
|
|
560
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleFinishCriteriaMet' in jsonObject['points'])
|
|
489
561
|
{
|
|
490
|
-
pointsObject.
|
|
491
|
-
if(typeof jsonObject['points'].
|
|
562
|
+
pointsObject.currentSampleFinishCriteriaMet = (function(){
|
|
563
|
+
if(typeof jsonObject['points'].currentSampleFinishCriteriaMet !== 'number')
|
|
492
564
|
{
|
|
493
|
-
return Number.isInteger(Number(jsonObject['points'].
|
|
565
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleFinishCriteriaMet)) ? Number(jsonObject['points'].currentSampleFinishCriteriaMet) : Math.floor(Number(jsonObject['points'].currentSampleFinishCriteriaMet));
|
|
494
566
|
}
|
|
495
567
|
|
|
496
|
-
return Number.isInteger(jsonObject['points'].
|
|
568
|
+
return Number.isInteger(jsonObject['points'].currentSampleFinishCriteriaMet) ? jsonObject['points'].currentSampleFinishCriteriaMet : Math.floor(jsonObject['points'].currentSampleFinishCriteriaMet);
|
|
497
569
|
}());
|
|
498
570
|
}
|
|
499
571
|
else
|
|
500
572
|
{
|
|
501
|
-
pointsObject.
|
|
573
|
+
pointsObject.currentSampleFinishCriteriaMet = 0;
|
|
502
574
|
}
|
|
503
575
|
|
|
504
|
-
if(typeof jsonObject['points'] === 'object' && '
|
|
576
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleLatestUnloadTimestamp' in jsonObject['points'])
|
|
505
577
|
{
|
|
506
|
-
pointsObject.
|
|
507
|
-
if(typeof jsonObject['points'].
|
|
578
|
+
pointsObject.currentSampleLatestUnloadTimestamp = (function(){
|
|
579
|
+
if(typeof jsonObject['points'].currentSampleLatestUnloadTimestamp !== 'number')
|
|
508
580
|
{
|
|
509
|
-
return Number.isInteger(Number(jsonObject['points'].
|
|
581
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleLatestUnloadTimestamp)) ? Number(jsonObject['points'].currentSampleLatestUnloadTimestamp) : Math.floor(Number(jsonObject['points'].currentSampleLatestUnloadTimestamp));
|
|
510
582
|
}
|
|
511
583
|
|
|
512
|
-
return Number.isInteger(jsonObject['points'].
|
|
584
|
+
return Number.isInteger(jsonObject['points'].currentSampleLatestUnloadTimestamp) ? jsonObject['points'].currentSampleLatestUnloadTimestamp : Math.floor(jsonObject['points'].currentSampleLatestUnloadTimestamp);
|
|
513
585
|
}());
|
|
514
586
|
}
|
|
515
587
|
else
|
|
516
588
|
{
|
|
517
|
-
pointsObject.
|
|
589
|
+
pointsObject.currentSampleLatestUnloadTimestamp = 0;
|
|
518
590
|
}
|
|
519
591
|
|
|
520
592
|
return pointsObject;
|
|
@@ -66,28 +66,28 @@ class SampleModel extends BaseModel
|
|
|
66
66
|
this.createdSource = "";
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Name of the User who Created this Sample
|
|
70
70
|
*
|
|
71
71
|
* @type {?string}
|
|
72
72
|
* @public
|
|
73
73
|
*/
|
|
74
|
-
this.
|
|
74
|
+
this.createdUserName = null;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Optional Scheduled Timestamp when this Sample should Begin
|
|
78
78
|
*
|
|
79
|
-
* @type {?
|
|
79
|
+
* @type {?Date}
|
|
80
80
|
* @public
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
82
|
+
this.scheduledTimestamp = null;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* When this Sample was Loaded into the Dehydrator
|
|
86
86
|
*
|
|
87
87
|
* @type {?Date}
|
|
88
88
|
* @public
|
|
89
89
|
*/
|
|
90
|
-
this.
|
|
90
|
+
this.loadedTimestamp = null;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* When this Sample was Started
|
|
@@ -105,6 +105,14 @@ class SampleModel extends BaseModel
|
|
|
105
105
|
*/
|
|
106
106
|
this.finishTimestamp = null;
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* When this Sample was Unloaded from the Dehydrator
|
|
110
|
+
*
|
|
111
|
+
* @type {?Date}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.unloadedTimestamp = null;
|
|
115
|
+
|
|
108
116
|
/**
|
|
109
117
|
* When this Sample was Published
|
|
110
118
|
*
|
|
@@ -114,12 +122,12 @@ class SampleModel extends BaseModel
|
|
|
114
122
|
this.publishTimestamp = null;
|
|
115
123
|
|
|
116
124
|
/**
|
|
117
|
-
*
|
|
125
|
+
* The Source that Published this Sample
|
|
118
126
|
*
|
|
119
127
|
* @type {?string}
|
|
120
128
|
* @public
|
|
121
129
|
*/
|
|
122
|
-
this.
|
|
130
|
+
this.publishSource = null;
|
|
123
131
|
|
|
124
132
|
/**
|
|
125
133
|
* Name of the User who Published this Sample
|
|
@@ -153,22 +161,6 @@ class SampleModel extends BaseModel
|
|
|
153
161
|
*/
|
|
154
162
|
this.dehydratorId = "";
|
|
155
163
|
|
|
156
|
-
/**
|
|
157
|
-
* The Outcome of this Sample
|
|
158
|
-
*
|
|
159
|
-
* @type {?string}
|
|
160
|
-
* @public
|
|
161
|
-
*/
|
|
162
|
-
this.outcome = null;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* A Sample Failure Reason ID if this Sample Failed
|
|
166
|
-
*
|
|
167
|
-
* @type {?string}
|
|
168
|
-
* @public
|
|
169
|
-
*/
|
|
170
|
-
this.failureReasonId = null;
|
|
171
|
-
|
|
172
164
|
/**
|
|
173
165
|
* The Sample Result ID asociated with this Sample
|
|
174
166
|
*
|
|
@@ -299,23 +291,6 @@ class SampleModel extends BaseModel
|
|
|
299
291
|
}());
|
|
300
292
|
}
|
|
301
293
|
|
|
302
|
-
if('createdUserId' in jsonObject)
|
|
303
|
-
{
|
|
304
|
-
model.createdUserId = (function(){
|
|
305
|
-
if(jsonObject['createdUserId'] === null)
|
|
306
|
-
{
|
|
307
|
-
return null;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
if(typeof jsonObject['createdUserId'] !== 'string')
|
|
311
|
-
{
|
|
312
|
-
return String(jsonObject['createdUserId']);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
return jsonObject['createdUserId'];
|
|
316
|
-
}());
|
|
317
|
-
}
|
|
318
|
-
|
|
319
294
|
if('createdUserName' in jsonObject)
|
|
320
295
|
{
|
|
321
296
|
model.createdUserName = (function(){
|
|
@@ -350,6 +325,23 @@ class SampleModel extends BaseModel
|
|
|
350
325
|
}());
|
|
351
326
|
}
|
|
352
327
|
|
|
328
|
+
if('loadedTimestamp' in jsonObject)
|
|
329
|
+
{
|
|
330
|
+
model.loadedTimestamp = (function(){
|
|
331
|
+
if(jsonObject['loadedTimestamp'] === null)
|
|
332
|
+
{
|
|
333
|
+
return null;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if(typeof jsonObject['loadedTimestamp'] !== 'string')
|
|
337
|
+
{
|
|
338
|
+
return new Date(String(jsonObject['loadedTimestamp']));
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
return new Date(jsonObject['loadedTimestamp']);
|
|
342
|
+
}());
|
|
343
|
+
}
|
|
344
|
+
|
|
353
345
|
if('startTimestamp' in jsonObject)
|
|
354
346
|
{
|
|
355
347
|
model.startTimestamp = (function(){
|
|
@@ -384,6 +376,23 @@ class SampleModel extends BaseModel
|
|
|
384
376
|
}());
|
|
385
377
|
}
|
|
386
378
|
|
|
379
|
+
if('unloadedTimestamp' in jsonObject)
|
|
380
|
+
{
|
|
381
|
+
model.unloadedTimestamp = (function(){
|
|
382
|
+
if(jsonObject['unloadedTimestamp'] === null)
|
|
383
|
+
{
|
|
384
|
+
return null;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
if(typeof jsonObject['unloadedTimestamp'] !== 'string')
|
|
388
|
+
{
|
|
389
|
+
return new Date(String(jsonObject['unloadedTimestamp']));
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
return new Date(jsonObject['unloadedTimestamp']);
|
|
393
|
+
}());
|
|
394
|
+
}
|
|
395
|
+
|
|
387
396
|
if('publishTimestamp' in jsonObject)
|
|
388
397
|
{
|
|
389
398
|
model.publishTimestamp = (function(){
|
|
@@ -401,20 +410,20 @@ class SampleModel extends BaseModel
|
|
|
401
410
|
}());
|
|
402
411
|
}
|
|
403
412
|
|
|
404
|
-
if('
|
|
413
|
+
if('publishSource' in jsonObject)
|
|
405
414
|
{
|
|
406
|
-
model.
|
|
407
|
-
if(jsonObject['
|
|
415
|
+
model.publishSource = (function(){
|
|
416
|
+
if(jsonObject['publishSource'] === null)
|
|
408
417
|
{
|
|
409
418
|
return null;
|
|
410
419
|
}
|
|
411
420
|
|
|
412
|
-
if(typeof jsonObject['
|
|
421
|
+
if(typeof jsonObject['publishSource'] !== 'string')
|
|
413
422
|
{
|
|
414
|
-
return String(jsonObject['
|
|
423
|
+
return String(jsonObject['publishSource']);
|
|
415
424
|
}
|
|
416
425
|
|
|
417
|
-
return jsonObject['
|
|
426
|
+
return jsonObject['publishSource'];
|
|
418
427
|
}());
|
|
419
428
|
}
|
|
420
429
|
|
|
@@ -471,40 +480,6 @@ class SampleModel extends BaseModel
|
|
|
471
480
|
}());
|
|
472
481
|
}
|
|
473
482
|
|
|
474
|
-
if('outcome' in jsonObject)
|
|
475
|
-
{
|
|
476
|
-
model.outcome = (function(){
|
|
477
|
-
if(jsonObject['outcome'] === null)
|
|
478
|
-
{
|
|
479
|
-
return null;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
if(typeof jsonObject['outcome'] !== 'string')
|
|
483
|
-
{
|
|
484
|
-
return String(jsonObject['outcome']);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
return jsonObject['outcome'];
|
|
488
|
-
}());
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
if('failureReasonId' in jsonObject)
|
|
492
|
-
{
|
|
493
|
-
model.failureReasonId = (function(){
|
|
494
|
-
if(jsonObject['failureReasonId'] === null)
|
|
495
|
-
{
|
|
496
|
-
return null;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
if(typeof jsonObject['failureReasonId'] !== 'string')
|
|
500
|
-
{
|
|
501
|
-
return String(jsonObject['failureReasonId']);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
return jsonObject['failureReasonId'];
|
|
505
|
-
}());
|
|
506
|
-
}
|
|
507
|
-
|
|
508
483
|
if('resultId' in jsonObject)
|
|
509
484
|
{
|
|
510
485
|
model.resultId = (function(){
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import BaseModel from '../../../Models/BaseModel';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Model Class for a Sample
|
|
10
|
+
* Model Class for a Sample Result
|
|
11
11
|
*
|
|
12
12
|
* @class
|
|
13
13
|
* @hideconstructor
|
|
@@ -19,14 +19,14 @@ class SampleResultModel extends BaseModel
|
|
|
19
19
|
* SampleResultModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
-
* @param {number} siteId The Site ID associated with this Sample
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Sample Result
|
|
23
23
|
*/
|
|
24
24
|
constructor(siteId)
|
|
25
25
|
{
|
|
26
26
|
super();
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* The Sample
|
|
29
|
+
* The Sample Result ID
|
|
30
30
|
*
|
|
31
31
|
* @type {string}
|
|
32
32
|
* @public
|
|
@@ -106,20 +106,20 @@ class SampleResultModel extends BaseModel
|
|
|
106
106
|
this.withinTargetDuration = 0;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* Timestamp of when the
|
|
109
|
+
* Timestamp of when the Finish Criteria was Met for the Sample - `null` if not Met
|
|
110
110
|
*
|
|
111
111
|
* @type {?Date}
|
|
112
112
|
* @public
|
|
113
113
|
*/
|
|
114
|
-
this.
|
|
114
|
+
this.finishCriteriaMetTimestamp = null;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
-
* Timestamp of when the
|
|
117
|
+
* Latest Possible Timestamp of when the Sample should have been Unloaded to remain Compliant
|
|
118
118
|
*
|
|
119
119
|
* @type {?Date}
|
|
120
120
|
* @public
|
|
121
121
|
*/
|
|
122
|
-
this.
|
|
122
|
+
this.latestUnloadTimestamp = null;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* The Average Temperature for the Total Duration of the Sample
|
|
@@ -129,6 +129,14 @@ class SampleResultModel extends BaseModel
|
|
|
129
129
|
*/
|
|
130
130
|
this.totalAverageTemperature = null;
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* The Average Temperature Rate-of-Change seen during the Warm Up process for the Sample
|
|
134
|
+
*
|
|
135
|
+
* @type {?number}
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
this.warmUpRateOfChangeTemperature = null;
|
|
139
|
+
|
|
132
140
|
/**
|
|
133
141
|
* The Minimum Temperature seen Below the Temperature Target for the Sample
|
|
134
142
|
*
|
|
@@ -186,7 +194,7 @@ class SampleResultModel extends BaseModel
|
|
|
186
194
|
this.withinTargetAverageTemperature = null;
|
|
187
195
|
|
|
188
196
|
/**
|
|
189
|
-
* Whether the Sample
|
|
197
|
+
* Whether the Sample Result has been deleted
|
|
190
198
|
*
|
|
191
199
|
* @type {boolean}
|
|
192
200
|
* @public
|
|
@@ -194,7 +202,7 @@ class SampleResultModel extends BaseModel
|
|
|
194
202
|
this.deleted = false;
|
|
195
203
|
|
|
196
204
|
/**
|
|
197
|
-
* When the Sample
|
|
205
|
+
* When the Sample Result was last updated
|
|
198
206
|
*
|
|
199
207
|
* @type {Date}
|
|
200
208
|
* @public
|
|
@@ -202,7 +210,7 @@ class SampleResultModel extends BaseModel
|
|
|
202
210
|
this.updateTimestamp = new Date();
|
|
203
211
|
|
|
204
212
|
/**
|
|
205
|
-
* The Site ID associated with this Sample
|
|
213
|
+
* The Site ID associated with this Sample Result
|
|
206
214
|
*
|
|
207
215
|
* @type {number}
|
|
208
216
|
* @public
|
|
@@ -216,7 +224,7 @@ class SampleResultModel extends BaseModel
|
|
|
216
224
|
* @static
|
|
217
225
|
* @public
|
|
218
226
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
219
|
-
* @param {number} siteId The Site ID associated with this Sample
|
|
227
|
+
* @param {number} siteId The Site ID associated with this Sample Result
|
|
220
228
|
* @return {SampleResultModel}
|
|
221
229
|
*/
|
|
222
230
|
static fromJSON(json, siteId)
|
|
@@ -364,37 +372,37 @@ class SampleResultModel extends BaseModel
|
|
|
364
372
|
}());
|
|
365
373
|
}
|
|
366
374
|
|
|
367
|
-
if('
|
|
375
|
+
if('finishCriteriaMetTimestamp' in jsonObject)
|
|
368
376
|
{
|
|
369
|
-
model.
|
|
370
|
-
if(jsonObject['
|
|
377
|
+
model.finishCriteriaMetTimestamp = (function(){
|
|
378
|
+
if(jsonObject['finishCriteriaMetTimestamp'] === null)
|
|
371
379
|
{
|
|
372
380
|
return null;
|
|
373
381
|
}
|
|
374
382
|
|
|
375
|
-
if(typeof jsonObject['
|
|
383
|
+
if(typeof jsonObject['finishCriteriaMetTimestamp'] !== 'string')
|
|
376
384
|
{
|
|
377
|
-
return new Date(String(jsonObject['
|
|
385
|
+
return new Date(String(jsonObject['finishCriteriaMetTimestamp']));
|
|
378
386
|
}
|
|
379
387
|
|
|
380
|
-
return new Date(jsonObject['
|
|
388
|
+
return new Date(jsonObject['finishCriteriaMetTimestamp']);
|
|
381
389
|
}());
|
|
382
390
|
}
|
|
383
391
|
|
|
384
|
-
if('
|
|
392
|
+
if('latestUnloadTimestamp' in jsonObject)
|
|
385
393
|
{
|
|
386
|
-
model.
|
|
387
|
-
if(jsonObject['
|
|
394
|
+
model.latestUnloadTimestamp = (function(){
|
|
395
|
+
if(jsonObject['latestUnloadTimestamp'] === null)
|
|
388
396
|
{
|
|
389
397
|
return null;
|
|
390
398
|
}
|
|
391
399
|
|
|
392
|
-
if(typeof jsonObject['
|
|
400
|
+
if(typeof jsonObject['latestUnloadTimestamp'] !== 'string')
|
|
393
401
|
{
|
|
394
|
-
return new Date(String(jsonObject['
|
|
402
|
+
return new Date(String(jsonObject['latestUnloadTimestamp']));
|
|
395
403
|
}
|
|
396
404
|
|
|
397
|
-
return new Date(jsonObject['
|
|
405
|
+
return new Date(jsonObject['latestUnloadTimestamp']);
|
|
398
406
|
}());
|
|
399
407
|
}
|
|
400
408
|
|
|
@@ -415,6 +423,23 @@ class SampleResultModel extends BaseModel
|
|
|
415
423
|
}());
|
|
416
424
|
}
|
|
417
425
|
|
|
426
|
+
if('warmUpRateOfChangeTemperature' in jsonObject)
|
|
427
|
+
{
|
|
428
|
+
model.warmUpRateOfChangeTemperature = (function(){
|
|
429
|
+
if(jsonObject['warmUpRateOfChangeTemperature'] === null)
|
|
430
|
+
{
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if(typeof jsonObject['warmUpRateOfChangeTemperature'] !== 'number')
|
|
435
|
+
{
|
|
436
|
+
return Number(jsonObject['warmUpRateOfChangeTemperature']);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
return jsonObject['warmUpRateOfChangeTemperature'];
|
|
440
|
+
}());
|
|
441
|
+
}
|
|
442
|
+
|
|
418
443
|
if('belowTargetMinimumTemperature' in jsonObject)
|
|
419
444
|
{
|
|
420
445
|
model.belowTargetMinimumTemperature = (function(){
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
import DehydratorModel from './DehydratorModel';
|
|
11
11
|
import FruitProfileModel from './FruitProfileModel';
|
|
12
12
|
import LabModel from './LabModel';
|
|
13
|
+
import ProbeCalibrationModel from './ProbeCalibrationModel';
|
|
13
14
|
import RackModel from './RackModel';
|
|
14
15
|
import RackPositionModel from './RackPositionModel';
|
|
15
|
-
import SampleFailureReasonModel from './SampleFailureReasonModel';
|
|
16
16
|
import SampleModel from './SampleModel';
|
|
17
17
|
import SampleResultModel from './SampleResultModel';
|
|
18
18
|
|
|
@@ -20,9 +20,9 @@ const Site = {
|
|
|
20
20
|
DehydratorModel,
|
|
21
21
|
FruitProfileModel,
|
|
22
22
|
LabModel,
|
|
23
|
+
ProbeCalibrationModel,
|
|
23
24
|
RackModel,
|
|
24
25
|
RackPositionModel,
|
|
25
|
-
SampleFailureReasonModel,
|
|
26
26
|
SampleModel,
|
|
27
27
|
SampleResultModel,
|
|
28
28
|
};
|
package/src/PackageVersion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '2.
|
|
2
|
+
export const version = '2.5.0';
|