@ricado/api-client 1.4.1 → 2.1.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.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/AccountPolicyController.js +1 -1
- package/lib/Controllers/ApiAccountController.js +2 -2
- package/lib/Controllers/CompanyController.js +1 -1
- package/lib/Controllers/FirebaseTokenController.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +2 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +2 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +1 -1
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +2 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +2 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +1 -1
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +2 -2
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +2 -2
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +2 -2
- package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +1 -1
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +1 -1
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +1 -1
- package/lib/Controllers/Packhouse/Site/PackrunController.js +288 -2
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +2 -2
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +1 -1
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +2 -2
- package/lib/Controllers/Packhouse/Site/VarietyController.js +1 -1
- package/lib/Controllers/RTU/GlobalSettingsController.js +2 -2
- package/lib/Controllers/RTU/PluginSettingsController.js +2 -2
- package/lib/Controllers/RTUController.js +1 -1
- package/lib/Controllers/RTUPluginController.js +1 -1
- package/lib/Controllers/Site/AlarmController.js +2 -2
- package/lib/Controllers/Site/AlarmGroupController.js +1 -1
- package/lib/Controllers/Site/DefinitionController.js +1 -1
- package/lib/Controllers/Site/PermanentObjectController.js +1 -1
- package/lib/Controllers/Site/PermanentObjectDataController.js +2 -2
- package/lib/Controllers/Site/PointController.js +2 -2
- package/lib/Controllers/Site/TemporaryObjectController.js +1 -1
- package/lib/Controllers/SiteController.js +1 -1
- package/lib/Controllers/TokenController.js +2 -2
- package/lib/Controllers/ToolsController.js +1 -1
- package/lib/Controllers/UserAccountActionTokenController.js +2 -2
- package/lib/Controllers/UserAccountController.js +2 -2
- package/lib/DataItems/PointValueItem.js +2 -2
- package/lib/Errors/BadRequestError.js +7 -3
- package/lib/Errors/ForbiddenError.js +7 -3
- package/lib/Errors/NetworkError.js +7 -3
- package/lib/Errors/NotAllowedError.js +7 -3
- package/lib/Errors/NotFoundError.js +7 -3
- package/lib/Errors/ServerError.js +7 -3
- package/lib/Errors/UnauthorizedError.js +7 -3
- package/lib/Models/AccountPolicyModel.js +29 -133
- package/lib/Models/ApiAccountModel.js +29 -133
- package/lib/Models/BaseModel.js +6 -2
- package/lib/Models/CompanyModel.js +23 -101
- package/lib/Models/FirebaseTokenModel.js +32 -149
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +43 -185
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +40 -169
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +58 -265
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +46 -201
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +40 -169
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +34 -137
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +52 -233
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +58 -265
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +40 -169
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +34 -137
- package/lib/Models/Packhouse/Site/PackTypeModel.js +40 -169
- package/lib/Models/Packhouse/Site/PackingLineModel.js +61 -281
- package/lib/Models/Packhouse/Site/PackrunModel.js +61 -281
- package/lib/Models/Packhouse/Site/RejectBinModel.js +43 -185
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +52 -233
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +46 -201
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +52 -233
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +127 -633
- package/lib/Models/Packhouse/Site/ShiftModel.js +73 -345
- package/lib/Models/Packhouse/Site/VarietyModel.js +40 -169
- package/lib/Models/RTUModel.js +26 -117
- package/lib/Models/RTUPluginModel.js +23 -101
- package/lib/Models/Site/AlarmGroupModel.js +37 -153
- package/lib/Models/Site/AlarmModel.js +67 -313
- package/lib/Models/Site/DefinitionModel.js +34 -137
- package/lib/Models/Site/PermanentObjectDataModel.js +40 -169
- package/lib/Models/Site/PermanentObjectModel.js +37 -153
- package/lib/Models/Site/PointModel.js +49 -217
- package/lib/Models/Site/TemporaryObjectModel.js +34 -137
- package/lib/Models/Site/index.js +0 -3
- package/lib/Models/SiteModel.js +26 -117
- package/lib/Models/TokenModel.js +38 -181
- package/lib/Models/UserAccountActionTokenModel.js +41 -197
- package/lib/Models/UserAccountModel.js +38 -181
- package/lib/PackageVersion.js +1 -1
- package/lib/Points.js +1 -1
- package/lib/RequestHelper.js +2 -2
- package/lib/WebSocketHelper.js +1 -1
- package/lib/index.d.ts +945 -1206
- package/package.json +3 -3
- package/src/Controllers/Packhouse/Site/PackrunController.js +361 -0
- package/src/Models/AccountPolicyModel.js +21 -117
- package/src/Models/ApiAccountModel.js +21 -117
- package/src/Models/CompanyModel.js +15 -87
- package/src/Models/FirebaseTokenModel.js +24 -132
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +32 -163
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +29 -148
- package/src/Models/Packhouse/Site/CompacSizerModel.js +47 -238
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +35 -178
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +29 -148
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +23 -118
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +41 -208
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +47 -238
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +29 -148
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +23 -118
- package/src/Models/Packhouse/Site/PackTypeModel.js +29 -148
- package/src/Models/Packhouse/Site/PackingLineModel.js +50 -253
- package/src/Models/Packhouse/Site/PackrunModel.js +50 -253
- package/src/Models/Packhouse/Site/RejectBinModel.js +32 -163
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +41 -208
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +35 -178
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +41 -208
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +116 -583
- package/src/Models/Packhouse/Site/ShiftModel.js +62 -313
- package/src/Models/Packhouse/Site/VarietyModel.js +29 -148
- package/src/Models/RTUModel.js +18 -102
- package/src/Models/RTUPluginModel.js +15 -87
- package/src/Models/Site/AlarmGroupModel.js +26 -133
- package/src/Models/Site/AlarmModel.js +56 -283
- package/src/Models/Site/DefinitionModel.js +23 -118
- package/src/Models/Site/PermanentObjectDataModel.js +29 -148
- package/src/Models/Site/PermanentObjectModel.js +26 -133
- package/src/Models/Site/PointModel.js +38 -193
- package/src/Models/Site/TemporaryObjectModel.js +23 -118
- package/src/Models/Site/index.js +0 -2
- package/src/Models/SiteModel.js +18 -102
- package/src/Models/TokenModel.js +30 -162
- package/src/Models/UserAccountActionTokenModel.js +33 -177
- package/src/Models/UserAccountModel.js +30 -162
- package/src/PackageVersion.js +1 -1
- package/lib/Models/Site/BaseSiteModel.js +0 -58
- package/src/Models/Site/BaseSiteModel.js +0 -30
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* Do Not Edit this File Manually!
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
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
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class CompacSizerOutletTypeModel extends
|
|
16
|
+
class CompacSizerOutletTypeModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* CompacSizerOutletTypeModel Constructor
|
|
@@ -29,152 +29,57 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
|
|
|
29
29
|
* The Compac Sizer Outlet Type ID
|
|
30
30
|
*
|
|
31
31
|
* @type {string}
|
|
32
|
-
* @
|
|
32
|
+
* @public
|
|
33
33
|
*/
|
|
34
|
-
this.
|
|
34
|
+
this.id = undefined;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The Name for this Dynamic Outlet Type
|
|
38
38
|
*
|
|
39
39
|
* @type {string}
|
|
40
|
-
* @
|
|
40
|
+
* @public
|
|
41
41
|
*/
|
|
42
|
-
this.
|
|
42
|
+
this.name = undefined;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* The Generic Outlet Type
|
|
46
46
|
*
|
|
47
47
|
* @type {string}
|
|
48
|
-
* @
|
|
48
|
+
* @public
|
|
49
49
|
*/
|
|
50
|
-
this.
|
|
50
|
+
this.type = undefined;
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* An Optional Description for this Dynamic Outlet Type
|
|
54
54
|
*
|
|
55
55
|
* @type {string}
|
|
56
|
-
* @
|
|
56
|
+
* @public
|
|
57
57
|
*/
|
|
58
|
-
this.
|
|
58
|
+
this.description = undefined;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Whether the Compac Sizer Outlet Type has been deleted
|
|
62
62
|
*
|
|
63
63
|
* @type {boolean}
|
|
64
|
-
* @
|
|
64
|
+
* @public
|
|
65
65
|
*/
|
|
66
|
-
this.
|
|
66
|
+
this.deleted = undefined;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* When the Compac Sizer Outlet Type was last updated
|
|
70
70
|
*
|
|
71
71
|
* @type {Date}
|
|
72
|
-
* @
|
|
72
|
+
* @public
|
|
73
73
|
*/
|
|
74
|
-
this.
|
|
74
|
+
this.updateTimestamp = undefined;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* The Site ID associated with this Compac Sizer Outlet Type
|
|
78
78
|
*
|
|
79
79
|
* @type {number}
|
|
80
|
-
* @
|
|
80
|
+
* @public
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
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
|
-
};
|
|
82
|
+
this.siteId = siteId;
|
|
178
83
|
}
|
|
179
84
|
|
|
180
85
|
/**
|
|
@@ -208,7 +113,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
|
|
|
208
113
|
|
|
209
114
|
if('id' in jsonObject)
|
|
210
115
|
{
|
|
211
|
-
model.
|
|
116
|
+
model.id = (function(){
|
|
212
117
|
if(typeof jsonObject['id'] !== 'string')
|
|
213
118
|
{
|
|
214
119
|
return String(jsonObject['id']);
|
|
@@ -220,7 +125,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
|
|
|
220
125
|
|
|
221
126
|
if('name' in jsonObject)
|
|
222
127
|
{
|
|
223
|
-
model.
|
|
128
|
+
model.name = (function(){
|
|
224
129
|
if(typeof jsonObject['name'] !== 'string')
|
|
225
130
|
{
|
|
226
131
|
return String(jsonObject['name']);
|
|
@@ -232,7 +137,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
|
|
|
232
137
|
|
|
233
138
|
if('type' in jsonObject)
|
|
234
139
|
{
|
|
235
|
-
model.
|
|
140
|
+
model.type = (function(){
|
|
236
141
|
if(typeof jsonObject['type'] !== 'string')
|
|
237
142
|
{
|
|
238
143
|
return String(jsonObject['type']);
|
|
@@ -244,7 +149,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
|
|
|
244
149
|
|
|
245
150
|
if('description' in jsonObject)
|
|
246
151
|
{
|
|
247
|
-
model.
|
|
152
|
+
model.description = (function(){
|
|
248
153
|
if(typeof jsonObject['description'] !== 'string')
|
|
249
154
|
{
|
|
250
155
|
return String(jsonObject['description']);
|
|
@@ -256,7 +161,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
|
|
|
256
161
|
|
|
257
162
|
if('deleted' in jsonObject)
|
|
258
163
|
{
|
|
259
|
-
model.
|
|
164
|
+
model.deleted = (function(){
|
|
260
165
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
261
166
|
{
|
|
262
167
|
return Boolean(jsonObject['deleted']);
|
|
@@ -268,7 +173,7 @@ class CompacSizerOutletTypeModel extends BaseSiteModel
|
|
|
268
173
|
|
|
269
174
|
if('updateTimestamp' in jsonObject)
|
|
270
175
|
{
|
|
271
|
-
model.
|
|
176
|
+
model.updateTimestamp = (function(){
|
|
272
177
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
273
178
|
{
|
|
274
179
|
return new Date(String(jsonObject['updateTimestamp']));
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* Do Not Edit this File Manually!
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
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
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class CompacSizerPackrunSummaryModel extends
|
|
16
|
+
class CompacSizerPackrunSummaryModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* CompacSizerPackrunSummaryModel Constructor
|
|
@@ -29,272 +29,105 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
29
29
|
* The Compac Sizer Packrun Summary ID
|
|
30
30
|
*
|
|
31
31
|
* @type {string}
|
|
32
|
-
* @
|
|
32
|
+
* @public
|
|
33
33
|
*/
|
|
34
|
-
this.
|
|
34
|
+
this.id = undefined;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The Compac Sizer ID this Summary is associated with
|
|
38
38
|
*
|
|
39
39
|
* @type {string}
|
|
40
|
-
* @
|
|
40
|
+
* @public
|
|
41
41
|
*/
|
|
42
|
-
this.
|
|
42
|
+
this.compacSizerId = undefined;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* The Packrun ID this Summary is associated with
|
|
46
46
|
*
|
|
47
47
|
* @type {string}
|
|
48
|
-
* @
|
|
48
|
+
* @public
|
|
49
49
|
*/
|
|
50
|
-
this.
|
|
50
|
+
this.packrunId = undefined;
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* When this Summary was Created
|
|
54
54
|
*
|
|
55
55
|
* @type {Date}
|
|
56
|
-
* @
|
|
56
|
+
* @public
|
|
57
57
|
*/
|
|
58
|
-
this.
|
|
58
|
+
this.createdTimestamp = undefined;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* The Time Batch this Summary is associated with
|
|
62
62
|
*
|
|
63
63
|
* @type {?string}
|
|
64
|
-
* @
|
|
64
|
+
* @public
|
|
65
65
|
*/
|
|
66
|
-
this.
|
|
66
|
+
this.timeBatchId = undefined;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* An Array of Packrun Summary Data Objects for each Outlet
|
|
70
70
|
*
|
|
71
71
|
* @type {Array<{name: string, type: string, number: number, totals: Array<{classType: ?string, fruitSize: string, packType: ?string, weight: number, fruitCount: number, packCount: ?number}>}>}
|
|
72
|
-
* @
|
|
72
|
+
* @public
|
|
73
73
|
*/
|
|
74
|
-
this.
|
|
74
|
+
this.outletSummaries = undefined;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* An Array that contains the Products initially Assigned to each Outlet
|
|
78
78
|
*
|
|
79
79
|
* @type {Array<{outletNumber: number, productId: string, productName: ?string}>}
|
|
80
|
-
* @
|
|
80
|
+
* @public
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
82
|
+
this.initialOutletProducts = undefined;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* An Array of Outlet Product Changes
|
|
86
86
|
*
|
|
87
87
|
* @type {Array<{timestamp: Date, outletNumber: number, productId: string, productName: ?string, outletProductChangeId: string}>}
|
|
88
|
-
* @
|
|
88
|
+
* @public
|
|
89
89
|
*/
|
|
90
|
-
this.
|
|
90
|
+
this.outletProductChanges = undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* An Array that contains the Types initially configured for each Outlet
|
|
94
94
|
*
|
|
95
95
|
* @type {Array<{outletNumber: number, type: string, typeId: ?string}>}
|
|
96
|
-
* @
|
|
96
|
+
* @public
|
|
97
97
|
*/
|
|
98
|
-
this.
|
|
98
|
+
this.initialOutletTypes = undefined;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* An Array of Outlet Type Changes. Only applies to Outlets configured as *Dynamic*
|
|
102
102
|
*
|
|
103
103
|
* @type {Array<{timestamp: Date, outletNumber: number, typeId: ?string}>}
|
|
104
|
-
* @
|
|
104
|
+
* @public
|
|
105
105
|
*/
|
|
106
|
-
this.
|
|
106
|
+
this.outletTypeChanges = undefined;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* Whether the Compac Sizer Packrun Summary has been deleted
|
|
110
110
|
*
|
|
111
111
|
* @type {boolean}
|
|
112
|
-
* @
|
|
112
|
+
* @public
|
|
113
113
|
*/
|
|
114
|
-
this.
|
|
114
|
+
this.deleted = undefined;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* When the Compac Sizer Packrun Summary was last updated
|
|
118
118
|
*
|
|
119
119
|
* @type {Date}
|
|
120
|
-
* @
|
|
120
|
+
* @public
|
|
121
121
|
*/
|
|
122
|
-
this.
|
|
122
|
+
this.updateTimestamp = undefined;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* The Site ID associated with this Compac Sizer Packrun Summary
|
|
126
126
|
*
|
|
127
127
|
* @type {number}
|
|
128
|
-
* @
|
|
128
|
+
* @public
|
|
129
129
|
*/
|
|
130
|
-
this.
|
|
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
|
-
};
|
|
130
|
+
this.siteId = siteId;
|
|
298
131
|
}
|
|
299
132
|
|
|
300
133
|
/**
|
|
@@ -328,7 +161,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
328
161
|
|
|
329
162
|
if('id' in jsonObject)
|
|
330
163
|
{
|
|
331
|
-
model.
|
|
164
|
+
model.id = (function(){
|
|
332
165
|
if(typeof jsonObject['id'] !== 'string')
|
|
333
166
|
{
|
|
334
167
|
return String(jsonObject['id']);
|
|
@@ -340,7 +173,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
340
173
|
|
|
341
174
|
if('compacSizerId' in jsonObject)
|
|
342
175
|
{
|
|
343
|
-
model.
|
|
176
|
+
model.compacSizerId = (function(){
|
|
344
177
|
if(typeof jsonObject['compacSizerId'] !== 'string')
|
|
345
178
|
{
|
|
346
179
|
return String(jsonObject['compacSizerId']);
|
|
@@ -352,7 +185,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
352
185
|
|
|
353
186
|
if('packrunId' in jsonObject)
|
|
354
187
|
{
|
|
355
|
-
model.
|
|
188
|
+
model.packrunId = (function(){
|
|
356
189
|
if(typeof jsonObject['packrunId'] !== 'string')
|
|
357
190
|
{
|
|
358
191
|
return String(jsonObject['packrunId']);
|
|
@@ -364,7 +197,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
364
197
|
|
|
365
198
|
if('createdTimestamp' in jsonObject)
|
|
366
199
|
{
|
|
367
|
-
model.
|
|
200
|
+
model.createdTimestamp = (function(){
|
|
368
201
|
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
369
202
|
{
|
|
370
203
|
return new Date(String(jsonObject['createdTimestamp']));
|
|
@@ -376,7 +209,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
376
209
|
|
|
377
210
|
if('timeBatchId' in jsonObject)
|
|
378
211
|
{
|
|
379
|
-
model.
|
|
212
|
+
model.timeBatchId = (function(){
|
|
380
213
|
if(jsonObject['timeBatchId'] === null)
|
|
381
214
|
{
|
|
382
215
|
return null;
|
|
@@ -393,7 +226,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
393
226
|
|
|
394
227
|
if('outletSummaries' in jsonObject)
|
|
395
228
|
{
|
|
396
|
-
model.
|
|
229
|
+
model.outletSummaries = (function(){
|
|
397
230
|
if(Array.isArray(jsonObject['outletSummaries']) !== true)
|
|
398
231
|
{
|
|
399
232
|
return [];
|
|
@@ -592,7 +425,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
592
425
|
|
|
593
426
|
if('initialOutletProducts' in jsonObject)
|
|
594
427
|
{
|
|
595
|
-
model.
|
|
428
|
+
model.initialOutletProducts = (function(){
|
|
596
429
|
if(Array.isArray(jsonObject['initialOutletProducts']) !== true)
|
|
597
430
|
{
|
|
598
431
|
return [];
|
|
@@ -663,7 +496,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
663
496
|
|
|
664
497
|
if('outletProductChanges' in jsonObject)
|
|
665
498
|
{
|
|
666
|
-
model.
|
|
499
|
+
model.outletProductChanges = (function(){
|
|
667
500
|
if(Array.isArray(jsonObject['outletProductChanges']) !== true)
|
|
668
501
|
{
|
|
669
502
|
return [];
|
|
@@ -766,7 +599,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
766
599
|
|
|
767
600
|
if('initialOutletTypes' in jsonObject)
|
|
768
601
|
{
|
|
769
|
-
model.
|
|
602
|
+
model.initialOutletTypes = (function(){
|
|
770
603
|
if(Array.isArray(jsonObject['initialOutletTypes']) !== true)
|
|
771
604
|
{
|
|
772
605
|
return [];
|
|
@@ -837,7 +670,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
837
670
|
|
|
838
671
|
if('outletTypeChanges' in jsonObject)
|
|
839
672
|
{
|
|
840
|
-
model.
|
|
673
|
+
model.outletTypeChanges = (function(){
|
|
841
674
|
if(Array.isArray(jsonObject['outletTypeChanges']) !== true)
|
|
842
675
|
{
|
|
843
676
|
return [];
|
|
@@ -908,7 +741,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
908
741
|
|
|
909
742
|
if('deleted' in jsonObject)
|
|
910
743
|
{
|
|
911
|
-
model.
|
|
744
|
+
model.deleted = (function(){
|
|
912
745
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
913
746
|
{
|
|
914
747
|
return Boolean(jsonObject['deleted']);
|
|
@@ -920,7 +753,7 @@ class CompacSizerPackrunSummaryModel extends BaseSiteModel
|
|
|
920
753
|
|
|
921
754
|
if('updateTimestamp' in jsonObject)
|
|
922
755
|
{
|
|
923
|
-
model.
|
|
756
|
+
model.updateTimestamp = (function(){
|
|
924
757
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
925
758
|
{
|
|
926
759
|
return new Date(String(jsonObject['updateTimestamp']));
|