@ricado/api-client 2.1.1 → 2.3.1

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 (118) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/BinTipBinController.js +622 -0
  3. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +3 -3
  4. package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +657 -0
  5. package/lib/Controllers/Packhouse/Site/PackingLineController.js +29 -1
  6. package/lib/Controllers/Packhouse/Site/PackrunController.js +42 -0
  7. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
  8. package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +661 -0
  9. package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +628 -0
  10. package/lib/Controllers/Packhouse/Site/index.js +12 -0
  11. package/lib/DataItems/PointValueItem.js +3 -3
  12. package/lib/Models/AccountPolicyModel.js +7 -7
  13. package/lib/Models/ApiAccountModel.js +7 -7
  14. package/lib/Models/CompanyModel.js +5 -5
  15. package/lib/Models/FirebaseTokenModel.js +8 -8
  16. package/lib/Models/Packhouse/Site/BinTipBinModel.js +367 -0
  17. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
  18. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
  19. package/lib/Models/Packhouse/Site/CompacSizerModel.js +15 -15
  20. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
  21. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
  22. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
  23. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
  24. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
  25. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
  26. package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +481 -0
  27. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
  28. package/lib/Models/Packhouse/Site/PackTypeModel.js +8 -8
  29. package/lib/Models/Packhouse/Site/PackingLineModel.js +583 -16
  30. package/lib/Models/Packhouse/Site/PackrunModel.js +81 -15
  31. package/lib/Models/Packhouse/Site/RejectBinModel.js +9 -9
  32. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
  33. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
  34. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
  35. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +204 -38
  36. package/lib/Models/Packhouse/Site/ShiftModel.js +26 -19
  37. package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +599 -0
  38. package/lib/Models/Packhouse/Site/ShiftTaskModel.js +373 -0
  39. package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
  40. package/lib/Models/Packhouse/Site/VarietyModel.js +8 -8
  41. package/lib/Models/Packhouse/Site/index.js +12 -0
  42. package/lib/Models/RTUModel.js +6 -6
  43. package/lib/Models/RTUPluginModel.js +5 -5
  44. package/lib/Models/Site/AlarmGroupModel.js +7 -7
  45. package/lib/Models/Site/AlarmModel.js +17 -17
  46. package/lib/Models/Site/DefinitionModel.js +6 -6
  47. package/lib/Models/Site/PermanentObjectDataModel.js +8 -8
  48. package/lib/Models/Site/PermanentObjectModel.js +7 -7
  49. package/lib/Models/Site/PointModel.js +11 -11
  50. package/lib/Models/Site/TemporaryObjectModel.js +6 -6
  51. package/lib/Models/SiteModel.js +6 -6
  52. package/lib/Models/TokenModel.js +10 -10
  53. package/lib/Models/UserAccountActionTokenModel.js +11 -11
  54. package/lib/Models/UserAccountModel.js +10 -10
  55. package/lib/PackageVersion.js +1 -1
  56. package/lib/Points.js +22 -12
  57. package/lib/WebSocketHelper.js +29 -13
  58. package/lib/index.d.ts +2473 -348
  59. package/lib/index.js +3 -3
  60. package/package.json +1 -1
  61. package/src/Controllers/Packhouse/Site/BinTipBinController.js +665 -0
  62. package/src/Controllers/Packhouse/Site/CompacSizerController.js +3 -3
  63. package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +700 -0
  64. package/src/Controllers/Packhouse/Site/PackingLineController.js +29 -1
  65. package/src/Controllers/Packhouse/Site/PackrunController.js +52 -0
  66. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
  67. package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +704 -0
  68. package/src/Controllers/Packhouse/Site/ShiftTaskController.js +671 -0
  69. package/src/Controllers/Packhouse/Site/index.js +8 -0
  70. package/src/DataItems/PointValueItem.js +3 -3
  71. package/src/Models/AccountPolicyModel.js +7 -7
  72. package/src/Models/ApiAccountModel.js +7 -7
  73. package/src/Models/CompanyModel.js +5 -5
  74. package/src/Models/FirebaseTokenModel.js +8 -8
  75. package/src/Models/Packhouse/Site/BinTipBinModel.js +365 -0
  76. package/src/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
  77. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
  78. package/src/Models/Packhouse/Site/CompacSizerModel.js +15 -15
  79. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
  80. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
  81. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
  82. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
  83. package/src/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
  84. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
  85. package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +523 -0
  86. package/src/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
  87. package/src/Models/Packhouse/Site/PackTypeModel.js +8 -8
  88. package/src/Models/Packhouse/Site/PackingLineModel.js +770 -16
  89. package/src/Models/Packhouse/Site/PackrunModel.js +90 -15
  90. package/src/Models/Packhouse/Site/RejectBinModel.js +9 -9
  91. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
  92. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
  93. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
  94. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +229 -38
  95. package/src/Models/Packhouse/Site/ShiftModel.js +29 -19
  96. package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +664 -0
  97. package/src/Models/Packhouse/Site/ShiftTaskModel.js +369 -0
  98. package/src/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
  99. package/src/Models/Packhouse/Site/VarietyModel.js +8 -8
  100. package/src/Models/Packhouse/Site/index.js +8 -0
  101. package/src/Models/RTUModel.js +6 -6
  102. package/src/Models/RTUPluginModel.js +5 -5
  103. package/src/Models/Site/AlarmGroupModel.js +7 -7
  104. package/src/Models/Site/AlarmModel.js +17 -17
  105. package/src/Models/Site/DefinitionModel.js +6 -6
  106. package/src/Models/Site/PermanentObjectDataModel.js +8 -8
  107. package/src/Models/Site/PermanentObjectModel.js +7 -7
  108. package/src/Models/Site/PointModel.js +11 -11
  109. package/src/Models/Site/TemporaryObjectModel.js +6 -6
  110. package/src/Models/SiteModel.js +6 -6
  111. package/src/Models/TokenModel.js +10 -10
  112. package/src/Models/UserAccountActionTokenModel.js +11 -11
  113. package/src/Models/UserAccountModel.js +10 -10
  114. package/src/PackageVersion.js +1 -1
  115. package/src/Points.js +24 -12
  116. package/src/WebSocketHelper.js +34 -13
  117. package/src/index.js +3 -3
  118. package/types/tslint.json +2 -1
@@ -0,0 +1,369 @@
1
+ /**
2
+ * File Auto-Generated by the RICADO Gen 4 PHP API Project
3
+ *
4
+ * Do Not Edit this File Manually!
5
+ */
6
+
7
+ import BaseModel from '../../../Models/BaseModel';
8
+
9
+ /**
10
+ * Model Class for a Shift Task
11
+ *
12
+ * @class
13
+ * @hideconstructor
14
+ * @extends BaseModel
15
+ */
16
+ class ShiftTaskModel extends BaseModel
17
+ {
18
+ /**
19
+ * ShiftTaskModel Constructor
20
+ *
21
+ * @protected
22
+ * @param {number} siteId The Site ID associated with this Shift Task
23
+ */
24
+ constructor(siteId)
25
+ {
26
+ super();
27
+
28
+ /**
29
+ * The Shift Task ID
30
+ *
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ this.id = "";
35
+
36
+ /**
37
+ * The Packing Line ID this Task is associated with
38
+ *
39
+ * @type {string}
40
+ * @public
41
+ */
42
+ this.packingLineId = "";
43
+
44
+ /**
45
+ * The Shift ID this Task is asssociated with
46
+ *
47
+ * @type {string}
48
+ * @public
49
+ */
50
+ this.shiftId = "";
51
+
52
+ /**
53
+ * When this Task was Created
54
+ *
55
+ * @type {Date}
56
+ * @public
57
+ */
58
+ this.createdTimestamp = new Date();
59
+
60
+ /**
61
+ * When this Task was Completed
62
+ *
63
+ * @type {?Date}
64
+ * @public
65
+ */
66
+ this.completedTimestamp = null;
67
+
68
+ /**
69
+ * The User ID of the Author for this Task
70
+ *
71
+ * @type {?string}
72
+ * @public
73
+ */
74
+ this.authorUserId = null;
75
+
76
+ /**
77
+ * The Name of the Author for this Task
78
+ *
79
+ * @type {string}
80
+ * @public
81
+ */
82
+ this.authorName = "";
83
+
84
+ /**
85
+ * The Task Type
86
+ *
87
+ * @type {string}
88
+ * @public
89
+ */
90
+ this.type = "";
91
+
92
+ /**
93
+ * An Array of Tag IDs for this Task
94
+ *
95
+ * @type {string[]}
96
+ * @public
97
+ */
98
+ this.tags = [];
99
+
100
+ /**
101
+ * The Title of this Task
102
+ *
103
+ * @type {string}
104
+ * @public
105
+ */
106
+ this.title = "";
107
+
108
+ /**
109
+ * The Content of this Task
110
+ *
111
+ * @type {string}
112
+ * @public
113
+ */
114
+ this.content = "";
115
+
116
+ /**
117
+ * The Status of this Task
118
+ *
119
+ * @type {string}
120
+ * @public
121
+ */
122
+ this.status = "";
123
+
124
+ /**
125
+ * Whether the Shift Task has been deleted
126
+ *
127
+ * @type {boolean}
128
+ * @public
129
+ */
130
+ this.deleted = false;
131
+
132
+ /**
133
+ * When the Shift Task was last updated
134
+ *
135
+ * @type {Date}
136
+ * @public
137
+ */
138
+ this.updateTimestamp = new Date();
139
+
140
+ /**
141
+ * The Site ID associated with this Shift Task
142
+ *
143
+ * @type {number}
144
+ * @public
145
+ */
146
+ this.siteId = siteId;
147
+ }
148
+
149
+ /**
150
+ * Create a new **ShiftTaskModel** from a JSON Object or JSON String
151
+ *
152
+ * @static
153
+ * @public
154
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
155
+ * @param {number} siteId The Site ID associated with this Shift Task
156
+ * @return {ShiftTaskModel}
157
+ */
158
+ static fromJSON(json, siteId)
159
+ {
160
+ let model = new ShiftTaskModel(siteId);
161
+
162
+ /**
163
+ * The JSON Object
164
+ *
165
+ * @type {Object<string, any>}
166
+ */
167
+ let jsonObject = {};
168
+
169
+ if(typeof json === 'string')
170
+ {
171
+ jsonObject = JSON.parse(json);
172
+ }
173
+ else if(typeof json === 'object')
174
+ {
175
+ jsonObject = json;
176
+ }
177
+
178
+ if('id' in jsonObject)
179
+ {
180
+ model.id = (function(){
181
+ if(typeof jsonObject['id'] !== 'string')
182
+ {
183
+ return String(jsonObject['id']);
184
+ }
185
+
186
+ return jsonObject['id'];
187
+ }());
188
+ }
189
+
190
+ if('packingLineId' in jsonObject)
191
+ {
192
+ model.packingLineId = (function(){
193
+ if(typeof jsonObject['packingLineId'] !== 'string')
194
+ {
195
+ return String(jsonObject['packingLineId']);
196
+ }
197
+
198
+ return jsonObject['packingLineId'];
199
+ }());
200
+ }
201
+
202
+ if('shiftId' in jsonObject)
203
+ {
204
+ model.shiftId = (function(){
205
+ if(typeof jsonObject['shiftId'] !== 'string')
206
+ {
207
+ return String(jsonObject['shiftId']);
208
+ }
209
+
210
+ return jsonObject['shiftId'];
211
+ }());
212
+ }
213
+
214
+ if('createdTimestamp' in jsonObject)
215
+ {
216
+ model.createdTimestamp = (function(){
217
+ if(typeof jsonObject['createdTimestamp'] !== 'string')
218
+ {
219
+ return new Date(String(jsonObject['createdTimestamp']));
220
+ }
221
+
222
+ return new Date(jsonObject['createdTimestamp']);
223
+ }());
224
+ }
225
+
226
+ if('completedTimestamp' in jsonObject)
227
+ {
228
+ model.completedTimestamp = (function(){
229
+ if(jsonObject['completedTimestamp'] === null)
230
+ {
231
+ return null;
232
+ }
233
+
234
+ if(typeof jsonObject['completedTimestamp'] !== 'string')
235
+ {
236
+ return new Date(String(jsonObject['completedTimestamp']));
237
+ }
238
+
239
+ return new Date(jsonObject['completedTimestamp']);
240
+ }());
241
+ }
242
+
243
+ if('authorUserId' in jsonObject)
244
+ {
245
+ model.authorUserId = (function(){
246
+ if(jsonObject['authorUserId'] === null)
247
+ {
248
+ return null;
249
+ }
250
+
251
+ if(typeof jsonObject['authorUserId'] !== 'string')
252
+ {
253
+ return String(jsonObject['authorUserId']);
254
+ }
255
+
256
+ return jsonObject['authorUserId'];
257
+ }());
258
+ }
259
+
260
+ if('authorName' in jsonObject)
261
+ {
262
+ model.authorName = (function(){
263
+ if(typeof jsonObject['authorName'] !== 'string')
264
+ {
265
+ return String(jsonObject['authorName']);
266
+ }
267
+
268
+ return jsonObject['authorName'];
269
+ }());
270
+ }
271
+
272
+ if('type' in jsonObject)
273
+ {
274
+ model.type = (function(){
275
+ if(typeof jsonObject['type'] !== 'string')
276
+ {
277
+ return String(jsonObject['type']);
278
+ }
279
+
280
+ return jsonObject['type'];
281
+ }());
282
+ }
283
+
284
+ if('tags' in jsonObject)
285
+ {
286
+ model.tags = (function(){
287
+ if(Array.isArray(jsonObject['tags']) !== true)
288
+ {
289
+ return [];
290
+ }
291
+
292
+ return jsonObject['tags'].map((tagsItem) => {
293
+ return (function(){
294
+ if(typeof tagsItem !== 'string')
295
+ {
296
+ return String(tagsItem);
297
+ }
298
+
299
+ return tagsItem;
300
+ }());
301
+ });
302
+ }());
303
+ }
304
+
305
+ if('title' in jsonObject)
306
+ {
307
+ model.title = (function(){
308
+ if(typeof jsonObject['title'] !== 'string')
309
+ {
310
+ return String(jsonObject['title']);
311
+ }
312
+
313
+ return jsonObject['title'];
314
+ }());
315
+ }
316
+
317
+ if('content' in jsonObject)
318
+ {
319
+ model.content = (function(){
320
+ if(typeof jsonObject['content'] !== 'string')
321
+ {
322
+ return String(jsonObject['content']);
323
+ }
324
+
325
+ return jsonObject['content'];
326
+ }());
327
+ }
328
+
329
+ if('status' in jsonObject)
330
+ {
331
+ model.status = (function(){
332
+ if(typeof jsonObject['status'] !== 'string')
333
+ {
334
+ return String(jsonObject['status']);
335
+ }
336
+
337
+ return jsonObject['status'];
338
+ }());
339
+ }
340
+
341
+ if('deleted' in jsonObject)
342
+ {
343
+ model.deleted = (function(){
344
+ if(typeof jsonObject['deleted'] !== 'boolean')
345
+ {
346
+ return Boolean(jsonObject['deleted']);
347
+ }
348
+
349
+ return jsonObject['deleted'];
350
+ }());
351
+ }
352
+
353
+ if('updateTimestamp' in jsonObject)
354
+ {
355
+ model.updateTimestamp = (function(){
356
+ if(typeof jsonObject['updateTimestamp'] !== 'string')
357
+ {
358
+ return new Date(String(jsonObject['updateTimestamp']));
359
+ }
360
+
361
+ return new Date(jsonObject['updateTimestamp']);
362
+ }());
363
+ }
364
+
365
+ return model;
366
+ }
367
+ }
368
+
369
+ export default ShiftTaskModel;
@@ -31,7 +31,7 @@ class SoftSortBeltModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The RTU this Soft Sort Belt belongs to
@@ -39,7 +39,7 @@ class SoftSortBeltModel extends BaseModel
39
39
  * @type {?number}
40
40
  * @public
41
41
  */
42
- this.rtuId = undefined;
42
+ this.rtuId = null;
43
43
 
44
44
  /**
45
45
  * The Name of this Soft Sort Belt
@@ -47,7 +47,7 @@ class SoftSortBeltModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.name = undefined;
50
+ this.name = "";
51
51
 
52
52
  /**
53
53
  * The Points used by this Soft Sort Belt
@@ -55,7 +55,7 @@ class SoftSortBeltModel extends BaseModel
55
55
  * @type {Object}
56
56
  * @public
57
57
  */
58
- this.points = undefined;
58
+ this.points = {}
59
59
 
60
60
  /**
61
61
  * The Packing Line that owns this Soft Sort Belt
@@ -63,7 +63,7 @@ class SoftSortBeltModel extends BaseModel
63
63
  * @type {string}
64
64
  * @public
65
65
  */
66
- this.packingLineId = undefined;
66
+ this.packingLineId = "";
67
67
 
68
68
  /**
69
69
  * Whether the Soft Sort Belt has been deleted
@@ -71,7 +71,7 @@ class SoftSortBeltModel extends BaseModel
71
71
  * @type {boolean}
72
72
  * @public
73
73
  */
74
- this.deleted = undefined;
74
+ this.deleted = false;
75
75
 
76
76
  /**
77
77
  * When the Soft Sort Belt was last updated
@@ -79,7 +79,7 @@ class SoftSortBeltModel extends BaseModel
79
79
  * @type {Date}
80
80
  * @public
81
81
  */
82
- this.updateTimestamp = undefined;
82
+ this.updateTimestamp = new Date();
83
83
 
84
84
  /**
85
85
  * The Site ID associated with this Soft Sort Belt
@@ -31,7 +31,7 @@ class VarietyModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The Variety Code
@@ -39,7 +39,7 @@ class VarietyModel extends BaseModel
39
39
  * @type {string}
40
40
  * @public
41
41
  */
42
- this.code = undefined;
42
+ this.code = "";
43
43
 
44
44
  /**
45
45
  * The Variety Name
@@ -47,7 +47,7 @@ class VarietyModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.name = undefined;
50
+ this.name = "";
51
51
 
52
52
  /**
53
53
  * The Variety Description
@@ -55,7 +55,7 @@ class VarietyModel extends BaseModel
55
55
  * @type {string}
56
56
  * @public
57
57
  */
58
- this.description = undefined;
58
+ this.description = "";
59
59
 
60
60
  /**
61
61
  * The Variety Image Source
@@ -63,7 +63,7 @@ class VarietyModel extends BaseModel
63
63
  * @type {string}
64
64
  * @public
65
65
  */
66
- this.image = undefined;
66
+ this.image = "";
67
67
 
68
68
  /**
69
69
  * An Array of Fruit Sizes Defined for this Variety
@@ -71,7 +71,7 @@ class VarietyModel extends BaseModel
71
71
  * @type {Array<{size: string}>}
72
72
  * @public
73
73
  */
74
- this.fruitSizes = undefined;
74
+ this.fruitSizes = [];
75
75
 
76
76
  /**
77
77
  * Whether the Variety has been deleted
@@ -79,7 +79,7 @@ class VarietyModel extends BaseModel
79
79
  * @type {boolean}
80
80
  * @public
81
81
  */
82
- this.deleted = undefined;
82
+ this.deleted = false;
83
83
 
84
84
  /**
85
85
  * When the Variety was last updated
@@ -87,7 +87,7 @@ class VarietyModel extends BaseModel
87
87
  * @type {Date}
88
88
  * @public
89
89
  */
90
- this.updateTimestamp = undefined;
90
+ this.updateTimestamp = new Date();
91
91
 
92
92
  /**
93
93
  * The Site ID associated with this Variety
@@ -7,6 +7,7 @@
7
7
  /**
8
8
  * @namespace Models.Packhouse.Site
9
9
  */
10
+ import BinTipBinModel from './BinTipBinModel';
10
11
  import BinTipWeightModel from './BinTipWeightModel';
11
12
  import CompacSizerBatchModel from './CompacSizerBatchModel';
12
13
  import CompacSizerModel from './CompacSizerModel';
@@ -16,6 +17,7 @@ import CompacSizerOutletTypeModel from './CompacSizerOutletTypeModel';
16
17
  import CompacSizerPackrunSummaryModel from './CompacSizerPackrunSummaryModel';
17
18
  import DowntimeEventModel from './DowntimeEventModel';
18
19
  import FreshPackPackrunSummaryModel from './FreshPackPackrunSummaryModel';
20
+ import FreshQualityPackrunSummaryModel from './FreshQualityPackrunSummaryModel';
19
21
  import GrowingMethodModel from './GrowingMethodModel';
20
22
  import PackTypeModel from './PackTypeModel';
21
23
  import PackingLineModel from './PackingLineModel';
@@ -26,10 +28,13 @@ import RejectBinWeightModel from './RejectBinWeightModel';
26
28
  import ShiftFocusMeetingModel from './ShiftFocusMeetingModel';
27
29
  import ShiftHourlyEntryModel from './ShiftHourlyEntryModel';
28
30
  import ShiftModel from './ShiftModel';
31
+ import ShiftQualitySummaryModel from './ShiftQualitySummaryModel';
32
+ import ShiftTaskModel from './ShiftTaskModel';
29
33
  import SoftSortBeltModel from './SoftSortBeltModel';
30
34
  import VarietyModel from './VarietyModel';
31
35
 
32
36
  const Site = {
37
+ BinTipBinModel,
33
38
  BinTipWeightModel,
34
39
  CompacSizerBatchModel,
35
40
  CompacSizerModel,
@@ -39,6 +44,7 @@ const Site = {
39
44
  CompacSizerPackrunSummaryModel,
40
45
  DowntimeEventModel,
41
46
  FreshPackPackrunSummaryModel,
47
+ FreshQualityPackrunSummaryModel,
42
48
  GrowingMethodModel,
43
49
  PackTypeModel,
44
50
  PackingLineModel,
@@ -49,6 +55,8 @@ const Site = {
49
55
  ShiftFocusMeetingModel,
50
56
  ShiftHourlyEntryModel,
51
57
  ShiftModel,
58
+ ShiftQualitySummaryModel,
59
+ ShiftTaskModel,
52
60
  SoftSortBeltModel,
53
61
  VarietyModel,
54
62
  };
@@ -30,7 +30,7 @@ class RTUModel extends BaseModel
30
30
  * @type {number}
31
31
  * @public
32
32
  */
33
- this.id = undefined;
33
+ this.id = 0;
34
34
 
35
35
  /**
36
36
  * The Site this RTU belongs to
@@ -38,7 +38,7 @@ class RTUModel extends BaseModel
38
38
  * @type {number}
39
39
  * @public
40
40
  */
41
- this.siteId = undefined;
41
+ this.siteId = 0;
42
42
 
43
43
  /**
44
44
  * The RTU Name
@@ -46,7 +46,7 @@ class RTUModel extends BaseModel
46
46
  * @type {string}
47
47
  * @public
48
48
  */
49
- this.name = undefined;
49
+ this.name = "";
50
50
 
51
51
  /**
52
52
  * Whether the RTU is Enabled
@@ -54,7 +54,7 @@ class RTUModel extends BaseModel
54
54
  * @type {boolean}
55
55
  * @public
56
56
  */
57
- this.enabled = undefined;
57
+ this.enabled = false;
58
58
 
59
59
  /**
60
60
  * Whether the RTU has been deleted
@@ -62,7 +62,7 @@ class RTUModel extends BaseModel
62
62
  * @type {boolean}
63
63
  * @public
64
64
  */
65
- this.deleted = undefined;
65
+ this.deleted = false;
66
66
 
67
67
  /**
68
68
  * When the RTU was last updated
@@ -70,7 +70,7 @@ class RTUModel extends BaseModel
70
70
  * @type {Date}
71
71
  * @public
72
72
  */
73
- this.updateTimestamp = undefined;
73
+ this.updateTimestamp = new Date();
74
74
  }
75
75
 
76
76
  /**
@@ -30,7 +30,7 @@ class RTUPluginModel extends BaseModel
30
30
  * @type {number}
31
31
  * @public
32
32
  */
33
- this.id = undefined;
33
+ this.id = 0;
34
34
 
35
35
  /**
36
36
  * The Plugin Name
@@ -38,7 +38,7 @@ class RTUPluginModel extends BaseModel
38
38
  * @type {string}
39
39
  * @public
40
40
  */
41
- this.name = undefined;
41
+ this.name = "";
42
42
 
43
43
  /**
44
44
  * The Company this RTU Plugin belongs to
@@ -46,7 +46,7 @@ class RTUPluginModel extends BaseModel
46
46
  * @type {string}
47
47
  * @public
48
48
  */
49
- this.companyId = undefined;
49
+ this.companyId = "";
50
50
 
51
51
  /**
52
52
  * Whether the RTU Plugin has been deleted
@@ -54,7 +54,7 @@ class RTUPluginModel extends BaseModel
54
54
  * @type {boolean}
55
55
  * @public
56
56
  */
57
- this.deleted = undefined;
57
+ this.deleted = false;
58
58
 
59
59
  /**
60
60
  * When the RTU Plugin was last updated
@@ -62,7 +62,7 @@ class RTUPluginModel extends BaseModel
62
62
  * @type {Date}
63
63
  * @public
64
64
  */
65
- this.updateTimestamp = undefined;
65
+ this.updateTimestamp = new Date();
66
66
  }
67
67
 
68
68
  /**
@@ -31,7 +31,7 @@ class AlarmGroupModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The RTU this Alarm Group belongs to
@@ -39,7 +39,7 @@ class AlarmGroupModel extends BaseModel
39
39
  * @type {?number}
40
40
  * @public
41
41
  */
42
- this.rtuId = undefined;
42
+ this.rtuId = null;
43
43
 
44
44
  /**
45
45
  * The Alarm Group Name
@@ -47,7 +47,7 @@ class AlarmGroupModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.name = undefined;
50
+ this.name = "";
51
51
 
52
52
  /**
53
53
  * The Boolean Point used to Reset this Alarm Group
@@ -55,7 +55,7 @@ class AlarmGroupModel extends BaseModel
55
55
  * @type {number}
56
56
  * @public
57
57
  */
58
- this.resetPoint = undefined;
58
+ this.resetPoint = 0;
59
59
 
60
60
  /**
61
61
  * An Array of Points and the States to be Written when this Alarm Group is Reset
@@ -63,7 +63,7 @@ class AlarmGroupModel extends BaseModel
63
63
  * @type {Array<{point: number, value: boolean}>}
64
64
  * @public
65
65
  */
66
- this.externalResetPoints = undefined;
66
+ this.externalResetPoints = [];
67
67
 
68
68
  /**
69
69
  * Whether the Alarm Group has been deleted
@@ -71,7 +71,7 @@ class AlarmGroupModel extends BaseModel
71
71
  * @type {boolean}
72
72
  * @public
73
73
  */
74
- this.deleted = undefined;
74
+ this.deleted = false;
75
75
 
76
76
  /**
77
77
  * When the Alarm Group was last updated
@@ -79,7 +79,7 @@ class AlarmGroupModel extends BaseModel
79
79
  * @type {Date}
80
80
  * @public
81
81
  */
82
- this.updateTimestamp = undefined;
82
+ this.updateTimestamp = new Date();
83
83
 
84
84
  /**
85
85
  * The Site ID associated with this Alarm Group