@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.
Files changed (136) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/AccountPolicyController.js +1 -1
  3. package/lib/Controllers/ApiAccountController.js +2 -2
  4. package/lib/Controllers/CompanyController.js +1 -1
  5. package/lib/Controllers/FirebaseTokenController.js +1 -1
  6. package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +2 -2
  7. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +2 -2
  8. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +1 -1
  9. package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +2 -2
  10. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +2 -2
  11. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +1 -1
  12. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +2 -2
  13. package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +2 -2
  14. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +2 -2
  15. package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +1 -1
  16. package/lib/Controllers/Packhouse/Site/PackTypeController.js +1 -1
  17. package/lib/Controllers/Packhouse/Site/PackingLineController.js +1 -1
  18. package/lib/Controllers/Packhouse/Site/PackrunController.js +288 -2
  19. package/lib/Controllers/Packhouse/Site/RejectBinController.js +2 -2
  20. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +1 -1
  21. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +2 -2
  22. package/lib/Controllers/Packhouse/Site/ShiftController.js +2 -2
  23. package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +2 -2
  24. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +2 -2
  25. package/lib/Controllers/Packhouse/Site/VarietyController.js +1 -1
  26. package/lib/Controllers/RTU/GlobalSettingsController.js +2 -2
  27. package/lib/Controllers/RTU/PluginSettingsController.js +2 -2
  28. package/lib/Controllers/RTUController.js +1 -1
  29. package/lib/Controllers/RTUPluginController.js +1 -1
  30. package/lib/Controllers/Site/AlarmController.js +2 -2
  31. package/lib/Controllers/Site/AlarmGroupController.js +1 -1
  32. package/lib/Controllers/Site/DefinitionController.js +1 -1
  33. package/lib/Controllers/Site/PermanentObjectController.js +1 -1
  34. package/lib/Controllers/Site/PermanentObjectDataController.js +2 -2
  35. package/lib/Controllers/Site/PointController.js +2 -2
  36. package/lib/Controllers/Site/TemporaryObjectController.js +1 -1
  37. package/lib/Controllers/SiteController.js +1 -1
  38. package/lib/Controllers/TokenController.js +2 -2
  39. package/lib/Controllers/ToolsController.js +1 -1
  40. package/lib/Controllers/UserAccountActionTokenController.js +2 -2
  41. package/lib/Controllers/UserAccountController.js +2 -2
  42. package/lib/DataItems/PointValueItem.js +2 -2
  43. package/lib/Errors/BadRequestError.js +7 -3
  44. package/lib/Errors/ForbiddenError.js +7 -3
  45. package/lib/Errors/NetworkError.js +7 -3
  46. package/lib/Errors/NotAllowedError.js +7 -3
  47. package/lib/Errors/NotFoundError.js +7 -3
  48. package/lib/Errors/ServerError.js +7 -3
  49. package/lib/Errors/UnauthorizedError.js +7 -3
  50. package/lib/Models/AccountPolicyModel.js +29 -133
  51. package/lib/Models/ApiAccountModel.js +29 -133
  52. package/lib/Models/BaseModel.js +6 -2
  53. package/lib/Models/CompanyModel.js +23 -101
  54. package/lib/Models/FirebaseTokenModel.js +32 -149
  55. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +43 -185
  56. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +40 -169
  57. package/lib/Models/Packhouse/Site/CompacSizerModel.js +58 -265
  58. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +46 -201
  59. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +40 -169
  60. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +34 -137
  61. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +52 -233
  62. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +58 -265
  63. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +40 -169
  64. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +34 -137
  65. package/lib/Models/Packhouse/Site/PackTypeModel.js +40 -169
  66. package/lib/Models/Packhouse/Site/PackingLineModel.js +61 -281
  67. package/lib/Models/Packhouse/Site/PackrunModel.js +61 -281
  68. package/lib/Models/Packhouse/Site/RejectBinModel.js +43 -185
  69. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +52 -233
  70. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +46 -201
  71. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +52 -233
  72. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +127 -633
  73. package/lib/Models/Packhouse/Site/ShiftModel.js +73 -345
  74. package/lib/Models/Packhouse/Site/VarietyModel.js +40 -169
  75. package/lib/Models/RTUModel.js +26 -117
  76. package/lib/Models/RTUPluginModel.js +23 -101
  77. package/lib/Models/Site/AlarmGroupModel.js +37 -153
  78. package/lib/Models/Site/AlarmModel.js +67 -313
  79. package/lib/Models/Site/DefinitionModel.js +34 -137
  80. package/lib/Models/Site/PermanentObjectDataModel.js +40 -169
  81. package/lib/Models/Site/PermanentObjectModel.js +37 -153
  82. package/lib/Models/Site/PointModel.js +49 -217
  83. package/lib/Models/Site/TemporaryObjectModel.js +34 -137
  84. package/lib/Models/Site/index.js +0 -3
  85. package/lib/Models/SiteModel.js +26 -117
  86. package/lib/Models/TokenModel.js +38 -181
  87. package/lib/Models/UserAccountActionTokenModel.js +41 -197
  88. package/lib/Models/UserAccountModel.js +38 -181
  89. package/lib/PackageVersion.js +1 -1
  90. package/lib/Points.js +1 -1
  91. package/lib/RequestHelper.js +2 -2
  92. package/lib/WebSocketHelper.js +1 -1
  93. package/lib/index.d.ts +945 -1206
  94. package/package.json +3 -3
  95. package/src/Controllers/Packhouse/Site/PackrunController.js +361 -0
  96. package/src/Models/AccountPolicyModel.js +21 -117
  97. package/src/Models/ApiAccountModel.js +21 -117
  98. package/src/Models/CompanyModel.js +15 -87
  99. package/src/Models/FirebaseTokenModel.js +24 -132
  100. package/src/Models/Packhouse/Site/BinTipWeightModel.js +32 -163
  101. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +29 -148
  102. package/src/Models/Packhouse/Site/CompacSizerModel.js +47 -238
  103. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +35 -178
  104. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +29 -148
  105. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +23 -118
  106. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +41 -208
  107. package/src/Models/Packhouse/Site/DowntimeEventModel.js +47 -238
  108. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +29 -148
  109. package/src/Models/Packhouse/Site/GrowingMethodModel.js +23 -118
  110. package/src/Models/Packhouse/Site/PackTypeModel.js +29 -148
  111. package/src/Models/Packhouse/Site/PackingLineModel.js +50 -253
  112. package/src/Models/Packhouse/Site/PackrunModel.js +50 -253
  113. package/src/Models/Packhouse/Site/RejectBinModel.js +32 -163
  114. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +41 -208
  115. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +35 -178
  116. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +41 -208
  117. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +116 -583
  118. package/src/Models/Packhouse/Site/ShiftModel.js +62 -313
  119. package/src/Models/Packhouse/Site/VarietyModel.js +29 -148
  120. package/src/Models/RTUModel.js +18 -102
  121. package/src/Models/RTUPluginModel.js +15 -87
  122. package/src/Models/Site/AlarmGroupModel.js +26 -133
  123. package/src/Models/Site/AlarmModel.js +56 -283
  124. package/src/Models/Site/DefinitionModel.js +23 -118
  125. package/src/Models/Site/PermanentObjectDataModel.js +29 -148
  126. package/src/Models/Site/PermanentObjectModel.js +26 -133
  127. package/src/Models/Site/PointModel.js +38 -193
  128. package/src/Models/Site/TemporaryObjectModel.js +23 -118
  129. package/src/Models/Site/index.js +0 -2
  130. package/src/Models/SiteModel.js +18 -102
  131. package/src/Models/TokenModel.js +30 -162
  132. package/src/Models/UserAccountActionTokenModel.js +33 -177
  133. package/src/Models/UserAccountModel.js +30 -162
  134. package/src/PackageVersion.js +1 -1
  135. package/lib/Models/Site/BaseSiteModel.js +0 -58
  136. package/src/Models/Site/BaseSiteModel.js +0 -30
@@ -28,213 +28,81 @@ class UserAccountModel extends BaseModel
28
28
  * The User Account ID
29
29
  *
30
30
  * @type {string}
31
- * @private
31
+ * @public
32
32
  */
33
- this._id = undefined;
33
+ this.id = undefined;
34
34
 
35
35
  /**
36
36
  * The User's Email Address
37
37
  *
38
38
  * @type {string}
39
- * @private
39
+ * @public
40
40
  */
41
- this._email = undefined;
41
+ this.email = undefined;
42
42
 
43
43
  /**
44
44
  * The User's First Name
45
45
  *
46
46
  * @type {?string}
47
- * @private
47
+ * @public
48
48
  */
49
- this._firstName = undefined;
49
+ this.firstName = undefined;
50
50
 
51
51
  /**
52
52
  * The User's Last Name
53
53
  *
54
54
  * @type {?string}
55
- * @private
55
+ * @public
56
56
  */
57
- this._lastName = undefined;
57
+ this.lastName = undefined;
58
58
 
59
59
  /**
60
60
  * The Company this User belongs to
61
61
  *
62
62
  * @type {string}
63
- * @private
63
+ * @public
64
64
  */
65
- this._companyId = undefined;
65
+ this.companyId = undefined;
66
66
 
67
67
  /**
68
68
  * The Policies that apply to this User Account
69
69
  *
70
70
  * @type {string[]}
71
- * @private
71
+ * @public
72
72
  */
73
- this._policies = undefined;
73
+ this.policies = undefined;
74
74
 
75
75
  /**
76
76
  * Whether a Password has been Set for the User Account
77
77
  *
78
78
  * @type {boolean}
79
- * @private
79
+ * @public
80
80
  */
81
- this._hasPassword = undefined;
81
+ this.hasPassword = undefined;
82
82
 
83
83
  /**
84
84
  * Whether a Pin Code has been Set for the User Account
85
85
  *
86
86
  * @type {boolean}
87
- * @private
87
+ * @public
88
88
  */
89
- this._hasPinCode = undefined;
89
+ this.hasPinCode = undefined;
90
90
 
91
91
  /**
92
92
  * Whether the User Account has been deleted
93
93
  *
94
94
  * @type {boolean}
95
- * @private
95
+ * @public
96
96
  */
97
- this._deleted = undefined;
97
+ this.deleted = undefined;
98
98
 
99
99
  /**
100
100
  * When the User Account was last updated
101
101
  *
102
102
  * @type {Date}
103
- * @private
103
+ * @public
104
104
  */
105
- this._updateTimestamp = undefined;
106
- }
107
-
108
- /**
109
- * The User Account ID
110
- *
111
- * @public
112
- * @type {string}
113
- */
114
- get id()
115
- {
116
- return this._id;
117
- }
118
-
119
- /**
120
- * The User's Email Address
121
- *
122
- * @public
123
- * @type {string}
124
- */
125
- get email()
126
- {
127
- return this._email;
128
- }
129
-
130
- /**
131
- * The User's First Name
132
- *
133
- * @public
134
- * @type {?string}
135
- */
136
- get firstName()
137
- {
138
- return this._firstName;
139
- }
140
-
141
- /**
142
- * The User's Last Name
143
- *
144
- * @public
145
- * @type {?string}
146
- */
147
- get lastName()
148
- {
149
- return this._lastName;
150
- }
151
-
152
- /**
153
- * The Company this User belongs to
154
- *
155
- * @public
156
- * @type {string}
157
- */
158
- get companyId()
159
- {
160
- return this._companyId;
161
- }
162
-
163
- /**
164
- * The Policies that apply to this User Account
165
- *
166
- * @public
167
- * @type {string[]}
168
- */
169
- get policies()
170
- {
171
- return this._policies;
172
- }
173
-
174
- /**
175
- * Whether a Password has been Set for the User Account
176
- *
177
- * @public
178
- * @type {boolean}
179
- */
180
- get hasPassword()
181
- {
182
- return this._hasPassword;
183
- }
184
-
185
- /**
186
- * Whether a Pin Code has been Set for the User Account
187
- *
188
- * @public
189
- * @type {boolean}
190
- */
191
- get hasPinCode()
192
- {
193
- return this._hasPinCode;
194
- }
195
-
196
- /**
197
- * Whether the User Account has been deleted
198
- *
199
- * @public
200
- * @type {boolean}
201
- */
202
- get deleted()
203
- {
204
- return this._deleted;
205
- }
206
-
207
- /**
208
- * When the User Account was last updated
209
- *
210
- * @public
211
- * @type {Date}
212
- */
213
- get updateTimestamp()
214
- {
215
- return this._updateTimestamp;
216
- }
217
-
218
- /**
219
- * Convert this **UserAccountModel** to a JSON Object
220
- *
221
- * @public
222
- * @return {Object<string, any>}
223
- */
224
- toJSON()
225
- {
226
- return {
227
- id: this._id,
228
- email: this._email,
229
- firstName: this._firstName,
230
- lastName: this._lastName,
231
- companyId: this._companyId,
232
- policies: this._policies,
233
- hasPassword: this._hasPassword,
234
- hasPinCode: this._hasPinCode,
235
- deleted: this._deleted,
236
- updateTimestamp: this._updateTimestamp
237
- };
105
+ this.updateTimestamp = undefined;
238
106
  }
239
107
 
240
108
  /**
@@ -267,7 +135,7 @@ class UserAccountModel extends BaseModel
267
135
 
268
136
  if('id' in jsonObject)
269
137
  {
270
- model._id = (function(){
138
+ model.id = (function(){
271
139
  if(typeof jsonObject['id'] !== 'string')
272
140
  {
273
141
  return String(jsonObject['id']);
@@ -279,7 +147,7 @@ class UserAccountModel extends BaseModel
279
147
 
280
148
  if('email' in jsonObject)
281
149
  {
282
- model._email = (function(){
150
+ model.email = (function(){
283
151
  if(typeof jsonObject['email'] !== 'string')
284
152
  {
285
153
  return String(jsonObject['email']);
@@ -291,7 +159,7 @@ class UserAccountModel extends BaseModel
291
159
 
292
160
  if('firstName' in jsonObject)
293
161
  {
294
- model._firstName = (function(){
162
+ model.firstName = (function(){
295
163
  if(jsonObject['firstName'] === null)
296
164
  {
297
165
  return null;
@@ -308,7 +176,7 @@ class UserAccountModel extends BaseModel
308
176
 
309
177
  if('lastName' in jsonObject)
310
178
  {
311
- model._lastName = (function(){
179
+ model.lastName = (function(){
312
180
  if(jsonObject['lastName'] === null)
313
181
  {
314
182
  return null;
@@ -325,7 +193,7 @@ class UserAccountModel extends BaseModel
325
193
 
326
194
  if('companyId' in jsonObject)
327
195
  {
328
- model._companyId = (function(){
196
+ model.companyId = (function(){
329
197
  if(typeof jsonObject['companyId'] !== 'string')
330
198
  {
331
199
  return String(jsonObject['companyId']);
@@ -337,7 +205,7 @@ class UserAccountModel extends BaseModel
337
205
 
338
206
  if('policies' in jsonObject)
339
207
  {
340
- model._policies = (function(){
208
+ model.policies = (function(){
341
209
  if(Array.isArray(jsonObject['policies']) !== true)
342
210
  {
343
211
  return [];
@@ -358,7 +226,7 @@ class UserAccountModel extends BaseModel
358
226
 
359
227
  if('hasPassword' in jsonObject)
360
228
  {
361
- model._hasPassword = (function(){
229
+ model.hasPassword = (function(){
362
230
  if(typeof jsonObject['hasPassword'] !== 'boolean')
363
231
  {
364
232
  return Boolean(jsonObject['hasPassword']);
@@ -370,7 +238,7 @@ class UserAccountModel extends BaseModel
370
238
 
371
239
  if('hasPinCode' in jsonObject)
372
240
  {
373
- model._hasPinCode = (function(){
241
+ model.hasPinCode = (function(){
374
242
  if(typeof jsonObject['hasPinCode'] !== 'boolean')
375
243
  {
376
244
  return Boolean(jsonObject['hasPinCode']);
@@ -382,7 +250,7 @@ class UserAccountModel extends BaseModel
382
250
 
383
251
  if('deleted' in jsonObject)
384
252
  {
385
- model._deleted = (function(){
253
+ model.deleted = (function(){
386
254
  if(typeof jsonObject['deleted'] !== 'boolean')
387
255
  {
388
256
  return Boolean(jsonObject['deleted']);
@@ -394,7 +262,7 @@ class UserAccountModel extends BaseModel
394
262
 
395
263
  if('updateTimestamp' in jsonObject)
396
264
  {
397
- model._updateTimestamp = (function(){
265
+ model.updateTimestamp = (function(){
398
266
  if(typeof jsonObject['updateTimestamp'] !== 'string')
399
267
  {
400
268
  return new Date(String(jsonObject['updateTimestamp']));
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- export const version = '1.4.1';
2
+ export const version = '2.1.0';
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _BaseModel2 = _interopRequireDefault(require("../../Models/BaseModel"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
-
16
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
17
-
18
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
19
-
20
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
21
-
22
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
23
-
24
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
25
-
26
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
27
-
28
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
-
30
- /**
31
- * The Abstract **BaseSiteModel** Class
32
- *
33
- * @class
34
- * @abstract
35
- * @hideconstructor
36
- * @extends BaseModel
37
- */
38
- var BaseSiteModel = /*#__PURE__*/function (_BaseModel) {
39
- _inherits(BaseSiteModel, _BaseModel);
40
-
41
- var _super = _createSuper(BaseSiteModel);
42
-
43
- /**
44
- * BaseSiteModel Constructor
45
- *
46
- * @protected
47
- */
48
- function BaseSiteModel() {
49
- _classCallCheck(this, BaseSiteModel);
50
-
51
- return _super.call(this);
52
- }
53
-
54
- return BaseSiteModel;
55
- }(_BaseModel2.default);
56
-
57
- var _default = BaseSiteModel;
58
- exports.default = _default;
@@ -1,30 +0,0 @@
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
- * The Abstract **BaseSiteModel** Class
11
- *
12
- * @class
13
- * @abstract
14
- * @hideconstructor
15
- * @extends BaseModel
16
- */
17
- class BaseSiteModel extends BaseModel
18
- {
19
- /**
20
- * BaseSiteModel Constructor
21
- *
22
- * @protected
23
- */
24
- constructor()
25
- {
26
- super();
27
- }
28
- }
29
-
30
- export default BaseSiteModel;