@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 Shift
11
11
  *
12
12
  * @class
13
13
  * @hideconstructor
14
- * @extends BaseSiteModel
14
+ * @extends BaseModel
15
15
  */
16
- class ShiftModel extends BaseSiteModel
16
+ class ShiftModel extends BaseModel
17
17
  {
18
18
  /**
19
19
  * ShiftModel Constructor
20
20
  *
21
21
  * @protected
22
- * @param {number} siteId The Site ID associated with this Shift
23
22
  */
24
- constructor(siteId)
23
+ constructor()
25
24
  {
26
25
  super();
27
26
 
@@ -29,412 +28,153 @@ class ShiftModel extends BaseSiteModel
29
28
  * The Shift 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 Packing Line ID this Shift is associated with
38
37
  *
39
38
  * @type {string}
40
- * @private
39
+ * @public
41
40
  */
42
- this._packingLineId = undefined;
41
+ this.packingLineId = undefined;
43
42
 
44
43
  /**
45
44
  * When this Shift was Created
46
45
  *
47
46
  * @type {Date}
48
- * @private
47
+ * @public
49
48
  */
50
- this._createdTimestamp = undefined;
49
+ this.createdTimestamp = undefined;
51
50
 
52
51
  /**
53
52
  * The Type of Shift
54
53
  *
55
54
  * @type {string}
56
- * @private
55
+ * @public
57
56
  */
58
- this._type = undefined;
57
+ this.type = undefined;
59
58
 
60
59
  /**
61
60
  * The Name of the Line Manager for this Shift
62
61
  *
63
62
  * @type {?string}
64
- * @private
63
+ * @public
65
64
  */
66
- this._lineManagerName = undefined;
65
+ this.lineManagerName = undefined;
67
66
 
68
67
  /**
69
68
  * The Target Number of Bins to Tip for this Shift
70
69
  *
71
70
  * @type {?number}
72
- * @private
71
+ * @public
73
72
  */
74
- this._binsTippedTarget = undefined;
73
+ this.binsTippedTarget = undefined;
75
74
 
76
75
  /**
77
76
  * *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
78
77
  *
79
78
  * @type {?number}
80
- * @private
79
+ * @public
81
80
  */
82
- this._initialClass1Manning = undefined;
81
+ this.initialClass1Manning = undefined;
83
82
 
84
83
  /**
85
84
  * *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
86
85
  *
87
86
  * @type {?number}
88
- * @private
87
+ * @public
89
88
  */
90
- this._initialClass2Manning = undefined;
89
+ this.initialClass2Manning = undefined;
91
90
 
92
91
  /**
93
92
  * When this Shift was Ready for Packing
94
93
  *
95
94
  * @type {?Date}
96
- * @private
95
+ * @public
97
96
  */
98
- this._readyTimestamp = undefined;
97
+ this.readyTimestamp = undefined;
99
98
 
100
99
  /**
101
100
  * When this Shift was Started
102
101
  *
103
102
  * @type {?Date}
104
- * @private
103
+ * @public
105
104
  */
106
- this._startTimestamp = undefined;
105
+ this.startTimestamp = undefined;
107
106
 
108
107
  /**
109
108
  * When this Shift was Finished
110
109
  *
111
110
  * @type {?Date}
112
- * @private
111
+ * @public
113
112
  */
114
- this._finishTimestamp = undefined;
113
+ this.finishTimestamp = undefined;
115
114
 
116
115
  /**
117
116
  * When this Shift was Published
118
117
  *
119
118
  * @type {?Date}
120
- * @private
119
+ * @public
121
120
  */
122
- this._publishTimestamp = undefined;
121
+ this.publishTimestamp = undefined;
123
122
 
124
123
  /**
125
124
  * An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
126
125
  *
127
126
  * @type {?number}
128
- * @private
127
+ * @public
129
128
  */
130
- this._satisfactionRating = undefined;
129
+ this.satisfactionRating = undefined;
131
130
 
132
131
  /**
133
132
  * *DEPRECATED* An Optional Array of Handover Notes for this Shift
134
133
  *
135
134
  * @type {Array<{area: string, noteContent: string}>}
136
- * @private
135
+ * @public
137
136
  */
138
- this._handoverNotes = undefined;
137
+ this.handoverNotes = undefined;
139
138
 
140
139
  /**
141
140
  * An Optional Array of Notes for this Shift
142
141
  *
143
142
  * @type {Array<{area: string, timestamp: Date, content: string}>}
144
- * @private
143
+ * @public
145
144
  */
146
- this._areaNotes = undefined;
145
+ this.areaNotes = undefined;
147
146
 
148
147
  /**
149
148
  * The Schedule for this Shift
150
149
  *
151
150
  * @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
152
- * @private
151
+ * @public
153
152
  */
154
- this._schedule = undefined;
153
+ this.schedule = undefined;
155
154
 
156
155
  /**
157
156
  * The Status of this Shift
158
157
  *
159
158
  * @type {string}
160
- * @private
159
+ * @public
161
160
  */
162
- this._status = undefined;
161
+ this.status = undefined;
163
162
 
164
163
  /**
165
164
  * Whether the Shift has been deleted
166
165
  *
167
166
  * @type {boolean}
168
- * @private
167
+ * @public
169
168
  */
170
- this._deleted = undefined;
169
+ this.deleted = undefined;
171
170
 
172
171
  /**
173
172
  * When the Shift was last updated
174
173
  *
175
174
  * @type {Date}
176
- * @private
175
+ * @public
177
176
  */
178
- this._updateTimestamp = undefined;
179
-
180
- /**
181
- * The Site ID associated with this Shift
182
- *
183
- * @type {number}
184
- * @private
185
- */
186
- this._siteId = siteId;
187
- }
188
-
189
- /**
190
- * The Shift ID
191
- *
192
- * @public
193
- * @type {string}
194
- */
195
- get id()
196
- {
197
- return this._id;
198
- }
199
-
200
- /**
201
- * The Packing Line ID this Shift is associated with
202
- *
203
- * @public
204
- * @type {string}
205
- */
206
- get packingLineId()
207
- {
208
- return this._packingLineId;
209
- }
210
-
211
- /**
212
- * When this Shift was Created
213
- *
214
- * @public
215
- * @type {Date}
216
- */
217
- get createdTimestamp()
218
- {
219
- return this._createdTimestamp;
220
- }
221
-
222
- /**
223
- * The Type of Shift
224
- *
225
- * @public
226
- * @type {string}
227
- */
228
- get type()
229
- {
230
- return this._type;
231
- }
232
-
233
- /**
234
- * The Name of the Line Manager for this Shift
235
- *
236
- * @public
237
- * @type {?string}
238
- */
239
- get lineManagerName()
240
- {
241
- return this._lineManagerName;
242
- }
243
-
244
- /**
245
- * The Target Number of Bins to Tip for this Shift
246
- *
247
- * @public
248
- * @type {?number}
249
- */
250
- get binsTippedTarget()
251
- {
252
- return this._binsTippedTarget;
253
- }
254
-
255
- /**
256
- * *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
257
- *
258
- * @public
259
- * @type {?number}
260
- */
261
- get initialClass1Manning()
262
- {
263
- return this._initialClass1Manning;
264
- }
265
-
266
- /**
267
- * *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
268
- *
269
- * @public
270
- * @type {?number}
271
- */
272
- get initialClass2Manning()
273
- {
274
- return this._initialClass2Manning;
275
- }
276
-
277
- /**
278
- * When this Shift was Ready for Packing
279
- *
280
- * @public
281
- * @type {?Date}
282
- */
283
- get readyTimestamp()
284
- {
285
- return this._readyTimestamp;
286
- }
287
-
288
- /**
289
- * When this Shift was Started
290
- *
291
- * @public
292
- * @type {?Date}
293
- */
294
- get startTimestamp()
295
- {
296
- return this._startTimestamp;
297
- }
298
-
299
- /**
300
- * When this Shift was Finished
301
- *
302
- * @public
303
- * @type {?Date}
304
- */
305
- get finishTimestamp()
306
- {
307
- return this._finishTimestamp;
308
- }
309
-
310
- /**
311
- * When this Shift was Published
312
- *
313
- * @public
314
- * @type {?Date}
315
- */
316
- get publishTimestamp()
317
- {
318
- return this._publishTimestamp;
319
- }
320
-
321
- /**
322
- * An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
323
- *
324
- * @public
325
- * @type {?number}
326
- */
327
- get satisfactionRating()
328
- {
329
- return this._satisfactionRating;
330
- }
331
-
332
- /**
333
- * *DEPRECATED* An Optional Array of Handover Notes for this Shift
334
- *
335
- * @public
336
- * @type {Array<{area: string, noteContent: string}>}
337
- */
338
- get handoverNotes()
339
- {
340
- return this._handoverNotes;
341
- }
342
-
343
- /**
344
- * An Optional Array of Notes for this Shift
345
- *
346
- * @public
347
- * @type {Array<{area: string, timestamp: Date, content: string}>}
348
- */
349
- get areaNotes()
350
- {
351
- return this._areaNotes;
352
- }
353
-
354
- /**
355
- * The Schedule for this Shift
356
- *
357
- * @public
358
- * @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
359
- */
360
- get schedule()
361
- {
362
- return this._schedule;
363
- }
364
-
365
- /**
366
- * The Status of this Shift
367
- *
368
- * @public
369
- * @type {string}
370
- */
371
- get status()
372
- {
373
- return this._status;
374
- }
375
-
376
- /**
377
- * Whether the Shift has been deleted
378
- *
379
- * @public
380
- * @type {boolean}
381
- */
382
- get deleted()
383
- {
384
- return this._deleted;
385
- }
386
-
387
- /**
388
- * When the Shift was last updated
389
- *
390
- * @public
391
- * @type {Date}
392
- */
393
- get updateTimestamp()
394
- {
395
- return this._updateTimestamp;
396
- }
397
-
398
- /**
399
- * The Site ID associated with this Shift
400
- *
401
- * @public
402
- * @type {number}
403
- */
404
- get siteId()
405
- {
406
- return this._siteId;
407
- }
408
-
409
- /**
410
- * Convert this **ShiftModel** to a JSON Object
411
- *
412
- * @public
413
- * @return {Object<string, any>}
414
- */
415
- toJSON()
416
- {
417
- return {
418
- id: this._id,
419
- packingLineId: this._packingLineId,
420
- createdTimestamp: this._createdTimestamp,
421
- type: this._type,
422
- lineManagerName: this._lineManagerName,
423
- binsTippedTarget: this._binsTippedTarget,
424
- initialClass1Manning: this._initialClass1Manning,
425
- initialClass2Manning: this._initialClass2Manning,
426
- readyTimestamp: this._readyTimestamp,
427
- startTimestamp: this._startTimestamp,
428
- finishTimestamp: this._finishTimestamp,
429
- publishTimestamp: this._publishTimestamp,
430
- satisfactionRating: this._satisfactionRating,
431
- handoverNotes: this._handoverNotes,
432
- areaNotes: this._areaNotes,
433
- schedule: this._schedule,
434
- status: this._status,
435
- deleted: this._deleted,
436
- updateTimestamp: this._updateTimestamp
437
- };
177
+ this.updateTimestamp = undefined;
438
178
  }
439
179
 
440
180
  /**
@@ -443,12 +183,11 @@ class ShiftModel extends BaseSiteModel
443
183
  * @static
444
184
  * @public
445
185
  * @param {Object<string, any>|string} json A JSON Object or JSON String
446
- * @param {number} siteId The Site ID associated with this Shift
447
186
  * @return {ShiftModel}
448
187
  */
449
- static fromJSON(json, siteId)
188
+ static fromJSON(json)
450
189
  {
451
- let model = new ShiftModel(siteId);
190
+ let model = new ShiftModel();
452
191
 
453
192
  /**
454
193
  * The JSON Object
@@ -468,7 +207,7 @@ class ShiftModel extends BaseSiteModel
468
207
 
469
208
  if('id' in jsonObject)
470
209
  {
471
- model._id = (function(){
210
+ model.id = (function(){
472
211
  if(typeof jsonObject['id'] !== 'string')
473
212
  {
474
213
  return String(jsonObject['id']);
@@ -480,7 +219,7 @@ class ShiftModel extends BaseSiteModel
480
219
 
481
220
  if('packingLineId' in jsonObject)
482
221
  {
483
- model._packingLineId = (function(){
222
+ model.packingLineId = (function(){
484
223
  if(typeof jsonObject['packingLineId'] !== 'string')
485
224
  {
486
225
  return String(jsonObject['packingLineId']);
@@ -492,7 +231,7 @@ class ShiftModel extends BaseSiteModel
492
231
 
493
232
  if('createdTimestamp' in jsonObject)
494
233
  {
495
- model._createdTimestamp = (function(){
234
+ model.createdTimestamp = (function(){
496
235
  if(typeof jsonObject['createdTimestamp'] !== 'string')
497
236
  {
498
237
  return new Date(String(jsonObject['createdTimestamp']));
@@ -504,7 +243,7 @@ class ShiftModel extends BaseSiteModel
504
243
 
505
244
  if('type' in jsonObject)
506
245
  {
507
- model._type = (function(){
246
+ model.type = (function(){
508
247
  if(typeof jsonObject['type'] !== 'string')
509
248
  {
510
249
  return String(jsonObject['type']);
@@ -516,7 +255,7 @@ class ShiftModel extends BaseSiteModel
516
255
 
517
256
  if('lineManagerName' in jsonObject)
518
257
  {
519
- model._lineManagerName = (function(){
258
+ model.lineManagerName = (function(){
520
259
  if(jsonObject['lineManagerName'] === null)
521
260
  {
522
261
  return null;
@@ -533,7 +272,7 @@ class ShiftModel extends BaseSiteModel
533
272
 
534
273
  if('binsTippedTarget' in jsonObject)
535
274
  {
536
- model._binsTippedTarget = (function(){
275
+ model.binsTippedTarget = (function(){
537
276
  if(jsonObject['binsTippedTarget'] === null)
538
277
  {
539
278
  return null;
@@ -550,7 +289,7 @@ class ShiftModel extends BaseSiteModel
550
289
 
551
290
  if('initialClass1Manning' in jsonObject)
552
291
  {
553
- model._initialClass1Manning = (function(){
292
+ model.initialClass1Manning = (function(){
554
293
  if(jsonObject['initialClass1Manning'] === null)
555
294
  {
556
295
  return null;
@@ -567,7 +306,7 @@ class ShiftModel extends BaseSiteModel
567
306
 
568
307
  if('initialClass2Manning' in jsonObject)
569
308
  {
570
- model._initialClass2Manning = (function(){
309
+ model.initialClass2Manning = (function(){
571
310
  if(jsonObject['initialClass2Manning'] === null)
572
311
  {
573
312
  return null;
@@ -584,7 +323,7 @@ class ShiftModel extends BaseSiteModel
584
323
 
585
324
  if('readyTimestamp' in jsonObject)
586
325
  {
587
- model._readyTimestamp = (function(){
326
+ model.readyTimestamp = (function(){
588
327
  if(jsonObject['readyTimestamp'] === null)
589
328
  {
590
329
  return null;
@@ -601,7 +340,7 @@ class ShiftModel extends BaseSiteModel
601
340
 
602
341
  if('startTimestamp' in jsonObject)
603
342
  {
604
- model._startTimestamp = (function(){
343
+ model.startTimestamp = (function(){
605
344
  if(jsonObject['startTimestamp'] === null)
606
345
  {
607
346
  return null;
@@ -618,7 +357,7 @@ class ShiftModel extends BaseSiteModel
618
357
 
619
358
  if('finishTimestamp' in jsonObject)
620
359
  {
621
- model._finishTimestamp = (function(){
360
+ model.finishTimestamp = (function(){
622
361
  if(jsonObject['finishTimestamp'] === null)
623
362
  {
624
363
  return null;
@@ -635,7 +374,7 @@ class ShiftModel extends BaseSiteModel
635
374
 
636
375
  if('publishTimestamp' in jsonObject)
637
376
  {
638
- model._publishTimestamp = (function(){
377
+ model.publishTimestamp = (function(){
639
378
  if(jsonObject['publishTimestamp'] === null)
640
379
  {
641
380
  return null;
@@ -652,7 +391,7 @@ class ShiftModel extends BaseSiteModel
652
391
 
653
392
  if('satisfactionRating' in jsonObject)
654
393
  {
655
- model._satisfactionRating = (function(){
394
+ model.satisfactionRating = (function(){
656
395
  if(jsonObject['satisfactionRating'] === null)
657
396
  {
658
397
  return null;
@@ -669,7 +408,7 @@ class ShiftModel extends BaseSiteModel
669
408
 
670
409
  if('handoverNotes' in jsonObject)
671
410
  {
672
- model._handoverNotes = (function(){
411
+ model.handoverNotes = (function(){
673
412
  if(Array.isArray(jsonObject['handoverNotes']) !== true)
674
413
  {
675
414
  return [];
@@ -719,7 +458,7 @@ class ShiftModel extends BaseSiteModel
719
458
 
720
459
  if('areaNotes' in jsonObject)
721
460
  {
722
- model._areaNotes = (function(){
461
+ model.areaNotes = (function(){
723
462
  if(Array.isArray(jsonObject['areaNotes']) !== true)
724
463
  {
725
464
  return [];
@@ -785,7 +524,7 @@ class ShiftModel extends BaseSiteModel
785
524
 
786
525
  if('schedule' in jsonObject)
787
526
  {
788
- model._schedule = (function(){
527
+ model.schedule = (function(){
789
528
  let scheduleObject = {};
790
529
 
791
530
  if(typeof jsonObject['schedule'] === 'object' && 'startTime' in jsonObject['schedule'])
@@ -880,7 +619,7 @@ class ShiftModel extends BaseSiteModel
880
619
 
881
620
  if('status' in jsonObject)
882
621
  {
883
- model._status = (function(){
622
+ model.status = (function(){
884
623
  if(typeof jsonObject['status'] !== 'string')
885
624
  {
886
625
  return String(jsonObject['status']);
@@ -892,7 +631,7 @@ class ShiftModel extends BaseSiteModel
892
631
 
893
632
  if('deleted' in jsonObject)
894
633
  {
895
- model._deleted = (function(){
634
+ model.deleted = (function(){
896
635
  if(typeof jsonObject['deleted'] !== 'boolean')
897
636
  {
898
637
  return Boolean(jsonObject['deleted']);
@@ -904,7 +643,7 @@ class ShiftModel extends BaseSiteModel
904
643
 
905
644
  if('updateTimestamp' in jsonObject)
906
645
  {
907
- model._updateTimestamp = (function(){
646
+ model.updateTimestamp = (function(){
908
647
  if(typeof jsonObject['updateTimestamp'] !== 'string')
909
648
  {
910
649
  return new Date(String(jsonObject['updateTimestamp']));