@wix/auto_sdk_ecom_cart-v-2 1.0.26 → 1.0.27
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 +62 -8
- package/build/cjs/index.js +109 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +100 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +64 -9
- package/build/cjs/meta.js +69 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +62 -8
- package/build/es/index.mjs +108 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +99 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +64 -9
- package/build/es/meta.mjs +68 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +16 -4
- package/build/internal/cjs/index.js +109 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +76 -9
- package/build/internal/cjs/index.typings.js +100 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +64 -9
- package/build/internal/cjs/meta.js +69 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +16 -4
- package/build/internal/es/index.mjs +108 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +76 -9
- package/build/internal/es/index.typings.mjs +99 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +64 -9
- package/build/internal/es/meta.mjs +68 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1191,7 +1191,10 @@ type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
|
|
|
1191
1191
|
interface DeliveryInfo {
|
|
1192
1192
|
/** The delivery address. */
|
|
1193
1193
|
address?: Address;
|
|
1194
|
-
/**
|
|
1194
|
+
/**
|
|
1195
|
+
* The selected delivery method by the customer.
|
|
1196
|
+
* @readonly
|
|
1197
|
+
*/
|
|
1195
1198
|
method?: DeliveryMethod;
|
|
1196
1199
|
/**
|
|
1197
1200
|
* The unit of weight measurement when shipping items (e.g., KG, LB).
|
|
@@ -1262,7 +1265,7 @@ interface DeliveryMethod {
|
|
|
1262
1265
|
/**
|
|
1263
1266
|
* Unique code that acts as an ID for a shipping rate.
|
|
1264
1267
|
* For example, `"usps_std_overnight"`.
|
|
1265
|
-
* @maxLength
|
|
1268
|
+
* @maxLength 100
|
|
1266
1269
|
*/
|
|
1267
1270
|
code?: string;
|
|
1268
1271
|
/**
|
|
@@ -1273,13 +1276,9 @@ interface DeliveryMethod {
|
|
|
1273
1276
|
/**
|
|
1274
1277
|
* Delivery rate title.
|
|
1275
1278
|
* For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`.
|
|
1276
|
-
* @readonly
|
|
1277
1279
|
*/
|
|
1278
1280
|
title?: TranslatableString;
|
|
1279
|
-
/**
|
|
1280
|
-
* Whether the delivery method is a pickup option.
|
|
1281
|
-
* @readonly
|
|
1282
|
-
*/
|
|
1281
|
+
/** Whether the delivery method is a pickup option. */
|
|
1283
1282
|
pickup?: boolean;
|
|
1284
1283
|
}
|
|
1285
1284
|
declare enum WeightUnit {
|
|
@@ -1298,6 +1297,11 @@ interface TaxInfo {
|
|
|
1298
1297
|
* @readonly
|
|
1299
1298
|
*/
|
|
1300
1299
|
pricesIncludeTax?: boolean;
|
|
1300
|
+
/**
|
|
1301
|
+
* Tax exempt group ID to use for tax exemptions.
|
|
1302
|
+
* @format GUID
|
|
1303
|
+
*/
|
|
1304
|
+
taxExemptGroupId?: string | null;
|
|
1301
1305
|
}
|
|
1302
1306
|
interface PaymentInfo {
|
|
1303
1307
|
/**
|
|
@@ -1491,6 +1495,11 @@ interface CartSummary {
|
|
|
1491
1495
|
* @format GUID
|
|
1492
1496
|
*/
|
|
1493
1497
|
cartId?: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* A unique identifier for this specific cart calculation.
|
|
1500
|
+
* @format GUID
|
|
1501
|
+
*/
|
|
1502
|
+
calculationId?: string;
|
|
1494
1503
|
/**
|
|
1495
1504
|
* Summarized details for each line item in the cart.
|
|
1496
1505
|
* @maxSize 300
|
|
@@ -2028,6 +2037,8 @@ interface CreateCurrentCartRequest {
|
|
|
2028
2037
|
* @maxLength 50
|
|
2029
2038
|
*/
|
|
2030
2039
|
couponCodes?: string[];
|
|
2040
|
+
/** Delivery method to set. */
|
|
2041
|
+
deliveryMethod?: DeliveryMethodInput;
|
|
2031
2042
|
/**
|
|
2032
2043
|
* Gift cards to add.
|
|
2033
2044
|
* Currently only one is support.
|
|
@@ -2199,6 +2210,18 @@ interface CustomItemPaymentConfig {
|
|
|
2199
2210
|
*/
|
|
2200
2211
|
paymentOption?: PaymentOptionTypeWithLiterals;
|
|
2201
2212
|
}
|
|
2213
|
+
interface DeliveryMethodInput {
|
|
2214
|
+
/**
|
|
2215
|
+
* Delivery method code.
|
|
2216
|
+
* @maxLength 100
|
|
2217
|
+
*/
|
|
2218
|
+
code?: string;
|
|
2219
|
+
/**
|
|
2220
|
+
* Carrier app id.
|
|
2221
|
+
* @format GUID
|
|
2222
|
+
*/
|
|
2223
|
+
appId?: string | null;
|
|
2224
|
+
}
|
|
2202
2225
|
interface CreateCurrentCartResponse {
|
|
2203
2226
|
/** The created Cart. */
|
|
2204
2227
|
cart?: Cart;
|
|
@@ -2378,6 +2401,14 @@ interface RemoveCouponFromCurrentCartResponse {
|
|
|
2378
2401
|
/** Updated Cart. */
|
|
2379
2402
|
cart?: Cart;
|
|
2380
2403
|
}
|
|
2404
|
+
interface SetDeliveryMethodForCurrentCartRequest {
|
|
2405
|
+
/** Delivery method. */
|
|
2406
|
+
deliveryMethod?: DeliveryMethodInput;
|
|
2407
|
+
}
|
|
2408
|
+
interface SetDeliveryMethodForCurrentCartResponse {
|
|
2409
|
+
/** Updated Cart. */
|
|
2410
|
+
cart?: Cart;
|
|
2411
|
+
}
|
|
2381
2412
|
interface AddGiftCardToCurrentCartRequest {
|
|
2382
2413
|
/**
|
|
2383
2414
|
* Gift card code.
|
|
@@ -2402,6 +2433,12 @@ interface RemoveGiftCardFromCurrentCartResponse {
|
|
|
2402
2433
|
/** Updated Cart. */
|
|
2403
2434
|
cart?: Cart;
|
|
2404
2435
|
}
|
|
2436
|
+
interface UnmarkAsCurrentCartRequest {
|
|
2437
|
+
}
|
|
2438
|
+
interface UnmarkAsCurrentCartResponse {
|
|
2439
|
+
/** Cart that was unmarked as current cart, if such existed. */
|
|
2440
|
+
cart?: Cart;
|
|
2441
|
+
}
|
|
2405
2442
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
2406
2443
|
createdEvent?: EntityCreatedEvent;
|
|
2407
2444
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -2561,6 +2598,8 @@ interface CreateCartRequest {
|
|
|
2561
2598
|
* @maxLength 50
|
|
2562
2599
|
*/
|
|
2563
2600
|
couponCodes?: string[];
|
|
2601
|
+
/** Delivery method to set. */
|
|
2602
|
+
deliveryMethod?: DeliveryMethodInput;
|
|
2564
2603
|
/**
|
|
2565
2604
|
* Gift cards to add.
|
|
2566
2605
|
* Currently only one is support.
|
|
@@ -2821,6 +2860,19 @@ interface RemoveCouponResponse {
|
|
|
2821
2860
|
/** Updated Cart. */
|
|
2822
2861
|
cart?: Cart;
|
|
2823
2862
|
}
|
|
2863
|
+
interface SetDeliveryMethodRequest {
|
|
2864
|
+
/**
|
|
2865
|
+
* Cart ID.
|
|
2866
|
+
* @format GUID
|
|
2867
|
+
*/
|
|
2868
|
+
cartId: string;
|
|
2869
|
+
/** Delivery method. */
|
|
2870
|
+
deliveryMethod: DeliveryMethodInput;
|
|
2871
|
+
}
|
|
2872
|
+
interface SetDeliveryMethodResponse {
|
|
2873
|
+
/** Updated Cart. */
|
|
2874
|
+
cart?: Cart;
|
|
2875
|
+
}
|
|
2824
2876
|
interface AddGiftCardRequest {
|
|
2825
2877
|
/**
|
|
2826
2878
|
* Cart ID.
|
|
@@ -2934,6 +2986,8 @@ interface CreateCartOptions {
|
|
|
2934
2986
|
* @maxLength 50
|
|
2935
2987
|
*/
|
|
2936
2988
|
couponCodes?: string[];
|
|
2989
|
+
/** Delivery method to set. */
|
|
2990
|
+
deliveryMethod?: DeliveryMethodInput;
|
|
2937
2991
|
/**
|
|
2938
2992
|
* Gift cards to add.
|
|
2939
2993
|
* Currently only one is support.
|
|
@@ -3103,7 +3157,7 @@ declare function refreshCart(cartId: string): Promise<NonNullablePaths<RefreshCa
|
|
|
3103
3157
|
* @permissionId ecom:v2:cart:calculate_cart
|
|
3104
3158
|
* @fqn wix.ecom.cart.v2.CartService.CalculateCart
|
|
3105
3159
|
*/
|
|
3106
|
-
declare function calculateCart(cartId: string, options?: CalculateCartOptions): Promise<NonNullablePaths<CalculateCartResponse, `cart._id` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled` | `summary.cartId` | `summary.lineItems` | `summary.lineItems.${number}.lineItemId` | `summary.lineItems.${number}.quantity` | `summary.lineItems.${number}.unitPrice.amount` | `summary.lineItems.${number}.unitPrice.convertedAmount` | `summary.discounts` | `summary.discounts.${number}.name.original` | `summary.discounts.${number}.source.sourceType` | `summary.discounts.${number}.scope` | `summary.deliverySummary.method.code` | `summary.deliverySummary.method.pickup` | `summary.additionalFees` | `summary.taxSummary.taxes` | `summary.taxSummary.pricesIncludeTax` | `summary.taxSummary.lineItemTaxes` | `summary.taxSummary.lineItemTaxes.${number}.lineItemId` | `summary.taxSummary.additionalFeeTaxes` | `summary.taxSummary.additionalFeeTaxes.${number}.additionalFeeCode` | `summary.paymentSummary.giftCards` | `summary.paymentSummary.giftCards.${number}.giftCardId` | `summary.paymentSummary.memberships` | `summary.paymentSummary.memberships.${number}._id` | `summary.paymentSummary.memberships.${number}.appId` | `summary.paymentSummary.subscriptionCharges` | `summary.paymentSummary.requiresPaymentAfterGiftCard` | `summary.calculationErrors.generalShippingCalculationError.applicationError.code` | `summary.calculationErrors.generalShippingCalculationError.applicationError.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `summary.calculationErrors.carrierErrors.errors` | `summary.calculationErrors.carrierErrors.errors.${number}.carrierId` | `summary.calculationErrors.orderValidationErrors` | `summary.spiViolations` | `summary.spiViolations.${number}.severity` | `summary.spiViolations.${number}.target.other.name` | `summary.spiViolations.${number}.target.lineItem.name`, 8>>;
|
|
3160
|
+
declare function calculateCart(cartId: string, options?: CalculateCartOptions): Promise<NonNullablePaths<CalculateCartResponse, `cart._id` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled` | `summary.cartId` | `summary.calculationId` | `summary.lineItems` | `summary.lineItems.${number}.lineItemId` | `summary.lineItems.${number}.quantity` | `summary.lineItems.${number}.unitPrice.amount` | `summary.lineItems.${number}.unitPrice.convertedAmount` | `summary.discounts` | `summary.discounts.${number}.name.original` | `summary.discounts.${number}.source.sourceType` | `summary.discounts.${number}.scope` | `summary.deliverySummary.method.code` | `summary.deliverySummary.method.pickup` | `summary.additionalFees` | `summary.taxSummary.taxes` | `summary.taxSummary.pricesIncludeTax` | `summary.taxSummary.lineItemTaxes` | `summary.taxSummary.lineItemTaxes.${number}.lineItemId` | `summary.taxSummary.additionalFeeTaxes` | `summary.taxSummary.additionalFeeTaxes.${number}.additionalFeeCode` | `summary.paymentSummary.giftCards` | `summary.paymentSummary.giftCards.${number}.giftCardId` | `summary.paymentSummary.memberships` | `summary.paymentSummary.memberships.${number}._id` | `summary.paymentSummary.memberships.${number}.appId` | `summary.paymentSummary.subscriptionCharges` | `summary.paymentSummary.requiresPaymentAfterGiftCard` | `summary.calculationErrors.generalShippingCalculationError.applicationError.code` | `summary.calculationErrors.generalShippingCalculationError.applicationError.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `summary.calculationErrors.carrierErrors.errors` | `summary.calculationErrors.carrierErrors.errors.${number}.carrierId` | `summary.calculationErrors.orderValidationErrors` | `summary.spiViolations` | `summary.spiViolations.${number}.severity` | `summary.spiViolations.${number}.target.other.name` | `summary.spiViolations.${number}.target.lineItem.name`, 8>>;
|
|
3107
3161
|
interface CalculateCartOptions {
|
|
3108
3162
|
/**
|
|
3109
3163
|
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
|
|
@@ -3265,6 +3319,19 @@ declare function addCoupon(cartId: string, couponCode: string): Promise<NonNulla
|
|
|
3265
3319
|
* @fqn wix.ecom.cart.v2.CartService.RemoveCoupon
|
|
3266
3320
|
*/
|
|
3267
3321
|
declare function removeCoupon(cartId: string, couponId: string): Promise<NonNullablePaths<RemoveCouponResponse, `cart._id` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled`, 7>>;
|
|
3322
|
+
/**
|
|
3323
|
+
* Sets the delivery method for the Cart.
|
|
3324
|
+
* @param cartId - Cart ID.
|
|
3325
|
+
* @param deliveryMethod - Delivery method.
|
|
3326
|
+
* @internal
|
|
3327
|
+
* @documentationMaturity preview
|
|
3328
|
+
* @requiredField cartId
|
|
3329
|
+
* @requiredField deliveryMethod
|
|
3330
|
+
* @requiredField deliveryMethod.code
|
|
3331
|
+
* @permissionId ecom:v2:cart:update_cart
|
|
3332
|
+
* @fqn wix.ecom.cart.v2.CartService.SetDeliveryMethod
|
|
3333
|
+
*/
|
|
3334
|
+
declare function setDeliveryMethod(cartId: string, deliveryMethod: NonNullablePaths<DeliveryMethodInput, `code`, 2>): Promise<NonNullablePaths<SetDeliveryMethodResponse, `cart._id` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled`, 7>>;
|
|
3268
3335
|
/**
|
|
3269
3336
|
* Adds a gift card to the Cart.
|
|
3270
3337
|
* Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.
|
|
@@ -3325,4 +3392,4 @@ interface MarkCartAsCompletedOptions {
|
|
|
3325
3392
|
*/
|
|
3326
3393
|
declare function handleAsyncCheckoutCompletion(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
|
|
3327
3394
|
|
|
3328
|
-
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type ConvertedMoney, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryInfo, type DeliveryMethod, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, Severity, type SeverityWithLiterals, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, updateCart, updateLineItems };
|
|
3395
|
+
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type ConvertedMoney, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryInfo, type DeliveryMethod, type DeliveryMethodInput, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateLineItems };
|
|
@@ -54,6 +54,7 @@ __export(index_typings_exports, {
|
|
|
54
54
|
removeCoupon: () => removeCoupon2,
|
|
55
55
|
removeGiftCard: () => removeGiftCard2,
|
|
56
56
|
removeLineItems: () => removeLineItems2,
|
|
57
|
+
setDeliveryMethod: () => setDeliveryMethod2,
|
|
57
58
|
updateCart: () => updateCart2,
|
|
58
59
|
updateLineItems: () => updateLineItems2
|
|
59
60
|
});
|
|
@@ -803,6 +804,55 @@ function removeCoupon(payload) {
|
|
|
803
804
|
}
|
|
804
805
|
return __removeCoupon;
|
|
805
806
|
}
|
|
807
|
+
function setDeliveryMethod(payload) {
|
|
808
|
+
function __setDeliveryMethod({ host }) {
|
|
809
|
+
const metadata = {
|
|
810
|
+
entityFqdn: "wix.ecom.v2.cart",
|
|
811
|
+
method: "POST",
|
|
812
|
+
methodFqn: "wix.ecom.cart.v2.CartService.SetDeliveryMethod",
|
|
813
|
+
packageName: PACKAGE_NAME,
|
|
814
|
+
migrationOptions: {
|
|
815
|
+
optInTransformResponse: true
|
|
816
|
+
},
|
|
817
|
+
url: resolveWixEcomCartV2CartServiceUrl({
|
|
818
|
+
protoPath: "/v2/carts/{cartId}/set-delivery-method",
|
|
819
|
+
data: payload,
|
|
820
|
+
host
|
|
821
|
+
}),
|
|
822
|
+
data: payload,
|
|
823
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
824
|
+
{
|
|
825
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
826
|
+
paths: [
|
|
827
|
+
{ path: "cart.createdDate" },
|
|
828
|
+
{ path: "cart.updatedDate" },
|
|
829
|
+
{
|
|
830
|
+
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
|
|
834
|
+
}
|
|
835
|
+
]
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
839
|
+
paths: [
|
|
840
|
+
{
|
|
841
|
+
path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
|
|
842
|
+
},
|
|
843
|
+
{ path: "cart.lineItems.attributes.physicalProperties.weight" },
|
|
844
|
+
{ path: "cart.deliveryInfo.address.geocode.latitude" },
|
|
845
|
+
{ path: "cart.deliveryInfo.address.geocode.longitude" },
|
|
846
|
+
{ path: "cart.paymentInfo.billingAddress.geocode.latitude" },
|
|
847
|
+
{ path: "cart.paymentInfo.billingAddress.geocode.longitude" }
|
|
848
|
+
]
|
|
849
|
+
}
|
|
850
|
+
])
|
|
851
|
+
};
|
|
852
|
+
return metadata;
|
|
853
|
+
}
|
|
854
|
+
return __setDeliveryMethod;
|
|
855
|
+
}
|
|
806
856
|
function addGiftCard(payload) {
|
|
807
857
|
function __addGiftCard({ host }) {
|
|
808
858
|
const metadata = {
|
|
@@ -1151,6 +1201,7 @@ async function createCart2(options) {
|
|
|
1151
1201
|
catalogItems: options?.catalogItems,
|
|
1152
1202
|
customItems: options?.customItems,
|
|
1153
1203
|
couponCodes: options?.couponCodes,
|
|
1204
|
+
deliveryMethod: options?.deliveryMethod,
|
|
1154
1205
|
giftCardCodes: options?.giftCardCodes
|
|
1155
1206
|
}),
|
|
1156
1207
|
[
|
|
@@ -1216,6 +1267,7 @@ async function createCart2(options) {
|
|
|
1216
1267
|
catalogItems: "$[0].catalogItems",
|
|
1217
1268
|
customItems: "$[0].customItems",
|
|
1218
1269
|
couponCodes: "$[0].couponCodes",
|
|
1270
|
+
deliveryMethod: "$[0].deliveryMethod",
|
|
1219
1271
|
giftCardCodes: "$[0].giftCardCodes"
|
|
1220
1272
|
},
|
|
1221
1273
|
singleArgumentUnchanged: false
|
|
@@ -1780,6 +1832,53 @@ async function removeCoupon2(cartId, couponId) {
|
|
|
1780
1832
|
throw transformedError;
|
|
1781
1833
|
}
|
|
1782
1834
|
}
|
|
1835
|
+
async function setDeliveryMethod2(cartId, deliveryMethod) {
|
|
1836
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1837
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1838
|
+
cartId,
|
|
1839
|
+
deliveryMethod
|
|
1840
|
+
});
|
|
1841
|
+
const reqOpts = setDeliveryMethod(payload);
|
|
1842
|
+
sideEffects?.onSiteCall?.();
|
|
1843
|
+
try {
|
|
1844
|
+
const result = await httpClient.request(reqOpts);
|
|
1845
|
+
sideEffects?.onSuccess?.(result);
|
|
1846
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1847
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1848
|
+
{
|
|
1849
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1850
|
+
paths: [
|
|
1851
|
+
{ path: "cart.lineItems.source.catalogOverrideFields.image" },
|
|
1852
|
+
{ path: "cart.lineItems.attributes.image" }
|
|
1853
|
+
]
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
|
|
1857
|
+
paths: [{ path: "cart.lineItems.attributes.url" }]
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
transformFn: import_address2.transformRESTAddressToSDKAddress,
|
|
1861
|
+
paths: [
|
|
1862
|
+
{ path: "cart.deliveryInfo.address" },
|
|
1863
|
+
{ path: "cart.paymentInfo.billingAddress" }
|
|
1864
|
+
]
|
|
1865
|
+
}
|
|
1866
|
+
])
|
|
1867
|
+
);
|
|
1868
|
+
} catch (err) {
|
|
1869
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1870
|
+
err,
|
|
1871
|
+
{
|
|
1872
|
+
spreadPathsToArguments: {},
|
|
1873
|
+
explicitPathsToArguments: { cartId: "$[0]", deliveryMethod: "$[1]" },
|
|
1874
|
+
singleArgumentUnchanged: false
|
|
1875
|
+
},
|
|
1876
|
+
["cartId", "deliveryMethod"]
|
|
1877
|
+
);
|
|
1878
|
+
sideEffects?.onError?.(err);
|
|
1879
|
+
throw transformedError;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1783
1882
|
async function addGiftCard2(cartId, giftCardCode) {
|
|
1784
1883
|
const { httpClient, sideEffects } = arguments[2];
|
|
1785
1884
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1980,6 +2079,7 @@ async function handleAsyncCheckoutCompletion2(token) {
|
|
|
1980
2079
|
removeCoupon,
|
|
1981
2080
|
removeGiftCard,
|
|
1982
2081
|
removeLineItems,
|
|
2082
|
+
setDeliveryMethod,
|
|
1983
2083
|
updateCart,
|
|
1984
2084
|
updateLineItems
|
|
1985
2085
|
});
|