@ricado/api-client 2.7.0 → 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.
@@ -293,6 +293,7 @@ var _default = MAFSizerController;
293
293
  * @typedef {Object} MAFSizerController.ArticleClassType
294
294
  * @property {string} articleName Name of the MAF Sizer Article
295
295
  * @property {string} classType The Class Type for this MAF Sizer Article
296
+ * @property {string} matchType The Match Type used when Evaluating the Product Name
296
297
  * @memberof Controllers.Packhouse.Site
297
298
  */
298
299
 
@@ -2483,6 +2483,136 @@ var PackrunController = /*#__PURE__*/function () {
2483
2483
  return _PackrunModel.default.fromJSON(result, siteId);
2484
2484
  }();
2485
2485
 
2486
+ resolve(resolveValue);
2487
+ }).catch(function (error) {
2488
+ return reject(error);
2489
+ });
2490
+ });
2491
+ }
2492
+ /**
2493
+ * Retrieve Tipped Bins for all Packruns [GET /packhouse/sites/{siteId}/packruns/tippedBins]
2494
+ *
2495
+ * Retrieves the Tipped Bins for all Packruns
2496
+ *
2497
+ * @static
2498
+ * @public
2499
+ * @param {number} siteId The Site ID
2500
+ * @param {Date} createdTimestampBegin Filter by the Timestamp when Packruns were Created. Results Greater than or Equal to Timestamp
2501
+ * @param {Date} createdTimestampEnd Filter by the Timestamp when Packruns were Created. Results Less than or Equal to Timestamp
2502
+ * @return {Promise<Array<PackrunController.PackrunTippedBinsItem>>}
2503
+ */
2504
+
2505
+ }, {
2506
+ key: "getAllTippedBins",
2507
+ value: function getAllTippedBins(siteId, createdTimestampBegin, createdTimestampEnd) {
2508
+ return new Promise(function (resolve, reject) {
2509
+ var queryParameters = {};
2510
+
2511
+ _RequestHelper.default.getRequest("/packhouse/sites/".concat(siteId, "/packruns/tippedBins"), Object.assign(queryParameters, {
2512
+ createdTimestampBegin: createdTimestampBegin,
2513
+ createdTimestampEnd: createdTimestampEnd
2514
+ })).then(function (result) {
2515
+ var resolveValue = function () {
2516
+ if (Array.isArray(result) !== true) {
2517
+ return [];
2518
+ }
2519
+
2520
+ return result.map(function (resultItem) {
2521
+ return function () {
2522
+ var resultItemObject = {};
2523
+
2524
+ if (_typeof(resultItem) === 'object' && 'packrunId' in resultItem) {
2525
+ resultItemObject.packrunId = function () {
2526
+ if (typeof resultItem.packrunId !== 'string') {
2527
+ return String(resultItem.packrunId);
2528
+ }
2529
+
2530
+ return resultItem.packrunId;
2531
+ }();
2532
+ } else {
2533
+ resultItemObject.packrunId = "";
2534
+ }
2535
+
2536
+ if (_typeof(resultItem) === 'object' && 'tippedBins' in resultItem) {
2537
+ resultItemObject.tippedBins = function () {
2538
+ if (typeof resultItem.tippedBins !== 'number') {
2539
+ return Number.isInteger(Number(resultItem.tippedBins)) ? Number(resultItem.tippedBins) : Math.floor(Number(resultItem.tippedBins));
2540
+ }
2541
+
2542
+ return Number.isInteger(resultItem.tippedBins) ? resultItem.tippedBins : Math.floor(resultItem.tippedBins);
2543
+ }();
2544
+ } else {
2545
+ resultItemObject.tippedBins = 0;
2546
+ }
2547
+
2548
+ return resultItemObject;
2549
+ }();
2550
+ });
2551
+ }();
2552
+
2553
+ resolve(resolveValue);
2554
+ }).catch(function (error) {
2555
+ return reject(error);
2556
+ });
2557
+ });
2558
+ }
2559
+ /**
2560
+ * Retrieve Tipped Bins for specified Packruns [POST /packhouse/sites/{siteId}/packruns/tippedBins]
2561
+ *
2562
+ * Retrieves the Tipped Bins for specified Packruns
2563
+ *
2564
+ * @static
2565
+ * @public
2566
+ * @param {number} siteId The Site ID
2567
+ * @param {string[]} packrunIds An Array of Packrun IDs to Fetch Tipped Bins for
2568
+ * @return {Promise<Array<PackrunController.PackrunTippedBinsItem>>}
2569
+ */
2570
+
2571
+ }, {
2572
+ key: "getSpecificTippedBins",
2573
+ value: function getSpecificTippedBins(siteId, packrunIds) {
2574
+ return new Promise(function (resolve, reject) {
2575
+ _RequestHelper.default.postRequest("/packhouse/sites/".concat(siteId, "/packruns/tippedBins"), {
2576
+ packrunIds: packrunIds
2577
+ }).then(function (result) {
2578
+ var resolveValue = function () {
2579
+ if (Array.isArray(result) !== true) {
2580
+ return [];
2581
+ }
2582
+
2583
+ return result.map(function (resultItem) {
2584
+ return function () {
2585
+ var resultItemObject = {};
2586
+
2587
+ if (_typeof(resultItem) === 'object' && 'packrunId' in resultItem) {
2588
+ resultItemObject.packrunId = function () {
2589
+ if (typeof resultItem.packrunId !== 'string') {
2590
+ return String(resultItem.packrunId);
2591
+ }
2592
+
2593
+ return resultItem.packrunId;
2594
+ }();
2595
+ } else {
2596
+ resultItemObject.packrunId = "";
2597
+ }
2598
+
2599
+ if (_typeof(resultItem) === 'object' && 'tippedBins' in resultItem) {
2600
+ resultItemObject.tippedBins = function () {
2601
+ if (typeof resultItem.tippedBins !== 'number') {
2602
+ return Number.isInteger(Number(resultItem.tippedBins)) ? Number(resultItem.tippedBins) : Math.floor(Number(resultItem.tippedBins));
2603
+ }
2604
+
2605
+ return Number.isInteger(resultItem.tippedBins) ? resultItem.tippedBins : Math.floor(resultItem.tippedBins);
2606
+ }();
2607
+ } else {
2608
+ resultItemObject.tippedBins = 0;
2609
+ }
2610
+
2611
+ return resultItemObject;
2612
+ }();
2613
+ });
2614
+ }();
2615
+
2486
2616
  resolve(resolveValue);
2487
2617
  }).catch(function (error) {
2488
2618
  return reject(error);
@@ -2770,6 +2900,15 @@ var _default = PackrunController;
2770
2900
  * @memberof Controllers.Packhouse.Site
2771
2901
  */
2772
2902
 
2903
+ /**
2904
+ * A **PackrunTippedBinsItem** Type
2905
+ *
2906
+ * @typedef {Object} PackrunController.PackrunTippedBinsItem
2907
+ * @property {string} packrunId The Packrun ID
2908
+ * @property {number} tippedBins The Total Tipped Bins for the Packrun
2909
+ * @memberof Controllers.Packhouse.Site
2910
+ */
2911
+
2773
2912
  /**
2774
2913
  * A **TimeBatch** Type
2775
2914
  *
@@ -189,7 +189,7 @@ var MAFSizerModel = /*#__PURE__*/function (_BaseModel) {
189
189
  /**
190
190
  * An Array of Article to Class Type Maps for this MAF Sizer
191
191
  *
192
- * @type {Array<{articleName: string, classType: string}>}
192
+ * @type {Array<{articleName: string, classType: string, matchType: string}>}
193
193
  * @public
194
194
  */
195
195
 
@@ -1094,6 +1094,18 @@ var MAFSizerModel = /*#__PURE__*/function (_BaseModel) {
1094
1094
  articleClassTypesItemObject.classType = "";
1095
1095
  }
1096
1096
 
1097
+ if (_typeof(articleClassTypesItem) === 'object' && 'matchType' in articleClassTypesItem) {
1098
+ articleClassTypesItemObject.matchType = function () {
1099
+ if (typeof articleClassTypesItem.matchType !== 'string') {
1100
+ return String(articleClassTypesItem.matchType);
1101
+ }
1102
+
1103
+ return articleClassTypesItem.matchType;
1104
+ }();
1105
+ } else {
1106
+ articleClassTypesItemObject.matchType = "";
1107
+ }
1108
+
1097
1109
  return articleClassTypesItemObject;
1098
1110
  }();
1099
1111
  });
@@ -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.7.0';
8
+ var version = '2.7.1';
9
9
  exports.version = version;
package/lib/index.d.ts CHANGED
@@ -14977,6 +14977,10 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/MAFSizerController
14977
14977
  * The Class Type for this MAF Sizer Article
14978
14978
  */
14979
14979
  classType: string;
14980
+ /**
14981
+ * The Match Type used when Evaluating the Product Name
14982
+ */
14983
+ matchType: string;
14980
14984
  };
14981
14985
  }
14982
14986
  import MAFSizerModel from "@ricado/api-client/Models/Packhouse/Site/MAFSizerModel";
@@ -17279,6 +17283,31 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackrunController'
17279
17283
  * @return {Promise<PackrunModel>}
17280
17284
  */
17281
17285
  static create(siteId: number, createData: PackrunController.CreateData): Promise<PackrunModel>;
17286
+ /**
17287
+ * Retrieve Tipped Bins for all Packruns [GET /packhouse/sites/{siteId}/packruns/tippedBins]
17288
+ *
17289
+ * Retrieves the Tipped Bins for all Packruns
17290
+ *
17291
+ * @static
17292
+ * @public
17293
+ * @param {number} siteId The Site ID
17294
+ * @param {Date} createdTimestampBegin Filter by the Timestamp when Packruns were Created. Results Greater than or Equal to Timestamp
17295
+ * @param {Date} createdTimestampEnd Filter by the Timestamp when Packruns were Created. Results Less than or Equal to Timestamp
17296
+ * @return {Promise<Array<PackrunController.PackrunTippedBinsItem>>}
17297
+ */
17298
+ static getAllTippedBins(siteId: number, createdTimestampBegin: Date, createdTimestampEnd: Date): Promise<Array<PackrunController.PackrunTippedBinsItem>>;
17299
+ /**
17300
+ * Retrieve Tipped Bins for specified Packruns [POST /packhouse/sites/{siteId}/packruns/tippedBins]
17301
+ *
17302
+ * Retrieves the Tipped Bins for specified Packruns
17303
+ *
17304
+ * @static
17305
+ * @public
17306
+ * @param {number} siteId The Site ID
17307
+ * @param {string[]} packrunIds An Array of Packrun IDs to Fetch Tipped Bins for
17308
+ * @return {Promise<Array<PackrunController.PackrunTippedBinsItem>>}
17309
+ */
17310
+ static getSpecificTippedBins(siteId: number, packrunIds: string[]): Promise<Array<PackrunController.PackrunTippedBinsItem>>;
17282
17311
  }
17283
17312
  namespace PackrunController {
17284
17313
  /**
@@ -18007,6 +18036,19 @@ declare module '@ricado/api-client/Controllers/Packhouse/Site/PackrunController'
18007
18036
  */
18008
18037
  classTypeTotals: ClassTypePercentageItem[];
18009
18038
  };
18039
+ /**
18040
+ * A **PackrunTippedBinsItem** Type
18041
+ */
18042
+ type PackrunTippedBinsItem = {
18043
+ /**
18044
+ * The Packrun ID
18045
+ */
18046
+ packrunId: string;
18047
+ /**
18048
+ * The Total Tipped Bins for the Packrun
18049
+ */
18050
+ tippedBins: number;
18051
+ };
18010
18052
  /**
18011
18053
  * A **TimeBatch** Type
18012
18054
  */
@@ -28501,12 +28543,13 @@ declare module '@ricado/api-client/Models/Packhouse/Site/MAFSizerModel' {
28501
28543
  /**
28502
28544
  * An Array of Article to Class Type Maps for this MAF Sizer
28503
28545
  *
28504
- * @type {Array<{articleName: string, classType: string}>}
28546
+ * @type {Array<{articleName: string, classType: string, matchType: string}>}
28505
28547
  * @public
28506
28548
  */
28507
28549
  articleClassTypes: {
28508
28550
  articleName: string;
28509
28551
  classType: string;
28552
+ matchType: string;
28510
28553
  }[];
28511
28554
  /**
28512
28555
  * Whether the MAF Sizer has been deleted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricado/api-client",
3
- "version": "2.7.0",
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
  *
@@ -182,7 +182,7 @@ class MAFSizerModel extends BaseModel
182
182
  /**
183
183
  * An Array of Article to Class Type Maps for this MAF Sizer
184
184
  *
185
- * @type {Array<{articleName: string, classType: string}>}
185
+ * @type {Array<{articleName: string, classType: string, matchType: string}>}
186
186
  * @public
187
187
  */
188
188
  this.articleClassTypes = [];
@@ -1340,6 +1340,22 @@ class MAFSizerModel extends BaseModel
1340
1340
  {
1341
1341
  articleClassTypesItemObject.classType = "";
1342
1342
  }
1343
+
1344
+ if(typeof articleClassTypesItem === 'object' && 'matchType' in articleClassTypesItem)
1345
+ {
1346
+ articleClassTypesItemObject.matchType = (function(){
1347
+ if(typeof articleClassTypesItem.matchType !== 'string')
1348
+ {
1349
+ return String(articleClassTypesItem.matchType);
1350
+ }
1351
+
1352
+ return articleClassTypesItem.matchType;
1353
+ }());
1354
+ }
1355
+ else
1356
+ {
1357
+ articleClassTypesItemObject.matchType = "";
1358
+ }
1343
1359
 
1344
1360
  return articleClassTypesItemObject;
1345
1361
  }());
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '2.7.0';
2
+ export const version = '2.7.1';