@ricado/api-client 2.3.27 → 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.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Lab/Site/DehydratorController.js +198 -0
- package/lib/Controllers/Lab/Site/FruitProfileController.js +204 -0
- package/lib/Controllers/Lab/Site/LabController.js +222 -0
- package/lib/Controllers/Lab/Site/RackController.js +222 -0
- package/lib/Controllers/Lab/Site/RackPositionController.js +207 -0
- package/lib/Controllers/Lab/Site/SampleController.js +927 -0
- package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +192 -0
- package/lib/Controllers/Lab/Site/SampleResultController.js +905 -0
- package/lib/Controllers/Lab/Site/index.js +46 -0
- package/lib/Controllers/Lab/index.js +25 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +2 -2
- package/lib/Controllers/Packhouse/Site/MAFSizerController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftController.js +304 -0
- package/lib/Controllers/index.js +9 -6
- package/lib/Models/Lab/Site/DehydratorModel.js +250 -0
- package/lib/Models/Lab/Site/FruitProfileModel.js +303 -0
- package/lib/Models/Lab/Site/LabModel.js +365 -0
- package/lib/Models/Lab/Site/RackModel.js +358 -0
- package/lib/Models/Lab/Site/RackPositionModel.js +525 -0
- package/lib/Models/Lab/Site/SampleFailureReasonModel.js +195 -0
- package/lib/Models/Lab/Site/SampleModel.js +545 -0
- package/lib/Models/Lab/Site/SampleResultModel.js +545 -0
- package/lib/Models/Lab/Site/index.js +46 -0
- package/lib/Models/Lab/index.js +25 -0
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +18 -1
- package/lib/Models/Packhouse/Site/MAFSizerModel.js +18 -1
- package/lib/Models/index.js +7 -4
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +10491 -7674
- package/package.json +1 -1
- package/src/Controllers/Lab/Site/DehydratorController.js +175 -0
- package/src/Controllers/Lab/Site/FruitProfileController.js +181 -0
- package/src/Controllers/Lab/Site/LabController.js +199 -0
- package/src/Controllers/Lab/Site/RackController.js +199 -0
- package/src/Controllers/Lab/Site/RackPositionController.js +184 -0
- package/src/Controllers/Lab/Site/SampleController.js +1067 -0
- package/src/Controllers/Lab/Site/SampleFailureReasonController.js +169 -0
- package/src/Controllers/Lab/Site/SampleResultController.js +1036 -0
- package/src/Controllers/Lab/Site/index.js +30 -0
- package/src/Controllers/Lab/index.js +16 -0
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +2 -2
- package/src/Controllers/Packhouse/Site/MAFSizerController.js +2 -2
- package/src/Controllers/Packhouse/Site/ShiftController.js +367 -0
- package/src/Controllers/index.js +2 -0
- package/src/Models/Lab/Site/DehydratorModel.js +234 -0
- package/src/Models/Lab/Site/FruitProfileModel.js +290 -0
- package/src/Models/Lab/Site/LabModel.js +372 -0
- package/src/Models/Lab/Site/RackModel.js +358 -0
- package/src/Models/Lab/Site/RackPositionModel.js +600 -0
- package/src/Models/Lab/Site/SampleFailureReasonModel.js +170 -0
- package/src/Models/Lab/Site/SampleModel.js +565 -0
- package/src/Models/Lab/Site/SampleResultModel.js +565 -0
- package/src/Models/Lab/Site/index.js +30 -0
- package/src/Models/Lab/index.js +16 -0
- package/src/Models/Packhouse/Site/CompacSizerModel.js +24 -1
- package/src/Models/Packhouse/Site/MAFSizerModel.js +24 -1
- package/src/Models/index.js +2 -0
- package/src/PackageVersion.js +1 -1
|
@@ -0,0 +1,545 @@
|
|
|
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 Sample
|
|
36
|
+
*
|
|
37
|
+
* @class
|
|
38
|
+
* @hideconstructor
|
|
39
|
+
* @extends BaseModel
|
|
40
|
+
*/
|
|
41
|
+
var SampleModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(SampleModel, _BaseModel);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(SampleModel);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* SampleModel Constructor
|
|
48
|
+
*
|
|
49
|
+
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Sample
|
|
51
|
+
*/
|
|
52
|
+
function SampleModel(siteId) {
|
|
53
|
+
var _this;
|
|
54
|
+
|
|
55
|
+
_classCallCheck(this, SampleModel);
|
|
56
|
+
|
|
57
|
+
_this = _super.call(this);
|
|
58
|
+
/**
|
|
59
|
+
* The Sample ID
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
_this.id = "";
|
|
66
|
+
/**
|
|
67
|
+
* The Lab ID this Sample is associated with
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
_this.labId = "";
|
|
74
|
+
/**
|
|
75
|
+
* The Numeric Sample Number
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.sampleNumber = "";
|
|
82
|
+
/**
|
|
83
|
+
* When this Sample was Created
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.createdTimestamp = new Date();
|
|
90
|
+
/**
|
|
91
|
+
* The Source that Created this Sample
|
|
92
|
+
*
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.createdSource = "";
|
|
98
|
+
/**
|
|
99
|
+
* ID of the User who Created this Sample. Only applies if the `createdSource` is 'System'
|
|
100
|
+
*
|
|
101
|
+
* @type {?string}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.createdUserId = null;
|
|
106
|
+
/**
|
|
107
|
+
* Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
|
|
108
|
+
*
|
|
109
|
+
* @type {?string}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.createdUserName = null;
|
|
114
|
+
/**
|
|
115
|
+
* Optional Scheduled Timestamp when this Sample should Begin
|
|
116
|
+
*
|
|
117
|
+
* @type {?Date}
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
_this.scheduledTimestamp = null;
|
|
122
|
+
/**
|
|
123
|
+
* When this Sample was Started
|
|
124
|
+
*
|
|
125
|
+
* @type {?Date}
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
_this.startTimestamp = null;
|
|
130
|
+
/**
|
|
131
|
+
* When this Sample was Finished
|
|
132
|
+
*
|
|
133
|
+
* @type {?Date}
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
_this.finishTimestamp = null;
|
|
138
|
+
/**
|
|
139
|
+
* When this Sample was Published
|
|
140
|
+
*
|
|
141
|
+
* @type {?Date}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.publishTimestamp = null;
|
|
146
|
+
/**
|
|
147
|
+
* ID of the User who Published this Sample
|
|
148
|
+
*
|
|
149
|
+
* @type {?string}
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
_this.publishUserId = null;
|
|
154
|
+
/**
|
|
155
|
+
* Name of the User who Published this Sample
|
|
156
|
+
*
|
|
157
|
+
* @type {?string}
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
_this.publishUserName = null;
|
|
162
|
+
/**
|
|
163
|
+
* The Fruit Profile for this Sample
|
|
164
|
+
*
|
|
165
|
+
* @type {string}
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
_this.fruitProfileId = "";
|
|
170
|
+
/**
|
|
171
|
+
* The Rack Position used for this Sample
|
|
172
|
+
*
|
|
173
|
+
* @type {string}
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
_this.rackPositionId = "";
|
|
178
|
+
/**
|
|
179
|
+
* The Dehydrator used for this Sample
|
|
180
|
+
*
|
|
181
|
+
* @type {string}
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
_this.dehydratorId = "";
|
|
186
|
+
/**
|
|
187
|
+
* The Outcome of this Sample
|
|
188
|
+
*
|
|
189
|
+
* @type {?string}
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
_this.outcome = null;
|
|
194
|
+
/**
|
|
195
|
+
* A Sample Failure Reason ID if this Sample Failed
|
|
196
|
+
*
|
|
197
|
+
* @type {?string}
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
_this.failureReasonId = null;
|
|
202
|
+
/**
|
|
203
|
+
* The Sample Result ID asociated with this Sample
|
|
204
|
+
*
|
|
205
|
+
* @type {?string}
|
|
206
|
+
* @public
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
_this.resultId = null;
|
|
210
|
+
/**
|
|
211
|
+
* The Status of this Sample
|
|
212
|
+
*
|
|
213
|
+
* @type {string}
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
_this.status = "";
|
|
218
|
+
/**
|
|
219
|
+
* Whether the Sample has been deleted
|
|
220
|
+
*
|
|
221
|
+
* @type {boolean}
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
_this.deleted = false;
|
|
226
|
+
/**
|
|
227
|
+
* When the Sample was last updated
|
|
228
|
+
*
|
|
229
|
+
* @type {Date}
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
_this.updateTimestamp = new Date();
|
|
234
|
+
/**
|
|
235
|
+
* The Site ID associated with this Sample
|
|
236
|
+
*
|
|
237
|
+
* @type {number}
|
|
238
|
+
* @public
|
|
239
|
+
*/
|
|
240
|
+
|
|
241
|
+
_this.siteId = siteId;
|
|
242
|
+
return _this;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Create a new **SampleModel** from a JSON Object or JSON String
|
|
246
|
+
*
|
|
247
|
+
* @static
|
|
248
|
+
* @public
|
|
249
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
250
|
+
* @param {number} siteId The Site ID associated with this Sample
|
|
251
|
+
* @return {SampleModel}
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
_createClass(SampleModel, null, [{
|
|
256
|
+
key: "fromJSON",
|
|
257
|
+
value: function fromJSON(json, siteId) {
|
|
258
|
+
var model = new SampleModel(siteId);
|
|
259
|
+
/**
|
|
260
|
+
* The JSON Object
|
|
261
|
+
*
|
|
262
|
+
* @type {Object<string, any>}
|
|
263
|
+
*/
|
|
264
|
+
|
|
265
|
+
var jsonObject = {};
|
|
266
|
+
|
|
267
|
+
if (typeof json === 'string') {
|
|
268
|
+
jsonObject = JSON.parse(json);
|
|
269
|
+
} else if (_typeof(json) === 'object') {
|
|
270
|
+
jsonObject = json;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if ('id' in jsonObject) {
|
|
274
|
+
model.id = function () {
|
|
275
|
+
if (typeof jsonObject['id'] !== 'string') {
|
|
276
|
+
return String(jsonObject['id']);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return jsonObject['id'];
|
|
280
|
+
}();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if ('labId' in jsonObject) {
|
|
284
|
+
model.labId = function () {
|
|
285
|
+
if (typeof jsonObject['labId'] !== 'string') {
|
|
286
|
+
return String(jsonObject['labId']);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return jsonObject['labId'];
|
|
290
|
+
}();
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
if ('sampleNumber' in jsonObject) {
|
|
294
|
+
model.sampleNumber = function () {
|
|
295
|
+
if (typeof jsonObject['sampleNumber'] !== 'string') {
|
|
296
|
+
return String(jsonObject['sampleNumber']);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
return jsonObject['sampleNumber'];
|
|
300
|
+
}();
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if ('createdTimestamp' in jsonObject) {
|
|
304
|
+
model.createdTimestamp = function () {
|
|
305
|
+
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
306
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
310
|
+
}();
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if ('createdSource' in jsonObject) {
|
|
314
|
+
model.createdSource = function () {
|
|
315
|
+
if (typeof jsonObject['createdSource'] !== 'string') {
|
|
316
|
+
return String(jsonObject['createdSource']);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return jsonObject['createdSource'];
|
|
320
|
+
}();
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if ('createdUserId' in jsonObject) {
|
|
324
|
+
model.createdUserId = function () {
|
|
325
|
+
if (jsonObject['createdUserId'] === null) {
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (typeof jsonObject['createdUserId'] !== 'string') {
|
|
330
|
+
return String(jsonObject['createdUserId']);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return jsonObject['createdUserId'];
|
|
334
|
+
}();
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if ('createdUserName' in jsonObject) {
|
|
338
|
+
model.createdUserName = function () {
|
|
339
|
+
if (jsonObject['createdUserName'] === null) {
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
if (typeof jsonObject['createdUserName'] !== 'string') {
|
|
344
|
+
return String(jsonObject['createdUserName']);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return jsonObject['createdUserName'];
|
|
348
|
+
}();
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if ('scheduledTimestamp' in jsonObject) {
|
|
352
|
+
model.scheduledTimestamp = function () {
|
|
353
|
+
if (jsonObject['scheduledTimestamp'] === null) {
|
|
354
|
+
return null;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (typeof jsonObject['scheduledTimestamp'] !== 'string') {
|
|
358
|
+
return new Date(String(jsonObject['scheduledTimestamp']));
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
return new Date(jsonObject['scheduledTimestamp']);
|
|
362
|
+
}();
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
if ('startTimestamp' in jsonObject) {
|
|
366
|
+
model.startTimestamp = function () {
|
|
367
|
+
if (jsonObject['startTimestamp'] === null) {
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
if (typeof jsonObject['startTimestamp'] !== 'string') {
|
|
372
|
+
return new Date(String(jsonObject['startTimestamp']));
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return new Date(jsonObject['startTimestamp']);
|
|
376
|
+
}();
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if ('finishTimestamp' in jsonObject) {
|
|
380
|
+
model.finishTimestamp = function () {
|
|
381
|
+
if (jsonObject['finishTimestamp'] === null) {
|
|
382
|
+
return null;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if (typeof jsonObject['finishTimestamp'] !== 'string') {
|
|
386
|
+
return new Date(String(jsonObject['finishTimestamp']));
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
return new Date(jsonObject['finishTimestamp']);
|
|
390
|
+
}();
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if ('publishTimestamp' in jsonObject) {
|
|
394
|
+
model.publishTimestamp = function () {
|
|
395
|
+
if (jsonObject['publishTimestamp'] === null) {
|
|
396
|
+
return null;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (typeof jsonObject['publishTimestamp'] !== 'string') {
|
|
400
|
+
return new Date(String(jsonObject['publishTimestamp']));
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
return new Date(jsonObject['publishTimestamp']);
|
|
404
|
+
}();
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
if ('publishUserId' in jsonObject) {
|
|
408
|
+
model.publishUserId = function () {
|
|
409
|
+
if (jsonObject['publishUserId'] === null) {
|
|
410
|
+
return null;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
if (typeof jsonObject['publishUserId'] !== 'string') {
|
|
414
|
+
return String(jsonObject['publishUserId']);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return jsonObject['publishUserId'];
|
|
418
|
+
}();
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if ('publishUserName' in jsonObject) {
|
|
422
|
+
model.publishUserName = function () {
|
|
423
|
+
if (jsonObject['publishUserName'] === null) {
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (typeof jsonObject['publishUserName'] !== 'string') {
|
|
428
|
+
return String(jsonObject['publishUserName']);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return jsonObject['publishUserName'];
|
|
432
|
+
}();
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if ('fruitProfileId' in jsonObject) {
|
|
436
|
+
model.fruitProfileId = function () {
|
|
437
|
+
if (typeof jsonObject['fruitProfileId'] !== 'string') {
|
|
438
|
+
return String(jsonObject['fruitProfileId']);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return jsonObject['fruitProfileId'];
|
|
442
|
+
}();
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
if ('rackPositionId' in jsonObject) {
|
|
446
|
+
model.rackPositionId = function () {
|
|
447
|
+
if (typeof jsonObject['rackPositionId'] !== 'string') {
|
|
448
|
+
return String(jsonObject['rackPositionId']);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return jsonObject['rackPositionId'];
|
|
452
|
+
}();
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
if ('dehydratorId' in jsonObject) {
|
|
456
|
+
model.dehydratorId = function () {
|
|
457
|
+
if (typeof jsonObject['dehydratorId'] !== 'string') {
|
|
458
|
+
return String(jsonObject['dehydratorId']);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
return jsonObject['dehydratorId'];
|
|
462
|
+
}();
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if ('outcome' in jsonObject) {
|
|
466
|
+
model.outcome = function () {
|
|
467
|
+
if (jsonObject['outcome'] === null) {
|
|
468
|
+
return null;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if (typeof jsonObject['outcome'] !== 'string') {
|
|
472
|
+
return String(jsonObject['outcome']);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
return jsonObject['outcome'];
|
|
476
|
+
}();
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if ('failureReasonId' in jsonObject) {
|
|
480
|
+
model.failureReasonId = function () {
|
|
481
|
+
if (jsonObject['failureReasonId'] === null) {
|
|
482
|
+
return null;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
if (typeof jsonObject['failureReasonId'] !== 'string') {
|
|
486
|
+
return String(jsonObject['failureReasonId']);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
return jsonObject['failureReasonId'];
|
|
490
|
+
}();
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
if ('resultId' in jsonObject) {
|
|
494
|
+
model.resultId = function () {
|
|
495
|
+
if (jsonObject['resultId'] === null) {
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
if (typeof jsonObject['resultId'] !== 'string') {
|
|
500
|
+
return String(jsonObject['resultId']);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return jsonObject['resultId'];
|
|
504
|
+
}();
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if ('status' in jsonObject) {
|
|
508
|
+
model.status = function () {
|
|
509
|
+
if (typeof jsonObject['status'] !== 'string') {
|
|
510
|
+
return String(jsonObject['status']);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
return jsonObject['status'];
|
|
514
|
+
}();
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
if ('deleted' in jsonObject) {
|
|
518
|
+
model.deleted = function () {
|
|
519
|
+
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
520
|
+
return Boolean(jsonObject['deleted']);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
return jsonObject['deleted'];
|
|
524
|
+
}();
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if ('updateTimestamp' in jsonObject) {
|
|
528
|
+
model.updateTimestamp = function () {
|
|
529
|
+
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
530
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
534
|
+
}();
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
return model;
|
|
538
|
+
}
|
|
539
|
+
}]);
|
|
540
|
+
|
|
541
|
+
return SampleModel;
|
|
542
|
+
}(_BaseModel2.default);
|
|
543
|
+
|
|
544
|
+
var _default = SampleModel;
|
|
545
|
+
exports.default = _default;
|