@lcdp/api-react-rest-client 2.5.5 → 2.5.6-LDS-3247-OrderStatusReason-default-value.6824011887

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 (223) hide show
  1. package/auth/src/apis/AuthApi.js +51 -35
  2. package/auth/src/apis/ManageApiKeyApi.js +77 -53
  3. package/auth/src/apis/SearchApiKeyApi.js +52 -36
  4. package/auth/src/runtime.d.ts +2 -2
  5. package/auth/src/runtime.js +1 -1
  6. package/banking-operation/src/apis/ManageLevyApi.js +52 -36
  7. package/banking-operation/src/apis/ManageOrderPaymentApi.js +52 -36
  8. package/banking-operation/src/apis/SearchLevyApi.js +52 -36
  9. package/banking-operation/src/apis/SearchOrderPaymentApi.js +26 -18
  10. package/banking-operation/src/runtime.d.ts +2 -2
  11. package/banking-operation/src/runtime.js +1 -1
  12. package/catalog/src/apis/ManageProductInsightApi.js +77 -53
  13. package/catalog/src/apis/SearchProductInsightApi.js +52 -36
  14. package/catalog/src/runtime.d.ts +2 -2
  15. package/catalog/src/runtime.js +1 -1
  16. package/challenge/src/apis/ManageChallengesApi.js +26 -18
  17. package/challenge/src/runtime.d.ts +2 -2
  18. package/challenge/src/runtime.js +1 -1
  19. package/configuration/src/apis/ManageVariableApi.js +25 -17
  20. package/configuration/src/apis/ManageVatApi.js +51 -35
  21. package/configuration/src/apis/SearchVatApi.js +52 -36
  22. package/configuration/src/runtime.d.ts +2 -2
  23. package/configuration/src/runtime.js +1 -1
  24. package/content/src/apis/ManageContentApi.js +26 -18
  25. package/content/src/runtime.d.ts +2 -2
  26. package/content/src/runtime.js +1 -1
  27. package/factory/src/apis/ManageAssemblyApi.js +53 -35
  28. package/factory/src/apis/ManageAssemblyOperationApi.js +26 -18
  29. package/factory/src/apis/SearchAssemblyApi.js +104 -72
  30. package/factory/src/apis/SearchAssemblyLineApi.js +52 -36
  31. package/factory/src/apis/SearchAssemblyOperationApi.js +52 -36
  32. package/factory/src/runtime.d.ts +2 -2
  33. package/factory/src/runtime.js +1 -1
  34. package/favorite/src/apis/ManageFavoriteProductApi.js +103 -71
  35. package/favorite/src/runtime.d.ts +2 -2
  36. package/favorite/src/runtime.js +1 -1
  37. package/geo/src/apis/SearchCountryApi.js +26 -18
  38. package/geo/src/runtime.d.ts +2 -2
  39. package/geo/src/runtime.js +1 -1
  40. package/inventory/src/apis/ManageInventoryApi.js +126 -86
  41. package/inventory/src/apis/SearchInventoryApi.js +260 -180
  42. package/inventory/src/runtime.d.ts +2 -2
  43. package/inventory/src/runtime.js +1 -1
  44. package/invoice/src/apis/ManageInvoiceApi.js +52 -36
  45. package/invoice/src/apis/ManageInvoiceLineApi.js +51 -35
  46. package/invoice/src/apis/ManageInvoicesSummaryApi.js +25 -17
  47. package/invoice/src/apis/SearchInvoiceApi.js +52 -36
  48. package/invoice/src/apis/SearchInvoiceLineApi.js +26 -18
  49. package/invoice/src/apis/SearchOrderTallyApi.js +52 -36
  50. package/invoice/src/runtime.d.ts +2 -2
  51. package/invoice/src/runtime.js +1 -1
  52. package/laboratory/src/apis/ManageLaboratoryApi.js +26 -18
  53. package/laboratory/src/apis/SearchLaboratoryApi.js +52 -36
  54. package/laboratory/src/runtime.d.ts +2 -2
  55. package/laboratory/src/runtime.js +1 -1
  56. package/laboratory-store/src/apis/ManageLaboratoryStoreApi.js +52 -36
  57. package/laboratory-store/src/apis/ManageLaboratoryStoreImageApi.js +106 -70
  58. package/laboratory-store/src/apis/SearchLaboratoryStoreApi.js +52 -36
  59. package/laboratory-store/src/runtime.d.ts +2 -2
  60. package/laboratory-store/src/runtime.js +1 -1
  61. package/laboratory-store-log/src/apis/SearchLaboratoryStoreLogApi.js +26 -18
  62. package/laboratory-store-log/src/runtime.d.ts +2 -2
  63. package/laboratory-store-log/src/runtime.js +1 -1
  64. package/lexicon/src/apis/ManageLexiconApi.js +51 -35
  65. package/lexicon/src/apis/SearchLexiconApi.js +104 -72
  66. package/lexicon/src/runtime.d.ts +2 -2
  67. package/lexicon/src/runtime.js +1 -1
  68. package/litigation/src/apis/ManageLitigationApi.js +25 -17
  69. package/litigation/src/runtime.d.ts +2 -2
  70. package/litigation/src/runtime.js +1 -1
  71. package/magic-cart/src/apis/ManageExpressOrderApi.js +26 -18
  72. package/magic-cart/src/runtime.d.ts +2 -2
  73. package/magic-cart/src/runtime.js +1 -1
  74. package/mandate/src/apis/ManageMandatesApi.js +103 -71
  75. package/mandate/src/runtime.d.ts +2 -2
  76. package/mandate/src/runtime.js +1 -1
  77. package/mangopay-hook/src/runtime.d.ts +2 -2
  78. package/mangopay-hook/src/runtime.js +1 -1
  79. package/message/src/apis/ManageMessageApi.js +127 -87
  80. package/message/src/apis/SearchMessageApi.js +78 -54
  81. package/message/src/runtime.d.ts +2 -2
  82. package/message/src/runtime.js +1 -1
  83. package/notification/src/apis/ManageNotificationApi.js +51 -35
  84. package/notification/src/apis/ManageNotificationTypeApi.js +79 -53
  85. package/notification/src/apis/SearchNotificationApi.js +52 -36
  86. package/notification/src/apis/SearchNotificationTypeApi.js +78 -54
  87. package/notification/src/models/NotificationTypeId.d.ts +2 -0
  88. package/notification/src/models/NotificationTypeId.js +2 -0
  89. package/notification/src/runtime.d.ts +2 -2
  90. package/notification/src/runtime.js +1 -1
  91. package/order/src/apis/ManageMetaOrderApi.js +51 -35
  92. package/order/src/apis/ManageOrderApi.d.ts +6 -17
  93. package/order/src/apis/ManageOrderApi.js +210 -221
  94. package/order/src/apis/ManageOrderItemApi.d.ts +4 -4
  95. package/order/src/apis/ManageOrderItemApi.js +132 -92
  96. package/order/src/apis/SearchOrderApi.js +104 -72
  97. package/order/src/apis/SearchOrderItemApi.d.ts +2 -0
  98. package/order/src/apis/SearchOrderItemApi.js +132 -90
  99. package/order/src/models/Order.d.ts +14 -1
  100. package/order/src/models/Order.js +5 -0
  101. package/order/src/models/OrderJournal.d.ts +13 -0
  102. package/order/src/models/OrderJournal.js +6 -0
  103. package/order/src/models/OrderStatus.d.ts +4 -2
  104. package/order/src/models/OrderStatus.js +4 -2
  105. package/order/src/models/OrderStatusReason.d.ts +24 -0
  106. package/order/src/models/OrderStatusReason.js +39 -0
  107. package/order/src/models/OrderUpdateParameters.d.ts +20 -0
  108. package/order/src/models/OrderUpdateParameters.js +8 -0
  109. package/order/src/models/UpdateOrderStatusParameters.d.ts +3 -5
  110. package/order/src/models/UpdateOrderStatusParameters.js +2 -4
  111. package/order/src/models/index.d.ts +1 -0
  112. package/order/src/models/index.js +1 -0
  113. package/order/src/runtime.d.ts +2 -2
  114. package/order/src/runtime.js +1 -1
  115. package/order-log/src/apis/SearchOrderLogApi.js +26 -18
  116. package/order-log/src/models/OrderLog.d.ts +19 -0
  117. package/order-log/src/models/OrderLog.js +3 -2
  118. package/order-log/src/models/OrderLogAllOf.d.ts +19 -0
  119. package/order-log/src/models/OrderLogAllOf.js +7 -0
  120. package/order-log/src/models/OrderStatusReason.d.ts +24 -0
  121. package/order-log/src/models/OrderStatusReason.js +39 -0
  122. package/order-log/src/models/index.d.ts +1 -0
  123. package/order-log/src/models/index.js +1 -0
  124. package/order-log/src/runtime.d.ts +2 -2
  125. package/order-log/src/runtime.js +1 -1
  126. package/outrage-message/src/apis/ManageOutrageMessageApi.js +77 -53
  127. package/outrage-message/src/apis/SearchOutrageMessageApi.js +52 -36
  128. package/outrage-message/src/runtime.d.ts +2 -2
  129. package/outrage-message/src/runtime.js +1 -1
  130. package/package.json +1 -1
  131. package/product/src/apis/ManageProductApi.js +52 -36
  132. package/product/src/apis/ManageProductImageApi.js +52 -34
  133. package/product/src/apis/ManageProductProscriptionApi.js +51 -35
  134. package/product/src/apis/SearchProductApi.js +52 -36
  135. package/product/src/apis/SearchProductImageApi.js +52 -36
  136. package/product/src/apis/SearchProductMetadataApi.js +104 -72
  137. package/product/src/apis/SearchProductProscriptionApi.js +26 -18
  138. package/product/src/runtime.d.ts +2 -2
  139. package/product/src/runtime.js +1 -1
  140. package/pub/src/apis/ManagePubApi.js +102 -70
  141. package/pub/src/apis/ManagePubImageApi.js +28 -18
  142. package/pub/src/apis/SearchPubApi.js +78 -54
  143. package/pub/src/runtime.d.ts +2 -2
  144. package/pub/src/runtime.js +1 -1
  145. package/recommendation/src/apis/SearchFavoriteProductRecommendationApi.js +26 -18
  146. package/recommendation/src/apis/SearchProductPriceRecommendationApi.js +26 -18
  147. package/recommendation/src/apis/SearchProductRecommendationApi.js +26 -18
  148. package/recommendation/src/runtime.d.ts +2 -2
  149. package/recommendation/src/runtime.js +1 -1
  150. package/rfx/src/apis/ManageRfiApi.js +25 -17
  151. package/rfx/src/apis/ManageRfilApi.js +25 -17
  152. package/rfx/src/apis/ManageRfoApi.js +25 -17
  153. package/rfx/src/apis/ManageRfoiApi.js +52 -36
  154. package/rfx/src/apis/SearchRfoiApi.js +26 -18
  155. package/rfx/src/runtime.d.ts +2 -2
  156. package/rfx/src/runtime.js +1 -1
  157. package/sale-offer/src/apis/ManageSaleOfferApi.js +153 -105
  158. package/sale-offer/src/apis/SearchSaleOfferApi.js +52 -36
  159. package/sale-offer/src/runtime.d.ts +2 -2
  160. package/sale-offer/src/runtime.js +1 -1
  161. package/sale-offer-log/src/apis/SearchSaleOfferLogApi.js +26 -18
  162. package/sale-offer-log/src/runtime.d.ts +2 -2
  163. package/sale-offer-log/src/runtime.js +1 -1
  164. package/servant/src/apis/ManageTaskApi.js +25 -17
  165. package/servant/src/apis/SearchServantApi.js +26 -18
  166. package/servant/src/runtime.d.ts +2 -2
  167. package/servant/src/runtime.js +1 -1
  168. package/shipment/src/apis/ManageOrderCarriageApi.js +26 -18
  169. package/shipment/src/apis/ManageShipmentApi.js +52 -36
  170. package/shipment/src/apis/SearchOrderCarriageApi.js +52 -36
  171. package/shipment/src/runtime.d.ts +2 -2
  172. package/shipment/src/runtime.js +1 -1
  173. package/shopping-cart/src/apis/ManageCartApi.js +52 -36
  174. package/shopping-cart/src/apis/ManageCartSubCartApi.js +77 -53
  175. package/shopping-cart/src/apis/ManageCartSubCartLineApi.js +128 -88
  176. package/shopping-cart/src/runtime.d.ts +2 -2
  177. package/shopping-cart/src/runtime.js +1 -1
  178. package/statistic/src/apis/SearchSaleOfferStatisticsApi.js +52 -36
  179. package/statistic/src/runtime.d.ts +2 -2
  180. package/statistic/src/runtime.js +1 -1
  181. package/subscription/src/apis/ManageSubscriptionApi.js +77 -53
  182. package/subscription/src/apis/ManageSubscriptionPlanApi.js +26 -18
  183. package/subscription/src/apis/SearchSubscriptionApi.js +26 -18
  184. package/subscription/src/apis/SearchSubscriptionPlanApi.js +52 -36
  185. package/subscription/src/apis/SearchSubscriptionPlanFeatureApi.js +26 -18
  186. package/subscription/src/runtime.d.ts +2 -2
  187. package/subscription/src/runtime.js +1 -1
  188. package/thread/src/apis/ManageThreadCommentApi.js +52 -36
  189. package/thread/src/apis/SearchThreadApi.js +26 -18
  190. package/thread/src/apis/SearchThreadCommentApi.js +26 -18
  191. package/thread/src/runtime.d.ts +2 -2
  192. package/thread/src/runtime.js +1 -1
  193. package/ubo/src/apis/ManageUboDeclarationApi.js +26 -18
  194. package/ubo/src/apis/SearchUboDeclarationApi.js +26 -18
  195. package/ubo/src/runtime.d.ts +2 -2
  196. package/ubo/src/runtime.js +1 -1
  197. package/user/src/apis/ManagePasswordApi.js +50 -34
  198. package/user/src/apis/ManageUserApi.js +177 -121
  199. package/user/src/apis/ManageUserBankAccountApi.js +52 -36
  200. package/user/src/apis/ManageUserDocumentApi.js +82 -54
  201. package/user/src/apis/ManageUserFavoriteLaboratoryStoreApi.js +100 -68
  202. package/user/src/apis/ManageUserRestrictionApi.js +200 -136
  203. package/user/src/apis/ManageUserRoleApi.js +26 -18
  204. package/user/src/apis/ManageUserRuleApi.js +51 -35
  205. package/user/src/apis/ManageUserSocialNetworksApi.js +52 -36
  206. package/user/src/apis/ManageUserTransportApi.js +26 -18
  207. package/user/src/apis/SearchUserApi.js +156 -108
  208. package/user/src/apis/SearchUserDocumentApi.js +180 -124
  209. package/user/src/apis/SearchUserFavoriteLaboratoryStoreApi.js +52 -36
  210. package/user/src/apis/SearchUserFeatureApi.js +26 -18
  211. package/user/src/apis/SearchUserRestrictionApi.js +104 -72
  212. package/user/src/apis/SearchUserRuleApi.js +26 -18
  213. package/user/src/apis/SearchUserSocialNetworksApi.js +52 -36
  214. package/user/src/apis/SearchUserTransportApi.js +52 -36
  215. package/user/src/models/NotificationTypeId.d.ts +2 -0
  216. package/user/src/models/NotificationTypeId.js +2 -0
  217. package/user/src/runtime.d.ts +2 -2
  218. package/user/src/runtime.js +1 -1
  219. package/wish/src/apis/ManageWishApi.js +75 -51
  220. package/wish/src/apis/SearchProductEnthusiasmApi.js +26 -18
  221. package/wish/src/apis/SearchWishApi.js +52 -36
  222. package/wish/src/runtime.d.ts +2 -2
  223. package/wish/src/runtime.js +1 -1
@@ -81,9 +81,9 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
81
81
  */
82
82
  SearchOrderItemApi.prototype.getAvailableOrderItemsOperationsRaw = function (requestParameters) {
83
83
  return __awaiter(this, void 0, void 0, function () {
84
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_1;
85
- return __generator(this, function (_a) {
86
- switch (_a.label) {
84
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_1;
85
+ return __generator(this, function (_b) {
86
+ switch (_b.label) {
87
87
  case 0:
88
88
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
89
89
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling getAvailableOrderItemsOperations.');
@@ -93,24 +93,32 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
93
93
  if (this.configuration && this.configuration.apiKey) {
94
94
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
95
95
  }
96
- if (this.configuration && this.configuration.accessToken) {
97
- token = this.configuration.accessToken;
98
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
99
- if (tokenString) {
100
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
101
- }
102
- }
103
- _a.label = 1;
96
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
97
+ token = this.configuration.accessToken;
98
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
99
+ return [4 /*yield*/, token("bearerAuth", [])];
104
100
  case 1:
105
- _a.trys.push([1, 3, , 4]);
101
+ _a = _b.sent();
102
+ return [3 /*break*/, 3];
103
+ case 2:
104
+ _a = token;
105
+ _b.label = 3;
106
+ case 3:
107
+ tokenString = _a;
108
+ if (tokenString) {
109
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
110
+ }
111
+ _b.label = 4;
112
+ case 4:
113
+ _b.trys.push([4, 6, , 7]);
106
114
  return [4 /*yield*/, this.request({
107
115
  path: "/orders/{orderReference}/available-items-operations".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
108
116
  method: 'GET',
109
117
  headers: headerParameters,
110
118
  query: queryParameters,
111
119
  })];
112
- case 2:
113
- response = _a.sent();
120
+ case 5:
121
+ response = _b.sent();
114
122
  contentType = response.headers.get("content-type");
115
123
  if (contentType && contentType.indexOf("application/json") !== -1) {
116
124
  return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.OrderItemsOperationFromJSON); })];
@@ -122,12 +130,12 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
122
130
  // TODO : Better handling of others application types
123
131
  return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
124
132
  }
125
- return [3 /*break*/, 4];
126
- case 3:
127
- response_1 = _a.sent();
133
+ return [3 /*break*/, 7];
134
+ case 6:
135
+ response_1 = _b.sent();
128
136
  console.debug(response_1);
129
137
  throw response_1;
130
- case 4: return [2 /*return*/];
138
+ case 7: return [2 /*return*/];
131
139
  }
132
140
  });
133
141
  });
@@ -155,9 +163,9 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
155
163
  */
156
164
  SearchOrderItemApi.prototype.getOrderAddedItemsRaw = function (requestParameters) {
157
165
  return __awaiter(this, void 0, void 0, function () {
158
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_2;
159
- return __generator(this, function (_a) {
160
- switch (_a.label) {
166
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_2;
167
+ return __generator(this, function (_b) {
168
+ switch (_b.label) {
161
169
  case 0:
162
170
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
163
171
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling getOrderAddedItems.');
@@ -170,24 +178,32 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
170
178
  if (this.configuration && this.configuration.apiKey) {
171
179
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
172
180
  }
173
- if (this.configuration && this.configuration.accessToken) {
174
- token = this.configuration.accessToken;
175
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
176
- if (tokenString) {
177
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
178
- }
179
- }
180
- _a.label = 1;
181
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
182
+ token = this.configuration.accessToken;
183
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
184
+ return [4 /*yield*/, token("bearerAuth", [])];
181
185
  case 1:
182
- _a.trys.push([1, 3, , 4]);
186
+ _a = _b.sent();
187
+ return [3 /*break*/, 3];
188
+ case 2:
189
+ _a = token;
190
+ _b.label = 3;
191
+ case 3:
192
+ tokenString = _a;
193
+ if (tokenString) {
194
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
195
+ }
196
+ _b.label = 4;
197
+ case 4:
198
+ _b.trys.push([4, 6, , 7]);
183
199
  return [4 /*yield*/, this.request({
184
200
  path: "/orders/{orderReference}/added-items".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
185
201
  method: 'GET',
186
202
  headers: headerParameters,
187
203
  query: queryParameters,
188
204
  })];
189
- case 2:
190
- response = _a.sent();
205
+ case 5:
206
+ response = _b.sent();
191
207
  contentType = response.headers.get("content-type");
192
208
  if (contentType && contentType.indexOf("application/json") !== -1) {
193
209
  return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.OrderAddedItemFromJSON); })];
@@ -199,12 +215,12 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
199
215
  // TODO : Better handling of others application types
200
216
  return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
201
217
  }
202
- return [3 /*break*/, 4];
203
- case 3:
204
- response_2 = _a.sent();
218
+ return [3 /*break*/, 7];
219
+ case 6:
220
+ response_2 = _b.sent();
205
221
  console.debug(response_2);
206
222
  throw response_2;
207
- case 4: return [2 /*return*/];
223
+ case 7: return [2 /*return*/];
208
224
  }
209
225
  });
210
226
  });
@@ -231,9 +247,9 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
231
247
  */
232
248
  SearchOrderItemApi.prototype.getOrderItemsRaw = function (requestParameters) {
233
249
  return __awaiter(this, void 0, void 0, function () {
234
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_3;
235
- return __generator(this, function (_a) {
236
- switch (_a.label) {
250
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_3;
251
+ return __generator(this, function (_b) {
252
+ switch (_b.label) {
237
253
  case 0:
238
254
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
239
255
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling getOrderItems.');
@@ -246,24 +262,32 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
246
262
  if (this.configuration && this.configuration.apiKey) {
247
263
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
248
264
  }
249
- if (this.configuration && this.configuration.accessToken) {
250
- token = this.configuration.accessToken;
251
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
252
- if (tokenString) {
253
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
254
- }
255
- }
256
- _a.label = 1;
265
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
266
+ token = this.configuration.accessToken;
267
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
268
+ return [4 /*yield*/, token("bearerAuth", [])];
257
269
  case 1:
258
- _a.trys.push([1, 3, , 4]);
270
+ _a = _b.sent();
271
+ return [3 /*break*/, 3];
272
+ case 2:
273
+ _a = token;
274
+ _b.label = 3;
275
+ case 3:
276
+ tokenString = _a;
277
+ if (tokenString) {
278
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
279
+ }
280
+ _b.label = 4;
281
+ case 4:
282
+ _b.trys.push([4, 6, , 7]);
259
283
  return [4 /*yield*/, this.request({
260
284
  path: "/orders/{orderReference}/items".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
261
285
  method: 'GET',
262
286
  headers: headerParameters,
263
287
  query: queryParameters,
264
288
  })];
265
- case 2:
266
- response = _a.sent();
289
+ case 5:
290
+ response = _b.sent();
267
291
  contentType = response.headers.get("content-type");
268
292
  if (contentType && contentType.indexOf("application/json") !== -1) {
269
293
  return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.OrderItemFromJSON); })];
@@ -275,12 +299,12 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
275
299
  // TODO : Better handling of others application types
276
300
  return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
277
301
  }
278
- return [3 /*break*/, 4];
279
- case 3:
280
- response_3 = _a.sent();
302
+ return [3 /*break*/, 7];
303
+ case 6:
304
+ response_3 = _b.sent();
281
305
  console.debug(response_3);
282
306
  throw response_3;
283
- case 4: return [2 /*return*/];
307
+ case 7: return [2 /*return*/];
284
308
  }
285
309
  });
286
310
  });
@@ -307,9 +331,9 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
307
331
  */
308
332
  SearchOrderItemApi.prototype.getOrderRefundedItemsRaw = function (requestParameters) {
309
333
  return __awaiter(this, void 0, void 0, function () {
310
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_4;
311
- return __generator(this, function (_a) {
312
- switch (_a.label) {
334
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_4;
335
+ return __generator(this, function (_b) {
336
+ switch (_b.label) {
313
337
  case 0:
314
338
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
315
339
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling getOrderRefundedItems.');
@@ -322,24 +346,32 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
322
346
  if (this.configuration && this.configuration.apiKey) {
323
347
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
324
348
  }
325
- if (this.configuration && this.configuration.accessToken) {
326
- token = this.configuration.accessToken;
327
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
328
- if (tokenString) {
329
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
330
- }
331
- }
332
- _a.label = 1;
349
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
350
+ token = this.configuration.accessToken;
351
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
352
+ return [4 /*yield*/, token("bearerAuth", [])];
333
353
  case 1:
334
- _a.trys.push([1, 3, , 4]);
354
+ _a = _b.sent();
355
+ return [3 /*break*/, 3];
356
+ case 2:
357
+ _a = token;
358
+ _b.label = 3;
359
+ case 3:
360
+ tokenString = _a;
361
+ if (tokenString) {
362
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
363
+ }
364
+ _b.label = 4;
365
+ case 4:
366
+ _b.trys.push([4, 6, , 7]);
335
367
  return [4 /*yield*/, this.request({
336
368
  path: "/orders/{orderReference}/refunded-items".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
337
369
  method: 'GET',
338
370
  headers: headerParameters,
339
371
  query: queryParameters,
340
372
  })];
341
- case 2:
342
- response = _a.sent();
373
+ case 5:
374
+ response = _b.sent();
343
375
  contentType = response.headers.get("content-type");
344
376
  if (contentType && contentType.indexOf("application/json") !== -1) {
345
377
  return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.OrderRefundedItemFromJSON); })];
@@ -351,12 +383,12 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
351
383
  // TODO : Better handling of others application types
352
384
  return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
353
385
  }
354
- return [3 /*break*/, 4];
355
- case 3:
356
- response_4 = _a.sent();
386
+ return [3 /*break*/, 7];
387
+ case 6:
388
+ response_4 = _b.sent();
357
389
  console.debug(response_4);
358
390
  throw response_4;
359
- case 4: return [2 /*return*/];
391
+ case 7: return [2 /*return*/];
360
392
  }
361
393
  });
362
394
  });
@@ -379,13 +411,14 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
379
411
  });
380
412
  };
381
413
  /**
414
+ * # Preconditions : - You are buyer/seller of the order or you are administrator
382
415
  * Get removed items for order identified by orderReference
383
416
  */
384
417
  SearchOrderItemApi.prototype.getOrderRemovedItemsRaw = function (requestParameters) {
385
418
  return __awaiter(this, void 0, void 0, function () {
386
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_5;
387
- return __generator(this, function (_a) {
388
- switch (_a.label) {
419
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_5;
420
+ return __generator(this, function (_b) {
421
+ switch (_b.label) {
389
422
  case 0:
390
423
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
391
424
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling getOrderRemovedItems.');
@@ -398,24 +431,32 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
398
431
  if (this.configuration && this.configuration.apiKey) {
399
432
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
400
433
  }
401
- if (this.configuration && this.configuration.accessToken) {
402
- token = this.configuration.accessToken;
403
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
404
- if (tokenString) {
405
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
406
- }
407
- }
408
- _a.label = 1;
434
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
435
+ token = this.configuration.accessToken;
436
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
437
+ return [4 /*yield*/, token("bearerAuth", [])];
409
438
  case 1:
410
- _a.trys.push([1, 3, , 4]);
439
+ _a = _b.sent();
440
+ return [3 /*break*/, 3];
441
+ case 2:
442
+ _a = token;
443
+ _b.label = 3;
444
+ case 3:
445
+ tokenString = _a;
446
+ if (tokenString) {
447
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
448
+ }
449
+ _b.label = 4;
450
+ case 4:
451
+ _b.trys.push([4, 6, , 7]);
411
452
  return [4 /*yield*/, this.request({
412
453
  path: "/orders/{orderReference}/removed-items".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
413
454
  method: 'GET',
414
455
  headers: headerParameters,
415
456
  query: queryParameters,
416
457
  })];
417
- case 2:
418
- response = _a.sent();
458
+ case 5:
459
+ response = _b.sent();
419
460
  contentType = response.headers.get("content-type");
420
461
  if (contentType && contentType.indexOf("application/json") !== -1) {
421
462
  return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.OrderRemovedItemFromJSON); })];
@@ -427,17 +468,18 @@ var SearchOrderItemApi = /** @class */ (function (_super) {
427
468
  // TODO : Better handling of others application types
428
469
  return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
429
470
  }
430
- return [3 /*break*/, 4];
431
- case 3:
432
- response_5 = _a.sent();
471
+ return [3 /*break*/, 7];
472
+ case 6:
473
+ response_5 = _b.sent();
433
474
  console.debug(response_5);
434
475
  throw response_5;
435
- case 4: return [2 /*return*/];
476
+ case 7: return [2 /*return*/];
436
477
  }
437
478
  });
438
479
  });
439
480
  };
440
481
  /**
482
+ * # Preconditions : - You are buyer/seller of the order or you are administrator
441
483
  * Get removed items for order identified by orderReference
442
484
  */
443
485
  SearchOrderItemApi.prototype.getOrderRemovedItems = function (requestParameters) {
@@ -15,12 +15,13 @@ import { HttpLink } from './HttpLink';
15
15
  import { OrderJournal } from './OrderJournal';
16
16
  import { OrderPrices } from './OrderPrices';
17
17
  import { OrderStatus } from './OrderStatus';
18
+ import { OrderStatusReason } from './OrderStatusReason';
18
19
  import { OrderStorageType } from './OrderStorageType';
19
20
  import { OrderThreads } from './OrderThreads';
20
21
  import { OrderType } from './OrderType';
21
22
  import { UserLink } from './UserLink';
22
23
  /**
23
- * One order contain all items that a buyer request to one seller. If shipping address is empty, use billing address as shipping address
24
+ * One order contain all items that a buyer request to one seller. If shipping address is empty, use billing address as shipping address * Important note : Only administrator and the user who modified the status can see the \'statusComment\' field
24
25
  * @export
25
26
  * @interface Order
26
27
  */
@@ -43,6 +44,18 @@ export interface Order {
43
44
  * @memberof Order
44
45
  */
45
46
  status: OrderStatus;
47
+ /**
48
+ *
49
+ * @type {OrderStatusReason}
50
+ * @memberof Order
51
+ */
52
+ statusReason: OrderStatusReason;
53
+ /**
54
+ * Smart sentence given detail about the current status
55
+ * @type {string}
56
+ * @memberof Order
57
+ */
58
+ statusComment?: string | null;
46
59
  /**
47
60
  * True if the seller accepted the order, false if not
48
61
  * @type {boolean}
@@ -21,6 +21,7 @@ var HttpLink_1 = require("./HttpLink");
21
21
  var OrderJournal_1 = require("./OrderJournal");
22
22
  var OrderPrices_1 = require("./OrderPrices");
23
23
  var OrderStatus_1 = require("./OrderStatus");
24
+ var OrderStatusReason_1 = require("./OrderStatusReason");
24
25
  var OrderStorageType_1 = require("./OrderStorageType");
25
26
  var OrderThreads_1 = require("./OrderThreads");
26
27
  var OrderType_1 = require("./OrderType");
@@ -37,6 +38,8 @@ function OrderFromJSONTyped(json, ignoreDiscriminator) {
37
38
  'reference': json['reference'],
38
39
  'type': (0, OrderType_1.OrderTypeFromJSON)(json['type']),
39
40
  'status': (0, OrderStatus_1.OrderStatusFromJSON)(json['status']),
41
+ 'statusReason': (0, OrderStatusReason_1.OrderStatusReasonFromJSON)(json['statusReason']),
42
+ 'statusComment': !(0, runtime_1.exists)(json, 'statusComment') ? json['statusComment'] : json['statusComment'],
40
43
  'accepted': json['accepted'],
41
44
  'paused': json['paused'],
42
45
  'inLitigation': json['inLitigation'],
@@ -78,6 +81,8 @@ function OrderToJSON(value) {
78
81
  'reference': value.reference,
79
82
  'type': (0, OrderType_1.OrderTypeToJSON)(value.type),
80
83
  'status': (0, OrderStatus_1.OrderStatusToJSON)(value.status),
84
+ 'statusReason': (0, OrderStatusReason_1.OrderStatusReasonToJSON)(value.statusReason),
85
+ 'statusComment': value.statusComment,
81
86
  'accepted': value.accepted,
82
87
  'paused': value.paused,
83
88
  'inLitigation': value.inLitigation,
@@ -9,12 +9,25 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { OrderPrices } from './OrderPrices';
12
13
  /**
13
14
  *
14
15
  * @export
15
16
  * @interface OrderJournal
16
17
  */
17
18
  export interface OrderJournal {
19
+ /**
20
+ *
21
+ * @type {OrderPrices}
22
+ * @memberof OrderJournal
23
+ */
24
+ pricesOnCreation?: OrderPrices;
25
+ /**
26
+ * Id of the user that modified status
27
+ * @type {number}
28
+ * @memberof OrderJournal
29
+ */
30
+ statusModifiedBy: number | null;
18
31
  /**
19
32
  * Date when free shipping was reached
20
33
  * @type {Date}
@@ -14,6 +14,8 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OrderJournalToJSON = exports.OrderJournalFromJSONTyped = exports.OrderJournalFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var OrderPrices_1 = require("./OrderPrices");
17
19
  function OrderJournalFromJSON(json) {
18
20
  return OrderJournalFromJSONTyped(json, false);
19
21
  }
@@ -23,6 +25,8 @@ function OrderJournalFromJSONTyped(json, ignoreDiscriminator) {
23
25
  return json;
24
26
  }
25
27
  return {
28
+ 'pricesOnCreation': !(0, runtime_1.exists)(json, 'pricesOnCreation') ? undefined : (0, OrderPrices_1.OrderPricesFromJSON)(json['pricesOnCreation']),
29
+ 'statusModifiedBy': json['statusModifiedBy'],
26
30
  'freeShippingReachedDate': (json['freeShippingReachedDate'] === null ? null : new Date(json['freeShippingReachedDate'])),
27
31
  };
28
32
  }
@@ -35,6 +39,8 @@ function OrderJournalToJSON(value) {
35
39
  return null;
36
40
  }
37
41
  return {
42
+ 'pricesOnCreation': (0, OrderPrices_1.OrderPricesToJSON)(value.pricesOnCreation),
43
+ 'statusModifiedBy': value.statusModifiedBy,
38
44
  'freeShippingReachedDate': (value.freeShippingReachedDate === null ? null : value.freeShippingReachedDate.toISOString()),
39
45
  };
40
46
  }
@@ -15,8 +15,10 @@
15
15
  * @enum {string}
16
16
  */
17
17
  export declare enum OrderStatus {
18
- WAITINGFORACCEPTANCE = "WAITING_FOR_ACCEPTANCE",
19
- ACCEPTANCEDELAY = "ACCEPTANCE_DELAY",
18
+ WAITINGFORSELLERACCEPTANCE = "WAITING_FOR_SELLER_ACCEPTANCE",
19
+ WAITINGFORBUYERACCEPTANCE = "WAITING_FOR_BUYER_ACCEPTANCE",
20
+ SELLERACCEPTANCEDELAY = "SELLER_ACCEPTANCE_DELAY",
21
+ BUYERACCEPTANCEDELAY = "BUYER_ACCEPTANCE_DELAY",
20
22
  WAITINGFORSENDING = "WAITING_FOR_SENDING",
21
23
  SENDINGDELAY = "SENDING_DELAY",
22
24
  DELIVERYONGOING = "DELIVERY_ONGOING",
@@ -21,8 +21,10 @@ exports.OrderStatusToJSON = exports.OrderStatusFromJSONTyped = exports.OrderStat
21
21
  */
22
22
  var OrderStatus;
23
23
  (function (OrderStatus) {
24
- OrderStatus["WAITINGFORACCEPTANCE"] = "WAITING_FOR_ACCEPTANCE";
25
- OrderStatus["ACCEPTANCEDELAY"] = "ACCEPTANCE_DELAY";
24
+ OrderStatus["WAITINGFORSELLERACCEPTANCE"] = "WAITING_FOR_SELLER_ACCEPTANCE";
25
+ OrderStatus["WAITINGFORBUYERACCEPTANCE"] = "WAITING_FOR_BUYER_ACCEPTANCE";
26
+ OrderStatus["SELLERACCEPTANCEDELAY"] = "SELLER_ACCEPTANCE_DELAY";
27
+ OrderStatus["BUYERACCEPTANCEDELAY"] = "BUYER_ACCEPTANCE_DELAY";
26
28
  OrderStatus["WAITINGFORSENDING"] = "WAITING_FOR_SENDING";
27
29
  OrderStatus["SENDINGDELAY"] = "SENDING_DELAY";
28
30
  OrderStatus["DELIVERYONGOING"] = "DELIVERY_ONGOING";
@@ -0,0 +1,24 @@
1
+ /**
2
+ * lcdp-monolith-service
3
+ * This is the REST API of LCDP orders
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
+ * Reason of the status change or current status. Note that if you do not give any reason during status change, field will be set to OTHER
14
+ * @export
15
+ * @enum {string}
16
+ */
17
+ export declare enum OrderStatusReason {
18
+ MAXQUANTITY = "MAX_QUANTITY",
19
+ OUTDATEDAD = "OUTDATED_AD",
20
+ OTHER = "OTHER"
21
+ }
22
+ export declare function OrderStatusReasonFromJSON(json: any): OrderStatusReason;
23
+ export declare function OrderStatusReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderStatusReason;
24
+ export declare function OrderStatusReasonToJSON(value?: OrderStatusReason | null): any;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-monolith-service
6
+ * This is the REST API of LCDP orders
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.OrderStatusReasonToJSON = exports.OrderStatusReasonFromJSONTyped = exports.OrderStatusReasonFromJSON = exports.OrderStatusReason = void 0;
17
+ /**
18
+ * Reason of the status change or current status. Note that if you do not give any reason during status change, field will be set to OTHER
19
+ * @export
20
+ * @enum {string}
21
+ */
22
+ var OrderStatusReason;
23
+ (function (OrderStatusReason) {
24
+ OrderStatusReason["MAXQUANTITY"] = "MAX_QUANTITY";
25
+ OrderStatusReason["OUTDATEDAD"] = "OUTDATED_AD";
26
+ OrderStatusReason["OTHER"] = "OTHER";
27
+ })(OrderStatusReason = exports.OrderStatusReason || (exports.OrderStatusReason = {}));
28
+ function OrderStatusReasonFromJSON(json) {
29
+ return OrderStatusReasonFromJSONTyped(json, false);
30
+ }
31
+ exports.OrderStatusReasonFromJSON = OrderStatusReasonFromJSON;
32
+ function OrderStatusReasonFromJSONTyped(json, ignoreDiscriminator) {
33
+ return json;
34
+ }
35
+ exports.OrderStatusReasonFromJSONTyped = OrderStatusReasonFromJSONTyped;
36
+ function OrderStatusReasonToJSON(value) {
37
+ return value;
38
+ }
39
+ exports.OrderStatusReasonToJSON = OrderStatusReasonToJSON;
@@ -9,12 +9,32 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { OrderStatusReason } from './OrderStatusReason';
13
+ import { UpdateOrderStatusParameters } from './UpdateOrderStatusParameters';
12
14
  /**
13
15
  *
14
16
  * @export
15
17
  * @interface OrderUpdateParameters
16
18
  */
17
19
  export interface OrderUpdateParameters {
20
+ /**
21
+ *
22
+ * @type {UpdateOrderStatusParameters}
23
+ * @memberof OrderUpdateParameters
24
+ */
25
+ status?: UpdateOrderStatusParameters;
26
+ /**
27
+ *
28
+ * @type {OrderStatusReason}
29
+ * @memberof OrderUpdateParameters
30
+ */
31
+ statusReason?: OrderStatusReason;
32
+ /**
33
+ * Smart sentence given detail about the new status
34
+ * @type {string}
35
+ * @memberof OrderUpdateParameters
36
+ */
37
+ statusComment?: string | null;
18
38
  /**
19
39
  * Labels of the order
20
40
  * @type {Array<string>}
@@ -15,6 +15,8 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OrderUpdateParametersToJSON = exports.OrderUpdateParametersFromJSONTyped = exports.OrderUpdateParametersFromJSON = void 0;
17
17
  var runtime_1 = require("../runtime");
18
+ var OrderStatusReason_1 = require("./OrderStatusReason");
19
+ var UpdateOrderStatusParameters_1 = require("./UpdateOrderStatusParameters");
18
20
  function OrderUpdateParametersFromJSON(json) {
19
21
  return OrderUpdateParametersFromJSONTyped(json, false);
20
22
  }
@@ -24,6 +26,9 @@ function OrderUpdateParametersFromJSONTyped(json, ignoreDiscriminator) {
24
26
  return json;
25
27
  }
26
28
  return {
29
+ 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : (0, UpdateOrderStatusParameters_1.UpdateOrderStatusParametersFromJSON)(json['status']),
30
+ 'statusReason': !(0, runtime_1.exists)(json, 'statusReason') ? undefined : (0, OrderStatusReason_1.OrderStatusReasonFromJSON)(json['statusReason']),
31
+ 'statusComment': !(0, runtime_1.exists)(json, 'statusComment') ? json['statusComment'] : json['statusComment'],
27
32
  'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
28
33
  };
29
34
  }
@@ -36,6 +41,9 @@ function OrderUpdateParametersToJSON(value) {
36
41
  return null;
37
42
  }
38
43
  return {
44
+ 'status': (0, UpdateOrderStatusParameters_1.UpdateOrderStatusParametersToJSON)(value.status),
45
+ 'statusReason': (0, OrderStatusReason_1.OrderStatusReasonToJSON)(value.statusReason),
46
+ 'statusComment': value.statusComment,
39
47
  'tags': value.tags,
40
48
  };
41
49
  }