@wix/auto_sdk_ecom_cart-v-2 1.0.25 → 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 +64 -9
- 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 +66 -10
- package/build/cjs/meta.js +69 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +64 -9
- 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 +66 -10
- 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 +78 -10
- 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 +66 -10
- 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 +78 -10
- 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 +66 -10
- package/build/internal/es/meta.mjs +68 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { CreateCartOptions, Cart, UpdateCart, RefreshCartResponse, CalculateCartOptions, CalculateCartResponse, GetCheckoutUrlOptions, GetCheckoutURLResponse, PlaceOrderOptions, PlaceOrderResponse, AddLineItemsOptions, AddLineItemsResponse, RemoveLineItemsResponse, UpdateLineItemsOptions, UpdateLineItemsResponse, AddCouponResponse, RemoveCouponResponse, AddGiftCardResponse, RemoveGiftCardResponse, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, RawHttpResponse } from './index.typings.js';
|
|
3
|
-
export { ActionEvent, AddCouponRequest, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeTax, Address, AddressLocation, ApplicationError, BusinessInfo, CalculateCartRequest, CalculateCurrentCartRequest, CalculateCurrentCartResponse, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, Color, ConvertedMoney, Coupon, CreateCartRequest, CreateCartResponse, CreateCurrentCartRequest, CreateCurrentCartResponse, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryInfo, DeliveryMethod, DeliverySummary, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Discount, DiscountBenefit, DiscountBenefitValueOneOf, DiscountScope, DiscountScopeWithLiterals, DiscountSource, DiscountSourceType, DiscountSourceTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, ExternalReference, FieldViolation, FileType, FileTypeWithLiterals, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCurrentCartRequest, GetCurrentCartResponse, GiftCard, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, ItemAttributes, ItemDeliveryConfig, ItemDiscount, ItemModifier, ItemPaymentConfig, ItemPriceBreakdown, ItemPricingInfo, ItemQuantityInfo, ItemSource, ItemStatus, ItemStatusWithLiterals, ItemTaxConfig, ItemType, ItemTypeItemType, ItemTypeItemTypeDataOneOf, ItemTypeItemTypeWithLiterals, LegacyFields, LineItem, LineItemSummary, LineItemTax, LineItemUpdate, MarkCartAsCompletedRequest, Membership, MessageEnvelope, ModifierGroup, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, Other, PaymentInfo, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentSummary, PhysicalProperties, PlaceOrderRequest, PlainTextValue, Policy, PriceDescription, PriceSummary, QuantityUpdate, RedirectUrls, RefreshCartRequest, RefreshCurrentCartRequest, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse, RemoveCouponRequest, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardRequest, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsRequest, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedMembership, SelectedMembershipUpdate, ServiceProperties, Severity, SeverityWithLiterals, StreetAddress, SubscriptionCharges, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionOptionInfo, SubscriptionSettings, SuggestedFix, SuggestedFixWithLiterals, SystemError, Target, TargetTargetTypeOneOf, Tax, TaxDetails, TaxInfo, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, Title, TranslatableString, UpdateCartRequest, UpdateCartResponse, UpdateCurrentCartRequest, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse, UpdateLineItemsRequest, V2AdditionalFee, V2LineItem, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
|
|
2
|
+
import { CreateCartOptions, Cart, UpdateCart, RefreshCartResponse, CalculateCartOptions, CalculateCartResponse, GetCheckoutUrlOptions, GetCheckoutURLResponse, PlaceOrderOptions, PlaceOrderResponse, AddLineItemsOptions, AddLineItemsResponse, RemoveLineItemsResponse, UpdateLineItemsOptions, UpdateLineItemsResponse, AddCouponResponse, RemoveCouponResponse, DeliveryMethodInput, SetDeliveryMethodResponse, AddGiftCardResponse, RemoveGiftCardResponse, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, RawHttpResponse } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, AddCouponRequest, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeTax, Address, AddressLocation, ApplicationError, BusinessInfo, CalculateCartRequest, CalculateCurrentCartRequest, CalculateCurrentCartResponse, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, Color, ConvertedMoney, Coupon, CreateCartRequest, CreateCartResponse, CreateCurrentCartRequest, CreateCurrentCartResponse, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryInfo, DeliveryMethod, DeliverySummary, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Discount, DiscountBenefit, DiscountBenefitValueOneOf, DiscountScope, DiscountScopeWithLiterals, DiscountSource, DiscountSourceType, DiscountSourceTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, ExternalReference, FieldViolation, FileType, FileTypeWithLiterals, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCurrentCartRequest, GetCurrentCartResponse, GiftCard, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, ItemAttributes, ItemDeliveryConfig, ItemDiscount, ItemModifier, ItemPaymentConfig, ItemPriceBreakdown, ItemPricingInfo, ItemQuantityInfo, ItemSource, ItemStatus, ItemStatusWithLiterals, ItemTaxConfig, ItemType, ItemTypeItemType, ItemTypeItemTypeDataOneOf, ItemTypeItemTypeWithLiterals, LegacyFields, LineItem, LineItemSummary, LineItemTax, LineItemUpdate, MarkCartAsCompletedRequest, Membership, MessageEnvelope, ModifierGroup, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, Other, PaymentInfo, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentSummary, PhysicalProperties, PlaceOrderRequest, PlainTextValue, Policy, PriceDescription, PriceSummary, QuantityUpdate, RedirectUrls, RefreshCartRequest, RefreshCurrentCartRequest, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse, RemoveCouponRequest, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardRequest, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsRequest, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedMembership, SelectedMembershipUpdate, ServiceProperties, SetDeliveryMethodForCurrentCartRequest, SetDeliveryMethodForCurrentCartResponse, SetDeliveryMethodRequest, Severity, SeverityWithLiterals, StreetAddress, SubscriptionCharges, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionOptionInfo, SubscriptionSettings, SuggestedFix, SuggestedFixWithLiterals, SystemError, Target, TargetTargetTypeOneOf, Tax, TaxDetails, TaxInfo, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, Title, TranslatableString, UnmarkAsCurrentCartRequest, UnmarkAsCurrentCartResponse, UpdateCartRequest, UpdateCartResponse, UpdateCurrentCartRequest, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse, UpdateLineItemsRequest, V2AdditionalFee, V2LineItem, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
declare function createCart$1(httpClient: HttpClient): CreateCartSignature;
|
|
@@ -61,7 +61,7 @@ interface CalculateCartSignature {
|
|
|
61
61
|
* Note that discounts are already pre-computed and applied to the Cart.
|
|
62
62
|
* @param - ID of the Cart to calculate.
|
|
63
63
|
*/
|
|
64
|
-
(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>>;
|
|
64
|
+
(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>>;
|
|
65
65
|
}
|
|
66
66
|
/** @internal */
|
|
67
67
|
declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
|
|
@@ -139,6 +139,16 @@ interface RemoveCouponSignature {
|
|
|
139
139
|
(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>>;
|
|
140
140
|
}
|
|
141
141
|
/** @internal */
|
|
142
|
+
declare function setDeliveryMethod$1(httpClient: HttpClient): SetDeliveryMethodSignature;
|
|
143
|
+
interface SetDeliveryMethodSignature {
|
|
144
|
+
/**
|
|
145
|
+
* Sets the delivery method for the Cart.
|
|
146
|
+
* @param - Cart ID.
|
|
147
|
+
* @param - Delivery method.
|
|
148
|
+
*/
|
|
149
|
+
(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>>;
|
|
150
|
+
}
|
|
151
|
+
/** @internal */
|
|
142
152
|
declare function addGiftCard$1(httpClient: HttpClient): AddGiftCardSignature;
|
|
143
153
|
interface AddGiftCardSignature {
|
|
144
154
|
/**
|
|
@@ -212,6 +222,8 @@ declare const addCoupon: MaybeContext<BuildRESTFunction<typeof addCoupon$1> & ty
|
|
|
212
222
|
/** @internal */
|
|
213
223
|
declare const removeCoupon: MaybeContext<BuildRESTFunction<typeof removeCoupon$1> & typeof removeCoupon$1>;
|
|
214
224
|
/** @internal */
|
|
225
|
+
declare const setDeliveryMethod: MaybeContext<BuildRESTFunction<typeof setDeliveryMethod$1> & typeof setDeliveryMethod$1>;
|
|
226
|
+
/** @internal */
|
|
215
227
|
declare const addGiftCard: MaybeContext<BuildRESTFunction<typeof addGiftCard$1> & typeof addGiftCard$1>;
|
|
216
228
|
/** @internal */
|
|
217
229
|
declare const removeGiftCard: MaybeContext<BuildRESTFunction<typeof removeGiftCard$1> & typeof removeGiftCard$1>;
|
|
@@ -220,4 +232,4 @@ declare const markCartAsCompleted: MaybeContext<BuildRESTFunction<typeof markCar
|
|
|
220
232
|
/** @internal */
|
|
221
233
|
declare const handleAsyncCheckoutCompletion: MaybeContext<BuildRESTFunction<typeof handleAsyncCheckoutCompletion$1> & typeof handleAsyncCheckoutCompletion$1>;
|
|
222
234
|
|
|
223
|
-
export { AddCouponResponse, AddGiftCardResponse, AddLineItemsOptions, AddLineItemsResponse, CalculateCartOptions, CalculateCartResponse, Cart, CreateCartOptions, GetCheckoutURLResponse, GetCheckoutUrlOptions, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, PlaceOrderOptions, PlaceOrderResponse, RawHttpResponse, RefreshCartResponse, RemoveCouponResponse, RemoveGiftCardResponse, RemoveLineItemsResponse, UpdateCart, UpdateLineItemsOptions, UpdateLineItemsResponse, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, updateCart, updateLineItems };
|
|
235
|
+
export { AddCouponResponse, AddGiftCardResponse, AddLineItemsOptions, AddLineItemsResponse, CalculateCartOptions, CalculateCartResponse, Cart, CreateCartOptions, DeliveryMethodInput, GetCheckoutURLResponse, GetCheckoutUrlOptions, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, PlaceOrderOptions, PlaceOrderResponse, RawHttpResponse, RefreshCartResponse, RemoveCouponResponse, RemoveGiftCardResponse, RemoveLineItemsResponse, SetDeliveryMethodResponse, UpdateCart, UpdateLineItemsOptions, UpdateLineItemsResponse, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateLineItems };
|
|
@@ -54,6 +54,7 @@ __export(index_exports, {
|
|
|
54
54
|
removeCoupon: () => removeCoupon4,
|
|
55
55
|
removeGiftCard: () => removeGiftCard4,
|
|
56
56
|
removeLineItems: () => removeLineItems4,
|
|
57
|
+
setDeliveryMethod: () => setDeliveryMethod4,
|
|
57
58
|
updateCart: () => updateCart4,
|
|
58
59
|
updateLineItems: () => updateLineItems4
|
|
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)({
|
|
@@ -2046,6 +2145,14 @@ function removeCoupon3(httpClient) {
|
|
|
2046
2145
|
{ httpClient }
|
|
2047
2146
|
);
|
|
2048
2147
|
}
|
|
2148
|
+
function setDeliveryMethod3(httpClient) {
|
|
2149
|
+
return (cartId, deliveryMethod) => setDeliveryMethod2(
|
|
2150
|
+
cartId,
|
|
2151
|
+
deliveryMethod,
|
|
2152
|
+
// @ts-ignore
|
|
2153
|
+
{ httpClient }
|
|
2154
|
+
);
|
|
2155
|
+
}
|
|
2049
2156
|
function addGiftCard3(httpClient) {
|
|
2050
2157
|
return (cartId, giftCardCode) => addGiftCard2(
|
|
2051
2158
|
cartId,
|
|
@@ -2093,6 +2200,7 @@ var removeLineItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule
|
|
|
2093
2200
|
var updateLineItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateLineItems3);
|
|
2094
2201
|
var addCoupon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addCoupon3);
|
|
2095
2202
|
var removeCoupon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeCoupon3);
|
|
2203
|
+
var setDeliveryMethod4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setDeliveryMethod3);
|
|
2096
2204
|
var addGiftCard4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addGiftCard3);
|
|
2097
2205
|
var removeGiftCard4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeGiftCard3);
|
|
2098
2206
|
var markCartAsCompleted4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(markCartAsCompleted3);
|
|
@@ -2133,6 +2241,7 @@ var handleAsyncCheckoutCompletion4 = /* @__PURE__ */ (0, import_rest_modules3.cr
|
|
|
2133
2241
|
removeCoupon,
|
|
2134
2242
|
removeGiftCard,
|
|
2135
2243
|
removeLineItems,
|
|
2244
|
+
setDeliveryMethod,
|
|
2136
2245
|
updateCart,
|
|
2137
2246
|
updateLineItems
|
|
2138
2247
|
});
|