@wix/auto_sdk_ecom_cart-v-2 1.0.8 → 1.0.9
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/build/cjs/index.d.ts +118 -105
- package/build/cjs/index.js +41 -51
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +34 -44
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +101 -98
- package/build/cjs/meta.js +20 -20
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +118 -105
- package/build/es/index.mjs +39 -48
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +32 -41
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +101 -98
- package/build/es/meta.mjs +18 -18
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +24 -28
- package/build/internal/cjs/index.js +41 -51
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +137 -128
- package/build/internal/cjs/index.typings.js +34 -44
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +101 -98
- package/build/internal/cjs/meta.js +20 -20
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +24 -28
- package/build/internal/es/index.mjs +39 -48
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +137 -128
- package/build/internal/es/index.typings.mjs +32 -41
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +101 -98
- package/build/internal/es/meta.mjs +18 -18
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/meta.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateCartRequest as CreateCartRequest$1, CreateCartResponse as CreateCartResponse$1, GetCartRequest as GetCartRequest$1, GetCartResponse as GetCartResponse$1, UpdateCartRequest as UpdateCartRequest$1, UpdateCartResponse as UpdateCartResponse$1, DeleteCartRequest as DeleteCartRequest$1, DeleteCartResponse as DeleteCartResponse$1, RefreshCartRequest as RefreshCartRequest$1, RefreshCartResponse as RefreshCartResponse$1, CalculateCartRequest as CalculateCartRequest$1, CalculateCartResponse as CalculateCartResponse$1, GetCheckoutURLRequest as GetCheckoutURLRequest$1, GetCheckoutURLResponse as GetCheckoutURLResponse$1, PlaceOrderRequest as PlaceOrderRequest$1, PlaceOrderResponse as PlaceOrderResponse$1, AddLineItemsRequest as AddLineItemsRequest$1, AddLineItemsResponse as AddLineItemsResponse$1, RemoveLineItemsRequest as RemoveLineItemsRequest$1, RemoveLineItemsResponse as RemoveLineItemsResponse$1, UpdateLineItemsRequest as UpdateLineItemsRequest$1, UpdateLineItemsResponse as UpdateLineItemsResponse$1,
|
|
1
|
+
import { CreateCartRequest as CreateCartRequest$1, CreateCartResponse as CreateCartResponse$1, GetCartRequest as GetCartRequest$1, GetCartResponse as GetCartResponse$1, UpdateCartRequest as UpdateCartRequest$1, UpdateCartResponse as UpdateCartResponse$1, DeleteCartRequest as DeleteCartRequest$1, DeleteCartResponse as DeleteCartResponse$1, RefreshCartRequest as RefreshCartRequest$1, RefreshCartResponse as RefreshCartResponse$1, CalculateCartRequest as CalculateCartRequest$1, CalculateCartResponse as CalculateCartResponse$1, GetCheckoutURLRequest as GetCheckoutURLRequest$1, GetCheckoutURLResponse as GetCheckoutURLResponse$1, PlaceOrderRequest as PlaceOrderRequest$1, PlaceOrderResponse as PlaceOrderResponse$1, AddLineItemsRequest as AddLineItemsRequest$1, AddLineItemsResponse as AddLineItemsResponse$1, RemoveLineItemsRequest as RemoveLineItemsRequest$1, RemoveLineItemsResponse as RemoveLineItemsResponse$1, UpdateLineItemsRequest as UpdateLineItemsRequest$1, UpdateLineItemsResponse as UpdateLineItemsResponse$1, AddCouponRequest as AddCouponRequest$1, AddCouponResponse as AddCouponResponse$1, RemoveCouponRequest as RemoveCouponRequest$1, RemoveCouponResponse as RemoveCouponResponse$1, AddGiftCardRequest as AddGiftCardRequest$1, AddGiftCardResponse as AddGiftCardResponse$1, RemoveGiftCardRequest as RemoveGiftCardRequest$1, RemoveGiftCardResponse as RemoveGiftCardResponse$1, MarkCartAsCompletedRequest as MarkCartAsCompletedRequest$1, MarkCartAsCompletedResponse as MarkCartAsCompletedResponse$1, HandleAsyncCheckoutCompletionRequest as HandleAsyncCheckoutCompletionRequest$1, RawHttpResponse as RawHttpResponse$1 } from './index.js';
|
|
2
2
|
|
|
3
3
|
interface Cart {
|
|
4
4
|
/**
|
|
@@ -39,13 +39,11 @@ interface Cart {
|
|
|
39
39
|
*/
|
|
40
40
|
note?: string | null;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* @maxSize 100
|
|
46
|
-
* @readonly
|
|
42
|
+
* List of coupons added to the Cart.
|
|
43
|
+
* Currently, only one coupon code is supported.
|
|
44
|
+
* @maxSize 1
|
|
47
45
|
*/
|
|
48
|
-
|
|
46
|
+
coupons?: Coupon[];
|
|
49
47
|
/** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
|
|
50
48
|
source?: CartSource;
|
|
51
49
|
/** Information about the site from which the Cart's line items were added. */
|
|
@@ -140,6 +138,11 @@ interface V2LineItem {
|
|
|
140
138
|
* @maxSize 25
|
|
141
139
|
*/
|
|
142
140
|
modifierGroups?: ModifierGroup[];
|
|
141
|
+
/**
|
|
142
|
+
* List of discounts applied to this line item.
|
|
143
|
+
* @maxSize 100
|
|
144
|
+
*/
|
|
145
|
+
discounts?: ItemDiscount[];
|
|
143
146
|
/**
|
|
144
147
|
* Whether the line item is a custom line item.
|
|
145
148
|
* Custom line items don't trigger the Catalog service plugin.
|
|
@@ -853,95 +856,29 @@ interface ItemModifier {
|
|
|
853
856
|
/** The price of the modifier. */
|
|
854
857
|
price?: MultiCurrencyPrice;
|
|
855
858
|
}
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
id?: string;
|
|
859
|
+
/**
|
|
860
|
+
* Currently, only automatic discounts are applied to line items.
|
|
861
|
+
* In the future, coupon discounts will be supported as well.
|
|
862
|
+
*/
|
|
863
|
+
interface ItemDiscount {
|
|
862
864
|
/** The display name of the discount. */
|
|
863
865
|
name?: TranslatableString;
|
|
864
|
-
/** The
|
|
865
|
-
|
|
866
|
-
/** The component in the Cart that the discount applies to. */
|
|
867
|
-
scope?: DiscountScopeWithLiterals;
|
|
868
|
-
/**
|
|
869
|
-
* List of benefits provided by the discount.
|
|
870
|
-
* @minSize 1
|
|
871
|
-
* @maxSize 100
|
|
872
|
-
*/
|
|
873
|
-
benefits?: DiscountBenefit[];
|
|
874
|
-
/**
|
|
875
|
-
* The current status of the discount.
|
|
876
|
-
* TODO: remodel.
|
|
877
|
-
*/
|
|
878
|
-
status?: DiscountStatusWithLiterals;
|
|
879
|
-
/**
|
|
880
|
-
* Number of subscription cycles this discount applies to.
|
|
881
|
-
* If unset, the discount applies to all billing cycles.
|
|
882
|
-
* @min 1
|
|
883
|
-
* @max 1000
|
|
884
|
-
*/
|
|
885
|
-
subscriptionCycles?: number | null;
|
|
866
|
+
/** The amount discounted from the item's sale price (per unit). */
|
|
867
|
+
amountOff?: MultiCurrencyPrice;
|
|
886
868
|
}
|
|
887
|
-
interface
|
|
888
|
-
/** The type of the discount source. */
|
|
889
|
-
sourceType?: DiscountSourceTypeWithLiterals;
|
|
869
|
+
interface Coupon {
|
|
890
870
|
/**
|
|
891
|
-
*
|
|
892
|
-
*
|
|
893
|
-
* @maxLength 50
|
|
871
|
+
* ID of the coupon in the Cart.
|
|
872
|
+
* @format GUID
|
|
894
873
|
*/
|
|
895
|
-
|
|
896
|
-
}
|
|
897
|
-
declare enum DiscountSourceType {
|
|
898
|
-
UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
|
|
899
|
-
/** The discount was applied automatically by a rule. */
|
|
900
|
-
AUTOMATIC_RULE = "AUTOMATIC_RULE",
|
|
901
|
-
/** The discount was applied by a coupon code. */
|
|
902
|
-
COUPON = "COUPON"
|
|
903
|
-
}
|
|
904
|
-
/** @enumType */
|
|
905
|
-
type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
|
|
906
|
-
declare enum DiscountScope {
|
|
907
|
-
UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
|
|
908
|
-
/** The discount applies to the cart's subtotal. */
|
|
909
|
-
CART_SUBTOTAL = "CART_SUBTOTAL",
|
|
910
|
-
/** The discount applies to a specific line item. */
|
|
911
|
-
LINE_ITEM = "LINE_ITEM",
|
|
912
|
-
/** The discount applies to the delivery price. */
|
|
913
|
-
DELIVERY = "DELIVERY"
|
|
914
|
-
}
|
|
915
|
-
/** @enumType */
|
|
916
|
-
type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
|
|
917
|
-
interface DiscountBenefit extends DiscountBenefitValueOneOf {
|
|
918
|
-
/** A specific monetary value deducted from the total cost. */
|
|
919
|
-
amountOff?: MultiCurrencyPrice;
|
|
874
|
+
id?: string;
|
|
920
875
|
/**
|
|
921
|
-
*
|
|
922
|
-
*
|
|
923
|
-
* @
|
|
876
|
+
* Coupon code.
|
|
877
|
+
* @minLength 1
|
|
878
|
+
* @maxLength 50
|
|
924
879
|
*/
|
|
925
|
-
|
|
926
|
-
}
|
|
927
|
-
/** @oneof */
|
|
928
|
-
interface DiscountBenefitValueOneOf {
|
|
929
|
-
/** A specific monetary value deducted from the total cost. */
|
|
930
|
-
amountOff?: MultiCurrencyPrice;
|
|
931
|
-
}
|
|
932
|
-
declare enum DiscountStatus {
|
|
933
|
-
UNKNOWN_DISCOUNT_STATUS = "UNKNOWN_DISCOUNT_STATUS",
|
|
934
|
-
/** The discount is active and valid. */
|
|
935
|
-
ACTIVE = "ACTIVE",
|
|
936
|
-
/** The discount has expired. */
|
|
937
|
-
EXPIRED = "EXPIRED",
|
|
938
|
-
/** The discount was deleted from the system. */
|
|
939
|
-
DELETED = "DELETED",
|
|
940
|
-
/** The discount reached the maximum number of uses. */
|
|
941
|
-
MAX_USAGE_REACHED = "MAX_USAGE_REACHED"
|
|
880
|
+
code?: string;
|
|
942
881
|
}
|
|
943
|
-
/** @enumType */
|
|
944
|
-
type DiscountStatusWithLiterals = DiscountStatus | 'UNKNOWN_DISCOUNT_STATUS' | 'ACTIVE' | 'EXPIRED' | 'DELETED' | 'MAX_USAGE_REACHED';
|
|
945
882
|
interface CartSource {
|
|
946
883
|
/**
|
|
947
884
|
* Sales channel that created the Cart.
|
|
@@ -1420,6 +1357,72 @@ interface CartSettings {
|
|
|
1420
1357
|
*/
|
|
1421
1358
|
manualPaymentDisabled?: boolean;
|
|
1422
1359
|
}
|
|
1360
|
+
interface Discount {
|
|
1361
|
+
/** The display name of the discount. */
|
|
1362
|
+
name?: TranslatableString;
|
|
1363
|
+
/** The source of the discount, indicating how it was applied. */
|
|
1364
|
+
source?: DiscountSource;
|
|
1365
|
+
/** The component in the Cart that the discount applies to. */
|
|
1366
|
+
scope?: DiscountScopeWithLiterals;
|
|
1367
|
+
/**
|
|
1368
|
+
* List of benefits provided by the discount.
|
|
1369
|
+
* @minSize 1
|
|
1370
|
+
* @maxSize 100
|
|
1371
|
+
*/
|
|
1372
|
+
benefits?: DiscountBenefit[];
|
|
1373
|
+
/**
|
|
1374
|
+
* Number of subscription cycles this discount applies to.
|
|
1375
|
+
* If unset, the discount applies to all billing cycles.
|
|
1376
|
+
* @min 1
|
|
1377
|
+
* @max 1000
|
|
1378
|
+
*/
|
|
1379
|
+
subscriptionCycles?: number | null;
|
|
1380
|
+
}
|
|
1381
|
+
interface DiscountSource {
|
|
1382
|
+
/** The type of the discount source. */
|
|
1383
|
+
sourceType?: DiscountSourceTypeWithLiterals;
|
|
1384
|
+
/**
|
|
1385
|
+
* Coupon code that triggered the discount.
|
|
1386
|
+
* Relevant for coupon discounts only.
|
|
1387
|
+
* @maxLength 50
|
|
1388
|
+
*/
|
|
1389
|
+
couponCode?: string | null;
|
|
1390
|
+
}
|
|
1391
|
+
declare enum DiscountSourceType {
|
|
1392
|
+
UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
|
|
1393
|
+
/** The discount was applied automatically by a rule. */
|
|
1394
|
+
AUTOMATIC_RULE = "AUTOMATIC_RULE",
|
|
1395
|
+
/** The discount was applied by a coupon code. */
|
|
1396
|
+
COUPON = "COUPON"
|
|
1397
|
+
}
|
|
1398
|
+
/** @enumType */
|
|
1399
|
+
type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
|
|
1400
|
+
declare enum DiscountScope {
|
|
1401
|
+
UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
|
|
1402
|
+
/** The discount applies to the cart's subtotal. */
|
|
1403
|
+
CART_SUBTOTAL = "CART_SUBTOTAL",
|
|
1404
|
+
/** The discount applies to a specific line item. */
|
|
1405
|
+
LINE_ITEM = "LINE_ITEM",
|
|
1406
|
+
/** The discount applies to the delivery price. */
|
|
1407
|
+
DELIVERY = "DELIVERY"
|
|
1408
|
+
}
|
|
1409
|
+
/** @enumType */
|
|
1410
|
+
type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
|
|
1411
|
+
interface DiscountBenefit extends DiscountBenefitValueOneOf {
|
|
1412
|
+
/** A specific monetary value deducted from the total cost. */
|
|
1413
|
+
amountOff?: MultiCurrencyPrice;
|
|
1414
|
+
/**
|
|
1415
|
+
* The ID of line item that the discount applies to.
|
|
1416
|
+
* Relevant for item-level discounts only.
|
|
1417
|
+
* @format GUID
|
|
1418
|
+
*/
|
|
1419
|
+
lineItemId?: string | null;
|
|
1420
|
+
}
|
|
1421
|
+
/** @oneof */
|
|
1422
|
+
interface DiscountBenefitValueOneOf {
|
|
1423
|
+
/** A specific monetary value deducted from the total cost. */
|
|
1424
|
+
amountOff?: MultiCurrencyPrice;
|
|
1425
|
+
}
|
|
1423
1426
|
interface CartSummary {
|
|
1424
1427
|
/**
|
|
1425
1428
|
* The Cart ID.
|
|
@@ -2278,7 +2281,7 @@ interface UpdateLineItemsResponse {
|
|
|
2278
2281
|
/** Updated Cart. */
|
|
2279
2282
|
cart?: Cart;
|
|
2280
2283
|
}
|
|
2281
|
-
interface
|
|
2284
|
+
interface AddCouponRequest {
|
|
2282
2285
|
/**
|
|
2283
2286
|
* Cart ID.
|
|
2284
2287
|
* @format GUID
|
|
@@ -2293,11 +2296,11 @@ interface AddDiscountRequest {
|
|
|
2293
2296
|
*/
|
|
2294
2297
|
couponCode: string;
|
|
2295
2298
|
}
|
|
2296
|
-
interface
|
|
2299
|
+
interface AddCouponResponse {
|
|
2297
2300
|
/** Updated Cart. */
|
|
2298
2301
|
cart?: Cart;
|
|
2299
2302
|
}
|
|
2300
|
-
interface
|
|
2303
|
+
interface RemoveCouponRequest {
|
|
2301
2304
|
/**
|
|
2302
2305
|
* Cart ID.
|
|
2303
2306
|
* @format GUID
|
|
@@ -2307,9 +2310,9 @@ interface RemoveDiscountRequest {
|
|
|
2307
2310
|
* Discount ID.
|
|
2308
2311
|
* @format GUID
|
|
2309
2312
|
*/
|
|
2310
|
-
|
|
2313
|
+
couponId: string;
|
|
2311
2314
|
}
|
|
2312
|
-
interface
|
|
2315
|
+
interface RemoveCouponResponse {
|
|
2313
2316
|
/** Updated Cart. */
|
|
2314
2317
|
cart?: Cart;
|
|
2315
2318
|
}
|
|
@@ -2421,12 +2424,12 @@ declare function removeLineItems(): __PublicMethodMetaInfo<'POST', {
|
|
|
2421
2424
|
declare function updateLineItems(): __PublicMethodMetaInfo<'POST', {
|
|
2422
2425
|
cartId: string;
|
|
2423
2426
|
}, UpdateLineItemsRequest$1, UpdateLineItemsRequest, UpdateLineItemsResponse$1, UpdateLineItemsResponse>;
|
|
2424
|
-
declare function
|
|
2427
|
+
declare function addCoupon(): __PublicMethodMetaInfo<'POST', {
|
|
2425
2428
|
cartId: string;
|
|
2426
|
-
},
|
|
2427
|
-
declare function
|
|
2429
|
+
}, AddCouponRequest$1, AddCouponRequest, AddCouponResponse$1, AddCouponResponse>;
|
|
2430
|
+
declare function removeCoupon(): __PublicMethodMetaInfo<'POST', {
|
|
2428
2431
|
cartId: string;
|
|
2429
|
-
},
|
|
2432
|
+
}, RemoveCouponRequest$1, RemoveCouponRequest, RemoveCouponResponse$1, RemoveCouponResponse>;
|
|
2430
2433
|
declare function addGiftCard(): __PublicMethodMetaInfo<'POST', {
|
|
2431
2434
|
cartId: string;
|
|
2432
2435
|
}, AddGiftCardRequest$1, AddGiftCardRequest, AddGiftCardResponse$1, AddGiftCardResponse>;
|
|
@@ -2438,4 +2441,4 @@ declare function markCartAsCompleted(): __PublicMethodMetaInfo<'POST', {
|
|
|
2438
2441
|
}, MarkCartAsCompletedRequest$1, MarkCartAsCompletedRequest, MarkCartAsCompletedResponse$1, MarkCartAsCompletedResponse>;
|
|
2439
2442
|
declare function handleAsyncCheckoutCompletion(): __PublicMethodMetaInfo<'POST', {}, HandleAsyncCheckoutCompletionRequest$1, HandleAsyncCheckoutCompletionRequest, RawHttpResponse$1, RawHttpResponse>;
|
|
2440
2443
|
|
|
2441
|
-
export { type __PublicMethodMetaInfo,
|
|
2444
|
+
export { type __PublicMethodMetaInfo, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, updateCart, updateLineItems };
|
package/build/cjs/meta.js
CHANGED
|
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// meta.ts
|
|
21
21
|
var meta_exports = {};
|
|
22
22
|
__export(meta_exports, {
|
|
23
|
-
|
|
23
|
+
addCoupon: () => addCoupon2,
|
|
24
24
|
addGiftCard: () => addGiftCard2,
|
|
25
25
|
addLineItems: () => addLineItems2,
|
|
26
26
|
calculateCart: () => calculateCart2,
|
|
@@ -32,7 +32,7 @@ __export(meta_exports, {
|
|
|
32
32
|
markCartAsCompleted: () => markCartAsCompleted2,
|
|
33
33
|
placeOrder: () => placeOrder2,
|
|
34
34
|
refreshCart: () => refreshCart2,
|
|
35
|
-
|
|
35
|
+
removeCoupon: () => removeCoupon2,
|
|
36
36
|
removeGiftCard: () => removeGiftCard2,
|
|
37
37
|
removeLineItems: () => removeLineItems2,
|
|
38
38
|
updateCart: () => updateCart2,
|
|
@@ -697,15 +697,15 @@ function updateLineItems(payload) {
|
|
|
697
697
|
}
|
|
698
698
|
return __updateLineItems;
|
|
699
699
|
}
|
|
700
|
-
function
|
|
701
|
-
function
|
|
700
|
+
function addCoupon(payload) {
|
|
701
|
+
function __addCoupon({ host }) {
|
|
702
702
|
const metadata = {
|
|
703
703
|
entityFqdn: "wix.ecom.v2.cart",
|
|
704
704
|
method: "POST",
|
|
705
|
-
methodFqn: "wix.ecom.cart.v2.CartService.
|
|
705
|
+
methodFqn: "wix.ecom.cart.v2.CartService.AddCoupon",
|
|
706
706
|
packageName: PACKAGE_NAME,
|
|
707
707
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
708
|
-
protoPath: "/v2/carts/{cartId}/add-
|
|
708
|
+
protoPath: "/v2/carts/{cartId}/add-coupon",
|
|
709
709
|
data: payload,
|
|
710
710
|
host
|
|
711
711
|
}),
|
|
@@ -745,17 +745,17 @@ function addDiscount(payload) {
|
|
|
745
745
|
};
|
|
746
746
|
return metadata;
|
|
747
747
|
}
|
|
748
|
-
return
|
|
748
|
+
return __addCoupon;
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
function
|
|
750
|
+
function removeCoupon(payload) {
|
|
751
|
+
function __removeCoupon({ host }) {
|
|
752
752
|
const metadata = {
|
|
753
753
|
entityFqdn: "wix.ecom.v2.cart",
|
|
754
754
|
method: "POST",
|
|
755
|
-
methodFqn: "wix.ecom.cart.v2.CartService.
|
|
755
|
+
methodFqn: "wix.ecom.cart.v2.CartService.RemoveCoupon",
|
|
756
756
|
packageName: PACKAGE_NAME,
|
|
757
757
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
758
|
-
protoPath: "/v2/carts/{cartId}/remove-
|
|
758
|
+
protoPath: "/v2/carts/{cartId}/remove-coupon",
|
|
759
759
|
data: payload,
|
|
760
760
|
host
|
|
761
761
|
}),
|
|
@@ -795,7 +795,7 @@ function removeDiscount(payload) {
|
|
|
795
795
|
};
|
|
796
796
|
return metadata;
|
|
797
797
|
}
|
|
798
|
-
return
|
|
798
|
+
return __removeCoupon;
|
|
799
799
|
}
|
|
800
800
|
function addGiftCard(payload) {
|
|
801
801
|
function __addGiftCard({ host }) {
|
|
@@ -1171,9 +1171,9 @@ function updateLineItems2() {
|
|
|
1171
1171
|
__originalResponseType: null
|
|
1172
1172
|
};
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function addCoupon2() {
|
|
1175
1175
|
const payload = { cartId: ":cartId" };
|
|
1176
|
-
const getRequestOptions =
|
|
1176
|
+
const getRequestOptions = addCoupon(payload);
|
|
1177
1177
|
const getUrl = (context) => {
|
|
1178
1178
|
const { url } = getRequestOptions(context);
|
|
1179
1179
|
return url;
|
|
@@ -1181,7 +1181,7 @@ function addDiscount2() {
|
|
|
1181
1181
|
return {
|
|
1182
1182
|
getUrl,
|
|
1183
1183
|
httpMethod: "POST",
|
|
1184
|
-
path: "/v2/carts/{cartId}/add-
|
|
1184
|
+
path: "/v2/carts/{cartId}/add-coupon",
|
|
1185
1185
|
pathParams: { cartId: "cartId" },
|
|
1186
1186
|
__requestType: null,
|
|
1187
1187
|
__originalRequestType: null,
|
|
@@ -1189,9 +1189,9 @@ function addDiscount2() {
|
|
|
1189
1189
|
__originalResponseType: null
|
|
1190
1190
|
};
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function removeCoupon2() {
|
|
1193
1193
|
const payload = { cartId: ":cartId" };
|
|
1194
|
-
const getRequestOptions =
|
|
1194
|
+
const getRequestOptions = removeCoupon(payload);
|
|
1195
1195
|
const getUrl = (context) => {
|
|
1196
1196
|
const { url } = getRequestOptions(context);
|
|
1197
1197
|
return url;
|
|
@@ -1199,7 +1199,7 @@ function removeDiscount2() {
|
|
|
1199
1199
|
return {
|
|
1200
1200
|
getUrl,
|
|
1201
1201
|
httpMethod: "POST",
|
|
1202
|
-
path: "/v2/carts/{cartId}/remove-
|
|
1202
|
+
path: "/v2/carts/{cartId}/remove-coupon",
|
|
1203
1203
|
pathParams: { cartId: "cartId" },
|
|
1204
1204
|
__requestType: null,
|
|
1205
1205
|
__originalRequestType: null,
|
|
@@ -1281,7 +1281,7 @@ function handleAsyncCheckoutCompletion2() {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1283
1283
|
0 && (module.exports = {
|
|
1284
|
-
|
|
1284
|
+
addCoupon,
|
|
1285
1285
|
addGiftCard,
|
|
1286
1286
|
addLineItems,
|
|
1287
1287
|
calculateCart,
|
|
@@ -1293,7 +1293,7 @@ function handleAsyncCheckoutCompletion2() {
|
|
|
1293
1293
|
markCartAsCompleted,
|
|
1294
1294
|
placeOrder,
|
|
1295
1295
|
refreshCart,
|
|
1296
|
-
|
|
1296
|
+
removeCoupon,
|
|
1297
1297
|
removeGiftCard,
|
|
1298
1298
|
removeLineItems,
|
|
1299
1299
|
updateCart,
|