@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
|
@@ -183,7 +183,7 @@ var _default = RackPositionController;
|
|
|
183
183
|
* @typedef {Object} RackPositionController.CreateData
|
|
184
184
|
* @property {?number} [rtuId] The RTU this Rack Position belongs to
|
|
185
185
|
* @property {string} name The Name of this Rack Position
|
|
186
|
-
* @property {{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,
|
|
186
|
+
* @property {{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}} points The Points used by this Rack Position
|
|
187
187
|
* @property {string} labId The Lab that owns this Rack Position
|
|
188
188
|
* @property {string} rackId The Rack associated with this Rack Position
|
|
189
189
|
* @property {number} verticalLevelIndex The Index of the Vertical Level in the Rack where this Position resides
|
|
@@ -196,7 +196,7 @@ var _default = RackPositionController;
|
|
|
196
196
|
*
|
|
197
197
|
* @typedef {Object} RackPositionController.UpdateData
|
|
198
198
|
* @property {string} [name] The Name of this Rack Position
|
|
199
|
-
* @property {{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,
|
|
199
|
+
* @property {{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}} [points] The Points used by this Rack Position
|
|
200
200
|
* @property {string} [labId] The Lab that owns this Rack Position
|
|
201
201
|
* @property {string} [rackId] The Rack associated with this Rack Position
|
|
202
202
|
* @property {number} [verticalLevelIndex] The Index of the Vertical Level in the Rack where this Position resides
|
|
@@ -915,28 +915,30 @@ var _default = SampleController;
|
|
|
915
915
|
* @property {string} [labId] The Lab ID this Sample is associated with
|
|
916
916
|
* @property {string} [sampleNumber] The Numeric Sample Number
|
|
917
917
|
* @property {string} [createdSource] The Source that Created this Sample
|
|
918
|
-
* @property {?string} [
|
|
919
|
-
* @property {?string} [
|
|
920
|
-
* @property {?string} [publishUserId] ID of the User who Published this Sample
|
|
918
|
+
* @property {?string} [createdUserName] Name of the User who Created this Sample
|
|
919
|
+
* @property {?string} [publishSource] The Source that Published this Sample
|
|
921
920
|
* @property {?string} [publishUserName] Name of the User who Published this Sample
|
|
922
921
|
* @property {string} [fruitProfileId] The Fruit Profile for this Sample
|
|
923
922
|
* @property {string} [rackPositionId] The Rack Position used for this Sample
|
|
924
923
|
* @property {string} [dehydratorId] The Dehydrator used for this Sample
|
|
925
|
-
* @property {?string} [outcome] The Outcome of this Sample
|
|
926
|
-
* @property {?string} [failureReasonId] A Sample Failure Reason ID if this Sample Failed
|
|
927
924
|
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
|
|
928
925
|
* @property {Date} [createdTimestampBegin] Filter by the Timestamp when Samples were Created. Results Greater than or Equal to Timestamp
|
|
929
926
|
* @property {Date} [createdTimestampEnd] Filter by the Timestamp when Samples were Created. Results Less than or Equal to Timestamp
|
|
930
927
|
* @property {Date} [scheduledTimestampBegin] Filter by the Timestamp when Samples were Scheduled to Begin. Results Greater than or Equal to Timestamp
|
|
931
928
|
* @property {Date} [scheduledTimestampEnd] Filter by the Timestamp when Samples were Scheduled to Begin. Results Less than or Equal to Timestamp
|
|
929
|
+
* @property {Date} [loadedTimestampBegin] Filter by the Timestamp when Samples were Loaded. Results Greater than or Equal to Timestamp
|
|
930
|
+
* @property {Date} [loadedTimestampEnd] Filter by the Timestamp when Samples were Loaded. Results Less than or Equal to Timestamp
|
|
932
931
|
* @property {Date} [startTimestampBegin] Filter by the Timestamp when Samples were Started. Results Greater than or Equal to Timestamp
|
|
933
932
|
* @property {Date} [startTimestampEnd] Filter by the Timestamp when Samples were Started. Results Less than or Equal to Timestamp
|
|
934
933
|
* @property {Date} [finishTimestampBegin] Filter by the Timestamp when Samples were Finished. Results Greater than or Equal to Timestamp
|
|
935
934
|
* @property {Date} [finishTimestampEnd] Filter by the Timestamp when Samples were Finished. Results Less than or Equal to Timestamp
|
|
935
|
+
* @property {Date} [unloadedTimestampBegin] Filter by the Timestamp when Samples were Unloaded. Results Greater than or Equal to Timestamp
|
|
936
|
+
* @property {Date} [unloadedTimestampEnd] Filter by the Timestamp when Samples were Unloaded. Results Less than or Equal to Timestamp
|
|
936
937
|
* @property {Date} [publishTimestampBegin] Filter by the Timestamp when Samples were Published. Results Greater than or Equal to Timestamp
|
|
937
938
|
* @property {Date} [publishTimestampEnd] Filter by the Timestamp when Samples were Published. Results Less than or Equal to Timestamp
|
|
938
939
|
* @property {Date} [updateTimestampBegin] Filter by the Timestamp when Samples were last Updated. Results Greater than or Equal to Timestamp
|
|
939
940
|
* @property {Date} [updateTimestampEnd] Filter by the Timestamp when Samples were last Updated. Results Less than or Equal to Timestamp
|
|
941
|
+
* @property {boolean} [publishedState] Filter by Published State of a Sample. `true` = Published, `false` = Not Published
|
|
940
942
|
* @memberof Controllers.Lab.Site
|
|
941
943
|
*/
|
|
942
944
|
|
|
@@ -948,19 +950,18 @@ var _default = SampleController;
|
|
|
948
950
|
* @property {string} [sampleNumber] The Numeric Sample Number
|
|
949
951
|
* @property {Date} [createdTimestamp] When this Sample was Created
|
|
950
952
|
* @property {string} createdSource The Source that Created this Sample
|
|
951
|
-
* @property {?string} [
|
|
952
|
-
* @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
|
|
953
|
+
* @property {?string} [createdUserName] Name of the User who Created this Sample
|
|
953
954
|
* @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
|
|
955
|
+
* @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
|
|
954
956
|
* @property {?Date} [startTimestamp] When this Sample was Started
|
|
955
957
|
* @property {?Date} [finishTimestamp] When this Sample was Finished
|
|
958
|
+
* @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
|
|
956
959
|
* @property {?Date} [publishTimestamp] When this Sample was Published
|
|
957
|
-
* @property {?string} [
|
|
960
|
+
* @property {?string} [publishSource] The Source that Published this Sample
|
|
958
961
|
* @property {?string} [publishUserName] Name of the User who Published this Sample
|
|
959
962
|
* @property {string} fruitProfileId The Fruit Profile for this Sample
|
|
960
963
|
* @property {string} rackPositionId The Rack Position used for this Sample
|
|
961
964
|
* @property {string} dehydratorId The Dehydrator used for this Sample
|
|
962
|
-
* @property {?string} [outcome] The Outcome of this Sample
|
|
963
|
-
* @property {?string} [failureReasonId] A Sample Failure Reason ID if this Sample Failed
|
|
964
965
|
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
|
|
965
966
|
* @memberof Controllers.Lab.Site
|
|
966
967
|
*/
|
|
@@ -972,19 +973,18 @@ var _default = SampleController;
|
|
|
972
973
|
* @property {string} [labId] The Lab ID this Sample is associated with
|
|
973
974
|
* @property {Date} [createdTimestamp] When this Sample was Created
|
|
974
975
|
* @property {string} [createdSource] The Source that Created this Sample
|
|
975
|
-
* @property {?string} [
|
|
976
|
-
* @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
|
|
976
|
+
* @property {?string} [createdUserName] Name of the User who Created this Sample
|
|
977
977
|
* @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
|
|
978
|
+
* @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
|
|
978
979
|
* @property {?Date} [startTimestamp] When this Sample was Started
|
|
979
980
|
* @property {?Date} [finishTimestamp] When this Sample was Finished
|
|
981
|
+
* @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
|
|
980
982
|
* @property {?Date} [publishTimestamp] When this Sample was Published
|
|
981
|
-
* @property {?string} [
|
|
983
|
+
* @property {?string} [publishSource] The Source that Published this Sample
|
|
982
984
|
* @property {?string} [publishUserName] Name of the User who Published this Sample
|
|
983
985
|
* @property {string} [fruitProfileId] The Fruit Profile for this Sample
|
|
984
986
|
* @property {string} [rackPositionId] The Rack Position used for this Sample
|
|
985
987
|
* @property {string} [dehydratorId] The Dehydrator used for this Sample
|
|
986
|
-
* @property {?string} [outcome] The Outcome of this Sample
|
|
987
|
-
* @property {?string} [failureReasonId] A Sample Failure Reason ID if this Sample Failed
|
|
988
988
|
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
|
|
989
989
|
* @memberof Controllers.Lab.Site
|
|
990
990
|
*/
|
|
@@ -20,7 +20,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
20
20
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Controller Class for Sample
|
|
23
|
+
* Controller Class for Sample Results
|
|
24
24
|
*
|
|
25
25
|
* @class
|
|
26
26
|
*/
|
|
@@ -33,12 +33,12 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
33
33
|
key: "getOne",
|
|
34
34
|
value:
|
|
35
35
|
/**
|
|
36
|
-
* Retrieve a Sample
|
|
36
|
+
* Retrieve a Sample Result [GET /lab/sites/{siteId}/sample-results/{id}]
|
|
37
37
|
*
|
|
38
38
|
* @static
|
|
39
39
|
* @public
|
|
40
40
|
* @param {number} siteId The Site ID
|
|
41
|
-
* @param {string} id The Sample
|
|
41
|
+
* @param {string} id The Sample Result ID
|
|
42
42
|
* @return {Promise<SampleResultModel>}
|
|
43
43
|
*/
|
|
44
44
|
function getOne(siteId, id) {
|
|
@@ -55,13 +55,13 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Update a Sample
|
|
58
|
+
* Update a Sample Result [PATCH /lab/sites/{siteId}/sample-results/{id}]
|
|
59
59
|
*
|
|
60
60
|
* @static
|
|
61
61
|
* @public
|
|
62
62
|
* @param {number} siteId The Site ID
|
|
63
|
-
* @param {string} id The Sample
|
|
64
|
-
* @param {SampleResultController.UpdateData} updateData The Sample
|
|
63
|
+
* @param {string} id The Sample Result ID
|
|
64
|
+
* @param {SampleResultController.UpdateData} updateData The Sample Result Update Data
|
|
65
65
|
* @return {Promise<SampleResultModel>}
|
|
66
66
|
*/
|
|
67
67
|
|
|
@@ -81,12 +81,12 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* Delete a Sample
|
|
84
|
+
* Delete a Sample Result [DELETE /lab/sites/{siteId}/sample-results/{id}]
|
|
85
85
|
*
|
|
86
86
|
* @static
|
|
87
87
|
* @public
|
|
88
88
|
* @param {number} siteId The Site ID
|
|
89
|
-
* @param {string} id The Sample
|
|
89
|
+
* @param {string} id The Sample Result ID
|
|
90
90
|
* @return {Promise<boolean>}
|
|
91
91
|
*/
|
|
92
92
|
|
|
@@ -104,12 +104,12 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
104
104
|
/**
|
|
105
105
|
* Retrieve Comments [GET /lab/sites/{siteId}/sample-results/{id}/comments]
|
|
106
106
|
*
|
|
107
|
-
* Retrieves Comments for a Sample
|
|
107
|
+
* Retrieves Comments for a Sample Result
|
|
108
108
|
*
|
|
109
109
|
* @static
|
|
110
110
|
* @public
|
|
111
111
|
* @param {number} siteId The Site ID
|
|
112
|
-
* @param {string} id The Sample
|
|
112
|
+
* @param {string} id The Sample Result ID
|
|
113
113
|
* @return {Promise<Array<SampleResultController.CommentItem>>}
|
|
114
114
|
*/
|
|
115
115
|
|
|
@@ -265,12 +265,12 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
265
265
|
/**
|
|
266
266
|
* Create a Comment [POST /lab/sites/{siteId}/sample-results/{id}/comments]
|
|
267
267
|
*
|
|
268
|
-
* Create a Comment for a Sample
|
|
268
|
+
* Create a Comment for a Sample Result
|
|
269
269
|
*
|
|
270
270
|
* @static
|
|
271
271
|
* @public
|
|
272
272
|
* @param {number} siteId The Site ID
|
|
273
|
-
* @param {string} id The Sample
|
|
273
|
+
* @param {string} id The Sample Result ID
|
|
274
274
|
* @param {string} content The Content of the New Comment
|
|
275
275
|
* @return {Promise<SampleResultController.CommentItem>}
|
|
276
276
|
*/
|
|
@@ -421,12 +421,12 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
421
421
|
/**
|
|
422
422
|
* Retrieve a Comment [GET /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]
|
|
423
423
|
*
|
|
424
|
-
* Retrieves Comments for a Sample
|
|
424
|
+
* Retrieves Comments for a Sample Result
|
|
425
425
|
*
|
|
426
426
|
* @static
|
|
427
427
|
* @public
|
|
428
428
|
* @param {number} siteId The Site ID
|
|
429
|
-
* @param {string} id The Sample
|
|
429
|
+
* @param {string} id The Sample Result ID
|
|
430
430
|
* @param {string} commentId The Comment ID
|
|
431
431
|
* @return {Promise<SampleResultController.CommentItem>}
|
|
432
432
|
*/
|
|
@@ -575,12 +575,12 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
575
575
|
/**
|
|
576
576
|
* Update a Comment [PATCH /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]
|
|
577
577
|
*
|
|
578
|
-
* Update a Comment for a Sample
|
|
578
|
+
* Update a Comment for a Sample Result
|
|
579
579
|
*
|
|
580
580
|
* @static
|
|
581
581
|
* @public
|
|
582
582
|
* @param {number} siteId The Site ID
|
|
583
|
-
* @param {string} id The Sample
|
|
583
|
+
* @param {string} id The Sample Result ID
|
|
584
584
|
* @param {string} commentId The Comment ID
|
|
585
585
|
* @param {string} content The Updated Content for the Comment
|
|
586
586
|
* @return {Promise<SampleResultController.CommentItem>}
|
|
@@ -732,12 +732,12 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
732
732
|
/**
|
|
733
733
|
* Delete a Comment [DELETE /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]
|
|
734
734
|
*
|
|
735
|
-
* Delete a Comment for a Sample
|
|
735
|
+
* Delete a Comment for a Sample Result
|
|
736
736
|
*
|
|
737
737
|
* @static
|
|
738
738
|
* @public
|
|
739
739
|
* @param {number} siteId The Site ID
|
|
740
|
-
* @param {string} id The Sample
|
|
740
|
+
* @param {string} id The Sample Result ID
|
|
741
741
|
* @param {string} commentId The Comment ID
|
|
742
742
|
* @return {Promise<boolean>}
|
|
743
743
|
*/
|
|
@@ -754,7 +754,7 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
756
|
/**
|
|
757
|
-
* List all Sample
|
|
757
|
+
* List all Sample Results [GET /lab/sites/{siteId}/sample-results]
|
|
758
758
|
*
|
|
759
759
|
* @static
|
|
760
760
|
* @public
|
|
@@ -788,12 +788,12 @@ var SampleResultController = /*#__PURE__*/function () {
|
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
790
|
/**
|
|
791
|
-
* Create a Sample
|
|
791
|
+
* Create a Sample Result [POST /lab/sites/{siteId}/sample-results]
|
|
792
792
|
*
|
|
793
793
|
* @static
|
|
794
794
|
* @public
|
|
795
795
|
* @param {number} siteId The Site ID
|
|
796
|
-
* @param {SampleResultController.CreateData} createData The Sample
|
|
796
|
+
* @param {SampleResultController.CreateData} createData The Sample Result Create Data
|
|
797
797
|
* @return {Promise<SampleResultModel>}
|
|
798
798
|
*/
|
|
799
799
|
|
|
@@ -830,7 +830,7 @@ var _default = SampleResultController;
|
|
|
830
830
|
*/
|
|
831
831
|
|
|
832
832
|
/**
|
|
833
|
-
* The Create Data for a Sample
|
|
833
|
+
* The Create Data for a Sample Result
|
|
834
834
|
*
|
|
835
835
|
* @typedef {Object} SampleResultController.CreateData
|
|
836
836
|
* @property {string} labId The Lab ID this Sample Result is associated with
|
|
@@ -842,9 +842,10 @@ var _default = SampleResultController;
|
|
|
842
842
|
* @property {number} belowTargetDuration The Below Temperature Target Duration (in seconds) of the Sample
|
|
843
843
|
* @property {number} aboveTargetDuration The Above Temperature Target Duration (in seconds) of the Sample
|
|
844
844
|
* @property {number} withinTargetDuration The Within Temperature Target Duration (in seconds) of the Sample
|
|
845
|
-
* @property {?Date} [
|
|
846
|
-
* @property {?Date} [
|
|
845
|
+
* @property {?Date} [finishCriteriaMetTimestamp] Timestamp of when the Finish Criteria was Met for the Sample - `null` if not Met
|
|
846
|
+
* @property {?Date} [latestUnloadTimestamp] Latest Possible Timestamp of when the Sample should have been Unloaded to remain Compliant
|
|
847
847
|
* @property {?number} [totalAverageTemperature] The Average Temperature for the Total Duration of the Sample
|
|
848
|
+
* @property {?number} [warmUpRateOfChangeTemperature] The Average Temperature Rate-of-Change seen during the Warm Up process for the Sample
|
|
848
849
|
* @property {?number} [belowTargetMinimumTemperature] The Minimum Temperature seen Below the Temperature Target for the Sample
|
|
849
850
|
* @property {?number} [belowTargetAverageTemperature] The Average Temperature seen Below the Temperature Target for the Sample
|
|
850
851
|
* @property {?number} [aboveTargetMaximumTemperature] The Maximum Temperature seen Above the Temperature Target for the Sample
|
|
@@ -856,7 +857,7 @@ var _default = SampleResultController;
|
|
|
856
857
|
*/
|
|
857
858
|
|
|
858
859
|
/**
|
|
859
|
-
* The Update Data for a Sample
|
|
860
|
+
* The Update Data for a Sample Result
|
|
860
861
|
*
|
|
861
862
|
* @typedef {Object} SampleResultController.UpdateData
|
|
862
863
|
* @property {string} [labId] The Lab ID this Sample Result is associated with
|
|
@@ -867,9 +868,10 @@ var _default = SampleResultController;
|
|
|
867
868
|
* @property {number} [belowTargetDuration] The Below Temperature Target Duration (in seconds) of the Sample
|
|
868
869
|
* @property {number} [aboveTargetDuration] The Above Temperature Target Duration (in seconds) of the Sample
|
|
869
870
|
* @property {number} [withinTargetDuration] The Within Temperature Target Duration (in seconds) of the Sample
|
|
870
|
-
* @property {?Date} [
|
|
871
|
-
* @property {?Date} [
|
|
871
|
+
* @property {?Date} [finishCriteriaMetTimestamp] Timestamp of when the Finish Criteria was Met for the Sample - `null` if not Met
|
|
872
|
+
* @property {?Date} [latestUnloadTimestamp] Latest Possible Timestamp of when the Sample should have been Unloaded to remain Compliant
|
|
872
873
|
* @property {?number} [totalAverageTemperature] The Average Temperature for the Total Duration of the Sample
|
|
874
|
+
* @property {?number} [warmUpRateOfChangeTemperature] The Average Temperature Rate-of-Change seen during the Warm Up process for the Sample
|
|
873
875
|
* @property {?number} [belowTargetMinimumTemperature] The Minimum Temperature seen Below the Temperature Target for the Sample
|
|
874
876
|
* @property {?number} [belowTargetAverageTemperature] The Average Temperature seen Below the Temperature Target for the Sample
|
|
875
877
|
* @property {?number} [aboveTargetMaximumTemperature] The Maximum Temperature seen Above the Temperature Target for the Sample
|
|
@@ -11,14 +11,14 @@ var _FruitProfileController = _interopRequireDefault(require("./FruitProfileCont
|
|
|
11
11
|
|
|
12
12
|
var _LabController = _interopRequireDefault(require("./LabController"));
|
|
13
13
|
|
|
14
|
+
var _ProbeCalibrationController = _interopRequireDefault(require("./ProbeCalibrationController"));
|
|
15
|
+
|
|
14
16
|
var _RackController = _interopRequireDefault(require("./RackController"));
|
|
15
17
|
|
|
16
18
|
var _RackPositionController = _interopRequireDefault(require("./RackPositionController"));
|
|
17
19
|
|
|
18
20
|
var _SampleController = _interopRequireDefault(require("./SampleController"));
|
|
19
21
|
|
|
20
|
-
var _SampleFailureReasonController = _interopRequireDefault(require("./SampleFailureReasonController"));
|
|
21
|
-
|
|
22
22
|
var _SampleResultController = _interopRequireDefault(require("./SampleResultController"));
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -36,10 +36,10 @@ var Site = {
|
|
|
36
36
|
DehydratorController: _DehydratorController.default,
|
|
37
37
|
FruitProfileController: _FruitProfileController.default,
|
|
38
38
|
LabController: _LabController.default,
|
|
39
|
+
ProbeCalibrationController: _ProbeCalibrationController.default,
|
|
39
40
|
RackController: _RackController.default,
|
|
40
41
|
RackPositionController: _RackPositionController.default,
|
|
41
42
|
SampleController: _SampleController.default,
|
|
42
|
-
SampleFailureReasonController: _SampleFailureReasonController.default,
|
|
43
43
|
SampleResultController: _SampleResultController.default
|
|
44
44
|
};
|
|
45
45
|
var _default = Site;
|
|
@@ -96,7 +96,7 @@ var FruitProfileModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
96
96
|
|
|
97
97
|
_this.nominalWarmUpDuration = 0;
|
|
98
98
|
/**
|
|
99
|
-
* The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures be
|
|
99
|
+
* The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures to be Compliant
|
|
100
100
|
*
|
|
101
101
|
* @type {number}
|
|
102
102
|
* @public
|
|
@@ -104,7 +104,15 @@ var FruitProfileModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
104
104
|
|
|
105
105
|
_this.minimumWithinTargetDuration = 0;
|
|
106
106
|
/**
|
|
107
|
-
* The
|
|
107
|
+
* The Minimum Duration (in seconds) that a Sample must be Dehydrated for to be Compliant
|
|
108
|
+
*
|
|
109
|
+
* @type {number}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.minimumTotalDuration = 0;
|
|
114
|
+
/**
|
|
115
|
+
* The Maximum Duration (in seconds) that a Sample can be Dehydrated for before it is Considered Non-Compliant
|
|
108
116
|
*
|
|
109
117
|
* @type {number}
|
|
110
118
|
* @public
|
|
@@ -112,7 +120,7 @@ var FruitProfileModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
112
120
|
|
|
113
121
|
_this.maximumTotalDuration = 0;
|
|
114
122
|
/**
|
|
115
|
-
* The Minimum Target Temperature for a Sample to be
|
|
123
|
+
* The Minimum Target Temperature for a Sample to be Compliant
|
|
116
124
|
*
|
|
117
125
|
* @type {number}
|
|
118
126
|
* @public
|
|
@@ -120,7 +128,7 @@ var FruitProfileModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
120
128
|
|
|
121
129
|
_this.minimumTargetTemperature = 0;
|
|
122
130
|
/**
|
|
123
|
-
* The Maximum Target Temperature for a Sample to be
|
|
131
|
+
* The Maximum Target Temperature for a Sample to be Compliant
|
|
124
132
|
*
|
|
125
133
|
* @type {number}
|
|
126
134
|
* @public
|
|
@@ -242,6 +250,16 @@ var FruitProfileModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
242
250
|
}();
|
|
243
251
|
}
|
|
244
252
|
|
|
253
|
+
if ('minimumTotalDuration' in jsonObject) {
|
|
254
|
+
model.minimumTotalDuration = function () {
|
|
255
|
+
if (typeof jsonObject['minimumTotalDuration'] !== 'number') {
|
|
256
|
+
return Number.isInteger(Number(jsonObject['minimumTotalDuration'])) ? Number(jsonObject['minimumTotalDuration']) : Math.floor(Number(jsonObject['minimumTotalDuration']));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return Number.isInteger(jsonObject['minimumTotalDuration']) ? jsonObject['minimumTotalDuration'] : Math.floor(jsonObject['minimumTotalDuration']);
|
|
260
|
+
}();
|
|
261
|
+
}
|
|
262
|
+
|
|
245
263
|
if ('maximumTotalDuration' in jsonObject) {
|
|
246
264
|
model.maximumTotalDuration = function () {
|
|
247
265
|
if (typeof jsonObject['maximumTotalDuration'] !== 'number') {
|
|
@@ -32,31 +32,31 @@ 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
|
|
35
|
+
* Model Class for a Probe Calibration
|
|
36
36
|
*
|
|
37
37
|
* @class
|
|
38
38
|
* @hideconstructor
|
|
39
39
|
* @extends BaseModel
|
|
40
40
|
*/
|
|
41
|
-
var
|
|
42
|
-
_inherits(
|
|
41
|
+
var ProbeCalibrationModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(ProbeCalibrationModel, _BaseModel);
|
|
43
43
|
|
|
44
|
-
var _super = _createSuper(
|
|
44
|
+
var _super = _createSuper(ProbeCalibrationModel);
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* ProbeCalibrationModel Constructor
|
|
48
48
|
*
|
|
49
49
|
* @protected
|
|
50
|
-
* @param {number} siteId The Site ID associated with this
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Probe Calibration
|
|
51
51
|
*/
|
|
52
|
-
function
|
|
52
|
+
function ProbeCalibrationModel(siteId) {
|
|
53
53
|
var _this;
|
|
54
54
|
|
|
55
|
-
_classCallCheck(this,
|
|
55
|
+
_classCallCheck(this, ProbeCalibrationModel);
|
|
56
56
|
|
|
57
57
|
_this = _super.call(this);
|
|
58
58
|
/**
|
|
59
|
-
* The
|
|
59
|
+
* The Probe Calibration ID
|
|
60
60
|
*
|
|
61
61
|
* @type {string}
|
|
62
62
|
* @public
|
|
@@ -64,23 +64,71 @@ var SampleFailureReasonModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
64
64
|
|
|
65
65
|
_this.id = "";
|
|
66
66
|
/**
|
|
67
|
-
* The
|
|
67
|
+
* The Rack Position ID this Probe Calibration is associated with
|
|
68
68
|
*
|
|
69
69
|
* @type {string}
|
|
70
70
|
* @public
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
|
-
_this.
|
|
73
|
+
_this.rackPositionId = "";
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* When this Probe Calibration was Created
|
|
76
|
+
*
|
|
77
|
+
* @type {Date}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.createdTimestamp = new Date();
|
|
82
|
+
/**
|
|
83
|
+
* ID of the User who Completed this Probe Calibration
|
|
76
84
|
*
|
|
77
85
|
* @type {string}
|
|
78
86
|
* @public
|
|
79
87
|
*/
|
|
80
88
|
|
|
81
|
-
_this.
|
|
89
|
+
_this.userId = "";
|
|
90
|
+
/**
|
|
91
|
+
* Name of the User who Completed this Probe Calibration
|
|
92
|
+
*
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.userName = "";
|
|
98
|
+
/**
|
|
99
|
+
* The Calibration Offset prior to this Probe Calibration being Created
|
|
100
|
+
*
|
|
101
|
+
* @type {number}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.preCalibrationOffset = 0;
|
|
106
|
+
/**
|
|
107
|
+
* The Calibration Offset after this Probe Calibration was Created
|
|
108
|
+
*
|
|
109
|
+
* @type {number}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.postCalibrationOffset = 0;
|
|
114
|
+
/**
|
|
115
|
+
* The Temperature Probe reading prior to this Probe Calibration being Created
|
|
116
|
+
*
|
|
117
|
+
* @type {number}
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
_this.preCalibrationTemperature = 0;
|
|
122
|
+
/**
|
|
123
|
+
* The Temperature Probe reading after this Probe Calibration was Created
|
|
124
|
+
*
|
|
125
|
+
* @type {number}
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
_this.postCalibrationTemperature = 0;
|
|
82
130
|
/**
|
|
83
|
-
* Whether the
|
|
131
|
+
* Whether the Probe Calibration has been deleted
|
|
84
132
|
*
|
|
85
133
|
* @type {boolean}
|
|
86
134
|
* @public
|
|
@@ -88,7 +136,7 @@ var SampleFailureReasonModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
88
136
|
|
|
89
137
|
_this.deleted = false;
|
|
90
138
|
/**
|
|
91
|
-
* When the
|
|
139
|
+
* When the Probe Calibration was last updated
|
|
92
140
|
*
|
|
93
141
|
* @type {Date}
|
|
94
142
|
* @public
|
|
@@ -96,7 +144,7 @@ var SampleFailureReasonModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
96
144
|
|
|
97
145
|
_this.updateTimestamp = new Date();
|
|
98
146
|
/**
|
|
99
|
-
* The Site ID associated with this
|
|
147
|
+
* The Site ID associated with this Probe Calibration
|
|
100
148
|
*
|
|
101
149
|
* @type {number}
|
|
102
150
|
* @public
|
|
@@ -106,20 +154,20 @@ var SampleFailureReasonModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
106
154
|
return _this;
|
|
107
155
|
}
|
|
108
156
|
/**
|
|
109
|
-
* Create a new **
|
|
157
|
+
* Create a new **ProbeCalibrationModel** from a JSON Object or JSON String
|
|
110
158
|
*
|
|
111
159
|
* @static
|
|
112
160
|
* @public
|
|
113
161
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
114
|
-
* @param {number} siteId The Site ID associated with this
|
|
115
|
-
* @return {
|
|
162
|
+
* @param {number} siteId The Site ID associated with this Probe Calibration
|
|
163
|
+
* @return {ProbeCalibrationModel}
|
|
116
164
|
*/
|
|
117
165
|
|
|
118
166
|
|
|
119
|
-
_createClass(
|
|
167
|
+
_createClass(ProbeCalibrationModel, null, [{
|
|
120
168
|
key: "fromJSON",
|
|
121
169
|
value: function fromJSON(json, siteId) {
|
|
122
|
-
var model = new
|
|
170
|
+
var model = new ProbeCalibrationModel(siteId);
|
|
123
171
|
/**
|
|
124
172
|
* The JSON Object
|
|
125
173
|
*
|
|
@@ -144,23 +192,83 @@ var SampleFailureReasonModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
144
192
|
}();
|
|
145
193
|
}
|
|
146
194
|
|
|
147
|
-
if ('
|
|
148
|
-
model.
|
|
149
|
-
if (typeof jsonObject['
|
|
150
|
-
return String(jsonObject['
|
|
195
|
+
if ('rackPositionId' in jsonObject) {
|
|
196
|
+
model.rackPositionId = function () {
|
|
197
|
+
if (typeof jsonObject['rackPositionId'] !== 'string') {
|
|
198
|
+
return String(jsonObject['rackPositionId']);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return jsonObject['rackPositionId'];
|
|
202
|
+
}();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if ('createdTimestamp' in jsonObject) {
|
|
206
|
+
model.createdTimestamp = function () {
|
|
207
|
+
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
208
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
212
|
+
}();
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if ('userId' in jsonObject) {
|
|
216
|
+
model.userId = function () {
|
|
217
|
+
if (typeof jsonObject['userId'] !== 'string') {
|
|
218
|
+
return String(jsonObject['userId']);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return jsonObject['userId'];
|
|
222
|
+
}();
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if ('userName' in jsonObject) {
|
|
226
|
+
model.userName = function () {
|
|
227
|
+
if (typeof jsonObject['userName'] !== 'string') {
|
|
228
|
+
return String(jsonObject['userName']);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return jsonObject['userName'];
|
|
232
|
+
}();
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if ('preCalibrationOffset' in jsonObject) {
|
|
236
|
+
model.preCalibrationOffset = function () {
|
|
237
|
+
if (typeof jsonObject['preCalibrationOffset'] !== 'number') {
|
|
238
|
+
return Number(jsonObject['preCalibrationOffset']);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return jsonObject['preCalibrationOffset'];
|
|
242
|
+
}();
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if ('postCalibrationOffset' in jsonObject) {
|
|
246
|
+
model.postCalibrationOffset = function () {
|
|
247
|
+
if (typeof jsonObject['postCalibrationOffset'] !== 'number') {
|
|
248
|
+
return Number(jsonObject['postCalibrationOffset']);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return jsonObject['postCalibrationOffset'];
|
|
252
|
+
}();
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if ('preCalibrationTemperature' in jsonObject) {
|
|
256
|
+
model.preCalibrationTemperature = function () {
|
|
257
|
+
if (typeof jsonObject['preCalibrationTemperature'] !== 'number') {
|
|
258
|
+
return Number(jsonObject['preCalibrationTemperature']);
|
|
151
259
|
}
|
|
152
260
|
|
|
153
|
-
return jsonObject['
|
|
261
|
+
return jsonObject['preCalibrationTemperature'];
|
|
154
262
|
}();
|
|
155
263
|
}
|
|
156
264
|
|
|
157
|
-
if ('
|
|
158
|
-
model.
|
|
159
|
-
if (typeof jsonObject['
|
|
160
|
-
return
|
|
265
|
+
if ('postCalibrationTemperature' in jsonObject) {
|
|
266
|
+
model.postCalibrationTemperature = function () {
|
|
267
|
+
if (typeof jsonObject['postCalibrationTemperature'] !== 'number') {
|
|
268
|
+
return Number(jsonObject['postCalibrationTemperature']);
|
|
161
269
|
}
|
|
162
270
|
|
|
163
|
-
return jsonObject['
|
|
271
|
+
return jsonObject['postCalibrationTemperature'];
|
|
164
272
|
}();
|
|
165
273
|
}
|
|
166
274
|
|
|
@@ -188,8 +296,8 @@ var SampleFailureReasonModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
188
296
|
}
|
|
189
297
|
}]);
|
|
190
298
|
|
|
191
|
-
return
|
|
299
|
+
return ProbeCalibrationModel;
|
|
192
300
|
}(_BaseModel2.default);
|
|
193
301
|
|
|
194
|
-
var _default =
|
|
302
|
+
var _default = ProbeCalibrationModel;
|
|
195
303
|
exports.default = _default;
|