@behio/storefront-sdk 2.26.0 → 2.27.0

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.
@@ -1181,6 +1181,16 @@ var CartModule = class {
1181
1181
  this.client.emit("cart:updated", res.data);
1182
1182
  return res;
1183
1183
  }
1184
+ /** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
1185
+ async addItems(input) {
1186
+ const res = await this.client.request("POST", "/cart/items/batch", {
1187
+ body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity })) }
1188
+ });
1189
+ if (res.error) return res;
1190
+ if (res.data.newSessionToken) this.client.setCartSession(res.data.newSessionToken);
1191
+ this.client.emit("cart:updated", res.data);
1192
+ return res;
1193
+ }
1184
1194
  /**
1185
1195
  * Switch the CART currency server-side. The backend re-prices every line in
1186
1196
  * the new currency (no FX conversion: a product must have a price configured
@@ -1181,6 +1181,16 @@ var CartModule = class {
1181
1181
  this.client.emit("cart:updated", res.data);
1182
1182
  return res;
1183
1183
  }
1184
+ /** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
1185
+ async addItems(input) {
1186
+ const res = await this.client.request("POST", "/cart/items/batch", {
1187
+ body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity })) }
1188
+ });
1189
+ if (res.error) return res;
1190
+ if (res.data.newSessionToken) this.client.setCartSession(res.data.newSessionToken);
1191
+ this.client.emit("cart:updated", res.data);
1192
+ return res;
1193
+ }
1184
1194
  /**
1185
1195
  * Switch the CART currency server-side. The backend re-prices every line in
1186
1196
  * the new currency (no FX conversion: a product must have a price configured
@@ -1556,6 +1556,10 @@ interface GiftCardSummary {
1556
1556
  balance: number;
1557
1557
  currency: string;
1558
1558
  }
1559
+ /** Atomic multi-product purchase; every product is validated before any line changes. */
1560
+ interface AddToCartItemsInput {
1561
+ items: AddToCartInput[];
1562
+ }
1559
1563
  interface AddToCartInput {
1560
1564
  /**
1561
1565
  * Eshop product ID of the sellable unit. A variant is its own eshop product,
@@ -3973,6 +3977,10 @@ declare class CartModule {
3973
3977
  addItem(input: AddToCartInput): Promise<SdkResult<Cart & {
3974
3978
  newSessionToken?: string;
3975
3979
  }>>;
3980
+ /** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
3981
+ addItems(input: AddToCartItemsInput): Promise<SdkResult<Cart & {
3982
+ newSessionToken?: string;
3983
+ }>>;
3976
3984
  /**
3977
3985
  * Switch the CART currency server-side. The backend re-prices every line in
3978
3986
  * the new currency (no FX conversion: a product must have a price configured
@@ -4620,4 +4628,4 @@ declare function clearCartSummary(): void;
4620
4628
  /** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
4621
4629
  declare function publishCartSummary(summary: CartSummaryEvent): void;
4622
4630
 
4623
- export { type CartSummaryEvent as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type BookingCreateInput as D, type BookingCreated as E, type BookingLocale as F, type BookingLocation as G, type BookingManageSlotsQuery as H, type BookingService as I, type BookingSlot as J, type BookingSlots as K, type BookingSlotsQuery as L, type BookingStaff as M, type BookingStatus as N, type Bundle as O, type ProductDetail as P, type BundleCatalogQuery as Q, type BundleItem as R, type SdkResult as S, type Cart as T, type CartBundleLine as U, type CartBundleLineItem as V, type CartDiscount as W, type CartItem as X, type CartItemProduct as Y, type CartLinkClaimed as Z, type CartPromotion as _, type ProductVariant as a, type MenuItem as a$, type Category as a0, type CategoryDetail as a1, type CertificateVerification as a2, type CheckoutAddress as a3, type CheckoutInput as a4, type CheckoutPaymentMethod as a5, type CheckoutPreview as a6, type CheckoutResult as a7, type CheckoutSettings as a8, type CookieConsentInput as a9, type FacetLabel as aA, type FacetPriceRange as aB, type FacetRange as aC, type FacetRatingBucket as aD, type FacetValue as aE, type FacetsResponse as aF, type FilterField as aG, type FulfillmentStatus as aH, FulfillmentStatuses as aI, type GamificationRefreshResult as aJ, type GiftCardBalance as aK, type GiftCardPurchaseInput as aL, type GiftCardPurchaseResult as aM, type GiftCardSummary as aN, type LessonNote as aO, type LessonQuiz as aP, type LoginInput as aQ, type LoyaltyBalance as aR, type LoyaltyNextTier as aS, type LoyaltyProgram as aT, type LoyaltyQuery as aU, type LoyaltyReferralResult as aV, type LoyaltySummary as aW, type LoyaltyTier as aX, type LoyaltyTierPerks as aY, type LoyaltyTransaction as aZ, type Menu as a_, type CourseAttachment as aa, type CourseCertificate as ab, type CourseComment as ac, type CourseCommentReply as ad, type CourseCommentsList as ae, type CourseDetail as af, type CourseLesson as ag, type CourseListItem as ah, type CourseModule as ai, type CoursePostedComment as aj, type CourseProgress as ak, type CourseTutorMessage as al, type CourseTutorThread as am, type CrossSellItem as an, type CurrencyDisplayFormat as ao, type CustomerAddress as ap, type CustomerBadge as aq, type CustomerChallenge as ar, type CustomerGamification as as, type CustomerGamificationQuery as at, type CustomerProfile as au, type DigitalDownload as av, type DownloadUrl as aw, type Facet as ax, type FacetAvailability as ay, type FacetCategory as az, type StorefrontFormFieldError as b, type RequestInterceptorConfig as b$, type MenuItemRef as b0, type MenuItemType as b1, type MessageResponse as b2, type NewsletterOptInDefault as b3, type NewsletterSubscribeInput as b4, type NewsletterSubscribeResult as b5, type NewsletterUnsubscribeResult as b6, type OrderAccessRequestResponse as b7, type OrderAccessVerifyResponse as b8, type OrderDetail as b9, type ProductAvailability as bA, type ProductGroup as bB, type ProductLabel as bC, type ProductListItem as bD, type ProductMedia as bE, type ProductMediaVariant as bF, type ProductParameter as bG, type ProductParameterGroup as bH, type ProductParametersResponse as bI, type ProductPrice as bJ, type ProductPromotionSummary as bK, type ProductReview as bL, type ProductReviewsResponse as bM, type ProductSibling as bN, ProductSort as bO, type ProductSortValue as bP, type ProductVolumePrice as bQ, type ProductsQuery as bR, type QuizAnswerInput as bS, type QuizAnswerResult as bT, type QuizQuestion as bU, type QuizResult as bV, type QuoteItem as bW, type QuoteRequest as bX, type RegisterInput as bY, type RegisterResult as bZ, type RequestInterceptor as b_, type OrderDiscount as ba, type OrderDocument as bb, type OrderItem as bc, type OrderListItem as bd, type OrderPaymentInstructions as be, type OrderPickupPoint as bf, type OrderShipment as bg, type OrderStatus as bh, type OrderStatusHistory as bi, OrderStatuses as bj, type OrderTracking as bk, type Page as bl, type PageAttachment as bm, type PageDetail as bn, type PaginatedResponse as bo, type PaymentInstrument as bp, type PaymentStatus as bq, PaymentStatuses as br, type PaymentSwift as bs, type PickupPoint as bt, type PickupPointHours as bu, type PickupPointsInput as bv, type PickupWidgetConfig as bw, type PriceDisplay as bx, type ProductAssetGroup as by, type ProductAssetItem as bz, type AddToCartInput as c, clearCartSummary as c$, type ResponseInterceptor as c0, type ResponseInterceptorData as c1, type ReturnRequest as c2, type ReturnRequestItem as c3, type ReturnStatus as c4, type ReturnStatusItem as c5, type ReturnableOrder as c6, type ReturnableOrderItem as c7, type SdkError as c8, type ShippingMethodSummary as c9, type StorefrontFaqGroups as cA, type StorefrontFaqItem as cB, type StorefrontFaqQuery as cC, type StorefrontForm as cD, type StorefrontFormFieldErrorCode as cE, type StorefrontFormFile as cF, type StorefrontFormSettings as cG, type StorefrontFormSubmitInput as cH, type StorefrontFormSubmitResult as cI, type StorefrontFormUpload as cJ, type SubmitQuoteInput as cK, type SubmitReturnInput as cL, type SubmitReviewInput as cM, type SubmitWithdrawalInput as cN, type Subscription as cO, type SubscriptionAction as cP, type SubscriptionFrequency as cQ, type SubscriptionItem as cR, type SubscriptionStatus as cS, type TaxBreakdownLine as cT, type VariantAxis as cU, type VariantAxisValue as cV, type WishlistItem as cW, type WithdrawalAcknowledgement as cX, type WithdrawalFlag as cY, type WithdrawalSettings as cZ, type WithdrawalWindow as c_, type ShippingPublicConfig as ca, type ShippingQuote as cb, type ShippingQuoteInput as cc, type ShopAppearance as cd, type ShopCommerce as ce, type ShopInfo as cf, type ShopScript as cg, type ShopScriptPlacement as ch, type ShopScriptType as ci, type ShopScripts as cj, type ShopSeo as ck, type ShopSeoIdentity as cl, type SiteFormField as cm, type SiteFormFieldOption as cn, type SiteFormFieldType as co, type Sitemap as cp, type SitemapEntry as cq, type StockBehavior as cr, type StockMode as cs, type StorefrontCollection as ct, type StorefrontCollectionField as cu, type StorefrontCollectionFieldType as cv, type StorefrontCollectionItem as cw, type StorefrontCollectionQuery as cx, type StorefrontFaqGroup as cy, type StorefrontFaqGroupSummary as cz, type AddressDetail as d, err as d0, ok as d1, publishCartSummary as d2, toSdkError as d3, type AddressSuggestion as e, type AddressType as f, AddressTypes as g, type AuthTokens as h, type BackInStockSubscription as i, type BadgeTone as j, BehioApiError as k, type BehioErrorCode as l, type BehioEventHandler as m, type BehioEventType as n, BehioNetworkError as o, type BehioStorefrontConfig as p, type Blog as q, type BlogPostDetail as r, type BlogPostListItem as s, type BlogPostsPage as t, type BlogPostsQuery as u, type BlogSettings as v, type BlogTag as w, type Booking as x, type BookingCategory as y, type BookingConfig as z };
4631
+ export { type CartPromotion as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type BookingConfig as D, type BookingCreateInput as E, type BookingCreated as F, type BookingLocale as G, type BookingLocation as H, type BookingManageSlotsQuery as I, type BookingService as J, type BookingSlot as K, type BookingSlots as L, type BookingSlotsQuery as M, type BookingStaff as N, type BookingStatus as O, type ProductDetail as P, type Bundle as Q, type BundleCatalogQuery as R, type SdkResult as S, type BundleItem as T, type Cart as U, type CartBundleLine as V, type CartBundleLineItem as W, type CartDiscount as X, type CartItem as Y, type CartItemProduct as Z, type CartLinkClaimed as _, type ProductVariant as a, type Menu as a$, type CartSummaryEvent as a0, type Category as a1, type CategoryDetail as a2, type CertificateVerification as a3, type CheckoutAddress as a4, type CheckoutInput as a5, type CheckoutPaymentMethod as a6, type CheckoutPreview as a7, type CheckoutResult as a8, type CheckoutSettings as a9, type FacetCategory as aA, type FacetLabel as aB, type FacetPriceRange as aC, type FacetRange as aD, type FacetRatingBucket as aE, type FacetValue as aF, type FacetsResponse as aG, type FilterField as aH, type FulfillmentStatus as aI, FulfillmentStatuses as aJ, type GamificationRefreshResult as aK, type GiftCardBalance as aL, type GiftCardPurchaseInput as aM, type GiftCardPurchaseResult as aN, type GiftCardSummary as aO, type LessonNote as aP, type LessonQuiz as aQ, type LoginInput as aR, type LoyaltyBalance as aS, type LoyaltyNextTier as aT, type LoyaltyProgram as aU, type LoyaltyQuery as aV, type LoyaltyReferralResult as aW, type LoyaltySummary as aX, type LoyaltyTier as aY, type LoyaltyTierPerks as aZ, type LoyaltyTransaction as a_, type CookieConsentInput as aa, type CourseAttachment as ab, type CourseCertificate as ac, type CourseComment as ad, type CourseCommentReply as ae, type CourseCommentsList as af, type CourseDetail as ag, type CourseLesson as ah, type CourseListItem as ai, type CourseModule as aj, type CoursePostedComment as ak, type CourseProgress as al, type CourseTutorMessage as am, type CourseTutorThread as an, type CrossSellItem as ao, type CurrencyDisplayFormat as ap, type CustomerAddress as aq, type CustomerBadge as ar, type CustomerChallenge as as, type CustomerGamification as at, type CustomerGamificationQuery as au, type CustomerProfile as av, type DigitalDownload as aw, type DownloadUrl as ax, type Facet as ay, type FacetAvailability as az, type StorefrontFormFieldError as b, type RequestInterceptor as b$, type MenuItem as b0, type MenuItemRef as b1, type MenuItemType as b2, type MessageResponse as b3, type NewsletterOptInDefault as b4, type NewsletterSubscribeInput as b5, type NewsletterSubscribeResult as b6, type NewsletterUnsubscribeResult as b7, type OrderAccessRequestResponse as b8, type OrderAccessVerifyResponse as b9, type ProductAssetItem as bA, type ProductAvailability as bB, type ProductGroup as bC, type ProductLabel as bD, type ProductListItem as bE, type ProductMedia as bF, type ProductMediaVariant as bG, type ProductParameter as bH, type ProductParameterGroup as bI, type ProductParametersResponse as bJ, type ProductPrice as bK, type ProductPromotionSummary as bL, type ProductReview as bM, type ProductReviewsResponse as bN, type ProductSibling as bO, ProductSort as bP, type ProductSortValue as bQ, type ProductVolumePrice as bR, type ProductsQuery as bS, type QuizAnswerInput as bT, type QuizAnswerResult as bU, type QuizQuestion as bV, type QuizResult as bW, type QuoteItem as bX, type QuoteRequest as bY, type RegisterInput as bZ, type RegisterResult as b_, type OrderDetail as ba, type OrderDiscount as bb, type OrderDocument as bc, type OrderItem as bd, type OrderListItem as be, type OrderPaymentInstructions as bf, type OrderPickupPoint as bg, type OrderShipment as bh, type OrderStatus as bi, type OrderStatusHistory as bj, OrderStatuses as bk, type OrderTracking as bl, type Page as bm, type PageAttachment as bn, type PageDetail as bo, type PaginatedResponse as bp, type PaymentInstrument as bq, type PaymentStatus as br, PaymentStatuses as bs, type PaymentSwift as bt, type PickupPoint as bu, type PickupPointHours as bv, type PickupPointsInput as bw, type PickupWidgetConfig as bx, type PriceDisplay as by, type ProductAssetGroup as bz, type AddToCartInput as c, type WithdrawalWindow as c$, type RequestInterceptorConfig as c0, type ResponseInterceptor as c1, type ResponseInterceptorData as c2, type ReturnRequest as c3, type ReturnRequestItem as c4, type ReturnStatus as c5, type ReturnStatusItem as c6, type ReturnableOrder as c7, type ReturnableOrderItem as c8, type SdkError as c9, type StorefrontFaqGroupSummary as cA, type StorefrontFaqGroups as cB, type StorefrontFaqItem as cC, type StorefrontFaqQuery as cD, type StorefrontForm as cE, type StorefrontFormFieldErrorCode as cF, type StorefrontFormFile as cG, type StorefrontFormSettings as cH, type StorefrontFormSubmitInput as cI, type StorefrontFormSubmitResult as cJ, type StorefrontFormUpload as cK, type SubmitQuoteInput as cL, type SubmitReturnInput as cM, type SubmitReviewInput as cN, type SubmitWithdrawalInput as cO, type Subscription as cP, type SubscriptionAction as cQ, type SubscriptionFrequency as cR, type SubscriptionItem as cS, type SubscriptionStatus as cT, type TaxBreakdownLine as cU, type VariantAxis as cV, type VariantAxisValue as cW, type WishlistItem as cX, type WithdrawalAcknowledgement as cY, type WithdrawalFlag as cZ, type WithdrawalSettings as c_, type ShippingMethodSummary as ca, type ShippingPublicConfig as cb, type ShippingQuote as cc, type ShippingQuoteInput as cd, type ShopAppearance as ce, type ShopCommerce as cf, type ShopInfo as cg, type ShopScript as ch, type ShopScriptPlacement as ci, type ShopScriptType as cj, type ShopScripts as ck, type ShopSeo as cl, type ShopSeoIdentity as cm, type SiteFormField as cn, type SiteFormFieldOption as co, type SiteFormFieldType as cp, type Sitemap as cq, type SitemapEntry as cr, type StockBehavior as cs, type StockMode as ct, type StorefrontCollection as cu, type StorefrontCollectionField as cv, type StorefrontCollectionFieldType as cw, type StorefrontCollectionItem as cx, type StorefrontCollectionQuery as cy, type StorefrontFaqGroup as cz, type AddToCartItemsInput as d, clearCartSummary as d0, err as d1, ok as d2, publishCartSummary as d3, toSdkError as d4, type AddressDetail as e, type AddressSuggestion as f, type AddressType as g, AddressTypes as h, type AuthTokens as i, type BackInStockSubscription as j, type BadgeTone as k, BehioApiError as l, type BehioErrorCode as m, type BehioEventHandler as n, type BehioEventType as o, BehioNetworkError as p, type BehioStorefrontConfig as q, type Blog as r, type BlogPostDetail as s, type BlogPostListItem as t, type BlogPostsPage as u, type BlogPostsQuery as v, type BlogSettings as w, type BlogTag as x, type Booking as y, type BookingCategory as z };
@@ -1556,6 +1556,10 @@ interface GiftCardSummary {
1556
1556
  balance: number;
1557
1557
  currency: string;
1558
1558
  }
1559
+ /** Atomic multi-product purchase; every product is validated before any line changes. */
1560
+ interface AddToCartItemsInput {
1561
+ items: AddToCartInput[];
1562
+ }
1559
1563
  interface AddToCartInput {
1560
1564
  /**
1561
1565
  * Eshop product ID of the sellable unit. A variant is its own eshop product,
@@ -3973,6 +3977,10 @@ declare class CartModule {
3973
3977
  addItem(input: AddToCartInput): Promise<SdkResult<Cart & {
3974
3978
  newSessionToken?: string;
3975
3979
  }>>;
3980
+ /** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
3981
+ addItems(input: AddToCartItemsInput): Promise<SdkResult<Cart & {
3982
+ newSessionToken?: string;
3983
+ }>>;
3976
3984
  /**
3977
3985
  * Switch the CART currency server-side. The backend re-prices every line in
3978
3986
  * the new currency (no FX conversion: a product must have a price configured
@@ -4620,4 +4628,4 @@ declare function clearCartSummary(): void;
4620
4628
  /** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
4621
4629
  declare function publishCartSummary(summary: CartSummaryEvent): void;
4622
4630
 
4623
- export { type CartSummaryEvent as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type BookingCreateInput as D, type BookingCreated as E, type BookingLocale as F, type BookingLocation as G, type BookingManageSlotsQuery as H, type BookingService as I, type BookingSlot as J, type BookingSlots as K, type BookingSlotsQuery as L, type BookingStaff as M, type BookingStatus as N, type Bundle as O, type ProductDetail as P, type BundleCatalogQuery as Q, type BundleItem as R, type SdkResult as S, type Cart as T, type CartBundleLine as U, type CartBundleLineItem as V, type CartDiscount as W, type CartItem as X, type CartItemProduct as Y, type CartLinkClaimed as Z, type CartPromotion as _, type ProductVariant as a, type MenuItem as a$, type Category as a0, type CategoryDetail as a1, type CertificateVerification as a2, type CheckoutAddress as a3, type CheckoutInput as a4, type CheckoutPaymentMethod as a5, type CheckoutPreview as a6, type CheckoutResult as a7, type CheckoutSettings as a8, type CookieConsentInput as a9, type FacetLabel as aA, type FacetPriceRange as aB, type FacetRange as aC, type FacetRatingBucket as aD, type FacetValue as aE, type FacetsResponse as aF, type FilterField as aG, type FulfillmentStatus as aH, FulfillmentStatuses as aI, type GamificationRefreshResult as aJ, type GiftCardBalance as aK, type GiftCardPurchaseInput as aL, type GiftCardPurchaseResult as aM, type GiftCardSummary as aN, type LessonNote as aO, type LessonQuiz as aP, type LoginInput as aQ, type LoyaltyBalance as aR, type LoyaltyNextTier as aS, type LoyaltyProgram as aT, type LoyaltyQuery as aU, type LoyaltyReferralResult as aV, type LoyaltySummary as aW, type LoyaltyTier as aX, type LoyaltyTierPerks as aY, type LoyaltyTransaction as aZ, type Menu as a_, type CourseAttachment as aa, type CourseCertificate as ab, type CourseComment as ac, type CourseCommentReply as ad, type CourseCommentsList as ae, type CourseDetail as af, type CourseLesson as ag, type CourseListItem as ah, type CourseModule as ai, type CoursePostedComment as aj, type CourseProgress as ak, type CourseTutorMessage as al, type CourseTutorThread as am, type CrossSellItem as an, type CurrencyDisplayFormat as ao, type CustomerAddress as ap, type CustomerBadge as aq, type CustomerChallenge as ar, type CustomerGamification as as, type CustomerGamificationQuery as at, type CustomerProfile as au, type DigitalDownload as av, type DownloadUrl as aw, type Facet as ax, type FacetAvailability as ay, type FacetCategory as az, type StorefrontFormFieldError as b, type RequestInterceptorConfig as b$, type MenuItemRef as b0, type MenuItemType as b1, type MessageResponse as b2, type NewsletterOptInDefault as b3, type NewsletterSubscribeInput as b4, type NewsletterSubscribeResult as b5, type NewsletterUnsubscribeResult as b6, type OrderAccessRequestResponse as b7, type OrderAccessVerifyResponse as b8, type OrderDetail as b9, type ProductAvailability as bA, type ProductGroup as bB, type ProductLabel as bC, type ProductListItem as bD, type ProductMedia as bE, type ProductMediaVariant as bF, type ProductParameter as bG, type ProductParameterGroup as bH, type ProductParametersResponse as bI, type ProductPrice as bJ, type ProductPromotionSummary as bK, type ProductReview as bL, type ProductReviewsResponse as bM, type ProductSibling as bN, ProductSort as bO, type ProductSortValue as bP, type ProductVolumePrice as bQ, type ProductsQuery as bR, type QuizAnswerInput as bS, type QuizAnswerResult as bT, type QuizQuestion as bU, type QuizResult as bV, type QuoteItem as bW, type QuoteRequest as bX, type RegisterInput as bY, type RegisterResult as bZ, type RequestInterceptor as b_, type OrderDiscount as ba, type OrderDocument as bb, type OrderItem as bc, type OrderListItem as bd, type OrderPaymentInstructions as be, type OrderPickupPoint as bf, type OrderShipment as bg, type OrderStatus as bh, type OrderStatusHistory as bi, OrderStatuses as bj, type OrderTracking as bk, type Page as bl, type PageAttachment as bm, type PageDetail as bn, type PaginatedResponse as bo, type PaymentInstrument as bp, type PaymentStatus as bq, PaymentStatuses as br, type PaymentSwift as bs, type PickupPoint as bt, type PickupPointHours as bu, type PickupPointsInput as bv, type PickupWidgetConfig as bw, type PriceDisplay as bx, type ProductAssetGroup as by, type ProductAssetItem as bz, type AddToCartInput as c, clearCartSummary as c$, type ResponseInterceptor as c0, type ResponseInterceptorData as c1, type ReturnRequest as c2, type ReturnRequestItem as c3, type ReturnStatus as c4, type ReturnStatusItem as c5, type ReturnableOrder as c6, type ReturnableOrderItem as c7, type SdkError as c8, type ShippingMethodSummary as c9, type StorefrontFaqGroups as cA, type StorefrontFaqItem as cB, type StorefrontFaqQuery as cC, type StorefrontForm as cD, type StorefrontFormFieldErrorCode as cE, type StorefrontFormFile as cF, type StorefrontFormSettings as cG, type StorefrontFormSubmitInput as cH, type StorefrontFormSubmitResult as cI, type StorefrontFormUpload as cJ, type SubmitQuoteInput as cK, type SubmitReturnInput as cL, type SubmitReviewInput as cM, type SubmitWithdrawalInput as cN, type Subscription as cO, type SubscriptionAction as cP, type SubscriptionFrequency as cQ, type SubscriptionItem as cR, type SubscriptionStatus as cS, type TaxBreakdownLine as cT, type VariantAxis as cU, type VariantAxisValue as cV, type WishlistItem as cW, type WithdrawalAcknowledgement as cX, type WithdrawalFlag as cY, type WithdrawalSettings as cZ, type WithdrawalWindow as c_, type ShippingPublicConfig as ca, type ShippingQuote as cb, type ShippingQuoteInput as cc, type ShopAppearance as cd, type ShopCommerce as ce, type ShopInfo as cf, type ShopScript as cg, type ShopScriptPlacement as ch, type ShopScriptType as ci, type ShopScripts as cj, type ShopSeo as ck, type ShopSeoIdentity as cl, type SiteFormField as cm, type SiteFormFieldOption as cn, type SiteFormFieldType as co, type Sitemap as cp, type SitemapEntry as cq, type StockBehavior as cr, type StockMode as cs, type StorefrontCollection as ct, type StorefrontCollectionField as cu, type StorefrontCollectionFieldType as cv, type StorefrontCollectionItem as cw, type StorefrontCollectionQuery as cx, type StorefrontFaqGroup as cy, type StorefrontFaqGroupSummary as cz, type AddressDetail as d, err as d0, ok as d1, publishCartSummary as d2, toSdkError as d3, type AddressSuggestion as e, type AddressType as f, AddressTypes as g, type AuthTokens as h, type BackInStockSubscription as i, type BadgeTone as j, BehioApiError as k, type BehioErrorCode as l, type BehioEventHandler as m, type BehioEventType as n, BehioNetworkError as o, type BehioStorefrontConfig as p, type Blog as q, type BlogPostDetail as r, type BlogPostListItem as s, type BlogPostsPage as t, type BlogPostsQuery as u, type BlogSettings as v, type BlogTag as w, type Booking as x, type BookingCategory as y, type BookingConfig as z };
4631
+ export { type CartPromotion as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type BookingConfig as D, type BookingCreateInput as E, type BookingCreated as F, type BookingLocale as G, type BookingLocation as H, type BookingManageSlotsQuery as I, type BookingService as J, type BookingSlot as K, type BookingSlots as L, type BookingSlotsQuery as M, type BookingStaff as N, type BookingStatus as O, type ProductDetail as P, type Bundle as Q, type BundleCatalogQuery as R, type SdkResult as S, type BundleItem as T, type Cart as U, type CartBundleLine as V, type CartBundleLineItem as W, type CartDiscount as X, type CartItem as Y, type CartItemProduct as Z, type CartLinkClaimed as _, type ProductVariant as a, type Menu as a$, type CartSummaryEvent as a0, type Category as a1, type CategoryDetail as a2, type CertificateVerification as a3, type CheckoutAddress as a4, type CheckoutInput as a5, type CheckoutPaymentMethod as a6, type CheckoutPreview as a7, type CheckoutResult as a8, type CheckoutSettings as a9, type FacetCategory as aA, type FacetLabel as aB, type FacetPriceRange as aC, type FacetRange as aD, type FacetRatingBucket as aE, type FacetValue as aF, type FacetsResponse as aG, type FilterField as aH, type FulfillmentStatus as aI, FulfillmentStatuses as aJ, type GamificationRefreshResult as aK, type GiftCardBalance as aL, type GiftCardPurchaseInput as aM, type GiftCardPurchaseResult as aN, type GiftCardSummary as aO, type LessonNote as aP, type LessonQuiz as aQ, type LoginInput as aR, type LoyaltyBalance as aS, type LoyaltyNextTier as aT, type LoyaltyProgram as aU, type LoyaltyQuery as aV, type LoyaltyReferralResult as aW, type LoyaltySummary as aX, type LoyaltyTier as aY, type LoyaltyTierPerks as aZ, type LoyaltyTransaction as a_, type CookieConsentInput as aa, type CourseAttachment as ab, type CourseCertificate as ac, type CourseComment as ad, type CourseCommentReply as ae, type CourseCommentsList as af, type CourseDetail as ag, type CourseLesson as ah, type CourseListItem as ai, type CourseModule as aj, type CoursePostedComment as ak, type CourseProgress as al, type CourseTutorMessage as am, type CourseTutorThread as an, type CrossSellItem as ao, type CurrencyDisplayFormat as ap, type CustomerAddress as aq, type CustomerBadge as ar, type CustomerChallenge as as, type CustomerGamification as at, type CustomerGamificationQuery as au, type CustomerProfile as av, type DigitalDownload as aw, type DownloadUrl as ax, type Facet as ay, type FacetAvailability as az, type StorefrontFormFieldError as b, type RequestInterceptor as b$, type MenuItem as b0, type MenuItemRef as b1, type MenuItemType as b2, type MessageResponse as b3, type NewsletterOptInDefault as b4, type NewsletterSubscribeInput as b5, type NewsletterSubscribeResult as b6, type NewsletterUnsubscribeResult as b7, type OrderAccessRequestResponse as b8, type OrderAccessVerifyResponse as b9, type ProductAssetItem as bA, type ProductAvailability as bB, type ProductGroup as bC, type ProductLabel as bD, type ProductListItem as bE, type ProductMedia as bF, type ProductMediaVariant as bG, type ProductParameter as bH, type ProductParameterGroup as bI, type ProductParametersResponse as bJ, type ProductPrice as bK, type ProductPromotionSummary as bL, type ProductReview as bM, type ProductReviewsResponse as bN, type ProductSibling as bO, ProductSort as bP, type ProductSortValue as bQ, type ProductVolumePrice as bR, type ProductsQuery as bS, type QuizAnswerInput as bT, type QuizAnswerResult as bU, type QuizQuestion as bV, type QuizResult as bW, type QuoteItem as bX, type QuoteRequest as bY, type RegisterInput as bZ, type RegisterResult as b_, type OrderDetail as ba, type OrderDiscount as bb, type OrderDocument as bc, type OrderItem as bd, type OrderListItem as be, type OrderPaymentInstructions as bf, type OrderPickupPoint as bg, type OrderShipment as bh, type OrderStatus as bi, type OrderStatusHistory as bj, OrderStatuses as bk, type OrderTracking as bl, type Page as bm, type PageAttachment as bn, type PageDetail as bo, type PaginatedResponse as bp, type PaymentInstrument as bq, type PaymentStatus as br, PaymentStatuses as bs, type PaymentSwift as bt, type PickupPoint as bu, type PickupPointHours as bv, type PickupPointsInput as bw, type PickupWidgetConfig as bx, type PriceDisplay as by, type ProductAssetGroup as bz, type AddToCartInput as c, type WithdrawalWindow as c$, type RequestInterceptorConfig as c0, type ResponseInterceptor as c1, type ResponseInterceptorData as c2, type ReturnRequest as c3, type ReturnRequestItem as c4, type ReturnStatus as c5, type ReturnStatusItem as c6, type ReturnableOrder as c7, type ReturnableOrderItem as c8, type SdkError as c9, type StorefrontFaqGroupSummary as cA, type StorefrontFaqGroups as cB, type StorefrontFaqItem as cC, type StorefrontFaqQuery as cD, type StorefrontForm as cE, type StorefrontFormFieldErrorCode as cF, type StorefrontFormFile as cG, type StorefrontFormSettings as cH, type StorefrontFormSubmitInput as cI, type StorefrontFormSubmitResult as cJ, type StorefrontFormUpload as cK, type SubmitQuoteInput as cL, type SubmitReturnInput as cM, type SubmitReviewInput as cN, type SubmitWithdrawalInput as cO, type Subscription as cP, type SubscriptionAction as cQ, type SubscriptionFrequency as cR, type SubscriptionItem as cS, type SubscriptionStatus as cT, type TaxBreakdownLine as cU, type VariantAxis as cV, type VariantAxisValue as cW, type WishlistItem as cX, type WithdrawalAcknowledgement as cY, type WithdrawalFlag as cZ, type WithdrawalSettings as c_, type ShippingMethodSummary as ca, type ShippingPublicConfig as cb, type ShippingQuote as cc, type ShippingQuoteInput as cd, type ShopAppearance as ce, type ShopCommerce as cf, type ShopInfo as cg, type ShopScript as ch, type ShopScriptPlacement as ci, type ShopScriptType as cj, type ShopScripts as ck, type ShopSeo as cl, type ShopSeoIdentity as cm, type SiteFormField as cn, type SiteFormFieldOption as co, type SiteFormFieldType as cp, type Sitemap as cq, type SitemapEntry as cr, type StockBehavior as cs, type StockMode as ct, type StorefrontCollection as cu, type StorefrontCollectionField as cv, type StorefrontCollectionFieldType as cw, type StorefrontCollectionItem as cx, type StorefrontCollectionQuery as cy, type StorefrontFaqGroup as cz, type AddToCartItemsInput as d, clearCartSummary as d0, err as d1, ok as d2, publishCartSummary as d3, toSdkError as d4, type AddressDetail as e, type AddressSuggestion as f, type AddressType as g, AddressTypes as h, type AuthTokens as i, type BackInStockSubscription as j, type BadgeTone as k, BehioApiError as l, type BehioErrorCode as m, type BehioEventHandler as n, type BehioEventType as o, BehioNetworkError as p, type BehioStorefrontConfig as q, type Blog as r, type BlogPostDetail as s, type BlogPostListItem as t, type BlogPostsPage as u, type BlogPostsQuery as v, type BlogSettings as w, type BlogTag as x, type Booking as y, type BookingCategory as z };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-BuL50_BZ.mjs';
2
- export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Booking, y as BookingCategory, z as BookingConfig, D as BookingCreateInput, E as BookingCreated, F as BookingLocale, G as BookingLocation, H as BookingManageSlotsQuery, I as BookingService, J as BookingSlot, K as BookingSlots, L as BookingSlotsQuery, M as BookingStaff, N as BookingStatus, O as Bundle, Q as BundleCatalogQuery, R as BundleItem, T as Cart, U as CartBundleLine, V as CartBundleLineItem, W as CartDiscount, X as CartItem, Y as CartItemProduct, Z as CartLinkClaimed, _ as CartPromotion, $ as CartSummaryEvent, a0 as Category, a1 as CategoryDetail, a2 as CertificateVerification, a3 as CheckoutAddress, a4 as CheckoutInput, a5 as CheckoutPaymentMethod, a6 as CheckoutPreview, a7 as CheckoutResult, a8 as CheckoutSettings, a9 as CookieConsentInput, aa as CourseAttachment, ab as CourseCertificate, ac as CourseComment, ad as CourseCommentReply, ae as CourseCommentsList, af as CourseDetail, ag as CourseLesson, ah as CourseListItem, ai as CourseModule, aj as CoursePostedComment, ak as CourseProgress, al as CourseTutorMessage, am as CourseTutorThread, an as CrossSellItem, ao as CurrencyDisplayFormat, ap as CustomerAddress, aq as CustomerBadge, ar as CustomerChallenge, as as CustomerGamification, at as CustomerGamificationQuery, au as CustomerProfile, av as DigitalDownload, aw as DownloadUrl, ax as Facet, ay as FacetAvailability, az as FacetCategory, aA as FacetLabel, aB as FacetPriceRange, aC as FacetRange, aD as FacetRatingBucket, aE as FacetValue, aF as FacetsResponse, aG as FilterField, aH as FulfillmentStatus, aI as FulfillmentStatuses, aJ as GamificationRefreshResult, aK as GiftCardBalance, aL as GiftCardPurchaseInput, aM as GiftCardPurchaseResult, aN as GiftCardSummary, aO as LessonNote, aP as LessonQuiz, aQ as LoginInput, aR as LoyaltyBalance, aS as LoyaltyNextTier, aT as LoyaltyProgram, aU as LoyaltyQuery, aV as LoyaltyReferralResult, aW as LoyaltySummary, aX as LoyaltyTier, aY as LoyaltyTierPerks, aZ as LoyaltyTransaction, a_ as Menu, a$ as MenuItem, b0 as MenuItemRef, b1 as MenuItemType, b2 as MessageResponse, b3 as NewsletterOptInDefault, b4 as NewsletterSubscribeInput, b5 as NewsletterSubscribeResult, b6 as NewsletterUnsubscribeResult, b7 as OrderAccessRequestResponse, b8 as OrderAccessVerifyResponse, b9 as OrderDetail, ba as OrderDiscount, bb as OrderDocument, bc as OrderItem, bd as OrderListItem, be as OrderPaymentInstructions, bf as OrderPickupPoint, bg as OrderShipment, bh as OrderStatus, bi as OrderStatusHistory, bj as OrderStatuses, bk as OrderTracking, bl as Page, bm as PageAttachment, bn as PageDetail, bo as PaginatedResponse, bp as PaymentInstrument, bq as PaymentStatus, br as PaymentStatuses, bs as PaymentSwift, bt as PickupPoint, bu as PickupPointHours, bv as PickupPointsInput, bw as PickupWidgetConfig, bx as PriceDisplay, by as ProductAssetGroup, bz as ProductAssetItem, bA as ProductAvailability, bB as ProductGroup, bC as ProductLabel, bD as ProductListItem, bE as ProductMedia, bF as ProductMediaVariant, bG as ProductParameter, bH as ProductParameterGroup, bI as ProductParametersResponse, bJ as ProductPrice, bK as ProductPromotionSummary, bL as ProductReview, bM as ProductReviewsResponse, bN as ProductSibling, bO as ProductSort, bP as ProductSortValue, bQ as ProductVolumePrice, bR as ProductsQuery, bS as QuizAnswerInput, bT as QuizAnswerResult, bU as QuizQuestion, bV as QuizResult, bW as QuoteItem, bX as QuoteRequest, bY as RegisterInput, bZ as RegisterResult, b_ as RequestInterceptor, b$ as RequestInterceptorConfig, c0 as ResponseInterceptor, c1 as ResponseInterceptorData, c2 as ReturnRequest, c3 as ReturnRequestItem, c4 as ReturnStatus, c5 as ReturnStatusItem, c6 as ReturnableOrder, c7 as ReturnableOrderItem, c8 as SdkError, c9 as ShippingMethodSummary, ca as ShippingPublicConfig, cb as ShippingQuote, cc as ShippingQuoteInput, cd as ShopAppearance, ce as ShopCommerce, cf as ShopInfo, cg as ShopScript, ch as ShopScriptPlacement, ci as ShopScriptType, cj as ShopScripts, ck as ShopSeo, cl as ShopSeoIdentity, cm as SiteFormField, cn as SiteFormFieldOption, co as SiteFormFieldType, cp as Sitemap, cq as SitemapEntry, cr as StockBehavior, cs as StockMode, ct as StorefrontCollection, cu as StorefrontCollectionField, cv as StorefrontCollectionFieldType, cw as StorefrontCollectionItem, cx as StorefrontCollectionQuery, cy as StorefrontFaqGroup, cz as StorefrontFaqGroupSummary, cA as StorefrontFaqGroups, cB as StorefrontFaqItem, cC as StorefrontFaqQuery, cD as StorefrontForm, cE as StorefrontFormFieldErrorCode, cF as StorefrontFormFile, cG as StorefrontFormSettings, cH as StorefrontFormSubmitInput, cI as StorefrontFormSubmitResult, cJ as StorefrontFormUpload, cK as SubmitQuoteInput, cL as SubmitReturnInput, cM as SubmitReviewInput, cN as SubmitWithdrawalInput, cO as Subscription, cP as SubscriptionAction, cQ as SubscriptionFrequency, cR as SubscriptionItem, cS as SubscriptionStatus, cT as TaxBreakdownLine, cU as VariantAxis, cV as VariantAxisValue, cW as WishlistItem, cX as WithdrawalAcknowledgement, cY as WithdrawalFlag, cZ as WithdrawalSettings, c_ as WithdrawalWindow, c$ as clearCartSummary, d0 as err, d1 as ok, d2 as publishCartSummary, d3 as toSdkError } from './client-BuL50_BZ.mjs';
1
+ import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-EjtvqiPK.mjs';
2
+ export { A as ActivePromotion, c as AddToCartInput, d as AddToCartItemsInput, e as AddressDetail, f as AddressSuggestion, g as AddressType, h as AddressTypes, i as AuthTokens, j as BackInStockSubscription, k as BadgeTone, l as BehioApiError, m as BehioErrorCode, n as BehioEventHandler, o as BehioEventType, p as BehioNetworkError, q as BehioStorefrontConfig, r as Blog, s as BlogPostDetail, t as BlogPostListItem, u as BlogPostsPage, v as BlogPostsQuery, w as BlogSettings, x as BlogTag, y as Booking, z as BookingCategory, D as BookingConfig, E as BookingCreateInput, F as BookingCreated, G as BookingLocale, H as BookingLocation, I as BookingManageSlotsQuery, J as BookingService, K as BookingSlot, L as BookingSlots, M as BookingSlotsQuery, N as BookingStaff, O as BookingStatus, Q as Bundle, R as BundleCatalogQuery, T as BundleItem, U as Cart, V as CartBundleLine, W as CartBundleLineItem, X as CartDiscount, Y as CartItem, Z as CartItemProduct, _ as CartLinkClaimed, $ as CartPromotion, a0 as CartSummaryEvent, a1 as Category, a2 as CategoryDetail, a3 as CertificateVerification, a4 as CheckoutAddress, a5 as CheckoutInput, a6 as CheckoutPaymentMethod, a7 as CheckoutPreview, a8 as CheckoutResult, a9 as CheckoutSettings, aa as CookieConsentInput, ab as CourseAttachment, ac as CourseCertificate, ad as CourseComment, ae as CourseCommentReply, af as CourseCommentsList, ag as CourseDetail, ah as CourseLesson, ai as CourseListItem, aj as CourseModule, ak as CoursePostedComment, al as CourseProgress, am as CourseTutorMessage, an as CourseTutorThread, ao as CrossSellItem, ap as CurrencyDisplayFormat, aq as CustomerAddress, ar as CustomerBadge, as as CustomerChallenge, at as CustomerGamification, au as CustomerGamificationQuery, av as CustomerProfile, aw as DigitalDownload, ax as DownloadUrl, ay as Facet, az as FacetAvailability, aA as FacetCategory, aB as FacetLabel, aC as FacetPriceRange, aD as FacetRange, aE as FacetRatingBucket, aF as FacetValue, aG as FacetsResponse, aH as FilterField, aI as FulfillmentStatus, aJ as FulfillmentStatuses, aK as GamificationRefreshResult, aL as GiftCardBalance, aM as GiftCardPurchaseInput, aN as GiftCardPurchaseResult, aO as GiftCardSummary, aP as LessonNote, aQ as LessonQuiz, aR as LoginInput, aS as LoyaltyBalance, aT as LoyaltyNextTier, aU as LoyaltyProgram, aV as LoyaltyQuery, aW as LoyaltyReferralResult, aX as LoyaltySummary, aY as LoyaltyTier, aZ as LoyaltyTierPerks, a_ as LoyaltyTransaction, a$ as Menu, b0 as MenuItem, b1 as MenuItemRef, b2 as MenuItemType, b3 as MessageResponse, b4 as NewsletterOptInDefault, b5 as NewsletterSubscribeInput, b6 as NewsletterSubscribeResult, b7 as NewsletterUnsubscribeResult, b8 as OrderAccessRequestResponse, b9 as OrderAccessVerifyResponse, ba as OrderDetail, bb as OrderDiscount, bc as OrderDocument, bd as OrderItem, be as OrderListItem, bf as OrderPaymentInstructions, bg as OrderPickupPoint, bh as OrderShipment, bi as OrderStatus, bj as OrderStatusHistory, bk as OrderStatuses, bl as OrderTracking, bm as Page, bn as PageAttachment, bo as PageDetail, bp as PaginatedResponse, bq as PaymentInstrument, br as PaymentStatus, bs as PaymentStatuses, bt as PaymentSwift, bu as PickupPoint, bv as PickupPointHours, bw as PickupPointsInput, bx as PickupWidgetConfig, by as PriceDisplay, bz as ProductAssetGroup, bA as ProductAssetItem, bB as ProductAvailability, bC as ProductGroup, bD as ProductLabel, bE as ProductListItem, bF as ProductMedia, bG as ProductMediaVariant, bH as ProductParameter, bI as ProductParameterGroup, bJ as ProductParametersResponse, bK as ProductPrice, bL as ProductPromotionSummary, bM as ProductReview, bN as ProductReviewsResponse, bO as ProductSibling, bP as ProductSort, bQ as ProductSortValue, bR as ProductVolumePrice, bS as ProductsQuery, bT as QuizAnswerInput, bU as QuizAnswerResult, bV as QuizQuestion, bW as QuizResult, bX as QuoteItem, bY as QuoteRequest, bZ as RegisterInput, b_ as RegisterResult, b$ as RequestInterceptor, c0 as RequestInterceptorConfig, c1 as ResponseInterceptor, c2 as ResponseInterceptorData, c3 as ReturnRequest, c4 as ReturnRequestItem, c5 as ReturnStatus, c6 as ReturnStatusItem, c7 as ReturnableOrder, c8 as ReturnableOrderItem, c9 as SdkError, ca as ShippingMethodSummary, cb as ShippingPublicConfig, cc as ShippingQuote, cd as ShippingQuoteInput, ce as ShopAppearance, cf as ShopCommerce, cg as ShopInfo, ch as ShopScript, ci as ShopScriptPlacement, cj as ShopScriptType, ck as ShopScripts, cl as ShopSeo, cm as ShopSeoIdentity, cn as SiteFormField, co as SiteFormFieldOption, cp as SiteFormFieldType, cq as Sitemap, cr as SitemapEntry, cs as StockBehavior, ct as StockMode, cu as StorefrontCollection, cv as StorefrontCollectionField, cw as StorefrontCollectionFieldType, cx as StorefrontCollectionItem, cy as StorefrontCollectionQuery, cz as StorefrontFaqGroup, cA as StorefrontFaqGroupSummary, cB as StorefrontFaqGroups, cC as StorefrontFaqItem, cD as StorefrontFaqQuery, cE as StorefrontForm, cF as StorefrontFormFieldErrorCode, cG as StorefrontFormFile, cH as StorefrontFormSettings, cI as StorefrontFormSubmitInput, cJ as StorefrontFormSubmitResult, cK as StorefrontFormUpload, cL as SubmitQuoteInput, cM as SubmitReturnInput, cN as SubmitReviewInput, cO as SubmitWithdrawalInput, cP as Subscription, cQ as SubscriptionAction, cR as SubscriptionFrequency, cS as SubscriptionItem, cT as SubscriptionStatus, cU as TaxBreakdownLine, cV as VariantAxis, cW as VariantAxisValue, cX as WishlistItem, cY as WithdrawalAcknowledgement, cZ as WithdrawalFlag, c_ as WithdrawalSettings, c$ as WithdrawalWindow, d0 as clearCartSummary, d1 as err, d2 as ok, d3 as publishCartSummary, d4 as toSdkError } from './client-EjtvqiPK.mjs';
3
3
 
4
4
  /**
5
5
  * Format a price amount with currency using Intl.NumberFormat.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-BuL50_BZ.js';
2
- export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Booking, y as BookingCategory, z as BookingConfig, D as BookingCreateInput, E as BookingCreated, F as BookingLocale, G as BookingLocation, H as BookingManageSlotsQuery, I as BookingService, J as BookingSlot, K as BookingSlots, L as BookingSlotsQuery, M as BookingStaff, N as BookingStatus, O as Bundle, Q as BundleCatalogQuery, R as BundleItem, T as Cart, U as CartBundleLine, V as CartBundleLineItem, W as CartDiscount, X as CartItem, Y as CartItemProduct, Z as CartLinkClaimed, _ as CartPromotion, $ as CartSummaryEvent, a0 as Category, a1 as CategoryDetail, a2 as CertificateVerification, a3 as CheckoutAddress, a4 as CheckoutInput, a5 as CheckoutPaymentMethod, a6 as CheckoutPreview, a7 as CheckoutResult, a8 as CheckoutSettings, a9 as CookieConsentInput, aa as CourseAttachment, ab as CourseCertificate, ac as CourseComment, ad as CourseCommentReply, ae as CourseCommentsList, af as CourseDetail, ag as CourseLesson, ah as CourseListItem, ai as CourseModule, aj as CoursePostedComment, ak as CourseProgress, al as CourseTutorMessage, am as CourseTutorThread, an as CrossSellItem, ao as CurrencyDisplayFormat, ap as CustomerAddress, aq as CustomerBadge, ar as CustomerChallenge, as as CustomerGamification, at as CustomerGamificationQuery, au as CustomerProfile, av as DigitalDownload, aw as DownloadUrl, ax as Facet, ay as FacetAvailability, az as FacetCategory, aA as FacetLabel, aB as FacetPriceRange, aC as FacetRange, aD as FacetRatingBucket, aE as FacetValue, aF as FacetsResponse, aG as FilterField, aH as FulfillmentStatus, aI as FulfillmentStatuses, aJ as GamificationRefreshResult, aK as GiftCardBalance, aL as GiftCardPurchaseInput, aM as GiftCardPurchaseResult, aN as GiftCardSummary, aO as LessonNote, aP as LessonQuiz, aQ as LoginInput, aR as LoyaltyBalance, aS as LoyaltyNextTier, aT as LoyaltyProgram, aU as LoyaltyQuery, aV as LoyaltyReferralResult, aW as LoyaltySummary, aX as LoyaltyTier, aY as LoyaltyTierPerks, aZ as LoyaltyTransaction, a_ as Menu, a$ as MenuItem, b0 as MenuItemRef, b1 as MenuItemType, b2 as MessageResponse, b3 as NewsletterOptInDefault, b4 as NewsletterSubscribeInput, b5 as NewsletterSubscribeResult, b6 as NewsletterUnsubscribeResult, b7 as OrderAccessRequestResponse, b8 as OrderAccessVerifyResponse, b9 as OrderDetail, ba as OrderDiscount, bb as OrderDocument, bc as OrderItem, bd as OrderListItem, be as OrderPaymentInstructions, bf as OrderPickupPoint, bg as OrderShipment, bh as OrderStatus, bi as OrderStatusHistory, bj as OrderStatuses, bk as OrderTracking, bl as Page, bm as PageAttachment, bn as PageDetail, bo as PaginatedResponse, bp as PaymentInstrument, bq as PaymentStatus, br as PaymentStatuses, bs as PaymentSwift, bt as PickupPoint, bu as PickupPointHours, bv as PickupPointsInput, bw as PickupWidgetConfig, bx as PriceDisplay, by as ProductAssetGroup, bz as ProductAssetItem, bA as ProductAvailability, bB as ProductGroup, bC as ProductLabel, bD as ProductListItem, bE as ProductMedia, bF as ProductMediaVariant, bG as ProductParameter, bH as ProductParameterGroup, bI as ProductParametersResponse, bJ as ProductPrice, bK as ProductPromotionSummary, bL as ProductReview, bM as ProductReviewsResponse, bN as ProductSibling, bO as ProductSort, bP as ProductSortValue, bQ as ProductVolumePrice, bR as ProductsQuery, bS as QuizAnswerInput, bT as QuizAnswerResult, bU as QuizQuestion, bV as QuizResult, bW as QuoteItem, bX as QuoteRequest, bY as RegisterInput, bZ as RegisterResult, b_ as RequestInterceptor, b$ as RequestInterceptorConfig, c0 as ResponseInterceptor, c1 as ResponseInterceptorData, c2 as ReturnRequest, c3 as ReturnRequestItem, c4 as ReturnStatus, c5 as ReturnStatusItem, c6 as ReturnableOrder, c7 as ReturnableOrderItem, c8 as SdkError, c9 as ShippingMethodSummary, ca as ShippingPublicConfig, cb as ShippingQuote, cc as ShippingQuoteInput, cd as ShopAppearance, ce as ShopCommerce, cf as ShopInfo, cg as ShopScript, ch as ShopScriptPlacement, ci as ShopScriptType, cj as ShopScripts, ck as ShopSeo, cl as ShopSeoIdentity, cm as SiteFormField, cn as SiteFormFieldOption, co as SiteFormFieldType, cp as Sitemap, cq as SitemapEntry, cr as StockBehavior, cs as StockMode, ct as StorefrontCollection, cu as StorefrontCollectionField, cv as StorefrontCollectionFieldType, cw as StorefrontCollectionItem, cx as StorefrontCollectionQuery, cy as StorefrontFaqGroup, cz as StorefrontFaqGroupSummary, cA as StorefrontFaqGroups, cB as StorefrontFaqItem, cC as StorefrontFaqQuery, cD as StorefrontForm, cE as StorefrontFormFieldErrorCode, cF as StorefrontFormFile, cG as StorefrontFormSettings, cH as StorefrontFormSubmitInput, cI as StorefrontFormSubmitResult, cJ as StorefrontFormUpload, cK as SubmitQuoteInput, cL as SubmitReturnInput, cM as SubmitReviewInput, cN as SubmitWithdrawalInput, cO as Subscription, cP as SubscriptionAction, cQ as SubscriptionFrequency, cR as SubscriptionItem, cS as SubscriptionStatus, cT as TaxBreakdownLine, cU as VariantAxis, cV as VariantAxisValue, cW as WishlistItem, cX as WithdrawalAcknowledgement, cY as WithdrawalFlag, cZ as WithdrawalSettings, c_ as WithdrawalWindow, c$ as clearCartSummary, d0 as err, d1 as ok, d2 as publishCartSummary, d3 as toSdkError } from './client-BuL50_BZ.js';
1
+ import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-EjtvqiPK.js';
2
+ export { A as ActivePromotion, c as AddToCartInput, d as AddToCartItemsInput, e as AddressDetail, f as AddressSuggestion, g as AddressType, h as AddressTypes, i as AuthTokens, j as BackInStockSubscription, k as BadgeTone, l as BehioApiError, m as BehioErrorCode, n as BehioEventHandler, o as BehioEventType, p as BehioNetworkError, q as BehioStorefrontConfig, r as Blog, s as BlogPostDetail, t as BlogPostListItem, u as BlogPostsPage, v as BlogPostsQuery, w as BlogSettings, x as BlogTag, y as Booking, z as BookingCategory, D as BookingConfig, E as BookingCreateInput, F as BookingCreated, G as BookingLocale, H as BookingLocation, I as BookingManageSlotsQuery, J as BookingService, K as BookingSlot, L as BookingSlots, M as BookingSlotsQuery, N as BookingStaff, O as BookingStatus, Q as Bundle, R as BundleCatalogQuery, T as BundleItem, U as Cart, V as CartBundleLine, W as CartBundleLineItem, X as CartDiscount, Y as CartItem, Z as CartItemProduct, _ as CartLinkClaimed, $ as CartPromotion, a0 as CartSummaryEvent, a1 as Category, a2 as CategoryDetail, a3 as CertificateVerification, a4 as CheckoutAddress, a5 as CheckoutInput, a6 as CheckoutPaymentMethod, a7 as CheckoutPreview, a8 as CheckoutResult, a9 as CheckoutSettings, aa as CookieConsentInput, ab as CourseAttachment, ac as CourseCertificate, ad as CourseComment, ae as CourseCommentReply, af as CourseCommentsList, ag as CourseDetail, ah as CourseLesson, ai as CourseListItem, aj as CourseModule, ak as CoursePostedComment, al as CourseProgress, am as CourseTutorMessage, an as CourseTutorThread, ao as CrossSellItem, ap as CurrencyDisplayFormat, aq as CustomerAddress, ar as CustomerBadge, as as CustomerChallenge, at as CustomerGamification, au as CustomerGamificationQuery, av as CustomerProfile, aw as DigitalDownload, ax as DownloadUrl, ay as Facet, az as FacetAvailability, aA as FacetCategory, aB as FacetLabel, aC as FacetPriceRange, aD as FacetRange, aE as FacetRatingBucket, aF as FacetValue, aG as FacetsResponse, aH as FilterField, aI as FulfillmentStatus, aJ as FulfillmentStatuses, aK as GamificationRefreshResult, aL as GiftCardBalance, aM as GiftCardPurchaseInput, aN as GiftCardPurchaseResult, aO as GiftCardSummary, aP as LessonNote, aQ as LessonQuiz, aR as LoginInput, aS as LoyaltyBalance, aT as LoyaltyNextTier, aU as LoyaltyProgram, aV as LoyaltyQuery, aW as LoyaltyReferralResult, aX as LoyaltySummary, aY as LoyaltyTier, aZ as LoyaltyTierPerks, a_ as LoyaltyTransaction, a$ as Menu, b0 as MenuItem, b1 as MenuItemRef, b2 as MenuItemType, b3 as MessageResponse, b4 as NewsletterOptInDefault, b5 as NewsletterSubscribeInput, b6 as NewsletterSubscribeResult, b7 as NewsletterUnsubscribeResult, b8 as OrderAccessRequestResponse, b9 as OrderAccessVerifyResponse, ba as OrderDetail, bb as OrderDiscount, bc as OrderDocument, bd as OrderItem, be as OrderListItem, bf as OrderPaymentInstructions, bg as OrderPickupPoint, bh as OrderShipment, bi as OrderStatus, bj as OrderStatusHistory, bk as OrderStatuses, bl as OrderTracking, bm as Page, bn as PageAttachment, bo as PageDetail, bp as PaginatedResponse, bq as PaymentInstrument, br as PaymentStatus, bs as PaymentStatuses, bt as PaymentSwift, bu as PickupPoint, bv as PickupPointHours, bw as PickupPointsInput, bx as PickupWidgetConfig, by as PriceDisplay, bz as ProductAssetGroup, bA as ProductAssetItem, bB as ProductAvailability, bC as ProductGroup, bD as ProductLabel, bE as ProductListItem, bF as ProductMedia, bG as ProductMediaVariant, bH as ProductParameter, bI as ProductParameterGroup, bJ as ProductParametersResponse, bK as ProductPrice, bL as ProductPromotionSummary, bM as ProductReview, bN as ProductReviewsResponse, bO as ProductSibling, bP as ProductSort, bQ as ProductSortValue, bR as ProductVolumePrice, bS as ProductsQuery, bT as QuizAnswerInput, bU as QuizAnswerResult, bV as QuizQuestion, bW as QuizResult, bX as QuoteItem, bY as QuoteRequest, bZ as RegisterInput, b_ as RegisterResult, b$ as RequestInterceptor, c0 as RequestInterceptorConfig, c1 as ResponseInterceptor, c2 as ResponseInterceptorData, c3 as ReturnRequest, c4 as ReturnRequestItem, c5 as ReturnStatus, c6 as ReturnStatusItem, c7 as ReturnableOrder, c8 as ReturnableOrderItem, c9 as SdkError, ca as ShippingMethodSummary, cb as ShippingPublicConfig, cc as ShippingQuote, cd as ShippingQuoteInput, ce as ShopAppearance, cf as ShopCommerce, cg as ShopInfo, ch as ShopScript, ci as ShopScriptPlacement, cj as ShopScriptType, ck as ShopScripts, cl as ShopSeo, cm as ShopSeoIdentity, cn as SiteFormField, co as SiteFormFieldOption, cp as SiteFormFieldType, cq as Sitemap, cr as SitemapEntry, cs as StockBehavior, ct as StockMode, cu as StorefrontCollection, cv as StorefrontCollectionField, cw as StorefrontCollectionFieldType, cx as StorefrontCollectionItem, cy as StorefrontCollectionQuery, cz as StorefrontFaqGroup, cA as StorefrontFaqGroupSummary, cB as StorefrontFaqGroups, cC as StorefrontFaqItem, cD as StorefrontFaqQuery, cE as StorefrontForm, cF as StorefrontFormFieldErrorCode, cG as StorefrontFormFile, cH as StorefrontFormSettings, cI as StorefrontFormSubmitInput, cJ as StorefrontFormSubmitResult, cK as StorefrontFormUpload, cL as SubmitQuoteInput, cM as SubmitReturnInput, cN as SubmitReviewInput, cO as SubmitWithdrawalInput, cP as Subscription, cQ as SubscriptionAction, cR as SubscriptionFrequency, cS as SubscriptionItem, cT as SubscriptionStatus, cU as TaxBreakdownLine, cV as VariantAxis, cW as VariantAxisValue, cX as WishlistItem, cY as WithdrawalAcknowledgement, cZ as WithdrawalFlag, c_ as WithdrawalSettings, c$ as WithdrawalWindow, d0 as clearCartSummary, d1 as err, d2 as ok, d3 as publishCartSummary, d4 as toSdkError } from './client-EjtvqiPK.js';
3
3
 
4
4
  /**
5
5
  * Format a price amount with currency using Intl.NumberFormat.
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
 
14
14
 
15
- var _chunkIUC57IOBjs = require('./chunk-IUC57IOB.js');
15
+ var _chunkOOLOURJMjs = require('./chunk-OOLOURJM.js');
16
16
 
17
17
  // src/react/utils/format-price.ts
18
18
  function formatPrice(amount, currency, locale, display) {
@@ -1106,7 +1106,7 @@ var GENERIC = {
1106
1106
  en: "Something went wrong, please try again."
1107
1107
  };
1108
1108
  function bodyOf(err2) {
1109
- const body = err2 instanceof _chunkIUC57IOBjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
1109
+ const body = err2 instanceof _chunkOOLOURJMjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
1110
1110
  return body && typeof body === "object" ? body : null;
1111
1111
  }
1112
1112
  function errorCode(err2) {
@@ -1223,4 +1223,4 @@ function formFieldErrors(err2) {
1223
1223
 
1224
1224
 
1225
1225
 
1226
- exports.AddressTypes = _chunkIUC57IOBjs.AddressTypes; exports.BehioApiError = _chunkIUC57IOBjs.BehioApiError; exports.BehioNetworkError = _chunkIUC57IOBjs.BehioNetworkError; exports.BehioStorefront = _chunkIUC57IOBjs.BehioStorefront; exports.FulfillmentStatuses = _chunkIUC57IOBjs.FulfillmentStatuses; exports.OrderStatuses = _chunkIUC57IOBjs.OrderStatuses; exports.PaymentStatuses = _chunkIUC57IOBjs.PaymentStatuses; exports.ProductSort = _chunkIUC57IOBjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.clearCartSummary = _chunkIUC57IOBjs.clearCartSummary; exports.err = _chunkIUC57IOBjs.err; exports.errorCode = errorCode; exports.errorMessage = errorMessage; exports.errorParams = errorParams; exports.findVariantByAttributes = findVariantByAttributes; exports.formFieldErrors = formFieldErrors; exports.formatPrice = formatPrice; exports.generateVisitorId = generateVisitorId; exports.getStoredVisitorId = getStoredVisitorId; exports.grantAnalyticsConsent = grantAnalyticsConsent; exports.ok = _chunkIUC57IOBjs.ok; exports.publishCartSummary = _chunkIUC57IOBjs.publishCartSummary; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkIUC57IOBjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
1226
+ exports.AddressTypes = _chunkOOLOURJMjs.AddressTypes; exports.BehioApiError = _chunkOOLOURJMjs.BehioApiError; exports.BehioNetworkError = _chunkOOLOURJMjs.BehioNetworkError; exports.BehioStorefront = _chunkOOLOURJMjs.BehioStorefront; exports.FulfillmentStatuses = _chunkOOLOURJMjs.FulfillmentStatuses; exports.OrderStatuses = _chunkOOLOURJMjs.OrderStatuses; exports.PaymentStatuses = _chunkOOLOURJMjs.PaymentStatuses; exports.ProductSort = _chunkOOLOURJMjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.clearCartSummary = _chunkOOLOURJMjs.clearCartSummary; exports.err = _chunkOOLOURJMjs.err; exports.errorCode = errorCode; exports.errorMessage = errorMessage; exports.errorParams = errorParams; exports.findVariantByAttributes = findVariantByAttributes; exports.formFieldErrors = formFieldErrors; exports.formatPrice = formatPrice; exports.generateVisitorId = generateVisitorId; exports.getStoredVisitorId = getStoredVisitorId; exports.grantAnalyticsConsent = grantAnalyticsConsent; exports.ok = _chunkOOLOURJMjs.ok; exports.publishCartSummary = _chunkOOLOURJMjs.publishCartSummary; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkOOLOURJMjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  ok,
13
13
  publishCartSummary,
14
14
  toSdkError
15
- } from "./chunk-GNWW2O3A.mjs";
15
+ } from "./chunk-3TAXKDUJ.mjs";
16
16
 
17
17
  // src/react/utils/format-price.ts
18
18
  function formatPrice(amount, currency, locale, display) {
package/dist/next.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-BuL50_BZ.mjs';
1
+ import { q as BehioStorefrontConfig, B as BehioStorefront } from './client-EjtvqiPK.mjs';
2
2
 
3
3
  interface GetBehioOptions extends Partial<BehioStorefrontConfig> {
4
4
  /** Override the cart session cookie name (default: "behio_cart_session"). */
package/dist/next.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-BuL50_BZ.js';
1
+ import { q as BehioStorefrontConfig, B as BehioStorefront } from './client-EjtvqiPK.js';
2
2
 
3
3
  interface GetBehioOptions extends Partial<BehioStorefrontConfig> {
4
4
  /** Override the cart session cookie name (default: "behio_cart_session"). */
package/dist/next.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkIUC57IOBjs = require('./chunk-IUC57IOB.js');
3
+ var _chunkOOLOURJMjs = require('./chunk-OOLOURJM.js');
4
4
 
5
5
  // src/next.ts
6
6
  var _headers = require('next/headers');
@@ -19,7 +19,7 @@ async function getBehio(options = {}) {
19
19
  const locale = _nullishCoalesce(options.locale, () => ( process.env.BEHIO_LOCALE));
20
20
  const currency = _nullishCoalesce(options.currency, () => ( process.env.BEHIO_CURRENCY));
21
21
  const cookieName = _nullishCoalesce(options.cartCookieName, () => ( CART_COOKIE_NAME));
22
- const client = new (0, _chunkIUC57IOBjs.BehioStorefront)({
22
+ const client = new (0, _chunkOOLOURJMjs.BehioStorefront)({
23
23
  apiKey,
24
24
  ...baseUrl ? { baseUrl } : {},
25
25
  ...locale ? { locale } : {},
package/dist/next.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BehioStorefront
3
- } from "./chunk-GNWW2O3A.mjs";
3
+ } from "./chunk-3TAXKDUJ.mjs";
4
4
 
5
5
  // src/next.ts
6
6
  import { cookies, headers } from "next/headers";
package/dist/react.d.mts CHANGED
@@ -1613,6 +1613,10 @@ interface GiftCardSummary {
1613
1613
  balance: number;
1614
1614
  currency: string;
1615
1615
  }
1616
+ /** Atomic multi-product purchase; every product is validated before any line changes. */
1617
+ interface AddToCartItemsInput {
1618
+ items: AddToCartInput[];
1619
+ }
1616
1620
  interface AddToCartInput {
1617
1621
  /**
1618
1622
  * Eshop product ID of the sellable unit. A variant is its own eshop product,
@@ -4010,6 +4014,10 @@ declare class CartModule {
4010
4014
  addItem(input: AddToCartInput): Promise<SdkResult<Cart & {
4011
4015
  newSessionToken?: string;
4012
4016
  }>>;
4017
+ /** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
4018
+ addItems(input: AddToCartItemsInput): Promise<SdkResult<Cart & {
4019
+ newSessionToken?: string;
4020
+ }>>;
4013
4021
  /**
4014
4022
  * Switch the CART currency server-side. The backend re-prices every line in
4015
4023
  * the new currency (no FX conversion: a product must have a price configured
@@ -4819,6 +4827,9 @@ declare function useCart(options?: UseCartOptions): {
4819
4827
  addItem: (productId: string, quantity?: number) => Promise<Cart & {
4820
4828
  newSessionToken?: string;
4821
4829
  }>;
4830
+ addItems: _tanstack_react_query.UseMutateAsyncFunction<Cart & {
4831
+ newSessionToken?: string;
4832
+ }, Error, AddToCartItemsInput, void>;
4822
4833
  updateQuantity: (itemId: string, quantity: number) => Promise<Cart>;
4823
4834
  removeItem: (itemId: string) => Promise<Cart>;
4824
4835
  clear: () => Promise<void>;
package/dist/react.d.ts CHANGED
@@ -1613,6 +1613,10 @@ interface GiftCardSummary {
1613
1613
  balance: number;
1614
1614
  currency: string;
1615
1615
  }
1616
+ /** Atomic multi-product purchase; every product is validated before any line changes. */
1617
+ interface AddToCartItemsInput {
1618
+ items: AddToCartInput[];
1619
+ }
1616
1620
  interface AddToCartInput {
1617
1621
  /**
1618
1622
  * Eshop product ID of the sellable unit. A variant is its own eshop product,
@@ -4010,6 +4014,10 @@ declare class CartModule {
4010
4014
  addItem(input: AddToCartInput): Promise<SdkResult<Cart & {
4011
4015
  newSessionToken?: string;
4012
4016
  }>>;
4017
+ /** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
4018
+ addItems(input: AddToCartItemsInput): Promise<SdkResult<Cart & {
4019
+ newSessionToken?: string;
4020
+ }>>;
4013
4021
  /**
4014
4022
  * Switch the CART currency server-side. The backend re-prices every line in
4015
4023
  * the new currency (no FX conversion: a product must have a price configured
@@ -4819,6 +4827,9 @@ declare function useCart(options?: UseCartOptions): {
4819
4827
  addItem: (productId: string, quantity?: number) => Promise<Cart & {
4820
4828
  newSessionToken?: string;
4821
4829
  }>;
4830
+ addItems: _tanstack_react_query.UseMutateAsyncFunction<Cart & {
4831
+ newSessionToken?: string;
4832
+ }, Error, AddToCartItemsInput, void>;
4822
4833
  updateQuantity: (itemId: string, quantity: number) => Promise<Cart>;
4823
4834
  removeItem: (itemId: string) => Promise<Cart>;
4824
4835
  clear: () => Promise<void>;
package/dist/react.js CHANGED
@@ -1273,6 +1273,16 @@ var CartModule = class {
1273
1273
  this.client.emit("cart:updated", res.data);
1274
1274
  return res;
1275
1275
  }
1276
+ /** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
1277
+ async addItems(input) {
1278
+ const res = await this.client.request("POST", "/cart/items/batch", {
1279
+ body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity })) }
1280
+ });
1281
+ if (res.error) return res;
1282
+ if (res.data.newSessionToken) this.client.setCartSession(res.data.newSessionToken);
1283
+ this.client.emit("cart:updated", res.data);
1284
+ return res;
1285
+ }
1276
1286
  /**
1277
1287
  * Switch the CART currency server-side. The backend re-prices every line in
1278
1288
  * the new currency (no FX conversion: a product must have a price configured
@@ -2952,6 +2962,14 @@ function useCart(options) {
2952
2962
  await acceptCart(result);
2953
2963
  }
2954
2964
  });
2965
+ const addItemsMutation = (0, import_react_query12.useMutation)({
2966
+ mutationFn: (input) => unwrap(client.cart.addItems(input)),
2967
+ onMutate: cancelCartRead,
2968
+ onSuccess: async (result) => {
2969
+ if (result.newSessionToken) storage.set(STORAGE_KEYS.CART_SESSION, result.newSessionToken);
2970
+ await acceptCart(result);
2971
+ }
2972
+ });
2955
2973
  const updateMutation = (0, import_react_query12.useMutation)({
2956
2974
  mutationFn: async ({ itemId, quantity }) => {
2957
2975
  return unwrap(client.cart.updateQuantity(itemId, quantity));
@@ -3070,6 +3088,7 @@ function useCart(options) {
3070
3088
  error,
3071
3089
  // Actions
3072
3090
  addItem,
3091
+ addItems: addItemsMutation.mutateAsync,
3073
3092
  updateQuantity,
3074
3093
  removeItem,
3075
3094
  clear,
@@ -3083,7 +3102,7 @@ function useCart(options) {
3083
3102
  itemCount: cart?.itemCount ?? 0,
3084
3103
  isEmpty: !cart || cart.items.length === 0 && (cart.bundleLines?.length ?? 0) === 0,
3085
3104
  // Mutation states
3086
- isAdding: addMutation.isPending,
3105
+ isAdding: addMutation.isPending || addItemsMutation.isPending,
3087
3106
  isUpdating: updateMutation.isPending,
3088
3107
  isRemoving: removeMutation.isPending,
3089
3108
  isUpdatingBundle: addBundleMutation.isPending || updateBundleMutation.isPending || removeBundleMutation.isPending
package/dist/react.mjs CHANGED
@@ -1150,6 +1150,16 @@ var CartModule = class {
1150
1150
  this.client.emit("cart:updated", res.data);
1151
1151
  return res;
1152
1152
  }
1153
+ /** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
1154
+ async addItems(input) {
1155
+ const res = await this.client.request("POST", "/cart/items/batch", {
1156
+ body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity })) }
1157
+ });
1158
+ if (res.error) return res;
1159
+ if (res.data.newSessionToken) this.client.setCartSession(res.data.newSessionToken);
1160
+ this.client.emit("cart:updated", res.data);
1161
+ return res;
1162
+ }
1153
1163
  /**
1154
1164
  * Switch the CART currency server-side. The backend re-prices every line in
1155
1165
  * the new currency (no FX conversion: a product must have a price configured
@@ -2829,6 +2839,14 @@ function useCart(options) {
2829
2839
  await acceptCart(result);
2830
2840
  }
2831
2841
  });
2842
+ const addItemsMutation = useMutation({
2843
+ mutationFn: (input) => unwrap(client.cart.addItems(input)),
2844
+ onMutate: cancelCartRead,
2845
+ onSuccess: async (result) => {
2846
+ if (result.newSessionToken) storage.set(STORAGE_KEYS.CART_SESSION, result.newSessionToken);
2847
+ await acceptCart(result);
2848
+ }
2849
+ });
2832
2850
  const updateMutation = useMutation({
2833
2851
  mutationFn: async ({ itemId, quantity }) => {
2834
2852
  return unwrap(client.cart.updateQuantity(itemId, quantity));
@@ -2947,6 +2965,7 @@ function useCart(options) {
2947
2965
  error,
2948
2966
  // Actions
2949
2967
  addItem,
2968
+ addItems: addItemsMutation.mutateAsync,
2950
2969
  updateQuantity,
2951
2970
  removeItem,
2952
2971
  clear,
@@ -2960,7 +2979,7 @@ function useCart(options) {
2960
2979
  itemCount: cart?.itemCount ?? 0,
2961
2980
  isEmpty: !cart || cart.items.length === 0 && (cart.bundleLines?.length ?? 0) === 0,
2962
2981
  // Mutation states
2963
- isAdding: addMutation.isPending,
2982
+ isAdding: addMutation.isPending || addItemsMutation.isPending,
2964
2983
  isUpdating: updateMutation.isPending,
2965
2984
  isRemoving: removeMutation.isPending,
2966
2985
  isUpdatingBundle: addBundleMutation.isPending || updateBundleMutation.isPending || removeBundleMutation.isPending
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@behio/storefront-sdk",
3
- "version": "2.26.0",
3
+ "version": "2.27.0",
4
4
  "description": "TypeScript SDK for Behio headless e-commerce: core client + React hooks",
5
5
  "author": "Behio",
6
6
  "license": "MIT",