@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.
- package/auth/src/apis/AuthApi.js +51 -35
- package/auth/src/apis/ManageApiKeyApi.js +77 -53
- package/auth/src/apis/SearchApiKeyApi.js +52 -36
- package/auth/src/runtime.d.ts +2 -2
- package/auth/src/runtime.js +1 -1
- package/banking-operation/src/apis/ManageLevyApi.js +52 -36
- package/banking-operation/src/apis/ManageOrderPaymentApi.js +52 -36
- package/banking-operation/src/apis/SearchLevyApi.js +52 -36
- package/banking-operation/src/apis/SearchOrderPaymentApi.js +26 -18
- package/banking-operation/src/runtime.d.ts +2 -2
- package/banking-operation/src/runtime.js +1 -1
- package/catalog/src/apis/ManageProductInsightApi.js +77 -53
- package/catalog/src/apis/SearchProductInsightApi.js +52 -36
- package/catalog/src/runtime.d.ts +2 -2
- package/catalog/src/runtime.js +1 -1
- package/challenge/src/apis/ManageChallengesApi.js +26 -18
- package/challenge/src/runtime.d.ts +2 -2
- package/challenge/src/runtime.js +1 -1
- package/configuration/src/apis/ManageVariableApi.js +25 -17
- package/configuration/src/apis/ManageVatApi.js +51 -35
- package/configuration/src/apis/SearchVatApi.js +52 -36
- package/configuration/src/runtime.d.ts +2 -2
- package/configuration/src/runtime.js +1 -1
- package/content/src/apis/ManageContentApi.js +26 -18
- package/content/src/runtime.d.ts +2 -2
- package/content/src/runtime.js +1 -1
- package/factory/src/apis/ManageAssemblyApi.js +53 -35
- package/factory/src/apis/ManageAssemblyOperationApi.js +26 -18
- package/factory/src/apis/SearchAssemblyApi.js +104 -72
- package/factory/src/apis/SearchAssemblyLineApi.js +52 -36
- package/factory/src/apis/SearchAssemblyOperationApi.js +52 -36
- package/factory/src/runtime.d.ts +2 -2
- package/factory/src/runtime.js +1 -1
- package/favorite/src/apis/ManageFavoriteProductApi.js +103 -71
- package/favorite/src/runtime.d.ts +2 -2
- package/favorite/src/runtime.js +1 -1
- package/geo/src/apis/SearchCountryApi.js +26 -18
- package/geo/src/runtime.d.ts +2 -2
- package/geo/src/runtime.js +1 -1
- package/inventory/src/apis/ManageInventoryApi.js +126 -86
- package/inventory/src/apis/SearchInventoryApi.js +260 -180
- package/inventory/src/runtime.d.ts +2 -2
- package/inventory/src/runtime.js +1 -1
- package/invoice/src/apis/ManageInvoiceApi.js +52 -36
- package/invoice/src/apis/ManageInvoiceLineApi.js +51 -35
- package/invoice/src/apis/ManageInvoicesSummaryApi.js +25 -17
- package/invoice/src/apis/SearchInvoiceApi.js +52 -36
- package/invoice/src/apis/SearchInvoiceLineApi.js +26 -18
- package/invoice/src/apis/SearchOrderTallyApi.js +52 -36
- package/invoice/src/runtime.d.ts +2 -2
- package/invoice/src/runtime.js +1 -1
- package/laboratory/src/apis/ManageLaboratoryApi.js +26 -18
- package/laboratory/src/apis/SearchLaboratoryApi.js +52 -36
- package/laboratory/src/runtime.d.ts +2 -2
- package/laboratory/src/runtime.js +1 -1
- package/laboratory-store/src/apis/ManageLaboratoryStoreApi.js +52 -36
- package/laboratory-store/src/apis/ManageLaboratoryStoreImageApi.js +106 -70
- package/laboratory-store/src/apis/SearchLaboratoryStoreApi.js +52 -36
- package/laboratory-store/src/runtime.d.ts +2 -2
- package/laboratory-store/src/runtime.js +1 -1
- package/laboratory-store-log/src/apis/SearchLaboratoryStoreLogApi.js +26 -18
- package/laboratory-store-log/src/runtime.d.ts +2 -2
- package/laboratory-store-log/src/runtime.js +1 -1
- package/lexicon/src/apis/ManageLexiconApi.js +51 -35
- package/lexicon/src/apis/SearchLexiconApi.js +104 -72
- package/lexicon/src/runtime.d.ts +2 -2
- package/lexicon/src/runtime.js +1 -1
- package/litigation/src/apis/ManageLitigationApi.js +25 -17
- package/litigation/src/runtime.d.ts +2 -2
- package/litigation/src/runtime.js +1 -1
- package/magic-cart/src/apis/ManageExpressOrderApi.js +26 -18
- package/magic-cart/src/runtime.d.ts +2 -2
- package/magic-cart/src/runtime.js +1 -1
- package/mandate/src/apis/ManageMandatesApi.js +103 -71
- package/mandate/src/runtime.d.ts +2 -2
- package/mandate/src/runtime.js +1 -1
- package/mangopay-hook/src/runtime.d.ts +2 -2
- package/mangopay-hook/src/runtime.js +1 -1
- package/message/src/apis/ManageMessageApi.js +127 -87
- package/message/src/apis/SearchMessageApi.js +78 -54
- package/message/src/runtime.d.ts +2 -2
- package/message/src/runtime.js +1 -1
- package/notification/src/apis/ManageNotificationApi.js +51 -35
- package/notification/src/apis/ManageNotificationTypeApi.js +79 -53
- package/notification/src/apis/SearchNotificationApi.js +52 -36
- package/notification/src/apis/SearchNotificationTypeApi.js +78 -54
- package/notification/src/models/NotificationTypeId.d.ts +2 -0
- package/notification/src/models/NotificationTypeId.js +2 -0
- package/notification/src/runtime.d.ts +2 -2
- package/notification/src/runtime.js +1 -1
- package/order/src/apis/ManageMetaOrderApi.js +51 -35
- package/order/src/apis/ManageOrderApi.d.ts +6 -17
- package/order/src/apis/ManageOrderApi.js +210 -221
- package/order/src/apis/ManageOrderItemApi.d.ts +4 -4
- package/order/src/apis/ManageOrderItemApi.js +132 -92
- package/order/src/apis/SearchOrderApi.js +104 -72
- package/order/src/apis/SearchOrderItemApi.d.ts +2 -0
- package/order/src/apis/SearchOrderItemApi.js +132 -90
- package/order/src/models/Order.d.ts +14 -1
- package/order/src/models/Order.js +5 -0
- package/order/src/models/OrderJournal.d.ts +13 -0
- package/order/src/models/OrderJournal.js +6 -0
- package/order/src/models/OrderStatus.d.ts +4 -2
- package/order/src/models/OrderStatus.js +4 -2
- package/order/src/models/OrderStatusReason.d.ts +24 -0
- package/order/src/models/OrderStatusReason.js +39 -0
- package/order/src/models/OrderUpdateParameters.d.ts +20 -0
- package/order/src/models/OrderUpdateParameters.js +8 -0
- package/order/src/models/UpdateOrderStatusParameters.d.ts +3 -5
- package/order/src/models/UpdateOrderStatusParameters.js +2 -4
- package/order/src/models/index.d.ts +1 -0
- package/order/src/models/index.js +1 -0
- package/order/src/runtime.d.ts +2 -2
- package/order/src/runtime.js +1 -1
- package/order-log/src/apis/SearchOrderLogApi.js +26 -18
- package/order-log/src/models/OrderLog.d.ts +19 -0
- package/order-log/src/models/OrderLog.js +3 -2
- package/order-log/src/models/OrderLogAllOf.d.ts +19 -0
- package/order-log/src/models/OrderLogAllOf.js +7 -0
- package/order-log/src/models/OrderStatusReason.d.ts +24 -0
- package/order-log/src/models/OrderStatusReason.js +39 -0
- package/order-log/src/models/index.d.ts +1 -0
- package/order-log/src/models/index.js +1 -0
- package/order-log/src/runtime.d.ts +2 -2
- package/order-log/src/runtime.js +1 -1
- package/outrage-message/src/apis/ManageOutrageMessageApi.js +77 -53
- package/outrage-message/src/apis/SearchOutrageMessageApi.js +52 -36
- package/outrage-message/src/runtime.d.ts +2 -2
- package/outrage-message/src/runtime.js +1 -1
- package/package.json +1 -1
- package/product/src/apis/ManageProductApi.js +52 -36
- package/product/src/apis/ManageProductImageApi.js +52 -34
- package/product/src/apis/ManageProductProscriptionApi.js +51 -35
- package/product/src/apis/SearchProductApi.js +52 -36
- package/product/src/apis/SearchProductImageApi.js +52 -36
- package/product/src/apis/SearchProductMetadataApi.js +104 -72
- package/product/src/apis/SearchProductProscriptionApi.js +26 -18
- package/product/src/runtime.d.ts +2 -2
- package/product/src/runtime.js +1 -1
- package/pub/src/apis/ManagePubApi.js +102 -70
- package/pub/src/apis/ManagePubImageApi.js +28 -18
- package/pub/src/apis/SearchPubApi.js +78 -54
- package/pub/src/runtime.d.ts +2 -2
- package/pub/src/runtime.js +1 -1
- package/recommendation/src/apis/SearchFavoriteProductRecommendationApi.js +26 -18
- package/recommendation/src/apis/SearchProductPriceRecommendationApi.js +26 -18
- package/recommendation/src/apis/SearchProductRecommendationApi.js +26 -18
- package/recommendation/src/runtime.d.ts +2 -2
- package/recommendation/src/runtime.js +1 -1
- package/rfx/src/apis/ManageRfiApi.js +25 -17
- package/rfx/src/apis/ManageRfilApi.js +25 -17
- package/rfx/src/apis/ManageRfoApi.js +25 -17
- package/rfx/src/apis/ManageRfoiApi.js +52 -36
- package/rfx/src/apis/SearchRfoiApi.js +26 -18
- package/rfx/src/runtime.d.ts +2 -2
- package/rfx/src/runtime.js +1 -1
- package/sale-offer/src/apis/ManageSaleOfferApi.js +153 -105
- package/sale-offer/src/apis/SearchSaleOfferApi.js +52 -36
- package/sale-offer/src/runtime.d.ts +2 -2
- package/sale-offer/src/runtime.js +1 -1
- package/sale-offer-log/src/apis/SearchSaleOfferLogApi.js +26 -18
- package/sale-offer-log/src/runtime.d.ts +2 -2
- package/sale-offer-log/src/runtime.js +1 -1
- package/servant/src/apis/ManageTaskApi.js +25 -17
- package/servant/src/apis/SearchServantApi.js +26 -18
- package/servant/src/runtime.d.ts +2 -2
- package/servant/src/runtime.js +1 -1
- package/shipment/src/apis/ManageOrderCarriageApi.js +26 -18
- package/shipment/src/apis/ManageShipmentApi.js +52 -36
- package/shipment/src/apis/SearchOrderCarriageApi.js +52 -36
- package/shipment/src/runtime.d.ts +2 -2
- package/shipment/src/runtime.js +1 -1
- package/shopping-cart/src/apis/ManageCartApi.js +52 -36
- package/shopping-cart/src/apis/ManageCartSubCartApi.js +77 -53
- package/shopping-cart/src/apis/ManageCartSubCartLineApi.js +128 -88
- package/shopping-cart/src/runtime.d.ts +2 -2
- package/shopping-cart/src/runtime.js +1 -1
- package/statistic/src/apis/SearchSaleOfferStatisticsApi.js +52 -36
- package/statistic/src/runtime.d.ts +2 -2
- package/statistic/src/runtime.js +1 -1
- package/subscription/src/apis/ManageSubscriptionApi.js +77 -53
- package/subscription/src/apis/ManageSubscriptionPlanApi.js +26 -18
- package/subscription/src/apis/SearchSubscriptionApi.js +26 -18
- package/subscription/src/apis/SearchSubscriptionPlanApi.js +52 -36
- package/subscription/src/apis/SearchSubscriptionPlanFeatureApi.js +26 -18
- package/subscription/src/runtime.d.ts +2 -2
- package/subscription/src/runtime.js +1 -1
- package/thread/src/apis/ManageThreadCommentApi.js +52 -36
- package/thread/src/apis/SearchThreadApi.js +26 -18
- package/thread/src/apis/SearchThreadCommentApi.js +26 -18
- package/thread/src/runtime.d.ts +2 -2
- package/thread/src/runtime.js +1 -1
- package/ubo/src/apis/ManageUboDeclarationApi.js +26 -18
- package/ubo/src/apis/SearchUboDeclarationApi.js +26 -18
- package/ubo/src/runtime.d.ts +2 -2
- package/ubo/src/runtime.js +1 -1
- package/user/src/apis/ManagePasswordApi.js +50 -34
- package/user/src/apis/ManageUserApi.js +177 -121
- package/user/src/apis/ManageUserBankAccountApi.js +52 -36
- package/user/src/apis/ManageUserDocumentApi.js +82 -54
- package/user/src/apis/ManageUserFavoriteLaboratoryStoreApi.js +100 -68
- package/user/src/apis/ManageUserRestrictionApi.js +200 -136
- package/user/src/apis/ManageUserRoleApi.js +26 -18
- package/user/src/apis/ManageUserRuleApi.js +51 -35
- package/user/src/apis/ManageUserSocialNetworksApi.js +52 -36
- package/user/src/apis/ManageUserTransportApi.js +26 -18
- package/user/src/apis/SearchUserApi.js +156 -108
- package/user/src/apis/SearchUserDocumentApi.js +180 -124
- package/user/src/apis/SearchUserFavoriteLaboratoryStoreApi.js +52 -36
- package/user/src/apis/SearchUserFeatureApi.js +26 -18
- package/user/src/apis/SearchUserRestrictionApi.js +104 -72
- package/user/src/apis/SearchUserRuleApi.js +26 -18
- package/user/src/apis/SearchUserSocialNetworksApi.js +52 -36
- package/user/src/apis/SearchUserTransportApi.js +52 -36
- package/user/src/models/NotificationTypeId.d.ts +2 -0
- package/user/src/models/NotificationTypeId.js +2 -0
- package/user/src/runtime.d.ts +2 -2
- package/user/src/runtime.js +1 -1
- package/wish/src/apis/ManageWishApi.js +75 -51
- package/wish/src/apis/SearchProductEnthusiasmApi.js +26 -18
- package/wish/src/apis/SearchWishApi.js +52 -36
- package/wish/src/runtime.d.ts +2 -2
- 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 (
|
|
86
|
-
switch (
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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.
|
|
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
|
|
116
|
-
response =
|
|
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*/,
|
|
129
|
-
case
|
|
130
|
-
response_1 =
|
|
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
|
|
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
|
|
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 (
|
|
164
|
-
switch (
|
|
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
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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.
|
|
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
|
|
196
|
-
response =
|
|
214
|
+
case 5:
|
|
215
|
+
response = _b.sent();
|
|
197
216
|
return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
|
|
198
|
-
case
|
|
199
|
-
response_2 =
|
|
217
|
+
case 6:
|
|
218
|
+
response_2 = _b.sent();
|
|
200
219
|
console.debug(response_2);
|
|
201
220
|
throw response_2;
|
|
202
|
-
case
|
|
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
|
|
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 (
|
|
231
|
-
switch (
|
|
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
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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.
|
|
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
|
|
263
|
-
response =
|
|
289
|
+
case 5:
|
|
290
|
+
response = _b.sent();
|
|
264
291
|
return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
|
|
265
|
-
case
|
|
266
|
-
response_3 =
|
|
292
|
+
case 6:
|
|
293
|
+
response_3 = _b.sent();
|
|
267
294
|
console.debug(response_3);
|
|
268
295
|
throw response_3;
|
|
269
|
-
case
|
|
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 (
|
|
298
|
-
switch (
|
|
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
|
-
|
|
314
|
-
|
|
315
|
-
|
|
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.
|
|
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
|
|
330
|
-
response =
|
|
364
|
+
case 5:
|
|
365
|
+
response = _b.sent();
|
|
331
366
|
return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
|
|
332
|
-
case
|
|
333
|
-
response_4 =
|
|
367
|
+
case 6:
|
|
368
|
+
response_4 = _b.sent();
|
|
334
369
|
console.debug(response_4);
|
|
335
370
|
throw response_4;
|
|
336
|
-
case
|
|
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 (
|
|
365
|
-
switch (
|
|
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
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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.
|
|
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
|
|
397
|
-
response =
|
|
439
|
+
case 5:
|
|
440
|
+
response = _b.sent();
|
|
398
441
|
return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
|
|
399
|
-
case
|
|
400
|
-
response_5 =
|
|
442
|
+
case 6:
|
|
443
|
+
response_5 = _b.sent();
|
|
401
444
|
console.debug(response_5);
|
|
402
445
|
throw response_5;
|
|
403
|
-
case
|
|
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 (
|
|
431
|
-
switch (
|
|
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
|
-
|
|
444
|
-
|
|
445
|
-
|
|
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.
|
|
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
|
|
460
|
-
response =
|
|
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*/,
|
|
473
|
-
case
|
|
474
|
-
response_6 =
|
|
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
|
|
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 (
|
|
506
|
-
switch (
|
|
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
|
-
|
|
522
|
-
|
|
523
|
-
|
|
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.
|
|
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
|
|
538
|
-
response =
|
|
598
|
+
case 5:
|
|
599
|
+
response = _b.sent();
|
|
539
600
|
return [2 /*return*/, new runtime_1.VoidApiResponse(response)];
|
|
540
|
-
case
|
|
541
|
-
response_7 =
|
|
601
|
+
case 6:
|
|
602
|
+
response_7 = _b.sent();
|
|
542
603
|
console.debug(response_7);
|
|
543
604
|
throw response_7;
|
|
544
|
-
case
|
|
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 (
|
|
572
|
-
switch (
|
|
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
|
-
|
|
591
|
-
|
|
592
|
-
|
|
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.
|
|
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
|
|
607
|
-
response =
|
|
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*/,
|
|
620
|
-
case
|
|
621
|
-
response_8 =
|
|
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
|
|
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;
|