@ricado/api-client 2.0.0 → 2.1.1
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/README.md +5 -7
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/AccountPolicyController.js +1 -1
- package/lib/Controllers/ApiAccountController.js +2 -2
- package/lib/Controllers/CompanyController.js +1 -1
- package/lib/Controllers/FirebaseTokenController.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +5 -5
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +5 -5
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +6 -6
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackrunController.js +292 -6
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +6 -6
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +29 -7
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +453 -0
- package/lib/Controllers/Packhouse/Site/VarietyController.js +5 -5
- package/lib/Controllers/Packhouse/Site/index.js +3 -0
- package/lib/Controllers/RTU/GlobalSettingsController.js +2 -2
- package/lib/Controllers/RTU/PluginSettingsController.js +2 -2
- package/lib/Controllers/RTUController.js +1 -1
- package/lib/Controllers/RTUPluginController.js +1 -1
- package/lib/Controllers/Site/AlarmController.js +6 -6
- package/lib/Controllers/Site/AlarmGroupController.js +5 -5
- package/lib/Controllers/Site/DefinitionController.js +5 -5
- package/lib/Controllers/Site/PermanentObjectController.js +5 -5
- package/lib/Controllers/Site/PermanentObjectDataController.js +6 -6
- package/lib/Controllers/Site/PointController.js +6 -6
- package/lib/Controllers/Site/TemporaryObjectController.js +5 -5
- package/lib/Controllers/SiteController.js +1 -1
- package/lib/Controllers/TokenController.js +2 -2
- package/lib/Controllers/ToolsController.js +1 -1
- package/lib/Controllers/UserAccountActionTokenController.js +2 -2
- package/lib/Controllers/UserAccountController.js +2 -2
- package/lib/DataItems/PointValueItem.js +2 -2
- package/lib/Errors/BadRequestError.js +7 -3
- package/lib/Errors/ForbiddenError.js +7 -3
- package/lib/Errors/NetworkError.js +7 -3
- package/lib/Errors/NotAllowedError.js +7 -3
- package/lib/Errors/NotFoundError.js +7 -3
- package/lib/Errors/ServerError.js +7 -3
- package/lib/Errors/UnauthorizedError.js +7 -3
- package/lib/Models/AccountPolicyModel.js +3 -3
- package/lib/Models/ApiAccountModel.js +3 -3
- package/lib/Models/BaseModel.js +6 -2
- package/lib/Models/CompanyModel.js +3 -3
- package/lib/Models/FirebaseTokenModel.js +3 -3
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +16 -6
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +16 -6
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +16 -6
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackTypeModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackingLineModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackrunModel.js +16 -6
- package/lib/Models/Packhouse/Site/RejectBinModel.js +16 -6
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +276 -10
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftModel.js +16 -6
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +235 -0
- package/lib/Models/Packhouse/Site/VarietyModel.js +16 -6
- package/lib/Models/Packhouse/Site/index.js +3 -0
- package/lib/Models/RTUModel.js +3 -3
- package/lib/Models/RTUPluginModel.js +3 -3
- package/lib/Models/Site/AlarmGroupModel.js +16 -6
- package/lib/Models/Site/AlarmModel.js +16 -6
- package/lib/Models/Site/DefinitionModel.js +16 -6
- package/lib/Models/Site/PermanentObjectDataModel.js +16 -6
- package/lib/Models/Site/PermanentObjectModel.js +16 -6
- package/lib/Models/Site/PointModel.js +16 -6
- package/lib/Models/Site/TemporaryObjectModel.js +16 -6
- package/lib/Models/SiteModel.js +3 -3
- package/lib/Models/TokenModel.js +3 -3
- package/lib/Models/UserAccountActionTokenModel.js +3 -3
- package/lib/Models/UserAccountModel.js +3 -3
- package/lib/PackageVersion.js +1 -1
- package/lib/Points.js +1 -1
- package/lib/RequestHelper.js +2 -2
- package/lib/WebSocketHelper.js +1 -1
- package/lib/index.d.ts +1038 -76
- package/package.json +3 -3
- package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
- package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
- package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackrunController.js +365 -4
- package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +28 -6
- package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
- package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +474 -0
- package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
- package/src/Controllers/Packhouse/Site/index.js +2 -0
- package/src/Controllers/Site/AlarmController.js +4 -4
- package/src/Controllers/Site/AlarmGroupController.js +4 -4
- package/src/Controllers/Site/DefinitionController.js +4 -4
- package/src/Controllers/Site/PermanentObjectController.js +4 -4
- package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
- package/src/Controllers/Site/PointController.js +4 -4
- package/src/Controllers/Site/TemporaryObjectController.js +4 -4
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +13 -3
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +13 -3
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +13 -3
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +13 -3
- package/src/Models/Packhouse/Site/PackTypeModel.js +13 -3
- package/src/Models/Packhouse/Site/PackingLineModel.js +13 -3
- package/src/Models/Packhouse/Site/PackrunModel.js +13 -3
- package/src/Models/Packhouse/Site/RejectBinModel.js +13 -3
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +310 -7
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftModel.js +13 -3
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +215 -0
- package/src/Models/Packhouse/Site/VarietyModel.js +13 -3
- package/src/Models/Packhouse/Site/index.js +2 -0
- package/src/Models/Site/AlarmGroupModel.js +13 -3
- package/src/Models/Site/AlarmModel.js +13 -3
- package/src/Models/Site/DefinitionModel.js +13 -3
- package/src/Models/Site/PermanentObjectDataModel.js +13 -3
- package/src/Models/Site/PermanentObjectModel.js +13 -3
- package/src/Models/Site/PointModel.js +13 -3
- package/src/Models/Site/TemporaryObjectModel.js +13 -3
- package/src/PackageVersion.js +1 -1
|
@@ -9,15 +9,15 @@ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
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
13
|
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
15
|
|
|
16
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
17
|
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); 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 RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
47
47
|
* RejectBinScaleModel Constructor
|
|
48
48
|
*
|
|
49
49
|
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Reject Bin Scale
|
|
50
51
|
*/
|
|
51
|
-
function RejectBinScaleModel() {
|
|
52
|
+
function RejectBinScaleModel(siteId) {
|
|
52
53
|
var _this;
|
|
53
54
|
|
|
54
55
|
_classCallCheck(this, RejectBinScaleModel);
|
|
@@ -121,11 +122,99 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
121
122
|
/**
|
|
122
123
|
* The Auto Packrun Change Configuration for this Reject Bin Scale
|
|
123
124
|
*
|
|
124
|
-
* @type {?number}
|
|
125
|
+
* @type {?{delay: ?number}}
|
|
125
126
|
* @public
|
|
126
127
|
*/
|
|
127
128
|
|
|
128
129
|
_this.autoPackrunChange = undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Whether this Reject Bin Scale supports Live Weighing
|
|
132
|
+
*
|
|
133
|
+
* @type {?boolean}
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
_this.supportsLiveWeighing = undefined;
|
|
138
|
+
/**
|
|
139
|
+
* The Minimum Weight Change Required to Automatically Start Live Weighing
|
|
140
|
+
*
|
|
141
|
+
* @type {?number}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.autoWeighingStartThreshold = undefined;
|
|
146
|
+
/**
|
|
147
|
+
* The Delay in Milliseconds before Auto Live Weighing would Start
|
|
148
|
+
*
|
|
149
|
+
* @type {?number}
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
_this.autoWeighingStartDelay = undefined;
|
|
154
|
+
/**
|
|
155
|
+
* The Minimum Weight Change Required to Automatically Finish Live Weighing
|
|
156
|
+
*
|
|
157
|
+
* @type {?number}
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
_this.autoWeighingFinishThreshold = undefined;
|
|
162
|
+
/**
|
|
163
|
+
* The Delay in Milliseconds before Auto Live Weighing would Finish
|
|
164
|
+
*
|
|
165
|
+
* @type {?number}
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
_this.autoWeighingFinishDelay = undefined;
|
|
170
|
+
/**
|
|
171
|
+
* The Maximum Duration in Milliseconds before a Manual Intervention would end
|
|
172
|
+
*
|
|
173
|
+
* @type {?number}
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
_this.manualInterventionMaximumDuration = undefined;
|
|
178
|
+
/**
|
|
179
|
+
* The Maximum Weight Increase allowed within a single Live Weighing Update Interval
|
|
180
|
+
*
|
|
181
|
+
* @type {?number}
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
_this.liveWeighingIncreaseTolerance = undefined;
|
|
186
|
+
/**
|
|
187
|
+
* The Maximum Weight Decrease allowed within a single Live Weighing Update Interval
|
|
188
|
+
*
|
|
189
|
+
* @type {?number}
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
_this.liveWeighingDecreaseTolerance = undefined;
|
|
194
|
+
/**
|
|
195
|
+
* The Interval in Milliseconds between Live Weighing Updates
|
|
196
|
+
*
|
|
197
|
+
* @type {?number}
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
_this.liveWeighingUpdateInterval = undefined;
|
|
202
|
+
/**
|
|
203
|
+
* Whether the Loadcell Stable Status is used to ignore Changes during Live Weighing
|
|
204
|
+
*
|
|
205
|
+
* @type {?boolean}
|
|
206
|
+
* @public
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
_this.liveWeighingUsesStableStatus = undefined;
|
|
210
|
+
/**
|
|
211
|
+
* The Maximum Weight Change allowed while Live Weighing before an Incorrect Operation is Logged
|
|
212
|
+
*
|
|
213
|
+
* @type {?number}
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
_this.incorrectOperationTolerance = undefined;
|
|
129
218
|
/**
|
|
130
219
|
* The FreshPack Integration Configuration for this Reject Bin Scale
|
|
131
220
|
*
|
|
@@ -150,6 +239,14 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
150
239
|
*/
|
|
151
240
|
|
|
152
241
|
_this.updateTimestamp = undefined;
|
|
242
|
+
/**
|
|
243
|
+
* The Site ID associated with this Reject Bin Scale
|
|
244
|
+
*
|
|
245
|
+
* @type {number}
|
|
246
|
+
* @public
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
_this.siteId = siteId;
|
|
153
250
|
return _this;
|
|
154
251
|
}
|
|
155
252
|
/**
|
|
@@ -158,14 +255,15 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
158
255
|
* @static
|
|
159
256
|
* @public
|
|
160
257
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
258
|
+
* @param {number} siteId The Site ID associated with this Reject Bin Scale
|
|
161
259
|
* @return {RejectBinScaleModel}
|
|
162
260
|
*/
|
|
163
261
|
|
|
164
262
|
|
|
165
263
|
_createClass(RejectBinScaleModel, null, [{
|
|
166
264
|
key: "fromJSON",
|
|
167
|
-
value: function fromJSON(json) {
|
|
168
|
-
var model = new RejectBinScaleModel();
|
|
265
|
+
value: function fromJSON(json, siteId) {
|
|
266
|
+
var model = new RejectBinScaleModel(siteId);
|
|
169
267
|
/**
|
|
170
268
|
* The JSON Object
|
|
171
269
|
*
|
|
@@ -286,11 +384,179 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
286
384
|
return null;
|
|
287
385
|
}
|
|
288
386
|
|
|
289
|
-
|
|
290
|
-
|
|
387
|
+
var autoPackrunChangeObject = {};
|
|
388
|
+
|
|
389
|
+
if (_typeof(jsonObject['autoPackrunChange']) === 'object' && 'delay' in jsonObject['autoPackrunChange']) {
|
|
390
|
+
autoPackrunChangeObject.delay = function () {
|
|
391
|
+
if (jsonObject['autoPackrunChange'].delay === null) {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (typeof jsonObject['autoPackrunChange'].delay !== 'number') {
|
|
396
|
+
return Number.isInteger(Number(jsonObject['autoPackrunChange'].delay)) ? Number(jsonObject['autoPackrunChange'].delay) : Math.floor(Number(jsonObject['autoPackrunChange'].delay));
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
return Number.isInteger(jsonObject['autoPackrunChange'].delay) ? jsonObject['autoPackrunChange'].delay : Math.floor(jsonObject['autoPackrunChange'].delay);
|
|
400
|
+
}();
|
|
401
|
+
} else {
|
|
402
|
+
autoPackrunChangeObject.delay = null;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
return autoPackrunChangeObject;
|
|
406
|
+
}();
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if ('supportsLiveWeighing' in jsonObject) {
|
|
410
|
+
model.supportsLiveWeighing = function () {
|
|
411
|
+
if (jsonObject['supportsLiveWeighing'] === null) {
|
|
412
|
+
return null;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (typeof jsonObject['supportsLiveWeighing'] !== 'boolean') {
|
|
416
|
+
return Boolean(jsonObject['supportsLiveWeighing']);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
return jsonObject['supportsLiveWeighing'];
|
|
420
|
+
}();
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if ('autoWeighingStartThreshold' in jsonObject) {
|
|
424
|
+
model.autoWeighingStartThreshold = function () {
|
|
425
|
+
if (jsonObject['autoWeighingStartThreshold'] === null) {
|
|
426
|
+
return null;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if (typeof jsonObject['autoWeighingStartThreshold'] !== 'number') {
|
|
430
|
+
return Number(jsonObject['autoWeighingStartThreshold']);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
return jsonObject['autoWeighingStartThreshold'];
|
|
434
|
+
}();
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if ('autoWeighingStartDelay' in jsonObject) {
|
|
438
|
+
model.autoWeighingStartDelay = function () {
|
|
439
|
+
if (jsonObject['autoWeighingStartDelay'] === null) {
|
|
440
|
+
return null;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (typeof jsonObject['autoWeighingStartDelay'] !== 'number') {
|
|
444
|
+
return Number.isInteger(Number(jsonObject['autoWeighingStartDelay'])) ? Number(jsonObject['autoWeighingStartDelay']) : Math.floor(Number(jsonObject['autoWeighingStartDelay']));
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return Number.isInteger(jsonObject['autoWeighingStartDelay']) ? jsonObject['autoWeighingStartDelay'] : Math.floor(jsonObject['autoWeighingStartDelay']);
|
|
448
|
+
}();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
if ('autoWeighingFinishThreshold' in jsonObject) {
|
|
452
|
+
model.autoWeighingFinishThreshold = function () {
|
|
453
|
+
if (jsonObject['autoWeighingFinishThreshold'] === null) {
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
if (typeof jsonObject['autoWeighingFinishThreshold'] !== 'number') {
|
|
458
|
+
return Number(jsonObject['autoWeighingFinishThreshold']);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
return jsonObject['autoWeighingFinishThreshold'];
|
|
462
|
+
}();
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if ('autoWeighingFinishDelay' in jsonObject) {
|
|
466
|
+
model.autoWeighingFinishDelay = function () {
|
|
467
|
+
if (jsonObject['autoWeighingFinishDelay'] === null) {
|
|
468
|
+
return null;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if (typeof jsonObject['autoWeighingFinishDelay'] !== 'number') {
|
|
472
|
+
return Number.isInteger(Number(jsonObject['autoWeighingFinishDelay'])) ? Number(jsonObject['autoWeighingFinishDelay']) : Math.floor(Number(jsonObject['autoWeighingFinishDelay']));
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
return Number.isInteger(jsonObject['autoWeighingFinishDelay']) ? jsonObject['autoWeighingFinishDelay'] : Math.floor(jsonObject['autoWeighingFinishDelay']);
|
|
476
|
+
}();
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if ('manualInterventionMaximumDuration' in jsonObject) {
|
|
480
|
+
model.manualInterventionMaximumDuration = function () {
|
|
481
|
+
if (jsonObject['manualInterventionMaximumDuration'] === null) {
|
|
482
|
+
return null;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
if (typeof jsonObject['manualInterventionMaximumDuration'] !== 'number') {
|
|
486
|
+
return Number.isInteger(Number(jsonObject['manualInterventionMaximumDuration'])) ? Number(jsonObject['manualInterventionMaximumDuration']) : Math.floor(Number(jsonObject['manualInterventionMaximumDuration']));
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
return Number.isInteger(jsonObject['manualInterventionMaximumDuration']) ? jsonObject['manualInterventionMaximumDuration'] : Math.floor(jsonObject['manualInterventionMaximumDuration']);
|
|
490
|
+
}();
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
if ('liveWeighingIncreaseTolerance' in jsonObject) {
|
|
494
|
+
model.liveWeighingIncreaseTolerance = function () {
|
|
495
|
+
if (jsonObject['liveWeighingIncreaseTolerance'] === null) {
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
if (typeof jsonObject['liveWeighingIncreaseTolerance'] !== 'number') {
|
|
500
|
+
return Number(jsonObject['liveWeighingIncreaseTolerance']);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return jsonObject['liveWeighingIncreaseTolerance'];
|
|
504
|
+
}();
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if ('liveWeighingDecreaseTolerance' in jsonObject) {
|
|
508
|
+
model.liveWeighingDecreaseTolerance = function () {
|
|
509
|
+
if (jsonObject['liveWeighingDecreaseTolerance'] === null) {
|
|
510
|
+
return null;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
if (typeof jsonObject['liveWeighingDecreaseTolerance'] !== 'number') {
|
|
514
|
+
return Number(jsonObject['liveWeighingDecreaseTolerance']);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
return jsonObject['liveWeighingDecreaseTolerance'];
|
|
518
|
+
}();
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
if ('liveWeighingUpdateInterval' in jsonObject) {
|
|
522
|
+
model.liveWeighingUpdateInterval = function () {
|
|
523
|
+
if (jsonObject['liveWeighingUpdateInterval'] === null) {
|
|
524
|
+
return null;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (typeof jsonObject['liveWeighingUpdateInterval'] !== 'number') {
|
|
528
|
+
return Number.isInteger(Number(jsonObject['liveWeighingUpdateInterval'])) ? Number(jsonObject['liveWeighingUpdateInterval']) : Math.floor(Number(jsonObject['liveWeighingUpdateInterval']));
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return Number.isInteger(jsonObject['liveWeighingUpdateInterval']) ? jsonObject['liveWeighingUpdateInterval'] : Math.floor(jsonObject['liveWeighingUpdateInterval']);
|
|
532
|
+
}();
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if ('liveWeighingUsesStableStatus' in jsonObject) {
|
|
536
|
+
model.liveWeighingUsesStableStatus = function () {
|
|
537
|
+
if (jsonObject['liveWeighingUsesStableStatus'] === null) {
|
|
538
|
+
return null;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
if (typeof jsonObject['liveWeighingUsesStableStatus'] !== 'boolean') {
|
|
542
|
+
return Boolean(jsonObject['liveWeighingUsesStableStatus']);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
return jsonObject['liveWeighingUsesStableStatus'];
|
|
546
|
+
}();
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if ('incorrectOperationTolerance' in jsonObject) {
|
|
550
|
+
model.incorrectOperationTolerance = function () {
|
|
551
|
+
if (jsonObject['incorrectOperationTolerance'] === null) {
|
|
552
|
+
return null;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
if (typeof jsonObject['incorrectOperationTolerance'] !== 'number') {
|
|
556
|
+
return Number(jsonObject['incorrectOperationTolerance']);
|
|
291
557
|
}
|
|
292
558
|
|
|
293
|
-
return
|
|
559
|
+
return jsonObject['incorrectOperationTolerance'];
|
|
294
560
|
}();
|
|
295
561
|
}
|
|
296
562
|
|
|
@@ -9,15 +9,15 @@ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
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
13
|
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
15
|
|
|
16
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
17
|
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); 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 RejectBinWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
47
47
|
* RejectBinWeightModel Constructor
|
|
48
48
|
*
|
|
49
49
|
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Reject Bin Weight
|
|
50
51
|
*/
|
|
51
|
-
function RejectBinWeightModel() {
|
|
52
|
+
function RejectBinWeightModel(siteId) {
|
|
52
53
|
var _this;
|
|
53
54
|
|
|
54
55
|
_classCallCheck(this, RejectBinWeightModel);
|
|
@@ -134,6 +135,14 @@ var RejectBinWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
134
135
|
*/
|
|
135
136
|
|
|
136
137
|
_this.updateTimestamp = undefined;
|
|
138
|
+
/**
|
|
139
|
+
* The Site ID associated with this Reject Bin Weight
|
|
140
|
+
*
|
|
141
|
+
* @type {number}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.siteId = siteId;
|
|
137
146
|
return _this;
|
|
138
147
|
}
|
|
139
148
|
/**
|
|
@@ -142,14 +151,15 @@ var RejectBinWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
142
151
|
* @static
|
|
143
152
|
* @public
|
|
144
153
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
154
|
+
* @param {number} siteId The Site ID associated with this Reject Bin Weight
|
|
145
155
|
* @return {RejectBinWeightModel}
|
|
146
156
|
*/
|
|
147
157
|
|
|
148
158
|
|
|
149
159
|
_createClass(RejectBinWeightModel, null, [{
|
|
150
160
|
key: "fromJSON",
|
|
151
|
-
value: function fromJSON(json) {
|
|
152
|
-
var model = new RejectBinWeightModel();
|
|
161
|
+
value: function fromJSON(json, siteId) {
|
|
162
|
+
var model = new RejectBinWeightModel(siteId);
|
|
153
163
|
/**
|
|
154
164
|
* The JSON Object
|
|
155
165
|
*
|
|
@@ -9,15 +9,15 @@ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
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
13
|
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
15
|
|
|
16
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
17
|
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); 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 ShiftFocusMeetingModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
47
47
|
* ShiftFocusMeetingModel Constructor
|
|
48
48
|
*
|
|
49
49
|
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Shift Focus Meeting
|
|
50
51
|
*/
|
|
51
|
-
function ShiftFocusMeetingModel() {
|
|
52
|
+
function ShiftFocusMeetingModel(siteId) {
|
|
52
53
|
var _this;
|
|
53
54
|
|
|
54
55
|
_classCallCheck(this, ShiftFocusMeetingModel);
|
|
@@ -150,6 +151,14 @@ var ShiftFocusMeetingModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
150
151
|
*/
|
|
151
152
|
|
|
152
153
|
_this.updateTimestamp = undefined;
|
|
154
|
+
/**
|
|
155
|
+
* The Site ID associated with this Shift Focus Meeting
|
|
156
|
+
*
|
|
157
|
+
* @type {number}
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
_this.siteId = siteId;
|
|
153
162
|
return _this;
|
|
154
163
|
}
|
|
155
164
|
/**
|
|
@@ -158,14 +167,15 @@ var ShiftFocusMeetingModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
158
167
|
* @static
|
|
159
168
|
* @public
|
|
160
169
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
170
|
+
* @param {number} siteId The Site ID associated with this Shift Focus Meeting
|
|
161
171
|
* @return {ShiftFocusMeetingModel}
|
|
162
172
|
*/
|
|
163
173
|
|
|
164
174
|
|
|
165
175
|
_createClass(ShiftFocusMeetingModel, null, [{
|
|
166
176
|
key: "fromJSON",
|
|
167
|
-
value: function fromJSON(json) {
|
|
168
|
-
var model = new ShiftFocusMeetingModel();
|
|
177
|
+
value: function fromJSON(json, siteId) {
|
|
178
|
+
var model = new ShiftFocusMeetingModel(siteId);
|
|
169
179
|
/**
|
|
170
180
|
* The JSON Object
|
|
171
181
|
*
|
|
@@ -9,15 +9,15 @@ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
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
13
|
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
15
|
|
|
16
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
17
|
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); 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 ShiftHourlyEntryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
47
47
|
* ShiftHourlyEntryModel Constructor
|
|
48
48
|
*
|
|
49
49
|
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Shift Hourly Entry
|
|
50
51
|
*/
|
|
51
|
-
function ShiftHourlyEntryModel() {
|
|
52
|
+
function ShiftHourlyEntryModel(siteId) {
|
|
52
53
|
var _this;
|
|
53
54
|
|
|
54
55
|
_classCallCheck(this, ShiftHourlyEntryModel);
|
|
@@ -350,6 +351,14 @@ var ShiftHourlyEntryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
350
351
|
*/
|
|
351
352
|
|
|
352
353
|
_this.updateTimestamp = undefined;
|
|
354
|
+
/**
|
|
355
|
+
* The Site ID associated with this Shift Hourly Entry
|
|
356
|
+
*
|
|
357
|
+
* @type {number}
|
|
358
|
+
* @public
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
_this.siteId = siteId;
|
|
353
362
|
return _this;
|
|
354
363
|
}
|
|
355
364
|
/**
|
|
@@ -358,14 +367,15 @@ var ShiftHourlyEntryModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
358
367
|
* @static
|
|
359
368
|
* @public
|
|
360
369
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
370
|
+
* @param {number} siteId The Site ID associated with this Shift Hourly Entry
|
|
361
371
|
* @return {ShiftHourlyEntryModel}
|
|
362
372
|
*/
|
|
363
373
|
|
|
364
374
|
|
|
365
375
|
_createClass(ShiftHourlyEntryModel, null, [{
|
|
366
376
|
key: "fromJSON",
|
|
367
|
-
value: function fromJSON(json) {
|
|
368
|
-
var model = new ShiftHourlyEntryModel();
|
|
377
|
+
value: function fromJSON(json, siteId) {
|
|
378
|
+
var model = new ShiftHourlyEntryModel(siteId);
|
|
369
379
|
/**
|
|
370
380
|
* The JSON Object
|
|
371
381
|
*
|
|
@@ -9,15 +9,15 @@ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
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
13
|
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
15
|
|
|
16
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
17
|
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); 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 ShiftModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
47
47
|
* ShiftModel Constructor
|
|
48
48
|
*
|
|
49
49
|
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Shift
|
|
50
51
|
*/
|
|
51
|
-
function ShiftModel() {
|
|
52
|
+
function ShiftModel(siteId) {
|
|
52
53
|
var _this;
|
|
53
54
|
|
|
54
55
|
_classCallCheck(this, ShiftModel);
|
|
@@ -206,6 +207,14 @@ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
206
207
|
*/
|
|
207
208
|
|
|
208
209
|
_this.updateTimestamp = undefined;
|
|
210
|
+
/**
|
|
211
|
+
* The Site ID associated with this Shift
|
|
212
|
+
*
|
|
213
|
+
* @type {number}
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
_this.siteId = siteId;
|
|
209
218
|
return _this;
|
|
210
219
|
}
|
|
211
220
|
/**
|
|
@@ -214,14 +223,15 @@ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
214
223
|
* @static
|
|
215
224
|
* @public
|
|
216
225
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
226
|
+
* @param {number} siteId The Site ID associated with this Shift
|
|
217
227
|
* @return {ShiftModel}
|
|
218
228
|
*/
|
|
219
229
|
|
|
220
230
|
|
|
221
231
|
_createClass(ShiftModel, null, [{
|
|
222
232
|
key: "fromJSON",
|
|
223
|
-
value: function fromJSON(json) {
|
|
224
|
-
var model = new ShiftModel();
|
|
233
|
+
value: function fromJSON(json, siteId) {
|
|
234
|
+
var model = new ShiftModel(siteId);
|
|
225
235
|
/**
|
|
226
236
|
* The JSON Object
|
|
227
237
|
*
|