@ricado/api-client 2.3.21 → 2.3.23
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/Site/FreshPackBinLotController.js +877 -0
- package/lib/Controllers/Packhouse/Site/FreshPackFruitTemperatureController.js +892 -0
- package/lib/Controllers/Packhouse/Site/ShiftGrowerChangeMeetingController.js +892 -0
- package/lib/Controllers/Packhouse/Site/index.js +9 -0
- package/lib/Controllers/TokenController.js +1 -1
- package/lib/Models/Packhouse/Site/FreshPackBinLotModel.js +265 -0
- package/lib/Models/Packhouse/Site/FreshPackFruitTemperatureModel.js +341 -0
- package/lib/Models/Packhouse/Site/ShiftGrowerChangeMeetingModel.js +333 -0
- package/lib/Models/Packhouse/Site/index.js +9 -0
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +6837 -5691
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/FreshPackBinLotController.js +1008 -0
- package/src/Controllers/Packhouse/Site/FreshPackFruitTemperatureController.js +1023 -0
- package/src/Controllers/Packhouse/Site/ShiftGrowerChangeMeetingController.js +1023 -0
- package/src/Controllers/Packhouse/Site/index.js +6 -0
- package/src/Controllers/TokenController.js +1 -1
- package/src/Models/Packhouse/Site/FreshPackBinLotModel.js +248 -0
- package/src/Models/Packhouse/Site/FreshPackFruitTemperatureModel.js +347 -0
- package/src/Models/Packhouse/Site/ShiftGrowerChangeMeetingModel.js +325 -0
- package/src/Models/Packhouse/Site/index.js +6 -0
- package/src/PackageVersion.js +1 -1
|
@@ -0,0 +1,333 @@
|
|
|
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 Shift Grower Change Meeting
|
|
36
|
+
*
|
|
37
|
+
* @class
|
|
38
|
+
* @hideconstructor
|
|
39
|
+
* @extends BaseModel
|
|
40
|
+
*/
|
|
41
|
+
var ShiftGrowerChangeMeetingModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(ShiftGrowerChangeMeetingModel, _BaseModel);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(ShiftGrowerChangeMeetingModel);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* ShiftGrowerChangeMeetingModel Constructor
|
|
48
|
+
*
|
|
49
|
+
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Shift Grower Change Meeting
|
|
51
|
+
*/
|
|
52
|
+
function ShiftGrowerChangeMeetingModel(siteId) {
|
|
53
|
+
var _this;
|
|
54
|
+
|
|
55
|
+
_classCallCheck(this, ShiftGrowerChangeMeetingModel);
|
|
56
|
+
|
|
57
|
+
_this = _super.call(this);
|
|
58
|
+
/**
|
|
59
|
+
* The Shift Grower Change Meeting ID
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
_this.id = "";
|
|
66
|
+
/**
|
|
67
|
+
* The Packing Line ID this Grower Change Meeting is associated with
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
_this.packingLineId = "";
|
|
74
|
+
/**
|
|
75
|
+
* The Shift ID this Grower Change Meeting is asssociated with
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.shiftId = "";
|
|
82
|
+
/**
|
|
83
|
+
* When this Grower Change Meeting was Created
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.createdTimestamp = new Date();
|
|
90
|
+
/**
|
|
91
|
+
* When this Grower Change Meeting is Scheduled to Begin
|
|
92
|
+
*
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.scheduledTimestamp = new Date();
|
|
98
|
+
/**
|
|
99
|
+
* When this Grower Change Meeting was Started
|
|
100
|
+
*
|
|
101
|
+
* @type {?Date}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.startTimestamp = null;
|
|
106
|
+
/**
|
|
107
|
+
* When this Grower Change Meeting was Completed
|
|
108
|
+
*
|
|
109
|
+
* @type {?Date}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.finishTimestamp = null;
|
|
114
|
+
/**
|
|
115
|
+
* The Packrun ID this Grower Change Meeting relates to
|
|
116
|
+
*
|
|
117
|
+
* @type {string}
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
_this.packrunId = "";
|
|
122
|
+
/**
|
|
123
|
+
* An Optional Rating between 1 and 10 on how Useful the Grower Change Meeting was
|
|
124
|
+
*
|
|
125
|
+
* @type {?number}
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
_this.usefulRating = null;
|
|
130
|
+
/**
|
|
131
|
+
* The Status of this Grower Change Meeting
|
|
132
|
+
*
|
|
133
|
+
* @type {string}
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
_this.status = "";
|
|
138
|
+
/**
|
|
139
|
+
* Whether the Shift Grower Change Meeting has been deleted
|
|
140
|
+
*
|
|
141
|
+
* @type {boolean}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.deleted = false;
|
|
146
|
+
/**
|
|
147
|
+
* When the Shift Grower Change Meeting was last updated
|
|
148
|
+
*
|
|
149
|
+
* @type {Date}
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
_this.updateTimestamp = new Date();
|
|
154
|
+
/**
|
|
155
|
+
* The Site ID associated with this Shift Grower Change Meeting
|
|
156
|
+
*
|
|
157
|
+
* @type {number}
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
_this.siteId = siteId;
|
|
162
|
+
return _this;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Create a new **ShiftGrowerChangeMeetingModel** from a JSON Object or JSON String
|
|
166
|
+
*
|
|
167
|
+
* @static
|
|
168
|
+
* @public
|
|
169
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
170
|
+
* @param {number} siteId The Site ID associated with this Shift Grower Change Meeting
|
|
171
|
+
* @return {ShiftGrowerChangeMeetingModel}
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
_createClass(ShiftGrowerChangeMeetingModel, null, [{
|
|
176
|
+
key: "fromJSON",
|
|
177
|
+
value: function fromJSON(json, siteId) {
|
|
178
|
+
var model = new ShiftGrowerChangeMeetingModel(siteId);
|
|
179
|
+
/**
|
|
180
|
+
* The JSON Object
|
|
181
|
+
*
|
|
182
|
+
* @type {Object<string, any>}
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
var jsonObject = {};
|
|
186
|
+
|
|
187
|
+
if (typeof json === 'string') {
|
|
188
|
+
jsonObject = JSON.parse(json);
|
|
189
|
+
} else if (_typeof(json) === 'object') {
|
|
190
|
+
jsonObject = json;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if ('id' in jsonObject) {
|
|
194
|
+
model.id = function () {
|
|
195
|
+
if (typeof jsonObject['id'] !== 'string') {
|
|
196
|
+
return String(jsonObject['id']);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return jsonObject['id'];
|
|
200
|
+
}();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if ('packingLineId' in jsonObject) {
|
|
204
|
+
model.packingLineId = function () {
|
|
205
|
+
if (typeof jsonObject['packingLineId'] !== 'string') {
|
|
206
|
+
return String(jsonObject['packingLineId']);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return jsonObject['packingLineId'];
|
|
210
|
+
}();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if ('shiftId' in jsonObject) {
|
|
214
|
+
model.shiftId = function () {
|
|
215
|
+
if (typeof jsonObject['shiftId'] !== 'string') {
|
|
216
|
+
return String(jsonObject['shiftId']);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return jsonObject['shiftId'];
|
|
220
|
+
}();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if ('createdTimestamp' in jsonObject) {
|
|
224
|
+
model.createdTimestamp = function () {
|
|
225
|
+
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
226
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
230
|
+
}();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if ('scheduledTimestamp' in jsonObject) {
|
|
234
|
+
model.scheduledTimestamp = function () {
|
|
235
|
+
if (typeof jsonObject['scheduledTimestamp'] !== 'string') {
|
|
236
|
+
return new Date(String(jsonObject['scheduledTimestamp']));
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return new Date(jsonObject['scheduledTimestamp']);
|
|
240
|
+
}();
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if ('startTimestamp' in jsonObject) {
|
|
244
|
+
model.startTimestamp = function () {
|
|
245
|
+
if (jsonObject['startTimestamp'] === null) {
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (typeof jsonObject['startTimestamp'] !== 'string') {
|
|
250
|
+
return new Date(String(jsonObject['startTimestamp']));
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return new Date(jsonObject['startTimestamp']);
|
|
254
|
+
}();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if ('finishTimestamp' in jsonObject) {
|
|
258
|
+
model.finishTimestamp = function () {
|
|
259
|
+
if (jsonObject['finishTimestamp'] === null) {
|
|
260
|
+
return null;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (typeof jsonObject['finishTimestamp'] !== 'string') {
|
|
264
|
+
return new Date(String(jsonObject['finishTimestamp']));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return new Date(jsonObject['finishTimestamp']);
|
|
268
|
+
}();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if ('packrunId' in jsonObject) {
|
|
272
|
+
model.packrunId = function () {
|
|
273
|
+
if (typeof jsonObject['packrunId'] !== 'string') {
|
|
274
|
+
return String(jsonObject['packrunId']);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
return jsonObject['packrunId'];
|
|
278
|
+
}();
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if ('usefulRating' in jsonObject) {
|
|
282
|
+
model.usefulRating = function () {
|
|
283
|
+
if (jsonObject['usefulRating'] === null) {
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (typeof jsonObject['usefulRating'] !== 'number') {
|
|
288
|
+
return Number.isInteger(Number(jsonObject['usefulRating'])) ? Number(jsonObject['usefulRating']) : Math.floor(Number(jsonObject['usefulRating']));
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return Number.isInteger(jsonObject['usefulRating']) ? jsonObject['usefulRating'] : Math.floor(jsonObject['usefulRating']);
|
|
292
|
+
}();
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if ('status' in jsonObject) {
|
|
296
|
+
model.status = function () {
|
|
297
|
+
if (typeof jsonObject['status'] !== 'string') {
|
|
298
|
+
return String(jsonObject['status']);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return jsonObject['status'];
|
|
302
|
+
}();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if ('deleted' in jsonObject) {
|
|
306
|
+
model.deleted = function () {
|
|
307
|
+
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
308
|
+
return Boolean(jsonObject['deleted']);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
return jsonObject['deleted'];
|
|
312
|
+
}();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if ('updateTimestamp' in jsonObject) {
|
|
316
|
+
model.updateTimestamp = function () {
|
|
317
|
+
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
318
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
322
|
+
}();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return model;
|
|
326
|
+
}
|
|
327
|
+
}]);
|
|
328
|
+
|
|
329
|
+
return ShiftGrowerChangeMeetingModel;
|
|
330
|
+
}(_BaseModel2.default);
|
|
331
|
+
|
|
332
|
+
var _default = ShiftGrowerChangeMeetingModel;
|
|
333
|
+
exports.default = _default;
|
|
@@ -31,6 +31,10 @@ var _CompacSizerPackrunSummaryModel = _interopRequireDefault(require("./CompacSi
|
|
|
31
31
|
|
|
32
32
|
var _DowntimeEventModel = _interopRequireDefault(require("./DowntimeEventModel"));
|
|
33
33
|
|
|
34
|
+
var _FreshPackBinLotModel = _interopRequireDefault(require("./FreshPackBinLotModel"));
|
|
35
|
+
|
|
36
|
+
var _FreshPackFruitTemperatureModel = _interopRequireDefault(require("./FreshPackFruitTemperatureModel"));
|
|
37
|
+
|
|
34
38
|
var _FreshPackPackrunSummaryModel = _interopRequireDefault(require("./FreshPackPackrunSummaryModel"));
|
|
35
39
|
|
|
36
40
|
var _FreshQualityPackrunSummaryModel = _interopRequireDefault(require("./FreshQualityPackrunSummaryModel"));
|
|
@@ -59,6 +63,8 @@ var _RejectBinWeightModel = _interopRequireDefault(require("./RejectBinWeightMod
|
|
|
59
63
|
|
|
60
64
|
var _ShiftFocusMeetingModel = _interopRequireDefault(require("./ShiftFocusMeetingModel"));
|
|
61
65
|
|
|
66
|
+
var _ShiftGrowerChangeMeetingModel = _interopRequireDefault(require("./ShiftGrowerChangeMeetingModel"));
|
|
67
|
+
|
|
62
68
|
var _ShiftHourlyEntryModel = _interopRequireDefault(require("./ShiftHourlyEntryModel"));
|
|
63
69
|
|
|
64
70
|
var _ShiftModel = _interopRequireDefault(require("./ShiftModel"));
|
|
@@ -100,6 +106,8 @@ var Site = {
|
|
|
100
106
|
CompacSizerOutletTypeModel: _CompacSizerOutletTypeModel.default,
|
|
101
107
|
CompacSizerPackrunSummaryModel: _CompacSizerPackrunSummaryModel.default,
|
|
102
108
|
DowntimeEventModel: _DowntimeEventModel.default,
|
|
109
|
+
FreshPackBinLotModel: _FreshPackBinLotModel.default,
|
|
110
|
+
FreshPackFruitTemperatureModel: _FreshPackFruitTemperatureModel.default,
|
|
103
111
|
FreshPackPackrunSummaryModel: _FreshPackPackrunSummaryModel.default,
|
|
104
112
|
FreshQualityPackrunSummaryModel: _FreshQualityPackrunSummaryModel.default,
|
|
105
113
|
GrowingMethodModel: _GrowingMethodModel.default,
|
|
@@ -114,6 +122,7 @@ var Site = {
|
|
|
114
122
|
RejectBinScaleModel: _RejectBinScaleModel.default,
|
|
115
123
|
RejectBinWeightModel: _RejectBinWeightModel.default,
|
|
116
124
|
ShiftFocusMeetingModel: _ShiftFocusMeetingModel.default,
|
|
125
|
+
ShiftGrowerChangeMeetingModel: _ShiftGrowerChangeMeetingModel.default,
|
|
117
126
|
ShiftHourlyEntryModel: _ShiftHourlyEntryModel.default,
|
|
118
127
|
ShiftModel: _ShiftModel.default,
|
|
119
128
|
ShiftQualitySummaryModel: _ShiftQualitySummaryModel.default,
|
package/lib/PackageVersion.js
CHANGED