@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 FreshPack Packrun Summary
|
|
11
11
|
*
|
|
12
12
|
* @class
|
|
13
13
|
* @hideconstructor
|
|
14
|
-
* @extends
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class FreshPackPackrunSummaryModel extends
|
|
16
|
+
class FreshPackPackrunSummaryModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* FreshPackPackrunSummaryModel Constructor
|
|
@@ -29,192 +29,73 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
29
29
|
* The FreshPack 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 Packing Line ID this Summary is associated with
|
|
38
38
|
*
|
|
39
39
|
* @type {string}
|
|
40
|
-
* @
|
|
40
|
+
* @public
|
|
41
41
|
*/
|
|
42
|
-
this.
|
|
42
|
+
this.packingLineId = 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 Tray Summary Data Objects for all Sizes and Class Types
|
|
70
70
|
*
|
|
71
71
|
* @type {Object[]}
|
|
72
|
-
* @
|
|
72
|
+
* @public
|
|
73
73
|
*/
|
|
74
|
-
this.
|
|
74
|
+
this.traySummaries = undefined;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Whether the FreshPack Packrun Summary has been deleted
|
|
78
78
|
*
|
|
79
79
|
* @type {boolean}
|
|
80
|
-
* @
|
|
80
|
+
* @public
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
82
|
+
this.deleted = undefined;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* When the FreshPack Packrun Summary was last updated
|
|
86
86
|
*
|
|
87
87
|
* @type {Date}
|
|
88
|
-
* @
|
|
88
|
+
* @public
|
|
89
89
|
*/
|
|
90
|
-
this.
|
|
90
|
+
this.updateTimestamp = undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* The Site ID associated with this FreshPack Packrun Summary
|
|
94
94
|
*
|
|
95
95
|
* @type {number}
|
|
96
|
-
* @
|
|
96
|
+
* @public
|
|
97
97
|
*/
|
|
98
|
-
this.
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* The FreshPack Packrun Summary ID
|
|
103
|
-
*
|
|
104
|
-
* @public
|
|
105
|
-
* @type {string}
|
|
106
|
-
*/
|
|
107
|
-
get id()
|
|
108
|
-
{
|
|
109
|
-
return this._id;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* The Packing Line ID this Summary is associated with
|
|
114
|
-
*
|
|
115
|
-
* @public
|
|
116
|
-
* @type {string}
|
|
117
|
-
*/
|
|
118
|
-
get packingLineId()
|
|
119
|
-
{
|
|
120
|
-
return this._packingLineId;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The Packrun ID this Summary is associated with
|
|
125
|
-
*
|
|
126
|
-
* @public
|
|
127
|
-
* @type {string}
|
|
128
|
-
*/
|
|
129
|
-
get packrunId()
|
|
130
|
-
{
|
|
131
|
-
return this._packrunId;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* When this Summary was Created
|
|
136
|
-
*
|
|
137
|
-
* @public
|
|
138
|
-
* @type {Date}
|
|
139
|
-
*/
|
|
140
|
-
get createdTimestamp()
|
|
141
|
-
{
|
|
142
|
-
return this._createdTimestamp;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* The Time Batch this Summary is associated with
|
|
147
|
-
*
|
|
148
|
-
* @public
|
|
149
|
-
* @type {?string}
|
|
150
|
-
*/
|
|
151
|
-
get timeBatchId()
|
|
152
|
-
{
|
|
153
|
-
return this._timeBatchId;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* An Array of Tray Summary Data Objects for all Sizes and Class Types
|
|
158
|
-
*
|
|
159
|
-
* @public
|
|
160
|
-
* @type {Object[]}
|
|
161
|
-
*/
|
|
162
|
-
get traySummaries()
|
|
163
|
-
{
|
|
164
|
-
return this._traySummaries;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Whether the FreshPack Packrun Summary has been deleted
|
|
169
|
-
*
|
|
170
|
-
* @public
|
|
171
|
-
* @type {boolean}
|
|
172
|
-
*/
|
|
173
|
-
get deleted()
|
|
174
|
-
{
|
|
175
|
-
return this._deleted;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* When the FreshPack Packrun Summary was last updated
|
|
180
|
-
*
|
|
181
|
-
* @public
|
|
182
|
-
* @type {Date}
|
|
183
|
-
*/
|
|
184
|
-
get updateTimestamp()
|
|
185
|
-
{
|
|
186
|
-
return this._updateTimestamp;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* The Site ID associated with this FreshPack Packrun Summary
|
|
191
|
-
*
|
|
192
|
-
* @public
|
|
193
|
-
* @type {number}
|
|
194
|
-
*/
|
|
195
|
-
get siteId()
|
|
196
|
-
{
|
|
197
|
-
return this._siteId;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Convert this **FreshPackPackrunSummaryModel** to a JSON Object
|
|
202
|
-
*
|
|
203
|
-
* @public
|
|
204
|
-
* @return {Object<string, any>}
|
|
205
|
-
*/
|
|
206
|
-
toJSON()
|
|
207
|
-
{
|
|
208
|
-
return {
|
|
209
|
-
id: this._id,
|
|
210
|
-
packingLineId: this._packingLineId,
|
|
211
|
-
packrunId: this._packrunId,
|
|
212
|
-
createdTimestamp: this._createdTimestamp,
|
|
213
|
-
timeBatchId: this._timeBatchId,
|
|
214
|
-
traySummaries: this._traySummaries,
|
|
215
|
-
deleted: this._deleted,
|
|
216
|
-
updateTimestamp: this._updateTimestamp
|
|
217
|
-
};
|
|
98
|
+
this.siteId = siteId;
|
|
218
99
|
}
|
|
219
100
|
|
|
220
101
|
/**
|
|
@@ -248,7 +129,7 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
248
129
|
|
|
249
130
|
if('id' in jsonObject)
|
|
250
131
|
{
|
|
251
|
-
model.
|
|
132
|
+
model.id = (function(){
|
|
252
133
|
if(typeof jsonObject['id'] !== 'string')
|
|
253
134
|
{
|
|
254
135
|
return String(jsonObject['id']);
|
|
@@ -260,7 +141,7 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
260
141
|
|
|
261
142
|
if('packingLineId' in jsonObject)
|
|
262
143
|
{
|
|
263
|
-
model.
|
|
144
|
+
model.packingLineId = (function(){
|
|
264
145
|
if(typeof jsonObject['packingLineId'] !== 'string')
|
|
265
146
|
{
|
|
266
147
|
return String(jsonObject['packingLineId']);
|
|
@@ -272,7 +153,7 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
272
153
|
|
|
273
154
|
if('packrunId' in jsonObject)
|
|
274
155
|
{
|
|
275
|
-
model.
|
|
156
|
+
model.packrunId = (function(){
|
|
276
157
|
if(typeof jsonObject['packrunId'] !== 'string')
|
|
277
158
|
{
|
|
278
159
|
return String(jsonObject['packrunId']);
|
|
@@ -284,7 +165,7 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
284
165
|
|
|
285
166
|
if('createdTimestamp' in jsonObject)
|
|
286
167
|
{
|
|
287
|
-
model.
|
|
168
|
+
model.createdTimestamp = (function(){
|
|
288
169
|
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
289
170
|
{
|
|
290
171
|
return new Date(String(jsonObject['createdTimestamp']));
|
|
@@ -296,7 +177,7 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
296
177
|
|
|
297
178
|
if('timeBatchId' in jsonObject)
|
|
298
179
|
{
|
|
299
|
-
model.
|
|
180
|
+
model.timeBatchId = (function(){
|
|
300
181
|
if(jsonObject['timeBatchId'] === null)
|
|
301
182
|
{
|
|
302
183
|
return null;
|
|
@@ -313,7 +194,7 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
313
194
|
|
|
314
195
|
if('traySummaries' in jsonObject)
|
|
315
196
|
{
|
|
316
|
-
model.
|
|
197
|
+
model.traySummaries = (function(){
|
|
317
198
|
if(Array.isArray(jsonObject['traySummaries']) !== true)
|
|
318
199
|
{
|
|
319
200
|
return [];
|
|
@@ -334,7 +215,7 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
334
215
|
|
|
335
216
|
if('deleted' in jsonObject)
|
|
336
217
|
{
|
|
337
|
-
model.
|
|
218
|
+
model.deleted = (function(){
|
|
338
219
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
339
220
|
{
|
|
340
221
|
return Boolean(jsonObject['deleted']);
|
|
@@ -346,7 +227,7 @@ class FreshPackPackrunSummaryModel extends BaseSiteModel
|
|
|
346
227
|
|
|
347
228
|
if('updateTimestamp' in jsonObject)
|
|
348
229
|
{
|
|
349
|
-
model.
|
|
230
|
+
model.updateTimestamp = (function(){
|
|
350
231
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
351
232
|
{
|
|
352
233
|
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 Growing Method
|
|
11
11
|
*
|
|
12
12
|
* @class
|
|
13
13
|
* @hideconstructor
|
|
14
|
-
* @extends
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class GrowingMethodModel extends
|
|
16
|
+
class GrowingMethodModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* GrowingMethodModel Constructor
|
|
@@ -29,152 +29,57 @@ class GrowingMethodModel extends BaseSiteModel
|
|
|
29
29
|
* The Growing Method 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 Growing Method Code
|
|
38
38
|
*
|
|
39
39
|
* @type {string}
|
|
40
|
-
* @
|
|
40
|
+
* @public
|
|
41
41
|
*/
|
|
42
|
-
this.
|
|
42
|
+
this.code = undefined;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* The Growing Method Name
|
|
46
46
|
*
|
|
47
47
|
* @type {string}
|
|
48
|
-
* @
|
|
48
|
+
* @public
|
|
49
49
|
*/
|
|
50
|
-
this.
|
|
50
|
+
this.name = undefined;
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* The Growing Method Description
|
|
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 Growing Method 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 Growing Method 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 Growing Method
|
|
78
78
|
*
|
|
79
79
|
* @type {number}
|
|
80
|
-
* @
|
|
80
|
+
* @public
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* The Growing Method ID
|
|
87
|
-
*
|
|
88
|
-
* @public
|
|
89
|
-
* @type {string}
|
|
90
|
-
*/
|
|
91
|
-
get id()
|
|
92
|
-
{
|
|
93
|
-
return this._id;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* The Growing Method Code
|
|
98
|
-
*
|
|
99
|
-
* @public
|
|
100
|
-
* @type {string}
|
|
101
|
-
*/
|
|
102
|
-
get code()
|
|
103
|
-
{
|
|
104
|
-
return this._code;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* The Growing Method Name
|
|
109
|
-
*
|
|
110
|
-
* @public
|
|
111
|
-
* @type {string}
|
|
112
|
-
*/
|
|
113
|
-
get name()
|
|
114
|
-
{
|
|
115
|
-
return this._name;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* The Growing Method Description
|
|
120
|
-
*
|
|
121
|
-
* @public
|
|
122
|
-
* @type {string}
|
|
123
|
-
*/
|
|
124
|
-
get description()
|
|
125
|
-
{
|
|
126
|
-
return this._description;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Whether the Growing Method has been deleted
|
|
131
|
-
*
|
|
132
|
-
* @public
|
|
133
|
-
* @type {boolean}
|
|
134
|
-
*/
|
|
135
|
-
get deleted()
|
|
136
|
-
{
|
|
137
|
-
return this._deleted;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* When the Growing Method 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 Growing Method
|
|
153
|
-
*
|
|
154
|
-
* @public
|
|
155
|
-
* @type {number}
|
|
156
|
-
*/
|
|
157
|
-
get siteId()
|
|
158
|
-
{
|
|
159
|
-
return this._siteId;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Convert this **GrowingMethodModel** to a JSON Object
|
|
164
|
-
*
|
|
165
|
-
* @public
|
|
166
|
-
* @return {Object<string, any>}
|
|
167
|
-
*/
|
|
168
|
-
toJSON()
|
|
169
|
-
{
|
|
170
|
-
return {
|
|
171
|
-
id: this._id,
|
|
172
|
-
code: this._code,
|
|
173
|
-
name: this._name,
|
|
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 GrowingMethodModel 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 GrowingMethodModel extends BaseSiteModel
|
|
|
220
125
|
|
|
221
126
|
if('code' in jsonObject)
|
|
222
127
|
{
|
|
223
|
-
model.
|
|
128
|
+
model.code = (function(){
|
|
224
129
|
if(typeof jsonObject['code'] !== 'string')
|
|
225
130
|
{
|
|
226
131
|
return String(jsonObject['code']);
|
|
@@ -232,7 +137,7 @@ class GrowingMethodModel extends BaseSiteModel
|
|
|
232
137
|
|
|
233
138
|
if('name' in jsonObject)
|
|
234
139
|
{
|
|
235
|
-
model.
|
|
140
|
+
model.name = (function(){
|
|
236
141
|
if(typeof jsonObject['name'] !== 'string')
|
|
237
142
|
{
|
|
238
143
|
return String(jsonObject['name']);
|
|
@@ -244,7 +149,7 @@ class GrowingMethodModel 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 GrowingMethodModel 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 GrowingMethodModel 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']));
|