@ricado/api-client 1.4.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
- package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackrunController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
- package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
- package/lib/Controllers/Site/AlarmController.js +4 -4
- package/lib/Controllers/Site/AlarmGroupController.js +4 -4
- package/lib/Controllers/Site/DefinitionController.js +4 -4
- package/lib/Controllers/Site/PermanentObjectController.js +4 -4
- package/lib/Controllers/Site/PermanentObjectDataController.js +4 -4
- package/lib/Controllers/Site/PointController.js +4 -4
- package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
- package/lib/Models/AccountPolicyModel.js +26 -130
- package/lib/Models/ApiAccountModel.js +26 -130
- package/lib/Models/CompanyModel.js +20 -98
- package/lib/Models/FirebaseTokenModel.js +29 -146
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +40 -192
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +37 -176
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +55 -272
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +43 -208
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +37 -176
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +31 -144
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +49 -240
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +55 -272
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +37 -176
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +31 -144
- package/lib/Models/Packhouse/Site/PackTypeModel.js +37 -176
- package/lib/Models/Packhouse/Site/PackingLineModel.js +58 -288
- package/lib/Models/Packhouse/Site/PackrunModel.js +58 -288
- package/lib/Models/Packhouse/Site/RejectBinModel.js +40 -192
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +49 -240
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +43 -208
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +49 -240
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +124 -640
- package/lib/Models/Packhouse/Site/ShiftModel.js +70 -352
- package/lib/Models/Packhouse/Site/VarietyModel.js +37 -176
- package/lib/Models/RTUModel.js +23 -114
- package/lib/Models/RTUPluginModel.js +20 -98
- package/lib/Models/Site/AlarmGroupModel.js +34 -160
- package/lib/Models/Site/AlarmModel.js +64 -320
- package/lib/Models/Site/DefinitionModel.js +31 -144
- package/lib/Models/Site/PermanentObjectDataModel.js +37 -176
- package/lib/Models/Site/PermanentObjectModel.js +34 -160
- package/lib/Models/Site/PointModel.js +46 -224
- package/lib/Models/Site/TemporaryObjectModel.js +31 -144
- package/lib/Models/Site/index.js +0 -3
- package/lib/Models/SiteModel.js +23 -114
- package/lib/Models/TokenModel.js +35 -178
- package/lib/Models/UserAccountActionTokenModel.js +38 -194
- package/lib/Models/UserAccountModel.js +35 -178
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +834 -1589
- package/package.json +1 -1
- 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 +4 -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 +4 -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 Downtime Event
|
|
11
11
|
*
|
|
12
12
|
* @class
|
|
13
13
|
* @hideconstructor
|
|
14
|
-
* @extends
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class DowntimeEventModel extends
|
|
16
|
+
class DowntimeEventModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* DowntimeEventModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
-
* @param {number} siteId The Site ID associated with this Downtime Event
|
|
23
22
|
*/
|
|
24
|
-
constructor(
|
|
23
|
+
constructor()
|
|
25
24
|
{
|
|
26
25
|
super();
|
|
27
26
|
|
|
@@ -29,312 +28,113 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
29
28
|
* The Downtime Event 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 Packing Line ID this Downtime Event is associated with
|
|
38
37
|
*
|
|
39
38
|
* @type {string}
|
|
40
|
-
* @
|
|
39
|
+
* @public
|
|
41
40
|
*/
|
|
42
|
-
this.
|
|
41
|
+
this.packingLineId = undefined;
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
44
|
* The Shift ID this Downtime Event is asssociated with
|
|
46
45
|
*
|
|
47
46
|
* @type {string}
|
|
48
|
-
* @
|
|
47
|
+
* @public
|
|
49
48
|
*/
|
|
50
|
-
this.
|
|
49
|
+
this.shiftId = undefined;
|
|
51
50
|
|
|
52
51
|
/**
|
|
53
52
|
* When this Downtime Event was Created
|
|
54
53
|
*
|
|
55
54
|
* @type {Date}
|
|
56
|
-
* @
|
|
55
|
+
* @public
|
|
57
56
|
*/
|
|
58
|
-
this.
|
|
57
|
+
this.createdTimestamp = undefined;
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
60
|
* When this Downtime Event Started
|
|
62
61
|
*
|
|
63
62
|
* @type {Date}
|
|
64
|
-
* @
|
|
63
|
+
* @public
|
|
65
64
|
*/
|
|
66
|
-
this.
|
|
65
|
+
this.startTimestamp = undefined;
|
|
67
66
|
|
|
68
67
|
/**
|
|
69
68
|
* When this Downtime Event Ended
|
|
70
69
|
*
|
|
71
70
|
* @type {?Date}
|
|
72
|
-
* @
|
|
71
|
+
* @public
|
|
73
72
|
*/
|
|
74
|
-
this.
|
|
73
|
+
this.endTimestamp = undefined;
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
76
|
* The Reason Category for this Downtime Event
|
|
78
77
|
*
|
|
79
78
|
* @type {?string}
|
|
80
|
-
* @
|
|
79
|
+
* @public
|
|
81
80
|
*/
|
|
82
|
-
this.
|
|
81
|
+
this.reasonCategory = undefined;
|
|
83
82
|
|
|
84
83
|
/**
|
|
85
84
|
* The Reason Tag for this Downtime Event
|
|
86
85
|
*
|
|
87
86
|
* @type {?string}
|
|
88
|
-
* @
|
|
87
|
+
* @public
|
|
89
88
|
*/
|
|
90
|
-
this.
|
|
89
|
+
this.reasonTag = undefined;
|
|
91
90
|
|
|
92
91
|
/**
|
|
93
92
|
* An Optional Summary of the Action taken to Remedy this Downtime Event
|
|
94
93
|
*
|
|
95
94
|
* @type {?string}
|
|
96
|
-
* @
|
|
95
|
+
* @public
|
|
97
96
|
*/
|
|
98
|
-
this.
|
|
97
|
+
this.remedyAction = undefined;
|
|
99
98
|
|
|
100
99
|
/**
|
|
101
100
|
* An Optional Rating between 1 and 10 on how likely this Downtime Event could have been Avoided
|
|
102
101
|
*
|
|
103
102
|
* @type {?number}
|
|
104
|
-
* @
|
|
103
|
+
* @public
|
|
105
104
|
*/
|
|
106
|
-
this.
|
|
105
|
+
this.avoidableRating = undefined;
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
108
|
* The Source which Created this Downtime Event
|
|
110
109
|
*
|
|
111
110
|
* @type {string}
|
|
112
|
-
* @
|
|
111
|
+
* @public
|
|
113
112
|
*/
|
|
114
|
-
this.
|
|
113
|
+
this.source = undefined;
|
|
115
114
|
|
|
116
115
|
/**
|
|
117
116
|
* The Status of this Downtime Event
|
|
118
117
|
*
|
|
119
118
|
* @type {string}
|
|
120
|
-
* @
|
|
119
|
+
* @public
|
|
121
120
|
*/
|
|
122
|
-
this.
|
|
121
|
+
this.status = undefined;
|
|
123
122
|
|
|
124
123
|
/**
|
|
125
124
|
* Whether the Downtime Event 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 Downtime Event 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 Downtime Event
|
|
142
|
-
*
|
|
143
|
-
* @type {number}
|
|
144
|
-
* @private
|
|
145
|
-
*/
|
|
146
|
-
this._siteId = siteId;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* The Downtime Event ID
|
|
151
|
-
*
|
|
152
|
-
* @public
|
|
153
|
-
* @type {string}
|
|
154
|
-
*/
|
|
155
|
-
get id()
|
|
156
|
-
{
|
|
157
|
-
return this._id;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* The Packing Line ID this Downtime Event is associated with
|
|
162
|
-
*
|
|
163
|
-
* @public
|
|
164
|
-
* @type {string}
|
|
165
|
-
*/
|
|
166
|
-
get packingLineId()
|
|
167
|
-
{
|
|
168
|
-
return this._packingLineId;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* The Shift ID this Downtime Event is asssociated with
|
|
173
|
-
*
|
|
174
|
-
* @public
|
|
175
|
-
* @type {string}
|
|
176
|
-
*/
|
|
177
|
-
get shiftId()
|
|
178
|
-
{
|
|
179
|
-
return this._shiftId;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* When this Downtime Event was Created
|
|
184
|
-
*
|
|
185
|
-
* @public
|
|
186
|
-
* @type {Date}
|
|
187
|
-
*/
|
|
188
|
-
get createdTimestamp()
|
|
189
|
-
{
|
|
190
|
-
return this._createdTimestamp;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* When this Downtime Event Started
|
|
195
|
-
*
|
|
196
|
-
* @public
|
|
197
|
-
* @type {Date}
|
|
198
|
-
*/
|
|
199
|
-
get startTimestamp()
|
|
200
|
-
{
|
|
201
|
-
return this._startTimestamp;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* When this Downtime Event Ended
|
|
206
|
-
*
|
|
207
|
-
* @public
|
|
208
|
-
* @type {?Date}
|
|
209
|
-
*/
|
|
210
|
-
get endTimestamp()
|
|
211
|
-
{
|
|
212
|
-
return this._endTimestamp;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* The Reason Category for this Downtime Event
|
|
217
|
-
*
|
|
218
|
-
* @public
|
|
219
|
-
* @type {?string}
|
|
220
|
-
*/
|
|
221
|
-
get reasonCategory()
|
|
222
|
-
{
|
|
223
|
-
return this._reasonCategory;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* The Reason Tag for this Downtime Event
|
|
228
|
-
*
|
|
229
|
-
* @public
|
|
230
|
-
* @type {?string}
|
|
231
|
-
*/
|
|
232
|
-
get reasonTag()
|
|
233
|
-
{
|
|
234
|
-
return this._reasonTag;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* An Optional Summary of the Action taken to Remedy this Downtime Event
|
|
239
|
-
*
|
|
240
|
-
* @public
|
|
241
|
-
* @type {?string}
|
|
242
|
-
*/
|
|
243
|
-
get remedyAction()
|
|
244
|
-
{
|
|
245
|
-
return this._remedyAction;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* An Optional Rating between 1 and 10 on how likely this Downtime Event could have been Avoided
|
|
250
|
-
*
|
|
251
|
-
* @public
|
|
252
|
-
* @type {?number}
|
|
253
|
-
*/
|
|
254
|
-
get avoidableRating()
|
|
255
|
-
{
|
|
256
|
-
return this._avoidableRating;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* The Source which Created this Downtime Event
|
|
261
|
-
*
|
|
262
|
-
* @public
|
|
263
|
-
* @type {string}
|
|
264
|
-
*/
|
|
265
|
-
get source()
|
|
266
|
-
{
|
|
267
|
-
return this._source;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* The Status of this Downtime Event
|
|
272
|
-
*
|
|
273
|
-
* @public
|
|
274
|
-
* @type {string}
|
|
275
|
-
*/
|
|
276
|
-
get status()
|
|
277
|
-
{
|
|
278
|
-
return this._status;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Whether the Downtime Event has been deleted
|
|
283
|
-
*
|
|
284
|
-
* @public
|
|
285
|
-
* @type {boolean}
|
|
286
|
-
*/
|
|
287
|
-
get deleted()
|
|
288
|
-
{
|
|
289
|
-
return this._deleted;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* When the Downtime Event 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 Downtime Event
|
|
305
|
-
*
|
|
306
|
-
* @public
|
|
307
|
-
* @type {number}
|
|
308
|
-
*/
|
|
309
|
-
get siteId()
|
|
310
|
-
{
|
|
311
|
-
return this._siteId;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Convert this **DowntimeEventModel** to a JSON Object
|
|
316
|
-
*
|
|
317
|
-
* @public
|
|
318
|
-
* @return {Object<string, any>}
|
|
319
|
-
*/
|
|
320
|
-
toJSON()
|
|
321
|
-
{
|
|
322
|
-
return {
|
|
323
|
-
id: this._id,
|
|
324
|
-
packingLineId: this._packingLineId,
|
|
325
|
-
shiftId: this._shiftId,
|
|
326
|
-
createdTimestamp: this._createdTimestamp,
|
|
327
|
-
startTimestamp: this._startTimestamp,
|
|
328
|
-
endTimestamp: this._endTimestamp,
|
|
329
|
-
reasonCategory: this._reasonCategory,
|
|
330
|
-
reasonTag: this._reasonTag,
|
|
331
|
-
remedyAction: this._remedyAction,
|
|
332
|
-
avoidableRating: this._avoidableRating,
|
|
333
|
-
source: this._source,
|
|
334
|
-
status: this._status,
|
|
335
|
-
deleted: this._deleted,
|
|
336
|
-
updateTimestamp: this._updateTimestamp
|
|
337
|
-
};
|
|
137
|
+
this.updateTimestamp = undefined;
|
|
338
138
|
}
|
|
339
139
|
|
|
340
140
|
/**
|
|
@@ -343,12 +143,11 @@ class DowntimeEventModel 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 Downtime Event
|
|
347
146
|
* @return {DowntimeEventModel}
|
|
348
147
|
*/
|
|
349
|
-
static fromJSON(json
|
|
148
|
+
static fromJSON(json)
|
|
350
149
|
{
|
|
351
|
-
let model = new DowntimeEventModel(
|
|
150
|
+
let model = new DowntimeEventModel();
|
|
352
151
|
|
|
353
152
|
/**
|
|
354
153
|
* The JSON Object
|
|
@@ -368,7 +167,7 @@ class DowntimeEventModel 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 DowntimeEventModel extends BaseSiteModel
|
|
|
380
179
|
|
|
381
180
|
if('packingLineId' in jsonObject)
|
|
382
181
|
{
|
|
383
|
-
model.
|
|
182
|
+
model.packingLineId = (function(){
|
|
384
183
|
if(typeof jsonObject['packingLineId'] !== 'string')
|
|
385
184
|
{
|
|
386
185
|
return String(jsonObject['packingLineId']);
|
|
@@ -392,7 +191,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
392
191
|
|
|
393
192
|
if('shiftId' in jsonObject)
|
|
394
193
|
{
|
|
395
|
-
model.
|
|
194
|
+
model.shiftId = (function(){
|
|
396
195
|
if(typeof jsonObject['shiftId'] !== 'string')
|
|
397
196
|
{
|
|
398
197
|
return String(jsonObject['shiftId']);
|
|
@@ -404,7 +203,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
404
203
|
|
|
405
204
|
if('createdTimestamp' in jsonObject)
|
|
406
205
|
{
|
|
407
|
-
model.
|
|
206
|
+
model.createdTimestamp = (function(){
|
|
408
207
|
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
409
208
|
{
|
|
410
209
|
return new Date(String(jsonObject['createdTimestamp']));
|
|
@@ -416,7 +215,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
416
215
|
|
|
417
216
|
if('startTimestamp' in jsonObject)
|
|
418
217
|
{
|
|
419
|
-
model.
|
|
218
|
+
model.startTimestamp = (function(){
|
|
420
219
|
if(typeof jsonObject['startTimestamp'] !== 'string')
|
|
421
220
|
{
|
|
422
221
|
return new Date(String(jsonObject['startTimestamp']));
|
|
@@ -428,7 +227,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
428
227
|
|
|
429
228
|
if('endTimestamp' in jsonObject)
|
|
430
229
|
{
|
|
431
|
-
model.
|
|
230
|
+
model.endTimestamp = (function(){
|
|
432
231
|
if(jsonObject['endTimestamp'] === null)
|
|
433
232
|
{
|
|
434
233
|
return null;
|
|
@@ -445,7 +244,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
445
244
|
|
|
446
245
|
if('reasonCategory' in jsonObject)
|
|
447
246
|
{
|
|
448
|
-
model.
|
|
247
|
+
model.reasonCategory = (function(){
|
|
449
248
|
if(jsonObject['reasonCategory'] === null)
|
|
450
249
|
{
|
|
451
250
|
return null;
|
|
@@ -462,7 +261,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
462
261
|
|
|
463
262
|
if('reasonTag' in jsonObject)
|
|
464
263
|
{
|
|
465
|
-
model.
|
|
264
|
+
model.reasonTag = (function(){
|
|
466
265
|
if(jsonObject['reasonTag'] === null)
|
|
467
266
|
{
|
|
468
267
|
return null;
|
|
@@ -479,7 +278,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
479
278
|
|
|
480
279
|
if('remedyAction' in jsonObject)
|
|
481
280
|
{
|
|
482
|
-
model.
|
|
281
|
+
model.remedyAction = (function(){
|
|
483
282
|
if(jsonObject['remedyAction'] === null)
|
|
484
283
|
{
|
|
485
284
|
return null;
|
|
@@ -496,7 +295,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
496
295
|
|
|
497
296
|
if('avoidableRating' in jsonObject)
|
|
498
297
|
{
|
|
499
|
-
model.
|
|
298
|
+
model.avoidableRating = (function(){
|
|
500
299
|
if(jsonObject['avoidableRating'] === null)
|
|
501
300
|
{
|
|
502
301
|
return null;
|
|
@@ -513,7 +312,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
513
312
|
|
|
514
313
|
if('source' in jsonObject)
|
|
515
314
|
{
|
|
516
|
-
model.
|
|
315
|
+
model.source = (function(){
|
|
517
316
|
if(typeof jsonObject['source'] !== 'string')
|
|
518
317
|
{
|
|
519
318
|
return String(jsonObject['source']);
|
|
@@ -525,7 +324,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
525
324
|
|
|
526
325
|
if('status' in jsonObject)
|
|
527
326
|
{
|
|
528
|
-
model.
|
|
327
|
+
model.status = (function(){
|
|
529
328
|
if(typeof jsonObject['status'] !== 'string')
|
|
530
329
|
{
|
|
531
330
|
return String(jsonObject['status']);
|
|
@@ -537,7 +336,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
537
336
|
|
|
538
337
|
if('deleted' in jsonObject)
|
|
539
338
|
{
|
|
540
|
-
model.
|
|
339
|
+
model.deleted = (function(){
|
|
541
340
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
542
341
|
{
|
|
543
342
|
return Boolean(jsonObject['deleted']);
|
|
@@ -549,7 +348,7 @@ class DowntimeEventModel extends BaseSiteModel
|
|
|
549
348
|
|
|
550
349
|
if('updateTimestamp' in jsonObject)
|
|
551
350
|
{
|
|
552
|
-
model.
|
|
351
|
+
model.updateTimestamp = (function(){
|
|
553
352
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
554
353
|
{
|
|
555
354
|
return new Date(String(jsonObject['updateTimestamp']));
|