@ricado/api-client 2.3.16 → 2.3.18
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/Packhouse/Integrations/ExternalShiftManagementController.js +76 -0
- package/lib/Controllers/Packhouse/Integrations/index.js +25 -0
- package/lib/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +198 -0
- package/lib/Controllers/Packhouse/Site/BinTipBinController.js +14 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +186 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerBinWeightController.js +959 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +89 -15
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +1 -1
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +35 -4
- package/lib/Controllers/Packhouse/Site/MAFSizerController.js +101 -19
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +435 -23
- package/lib/Controllers/Packhouse/Site/PackrunController.js +11 -2
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +38 -2
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +52 -6
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +70 -4
- package/lib/Controllers/Packhouse/Site/ShiftController.js +1 -1
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +2 -2
- package/lib/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +14 -2
- package/lib/Controllers/Packhouse/Site/index.js +6 -0
- package/lib/Controllers/Packhouse/index.js +5 -2
- package/lib/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +263 -0
- package/lib/Models/Packhouse/Site/BinTipBinModel.js +75 -5
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +1276 -5
- package/lib/Models/Packhouse/Site/CompacSizerBinWeightModel.js +627 -0
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +966 -72
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +260 -8
- package/lib/Models/Packhouse/Site/MAFSizerModel.js +660 -85
- package/lib/Models/Packhouse/Site/PackingLineModel.js +3860 -551
- package/lib/Models/Packhouse/Site/PackrunModel.js +26 -4
- package/lib/Models/Packhouse/Site/RejectBinModel.js +214 -4
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +576 -14
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +113 -9
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +98 -0
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +50 -5
- package/lib/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +75 -5
- package/lib/Models/Packhouse/Site/index.js +6 -0
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +6146 -2111
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Integrations/ExternalShiftManagementController.js +58 -0
- package/src/Controllers/Packhouse/Integrations/index.js +16 -0
- package/src/Controllers/Packhouse/Site/BinTipBarcodeScannerController.js +175 -0
- package/src/Controllers/Packhouse/Site/BinTipBinController.js +14 -2
- package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +186 -2
- package/src/Controllers/Packhouse/Site/CompacSizerBinWeightController.js +1090 -0
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +89 -15
- package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +1 -1
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +35 -4
- package/src/Controllers/Packhouse/Site/MAFSizerController.js +101 -19
- package/src/Controllers/Packhouse/Site/PackingLineController.js +435 -23
- package/src/Controllers/Packhouse/Site/PackrunController.js +11 -2
- package/src/Controllers/Packhouse/Site/RejectBinController.js +38 -2
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +52 -6
- package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +70 -4
- package/src/Controllers/Packhouse/Site/ShiftController.js +1 -1
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +2 -2
- package/src/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +14 -2
- package/src/Controllers/Packhouse/Site/index.js +4 -0
- package/src/Controllers/Packhouse/index.js +2 -0
- package/src/Models/Packhouse/Site/BinTipBarcodeScannerModel.js +252 -0
- package/src/Models/Packhouse/Site/BinTipBinModel.js +97 -5
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +1682 -5
- package/src/Models/Packhouse/Site/CompacSizerBinWeightModel.js +715 -0
- package/src/Models/Packhouse/Site/CompacSizerModel.js +1319 -109
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +339 -8
- package/src/Models/Packhouse/Site/MAFSizerModel.js +869 -92
- package/src/Models/Packhouse/Site/PackingLineModel.js +5086 -671
- package/src/Models/Packhouse/Site/PackrunModel.js +33 -4
- package/src/Models/Packhouse/Site/RejectBinModel.js +280 -4
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +775 -15
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +147 -10
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +120 -0
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +65 -5
- package/src/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +97 -5
- package/src/Models/Packhouse/Site/index.js +4 -0
- package/src/PackageVersion.js +1 -1
|
@@ -0,0 +1,627 @@
|
|
|
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 Compac Sizer Bin Weight
|
|
36
|
+
*
|
|
37
|
+
* @class
|
|
38
|
+
* @hideconstructor
|
|
39
|
+
* @extends BaseModel
|
|
40
|
+
*/
|
|
41
|
+
var CompacSizerBinWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(CompacSizerBinWeightModel, _BaseModel);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(CompacSizerBinWeightModel);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* CompacSizerBinWeightModel Constructor
|
|
48
|
+
*
|
|
49
|
+
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Compac Sizer Bin Weight
|
|
51
|
+
*/
|
|
52
|
+
function CompacSizerBinWeightModel(siteId) {
|
|
53
|
+
var _this;
|
|
54
|
+
|
|
55
|
+
_classCallCheck(this, CompacSizerBinWeightModel);
|
|
56
|
+
|
|
57
|
+
_this = _super.call(this);
|
|
58
|
+
/**
|
|
59
|
+
* The Compac Sizer Bin Weight ID
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
_this.id = "";
|
|
66
|
+
/**
|
|
67
|
+
* The Compac Sizer ID this Bin Weight is associated with
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
_this.compacSizerId = "";
|
|
74
|
+
/**
|
|
75
|
+
* The Packrun ID associated with this Bin Weight
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.packrunId = "";
|
|
82
|
+
/**
|
|
83
|
+
* When this Bin Weight was Created
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.createdTimestamp = new Date();
|
|
90
|
+
/**
|
|
91
|
+
* The Time Batch ID associated with this Bin Weight
|
|
92
|
+
*
|
|
93
|
+
* @type {?string}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.timeBatchId = null;
|
|
98
|
+
/**
|
|
99
|
+
* The Sources and Weights that make up this Bin Weight
|
|
100
|
+
*
|
|
101
|
+
* @type {{type: string, outletNumber: number, outletName: ?string, weights: Array<{classType: string, weight: number, fruitCount: ?number}>}|{type: string, weights: Array<{classType: string, weight: number, fruitCount: ?number}>}[]}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.sources = [];
|
|
106
|
+
/**
|
|
107
|
+
* The Multi-Grower Bin Weights that will be submitted to FreshPack
|
|
108
|
+
*
|
|
109
|
+
* @type {Array<{classType: string, weight: number, weightApi: ?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}}>}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.freshPackMultiGrowerBinWeights = [];
|
|
114
|
+
/**
|
|
115
|
+
* The Multi-Grower Bins that will be submitted to FreshPack
|
|
116
|
+
*
|
|
117
|
+
* @type {Array<{classType: string, binNumber: ?string, printBinCard: boolean, binNumberApi: ?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}, binCardApi: ?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}}>}
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
_this.freshPackMultiGrowerBins = [];
|
|
122
|
+
/**
|
|
123
|
+
* Whether the Compac Sizer Bin Weight has been deleted
|
|
124
|
+
*
|
|
125
|
+
* @type {boolean}
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
_this.deleted = false;
|
|
130
|
+
/**
|
|
131
|
+
* When the Compac Sizer Bin Weight was last updated
|
|
132
|
+
*
|
|
133
|
+
* @type {Date}
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
_this.updateTimestamp = new Date();
|
|
138
|
+
/**
|
|
139
|
+
* The Site ID associated with this Compac Sizer Bin Weight
|
|
140
|
+
*
|
|
141
|
+
* @type {number}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.siteId = siteId;
|
|
146
|
+
return _this;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Create a new **CompacSizerBinWeightModel** from a JSON Object or JSON String
|
|
150
|
+
*
|
|
151
|
+
* @static
|
|
152
|
+
* @public
|
|
153
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
154
|
+
* @param {number} siteId The Site ID associated with this Compac Sizer Bin Weight
|
|
155
|
+
* @return {CompacSizerBinWeightModel}
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
_createClass(CompacSizerBinWeightModel, null, [{
|
|
160
|
+
key: "fromJSON",
|
|
161
|
+
value: function fromJSON(json, siteId) {
|
|
162
|
+
var model = new CompacSizerBinWeightModel(siteId);
|
|
163
|
+
/**
|
|
164
|
+
* The JSON Object
|
|
165
|
+
*
|
|
166
|
+
* @type {Object<string, any>}
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
var jsonObject = {};
|
|
170
|
+
|
|
171
|
+
if (typeof json === 'string') {
|
|
172
|
+
jsonObject = JSON.parse(json);
|
|
173
|
+
} else if (_typeof(json) === 'object') {
|
|
174
|
+
jsonObject = json;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if ('id' in jsonObject) {
|
|
178
|
+
model.id = function () {
|
|
179
|
+
if (typeof jsonObject['id'] !== 'string') {
|
|
180
|
+
return String(jsonObject['id']);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return jsonObject['id'];
|
|
184
|
+
}();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if ('compacSizerId' in jsonObject) {
|
|
188
|
+
model.compacSizerId = function () {
|
|
189
|
+
if (typeof jsonObject['compacSizerId'] !== 'string') {
|
|
190
|
+
return String(jsonObject['compacSizerId']);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return jsonObject['compacSizerId'];
|
|
194
|
+
}();
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if ('packrunId' in jsonObject) {
|
|
198
|
+
model.packrunId = function () {
|
|
199
|
+
if (typeof jsonObject['packrunId'] !== 'string') {
|
|
200
|
+
return String(jsonObject['packrunId']);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return jsonObject['packrunId'];
|
|
204
|
+
}();
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if ('createdTimestamp' in jsonObject) {
|
|
208
|
+
model.createdTimestamp = function () {
|
|
209
|
+
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
210
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
214
|
+
}();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if ('timeBatchId' in jsonObject) {
|
|
218
|
+
model.timeBatchId = function () {
|
|
219
|
+
if (jsonObject['timeBatchId'] === null) {
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (typeof jsonObject['timeBatchId'] !== 'string') {
|
|
224
|
+
return String(jsonObject['timeBatchId']);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return jsonObject['timeBatchId'];
|
|
228
|
+
}();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if ('sources' in jsonObject) {
|
|
232
|
+
model.sources = function () {
|
|
233
|
+
if (Array.isArray(jsonObject['sources']) !== true) {
|
|
234
|
+
return [];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return jsonObject['sources'].map(function (sourcesItem) {
|
|
238
|
+
return function () {
|
|
239
|
+
return sourcesItem;
|
|
240
|
+
}();
|
|
241
|
+
});
|
|
242
|
+
}();
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if ('freshPackMultiGrowerBinWeights' in jsonObject) {
|
|
246
|
+
model.freshPackMultiGrowerBinWeights = function () {
|
|
247
|
+
if (Array.isArray(jsonObject['freshPackMultiGrowerBinWeights']) !== true) {
|
|
248
|
+
return [];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return jsonObject['freshPackMultiGrowerBinWeights'].map(function (freshPackMultiGrowerBinWeightsItem) {
|
|
252
|
+
return function () {
|
|
253
|
+
var freshPackMultiGrowerBinWeightsItemObject = {};
|
|
254
|
+
|
|
255
|
+
if (_typeof(freshPackMultiGrowerBinWeightsItem) === 'object' && 'classType' in freshPackMultiGrowerBinWeightsItem) {
|
|
256
|
+
freshPackMultiGrowerBinWeightsItemObject.classType = function () {
|
|
257
|
+
if (typeof freshPackMultiGrowerBinWeightsItem.classType !== 'string') {
|
|
258
|
+
return String(freshPackMultiGrowerBinWeightsItem.classType);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return freshPackMultiGrowerBinWeightsItem.classType;
|
|
262
|
+
}();
|
|
263
|
+
} else {
|
|
264
|
+
freshPackMultiGrowerBinWeightsItemObject.classType = "";
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
if (_typeof(freshPackMultiGrowerBinWeightsItem) === 'object' && 'weight' in freshPackMultiGrowerBinWeightsItem) {
|
|
268
|
+
freshPackMultiGrowerBinWeightsItemObject.weight = function () {
|
|
269
|
+
if (typeof freshPackMultiGrowerBinWeightsItem.weight !== 'number') {
|
|
270
|
+
return Number(freshPackMultiGrowerBinWeightsItem.weight);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return freshPackMultiGrowerBinWeightsItem.weight;
|
|
274
|
+
}();
|
|
275
|
+
} else {
|
|
276
|
+
freshPackMultiGrowerBinWeightsItemObject.weight = 0;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (_typeof(freshPackMultiGrowerBinWeightsItem) === 'object' && 'weightApi' in freshPackMultiGrowerBinWeightsItem) {
|
|
280
|
+
freshPackMultiGrowerBinWeightsItemObject.weightApi = function () {
|
|
281
|
+
if (freshPackMultiGrowerBinWeightsItem.weightApi === null) {
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
var weightApiObject = {};
|
|
286
|
+
|
|
287
|
+
if (_typeof(freshPackMultiGrowerBinWeightsItem.weightApi) === 'object' && 'requestCount' in freshPackMultiGrowerBinWeightsItem.weightApi) {
|
|
288
|
+
weightApiObject.requestCount = function () {
|
|
289
|
+
if (typeof freshPackMultiGrowerBinWeightsItem.weightApi.requestCount !== 'number') {
|
|
290
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount)) ? Number(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount) : Math.floor(Number(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return Number.isInteger(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount) ? freshPackMultiGrowerBinWeightsItem.weightApi.requestCount : Math.floor(freshPackMultiGrowerBinWeightsItem.weightApi.requestCount);
|
|
294
|
+
}();
|
|
295
|
+
} else {
|
|
296
|
+
weightApiObject.requestCount = 0;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (_typeof(freshPackMultiGrowerBinWeightsItem.weightApi) === 'object' && 'requestTimestamp' in freshPackMultiGrowerBinWeightsItem.weightApi) {
|
|
300
|
+
weightApiObject.requestTimestamp = function () {
|
|
301
|
+
if (freshPackMultiGrowerBinWeightsItem.weightApi.requestTimestamp === null) {
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (typeof freshPackMultiGrowerBinWeightsItem.weightApi.requestTimestamp !== 'string') {
|
|
306
|
+
return new Date(String(freshPackMultiGrowerBinWeightsItem.weightApi.requestTimestamp));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return new Date(freshPackMultiGrowerBinWeightsItem.weightApi.requestTimestamp);
|
|
310
|
+
}();
|
|
311
|
+
} else {
|
|
312
|
+
weightApiObject.requestTimestamp = null;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (_typeof(freshPackMultiGrowerBinWeightsItem.weightApi) === 'object' && 'responseCode' in freshPackMultiGrowerBinWeightsItem.weightApi) {
|
|
316
|
+
weightApiObject.responseCode = function () {
|
|
317
|
+
if (freshPackMultiGrowerBinWeightsItem.weightApi.responseCode === null) {
|
|
318
|
+
return null;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (typeof freshPackMultiGrowerBinWeightsItem.weightApi.responseCode !== 'number') {
|
|
322
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode)) ? Number(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode) : Math.floor(Number(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return Number.isInteger(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode) ? freshPackMultiGrowerBinWeightsItem.weightApi.responseCode : Math.floor(freshPackMultiGrowerBinWeightsItem.weightApi.responseCode);
|
|
326
|
+
}();
|
|
327
|
+
} else {
|
|
328
|
+
weightApiObject.responseCode = null;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (_typeof(freshPackMultiGrowerBinWeightsItem.weightApi) === 'object' && 'responseMessage' in freshPackMultiGrowerBinWeightsItem.weightApi) {
|
|
332
|
+
weightApiObject.responseMessage = function () {
|
|
333
|
+
if (freshPackMultiGrowerBinWeightsItem.weightApi.responseMessage === null) {
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if (typeof freshPackMultiGrowerBinWeightsItem.weightApi.responseMessage !== 'string') {
|
|
338
|
+
return String(freshPackMultiGrowerBinWeightsItem.weightApi.responseMessage);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
return freshPackMultiGrowerBinWeightsItem.weightApi.responseMessage;
|
|
342
|
+
}();
|
|
343
|
+
} else {
|
|
344
|
+
weightApiObject.responseMessage = null;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (_typeof(freshPackMultiGrowerBinWeightsItem.weightApi) === 'object' && 'completed' in freshPackMultiGrowerBinWeightsItem.weightApi) {
|
|
348
|
+
weightApiObject.completed = function () {
|
|
349
|
+
if (typeof freshPackMultiGrowerBinWeightsItem.weightApi.completed !== 'boolean') {
|
|
350
|
+
return Boolean(freshPackMultiGrowerBinWeightsItem.weightApi.completed);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
return freshPackMultiGrowerBinWeightsItem.weightApi.completed;
|
|
354
|
+
}();
|
|
355
|
+
} else {
|
|
356
|
+
weightApiObject.completed = false;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
return weightApiObject;
|
|
360
|
+
}();
|
|
361
|
+
} else {
|
|
362
|
+
freshPackMultiGrowerBinWeightsItemObject.weightApi = null;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return freshPackMultiGrowerBinWeightsItemObject;
|
|
366
|
+
}();
|
|
367
|
+
});
|
|
368
|
+
}();
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
if ('freshPackMultiGrowerBins' in jsonObject) {
|
|
372
|
+
model.freshPackMultiGrowerBins = function () {
|
|
373
|
+
if (Array.isArray(jsonObject['freshPackMultiGrowerBins']) !== true) {
|
|
374
|
+
return [];
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
return jsonObject['freshPackMultiGrowerBins'].map(function (freshPackMultiGrowerBinsItem) {
|
|
378
|
+
return function () {
|
|
379
|
+
var freshPackMultiGrowerBinsItemObject = {};
|
|
380
|
+
|
|
381
|
+
if (_typeof(freshPackMultiGrowerBinsItem) === 'object' && 'classType' in freshPackMultiGrowerBinsItem) {
|
|
382
|
+
freshPackMultiGrowerBinsItemObject.classType = function () {
|
|
383
|
+
if (typeof freshPackMultiGrowerBinsItem.classType !== 'string') {
|
|
384
|
+
return String(freshPackMultiGrowerBinsItem.classType);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
return freshPackMultiGrowerBinsItem.classType;
|
|
388
|
+
}();
|
|
389
|
+
} else {
|
|
390
|
+
freshPackMultiGrowerBinsItemObject.classType = "";
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (_typeof(freshPackMultiGrowerBinsItem) === 'object' && 'binNumber' in freshPackMultiGrowerBinsItem) {
|
|
394
|
+
freshPackMultiGrowerBinsItemObject.binNumber = function () {
|
|
395
|
+
if (freshPackMultiGrowerBinsItem.binNumber === null) {
|
|
396
|
+
return null;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (typeof freshPackMultiGrowerBinsItem.binNumber !== 'string') {
|
|
400
|
+
return String(freshPackMultiGrowerBinsItem.binNumber);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
return freshPackMultiGrowerBinsItem.binNumber;
|
|
404
|
+
}();
|
|
405
|
+
} else {
|
|
406
|
+
freshPackMultiGrowerBinsItemObject.binNumber = null;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (_typeof(freshPackMultiGrowerBinsItem) === 'object' && 'printBinCard' in freshPackMultiGrowerBinsItem) {
|
|
410
|
+
freshPackMultiGrowerBinsItemObject.printBinCard = function () {
|
|
411
|
+
if (typeof freshPackMultiGrowerBinsItem.printBinCard !== 'boolean') {
|
|
412
|
+
return Boolean(freshPackMultiGrowerBinsItem.printBinCard);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return freshPackMultiGrowerBinsItem.printBinCard;
|
|
416
|
+
}();
|
|
417
|
+
} else {
|
|
418
|
+
freshPackMultiGrowerBinsItemObject.printBinCard = false;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if (_typeof(freshPackMultiGrowerBinsItem) === 'object' && 'binNumberApi' in freshPackMultiGrowerBinsItem) {
|
|
422
|
+
freshPackMultiGrowerBinsItemObject.binNumberApi = function () {
|
|
423
|
+
if (freshPackMultiGrowerBinsItem.binNumberApi === null) {
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
var binNumberApiObject = {};
|
|
428
|
+
|
|
429
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binNumberApi) === 'object' && 'requestCount' in freshPackMultiGrowerBinsItem.binNumberApi) {
|
|
430
|
+
binNumberApiObject.requestCount = function () {
|
|
431
|
+
if (typeof freshPackMultiGrowerBinsItem.binNumberApi.requestCount !== 'number') {
|
|
432
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinsItem.binNumberApi.requestCount)) ? Number(freshPackMultiGrowerBinsItem.binNumberApi.requestCount) : Math.floor(Number(freshPackMultiGrowerBinsItem.binNumberApi.requestCount));
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
return Number.isInteger(freshPackMultiGrowerBinsItem.binNumberApi.requestCount) ? freshPackMultiGrowerBinsItem.binNumberApi.requestCount : Math.floor(freshPackMultiGrowerBinsItem.binNumberApi.requestCount);
|
|
436
|
+
}();
|
|
437
|
+
} else {
|
|
438
|
+
binNumberApiObject.requestCount = 0;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binNumberApi) === 'object' && 'requestTimestamp' in freshPackMultiGrowerBinsItem.binNumberApi) {
|
|
442
|
+
binNumberApiObject.requestTimestamp = function () {
|
|
443
|
+
if (freshPackMultiGrowerBinsItem.binNumberApi.requestTimestamp === null) {
|
|
444
|
+
return null;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
if (typeof freshPackMultiGrowerBinsItem.binNumberApi.requestTimestamp !== 'string') {
|
|
448
|
+
return new Date(String(freshPackMultiGrowerBinsItem.binNumberApi.requestTimestamp));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return new Date(freshPackMultiGrowerBinsItem.binNumberApi.requestTimestamp);
|
|
452
|
+
}();
|
|
453
|
+
} else {
|
|
454
|
+
binNumberApiObject.requestTimestamp = null;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binNumberApi) === 'object' && 'responseCode' in freshPackMultiGrowerBinsItem.binNumberApi) {
|
|
458
|
+
binNumberApiObject.responseCode = function () {
|
|
459
|
+
if (freshPackMultiGrowerBinsItem.binNumberApi.responseCode === null) {
|
|
460
|
+
return null;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
if (typeof freshPackMultiGrowerBinsItem.binNumberApi.responseCode !== 'number') {
|
|
464
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinsItem.binNumberApi.responseCode)) ? Number(freshPackMultiGrowerBinsItem.binNumberApi.responseCode) : Math.floor(Number(freshPackMultiGrowerBinsItem.binNumberApi.responseCode));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
return Number.isInteger(freshPackMultiGrowerBinsItem.binNumberApi.responseCode) ? freshPackMultiGrowerBinsItem.binNumberApi.responseCode : Math.floor(freshPackMultiGrowerBinsItem.binNumberApi.responseCode);
|
|
468
|
+
}();
|
|
469
|
+
} else {
|
|
470
|
+
binNumberApiObject.responseCode = null;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binNumberApi) === 'object' && 'responseMessage' in freshPackMultiGrowerBinsItem.binNumberApi) {
|
|
474
|
+
binNumberApiObject.responseMessage = function () {
|
|
475
|
+
if (freshPackMultiGrowerBinsItem.binNumberApi.responseMessage === null) {
|
|
476
|
+
return null;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if (typeof freshPackMultiGrowerBinsItem.binNumberApi.responseMessage !== 'string') {
|
|
480
|
+
return String(freshPackMultiGrowerBinsItem.binNumberApi.responseMessage);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
return freshPackMultiGrowerBinsItem.binNumberApi.responseMessage;
|
|
484
|
+
}();
|
|
485
|
+
} else {
|
|
486
|
+
binNumberApiObject.responseMessage = null;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binNumberApi) === 'object' && 'completed' in freshPackMultiGrowerBinsItem.binNumberApi) {
|
|
490
|
+
binNumberApiObject.completed = function () {
|
|
491
|
+
if (typeof freshPackMultiGrowerBinsItem.binNumberApi.completed !== 'boolean') {
|
|
492
|
+
return Boolean(freshPackMultiGrowerBinsItem.binNumberApi.completed);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
return freshPackMultiGrowerBinsItem.binNumberApi.completed;
|
|
496
|
+
}();
|
|
497
|
+
} else {
|
|
498
|
+
binNumberApiObject.completed = false;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
return binNumberApiObject;
|
|
502
|
+
}();
|
|
503
|
+
} else {
|
|
504
|
+
freshPackMultiGrowerBinsItemObject.binNumberApi = null;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if (_typeof(freshPackMultiGrowerBinsItem) === 'object' && 'binCardApi' in freshPackMultiGrowerBinsItem) {
|
|
508
|
+
freshPackMultiGrowerBinsItemObject.binCardApi = function () {
|
|
509
|
+
if (freshPackMultiGrowerBinsItem.binCardApi === null) {
|
|
510
|
+
return null;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
var binCardApiObject = {};
|
|
514
|
+
|
|
515
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binCardApi) === 'object' && 'requestCount' in freshPackMultiGrowerBinsItem.binCardApi) {
|
|
516
|
+
binCardApiObject.requestCount = function () {
|
|
517
|
+
if (typeof freshPackMultiGrowerBinsItem.binCardApi.requestCount !== 'number') {
|
|
518
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinsItem.binCardApi.requestCount)) ? Number(freshPackMultiGrowerBinsItem.binCardApi.requestCount) : Math.floor(Number(freshPackMultiGrowerBinsItem.binCardApi.requestCount));
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return Number.isInteger(freshPackMultiGrowerBinsItem.binCardApi.requestCount) ? freshPackMultiGrowerBinsItem.binCardApi.requestCount : Math.floor(freshPackMultiGrowerBinsItem.binCardApi.requestCount);
|
|
522
|
+
}();
|
|
523
|
+
} else {
|
|
524
|
+
binCardApiObject.requestCount = 0;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binCardApi) === 'object' && 'requestTimestamp' in freshPackMultiGrowerBinsItem.binCardApi) {
|
|
528
|
+
binCardApiObject.requestTimestamp = function () {
|
|
529
|
+
if (freshPackMultiGrowerBinsItem.binCardApi.requestTimestamp === null) {
|
|
530
|
+
return null;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (typeof freshPackMultiGrowerBinsItem.binCardApi.requestTimestamp !== 'string') {
|
|
534
|
+
return new Date(String(freshPackMultiGrowerBinsItem.binCardApi.requestTimestamp));
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
return new Date(freshPackMultiGrowerBinsItem.binCardApi.requestTimestamp);
|
|
538
|
+
}();
|
|
539
|
+
} else {
|
|
540
|
+
binCardApiObject.requestTimestamp = null;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binCardApi) === 'object' && 'responseCode' in freshPackMultiGrowerBinsItem.binCardApi) {
|
|
544
|
+
binCardApiObject.responseCode = function () {
|
|
545
|
+
if (freshPackMultiGrowerBinsItem.binCardApi.responseCode === null) {
|
|
546
|
+
return null;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if (typeof freshPackMultiGrowerBinsItem.binCardApi.responseCode !== 'number') {
|
|
550
|
+
return Number.isInteger(Number(freshPackMultiGrowerBinsItem.binCardApi.responseCode)) ? Number(freshPackMultiGrowerBinsItem.binCardApi.responseCode) : Math.floor(Number(freshPackMultiGrowerBinsItem.binCardApi.responseCode));
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
return Number.isInteger(freshPackMultiGrowerBinsItem.binCardApi.responseCode) ? freshPackMultiGrowerBinsItem.binCardApi.responseCode : Math.floor(freshPackMultiGrowerBinsItem.binCardApi.responseCode);
|
|
554
|
+
}();
|
|
555
|
+
} else {
|
|
556
|
+
binCardApiObject.responseCode = null;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binCardApi) === 'object' && 'responseMessage' in freshPackMultiGrowerBinsItem.binCardApi) {
|
|
560
|
+
binCardApiObject.responseMessage = function () {
|
|
561
|
+
if (freshPackMultiGrowerBinsItem.binCardApi.responseMessage === null) {
|
|
562
|
+
return null;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
if (typeof freshPackMultiGrowerBinsItem.binCardApi.responseMessage !== 'string') {
|
|
566
|
+
return String(freshPackMultiGrowerBinsItem.binCardApi.responseMessage);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
return freshPackMultiGrowerBinsItem.binCardApi.responseMessage;
|
|
570
|
+
}();
|
|
571
|
+
} else {
|
|
572
|
+
binCardApiObject.responseMessage = null;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
if (_typeof(freshPackMultiGrowerBinsItem.binCardApi) === 'object' && 'completed' in freshPackMultiGrowerBinsItem.binCardApi) {
|
|
576
|
+
binCardApiObject.completed = function () {
|
|
577
|
+
if (typeof freshPackMultiGrowerBinsItem.binCardApi.completed !== 'boolean') {
|
|
578
|
+
return Boolean(freshPackMultiGrowerBinsItem.binCardApi.completed);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
return freshPackMultiGrowerBinsItem.binCardApi.completed;
|
|
582
|
+
}();
|
|
583
|
+
} else {
|
|
584
|
+
binCardApiObject.completed = false;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
return binCardApiObject;
|
|
588
|
+
}();
|
|
589
|
+
} else {
|
|
590
|
+
freshPackMultiGrowerBinsItemObject.binCardApi = null;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
return freshPackMultiGrowerBinsItemObject;
|
|
594
|
+
}();
|
|
595
|
+
});
|
|
596
|
+
}();
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
if ('deleted' in jsonObject) {
|
|
600
|
+
model.deleted = function () {
|
|
601
|
+
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
602
|
+
return Boolean(jsonObject['deleted']);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
return jsonObject['deleted'];
|
|
606
|
+
}();
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
if ('updateTimestamp' in jsonObject) {
|
|
610
|
+
model.updateTimestamp = function () {
|
|
611
|
+
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
612
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
616
|
+
}();
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
return model;
|
|
620
|
+
}
|
|
621
|
+
}]);
|
|
622
|
+
|
|
623
|
+
return CompacSizerBinWeightModel;
|
|
624
|
+
}(_BaseModel2.default);
|
|
625
|
+
|
|
626
|
+
var _default = CompacSizerBinWeightModel;
|
|
627
|
+
exports.default = _default;
|