@ricado/api-client 2.3.4 → 2.3.7
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/BinTipBinCardController.js +875 -0
- package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +4 -3
- package/lib/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +891 -0
- package/lib/Controllers/Packhouse/Site/index.js +6 -0
- package/lib/Models/Packhouse/Site/BinTipBinCardModel.js +235 -0
- package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +2 -6
- package/lib/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +373 -0
- package/lib/Models/Packhouse/Site/index.js +6 -0
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +806 -47
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipBinCardController.js +1006 -0
- package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +4 -3
- package/src/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +1022 -0
- package/src/Controllers/Packhouse/Site/index.js +4 -0
- package/src/Models/Packhouse/Site/BinTipBinCardModel.js +215 -0
- package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +2 -7
- package/src/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +370 -0
- package/src/Models/Packhouse/Site/index.js +4 -0
- package/src/PackageVersion.js +1 -1
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _BinTipBinCardController = _interopRequireDefault(require("./BinTipBinCardController"));
|
|
9
|
+
|
|
8
10
|
var _BinTipBinController = _interopRequireDefault(require("./BinTipBinController"));
|
|
9
11
|
|
|
10
12
|
var _BinTipWeightController = _interopRequireDefault(require("./BinTipWeightController"));
|
|
@@ -53,6 +55,8 @@ var _ShiftTaskController = _interopRequireDefault(require("./ShiftTaskController
|
|
|
53
55
|
|
|
54
56
|
var _SoftSortBeltController = _interopRequireDefault(require("./SoftSortBeltController"));
|
|
55
57
|
|
|
58
|
+
var _SoftSortPackrunSummaryController = _interopRequireDefault(require("./SoftSortPackrunSummaryController"));
|
|
59
|
+
|
|
56
60
|
var _VarietyController = _interopRequireDefault(require("./VarietyController"));
|
|
57
61
|
|
|
58
62
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -67,6 +71,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
67
71
|
* @namespace Controllers.Packhouse.Site
|
|
68
72
|
*/
|
|
69
73
|
var Site = {
|
|
74
|
+
BinTipBinCardController: _BinTipBinCardController.default,
|
|
70
75
|
BinTipBinController: _BinTipBinController.default,
|
|
71
76
|
BinTipWeightController: _BinTipWeightController.default,
|
|
72
77
|
CompacSizerBatchController: _CompacSizerBatchController.default,
|
|
@@ -91,6 +96,7 @@ var Site = {
|
|
|
91
96
|
ShiftQualitySummaryController: _ShiftQualitySummaryController.default,
|
|
92
97
|
ShiftTaskController: _ShiftTaskController.default,
|
|
93
98
|
SoftSortBeltController: _SoftSortBeltController.default,
|
|
99
|
+
SoftSortPackrunSummaryController: _SoftSortPackrunSummaryController.default,
|
|
94
100
|
VarietyController: _VarietyController.default
|
|
95
101
|
};
|
|
96
102
|
var _default = Site;
|
|
@@ -0,0 +1,235 @@
|
|
|
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 Bin Tip Bin Card
|
|
36
|
+
*
|
|
37
|
+
* @class
|
|
38
|
+
* @hideconstructor
|
|
39
|
+
* @extends BaseModel
|
|
40
|
+
*/
|
|
41
|
+
var BinTipBinCardModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(BinTipBinCardModel, _BaseModel);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(BinTipBinCardModel);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* BinTipBinCardModel Constructor
|
|
48
|
+
*
|
|
49
|
+
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Bin Tip Bin Card
|
|
51
|
+
*/
|
|
52
|
+
function BinTipBinCardModel(siteId) {
|
|
53
|
+
var _this;
|
|
54
|
+
|
|
55
|
+
_classCallCheck(this, BinTipBinCardModel);
|
|
56
|
+
|
|
57
|
+
_this = _super.call(this);
|
|
58
|
+
/**
|
|
59
|
+
* The Bin Tip Bin Card ID
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
_this.id = "";
|
|
66
|
+
/**
|
|
67
|
+
* The Bin Tip ID associated with this Bin Card
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
_this.binTipId = "";
|
|
74
|
+
/**
|
|
75
|
+
* The Bin ID associated with this Bin Card
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.binTipBinId = "";
|
|
82
|
+
/**
|
|
83
|
+
* When this Bin Card was Created
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.createdTimestamp = new Date();
|
|
90
|
+
/**
|
|
91
|
+
* A Base64 Encoded Image of the Bin Card
|
|
92
|
+
*
|
|
93
|
+
* @type {?string}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.image = null;
|
|
98
|
+
/**
|
|
99
|
+
* Whether the Bin Tip Bin Card has been deleted
|
|
100
|
+
*
|
|
101
|
+
* @type {boolean}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.deleted = false;
|
|
106
|
+
/**
|
|
107
|
+
* When the Bin Tip Bin Card was last updated
|
|
108
|
+
*
|
|
109
|
+
* @type {Date}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.updateTimestamp = new Date();
|
|
114
|
+
/**
|
|
115
|
+
* The Site ID associated with this Bin Tip Bin Card
|
|
116
|
+
*
|
|
117
|
+
* @type {number}
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
_this.siteId = siteId;
|
|
122
|
+
return _this;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Create a new **BinTipBinCardModel** from a JSON Object or JSON String
|
|
126
|
+
*
|
|
127
|
+
* @static
|
|
128
|
+
* @public
|
|
129
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
130
|
+
* @param {number} siteId The Site ID associated with this Bin Tip Bin Card
|
|
131
|
+
* @return {BinTipBinCardModel}
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
_createClass(BinTipBinCardModel, null, [{
|
|
136
|
+
key: "fromJSON",
|
|
137
|
+
value: function fromJSON(json, siteId) {
|
|
138
|
+
var model = new BinTipBinCardModel(siteId);
|
|
139
|
+
/**
|
|
140
|
+
* The JSON Object
|
|
141
|
+
*
|
|
142
|
+
* @type {Object<string, any>}
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
var jsonObject = {};
|
|
146
|
+
|
|
147
|
+
if (typeof json === 'string') {
|
|
148
|
+
jsonObject = JSON.parse(json);
|
|
149
|
+
} else if (_typeof(json) === 'object') {
|
|
150
|
+
jsonObject = json;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if ('id' in jsonObject) {
|
|
154
|
+
model.id = function () {
|
|
155
|
+
if (typeof jsonObject['id'] !== 'string') {
|
|
156
|
+
return String(jsonObject['id']);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return jsonObject['id'];
|
|
160
|
+
}();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if ('binTipId' in jsonObject) {
|
|
164
|
+
model.binTipId = function () {
|
|
165
|
+
if (typeof jsonObject['binTipId'] !== 'string') {
|
|
166
|
+
return String(jsonObject['binTipId']);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return jsonObject['binTipId'];
|
|
170
|
+
}();
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if ('binTipBinId' in jsonObject) {
|
|
174
|
+
model.binTipBinId = function () {
|
|
175
|
+
if (typeof jsonObject['binTipBinId'] !== 'string') {
|
|
176
|
+
return String(jsonObject['binTipBinId']);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return jsonObject['binTipBinId'];
|
|
180
|
+
}();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if ('createdTimestamp' in jsonObject) {
|
|
184
|
+
model.createdTimestamp = function () {
|
|
185
|
+
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
186
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
190
|
+
}();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if ('image' in jsonObject) {
|
|
194
|
+
model.image = function () {
|
|
195
|
+
if (jsonObject['image'] === null) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (typeof jsonObject['image'] !== 'string') {
|
|
200
|
+
return String(jsonObject['image']);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return jsonObject['image'];
|
|
204
|
+
}();
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if ('deleted' in jsonObject) {
|
|
208
|
+
model.deleted = function () {
|
|
209
|
+
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
210
|
+
return Boolean(jsonObject['deleted']);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return jsonObject['deleted'];
|
|
214
|
+
}();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if ('updateTimestamp' in jsonObject) {
|
|
218
|
+
model.updateTimestamp = function () {
|
|
219
|
+
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
220
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
224
|
+
}();
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return model;
|
|
228
|
+
}
|
|
229
|
+
}]);
|
|
230
|
+
|
|
231
|
+
return BinTipBinCardModel;
|
|
232
|
+
}(_BaseModel2.default);
|
|
233
|
+
|
|
234
|
+
var _default = BinTipBinCardModel;
|
|
235
|
+
exports.default = _default;
|
|
@@ -98,11 +98,11 @@ var ShiftQualitySummaryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
98
98
|
/**
|
|
99
99
|
* The User ID of the Quality Manager for this Summary
|
|
100
100
|
*
|
|
101
|
-
* @type {
|
|
101
|
+
* @type {string}
|
|
102
102
|
* @public
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
|
-
_this.qualityManagerUserId =
|
|
105
|
+
_this.qualityManagerUserId = "";
|
|
106
106
|
/**
|
|
107
107
|
* The Name of the Quality Manager for this Summary
|
|
108
108
|
*
|
|
@@ -262,10 +262,6 @@ var ShiftQualitySummaryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
262
262
|
|
|
263
263
|
if ('qualityManagerUserId' in jsonObject) {
|
|
264
264
|
model.qualityManagerUserId = function () {
|
|
265
|
-
if (jsonObject['qualityManagerUserId'] === null) {
|
|
266
|
-
return null;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
265
|
if (typeof jsonObject['qualityManagerUserId'] !== 'string') {
|
|
270
266
|
return String(jsonObject['qualityManagerUserId']);
|
|
271
267
|
}
|
|
@@ -0,0 +1,373 @@
|
|
|
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 Soft-Sort Packrun Summary
|
|
36
|
+
*
|
|
37
|
+
* @class
|
|
38
|
+
* @hideconstructor
|
|
39
|
+
* @extends BaseModel
|
|
40
|
+
*/
|
|
41
|
+
var SoftSortPackrunSummaryModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(SoftSortPackrunSummaryModel, _BaseModel);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(SoftSortPackrunSummaryModel);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* SoftSortPackrunSummaryModel Constructor
|
|
48
|
+
*
|
|
49
|
+
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Soft-Sort Packrun Summary
|
|
51
|
+
*/
|
|
52
|
+
function SoftSortPackrunSummaryModel(siteId) {
|
|
53
|
+
var _this;
|
|
54
|
+
|
|
55
|
+
_classCallCheck(this, SoftSortPackrunSummaryModel);
|
|
56
|
+
|
|
57
|
+
_this = _super.call(this);
|
|
58
|
+
/**
|
|
59
|
+
* The Soft-Sort Packrun Summary ID
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
_this.id = "";
|
|
66
|
+
/**
|
|
67
|
+
* The Packing Line ID this Summary is associated with
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
_this.packingLineId = "";
|
|
74
|
+
/**
|
|
75
|
+
* The Packrun ID this Summary is associated with
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.packrunId = "";
|
|
82
|
+
/**
|
|
83
|
+
* When this Summary was Created
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.createdTimestamp = new Date();
|
|
90
|
+
/**
|
|
91
|
+
* The Number of Soft-Sort Events per Bin Tipped
|
|
92
|
+
*
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.eventsPerBin = 0;
|
|
98
|
+
/**
|
|
99
|
+
* The Number of Soft-Sort Events that occurred for the Packrun
|
|
100
|
+
*
|
|
101
|
+
* @type {number}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.totalEventsCount = 0;
|
|
106
|
+
/**
|
|
107
|
+
* The Average Duration of Soft-Sort Events for the Packrun expressed in Seconds
|
|
108
|
+
*
|
|
109
|
+
* @type {number}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.averageEventsDuration = 0;
|
|
114
|
+
/**
|
|
115
|
+
* The Total Duration of all Soft-Sort Events for the Packrun expressed in Seconds
|
|
116
|
+
*
|
|
117
|
+
* @type {number}
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
_this.totalEventsDuration = 0;
|
|
122
|
+
/**
|
|
123
|
+
* Whether the Soft-Sort Events Data for this Summary has been Finalized
|
|
124
|
+
*
|
|
125
|
+
* @type {?Date}
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
_this.eventsFinalizedTimestamp = null;
|
|
130
|
+
/**
|
|
131
|
+
* Whether the Soft-Sort Events for this Summary are considered accurate or not
|
|
132
|
+
*
|
|
133
|
+
* @type {?boolean}
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
_this.eventsAccurate = null;
|
|
138
|
+
/**
|
|
139
|
+
* A Reason for why the Events for this Summary are not accurate. Applies when `eventsAccurate` is false
|
|
140
|
+
*
|
|
141
|
+
* @type {?string}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.eventsNotAccurateReason = null;
|
|
146
|
+
/**
|
|
147
|
+
* The FreshPack Soft-Sort API Data
|
|
148
|
+
*
|
|
149
|
+
* @type {?Object}
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
_this.freshPackSoftSortApi = null;
|
|
154
|
+
/**
|
|
155
|
+
* Whether the Soft-Sort Packrun Summary has been deleted
|
|
156
|
+
*
|
|
157
|
+
* @type {boolean}
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
_this.deleted = false;
|
|
162
|
+
/**
|
|
163
|
+
* When the Soft-Sort Packrun Summary was last updated
|
|
164
|
+
*
|
|
165
|
+
* @type {Date}
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
_this.updateTimestamp = new Date();
|
|
170
|
+
/**
|
|
171
|
+
* The Site ID associated with this Soft-Sort Packrun Summary
|
|
172
|
+
*
|
|
173
|
+
* @type {number}
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
_this.siteId = siteId;
|
|
178
|
+
return _this;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Create a new **SoftSortPackrunSummaryModel** from a JSON Object or JSON String
|
|
182
|
+
*
|
|
183
|
+
* @static
|
|
184
|
+
* @public
|
|
185
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
186
|
+
* @param {number} siteId The Site ID associated with this Soft-Sort Packrun Summary
|
|
187
|
+
* @return {SoftSortPackrunSummaryModel}
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
_createClass(SoftSortPackrunSummaryModel, null, [{
|
|
192
|
+
key: "fromJSON",
|
|
193
|
+
value: function fromJSON(json, siteId) {
|
|
194
|
+
var model = new SoftSortPackrunSummaryModel(siteId);
|
|
195
|
+
/**
|
|
196
|
+
* The JSON Object
|
|
197
|
+
*
|
|
198
|
+
* @type {Object<string, any>}
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
var jsonObject = {};
|
|
202
|
+
|
|
203
|
+
if (typeof json === 'string') {
|
|
204
|
+
jsonObject = JSON.parse(json);
|
|
205
|
+
} else if (_typeof(json) === 'object') {
|
|
206
|
+
jsonObject = json;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if ('id' in jsonObject) {
|
|
210
|
+
model.id = function () {
|
|
211
|
+
if (typeof jsonObject['id'] !== 'string') {
|
|
212
|
+
return String(jsonObject['id']);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return jsonObject['id'];
|
|
216
|
+
}();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if ('packingLineId' in jsonObject) {
|
|
220
|
+
model.packingLineId = function () {
|
|
221
|
+
if (typeof jsonObject['packingLineId'] !== 'string') {
|
|
222
|
+
return String(jsonObject['packingLineId']);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return jsonObject['packingLineId'];
|
|
226
|
+
}();
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if ('packrunId' in jsonObject) {
|
|
230
|
+
model.packrunId = function () {
|
|
231
|
+
if (typeof jsonObject['packrunId'] !== 'string') {
|
|
232
|
+
return String(jsonObject['packrunId']);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return jsonObject['packrunId'];
|
|
236
|
+
}();
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if ('createdTimestamp' in jsonObject) {
|
|
240
|
+
model.createdTimestamp = function () {
|
|
241
|
+
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
242
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
246
|
+
}();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if ('eventsPerBin' in jsonObject) {
|
|
250
|
+
model.eventsPerBin = function () {
|
|
251
|
+
if (typeof jsonObject['eventsPerBin'] !== 'number') {
|
|
252
|
+
return Number(jsonObject['eventsPerBin']);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return jsonObject['eventsPerBin'];
|
|
256
|
+
}();
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if ('totalEventsCount' in jsonObject) {
|
|
260
|
+
model.totalEventsCount = function () {
|
|
261
|
+
if (typeof jsonObject['totalEventsCount'] !== 'number') {
|
|
262
|
+
return Number.isInteger(Number(jsonObject['totalEventsCount'])) ? Number(jsonObject['totalEventsCount']) : Math.floor(Number(jsonObject['totalEventsCount']));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
return Number.isInteger(jsonObject['totalEventsCount']) ? jsonObject['totalEventsCount'] : Math.floor(jsonObject['totalEventsCount']);
|
|
266
|
+
}();
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if ('averageEventsDuration' in jsonObject) {
|
|
270
|
+
model.averageEventsDuration = function () {
|
|
271
|
+
if (typeof jsonObject['averageEventsDuration'] !== 'number') {
|
|
272
|
+
return Number(jsonObject['averageEventsDuration']);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return jsonObject['averageEventsDuration'];
|
|
276
|
+
}();
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if ('totalEventsDuration' in jsonObject) {
|
|
280
|
+
model.totalEventsDuration = function () {
|
|
281
|
+
if (typeof jsonObject['totalEventsDuration'] !== 'number') {
|
|
282
|
+
return Number(jsonObject['totalEventsDuration']);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
return jsonObject['totalEventsDuration'];
|
|
286
|
+
}();
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if ('eventsFinalizedTimestamp' in jsonObject) {
|
|
290
|
+
model.eventsFinalizedTimestamp = function () {
|
|
291
|
+
if (jsonObject['eventsFinalizedTimestamp'] === null) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (typeof jsonObject['eventsFinalizedTimestamp'] !== 'string') {
|
|
296
|
+
return new Date(String(jsonObject['eventsFinalizedTimestamp']));
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
return new Date(jsonObject['eventsFinalizedTimestamp']);
|
|
300
|
+
}();
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if ('eventsAccurate' in jsonObject) {
|
|
304
|
+
model.eventsAccurate = function () {
|
|
305
|
+
if (jsonObject['eventsAccurate'] === null) {
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (typeof jsonObject['eventsAccurate'] !== 'boolean') {
|
|
310
|
+
return Boolean(jsonObject['eventsAccurate']);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return jsonObject['eventsAccurate'];
|
|
314
|
+
}();
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if ('eventsNotAccurateReason' in jsonObject) {
|
|
318
|
+
model.eventsNotAccurateReason = function () {
|
|
319
|
+
if (jsonObject['eventsNotAccurateReason'] === null) {
|
|
320
|
+
return null;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (typeof jsonObject['eventsNotAccurateReason'] !== 'string') {
|
|
324
|
+
return String(jsonObject['eventsNotAccurateReason']);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return jsonObject['eventsNotAccurateReason'];
|
|
328
|
+
}();
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if ('freshPackSoftSortApi' in jsonObject) {
|
|
332
|
+
model.freshPackSoftSortApi = function () {
|
|
333
|
+
if (jsonObject['freshPackSoftSortApi'] === null) {
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if (_typeof(jsonObject['freshPackSoftSortApi']) !== 'object') {
|
|
338
|
+
return Object(jsonObject['freshPackSoftSortApi']);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
return jsonObject['freshPackSoftSortApi'];
|
|
342
|
+
}();
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if ('deleted' in jsonObject) {
|
|
346
|
+
model.deleted = function () {
|
|
347
|
+
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
348
|
+
return Boolean(jsonObject['deleted']);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
return jsonObject['deleted'];
|
|
352
|
+
}();
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if ('updateTimestamp' in jsonObject) {
|
|
356
|
+
model.updateTimestamp = function () {
|
|
357
|
+
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
358
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
362
|
+
}();
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return model;
|
|
366
|
+
}
|
|
367
|
+
}]);
|
|
368
|
+
|
|
369
|
+
return SoftSortPackrunSummaryModel;
|
|
370
|
+
}(_BaseModel2.default);
|
|
371
|
+
|
|
372
|
+
var _default = SoftSortPackrunSummaryModel;
|
|
373
|
+
exports.default = _default;
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _BinTipBinCardModel = _interopRequireDefault(require("./BinTipBinCardModel"));
|
|
9
|
+
|
|
8
10
|
var _BinTipBinModel = _interopRequireDefault(require("./BinTipBinModel"));
|
|
9
11
|
|
|
10
12
|
var _BinTipWeightModel = _interopRequireDefault(require("./BinTipWeightModel"));
|
|
@@ -53,6 +55,8 @@ var _ShiftTaskModel = _interopRequireDefault(require("./ShiftTaskModel"));
|
|
|
53
55
|
|
|
54
56
|
var _SoftSortBeltModel = _interopRequireDefault(require("./SoftSortBeltModel"));
|
|
55
57
|
|
|
58
|
+
var _SoftSortPackrunSummaryModel = _interopRequireDefault(require("./SoftSortPackrunSummaryModel"));
|
|
59
|
+
|
|
56
60
|
var _VarietyModel = _interopRequireDefault(require("./VarietyModel"));
|
|
57
61
|
|
|
58
62
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -67,6 +71,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
67
71
|
* @namespace Models.Packhouse.Site
|
|
68
72
|
*/
|
|
69
73
|
var Site = {
|
|
74
|
+
BinTipBinCardModel: _BinTipBinCardModel.default,
|
|
70
75
|
BinTipBinModel: _BinTipBinModel.default,
|
|
71
76
|
BinTipWeightModel: _BinTipWeightModel.default,
|
|
72
77
|
CompacSizerBatchModel: _CompacSizerBatchModel.default,
|
|
@@ -91,6 +96,7 @@ var Site = {
|
|
|
91
96
|
ShiftQualitySummaryModel: _ShiftQualitySummaryModel.default,
|
|
92
97
|
ShiftTaskModel: _ShiftTaskModel.default,
|
|
93
98
|
SoftSortBeltModel: _SoftSortBeltModel.default,
|
|
99
|
+
SoftSortPackrunSummaryModel: _SoftSortPackrunSummaryModel.default,
|
|
94
100
|
VarietyModel: _VarietyModel.default
|
|
95
101
|
};
|
|
96
102
|
var _default = Site;
|