@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.
Files changed (137) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  3. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  4. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
  5. package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  6. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  7. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  8. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  9. package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  10. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  11. package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  12. package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  13. package/lib/Controllers/Packhouse/Site/PackingLineController.js +4 -4
  14. package/lib/Controllers/Packhouse/Site/PackrunController.js +4 -4
  15. package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  16. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
  17. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  18. package/lib/Controllers/Packhouse/Site/ShiftController.js +4 -4
  19. package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  20. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
  21. package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
  22. package/lib/Controllers/Site/AlarmController.js +4 -4
  23. package/lib/Controllers/Site/AlarmGroupController.js +4 -4
  24. package/lib/Controllers/Site/DefinitionController.js +4 -4
  25. package/lib/Controllers/Site/PermanentObjectController.js +4 -4
  26. package/lib/Controllers/Site/PermanentObjectDataController.js +4 -4
  27. package/lib/Controllers/Site/PointController.js +4 -4
  28. package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
  29. package/lib/Models/AccountPolicyModel.js +26 -130
  30. package/lib/Models/ApiAccountModel.js +26 -130
  31. package/lib/Models/CompanyModel.js +20 -98
  32. package/lib/Models/FirebaseTokenModel.js +29 -146
  33. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +40 -192
  34. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +37 -176
  35. package/lib/Models/Packhouse/Site/CompacSizerModel.js +55 -272
  36. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +43 -208
  37. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +37 -176
  38. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +31 -144
  39. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +49 -240
  40. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +55 -272
  41. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +37 -176
  42. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +31 -144
  43. package/lib/Models/Packhouse/Site/PackTypeModel.js +37 -176
  44. package/lib/Models/Packhouse/Site/PackingLineModel.js +58 -288
  45. package/lib/Models/Packhouse/Site/PackrunModel.js +58 -288
  46. package/lib/Models/Packhouse/Site/RejectBinModel.js +40 -192
  47. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +49 -240
  48. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +43 -208
  49. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +49 -240
  50. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +124 -640
  51. package/lib/Models/Packhouse/Site/ShiftModel.js +70 -352
  52. package/lib/Models/Packhouse/Site/VarietyModel.js +37 -176
  53. package/lib/Models/RTUModel.js +23 -114
  54. package/lib/Models/RTUPluginModel.js +20 -98
  55. package/lib/Models/Site/AlarmGroupModel.js +34 -160
  56. package/lib/Models/Site/AlarmModel.js +64 -320
  57. package/lib/Models/Site/DefinitionModel.js +31 -144
  58. package/lib/Models/Site/PermanentObjectDataModel.js +37 -176
  59. package/lib/Models/Site/PermanentObjectModel.js +34 -160
  60. package/lib/Models/Site/PointModel.js +46 -224
  61. package/lib/Models/Site/TemporaryObjectModel.js +31 -144
  62. package/lib/Models/Site/index.js +0 -3
  63. package/lib/Models/SiteModel.js +23 -114
  64. package/lib/Models/TokenModel.js +35 -178
  65. package/lib/Models/UserAccountActionTokenModel.js +38 -194
  66. package/lib/Models/UserAccountModel.js +35 -178
  67. package/lib/PackageVersion.js +1 -1
  68. package/lib/index.d.ts +834 -1589
  69. package/package.json +1 -1
  70. package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  71. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  72. package/src/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
  73. package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  74. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  75. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  76. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  77. package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  78. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  79. package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  80. package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  81. package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
  82. package/src/Controllers/Packhouse/Site/PackrunController.js +4 -4
  83. package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  84. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
  85. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  86. package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
  87. package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  88. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
  89. package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
  90. package/src/Controllers/Site/AlarmController.js +4 -4
  91. package/src/Controllers/Site/AlarmGroupController.js +4 -4
  92. package/src/Controllers/Site/DefinitionController.js +4 -4
  93. package/src/Controllers/Site/PermanentObjectController.js +4 -4
  94. package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
  95. package/src/Controllers/Site/PointController.js +4 -4
  96. package/src/Controllers/Site/TemporaryObjectController.js +4 -4
  97. package/src/Models/AccountPolicyModel.js +21 -117
  98. package/src/Models/ApiAccountModel.js +21 -117
  99. package/src/Models/CompanyModel.js +15 -87
  100. package/src/Models/FirebaseTokenModel.js +24 -132
  101. package/src/Models/Packhouse/Site/BinTipWeightModel.js +33 -174
  102. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +30 -159
  103. package/src/Models/Packhouse/Site/CompacSizerModel.js +48 -249
  104. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +36 -189
  105. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +30 -159
  106. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +24 -129
  107. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +42 -219
  108. package/src/Models/Packhouse/Site/DowntimeEventModel.js +48 -249
  109. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +30 -159
  110. package/src/Models/Packhouse/Site/GrowingMethodModel.js +24 -129
  111. package/src/Models/Packhouse/Site/PackTypeModel.js +30 -159
  112. package/src/Models/Packhouse/Site/PackingLineModel.js +51 -264
  113. package/src/Models/Packhouse/Site/PackrunModel.js +51 -264
  114. package/src/Models/Packhouse/Site/RejectBinModel.js +33 -174
  115. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +42 -219
  116. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +36 -189
  117. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +42 -219
  118. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +117 -594
  119. package/src/Models/Packhouse/Site/ShiftModel.js +63 -324
  120. package/src/Models/Packhouse/Site/VarietyModel.js +30 -159
  121. package/src/Models/RTUModel.js +18 -102
  122. package/src/Models/RTUPluginModel.js +15 -87
  123. package/src/Models/Site/AlarmGroupModel.js +27 -144
  124. package/src/Models/Site/AlarmModel.js +57 -294
  125. package/src/Models/Site/DefinitionModel.js +24 -129
  126. package/src/Models/Site/PermanentObjectDataModel.js +30 -159
  127. package/src/Models/Site/PermanentObjectModel.js +27 -144
  128. package/src/Models/Site/PointModel.js +39 -204
  129. package/src/Models/Site/TemporaryObjectModel.js +24 -129
  130. package/src/Models/Site/index.js +0 -2
  131. package/src/Models/SiteModel.js +18 -102
  132. package/src/Models/TokenModel.js +30 -162
  133. package/src/Models/UserAccountActionTokenModel.js +33 -177
  134. package/src/Models/UserAccountModel.js +30 -162
  135. package/src/PackageVersion.js +1 -1
  136. package/lib/Models/Site/BaseSiteModel.js +0 -58
  137. package/src/Models/Site/BaseSiteModel.js +0 -30
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _BaseSiteModel2 = _interopRequireDefault(require("../../../Models/Site/BaseSiteModel"));
8
+ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
@@ -36,10 +36,10 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
36
36
  *
37
37
  * @class
38
38
  * @hideconstructor
39
- * @extends BaseSiteModel
39
+ * @extends BaseModel
40
40
  */
41
- var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
42
- _inherits(ShiftModel, _BaseSiteModel);
41
+ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(ShiftModel, _BaseModel);
43
43
 
44
44
  var _super = _createSuper(ShiftModel);
45
45
 
@@ -47,9 +47,8 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
47
47
  * ShiftModel Constructor
48
48
  *
49
49
  * @protected
50
- * @param {number} siteId The Site ID associated with this Shift
51
50
  */
52
- function ShiftModel(siteId) {
51
+ function ShiftModel() {
53
52
  var _this;
54
53
 
55
54
  _classCallCheck(this, ShiftModel);
@@ -59,451 +58,170 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
59
58
  * The Shift ID
60
59
  *
61
60
  * @type {string}
62
- * @private
61
+ * @public
63
62
  */
64
63
 
65
- _this._id = undefined;
64
+ _this.id = undefined;
66
65
  /**
67
66
  * The Packing Line ID this Shift is associated with
68
67
  *
69
68
  * @type {string}
70
- * @private
69
+ * @public
71
70
  */
72
71
 
73
- _this._packingLineId = undefined;
72
+ _this.packingLineId = undefined;
74
73
  /**
75
74
  * When this Shift was Created
76
75
  *
77
76
  * @type {Date}
78
- * @private
77
+ * @public
79
78
  */
80
79
 
81
- _this._createdTimestamp = undefined;
80
+ _this.createdTimestamp = undefined;
82
81
  /**
83
82
  * The Type of Shift
84
83
  *
85
84
  * @type {string}
86
- * @private
85
+ * @public
87
86
  */
88
87
 
89
- _this._type = undefined;
88
+ _this.type = undefined;
90
89
  /**
91
90
  * The Name of the Line Manager for this Shift
92
91
  *
93
92
  * @type {?string}
94
- * @private
93
+ * @public
95
94
  */
96
95
 
97
- _this._lineManagerName = undefined;
96
+ _this.lineManagerName = undefined;
98
97
  /**
99
98
  * The Target Number of Bins to Tip for this Shift
100
99
  *
101
100
  * @type {?number}
102
- * @private
101
+ * @public
103
102
  */
104
103
 
105
- _this._binsTippedTarget = undefined;
104
+ _this.binsTippedTarget = undefined;
106
105
  /**
107
106
  * *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
108
107
  *
109
108
  * @type {?number}
110
- * @private
109
+ * @public
111
110
  */
112
111
 
113
- _this._initialClass1Manning = undefined;
112
+ _this.initialClass1Manning = undefined;
114
113
  /**
115
114
  * *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
116
115
  *
117
116
  * @type {?number}
118
- * @private
117
+ * @public
119
118
  */
120
119
 
121
- _this._initialClass2Manning = undefined;
120
+ _this.initialClass2Manning = undefined;
122
121
  /**
123
122
  * When this Shift was Ready for Packing
124
123
  *
125
124
  * @type {?Date}
126
- * @private
125
+ * @public
127
126
  */
128
127
 
129
- _this._readyTimestamp = undefined;
128
+ _this.readyTimestamp = undefined;
130
129
  /**
131
130
  * When this Shift was Started
132
131
  *
133
132
  * @type {?Date}
134
- * @private
133
+ * @public
135
134
  */
136
135
 
137
- _this._startTimestamp = undefined;
136
+ _this.startTimestamp = undefined;
138
137
  /**
139
138
  * When this Shift was Finished
140
139
  *
141
140
  * @type {?Date}
142
- * @private
141
+ * @public
143
142
  */
144
143
 
145
- _this._finishTimestamp = undefined;
144
+ _this.finishTimestamp = undefined;
146
145
  /**
147
146
  * When this Shift was Published
148
147
  *
149
148
  * @type {?Date}
150
- * @private
149
+ * @public
151
150
  */
152
151
 
153
- _this._publishTimestamp = undefined;
152
+ _this.publishTimestamp = undefined;
154
153
  /**
155
154
  * An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
156
155
  *
157
156
  * @type {?number}
158
- * @private
157
+ * @public
159
158
  */
160
159
 
161
- _this._satisfactionRating = undefined;
160
+ _this.satisfactionRating = undefined;
162
161
  /**
163
162
  * *DEPRECATED* An Optional Array of Handover Notes for this Shift
164
163
  *
165
164
  * @type {Array<{area: string, noteContent: string}>}
166
- * @private
165
+ * @public
167
166
  */
168
167
 
169
- _this._handoverNotes = undefined;
168
+ _this.handoverNotes = undefined;
170
169
  /**
171
170
  * An Optional Array of Notes for this Shift
172
171
  *
173
172
  * @type {Array<{area: string, timestamp: Date, content: string}>}
174
- * @private
173
+ * @public
175
174
  */
176
175
 
177
- _this._areaNotes = undefined;
176
+ _this.areaNotes = undefined;
178
177
  /**
179
178
  * The Schedule for this Shift
180
179
  *
181
180
  * @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
182
- * @private
181
+ * @public
183
182
  */
184
183
 
185
- _this._schedule = undefined;
184
+ _this.schedule = undefined;
186
185
  /**
187
186
  * The Status of this Shift
188
187
  *
189
188
  * @type {string}
190
- * @private
189
+ * @public
191
190
  */
192
191
 
193
- _this._status = undefined;
192
+ _this.status = undefined;
194
193
  /**
195
194
  * Whether the Shift has been deleted
196
195
  *
197
196
  * @type {boolean}
198
- * @private
197
+ * @public
199
198
  */
200
199
 
201
- _this._deleted = undefined;
200
+ _this.deleted = undefined;
202
201
  /**
203
202
  * When the Shift was last updated
204
203
  *
205
204
  * @type {Date}
206
- * @private
207
- */
208
-
209
- _this._updateTimestamp = undefined;
210
- /**
211
- * The Site ID associated with this Shift
212
- *
213
- * @type {number}
214
- * @private
205
+ * @public
215
206
  */
216
207
 
217
- _this._siteId = siteId;
208
+ _this.updateTimestamp = undefined;
218
209
  return _this;
219
210
  }
220
211
  /**
221
- * The Shift ID
212
+ * Create a new **ShiftModel** from a JSON Object or JSON String
222
213
  *
214
+ * @static
223
215
  * @public
224
- * @type {string}
216
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
217
+ * @return {ShiftModel}
225
218
  */
226
219
 
227
220
 
228
- _createClass(ShiftModel, [{
229
- key: "id",
230
- get: function get() {
231
- return this._id;
232
- }
233
- /**
234
- * The Packing Line ID this Shift is associated with
235
- *
236
- * @public
237
- * @type {string}
238
- */
239
-
240
- }, {
241
- key: "packingLineId",
242
- get: function get() {
243
- return this._packingLineId;
244
- }
245
- /**
246
- * When this Shift was Created
247
- *
248
- * @public
249
- * @type {Date}
250
- */
251
-
252
- }, {
253
- key: "createdTimestamp",
254
- get: function get() {
255
- return this._createdTimestamp;
256
- }
257
- /**
258
- * The Type of Shift
259
- *
260
- * @public
261
- * @type {string}
262
- */
263
-
264
- }, {
265
- key: "type",
266
- get: function get() {
267
- return this._type;
268
- }
269
- /**
270
- * The Name of the Line Manager for this Shift
271
- *
272
- * @public
273
- * @type {?string}
274
- */
275
-
276
- }, {
277
- key: "lineManagerName",
278
- get: function get() {
279
- return this._lineManagerName;
280
- }
281
- /**
282
- * The Target Number of Bins to Tip for this Shift
283
- *
284
- * @public
285
- * @type {?number}
286
- */
287
-
288
- }, {
289
- key: "binsTippedTarget",
290
- get: function get() {
291
- return this._binsTippedTarget;
292
- }
293
- /**
294
- * *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
295
- *
296
- * @public
297
- * @type {?number}
298
- */
299
-
300
- }, {
301
- key: "initialClass1Manning",
302
- get: function get() {
303
- return this._initialClass1Manning;
304
- }
305
- /**
306
- * *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
307
- *
308
- * @public
309
- * @type {?number}
310
- */
311
-
312
- }, {
313
- key: "initialClass2Manning",
314
- get: function get() {
315
- return this._initialClass2Manning;
316
- }
317
- /**
318
- * When this Shift was Ready for Packing
319
- *
320
- * @public
321
- * @type {?Date}
322
- */
323
-
324
- }, {
325
- key: "readyTimestamp",
326
- get: function get() {
327
- return this._readyTimestamp;
328
- }
329
- /**
330
- * When this Shift was Started
331
- *
332
- * @public
333
- * @type {?Date}
334
- */
335
-
336
- }, {
337
- key: "startTimestamp",
338
- get: function get() {
339
- return this._startTimestamp;
340
- }
341
- /**
342
- * When this Shift was Finished
343
- *
344
- * @public
345
- * @type {?Date}
346
- */
347
-
348
- }, {
349
- key: "finishTimestamp",
350
- get: function get() {
351
- return this._finishTimestamp;
352
- }
353
- /**
354
- * When this Shift was Published
355
- *
356
- * @public
357
- * @type {?Date}
358
- */
359
-
360
- }, {
361
- key: "publishTimestamp",
362
- get: function get() {
363
- return this._publishTimestamp;
364
- }
365
- /**
366
- * An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
367
- *
368
- * @public
369
- * @type {?number}
370
- */
371
-
372
- }, {
373
- key: "satisfactionRating",
374
- get: function get() {
375
- return this._satisfactionRating;
376
- }
377
- /**
378
- * *DEPRECATED* An Optional Array of Handover Notes for this Shift
379
- *
380
- * @public
381
- * @type {Array<{area: string, noteContent: string}>}
382
- */
383
-
384
- }, {
385
- key: "handoverNotes",
386
- get: function get() {
387
- return this._handoverNotes;
388
- }
389
- /**
390
- * An Optional Array of Notes for this Shift
391
- *
392
- * @public
393
- * @type {Array<{area: string, timestamp: Date, content: string}>}
394
- */
395
-
396
- }, {
397
- key: "areaNotes",
398
- get: function get() {
399
- return this._areaNotes;
400
- }
401
- /**
402
- * The Schedule for this Shift
403
- *
404
- * @public
405
- * @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
406
- */
407
-
408
- }, {
409
- key: "schedule",
410
- get: function get() {
411
- return this._schedule;
412
- }
413
- /**
414
- * The Status of this Shift
415
- *
416
- * @public
417
- * @type {string}
418
- */
419
-
420
- }, {
421
- key: "status",
422
- get: function get() {
423
- return this._status;
424
- }
425
- /**
426
- * Whether the Shift has been deleted
427
- *
428
- * @public
429
- * @type {boolean}
430
- */
431
-
432
- }, {
433
- key: "deleted",
434
- get: function get() {
435
- return this._deleted;
436
- }
437
- /**
438
- * When the Shift was last updated
439
- *
440
- * @public
441
- * @type {Date}
442
- */
443
-
444
- }, {
445
- key: "updateTimestamp",
446
- get: function get() {
447
- return this._updateTimestamp;
448
- }
449
- /**
450
- * The Site ID associated with this Shift
451
- *
452
- * @public
453
- * @type {number}
454
- */
455
-
456
- }, {
457
- key: "siteId",
458
- get: function get() {
459
- return this._siteId;
460
- }
461
- /**
462
- * Convert this **ShiftModel** to a JSON Object
463
- *
464
- * @public
465
- * @return {Object<string, any>}
466
- */
467
-
468
- }, {
469
- key: "toJSON",
470
- value: function toJSON() {
471
- return {
472
- id: this._id,
473
- packingLineId: this._packingLineId,
474
- createdTimestamp: this._createdTimestamp,
475
- type: this._type,
476
- lineManagerName: this._lineManagerName,
477
- binsTippedTarget: this._binsTippedTarget,
478
- initialClass1Manning: this._initialClass1Manning,
479
- initialClass2Manning: this._initialClass2Manning,
480
- readyTimestamp: this._readyTimestamp,
481
- startTimestamp: this._startTimestamp,
482
- finishTimestamp: this._finishTimestamp,
483
- publishTimestamp: this._publishTimestamp,
484
- satisfactionRating: this._satisfactionRating,
485
- handoverNotes: this._handoverNotes,
486
- areaNotes: this._areaNotes,
487
- schedule: this._schedule,
488
- status: this._status,
489
- deleted: this._deleted,
490
- updateTimestamp: this._updateTimestamp
491
- };
492
- }
493
- /**
494
- * Create a new **ShiftModel** from a JSON Object or JSON String
495
- *
496
- * @static
497
- * @public
498
- * @param {Object<string, any>|string} json A JSON Object or JSON String
499
- * @param {number} siteId The Site ID associated with this Shift
500
- * @return {ShiftModel}
501
- */
502
-
503
- }], [{
221
+ _createClass(ShiftModel, null, [{
504
222
  key: "fromJSON",
505
- value: function fromJSON(json, siteId) {
506
- var model = new ShiftModel(siteId);
223
+ value: function fromJSON(json) {
224
+ var model = new ShiftModel();
507
225
  /**
508
226
  * The JSON Object
509
227
  *
@@ -519,7 +237,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
519
237
  }
520
238
 
521
239
  if ('id' in jsonObject) {
522
- model._id = function () {
240
+ model.id = function () {
523
241
  if (typeof jsonObject['id'] !== 'string') {
524
242
  return String(jsonObject['id']);
525
243
  }
@@ -529,7 +247,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
529
247
  }
530
248
 
531
249
  if ('packingLineId' in jsonObject) {
532
- model._packingLineId = function () {
250
+ model.packingLineId = function () {
533
251
  if (typeof jsonObject['packingLineId'] !== 'string') {
534
252
  return String(jsonObject['packingLineId']);
535
253
  }
@@ -539,7 +257,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
539
257
  }
540
258
 
541
259
  if ('createdTimestamp' in jsonObject) {
542
- model._createdTimestamp = function () {
260
+ model.createdTimestamp = function () {
543
261
  if (typeof jsonObject['createdTimestamp'] !== 'string') {
544
262
  return new Date(String(jsonObject['createdTimestamp']));
545
263
  }
@@ -549,7 +267,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
549
267
  }
550
268
 
551
269
  if ('type' in jsonObject) {
552
- model._type = function () {
270
+ model.type = function () {
553
271
  if (typeof jsonObject['type'] !== 'string') {
554
272
  return String(jsonObject['type']);
555
273
  }
@@ -559,7 +277,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
559
277
  }
560
278
 
561
279
  if ('lineManagerName' in jsonObject) {
562
- model._lineManagerName = function () {
280
+ model.lineManagerName = function () {
563
281
  if (jsonObject['lineManagerName'] === null) {
564
282
  return null;
565
283
  }
@@ -573,7 +291,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
573
291
  }
574
292
 
575
293
  if ('binsTippedTarget' in jsonObject) {
576
- model._binsTippedTarget = function () {
294
+ model.binsTippedTarget = function () {
577
295
  if (jsonObject['binsTippedTarget'] === null) {
578
296
  return null;
579
297
  }
@@ -587,7 +305,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
587
305
  }
588
306
 
589
307
  if ('initialClass1Manning' in jsonObject) {
590
- model._initialClass1Manning = function () {
308
+ model.initialClass1Manning = function () {
591
309
  if (jsonObject['initialClass1Manning'] === null) {
592
310
  return null;
593
311
  }
@@ -601,7 +319,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
601
319
  }
602
320
 
603
321
  if ('initialClass2Manning' in jsonObject) {
604
- model._initialClass2Manning = function () {
322
+ model.initialClass2Manning = function () {
605
323
  if (jsonObject['initialClass2Manning'] === null) {
606
324
  return null;
607
325
  }
@@ -615,7 +333,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
615
333
  }
616
334
 
617
335
  if ('readyTimestamp' in jsonObject) {
618
- model._readyTimestamp = function () {
336
+ model.readyTimestamp = function () {
619
337
  if (jsonObject['readyTimestamp'] === null) {
620
338
  return null;
621
339
  }
@@ -629,7 +347,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
629
347
  }
630
348
 
631
349
  if ('startTimestamp' in jsonObject) {
632
- model._startTimestamp = function () {
350
+ model.startTimestamp = function () {
633
351
  if (jsonObject['startTimestamp'] === null) {
634
352
  return null;
635
353
  }
@@ -643,7 +361,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
643
361
  }
644
362
 
645
363
  if ('finishTimestamp' in jsonObject) {
646
- model._finishTimestamp = function () {
364
+ model.finishTimestamp = function () {
647
365
  if (jsonObject['finishTimestamp'] === null) {
648
366
  return null;
649
367
  }
@@ -657,7 +375,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
657
375
  }
658
376
 
659
377
  if ('publishTimestamp' in jsonObject) {
660
- model._publishTimestamp = function () {
378
+ model.publishTimestamp = function () {
661
379
  if (jsonObject['publishTimestamp'] === null) {
662
380
  return null;
663
381
  }
@@ -671,7 +389,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
671
389
  }
672
390
 
673
391
  if ('satisfactionRating' in jsonObject) {
674
- model._satisfactionRating = function () {
392
+ model.satisfactionRating = function () {
675
393
  if (jsonObject['satisfactionRating'] === null) {
676
394
  return null;
677
395
  }
@@ -685,7 +403,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
685
403
  }
686
404
 
687
405
  if ('handoverNotes' in jsonObject) {
688
- model._handoverNotes = function () {
406
+ model.handoverNotes = function () {
689
407
  if (Array.isArray(jsonObject['handoverNotes']) !== true) {
690
408
  return [];
691
409
  }
@@ -725,7 +443,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
725
443
  }
726
444
 
727
445
  if ('areaNotes' in jsonObject) {
728
- model._areaNotes = function () {
446
+ model.areaNotes = function () {
729
447
  if (Array.isArray(jsonObject['areaNotes']) !== true) {
730
448
  return [];
731
449
  }
@@ -777,7 +495,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
777
495
  }
778
496
 
779
497
  if ('schedule' in jsonObject) {
780
- model._schedule = function () {
498
+ model.schedule = function () {
781
499
  var scheduleObject = {};
782
500
 
783
501
  if (_typeof(jsonObject['schedule']) === 'object' && 'startTime' in jsonObject['schedule']) {
@@ -851,7 +569,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
851
569
  }
852
570
 
853
571
  if ('status' in jsonObject) {
854
- model._status = function () {
572
+ model.status = function () {
855
573
  if (typeof jsonObject['status'] !== 'string') {
856
574
  return String(jsonObject['status']);
857
575
  }
@@ -861,7 +579,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
861
579
  }
862
580
 
863
581
  if ('deleted' in jsonObject) {
864
- model._deleted = function () {
582
+ model.deleted = function () {
865
583
  if (typeof jsonObject['deleted'] !== 'boolean') {
866
584
  return Boolean(jsonObject['deleted']);
867
585
  }
@@ -871,7 +589,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
871
589
  }
872
590
 
873
591
  if ('updateTimestamp' in jsonObject) {
874
- model._updateTimestamp = function () {
592
+ model.updateTimestamp = function () {
875
593
  if (typeof jsonObject['updateTimestamp'] !== 'string') {
876
594
  return new Date(String(jsonObject['updateTimestamp']));
877
595
  }
@@ -885,7 +603,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
885
603
  }]);
886
604
 
887
605
  return ShiftModel;
888
- }(_BaseSiteModel2.default);
606
+ }(_BaseModel2.default);
889
607
 
890
608
  var _default = ShiftModel;
891
609
  exports.default = _default;