@behio/storefront-sdk 2.5.0 → 2.5.1
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/dist/{chunk-XVKKDVOO.js → chunk-AD2VKVVM.js} +4 -1
- package/dist/{chunk-5WHX5QA4.mjs → chunk-L5QBTEJ4.mjs} +4 -1
- package/dist/{client-B2eSpsfP.d.mts → client-DEE8yg6v.d.mts} +5 -1
- package/dist/{client-B2eSpsfP.d.ts → client-DEE8yg6v.d.ts} +5 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/dist/next.d.mts +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +2 -2
- package/dist/next.mjs +1 -1
- package/dist/react.d.mts +5 -1
- package/dist/react.d.ts +5 -1
- package/dist/react.js +4 -1
- package/dist/react.mjs +4 -1
- package/package.json +1 -1
|
@@ -1307,9 +1307,12 @@ var CartModule = class {
|
|
|
1307
1307
|
* visitor; the storefront handles `/cart/link/<token>`, calls this on the
|
|
1308
1308
|
* server (Server Action or route handler, so the session cookie can be
|
|
1309
1309
|
* written) and redirects to checkout. Items are ADDED, never replacing the
|
|
1310
|
-
* cart;
|
|
1310
|
+
* cart; repeated and concurrent claims raise each quantity to at least the
|
|
1311
|
+
* link target, never add a previously calculated delta. A discount code
|
|
1311
1312
|
* carried by the link is applied with the normal validation. An expired or
|
|
1312
1313
|
* unknown link fails with `be.storefront.cartLinkExpired` (404).
|
|
1314
|
+
* Other failures need retry, not an expiry notice. Check linkSkippedItems
|
|
1315
|
+
* and linkDiscountCode/linkDiscountApplied before redirecting to checkout.
|
|
1313
1316
|
*/
|
|
1314
1317
|
async claimLink(token) {
|
|
1315
1318
|
const res = await this.client.request("POST", `/cart/links/${encodeURIComponent(token)}/claim`, {});
|
|
@@ -1307,9 +1307,12 @@ var CartModule = class {
|
|
|
1307
1307
|
* visitor; the storefront handles `/cart/link/<token>`, calls this on the
|
|
1308
1308
|
* server (Server Action or route handler, so the session cookie can be
|
|
1309
1309
|
* written) and redirects to checkout. Items are ADDED, never replacing the
|
|
1310
|
-
* cart;
|
|
1310
|
+
* cart; repeated and concurrent claims raise each quantity to at least the
|
|
1311
|
+
* link target, never add a previously calculated delta. A discount code
|
|
1311
1312
|
* carried by the link is applied with the normal validation. An expired or
|
|
1312
1313
|
* unknown link fails with `be.storefront.cartLinkExpired` (404).
|
|
1314
|
+
* Other failures need retry, not an expiry notice. Check linkSkippedItems
|
|
1315
|
+
* and linkDiscountCode/linkDiscountApplied before redirecting to checkout.
|
|
1313
1316
|
*/
|
|
1314
1317
|
async claimLink(token) {
|
|
1315
1318
|
const res = await this.client.request("POST", `/cart/links/${encodeURIComponent(token)}/claim`, {});
|
|
@@ -2873,6 +2873,7 @@ interface CartLinkClaimed extends Cart {
|
|
|
2873
2873
|
linkSkippedItems: number;
|
|
2874
2874
|
/** A discount code carried by the link was applied. */
|
|
2875
2875
|
linkDiscountApplied: boolean;
|
|
2876
|
+
/** Code carried by the link, including a refused code. Null means no code was offered. */
|
|
2876
2877
|
linkDiscountCode: string | null;
|
|
2877
2878
|
}
|
|
2878
2879
|
|
|
@@ -3379,9 +3380,12 @@ declare class CartModule {
|
|
|
3379
3380
|
* visitor; the storefront handles `/cart/link/<token>`, calls this on the
|
|
3380
3381
|
* server (Server Action or route handler, so the session cookie can be
|
|
3381
3382
|
* written) and redirects to checkout. Items are ADDED, never replacing the
|
|
3382
|
-
* cart;
|
|
3383
|
+
* cart; repeated and concurrent claims raise each quantity to at least the
|
|
3384
|
+
* link target, never add a previously calculated delta. A discount code
|
|
3383
3385
|
* carried by the link is applied with the normal validation. An expired or
|
|
3384
3386
|
* unknown link fails with `be.storefront.cartLinkExpired` (404).
|
|
3387
|
+
* Other failures need retry, not an expiry notice. Check linkSkippedItems
|
|
3388
|
+
* and linkDiscountCode/linkDiscountApplied before redirecting to checkout.
|
|
3385
3389
|
*/
|
|
3386
3390
|
claimLink(token: string): Promise<SdkResult<CartLinkClaimed>>;
|
|
3387
3391
|
/** Remove discount code */
|
|
@@ -2873,6 +2873,7 @@ interface CartLinkClaimed extends Cart {
|
|
|
2873
2873
|
linkSkippedItems: number;
|
|
2874
2874
|
/** A discount code carried by the link was applied. */
|
|
2875
2875
|
linkDiscountApplied: boolean;
|
|
2876
|
+
/** Code carried by the link, including a refused code. Null means no code was offered. */
|
|
2876
2877
|
linkDiscountCode: string | null;
|
|
2877
2878
|
}
|
|
2878
2879
|
|
|
@@ -3379,9 +3380,12 @@ declare class CartModule {
|
|
|
3379
3380
|
* visitor; the storefront handles `/cart/link/<token>`, calls this on the
|
|
3380
3381
|
* server (Server Action or route handler, so the session cookie can be
|
|
3381
3382
|
* written) and redirects to checkout. Items are ADDED, never replacing the
|
|
3382
|
-
* cart;
|
|
3383
|
+
* cart; repeated and concurrent claims raise each quantity to at least the
|
|
3384
|
+
* link target, never add a previously calculated delta. A discount code
|
|
3383
3385
|
* carried by the link is applied with the normal validation. An expired or
|
|
3384
3386
|
* unknown link fails with `be.storefront.cartLinkExpired` (404).
|
|
3387
|
+
* Other failures need retry, not an expiry notice. Check linkSkippedItems
|
|
3388
|
+
* and linkDiscountCode/linkDiscountApplied before redirecting to checkout.
|
|
3385
3389
|
*/
|
|
3386
3390
|
claimLink(token: string): Promise<SdkResult<CartLinkClaimed>>;
|
|
3387
3391
|
/** Remove discount code */
|
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-
|
|
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 Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartLinkClaimed, K as CartPromotion, L as CartSummaryEvent, M as Category, N as CategoryDetail, O as CertificateVerification, Q as CheckoutAddress, R as CheckoutInput, T as CheckoutPaymentMethod, U as CheckoutPreview, V as CheckoutResult, W as CheckoutSettings, X as CookieConsentInput, Y as CourseAttachment, Z as CourseCertificate, _ as CourseComment, $ as CourseCommentReply, a0 as CourseCommentsList, a1 as CourseDetail, a2 as CourseLesson, a3 as CourseListItem, a4 as CourseModule, a5 as CoursePostedComment, a6 as CourseProgress, a7 as CourseTutorMessage, a8 as CourseTutorThread, a9 as CrossSellItem, aa as CurrencyDisplayFormat, ab as CustomerAddress, ac as CustomerProfile, ad as DigitalDownload, ae as DownloadUrl, af as Facet, ag as FacetAvailability, ah as FacetCategory, ai as FacetLabel, aj as FacetPriceRange, ak as FacetRange, al as FacetRatingBucket, am as FacetValue, an as FacetsResponse, ao as FilterField, ap as FulfillmentStatus, aq as FulfillmentStatuses, ar as GiftCardBalance, as as GiftCardPurchaseInput, at as GiftCardPurchaseResult, au as GiftCardSummary, av as LessonNote, aw as LessonQuiz, ax as LoginInput, ay as LoyaltyBalance, az as LoyaltyNextTier, aA as LoyaltyProgram, aB as LoyaltySummary, aC as LoyaltyTier, aD as LoyaltyTierPerks, aE as LoyaltyTransaction, aF as Menu, aG as MenuItem, aH as MenuItemRef, aI as MenuItemType, aJ as MessageResponse, aK as NewsletterOptInDefault, aL as NewsletterSubscribeInput, aM as NewsletterSubscribeResult, aN as NewsletterUnsubscribeResult, aO as OrderAccessRequestResponse, aP as OrderAccessVerifyResponse, aQ as OrderDetail, aR as OrderItem, aS as OrderListItem, aT as OrderStatus, aU as OrderStatusHistory, aV as OrderStatuses, aW as OrderTracking, aX as Page, aY as PageAttachment, aZ as PageDetail, a_ as PaginatedResponse, a$ as PaymentInstrument, b0 as PaymentStatus, b1 as PaymentStatuses, b2 as PaymentSwift, b3 as PickupPoint, b4 as PickupPointHours, b5 as PickupPointsInput, b6 as PickupWidgetConfig, b7 as PriceDisplay, b8 as ProductAssetGroup, b9 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, bA as RequestInterceptor, bB as RequestInterceptorConfig, bC as ResponseInterceptor, bD as ResponseInterceptorData, bE as ReturnRequest, bF as ReturnRequestItem, bG as ReturnStatus, bH as ReturnStatusItem, bI as ReturnableOrder, bJ as ReturnableOrderItem, bK as SdkError, bL as ShippingMethodSummary, bM as ShippingQuote, bN as ShippingQuoteInput, bO as ShopAppearance, bP as ShopInfo, bQ as ShopScript, bR as ShopScriptPlacement, bS as ShopScriptType, bT as ShopScripts, bU as ShopSeo, bV as ShopSeoIdentity, bW as SiteFormField, bX as SiteFormFieldOption, bY as SiteFormFieldType, bZ as Sitemap, b_ as SitemapEntry, b$ as StockBehavior, c0 as StockMode, c1 as StorefrontForm, c2 as StorefrontFormFieldErrorCode, c3 as StorefrontFormFile, c4 as StorefrontFormSettings, c5 as StorefrontFormSubmitInput, c6 as StorefrontFormSubmitResult, c7 as StorefrontFormUpload, c8 as SubmitQuoteInput, c9 as SubmitReturnInput, ca as SubmitReviewInput, cb as Subscription, cc as SubscriptionAction, cd as SubscriptionFrequency, ce as SubscriptionItem, cf as SubscriptionStatus, cg as TaxBreakdownLine, ch as VariantAxis, ci as VariantAxisValue, cj as WishlistItem, ck as err, cl as ok, cm as publishCartSummary, cn as toSdkError } from './client-
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-DEE8yg6v.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 Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartLinkClaimed, K as CartPromotion, L as CartSummaryEvent, M as Category, N as CategoryDetail, O as CertificateVerification, Q as CheckoutAddress, R as CheckoutInput, T as CheckoutPaymentMethod, U as CheckoutPreview, V as CheckoutResult, W as CheckoutSettings, X as CookieConsentInput, Y as CourseAttachment, Z as CourseCertificate, _ as CourseComment, $ as CourseCommentReply, a0 as CourseCommentsList, a1 as CourseDetail, a2 as CourseLesson, a3 as CourseListItem, a4 as CourseModule, a5 as CoursePostedComment, a6 as CourseProgress, a7 as CourseTutorMessage, a8 as CourseTutorThread, a9 as CrossSellItem, aa as CurrencyDisplayFormat, ab as CustomerAddress, ac as CustomerProfile, ad as DigitalDownload, ae as DownloadUrl, af as Facet, ag as FacetAvailability, ah as FacetCategory, ai as FacetLabel, aj as FacetPriceRange, ak as FacetRange, al as FacetRatingBucket, am as FacetValue, an as FacetsResponse, ao as FilterField, ap as FulfillmentStatus, aq as FulfillmentStatuses, ar as GiftCardBalance, as as GiftCardPurchaseInput, at as GiftCardPurchaseResult, au as GiftCardSummary, av as LessonNote, aw as LessonQuiz, ax as LoginInput, ay as LoyaltyBalance, az as LoyaltyNextTier, aA as LoyaltyProgram, aB as LoyaltySummary, aC as LoyaltyTier, aD as LoyaltyTierPerks, aE as LoyaltyTransaction, aF as Menu, aG as MenuItem, aH as MenuItemRef, aI as MenuItemType, aJ as MessageResponse, aK as NewsletterOptInDefault, aL as NewsletterSubscribeInput, aM as NewsletterSubscribeResult, aN as NewsletterUnsubscribeResult, aO as OrderAccessRequestResponse, aP as OrderAccessVerifyResponse, aQ as OrderDetail, aR as OrderItem, aS as OrderListItem, aT as OrderStatus, aU as OrderStatusHistory, aV as OrderStatuses, aW as OrderTracking, aX as Page, aY as PageAttachment, aZ as PageDetail, a_ as PaginatedResponse, a$ as PaymentInstrument, b0 as PaymentStatus, b1 as PaymentStatuses, b2 as PaymentSwift, b3 as PickupPoint, b4 as PickupPointHours, b5 as PickupPointsInput, b6 as PickupWidgetConfig, b7 as PriceDisplay, b8 as ProductAssetGroup, b9 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, bA as RequestInterceptor, bB as RequestInterceptorConfig, bC as ResponseInterceptor, bD as ResponseInterceptorData, bE as ReturnRequest, bF as ReturnRequestItem, bG as ReturnStatus, bH as ReturnStatusItem, bI as ReturnableOrder, bJ as ReturnableOrderItem, bK as SdkError, bL as ShippingMethodSummary, bM as ShippingQuote, bN as ShippingQuoteInput, bO as ShopAppearance, bP as ShopInfo, bQ as ShopScript, bR as ShopScriptPlacement, bS as ShopScriptType, bT as ShopScripts, bU as ShopSeo, bV as ShopSeoIdentity, bW as SiteFormField, bX as SiteFormFieldOption, bY as SiteFormFieldType, bZ as Sitemap, b_ as SitemapEntry, b$ as StockBehavior, c0 as StockMode, c1 as StorefrontForm, c2 as StorefrontFormFieldErrorCode, c3 as StorefrontFormFile, c4 as StorefrontFormSettings, c5 as StorefrontFormSubmitInput, c6 as StorefrontFormSubmitResult, c7 as StorefrontFormUpload, c8 as SubmitQuoteInput, c9 as SubmitReturnInput, ca as SubmitReviewInput, cb as Subscription, cc as SubscriptionAction, cd as SubscriptionFrequency, ce as SubscriptionItem, cf as SubscriptionStatus, cg as TaxBreakdownLine, ch as VariantAxis, ci as VariantAxisValue, cj as WishlistItem, ck as err, cl as ok, cm as publishCartSummary, cn as toSdkError } from './client-DEE8yg6v.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-
|
|
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 Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartLinkClaimed, K as CartPromotion, L as CartSummaryEvent, M as Category, N as CategoryDetail, O as CertificateVerification, Q as CheckoutAddress, R as CheckoutInput, T as CheckoutPaymentMethod, U as CheckoutPreview, V as CheckoutResult, W as CheckoutSettings, X as CookieConsentInput, Y as CourseAttachment, Z as CourseCertificate, _ as CourseComment, $ as CourseCommentReply, a0 as CourseCommentsList, a1 as CourseDetail, a2 as CourseLesson, a3 as CourseListItem, a4 as CourseModule, a5 as CoursePostedComment, a6 as CourseProgress, a7 as CourseTutorMessage, a8 as CourseTutorThread, a9 as CrossSellItem, aa as CurrencyDisplayFormat, ab as CustomerAddress, ac as CustomerProfile, ad as DigitalDownload, ae as DownloadUrl, af as Facet, ag as FacetAvailability, ah as FacetCategory, ai as FacetLabel, aj as FacetPriceRange, ak as FacetRange, al as FacetRatingBucket, am as FacetValue, an as FacetsResponse, ao as FilterField, ap as FulfillmentStatus, aq as FulfillmentStatuses, ar as GiftCardBalance, as as GiftCardPurchaseInput, at as GiftCardPurchaseResult, au as GiftCardSummary, av as LessonNote, aw as LessonQuiz, ax as LoginInput, ay as LoyaltyBalance, az as LoyaltyNextTier, aA as LoyaltyProgram, aB as LoyaltySummary, aC as LoyaltyTier, aD as LoyaltyTierPerks, aE as LoyaltyTransaction, aF as Menu, aG as MenuItem, aH as MenuItemRef, aI as MenuItemType, aJ as MessageResponse, aK as NewsletterOptInDefault, aL as NewsletterSubscribeInput, aM as NewsletterSubscribeResult, aN as NewsletterUnsubscribeResult, aO as OrderAccessRequestResponse, aP as OrderAccessVerifyResponse, aQ as OrderDetail, aR as OrderItem, aS as OrderListItem, aT as OrderStatus, aU as OrderStatusHistory, aV as OrderStatuses, aW as OrderTracking, aX as Page, aY as PageAttachment, aZ as PageDetail, a_ as PaginatedResponse, a$ as PaymentInstrument, b0 as PaymentStatus, b1 as PaymentStatuses, b2 as PaymentSwift, b3 as PickupPoint, b4 as PickupPointHours, b5 as PickupPointsInput, b6 as PickupWidgetConfig, b7 as PriceDisplay, b8 as ProductAssetGroup, b9 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, bA as RequestInterceptor, bB as RequestInterceptorConfig, bC as ResponseInterceptor, bD as ResponseInterceptorData, bE as ReturnRequest, bF as ReturnRequestItem, bG as ReturnStatus, bH as ReturnStatusItem, bI as ReturnableOrder, bJ as ReturnableOrderItem, bK as SdkError, bL as ShippingMethodSummary, bM as ShippingQuote, bN as ShippingQuoteInput, bO as ShopAppearance, bP as ShopInfo, bQ as ShopScript, bR as ShopScriptPlacement, bS as ShopScriptType, bT as ShopScripts, bU as ShopSeo, bV as ShopSeoIdentity, bW as SiteFormField, bX as SiteFormFieldOption, bY as SiteFormFieldType, bZ as Sitemap, b_ as SitemapEntry, b$ as StockBehavior, c0 as StockMode, c1 as StorefrontForm, c2 as StorefrontFormFieldErrorCode, c3 as StorefrontFormFile, c4 as StorefrontFormSettings, c5 as StorefrontFormSubmitInput, c6 as StorefrontFormSubmitResult, c7 as StorefrontFormUpload, c8 as SubmitQuoteInput, c9 as SubmitReturnInput, ca as SubmitReviewInput, cb as Subscription, cc as SubscriptionAction, cd as SubscriptionFrequency, ce as SubscriptionItem, cf as SubscriptionStatus, cg as TaxBreakdownLine, ch as VariantAxis, ci as VariantAxisValue, cj as WishlistItem, ck as err, cl as ok, cm as publishCartSummary, cn as toSdkError } from './client-
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-DEE8yg6v.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 Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartLinkClaimed, K as CartPromotion, L as CartSummaryEvent, M as Category, N as CategoryDetail, O as CertificateVerification, Q as CheckoutAddress, R as CheckoutInput, T as CheckoutPaymentMethod, U as CheckoutPreview, V as CheckoutResult, W as CheckoutSettings, X as CookieConsentInput, Y as CourseAttachment, Z as CourseCertificate, _ as CourseComment, $ as CourseCommentReply, a0 as CourseCommentsList, a1 as CourseDetail, a2 as CourseLesson, a3 as CourseListItem, a4 as CourseModule, a5 as CoursePostedComment, a6 as CourseProgress, a7 as CourseTutorMessage, a8 as CourseTutorThread, a9 as CrossSellItem, aa as CurrencyDisplayFormat, ab as CustomerAddress, ac as CustomerProfile, ad as DigitalDownload, ae as DownloadUrl, af as Facet, ag as FacetAvailability, ah as FacetCategory, ai as FacetLabel, aj as FacetPriceRange, ak as FacetRange, al as FacetRatingBucket, am as FacetValue, an as FacetsResponse, ao as FilterField, ap as FulfillmentStatus, aq as FulfillmentStatuses, ar as GiftCardBalance, as as GiftCardPurchaseInput, at as GiftCardPurchaseResult, au as GiftCardSummary, av as LessonNote, aw as LessonQuiz, ax as LoginInput, ay as LoyaltyBalance, az as LoyaltyNextTier, aA as LoyaltyProgram, aB as LoyaltySummary, aC as LoyaltyTier, aD as LoyaltyTierPerks, aE as LoyaltyTransaction, aF as Menu, aG as MenuItem, aH as MenuItemRef, aI as MenuItemType, aJ as MessageResponse, aK as NewsletterOptInDefault, aL as NewsletterSubscribeInput, aM as NewsletterSubscribeResult, aN as NewsletterUnsubscribeResult, aO as OrderAccessRequestResponse, aP as OrderAccessVerifyResponse, aQ as OrderDetail, aR as OrderItem, aS as OrderListItem, aT as OrderStatus, aU as OrderStatusHistory, aV as OrderStatuses, aW as OrderTracking, aX as Page, aY as PageAttachment, aZ as PageDetail, a_ as PaginatedResponse, a$ as PaymentInstrument, b0 as PaymentStatus, b1 as PaymentStatuses, b2 as PaymentSwift, b3 as PickupPoint, b4 as PickupPointHours, b5 as PickupPointsInput, b6 as PickupWidgetConfig, b7 as PriceDisplay, b8 as ProductAssetGroup, b9 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, bA as RequestInterceptor, bB as RequestInterceptorConfig, bC as ResponseInterceptor, bD as ResponseInterceptorData, bE as ReturnRequest, bF as ReturnRequestItem, bG as ReturnStatus, bH as ReturnStatusItem, bI as ReturnableOrder, bJ as ReturnableOrderItem, bK as SdkError, bL as ShippingMethodSummary, bM as ShippingQuote, bN as ShippingQuoteInput, bO as ShopAppearance, bP as ShopInfo, bQ as ShopScript, bR as ShopScriptPlacement, bS as ShopScriptType, bT as ShopScripts, bU as ShopSeo, bV as ShopSeoIdentity, bW as SiteFormField, bX as SiteFormFieldOption, bY as SiteFormFieldType, bZ as Sitemap, b_ as SitemapEntry, b$ as StockBehavior, c0 as StockMode, c1 as StorefrontForm, c2 as StorefrontFormFieldErrorCode, c3 as StorefrontFormFile, c4 as StorefrontFormSettings, c5 as StorefrontFormSubmitInput, c6 as StorefrontFormSubmitResult, c7 as StorefrontFormUpload, c8 as SubmitQuoteInput, c9 as SubmitReturnInput, ca as SubmitReviewInput, cb as Subscription, cc as SubscriptionAction, cd as SubscriptionFrequency, ce as SubscriptionItem, cf as SubscriptionStatus, cg as TaxBreakdownLine, ch as VariantAxis, ci as VariantAxisValue, cj as WishlistItem, ck as err, cl as ok, cm as publishCartSummary, cn as toSdkError } from './client-DEE8yg6v.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkAD2VKVVMjs = require('./chunk-AD2VKVVM.js');
|
|
15
15
|
|
|
16
16
|
// src/react/utils/format-price.ts
|
|
17
17
|
function formatPrice(amount, currency, locale, display) {
|
|
@@ -949,7 +949,7 @@ var GENERIC = {
|
|
|
949
949
|
en: "Something went wrong, please try again."
|
|
950
950
|
};
|
|
951
951
|
function bodyOf(err2) {
|
|
952
|
-
const body = err2 instanceof
|
|
952
|
+
const body = err2 instanceof _chunkAD2VKVVMjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
|
|
953
953
|
return body && typeof body === "object" ? body : null;
|
|
954
954
|
}
|
|
955
955
|
function errorCode(err2) {
|
|
@@ -1062,4 +1062,4 @@ function formFieldErrors(err2) {
|
|
|
1062
1062
|
|
|
1063
1063
|
|
|
1064
1064
|
|
|
1065
|
-
exports.AddressTypes =
|
|
1065
|
+
exports.AddressTypes = _chunkAD2VKVVMjs.AddressTypes; exports.BehioApiError = _chunkAD2VKVVMjs.BehioApiError; exports.BehioNetworkError = _chunkAD2VKVVMjs.BehioNetworkError; exports.BehioStorefront = _chunkAD2VKVVMjs.BehioStorefront; exports.FulfillmentStatuses = _chunkAD2VKVVMjs.FulfillmentStatuses; exports.OrderStatuses = _chunkAD2VKVVMjs.OrderStatuses; exports.PaymentStatuses = _chunkAD2VKVVMjs.PaymentStatuses; exports.ProductSort = _chunkAD2VKVVMjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.err = _chunkAD2VKVVMjs.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 = _chunkAD2VKVVMjs.ok; exports.publishCartSummary = _chunkAD2VKVVMjs.publishCartSummary; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkAD2VKVVMjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
|
package/dist/index.mjs
CHANGED
package/dist/next.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-
|
|
1
|
+
import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-DEE8yg6v.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-
|
|
1
|
+
import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-DEE8yg6v.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
|
|
3
|
+
var _chunkAD2VKVVMjs = require('./chunk-AD2VKVVM.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,
|
|
22
|
+
const client = new (0, _chunkAD2VKVVMjs.BehioStorefront)({
|
|
23
23
|
apiKey,
|
|
24
24
|
...baseUrl ? { baseUrl } : {},
|
|
25
25
|
...locale ? { locale } : {},
|
package/dist/next.mjs
CHANGED
package/dist/react.d.mts
CHANGED
|
@@ -2883,6 +2883,7 @@ interface CartLinkClaimed extends Cart {
|
|
|
2883
2883
|
linkSkippedItems: number;
|
|
2884
2884
|
/** A discount code carried by the link was applied. */
|
|
2885
2885
|
linkDiscountApplied: boolean;
|
|
2886
|
+
/** Code carried by the link, including a refused code. Null means no code was offered. */
|
|
2886
2887
|
linkDiscountCode: string | null;
|
|
2887
2888
|
}
|
|
2888
2889
|
|
|
@@ -3389,9 +3390,12 @@ declare class CartModule {
|
|
|
3389
3390
|
* visitor; the storefront handles `/cart/link/<token>`, calls this on the
|
|
3390
3391
|
* server (Server Action or route handler, so the session cookie can be
|
|
3391
3392
|
* written) and redirects to checkout. Items are ADDED, never replacing the
|
|
3392
|
-
* cart;
|
|
3393
|
+
* cart; repeated and concurrent claims raise each quantity to at least the
|
|
3394
|
+
* link target, never add a previously calculated delta. A discount code
|
|
3393
3395
|
* carried by the link is applied with the normal validation. An expired or
|
|
3394
3396
|
* unknown link fails with `be.storefront.cartLinkExpired` (404).
|
|
3397
|
+
* Other failures need retry, not an expiry notice. Check linkSkippedItems
|
|
3398
|
+
* and linkDiscountCode/linkDiscountApplied before redirecting to checkout.
|
|
3395
3399
|
*/
|
|
3396
3400
|
claimLink(token: string): Promise<SdkResult<CartLinkClaimed>>;
|
|
3397
3401
|
/** Remove discount code */
|
package/dist/react.d.ts
CHANGED
|
@@ -2883,6 +2883,7 @@ interface CartLinkClaimed extends Cart {
|
|
|
2883
2883
|
linkSkippedItems: number;
|
|
2884
2884
|
/** A discount code carried by the link was applied. */
|
|
2885
2885
|
linkDiscountApplied: boolean;
|
|
2886
|
+
/** Code carried by the link, including a refused code. Null means no code was offered. */
|
|
2886
2887
|
linkDiscountCode: string | null;
|
|
2887
2888
|
}
|
|
2888
2889
|
|
|
@@ -3389,9 +3390,12 @@ declare class CartModule {
|
|
|
3389
3390
|
* visitor; the storefront handles `/cart/link/<token>`, calls this on the
|
|
3390
3391
|
* server (Server Action or route handler, so the session cookie can be
|
|
3391
3392
|
* written) and redirects to checkout. Items are ADDED, never replacing the
|
|
3392
|
-
* cart;
|
|
3393
|
+
* cart; repeated and concurrent claims raise each quantity to at least the
|
|
3394
|
+
* link target, never add a previously calculated delta. A discount code
|
|
3393
3395
|
* carried by the link is applied with the normal validation. An expired or
|
|
3394
3396
|
* unknown link fails with `be.storefront.cartLinkExpired` (404).
|
|
3397
|
+
* Other failures need retry, not an expiry notice. Check linkSkippedItems
|
|
3398
|
+
* and linkDiscountCode/linkDiscountApplied before redirecting to checkout.
|
|
3395
3399
|
*/
|
|
3396
3400
|
claimLink(token: string): Promise<SdkResult<CartLinkClaimed>>;
|
|
3397
3401
|
/** Remove discount code */
|
package/dist/react.js
CHANGED
|
@@ -1386,9 +1386,12 @@ var CartModule = class {
|
|
|
1386
1386
|
* visitor; the storefront handles `/cart/link/<token>`, calls this on the
|
|
1387
1387
|
* server (Server Action or route handler, so the session cookie can be
|
|
1388
1388
|
* written) and redirects to checkout. Items are ADDED, never replacing the
|
|
1389
|
-
* cart;
|
|
1389
|
+
* cart; repeated and concurrent claims raise each quantity to at least the
|
|
1390
|
+
* link target, never add a previously calculated delta. A discount code
|
|
1390
1391
|
* carried by the link is applied with the normal validation. An expired or
|
|
1391
1392
|
* unknown link fails with `be.storefront.cartLinkExpired` (404).
|
|
1393
|
+
* Other failures need retry, not an expiry notice. Check linkSkippedItems
|
|
1394
|
+
* and linkDiscountCode/linkDiscountApplied before redirecting to checkout.
|
|
1392
1395
|
*/
|
|
1393
1396
|
async claimLink(token) {
|
|
1394
1397
|
const res = await this.client.request("POST", `/cart/links/${encodeURIComponent(token)}/claim`, {});
|
package/dist/react.mjs
CHANGED
|
@@ -1276,9 +1276,12 @@ var CartModule = class {
|
|
|
1276
1276
|
* visitor; the storefront handles `/cart/link/<token>`, calls this on the
|
|
1277
1277
|
* server (Server Action or route handler, so the session cookie can be
|
|
1278
1278
|
* written) and redirects to checkout. Items are ADDED, never replacing the
|
|
1279
|
-
* cart;
|
|
1279
|
+
* cart; repeated and concurrent claims raise each quantity to at least the
|
|
1280
|
+
* link target, never add a previously calculated delta. A discount code
|
|
1280
1281
|
* carried by the link is applied with the normal validation. An expired or
|
|
1281
1282
|
* unknown link fails with `be.storefront.cartLinkExpired` (404).
|
|
1283
|
+
* Other failures need retry, not an expiry notice. Check linkSkippedItems
|
|
1284
|
+
* and linkDiscountCode/linkDiscountApplied before redirecting to checkout.
|
|
1282
1285
|
*/
|
|
1283
1286
|
async claimLink(token) {
|
|
1284
1287
|
const res = await this.client.request("POST", `/cart/links/${encodeURIComponent(token)}/claim`, {});
|