@lcdp/api-react-rest-client 3.1.2 → 3.1.3-LDS-5369-api-modifications-routes-et-sch.21861896537
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/order/src/apis/ManageForeorderApi.d.ts +31 -0
- package/order/src/apis/{ManageMetaOrderApi.js → ManageForeorderApi.js} +18 -91
- package/order/src/apis/ManageOrderApi.d.ts +8 -8
- package/order/src/apis/ManageOrderApi.js +9 -10
- package/order/src/apis/index.d.ts +1 -1
- package/order/src/apis/index.js +1 -1
- package/order/src/models/{AnyMetaOrderWarning.d.ts → AnyForeorderWarning.d.ts} +5 -5
- package/order/src/models/{AnyMetaOrderWarning.js → AnyForeorderWarning.js} +10 -10
- package/order/src/models/Foreorder.d.ts +241 -0
- package/order/src/models/Foreorder.js +180 -0
- package/order/src/models/ForeorderCreationParameters.d.ts +45 -0
- package/order/src/models/ForeorderCreationParameters.js +58 -0
- package/order/src/models/ForeorderCreationResponse.d.ts +39 -0
- package/order/src/models/ForeorderCreationResponse.js +53 -0
- package/order/src/models/ForeorderWarning.d.ts +31 -0
- package/order/src/models/{MetaOrderWarning.js → ForeorderWarning.js} +11 -11
- package/order/src/models/Order.d.ts +9 -7
- package/order/src/models/Order.js +6 -4
- package/order/src/models/OrderCreationParameters.d.ts +46 -0
- package/order/src/models/OrderCreationParameters.js +59 -0
- package/order/src/models/index.d.ts +6 -7
- package/order/src/models/index.js +6 -7
- package/package.json +1 -1
- package/shopping-cart/src/apis/ManageCartApi.d.ts +30 -28
- package/shopping-cart/src/apis/ManageCartApi.js +43 -167
- package/shopping-cart/src/apis/ManageCartLineApi.d.ts +82 -0
- package/shopping-cart/src/apis/{ManageCartSubCartApi.js → ManageCartLineApi.js} +86 -157
- package/shopping-cart/src/apis/index.d.ts +1 -2
- package/shopping-cart/src/apis/index.js +1 -2
- package/shopping-cart/src/models/Cart.d.ts +6 -6
- package/shopping-cart/src/models/Cart.js +10 -4
- package/shopping-cart/src/models/CartCreationParameters.d.ts +44 -0
- package/shopping-cart/src/models/CartCreationParameters.js +56 -0
- package/shopping-cart/src/models/CartCreationResponse.d.ts +39 -0
- package/shopping-cart/src/models/CartCreationResponse.js +49 -0
- package/shopping-cart/src/models/{CartSubCartLine.d.ts → CartLine.d.ts} +13 -13
- package/shopping-cart/src/models/{CartSubCartLine.js → CartLine.js} +11 -11
- package/shopping-cart/src/models/CartLineResponse.d.ts +39 -0
- package/shopping-cart/src/models/CartLineResponse.js +49 -0
- package/shopping-cart/src/models/CartLineUpdateParameters.d.ts +37 -0
- package/shopping-cart/src/models/CartLineUpdateParameters.js +49 -0
- package/shopping-cart/src/models/CartLinesResponse.d.ts +39 -0
- package/shopping-cart/src/models/CartLinesResponse.js +49 -0
- package/shopping-cart/src/models/CartRecord.d.ts +70 -0
- package/shopping-cart/src/models/CartRecord.js +74 -0
- package/shopping-cart/src/models/{CartSubCartTransport.d.ts → CartRecordTransport.d.ts} +12 -12
- package/shopping-cart/src/models/{CartSubCartTransport.js → CartRecordTransport.js} +11 -11
- package/shopping-cart/src/models/CartSummary.d.ts +31 -0
- package/shopping-cart/src/models/CartSummary.js +47 -0
- package/shopping-cart/src/models/CartWarning.d.ts +68 -0
- package/shopping-cart/src/models/CartWarning.js +69 -0
- package/shopping-cart/src/models/OwnerLink.d.ts +43 -0
- package/shopping-cart/src/models/{SellerLink.js → OwnerLink.js} +13 -14
- package/shopping-cart/src/models/PaginatedCarts.d.ts +46 -0
- package/shopping-cart/src/models/PaginatedCarts.js +58 -0
- package/shopping-cart/src/models/PagingMetadata.d.ts +49 -0
- package/shopping-cart/src/models/PagingMetadata.js +55 -0
- package/shopping-cart/src/models/index.d.ts +13 -6
- package/shopping-cart/src/models/index.js +13 -6
- package/order/src/apis/ManageMetaOrderApi.d.ts +0 -45
- package/order/src/models/MetaOrder.d.ts +0 -64
- package/order/src/models/MetaOrder.js +0 -70
- package/order/src/models/MetaOrderCreationParameters.d.ts +0 -38
- package/order/src/models/MetaOrderCreationParameters.js +0 -52
- package/order/src/models/MetaOrderCreationSubCartParameters.d.ts +0 -31
- package/order/src/models/MetaOrderCreationSubCartParameters.js +0 -47
- package/order/src/models/MetaOrderPrices.d.ts +0 -79
- package/order/src/models/MetaOrderPrices.js +0 -79
- package/order/src/models/MetaOrderWarning.d.ts +0 -31
- package/order/src/models/MetaOrderWithWarnings.d.ts +0 -39
- package/order/src/models/MetaOrderWithWarnings.js +0 -49
- package/shopping-cart/src/apis/ManageCartSubCartApi.d.ts +0 -107
- package/shopping-cart/src/apis/ManageCartSubCartLineApi.d.ts +0 -151
- package/shopping-cart/src/apis/ManageCartSubCartLineApi.js +0 -879
- package/shopping-cart/src/models/CartSubCart.d.ts +0 -76
- package/shopping-cart/src/models/CartSubCart.js +0 -78
- package/shopping-cart/src/models/CartSubCartLineUpdateParameters.d.ts +0 -37
- package/shopping-cart/src/models/CartSubCartLineUpdateParameters.js +0 -49
- package/shopping-cart/src/models/SellerLink.d.ts +0 -50
- package/shopping-cart/src/models/UserRole.d.ts +0 -29
- package/shopping-cart/src/models/UserRole.js +0 -52
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { ForeorderCreationParameters, ForeorderCreationResponse } from '../models/index';
|
|
14
|
+
export interface CreateForeordersRequest {
|
|
15
|
+
foreorderCreationParameters: ForeorderCreationParameters;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class ManageForeorderApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Create foreorders from a given source. A foreorder represents a pre-order state before it becomes an actual order.
|
|
23
|
+
* Create foreorders
|
|
24
|
+
*/
|
|
25
|
+
createForeordersRaw(requestParameters: CreateForeordersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ForeorderCreationResponse | runtime.BlobWithMeta>>;
|
|
26
|
+
/**
|
|
27
|
+
* Create foreorders from a given source. A foreorder represents a pre-order state before it becomes an actual order.
|
|
28
|
+
* Create foreorders
|
|
29
|
+
*/
|
|
30
|
+
createForeorders(requestParameters: CreateForeordersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ForeorderCreationResponse | runtime.BlobWithMeta>;
|
|
31
|
+
}
|
|
@@ -64,29 +64,29 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.
|
|
67
|
+
exports.ManageForeorderApi = void 0;
|
|
68
68
|
var runtime = require("../runtime");
|
|
69
69
|
var index_1 = require("../models/index");
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
72
|
*/
|
|
73
|
-
var
|
|
74
|
-
__extends(
|
|
75
|
-
function
|
|
73
|
+
var ManageForeorderApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(ManageForeorderApi, _super);
|
|
75
|
+
function ManageForeorderApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Create a
|
|
80
|
-
* Create
|
|
79
|
+
* Create foreorders from a given source. A foreorder represents a pre-order state before it becomes an actual order.
|
|
80
|
+
* Create foreorders
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
ManageForeorderApi.prototype.createForeordersRaw = function (requestParameters, initOverrides) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function () {
|
|
84
84
|
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
|
|
85
85
|
return __generator(this, function (_c) {
|
|
86
86
|
switch (_c.label) {
|
|
87
87
|
case 0:
|
|
88
|
-
if (requestParameters['
|
|
89
|
-
throw new runtime.RequiredError('
|
|
88
|
+
if (requestParameters['foreorderCreationParameters'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('foreorderCreationParameters', 'Required parameter "foreorderCreationParameters" was null or undefined when calling createForeorders().');
|
|
90
90
|
}
|
|
91
91
|
queryParameters = {};
|
|
92
92
|
headerParameters = {};
|
|
@@ -111,17 +111,17 @@ var ManageMetaOrderApi = /** @class */ (function (_super) {
|
|
|
111
111
|
case 4:
|
|
112
112
|
_c.trys.push([4, 6, , 7]);
|
|
113
113
|
return [4 /*yield*/, this.request({
|
|
114
|
-
path: "/
|
|
114
|
+
path: "/foreorders",
|
|
115
115
|
method: 'POST',
|
|
116
116
|
headers: headerParameters,
|
|
117
117
|
query: queryParameters,
|
|
118
|
-
body: (0, index_1.
|
|
118
|
+
body: (0, index_1.ForeorderCreationParametersToJSON)(requestParameters['foreorderCreationParameters']),
|
|
119
119
|
}, initOverrides)];
|
|
120
120
|
case 5:
|
|
121
121
|
response = _c.sent();
|
|
122
122
|
contentType = response.headers.get("content-type");
|
|
123
123
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
124
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.
|
|
124
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ForeorderCreationResponseFromJSON)(jsonValue); })];
|
|
125
125
|
}
|
|
126
126
|
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
127
127
|
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
@@ -141,15 +141,15 @@ var ManageMetaOrderApi = /** @class */ (function (_super) {
|
|
|
141
141
|
});
|
|
142
142
|
};
|
|
143
143
|
/**
|
|
144
|
-
* Create a
|
|
145
|
-
* Create
|
|
144
|
+
* Create foreorders from a given source. A foreorder represents a pre-order state before it becomes an actual order.
|
|
145
|
+
* Create foreorders
|
|
146
146
|
*/
|
|
147
|
-
|
|
147
|
+
ManageForeorderApi.prototype.createForeorders = function (requestParameters, initOverrides) {
|
|
148
148
|
return __awaiter(this, void 0, void 0, function () {
|
|
149
149
|
var response;
|
|
150
150
|
return __generator(this, function (_a) {
|
|
151
151
|
switch (_a.label) {
|
|
152
|
-
case 0: return [4 /*yield*/, this.
|
|
152
|
+
case 0: return [4 /*yield*/, this.createForeordersRaw(requestParameters, initOverrides)];
|
|
153
153
|
case 1:
|
|
154
154
|
response = _a.sent();
|
|
155
155
|
return [4 /*yield*/, response.value()];
|
|
@@ -158,79 +158,6 @@ var ManageMetaOrderApi = /** @class */ (function (_super) {
|
|
|
158
158
|
});
|
|
159
159
|
});
|
|
160
160
|
};
|
|
161
|
-
|
|
162
|
-
* Set the validated flag for meta-order identified by metaOrderId. # You can not : - Set flag with value true if already true - Set flag with value false if already true Preconditions for TRUE : - Buyer have accepted the CGV
|
|
163
|
-
* Set meta-order validated flag
|
|
164
|
-
*/
|
|
165
|
-
ManageMetaOrderApi.prototype.setMetaOrderValidatedRaw = function (requestParameters, initOverrides) {
|
|
166
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
|
|
168
|
-
return __generator(this, function (_c) {
|
|
169
|
-
switch (_c.label) {
|
|
170
|
-
case 0:
|
|
171
|
-
if (requestParameters['metaOrderId'] == null) {
|
|
172
|
-
throw new runtime.RequiredError('metaOrderId', 'Required parameter "metaOrderId" was null or undefined when calling setMetaOrderValidated().');
|
|
173
|
-
}
|
|
174
|
-
if (requestParameters['body'] == null) {
|
|
175
|
-
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling setMetaOrderValidated().');
|
|
176
|
-
}
|
|
177
|
-
queryParameters = {};
|
|
178
|
-
headerParameters = {};
|
|
179
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
180
|
-
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
181
|
-
_a = headerParameters;
|
|
182
|
-
_b = "x-api-key";
|
|
183
|
-
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
184
|
-
case 1:
|
|
185
|
-
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
186
|
-
_c.label = 2;
|
|
187
|
-
case 2:
|
|
188
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
189
|
-
token = this.configuration.accessToken;
|
|
190
|
-
return [4 /*yield*/, token("bearerAuth", [])];
|
|
191
|
-
case 3:
|
|
192
|
-
tokenString = _c.sent();
|
|
193
|
-
if (tokenString) {
|
|
194
|
-
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
195
|
-
}
|
|
196
|
-
_c.label = 4;
|
|
197
|
-
case 4:
|
|
198
|
-
_c.trys.push([4, 6, , 7]);
|
|
199
|
-
return [4 /*yield*/, this.request({
|
|
200
|
-
path: "/meta-orders/{metaOrderId}/validated".replace("{".concat("metaOrderId", "}"), encodeURIComponent(String(requestParameters['metaOrderId']))),
|
|
201
|
-
method: 'PUT',
|
|
202
|
-
headers: headerParameters,
|
|
203
|
-
query: queryParameters,
|
|
204
|
-
body: requestParameters['body'],
|
|
205
|
-
}, initOverrides)];
|
|
206
|
-
case 5:
|
|
207
|
-
response = _c.sent();
|
|
208
|
-
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
209
|
-
case 6:
|
|
210
|
-
response_2 = _c.sent();
|
|
211
|
-
console.debug(response_2);
|
|
212
|
-
throw response_2;
|
|
213
|
-
case 7: return [2 /*return*/];
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
};
|
|
218
|
-
/**
|
|
219
|
-
* Set the validated flag for meta-order identified by metaOrderId. # You can not : - Set flag with value true if already true - Set flag with value false if already true Preconditions for TRUE : - Buyer have accepted the CGV
|
|
220
|
-
* Set meta-order validated flag
|
|
221
|
-
*/
|
|
222
|
-
ManageMetaOrderApi.prototype.setMetaOrderValidated = function (requestParameters, initOverrides) {
|
|
223
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
224
|
-
return __generator(this, function (_a) {
|
|
225
|
-
switch (_a.label) {
|
|
226
|
-
case 0: return [4 /*yield*/, this.setMetaOrderValidatedRaw(requestParameters, initOverrides)];
|
|
227
|
-
case 1:
|
|
228
|
-
_a.sent();
|
|
229
|
-
return [2 /*return*/];
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
return ManageMetaOrderApi;
|
|
161
|
+
return ManageForeorderApi;
|
|
235
162
|
}(runtime.BaseAPI));
|
|
236
|
-
exports.
|
|
163
|
+
exports.ManageForeorderApi = ManageForeorderApi;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AnomaliesUpdateParameters, Order, OrderUpdateParameters, Reservation, ReservationUpdateParameters } from '../models/index';
|
|
13
|
+
import type { AnomaliesUpdateParameters, Order, OrderCreationParameters, OrderUpdateParameters, Reservation, ReservationUpdateParameters } from '../models/index';
|
|
14
14
|
export interface CreateOrderRequest {
|
|
15
|
-
|
|
15
|
+
orderCreationParameters: OrderCreationParameters;
|
|
16
16
|
}
|
|
17
17
|
export interface SetOrderAcceptedRequest {
|
|
18
18
|
orderReference: string;
|
|
@@ -50,15 +50,15 @@ export interface UpdateOrderReservationRequest {
|
|
|
50
50
|
*/
|
|
51
51
|
export declare class ManageOrderApi extends runtime.BaseAPI {
|
|
52
52
|
/**
|
|
53
|
-
* Create a
|
|
54
|
-
* Create
|
|
53
|
+
* Create orders from a given source. Source can be \"foreorder\" to create orders from foreorders, or \"order\" to clone existing orders.
|
|
54
|
+
* Create orders
|
|
55
55
|
*/
|
|
56
|
-
createOrderRaw(requestParameters: CreateOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order | runtime.BlobWithMeta>>;
|
|
56
|
+
createOrderRaw(requestParameters: CreateOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Order> | runtime.BlobWithMeta>>;
|
|
57
57
|
/**
|
|
58
|
-
* Create a
|
|
59
|
-
* Create
|
|
58
|
+
* Create orders from a given source. Source can be \"foreorder\" to create orders from foreorders, or \"order\" to clone existing orders.
|
|
59
|
+
* Create orders
|
|
60
60
|
*/
|
|
61
|
-
createOrder(requestParameters: CreateOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order | runtime.BlobWithMeta>;
|
|
61
|
+
createOrder(requestParameters: CreateOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Order> | runtime.BlobWithMeta>;
|
|
62
62
|
/**
|
|
63
63
|
* 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
|
|
64
64
|
* Set order accepted flag
|
|
@@ -76,8 +76,8 @@ var ManageOrderApi = /** @class */ (function (_super) {
|
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Create a
|
|
80
|
-
* Create
|
|
79
|
+
* Create orders from a given source. Source can be \"foreorder\" to create orders from foreorders, or \"order\" to clone existing orders.
|
|
80
|
+
* Create orders
|
|
81
81
|
*/
|
|
82
82
|
ManageOrderApi.prototype.createOrderRaw = function (requestParameters, initOverrides) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -85,14 +85,12 @@ var ManageOrderApi = /** @class */ (function (_super) {
|
|
|
85
85
|
return __generator(this, function (_c) {
|
|
86
86
|
switch (_c.label) {
|
|
87
87
|
case 0:
|
|
88
|
-
if (requestParameters['
|
|
89
|
-
throw new runtime.RequiredError('
|
|
88
|
+
if (requestParameters['orderCreationParameters'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('orderCreationParameters', 'Required parameter "orderCreationParameters" was null or undefined when calling createOrder().');
|
|
90
90
|
}
|
|
91
91
|
queryParameters = {};
|
|
92
|
-
if (requestParameters['from'] != null) {
|
|
93
|
-
queryParameters['from'] = requestParameters['from'];
|
|
94
|
-
}
|
|
95
92
|
headerParameters = {};
|
|
93
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
96
94
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
97
95
|
_a = headerParameters;
|
|
98
96
|
_b = "x-api-key";
|
|
@@ -117,12 +115,13 @@ var ManageOrderApi = /** @class */ (function (_super) {
|
|
|
117
115
|
method: 'POST',
|
|
118
116
|
headers: headerParameters,
|
|
119
117
|
query: queryParameters,
|
|
118
|
+
body: (0, index_1.OrderCreationParametersToJSON)(requestParameters['orderCreationParameters']),
|
|
120
119
|
}, initOverrides)];
|
|
121
120
|
case 5:
|
|
122
121
|
response = _c.sent();
|
|
123
122
|
contentType = response.headers.get("content-type");
|
|
124
123
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
125
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (
|
|
124
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.OrderFromJSON); })];
|
|
126
125
|
}
|
|
127
126
|
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
128
127
|
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
@@ -142,8 +141,8 @@ var ManageOrderApi = /** @class */ (function (_super) {
|
|
|
142
141
|
});
|
|
143
142
|
};
|
|
144
143
|
/**
|
|
145
|
-
* Create a
|
|
146
|
-
* Create
|
|
144
|
+
* Create orders from a given source. Source can be \"foreorder\" to create orders from foreorders, or \"order\" to clone existing orders.
|
|
145
|
+
* Create orders
|
|
147
146
|
*/
|
|
148
147
|
ManageOrderApi.prototype.createOrder = function (requestParameters, initOverrides) {
|
|
149
148
|
return __awaiter(this, void 0, void 0, function () {
|
package/order/src/apis/index.js
CHANGED
|
@@ -16,8 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./ManageForeorderApi"), exports);
|
|
19
20
|
__exportStar(require("./ManageFreeCarriageCouponApi"), exports);
|
|
20
|
-
__exportStar(require("./ManageMetaOrderApi"), exports);
|
|
21
21
|
__exportStar(require("./ManageOrderApi"), exports);
|
|
22
22
|
__exportStar(require("./ManageOrderItemApi"), exports);
|
|
23
23
|
__exportStar(require("./SearchFreeCarriageCouponApi"), exports);
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
import type { OrderItemWarning } from './OrderItemWarning';
|
|
13
13
|
import type { OrderWarning } from './OrderWarning';
|
|
14
14
|
/**
|
|
15
|
-
* @type
|
|
15
|
+
* @type AnyForeorderWarning
|
|
16
16
|
*
|
|
17
17
|
* @export
|
|
18
18
|
*/
|
|
19
|
-
export declare type
|
|
19
|
+
export declare type AnyForeorderWarning = {
|
|
20
20
|
type: 'ORDER';
|
|
21
21
|
} & OrderWarning | {
|
|
22
22
|
type: 'ORDER_ITEM';
|
|
23
23
|
} & OrderItemWarning;
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
-
export declare function
|
|
24
|
+
export declare function AnyForeorderWarningFromJSON(json: any): AnyForeorderWarning;
|
|
25
|
+
export declare function AnyForeorderWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnyForeorderWarning;
|
|
26
|
+
export declare function AnyForeorderWarningToJSON(value?: AnyForeorderWarning | null): any;
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.AnyForeorderWarningToJSON = exports.AnyForeorderWarningFromJSONTyped = exports.AnyForeorderWarningFromJSON = void 0;
|
|
17
17
|
var OrderItemWarning_1 = require("./OrderItemWarning");
|
|
18
18
|
var OrderWarning_1 = require("./OrderWarning");
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function AnyForeorderWarningFromJSON(json) {
|
|
20
|
+
return AnyForeorderWarningFromJSONTyped(json, false);
|
|
21
21
|
}
|
|
22
|
-
exports.
|
|
23
|
-
function
|
|
22
|
+
exports.AnyForeorderWarningFromJSON = AnyForeorderWarningFromJSON;
|
|
23
|
+
function AnyForeorderWarningFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
24
|
if (json == null) {
|
|
25
25
|
return json;
|
|
26
26
|
}
|
|
@@ -30,11 +30,11 @@ function AnyMetaOrderWarningFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
30
|
case 'ORDER_ITEM':
|
|
31
31
|
return Object.assign({}, (0, OrderItemWarning_1.OrderItemWarningFromJSONTyped)(json, true), { type: 'ORDER_ITEM' });
|
|
32
32
|
default:
|
|
33
|
-
throw new Error("No variant of
|
|
33
|
+
throw new Error("No variant of AnyForeorderWarning exists with 'type=".concat(json['type'], "'"));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
exports.
|
|
37
|
-
function
|
|
36
|
+
exports.AnyForeorderWarningFromJSONTyped = AnyForeorderWarningFromJSONTyped;
|
|
37
|
+
function AnyForeorderWarningToJSON(value) {
|
|
38
38
|
if (value == null) {
|
|
39
39
|
return value;
|
|
40
40
|
}
|
|
@@ -44,7 +44,7 @@ function AnyMetaOrderWarningToJSON(value) {
|
|
|
44
44
|
case 'ORDER_ITEM':
|
|
45
45
|
return (0, OrderItemWarning_1.OrderItemWarningToJSON)(value);
|
|
46
46
|
default:
|
|
47
|
-
throw new Error("No variant of
|
|
47
|
+
throw new Error("No variant of AnyForeorderWarning exists with 'type=".concat(value['type'], "'"));
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
exports.
|
|
50
|
+
exports.AnyForeorderWarningToJSON = AnyForeorderWarningToJSON;
|
|
@@ -0,0 +1,241 @@
|
|
|
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
|
+
import type { UserLink } from './UserLink';
|
|
13
|
+
import type { OrderPrices } from './OrderPrices';
|
|
14
|
+
import type { OrderThreads } from './OrderThreads';
|
|
15
|
+
import type { OrderType } from './OrderType';
|
|
16
|
+
import type { Address } from './Address';
|
|
17
|
+
import type { OrderJournal } from './OrderJournal';
|
|
18
|
+
import type { OrderStorageType } from './OrderStorageType';
|
|
19
|
+
import type { HttpLink } from './HttpLink';
|
|
20
|
+
import type { OrderStatusReason } from './OrderStatusReason';
|
|
21
|
+
import type { Anomalies } from './Anomalies';
|
|
22
|
+
/**
|
|
23
|
+
* A foreorder represents a pre-order state before it becomes an actual order.
|
|
24
|
+
* It contains all order properties except the status field.
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface Foreorder
|
|
28
|
+
*/
|
|
29
|
+
export interface Foreorder {
|
|
30
|
+
/**
|
|
31
|
+
* Unique identifier for this order
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Foreorder
|
|
34
|
+
*/
|
|
35
|
+
reference: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {OrderType}
|
|
39
|
+
* @memberof Foreorder
|
|
40
|
+
*/
|
|
41
|
+
type: OrderType;
|
|
42
|
+
/**
|
|
43
|
+
* Channel identifier
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Foreorder
|
|
46
|
+
*/
|
|
47
|
+
channel?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {OrderStatusReason}
|
|
51
|
+
* @memberof Foreorder
|
|
52
|
+
*/
|
|
53
|
+
statusReason: OrderStatusReason;
|
|
54
|
+
/**
|
|
55
|
+
* Smart sentence given detail about the current status
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof Foreorder
|
|
58
|
+
*/
|
|
59
|
+
statusComment?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* True if the seller accepted the order, false if not
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof Foreorder
|
|
64
|
+
*/
|
|
65
|
+
accepted: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* True if the order is in pause state, false if not
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof Foreorder
|
|
70
|
+
*/
|
|
71
|
+
paused: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* True if the order is in litigation state, false if not
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof Foreorder
|
|
76
|
+
*/
|
|
77
|
+
inLitigation: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Estimated delivery date using to order creation date + delivery delay of seller (Business day only). Eg : createdAt: 01/01/2020 / deliveryDelay: 3 => 06/01/2020
|
|
80
|
+
* @type {Date}
|
|
81
|
+
* @memberof Foreorder
|
|
82
|
+
*/
|
|
83
|
+
estimatedDeliveryDate: Date | null;
|
|
84
|
+
/**
|
|
85
|
+
* True if buyer confirmed the delivery, false if not
|
|
86
|
+
* @type {boolean}
|
|
87
|
+
* @memberof Foreorder
|
|
88
|
+
*/
|
|
89
|
+
deliveryConfirmed: boolean;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {HttpLink}
|
|
93
|
+
* @memberof Foreorder
|
|
94
|
+
*/
|
|
95
|
+
deliveryVoucher: HttpLink;
|
|
96
|
+
/**
|
|
97
|
+
* Creation date of this order
|
|
98
|
+
* @type {Date}
|
|
99
|
+
* @memberof Foreorder
|
|
100
|
+
*/
|
|
101
|
+
createdAt: Date;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {UserLink}
|
|
105
|
+
* @memberof Foreorder
|
|
106
|
+
*/
|
|
107
|
+
seller: UserLink;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {UserLink}
|
|
111
|
+
* @memberof Foreorder
|
|
112
|
+
*/
|
|
113
|
+
buyer: UserLink;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {Address}
|
|
117
|
+
* @memberof Foreorder
|
|
118
|
+
*/
|
|
119
|
+
shippingAddress: Address;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {Address}
|
|
123
|
+
* @memberof Foreorder
|
|
124
|
+
*/
|
|
125
|
+
billingAddress: Address;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @type {HttpLink}
|
|
129
|
+
* @memberof Foreorder
|
|
130
|
+
*/
|
|
131
|
+
shipments: HttpLink;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @type {Array<OrderStorageType>}
|
|
135
|
+
* @memberof Foreorder
|
|
136
|
+
*/
|
|
137
|
+
storageTypes?: Array<OrderStorageType>;
|
|
138
|
+
/**
|
|
139
|
+
* Number of maximum shipments available
|
|
140
|
+
* @type {number}
|
|
141
|
+
* @memberof Foreorder
|
|
142
|
+
*/
|
|
143
|
+
maxShipment: number;
|
|
144
|
+
/**
|
|
145
|
+
* Order shall be shipped before this date
|
|
146
|
+
* @type {Date}
|
|
147
|
+
* @memberof Foreorder
|
|
148
|
+
*/
|
|
149
|
+
maxShippingDate?: Date;
|
|
150
|
+
/**
|
|
151
|
+
* Max parcel quantity per shipment
|
|
152
|
+
* @type {number}
|
|
153
|
+
* @memberof Foreorder
|
|
154
|
+
*/
|
|
155
|
+
maxParcelPerShipment: number;
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @type {OrderPrices}
|
|
159
|
+
* @memberof Foreorder
|
|
160
|
+
*/
|
|
161
|
+
prices: OrderPrices;
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @type {OrderPrices}
|
|
165
|
+
* @memberof Foreorder
|
|
166
|
+
*/
|
|
167
|
+
refundedPrices?: OrderPrices;
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @type {HttpLink}
|
|
171
|
+
* @memberof Foreorder
|
|
172
|
+
*/
|
|
173
|
+
items: HttpLink;
|
|
174
|
+
/**
|
|
175
|
+
*
|
|
176
|
+
* @type {HttpLink}
|
|
177
|
+
* @memberof Foreorder
|
|
178
|
+
*/
|
|
179
|
+
addedItems: HttpLink;
|
|
180
|
+
/**
|
|
181
|
+
*
|
|
182
|
+
* @type {HttpLink}
|
|
183
|
+
* @memberof Foreorder
|
|
184
|
+
*/
|
|
185
|
+
removedItems: HttpLink;
|
|
186
|
+
/**
|
|
187
|
+
*
|
|
188
|
+
* @type {HttpLink}
|
|
189
|
+
* @memberof Foreorder
|
|
190
|
+
*/
|
|
191
|
+
refundedItems: HttpLink;
|
|
192
|
+
/**
|
|
193
|
+
*
|
|
194
|
+
* @type {OrderThreads}
|
|
195
|
+
* @memberof Foreorder
|
|
196
|
+
*/
|
|
197
|
+
threads: OrderThreads;
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @type {Anomalies}
|
|
201
|
+
* @memberof Foreorder
|
|
202
|
+
*/
|
|
203
|
+
anomalies: Anomalies;
|
|
204
|
+
/**
|
|
205
|
+
*
|
|
206
|
+
* @type {HttpLink}
|
|
207
|
+
* @memberof Foreorder
|
|
208
|
+
*/
|
|
209
|
+
reservations: HttpLink;
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @type {HttpLink}
|
|
213
|
+
* @memberof Foreorder
|
|
214
|
+
*/
|
|
215
|
+
availableItemsOperations: HttpLink;
|
|
216
|
+
/**
|
|
217
|
+
* Labels of the order
|
|
218
|
+
* @type {Array<string>}
|
|
219
|
+
* @memberof Foreorder
|
|
220
|
+
*/
|
|
221
|
+
tags: Array<string>;
|
|
222
|
+
/**
|
|
223
|
+
*
|
|
224
|
+
* @type {OrderJournal}
|
|
225
|
+
* @memberof Foreorder
|
|
226
|
+
*/
|
|
227
|
+
journal: OrderJournal;
|
|
228
|
+
/**
|
|
229
|
+
* Version of the order. It is changed each time the order or items are updated
|
|
230
|
+
* @type {string}
|
|
231
|
+
* @memberof Foreorder
|
|
232
|
+
*/
|
|
233
|
+
eTag: string;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Check if a given object implements the Foreorder interface.
|
|
237
|
+
*/
|
|
238
|
+
export declare function instanceOfForeorder(value: object): value is Foreorder;
|
|
239
|
+
export declare function ForeorderFromJSON(json: any): Foreorder;
|
|
240
|
+
export declare function ForeorderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Foreorder;
|
|
241
|
+
export declare function ForeorderToJSON(value?: Foreorder | null): any;
|