@ricado/api-client 2.0.2 → 2.2.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 (155) hide show
  1. package/README.md +5 -7
  2. package/dist/ricado.api.client.js +1 -1
  3. package/lib/Controllers/Packhouse/Site/BinTipBinController.js +622 -0
  4. package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  5. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  6. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +7 -7
  7. package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  8. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  9. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  10. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  11. package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  12. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  13. package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +657 -0
  14. package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  15. package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  16. package/lib/Controllers/Packhouse/Site/PackingLineController.js +29 -5
  17. package/lib/Controllers/Packhouse/Site/PackrunController.js +46 -4
  18. package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  19. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +28 -6
  20. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  21. package/lib/Controllers/Packhouse/Site/ShiftController.js +4 -4
  22. package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  23. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +19 -4
  24. package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +661 -0
  25. package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +628 -0
  26. package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +453 -0
  27. package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
  28. package/lib/Controllers/Packhouse/Site/index.js +15 -0
  29. package/lib/Controllers/Site/AlarmController.js +4 -4
  30. package/lib/Controllers/Site/AlarmGroupController.js +4 -4
  31. package/lib/Controllers/Site/DefinitionController.js +4 -4
  32. package/lib/Controllers/Site/PermanentObjectController.js +4 -4
  33. package/lib/Controllers/Site/PermanentObjectDataController.js +4 -4
  34. package/lib/Controllers/Site/PointController.js +4 -4
  35. package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
  36. package/lib/Errors/BadRequestError.js +1 -1
  37. package/lib/Errors/ForbiddenError.js +1 -1
  38. package/lib/Errors/NetworkError.js +1 -1
  39. package/lib/Errors/NotAllowedError.js +1 -1
  40. package/lib/Errors/NotFoundError.js +1 -1
  41. package/lib/Errors/ServerError.js +1 -1
  42. package/lib/Errors/UnauthorizedError.js +1 -1
  43. package/lib/Models/AccountPolicyModel.js +1 -1
  44. package/lib/Models/ApiAccountModel.js +1 -1
  45. package/lib/Models/CompanyModel.js +1 -1
  46. package/lib/Models/FirebaseTokenModel.js +1 -1
  47. package/lib/Models/Packhouse/Site/BinTipBinModel.js +367 -0
  48. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +14 -4
  49. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +14 -4
  50. package/lib/Models/Packhouse/Site/CompacSizerModel.js +15 -5
  51. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +14 -4
  52. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +14 -4
  53. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +14 -4
  54. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +14 -4
  55. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -4
  56. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +14 -4
  57. package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +481 -0
  58. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +14 -4
  59. package/lib/Models/Packhouse/Site/PackTypeModel.js +14 -4
  60. package/lib/Models/Packhouse/Site/PackingLineModel.js +538 -5
  61. package/lib/Models/Packhouse/Site/PackrunModel.js +80 -4
  62. package/lib/Models/Packhouse/Site/RejectBinModel.js +14 -4
  63. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +274 -8
  64. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +14 -4
  65. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +14 -4
  66. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +181 -5
  67. package/lib/Models/Packhouse/Site/ShiftModel.js +14 -4
  68. package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +599 -0
  69. package/lib/Models/Packhouse/Site/ShiftTaskModel.js +373 -0
  70. package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +235 -0
  71. package/lib/Models/Packhouse/Site/VarietyModel.js +14 -4
  72. package/lib/Models/Packhouse/Site/index.js +15 -0
  73. package/lib/Models/RTUModel.js +1 -1
  74. package/lib/Models/RTUPluginModel.js +1 -1
  75. package/lib/Models/Site/AlarmGroupModel.js +14 -4
  76. package/lib/Models/Site/AlarmModel.js +14 -4
  77. package/lib/Models/Site/DefinitionModel.js +14 -4
  78. package/lib/Models/Site/PermanentObjectDataModel.js +14 -4
  79. package/lib/Models/Site/PermanentObjectModel.js +14 -4
  80. package/lib/Models/Site/PointModel.js +14 -4
  81. package/lib/Models/Site/TemporaryObjectModel.js +14 -4
  82. package/lib/Models/SiteModel.js +1 -1
  83. package/lib/Models/TokenModel.js +1 -1
  84. package/lib/Models/UserAccountActionTokenModel.js +1 -1
  85. package/lib/Models/UserAccountModel.js +1 -1
  86. package/lib/PackageVersion.js +1 -1
  87. package/lib/index.d.ts +4039 -1071
  88. package/package.json +1 -1
  89. package/src/Controllers/Packhouse/Site/BinTipBinController.js +665 -0
  90. package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  91. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  92. package/src/Controllers/Packhouse/Site/CompacSizerController.js +7 -7
  93. package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  94. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  95. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  96. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  97. package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  98. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  99. package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +700 -0
  100. package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  101. package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  102. package/src/Controllers/Packhouse/Site/PackingLineController.js +29 -5
  103. package/src/Controllers/Packhouse/Site/PackrunController.js +56 -4
  104. package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  105. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +28 -6
  106. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  107. package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
  108. package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  109. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +19 -4
  110. package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +704 -0
  111. package/src/Controllers/Packhouse/Site/ShiftTaskController.js +671 -0
  112. package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +474 -0
  113. package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
  114. package/src/Controllers/Packhouse/Site/index.js +10 -0
  115. package/src/Controllers/Site/AlarmController.js +4 -4
  116. package/src/Controllers/Site/AlarmGroupController.js +4 -4
  117. package/src/Controllers/Site/DefinitionController.js +4 -4
  118. package/src/Controllers/Site/PermanentObjectController.js +4 -4
  119. package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
  120. package/src/Controllers/Site/PointController.js +4 -4
  121. package/src/Controllers/Site/TemporaryObjectController.js +4 -4
  122. package/src/Models/Packhouse/Site/BinTipBinModel.js +365 -0
  123. package/src/Models/Packhouse/Site/BinTipWeightModel.js +13 -3
  124. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +13 -3
  125. package/src/Models/Packhouse/Site/CompacSizerModel.js +14 -4
  126. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +13 -3
  127. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +13 -3
  128. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +13 -3
  129. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +13 -3
  130. package/src/Models/Packhouse/Site/DowntimeEventModel.js +13 -3
  131. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +13 -3
  132. package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +523 -0
  133. package/src/Models/Packhouse/Site/GrowingMethodModel.js +13 -3
  134. package/src/Models/Packhouse/Site/PackTypeModel.js +13 -3
  135. package/src/Models/Packhouse/Site/PackingLineModel.js +718 -4
  136. package/src/Models/Packhouse/Site/PackrunModel.js +88 -3
  137. package/src/Models/Packhouse/Site/RejectBinModel.js +13 -3
  138. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +310 -7
  139. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +13 -3
  140. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +13 -3
  141. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +205 -4
  142. package/src/Models/Packhouse/Site/ShiftModel.js +13 -3
  143. package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +664 -0
  144. package/src/Models/Packhouse/Site/ShiftTaskModel.js +369 -0
  145. package/src/Models/Packhouse/Site/SoftSortBeltModel.js +215 -0
  146. package/src/Models/Packhouse/Site/VarietyModel.js +13 -3
  147. package/src/Models/Packhouse/Site/index.js +10 -0
  148. package/src/Models/Site/AlarmGroupModel.js +13 -3
  149. package/src/Models/Site/AlarmModel.js +13 -3
  150. package/src/Models/Site/DefinitionModel.js +13 -3
  151. package/src/Models/Site/PermanentObjectDataModel.js +13 -3
  152. package/src/Models/Site/PermanentObjectModel.js +13 -3
  153. package/src/Models/Site/PointModel.js +13 -3
  154. package/src/Models/Site/TemporaryObjectModel.js +13 -3
  155. package/src/PackageVersion.js +1 -1
@@ -0,0 +1,481 @@
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 FreshQuality Packrun Summary
36
+ *
37
+ * @class
38
+ * @hideconstructor
39
+ * @extends BaseModel
40
+ */
41
+ var FreshQualityPackrunSummaryModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(FreshQualityPackrunSummaryModel, _BaseModel);
43
+
44
+ var _super = _createSuper(FreshQualityPackrunSummaryModel);
45
+
46
+ /**
47
+ * FreshQualityPackrunSummaryModel Constructor
48
+ *
49
+ * @protected
50
+ * @param {number} siteId The Site ID associated with this FreshQuality Packrun Summary
51
+ */
52
+ function FreshQualityPackrunSummaryModel(siteId) {
53
+ var _this;
54
+
55
+ _classCallCheck(this, FreshQualityPackrunSummaryModel);
56
+
57
+ _this = _super.call(this);
58
+ /**
59
+ * The FreshQuality Packrun Summary ID
60
+ *
61
+ * @type {string}
62
+ * @public
63
+ */
64
+
65
+ _this.id = undefined;
66
+ /**
67
+ * The Packing Line ID this Summary is associated with
68
+ *
69
+ * @type {string}
70
+ * @public
71
+ */
72
+
73
+ _this.packingLineId = undefined;
74
+ /**
75
+ * The Packrun ID this Summary is associated with
76
+ *
77
+ * @type {string}
78
+ * @public
79
+ */
80
+
81
+ _this.packrunId = undefined;
82
+ /**
83
+ * When this Summary was Created
84
+ *
85
+ * @type {Date}
86
+ * @public
87
+ */
88
+
89
+ _this.createdTimestamp = undefined;
90
+ /**
91
+ * The Time Batch this Summary is associated with
92
+ *
93
+ * @type {?string}
94
+ * @public
95
+ */
96
+
97
+ _this.timeBatchId = undefined;
98
+ /**
99
+ * An Array of Class 1 R600 Samples
100
+ *
101
+ * @type {Array<{fruitSize: string, packType: string, timestamp: Date, fruitCount: number, defects: Array<{name: string, group: string, fruitCount: number}>}>}
102
+ * @public
103
+ */
104
+
105
+ _this.class1R600Samples = undefined;
106
+ /**
107
+ * An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)
108
+ *
109
+ * @type {Array<{name: string, percentage: number, defects: Array<{name: string, fruitCount: number, percentage: number}>}>}
110
+ * @public
111
+ */
112
+
113
+ _this.categorySummaries = undefined;
114
+ /**
115
+ * The Total Number of Fruit Sampled in this Packrun Summary
116
+ *
117
+ * @type {number}
118
+ * @public
119
+ */
120
+
121
+ _this.totalFruitSampled = undefined;
122
+ /**
123
+ * Whether the FreshQuality Packrun Summary has been deleted
124
+ *
125
+ * @type {boolean}
126
+ * @public
127
+ */
128
+
129
+ _this.deleted = undefined;
130
+ /**
131
+ * When the FreshQuality Packrun Summary was last updated
132
+ *
133
+ * @type {Date}
134
+ * @public
135
+ */
136
+
137
+ _this.updateTimestamp = undefined;
138
+ /**
139
+ * The Site ID associated with this FreshQuality Packrun Summary
140
+ *
141
+ * @type {number}
142
+ * @public
143
+ */
144
+
145
+ _this.siteId = siteId;
146
+ return _this;
147
+ }
148
+ /**
149
+ * Create a new **FreshQualityPackrunSummaryModel** 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 FreshQuality Packrun Summary
155
+ * @return {FreshQualityPackrunSummaryModel}
156
+ */
157
+
158
+
159
+ _createClass(FreshQualityPackrunSummaryModel, null, [{
160
+ key: "fromJSON",
161
+ value: function fromJSON(json, siteId) {
162
+ var model = new FreshQualityPackrunSummaryModel(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 ('packingLineId' in jsonObject) {
188
+ model.packingLineId = function () {
189
+ if (typeof jsonObject['packingLineId'] !== 'string') {
190
+ return String(jsonObject['packingLineId']);
191
+ }
192
+
193
+ return jsonObject['packingLineId'];
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 ('class1R600Samples' in jsonObject) {
232
+ model.class1R600Samples = function () {
233
+ if (Array.isArray(jsonObject['class1R600Samples']) !== true) {
234
+ return [];
235
+ }
236
+
237
+ return jsonObject['class1R600Samples'].map(function (class1R600SamplesItem) {
238
+ return function () {
239
+ var class1R600SamplesItemObject = {};
240
+
241
+ if (_typeof(class1R600SamplesItem) === 'object' && 'fruitSize' in class1R600SamplesItem) {
242
+ class1R600SamplesItemObject.fruitSize = function () {
243
+ if (typeof class1R600SamplesItem.fruitSize !== 'string') {
244
+ return String(class1R600SamplesItem.fruitSize);
245
+ }
246
+
247
+ return class1R600SamplesItem.fruitSize;
248
+ }();
249
+ } else {
250
+ class1R600SamplesItemObject.fruitSize = "";
251
+ }
252
+
253
+ if (_typeof(class1R600SamplesItem) === 'object' && 'packType' in class1R600SamplesItem) {
254
+ class1R600SamplesItemObject.packType = function () {
255
+ if (typeof class1R600SamplesItem.packType !== 'string') {
256
+ return String(class1R600SamplesItem.packType);
257
+ }
258
+
259
+ return class1R600SamplesItem.packType;
260
+ }();
261
+ } else {
262
+ class1R600SamplesItemObject.packType = "";
263
+ }
264
+
265
+ if (_typeof(class1R600SamplesItem) === 'object' && 'timestamp' in class1R600SamplesItem) {
266
+ class1R600SamplesItemObject.timestamp = function () {
267
+ if (typeof class1R600SamplesItem.timestamp !== 'string') {
268
+ return new Date(String(class1R600SamplesItem.timestamp));
269
+ }
270
+
271
+ return new Date(class1R600SamplesItem.timestamp);
272
+ }();
273
+ } else {
274
+ class1R600SamplesItemObject.timestamp = new Date();
275
+ }
276
+
277
+ if (_typeof(class1R600SamplesItem) === 'object' && 'fruitCount' in class1R600SamplesItem) {
278
+ class1R600SamplesItemObject.fruitCount = function () {
279
+ if (typeof class1R600SamplesItem.fruitCount !== 'number') {
280
+ return Number.isInteger(Number(class1R600SamplesItem.fruitCount)) ? Number(class1R600SamplesItem.fruitCount) : Math.floor(Number(class1R600SamplesItem.fruitCount));
281
+ }
282
+
283
+ return Number.isInteger(class1R600SamplesItem.fruitCount) ? class1R600SamplesItem.fruitCount : Math.floor(class1R600SamplesItem.fruitCount);
284
+ }();
285
+ } else {
286
+ class1R600SamplesItemObject.fruitCount = 0;
287
+ }
288
+
289
+ if (_typeof(class1R600SamplesItem) === 'object' && 'defects' in class1R600SamplesItem) {
290
+ class1R600SamplesItemObject.defects = function () {
291
+ if (Array.isArray(class1R600SamplesItem.defects) !== true) {
292
+ return [];
293
+ }
294
+
295
+ return class1R600SamplesItem.defects.map(function (defectsItem) {
296
+ return function () {
297
+ var defectsItemObject = {};
298
+
299
+ if (_typeof(defectsItem) === 'object' && 'name' in defectsItem) {
300
+ defectsItemObject.name = function () {
301
+ if (typeof defectsItem.name !== 'string') {
302
+ return String(defectsItem.name);
303
+ }
304
+
305
+ return defectsItem.name;
306
+ }();
307
+ } else {
308
+ defectsItemObject.name = "";
309
+ }
310
+
311
+ if (_typeof(defectsItem) === 'object' && 'group' in defectsItem) {
312
+ defectsItemObject.group = function () {
313
+ if (typeof defectsItem.group !== 'string') {
314
+ return String(defectsItem.group);
315
+ }
316
+
317
+ return defectsItem.group;
318
+ }();
319
+ } else {
320
+ defectsItemObject.group = "";
321
+ }
322
+
323
+ if (_typeof(defectsItem) === 'object' && 'fruitCount' in defectsItem) {
324
+ defectsItemObject.fruitCount = function () {
325
+ if (typeof defectsItem.fruitCount !== 'number') {
326
+ return Number.isInteger(Number(defectsItem.fruitCount)) ? Number(defectsItem.fruitCount) : Math.floor(Number(defectsItem.fruitCount));
327
+ }
328
+
329
+ return Number.isInteger(defectsItem.fruitCount) ? defectsItem.fruitCount : Math.floor(defectsItem.fruitCount);
330
+ }();
331
+ } else {
332
+ defectsItemObject.fruitCount = 0;
333
+ }
334
+
335
+ return defectsItemObject;
336
+ }();
337
+ });
338
+ }();
339
+ } else {
340
+ class1R600SamplesItemObject.defects = [];
341
+ }
342
+
343
+ return class1R600SamplesItemObject;
344
+ }();
345
+ });
346
+ }();
347
+ }
348
+
349
+ if ('categorySummaries' in jsonObject) {
350
+ model.categorySummaries = function () {
351
+ if (Array.isArray(jsonObject['categorySummaries']) !== true) {
352
+ return [];
353
+ }
354
+
355
+ return jsonObject['categorySummaries'].map(function (categorySummariesItem) {
356
+ return function () {
357
+ var categorySummariesItemObject = {};
358
+
359
+ if (_typeof(categorySummariesItem) === 'object' && 'name' in categorySummariesItem) {
360
+ categorySummariesItemObject.name = function () {
361
+ if (typeof categorySummariesItem.name !== 'string') {
362
+ return String(categorySummariesItem.name);
363
+ }
364
+
365
+ return categorySummariesItem.name;
366
+ }();
367
+ } else {
368
+ categorySummariesItemObject.name = "";
369
+ }
370
+
371
+ if (_typeof(categorySummariesItem) === 'object' && 'percentage' in categorySummariesItem) {
372
+ categorySummariesItemObject.percentage = function () {
373
+ if (typeof categorySummariesItem.percentage !== 'number') {
374
+ return Number(categorySummariesItem.percentage);
375
+ }
376
+
377
+ return categorySummariesItem.percentage;
378
+ }();
379
+ } else {
380
+ categorySummariesItemObject.percentage = 0;
381
+ }
382
+
383
+ if (_typeof(categorySummariesItem) === 'object' && 'defects' in categorySummariesItem) {
384
+ categorySummariesItemObject.defects = function () {
385
+ if (Array.isArray(categorySummariesItem.defects) !== true) {
386
+ return [];
387
+ }
388
+
389
+ return categorySummariesItem.defects.map(function (defectsItem) {
390
+ return function () {
391
+ var defectsItemObject = {};
392
+
393
+ if (_typeof(defectsItem) === 'object' && 'name' in defectsItem) {
394
+ defectsItemObject.name = function () {
395
+ if (typeof defectsItem.name !== 'string') {
396
+ return String(defectsItem.name);
397
+ }
398
+
399
+ return defectsItem.name;
400
+ }();
401
+ } else {
402
+ defectsItemObject.name = "";
403
+ }
404
+
405
+ if (_typeof(defectsItem) === 'object' && 'fruitCount' in defectsItem) {
406
+ defectsItemObject.fruitCount = function () {
407
+ if (typeof defectsItem.fruitCount !== 'number') {
408
+ return Number.isInteger(Number(defectsItem.fruitCount)) ? Number(defectsItem.fruitCount) : Math.floor(Number(defectsItem.fruitCount));
409
+ }
410
+
411
+ return Number.isInteger(defectsItem.fruitCount) ? defectsItem.fruitCount : Math.floor(defectsItem.fruitCount);
412
+ }();
413
+ } else {
414
+ defectsItemObject.fruitCount = 0;
415
+ }
416
+
417
+ if (_typeof(defectsItem) === 'object' && 'percentage' in defectsItem) {
418
+ defectsItemObject.percentage = function () {
419
+ if (typeof defectsItem.percentage !== 'number') {
420
+ return Number(defectsItem.percentage);
421
+ }
422
+
423
+ return defectsItem.percentage;
424
+ }();
425
+ } else {
426
+ defectsItemObject.percentage = 0;
427
+ }
428
+
429
+ return defectsItemObject;
430
+ }();
431
+ });
432
+ }();
433
+ } else {
434
+ categorySummariesItemObject.defects = [];
435
+ }
436
+
437
+ return categorySummariesItemObject;
438
+ }();
439
+ });
440
+ }();
441
+ }
442
+
443
+ if ('totalFruitSampled' in jsonObject) {
444
+ model.totalFruitSampled = function () {
445
+ if (typeof jsonObject['totalFruitSampled'] !== 'number') {
446
+ return Number.isInteger(Number(jsonObject['totalFruitSampled'])) ? Number(jsonObject['totalFruitSampled']) : Math.floor(Number(jsonObject['totalFruitSampled']));
447
+ }
448
+
449
+ return Number.isInteger(jsonObject['totalFruitSampled']) ? jsonObject['totalFruitSampled'] : Math.floor(jsonObject['totalFruitSampled']);
450
+ }();
451
+ }
452
+
453
+ if ('deleted' in jsonObject) {
454
+ model.deleted = function () {
455
+ if (typeof jsonObject['deleted'] !== 'boolean') {
456
+ return Boolean(jsonObject['deleted']);
457
+ }
458
+
459
+ return jsonObject['deleted'];
460
+ }();
461
+ }
462
+
463
+ if ('updateTimestamp' in jsonObject) {
464
+ model.updateTimestamp = function () {
465
+ if (typeof jsonObject['updateTimestamp'] !== 'string') {
466
+ return new Date(String(jsonObject['updateTimestamp']));
467
+ }
468
+
469
+ return new Date(jsonObject['updateTimestamp']);
470
+ }();
471
+ }
472
+
473
+ return model;
474
+ }
475
+ }]);
476
+
477
+ return FreshQualityPackrunSummaryModel;
478
+ }(_BaseModel2.default);
479
+
480
+ var _default = FreshQualityPackrunSummaryModel;
481
+ exports.default = _default;
@@ -17,7 +17,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
17
17
 
18
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
19
 
20
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
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
21
 
22
22
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
23
 
@@ -47,8 +47,9 @@ var GrowingMethodModel = /*#__PURE__*/function (_BaseModel) {
47
47
  * GrowingMethodModel Constructor
48
48
  *
49
49
  * @protected
50
+ * @param {number} siteId The Site ID associated with this Growing Method
50
51
  */
51
- function GrowingMethodModel() {
52
+ function GrowingMethodModel(siteId) {
52
53
  var _this;
53
54
 
54
55
  _classCallCheck(this, GrowingMethodModel);
@@ -102,6 +103,14 @@ var GrowingMethodModel = /*#__PURE__*/function (_BaseModel) {
102
103
  */
103
104
 
104
105
  _this.updateTimestamp = undefined;
106
+ /**
107
+ * The Site ID associated with this Growing Method
108
+ *
109
+ * @type {number}
110
+ * @public
111
+ */
112
+
113
+ _this.siteId = siteId;
105
114
  return _this;
106
115
  }
107
116
  /**
@@ -110,14 +119,15 @@ var GrowingMethodModel = /*#__PURE__*/function (_BaseModel) {
110
119
  * @static
111
120
  * @public
112
121
  * @param {Object<string, any>|string} json A JSON Object or JSON String
122
+ * @param {number} siteId The Site ID associated with this Growing Method
113
123
  * @return {GrowingMethodModel}
114
124
  */
115
125
 
116
126
 
117
127
  _createClass(GrowingMethodModel, null, [{
118
128
  key: "fromJSON",
119
- value: function fromJSON(json) {
120
- var model = new GrowingMethodModel();
129
+ value: function fromJSON(json, siteId) {
130
+ var model = new GrowingMethodModel(siteId);
121
131
  /**
122
132
  * The JSON Object
123
133
  *
@@ -17,7 +17,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
17
17
 
18
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
19
 
20
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
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
21
 
22
22
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
23
 
@@ -47,8 +47,9 @@ var PackTypeModel = /*#__PURE__*/function (_BaseModel) {
47
47
  * PackTypeModel Constructor
48
48
  *
49
49
  * @protected
50
+ * @param {number} siteId The Site ID associated with this Pack Type
50
51
  */
51
- function PackTypeModel() {
52
+ function PackTypeModel(siteId) {
52
53
  var _this;
53
54
 
54
55
  _classCallCheck(this, PackTypeModel);
@@ -118,6 +119,14 @@ var PackTypeModel = /*#__PURE__*/function (_BaseModel) {
118
119
  */
119
120
 
120
121
  _this.updateTimestamp = undefined;
122
+ /**
123
+ * The Site ID associated with this Pack Type
124
+ *
125
+ * @type {number}
126
+ * @public
127
+ */
128
+
129
+ _this.siteId = siteId;
121
130
  return _this;
122
131
  }
123
132
  /**
@@ -126,14 +135,15 @@ var PackTypeModel = /*#__PURE__*/function (_BaseModel) {
126
135
  * @static
127
136
  * @public
128
137
  * @param {Object<string, any>|string} json A JSON Object or JSON String
138
+ * @param {number} siteId The Site ID associated with this Pack Type
129
139
  * @return {PackTypeModel}
130
140
  */
131
141
 
132
142
 
133
143
  _createClass(PackTypeModel, null, [{
134
144
  key: "fromJSON",
135
- value: function fromJSON(json) {
136
- var model = new PackTypeModel();
145
+ value: function fromJSON(json, siteId) {
146
+ var model = new PackTypeModel(siteId);
137
147
  /**
138
148
  * The JSON Object
139
149
  *