@ricado/api-client 2.4.2 → 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 +10 -8
- package/lib/Controllers/Lab/Site/RackPositionController.js +2 -2
- package/lib/Controllers/Lab/Site/SampleController.js +7 -15
- package/lib/Controllers/Lab/Site/SampleResultController.js +29 -27
- package/lib/Controllers/Lab/Site/index.js +0 -3
- package/lib/Models/Lab/Site/FruitProfileModel.js +22 -4
- package/lib/Models/Lab/Site/RackPositionModel.js +67 -15
- package/lib/Models/Lab/Site/SampleModel.js +9 -75
- package/lib/Models/Lab/Site/SampleResultModel.js +45 -23
- package/lib/Models/Lab/Site/index.js +0 -3
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +119 -309
- package/package.json +1 -1
- package/src/Controllers/Lab/Site/FruitProfileController.js +10 -8
- package/src/Controllers/Lab/Site/RackPositionController.js +2 -2
- package/src/Controllers/Lab/Site/SampleController.js +7 -15
- package/src/Controllers/Lab/Site/SampleResultController.js +29 -27
- package/src/Controllers/Lab/Site/index.js +0 -2
- package/src/Models/Lab/Site/FruitProfileModel.js +24 -4
- package/src/Models/Lab/Site/RackPositionModel.js +87 -15
- package/src/Models/Lab/Site/SampleModel.js +9 -84
- package/src/Models/Lab/Site/SampleResultModel.js +48 -23
- package/src/Models/Lab/Site/index.js +0 -2
- package/src/PackageVersion.js +1 -1
- package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +0 -193
- package/lib/Models/Lab/Site/SampleFailureReasonModel.js +0 -195
- package/src/Controllers/Lab/Site/SampleFailureReasonController.js +0 -170
- package/src/Models/Lab/Site/SampleFailureReasonModel.js +0 -170
|
@@ -96,15 +96,7 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
96
96
|
|
|
97
97
|
_this.createdSource = "";
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* @type {?string}
|
|
102
|
-
* @public
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
_this.createdUserId = null;
|
|
106
|
-
/**
|
|
107
|
-
* Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
|
|
99
|
+
* Name of the User who Created this Sample
|
|
108
100
|
*
|
|
109
101
|
* @type {?string}
|
|
110
102
|
* @public
|
|
@@ -160,13 +152,13 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
160
152
|
|
|
161
153
|
_this.publishTimestamp = null;
|
|
162
154
|
/**
|
|
163
|
-
*
|
|
155
|
+
* The Source that Published this Sample
|
|
164
156
|
*
|
|
165
157
|
* @type {?string}
|
|
166
158
|
* @public
|
|
167
159
|
*/
|
|
168
160
|
|
|
169
|
-
_this.
|
|
161
|
+
_this.publishSource = null;
|
|
170
162
|
/**
|
|
171
163
|
* Name of the User who Published this Sample
|
|
172
164
|
*
|
|
@@ -199,22 +191,6 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
199
191
|
*/
|
|
200
192
|
|
|
201
193
|
_this.dehydratorId = "";
|
|
202
|
-
/**
|
|
203
|
-
* The Outcome of this Sample
|
|
204
|
-
*
|
|
205
|
-
* @type {?string}
|
|
206
|
-
* @public
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
|
-
_this.outcome = null;
|
|
210
|
-
/**
|
|
211
|
-
* A Sample Failure Reason ID if this Sample Failed
|
|
212
|
-
*
|
|
213
|
-
* @type {?string}
|
|
214
|
-
* @public
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
_this.failureReasonId = null;
|
|
218
194
|
/**
|
|
219
195
|
* The Sample Result ID asociated with this Sample
|
|
220
196
|
*
|
|
@@ -336,20 +312,6 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
336
312
|
}();
|
|
337
313
|
}
|
|
338
314
|
|
|
339
|
-
if ('createdUserId' in jsonObject) {
|
|
340
|
-
model.createdUserId = function () {
|
|
341
|
-
if (jsonObject['createdUserId'] === null) {
|
|
342
|
-
return null;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
if (typeof jsonObject['createdUserId'] !== 'string') {
|
|
346
|
-
return String(jsonObject['createdUserId']);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
return jsonObject['createdUserId'];
|
|
350
|
-
}();
|
|
351
|
-
}
|
|
352
|
-
|
|
353
315
|
if ('createdUserName' in jsonObject) {
|
|
354
316
|
model.createdUserName = function () {
|
|
355
317
|
if (jsonObject['createdUserName'] === null) {
|
|
@@ -448,17 +410,17 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
448
410
|
}();
|
|
449
411
|
}
|
|
450
412
|
|
|
451
|
-
if ('
|
|
452
|
-
model.
|
|
453
|
-
if (jsonObject['
|
|
413
|
+
if ('publishSource' in jsonObject) {
|
|
414
|
+
model.publishSource = function () {
|
|
415
|
+
if (jsonObject['publishSource'] === null) {
|
|
454
416
|
return null;
|
|
455
417
|
}
|
|
456
418
|
|
|
457
|
-
if (typeof jsonObject['
|
|
458
|
-
return String(jsonObject['
|
|
419
|
+
if (typeof jsonObject['publishSource'] !== 'string') {
|
|
420
|
+
return String(jsonObject['publishSource']);
|
|
459
421
|
}
|
|
460
422
|
|
|
461
|
-
return jsonObject['
|
|
423
|
+
return jsonObject['publishSource'];
|
|
462
424
|
}();
|
|
463
425
|
}
|
|
464
426
|
|
|
@@ -506,34 +468,6 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
506
468
|
}();
|
|
507
469
|
}
|
|
508
470
|
|
|
509
|
-
if ('outcome' in jsonObject) {
|
|
510
|
-
model.outcome = function () {
|
|
511
|
-
if (jsonObject['outcome'] === null) {
|
|
512
|
-
return null;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
if (typeof jsonObject['outcome'] !== 'string') {
|
|
516
|
-
return String(jsonObject['outcome']);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
return jsonObject['outcome'];
|
|
520
|
-
}();
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
if ('failureReasonId' in jsonObject) {
|
|
524
|
-
model.failureReasonId = function () {
|
|
525
|
-
if (jsonObject['failureReasonId'] === null) {
|
|
526
|
-
return null;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
if (typeof jsonObject['failureReasonId'] !== 'string') {
|
|
530
|
-
return String(jsonObject['failureReasonId']);
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
return jsonObject['failureReasonId'];
|
|
534
|
-
}();
|
|
535
|
-
}
|
|
536
|
-
|
|
537
471
|
if ('resultId' in jsonObject) {
|
|
538
472
|
model.resultId = function () {
|
|
539
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) {
|
|
@@ -17,8 +17,6 @@ var _RackModel = _interopRequireDefault(require("./RackModel"));
|
|
|
17
17
|
|
|
18
18
|
var _RackPositionModel = _interopRequireDefault(require("./RackPositionModel"));
|
|
19
19
|
|
|
20
|
-
var _SampleFailureReasonModel = _interopRequireDefault(require("./SampleFailureReasonModel"));
|
|
21
|
-
|
|
22
20
|
var _SampleModel = _interopRequireDefault(require("./SampleModel"));
|
|
23
21
|
|
|
24
22
|
var _SampleResultModel = _interopRequireDefault(require("./SampleResultModel"));
|
|
@@ -41,7 +39,6 @@ var Site = {
|
|
|
41
39
|
ProbeCalibrationModel: _ProbeCalibrationModel.default,
|
|
42
40
|
RackModel: _RackModel.default,
|
|
43
41
|
RackPositionModel: _RackPositionModel.default,
|
|
44
|
-
SampleFailureReasonModel: _SampleFailureReasonModel.default,
|
|
45
42
|
SampleModel: _SampleModel.default,
|
|
46
43
|
SampleResultModel: _SampleResultModel.default
|
|
47
44
|
};
|
package/lib/PackageVersion.js
CHANGED