@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
|
@@ -82,7 +82,7 @@ var RackPositionModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
82
82
|
/**
|
|
83
83
|
* The Points used by this Rack Position
|
|
84
84
|
*
|
|
85
|
-
* @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,
|
|
85
|
+
* @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}}
|
|
86
86
|
* @public
|
|
87
87
|
*/
|
|
88
88
|
|
|
@@ -96,16 +96,20 @@ var RackPositionModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
96
96
|
pointsDefaultValue.currentSampleId = 0;
|
|
97
97
|
pointsDefaultValue.currentSampleStatus = 0;
|
|
98
98
|
pointsDefaultValue.nextSampleId = 0;
|
|
99
|
+
pointsDefaultValue.loadCurrentSampleRequest = 0;
|
|
99
100
|
pointsDefaultValue.startCurrentSampleRequest = 0;
|
|
100
101
|
pointsDefaultValue.finishCurrentSampleRequest = 0;
|
|
102
|
+
pointsDefaultValue.unloadCurrentSampleRequest = 0;
|
|
101
103
|
pointsDefaultValue.currentSampleTotalDuration = 0;
|
|
102
104
|
pointsDefaultValue.currentSampleWarmUpDuration = 0;
|
|
105
|
+
pointsDefaultValue.currentSampleWarmUpRateOfChange = 0;
|
|
106
|
+
pointsDefaultValue.currentSampleWarmUpWarning = 0;
|
|
103
107
|
pointsDefaultValue.currentSampleWarmUpCompleted = 0;
|
|
104
108
|
pointsDefaultValue.currentSampleBelowTargetDuration = 0;
|
|
105
109
|
pointsDefaultValue.currentSampleAboveTargetDuration = 0;
|
|
106
110
|
pointsDefaultValue.currentSampleWithinTargetDuration = 0;
|
|
107
|
-
pointsDefaultValue.
|
|
108
|
-
pointsDefaultValue.
|
|
111
|
+
pointsDefaultValue.currentSampleFinishCriteriaMet = 0;
|
|
112
|
+
pointsDefaultValue.currentSampleLatestUnloadTimestamp = 0;
|
|
109
113
|
return pointsDefaultValue;
|
|
110
114
|
}();
|
|
111
115
|
/**
|
|
@@ -330,6 +334,18 @@ var RackPositionModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
330
334
|
pointsObject.nextSampleId = 0;
|
|
331
335
|
}
|
|
332
336
|
|
|
337
|
+
if (_typeof(jsonObject['points']) === 'object' && 'loadCurrentSampleRequest' in jsonObject['points']) {
|
|
338
|
+
pointsObject.loadCurrentSampleRequest = function () {
|
|
339
|
+
if (typeof jsonObject['points'].loadCurrentSampleRequest !== 'number') {
|
|
340
|
+
return Number.isInteger(Number(jsonObject['points'].loadCurrentSampleRequest)) ? Number(jsonObject['points'].loadCurrentSampleRequest) : Math.floor(Number(jsonObject['points'].loadCurrentSampleRequest));
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
return Number.isInteger(jsonObject['points'].loadCurrentSampleRequest) ? jsonObject['points'].loadCurrentSampleRequest : Math.floor(jsonObject['points'].loadCurrentSampleRequest);
|
|
344
|
+
}();
|
|
345
|
+
} else {
|
|
346
|
+
pointsObject.loadCurrentSampleRequest = 0;
|
|
347
|
+
}
|
|
348
|
+
|
|
333
349
|
if (_typeof(jsonObject['points']) === 'object' && 'startCurrentSampleRequest' in jsonObject['points']) {
|
|
334
350
|
pointsObject.startCurrentSampleRequest = function () {
|
|
335
351
|
if (typeof jsonObject['points'].startCurrentSampleRequest !== 'number') {
|
|
@@ -354,6 +370,18 @@ var RackPositionModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
354
370
|
pointsObject.finishCurrentSampleRequest = 0;
|
|
355
371
|
}
|
|
356
372
|
|
|
373
|
+
if (_typeof(jsonObject['points']) === 'object' && 'unloadCurrentSampleRequest' in jsonObject['points']) {
|
|
374
|
+
pointsObject.unloadCurrentSampleRequest = function () {
|
|
375
|
+
if (typeof jsonObject['points'].unloadCurrentSampleRequest !== 'number') {
|
|
376
|
+
return Number.isInteger(Number(jsonObject['points'].unloadCurrentSampleRequest)) ? Number(jsonObject['points'].unloadCurrentSampleRequest) : Math.floor(Number(jsonObject['points'].unloadCurrentSampleRequest));
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
return Number.isInteger(jsonObject['points'].unloadCurrentSampleRequest) ? jsonObject['points'].unloadCurrentSampleRequest : Math.floor(jsonObject['points'].unloadCurrentSampleRequest);
|
|
380
|
+
}();
|
|
381
|
+
} else {
|
|
382
|
+
pointsObject.unloadCurrentSampleRequest = 0;
|
|
383
|
+
}
|
|
384
|
+
|
|
357
385
|
if (_typeof(jsonObject['points']) === 'object' && 'currentSampleTotalDuration' in jsonObject['points']) {
|
|
358
386
|
pointsObject.currentSampleTotalDuration = function () {
|
|
359
387
|
if (typeof jsonObject['points'].currentSampleTotalDuration !== 'number') {
|
|
@@ -378,6 +406,30 @@ var RackPositionModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
378
406
|
pointsObject.currentSampleWarmUpDuration = 0;
|
|
379
407
|
}
|
|
380
408
|
|
|
409
|
+
if (_typeof(jsonObject['points']) === 'object' && 'currentSampleWarmUpRateOfChange' in jsonObject['points']) {
|
|
410
|
+
pointsObject.currentSampleWarmUpRateOfChange = function () {
|
|
411
|
+
if (typeof jsonObject['points'].currentSampleWarmUpRateOfChange !== 'number') {
|
|
412
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleWarmUpRateOfChange)) ? Number(jsonObject['points'].currentSampleWarmUpRateOfChange) : Math.floor(Number(jsonObject['points'].currentSampleWarmUpRateOfChange));
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return Number.isInteger(jsonObject['points'].currentSampleWarmUpRateOfChange) ? jsonObject['points'].currentSampleWarmUpRateOfChange : Math.floor(jsonObject['points'].currentSampleWarmUpRateOfChange);
|
|
416
|
+
}();
|
|
417
|
+
} else {
|
|
418
|
+
pointsObject.currentSampleWarmUpRateOfChange = 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if (_typeof(jsonObject['points']) === 'object' && 'currentSampleWarmUpWarning' in jsonObject['points']) {
|
|
422
|
+
pointsObject.currentSampleWarmUpWarning = function () {
|
|
423
|
+
if (typeof jsonObject['points'].currentSampleWarmUpWarning !== 'number') {
|
|
424
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleWarmUpWarning)) ? Number(jsonObject['points'].currentSampleWarmUpWarning) : Math.floor(Number(jsonObject['points'].currentSampleWarmUpWarning));
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
return Number.isInteger(jsonObject['points'].currentSampleWarmUpWarning) ? jsonObject['points'].currentSampleWarmUpWarning : Math.floor(jsonObject['points'].currentSampleWarmUpWarning);
|
|
428
|
+
}();
|
|
429
|
+
} else {
|
|
430
|
+
pointsObject.currentSampleWarmUpWarning = 0;
|
|
431
|
+
}
|
|
432
|
+
|
|
381
433
|
if (_typeof(jsonObject['points']) === 'object' && 'currentSampleWarmUpCompleted' in jsonObject['points']) {
|
|
382
434
|
pointsObject.currentSampleWarmUpCompleted = function () {
|
|
383
435
|
if (typeof jsonObject['points'].currentSampleWarmUpCompleted !== 'number') {
|
|
@@ -426,28 +478,28 @@ var RackPositionModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
426
478
|
pointsObject.currentSampleWithinTargetDuration = 0;
|
|
427
479
|
}
|
|
428
480
|
|
|
429
|
-
if (_typeof(jsonObject['points']) === 'object' && '
|
|
430
|
-
pointsObject.
|
|
431
|
-
if (typeof jsonObject['points'].
|
|
432
|
-
return Number.isInteger(Number(jsonObject['points'].
|
|
481
|
+
if (_typeof(jsonObject['points']) === 'object' && 'currentSampleFinishCriteriaMet' in jsonObject['points']) {
|
|
482
|
+
pointsObject.currentSampleFinishCriteriaMet = function () {
|
|
483
|
+
if (typeof jsonObject['points'].currentSampleFinishCriteriaMet !== 'number') {
|
|
484
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleFinishCriteriaMet)) ? Number(jsonObject['points'].currentSampleFinishCriteriaMet) : Math.floor(Number(jsonObject['points'].currentSampleFinishCriteriaMet));
|
|
433
485
|
}
|
|
434
486
|
|
|
435
|
-
return Number.isInteger(jsonObject['points'].
|
|
487
|
+
return Number.isInteger(jsonObject['points'].currentSampleFinishCriteriaMet) ? jsonObject['points'].currentSampleFinishCriteriaMet : Math.floor(jsonObject['points'].currentSampleFinishCriteriaMet);
|
|
436
488
|
}();
|
|
437
489
|
} else {
|
|
438
|
-
pointsObject.
|
|
490
|
+
pointsObject.currentSampleFinishCriteriaMet = 0;
|
|
439
491
|
}
|
|
440
492
|
|
|
441
|
-
if (_typeof(jsonObject['points']) === 'object' && '
|
|
442
|
-
pointsObject.
|
|
443
|
-
if (typeof jsonObject['points'].
|
|
444
|
-
return Number.isInteger(Number(jsonObject['points'].
|
|
493
|
+
if (_typeof(jsonObject['points']) === 'object' && 'currentSampleLatestUnloadTimestamp' in jsonObject['points']) {
|
|
494
|
+
pointsObject.currentSampleLatestUnloadTimestamp = function () {
|
|
495
|
+
if (typeof jsonObject['points'].currentSampleLatestUnloadTimestamp !== 'number') {
|
|
496
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleLatestUnloadTimestamp)) ? Number(jsonObject['points'].currentSampleLatestUnloadTimestamp) : Math.floor(Number(jsonObject['points'].currentSampleLatestUnloadTimestamp));
|
|
445
497
|
}
|
|
446
498
|
|
|
447
|
-
return Number.isInteger(jsonObject['points'].
|
|
499
|
+
return Number.isInteger(jsonObject['points'].currentSampleLatestUnloadTimestamp) ? jsonObject['points'].currentSampleLatestUnloadTimestamp : Math.floor(jsonObject['points'].currentSampleLatestUnloadTimestamp);
|
|
448
500
|
}();
|
|
449
501
|
} else {
|
|
450
|
-
pointsObject.
|
|
502
|
+
pointsObject.currentSampleLatestUnloadTimestamp = 0;
|
|
451
503
|
}
|
|
452
504
|
|
|
453
505
|
return pointsObject;
|
|
@@ -96,29 +96,29 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
96
96
|
|
|
97
97
|
_this.createdSource = "";
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* Name of the User who Created this Sample
|
|
100
100
|
*
|
|
101
101
|
* @type {?string}
|
|
102
102
|
* @public
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
|
-
_this.
|
|
105
|
+
_this.createdUserName = null;
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
107
|
+
* Optional Scheduled Timestamp when this Sample should Begin
|
|
108
108
|
*
|
|
109
|
-
* @type {?
|
|
109
|
+
* @type {?Date}
|
|
110
110
|
* @public
|
|
111
111
|
*/
|
|
112
112
|
|
|
113
|
-
_this.
|
|
113
|
+
_this.scheduledTimestamp = null;
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* When this Sample was Loaded into the Dehydrator
|
|
116
116
|
*
|
|
117
117
|
* @type {?Date}
|
|
118
118
|
* @public
|
|
119
119
|
*/
|
|
120
120
|
|
|
121
|
-
_this.
|
|
121
|
+
_this.loadedTimestamp = null;
|
|
122
122
|
/**
|
|
123
123
|
* When this Sample was Started
|
|
124
124
|
*
|
|
@@ -135,6 +135,14 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
135
135
|
*/
|
|
136
136
|
|
|
137
137
|
_this.finishTimestamp = null;
|
|
138
|
+
/**
|
|
139
|
+
* When this Sample was Unloaded from the Dehydrator
|
|
140
|
+
*
|
|
141
|
+
* @type {?Date}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.unloadedTimestamp = null;
|
|
138
146
|
/**
|
|
139
147
|
* When this Sample was Published
|
|
140
148
|
*
|
|
@@ -144,13 +152,13 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
144
152
|
|
|
145
153
|
_this.publishTimestamp = null;
|
|
146
154
|
/**
|
|
147
|
-
*
|
|
155
|
+
* The Source that Published this Sample
|
|
148
156
|
*
|
|
149
157
|
* @type {?string}
|
|
150
158
|
* @public
|
|
151
159
|
*/
|
|
152
160
|
|
|
153
|
-
_this.
|
|
161
|
+
_this.publishSource = null;
|
|
154
162
|
/**
|
|
155
163
|
* Name of the User who Published this Sample
|
|
156
164
|
*
|
|
@@ -183,22 +191,6 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
183
191
|
*/
|
|
184
192
|
|
|
185
193
|
_this.dehydratorId = "";
|
|
186
|
-
/**
|
|
187
|
-
* The Outcome of this Sample
|
|
188
|
-
*
|
|
189
|
-
* @type {?string}
|
|
190
|
-
* @public
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
|
-
_this.outcome = null;
|
|
194
|
-
/**
|
|
195
|
-
* A Sample Failure Reason ID if this Sample Failed
|
|
196
|
-
*
|
|
197
|
-
* @type {?string}
|
|
198
|
-
* @public
|
|
199
|
-
*/
|
|
200
|
-
|
|
201
|
-
_this.failureReasonId = null;
|
|
202
194
|
/**
|
|
203
195
|
* The Sample Result ID asociated with this Sample
|
|
204
196
|
*
|
|
@@ -320,20 +312,6 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
320
312
|
}();
|
|
321
313
|
}
|
|
322
314
|
|
|
323
|
-
if ('createdUserId' in jsonObject) {
|
|
324
|
-
model.createdUserId = function () {
|
|
325
|
-
if (jsonObject['createdUserId'] === null) {
|
|
326
|
-
return null;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
if (typeof jsonObject['createdUserId'] !== 'string') {
|
|
330
|
-
return String(jsonObject['createdUserId']);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
return jsonObject['createdUserId'];
|
|
334
|
-
}();
|
|
335
|
-
}
|
|
336
|
-
|
|
337
315
|
if ('createdUserName' in jsonObject) {
|
|
338
316
|
model.createdUserName = function () {
|
|
339
317
|
if (jsonObject['createdUserName'] === null) {
|
|
@@ -362,6 +340,20 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
362
340
|
}();
|
|
363
341
|
}
|
|
364
342
|
|
|
343
|
+
if ('loadedTimestamp' in jsonObject) {
|
|
344
|
+
model.loadedTimestamp = function () {
|
|
345
|
+
if (jsonObject['loadedTimestamp'] === null) {
|
|
346
|
+
return null;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if (typeof jsonObject['loadedTimestamp'] !== 'string') {
|
|
350
|
+
return new Date(String(jsonObject['loadedTimestamp']));
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
return new Date(jsonObject['loadedTimestamp']);
|
|
354
|
+
}();
|
|
355
|
+
}
|
|
356
|
+
|
|
365
357
|
if ('startTimestamp' in jsonObject) {
|
|
366
358
|
model.startTimestamp = function () {
|
|
367
359
|
if (jsonObject['startTimestamp'] === null) {
|
|
@@ -390,6 +382,20 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
390
382
|
}();
|
|
391
383
|
}
|
|
392
384
|
|
|
385
|
+
if ('unloadedTimestamp' in jsonObject) {
|
|
386
|
+
model.unloadedTimestamp = function () {
|
|
387
|
+
if (jsonObject['unloadedTimestamp'] === null) {
|
|
388
|
+
return null;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if (typeof jsonObject['unloadedTimestamp'] !== 'string') {
|
|
392
|
+
return new Date(String(jsonObject['unloadedTimestamp']));
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return new Date(jsonObject['unloadedTimestamp']);
|
|
396
|
+
}();
|
|
397
|
+
}
|
|
398
|
+
|
|
393
399
|
if ('publishTimestamp' in jsonObject) {
|
|
394
400
|
model.publishTimestamp = function () {
|
|
395
401
|
if (jsonObject['publishTimestamp'] === null) {
|
|
@@ -404,17 +410,17 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
404
410
|
}();
|
|
405
411
|
}
|
|
406
412
|
|
|
407
|
-
if ('
|
|
408
|
-
model.
|
|
409
|
-
if (jsonObject['
|
|
413
|
+
if ('publishSource' in jsonObject) {
|
|
414
|
+
model.publishSource = function () {
|
|
415
|
+
if (jsonObject['publishSource'] === null) {
|
|
410
416
|
return null;
|
|
411
417
|
}
|
|
412
418
|
|
|
413
|
-
if (typeof jsonObject['
|
|
414
|
-
return String(jsonObject['
|
|
419
|
+
if (typeof jsonObject['publishSource'] !== 'string') {
|
|
420
|
+
return String(jsonObject['publishSource']);
|
|
415
421
|
}
|
|
416
422
|
|
|
417
|
-
return jsonObject['
|
|
423
|
+
return jsonObject['publishSource'];
|
|
418
424
|
}();
|
|
419
425
|
}
|
|
420
426
|
|
|
@@ -462,34 +468,6 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
462
468
|
}();
|
|
463
469
|
}
|
|
464
470
|
|
|
465
|
-
if ('outcome' in jsonObject) {
|
|
466
|
-
model.outcome = function () {
|
|
467
|
-
if (jsonObject['outcome'] === null) {
|
|
468
|
-
return null;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
if (typeof jsonObject['outcome'] !== 'string') {
|
|
472
|
-
return String(jsonObject['outcome']);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
return jsonObject['outcome'];
|
|
476
|
-
}();
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
if ('failureReasonId' in jsonObject) {
|
|
480
|
-
model.failureReasonId = function () {
|
|
481
|
-
if (jsonObject['failureReasonId'] === null) {
|
|
482
|
-
return null;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
if (typeof jsonObject['failureReasonId'] !== 'string') {
|
|
486
|
-
return String(jsonObject['failureReasonId']);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
return jsonObject['failureReasonId'];
|
|
490
|
-
}();
|
|
491
|
-
}
|
|
492
|
-
|
|
493
471
|
if ('resultId' in jsonObject) {
|
|
494
472
|
model.resultId = function () {
|
|
495
473
|
if (jsonObject['resultId'] === null) {
|
|
@@ -32,7 +32,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
32
32
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Model Class for a Sample
|
|
35
|
+
* Model Class for a Sample Result
|
|
36
36
|
*
|
|
37
37
|
* @class
|
|
38
38
|
* @hideconstructor
|
|
@@ -47,7 +47,7 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
47
47
|
* SampleResultModel Constructor
|
|
48
48
|
*
|
|
49
49
|
* @protected
|
|
50
|
-
* @param {number} siteId The Site ID associated with this Sample
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Sample Result
|
|
51
51
|
*/
|
|
52
52
|
function SampleResultModel(siteId) {
|
|
53
53
|
var _this;
|
|
@@ -56,7 +56,7 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
56
56
|
|
|
57
57
|
_this = _super.call(this);
|
|
58
58
|
/**
|
|
59
|
-
* The Sample
|
|
59
|
+
* The Sample Result ID
|
|
60
60
|
*
|
|
61
61
|
* @type {string}
|
|
62
62
|
* @public
|
|
@@ -136,21 +136,21 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
136
136
|
|
|
137
137
|
_this.withinTargetDuration = 0;
|
|
138
138
|
/**
|
|
139
|
-
* Timestamp of when the
|
|
139
|
+
* Timestamp of when the Finish Criteria was Met for the Sample - `null` if not Met
|
|
140
140
|
*
|
|
141
141
|
* @type {?Date}
|
|
142
142
|
* @public
|
|
143
143
|
*/
|
|
144
144
|
|
|
145
|
-
_this.
|
|
145
|
+
_this.finishCriteriaMetTimestamp = null;
|
|
146
146
|
/**
|
|
147
|
-
* Timestamp of when the
|
|
147
|
+
* Latest Possible Timestamp of when the Sample should have been Unloaded to remain Compliant
|
|
148
148
|
*
|
|
149
149
|
* @type {?Date}
|
|
150
150
|
* @public
|
|
151
151
|
*/
|
|
152
152
|
|
|
153
|
-
_this.
|
|
153
|
+
_this.latestUnloadTimestamp = null;
|
|
154
154
|
/**
|
|
155
155
|
* The Average Temperature for the Total Duration of the Sample
|
|
156
156
|
*
|
|
@@ -159,6 +159,14 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
159
159
|
*/
|
|
160
160
|
|
|
161
161
|
_this.totalAverageTemperature = null;
|
|
162
|
+
/**
|
|
163
|
+
* The Average Temperature Rate-of-Change seen during the Warm Up process for the Sample
|
|
164
|
+
*
|
|
165
|
+
* @type {?number}
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
_this.warmUpRateOfChangeTemperature = null;
|
|
162
170
|
/**
|
|
163
171
|
* The Minimum Temperature seen Below the Temperature Target for the Sample
|
|
164
172
|
*
|
|
@@ -216,7 +224,7 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
216
224
|
|
|
217
225
|
_this.withinTargetAverageTemperature = null;
|
|
218
226
|
/**
|
|
219
|
-
* Whether the Sample
|
|
227
|
+
* Whether the Sample Result has been deleted
|
|
220
228
|
*
|
|
221
229
|
* @type {boolean}
|
|
222
230
|
* @public
|
|
@@ -224,7 +232,7 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
224
232
|
|
|
225
233
|
_this.deleted = false;
|
|
226
234
|
/**
|
|
227
|
-
* When the Sample
|
|
235
|
+
* When the Sample Result was last updated
|
|
228
236
|
*
|
|
229
237
|
* @type {Date}
|
|
230
238
|
* @public
|
|
@@ -232,7 +240,7 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
232
240
|
|
|
233
241
|
_this.updateTimestamp = new Date();
|
|
234
242
|
/**
|
|
235
|
-
* The Site ID associated with this Sample
|
|
243
|
+
* The Site ID associated with this Sample Result
|
|
236
244
|
*
|
|
237
245
|
* @type {number}
|
|
238
246
|
* @public
|
|
@@ -247,7 +255,7 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
247
255
|
* @static
|
|
248
256
|
* @public
|
|
249
257
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
250
|
-
* @param {number} siteId The Site ID associated with this Sample
|
|
258
|
+
* @param {number} siteId The Site ID associated with this Sample Result
|
|
251
259
|
* @return {SampleResultModel}
|
|
252
260
|
*/
|
|
253
261
|
|
|
@@ -374,31 +382,31 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
374
382
|
}();
|
|
375
383
|
}
|
|
376
384
|
|
|
377
|
-
if ('
|
|
378
|
-
model.
|
|
379
|
-
if (jsonObject['
|
|
385
|
+
if ('finishCriteriaMetTimestamp' in jsonObject) {
|
|
386
|
+
model.finishCriteriaMetTimestamp = function () {
|
|
387
|
+
if (jsonObject['finishCriteriaMetTimestamp'] === null) {
|
|
380
388
|
return null;
|
|
381
389
|
}
|
|
382
390
|
|
|
383
|
-
if (typeof jsonObject['
|
|
384
|
-
return new Date(String(jsonObject['
|
|
391
|
+
if (typeof jsonObject['finishCriteriaMetTimestamp'] !== 'string') {
|
|
392
|
+
return new Date(String(jsonObject['finishCriteriaMetTimestamp']));
|
|
385
393
|
}
|
|
386
394
|
|
|
387
|
-
return new Date(jsonObject['
|
|
395
|
+
return new Date(jsonObject['finishCriteriaMetTimestamp']);
|
|
388
396
|
}();
|
|
389
397
|
}
|
|
390
398
|
|
|
391
|
-
if ('
|
|
392
|
-
model.
|
|
393
|
-
if (jsonObject['
|
|
399
|
+
if ('latestUnloadTimestamp' in jsonObject) {
|
|
400
|
+
model.latestUnloadTimestamp = function () {
|
|
401
|
+
if (jsonObject['latestUnloadTimestamp'] === null) {
|
|
394
402
|
return null;
|
|
395
403
|
}
|
|
396
404
|
|
|
397
|
-
if (typeof jsonObject['
|
|
398
|
-
return new Date(String(jsonObject['
|
|
405
|
+
if (typeof jsonObject['latestUnloadTimestamp'] !== 'string') {
|
|
406
|
+
return new Date(String(jsonObject['latestUnloadTimestamp']));
|
|
399
407
|
}
|
|
400
408
|
|
|
401
|
-
return new Date(jsonObject['
|
|
409
|
+
return new Date(jsonObject['latestUnloadTimestamp']);
|
|
402
410
|
}();
|
|
403
411
|
}
|
|
404
412
|
|
|
@@ -416,6 +424,20 @@ var SampleResultModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
416
424
|
}();
|
|
417
425
|
}
|
|
418
426
|
|
|
427
|
+
if ('warmUpRateOfChangeTemperature' in jsonObject) {
|
|
428
|
+
model.warmUpRateOfChangeTemperature = function () {
|
|
429
|
+
if (jsonObject['warmUpRateOfChangeTemperature'] === null) {
|
|
430
|
+
return null;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
if (typeof jsonObject['warmUpRateOfChangeTemperature'] !== 'number') {
|
|
434
|
+
return Number(jsonObject['warmUpRateOfChangeTemperature']);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
return jsonObject['warmUpRateOfChangeTemperature'];
|
|
438
|
+
}();
|
|
439
|
+
}
|
|
440
|
+
|
|
419
441
|
if ('belowTargetMinimumTemperature' in jsonObject) {
|
|
420
442
|
model.belowTargetMinimumTemperature = function () {
|
|
421
443
|
if (jsonObject['belowTargetMinimumTemperature'] === null) {
|
|
@@ -11,12 +11,12 @@ var _FruitProfileModel = _interopRequireDefault(require("./FruitProfileModel"));
|
|
|
11
11
|
|
|
12
12
|
var _LabModel = _interopRequireDefault(require("./LabModel"));
|
|
13
13
|
|
|
14
|
+
var _ProbeCalibrationModel = _interopRequireDefault(require("./ProbeCalibrationModel"));
|
|
15
|
+
|
|
14
16
|
var _RackModel = _interopRequireDefault(require("./RackModel"));
|
|
15
17
|
|
|
16
18
|
var _RackPositionModel = _interopRequireDefault(require("./RackPositionModel"));
|
|
17
19
|
|
|
18
|
-
var _SampleFailureReasonModel = _interopRequireDefault(require("./SampleFailureReasonModel"));
|
|
19
|
-
|
|
20
20
|
var _SampleModel = _interopRequireDefault(require("./SampleModel"));
|
|
21
21
|
|
|
22
22
|
var _SampleResultModel = _interopRequireDefault(require("./SampleResultModel"));
|
|
@@ -36,9 +36,9 @@ var Site = {
|
|
|
36
36
|
DehydratorModel: _DehydratorModel.default,
|
|
37
37
|
FruitProfileModel: _FruitProfileModel.default,
|
|
38
38
|
LabModel: _LabModel.default,
|
|
39
|
+
ProbeCalibrationModel: _ProbeCalibrationModel.default,
|
|
39
40
|
RackModel: _RackModel.default,
|
|
40
41
|
RackPositionModel: _RackPositionModel.default,
|
|
41
|
-
SampleFailureReasonModel: _SampleFailureReasonModel.default,
|
|
42
42
|
SampleModel: _SampleModel.default,
|
|
43
43
|
SampleResultModel: _SampleResultModel.default
|
|
44
44
|
};
|
package/lib/PackageVersion.js
CHANGED