@ricado/api-client 2.5.6 → 2.5.8

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.
@@ -650,13 +650,13 @@ var _default = PackingLineController;
650
650
  * A **FreshPackIntegration** Type
651
651
  *
652
652
  * @typedef {Object} PackingLineController.FreshPackIntegration
653
- * @property {{graders: number, binTypes: number, printerGroups: number, materialGroups: number, rejectCategories: number, productionFacilities: number, marketHolds: number, apiCommunicationStatus: number, currentPackrunClearanceSummary: number, nextPackrunClearanceSummary: number, currentPackrunMarketHolds: ?number, nextPackrunMarketHolds: ?number, apiVersion: number, activePackrunName: number, activeTimeBatch: number}} points The Points used for this FreshPack Integration
653
+ * @property {{graders: number, binTypes: number, printerGroups: number, materialGroups: number, rejectCategories: number, productionFacilities: number, marketHolds: number, varieties: ?number, produces: ?number, growingMethods: ?number, fruitClasses: ?number, fruitSizes: ?number, packStyles: ?number, nssLabelTypes: ?number, multiGrowerBinProducts: ?number, apiCommunicationStatus: number, currentPackrunClearanceSummary: number, nextPackrunClearanceSummary: number, currentPackrunMarketHolds: ?number, nextPackrunMarketHolds: ?number, apiVersion: ?number, activePackrunName: ?number, activeTimeBatch: ?number, classTypeMultiGrowerBinProductIds: ?number}} points The Points used for this FreshPack Integration
654
654
  * @property {boolean} enabled Whether the FreshPack Integration is Enabled on this Packing Line
655
655
  * @property {number[]} graderIds An Array of FreshPack Grader IDs that relate to this Packing Line
656
656
  * @property {string} apiBaseUrl Base URL of the FreshPack Web Portal API
657
657
  * @property {string} computerName A Computer Name to use when Performing Actions on the FreshPack API
658
658
  * @property {number} productionFacilityId FreshPack Production Facility ID this Packing Line is associated with
659
- * @property {Array<PackingLineController.ClassTypeRejectCategory>} classTypeRejectCategoryIds An Array of FreshPack Reject Category IDs that relate to Class Types on this Packing Line
659
+ * @property {?Array<PackingLineController.ClassTypeRejectCategory>} [classTypeRejectCategoryIds] An Array of FreshPack Reject Category IDs that relate to Class Types on this Packing Line
660
660
  * @property {?string[]} [packrunSourceTrayClassTypes] An Optional Array of Class Types that should be collected from FreshPack Tray Totals on this Packing Line
661
661
  * @memberof Controllers.Packhouse.Site
662
662
  */
@@ -665,7 +665,7 @@ var _default = PackingLineController;
665
665
  * A **FreshQualityIntegration** Type
666
666
  *
667
667
  * @typedef {Object} PackingLineController.FreshQualityIntegration
668
- * @property {{currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: number, sampleTypes: number}} points The Points used for this FreshQuality Integration
668
+ * @property {{currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, sampleTypes: ?number}} points The Points used for this FreshQuality Integration
669
669
  * @property {boolean} enabled Whether the FreshQuality Integration is Enabled on this Packing Line
670
670
  * @property {string} username Username for Authenticating with the FreshQuality API
671
671
  * @property {string} password Password for Authenticating with the FreshQuality API
@@ -267,7 +267,7 @@ var _default = RejectBinScaleController;
267
267
  * @typedef {Object} RejectBinScaleController.FreshPackBinScaleIntegration
268
268
  * @property {Object} points The Points used by this FreshPack Bin Scale Integration
269
269
  * @property {boolean} enabled Whether this FreshPack Bin Scale Integration is Enabled
270
- * @property {number} materialGroupId The FreshPack Material Group ID to be used for Multi-Grower Bins from this Reject Bin Scale
270
+ * @property {?number} materialGroupId The FreshPack Material Group ID to be used for Multi-Grower Bins from this Reject Bin Scale
271
271
  * @property {number} binTypeId The FreshPack Bin Type ID to be used for Multi-Grower Bins from this Reject Bin Scale
272
272
  * @property {?number} printerGroupId The FreshPack Printer Group ID to be used when Printing Multi-Grower Bin Cards for this Reject Bin Scale
273
273
  * @property {boolean} binCardPrintingEnabled Whether Bin Card Printing is Enabled
@@ -213,7 +213,7 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
213
213
  /**
214
214
  * The FreshPack Integration Configuration for this Packing Line
215
215
  *
216
- * @type {?{points: {graders: number, binTypes: number, printerGroups: number, materialGroups: number, rejectCategories: number, productionFacilities: number, marketHolds: number, apiCommunicationStatus: number, currentPackrunClearanceSummary: number, nextPackrunClearanceSummary: number, currentPackrunMarketHolds: ?number, nextPackrunMarketHolds: ?number, apiVersion: number, activePackrunName: number, activeTimeBatch: number}, enabled: boolean, graderIds: number[], apiBaseUrl: string, computerName: string, productionFacilityId: number, classTypeRejectCategoryIds: Array<{classType: string, rejectCategoryId: number}>, packrunSourceTrayClassTypes: ?string[]}}
216
+ * @type {?{points: {graders: number, binTypes: number, printerGroups: number, materialGroups: number, rejectCategories: number, productionFacilities: number, marketHolds: number, varieties: ?number, produces: ?number, growingMethods: ?number, fruitClasses: ?number, fruitSizes: ?number, packStyles: ?number, nssLabelTypes: ?number, multiGrowerBinProducts: ?number, apiCommunicationStatus: number, currentPackrunClearanceSummary: number, nextPackrunClearanceSummary: number, currentPackrunMarketHolds: ?number, nextPackrunMarketHolds: ?number, apiVersion: ?number, activePackrunName: ?number, activeTimeBatch: ?number, classTypeMultiGrowerBinProductIds: ?number}, enabled: boolean, graderIds: number[], apiBaseUrl: string, computerName: string, productionFacilityId: number, classTypeRejectCategoryIds: ?Array<{classType: string, rejectCategoryId: number}>, packrunSourceTrayClassTypes: ?string[]}}
217
217
  * @public
218
218
  */
219
219
 
@@ -221,7 +221,7 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
221
221
  /**
222
222
  * The FreshQuality Integration Configuration for this Packing Line
223
223
  *
224
- * @type {?{points: {currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: number, sampleTypes: number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[]}}
224
+ * @type {?{points: {currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[]}}
225
225
  * @public
226
226
  */
227
227
 
@@ -4069,6 +4069,134 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4069
4069
  pointsObject.marketHolds = 0;
4070
4070
  }
4071
4071
 
4072
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'varieties' in jsonObject['freshPackIntegration'].points) {
4073
+ pointsObject.varieties = function () {
4074
+ if (jsonObject['freshPackIntegration'].points.varieties === null) {
4075
+ return null;
4076
+ }
4077
+
4078
+ if (typeof jsonObject['freshPackIntegration'].points.varieties !== 'number') {
4079
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.varieties)) ? Number(jsonObject['freshPackIntegration'].points.varieties) : Math.floor(Number(jsonObject['freshPackIntegration'].points.varieties));
4080
+ }
4081
+
4082
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.varieties) ? jsonObject['freshPackIntegration'].points.varieties : Math.floor(jsonObject['freshPackIntegration'].points.varieties);
4083
+ }();
4084
+ } else {
4085
+ pointsObject.varieties = null;
4086
+ }
4087
+
4088
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'produces' in jsonObject['freshPackIntegration'].points) {
4089
+ pointsObject.produces = function () {
4090
+ if (jsonObject['freshPackIntegration'].points.produces === null) {
4091
+ return null;
4092
+ }
4093
+
4094
+ if (typeof jsonObject['freshPackIntegration'].points.produces !== 'number') {
4095
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.produces)) ? Number(jsonObject['freshPackIntegration'].points.produces) : Math.floor(Number(jsonObject['freshPackIntegration'].points.produces));
4096
+ }
4097
+
4098
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.produces) ? jsonObject['freshPackIntegration'].points.produces : Math.floor(jsonObject['freshPackIntegration'].points.produces);
4099
+ }();
4100
+ } else {
4101
+ pointsObject.produces = null;
4102
+ }
4103
+
4104
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'growingMethods' in jsonObject['freshPackIntegration'].points) {
4105
+ pointsObject.growingMethods = function () {
4106
+ if (jsonObject['freshPackIntegration'].points.growingMethods === null) {
4107
+ return null;
4108
+ }
4109
+
4110
+ if (typeof jsonObject['freshPackIntegration'].points.growingMethods !== 'number') {
4111
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.growingMethods)) ? Number(jsonObject['freshPackIntegration'].points.growingMethods) : Math.floor(Number(jsonObject['freshPackIntegration'].points.growingMethods));
4112
+ }
4113
+
4114
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.growingMethods) ? jsonObject['freshPackIntegration'].points.growingMethods : Math.floor(jsonObject['freshPackIntegration'].points.growingMethods);
4115
+ }();
4116
+ } else {
4117
+ pointsObject.growingMethods = null;
4118
+ }
4119
+
4120
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'fruitClasses' in jsonObject['freshPackIntegration'].points) {
4121
+ pointsObject.fruitClasses = function () {
4122
+ if (jsonObject['freshPackIntegration'].points.fruitClasses === null) {
4123
+ return null;
4124
+ }
4125
+
4126
+ if (typeof jsonObject['freshPackIntegration'].points.fruitClasses !== 'number') {
4127
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.fruitClasses)) ? Number(jsonObject['freshPackIntegration'].points.fruitClasses) : Math.floor(Number(jsonObject['freshPackIntegration'].points.fruitClasses));
4128
+ }
4129
+
4130
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.fruitClasses) ? jsonObject['freshPackIntegration'].points.fruitClasses : Math.floor(jsonObject['freshPackIntegration'].points.fruitClasses);
4131
+ }();
4132
+ } else {
4133
+ pointsObject.fruitClasses = null;
4134
+ }
4135
+
4136
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'fruitSizes' in jsonObject['freshPackIntegration'].points) {
4137
+ pointsObject.fruitSizes = function () {
4138
+ if (jsonObject['freshPackIntegration'].points.fruitSizes === null) {
4139
+ return null;
4140
+ }
4141
+
4142
+ if (typeof jsonObject['freshPackIntegration'].points.fruitSizes !== 'number') {
4143
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.fruitSizes)) ? Number(jsonObject['freshPackIntegration'].points.fruitSizes) : Math.floor(Number(jsonObject['freshPackIntegration'].points.fruitSizes));
4144
+ }
4145
+
4146
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.fruitSizes) ? jsonObject['freshPackIntegration'].points.fruitSizes : Math.floor(jsonObject['freshPackIntegration'].points.fruitSizes);
4147
+ }();
4148
+ } else {
4149
+ pointsObject.fruitSizes = null;
4150
+ }
4151
+
4152
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'packStyles' in jsonObject['freshPackIntegration'].points) {
4153
+ pointsObject.packStyles = function () {
4154
+ if (jsonObject['freshPackIntegration'].points.packStyles === null) {
4155
+ return null;
4156
+ }
4157
+
4158
+ if (typeof jsonObject['freshPackIntegration'].points.packStyles !== 'number') {
4159
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.packStyles)) ? Number(jsonObject['freshPackIntegration'].points.packStyles) : Math.floor(Number(jsonObject['freshPackIntegration'].points.packStyles));
4160
+ }
4161
+
4162
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.packStyles) ? jsonObject['freshPackIntegration'].points.packStyles : Math.floor(jsonObject['freshPackIntegration'].points.packStyles);
4163
+ }();
4164
+ } else {
4165
+ pointsObject.packStyles = null;
4166
+ }
4167
+
4168
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'nssLabelTypes' in jsonObject['freshPackIntegration'].points) {
4169
+ pointsObject.nssLabelTypes = function () {
4170
+ if (jsonObject['freshPackIntegration'].points.nssLabelTypes === null) {
4171
+ return null;
4172
+ }
4173
+
4174
+ if (typeof jsonObject['freshPackIntegration'].points.nssLabelTypes !== 'number') {
4175
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.nssLabelTypes)) ? Number(jsonObject['freshPackIntegration'].points.nssLabelTypes) : Math.floor(Number(jsonObject['freshPackIntegration'].points.nssLabelTypes));
4176
+ }
4177
+
4178
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.nssLabelTypes) ? jsonObject['freshPackIntegration'].points.nssLabelTypes : Math.floor(jsonObject['freshPackIntegration'].points.nssLabelTypes);
4179
+ }();
4180
+ } else {
4181
+ pointsObject.nssLabelTypes = null;
4182
+ }
4183
+
4184
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'multiGrowerBinProducts' in jsonObject['freshPackIntegration'].points) {
4185
+ pointsObject.multiGrowerBinProducts = function () {
4186
+ if (jsonObject['freshPackIntegration'].points.multiGrowerBinProducts === null) {
4187
+ return null;
4188
+ }
4189
+
4190
+ if (typeof jsonObject['freshPackIntegration'].points.multiGrowerBinProducts !== 'number') {
4191
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.multiGrowerBinProducts)) ? Number(jsonObject['freshPackIntegration'].points.multiGrowerBinProducts) : Math.floor(Number(jsonObject['freshPackIntegration'].points.multiGrowerBinProducts));
4192
+ }
4193
+
4194
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.multiGrowerBinProducts) ? jsonObject['freshPackIntegration'].points.multiGrowerBinProducts : Math.floor(jsonObject['freshPackIntegration'].points.multiGrowerBinProducts);
4195
+ }();
4196
+ } else {
4197
+ pointsObject.multiGrowerBinProducts = null;
4198
+ }
4199
+
4072
4200
  if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'apiCommunicationStatus' in jsonObject['freshPackIntegration'].points) {
4073
4201
  pointsObject.apiCommunicationStatus = function () {
4074
4202
  if (typeof jsonObject['freshPackIntegration'].points.apiCommunicationStatus !== 'number') {
@@ -4139,6 +4267,10 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4139
4267
 
4140
4268
  if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'apiVersion' in jsonObject['freshPackIntegration'].points) {
4141
4269
  pointsObject.apiVersion = function () {
4270
+ if (jsonObject['freshPackIntegration'].points.apiVersion === null) {
4271
+ return null;
4272
+ }
4273
+
4142
4274
  if (typeof jsonObject['freshPackIntegration'].points.apiVersion !== 'number') {
4143
4275
  return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.apiVersion)) ? Number(jsonObject['freshPackIntegration'].points.apiVersion) : Math.floor(Number(jsonObject['freshPackIntegration'].points.apiVersion));
4144
4276
  }
@@ -4146,11 +4278,15 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4146
4278
  return Number.isInteger(jsonObject['freshPackIntegration'].points.apiVersion) ? jsonObject['freshPackIntegration'].points.apiVersion : Math.floor(jsonObject['freshPackIntegration'].points.apiVersion);
4147
4279
  }();
4148
4280
  } else {
4149
- pointsObject.apiVersion = 0;
4281
+ pointsObject.apiVersion = null;
4150
4282
  }
4151
4283
 
4152
4284
  if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'activePackrunName' in jsonObject['freshPackIntegration'].points) {
4153
4285
  pointsObject.activePackrunName = function () {
4286
+ if (jsonObject['freshPackIntegration'].points.activePackrunName === null) {
4287
+ return null;
4288
+ }
4289
+
4154
4290
  if (typeof jsonObject['freshPackIntegration'].points.activePackrunName !== 'number') {
4155
4291
  return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.activePackrunName)) ? Number(jsonObject['freshPackIntegration'].points.activePackrunName) : Math.floor(Number(jsonObject['freshPackIntegration'].points.activePackrunName));
4156
4292
  }
@@ -4158,11 +4294,15 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4158
4294
  return Number.isInteger(jsonObject['freshPackIntegration'].points.activePackrunName) ? jsonObject['freshPackIntegration'].points.activePackrunName : Math.floor(jsonObject['freshPackIntegration'].points.activePackrunName);
4159
4295
  }();
4160
4296
  } else {
4161
- pointsObject.activePackrunName = 0;
4297
+ pointsObject.activePackrunName = null;
4162
4298
  }
4163
4299
 
4164
4300
  if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'activeTimeBatch' in jsonObject['freshPackIntegration'].points) {
4165
4301
  pointsObject.activeTimeBatch = function () {
4302
+ if (jsonObject['freshPackIntegration'].points.activeTimeBatch === null) {
4303
+ return null;
4304
+ }
4305
+
4166
4306
  if (typeof jsonObject['freshPackIntegration'].points.activeTimeBatch !== 'number') {
4167
4307
  return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.activeTimeBatch)) ? Number(jsonObject['freshPackIntegration'].points.activeTimeBatch) : Math.floor(Number(jsonObject['freshPackIntegration'].points.activeTimeBatch));
4168
4308
  }
@@ -4170,7 +4310,23 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4170
4310
  return Number.isInteger(jsonObject['freshPackIntegration'].points.activeTimeBatch) ? jsonObject['freshPackIntegration'].points.activeTimeBatch : Math.floor(jsonObject['freshPackIntegration'].points.activeTimeBatch);
4171
4311
  }();
4172
4312
  } else {
4173
- pointsObject.activeTimeBatch = 0;
4313
+ pointsObject.activeTimeBatch = null;
4314
+ }
4315
+
4316
+ if (_typeof(jsonObject['freshPackIntegration'].points) === 'object' && 'classTypeMultiGrowerBinProductIds' in jsonObject['freshPackIntegration'].points) {
4317
+ pointsObject.classTypeMultiGrowerBinProductIds = function () {
4318
+ if (jsonObject['freshPackIntegration'].points.classTypeMultiGrowerBinProductIds === null) {
4319
+ return null;
4320
+ }
4321
+
4322
+ if (typeof jsonObject['freshPackIntegration'].points.classTypeMultiGrowerBinProductIds !== 'number') {
4323
+ return Number.isInteger(Number(jsonObject['freshPackIntegration'].points.classTypeMultiGrowerBinProductIds)) ? Number(jsonObject['freshPackIntegration'].points.classTypeMultiGrowerBinProductIds) : Math.floor(Number(jsonObject['freshPackIntegration'].points.classTypeMultiGrowerBinProductIds));
4324
+ }
4325
+
4326
+ return Number.isInteger(jsonObject['freshPackIntegration'].points.classTypeMultiGrowerBinProductIds) ? jsonObject['freshPackIntegration'].points.classTypeMultiGrowerBinProductIds : Math.floor(jsonObject['freshPackIntegration'].points.classTypeMultiGrowerBinProductIds);
4327
+ }();
4328
+ } else {
4329
+ pointsObject.classTypeMultiGrowerBinProductIds = null;
4174
4330
  }
4175
4331
 
4176
4332
  return pointsObject;
@@ -4185,14 +4341,23 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4185
4341
  pointsDefaultValue.rejectCategories = 0;
4186
4342
  pointsDefaultValue.productionFacilities = 0;
4187
4343
  pointsDefaultValue.marketHolds = 0;
4344
+ pointsDefaultValue.varieties = null;
4345
+ pointsDefaultValue.produces = null;
4346
+ pointsDefaultValue.growingMethods = null;
4347
+ pointsDefaultValue.fruitClasses = null;
4348
+ pointsDefaultValue.fruitSizes = null;
4349
+ pointsDefaultValue.packStyles = null;
4350
+ pointsDefaultValue.nssLabelTypes = null;
4351
+ pointsDefaultValue.multiGrowerBinProducts = null;
4188
4352
  pointsDefaultValue.apiCommunicationStatus = 0;
4189
4353
  pointsDefaultValue.currentPackrunClearanceSummary = 0;
4190
4354
  pointsDefaultValue.nextPackrunClearanceSummary = 0;
4191
4355
  pointsDefaultValue.currentPackrunMarketHolds = null;
4192
4356
  pointsDefaultValue.nextPackrunMarketHolds = null;
4193
- pointsDefaultValue.apiVersion = 0;
4194
- pointsDefaultValue.activePackrunName = 0;
4195
- pointsDefaultValue.activeTimeBatch = 0;
4357
+ pointsDefaultValue.apiVersion = null;
4358
+ pointsDefaultValue.activePackrunName = null;
4359
+ pointsDefaultValue.activeTimeBatch = null;
4360
+ pointsDefaultValue.classTypeMultiGrowerBinProductIds = null;
4196
4361
  return pointsDefaultValue;
4197
4362
  }();
4198
4363
  }
@@ -4267,6 +4432,10 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4267
4432
 
4268
4433
  if (_typeof(jsonObject['freshPackIntegration']) === 'object' && 'classTypeRejectCategoryIds' in jsonObject['freshPackIntegration']) {
4269
4434
  freshPackIntegrationObject.classTypeRejectCategoryIds = function () {
4435
+ if (jsonObject['freshPackIntegration'].classTypeRejectCategoryIds === null) {
4436
+ return null;
4437
+ }
4438
+
4270
4439
  if (Array.isArray(jsonObject['freshPackIntegration'].classTypeRejectCategoryIds) !== true) {
4271
4440
  return [];
4272
4441
  }
@@ -4304,7 +4473,7 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4304
4473
  });
4305
4474
  }();
4306
4475
  } else {
4307
- freshPackIntegrationObject.classTypeRejectCategoryIds = [];
4476
+ freshPackIntegrationObject.classTypeRejectCategoryIds = null;
4308
4477
  }
4309
4478
 
4310
4479
  if (_typeof(jsonObject['freshPackIntegration']) === 'object' && 'packrunSourceTrayClassTypes' in jsonObject['freshPackIntegration']) {
@@ -4469,6 +4638,10 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4469
4638
 
4470
4639
  if (_typeof(jsonObject['freshQualityIntegration'].points) === 'object' && 'currentPackrunRejectAnalysisSamples' in jsonObject['freshQualityIntegration'].points) {
4471
4640
  pointsObject.currentPackrunRejectAnalysisSamples = function () {
4641
+ if (jsonObject['freshQualityIntegration'].points.currentPackrunRejectAnalysisSamples === null) {
4642
+ return null;
4643
+ }
4644
+
4472
4645
  if (typeof jsonObject['freshQualityIntegration'].points.currentPackrunRejectAnalysisSamples !== 'number') {
4473
4646
  return Number.isInteger(Number(jsonObject['freshQualityIntegration'].points.currentPackrunRejectAnalysisSamples)) ? Number(jsonObject['freshQualityIntegration'].points.currentPackrunRejectAnalysisSamples) : Math.floor(Number(jsonObject['freshQualityIntegration'].points.currentPackrunRejectAnalysisSamples));
4474
4647
  }
@@ -4476,11 +4649,15 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4476
4649
  return Number.isInteger(jsonObject['freshQualityIntegration'].points.currentPackrunRejectAnalysisSamples) ? jsonObject['freshQualityIntegration'].points.currentPackrunRejectAnalysisSamples : Math.floor(jsonObject['freshQualityIntegration'].points.currentPackrunRejectAnalysisSamples);
4477
4650
  }();
4478
4651
  } else {
4479
- pointsObject.currentPackrunRejectAnalysisSamples = 0;
4652
+ pointsObject.currentPackrunRejectAnalysisSamples = null;
4480
4653
  }
4481
4654
 
4482
4655
  if (_typeof(jsonObject['freshQualityIntegration'].points) === 'object' && 'sampleTypes' in jsonObject['freshQualityIntegration'].points) {
4483
4656
  pointsObject.sampleTypes = function () {
4657
+ if (jsonObject['freshQualityIntegration'].points.sampleTypes === null) {
4658
+ return null;
4659
+ }
4660
+
4484
4661
  if (typeof jsonObject['freshQualityIntegration'].points.sampleTypes !== 'number') {
4485
4662
  return Number.isInteger(Number(jsonObject['freshQualityIntegration'].points.sampleTypes)) ? Number(jsonObject['freshQualityIntegration'].points.sampleTypes) : Math.floor(Number(jsonObject['freshQualityIntegration'].points.sampleTypes));
4486
4663
  }
@@ -4488,7 +4665,7 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4488
4665
  return Number.isInteger(jsonObject['freshQualityIntegration'].points.sampleTypes) ? jsonObject['freshQualityIntegration'].points.sampleTypes : Math.floor(jsonObject['freshQualityIntegration'].points.sampleTypes);
4489
4666
  }();
4490
4667
  } else {
4491
- pointsObject.sampleTypes = 0;
4668
+ pointsObject.sampleTypes = null;
4492
4669
  }
4493
4670
 
4494
4671
  return pointsObject;
@@ -4506,8 +4683,8 @@ var PackingLineModel = /*#__PURE__*/function (_BaseModel) {
4506
4683
  pointsDefaultValue.currentPackrunMinorPackingDefectsCount = 0;
4507
4684
  pointsDefaultValue.currentPackrunTotalPackingDefectsCount = 0;
4508
4685
  pointsDefaultValue.currentPackrunFutureStorageDefectsCount = 0;
4509
- pointsDefaultValue.currentPackrunRejectAnalysisSamples = 0;
4510
- pointsDefaultValue.sampleTypes = 0;
4686
+ pointsDefaultValue.currentPackrunRejectAnalysisSamples = null;
4687
+ pointsDefaultValue.sampleTypes = null;
4511
4688
  return pointsDefaultValue;
4512
4689
  }();
4513
4690
  }
@@ -253,7 +253,7 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
253
253
  /**
254
254
  * The FreshPack Integration Configuration for this Reject Bin Scale
255
255
  *
256
- * @type {?{points: Object, enabled: boolean, materialGroupId: number, binTypeId: number, printerGroupId: ?number, binCardPrintingEnabled: boolean, useWindowsDriverApi: boolean}}
256
+ * @type {?{points: Object, enabled: boolean, materialGroupId: ?number, binTypeId: number, printerGroupId: ?number, binCardPrintingEnabled: boolean, useWindowsDriverApi: boolean}}
257
257
  * @public
258
258
  */
259
259
 
@@ -1087,6 +1087,10 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
1087
1087
 
1088
1088
  if (_typeof(jsonObject['freshPackIntegration']) === 'object' && 'materialGroupId' in jsonObject['freshPackIntegration']) {
1089
1089
  freshPackIntegrationObject.materialGroupId = function () {
1090
+ if (jsonObject['freshPackIntegration'].materialGroupId === null) {
1091
+ return null;
1092
+ }
1093
+
1090
1094
  if (typeof jsonObject['freshPackIntegration'].materialGroupId !== 'number') {
1091
1095
  return Number.isInteger(Number(jsonObject['freshPackIntegration'].materialGroupId)) ? Number(jsonObject['freshPackIntegration'].materialGroupId) : Math.floor(Number(jsonObject['freshPackIntegration'].materialGroupId));
1092
1096
  }
@@ -1094,7 +1098,7 @@ var RejectBinScaleModel = /*#__PURE__*/function (_BaseModel) {
1094
1098
  return Number.isInteger(jsonObject['freshPackIntegration'].materialGroupId) ? jsonObject['freshPackIntegration'].materialGroupId : Math.floor(jsonObject['freshPackIntegration'].materialGroupId);
1095
1099
  }();
1096
1100
  } else {
1097
- freshPackIntegrationObject.materialGroupId = 0;
1101
+ freshPackIntegrationObject.materialGroupId = null;
1098
1102
  }
1099
1103
 
1100
1104
  if (_typeof(jsonObject['freshPackIntegration']) === 'object' && 'binTypeId' in jsonObject['freshPackIntegration']) {
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- var version = '2.5.6';
8
+ var version = '2.5.8';
9
9
  exports.version = version;
package/lib/index.d.ts CHANGED
@@ -16651,14 +16651,23 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackingLineControl
16651
16651
  rejectCategories: number;
16652
16652
  productionFacilities: number;
16653
16653
  marketHolds: number;
16654
+ varieties: number | null;
16655
+ produces: number | null;
16656
+ growingMethods: number | null;
16657
+ fruitClasses: number | null;
16658
+ fruitSizes: number | null;
16659
+ packStyles: number | null;
16660
+ nssLabelTypes: number | null;
16661
+ multiGrowerBinProducts: number | null;
16654
16662
  apiCommunicationStatus: number;
16655
16663
  currentPackrunClearanceSummary: number;
16656
16664
  nextPackrunClearanceSummary: number;
16657
16665
  currentPackrunMarketHolds: number | null;
16658
16666
  nextPackrunMarketHolds: number | null;
16659
- apiVersion: number;
16660
- activePackrunName: number;
16661
- activeTimeBatch: number;
16667
+ apiVersion: number | null;
16668
+ activePackrunName: number | null;
16669
+ activeTimeBatch: number | null;
16670
+ classTypeMultiGrowerBinProductIds: number | null;
16662
16671
  };
16663
16672
  /**
16664
16673
  * Whether the FreshPack Integration is Enabled on this Packing Line
@@ -16683,7 +16692,7 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackingLineControl
16683
16692
  /**
16684
16693
  * An Array of FreshPack Reject Category IDs that relate to Class Types on this Packing Line
16685
16694
  */
16686
- classTypeRejectCategoryIds: ClassTypeRejectCategory[];
16695
+ classTypeRejectCategoryIds?: ClassTypeRejectCategory[] | null;
16687
16696
  /**
16688
16697
  * An Optional Array of Class Types that should be collected from FreshPack Tray Totals on this Packing Line
16689
16698
  */
@@ -16707,8 +16716,8 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackingLineControl
16707
16716
  currentPackrunMinorPackingDefectsCount: number;
16708
16717
  currentPackrunTotalPackingDefectsCount: number;
16709
16718
  currentPackrunFutureStorageDefectsCount: number;
16710
- currentPackrunRejectAnalysisSamples: number;
16711
- sampleTypes: number;
16719
+ currentPackrunRejectAnalysisSamples: number | null;
16720
+ sampleTypes: number | null;
16712
16721
  };
16713
16722
  /**
16714
16723
  * Whether the FreshQuality Integration is Enabled on this Packing Line
@@ -18505,7 +18514,7 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/RejectBinScaleCont
18505
18514
  /**
18506
18515
  * The FreshPack Material Group ID to be used for Multi-Grower Bins from this Reject Bin Scale
18507
18516
  */
18508
- materialGroupId: number;
18517
+ materialGroupId: number | null;
18509
18518
  /**
18510
18519
  * The FreshPack Bin Type ID to be used for Multi-Grower Bins from this Reject Bin Scale
18511
18520
  */
@@ -26877,7 +26886,7 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
26877
26886
  /**
26878
26887
  * The FreshPack Integration Configuration for this Packing Line
26879
26888
  *
26880
- * @type {?{points: {graders: number, binTypes: number, printerGroups: number, materialGroups: number, rejectCategories: number, productionFacilities: number, marketHolds: number, apiCommunicationStatus: number, currentPackrunClearanceSummary: number, nextPackrunClearanceSummary: number, currentPackrunMarketHolds: ?number, nextPackrunMarketHolds: ?number, apiVersion: number, activePackrunName: number, activeTimeBatch: number}, enabled: boolean, graderIds: number[], apiBaseUrl: string, computerName: string, productionFacilityId: number, classTypeRejectCategoryIds: Array<{classType: string, rejectCategoryId: number}>, packrunSourceTrayClassTypes: ?string[]}}
26889
+ * @type {?{points: {graders: number, binTypes: number, printerGroups: number, materialGroups: number, rejectCategories: number, productionFacilities: number, marketHolds: number, varieties: ?number, produces: ?number, growingMethods: ?number, fruitClasses: ?number, fruitSizes: ?number, packStyles: ?number, nssLabelTypes: ?number, multiGrowerBinProducts: ?number, apiCommunicationStatus: number, currentPackrunClearanceSummary: number, nextPackrunClearanceSummary: number, currentPackrunMarketHolds: ?number, nextPackrunMarketHolds: ?number, apiVersion: ?number, activePackrunName: ?number, activeTimeBatch: ?number, classTypeMultiGrowerBinProductIds: ?number}, enabled: boolean, graderIds: number[], apiBaseUrl: string, computerName: string, productionFacilityId: number, classTypeRejectCategoryIds: ?Array<{classType: string, rejectCategoryId: number}>, packrunSourceTrayClassTypes: ?string[]}}
26881
26890
  * @public
26882
26891
  */
26883
26892
  freshPackIntegration: {
@@ -26889,14 +26898,23 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
26889
26898
  rejectCategories: number;
26890
26899
  productionFacilities: number;
26891
26900
  marketHolds: number;
26901
+ varieties: number | null;
26902
+ produces: number | null;
26903
+ growingMethods: number | null;
26904
+ fruitClasses: number | null;
26905
+ fruitSizes: number | null;
26906
+ packStyles: number | null;
26907
+ nssLabelTypes: number | null;
26908
+ multiGrowerBinProducts: number | null;
26892
26909
  apiCommunicationStatus: number;
26893
26910
  currentPackrunClearanceSummary: number;
26894
26911
  nextPackrunClearanceSummary: number;
26895
26912
  currentPackrunMarketHolds: number | null;
26896
26913
  nextPackrunMarketHolds: number | null;
26897
- apiVersion: number;
26898
- activePackrunName: number;
26899
- activeTimeBatch: number;
26914
+ apiVersion: number | null;
26915
+ activePackrunName: number | null;
26916
+ activeTimeBatch: number | null;
26917
+ classTypeMultiGrowerBinProductIds: number | null;
26900
26918
  };
26901
26919
  enabled: boolean;
26902
26920
  graderIds: number[];
@@ -26906,13 +26924,13 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
26906
26924
  classTypeRejectCategoryIds: {
26907
26925
  classType: string;
26908
26926
  rejectCategoryId: number;
26909
- }[];
26927
+ }[] | null;
26910
26928
  packrunSourceTrayClassTypes: string[] | null;
26911
26929
  } | null;
26912
26930
  /**
26913
26931
  * The FreshQuality Integration Configuration for this Packing Line
26914
26932
  *
26915
- * @type {?{points: {currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: number, sampleTypes: number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[]}}
26933
+ * @type {?{points: {currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, sampleTypes: ?number}, enabled: boolean, username: string, password: string, apiBaseUrl: string, sampleTypeIds: number[], rejectAnalysisSampleTypeIds: number[]}}
26916
26934
  * @public
26917
26935
  */
26918
26936
  freshQualityIntegration: {
@@ -26927,8 +26945,8 @@ declare module '@ricado/api-client/Models/Packhouse/Site/PackingLineModel' {
26927
26945
  currentPackrunMinorPackingDefectsCount: number;
26928
26946
  currentPackrunTotalPackingDefectsCount: number;
26929
26947
  currentPackrunFutureStorageDefectsCount: number;
26930
- currentPackrunRejectAnalysisSamples: number;
26931
- sampleTypes: number;
26948
+ currentPackrunRejectAnalysisSamples: number | null;
26949
+ sampleTypes: number | null;
26932
26950
  };
26933
26951
  enabled: boolean;
26934
26952
  username: string;
@@ -27592,13 +27610,13 @@ declare module '@ricado/api-client/Models/Packhouse/Site/RejectBinScaleModel' {
27592
27610
  /**
27593
27611
  * The FreshPack Integration Configuration for this Reject Bin Scale
27594
27612
  *
27595
- * @type {?{points: Object, enabled: boolean, materialGroupId: number, binTypeId: number, printerGroupId: ?number, binCardPrintingEnabled: boolean, useWindowsDriverApi: boolean}}
27613
+ * @type {?{points: Object, enabled: boolean, materialGroupId: ?number, binTypeId: number, printerGroupId: ?number, binCardPrintingEnabled: boolean, useWindowsDriverApi: boolean}}
27596
27614
  * @public
27597
27615
  */
27598
27616
  freshPackIntegration: {
27599
27617
  points: any;
27600
27618
  enabled: boolean;
27601
- materialGroupId: number;
27619
+ materialGroupId: number | null;
27602
27620
  binTypeId: number;
27603
27621
  printerGroupId: number | null;
27604
27622
  binCardPrintingEnabled: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricado/api-client",
3
- "version": "2.5.6",
3
+ "version": "2.5.8",
4
4
  "description": "RICADO Gen 4 API Client Library for NodeJS and Browsers",
5
5
  "author": {
6
6
  "name": "Ash Neilson"
@@ -629,13 +629,13 @@ export default PackingLineController;
629
629
  * A **FreshPackIntegration** Type
630
630
  *
631
631
  * @typedef {Object} PackingLineController.FreshPackIntegration
632
- * @property {{graders: number, binTypes: number, printerGroups: number, materialGroups: number, rejectCategories: number, productionFacilities: number, marketHolds: number, apiCommunicationStatus: number, currentPackrunClearanceSummary: number, nextPackrunClearanceSummary: number, currentPackrunMarketHolds: ?number, nextPackrunMarketHolds: ?number, apiVersion: number, activePackrunName: number, activeTimeBatch: number}} points The Points used for this FreshPack Integration
632
+ * @property {{graders: number, binTypes: number, printerGroups: number, materialGroups: number, rejectCategories: number, productionFacilities: number, marketHolds: number, varieties: ?number, produces: ?number, growingMethods: ?number, fruitClasses: ?number, fruitSizes: ?number, packStyles: ?number, nssLabelTypes: ?number, multiGrowerBinProducts: ?number, apiCommunicationStatus: number, currentPackrunClearanceSummary: number, nextPackrunClearanceSummary: number, currentPackrunMarketHolds: ?number, nextPackrunMarketHolds: ?number, apiVersion: ?number, activePackrunName: ?number, activeTimeBatch: ?number, classTypeMultiGrowerBinProductIds: ?number}} points The Points used for this FreshPack Integration
633
633
  * @property {boolean} enabled Whether the FreshPack Integration is Enabled on this Packing Line
634
634
  * @property {number[]} graderIds An Array of FreshPack Grader IDs that relate to this Packing Line
635
635
  * @property {string} apiBaseUrl Base URL of the FreshPack Web Portal API
636
636
  * @property {string} computerName A Computer Name to use when Performing Actions on the FreshPack API
637
637
  * @property {number} productionFacilityId FreshPack Production Facility ID this Packing Line is associated with
638
- * @property {Array<PackingLineController.ClassTypeRejectCategory>} classTypeRejectCategoryIds An Array of FreshPack Reject Category IDs that relate to Class Types on this Packing Line
638
+ * @property {?Array<PackingLineController.ClassTypeRejectCategory>} [classTypeRejectCategoryIds] An Array of FreshPack Reject Category IDs that relate to Class Types on this Packing Line
639
639
  * @property {?string[]} [packrunSourceTrayClassTypes] An Optional Array of Class Types that should be collected from FreshPack Tray Totals on this Packing Line
640
640
  * @memberof Controllers.Packhouse.Site
641
641
  */
@@ -644,7 +644,7 @@ export default PackingLineController;
644
644
  * A **FreshQualityIntegration** Type
645
645
  *
646
646
  * @typedef {Object} PackingLineController.FreshQualityIntegration
647
- * @property {{currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: number, sampleTypes: number}} points The Points used for this FreshQuality Integration
647
+ * @property {{currentPackrunSamples: number, apiCommunicationStatus: number, currentPackrunMajorPackingDefects: number, currentPackrunMinorPackingDefects: number, currentPackrunTotalPackingDefects: number, currentPackrunFutureStorageDefects: number, currentPackrunMajorPackingDefectsCount: number, currentPackrunMinorPackingDefectsCount: number, currentPackrunTotalPackingDefectsCount: number, currentPackrunFutureStorageDefectsCount: number, currentPackrunRejectAnalysisSamples: ?number, sampleTypes: ?number}} points The Points used for this FreshQuality Integration
648
648
  * @property {boolean} enabled Whether the FreshQuality Integration is Enabled on this Packing Line
649
649
  * @property {string} username Username for Authenticating with the FreshQuality API
650
650
  * @property {string} password Password for Authenticating with the FreshQuality API
@@ -246,7 +246,7 @@ export default RejectBinScaleController;
246
246
  * @typedef {Object} RejectBinScaleController.FreshPackBinScaleIntegration
247
247
  * @property {Object} points The Points used by this FreshPack Bin Scale Integration
248
248
  * @property {boolean} enabled Whether this FreshPack Bin Scale Integration is Enabled
249
- * @property {number} materialGroupId The FreshPack Material Group ID to be used for Multi-Grower Bins from this Reject Bin Scale
249
+ * @property {?number} materialGroupId The FreshPack Material Group ID to be used for Multi-Grower Bins from this Reject Bin Scale
250
250
  * @property {number} binTypeId The FreshPack Bin Type ID to be used for Multi-Grower Bins from this Reject Bin Scale
251
251
  * @property {?number} printerGroupId The FreshPack Printer Group ID to be used when Printing Multi-Grower Bin Cards for this Reject Bin Scale
252
252
  * @property {boolean} binCardPrintingEnabled Whether Bin Card Printing is Enabled