Skip to content

Commit 2a71f30

Browse files
[Review] new sample properties (#247)
* new sample properties * update api client with new fruitprofile properties
1 parent a532cca commit 2a71f30

File tree

5 files changed

+285
-1
lines changed

5 files changed

+285
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ricado/api-client",
3-
"version": "2.5.16",
3+
"version": "2.5.18",
44
"description": "RICADO Gen 4 API Client Library for NodeJS and Browsers",
55
"author": {
66
"name": "Ash Neilson"

src/Controllers/Lab/Site/FruitProfileController.js

+16
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ export default FruitProfileController;
164164
* @property {number} maximumTotalDuration The Maximum Duration (in seconds) that a Sample can be Dehydrated for before it is Considered Non-Compliant
165165
* @property {number} minimumTargetTemperature The Minimum Target Temperature for a Sample to be Compliant
166166
* @property {number} maximumTargetTemperature The Maximum Target Temperature for a Sample to be Compliant
167+
* @property {number} warmUpStartExpectedTemperature The Warm-Up Temperature for starting the Warm Up alerts
168+
* @property {number} warmUpStartExpectedRateOfChange The Warm-Up Start Expected Rate of Change
169+
* @property {number} warmUpStageTwoExpectedTemperature The Warm-Up Stage Two Expected Temperature
170+
* @property {number} warmUpStageTwoExpectedRateOfChange The Warm-Up Stage Two Expected Rate of Change
171+
* @property {number} warmUpStageThreeExpectedTemperature The Warm-Up Stage Three Expected Temperature
172+
* @property {number} warmUpStageThreeExpectedRateOfChange The Warm-Up Stage Three Expected Rate of Change
173+
* @property {number} warmUpEndExpectedTemperature The Warm-Up End Expected Temperature
174+
* @property {number} warmUpEndExpectedRateOfChange The Warm-Up End Expected Rate of Change
167175
* @memberof Controllers.Lab.Site
168176
*/
169177

@@ -180,5 +188,13 @@ export default FruitProfileController;
180188
* @property {number} [maximumTotalDuration] The Maximum Duration (in seconds) that a Sample can be Dehydrated for before it is Considered Non-Compliant
181189
* @property {number} [minimumTargetTemperature] The Minimum Target Temperature for a Sample to be Compliant
182190
* @property {number} [maximumTargetTemperature] The Maximum Target Temperature for a Sample to be Compliant
191+
* @property {number} [warmUpStartExpectedTemperature] The Warm-Up Temperature for starting the Warm Up alerts
192+
* @property {number} [warmUpStartExpectedRateOfChange] The Warm-Up Start Expected Rate of Change
193+
* @property {number} [warmUpStageTwoExpectedTemperature] The Warm-Up Stage Two Expected Temperature
194+
* @property {number} [warmUpStageTwoExpectedRateOfChange] The Warm-Up Stage Two Expected Rate of Change
195+
* @property {number} [warmUpStageThreeExpectedTemperature] The Warm-Up Stage Three Expected Temperature
196+
* @property {number} [warmUpStageThreeExpectedRateOfChange] The Warm-Up Stage Three Expected Rate of Change
197+
* @property {number} [warmUpEndExpectedTemperature] The Warm-Up End Expected Temperature
198+
* @property {number} [warmUpEndExpectedRateOfChange] The Warm-Up End Expected Rate of Change
183199
* @memberof Controllers.Lab.Site
184200
*/

src/Controllers/Lab/Site/SampleController.js

+8
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,7 @@ export default SampleController;
10911091
* @property {string} createdSource The Source that Created this Sample
10921092
* @property {?string} [createdUserName] Name of the User who Created this Sample
10931093
* @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
1094+
* @property {?Date} [scheduleReceivedTimestamp] Optional When the Schedule was received from Inspect
10941095
* @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
10951096
* @property {?Date} [startTimestamp] When this Sample was Started
10961097
* @property {?Date} [finishTimestamp] When this Sample was Finished
@@ -1102,6 +1103,9 @@ export default SampleController;
11021103
* @property {string} rackPositionId The Rack Position used for this Sample
11031104
* @property {string} dehydratorId The Dehydrator used for this Sample
11041105
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
1106+
* @property {?string} [blindedSampleID] Optional the BlindedSampleID Reference defined in RadfordsInspect
1107+
* @property {?string} [shortDescription] Optional the Sample Short Description defined in RadfordsInspect
1108+
* @property {?string} [sampleDescription] Optional the Sample Description defined in RadfordsInspect
11051109
* @memberof Controllers.Lab.Site
11061110
*/
11071111

@@ -1114,6 +1118,7 @@ export default SampleController;
11141118
* @property {string} [createdSource] The Source that Created this Sample
11151119
* @property {?string} [createdUserName] Name of the User who Created this Sample
11161120
* @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
1121+
* @property {?Date} [scheduleReceivedTimestamp] Optional When the Schedule was received from Inspect
11171122
* @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
11181123
* @property {?Date} [startTimestamp] When this Sample was Started
11191124
* @property {?Date} [finishTimestamp] When this Sample was Finished
@@ -1125,6 +1130,9 @@ export default SampleController;
11251130
* @property {string} [rackPositionId] The Rack Position used for this Sample
11261131
* @property {string} [dehydratorId] The Dehydrator used for this Sample
11271132
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
1133+
* @property {?string} [blindedSampleID] Optional the BlindedSampleID Reference defined in RadfordsInspect
1134+
* @property {?string} [shortDescription] Optional the Sample Short Description defined in RadfordsInspect
1135+
* @property {?string} [sampleDescription] Optional the Sample Description defined in RadfordsInspect
11281136
* @memberof Controllers.Lab.Site
11291137
*/
11301138

src/Models/Lab/Site/FruitProfileModel.js

+160
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,70 @@ class FruitProfileModel extends BaseModel
105105
*/
106106
this.maximumTargetTemperature = 0;
107107

108+
/**
109+
* The Warm-Up Temperature for starting the Warm Up alerts
110+
*
111+
* @type {number}
112+
* @public
113+
*/
114+
this.warmUpStartExpectedTemperature = 0;
115+
116+
/**
117+
* The Warm-Up Start Expected Rate of Change
118+
*
119+
* @type {number}
120+
* @public
121+
*/
122+
this.warmUpStartExpectedRateOfChange = 0;
123+
124+
/**
125+
* The Warm-Up Stage Two Expected Temperature
126+
*
127+
* @type {number}
128+
* @public
129+
*/
130+
this.warmUpStageTwoExpectedTemperature = 0;
131+
132+
/**
133+
* The Warm-Up Stage Two Expected Rate of Change
134+
*
135+
* @type {number}
136+
* @public
137+
*/
138+
this.warmUpStageTwoExpectedRateOfChange = 0;
139+
140+
/**
141+
* The Warm-Up Stage Three Expected Temperature
142+
*
143+
* @type {number}
144+
* @public
145+
*/
146+
this.warmUpStageThreeExpectedTemperature = 0;
147+
148+
/**
149+
* The Warm-Up Stage Three Expected Rate of Change
150+
*
151+
* @type {number}
152+
* @public
153+
*/
154+
this.warmUpStageThreeExpectedRateOfChange = 0;
155+
156+
/**
157+
* The Warm-Up End Expected Temperature
158+
*
159+
* @type {number}
160+
* @public
161+
*/
162+
this.warmUpEndExpectedTemperature = 0;
163+
164+
/**
165+
* The Warm-Up End Expected Rate of Change
166+
*
167+
* @type {number}
168+
* @public
169+
*/
170+
this.warmUpEndExpectedRateOfChange = 0;
171+
108172
/**
109173
* Whether the Fruit Profile has been deleted
110174
*
@@ -279,6 +343,102 @@ class FruitProfileModel extends BaseModel
279343
}());
280344
}
281345

346+
if('warmUpStartExpectedTemperature' in jsonObject)
347+
{
348+
model.warmUpStartExpectedTemperature = (function(){
349+
if(typeof jsonObject['warmUpStartExpectedTemperature'] !== 'number')
350+
{
351+
return Number(jsonObject['warmUpStartExpectedTemperature']);
352+
}
353+
354+
return jsonObject['warmUpStartExpectedTemperature'];
355+
}());
356+
}
357+
358+
if('warmUpStartExpectedRateOfChange' in jsonObject)
359+
{
360+
model.warmUpStartExpectedRateOfChange = (function(){
361+
if(typeof jsonObject['warmUpStartExpectedRateOfChange'] !== 'number')
362+
{
363+
return Number(jsonObject['warmUpStartExpectedRateOfChange']);
364+
}
365+
366+
return jsonObject['warmUpStartExpectedRateOfChange'];
367+
}());
368+
}
369+
370+
if('warmUpStageTwoExpectedTemperature' in jsonObject)
371+
{
372+
model.warmUpStageTwoExpectedTemperature = (function(){
373+
if(typeof jsonObject['warmUpStageTwoExpectedTemperature'] !== 'number')
374+
{
375+
return Number(jsonObject['warmUpStageTwoExpectedTemperature']);
376+
}
377+
378+
return jsonObject['warmUpStageTwoExpectedTemperature'];
379+
}());
380+
}
381+
382+
if('warmUpStageTwoExpectedRateOfChange' in jsonObject)
383+
{
384+
model.warmUpStageTwoExpectedRateOfChange = (function(){
385+
if(typeof jsonObject['warmUpStageTwoExpectedRateOfChange'] !== 'number')
386+
{
387+
return Number(jsonObject['warmUpStageTwoExpectedRateOfChange']);
388+
}
389+
390+
return jsonObject['warmUpStageTwoExpectedRateOfChange'];
391+
}());
392+
}
393+
394+
if('warmUpStageThreeExpectedTemperature' in jsonObject)
395+
{
396+
model.warmUpStageThreeExpectedTemperature = (function(){
397+
if(typeof jsonObject['warmUpStageThreeExpectedTemperature'] !== 'number')
398+
{
399+
return Number(jsonObject['warmUpStageThreeExpectedTemperature']);
400+
}
401+
402+
return jsonObject['warmUpStageThreeExpectedTemperature'];
403+
}());
404+
}
405+
406+
if('warmUpStageThreeExpectedRateOfChange' in jsonObject)
407+
{
408+
model.warmUpStageThreeExpectedRateOfChange = (function(){
409+
if(typeof jsonObject['warmUpStageThreeExpectedRateOfChange'] !== 'number')
410+
{
411+
return Number(jsonObject['warmUpStageThreeExpectedRateOfChange']);
412+
}
413+
414+
return jsonObject['warmUpStageThreeExpectedRateOfChange'];
415+
}());
416+
}
417+
418+
if('warmUpEndExpectedTemperature' in jsonObject)
419+
{
420+
model.warmUpEndExpectedTemperature = (function(){
421+
if(typeof jsonObject['warmUpEndExpectedTemperature'] !== 'number')
422+
{
423+
return Number(jsonObject['warmUpEndExpectedTemperature']);
424+
}
425+
426+
return jsonObject['warmUpEndExpectedTemperature'];
427+
}());
428+
}
429+
430+
if('warmUpEndExpectedRateOfChange' in jsonObject)
431+
{
432+
model.warmUpEndExpectedRateOfChange = (function(){
433+
if(typeof jsonObject['warmUpEndExpectedRateOfChange'] !== 'number')
434+
{
435+
return Number(jsonObject['warmUpEndExpectedRateOfChange']);
436+
}
437+
438+
return jsonObject['warmUpEndExpectedRateOfChange'];
439+
}());
440+
}
441+
282442
if('deleted' in jsonObject)
283443
{
284444
model.deleted = (function(){

src/Models/Lab/Site/SampleModel.js

+100
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ class SampleModel extends BaseModel
8181
*/
8282
this.scheduledTimestamp = null;
8383

84+
/**
85+
* Optional When the Schedule was received from Inspect
86+
*
87+
* @type {?Date}
88+
* @public
89+
*/
90+
this.scheduleReceivedTimestamp = null;
91+
8492
/**
8593
* When this Sample was Loaded into the Dehydrator
8694
*
@@ -169,6 +177,30 @@ class SampleModel extends BaseModel
169177
*/
170178
this.resultId = null;
171179

180+
/**
181+
* Optional the BlindedSampleID Reference defined in RadfordsInspect
182+
*
183+
* @type {?string}
184+
* @public
185+
*/
186+
this.blindedSampleID = null;
187+
188+
/**
189+
* Optional the Sample Short Description defined in RadfordsInspect
190+
*
191+
* @type {?string}
192+
* @public
193+
*/
194+
this.shortDescription = null;
195+
196+
/**
197+
* Optional the Sample Description defined in RadfordsInspect
198+
*
199+
* @type {?string}
200+
* @public
201+
*/
202+
this.sampleDescription = null;
203+
172204
/**
173205
* The Status of this Sample
174206
*
@@ -325,6 +357,23 @@ class SampleModel extends BaseModel
325357
}());
326358
}
327359

360+
if('scheduleReceivedTimestamp' in jsonObject)
361+
{
362+
model.scheduleReceivedTimestamp = (function(){
363+
if(jsonObject['scheduleReceivedTimestamp'] === null)
364+
{
365+
return null;
366+
}
367+
368+
if(typeof jsonObject['scheduleReceivedTimestamp'] !== 'string')
369+
{
370+
return new Date(String(jsonObject['scheduleReceivedTimestamp']));
371+
}
372+
373+
return new Date(jsonObject['scheduleReceivedTimestamp']);
374+
}());
375+
}
376+
328377
if('loadedTimestamp' in jsonObject)
329378
{
330379
model.loadedTimestamp = (function(){
@@ -497,6 +546,57 @@ class SampleModel extends BaseModel
497546
}());
498547
}
499548

549+
if('blindedSampleID' in jsonObject)
550+
{
551+
model.blindedSampleID = (function(){
552+
if(jsonObject['blindedSampleID'] === null)
553+
{
554+
return null;
555+
}
556+
557+
if(typeof jsonObject['blindedSampleID'] !== 'string')
558+
{
559+
return String(jsonObject['blindedSampleID']);
560+
}
561+
562+
return jsonObject['blindedSampleID'];
563+
}());
564+
}
565+
566+
if('shortDescription' in jsonObject)
567+
{
568+
model.shortDescription = (function(){
569+
if(jsonObject['shortDescription'] === null)
570+
{
571+
return null;
572+
}
573+
574+
if(typeof jsonObject['shortDescription'] !== 'string')
575+
{
576+
return String(jsonObject['shortDescription']);
577+
}
578+
579+
return jsonObject['shortDescription'];
580+
}());
581+
}
582+
583+
if('sampleDescription' in jsonObject)
584+
{
585+
model.sampleDescription = (function(){
586+
if(jsonObject['sampleDescription'] === null)
587+
{
588+
return null;
589+
}
590+
591+
if(typeof jsonObject['sampleDescription'] !== 'string')
592+
{
593+
return String(jsonObject['sampleDescription']);
594+
}
595+
596+
return jsonObject['sampleDescription'];
597+
}());
598+
}
599+
500600
if('status' in jsonObject)
501601
{
502602
model.status = (function(){

0 commit comments

Comments
 (0)