@behio/storefront-sdk 0.10.0 → 0.13.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.
package/dist/react.d.mts CHANGED
@@ -1,9 +1,10 @@
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 { BehioStorefront, ProductsQuery, PaginatedResponse, ProductListItem, ProductDetail, Category, CategoryDetail, ProductLabel, FilterField, Cart, CustomerProfile, RegisterInput, CustomerAddress, AddressSuggestion, AddressDetail, OrderListItem, OrderDetail, OrderAccessRequestResponse, OrderAccessVerifyResponse, CheckoutInput, PageDetail, Page, ShopInfo, ShopSeo, Bundle, CrossSellItem, ActivePromotion, GiftCardBalance, WishlistItem, ProductReviewsResponse, SubmitReviewInput, ReturnableOrder, ReturnStatus, ReturnRequest, SubmitReturnInput, CookieConsent, CookieConsentInput, QuoteRequest, SubmitQuoteInput, BackInStockSubscription } from './index.mjs';
5
- export { AddToCartInput, AuthTokens, BehioApiError, BundleItem, CartDiscount, CartItem, CheckoutAddress, FulfillmentStatus, LoginInput, MessageResponse, OrderItem, OrderStatus, PaymentStatus, ProductPrice, ProductReview, ProductVariant } from './index.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-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';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
+ export { formatPrice } from './index.mjs';
7
8
 
8
9
  interface StorageAdapter {
9
10
  get(key: string): string | null;
@@ -19,17 +20,64 @@ declare function detectStorage(): StorageAdapter;
19
20
  interface BehioProviderProps {
20
21
  apiKey: string;
21
22
  baseUrl?: string;
23
+ /**
24
+ * The domain this storefront is served on, sent as X-Shop-Domain. Only needed
25
+ * when one deployment serves several domains with a single "all domains" key
26
+ * and there is no Origin header (SSR). See BehioStorefrontConfig.shopDomain.
27
+ */
28
+ shopDomain?: string;
22
29
  locale?: string;
30
+ /**
31
+ * Initial currency. Used as the starting active currency when the shopper has
32
+ * not chosen one yet (no cookie). A chosen currency (cookie) takes precedence,
33
+ * so this behaves as the default rather than a hard override.
34
+ */
23
35
  currency?: string;
36
+ /**
37
+ * Fallback currency surfaced by useCurrency() / <CurrencySwitcher> as "the
38
+ * default" when nothing is selected. Defaults to the shop's defaultCurrency
39
+ * from shop info. Set this to force a different default per deployment.
40
+ */
41
+ defaultCurrency?: string;
42
+ /**
43
+ * Explicit list of selectable currencies. When omitted, the list comes from
44
+ * the shop's supportedCurrencies. Provide this to curate the switcher (e.g.
45
+ * only CZK + EUR even though the shop technically supports more).
46
+ */
47
+ currencies?: string[];
48
+ /** Fired whenever the active currency changes (analytics, URL sync, ...). */
49
+ onCurrencyChange?: (currency: string | undefined) => void;
50
+ /** Persist the chosen currency to a cookie so SSR + reloads keep it. Default: true. */
51
+ persistCurrency?: boolean;
52
+ /** Cookie name for the chosen currency. Default: "behio_currency". */
53
+ currencyCookieName?: string;
24
54
  storage?: "cookies" | "localStorage" | "memory" | StorageAdapter;
25
55
  queryClient?: QueryClient;
26
56
  children: React.ReactNode;
27
57
  }
28
- declare function BehioProvider({ apiKey, baseUrl, locale, currency, storage: storageOption, queryClient: externalQueryClient, children, }: BehioProviderProps): react_jsx_runtime.JSX.Element;
58
+ declare function BehioProvider({ apiKey, baseUrl, shopDomain, locale, currency, defaultCurrency, currencies, onCurrencyChange, persistCurrency, currencyCookieName, storage: storageOption, queryClient: externalQueryClient, children, }: BehioProviderProps): react_jsx_runtime.JSX.Element;
29
59
 
30
60
  interface BehioContextValue {
31
61
  client: BehioStorefront;
32
62
  storage: StorageAdapter;
63
+ /**
64
+ * The shopper's actively selected currency, or undefined when none has been
65
+ * chosen (the shop's default currency is used server-side). This is sent on
66
+ * every catalog request and persisted (cookie) so it survives navigation and
67
+ * reloads, all on the SAME shop/domain.
68
+ */
69
+ currency: string | undefined;
70
+ /**
71
+ * Switch the active currency. Updates the client, persists it, fires the
72
+ * optional onCurrencyChange callback, and refetches every price-bearing
73
+ * query so the UI reflects the new currency without a full reload. Pass
74
+ * undefined to clear back to the shop default.
75
+ */
76
+ setCurrency: (currency: string | undefined) => void;
77
+ /** Fallback currency configured on the provider (overrides shop default). */
78
+ configuredDefaultCurrency: string | undefined;
79
+ /** Explicit allowed-currency list configured on the provider, if any. */
80
+ configuredCurrencies: string[] | undefined;
33
81
  }
34
82
  declare function useBehio(): BehioContextValue;
35
83
 
@@ -89,22 +137,22 @@ interface UseProductOptions {
89
137
  initialData?: ProductDetail;
90
138
  enabled?: boolean;
91
139
  }
92
- declare function useProduct(slug: string, options?: UseProductOptions): _tanstack_react_query.UseQueryResult<ProductDetail, Error>;
140
+ declare function useProduct(slug: string, options?: UseProductOptions): _tanstack_react_query.UseQueryResult<NoInfer<ProductDetail>, Error>;
93
141
 
94
142
  interface UseCategoriesOptions {
95
143
  enabled?: boolean;
96
144
  }
97
- declare function useCategories(locale?: string, options?: UseCategoriesOptions): _tanstack_react_query.UseQueryResult<Category[], Error>;
145
+ declare function useCategories(locale?: string, options?: UseCategoriesOptions): _tanstack_react_query.UseQueryResult<NoInfer<Category[]>, Error>;
98
146
  interface UseCategoryOptions {
99
147
  locale?: string;
100
148
  enabled?: boolean;
101
149
  }
102
- declare function useCategory(slug: string, options?: UseCategoryOptions): _tanstack_react_query.UseQueryResult<CategoryDetail, Error>;
150
+ declare function useCategory(slug: string, options?: UseCategoryOptions): _tanstack_react_query.UseQueryResult<NoInfer<CategoryDetail>, Error>;
103
151
 
104
152
  interface UseLabelsOptions {
105
153
  enabled?: boolean;
106
154
  }
107
- declare function useLabels(locale?: string, options?: UseLabelsOptions): _tanstack_react_query.UseQueryResult<ProductLabel[], Error>;
155
+ declare function useLabels(locale?: string, options?: UseLabelsOptions): _tanstack_react_query.UseQueryResult<NoInfer<ProductLabel[]>, Error>;
108
156
 
109
157
  interface UseFeaturedOptions {
110
158
  locale?: string;
@@ -112,12 +160,12 @@ interface UseFeaturedOptions {
112
160
  initialData?: PaginatedResponse<ProductListItem>;
113
161
  enabled?: boolean;
114
162
  }
115
- declare function useFeatured(options?: UseFeaturedOptions): _tanstack_react_query.UseQueryResult<PaginatedResponse<ProductListItem>, Error>;
163
+ declare function useFeatured(options?: UseFeaturedOptions): _tanstack_react_query.UseQueryResult<NoInfer<PaginatedResponse<ProductListItem>>, Error>;
116
164
 
117
165
  interface UseFiltersOptions {
118
166
  enabled?: boolean;
119
167
  }
120
- declare function useFilters(options?: UseFiltersOptions): _tanstack_react_query.UseQueryResult<FilterField[], Error>;
168
+ declare function useFilters(options?: UseFiltersOptions): _tanstack_react_query.UseQueryResult<NoInfer<FilterField[]>, Error>;
121
169
 
122
170
  interface UseSearchOptions {
123
171
  page?: number;
@@ -125,13 +173,13 @@ interface UseSearchOptions {
125
173
  debounceMs?: number;
126
174
  enabled?: boolean;
127
175
  }
128
- declare function useSearch(query: string, options?: UseSearchOptions): _tanstack_react_query.UseQueryResult<PaginatedResponse<ProductListItem>, Error>;
176
+ declare function useSearch(query: string, options?: UseSearchOptions): _tanstack_react_query.UseQueryResult<NoInfer<PaginatedResponse<ProductListItem>>, Error>;
129
177
 
130
178
  interface UseCartOptions {
131
179
  enabled?: boolean;
132
180
  }
133
181
  declare function useCart(options?: UseCartOptions): {
134
- cart: Cart | null;
182
+ cart: NoInfer<Cart> | null;
135
183
  isLoading: boolean;
136
184
  error: Error | null;
137
185
  addItem: (productId: string, quantity?: number) => Promise<Cart & {
@@ -157,7 +205,7 @@ declare function useCartCount(options?: UseCartCountOptions): number;
157
205
 
158
206
  declare function useAuth(): {
159
207
  isLoggedIn: boolean;
160
- customer: CustomerProfile | null;
208
+ customer: NoInfer<CustomerProfile> | null;
161
209
  isLoading: boolean;
162
210
  login: (email: string, password: string) => Promise<undefined>;
163
211
  register: (input: RegisterInput) => Promise<undefined>;
@@ -175,7 +223,7 @@ interface UseCustomerOptions {
175
223
  enabled?: boolean;
176
224
  }
177
225
  declare function useCustomer(options?: UseCustomerOptions): {
178
- data: CustomerProfile | null;
226
+ data: NoInfer<CustomerProfile> | null;
179
227
  isLoading: boolean;
180
228
  error: Error | null;
181
229
  updateProfile: (profileData: Partial<Pick<CustomerProfile, "firstName" | "lastName" | "phone">>) => Promise<CustomerProfile>;
@@ -186,7 +234,7 @@ interface UseAddressesOptions {
186
234
  enabled?: boolean;
187
235
  }
188
236
  declare function useAddresses(options?: UseAddressesOptions): {
189
- addresses: CustomerAddress[];
237
+ addresses: NoInfer<CustomerAddress[]>;
190
238
  isLoading: boolean;
191
239
  error: Error | null;
192
240
  createAddress: (address: Omit<CustomerAddress, "id">) => Promise<CustomerAddress>;
@@ -285,7 +333,7 @@ interface UseOrderOptions {
285
333
  enabled?: boolean;
286
334
  }
287
335
  declare function useOrder(orderNumber: string, options?: UseOrderOptions): {
288
- data: OrderDetail | null;
336
+ data: NoInfer<OrderDetail> | null;
289
337
  isLoading: boolean;
290
338
  error: Error | null;
291
339
  cancel: () => Promise<OrderDetail>;
@@ -332,16 +380,16 @@ declare function useCheckout(): {
332
380
  interface UsePagesOptions {
333
381
  enabled?: boolean;
334
382
  }
335
- declare function usePages(locale?: string, options?: UsePagesOptions): _tanstack_react_query.UseQueryResult<Page[], Error>;
383
+ declare function usePages(locale?: string, options?: UsePagesOptions): _tanstack_react_query.UseQueryResult<NoInfer<Page[]>, Error>;
336
384
  interface UsePageOptions {
337
385
  enabled?: boolean;
338
386
  }
339
- declare function usePage(slug: string, locale?: string, options?: UsePageOptions): _tanstack_react_query.UseQueryResult<PageDetail, Error>;
387
+ declare function usePage(slug: string, locale?: string, options?: UsePageOptions): _tanstack_react_query.UseQueryResult<NoInfer<PageDetail>, Error>;
340
388
 
341
389
  interface UseShopInfoOptions {
342
390
  enabled?: boolean;
343
391
  }
344
- declare function useShopInfo(options?: UseShopInfoOptions): _tanstack_react_query.UseQueryResult<ShopInfo, Error>;
392
+ declare function useShopInfo(options?: UseShopInfoOptions): _tanstack_react_query.UseQueryResult<NoInfer<ShopInfo>, Error>;
345
393
 
346
394
  interface UseShopSeoOptions {
347
395
  /** Override locale (ISO-639-1). Defaults to the shop's default locale. */
@@ -355,7 +403,83 @@ interface UseShopSeoOptions {
355
403
  * React Query hook for per-locale shop SEO metadata. Safe to render on the
356
404
  * server via `initialData` from `unwrap(client.getShopSeo(locale))`.
357
405
  */
358
- declare function useShopSeo(options?: UseShopSeoOptions): _tanstack_react_query.UseQueryResult<ShopSeo, Error>;
406
+ declare function useShopSeo(options?: UseShopSeoOptions): _tanstack_react_query.UseQueryResult<NoInfer<ShopSeo>, Error>;
407
+
408
+ interface UseCurrencyResult {
409
+ /** The actively selected currency, or undefined when none is chosen yet. */
410
+ currency: string | undefined;
411
+ /**
412
+ * The currency actually applied to prices: the selection if any, otherwise
413
+ * the configured/shop default. Useful for highlighting the active option.
414
+ */
415
+ effectiveCurrency: string | undefined;
416
+ /** Switch the active currency (persists + refetches prices). undefined = default. */
417
+ setCurrency: (currency: string | undefined) => void;
418
+ /** Currencies available to choose from (for building a switcher). */
419
+ currencies: string[];
420
+ /** The default currency (provider override, else the shop's defaultCurrency). */
421
+ defaultCurrency: string | undefined;
422
+ /** True while the shop info (and thus the currency list) is still loading. */
423
+ isLoading: boolean;
424
+ }
425
+ /**
426
+ * Read and control the active storefront currency. The shopper stays on the
427
+ * SAME shop/domain; only the currency prices are resolved in changes.
428
+ *
429
+ * const { currency, setCurrency, currencies, defaultCurrency } = useCurrency();
430
+ *
431
+ * The available `currencies` come from the provider's `currencies` prop when
432
+ * set, otherwise from the shop's supportedCurrencies (+ its default).
433
+ */
434
+ declare function useCurrency(): UseCurrencyResult;
435
+
436
+ interface CurrencySwitcherRenderProps {
437
+ /** Currencies to offer. */
438
+ currencies: string[];
439
+ /** Currently applied currency (selection or default). */
440
+ value: string | undefined;
441
+ /** Switch to a currency. */
442
+ setCurrency: (currency: string) => void;
443
+ /** Human label for a currency code (honours the `labels` prop). */
444
+ label: (code: string) => string;
445
+ }
446
+ interface CurrencySwitcherProps {
447
+ /** className passed to the default <select>. */
448
+ className?: string;
449
+ /**
450
+ * Override display labels per currency code, e.g. {CZK: "Kč", EUR: "€"}.
451
+ * Codes without a label fall back to the code itself.
452
+ */
453
+ labels?: Record<string, string>;
454
+ /** Render the switcher even when only one currency is available. Default: false. */
455
+ showWhenSingle?: boolean;
456
+ /** aria-label for the default <select>. Default: "Currency". */
457
+ ariaLabel?: string;
458
+ /**
459
+ * Full custom render. Receives the currencies, current value, a setter and a
460
+ * label fn. When provided, the default <select> is not rendered, so you can
461
+ * build any UI (dropdown, pills, flags, ...) while the SDK owns the state.
462
+ */
463
+ children?: (props: CurrencySwitcherRenderProps) => React.ReactNode;
464
+ }
465
+ /**
466
+ * A drop-in currency switcher wired to the SDK's active currency. The shopper
467
+ * stays on the same shop; only prices re-resolve. Renders nothing until more
468
+ * than one currency is available (unless showWhenSingle).
469
+ *
470
+ * <CurrencySwitcher labels={{CZK: "Kč", EUR: "€"}} />
471
+ *
472
+ * or fully custom:
473
+ *
474
+ * <CurrencySwitcher>
475
+ * {({ currencies, value, setCurrency }) =>
476
+ * currencies.map((c) => (
477
+ * <button key={c} aria-pressed={c === value} onClick={() => setCurrency(c)}>{c}</button>
478
+ * ))
479
+ * }
480
+ * </CurrencySwitcher>
481
+ */
482
+ declare function CurrencySwitcher({ className, labels, showWhenSingle, ariaLabel, children, }: CurrencySwitcherProps): react_jsx_runtime.JSX.Element | null;
359
483
 
360
484
  /** List all active bundles. */
361
485
  declare function useBundles(options?: {
@@ -363,14 +487,14 @@ declare function useBundles(options?: {
363
487
  initialData?: {
364
488
  items: Bundle[];
365
489
  };
366
- }): _tanstack_react_query.UseQueryResult<{
490
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
367
491
  items: Bundle[];
368
- }, Error>;
492
+ }>, Error>;
369
493
  /** Get a single bundle by slug. */
370
494
  declare function useBundle(slug: string | undefined, options?: {
371
495
  enabled?: boolean;
372
496
  initialData?: Bundle;
373
- }): _tanstack_react_query.UseQueryResult<Bundle, Error>;
497
+ }): _tanstack_react_query.UseQueryResult<NoInfer<Bundle>, Error>;
374
498
 
375
499
  type CrossSellResponse = {
376
500
  related: CrossSellItem[];
@@ -385,7 +509,7 @@ type CrossSellResponse = {
385
509
  declare function useCrossSell(productSlug: string | undefined, options?: {
386
510
  enabled?: boolean;
387
511
  initialData?: CrossSellResponse;
388
- }): _tanstack_react_query.UseQueryResult<CrossSellResponse, Error>;
512
+ }): _tanstack_react_query.UseQueryResult<NoInfer<CrossSellResponse>, Error>;
389
513
 
390
514
  /**
391
515
  * Fetch currently active promotions applicable to a specific product.
@@ -395,9 +519,9 @@ declare function useCrossSell(productSlug: string | undefined, options?: {
395
519
  declare function useProductPromotions(productSlug: string | undefined, options?: {
396
520
  enabled?: boolean;
397
521
  refetchIntervalMs?: number;
398
- }): _tanstack_react_query.UseQueryResult<{
522
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
399
523
  items: ActivePromotion[];
400
- }, Error>;
524
+ }>, Error>;
401
525
 
402
526
  /**
403
527
  * Check a gift card code — validates the code against the eshop and
@@ -410,7 +534,7 @@ declare function useProductPromotions(productSlug: string | undefined, options?:
410
534
  */
411
535
  declare function useGiftCardBalance(code: string | undefined, options?: {
412
536
  enabled?: boolean;
413
- }): _tanstack_react_query.UseQueryResult<GiftCardBalance, Error>;
537
+ }): _tanstack_react_query.UseQueryResult<NoInfer<GiftCardBalance>, Error>;
414
538
 
415
539
  declare function useWishlist(options?: {
416
540
  enabled?: boolean;
@@ -423,9 +547,9 @@ declare function useWishlist(options?: {
423
547
  }, Error, string, unknown>;
424
548
  isAdding: boolean;
425
549
  isRemoving: boolean;
426
- data: {
550
+ data: NoInfer<{
427
551
  items: WishlistItem[];
428
- };
552
+ }>;
429
553
  error: Error;
430
554
  isError: true;
431
555
  isPending: false;
@@ -448,13 +572,13 @@ declare function useWishlist(options?: {
448
572
  isRefetching: boolean;
449
573
  isStale: boolean;
450
574
  isEnabled: boolean;
451
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
575
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
452
576
  items: WishlistItem[];
453
- }, Error>>;
577
+ }>, Error>>;
454
578
  fetchStatus: _tanstack_query_core.FetchStatus;
455
- promise: Promise<{
579
+ promise: Promise<NoInfer<{
456
580
  items: WishlistItem[];
457
- }>;
581
+ }>>;
458
582
  } | {
459
583
  add: _tanstack_react_query.UseMutateAsyncFunction<{
460
584
  success: boolean;
@@ -464,9 +588,9 @@ declare function useWishlist(options?: {
464
588
  }, Error, string, unknown>;
465
589
  isAdding: boolean;
466
590
  isRemoving: boolean;
467
- data: {
591
+ data: NoInfer<{
468
592
  items: WishlistItem[];
469
- };
593
+ }>;
470
594
  error: null;
471
595
  isError: false;
472
596
  isPending: false;
@@ -489,13 +613,13 @@ declare function useWishlist(options?: {
489
613
  isRefetching: boolean;
490
614
  isStale: boolean;
491
615
  isEnabled: boolean;
492
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
616
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
493
617
  items: WishlistItem[];
494
- }, Error>>;
618
+ }>, Error>>;
495
619
  fetchStatus: _tanstack_query_core.FetchStatus;
496
- promise: Promise<{
620
+ promise: Promise<NoInfer<{
497
621
  items: WishlistItem[];
498
- }>;
622
+ }>>;
499
623
  } | {
500
624
  add: _tanstack_react_query.UseMutateAsyncFunction<{
501
625
  success: boolean;
@@ -528,13 +652,13 @@ declare function useWishlist(options?: {
528
652
  isRefetching: boolean;
529
653
  isStale: boolean;
530
654
  isEnabled: boolean;
531
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
655
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
532
656
  items: WishlistItem[];
533
- }, Error>>;
657
+ }>, Error>>;
534
658
  fetchStatus: _tanstack_query_core.FetchStatus;
535
- promise: Promise<{
659
+ promise: Promise<NoInfer<{
536
660
  items: WishlistItem[];
537
- }>;
661
+ }>>;
538
662
  } | {
539
663
  add: _tanstack_react_query.UseMutateAsyncFunction<{
540
664
  success: boolean;
@@ -567,13 +691,13 @@ declare function useWishlist(options?: {
567
691
  isRefetching: boolean;
568
692
  isStale: boolean;
569
693
  isEnabled: boolean;
570
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
694
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
571
695
  items: WishlistItem[];
572
- }, Error>>;
696
+ }>, Error>>;
573
697
  fetchStatus: _tanstack_query_core.FetchStatus;
574
- promise: Promise<{
698
+ promise: Promise<NoInfer<{
575
699
  items: WishlistItem[];
576
- }>;
700
+ }>>;
577
701
  } | {
578
702
  add: _tanstack_react_query.UseMutateAsyncFunction<{
579
703
  success: boolean;
@@ -606,13 +730,13 @@ declare function useWishlist(options?: {
606
730
  isRefetching: boolean;
607
731
  isStale: boolean;
608
732
  isEnabled: boolean;
609
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
733
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
610
734
  items: WishlistItem[];
611
- }, Error>>;
735
+ }>, Error>>;
612
736
  fetchStatus: _tanstack_query_core.FetchStatus;
613
- promise: Promise<{
737
+ promise: Promise<NoInfer<{
614
738
  items: WishlistItem[];
615
- }>;
739
+ }>>;
616
740
  } | {
617
741
  add: _tanstack_react_query.UseMutateAsyncFunction<{
618
742
  success: boolean;
@@ -622,9 +746,9 @@ declare function useWishlist(options?: {
622
746
  }, Error, string, unknown>;
623
747
  isAdding: boolean;
624
748
  isRemoving: boolean;
625
- data: {
749
+ data: NoInfer<{
626
750
  items: WishlistItem[];
627
- };
751
+ }>;
628
752
  isError: false;
629
753
  error: null;
630
754
  isPending: false;
@@ -647,23 +771,23 @@ declare function useWishlist(options?: {
647
771
  isRefetching: boolean;
648
772
  isStale: boolean;
649
773
  isEnabled: boolean;
650
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
774
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
651
775
  items: WishlistItem[];
652
- }, Error>>;
776
+ }>, Error>>;
653
777
  fetchStatus: _tanstack_query_core.FetchStatus;
654
- promise: Promise<{
778
+ promise: Promise<NoInfer<{
655
779
  items: WishlistItem[];
656
- }>;
780
+ }>>;
657
781
  };
658
- declare function useIsInWishlist(productId: string | undefined): _tanstack_react_query.UseQueryResult<{
782
+ declare function useIsInWishlist(productId: string | undefined): _tanstack_react_query.UseQueryResult<NoInfer<{
659
783
  inWishlist: boolean;
660
- }, Error>;
784
+ }>, Error>;
661
785
 
662
786
  declare function useProductReviews(productId: string | undefined, options?: {
663
787
  page?: number;
664
788
  limit?: number;
665
789
  enabled?: boolean;
666
- }): _tanstack_react_query.UseQueryResult<ProductReviewsResponse, Error>;
790
+ }): _tanstack_react_query.UseQueryResult<NoInfer<ProductReviewsResponse>, Error>;
667
791
  declare function useSubmitReview(): _tanstack_react_query.UseMutationResult<{
668
792
  id: string;
669
793
  }, Error, SubmitReviewInput, unknown>;
@@ -674,14 +798,14 @@ declare function useLookupReturnableOrder(): _tanstack_react_query.UseMutationRe
674
798
  email: string;
675
799
  }, unknown>;
676
800
  declare function useSubmitReturn(): _tanstack_react_query.UseMutationResult<ReturnRequest, Error, SubmitReturnInput, unknown>;
677
- declare function useReturnStatus(returnId: string | undefined, email: string | undefined): _tanstack_react_query.UseQueryResult<ReturnStatus, Error>;
801
+ declare function useReturnStatus(returnId: string | undefined, email: string | undefined): _tanstack_react_query.UseQueryResult<NoInfer<ReturnStatus>, Error>;
678
802
 
679
803
  declare function useCookieConsent(visitorId: string | undefined): {
680
804
  record: _tanstack_react_query.UseMutateAsyncFunction<CookieConsent, Error, CookieConsentInput, unknown>;
681
805
  revoke: _tanstack_react_query.UseMutateAsyncFunction<{
682
806
  success: boolean;
683
807
  }, Error, void, unknown>;
684
- data: CookieConsent | null;
808
+ data: NoInfer<CookieConsent | null>;
685
809
  error: Error;
686
810
  isError: true;
687
811
  isPending: false;
@@ -704,15 +828,15 @@ declare function useCookieConsent(visitorId: string | undefined): {
704
828
  isRefetching: boolean;
705
829
  isStale: boolean;
706
830
  isEnabled: boolean;
707
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CookieConsent | null, Error>>;
831
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<CookieConsent | null>, Error>>;
708
832
  fetchStatus: _tanstack_query_core.FetchStatus;
709
- promise: Promise<CookieConsent | null>;
833
+ promise: Promise<NoInfer<CookieConsent | null>>;
710
834
  } | {
711
835
  record: _tanstack_react_query.UseMutateAsyncFunction<CookieConsent, Error, CookieConsentInput, unknown>;
712
836
  revoke: _tanstack_react_query.UseMutateAsyncFunction<{
713
837
  success: boolean;
714
838
  }, Error, void, unknown>;
715
- data: CookieConsent | null;
839
+ data: NoInfer<CookieConsent | null>;
716
840
  error: null;
717
841
  isError: false;
718
842
  isPending: false;
@@ -735,9 +859,9 @@ declare function useCookieConsent(visitorId: string | undefined): {
735
859
  isRefetching: boolean;
736
860
  isStale: boolean;
737
861
  isEnabled: boolean;
738
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CookieConsent | null, Error>>;
862
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<CookieConsent | null>, Error>>;
739
863
  fetchStatus: _tanstack_query_core.FetchStatus;
740
- promise: Promise<CookieConsent | null>;
864
+ promise: Promise<NoInfer<CookieConsent | null>>;
741
865
  } | {
742
866
  record: _tanstack_react_query.UseMutateAsyncFunction<CookieConsent, Error, CookieConsentInput, unknown>;
743
867
  revoke: _tanstack_react_query.UseMutateAsyncFunction<{
@@ -766,9 +890,9 @@ declare function useCookieConsent(visitorId: string | undefined): {
766
890
  isRefetching: boolean;
767
891
  isStale: boolean;
768
892
  isEnabled: boolean;
769
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CookieConsent | null, Error>>;
893
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<CookieConsent | null>, Error>>;
770
894
  fetchStatus: _tanstack_query_core.FetchStatus;
771
- promise: Promise<CookieConsent | null>;
895
+ promise: Promise<NoInfer<CookieConsent | null>>;
772
896
  } | {
773
897
  record: _tanstack_react_query.UseMutateAsyncFunction<CookieConsent, Error, CookieConsentInput, unknown>;
774
898
  revoke: _tanstack_react_query.UseMutateAsyncFunction<{
@@ -797,9 +921,9 @@ declare function useCookieConsent(visitorId: string | undefined): {
797
921
  isRefetching: boolean;
798
922
  isStale: boolean;
799
923
  isEnabled: boolean;
800
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CookieConsent | null, Error>>;
924
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<CookieConsent | null>, Error>>;
801
925
  fetchStatus: _tanstack_query_core.FetchStatus;
802
- promise: Promise<CookieConsent | null>;
926
+ promise: Promise<NoInfer<CookieConsent | null>>;
803
927
  } | {
804
928
  record: _tanstack_react_query.UseMutateAsyncFunction<CookieConsent, Error, CookieConsentInput, unknown>;
805
929
  revoke: _tanstack_react_query.UseMutateAsyncFunction<{
@@ -828,15 +952,15 @@ declare function useCookieConsent(visitorId: string | undefined): {
828
952
  isRefetching: boolean;
829
953
  isStale: boolean;
830
954
  isEnabled: boolean;
831
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CookieConsent | null, Error>>;
955
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<CookieConsent | null>, Error>>;
832
956
  fetchStatus: _tanstack_query_core.FetchStatus;
833
- promise: Promise<CookieConsent | null>;
957
+ promise: Promise<NoInfer<CookieConsent | null>>;
834
958
  } | {
835
959
  record: _tanstack_react_query.UseMutateAsyncFunction<CookieConsent, Error, CookieConsentInput, unknown>;
836
960
  revoke: _tanstack_react_query.UseMutateAsyncFunction<{
837
961
  success: boolean;
838
962
  }, Error, void, unknown>;
839
- data: CookieConsent | null;
963
+ data: NoInfer<CookieConsent | null>;
840
964
  isError: false;
841
965
  error: null;
842
966
  isPending: false;
@@ -859,13 +983,13 @@ declare function useCookieConsent(visitorId: string | undefined): {
859
983
  isRefetching: boolean;
860
984
  isStale: boolean;
861
985
  isEnabled: boolean;
862
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CookieConsent | null, Error>>;
986
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<CookieConsent | null>, Error>>;
863
987
  fetchStatus: _tanstack_query_core.FetchStatus;
864
- promise: Promise<CookieConsent | null>;
988
+ promise: Promise<NoInfer<CookieConsent | null>>;
865
989
  };
866
990
 
867
991
  declare function useSubmitQuote(): _tanstack_react_query.UseMutationResult<QuoteRequest, Error, SubmitQuoteInput, unknown>;
868
- declare function useQuoteStatus(quoteId: string | undefined, email: string | undefined): _tanstack_react_query.UseQueryResult<QuoteRequest, Error>;
992
+ declare function useQuoteStatus(quoteId: string | undefined, email: string | undefined): _tanstack_react_query.UseQueryResult<NoInfer<QuoteRequest>, Error>;
869
993
 
870
994
  /** Subscribe an email to a back-in-stock notification for a product. */
871
995
  declare function useNotifyWhenAvailable(): _tanstack_react_query.UseMutationResult<BackInStockSubscription, Error, {
@@ -881,14 +1005,4 @@ declare function useNotifyWhenAvailable(): _tanstack_react_query.UseMutationResu
881
1005
  */
882
1006
  declare function useBehioClient(): BehioStorefront;
883
1007
 
884
- /**
885
- * Format a price amount with currency using Intl.NumberFormat.
886
- *
887
- * @param amount - The price amount (e.g. 1499, 24.99)
888
- * @param currency - ISO 4217 currency code (e.g. "CZK", "EUR", "USD")
889
- * @param locale - BCP 47 locale string (e.g. "cs", "en", "de"). Defaults to "cs".
890
- * @returns Formatted price string (e.g. "1 499 Kč", "24,99 €")
891
- */
892
- declare function formatPrice(amount: number, currency: string, locale?: string): string;
893
-
894
- export { ActivePromotion, BehioProvider, type BehioProviderProps, Bundle, Cart, Category, CategoryDetail, CheckoutInput, CookieConsent, CookieConsentInput, CrossSellItem, CustomerAddress, CustomerProfile, FilterField, GiftCardBalance, OrderDetail, OrderListItem, Page, PageDetail, PaginatedResponse, ProductDetail, ProductLabel, ProductListItem, ProductReviewsResponse, ProductsQuery, QuoteRequest, RegisterInput, ReturnRequest, ShopInfo, ShopSeo, type StorageAdapter, SubmitQuoteInput, SubmitReturnInput, SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCustomerOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UseProductOptions, type UseProductsOptions, type UseSearchOptions, type UseShopInfoOptions, type UseShopSeoOptions, WishlistItem, cookieStorage, createMemoryStorage, detectStorage, formatPrice, localStorageAdapter, memoryStorage, useAddressAutocomplete, useAddresses, useAuth, useBehio, useBehioClient, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCheckout, useCookieConsent, useCrossSell, useCustomer, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLookupReturnableOrder, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, useProduct, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShopInfo, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useWishlist };
1008
+ export { ActivePromotion, 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, 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 UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UseProductOptions, type UseProductsOptions, type UseSearchOptions, type UseShopInfoOptions, 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, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, useProduct, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShopInfo, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useWishlist };