@lcdp/api-react-rest-client 3.1.5 → 3.1.6-LDS-5354-refactoring-multi-panier.23548405807
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/magic-cart/src/models/ExpressOrder.d.ts +3 -3
- package/magic-cart/src/models/ExpressOrder.js +3 -3
- package/magic-cart/src/models/ShoppedOffer.d.ts +43 -0
- package/magic-cart/src/models/ShoppedOffer.js +53 -0
- package/magic-cart/src/models/index.d.ts +1 -2
- package/magic-cart/src/models/index.js +1 -2
- package/order/src/models/ShoppedOffer.d.ts +2 -2
- package/order/src/models/ShoppedOffer.js +2 -2
- package/package.json +1 -1
- package/shopping-cart/src/apis/ManageCartApi.d.ts +35 -24
- package/shopping-cart/src/apis/ManageCartApi.js +57 -120
- package/shopping-cart/src/apis/ManageCartLineApi.d.ts +45 -0
- package/shopping-cart/src/apis/ManageCartLineApi.js +238 -0
- package/shopping-cart/src/apis/SearchCartApi.d.ts +59 -0
- package/shopping-cart/src/apis/SearchCartApi.js +267 -0
- package/shopping-cart/src/apis/SearchCartLineApi.d.ts +41 -0
- package/shopping-cart/src/apis/SearchCartLineApi.js +241 -0
- package/shopping-cart/src/apis/index.d.ts +3 -2
- package/shopping-cart/src/apis/index.js +3 -2
- package/shopping-cart/src/models/Cart.d.ts +61 -4
- package/shopping-cart/src/models/Cart.js +47 -2
- package/shopping-cart/src/models/CartCreationParameters.d.ts +44 -0
- package/shopping-cart/src/models/CartCreationParameters.js +56 -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/CartLineUpdateParameters.d.ts +37 -0
- package/shopping-cart/src/models/CartLineUpdateParameters.js +49 -0
- package/shopping-cart/src/models/CartLineWithWarnings.d.ts +39 -0
- package/shopping-cart/src/models/CartLineWithWarnings.js +49 -0
- package/shopping-cart/src/models/CartSummary.d.ts +31 -0
- package/shopping-cart/src/models/CartSummary.js +47 -0
- package/shopping-cart/src/models/{CartSubCartTransport.d.ts → CartTransport.d.ts} +12 -12
- package/shopping-cart/src/models/{CartSubCartTransport.js → CartTransport.js} +11 -11
- package/shopping-cart/src/models/CartUpdateParameters.d.ts +31 -0
- package/shopping-cart/src/models/CartUpdateParameters.js +45 -0
- package/shopping-cart/src/models/CartWarning.d.ts +70 -0
- package/shopping-cart/src/models/CartWarning.js +67 -0
- package/shopping-cart/src/models/CartsWithWarnings.d.ts +39 -0
- package/shopping-cart/src/models/CartsWithWarnings.js +49 -0
- package/shopping-cart/src/models/OwnerLink.d.ts +43 -0
- package/shopping-cart/src/models/OwnerLink.js +53 -0
- 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/ShoppedOffer.d.ts +2 -2
- package/shopping-cart/src/models/ShoppedOffer.js +2 -2
- package/shopping-cart/src/models/index.d.ts +12 -4
- package/shopping-cart/src/models/index.js +12 -4
- package/third-party/src/models/ThirdPartyLinkCreationParameters.d.ts +2 -0
- package/third-party/src/models/ThirdPartyLinkCreationParameters.js +3 -1
- package/user/src/apis/ManageUserDocumentApi.d.ts +0 -5
- package/user/src/apis/ManageUserDocumentApi.js +3 -8
- package/user/src/apis/SearchUserDocumentApi.d.ts +0 -5
- package/user/src/apis/SearchUserDocumentApi.js +5 -10
- package/user/src/models/UserDocument.d.ts +0 -6
- package/user/src/models/UserDocument.js +0 -3
- package/magic-cart/src/models/SaleOfferProposal.d.ts +0 -51
- package/magic-cart/src/models/SaleOfferProposal.js +0 -61
- package/magic-cart/src/models/SellerProposal.d.ts +0 -45
- package/magic-cart/src/models/SellerProposal.js +0 -57
- package/shopping-cart/src/apis/ManageCartSubCartApi.d.ts +0 -107
- package/shopping-cart/src/apis/ManageCartSubCartApi.js +0 -556
- 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
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-monolith-service
|
|
6
|
+
* This is the REST API of LCDP products
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
41
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
+
function step(op) {
|
|
44
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
+
while (_) try {
|
|
46
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
+
switch (op[0]) {
|
|
49
|
+
case 0: case 1: t = op; break;
|
|
50
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
+
default:
|
|
54
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
+
if (t[2]) _.ops.pop();
|
|
59
|
+
_.trys.pop(); continue;
|
|
60
|
+
}
|
|
61
|
+
op = body.call(thisArg, _);
|
|
62
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.SearchCartLineApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var SearchCartLineApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(SearchCartLineApi, _super);
|
|
75
|
+
function SearchCartLineApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get a cart line
|
|
80
|
+
*/
|
|
81
|
+
SearchCartLineApi.prototype.getCartLineRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
|
|
84
|
+
return __generator(this, function (_c) {
|
|
85
|
+
switch (_c.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['cartId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling getCartLine().');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['lineId'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('lineId', 'Required parameter "lineId" was null or undefined when calling getCartLine().');
|
|
92
|
+
}
|
|
93
|
+
queryParameters = {};
|
|
94
|
+
headerParameters = {};
|
|
95
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
96
|
+
_a = headerParameters;
|
|
97
|
+
_b = "x-api-key";
|
|
98
|
+
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
99
|
+
case 1:
|
|
100
|
+
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
101
|
+
_c.label = 2;
|
|
102
|
+
case 2:
|
|
103
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
104
|
+
token = this.configuration.accessToken;
|
|
105
|
+
return [4 /*yield*/, token("bearerAuth", [])];
|
|
106
|
+
case 3:
|
|
107
|
+
tokenString = _c.sent();
|
|
108
|
+
if (tokenString) {
|
|
109
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
110
|
+
}
|
|
111
|
+
_c.label = 4;
|
|
112
|
+
case 4:
|
|
113
|
+
_c.trys.push([4, 6, , 7]);
|
|
114
|
+
return [4 /*yield*/, this.request({
|
|
115
|
+
path: "/carts/{cartId}/lines/{lineId}".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))).replace("{".concat("lineId", "}"), encodeURIComponent(String(requestParameters['lineId']))),
|
|
116
|
+
method: 'GET',
|
|
117
|
+
headers: headerParameters,
|
|
118
|
+
query: queryParameters,
|
|
119
|
+
}, initOverrides)];
|
|
120
|
+
case 5:
|
|
121
|
+
response = _c.sent();
|
|
122
|
+
contentType = response.headers.get("content-type");
|
|
123
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
124
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CartLineFromJSON)(jsonValue); })];
|
|
125
|
+
}
|
|
126
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
127
|
+
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
// TODO : Better handling of others application types
|
|
131
|
+
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
132
|
+
}
|
|
133
|
+
return [3 /*break*/, 7];
|
|
134
|
+
case 6:
|
|
135
|
+
response_1 = _c.sent();
|
|
136
|
+
console.debug(response_1);
|
|
137
|
+
throw response_1;
|
|
138
|
+
case 7: return [2 /*return*/];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Get a cart line
|
|
145
|
+
*/
|
|
146
|
+
SearchCartLineApi.prototype.getCartLine = function (requestParameters, initOverrides) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
148
|
+
var response;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
switch (_a.label) {
|
|
151
|
+
case 0: return [4 /*yield*/, this.getCartLineRaw(requestParameters, initOverrides)];
|
|
152
|
+
case 1:
|
|
153
|
+
response = _a.sent();
|
|
154
|
+
return [4 /*yield*/, response.value()];
|
|
155
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Get all cart lines
|
|
162
|
+
*/
|
|
163
|
+
SearchCartLineApi.prototype.getCartLinesRaw = function (requestParameters, initOverrides) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
165
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_2;
|
|
166
|
+
return __generator(this, function (_c) {
|
|
167
|
+
switch (_c.label) {
|
|
168
|
+
case 0:
|
|
169
|
+
if (requestParameters['cartId'] == null) {
|
|
170
|
+
throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling getCartLines().');
|
|
171
|
+
}
|
|
172
|
+
queryParameters = {};
|
|
173
|
+
headerParameters = {};
|
|
174
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
175
|
+
_a = headerParameters;
|
|
176
|
+
_b = "x-api-key";
|
|
177
|
+
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
178
|
+
case 1:
|
|
179
|
+
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
180
|
+
_c.label = 2;
|
|
181
|
+
case 2:
|
|
182
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
183
|
+
token = this.configuration.accessToken;
|
|
184
|
+
return [4 /*yield*/, token("bearerAuth", [])];
|
|
185
|
+
case 3:
|
|
186
|
+
tokenString = _c.sent();
|
|
187
|
+
if (tokenString) {
|
|
188
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
189
|
+
}
|
|
190
|
+
_c.label = 4;
|
|
191
|
+
case 4:
|
|
192
|
+
_c.trys.push([4, 6, , 7]);
|
|
193
|
+
return [4 /*yield*/, this.request({
|
|
194
|
+
path: "/carts/{cartId}/lines".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))),
|
|
195
|
+
method: 'GET',
|
|
196
|
+
headers: headerParameters,
|
|
197
|
+
query: queryParameters,
|
|
198
|
+
}, initOverrides)];
|
|
199
|
+
case 5:
|
|
200
|
+
response = _c.sent();
|
|
201
|
+
contentType = response.headers.get("content-type");
|
|
202
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
203
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.CartLineFromJSON); })];
|
|
204
|
+
}
|
|
205
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
206
|
+
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
// TODO : Better handling of others application types
|
|
210
|
+
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
211
|
+
}
|
|
212
|
+
return [3 /*break*/, 7];
|
|
213
|
+
case 6:
|
|
214
|
+
response_2 = _c.sent();
|
|
215
|
+
console.debug(response_2);
|
|
216
|
+
throw response_2;
|
|
217
|
+
case 7: return [2 /*return*/];
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Get all cart lines
|
|
224
|
+
*/
|
|
225
|
+
SearchCartLineApi.prototype.getCartLines = function (requestParameters, initOverrides) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
227
|
+
var response;
|
|
228
|
+
return __generator(this, function (_a) {
|
|
229
|
+
switch (_a.label) {
|
|
230
|
+
case 0: return [4 /*yield*/, this.getCartLinesRaw(requestParameters, initOverrides)];
|
|
231
|
+
case 1:
|
|
232
|
+
response = _a.sent();
|
|
233
|
+
return [4 /*yield*/, response.value()];
|
|
234
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
return SearchCartLineApi;
|
|
240
|
+
}(runtime.BaseAPI));
|
|
241
|
+
exports.SearchCartLineApi = SearchCartLineApi;
|
|
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./ManageCartApi"), exports);
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
20
|
+
__exportStar(require("./ManageCartLineApi"), exports);
|
|
21
|
+
__exportStar(require("./SearchCartApi"), exports);
|
|
22
|
+
__exportStar(require("./SearchCartLineApi"), exports);
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { OwnerLink } from './OwnerLink';
|
|
13
|
+
import type { CartTransport } from './CartTransport';
|
|
12
14
|
import type { HttpLink } from './HttpLink';
|
|
15
|
+
import type { SellerLink } from './SellerLink';
|
|
13
16
|
/**
|
|
14
17
|
*
|
|
15
18
|
* @export
|
|
@@ -21,19 +24,73 @@ export interface Cart {
|
|
|
21
24
|
* @type {number}
|
|
22
25
|
* @memberof Cart
|
|
23
26
|
*/
|
|
24
|
-
id
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
* Creation date of this cart
|
|
30
|
+
* @type {Date}
|
|
31
|
+
* @memberof Cart
|
|
32
|
+
*/
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
/**
|
|
35
|
+
* Last update date of this cart
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof Cart
|
|
38
|
+
*/
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
/**
|
|
41
|
+
* Channel identifier
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Cart
|
|
44
|
+
*/
|
|
45
|
+
channel: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {OwnerLink}
|
|
49
|
+
* @memberof Cart
|
|
50
|
+
*/
|
|
51
|
+
owner: OwnerLink;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {CartTransport}
|
|
55
|
+
* @memberof Cart
|
|
56
|
+
*/
|
|
57
|
+
transport: CartTransport;
|
|
25
58
|
/**
|
|
26
59
|
*
|
|
60
|
+
* @type {SellerLink}
|
|
61
|
+
* @memberof Cart
|
|
62
|
+
*/
|
|
63
|
+
seller: SellerLink;
|
|
64
|
+
/**
|
|
65
|
+
* Number of lines in this cart
|
|
27
66
|
* @type {number}
|
|
28
67
|
* @memberof Cart
|
|
29
68
|
*/
|
|
30
|
-
lineCount
|
|
69
|
+
lineCount: number;
|
|
31
70
|
/**
|
|
32
71
|
*
|
|
33
|
-
* @type {
|
|
72
|
+
* @type {HttpLink}
|
|
73
|
+
* @memberof Cart
|
|
74
|
+
*/
|
|
75
|
+
lines: HttpLink;
|
|
76
|
+
/**
|
|
77
|
+
* Total buyer commission for this sub cart
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof Cart
|
|
80
|
+
*/
|
|
81
|
+
totalBuyerCommissionExcludingTaxes: number;
|
|
82
|
+
/**
|
|
83
|
+
* Total price excluding taxes
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof Cart
|
|
86
|
+
*/
|
|
87
|
+
totalExcludingTaxes: number;
|
|
88
|
+
/**
|
|
89
|
+
* Total price including taxes
|
|
90
|
+
* @type {number}
|
|
34
91
|
* @memberof Cart
|
|
35
92
|
*/
|
|
36
|
-
|
|
93
|
+
totalIncludingTaxes: number;
|
|
37
94
|
}
|
|
38
95
|
/**
|
|
39
96
|
* Check if a given object implements the Cart interface.
|
|
@@ -14,11 +14,38 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.CartToJSON = exports.CartFromJSONTyped = exports.CartFromJSON = exports.instanceOfCart = void 0;
|
|
17
|
+
var OwnerLink_1 = require("./OwnerLink");
|
|
18
|
+
var CartTransport_1 = require("./CartTransport");
|
|
17
19
|
var HttpLink_1 = require("./HttpLink");
|
|
20
|
+
var SellerLink_1 = require("./SellerLink");
|
|
18
21
|
/**
|
|
19
22
|
* Check if a given object implements the Cart interface.
|
|
20
23
|
*/
|
|
21
24
|
function instanceOfCart(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('channel' in value) || value['channel'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('owner' in value) || value['owner'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('transport' in value) || value['transport'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('seller' in value) || value['seller'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('lineCount' in value) || value['lineCount'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('lines' in value) || value['lines'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('totalBuyerCommissionExcludingTaxes' in value) || value['totalBuyerCommissionExcludingTaxes'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('totalExcludingTaxes' in value) || value['totalExcludingTaxes'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('totalIncludingTaxes' in value) || value['totalIncludingTaxes'] === undefined)
|
|
48
|
+
return false;
|
|
22
49
|
return true;
|
|
23
50
|
}
|
|
24
51
|
exports.instanceOfCart = instanceOfCart;
|
|
@@ -32,8 +59,17 @@ function CartFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
59
|
}
|
|
33
60
|
return {
|
|
34
61
|
'id': json['id'],
|
|
62
|
+
'createdAt': (json['createdAt'] === null || json['createdAt'] === undefined) ? json['createdAt'] : new Date(json['createdAt']),
|
|
63
|
+
'updatedAt': (json['updatedAt'] === null || json['updatedAt'] === undefined) ? json['updatedAt'] : new Date(json['updatedAt']),
|
|
64
|
+
'channel': json['channel'],
|
|
65
|
+
'owner': (json['owner'] === null || json['owner'] === undefined) ? json['owner'] : (0, OwnerLink_1.OwnerLinkFromJSON)(json['owner']),
|
|
66
|
+
'transport': (json['transport'] === null || json['transport'] === undefined) ? json['transport'] : (0, CartTransport_1.CartTransportFromJSON)(json['transport']),
|
|
67
|
+
'seller': (json['seller'] === null || json['seller'] === undefined) ? json['seller'] : (0, SellerLink_1.SellerLinkFromJSON)(json['seller']),
|
|
35
68
|
'lineCount': json['lineCount'],
|
|
36
|
-
'
|
|
69
|
+
'lines': (json['lines'] === null || json['lines'] === undefined) ? json['lines'] : (0, HttpLink_1.HttpLinkFromJSON)(json['lines']),
|
|
70
|
+
'totalBuyerCommissionExcludingTaxes': json['totalBuyerCommissionExcludingTaxes'],
|
|
71
|
+
'totalExcludingTaxes': json['totalExcludingTaxes'],
|
|
72
|
+
'totalIncludingTaxes': json['totalIncludingTaxes'],
|
|
37
73
|
};
|
|
38
74
|
}
|
|
39
75
|
exports.CartFromJSONTyped = CartFromJSONTyped;
|
|
@@ -43,8 +79,17 @@ function CartToJSON(value) {
|
|
|
43
79
|
}
|
|
44
80
|
return {
|
|
45
81
|
'id': value['id'],
|
|
82
|
+
'createdAt': (value['createdAt'] === null || value['createdAt'] === undefined) ? value['createdAt'] : (value['createdAt']).toISOString(),
|
|
83
|
+
'updatedAt': (value['updatedAt'] === null || value['updatedAt'] === undefined) ? value['updatedAt'] : (value['updatedAt']).toISOString(),
|
|
84
|
+
'channel': value['channel'],
|
|
85
|
+
'owner': (0, OwnerLink_1.OwnerLinkToJSON)(value['owner']),
|
|
86
|
+
'transport': (0, CartTransport_1.CartTransportToJSON)(value['transport']),
|
|
87
|
+
'seller': (0, SellerLink_1.SellerLinkToJSON)(value['seller']),
|
|
46
88
|
'lineCount': value['lineCount'],
|
|
47
|
-
'
|
|
89
|
+
'lines': (0, HttpLink_1.HttpLinkToJSON)(value['lines']),
|
|
90
|
+
'totalBuyerCommissionExcludingTaxes': value['totalBuyerCommissionExcludingTaxes'],
|
|
91
|
+
'totalExcludingTaxes': value['totalExcludingTaxes'],
|
|
92
|
+
'totalIncludingTaxes': value['totalIncludingTaxes'],
|
|
48
93
|
};
|
|
49
94
|
}
|
|
50
95
|
exports.CartToJSON = CartToJSON;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-monolith-service
|
|
3
|
+
* This is the REST API of LCDP products
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ShoppedOffer } from './ShoppedOffer';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CartCreationParameters
|
|
17
|
+
*/
|
|
18
|
+
export interface CartCreationParameters {
|
|
19
|
+
/**
|
|
20
|
+
* Id of the cart owner
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof CartCreationParameters
|
|
23
|
+
*/
|
|
24
|
+
ownerId: number;
|
|
25
|
+
/**
|
|
26
|
+
* Channel identifier (e.g. "express-order:uuid")
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof CartCreationParameters
|
|
29
|
+
*/
|
|
30
|
+
channel: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Array<ShoppedOffer>}
|
|
34
|
+
* @memberof CartCreationParameters
|
|
35
|
+
*/
|
|
36
|
+
shoppedOffers: Array<ShoppedOffer>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CartCreationParameters interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfCartCreationParameters(value: object): value is CartCreationParameters;
|
|
42
|
+
export declare function CartCreationParametersFromJSON(json: any): CartCreationParameters;
|
|
43
|
+
export declare function CartCreationParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCreationParameters;
|
|
44
|
+
export declare function CartCreationParametersToJSON(value?: CartCreationParameters | null): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-monolith-service
|
|
6
|
+
* This is the REST API of LCDP products
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CartCreationParametersToJSON = exports.CartCreationParametersFromJSONTyped = exports.CartCreationParametersFromJSON = exports.instanceOfCartCreationParameters = void 0;
|
|
17
|
+
var ShoppedOffer_1 = require("./ShoppedOffer");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the CartCreationParameters interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfCartCreationParameters(value) {
|
|
22
|
+
if (!('ownerId' in value) || value['ownerId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('channel' in value) || value['channel'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('shoppedOffers' in value) || value['shoppedOffers'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
exports.instanceOfCartCreationParameters = instanceOfCartCreationParameters;
|
|
31
|
+
function CartCreationParametersFromJSON(json) {
|
|
32
|
+
return CartCreationParametersFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
exports.CartCreationParametersFromJSON = CartCreationParametersFromJSON;
|
|
35
|
+
function CartCreationParametersFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'ownerId': json['ownerId'],
|
|
41
|
+
'channel': json['channel'],
|
|
42
|
+
'shoppedOffers': (json['shoppedOffers'] === null || json['shoppedOffers'] === undefined) ? json['shoppedOffers'] : json['shoppedOffers'].map(ShoppedOffer_1.ShoppedOfferFromJSON),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.CartCreationParametersFromJSONTyped = CartCreationParametersFromJSONTyped;
|
|
46
|
+
function CartCreationParametersToJSON(value) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'ownerId': value['ownerId'],
|
|
52
|
+
'channel': value['channel'],
|
|
53
|
+
'shoppedOffers': (value['shoppedOffers'] === null || value['shoppedOffers'] === undefined) ? value['shoppedOffers'] : value['shoppedOffers'].map(ShoppedOffer_1.ShoppedOfferToJSON),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.CartCreationParametersToJSON = CartCreationParametersToJSON;
|
|
@@ -14,50 +14,50 @@ import type { SaleOfferLink } from './SaleOfferLink';
|
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
16
16
|
* @export
|
|
17
|
-
* @interface
|
|
17
|
+
* @interface CartLine
|
|
18
18
|
*/
|
|
19
|
-
export interface
|
|
19
|
+
export interface CartLine {
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
22
|
* @type {number}
|
|
23
|
-
* @memberof
|
|
23
|
+
* @memberof CartLine
|
|
24
24
|
*/
|
|
25
25
|
id: number;
|
|
26
26
|
/**
|
|
27
27
|
* Quantity desired by the buyer
|
|
28
28
|
* @type {number}
|
|
29
|
-
* @memberof
|
|
29
|
+
* @memberof CartLine
|
|
30
30
|
*/
|
|
31
31
|
quantity: number;
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
34
|
* @type {ProductLink}
|
|
35
|
-
* @memberof
|
|
35
|
+
* @memberof CartLine
|
|
36
36
|
*/
|
|
37
37
|
product: ProductLink;
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
40
40
|
* @type {SaleOfferLink}
|
|
41
|
-
* @memberof
|
|
41
|
+
* @memberof CartLine
|
|
42
42
|
*/
|
|
43
43
|
saleOffer: SaleOfferLink;
|
|
44
44
|
/**
|
|
45
45
|
*
|
|
46
46
|
* @type {number}
|
|
47
|
-
* @memberof
|
|
47
|
+
* @memberof CartLine
|
|
48
48
|
*/
|
|
49
49
|
distributionRangeId?: number;
|
|
50
50
|
/**
|
|
51
51
|
* Total price of the line excluding taxes
|
|
52
52
|
* @type {number}
|
|
53
|
-
* @memberof
|
|
53
|
+
* @memberof CartLine
|
|
54
54
|
*/
|
|
55
55
|
totalExcludingTaxes: number;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Check if a given object implements the
|
|
58
|
+
* Check if a given object implements the CartLine interface.
|
|
59
59
|
*/
|
|
60
|
-
export declare function
|
|
61
|
-
export declare function
|
|
62
|
-
export declare function
|
|
63
|
-
export declare function
|
|
60
|
+
export declare function instanceOfCartLine(value: object): value is CartLine;
|
|
61
|
+
export declare function CartLineFromJSON(json: any): CartLine;
|
|
62
|
+
export declare function CartLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartLine;
|
|
63
|
+
export declare function CartLineToJSON(value?: CartLine | null): any;
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.CartLineToJSON = exports.CartLineFromJSONTyped = exports.CartLineFromJSON = exports.instanceOfCartLine = void 0;
|
|
17
17
|
var ProductLink_1 = require("./ProductLink");
|
|
18
18
|
var SaleOfferLink_1 = require("./SaleOfferLink");
|
|
19
19
|
/**
|
|
20
|
-
* Check if a given object implements the
|
|
20
|
+
* Check if a given object implements the CartLine interface.
|
|
21
21
|
*/
|
|
22
|
-
function
|
|
22
|
+
function instanceOfCartLine(value) {
|
|
23
23
|
if (!('id' in value) || value['id'] === undefined)
|
|
24
24
|
return false;
|
|
25
25
|
if (!('quantity' in value) || value['quantity'] === undefined)
|
|
@@ -32,12 +32,12 @@ function instanceOfCartSubCartLine(value) {
|
|
|
32
32
|
return false;
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
|
-
exports.
|
|
36
|
-
function
|
|
37
|
-
return
|
|
35
|
+
exports.instanceOfCartLine = instanceOfCartLine;
|
|
36
|
+
function CartLineFromJSON(json) {
|
|
37
|
+
return CartLineFromJSONTyped(json, false);
|
|
38
38
|
}
|
|
39
|
-
exports.
|
|
40
|
-
function
|
|
39
|
+
exports.CartLineFromJSON = CartLineFromJSON;
|
|
40
|
+
function CartLineFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
41
|
if (json == null) {
|
|
42
42
|
return json;
|
|
43
43
|
}
|
|
@@ -50,8 +50,8 @@ function CartSubCartLineFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
50
|
'totalExcludingTaxes': json['totalExcludingTaxes'],
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
exports.
|
|
54
|
-
function
|
|
53
|
+
exports.CartLineFromJSONTyped = CartLineFromJSONTyped;
|
|
54
|
+
function CartLineToJSON(value) {
|
|
55
55
|
if (value == null) {
|
|
56
56
|
return value;
|
|
57
57
|
}
|
|
@@ -64,4 +64,4 @@ function CartSubCartLineToJSON(value) {
|
|
|
64
64
|
'totalExcludingTaxes': value['totalExcludingTaxes'],
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
exports.
|
|
67
|
+
exports.CartLineToJSON = CartLineToJSON;
|