@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.
Files changed (162) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/AccountPolicyController.js +1 -1
  3. package/lib/Controllers/ApiAccountController.js +2 -2
  4. package/lib/Controllers/CompanyController.js +1 -1
  5. package/lib/Controllers/FirebaseTokenController.js +1 -1
  6. package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +6 -6
  7. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +6 -6
  8. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +5 -5
  9. package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +6 -6
  10. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +6 -6
  11. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +5 -5
  12. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +6 -6
  13. package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +6 -6
  14. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +6 -6
  15. package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +5 -5
  16. package/lib/Controllers/Packhouse/Site/PackTypeController.js +5 -5
  17. package/lib/Controllers/Packhouse/Site/PackingLineController.js +5 -5
  18. package/lib/Controllers/Packhouse/Site/PackrunController.js +292 -6
  19. package/lib/Controllers/Packhouse/Site/RejectBinController.js +6 -6
  20. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +5 -5
  21. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +6 -6
  22. package/lib/Controllers/Packhouse/Site/ShiftController.js +6 -6
  23. package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +6 -6
  24. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +6 -6
  25. package/lib/Controllers/Packhouse/Site/VarietyController.js +5 -5
  26. package/lib/Controllers/RTU/GlobalSettingsController.js +2 -2
  27. package/lib/Controllers/RTU/PluginSettingsController.js +2 -2
  28. package/lib/Controllers/RTUController.js +1 -1
  29. package/lib/Controllers/RTUPluginController.js +1 -1
  30. package/lib/Controllers/Site/AlarmController.js +6 -6
  31. package/lib/Controllers/Site/AlarmGroupController.js +5 -5
  32. package/lib/Controllers/Site/DefinitionController.js +5 -5
  33. package/lib/Controllers/Site/PermanentObjectController.js +5 -5
  34. package/lib/Controllers/Site/PermanentObjectDataController.js +6 -6
  35. package/lib/Controllers/Site/PointController.js +8 -6
  36. package/lib/Controllers/Site/TemporaryObjectController.js +5 -5
  37. package/lib/Controllers/SiteController.js +1 -1
  38. package/lib/Controllers/TokenController.js +2 -2
  39. package/lib/Controllers/ToolsController.js +1 -1
  40. package/lib/Controllers/UserAccountActionTokenController.js +2 -2
  41. package/lib/Controllers/UserAccountController.js +2 -2
  42. package/lib/DataItems/PointValueItem.js +2 -2
  43. package/lib/Errors/BadRequestError.js +7 -3
  44. package/lib/Errors/ForbiddenError.js +7 -3
  45. package/lib/Errors/NetworkError.js +7 -3
  46. package/lib/Errors/NotAllowedError.js +7 -3
  47. package/lib/Errors/NotFoundError.js +7 -3
  48. package/lib/Errors/ServerError.js +7 -3
  49. package/lib/Errors/UnauthorizedError.js +7 -3
  50. package/lib/Models/AccountPolicyModel.js +29 -133
  51. package/lib/Models/ApiAccountModel.js +29 -133
  52. package/lib/Models/BaseModel.js +6 -2
  53. package/lib/Models/CompanyModel.js +23 -101
  54. package/lib/Models/FirebaseTokenModel.js +32 -149
  55. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +43 -195
  56. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +40 -179
  57. package/lib/Models/Packhouse/Site/CompacSizerModel.js +58 -275
  58. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +46 -211
  59. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +40 -179
  60. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +34 -147
  61. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +52 -243
  62. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +58 -275
  63. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +40 -179
  64. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +34 -147
  65. package/lib/Models/Packhouse/Site/PackTypeModel.js +40 -179
  66. package/lib/Models/Packhouse/Site/PackingLineModel.js +61 -291
  67. package/lib/Models/Packhouse/Site/PackrunModel.js +61 -291
  68. package/lib/Models/Packhouse/Site/RejectBinModel.js +43 -195
  69. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +52 -243
  70. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +46 -211
  71. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +52 -243
  72. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +127 -643
  73. package/lib/Models/Packhouse/Site/ShiftModel.js +73 -355
  74. package/lib/Models/Packhouse/Site/VarietyModel.js +40 -179
  75. package/lib/Models/RTUModel.js +26 -117
  76. package/lib/Models/RTUPluginModel.js +23 -101
  77. package/lib/Models/Site/AlarmGroupModel.js +37 -163
  78. package/lib/Models/Site/AlarmModel.js +67 -323
  79. package/lib/Models/Site/DefinitionModel.js +34 -147
  80. package/lib/Models/Site/PermanentObjectDataModel.js +40 -179
  81. package/lib/Models/Site/PermanentObjectModel.js +37 -163
  82. package/lib/Models/Site/PointModel.js +49 -227
  83. package/lib/Models/Site/TemporaryObjectModel.js +34 -147
  84. package/lib/Models/Site/index.js +0 -3
  85. package/lib/Models/SiteModel.js +26 -117
  86. package/lib/Models/TokenModel.js +38 -181
  87. package/lib/Models/UserAccountActionTokenModel.js +41 -197
  88. package/lib/Models/UserAccountModel.js +38 -181
  89. package/lib/PackageVersion.js +1 -1
  90. package/lib/Points.js +1 -1
  91. package/lib/RequestHelper.js +2 -2
  92. package/lib/WebSocketHelper.js +1 -1
  93. package/lib/index.d.ts +931 -1589
  94. package/package.json +3 -3
  95. package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  96. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  97. package/src/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
  98. package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  99. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  100. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  101. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  102. package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  103. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  104. package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  105. package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  106. package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
  107. package/src/Controllers/Packhouse/Site/PackrunController.js +365 -4
  108. package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  109. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
  110. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  111. package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
  112. package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  113. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
  114. package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
  115. package/src/Controllers/Site/AlarmController.js +4 -4
  116. package/src/Controllers/Site/AlarmGroupController.js +4 -4
  117. package/src/Controllers/Site/DefinitionController.js +4 -4
  118. package/src/Controllers/Site/PermanentObjectController.js +4 -4
  119. package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
  120. package/src/Controllers/Site/PointController.js +6 -4
  121. package/src/Controllers/Site/TemporaryObjectController.js +4 -4
  122. package/src/Models/AccountPolicyModel.js +21 -117
  123. package/src/Models/ApiAccountModel.js +21 -117
  124. package/src/Models/CompanyModel.js +15 -87
  125. package/src/Models/FirebaseTokenModel.js +24 -132
  126. package/src/Models/Packhouse/Site/BinTipWeightModel.js +33 -174
  127. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +30 -159
  128. package/src/Models/Packhouse/Site/CompacSizerModel.js +48 -249
  129. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +36 -189
  130. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +30 -159
  131. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +24 -129
  132. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +42 -219
  133. package/src/Models/Packhouse/Site/DowntimeEventModel.js +48 -249
  134. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +30 -159
  135. package/src/Models/Packhouse/Site/GrowingMethodModel.js +24 -129
  136. package/src/Models/Packhouse/Site/PackTypeModel.js +30 -159
  137. package/src/Models/Packhouse/Site/PackingLineModel.js +51 -264
  138. package/src/Models/Packhouse/Site/PackrunModel.js +51 -264
  139. package/src/Models/Packhouse/Site/RejectBinModel.js +33 -174
  140. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +42 -219
  141. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +36 -189
  142. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +42 -219
  143. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +117 -594
  144. package/src/Models/Packhouse/Site/ShiftModel.js +63 -324
  145. package/src/Models/Packhouse/Site/VarietyModel.js +30 -159
  146. package/src/Models/RTUModel.js +18 -102
  147. package/src/Models/RTUPluginModel.js +15 -87
  148. package/src/Models/Site/AlarmGroupModel.js +27 -144
  149. package/src/Models/Site/AlarmModel.js +57 -294
  150. package/src/Models/Site/DefinitionModel.js +24 -129
  151. package/src/Models/Site/PermanentObjectDataModel.js +30 -159
  152. package/src/Models/Site/PermanentObjectModel.js +27 -144
  153. package/src/Models/Site/PointModel.js +39 -204
  154. package/src/Models/Site/TemporaryObjectModel.js +24 -129
  155. package/src/Models/Site/index.js +0 -2
  156. package/src/Models/SiteModel.js +18 -102
  157. package/src/Models/TokenModel.js +30 -162
  158. package/src/Models/UserAccountActionTokenModel.js +33 -177
  159. package/src/Models/UserAccountModel.js +30 -162
  160. package/src/PackageVersion.js +1 -1
  161. package/lib/Models/Site/BaseSiteModel.js +0 -58
  162. 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 BaseSiteModel from '../../Models/Site/BaseSiteModel';
7
+ import BaseModel from '../../Models/BaseModel';
8
8
 
9
9
  /**
10
10
  * Model Class for a Alarm
11
11
  *
12
12
  * @class
13
13
  * @hideconstructor
14
- * @extends BaseSiteModel
14
+ * @extends BaseModel
15
15
  */
16
- class AlarmModel extends BaseSiteModel
16
+ class AlarmModel extends BaseModel
17
17
  {
18
18
  /**
19
19
  * AlarmModel Constructor
20
20
  *
21
21
  * @protected
22
- * @param {number} siteId The Site ID associated with this Alarm
23
22
  */
24
- constructor(siteId)
23
+ constructor()
25
24
  {
26
25
  super();
27
26
 
@@ -29,372 +28,137 @@ class AlarmModel extends BaseSiteModel
29
28
  * The Alarm ID
30
29
  *
31
30
  * @type {string}
32
- * @private
31
+ * @public
33
32
  */
34
- this._id = undefined;
33
+ this.id = undefined;
35
34
 
36
35
  /**
37
36
  * The RTU this Alarm belongs to
38
37
  *
39
38
  * @type {?number}
40
- * @private
39
+ * @public
41
40
  */
42
- this._rtuId = undefined;
41
+ this.rtuId = undefined;
43
42
 
44
43
  /**
45
44
  * The Alarm Group this Alarm is a part of
46
45
  *
47
46
  * @type {string}
48
- * @private
47
+ * @public
49
48
  */
50
- this._groupId = undefined;
49
+ this.groupId = undefined;
51
50
 
52
51
  /**
53
52
  * The Alarm Name
54
53
  *
55
54
  * @type {string}
56
- * @private
55
+ * @public
57
56
  */
58
- this._name = undefined;
57
+ this.name = undefined;
59
58
 
60
59
  /**
61
60
  * Whether the Alarm is Critical or not
62
61
  *
63
62
  * @type {boolean}
64
- * @private
63
+ * @public
65
64
  */
66
- this._critical = undefined;
65
+ this.critical = undefined;
67
66
 
68
67
  /**
69
68
  * The Python Script with the Conditions to Trip this Alarm
70
69
  *
71
70
  * @type {string}
72
- * @private
71
+ * @public
73
72
  */
74
- this._tripScript = undefined;
73
+ this.tripScript = undefined;
75
74
 
76
75
  /**
77
76
  * The Python Script with the Conditions to Reset this Alarm
78
77
  *
79
78
  * @type {?string}
80
- * @private
79
+ * @public
81
80
  */
82
- this._resetScript = undefined;
81
+ this.resetScript = undefined;
83
82
 
84
83
  /**
85
84
  * The Delay before this Alarm will Trip in Milliseconds
86
85
  *
87
86
  * @type {number}
88
- * @private
87
+ * @public
89
88
  */
90
- this._tripDelay = undefined;
89
+ this.tripDelay = undefined;
91
90
 
92
91
  /**
93
92
  * The Delay before this Alarm will Reset in Milliseconds
94
93
  *
95
94
  * @type {number}
96
- * @private
95
+ * @public
97
96
  */
98
- this._resetDelay = undefined;
97
+ this.resetDelay = undefined;
99
98
 
100
99
  /**
101
100
  * Whether the Alarm should Automatically Reset
102
101
  *
103
102
  * @type {boolean}
104
- * @private
103
+ * @public
105
104
  */
106
- this._autoReset = undefined;
105
+ this.autoReset = undefined;
107
106
 
108
107
  /**
109
108
  * The Delay before this Alarm should Auto Reset in Milliseconds
110
109
  *
111
110
  * @type {number}
112
- * @private
111
+ * @public
113
112
  */
114
- this._autoResetDelay = undefined;
113
+ this.autoResetDelay = undefined;
115
114
 
116
115
  /**
117
116
  * The Point used to store the Alarm Tripped State
118
117
  *
119
118
  * @type {number}
120
- * @private
119
+ * @public
121
120
  */
122
- this._trippedStatePoint = undefined;
121
+ this.trippedStatePoint = undefined;
123
122
 
124
123
  /**
125
124
  * The Point used to store the Alarm Tripped Timestamp
126
125
  *
127
126
  * @type {number}
128
- * @private
127
+ * @public
129
128
  */
130
- this._trippedTimestampPoint = undefined;
129
+ this.trippedTimestampPoint = undefined;
131
130
 
132
131
  /**
133
132
  * The Point used to store the Alarm's Internal Trip Start
134
133
  *
135
134
  * @type {number}
136
- * @private
135
+ * @public
137
136
  */
138
- this._internalTripStartPoint = undefined;
137
+ this.internalTripStartPoint = undefined;
139
138
 
140
139
  /**
141
140
  * The Point used to store the Alarm's Internal Reset Start
142
141
  *
143
142
  * @type {number}
144
- * @private
143
+ * @public
145
144
  */
146
- this._internalResetStartPoint = undefined;
145
+ this.internalResetStartPoint = undefined;
147
146
 
148
147
  /**
149
148
  * Whether the Alarm has been deleted
150
149
  *
151
150
  * @type {boolean}
152
- * @private
151
+ * @public
153
152
  */
154
- this._deleted = undefined;
153
+ this.deleted = undefined;
155
154
 
156
155
  /**
157
156
  * When the Alarm was last updated
158
157
  *
159
158
  * @type {Date}
160
- * @private
159
+ * @public
161
160
  */
162
- this._updateTimestamp = undefined;
163
-
164
- /**
165
- * The Site ID associated with this Alarm
166
- *
167
- * @type {number}
168
- * @private
169
- */
170
- this._siteId = siteId;
171
- }
172
-
173
- /**
174
- * The Alarm ID
175
- *
176
- * @public
177
- * @type {string}
178
- */
179
- get id()
180
- {
181
- return this._id;
182
- }
183
-
184
- /**
185
- * The RTU this Alarm belongs to
186
- *
187
- * @public
188
- * @type {?number}
189
- */
190
- get rtuId()
191
- {
192
- return this._rtuId;
193
- }
194
-
195
- /**
196
- * The Alarm Group this Alarm is a part of
197
- *
198
- * @public
199
- * @type {string}
200
- */
201
- get groupId()
202
- {
203
- return this._groupId;
204
- }
205
-
206
- /**
207
- * The Alarm Name
208
- *
209
- * @public
210
- * @type {string}
211
- */
212
- get name()
213
- {
214
- return this._name;
215
- }
216
-
217
- /**
218
- * Whether the Alarm is Critical or not
219
- *
220
- * @public
221
- * @type {boolean}
222
- */
223
- get critical()
224
- {
225
- return this._critical;
226
- }
227
-
228
- /**
229
- * The Python Script with the Conditions to Trip this Alarm
230
- *
231
- * @public
232
- * @type {string}
233
- */
234
- get tripScript()
235
- {
236
- return this._tripScript;
237
- }
238
-
239
- /**
240
- * The Python Script with the Conditions to Reset this Alarm
241
- *
242
- * @public
243
- * @type {?string}
244
- */
245
- get resetScript()
246
- {
247
- return this._resetScript;
248
- }
249
-
250
- /**
251
- * The Delay before this Alarm will Trip in Milliseconds
252
- *
253
- * @public
254
- * @type {number}
255
- */
256
- get tripDelay()
257
- {
258
- return this._tripDelay;
259
- }
260
-
261
- /**
262
- * The Delay before this Alarm will Reset in Milliseconds
263
- *
264
- * @public
265
- * @type {number}
266
- */
267
- get resetDelay()
268
- {
269
- return this._resetDelay;
270
- }
271
-
272
- /**
273
- * Whether the Alarm should Automatically Reset
274
- *
275
- * @public
276
- * @type {boolean}
277
- */
278
- get autoReset()
279
- {
280
- return this._autoReset;
281
- }
282
-
283
- /**
284
- * The Delay before this Alarm should Auto Reset in Milliseconds
285
- *
286
- * @public
287
- * @type {number}
288
- */
289
- get autoResetDelay()
290
- {
291
- return this._autoResetDelay;
292
- }
293
-
294
- /**
295
- * The Point used to store the Alarm Tripped State
296
- *
297
- * @public
298
- * @type {number}
299
- */
300
- get trippedStatePoint()
301
- {
302
- return this._trippedStatePoint;
303
- }
304
-
305
- /**
306
- * The Point used to store the Alarm Tripped Timestamp
307
- *
308
- * @public
309
- * @type {number}
310
- */
311
- get trippedTimestampPoint()
312
- {
313
- return this._trippedTimestampPoint;
314
- }
315
-
316
- /**
317
- * The Point used to store the Alarm's Internal Trip Start
318
- *
319
- * @public
320
- * @type {number}
321
- */
322
- get internalTripStartPoint()
323
- {
324
- return this._internalTripStartPoint;
325
- }
326
-
327
- /**
328
- * The Point used to store the Alarm's Internal Reset Start
329
- *
330
- * @public
331
- * @type {number}
332
- */
333
- get internalResetStartPoint()
334
- {
335
- return this._internalResetStartPoint;
336
- }
337
-
338
- /**
339
- * Whether the Alarm has been deleted
340
- *
341
- * @public
342
- * @type {boolean}
343
- */
344
- get deleted()
345
- {
346
- return this._deleted;
347
- }
348
-
349
- /**
350
- * When the Alarm was last updated
351
- *
352
- * @public
353
- * @type {Date}
354
- */
355
- get updateTimestamp()
356
- {
357
- return this._updateTimestamp;
358
- }
359
-
360
- /**
361
- * The Site ID associated with this Alarm
362
- *
363
- * @public
364
- * @type {number}
365
- */
366
- get siteId()
367
- {
368
- return this._siteId;
369
- }
370
-
371
- /**
372
- * Convert this **AlarmModel** to a JSON Object
373
- *
374
- * @public
375
- * @return {Object<string, any>}
376
- */
377
- toJSON()
378
- {
379
- return {
380
- id: this._id,
381
- rtuId: this._rtuId,
382
- groupId: this._groupId,
383
- name: this._name,
384
- critical: this._critical,
385
- tripScript: this._tripScript,
386
- resetScript: this._resetScript,
387
- tripDelay: this._tripDelay,
388
- resetDelay: this._resetDelay,
389
- autoReset: this._autoReset,
390
- autoResetDelay: this._autoResetDelay,
391
- trippedStatePoint: this._trippedStatePoint,
392
- trippedTimestampPoint: this._trippedTimestampPoint,
393
- internalTripStartPoint: this._internalTripStartPoint,
394
- internalResetStartPoint: this._internalResetStartPoint,
395
- deleted: this._deleted,
396
- updateTimestamp: this._updateTimestamp
397
- };
161
+ this.updateTimestamp = undefined;
398
162
  }
399
163
 
400
164
  /**
@@ -403,12 +167,11 @@ class AlarmModel extends BaseSiteModel
403
167
  * @static
404
168
  * @public
405
169
  * @param {Object<string, any>|string} json A JSON Object or JSON String
406
- * @param {number} siteId The Site ID associated with this Alarm
407
170
  * @return {AlarmModel}
408
171
  */
409
- static fromJSON(json, siteId)
172
+ static fromJSON(json)
410
173
  {
411
- let model = new AlarmModel(siteId);
174
+ let model = new AlarmModel();
412
175
 
413
176
  /**
414
177
  * The JSON Object
@@ -428,7 +191,7 @@ class AlarmModel extends BaseSiteModel
428
191
 
429
192
  if('id' in jsonObject)
430
193
  {
431
- model._id = (function(){
194
+ model.id = (function(){
432
195
  if(typeof jsonObject['id'] !== 'string')
433
196
  {
434
197
  return String(jsonObject['id']);
@@ -440,7 +203,7 @@ class AlarmModel extends BaseSiteModel
440
203
 
441
204
  if('rtuId' in jsonObject)
442
205
  {
443
- model._rtuId = (function(){
206
+ model.rtuId = (function(){
444
207
  if(jsonObject['rtuId'] === null)
445
208
  {
446
209
  return null;
@@ -457,7 +220,7 @@ class AlarmModel extends BaseSiteModel
457
220
 
458
221
  if('groupId' in jsonObject)
459
222
  {
460
- model._groupId = (function(){
223
+ model.groupId = (function(){
461
224
  if(typeof jsonObject['groupId'] !== 'string')
462
225
  {
463
226
  return String(jsonObject['groupId']);
@@ -469,7 +232,7 @@ class AlarmModel extends BaseSiteModel
469
232
 
470
233
  if('name' in jsonObject)
471
234
  {
472
- model._name = (function(){
235
+ model.name = (function(){
473
236
  if(typeof jsonObject['name'] !== 'string')
474
237
  {
475
238
  return String(jsonObject['name']);
@@ -481,7 +244,7 @@ class AlarmModel extends BaseSiteModel
481
244
 
482
245
  if('critical' in jsonObject)
483
246
  {
484
- model._critical = (function(){
247
+ model.critical = (function(){
485
248
  if(typeof jsonObject['critical'] !== 'boolean')
486
249
  {
487
250
  return Boolean(jsonObject['critical']);
@@ -493,7 +256,7 @@ class AlarmModel extends BaseSiteModel
493
256
 
494
257
  if('tripScript' in jsonObject)
495
258
  {
496
- model._tripScript = (function(){
259
+ model.tripScript = (function(){
497
260
  if(typeof jsonObject['tripScript'] !== 'string')
498
261
  {
499
262
  return String(jsonObject['tripScript']);
@@ -505,7 +268,7 @@ class AlarmModel extends BaseSiteModel
505
268
 
506
269
  if('resetScript' in jsonObject)
507
270
  {
508
- model._resetScript = (function(){
271
+ model.resetScript = (function(){
509
272
  if(jsonObject['resetScript'] === null)
510
273
  {
511
274
  return null;
@@ -522,7 +285,7 @@ class AlarmModel extends BaseSiteModel
522
285
 
523
286
  if('tripDelay' in jsonObject)
524
287
  {
525
- model._tripDelay = (function(){
288
+ model.tripDelay = (function(){
526
289
  if(typeof jsonObject['tripDelay'] !== 'number')
527
290
  {
528
291
  return Number.isInteger(Number(jsonObject['tripDelay'])) ? Number(jsonObject['tripDelay']) : Math.floor(Number(jsonObject['tripDelay']));
@@ -534,7 +297,7 @@ class AlarmModel extends BaseSiteModel
534
297
 
535
298
  if('resetDelay' in jsonObject)
536
299
  {
537
- model._resetDelay = (function(){
300
+ model.resetDelay = (function(){
538
301
  if(typeof jsonObject['resetDelay'] !== 'number')
539
302
  {
540
303
  return Number.isInteger(Number(jsonObject['resetDelay'])) ? Number(jsonObject['resetDelay']) : Math.floor(Number(jsonObject['resetDelay']));
@@ -546,7 +309,7 @@ class AlarmModel extends BaseSiteModel
546
309
 
547
310
  if('autoReset' in jsonObject)
548
311
  {
549
- model._autoReset = (function(){
312
+ model.autoReset = (function(){
550
313
  if(typeof jsonObject['autoReset'] !== 'boolean')
551
314
  {
552
315
  return Boolean(jsonObject['autoReset']);
@@ -558,7 +321,7 @@ class AlarmModel extends BaseSiteModel
558
321
 
559
322
  if('autoResetDelay' in jsonObject)
560
323
  {
561
- model._autoResetDelay = (function(){
324
+ model.autoResetDelay = (function(){
562
325
  if(typeof jsonObject['autoResetDelay'] !== 'number')
563
326
  {
564
327
  return Number.isInteger(Number(jsonObject['autoResetDelay'])) ? Number(jsonObject['autoResetDelay']) : Math.floor(Number(jsonObject['autoResetDelay']));
@@ -570,7 +333,7 @@ class AlarmModel extends BaseSiteModel
570
333
 
571
334
  if('trippedStatePoint' in jsonObject)
572
335
  {
573
- model._trippedStatePoint = (function(){
336
+ model.trippedStatePoint = (function(){
574
337
  if(typeof jsonObject['trippedStatePoint'] !== 'number')
575
338
  {
576
339
  return Number.isInteger(Number(jsonObject['trippedStatePoint'])) ? Number(jsonObject['trippedStatePoint']) : Math.floor(Number(jsonObject['trippedStatePoint']));
@@ -582,7 +345,7 @@ class AlarmModel extends BaseSiteModel
582
345
 
583
346
  if('trippedTimestampPoint' in jsonObject)
584
347
  {
585
- model._trippedTimestampPoint = (function(){
348
+ model.trippedTimestampPoint = (function(){
586
349
  if(typeof jsonObject['trippedTimestampPoint'] !== 'number')
587
350
  {
588
351
  return Number.isInteger(Number(jsonObject['trippedTimestampPoint'])) ? Number(jsonObject['trippedTimestampPoint']) : Math.floor(Number(jsonObject['trippedTimestampPoint']));
@@ -594,7 +357,7 @@ class AlarmModel extends BaseSiteModel
594
357
 
595
358
  if('internalTripStartPoint' in jsonObject)
596
359
  {
597
- model._internalTripStartPoint = (function(){
360
+ model.internalTripStartPoint = (function(){
598
361
  if(typeof jsonObject['internalTripStartPoint'] !== 'number')
599
362
  {
600
363
  return Number.isInteger(Number(jsonObject['internalTripStartPoint'])) ? Number(jsonObject['internalTripStartPoint']) : Math.floor(Number(jsonObject['internalTripStartPoint']));
@@ -606,7 +369,7 @@ class AlarmModel extends BaseSiteModel
606
369
 
607
370
  if('internalResetStartPoint' in jsonObject)
608
371
  {
609
- model._internalResetStartPoint = (function(){
372
+ model.internalResetStartPoint = (function(){
610
373
  if(typeof jsonObject['internalResetStartPoint'] !== 'number')
611
374
  {
612
375
  return Number.isInteger(Number(jsonObject['internalResetStartPoint'])) ? Number(jsonObject['internalResetStartPoint']) : Math.floor(Number(jsonObject['internalResetStartPoint']));
@@ -618,7 +381,7 @@ class AlarmModel extends BaseSiteModel
618
381
 
619
382
  if('deleted' in jsonObject)
620
383
  {
621
- model._deleted = (function(){
384
+ model.deleted = (function(){
622
385
  if(typeof jsonObject['deleted'] !== 'boolean')
623
386
  {
624
387
  return Boolean(jsonObject['deleted']);
@@ -630,7 +393,7 @@ class AlarmModel extends BaseSiteModel
630
393
 
631
394
  if('updateTimestamp' in jsonObject)
632
395
  {
633
- model._updateTimestamp = (function(){
396
+ model.updateTimestamp = (function(){
634
397
  if(typeof jsonObject['updateTimestamp'] !== 'string')
635
398
  {
636
399
  return new Date(String(jsonObject['updateTimestamp']));