@lcdp/api-react-rest-client 3.1.7-LDS-5578-api-distinct-status-code-accodi.23847291272 → 3.1.7-develop.23855465779
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 +5 -3
- package/auth/src/models/RestError.js +5 -3
- package/auth/src/models/index.d.ts +0 -4
- package/auth/src/models/index.js +0 -4
- package/catalog/src/models/RestError.d.ts +5 -3
- package/catalog/src/models/RestError.js +5 -3
- package/chargebee-hook/src/models/RestError.d.ts +5 -3
- package/chargebee-hook/src/models/RestError.js +5 -3
- package/configuration/src/models/RestError.d.ts +5 -3
- package/configuration/src/models/RestError.js +5 -3
- package/content/src/models/RestError.d.ts +5 -3
- package/content/src/models/RestError.js +5 -3
- package/favorite/src/models/RestError.d.ts +5 -3
- package/favorite/src/models/RestError.js +5 -3
- package/inventory/src/models/RestError.d.ts +5 -3
- package/inventory/src/models/RestError.js +5 -3
- package/invoice/src/models/RestError.d.ts +5 -3
- package/invoice/src/models/RestError.js +5 -3
- package/laboratory-store/src/models/RestError.d.ts +5 -3
- package/laboratory-store/src/models/RestError.js +5 -3
- package/lexicon/src/models/RestError.d.ts +5 -3
- package/lexicon/src/models/RestError.js +5 -3
- package/litigation/src/models/RestError.d.ts +5 -3
- package/litigation/src/models/RestError.js +5 -3
- package/magic-cart/src/models/ExpressOrder.d.ts +3 -3
- package/magic-cart/src/models/ExpressOrder.js +3 -3
- package/magic-cart/src/models/SaleOfferProposal.d.ts +51 -0
- package/magic-cart/src/models/SaleOfferProposal.js +61 -0
- package/magic-cart/src/models/SellerProposal.d.ts +45 -0
- package/magic-cart/src/models/SellerProposal.js +57 -0
- package/magic-cart/src/models/index.d.ts +2 -1
- package/magic-cart/src/models/index.js +2 -1
- package/mangopay-hook/src/models/RestError.d.ts +5 -3
- package/mangopay-hook/src/models/RestError.js +5 -3
- package/notification/src/models/RestError.d.ts +5 -3
- package/notification/src/models/RestError.js +5 -3
- package/order/src/apis/ManageMetaOrderApi.d.ts +45 -0
- package/{shopping-cart/src/apis/SearchCartLineApi.js → order/src/apis/ManageMetaOrderApi.js} +41 -46
- package/order/src/apis/ManageOrderApi.d.ts +8 -8
- package/order/src/apis/ManageOrderApi.js +10 -9
- package/order/src/apis/index.d.ts +1 -2
- package/order/src/apis/index.js +1 -2
- package/order/src/models/AnyMetaOrderWarning.d.ts +26 -0
- package/order/src/models/AnyMetaOrderWarning.js +50 -0
- package/order/src/models/MetaOrder.d.ts +64 -0
- package/order/src/models/MetaOrder.js +70 -0
- package/order/src/models/MetaOrderCreationParameters.d.ts +38 -0
- package/order/src/models/MetaOrderCreationParameters.js +52 -0
- package/order/src/models/MetaOrderCreationSubCartParameters.d.ts +31 -0
- package/order/src/models/MetaOrderCreationSubCartParameters.js +47 -0
- package/order/src/models/MetaOrderPrices.d.ts +79 -0
- package/order/src/models/MetaOrderPrices.js +79 -0
- package/order/src/models/MetaOrderWarning.d.ts +31 -0
- package/order/src/models/MetaOrderWarning.js +47 -0
- package/order/src/models/MetaOrderWithWarnings.d.ts +39 -0
- package/order/src/models/MetaOrderWithWarnings.js +49 -0
- package/order/src/models/Order.d.ts +75 -80
- package/order/src/models/Order.js +48 -53
- package/order/src/models/OrderItemPrices.d.ts +3 -3
- package/order/src/models/{ForeorderItemWarning.d.ts → OrderItemWarning.d.ts} +18 -23
- package/order/src/models/{ForeorderItemWarning.js → OrderItemWarning.js} +15 -18
- package/order/src/models/OrderWarning.d.ts +51 -0
- package/order/src/models/{ForeorderWarning.js → OrderWarning.js} +12 -12
- package/order/src/models/RestError.d.ts +5 -3
- package/order/src/models/RestError.js +5 -3
- package/order/src/models/ShoppedOffer.d.ts +2 -2
- package/order/src/models/ShoppedOffer.js +2 -2
- package/order/src/models/index.d.ts +9 -17
- package/order/src/models/index.js +9 -17
- package/package.json +1 -1
- package/product/src/models/RestError.d.ts +5 -3
- package/product/src/models/RestError.js +5 -3
- package/pub/src/models/RestError.d.ts +5 -3
- package/pub/src/models/RestError.js +5 -3
- package/rfx/src/models/RestError.d.ts +5 -3
- package/rfx/src/models/RestError.js +5 -3
- package/sale-offer/src/models/RestError.d.ts +5 -3
- package/sale-offer/src/models/RestError.js +5 -3
- package/servant/src/models/RestError.d.ts +5 -3
- package/servant/src/models/RestError.js +5 -3
- package/shipment/src/models/RestError.d.ts +5 -3
- package/shipment/src/models/RestError.js +5 -3
- package/shopping-cart/src/apis/ManageCartApi.d.ts +24 -35
- package/shopping-cart/src/apis/ManageCartApi.js +120 -57
- package/shopping-cart/src/apis/ManageCartSubCartApi.d.ts +107 -0
- package/shopping-cart/src/apis/ManageCartSubCartApi.js +556 -0
- package/shopping-cart/src/apis/ManageCartSubCartLineApi.d.ts +151 -0
- package/shopping-cart/src/apis/ManageCartSubCartLineApi.js +879 -0
- package/shopping-cart/src/apis/index.d.ts +2 -3
- package/shopping-cart/src/apis/index.js +2 -3
- package/shopping-cart/src/models/Cart.d.ts +4 -61
- package/shopping-cart/src/models/Cart.js +2 -47
- package/shopping-cart/src/models/CartSubCart.d.ts +76 -0
- package/shopping-cart/src/models/CartSubCart.js +78 -0
- package/shopping-cart/src/models/{CartLine.d.ts → CartSubCartLine.d.ts} +13 -13
- package/shopping-cart/src/models/{CartLine.js → CartSubCartLine.js} +11 -11
- package/shopping-cart/src/models/CartSubCartLineUpdateParameters.d.ts +37 -0
- package/shopping-cart/src/models/CartSubCartLineUpdateParameters.js +49 -0
- package/shopping-cart/src/models/{CartTransport.d.ts → CartSubCartTransport.d.ts} +12 -12
- package/shopping-cart/src/models/{CartTransport.js → CartSubCartTransport.js} +11 -11
- package/shopping-cart/src/models/RestError.d.ts +5 -3
- package/shopping-cart/src/models/RestError.js +5 -3
- 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 +4 -12
- package/shopping-cart/src/models/index.js +4 -12
- package/smuggler/src/models/RestError.d.ts +5 -3
- package/smuggler/src/models/RestError.js +5 -3
- package/statistic/src/models/RestError.d.ts +5 -3
- package/statistic/src/models/RestError.js +5 -3
- package/third-party/src/models/RestError.d.ts +5 -3
- package/third-party/src/models/RestError.js +5 -3
- package/ubo/src/models/RestError.d.ts +5 -3
- package/ubo/src/models/RestError.js +5 -3
- package/user/src/models/RestError.d.ts +5 -3
- package/user/src/models/RestError.js +5 -3
- package/wish/src/models/RestError.d.ts +5 -3
- package/wish/src/models/RestError.js +5 -3
- package/auth/src/models/AnonymousUser.d.ts +0 -43
- package/auth/src/models/AnonymousUser.js +0 -55
- package/auth/src/models/AnyUser.d.ts +0 -26
- package/auth/src/models/AnyUser.js +0 -50
- package/auth/src/models/IdentifiedUser.d.ts +0 -37
- package/auth/src/models/IdentifiedUser.js +0 -51
- package/auth/src/models/User.d.ts +0 -31
- package/auth/src/models/User.js +0 -47
- package/magic-cart/src/models/ShoppedOffer.d.ts +0 -43
- package/magic-cart/src/models/ShoppedOffer.js +0 -53
- package/order/src/apis/ManageForeorderApi.d.ts +0 -31
- package/order/src/apis/ManageForeorderApi.js +0 -163
- package/order/src/apis/SearchForeorderItemApi.d.ts +0 -44
- package/order/src/apis/SearchForeorderItemApi.js +0 -175
- package/order/src/models/AnyForeorderCreationParameters.d.ts +0 -23
- package/order/src/models/AnyForeorderCreationParameters.js +0 -45
- package/order/src/models/AnyForeorderWarning.d.ts +0 -26
- package/order/src/models/AnyForeorderWarning.js +0 -50
- package/order/src/models/AnyOrderCreationParameters.d.ts +0 -26
- package/order/src/models/AnyOrderCreationParameters.js +0 -50
- package/order/src/models/AnySource.d.ts +0 -26
- package/order/src/models/AnySource.js +0 -50
- package/order/src/models/CartForeorderCreationParameters.d.ts +0 -37
- package/order/src/models/CartForeorderCreationParameters.js +0 -51
- package/order/src/models/CartSource.d.ts +0 -37
- package/order/src/models/CartSource.js +0 -49
- package/order/src/models/CloneOrderCreationParameters.d.ts +0 -37
- package/order/src/models/CloneOrderCreationParameters.js +0 -51
- package/order/src/models/Foreorder.d.ts +0 -155
- package/order/src/models/Foreorder.js +0 -128
- package/order/src/models/ForeorderCreationParameters.d.ts +0 -31
- package/order/src/models/ForeorderCreationParameters.js +0 -47
- package/order/src/models/ForeorderOrderCreationParameters.d.ts +0 -37
- package/order/src/models/ForeorderOrderCreationParameters.js +0 -51
- package/order/src/models/ForeorderWarning.d.ts +0 -51
- package/order/src/models/ForeorderWarningBase.d.ts +0 -37
- package/order/src/models/ForeorderWarningBase.js +0 -51
- package/order/src/models/ForeorderWithWarnings.d.ts +0 -39
- package/order/src/models/ForeorderWithWarnings.js +0 -53
- package/order/src/models/OrderCreationParameters.d.ts +0 -31
- package/order/src/models/OrderCreationParameters.js +0 -47
- package/order/src/models/OrderSource.d.ts +0 -37
- package/order/src/models/OrderSource.js +0 -49
- package/order/src/models/Source.d.ts +0 -31
- package/order/src/models/Source.js +0 -45
- package/shopping-cart/src/apis/ManageCartLineApi.d.ts +0 -45
- package/shopping-cart/src/apis/ManageCartLineApi.js +0 -238
- package/shopping-cart/src/apis/SearchCartApi.d.ts +0 -59
- package/shopping-cart/src/apis/SearchCartApi.js +0 -267
- package/shopping-cart/src/apis/SearchCartLineApi.d.ts +0 -41
- package/shopping-cart/src/models/CartCreationParameters.d.ts +0 -44
- package/shopping-cart/src/models/CartCreationParameters.js +0 -56
- package/shopping-cart/src/models/CartLineUpdateParameters.d.ts +0 -37
- package/shopping-cart/src/models/CartLineUpdateParameters.js +0 -49
- package/shopping-cart/src/models/CartLineWithWarnings.d.ts +0 -39
- package/shopping-cart/src/models/CartLineWithWarnings.js +0 -49
- package/shopping-cart/src/models/CartSummary.d.ts +0 -31
- package/shopping-cart/src/models/CartSummary.js +0 -47
- package/shopping-cart/src/models/CartUpdateParameters.d.ts +0 -31
- package/shopping-cart/src/models/CartUpdateParameters.js +0 -45
- package/shopping-cart/src/models/CartWarning.d.ts +0 -70
- package/shopping-cart/src/models/CartWarning.js +0 -67
- package/shopping-cart/src/models/CartsWithWarnings.d.ts +0 -39
- package/shopping-cart/src/models/CartsWithWarnings.js +0 -49
- package/shopping-cart/src/models/OwnerLink.d.ts +0 -43
- package/shopping-cart/src/models/OwnerLink.js +0 -53
- package/shopping-cart/src/models/PaginatedCarts.d.ts +0 -46
- package/shopping-cart/src/models/PaginatedCarts.js +0 -58
- package/shopping-cart/src/models/PagingMetadata.d.ts +0 -49
- package/shopping-cart/src/models/PagingMetadata.js +0 -55
|
@@ -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 Meta-Order * `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 * `CODE026` - SubCart not found in cart
|
|
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 Meta-Order * `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 * `MESSAGE024` - Invalid International Bank Account Number * `MESSAGE026` - SubCart not found in cart
|
|
27
27
|
*
|
|
28
28
|
* @type {string}
|
|
29
29
|
* @memberof RestError
|
|
@@ -60,6 +60,7 @@ export declare const RestErrorCodeEnum: {
|
|
|
60
60
|
readonly CODE023: "CODE023";
|
|
61
61
|
readonly CODE024: "CODE024";
|
|
62
62
|
readonly CODE025: "CODE025";
|
|
63
|
+
readonly CODE026: "CODE026";
|
|
63
64
|
};
|
|
64
65
|
export declare type RestErrorCodeEnum = typeof RestErrorCodeEnum[keyof typeof RestErrorCodeEnum];
|
|
65
66
|
/**
|
|
@@ -80,7 +81,7 @@ export declare const RestErrorMessageEnum: {
|
|
|
80
81
|
readonly MESSAGE011: "Empty User Address";
|
|
81
82
|
readonly MESSAGE012: "Empty User Legal Name";
|
|
82
83
|
readonly MESSAGE013: "Invalid quantities";
|
|
83
|
-
readonly MESSAGE014: "Invalid
|
|
84
|
+
readonly MESSAGE014: "Invalid Meta-Order";
|
|
84
85
|
readonly MESSAGE015: "Can not release quantity greater than claimed";
|
|
85
86
|
readonly MESSAGE016: "Can not release a negative quantity of items";
|
|
86
87
|
readonly MESSAGE017: "Batch is forbidden for sale";
|
|
@@ -92,6 +93,7 @@ export declare const RestErrorMessageEnum: {
|
|
|
92
93
|
readonly MESSAGE023: "Invalid Sca Enrollment status";
|
|
93
94
|
readonly MESSAGE024: "Image missing";
|
|
94
95
|
readonly MESSAGE025: "Invalid International Bank Account Number";
|
|
96
|
+
readonly MESSAGE026: "SubCart not found in cart";
|
|
95
97
|
};
|
|
96
98
|
export declare type RestErrorMessageEnum = typeof RestErrorMessageEnum[keyof typeof RestErrorMessageEnum];
|
|
97
99
|
/**
|
|
@@ -43,7 +43,8 @@ exports.RestErrorCodeEnum = {
|
|
|
43
43
|
CODE022: 'CODE022',
|
|
44
44
|
CODE023: 'CODE023',
|
|
45
45
|
CODE024: 'CODE024',
|
|
46
|
-
CODE025: 'CODE025'
|
|
46
|
+
CODE025: 'CODE025',
|
|
47
|
+
CODE026: 'CODE026'
|
|
47
48
|
};
|
|
48
49
|
/**
|
|
49
50
|
* @export
|
|
@@ -63,7 +64,7 @@ exports.RestErrorMessageEnum = {
|
|
|
63
64
|
MESSAGE011: 'Empty User Address',
|
|
64
65
|
MESSAGE012: 'Empty User Legal Name',
|
|
65
66
|
MESSAGE013: 'Invalid quantities',
|
|
66
|
-
MESSAGE014: 'Invalid
|
|
67
|
+
MESSAGE014: 'Invalid Meta-Order',
|
|
67
68
|
MESSAGE015: 'Can not release quantity greater than claimed',
|
|
68
69
|
MESSAGE016: 'Can not release a negative quantity of items',
|
|
69
70
|
MESSAGE017: 'Batch is forbidden for sale',
|
|
@@ -74,7 +75,8 @@ exports.RestErrorMessageEnum = {
|
|
|
74
75
|
MESSAGE022: 'Disabled feature',
|
|
75
76
|
MESSAGE023: 'Invalid Sca Enrollment status',
|
|
76
77
|
MESSAGE024: 'Image missing',
|
|
77
|
-
MESSAGE025: 'Invalid International Bank Account Number'
|
|
78
|
+
MESSAGE025: 'Invalid International Bank Account Number',
|
|
79
|
+
MESSAGE026: 'SubCart not found in cart'
|
|
78
80
|
};
|
|
79
81
|
/**
|
|
80
82
|
* 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 Meta-Order * `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 * `CODE026` - SubCart not found in cart
|
|
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 Meta-Order * `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 * `MESSAGE024` - Invalid International Bank Account Number * `MESSAGE026` - SubCart not found in cart
|
|
27
27
|
*
|
|
28
28
|
* @type {string}
|
|
29
29
|
* @memberof RestError
|
|
@@ -60,6 +60,7 @@ export declare const RestErrorCodeEnum: {
|
|
|
60
60
|
readonly CODE023: "CODE023";
|
|
61
61
|
readonly CODE024: "CODE024";
|
|
62
62
|
readonly CODE025: "CODE025";
|
|
63
|
+
readonly CODE026: "CODE026";
|
|
63
64
|
};
|
|
64
65
|
export declare type RestErrorCodeEnum = typeof RestErrorCodeEnum[keyof typeof RestErrorCodeEnum];
|
|
65
66
|
/**
|
|
@@ -80,7 +81,7 @@ export declare const RestErrorMessageEnum: {
|
|
|
80
81
|
readonly MESSAGE011: "Empty User Address";
|
|
81
82
|
readonly MESSAGE012: "Empty User Legal Name";
|
|
82
83
|
readonly MESSAGE013: "Invalid quantities";
|
|
83
|
-
readonly MESSAGE014: "Invalid
|
|
84
|
+
readonly MESSAGE014: "Invalid Meta-Order";
|
|
84
85
|
readonly MESSAGE015: "Can not release quantity greater than claimed";
|
|
85
86
|
readonly MESSAGE016: "Can not release a negative quantity of items";
|
|
86
87
|
readonly MESSAGE017: "Batch is forbidden for sale";
|
|
@@ -92,6 +93,7 @@ export declare const RestErrorMessageEnum: {
|
|
|
92
93
|
readonly MESSAGE023: "Invalid Sca Enrollment status";
|
|
93
94
|
readonly MESSAGE024: "Image missing";
|
|
94
95
|
readonly MESSAGE025: "Invalid International Bank Account Number";
|
|
96
|
+
readonly MESSAGE026: "SubCart not found in cart";
|
|
95
97
|
};
|
|
96
98
|
export declare type RestErrorMessageEnum = typeof RestErrorMessageEnum[keyof typeof RestErrorMessageEnum];
|
|
97
99
|
/**
|
|
@@ -43,7 +43,8 @@ exports.RestErrorCodeEnum = {
|
|
|
43
43
|
CODE022: 'CODE022',
|
|
44
44
|
CODE023: 'CODE023',
|
|
45
45
|
CODE024: 'CODE024',
|
|
46
|
-
CODE025: 'CODE025'
|
|
46
|
+
CODE025: 'CODE025',
|
|
47
|
+
CODE026: 'CODE026'
|
|
47
48
|
};
|
|
48
49
|
/**
|
|
49
50
|
* @export
|
|
@@ -63,7 +64,7 @@ exports.RestErrorMessageEnum = {
|
|
|
63
64
|
MESSAGE011: 'Empty User Address',
|
|
64
65
|
MESSAGE012: 'Empty User Legal Name',
|
|
65
66
|
MESSAGE013: 'Invalid quantities',
|
|
66
|
-
MESSAGE014: 'Invalid
|
|
67
|
+
MESSAGE014: 'Invalid Meta-Order',
|
|
67
68
|
MESSAGE015: 'Can not release quantity greater than claimed',
|
|
68
69
|
MESSAGE016: 'Can not release a negative quantity of items',
|
|
69
70
|
MESSAGE017: 'Batch is forbidden for sale',
|
|
@@ -74,7 +75,8 @@ exports.RestErrorMessageEnum = {
|
|
|
74
75
|
MESSAGE022: 'Disabled feature',
|
|
75
76
|
MESSAGE023: 'Invalid Sca Enrollment status',
|
|
76
77
|
MESSAGE024: 'Image missing',
|
|
77
|
-
MESSAGE025: 'Invalid International Bank Account Number'
|
|
78
|
+
MESSAGE025: 'Invalid International Bank Account Number',
|
|
79
|
+
MESSAGE026: 'SubCart not found in cart'
|
|
78
80
|
};
|
|
79
81
|
/**
|
|
80
82
|
* Check if a given object implements the RestError interface.
|
|
@@ -10,58 +10,47 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
14
|
-
export interface
|
|
15
|
-
cartCreationParameters: CartCreationParameters;
|
|
16
|
-
}
|
|
17
|
-
export interface DeleteCartRequest {
|
|
13
|
+
import type { Cart } from '../models/index';
|
|
14
|
+
export interface CreateCartRequest {
|
|
18
15
|
cartId: number;
|
|
19
16
|
}
|
|
20
|
-
export interface
|
|
21
|
-
|
|
22
|
-
xChannelConflictResolution?: UpdateCartsXChannelConflictResolutionEnum;
|
|
23
|
-
cartUpdateParameters?: CartUpdateParameters;
|
|
17
|
+
export interface GetCartRequest {
|
|
18
|
+
cartId: number;
|
|
24
19
|
}
|
|
25
20
|
/**
|
|
26
21
|
*
|
|
27
22
|
*/
|
|
28
23
|
export declare class ManageCartApi extends runtime.BaseAPI {
|
|
29
24
|
/**
|
|
30
|
-
* Create
|
|
31
|
-
|
|
25
|
+
* Create current cart if get cart return object not found
|
|
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
|
|
32
30
|
*/
|
|
33
|
-
|
|
31
|
+
createCart(requestParameters: CreateCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Cart | runtime.BlobWithMeta>;
|
|
34
32
|
/**
|
|
35
|
-
* Create
|
|
36
|
-
* Create carts and add items
|
|
33
|
+
* Create current cart if get cart return object not found
|
|
37
34
|
*/
|
|
38
|
-
|
|
35
|
+
createCurrentCartRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Cart | runtime.BlobWithMeta>>;
|
|
39
36
|
/**
|
|
40
|
-
*
|
|
41
|
-
* Delete a cart
|
|
37
|
+
* Create current cart if get cart return object not found
|
|
42
38
|
*/
|
|
43
|
-
|
|
39
|
+
createCurrentCart(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Cart | runtime.BlobWithMeta>;
|
|
44
40
|
/**
|
|
45
|
-
*
|
|
46
|
-
* Delete a cart
|
|
41
|
+
* Get current cart
|
|
47
42
|
*/
|
|
48
|
-
|
|
43
|
+
getCartRaw(requestParameters: GetCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Cart | runtime.BlobWithMeta>>;
|
|
49
44
|
/**
|
|
50
|
-
*
|
|
51
|
-
* Update carts
|
|
45
|
+
* Get current cart
|
|
52
46
|
*/
|
|
53
|
-
|
|
47
|
+
getCart(requestParameters: GetCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Cart | runtime.BlobWithMeta>;
|
|
54
48
|
/**
|
|
55
|
-
*
|
|
56
|
-
* Update carts
|
|
49
|
+
* Get current cart
|
|
57
50
|
*/
|
|
58
|
-
|
|
51
|
+
getCurrentCartRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Cart | runtime.BlobWithMeta>>;
|
|
52
|
+
/**
|
|
53
|
+
* Get current cart
|
|
54
|
+
*/
|
|
55
|
+
getCurrentCart(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Cart | runtime.BlobWithMeta>;
|
|
59
56
|
}
|
|
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.
|
|
67
|
+
exports.ManageCartApi = void 0;
|
|
68
68
|
var runtime = require("../runtime");
|
|
69
69
|
var index_1 = require("../models/index");
|
|
70
70
|
/**
|
|
@@ -76,21 +76,19 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Create
|
|
80
|
-
* Create carts and add items
|
|
79
|
+
* Create current cart if get cart return object not found
|
|
81
80
|
*/
|
|
82
|
-
ManageCartApi.prototype.
|
|
81
|
+
ManageCartApi.prototype.createCartRaw = function (requestParameters, initOverrides) {
|
|
83
82
|
return __awaiter(this, void 0, void 0, function () {
|
|
84
83
|
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
|
|
85
84
|
return __generator(this, function (_c) {
|
|
86
85
|
switch (_c.label) {
|
|
87
86
|
case 0:
|
|
88
|
-
if (requestParameters['
|
|
89
|
-
throw new runtime.RequiredError('
|
|
87
|
+
if (requestParameters['cartId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling createCart().');
|
|
90
89
|
}
|
|
91
90
|
queryParameters = {};
|
|
92
91
|
headerParameters = {};
|
|
93
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
94
92
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
95
93
|
_a = headerParameters;
|
|
96
94
|
_b = "x-api-key";
|
|
@@ -111,17 +109,16 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
111
109
|
case 4:
|
|
112
110
|
_c.trys.push([4, 6, , 7]);
|
|
113
111
|
return [4 /*yield*/, this.request({
|
|
114
|
-
path: "/carts",
|
|
112
|
+
path: "/carts/{cartId}".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))),
|
|
115
113
|
method: 'POST',
|
|
116
114
|
headers: headerParameters,
|
|
117
115
|
query: queryParameters,
|
|
118
|
-
body: (0, index_1.CartCreationParametersToJSON)(requestParameters['cartCreationParameters']),
|
|
119
116
|
}, initOverrides)];
|
|
120
117
|
case 5:
|
|
121
118
|
response = _c.sent();
|
|
122
119
|
contentType = response.headers.get("content-type");
|
|
123
120
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
124
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.
|
|
121
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CartFromJSON)(jsonValue); })];
|
|
125
122
|
}
|
|
126
123
|
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
127
124
|
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
@@ -141,15 +138,14 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
141
138
|
});
|
|
142
139
|
};
|
|
143
140
|
/**
|
|
144
|
-
* Create
|
|
145
|
-
* Create carts and add items
|
|
141
|
+
* Create current cart if get cart return object not found
|
|
146
142
|
*/
|
|
147
|
-
ManageCartApi.prototype.
|
|
143
|
+
ManageCartApi.prototype.createCart = function (requestParameters, initOverrides) {
|
|
148
144
|
return __awaiter(this, void 0, void 0, function () {
|
|
149
145
|
var response;
|
|
150
146
|
return __generator(this, function (_a) {
|
|
151
147
|
switch (_a.label) {
|
|
152
|
-
case 0: return [4 /*yield*/, this.
|
|
148
|
+
case 0: return [4 /*yield*/, this.createCartRaw(requestParameters, initOverrides)];
|
|
153
149
|
case 1:
|
|
154
150
|
response = _a.sent();
|
|
155
151
|
return [4 /*yield*/, response.value()];
|
|
@@ -159,18 +155,14 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
159
155
|
});
|
|
160
156
|
};
|
|
161
157
|
/**
|
|
162
|
-
*
|
|
163
|
-
* Delete a cart
|
|
158
|
+
* Create current cart if get cart return object not found
|
|
164
159
|
*/
|
|
165
|
-
ManageCartApi.prototype.
|
|
160
|
+
ManageCartApi.prototype.createCurrentCartRaw = function (initOverrides) {
|
|
166
161
|
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
|
|
162
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_2;
|
|
168
163
|
return __generator(this, function (_c) {
|
|
169
164
|
switch (_c.label) {
|
|
170
165
|
case 0:
|
|
171
|
-
if (requestParameters['cartId'] == null) {
|
|
172
|
-
throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling deleteCart().');
|
|
173
|
-
}
|
|
174
166
|
queryParameters = {};
|
|
175
167
|
headerParameters = {};
|
|
176
168
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
@@ -193,14 +185,25 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
193
185
|
case 4:
|
|
194
186
|
_c.trys.push([4, 6, , 7]);
|
|
195
187
|
return [4 /*yield*/, this.request({
|
|
196
|
-
path: "/carts/
|
|
197
|
-
method: '
|
|
188
|
+
path: "/carts/me",
|
|
189
|
+
method: 'POST',
|
|
198
190
|
headers: headerParameters,
|
|
199
191
|
query: queryParameters,
|
|
200
192
|
}, initOverrides)];
|
|
201
193
|
case 5:
|
|
202
194
|
response = _c.sent();
|
|
203
|
-
|
|
195
|
+
contentType = response.headers.get("content-type");
|
|
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];
|
|
204
207
|
case 6:
|
|
205
208
|
response_2 = _c.sent();
|
|
206
209
|
console.debug(response_2);
|
|
@@ -211,43 +214,36 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
211
214
|
});
|
|
212
215
|
};
|
|
213
216
|
/**
|
|
214
|
-
*
|
|
215
|
-
* Delete a cart
|
|
217
|
+
* Create current cart if get cart return object not found
|
|
216
218
|
*/
|
|
217
|
-
ManageCartApi.prototype.
|
|
219
|
+
ManageCartApi.prototype.createCurrentCart = function (initOverrides) {
|
|
218
220
|
return __awaiter(this, void 0, void 0, function () {
|
|
221
|
+
var response;
|
|
219
222
|
return __generator(this, function (_a) {
|
|
220
223
|
switch (_a.label) {
|
|
221
|
-
case 0: return [4 /*yield*/, this.
|
|
224
|
+
case 0: return [4 /*yield*/, this.createCurrentCartRaw(initOverrides)];
|
|
222
225
|
case 1:
|
|
223
|
-
_a.sent();
|
|
224
|
-
return [
|
|
226
|
+
response = _a.sent();
|
|
227
|
+
return [4 /*yield*/, response.value()];
|
|
228
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
225
229
|
}
|
|
226
230
|
});
|
|
227
231
|
});
|
|
228
232
|
};
|
|
229
233
|
/**
|
|
230
|
-
*
|
|
231
|
-
* Update carts
|
|
234
|
+
* Get current cart
|
|
232
235
|
*/
|
|
233
|
-
ManageCartApi.prototype.
|
|
236
|
+
ManageCartApi.prototype.getCartRaw = function (requestParameters, initOverrides) {
|
|
234
237
|
return __awaiter(this, void 0, void 0, function () {
|
|
235
238
|
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_3;
|
|
236
239
|
return __generator(this, function (_c) {
|
|
237
240
|
switch (_c.label) {
|
|
238
241
|
case 0:
|
|
239
|
-
if (requestParameters['
|
|
240
|
-
throw new runtime.RequiredError('
|
|
242
|
+
if (requestParameters['cartId'] == null) {
|
|
243
|
+
throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling getCart().');
|
|
241
244
|
}
|
|
242
245
|
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
|
-
}
|
|
251
247
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
252
248
|
_a = headerParameters;
|
|
253
249
|
_b = "x-api-key";
|
|
@@ -268,17 +264,16 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
268
264
|
case 4:
|
|
269
265
|
_c.trys.push([4, 6, , 7]);
|
|
270
266
|
return [4 /*yield*/, this.request({
|
|
271
|
-
path: "/carts",
|
|
272
|
-
method: '
|
|
267
|
+
path: "/carts/{cartId}".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))),
|
|
268
|
+
method: 'GET',
|
|
273
269
|
headers: headerParameters,
|
|
274
270
|
query: queryParameters,
|
|
275
|
-
body: (0, index_1.CartUpdateParametersToJSON)(requestParameters['cartUpdateParameters']),
|
|
276
271
|
}, initOverrides)];
|
|
277
272
|
case 5:
|
|
278
273
|
response = _c.sent();
|
|
279
274
|
contentType = response.headers.get("content-type");
|
|
280
275
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
281
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.
|
|
276
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CartFromJSON)(jsonValue); })];
|
|
282
277
|
}
|
|
283
278
|
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
284
279
|
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
@@ -298,15 +293,90 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
298
293
|
});
|
|
299
294
|
};
|
|
300
295
|
/**
|
|
301
|
-
*
|
|
302
|
-
|
|
296
|
+
* Get current cart
|
|
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
|
|
303
373
|
*/
|
|
304
|
-
ManageCartApi.prototype.
|
|
374
|
+
ManageCartApi.prototype.getCurrentCart = function (initOverrides) {
|
|
305
375
|
return __awaiter(this, void 0, void 0, function () {
|
|
306
376
|
var response;
|
|
307
377
|
return __generator(this, function (_a) {
|
|
308
378
|
switch (_a.label) {
|
|
309
|
-
case 0: return [4 /*yield*/, this.
|
|
379
|
+
case 0: return [4 /*yield*/, this.getCurrentCartRaw(initOverrides)];
|
|
310
380
|
case 1:
|
|
311
381
|
response = _a.sent();
|
|
312
382
|
return [4 /*yield*/, response.value()];
|
|
@@ -318,10 +388,3 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
318
388
|
return ManageCartApi;
|
|
319
389
|
}(runtime.BaseAPI));
|
|
320
390
|
exports.ManageCartApi = ManageCartApi;
|
|
321
|
-
/**
|
|
322
|
-
* @export
|
|
323
|
-
*/
|
|
324
|
-
exports.UpdateCartsXChannelConflictResolutionEnum = {
|
|
325
|
-
MERGE: 'merge',
|
|
326
|
-
REPLACE: 'replace'
|
|
327
|
-
};
|