@lcdp/api-react-rest-client 2.9.0-develop.12986313638 → 2.9.0-develop.12986406125

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 (83) hide show
  1. package/auth/src/models/RestError.d.ts +4 -2
  2. package/auth/src/models/RestError.js +4 -2
  3. package/catalog/src/models/RestError.d.ts +4 -2
  4. package/catalog/src/models/RestError.js +4 -2
  5. package/configuration/src/models/RestError.d.ts +4 -2
  6. package/configuration/src/models/RestError.js +4 -2
  7. package/content/src/models/RestError.d.ts +4 -2
  8. package/content/src/models/RestError.js +4 -2
  9. package/favorite/src/models/RestError.d.ts +4 -2
  10. package/favorite/src/models/RestError.js +4 -2
  11. package/inventory/src/apis/ManageInventoryApi.d.ts +5 -17
  12. package/inventory/src/apis/ManageInventoryApi.js +12 -86
  13. package/inventory/src/apis/SearchInventoryApi.d.ts +21 -20
  14. package/inventory/src/apis/SearchInventoryApi.js +90 -84
  15. package/inventory/src/models/ActiveProduct.d.ts +10 -3
  16. package/inventory/src/models/ActiveProduct.js +5 -2
  17. package/inventory/src/models/ActiveProductUpdateParameters.d.ts +4 -3
  18. package/inventory/src/models/ActiveProductUpdateParameters.js +3 -2
  19. package/inventory/src/models/Inventory.d.ts +63 -0
  20. package/inventory/src/models/Inventory.js +57 -0
  21. package/inventory/src/models/InventoryJournal.d.ts +31 -0
  22. package/inventory/src/models/InventoryJournal.js +45 -0
  23. package/inventory/src/models/MisalignedProduct.d.ts +6 -0
  24. package/inventory/src/models/MisalignedProduct.js +2 -0
  25. package/inventory/src/models/OverstockProduct.d.ts +6 -0
  26. package/inventory/src/models/OverstockProduct.js +2 -0
  27. package/inventory/src/models/PaginatedInventories.d.ts +39 -0
  28. package/inventory/src/models/PaginatedInventories.js +53 -0
  29. package/inventory/src/models/RestError.d.ts +4 -2
  30. package/inventory/src/models/RestError.js +4 -2
  31. package/inventory/src/models/SynchronizationMode.d.ts +25 -0
  32. package/inventory/src/models/SynchronizationMode.js +48 -0
  33. package/inventory/src/models/index.d.ts +4 -3
  34. package/inventory/src/models/index.js +4 -3
  35. package/invoice/src/models/RestError.d.ts +4 -2
  36. package/invoice/src/models/RestError.js +4 -2
  37. package/laboratory-store/src/models/RestError.d.ts +4 -2
  38. package/laboratory-store/src/models/RestError.js +4 -2
  39. package/lexicon/src/models/RestError.d.ts +4 -2
  40. package/lexicon/src/models/RestError.js +4 -2
  41. package/litigation/src/models/RestError.d.ts +4 -2
  42. package/litigation/src/models/RestError.js +4 -2
  43. package/mangopay-hook/src/models/RestError.d.ts +4 -2
  44. package/mangopay-hook/src/models/RestError.js +4 -2
  45. package/notification/src/models/RestError.d.ts +4 -2
  46. package/notification/src/models/RestError.js +4 -2
  47. package/order/src/models/RestError.d.ts +4 -2
  48. package/order/src/models/RestError.js +4 -2
  49. package/package.json +1 -1
  50. package/product/src/models/RestError.d.ts +4 -2
  51. package/product/src/models/RestError.js +4 -2
  52. package/pub/src/models/RestError.d.ts +4 -2
  53. package/pub/src/models/RestError.js +4 -2
  54. package/rfx/src/models/RestError.d.ts +4 -2
  55. package/rfx/src/models/RestError.js +4 -2
  56. package/sale-offer/src/models/RestError.d.ts +4 -2
  57. package/sale-offer/src/models/RestError.js +4 -2
  58. package/servant/src/models/RestError.d.ts +4 -2
  59. package/servant/src/models/RestError.js +4 -2
  60. package/shipment/src/models/RestError.d.ts +4 -2
  61. package/shipment/src/models/RestError.js +4 -2
  62. package/shopping-cart/src/models/RestError.d.ts +4 -2
  63. package/shopping-cart/src/models/RestError.js +4 -2
  64. package/smuggler/src/models/RestError.d.ts +4 -2
  65. package/smuggler/src/models/RestError.js +4 -2
  66. package/statistic/src/models/RestError.d.ts +4 -2
  67. package/statistic/src/models/RestError.js +4 -2
  68. package/subscription/src/models/RestError.d.ts +4 -2
  69. package/subscription/src/models/RestError.js +4 -2
  70. package/third-party/src/models/RestError.d.ts +4 -2
  71. package/third-party/src/models/RestError.js +4 -2
  72. package/ubo/src/models/RestError.d.ts +4 -2
  73. package/ubo/src/models/RestError.js +4 -2
  74. package/user/src/models/RestError.d.ts +4 -2
  75. package/user/src/models/RestError.js +4 -2
  76. package/wish/src/models/RestError.d.ts +4 -2
  77. package/wish/src/models/RestError.js +4 -2
  78. package/inventory/src/models/Synchroneity.d.ts +0 -32
  79. package/inventory/src/models/Synchroneity.js +0 -46
  80. package/inventory/src/models/SynchroneityOffisante.d.ts +0 -38
  81. package/inventory/src/models/SynchroneityOffisante.js +0 -48
  82. package/inventory/src/models/SynchroneitySource.d.ts +0 -37
  83. package/inventory/src/models/SynchroneitySource.js +0 -47
@@ -452,16 +452,24 @@ var SearchInventoryApi = /** @class */ (function (_super) {
452
452
  });
453
453
  };
454
454
  /**
455
- * Allow to retrieve informations about synchronization between the inventory and its sources. Theses informations (such as last successful synchronization) can be used to monitor the freshness of data computed. Note : \'synchroneity\' is not mispelled !
456
- * Get synchronization state of inventory
455
+ * Get all inventories
457
456
  */
458
- SearchInventoryApi.prototype.getCurrentInventorySynchroneityRaw = function (initOverrides) {
457
+ SearchInventoryApi.prototype.getInventoriesRaw = function (requestParameters, initOverrides) {
459
458
  return __awaiter(this, void 0, void 0, function () {
460
459
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_5;
461
460
  return __generator(this, function (_c) {
462
461
  switch (_c.label) {
463
462
  case 0:
464
463
  queryParameters = {};
464
+ if (requestParameters['idEq'] != null) {
465
+ queryParameters['id[eq]'] = requestParameters['idEq'];
466
+ }
467
+ if (requestParameters['p'] != null) {
468
+ queryParameters['p'] = requestParameters['p'];
469
+ }
470
+ if (requestParameters['pp'] != null) {
471
+ queryParameters['pp'] = requestParameters['pp'];
472
+ }
465
473
  headerParameters = {};
466
474
  if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
467
475
  _a = headerParameters;
@@ -483,7 +491,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
483
491
  case 4:
484
492
  _c.trys.push([4, 6, , 7]);
485
493
  return [4 /*yield*/, this.request({
486
- path: "/inventories/me/synchroneity",
494
+ path: "/inventories",
487
495
  method: 'GET',
488
496
  headers: headerParameters,
489
497
  query: queryParameters,
@@ -492,7 +500,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
492
500
  response = _c.sent();
493
501
  contentType = response.headers.get("content-type");
494
502
  if (contentType && contentType.indexOf("application/json") !== -1) {
495
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SynchroneityFromJSON)(jsonValue); })];
503
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedInventoriesFromJSON)(jsonValue); })];
496
504
  }
497
505
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
498
506
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -512,15 +520,15 @@ var SearchInventoryApi = /** @class */ (function (_super) {
512
520
  });
513
521
  };
514
522
  /**
515
- * Allow to retrieve informations about synchronization between the inventory and its sources. Theses informations (such as last successful synchronization) can be used to monitor the freshness of data computed. Note : \'synchroneity\' is not mispelled !
516
- * Get synchronization state of inventory
523
+ * Get all inventories
517
524
  */
518
- SearchInventoryApi.prototype.getCurrentInventorySynchroneity = function (initOverrides) {
525
+ SearchInventoryApi.prototype.getInventories = function (requestParameters, initOverrides) {
526
+ if (requestParameters === void 0) { requestParameters = {}; }
519
527
  return __awaiter(this, void 0, void 0, function () {
520
528
  var response;
521
529
  return __generator(this, function (_a) {
522
530
  switch (_a.label) {
523
- case 0: return [4 /*yield*/, this.getCurrentInventorySynchroneityRaw(initOverrides)];
531
+ case 0: return [4 /*yield*/, this.getInventoriesRaw(requestParameters, initOverrides)];
524
532
  case 1:
525
533
  response = _a.sent();
526
534
  return [4 /*yield*/, response.value()];
@@ -530,36 +538,18 @@ var SearchInventoryApi = /** @class */ (function (_super) {
530
538
  });
531
539
  };
532
540
  /**
533
- * Search products with params for an inventory
541
+ * Get inventory by id
534
542
  */
535
- SearchInventoryApi.prototype.getInventoryActiveProductsRaw = function (requestParameters, initOverrides) {
543
+ SearchInventoryApi.prototype.getInventoryRaw = function (requestParameters, initOverrides) {
536
544
  return __awaiter(this, void 0, void 0, function () {
537
545
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_6;
538
546
  return __generator(this, function (_c) {
539
547
  switch (_c.label) {
540
548
  case 0:
541
549
  if (requestParameters['inventoryId'] == null) {
542
- throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryActiveProducts().');
550
+ throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventory().');
543
551
  }
544
552
  queryParameters = {};
545
- if (requestParameters['q'] != null) {
546
- queryParameters['q'] = requestParameters['q'];
547
- }
548
- if (requestParameters['labEq'] != null) {
549
- queryParameters['lab[eq]'] = requestParameters['labEq'];
550
- }
551
- if (requestParameters['ptEq'] != null) {
552
- queryParameters['pt[eq]'] = requestParameters['ptEq'];
553
- }
554
- if (requestParameters['orderBy'] != null) {
555
- queryParameters['orderBy'] = requestParameters['orderBy'];
556
- }
557
- if (requestParameters['p'] != null) {
558
- queryParameters['p'] = requestParameters['p'];
559
- }
560
- if (requestParameters['pp'] != null) {
561
- queryParameters['pp'] = requestParameters['pp'];
562
- }
563
553
  headerParameters = {};
564
554
  if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
565
555
  _a = headerParameters;
@@ -581,7 +571,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
581
571
  case 4:
582
572
  _c.trys.push([4, 6, , 7]);
583
573
  return [4 /*yield*/, this.request({
584
- path: "/inventories/{inventoryId}/active-products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
574
+ path: "/inventories/{inventoryId}".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
585
575
  method: 'GET',
586
576
  headers: headerParameters,
587
577
  query: queryParameters,
@@ -590,7 +580,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
590
580
  response = _c.sent();
591
581
  contentType = response.headers.get("content-type");
592
582
  if (contentType && contentType.indexOf("application/json") !== -1) {
593
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedActiveProductsFromJSON)(jsonValue); })];
583
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.InventoryFromJSON)(jsonValue); })];
594
584
  }
595
585
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
596
586
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -610,14 +600,14 @@ var SearchInventoryApi = /** @class */ (function (_super) {
610
600
  });
611
601
  };
612
602
  /**
613
- * Search products with params for an inventory
603
+ * Get inventory by id
614
604
  */
615
- SearchInventoryApi.prototype.getInventoryActiveProducts = function (requestParameters, initOverrides) {
605
+ SearchInventoryApi.prototype.getInventory = function (requestParameters, initOverrides) {
616
606
  return __awaiter(this, void 0, void 0, function () {
617
607
  var response;
618
608
  return __generator(this, function (_a) {
619
609
  switch (_a.label) {
620
- case 0: return [4 /*yield*/, this.getInventoryActiveProductsRaw(requestParameters, initOverrides)];
610
+ case 0: return [4 /*yield*/, this.getInventoryRaw(requestParameters, initOverrides)];
621
611
  case 1:
622
612
  response = _a.sent();
623
613
  return [4 /*yield*/, response.value()];
@@ -627,16 +617,16 @@ var SearchInventoryApi = /** @class */ (function (_super) {
627
617
  });
628
618
  };
629
619
  /**
630
- * Get product\'s where an action is required
620
+ * Search products with params for an inventory
631
621
  */
632
- SearchInventoryApi.prototype.getInventoryMisalignedProductsRaw = function (requestParameters, initOverrides) {
622
+ SearchInventoryApi.prototype.getInventoryActiveProductsRaw = function (requestParameters, initOverrides) {
633
623
  return __awaiter(this, void 0, void 0, function () {
634
624
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_7;
635
625
  return __generator(this, function (_c) {
636
626
  switch (_c.label) {
637
627
  case 0:
638
628
  if (requestParameters['inventoryId'] == null) {
639
- throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryMisalignedProducts().');
629
+ throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryActiveProducts().');
640
630
  }
641
631
  queryParameters = {};
642
632
  if (requestParameters['q'] != null) {
@@ -678,7 +668,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
678
668
  case 4:
679
669
  _c.trys.push([4, 6, , 7]);
680
670
  return [4 /*yield*/, this.request({
681
- path: "/inventories/{inventoryId}/misaligned-products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
671
+ path: "/inventories/{inventoryId}/active-products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
682
672
  method: 'GET',
683
673
  headers: headerParameters,
684
674
  query: queryParameters,
@@ -687,7 +677,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
687
677
  response = _c.sent();
688
678
  contentType = response.headers.get("content-type");
689
679
  if (contentType && contentType.indexOf("application/json") !== -1) {
690
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedMisalignedProductsFromJSON)(jsonValue); })];
680
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedActiveProductsFromJSON)(jsonValue); })];
691
681
  }
692
682
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
693
683
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -707,14 +697,14 @@ var SearchInventoryApi = /** @class */ (function (_super) {
707
697
  });
708
698
  };
709
699
  /**
710
- * Get product\'s where an action is required
700
+ * Search products with params for an inventory
711
701
  */
712
- SearchInventoryApi.prototype.getInventoryMisalignedProducts = function (requestParameters, initOverrides) {
702
+ SearchInventoryApi.prototype.getInventoryActiveProducts = function (requestParameters, initOverrides) {
713
703
  return __awaiter(this, void 0, void 0, function () {
714
704
  var response;
715
705
  return __generator(this, function (_a) {
716
706
  switch (_a.label) {
717
- case 0: return [4 /*yield*/, this.getInventoryMisalignedProductsRaw(requestParameters, initOverrides)];
707
+ case 0: return [4 /*yield*/, this.getInventoryActiveProductsRaw(requestParameters, initOverrides)];
718
708
  case 1:
719
709
  response = _a.sent();
720
710
  return [4 /*yield*/, response.value()];
@@ -724,16 +714,16 @@ var SearchInventoryApi = /** @class */ (function (_super) {
724
714
  });
725
715
  };
726
716
  /**
727
- * Get products that the pharmacian should destock
717
+ * Get product\'s where an action is required
728
718
  */
729
- SearchInventoryApi.prototype.getInventoryOverstockProductsRaw = function (requestParameters, initOverrides) {
719
+ SearchInventoryApi.prototype.getInventoryMisalignedProductsRaw = function (requestParameters, initOverrides) {
730
720
  return __awaiter(this, void 0, void 0, function () {
731
721
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_8;
732
722
  return __generator(this, function (_c) {
733
723
  switch (_c.label) {
734
724
  case 0:
735
725
  if (requestParameters['inventoryId'] == null) {
736
- throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryOverstockProducts().');
726
+ throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryMisalignedProducts().');
737
727
  }
738
728
  queryParameters = {};
739
729
  if (requestParameters['q'] != null) {
@@ -745,21 +735,6 @@ var SearchInventoryApi = /** @class */ (function (_super) {
745
735
  if (requestParameters['ptEq'] != null) {
746
736
  queryParameters['pt[eq]'] = requestParameters['ptEq'];
747
737
  }
748
- if (requestParameters['blEq'] != null) {
749
- queryParameters['bl[eq]'] = requestParameters['blEq'];
750
- }
751
- if (requestParameters['forecastGte'] != null) {
752
- queryParameters['forecast[gte]'] = requestParameters['forecastGte'];
753
- }
754
- if (requestParameters['forecastLte'] != null) {
755
- queryParameters['forecast[lte]'] = requestParameters['forecastLte'];
756
- }
757
- if (requestParameters['forecastPr'] != null) {
758
- queryParameters['forecast[pr]'] = requestParameters['forecastPr'];
759
- }
760
- if (requestParameters['isUnsoldEq'] != null) {
761
- queryParameters['isUnsold[eq]'] = requestParameters['isUnsoldEq'];
762
- }
763
738
  if (requestParameters['orderBy'] != null) {
764
739
  queryParameters['orderBy'] = requestParameters['orderBy'];
765
740
  }
@@ -790,7 +765,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
790
765
  case 4:
791
766
  _c.trys.push([4, 6, , 7]);
792
767
  return [4 /*yield*/, this.request({
793
- path: "/inventories/{inventoryId}/overstock-products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
768
+ path: "/inventories/{inventoryId}/misaligned-products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
794
769
  method: 'GET',
795
770
  headers: headerParameters,
796
771
  query: queryParameters,
@@ -799,7 +774,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
799
774
  response = _c.sent();
800
775
  contentType = response.headers.get("content-type");
801
776
  if (contentType && contentType.indexOf("application/json") !== -1) {
802
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedOverstockProductsFromJSON)(jsonValue); })];
777
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedMisalignedProductsFromJSON)(jsonValue); })];
803
778
  }
804
779
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
805
780
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -819,14 +794,14 @@ var SearchInventoryApi = /** @class */ (function (_super) {
819
794
  });
820
795
  };
821
796
  /**
822
- * Get products that the pharmacian should destock
797
+ * Get product\'s where an action is required
823
798
  */
824
- SearchInventoryApi.prototype.getInventoryOverstockProducts = function (requestParameters, initOverrides) {
799
+ SearchInventoryApi.prototype.getInventoryMisalignedProducts = function (requestParameters, initOverrides) {
825
800
  return __awaiter(this, void 0, void 0, function () {
826
801
  var response;
827
802
  return __generator(this, function (_a) {
828
803
  switch (_a.label) {
829
- case 0: return [4 /*yield*/, this.getInventoryOverstockProductsRaw(requestParameters, initOverrides)];
804
+ case 0: return [4 /*yield*/, this.getInventoryMisalignedProductsRaw(requestParameters, initOverrides)];
830
805
  case 1:
831
806
  response = _a.sent();
832
807
  return [4 /*yield*/, response.value()];
@@ -836,18 +811,51 @@ var SearchInventoryApi = /** @class */ (function (_super) {
836
811
  });
837
812
  };
838
813
  /**
839
- * Get advices statistics
814
+ * Get products that the pharmacian should destock
840
815
  */
841
- SearchInventoryApi.prototype.getInventoryStatisticsRaw = function (requestParameters, initOverrides) {
816
+ SearchInventoryApi.prototype.getInventoryOverstockProductsRaw = function (requestParameters, initOverrides) {
842
817
  return __awaiter(this, void 0, void 0, function () {
843
818
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_9;
844
819
  return __generator(this, function (_c) {
845
820
  switch (_c.label) {
846
821
  case 0:
847
822
  if (requestParameters['inventoryId'] == null) {
848
- throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryStatistics().');
823
+ throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryOverstockProducts().');
849
824
  }
850
825
  queryParameters = {};
826
+ if (requestParameters['q'] != null) {
827
+ queryParameters['q'] = requestParameters['q'];
828
+ }
829
+ if (requestParameters['labEq'] != null) {
830
+ queryParameters['lab[eq]'] = requestParameters['labEq'];
831
+ }
832
+ if (requestParameters['ptEq'] != null) {
833
+ queryParameters['pt[eq]'] = requestParameters['ptEq'];
834
+ }
835
+ if (requestParameters['blEq'] != null) {
836
+ queryParameters['bl[eq]'] = requestParameters['blEq'];
837
+ }
838
+ if (requestParameters['forecastGte'] != null) {
839
+ queryParameters['forecast[gte]'] = requestParameters['forecastGte'];
840
+ }
841
+ if (requestParameters['forecastLte'] != null) {
842
+ queryParameters['forecast[lte]'] = requestParameters['forecastLte'];
843
+ }
844
+ if (requestParameters['forecastPr'] != null) {
845
+ queryParameters['forecast[pr]'] = requestParameters['forecastPr'];
846
+ }
847
+ if (requestParameters['isUnsoldEq'] != null) {
848
+ queryParameters['isUnsold[eq]'] = requestParameters['isUnsoldEq'];
849
+ }
850
+ if (requestParameters['orderBy'] != null) {
851
+ queryParameters['orderBy'] = requestParameters['orderBy'];
852
+ }
853
+ if (requestParameters['p'] != null) {
854
+ queryParameters['p'] = requestParameters['p'];
855
+ }
856
+ if (requestParameters['pp'] != null) {
857
+ queryParameters['pp'] = requestParameters['pp'];
858
+ }
851
859
  headerParameters = {};
852
860
  if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
853
861
  _a = headerParameters;
@@ -869,7 +877,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
869
877
  case 4:
870
878
  _c.trys.push([4, 6, , 7]);
871
879
  return [4 /*yield*/, this.request({
872
- path: "/inventories/{inventoryId}/statistics".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
880
+ path: "/inventories/{inventoryId}/overstock-products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
873
881
  method: 'GET',
874
882
  headers: headerParameters,
875
883
  query: queryParameters,
@@ -878,7 +886,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
878
886
  response = _c.sent();
879
887
  contentType = response.headers.get("content-type");
880
888
  if (contentType && contentType.indexOf("application/json") !== -1) {
881
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.StatisticsFromJSON)(jsonValue); })];
889
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedOverstockProductsFromJSON)(jsonValue); })];
882
890
  }
883
891
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
884
892
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -898,14 +906,14 @@ var SearchInventoryApi = /** @class */ (function (_super) {
898
906
  });
899
907
  };
900
908
  /**
901
- * Get advices statistics
909
+ * Get products that the pharmacian should destock
902
910
  */
903
- SearchInventoryApi.prototype.getInventoryStatistics = function (requestParameters, initOverrides) {
911
+ SearchInventoryApi.prototype.getInventoryOverstockProducts = function (requestParameters, initOverrides) {
904
912
  return __awaiter(this, void 0, void 0, function () {
905
913
  var response;
906
914
  return __generator(this, function (_a) {
907
915
  switch (_a.label) {
908
- case 0: return [4 /*yield*/, this.getInventoryStatisticsRaw(requestParameters, initOverrides)];
916
+ case 0: return [4 /*yield*/, this.getInventoryOverstockProductsRaw(requestParameters, initOverrides)];
909
917
  case 1:
910
918
  response = _a.sent();
911
919
  return [4 /*yield*/, response.value()];
@@ -915,17 +923,16 @@ var SearchInventoryApi = /** @class */ (function (_super) {
915
923
  });
916
924
  };
917
925
  /**
918
- * Allow to retrieve informations about synchronization between the inventory and its sources. Theses informations (such as last successful synchronization) can be used to monitor the freshness of data computed. Note : \'synchroneity\' is not mispelled !
919
- * Get synchronization state of inventory
926
+ * Get advices statistics
920
927
  */
921
- SearchInventoryApi.prototype.getInventorySynchroneityRaw = function (requestParameters, initOverrides) {
928
+ SearchInventoryApi.prototype.getInventoryStatisticsRaw = function (requestParameters, initOverrides) {
922
929
  return __awaiter(this, void 0, void 0, function () {
923
930
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_10;
924
931
  return __generator(this, function (_c) {
925
932
  switch (_c.label) {
926
933
  case 0:
927
934
  if (requestParameters['inventoryId'] == null) {
928
- throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventorySynchroneity().');
935
+ throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryStatistics().');
929
936
  }
930
937
  queryParameters = {};
931
938
  headerParameters = {};
@@ -949,7 +956,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
949
956
  case 4:
950
957
  _c.trys.push([4, 6, , 7]);
951
958
  return [4 /*yield*/, this.request({
952
- path: "/inventories/{inventoryId}/synchroneity".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
959
+ path: "/inventories/{inventoryId}/statistics".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
953
960
  method: 'GET',
954
961
  headers: headerParameters,
955
962
  query: queryParameters,
@@ -958,7 +965,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
958
965
  response = _c.sent();
959
966
  contentType = response.headers.get("content-type");
960
967
  if (contentType && contentType.indexOf("application/json") !== -1) {
961
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SynchroneityFromJSON)(jsonValue); })];
968
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.StatisticsFromJSON)(jsonValue); })];
962
969
  }
963
970
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
964
971
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -978,15 +985,14 @@ var SearchInventoryApi = /** @class */ (function (_super) {
978
985
  });
979
986
  };
980
987
  /**
981
- * Allow to retrieve informations about synchronization between the inventory and its sources. Theses informations (such as last successful synchronization) can be used to monitor the freshness of data computed. Note : \'synchroneity\' is not mispelled !
982
- * Get synchronization state of inventory
988
+ * Get advices statistics
983
989
  */
984
- SearchInventoryApi.prototype.getInventorySynchroneity = function (requestParameters, initOverrides) {
990
+ SearchInventoryApi.prototype.getInventoryStatistics = function (requestParameters, initOverrides) {
985
991
  return __awaiter(this, void 0, void 0, function () {
986
992
  var response;
987
993
  return __generator(this, function (_a) {
988
994
  switch (_a.label) {
989
- case 0: return [4 /*yield*/, this.getInventorySynchroneityRaw(requestParameters, initOverrides)];
995
+ case 0: return [4 /*yield*/, this.getInventoryStatisticsRaw(requestParameters, initOverrides)];
990
996
  case 1:
991
997
  response = _a.sent();
992
998
  return [4 /*yield*/, response.value()];
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { SynchronizationMode } from './SynchronizationMode';
12
13
  import type { ProductLink } from './ProductLink';
13
14
  /**
14
15
  *
@@ -35,11 +36,17 @@ export interface ActiveProduct {
35
36
  */
36
37
  activeStock?: number;
37
38
  /**
38
- * True if sale offers for this product are synchronized, false if not
39
- * @type {boolean}
39
+ *
40
+ * @type {SynchronizationMode}
41
+ * @memberof ActiveProduct
42
+ */
43
+ synchronizationMode?: SynchronizationMode;
44
+ /**
45
+ * Date of last update of the product
46
+ * @type {Date}
40
47
  * @memberof ActiveProduct
41
48
  */
42
- _synchronized?: boolean;
49
+ updatedAt?: Date;
43
50
  }
44
51
  /**
45
52
  * Check if a given object implements the ActiveProduct interface.
@@ -14,6 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ActiveProductToJSON = exports.ActiveProductFromJSONTyped = exports.ActiveProductFromJSON = exports.instanceOfActiveProduct = void 0;
17
+ var SynchronizationMode_1 = require("./SynchronizationMode");
17
18
  var ProductLink_1 = require("./ProductLink");
18
19
  /**
19
20
  * Check if a given object implements the ActiveProduct interface.
@@ -34,7 +35,8 @@ function ActiveProductFromJSONTyped(json, ignoreDiscriminator) {
34
35
  'product': (json['product'] === null || json['product'] === undefined) ? json['product'] : (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
35
36
  'totalActiveSaleOffers': json['totalActiveSaleOffers'],
36
37
  'activeStock': json['activeStock'],
37
- '_synchronized': json['synchronized'],
38
+ 'synchronizationMode': (json['synchronizationMode'] === null || json['synchronizationMode'] === undefined) ? json['synchronizationMode'] : (0, SynchronizationMode_1.SynchronizationModeFromJSON)(json['synchronizationMode']),
39
+ 'updatedAt': (json['updatedAt'] === null || json['updatedAt'] === undefined) ? json['updatedAt'] : new Date(json['updatedAt']),
38
40
  };
39
41
  }
40
42
  exports.ActiveProductFromJSONTyped = ActiveProductFromJSONTyped;
@@ -46,7 +48,8 @@ function ActiveProductToJSON(value) {
46
48
  'product': (0, ProductLink_1.ProductLinkToJSON)(value['product']),
47
49
  'totalActiveSaleOffers': value['totalActiveSaleOffers'],
48
50
  'activeStock': value['activeStock'],
49
- 'synchronized': value['_synchronized'],
51
+ 'synchronizationMode': (0, SynchronizationMode_1.SynchronizationModeToJSON)(value['synchronizationMode']),
52
+ 'updatedAt': (value['updatedAt'] === null || value['updatedAt'] === undefined) ? value['updatedAt'] : (value['updatedAt']).toISOString(),
50
53
  };
51
54
  }
52
55
  exports.ActiveProductToJSON = ActiveProductToJSON;
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { SynchronizationMode } from './SynchronizationMode';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -16,11 +17,11 @@
16
17
  */
17
18
  export interface ActiveProductUpdateParameters {
18
19
  /**
19
- * Product synchronization is enabled or not
20
- * @type {boolean}
20
+ *
21
+ * @type {SynchronizationMode}
21
22
  * @memberof ActiveProductUpdateParameters
22
23
  */
23
- _synchronized?: boolean;
24
+ synchronizationMode?: SynchronizationMode;
24
25
  }
25
26
  /**
26
27
  * Check if a given object implements the ActiveProductUpdateParameters interface.
@@ -14,6 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ActiveProductUpdateParametersToJSON = exports.ActiveProductUpdateParametersFromJSONTyped = exports.ActiveProductUpdateParametersFromJSON = exports.instanceOfActiveProductUpdateParameters = void 0;
17
+ var SynchronizationMode_1 = require("./SynchronizationMode");
17
18
  /**
18
19
  * Check if a given object implements the ActiveProductUpdateParameters interface.
19
20
  */
@@ -30,7 +31,7 @@ function ActiveProductUpdateParametersFromJSONTyped(json, ignoreDiscriminator) {
30
31
  return json;
31
32
  }
32
33
  return {
33
- '_synchronized': json['synchronized'],
34
+ 'synchronizationMode': (json['synchronizationMode'] === null || json['synchronizationMode'] === undefined) ? json['synchronizationMode'] : (0, SynchronizationMode_1.SynchronizationModeFromJSON)(json['synchronizationMode']),
34
35
  };
35
36
  }
36
37
  exports.ActiveProductUpdateParametersFromJSONTyped = ActiveProductUpdateParametersFromJSONTyped;
@@ -39,7 +40,7 @@ function ActiveProductUpdateParametersToJSON(value) {
39
40
  return value;
40
41
  }
41
42
  return {
42
- 'synchronized': value['_synchronized'],
43
+ 'synchronizationMode': (0, SynchronizationMode_1.SynchronizationModeToJSON)(value['synchronizationMode']),
43
44
  };
44
45
  }
45
46
  exports.ActiveProductUpdateParametersToJSON = ActiveProductUpdateParametersToJSON;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * lcdp-pharmaide-service
3
+ * This is the REST API of LCDP products
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: contact@lecomptoirdespharmacies.fr
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { InventoryJournal } from './InventoryJournal';
13
+ import type { HttpLink } from './HttpLink';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface Inventory
18
+ */
19
+ export interface Inventory {
20
+ /**
21
+ * Inventory id, match user id
22
+ * @type {number}
23
+ * @memberof Inventory
24
+ */
25
+ id?: number;
26
+ /**
27
+ * Number of products with stock available in Offisante
28
+ * @type {number}
29
+ * @memberof Inventory
30
+ */
31
+ availableStockProductCount?: number;
32
+ /**
33
+ *
34
+ * @type {HttpLink}
35
+ * @memberof Inventory
36
+ */
37
+ activeProducts?: HttpLink;
38
+ /**
39
+ *
40
+ * @type {HttpLink}
41
+ * @memberof Inventory
42
+ */
43
+ overstockProducts?: HttpLink;
44
+ /**
45
+ *
46
+ * @type {HttpLink}
47
+ * @memberof Inventory
48
+ */
49
+ misalignedProducts?: HttpLink;
50
+ /**
51
+ *
52
+ * @type {InventoryJournal}
53
+ * @memberof Inventory
54
+ */
55
+ journal?: InventoryJournal;
56
+ }
57
+ /**
58
+ * Check if a given object implements the Inventory interface.
59
+ */
60
+ export declare function instanceOfInventory(value: object): value is Inventory;
61
+ export declare function InventoryFromJSON(json: any): Inventory;
62
+ export declare function InventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Inventory;
63
+ export declare function InventoryToJSON(value?: Inventory | null): any;