@wix/auto_sdk_ecom_current-cart-v-2 1.0.8 → 1.0.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/build/cjs/index.d.ts +119 -101
- package/build/cjs/index.js +41 -53
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +34 -46
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +105 -99
- package/build/cjs/meta.js +20 -20
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +119 -101
- package/build/es/index.mjs +39 -50
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +32 -43
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +105 -99
- 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 -53
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +137 -123
- package/build/internal/cjs/index.typings.js +34 -46
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +105 -99
- 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 -50
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +137 -123
- package/build/internal/es/index.typings.mjs +32 -43
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +105 -99
- 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 { CreateCurrentCartRequest as CreateCurrentCartRequest$1, CreateCurrentCartResponse as CreateCurrentCartResponse$1, GetCurrentCartRequest as GetCurrentCartRequest$1, GetCurrentCartResponse as GetCurrentCartResponse$1, UpdateCurrentCartRequest as UpdateCurrentCartRequest$1, UpdateCurrentCartResponse as UpdateCurrentCartResponse$1, DeleteCurrentCartRequest as DeleteCurrentCartRequest$1, DeleteCurrentCartResponse as DeleteCurrentCartResponse$1, RefreshCurrentCartRequest as RefreshCurrentCartRequest$1, RefreshCurrentCartResponse as RefreshCurrentCartResponse$1, CalculateCurrentCartRequest as CalculateCurrentCartRequest$1, CalculateCurrentCartResponse as CalculateCurrentCartResponse$1, AddLineItemsToCurrentCartRequest as AddLineItemsToCurrentCartRequest$1, AddLineItemsToCurrentCartResponse as AddLineItemsToCurrentCartResponse$1, RemoveLineItemsFromCurrentCartRequest as RemoveLineItemsFromCurrentCartRequest$1, RemoveLineItemsFromCurrentCartResponse as RemoveLineItemsFromCurrentCartResponse$1, UpdateLineItemsInCurrentCartRequest as UpdateLineItemsInCurrentCartRequest$1, UpdateLineItemsInCurrentCartResponse as UpdateLineItemsInCurrentCartResponse$1,
|
|
1
|
+
import { CreateCurrentCartRequest as CreateCurrentCartRequest$1, CreateCurrentCartResponse as CreateCurrentCartResponse$1, GetCurrentCartRequest as GetCurrentCartRequest$1, GetCurrentCartResponse as GetCurrentCartResponse$1, UpdateCurrentCartRequest as UpdateCurrentCartRequest$1, UpdateCurrentCartResponse as UpdateCurrentCartResponse$1, DeleteCurrentCartRequest as DeleteCurrentCartRequest$1, DeleteCurrentCartResponse as DeleteCurrentCartResponse$1, RefreshCurrentCartRequest as RefreshCurrentCartRequest$1, RefreshCurrentCartResponse as RefreshCurrentCartResponse$1, CalculateCurrentCartRequest as CalculateCurrentCartRequest$1, CalculateCurrentCartResponse as CalculateCurrentCartResponse$1, AddLineItemsToCurrentCartRequest as AddLineItemsToCurrentCartRequest$1, AddLineItemsToCurrentCartResponse as AddLineItemsToCurrentCartResponse$1, RemoveLineItemsFromCurrentCartRequest as RemoveLineItemsFromCurrentCartRequest$1, RemoveLineItemsFromCurrentCartResponse as RemoveLineItemsFromCurrentCartResponse$1, UpdateLineItemsInCurrentCartRequest as UpdateLineItemsInCurrentCartRequest$1, UpdateLineItemsInCurrentCartResponse as UpdateLineItemsInCurrentCartResponse$1, AddCouponToCurrentCartRequest as AddCouponToCurrentCartRequest$1, AddCouponToCurrentCartResponse as AddCouponToCurrentCartResponse$1, RemoveCouponFromCurrentCartRequest as RemoveCouponFromCurrentCartRequest$1, RemoveCouponFromCurrentCartResponse as RemoveCouponFromCurrentCartResponse$1, AddGiftCardToCurrentCartRequest as AddGiftCardToCurrentCartRequest$1, AddGiftCardToCurrentCartResponse as AddGiftCardToCurrentCartResponse$1, RemoveGiftCardFromCurrentCartRequest as RemoveGiftCardFromCurrentCartRequest$1, RemoveGiftCardFromCurrentCartResponse as RemoveGiftCardFromCurrentCartResponse$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.
|
|
@@ -753,6 +756,11 @@ interface SelectedMembership {
|
|
|
753
756
|
* @format GUID
|
|
754
757
|
*/
|
|
755
758
|
appId?: string;
|
|
759
|
+
/**
|
|
760
|
+
* Name of the selected membership.
|
|
761
|
+
* @readonly
|
|
762
|
+
*/
|
|
763
|
+
name?: TranslatableString;
|
|
756
764
|
}
|
|
757
765
|
declare enum ItemStatus {
|
|
758
766
|
UNKNOWN_ITEM_STATUS = "UNKNOWN_ITEM_STATUS",
|
|
@@ -853,95 +861,29 @@ interface ItemModifier {
|
|
|
853
861
|
/** The price of the modifier. */
|
|
854
862
|
price?: MultiCurrencyPrice;
|
|
855
863
|
}
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
id?: string;
|
|
864
|
+
/**
|
|
865
|
+
* Currently, only automatic discounts are applied to line items.
|
|
866
|
+
* In the future, coupon discounts will be supported as well.
|
|
867
|
+
*/
|
|
868
|
+
interface ItemDiscount {
|
|
862
869
|
/** The display name of the discount. */
|
|
863
870
|
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;
|
|
871
|
+
/** The amount discounted from the item's sale price (per unit). */
|
|
872
|
+
amountOff?: MultiCurrencyPrice;
|
|
886
873
|
}
|
|
887
|
-
interface
|
|
888
|
-
/** The type of the discount source. */
|
|
889
|
-
sourceType?: DiscountSourceTypeWithLiterals;
|
|
874
|
+
interface Coupon {
|
|
890
875
|
/**
|
|
891
|
-
*
|
|
892
|
-
*
|
|
893
|
-
* @maxLength 50
|
|
876
|
+
* ID of the coupon in the Cart.
|
|
877
|
+
* @format GUID
|
|
894
878
|
*/
|
|
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;
|
|
879
|
+
id?: string;
|
|
920
880
|
/**
|
|
921
|
-
*
|
|
922
|
-
*
|
|
923
|
-
* @
|
|
881
|
+
* Coupon code.
|
|
882
|
+
* @minLength 1
|
|
883
|
+
* @maxLength 50
|
|
924
884
|
*/
|
|
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"
|
|
885
|
+
code?: string;
|
|
942
886
|
}
|
|
943
|
-
/** @enumType */
|
|
944
|
-
type DiscountStatusWithLiterals = DiscountStatus | 'UNKNOWN_DISCOUNT_STATUS' | 'ACTIVE' | 'EXPIRED' | 'DELETED' | 'MAX_USAGE_REACHED';
|
|
945
887
|
interface CartSource {
|
|
946
888
|
/**
|
|
947
889
|
* Sales channel that created the Cart.
|
|
@@ -1420,6 +1362,72 @@ interface CartSettings {
|
|
|
1420
1362
|
*/
|
|
1421
1363
|
manualPaymentDisabled?: boolean;
|
|
1422
1364
|
}
|
|
1365
|
+
interface Discount {
|
|
1366
|
+
/** The display name of the discount. */
|
|
1367
|
+
name?: TranslatableString;
|
|
1368
|
+
/** The source of the discount, indicating how it was applied. */
|
|
1369
|
+
source?: DiscountSource;
|
|
1370
|
+
/** The component in the Cart that the discount applies to. */
|
|
1371
|
+
scope?: DiscountScopeWithLiterals;
|
|
1372
|
+
/**
|
|
1373
|
+
* List of benefits provided by the discount.
|
|
1374
|
+
* @minSize 1
|
|
1375
|
+
* @maxSize 100
|
|
1376
|
+
*/
|
|
1377
|
+
benefits?: DiscountBenefit[];
|
|
1378
|
+
/**
|
|
1379
|
+
* Number of subscription cycles this discount applies to.
|
|
1380
|
+
* If unset, the discount applies to all billing cycles.
|
|
1381
|
+
* @min 1
|
|
1382
|
+
* @max 1000
|
|
1383
|
+
*/
|
|
1384
|
+
subscriptionCycles?: number | null;
|
|
1385
|
+
}
|
|
1386
|
+
interface DiscountSource {
|
|
1387
|
+
/** The type of the discount source. */
|
|
1388
|
+
sourceType?: DiscountSourceTypeWithLiterals;
|
|
1389
|
+
/**
|
|
1390
|
+
* Coupon code that triggered the discount.
|
|
1391
|
+
* Relevant for coupon discounts only.
|
|
1392
|
+
* @maxLength 50
|
|
1393
|
+
*/
|
|
1394
|
+
couponCode?: string | null;
|
|
1395
|
+
}
|
|
1396
|
+
declare enum DiscountSourceType {
|
|
1397
|
+
UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
|
|
1398
|
+
/** The discount was applied automatically by a rule. */
|
|
1399
|
+
AUTOMATIC_RULE = "AUTOMATIC_RULE",
|
|
1400
|
+
/** The discount was applied by a coupon code. */
|
|
1401
|
+
COUPON = "COUPON"
|
|
1402
|
+
}
|
|
1403
|
+
/** @enumType */
|
|
1404
|
+
type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
|
|
1405
|
+
declare enum DiscountScope {
|
|
1406
|
+
UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
|
|
1407
|
+
/** The discount applies to the cart's subtotal. */
|
|
1408
|
+
CART_SUBTOTAL = "CART_SUBTOTAL",
|
|
1409
|
+
/** The discount applies to a specific line item. */
|
|
1410
|
+
LINE_ITEM = "LINE_ITEM",
|
|
1411
|
+
/** The discount applies to the delivery price. */
|
|
1412
|
+
DELIVERY = "DELIVERY"
|
|
1413
|
+
}
|
|
1414
|
+
/** @enumType */
|
|
1415
|
+
type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
|
|
1416
|
+
interface DiscountBenefit extends DiscountBenefitValueOneOf {
|
|
1417
|
+
/** A specific monetary value deducted from the total cost. */
|
|
1418
|
+
amountOff?: MultiCurrencyPrice;
|
|
1419
|
+
/**
|
|
1420
|
+
* The ID of line item that the discount applies to.
|
|
1421
|
+
* Relevant for item-level discounts only.
|
|
1422
|
+
* @format GUID
|
|
1423
|
+
*/
|
|
1424
|
+
lineItemId?: string | null;
|
|
1425
|
+
}
|
|
1426
|
+
/** @oneof */
|
|
1427
|
+
interface DiscountBenefitValueOneOf {
|
|
1428
|
+
/** A specific monetary value deducted from the total cost. */
|
|
1429
|
+
amountOff?: MultiCurrencyPrice;
|
|
1430
|
+
}
|
|
1423
1431
|
interface CartSummary {
|
|
1424
1432
|
/**
|
|
1425
1433
|
* The Cart ID.
|
|
@@ -1688,8 +1696,6 @@ interface Membership {
|
|
|
1688
1696
|
* @maxLength 100
|
|
1689
1697
|
*/
|
|
1690
1698
|
lineItemIds?: string[];
|
|
1691
|
-
/** The name of this membership. */
|
|
1692
|
-
name?: TranslatableString;
|
|
1693
1699
|
}
|
|
1694
1700
|
interface SubscriptionCharges {
|
|
1695
1701
|
/**
|
|
@@ -2159,7 +2165,7 @@ interface UpdateLineItemsInCurrentCartResponse {
|
|
|
2159
2165
|
/** Updated Cart. */
|
|
2160
2166
|
cart?: Cart;
|
|
2161
2167
|
}
|
|
2162
|
-
interface
|
|
2168
|
+
interface AddCouponToCurrentCartRequest {
|
|
2163
2169
|
/**
|
|
2164
2170
|
* Coupon to apply.
|
|
2165
2171
|
*
|
|
@@ -2169,18 +2175,18 @@ interface AddDiscountToCurrentCartRequest {
|
|
|
2169
2175
|
*/
|
|
2170
2176
|
couponCode: string;
|
|
2171
2177
|
}
|
|
2172
|
-
interface
|
|
2178
|
+
interface AddCouponToCurrentCartResponse {
|
|
2173
2179
|
/** Updated Cart. */
|
|
2174
2180
|
cart?: Cart;
|
|
2175
2181
|
}
|
|
2176
|
-
interface
|
|
2182
|
+
interface RemoveCouponFromCurrentCartRequest {
|
|
2177
2183
|
/**
|
|
2178
|
-
*
|
|
2184
|
+
* Coupon ID.
|
|
2179
2185
|
* @format GUID
|
|
2180
2186
|
*/
|
|
2181
|
-
|
|
2187
|
+
couponId: string;
|
|
2182
2188
|
}
|
|
2183
|
-
interface
|
|
2189
|
+
interface RemoveCouponFromCurrentCartResponse {
|
|
2184
2190
|
/** Updated Cart. */
|
|
2185
2191
|
cart?: Cart;
|
|
2186
2192
|
}
|
|
@@ -2228,9 +2234,9 @@ declare function calculateCurrentCart(): __PublicMethodMetaInfo<'POST', {}, Calc
|
|
|
2228
2234
|
declare function addLineItemsToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddLineItemsToCurrentCartRequest$1, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse$1, AddLineItemsToCurrentCartResponse>;
|
|
2229
2235
|
declare function removeLineItemsFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveLineItemsFromCurrentCartRequest$1, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse$1, RemoveLineItemsFromCurrentCartResponse>;
|
|
2230
2236
|
declare function updateLineItemsInCurrentCart(): __PublicMethodMetaInfo<'POST', {}, UpdateLineItemsInCurrentCartRequest$1, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse$1, UpdateLineItemsInCurrentCartResponse>;
|
|
2231
|
-
declare function
|
|
2232
|
-
declare function
|
|
2237
|
+
declare function addCouponToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddCouponToCurrentCartRequest$1, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse$1, AddCouponToCurrentCartResponse>;
|
|
2238
|
+
declare function removeCouponFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveCouponFromCurrentCartRequest$1, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse$1, RemoveCouponFromCurrentCartResponse>;
|
|
2233
2239
|
declare function addGiftCardToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddGiftCardToCurrentCartRequest$1, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse$1, AddGiftCardToCurrentCartResponse>;
|
|
2234
2240
|
declare function removeGiftCardFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveGiftCardFromCurrentCartRequest$1, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse$1, RemoveGiftCardFromCurrentCartResponse>;
|
|
2235
2241
|
|
|
2236
|
-
export { type __PublicMethodMetaInfo,
|
|
2242
|
+
export { type __PublicMethodMetaInfo, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };
|
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
|
+
addCouponToCurrentCart: () => addCouponToCurrentCart2,
|
|
24
24
|
addGiftCardToCurrentCart: () => addGiftCardToCurrentCart2,
|
|
25
25
|
addLineItemsToCurrentCart: () => addLineItemsToCurrentCart2,
|
|
26
26
|
calculateCurrentCart: () => calculateCurrentCart2,
|
|
@@ -28,7 +28,7 @@ __export(meta_exports, {
|
|
|
28
28
|
deleteCurrentCart: () => deleteCurrentCart2,
|
|
29
29
|
getCurrentCart: () => getCurrentCart2,
|
|
30
30
|
refreshCurrentCart: () => refreshCurrentCart2,
|
|
31
|
-
|
|
31
|
+
removeCouponFromCurrentCart: () => removeCouponFromCurrentCart2,
|
|
32
32
|
removeGiftCardFromCurrentCart: () => removeGiftCardFromCurrentCart2,
|
|
33
33
|
removeLineItemsFromCurrentCart: () => removeLineItemsFromCurrentCart2,
|
|
34
34
|
updateCurrentCart: () => updateCurrentCart2,
|
|
@@ -656,15 +656,15 @@ function updateLineItemsInCurrentCart(payload) {
|
|
|
656
656
|
}
|
|
657
657
|
return __updateLineItemsInCurrentCart;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
function
|
|
659
|
+
function addCouponToCurrentCart(payload) {
|
|
660
|
+
function __addCouponToCurrentCart({ host }) {
|
|
661
661
|
const metadata = {
|
|
662
662
|
entityFqdn: "wix.ecom.v2.cart",
|
|
663
663
|
method: "POST",
|
|
664
|
-
methodFqn: "wix.ecom.cart.v2.CurrentCartService.
|
|
664
|
+
methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddCouponToCurrentCart",
|
|
665
665
|
packageName: PACKAGE_NAME,
|
|
666
666
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
667
|
-
protoPath: "/v2/carts/current/add-
|
|
667
|
+
protoPath: "/v2/carts/current/add-coupon",
|
|
668
668
|
data: payload,
|
|
669
669
|
host
|
|
670
670
|
}),
|
|
@@ -704,17 +704,17 @@ function addDiscountToCurrentCart(payload) {
|
|
|
704
704
|
};
|
|
705
705
|
return metadata;
|
|
706
706
|
}
|
|
707
|
-
return
|
|
707
|
+
return __addCouponToCurrentCart;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
function
|
|
709
|
+
function removeCouponFromCurrentCart(payload) {
|
|
710
|
+
function __removeCouponFromCurrentCart({ host }) {
|
|
711
711
|
const metadata = {
|
|
712
712
|
entityFqdn: "wix.ecom.v2.cart",
|
|
713
713
|
method: "POST",
|
|
714
|
-
methodFqn: "wix.ecom.cart.v2.CurrentCartService.
|
|
714
|
+
methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveCouponFromCurrentCart",
|
|
715
715
|
packageName: PACKAGE_NAME,
|
|
716
716
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
717
|
-
protoPath: "/v2/carts/current/remove-
|
|
717
|
+
protoPath: "/v2/carts/current/remove-coupon",
|
|
718
718
|
data: payload,
|
|
719
719
|
host
|
|
720
720
|
}),
|
|
@@ -754,7 +754,7 @@ function removeDiscountFromCurrentCart(payload) {
|
|
|
754
754
|
};
|
|
755
755
|
return metadata;
|
|
756
756
|
}
|
|
757
|
-
return
|
|
757
|
+
return __removeCouponFromCurrentCart;
|
|
758
758
|
}
|
|
759
759
|
function addGiftCardToCurrentCart(payload) {
|
|
760
760
|
function __addGiftCardToCurrentCart({ host }) {
|
|
@@ -1020,9 +1020,9 @@ function updateLineItemsInCurrentCart2() {
|
|
|
1020
1020
|
__originalResponseType: null
|
|
1021
1021
|
};
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function addCouponToCurrentCart2() {
|
|
1024
1024
|
const payload = {};
|
|
1025
|
-
const getRequestOptions =
|
|
1025
|
+
const getRequestOptions = addCouponToCurrentCart(payload);
|
|
1026
1026
|
const getUrl = (context) => {
|
|
1027
1027
|
const { url } = getRequestOptions(context);
|
|
1028
1028
|
return url;
|
|
@@ -1030,7 +1030,7 @@ function addDiscountToCurrentCart2() {
|
|
|
1030
1030
|
return {
|
|
1031
1031
|
getUrl,
|
|
1032
1032
|
httpMethod: "POST",
|
|
1033
|
-
path: "/v2/carts/current/add-
|
|
1033
|
+
path: "/v2/carts/current/add-coupon",
|
|
1034
1034
|
pathParams: {},
|
|
1035
1035
|
__requestType: null,
|
|
1036
1036
|
__originalRequestType: null,
|
|
@@ -1038,9 +1038,9 @@ function addDiscountToCurrentCart2() {
|
|
|
1038
1038
|
__originalResponseType: null
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function removeCouponFromCurrentCart2() {
|
|
1042
1042
|
const payload = {};
|
|
1043
|
-
const getRequestOptions =
|
|
1043
|
+
const getRequestOptions = removeCouponFromCurrentCart(payload);
|
|
1044
1044
|
const getUrl = (context) => {
|
|
1045
1045
|
const { url } = getRequestOptions(context);
|
|
1046
1046
|
return url;
|
|
@@ -1048,7 +1048,7 @@ function removeDiscountFromCurrentCart2() {
|
|
|
1048
1048
|
return {
|
|
1049
1049
|
getUrl,
|
|
1050
1050
|
httpMethod: "POST",
|
|
1051
|
-
path: "/v2/carts/current/remove-
|
|
1051
|
+
path: "/v2/carts/current/remove-coupon",
|
|
1052
1052
|
pathParams: {},
|
|
1053
1053
|
__requestType: null,
|
|
1054
1054
|
__originalRequestType: null,
|
|
@@ -1094,7 +1094,7 @@ function removeGiftCardFromCurrentCart2() {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1096
1096
|
0 && (module.exports = {
|
|
1097
|
-
|
|
1097
|
+
addCouponToCurrentCart,
|
|
1098
1098
|
addGiftCardToCurrentCart,
|
|
1099
1099
|
addLineItemsToCurrentCart,
|
|
1100
1100
|
calculateCurrentCart,
|
|
@@ -1102,7 +1102,7 @@ function removeGiftCardFromCurrentCart2() {
|
|
|
1102
1102
|
deleteCurrentCart,
|
|
1103
1103
|
getCurrentCart,
|
|
1104
1104
|
refreshCurrentCart,
|
|
1105
|
-
|
|
1105
|
+
removeCouponFromCurrentCart,
|
|
1106
1106
|
removeGiftCardFromCurrentCart,
|
|
1107
1107
|
removeLineItemsFromCurrentCart,
|
|
1108
1108
|
updateCurrentCart,
|