@ricado/api-client 1.4.0 → 2.0.2
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/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 +5 -5
- 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/VarietyController.js +5 -5
- 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 +8 -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 +29 -133
- package/lib/Models/ApiAccountModel.js +29 -133
- package/lib/Models/BaseModel.js +6 -2
- package/lib/Models/CompanyModel.js +23 -101
- package/lib/Models/FirebaseTokenModel.js +32 -149
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +43 -195
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +40 -179
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +58 -275
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +46 -211
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +40 -179
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +34 -147
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +52 -243
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +58 -275
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +40 -179
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +34 -147
- package/lib/Models/Packhouse/Site/PackTypeModel.js +40 -179
- package/lib/Models/Packhouse/Site/PackingLineModel.js +61 -291
- package/lib/Models/Packhouse/Site/PackrunModel.js +61 -291
- package/lib/Models/Packhouse/Site/RejectBinModel.js +43 -195
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +52 -243
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +46 -211
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +52 -243
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +127 -643
- package/lib/Models/Packhouse/Site/ShiftModel.js +73 -355
- package/lib/Models/Packhouse/Site/VarietyModel.js +40 -179
- package/lib/Models/RTUModel.js +26 -117
- package/lib/Models/RTUPluginModel.js +23 -101
- package/lib/Models/Site/AlarmGroupModel.js +37 -163
- package/lib/Models/Site/AlarmModel.js +67 -323
- package/lib/Models/Site/DefinitionModel.js +34 -147
- package/lib/Models/Site/PermanentObjectDataModel.js +40 -179
- package/lib/Models/Site/PermanentObjectModel.js +37 -163
- package/lib/Models/Site/PointModel.js +49 -227
- package/lib/Models/Site/TemporaryObjectModel.js +34 -147
- package/lib/Models/Site/index.js +0 -3
- package/lib/Models/SiteModel.js +26 -117
- package/lib/Models/TokenModel.js +38 -181
- package/lib/Models/UserAccountActionTokenModel.js +41 -197
- package/lib/Models/UserAccountModel.js +38 -181
- 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 +931 -1589
- 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 +4 -4
- 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/VarietyController.js +4 -4
- 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 +6 -4
- package/src/Controllers/Site/TemporaryObjectController.js +4 -4
- package/src/Models/AccountPolicyModel.js +21 -117
- package/src/Models/ApiAccountModel.js +21 -117
- package/src/Models/CompanyModel.js +15 -87
- package/src/Models/FirebaseTokenModel.js +24 -132
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +33 -174
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +30 -159
- package/src/Models/Packhouse/Site/CompacSizerModel.js +48 -249
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +36 -189
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +30 -159
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +24 -129
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +42 -219
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +48 -249
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +30 -159
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +24 -129
- package/src/Models/Packhouse/Site/PackTypeModel.js +30 -159
- package/src/Models/Packhouse/Site/PackingLineModel.js +51 -264
- package/src/Models/Packhouse/Site/PackrunModel.js +51 -264
- package/src/Models/Packhouse/Site/RejectBinModel.js +33 -174
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +42 -219
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +36 -189
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +42 -219
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +117 -594
- package/src/Models/Packhouse/Site/ShiftModel.js +63 -324
- package/src/Models/Packhouse/Site/VarietyModel.js +30 -159
- package/src/Models/RTUModel.js +18 -102
- package/src/Models/RTUPluginModel.js +15 -87
- package/src/Models/Site/AlarmGroupModel.js +27 -144
- package/src/Models/Site/AlarmModel.js +57 -294
- package/src/Models/Site/DefinitionModel.js +24 -129
- package/src/Models/Site/PermanentObjectDataModel.js +30 -159
- package/src/Models/Site/PermanentObjectModel.js +27 -144
- package/src/Models/Site/PointModel.js +39 -204
- package/src/Models/Site/TemporaryObjectModel.js +24 -129
- package/src/Models/Site/index.js +0 -2
- package/src/Models/SiteModel.js +18 -102
- package/src/Models/TokenModel.js +30 -162
- package/src/Models/UserAccountActionTokenModel.js +33 -177
- package/src/Models/UserAccountModel.js +30 -162
- package/src/PackageVersion.js +1 -1
- package/lib/Models/Site/BaseSiteModel.js +0 -58
- package/src/Models/Site/BaseSiteModel.js +0 -30
|
@@ -4,24 +4,23 @@
|
|
|
4
4
|
* Do Not Edit this File Manually!
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import BaseModel from '../../../Models/BaseModel';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Model Class for a Compac Sizer
|
|
11
11
|
*
|
|
12
12
|
* @class
|
|
13
13
|
* @hideconstructor
|
|
14
|
-
* @extends
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class CompacSizerModel extends
|
|
16
|
+
class CompacSizerModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* CompacSizerModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
-
* @param {number} siteId The Site ID associated with this Compac Sizer
|
|
23
22
|
*/
|
|
24
|
-
constructor(
|
|
23
|
+
constructor()
|
|
25
24
|
{
|
|
26
25
|
super();
|
|
27
26
|
|
|
@@ -29,312 +28,113 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
29
28
|
* The Compac Sizer ID
|
|
30
29
|
*
|
|
31
30
|
* @type {string}
|
|
32
|
-
* @
|
|
31
|
+
* @public
|
|
33
32
|
*/
|
|
34
|
-
this.
|
|
33
|
+
this.id = undefined;
|
|
35
34
|
|
|
36
35
|
/**
|
|
37
36
|
* The RTU this Compac Sizer belongs to
|
|
38
37
|
*
|
|
39
38
|
* @type {?number}
|
|
40
|
-
* @
|
|
39
|
+
* @public
|
|
41
40
|
*/
|
|
42
|
-
this.
|
|
41
|
+
this.rtuId = undefined;
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
44
|
* The Compac Sizer Name
|
|
46
45
|
*
|
|
47
46
|
* @type {string}
|
|
48
|
-
* @
|
|
47
|
+
* @public
|
|
49
48
|
*/
|
|
50
|
-
this.
|
|
49
|
+
this.name = undefined;
|
|
51
50
|
|
|
52
51
|
/**
|
|
53
52
|
* The Lanes defined for this Compac Sizer
|
|
54
53
|
*
|
|
55
54
|
* @type {Object[]}
|
|
56
|
-
* @
|
|
55
|
+
* @public
|
|
57
56
|
*/
|
|
58
|
-
this.
|
|
57
|
+
this.lanes = undefined;
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
60
|
* The Points used by this Compac Sizer
|
|
62
61
|
*
|
|
63
62
|
* @type {Object}
|
|
64
|
-
* @
|
|
63
|
+
* @public
|
|
65
64
|
*/
|
|
66
|
-
this.
|
|
65
|
+
this.points = undefined;
|
|
67
66
|
|
|
68
67
|
/**
|
|
69
68
|
* The Outlets defined for this Compac Sizer
|
|
70
69
|
*
|
|
71
70
|
* @type {Object[]}
|
|
72
|
-
* @
|
|
71
|
+
* @public
|
|
73
72
|
*/
|
|
74
|
-
this.
|
|
73
|
+
this.outlets = undefined;
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
76
|
* The Sizer Type
|
|
78
77
|
*
|
|
79
78
|
* @type {string}
|
|
80
|
-
* @
|
|
79
|
+
* @public
|
|
81
80
|
*/
|
|
82
|
-
this.
|
|
81
|
+
this.sizerType = undefined;
|
|
83
82
|
|
|
84
83
|
/**
|
|
85
84
|
* The Auto Create Batch Delay in Seconds for this Compac Sizer
|
|
86
85
|
*
|
|
87
86
|
* @type {number}
|
|
88
|
-
* @
|
|
87
|
+
* @public
|
|
89
88
|
*/
|
|
90
|
-
this.
|
|
89
|
+
this.autoCreateBatchDelay = undefined;
|
|
91
90
|
|
|
92
91
|
/**
|
|
93
92
|
* The Fruit Sizes defined and handled by this Compac Sizer
|
|
94
93
|
*
|
|
95
94
|
* @type {Object[]}
|
|
96
|
-
* @
|
|
95
|
+
* @public
|
|
97
96
|
*/
|
|
98
|
-
this.
|
|
97
|
+
this.fruitSizes = undefined;
|
|
99
98
|
|
|
100
99
|
/**
|
|
101
100
|
* The Packing Line ID this Compac Sizer belongs to
|
|
102
101
|
*
|
|
103
102
|
* @type {string}
|
|
104
|
-
* @
|
|
103
|
+
* @public
|
|
105
104
|
*/
|
|
106
|
-
this.
|
|
105
|
+
this.packingLineId = undefined;
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
108
|
* The FreshPack Integration Configuration for this Compac Sizer
|
|
110
109
|
*
|
|
111
110
|
* @type {?Object}
|
|
112
|
-
* @
|
|
111
|
+
* @public
|
|
113
112
|
*/
|
|
114
|
-
this.
|
|
113
|
+
this.freshPackIntegration = undefined;
|
|
115
114
|
|
|
116
115
|
/**
|
|
117
116
|
* An Array of Sources that deliver Fruit to this Compac Sizer
|
|
118
117
|
*
|
|
119
118
|
* @type {Object[]}
|
|
120
|
-
* @
|
|
119
|
+
* @public
|
|
121
120
|
*/
|
|
122
|
-
this.
|
|
121
|
+
this.sources = undefined;
|
|
123
122
|
|
|
124
123
|
/**
|
|
125
124
|
* Whether the Compac Sizer has been deleted
|
|
126
125
|
*
|
|
127
126
|
* @type {boolean}
|
|
128
|
-
* @
|
|
127
|
+
* @public
|
|
129
128
|
*/
|
|
130
|
-
this.
|
|
129
|
+
this.deleted = undefined;
|
|
131
130
|
|
|
132
131
|
/**
|
|
133
132
|
* When the Compac Sizer was last updated
|
|
134
133
|
*
|
|
135
134
|
* @type {Date}
|
|
136
|
-
* @
|
|
135
|
+
* @public
|
|
137
136
|
*/
|
|
138
|
-
this.
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* The Site ID associated with this Compac Sizer
|
|
142
|
-
*
|
|
143
|
-
* @type {number}
|
|
144
|
-
* @private
|
|
145
|
-
*/
|
|
146
|
-
this._siteId = siteId;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* The Compac Sizer ID
|
|
151
|
-
*
|
|
152
|
-
* @public
|
|
153
|
-
* @type {string}
|
|
154
|
-
*/
|
|
155
|
-
get id()
|
|
156
|
-
{
|
|
157
|
-
return this._id;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* The RTU this Compac Sizer belongs to
|
|
162
|
-
*
|
|
163
|
-
* @public
|
|
164
|
-
* @type {?number}
|
|
165
|
-
*/
|
|
166
|
-
get rtuId()
|
|
167
|
-
{
|
|
168
|
-
return this._rtuId;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* The Compac Sizer Name
|
|
173
|
-
*
|
|
174
|
-
* @public
|
|
175
|
-
* @type {string}
|
|
176
|
-
*/
|
|
177
|
-
get name()
|
|
178
|
-
{
|
|
179
|
-
return this._name;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* The Lanes defined for this Compac Sizer
|
|
184
|
-
*
|
|
185
|
-
* @public
|
|
186
|
-
* @type {Object[]}
|
|
187
|
-
*/
|
|
188
|
-
get lanes()
|
|
189
|
-
{
|
|
190
|
-
return this._lanes;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* The Points used by this Compac Sizer
|
|
195
|
-
*
|
|
196
|
-
* @public
|
|
197
|
-
* @type {Object}
|
|
198
|
-
*/
|
|
199
|
-
get points()
|
|
200
|
-
{
|
|
201
|
-
return this._points;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* The Outlets defined for this Compac Sizer
|
|
206
|
-
*
|
|
207
|
-
* @public
|
|
208
|
-
* @type {Object[]}
|
|
209
|
-
*/
|
|
210
|
-
get outlets()
|
|
211
|
-
{
|
|
212
|
-
return this._outlets;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* The Sizer Type
|
|
217
|
-
*
|
|
218
|
-
* @public
|
|
219
|
-
* @type {string}
|
|
220
|
-
*/
|
|
221
|
-
get sizerType()
|
|
222
|
-
{
|
|
223
|
-
return this._sizerType;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* The Auto Create Batch Delay in Seconds for this Compac Sizer
|
|
228
|
-
*
|
|
229
|
-
* @public
|
|
230
|
-
* @type {number}
|
|
231
|
-
*/
|
|
232
|
-
get autoCreateBatchDelay()
|
|
233
|
-
{
|
|
234
|
-
return this._autoCreateBatchDelay;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* The Fruit Sizes defined and handled by this Compac Sizer
|
|
239
|
-
*
|
|
240
|
-
* @public
|
|
241
|
-
* @type {Object[]}
|
|
242
|
-
*/
|
|
243
|
-
get fruitSizes()
|
|
244
|
-
{
|
|
245
|
-
return this._fruitSizes;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* The Packing Line ID this Compac Sizer belongs to
|
|
250
|
-
*
|
|
251
|
-
* @public
|
|
252
|
-
* @type {string}
|
|
253
|
-
*/
|
|
254
|
-
get packingLineId()
|
|
255
|
-
{
|
|
256
|
-
return this._packingLineId;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* The FreshPack Integration Configuration for this Compac Sizer
|
|
261
|
-
*
|
|
262
|
-
* @public
|
|
263
|
-
* @type {?Object}
|
|
264
|
-
*/
|
|
265
|
-
get freshPackIntegration()
|
|
266
|
-
{
|
|
267
|
-
return this._freshPackIntegration;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* An Array of Sources that deliver Fruit to this Compac Sizer
|
|
272
|
-
*
|
|
273
|
-
* @public
|
|
274
|
-
* @type {Object[]}
|
|
275
|
-
*/
|
|
276
|
-
get sources()
|
|
277
|
-
{
|
|
278
|
-
return this._sources;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Whether the Compac Sizer has been deleted
|
|
283
|
-
*
|
|
284
|
-
* @public
|
|
285
|
-
* @type {boolean}
|
|
286
|
-
*/
|
|
287
|
-
get deleted()
|
|
288
|
-
{
|
|
289
|
-
return this._deleted;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* When the Compac Sizer was last updated
|
|
294
|
-
*
|
|
295
|
-
* @public
|
|
296
|
-
* @type {Date}
|
|
297
|
-
*/
|
|
298
|
-
get updateTimestamp()
|
|
299
|
-
{
|
|
300
|
-
return this._updateTimestamp;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* The Site ID associated with this Compac Sizer
|
|
305
|
-
*
|
|
306
|
-
* @public
|
|
307
|
-
* @type {number}
|
|
308
|
-
*/
|
|
309
|
-
get siteId()
|
|
310
|
-
{
|
|
311
|
-
return this._siteId;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Convert this **CompacSizerModel** to a JSON Object
|
|
316
|
-
*
|
|
317
|
-
* @public
|
|
318
|
-
* @return {Object<string, any>}
|
|
319
|
-
*/
|
|
320
|
-
toJSON()
|
|
321
|
-
{
|
|
322
|
-
return {
|
|
323
|
-
id: this._id,
|
|
324
|
-
rtuId: this._rtuId,
|
|
325
|
-
name: this._name,
|
|
326
|
-
lanes: this._lanes,
|
|
327
|
-
points: this._points,
|
|
328
|
-
outlets: this._outlets,
|
|
329
|
-
sizerType: this._sizerType,
|
|
330
|
-
autoCreateBatchDelay: this._autoCreateBatchDelay,
|
|
331
|
-
fruitSizes: this._fruitSizes,
|
|
332
|
-
packingLineId: this._packingLineId,
|
|
333
|
-
freshPackIntegration: this._freshPackIntegration,
|
|
334
|
-
sources: this._sources,
|
|
335
|
-
deleted: this._deleted,
|
|
336
|
-
updateTimestamp: this._updateTimestamp
|
|
337
|
-
};
|
|
137
|
+
this.updateTimestamp = undefined;
|
|
338
138
|
}
|
|
339
139
|
|
|
340
140
|
/**
|
|
@@ -343,12 +143,11 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
343
143
|
* @static
|
|
344
144
|
* @public
|
|
345
145
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
346
|
-
* @param {number} siteId The Site ID associated with this Compac Sizer
|
|
347
146
|
* @return {CompacSizerModel}
|
|
348
147
|
*/
|
|
349
|
-
static fromJSON(json
|
|
148
|
+
static fromJSON(json)
|
|
350
149
|
{
|
|
351
|
-
let model = new CompacSizerModel(
|
|
150
|
+
let model = new CompacSizerModel();
|
|
352
151
|
|
|
353
152
|
/**
|
|
354
153
|
* The JSON Object
|
|
@@ -368,7 +167,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
368
167
|
|
|
369
168
|
if('id' in jsonObject)
|
|
370
169
|
{
|
|
371
|
-
model.
|
|
170
|
+
model.id = (function(){
|
|
372
171
|
if(typeof jsonObject['id'] !== 'string')
|
|
373
172
|
{
|
|
374
173
|
return String(jsonObject['id']);
|
|
@@ -380,7 +179,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
380
179
|
|
|
381
180
|
if('rtuId' in jsonObject)
|
|
382
181
|
{
|
|
383
|
-
model.
|
|
182
|
+
model.rtuId = (function(){
|
|
384
183
|
if(jsonObject['rtuId'] === null)
|
|
385
184
|
{
|
|
386
185
|
return null;
|
|
@@ -397,7 +196,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
397
196
|
|
|
398
197
|
if('name' in jsonObject)
|
|
399
198
|
{
|
|
400
|
-
model.
|
|
199
|
+
model.name = (function(){
|
|
401
200
|
if(typeof jsonObject['name'] !== 'string')
|
|
402
201
|
{
|
|
403
202
|
return String(jsonObject['name']);
|
|
@@ -409,7 +208,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
409
208
|
|
|
410
209
|
if('lanes' in jsonObject)
|
|
411
210
|
{
|
|
412
|
-
model.
|
|
211
|
+
model.lanes = (function(){
|
|
413
212
|
if(Array.isArray(jsonObject['lanes']) !== true)
|
|
414
213
|
{
|
|
415
214
|
return [];
|
|
@@ -430,7 +229,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
430
229
|
|
|
431
230
|
if('points' in jsonObject)
|
|
432
231
|
{
|
|
433
|
-
model.
|
|
232
|
+
model.points = (function(){
|
|
434
233
|
if(typeof jsonObject['points'] !== 'object')
|
|
435
234
|
{
|
|
436
235
|
return Object(jsonObject['points']);
|
|
@@ -442,7 +241,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
442
241
|
|
|
443
242
|
if('outlets' in jsonObject)
|
|
444
243
|
{
|
|
445
|
-
model.
|
|
244
|
+
model.outlets = (function(){
|
|
446
245
|
if(Array.isArray(jsonObject['outlets']) !== true)
|
|
447
246
|
{
|
|
448
247
|
return [];
|
|
@@ -463,7 +262,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
463
262
|
|
|
464
263
|
if('sizerType' in jsonObject)
|
|
465
264
|
{
|
|
466
|
-
model.
|
|
265
|
+
model.sizerType = (function(){
|
|
467
266
|
if(typeof jsonObject['sizerType'] !== 'string')
|
|
468
267
|
{
|
|
469
268
|
return String(jsonObject['sizerType']);
|
|
@@ -475,7 +274,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
475
274
|
|
|
476
275
|
if('autoCreateBatchDelay' in jsonObject)
|
|
477
276
|
{
|
|
478
|
-
model.
|
|
277
|
+
model.autoCreateBatchDelay = (function(){
|
|
479
278
|
if(typeof jsonObject['autoCreateBatchDelay'] !== 'number')
|
|
480
279
|
{
|
|
481
280
|
return Number.isInteger(Number(jsonObject['autoCreateBatchDelay'])) ? Number(jsonObject['autoCreateBatchDelay']) : Math.floor(Number(jsonObject['autoCreateBatchDelay']));
|
|
@@ -487,7 +286,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
487
286
|
|
|
488
287
|
if('fruitSizes' in jsonObject)
|
|
489
288
|
{
|
|
490
|
-
model.
|
|
289
|
+
model.fruitSizes = (function(){
|
|
491
290
|
if(Array.isArray(jsonObject['fruitSizes']) !== true)
|
|
492
291
|
{
|
|
493
292
|
return [];
|
|
@@ -508,7 +307,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
508
307
|
|
|
509
308
|
if('packingLineId' in jsonObject)
|
|
510
309
|
{
|
|
511
|
-
model.
|
|
310
|
+
model.packingLineId = (function(){
|
|
512
311
|
if(typeof jsonObject['packingLineId'] !== 'string')
|
|
513
312
|
{
|
|
514
313
|
return String(jsonObject['packingLineId']);
|
|
@@ -520,7 +319,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
520
319
|
|
|
521
320
|
if('freshPackIntegration' in jsonObject)
|
|
522
321
|
{
|
|
523
|
-
model.
|
|
322
|
+
model.freshPackIntegration = (function(){
|
|
524
323
|
if(jsonObject['freshPackIntegration'] === null)
|
|
525
324
|
{
|
|
526
325
|
return null;
|
|
@@ -537,7 +336,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
537
336
|
|
|
538
337
|
if('sources' in jsonObject)
|
|
539
338
|
{
|
|
540
|
-
model.
|
|
339
|
+
model.sources = (function(){
|
|
541
340
|
if(Array.isArray(jsonObject['sources']) !== true)
|
|
542
341
|
{
|
|
543
342
|
return [];
|
|
@@ -558,7 +357,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
558
357
|
|
|
559
358
|
if('deleted' in jsonObject)
|
|
560
359
|
{
|
|
561
|
-
model.
|
|
360
|
+
model.deleted = (function(){
|
|
562
361
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
563
362
|
{
|
|
564
363
|
return Boolean(jsonObject['deleted']);
|
|
@@ -570,7 +369,7 @@ class CompacSizerModel extends BaseSiteModel
|
|
|
570
369
|
|
|
571
370
|
if('updateTimestamp' in jsonObject)
|
|
572
371
|
{
|
|
573
|
-
model.
|
|
372
|
+
model.updateTimestamp = (function(){
|
|
574
373
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
575
374
|
{
|
|
576
375
|
return new Date(String(jsonObject['updateTimestamp']));
|