@ricado/api-client 2.3.3 → 2.3.6
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.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/ShiftController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +4 -3
- package/lib/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +891 -0
- package/lib/Controllers/Packhouse/Site/index.js +3 -0
- package/lib/Models/Packhouse/Site/ShiftModel.js +4 -4
- package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +2 -6
- package/lib/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +373 -0
- package/lib/Models/Packhouse/Site/index.js +3 -0
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +447 -9
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/ShiftController.js +2 -2
- package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +4 -3
- package/src/Controllers/Packhouse/Site/SoftSortPackrunSummaryController.js +1022 -0
- package/src/Controllers/Packhouse/Site/index.js +2 -0
- package/src/Models/Packhouse/Site/ShiftModel.js +4 -4
- package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +2 -7
- package/src/Models/Packhouse/Site/SoftSortPackrunSummaryModel.js +370 -0
- package/src/Models/Packhouse/Site/index.js +2 -0
- package/src/PackageVersion.js +1 -1
|
@@ -31,6 +31,7 @@ import ShiftHourlyEntryController from './ShiftHourlyEntryController';
|
|
|
31
31
|
import ShiftQualitySummaryController from './ShiftQualitySummaryController';
|
|
32
32
|
import ShiftTaskController from './ShiftTaskController';
|
|
33
33
|
import SoftSortBeltController from './SoftSortBeltController';
|
|
34
|
+
import SoftSortPackrunSummaryController from './SoftSortPackrunSummaryController';
|
|
34
35
|
import VarietyController from './VarietyController';
|
|
35
36
|
|
|
36
37
|
const Site = {
|
|
@@ -58,6 +59,7 @@ const Site = {
|
|
|
58
59
|
ShiftQualitySummaryController,
|
|
59
60
|
ShiftTaskController,
|
|
60
61
|
SoftSortBeltController,
|
|
62
|
+
SoftSortPackrunSummaryController,
|
|
61
63
|
VarietyController,
|
|
62
64
|
};
|
|
63
65
|
|
|
@@ -132,7 +132,7 @@ class ShiftModel extends BaseModel
|
|
|
132
132
|
/**
|
|
133
133
|
* An Optional Key Celebration the Line Manager and Team experienced during this Shift
|
|
134
134
|
*
|
|
135
|
-
* @type {?
|
|
135
|
+
* @type {?string}
|
|
136
136
|
* @public
|
|
137
137
|
*/
|
|
138
138
|
this.keyCelebration = null;
|
|
@@ -450,12 +450,12 @@ class ShiftModel extends BaseModel
|
|
|
450
450
|
return null;
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
-
if(typeof jsonObject['keyCelebration'] !== '
|
|
453
|
+
if(typeof jsonObject['keyCelebration'] !== 'string')
|
|
454
454
|
{
|
|
455
|
-
return
|
|
455
|
+
return String(jsonObject['keyCelebration']);
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
return
|
|
458
|
+
return jsonObject['keyCelebration'];
|
|
459
459
|
}());
|
|
460
460
|
}
|
|
461
461
|
|
|
@@ -68,10 +68,10 @@ class ShiftQualitySummaryModel extends BaseModel
|
|
|
68
68
|
/**
|
|
69
69
|
* The User ID of the Quality Manager for this Summary
|
|
70
70
|
*
|
|
71
|
-
* @type {
|
|
71
|
+
* @type {string}
|
|
72
72
|
* @public
|
|
73
73
|
*/
|
|
74
|
-
this.qualityManagerUserId =
|
|
74
|
+
this.qualityManagerUserId = "";
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* The Name of the Quality Manager for this Summary
|
|
@@ -243,11 +243,6 @@ class ShiftQualitySummaryModel extends BaseModel
|
|
|
243
243
|
if('qualityManagerUserId' in jsonObject)
|
|
244
244
|
{
|
|
245
245
|
model.qualityManagerUserId = (function(){
|
|
246
|
-
if(jsonObject['qualityManagerUserId'] === null)
|
|
247
|
-
{
|
|
248
|
-
return null;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
246
|
if(typeof jsonObject['qualityManagerUserId'] !== 'string')
|
|
252
247
|
{
|
|
253
248
|
return String(jsonObject['qualityManagerUserId']);
|
|
@@ -0,0 +1,370 @@
|
|
|
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 Soft-Sort Packrun Summary
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @extends BaseModel
|
|
15
|
+
*/
|
|
16
|
+
class SoftSortPackrunSummaryModel extends BaseModel
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* SoftSortPackrunSummaryModel Constructor
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Soft-Sort Packrun Summary
|
|
23
|
+
*/
|
|
24
|
+
constructor(siteId)
|
|
25
|
+
{
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The Soft-Sort Packrun Summary ID
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
this.id = "";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The Packing Line ID this Summary is associated with
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
this.packingLineId = "";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Packrun ID this Summary is associated with
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
this.packrunId = "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* When this Summary was Created
|
|
54
|
+
*
|
|
55
|
+
* @type {Date}
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
this.createdTimestamp = new Date();
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The Number of Soft-Sort Events per Bin Tipped
|
|
62
|
+
*
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
this.eventsPerBin = 0;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The Number of Soft-Sort Events that occurred for the Packrun
|
|
70
|
+
*
|
|
71
|
+
* @type {number}
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
this.totalEventsCount = 0;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The Average Duration of Soft-Sort Events for the Packrun expressed in Seconds
|
|
78
|
+
*
|
|
79
|
+
* @type {number}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.averageEventsDuration = 0;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The Total Duration of all Soft-Sort Events for the Packrun expressed in Seconds
|
|
86
|
+
*
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
this.totalEventsDuration = 0;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Whether the Soft-Sort Events Data for this Summary has been Finalized
|
|
94
|
+
*
|
|
95
|
+
* @type {?Date}
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
this.eventsFinalizedTimestamp = null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Whether the Soft-Sort Events for this Summary are considered accurate or not
|
|
102
|
+
*
|
|
103
|
+
* @type {?boolean}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.eventsAccurate = null;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* A Reason for why the Events for this Summary are not accurate. Applies when `eventsAccurate` is false
|
|
110
|
+
*
|
|
111
|
+
* @type {?string}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.eventsNotAccurateReason = null;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The FreshPack Soft-Sort API Data
|
|
118
|
+
*
|
|
119
|
+
* @type {?Object}
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
this.freshPackSoftSortApi = null;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Whether the Soft-Sort Packrun Summary has been deleted
|
|
126
|
+
*
|
|
127
|
+
* @type {boolean}
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
this.deleted = false;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* When the Soft-Sort Packrun Summary was last updated
|
|
134
|
+
*
|
|
135
|
+
* @type {Date}
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
this.updateTimestamp = new Date();
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The Site ID associated with this Soft-Sort Packrun Summary
|
|
142
|
+
*
|
|
143
|
+
* @type {number}
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
this.siteId = siteId;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Create a new **SoftSortPackrunSummaryModel** 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 Soft-Sort Packrun Summary
|
|
156
|
+
* @return {SoftSortPackrunSummaryModel}
|
|
157
|
+
*/
|
|
158
|
+
static fromJSON(json, siteId)
|
|
159
|
+
{
|
|
160
|
+
let model = new SoftSortPackrunSummaryModel(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('packrunId' in jsonObject)
|
|
203
|
+
{
|
|
204
|
+
model.packrunId = (function(){
|
|
205
|
+
if(typeof jsonObject['packrunId'] !== 'string')
|
|
206
|
+
{
|
|
207
|
+
return String(jsonObject['packrunId']);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return jsonObject['packrunId'];
|
|
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('eventsPerBin' in jsonObject)
|
|
227
|
+
{
|
|
228
|
+
model.eventsPerBin = (function(){
|
|
229
|
+
if(typeof jsonObject['eventsPerBin'] !== 'number')
|
|
230
|
+
{
|
|
231
|
+
return Number(jsonObject['eventsPerBin']);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return jsonObject['eventsPerBin'];
|
|
235
|
+
}());
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if('totalEventsCount' in jsonObject)
|
|
239
|
+
{
|
|
240
|
+
model.totalEventsCount = (function(){
|
|
241
|
+
if(typeof jsonObject['totalEventsCount'] !== 'number')
|
|
242
|
+
{
|
|
243
|
+
return Number.isInteger(Number(jsonObject['totalEventsCount'])) ? Number(jsonObject['totalEventsCount']) : Math.floor(Number(jsonObject['totalEventsCount']));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return Number.isInteger(jsonObject['totalEventsCount']) ? jsonObject['totalEventsCount'] : Math.floor(jsonObject['totalEventsCount']);
|
|
247
|
+
}());
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if('averageEventsDuration' in jsonObject)
|
|
251
|
+
{
|
|
252
|
+
model.averageEventsDuration = (function(){
|
|
253
|
+
if(typeof jsonObject['averageEventsDuration'] !== 'number')
|
|
254
|
+
{
|
|
255
|
+
return Number(jsonObject['averageEventsDuration']);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return jsonObject['averageEventsDuration'];
|
|
259
|
+
}());
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if('totalEventsDuration' in jsonObject)
|
|
263
|
+
{
|
|
264
|
+
model.totalEventsDuration = (function(){
|
|
265
|
+
if(typeof jsonObject['totalEventsDuration'] !== 'number')
|
|
266
|
+
{
|
|
267
|
+
return Number(jsonObject['totalEventsDuration']);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return jsonObject['totalEventsDuration'];
|
|
271
|
+
}());
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if('eventsFinalizedTimestamp' in jsonObject)
|
|
275
|
+
{
|
|
276
|
+
model.eventsFinalizedTimestamp = (function(){
|
|
277
|
+
if(jsonObject['eventsFinalizedTimestamp'] === null)
|
|
278
|
+
{
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if(typeof jsonObject['eventsFinalizedTimestamp'] !== 'string')
|
|
283
|
+
{
|
|
284
|
+
return new Date(String(jsonObject['eventsFinalizedTimestamp']));
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return new Date(jsonObject['eventsFinalizedTimestamp']);
|
|
288
|
+
}());
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if('eventsAccurate' in jsonObject)
|
|
292
|
+
{
|
|
293
|
+
model.eventsAccurate = (function(){
|
|
294
|
+
if(jsonObject['eventsAccurate'] === null)
|
|
295
|
+
{
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if(typeof jsonObject['eventsAccurate'] !== 'boolean')
|
|
300
|
+
{
|
|
301
|
+
return Boolean(jsonObject['eventsAccurate']);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
return jsonObject['eventsAccurate'];
|
|
305
|
+
}());
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if('eventsNotAccurateReason' in jsonObject)
|
|
309
|
+
{
|
|
310
|
+
model.eventsNotAccurateReason = (function(){
|
|
311
|
+
if(jsonObject['eventsNotAccurateReason'] === null)
|
|
312
|
+
{
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if(typeof jsonObject['eventsNotAccurateReason'] !== 'string')
|
|
317
|
+
{
|
|
318
|
+
return String(jsonObject['eventsNotAccurateReason']);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return jsonObject['eventsNotAccurateReason'];
|
|
322
|
+
}());
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if('freshPackSoftSortApi' in jsonObject)
|
|
326
|
+
{
|
|
327
|
+
model.freshPackSoftSortApi = (function(){
|
|
328
|
+
if(jsonObject['freshPackSoftSortApi'] === null)
|
|
329
|
+
{
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if(typeof jsonObject['freshPackSoftSortApi'] !== 'object')
|
|
334
|
+
{
|
|
335
|
+
return Object(jsonObject['freshPackSoftSortApi']);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
return jsonObject['freshPackSoftSortApi'];
|
|
339
|
+
}());
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if('deleted' in jsonObject)
|
|
343
|
+
{
|
|
344
|
+
model.deleted = (function(){
|
|
345
|
+
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
346
|
+
{
|
|
347
|
+
return Boolean(jsonObject['deleted']);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return jsonObject['deleted'];
|
|
351
|
+
}());
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
if('updateTimestamp' in jsonObject)
|
|
355
|
+
{
|
|
356
|
+
model.updateTimestamp = (function(){
|
|
357
|
+
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
358
|
+
{
|
|
359
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
363
|
+
}());
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
return model;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export default SoftSortPackrunSummaryModel;
|
|
@@ -31,6 +31,7 @@ import ShiftModel from './ShiftModel';
|
|
|
31
31
|
import ShiftQualitySummaryModel from './ShiftQualitySummaryModel';
|
|
32
32
|
import ShiftTaskModel from './ShiftTaskModel';
|
|
33
33
|
import SoftSortBeltModel from './SoftSortBeltModel';
|
|
34
|
+
import SoftSortPackrunSummaryModel from './SoftSortPackrunSummaryModel';
|
|
34
35
|
import VarietyModel from './VarietyModel';
|
|
35
36
|
|
|
36
37
|
const Site = {
|
|
@@ -58,6 +59,7 @@ const Site = {
|
|
|
58
59
|
ShiftQualitySummaryModel,
|
|
59
60
|
ShiftTaskModel,
|
|
60
61
|
SoftSortBeltModel,
|
|
62
|
+
SoftSortPackrunSummaryModel,
|
|
61
63
|
VarietyModel,
|
|
62
64
|
};
|
|
63
65
|
|
package/src/PackageVersion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '2.3.
|
|
2
|
+
export const version = '2.3.6';
|