@ricado/api-client 2.6.0 → 2.7.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 (29) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/PackingLineController.js +2 -1
  3. package/lib/Controllers/Packhouse/Site/ReemoonSizerBatchController.js +915 -0
  4. package/lib/Controllers/Packhouse/Site/ReemoonSizerController.js +300 -0
  5. package/lib/Controllers/Packhouse/Site/ReemoonSizerOutletProductChangeController.js +885 -0
  6. package/lib/Controllers/Packhouse/Site/ReemoonSizerPackrunSummaryController.js +914 -0
  7. package/lib/Controllers/Packhouse/Site/index.js +12 -0
  8. package/lib/Models/Packhouse/Site/PackingLineModel.js +38 -1
  9. package/lib/Models/Packhouse/Site/ReemoonSizerBatchModel.js +547 -0
  10. package/lib/Models/Packhouse/Site/ReemoonSizerModel.js +1272 -0
  11. package/lib/Models/Packhouse/Site/ReemoonSizerOutletProductChangeModel.js +293 -0
  12. package/lib/Models/Packhouse/Site/ReemoonSizerPackrunSummaryModel.js +461 -0
  13. package/lib/Models/Packhouse/Site/index.js +12 -0
  14. package/lib/PackageVersion.js +1 -1
  15. package/lib/index.d.ts +7128 -5158
  16. package/package.json +1 -1
  17. package/src/Controllers/Packhouse/Site/PackingLineController.js +2 -1
  18. package/src/Controllers/Packhouse/Site/ReemoonSizerBatchController.js +1046 -0
  19. package/src/Controllers/Packhouse/Site/ReemoonSizerController.js +277 -0
  20. package/src/Controllers/Packhouse/Site/ReemoonSizerOutletProductChangeController.js +1016 -0
  21. package/src/Controllers/Packhouse/Site/ReemoonSizerPackrunSummaryController.js +1045 -0
  22. package/src/Controllers/Packhouse/Site/index.js +8 -0
  23. package/src/Models/Packhouse/Site/PackingLineModel.js +49 -1
  24. package/src/Models/Packhouse/Site/ReemoonSizerBatchModel.js +596 -0
  25. package/src/Models/Packhouse/Site/ReemoonSizerModel.js +1576 -0
  26. package/src/Models/Packhouse/Site/ReemoonSizerOutletProductChangeModel.js +280 -0
  27. package/src/Models/Packhouse/Site/ReemoonSizerPackrunSummaryModel.js +501 -0
  28. package/src/Models/Packhouse/Site/index.js +8 -0
  29. package/src/PackageVersion.js +1 -1
@@ -0,0 +1,293 @@
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 Reemoon Sizer Outlet Product Change
36
+ *
37
+ * @class
38
+ * @hideconstructor
39
+ * @extends BaseModel
40
+ */
41
+ var ReemoonSizerOutletProductChangeModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(ReemoonSizerOutletProductChangeModel, _BaseModel);
43
+
44
+ var _super = _createSuper(ReemoonSizerOutletProductChangeModel);
45
+
46
+ /**
47
+ * ReemoonSizerOutletProductChangeModel Constructor
48
+ *
49
+ * @protected
50
+ * @param {number} siteId The Site ID associated with this Reemoon Sizer Outlet Product Change
51
+ */
52
+ function ReemoonSizerOutletProductChangeModel(siteId) {
53
+ var _this;
54
+
55
+ _classCallCheck(this, ReemoonSizerOutletProductChangeModel);
56
+
57
+ _this = _super.call(this);
58
+ /**
59
+ * The Reemoon Sizer Outlet Product Change ID
60
+ *
61
+ * @type {string}
62
+ * @public
63
+ */
64
+
65
+ _this.id = "";
66
+ /**
67
+ * The Reemoon Sizer ID this Outlet Change is associated with
68
+ *
69
+ * @type {string}
70
+ * @public
71
+ */
72
+
73
+ _this.reemoonSizerId = "";
74
+ /**
75
+ * The Sizer Outlet Number this Outlet Change is associated with
76
+ *
77
+ * @type {string}
78
+ * @public
79
+ */
80
+
81
+ _this.outletNumber = "";
82
+ /**
83
+ * When this Outlet Change occurred
84
+ *
85
+ * @type {Date}
86
+ * @public
87
+ */
88
+
89
+ _this.createdTimestamp = new Date();
90
+ /**
91
+ * The ID of the Previous Product that was active on the Outlet
92
+ *
93
+ * @type {?number}
94
+ * @public
95
+ */
96
+
97
+ _this.previousProductId = null;
98
+ /**
99
+ * The Name of the Previous Product that was active on the Outlet
100
+ *
101
+ * @type {?string}
102
+ * @public
103
+ */
104
+
105
+ _this.previousProductName = null;
106
+ /**
107
+ * The ID of the New Product that is now active on the Outlet
108
+ *
109
+ * @type {number}
110
+ * @public
111
+ */
112
+
113
+ _this.newProductId = 0;
114
+ /**
115
+ * The Name of the New Product that is now active on the Outlet
116
+ *
117
+ * @type {string}
118
+ * @public
119
+ */
120
+
121
+ _this.newProductName = "";
122
+ /**
123
+ * Whether the Reemoon Sizer Outlet Product Change has been deleted
124
+ *
125
+ * @type {boolean}
126
+ * @public
127
+ */
128
+
129
+ _this.deleted = false;
130
+ /**
131
+ * When the Reemoon Sizer Outlet Product Change was last updated
132
+ *
133
+ * @type {Date}
134
+ * @public
135
+ */
136
+
137
+ _this.updateTimestamp = new Date();
138
+ /**
139
+ * The Site ID associated with this Reemoon Sizer Outlet Product Change
140
+ *
141
+ * @type {number}
142
+ * @public
143
+ */
144
+
145
+ _this.siteId = siteId;
146
+ return _this;
147
+ }
148
+ /**
149
+ * Create a new **ReemoonSizerOutletProductChangeModel** 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 Reemoon Sizer Outlet Product Change
155
+ * @return {ReemoonSizerOutletProductChangeModel}
156
+ */
157
+
158
+
159
+ _createClass(ReemoonSizerOutletProductChangeModel, null, [{
160
+ key: "fromJSON",
161
+ value: function fromJSON(json, siteId) {
162
+ var model = new ReemoonSizerOutletProductChangeModel(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 ('reemoonSizerId' in jsonObject) {
188
+ model.reemoonSizerId = function () {
189
+ if (typeof jsonObject['reemoonSizerId'] !== 'string') {
190
+ return String(jsonObject['reemoonSizerId']);
191
+ }
192
+
193
+ return jsonObject['reemoonSizerId'];
194
+ }();
195
+ }
196
+
197
+ if ('outletNumber' in jsonObject) {
198
+ model.outletNumber = function () {
199
+ if (typeof jsonObject['outletNumber'] !== 'string') {
200
+ return String(jsonObject['outletNumber']);
201
+ }
202
+
203
+ return jsonObject['outletNumber'];
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 ('previousProductId' in jsonObject) {
218
+ model.previousProductId = function () {
219
+ if (jsonObject['previousProductId'] === null) {
220
+ return null;
221
+ }
222
+
223
+ if (typeof jsonObject['previousProductId'] !== 'number') {
224
+ return Number.isInteger(Number(jsonObject['previousProductId'])) ? Number(jsonObject['previousProductId']) : Math.floor(Number(jsonObject['previousProductId']));
225
+ }
226
+
227
+ return Number.isInteger(jsonObject['previousProductId']) ? jsonObject['previousProductId'] : Math.floor(jsonObject['previousProductId']);
228
+ }();
229
+ }
230
+
231
+ if ('previousProductName' in jsonObject) {
232
+ model.previousProductName = function () {
233
+ if (jsonObject['previousProductName'] === null) {
234
+ return null;
235
+ }
236
+
237
+ if (typeof jsonObject['previousProductName'] !== 'string') {
238
+ return String(jsonObject['previousProductName']);
239
+ }
240
+
241
+ return jsonObject['previousProductName'];
242
+ }();
243
+ }
244
+
245
+ if ('newProductId' in jsonObject) {
246
+ model.newProductId = function () {
247
+ if (typeof jsonObject['newProductId'] !== 'number') {
248
+ return Number.isInteger(Number(jsonObject['newProductId'])) ? Number(jsonObject['newProductId']) : Math.floor(Number(jsonObject['newProductId']));
249
+ }
250
+
251
+ return Number.isInteger(jsonObject['newProductId']) ? jsonObject['newProductId'] : Math.floor(jsonObject['newProductId']);
252
+ }();
253
+ }
254
+
255
+ if ('newProductName' in jsonObject) {
256
+ model.newProductName = function () {
257
+ if (typeof jsonObject['newProductName'] !== 'string') {
258
+ return String(jsonObject['newProductName']);
259
+ }
260
+
261
+ return jsonObject['newProductName'];
262
+ }();
263
+ }
264
+
265
+ if ('deleted' in jsonObject) {
266
+ model.deleted = function () {
267
+ if (typeof jsonObject['deleted'] !== 'boolean') {
268
+ return Boolean(jsonObject['deleted']);
269
+ }
270
+
271
+ return jsonObject['deleted'];
272
+ }();
273
+ }
274
+
275
+ if ('updateTimestamp' in jsonObject) {
276
+ model.updateTimestamp = function () {
277
+ if (typeof jsonObject['updateTimestamp'] !== 'string') {
278
+ return new Date(String(jsonObject['updateTimestamp']));
279
+ }
280
+
281
+ return new Date(jsonObject['updateTimestamp']);
282
+ }();
283
+ }
284
+
285
+ return model;
286
+ }
287
+ }]);
288
+
289
+ return ReemoonSizerOutletProductChangeModel;
290
+ }(_BaseModel2.default);
291
+
292
+ var _default = ReemoonSizerOutletProductChangeModel;
293
+ exports.default = _default;