@behio/storefront-sdk 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -578,6 +578,17 @@ var CatalogModule = class {
578
578
  async getBundle(slug) {
579
579
  return this.client.request("GET", `/catalog/bundles/${slug}`);
580
580
  }
581
+ /**
582
+ * One product group ("collection") by slug with its products as standard
583
+ * list items. Groups are curated in the admin; use this to render curated
584
+ * product bands. Returns an SdkResult error (404) when the group is
585
+ * missing or inactive — callers should render nothing in that case.
586
+ */
587
+ async getProductGroup(slug, options) {
588
+ return this.client.request("GET", `/catalog/product-groups/${encodeURIComponent(slug)}`, {
589
+ query: { locale: _optionalChain([options, 'optionalAccess', _25 => _25.locale]), currency: _optionalChain([options, 'optionalAccess', _26 => _26.currency]) }
590
+ });
591
+ }
581
592
  /** Cross-sell / related / upsell products for a product */
582
593
  async getCrossSell(productSlug) {
583
594
  return this.client.request(
@@ -604,7 +615,7 @@ var CatalogModule = class {
604
615
  /** List configured payment methods (filtered by currency). */
605
616
  async listPaymentMethods(opts) {
606
617
  const query = {};
607
- if (_optionalChain([opts, 'optionalAccess', _25 => _25.currency])) query.currency = opts.currency;
618
+ if (_optionalChain([opts, 'optionalAccess', _27 => _27.currency])) query.currency = opts.currency;
608
619
  return this.client.request("GET", "/catalog/payment-methods", { query });
609
620
  }
610
621
  };
@@ -850,7 +861,7 @@ var OrdersModule = class {
850
861
  /** List customer orders (requires auth) */
851
862
  async list(options) {
852
863
  return this.client.request("GET", "/orders", {
853
- query: { page: _optionalChain([options, 'optionalAccess', _26 => _26.page]), limit: _optionalChain([options, 'optionalAccess', _27 => _27.limit]) }
864
+ query: { page: _optionalChain([options, 'optionalAccess', _28 => _28.page]), limit: _optionalChain([options, 'optionalAccess', _29 => _29.limit]) }
854
865
  });
855
866
  }
856
867
  /** Get order detail (requires auth) */
@@ -1073,10 +1084,10 @@ var ShippingModule = class {
1073
1084
  */
1074
1085
  async listMethods(opts) {
1075
1086
  const query = {};
1076
- if (_optionalChain([opts, 'optionalAccess', _28 => _28.currency])) query.currency = opts.currency;
1077
- if (_optionalChain([opts, 'optionalAccess', _29 => _29.country])) query.country = opts.country;
1078
- if (_optionalChain([opts, 'optionalAccess', _30 => _30.cartTotal]) != null) query.cartTotal = String(opts.cartTotal);
1079
- if (_optionalChain([opts, 'optionalAccess', _31 => _31.cartWeightKg]) != null) query.cartWeightKg = String(opts.cartWeightKg);
1087
+ if (_optionalChain([opts, 'optionalAccess', _30 => _30.currency])) query.currency = opts.currency;
1088
+ if (_optionalChain([opts, 'optionalAccess', _31 => _31.country])) query.country = opts.country;
1089
+ if (_optionalChain([opts, 'optionalAccess', _32 => _32.cartTotal]) != null) query.cartTotal = String(opts.cartTotal);
1090
+ if (_optionalChain([opts, 'optionalAccess', _33 => _33.cartWeightKg]) != null) query.cartWeightKg = String(opts.cartWeightKg);
1080
1091
  return this.client.request(
1081
1092
  "GET",
1082
1093
  "/catalog/shipping-methods",
@@ -578,6 +578,17 @@ var CatalogModule = class {
578
578
  async getBundle(slug) {
579
579
  return this.client.request("GET", `/catalog/bundles/${slug}`);
580
580
  }
581
+ /**
582
+ * One product group ("collection") by slug with its products as standard
583
+ * list items. Groups are curated in the admin; use this to render curated
584
+ * product bands. Returns an SdkResult error (404) when the group is
585
+ * missing or inactive — callers should render nothing in that case.
586
+ */
587
+ async getProductGroup(slug, options) {
588
+ return this.client.request("GET", `/catalog/product-groups/${encodeURIComponent(slug)}`, {
589
+ query: { locale: options?.locale, currency: options?.currency }
590
+ });
591
+ }
581
592
  /** Cross-sell / related / upsell products for a product */
582
593
  async getCrossSell(productSlug) {
583
594
  return this.client.request(
@@ -263,6 +263,12 @@ interface MenuItemRef {
263
263
  type: MenuItemType;
264
264
  slug: string;
265
265
  }
266
+ /**
267
+ * Badge tone preset for a menu item chip. Maps to storefront design tokens on
268
+ * the template side (SALE -> danger, NEW -> success, ACCENT -> primary,
269
+ * NEUTRAL -> current text color). Custom hex colors override the preset.
270
+ */
271
+ type BadgeTone = "NEUTRAL" | "SALE" | "NEW" | "ACCENT";
266
272
  interface MenuItem {
267
273
  id: string;
268
274
  type: MenuItemType;
@@ -275,6 +281,23 @@ interface MenuItem {
275
281
  ref?: MenuItemRef | null;
276
282
  /** Optional badge chip text (e.g. "Novinka", "Sleva"). */
277
283
  badgeText?: string | null;
284
+ /**
285
+ * Badge tone preset driving the chip colors from storefront tokens. Always
286
+ * present. Custom `badgeColor`/`badgeTextColor` override it when set.
287
+ */
288
+ badgeTone: BadgeTone;
289
+ /** Custom badge background hex (overrides `badgeTone`), or null. */
290
+ badgeColor?: string | null;
291
+ /** Custom badge text hex, or null. */
292
+ badgeTextColor?: string | null;
293
+ /** Custom hex for the item label text itself, or null to inherit. */
294
+ labelColor?: string | null;
295
+ /** Lucide icon slug rendered next to the label, or null. */
296
+ icon?: string | null;
297
+ /** Emphasize this item (bold/accent). */
298
+ isHighlighted: boolean;
299
+ /** LINK items: open the target in a new browser tab. Always false on typed items. */
300
+ openInNewTab: boolean;
278
301
  /** Processed image URL for mega-menu tiles (null when no image set). */
279
302
  imageUrl?: string | null;
280
303
  /** Nested items, up to depth 3. */
@@ -729,6 +752,19 @@ interface ResponseInterceptorData {
729
752
  interface ResponseInterceptor {
730
753
  (response: ResponseInterceptorData): void | Promise<void>;
731
754
  }
755
+ /** One product group ("collection") with its products as standard list items.
756
+ * Groups are curated in the admin (Product groups); storefronts render them
757
+ * as product bands, e.g. a home "collection" section. */
758
+ interface ProductGroup {
759
+ id: string;
760
+ slug: string;
761
+ /** Group type, e.g. "similar" / "upsell" / "recommended" / "collection". */
762
+ type: string;
763
+ /** Name in the requested locale, falling back to the shop default language. */
764
+ name: string;
765
+ description: string | null;
766
+ items: ProductListItem[];
767
+ }
732
768
  interface BundleItem {
733
769
  productId: string;
734
770
  slug: string | null;
@@ -1258,6 +1294,16 @@ declare class CatalogModule {
1258
1294
  }>>;
1259
1295
  /** Get a single bundle by slug */
1260
1296
  getBundle(slug: string): Promise<SdkResult<Bundle>>;
1297
+ /**
1298
+ * One product group ("collection") by slug with its products as standard
1299
+ * list items. Groups are curated in the admin; use this to render curated
1300
+ * product bands. Returns an SdkResult error (404) when the group is
1301
+ * missing or inactive — callers should render nothing in that case.
1302
+ */
1303
+ getProductGroup(slug: string, options?: {
1304
+ locale?: string;
1305
+ currency?: string;
1306
+ }): Promise<SdkResult<ProductGroup>>;
1261
1307
  /** Cross-sell / related / upsell products for a product */
1262
1308
  getCrossSell(productSlug: string): Promise<SdkResult<{
1263
1309
  related: CrossSellItem[];
@@ -1557,4 +1603,4 @@ declare class ShippingModule {
1557
1603
  }>>;
1558
1604
  }
1559
1605
 
1560
- export { type OrderItem as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type SubmitReturnInput as D, type CookieConsent as E, type FilterField as F, type GiftCardBalance as G, type CookieConsentInput as H, type SubmitQuoteInput as I, type BackInStockSubscription as J, type AddToCartInput as K, type AuthTokens as L, type Menu as M, BehioApiError as N, type OrderListItem as O, type ProductsQuery as P, type QuoteRequest as Q, type RegisterInput as R, type ShopInfo as S, type BundleItem as T, type CartDiscount as U, type CartItem as V, type WishlistItem as W, type CheckoutAddress as X, type FulfillmentStatus as Y, type LoginInput as Z, type MessageResponse as _, BehioStorefront as a, type OrderStatus as a0, type PaymentStatus as a1, type ProductPrice as a2, type ProductReview as a3, type ProductVariant as a4, type AddressType as a5, AddressTypes as a6, type BehioErrorCode as a7, type BehioEventHandler as a8, type BehioEventType as a9, type ResponseInterceptorData as aA, type ReturnRequestItem as aB, type ReturnStatusItem as aC, type ReturnableOrderItem as aD, type SdkError as aE, type SdkResult as aF, type ShippingMethodSummary as aG, type ShippingQuote as aH, type ShippingQuoteInput as aI, type ShopScript as aJ, type ShopScriptPlacement as aK, type ShopScriptType as aL, err as aM, ok as aN, toSdkError as aO, BehioNetworkError as aa, type CartBundleLine as ab, type CartBundleLineItem as ac, type CartItemProduct as ad, type CheckoutPaymentMethod as ae, type DataGroupFieldType as af, FulfillmentStatuses as ag, type GiftCardSummary as ah, type MenuItem as ai, type MenuItemRef as aj, type MenuItemType as ak, type OrderStatusHistory as al, OrderStatuses as am, type OrderTracking as an, type PageAttachment as ao, PaymentStatuses as ap, type ProductMedia as aq, type ProductMediaVariant as ar, ProductSort as as, type ProductSortValue as at, type ProductVolumePrice as au, type QuoteItem as av, type RegisterResult as aw, type RequestInterceptor as ax, type RequestInterceptorConfig as ay, type ResponseInterceptor as az, type PaginatedResponse as b, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type Cart as g, type CustomerProfile as h, type CustomerAddress as i, type AddressDetail as j, type OrderDetail as k, type OrderAccessRequestResponse as l, type OrderAccessVerifyResponse as m, type CheckoutInput as n, type PageDetail as o, type Page as p, type ShopScripts as q, type ShopSeo as r, type Bundle as s, type CrossSellItem as t, type ActivePromotion as u, type ProductReviewsResponse as v, type SubmitReviewInput as w, type ReturnableOrder as x, type ReturnStatus as y, type ReturnRequest as z };
1606
+ export { type MessageResponse as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ReturnRequest as D, type SubmitReturnInput as E, type FilterField as F, type GiftCardBalance as G, type CookieConsent as H, type CookieConsentInput as I, type SubmitQuoteInput as J, type BackInStockSubscription as K, type AddToCartInput as L, type Menu as M, type AuthTokens as N, type OrderListItem as O, type ProductsQuery as P, type QuoteRequest as Q, type RegisterInput as R, type ShopInfo as S, BehioApiError as T, type BundleItem as U, type CartDiscount as V, type WishlistItem as W, type CartItem as X, type CheckoutAddress as Y, type FulfillmentStatus as Z, type LoginInput as _, BehioStorefront as a, type OrderItem as a0, type OrderStatus as a1, type PaymentStatus as a2, type ProductPrice as a3, type ProductReview as a4, type ProductVariant as a5, type AddressType as a6, AddressTypes as a7, type BadgeTone as a8, type BehioErrorCode as a9, type RequestInterceptorConfig as aA, type ResponseInterceptor as aB, type ResponseInterceptorData as aC, type ReturnRequestItem as aD, type ReturnStatusItem as aE, type ReturnableOrderItem as aF, type SdkError as aG, type SdkResult as aH, type ShippingMethodSummary as aI, type ShippingQuote as aJ, type ShippingQuoteInput as aK, type ShopScript as aL, type ShopScriptPlacement as aM, type ShopScriptType as aN, err as aO, ok as aP, toSdkError as aQ, type BehioEventHandler as aa, type BehioEventType as ab, BehioNetworkError as ac, type CartBundleLine as ad, type CartBundleLineItem as ae, type CartItemProduct as af, type CheckoutPaymentMethod as ag, type DataGroupFieldType as ah, FulfillmentStatuses as ai, type GiftCardSummary as aj, type MenuItem as ak, type MenuItemRef as al, type MenuItemType as am, type OrderStatusHistory as an, OrderStatuses as ao, type OrderTracking as ap, type PageAttachment as aq, PaymentStatuses as ar, type ProductMedia as as, type ProductMediaVariant as at, ProductSort as au, type ProductSortValue as av, type ProductVolumePrice as aw, type QuoteItem as ax, type RegisterResult as ay, type RequestInterceptor as az, type PaginatedResponse as b, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type Cart as g, type CustomerProfile as h, type CustomerAddress as i, type AddressDetail as j, type OrderDetail as k, type OrderAccessRequestResponse as l, type OrderAccessVerifyResponse as m, type CheckoutInput as n, type PageDetail as o, type Page as p, type ShopScripts as q, type ShopSeo as r, type Bundle as s, type ProductGroup as t, type CrossSellItem as u, type ActivePromotion as v, type ProductReviewsResponse as w, type SubmitReviewInput as x, type ReturnableOrder as y, type ReturnStatus as z };
@@ -263,6 +263,12 @@ interface MenuItemRef {
263
263
  type: MenuItemType;
264
264
  slug: string;
265
265
  }
266
+ /**
267
+ * Badge tone preset for a menu item chip. Maps to storefront design tokens on
268
+ * the template side (SALE -> danger, NEW -> success, ACCENT -> primary,
269
+ * NEUTRAL -> current text color). Custom hex colors override the preset.
270
+ */
271
+ type BadgeTone = "NEUTRAL" | "SALE" | "NEW" | "ACCENT";
266
272
  interface MenuItem {
267
273
  id: string;
268
274
  type: MenuItemType;
@@ -275,6 +281,23 @@ interface MenuItem {
275
281
  ref?: MenuItemRef | null;
276
282
  /** Optional badge chip text (e.g. "Novinka", "Sleva"). */
277
283
  badgeText?: string | null;
284
+ /**
285
+ * Badge tone preset driving the chip colors from storefront tokens. Always
286
+ * present. Custom `badgeColor`/`badgeTextColor` override it when set.
287
+ */
288
+ badgeTone: BadgeTone;
289
+ /** Custom badge background hex (overrides `badgeTone`), or null. */
290
+ badgeColor?: string | null;
291
+ /** Custom badge text hex, or null. */
292
+ badgeTextColor?: string | null;
293
+ /** Custom hex for the item label text itself, or null to inherit. */
294
+ labelColor?: string | null;
295
+ /** Lucide icon slug rendered next to the label, or null. */
296
+ icon?: string | null;
297
+ /** Emphasize this item (bold/accent). */
298
+ isHighlighted: boolean;
299
+ /** LINK items: open the target in a new browser tab. Always false on typed items. */
300
+ openInNewTab: boolean;
278
301
  /** Processed image URL for mega-menu tiles (null when no image set). */
279
302
  imageUrl?: string | null;
280
303
  /** Nested items, up to depth 3. */
@@ -729,6 +752,19 @@ interface ResponseInterceptorData {
729
752
  interface ResponseInterceptor {
730
753
  (response: ResponseInterceptorData): void | Promise<void>;
731
754
  }
755
+ /** One product group ("collection") with its products as standard list items.
756
+ * Groups are curated in the admin (Product groups); storefronts render them
757
+ * as product bands, e.g. a home "collection" section. */
758
+ interface ProductGroup {
759
+ id: string;
760
+ slug: string;
761
+ /** Group type, e.g. "similar" / "upsell" / "recommended" / "collection". */
762
+ type: string;
763
+ /** Name in the requested locale, falling back to the shop default language. */
764
+ name: string;
765
+ description: string | null;
766
+ items: ProductListItem[];
767
+ }
732
768
  interface BundleItem {
733
769
  productId: string;
734
770
  slug: string | null;
@@ -1258,6 +1294,16 @@ declare class CatalogModule {
1258
1294
  }>>;
1259
1295
  /** Get a single bundle by slug */
1260
1296
  getBundle(slug: string): Promise<SdkResult<Bundle>>;
1297
+ /**
1298
+ * One product group ("collection") by slug with its products as standard
1299
+ * list items. Groups are curated in the admin; use this to render curated
1300
+ * product bands. Returns an SdkResult error (404) when the group is
1301
+ * missing or inactive — callers should render nothing in that case.
1302
+ */
1303
+ getProductGroup(slug: string, options?: {
1304
+ locale?: string;
1305
+ currency?: string;
1306
+ }): Promise<SdkResult<ProductGroup>>;
1261
1307
  /** Cross-sell / related / upsell products for a product */
1262
1308
  getCrossSell(productSlug: string): Promise<SdkResult<{
1263
1309
  related: CrossSellItem[];
@@ -1557,4 +1603,4 @@ declare class ShippingModule {
1557
1603
  }>>;
1558
1604
  }
1559
1605
 
1560
- export { type OrderItem as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type SubmitReturnInput as D, type CookieConsent as E, type FilterField as F, type GiftCardBalance as G, type CookieConsentInput as H, type SubmitQuoteInput as I, type BackInStockSubscription as J, type AddToCartInput as K, type AuthTokens as L, type Menu as M, BehioApiError as N, type OrderListItem as O, type ProductsQuery as P, type QuoteRequest as Q, type RegisterInput as R, type ShopInfo as S, type BundleItem as T, type CartDiscount as U, type CartItem as V, type WishlistItem as W, type CheckoutAddress as X, type FulfillmentStatus as Y, type LoginInput as Z, type MessageResponse as _, BehioStorefront as a, type OrderStatus as a0, type PaymentStatus as a1, type ProductPrice as a2, type ProductReview as a3, type ProductVariant as a4, type AddressType as a5, AddressTypes as a6, type BehioErrorCode as a7, type BehioEventHandler as a8, type BehioEventType as a9, type ResponseInterceptorData as aA, type ReturnRequestItem as aB, type ReturnStatusItem as aC, type ReturnableOrderItem as aD, type SdkError as aE, type SdkResult as aF, type ShippingMethodSummary as aG, type ShippingQuote as aH, type ShippingQuoteInput as aI, type ShopScript as aJ, type ShopScriptPlacement as aK, type ShopScriptType as aL, err as aM, ok as aN, toSdkError as aO, BehioNetworkError as aa, type CartBundleLine as ab, type CartBundleLineItem as ac, type CartItemProduct as ad, type CheckoutPaymentMethod as ae, type DataGroupFieldType as af, FulfillmentStatuses as ag, type GiftCardSummary as ah, type MenuItem as ai, type MenuItemRef as aj, type MenuItemType as ak, type OrderStatusHistory as al, OrderStatuses as am, type OrderTracking as an, type PageAttachment as ao, PaymentStatuses as ap, type ProductMedia as aq, type ProductMediaVariant as ar, ProductSort as as, type ProductSortValue as at, type ProductVolumePrice as au, type QuoteItem as av, type RegisterResult as aw, type RequestInterceptor as ax, type RequestInterceptorConfig as ay, type ResponseInterceptor as az, type PaginatedResponse as b, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type Cart as g, type CustomerProfile as h, type CustomerAddress as i, type AddressDetail as j, type OrderDetail as k, type OrderAccessRequestResponse as l, type OrderAccessVerifyResponse as m, type CheckoutInput as n, type PageDetail as o, type Page as p, type ShopScripts as q, type ShopSeo as r, type Bundle as s, type CrossSellItem as t, type ActivePromotion as u, type ProductReviewsResponse as v, type SubmitReviewInput as w, type ReturnableOrder as x, type ReturnStatus as y, type ReturnRequest as z };
1606
+ export { type MessageResponse as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ReturnRequest as D, type SubmitReturnInput as E, type FilterField as F, type GiftCardBalance as G, type CookieConsent as H, type CookieConsentInput as I, type SubmitQuoteInput as J, type BackInStockSubscription as K, type AddToCartInput as L, type Menu as M, type AuthTokens as N, type OrderListItem as O, type ProductsQuery as P, type QuoteRequest as Q, type RegisterInput as R, type ShopInfo as S, BehioApiError as T, type BundleItem as U, type CartDiscount as V, type WishlistItem as W, type CartItem as X, type CheckoutAddress as Y, type FulfillmentStatus as Z, type LoginInput as _, BehioStorefront as a, type OrderItem as a0, type OrderStatus as a1, type PaymentStatus as a2, type ProductPrice as a3, type ProductReview as a4, type ProductVariant as a5, type AddressType as a6, AddressTypes as a7, type BadgeTone as a8, type BehioErrorCode as a9, type RequestInterceptorConfig as aA, type ResponseInterceptor as aB, type ResponseInterceptorData as aC, type ReturnRequestItem as aD, type ReturnStatusItem as aE, type ReturnableOrderItem as aF, type SdkError as aG, type SdkResult as aH, type ShippingMethodSummary as aI, type ShippingQuote as aJ, type ShippingQuoteInput as aK, type ShopScript as aL, type ShopScriptPlacement as aM, type ShopScriptType as aN, err as aO, ok as aP, toSdkError as aQ, type BehioEventHandler as aa, type BehioEventType as ab, BehioNetworkError as ac, type CartBundleLine as ad, type CartBundleLineItem as ae, type CartItemProduct as af, type CheckoutPaymentMethod as ag, type DataGroupFieldType as ah, FulfillmentStatuses as ai, type GiftCardSummary as aj, type MenuItem as ak, type MenuItemRef as al, type MenuItemType as am, type OrderStatusHistory as an, OrderStatuses as ao, type OrderTracking as ap, type PageAttachment as aq, PaymentStatuses as ar, type ProductMedia as as, type ProductMediaVariant as at, ProductSort as au, type ProductSortValue as av, type ProductVolumePrice as aw, type QuoteItem as ax, type RegisterResult as ay, type RequestInterceptor as az, type PaginatedResponse as b, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type Cart as g, type CustomerProfile as h, type CustomerAddress as i, type AddressDetail as j, type OrderDetail as k, type OrderAccessRequestResponse as l, type OrderAccessVerifyResponse as m, type CheckoutInput as n, type PageDetail as o, type Page as p, type ShopScripts as q, type ShopSeo as r, type Bundle as s, type ProductGroup as t, type CrossSellItem as u, type ActivePromotion as v, type ProductReviewsResponse as w, type SubmitReviewInput as x, type ReturnableOrder as y, type ReturnStatus as z };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { u as ActivePromotion, K as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a5 as AddressType, a6 as AddressTypes, L as AuthTokens, J as BackInStockSubscription, N as BehioApiError, a7 as BehioErrorCode, a8 as BehioEventHandler, a9 as BehioEventType, aa as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, s as Bundle, T as BundleItem, g as Cart, ab as CartBundleLine, ac as CartBundleLineItem, U as CartDiscount, V as CartItem, ad as CartItemProduct, C as Category, e as CategoryDetail, X as CheckoutAddress, n as CheckoutInput, ae as CheckoutPaymentMethod, E as CookieConsent, H as CookieConsentInput, t as CrossSellItem, i as CustomerAddress, h as CustomerProfile, af as DataGroupFieldType, F as FilterField, Y as FulfillmentStatus, ag as FulfillmentStatuses, G as GiftCardBalance, ah as GiftCardSummary, Z as LoginInput, M as Menu, ai as MenuItem, aj as MenuItemRef, ak as MenuItemType, _ as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, $ as OrderItem, O as OrderListItem, a0 as OrderStatus, al as OrderStatusHistory, am as OrderStatuses, an as OrderTracking, p as Page, ao as PageAttachment, o as PageDetail, b as PaginatedResponse, a1 as PaymentStatus, ap as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, aq as ProductMedia, ar as ProductMediaVariant, a2 as ProductPrice, a3 as ProductReview, v as ProductReviewsResponse, as as ProductSort, at as ProductSortValue, a4 as ProductVariant, au as ProductVolumePrice, P as ProductsQuery, av as QuoteItem, Q as QuoteRequest, R as RegisterInput, aw as RegisterResult, ax as RequestInterceptor, ay as RequestInterceptorConfig, az as ResponseInterceptor, aA as ResponseInterceptorData, z as ReturnRequest, aB as ReturnRequestItem, y as ReturnStatus, aC as ReturnStatusItem, x as ReturnableOrder, aD as ReturnableOrderItem, aE as SdkError, aF as SdkResult, aG as ShippingMethodSummary, aH as ShippingQuote, aI as ShippingQuoteInput, S as ShopInfo, aJ as ShopScript, aK as ShopScriptPlacement, aL as ShopScriptType, q as ShopScripts, r as ShopSeo, I as SubmitQuoteInput, D as SubmitReturnInput, w as SubmitReviewInput, W as WishlistItem, aM as err, aN as ok, aO as toSdkError } from './client-76vvJ0_n.mjs';
1
+ export { v as ActivePromotion, L as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a6 as AddressType, a7 as AddressTypes, N as AuthTokens, K as BackInStockSubscription, a8 as BadgeTone, T as BehioApiError, a9 as BehioErrorCode, aa as BehioEventHandler, ab as BehioEventType, ac as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, s as Bundle, U as BundleItem, g as Cart, ad as CartBundleLine, ae as CartBundleLineItem, V as CartDiscount, X as CartItem, af as CartItemProduct, C as Category, e as CategoryDetail, Y as CheckoutAddress, n as CheckoutInput, ag as CheckoutPaymentMethod, H as CookieConsent, I as CookieConsentInput, u as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ah as DataGroupFieldType, F as FilterField, Z as FulfillmentStatus, ai as FulfillmentStatuses, G as GiftCardBalance, aj as GiftCardSummary, _ as LoginInput, M as Menu, ak as MenuItem, al as MenuItemRef, am as MenuItemType, $ as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, a0 as OrderItem, O as OrderListItem, a1 as OrderStatus, an as OrderStatusHistory, ao as OrderStatuses, ap as OrderTracking, p as Page, aq as PageAttachment, o as PageDetail, b as PaginatedResponse, a2 as PaymentStatus, ar as PaymentStatuses, d as ProductDetail, t as ProductGroup, f as ProductLabel, c as ProductListItem, as as ProductMedia, at as ProductMediaVariant, a3 as ProductPrice, a4 as ProductReview, w as ProductReviewsResponse, au as ProductSort, av as ProductSortValue, a5 as ProductVariant, aw as ProductVolumePrice, P as ProductsQuery, ax as QuoteItem, Q as QuoteRequest, R as RegisterInput, ay as RegisterResult, az as RequestInterceptor, aA as RequestInterceptorConfig, aB as ResponseInterceptor, aC as ResponseInterceptorData, D as ReturnRequest, aD as ReturnRequestItem, z as ReturnStatus, aE as ReturnStatusItem, y as ReturnableOrder, aF as ReturnableOrderItem, aG as SdkError, aH as SdkResult, aI as ShippingMethodSummary, aJ as ShippingQuote, aK as ShippingQuoteInput, S as ShopInfo, aL as ShopScript, aM as ShopScriptPlacement, aN as ShopScriptType, q as ShopScripts, r as ShopSeo, J as SubmitQuoteInput, E as SubmitReturnInput, x as SubmitReviewInput, W as WishlistItem, aO as err, aP as ok, aQ as toSdkError } from './client-DL533jvY.mjs';
2
2
 
3
3
  /**
4
4
  * Format a price amount with currency using Intl.NumberFormat.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { u as ActivePromotion, K as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a5 as AddressType, a6 as AddressTypes, L as AuthTokens, J as BackInStockSubscription, N as BehioApiError, a7 as BehioErrorCode, a8 as BehioEventHandler, a9 as BehioEventType, aa as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, s as Bundle, T as BundleItem, g as Cart, ab as CartBundleLine, ac as CartBundleLineItem, U as CartDiscount, V as CartItem, ad as CartItemProduct, C as Category, e as CategoryDetail, X as CheckoutAddress, n as CheckoutInput, ae as CheckoutPaymentMethod, E as CookieConsent, H as CookieConsentInput, t as CrossSellItem, i as CustomerAddress, h as CustomerProfile, af as DataGroupFieldType, F as FilterField, Y as FulfillmentStatus, ag as FulfillmentStatuses, G as GiftCardBalance, ah as GiftCardSummary, Z as LoginInput, M as Menu, ai as MenuItem, aj as MenuItemRef, ak as MenuItemType, _ as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, $ as OrderItem, O as OrderListItem, a0 as OrderStatus, al as OrderStatusHistory, am as OrderStatuses, an as OrderTracking, p as Page, ao as PageAttachment, o as PageDetail, b as PaginatedResponse, a1 as PaymentStatus, ap as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, aq as ProductMedia, ar as ProductMediaVariant, a2 as ProductPrice, a3 as ProductReview, v as ProductReviewsResponse, as as ProductSort, at as ProductSortValue, a4 as ProductVariant, au as ProductVolumePrice, P as ProductsQuery, av as QuoteItem, Q as QuoteRequest, R as RegisterInput, aw as RegisterResult, ax as RequestInterceptor, ay as RequestInterceptorConfig, az as ResponseInterceptor, aA as ResponseInterceptorData, z as ReturnRequest, aB as ReturnRequestItem, y as ReturnStatus, aC as ReturnStatusItem, x as ReturnableOrder, aD as ReturnableOrderItem, aE as SdkError, aF as SdkResult, aG as ShippingMethodSummary, aH as ShippingQuote, aI as ShippingQuoteInput, S as ShopInfo, aJ as ShopScript, aK as ShopScriptPlacement, aL as ShopScriptType, q as ShopScripts, r as ShopSeo, I as SubmitQuoteInput, D as SubmitReturnInput, w as SubmitReviewInput, W as WishlistItem, aM as err, aN as ok, aO as toSdkError } from './client-76vvJ0_n.js';
1
+ export { v as ActivePromotion, L as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a6 as AddressType, a7 as AddressTypes, N as AuthTokens, K as BackInStockSubscription, a8 as BadgeTone, T as BehioApiError, a9 as BehioErrorCode, aa as BehioEventHandler, ab as BehioEventType, ac as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, s as Bundle, U as BundleItem, g as Cart, ad as CartBundleLine, ae as CartBundleLineItem, V as CartDiscount, X as CartItem, af as CartItemProduct, C as Category, e as CategoryDetail, Y as CheckoutAddress, n as CheckoutInput, ag as CheckoutPaymentMethod, H as CookieConsent, I as CookieConsentInput, u as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ah as DataGroupFieldType, F as FilterField, Z as FulfillmentStatus, ai as FulfillmentStatuses, G as GiftCardBalance, aj as GiftCardSummary, _ as LoginInput, M as Menu, ak as MenuItem, al as MenuItemRef, am as MenuItemType, $ as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, a0 as OrderItem, O as OrderListItem, a1 as OrderStatus, an as OrderStatusHistory, ao as OrderStatuses, ap as OrderTracking, p as Page, aq as PageAttachment, o as PageDetail, b as PaginatedResponse, a2 as PaymentStatus, ar as PaymentStatuses, d as ProductDetail, t as ProductGroup, f as ProductLabel, c as ProductListItem, as as ProductMedia, at as ProductMediaVariant, a3 as ProductPrice, a4 as ProductReview, w as ProductReviewsResponse, au as ProductSort, av as ProductSortValue, a5 as ProductVariant, aw as ProductVolumePrice, P as ProductsQuery, ax as QuoteItem, Q as QuoteRequest, R as RegisterInput, ay as RegisterResult, az as RequestInterceptor, aA as RequestInterceptorConfig, aB as ResponseInterceptor, aC as ResponseInterceptorData, D as ReturnRequest, aD as ReturnRequestItem, z as ReturnStatus, aE as ReturnStatusItem, y as ReturnableOrder, aF as ReturnableOrderItem, aG as SdkError, aH as SdkResult, aI as ShippingMethodSummary, aJ as ShippingQuote, aK as ShippingQuoteInput, S as ShopInfo, aL as ShopScript, aM as ShopScriptPlacement, aN as ShopScriptType, q as ShopScripts, r as ShopSeo, J as SubmitQuoteInput, E as SubmitReturnInput, x as SubmitReviewInput, W as WishlistItem, aO as err, aP as ok, aQ as toSdkError } from './client-DL533jvY.js';
2
2
 
3
3
  /**
4
4
  * Format a price amount with currency using Intl.NumberFormat.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var _chunkJIAOZ5YWjs = require('./chunk-JIAOZ5YW.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkMUSTZBNRjs = require('./chunk-MUSTZBNR.js');
17
+ var _chunkHOL6WRHRjs = require('./chunk-HOL6WRHR.js');
18
18
 
19
19
 
20
20
 
@@ -29,4 +29,4 @@ var _chunkMUSTZBNRjs = require('./chunk-MUSTZBNR.js');
29
29
 
30
30
 
31
31
 
32
- exports.AddressTypes = _chunkMUSTZBNRjs.AddressTypes; exports.BehioApiError = _chunkMUSTZBNRjs.BehioApiError; exports.BehioNetworkError = _chunkMUSTZBNRjs.BehioNetworkError; exports.BehioStorefront = _chunkMUSTZBNRjs.BehioStorefront; exports.FulfillmentStatuses = _chunkMUSTZBNRjs.FulfillmentStatuses; exports.OrderStatuses = _chunkMUSTZBNRjs.OrderStatuses; exports.PaymentStatuses = _chunkMUSTZBNRjs.PaymentStatuses; exports.ProductSort = _chunkMUSTZBNRjs.ProductSort; exports.err = _chunkMUSTZBNRjs.err; exports.formatPrice = _chunkJIAOZ5YWjs.formatPrice; exports.ok = _chunkMUSTZBNRjs.ok; exports.toSdkError = _chunkMUSTZBNRjs.toSdkError; exports.trackEcommerceEvent = _chunkJIAOZ5YWjs.trackEcommerceEvent;
32
+ exports.AddressTypes = _chunkHOL6WRHRjs.AddressTypes; exports.BehioApiError = _chunkHOL6WRHRjs.BehioApiError; exports.BehioNetworkError = _chunkHOL6WRHRjs.BehioNetworkError; exports.BehioStorefront = _chunkHOL6WRHRjs.BehioStorefront; exports.FulfillmentStatuses = _chunkHOL6WRHRjs.FulfillmentStatuses; exports.OrderStatuses = _chunkHOL6WRHRjs.OrderStatuses; exports.PaymentStatuses = _chunkHOL6WRHRjs.PaymentStatuses; exports.ProductSort = _chunkHOL6WRHRjs.ProductSort; exports.err = _chunkHOL6WRHRjs.err; exports.formatPrice = _chunkJIAOZ5YWjs.formatPrice; exports.ok = _chunkHOL6WRHRjs.ok; exports.toSdkError = _chunkHOL6WRHRjs.toSdkError; exports.trackEcommerceEvent = _chunkJIAOZ5YWjs.trackEcommerceEvent;
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  err,
15
15
  ok,
16
16
  toSdkError
17
- } from "./chunk-V5WU3XI4.mjs";
17
+ } from "./chunk-O5UHKZPG.mjs";
18
18
  export {
19
19
  AddressTypes,
20
20
  BehioApiError,
package/dist/next.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-76vvJ0_n.mjs';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-DL533jvY.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 { B as BehioStorefrontConfig, a as BehioStorefront } from './client-76vvJ0_n.js';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-DL533jvY.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 _chunkMUSTZBNRjs = require('./chunk-MUSTZBNR.js');
3
+ var _chunkHOL6WRHRjs = require('./chunk-HOL6WRHR.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, _chunkMUSTZBNRjs.BehioStorefront)({
21
+ const client = new (0, _chunkHOL6WRHRjs.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-V5WU3XI4.mjs";
3
+ } from "./chunk-O5UHKZPG.mjs";
4
4
 
5
5
  // src/next.ts
6
6
  import { cookies } from "next/headers";
package/dist/react.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
- import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as Cart, h as CustomerProfile, R as RegisterInput, i as CustomerAddress, A as AddressSuggestion, j as AddressDetail, O as OrderListItem, k as OrderDetail, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, n as CheckoutInput, o as PageDetail, p as Page, S as ShopInfo, q as ShopScripts, r as ShopSeo, s as Bundle, t as CrossSellItem, u as ActivePromotion, G as GiftCardBalance, W as WishlistItem, v as ProductReviewsResponse, w as SubmitReviewInput, x as ReturnableOrder, y as ReturnStatus, z as ReturnRequest, D as SubmitReturnInput, E as CookieConsent, H as CookieConsentInput, Q as QuoteRequest, I as SubmitQuoteInput, J as BackInStockSubscription } from './client-76vvJ0_n.mjs';
5
- export { K as AddToCartInput, L as AuthTokens, N as BehioApiError, T as BundleItem, U as CartDiscount, V as CartItem, X as CheckoutAddress, Y as FulfillmentStatus, Z as LoginInput, _ as MessageResponse, $ as OrderItem, a0 as OrderStatus, a1 as PaymentStatus, a2 as ProductPrice, a3 as ProductReview, a4 as ProductVariant } from './client-76vvJ0_n.mjs';
4
+ import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as Cart, h as CustomerProfile, R as RegisterInput, i as CustomerAddress, A as AddressSuggestion, j as AddressDetail, O as OrderListItem, k as OrderDetail, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, n as CheckoutInput, o as PageDetail, p as Page, S as ShopInfo, q as ShopScripts, r as ShopSeo, s as Bundle, t as ProductGroup, u as CrossSellItem, v as ActivePromotion, G as GiftCardBalance, W as WishlistItem, w as ProductReviewsResponse, x as SubmitReviewInput, y as ReturnableOrder, z as ReturnStatus, D as ReturnRequest, E as SubmitReturnInput, H as CookieConsent, I as CookieConsentInput, Q as QuoteRequest, J as SubmitQuoteInput, K as BackInStockSubscription } from './client-DL533jvY.mjs';
5
+ export { L as AddToCartInput, N as AuthTokens, T as BehioApiError, U as BundleItem, V as CartDiscount, X as CartItem, Y as CheckoutAddress, Z as FulfillmentStatus, _ as LoginInput, $ as MessageResponse, a0 as OrderItem, a1 as OrderStatus, a2 as PaymentStatus, a3 as ProductPrice, a4 as ProductReview, a5 as ProductVariant } from './client-DL533jvY.mjs';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
7
  export { EcommerceEventName, EcommerceItem, EcommercePayload, formatPrice, trackEcommerceEvent } from './index.mjs';
8
8
 
@@ -552,6 +552,14 @@ declare function useBundle(slug: string | undefined, options?: {
552
552
  initialData?: Bundle;
553
553
  }): _tanstack_react_query.UseQueryResult<NoInfer<Bundle>, Error>;
554
554
 
555
+ /** One product group ("collection") by slug with its products as list items. */
556
+ declare function useProductGroup(slug: string | undefined, options?: {
557
+ locale?: string;
558
+ currency?: string;
559
+ enabled?: boolean;
560
+ initialData?: ProductGroup;
561
+ }): _tanstack_react_query.UseQueryResult<NoInfer<ProductGroup>, Error>;
562
+
555
563
  type CrossSellResponse = {
556
564
  related: CrossSellItem[];
557
565
  upsell: CrossSellItem[];
@@ -1061,4 +1069,4 @@ declare function useNotifyWhenAvailable(): _tanstack_react_query.UseMutationResu
1061
1069
  */
1062
1070
  declare function useBehioClient(): BehioStorefront;
1063
1071
 
1064
- export { ActivePromotion, BehioAnalyticsTracker, BehioProvider, type BehioProviderProps, Bundle, Cart, Category, CategoryDetail, CheckoutInput, CookieConsent, CookieConsentInput, CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, CustomerAddress, CustomerProfile, FilterField, GiftCardBalance, OrderDetail, OrderListItem, Page, PageDetail, PaginatedResponse, ProductDetail, ProductLabel, ProductListItem, ProductReviewsResponse, ProductsQuery, QuoteRequest, RegisterInput, ReturnRequest, ShopInfo, ShopSeo, type StorageAdapter, StorefrontScripts, type StorefrontScriptsProps, SubmitQuoteInput, SubmitReturnInput, SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UseProductOptions, type UseProductsOptions, type UseSearchOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, WishlistItem, cookieStorage, createMemoryStorage, detectStorage, localStorageAdapter, memoryStorage, useAddressAutocomplete, useAddresses, useAuth, useBehio, useBehioClient, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCheckout, useCookieConsent, useCrossSell, useCurrency, useCustomer, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLookupReturnableOrder, useMenu, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, useProduct, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShopInfo, useShopScripts, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useWishlist };
1072
+ export { ActivePromotion, BehioAnalyticsTracker, BehioProvider, type BehioProviderProps, Bundle, Cart, Category, CategoryDetail, CheckoutInput, CookieConsent, CookieConsentInput, CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, CustomerAddress, CustomerProfile, FilterField, GiftCardBalance, OrderDetail, OrderListItem, Page, PageDetail, PaginatedResponse, ProductDetail, ProductLabel, ProductListItem, ProductReviewsResponse, ProductsQuery, QuoteRequest, RegisterInput, ReturnRequest, ShopInfo, ShopSeo, type StorageAdapter, StorefrontScripts, type StorefrontScriptsProps, SubmitQuoteInput, SubmitReturnInput, SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UseProductOptions, type UseProductsOptions, type UseSearchOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, WishlistItem, cookieStorage, createMemoryStorage, detectStorage, localStorageAdapter, memoryStorage, useAddressAutocomplete, useAddresses, useAuth, useBehio, useBehioClient, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCheckout, useCookieConsent, useCrossSell, useCurrency, useCustomer, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLookupReturnableOrder, useMenu, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, useProduct, useProductGroup, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShopInfo, useShopScripts, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useWishlist };
package/dist/react.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
- import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as Cart, h as CustomerProfile, R as RegisterInput, i as CustomerAddress, A as AddressSuggestion, j as AddressDetail, O as OrderListItem, k as OrderDetail, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, n as CheckoutInput, o as PageDetail, p as Page, S as ShopInfo, q as ShopScripts, r as ShopSeo, s as Bundle, t as CrossSellItem, u as ActivePromotion, G as GiftCardBalance, W as WishlistItem, v as ProductReviewsResponse, w as SubmitReviewInput, x as ReturnableOrder, y as ReturnStatus, z as ReturnRequest, D as SubmitReturnInput, E as CookieConsent, H as CookieConsentInput, Q as QuoteRequest, I as SubmitQuoteInput, J as BackInStockSubscription } from './client-76vvJ0_n.js';
5
- export { K as AddToCartInput, L as AuthTokens, N as BehioApiError, T as BundleItem, U as CartDiscount, V as CartItem, X as CheckoutAddress, Y as FulfillmentStatus, Z as LoginInput, _ as MessageResponse, $ as OrderItem, a0 as OrderStatus, a1 as PaymentStatus, a2 as ProductPrice, a3 as ProductReview, a4 as ProductVariant } from './client-76vvJ0_n.js';
4
+ import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as Cart, h as CustomerProfile, R as RegisterInput, i as CustomerAddress, A as AddressSuggestion, j as AddressDetail, O as OrderListItem, k as OrderDetail, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, n as CheckoutInput, o as PageDetail, p as Page, S as ShopInfo, q as ShopScripts, r as ShopSeo, s as Bundle, t as ProductGroup, u as CrossSellItem, v as ActivePromotion, G as GiftCardBalance, W as WishlistItem, w as ProductReviewsResponse, x as SubmitReviewInput, y as ReturnableOrder, z as ReturnStatus, D as ReturnRequest, E as SubmitReturnInput, H as CookieConsent, I as CookieConsentInput, Q as QuoteRequest, J as SubmitQuoteInput, K as BackInStockSubscription } from './client-DL533jvY.js';
5
+ export { L as AddToCartInput, N as AuthTokens, T as BehioApiError, U as BundleItem, V as CartDiscount, X as CartItem, Y as CheckoutAddress, Z as FulfillmentStatus, _ as LoginInput, $ as MessageResponse, a0 as OrderItem, a1 as OrderStatus, a2 as PaymentStatus, a3 as ProductPrice, a4 as ProductReview, a5 as ProductVariant } from './client-DL533jvY.js';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
7
  export { EcommerceEventName, EcommerceItem, EcommercePayload, formatPrice, trackEcommerceEvent } from './index.js';
8
8
 
@@ -552,6 +552,14 @@ declare function useBundle(slug: string | undefined, options?: {
552
552
  initialData?: Bundle;
553
553
  }): _tanstack_react_query.UseQueryResult<NoInfer<Bundle>, Error>;
554
554
 
555
+ /** One product group ("collection") by slug with its products as list items. */
556
+ declare function useProductGroup(slug: string | undefined, options?: {
557
+ locale?: string;
558
+ currency?: string;
559
+ enabled?: boolean;
560
+ initialData?: ProductGroup;
561
+ }): _tanstack_react_query.UseQueryResult<NoInfer<ProductGroup>, Error>;
562
+
555
563
  type CrossSellResponse = {
556
564
  related: CrossSellItem[];
557
565
  upsell: CrossSellItem[];
@@ -1061,4 +1069,4 @@ declare function useNotifyWhenAvailable(): _tanstack_react_query.UseMutationResu
1061
1069
  */
1062
1070
  declare function useBehioClient(): BehioStorefront;
1063
1071
 
1064
- export { ActivePromotion, BehioAnalyticsTracker, BehioProvider, type BehioProviderProps, Bundle, Cart, Category, CategoryDetail, CheckoutInput, CookieConsent, CookieConsentInput, CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, CustomerAddress, CustomerProfile, FilterField, GiftCardBalance, OrderDetail, OrderListItem, Page, PageDetail, PaginatedResponse, ProductDetail, ProductLabel, ProductListItem, ProductReviewsResponse, ProductsQuery, QuoteRequest, RegisterInput, ReturnRequest, ShopInfo, ShopSeo, type StorageAdapter, StorefrontScripts, type StorefrontScriptsProps, SubmitQuoteInput, SubmitReturnInput, SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UseProductOptions, type UseProductsOptions, type UseSearchOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, WishlistItem, cookieStorage, createMemoryStorage, detectStorage, localStorageAdapter, memoryStorage, useAddressAutocomplete, useAddresses, useAuth, useBehio, useBehioClient, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCheckout, useCookieConsent, useCrossSell, useCurrency, useCustomer, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLookupReturnableOrder, useMenu, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, useProduct, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShopInfo, useShopScripts, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useWishlist };
1072
+ export { ActivePromotion, BehioAnalyticsTracker, BehioProvider, type BehioProviderProps, Bundle, Cart, Category, CategoryDetail, CheckoutInput, CookieConsent, CookieConsentInput, CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, CustomerAddress, CustomerProfile, FilterField, GiftCardBalance, OrderDetail, OrderListItem, Page, PageDetail, PaginatedResponse, ProductDetail, ProductLabel, ProductListItem, ProductReviewsResponse, ProductsQuery, QuoteRequest, RegisterInput, ReturnRequest, ShopInfo, ShopSeo, type StorageAdapter, StorefrontScripts, type StorefrontScriptsProps, SubmitQuoteInput, SubmitReturnInput, SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UseProductOptions, type UseProductsOptions, type UseSearchOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, WishlistItem, cookieStorage, createMemoryStorage, detectStorage, localStorageAdapter, memoryStorage, useAddressAutocomplete, useAddresses, useAuth, useBehio, useBehioClient, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCheckout, useCookieConsent, useCrossSell, useCurrency, useCustomer, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLookupReturnableOrder, useMenu, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, useProduct, useProductGroup, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShopInfo, useShopScripts, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useWishlist };
package/dist/react.js CHANGED
@@ -4,7 +4,7 @@
4
4
  var _chunkJIAOZ5YWjs = require('./chunk-JIAOZ5YW.js');
5
5
 
6
6
 
7
- var _chunkMUSTZBNRjs = require('./chunk-MUSTZBNR.js');
7
+ var _chunkHOL6WRHRjs = require('./chunk-HOL6WRHR.js');
8
8
 
9
9
  // src/react/provider.tsx
10
10
  var _react = require('react');
@@ -134,7 +134,7 @@ function BehioProvider({
134
134
  const [activeCurrency, setActiveCurrency] = _react.useState.call(void 0, resolveInitialCurrency);
135
135
  const clientRef = _react.useRef.call(void 0, null);
136
136
  if (!clientRef.current) {
137
- clientRef.current = new (0, _chunkMUSTZBNRjs.BehioStorefront)({
137
+ clientRef.current = new (0, _chunkHOL6WRHRjs.BehioStorefront)({
138
138
  apiKey,
139
139
  baseUrl,
140
140
  ...shopDomain ? { shopDomain } : {},
@@ -1528,6 +1528,23 @@ function useBundle(slug, options) {
1528
1528
  });
1529
1529
  }
1530
1530
 
1531
+ // src/react/hooks/use-product-group.ts
1532
+
1533
+ function useProductGroup(slug, options) {
1534
+ const { client } = useBehio();
1535
+ return _reactquery.useQuery.call(void 0, {
1536
+ queryKey: ["behio", "product-group", slug, _optionalChain([options, 'optionalAccess', _84 => _84.locale]), _optionalChain([options, 'optionalAccess', _85 => _85.currency])],
1537
+ queryFn: () => unwrap(
1538
+ client.catalog.getProductGroup(slug, {
1539
+ locale: _optionalChain([options, 'optionalAccess', _86 => _86.locale]),
1540
+ currency: _optionalChain([options, 'optionalAccess', _87 => _87.currency])
1541
+ })
1542
+ ),
1543
+ enabled: Boolean(slug) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _88 => _88.enabled]), () => ( true))),
1544
+ initialData: _optionalChain([options, 'optionalAccess', _89 => _89.initialData])
1545
+ });
1546
+ }
1547
+
1531
1548
  // src/react/hooks/use-cross-sell.ts
1532
1549
 
1533
1550
  function useCrossSell(productSlug, options) {
@@ -1535,8 +1552,8 @@ function useCrossSell(productSlug, options) {
1535
1552
  return _reactquery.useQuery.call(void 0, {
1536
1553
  queryKey: ["behio", "cross-sell", productSlug],
1537
1554
  queryFn: () => unwrap(client.catalog.getCrossSell(productSlug)),
1538
- enabled: Boolean(productSlug) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _84 => _84.enabled]), () => ( true))),
1539
- initialData: _optionalChain([options, 'optionalAccess', _85 => _85.initialData])
1555
+ enabled: Boolean(productSlug) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _90 => _90.enabled]), () => ( true))),
1556
+ initialData: _optionalChain([options, 'optionalAccess', _91 => _91.initialData])
1540
1557
  });
1541
1558
  }
1542
1559
 
@@ -1547,8 +1564,8 @@ function useProductPromotions(productSlug, options) {
1547
1564
  return _reactquery.useQuery.call(void 0, {
1548
1565
  queryKey: ["behio", "product-promotions", productSlug],
1549
1566
  queryFn: () => unwrap(client.catalog.getProductPromotions(productSlug)),
1550
- enabled: Boolean(productSlug) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _86 => _86.enabled]), () => ( true))),
1551
- refetchInterval: _optionalChain([options, 'optionalAccess', _87 => _87.refetchIntervalMs])
1567
+ enabled: Boolean(productSlug) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _92 => _92.enabled]), () => ( true))),
1568
+ refetchInterval: _optionalChain([options, 'optionalAccess', _93 => _93.refetchIntervalMs])
1552
1569
  });
1553
1570
  }
1554
1571
 
@@ -1556,11 +1573,11 @@ function useProductPromotions(productSlug, options) {
1556
1573
 
1557
1574
  function useGiftCardBalance(code, options) {
1558
1575
  const { client } = useBehio();
1559
- const trimmed = _optionalChain([code, 'optionalAccess', _88 => _88.trim, 'call', _89 => _89()]);
1576
+ const trimmed = _optionalChain([code, 'optionalAccess', _94 => _94.trim, 'call', _95 => _95()]);
1560
1577
  return _reactquery.useQuery.call(void 0, {
1561
1578
  queryKey: ["behio", "gift-card-balance", trimmed],
1562
1579
  queryFn: () => unwrap(client.catalog.checkGiftCard(trimmed)),
1563
- enabled: Boolean(trimmed && trimmed.length >= 6) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _90 => _90.enabled]), () => ( true)))
1580
+ enabled: Boolean(trimmed && trimmed.length >= 6) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _96 => _96.enabled]), () => ( true)))
1564
1581
  });
1565
1582
  }
1566
1583
 
@@ -1572,7 +1589,7 @@ function useWishlist(options) {
1572
1589
  const query = _reactquery.useQuery.call(void 0, {
1573
1590
  queryKey: ["behio", "wishlist"],
1574
1591
  queryFn: () => unwrap(client.wishlist.get()),
1575
- enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _91 => _91.enabled]), () => ( true))
1592
+ enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _97 => _97.enabled]), () => ( true))
1576
1593
  });
1577
1594
  const addMutation = _reactquery.useMutation.call(void 0, {
1578
1595
  mutationFn: (productId) => unwrap(client.wishlist.add(productId)),
@@ -1604,9 +1621,9 @@ function useIsInWishlist(productId) {
1604
1621
  function useProductReviews(productId, options) {
1605
1622
  const { client } = useBehio();
1606
1623
  return _reactquery.useQuery.call(void 0, {
1607
- queryKey: ["behio", "reviews", productId, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _92 => _92.page]), () => ( 1))],
1608
- queryFn: () => unwrap(client.reviews.getProductReviews(productId, _optionalChain([options, 'optionalAccess', _93 => _93.page]), _optionalChain([options, 'optionalAccess', _94 => _94.limit]))),
1609
- enabled: Boolean(productId) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _95 => _95.enabled]), () => ( true)))
1624
+ queryKey: ["behio", "reviews", productId, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _98 => _98.page]), () => ( 1))],
1625
+ queryFn: () => unwrap(client.reviews.getProductReviews(productId, _optionalChain([options, 'optionalAccess', _99 => _99.page]), _optionalChain([options, 'optionalAccess', _100 => _100.limit]))),
1626
+ enabled: Boolean(productId) && (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _101 => _101.enabled]), () => ( true)))
1610
1627
  });
1611
1628
  }
1612
1629
  function useSubmitReview() {
@@ -1721,4 +1738,5 @@ function useNotifyWhenAvailable() {
1721
1738
 
1722
1739
 
1723
1740
 
1724
- exports.BehioAnalyticsTracker = BehioAnalyticsTracker; exports.BehioProvider = BehioProvider; exports.CurrencySwitcher = CurrencySwitcher; exports.StorefrontScripts = StorefrontScripts; exports.cookieStorage = cookieStorage; exports.createMemoryStorage = createMemoryStorage; exports.detectStorage = detectStorage; exports.formatPrice = _chunkJIAOZ5YWjs.formatPrice; exports.localStorageAdapter = localStorageAdapter; exports.memoryStorage = memoryStorage; exports.trackEcommerceEvent = _chunkJIAOZ5YWjs.trackEcommerceEvent; exports.useAddressAutocomplete = useAddressAutocomplete; exports.useAddresses = useAddresses; exports.useAuth = useAuth; exports.useBehio = useBehio; exports.useBehioClient = useBehioClient; exports.useBundle = useBundle; exports.useBundles = useBundles; exports.useCart = useCart; exports.useCartCount = useCartCount; exports.useCategories = useCategories; exports.useCategory = useCategory; exports.useCheckout = useCheckout; exports.useCookieConsent = useCookieConsent; exports.useCrossSell = useCrossSell; exports.useCurrency = useCurrency; exports.useCustomer = useCustomer; exports.useFeatured = useFeatured; exports.useFilters = useFilters; exports.useGiftCardBalance = useGiftCardBalance; exports.useIsInWishlist = useIsInWishlist; exports.useLabels = useLabels; exports.useLookupReturnableOrder = useLookupReturnableOrder; exports.useMenu = useMenu; exports.useNotifyWhenAvailable = useNotifyWhenAvailable; exports.useOrder = useOrder; exports.useOrderAccess = useOrderAccess; exports.useOrders = useOrders; exports.usePage = usePage; exports.usePages = usePages; exports.useProduct = useProduct; exports.useProductPromotions = useProductPromotions; exports.useProductReviews = useProductReviews; exports.useProducts = useProducts; exports.useQuoteStatus = useQuoteStatus; exports.useReturnStatus = useReturnStatus; exports.useSearch = useSearch; exports.useShopInfo = useShopInfo; exports.useShopScripts = useShopScripts; exports.useShopSeo = useShopSeo; exports.useSubmitQuote = useSubmitQuote; exports.useSubmitReturn = useSubmitReturn; exports.useSubmitReview = useSubmitReview; exports.useWishlist = useWishlist;
1741
+
1742
+ exports.BehioAnalyticsTracker = BehioAnalyticsTracker; exports.BehioProvider = BehioProvider; exports.CurrencySwitcher = CurrencySwitcher; exports.StorefrontScripts = StorefrontScripts; exports.cookieStorage = cookieStorage; exports.createMemoryStorage = createMemoryStorage; exports.detectStorage = detectStorage; exports.formatPrice = _chunkJIAOZ5YWjs.formatPrice; exports.localStorageAdapter = localStorageAdapter; exports.memoryStorage = memoryStorage; exports.trackEcommerceEvent = _chunkJIAOZ5YWjs.trackEcommerceEvent; exports.useAddressAutocomplete = useAddressAutocomplete; exports.useAddresses = useAddresses; exports.useAuth = useAuth; exports.useBehio = useBehio; exports.useBehioClient = useBehioClient; exports.useBundle = useBundle; exports.useBundles = useBundles; exports.useCart = useCart; exports.useCartCount = useCartCount; exports.useCategories = useCategories; exports.useCategory = useCategory; exports.useCheckout = useCheckout; exports.useCookieConsent = useCookieConsent; exports.useCrossSell = useCrossSell; exports.useCurrency = useCurrency; exports.useCustomer = useCustomer; exports.useFeatured = useFeatured; exports.useFilters = useFilters; exports.useGiftCardBalance = useGiftCardBalance; exports.useIsInWishlist = useIsInWishlist; exports.useLabels = useLabels; exports.useLookupReturnableOrder = useLookupReturnableOrder; exports.useMenu = useMenu; exports.useNotifyWhenAvailable = useNotifyWhenAvailable; exports.useOrder = useOrder; exports.useOrderAccess = useOrderAccess; exports.useOrders = useOrders; exports.usePage = usePage; exports.usePages = usePages; exports.useProduct = useProduct; exports.useProductGroup = useProductGroup; exports.useProductPromotions = useProductPromotions; exports.useProductReviews = useProductReviews; exports.useProducts = useProducts; exports.useQuoteStatus = useQuoteStatus; exports.useReturnStatus = useReturnStatus; exports.useSearch = useSearch; exports.useShopInfo = useShopInfo; exports.useShopScripts = useShopScripts; exports.useShopSeo = useShopSeo; exports.useSubmitQuote = useSubmitQuote; exports.useSubmitReturn = useSubmitReturn; exports.useSubmitReview = useSubmitReview; exports.useWishlist = useWishlist;
package/dist/react.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ZOZAJG6T.mjs";
5
5
  import {
6
6
  BehioStorefront
7
- } from "./chunk-V5WU3XI4.mjs";
7
+ } from "./chunk-O5UHKZPG.mjs";
8
8
 
9
9
  // src/react/provider.tsx
10
10
  import { useRef, useEffect, useMemo, useState, useCallback } from "react";
@@ -1528,11 +1528,28 @@ function useBundle(slug, options) {
1528
1528
  });
1529
1529
  }
1530
1530
 
1531
- // src/react/hooks/use-cross-sell.ts
1531
+ // src/react/hooks/use-product-group.ts
1532
1532
  import { useQuery as useQuery21 } from "@tanstack/react-query";
1533
- function useCrossSell(productSlug, options) {
1533
+ function useProductGroup(slug, options) {
1534
1534
  const { client } = useBehio();
1535
1535
  return useQuery21({
1536
+ queryKey: ["behio", "product-group", slug, options?.locale, options?.currency],
1537
+ queryFn: () => unwrap(
1538
+ client.catalog.getProductGroup(slug, {
1539
+ locale: options?.locale,
1540
+ currency: options?.currency
1541
+ })
1542
+ ),
1543
+ enabled: Boolean(slug) && (options?.enabled ?? true),
1544
+ initialData: options?.initialData
1545
+ });
1546
+ }
1547
+
1548
+ // src/react/hooks/use-cross-sell.ts
1549
+ import { useQuery as useQuery22 } from "@tanstack/react-query";
1550
+ function useCrossSell(productSlug, options) {
1551
+ const { client } = useBehio();
1552
+ return useQuery22({
1536
1553
  queryKey: ["behio", "cross-sell", productSlug],
1537
1554
  queryFn: () => unwrap(client.catalog.getCrossSell(productSlug)),
1538
1555
  enabled: Boolean(productSlug) && (options?.enabled ?? true),
@@ -1541,10 +1558,10 @@ function useCrossSell(productSlug, options) {
1541
1558
  }
1542
1559
 
1543
1560
  // src/react/hooks/use-product-promotions.ts
1544
- import { useQuery as useQuery22 } from "@tanstack/react-query";
1561
+ import { useQuery as useQuery23 } from "@tanstack/react-query";
1545
1562
  function useProductPromotions(productSlug, options) {
1546
1563
  const { client } = useBehio();
1547
- return useQuery22({
1564
+ return useQuery23({
1548
1565
  queryKey: ["behio", "product-promotions", productSlug],
1549
1566
  queryFn: () => unwrap(client.catalog.getProductPromotions(productSlug)),
1550
1567
  enabled: Boolean(productSlug) && (options?.enabled ?? true),
@@ -1553,11 +1570,11 @@ function useProductPromotions(productSlug, options) {
1553
1570
  }
1554
1571
 
1555
1572
  // src/react/hooks/use-gift-card.ts
1556
- import { useQuery as useQuery23 } from "@tanstack/react-query";
1573
+ import { useQuery as useQuery24 } from "@tanstack/react-query";
1557
1574
  function useGiftCardBalance(code, options) {
1558
1575
  const { client } = useBehio();
1559
1576
  const trimmed = code?.trim();
1560
- return useQuery23({
1577
+ return useQuery24({
1561
1578
  queryKey: ["behio", "gift-card-balance", trimmed],
1562
1579
  queryFn: () => unwrap(client.catalog.checkGiftCard(trimmed)),
1563
1580
  enabled: Boolean(trimmed && trimmed.length >= 6) && (options?.enabled ?? true)
@@ -1565,11 +1582,11 @@ function useGiftCardBalance(code, options) {
1565
1582
  }
1566
1583
 
1567
1584
  // src/react/hooks/use-wishlist.ts
1568
- import { useQuery as useQuery24, useMutation as useMutation9, useQueryClient as useQueryClient10 } from "@tanstack/react-query";
1585
+ import { useQuery as useQuery25, useMutation as useMutation9, useQueryClient as useQueryClient10 } from "@tanstack/react-query";
1569
1586
  function useWishlist(options) {
1570
1587
  const { client } = useBehio();
1571
1588
  const qc = useQueryClient10();
1572
- const query = useQuery24({
1589
+ const query = useQuery25({
1573
1590
  queryKey: ["behio", "wishlist"],
1574
1591
  queryFn: () => unwrap(client.wishlist.get()),
1575
1592
  enabled: options?.enabled ?? true
@@ -1592,7 +1609,7 @@ function useWishlist(options) {
1592
1609
  }
1593
1610
  function useIsInWishlist(productId) {
1594
1611
  const { client } = useBehio();
1595
- return useQuery24({
1612
+ return useQuery25({
1596
1613
  queryKey: ["behio", "wishlist-check", productId],
1597
1614
  queryFn: () => unwrap(client.wishlist.isInWishlist(productId)),
1598
1615
  enabled: Boolean(productId)
@@ -1600,10 +1617,10 @@ function useIsInWishlist(productId) {
1600
1617
  }
1601
1618
 
1602
1619
  // src/react/hooks/use-reviews.ts
1603
- import { useQuery as useQuery25, useMutation as useMutation10, useQueryClient as useQueryClient11 } from "@tanstack/react-query";
1620
+ import { useQuery as useQuery26, useMutation as useMutation10, useQueryClient as useQueryClient11 } from "@tanstack/react-query";
1604
1621
  function useProductReviews(productId, options) {
1605
1622
  const { client } = useBehio();
1606
- return useQuery25({
1623
+ return useQuery26({
1607
1624
  queryKey: ["behio", "reviews", productId, options?.page ?? 1],
1608
1625
  queryFn: () => unwrap(client.reviews.getProductReviews(productId, options?.page, options?.limit)),
1609
1626
  enabled: Boolean(productId) && (options?.enabled ?? true)
@@ -1619,7 +1636,7 @@ function useSubmitReview() {
1619
1636
  }
1620
1637
 
1621
1638
  // src/react/hooks/use-returns.ts
1622
- import { useQuery as useQuery26, useMutation as useMutation11 } from "@tanstack/react-query";
1639
+ import { useQuery as useQuery27, useMutation as useMutation11 } from "@tanstack/react-query";
1623
1640
  function useLookupReturnableOrder() {
1624
1641
  const { client } = useBehio();
1625
1642
  return useMutation11({
@@ -1634,7 +1651,7 @@ function useSubmitReturn() {
1634
1651
  }
1635
1652
  function useReturnStatus(returnId, email) {
1636
1653
  const { client } = useBehio();
1637
- return useQuery26({
1654
+ return useQuery27({
1638
1655
  queryKey: ["behio", "return-status", returnId],
1639
1656
  queryFn: () => unwrap(client.returns.getStatus(returnId, email)),
1640
1657
  enabled: Boolean(returnId && email)
@@ -1642,7 +1659,7 @@ function useReturnStatus(returnId, email) {
1642
1659
  }
1643
1660
 
1644
1661
  // src/react/hooks/use-quotes.ts
1645
- import { useMutation as useMutation12, useQuery as useQuery27 } from "@tanstack/react-query";
1662
+ import { useMutation as useMutation12, useQuery as useQuery28 } from "@tanstack/react-query";
1646
1663
  function useSubmitQuote() {
1647
1664
  const { client } = useBehio();
1648
1665
  return useMutation12({
@@ -1651,7 +1668,7 @@ function useSubmitQuote() {
1651
1668
  }
1652
1669
  function useQuoteStatus(quoteId, email) {
1653
1670
  const { client } = useBehio();
1654
- return useQuery27({
1671
+ return useQuery28({
1655
1672
  queryKey: ["behio", "quote-status", quoteId],
1656
1673
  queryFn: () => unwrap(client.quotes.getStatus(quoteId, email)),
1657
1674
  enabled: Boolean(quoteId && email)
@@ -1708,6 +1725,7 @@ export {
1708
1725
  usePage,
1709
1726
  usePages,
1710
1727
  useProduct,
1728
+ useProductGroup,
1711
1729
  useProductPromotions,
1712
1730
  useProductReviews,
1713
1731
  useProducts,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@behio/storefront-sdk",
3
- "version": "0.25.0",
3
+ "version": "0.27.0",
4
4
  "description": "TypeScript SDK for Behio Headless E-Shop \u2014 core client + React hooks",
5
5
  "author": "Behio",
6
6
  "license": "MIT",