@lcdp/api-react-rest-client 2.1.0 → 2.1.1-LDS-2801-afficher-des-produits-recommand.4293707880
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/inventory/src/apis/ManageInventoryApi.d.ts +16 -2
- package/inventory/src/apis/ManageInventoryApi.js +80 -0
- package/package.json +1 -1
- package/shopping-cart/src/models/CartSubCart.d.ts +7 -7
- package/shopping-cart/src/models/CartSubCart.js +7 -8
- package/shopping-cart/src/models/CartSubCartLine.d.ts +6 -6
- package/shopping-cart/src/models/CartSubCartLine.js +6 -7
- package/shopping-cart/src/models/CartSubCartTransport.d.ts +10 -4
- package/shopping-cart/src/models/CartSubCartTransport.js +5 -4
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { BaseAPI, ApiResponse } from '../runtime';
|
|
13
|
-
import { ActiveProductUpdateParameters, OverstockProductUpdateParameters } from '../models';
|
|
12
|
+
import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
|
|
13
|
+
import { ActiveProductUpdateParameters, OverstockProductUpdateParameters, Synchroneity } from '../models';
|
|
14
14
|
export interface UpdateCurrentInventoryActiveProductsRequest {
|
|
15
15
|
activeProductUpdateParameters: ActiveProductUpdateParameters;
|
|
16
16
|
pEq?: number;
|
|
@@ -29,6 +29,10 @@ export interface UpdateInventoryOverstockProductsRequest {
|
|
|
29
29
|
overstockProductUpdateParameters: OverstockProductUpdateParameters;
|
|
30
30
|
pEq?: number;
|
|
31
31
|
}
|
|
32
|
+
export interface UpdateInventorySynchroneityRequest {
|
|
33
|
+
inventoryId: number;
|
|
34
|
+
synchroneity: Synchroneity;
|
|
35
|
+
}
|
|
32
36
|
/**
|
|
33
37
|
* no description
|
|
34
38
|
*/
|
|
@@ -65,4 +69,14 @@ export declare class ManageInventoryApi extends BaseAPI {
|
|
|
65
69
|
* Add product to black list
|
|
66
70
|
*/
|
|
67
71
|
updateInventoryOverstockProducts(requestParameters: UpdateInventoryOverstockProductsRequest): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Allow to update sycnrhoneity of an inventory. For example to force resynchronize of a source, you can send source synchronizationScheduled to \'True\'. If you want to restart synchronization from the beginning of human life, you can send souyrce lastSynchronizationDate to \'0\'
|
|
74
|
+
* Modify synchroneity state of a user
|
|
75
|
+
*/
|
|
76
|
+
updateInventorySynchroneityRaw(requestParameters: UpdateInventorySynchroneityRequest): Promise<ApiResponse<Synchroneity | BlobWithMeta>>;
|
|
77
|
+
/**
|
|
78
|
+
* Allow to update sycnrhoneity of an inventory. For example to force resynchronize of a source, you can send source synchronizationScheduled to \'True\'. If you want to restart synchronization from the beginning of human life, you can send souyrce lastSynchronizationDate to \'0\'
|
|
79
|
+
* Modify synchroneity state of a user
|
|
80
|
+
*/
|
|
81
|
+
updateInventorySynchroneity(requestParameters: UpdateInventorySynchroneityRequest): Promise<Synchroneity | BlobWithMeta>;
|
|
68
82
|
}
|
|
@@ -341,6 +341,86 @@ var ManageInventoryApi = /** @class */ (function (_super) {
|
|
|
341
341
|
});
|
|
342
342
|
});
|
|
343
343
|
};
|
|
344
|
+
/**
|
|
345
|
+
* Allow to update sycnrhoneity of an inventory. For example to force resynchronize of a source, you can send source synchronizationScheduled to \'True\'. If you want to restart synchronization from the beginning of human life, you can send souyrce lastSynchronizationDate to \'0\'
|
|
346
|
+
* Modify synchroneity state of a user
|
|
347
|
+
*/
|
|
348
|
+
ManageInventoryApi.prototype.updateInventorySynchroneityRaw = function (requestParameters) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
350
|
+
var queryParameters, headerParameters, token, tokenString, response, contentType, response_5;
|
|
351
|
+
return __generator(this, function (_a) {
|
|
352
|
+
switch (_a.label) {
|
|
353
|
+
case 0:
|
|
354
|
+
if (requestParameters.inventoryId === null || requestParameters.inventoryId === undefined) {
|
|
355
|
+
throw new runtime_1.RequiredError('inventoryId', 'Required parameter requestParameters.inventoryId was null or undefined when calling updateInventorySynchroneity.');
|
|
356
|
+
}
|
|
357
|
+
if (requestParameters.synchroneity === null || requestParameters.synchroneity === undefined) {
|
|
358
|
+
throw new runtime_1.RequiredError('synchroneity', 'Required parameter requestParameters.synchroneity was null or undefined when calling updateInventorySynchroneity.');
|
|
359
|
+
}
|
|
360
|
+
queryParameters = {};
|
|
361
|
+
headerParameters = {};
|
|
362
|
+
headerParameters['Content-Type'] = 'application/merge-patch+json';
|
|
363
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
364
|
+
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
|
|
365
|
+
}
|
|
366
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
367
|
+
token = this.configuration.accessToken;
|
|
368
|
+
tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
|
|
369
|
+
if (tokenString) {
|
|
370
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
_a.label = 1;
|
|
374
|
+
case 1:
|
|
375
|
+
_a.trys.push([1, 3, , 4]);
|
|
376
|
+
return [4 /*yield*/, this.request({
|
|
377
|
+
path: "/inventories/{inventoryId}/synchroneity".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters.inventoryId))),
|
|
378
|
+
method: 'PATCH',
|
|
379
|
+
headers: headerParameters,
|
|
380
|
+
query: queryParameters,
|
|
381
|
+
body: (0, models_1.SynchroneityToJSON)(requestParameters.synchroneity),
|
|
382
|
+
})];
|
|
383
|
+
case 2:
|
|
384
|
+
response = _a.sent();
|
|
385
|
+
contentType = response.headers.get("content-type");
|
|
386
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
387
|
+
return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SynchroneityFromJSON)(jsonValue); })];
|
|
388
|
+
}
|
|
389
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
390
|
+
return [2 /*return*/, new runtime_1.TextApiResponse(response)];
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
// TODO : Better handling of others application types
|
|
394
|
+
return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
|
|
395
|
+
}
|
|
396
|
+
return [3 /*break*/, 4];
|
|
397
|
+
case 3:
|
|
398
|
+
response_5 = _a.sent();
|
|
399
|
+
console.debug(response_5);
|
|
400
|
+
throw response_5;
|
|
401
|
+
case 4: return [2 /*return*/];
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* Allow to update sycnrhoneity of an inventory. For example to force resynchronize of a source, you can send source synchronizationScheduled to \'True\'. If you want to restart synchronization from the beginning of human life, you can send souyrce lastSynchronizationDate to \'0\'
|
|
408
|
+
* Modify synchroneity state of a user
|
|
409
|
+
*/
|
|
410
|
+
ManageInventoryApi.prototype.updateInventorySynchroneity = function (requestParameters) {
|
|
411
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
412
|
+
var response;
|
|
413
|
+
return __generator(this, function (_a) {
|
|
414
|
+
switch (_a.label) {
|
|
415
|
+
case 0: return [4 /*yield*/, this.updateInventorySynchroneityRaw(requestParameters)];
|
|
416
|
+
case 1:
|
|
417
|
+
response = _a.sent();
|
|
418
|
+
return [4 /*yield*/, response.value()];
|
|
419
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
};
|
|
344
424
|
return ManageInventoryApi;
|
|
345
425
|
}(runtime_1.BaseAPI));
|
|
346
426
|
exports.ManageInventoryApi = ManageInventoryApi;
|
package/package.json
CHANGED
|
@@ -23,43 +23,43 @@ export interface CartSubCart {
|
|
|
23
23
|
* @type {number}
|
|
24
24
|
* @memberof CartSubCart
|
|
25
25
|
*/
|
|
26
|
-
id
|
|
26
|
+
id: number;
|
|
27
27
|
/**
|
|
28
28
|
*
|
|
29
29
|
* @type {CartSubCartTransport}
|
|
30
30
|
* @memberof CartSubCart
|
|
31
31
|
*/
|
|
32
|
-
transport
|
|
32
|
+
transport: CartSubCartTransport;
|
|
33
33
|
/**
|
|
34
34
|
*
|
|
35
35
|
* @type {SellerLink}
|
|
36
36
|
* @memberof CartSubCart
|
|
37
37
|
*/
|
|
38
|
-
seller
|
|
38
|
+
seller: SellerLink;
|
|
39
39
|
/**
|
|
40
40
|
*
|
|
41
41
|
* @type {number}
|
|
42
42
|
* @memberof CartSubCart
|
|
43
43
|
*/
|
|
44
|
-
lineCount
|
|
44
|
+
lineCount: number;
|
|
45
45
|
/**
|
|
46
46
|
*
|
|
47
47
|
* @type {HttpLink}
|
|
48
48
|
* @memberof CartSubCart
|
|
49
49
|
*/
|
|
50
|
-
lines
|
|
50
|
+
lines: HttpLink;
|
|
51
51
|
/**
|
|
52
52
|
* Total buyer commission for this sub cart
|
|
53
53
|
* @type {number}
|
|
54
54
|
* @memberof CartSubCart
|
|
55
55
|
*/
|
|
56
|
-
totalBuyerCommissionExcludingTaxes
|
|
56
|
+
totalBuyerCommissionExcludingTaxes: number;
|
|
57
57
|
/**
|
|
58
58
|
* Total price of the cart excluding taxes
|
|
59
59
|
* @type {number}
|
|
60
60
|
* @memberof CartSubCart
|
|
61
61
|
*/
|
|
62
|
-
totalExcludingTaxes
|
|
62
|
+
totalExcludingTaxes: number;
|
|
63
63
|
}
|
|
64
64
|
export declare function CartSubCartFromJSON(json: any): CartSubCart;
|
|
65
65
|
export declare function CartSubCartFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartSubCart;
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.CartSubCartToJSON = exports.CartSubCartFromJSONTyped = exports.CartSubCartFromJSON = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var CartSubCartTransport_1 = require("./CartSubCartTransport");
|
|
19
18
|
var HttpLink_1 = require("./HttpLink");
|
|
20
19
|
var SellerLink_1 = require("./SellerLink");
|
|
@@ -27,13 +26,13 @@ function CartSubCartFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
27
26
|
return json;
|
|
28
27
|
}
|
|
29
28
|
return {
|
|
30
|
-
'id':
|
|
31
|
-
'transport':
|
|
32
|
-
'seller':
|
|
33
|
-
'lineCount':
|
|
34
|
-
'lines':
|
|
35
|
-
'totalBuyerCommissionExcludingTaxes':
|
|
36
|
-
'totalExcludingTaxes':
|
|
29
|
+
'id': json['id'],
|
|
30
|
+
'transport': (0, CartSubCartTransport_1.CartSubCartTransportFromJSON)(json['transport']),
|
|
31
|
+
'seller': (0, SellerLink_1.SellerLinkFromJSON)(json['seller']),
|
|
32
|
+
'lineCount': json['lineCount'],
|
|
33
|
+
'lines': (0, HttpLink_1.HttpLinkFromJSON)(json['lines']),
|
|
34
|
+
'totalBuyerCommissionExcludingTaxes': json['totalBuyerCommissionExcludingTaxes'],
|
|
35
|
+
'totalExcludingTaxes': json['totalExcludingTaxes'],
|
|
37
36
|
};
|
|
38
37
|
}
|
|
39
38
|
exports.CartSubCartFromJSONTyped = CartSubCartFromJSONTyped;
|
|
@@ -22,37 +22,37 @@ export interface CartSubCartLine {
|
|
|
22
22
|
* @type {number}
|
|
23
23
|
* @memberof CartSubCartLine
|
|
24
24
|
*/
|
|
25
|
-
id
|
|
25
|
+
id: number;
|
|
26
26
|
/**
|
|
27
27
|
* Quantity desired by the buyer
|
|
28
28
|
* @type {number}
|
|
29
29
|
* @memberof CartSubCartLine
|
|
30
30
|
*/
|
|
31
|
-
quantity
|
|
31
|
+
quantity: number;
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
34
|
* @type {ProductLink}
|
|
35
35
|
* @memberof CartSubCartLine
|
|
36
36
|
*/
|
|
37
|
-
product
|
|
37
|
+
product: ProductLink;
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
40
40
|
* @type {SaleOfferLink}
|
|
41
41
|
* @memberof CartSubCartLine
|
|
42
42
|
*/
|
|
43
|
-
saleOffer
|
|
43
|
+
saleOffer: SaleOfferLink;
|
|
44
44
|
/**
|
|
45
45
|
*
|
|
46
46
|
* @type {number}
|
|
47
47
|
* @memberof CartSubCartLine
|
|
48
48
|
*/
|
|
49
|
-
distributionRangeId
|
|
49
|
+
distributionRangeId: number | null;
|
|
50
50
|
/**
|
|
51
51
|
* Total price of the line excluding taxes
|
|
52
52
|
* @type {number}
|
|
53
53
|
* @memberof CartSubCartLine
|
|
54
54
|
*/
|
|
55
|
-
totalExcludingTaxes
|
|
55
|
+
totalExcludingTaxes: number;
|
|
56
56
|
}
|
|
57
57
|
export declare function CartSubCartLineFromJSON(json: any): CartSubCartLine;
|
|
58
58
|
export declare function CartSubCartLineFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartSubCartLine;
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.CartSubCartLineToJSON = exports.CartSubCartLineFromJSONTyped = exports.CartSubCartLineFromJSON = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var ProductLink_1 = require("./ProductLink");
|
|
19
18
|
var SaleOfferLink_1 = require("./SaleOfferLink");
|
|
20
19
|
function CartSubCartLineFromJSON(json) {
|
|
@@ -26,12 +25,12 @@ function CartSubCartLineFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
25
|
return json;
|
|
27
26
|
}
|
|
28
27
|
return {
|
|
29
|
-
'id':
|
|
30
|
-
'quantity':
|
|
31
|
-
'product':
|
|
32
|
-
'saleOffer':
|
|
33
|
-
'distributionRangeId':
|
|
34
|
-
'totalExcludingTaxes':
|
|
28
|
+
'id': json['id'],
|
|
29
|
+
'quantity': json['quantity'],
|
|
30
|
+
'product': (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
|
|
31
|
+
'saleOffer': (0, SaleOfferLink_1.SaleOfferLinkFromJSON)(json['saleOffer']),
|
|
32
|
+
'distributionRangeId': json['distributionRangeId'],
|
|
33
|
+
'totalExcludingTaxes': json['totalExcludingTaxes'],
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
36
|
exports.CartSubCartLineFromJSONTyped = CartSubCartLineFromJSONTyped;
|
|
@@ -20,19 +20,25 @@ export interface CartSubCartTransport {
|
|
|
20
20
|
* @type {number}
|
|
21
21
|
* @memberof CartSubCartTransport
|
|
22
22
|
*/
|
|
23
|
-
minimumPrice
|
|
23
|
+
minimumPrice: number | null;
|
|
24
24
|
/**
|
|
25
25
|
* Total shipping fees price of the sub cart excluding taxes
|
|
26
26
|
* @type {number}
|
|
27
27
|
* @memberof CartSubCartTransport
|
|
28
28
|
*/
|
|
29
|
-
totalShippingFeesExcludingTaxes
|
|
29
|
+
totalShippingFeesExcludingTaxes: number;
|
|
30
30
|
/**
|
|
31
|
-
* Limit in euro (totalExcludingTaxes) to achieve to have free
|
|
31
|
+
* Limit in euro (totalExcludingTaxes) to achieve to have free shipping fees. If no free carriage threshold reachable, value is null.
|
|
32
32
|
* @type {number}
|
|
33
33
|
* @memberof CartSubCartTransport
|
|
34
34
|
*/
|
|
35
|
-
freeCarriageThreshold
|
|
35
|
+
freeCarriageThreshold: number | null;
|
|
36
|
+
/**
|
|
37
|
+
* Delivery delay in days
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof CartSubCartTransport
|
|
40
|
+
*/
|
|
41
|
+
deliveryDelay: number | null;
|
|
36
42
|
}
|
|
37
43
|
export declare function CartSubCartTransportFromJSON(json: any): CartSubCartTransport;
|
|
38
44
|
export declare function CartSubCartTransportFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartSubCartTransport;
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.CartSubCartTransportToJSON = exports.CartSubCartTransportFromJSONTyped = exports.CartSubCartTransportFromJSON = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
function CartSubCartTransportFromJSON(json) {
|
|
19
18
|
return CartSubCartTransportFromJSONTyped(json, false);
|
|
20
19
|
}
|
|
@@ -24,9 +23,10 @@ function CartSubCartTransportFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
24
23
|
return json;
|
|
25
24
|
}
|
|
26
25
|
return {
|
|
27
|
-
'minimumPrice':
|
|
28
|
-
'totalShippingFeesExcludingTaxes':
|
|
29
|
-
'freeCarriageThreshold':
|
|
26
|
+
'minimumPrice': json['minimumPrice'],
|
|
27
|
+
'totalShippingFeesExcludingTaxes': json['totalShippingFeesExcludingTaxes'],
|
|
28
|
+
'freeCarriageThreshold': json['freeCarriageThreshold'],
|
|
29
|
+
'deliveryDelay': json['deliveryDelay'],
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
exports.CartSubCartTransportFromJSONTyped = CartSubCartTransportFromJSONTyped;
|
|
@@ -41,6 +41,7 @@ function CartSubCartTransportToJSON(value) {
|
|
|
41
41
|
'minimumPrice': value.minimumPrice,
|
|
42
42
|
'totalShippingFeesExcludingTaxes': value.totalShippingFeesExcludingTaxes,
|
|
43
43
|
'freeCarriageThreshold': value.freeCarriageThreshold,
|
|
44
|
+
'deliveryDelay': value.deliveryDelay,
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
47
|
exports.CartSubCartTransportToJSON = CartSubCartTransportToJSON;
|