@ricado/api-client 2.1.1 → 2.3.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/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipBinController.js +622 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +3 -3
- package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +657 -0
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +29 -1
- package/lib/Controllers/Packhouse/Site/PackrunController.js +42 -0
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +661 -0
- package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +628 -0
- package/lib/Controllers/Packhouse/Site/index.js +12 -0
- package/lib/DataItems/PointValueItem.js +3 -3
- package/lib/Models/AccountPolicyModel.js +7 -7
- package/lib/Models/ApiAccountModel.js +7 -7
- package/lib/Models/CompanyModel.js +5 -5
- package/lib/Models/FirebaseTokenModel.js +8 -8
- package/lib/Models/Packhouse/Site/BinTipBinModel.js +367 -0
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +15 -15
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
- package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +481 -0
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
- package/lib/Models/Packhouse/Site/PackTypeModel.js +8 -8
- package/lib/Models/Packhouse/Site/PackingLineModel.js +583 -16
- package/lib/Models/Packhouse/Site/PackrunModel.js +81 -15
- package/lib/Models/Packhouse/Site/RejectBinModel.js +9 -9
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +204 -38
- package/lib/Models/Packhouse/Site/ShiftModel.js +26 -19
- package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +599 -0
- package/lib/Models/Packhouse/Site/ShiftTaskModel.js +373 -0
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
- package/lib/Models/Packhouse/Site/VarietyModel.js +8 -8
- package/lib/Models/Packhouse/Site/index.js +12 -0
- package/lib/Models/RTUModel.js +6 -6
- package/lib/Models/RTUPluginModel.js +5 -5
- package/lib/Models/Site/AlarmGroupModel.js +7 -7
- package/lib/Models/Site/AlarmModel.js +17 -17
- package/lib/Models/Site/DefinitionModel.js +6 -6
- package/lib/Models/Site/PermanentObjectDataModel.js +8 -8
- package/lib/Models/Site/PermanentObjectModel.js +7 -7
- package/lib/Models/Site/PointModel.js +11 -11
- package/lib/Models/Site/TemporaryObjectModel.js +6 -6
- package/lib/Models/SiteModel.js +6 -6
- package/lib/Models/TokenModel.js +10 -10
- package/lib/Models/UserAccountActionTokenModel.js +11 -11
- package/lib/Models/UserAccountModel.js +10 -10
- package/lib/PackageVersion.js +1 -1
- package/lib/Points.js +22 -12
- package/lib/WebSocketHelper.js +29 -13
- package/lib/index.d.ts +2473 -348
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipBinController.js +665 -0
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +3 -3
- package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +700 -0
- package/src/Controllers/Packhouse/Site/PackingLineController.js +29 -1
- package/src/Controllers/Packhouse/Site/PackrunController.js +52 -0
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +704 -0
- package/src/Controllers/Packhouse/Site/ShiftTaskController.js +671 -0
- package/src/Controllers/Packhouse/Site/index.js +8 -0
- package/src/DataItems/PointValueItem.js +3 -3
- package/src/Models/AccountPolicyModel.js +7 -7
- package/src/Models/ApiAccountModel.js +7 -7
- package/src/Models/CompanyModel.js +5 -5
- package/src/Models/FirebaseTokenModel.js +8 -8
- package/src/Models/Packhouse/Site/BinTipBinModel.js +365 -0
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
- package/src/Models/Packhouse/Site/CompacSizerModel.js +15 -15
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
- package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +523 -0
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
- package/src/Models/Packhouse/Site/PackTypeModel.js +8 -8
- package/src/Models/Packhouse/Site/PackingLineModel.js +770 -16
- package/src/Models/Packhouse/Site/PackrunModel.js +90 -15
- package/src/Models/Packhouse/Site/RejectBinModel.js +9 -9
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +229 -38
- package/src/Models/Packhouse/Site/ShiftModel.js +29 -19
- package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +664 -0
- package/src/Models/Packhouse/Site/ShiftTaskModel.js +369 -0
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
- package/src/Models/Packhouse/Site/VarietyModel.js +8 -8
- package/src/Models/Packhouse/Site/index.js +8 -0
- package/src/Models/RTUModel.js +6 -6
- package/src/Models/RTUPluginModel.js +5 -5
- package/src/Models/Site/AlarmGroupModel.js +7 -7
- package/src/Models/Site/AlarmModel.js +17 -17
- package/src/Models/Site/DefinitionModel.js +6 -6
- package/src/Models/Site/PermanentObjectDataModel.js +8 -8
- package/src/Models/Site/PermanentObjectModel.js +7 -7
- package/src/Models/Site/PointModel.js +11 -11
- package/src/Models/Site/TemporaryObjectModel.js +6 -6
- package/src/Models/SiteModel.js +6 -6
- package/src/Models/TokenModel.js +10 -10
- package/src/Models/UserAccountActionTokenModel.js +11 -11
- package/src/Models/UserAccountModel.js +10 -10
- package/src/PackageVersion.js +1 -1
- package/src/Points.js +24 -12
- package/src/WebSocketHelper.js +34 -13
- package/src/index.js +3 -3
- package/types/tslint.json +2 -1
|
@@ -40,7 +40,7 @@ var PointValueItem = /*#__PURE__*/function () {
|
|
|
40
40
|
* @type {number}
|
|
41
41
|
* @private
|
|
42
42
|
*/
|
|
43
|
-
this._id =
|
|
43
|
+
this._id = 0;
|
|
44
44
|
/**
|
|
45
45
|
* The Point Value
|
|
46
46
|
*
|
|
@@ -48,7 +48,7 @@ var PointValueItem = /*#__PURE__*/function () {
|
|
|
48
48
|
* @private
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
|
-
this._value =
|
|
51
|
+
this._value = null;
|
|
52
52
|
/**
|
|
53
53
|
* When the Point Value last changed
|
|
54
54
|
*
|
|
@@ -56,7 +56,7 @@ var PointValueItem = /*#__PURE__*/function () {
|
|
|
56
56
|
* @private
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
|
-
this._timestamp =
|
|
59
|
+
this._timestamp = new Date();
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* The Point ID
|
|
@@ -61,7 +61,7 @@ var AccountPolicyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
61
61
|
* @public
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
|
-
_this.id =
|
|
64
|
+
_this.id = "";
|
|
65
65
|
/**
|
|
66
66
|
* The Policy Name
|
|
67
67
|
*
|
|
@@ -69,7 +69,7 @@ var AccountPolicyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
69
69
|
* @public
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
|
-
_this.name =
|
|
72
|
+
_this.name = "";
|
|
73
73
|
/**
|
|
74
74
|
* The Company this Policy belongs to
|
|
75
75
|
*
|
|
@@ -77,7 +77,7 @@ var AccountPolicyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
77
77
|
* @public
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
|
-
_this.companyId =
|
|
80
|
+
_this.companyId = "";
|
|
81
81
|
/**
|
|
82
82
|
* The Resources this Policy provides
|
|
83
83
|
*
|
|
@@ -85,7 +85,7 @@ var AccountPolicyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
85
85
|
* @public
|
|
86
86
|
*/
|
|
87
87
|
|
|
88
|
-
_this.resources =
|
|
88
|
+
_this.resources = [];
|
|
89
89
|
/**
|
|
90
90
|
* The Rules this Policy provides
|
|
91
91
|
*
|
|
@@ -93,7 +93,7 @@ var AccountPolicyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
93
93
|
* @public
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
|
-
_this.rules =
|
|
96
|
+
_this.rules = [];
|
|
97
97
|
/**
|
|
98
98
|
* Whether the Account Policy has been deleted
|
|
99
99
|
*
|
|
@@ -101,7 +101,7 @@ var AccountPolicyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
101
101
|
* @public
|
|
102
102
|
*/
|
|
103
103
|
|
|
104
|
-
_this.deleted =
|
|
104
|
+
_this.deleted = false;
|
|
105
105
|
/**
|
|
106
106
|
* When the Account Policy was last updated
|
|
107
107
|
*
|
|
@@ -109,7 +109,7 @@ var AccountPolicyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
109
109
|
* @public
|
|
110
110
|
*/
|
|
111
111
|
|
|
112
|
-
_this.updateTimestamp =
|
|
112
|
+
_this.updateTimestamp = new Date();
|
|
113
113
|
return _this;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
@@ -61,7 +61,7 @@ var ApiAccountModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
61
61
|
* @public
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
|
-
_this.id =
|
|
64
|
+
_this.id = "";
|
|
65
65
|
/**
|
|
66
66
|
* API Key
|
|
67
67
|
*
|
|
@@ -69,7 +69,7 @@ var ApiAccountModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
69
69
|
* @public
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
|
-
_this.key =
|
|
72
|
+
_this.key = null;
|
|
73
73
|
/**
|
|
74
74
|
* The API Account Name
|
|
75
75
|
*
|
|
@@ -77,7 +77,7 @@ var ApiAccountModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
77
77
|
* @public
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
|
-
_this.name =
|
|
80
|
+
_this.name = "";
|
|
81
81
|
/**
|
|
82
82
|
* The Company this API Account belongs to
|
|
83
83
|
*
|
|
@@ -85,7 +85,7 @@ var ApiAccountModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
85
85
|
* @public
|
|
86
86
|
*/
|
|
87
87
|
|
|
88
|
-
_this.companyId =
|
|
88
|
+
_this.companyId = "";
|
|
89
89
|
/**
|
|
90
90
|
* The Policies that apply to this API Account
|
|
91
91
|
*
|
|
@@ -93,7 +93,7 @@ var ApiAccountModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
93
93
|
* @public
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
|
-
_this.policies =
|
|
96
|
+
_this.policies = [];
|
|
97
97
|
/**
|
|
98
98
|
* Whether the API Account has been deleted
|
|
99
99
|
*
|
|
@@ -101,7 +101,7 @@ var ApiAccountModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
101
101
|
* @public
|
|
102
102
|
*/
|
|
103
103
|
|
|
104
|
-
_this.deleted =
|
|
104
|
+
_this.deleted = false;
|
|
105
105
|
/**
|
|
106
106
|
* When the API Account was last updated
|
|
107
107
|
*
|
|
@@ -109,7 +109,7 @@ var ApiAccountModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
109
109
|
* @public
|
|
110
110
|
*/
|
|
111
111
|
|
|
112
|
-
_this.updateTimestamp =
|
|
112
|
+
_this.updateTimestamp = new Date();
|
|
113
113
|
return _this;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
@@ -61,7 +61,7 @@ var CompanyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
61
61
|
* @public
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
|
-
_this.id =
|
|
64
|
+
_this.id = "";
|
|
65
65
|
/**
|
|
66
66
|
* The Company Display Name
|
|
67
67
|
*
|
|
@@ -69,7 +69,7 @@ var CompanyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
69
69
|
* @public
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
|
-
_this.displayName =
|
|
72
|
+
_this.displayName = "";
|
|
73
73
|
/**
|
|
74
74
|
* The Company Legal Name
|
|
75
75
|
*
|
|
@@ -77,7 +77,7 @@ var CompanyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
77
77
|
* @public
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
|
-
_this.legalName =
|
|
80
|
+
_this.legalName = "";
|
|
81
81
|
/**
|
|
82
82
|
* Whether the Company has been deleted
|
|
83
83
|
*
|
|
@@ -85,7 +85,7 @@ var CompanyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
85
85
|
* @public
|
|
86
86
|
*/
|
|
87
87
|
|
|
88
|
-
_this.deleted =
|
|
88
|
+
_this.deleted = false;
|
|
89
89
|
/**
|
|
90
90
|
* When the Company was last updated
|
|
91
91
|
*
|
|
@@ -93,7 +93,7 @@ var CompanyModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
93
93
|
* @public
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
|
-
_this.updateTimestamp =
|
|
96
|
+
_this.updateTimestamp = new Date();
|
|
97
97
|
return _this;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
@@ -61,7 +61,7 @@ var FirebaseTokenModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
61
61
|
* @public
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
|
-
_this.id =
|
|
64
|
+
_this.id = "";
|
|
65
65
|
/**
|
|
66
66
|
* The Account this Firebase Token belongs to
|
|
67
67
|
*
|
|
@@ -69,7 +69,7 @@ var FirebaseTokenModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
69
69
|
* @public
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
|
-
_this.accountId =
|
|
72
|
+
_this.accountId = "";
|
|
73
73
|
/**
|
|
74
74
|
* The Firebase Token
|
|
75
75
|
*
|
|
@@ -77,7 +77,7 @@ var FirebaseTokenModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
77
77
|
* @public
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
|
-
_this.token =
|
|
80
|
+
_this.token = "";
|
|
81
81
|
/**
|
|
82
82
|
* Whether the Firebase Token should receive Notifications
|
|
83
83
|
*
|
|
@@ -85,7 +85,7 @@ var FirebaseTokenModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
85
85
|
* @public
|
|
86
86
|
*/
|
|
87
87
|
|
|
88
|
-
_this.enabled =
|
|
88
|
+
_this.enabled = false;
|
|
89
89
|
/**
|
|
90
90
|
* The Device Name
|
|
91
91
|
*
|
|
@@ -93,7 +93,7 @@ var FirebaseTokenModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
93
93
|
* @public
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
|
-
_this.deviceName =
|
|
96
|
+
_this.deviceName = "";
|
|
97
97
|
/**
|
|
98
98
|
* The Device Platform
|
|
99
99
|
*
|
|
@@ -101,7 +101,7 @@ var FirebaseTokenModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
101
101
|
* @public
|
|
102
102
|
*/
|
|
103
103
|
|
|
104
|
-
_this.devicePlatform =
|
|
104
|
+
_this.devicePlatform = "";
|
|
105
105
|
/**
|
|
106
106
|
* Whether the Firebase Token has been deleted
|
|
107
107
|
*
|
|
@@ -109,7 +109,7 @@ var FirebaseTokenModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
109
109
|
* @public
|
|
110
110
|
*/
|
|
111
111
|
|
|
112
|
-
_this.deleted =
|
|
112
|
+
_this.deleted = false;
|
|
113
113
|
/**
|
|
114
114
|
* When the Firebase Token was last updated
|
|
115
115
|
*
|
|
@@ -117,7 +117,7 @@ var FirebaseTokenModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
117
117
|
* @public
|
|
118
118
|
*/
|
|
119
119
|
|
|
120
|
-
_this.updateTimestamp =
|
|
120
|
+
_this.updateTimestamp = new Date();
|
|
121
121
|
return _this;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
@@ -0,0 +1,367 @@
|
|
|
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
|
|
36
|
+
*
|
|
37
|
+
* @class
|
|
38
|
+
* @hideconstructor
|
|
39
|
+
* @extends BaseModel
|
|
40
|
+
*/
|
|
41
|
+
var BinTipBinModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(BinTipBinModel, _BaseModel);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(BinTipBinModel);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* BinTipBinModel Constructor
|
|
48
|
+
*
|
|
49
|
+
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Bin Tip Bin
|
|
51
|
+
*/
|
|
52
|
+
function BinTipBinModel(siteId) {
|
|
53
|
+
var _this;
|
|
54
|
+
|
|
55
|
+
_classCallCheck(this, BinTipBinModel);
|
|
56
|
+
|
|
57
|
+
_this = _super.call(this);
|
|
58
|
+
/**
|
|
59
|
+
* The Bin Tip Bin ID
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
_this.id = "";
|
|
66
|
+
/**
|
|
67
|
+
* The Bin Tip ID associated with this Bin
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
_this.binTipId = "";
|
|
74
|
+
/**
|
|
75
|
+
* The Packrun ID associated with this Bin
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.packrunId = "";
|
|
82
|
+
/**
|
|
83
|
+
* When this Bin was Created
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.createdTimestamp = new Date();
|
|
90
|
+
/**
|
|
91
|
+
* A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
|
|
92
|
+
*
|
|
93
|
+
* @type {?string}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.binNumber = null;
|
|
98
|
+
/**
|
|
99
|
+
* The Time Batch ID associated with this Bin
|
|
100
|
+
*
|
|
101
|
+
* @type {?string}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.timeBatchId = null;
|
|
106
|
+
/**
|
|
107
|
+
* The Full Weight for this Bin
|
|
108
|
+
*
|
|
109
|
+
* @type {?number}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.fullWeight = null;
|
|
114
|
+
/**
|
|
115
|
+
* The Empty Weight for this Bin
|
|
116
|
+
*
|
|
117
|
+
* @type {?number}
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
_this.emptyWeight = null;
|
|
122
|
+
/**
|
|
123
|
+
* The `BinTipWeight` ID as the Source for the Full Weight of this Bin
|
|
124
|
+
*
|
|
125
|
+
* @type {?string}
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
_this.fullBinWeightId = null;
|
|
130
|
+
/**
|
|
131
|
+
* The `BinTipWeight` ID as the Source for the Empty Weight of this Bin
|
|
132
|
+
*
|
|
133
|
+
* @type {?string}
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
_this.emptyBinWeightId = null;
|
|
138
|
+
/**
|
|
139
|
+
* The FreshPack Field Bin Weight API Data
|
|
140
|
+
*
|
|
141
|
+
* @type {?Object}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.freshPackFieldBinWeightApi = null;
|
|
146
|
+
/**
|
|
147
|
+
* Whether the Bin Tip Bin has been deleted
|
|
148
|
+
*
|
|
149
|
+
* @type {boolean}
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
_this.deleted = false;
|
|
154
|
+
/**
|
|
155
|
+
* When the Bin Tip Bin was last updated
|
|
156
|
+
*
|
|
157
|
+
* @type {Date}
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
_this.updateTimestamp = new Date();
|
|
162
|
+
/**
|
|
163
|
+
* The Site ID associated with this Bin Tip Bin
|
|
164
|
+
*
|
|
165
|
+
* @type {number}
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
_this.siteId = siteId;
|
|
170
|
+
return _this;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Create a new **BinTipBinModel** from a JSON Object or JSON String
|
|
174
|
+
*
|
|
175
|
+
* @static
|
|
176
|
+
* @public
|
|
177
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
178
|
+
* @param {number} siteId The Site ID associated with this Bin Tip Bin
|
|
179
|
+
* @return {BinTipBinModel}
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
_createClass(BinTipBinModel, null, [{
|
|
184
|
+
key: "fromJSON",
|
|
185
|
+
value: function fromJSON(json, siteId) {
|
|
186
|
+
var model = new BinTipBinModel(siteId);
|
|
187
|
+
/**
|
|
188
|
+
* The JSON Object
|
|
189
|
+
*
|
|
190
|
+
* @type {Object<string, any>}
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
var jsonObject = {};
|
|
194
|
+
|
|
195
|
+
if (typeof json === 'string') {
|
|
196
|
+
jsonObject = JSON.parse(json);
|
|
197
|
+
} else if (_typeof(json) === 'object') {
|
|
198
|
+
jsonObject = json;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if ('id' in jsonObject) {
|
|
202
|
+
model.id = function () {
|
|
203
|
+
if (typeof jsonObject['id'] !== 'string') {
|
|
204
|
+
return String(jsonObject['id']);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return jsonObject['id'];
|
|
208
|
+
}();
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if ('binTipId' in jsonObject) {
|
|
212
|
+
model.binTipId = function () {
|
|
213
|
+
if (typeof jsonObject['binTipId'] !== 'string') {
|
|
214
|
+
return String(jsonObject['binTipId']);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return jsonObject['binTipId'];
|
|
218
|
+
}();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if ('packrunId' in jsonObject) {
|
|
222
|
+
model.packrunId = function () {
|
|
223
|
+
if (typeof jsonObject['packrunId'] !== 'string') {
|
|
224
|
+
return String(jsonObject['packrunId']);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return jsonObject['packrunId'];
|
|
228
|
+
}();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if ('createdTimestamp' in jsonObject) {
|
|
232
|
+
model.createdTimestamp = function () {
|
|
233
|
+
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
234
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
238
|
+
}();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if ('binNumber' in jsonObject) {
|
|
242
|
+
model.binNumber = function () {
|
|
243
|
+
if (jsonObject['binNumber'] === null) {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (typeof jsonObject['binNumber'] !== 'string') {
|
|
248
|
+
return String(jsonObject['binNumber']);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return jsonObject['binNumber'];
|
|
252
|
+
}();
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if ('timeBatchId' in jsonObject) {
|
|
256
|
+
model.timeBatchId = function () {
|
|
257
|
+
if (jsonObject['timeBatchId'] === null) {
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (typeof jsonObject['timeBatchId'] !== 'string') {
|
|
262
|
+
return String(jsonObject['timeBatchId']);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
return jsonObject['timeBatchId'];
|
|
266
|
+
}();
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if ('fullWeight' in jsonObject) {
|
|
270
|
+
model.fullWeight = function () {
|
|
271
|
+
if (jsonObject['fullWeight'] === null) {
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (typeof jsonObject['fullWeight'] !== 'number') {
|
|
276
|
+
return Number(jsonObject['fullWeight']);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return jsonObject['fullWeight'];
|
|
280
|
+
}();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if ('emptyWeight' in jsonObject) {
|
|
284
|
+
model.emptyWeight = function () {
|
|
285
|
+
if (jsonObject['emptyWeight'] === null) {
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if (typeof jsonObject['emptyWeight'] !== 'number') {
|
|
290
|
+
return Number(jsonObject['emptyWeight']);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return jsonObject['emptyWeight'];
|
|
294
|
+
}();
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if ('fullBinWeightId' in jsonObject) {
|
|
298
|
+
model.fullBinWeightId = function () {
|
|
299
|
+
if (jsonObject['fullBinWeightId'] === null) {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (typeof jsonObject['fullBinWeightId'] !== 'string') {
|
|
304
|
+
return String(jsonObject['fullBinWeightId']);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return jsonObject['fullBinWeightId'];
|
|
308
|
+
}();
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if ('emptyBinWeightId' in jsonObject) {
|
|
312
|
+
model.emptyBinWeightId = function () {
|
|
313
|
+
if (jsonObject['emptyBinWeightId'] === null) {
|
|
314
|
+
return null;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (typeof jsonObject['emptyBinWeightId'] !== 'string') {
|
|
318
|
+
return String(jsonObject['emptyBinWeightId']);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return jsonObject['emptyBinWeightId'];
|
|
322
|
+
}();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if ('freshPackFieldBinWeightApi' in jsonObject) {
|
|
326
|
+
model.freshPackFieldBinWeightApi = function () {
|
|
327
|
+
if (jsonObject['freshPackFieldBinWeightApi'] === null) {
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (_typeof(jsonObject['freshPackFieldBinWeightApi']) !== 'object') {
|
|
332
|
+
return Object(jsonObject['freshPackFieldBinWeightApi']);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
return jsonObject['freshPackFieldBinWeightApi'];
|
|
336
|
+
}();
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if ('deleted' in jsonObject) {
|
|
340
|
+
model.deleted = function () {
|
|
341
|
+
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
342
|
+
return Boolean(jsonObject['deleted']);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return jsonObject['deleted'];
|
|
346
|
+
}();
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if ('updateTimestamp' in jsonObject) {
|
|
350
|
+
model.updateTimestamp = function () {
|
|
351
|
+
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
352
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
356
|
+
}();
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
return model;
|
|
360
|
+
}
|
|
361
|
+
}]);
|
|
362
|
+
|
|
363
|
+
return BinTipBinModel;
|
|
364
|
+
}(_BaseModel2.default);
|
|
365
|
+
|
|
366
|
+
var _default = BinTipBinModel;
|
|
367
|
+
exports.default = _default;
|
|
@@ -62,7 +62,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
62
62
|
* @public
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
|
-
_this.id =
|
|
65
|
+
_this.id = "";
|
|
66
66
|
/**
|
|
67
67
|
* The Bin Tip ID associated with this Bin Weight
|
|
68
68
|
*
|
|
@@ -70,7 +70,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
70
70
|
* @public
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
|
-
_this.binTipId =
|
|
73
|
+
_this.binTipId = "";
|
|
74
74
|
/**
|
|
75
75
|
* The Packrun ID associated with this Bin Weight
|
|
76
76
|
*
|
|
@@ -78,7 +78,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
78
78
|
* @public
|
|
79
79
|
*/
|
|
80
80
|
|
|
81
|
-
_this.packrunId =
|
|
81
|
+
_this.packrunId = "";
|
|
82
82
|
/**
|
|
83
83
|
* When this Bin Weight was Created
|
|
84
84
|
*
|
|
@@ -86,7 +86,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
86
86
|
* @public
|
|
87
87
|
*/
|
|
88
88
|
|
|
89
|
-
_this.createdTimestamp =
|
|
89
|
+
_this.createdTimestamp = new Date();
|
|
90
90
|
/**
|
|
91
91
|
* The Bin Weight Type
|
|
92
92
|
*
|
|
@@ -94,7 +94,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
94
94
|
* @public
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
|
-
_this.weightType =
|
|
97
|
+
_this.weightType = "";
|
|
98
98
|
/**
|
|
99
99
|
* The Bin Weight
|
|
100
100
|
*
|
|
@@ -102,7 +102,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
102
102
|
* @public
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
|
-
_this.weight =
|
|
105
|
+
_this.weight = 0;
|
|
106
106
|
/**
|
|
107
107
|
* The Bin Scale ID associated with this Bin Weight
|
|
108
108
|
*
|
|
@@ -110,7 +110,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
110
110
|
* @public
|
|
111
111
|
*/
|
|
112
112
|
|
|
113
|
-
_this.binScaleId =
|
|
113
|
+
_this.binScaleId = null;
|
|
114
114
|
/**
|
|
115
115
|
* Whether the Bin Tip Weight has been deleted
|
|
116
116
|
*
|
|
@@ -118,7 +118,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
118
118
|
* @public
|
|
119
119
|
*/
|
|
120
120
|
|
|
121
|
-
_this.deleted =
|
|
121
|
+
_this.deleted = false;
|
|
122
122
|
/**
|
|
123
123
|
* When the Bin Tip Weight was last updated
|
|
124
124
|
*
|
|
@@ -126,7 +126,7 @@ var BinTipWeightModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
126
126
|
* @public
|
|
127
127
|
*/
|
|
128
128
|
|
|
129
|
-
_this.updateTimestamp =
|
|
129
|
+
_this.updateTimestamp = new Date();
|
|
130
130
|
/**
|
|
131
131
|
* The Site ID associated with this Bin Tip Weight
|
|
132
132
|
*
|