@behio/storefront-sdk 0.13.0 → 0.14.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.
@@ -341,6 +341,9 @@ interface Cart {
341
341
  grandTotal: number;
342
342
  currency: string;
343
343
  itemCount: number;
344
+ /** Applied gift-card code, if any. Gift cards deduct at checkout, so this does
345
+ * not change `grandTotal`; use it to show the applied state in the cart. */
346
+ giftCardCode?: string | null;
344
347
  }
345
348
  interface AddToCartInput {
346
349
  /** Product ID (eshop product ID or warehouse item ID) */
@@ -341,6 +341,9 @@ interface Cart {
341
341
  grandTotal: number;
342
342
  currency: string;
343
343
  itemCount: number;
344
+ /** Applied gift-card code, if any. Gift cards deduct at checkout, so this does
345
+ * not change `grandTotal`; use it to show the applied state in the cart. */
346
+ giftCardCode?: string | null;
344
347
  }
345
348
  interface AddToCartInput {
346
349
  /** Product ID (eshop product ID or warehouse item ID) */
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { t as ActivePromotion, J as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a3 as AddressType, a4 as AddressTypes, K as AuthTokens, I as BackInStockSubscription, L as BehioApiError, a5 as BehioErrorCode, a6 as BehioEventHandler, a7 as BehioEventType, a8 as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, r as Bundle, M as BundleItem, g as Cart, N as CartDiscount, T as CartItem, a9 as CartItemProduct, C as Category, e as CategoryDetail, U as CheckoutAddress, n as CheckoutInput, aa as CheckoutPaymentMethod, D as CookieConsent, E as CookieConsentInput, s as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ab as DataGroupFieldType, F as FilterField, V as FulfillmentStatus, ac as FulfillmentStatuses, G as GiftCardBalance, X as LoginInput, Y as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, Z as OrderItem, O as OrderListItem, _ as OrderStatus, ad as OrderStatusHistory, ae as OrderStatuses, af as OrderTracking, p as Page, ag as PageAttachment, o as PageDetail, b as PaginatedResponse, $ as PaymentStatus, ah as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, ai as ProductMedia, aj as ProductMediaVariant, a0 as ProductPrice, a1 as ProductReview, u as ProductReviewsResponse, ak as ProductSort, al as ProductSortValue, a2 as ProductVariant, am as ProductVolumePrice, P as ProductsQuery, an as QuoteItem, Q as QuoteRequest, R as RegisterInput, ao as RequestInterceptor, ap as RequestInterceptorConfig, aq as ResponseInterceptor, ar as ResponseInterceptorData, y as ReturnRequest, as as ReturnRequestItem, x as ReturnStatus, at as ReturnStatusItem, w as ReturnableOrder, au as ReturnableOrderItem, av as SdkError, aw as SdkResult, ax as ShippingMethodSummary, ay as ShippingQuote, az as ShippingQuoteInput, S as ShopInfo, q as ShopSeo, H as SubmitQuoteInput, z as SubmitReturnInput, v as SubmitReviewInput, W as WishlistItem, aA as err, aB as ok, aC as toSdkError } from './client-Dy4lLabe.mjs';
1
+ export { t as ActivePromotion, J as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a3 as AddressType, a4 as AddressTypes, K as AuthTokens, I as BackInStockSubscription, L as BehioApiError, a5 as BehioErrorCode, a6 as BehioEventHandler, a7 as BehioEventType, a8 as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, r as Bundle, M as BundleItem, g as Cart, N as CartDiscount, T as CartItem, a9 as CartItemProduct, C as Category, e as CategoryDetail, U as CheckoutAddress, n as CheckoutInput, aa as CheckoutPaymentMethod, D as CookieConsent, E as CookieConsentInput, s as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ab as DataGroupFieldType, F as FilterField, V as FulfillmentStatus, ac as FulfillmentStatuses, G as GiftCardBalance, X as LoginInput, Y as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, Z as OrderItem, O as OrderListItem, _ as OrderStatus, ad as OrderStatusHistory, ae as OrderStatuses, af as OrderTracking, p as Page, ag as PageAttachment, o as PageDetail, b as PaginatedResponse, $ as PaymentStatus, ah as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, ai as ProductMedia, aj as ProductMediaVariant, a0 as ProductPrice, a1 as ProductReview, u as ProductReviewsResponse, ak as ProductSort, al as ProductSortValue, a2 as ProductVariant, am as ProductVolumePrice, P as ProductsQuery, an as QuoteItem, Q as QuoteRequest, R as RegisterInput, ao as RequestInterceptor, ap as RequestInterceptorConfig, aq as ResponseInterceptor, ar as ResponseInterceptorData, y as ReturnRequest, as as ReturnRequestItem, x as ReturnStatus, at as ReturnStatusItem, w as ReturnableOrder, au as ReturnableOrderItem, av as SdkError, aw as SdkResult, ax as ShippingMethodSummary, ay as ShippingQuote, az as ShippingQuoteInput, S as ShopInfo, q as ShopSeo, H as SubmitQuoteInput, z as SubmitReturnInput, v as SubmitReviewInput, W as WishlistItem, aA as err, aB as ok, aC as toSdkError } from './client-tINA5Ntn.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 { t as ActivePromotion, J as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a3 as AddressType, a4 as AddressTypes, K as AuthTokens, I as BackInStockSubscription, L as BehioApiError, a5 as BehioErrorCode, a6 as BehioEventHandler, a7 as BehioEventType, a8 as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, r as Bundle, M as BundleItem, g as Cart, N as CartDiscount, T as CartItem, a9 as CartItemProduct, C as Category, e as CategoryDetail, U as CheckoutAddress, n as CheckoutInput, aa as CheckoutPaymentMethod, D as CookieConsent, E as CookieConsentInput, s as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ab as DataGroupFieldType, F as FilterField, V as FulfillmentStatus, ac as FulfillmentStatuses, G as GiftCardBalance, X as LoginInput, Y as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, Z as OrderItem, O as OrderListItem, _ as OrderStatus, ad as OrderStatusHistory, ae as OrderStatuses, af as OrderTracking, p as Page, ag as PageAttachment, o as PageDetail, b as PaginatedResponse, $ as PaymentStatus, ah as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, ai as ProductMedia, aj as ProductMediaVariant, a0 as ProductPrice, a1 as ProductReview, u as ProductReviewsResponse, ak as ProductSort, al as ProductSortValue, a2 as ProductVariant, am as ProductVolumePrice, P as ProductsQuery, an as QuoteItem, Q as QuoteRequest, R as RegisterInput, ao as RequestInterceptor, ap as RequestInterceptorConfig, aq as ResponseInterceptor, ar as ResponseInterceptorData, y as ReturnRequest, as as ReturnRequestItem, x as ReturnStatus, at as ReturnStatusItem, w as ReturnableOrder, au as ReturnableOrderItem, av as SdkError, aw as SdkResult, ax as ShippingMethodSummary, ay as ShippingQuote, az as ShippingQuoteInput, S as ShopInfo, q as ShopSeo, H as SubmitQuoteInput, z as SubmitReturnInput, v as SubmitReviewInput, W as WishlistItem, aA as err, aB as ok, aC as toSdkError } from './client-Dy4lLabe.js';
1
+ export { t as ActivePromotion, J as AddToCartInput, j as AddressDetail, A as AddressSuggestion, a3 as AddressType, a4 as AddressTypes, K as AuthTokens, I as BackInStockSubscription, L as BehioApiError, a5 as BehioErrorCode, a6 as BehioEventHandler, a7 as BehioEventType, a8 as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, r as Bundle, M as BundleItem, g as Cart, N as CartDiscount, T as CartItem, a9 as CartItemProduct, C as Category, e as CategoryDetail, U as CheckoutAddress, n as CheckoutInput, aa as CheckoutPaymentMethod, D as CookieConsent, E as CookieConsentInput, s as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ab as DataGroupFieldType, F as FilterField, V as FulfillmentStatus, ac as FulfillmentStatuses, G as GiftCardBalance, X as LoginInput, Y as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, Z as OrderItem, O as OrderListItem, _ as OrderStatus, ad as OrderStatusHistory, ae as OrderStatuses, af as OrderTracking, p as Page, ag as PageAttachment, o as PageDetail, b as PaginatedResponse, $ as PaymentStatus, ah as PaymentStatuses, d as ProductDetail, f as ProductLabel, c as ProductListItem, ai as ProductMedia, aj as ProductMediaVariant, a0 as ProductPrice, a1 as ProductReview, u as ProductReviewsResponse, ak as ProductSort, al as ProductSortValue, a2 as ProductVariant, am as ProductVolumePrice, P as ProductsQuery, an as QuoteItem, Q as QuoteRequest, R as RegisterInput, ao as RequestInterceptor, ap as RequestInterceptorConfig, aq as ResponseInterceptor, ar as ResponseInterceptorData, y as ReturnRequest, as as ReturnRequestItem, x as ReturnStatus, at as ReturnStatusItem, w as ReturnableOrder, au as ReturnableOrderItem, av as SdkError, aw as SdkResult, ax as ShippingMethodSummary, ay as ShippingQuote, az as ShippingQuoteInput, S as ShopInfo, q as ShopSeo, H as SubmitQuoteInput, z as SubmitReturnInput, v as SubmitReviewInput, W as WishlistItem, aA as err, aB as ok, aC as toSdkError } from './client-tINA5Ntn.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-Dy4lLabe.mjs';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-tINA5Ntn.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-Dy4lLabe.js';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-tINA5Ntn.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 ShopSeo, r as Bundle, s as CrossSellItem, t as ActivePromotion, G as GiftCardBalance, W as WishlistItem, u as ProductReviewsResponse, v as SubmitReviewInput, w as ReturnableOrder, x as ReturnStatus, y as ReturnRequest, z as SubmitReturnInput, D as CookieConsent, E as CookieConsentInput, Q as QuoteRequest, H as SubmitQuoteInput, I as BackInStockSubscription } from './client-Dy4lLabe.mjs';
5
- export { J as AddToCartInput, K as AuthTokens, L as BehioApiError, M as BundleItem, N as CartDiscount, T as CartItem, U as CheckoutAddress, V as FulfillmentStatus, X as LoginInput, Y as MessageResponse, Z as OrderItem, _ as OrderStatus, $ as PaymentStatus, a0 as ProductPrice, a1 as ProductReview, a2 as ProductVariant } from './client-Dy4lLabe.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 ShopSeo, r as Bundle, s as CrossSellItem, t as ActivePromotion, G as GiftCardBalance, W as WishlistItem, u as ProductReviewsResponse, v as SubmitReviewInput, w as ReturnableOrder, x as ReturnStatus, y as ReturnRequest, z as SubmitReturnInput, D as CookieConsent, E as CookieConsentInput, Q as QuoteRequest, H as SubmitQuoteInput, I as BackInStockSubscription } from './client-tINA5Ntn.mjs';
5
+ export { J as AddToCartInput, K as AuthTokens, L as BehioApiError, M as BundleItem, N as CartDiscount, T as CartItem, U as CheckoutAddress, V as FulfillmentStatus, X as LoginInput, Y as MessageResponse, Z as OrderItem, _ as OrderStatus, $ as PaymentStatus, a0 as ProductPrice, a1 as ProductReview, a2 as ProductVariant } from './client-tINA5Ntn.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 ShopSeo, r as Bundle, s as CrossSellItem, t as ActivePromotion, G as GiftCardBalance, W as WishlistItem, u as ProductReviewsResponse, v as SubmitReviewInput, w as ReturnableOrder, x as ReturnStatus, y as ReturnRequest, z as SubmitReturnInput, D as CookieConsent, E as CookieConsentInput, Q as QuoteRequest, H as SubmitQuoteInput, I as BackInStockSubscription } from './client-Dy4lLabe.js';
5
- export { J as AddToCartInput, K as AuthTokens, L as BehioApiError, M as BundleItem, N as CartDiscount, T as CartItem, U as CheckoutAddress, V as FulfillmentStatus, X as LoginInput, Y as MessageResponse, Z as OrderItem, _ as OrderStatus, $ as PaymentStatus, a0 as ProductPrice, a1 as ProductReview, a2 as ProductVariant } from './client-Dy4lLabe.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 ShopSeo, r as Bundle, s as CrossSellItem, t as ActivePromotion, G as GiftCardBalance, W as WishlistItem, u as ProductReviewsResponse, v as SubmitReviewInput, w as ReturnableOrder, x as ReturnStatus, y as ReturnRequest, z as SubmitReturnInput, D as CookieConsent, E as CookieConsentInput, Q as QuoteRequest, H as SubmitQuoteInput, I as BackInStockSubscription } from './client-tINA5Ntn.js';
5
+ export { J as AddToCartInput, K as AuthTokens, L as BehioApiError, M as BundleItem, N as CartDiscount, T as CartItem, U as CheckoutAddress, V as FulfillmentStatus, X as LoginInput, Y as MessageResponse, Z as OrderItem, _ as OrderStatus, $ as PaymentStatus, a0 as ProductPrice, a1 as ProductReview, a2 as ProductVariant } from './client-tINA5Ntn.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.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "TypeScript SDK for Behio Headless E-Shop — core client + React hooks",
5
5
  "author": "Behio",
6
6
  "license": "MIT",