@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
@@ -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,10 +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';
29
33
  import SoftSortBeltController from './SoftSortBeltController';
30
34
  import VarietyController from './VarietyController';
31
35
 
32
36
  const Site = {
37
+ BinTipBinController,
33
38
  BinTipWeightController,
34
39
  CompacSizerBatchController,
35
40
  CompacSizerController,
@@ -39,6 +44,7 @@ const Site = {
39
44
  CompacSizerPackrunSummaryController,
40
45
  DowntimeEventController,
41
46
  FreshPackPackrunSummaryController,
47
+ FreshQualityPackrunSummaryController,
42
48
  GrowingMethodController,
43
49
  PackTypeController,
44
50
  PackingLineController,
@@ -49,6 +55,8 @@ const Site = {
49
55
  ShiftController,
50
56
  ShiftFocusMeetingController,
51
57
  ShiftHourlyEntryController,
58
+ ShiftQualitySummaryController,
59
+ ShiftTaskController,
52
60
  SoftSortBeltController,
53
61
  VarietyController,
54
62
  };
@@ -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
  /**
@@ -30,7 +30,7 @@ class CompanyModel 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 Company Display Name
@@ -38,7 +38,7 @@ class CompanyModel extends BaseModel
38
38
  * @type {string}
39
39
  * @public
40
40
  */
41
- this.displayName = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
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 = undefined;
89
+ this.updateTimestamp = new Date();
90
90
  }
91
91
 
92
92
  /**
@@ -0,0 +1,365 @@
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 Bin Tip Bin
11
+ *
12
+ * @class
13
+ * @hideconstructor
14
+ * @extends BaseModel
15
+ */
16
+ class BinTipBinModel extends BaseModel
17
+ {
18
+ /**
19
+ * BinTipBinModel Constructor
20
+ *
21
+ * @protected
22
+ * @param {number} siteId The Site ID associated with this Bin Tip Bin
23
+ */
24
+ constructor(siteId)
25
+ {
26
+ super();
27
+
28
+ /**
29
+ * The Bin Tip Bin ID
30
+ *
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ this.id = "";
35
+
36
+ /**
37
+ * The Bin Tip ID associated with this Bin
38
+ *
39
+ * @type {string}
40
+ * @public
41
+ */
42
+ this.binTipId = "";
43
+
44
+ /**
45
+ * The Packrun ID associated with this Bin
46
+ *
47
+ * @type {string}
48
+ * @public
49
+ */
50
+ this.packrunId = "";
51
+
52
+ /**
53
+ * When this Bin was Created
54
+ *
55
+ * @type {Date}
56
+ * @public
57
+ */
58
+ this.createdTimestamp = new Date();
59
+
60
+ /**
61
+ * A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
62
+ *
63
+ * @type {?string}
64
+ * @public
65
+ */
66
+ this.binNumber = null;
67
+
68
+ /**
69
+ * The Time Batch ID associated with this Bin
70
+ *
71
+ * @type {?string}
72
+ * @public
73
+ */
74
+ this.timeBatchId = null;
75
+
76
+ /**
77
+ * The Full Weight for this Bin
78
+ *
79
+ * @type {?number}
80
+ * @public
81
+ */
82
+ this.fullWeight = null;
83
+
84
+ /**
85
+ * The Empty Weight for this Bin
86
+ *
87
+ * @type {?number}
88
+ * @public
89
+ */
90
+ this.emptyWeight = null;
91
+
92
+ /**
93
+ * The `BinTipWeight` ID as the Source for the Full Weight of this Bin
94
+ *
95
+ * @type {?string}
96
+ * @public
97
+ */
98
+ this.fullBinWeightId = null;
99
+
100
+ /**
101
+ * The `BinTipWeight` ID as the Source for the Empty Weight of this Bin
102
+ *
103
+ * @type {?string}
104
+ * @public
105
+ */
106
+ this.emptyBinWeightId = null;
107
+
108
+ /**
109
+ * The FreshPack Field Bin Weight API Data
110
+ *
111
+ * @type {?Object}
112
+ * @public
113
+ */
114
+ this.freshPackFieldBinWeightApi = null;
115
+
116
+ /**
117
+ * Whether the Bin Tip Bin has been deleted
118
+ *
119
+ * @type {boolean}
120
+ * @public
121
+ */
122
+ this.deleted = false;
123
+
124
+ /**
125
+ * When the Bin Tip Bin was last updated
126
+ *
127
+ * @type {Date}
128
+ * @public
129
+ */
130
+ this.updateTimestamp = new Date();
131
+
132
+ /**
133
+ * The Site ID associated with this Bin Tip Bin
134
+ *
135
+ * @type {number}
136
+ * @public
137
+ */
138
+ this.siteId = siteId;
139
+ }
140
+
141
+ /**
142
+ * Create a new **BinTipBinModel** from a JSON Object or JSON String
143
+ *
144
+ * @static
145
+ * @public
146
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
147
+ * @param {number} siteId The Site ID associated with this Bin Tip Bin
148
+ * @return {BinTipBinModel}
149
+ */
150
+ static fromJSON(json, siteId)
151
+ {
152
+ let model = new BinTipBinModel(siteId);
153
+
154
+ /**
155
+ * The JSON Object
156
+ *
157
+ * @type {Object<string, any>}
158
+ */
159
+ let jsonObject = {};
160
+
161
+ if(typeof json === 'string')
162
+ {
163
+ jsonObject = JSON.parse(json);
164
+ }
165
+ else if(typeof json === 'object')
166
+ {
167
+ jsonObject = json;
168
+ }
169
+
170
+ if('id' in jsonObject)
171
+ {
172
+ model.id = (function(){
173
+ if(typeof jsonObject['id'] !== 'string')
174
+ {
175
+ return String(jsonObject['id']);
176
+ }
177
+
178
+ return jsonObject['id'];
179
+ }());
180
+ }
181
+
182
+ if('binTipId' in jsonObject)
183
+ {
184
+ model.binTipId = (function(){
185
+ if(typeof jsonObject['binTipId'] !== 'string')
186
+ {
187
+ return String(jsonObject['binTipId']);
188
+ }
189
+
190
+ return jsonObject['binTipId'];
191
+ }());
192
+ }
193
+
194
+ if('packrunId' in jsonObject)
195
+ {
196
+ model.packrunId = (function(){
197
+ if(typeof jsonObject['packrunId'] !== 'string')
198
+ {
199
+ return String(jsonObject['packrunId']);
200
+ }
201
+
202
+ return jsonObject['packrunId'];
203
+ }());
204
+ }
205
+
206
+ if('createdTimestamp' in jsonObject)
207
+ {
208
+ model.createdTimestamp = (function(){
209
+ if(typeof jsonObject['createdTimestamp'] !== 'string')
210
+ {
211
+ return new Date(String(jsonObject['createdTimestamp']));
212
+ }
213
+
214
+ return new Date(jsonObject['createdTimestamp']);
215
+ }());
216
+ }
217
+
218
+ if('binNumber' in jsonObject)
219
+ {
220
+ model.binNumber = (function(){
221
+ if(jsonObject['binNumber'] === null)
222
+ {
223
+ return null;
224
+ }
225
+
226
+ if(typeof jsonObject['binNumber'] !== 'string')
227
+ {
228
+ return String(jsonObject['binNumber']);
229
+ }
230
+
231
+ return jsonObject['binNumber'];
232
+ }());
233
+ }
234
+
235
+ if('timeBatchId' in jsonObject)
236
+ {
237
+ model.timeBatchId = (function(){
238
+ if(jsonObject['timeBatchId'] === null)
239
+ {
240
+ return null;
241
+ }
242
+
243
+ if(typeof jsonObject['timeBatchId'] !== 'string')
244
+ {
245
+ return String(jsonObject['timeBatchId']);
246
+ }
247
+
248
+ return jsonObject['timeBatchId'];
249
+ }());
250
+ }
251
+
252
+ if('fullWeight' in jsonObject)
253
+ {
254
+ model.fullWeight = (function(){
255
+ if(jsonObject['fullWeight'] === null)
256
+ {
257
+ return null;
258
+ }
259
+
260
+ if(typeof jsonObject['fullWeight'] !== 'number')
261
+ {
262
+ return Number(jsonObject['fullWeight']);
263
+ }
264
+
265
+ return jsonObject['fullWeight'];
266
+ }());
267
+ }
268
+
269
+ if('emptyWeight' in jsonObject)
270
+ {
271
+ model.emptyWeight = (function(){
272
+ if(jsonObject['emptyWeight'] === null)
273
+ {
274
+ return null;
275
+ }
276
+
277
+ if(typeof jsonObject['emptyWeight'] !== 'number')
278
+ {
279
+ return Number(jsonObject['emptyWeight']);
280
+ }
281
+
282
+ return jsonObject['emptyWeight'];
283
+ }());
284
+ }
285
+
286
+ if('fullBinWeightId' in jsonObject)
287
+ {
288
+ model.fullBinWeightId = (function(){
289
+ if(jsonObject['fullBinWeightId'] === null)
290
+ {
291
+ return null;
292
+ }
293
+
294
+ if(typeof jsonObject['fullBinWeightId'] !== 'string')
295
+ {
296
+ return String(jsonObject['fullBinWeightId']);
297
+ }
298
+
299
+ return jsonObject['fullBinWeightId'];
300
+ }());
301
+ }
302
+
303
+ if('emptyBinWeightId' in jsonObject)
304
+ {
305
+ model.emptyBinWeightId = (function(){
306
+ if(jsonObject['emptyBinWeightId'] === null)
307
+ {
308
+ return null;
309
+ }
310
+
311
+ if(typeof jsonObject['emptyBinWeightId'] !== 'string')
312
+ {
313
+ return String(jsonObject['emptyBinWeightId']);
314
+ }
315
+
316
+ return jsonObject['emptyBinWeightId'];
317
+ }());
318
+ }
319
+
320
+ if('freshPackFieldBinWeightApi' in jsonObject)
321
+ {
322
+ model.freshPackFieldBinWeightApi = (function(){
323
+ if(jsonObject['freshPackFieldBinWeightApi'] === null)
324
+ {
325
+ return null;
326
+ }
327
+
328
+ if(typeof jsonObject['freshPackFieldBinWeightApi'] !== 'object')
329
+ {
330
+ return Object(jsonObject['freshPackFieldBinWeightApi']);
331
+ }
332
+
333
+ return jsonObject['freshPackFieldBinWeightApi'];
334
+ }());
335
+ }
336
+
337
+ if('deleted' in jsonObject)
338
+ {
339
+ model.deleted = (function(){
340
+ if(typeof jsonObject['deleted'] !== 'boolean')
341
+ {
342
+ return Boolean(jsonObject['deleted']);
343
+ }
344
+
345
+ return jsonObject['deleted'];
346
+ }());
347
+ }
348
+
349
+ if('updateTimestamp' in jsonObject)
350
+ {
351
+ model.updateTimestamp = (function(){
352
+ if(typeof jsonObject['updateTimestamp'] !== 'string')
353
+ {
354
+ return new Date(String(jsonObject['updateTimestamp']));
355
+ }
356
+
357
+ return new Date(jsonObject['updateTimestamp']);
358
+ }());
359
+ }
360
+
361
+ return model;
362
+ }
363
+ }
364
+
365
+ export default BinTipBinModel;