@wix/auto_sdk_ecom_current-cart-v-2 1.0.3 → 1.0.5

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +51 -11
  2. package/build/cjs/index.js +3 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +3 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +50 -10
  8. package/build/cjs/meta.js +3 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +51 -11
  11. package/build/es/index.mjs +3 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +3 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +50 -10
  17. package/build/es/meta.mjs +3 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +2 -2
  20. package/build/internal/cjs/index.js +3 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +52 -12
  23. package/build/internal/cjs/index.typings.js +3 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +50 -10
  26. package/build/internal/cjs/meta.js +3 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +2 -2
  29. package/build/internal/es/index.mjs +3 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +52 -12
  32. package/build/internal/es/index.typings.mjs +3 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +50 -10
  35. package/build/internal/es/meta.mjs +3 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -722,7 +722,7 @@ interface ItemPaymentConfig {
722
722
  * Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.
723
723
  * This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`.
724
724
  */
725
- selectedMembership?: V2SelectedMembership;
725
+ selectedMembership?: SelectedMembership;
726
726
  /**
727
727
  * Type of selected payment option for current item.
728
728
  *
@@ -730,7 +730,7 @@ interface ItemPaymentConfig {
730
730
  */
731
731
  paymentOption?: PaymentOptionTypeWithLiterals;
732
732
  }
733
- interface V2SelectedMembership {
733
+ interface SelectedMembership {
734
734
  /**
735
735
  * Membership ID.
736
736
  * @minLength 1
@@ -1569,6 +1569,9 @@ interface V2AdditionalFee {
1569
1569
  interface TaxSummary {
1570
1570
  /**
1571
1571
  * List of taxes applied to the cart.
1572
+ * May contain multiple entries when advanced tax rates are configured by the merchant,
1573
+ * or a single entry representing the total tax amount.
1574
+ * For more details on advanced tax rates, read [this article](https://support.wix.com/en/article/setting-up-tax-calculation-using-the-manual-method#step-3-optional-customize-advanced-mode-settings).
1572
1575
  * @maxSize 100
1573
1576
  */
1574
1577
  taxes?: Tax[];
@@ -1599,7 +1602,7 @@ interface Tax {
1599
1602
  * Tax rate %, as a decimal point between 0 and 1.
1600
1603
  * @decimalValue options { gte:0, lte:1, maxScale:6 }
1601
1604
  */
1602
- rate?: string;
1605
+ rate?: string | null;
1603
1606
  /** Calculated tax, based on `taxable_amount` and `rate`. */
1604
1607
  totalTax?: MultiCurrencyPrice;
1605
1608
  }
@@ -1625,7 +1628,7 @@ interface AdditionalFeeTax {
1625
1628
  interface PriceSummary {
1626
1629
  /**
1627
1630
  * Total price of all line items after applying item-level discounts.
1628
- * Before tax TODO: Change it to include tax if the 'prices_include_tax' flag is true.
1631
+ * Includes tax if `tax_summary.prices_include_tax` is true.
1629
1632
  */
1630
1633
  subtotal?: MultiCurrencyPrice;
1631
1634
  /**
@@ -1636,12 +1639,12 @@ interface PriceSummary {
1636
1639
  discount?: MultiCurrencyPrice;
1637
1640
  /**
1638
1641
  * Final delivery cost for the cart.
1639
- * Before tax TODO: Change it to include tax if the 'prices_include_tax' flag is true.
1642
+ * Includes tax if `tax_summary.prices_include_tax` is true.
1640
1643
  */
1641
1644
  delivery?: MultiCurrencyPrice;
1642
1645
  /**
1643
1646
  * Total additional fees associated with the cart.
1644
- * Before tax TODO: Change it to include tax if the 'prices_include_tax' flag is true.
1647
+ * Includes tax if `tax_summary.prices_include_tax` is true.
1645
1648
  */
1646
1649
  additionalFees?: MultiCurrencyPrice;
1647
1650
  /** Total tax amount calculated across all applicable components (items, discounts, delivery, and fees). */
@@ -1660,7 +1663,12 @@ interface PaymentSummary {
1660
1663
  * A list of valid memberships that will be charged as part of the order.
1661
1664
  * @maxSize 300
1662
1665
  */
1663
- memberships?: SelectedMembership[];
1666
+ memberships?: Membership[];
1667
+ /**
1668
+ * Charges information for each subscription in the checkout.
1669
+ * @maxSize 100
1670
+ */
1671
+ subscriptionCharges?: SubscriptionCharges[];
1664
1672
  /** Indicates whether a remaining payment is required to create the order, after applying gift cards. */
1665
1673
  requiresPaymentAfterGiftCard?: boolean;
1666
1674
  /** The total amount due after applying all gift cards. */
@@ -1681,7 +1689,7 @@ interface GiftCardSummary {
1681
1689
  /** The amount to be reduced from the gift card's balance. */
1682
1690
  redeemAmount?: MultiCurrencyPrice;
1683
1691
  }
1684
- interface SelectedMembership {
1692
+ interface Membership {
1685
1693
  /**
1686
1694
  * Membership ID.
1687
1695
  * @minLength 1
@@ -1701,6 +1709,38 @@ interface SelectedMembership {
1701
1709
  * @maxLength 100
1702
1710
  */
1703
1711
  lineItemIds?: string[];
1712
+ /** The name of this membership. */
1713
+ name?: TranslatableString;
1714
+ }
1715
+ interface SubscriptionCharges {
1716
+ /**
1717
+ * ids of the items the subscription is defined on
1718
+ * @format GUID
1719
+ * @minSize 1
1720
+ * @maxSize 300
1721
+ */
1722
+ lineItemIds?: string[];
1723
+ /**
1724
+ * Generated description explaining future charges amount and schedule.
1725
+ * Translated to subscription order buyer language, or to site language if was not provided.
1726
+ * @maxLength 1000
1727
+ */
1728
+ description?: string | null;
1729
+ /**
1730
+ * Charges for subscription.
1731
+ * @maxSize 50
1732
+ */
1733
+ charges?: Charge[];
1734
+ }
1735
+ interface Charge {
1736
+ /** The cycle number from which the charge starts. */
1737
+ cycleFrom?: number;
1738
+ /** The number of cycles for which the charge is applicable. */
1739
+ cycleCount?: number | null;
1740
+ /** Charge summary. */
1741
+ priceSummary?: PriceSummary;
1742
+ /** The billing date from which the charge starts. */
1743
+ cycleBillingDate?: Date | null;
1704
1744
  }
1705
1745
  interface CalculationError {
1706
1746
  /** The calculation component that caused the error. */
@@ -1940,7 +1980,7 @@ interface CatalogItemInput {
1940
1980
  */
1941
1981
  quantity?: number;
1942
1982
  /** Selected membership to be used as payment for this item. */
1943
- selectedMembership?: V2SelectedMembership;
1983
+ selectedMembership?: SelectedMembership;
1944
1984
  /**
1945
1985
  * Overriding values for catalog item properties.
1946
1986
  * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
@@ -2238,7 +2278,7 @@ interface SelectedMembershipUpdate {
2238
2278
  *
2239
2279
  * To just remove current selected membership, and not replace with a new one, pass an empty value here.
2240
2280
  */
2241
- newMembership?: V2SelectedMembership;
2281
+ newMembership?: SelectedMembership;
2242
2282
  }
2243
2283
  interface UpdateLineItemsInCurrentCartResponse {
2244
2284
  /** Updated Cart. */
@@ -2839,4 +2879,4 @@ interface UpdateLineItemsInCurrentCartOptions {
2839
2879
  lineItems?: LineItemUpdate[];
2840
2880
  }
2841
2881
 
2842
- export { type ActionEvent, type AddDiscountRequest, type AddDiscountResponse, type AddDiscountToCurrentCartRequest, type AddDiscountToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, CalculationComponent, type CalculationComponentWithLiterals, type CalculationConfig, type CalculationError, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Color, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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, DiscountStatus, type DiscountStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ErrorCode, type ErrorCodeWithLiterals, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, 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 LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, 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 RemoveDiscountFromCurrentCartRequest, type RemoveDiscountFromCurrentCartResponse, type RemoveDiscountRequest, type RemoveDiscountResponse, 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, 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type V2SelectedMembership, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals };
2882
+ export { type ActionEvent, type AddDiscountRequest, type AddDiscountResponse, type AddDiscountToCurrentCartRequest, type AddDiscountToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, CalculationComponent, type CalculationComponentWithLiterals, type CalculationConfig, type CalculationError, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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, DiscountStatus, type DiscountStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ErrorCode, type ErrorCodeWithLiterals, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, 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 LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, 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 RemoveDiscountFromCurrentCartRequest, type RemoveDiscountFromCurrentCartResponse, type RemoveDiscountRequest, type RemoveDiscountResponse, 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, 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 };
@@ -483,6 +483,9 @@ function calculateCurrentCart(payload) {
483
483
  },
484
484
  {
485
485
  path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
486
+ },
487
+ {
488
+ path: "summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate"
486
489
  }
487
490
  ]
488
491
  },