@lcdp/api-react-rest-client 3.1.9 → 3.1.10

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 (204) hide show
  1. package/auth/src/models/RestError.d.ts +3 -5
  2. package/auth/src/models/RestError.js +3 -5
  3. package/catalog/src/models/RestError.d.ts +3 -5
  4. package/catalog/src/models/RestError.js +3 -5
  5. package/chargebee-hook/src/models/RestError.d.ts +3 -5
  6. package/chargebee-hook/src/models/RestError.js +3 -5
  7. package/configuration/src/models/RestError.d.ts +3 -5
  8. package/configuration/src/models/RestError.js +3 -5
  9. package/content/src/models/RestError.d.ts +3 -5
  10. package/content/src/models/RestError.js +3 -5
  11. package/favorite/src/models/RestError.d.ts +3 -5
  12. package/favorite/src/models/RestError.js +3 -5
  13. package/inventory/src/models/RestError.d.ts +3 -5
  14. package/inventory/src/models/RestError.js +3 -5
  15. package/invoice/src/models/RestError.d.ts +3 -5
  16. package/invoice/src/models/RestError.js +3 -5
  17. package/laboratory-store/src/models/RestError.d.ts +3 -5
  18. package/laboratory-store/src/models/RestError.js +3 -5
  19. package/lexicon/src/models/RestError.d.ts +3 -5
  20. package/lexicon/src/models/RestError.js +3 -5
  21. package/litigation/src/models/RestError.d.ts +3 -5
  22. package/litigation/src/models/RestError.js +3 -5
  23. package/magic-cart/src/models/ExpressOrder.d.ts +4 -4
  24. package/magic-cart/src/models/ExpressOrder.js +7 -3
  25. package/magic-cart/src/models/ShoppedOffer.d.ts +43 -0
  26. package/magic-cart/src/models/ShoppedOffer.js +53 -0
  27. package/magic-cart/src/models/index.d.ts +1 -2
  28. package/magic-cart/src/models/index.js +1 -2
  29. package/mangopay-hook/src/models/RestError.d.ts +3 -5
  30. package/mangopay-hook/src/models/RestError.js +3 -5
  31. package/notification/src/models/NotificationTypeId.d.ts +0 -1
  32. package/notification/src/models/NotificationTypeId.js +0 -1
  33. package/notification/src/models/RestError.d.ts +3 -5
  34. package/notification/src/models/RestError.js +3 -5
  35. package/order/src/apis/ManageForeorderApi.d.ts +31 -0
  36. package/order/src/apis/ManageForeorderApi.js +163 -0
  37. package/order/src/apis/ManageOrderApi.d.ts +9 -9
  38. package/order/src/apis/ManageOrderApi.js +12 -13
  39. package/order/src/apis/SearchForeorderItemApi.d.ts +44 -0
  40. package/order/src/apis/SearchForeorderItemApi.js +175 -0
  41. package/order/src/apis/index.d.ts +2 -1
  42. package/order/src/apis/index.js +2 -1
  43. package/order/src/models/AnyForeorderCreationParameters.d.ts +23 -0
  44. package/order/src/models/AnyForeorderCreationParameters.js +45 -0
  45. package/order/src/models/AnyForeorderWarning.d.ts +26 -0
  46. package/order/src/models/AnyForeorderWarning.js +50 -0
  47. package/order/src/models/AnyOrderCreationParameters.d.ts +26 -0
  48. package/order/src/models/AnyOrderCreationParameters.js +50 -0
  49. package/order/src/models/AnySource.d.ts +26 -0
  50. package/order/src/models/AnySource.js +50 -0
  51. package/order/src/models/CartForeorderCreationParameters.d.ts +37 -0
  52. package/order/src/models/CartForeorderCreationParameters.js +51 -0
  53. package/order/src/models/CartSource.d.ts +37 -0
  54. package/order/src/models/CartSource.js +49 -0
  55. package/order/src/models/CloneOrderCreationParameters.d.ts +37 -0
  56. package/order/src/models/CloneOrderCreationParameters.js +51 -0
  57. package/order/src/models/Foreorder.d.ts +155 -0
  58. package/order/src/models/Foreorder.js +128 -0
  59. package/order/src/models/ForeorderCreationParameters.d.ts +31 -0
  60. package/order/src/models/ForeorderCreationParameters.js +47 -0
  61. package/order/src/models/ForeorderItemWarning.d.ts +77 -0
  62. package/order/src/models/{OrderItemWarning.js → ForeorderItemWarning.js} +21 -18
  63. package/order/src/models/ForeorderOrderCreationParameters.d.ts +37 -0
  64. package/order/src/models/ForeorderOrderCreationParameters.js +51 -0
  65. package/order/src/models/ForeorderWarning.d.ts +51 -0
  66. package/order/src/models/{OrderWarning.js → ForeorderWarning.js} +12 -12
  67. package/order/src/models/ForeorderWarningBase.d.ts +37 -0
  68. package/order/src/models/ForeorderWarningBase.js +51 -0
  69. package/order/src/models/ForeordersWithWarnings.d.ts +39 -0
  70. package/order/src/models/ForeordersWithWarnings.js +53 -0
  71. package/order/src/models/Order.d.ts +80 -75
  72. package/order/src/models/Order.js +53 -48
  73. package/order/src/models/OrderAddedItem.d.ts +9 -9
  74. package/order/src/models/OrderAddedItem.js +18 -0
  75. package/order/src/models/OrderCreationParameters.d.ts +31 -0
  76. package/order/src/models/OrderCreationParameters.js +47 -0
  77. package/order/src/models/OrderItem.d.ts +9 -9
  78. package/order/src/models/OrderItem.js +18 -0
  79. package/order/src/models/OrderItemPrices.d.ts +8 -8
  80. package/order/src/models/OrderItemPrices.js +10 -0
  81. package/order/src/models/OrderPrices.d.ts +9 -9
  82. package/order/src/models/OrderPrices.js +18 -0
  83. package/order/src/models/OrderRefundedItem.d.ts +9 -9
  84. package/order/src/models/OrderRefundedItem.js +18 -0
  85. package/order/src/models/OrderRemovedItem.d.ts +9 -9
  86. package/order/src/models/OrderRemovedItem.js +18 -0
  87. package/order/src/models/OrderSource.d.ts +37 -0
  88. package/order/src/models/OrderSource.js +49 -0
  89. package/order/src/models/Reservation.d.ts +7 -7
  90. package/order/src/models/Reservation.js +14 -0
  91. package/order/src/models/RestError.d.ts +3 -5
  92. package/order/src/models/RestError.js +3 -5
  93. package/order/src/models/ShoppedOffer.d.ts +2 -2
  94. package/order/src/models/ShoppedOffer.js +2 -2
  95. package/order/src/models/Source.d.ts +31 -0
  96. package/order/src/models/Source.js +45 -0
  97. package/order/src/models/index.d.ts +17 -9
  98. package/order/src/models/index.js +17 -9
  99. package/package.json +1 -1
  100. package/product/src/models/RestError.d.ts +3 -5
  101. package/product/src/models/RestError.js +3 -5
  102. package/pub/src/models/RestError.d.ts +3 -5
  103. package/pub/src/models/RestError.js +3 -5
  104. package/rfx/src/models/RestError.d.ts +3 -5
  105. package/rfx/src/models/RestError.js +3 -5
  106. package/sale-offer/src/models/RestError.d.ts +3 -5
  107. package/sale-offer/src/models/RestError.js +3 -5
  108. package/servant/src/models/RestError.d.ts +3 -5
  109. package/servant/src/models/RestError.js +3 -5
  110. package/shipment/src/models/RestError.d.ts +3 -5
  111. package/shipment/src/models/RestError.js +3 -5
  112. package/shopping-cart/src/apis/ManageCartApi.d.ts +35 -24
  113. package/shopping-cart/src/apis/ManageCartApi.js +57 -120
  114. package/shopping-cart/src/apis/ManageCartLineApi.d.ts +45 -0
  115. package/shopping-cart/src/apis/ManageCartLineApi.js +238 -0
  116. package/shopping-cart/src/apis/SearchCartApi.d.ts +59 -0
  117. package/shopping-cart/src/apis/SearchCartApi.js +267 -0
  118. package/shopping-cart/src/apis/SearchCartLineApi.d.ts +41 -0
  119. package/{order/src/apis/ManageMetaOrderApi.js → shopping-cart/src/apis/SearchCartLineApi.js} +46 -41
  120. package/shopping-cart/src/apis/index.d.ts +3 -2
  121. package/shopping-cart/src/apis/index.js +3 -2
  122. package/shopping-cart/src/models/Cart.d.ts +61 -4
  123. package/shopping-cart/src/models/Cart.js +47 -2
  124. package/shopping-cart/src/models/CartCreationParameters.d.ts +44 -0
  125. package/shopping-cart/src/models/CartCreationParameters.js +56 -0
  126. package/shopping-cart/src/models/{CartSubCartLine.d.ts → CartLine.d.ts} +13 -13
  127. package/shopping-cart/src/models/{CartSubCartLine.js → CartLine.js} +11 -11
  128. package/shopping-cart/src/models/CartLineUpdateParameters.d.ts +37 -0
  129. package/shopping-cart/src/models/CartLineUpdateParameters.js +49 -0
  130. package/shopping-cart/src/models/CartLineWithWarnings.d.ts +39 -0
  131. package/shopping-cart/src/models/CartLineWithWarnings.js +49 -0
  132. package/shopping-cart/src/models/CartSummary.d.ts +31 -0
  133. package/shopping-cart/src/models/CartSummary.js +47 -0
  134. package/shopping-cart/src/models/{CartSubCartTransport.d.ts → CartTransport.d.ts} +12 -12
  135. package/shopping-cart/src/models/{CartSubCartTransport.js → CartTransport.js} +11 -11
  136. package/shopping-cart/src/models/CartUpdateParameters.d.ts +31 -0
  137. package/shopping-cart/src/models/CartUpdateParameters.js +45 -0
  138. package/shopping-cart/src/models/CartWarning.d.ts +76 -0
  139. package/shopping-cart/src/models/CartWarning.js +69 -0
  140. package/shopping-cart/src/models/CartsWithWarnings.d.ts +39 -0
  141. package/shopping-cart/src/models/CartsWithWarnings.js +49 -0
  142. package/shopping-cart/src/models/OwnerLink.d.ts +43 -0
  143. package/shopping-cart/src/models/OwnerLink.js +53 -0
  144. package/shopping-cart/src/models/PaginatedCarts.d.ts +46 -0
  145. package/shopping-cart/src/models/PaginatedCarts.js +58 -0
  146. package/shopping-cart/src/models/PagingMetadata.d.ts +49 -0
  147. package/shopping-cart/src/models/PagingMetadata.js +55 -0
  148. package/shopping-cart/src/models/RestError.d.ts +3 -5
  149. package/shopping-cart/src/models/RestError.js +3 -5
  150. package/shopping-cart/src/models/ShoppedOffer.d.ts +2 -2
  151. package/shopping-cart/src/models/ShoppedOffer.js +2 -2
  152. package/shopping-cart/src/models/index.d.ts +12 -4
  153. package/shopping-cart/src/models/index.js +12 -4
  154. package/smuggler/src/models/RestError.d.ts +3 -5
  155. package/smuggler/src/models/RestError.js +3 -5
  156. package/statistic/src/models/RestError.d.ts +3 -5
  157. package/statistic/src/models/RestError.js +3 -5
  158. package/third-party/src/models/RestError.d.ts +3 -5
  159. package/third-party/src/models/RestError.js +3 -5
  160. package/ubo/src/apis/ManageUboDeclarationApi.d.ts +2 -2
  161. package/ubo/src/apis/ManageUboDeclarationApi.js +2 -2
  162. package/ubo/src/models/RestError.d.ts +3 -5
  163. package/ubo/src/models/RestError.js +3 -5
  164. package/user/src/models/NotificationTypeId.d.ts +0 -1
  165. package/user/src/models/NotificationTypeId.js +0 -1
  166. package/user/src/models/RestError.d.ts +3 -5
  167. package/user/src/models/RestError.js +3 -5
  168. package/user/src/models/User.d.ts +7 -0
  169. package/user/src/models/User.js +3 -0
  170. package/user/src/models/UserMangopayUbo.d.ts +31 -0
  171. package/user/src/models/UserMangopayUbo.js +45 -0
  172. package/user/src/models/index.d.ts +1 -0
  173. package/user/src/models/index.js +1 -0
  174. package/wish/src/models/RestError.d.ts +3 -5
  175. package/wish/src/models/RestError.js +3 -5
  176. package/magic-cart/src/models/SaleOfferProposal.d.ts +0 -51
  177. package/magic-cart/src/models/SaleOfferProposal.js +0 -61
  178. package/magic-cart/src/models/SellerProposal.d.ts +0 -45
  179. package/magic-cart/src/models/SellerProposal.js +0 -57
  180. package/order/src/apis/ManageMetaOrderApi.d.ts +0 -45
  181. package/order/src/models/AnyMetaOrderWarning.d.ts +0 -26
  182. package/order/src/models/AnyMetaOrderWarning.js +0 -50
  183. package/order/src/models/MetaOrder.d.ts +0 -64
  184. package/order/src/models/MetaOrder.js +0 -70
  185. package/order/src/models/MetaOrderCreationParameters.d.ts +0 -38
  186. package/order/src/models/MetaOrderCreationParameters.js +0 -52
  187. package/order/src/models/MetaOrderCreationSubCartParameters.d.ts +0 -31
  188. package/order/src/models/MetaOrderCreationSubCartParameters.js +0 -47
  189. package/order/src/models/MetaOrderPrices.d.ts +0 -79
  190. package/order/src/models/MetaOrderPrices.js +0 -79
  191. package/order/src/models/MetaOrderWarning.d.ts +0 -31
  192. package/order/src/models/MetaOrderWarning.js +0 -47
  193. package/order/src/models/MetaOrderWithWarnings.d.ts +0 -39
  194. package/order/src/models/MetaOrderWithWarnings.js +0 -49
  195. package/order/src/models/OrderItemWarning.d.ts +0 -72
  196. package/order/src/models/OrderWarning.d.ts +0 -51
  197. package/shopping-cart/src/apis/ManageCartSubCartApi.d.ts +0 -107
  198. package/shopping-cart/src/apis/ManageCartSubCartApi.js +0 -556
  199. package/shopping-cart/src/apis/ManageCartSubCartLineApi.d.ts +0 -151
  200. package/shopping-cart/src/apis/ManageCartSubCartLineApi.js +0 -879
  201. package/shopping-cart/src/models/CartSubCart.d.ts +0 -76
  202. package/shopping-cart/src/models/CartSubCart.js +0 -78
  203. package/shopping-cart/src/models/CartSubCartLineUpdateParameters.d.ts +0 -37
  204. package/shopping-cart/src/models/CartSubCartLineUpdateParameters.js +0 -49
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * lcdp-monolith-service
6
- * This is the REST API of LCDP orders
6
+ * This is the REST API of LCDP products
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  * Contact: contact@lecomptoirdespharmacies.fr
@@ -64,33 +64,34 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  }
65
65
  };
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.ManageMetaOrderApi = void 0;
67
+ exports.SearchCartLineApi = void 0;
68
68
  var runtime = require("../runtime");
69
69
  var index_1 = require("../models/index");
70
70
  /**
71
71
  *
72
72
  */
73
- var ManageMetaOrderApi = /** @class */ (function (_super) {
74
- __extends(ManageMetaOrderApi, _super);
75
- function ManageMetaOrderApi() {
73
+ var SearchCartLineApi = /** @class */ (function (_super) {
74
+ __extends(SearchCartLineApi, _super);
75
+ function SearchCartLineApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Create a new meta-order. A meta-order represent a group of orders created at the same time.
80
- * Create a new meta-order
79
+ * Get a cart line
81
80
  */
82
- ManageMetaOrderApi.prototype.createMetaOrderRaw = function (requestParameters, initOverrides) {
81
+ SearchCartLineApi.prototype.getCartLineRaw = function (requestParameters, initOverrides) {
83
82
  return __awaiter(this, void 0, void 0, function () {
84
83
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
85
84
  return __generator(this, function (_c) {
86
85
  switch (_c.label) {
87
86
  case 0:
88
- if (requestParameters['metaOrderCreationParameters'] == null) {
89
- throw new runtime.RequiredError('metaOrderCreationParameters', 'Required parameter "metaOrderCreationParameters" was null or undefined when calling createMetaOrder().');
87
+ if (requestParameters['cartId'] == null) {
88
+ throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling getCartLine().');
89
+ }
90
+ if (requestParameters['lineId'] == null) {
91
+ throw new runtime.RequiredError('lineId', 'Required parameter "lineId" was null or undefined when calling getCartLine().');
90
92
  }
91
93
  queryParameters = {};
92
94
  headerParameters = {};
93
- headerParameters['Content-Type'] = 'application/json';
94
95
  if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
95
96
  _a = headerParameters;
96
97
  _b = "x-api-key";
@@ -111,17 +112,16 @@ var ManageMetaOrderApi = /** @class */ (function (_super) {
111
112
  case 4:
112
113
  _c.trys.push([4, 6, , 7]);
113
114
  return [4 /*yield*/, this.request({
114
- path: "/meta-orders",
115
- method: 'POST',
115
+ path: "/carts/{cartId}/lines/{lineId}".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))).replace("{".concat("lineId", "}"), encodeURIComponent(String(requestParameters['lineId']))),
116
+ method: 'GET',
116
117
  headers: headerParameters,
117
118
  query: queryParameters,
118
- body: (0, index_1.MetaOrderCreationParametersToJSON)(requestParameters['metaOrderCreationParameters']),
119
119
  }, initOverrides)];
120
120
  case 5:
121
121
  response = _c.sent();
122
122
  contentType = response.headers.get("content-type");
123
123
  if (contentType && contentType.indexOf("application/json") !== -1) {
124
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.MetaOrderWithWarningsFromJSON)(jsonValue); })];
124
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CartLineFromJSON)(jsonValue); })];
125
125
  }
126
126
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
127
127
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -141,15 +141,14 @@ var ManageMetaOrderApi = /** @class */ (function (_super) {
141
141
  });
142
142
  };
143
143
  /**
144
- * Create a new meta-order. A meta-order represent a group of orders created at the same time.
145
- * Create a new meta-order
144
+ * Get a cart line
146
145
  */
147
- ManageMetaOrderApi.prototype.createMetaOrder = function (requestParameters, initOverrides) {
146
+ SearchCartLineApi.prototype.getCartLine = function (requestParameters, initOverrides) {
148
147
  return __awaiter(this, void 0, void 0, function () {
149
148
  var response;
150
149
  return __generator(this, function (_a) {
151
150
  switch (_a.label) {
152
- case 0: return [4 /*yield*/, this.createMetaOrderRaw(requestParameters, initOverrides)];
151
+ case 0: return [4 /*yield*/, this.getCartLineRaw(requestParameters, initOverrides)];
153
152
  case 1:
154
153
  response = _a.sent();
155
154
  return [4 /*yield*/, response.value()];
@@ -159,24 +158,19 @@ var ManageMetaOrderApi = /** @class */ (function (_super) {
159
158
  });
160
159
  };
161
160
  /**
162
- * Set the validated flag for meta-order identified by metaOrderId. # You can not : - Set flag with value true if already true - Set flag with value false if already true Preconditions for TRUE : - Buyer have accepted the CGV
163
- * Set meta-order validated flag
161
+ * Get all cart lines
164
162
  */
165
- ManageMetaOrderApi.prototype.setMetaOrderValidatedRaw = function (requestParameters, initOverrides) {
163
+ SearchCartLineApi.prototype.getCartLinesRaw = function (requestParameters, initOverrides) {
166
164
  return __awaiter(this, void 0, void 0, function () {
167
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
165
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_2;
168
166
  return __generator(this, function (_c) {
169
167
  switch (_c.label) {
170
168
  case 0:
171
- if (requestParameters['metaOrderId'] == null) {
172
- throw new runtime.RequiredError('metaOrderId', 'Required parameter "metaOrderId" was null or undefined when calling setMetaOrderValidated().');
173
- }
174
- if (requestParameters['body'] == null) {
175
- throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling setMetaOrderValidated().');
169
+ if (requestParameters['cartId'] == null) {
170
+ throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling getCartLines().');
176
171
  }
177
172
  queryParameters = {};
178
173
  headerParameters = {};
179
- headerParameters['Content-Type'] = 'application/json';
180
174
  if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
181
175
  _a = headerParameters;
182
176
  _b = "x-api-key";
@@ -197,15 +191,25 @@ var ManageMetaOrderApi = /** @class */ (function (_super) {
197
191
  case 4:
198
192
  _c.trys.push([4, 6, , 7]);
199
193
  return [4 /*yield*/, this.request({
200
- path: "/meta-orders/{metaOrderId}/validated".replace("{".concat("metaOrderId", "}"), encodeURIComponent(String(requestParameters['metaOrderId']))),
201
- method: 'PUT',
194
+ path: "/carts/{cartId}/lines".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))),
195
+ method: 'GET',
202
196
  headers: headerParameters,
203
197
  query: queryParameters,
204
- body: requestParameters['body'],
205
198
  }, initOverrides)];
206
199
  case 5:
207
200
  response = _c.sent();
208
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
201
+ contentType = response.headers.get("content-type");
202
+ if (contentType && contentType.indexOf("application/json") !== -1) {
203
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.CartLineFromJSON); })];
204
+ }
205
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
206
+ return [2 /*return*/, new runtime.TextApiResponse(response)];
207
+ }
208
+ else {
209
+ // TODO : Better handling of others application types
210
+ return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
211
+ }
212
+ return [3 /*break*/, 7];
209
213
  case 6:
210
214
  response_2 = _c.sent();
211
215
  console.debug(response_2);
@@ -216,21 +220,22 @@ var ManageMetaOrderApi = /** @class */ (function (_super) {
216
220
  });
217
221
  };
218
222
  /**
219
- * Set the validated flag for meta-order identified by metaOrderId. # You can not : - Set flag with value true if already true - Set flag with value false if already true Preconditions for TRUE : - Buyer have accepted the CGV
220
- * Set meta-order validated flag
223
+ * Get all cart lines
221
224
  */
222
- ManageMetaOrderApi.prototype.setMetaOrderValidated = function (requestParameters, initOverrides) {
225
+ SearchCartLineApi.prototype.getCartLines = function (requestParameters, initOverrides) {
223
226
  return __awaiter(this, void 0, void 0, function () {
227
+ var response;
224
228
  return __generator(this, function (_a) {
225
229
  switch (_a.label) {
226
- case 0: return [4 /*yield*/, this.setMetaOrderValidatedRaw(requestParameters, initOverrides)];
230
+ case 0: return [4 /*yield*/, this.getCartLinesRaw(requestParameters, initOverrides)];
227
231
  case 1:
228
- _a.sent();
229
- return [2 /*return*/];
232
+ response = _a.sent();
233
+ return [4 /*yield*/, response.value()];
234
+ case 2: return [2 /*return*/, _a.sent()];
230
235
  }
231
236
  });
232
237
  });
233
238
  };
234
- return ManageMetaOrderApi;
239
+ return SearchCartLineApi;
235
240
  }(runtime.BaseAPI));
236
- exports.ManageMetaOrderApi = ManageMetaOrderApi;
241
+ exports.SearchCartLineApi = SearchCartLineApi;
@@ -1,3 +1,4 @@
1
1
  export * from './ManageCartApi';
2
- export * from './ManageCartSubCartApi';
3
- export * from './ManageCartSubCartLineApi';
2
+ export * from './ManageCartLineApi';
3
+ export * from './SearchCartApi';
4
+ export * from './SearchCartLineApi';
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./ManageCartApi"), exports);
20
- __exportStar(require("./ManageCartSubCartApi"), exports);
21
- __exportStar(require("./ManageCartSubCartLineApi"), exports);
20
+ __exportStar(require("./ManageCartLineApi"), exports);
21
+ __exportStar(require("./SearchCartApi"), exports);
22
+ __exportStar(require("./SearchCartLineApi"), exports);
@@ -9,7 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { OwnerLink } from './OwnerLink';
13
+ import type { CartTransport } from './CartTransport';
12
14
  import type { HttpLink } from './HttpLink';
15
+ import type { SellerLink } from './SellerLink';
13
16
  /**
14
17
  *
15
18
  * @export
@@ -21,19 +24,73 @@ export interface Cart {
21
24
  * @type {number}
22
25
  * @memberof Cart
23
26
  */
24
- id?: number;
27
+ id: number;
28
+ /**
29
+ * Creation date of this cart
30
+ * @type {Date}
31
+ * @memberof Cart
32
+ */
33
+ createdAt: Date;
34
+ /**
35
+ * Last update date of this cart
36
+ * @type {Date}
37
+ * @memberof Cart
38
+ */
39
+ updatedAt: Date;
40
+ /**
41
+ * Channel identifier
42
+ * @type {string}
43
+ * @memberof Cart
44
+ */
45
+ channel: string;
46
+ /**
47
+ *
48
+ * @type {OwnerLink}
49
+ * @memberof Cart
50
+ */
51
+ owner: OwnerLink;
52
+ /**
53
+ *
54
+ * @type {CartTransport}
55
+ * @memberof Cart
56
+ */
57
+ transport: CartTransport;
25
58
  /**
26
59
  *
60
+ * @type {SellerLink}
61
+ * @memberof Cart
62
+ */
63
+ seller: SellerLink;
64
+ /**
65
+ * Number of lines in this cart
27
66
  * @type {number}
28
67
  * @memberof Cart
29
68
  */
30
- lineCount?: number;
69
+ lineCount: number;
31
70
  /**
32
71
  *
33
- * @type {Array<HttpLink>}
72
+ * @type {HttpLink}
73
+ * @memberof Cart
74
+ */
75
+ lines: HttpLink;
76
+ /**
77
+ * Total buyer commission for this sub cart
78
+ * @type {number}
79
+ * @memberof Cart
80
+ */
81
+ totalBuyerCommissionExcludingTaxes: number;
82
+ /**
83
+ * Total price excluding taxes
84
+ * @type {number}
85
+ * @memberof Cart
86
+ */
87
+ totalExcludingTaxes: number;
88
+ /**
89
+ * Total price including taxes
90
+ * @type {number}
34
91
  * @memberof Cart
35
92
  */
36
- subCarts?: Array<HttpLink>;
93
+ totalIncludingTaxes: number;
37
94
  }
38
95
  /**
39
96
  * Check if a given object implements the Cart interface.
@@ -14,11 +14,38 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.CartToJSON = exports.CartFromJSONTyped = exports.CartFromJSON = exports.instanceOfCart = void 0;
17
+ var OwnerLink_1 = require("./OwnerLink");
18
+ var CartTransport_1 = require("./CartTransport");
17
19
  var HttpLink_1 = require("./HttpLink");
20
+ var SellerLink_1 = require("./SellerLink");
18
21
  /**
19
22
  * Check if a given object implements the Cart interface.
20
23
  */
21
24
  function instanceOfCart(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
28
+ return false;
29
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
30
+ return false;
31
+ if (!('channel' in value) || value['channel'] === undefined)
32
+ return false;
33
+ if (!('owner' in value) || value['owner'] === undefined)
34
+ return false;
35
+ if (!('transport' in value) || value['transport'] === undefined)
36
+ return false;
37
+ if (!('seller' in value) || value['seller'] === undefined)
38
+ return false;
39
+ if (!('lineCount' in value) || value['lineCount'] === undefined)
40
+ return false;
41
+ if (!('lines' in value) || value['lines'] === undefined)
42
+ return false;
43
+ if (!('totalBuyerCommissionExcludingTaxes' in value) || value['totalBuyerCommissionExcludingTaxes'] === undefined)
44
+ return false;
45
+ if (!('totalExcludingTaxes' in value) || value['totalExcludingTaxes'] === undefined)
46
+ return false;
47
+ if (!('totalIncludingTaxes' in value) || value['totalIncludingTaxes'] === undefined)
48
+ return false;
22
49
  return true;
23
50
  }
24
51
  exports.instanceOfCart = instanceOfCart;
@@ -32,8 +59,17 @@ function CartFromJSONTyped(json, ignoreDiscriminator) {
32
59
  }
33
60
  return {
34
61
  'id': json['id'],
62
+ 'createdAt': (json['createdAt'] === null || json['createdAt'] === undefined) ? json['createdAt'] : new Date(json['createdAt']),
63
+ 'updatedAt': (json['updatedAt'] === null || json['updatedAt'] === undefined) ? json['updatedAt'] : new Date(json['updatedAt']),
64
+ 'channel': json['channel'],
65
+ 'owner': (json['owner'] === null || json['owner'] === undefined) ? json['owner'] : (0, OwnerLink_1.OwnerLinkFromJSON)(json['owner']),
66
+ 'transport': (json['transport'] === null || json['transport'] === undefined) ? json['transport'] : (0, CartTransport_1.CartTransportFromJSON)(json['transport']),
67
+ 'seller': (json['seller'] === null || json['seller'] === undefined) ? json['seller'] : (0, SellerLink_1.SellerLinkFromJSON)(json['seller']),
35
68
  'lineCount': json['lineCount'],
36
- 'subCarts': (json['subCarts'] === null || json['subCarts'] === undefined) ? json['subCarts'] : json['subCarts'].map(HttpLink_1.HttpLinkFromJSON),
69
+ 'lines': (json['lines'] === null || json['lines'] === undefined) ? json['lines'] : (0, HttpLink_1.HttpLinkFromJSON)(json['lines']),
70
+ 'totalBuyerCommissionExcludingTaxes': json['totalBuyerCommissionExcludingTaxes'],
71
+ 'totalExcludingTaxes': json['totalExcludingTaxes'],
72
+ 'totalIncludingTaxes': json['totalIncludingTaxes'],
37
73
  };
38
74
  }
39
75
  exports.CartFromJSONTyped = CartFromJSONTyped;
@@ -43,8 +79,17 @@ function CartToJSON(value) {
43
79
  }
44
80
  return {
45
81
  'id': value['id'],
82
+ 'createdAt': (value['createdAt'] === null || value['createdAt'] === undefined) ? value['createdAt'] : (value['createdAt']).toISOString(),
83
+ 'updatedAt': (value['updatedAt'] === null || value['updatedAt'] === undefined) ? value['updatedAt'] : (value['updatedAt']).toISOString(),
84
+ 'channel': value['channel'],
85
+ 'owner': (0, OwnerLink_1.OwnerLinkToJSON)(value['owner']),
86
+ 'transport': (0, CartTransport_1.CartTransportToJSON)(value['transport']),
87
+ 'seller': (0, SellerLink_1.SellerLinkToJSON)(value['seller']),
46
88
  'lineCount': value['lineCount'],
47
- 'subCarts': (value['subCarts'] === null || value['subCarts'] === undefined) ? value['subCarts'] : value['subCarts'].map(HttpLink_1.HttpLinkToJSON),
89
+ 'lines': (0, HttpLink_1.HttpLinkToJSON)(value['lines']),
90
+ 'totalBuyerCommissionExcludingTaxes': value['totalBuyerCommissionExcludingTaxes'],
91
+ 'totalExcludingTaxes': value['totalExcludingTaxes'],
92
+ 'totalIncludingTaxes': value['totalIncludingTaxes'],
48
93
  };
49
94
  }
50
95
  exports.CartToJSON = CartToJSON;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * lcdp-monolith-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 { ShoppedOffer } from './ShoppedOffer';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CartCreationParameters
17
+ */
18
+ export interface CartCreationParameters {
19
+ /**
20
+ * Id of the cart owner
21
+ * @type {number}
22
+ * @memberof CartCreationParameters
23
+ */
24
+ ownerId: number;
25
+ /**
26
+ * Channel identifier (e.g. "express-order:uuid")
27
+ * @type {string}
28
+ * @memberof CartCreationParameters
29
+ */
30
+ channel: string;
31
+ /**
32
+ *
33
+ * @type {Array<ShoppedOffer>}
34
+ * @memberof CartCreationParameters
35
+ */
36
+ shoppedOffers: Array<ShoppedOffer>;
37
+ }
38
+ /**
39
+ * Check if a given object implements the CartCreationParameters interface.
40
+ */
41
+ export declare function instanceOfCartCreationParameters(value: object): value is CartCreationParameters;
42
+ export declare function CartCreationParametersFromJSON(json: any): CartCreationParameters;
43
+ export declare function CartCreationParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCreationParameters;
44
+ export declare function CartCreationParametersToJSON(value?: CartCreationParameters | null): any;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-monolith-service
6
+ * This is the REST API of LCDP products
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: contact@lecomptoirdespharmacies.fr
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CartCreationParametersToJSON = exports.CartCreationParametersFromJSONTyped = exports.CartCreationParametersFromJSON = exports.instanceOfCartCreationParameters = void 0;
17
+ var ShoppedOffer_1 = require("./ShoppedOffer");
18
+ /**
19
+ * Check if a given object implements the CartCreationParameters interface.
20
+ */
21
+ function instanceOfCartCreationParameters(value) {
22
+ if (!('ownerId' in value) || value['ownerId'] === undefined)
23
+ return false;
24
+ if (!('channel' in value) || value['channel'] === undefined)
25
+ return false;
26
+ if (!('shoppedOffers' in value) || value['shoppedOffers'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ exports.instanceOfCartCreationParameters = instanceOfCartCreationParameters;
31
+ function CartCreationParametersFromJSON(json) {
32
+ return CartCreationParametersFromJSONTyped(json, false);
33
+ }
34
+ exports.CartCreationParametersFromJSON = CartCreationParametersFromJSON;
35
+ function CartCreationParametersFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'ownerId': json['ownerId'],
41
+ 'channel': json['channel'],
42
+ 'shoppedOffers': (json['shoppedOffers'] === null || json['shoppedOffers'] === undefined) ? json['shoppedOffers'] : json['shoppedOffers'].map(ShoppedOffer_1.ShoppedOfferFromJSON),
43
+ };
44
+ }
45
+ exports.CartCreationParametersFromJSONTyped = CartCreationParametersFromJSONTyped;
46
+ function CartCreationParametersToJSON(value) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'ownerId': value['ownerId'],
52
+ 'channel': value['channel'],
53
+ 'shoppedOffers': (value['shoppedOffers'] === null || value['shoppedOffers'] === undefined) ? value['shoppedOffers'] : value['shoppedOffers'].map(ShoppedOffer_1.ShoppedOfferToJSON),
54
+ };
55
+ }
56
+ exports.CartCreationParametersToJSON = CartCreationParametersToJSON;
@@ -14,50 +14,50 @@ import type { SaleOfferLink } from './SaleOfferLink';
14
14
  /**
15
15
  *
16
16
  * @export
17
- * @interface CartSubCartLine
17
+ * @interface CartLine
18
18
  */
19
- export interface CartSubCartLine {
19
+ export interface CartLine {
20
20
  /**
21
21
  *
22
22
  * @type {number}
23
- * @memberof CartSubCartLine
23
+ * @memberof CartLine
24
24
  */
25
25
  id: number;
26
26
  /**
27
27
  * Quantity desired by the buyer
28
28
  * @type {number}
29
- * @memberof CartSubCartLine
29
+ * @memberof CartLine
30
30
  */
31
31
  quantity: number;
32
32
  /**
33
33
  *
34
34
  * @type {ProductLink}
35
- * @memberof CartSubCartLine
35
+ * @memberof CartLine
36
36
  */
37
37
  product: ProductLink;
38
38
  /**
39
39
  *
40
40
  * @type {SaleOfferLink}
41
- * @memberof CartSubCartLine
41
+ * @memberof CartLine
42
42
  */
43
43
  saleOffer: SaleOfferLink;
44
44
  /**
45
45
  *
46
46
  * @type {number}
47
- * @memberof CartSubCartLine
47
+ * @memberof CartLine
48
48
  */
49
49
  distributionRangeId?: number;
50
50
  /**
51
51
  * Total price of the line excluding taxes
52
52
  * @type {number}
53
- * @memberof CartSubCartLine
53
+ * @memberof CartLine
54
54
  */
55
55
  totalExcludingTaxes: number;
56
56
  }
57
57
  /**
58
- * Check if a given object implements the CartSubCartLine interface.
58
+ * Check if a given object implements the CartLine interface.
59
59
  */
60
- export declare function instanceOfCartSubCartLine(value: object): value is CartSubCartLine;
61
- export declare function CartSubCartLineFromJSON(json: any): CartSubCartLine;
62
- export declare function CartSubCartLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartSubCartLine;
63
- export declare function CartSubCartLineToJSON(value?: CartSubCartLine | null): any;
60
+ export declare function instanceOfCartLine(value: object): value is CartLine;
61
+ export declare function CartLineFromJSON(json: any): CartLine;
62
+ export declare function CartLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartLine;
63
+ export declare function CartLineToJSON(value?: CartLine | null): any;
@@ -13,13 +13,13 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CartSubCartLineToJSON = exports.CartSubCartLineFromJSONTyped = exports.CartSubCartLineFromJSON = exports.instanceOfCartSubCartLine = void 0;
16
+ exports.CartLineToJSON = exports.CartLineFromJSONTyped = exports.CartLineFromJSON = exports.instanceOfCartLine = void 0;
17
17
  var ProductLink_1 = require("./ProductLink");
18
18
  var SaleOfferLink_1 = require("./SaleOfferLink");
19
19
  /**
20
- * Check if a given object implements the CartSubCartLine interface.
20
+ * Check if a given object implements the CartLine interface.
21
21
  */
22
- function instanceOfCartSubCartLine(value) {
22
+ function instanceOfCartLine(value) {
23
23
  if (!('id' in value) || value['id'] === undefined)
24
24
  return false;
25
25
  if (!('quantity' in value) || value['quantity'] === undefined)
@@ -32,12 +32,12 @@ function instanceOfCartSubCartLine(value) {
32
32
  return false;
33
33
  return true;
34
34
  }
35
- exports.instanceOfCartSubCartLine = instanceOfCartSubCartLine;
36
- function CartSubCartLineFromJSON(json) {
37
- return CartSubCartLineFromJSONTyped(json, false);
35
+ exports.instanceOfCartLine = instanceOfCartLine;
36
+ function CartLineFromJSON(json) {
37
+ return CartLineFromJSONTyped(json, false);
38
38
  }
39
- exports.CartSubCartLineFromJSON = CartSubCartLineFromJSON;
40
- function CartSubCartLineFromJSONTyped(json, ignoreDiscriminator) {
39
+ exports.CartLineFromJSON = CartLineFromJSON;
40
+ function CartLineFromJSONTyped(json, ignoreDiscriminator) {
41
41
  if (json == null) {
42
42
  return json;
43
43
  }
@@ -50,8 +50,8 @@ function CartSubCartLineFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'totalExcludingTaxes': json['totalExcludingTaxes'],
51
51
  };
52
52
  }
53
- exports.CartSubCartLineFromJSONTyped = CartSubCartLineFromJSONTyped;
54
- function CartSubCartLineToJSON(value) {
53
+ exports.CartLineFromJSONTyped = CartLineFromJSONTyped;
54
+ function CartLineToJSON(value) {
55
55
  if (value == null) {
56
56
  return value;
57
57
  }
@@ -64,4 +64,4 @@ function CartSubCartLineToJSON(value) {
64
64
  'totalExcludingTaxes': value['totalExcludingTaxes'],
65
65
  };
66
66
  }
67
- exports.CartSubCartLineToJSON = CartSubCartLineToJSON;
67
+ exports.CartLineToJSON = CartLineToJSON;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * lcdp-monolith-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
+ /**
13
+ *
14
+ * @export
15
+ * @interface CartLineUpdateParameters
16
+ */
17
+ export interface CartLineUpdateParameters {
18
+ /**
19
+ * Identifier of the distribution range to change in cart line
20
+ * @type {number}
21
+ * @memberof CartLineUpdateParameters
22
+ */
23
+ distributionRangeId?: number;
24
+ /**
25
+ * New quantity for the cart line
26
+ * @type {number}
27
+ * @memberof CartLineUpdateParameters
28
+ */
29
+ quantity: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the CartLineUpdateParameters interface.
33
+ */
34
+ export declare function instanceOfCartLineUpdateParameters(value: object): value is CartLineUpdateParameters;
35
+ export declare function CartLineUpdateParametersFromJSON(json: any): CartLineUpdateParameters;
36
+ export declare function CartLineUpdateParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartLineUpdateParameters;
37
+ export declare function CartLineUpdateParametersToJSON(value?: CartLineUpdateParameters | null): any;