@ricado/api-client 1.2.6 → 2.0.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 (141) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  3. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  4. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
  5. package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  6. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  7. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  8. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  9. package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  10. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  11. package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  12. package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  13. package/lib/Controllers/Packhouse/Site/PackingLineController.js +4 -4
  14. package/lib/Controllers/Packhouse/Site/PackrunController.js +4 -4
  15. package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  16. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
  17. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  18. package/lib/Controllers/Packhouse/Site/ShiftController.js +4 -4
  19. package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  20. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
  21. package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
  22. package/lib/Controllers/Site/AlarmController.js +4 -4
  23. package/lib/Controllers/Site/AlarmGroupController.js +4 -4
  24. package/lib/Controllers/Site/DefinitionController.js +4 -4
  25. package/lib/Controllers/Site/PermanentObjectController.js +4 -4
  26. package/lib/Controllers/Site/PermanentObjectDataController.js +4 -4
  27. package/lib/Controllers/Site/PointController.js +6 -4
  28. package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
  29. package/lib/Models/AccountPolicyModel.js +26 -130
  30. package/lib/Models/ApiAccountModel.js +26 -130
  31. package/lib/Models/CompanyModel.js +20 -98
  32. package/lib/Models/FirebaseTokenModel.js +29 -146
  33. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +40 -192
  34. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +37 -176
  35. package/lib/Models/Packhouse/Site/CompacSizerModel.js +55 -272
  36. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +43 -208
  37. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +37 -176
  38. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +31 -144
  39. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +49 -240
  40. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +55 -272
  41. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +37 -176
  42. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +31 -144
  43. package/lib/Models/Packhouse/Site/PackTypeModel.js +37 -176
  44. package/lib/Models/Packhouse/Site/PackingLineModel.js +58 -288
  45. package/lib/Models/Packhouse/Site/PackrunModel.js +58 -288
  46. package/lib/Models/Packhouse/Site/RejectBinModel.js +40 -192
  47. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +49 -240
  48. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +43 -208
  49. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +49 -240
  50. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +124 -640
  51. package/lib/Models/Packhouse/Site/ShiftModel.js +70 -352
  52. package/lib/Models/Packhouse/Site/VarietyModel.js +37 -176
  53. package/lib/Models/RTUModel.js +23 -114
  54. package/lib/Models/RTUPluginModel.js +20 -98
  55. package/lib/Models/Site/AlarmGroupModel.js +34 -160
  56. package/lib/Models/Site/AlarmModel.js +64 -320
  57. package/lib/Models/Site/DefinitionModel.js +31 -144
  58. package/lib/Models/Site/PermanentObjectDataModel.js +37 -176
  59. package/lib/Models/Site/PermanentObjectModel.js +34 -160
  60. package/lib/Models/Site/PointModel.js +46 -224
  61. package/lib/Models/Site/TemporaryObjectModel.js +31 -144
  62. package/lib/Models/Site/index.js +0 -3
  63. package/lib/Models/SiteModel.js +23 -114
  64. package/lib/Models/TokenModel.js +35 -178
  65. package/lib/Models/UserAccountActionTokenModel.js +38 -194
  66. package/lib/Models/UserAccountModel.js +35 -178
  67. package/lib/PackageVersion.js +1 -1
  68. package/lib/Points.js +9 -1
  69. package/lib/index.d.ts +842 -1591
  70. package/lib/index.js +67 -38
  71. package/package.json +2 -2
  72. package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  73. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  74. package/src/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
  75. package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  76. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  77. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  78. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  79. package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  80. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  81. package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  82. package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  83. package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
  84. package/src/Controllers/Packhouse/Site/PackrunController.js +4 -4
  85. package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  86. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
  87. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  88. package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
  89. package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  90. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
  91. package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
  92. package/src/Controllers/Site/AlarmController.js +4 -4
  93. package/src/Controllers/Site/AlarmGroupController.js +4 -4
  94. package/src/Controllers/Site/DefinitionController.js +4 -4
  95. package/src/Controllers/Site/PermanentObjectController.js +4 -4
  96. package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
  97. package/src/Controllers/Site/PointController.js +6 -4
  98. package/src/Controllers/Site/TemporaryObjectController.js +4 -4
  99. package/src/Models/AccountPolicyModel.js +21 -117
  100. package/src/Models/ApiAccountModel.js +21 -117
  101. package/src/Models/CompanyModel.js +15 -87
  102. package/src/Models/FirebaseTokenModel.js +24 -132
  103. package/src/Models/Packhouse/Site/BinTipWeightModel.js +33 -174
  104. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +30 -159
  105. package/src/Models/Packhouse/Site/CompacSizerModel.js +48 -249
  106. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +36 -189
  107. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +30 -159
  108. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +24 -129
  109. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +42 -219
  110. package/src/Models/Packhouse/Site/DowntimeEventModel.js +48 -249
  111. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +30 -159
  112. package/src/Models/Packhouse/Site/GrowingMethodModel.js +24 -129
  113. package/src/Models/Packhouse/Site/PackTypeModel.js +30 -159
  114. package/src/Models/Packhouse/Site/PackingLineModel.js +51 -264
  115. package/src/Models/Packhouse/Site/PackrunModel.js +51 -264
  116. package/src/Models/Packhouse/Site/RejectBinModel.js +33 -174
  117. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +42 -219
  118. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +36 -189
  119. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +42 -219
  120. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +117 -594
  121. package/src/Models/Packhouse/Site/ShiftModel.js +63 -324
  122. package/src/Models/Packhouse/Site/VarietyModel.js +30 -159
  123. package/src/Models/RTUModel.js +18 -102
  124. package/src/Models/RTUPluginModel.js +15 -87
  125. package/src/Models/Site/AlarmGroupModel.js +27 -144
  126. package/src/Models/Site/AlarmModel.js +57 -294
  127. package/src/Models/Site/DefinitionModel.js +24 -129
  128. package/src/Models/Site/PermanentObjectDataModel.js +30 -159
  129. package/src/Models/Site/PermanentObjectModel.js +27 -144
  130. package/src/Models/Site/PointModel.js +39 -204
  131. package/src/Models/Site/TemporaryObjectModel.js +24 -129
  132. package/src/Models/Site/index.js +0 -2
  133. package/src/Models/SiteModel.js +18 -102
  134. package/src/Models/TokenModel.js +30 -162
  135. package/src/Models/UserAccountActionTokenModel.js +33 -177
  136. package/src/Models/UserAccountModel.js +30 -162
  137. package/src/PackageVersion.js +1 -1
  138. package/src/Points.js +11 -1
  139. package/src/index.js +35 -3
  140. package/lib/Models/Site/BaseSiteModel.js +0 -58
  141. package/src/Models/Site/BaseSiteModel.js +0 -30
@@ -4,24 +4,23 @@
4
4
  * Do Not Edit this File Manually!
5
5
  */
6
6
 
7
- import BaseSiteModel from '../../../Models/Site/BaseSiteModel';
7
+ import BaseModel from '../../../Models/BaseModel';
8
8
 
9
9
  /**
10
10
  * Model Class for a Compac Sizer Outlet Type
11
11
  *
12
12
  * @class
13
13
  * @hideconstructor
14
- * @extends BaseSiteModel
14
+ * @extends BaseModel
15
15
  */
16
- class CompacSizerOutletTypeModel extends BaseSiteModel
16
+ class CompacSizerOutletTypeModel extends BaseModel
17
17
  {
18
18
  /**
19
19
  * CompacSizerOutletTypeModel Constructor
20
20
  *
21
21
  * @protected
22
- * @param {number} siteId The Site ID associated with this Compac Sizer Outlet Type
23
22
  */
24
- constructor(siteId)
23
+ constructor()
25
24
  {
26
25
  super();
27
26
 
@@ -29,152 +28,49 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
29
28
  * The Compac Sizer Outlet Type ID
30
29
  *
31
30
  * @type {string}
32
- * @private
31
+ * @public
33
32
  */
34
- this._id = undefined;
33
+ this.id = undefined;
35
34
 
36
35
  /**
37
36
  * The Name for this Dynamic Outlet Type
38
37
  *
39
38
  * @type {string}
40
- * @private
39
+ * @public
41
40
  */
42
- this._name = undefined;
41
+ this.name = undefined;
43
42
 
44
43
  /**
45
44
  * The Generic Outlet Type
46
45
  *
47
46
  * @type {string}
48
- * @private
47
+ * @public
49
48
  */
50
- this._type = undefined;
49
+ this.type = undefined;
51
50
 
52
51
  /**
53
52
  * An Optional Description for this Dynamic Outlet Type
54
53
  *
55
54
  * @type {string}
56
- * @private
55
+ * @public
57
56
  */
58
- this._description = undefined;
57
+ this.description = undefined;
59
58
 
60
59
  /**
61
60
  * Whether the Compac Sizer Outlet Type has been deleted
62
61
  *
63
62
  * @type {boolean}
64
- * @private
63
+ * @public
65
64
  */
66
- this._deleted = undefined;
65
+ this.deleted = undefined;
67
66
 
68
67
  /**
69
68
  * When the Compac Sizer Outlet Type was last updated
70
69
  *
71
70
  * @type {Date}
72
- * @private
71
+ * @public
73
72
  */
74
- this._updateTimestamp = undefined;
75
-
76
- /**
77
- * The Site ID associated with this Compac Sizer Outlet Type
78
- *
79
- * @type {number}
80
- * @private
81
- */
82
- this._siteId = siteId;
83
- }
84
-
85
- /**
86
- * The Compac Sizer Outlet Type ID
87
- *
88
- * @public
89
- * @type {string}
90
- */
91
- get id()
92
- {
93
- return this._id;
94
- }
95
-
96
- /**
97
- * The Name for this Dynamic Outlet Type
98
- *
99
- * @public
100
- * @type {string}
101
- */
102
- get name()
103
- {
104
- return this._name;
105
- }
106
-
107
- /**
108
- * The Generic Outlet Type
109
- *
110
- * @public
111
- * @type {string}
112
- */
113
- get type()
114
- {
115
- return this._type;
116
- }
117
-
118
- /**
119
- * An Optional Description for this Dynamic Outlet Type
120
- *
121
- * @public
122
- * @type {string}
123
- */
124
- get description()
125
- {
126
- return this._description;
127
- }
128
-
129
- /**
130
- * Whether the Compac Sizer Outlet Type has been deleted
131
- *
132
- * @public
133
- * @type {boolean}
134
- */
135
- get deleted()
136
- {
137
- return this._deleted;
138
- }
139
-
140
- /**
141
- * When the Compac Sizer Outlet Type was last updated
142
- *
143
- * @public
144
- * @type {Date}
145
- */
146
- get updateTimestamp()
147
- {
148
- return this._updateTimestamp;
149
- }
150
-
151
- /**
152
- * The Site ID associated with this Compac Sizer Outlet Type
153
- *
154
- * @public
155
- * @type {number}
156
- */
157
- get siteId()
158
- {
159
- return this._siteId;
160
- }
161
-
162
- /**
163
- * Convert this **CompacSizerOutletTypeModel** to a JSON Object
164
- *
165
- * @public
166
- * @return {Object<string, any>}
167
- */
168
- toJSON()
169
- {
170
- return {
171
- id: this._id,
172
- name: this._name,
173
- type: this._type,
174
- description: this._description,
175
- deleted: this._deleted,
176
- updateTimestamp: this._updateTimestamp
177
- };
73
+ this.updateTimestamp = undefined;
178
74
  }
179
75
 
180
76
  /**
@@ -183,12 +79,11 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
183
79
  * @static
184
80
  * @public
185
81
  * @param {Object<string, any>|string} json A JSON Object or JSON String
186
- * @param {number} siteId The Site ID associated with this Compac Sizer Outlet Type
187
82
  * @return {CompacSizerOutletTypeModel}
188
83
  */
189
- static fromJSON(json, siteId)
84
+ static fromJSON(json)
190
85
  {
191
- let model = new CompacSizerOutletTypeModel(siteId);
86
+ let model = new CompacSizerOutletTypeModel();
192
87
 
193
88
  /**
194
89
  * The JSON Object
@@ -208,7 +103,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
208
103
 
209
104
  if('id' in jsonObject)
210
105
  {
211
- model._id = (function(){
106
+ model.id = (function(){
212
107
  if(typeof jsonObject['id'] !== 'string')
213
108
  {
214
109
  return String(jsonObject['id']);
@@ -220,7 +115,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
220
115
 
221
116
  if('name' in jsonObject)
222
117
  {
223
- model._name = (function(){
118
+ model.name = (function(){
224
119
  if(typeof jsonObject['name'] !== 'string')
225
120
  {
226
121
  return String(jsonObject['name']);
@@ -232,7 +127,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
232
127
 
233
128
  if('type' in jsonObject)
234
129
  {
235
- model._type = (function(){
130
+ model.type = (function(){
236
131
  if(typeof jsonObject['type'] !== 'string')
237
132
  {
238
133
  return String(jsonObject['type']);
@@ -244,7 +139,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
244
139
 
245
140
  if('description' in jsonObject)
246
141
  {
247
- model._description = (function(){
142
+ model.description = (function(){
248
143
  if(typeof jsonObject['description'] !== 'string')
249
144
  {
250
145
  return String(jsonObject['description']);
@@ -256,7 +151,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
256
151
 
257
152
  if('deleted' in jsonObject)
258
153
  {
259
- model._deleted = (function(){
154
+ model.deleted = (function(){
260
155
  if(typeof jsonObject['deleted'] !== 'boolean')
261
156
  {
262
157
  return Boolean(jsonObject['deleted']);
@@ -268,7 +163,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
268
163
 
269
164
  if('updateTimestamp' in jsonObject)
270
165
  {
271
- model._updateTimestamp = (function(){
166
+ model.updateTimestamp = (function(){
272
167
  if(typeof jsonObject['updateTimestamp'] !== 'string')
273
168
  {
274
169
  return new Date(String(jsonObject['updateTimestamp']));
@@ -4,24 +4,23 @@
4
4
  * Do Not Edit this File Manually!
5
5
  */
6
6
 
7
- import BaseSiteModel from '../../../Models/Site/BaseSiteModel';
7
+ import BaseModel from '../../../Models/BaseModel';
8
8
 
9
9
  /**
10
10
  * Model Class for a Compac Sizer Packrun Summary
11
11
  *
12
12
  * @class
13
13
  * @hideconstructor
14
- * @extends BaseSiteModel
14
+ * @extends BaseModel
15
15
  */
16
- class CompacSizerPackrunSummaryModel extends BaseSiteModel
16
+ class CompacSizerPackrunSummaryModel extends BaseModel
17
17
  {
18
18
  /**
19
19
  * CompacSizerPackrunSummaryModel Constructor
20
20
  *
21
21
  * @protected
22
- * @param {number} siteId The Site ID associated with this Compac Sizer Packrun Summary
23
22
  */
24
- constructor(siteId)
23
+ constructor()
25
24
  {
26
25
  super();
27
26
 
@@ -29,272 +28,97 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
29
28
  * The Compac Sizer Packrun Summary ID
30
29
  *
31
30
  * @type {string}
32
- * @private
31
+ * @public
33
32
  */
34
- this._id = undefined;
33
+ this.id = undefined;
35
34
 
36
35
  /**
37
36
  * The Compac Sizer ID this Summary is associated with
38
37
  *
39
38
  * @type {string}
40
- * @private
39
+ * @public
41
40
  */
42
- this._compacSizerId = undefined;
41
+ this.compacSizerId = undefined;
43
42
 
44
43
  /**
45
44
  * The Packrun ID this Summary is associated with
46
45
  *
47
46
  * @type {string}
48
- * @private
47
+ * @public
49
48
  */
50
- this._packrunId = undefined;
49
+ this.packrunId = undefined;
51
50
 
52
51
  /**
53
52
  * When this Summary was Created
54
53
  *
55
54
  * @type {Date}
56
- * @private
55
+ * @public
57
56
  */
58
- this._createdTimestamp = undefined;
57
+ this.createdTimestamp = undefined;
59
58
 
60
59
  /**
61
60
  * The Time Batch this Summary is associated with
62
61
  *
63
62
  * @type {?string}
64
- * @private
63
+ * @public
65
64
  */
66
- this._timeBatchId = undefined;
65
+ this.timeBatchId = undefined;
67
66
 
68
67
  /**
69
68
  * An Array of Packrun Summary Data Objects for each Outlet
70
69
  *
71
70
  * @type {Array<{name: string, type: string, number: number, totals: Array<{classType: ?string, fruitSize: string, packType: ?string, weight: number, fruitCount: number, packCount: ?number}>}>}
72
- * @private
71
+ * @public
73
72
  */
74
- this._outletSummaries = undefined;
73
+ this.outletSummaries = undefined;
75
74
 
76
75
  /**
77
76
  * An Array that contains the Products initially Assigned to each Outlet
78
77
  *
79
78
  * @type {Array<{outletNumber: number, productId: string, productName: ?string}>}
80
- * @private
79
+ * @public
81
80
  */
82
- this._initialOutletProducts = undefined;
81
+ this.initialOutletProducts = undefined;
83
82
 
84
83
  /**
85
84
  * An Array of Outlet Product Changes
86
85
  *
87
86
  * @type {Array<{timestamp: Date, outletNumber: number, productId: string, productName: ?string, outletProductChangeId: string}>}
88
- * @private
87
+ * @public
89
88
  */
90
- this._outletProductChanges = undefined;
89
+ this.outletProductChanges = undefined;
91
90
 
92
91
  /**
93
92
  * An Array that contains the Types initially configured for each Outlet
94
93
  *
95
94
  * @type {Array<{outletNumber: number, type: string, typeId: ?string}>}
96
- * @private
95
+ * @public
97
96
  */
98
- this._initialOutletTypes = undefined;
97
+ this.initialOutletTypes = undefined;
99
98
 
100
99
  /**
101
100
  * An Array of Outlet Type Changes. Only applies to Outlets configured as *Dynamic*
102
101
  *
103
102
  * @type {Array<{timestamp: Date, outletNumber: number, typeId: ?string}>}
104
- * @private
103
+ * @public
105
104
  */
106
- this._outletTypeChanges = undefined;
105
+ this.outletTypeChanges = undefined;
107
106
 
108
107
  /**
109
108
  * Whether the Compac Sizer Packrun Summary has been deleted
110
109
  *
111
110
  * @type {boolean}
112
- * @private
111
+ * @public
113
112
  */
114
- this._deleted = undefined;
113
+ this.deleted = undefined;
115
114
 
116
115
  /**
117
116
  * When the Compac Sizer Packrun Summary was last updated
118
117
  *
119
118
  * @type {Date}
120
- * @private
119
+ * @public
121
120
  */
122
- this._updateTimestamp = undefined;
123
-
124
- /**
125
- * The Site ID associated with this Compac Sizer Packrun Summary
126
- *
127
- * @type {number}
128
- * @private
129
- */
130
- this._siteId = siteId;
131
- }
132
-
133
- /**
134
- * The Compac Sizer Packrun Summary ID
135
- *
136
- * @public
137
- * @type {string}
138
- */
139
- get id()
140
- {
141
- return this._id;
142
- }
143
-
144
- /**
145
- * The Compac Sizer ID this Summary is associated with
146
- *
147
- * @public
148
- * @type {string}
149
- */
150
- get compacSizerId()
151
- {
152
- return this._compacSizerId;
153
- }
154
-
155
- /**
156
- * The Packrun ID this Summary is associated with
157
- *
158
- * @public
159
- * @type {string}
160
- */
161
- get packrunId()
162
- {
163
- return this._packrunId;
164
- }
165
-
166
- /**
167
- * When this Summary was Created
168
- *
169
- * @public
170
- * @type {Date}
171
- */
172
- get createdTimestamp()
173
- {
174
- return this._createdTimestamp;
175
- }
176
-
177
- /**
178
- * The Time Batch this Summary is associated with
179
- *
180
- * @public
181
- * @type {?string}
182
- */
183
- get timeBatchId()
184
- {
185
- return this._timeBatchId;
186
- }
187
-
188
- /**
189
- * An Array of Packrun Summary Data Objects for each Outlet
190
- *
191
- * @public
192
- * @type {Array<{name: string, type: string, number: number, totals: Array<{classType: ?string, fruitSize: string, packType: ?string, weight: number, fruitCount: number, packCount: ?number}>}>}
193
- */
194
- get outletSummaries()
195
- {
196
- return this._outletSummaries;
197
- }
198
-
199
- /**
200
- * An Array that contains the Products initially Assigned to each Outlet
201
- *
202
- * @public
203
- * @type {Array<{outletNumber: number, productId: string, productName: ?string}>}
204
- */
205
- get initialOutletProducts()
206
- {
207
- return this._initialOutletProducts;
208
- }
209
-
210
- /**
211
- * An Array of Outlet Product Changes
212
- *
213
- * @public
214
- * @type {Array<{timestamp: Date, outletNumber: number, productId: string, productName: ?string, outletProductChangeId: string}>}
215
- */
216
- get outletProductChanges()
217
- {
218
- return this._outletProductChanges;
219
- }
220
-
221
- /**
222
- * An Array that contains the Types initially configured for each Outlet
223
- *
224
- * @public
225
- * @type {Array<{outletNumber: number, type: string, typeId: ?string}>}
226
- */
227
- get initialOutletTypes()
228
- {
229
- return this._initialOutletTypes;
230
- }
231
-
232
- /**
233
- * An Array of Outlet Type Changes. Only applies to Outlets configured as *Dynamic*
234
- *
235
- * @public
236
- * @type {Array<{timestamp: Date, outletNumber: number, typeId: ?string}>}
237
- */
238
- get outletTypeChanges()
239
- {
240
- return this._outletTypeChanges;
241
- }
242
-
243
- /**
244
- * Whether the Compac Sizer Packrun Summary has been deleted
245
- *
246
- * @public
247
- * @type {boolean}
248
- */
249
- get deleted()
250
- {
251
- return this._deleted;
252
- }
253
-
254
- /**
255
- * When the Compac Sizer Packrun Summary was last updated
256
- *
257
- * @public
258
- * @type {Date}
259
- */
260
- get updateTimestamp()
261
- {
262
- return this._updateTimestamp;
263
- }
264
-
265
- /**
266
- * The Site ID associated with this Compac Sizer Packrun Summary
267
- *
268
- * @public
269
- * @type {number}
270
- */
271
- get siteId()
272
- {
273
- return this._siteId;
274
- }
275
-
276
- /**
277
- * Convert this **CompacSizerPackrunSummaryModel** to a JSON Object
278
- *
279
- * @public
280
- * @return {Object<string, any>}
281
- */
282
- toJSON()
283
- {
284
- return {
285
- id: this._id,
286
- compacSizerId: this._compacSizerId,
287
- packrunId: this._packrunId,
288
- createdTimestamp: this._createdTimestamp,
289
- timeBatchId: this._timeBatchId,
290
- outletSummaries: this._outletSummaries,
291
- initialOutletProducts: this._initialOutletProducts,
292
- outletProductChanges: this._outletProductChanges,
293
- initialOutletTypes: this._initialOutletTypes,
294
- outletTypeChanges: this._outletTypeChanges,
295
- deleted: this._deleted,
296
- updateTimestamp: this._updateTimestamp
297
- };
121
+ this.updateTimestamp = undefined;
298
122
  }
299
123
 
300
124
  /**
@@ -303,12 +127,11 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
303
127
  * @static
304
128
  * @public
305
129
  * @param {Object<string, any>|string} json A JSON Object or JSON String
306
- * @param {number} siteId The Site ID associated with this Compac Sizer Packrun Summary
307
130
  * @return {CompacSizerPackrunSummaryModel}
308
131
  */
309
- static fromJSON(json, siteId)
132
+ static fromJSON(json)
310
133
  {
311
- let model = new CompacSizerPackrunSummaryModel(siteId);
134
+ let model = new CompacSizerPackrunSummaryModel();
312
135
 
313
136
  /**
314
137
  * The JSON Object
@@ -328,7 +151,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
328
151
 
329
152
  if('id' in jsonObject)
330
153
  {
331
- model._id = (function(){
154
+ model.id = (function(){
332
155
  if(typeof jsonObject['id'] !== 'string')
333
156
  {
334
157
  return String(jsonObject['id']);
@@ -340,7 +163,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
340
163
 
341
164
  if('compacSizerId' in jsonObject)
342
165
  {
343
- model._compacSizerId = (function(){
166
+ model.compacSizerId = (function(){
344
167
  if(typeof jsonObject['compacSizerId'] !== 'string')
345
168
  {
346
169
  return String(jsonObject['compacSizerId']);
@@ -352,7 +175,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
352
175
 
353
176
  if('packrunId' in jsonObject)
354
177
  {
355
- model._packrunId = (function(){
178
+ model.packrunId = (function(){
356
179
  if(typeof jsonObject['packrunId'] !== 'string')
357
180
  {
358
181
  return String(jsonObject['packrunId']);
@@ -364,7 +187,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
364
187
 
365
188
  if('createdTimestamp' in jsonObject)
366
189
  {
367
- model._createdTimestamp = (function(){
190
+ model.createdTimestamp = (function(){
368
191
  if(typeof jsonObject['createdTimestamp'] !== 'string')
369
192
  {
370
193
  return new Date(String(jsonObject['createdTimestamp']));
@@ -376,7 +199,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
376
199
 
377
200
  if('timeBatchId' in jsonObject)
378
201
  {
379
- model._timeBatchId = (function(){
202
+ model.timeBatchId = (function(){
380
203
  if(jsonObject['timeBatchId'] === null)
381
204
  {
382
205
  return null;
@@ -393,7 +216,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
393
216
 
394
217
  if('outletSummaries' in jsonObject)
395
218
  {
396
- model._outletSummaries = (function(){
219
+ model.outletSummaries = (function(){
397
220
  if(Array.isArray(jsonObject['outletSummaries']) !== true)
398
221
  {
399
222
  return [];
@@ -592,7 +415,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
592
415
 
593
416
  if('initialOutletProducts' in jsonObject)
594
417
  {
595
- model._initialOutletProducts = (function(){
418
+ model.initialOutletProducts = (function(){
596
419
  if(Array.isArray(jsonObject['initialOutletProducts']) !== true)
597
420
  {
598
421
  return [];
@@ -663,7 +486,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
663
486
 
664
487
  if('outletProductChanges' in jsonObject)
665
488
  {
666
- model._outletProductChanges = (function(){
489
+ model.outletProductChanges = (function(){
667
490
  if(Array.isArray(jsonObject['outletProductChanges']) !== true)
668
491
  {
669
492
  return [];
@@ -766,7 +589,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
766
589
 
767
590
  if('initialOutletTypes' in jsonObject)
768
591
  {
769
- model._initialOutletTypes = (function(){
592
+ model.initialOutletTypes = (function(){
770
593
  if(Array.isArray(jsonObject['initialOutletTypes']) !== true)
771
594
  {
772
595
  return [];
@@ -837,7 +660,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
837
660
 
838
661
  if('outletTypeChanges' in jsonObject)
839
662
  {
840
- model._outletTypeChanges = (function(){
663
+ model.outletTypeChanges = (function(){
841
664
  if(Array.isArray(jsonObject['outletTypeChanges']) !== true)
842
665
  {
843
666
  return [];
@@ -908,7 +731,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
908
731
 
909
732
  if('deleted' in jsonObject)
910
733
  {
911
- model._deleted = (function(){
734
+ model.deleted = (function(){
912
735
  if(typeof jsonObject['deleted'] !== 'boolean')
913
736
  {
914
737
  return Boolean(jsonObject['deleted']);
@@ -920,7 +743,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
920
743
 
921
744
  if('updateTimestamp' in jsonObject)
922
745
  {
923
- model._updateTimestamp = (function(){
746
+ model.updateTimestamp = (function(){
924
747
  if(typeof jsonObject['updateTimestamp'] !== 'string')
925
748
  {
926
749
  return new Date(String(jsonObject['updateTimestamp']));