@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
package/package.json
CHANGED
|
@@ -159,10 +159,11 @@ export default FruitProfileController;
|
|
|
159
159
|
* @property {string} description The Fruit Profile Description
|
|
160
160
|
* @property {string} image The Fruit Profile Image Source
|
|
161
161
|
* @property {number} nominalWarmUpDuration The Typical Warm Up Duration (in seconds) for a Sample to reach the Minimum Target Temperature
|
|
162
|
-
* @property {number} minimumWithinTargetDuration The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures be
|
|
163
|
-
* @property {number}
|
|
164
|
-
* @property {number}
|
|
165
|
-
* @property {number}
|
|
162
|
+
* @property {number} minimumWithinTargetDuration The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures to be Compliant
|
|
163
|
+
* @property {number} minimumTotalDuration The Minimum Duration (in seconds) that a Sample must be Dehydrated for to be Compliant
|
|
164
|
+
* @property {number} maximumTotalDuration The Maximum Duration (in seconds) that a Sample can be Dehydrated for before it is Considered Non-Compliant
|
|
165
|
+
* @property {number} minimumTargetTemperature The Minimum Target Temperature for a Sample to be Compliant
|
|
166
|
+
* @property {number} maximumTargetTemperature The Maximum Target Temperature for a Sample to be Compliant
|
|
166
167
|
* @memberof Controllers.Lab.Site
|
|
167
168
|
*/
|
|
168
169
|
|
|
@@ -174,9 +175,10 @@ export default FruitProfileController;
|
|
|
174
175
|
* @property {string} [description] The Fruit Profile Description
|
|
175
176
|
* @property {string} [image] The Fruit Profile Image Source
|
|
176
177
|
* @property {number} [nominalWarmUpDuration] The Typical Warm Up Duration (in seconds) for a Sample to reach the Minimum Target Temperature
|
|
177
|
-
* @property {number} [minimumWithinTargetDuration] The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures be
|
|
178
|
-
* @property {number} [
|
|
179
|
-
* @property {number} [
|
|
180
|
-
* @property {number} [
|
|
178
|
+
* @property {number} [minimumWithinTargetDuration] The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures to be Compliant
|
|
179
|
+
* @property {number} [minimumTotalDuration] The Minimum Duration (in seconds) that a Sample must be Dehydrated for to be Compliant
|
|
180
|
+
* @property {number} [maximumTotalDuration] The Maximum Duration (in seconds) that a Sample can be Dehydrated for before it is Considered Non-Compliant
|
|
181
|
+
* @property {number} [minimumTargetTemperature] The Minimum Target Temperature for a Sample to be Compliant
|
|
182
|
+
* @property {number} [maximumTargetTemperature] The Maximum Target Temperature for a Sample to be Compliant
|
|
181
183
|
* @memberof Controllers.Lab.Site
|
|
182
184
|
*/
|
|
@@ -162,7 +162,7 @@ export default RackPositionController;
|
|
|
162
162
|
* @typedef {Object} RackPositionController.CreateData
|
|
163
163
|
* @property {?number} [rtuId] The RTU this Rack Position belongs to
|
|
164
164
|
* @property {string} name The Name of this Rack Position
|
|
165
|
-
* @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,
|
|
165
|
+
* @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
|
|
166
166
|
* @property {string} labId The Lab that owns this Rack Position
|
|
167
167
|
* @property {string} rackId The Rack associated with this Rack Position
|
|
168
168
|
* @property {number} verticalLevelIndex The Index of the Vertical Level in the Rack where this Position resides
|
|
@@ -175,7 +175,7 @@ export default RackPositionController;
|
|
|
175
175
|
*
|
|
176
176
|
* @typedef {Object} RackPositionController.UpdateData
|
|
177
177
|
* @property {string} [name] The Name of this Rack Position
|
|
178
|
-
* @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,
|
|
178
|
+
* @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
|
|
179
179
|
* @property {string} [labId] The Lab that owns this Rack Position
|
|
180
180
|
* @property {string} [rackId] The Rack associated with this Rack Position
|
|
181
181
|
* @property {number} [verticalLevelIndex] The Index of the Vertical Level in the Rack where this Position resides
|
|
@@ -1054,15 +1054,12 @@ export default SampleController;
|
|
|
1054
1054
|
* @property {string} [labId] The Lab ID this Sample is associated with
|
|
1055
1055
|
* @property {string} [sampleNumber] The Numeric Sample Number
|
|
1056
1056
|
* @property {string} [createdSource] The Source that Created this Sample
|
|
1057
|
-
* @property {?string} [
|
|
1058
|
-
* @property {?string} [
|
|
1059
|
-
* @property {?string} [publishUserId] ID of the User who Published this Sample
|
|
1057
|
+
* @property {?string} [createdUserName] Name of the User who Created this Sample
|
|
1058
|
+
* @property {?string} [publishSource] The Source that Published this Sample
|
|
1060
1059
|
* @property {?string} [publishUserName] Name of the User who Published this Sample
|
|
1061
1060
|
* @property {string} [fruitProfileId] The Fruit Profile for this Sample
|
|
1062
1061
|
* @property {string} [rackPositionId] The Rack Position used for this Sample
|
|
1063
1062
|
* @property {string} [dehydratorId] The Dehydrator used for this Sample
|
|
1064
|
-
* @property {?string} [outcome] The Outcome of this Sample
|
|
1065
|
-
* @property {?string} [failureReasonId] A Sample Failure Reason ID if this Sample Failed
|
|
1066
1063
|
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
|
|
1067
1064
|
* @property {Date} [createdTimestampBegin] Filter by the Timestamp when Samples were Created. Results Greater than or Equal to Timestamp
|
|
1068
1065
|
* @property {Date} [createdTimestampEnd] Filter by the Timestamp when Samples were Created. Results Less than or Equal to Timestamp
|
|
@@ -1080,6 +1077,7 @@ export default SampleController;
|
|
|
1080
1077
|
* @property {Date} [publishTimestampEnd] Filter by the Timestamp when Samples were Published. Results Less than or Equal to Timestamp
|
|
1081
1078
|
* @property {Date} [updateTimestampBegin] Filter by the Timestamp when Samples were last Updated. Results Greater than or Equal to Timestamp
|
|
1082
1079
|
* @property {Date} [updateTimestampEnd] Filter by the Timestamp when Samples were last Updated. Results Less than or Equal to Timestamp
|
|
1080
|
+
* @property {boolean} [publishedState] Filter by Published State of a Sample. `true` = Published, `false` = Not Published
|
|
1083
1081
|
* @memberof Controllers.Lab.Site
|
|
1084
1082
|
*/
|
|
1085
1083
|
|
|
@@ -1091,21 +1089,18 @@ export default SampleController;
|
|
|
1091
1089
|
* @property {string} [sampleNumber] The Numeric Sample Number
|
|
1092
1090
|
* @property {Date} [createdTimestamp] When this Sample was Created
|
|
1093
1091
|
* @property {string} createdSource The Source that Created this Sample
|
|
1094
|
-
* @property {?string} [
|
|
1095
|
-
* @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
|
|
1092
|
+
* @property {?string} [createdUserName] Name of the User who Created this Sample
|
|
1096
1093
|
* @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
|
|
1097
1094
|
* @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
|
|
1098
1095
|
* @property {?Date} [startTimestamp] When this Sample was Started
|
|
1099
1096
|
* @property {?Date} [finishTimestamp] When this Sample was Finished
|
|
1100
1097
|
* @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
|
|
1101
1098
|
* @property {?Date} [publishTimestamp] When this Sample was Published
|
|
1102
|
-
* @property {?string} [
|
|
1099
|
+
* @property {?string} [publishSource] The Source that Published this Sample
|
|
1103
1100
|
* @property {?string} [publishUserName] Name of the User who Published this Sample
|
|
1104
1101
|
* @property {string} fruitProfileId The Fruit Profile for this Sample
|
|
1105
1102
|
* @property {string} rackPositionId The Rack Position used for this Sample
|
|
1106
1103
|
* @property {string} dehydratorId The Dehydrator used for this Sample
|
|
1107
|
-
* @property {?string} [outcome] The Outcome of this Sample
|
|
1108
|
-
* @property {?string} [failureReasonId] A Sample Failure Reason ID if this Sample Failed
|
|
1109
1104
|
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
|
|
1110
1105
|
* @memberof Controllers.Lab.Site
|
|
1111
1106
|
*/
|
|
@@ -1117,21 +1112,18 @@ export default SampleController;
|
|
|
1117
1112
|
* @property {string} [labId] The Lab ID this Sample is associated with
|
|
1118
1113
|
* @property {Date} [createdTimestamp] When this Sample was Created
|
|
1119
1114
|
* @property {string} [createdSource] The Source that Created this Sample
|
|
1120
|
-
* @property {?string} [
|
|
1121
|
-
* @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
|
|
1115
|
+
* @property {?string} [createdUserName] Name of the User who Created this Sample
|
|
1122
1116
|
* @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
|
|
1123
1117
|
* @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
|
|
1124
1118
|
* @property {?Date} [startTimestamp] When this Sample was Started
|
|
1125
1119
|
* @property {?Date} [finishTimestamp] When this Sample was Finished
|
|
1126
1120
|
* @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
|
|
1127
1121
|
* @property {?Date} [publishTimestamp] When this Sample was Published
|
|
1128
|
-
* @property {?string} [
|
|
1122
|
+
* @property {?string} [publishSource] The Source that Published this Sample
|
|
1129
1123
|
* @property {?string} [publishUserName] Name of the User who Published this Sample
|
|
1130
1124
|
* @property {string} [fruitProfileId] The Fruit Profile for this Sample
|
|
1131
1125
|
* @property {string} [rackPositionId] The Rack Position used for this Sample
|
|
1132
1126
|
* @property {string} [dehydratorId] The Dehydrator used for this Sample
|
|
1133
|
-
* @property {?string} [outcome] The Outcome of this Sample
|
|
1134
|
-
* @property {?string} [failureReasonId] A Sample Failure Reason ID if this Sample Failed
|
|
1135
1127
|
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
|
|
1136
1128
|
* @memberof Controllers.Lab.Site
|
|
1137
1129
|
*/
|
|
@@ -8,19 +8,19 @@ import RequestHelper from '../../../RequestHelper';
|
|
|
8
8
|
import SampleResultModel from '../../../Models/Lab/Site/SampleResultModel';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Controller Class for Sample
|
|
11
|
+
* Controller Class for Sample Results
|
|
12
12
|
*
|
|
13
13
|
* @class
|
|
14
14
|
*/
|
|
15
15
|
class SampleResultController
|
|
16
16
|
{
|
|
17
17
|
/**
|
|
18
|
-
* Retrieve a Sample
|
|
18
|
+
* Retrieve a Sample Result [GET /lab/sites/{siteId}/sample-results/{id}]
|
|
19
19
|
*
|
|
20
20
|
* @static
|
|
21
21
|
* @public
|
|
22
22
|
* @param {number} siteId The Site ID
|
|
23
|
-
* @param {string} id The Sample
|
|
23
|
+
* @param {string} id The Sample Result ID
|
|
24
24
|
* @return {Promise<SampleResultModel>}
|
|
25
25
|
*/
|
|
26
26
|
static getOne(siteId, id)
|
|
@@ -39,13 +39,13 @@ class SampleResultController
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Update a Sample
|
|
42
|
+
* Update a Sample Result [PATCH /lab/sites/{siteId}/sample-results/{id}]
|
|
43
43
|
*
|
|
44
44
|
* @static
|
|
45
45
|
* @public
|
|
46
46
|
* @param {number} siteId The Site ID
|
|
47
|
-
* @param {string} id The Sample
|
|
48
|
-
* @param {SampleResultController.UpdateData} updateData The Sample
|
|
47
|
+
* @param {string} id The Sample Result ID
|
|
48
|
+
* @param {SampleResultController.UpdateData} updateData The Sample Result Update Data
|
|
49
49
|
* @return {Promise<SampleResultModel>}
|
|
50
50
|
*/
|
|
51
51
|
static update(siteId, id, updateData)
|
|
@@ -64,12 +64,12 @@ class SampleResultController
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* Delete a Sample
|
|
67
|
+
* Delete a Sample Result [DELETE /lab/sites/{siteId}/sample-results/{id}]
|
|
68
68
|
*
|
|
69
69
|
* @static
|
|
70
70
|
* @public
|
|
71
71
|
* @param {number} siteId The Site ID
|
|
72
|
-
* @param {string} id The Sample
|
|
72
|
+
* @param {string} id The Sample Result ID
|
|
73
73
|
* @return {Promise<boolean>}
|
|
74
74
|
*/
|
|
75
75
|
static delete(siteId, id)
|
|
@@ -86,12 +86,12 @@ class SampleResultController
|
|
|
86
86
|
/**
|
|
87
87
|
* Retrieve Comments [GET /lab/sites/{siteId}/sample-results/{id}/comments]
|
|
88
88
|
*
|
|
89
|
-
* Retrieves Comments for a Sample
|
|
89
|
+
* Retrieves Comments for a Sample Result
|
|
90
90
|
*
|
|
91
91
|
* @static
|
|
92
92
|
* @public
|
|
93
93
|
* @param {number} siteId The Site ID
|
|
94
|
-
* @param {string} id The Sample
|
|
94
|
+
* @param {string} id The Sample Result ID
|
|
95
95
|
* @return {Promise<Array<SampleResultController.CommentItem>>}
|
|
96
96
|
*/
|
|
97
97
|
static getComments(siteId, id)
|
|
@@ -288,12 +288,12 @@ class SampleResultController
|
|
|
288
288
|
/**
|
|
289
289
|
* Create a Comment [POST /lab/sites/{siteId}/sample-results/{id}/comments]
|
|
290
290
|
*
|
|
291
|
-
* Create a Comment for a Sample
|
|
291
|
+
* Create a Comment for a Sample Result
|
|
292
292
|
*
|
|
293
293
|
* @static
|
|
294
294
|
* @public
|
|
295
295
|
* @param {number} siteId The Site ID
|
|
296
|
-
* @param {string} id The Sample
|
|
296
|
+
* @param {string} id The Sample Result ID
|
|
297
297
|
* @param {string} content The Content of the New Comment
|
|
298
298
|
* @return {Promise<SampleResultController.CommentItem>}
|
|
299
299
|
*/
|
|
@@ -482,12 +482,12 @@ class SampleResultController
|
|
|
482
482
|
/**
|
|
483
483
|
* Retrieve a Comment [GET /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]
|
|
484
484
|
*
|
|
485
|
-
* Retrieves Comments for a Sample
|
|
485
|
+
* Retrieves Comments for a Sample Result
|
|
486
486
|
*
|
|
487
487
|
* @static
|
|
488
488
|
* @public
|
|
489
489
|
* @param {number} siteId The Site ID
|
|
490
|
-
* @param {string} id The Sample
|
|
490
|
+
* @param {string} id The Sample Result ID
|
|
491
491
|
* @param {string} commentId The Comment ID
|
|
492
492
|
* @return {Promise<SampleResultController.CommentItem>}
|
|
493
493
|
*/
|
|
@@ -676,12 +676,12 @@ class SampleResultController
|
|
|
676
676
|
/**
|
|
677
677
|
* Update a Comment [PATCH /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]
|
|
678
678
|
*
|
|
679
|
-
* Update a Comment for a Sample
|
|
679
|
+
* Update a Comment for a Sample Result
|
|
680
680
|
*
|
|
681
681
|
* @static
|
|
682
682
|
* @public
|
|
683
683
|
* @param {number} siteId The Site ID
|
|
684
|
-
* @param {string} id The Sample
|
|
684
|
+
* @param {string} id The Sample Result ID
|
|
685
685
|
* @param {string} commentId The Comment ID
|
|
686
686
|
* @param {string} content The Updated Content for the Comment
|
|
687
687
|
* @return {Promise<SampleResultController.CommentItem>}
|
|
@@ -871,12 +871,12 @@ class SampleResultController
|
|
|
871
871
|
/**
|
|
872
872
|
* Delete a Comment [DELETE /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]
|
|
873
873
|
*
|
|
874
|
-
* Delete a Comment for a Sample
|
|
874
|
+
* Delete a Comment for a Sample Result
|
|
875
875
|
*
|
|
876
876
|
* @static
|
|
877
877
|
* @public
|
|
878
878
|
* @param {number} siteId The Site ID
|
|
879
|
-
* @param {string} id The Sample
|
|
879
|
+
* @param {string} id The Sample Result ID
|
|
880
880
|
* @param {string} commentId The Comment ID
|
|
881
881
|
* @return {Promise<boolean>}
|
|
882
882
|
*/
|
|
@@ -892,7 +892,7 @@ class SampleResultController
|
|
|
892
892
|
}
|
|
893
893
|
|
|
894
894
|
/**
|
|
895
|
-
* List all Sample
|
|
895
|
+
* List all Sample Results [GET /lab/sites/{siteId}/sample-results]
|
|
896
896
|
*
|
|
897
897
|
* @static
|
|
898
898
|
* @public
|
|
@@ -925,12 +925,12 @@ class SampleResultController
|
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
/**
|
|
928
|
-
* Create a Sample
|
|
928
|
+
* Create a Sample Result [POST /lab/sites/{siteId}/sample-results]
|
|
929
929
|
*
|
|
930
930
|
* @static
|
|
931
931
|
* @public
|
|
932
932
|
* @param {number} siteId The Site ID
|
|
933
|
-
* @param {SampleResultController.CreateData} createData The Sample
|
|
933
|
+
* @param {SampleResultController.CreateData} createData The Sample Result Create Data
|
|
934
934
|
* @return {Promise<SampleResultModel>}
|
|
935
935
|
*/
|
|
936
936
|
static create(siteId, createData)
|
|
@@ -963,7 +963,7 @@ export default SampleResultController;
|
|
|
963
963
|
*/
|
|
964
964
|
|
|
965
965
|
/**
|
|
966
|
-
* The Create Data for a Sample
|
|
966
|
+
* The Create Data for a Sample Result
|
|
967
967
|
*
|
|
968
968
|
* @typedef {Object} SampleResultController.CreateData
|
|
969
969
|
* @property {string} labId The Lab ID this Sample Result is associated with
|
|
@@ -975,9 +975,10 @@ export default SampleResultController;
|
|
|
975
975
|
* @property {number} belowTargetDuration The Below Temperature Target Duration (in seconds) of the Sample
|
|
976
976
|
* @property {number} aboveTargetDuration The Above Temperature Target Duration (in seconds) of the Sample
|
|
977
977
|
* @property {number} withinTargetDuration The Within Temperature Target Duration (in seconds) of the Sample
|
|
978
|
-
* @property {?Date} [
|
|
979
|
-
* @property {?Date} [
|
|
978
|
+
* @property {?Date} [finishCriteriaMetTimestamp] Timestamp of when the Finish Criteria was Met for the Sample - `null` if not Met
|
|
979
|
+
* @property {?Date} [latestUnloadTimestamp] Latest Possible Timestamp of when the Sample should have been Unloaded to remain Compliant
|
|
980
980
|
* @property {?number} [totalAverageTemperature] The Average Temperature for the Total Duration of the Sample
|
|
981
|
+
* @property {?number} [warmUpRateOfChangeTemperature] The Average Temperature Rate-of-Change seen during the Warm Up process for the Sample
|
|
981
982
|
* @property {?number} [belowTargetMinimumTemperature] The Minimum Temperature seen Below the Temperature Target for the Sample
|
|
982
983
|
* @property {?number} [belowTargetAverageTemperature] The Average Temperature seen Below the Temperature Target for the Sample
|
|
983
984
|
* @property {?number} [aboveTargetMaximumTemperature] The Maximum Temperature seen Above the Temperature Target for the Sample
|
|
@@ -989,7 +990,7 @@ export default SampleResultController;
|
|
|
989
990
|
*/
|
|
990
991
|
|
|
991
992
|
/**
|
|
992
|
-
* The Update Data for a Sample
|
|
993
|
+
* The Update Data for a Sample Result
|
|
993
994
|
*
|
|
994
995
|
* @typedef {Object} SampleResultController.UpdateData
|
|
995
996
|
* @property {string} [labId] The Lab ID this Sample Result is associated with
|
|
@@ -1000,9 +1001,10 @@ export default SampleResultController;
|
|
|
1000
1001
|
* @property {number} [belowTargetDuration] The Below Temperature Target Duration (in seconds) of the Sample
|
|
1001
1002
|
* @property {number} [aboveTargetDuration] The Above Temperature Target Duration (in seconds) of the Sample
|
|
1002
1003
|
* @property {number} [withinTargetDuration] The Within Temperature Target Duration (in seconds) of the Sample
|
|
1003
|
-
* @property {?Date} [
|
|
1004
|
-
* @property {?Date} [
|
|
1004
|
+
* @property {?Date} [finishCriteriaMetTimestamp] Timestamp of when the Finish Criteria was Met for the Sample - `null` if not Met
|
|
1005
|
+
* @property {?Date} [latestUnloadTimestamp] Latest Possible Timestamp of when the Sample should have been Unloaded to remain Compliant
|
|
1005
1006
|
* @property {?number} [totalAverageTemperature] The Average Temperature for the Total Duration of the Sample
|
|
1007
|
+
* @property {?number} [warmUpRateOfChangeTemperature] The Average Temperature Rate-of-Change seen during the Warm Up process for the Sample
|
|
1006
1008
|
* @property {?number} [belowTargetMinimumTemperature] The Minimum Temperature seen Below the Temperature Target for the Sample
|
|
1007
1009
|
* @property {?number} [belowTargetAverageTemperature] The Average Temperature seen Below the Temperature Target for the Sample
|
|
1008
1010
|
* @property {?number} [aboveTargetMaximumTemperature] The Maximum Temperature seen Above the Temperature Target for the Sample
|
|
@@ -14,7 +14,6 @@ import ProbeCalibrationController from './ProbeCalibrationController';
|
|
|
14
14
|
import RackController from './RackController';
|
|
15
15
|
import RackPositionController from './RackPositionController';
|
|
16
16
|
import SampleController from './SampleController';
|
|
17
|
-
import SampleFailureReasonController from './SampleFailureReasonController';
|
|
18
17
|
import SampleResultController from './SampleResultController';
|
|
19
18
|
|
|
20
19
|
const Site = {
|
|
@@ -25,7 +24,6 @@ const Site = {
|
|
|
25
24
|
RackController,
|
|
26
25
|
RackPositionController,
|
|
27
26
|
SampleController,
|
|
28
|
-
SampleFailureReasonController,
|
|
29
27
|
SampleResultController,
|
|
30
28
|
};
|
|
31
29
|
|
|
@@ -66,7 +66,7 @@ class FruitProfileModel extends BaseModel
|
|
|
66
66
|
this.nominalWarmUpDuration = 0;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures be
|
|
69
|
+
* The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures to be Compliant
|
|
70
70
|
*
|
|
71
71
|
* @type {number}
|
|
72
72
|
* @public
|
|
@@ -74,7 +74,15 @@ class FruitProfileModel extends BaseModel
|
|
|
74
74
|
this.minimumWithinTargetDuration = 0;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* The
|
|
77
|
+
* The Minimum Duration (in seconds) that a Sample must be Dehydrated for to be Compliant
|
|
78
|
+
*
|
|
79
|
+
* @type {number}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.minimumTotalDuration = 0;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The Maximum Duration (in seconds) that a Sample can be Dehydrated for before it is Considered Non-Compliant
|
|
78
86
|
*
|
|
79
87
|
* @type {number}
|
|
80
88
|
* @public
|
|
@@ -82,7 +90,7 @@ class FruitProfileModel extends BaseModel
|
|
|
82
90
|
this.maximumTotalDuration = 0;
|
|
83
91
|
|
|
84
92
|
/**
|
|
85
|
-
* The Minimum Target Temperature for a Sample to be
|
|
93
|
+
* The Minimum Target Temperature for a Sample to be Compliant
|
|
86
94
|
*
|
|
87
95
|
* @type {number}
|
|
88
96
|
* @public
|
|
@@ -90,7 +98,7 @@ class FruitProfileModel extends BaseModel
|
|
|
90
98
|
this.minimumTargetTemperature = 0;
|
|
91
99
|
|
|
92
100
|
/**
|
|
93
|
-
* The Maximum Target Temperature for a Sample to be
|
|
101
|
+
* The Maximum Target Temperature for a Sample to be Compliant
|
|
94
102
|
*
|
|
95
103
|
* @type {number}
|
|
96
104
|
* @public
|
|
@@ -223,6 +231,18 @@ class FruitProfileModel extends BaseModel
|
|
|
223
231
|
}());
|
|
224
232
|
}
|
|
225
233
|
|
|
234
|
+
if('minimumTotalDuration' in jsonObject)
|
|
235
|
+
{
|
|
236
|
+
model.minimumTotalDuration = (function(){
|
|
237
|
+
if(typeof jsonObject['minimumTotalDuration'] !== 'number')
|
|
238
|
+
{
|
|
239
|
+
return Number.isInteger(Number(jsonObject['minimumTotalDuration'])) ? Number(jsonObject['minimumTotalDuration']) : Math.floor(Number(jsonObject['minimumTotalDuration']));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return Number.isInteger(jsonObject['minimumTotalDuration']) ? jsonObject['minimumTotalDuration'] : Math.floor(jsonObject['minimumTotalDuration']);
|
|
243
|
+
}());
|
|
244
|
+
}
|
|
245
|
+
|
|
226
246
|
if('maximumTotalDuration' in jsonObject)
|
|
227
247
|
{
|
|
228
248
|
model.maximumTotalDuration = (function(){
|
|
@@ -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;
|