@ricado/api-client 2.3.19 → 2.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -4309,6 +4309,7 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site' {
4309
4309
  export default Site;
4310
4310
  namespace Site {
4311
4311
  export { BinTipBarcodeScannerController };
4312
+ export { BinTipBarcodeScannerResultController };
4312
4313
  export { BinTipBinCardController };
4313
4314
  export { BinTipBinController };
4314
4315
  export { BinTipWeightController };
@@ -4344,6 +4345,7 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site' {
4344
4345
  export { VarietyController };
4345
4346
  }
4346
4347
  import BinTipBarcodeScannerController from "@ricado/api-client/Controllers/Packhouse/Site/BinTipBarcodeScannerController";
4348
+ import BinTipBarcodeScannerResultController from "@ricado/api-client/Controllers/Packhouse/Site/BinTipBarcodeScannerResultController";
4347
4349
  import BinTipBinCardController from "@ricado/api-client/Controllers/Packhouse/Site/BinTipBinCardController";
4348
4350
  import BinTipBinController from "@ricado/api-client/Controllers/Packhouse/Site/BinTipBinController";
4349
4351
  import BinTipWeightController from "@ricado/api-client/Controllers/Packhouse/Site/BinTipWeightController";
@@ -5918,6 +5920,7 @@ declare module '@ricado/api-client/Models/Packhouse/Site' {
5918
5920
  export default Site;
5919
5921
  namespace Site {
5920
5922
  export { BinTipBarcodeScannerModel };
5923
+ export { BinTipBarcodeScannerResultModel };
5921
5924
  export { BinTipBinCardModel };
5922
5925
  export { BinTipBinModel };
5923
5926
  export { BinTipWeightModel };
@@ -5953,6 +5956,7 @@ declare module '@ricado/api-client/Models/Packhouse/Site' {
5953
5956
  export { VarietyModel };
5954
5957
  }
5955
5958
  import BinTipBarcodeScannerModel from "@ricado/api-client/Models/Packhouse/Site/BinTipBarcodeScannerModel";
5959
+ import BinTipBarcodeScannerResultModel from "@ricado/api-client/Models/Packhouse/Site/BinTipBarcodeScannerResultModel";
5956
5960
  import BinTipBinCardModel from "@ricado/api-client/Models/Packhouse/Site/BinTipBinCardModel";
5957
5961
  import BinTipBinModel from "@ricado/api-client/Models/Packhouse/Site/BinTipBinModel";
5958
5962
  import BinTipWeightModel from "@ricado/api-client/Models/Packhouse/Site/BinTipWeightModel";
@@ -6736,17 +6740,31 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/BinTipBarcodeScann
6736
6740
  * The Name of this Bin Tip Barcode Scanner
6737
6741
  */
6738
6742
  name: string;
6743
+ /**
6744
+ * The Bin Tip that owns this Barcode Scanner
6745
+ */
6746
+ binTipId: string;
6739
6747
  /**
6740
6748
  * The Points used by this Bin Tip Barcode Scanner
6741
6749
  */
6742
6750
  points: {
6751
+ scannerCommunicationStatus: number;
6752
+ scannerChargingStatus: number;
6753
+ scannerChargingTimeRemaining: number;
6754
+ scannerBatteryTemperature: number;
6755
+ scannerBatteryPercentage: number;
6756
+ scannerBatteryCurrent: number;
6757
+ scannerBatteryVoltage: number;
6743
6758
  scannerErrorBeepRequest: number;
6759
+ serviceCommunicationStatus: number;
6760
+ serviceCommunicationLatency: number;
6744
6761
  restartServiceRequest: number;
6762
+ recentScanResults: number;
6745
6763
  };
6746
6764
  /**
6747
- * The Bin Tip that owns this Barcode Scanner
6765
+ * The Mode for this Bin Tip Barcode Scanner
6748
6766
  */
6749
- binTipId: string;
6767
+ mode: string;
6750
6768
  };
6751
6769
  /**
6752
6770
  * The Update Data for a Bin Tip Barcode Scanner
@@ -6756,22 +6774,192 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/BinTipBarcodeScann
6756
6774
  * The Name of this Bin Tip Barcode Scanner
6757
6775
  */
6758
6776
  name?: string;
6777
+ /**
6778
+ * The Bin Tip that owns this Barcode Scanner
6779
+ */
6780
+ binTipId?: string;
6759
6781
  /**
6760
6782
  * The Points used by this Bin Tip Barcode Scanner
6761
6783
  */
6762
6784
  points?: {
6785
+ scannerCommunicationStatus: number;
6786
+ scannerChargingStatus: number;
6787
+ scannerChargingTimeRemaining: number;
6788
+ scannerBatteryTemperature: number;
6789
+ scannerBatteryPercentage: number;
6790
+ scannerBatteryCurrent: number;
6791
+ scannerBatteryVoltage: number;
6763
6792
  scannerErrorBeepRequest: number;
6793
+ serviceCommunicationStatus: number;
6794
+ serviceCommunicationLatency: number;
6764
6795
  restartServiceRequest: number;
6796
+ recentScanResults: number;
6765
6797
  };
6766
6798
  /**
6767
- * The Bin Tip that owns this Barcode Scanner
6799
+ * The Mode for this Bin Tip Barcode Scanner
6768
6800
  */
6769
- binTipId?: string;
6801
+ mode?: string;
6770
6802
  };
6771
6803
  }
6772
6804
  import BinTipBarcodeScannerModel from "@ricado/api-client/Models/Packhouse/Site/BinTipBarcodeScannerModel";
6773
6805
  }
6774
6806
 
6807
+ declare module '@ricado/api-client/Controllers/Packhouse/Site/BinTipBarcodeScannerResultController' {
6808
+ export default BinTipBarcodeScannerResultController;
6809
+ /**
6810
+ * Controller Class for Bin Tip Barcode Scanner Results
6811
+ *
6812
+ * @class
6813
+ */
6814
+ class BinTipBarcodeScannerResultController {
6815
+ /**
6816
+ * Retrieve a Bin Tip Barcode Scanner Result [GET /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
6817
+ *
6818
+ * @static
6819
+ * @public
6820
+ * @param {number} siteId The Site ID
6821
+ * @param {string} id The Bin Tip Barcode Scanner Result ID
6822
+ * @return {Promise<BinTipBarcodeScannerResultModel>}
6823
+ */
6824
+ static getOne(siteId: number, id: string): Promise<BinTipBarcodeScannerResultModel>;
6825
+ /**
6826
+ * Update a Bin Tip Barcode Scanner Result [PATCH /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
6827
+ *
6828
+ * @static
6829
+ * @public
6830
+ * @param {number} siteId The Site ID
6831
+ * @param {string} id The Bin Tip Barcode Scanner Result ID
6832
+ * @param {BinTipBarcodeScannerResultController.UpdateData} updateData The Bin Tip Barcode Scanner Result Update Data
6833
+ * @return {Promise<BinTipBarcodeScannerResultModel>}
6834
+ */
6835
+ static update(siteId: number, id: string, updateData: BinTipBarcodeScannerResultController.UpdateData): Promise<BinTipBarcodeScannerResultModel>;
6836
+ /**
6837
+ * Delete a Bin Tip Barcode Scanner Result [DELETE /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
6838
+ *
6839
+ * @static
6840
+ * @public
6841
+ * @param {number} siteId The Site ID
6842
+ * @param {string} id The Bin Tip Barcode Scanner Result ID
6843
+ * @return {Promise<boolean>}
6844
+ */
6845
+ static delete(siteId: number, id: string): Promise<boolean>;
6846
+ /**
6847
+ * List all Bin Tip Barcode Scanner Results [GET /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results]
6848
+ *
6849
+ * @static
6850
+ * @public
6851
+ * @param {number} siteId The Site ID
6852
+ * @param {BinTipBarcodeScannerResultController.GetAllQueryParameters} [queryParameters] The Optional Query Parameters
6853
+ * @return {Promise<BinTipBarcodeScannerResultModel[]>}
6854
+ */
6855
+ static getAll(siteId: number, queryParameters?: BinTipBarcodeScannerResultController.GetAllQueryParameters | undefined): Promise<BinTipBarcodeScannerResultModel[]>;
6856
+ /**
6857
+ * Create a Bin Tip Barcode Scanner Result [POST /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results]
6858
+ *
6859
+ * @static
6860
+ * @public
6861
+ * @param {number} siteId The Site ID
6862
+ * @param {BinTipBarcodeScannerResultController.CreateData} createData The Bin Tip Barcode Scanner Result Create Data
6863
+ * @return {Promise<BinTipBarcodeScannerResultModel>}
6864
+ */
6865
+ static create(siteId: number, createData: BinTipBarcodeScannerResultController.CreateData): Promise<BinTipBarcodeScannerResultModel>;
6866
+ }
6867
+ namespace BinTipBarcodeScannerResultController {
6868
+ /**
6869
+ * The Optional Query Parameters for the getAll Function
6870
+ */
6871
+ export type GetAllQueryParameters = {
6872
+ /**
6873
+ * The Bin Tip Barcode Scanner ID associated with this Result
6874
+ */
6875
+ barcodeScannerId?: string;
6876
+ /**
6877
+ * A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
6878
+ */
6879
+ binNumber?: string;
6880
+ /**
6881
+ * The Type of this Barcode Scanner Result
6882
+ */
6883
+ type?: string;
6884
+ /**
6885
+ * The Packrun ID associated with this Barcode Scanner Result
6886
+ */
6887
+ packrunId?: string | null;
6888
+ /**
6889
+ * Filter by the Timestamp when this Barcode Scanner Result was Created. Results Greater than or Equal to Timestamp
6890
+ */
6891
+ createdTimestampBegin?: Date;
6892
+ /**
6893
+ * Filter by the Timestamp when this Barcode Scanner Result was Created. Results Less than or Equal to Timestamp
6894
+ */
6895
+ createdTimestampEnd?: Date;
6896
+ };
6897
+ /**
6898
+ * The Create Data for a Bin Tip Barcode Scanner Result
6899
+ */
6900
+ export type CreateData = {
6901
+ /**
6902
+ * The Bin Tip Barcode Scanner ID associated with this Result
6903
+ */
6904
+ barcodeScannerId: string;
6905
+ /**
6906
+ * A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
6907
+ */
6908
+ binNumber?: string;
6909
+ /**
6910
+ * When this Barcode Scanner Result was Created
6911
+ */
6912
+ createdTimestamp?: Date;
6913
+ /**
6914
+ * The Type of this Barcode Scanner Result
6915
+ */
6916
+ type: string;
6917
+ /**
6918
+ * The Packrun ID associated with this Barcode Scanner Result
6919
+ */
6920
+ packrunId?: string | null;
6921
+ /**
6922
+ * Whether the Bin Number was Valid and could be matched with a Current or Scheduled Packrun
6923
+ */
6924
+ result: boolean;
6925
+ /**
6926
+ * An Optional Message to accompany the Result. Typically only present when the Result is **false**
6927
+ */
6928
+ resultMessage: string | null;
6929
+ };
6930
+ /**
6931
+ * The Update Data for a Bin Tip Barcode Scanner Result
6932
+ */
6933
+ export type UpdateData = {
6934
+ /**
6935
+ * The Bin Tip Barcode Scanner ID associated with this Result
6936
+ */
6937
+ barcodeScannerId?: string;
6938
+ /**
6939
+ * When this Barcode Scanner Result was Created
6940
+ */
6941
+ createdTimestamp?: Date;
6942
+ /**
6943
+ * The Type of this Barcode Scanner Result
6944
+ */
6945
+ type?: string;
6946
+ /**
6947
+ * The Packrun ID associated with this Barcode Scanner Result
6948
+ */
6949
+ packrunId?: string | null;
6950
+ /**
6951
+ * Whether the Bin Number was Valid and could be matched with a Current or Scheduled Packrun
6952
+ */
6953
+ result?: boolean;
6954
+ /**
6955
+ * An Optional Message to accompany the Result. Typically only present when the Result is **false**
6956
+ */
6957
+ resultMessage?: string | null;
6958
+ };
6959
+ }
6960
+ import BinTipBarcodeScannerResultModel from "@ricado/api-client/Models/Packhouse/Site/BinTipBarcodeScannerResultModel";
6961
+ }
6962
+
6775
6963
  declare module '@ricado/api-client/Controllers/Packhouse/Site/BinTipBinCardController' {
6776
6964
  export default BinTipBinCardController;
6777
6965
  /**
@@ -18844,23 +19032,40 @@ declare module '@ricado/api-client/Models/Packhouse/Site/BinTipBarcodeScannerMod
18844
19032
  * @public
18845
19033
  */
18846
19034
  name: string;
19035
+ /**
19036
+ * The Bin Tip that owns this Barcode Scanner
19037
+ *
19038
+ * @type {string}
19039
+ * @public
19040
+ */
19041
+ binTipId: string;
18847
19042
  /**
18848
19043
  * The Points used by this Bin Tip Barcode Scanner
18849
19044
  *
18850
- * @type {{scannerErrorBeepRequest: number, restartServiceRequest: number}}
19045
+ * @type {{scannerCommunicationStatus: number, scannerChargingStatus: number, scannerChargingTimeRemaining: number, scannerBatteryTemperature: number, scannerBatteryPercentage: number, scannerBatteryCurrent: number, scannerBatteryVoltage: number, scannerErrorBeepRequest: number, serviceCommunicationStatus: number, serviceCommunicationLatency: number, restartServiceRequest: number, recentScanResults: number}}
18851
19046
  * @public
18852
19047
  */
18853
19048
  points: {
19049
+ scannerCommunicationStatus: number;
19050
+ scannerChargingStatus: number;
19051
+ scannerChargingTimeRemaining: number;
19052
+ scannerBatteryTemperature: number;
19053
+ scannerBatteryPercentage: number;
19054
+ scannerBatteryCurrent: number;
19055
+ scannerBatteryVoltage: number;
18854
19056
  scannerErrorBeepRequest: number;
19057
+ serviceCommunicationStatus: number;
19058
+ serviceCommunicationLatency: number;
18855
19059
  restartServiceRequest: number;
19060
+ recentScanResults: number;
18856
19061
  };
18857
19062
  /**
18858
- * The Bin Tip that owns this Barcode Scanner
19063
+ * The Mode for this Bin Tip Barcode Scanner
18859
19064
  *
18860
19065
  * @type {string}
18861
19066
  * @public
18862
19067
  */
18863
- binTipId: string;
19068
+ mode: string;
18864
19069
  /**
18865
19070
  * Whether the Bin Tip Barcode Scanner has been deleted
18866
19071
  *
@@ -18886,6 +19091,123 @@ declare module '@ricado/api-client/Models/Packhouse/Site/BinTipBarcodeScannerMod
18886
19091
  import BaseModel from "@ricado/api-client/Models/BaseModel";
18887
19092
  }
18888
19093
 
19094
+ declare module '@ricado/api-client/Models/Packhouse/Site/BinTipBarcodeScannerResultModel' {
19095
+ export default BinTipBarcodeScannerResultModel;
19096
+ /**
19097
+ * Model Class for a Bin Tip Barcode Scanner Result
19098
+ *
19099
+ * @class
19100
+ * @hideconstructor
19101
+ * @extends BaseModel
19102
+ */
19103
+ class BinTipBarcodeScannerResultModel extends BaseModel {
19104
+ /**
19105
+ * Create a new **BinTipBarcodeScannerResultModel** from a JSON Object or JSON String
19106
+ *
19107
+ * @static
19108
+ * @public
19109
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
19110
+ * @param {number} siteId The Site ID associated with this Bin Tip Barcode Scanner Result
19111
+ * @return {BinTipBarcodeScannerResultModel}
19112
+ */
19113
+ static fromJSON(json: {
19114
+ [x: string]: any;
19115
+ } | string, siteId: number): BinTipBarcodeScannerResultModel;
19116
+ /**
19117
+ * BinTipBarcodeScannerResultModel Constructor
19118
+ *
19119
+ * @protected
19120
+ * @param {number} siteId The Site ID associated with this Bin Tip Barcode Scanner Result
19121
+ */
19122
+ protected constructor();
19123
+ /**
19124
+ * The Bin Tip Barcode Scanner Result ID
19125
+ *
19126
+ * @type {string}
19127
+ * @public
19128
+ */
19129
+ id: string;
19130
+ /**
19131
+ * The Bin Tip Barcode Scanner ID associated with this Result
19132
+ *
19133
+ * @type {string}
19134
+ * @public
19135
+ */
19136
+ barcodeScannerId: string;
19137
+ /**
19138
+ * A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
19139
+ *
19140
+ * @type {string}
19141
+ * @public
19142
+ */
19143
+ binNumber: string;
19144
+ /**
19145
+ * When this Barcode Scanner Result was Created
19146
+ *
19147
+ * @type {Date}
19148
+ * @public
19149
+ */
19150
+ createdTimestamp: Date;
19151
+ /**
19152
+ * The Type of this Barcode Scanner Result
19153
+ *
19154
+ * @type {string}
19155
+ * @public
19156
+ */
19157
+ type: string;
19158
+ /**
19159
+ * The Packrun ID associated with this Barcode Scanner Result
19160
+ *
19161
+ * @type {?string}
19162
+ * @public
19163
+ */
19164
+ packrunId: string | null;
19165
+ /**
19166
+ * Whether the Bin Number was Valid and could be matched with a Current or Scheduled Packrun
19167
+ *
19168
+ * @type {boolean}
19169
+ * @public
19170
+ */
19171
+ result: boolean;
19172
+ /**
19173
+ * An Optional Message to accompany the Result. Typically only present when the Result is **false**
19174
+ *
19175
+ * @type {?string}
19176
+ * @public
19177
+ */
19178
+ resultMessage: string | null;
19179
+ /**
19180
+ * The Bin Lot Code of this Barcode Scanner Result
19181
+ *
19182
+ * @type {?string}
19183
+ * @public
19184
+ */
19185
+ binLotCode: string | null;
19186
+ /**
19187
+ * Whether the Bin Tip Barcode Scanner Result has been deleted
19188
+ *
19189
+ * @type {boolean}
19190
+ * @public
19191
+ */
19192
+ deleted: boolean;
19193
+ /**
19194
+ * When the Bin Tip Barcode Scanner Result was last updated
19195
+ *
19196
+ * @type {Date}
19197
+ * @public
19198
+ */
19199
+ updateTimestamp: Date;
19200
+ /**
19201
+ * The Site ID associated with this Bin Tip Barcode Scanner Result
19202
+ *
19203
+ * @type {number}
19204
+ * @public
19205
+ */
19206
+ siteId: number;
19207
+ }
19208
+ import BaseModel from "@ricado/api-client/Models/BaseModel";
19209
+ }
19210
+
18889
19211
  declare module '@ricado/api-client/Models/Packhouse/Site/BinTipBinCardModel' {
18890
19212
  export default BinTipBinCardModel;
18891
19213
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricado/api-client",
3
- "version": "2.3.19",
3
+ "version": "2.3.20",
4
4
  "description": "RICADO Gen 4 API Client Library for NodeJS and Browsers",
5
5
  "author": {
6
6
  "name": "Ash Neilson"
@@ -159,8 +159,9 @@ export default BinTipBarcodeScannerController;
159
159
  * @typedef {Object} BinTipBarcodeScannerController.CreateData
160
160
  * @property {?number} [rtuId] The RTU this Bin Tip Barcode Scanner Belt belongs to
161
161
  * @property {string} name The Name of this Bin Tip Barcode Scanner
162
- * @property {{scannerErrorBeepRequest: number, restartServiceRequest: number}} points The Points used by this Bin Tip Barcode Scanner
163
162
  * @property {string} binTipId The Bin Tip that owns this Barcode Scanner
163
+ * @property {{scannerCommunicationStatus: number, scannerChargingStatus: number, scannerChargingTimeRemaining: number, scannerBatteryTemperature: number, scannerBatteryPercentage: number, scannerBatteryCurrent: number, scannerBatteryVoltage: number, scannerErrorBeepRequest: number, serviceCommunicationStatus: number, serviceCommunicationLatency: number, restartServiceRequest: number, recentScanResults: number}} points The Points used by this Bin Tip Barcode Scanner
164
+ * @property {string} mode The Mode for this Bin Tip Barcode Scanner
164
165
  * @memberof Controllers.Packhouse.Site
165
166
  */
166
167
 
@@ -169,7 +170,8 @@ export default BinTipBarcodeScannerController;
169
170
  *
170
171
  * @typedef {Object} BinTipBarcodeScannerController.UpdateData
171
172
  * @property {string} [name] The Name of this Bin Tip Barcode Scanner
172
- * @property {{scannerErrorBeepRequest: number, restartServiceRequest: number}} [points] The Points used by this Bin Tip Barcode Scanner
173
173
  * @property {string} [binTipId] The Bin Tip that owns this Barcode Scanner
174
+ * @property {{scannerCommunicationStatus: number, scannerChargingStatus: number, scannerChargingTimeRemaining: number, scannerBatteryTemperature: number, scannerBatteryPercentage: number, scannerBatteryCurrent: number, scannerBatteryVoltage: number, scannerErrorBeepRequest: number, serviceCommunicationStatus: number, serviceCommunicationLatency: number, restartServiceRequest: number, recentScanResults: number}} [points] The Points used by this Bin Tip Barcode Scanner
175
+ * @property {string} [mode] The Mode for this Bin Tip Barcode Scanner
174
176
  * @memberof Controllers.Packhouse.Site
175
177
  */
@@ -0,0 +1,184 @@
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 RequestHelper from '../../../RequestHelper';
8
+ import BinTipBarcodeScannerResultModel from '../../../Models/Packhouse/Site/BinTipBarcodeScannerResultModel';
9
+
10
+ /**
11
+ * Controller Class for Bin Tip Barcode Scanner Results
12
+ *
13
+ * @class
14
+ */
15
+ class BinTipBarcodeScannerResultController
16
+ {
17
+ /**
18
+ * Retrieve a Bin Tip Barcode Scanner Result [GET /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
19
+ *
20
+ * @static
21
+ * @public
22
+ * @param {number} siteId The Site ID
23
+ * @param {string} id The Bin Tip Barcode Scanner Result ID
24
+ * @return {Promise<BinTipBarcodeScannerResultModel>}
25
+ */
26
+ static getOne(siteId, id)
27
+ {
28
+ return new Promise((resolve, reject) => {
29
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/bin-tip-barcode-scanner-results/${id}`)
30
+ .then((result) => {
31
+ let resolveValue = (function(){
32
+ return BinTipBarcodeScannerResultModel.fromJSON(result, siteId);
33
+ }());
34
+
35
+ resolve(resolveValue);
36
+ })
37
+ .catch(error => reject(error));
38
+ });
39
+ }
40
+
41
+ /**
42
+ * Update a Bin Tip Barcode Scanner Result [PATCH /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
43
+ *
44
+ * @static
45
+ * @public
46
+ * @param {number} siteId The Site ID
47
+ * @param {string} id The Bin Tip Barcode Scanner Result ID
48
+ * @param {BinTipBarcodeScannerResultController.UpdateData} updateData The Bin Tip Barcode Scanner Result Update Data
49
+ * @return {Promise<BinTipBarcodeScannerResultModel>}
50
+ */
51
+ static update(siteId, id, updateData)
52
+ {
53
+ return new Promise((resolve, reject) => {
54
+ RequestHelper.patchRequest(`/packhouse/sites/${siteId}/bin-tip-barcode-scanner-results/${id}`, updateData)
55
+ .then((result) => {
56
+ let resolveValue = (function(){
57
+ return BinTipBarcodeScannerResultModel.fromJSON(result, siteId);
58
+ }());
59
+
60
+ resolve(resolveValue);
61
+ })
62
+ .catch(error => reject(error));
63
+ });
64
+ }
65
+
66
+ /**
67
+ * Delete a Bin Tip Barcode Scanner Result [DELETE /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results/{id}]
68
+ *
69
+ * @static
70
+ * @public
71
+ * @param {number} siteId The Site ID
72
+ * @param {string} id The Bin Tip Barcode Scanner Result ID
73
+ * @return {Promise<boolean>}
74
+ */
75
+ static delete(siteId, id)
76
+ {
77
+ return new Promise((resolve, reject) => {
78
+ RequestHelper.deleteRequest(`/packhouse/sites/${siteId}/bin-tip-barcode-scanner-results/${id}`)
79
+ .then((result) => {
80
+ resolve(result ?? true);
81
+ })
82
+ .catch(error => reject(error));
83
+ });
84
+ }
85
+
86
+ /**
87
+ * List all Bin Tip Barcode Scanner Results [GET /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results]
88
+ *
89
+ * @static
90
+ * @public
91
+ * @param {number} siteId The Site ID
92
+ * @param {BinTipBarcodeScannerResultController.GetAllQueryParameters} [queryParameters] The Optional Query Parameters
93
+ * @return {Promise<BinTipBarcodeScannerResultModel[]>}
94
+ */
95
+ static getAll(siteId, queryParameters = {})
96
+ {
97
+ return new Promise((resolve, reject) => {
98
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/bin-tip-barcode-scanner-results`, queryParameters)
99
+ .then((result) => {
100
+ let resolveValue = (function(){
101
+ if(Array.isArray(result) !== true)
102
+ {
103
+ return [];
104
+ }
105
+
106
+ return result.map((resultItem) => {
107
+ return (function(){
108
+ return BinTipBarcodeScannerResultModel.fromJSON(resultItem, siteId);
109
+ }());
110
+ });
111
+ }());
112
+
113
+ resolve(resolveValue);
114
+ })
115
+ .catch(error => reject(error));
116
+ });
117
+ }
118
+
119
+ /**
120
+ * Create a Bin Tip Barcode Scanner Result [POST /packhouse/sites/{siteId}/bin-tip-barcode-scanner-results]
121
+ *
122
+ * @static
123
+ * @public
124
+ * @param {number} siteId The Site ID
125
+ * @param {BinTipBarcodeScannerResultController.CreateData} createData The Bin Tip Barcode Scanner Result Create Data
126
+ * @return {Promise<BinTipBarcodeScannerResultModel>}
127
+ */
128
+ static create(siteId, createData)
129
+ {
130
+ return new Promise((resolve, reject) => {
131
+ RequestHelper.postRequest(`/packhouse/sites/${siteId}/bin-tip-barcode-scanner-results`, createData)
132
+ .then((result) => {
133
+ let resolveValue = (function(){
134
+ return BinTipBarcodeScannerResultModel.fromJSON(result, siteId);
135
+ }());
136
+
137
+ resolve(resolveValue);
138
+ })
139
+ .catch(error => reject(error));
140
+ });
141
+ }
142
+ }
143
+
144
+ export default BinTipBarcodeScannerResultController;
145
+
146
+ /**
147
+ * The Optional Query Parameters for the getAll Function
148
+ *
149
+ * @typedef {Object} BinTipBarcodeScannerResultController.GetAllQueryParameters
150
+ * @property {string} [barcodeScannerId] The Bin Tip Barcode Scanner ID associated with this Result
151
+ * @property {string} [binNumber] A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
152
+ * @property {string} [type] The Type of this Barcode Scanner Result
153
+ * @property {?string} [packrunId] The Packrun ID associated with this Barcode Scanner Result
154
+ * @property {Date} [createdTimestampBegin] Filter by the Timestamp when this Barcode Scanner Result was Created. Results Greater than or Equal to Timestamp
155
+ * @property {Date} [createdTimestampEnd] Filter by the Timestamp when this Barcode Scanner Result was Created. Results Less than or Equal to Timestamp
156
+ * @memberof Controllers.Packhouse.Site
157
+ */
158
+
159
+ /**
160
+ * The Create Data for a Bin Tip Barcode Scanner Result
161
+ *
162
+ * @typedef {Object} BinTipBarcodeScannerResultController.CreateData
163
+ * @property {string} barcodeScannerId The Bin Tip Barcode Scanner ID associated with this Result
164
+ * @property {string} [binNumber] A 10-Digit Bin Number made up of a Bin Lot (4-Digits) and a Unique Number (6-Digits)
165
+ * @property {Date} [createdTimestamp] When this Barcode Scanner Result was Created
166
+ * @property {string} type The Type of this Barcode Scanner Result
167
+ * @property {?string} [packrunId] The Packrun ID associated with this Barcode Scanner Result
168
+ * @property {boolean} result Whether the Bin Number was Valid and could be matched with a Current or Scheduled Packrun
169
+ * @property {?string} resultMessage An Optional Message to accompany the Result. Typically only present when the Result is **false**
170
+ * @memberof Controllers.Packhouse.Site
171
+ */
172
+
173
+ /**
174
+ * The Update Data for a Bin Tip Barcode Scanner Result
175
+ *
176
+ * @typedef {Object} BinTipBarcodeScannerResultController.UpdateData
177
+ * @property {string} [barcodeScannerId] The Bin Tip Barcode Scanner ID associated with this Result
178
+ * @property {Date} [createdTimestamp] When this Barcode Scanner Result was Created
179
+ * @property {string} [type] The Type of this Barcode Scanner Result
180
+ * @property {?string} [packrunId] The Packrun ID associated with this Barcode Scanner Result
181
+ * @property {boolean} [result] Whether the Bin Number was Valid and could be matched with a Current or Scheduled Packrun
182
+ * @property {?string} [resultMessage] An Optional Message to accompany the Result. Typically only present when the Result is **false**
183
+ * @memberof Controllers.Packhouse.Site
184
+ */
@@ -8,6 +8,7 @@
8
8
  * @namespace Controllers.Packhouse.Site
9
9
  */
10
10
  import BinTipBarcodeScannerController from './BinTipBarcodeScannerController';
11
+ import BinTipBarcodeScannerResultController from './BinTipBarcodeScannerResultController';
11
12
  import BinTipBinCardController from './BinTipBinCardController';
12
13
  import BinTipBinController from './BinTipBinController';
13
14
  import BinTipWeightController from './BinTipWeightController';
@@ -44,6 +45,7 @@ import VarietyController from './VarietyController';
44
45
 
45
46
  const Site = {
46
47
  BinTipBarcodeScannerController,
48
+ BinTipBarcodeScannerResultController,
47
49
  BinTipBinCardController,
48
50
  BinTipBinController,
49
51
  BinTipWeightController,