@ricado/api-client 2.3.25 → 2.3.26

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.
@@ -8,19 +8,19 @@ import RequestHelper from '../../../RequestHelper';
8
8
  import PrePackSampleModel from '../../../Models/Packhouse/Site/PrePackSampleModel';
9
9
 
10
10
  /**
11
- * Controller Class for Pre-Pack Samples
11
+ * Controller Class for PrePack Samples
12
12
  *
13
13
  * @class
14
14
  */
15
15
  class PrePackSampleController
16
16
  {
17
17
  /**
18
- * Retrieve a Pre-Pack Sample [GET /packhouse/sites/{siteId}/prepack-samples/{id}]
18
+ * Retrieve a PrePack Sample [GET /packhouse/sites/{siteId}/prepack-samples/{id}]
19
19
  *
20
20
  * @static
21
21
  * @public
22
22
  * @param {number} siteId The Site ID
23
- * @param {string} id The Pre-Pack Sample ID
23
+ * @param {string} id The PrePack Sample ID
24
24
  * @return {Promise<PrePackSampleModel>}
25
25
  */
26
26
  static getOne(siteId, id)
@@ -39,13 +39,13 @@ class PrePackSampleController
39
39
  }
40
40
 
41
41
  /**
42
- * Update a Pre-Pack Sample [PATCH /packhouse/sites/{siteId}/prepack-samples/{id}]
42
+ * Update a PrePack Sample [PATCH /packhouse/sites/{siteId}/prepack-samples/{id}]
43
43
  *
44
44
  * @static
45
45
  * @public
46
46
  * @param {number} siteId The Site ID
47
- * @param {string} id The Pre-Pack Sample ID
48
- * @param {PrePackSampleController.UpdateData} updateData The Pre-Pack Sample Update Data
47
+ * @param {string} id The PrePack Sample ID
48
+ * @param {PrePackSampleController.UpdateData} updateData The PrePack Sample Update Data
49
49
  * @return {Promise<PrePackSampleModel>}
50
50
  */
51
51
  static update(siteId, id, updateData)
@@ -64,12 +64,12 @@ class PrePackSampleController
64
64
  }
65
65
 
66
66
  /**
67
- * Delete a Pre-Pack Sample [DELETE /packhouse/sites/{siteId}/prepack-samples/{id}]
67
+ * Delete a PrePack Sample [DELETE /packhouse/sites/{siteId}/prepack-samples/{id}]
68
68
  *
69
69
  * @static
70
70
  * @public
71
71
  * @param {number} siteId The Site ID
72
- * @param {string} id The Pre-Pack Sample ID
72
+ * @param {string} id The PrePack Sample ID
73
73
  * @return {Promise<boolean>}
74
74
  */
75
75
  static delete(siteId, id)
@@ -86,12 +86,12 @@ class PrePackSampleController
86
86
  /**
87
87
  * Retrieve Comments [GET /packhouse/sites/{siteId}/prepack-samples/{id}/comments]
88
88
  *
89
- * Retrieves Comments for a Pre-Pack Sample
89
+ * Retrieves Comments for a PrePack Sample
90
90
  *
91
91
  * @static
92
92
  * @public
93
93
  * @param {number} siteId The Site ID
94
- * @param {string} id The Pre-Pack Sample ID
94
+ * @param {string} id The PrePack Sample ID
95
95
  * @return {Promise<Array<PrePackSampleController.CommentItem>>}
96
96
  */
97
97
  static getComments(siteId, id)
@@ -288,12 +288,12 @@ class PrePackSampleController
288
288
  /**
289
289
  * Create a Comment [POST /packhouse/sites/{siteId}/prepack-samples/{id}/comments]
290
290
  *
291
- * Create a Comment for a Pre-Pack Sample
291
+ * Create a Comment for a PrePack Sample
292
292
  *
293
293
  * @static
294
294
  * @public
295
295
  * @param {number} siteId The Site ID
296
- * @param {string} id The Pre-Pack Sample ID
296
+ * @param {string} id The PrePack Sample ID
297
297
  * @param {string} content The Content of the New Comment
298
298
  * @return {Promise<PrePackSampleController.CommentItem>}
299
299
  */
@@ -482,12 +482,12 @@ class PrePackSampleController
482
482
  /**
483
483
  * Retrieve a Comment [GET /packhouse/sites/{siteId}/prepack-samples/{id}/comments/{commentId}]
484
484
  *
485
- * Retrieves Comments for a Pre-Pack Sample
485
+ * Retrieves Comments for a PrePack Sample
486
486
  *
487
487
  * @static
488
488
  * @public
489
489
  * @param {number} siteId The Site ID
490
- * @param {string} id The Pre-Pack Sample ID
490
+ * @param {string} id The PrePack Sample ID
491
491
  * @param {string} commentId The Comment ID
492
492
  * @return {Promise<PrePackSampleController.CommentItem>}
493
493
  */
@@ -676,12 +676,12 @@ class PrePackSampleController
676
676
  /**
677
677
  * Update a Comment [PATCH /packhouse/sites/{siteId}/prepack-samples/{id}/comments/{commentId}]
678
678
  *
679
- * Update a Comment for a Pre-Pack Sample
679
+ * Update a Comment for a PrePack Sample
680
680
  *
681
681
  * @static
682
682
  * @public
683
683
  * @param {number} siteId The Site ID
684
- * @param {string} id The Pre-Pack Sample ID
684
+ * @param {string} id The PrePack Sample ID
685
685
  * @param {string} commentId The Comment ID
686
686
  * @param {string} content The Updated Content for the Comment
687
687
  * @return {Promise<PrePackSampleController.CommentItem>}
@@ -871,12 +871,12 @@ class PrePackSampleController
871
871
  /**
872
872
  * Delete a Comment [DELETE /packhouse/sites/{siteId}/prepack-samples/{id}/comments/{commentId}]
873
873
  *
874
- * Delete a Comment for a Pre-Pack Sample
874
+ * Delete a Comment for a PrePack Sample
875
875
  *
876
876
  * @static
877
877
  * @public
878
878
  * @param {number} siteId The Site ID
879
- * @param {string} id The Pre-Pack Sample ID
879
+ * @param {string} id The PrePack Sample ID
880
880
  * @param {string} commentId The Comment ID
881
881
  * @return {Promise<boolean>}
882
882
  */
@@ -892,7 +892,7 @@ class PrePackSampleController
892
892
  }
893
893
 
894
894
  /**
895
- * List all Pre-Pack Samples [GET /packhouse/sites/{siteId}/prepack-samples]
895
+ * List all PrePack Samples [GET /packhouse/sites/{siteId}/prepack-samples]
896
896
  *
897
897
  * @static
898
898
  * @public
@@ -925,12 +925,12 @@ class PrePackSampleController
925
925
  }
926
926
 
927
927
  /**
928
- * Create a Pre-Pack Sample [POST /packhouse/sites/{siteId}/prepack-samples]
928
+ * Create a PrePack Sample [POST /packhouse/sites/{siteId}/prepack-samples]
929
929
  *
930
930
  * @static
931
931
  * @public
932
932
  * @param {number} siteId The Site ID
933
- * @param {PrePackSampleController.CreateData} createData The Pre-Pack Sample Create Data
933
+ * @param {PrePackSampleController.CreateData} createData The PrePack Sample Create Data
934
934
  * @return {Promise<PrePackSampleModel>}
935
935
  */
936
936
  static create(siteId, createData)
@@ -967,7 +967,7 @@ export default PrePackSampleController;
967
967
  */
968
968
 
969
969
  /**
970
- * The Create Data for a Pre-Pack Sample
970
+ * The Create Data for a PrePack Sample
971
971
  *
972
972
  * @typedef {Object} PrePackSampleController.CreateData
973
973
  * @property {string} packingLineId The Packing Line ID this Sample is associated with
@@ -981,7 +981,7 @@ export default PrePackSampleController;
981
981
  */
982
982
 
983
983
  /**
984
- * The Update Data for a Pre-Pack Sample
984
+ * The Update Data for a PrePack Sample
985
985
  *
986
986
  * @typedef {Object} PrePackSampleController.UpdateData
987
987
  * @property {string} [packingLineId] The Packing Line ID this Sample is associated with
@@ -190,7 +190,7 @@ class PackingLineModel extends BaseModel
190
190
  /**
191
191
  * The Optional Shift Management Object for this Packing Line
192
192
  *
193
- * @type {?{points: {currentShiftId: number, currentShiftStatus: number, createNewDayShiftRequest: number, createNewNightShiftRequest: number, startCurrentShiftRequest: number, finishCurrentShiftRequest: number, currentFocusMeetingId: number, startFocusMeetingRequest: number, finishFocusMeetingRequest: number, currentGrowerChangeMeetingId: number, startGrowerChangeMeetingRequest: number, finishGrowerChangeMeetingRequest: number, shiftSchedules: number, currentShiftModifyHourlyEntryRequest: number, currentShiftClass1TraysPerHourTarget: number, currentShiftClass1TraysPerHourAdjustedTarget: number, currentShiftClass1TraysPerHour: number, currentShiftCostPerTrayTarget: number, currentShiftCostPerTrayAdjustedTarget: number, currentShiftCostPerTray: number, currentShiftManningTarget: number, currentShiftClass1Manning: number, currentShiftClass2Manning: number, currentShiftClass1ManningTarget: number, currentShiftClass2ManningTarget: number, currentShiftQualityR600IdealTarget: number, currentShiftQualityR600Ideal: number, currentShiftScorePercentage: number, class1TraysPerHourTargets: number, costPerTrayTargets: number, manningTargets: number, qualityR600IdealTargets: number, layeredTrayPercentageTargets: number, class1PercentageTargets: ?number, costPerManningUnitHour: number, class1TraysPerHourScoreWeighting: number, costPerTrayScoreWeighting: number, qualityR600IdealScoreWeighting: number, summaryReportEmailContacts: number, currentShiftUpdateManningTeamsRequest: ?number, currentShiftUpdateManningTeamsTimestamp: ?number, manningTeams: ?number}, customQualityConfiguration: Array<{id: string, name: string, type: string, points: {currentShiftCustomQualityTarget: number, currentShiftCustomQualityValue: number, customQualityTargets: number, customQualityScoreWeighting: number}}>, enabled: boolean, taskDefinitions: Array<{type: string, tags: Array<{id: string, name: string, color: string, deleted: boolean}>}>, manningUsesTeams: boolean}}
193
+ * @type {?{points: {currentShiftId: number, currentShiftStatus: number, createNewDayShiftRequest: number, createNewNightShiftRequest: number, startCurrentShiftRequest: number, finishCurrentShiftRequest: number, currentFocusMeetingId: number, startFocusMeetingRequest: number, finishFocusMeetingRequest: number, currentGrowerChangeMeetingId: number, startGrowerChangeMeetingRequest: number, finishGrowerChangeMeetingRequest: number, shiftSchedules: number, currentShiftModifyHourlyEntryRequest: number, currentShiftClass1TraysPerHourTarget: number, currentShiftClass1TraysPerHourAdjustedTarget: number, currentShiftClass1TraysPerHour: number, currentShiftCostPerTrayTarget: number, currentShiftCostPerTrayAdjustedTarget: number, currentShiftCostPerTray: number, currentShiftManningTarget: number, currentShiftClass1Manning: number, currentShiftClass2Manning: number, currentShiftClass1ManningTarget: number, currentShiftClass2ManningTarget: number, currentShiftQualityR600IdealTarget: number, currentShiftQualityR600Ideal: number, currentShiftScorePercentage: number, class1TraysPerHourTargets: number, class1TraysPerHourAdjustments: number, costPerTrayTargets: number, manningTargets: number, qualityR600IdealTargets: number, layeredTrayPercentageTargets: number, class1PercentageTargets: ?number, costPerManningUnitHour: number, class1TraysPerHourScoreWeighting: number, costPerTrayScoreWeighting: number, qualityR600IdealScoreWeighting: number, summaryReportEmailContacts: number, currentShiftUpdateManningTeamsRequest: ?number, currentShiftUpdateManningTeamsTimestamp: ?number, manningTeams: ?number}, customQualityConfiguration: Array<{id: string, name: string, type: string, points: {currentShiftCustomQualityTarget: number, currentShiftCustomQualityValue: number, customQualityTargets: number, customQualityScoreWeighting: number}}>, enabled: boolean, taskDefinitions: Array<{type: string, tags: Array<{id: string, name: string, color: string, deleted: boolean}>}>, manningUsesTeams: boolean}}
194
194
  * @public
195
195
  */
196
196
  this.shiftManagement = null;
@@ -3971,6 +3971,22 @@ class PackingLineModel extends BaseModel
3971
3971
  pointsObject.class1TraysPerHourTargets = 0;
3972
3972
  }
3973
3973
 
3974
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'class1TraysPerHourAdjustments' in jsonObject['shiftManagement'].points)
3975
+ {
3976
+ pointsObject.class1TraysPerHourAdjustments = (function(){
3977
+ if(typeof jsonObject['shiftManagement'].points.class1TraysPerHourAdjustments !== 'number')
3978
+ {
3979
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.class1TraysPerHourAdjustments)) ? Number(jsonObject['shiftManagement'].points.class1TraysPerHourAdjustments) : Math.floor(Number(jsonObject['shiftManagement'].points.class1TraysPerHourAdjustments));
3980
+ }
3981
+
3982
+ return Number.isInteger(jsonObject['shiftManagement'].points.class1TraysPerHourAdjustments) ? jsonObject['shiftManagement'].points.class1TraysPerHourAdjustments : Math.floor(jsonObject['shiftManagement'].points.class1TraysPerHourAdjustments);
3983
+ }());
3984
+ }
3985
+ else
3986
+ {
3987
+ pointsObject.class1TraysPerHourAdjustments = 0;
3988
+ }
3989
+
3974
3990
  if(typeof jsonObject['shiftManagement'].points === 'object' && 'costPerTrayTargets' in jsonObject['shiftManagement'].points)
3975
3991
  {
3976
3992
  pointsObject.costPerTrayTargets = (function(){
@@ -4265,6 +4281,8 @@ class PackingLineModel extends BaseModel
4265
4281
 
4266
4282
  pointsDefaultValue.class1TraysPerHourTargets = 0;
4267
4283
 
4284
+ pointsDefaultValue.class1TraysPerHourAdjustments = 0;
4285
+
4268
4286
  pointsDefaultValue.costPerTrayTargets = 0;
4269
4287
 
4270
4288
  pointsDefaultValue.manningTargets = 0;
@@ -7,7 +7,7 @@
7
7
  import BaseModel from '../../../Models/BaseModel';
8
8
 
9
9
  /**
10
- * Model Class for a Pre-Pack Sample
10
+ * Model Class for a PrePack Sample
11
11
  *
12
12
  * @class
13
13
  * @hideconstructor
@@ -19,14 +19,14 @@ class PrePackSampleModel extends BaseModel
19
19
  * PrePackSampleModel Constructor
20
20
  *
21
21
  * @protected
22
- * @param {number} siteId The Site ID associated with this Pre-Pack Sample
22
+ * @param {number} siteId The Site ID associated with this PrePack Sample
23
23
  */
24
24
  constructor(siteId)
25
25
  {
26
26
  super();
27
27
 
28
28
  /**
29
- * The Pre-Pack Sample ID
29
+ * The PrePack Sample ID
30
30
  *
31
31
  * @type {string}
32
32
  * @public
@@ -90,7 +90,7 @@ class PrePackSampleModel extends BaseModel
90
90
  this.totalFruitSampled = 0;
91
91
 
92
92
  /**
93
- * Whether the Pre-Pack Sample has been deleted
93
+ * Whether the PrePack Sample has been deleted
94
94
  *
95
95
  * @type {boolean}
96
96
  * @public
@@ -98,7 +98,7 @@ class PrePackSampleModel extends BaseModel
98
98
  this.deleted = false;
99
99
 
100
100
  /**
101
- * When the Pre-Pack Sample was last updated
101
+ * When the PrePack Sample was last updated
102
102
  *
103
103
  * @type {Date}
104
104
  * @public
@@ -106,7 +106,7 @@ class PrePackSampleModel extends BaseModel
106
106
  this.updateTimestamp = new Date();
107
107
 
108
108
  /**
109
- * The Site ID associated with this Pre-Pack Sample
109
+ * The Site ID associated with this PrePack Sample
110
110
  *
111
111
  * @type {number}
112
112
  * @public
@@ -120,7 +120,7 @@ class PrePackSampleModel extends BaseModel
120
120
  * @static
121
121
  * @public
122
122
  * @param {Object<string, any>|string} json A JSON Object or JSON String
123
- * @param {number} siteId The Site ID associated with this Pre-Pack Sample
123
+ * @param {number} siteId The Site ID associated with this PrePack Sample
124
124
  * @return {PrePackSampleModel}
125
125
  */
126
126
  static fromJSON(json, siteId)
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '2.3.25';
2
+ export const version = '2.3.26';