@behio/storefront-sdk 2.31.0 → 2.32.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.
@@ -1957,14 +1957,15 @@ var FormsModule = class {
1957
1957
  this.client = client;
1958
1958
  }
1959
1959
  /** Only active, published placements. Internal delivery/CRM settings never leave the server. */
1960
- async placements() {
1961
- return this.client.request("GET", "/forms");
1960
+ async placements(locale) {
1961
+ return this.client.request("GET", "/forms", { query: { locale } });
1962
1962
  }
1963
1963
  /** Public definition of one form (fields + settings). 404 for an unknown or inactive slug. */
1964
- async get(slug) {
1964
+ async get(slug, locale) {
1965
1965
  return this.client.request(
1966
1966
  "GET",
1967
- `/forms/${encodeURIComponent(slug)}`
1967
+ `/forms/${encodeURIComponent(slug)}`,
1968
+ { query: { locale } }
1968
1969
  );
1969
1970
  }
1970
1971
  /**
@@ -1957,14 +1957,15 @@ var FormsModule = class {
1957
1957
  this.client = client;
1958
1958
  }
1959
1959
  /** Only active, published placements. Internal delivery/CRM settings never leave the server. */
1960
- async placements() {
1961
- return this.client.request("GET", "/forms");
1960
+ async placements(locale) {
1961
+ return this.client.request("GET", "/forms", { query: { locale } });
1962
1962
  }
1963
1963
  /** Public definition of one form (fields + settings). 404 for an unknown or inactive slug. */
1964
- async get(slug) {
1964
+ async get(slug, locale) {
1965
1965
  return this.client.request(
1966
1966
  "GET",
1967
- `/forms/${encodeURIComponent(slug)}`
1967
+ `/forms/${encodeURIComponent(slug)}`,
1968
+ { query: { locale } }
1968
1969
  );
1969
1970
  }
1970
1971
  /**
@@ -4467,11 +4467,11 @@ declare class FormsModule {
4467
4467
  private client;
4468
4468
  constructor(client: BehioStorefront);
4469
4469
  /** Only active, published placements. Internal delivery/CRM settings never leave the server. */
4470
- placements(): Promise<SdkResult<{
4470
+ placements(locale?: string): Promise<SdkResult<{
4471
4471
  items: StorefrontForm[];
4472
4472
  }>>;
4473
4473
  /** Public definition of one form (fields + settings). 404 for an unknown or inactive slug. */
4474
- get(slug: string): Promise<SdkResult<StorefrontForm>>;
4474
+ get(slug: string, locale?: string): Promise<SdkResult<StorefrontForm>>;
4475
4475
  /**
4476
4476
  * Submit a response. On `be.forms.validationFailed` the returned error
4477
4477
  * carries per-field codes: read them with `formFieldErrors(error)`. Other
@@ -4467,11 +4467,11 @@ declare class FormsModule {
4467
4467
  private client;
4468
4468
  constructor(client: BehioStorefront);
4469
4469
  /** Only active, published placements. Internal delivery/CRM settings never leave the server. */
4470
- placements(): Promise<SdkResult<{
4470
+ placements(locale?: string): Promise<SdkResult<{
4471
4471
  items: StorefrontForm[];
4472
4472
  }>>;
4473
4473
  /** Public definition of one form (fields + settings). 404 for an unknown or inactive slug. */
4474
- get(slug: string): Promise<SdkResult<StorefrontForm>>;
4474
+ get(slug: string, locale?: string): Promise<SdkResult<StorefrontForm>>;
4475
4475
  /**
4476
4476
  * Submit a response. On `be.forms.validationFailed` the returned error
4477
4477
  * carries per-field codes: read them with `formFieldErrors(error)`. Other
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, c as StorefrontFormPlacement } from './client-DeAREmgD.mjs';
2
- export { A as ActivePromotion, d as AddToCartInput, e as AddToCartItemsInput, f as AddressDetail, g as AddressSuggestion, h as AddressType, i as AddressTypes, j as AuthTokens, k as BackInStockSubscription, l as BadgeTone, m as BehioApiError, n as BehioErrorCode, o as BehioEventHandler, p as BehioEventType, q as BehioNetworkError, r as BehioStorefrontConfig, s as Blog, t as BlogPostDetail, u as BlogPostListItem, v as BlogPostsPage, w as BlogPostsQuery, x as BlogSettings, y as BlogTag, z as Booking, D as BookingCategory, E as BookingConfig, F as BookingCreateInput, G as BookingCreated, H as BookingLocale, I as BookingLocation, J as BookingManageSlotsQuery, K as BookingService, L as BookingSlot, M as BookingSlots, N as BookingSlotsQuery, O as BookingStaff, Q as BookingStatus, R as Bundle, T as BundleCatalogQuery, U as BundleItem, V as Cart, W as CartBundleLine, X as CartBundleLineItem, Y as CartDiscount, Z as CartItem, _ as CartItemProduct, $ as CartLinkClaimed, a0 as CartPromotion, a1 as CartSummaryEvent, a2 as Category, a3 as CategoryDetail, a4 as CertificateVerification, a5 as CheckoutAddress, a6 as CheckoutInput, a7 as CheckoutPaymentMethod, a8 as CheckoutPreview, a9 as CheckoutResult, aa as CheckoutSettings, ab as CookieConsentInput, ac as CourseAttachment, ad as CourseCertificate, ae as CourseComment, af as CourseCommentReply, ag as CourseCommentsList, ah as CourseDetail, ai as CourseLesson, aj as CourseListItem, ak as CourseModule, al as CoursePostedComment, am as CourseProgress, an as CourseTutorMessage, ao as CourseTutorThread, ap as CrossSellItem, aq as CurrencyDisplayFormat, ar as CustomerAddress, as as CustomerBadge, at as CustomerChallenge, au as CustomerGamification, av as CustomerGamificationQuery, aw as CustomerProfile, ax as DigitalDownload, ay as DownloadUrl, az as Facet, aA as FacetAvailability, aB as FacetCategory, aC as FacetLabel, aD as FacetPriceRange, aE as FacetRange, aF as FacetRatingBucket, aG as FacetValue, aH as FacetsResponse, aI as FilterField, aJ as FulfillmentStatus, aK as FulfillmentStatuses, aL as GamificationRefreshResult, aM as GiftCardBalance, aN as GiftCardPurchaseInput, aO as GiftCardPurchaseResult, aP as GiftCardSummary, aQ as LessonNote, aR as LessonQuiz, aS as LoginInput, aT as LoyaltyBalance, aU as LoyaltyNextTier, aV as LoyaltyProgram, aW as LoyaltyQuery, aX as LoyaltyReferralResult, aY as LoyaltySummary, aZ as LoyaltyTier, a_ as LoyaltyTierPerks, a$ as LoyaltyTransaction, b0 as Menu, b1 as MenuItem, b2 as MenuItemRef, b3 as MenuItemType, b4 as MessageResponse, b5 as NewsletterConfirmResult, b6 as NewsletterOptInDefault, b7 as NewsletterSubscribeInput, b8 as NewsletterSubscribeResult, b9 as NewsletterUnsubscribeInput, ba as NewsletterUnsubscribeResult, bb as OrderAccessRequestResponse, bc as OrderAccessVerifyResponse, bd as OrderDetail, be as OrderDiscount, bf as OrderDocument, bg as OrderItem, bh as OrderListItem, bi as OrderPaymentInstructions, bj as OrderPickupPoint, bk as OrderShipment, bl as OrderStatus, bm as OrderStatusHistory, bn as OrderStatuses, bo as OrderTracking, bp as Page, bq as PageAttachment, br as PageDetail, bs as PaginatedResponse, bt as PaymentInstrument, bu as PaymentStatus, bv as PaymentStatuses, bw as PaymentSwift, bx as PickupPoint, by as PickupPointHours, bz as PickupPointsInput, bA as PickupWidgetConfig, bB as PriceDisplay, bC as ProductAssetGroup, bD as ProductAssetItem, bE as ProductAvailability, bF as ProductGroup, bG as ProductLabel, bH as ProductListItem, bI as ProductMedia, bJ as ProductMediaVariant, bK as ProductParameter, bL as ProductParameterGroup, bM as ProductParametersResponse, bN as ProductPrice, bO as ProductPromotionSummary, bP as ProductReview, bQ as ProductReviewsResponse, bR as ProductSibling, bS as ProductSort, bT as ProductSortValue, bU as ProductVolumePrice, bV as ProductsQuery, bW as QuizAnswerInput, bX as QuizAnswerResult, bY as QuizQuestion, bZ as QuizResult, b_ as QuoteItem, b$ as QuoteRequest, c0 as RegisterInput, c1 as RegisterResult, c2 as RequestInterceptor, c3 as RequestInterceptorConfig, c4 as ResponseInterceptor, c5 as ResponseInterceptorData, c6 as ReturnRequest, c7 as ReturnRequestItem, c8 as ReturnStatus, c9 as ReturnStatusItem, ca as ReturnableOrder, cb as ReturnableOrderItem, cc as SdkError, cd as ShippingMethodSummary, ce as ShippingPublicConfig, cf as ShippingQuote, cg as ShippingQuoteInput, ch as ShopAppearance, ci as ShopCommerce, cj as ShopInfo, ck as ShopScript, cl as ShopScriptPlacement, cm as ShopScriptType, cn as ShopScripts, co as ShopSeo, cp as ShopSeoIdentity, cq as SiteFormField, cr as SiteFormFieldOption, cs as SiteFormFieldType, ct as Sitemap, cu as SitemapEntry, cv as StockBehavior, cw as StockMode, cx as StorefrontCollection, cy as StorefrontCollectionField, cz as StorefrontCollectionFieldType, cA as StorefrontCollectionItem, cB as StorefrontCollectionQuery, cC as StorefrontFaqGroup, cD as StorefrontFaqGroupSummary, cE as StorefrontFaqGroups, cF as StorefrontFaqItem, cG as StorefrontFaqQuery, cH as StorefrontForm, cI as StorefrontFormFieldErrorCode, cJ as StorefrontFormFile, cK as StorefrontFormPresentation, cL as StorefrontFormSettings, cM as StorefrontFormSubmitInput, cN as StorefrontFormSubmitResult, cO as StorefrontFormUpload, cP as SubmitQuoteInput, cQ as SubmitReturnInput, cR as SubmitReviewInput, cS as SubmitWithdrawalInput, cT as Subscription, cU as SubscriptionAction, cV as SubscriptionFrequency, cW as SubscriptionItem, cX as SubscriptionStatus, cY as TaxBreakdownLine, cZ as VariantAxis, c_ as VariantAxisValue, c$ as WishlistItem, d0 as WithdrawalAcknowledgement, d1 as WithdrawalFlag, d2 as WithdrawalSettings, d3 as WithdrawalWindow, d4 as clearCartSummary, d5 as err, d6 as ok, d7 as publishCartSummary, d8 as toSdkError } from './client-DeAREmgD.mjs';
1
+ import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError, c as StorefrontFormPlacement } from './client-Bpefn9PP.mjs';
2
+ export { A as ActivePromotion, d as AddToCartInput, e as AddToCartItemsInput, f as AddressDetail, g as AddressSuggestion, h as AddressType, i as AddressTypes, j as AuthTokens, k as BackInStockSubscription, l as BadgeTone, m as BehioApiError, n as BehioErrorCode, o as BehioEventHandler, p as BehioEventType, q as BehioNetworkError, r as BehioStorefrontConfig, s as Blog, t as BlogPostDetail, u as BlogPostListItem, v as BlogPostsPage, w as BlogPostsQuery, x as BlogSettings, y as BlogTag, z as Booking, D as BookingCategory, E as BookingConfig, F as BookingCreateInput, G as BookingCreated, H as BookingLocale, I as BookingLocation, J as BookingManageSlotsQuery, K as BookingService, L as BookingSlot, M as BookingSlots, N as BookingSlotsQuery, O as BookingStaff, Q as BookingStatus, R as Bundle, T as BundleCatalogQuery, U as BundleItem, V as Cart, W as CartBundleLine, X as CartBundleLineItem, Y as CartDiscount, Z as CartItem, _ as CartItemProduct, $ as CartLinkClaimed, a0 as CartPromotion, a1 as CartSummaryEvent, a2 as Category, a3 as CategoryDetail, a4 as CertificateVerification, a5 as CheckoutAddress, a6 as CheckoutInput, a7 as CheckoutPaymentMethod, a8 as CheckoutPreview, a9 as CheckoutResult, aa as CheckoutSettings, ab as CookieConsentInput, ac as CourseAttachment, ad as CourseCertificate, ae as CourseComment, af as CourseCommentReply, ag as CourseCommentsList, ah as CourseDetail, ai as CourseLesson, aj as CourseListItem, ak as CourseModule, al as CoursePostedComment, am as CourseProgress, an as CourseTutorMessage, ao as CourseTutorThread, ap as CrossSellItem, aq as CurrencyDisplayFormat, ar as CustomerAddress, as as CustomerBadge, at as CustomerChallenge, au as CustomerGamification, av as CustomerGamificationQuery, aw as CustomerProfile, ax as DigitalDownload, ay as DownloadUrl, az as Facet, aA as FacetAvailability, aB as FacetCategory, aC as FacetLabel, aD as FacetPriceRange, aE as FacetRange, aF as FacetRatingBucket, aG as FacetValue, aH as FacetsResponse, aI as FilterField, aJ as FulfillmentStatus, aK as FulfillmentStatuses, aL as GamificationRefreshResult, aM as GiftCardBalance, aN as GiftCardPurchaseInput, aO as GiftCardPurchaseResult, aP as GiftCardSummary, aQ as LessonNote, aR as LessonQuiz, aS as LoginInput, aT as LoyaltyBalance, aU as LoyaltyNextTier, aV as LoyaltyProgram, aW as LoyaltyQuery, aX as LoyaltyReferralResult, aY as LoyaltySummary, aZ as LoyaltyTier, a_ as LoyaltyTierPerks, a$ as LoyaltyTransaction, b0 as Menu, b1 as MenuItem, b2 as MenuItemRef, b3 as MenuItemType, b4 as MessageResponse, b5 as NewsletterConfirmResult, b6 as NewsletterOptInDefault, b7 as NewsletterSubscribeInput, b8 as NewsletterSubscribeResult, b9 as NewsletterUnsubscribeInput, ba as NewsletterUnsubscribeResult, bb as OrderAccessRequestResponse, bc as OrderAccessVerifyResponse, bd as OrderDetail, be as OrderDiscount, bf as OrderDocument, bg as OrderItem, bh as OrderListItem, bi as OrderPaymentInstructions, bj as OrderPickupPoint, bk as OrderShipment, bl as OrderStatus, bm as OrderStatusHistory, bn as OrderStatuses, bo as OrderTracking, bp as Page, bq as PageAttachment, br as PageDetail, bs as PaginatedResponse, bt as PaymentInstrument, bu as PaymentStatus, bv as PaymentStatuses, bw as PaymentSwift, bx as PickupPoint, by as PickupPointHours, bz as PickupPointsInput, bA as PickupWidgetConfig, bB as PriceDisplay, bC as ProductAssetGroup, bD as ProductAssetItem, bE as ProductAvailability, bF as ProductGroup, bG as ProductLabel, bH as ProductListItem, bI as ProductMedia, bJ as ProductMediaVariant, bK as ProductParameter, bL as ProductParameterGroup, bM as ProductParametersResponse, bN as ProductPrice, bO as ProductPromotionSummary, bP as ProductReview, bQ as ProductReviewsResponse, bR as ProductSibling, bS as ProductSort, bT as ProductSortValue, bU as ProductVolumePrice, bV as ProductsQuery, bW as QuizAnswerInput, bX as QuizAnswerResult, bY as QuizQuestion, bZ as QuizResult, b_ as QuoteItem, b$ as QuoteRequest, c0 as RegisterInput, c1 as RegisterResult, c2 as RequestInterceptor, c3 as RequestInterceptorConfig, c4 as ResponseInterceptor, c5 as ResponseInterceptorData, c6 as ReturnRequest, c7 as ReturnRequestItem, c8 as ReturnStatus, c9 as ReturnStatusItem, ca as ReturnableOrder, cb as ReturnableOrderItem, cc as SdkError, cd as ShippingMethodSummary, ce as ShippingPublicConfig, cf as ShippingQuote, cg as ShippingQuoteInput, ch as ShopAppearance, ci as ShopCommerce, cj as ShopInfo, ck as ShopScript, cl as ShopScriptPlacement, cm as ShopScriptType, cn as ShopScripts, co as ShopSeo, cp as ShopSeoIdentity, cq as SiteFormField, cr as SiteFormFieldOption, cs as SiteFormFieldType, ct as Sitemap, cu as SitemapEntry, cv as StockBehavior, cw as StockMode, cx as StorefrontCollection, cy as StorefrontCollectionField, cz as StorefrontCollectionFieldType, cA as StorefrontCollectionItem, cB as StorefrontCollectionQuery, cC as StorefrontFaqGroup, cD as StorefrontFaqGroupSummary, cE as StorefrontFaqGroups, cF as StorefrontFaqItem, cG as StorefrontFaqQuery, cH as StorefrontForm, cI as StorefrontFormFieldErrorCode, cJ as StorefrontFormFile, cK as StorefrontFormPresentation, cL as StorefrontFormSettings, cM as StorefrontFormSubmitInput, cN as StorefrontFormSubmitResult, cO as StorefrontFormUpload, cP as SubmitQuoteInput, cQ as SubmitReturnInput, cR as SubmitReviewInput, cS as SubmitWithdrawalInput, cT as Subscription, cU as SubscriptionAction, cV as SubscriptionFrequency, cW as SubscriptionItem, cX as SubscriptionStatus, cY as TaxBreakdownLine, cZ as VariantAxis, c_ as VariantAxisValue, c$ as WishlistItem, d0 as WithdrawalAcknowledgement, d1 as WithdrawalFlag, d2 as WithdrawalSettings, d3 as WithdrawalWindow, d4 as clearCartSummary, d5 as err, d6 as ok, d7 as publishCartSummary, d8 as toSdkError } from './client-Bpefn9PP.mjs';
3
3
 
4
4
  interface HeaderReader {
5
5
  get(name: string): string | null;
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, c as StorefrontFormPlacement } from './client-DeAREmgD.js';
2
- export { A as ActivePromotion, d as AddToCartInput, e as AddToCartItemsInput, f as AddressDetail, g as AddressSuggestion, h as AddressType, i as AddressTypes, j as AuthTokens, k as BackInStockSubscription, l as BadgeTone, m as BehioApiError, n as BehioErrorCode, o as BehioEventHandler, p as BehioEventType, q as BehioNetworkError, r as BehioStorefrontConfig, s as Blog, t as BlogPostDetail, u as BlogPostListItem, v as BlogPostsPage, w as BlogPostsQuery, x as BlogSettings, y as BlogTag, z as Booking, D as BookingCategory, E as BookingConfig, F as BookingCreateInput, G as BookingCreated, H as BookingLocale, I as BookingLocation, J as BookingManageSlotsQuery, K as BookingService, L as BookingSlot, M as BookingSlots, N as BookingSlotsQuery, O as BookingStaff, Q as BookingStatus, R as Bundle, T as BundleCatalogQuery, U as BundleItem, V as Cart, W as CartBundleLine, X as CartBundleLineItem, Y as CartDiscount, Z as CartItem, _ as CartItemProduct, $ as CartLinkClaimed, a0 as CartPromotion, a1 as CartSummaryEvent, a2 as Category, a3 as CategoryDetail, a4 as CertificateVerification, a5 as CheckoutAddress, a6 as CheckoutInput, a7 as CheckoutPaymentMethod, a8 as CheckoutPreview, a9 as CheckoutResult, aa as CheckoutSettings, ab as CookieConsentInput, ac as CourseAttachment, ad as CourseCertificate, ae as CourseComment, af as CourseCommentReply, ag as CourseCommentsList, ah as CourseDetail, ai as CourseLesson, aj as CourseListItem, ak as CourseModule, al as CoursePostedComment, am as CourseProgress, an as CourseTutorMessage, ao as CourseTutorThread, ap as CrossSellItem, aq as CurrencyDisplayFormat, ar as CustomerAddress, as as CustomerBadge, at as CustomerChallenge, au as CustomerGamification, av as CustomerGamificationQuery, aw as CustomerProfile, ax as DigitalDownload, ay as DownloadUrl, az as Facet, aA as FacetAvailability, aB as FacetCategory, aC as FacetLabel, aD as FacetPriceRange, aE as FacetRange, aF as FacetRatingBucket, aG as FacetValue, aH as FacetsResponse, aI as FilterField, aJ as FulfillmentStatus, aK as FulfillmentStatuses, aL as GamificationRefreshResult, aM as GiftCardBalance, aN as GiftCardPurchaseInput, aO as GiftCardPurchaseResult, aP as GiftCardSummary, aQ as LessonNote, aR as LessonQuiz, aS as LoginInput, aT as LoyaltyBalance, aU as LoyaltyNextTier, aV as LoyaltyProgram, aW as LoyaltyQuery, aX as LoyaltyReferralResult, aY as LoyaltySummary, aZ as LoyaltyTier, a_ as LoyaltyTierPerks, a$ as LoyaltyTransaction, b0 as Menu, b1 as MenuItem, b2 as MenuItemRef, b3 as MenuItemType, b4 as MessageResponse, b5 as NewsletterConfirmResult, b6 as NewsletterOptInDefault, b7 as NewsletterSubscribeInput, b8 as NewsletterSubscribeResult, b9 as NewsletterUnsubscribeInput, ba as NewsletterUnsubscribeResult, bb as OrderAccessRequestResponse, bc as OrderAccessVerifyResponse, bd as OrderDetail, be as OrderDiscount, bf as OrderDocument, bg as OrderItem, bh as OrderListItem, bi as OrderPaymentInstructions, bj as OrderPickupPoint, bk as OrderShipment, bl as OrderStatus, bm as OrderStatusHistory, bn as OrderStatuses, bo as OrderTracking, bp as Page, bq as PageAttachment, br as PageDetail, bs as PaginatedResponse, bt as PaymentInstrument, bu as PaymentStatus, bv as PaymentStatuses, bw as PaymentSwift, bx as PickupPoint, by as PickupPointHours, bz as PickupPointsInput, bA as PickupWidgetConfig, bB as PriceDisplay, bC as ProductAssetGroup, bD as ProductAssetItem, bE as ProductAvailability, bF as ProductGroup, bG as ProductLabel, bH as ProductListItem, bI as ProductMedia, bJ as ProductMediaVariant, bK as ProductParameter, bL as ProductParameterGroup, bM as ProductParametersResponse, bN as ProductPrice, bO as ProductPromotionSummary, bP as ProductReview, bQ as ProductReviewsResponse, bR as ProductSibling, bS as ProductSort, bT as ProductSortValue, bU as ProductVolumePrice, bV as ProductsQuery, bW as QuizAnswerInput, bX as QuizAnswerResult, bY as QuizQuestion, bZ as QuizResult, b_ as QuoteItem, b$ as QuoteRequest, c0 as RegisterInput, c1 as RegisterResult, c2 as RequestInterceptor, c3 as RequestInterceptorConfig, c4 as ResponseInterceptor, c5 as ResponseInterceptorData, c6 as ReturnRequest, c7 as ReturnRequestItem, c8 as ReturnStatus, c9 as ReturnStatusItem, ca as ReturnableOrder, cb as ReturnableOrderItem, cc as SdkError, cd as ShippingMethodSummary, ce as ShippingPublicConfig, cf as ShippingQuote, cg as ShippingQuoteInput, ch as ShopAppearance, ci as ShopCommerce, cj as ShopInfo, ck as ShopScript, cl as ShopScriptPlacement, cm as ShopScriptType, cn as ShopScripts, co as ShopSeo, cp as ShopSeoIdentity, cq as SiteFormField, cr as SiteFormFieldOption, cs as SiteFormFieldType, ct as Sitemap, cu as SitemapEntry, cv as StockBehavior, cw as StockMode, cx as StorefrontCollection, cy as StorefrontCollectionField, cz as StorefrontCollectionFieldType, cA as StorefrontCollectionItem, cB as StorefrontCollectionQuery, cC as StorefrontFaqGroup, cD as StorefrontFaqGroupSummary, cE as StorefrontFaqGroups, cF as StorefrontFaqItem, cG as StorefrontFaqQuery, cH as StorefrontForm, cI as StorefrontFormFieldErrorCode, cJ as StorefrontFormFile, cK as StorefrontFormPresentation, cL as StorefrontFormSettings, cM as StorefrontFormSubmitInput, cN as StorefrontFormSubmitResult, cO as StorefrontFormUpload, cP as SubmitQuoteInput, cQ as SubmitReturnInput, cR as SubmitReviewInput, cS as SubmitWithdrawalInput, cT as Subscription, cU as SubscriptionAction, cV as SubscriptionFrequency, cW as SubscriptionItem, cX as SubscriptionStatus, cY as TaxBreakdownLine, cZ as VariantAxis, c_ as VariantAxisValue, c$ as WishlistItem, d0 as WithdrawalAcknowledgement, d1 as WithdrawalFlag, d2 as WithdrawalSettings, d3 as WithdrawalWindow, d4 as clearCartSummary, d5 as err, d6 as ok, d7 as publishCartSummary, d8 as toSdkError } from './client-DeAREmgD.js';
1
+ import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError, c as StorefrontFormPlacement } from './client-Bpefn9PP.js';
2
+ export { A as ActivePromotion, d as AddToCartInput, e as AddToCartItemsInput, f as AddressDetail, g as AddressSuggestion, h as AddressType, i as AddressTypes, j as AuthTokens, k as BackInStockSubscription, l as BadgeTone, m as BehioApiError, n as BehioErrorCode, o as BehioEventHandler, p as BehioEventType, q as BehioNetworkError, r as BehioStorefrontConfig, s as Blog, t as BlogPostDetail, u as BlogPostListItem, v as BlogPostsPage, w as BlogPostsQuery, x as BlogSettings, y as BlogTag, z as Booking, D as BookingCategory, E as BookingConfig, F as BookingCreateInput, G as BookingCreated, H as BookingLocale, I as BookingLocation, J as BookingManageSlotsQuery, K as BookingService, L as BookingSlot, M as BookingSlots, N as BookingSlotsQuery, O as BookingStaff, Q as BookingStatus, R as Bundle, T as BundleCatalogQuery, U as BundleItem, V as Cart, W as CartBundleLine, X as CartBundleLineItem, Y as CartDiscount, Z as CartItem, _ as CartItemProduct, $ as CartLinkClaimed, a0 as CartPromotion, a1 as CartSummaryEvent, a2 as Category, a3 as CategoryDetail, a4 as CertificateVerification, a5 as CheckoutAddress, a6 as CheckoutInput, a7 as CheckoutPaymentMethod, a8 as CheckoutPreview, a9 as CheckoutResult, aa as CheckoutSettings, ab as CookieConsentInput, ac as CourseAttachment, ad as CourseCertificate, ae as CourseComment, af as CourseCommentReply, ag as CourseCommentsList, ah as CourseDetail, ai as CourseLesson, aj as CourseListItem, ak as CourseModule, al as CoursePostedComment, am as CourseProgress, an as CourseTutorMessage, ao as CourseTutorThread, ap as CrossSellItem, aq as CurrencyDisplayFormat, ar as CustomerAddress, as as CustomerBadge, at as CustomerChallenge, au as CustomerGamification, av as CustomerGamificationQuery, aw as CustomerProfile, ax as DigitalDownload, ay as DownloadUrl, az as Facet, aA as FacetAvailability, aB as FacetCategory, aC as FacetLabel, aD as FacetPriceRange, aE as FacetRange, aF as FacetRatingBucket, aG as FacetValue, aH as FacetsResponse, aI as FilterField, aJ as FulfillmentStatus, aK as FulfillmentStatuses, aL as GamificationRefreshResult, aM as GiftCardBalance, aN as GiftCardPurchaseInput, aO as GiftCardPurchaseResult, aP as GiftCardSummary, aQ as LessonNote, aR as LessonQuiz, aS as LoginInput, aT as LoyaltyBalance, aU as LoyaltyNextTier, aV as LoyaltyProgram, aW as LoyaltyQuery, aX as LoyaltyReferralResult, aY as LoyaltySummary, aZ as LoyaltyTier, a_ as LoyaltyTierPerks, a$ as LoyaltyTransaction, b0 as Menu, b1 as MenuItem, b2 as MenuItemRef, b3 as MenuItemType, b4 as MessageResponse, b5 as NewsletterConfirmResult, b6 as NewsletterOptInDefault, b7 as NewsletterSubscribeInput, b8 as NewsletterSubscribeResult, b9 as NewsletterUnsubscribeInput, ba as NewsletterUnsubscribeResult, bb as OrderAccessRequestResponse, bc as OrderAccessVerifyResponse, bd as OrderDetail, be as OrderDiscount, bf as OrderDocument, bg as OrderItem, bh as OrderListItem, bi as OrderPaymentInstructions, bj as OrderPickupPoint, bk as OrderShipment, bl as OrderStatus, bm as OrderStatusHistory, bn as OrderStatuses, bo as OrderTracking, bp as Page, bq as PageAttachment, br as PageDetail, bs as PaginatedResponse, bt as PaymentInstrument, bu as PaymentStatus, bv as PaymentStatuses, bw as PaymentSwift, bx as PickupPoint, by as PickupPointHours, bz as PickupPointsInput, bA as PickupWidgetConfig, bB as PriceDisplay, bC as ProductAssetGroup, bD as ProductAssetItem, bE as ProductAvailability, bF as ProductGroup, bG as ProductLabel, bH as ProductListItem, bI as ProductMedia, bJ as ProductMediaVariant, bK as ProductParameter, bL as ProductParameterGroup, bM as ProductParametersResponse, bN as ProductPrice, bO as ProductPromotionSummary, bP as ProductReview, bQ as ProductReviewsResponse, bR as ProductSibling, bS as ProductSort, bT as ProductSortValue, bU as ProductVolumePrice, bV as ProductsQuery, bW as QuizAnswerInput, bX as QuizAnswerResult, bY as QuizQuestion, bZ as QuizResult, b_ as QuoteItem, b$ as QuoteRequest, c0 as RegisterInput, c1 as RegisterResult, c2 as RequestInterceptor, c3 as RequestInterceptorConfig, c4 as ResponseInterceptor, c5 as ResponseInterceptorData, c6 as ReturnRequest, c7 as ReturnRequestItem, c8 as ReturnStatus, c9 as ReturnStatusItem, ca as ReturnableOrder, cb as ReturnableOrderItem, cc as SdkError, cd as ShippingMethodSummary, ce as ShippingPublicConfig, cf as ShippingQuote, cg as ShippingQuoteInput, ch as ShopAppearance, ci as ShopCommerce, cj as ShopInfo, ck as ShopScript, cl as ShopScriptPlacement, cm as ShopScriptType, cn as ShopScripts, co as ShopSeo, cp as ShopSeoIdentity, cq as SiteFormField, cr as SiteFormFieldOption, cs as SiteFormFieldType, ct as Sitemap, cu as SitemapEntry, cv as StockBehavior, cw as StockMode, cx as StorefrontCollection, cy as StorefrontCollectionField, cz as StorefrontCollectionFieldType, cA as StorefrontCollectionItem, cB as StorefrontCollectionQuery, cC as StorefrontFaqGroup, cD as StorefrontFaqGroupSummary, cE as StorefrontFaqGroups, cF as StorefrontFaqItem, cG as StorefrontFaqQuery, cH as StorefrontForm, cI as StorefrontFormFieldErrorCode, cJ as StorefrontFormFile, cK as StorefrontFormPresentation, cL as StorefrontFormSettings, cM as StorefrontFormSubmitInput, cN as StorefrontFormSubmitResult, cO as StorefrontFormUpload, cP as SubmitQuoteInput, cQ as SubmitReturnInput, cR as SubmitReviewInput, cS as SubmitWithdrawalInput, cT as Subscription, cU as SubscriptionAction, cV as SubscriptionFrequency, cW as SubscriptionItem, cX as SubscriptionStatus, cY as TaxBreakdownLine, cZ as VariantAxis, c_ as VariantAxisValue, c$ as WishlistItem, d0 as WithdrawalAcknowledgement, d1 as WithdrawalFlag, d2 as WithdrawalSettings, d3 as WithdrawalWindow, d4 as clearCartSummary, d5 as err, d6 as ok, d7 as publishCartSummary, d8 as toSdkError } from './client-Bpefn9PP.js';
3
3
 
4
4
  interface HeaderReader {
5
5
  get(name: string): string | null;
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
 
16
- var _chunkQU4OFGKKjs = require('./chunk-QU4OFGKK.js');
16
+ var _chunkESGGBGDUjs = require('./chunk-ESGGBGDU.js');
17
17
 
18
18
  // src/react/utils/format-price.ts
19
19
  function formatPrice(amount, currency, locale, display) {
@@ -1119,7 +1119,7 @@ var GENERIC = {
1119
1119
  en: "Something went wrong, please try again."
1120
1120
  };
1121
1121
  function bodyOf(err2) {
1122
- const body = err2 instanceof _chunkQU4OFGKKjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
1122
+ const body = err2 instanceof _chunkESGGBGDUjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
1123
1123
  return body && typeof body === "object" ? body : null;
1124
1124
  }
1125
1125
  function errorCode(err2) {
@@ -1386,4 +1386,4 @@ var FormPopupPreferences = class {
1386
1386
 
1387
1387
 
1388
1388
 
1389
- exports.AddressTypes = _chunkQU4OFGKKjs.AddressTypes; exports.BehioApiError = _chunkQU4OFGKKjs.BehioApiError; exports.BehioNetworkError = _chunkQU4OFGKKjs.BehioNetworkError; exports.BehioStorefront = _chunkQU4OFGKKjs.BehioStorefront; exports.FormPopupClock = FormPopupClock; exports.FormPopupPreferences = FormPopupPreferences; exports.FulfillmentStatuses = _chunkQU4OFGKKjs.FulfillmentStatuses; exports.NEWSLETTER_REQUESTED_EVENT = NEWSLETTER_REQUESTED_EVENT; exports.OrderStatuses = _chunkQU4OFGKKjs.OrderStatuses; exports.PaymentStatuses = _chunkQU4OFGKKjs.PaymentStatuses; exports.ProductSort = _chunkQU4OFGKKjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.clearCartSummary = _chunkQU4OFGKKjs.clearCartSummary; exports.err = _chunkQU4OFGKKjs.err; exports.errorCode = errorCode; exports.errorMessage = errorMessage; exports.errorParams = errorParams; exports.findVariantByAttributes = findVariantByAttributes; exports.formFieldErrors = formFieldErrors; exports.formPopupRouteAllowed = formPopupRouteAllowed; exports.formatPrice = formatPrice; exports.generateVisitorId = generateVisitorId; exports.getStoredVisitorId = getStoredVisitorId; exports.grantAnalyticsConsent = grantAnalyticsConsent; exports.markNewsletterRequested = markNewsletterRequested; exports.matchesFormPath = matchesFormPath; exports.newsletterWasRequested = newsletterWasRequested; exports.ok = _chunkQU4OFGKKjs.ok; exports.publishCartSummary = _chunkQU4OFGKKjs.publishCartSummary; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkQU4OFGKKjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.trustedVisitorIp = _chunkQU4OFGKKjs.trustedVisitorIp; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
1389
+ exports.AddressTypes = _chunkESGGBGDUjs.AddressTypes; exports.BehioApiError = _chunkESGGBGDUjs.BehioApiError; exports.BehioNetworkError = _chunkESGGBGDUjs.BehioNetworkError; exports.BehioStorefront = _chunkESGGBGDUjs.BehioStorefront; exports.FormPopupClock = FormPopupClock; exports.FormPopupPreferences = FormPopupPreferences; exports.FulfillmentStatuses = _chunkESGGBGDUjs.FulfillmentStatuses; exports.NEWSLETTER_REQUESTED_EVENT = NEWSLETTER_REQUESTED_EVENT; exports.OrderStatuses = _chunkESGGBGDUjs.OrderStatuses; exports.PaymentStatuses = _chunkESGGBGDUjs.PaymentStatuses; exports.ProductSort = _chunkESGGBGDUjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.clearCartSummary = _chunkESGGBGDUjs.clearCartSummary; exports.err = _chunkESGGBGDUjs.err; exports.errorCode = errorCode; exports.errorMessage = errorMessage; exports.errorParams = errorParams; exports.findVariantByAttributes = findVariantByAttributes; exports.formFieldErrors = formFieldErrors; exports.formPopupRouteAllowed = formPopupRouteAllowed; exports.formatPrice = formatPrice; exports.generateVisitorId = generateVisitorId; exports.getStoredVisitorId = getStoredVisitorId; exports.grantAnalyticsConsent = grantAnalyticsConsent; exports.markNewsletterRequested = markNewsletterRequested; exports.matchesFormPath = matchesFormPath; exports.newsletterWasRequested = newsletterWasRequested; exports.ok = _chunkESGGBGDUjs.ok; exports.publishCartSummary = _chunkESGGBGDUjs.publishCartSummary; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkESGGBGDUjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.trustedVisitorIp = _chunkESGGBGDUjs.trustedVisitorIp; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  publishCartSummary,
14
14
  toSdkError,
15
15
  trustedVisitorIp
16
- } from "./chunk-SGMFDMIW.mjs";
16
+ } from "./chunk-RRYPFOL7.mjs";
17
17
 
18
18
  // src/react/utils/format-price.ts
19
19
  function formatPrice(amount, currency, locale, display) {
package/dist/next.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { r as BehioStorefrontConfig, B as BehioStorefront } from './client-DeAREmgD.mjs';
1
+ import { r as BehioStorefrontConfig, B as BehioStorefront } from './client-Bpefn9PP.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 { r as BehioStorefrontConfig, B as BehioStorefront } from './client-DeAREmgD.js';
1
+ import { r as BehioStorefrontConfig, B as BehioStorefront } from './client-Bpefn9PP.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,7 +1,7 @@
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
3
 
4
- var _chunkQU4OFGKKjs = require('./chunk-QU4OFGKK.js');
4
+ var _chunkESGGBGDUjs = require('./chunk-ESGGBGDU.js');
5
5
 
6
6
  // src/next.ts
7
7
  var _headers = require('next/headers');
@@ -20,7 +20,7 @@ async function getBehio(options = {}) {
20
20
  const locale = _nullishCoalesce(options.locale, () => ( process.env.BEHIO_LOCALE));
21
21
  const currency = _nullishCoalesce(options.currency, () => ( process.env.BEHIO_CURRENCY));
22
22
  const cookieName = _nullishCoalesce(options.cartCookieName, () => ( CART_COOKIE_NAME));
23
- const client = new (0, _chunkQU4OFGKKjs.BehioStorefront)({
23
+ const client = new (0, _chunkESGGBGDUjs.BehioStorefront)({
24
24
  apiKey,
25
25
  ...baseUrl ? { baseUrl } : {},
26
26
  ...locale ? { locale } : {},
@@ -37,7 +37,7 @@ async function getBehio(options = {}) {
37
37
  }
38
38
  if (!options.visitorIp) {
39
39
  try {
40
- const ip = _chunkQU4OFGKKjs.trustedVisitorIp.call(void 0, await _headers.headers.call(void 0, ), process.env.CF_ORIGIN_SECRET);
40
+ const ip = _chunkESGGBGDUjs.trustedVisitorIp.call(void 0, await _headers.headers.call(void 0, ), process.env.CF_ORIGIN_SECRET);
41
41
  if (ip) client.setVisitorIp(ip);
42
42
  } catch (e) {
43
43
  }
package/dist/next.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BehioStorefront,
3
3
  trustedVisitorIp
4
- } from "./chunk-SGMFDMIW.mjs";
4
+ } from "./chunk-RRYPFOL7.mjs";
5
5
 
6
6
  // src/next.ts
7
7
  import { cookies, headers } from "next/headers";
package/dist/react.d.mts CHANGED
@@ -4499,11 +4499,11 @@ declare class FormsModule {
4499
4499
  private client;
4500
4500
  constructor(client: BehioStorefront);
4501
4501
  /** Only active, published placements. Internal delivery/CRM settings never leave the server. */
4502
- placements(): Promise<SdkResult<{
4502
+ placements(locale?: string): Promise<SdkResult<{
4503
4503
  items: StorefrontForm[];
4504
4504
  }>>;
4505
4505
  /** Public definition of one form (fields + settings). 404 for an unknown or inactive slug. */
4506
- get(slug: string): Promise<SdkResult<StorefrontForm>>;
4506
+ get(slug: string, locale?: string): Promise<SdkResult<StorefrontForm>>;
4507
4507
  /**
4508
4508
  * Submit a response. On `be.forms.validationFailed` the returned error
4509
4509
  * carries per-field codes: read them with `formFieldErrors(error)`. Other
package/dist/react.d.ts CHANGED
@@ -4499,11 +4499,11 @@ declare class FormsModule {
4499
4499
  private client;
4500
4500
  constructor(client: BehioStorefront);
4501
4501
  /** Only active, published placements. Internal delivery/CRM settings never leave the server. */
4502
- placements(): Promise<SdkResult<{
4502
+ placements(locale?: string): Promise<SdkResult<{
4503
4503
  items: StorefrontForm[];
4504
4504
  }>>;
4505
4505
  /** Public definition of one form (fields + settings). 404 for an unknown or inactive slug. */
4506
- get(slug: string): Promise<SdkResult<StorefrontForm>>;
4506
+ get(slug: string, locale?: string): Promise<SdkResult<StorefrontForm>>;
4507
4507
  /**
4508
4508
  * Submit a response. On `be.forms.validationFailed` the returned error
4509
4509
  * carries per-field codes: read them with `formFieldErrors(error)`. Other
package/dist/react.js CHANGED
@@ -2052,14 +2052,15 @@ var FormsModule = class {
2052
2052
  this.client = client;
2053
2053
  }
2054
2054
  /** Only active, published placements. Internal delivery/CRM settings never leave the server. */
2055
- async placements() {
2056
- return this.client.request("GET", "/forms");
2055
+ async placements(locale) {
2056
+ return this.client.request("GET", "/forms", { query: { locale } });
2057
2057
  }
2058
2058
  /** Public definition of one form (fields + settings). 404 for an unknown or inactive slug. */
2059
- async get(slug) {
2059
+ async get(slug, locale) {
2060
2060
  return this.client.request(
2061
2061
  "GET",
2062
- `/forms/${encodeURIComponent(slug)}`
2062
+ `/forms/${encodeURIComponent(slug)}`,
2063
+ { query: { locale } }
2063
2064
  );
2064
2065
  }
2065
2066
  /**
@@ -4458,9 +4459,10 @@ function formFieldErrors(err) {
4458
4459
  // src/react/hooks/use-site-form.ts
4459
4460
  function useSiteForm(slug, options) {
4460
4461
  const { client } = useBehio();
4462
+ const locale = client.getLocale();
4461
4463
  return (0, import_react_query39.useQuery)({
4462
- queryKey: ["behio", "form", slug],
4463
- queryFn: () => unwrap(client.forms.get(slug)),
4464
+ queryKey: ["behio", "form", slug, locale],
4465
+ queryFn: () => unwrap(client.forms.get(slug, locale)),
4464
4466
  enabled: options?.enabled !== false && !!slug
4465
4467
  });
4466
4468
  }
@@ -4505,7 +4507,8 @@ function useSiteFormSubmit(slug) {
4505
4507
  }
4506
4508
  function useFormPlacements(options) {
4507
4509
  const { client } = useBehio();
4508
- return (0, import_react_query39.useQuery)({ queryKey: ["behio", "form-placements"], queryFn: () => unwrap(client.forms.placements()), initialData: options?.initialData, enabled: options?.enabled !== false, staleTime: 3e5 });
4510
+ const locale = client.getLocale();
4511
+ return (0, import_react_query39.useQuery)({ queryKey: ["behio", "form-placements", locale], queryFn: () => unwrap(client.forms.placements(locale)), initialData: options?.initialData, enabled: options?.enabled !== false, staleTime: 3e5 });
4509
4512
  }
4510
4513
 
4511
4514
  // src/react/hooks/use-bookings.ts
@@ -5416,7 +5419,7 @@ function useFormPopup({ forms, locales, pathname }) {
5416
5419
  if (blocked(dialog.current)) continue;
5417
5420
  opening = true;
5418
5421
  try {
5419
- const fresh = await client.forms.get(form.slug);
5422
+ const fresh = await client.forms.get(form.slug, client.getLocale());
5420
5423
  if (disposed || document.hidden || fresh.error || fresh.data?.revision !== form.revision || blocked(dialog.current) || !formPopupRouteAllowed(publicPath(current.current.locales), placement)) return;
5421
5424
  const open = async () => {
5422
5425
  if (disposed || prefs.suppressed(form.slug, form.presentation?.purpose === "newsletter") || blocked(dialog.current)) return false;
@@ -5424,7 +5427,7 @@ function useFormPopup({ forms, locales, pathname }) {
5424
5427
  returnFocus.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
5425
5428
  return new Promise((resolve) => {
5426
5429
  mountedOffer.current = resolve;
5427
- setActive(candidate);
5430
+ setActive({ form: fresh.data, placement });
5428
5431
  });
5429
5432
  };
5430
5433
  const opened = navigator.locks ? await navigator.locks.request("behio-form-popup", { ifAvailable: true }, async (lock) => lock ? await open() : false) : await open();
package/dist/react.mjs CHANGED
@@ -1926,14 +1926,15 @@ var FormsModule = class {
1926
1926
  this.client = client;
1927
1927
  }
1928
1928
  /** Only active, published placements. Internal delivery/CRM settings never leave the server. */
1929
- async placements() {
1930
- return this.client.request("GET", "/forms");
1929
+ async placements(locale) {
1930
+ return this.client.request("GET", "/forms", { query: { locale } });
1931
1931
  }
1932
1932
  /** Public definition of one form (fields + settings). 404 for an unknown or inactive slug. */
1933
- async get(slug) {
1933
+ async get(slug, locale) {
1934
1934
  return this.client.request(
1935
1935
  "GET",
1936
- `/forms/${encodeURIComponent(slug)}`
1936
+ `/forms/${encodeURIComponent(slug)}`,
1937
+ { query: { locale } }
1937
1938
  );
1938
1939
  }
1939
1940
  /**
@@ -4332,9 +4333,10 @@ function formFieldErrors(err) {
4332
4333
  // src/react/hooks/use-site-form.ts
4333
4334
  function useSiteForm(slug, options) {
4334
4335
  const { client } = useBehio();
4336
+ const locale = client.getLocale();
4335
4337
  return useQuery33({
4336
- queryKey: ["behio", "form", slug],
4337
- queryFn: () => unwrap(client.forms.get(slug)),
4338
+ queryKey: ["behio", "form", slug, locale],
4339
+ queryFn: () => unwrap(client.forms.get(slug, locale)),
4338
4340
  enabled: options?.enabled !== false && !!slug
4339
4341
  });
4340
4342
  }
@@ -4379,7 +4381,8 @@ function useSiteFormSubmit(slug) {
4379
4381
  }
4380
4382
  function useFormPlacements(options) {
4381
4383
  const { client } = useBehio();
4382
- return useQuery33({ queryKey: ["behio", "form-placements"], queryFn: () => unwrap(client.forms.placements()), initialData: options?.initialData, enabled: options?.enabled !== false, staleTime: 3e5 });
4384
+ const locale = client.getLocale();
4385
+ return useQuery33({ queryKey: ["behio", "form-placements", locale], queryFn: () => unwrap(client.forms.placements(locale)), initialData: options?.initialData, enabled: options?.enabled !== false, staleTime: 3e5 });
4383
4386
  }
4384
4387
 
4385
4388
  // src/react/hooks/use-bookings.ts
@@ -5290,7 +5293,7 @@ function useFormPopup({ forms, locales, pathname }) {
5290
5293
  if (blocked(dialog.current)) continue;
5291
5294
  opening = true;
5292
5295
  try {
5293
- const fresh = await client.forms.get(form.slug);
5296
+ const fresh = await client.forms.get(form.slug, client.getLocale());
5294
5297
  if (disposed || document.hidden || fresh.error || fresh.data?.revision !== form.revision || blocked(dialog.current) || !formPopupRouteAllowed(publicPath(current.current.locales), placement)) return;
5295
5298
  const open = async () => {
5296
5299
  if (disposed || prefs.suppressed(form.slug, form.presentation?.purpose === "newsletter") || blocked(dialog.current)) return false;
@@ -5298,7 +5301,7 @@ function useFormPopup({ forms, locales, pathname }) {
5298
5301
  returnFocus.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
5299
5302
  return new Promise((resolve) => {
5300
5303
  mountedOffer.current = resolve;
5301
- setActive(candidate);
5304
+ setActive({ form: fresh.data, placement });
5302
5305
  });
5303
5306
  };
5304
5307
  const opened = navigator.locks ? await navigator.locks.request("behio-form-popup", { ifAvailable: true }, async (lock) => lock ? await open() : false) : await open();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@behio/storefront-sdk",
3
- "version": "2.31.0",
3
+ "version": "2.32.0",
4
4
  "description": "TypeScript SDK for Behio headless e-commerce: core client + React hooks",
5
5
  "author": "Behio",
6
6
  "license": "MIT",