@ricado/api-client 2.3.11 → 2.3.14
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/ProductionDataExportController.js +4110 -0
- package/lib/Controllers/Packhouse/Site/ShiftSummaryReportController.js +908 -0
- package/lib/Controllers/Packhouse/Site/index.js +3 -0
- package/lib/Controllers/Packhouse/index.js +3 -0
- package/lib/Models/Packhouse/Site/ShiftSummaryReportModel.js +427 -0
- package/lib/Models/Packhouse/Site/index.js +3 -0
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +1881 -301
- package/package.json +1 -1
- package/src/Controllers/Packhouse/ProductionDataExportController.js +5247 -0
- package/src/Controllers/Packhouse/Site/ShiftSummaryReportController.js +1039 -0
- package/src/Controllers/Packhouse/Site/index.js +2 -0
- package/src/Controllers/Packhouse/index.js +2 -0
- package/src/Models/Packhouse/Site/ShiftSummaryReportModel.js +451 -0
- package/src/Models/Packhouse/Site/index.js +2 -0
- package/src/PackageVersion.js +1 -1
|
@@ -34,6 +34,7 @@ import ShiftController from './ShiftController';
|
|
|
34
34
|
import ShiftFocusMeetingController from './ShiftFocusMeetingController';
|
|
35
35
|
import ShiftHourlyEntryController from './ShiftHourlyEntryController';
|
|
36
36
|
import ShiftQualitySummaryController from './ShiftQualitySummaryController';
|
|
37
|
+
import ShiftSummaryReportController from './ShiftSummaryReportController';
|
|
37
38
|
import ShiftTaskController from './ShiftTaskController';
|
|
38
39
|
import SoftSortBeltController from './SoftSortBeltController';
|
|
39
40
|
import SoftSortPackrunSummaryController from './SoftSortPackrunSummaryController';
|
|
@@ -67,6 +68,7 @@ const Site = {
|
|
|
67
68
|
ShiftFocusMeetingController,
|
|
68
69
|
ShiftHourlyEntryController,
|
|
69
70
|
ShiftQualitySummaryController,
|
|
71
|
+
ShiftSummaryReportController,
|
|
70
72
|
ShiftTaskController,
|
|
71
73
|
SoftSortBeltController,
|
|
72
74
|
SoftSortPackrunSummaryController,
|
|
@@ -0,0 +1,451 @@
|
|
|
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 Summary Report
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @extends BaseModel
|
|
15
|
+
*/
|
|
16
|
+
class ShiftSummaryReportModel extends BaseModel
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* ShiftSummaryReportModel Constructor
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Shift Summary Report
|
|
23
|
+
*/
|
|
24
|
+
constructor(siteId)
|
|
25
|
+
{
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The Shift Summary Report ID
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
this.id = "";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The Packing Line ID this Summary Report is associated with
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
this.packingLineId = "";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Shift ID this Summary Report relates to
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
this.shiftId = "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* When this Summary Report was Created
|
|
54
|
+
*
|
|
55
|
+
* @type {Date}
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
this.createdTimestamp = new Date();
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The Base64 Encoded PDF Report
|
|
62
|
+
*
|
|
63
|
+
* @type {?string}
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
this.pdfReportContent = null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The Filename that should be used with the PDF Report
|
|
70
|
+
*
|
|
71
|
+
* @type {?string}
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
this.pdfReportFileName = null;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The SendGrid API Status indicating progress when sending emails
|
|
78
|
+
*
|
|
79
|
+
* @type {?{requestCount: number, requestTimestamp: ?Date, responseCode: ?number, responseMessage: ?string, completed: boolean}}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.sendGridApi = null;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Whether the Report is in the process of being Emailed
|
|
86
|
+
*
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
this.status = "";
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* An Array of Email Contacts that were sent this Summary Report
|
|
94
|
+
*
|
|
95
|
+
* @type {Array<{email: string, firstName: string, lastName: string}>}
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
this.emailContacts = [];
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Whether the Shift Summary Report has been deleted
|
|
102
|
+
*
|
|
103
|
+
* @type {boolean}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.deleted = false;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* When the Shift Summary Report was last updated
|
|
110
|
+
*
|
|
111
|
+
* @type {Date}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.updateTimestamp = new Date();
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The Site ID associated with this Shift Summary Report
|
|
118
|
+
*
|
|
119
|
+
* @type {number}
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
this.siteId = siteId;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Create a new **ShiftSummaryReportModel** from a JSON Object or JSON String
|
|
127
|
+
*
|
|
128
|
+
* @static
|
|
129
|
+
* @public
|
|
130
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
131
|
+
* @param {number} siteId The Site ID associated with this Shift Summary Report
|
|
132
|
+
* @return {ShiftSummaryReportModel}
|
|
133
|
+
*/
|
|
134
|
+
static fromJSON(json, siteId)
|
|
135
|
+
{
|
|
136
|
+
let model = new ShiftSummaryReportModel(siteId);
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The JSON Object
|
|
140
|
+
*
|
|
141
|
+
* @type {Object<string, any>}
|
|
142
|
+
*/
|
|
143
|
+
let jsonObject = {};
|
|
144
|
+
|
|
145
|
+
if(typeof json === 'string')
|
|
146
|
+
{
|
|
147
|
+
jsonObject = JSON.parse(json);
|
|
148
|
+
}
|
|
149
|
+
else if(typeof json === 'object')
|
|
150
|
+
{
|
|
151
|
+
jsonObject = json;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if('id' in jsonObject)
|
|
155
|
+
{
|
|
156
|
+
model.id = (function(){
|
|
157
|
+
if(typeof jsonObject['id'] !== 'string')
|
|
158
|
+
{
|
|
159
|
+
return String(jsonObject['id']);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return jsonObject['id'];
|
|
163
|
+
}());
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if('packingLineId' in jsonObject)
|
|
167
|
+
{
|
|
168
|
+
model.packingLineId = (function(){
|
|
169
|
+
if(typeof jsonObject['packingLineId'] !== 'string')
|
|
170
|
+
{
|
|
171
|
+
return String(jsonObject['packingLineId']);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return jsonObject['packingLineId'];
|
|
175
|
+
}());
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if('shiftId' in jsonObject)
|
|
179
|
+
{
|
|
180
|
+
model.shiftId = (function(){
|
|
181
|
+
if(typeof jsonObject['shiftId'] !== 'string')
|
|
182
|
+
{
|
|
183
|
+
return String(jsonObject['shiftId']);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return jsonObject['shiftId'];
|
|
187
|
+
}());
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if('createdTimestamp' in jsonObject)
|
|
191
|
+
{
|
|
192
|
+
model.createdTimestamp = (function(){
|
|
193
|
+
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
194
|
+
{
|
|
195
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
199
|
+
}());
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if('pdfReportContent' in jsonObject)
|
|
203
|
+
{
|
|
204
|
+
model.pdfReportContent = (function(){
|
|
205
|
+
if(jsonObject['pdfReportContent'] === null)
|
|
206
|
+
{
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if(typeof jsonObject['pdfReportContent'] !== 'string')
|
|
211
|
+
{
|
|
212
|
+
return String(jsonObject['pdfReportContent']);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return jsonObject['pdfReportContent'];
|
|
216
|
+
}());
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if('pdfReportFileName' in jsonObject)
|
|
220
|
+
{
|
|
221
|
+
model.pdfReportFileName = (function(){
|
|
222
|
+
if(jsonObject['pdfReportFileName'] === null)
|
|
223
|
+
{
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if(typeof jsonObject['pdfReportFileName'] !== 'string')
|
|
228
|
+
{
|
|
229
|
+
return String(jsonObject['pdfReportFileName']);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return jsonObject['pdfReportFileName'];
|
|
233
|
+
}());
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if('sendGridApi' in jsonObject)
|
|
237
|
+
{
|
|
238
|
+
model.sendGridApi = (function(){
|
|
239
|
+
if(jsonObject['sendGridApi'] === null)
|
|
240
|
+
{
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
let sendGridApiObject = {};
|
|
245
|
+
|
|
246
|
+
if(typeof jsonObject['sendGridApi'] === 'object' && 'requestCount' in jsonObject['sendGridApi'])
|
|
247
|
+
{
|
|
248
|
+
sendGridApiObject.requestCount = (function(){
|
|
249
|
+
if(typeof jsonObject['sendGridApi'].requestCount !== 'number')
|
|
250
|
+
{
|
|
251
|
+
return Number.isInteger(Number(jsonObject['sendGridApi'].requestCount)) ? Number(jsonObject['sendGridApi'].requestCount) : Math.floor(Number(jsonObject['sendGridApi'].requestCount));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return Number.isInteger(jsonObject['sendGridApi'].requestCount) ? jsonObject['sendGridApi'].requestCount : Math.floor(jsonObject['sendGridApi'].requestCount);
|
|
255
|
+
}());
|
|
256
|
+
}
|
|
257
|
+
else
|
|
258
|
+
{
|
|
259
|
+
sendGridApiObject.requestCount = 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if(typeof jsonObject['sendGridApi'] === 'object' && 'requestTimestamp' in jsonObject['sendGridApi'])
|
|
263
|
+
{
|
|
264
|
+
sendGridApiObject.requestTimestamp = (function(){
|
|
265
|
+
if(jsonObject['sendGridApi'].requestTimestamp === null)
|
|
266
|
+
{
|
|
267
|
+
return null;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if(typeof jsonObject['sendGridApi'].requestTimestamp !== 'string')
|
|
271
|
+
{
|
|
272
|
+
return new Date(String(jsonObject['sendGridApi'].requestTimestamp));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return new Date(jsonObject['sendGridApi'].requestTimestamp);
|
|
276
|
+
}());
|
|
277
|
+
}
|
|
278
|
+
else
|
|
279
|
+
{
|
|
280
|
+
sendGridApiObject.requestTimestamp = null;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if(typeof jsonObject['sendGridApi'] === 'object' && 'responseCode' in jsonObject['sendGridApi'])
|
|
284
|
+
{
|
|
285
|
+
sendGridApiObject.responseCode = (function(){
|
|
286
|
+
if(jsonObject['sendGridApi'].responseCode === null)
|
|
287
|
+
{
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if(typeof jsonObject['sendGridApi'].responseCode !== 'number')
|
|
292
|
+
{
|
|
293
|
+
return Number.isInteger(Number(jsonObject['sendGridApi'].responseCode)) ? Number(jsonObject['sendGridApi'].responseCode) : Math.floor(Number(jsonObject['sendGridApi'].responseCode));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return Number.isInteger(jsonObject['sendGridApi'].responseCode) ? jsonObject['sendGridApi'].responseCode : Math.floor(jsonObject['sendGridApi'].responseCode);
|
|
297
|
+
}());
|
|
298
|
+
}
|
|
299
|
+
else
|
|
300
|
+
{
|
|
301
|
+
sendGridApiObject.responseCode = null;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if(typeof jsonObject['sendGridApi'] === 'object' && 'responseMessage' in jsonObject['sendGridApi'])
|
|
305
|
+
{
|
|
306
|
+
sendGridApiObject.responseMessage = (function(){
|
|
307
|
+
if(jsonObject['sendGridApi'].responseMessage === null)
|
|
308
|
+
{
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
if(typeof jsonObject['sendGridApi'].responseMessage !== 'string')
|
|
313
|
+
{
|
|
314
|
+
return String(jsonObject['sendGridApi'].responseMessage);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return jsonObject['sendGridApi'].responseMessage;
|
|
318
|
+
}());
|
|
319
|
+
}
|
|
320
|
+
else
|
|
321
|
+
{
|
|
322
|
+
sendGridApiObject.responseMessage = null;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if(typeof jsonObject['sendGridApi'] === 'object' && 'completed' in jsonObject['sendGridApi'])
|
|
326
|
+
{
|
|
327
|
+
sendGridApiObject.completed = (function(){
|
|
328
|
+
if(typeof jsonObject['sendGridApi'].completed !== 'boolean')
|
|
329
|
+
{
|
|
330
|
+
return Boolean(jsonObject['sendGridApi'].completed);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return jsonObject['sendGridApi'].completed;
|
|
334
|
+
}());
|
|
335
|
+
}
|
|
336
|
+
else
|
|
337
|
+
{
|
|
338
|
+
sendGridApiObject.completed = false;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
return sendGridApiObject;
|
|
342
|
+
}());
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if('status' in jsonObject)
|
|
346
|
+
{
|
|
347
|
+
model.status = (function(){
|
|
348
|
+
if(typeof jsonObject['status'] !== 'string')
|
|
349
|
+
{
|
|
350
|
+
return String(jsonObject['status']);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
return jsonObject['status'];
|
|
354
|
+
}());
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if('emailContacts' in jsonObject)
|
|
358
|
+
{
|
|
359
|
+
model.emailContacts = (function(){
|
|
360
|
+
if(Array.isArray(jsonObject['emailContacts']) !== true)
|
|
361
|
+
{
|
|
362
|
+
return [];
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return jsonObject['emailContacts'].map((emailContactsItem) => {
|
|
366
|
+
return (function(){
|
|
367
|
+
let emailContactsItemObject = {};
|
|
368
|
+
|
|
369
|
+
if(typeof emailContactsItem === 'object' && 'email' in emailContactsItem)
|
|
370
|
+
{
|
|
371
|
+
emailContactsItemObject.email = (function(){
|
|
372
|
+
if(typeof emailContactsItem.email !== 'string')
|
|
373
|
+
{
|
|
374
|
+
return String(emailContactsItem.email);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
return emailContactsItem.email;
|
|
378
|
+
}());
|
|
379
|
+
}
|
|
380
|
+
else
|
|
381
|
+
{
|
|
382
|
+
emailContactsItemObject.email = "";
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if(typeof emailContactsItem === 'object' && 'firstName' in emailContactsItem)
|
|
386
|
+
{
|
|
387
|
+
emailContactsItemObject.firstName = (function(){
|
|
388
|
+
if(typeof emailContactsItem.firstName !== 'string')
|
|
389
|
+
{
|
|
390
|
+
return String(emailContactsItem.firstName);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return emailContactsItem.firstName;
|
|
394
|
+
}());
|
|
395
|
+
}
|
|
396
|
+
else
|
|
397
|
+
{
|
|
398
|
+
emailContactsItemObject.firstName = "";
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
if(typeof emailContactsItem === 'object' && 'lastName' in emailContactsItem)
|
|
402
|
+
{
|
|
403
|
+
emailContactsItemObject.lastName = (function(){
|
|
404
|
+
if(typeof emailContactsItem.lastName !== 'string')
|
|
405
|
+
{
|
|
406
|
+
return String(emailContactsItem.lastName);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
return emailContactsItem.lastName;
|
|
410
|
+
}());
|
|
411
|
+
}
|
|
412
|
+
else
|
|
413
|
+
{
|
|
414
|
+
emailContactsItemObject.lastName = "";
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return emailContactsItemObject;
|
|
418
|
+
}());
|
|
419
|
+
});
|
|
420
|
+
}());
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if('deleted' in jsonObject)
|
|
424
|
+
{
|
|
425
|
+
model.deleted = (function(){
|
|
426
|
+
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
427
|
+
{
|
|
428
|
+
return Boolean(jsonObject['deleted']);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return jsonObject['deleted'];
|
|
432
|
+
}());
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if('updateTimestamp' in jsonObject)
|
|
436
|
+
{
|
|
437
|
+
model.updateTimestamp = (function(){
|
|
438
|
+
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
439
|
+
{
|
|
440
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
444
|
+
}());
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return model;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export default ShiftSummaryReportModel;
|
|
@@ -34,6 +34,7 @@ import ShiftFocusMeetingModel from './ShiftFocusMeetingModel';
|
|
|
34
34
|
import ShiftHourlyEntryModel from './ShiftHourlyEntryModel';
|
|
35
35
|
import ShiftModel from './ShiftModel';
|
|
36
36
|
import ShiftQualitySummaryModel from './ShiftQualitySummaryModel';
|
|
37
|
+
import ShiftSummaryReportModel from './ShiftSummaryReportModel';
|
|
37
38
|
import ShiftTaskModel from './ShiftTaskModel';
|
|
38
39
|
import SoftSortBeltModel from './SoftSortBeltModel';
|
|
39
40
|
import SoftSortPackrunSummaryModel from './SoftSortPackrunSummaryModel';
|
|
@@ -67,6 +68,7 @@ const Site = {
|
|
|
67
68
|
ShiftHourlyEntryModel,
|
|
68
69
|
ShiftModel,
|
|
69
70
|
ShiftQualitySummaryModel,
|
|
71
|
+
ShiftSummaryReportModel,
|
|
70
72
|
ShiftTaskModel,
|
|
71
73
|
SoftSortBeltModel,
|
|
72
74
|
SoftSortPackrunSummaryModel,
|
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.14';
|