@ricado/api-client 2.4.1 → 2.4.2

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.
@@ -915,8 +915,8 @@ 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} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'System'
919
- * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
918
+ * @property {?string} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'User'
919
+ * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
920
920
  * @property {?string} [publishUserId] ID of the User who Published this Sample
921
921
  * @property {?string} [publishUserName] Name of the User who Published this Sample
922
922
  * @property {string} [fruitProfileId] The Fruit Profile for this Sample
@@ -929,10 +929,14 @@ var _default = SampleController;
929
929
  * @property {Date} [createdTimestampEnd] Filter by the Timestamp when Samples were Created. Results Less than or Equal to Timestamp
930
930
  * @property {Date} [scheduledTimestampBegin] Filter by the Timestamp when Samples were Scheduled to Begin. Results Greater than or Equal to Timestamp
931
931
  * @property {Date} [scheduledTimestampEnd] Filter by the Timestamp when Samples were Scheduled to Begin. Results Less than or Equal to Timestamp
932
+ * @property {Date} [loadedTimestampBegin] Filter by the Timestamp when Samples were Loaded. Results Greater than or Equal to Timestamp
933
+ * @property {Date} [loadedTimestampEnd] Filter by the Timestamp when Samples were Loaded. Results Less than or Equal to Timestamp
932
934
  * @property {Date} [startTimestampBegin] Filter by the Timestamp when Samples were Started. Results Greater than or Equal to Timestamp
933
935
  * @property {Date} [startTimestampEnd] Filter by the Timestamp when Samples were Started. Results Less than or Equal to Timestamp
934
936
  * @property {Date} [finishTimestampBegin] Filter by the Timestamp when Samples were Finished. Results Greater than or Equal to Timestamp
935
937
  * @property {Date} [finishTimestampEnd] Filter by the Timestamp when Samples were Finished. Results Less than or Equal to Timestamp
938
+ * @property {Date} [unloadedTimestampBegin] Filter by the Timestamp when Samples were Unloaded. Results Greater than or Equal to Timestamp
939
+ * @property {Date} [unloadedTimestampEnd] Filter by the Timestamp when Samples were Unloaded. Results Less than or Equal to Timestamp
936
940
  * @property {Date} [publishTimestampBegin] Filter by the Timestamp when Samples were Published. Results Greater than or Equal to Timestamp
937
941
  * @property {Date} [publishTimestampEnd] Filter by the Timestamp when Samples were Published. Results Less than or Equal to Timestamp
938
942
  * @property {Date} [updateTimestampBegin] Filter by the Timestamp when Samples were last Updated. Results Greater than or Equal to Timestamp
@@ -948,11 +952,13 @@ var _default = SampleController;
948
952
  * @property {string} [sampleNumber] The Numeric Sample Number
949
953
  * @property {Date} [createdTimestamp] When this Sample was Created
950
954
  * @property {string} createdSource The Source that Created this Sample
951
- * @property {?string} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'System'
952
- * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
955
+ * @property {?string} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'User'
956
+ * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
953
957
  * @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
958
+ * @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
954
959
  * @property {?Date} [startTimestamp] When this Sample was Started
955
960
  * @property {?Date} [finishTimestamp] When this Sample was Finished
961
+ * @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
956
962
  * @property {?Date} [publishTimestamp] When this Sample was Published
957
963
  * @property {?string} [publishUserId] ID of the User who Published this Sample
958
964
  * @property {?string} [publishUserName] Name of the User who Published this Sample
@@ -972,11 +978,13 @@ var _default = SampleController;
972
978
  * @property {string} [labId] The Lab ID this Sample is associated with
973
979
  * @property {Date} [createdTimestamp] When this Sample was Created
974
980
  * @property {string} [createdSource] The Source that Created this Sample
975
- * @property {?string} [createdUserId] ID 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. Only applies if the `createdSource` is 'System'
981
+ * @property {?string} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'User'
982
+ * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
977
983
  * @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
984
+ * @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
978
985
  * @property {?Date} [startTimestamp] When this Sample was Started
979
986
  * @property {?Date} [finishTimestamp] When this Sample was Finished
987
+ * @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
980
988
  * @property {?Date} [publishTimestamp] When this Sample was Published
981
989
  * @property {?string} [publishUserId] ID of the User who Published this Sample
982
990
  * @property {?string} [publishUserName] Name of the User who Published this Sample
@@ -176,7 +176,7 @@ var _default = SampleFailureReasonController;
176
176
  * The Create Data for a Sample Failure Reason
177
177
  *
178
178
  * @typedef {Object} SampleFailureReasonController.CreateData
179
- * @property {string} [name] The Sample Failure Reason Name
179
+ * @property {string} name The Sample Failure Reason Name
180
180
  * @property {string} description The Sample Failure Reason Description
181
181
  * @memberof Controllers.Lab.Site
182
182
  */
@@ -185,6 +185,7 @@ var _default = SampleFailureReasonController;
185
185
  * The Update Data for a Sample Failure Reason
186
186
  *
187
187
  * @typedef {Object} SampleFailureReasonController.UpdateData
188
+ * @property {string} [name] The Sample Failure Reason Name
188
189
  * @property {string} [description] The Sample Failure Reason Description
189
190
  * @memberof Controllers.Lab.Site
190
191
  */
@@ -11,6 +11,8 @@ 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"));
@@ -36,6 +38,7 @@ var Site = {
36
38
  DehydratorController: _DehydratorController.default,
37
39
  FruitProfileController: _FruitProfileController.default,
38
40
  LabController: _LabController.default,
41
+ ProbeCalibrationController: _ProbeCalibrationController.default,
39
42
  RackController: _RackController.default,
40
43
  RackPositionController: _RackPositionController.default,
41
44
  SampleController: _SampleController.default,
@@ -0,0 +1,303 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13
+
14
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
+
16
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
17
+
18
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
19
+
20
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
21
+
22
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
+
24
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
+
26
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
27
+
28
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
29
+
30
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
+
32
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
+
34
+ /**
35
+ * Model Class for a Probe Calibration
36
+ *
37
+ * @class
38
+ * @hideconstructor
39
+ * @extends BaseModel
40
+ */
41
+ var ProbeCalibrationModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(ProbeCalibrationModel, _BaseModel);
43
+
44
+ var _super = _createSuper(ProbeCalibrationModel);
45
+
46
+ /**
47
+ * ProbeCalibrationModel Constructor
48
+ *
49
+ * @protected
50
+ * @param {number} siteId The Site ID associated with this Probe Calibration
51
+ */
52
+ function ProbeCalibrationModel(siteId) {
53
+ var _this;
54
+
55
+ _classCallCheck(this, ProbeCalibrationModel);
56
+
57
+ _this = _super.call(this);
58
+ /**
59
+ * The Probe Calibration ID
60
+ *
61
+ * @type {string}
62
+ * @public
63
+ */
64
+
65
+ _this.id = "";
66
+ /**
67
+ * The Rack Position ID this Probe Calibration is associated with
68
+ *
69
+ * @type {string}
70
+ * @public
71
+ */
72
+
73
+ _this.rackPositionId = "";
74
+ /**
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
84
+ *
85
+ * @type {string}
86
+ * @public
87
+ */
88
+
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;
130
+ /**
131
+ * Whether the Probe Calibration has been deleted
132
+ *
133
+ * @type {boolean}
134
+ * @public
135
+ */
136
+
137
+ _this.deleted = false;
138
+ /**
139
+ * When the Probe Calibration was last updated
140
+ *
141
+ * @type {Date}
142
+ * @public
143
+ */
144
+
145
+ _this.updateTimestamp = new Date();
146
+ /**
147
+ * The Site ID associated with this Probe Calibration
148
+ *
149
+ * @type {number}
150
+ * @public
151
+ */
152
+
153
+ _this.siteId = siteId;
154
+ return _this;
155
+ }
156
+ /**
157
+ * Create a new **ProbeCalibrationModel** from a JSON Object or JSON String
158
+ *
159
+ * @static
160
+ * @public
161
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
162
+ * @param {number} siteId The Site ID associated with this Probe Calibration
163
+ * @return {ProbeCalibrationModel}
164
+ */
165
+
166
+
167
+ _createClass(ProbeCalibrationModel, null, [{
168
+ key: "fromJSON",
169
+ value: function fromJSON(json, siteId) {
170
+ var model = new ProbeCalibrationModel(siteId);
171
+ /**
172
+ * The JSON Object
173
+ *
174
+ * @type {Object<string, any>}
175
+ */
176
+
177
+ var jsonObject = {};
178
+
179
+ if (typeof json === 'string') {
180
+ jsonObject = JSON.parse(json);
181
+ } else if (_typeof(json) === 'object') {
182
+ jsonObject = json;
183
+ }
184
+
185
+ if ('id' in jsonObject) {
186
+ model.id = function () {
187
+ if (typeof jsonObject['id'] !== 'string') {
188
+ return String(jsonObject['id']);
189
+ }
190
+
191
+ return jsonObject['id'];
192
+ }();
193
+ }
194
+
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']);
259
+ }
260
+
261
+ return jsonObject['preCalibrationTemperature'];
262
+ }();
263
+ }
264
+
265
+ if ('postCalibrationTemperature' in jsonObject) {
266
+ model.postCalibrationTemperature = function () {
267
+ if (typeof jsonObject['postCalibrationTemperature'] !== 'number') {
268
+ return Number(jsonObject['postCalibrationTemperature']);
269
+ }
270
+
271
+ return jsonObject['postCalibrationTemperature'];
272
+ }();
273
+ }
274
+
275
+ if ('deleted' in jsonObject) {
276
+ model.deleted = function () {
277
+ if (typeof jsonObject['deleted'] !== 'boolean') {
278
+ return Boolean(jsonObject['deleted']);
279
+ }
280
+
281
+ return jsonObject['deleted'];
282
+ }();
283
+ }
284
+
285
+ if ('updateTimestamp' in jsonObject) {
286
+ model.updateTimestamp = function () {
287
+ if (typeof jsonObject['updateTimestamp'] !== 'string') {
288
+ return new Date(String(jsonObject['updateTimestamp']));
289
+ }
290
+
291
+ return new Date(jsonObject['updateTimestamp']);
292
+ }();
293
+ }
294
+
295
+ return model;
296
+ }
297
+ }]);
298
+
299
+ return ProbeCalibrationModel;
300
+ }(_BaseModel2.default);
301
+
302
+ var _default = ProbeCalibrationModel;
303
+ exports.default = _default;
@@ -96,7 +96,7 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
96
96
 
97
97
  _this.createdSource = "";
98
98
  /**
99
- * ID of the User who Created this Sample. Only applies if the `createdSource` is 'System'
99
+ * ID of the User who Created this Sample. Only applies if the `createdSource` is 'User'
100
100
  *
101
101
  * @type {?string}
102
102
  * @public
@@ -104,7 +104,7 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
104
104
 
105
105
  _this.createdUserId = null;
106
106
  /**
107
- * Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
107
+ * Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
108
108
  *
109
109
  * @type {?string}
110
110
  * @public
@@ -119,6 +119,14 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
119
119
  */
120
120
 
121
121
  _this.scheduledTimestamp = null;
122
+ /**
123
+ * When this Sample was Loaded into the Dehydrator
124
+ *
125
+ * @type {?Date}
126
+ * @public
127
+ */
128
+
129
+ _this.loadedTimestamp = null;
122
130
  /**
123
131
  * When this Sample was Started
124
132
  *
@@ -135,6 +143,14 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
135
143
  */
136
144
 
137
145
  _this.finishTimestamp = null;
146
+ /**
147
+ * When this Sample was Unloaded from the Dehydrator
148
+ *
149
+ * @type {?Date}
150
+ * @public
151
+ */
152
+
153
+ _this.unloadedTimestamp = null;
138
154
  /**
139
155
  * When this Sample was Published
140
156
  *
@@ -362,6 +378,20 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
362
378
  }();
363
379
  }
364
380
 
381
+ if ('loadedTimestamp' in jsonObject) {
382
+ model.loadedTimestamp = function () {
383
+ if (jsonObject['loadedTimestamp'] === null) {
384
+ return null;
385
+ }
386
+
387
+ if (typeof jsonObject['loadedTimestamp'] !== 'string') {
388
+ return new Date(String(jsonObject['loadedTimestamp']));
389
+ }
390
+
391
+ return new Date(jsonObject['loadedTimestamp']);
392
+ }();
393
+ }
394
+
365
395
  if ('startTimestamp' in jsonObject) {
366
396
  model.startTimestamp = function () {
367
397
  if (jsonObject['startTimestamp'] === null) {
@@ -390,6 +420,20 @@ var SampleModel = /*#__PURE__*/function (_BaseModel) {
390
420
  }();
391
421
  }
392
422
 
423
+ if ('unloadedTimestamp' in jsonObject) {
424
+ model.unloadedTimestamp = function () {
425
+ if (jsonObject['unloadedTimestamp'] === null) {
426
+ return null;
427
+ }
428
+
429
+ if (typeof jsonObject['unloadedTimestamp'] !== 'string') {
430
+ return new Date(String(jsonObject['unloadedTimestamp']));
431
+ }
432
+
433
+ return new Date(jsonObject['unloadedTimestamp']);
434
+ }();
435
+ }
436
+
393
437
  if ('publishTimestamp' in jsonObject) {
394
438
  model.publishTimestamp = function () {
395
439
  if (jsonObject['publishTimestamp'] === null) {
@@ -11,6 +11,8 @@ var _FruitProfileModel = _interopRequireDefault(require("./FruitProfileModel"));
11
11
 
12
12
  var _LabModel = _interopRequireDefault(require("./LabModel"));
13
13
 
14
+ var _ProbeCalibrationModel = _interopRequireDefault(require("./ProbeCalibrationModel"));
15
+
14
16
  var _RackModel = _interopRequireDefault(require("./RackModel"));
15
17
 
16
18
  var _RackPositionModel = _interopRequireDefault(require("./RackPositionModel"));
@@ -36,6 +38,7 @@ var Site = {
36
38
  DehydratorModel: _DehydratorModel.default,
37
39
  FruitProfileModel: _FruitProfileModel.default,
38
40
  LabModel: _LabModel.default,
41
+ ProbeCalibrationModel: _ProbeCalibrationModel.default,
39
42
  RackModel: _RackModel.default,
40
43
  RackPositionModel: _RackPositionModel.default,
41
44
  SampleFailureReasonModel: _SampleFailureReasonModel.default,
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- var version = '2.4.1';
8
+ var version = '2.4.2';
9
9
  exports.version = version;