@behio/storefront-sdk 0.18.0 → 0.20.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.
@@ -140,7 +140,8 @@ interface ProductVariant {
140
140
  sku: string;
141
141
  name: string;
142
142
  attributes: Record<string, string>;
143
- price: ProductPrice;
143
+ /** `null` when prices are gated behind login for guests (B2B mode). */
144
+ price: ProductPrice | null;
144
145
  inStock: boolean;
145
146
  stockQuantity?: number;
146
147
  /**
@@ -168,7 +169,8 @@ interface ProductListItem {
168
169
  shortDescription?: string;
169
170
  sku: string;
170
171
  gtin?: string;
171
- price: ProductPrice;
172
+ /** `null` when prices are gated behind login for guests (B2B mode). */
173
+ price: ProductPrice | null;
172
174
  inStock: boolean;
173
175
  stockQuantity?: number;
174
176
  image?: string | null;
@@ -221,6 +223,9 @@ interface ProductDetail extends ProductListItem {
221
223
  title?: string | null;
222
224
  description?: string | null;
223
225
  keywords?: string | null;
226
+ ogTitle?: string | null;
227
+ ogDescription?: string | null;
228
+ ogImage?: string | null;
224
229
  };
225
230
  productGroups?: Array<{
226
231
  slug: string;
@@ -242,8 +247,19 @@ interface Category {
242
247
  productCount?: number;
243
248
  }
244
249
  interface CategoryDetail extends Category {
245
- seoTitle?: string;
246
- seoDescription?: string;
250
+ /**
251
+ * SEO/Open Graph for the category page. Matches the backend's nested `seo`
252
+ * shape (the old flat `seoTitle`/`seoDescription` never matched what the API
253
+ * returned). `keywords` is always null for categories.
254
+ */
255
+ seo?: {
256
+ title?: string | null;
257
+ description?: string | null;
258
+ keywords?: string | null;
259
+ ogTitle?: string | null;
260
+ ogDescription?: string | null;
261
+ ogImage?: string | null;
262
+ };
247
263
  }
248
264
  type DataGroupFieldType = "TEXT" | "NUMBER" | "DECIMAL" | "BOOLEAN" | "DATE" | "TIME" | "DATETIME" | "PERCENTAGE" | "MONEY" | "ASSET" | "ITEM_LIST" | "DYNAMIC_NUMBER_CALCULATION_FROM_OTHERS";
249
265
  interface FilterField {
@@ -562,6 +578,9 @@ interface PageDetail {
562
578
  content: unknown;
563
579
  seoTitle?: string;
564
580
  seoDescription?: string;
581
+ ogTitle?: string;
582
+ ogDescription?: string;
583
+ ogImage?: string;
565
584
  /** Downloadable files attached to the page (e.g. legal form PDFs). */
566
585
  attachments: PageAttachment[];
567
586
  }
@@ -140,7 +140,8 @@ interface ProductVariant {
140
140
  sku: string;
141
141
  name: string;
142
142
  attributes: Record<string, string>;
143
- price: ProductPrice;
143
+ /** `null` when prices are gated behind login for guests (B2B mode). */
144
+ price: ProductPrice | null;
144
145
  inStock: boolean;
145
146
  stockQuantity?: number;
146
147
  /**
@@ -168,7 +169,8 @@ interface ProductListItem {
168
169
  shortDescription?: string;
169
170
  sku: string;
170
171
  gtin?: string;
171
- price: ProductPrice;
172
+ /** `null` when prices are gated behind login for guests (B2B mode). */
173
+ price: ProductPrice | null;
172
174
  inStock: boolean;
173
175
  stockQuantity?: number;
174
176
  image?: string | null;
@@ -221,6 +223,9 @@ interface ProductDetail extends ProductListItem {
221
223
  title?: string | null;
222
224
  description?: string | null;
223
225
  keywords?: string | null;
226
+ ogTitle?: string | null;
227
+ ogDescription?: string | null;
228
+ ogImage?: string | null;
224
229
  };
225
230
  productGroups?: Array<{
226
231
  slug: string;
@@ -242,8 +247,19 @@ interface Category {
242
247
  productCount?: number;
243
248
  }
244
249
  interface CategoryDetail extends Category {
245
- seoTitle?: string;
246
- seoDescription?: string;
250
+ /**
251
+ * SEO/Open Graph for the category page. Matches the backend's nested `seo`
252
+ * shape (the old flat `seoTitle`/`seoDescription` never matched what the API
253
+ * returned). `keywords` is always null for categories.
254
+ */
255
+ seo?: {
256
+ title?: string | null;
257
+ description?: string | null;
258
+ keywords?: string | null;
259
+ ogTitle?: string | null;
260
+ ogDescription?: string | null;
261
+ ogImage?: string | null;
262
+ };
247
263
  }
248
264
  type DataGroupFieldType = "TEXT" | "NUMBER" | "DECIMAL" | "BOOLEAN" | "DATE" | "TIME" | "DATETIME" | "PERCENTAGE" | "MONEY" | "ASSET" | "ITEM_LIST" | "DYNAMIC_NUMBER_CALCULATION_FROM_OTHERS";
249
265
  interface FilterField {
@@ -562,6 +578,9 @@ interface PageDetail {
562
578
  content: unknown;
563
579
  seoTitle?: string;
564
580
  seoDescription?: string;
581
+ ogTitle?: string;
582
+ ogDescription?: string;
583
+ ogImage?: string;
565
584
  /** Downloadable files attached to the page (e.g. legal form PDFs). */
566
585
  attachments: PageAttachment[];
567
586
  }
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { u as ActivePromotion, K as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a4 as AddressType, a5 as AddressTypes, L as AuthTokens, J as BackInStockSubscription, M as BehioApiError, a6 as BehioErrorCode, a7 as BehioEventHandler, a8 as BehioEventType, a9 as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, s as Bundle, N as BundleItem, g as Cart, aa as CartBundleLine, ab as CartBundleLineItem, T as CartDiscount, U as CartItem, ac as CartItemProduct, C as Category, e as CategoryDetail, V as CheckoutAddress, n as CheckoutInput, ad as CheckoutPaymentMethod, E as CookieConsent, H as CookieConsentInput, t as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ae as DataGroupFieldType, F as FilterField, X as FulfillmentStatus, af as FulfillmentStatuses, G as GiftCardBalance, ag as GiftCardSummary, Y as LoginInput, Z as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, _ as OrderItem, O as OrderListItem, $ as OrderStatus, ah as OrderStatusHistory, ai as OrderStatuses, aj as OrderTracking, p as Page, ak as PageAttachment, o as PageDetail, b as PaginatedResponse, a0 as PaymentStatus, al as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, am as ProductMedia, an as ProductMediaVariant, a1 as ProductPrice, a2 as ProductReview, v as ProductReviewsResponse, ao as ProductSort, ap as ProductSortValue, a3 as ProductVariant, aq as ProductVolumePrice, P as ProductsQuery, ar as QuoteItem, Q as QuoteRequest, R as RegisterInput, as as RequestInterceptor, at as RequestInterceptorConfig, au as ResponseInterceptor, av as ResponseInterceptorData, z as ReturnRequest, aw as ReturnRequestItem, y as ReturnStatus, ax as ReturnStatusItem, x as ReturnableOrder, ay as ReturnableOrderItem, az as SdkError, aA as SdkResult, aB as ShippingMethodSummary, aC as ShippingQuote, aD as ShippingQuoteInput, S as ShopInfo, aE as ShopScript, aF as ShopScriptPlacement, aG as ShopScriptType, q as ShopScripts, r as ShopSeo, I as SubmitQuoteInput, D as SubmitReturnInput, w as SubmitReviewInput, W as WishlistItem, aH as err, aI as ok, aJ as toSdkError } from './client-B0ZSKaQh.mjs';
1
+ export { u as ActivePromotion, K as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a4 as AddressType, a5 as AddressTypes, L as AuthTokens, J as BackInStockSubscription, M as BehioApiError, a6 as BehioErrorCode, a7 as BehioEventHandler, a8 as BehioEventType, a9 as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, s as Bundle, N as BundleItem, g as Cart, aa as CartBundleLine, ab as CartBundleLineItem, T as CartDiscount, U as CartItem, ac as CartItemProduct, C as Category, e as CategoryDetail, V as CheckoutAddress, n as CheckoutInput, ad as CheckoutPaymentMethod, E as CookieConsent, H as CookieConsentInput, t as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ae as DataGroupFieldType, F as FilterField, X as FulfillmentStatus, af as FulfillmentStatuses, G as GiftCardBalance, ag as GiftCardSummary, Y as LoginInput, Z as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, _ as OrderItem, O as OrderListItem, $ as OrderStatus, ah as OrderStatusHistory, ai as OrderStatuses, aj as OrderTracking, p as Page, ak as PageAttachment, o as PageDetail, b as PaginatedResponse, a0 as PaymentStatus, al as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, am as ProductMedia, an as ProductMediaVariant, a1 as ProductPrice, a2 as ProductReview, v as ProductReviewsResponse, ao as ProductSort, ap as ProductSortValue, a3 as ProductVariant, aq as ProductVolumePrice, P as ProductsQuery, ar as QuoteItem, Q as QuoteRequest, R as RegisterInput, as as RequestInterceptor, at as RequestInterceptorConfig, au as ResponseInterceptor, av as ResponseInterceptorData, z as ReturnRequest, aw as ReturnRequestItem, y as ReturnStatus, ax as ReturnStatusItem, x as ReturnableOrder, ay as ReturnableOrderItem, az as SdkError, aA as SdkResult, aB as ShippingMethodSummary, aC as ShippingQuote, aD as ShippingQuoteInput, S as ShopInfo, aE as ShopScript, aF as ShopScriptPlacement, aG as ShopScriptType, q as ShopScripts, r as ShopSeo, I as SubmitQuoteInput, D as SubmitReturnInput, w as SubmitReviewInput, W as WishlistItem, aH as err, aI as ok, aJ as toSdkError } from './client-Bc6qvoIu.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, a4 as AddressType, a5 as AddressTypes, L as AuthTokens, J as BackInStockSubscription, M as BehioApiError, a6 as BehioErrorCode, a7 as BehioEventHandler, a8 as BehioEventType, a9 as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, s as Bundle, N as BundleItem, g as Cart, aa as CartBundleLine, ab as CartBundleLineItem, T as CartDiscount, U as CartItem, ac as CartItemProduct, C as Category, e as CategoryDetail, V as CheckoutAddress, n as CheckoutInput, ad as CheckoutPaymentMethod, E as CookieConsent, H as CookieConsentInput, t as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ae as DataGroupFieldType, F as FilterField, X as FulfillmentStatus, af as FulfillmentStatuses, G as GiftCardBalance, ag as GiftCardSummary, Y as LoginInput, Z as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, _ as OrderItem, O as OrderListItem, $ as OrderStatus, ah as OrderStatusHistory, ai as OrderStatuses, aj as OrderTracking, p as Page, ak as PageAttachment, o as PageDetail, b as PaginatedResponse, a0 as PaymentStatus, al as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, am as ProductMedia, an as ProductMediaVariant, a1 as ProductPrice, a2 as ProductReview, v as ProductReviewsResponse, ao as ProductSort, ap as ProductSortValue, a3 as ProductVariant, aq as ProductVolumePrice, P as ProductsQuery, ar as QuoteItem, Q as QuoteRequest, R as RegisterInput, as as RequestInterceptor, at as RequestInterceptorConfig, au as ResponseInterceptor, av as ResponseInterceptorData, z as ReturnRequest, aw as ReturnRequestItem, y as ReturnStatus, ax as ReturnStatusItem, x as ReturnableOrder, ay as ReturnableOrderItem, az as SdkError, aA as SdkResult, aB as ShippingMethodSummary, aC as ShippingQuote, aD as ShippingQuoteInput, S as ShopInfo, aE as ShopScript, aF as ShopScriptPlacement, aG as ShopScriptType, q as ShopScripts, r as ShopSeo, I as SubmitQuoteInput, D as SubmitReturnInput, w as SubmitReviewInput, W as WishlistItem, aH as err, aI as ok, aJ as toSdkError } from './client-B0ZSKaQh.js';
1
+ export { u as ActivePromotion, K as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a4 as AddressType, a5 as AddressTypes, L as AuthTokens, J as BackInStockSubscription, M as BehioApiError, a6 as BehioErrorCode, a7 as BehioEventHandler, a8 as BehioEventType, a9 as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, s as Bundle, N as BundleItem, g as Cart, aa as CartBundleLine, ab as CartBundleLineItem, T as CartDiscount, U as CartItem, ac as CartItemProduct, C as Category, e as CategoryDetail, V as CheckoutAddress, n as CheckoutInput, ad as CheckoutPaymentMethod, E as CookieConsent, H as CookieConsentInput, t as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ae as DataGroupFieldType, F as FilterField, X as FulfillmentStatus, af as FulfillmentStatuses, G as GiftCardBalance, ag as GiftCardSummary, Y as LoginInput, Z as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, _ as OrderItem, O as OrderListItem, $ as OrderStatus, ah as OrderStatusHistory, ai as OrderStatuses, aj as OrderTracking, p as Page, ak as PageAttachment, o as PageDetail, b as PaginatedResponse, a0 as PaymentStatus, al as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, am as ProductMedia, an as ProductMediaVariant, a1 as ProductPrice, a2 as ProductReview, v as ProductReviewsResponse, ao as ProductSort, ap as ProductSortValue, a3 as ProductVariant, aq as ProductVolumePrice, P as ProductsQuery, ar as QuoteItem, Q as QuoteRequest, R as RegisterInput, as as RequestInterceptor, at as RequestInterceptorConfig, au as ResponseInterceptor, av as ResponseInterceptorData, z as ReturnRequest, aw as ReturnRequestItem, y as ReturnStatus, ax as ReturnStatusItem, x as ReturnableOrder, ay as ReturnableOrderItem, az as SdkError, aA as SdkResult, aB as ShippingMethodSummary, aC as ShippingQuote, aD as ShippingQuoteInput, S as ShopInfo, aE as ShopScript, aF as ShopScriptPlacement, aG as ShopScriptType, q as ShopScripts, r as ShopSeo, I as SubmitQuoteInput, D as SubmitReturnInput, w as SubmitReviewInput, W as WishlistItem, aH as err, aI as ok, aJ as toSdkError } from './client-Bc6qvoIu.js';
2
2
 
3
3
  /**
4
4
  * Format a price amount with currency using Intl.NumberFormat.
package/dist/next.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-B0ZSKaQh.mjs';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-Bc6qvoIu.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-B0ZSKaQh.js';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-Bc6qvoIu.js';
2
2
 
3
3
  interface GetBehioOptions extends Partial<BehioStorefrontConfig> {
4
4
  /** Override the cart session cookie name (default: "behio_cart_session"). */
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, 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-B0ZSKaQh.mjs';
5
- export { K as AddToCartInput, L as AuthTokens, M as BehioApiError, N as BundleItem, T as CartDiscount, U as CartItem, V as CheckoutAddress, X as FulfillmentStatus, Y as LoginInput, Z as MessageResponse, _ as OrderItem, $ as OrderStatus, a0 as PaymentStatus, a1 as ProductPrice, a2 as ProductReview, a3 as ProductVariant } from './client-B0ZSKaQh.mjs';
4
+ import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, 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-Bc6qvoIu.mjs';
5
+ export { K as AddToCartInput, L as AuthTokens, M as BehioApiError, N as BundleItem, T as CartDiscount, U as CartItem, V as CheckoutAddress, X as FulfillmentStatus, Y as LoginInput, Z as MessageResponse, _ as OrderItem, $ as OrderStatus, a0 as PaymentStatus, a1 as ProductPrice, a2 as ProductReview, a3 as ProductVariant } from './client-Bc6qvoIu.mjs';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
7
  export { formatPrice } from './index.mjs';
8
8
 
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, 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-B0ZSKaQh.js';
5
- export { K as AddToCartInput, L as AuthTokens, M as BehioApiError, N as BundleItem, T as CartDiscount, U as CartItem, V as CheckoutAddress, X as FulfillmentStatus, Y as LoginInput, Z as MessageResponse, _ as OrderItem, $ as OrderStatus, a0 as PaymentStatus, a1 as ProductPrice, a2 as ProductReview, a3 as ProductVariant } from './client-B0ZSKaQh.js';
4
+ import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, 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-Bc6qvoIu.js';
5
+ export { K as AddToCartInput, L as AuthTokens, M as BehioApiError, N as BundleItem, T as CartDiscount, U as CartItem, V as CheckoutAddress, X as FulfillmentStatus, Y as LoginInput, Z as MessageResponse, _ as OrderItem, $ as OrderStatus, a0 as PaymentStatus, a1 as ProductPrice, a2 as ProductReview, a3 as ProductVariant } from './client-Bc6qvoIu.js';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
7
  export { formatPrice } from './index.js';
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@behio/storefront-sdk",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "description": "TypeScript SDK for Behio Headless E-Shop — core client + React hooks",
5
5
  "author": "Behio",
6
6
  "license": "MIT",