@ricado/api-client 2.3.9 → 2.3.12

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 (39) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/MAFSizerBatchController.js +926 -0
  3. package/lib/Controllers/Packhouse/Site/MAFSizerController.js +217 -0
  4. package/lib/Controllers/Packhouse/Site/MAFSizerOutletArticleChangeController.js +879 -0
  5. package/lib/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +922 -0
  6. package/lib/Controllers/Packhouse/Site/PackrunController.js +54 -33
  7. package/lib/Controllers/Packhouse/Site/ShiftController.js +23 -0
  8. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +13 -7
  9. package/lib/Controllers/Packhouse/Site/ShiftSummaryReportController.js +908 -0
  10. package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +1 -0
  11. package/lib/Controllers/Packhouse/Site/index.js +15 -0
  12. package/lib/Models/Packhouse/Site/MAFSizerBatchModel.js +555 -0
  13. package/lib/Models/Packhouse/Site/MAFSizerModel.js +445 -0
  14. package/lib/Models/Packhouse/Site/MAFSizerOutletArticleChangeModel.js +253 -0
  15. package/lib/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +473 -0
  16. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +75 -5
  17. package/lib/Models/Packhouse/Site/ShiftSummaryReportModel.js +427 -0
  18. package/lib/Models/Packhouse/Site/index.js +15 -0
  19. package/lib/PackageVersion.js +2 -2
  20. package/lib/index.d.ts +5434 -3242
  21. package/package.json +1 -1
  22. package/src/Controllers/Packhouse/Site/MAFSizerBatchController.js +1057 -0
  23. package/src/Controllers/Packhouse/Site/MAFSizerController.js +194 -0
  24. package/src/Controllers/Packhouse/Site/MAFSizerOutletArticleChangeController.js +1010 -0
  25. package/src/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +1053 -0
  26. package/src/Controllers/Packhouse/Site/PackrunController.js +59 -33
  27. package/src/Controllers/Packhouse/Site/ShiftController.js +22 -0
  28. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +13 -7
  29. package/src/Controllers/Packhouse/Site/ShiftSummaryReportController.js +1039 -0
  30. package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +1 -0
  31. package/src/Controllers/Packhouse/Site/index.js +10 -0
  32. package/src/Models/Packhouse/Site/MAFSizerBatchModel.js +598 -0
  33. package/src/Models/Packhouse/Site/MAFSizerModel.js +450 -0
  34. package/src/Models/Packhouse/Site/MAFSizerOutletArticleChangeModel.js +235 -0
  35. package/src/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +511 -0
  36. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +85 -5
  37. package/src/Models/Packhouse/Site/ShiftSummaryReportModel.js +451 -0
  38. package/src/Models/Packhouse/Site/index.js +10 -0
  39. package/src/PackageVersion.js +2 -2
@@ -0,0 +1,427 @@
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 Summary Report
36
+ *
37
+ * @class
38
+ * @hideconstructor
39
+ * @extends BaseModel
40
+ */
41
+ var ShiftSummaryReportModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(ShiftSummaryReportModel, _BaseModel);
43
+
44
+ var _super = _createSuper(ShiftSummaryReportModel);
45
+
46
+ /**
47
+ * ShiftSummaryReportModel Constructor
48
+ *
49
+ * @protected
50
+ * @param {number} siteId The Site ID associated with this Shift Summary Report
51
+ */
52
+ function ShiftSummaryReportModel(siteId) {
53
+ var _this;
54
+
55
+ _classCallCheck(this, ShiftSummaryReportModel);
56
+
57
+ _this = _super.call(this);
58
+ /**
59
+ * The Shift Summary Report ID
60
+ *
61
+ * @type {string}
62
+ * @public
63
+ */
64
+
65
+ _this.id = "";
66
+ /**
67
+ * The Packing Line ID this Summary Report is associated with
68
+ *
69
+ * @type {string}
70
+ * @public
71
+ */
72
+
73
+ _this.packingLineId = "";
74
+ /**
75
+ * The Shift ID this Summary Report relates to
76
+ *
77
+ * @type {string}
78
+ * @public
79
+ */
80
+
81
+ _this.shiftId = "";
82
+ /**
83
+ * When this Summary Report was Created
84
+ *
85
+ * @type {Date}
86
+ * @public
87
+ */
88
+
89
+ _this.createdTimestamp = new Date();
90
+ /**
91
+ * The Base64 Encoded PDF Report
92
+ *
93
+ * @type {?string}
94
+ * @public
95
+ */
96
+
97
+ _this.pdfReportContent = null;
98
+ /**
99
+ * The Filename that should be used with the PDF Report
100
+ *
101
+ * @type {?string}
102
+ * @public
103
+ */
104
+
105
+ _this.pdfReportFileName = null;
106
+ /**
107
+ * The SendGrid API Status indicating progress when sending emails
108
+ *
109
+ * @type {?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}}
110
+ * @public
111
+ */
112
+
113
+ _this.sendGridApi = null;
114
+ /**
115
+ * Whether the Report is in the process of being Emailed
116
+ *
117
+ * @type {string}
118
+ * @public
119
+ */
120
+
121
+ _this.status = "";
122
+ /**
123
+ * An Array of Email Contacts that were sent this Summary Report
124
+ *
125
+ * @type {Array<{email: string, firstName: string, lastName: string}>}
126
+ * @public
127
+ */
128
+
129
+ _this.emailContacts = [];
130
+ /**
131
+ * Whether the Shift Summary Report has been deleted
132
+ *
133
+ * @type {boolean}
134
+ * @public
135
+ */
136
+
137
+ _this.deleted = false;
138
+ /**
139
+ * When the Shift Summary Report was last updated
140
+ *
141
+ * @type {Date}
142
+ * @public
143
+ */
144
+
145
+ _this.updateTimestamp = new Date();
146
+ /**
147
+ * The Site ID associated with this Shift Summary Report
148
+ *
149
+ * @type {number}
150
+ * @public
151
+ */
152
+
153
+ _this.siteId = siteId;
154
+ return _this;
155
+ }
156
+ /**
157
+ * Create a new **ShiftSummaryReportModel** from a JSON Object or JSON String
158
+ *
159
+ * @static
160
+ * @public
161
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
162
+ * @param {number} siteId The Site ID associated with this Shift Summary Report
163
+ * @return {ShiftSummaryReportModel}
164
+ */
165
+
166
+
167
+ _createClass(ShiftSummaryReportModel, null, [{
168
+ key: "fromJSON",
169
+ value: function fromJSON(json, siteId) {
170
+ var model = new ShiftSummaryReportModel(siteId);
171
+ /**
172
+ * The JSON Object
173
+ *
174
+ * @type {Object<string, any>}
175
+ */
176
+
177
+ var jsonObject = {};
178
+
179
+ if (typeof json === 'string') {
180
+ jsonObject = JSON.parse(json);
181
+ } else if (_typeof(json) === 'object') {
182
+ jsonObject = json;
183
+ }
184
+
185
+ if ('id' in jsonObject) {
186
+ model.id = function () {
187
+ if (typeof jsonObject['id'] !== 'string') {
188
+ return String(jsonObject['id']);
189
+ }
190
+
191
+ return jsonObject['id'];
192
+ }();
193
+ }
194
+
195
+ if ('packingLineId' in jsonObject) {
196
+ model.packingLineId = function () {
197
+ if (typeof jsonObject['packingLineId'] !== 'string') {
198
+ return String(jsonObject['packingLineId']);
199
+ }
200
+
201
+ return jsonObject['packingLineId'];
202
+ }();
203
+ }
204
+
205
+ if ('shiftId' in jsonObject) {
206
+ model.shiftId = function () {
207
+ if (typeof jsonObject['shiftId'] !== 'string') {
208
+ return String(jsonObject['shiftId']);
209
+ }
210
+
211
+ return jsonObject['shiftId'];
212
+ }();
213
+ }
214
+
215
+ if ('createdTimestamp' in jsonObject) {
216
+ model.createdTimestamp = function () {
217
+ if (typeof jsonObject['createdTimestamp'] !== 'string') {
218
+ return new Date(String(jsonObject['createdTimestamp']));
219
+ }
220
+
221
+ return new Date(jsonObject['createdTimestamp']);
222
+ }();
223
+ }
224
+
225
+ if ('pdfReportContent' in jsonObject) {
226
+ model.pdfReportContent = function () {
227
+ if (jsonObject['pdfReportContent'] === null) {
228
+ return null;
229
+ }
230
+
231
+ if (typeof jsonObject['pdfReportContent'] !== 'string') {
232
+ return String(jsonObject['pdfReportContent']);
233
+ }
234
+
235
+ return jsonObject['pdfReportContent'];
236
+ }();
237
+ }
238
+
239
+ if ('pdfReportFileName' in jsonObject) {
240
+ model.pdfReportFileName = function () {
241
+ if (jsonObject['pdfReportFileName'] === null) {
242
+ return null;
243
+ }
244
+
245
+ if (typeof jsonObject['pdfReportFileName'] !== 'string') {
246
+ return String(jsonObject['pdfReportFileName']);
247
+ }
248
+
249
+ return jsonObject['pdfReportFileName'];
250
+ }();
251
+ }
252
+
253
+ if ('sendGridApi' in jsonObject) {
254
+ model.sendGridApi = function () {
255
+ if (jsonObject['sendGridApi'] === null) {
256
+ return null;
257
+ }
258
+
259
+ var sendGridApiObject = {};
260
+
261
+ if (_typeof(jsonObject['sendGridApi']) === 'object' && 'requestCount' in jsonObject['sendGridApi']) {
262
+ sendGridApiObject.requestCount = function () {
263
+ if (typeof jsonObject['sendGridApi'].requestCount !== 'number') {
264
+ return Number.isInteger(Number(jsonObject['sendGridApi'].requestCount)) ? Number(jsonObject['sendGridApi'].requestCount) : Math.floor(Number(jsonObject['sendGridApi'].requestCount));
265
+ }
266
+
267
+ return Number.isInteger(jsonObject['sendGridApi'].requestCount) ? jsonObject['sendGridApi'].requestCount : Math.floor(jsonObject['sendGridApi'].requestCount);
268
+ }();
269
+ } else {
270
+ sendGridApiObject.requestCount = 0;
271
+ }
272
+
273
+ if (_typeof(jsonObject['sendGridApi']) === 'object' && 'requestTimestamp' in jsonObject['sendGridApi']) {
274
+ sendGridApiObject.requestTimestamp = function () {
275
+ if (jsonObject['sendGridApi'].requestTimestamp === null) {
276
+ return null;
277
+ }
278
+
279
+ if (typeof jsonObject['sendGridApi'].requestTimestamp !== 'string') {
280
+ return new Date(String(jsonObject['sendGridApi'].requestTimestamp));
281
+ }
282
+
283
+ return new Date(jsonObject['sendGridApi'].requestTimestamp);
284
+ }();
285
+ } else {
286
+ sendGridApiObject.requestTimestamp = null;
287
+ }
288
+
289
+ if (_typeof(jsonObject['sendGridApi']) === 'object' && 'responseCode' in jsonObject['sendGridApi']) {
290
+ sendGridApiObject.responseCode = function () {
291
+ if (jsonObject['sendGridApi'].responseCode === null) {
292
+ return null;
293
+ }
294
+
295
+ if (typeof jsonObject['sendGridApi'].responseCode !== 'number') {
296
+ return Number.isInteger(Number(jsonObject['sendGridApi'].responseCode)) ? Number(jsonObject['sendGridApi'].responseCode) : Math.floor(Number(jsonObject['sendGridApi'].responseCode));
297
+ }
298
+
299
+ return Number.isInteger(jsonObject['sendGridApi'].responseCode) ? jsonObject['sendGridApi'].responseCode : Math.floor(jsonObject['sendGridApi'].responseCode);
300
+ }();
301
+ } else {
302
+ sendGridApiObject.responseCode = null;
303
+ }
304
+
305
+ if (_typeof(jsonObject['sendGridApi']) === 'object' && 'responseMessage' in jsonObject['sendGridApi']) {
306
+ sendGridApiObject.responseMessage = function () {
307
+ if (jsonObject['sendGridApi'].responseMessage === null) {
308
+ return null;
309
+ }
310
+
311
+ if (typeof jsonObject['sendGridApi'].responseMessage !== 'string') {
312
+ return String(jsonObject['sendGridApi'].responseMessage);
313
+ }
314
+
315
+ return jsonObject['sendGridApi'].responseMessage;
316
+ }();
317
+ } else {
318
+ sendGridApiObject.responseMessage = null;
319
+ }
320
+
321
+ if (_typeof(jsonObject['sendGridApi']) === 'object' && 'completed' in jsonObject['sendGridApi']) {
322
+ sendGridApiObject.completed = function () {
323
+ if (typeof jsonObject['sendGridApi'].completed !== 'boolean') {
324
+ return Boolean(jsonObject['sendGridApi'].completed);
325
+ }
326
+
327
+ return jsonObject['sendGridApi'].completed;
328
+ }();
329
+ } else {
330
+ sendGridApiObject.completed = false;
331
+ }
332
+
333
+ return sendGridApiObject;
334
+ }();
335
+ }
336
+
337
+ if ('status' in jsonObject) {
338
+ model.status = function () {
339
+ if (typeof jsonObject['status'] !== 'string') {
340
+ return String(jsonObject['status']);
341
+ }
342
+
343
+ return jsonObject['status'];
344
+ }();
345
+ }
346
+
347
+ if ('emailContacts' in jsonObject) {
348
+ model.emailContacts = function () {
349
+ if (Array.isArray(jsonObject['emailContacts']) !== true) {
350
+ return [];
351
+ }
352
+
353
+ return jsonObject['emailContacts'].map(function (emailContactsItem) {
354
+ return function () {
355
+ var emailContactsItemObject = {};
356
+
357
+ if (_typeof(emailContactsItem) === 'object' && 'email' in emailContactsItem) {
358
+ emailContactsItemObject.email = function () {
359
+ if (typeof emailContactsItem.email !== 'string') {
360
+ return String(emailContactsItem.email);
361
+ }
362
+
363
+ return emailContactsItem.email;
364
+ }();
365
+ } else {
366
+ emailContactsItemObject.email = "";
367
+ }
368
+
369
+ if (_typeof(emailContactsItem) === 'object' && 'firstName' in emailContactsItem) {
370
+ emailContactsItemObject.firstName = function () {
371
+ if (typeof emailContactsItem.firstName !== 'string') {
372
+ return String(emailContactsItem.firstName);
373
+ }
374
+
375
+ return emailContactsItem.firstName;
376
+ }();
377
+ } else {
378
+ emailContactsItemObject.firstName = "";
379
+ }
380
+
381
+ if (_typeof(emailContactsItem) === 'object' && 'lastName' in emailContactsItem) {
382
+ emailContactsItemObject.lastName = function () {
383
+ if (typeof emailContactsItem.lastName !== 'string') {
384
+ return String(emailContactsItem.lastName);
385
+ }
386
+
387
+ return emailContactsItem.lastName;
388
+ }();
389
+ } else {
390
+ emailContactsItemObject.lastName = "";
391
+ }
392
+
393
+ return emailContactsItemObject;
394
+ }();
395
+ });
396
+ }();
397
+ }
398
+
399
+ if ('deleted' in jsonObject) {
400
+ model.deleted = function () {
401
+ if (typeof jsonObject['deleted'] !== 'boolean') {
402
+ return Boolean(jsonObject['deleted']);
403
+ }
404
+
405
+ return jsonObject['deleted'];
406
+ }();
407
+ }
408
+
409
+ if ('updateTimestamp' in jsonObject) {
410
+ model.updateTimestamp = function () {
411
+ if (typeof jsonObject['updateTimestamp'] !== 'string') {
412
+ return new Date(String(jsonObject['updateTimestamp']));
413
+ }
414
+
415
+ return new Date(jsonObject['updateTimestamp']);
416
+ }();
417
+ }
418
+
419
+ return model;
420
+ }
421
+ }]);
422
+
423
+ return ShiftSummaryReportModel;
424
+ }(_BaseModel2.default);
425
+
426
+ var _default = ShiftSummaryReportModel;
427
+ exports.default = _default;
@@ -31,6 +31,14 @@ var _FreshQualityPackrunSummaryModel = _interopRequireDefault(require("./FreshQu
31
31
 
32
32
  var _GrowingMethodModel = _interopRequireDefault(require("./GrowingMethodModel"));
33
33
 
34
+ var _MAFSizerBatchModel = _interopRequireDefault(require("./MAFSizerBatchModel"));
35
+
36
+ var _MAFSizerModel = _interopRequireDefault(require("./MAFSizerModel"));
37
+
38
+ var _MAFSizerOutletArticleChangeModel = _interopRequireDefault(require("./MAFSizerOutletArticleChangeModel"));
39
+
40
+ var _MAFSizerPackrunSummaryModel = _interopRequireDefault(require("./MAFSizerPackrunSummaryModel"));
41
+
34
42
  var _PackTypeModel = _interopRequireDefault(require("./PackTypeModel"));
35
43
 
36
44
  var _PackingLineModel = _interopRequireDefault(require("./PackingLineModel"));
@@ -51,6 +59,8 @@ var _ShiftModel = _interopRequireDefault(require("./ShiftModel"));
51
59
 
52
60
  var _ShiftQualitySummaryModel = _interopRequireDefault(require("./ShiftQualitySummaryModel"));
53
61
 
62
+ var _ShiftSummaryReportModel = _interopRequireDefault(require("./ShiftSummaryReportModel"));
63
+
54
64
  var _ShiftTaskModel = _interopRequireDefault(require("./ShiftTaskModel"));
55
65
 
56
66
  var _SoftSortBeltModel = _interopRequireDefault(require("./SoftSortBeltModel"));
@@ -84,6 +94,10 @@ var Site = {
84
94
  FreshPackPackrunSummaryModel: _FreshPackPackrunSummaryModel.default,
85
95
  FreshQualityPackrunSummaryModel: _FreshQualityPackrunSummaryModel.default,
86
96
  GrowingMethodModel: _GrowingMethodModel.default,
97
+ MAFSizerBatchModel: _MAFSizerBatchModel.default,
98
+ MAFSizerModel: _MAFSizerModel.default,
99
+ MAFSizerOutletArticleChangeModel: _MAFSizerOutletArticleChangeModel.default,
100
+ MAFSizerPackrunSummaryModel: _MAFSizerPackrunSummaryModel.default,
87
101
  PackTypeModel: _PackTypeModel.default,
88
102
  PackingLineModel: _PackingLineModel.default,
89
103
  PackrunModel: _PackrunModel.default,
@@ -94,6 +108,7 @@ var Site = {
94
108
  ShiftHourlyEntryModel: _ShiftHourlyEntryModel.default,
95
109
  ShiftModel: _ShiftModel.default,
96
110
  ShiftQualitySummaryModel: _ShiftQualitySummaryModel.default,
111
+ ShiftSummaryReportModel: _ShiftSummaryReportModel.default,
97
112
  ShiftTaskModel: _ShiftTaskModel.default,
98
113
  SoftSortBeltModel: _SoftSortBeltModel.default,
99
114
  SoftSortPackrunSummaryModel: _SoftSortPackrunSummaryModel.default,
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = void 0;
7
- // generated by genversion
8
- var version = '2.3.9';
7
+ // Generated by genversion.
8
+ var version = '2.3.12';
9
9
  exports.version = version;