@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 ManageOrderApi = /** @class */ (function (_super) {
81
81
  */
82
82
  ManageOrderApi.prototype.createOrderRaw = 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.from === null || requestParameters.from === undefined) {
89
89
  throw new runtime_1.RequiredError('from', 'Required parameter requestParameters.from was null or undefined when calling createOrder.');
@@ -96,24 +96,32 @@ var ManageOrderApi = /** @class */ (function (_super) {
96
96
  if (this.configuration && this.configuration.apiKey) {
97
97
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
98
98
  }
99
- if (this.configuration && this.configuration.accessToken) {
100
- token = this.configuration.accessToken;
101
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
102
- if (tokenString) {
103
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
104
- }
105
- }
106
- _a.label = 1;
99
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
100
+ token = this.configuration.accessToken;
101
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
102
+ return [4 /*yield*/, token("bearerAuth", [])];
107
103
  case 1:
108
- _a.trys.push([1, 3, , 4]);
104
+ _a = _b.sent();
105
+ return [3 /*break*/, 3];
106
+ case 2:
107
+ _a = token;
108
+ _b.label = 3;
109
+ case 3:
110
+ tokenString = _a;
111
+ if (tokenString) {
112
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
113
+ }
114
+ _b.label = 4;
115
+ case 4:
116
+ _b.trys.push([4, 6, , 7]);
109
117
  return [4 /*yield*/, this.request({
110
118
  path: "/orders",
111
119
  method: 'POST',
112
120
  headers: headerParameters,
113
121
  query: queryParameters,
114
122
  })];
115
- case 2:
116
- response = _a.sent();
123
+ case 5:
124
+ response = _b.sent();
117
125
  contentType = response.headers.get("content-type");
118
126
  if (contentType && contentType.indexOf("application/json") !== -1) {
119
127
  return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderFromJSON)(jsonValue); })];
@@ -125,12 +133,12 @@ var ManageOrderApi = /** @class */ (function (_super) {
125
133
  // TODO : Better handling of others application types
126
134
  return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
127
135
  }
128
- return [3 /*break*/, 4];
129
- case 3:
130
- response_1 = _a.sent();
136
+ return [3 /*break*/, 7];
137
+ case 6:
138
+ response_1 = _b.sent();
131
139
  console.debug(response_1);
132
140
  throw response_1;
133
- case 4: return [2 /*return*/];
141
+ case 7: return [2 /*return*/];
134
142
  }
135
143
  });
136
144
  });
@@ -154,14 +162,14 @@ var ManageOrderApi = /** @class */ (function (_super) {
154
162
  });
155
163
  };
156
164
  /**
157
- * Set the accepted flag for order identified by OrderId. # Preconditions : - \'paused\' property is false - Status in (WAITING_FOR_ACCEPTANCE, ACCEPTANCE_DELAY) - \'accepted\' property is false (Limitation that may be removed in the future) - You are the SELLER
165
+ * Set the accepted flag for order identified by OrderId. # Preconditions : ## Common - \'paused\' property is false - \'accepted\' property is false (Limitation that may be removed in the future) - Status in (WAITING_FOR_SELLER_ACCEPTANCE, WAITING_FOR_BUYER_ACCEPTANCE, SELLER_ACCEPTANCE_DELAY, BUYER_ACCEPTANCE_DELAY) ## As seller - Status in (WAITING_FOR_SELLER_ACCEPTANCE, SELLER_ACCEPTANCE_DELAY) ## As buyer - Status in (WAITING_FOR_BUYER_ACCEPTANCE, BUYER_ACCEPTANCE_DELAY) ## As admin - No additional
158
166
  * Set order accepted flag
159
167
  */
160
168
  ManageOrderApi.prototype.setOrderAcceptedRaw = function (requestParameters) {
161
169
  return __awaiter(this, void 0, void 0, function () {
162
- var queryParameters, headerParameters, token, tokenString, response, response_2;
163
- return __generator(this, function (_a) {
164
- switch (_a.label) {
170
+ var queryParameters, headerParameters, token, tokenString, _a, response, response_2;
171
+ return __generator(this, function (_b) {
172
+ switch (_b.label) {
165
173
  case 0:
166
174
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
167
175
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling setOrderAccepted.');
@@ -172,19 +180,30 @@ var ManageOrderApi = /** @class */ (function (_super) {
172
180
  queryParameters = {};
173
181
  headerParameters = {};
174
182
  headerParameters['Content-Type'] = 'application/json';
183
+ if (requestParameters.ifMatch !== undefined && requestParameters.ifMatch !== null) {
184
+ headerParameters['If-Match'] = String(requestParameters.ifMatch);
185
+ }
175
186
  if (this.configuration && this.configuration.apiKey) {
176
187
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
177
188
  }
178
- if (this.configuration && this.configuration.accessToken) {
179
- token = this.configuration.accessToken;
180
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
181
- if (tokenString) {
182
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
183
- }
184
- }
185
- _a.label = 1;
189
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
190
+ token = this.configuration.accessToken;
191
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
192
+ return [4 /*yield*/, token("bearerAuth", [])];
186
193
  case 1:
187
- _a.trys.push([1, 3, , 4]);
194
+ _a = _b.sent();
195
+ return [3 /*break*/, 3];
196
+ case 2:
197
+ _a = token;
198
+ _b.label = 3;
199
+ case 3:
200
+ tokenString = _a;
201
+ if (tokenString) {
202
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
203
+ }
204
+ _b.label = 4;
205
+ case 4:
206
+ _b.trys.push([4, 6, , 7]);
188
207
  return [4 /*yield*/, this.request({
189
208
  path: "/orders/{orderReference}/accepted".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
190
209
  method: 'PUT',
@@ -192,20 +211,20 @@ var ManageOrderApi = /** @class */ (function (_super) {
192
211
  query: queryParameters,
193
212
  body: requestParameters.body,
194
213
  })];
195
- case 2:
196
- response = _a.sent();
214
+ case 5:
215
+ response = _b.sent();
197
216
  return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
198
- case 3:
199
- response_2 = _a.sent();
217
+ case 6:
218
+ response_2 = _b.sent();
200
219
  console.debug(response_2);
201
220
  throw response_2;
202
- case 4: return [2 /*return*/];
221
+ case 7: return [2 /*return*/];
203
222
  }
204
223
  });
205
224
  });
206
225
  };
207
226
  /**
208
- * Set the accepted flag for order identified by OrderId. # Preconditions : - \'paused\' property is false - Status in (WAITING_FOR_ACCEPTANCE, ACCEPTANCE_DELAY) - \'accepted\' property is false (Limitation that may be removed in the future) - You are the SELLER
227
+ * Set the accepted flag for order identified by OrderId. # Preconditions : ## Common - \'paused\' property is false - \'accepted\' property is false (Limitation that may be removed in the future) - Status in (WAITING_FOR_SELLER_ACCEPTANCE, WAITING_FOR_BUYER_ACCEPTANCE, SELLER_ACCEPTANCE_DELAY, BUYER_ACCEPTANCE_DELAY) ## As seller - Status in (WAITING_FOR_SELLER_ACCEPTANCE, SELLER_ACCEPTANCE_DELAY) ## As buyer - Status in (WAITING_FOR_BUYER_ACCEPTANCE, BUYER_ACCEPTANCE_DELAY) ## As admin - No additional
209
228
  * Set order accepted flag
210
229
  */
211
230
  ManageOrderApi.prototype.setOrderAccepted = function (requestParameters) {
@@ -226,9 +245,9 @@ var ManageOrderApi = /** @class */ (function (_super) {
226
245
  */
227
246
  ManageOrderApi.prototype.setOrderDeliveryConfirmedRaw = function (requestParameters) {
228
247
  return __awaiter(this, void 0, void 0, function () {
229
- var queryParameters, headerParameters, token, tokenString, response, response_3;
230
- return __generator(this, function (_a) {
231
- switch (_a.label) {
248
+ var queryParameters, headerParameters, token, tokenString, _a, response, response_3;
249
+ return __generator(this, function (_b) {
250
+ switch (_b.label) {
232
251
  case 0:
233
252
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
234
253
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling setOrderDeliveryConfirmed.');
@@ -242,16 +261,24 @@ var ManageOrderApi = /** @class */ (function (_super) {
242
261
  if (this.configuration && this.configuration.apiKey) {
243
262
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
244
263
  }
245
- if (this.configuration && this.configuration.accessToken) {
246
- token = this.configuration.accessToken;
247
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
248
- if (tokenString) {
249
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
250
- }
251
- }
252
- _a.label = 1;
264
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
265
+ token = this.configuration.accessToken;
266
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
267
+ return [4 /*yield*/, token("bearerAuth", [])];
253
268
  case 1:
254
- _a.trys.push([1, 3, , 4]);
269
+ _a = _b.sent();
270
+ return [3 /*break*/, 3];
271
+ case 2:
272
+ _a = token;
273
+ _b.label = 3;
274
+ case 3:
275
+ tokenString = _a;
276
+ if (tokenString) {
277
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
278
+ }
279
+ _b.label = 4;
280
+ case 4:
281
+ _b.trys.push([4, 6, , 7]);
255
282
  return [4 /*yield*/, this.request({
256
283
  path: "/orders/{orderReference}/delivery-confirmed".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
257
284
  method: 'PUT',
@@ -259,14 +286,14 @@ var ManageOrderApi = /** @class */ (function (_super) {
259
286
  query: queryParameters,
260
287
  body: requestParameters.body,
261
288
  })];
262
- case 2:
263
- response = _a.sent();
289
+ case 5:
290
+ response = _b.sent();
264
291
  return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
265
- case 3:
266
- response_3 = _a.sent();
292
+ case 6:
293
+ response_3 = _b.sent();
267
294
  console.debug(response_3);
268
295
  throw response_3;
269
- case 4: return [2 /*return*/];
296
+ case 7: return [2 /*return*/];
270
297
  }
271
298
  });
272
299
  });
@@ -293,9 +320,9 @@ var ManageOrderApi = /** @class */ (function (_super) {
293
320
  */
294
321
  ManageOrderApi.prototype.setOrderInLitigationRaw = function (requestParameters) {
295
322
  return __awaiter(this, void 0, void 0, function () {
296
- var queryParameters, headerParameters, token, tokenString, response, response_4;
297
- return __generator(this, function (_a) {
298
- switch (_a.label) {
323
+ var queryParameters, headerParameters, token, tokenString, _a, response, response_4;
324
+ return __generator(this, function (_b) {
325
+ switch (_b.label) {
299
326
  case 0:
300
327
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
301
328
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling setOrderInLitigation.');
@@ -309,16 +336,24 @@ var ManageOrderApi = /** @class */ (function (_super) {
309
336
  if (this.configuration && this.configuration.apiKey) {
310
337
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
311
338
  }
312
- if (this.configuration && this.configuration.accessToken) {
313
- token = this.configuration.accessToken;
314
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
315
- if (tokenString) {
316
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
317
- }
318
- }
319
- _a.label = 1;
339
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
340
+ token = this.configuration.accessToken;
341
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
342
+ return [4 /*yield*/, token("bearerAuth", [])];
320
343
  case 1:
321
- _a.trys.push([1, 3, , 4]);
344
+ _a = _b.sent();
345
+ return [3 /*break*/, 3];
346
+ case 2:
347
+ _a = token;
348
+ _b.label = 3;
349
+ case 3:
350
+ tokenString = _a;
351
+ if (tokenString) {
352
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
353
+ }
354
+ _b.label = 4;
355
+ case 4:
356
+ _b.trys.push([4, 6, , 7]);
322
357
  return [4 /*yield*/, this.request({
323
358
  path: "/orders/{orderReference}/in-litigation".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
324
359
  method: 'PUT',
@@ -326,14 +361,14 @@ var ManageOrderApi = /** @class */ (function (_super) {
326
361
  query: queryParameters,
327
362
  body: requestParameters.body,
328
363
  })];
329
- case 2:
330
- response = _a.sent();
364
+ case 5:
365
+ response = _b.sent();
331
366
  return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
332
- case 3:
333
- response_4 = _a.sent();
367
+ case 6:
368
+ response_4 = _b.sent();
334
369
  console.debug(response_4);
335
370
  throw response_4;
336
- case 4: return [2 /*return*/];
371
+ case 7: return [2 /*return*/];
337
372
  }
338
373
  });
339
374
  });
@@ -360,9 +395,9 @@ var ManageOrderApi = /** @class */ (function (_super) {
360
395
  */
361
396
  ManageOrderApi.prototype.setOrderPausedRaw = function (requestParameters) {
362
397
  return __awaiter(this, void 0, void 0, function () {
363
- var queryParameters, headerParameters, token, tokenString, response, response_5;
364
- return __generator(this, function (_a) {
365
- switch (_a.label) {
398
+ var queryParameters, headerParameters, token, tokenString, _a, response, response_5;
399
+ return __generator(this, function (_b) {
400
+ switch (_b.label) {
366
401
  case 0:
367
402
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
368
403
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling setOrderPaused.');
@@ -376,16 +411,24 @@ var ManageOrderApi = /** @class */ (function (_super) {
376
411
  if (this.configuration && this.configuration.apiKey) {
377
412
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
378
413
  }
379
- if (this.configuration && this.configuration.accessToken) {
380
- token = this.configuration.accessToken;
381
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
382
- if (tokenString) {
383
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
384
- }
385
- }
386
- _a.label = 1;
414
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
415
+ token = this.configuration.accessToken;
416
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
417
+ return [4 /*yield*/, token("bearerAuth", [])];
387
418
  case 1:
388
- _a.trys.push([1, 3, , 4]);
419
+ _a = _b.sent();
420
+ return [3 /*break*/, 3];
421
+ case 2:
422
+ _a = token;
423
+ _b.label = 3;
424
+ case 3:
425
+ tokenString = _a;
426
+ if (tokenString) {
427
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
428
+ }
429
+ _b.label = 4;
430
+ case 4:
431
+ _b.trys.push([4, 6, , 7]);
389
432
  return [4 /*yield*/, this.request({
390
433
  path: "/orders/{orderReference}/paused".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
391
434
  method: 'PUT',
@@ -393,14 +436,14 @@ var ManageOrderApi = /** @class */ (function (_super) {
393
436
  query: queryParameters,
394
437
  body: requestParameters.body,
395
438
  })];
396
- case 2:
397
- response = _a.sent();
439
+ case 5:
440
+ response = _b.sent();
398
441
  return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
399
- case 3:
400
- response_5 = _a.sent();
442
+ case 6:
443
+ response_5 = _b.sent();
401
444
  console.debug(response_5);
402
445
  throw response_5;
403
- case 4: return [2 /*return*/];
446
+ case 7: return [2 /*return*/];
404
447
  }
405
448
  });
406
449
  });
@@ -422,13 +465,14 @@ var ManageOrderApi = /** @class */ (function (_super) {
422
465
  });
423
466
  };
424
467
  /**
468
+ * # Preconditions : ## tags - You are an admin ## statusReason / statusCause - You are the user who set the status or you are currently setting the status ## Status (As Admin) - Always possible ## Status (As Seller) - CANCELED: > Current status in (WAITING_FOR_SELLER_ACCEPTANCE, WAITING_FOR_BUYER_ACCEPTANCE, SELLER_ACCEPTANCE_DELAY, BUYER_ACCEPTANCE_DELAY) - OTHERS: > Not authorized ## Status (As buyer) - CANCELED: > Current status in (WAITING_FOR_SELLER_ACCEPTANCE, WAITING_FOR_BUYER_ACCEPTANCE, SELLER_ACCEPTANCE_DELAY, BUYER_ACCEPTANCE_DELAY) - OTHERS: > Not authorized
425
469
  * Update an order
426
470
  */
427
471
  ManageOrderApi.prototype.updateOrderRaw = function (requestParameters) {
428
472
  return __awaiter(this, void 0, void 0, function () {
429
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_6;
430
- return __generator(this, function (_a) {
431
- switch (_a.label) {
473
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_6;
474
+ return __generator(this, function (_b) {
475
+ switch (_b.label) {
432
476
  case 0:
433
477
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
434
478
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling updateOrder.');
@@ -439,16 +483,24 @@ var ManageOrderApi = /** @class */ (function (_super) {
439
483
  if (this.configuration && this.configuration.apiKey) {
440
484
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
441
485
  }
442
- if (this.configuration && this.configuration.accessToken) {
443
- token = this.configuration.accessToken;
444
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
445
- if (tokenString) {
446
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
447
- }
448
- }
449
- _a.label = 1;
486
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
487
+ token = this.configuration.accessToken;
488
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
489
+ return [4 /*yield*/, token("bearerAuth", [])];
450
490
  case 1:
451
- _a.trys.push([1, 3, , 4]);
491
+ _a = _b.sent();
492
+ return [3 /*break*/, 3];
493
+ case 2:
494
+ _a = token;
495
+ _b.label = 3;
496
+ case 3:
497
+ tokenString = _a;
498
+ if (tokenString) {
499
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
500
+ }
501
+ _b.label = 4;
502
+ case 4:
503
+ _b.trys.push([4, 6, , 7]);
452
504
  return [4 /*yield*/, this.request({
453
505
  path: "/orders/{orderReference}".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
454
506
  method: 'PATCH',
@@ -456,8 +508,8 @@ var ManageOrderApi = /** @class */ (function (_super) {
456
508
  query: queryParameters,
457
509
  body: (0, models_1.OrderUpdateParametersToJSON)(requestParameters.orderUpdateParameters),
458
510
  })];
459
- case 2:
460
- response = _a.sent();
511
+ case 5:
512
+ response = _b.sent();
461
513
  contentType = response.headers.get("content-type");
462
514
  if (contentType && contentType.indexOf("application/json") !== -1) {
463
515
  return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderFromJSON)(jsonValue); })];
@@ -469,17 +521,18 @@ var ManageOrderApi = /** @class */ (function (_super) {
469
521
  // TODO : Better handling of others application types
470
522
  return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
471
523
  }
472
- return [3 /*break*/, 4];
473
- case 3:
474
- response_6 = _a.sent();
524
+ return [3 /*break*/, 7];
525
+ case 6:
526
+ response_6 = _b.sent();
475
527
  console.debug(response_6);
476
528
  throw response_6;
477
- case 4: return [2 /*return*/];
529
+ case 7: return [2 /*return*/];
478
530
  }
479
531
  });
480
532
  });
481
533
  };
482
534
  /**
535
+ * # Preconditions : ## tags - You are an admin ## statusReason / statusCause - You are the user who set the status or you are currently setting the status ## Status (As Admin) - Always possible ## Status (As Seller) - CANCELED: > Current status in (WAITING_FOR_SELLER_ACCEPTANCE, WAITING_FOR_BUYER_ACCEPTANCE, SELLER_ACCEPTANCE_DELAY, BUYER_ACCEPTANCE_DELAY) - OTHERS: > Not authorized ## Status (As buyer) - CANCELED: > Current status in (WAITING_FOR_SELLER_ACCEPTANCE, WAITING_FOR_BUYER_ACCEPTANCE, SELLER_ACCEPTANCE_DELAY, BUYER_ACCEPTANCE_DELAY) - OTHERS: > Not authorized
483
536
  * Update an order
484
537
  */
485
538
  ManageOrderApi.prototype.updateOrder = function (requestParameters) {
@@ -501,9 +554,9 @@ var ManageOrderApi = /** @class */ (function (_super) {
501
554
  */
502
555
  ManageOrderApi.prototype.updateOrderAnomaliesRaw = function (requestParameters) {
503
556
  return __awaiter(this, void 0, void 0, function () {
504
- var queryParameters, headerParameters, token, tokenString, response, response_7;
505
- return __generator(this, function (_a) {
506
- switch (_a.label) {
557
+ var queryParameters, headerParameters, token, tokenString, _a, response, response_7;
558
+ return __generator(this, function (_b) {
559
+ switch (_b.label) {
507
560
  case 0:
508
561
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
509
562
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling updateOrderAnomalies.');
@@ -517,16 +570,24 @@ var ManageOrderApi = /** @class */ (function (_super) {
517
570
  if (this.configuration && this.configuration.apiKey) {
518
571
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
519
572
  }
520
- if (this.configuration && this.configuration.accessToken) {
521
- token = this.configuration.accessToken;
522
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
523
- if (tokenString) {
524
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
525
- }
526
- }
527
- _a.label = 1;
573
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
574
+ token = this.configuration.accessToken;
575
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
576
+ return [4 /*yield*/, token("bearerAuth", [])];
528
577
  case 1:
529
- _a.trys.push([1, 3, , 4]);
578
+ _a = _b.sent();
579
+ return [3 /*break*/, 3];
580
+ case 2:
581
+ _a = token;
582
+ _b.label = 3;
583
+ case 3:
584
+ tokenString = _a;
585
+ if (tokenString) {
586
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
587
+ }
588
+ _b.label = 4;
589
+ case 4:
590
+ _b.trys.push([4, 6, , 7]);
530
591
  return [4 /*yield*/, this.request({
531
592
  path: "/orders/{orderReference}/anomalies".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
532
593
  method: 'PATCH',
@@ -534,14 +595,14 @@ var ManageOrderApi = /** @class */ (function (_super) {
534
595
  query: queryParameters,
535
596
  body: (0, models_1.AnomaliesUpdateParametersToJSON)(requestParameters.anomaliesUpdateParameters),
536
597
  })];
537
- case 2:
538
- response = _a.sent();
598
+ case 5:
599
+ response = _b.sent();
539
600
  return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
540
- case 3:
541
- response_7 = _a.sent();
601
+ case 6:
602
+ response_7 = _b.sent();
542
603
  console.debug(response_7);
543
604
  throw response_7;
544
- case 4: return [2 /*return*/];
605
+ case 7: return [2 /*return*/];
545
606
  }
546
607
  });
547
608
  });
@@ -567,9 +628,9 @@ var ManageOrderApi = /** @class */ (function (_super) {
567
628
  */
568
629
  ManageOrderApi.prototype.updateOrderReservationRaw = function (requestParameters) {
569
630
  return __awaiter(this, void 0, void 0, function () {
570
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_8;
571
- return __generator(this, function (_a) {
572
- switch (_a.label) {
631
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_8;
632
+ return __generator(this, function (_b) {
633
+ switch (_b.label) {
573
634
  case 0:
574
635
  if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
575
636
  throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling updateOrderReservation.');
@@ -586,16 +647,24 @@ var ManageOrderApi = /** @class */ (function (_super) {
586
647
  if (this.configuration && this.configuration.apiKey) {
587
648
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
588
649
  }
589
- if (this.configuration && this.configuration.accessToken) {
590
- token = this.configuration.accessToken;
591
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
592
- if (tokenString) {
593
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
594
- }
595
- }
596
- _a.label = 1;
650
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
651
+ token = this.configuration.accessToken;
652
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
653
+ return [4 /*yield*/, token("bearerAuth", [])];
597
654
  case 1:
598
- _a.trys.push([1, 3, , 4]);
655
+ _a = _b.sent();
656
+ return [3 /*break*/, 3];
657
+ case 2:
658
+ _a = token;
659
+ _b.label = 3;
660
+ case 3:
661
+ tokenString = _a;
662
+ if (tokenString) {
663
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
664
+ }
665
+ _b.label = 4;
666
+ case 4:
667
+ _b.trys.push([4, 6, , 7]);
599
668
  return [4 /*yield*/, this.request({
600
669
  path: "/orders/{orderReference}/reservations/{reservationId}".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))).replace("{".concat("reservationId", "}"), encodeURIComponent(String(requestParameters.reservationId))),
601
670
  method: 'PATCH',
@@ -603,8 +672,8 @@ var ManageOrderApi = /** @class */ (function (_super) {
603
672
  query: queryParameters,
604
673
  body: (0, models_1.ReservationUpdateParametersToJSON)(requestParameters.reservationUpdateParameters),
605
674
  })];
606
- case 2:
607
- response = _a.sent();
675
+ case 5:
676
+ response = _b.sent();
608
677
  contentType = response.headers.get("content-type");
609
678
  if (contentType && contentType.indexOf("application/json") !== -1) {
610
679
  return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ReservationFromJSON)(jsonValue); })];
@@ -616,12 +685,12 @@ var ManageOrderApi = /** @class */ (function (_super) {
616
685
  // TODO : Better handling of others application types
617
686
  return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
618
687
  }
619
- return [3 /*break*/, 4];
620
- case 3:
621
- response_8 = _a.sent();
688
+ return [3 /*break*/, 7];
689
+ case 6:
690
+ response_8 = _b.sent();
622
691
  console.debug(response_8);
623
692
  throw response_8;
624
- case 4: return [2 /*return*/];
693
+ case 7: return [2 /*return*/];
625
694
  }
626
695
  });
627
696
  });
@@ -644,86 +713,6 @@ var ManageOrderApi = /** @class */ (function (_super) {
644
713
  });
645
714
  });
646
715
  };
647
- /**
648
- * Allow to update order status directly.
649
- * Update order status
650
- */
651
- ManageOrderApi.prototype.updateOrderStatusRaw = function (requestParameters) {
652
- return __awaiter(this, void 0, void 0, function () {
653
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_9;
654
- return __generator(this, function (_a) {
655
- switch (_a.label) {
656
- case 0:
657
- if (requestParameters.orderReference === null || requestParameters.orderReference === undefined) {
658
- throw new runtime_1.RequiredError('orderReference', 'Required parameter requestParameters.orderReference was null or undefined when calling updateOrderStatus.');
659
- }
660
- if (requestParameters.body === null || requestParameters.body === undefined) {
661
- throw new runtime_1.RequiredError('body', 'Required parameter requestParameters.body was null or undefined when calling updateOrderStatus.');
662
- }
663
- queryParameters = {};
664
- headerParameters = {};
665
- headerParameters['Content-Type'] = 'application/json';
666
- if (this.configuration && this.configuration.apiKey) {
667
- headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
668
- }
669
- if (this.configuration && this.configuration.accessToken) {
670
- token = this.configuration.accessToken;
671
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
672
- if (tokenString) {
673
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
674
- }
675
- }
676
- _a.label = 1;
677
- case 1:
678
- _a.trys.push([1, 3, , 4]);
679
- return [4 /*yield*/, this.request({
680
- path: "/orders/{orderReference}/status".replace("{".concat("orderReference", "}"), encodeURIComponent(String(requestParameters.orderReference))),
681
- method: 'PUT',
682
- headers: headerParameters,
683
- query: queryParameters,
684
- body: requestParameters.body,
685
- })];
686
- case 2:
687
- response = _a.sent();
688
- contentType = response.headers.get("content-type");
689
- if (contentType && contentType.indexOf("application/json") !== -1) {
690
- return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderStatusFromJSON)(jsonValue); })];
691
- }
692
- else if (contentType && contentType.indexOf("text/plain") !== -1) {
693
- return [2 /*return*/, new runtime_1.TextApiResponse(response)];
694
- }
695
- else {
696
- // TODO : Better handling of others application types
697
- return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
698
- }
699
- return [3 /*break*/, 4];
700
- case 3:
701
- response_9 = _a.sent();
702
- console.debug(response_9);
703
- throw response_9;
704
- case 4: return [2 /*return*/];
705
- }
706
- });
707
- });
708
- };
709
- /**
710
- * Allow to update order status directly.
711
- * Update order status
712
- */
713
- ManageOrderApi.prototype.updateOrderStatus = function (requestParameters) {
714
- return __awaiter(this, void 0, void 0, function () {
715
- var response;
716
- return __generator(this, function (_a) {
717
- switch (_a.label) {
718
- case 0: return [4 /*yield*/, this.updateOrderStatusRaw(requestParameters)];
719
- case 1:
720
- response = _a.sent();
721
- return [4 /*yield*/, response.value()];
722
- case 2: return [2 /*return*/, _a.sent()];
723
- }
724
- });
725
- });
726
- };
727
716
  return ManageOrderApi;
728
717
  }(runtime_1.BaseAPI));
729
718
  exports.ManageOrderApi = ManageOrderApi;