@ricado/api-client 2.2.0 → 2.3.2
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/BinTipBinController.js +267 -0
- package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +267 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +267 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +267 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +267 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +267 -0
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +267 -0
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +267 -0
- package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +267 -0
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +4 -0
- package/lib/Controllers/Packhouse/Site/PackrunController.js +267 -0
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +267 -0
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +267 -0
- package/lib/Controllers/Packhouse/Site/ShiftController.js +267 -0
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +267 -0
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +267 -0
- package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +267 -0
- package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +267 -0
- package/lib/Controllers/Site/PermanentObjectDataController.js +267 -0
- package/lib/DataItems/PointValueItem.js +3 -3
- package/lib/Models/AccountPolicyModel.js +7 -7
- package/lib/Models/ApiAccountModel.js +7 -7
- package/lib/Models/CompanyModel.js +5 -5
- package/lib/Models/FirebaseTokenModel.js +8 -8
- package/lib/Models/Packhouse/Site/BinTipBinModel.js +13 -13
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +14 -14
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
- package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +10 -10
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
- package/lib/Models/Packhouse/Site/PackTypeModel.js +8 -8
- package/lib/Models/Packhouse/Site/PackingLineModel.js +60 -16
- package/lib/Models/Packhouse/Site/PackrunModel.js +18 -18
- package/lib/Models/Packhouse/Site/RejectBinModel.js +9 -9
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +44 -44
- package/lib/Models/Packhouse/Site/ShiftModel.js +26 -19
- package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +14 -14
- package/lib/Models/Packhouse/Site/ShiftTaskModel.js +14 -14
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
- package/lib/Models/Packhouse/Site/VarietyModel.js +8 -8
- package/lib/Models/RTUModel.js +6 -6
- package/lib/Models/RTUPluginModel.js +5 -5
- package/lib/Models/Site/AlarmGroupModel.js +7 -7
- package/lib/Models/Site/AlarmModel.js +17 -17
- package/lib/Models/Site/DefinitionModel.js +6 -6
- package/lib/Models/Site/PermanentObjectDataModel.js +8 -8
- package/lib/Models/Site/PermanentObjectModel.js +7 -7
- package/lib/Models/Site/PointModel.js +11 -11
- package/lib/Models/Site/TemporaryObjectModel.js +6 -6
- package/lib/Models/SiteModel.js +6 -6
- package/lib/Models/TokenModel.js +10 -10
- package/lib/Models/UserAccountActionTokenModel.js +11 -11
- package/lib/Models/UserAccountModel.js +10 -10
- package/lib/PackageVersion.js +1 -1
- package/lib/Points.js +22 -12
- package/lib/WebSocketHelper.js +29 -13
- package/lib/index.d.ts +715 -361
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipBinController.js +355 -0
- package/src/Controllers/Packhouse/Site/BinTipWeightController.js +355 -0
- package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +355 -0
- package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +355 -0
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +355 -0
- package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +355 -0
- package/src/Controllers/Packhouse/Site/DowntimeEventController.js +355 -0
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +355 -0
- package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +355 -0
- package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -0
- package/src/Controllers/Packhouse/Site/PackrunController.js +355 -0
- package/src/Controllers/Packhouse/Site/RejectBinController.js +355 -0
- package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +355 -0
- package/src/Controllers/Packhouse/Site/ShiftController.js +355 -0
- package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +355 -0
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +355 -0
- package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +355 -0
- package/src/Controllers/Packhouse/Site/ShiftTaskController.js +355 -0
- package/src/Controllers/Site/PermanentObjectDataController.js +355 -0
- package/src/DataItems/PointValueItem.js +3 -3
- package/src/Models/AccountPolicyModel.js +7 -7
- package/src/Models/ApiAccountModel.js +7 -7
- package/src/Models/CompanyModel.js +5 -5
- package/src/Models/FirebaseTokenModel.js +8 -8
- package/src/Models/Packhouse/Site/BinTipBinModel.js +13 -13
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
- package/src/Models/Packhouse/Site/CompacSizerModel.js +14 -14
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
- package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +10 -10
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
- package/src/Models/Packhouse/Site/PackTypeModel.js +8 -8
- package/src/Models/Packhouse/Site/PackingLineModel.js +66 -16
- package/src/Models/Packhouse/Site/PackrunModel.js +18 -18
- package/src/Models/Packhouse/Site/RejectBinModel.js +9 -9
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +44 -44
- package/src/Models/Packhouse/Site/ShiftModel.js +29 -19
- package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +14 -14
- package/src/Models/Packhouse/Site/ShiftTaskModel.js +14 -14
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
- package/src/Models/Packhouse/Site/VarietyModel.js +8 -8
- package/src/Models/RTUModel.js +6 -6
- package/src/Models/RTUPluginModel.js +5 -5
- package/src/Models/Site/AlarmGroupModel.js +7 -7
- package/src/Models/Site/AlarmModel.js +17 -17
- package/src/Models/Site/DefinitionModel.js +6 -6
- package/src/Models/Site/PermanentObjectDataModel.js +8 -8
- package/src/Models/Site/PermanentObjectModel.js +7 -7
- package/src/Models/Site/PointModel.js +11 -11
- package/src/Models/Site/TemporaryObjectModel.js +6 -6
- package/src/Models/SiteModel.js +6 -6
- package/src/Models/TokenModel.js +10 -10
- package/src/Models/UserAccountActionTokenModel.js +11 -11
- package/src/Models/UserAccountModel.js +10 -10
- package/src/PackageVersion.js +1 -1
- package/src/Points.js +24 -12
- package/src/WebSocketHelper.js +34 -13
- package/src/index.js +3 -3
- package/types/tslint.json +2 -1
|
@@ -125,6 +125,92 @@ class PermanentObjectDataController
|
|
|
125
125
|
resultItemObject.id = "";
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
if(typeof resultItem === 'object' && 'userAccount' in resultItem)
|
|
129
|
+
{
|
|
130
|
+
resultItemObject.userAccount = (function(){
|
|
131
|
+
let userAccountObject = {};
|
|
132
|
+
|
|
133
|
+
if(typeof resultItem.userAccount === 'object' && 'id' in resultItem.userAccount)
|
|
134
|
+
{
|
|
135
|
+
userAccountObject.id = (function(){
|
|
136
|
+
if(resultItem.userAccount.id === null)
|
|
137
|
+
{
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if(typeof resultItem.userAccount.id !== 'string')
|
|
142
|
+
{
|
|
143
|
+
return String(resultItem.userAccount.id);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return resultItem.userAccount.id;
|
|
147
|
+
}());
|
|
148
|
+
}
|
|
149
|
+
else
|
|
150
|
+
{
|
|
151
|
+
userAccountObject.id = null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if(typeof resultItem.userAccount === 'object' && 'firstName' in resultItem.userAccount)
|
|
155
|
+
{
|
|
156
|
+
userAccountObject.firstName = (function(){
|
|
157
|
+
if(resultItem.userAccount.firstName === null)
|
|
158
|
+
{
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if(typeof resultItem.userAccount.firstName !== 'string')
|
|
163
|
+
{
|
|
164
|
+
return String(resultItem.userAccount.firstName);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return resultItem.userAccount.firstName;
|
|
168
|
+
}());
|
|
169
|
+
}
|
|
170
|
+
else
|
|
171
|
+
{
|
|
172
|
+
userAccountObject.firstName = null;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if(typeof resultItem.userAccount === 'object' && 'lastName' in resultItem.userAccount)
|
|
176
|
+
{
|
|
177
|
+
userAccountObject.lastName = (function(){
|
|
178
|
+
if(resultItem.userAccount.lastName === null)
|
|
179
|
+
{
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if(typeof resultItem.userAccount.lastName !== 'string')
|
|
184
|
+
{
|
|
185
|
+
return String(resultItem.userAccount.lastName);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return resultItem.userAccount.lastName;
|
|
189
|
+
}());
|
|
190
|
+
}
|
|
191
|
+
else
|
|
192
|
+
{
|
|
193
|
+
userAccountObject.lastName = null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return userAccountObject;
|
|
197
|
+
}());
|
|
198
|
+
}
|
|
199
|
+
else
|
|
200
|
+
{
|
|
201
|
+
resultItemObject.userAccount = (function(){
|
|
202
|
+
let userAccountDefaultValue = {};
|
|
203
|
+
|
|
204
|
+
userAccountDefaultValue.id = null;
|
|
205
|
+
|
|
206
|
+
userAccountDefaultValue.firstName = null;
|
|
207
|
+
|
|
208
|
+
userAccountDefaultValue.lastName = null;
|
|
209
|
+
|
|
210
|
+
return userAccountDefaultValue;
|
|
211
|
+
}());
|
|
212
|
+
}
|
|
213
|
+
|
|
128
214
|
if(typeof resultItem === 'object' && 'content' in resultItem)
|
|
129
215
|
{
|
|
130
216
|
resultItemObject.content = (function(){
|
|
@@ -235,6 +321,92 @@ class PermanentObjectDataController
|
|
|
235
321
|
resultObject.id = "";
|
|
236
322
|
}
|
|
237
323
|
|
|
324
|
+
if(typeof result === 'object' && 'userAccount' in result)
|
|
325
|
+
{
|
|
326
|
+
resultObject.userAccount = (function(){
|
|
327
|
+
let userAccountObject = {};
|
|
328
|
+
|
|
329
|
+
if(typeof result.userAccount === 'object' && 'id' in result.userAccount)
|
|
330
|
+
{
|
|
331
|
+
userAccountObject.id = (function(){
|
|
332
|
+
if(result.userAccount.id === null)
|
|
333
|
+
{
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if(typeof result.userAccount.id !== 'string')
|
|
338
|
+
{
|
|
339
|
+
return String(result.userAccount.id);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
return result.userAccount.id;
|
|
343
|
+
}());
|
|
344
|
+
}
|
|
345
|
+
else
|
|
346
|
+
{
|
|
347
|
+
userAccountObject.id = null;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
if(typeof result.userAccount === 'object' && 'firstName' in result.userAccount)
|
|
351
|
+
{
|
|
352
|
+
userAccountObject.firstName = (function(){
|
|
353
|
+
if(result.userAccount.firstName === null)
|
|
354
|
+
{
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if(typeof result.userAccount.firstName !== 'string')
|
|
359
|
+
{
|
|
360
|
+
return String(result.userAccount.firstName);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
return result.userAccount.firstName;
|
|
364
|
+
}());
|
|
365
|
+
}
|
|
366
|
+
else
|
|
367
|
+
{
|
|
368
|
+
userAccountObject.firstName = null;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
if(typeof result.userAccount === 'object' && 'lastName' in result.userAccount)
|
|
372
|
+
{
|
|
373
|
+
userAccountObject.lastName = (function(){
|
|
374
|
+
if(result.userAccount.lastName === null)
|
|
375
|
+
{
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if(typeof result.userAccount.lastName !== 'string')
|
|
380
|
+
{
|
|
381
|
+
return String(result.userAccount.lastName);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
return result.userAccount.lastName;
|
|
385
|
+
}());
|
|
386
|
+
}
|
|
387
|
+
else
|
|
388
|
+
{
|
|
389
|
+
userAccountObject.lastName = null;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
return userAccountObject;
|
|
393
|
+
}());
|
|
394
|
+
}
|
|
395
|
+
else
|
|
396
|
+
{
|
|
397
|
+
resultObject.userAccount = (function(){
|
|
398
|
+
let userAccountDefaultValue = {};
|
|
399
|
+
|
|
400
|
+
userAccountDefaultValue.id = null;
|
|
401
|
+
|
|
402
|
+
userAccountDefaultValue.firstName = null;
|
|
403
|
+
|
|
404
|
+
userAccountDefaultValue.lastName = null;
|
|
405
|
+
|
|
406
|
+
return userAccountDefaultValue;
|
|
407
|
+
}());
|
|
408
|
+
}
|
|
409
|
+
|
|
238
410
|
if(typeof result === 'object' && 'content' in result)
|
|
239
411
|
{
|
|
240
412
|
resultObject.content = (function(){
|
|
@@ -343,6 +515,92 @@ class PermanentObjectDataController
|
|
|
343
515
|
resultObject.id = "";
|
|
344
516
|
}
|
|
345
517
|
|
|
518
|
+
if(typeof result === 'object' && 'userAccount' in result)
|
|
519
|
+
{
|
|
520
|
+
resultObject.userAccount = (function(){
|
|
521
|
+
let userAccountObject = {};
|
|
522
|
+
|
|
523
|
+
if(typeof result.userAccount === 'object' && 'id' in result.userAccount)
|
|
524
|
+
{
|
|
525
|
+
userAccountObject.id = (function(){
|
|
526
|
+
if(result.userAccount.id === null)
|
|
527
|
+
{
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if(typeof result.userAccount.id !== 'string')
|
|
532
|
+
{
|
|
533
|
+
return String(result.userAccount.id);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
return result.userAccount.id;
|
|
537
|
+
}());
|
|
538
|
+
}
|
|
539
|
+
else
|
|
540
|
+
{
|
|
541
|
+
userAccountObject.id = null;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
if(typeof result.userAccount === 'object' && 'firstName' in result.userAccount)
|
|
545
|
+
{
|
|
546
|
+
userAccountObject.firstName = (function(){
|
|
547
|
+
if(result.userAccount.firstName === null)
|
|
548
|
+
{
|
|
549
|
+
return null;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if(typeof result.userAccount.firstName !== 'string')
|
|
553
|
+
{
|
|
554
|
+
return String(result.userAccount.firstName);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return result.userAccount.firstName;
|
|
558
|
+
}());
|
|
559
|
+
}
|
|
560
|
+
else
|
|
561
|
+
{
|
|
562
|
+
userAccountObject.firstName = null;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
if(typeof result.userAccount === 'object' && 'lastName' in result.userAccount)
|
|
566
|
+
{
|
|
567
|
+
userAccountObject.lastName = (function(){
|
|
568
|
+
if(result.userAccount.lastName === null)
|
|
569
|
+
{
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
if(typeof result.userAccount.lastName !== 'string')
|
|
574
|
+
{
|
|
575
|
+
return String(result.userAccount.lastName);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
return result.userAccount.lastName;
|
|
579
|
+
}());
|
|
580
|
+
}
|
|
581
|
+
else
|
|
582
|
+
{
|
|
583
|
+
userAccountObject.lastName = null;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
return userAccountObject;
|
|
587
|
+
}());
|
|
588
|
+
}
|
|
589
|
+
else
|
|
590
|
+
{
|
|
591
|
+
resultObject.userAccount = (function(){
|
|
592
|
+
let userAccountDefaultValue = {};
|
|
593
|
+
|
|
594
|
+
userAccountDefaultValue.id = null;
|
|
595
|
+
|
|
596
|
+
userAccountDefaultValue.firstName = null;
|
|
597
|
+
|
|
598
|
+
userAccountDefaultValue.lastName = null;
|
|
599
|
+
|
|
600
|
+
return userAccountDefaultValue;
|
|
601
|
+
}());
|
|
602
|
+
}
|
|
603
|
+
|
|
346
604
|
if(typeof result === 'object' && 'content' in result)
|
|
347
605
|
{
|
|
348
606
|
resultObject.content = (function(){
|
|
@@ -452,6 +710,92 @@ class PermanentObjectDataController
|
|
|
452
710
|
resultObject.id = "";
|
|
453
711
|
}
|
|
454
712
|
|
|
713
|
+
if(typeof result === 'object' && 'userAccount' in result)
|
|
714
|
+
{
|
|
715
|
+
resultObject.userAccount = (function(){
|
|
716
|
+
let userAccountObject = {};
|
|
717
|
+
|
|
718
|
+
if(typeof result.userAccount === 'object' && 'id' in result.userAccount)
|
|
719
|
+
{
|
|
720
|
+
userAccountObject.id = (function(){
|
|
721
|
+
if(result.userAccount.id === null)
|
|
722
|
+
{
|
|
723
|
+
return null;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
if(typeof result.userAccount.id !== 'string')
|
|
727
|
+
{
|
|
728
|
+
return String(result.userAccount.id);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
return result.userAccount.id;
|
|
732
|
+
}());
|
|
733
|
+
}
|
|
734
|
+
else
|
|
735
|
+
{
|
|
736
|
+
userAccountObject.id = null;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
if(typeof result.userAccount === 'object' && 'firstName' in result.userAccount)
|
|
740
|
+
{
|
|
741
|
+
userAccountObject.firstName = (function(){
|
|
742
|
+
if(result.userAccount.firstName === null)
|
|
743
|
+
{
|
|
744
|
+
return null;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
if(typeof result.userAccount.firstName !== 'string')
|
|
748
|
+
{
|
|
749
|
+
return String(result.userAccount.firstName);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
return result.userAccount.firstName;
|
|
753
|
+
}());
|
|
754
|
+
}
|
|
755
|
+
else
|
|
756
|
+
{
|
|
757
|
+
userAccountObject.firstName = null;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
if(typeof result.userAccount === 'object' && 'lastName' in result.userAccount)
|
|
761
|
+
{
|
|
762
|
+
userAccountObject.lastName = (function(){
|
|
763
|
+
if(result.userAccount.lastName === null)
|
|
764
|
+
{
|
|
765
|
+
return null;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
if(typeof result.userAccount.lastName !== 'string')
|
|
769
|
+
{
|
|
770
|
+
return String(result.userAccount.lastName);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
return result.userAccount.lastName;
|
|
774
|
+
}());
|
|
775
|
+
}
|
|
776
|
+
else
|
|
777
|
+
{
|
|
778
|
+
userAccountObject.lastName = null;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
return userAccountObject;
|
|
782
|
+
}());
|
|
783
|
+
}
|
|
784
|
+
else
|
|
785
|
+
{
|
|
786
|
+
resultObject.userAccount = (function(){
|
|
787
|
+
let userAccountDefaultValue = {};
|
|
788
|
+
|
|
789
|
+
userAccountDefaultValue.id = null;
|
|
790
|
+
|
|
791
|
+
userAccountDefaultValue.firstName = null;
|
|
792
|
+
|
|
793
|
+
userAccountDefaultValue.lastName = null;
|
|
794
|
+
|
|
795
|
+
return userAccountDefaultValue;
|
|
796
|
+
}());
|
|
797
|
+
}
|
|
798
|
+
|
|
455
799
|
if(typeof result === 'object' && 'content' in result)
|
|
456
800
|
{
|
|
457
801
|
resultObject.content = (function(){
|
|
@@ -642,11 +986,22 @@ export default PermanentObjectDataController;
|
|
|
642
986
|
* @memberof Controllers.Site
|
|
643
987
|
*/
|
|
644
988
|
|
|
989
|
+
/**
|
|
990
|
+
* A **UserAccount** Type
|
|
991
|
+
*
|
|
992
|
+
* @typedef {Object} PermanentObjectDataController.UserAccount
|
|
993
|
+
* @property {?string} id The User Account ID
|
|
994
|
+
* @property {?string} firstName The User's First Name
|
|
995
|
+
* @property {?string} lastName The User's Last Name
|
|
996
|
+
* @memberof Controllers.Site
|
|
997
|
+
*/
|
|
998
|
+
|
|
645
999
|
/**
|
|
646
1000
|
* A **CommentItem** Type
|
|
647
1001
|
*
|
|
648
1002
|
* @typedef {Object} PermanentObjectDataController.CommentItem
|
|
649
1003
|
* @property {string} id The Comment ID
|
|
1004
|
+
* @property {PermanentObjectDataController.UserAccount} userAccount
|
|
650
1005
|
* @property {?string} content The Content of the Comment
|
|
651
1006
|
* @property {?Date} createdTimestamp When the Comment was Created
|
|
652
1007
|
* @property {?Date} updatedTimestamp When the Comment was last Updated
|
|
@@ -25,7 +25,7 @@ class PointValueItem
|
|
|
25
25
|
* @type {number}
|
|
26
26
|
* @private
|
|
27
27
|
*/
|
|
28
|
-
this._id =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
81
|
+
this.updateTimestamp = new Date();
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -30,7 +30,7 @@ class CompanyModel extends BaseModel
|
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
|
-
this.id =
|
|
33
|
+
this.id = "";
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* The Company Display Name
|
|
@@ -38,7 +38,7 @@ class CompanyModel extends BaseModel
|
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
|
-
this.displayName =
|
|
41
|
+
this.displayName = "";
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* The Company Legal Name
|
|
@@ -46,7 +46,7 @@ class CompanyModel extends BaseModel
|
|
|
46
46
|
* @type {string}
|
|
47
47
|
* @public
|
|
48
48
|
*/
|
|
49
|
-
this.legalName =
|
|
49
|
+
this.legalName = "";
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Whether the Company has been deleted
|
|
@@ -54,7 +54,7 @@ class CompanyModel extends BaseModel
|
|
|
54
54
|
* @type {boolean}
|
|
55
55
|
* @public
|
|
56
56
|
*/
|
|
57
|
-
this.deleted =
|
|
57
|
+
this.deleted = false;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* When the Company was last updated
|
|
@@ -62,7 +62,7 @@ class CompanyModel extends BaseModel
|
|
|
62
62
|
* @type {Date}
|
|
63
63
|
* @public
|
|
64
64
|
*/
|
|
65
|
-
this.updateTimestamp =
|
|
65
|
+
this.updateTimestamp = new Date();
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
@@ -30,7 +30,7 @@ class FirebaseTokenModel extends BaseModel
|
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
|
-
this.id =
|
|
33
|
+
this.id = "";
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* The Account this Firebase Token belongs to
|
|
@@ -38,7 +38,7 @@ class FirebaseTokenModel extends BaseModel
|
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
|
-
this.accountId =
|
|
41
|
+
this.accountId = "";
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* The Firebase Token
|
|
@@ -46,7 +46,7 @@ class FirebaseTokenModel extends BaseModel
|
|
|
46
46
|
* @type {string}
|
|
47
47
|
* @public
|
|
48
48
|
*/
|
|
49
|
-
this.token =
|
|
49
|
+
this.token = "";
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Whether the Firebase Token should receive Notifications
|
|
@@ -54,7 +54,7 @@ class FirebaseTokenModel extends BaseModel
|
|
|
54
54
|
* @type {boolean}
|
|
55
55
|
* @public
|
|
56
56
|
*/
|
|
57
|
-
this.enabled =
|
|
57
|
+
this.enabled = false;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* The Device Name
|
|
@@ -62,7 +62,7 @@ class FirebaseTokenModel extends BaseModel
|
|
|
62
62
|
* @type {string}
|
|
63
63
|
* @public
|
|
64
64
|
*/
|
|
65
|
-
this.deviceName =
|
|
65
|
+
this.deviceName = "";
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* The Device Platform
|
|
@@ -70,7 +70,7 @@ class FirebaseTokenModel extends BaseModel
|
|
|
70
70
|
* @type {string}
|
|
71
71
|
* @public
|
|
72
72
|
*/
|
|
73
|
-
this.devicePlatform =
|
|
73
|
+
this.devicePlatform = "";
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Whether the Firebase Token has been deleted
|
|
@@ -78,7 +78,7 @@ class FirebaseTokenModel extends BaseModel
|
|
|
78
78
|
* @type {boolean}
|
|
79
79
|
* @public
|
|
80
80
|
*/
|
|
81
|
-
this.deleted =
|
|
81
|
+
this.deleted = false;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* When the Firebase Token was last updated
|
|
@@ -86,7 +86,7 @@ class FirebaseTokenModel extends BaseModel
|
|
|
86
86
|
* @type {Date}
|
|
87
87
|
* @public
|
|
88
88
|
*/
|
|
89
|
-
this.updateTimestamp =
|
|
89
|
+
this.updateTimestamp = new Date();
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/**
|