@lcdp/api-react-rest-client 3.1.9 → 3.1.10
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/models/RestError.d.ts +3 -5
- package/auth/src/models/RestError.js +3 -5
- package/catalog/src/models/RestError.d.ts +3 -5
- package/catalog/src/models/RestError.js +3 -5
- package/chargebee-hook/src/models/RestError.d.ts +3 -5
- package/chargebee-hook/src/models/RestError.js +3 -5
- package/configuration/src/models/RestError.d.ts +3 -5
- package/configuration/src/models/RestError.js +3 -5
- package/content/src/models/RestError.d.ts +3 -5
- package/content/src/models/RestError.js +3 -5
- package/favorite/src/models/RestError.d.ts +3 -5
- package/favorite/src/models/RestError.js +3 -5
- package/inventory/src/models/RestError.d.ts +3 -5
- package/inventory/src/models/RestError.js +3 -5
- package/invoice/src/models/RestError.d.ts +3 -5
- package/invoice/src/models/RestError.js +3 -5
- package/laboratory-store/src/models/RestError.d.ts +3 -5
- package/laboratory-store/src/models/RestError.js +3 -5
- package/lexicon/src/models/RestError.d.ts +3 -5
- package/lexicon/src/models/RestError.js +3 -5
- package/litigation/src/models/RestError.d.ts +3 -5
- package/litigation/src/models/RestError.js +3 -5
- package/magic-cart/src/models/ExpressOrder.d.ts +4 -4
- package/magic-cart/src/models/ExpressOrder.js +7 -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/mangopay-hook/src/models/RestError.d.ts +3 -5
- package/mangopay-hook/src/models/RestError.js +3 -5
- package/notification/src/models/NotificationTypeId.d.ts +0 -1
- package/notification/src/models/NotificationTypeId.js +0 -1
- package/notification/src/models/RestError.d.ts +3 -5
- package/notification/src/models/RestError.js +3 -5
- package/order/src/apis/ManageForeorderApi.d.ts +31 -0
- package/order/src/apis/ManageForeorderApi.js +163 -0
- package/order/src/apis/ManageOrderApi.d.ts +9 -9
- package/order/src/apis/ManageOrderApi.js +12 -13
- package/order/src/apis/SearchForeorderItemApi.d.ts +44 -0
- package/order/src/apis/SearchForeorderItemApi.js +175 -0
- package/order/src/apis/index.d.ts +2 -1
- package/order/src/apis/index.js +2 -1
- package/order/src/models/AnyForeorderCreationParameters.d.ts +23 -0
- package/order/src/models/AnyForeorderCreationParameters.js +45 -0
- package/order/src/models/AnyForeorderWarning.d.ts +26 -0
- package/order/src/models/AnyForeorderWarning.js +50 -0
- package/order/src/models/AnyOrderCreationParameters.d.ts +26 -0
- package/order/src/models/AnyOrderCreationParameters.js +50 -0
- package/order/src/models/AnySource.d.ts +26 -0
- package/order/src/models/AnySource.js +50 -0
- package/order/src/models/CartForeorderCreationParameters.d.ts +37 -0
- package/order/src/models/CartForeorderCreationParameters.js +51 -0
- package/order/src/models/CartSource.d.ts +37 -0
- package/order/src/models/CartSource.js +49 -0
- package/order/src/models/CloneOrderCreationParameters.d.ts +37 -0
- package/order/src/models/CloneOrderCreationParameters.js +51 -0
- package/order/src/models/Foreorder.d.ts +155 -0
- package/order/src/models/Foreorder.js +128 -0
- package/order/src/models/ForeorderCreationParameters.d.ts +31 -0
- package/order/src/models/ForeorderCreationParameters.js +47 -0
- package/order/src/models/ForeorderItemWarning.d.ts +77 -0
- package/order/src/models/{OrderItemWarning.js → ForeorderItemWarning.js} +21 -18
- package/order/src/models/ForeorderOrderCreationParameters.d.ts +37 -0
- package/order/src/models/ForeorderOrderCreationParameters.js +51 -0
- package/order/src/models/ForeorderWarning.d.ts +51 -0
- package/order/src/models/{OrderWarning.js → ForeorderWarning.js} +12 -12
- package/order/src/models/ForeorderWarningBase.d.ts +37 -0
- package/order/src/models/ForeorderWarningBase.js +51 -0
- package/order/src/models/ForeordersWithWarnings.d.ts +39 -0
- package/order/src/models/ForeordersWithWarnings.js +53 -0
- package/order/src/models/Order.d.ts +80 -75
- package/order/src/models/Order.js +53 -48
- package/order/src/models/OrderAddedItem.d.ts +9 -9
- package/order/src/models/OrderAddedItem.js +18 -0
- package/order/src/models/OrderCreationParameters.d.ts +31 -0
- package/order/src/models/OrderCreationParameters.js +47 -0
- package/order/src/models/OrderItem.d.ts +9 -9
- package/order/src/models/OrderItem.js +18 -0
- package/order/src/models/OrderItemPrices.d.ts +8 -8
- package/order/src/models/OrderItemPrices.js +10 -0
- package/order/src/models/OrderPrices.d.ts +9 -9
- package/order/src/models/OrderPrices.js +18 -0
- package/order/src/models/OrderRefundedItem.d.ts +9 -9
- package/order/src/models/OrderRefundedItem.js +18 -0
- package/order/src/models/OrderRemovedItem.d.ts +9 -9
- package/order/src/models/OrderRemovedItem.js +18 -0
- package/order/src/models/OrderSource.d.ts +37 -0
- package/order/src/models/OrderSource.js +49 -0
- package/order/src/models/Reservation.d.ts +7 -7
- package/order/src/models/Reservation.js +14 -0
- package/order/src/models/RestError.d.ts +3 -5
- package/order/src/models/RestError.js +3 -5
- package/order/src/models/ShoppedOffer.d.ts +2 -2
- package/order/src/models/ShoppedOffer.js +2 -2
- package/order/src/models/Source.d.ts +31 -0
- package/order/src/models/Source.js +45 -0
- package/order/src/models/index.d.ts +17 -9
- package/order/src/models/index.js +17 -9
- package/package.json +1 -1
- package/product/src/models/RestError.d.ts +3 -5
- package/product/src/models/RestError.js +3 -5
- package/pub/src/models/RestError.d.ts +3 -5
- package/pub/src/models/RestError.js +3 -5
- package/rfx/src/models/RestError.d.ts +3 -5
- package/rfx/src/models/RestError.js +3 -5
- package/sale-offer/src/models/RestError.d.ts +3 -5
- package/sale-offer/src/models/RestError.js +3 -5
- package/servant/src/models/RestError.d.ts +3 -5
- package/servant/src/models/RestError.js +3 -5
- package/shipment/src/models/RestError.d.ts +3 -5
- package/shipment/src/models/RestError.js +3 -5
- 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/{order/src/apis/ManageMetaOrderApi.js → shopping-cart/src/apis/SearchCartLineApi.js} +46 -41
- 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 +76 -0
- package/shopping-cart/src/models/CartWarning.js +69 -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/RestError.d.ts +3 -5
- package/shopping-cart/src/models/RestError.js +3 -5
- 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/smuggler/src/models/RestError.d.ts +3 -5
- package/smuggler/src/models/RestError.js +3 -5
- package/statistic/src/models/RestError.d.ts +3 -5
- package/statistic/src/models/RestError.js +3 -5
- package/third-party/src/models/RestError.d.ts +3 -5
- package/third-party/src/models/RestError.js +3 -5
- package/ubo/src/apis/ManageUboDeclarationApi.d.ts +2 -2
- package/ubo/src/apis/ManageUboDeclarationApi.js +2 -2
- package/ubo/src/models/RestError.d.ts +3 -5
- package/ubo/src/models/RestError.js +3 -5
- package/user/src/models/NotificationTypeId.d.ts +0 -1
- package/user/src/models/NotificationTypeId.js +0 -1
- package/user/src/models/RestError.d.ts +3 -5
- package/user/src/models/RestError.js +3 -5
- package/user/src/models/User.d.ts +7 -0
- package/user/src/models/User.js +3 -0
- package/user/src/models/UserMangopayUbo.d.ts +31 -0
- package/user/src/models/UserMangopayUbo.js +45 -0
- package/user/src/models/index.d.ts +1 -0
- package/user/src/models/index.js +1 -0
- package/wish/src/models/RestError.d.ts +3 -5
- package/wish/src/models/RestError.js +3 -5
- 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/order/src/apis/ManageMetaOrderApi.d.ts +0 -45
- package/order/src/models/AnyMetaOrderWarning.d.ts +0 -26
- package/order/src/models/AnyMetaOrderWarning.js +0 -50
- 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/MetaOrderWarning.js +0 -47
- package/order/src/models/MetaOrderWithWarnings.d.ts +0 -39
- package/order/src/models/MetaOrderWithWarnings.js +0 -49
- package/order/src/models/OrderItemWarning.d.ts +0 -72
- package/order/src/models/OrderWarning.d.ts +0 -51
- 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
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface RestError {
|
|
18
18
|
/**
|
|
19
|
-
* Unique code to identify an error : * `CODE000` - Using outdated resource * `CODE001` - Invalid credentials * `CODE002` - Cannot renew token * `CODE003` - Invalid User CGV * `CODE004` - Resource already exists * `CODE005` - User account is disabled * `CODE006` - Invalid schedule * `CODE007` - Wrong Address according CHRONOPOST * `CODE008` - Invalid Mangopay Mandate * `CODE009` - Invalid Status * `CODE010` - Image dimension exceeded * `CODE011` - Empty User Address * `CODE012` - Empty User Legal Name * `CODE013` - Invalid quantities * `CODE014` - Invalid
|
|
19
|
+
* Unique code to identify an error : * `CODE000` - Using outdated resource * `CODE001` - Invalid credentials * `CODE002` - Cannot renew token * `CODE003` - Invalid User CGV * `CODE004` - Resource already exists * `CODE005` - User account is disabled * `CODE006` - Invalid schedule * `CODE007` - Wrong Address according CHRONOPOST * `CODE008` - Invalid Mangopay Mandate * `CODE009` - Invalid Status * `CODE010` - Image dimension exceeded * `CODE011` - Empty User Address * `CODE012` - Empty User Legal Name * `CODE013` - Invalid quantities * `CODE014` - Invalid Foreorders * `CODE015` - Can not release quantity greater than claimed * `CODE016` - Can not release a negative quantity of items * `CODE017` - Batch is forbidden for sale * `CODE018` - Trial already used * `CODE019` - Unable to generate session from disposableToken for admin users * `CODE020` - ETag do not match * `CODE021` - Missing informations for Offisante subscription * `CODE022` - Disabled feature * `CODE023` - Invalid Sca Enrollment status * `CODE024` - Image missing * `CODE025` - Invalid International Bank Account Number
|
|
20
20
|
*
|
|
21
21
|
* @type {string}
|
|
22
22
|
* @memberof RestError
|
|
23
23
|
*/
|
|
24
24
|
code: RestErrorCodeEnum;
|
|
25
25
|
/**
|
|
26
|
-
* Unique code to identify an error : * `MESSAGE000` - Using outdated resource * `MESSAGE001` - Invalid credentials * `MESSAGE002` - Cannot renew token * `MESSAGE003` - Invalid User CGV * `MESSAGE004` - Resource already exists * `MESSAGE005` - User account is disabled * `MESSAGE006` - Invalid schedule * `MESSAGE007` - Wrong Address according CHRONOPOST * `MESSAGE008` - Invalid Mangopay Mandate * `MESSAGE009` - Invalid Status * `MESSAGE010` - Image dimension exceeded * `MESSAGE011` - Empty User Address * `MESSAGE012` - Empty User Legal Name * `MESSAGE013` - Invalid quantities * `MESSAGE014` - Invalid
|
|
26
|
+
* Unique code to identify an error : * `MESSAGE000` - Using outdated resource * `MESSAGE001` - Invalid credentials * `MESSAGE002` - Cannot renew token * `MESSAGE003` - Invalid User CGV * `MESSAGE004` - Resource already exists * `MESSAGE005` - User account is disabled * `MESSAGE006` - Invalid schedule * `MESSAGE007` - Wrong Address according CHRONOPOST * `MESSAGE008` - Invalid Mangopay Mandate * `MESSAGE009` - Invalid Status * `MESSAGE010` - Image dimension exceeded * `MESSAGE011` - Empty User Address * `MESSAGE012` - Empty User Legal Name * `MESSAGE013` - Invalid quantities * `MESSAGE014` - Invalid Foreorder * `MESSAGE015` - Can not release quantity greater than claimed * `MESSAGE016` - Can not release a negative quantity of items * `MESSAGE017` - Batch is forbidden for sale * `MESSAGE018` - Trial already used * `MESSAGE019` - Unable to generate session from disposableToken for admin users * `MESSAGE020` - ETag do not match * `MESSAGE021` - Missing informations for Offisante subscription * `MESSAGE022` - Disabled feature * `MESSAGE023` - Invalid Sca Enrollment status * `MESSAGE024` - Image missing * `MESSAGE025` - Invalid International Bank Account Number
|
|
27
27
|
*
|
|
28
28
|
* @type {string}
|
|
29
29
|
* @memberof RestError
|
|
@@ -60,7 +60,6 @@ export declare const RestErrorCodeEnum: {
|
|
|
60
60
|
readonly CODE023: "CODE023";
|
|
61
61
|
readonly CODE024: "CODE024";
|
|
62
62
|
readonly CODE025: "CODE025";
|
|
63
|
-
readonly CODE026: "CODE026";
|
|
64
63
|
};
|
|
65
64
|
export declare type RestErrorCodeEnum = typeof RestErrorCodeEnum[keyof typeof RestErrorCodeEnum];
|
|
66
65
|
/**
|
|
@@ -81,7 +80,7 @@ export declare const RestErrorMessageEnum: {
|
|
|
81
80
|
readonly MESSAGE011: "Empty User Address";
|
|
82
81
|
readonly MESSAGE012: "Empty User Legal Name";
|
|
83
82
|
readonly MESSAGE013: "Invalid quantities";
|
|
84
|
-
readonly MESSAGE014: "Invalid
|
|
83
|
+
readonly MESSAGE014: "Invalid Foreorder";
|
|
85
84
|
readonly MESSAGE015: "Can not release quantity greater than claimed";
|
|
86
85
|
readonly MESSAGE016: "Can not release a negative quantity of items";
|
|
87
86
|
readonly MESSAGE017: "Batch is forbidden for sale";
|
|
@@ -93,7 +92,6 @@ export declare const RestErrorMessageEnum: {
|
|
|
93
92
|
readonly MESSAGE023: "Invalid Sca Enrollment status";
|
|
94
93
|
readonly MESSAGE024: "Image missing";
|
|
95
94
|
readonly MESSAGE025: "Invalid International Bank Account Number";
|
|
96
|
-
readonly MESSAGE026: "SubCart not found in cart";
|
|
97
95
|
};
|
|
98
96
|
export declare type RestErrorMessageEnum = typeof RestErrorMessageEnum[keyof typeof RestErrorMessageEnum];
|
|
99
97
|
/**
|
|
@@ -43,8 +43,7 @@ exports.RestErrorCodeEnum = {
|
|
|
43
43
|
CODE022: 'CODE022',
|
|
44
44
|
CODE023: 'CODE023',
|
|
45
45
|
CODE024: 'CODE024',
|
|
46
|
-
CODE025: 'CODE025'
|
|
47
|
-
CODE026: 'CODE026'
|
|
46
|
+
CODE025: 'CODE025'
|
|
48
47
|
};
|
|
49
48
|
/**
|
|
50
49
|
* @export
|
|
@@ -64,7 +63,7 @@ exports.RestErrorMessageEnum = {
|
|
|
64
63
|
MESSAGE011: 'Empty User Address',
|
|
65
64
|
MESSAGE012: 'Empty User Legal Name',
|
|
66
65
|
MESSAGE013: 'Invalid quantities',
|
|
67
|
-
MESSAGE014: 'Invalid
|
|
66
|
+
MESSAGE014: 'Invalid Foreorder',
|
|
68
67
|
MESSAGE015: 'Can not release quantity greater than claimed',
|
|
69
68
|
MESSAGE016: 'Can not release a negative quantity of items',
|
|
70
69
|
MESSAGE017: 'Batch is forbidden for sale',
|
|
@@ -75,8 +74,7 @@ exports.RestErrorMessageEnum = {
|
|
|
75
74
|
MESSAGE022: 'Disabled feature',
|
|
76
75
|
MESSAGE023: 'Invalid Sca Enrollment status',
|
|
77
76
|
MESSAGE024: 'Image missing',
|
|
78
|
-
MESSAGE025: 'Invalid International Bank Account Number'
|
|
79
|
-
MESSAGE026: 'SubCart not found in cart'
|
|
77
|
+
MESSAGE025: 'Invalid International Bank Account Number'
|
|
80
78
|
};
|
|
81
79
|
/**
|
|
82
80
|
* Check if a given object implements the RestError interface.
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface RestError {
|
|
18
18
|
/**
|
|
19
|
-
* Unique code to identify an error : * `CODE000` - Using outdated resource * `CODE001` - Invalid credentials * `CODE002` - Cannot renew token * `CODE003` - Invalid User CGV * `CODE004` - Resource already exists * `CODE005` - User account is disabled * `CODE006` - Invalid schedule * `CODE007` - Wrong Address according CHRONOPOST * `CODE008` - Invalid Mangopay Mandate * `CODE009` - Invalid Status * `CODE010` - Image dimension exceeded * `CODE011` - Empty User Address * `CODE012` - Empty User Legal Name * `CODE013` - Invalid quantities * `CODE014` - Invalid
|
|
19
|
+
* Unique code to identify an error : * `CODE000` - Using outdated resource * `CODE001` - Invalid credentials * `CODE002` - Cannot renew token * `CODE003` - Invalid User CGV * `CODE004` - Resource already exists * `CODE005` - User account is disabled * `CODE006` - Invalid schedule * `CODE007` - Wrong Address according CHRONOPOST * `CODE008` - Invalid Mangopay Mandate * `CODE009` - Invalid Status * `CODE010` - Image dimension exceeded * `CODE011` - Empty User Address * `CODE012` - Empty User Legal Name * `CODE013` - Invalid quantities * `CODE014` - Invalid Foreorders * `CODE015` - Can not release quantity greater than claimed * `CODE016` - Can not release a negative quantity of items * `CODE017` - Batch is forbidden for sale * `CODE018` - Trial already used * `CODE019` - Unable to generate session from disposableToken for admin users * `CODE020` - ETag do not match * `CODE021` - Missing informations for Offisante subscription * `CODE022` - Disabled feature * `CODE023` - Invalid Sca Enrollment status * `CODE024` - Image missing * `CODE025` - Invalid International Bank Account Number
|
|
20
20
|
*
|
|
21
21
|
* @type {string}
|
|
22
22
|
* @memberof RestError
|
|
23
23
|
*/
|
|
24
24
|
code: RestErrorCodeEnum;
|
|
25
25
|
/**
|
|
26
|
-
* Unique code to identify an error : * `MESSAGE000` - Using outdated resource * `MESSAGE001` - Invalid credentials * `MESSAGE002` - Cannot renew token * `MESSAGE003` - Invalid User CGV * `MESSAGE004` - Resource already exists * `MESSAGE005` - User account is disabled * `MESSAGE006` - Invalid schedule * `MESSAGE007` - Wrong Address according CHRONOPOST * `MESSAGE008` - Invalid Mangopay Mandate * `MESSAGE009` - Invalid Status * `MESSAGE010` - Image dimension exceeded * `MESSAGE011` - Empty User Address * `MESSAGE012` - Empty User Legal Name * `MESSAGE013` - Invalid quantities * `MESSAGE014` - Invalid
|
|
26
|
+
* Unique code to identify an error : * `MESSAGE000` - Using outdated resource * `MESSAGE001` - Invalid credentials * `MESSAGE002` - Cannot renew token * `MESSAGE003` - Invalid User CGV * `MESSAGE004` - Resource already exists * `MESSAGE005` - User account is disabled * `MESSAGE006` - Invalid schedule * `MESSAGE007` - Wrong Address according CHRONOPOST * `MESSAGE008` - Invalid Mangopay Mandate * `MESSAGE009` - Invalid Status * `MESSAGE010` - Image dimension exceeded * `MESSAGE011` - Empty User Address * `MESSAGE012` - Empty User Legal Name * `MESSAGE013` - Invalid quantities * `MESSAGE014` - Invalid Foreorder * `MESSAGE015` - Can not release quantity greater than claimed * `MESSAGE016` - Can not release a negative quantity of items * `MESSAGE017` - Batch is forbidden for sale * `MESSAGE018` - Trial already used * `MESSAGE019` - Unable to generate session from disposableToken for admin users * `MESSAGE020` - ETag do not match * `MESSAGE021` - Missing informations for Offisante subscription * `MESSAGE022` - Disabled feature * `MESSAGE023` - Invalid Sca Enrollment status * `MESSAGE024` - Image missing * `MESSAGE025` - Invalid International Bank Account Number
|
|
27
27
|
*
|
|
28
28
|
* @type {string}
|
|
29
29
|
* @memberof RestError
|
|
@@ -60,7 +60,6 @@ export declare const RestErrorCodeEnum: {
|
|
|
60
60
|
readonly CODE023: "CODE023";
|
|
61
61
|
readonly CODE024: "CODE024";
|
|
62
62
|
readonly CODE025: "CODE025";
|
|
63
|
-
readonly CODE026: "CODE026";
|
|
64
63
|
};
|
|
65
64
|
export declare type RestErrorCodeEnum = typeof RestErrorCodeEnum[keyof typeof RestErrorCodeEnum];
|
|
66
65
|
/**
|
|
@@ -81,7 +80,7 @@ export declare const RestErrorMessageEnum: {
|
|
|
81
80
|
readonly MESSAGE011: "Empty User Address";
|
|
82
81
|
readonly MESSAGE012: "Empty User Legal Name";
|
|
83
82
|
readonly MESSAGE013: "Invalid quantities";
|
|
84
|
-
readonly MESSAGE014: "Invalid
|
|
83
|
+
readonly MESSAGE014: "Invalid Foreorder";
|
|
85
84
|
readonly MESSAGE015: "Can not release quantity greater than claimed";
|
|
86
85
|
readonly MESSAGE016: "Can not release a negative quantity of items";
|
|
87
86
|
readonly MESSAGE017: "Batch is forbidden for sale";
|
|
@@ -93,7 +92,6 @@ export declare const RestErrorMessageEnum: {
|
|
|
93
92
|
readonly MESSAGE023: "Invalid Sca Enrollment status";
|
|
94
93
|
readonly MESSAGE024: "Image missing";
|
|
95
94
|
readonly MESSAGE025: "Invalid International Bank Account Number";
|
|
96
|
-
readonly MESSAGE026: "SubCart not found in cart";
|
|
97
95
|
};
|
|
98
96
|
export declare type RestErrorMessageEnum = typeof RestErrorMessageEnum[keyof typeof RestErrorMessageEnum];
|
|
99
97
|
/**
|
|
@@ -43,8 +43,7 @@ exports.RestErrorCodeEnum = {
|
|
|
43
43
|
CODE022: 'CODE022',
|
|
44
44
|
CODE023: 'CODE023',
|
|
45
45
|
CODE024: 'CODE024',
|
|
46
|
-
CODE025: 'CODE025'
|
|
47
|
-
CODE026: 'CODE026'
|
|
46
|
+
CODE025: 'CODE025'
|
|
48
47
|
};
|
|
49
48
|
/**
|
|
50
49
|
* @export
|
|
@@ -64,7 +63,7 @@ exports.RestErrorMessageEnum = {
|
|
|
64
63
|
MESSAGE011: 'Empty User Address',
|
|
65
64
|
MESSAGE012: 'Empty User Legal Name',
|
|
66
65
|
MESSAGE013: 'Invalid quantities',
|
|
67
|
-
MESSAGE014: 'Invalid
|
|
66
|
+
MESSAGE014: 'Invalid Foreorder',
|
|
68
67
|
MESSAGE015: 'Can not release quantity greater than claimed',
|
|
69
68
|
MESSAGE016: 'Can not release a negative quantity of items',
|
|
70
69
|
MESSAGE017: 'Batch is forbidden for sale',
|
|
@@ -75,8 +74,7 @@ exports.RestErrorMessageEnum = {
|
|
|
75
74
|
MESSAGE022: 'Disabled feature',
|
|
76
75
|
MESSAGE023: 'Invalid Sca Enrollment status',
|
|
77
76
|
MESSAGE024: 'Image missing',
|
|
78
|
-
MESSAGE025: 'Invalid International Bank Account Number'
|
|
79
|
-
MESSAGE026: 'SubCart not found in cart'
|
|
77
|
+
MESSAGE025: 'Invalid International Bank Account Number'
|
|
80
78
|
};
|
|
81
79
|
/**
|
|
82
80
|
* Check if a given object implements the RestError interface.
|
|
@@ -10,47 +10,58 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
14
|
-
export interface
|
|
15
|
-
|
|
13
|
+
import type { CartCreationParameters, CartUpdateParameters, CartsWithWarnings } from '../models/index';
|
|
14
|
+
export interface CreateOrUpdateCartsRequest {
|
|
15
|
+
cartCreationParameters: CartCreationParameters;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface DeleteCartRequest {
|
|
18
18
|
cartId: number;
|
|
19
19
|
}
|
|
20
|
+
export interface UpdateCartsRequest {
|
|
21
|
+
idEq: Array<number>;
|
|
22
|
+
xChannelConflictResolution?: UpdateCartsXChannelConflictResolutionEnum;
|
|
23
|
+
cartUpdateParameters?: CartUpdateParameters;
|
|
24
|
+
}
|
|
20
25
|
/**
|
|
21
26
|
*
|
|
22
27
|
*/
|
|
23
28
|
export declare class ManageCartApi extends runtime.BaseAPI {
|
|
24
29
|
/**
|
|
25
|
-
* Create
|
|
26
|
-
|
|
27
|
-
createCartRaw(requestParameters: CreateCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Cart | runtime.BlobWithMeta>>;
|
|
28
|
-
/**
|
|
29
|
-
* Create current cart if get cart return object not found
|
|
30
|
+
* Create one or more carts for the given owner with items from shopped offers. Each cart is associated with a channel and a seller. Multiple carts may be created if the shopped offers belong to different sellers.
|
|
31
|
+
* Create carts and add items
|
|
30
32
|
*/
|
|
31
|
-
|
|
33
|
+
createOrUpdateCartsRaw(requestParameters: CreateOrUpdateCartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartsWithWarnings | runtime.BlobWithMeta>>;
|
|
32
34
|
/**
|
|
33
|
-
* Create
|
|
35
|
+
* Create one or more carts for the given owner with items from shopped offers. Each cart is associated with a channel and a seller. Multiple carts may be created if the shopped offers belong to different sellers.
|
|
36
|
+
* Create carts and add items
|
|
34
37
|
*/
|
|
35
|
-
|
|
38
|
+
createOrUpdateCarts(requestParameters: CreateOrUpdateCartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartsWithWarnings | runtime.BlobWithMeta>;
|
|
36
39
|
/**
|
|
37
|
-
*
|
|
40
|
+
* Delete a cart and all its lines.
|
|
41
|
+
* Delete a cart
|
|
38
42
|
*/
|
|
39
|
-
|
|
43
|
+
deleteCartRaw(requestParameters: DeleteCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
40
44
|
/**
|
|
41
|
-
*
|
|
45
|
+
* Delete a cart and all its lines.
|
|
46
|
+
* Delete a cart
|
|
42
47
|
*/
|
|
43
|
-
|
|
48
|
+
deleteCart(requestParameters: DeleteCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
44
49
|
/**
|
|
45
|
-
*
|
|
50
|
+
* Update multiple carts identified by their IDs. Currently supports channel updates with optional conflict resolution (merge or replace strategy). If no update parameters are provided, returns the carts unchanged.
|
|
51
|
+
* Update carts
|
|
46
52
|
*/
|
|
47
|
-
|
|
53
|
+
updateCartsRaw(requestParameters: UpdateCartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartsWithWarnings | runtime.BlobWithMeta>>;
|
|
48
54
|
/**
|
|
49
|
-
*
|
|
55
|
+
* Update multiple carts identified by their IDs. Currently supports channel updates with optional conflict resolution (merge or replace strategy). If no update parameters are provided, returns the carts unchanged.
|
|
56
|
+
* Update carts
|
|
50
57
|
*/
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Get current cart
|
|
54
|
-
*/
|
|
55
|
-
getCurrentCart(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Cart | runtime.BlobWithMeta>;
|
|
58
|
+
updateCarts(requestParameters: UpdateCartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartsWithWarnings | runtime.BlobWithMeta>;
|
|
56
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* @export
|
|
62
|
+
*/
|
|
63
|
+
export declare const UpdateCartsXChannelConflictResolutionEnum: {
|
|
64
|
+
readonly MERGE: "merge";
|
|
65
|
+
readonly REPLACE: "replace";
|
|
66
|
+
};
|
|
67
|
+
export declare type UpdateCartsXChannelConflictResolutionEnum = typeof UpdateCartsXChannelConflictResolutionEnum[keyof typeof UpdateCartsXChannelConflictResolutionEnum];
|
|
@@ -64,7 +64,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.ManageCartApi = void 0;
|
|
67
|
+
exports.UpdateCartsXChannelConflictResolutionEnum = exports.ManageCartApi = void 0;
|
|
68
68
|
var runtime = require("../runtime");
|
|
69
69
|
var index_1 = require("../models/index");
|
|
70
70
|
/**
|
|
@@ -76,19 +76,21 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Create
|
|
79
|
+
* Create one or more carts for the given owner with items from shopped offers. Each cart is associated with a channel and a seller. Multiple carts may be created if the shopped offers belong to different sellers.
|
|
80
|
+
* Create carts and add items
|
|
80
81
|
*/
|
|
81
|
-
ManageCartApi.prototype.
|
|
82
|
+
ManageCartApi.prototype.createOrUpdateCartsRaw = function (requestParameters, initOverrides) {
|
|
82
83
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
84
|
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
|
|
84
85
|
return __generator(this, function (_c) {
|
|
85
86
|
switch (_c.label) {
|
|
86
87
|
case 0:
|
|
87
|
-
if (requestParameters['
|
|
88
|
-
throw new runtime.RequiredError('
|
|
88
|
+
if (requestParameters['cartCreationParameters'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('cartCreationParameters', 'Required parameter "cartCreationParameters" was null or undefined when calling createOrUpdateCarts().');
|
|
89
90
|
}
|
|
90
91
|
queryParameters = {};
|
|
91
92
|
headerParameters = {};
|
|
93
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
92
94
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
93
95
|
_a = headerParameters;
|
|
94
96
|
_b = "x-api-key";
|
|
@@ -109,16 +111,17 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
109
111
|
case 4:
|
|
110
112
|
_c.trys.push([4, 6, , 7]);
|
|
111
113
|
return [4 /*yield*/, this.request({
|
|
112
|
-
path: "/carts
|
|
114
|
+
path: "/carts",
|
|
113
115
|
method: 'POST',
|
|
114
116
|
headers: headerParameters,
|
|
115
117
|
query: queryParameters,
|
|
118
|
+
body: (0, index_1.CartCreationParametersToJSON)(requestParameters['cartCreationParameters']),
|
|
116
119
|
}, initOverrides)];
|
|
117
120
|
case 5:
|
|
118
121
|
response = _c.sent();
|
|
119
122
|
contentType = response.headers.get("content-type");
|
|
120
123
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
121
|
-
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.CartsWithWarningsFromJSON)(jsonValue); })];
|
|
122
125
|
}
|
|
123
126
|
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
124
127
|
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
@@ -138,14 +141,15 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
138
141
|
});
|
|
139
142
|
};
|
|
140
143
|
/**
|
|
141
|
-
* Create
|
|
144
|
+
* Create one or more carts for the given owner with items from shopped offers. Each cart is associated with a channel and a seller. Multiple carts may be created if the shopped offers belong to different sellers.
|
|
145
|
+
* Create carts and add items
|
|
142
146
|
*/
|
|
143
|
-
ManageCartApi.prototype.
|
|
147
|
+
ManageCartApi.prototype.createOrUpdateCarts = function (requestParameters, initOverrides) {
|
|
144
148
|
return __awaiter(this, void 0, void 0, function () {
|
|
145
149
|
var response;
|
|
146
150
|
return __generator(this, function (_a) {
|
|
147
151
|
switch (_a.label) {
|
|
148
|
-
case 0: return [4 /*yield*/, this.
|
|
152
|
+
case 0: return [4 /*yield*/, this.createOrUpdateCartsRaw(requestParameters, initOverrides)];
|
|
149
153
|
case 1:
|
|
150
154
|
response = _a.sent();
|
|
151
155
|
return [4 /*yield*/, response.value()];
|
|
@@ -155,14 +159,18 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
155
159
|
});
|
|
156
160
|
};
|
|
157
161
|
/**
|
|
158
|
-
*
|
|
162
|
+
* Delete a cart and all its lines.
|
|
163
|
+
* Delete a cart
|
|
159
164
|
*/
|
|
160
|
-
ManageCartApi.prototype.
|
|
165
|
+
ManageCartApi.prototype.deleteCartRaw = function (requestParameters, initOverrides) {
|
|
161
166
|
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response,
|
|
167
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
|
|
163
168
|
return __generator(this, function (_c) {
|
|
164
169
|
switch (_c.label) {
|
|
165
170
|
case 0:
|
|
171
|
+
if (requestParameters['cartId'] == null) {
|
|
172
|
+
throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling deleteCart().');
|
|
173
|
+
}
|
|
166
174
|
queryParameters = {};
|
|
167
175
|
headerParameters = {};
|
|
168
176
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
@@ -185,25 +193,14 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
185
193
|
case 4:
|
|
186
194
|
_c.trys.push([4, 6, , 7]);
|
|
187
195
|
return [4 /*yield*/, this.request({
|
|
188
|
-
path: "/carts/
|
|
189
|
-
method: '
|
|
196
|
+
path: "/carts/{cartId}".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))),
|
|
197
|
+
method: 'DELETE',
|
|
190
198
|
headers: headerParameters,
|
|
191
199
|
query: queryParameters,
|
|
192
200
|
}, initOverrides)];
|
|
193
201
|
case 5:
|
|
194
202
|
response = _c.sent();
|
|
195
|
-
|
|
196
|
-
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
197
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CartFromJSON)(jsonValue); })];
|
|
198
|
-
}
|
|
199
|
-
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
200
|
-
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
// TODO : Better handling of others application types
|
|
204
|
-
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
205
|
-
}
|
|
206
|
-
return [3 /*break*/, 7];
|
|
203
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
207
204
|
case 6:
|
|
208
205
|
response_2 = _c.sent();
|
|
209
206
|
console.debug(response_2);
|
|
@@ -214,36 +211,43 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
214
211
|
});
|
|
215
212
|
};
|
|
216
213
|
/**
|
|
217
|
-
*
|
|
214
|
+
* Delete a cart and all its lines.
|
|
215
|
+
* Delete a cart
|
|
218
216
|
*/
|
|
219
|
-
ManageCartApi.prototype.
|
|
217
|
+
ManageCartApi.prototype.deleteCart = function (requestParameters, initOverrides) {
|
|
220
218
|
return __awaiter(this, void 0, void 0, function () {
|
|
221
|
-
var response;
|
|
222
219
|
return __generator(this, function (_a) {
|
|
223
220
|
switch (_a.label) {
|
|
224
|
-
case 0: return [4 /*yield*/, this.
|
|
221
|
+
case 0: return [4 /*yield*/, this.deleteCartRaw(requestParameters, initOverrides)];
|
|
225
222
|
case 1:
|
|
226
|
-
|
|
227
|
-
return [
|
|
228
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
223
|
+
_a.sent();
|
|
224
|
+
return [2 /*return*/];
|
|
229
225
|
}
|
|
230
226
|
});
|
|
231
227
|
});
|
|
232
228
|
};
|
|
233
229
|
/**
|
|
234
|
-
*
|
|
230
|
+
* Update multiple carts identified by their IDs. Currently supports channel updates with optional conflict resolution (merge or replace strategy). If no update parameters are provided, returns the carts unchanged.
|
|
231
|
+
* Update carts
|
|
235
232
|
*/
|
|
236
|
-
ManageCartApi.prototype.
|
|
233
|
+
ManageCartApi.prototype.updateCartsRaw = function (requestParameters, initOverrides) {
|
|
237
234
|
return __awaiter(this, void 0, void 0, function () {
|
|
238
235
|
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_3;
|
|
239
236
|
return __generator(this, function (_c) {
|
|
240
237
|
switch (_c.label) {
|
|
241
238
|
case 0:
|
|
242
|
-
if (requestParameters['
|
|
243
|
-
throw new runtime.RequiredError('
|
|
239
|
+
if (requestParameters['idEq'] == null) {
|
|
240
|
+
throw new runtime.RequiredError('idEq', 'Required parameter "idEq" was null or undefined when calling updateCarts().');
|
|
244
241
|
}
|
|
245
242
|
queryParameters = {};
|
|
243
|
+
if (requestParameters['idEq'] != null) {
|
|
244
|
+
queryParameters['id[eq]'] = requestParameters['idEq'];
|
|
245
|
+
}
|
|
246
246
|
headerParameters = {};
|
|
247
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
248
|
+
if (requestParameters['xChannelConflictResolution'] != null) {
|
|
249
|
+
headerParameters['X-Channel-Conflict-Resolution'] = String(requestParameters['xChannelConflictResolution']);
|
|
250
|
+
}
|
|
247
251
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
248
252
|
_a = headerParameters;
|
|
249
253
|
_b = "x-api-key";
|
|
@@ -264,16 +268,17 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
264
268
|
case 4:
|
|
265
269
|
_c.trys.push([4, 6, , 7]);
|
|
266
270
|
return [4 /*yield*/, this.request({
|
|
267
|
-
path: "/carts
|
|
268
|
-
method: '
|
|
271
|
+
path: "/carts",
|
|
272
|
+
method: 'PATCH',
|
|
269
273
|
headers: headerParameters,
|
|
270
274
|
query: queryParameters,
|
|
275
|
+
body: (0, index_1.CartUpdateParametersToJSON)(requestParameters['cartUpdateParameters']),
|
|
271
276
|
}, initOverrides)];
|
|
272
277
|
case 5:
|
|
273
278
|
response = _c.sent();
|
|
274
279
|
contentType = response.headers.get("content-type");
|
|
275
280
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
276
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.
|
|
281
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CartsWithWarningsFromJSON)(jsonValue); })];
|
|
277
282
|
}
|
|
278
283
|
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
279
284
|
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
@@ -293,90 +298,15 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
293
298
|
});
|
|
294
299
|
};
|
|
295
300
|
/**
|
|
296
|
-
*
|
|
297
|
-
|
|
298
|
-
ManageCartApi.prototype.getCart = function (requestParameters, initOverrides) {
|
|
299
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
300
|
-
var response;
|
|
301
|
-
return __generator(this, function (_a) {
|
|
302
|
-
switch (_a.label) {
|
|
303
|
-
case 0: return [4 /*yield*/, this.getCartRaw(requestParameters, initOverrides)];
|
|
304
|
-
case 1:
|
|
305
|
-
response = _a.sent();
|
|
306
|
-
return [4 /*yield*/, response.value()];
|
|
307
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
};
|
|
312
|
-
/**
|
|
313
|
-
* Get current cart
|
|
314
|
-
*/
|
|
315
|
-
ManageCartApi.prototype.getCurrentCartRaw = function (initOverrides) {
|
|
316
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
317
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_4;
|
|
318
|
-
return __generator(this, function (_c) {
|
|
319
|
-
switch (_c.label) {
|
|
320
|
-
case 0:
|
|
321
|
-
queryParameters = {};
|
|
322
|
-
headerParameters = {};
|
|
323
|
-
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
324
|
-
_a = headerParameters;
|
|
325
|
-
_b = "x-api-key";
|
|
326
|
-
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
327
|
-
case 1:
|
|
328
|
-
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
329
|
-
_c.label = 2;
|
|
330
|
-
case 2:
|
|
331
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
332
|
-
token = this.configuration.accessToken;
|
|
333
|
-
return [4 /*yield*/, token("bearerAuth", [])];
|
|
334
|
-
case 3:
|
|
335
|
-
tokenString = _c.sent();
|
|
336
|
-
if (tokenString) {
|
|
337
|
-
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
338
|
-
}
|
|
339
|
-
_c.label = 4;
|
|
340
|
-
case 4:
|
|
341
|
-
_c.trys.push([4, 6, , 7]);
|
|
342
|
-
return [4 /*yield*/, this.request({
|
|
343
|
-
path: "/carts/me",
|
|
344
|
-
method: 'GET',
|
|
345
|
-
headers: headerParameters,
|
|
346
|
-
query: queryParameters,
|
|
347
|
-
}, initOverrides)];
|
|
348
|
-
case 5:
|
|
349
|
-
response = _c.sent();
|
|
350
|
-
contentType = response.headers.get("content-type");
|
|
351
|
-
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
352
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CartFromJSON)(jsonValue); })];
|
|
353
|
-
}
|
|
354
|
-
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
355
|
-
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
356
|
-
}
|
|
357
|
-
else {
|
|
358
|
-
// TODO : Better handling of others application types
|
|
359
|
-
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
360
|
-
}
|
|
361
|
-
return [3 /*break*/, 7];
|
|
362
|
-
case 6:
|
|
363
|
-
response_4 = _c.sent();
|
|
364
|
-
console.debug(response_4);
|
|
365
|
-
throw response_4;
|
|
366
|
-
case 7: return [2 /*return*/];
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
});
|
|
370
|
-
};
|
|
371
|
-
/**
|
|
372
|
-
* Get current cart
|
|
301
|
+
* Update multiple carts identified by their IDs. Currently supports channel updates with optional conflict resolution (merge or replace strategy). If no update parameters are provided, returns the carts unchanged.
|
|
302
|
+
* Update carts
|
|
373
303
|
*/
|
|
374
|
-
ManageCartApi.prototype.
|
|
304
|
+
ManageCartApi.prototype.updateCarts = function (requestParameters, initOverrides) {
|
|
375
305
|
return __awaiter(this, void 0, void 0, function () {
|
|
376
306
|
var response;
|
|
377
307
|
return __generator(this, function (_a) {
|
|
378
308
|
switch (_a.label) {
|
|
379
|
-
case 0: return [4 /*yield*/, this.
|
|
309
|
+
case 0: return [4 /*yield*/, this.updateCartsRaw(requestParameters, initOverrides)];
|
|
380
310
|
case 1:
|
|
381
311
|
response = _a.sent();
|
|
382
312
|
return [4 /*yield*/, response.value()];
|
|
@@ -388,3 +318,10 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
388
318
|
return ManageCartApi;
|
|
389
319
|
}(runtime.BaseAPI));
|
|
390
320
|
exports.ManageCartApi = ManageCartApi;
|
|
321
|
+
/**
|
|
322
|
+
* @export
|
|
323
|
+
*/
|
|
324
|
+
exports.UpdateCartsXChannelConflictResolutionEnum = {
|
|
325
|
+
MERGE: 'merge',
|
|
326
|
+
REPLACE: 'replace'
|
|
327
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { CartLineUpdateParameters, CartLineWithWarnings } from '../models/index';
|
|
14
|
+
export interface DeleteCartLineRequest {
|
|
15
|
+
cartId: number;
|
|
16
|
+
lineId: number;
|
|
17
|
+
}
|
|
18
|
+
export interface UpdateCartLineRequest {
|
|
19
|
+
cartId: number;
|
|
20
|
+
lineId: number;
|
|
21
|
+
cartLineUpdateParameters: CartLineUpdateParameters;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class ManageCartLineApi extends runtime.BaseAPI {
|
|
27
|
+
/**
|
|
28
|
+
* Delete a shopping cart line. Note: Deleting a cart line does not delete the parent cart, even if it\'s the last line. The associated ad (sale offer) is not affected by this deletion.
|
|
29
|
+
* Delete a cart line
|
|
30
|
+
*/
|
|
31
|
+
deleteCartLineRaw(requestParameters: DeleteCartLineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
32
|
+
/**
|
|
33
|
+
* Delete a shopping cart line. Note: Deleting a cart line does not delete the parent cart, even if it\'s the last line. The associated ad (sale offer) is not affected by this deletion.
|
|
34
|
+
* Delete a cart line
|
|
35
|
+
*/
|
|
36
|
+
deleteCartLine(requestParameters: DeleteCartLineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Update a cart line
|
|
39
|
+
*/
|
|
40
|
+
updateCartLineRaw(requestParameters: UpdateCartLineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartLineWithWarnings | runtime.BlobWithMeta>>;
|
|
41
|
+
/**
|
|
42
|
+
* Update a cart line
|
|
43
|
+
*/
|
|
44
|
+
updateCartLine(requestParameters: UpdateCartLineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartLineWithWarnings | runtime.BlobWithMeta>;
|
|
45
|
+
}
|