@ricado/api-client 2.3.28 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Lab/Site/DehydratorController.js +198 -0
  3. package/lib/Controllers/Lab/Site/FruitProfileController.js +204 -0
  4. package/lib/Controllers/Lab/Site/LabController.js +222 -0
  5. package/lib/Controllers/Lab/Site/RackController.js +222 -0
  6. package/lib/Controllers/Lab/Site/RackPositionController.js +207 -0
  7. package/lib/Controllers/Lab/Site/SampleController.js +927 -0
  8. package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +192 -0
  9. package/lib/Controllers/Lab/Site/SampleResultController.js +905 -0
  10. package/lib/Controllers/Lab/Site/index.js +46 -0
  11. package/lib/Controllers/Lab/index.js +25 -0
  12. package/lib/Controllers/Packhouse/Site/ShiftController.js +304 -0
  13. package/lib/Controllers/index.js +9 -6
  14. package/lib/Models/Lab/Site/DehydratorModel.js +250 -0
  15. package/lib/Models/Lab/Site/FruitProfileModel.js +303 -0
  16. package/lib/Models/Lab/Site/LabModel.js +365 -0
  17. package/lib/Models/Lab/Site/RackModel.js +358 -0
  18. package/lib/Models/Lab/Site/RackPositionModel.js +525 -0
  19. package/lib/Models/Lab/Site/SampleFailureReasonModel.js +195 -0
  20. package/lib/Models/Lab/Site/SampleModel.js +545 -0
  21. package/lib/Models/Lab/Site/SampleResultModel.js +545 -0
  22. package/lib/Models/Lab/Site/index.js +46 -0
  23. package/lib/Models/Lab/index.js +25 -0
  24. package/lib/Models/index.js +7 -4
  25. package/lib/PackageVersion.js +1 -1
  26. package/lib/index.d.ts +10348 -7537
  27. package/package.json +1 -1
  28. package/src/Controllers/Lab/Site/DehydratorController.js +175 -0
  29. package/src/Controllers/Lab/Site/FruitProfileController.js +181 -0
  30. package/src/Controllers/Lab/Site/LabController.js +199 -0
  31. package/src/Controllers/Lab/Site/RackController.js +199 -0
  32. package/src/Controllers/Lab/Site/RackPositionController.js +184 -0
  33. package/src/Controllers/Lab/Site/SampleController.js +1067 -0
  34. package/src/Controllers/Lab/Site/SampleFailureReasonController.js +169 -0
  35. package/src/Controllers/Lab/Site/SampleResultController.js +1036 -0
  36. package/src/Controllers/Lab/Site/index.js +30 -0
  37. package/src/Controllers/Lab/index.js +16 -0
  38. package/src/Controllers/Packhouse/Site/ShiftController.js +367 -0
  39. package/src/Controllers/index.js +2 -0
  40. package/src/Models/Lab/Site/DehydratorModel.js +234 -0
  41. package/src/Models/Lab/Site/FruitProfileModel.js +290 -0
  42. package/src/Models/Lab/Site/LabModel.js +372 -0
  43. package/src/Models/Lab/Site/RackModel.js +358 -0
  44. package/src/Models/Lab/Site/RackPositionModel.js +600 -0
  45. package/src/Models/Lab/Site/SampleFailureReasonModel.js +170 -0
  46. package/src/Models/Lab/Site/SampleModel.js +565 -0
  47. package/src/Models/Lab/Site/SampleResultModel.js +565 -0
  48. package/src/Models/Lab/Site/index.js +30 -0
  49. package/src/Models/Lab/index.js +16 -0
  50. package/src/Models/index.js +2 -0
  51. package/src/PackageVersion.js +1 -1
@@ -0,0 +1,30 @@
1
+ /**
2
+ * File Auto-Generated by the RICADO Gen 4 PHP API Project
3
+ *
4
+ * Do Not Edit this File Manually!
5
+ */
6
+
7
+ /**
8
+ * @namespace Controllers.Lab.Site
9
+ */
10
+ import DehydratorController from './DehydratorController';
11
+ import FruitProfileController from './FruitProfileController';
12
+ import LabController from './LabController';
13
+ import RackController from './RackController';
14
+ import RackPositionController from './RackPositionController';
15
+ import SampleController from './SampleController';
16
+ import SampleFailureReasonController from './SampleFailureReasonController';
17
+ import SampleResultController from './SampleResultController';
18
+
19
+ const Site = {
20
+ DehydratorController,
21
+ FruitProfileController,
22
+ LabController,
23
+ RackController,
24
+ RackPositionController,
25
+ SampleController,
26
+ SampleFailureReasonController,
27
+ SampleResultController,
28
+ };
29
+
30
+ export default Site;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * File Auto-Generated by the RICADO Gen 4 PHP API Project
3
+ *
4
+ * Do Not Edit this File Manually!
5
+ */
6
+
7
+ /**
8
+ * @namespace Controllers.Lab
9
+ */
10
+ import Site from './Site/index';
11
+
12
+ const Lab = {
13
+ Site,
14
+ };
15
+
16
+ export default Lab;
@@ -913,6 +913,337 @@ class ShiftController
913
913
  });
914
914
  }
915
915
 
916
+ /**
917
+ * Retrieve a Shift's Score History [GET /packhouse/sites/{siteId}/shifts/{id}/scoreHistory]
918
+ *
919
+ * Retrieves the Score History for a Shift
920
+ *
921
+ * @static
922
+ * @public
923
+ * @param {number} siteId The Site ID
924
+ * @param {string} id The Shift ID
925
+ * @return {Promise<Array<ShiftController.ScoreHistoryItem>>}
926
+ */
927
+ static getScoreHistory(siteId, id)
928
+ {
929
+ return new Promise((resolve, reject) => {
930
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/shifts/${id}/scoreHistory`)
931
+ .then((result) => {
932
+ let resolveValue = (function(){
933
+ if(Array.isArray(result) !== true)
934
+ {
935
+ return [];
936
+ }
937
+
938
+ return result.map((resultItem) => {
939
+ return (function(){
940
+ let resultItemObject = {};
941
+
942
+ if(typeof resultItem === 'object' && 'timestamp' in resultItem)
943
+ {
944
+ resultItemObject.timestamp = (function(){
945
+ if(typeof resultItem.timestamp !== 'string')
946
+ {
947
+ return new Date(String(resultItem.timestamp));
948
+ }
949
+
950
+ return new Date(resultItem.timestamp);
951
+ }());
952
+ }
953
+ else
954
+ {
955
+ resultItemObject.timestamp = new Date();
956
+ }
957
+
958
+ if(typeof resultItem === 'object' && 'score' in resultItem)
959
+ {
960
+ resultItemObject.score = (function(){
961
+ if(typeof resultItem.score !== 'number')
962
+ {
963
+ return Number(resultItem.score);
964
+ }
965
+
966
+ return resultItem.score;
967
+ }());
968
+ }
969
+ else
970
+ {
971
+ resultItemObject.score = 0;
972
+ }
973
+
974
+ return resultItemObject;
975
+ }());
976
+ });
977
+ }());
978
+
979
+ resolve(resolveValue);
980
+ })
981
+ .catch(error => reject(error));
982
+ });
983
+ }
984
+
985
+ /**
986
+ * Retrieve a Shift Score Metrics [GET /packhouse/sites/{siteId}/shifts/{id}/scoreMetrics]
987
+ *
988
+ * Retrieves the Score Metrics for a Shift
989
+ *
990
+ * @static
991
+ * @public
992
+ * @param {number} siteId The Site ID
993
+ * @param {string} id The Shift ID
994
+ * @return {Promise<ShiftController.ShiftScoreMetrics>}
995
+ */
996
+ static getScoreMetrics(siteId, id)
997
+ {
998
+ return new Promise((resolve, reject) => {
999
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/shifts/${id}/scoreMetrics`)
1000
+ .then((result) => {
1001
+ let resolveValue = (function(){
1002
+ let resultObject = {};
1003
+
1004
+ if(typeof result === 'object' && 'scoreActual' in result)
1005
+ {
1006
+ resultObject.scoreActual = (function(){
1007
+ if(typeof result.scoreActual !== 'number')
1008
+ {
1009
+ return Number(result.scoreActual);
1010
+ }
1011
+
1012
+ return result.scoreActual;
1013
+ }());
1014
+ }
1015
+ else
1016
+ {
1017
+ resultObject.scoreActual = 0;
1018
+ }
1019
+
1020
+ if(typeof result === 'object' && 'traysPerHourActual' in result)
1021
+ {
1022
+ resultObject.traysPerHourActual = (function(){
1023
+ if(typeof result.traysPerHourActual !== 'number')
1024
+ {
1025
+ return Number.isInteger(Number(result.traysPerHourActual)) ? Number(result.traysPerHourActual) : Math.floor(Number(result.traysPerHourActual));
1026
+ }
1027
+
1028
+ return Number.isInteger(result.traysPerHourActual) ? result.traysPerHourActual : Math.floor(result.traysPerHourActual);
1029
+ }());
1030
+ }
1031
+ else
1032
+ {
1033
+ resultObject.traysPerHourActual = 0;
1034
+ }
1035
+
1036
+ if(typeof result === 'object' && 'traysPerHourTarget' in result)
1037
+ {
1038
+ resultObject.traysPerHourTarget = (function(){
1039
+ if(result.traysPerHourTarget === null)
1040
+ {
1041
+ return null;
1042
+ }
1043
+
1044
+ if(typeof result.traysPerHourTarget !== 'number')
1045
+ {
1046
+ return Number.isInteger(Number(result.traysPerHourTarget)) ? Number(result.traysPerHourTarget) : Math.floor(Number(result.traysPerHourTarget));
1047
+ }
1048
+
1049
+ return Number.isInteger(result.traysPerHourTarget) ? result.traysPerHourTarget : Math.floor(result.traysPerHourTarget);
1050
+ }());
1051
+ }
1052
+ else
1053
+ {
1054
+ resultObject.traysPerHourTarget = null;
1055
+ }
1056
+
1057
+ if(typeof result === 'object' && 'costPerTrayActual' in result)
1058
+ {
1059
+ resultObject.costPerTrayActual = (function(){
1060
+ if(typeof result.costPerTrayActual !== 'number')
1061
+ {
1062
+ return Number(result.costPerTrayActual);
1063
+ }
1064
+
1065
+ return result.costPerTrayActual;
1066
+ }());
1067
+ }
1068
+ else
1069
+ {
1070
+ resultObject.costPerTrayActual = 0;
1071
+ }
1072
+
1073
+ if(typeof result === 'object' && 'costPerTrayTarget' in result)
1074
+ {
1075
+ resultObject.costPerTrayTarget = (function(){
1076
+ if(result.costPerTrayTarget === null)
1077
+ {
1078
+ return null;
1079
+ }
1080
+
1081
+ if(typeof result.costPerTrayTarget !== 'number')
1082
+ {
1083
+ return Number(result.costPerTrayTarget);
1084
+ }
1085
+
1086
+ return result.costPerTrayTarget;
1087
+ }());
1088
+ }
1089
+ else
1090
+ {
1091
+ resultObject.costPerTrayTarget = null;
1092
+ }
1093
+
1094
+ if(typeof result === 'object' && 'qualityR600IdealActual' in result)
1095
+ {
1096
+ resultObject.qualityR600IdealActual = (function(){
1097
+ if(typeof result.qualityR600IdealActual !== 'number')
1098
+ {
1099
+ return Number(result.qualityR600IdealActual);
1100
+ }
1101
+
1102
+ return result.qualityR600IdealActual;
1103
+ }());
1104
+ }
1105
+ else
1106
+ {
1107
+ resultObject.qualityR600IdealActual = 0;
1108
+ }
1109
+
1110
+ if(typeof result === 'object' && 'qualityR600IdealTarget' in result)
1111
+ {
1112
+ resultObject.qualityR600IdealTarget = (function(){
1113
+ if(result.qualityR600IdealTarget === null)
1114
+ {
1115
+ return null;
1116
+ }
1117
+
1118
+ if(typeof result.qualityR600IdealTarget !== 'number')
1119
+ {
1120
+ return Number(result.qualityR600IdealTarget);
1121
+ }
1122
+
1123
+ return result.qualityR600IdealTarget;
1124
+ }());
1125
+ }
1126
+ else
1127
+ {
1128
+ resultObject.qualityR600IdealTarget = null;
1129
+ }
1130
+
1131
+ if(typeof result === 'object' && 'customQualityMetrics' in result)
1132
+ {
1133
+ resultObject.customQualityMetrics = (function(){
1134
+ if(Array.isArray(result.customQualityMetrics) !== true)
1135
+ {
1136
+ return [];
1137
+ }
1138
+
1139
+ return result.customQualityMetrics.map((customQualityMetricsItem) => {
1140
+ return (function(){
1141
+ let customQualityMetricsItemObject = {};
1142
+
1143
+ if(typeof customQualityMetricsItem === 'object' && 'id' in customQualityMetricsItem)
1144
+ {
1145
+ customQualityMetricsItemObject.id = (function(){
1146
+ if(typeof customQualityMetricsItem.id !== 'string')
1147
+ {
1148
+ return String(customQualityMetricsItem.id);
1149
+ }
1150
+
1151
+ return customQualityMetricsItem.id;
1152
+ }());
1153
+ }
1154
+ else
1155
+ {
1156
+ customQualityMetricsItemObject.id = "";
1157
+ }
1158
+
1159
+ if(typeof customQualityMetricsItem === 'object' && 'name' in customQualityMetricsItem)
1160
+ {
1161
+ customQualityMetricsItemObject.name = (function(){
1162
+ if(typeof customQualityMetricsItem.name !== 'string')
1163
+ {
1164
+ return String(customQualityMetricsItem.name);
1165
+ }
1166
+
1167
+ return customQualityMetricsItem.name;
1168
+ }());
1169
+ }
1170
+ else
1171
+ {
1172
+ customQualityMetricsItemObject.name = "";
1173
+ }
1174
+
1175
+ if(typeof customQualityMetricsItem === 'object' && 'type' in customQualityMetricsItem)
1176
+ {
1177
+ customQualityMetricsItemObject.type = (function(){
1178
+ if(typeof customQualityMetricsItem.type !== 'string')
1179
+ {
1180
+ return String(customQualityMetricsItem.type);
1181
+ }
1182
+
1183
+ return customQualityMetricsItem.type;
1184
+ }());
1185
+ }
1186
+ else
1187
+ {
1188
+ customQualityMetricsItemObject.type = "";
1189
+ }
1190
+
1191
+ if(typeof customQualityMetricsItem === 'object' && 'value' in customQualityMetricsItem)
1192
+ {
1193
+ customQualityMetricsItemObject.value = (function(){
1194
+ if(typeof customQualityMetricsItem.value !== 'number')
1195
+ {
1196
+ return Number(customQualityMetricsItem.value);
1197
+ }
1198
+
1199
+ return customQualityMetricsItem.value;
1200
+ }());
1201
+ }
1202
+ else
1203
+ {
1204
+ customQualityMetricsItemObject.value = 0;
1205
+ }
1206
+
1207
+ if(typeof customQualityMetricsItem === 'object' && 'target' in customQualityMetricsItem)
1208
+ {
1209
+ customQualityMetricsItemObject.target = (function(){
1210
+ if(customQualityMetricsItem.target === null)
1211
+ {
1212
+ return null;
1213
+ }
1214
+
1215
+ if(typeof customQualityMetricsItem.target !== 'number')
1216
+ {
1217
+ return Number(customQualityMetricsItem.target);
1218
+ }
1219
+
1220
+ return customQualityMetricsItem.target;
1221
+ }());
1222
+ }
1223
+ else
1224
+ {
1225
+ customQualityMetricsItemObject.target = null;
1226
+ }
1227
+
1228
+ return customQualityMetricsItemObject;
1229
+ }());
1230
+ });
1231
+ }());
1232
+ }
1233
+ else
1234
+ {
1235
+ resultObject.customQualityMetrics = [];
1236
+ }
1237
+
1238
+ return resultObject;
1239
+ }());
1240
+
1241
+ resolve(resolveValue);
1242
+ })
1243
+ .catch(error => reject(error));
1244
+ });
1245
+ }
1246
+
916
1247
  /**
917
1248
  * List all Shifts [GET /packhouse/sites/{siteId}/shifts]
918
1249
  *
@@ -1061,6 +1392,42 @@ export default ShiftController;
1061
1392
  * @memberof Controllers.Packhouse.Site
1062
1393
  */
1063
1394
 
1395
+ /**
1396
+ * A **ScoreHistoryItem** Type
1397
+ *
1398
+ * @typedef {Object} ShiftController.ScoreHistoryItem
1399
+ * @property {Date} timestamp The Timestamp for the Score Percentage Value
1400
+ * @property {number} score The Score Value as a Percentage
1401
+ * @memberof Controllers.Packhouse.Site
1402
+ */
1403
+
1404
+ /**
1405
+ * A **CustomQualityMetricItem** Type
1406
+ *
1407
+ * @typedef {Object} ShiftController.CustomQualityMetricItem
1408
+ * @property {string} id The ID of this Custom Quality Metric Item
1409
+ * @property {string} name The Name of this Custom Quality Metric Item
1410
+ * @property {string} type The Display Type for this Custom Quality Metric Item
1411
+ * @property {number} value The Actual Value for this Custom Quality Metric Item
1412
+ * @property {?number} target The Target Value for this Custom Quality Metric Item
1413
+ * @memberof Controllers.Packhouse.Site
1414
+ */
1415
+
1416
+ /**
1417
+ * A **ShiftScoreMetrics** Type
1418
+ *
1419
+ * @typedef {Object} ShiftController.ShiftScoreMetrics
1420
+ * @property {number} scoreActual The Actual Score represented as a Percentage
1421
+ * @property {number} traysPerHourActual The Actual Tray Equivalents per Hour
1422
+ * @property {?number} traysPerHourTarget The Target Tray Equivalents per Hour
1423
+ * @property {number} costPerTrayActual The Actual Cost per Tray Equivalent represented in cents
1424
+ * @property {?number} costPerTrayTarget The Target Cost per Tray Equivalent represented in cents
1425
+ * @property {number} qualityR600IdealActual The Actual Quality R600 Ideal Samples represented as a Percentage
1426
+ * @property {?number} qualityR600IdealTarget The Target Quality R600 Ideal Samples represented as a Percentage
1427
+ * @property {Array<ShiftController.CustomQualityMetricItem>} customQualityMetrics An Array of Custom Quality Metric Items for the Shift
1428
+ * @memberof Controllers.Packhouse.Site
1429
+ */
1430
+
1064
1431
  /**
1065
1432
  * A **ShiftHandoverNote** Type
1066
1433
  *
@@ -18,6 +18,7 @@ import TokenController from './TokenController';
18
18
  import ToolsController from './ToolsController';
19
19
  import UserAccountActionTokenController from './UserAccountActionTokenController';
20
20
  import UserAccountController from './UserAccountController';
21
+ import Lab from './Lab/index';
21
22
  import Packhouse from './Packhouse/index';
22
23
  import RTU from './RTU/index';
23
24
  import Site from './Site/index';
@@ -34,6 +35,7 @@ const Controllers = {
34
35
  ToolsController,
35
36
  UserAccountActionTokenController,
36
37
  UserAccountController,
38
+ Lab,
37
39
  Packhouse,
38
40
  RTU,
39
41
  Site,
@@ -0,0 +1,234 @@
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 Dehydrator
11
+ *
12
+ * @class
13
+ * @hideconstructor
14
+ * @extends BaseModel
15
+ */
16
+ class DehydratorModel extends BaseModel
17
+ {
18
+ /**
19
+ * DehydratorModel Constructor
20
+ *
21
+ * @protected
22
+ * @param {number} siteId The Site ID associated with this Dehydrator
23
+ */
24
+ constructor(siteId)
25
+ {
26
+ super();
27
+
28
+ /**
29
+ * The Dehydrator ID
30
+ *
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ this.id = "";
35
+
36
+ /**
37
+ * The RTU this Dehydrator belongs to
38
+ *
39
+ * @type {?number}
40
+ * @public
41
+ */
42
+ this.rtuId = null;
43
+
44
+ /**
45
+ * The Name of this Dehydrator
46
+ *
47
+ * @type {string}
48
+ * @public
49
+ */
50
+ this.name = "";
51
+
52
+ /**
53
+ * The Points used by this Dehydrator
54
+ *
55
+ * @type {{rackPositionId: number}}
56
+ * @public
57
+ */
58
+ this.points = (function(){
59
+ let pointsDefaultValue = {};
60
+
61
+ pointsDefaultValue.rackPositionId = 0;
62
+
63
+ return pointsDefaultValue;
64
+ }());
65
+
66
+ /**
67
+ * The Lab that owns this Dehydrator
68
+ *
69
+ * @type {string}
70
+ * @public
71
+ */
72
+ this.labId = "";
73
+
74
+ /**
75
+ * Whether the Dehydrator has been deleted
76
+ *
77
+ * @type {boolean}
78
+ * @public
79
+ */
80
+ this.deleted = false;
81
+
82
+ /**
83
+ * When the Dehydrator was last updated
84
+ *
85
+ * @type {Date}
86
+ * @public
87
+ */
88
+ this.updateTimestamp = new Date();
89
+
90
+ /**
91
+ * The Site ID associated with this Dehydrator
92
+ *
93
+ * @type {number}
94
+ * @public
95
+ */
96
+ this.siteId = siteId;
97
+ }
98
+
99
+ /**
100
+ * Create a new **DehydratorModel** from a JSON Object or JSON String
101
+ *
102
+ * @static
103
+ * @public
104
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
105
+ * @param {number} siteId The Site ID associated with this Dehydrator
106
+ * @return {DehydratorModel}
107
+ */
108
+ static fromJSON(json, siteId)
109
+ {
110
+ let model = new DehydratorModel(siteId);
111
+
112
+ /**
113
+ * The JSON Object
114
+ *
115
+ * @type {Object<string, any>}
116
+ */
117
+ let jsonObject = {};
118
+
119
+ if(typeof json === 'string')
120
+ {
121
+ jsonObject = JSON.parse(json);
122
+ }
123
+ else if(typeof json === 'object')
124
+ {
125
+ jsonObject = json;
126
+ }
127
+
128
+ if('id' in jsonObject)
129
+ {
130
+ model.id = (function(){
131
+ if(typeof jsonObject['id'] !== 'string')
132
+ {
133
+ return String(jsonObject['id']);
134
+ }
135
+
136
+ return jsonObject['id'];
137
+ }());
138
+ }
139
+
140
+ if('rtuId' in jsonObject)
141
+ {
142
+ model.rtuId = (function(){
143
+ if(jsonObject['rtuId'] === null)
144
+ {
145
+ return null;
146
+ }
147
+
148
+ if(typeof jsonObject['rtuId'] !== 'number')
149
+ {
150
+ return Number.isInteger(Number(jsonObject['rtuId'])) ? Number(jsonObject['rtuId']) : Math.floor(Number(jsonObject['rtuId']));
151
+ }
152
+
153
+ return Number.isInteger(jsonObject['rtuId']) ? jsonObject['rtuId'] : Math.floor(jsonObject['rtuId']);
154
+ }());
155
+ }
156
+
157
+ if('name' in jsonObject)
158
+ {
159
+ model.name = (function(){
160
+ if(typeof jsonObject['name'] !== 'string')
161
+ {
162
+ return String(jsonObject['name']);
163
+ }
164
+
165
+ return jsonObject['name'];
166
+ }());
167
+ }
168
+
169
+ if('points' in jsonObject)
170
+ {
171
+ model.points = (function(){
172
+ let pointsObject = {};
173
+
174
+ if(typeof jsonObject['points'] === 'object' && 'rackPositionId' in jsonObject['points'])
175
+ {
176
+ pointsObject.rackPositionId = (function(){
177
+ if(typeof jsonObject['points'].rackPositionId !== 'number')
178
+ {
179
+ return Number.isInteger(Number(jsonObject['points'].rackPositionId)) ? Number(jsonObject['points'].rackPositionId) : Math.floor(Number(jsonObject['points'].rackPositionId));
180
+ }
181
+
182
+ return Number.isInteger(jsonObject['points'].rackPositionId) ? jsonObject['points'].rackPositionId : Math.floor(jsonObject['points'].rackPositionId);
183
+ }());
184
+ }
185
+ else
186
+ {
187
+ pointsObject.rackPositionId = 0;
188
+ }
189
+
190
+ return pointsObject;
191
+ }());
192
+ }
193
+
194
+ if('labId' in jsonObject)
195
+ {
196
+ model.labId = (function(){
197
+ if(typeof jsonObject['labId'] !== 'string')
198
+ {
199
+ return String(jsonObject['labId']);
200
+ }
201
+
202
+ return jsonObject['labId'];
203
+ }());
204
+ }
205
+
206
+ if('deleted' in jsonObject)
207
+ {
208
+ model.deleted = (function(){
209
+ if(typeof jsonObject['deleted'] !== 'boolean')
210
+ {
211
+ return Boolean(jsonObject['deleted']);
212
+ }
213
+
214
+ return jsonObject['deleted'];
215
+ }());
216
+ }
217
+
218
+ if('updateTimestamp' in jsonObject)
219
+ {
220
+ model.updateTimestamp = (function(){
221
+ if(typeof jsonObject['updateTimestamp'] !== 'string')
222
+ {
223
+ return new Date(String(jsonObject['updateTimestamp']));
224
+ }
225
+
226
+ return new Date(jsonObject['updateTimestamp']);
227
+ }());
228
+ }
229
+
230
+ return model;
231
+ }
232
+ }
233
+
234
+ export default DehydratorModel;