@ricado/api-client 2.1.0 → 2.3.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 (123) hide show
  1. package/README.md +5 -7
  2. package/dist/ricado.api.client.js +1 -1
  3. package/lib/Controllers/Packhouse/Site/BinTipBinController.js +622 -0
  4. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +3 -3
  5. package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +657 -0
  6. package/lib/Controllers/Packhouse/Site/PackingLineController.js +25 -1
  7. package/lib/Controllers/Packhouse/Site/PackrunController.js +42 -0
  8. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +24 -2
  9. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
  10. package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +661 -0
  11. package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +628 -0
  12. package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +453 -0
  13. package/lib/Controllers/Packhouse/Site/index.js +15 -0
  14. package/lib/DataItems/PointValueItem.js +3 -3
  15. package/lib/Models/AccountPolicyModel.js +7 -7
  16. package/lib/Models/ApiAccountModel.js +7 -7
  17. package/lib/Models/CompanyModel.js +5 -5
  18. package/lib/Models/FirebaseTokenModel.js +8 -8
  19. package/lib/Models/Packhouse/Site/BinTipBinModel.js +367 -0
  20. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
  21. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
  22. package/lib/Models/Packhouse/Site/CompacSizerModel.js +15 -15
  23. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
  24. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
  25. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
  26. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
  27. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
  28. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
  29. package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +481 -0
  30. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
  31. package/lib/Models/Packhouse/Site/PackTypeModel.js +8 -8
  32. package/lib/Models/Packhouse/Site/PackingLineModel.js +539 -16
  33. package/lib/Models/Packhouse/Site/PackrunModel.js +81 -15
  34. package/lib/Models/Packhouse/Site/RejectBinModel.js +9 -9
  35. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +271 -15
  36. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
  37. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
  38. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +204 -38
  39. package/lib/Models/Packhouse/Site/ShiftModel.js +26 -19
  40. package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +599 -0
  41. package/lib/Models/Packhouse/Site/ShiftTaskModel.js +373 -0
  42. package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +235 -0
  43. package/lib/Models/Packhouse/Site/VarietyModel.js +8 -8
  44. package/lib/Models/Packhouse/Site/index.js +15 -0
  45. package/lib/Models/RTUModel.js +6 -6
  46. package/lib/Models/RTUPluginModel.js +5 -5
  47. package/lib/Models/Site/AlarmGroupModel.js +7 -7
  48. package/lib/Models/Site/AlarmModel.js +17 -17
  49. package/lib/Models/Site/DefinitionModel.js +6 -6
  50. package/lib/Models/Site/PermanentObjectDataModel.js +8 -8
  51. package/lib/Models/Site/PermanentObjectModel.js +7 -7
  52. package/lib/Models/Site/PointModel.js +11 -11
  53. package/lib/Models/Site/TemporaryObjectModel.js +6 -6
  54. package/lib/Models/SiteModel.js +6 -6
  55. package/lib/Models/TokenModel.js +10 -10
  56. package/lib/Models/UserAccountActionTokenModel.js +11 -11
  57. package/lib/Models/UserAccountModel.js +10 -10
  58. package/lib/PackageVersion.js +1 -1
  59. package/lib/Points.js +22 -12
  60. package/lib/WebSocketHelper.js +29 -13
  61. package/lib/index.d.ts +3853 -1290
  62. package/lib/index.js +3 -3
  63. package/package.json +1 -1
  64. package/src/Controllers/Packhouse/Site/BinTipBinController.js +665 -0
  65. package/src/Controllers/Packhouse/Site/CompacSizerController.js +3 -3
  66. package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +700 -0
  67. package/src/Controllers/Packhouse/Site/PackingLineController.js +25 -1
  68. package/src/Controllers/Packhouse/Site/PackrunController.js +52 -0
  69. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +24 -2
  70. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
  71. package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +704 -0
  72. package/src/Controllers/Packhouse/Site/ShiftTaskController.js +671 -0
  73. package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +474 -0
  74. package/src/Controllers/Packhouse/Site/index.js +10 -0
  75. package/src/DataItems/PointValueItem.js +3 -3
  76. package/src/Models/AccountPolicyModel.js +7 -7
  77. package/src/Models/ApiAccountModel.js +7 -7
  78. package/src/Models/CompanyModel.js +5 -5
  79. package/src/Models/FirebaseTokenModel.js +8 -8
  80. package/src/Models/Packhouse/Site/BinTipBinModel.js +365 -0
  81. package/src/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
  82. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
  83. package/src/Models/Packhouse/Site/CompacSizerModel.js +15 -15
  84. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
  85. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
  86. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
  87. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
  88. package/src/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
  89. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
  90. package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +523 -0
  91. package/src/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
  92. package/src/Models/Packhouse/Site/PackTypeModel.js +8 -8
  93. package/src/Models/Packhouse/Site/PackingLineModel.js +720 -16
  94. package/src/Models/Packhouse/Site/PackrunModel.js +90 -15
  95. package/src/Models/Packhouse/Site/RejectBinModel.js +9 -9
  96. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +308 -15
  97. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
  98. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
  99. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +229 -38
  100. package/src/Models/Packhouse/Site/ShiftModel.js +29 -19
  101. package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +664 -0
  102. package/src/Models/Packhouse/Site/ShiftTaskModel.js +369 -0
  103. package/src/Models/Packhouse/Site/SoftSortBeltModel.js +215 -0
  104. package/src/Models/Packhouse/Site/VarietyModel.js +8 -8
  105. package/src/Models/Packhouse/Site/index.js +10 -0
  106. package/src/Models/RTUModel.js +6 -6
  107. package/src/Models/RTUPluginModel.js +5 -5
  108. package/src/Models/Site/AlarmGroupModel.js +7 -7
  109. package/src/Models/Site/AlarmModel.js +17 -17
  110. package/src/Models/Site/DefinitionModel.js +6 -6
  111. package/src/Models/Site/PermanentObjectDataModel.js +8 -8
  112. package/src/Models/Site/PermanentObjectModel.js +7 -7
  113. package/src/Models/Site/PointModel.js +11 -11
  114. package/src/Models/Site/TemporaryObjectModel.js +6 -6
  115. package/src/Models/SiteModel.js +6 -6
  116. package/src/Models/TokenModel.js +10 -10
  117. package/src/Models/UserAccountActionTokenModel.js +11 -11
  118. package/src/Models/UserAccountModel.js +10 -10
  119. package/src/PackageVersion.js +1 -1
  120. package/src/Points.js +24 -12
  121. package/src/WebSocketHelper.js +34 -13
  122. package/src/index.js +3 -3
  123. package/types/tslint.json +2 -1
@@ -0,0 +1,474 @@
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 RequestHelper from '../../../RequestHelper';
8
+ import SoftSortBeltModel from '../../../Models/Packhouse/Site/SoftSortBeltModel';
9
+
10
+ /**
11
+ * Controller Class for Soft Sort Belts
12
+ *
13
+ * @class
14
+ */
15
+ class SoftSortBeltController
16
+ {
17
+ /**
18
+ * Retrieve a Soft Sort Belt [GET /packhouse/sites/{siteId}/soft-sort-belts/{id}]
19
+ *
20
+ * @static
21
+ * @public
22
+ * @param {number} siteId The Site ID
23
+ * @param {string} id The Soft Sort Belt ID
24
+ * @return {Promise<SoftSortBeltModel>}
25
+ */
26
+ static getOne(siteId, id)
27
+ {
28
+ return new Promise((resolve, reject) => {
29
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/soft-sort-belts/${id}`)
30
+ .then((result) => {
31
+ let resolveValue = (function(){
32
+ return SoftSortBeltModel.fromJSON(result, siteId);
33
+ }());
34
+
35
+ resolve(resolveValue);
36
+ })
37
+ .catch(error => reject(error));
38
+ });
39
+ }
40
+
41
+ /**
42
+ * Update a Soft Sort Belt [PATCH /packhouse/sites/{siteId}/soft-sort-belts/{id}]
43
+ *
44
+ * @static
45
+ * @public
46
+ * @param {number} siteId The Site ID
47
+ * @param {string} id The Soft Sort Belt ID
48
+ * @param {SoftSortBeltController.UpdateData} updateData The Soft Sort Belt Update Data
49
+ * @return {Promise<SoftSortBeltModel>}
50
+ */
51
+ static update(siteId, id, updateData)
52
+ {
53
+ return new Promise((resolve, reject) => {
54
+ RequestHelper.patchRequest(`/packhouse/sites/${siteId}/soft-sort-belts/${id}`, updateData)
55
+ .then((result) => {
56
+ let resolveValue = (function(){
57
+ return SoftSortBeltModel.fromJSON(result, siteId);
58
+ }());
59
+
60
+ resolve(resolveValue);
61
+ })
62
+ .catch(error => reject(error));
63
+ });
64
+ }
65
+
66
+ /**
67
+ * Delete a Soft Sort Belt [DELETE /packhouse/sites/{siteId}/soft-sort-belts/{id}]
68
+ *
69
+ * @static
70
+ * @public
71
+ * @param {number} siteId The Site ID
72
+ * @param {string} id The Soft Sort Belt ID
73
+ * @return {Promise<boolean>}
74
+ */
75
+ static delete(siteId, id)
76
+ {
77
+ return new Promise((resolve, reject) => {
78
+ RequestHelper.deleteRequest(`/packhouse/sites/${siteId}/soft-sort-belts/${id}`)
79
+ .then((result) => {
80
+ resolve(result ?? true);
81
+ })
82
+ .catch(error => reject(error));
83
+ });
84
+ }
85
+
86
+ /**
87
+ * Retrieve the Events of a Soft Sort Belt [GET /packhouse/sites/{siteId}/soft-sort-belts/{id}/events]
88
+ *
89
+ * Retrieves Events for a Single Soft Sort Belt
90
+ *
91
+ * @static
92
+ * @public
93
+ * @param {number} siteId The Site ID
94
+ * @param {string} id The Soft Sort Belt ID
95
+ * @param {SoftSortBeltController.GetOneEventsQueryParameters} [queryParameters] The Optional Query Parameters
96
+ * @return {Promise<Array<SoftSortBeltController.SoftSortEventItem>>}
97
+ */
98
+ static getOneEvents(siteId, id, queryParameters = {})
99
+ {
100
+ return new Promise((resolve, reject) => {
101
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/soft-sort-belts/${id}/events`, queryParameters)
102
+ .then((result) => {
103
+ let resolveValue = (function(){
104
+ if(Array.isArray(result) !== true)
105
+ {
106
+ return [];
107
+ }
108
+
109
+ return result.map((resultItem) => {
110
+ return (function(){
111
+ let resultItemObject = {};
112
+
113
+ if(typeof resultItem === 'object' && 'beltId' in resultItem)
114
+ {
115
+ resultItemObject.beltId = (function(){
116
+ if(typeof resultItem.beltId !== 'string')
117
+ {
118
+ return String(resultItem.beltId);
119
+ }
120
+
121
+ return resultItem.beltId;
122
+ }());
123
+ }
124
+ else
125
+ {
126
+ resultItemObject.beltId = "";
127
+ }
128
+
129
+ if(typeof resultItem === 'object' && 'packrunId' in resultItem)
130
+ {
131
+ resultItemObject.packrunId = (function(){
132
+ if(typeof resultItem.packrunId !== 'string')
133
+ {
134
+ return String(resultItem.packrunId);
135
+ }
136
+
137
+ return resultItem.packrunId;
138
+ }());
139
+ }
140
+ else
141
+ {
142
+ resultItemObject.packrunId = "";
143
+ }
144
+
145
+ if(typeof resultItem === 'object' && 'packrunName' in resultItem)
146
+ {
147
+ resultItemObject.packrunName = (function(){
148
+ if(typeof resultItem.packrunName !== 'string')
149
+ {
150
+ return String(resultItem.packrunName);
151
+ }
152
+
153
+ return resultItem.packrunName;
154
+ }());
155
+ }
156
+ else
157
+ {
158
+ resultItemObject.packrunName = "";
159
+ }
160
+
161
+ if(typeof resultItem === 'object' && 'startTimestamp' in resultItem)
162
+ {
163
+ resultItemObject.startTimestamp = (function(){
164
+ if(typeof resultItem.startTimestamp !== 'string')
165
+ {
166
+ return new Date(String(resultItem.startTimestamp));
167
+ }
168
+
169
+ return new Date(resultItem.startTimestamp);
170
+ }());
171
+ }
172
+ else
173
+ {
174
+ resultItemObject.startTimestamp = new Date();
175
+ }
176
+
177
+ if(typeof resultItem === 'object' && 'endTimestamp' in resultItem)
178
+ {
179
+ resultItemObject.endTimestamp = (function(){
180
+ if(typeof resultItem.endTimestamp !== 'string')
181
+ {
182
+ return new Date(String(resultItem.endTimestamp));
183
+ }
184
+
185
+ return new Date(resultItem.endTimestamp);
186
+ }());
187
+ }
188
+ else
189
+ {
190
+ resultItemObject.endTimestamp = new Date();
191
+ }
192
+
193
+ if(typeof resultItem === 'object' && 'duration' in resultItem)
194
+ {
195
+ resultItemObject.duration = (function(){
196
+ if(typeof resultItem.duration !== 'number')
197
+ {
198
+ return Number.isInteger(Number(resultItem.duration)) ? Number(resultItem.duration) : Math.floor(Number(resultItem.duration));
199
+ }
200
+
201
+ return Number.isInteger(resultItem.duration) ? resultItem.duration : Math.floor(resultItem.duration);
202
+ }());
203
+ }
204
+ else
205
+ {
206
+ resultItemObject.duration = 0;
207
+ }
208
+
209
+ return resultItemObject;
210
+ }());
211
+ });
212
+ }());
213
+
214
+ resolve(resolveValue);
215
+ })
216
+ .catch(error => reject(error));
217
+ });
218
+ }
219
+
220
+ /**
221
+ * List all Soft Sort Belts [GET /packhouse/sites/{siteId}/soft-sort-belts]
222
+ *
223
+ * @static
224
+ * @public
225
+ * @param {number} siteId The Site ID
226
+ * @param {SoftSortBeltController.GetAllQueryParameters} [queryParameters] The Optional Query Parameters
227
+ * @return {Promise<SoftSortBeltModel[]>}
228
+ */
229
+ static getAll(siteId, queryParameters = {})
230
+ {
231
+ return new Promise((resolve, reject) => {
232
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/soft-sort-belts`, queryParameters)
233
+ .then((result) => {
234
+ let resolveValue = (function(){
235
+ if(Array.isArray(result) !== true)
236
+ {
237
+ return [];
238
+ }
239
+
240
+ return result.map((resultItem) => {
241
+ return (function(){
242
+ return SoftSortBeltModel.fromJSON(resultItem, siteId);
243
+ }());
244
+ });
245
+ }());
246
+
247
+ resolve(resolveValue);
248
+ })
249
+ .catch(error => reject(error));
250
+ });
251
+ }
252
+
253
+ /**
254
+ * Create a Soft Sort Belt [POST /packhouse/sites/{siteId}/soft-sort-belts]
255
+ *
256
+ * @static
257
+ * @public
258
+ * @param {number} siteId The Site ID
259
+ * @param {SoftSortBeltController.CreateData} createData The Soft Sort Belt Create Data
260
+ * @return {Promise<SoftSortBeltModel>}
261
+ */
262
+ static create(siteId, createData)
263
+ {
264
+ return new Promise((resolve, reject) => {
265
+ RequestHelper.postRequest(`/packhouse/sites/${siteId}/soft-sort-belts`, createData)
266
+ .then((result) => {
267
+ let resolveValue = (function(){
268
+ return SoftSortBeltModel.fromJSON(result, siteId);
269
+ }());
270
+
271
+ resolve(resolveValue);
272
+ })
273
+ .catch(error => reject(error));
274
+ });
275
+ }
276
+
277
+ /**
278
+ * Retrieve the Events of all Soft Sort Belts [GET /packhouse/sites/{siteId}/soft-sort-belts/events]
279
+ *
280
+ * Retrieves Events for all Soft Sort Belts
281
+ *
282
+ * @static
283
+ * @public
284
+ * @param {number} siteId The Site ID
285
+ * @param {SoftSortBeltController.GetAllEventsQueryParameters} [queryParameters] The Optional Query Parameters
286
+ * @return {Promise<Array<SoftSortBeltController.SoftSortEventItem>>}
287
+ */
288
+ static getAllEvents(siteId, queryParameters = {})
289
+ {
290
+ return new Promise((resolve, reject) => {
291
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/soft-sort-belts/events`, queryParameters)
292
+ .then((result) => {
293
+ let resolveValue = (function(){
294
+ if(Array.isArray(result) !== true)
295
+ {
296
+ return [];
297
+ }
298
+
299
+ return result.map((resultItem) => {
300
+ return (function(){
301
+ let resultItemObject = {};
302
+
303
+ if(typeof resultItem === 'object' && 'beltId' in resultItem)
304
+ {
305
+ resultItemObject.beltId = (function(){
306
+ if(typeof resultItem.beltId !== 'string')
307
+ {
308
+ return String(resultItem.beltId);
309
+ }
310
+
311
+ return resultItem.beltId;
312
+ }());
313
+ }
314
+ else
315
+ {
316
+ resultItemObject.beltId = "";
317
+ }
318
+
319
+ if(typeof resultItem === 'object' && 'packrunId' in resultItem)
320
+ {
321
+ resultItemObject.packrunId = (function(){
322
+ if(typeof resultItem.packrunId !== 'string')
323
+ {
324
+ return String(resultItem.packrunId);
325
+ }
326
+
327
+ return resultItem.packrunId;
328
+ }());
329
+ }
330
+ else
331
+ {
332
+ resultItemObject.packrunId = "";
333
+ }
334
+
335
+ if(typeof resultItem === 'object' && 'packrunName' in resultItem)
336
+ {
337
+ resultItemObject.packrunName = (function(){
338
+ if(typeof resultItem.packrunName !== 'string')
339
+ {
340
+ return String(resultItem.packrunName);
341
+ }
342
+
343
+ return resultItem.packrunName;
344
+ }());
345
+ }
346
+ else
347
+ {
348
+ resultItemObject.packrunName = "";
349
+ }
350
+
351
+ if(typeof resultItem === 'object' && 'startTimestamp' in resultItem)
352
+ {
353
+ resultItemObject.startTimestamp = (function(){
354
+ if(typeof resultItem.startTimestamp !== 'string')
355
+ {
356
+ return new Date(String(resultItem.startTimestamp));
357
+ }
358
+
359
+ return new Date(resultItem.startTimestamp);
360
+ }());
361
+ }
362
+ else
363
+ {
364
+ resultItemObject.startTimestamp = new Date();
365
+ }
366
+
367
+ if(typeof resultItem === 'object' && 'endTimestamp' in resultItem)
368
+ {
369
+ resultItemObject.endTimestamp = (function(){
370
+ if(typeof resultItem.endTimestamp !== 'string')
371
+ {
372
+ return new Date(String(resultItem.endTimestamp));
373
+ }
374
+
375
+ return new Date(resultItem.endTimestamp);
376
+ }());
377
+ }
378
+ else
379
+ {
380
+ resultItemObject.endTimestamp = new Date();
381
+ }
382
+
383
+ if(typeof resultItem === 'object' && 'duration' in resultItem)
384
+ {
385
+ resultItemObject.duration = (function(){
386
+ if(typeof resultItem.duration !== 'number')
387
+ {
388
+ return Number.isInteger(Number(resultItem.duration)) ? Number(resultItem.duration) : Math.floor(Number(resultItem.duration));
389
+ }
390
+
391
+ return Number.isInteger(resultItem.duration) ? resultItem.duration : Math.floor(resultItem.duration);
392
+ }());
393
+ }
394
+ else
395
+ {
396
+ resultItemObject.duration = 0;
397
+ }
398
+
399
+ return resultItemObject;
400
+ }());
401
+ });
402
+ }());
403
+
404
+ resolve(resolveValue);
405
+ })
406
+ .catch(error => reject(error));
407
+ });
408
+ }
409
+ }
410
+
411
+ export default SoftSortBeltController;
412
+
413
+ /**
414
+ * The Optional Query Parameters for the getOneEvents Function
415
+ *
416
+ * @typedef {Object} SoftSortBeltController.GetOneEventsQueryParameters
417
+ * @property {Date} [timestampBegin] The Beginning Timestamp of the Soft-Sort Event Results. Defaults to 24 Hours ago
418
+ * @property {Date} [timestampEnd] The End Timestamp of the Soft-Sort Event Results. Defaults to Now
419
+ * @memberof Controllers.Packhouse.Site
420
+ */
421
+
422
+ /**
423
+ * The Optional Query Parameters for the getAll Function
424
+ *
425
+ * @typedef {Object} SoftSortBeltController.GetAllQueryParameters
426
+ * @property {?number} [rtuId] The RTU this Soft Sort Belt belongs to
427
+ * @property {string} [name] The Name of this Soft Sort Belt
428
+ * @property {string} [packingLineId] The Packing Line that owns this Soft Sort Belt
429
+ * @memberof Controllers.Packhouse.Site
430
+ */
431
+
432
+ /**
433
+ * The Optional Query Parameters for the getAllEvents Function
434
+ *
435
+ * @typedef {Object} SoftSortBeltController.GetAllEventsQueryParameters
436
+ * @property {string[]} [beltIds] A List of Soft-Sort Belt IDs to Filter by
437
+ * @property {Date} [timestampBegin] The Beginning Timestamp of the Soft-Sort Event Results. Defaults to 24 Hours ago
438
+ * @property {Date} [timestampEnd] The End Timestamp of the Soft-Sort Event Results. Defaults to Now
439
+ * @memberof Controllers.Packhouse.Site
440
+ */
441
+
442
+ /**
443
+ * The Create Data for a Soft Sort Belt
444
+ *
445
+ * @typedef {Object} SoftSortBeltController.CreateData
446
+ * @property {?number} [rtuId] The RTU this Soft Sort Belt belongs to
447
+ * @property {string} name The Name of this Soft Sort Belt
448
+ * @property {Object} points The Points used by this Soft Sort Belt
449
+ * @property {string} packingLineId The Packing Line that owns this Soft Sort Belt
450
+ * @memberof Controllers.Packhouse.Site
451
+ */
452
+
453
+ /**
454
+ * The Update Data for a Soft Sort Belt
455
+ *
456
+ * @typedef {Object} SoftSortBeltController.UpdateData
457
+ * @property {string} [name] The Name of this Soft Sort Belt
458
+ * @property {Object} [points] The Points used by this Soft Sort Belt
459
+ * @property {string} [packingLineId] The Packing Line that owns this Soft Sort Belt
460
+ * @memberof Controllers.Packhouse.Site
461
+ */
462
+
463
+ /**
464
+ * A **SoftSortEventItem** Type
465
+ *
466
+ * @typedef {Object} SoftSortBeltController.SoftSortEventItem
467
+ * @property {string} beltId The Soft-Sort Belt ID
468
+ * @property {string} packrunId The ID of the associated Packrun
469
+ * @property {string} packrunName The Name of the associated Packrun
470
+ * @property {Date} startTimestamp When the Event Started
471
+ * @property {Date} endTimestamp When the Event Ended
472
+ * @property {number} duration The Duration in Seconds of the Event
473
+ * @memberof Controllers.Packhouse.Site
474
+ */
@@ -7,6 +7,7 @@
7
7
  /**
8
8
  * @namespace Controllers.Packhouse.Site
9
9
  */
10
+ import BinTipBinController from './BinTipBinController';
10
11
  import BinTipWeightController from './BinTipWeightController';
11
12
  import CompacSizerBatchController from './CompacSizerBatchController';
12
13
  import CompacSizerController from './CompacSizerController';
@@ -16,6 +17,7 @@ import CompacSizerOutletTypeController from './CompacSizerOutletTypeController';
16
17
  import CompacSizerPackrunSummaryController from './CompacSizerPackrunSummaryController';
17
18
  import DowntimeEventController from './DowntimeEventController';
18
19
  import FreshPackPackrunSummaryController from './FreshPackPackrunSummaryController';
20
+ import FreshQualityPackrunSummaryController from './FreshQualityPackrunSummaryController';
19
21
  import GrowingMethodController from './GrowingMethodController';
20
22
  import PackTypeController from './PackTypeController';
21
23
  import PackingLineController from './PackingLineController';
@@ -26,9 +28,13 @@ import RejectBinWeightController from './RejectBinWeightController';
26
28
  import ShiftController from './ShiftController';
27
29
  import ShiftFocusMeetingController from './ShiftFocusMeetingController';
28
30
  import ShiftHourlyEntryController from './ShiftHourlyEntryController';
31
+ import ShiftQualitySummaryController from './ShiftQualitySummaryController';
32
+ import ShiftTaskController from './ShiftTaskController';
33
+ import SoftSortBeltController from './SoftSortBeltController';
29
34
  import VarietyController from './VarietyController';
30
35
 
31
36
  const Site = {
37
+ BinTipBinController,
32
38
  BinTipWeightController,
33
39
  CompacSizerBatchController,
34
40
  CompacSizerController,
@@ -38,6 +44,7 @@ const Site = {
38
44
  CompacSizerPackrunSummaryController,
39
45
  DowntimeEventController,
40
46
  FreshPackPackrunSummaryController,
47
+ FreshQualityPackrunSummaryController,
41
48
  GrowingMethodController,
42
49
  PackTypeController,
43
50
  PackingLineController,
@@ -48,6 +55,9 @@ const Site = {
48
55
  ShiftController,
49
56
  ShiftFocusMeetingController,
50
57
  ShiftHourlyEntryController,
58
+ ShiftQualitySummaryController,
59
+ ShiftTaskController,
60
+ SoftSortBeltController,
51
61
  VarietyController,
52
62
  };
53
63
 
@@ -25,7 +25,7 @@ class PointValueItem
25
25
  * @type {number}
26
26
  * @private
27
27
  */
28
- this._id = undefined;
28
+ this._id = 0;
29
29
 
30
30
  /**
31
31
  * The Point Value
@@ -33,7 +33,7 @@ class PointValueItem
33
33
  * @type {any}
34
34
  * @private
35
35
  */
36
- this._value = undefined;
36
+ this._value = null;
37
37
 
38
38
  /**
39
39
  * When the Point Value last changed
@@ -41,7 +41,7 @@ class PointValueItem
41
41
  * @type {Date}
42
42
  * @private
43
43
  */
44
- this._timestamp = undefined;
44
+ this._timestamp = new Date();
45
45
  }
46
46
 
47
47
  /**
@@ -30,7 +30,7 @@ class AccountPolicyModel extends BaseModel
30
30
  * @type {string}
31
31
  * @public
32
32
  */
33
- this.id = undefined;
33
+ this.id = "";
34
34
 
35
35
  /**
36
36
  * The Policy Name
@@ -38,7 +38,7 @@ class AccountPolicyModel 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 Policy belongs to
@@ -46,7 +46,7 @@ class AccountPolicyModel extends BaseModel
46
46
  * @type {string}
47
47
  * @public
48
48
  */
49
- this.companyId = undefined;
49
+ this.companyId = "";
50
50
 
51
51
  /**
52
52
  * The Resources this Policy provides
@@ -54,7 +54,7 @@ class AccountPolicyModel extends BaseModel
54
54
  * @type {Array<{id: any, type: string, actions: string[], permission: string}>}
55
55
  * @public
56
56
  */
57
- this.resources = undefined;
57
+ this.resources = [];
58
58
 
59
59
  /**
60
60
  * The Rules this Policy provides
@@ -62,7 +62,7 @@ class AccountPolicyModel extends BaseModel
62
62
  * @type {Object[]}
63
63
  * @public
64
64
  */
65
- this.rules = undefined;
65
+ this.rules = [];
66
66
 
67
67
  /**
68
68
  * Whether the Account Policy has been deleted
@@ -70,7 +70,7 @@ class AccountPolicyModel extends BaseModel
70
70
  * @type {boolean}
71
71
  * @public
72
72
  */
73
- this.deleted = undefined;
73
+ this.deleted = false;
74
74
 
75
75
  /**
76
76
  * When the Account Policy was last updated
@@ -78,7 +78,7 @@ class AccountPolicyModel extends BaseModel
78
78
  * @type {Date}
79
79
  * @public
80
80
  */
81
- this.updateTimestamp = undefined;
81
+ this.updateTimestamp = new Date();
82
82
  }
83
83
 
84
84
  /**
@@ -30,7 +30,7 @@ class ApiAccountModel extends BaseModel
30
30
  * @type {string}
31
31
  * @public
32
32
  */
33
- this.id = undefined;
33
+ this.id = "";
34
34
 
35
35
  /**
36
36
  * API Key
@@ -38,7 +38,7 @@ class ApiAccountModel extends BaseModel
38
38
  * @type {?string}
39
39
  * @public
40
40
  */
41
- this.key = undefined;
41
+ this.key = null;
42
42
 
43
43
  /**
44
44
  * The API Account Name
@@ -46,7 +46,7 @@ class ApiAccountModel extends BaseModel
46
46
  * @type {string}
47
47
  * @public
48
48
  */
49
- this.name = undefined;
49
+ this.name = "";
50
50
 
51
51
  /**
52
52
  * The Company this API Account belongs to
@@ -54,7 +54,7 @@ class ApiAccountModel extends BaseModel
54
54
  * @type {string}
55
55
  * @public
56
56
  */
57
- this.companyId = undefined;
57
+ this.companyId = "";
58
58
 
59
59
  /**
60
60
  * The Policies that apply to this API Account
@@ -62,7 +62,7 @@ class ApiAccountModel extends BaseModel
62
62
  * @type {string[]}
63
63
  * @public
64
64
  */
65
- this.policies = undefined;
65
+ this.policies = [];
66
66
 
67
67
  /**
68
68
  * Whether the API Account has been deleted
@@ -70,7 +70,7 @@ class ApiAccountModel extends BaseModel
70
70
  * @type {boolean}
71
71
  * @public
72
72
  */
73
- this.deleted = undefined;
73
+ this.deleted = false;
74
74
 
75
75
  /**
76
76
  * When the API Account was last updated
@@ -78,7 +78,7 @@ class ApiAccountModel extends BaseModel
78
78
  * @type {Date}
79
79
  * @public
80
80
  */
81
- this.updateTimestamp = undefined;
81
+ this.updateTimestamp = new Date();
82
82
  }
83
83
 
84
84
  /**