@wix/auto_sdk_ecom_cart 1.0.114 → 1.0.116
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 +1 -1
- package/build/cjs/index.js +7 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +40 -3
- package/build/cjs/index.typings.js +7 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +40 -3
- package/build/cjs/meta.js +7 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +6 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +40 -3
- package/build/es/index.typings.mjs +6 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +40 -3
- package/build/es/meta.mjs +6 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js +7 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +56 -4
- package/build/internal/cjs/index.typings.js +7 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +40 -3
- package/build/internal/cjs/meta.js +7 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs +6 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +56 -4
- package/build/internal/es/index.typings.mjs +6 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +40 -3
- package/build/internal/es/meta.mjs +6 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -2199,6 +2199,16 @@ interface V1DiscountRule {
|
|
|
2199
2199
|
name?: V1DiscountRuleName;
|
|
2200
2200
|
/** Discount value. */
|
|
2201
2201
|
amount?: MultiCurrencyPrice;
|
|
2202
|
+
/**
|
|
2203
|
+
* A list of item combinations for this discount rule.
|
|
2204
|
+
* Each entry represents a unique combination of line items that triggered
|
|
2205
|
+
* or received this discount, along with how many times that combination was applied together.
|
|
2206
|
+
* Relevant ONLY for BXGY and Quantity-based promotions.
|
|
2207
|
+
* In BXGY the combination will contain the "X" items with discount amount of 0.
|
|
2208
|
+
* @internal
|
|
2209
|
+
* @maxSize 1000
|
|
2210
|
+
*/
|
|
2211
|
+
itemCombinations?: ItemCombination[];
|
|
2202
2212
|
}
|
|
2203
2213
|
interface V1DiscountRuleName {
|
|
2204
2214
|
/**
|
|
@@ -2214,6 +2224,35 @@ interface V1DiscountRuleName {
|
|
|
2214
2224
|
*/
|
|
2215
2225
|
translated?: string | null;
|
|
2216
2226
|
}
|
|
2227
|
+
interface ItemCombination {
|
|
2228
|
+
/**
|
|
2229
|
+
* The number of times this exact combination of items (with the specified quantities) was applied together in the order.
|
|
2230
|
+
* @min 1
|
|
2231
|
+
* @max 100000
|
|
2232
|
+
*/
|
|
2233
|
+
count?: number;
|
|
2234
|
+
/**
|
|
2235
|
+
* Line items that participated together in this combination.
|
|
2236
|
+
* @minSize 1
|
|
2237
|
+
* @maxSize 100
|
|
2238
|
+
*/
|
|
2239
|
+
lineItems?: ItemCombinationLineItem[];
|
|
2240
|
+
}
|
|
2241
|
+
interface ItemCombinationLineItem {
|
|
2242
|
+
/**
|
|
2243
|
+
* The unique ID of the line item to which this discount applies.
|
|
2244
|
+
* @format GUID
|
|
2245
|
+
*/
|
|
2246
|
+
lineItemId?: string;
|
|
2247
|
+
/** Total discount amount for all units (quantity) of this line item in this combination. */
|
|
2248
|
+
discountAmount?: MultiCurrencyPrice;
|
|
2249
|
+
/**
|
|
2250
|
+
* Number of units from this line item that participated in a single combination.
|
|
2251
|
+
* @min 1
|
|
2252
|
+
* @max 100000
|
|
2253
|
+
*/
|
|
2254
|
+
quantity?: number;
|
|
2255
|
+
}
|
|
2217
2256
|
interface LineItemDiscount {
|
|
2218
2257
|
/**
|
|
2219
2258
|
* ID of line item the discount applies to.
|
|
@@ -2409,19 +2448,32 @@ interface MembershipName {
|
|
|
2409
2448
|
}
|
|
2410
2449
|
interface MembershipPaymentCredits {
|
|
2411
2450
|
/**
|
|
2412
|
-
* Membership's
|
|
2451
|
+
* Membership's initial value.
|
|
2413
2452
|
* @min 1
|
|
2414
2453
|
*/
|
|
2415
2454
|
total?: number;
|
|
2416
|
-
/** Membership's remaining
|
|
2455
|
+
/** Membership's remaining value. */
|
|
2417
2456
|
remaining?: number;
|
|
2418
2457
|
/**
|
|
2419
|
-
* The amount
|
|
2458
|
+
* The amount to be deducted from the `remaining` balance.
|
|
2420
2459
|
* @internal
|
|
2421
2460
|
* @min 1
|
|
2422
2461
|
*/
|
|
2423
2462
|
redemptionCost?: number;
|
|
2463
|
+
/**
|
|
2464
|
+
* Membership's balance type.
|
|
2465
|
+
* @internal
|
|
2466
|
+
*/
|
|
2467
|
+
balanceType?: BalanceTypeWithLiterals;
|
|
2468
|
+
}
|
|
2469
|
+
declare enum BalanceType {
|
|
2470
|
+
/** Balance is measured in discrete uses (e.g., sessions, visits). */
|
|
2471
|
+
PUNCH_CARD = "PUNCH_CARD",
|
|
2472
|
+
/** Balance is measured in a currency-like value (e.g., points). */
|
|
2473
|
+
CREDIT = "CREDIT"
|
|
2424
2474
|
}
|
|
2475
|
+
/** @enumType */
|
|
2476
|
+
type BalanceTypeWithLiterals = BalanceType | 'PUNCH_CARD' | 'CREDIT';
|
|
2425
2477
|
interface InvalidMembership {
|
|
2426
2478
|
/** Membership details. */
|
|
2427
2479
|
membership?: Membership;
|
|
@@ -3645,4 +3697,4 @@ declare function deleteCart(_id: string): Promise<void>;
|
|
|
3645
3697
|
*/
|
|
3646
3698
|
declare function removeBusinessLocation(_id: string): Promise<NonNullablePaths<RemoveBusinessLocationResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency`, 7>>;
|
|
3647
3699
|
|
|
3648
|
-
export { type ActionEvent, type AddToCartApplicationErrors, type AddToCartOptions, type AddToCartRequest, type AddToCartResponse, type AddToCurrentCartAndEstimateTotalsRequest, type AddToCurrentCartRequest, type AdditionalFee, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type Address, type AddressLocation, type AddressWithContact, type AggregatedTaxBreakdown, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, type AppliedDiscountDiscountTypeWithLiterals, type AutoTaxFallbackCalculationDetails, type BaseEventMetadata, type BuyerInfo, type BuyerInfoIdOneOf, type CalculatedItemModifier, type CalculatedLineItem, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, type CartCreatedEnvelope, type CartDeletedEnvelope, type CartDiscount, type CartDiscountDiscountSourceOneOf, type CartUpdatedEnvelope, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, ChargeType, type ChargeTypeWithLiterals, type Color, type Coupon, type CreateCartApplicationErrors, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCheckoutApplicationErrors, type CreateCheckoutFromCurrentCartRequest, type CreateCheckoutOptions, type CreateCheckoutRequest, type CreateCheckoutResponse, type CustomLineItem, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeliveryAllocation, type DeliveryLogistics, type DeliveryTimeSlot, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EstimateCurrentCartTotalsRequest, type EstimateTotalsOptions, type EstimateTotalsRequest, type EstimateTotalsResponse, type EventMetadata, type ExtendedFields, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FocalPoint, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartByCheckoutIdRequest, type GetCartByCheckoutIdResponse, type GetCartRequest, type GetCartResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type Group, type HostSelectedMembership, type IdentificationData, type IdentificationDataIdOneOf, type InvalidMembership, type ItemAvailabilityInfo, ItemAvailabilityStatus, type ItemAvailabilityStatusWithLiterals, type ItemModifier, type ItemTaxFullDetails, type ItemType, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItem, type LineItemDiscount, type LineItemPricesData, type LineItemQuantityUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MerchantDiscountInput, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type OtherCharge, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PhysicalProperties, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type PlatformFee, type Policy, type PriceDescription, type PriceSummary, type ProductName, RateType, type RateTypeWithLiterals, type Region, type RemoveBusinessLocationRequest, type RemoveBusinessLocationResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMemberships, type SelectedShippingOption, type ServiceProperties, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, type StreetAddress, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetLineItem, type TargetTargetTypeOneOf, type TaxBreakdown, type TaxCalculationDetails, type TaxCalculationDetailsCalculationDetailsOneOf, type TaxRateBreakdown, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UpdateCartApplicationErrors, type UpdateCartOptions, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartLineItemQuantityRequest, type UpdateLineItemsQuantityRequest, type UpdateLineItemsQuantityResponse, V1ChargeType, type V1ChargeTypeWithLiterals, type V1Coupon, type V1DiscountRule, type V1DiscountRuleName, type V1ItemModifier, type V1MerchantDiscount, type V1ModifierGroup, type ValidationError, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addToCart, createCart, createCheckout, deleteCart, estimateTotals, getCart, getCartByCheckoutId, onCartCreated, onCartDeleted, onCartUpdated, removeBusinessLocation, removeCoupon, removeLineItems, updateCart, updateLineItemsQuantity };
|
|
3700
|
+
export { type ActionEvent, type AddToCartApplicationErrors, type AddToCartOptions, type AddToCartRequest, type AddToCartResponse, type AddToCurrentCartAndEstimateTotalsRequest, type AddToCurrentCartRequest, type AdditionalFee, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type Address, type AddressLocation, type AddressWithContact, type AggregatedTaxBreakdown, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, type AppliedDiscountDiscountTypeWithLiterals, type AutoTaxFallbackCalculationDetails, BalanceType, type BalanceTypeWithLiterals, type BaseEventMetadata, type BuyerInfo, type BuyerInfoIdOneOf, type CalculatedItemModifier, type CalculatedLineItem, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, type CartCreatedEnvelope, type CartDeletedEnvelope, type CartDiscount, type CartDiscountDiscountSourceOneOf, type CartUpdatedEnvelope, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, ChargeType, type ChargeTypeWithLiterals, type Color, type Coupon, type CreateCartApplicationErrors, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCheckoutApplicationErrors, type CreateCheckoutFromCurrentCartRequest, type CreateCheckoutOptions, type CreateCheckoutRequest, type CreateCheckoutResponse, type CustomLineItem, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeliveryAllocation, type DeliveryLogistics, type DeliveryTimeSlot, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EstimateCurrentCartTotalsRequest, type EstimateTotalsOptions, type EstimateTotalsRequest, type EstimateTotalsResponse, type EventMetadata, type ExtendedFields, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FocalPoint, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartByCheckoutIdRequest, type GetCartByCheckoutIdResponse, type GetCartRequest, type GetCartResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type Group, type HostSelectedMembership, type IdentificationData, type IdentificationDataIdOneOf, type InvalidMembership, type ItemAvailabilityInfo, ItemAvailabilityStatus, type ItemAvailabilityStatusWithLiterals, type ItemCombination, type ItemCombinationLineItem, type ItemModifier, type ItemTaxFullDetails, type ItemType, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItem, type LineItemDiscount, type LineItemPricesData, type LineItemQuantityUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MerchantDiscountInput, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type OtherCharge, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PhysicalProperties, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type PlatformFee, type Policy, type PriceDescription, type PriceSummary, type ProductName, RateType, type RateTypeWithLiterals, type Region, type RemoveBusinessLocationRequest, type RemoveBusinessLocationResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMemberships, type SelectedShippingOption, type ServiceProperties, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, type StreetAddress, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetLineItem, type TargetTargetTypeOneOf, type TaxBreakdown, type TaxCalculationDetails, type TaxCalculationDetailsCalculationDetailsOneOf, type TaxRateBreakdown, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UpdateCartApplicationErrors, type UpdateCartOptions, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartLineItemQuantityRequest, type UpdateLineItemsQuantityRequest, type UpdateLineItemsQuantityResponse, V1ChargeType, type V1ChargeTypeWithLiterals, type V1Coupon, type V1DiscountRule, type V1DiscountRuleName, type V1ItemModifier, type V1MerchantDiscount, type V1ModifierGroup, type ValidationError, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addToCart, createCart, createCheckout, deleteCart, estimateTotals, getCart, getCartByCheckoutId, onCartCreated, onCartDeleted, onCartUpdated, removeBusinessLocation, removeCoupon, removeLineItems, updateCart, updateLineItemsQuantity };
|
|
@@ -981,6 +981,11 @@ var RuleType = /* @__PURE__ */ ((RuleType2) => {
|
|
|
981
981
|
RuleType2["REQUIRED_ONE_OF_FIELD"] = "REQUIRED_ONE_OF_FIELD";
|
|
982
982
|
return RuleType2;
|
|
983
983
|
})(RuleType || {});
|
|
984
|
+
var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
|
|
985
|
+
BalanceType2["PUNCH_CARD"] = "PUNCH_CARD";
|
|
986
|
+
BalanceType2["CREDIT"] = "CREDIT";
|
|
987
|
+
return BalanceType2;
|
|
988
|
+
})(BalanceType || {});
|
|
984
989
|
var AdditionalFeeSource = /* @__PURE__ */ ((AdditionalFeeSource2) => {
|
|
985
990
|
AdditionalFeeSource2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
|
|
986
991
|
AdditionalFeeSource2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
|
|
@@ -1658,6 +1663,7 @@ async function removeBusinessLocation2(_id) {
|
|
|
1658
1663
|
export {
|
|
1659
1664
|
AdditionalFeeSource,
|
|
1660
1665
|
AppliedDiscountDiscountType,
|
|
1666
|
+
BalanceType,
|
|
1661
1667
|
ChannelType,
|
|
1662
1668
|
ChargeType,
|
|
1663
1669
|
DescriptionLineType,
|