@ricado/api-client 2.6.1 → 2.7.1

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 (31) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/MAFSizerController.js +1 -0
  3. package/lib/Controllers/Packhouse/Site/PackrunController.js +139 -0
  4. package/lib/Controllers/Packhouse/Site/ReemoonSizerBatchController.js +915 -0
  5. package/lib/Controllers/Packhouse/Site/ReemoonSizerController.js +300 -0
  6. package/lib/Controllers/Packhouse/Site/ReemoonSizerOutletProductChangeController.js +885 -0
  7. package/lib/Controllers/Packhouse/Site/ReemoonSizerPackrunSummaryController.js +914 -0
  8. package/lib/Controllers/Packhouse/Site/index.js +12 -0
  9. package/lib/Models/Packhouse/Site/MAFSizerModel.js +13 -1
  10. package/lib/Models/Packhouse/Site/ReemoonSizerBatchModel.js +547 -0
  11. package/lib/Models/Packhouse/Site/ReemoonSizerModel.js +1272 -0
  12. package/lib/Models/Packhouse/Site/ReemoonSizerOutletProductChangeModel.js +293 -0
  13. package/lib/Models/Packhouse/Site/ReemoonSizerPackrunSummaryModel.js +461 -0
  14. package/lib/Models/Packhouse/Site/index.js +12 -0
  15. package/lib/PackageVersion.js +1 -1
  16. package/lib/index.d.ts +7155 -5149
  17. package/package.json +1 -1
  18. package/src/Controllers/Packhouse/Site/MAFSizerController.js +1 -0
  19. package/src/Controllers/Packhouse/Site/PackrunController.js +150 -0
  20. package/src/Controllers/Packhouse/Site/ReemoonSizerBatchController.js +1046 -0
  21. package/src/Controllers/Packhouse/Site/ReemoonSizerController.js +277 -0
  22. package/src/Controllers/Packhouse/Site/ReemoonSizerOutletProductChangeController.js +1016 -0
  23. package/src/Controllers/Packhouse/Site/ReemoonSizerPackrunSummaryController.js +1045 -0
  24. package/src/Controllers/Packhouse/Site/index.js +8 -0
  25. package/src/Models/Packhouse/Site/MAFSizerModel.js +17 -1
  26. package/src/Models/Packhouse/Site/ReemoonSizerBatchModel.js +596 -0
  27. package/src/Models/Packhouse/Site/ReemoonSizerModel.js +1576 -0
  28. package/src/Models/Packhouse/Site/ReemoonSizerOutletProductChangeModel.js +280 -0
  29. package/src/Models/Packhouse/Site/ReemoonSizerPackrunSummaryModel.js +501 -0
  30. package/src/Models/Packhouse/Site/index.js +8 -0
  31. package/src/PackageVersion.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricado/api-client",
3
- "version": "2.6.1",
3
+ "version": "2.7.1",
4
4
  "description": "RICADO Gen 4 API Client Library for NodeJS and Browsers",
5
5
  "author": {
6
6
  "name": "Ash Neilson"
@@ -272,5 +272,6 @@ export default MAFSizerController;
272
272
  * @typedef {Object} MAFSizerController.ArticleClassType
273
273
  * @property {string} articleName Name of the MAF Sizer Article
274
274
  * @property {string} classType The Class Type for this MAF Sizer Article
275
+ * @property {string} matchType The Match Type used when Evaluating the Product Name
275
276
  * @memberof Controllers.Packhouse.Site
276
277
  */
@@ -3132,6 +3132,147 @@ class PackrunController
3132
3132
  .catch(error => reject(error));
3133
3133
  });
3134
3134
  }
3135
+
3136
+ /**
3137
+ * Retrieve Tipped Bins for all Packruns [GET /packhouse/sites/{siteId}/packruns/tippedBins]
3138
+ *
3139
+ * Retrieves the Tipped Bins for all Packruns
3140
+ *
3141
+ * @static
3142
+ * @public
3143
+ * @param {number} siteId The Site ID
3144
+ * @param {Date} createdTimestampBegin Filter by the Timestamp when Packruns were Created. Results Greater than or Equal to Timestamp
3145
+ * @param {Date} createdTimestampEnd Filter by the Timestamp when Packruns were Created. Results Less than or Equal to Timestamp
3146
+ * @return {Promise<Array<PackrunController.PackrunTippedBinsItem>>}
3147
+ */
3148
+ static getAllTippedBins(siteId, createdTimestampBegin, createdTimestampEnd)
3149
+ {
3150
+ return new Promise((resolve, reject) => {
3151
+ let queryParameters = {};
3152
+
3153
+ RequestHelper.getRequest(`/packhouse/sites/${siteId}/packruns/tippedBins`, Object.assign(queryParameters, {createdTimestampBegin, createdTimestampEnd}))
3154
+ .then((result) => {
3155
+ let resolveValue = (function(){
3156
+ if(Array.isArray(result) !== true)
3157
+ {
3158
+ return [];
3159
+ }
3160
+
3161
+ return result.map((resultItem) => {
3162
+ return (function(){
3163
+ let resultItemObject = {};
3164
+
3165
+ if(typeof resultItem === 'object' && 'packrunId' in resultItem)
3166
+ {
3167
+ resultItemObject.packrunId = (function(){
3168
+ if(typeof resultItem.packrunId !== 'string')
3169
+ {
3170
+ return String(resultItem.packrunId);
3171
+ }
3172
+
3173
+ return resultItem.packrunId;
3174
+ }());
3175
+ }
3176
+ else
3177
+ {
3178
+ resultItemObject.packrunId = "";
3179
+ }
3180
+
3181
+ if(typeof resultItem === 'object' && 'tippedBins' in resultItem)
3182
+ {
3183
+ resultItemObject.tippedBins = (function(){
3184
+ if(typeof resultItem.tippedBins !== 'number')
3185
+ {
3186
+ return Number.isInteger(Number(resultItem.tippedBins)) ? Number(resultItem.tippedBins) : Math.floor(Number(resultItem.tippedBins));
3187
+ }
3188
+
3189
+ return Number.isInteger(resultItem.tippedBins) ? resultItem.tippedBins : Math.floor(resultItem.tippedBins);
3190
+ }());
3191
+ }
3192
+ else
3193
+ {
3194
+ resultItemObject.tippedBins = 0;
3195
+ }
3196
+
3197
+ return resultItemObject;
3198
+ }());
3199
+ });
3200
+ }());
3201
+
3202
+ resolve(resolveValue);
3203
+ })
3204
+ .catch(error => reject(error));
3205
+ });
3206
+ }
3207
+
3208
+ /**
3209
+ * Retrieve Tipped Bins for specified Packruns [POST /packhouse/sites/{siteId}/packruns/tippedBins]
3210
+ *
3211
+ * Retrieves the Tipped Bins for specified Packruns
3212
+ *
3213
+ * @static
3214
+ * @public
3215
+ * @param {number} siteId The Site ID
3216
+ * @param {string[]} packrunIds An Array of Packrun IDs to Fetch Tipped Bins for
3217
+ * @return {Promise<Array<PackrunController.PackrunTippedBinsItem>>}
3218
+ */
3219
+ static getSpecificTippedBins(siteId, packrunIds)
3220
+ {
3221
+ return new Promise((resolve, reject) => {
3222
+ RequestHelper.postRequest(`/packhouse/sites/${siteId}/packruns/tippedBins`, {packrunIds})
3223
+ .then((result) => {
3224
+ let resolveValue = (function(){
3225
+ if(Array.isArray(result) !== true)
3226
+ {
3227
+ return [];
3228
+ }
3229
+
3230
+ return result.map((resultItem) => {
3231
+ return (function(){
3232
+ let resultItemObject = {};
3233
+
3234
+ if(typeof resultItem === 'object' && 'packrunId' in resultItem)
3235
+ {
3236
+ resultItemObject.packrunId = (function(){
3237
+ if(typeof resultItem.packrunId !== 'string')
3238
+ {
3239
+ return String(resultItem.packrunId);
3240
+ }
3241
+
3242
+ return resultItem.packrunId;
3243
+ }());
3244
+ }
3245
+ else
3246
+ {
3247
+ resultItemObject.packrunId = "";
3248
+ }
3249
+
3250
+ if(typeof resultItem === 'object' && 'tippedBins' in resultItem)
3251
+ {
3252
+ resultItemObject.tippedBins = (function(){
3253
+ if(typeof resultItem.tippedBins !== 'number')
3254
+ {
3255
+ return Number.isInteger(Number(resultItem.tippedBins)) ? Number(resultItem.tippedBins) : Math.floor(Number(resultItem.tippedBins));
3256
+ }
3257
+
3258
+ return Number.isInteger(resultItem.tippedBins) ? resultItem.tippedBins : Math.floor(resultItem.tippedBins);
3259
+ }());
3260
+ }
3261
+ else
3262
+ {
3263
+ resultItemObject.tippedBins = 0;
3264
+ }
3265
+
3266
+ return resultItemObject;
3267
+ }());
3268
+ });
3269
+ }());
3270
+
3271
+ resolve(resolveValue);
3272
+ })
3273
+ .catch(error => reject(error));
3274
+ });
3275
+ }
3135
3276
  }
3136
3277
 
3137
3278
  export default PackrunController;
@@ -3411,6 +3552,15 @@ export default PackrunController;
3411
3552
  * @memberof Controllers.Packhouse.Site
3412
3553
  */
3413
3554
 
3555
+ /**
3556
+ * A **PackrunTippedBinsItem** Type
3557
+ *
3558
+ * @typedef {Object} PackrunController.PackrunTippedBinsItem
3559
+ * @property {string} packrunId The Packrun ID
3560
+ * @property {number} tippedBins The Total Tipped Bins for the Packrun
3561
+ * @memberof Controllers.Packhouse.Site
3562
+ */
3563
+
3414
3564
  /**
3415
3565
  * A **TimeBatch** Type
3416
3566
  *