@ricado/api-client 2.4.2 → 2.5.1

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.
Files changed (33) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Lab/Site/FruitProfileController.js +10 -8
  3. package/lib/Controllers/Lab/Site/LabController.js +5 -2
  4. package/lib/Controllers/Lab/Site/RackPositionController.js +2 -2
  5. package/lib/Controllers/Lab/Site/SampleController.js +7 -15
  6. package/lib/Controllers/Lab/Site/SampleResultController.js +29 -27
  7. package/lib/Controllers/Lab/Site/index.js +0 -3
  8. package/lib/Models/Lab/Site/FruitProfileModel.js +22 -4
  9. package/lib/Models/Lab/Site/LabModel.js +100 -11
  10. package/lib/Models/Lab/Site/RackPositionModel.js +67 -15
  11. package/lib/Models/Lab/Site/SampleModel.js +9 -75
  12. package/lib/Models/Lab/Site/SampleResultModel.js +45 -23
  13. package/lib/Models/Lab/Site/index.js +0 -3
  14. package/lib/PackageVersion.js +1 -1
  15. package/lib/index.d.ts +150 -315
  16. package/package.json +1 -1
  17. package/src/Controllers/Lab/Site/FruitProfileController.js +10 -8
  18. package/src/Controllers/Lab/Site/LabController.js +5 -2
  19. package/src/Controllers/Lab/Site/RackPositionController.js +2 -2
  20. package/src/Controllers/Lab/Site/SampleController.js +7 -15
  21. package/src/Controllers/Lab/Site/SampleResultController.js +29 -27
  22. package/src/Controllers/Lab/Site/index.js +0 -2
  23. package/src/Models/Lab/Site/FruitProfileModel.js +24 -4
  24. package/src/Models/Lab/Site/LabModel.js +132 -11
  25. package/src/Models/Lab/Site/RackPositionModel.js +87 -15
  26. package/src/Models/Lab/Site/SampleModel.js +9 -84
  27. package/src/Models/Lab/Site/SampleResultModel.js +48 -23
  28. package/src/Models/Lab/Site/index.js +0 -2
  29. package/src/PackageVersion.js +1 -1
  30. package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +0 -193
  31. package/lib/Models/Lab/Site/SampleFailureReasonModel.js +0 -195
  32. package/src/Controllers/Lab/Site/SampleFailureReasonController.js +0 -170
  33. package/src/Models/Lab/Site/SampleFailureReasonModel.js +0 -170
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricado/api-client",
3
- "version": "2.4.2",
3
+ "version": "2.5.1",
4
4
  "description": "RICADO Gen 4 API Client Library for NodeJS and Browsers",
5
5
  "author": {
6
6
  "name": "Ash Neilson"
@@ -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 Successful
163
- * @property {number} maximumTotalDuration The Maximum Duration (in seconds) that a Sample should be Dehydrated for before it Fails
164
- * @property {number} minimumTargetTemperature The Minimum Target Temperature for a Sample to be Successful
165
- * @property {number} maximumTargetTemperature The Maximum Target Temperature for a Sample to be Successful
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 Successful
178
- * @property {number} [maximumTotalDuration] The Maximum Duration (in seconds) that a Sample should be Dehydrated for before it Fails
179
- * @property {number} [minimumTargetTemperature] The Minimum Target Temperature for a Sample to be Successful
180
- * @property {number} [maximumTargetTemperature] The Maximum Target Temperature for a Sample to be Successful
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
  */
@@ -192,8 +192,11 @@ export default LabController;
192
192
  * A **InspectIntegration** Type
193
193
  *
194
194
  * @typedef {Object} LabController.InspectIntegration
195
- * @property {Object} points The Points used for this Inspect Integration
195
+ * @property {{sqlServerCommunicationStatus: number, sampleCreationEnabled: number, sampleSchedulingEnabled: number, samplePublishingEnabled: number}} points The Points used for this Inspect Integration
196
196
  * @property {boolean} enabled Whether the Inspect Integration is Enabled on this Lab
197
- * @property {string} apiBaseUrl Base URL of the Inspect API
197
+ * @property {string} labName Name of the Lab referenced by Inspect
198
+ * @property {string} sqlServerHost Host of the Inspect SQL Server
199
+ * @property {string} sqlServerUsername Username for Authentication with the Inspect SQL Server
200
+ * @property {string} sqlServerPassword Password for Authentication with the Inspect SQL Server
198
201
  * @memberof Controllers.Lab.Site
199
202
  */
@@ -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, currentSampleSuccessCriteriaMet: number, currentSampleFailureCriteriaMet: number}} points The Points used by this Rack Position
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, currentSampleSuccessCriteriaMet: number, currentSampleFailureCriteriaMet: number}} [points] The Points used by this Rack Position
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} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'User'
1058
- * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
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} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'User'
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} [publishUserId] ID of the User who Published this Sample
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} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'User'
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} [publishUserId] ID of the User who Published this Sample
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 Resultss
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 Results [GET /lab/sites/{siteId}/sample-results/{id}]
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 Results ID
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 Results [PATCH /lab/sites/{siteId}/sample-results/{id}]
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 Results ID
48
- * @param {SampleResultController.UpdateData} updateData The Sample Results Update Data
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 Results [DELETE /lab/sites/{siteId}/sample-results/{id}]
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 Results ID
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 Results
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 Results ID
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 Results
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 Results ID
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 Results
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 Results ID
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 Results
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 Results ID
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 Results
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 Results ID
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 Resultss [GET /lab/sites/{siteId}/sample-results]
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 Results [POST /lab/sites/{siteId}/sample-results]
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 Results Create Data
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 Results
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} [successCriteriaMetTimestamp] Timestamp of when the Success Criteria was Met for the Sample - `null` if not Met
979
- * @property {?Date} [failureCriteriaMetTimestamp] Timestamp of when the Failure Criteria was Met for the Sample - `null` if not Met
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 Results
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} [successCriteriaMetTimestamp] Timestamp of when the Success Criteria was Met for the Sample - `null` if not Met
1004
- * @property {?Date} [failureCriteriaMetTimestamp] Timestamp of when the Failure Criteria was Met for the Sample - `null` if not Met
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 Successful
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 Maximum Duration (in seconds) that a Sample should be Dehydrated for before it Fails
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 Successful
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 Successful
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(){
@@ -84,7 +84,7 @@ class LabModel extends BaseModel
84
84
  /**
85
85
  * The Inspect Integration Configuration for this Lab
86
86
  *
87
- * @type {?{points: Object, enabled: boolean, apiBaseUrl: string}}
87
+ * @type {?{points: {sqlServerCommunicationStatus: number, sampleCreationEnabled: number, sampleSchedulingEnabled: number, samplePublishingEnabled: number}, enabled: boolean, labName: string, sqlServerHost: string, sqlServerUsername: string, sqlServerPassword: string}}
88
88
  * @public
89
89
  */
90
90
  this.inspectIntegration = null;
@@ -292,17 +292,90 @@ class LabModel extends BaseModel
292
292
  if(typeof jsonObject['inspectIntegration'] === 'object' && 'points' in jsonObject['inspectIntegration'])
293
293
  {
294
294
  inspectIntegrationObject.points = (function(){
295
- if(typeof jsonObject['inspectIntegration'].points !== 'object')
295
+ let pointsObject = {};
296
+
297
+ if(typeof jsonObject['inspectIntegration'].points === 'object' && 'sqlServerCommunicationStatus' in jsonObject['inspectIntegration'].points)
298
+ {
299
+ pointsObject.sqlServerCommunicationStatus = (function(){
300
+ if(typeof jsonObject['inspectIntegration'].points.sqlServerCommunicationStatus !== 'number')
301
+ {
302
+ return Number.isInteger(Number(jsonObject['inspectIntegration'].points.sqlServerCommunicationStatus)) ? Number(jsonObject['inspectIntegration'].points.sqlServerCommunicationStatus) : Math.floor(Number(jsonObject['inspectIntegration'].points.sqlServerCommunicationStatus));
303
+ }
304
+
305
+ return Number.isInteger(jsonObject['inspectIntegration'].points.sqlServerCommunicationStatus) ? jsonObject['inspectIntegration'].points.sqlServerCommunicationStatus : Math.floor(jsonObject['inspectIntegration'].points.sqlServerCommunicationStatus);
306
+ }());
307
+ }
308
+ else
309
+ {
310
+ pointsObject.sqlServerCommunicationStatus = 0;
311
+ }
312
+
313
+ if(typeof jsonObject['inspectIntegration'].points === 'object' && 'sampleCreationEnabled' in jsonObject['inspectIntegration'].points)
314
+ {
315
+ pointsObject.sampleCreationEnabled = (function(){
316
+ if(typeof jsonObject['inspectIntegration'].points.sampleCreationEnabled !== 'number')
317
+ {
318
+ return Number.isInteger(Number(jsonObject['inspectIntegration'].points.sampleCreationEnabled)) ? Number(jsonObject['inspectIntegration'].points.sampleCreationEnabled) : Math.floor(Number(jsonObject['inspectIntegration'].points.sampleCreationEnabled));
319
+ }
320
+
321
+ return Number.isInteger(jsonObject['inspectIntegration'].points.sampleCreationEnabled) ? jsonObject['inspectIntegration'].points.sampleCreationEnabled : Math.floor(jsonObject['inspectIntegration'].points.sampleCreationEnabled);
322
+ }());
323
+ }
324
+ else
325
+ {
326
+ pointsObject.sampleCreationEnabled = 0;
327
+ }
328
+
329
+ if(typeof jsonObject['inspectIntegration'].points === 'object' && 'sampleSchedulingEnabled' in jsonObject['inspectIntegration'].points)
330
+ {
331
+ pointsObject.sampleSchedulingEnabled = (function(){
332
+ if(typeof jsonObject['inspectIntegration'].points.sampleSchedulingEnabled !== 'number')
333
+ {
334
+ return Number.isInteger(Number(jsonObject['inspectIntegration'].points.sampleSchedulingEnabled)) ? Number(jsonObject['inspectIntegration'].points.sampleSchedulingEnabled) : Math.floor(Number(jsonObject['inspectIntegration'].points.sampleSchedulingEnabled));
335
+ }
336
+
337
+ return Number.isInteger(jsonObject['inspectIntegration'].points.sampleSchedulingEnabled) ? jsonObject['inspectIntegration'].points.sampleSchedulingEnabled : Math.floor(jsonObject['inspectIntegration'].points.sampleSchedulingEnabled);
338
+ }());
339
+ }
340
+ else
341
+ {
342
+ pointsObject.sampleSchedulingEnabled = 0;
343
+ }
344
+
345
+ if(typeof jsonObject['inspectIntegration'].points === 'object' && 'samplePublishingEnabled' in jsonObject['inspectIntegration'].points)
346
+ {
347
+ pointsObject.samplePublishingEnabled = (function(){
348
+ if(typeof jsonObject['inspectIntegration'].points.samplePublishingEnabled !== 'number')
349
+ {
350
+ return Number.isInteger(Number(jsonObject['inspectIntegration'].points.samplePublishingEnabled)) ? Number(jsonObject['inspectIntegration'].points.samplePublishingEnabled) : Math.floor(Number(jsonObject['inspectIntegration'].points.samplePublishingEnabled));
351
+ }
352
+
353
+ return Number.isInteger(jsonObject['inspectIntegration'].points.samplePublishingEnabled) ? jsonObject['inspectIntegration'].points.samplePublishingEnabled : Math.floor(jsonObject['inspectIntegration'].points.samplePublishingEnabled);
354
+ }());
355
+ }
356
+ else
296
357
  {
297
- return Object(jsonObject['inspectIntegration'].points);
358
+ pointsObject.samplePublishingEnabled = 0;
298
359
  }
299
360
 
300
- return jsonObject['inspectIntegration'].points;
361
+ return pointsObject;
301
362
  }());
302
363
  }
303
364
  else
304
365
  {
305
- inspectIntegrationObject.points = {}
366
+ inspectIntegrationObject.points = (function(){
367
+ let pointsDefaultValue = {};
368
+
369
+ pointsDefaultValue.sqlServerCommunicationStatus = 0;
370
+
371
+ pointsDefaultValue.sampleCreationEnabled = 0;
372
+
373
+ pointsDefaultValue.sampleSchedulingEnabled = 0;
374
+
375
+ pointsDefaultValue.samplePublishingEnabled = 0;
376
+
377
+ return pointsDefaultValue;
378
+ }());
306
379
  }
307
380
 
308
381
  if(typeof jsonObject['inspectIntegration'] === 'object' && 'enabled' in jsonObject['inspectIntegration'])
@@ -321,20 +394,68 @@ class LabModel extends BaseModel
321
394
  inspectIntegrationObject.enabled = false;
322
395
  }
323
396
 
324
- if(typeof jsonObject['inspectIntegration'] === 'object' && 'apiBaseUrl' in jsonObject['inspectIntegration'])
397
+ if(typeof jsonObject['inspectIntegration'] === 'object' && 'labName' in jsonObject['inspectIntegration'])
398
+ {
399
+ inspectIntegrationObject.labName = (function(){
400
+ if(typeof jsonObject['inspectIntegration'].labName !== 'string')
401
+ {
402
+ return String(jsonObject['inspectIntegration'].labName);
403
+ }
404
+
405
+ return jsonObject['inspectIntegration'].labName;
406
+ }());
407
+ }
408
+ else
409
+ {
410
+ inspectIntegrationObject.labName = "";
411
+ }
412
+
413
+ if(typeof jsonObject['inspectIntegration'] === 'object' && 'sqlServerHost' in jsonObject['inspectIntegration'])
414
+ {
415
+ inspectIntegrationObject.sqlServerHost = (function(){
416
+ if(typeof jsonObject['inspectIntegration'].sqlServerHost !== 'string')
417
+ {
418
+ return String(jsonObject['inspectIntegration'].sqlServerHost);
419
+ }
420
+
421
+ return jsonObject['inspectIntegration'].sqlServerHost;
422
+ }());
423
+ }
424
+ else
425
+ {
426
+ inspectIntegrationObject.sqlServerHost = "";
427
+ }
428
+
429
+ if(typeof jsonObject['inspectIntegration'] === 'object' && 'sqlServerUsername' in jsonObject['inspectIntegration'])
430
+ {
431
+ inspectIntegrationObject.sqlServerUsername = (function(){
432
+ if(typeof jsonObject['inspectIntegration'].sqlServerUsername !== 'string')
433
+ {
434
+ return String(jsonObject['inspectIntegration'].sqlServerUsername);
435
+ }
436
+
437
+ return jsonObject['inspectIntegration'].sqlServerUsername;
438
+ }());
439
+ }
440
+ else
441
+ {
442
+ inspectIntegrationObject.sqlServerUsername = "";
443
+ }
444
+
445
+ if(typeof jsonObject['inspectIntegration'] === 'object' && 'sqlServerPassword' in jsonObject['inspectIntegration'])
325
446
  {
326
- inspectIntegrationObject.apiBaseUrl = (function(){
327
- if(typeof jsonObject['inspectIntegration'].apiBaseUrl !== 'string')
447
+ inspectIntegrationObject.sqlServerPassword = (function(){
448
+ if(typeof jsonObject['inspectIntegration'].sqlServerPassword !== 'string')
328
449
  {
329
- return String(jsonObject['inspectIntegration'].apiBaseUrl);
450
+ return String(jsonObject['inspectIntegration'].sqlServerPassword);
330
451
  }
331
452
 
332
- return jsonObject['inspectIntegration'].apiBaseUrl;
453
+ return jsonObject['inspectIntegration'].sqlServerPassword;
333
454
  }());
334
455
  }
335
456
  else
336
457
  {
337
- inspectIntegrationObject.apiBaseUrl = "";
458
+ inspectIntegrationObject.sqlServerPassword = "";
338
459
  }
339
460
 
340
461
  return inspectIntegrationObject;