@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.
@@ -1054,8 +1054,8 @@ 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 'System'
1058
- * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
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
1059
  * @property {?string} [publishUserId] ID of the User who Published this Sample
1060
1060
  * @property {?string} [publishUserName] Name of the User who Published this Sample
1061
1061
  * @property {string} [fruitProfileId] The Fruit Profile for this Sample
@@ -1068,10 +1068,14 @@ export default SampleController;
1068
1068
  * @property {Date} [createdTimestampEnd] Filter by the Timestamp when Samples were Created. Results Less than or Equal to Timestamp
1069
1069
  * @property {Date} [scheduledTimestampBegin] Filter by the Timestamp when Samples were Scheduled to Begin. Results Greater than or Equal to Timestamp
1070
1070
  * @property {Date} [scheduledTimestampEnd] Filter by the Timestamp when Samples were Scheduled to Begin. Results Less than or Equal to Timestamp
1071
+ * @property {Date} [loadedTimestampBegin] Filter by the Timestamp when Samples were Loaded. Results Greater than or Equal to Timestamp
1072
+ * @property {Date} [loadedTimestampEnd] Filter by the Timestamp when Samples were Loaded. Results Less than or Equal to Timestamp
1071
1073
  * @property {Date} [startTimestampBegin] Filter by the Timestamp when Samples were Started. Results Greater than or Equal to Timestamp
1072
1074
  * @property {Date} [startTimestampEnd] Filter by the Timestamp when Samples were Started. Results Less than or Equal to Timestamp
1073
1075
  * @property {Date} [finishTimestampBegin] Filter by the Timestamp when Samples were Finished. Results Greater than or Equal to Timestamp
1074
1076
  * @property {Date} [finishTimestampEnd] Filter by the Timestamp when Samples were Finished. Results Less than or Equal to Timestamp
1077
+ * @property {Date} [unloadedTimestampBegin] Filter by the Timestamp when Samples were Unloaded. Results Greater than or Equal to Timestamp
1078
+ * @property {Date} [unloadedTimestampEnd] Filter by the Timestamp when Samples were Unloaded. Results Less than or Equal to Timestamp
1075
1079
  * @property {Date} [publishTimestampBegin] Filter by the Timestamp when Samples were Published. Results Greater than or Equal to Timestamp
1076
1080
  * @property {Date} [publishTimestampEnd] Filter by the Timestamp when Samples were Published. Results Less than or Equal to Timestamp
1077
1081
  * @property {Date} [updateTimestampBegin] Filter by the Timestamp when Samples were last Updated. Results Greater than or Equal to Timestamp
@@ -1087,11 +1091,13 @@ export default SampleController;
1087
1091
  * @property {string} [sampleNumber] The Numeric Sample Number
1088
1092
  * @property {Date} [createdTimestamp] When this Sample was Created
1089
1093
  * @property {string} createdSource The Source that Created this Sample
1090
- * @property {?string} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'System'
1091
- * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
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
1096
  * @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
1097
+ * @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
1093
1098
  * @property {?Date} [startTimestamp] When this Sample was Started
1094
1099
  * @property {?Date} [finishTimestamp] When this Sample was Finished
1100
+ * @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
1095
1101
  * @property {?Date} [publishTimestamp] When this Sample was Published
1096
1102
  * @property {?string} [publishUserId] ID of the User who Published this Sample
1097
1103
  * @property {?string} [publishUserName] Name of the User who Published this Sample
@@ -1111,11 +1117,13 @@ export default SampleController;
1111
1117
  * @property {string} [labId] The Lab ID this Sample is associated with
1112
1118
  * @property {Date} [createdTimestamp] When this Sample was Created
1113
1119
  * @property {string} [createdSource] The Source that Created this Sample
1114
- * @property {?string} [createdUserId] ID of the User who Created this Sample. Only applies if the `createdSource` is 'System'
1115
- * @property {?string} [createdUserName] Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
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'
1116
1122
  * @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
1123
+ * @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
1117
1124
  * @property {?Date} [startTimestamp] When this Sample was Started
1118
1125
  * @property {?Date} [finishTimestamp] When this Sample was Finished
1126
+ * @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
1119
1127
  * @property {?Date} [publishTimestamp] When this Sample was Published
1120
1128
  * @property {?string} [publishUserId] ID of the User who Published this Sample
1121
1129
  * @property {?string} [publishUserName] Name of the User who Published this Sample
@@ -155,7 +155,7 @@ export default SampleFailureReasonController;
155
155
  * The Create Data for a Sample Failure Reason
156
156
  *
157
157
  * @typedef {Object} SampleFailureReasonController.CreateData
158
- * @property {string} [name] The Sample Failure Reason Name
158
+ * @property {string} name The Sample Failure Reason Name
159
159
  * @property {string} description The Sample Failure Reason Description
160
160
  * @memberof Controllers.Lab.Site
161
161
  */
@@ -164,6 +164,7 @@ export default SampleFailureReasonController;
164
164
  * The Update Data for a Sample Failure Reason
165
165
  *
166
166
  * @typedef {Object} SampleFailureReasonController.UpdateData
167
+ * @property {string} [name] The Sample Failure Reason Name
167
168
  * @property {string} [description] The Sample Failure Reason Description
168
169
  * @memberof Controllers.Lab.Site
169
170
  */
@@ -10,6 +10,7 @@
10
10
  import DehydratorController from './DehydratorController';
11
11
  import FruitProfileController from './FruitProfileController';
12
12
  import LabController from './LabController';
13
+ import ProbeCalibrationController from './ProbeCalibrationController';
13
14
  import RackController from './RackController';
14
15
  import RackPositionController from './RackPositionController';
15
16
  import SampleController from './SampleController';
@@ -20,6 +21,7 @@ const Site = {
20
21
  DehydratorController,
21
22
  FruitProfileController,
22
23
  LabController,
24
+ ProbeCalibrationController,
23
25
  RackController,
24
26
  RackPositionController,
25
27
  SampleController,
@@ -0,0 +1,290 @@
1
+ /**
2
+ * File Auto-Generated by the RICADO Gen 4 PHP API Project
3
+ *
4
+ * Do Not Edit this File Manually!
5
+ */
6
+
7
+ import BaseModel from '../../../Models/BaseModel';
8
+
9
+ /**
10
+ * Model Class for a Probe Calibration
11
+ *
12
+ * @class
13
+ * @hideconstructor
14
+ * @extends BaseModel
15
+ */
16
+ class ProbeCalibrationModel extends BaseModel
17
+ {
18
+ /**
19
+ * ProbeCalibrationModel Constructor
20
+ *
21
+ * @protected
22
+ * @param {number} siteId The Site ID associated with this Probe Calibration
23
+ */
24
+ constructor(siteId)
25
+ {
26
+ super();
27
+
28
+ /**
29
+ * The Probe Calibration ID
30
+ *
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ this.id = "";
35
+
36
+ /**
37
+ * The Rack Position ID this Probe Calibration is associated with
38
+ *
39
+ * @type {string}
40
+ * @public
41
+ */
42
+ this.rackPositionId = "";
43
+
44
+ /**
45
+ * When this Probe Calibration was Created
46
+ *
47
+ * @type {Date}
48
+ * @public
49
+ */
50
+ this.createdTimestamp = new Date();
51
+
52
+ /**
53
+ * ID of the User who Completed this Probe Calibration
54
+ *
55
+ * @type {string}
56
+ * @public
57
+ */
58
+ this.userId = "";
59
+
60
+ /**
61
+ * Name of the User who Completed this Probe Calibration
62
+ *
63
+ * @type {string}
64
+ * @public
65
+ */
66
+ this.userName = "";
67
+
68
+ /**
69
+ * The Calibration Offset prior to this Probe Calibration being Created
70
+ *
71
+ * @type {number}
72
+ * @public
73
+ */
74
+ this.preCalibrationOffset = 0;
75
+
76
+ /**
77
+ * The Calibration Offset after this Probe Calibration was Created
78
+ *
79
+ * @type {number}
80
+ * @public
81
+ */
82
+ this.postCalibrationOffset = 0;
83
+
84
+ /**
85
+ * The Temperature Probe reading prior to this Probe Calibration being Created
86
+ *
87
+ * @type {number}
88
+ * @public
89
+ */
90
+ this.preCalibrationTemperature = 0;
91
+
92
+ /**
93
+ * The Temperature Probe reading after this Probe Calibration was Created
94
+ *
95
+ * @type {number}
96
+ * @public
97
+ */
98
+ this.postCalibrationTemperature = 0;
99
+
100
+ /**
101
+ * Whether the Probe Calibration has been deleted
102
+ *
103
+ * @type {boolean}
104
+ * @public
105
+ */
106
+ this.deleted = false;
107
+
108
+ /**
109
+ * When the Probe Calibration was last updated
110
+ *
111
+ * @type {Date}
112
+ * @public
113
+ */
114
+ this.updateTimestamp = new Date();
115
+
116
+ /**
117
+ * The Site ID associated with this Probe Calibration
118
+ *
119
+ * @type {number}
120
+ * @public
121
+ */
122
+ this.siteId = siteId;
123
+ }
124
+
125
+ /**
126
+ * Create a new **ProbeCalibrationModel** from a JSON Object or JSON String
127
+ *
128
+ * @static
129
+ * @public
130
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
131
+ * @param {number} siteId The Site ID associated with this Probe Calibration
132
+ * @return {ProbeCalibrationModel}
133
+ */
134
+ static fromJSON(json, siteId)
135
+ {
136
+ let model = new ProbeCalibrationModel(siteId);
137
+
138
+ /**
139
+ * The JSON Object
140
+ *
141
+ * @type {Object<string, any>}
142
+ */
143
+ let jsonObject = {};
144
+
145
+ if(typeof json === 'string')
146
+ {
147
+ jsonObject = JSON.parse(json);
148
+ }
149
+ else if(typeof json === 'object')
150
+ {
151
+ jsonObject = json;
152
+ }
153
+
154
+ if('id' in jsonObject)
155
+ {
156
+ model.id = (function(){
157
+ if(typeof jsonObject['id'] !== 'string')
158
+ {
159
+ return String(jsonObject['id']);
160
+ }
161
+
162
+ return jsonObject['id'];
163
+ }());
164
+ }
165
+
166
+ if('rackPositionId' in jsonObject)
167
+ {
168
+ model.rackPositionId = (function(){
169
+ if(typeof jsonObject['rackPositionId'] !== 'string')
170
+ {
171
+ return String(jsonObject['rackPositionId']);
172
+ }
173
+
174
+ return jsonObject['rackPositionId'];
175
+ }());
176
+ }
177
+
178
+ if('createdTimestamp' in jsonObject)
179
+ {
180
+ model.createdTimestamp = (function(){
181
+ if(typeof jsonObject['createdTimestamp'] !== 'string')
182
+ {
183
+ return new Date(String(jsonObject['createdTimestamp']));
184
+ }
185
+
186
+ return new Date(jsonObject['createdTimestamp']);
187
+ }());
188
+ }
189
+
190
+ if('userId' in jsonObject)
191
+ {
192
+ model.userId = (function(){
193
+ if(typeof jsonObject['userId'] !== 'string')
194
+ {
195
+ return String(jsonObject['userId']);
196
+ }
197
+
198
+ return jsonObject['userId'];
199
+ }());
200
+ }
201
+
202
+ if('userName' in jsonObject)
203
+ {
204
+ model.userName = (function(){
205
+ if(typeof jsonObject['userName'] !== 'string')
206
+ {
207
+ return String(jsonObject['userName']);
208
+ }
209
+
210
+ return jsonObject['userName'];
211
+ }());
212
+ }
213
+
214
+ if('preCalibrationOffset' in jsonObject)
215
+ {
216
+ model.preCalibrationOffset = (function(){
217
+ if(typeof jsonObject['preCalibrationOffset'] !== 'number')
218
+ {
219
+ return Number(jsonObject['preCalibrationOffset']);
220
+ }
221
+
222
+ return jsonObject['preCalibrationOffset'];
223
+ }());
224
+ }
225
+
226
+ if('postCalibrationOffset' in jsonObject)
227
+ {
228
+ model.postCalibrationOffset = (function(){
229
+ if(typeof jsonObject['postCalibrationOffset'] !== 'number')
230
+ {
231
+ return Number(jsonObject['postCalibrationOffset']);
232
+ }
233
+
234
+ return jsonObject['postCalibrationOffset'];
235
+ }());
236
+ }
237
+
238
+ if('preCalibrationTemperature' in jsonObject)
239
+ {
240
+ model.preCalibrationTemperature = (function(){
241
+ if(typeof jsonObject['preCalibrationTemperature'] !== 'number')
242
+ {
243
+ return Number(jsonObject['preCalibrationTemperature']);
244
+ }
245
+
246
+ return jsonObject['preCalibrationTemperature'];
247
+ }());
248
+ }
249
+
250
+ if('postCalibrationTemperature' in jsonObject)
251
+ {
252
+ model.postCalibrationTemperature = (function(){
253
+ if(typeof jsonObject['postCalibrationTemperature'] !== 'number')
254
+ {
255
+ return Number(jsonObject['postCalibrationTemperature']);
256
+ }
257
+
258
+ return jsonObject['postCalibrationTemperature'];
259
+ }());
260
+ }
261
+
262
+ if('deleted' in jsonObject)
263
+ {
264
+ model.deleted = (function(){
265
+ if(typeof jsonObject['deleted'] !== 'boolean')
266
+ {
267
+ return Boolean(jsonObject['deleted']);
268
+ }
269
+
270
+ return jsonObject['deleted'];
271
+ }());
272
+ }
273
+
274
+ if('updateTimestamp' in jsonObject)
275
+ {
276
+ model.updateTimestamp = (function(){
277
+ if(typeof jsonObject['updateTimestamp'] !== 'string')
278
+ {
279
+ return new Date(String(jsonObject['updateTimestamp']));
280
+ }
281
+
282
+ return new Date(jsonObject['updateTimestamp']);
283
+ }());
284
+ }
285
+
286
+ return model;
287
+ }
288
+ }
289
+
290
+ export default ProbeCalibrationModel;
@@ -66,7 +66,7 @@ class SampleModel extends BaseModel
66
66
  this.createdSource = "";
67
67
 
68
68
  /**
69
- * ID of the User who Created this Sample. Only applies if the `createdSource` is 'System'
69
+ * ID of the User who Created this Sample. Only applies if the `createdSource` is 'User'
70
70
  *
71
71
  * @type {?string}
72
72
  * @public
@@ -74,7 +74,7 @@ class SampleModel extends BaseModel
74
74
  this.createdUserId = null;
75
75
 
76
76
  /**
77
- * Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
77
+ * Name of the User who Created this Sample. Only applies if the `createdSource` is 'User'
78
78
  *
79
79
  * @type {?string}
80
80
  * @public
@@ -89,6 +89,14 @@ class SampleModel extends BaseModel
89
89
  */
90
90
  this.scheduledTimestamp = null;
91
91
 
92
+ /**
93
+ * When this Sample was Loaded into the Dehydrator
94
+ *
95
+ * @type {?Date}
96
+ * @public
97
+ */
98
+ this.loadedTimestamp = null;
99
+
92
100
  /**
93
101
  * When this Sample was Started
94
102
  *
@@ -105,6 +113,14 @@ class SampleModel extends BaseModel
105
113
  */
106
114
  this.finishTimestamp = null;
107
115
 
116
+ /**
117
+ * When this Sample was Unloaded from the Dehydrator
118
+ *
119
+ * @type {?Date}
120
+ * @public
121
+ */
122
+ this.unloadedTimestamp = null;
123
+
108
124
  /**
109
125
  * When this Sample was Published
110
126
  *
@@ -350,6 +366,23 @@ class SampleModel extends BaseModel
350
366
  }());
351
367
  }
352
368
 
369
+ if('loadedTimestamp' in jsonObject)
370
+ {
371
+ model.loadedTimestamp = (function(){
372
+ if(jsonObject['loadedTimestamp'] === null)
373
+ {
374
+ return null;
375
+ }
376
+
377
+ if(typeof jsonObject['loadedTimestamp'] !== 'string')
378
+ {
379
+ return new Date(String(jsonObject['loadedTimestamp']));
380
+ }
381
+
382
+ return new Date(jsonObject['loadedTimestamp']);
383
+ }());
384
+ }
385
+
353
386
  if('startTimestamp' in jsonObject)
354
387
  {
355
388
  model.startTimestamp = (function(){
@@ -384,6 +417,23 @@ class SampleModel extends BaseModel
384
417
  }());
385
418
  }
386
419
 
420
+ if('unloadedTimestamp' in jsonObject)
421
+ {
422
+ model.unloadedTimestamp = (function(){
423
+ if(jsonObject['unloadedTimestamp'] === null)
424
+ {
425
+ return null;
426
+ }
427
+
428
+ if(typeof jsonObject['unloadedTimestamp'] !== 'string')
429
+ {
430
+ return new Date(String(jsonObject['unloadedTimestamp']));
431
+ }
432
+
433
+ return new Date(jsonObject['unloadedTimestamp']);
434
+ }());
435
+ }
436
+
387
437
  if('publishTimestamp' in jsonObject)
388
438
  {
389
439
  model.publishTimestamp = (function(){
@@ -10,6 +10,7 @@
10
10
  import DehydratorModel from './DehydratorModel';
11
11
  import FruitProfileModel from './FruitProfileModel';
12
12
  import LabModel from './LabModel';
13
+ import ProbeCalibrationModel from './ProbeCalibrationModel';
13
14
  import RackModel from './RackModel';
14
15
  import RackPositionModel from './RackPositionModel';
15
16
  import SampleFailureReasonModel from './SampleFailureReasonModel';
@@ -20,6 +21,7 @@ const Site = {
20
21
  DehydratorModel,
21
22
  FruitProfileModel,
22
23
  LabModel,
24
+ ProbeCalibrationModel,
23
25
  RackModel,
24
26
  RackPositionModel,
25
27
  SampleFailureReasonModel,
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '2.4.1';
2
+ export const version = '2.4.2';