@ricado/api-client 2.2.0 → 2.3.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 (98) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/DataItems/PointValueItem.js +3 -3
  3. package/lib/Models/AccountPolicyModel.js +7 -7
  4. package/lib/Models/ApiAccountModel.js +7 -7
  5. package/lib/Models/CompanyModel.js +5 -5
  6. package/lib/Models/FirebaseTokenModel.js +8 -8
  7. package/lib/Models/Packhouse/Site/BinTipBinModel.js +13 -13
  8. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
  9. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
  10. package/lib/Models/Packhouse/Site/CompacSizerModel.js +14 -14
  11. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
  12. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
  13. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
  14. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
  15. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
  16. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
  17. package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +10 -10
  18. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
  19. package/lib/Models/Packhouse/Site/PackTypeModel.js +8 -8
  20. package/lib/Models/Packhouse/Site/PackingLineModel.js +16 -16
  21. package/lib/Models/Packhouse/Site/PackrunModel.js +18 -18
  22. package/lib/Models/Packhouse/Site/RejectBinModel.js +9 -9
  23. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
  24. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
  25. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
  26. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +44 -44
  27. package/lib/Models/Packhouse/Site/ShiftModel.js +26 -19
  28. package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +14 -14
  29. package/lib/Models/Packhouse/Site/ShiftTaskModel.js +14 -14
  30. package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
  31. package/lib/Models/Packhouse/Site/VarietyModel.js +8 -8
  32. package/lib/Models/RTUModel.js +6 -6
  33. package/lib/Models/RTUPluginModel.js +5 -5
  34. package/lib/Models/Site/AlarmGroupModel.js +7 -7
  35. package/lib/Models/Site/AlarmModel.js +17 -17
  36. package/lib/Models/Site/DefinitionModel.js +6 -6
  37. package/lib/Models/Site/PermanentObjectDataModel.js +8 -8
  38. package/lib/Models/Site/PermanentObjectModel.js +7 -7
  39. package/lib/Models/Site/PointModel.js +11 -11
  40. package/lib/Models/Site/TemporaryObjectModel.js +6 -6
  41. package/lib/Models/SiteModel.js +6 -6
  42. package/lib/Models/TokenModel.js +10 -10
  43. package/lib/Models/UserAccountActionTokenModel.js +11 -11
  44. package/lib/Models/UserAccountModel.js +10 -10
  45. package/lib/PackageVersion.js +1 -1
  46. package/lib/Points.js +22 -12
  47. package/lib/WebSocketHelper.js +29 -13
  48. package/lib/index.d.ts +361 -361
  49. package/lib/index.js +3 -3
  50. package/package.json +1 -1
  51. package/src/DataItems/PointValueItem.js +3 -3
  52. package/src/Models/AccountPolicyModel.js +7 -7
  53. package/src/Models/ApiAccountModel.js +7 -7
  54. package/src/Models/CompanyModel.js +5 -5
  55. package/src/Models/FirebaseTokenModel.js +8 -8
  56. package/src/Models/Packhouse/Site/BinTipBinModel.js +13 -13
  57. package/src/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
  58. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
  59. package/src/Models/Packhouse/Site/CompacSizerModel.js +14 -14
  60. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
  61. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
  62. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
  63. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
  64. package/src/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
  65. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
  66. package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +10 -10
  67. package/src/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
  68. package/src/Models/Packhouse/Site/PackTypeModel.js +8 -8
  69. package/src/Models/Packhouse/Site/PackingLineModel.js +16 -16
  70. package/src/Models/Packhouse/Site/PackrunModel.js +18 -18
  71. package/src/Models/Packhouse/Site/RejectBinModel.js +9 -9
  72. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
  73. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
  74. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
  75. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +44 -44
  76. package/src/Models/Packhouse/Site/ShiftModel.js +29 -19
  77. package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +14 -14
  78. package/src/Models/Packhouse/Site/ShiftTaskModel.js +14 -14
  79. package/src/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
  80. package/src/Models/Packhouse/Site/VarietyModel.js +8 -8
  81. package/src/Models/RTUModel.js +6 -6
  82. package/src/Models/RTUPluginModel.js +5 -5
  83. package/src/Models/Site/AlarmGroupModel.js +7 -7
  84. package/src/Models/Site/AlarmModel.js +17 -17
  85. package/src/Models/Site/DefinitionModel.js +6 -6
  86. package/src/Models/Site/PermanentObjectDataModel.js +8 -8
  87. package/src/Models/Site/PermanentObjectModel.js +7 -7
  88. package/src/Models/Site/PointModel.js +11 -11
  89. package/src/Models/Site/TemporaryObjectModel.js +6 -6
  90. package/src/Models/SiteModel.js +6 -6
  91. package/src/Models/TokenModel.js +10 -10
  92. package/src/Models/UserAccountActionTokenModel.js +11 -11
  93. package/src/Models/UserAccountModel.js +10 -10
  94. package/src/PackageVersion.js +1 -1
  95. package/src/Points.js +24 -12
  96. package/src/WebSocketHelper.js +34 -13
  97. package/src/index.js +3 -3
  98. package/types/tslint.json +2 -1
package/lib/index.js CHANGED
@@ -111,7 +111,7 @@ function isDefined(variable) {
111
111
  * The JSON Web Token for all Authenticated API Calls
112
112
  *
113
113
  * @private
114
- * @type {string}
114
+ * @type {string|undefined}
115
115
  */
116
116
 
117
117
 
@@ -516,13 +516,13 @@ function ping() {
516
516
  }
517
517
  /**
518
518
  *
519
- * @param {string} jwt The JWT Token
519
+ * @param {string|undefined} jwt The JWT Token
520
520
  * @return {boolean}
521
521
  */
522
522
 
523
523
 
524
524
  function isJwtValid(jwt) {
525
- if (jwt === null || typeof jwt !== 'string') {
525
+ if (jwt === null || jwt === undefined || typeof jwt !== 'string') {
526
526
  return false;
527
527
  }
528
528
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricado/api-client",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "RICADO Gen 4 API Client Library for NodeJS and Browsers",
5
5
  "author": {
6
6
  "name": "Ash Neilson"
@@ -25,7 +25,7 @@ class PointValueItem
25
25
  * @type {number}
26
26
  * @private
27
27
  */
28
- this._id = undefined;
28
+ this._id = 0;
29
29
 
30
30
  /**
31
31
  * The Point Value
@@ -33,7 +33,7 @@ class PointValueItem
33
33
  * @type {any}
34
34
  * @private
35
35
  */
36
- this._value = undefined;
36
+ this._value = null;
37
37
 
38
38
  /**
39
39
  * When the Point Value last changed
@@ -41,7 +41,7 @@ class PointValueItem
41
41
  * @type {Date}
42
42
  * @private
43
43
  */
44
- this._timestamp = undefined;
44
+ this._timestamp = new Date();
45
45
  }
46
46
 
47
47
  /**
@@ -30,7 +30,7 @@ class AccountPolicyModel extends BaseModel
30
30
  * @type {string}
31
31
  * @public
32
32
  */
33
- this.id = undefined;
33
+ this.id = "";
34
34
 
35
35
  /**
36
36
  * The Policy Name
@@ -38,7 +38,7 @@ class AccountPolicyModel extends BaseModel
38
38
  * @type {string}
39
39
  * @public
40
40
  */
41
- this.name = undefined;
41
+ this.name = "";
42
42
 
43
43
  /**
44
44
  * The Company this Policy belongs to
@@ -46,7 +46,7 @@ class AccountPolicyModel extends BaseModel
46
46
  * @type {string}
47
47
  * @public
48
48
  */
49
- this.companyId = undefined;
49
+ this.companyId = "";
50
50
 
51
51
  /**
52
52
  * The Resources this Policy provides
@@ -54,7 +54,7 @@ class AccountPolicyModel extends BaseModel
54
54
  * @type {Array<{id: any, type: string, actions: string[], permission: string}>}
55
55
  * @public
56
56
  */
57
- this.resources = undefined;
57
+ this.resources = [];
58
58
 
59
59
  /**
60
60
  * The Rules this Policy provides
@@ -62,7 +62,7 @@ class AccountPolicyModel extends BaseModel
62
62
  * @type {Object[]}
63
63
  * @public
64
64
  */
65
- this.rules = undefined;
65
+ this.rules = [];
66
66
 
67
67
  /**
68
68
  * Whether the Account Policy has been deleted
@@ -70,7 +70,7 @@ class AccountPolicyModel extends BaseModel
70
70
  * @type {boolean}
71
71
  * @public
72
72
  */
73
- this.deleted = undefined;
73
+ this.deleted = false;
74
74
 
75
75
  /**
76
76
  * When the Account Policy was last updated
@@ -78,7 +78,7 @@ class AccountPolicyModel extends BaseModel
78
78
  * @type {Date}
79
79
  * @public
80
80
  */
81
- this.updateTimestamp = undefined;
81
+ this.updateTimestamp = new Date();
82
82
  }
83
83
 
84
84
  /**
@@ -30,7 +30,7 @@ class ApiAccountModel extends BaseModel
30
30
  * @type {string}
31
31
  * @public
32
32
  */
33
- this.id = undefined;
33
+ this.id = "";
34
34
 
35
35
  /**
36
36
  * API Key
@@ -38,7 +38,7 @@ class ApiAccountModel extends BaseModel
38
38
  * @type {?string}
39
39
  * @public
40
40
  */
41
- this.key = undefined;
41
+ this.key = null;
42
42
 
43
43
  /**
44
44
  * The API Account Name
@@ -46,7 +46,7 @@ class ApiAccountModel extends BaseModel
46
46
  * @type {string}
47
47
  * @public
48
48
  */
49
- this.name = undefined;
49
+ this.name = "";
50
50
 
51
51
  /**
52
52
  * The Company this API Account belongs to
@@ -54,7 +54,7 @@ class ApiAccountModel extends BaseModel
54
54
  * @type {string}
55
55
  * @public
56
56
  */
57
- this.companyId = undefined;
57
+ this.companyId = "";
58
58
 
59
59
  /**
60
60
  * The Policies that apply to this API Account
@@ -62,7 +62,7 @@ class ApiAccountModel extends BaseModel
62
62
  * @type {string[]}
63
63
  * @public
64
64
  */
65
- this.policies = undefined;
65
+ this.policies = [];
66
66
 
67
67
  /**
68
68
  * Whether the API Account has been deleted
@@ -70,7 +70,7 @@ class ApiAccountModel extends BaseModel
70
70
  * @type {boolean}
71
71
  * @public
72
72
  */
73
- this.deleted = undefined;
73
+ this.deleted = false;
74
74
 
75
75
  /**
76
76
  * When the API Account was last updated
@@ -78,7 +78,7 @@ class ApiAccountModel extends BaseModel
78
78
  * @type {Date}
79
79
  * @public
80
80
  */
81
- this.updateTimestamp = undefined;
81
+ this.updateTimestamp = new Date();
82
82
  }
83
83
 
84
84
  /**
@@ -30,7 +30,7 @@ class CompanyModel extends BaseModel
30
30
  * @type {string}
31
31
  * @public
32
32
  */
33
- this.id = undefined;
33
+ this.id = "";
34
34
 
35
35
  /**
36
36
  * The Company Display Name
@@ -38,7 +38,7 @@ class CompanyModel extends BaseModel
38
38
  * @type {string}
39
39
  * @public
40
40
  */
41
- this.displayName = undefined;
41
+ this.displayName = "";
42
42
 
43
43
  /**
44
44
  * The Company Legal Name
@@ -46,7 +46,7 @@ class CompanyModel extends BaseModel
46
46
  * @type {string}
47
47
  * @public
48
48
  */
49
- this.legalName = undefined;
49
+ this.legalName = "";
50
50
 
51
51
  /**
52
52
  * Whether the Company has been deleted
@@ -54,7 +54,7 @@ class CompanyModel extends BaseModel
54
54
  * @type {boolean}
55
55
  * @public
56
56
  */
57
- this.deleted = undefined;
57
+ this.deleted = false;
58
58
 
59
59
  /**
60
60
  * When the Company was last updated
@@ -62,7 +62,7 @@ class CompanyModel extends BaseModel
62
62
  * @type {Date}
63
63
  * @public
64
64
  */
65
- this.updateTimestamp = undefined;
65
+ this.updateTimestamp = new Date();
66
66
  }
67
67
 
68
68
  /**
@@ -30,7 +30,7 @@ class FirebaseTokenModel extends BaseModel
30
30
  * @type {string}
31
31
  * @public
32
32
  */
33
- this.id = undefined;
33
+ this.id = "";
34
34
 
35
35
  /**
36
36
  * The Account this Firebase Token belongs to
@@ -38,7 +38,7 @@ class FirebaseTokenModel extends BaseModel
38
38
  * @type {string}
39
39
  * @public
40
40
  */
41
- this.accountId = undefined;
41
+ this.accountId = "";
42
42
 
43
43
  /**
44
44
  * The Firebase Token
@@ -46,7 +46,7 @@ class FirebaseTokenModel extends BaseModel
46
46
  * @type {string}
47
47
  * @public
48
48
  */
49
- this.token = undefined;
49
+ this.token = "";
50
50
 
51
51
  /**
52
52
  * Whether the Firebase Token should receive Notifications
@@ -54,7 +54,7 @@ class FirebaseTokenModel extends BaseModel
54
54
  * @type {boolean}
55
55
  * @public
56
56
  */
57
- this.enabled = undefined;
57
+ this.enabled = false;
58
58
 
59
59
  /**
60
60
  * The Device Name
@@ -62,7 +62,7 @@ class FirebaseTokenModel extends BaseModel
62
62
  * @type {string}
63
63
  * @public
64
64
  */
65
- this.deviceName = undefined;
65
+ this.deviceName = "";
66
66
 
67
67
  /**
68
68
  * The Device Platform
@@ -70,7 +70,7 @@ class FirebaseTokenModel extends BaseModel
70
70
  * @type {string}
71
71
  * @public
72
72
  */
73
- this.devicePlatform = undefined;
73
+ this.devicePlatform = "";
74
74
 
75
75
  /**
76
76
  * Whether the Firebase Token has been deleted
@@ -78,7 +78,7 @@ class FirebaseTokenModel extends BaseModel
78
78
  * @type {boolean}
79
79
  * @public
80
80
  */
81
- this.deleted = undefined;
81
+ this.deleted = false;
82
82
 
83
83
  /**
84
84
  * When the Firebase Token was last updated
@@ -86,7 +86,7 @@ class FirebaseTokenModel extends BaseModel
86
86
  * @type {Date}
87
87
  * @public
88
88
  */
89
- this.updateTimestamp = undefined;
89
+ this.updateTimestamp = new Date();
90
90
  }
91
91
 
92
92
  /**
@@ -31,7 +31,7 @@ class BinTipBinModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The Bin Tip ID associated with this Bin
@@ -39,7 +39,7 @@ class BinTipBinModel extends BaseModel
39
39
  * @type {string}
40
40
  * @public
41
41
  */
42
- this.binTipId = undefined;
42
+ this.binTipId = "";
43
43
 
44
44
  /**
45
45
  * The Packrun ID associated with this Bin
@@ -47,7 +47,7 @@ class BinTipBinModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.packrunId = undefined;
50
+ this.packrunId = "";
51
51
 
52
52
  /**
53
53
  * When this Bin was Created
@@ -55,7 +55,7 @@ class BinTipBinModel extends BaseModel
55
55
  * @type {Date}
56
56
  * @public
57
57
  */
58
- this.createdTimestamp = undefined;
58
+ this.createdTimestamp = new Date();
59
59
 
60
60
  /**
61
61
  * A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
@@ -63,7 +63,7 @@ class BinTipBinModel extends BaseModel
63
63
  * @type {?string}
64
64
  * @public
65
65
  */
66
- this.binNumber = undefined;
66
+ this.binNumber = null;
67
67
 
68
68
  /**
69
69
  * The Time Batch ID associated with this Bin
@@ -71,7 +71,7 @@ class BinTipBinModel extends BaseModel
71
71
  * @type {?string}
72
72
  * @public
73
73
  */
74
- this.timeBatchId = undefined;
74
+ this.timeBatchId = null;
75
75
 
76
76
  /**
77
77
  * The Full Weight for this Bin
@@ -79,7 +79,7 @@ class BinTipBinModel extends BaseModel
79
79
  * @type {?number}
80
80
  * @public
81
81
  */
82
- this.fullWeight = undefined;
82
+ this.fullWeight = null;
83
83
 
84
84
  /**
85
85
  * The Empty Weight for this Bin
@@ -87,7 +87,7 @@ class BinTipBinModel extends BaseModel
87
87
  * @type {?number}
88
88
  * @public
89
89
  */
90
- this.emptyWeight = undefined;
90
+ this.emptyWeight = null;
91
91
 
92
92
  /**
93
93
  * The `BinTipWeight` ID as the Source for the Full Weight of this Bin
@@ -95,7 +95,7 @@ class BinTipBinModel extends BaseModel
95
95
  * @type {?string}
96
96
  * @public
97
97
  */
98
- this.fullBinWeightId = undefined;
98
+ this.fullBinWeightId = null;
99
99
 
100
100
  /**
101
101
  * The `BinTipWeight` ID as the Source for the Empty Weight of this Bin
@@ -103,7 +103,7 @@ class BinTipBinModel extends BaseModel
103
103
  * @type {?string}
104
104
  * @public
105
105
  */
106
- this.emptyBinWeightId = undefined;
106
+ this.emptyBinWeightId = null;
107
107
 
108
108
  /**
109
109
  * The FreshPack Field Bin Weight API Data
@@ -111,7 +111,7 @@ class BinTipBinModel extends BaseModel
111
111
  * @type {?Object}
112
112
  * @public
113
113
  */
114
- this.freshPackFieldBinWeightApi = undefined;
114
+ this.freshPackFieldBinWeightApi = null;
115
115
 
116
116
  /**
117
117
  * Whether the Bin Tip Bin has been deleted
@@ -119,7 +119,7 @@ class BinTipBinModel extends BaseModel
119
119
  * @type {boolean}
120
120
  * @public
121
121
  */
122
- this.deleted = undefined;
122
+ this.deleted = false;
123
123
 
124
124
  /**
125
125
  * When the Bin Tip Bin was last updated
@@ -127,7 +127,7 @@ class BinTipBinModel extends BaseModel
127
127
  * @type {Date}
128
128
  * @public
129
129
  */
130
- this.updateTimestamp = undefined;
130
+ this.updateTimestamp = new Date();
131
131
 
132
132
  /**
133
133
  * The Site ID associated with this Bin Tip Bin
@@ -31,7 +31,7 @@ class BinTipWeightModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The Bin Tip ID associated with this Bin Weight
@@ -39,7 +39,7 @@ class BinTipWeightModel extends BaseModel
39
39
  * @type {string}
40
40
  * @public
41
41
  */
42
- this.binTipId = undefined;
42
+ this.binTipId = "";
43
43
 
44
44
  /**
45
45
  * The Packrun ID associated with this Bin Weight
@@ -47,7 +47,7 @@ class BinTipWeightModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.packrunId = undefined;
50
+ this.packrunId = "";
51
51
 
52
52
  /**
53
53
  * When this Bin Weight was Created
@@ -55,7 +55,7 @@ class BinTipWeightModel extends BaseModel
55
55
  * @type {Date}
56
56
  * @public
57
57
  */
58
- this.createdTimestamp = undefined;
58
+ this.createdTimestamp = new Date();
59
59
 
60
60
  /**
61
61
  * The Bin Weight Type
@@ -63,7 +63,7 @@ class BinTipWeightModel extends BaseModel
63
63
  * @type {string}
64
64
  * @public
65
65
  */
66
- this.weightType = undefined;
66
+ this.weightType = "";
67
67
 
68
68
  /**
69
69
  * The Bin Weight
@@ -71,7 +71,7 @@ class BinTipWeightModel extends BaseModel
71
71
  * @type {number}
72
72
  * @public
73
73
  */
74
- this.weight = undefined;
74
+ this.weight = 0;
75
75
 
76
76
  /**
77
77
  * The Bin Scale ID associated with this Bin Weight
@@ -79,7 +79,7 @@ class BinTipWeightModel extends BaseModel
79
79
  * @type {?string}
80
80
  * @public
81
81
  */
82
- this.binScaleId = undefined;
82
+ this.binScaleId = null;
83
83
 
84
84
  /**
85
85
  * Whether the Bin Tip Weight has been deleted
@@ -87,7 +87,7 @@ class BinTipWeightModel extends BaseModel
87
87
  * @type {boolean}
88
88
  * @public
89
89
  */
90
- this.deleted = undefined;
90
+ this.deleted = false;
91
91
 
92
92
  /**
93
93
  * When the Bin Tip Weight was last updated
@@ -95,7 +95,7 @@ class BinTipWeightModel extends BaseModel
95
95
  * @type {Date}
96
96
  * @public
97
97
  */
98
- this.updateTimestamp = undefined;
98
+ this.updateTimestamp = new Date();
99
99
 
100
100
  /**
101
101
  * The Site ID associated with this Bin Tip Weight
@@ -31,7 +31,7 @@ class CompacSizerBatchModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The Compac Sizer ID this Batch is associated with
@@ -39,7 +39,7 @@ class CompacSizerBatchModel extends BaseModel
39
39
  * @type {string}
40
40
  * @public
41
41
  */
42
- this.compacSizerId = undefined;
42
+ this.compacSizerId = "";
43
43
 
44
44
  /**
45
45
  * The Numeric Compac Batch ID
@@ -47,7 +47,7 @@ class CompacSizerBatchModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.batchId = undefined;
50
+ this.batchId = "";
51
51
 
52
52
  /**
53
53
  * When this Batch was Created
@@ -55,7 +55,7 @@ class CompacSizerBatchModel extends BaseModel
55
55
  * @type {Date}
56
56
  * @public
57
57
  */
58
- this.createdTimestamp = undefined;
58
+ this.createdTimestamp = new Date();
59
59
 
60
60
  /**
61
61
  * The Packrun ID associated with this Batch
@@ -63,7 +63,7 @@ class CompacSizerBatchModel extends BaseModel
63
63
  * @type {?string}
64
64
  * @public
65
65
  */
66
- this.packrunId = undefined;
66
+ this.packrunId = null;
67
67
 
68
68
  /**
69
69
  * The Compac Sizer Batch Data
@@ -71,7 +71,7 @@ class CompacSizerBatchModel extends BaseModel
71
71
  * @type {Object}
72
72
  * @public
73
73
  */
74
- this.batch = undefined;
74
+ this.batch = {}
75
75
 
76
76
  /**
77
77
  * Whether the Compac Sizer Batch has been deleted
@@ -79,7 +79,7 @@ class CompacSizerBatchModel extends BaseModel
79
79
  * @type {boolean}
80
80
  * @public
81
81
  */
82
- this.deleted = undefined;
82
+ this.deleted = false;
83
83
 
84
84
  /**
85
85
  * When the Compac Sizer Batch was last updated
@@ -87,7 +87,7 @@ class CompacSizerBatchModel extends BaseModel
87
87
  * @type {Date}
88
88
  * @public
89
89
  */
90
- this.updateTimestamp = undefined;
90
+ this.updateTimestamp = new Date();
91
91
 
92
92
  /**
93
93
  * The Site ID associated with this Compac Sizer Batch
@@ -31,7 +31,7 @@ class CompacSizerModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The RTU this Compac Sizer belongs to
@@ -39,7 +39,7 @@ class CompacSizerModel extends BaseModel
39
39
  * @type {?number}
40
40
  * @public
41
41
  */
42
- this.rtuId = undefined;
42
+ this.rtuId = null;
43
43
 
44
44
  /**
45
45
  * The Compac Sizer Name
@@ -47,7 +47,7 @@ class CompacSizerModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.name = undefined;
50
+ this.name = "";
51
51
 
52
52
  /**
53
53
  * The Lanes defined for this Compac Sizer
@@ -55,7 +55,7 @@ class CompacSizerModel extends BaseModel
55
55
  * @type {Object[]}
56
56
  * @public
57
57
  */
58
- this.lanes = undefined;
58
+ this.lanes = [];
59
59
 
60
60
  /**
61
61
  * The Points used by this Compac Sizer
@@ -63,7 +63,7 @@ class CompacSizerModel extends BaseModel
63
63
  * @type {Object}
64
64
  * @public
65
65
  */
66
- this.points = undefined;
66
+ this.points = {}
67
67
 
68
68
  /**
69
69
  * The Outlets defined for this Compac Sizer
@@ -71,7 +71,7 @@ class CompacSizerModel extends BaseModel
71
71
  * @type {Object[]}
72
72
  * @public
73
73
  */
74
- this.outlets = undefined;
74
+ this.outlets = [];
75
75
 
76
76
  /**
77
77
  * The Sizer Type
@@ -79,7 +79,7 @@ class CompacSizerModel extends BaseModel
79
79
  * @type {string}
80
80
  * @public
81
81
  */
82
- this.sizerType = undefined;
82
+ this.sizerType = "";
83
83
 
84
84
  /**
85
85
  * The Auto Create Batch Delay in Seconds for this Compac Sizer
@@ -87,7 +87,7 @@ class CompacSizerModel extends BaseModel
87
87
  * @type {number}
88
88
  * @public
89
89
  */
90
- this.autoCreateBatchDelay = undefined;
90
+ this.autoCreateBatchDelay = 0;
91
91
 
92
92
  /**
93
93
  * The Fruit Sizes defined and handled by this Compac Sizer
@@ -95,7 +95,7 @@ class CompacSizerModel extends BaseModel
95
95
  * @type {Object[]}
96
96
  * @public
97
97
  */
98
- this.fruitSizes = undefined;
98
+ this.fruitSizes = [];
99
99
 
100
100
  /**
101
101
  * The Packing Line ID that manages this Compac Sizer
@@ -103,7 +103,7 @@ class CompacSizerModel extends BaseModel
103
103
  * @type {string}
104
104
  * @public
105
105
  */
106
- this.packingLineId = undefined;
106
+ this.packingLineId = "";
107
107
 
108
108
  /**
109
109
  * The FreshPack Integration Configuration for this Compac Sizer
@@ -111,7 +111,7 @@ class CompacSizerModel extends BaseModel
111
111
  * @type {?Object}
112
112
  * @public
113
113
  */
114
- this.freshPackIntegration = undefined;
114
+ this.freshPackIntegration = null;
115
115
 
116
116
  /**
117
117
  * An Array of Sources that deliver Fruit to this Compac Sizer
@@ -119,7 +119,7 @@ class CompacSizerModel extends BaseModel
119
119
  * @type {Object[]}
120
120
  * @public
121
121
  */
122
- this.sources = undefined;
122
+ this.sources = [];
123
123
 
124
124
  /**
125
125
  * Whether the Compac Sizer has been deleted
@@ -127,7 +127,7 @@ class CompacSizerModel extends BaseModel
127
127
  * @type {boolean}
128
128
  * @public
129
129
  */
130
- this.deleted = undefined;
130
+ this.deleted = false;
131
131
 
132
132
  /**
133
133
  * When the Compac Sizer was last updated
@@ -135,7 +135,7 @@ class CompacSizerModel extends BaseModel
135
135
  * @type {Date}
136
136
  * @public
137
137
  */
138
- this.updateTimestamp = undefined;
138
+ this.updateTimestamp = new Date();
139
139
 
140
140
  /**
141
141
  * The Site ID associated with this Compac Sizer