@behio/storefront-sdk 1.17.0 → 1.18.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.
@@ -644,6 +644,7 @@ var CatalogModule = class {
644
644
  if (query.priceMin) q.priceMin = query.priceMin;
645
645
  if (query.priceMax) q.priceMax = query.priceMax;
646
646
  if (query.currency) q.currency = query.currency;
647
+ if (query.country) q.country = query.country;
647
648
  if (query.locale) q.locale = query.locale;
648
649
  if (query.sort) q.sort = query.sort;
649
650
  if (query.inStock !== void 0) q.inStock = query.inStock;
@@ -676,7 +677,7 @@ var CatalogModule = class {
676
677
  "GET",
677
678
  `/catalog/products/${slug}`,
678
679
  {
679
- query: { locale: _optionalChain([options, 'optionalAccess', _21 => _21.locale]), currency: _optionalChain([options, 'optionalAccess', _22 => _22.currency]) }
680
+ query: { locale: _optionalChain([options, 'optionalAccess', _21 => _21.locale]), currency: _optionalChain([options, 'optionalAccess', _22 => _22.currency]), country: _optionalChain([options, 'optionalAccess', _23 => _23.country]) }
680
681
  }
681
682
  );
682
683
  }
@@ -730,7 +731,7 @@ var CatalogModule = class {
730
731
  "GET",
731
732
  `/catalog/menu/${encodeURIComponent(handle)}`,
732
733
  {
733
- query: { locale: _optionalChain([options, 'optionalAccess', _23 => _23.locale]) }
734
+ query: { locale: _optionalChain([options, 'optionalAccess', _24 => _24.locale]) }
734
735
  }
735
736
  );
736
737
  }
@@ -746,7 +747,7 @@ var CatalogModule = class {
746
747
  "GET",
747
748
  "/catalog/featured",
748
749
  {
749
- query: { locale: _optionalChain([options, 'optionalAccess', _24 => _24.locale]), currency: _optionalChain([options, 'optionalAccess', _25 => _25.currency]) }
750
+ query: { locale: _optionalChain([options, 'optionalAccess', _25 => _25.locale]), currency: _optionalChain([options, 'optionalAccess', _26 => _26.currency]) }
750
751
  }
751
752
  );
752
753
  }
@@ -761,7 +762,7 @@ var CatalogModule = class {
761
762
  return this.client.request(
762
763
  "GET",
763
764
  "/catalog/filters",
764
- { query: { locale: _optionalChain([options, 'optionalAccess', _26 => _26.locale]) } }
765
+ { query: { locale: _optionalChain([options, 'optionalAccess', _27 => _27.locale]) } }
765
766
  );
766
767
  }
767
768
  /**
@@ -776,7 +777,7 @@ var CatalogModule = class {
776
777
  return this.client.request(
777
778
  "GET",
778
779
  `/catalog/products/${slug}/parameters`,
779
- { query: { locale: _optionalChain([options, 'optionalAccess', _27 => _27.locale]) } }
780
+ { query: { locale: _optionalChain([options, 'optionalAccess', _28 => _28.locale]) } }
780
781
  );
781
782
  }
782
783
  /**
@@ -788,7 +789,7 @@ var CatalogModule = class {
788
789
  return this.client.request(
789
790
  "GET",
790
791
  `/catalog/products/${slug}/parameters/${groupSlug}`,
791
- { query: { locale: _optionalChain([options, 'optionalAccess', _28 => _28.locale]) } }
792
+ { query: { locale: _optionalChain([options, 'optionalAccess', _29 => _29.locale]) } }
792
793
  );
793
794
  }
794
795
  /**
@@ -846,7 +847,7 @@ var CatalogModule = class {
846
847
  "GET",
847
848
  `/catalog/product-groups/${encodeURIComponent(slug)}`,
848
849
  {
849
- query: { locale: _optionalChain([options, 'optionalAccess', _29 => _29.locale]), currency: _optionalChain([options, 'optionalAccess', _30 => _30.currency]) }
850
+ query: { locale: _optionalChain([options, 'optionalAccess', _30 => _30.locale]), currency: _optionalChain([options, 'optionalAccess', _31 => _31.currency]) }
850
851
  }
851
852
  );
852
853
  }
@@ -861,7 +862,7 @@ var CatalogModule = class {
861
862
  return this.client.request(
862
863
  "GET",
863
864
  `/catalog/products/${encodeURIComponent(productSlug)}/cross-sell`,
864
- { query: { locale: _optionalChain([options, 'optionalAccess', _31 => _31.locale]), currency: _optionalChain([options, 'optionalAccess', _32 => _32.currency]) } }
865
+ { query: { locale: _optionalChain([options, 'optionalAccess', _32 => _32.locale]), currency: _optionalChain([options, 'optionalAccess', _33 => _33.currency]) } }
865
866
  );
866
867
  }
867
868
  /** Active promotions applicable to a product (with countdown end time) */
@@ -905,10 +906,10 @@ var CatalogModule = class {
905
906
  */
906
907
  async listPaymentMethods(opts) {
907
908
  const query = {};
908
- if (_optionalChain([opts, 'optionalAccess', _33 => _33.currency])) query.currency = opts.currency;
909
- if (_optionalChain([opts, 'optionalAccess', _34 => _34.locale])) query.locale = opts.locale;
910
- if (_optionalChain([opts, 'optionalAccess', _35 => _35.country])) query.country = opts.country;
911
- if (_optionalChain([opts, 'optionalAccess', _36 => _36.shippingMethodId])) query.shippingMethodId = opts.shippingMethodId;
909
+ if (_optionalChain([opts, 'optionalAccess', _34 => _34.currency])) query.currency = opts.currency;
910
+ if (_optionalChain([opts, 'optionalAccess', _35 => _35.locale])) query.locale = opts.locale;
911
+ if (_optionalChain([opts, 'optionalAccess', _36 => _36.country])) query.country = opts.country;
912
+ if (_optionalChain([opts, 'optionalAccess', _37 => _37.shippingMethodId])) query.shippingMethodId = opts.shippingMethodId;
912
913
  return this.client.request(
913
914
  "GET",
914
915
  "/catalog/payment-methods",
@@ -1273,7 +1274,7 @@ var OrdersModule = class {
1273
1274
  "GET",
1274
1275
  "/orders",
1275
1276
  {
1276
- query: { page: _optionalChain([options, 'optionalAccess', _37 => _37.page]), limit: _optionalChain([options, 'optionalAccess', _38 => _38.limit]) }
1277
+ query: { page: _optionalChain([options, 'optionalAccess', _38 => _38.page]), limit: _optionalChain([options, 'optionalAccess', _39 => _39.limit]) }
1277
1278
  }
1278
1279
  );
1279
1280
  }
@@ -1393,7 +1394,10 @@ var CustomerModule = class {
1393
1394
  body: address
1394
1395
  });
1395
1396
  }
1396
- /** Update address */
1397
+ /**
1398
+ * Update address. Partial: `{isDefault: true}` alone is a valid body. A
1399
+ * changed `vatId` or `country` re-runs the VIES check on the server.
1400
+ */
1397
1401
  async updateAddress(addressId, data) {
1398
1402
  return this.client.request(
1399
1403
  "PATCH",
@@ -1821,7 +1825,7 @@ var ConsentModule = class {
1821
1825
  }
1822
1826
  if (result.error) return { data: null, error: result.error };
1823
1827
  return {
1824
- data: _optionalChain([result, 'access', _39 => _39.data, 'optionalAccess', _40 => _40.consented]) ? result.data.consent : null,
1828
+ data: _optionalChain([result, 'access', _40 => _40.data, 'optionalAccess', _41 => _41.consented]) ? result.data.consent : null,
1825
1829
  error: null
1826
1830
  };
1827
1831
  }
@@ -1908,10 +1912,10 @@ var ShippingModule = class {
1908
1912
  */
1909
1913
  async listMethods(opts) {
1910
1914
  const query = {};
1911
- if (_optionalChain([opts, 'optionalAccess', _41 => _41.currency])) query.currency = opts.currency;
1912
- if (_optionalChain([opts, 'optionalAccess', _42 => _42.country])) query.country = opts.country;
1913
- if (_optionalChain([opts, 'optionalAccess', _43 => _43.cartTotal]) != null) query.cartTotal = String(opts.cartTotal);
1914
- if (_optionalChain([opts, 'optionalAccess', _44 => _44.cartWeightKg]) != null)
1915
+ if (_optionalChain([opts, 'optionalAccess', _42 => _42.currency])) query.currency = opts.currency;
1916
+ if (_optionalChain([opts, 'optionalAccess', _43 => _43.country])) query.country = opts.country;
1917
+ if (_optionalChain([opts, 'optionalAccess', _44 => _44.cartTotal]) != null) query.cartTotal = String(opts.cartTotal);
1918
+ if (_optionalChain([opts, 'optionalAccess', _45 => _45.cartWeightKg]) != null)
1915
1919
  query.cartWeightKg = String(opts.cartWeightKg);
1916
1920
  return this.client.request(
1917
1921
  "GET",
@@ -644,6 +644,7 @@ var CatalogModule = class {
644
644
  if (query.priceMin) q.priceMin = query.priceMin;
645
645
  if (query.priceMax) q.priceMax = query.priceMax;
646
646
  if (query.currency) q.currency = query.currency;
647
+ if (query.country) q.country = query.country;
647
648
  if (query.locale) q.locale = query.locale;
648
649
  if (query.sort) q.sort = query.sort;
649
650
  if (query.inStock !== void 0) q.inStock = query.inStock;
@@ -676,7 +677,7 @@ var CatalogModule = class {
676
677
  "GET",
677
678
  `/catalog/products/${slug}`,
678
679
  {
679
- query: { locale: options?.locale, currency: options?.currency }
680
+ query: { locale: options?.locale, currency: options?.currency, country: options?.country }
680
681
  }
681
682
  );
682
683
  }
@@ -1393,7 +1394,10 @@ var CustomerModule = class {
1393
1394
  body: address
1394
1395
  });
1395
1396
  }
1396
- /** Update address */
1397
+ /**
1398
+ * Update address. Partial: `{isDefault: true}` alone is a valid body. A
1399
+ * changed `vatId` or `country` re-runs the VIES check on the server.
1400
+ */
1397
1401
  async updateAddress(addressId, data) {
1398
1402
  return this.client.request(
1399
1403
  "PATCH",
@@ -1057,6 +1057,12 @@ type AddressType = (typeof AddressTypes)[keyof typeof AddressTypes];
1057
1057
  interface ProductsQuery {
1058
1058
  page?: number;
1059
1059
  limit?: number;
1060
+ /**
1061
+ * Delivery country (ISO-2). Lets country-scoped price rules (for example a
1062
+ * surcharge for SK) apply in the listing; the cart and checkout use the
1063
+ * cart destination instead.
1064
+ */
1065
+ country?: string;
1060
1066
  /** Single category slug (OR logic with categories array) */
1061
1067
  category?: string;
1062
1068
  /** Multiple category slugs (OR logic — product in ANY of these categories) */
@@ -1800,6 +1806,19 @@ interface CustomerAddress {
1800
1806
  city: string;
1801
1807
  zip: string;
1802
1808
  country: string;
1809
+ /** State / region for countries that need it (US, CA, AU). */
1810
+ state?: string | null;
1811
+ /** Company registration number. */
1812
+ companyId?: string | null;
1813
+ /** VAT ID. EU numbers are verified in VIES when the address is saved. */
1814
+ vatId?: string | null;
1815
+ /**
1816
+ * VIES result at save time: true = valid, false = not confirmed, null = no
1817
+ * VAT ID or not an EU number. Read-only, the server sets it.
1818
+ */
1819
+ vatIdValid?: boolean | null;
1820
+ /** When the VAT ID was last checked (ms). Read-only. */
1821
+ vatIdCheckedAt?: number | null;
1803
1822
  phone?: string;
1804
1823
  }
1805
1824
  interface Page {
@@ -2852,6 +2871,7 @@ declare class CatalogModule {
2852
2871
  getProduct(slug: string, options?: {
2853
2872
  locale?: string;
2854
2873
  currency?: string;
2874
+ country?: string;
2855
2875
  }): Promise<SdkResult<ProductDetail>>;
2856
2876
  /**
2857
2877
  * URLs for the sitemap, already filtered by the merchant's indexing choice
@@ -3188,9 +3208,12 @@ declare class CustomerModule {
3188
3208
  items: CustomerAddress[];
3189
3209
  }>>;
3190
3210
  /** Create address */
3191
- createAddress(address: Omit<CustomerAddress, "id">): Promise<SdkResult<CustomerAddress>>;
3192
- /** Update address */
3193
- updateAddress(addressId: string, data: Partial<CustomerAddress>): Promise<SdkResult<CustomerAddress>>;
3211
+ createAddress(address: Omit<CustomerAddress, "id" | "vatIdValid" | "vatIdCheckedAt">): Promise<SdkResult<CustomerAddress>>;
3212
+ /**
3213
+ * Update address. Partial: `{isDefault: true}` alone is a valid body. A
3214
+ * changed `vatId` or `country` re-runs the VIES check on the server.
3215
+ */
3216
+ updateAddress(addressId: string, data: Partial<Omit<CustomerAddress, "id" | "vatIdValid" | "vatIdCheckedAt">>): Promise<SdkResult<CustomerAddress>>;
3194
3217
  /** Delete address */
3195
3218
  deleteAddress(addressId: string): Promise<SdkResult<void>>;
3196
3219
  /**
@@ -1057,6 +1057,12 @@ type AddressType = (typeof AddressTypes)[keyof typeof AddressTypes];
1057
1057
  interface ProductsQuery {
1058
1058
  page?: number;
1059
1059
  limit?: number;
1060
+ /**
1061
+ * Delivery country (ISO-2). Lets country-scoped price rules (for example a
1062
+ * surcharge for SK) apply in the listing; the cart and checkout use the
1063
+ * cart destination instead.
1064
+ */
1065
+ country?: string;
1060
1066
  /** Single category slug (OR logic with categories array) */
1061
1067
  category?: string;
1062
1068
  /** Multiple category slugs (OR logic — product in ANY of these categories) */
@@ -1800,6 +1806,19 @@ interface CustomerAddress {
1800
1806
  city: string;
1801
1807
  zip: string;
1802
1808
  country: string;
1809
+ /** State / region for countries that need it (US, CA, AU). */
1810
+ state?: string | null;
1811
+ /** Company registration number. */
1812
+ companyId?: string | null;
1813
+ /** VAT ID. EU numbers are verified in VIES when the address is saved. */
1814
+ vatId?: string | null;
1815
+ /**
1816
+ * VIES result at save time: true = valid, false = not confirmed, null = no
1817
+ * VAT ID or not an EU number. Read-only, the server sets it.
1818
+ */
1819
+ vatIdValid?: boolean | null;
1820
+ /** When the VAT ID was last checked (ms). Read-only. */
1821
+ vatIdCheckedAt?: number | null;
1803
1822
  phone?: string;
1804
1823
  }
1805
1824
  interface Page {
@@ -2852,6 +2871,7 @@ declare class CatalogModule {
2852
2871
  getProduct(slug: string, options?: {
2853
2872
  locale?: string;
2854
2873
  currency?: string;
2874
+ country?: string;
2855
2875
  }): Promise<SdkResult<ProductDetail>>;
2856
2876
  /**
2857
2877
  * URLs for the sitemap, already filtered by the merchant's indexing choice
@@ -3188,9 +3208,12 @@ declare class CustomerModule {
3188
3208
  items: CustomerAddress[];
3189
3209
  }>>;
3190
3210
  /** Create address */
3191
- createAddress(address: Omit<CustomerAddress, "id">): Promise<SdkResult<CustomerAddress>>;
3192
- /** Update address */
3193
- updateAddress(addressId: string, data: Partial<CustomerAddress>): Promise<SdkResult<CustomerAddress>>;
3211
+ createAddress(address: Omit<CustomerAddress, "id" | "vatIdValid" | "vatIdCheckedAt">): Promise<SdkResult<CustomerAddress>>;
3212
+ /**
3213
+ * Update address. Partial: `{isDefault: true}` alone is a valid body. A
3214
+ * changed `vatId` or `country` re-runs the VIES check on the server.
3215
+ */
3216
+ updateAddress(addressId: string, data: Partial<Omit<CustomerAddress, "id" | "vatIdValid" | "vatIdCheckedAt">>): Promise<SdkResult<CustomerAddress>>;
3194
3217
  /** Delete address */
3195
3218
  deleteAddress(addressId: string): Promise<SdkResult<void>>;
3196
3219
  /**
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-yo90ANGT.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 BundleItem, z as Cart, D as CartBundleLine, E as CartBundleLineItem, F as CartDiscount, G as CartItem, H as CartItemProduct, I as CartPromotion, J as Category, K as CategoryDetail, L as CertificateVerification, M as CheckoutAddress, N as CheckoutInput, O as CheckoutPaymentMethod, Q as CheckoutSettings, R as CookieConsentInput, T as CourseAttachment, U as CourseCertificate, V as CourseComment, W as CourseCommentReply, X as CourseCommentsList, Y as CourseDetail, Z as CourseLesson, _ as CourseListItem, $ as CourseModule, a0 as CoursePostedComment, a1 as CourseProgress, a2 as CourseTutorMessage, a3 as CourseTutorThread, a4 as CrossSellItem, a5 as CustomerAddress, a6 as CustomerProfile, a7 as DigitalDownload, a8 as DownloadUrl, a9 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 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 LoyaltySummary, aw as LoyaltyTier, ax as LoyaltyTierPerks, ay as LoyaltyTransaction, az as Menu, aA as MenuItem, aB as MenuItemRef, aC as MenuItemType, aD as MessageResponse, aE as NewsletterOptInDefault, aF as NewsletterSubscribeInput, aG as NewsletterSubscribeResult, aH as NewsletterUnsubscribeResult, aI as OrderAccessRequestResponse, aJ as OrderAccessVerifyResponse, aK as OrderDetail, aL as OrderItem, aM as OrderListItem, aN as OrderStatus, aO as OrderStatusHistory, aP as OrderStatuses, aQ as OrderTracking, aR as Page, aS as PageAttachment, aT as PageDetail, aU as PaginatedResponse, aV as PaymentInstrument, aW as PaymentStatus, aX as PaymentStatuses, aY as PaymentSwift, aZ as PickupPoint, a_ as PickupPointHours, a$ as PickupPointsInput, b0 as PickupWidgetConfig, b1 as PriceDisplay, b2 as ProductAssetGroup, b3 as ProductAssetItem, b4 as ProductAvailability, b5 as ProductGroup, b6 as ProductLabel, b7 as ProductListItem, b8 as ProductMedia, b9 as ProductMediaVariant, ba as ProductParameter, bb as ProductParameterGroup, bc as ProductParametersResponse, bd as ProductPrice, be as ProductPromotionSummary, bf as ProductReview, bg as ProductReviewsResponse, bh as ProductSibling, bi as ProductSort, bj as ProductSortValue, bk as ProductVolumePrice, bl as ProductsQuery, bm as QuizAnswerInput, bn as QuizAnswerResult, bo as QuizQuestion, bp as QuizResult, bq as QuoteItem, br as QuoteRequest, bs as RegisterInput, bt as RegisterResult, bu as RequestInterceptor, bv as RequestInterceptorConfig, bw as ResponseInterceptor, bx as ResponseInterceptorData, by as ReturnRequest, bz as ReturnRequestItem, bA as ReturnStatus, bB as ReturnStatusItem, bC as ReturnableOrder, bD as ReturnableOrderItem, bE as SdkError, bF as ShippingMethodSummary, bG as ShippingQuote, bH as ShippingQuoteInput, bI as ShopInfo, bJ as ShopScript, bK as ShopScriptPlacement, bL as ShopScriptType, bM as ShopScripts, bN as ShopSeo, bO as ShopSeoIdentity, bP as SiteFormField, bQ as SiteFormFieldOption, bR as SiteFormFieldType, bS as Sitemap, bT as SitemapEntry, bU as StockBehavior, bV as StockMode, bW as StorefrontForm, bX as StorefrontFormFieldErrorCode, bY as StorefrontFormSettings, bZ as StorefrontFormSubmitInput, b_ as StorefrontFormSubmitResult, b$ as SubmitQuoteInput, c0 as SubmitReturnInput, c1 as SubmitReviewInput, c2 as Subscription, c3 as SubscriptionAction, c4 as SubscriptionFrequency, c5 as SubscriptionItem, c6 as SubscriptionStatus, c7 as TaxBreakdownLine, c8 as VariantAxis, c9 as VariantAxisValue, ca as WishlistItem, cb as err, cc as ok, cd as toSdkError } from './client-yo90ANGT.mjs';
1
+ import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-B29GktSJ.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 BundleItem, z as Cart, D as CartBundleLine, E as CartBundleLineItem, F as CartDiscount, G as CartItem, H as CartItemProduct, I as CartPromotion, J as Category, K as CategoryDetail, L as CertificateVerification, M as CheckoutAddress, N as CheckoutInput, O as CheckoutPaymentMethod, Q as CheckoutSettings, R as CookieConsentInput, T as CourseAttachment, U as CourseCertificate, V as CourseComment, W as CourseCommentReply, X as CourseCommentsList, Y as CourseDetail, Z as CourseLesson, _ as CourseListItem, $ as CourseModule, a0 as CoursePostedComment, a1 as CourseProgress, a2 as CourseTutorMessage, a3 as CourseTutorThread, a4 as CrossSellItem, a5 as CustomerAddress, a6 as CustomerProfile, a7 as DigitalDownload, a8 as DownloadUrl, a9 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 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 LoyaltySummary, aw as LoyaltyTier, ax as LoyaltyTierPerks, ay as LoyaltyTransaction, az as Menu, aA as MenuItem, aB as MenuItemRef, aC as MenuItemType, aD as MessageResponse, aE as NewsletterOptInDefault, aF as NewsletterSubscribeInput, aG as NewsletterSubscribeResult, aH as NewsletterUnsubscribeResult, aI as OrderAccessRequestResponse, aJ as OrderAccessVerifyResponse, aK as OrderDetail, aL as OrderItem, aM as OrderListItem, aN as OrderStatus, aO as OrderStatusHistory, aP as OrderStatuses, aQ as OrderTracking, aR as Page, aS as PageAttachment, aT as PageDetail, aU as PaginatedResponse, aV as PaymentInstrument, aW as PaymentStatus, aX as PaymentStatuses, aY as PaymentSwift, aZ as PickupPoint, a_ as PickupPointHours, a$ as PickupPointsInput, b0 as PickupWidgetConfig, b1 as PriceDisplay, b2 as ProductAssetGroup, b3 as ProductAssetItem, b4 as ProductAvailability, b5 as ProductGroup, b6 as ProductLabel, b7 as ProductListItem, b8 as ProductMedia, b9 as ProductMediaVariant, ba as ProductParameter, bb as ProductParameterGroup, bc as ProductParametersResponse, bd as ProductPrice, be as ProductPromotionSummary, bf as ProductReview, bg as ProductReviewsResponse, bh as ProductSibling, bi as ProductSort, bj as ProductSortValue, bk as ProductVolumePrice, bl as ProductsQuery, bm as QuizAnswerInput, bn as QuizAnswerResult, bo as QuizQuestion, bp as QuizResult, bq as QuoteItem, br as QuoteRequest, bs as RegisterInput, bt as RegisterResult, bu as RequestInterceptor, bv as RequestInterceptorConfig, bw as ResponseInterceptor, bx as ResponseInterceptorData, by as ReturnRequest, bz as ReturnRequestItem, bA as ReturnStatus, bB as ReturnStatusItem, bC as ReturnableOrder, bD as ReturnableOrderItem, bE as SdkError, bF as ShippingMethodSummary, bG as ShippingQuote, bH as ShippingQuoteInput, bI as ShopInfo, bJ as ShopScript, bK as ShopScriptPlacement, bL as ShopScriptType, bM as ShopScripts, bN as ShopSeo, bO as ShopSeoIdentity, bP as SiteFormField, bQ as SiteFormFieldOption, bR as SiteFormFieldType, bS as Sitemap, bT as SitemapEntry, bU as StockBehavior, bV as StockMode, bW as StorefrontForm, bX as StorefrontFormFieldErrorCode, bY as StorefrontFormSettings, bZ as StorefrontFormSubmitInput, b_ as StorefrontFormSubmitResult, b$ as SubmitQuoteInput, c0 as SubmitReturnInput, c1 as SubmitReviewInput, c2 as Subscription, c3 as SubscriptionAction, c4 as SubscriptionFrequency, c5 as SubscriptionItem, c6 as SubscriptionStatus, c7 as TaxBreakdownLine, c8 as VariantAxis, c9 as VariantAxisValue, ca as WishlistItem, cb as err, cc as ok, cd as toSdkError } from './client-B29GktSJ.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-yo90ANGT.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 BundleItem, z as Cart, D as CartBundleLine, E as CartBundleLineItem, F as CartDiscount, G as CartItem, H as CartItemProduct, I as CartPromotion, J as Category, K as CategoryDetail, L as CertificateVerification, M as CheckoutAddress, N as CheckoutInput, O as CheckoutPaymentMethod, Q as CheckoutSettings, R as CookieConsentInput, T as CourseAttachment, U as CourseCertificate, V as CourseComment, W as CourseCommentReply, X as CourseCommentsList, Y as CourseDetail, Z as CourseLesson, _ as CourseListItem, $ as CourseModule, a0 as CoursePostedComment, a1 as CourseProgress, a2 as CourseTutorMessage, a3 as CourseTutorThread, a4 as CrossSellItem, a5 as CustomerAddress, a6 as CustomerProfile, a7 as DigitalDownload, a8 as DownloadUrl, a9 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 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 LoyaltySummary, aw as LoyaltyTier, ax as LoyaltyTierPerks, ay as LoyaltyTransaction, az as Menu, aA as MenuItem, aB as MenuItemRef, aC as MenuItemType, aD as MessageResponse, aE as NewsletterOptInDefault, aF as NewsletterSubscribeInput, aG as NewsletterSubscribeResult, aH as NewsletterUnsubscribeResult, aI as OrderAccessRequestResponse, aJ as OrderAccessVerifyResponse, aK as OrderDetail, aL as OrderItem, aM as OrderListItem, aN as OrderStatus, aO as OrderStatusHistory, aP as OrderStatuses, aQ as OrderTracking, aR as Page, aS as PageAttachment, aT as PageDetail, aU as PaginatedResponse, aV as PaymentInstrument, aW as PaymentStatus, aX as PaymentStatuses, aY as PaymentSwift, aZ as PickupPoint, a_ as PickupPointHours, a$ as PickupPointsInput, b0 as PickupWidgetConfig, b1 as PriceDisplay, b2 as ProductAssetGroup, b3 as ProductAssetItem, b4 as ProductAvailability, b5 as ProductGroup, b6 as ProductLabel, b7 as ProductListItem, b8 as ProductMedia, b9 as ProductMediaVariant, ba as ProductParameter, bb as ProductParameterGroup, bc as ProductParametersResponse, bd as ProductPrice, be as ProductPromotionSummary, bf as ProductReview, bg as ProductReviewsResponse, bh as ProductSibling, bi as ProductSort, bj as ProductSortValue, bk as ProductVolumePrice, bl as ProductsQuery, bm as QuizAnswerInput, bn as QuizAnswerResult, bo as QuizQuestion, bp as QuizResult, bq as QuoteItem, br as QuoteRequest, bs as RegisterInput, bt as RegisterResult, bu as RequestInterceptor, bv as RequestInterceptorConfig, bw as ResponseInterceptor, bx as ResponseInterceptorData, by as ReturnRequest, bz as ReturnRequestItem, bA as ReturnStatus, bB as ReturnStatusItem, bC as ReturnableOrder, bD as ReturnableOrderItem, bE as SdkError, bF as ShippingMethodSummary, bG as ShippingQuote, bH as ShippingQuoteInput, bI as ShopInfo, bJ as ShopScript, bK as ShopScriptPlacement, bL as ShopScriptType, bM as ShopScripts, bN as ShopSeo, bO as ShopSeoIdentity, bP as SiteFormField, bQ as SiteFormFieldOption, bR as SiteFormFieldType, bS as Sitemap, bT as SitemapEntry, bU as StockBehavior, bV as StockMode, bW as StorefrontForm, bX as StorefrontFormFieldErrorCode, bY as StorefrontFormSettings, bZ as StorefrontFormSubmitInput, b_ as StorefrontFormSubmitResult, b$ as SubmitQuoteInput, c0 as SubmitReturnInput, c1 as SubmitReviewInput, c2 as Subscription, c3 as SubscriptionAction, c4 as SubscriptionFrequency, c5 as SubscriptionItem, c6 as SubscriptionStatus, c7 as TaxBreakdownLine, c8 as VariantAxis, c9 as VariantAxisValue, ca as WishlistItem, cb as err, cc as ok, cd as toSdkError } from './client-yo90ANGT.js';
1
+ import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-B29GktSJ.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 BundleItem, z as Cart, D as CartBundleLine, E as CartBundleLineItem, F as CartDiscount, G as CartItem, H as CartItemProduct, I as CartPromotion, J as Category, K as CategoryDetail, L as CertificateVerification, M as CheckoutAddress, N as CheckoutInput, O as CheckoutPaymentMethod, Q as CheckoutSettings, R as CookieConsentInput, T as CourseAttachment, U as CourseCertificate, V as CourseComment, W as CourseCommentReply, X as CourseCommentsList, Y as CourseDetail, Z as CourseLesson, _ as CourseListItem, $ as CourseModule, a0 as CoursePostedComment, a1 as CourseProgress, a2 as CourseTutorMessage, a3 as CourseTutorThread, a4 as CrossSellItem, a5 as CustomerAddress, a6 as CustomerProfile, a7 as DigitalDownload, a8 as DownloadUrl, a9 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 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 LoyaltySummary, aw as LoyaltyTier, ax as LoyaltyTierPerks, ay as LoyaltyTransaction, az as Menu, aA as MenuItem, aB as MenuItemRef, aC as MenuItemType, aD as MessageResponse, aE as NewsletterOptInDefault, aF as NewsletterSubscribeInput, aG as NewsletterSubscribeResult, aH as NewsletterUnsubscribeResult, aI as OrderAccessRequestResponse, aJ as OrderAccessVerifyResponse, aK as OrderDetail, aL as OrderItem, aM as OrderListItem, aN as OrderStatus, aO as OrderStatusHistory, aP as OrderStatuses, aQ as OrderTracking, aR as Page, aS as PageAttachment, aT as PageDetail, aU as PaginatedResponse, aV as PaymentInstrument, aW as PaymentStatus, aX as PaymentStatuses, aY as PaymentSwift, aZ as PickupPoint, a_ as PickupPointHours, a$ as PickupPointsInput, b0 as PickupWidgetConfig, b1 as PriceDisplay, b2 as ProductAssetGroup, b3 as ProductAssetItem, b4 as ProductAvailability, b5 as ProductGroup, b6 as ProductLabel, b7 as ProductListItem, b8 as ProductMedia, b9 as ProductMediaVariant, ba as ProductParameter, bb as ProductParameterGroup, bc as ProductParametersResponse, bd as ProductPrice, be as ProductPromotionSummary, bf as ProductReview, bg as ProductReviewsResponse, bh as ProductSibling, bi as ProductSort, bj as ProductSortValue, bk as ProductVolumePrice, bl as ProductsQuery, bm as QuizAnswerInput, bn as QuizAnswerResult, bo as QuizQuestion, bp as QuizResult, bq as QuoteItem, br as QuoteRequest, bs as RegisterInput, bt as RegisterResult, bu as RequestInterceptor, bv as RequestInterceptorConfig, bw as ResponseInterceptor, bx as ResponseInterceptorData, by as ReturnRequest, bz as ReturnRequestItem, bA as ReturnStatus, bB as ReturnStatusItem, bC as ReturnableOrder, bD as ReturnableOrderItem, bE as SdkError, bF as ShippingMethodSummary, bG as ShippingQuote, bH as ShippingQuoteInput, bI as ShopInfo, bJ as ShopScript, bK as ShopScriptPlacement, bL as ShopScriptType, bM as ShopScripts, bN as ShopSeo, bO as ShopSeoIdentity, bP as SiteFormField, bQ as SiteFormFieldOption, bR as SiteFormFieldType, bS as Sitemap, bT as SitemapEntry, bU as StockBehavior, bV as StockMode, bW as StorefrontForm, bX as StorefrontFormFieldErrorCode, bY as StorefrontFormSettings, bZ as StorefrontFormSubmitInput, b_ as StorefrontFormSubmitResult, b$ as SubmitQuoteInput, c0 as SubmitReturnInput, c1 as SubmitReviewInput, c2 as Subscription, c3 as SubscriptionAction, c4 as SubscriptionFrequency, c5 as SubscriptionItem, c6 as SubscriptionStatus, c7 as TaxBreakdownLine, c8 as VariantAxis, c9 as VariantAxisValue, ca as WishlistItem, cb as err, cc as ok, cd as toSdkError } from './client-B29GktSJ.js';
3
3
 
4
4
  /**
5
5
  * Format a price amount with currency using Intl.NumberFormat.
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
 
12
12
 
13
- var _chunkFMMFIZHAjs = require('./chunk-FMMFIZHA.js');
13
+ var _chunkGAYYRRULjs = require('./chunk-GAYYRRUL.js');
14
14
 
15
15
  // src/react/utils/format-price.ts
16
16
  function formatPrice(amount, currency, locale) {
@@ -872,7 +872,7 @@ var GENERIC = {
872
872
  en: "Something went wrong, please try again."
873
873
  };
874
874
  function bodyOf(err2) {
875
- const body = err2 instanceof _chunkFMMFIZHAjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
875
+ const body = err2 instanceof _chunkGAYYRRULjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
876
876
  return body && typeof body === "object" ? body : null;
877
877
  }
878
878
  function errorCode(err2) {
@@ -984,4 +984,4 @@ function formFieldErrors(err2) {
984
984
 
985
985
 
986
986
 
987
- exports.AddressTypes = _chunkFMMFIZHAjs.AddressTypes; exports.BehioApiError = _chunkFMMFIZHAjs.BehioApiError; exports.BehioNetworkError = _chunkFMMFIZHAjs.BehioNetworkError; exports.BehioStorefront = _chunkFMMFIZHAjs.BehioStorefront; exports.FulfillmentStatuses = _chunkFMMFIZHAjs.FulfillmentStatuses; exports.OrderStatuses = _chunkFMMFIZHAjs.OrderStatuses; exports.PaymentStatuses = _chunkFMMFIZHAjs.PaymentStatuses; exports.ProductSort = _chunkFMMFIZHAjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.err = _chunkFMMFIZHAjs.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 = _chunkFMMFIZHAjs.ok; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkFMMFIZHAjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
987
+ exports.AddressTypes = _chunkGAYYRRULjs.AddressTypes; exports.BehioApiError = _chunkGAYYRRULjs.BehioApiError; exports.BehioNetworkError = _chunkGAYYRRULjs.BehioNetworkError; exports.BehioStorefront = _chunkGAYYRRULjs.BehioStorefront; exports.FulfillmentStatuses = _chunkGAYYRRULjs.FulfillmentStatuses; exports.OrderStatuses = _chunkGAYYRRULjs.OrderStatuses; exports.PaymentStatuses = _chunkGAYYRRULjs.PaymentStatuses; exports.ProductSort = _chunkGAYYRRULjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.err = _chunkGAYYRRULjs.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 = _chunkGAYYRRULjs.ok; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkGAYYRRULjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  err,
11
11
  ok,
12
12
  toSdkError
13
- } from "./chunk-PU4QV6JS.mjs";
13
+ } from "./chunk-W2P2D3EZ.mjs";
14
14
 
15
15
  // src/react/utils/format-price.ts
16
16
  function formatPrice(amount, currency, locale) {
package/dist/next.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-yo90ANGT.mjs';
1
+ import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-B29GktSJ.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-yo90ANGT.js';
1
+ import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-B29GktSJ.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 _chunkFMMFIZHAjs = require('./chunk-FMMFIZHA.js');
3
+ var _chunkGAYYRRULjs = require('./chunk-GAYYRRUL.js');
4
4
 
5
5
  // src/next.ts
6
6
  var _headers = require('next/headers');
@@ -18,7 +18,7 @@ async function getBehio(options = {}) {
18
18
  const locale = _nullishCoalesce(options.locale, () => ( process.env.BEHIO_LOCALE));
19
19
  const currency = _nullishCoalesce(options.currency, () => ( process.env.BEHIO_CURRENCY));
20
20
  const cookieName = _nullishCoalesce(options.cartCookieName, () => ( CART_COOKIE_NAME));
21
- const client = new (0, _chunkFMMFIZHAjs.BehioStorefront)({
21
+ const client = new (0, _chunkGAYYRRULjs.BehioStorefront)({
22
22
  apiKey,
23
23
  ...baseUrl ? { baseUrl } : {},
24
24
  ...locale ? { locale } : {},
package/dist/next.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BehioStorefront
3
- } from "./chunk-PU4QV6JS.mjs";
3
+ } from "./chunk-W2P2D3EZ.mjs";
4
4
 
5
5
  // src/next.ts
6
6
  import { cookies, headers } from "next/headers";
package/dist/react.d.mts CHANGED
@@ -1113,6 +1113,12 @@ type AddressType = (typeof AddressTypes)[keyof typeof AddressTypes];
1113
1113
  interface ProductsQuery {
1114
1114
  page?: number;
1115
1115
  limit?: number;
1116
+ /**
1117
+ * Delivery country (ISO-2). Lets country-scoped price rules (for example a
1118
+ * surcharge for SK) apply in the listing; the cart and checkout use the
1119
+ * cart destination instead.
1120
+ */
1121
+ country?: string;
1116
1122
  /** Single category slug (OR logic with categories array) */
1117
1123
  category?: string;
1118
1124
  /** Multiple category slugs (OR logic — product in ANY of these categories) */
@@ -1856,6 +1862,19 @@ interface CustomerAddress {
1856
1862
  city: string;
1857
1863
  zip: string;
1858
1864
  country: string;
1865
+ /** State / region for countries that need it (US, CA, AU). */
1866
+ state?: string | null;
1867
+ /** Company registration number. */
1868
+ companyId?: string | null;
1869
+ /** VAT ID. EU numbers are verified in VIES when the address is saved. */
1870
+ vatId?: string | null;
1871
+ /**
1872
+ * VIES result at save time: true = valid, false = not confirmed, null = no
1873
+ * VAT ID or not an EU number. Read-only, the server sets it.
1874
+ */
1875
+ vatIdValid?: boolean | null;
1876
+ /** When the VAT ID was last checked (ms). Read-only. */
1877
+ vatIdCheckedAt?: number | null;
1859
1878
  phone?: string;
1860
1879
  }
1861
1880
  interface Page {
@@ -2870,6 +2889,7 @@ declare class CatalogModule {
2870
2889
  getProduct(slug: string, options?: {
2871
2890
  locale?: string;
2872
2891
  currency?: string;
2892
+ country?: string;
2873
2893
  }): Promise<SdkResult<ProductDetail>>;
2874
2894
  /**
2875
2895
  * URLs for the sitemap, already filtered by the merchant's indexing choice
@@ -3206,9 +3226,12 @@ declare class CustomerModule {
3206
3226
  items: CustomerAddress[];
3207
3227
  }>>;
3208
3228
  /** Create address */
3209
- createAddress(address: Omit<CustomerAddress, "id">): Promise<SdkResult<CustomerAddress>>;
3210
- /** Update address */
3211
- updateAddress(addressId: string, data: Partial<CustomerAddress>): Promise<SdkResult<CustomerAddress>>;
3229
+ createAddress(address: Omit<CustomerAddress, "id" | "vatIdValid" | "vatIdCheckedAt">): Promise<SdkResult<CustomerAddress>>;
3230
+ /**
3231
+ * Update address. Partial: `{isDefault: true}` alone is a valid body. A
3232
+ * changed `vatId` or `country` re-runs the VIES check on the server.
3233
+ */
3234
+ updateAddress(addressId: string, data: Partial<Omit<CustomerAddress, "id" | "vatIdValid" | "vatIdCheckedAt">>): Promise<SdkResult<CustomerAddress>>;
3212
3235
  /** Delete address */
3213
3236
  deleteAddress(addressId: string): Promise<SdkResult<void>>;
3214
3237
  /**
package/dist/react.d.ts CHANGED
@@ -1113,6 +1113,12 @@ type AddressType = (typeof AddressTypes)[keyof typeof AddressTypes];
1113
1113
  interface ProductsQuery {
1114
1114
  page?: number;
1115
1115
  limit?: number;
1116
+ /**
1117
+ * Delivery country (ISO-2). Lets country-scoped price rules (for example a
1118
+ * surcharge for SK) apply in the listing; the cart and checkout use the
1119
+ * cart destination instead.
1120
+ */
1121
+ country?: string;
1116
1122
  /** Single category slug (OR logic with categories array) */
1117
1123
  category?: string;
1118
1124
  /** Multiple category slugs (OR logic — product in ANY of these categories) */
@@ -1856,6 +1862,19 @@ interface CustomerAddress {
1856
1862
  city: string;
1857
1863
  zip: string;
1858
1864
  country: string;
1865
+ /** State / region for countries that need it (US, CA, AU). */
1866
+ state?: string | null;
1867
+ /** Company registration number. */
1868
+ companyId?: string | null;
1869
+ /** VAT ID. EU numbers are verified in VIES when the address is saved. */
1870
+ vatId?: string | null;
1871
+ /**
1872
+ * VIES result at save time: true = valid, false = not confirmed, null = no
1873
+ * VAT ID or not an EU number. Read-only, the server sets it.
1874
+ */
1875
+ vatIdValid?: boolean | null;
1876
+ /** When the VAT ID was last checked (ms). Read-only. */
1877
+ vatIdCheckedAt?: number | null;
1859
1878
  phone?: string;
1860
1879
  }
1861
1880
  interface Page {
@@ -2870,6 +2889,7 @@ declare class CatalogModule {
2870
2889
  getProduct(slug: string, options?: {
2871
2890
  locale?: string;
2872
2891
  currency?: string;
2892
+ country?: string;
2873
2893
  }): Promise<SdkResult<ProductDetail>>;
2874
2894
  /**
2875
2895
  * URLs for the sitemap, already filtered by the merchant's indexing choice
@@ -3206,9 +3226,12 @@ declare class CustomerModule {
3206
3226
  items: CustomerAddress[];
3207
3227
  }>>;
3208
3228
  /** Create address */
3209
- createAddress(address: Omit<CustomerAddress, "id">): Promise<SdkResult<CustomerAddress>>;
3210
- /** Update address */
3211
- updateAddress(addressId: string, data: Partial<CustomerAddress>): Promise<SdkResult<CustomerAddress>>;
3229
+ createAddress(address: Omit<CustomerAddress, "id" | "vatIdValid" | "vatIdCheckedAt">): Promise<SdkResult<CustomerAddress>>;
3230
+ /**
3231
+ * Update address. Partial: `{isDefault: true}` alone is a valid body. A
3232
+ * changed `vatId` or `country` re-runs the VIES check on the server.
3233
+ */
3234
+ updateAddress(addressId: string, data: Partial<Omit<CustomerAddress, "id" | "vatIdValid" | "vatIdCheckedAt">>): Promise<SdkResult<CustomerAddress>>;
3212
3235
  /** Delete address */
3213
3236
  deleteAddress(addressId: string): Promise<SdkResult<void>>;
3214
3237
  /**
package/dist/react.js CHANGED
@@ -722,6 +722,7 @@ var CatalogModule = class {
722
722
  if (query.priceMin) q.priceMin = query.priceMin;
723
723
  if (query.priceMax) q.priceMax = query.priceMax;
724
724
  if (query.currency) q.currency = query.currency;
725
+ if (query.country) q.country = query.country;
725
726
  if (query.locale) q.locale = query.locale;
726
727
  if (query.sort) q.sort = query.sort;
727
728
  if (query.inStock !== void 0) q.inStock = query.inStock;
@@ -754,7 +755,7 @@ var CatalogModule = class {
754
755
  "GET",
755
756
  `/catalog/products/${slug}`,
756
757
  {
757
- query: { locale: options?.locale, currency: options?.currency }
758
+ query: { locale: options?.locale, currency: options?.currency, country: options?.country }
758
759
  }
759
760
  );
760
761
  }
@@ -1471,7 +1472,10 @@ var CustomerModule = class {
1471
1472
  body: address
1472
1473
  });
1473
1474
  }
1474
- /** Update address */
1475
+ /**
1476
+ * Update address. Partial: `{isDefault: true}` alone is a valid body. A
1477
+ * changed `vatId` or `country` re-runs the VIES check on the server.
1478
+ */
1475
1479
  async updateAddress(addressId, data) {
1476
1480
  return this.client.request(
1477
1481
  "PATCH",
package/dist/react.mjs CHANGED
@@ -613,6 +613,7 @@ var CatalogModule = class {
613
613
  if (query.priceMin) q.priceMin = query.priceMin;
614
614
  if (query.priceMax) q.priceMax = query.priceMax;
615
615
  if (query.currency) q.currency = query.currency;
616
+ if (query.country) q.country = query.country;
616
617
  if (query.locale) q.locale = query.locale;
617
618
  if (query.sort) q.sort = query.sort;
618
619
  if (query.inStock !== void 0) q.inStock = query.inStock;
@@ -645,7 +646,7 @@ var CatalogModule = class {
645
646
  "GET",
646
647
  `/catalog/products/${slug}`,
647
648
  {
648
- query: { locale: options?.locale, currency: options?.currency }
649
+ query: { locale: options?.locale, currency: options?.currency, country: options?.country }
649
650
  }
650
651
  );
651
652
  }
@@ -1362,7 +1363,10 @@ var CustomerModule = class {
1362
1363
  body: address
1363
1364
  });
1364
1365
  }
1365
- /** Update address */
1366
+ /**
1367
+ * Update address. Partial: `{isDefault: true}` alone is a valid body. A
1368
+ * changed `vatId` or `country` re-runs the VIES check on the server.
1369
+ */
1366
1370
  async updateAddress(addressId, data) {
1367
1371
  return this.client.request(
1368
1372
  "PATCH",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@behio/storefront-sdk",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "TypeScript SDK for Behio headless e-commerce: core client + React hooks",
5
5
  "author": "Behio",
6
6
  "license": "MIT",