@behio/storefront-sdk 0.29.0 → 0.31.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.
@@ -34,6 +34,73 @@ interface PaginatedResponse<T> {
34
34
  interface MessageResponse {
35
35
  message: string;
36
36
  }
37
+ /** How the shop wants the newsletter opt-in rendered at checkout. */
38
+ type NewsletterOptInDefault = "CHECKED" | "UNCHECKED" | "HIDDEN";
39
+ /** How sold-out products behave in the catalog. */
40
+ type StockBehavior = "HIDE" | "BACKORDER" | "SHOW_SOLD_OUT";
41
+ /**
42
+ * Merchant-configured checkout & cart rules the storefront MUST honour so the
43
+ * shop behaves exactly as it was configured in the admin. Mirrors the backend
44
+ * Eshop settings; the server also enforces the enforceable rules, so these are
45
+ * for UX (render required fields, consent checkboxes, cart limits, free-shipping
46
+ * progress) rather than a security boundary.
47
+ */
48
+ interface CheckoutSettings {
49
+ /** Guests may order without an account (also on ShopInfo for back-compat). */
50
+ allowGuestCheckout: boolean;
51
+ /** Checkout requires a logged-in / registered account. */
52
+ requireAccount: boolean;
53
+ /** New registrations wait for merchant approval before ordering (B2B). */
54
+ requireRegistrationApproval: boolean;
55
+ /** Phone number is a required checkout field. */
56
+ requirePhone: boolean;
57
+ /** Tax id (IČO/DIČ) is a required checkout field. */
58
+ requireTaxId: boolean;
59
+ /** Customer may leave an order note. */
60
+ allowOrderNote: boolean;
61
+ /** Discount / coupon codes may be applied in the cart. */
62
+ allowDiscountCodes: boolean;
63
+ /** Terms & conditions consent checkbox is required to place an order. */
64
+ requireTermsConsent: boolean;
65
+ /** GDPR / privacy consent checkbox is required to place an order. */
66
+ requireGdprConsent: boolean;
67
+ /** Default state of the newsletter opt-in on the checkout (or hide it). */
68
+ newsletterOptInDefault: NewsletterOptInDefault;
69
+ /** Minimum order value in the shop default currency, or null when unset. */
70
+ minOrderValue: number | null;
71
+ /** Maximum order value in the shop default currency, or null when unset. */
72
+ maxOrderValue: number | null;
73
+ /** Free-shipping threshold (shop default currency) for the cart progress bar. */
74
+ freeShippingThreshold: number | null;
75
+ /** Minimum number of items required in the cart to check out. */
76
+ minItemsInCart: number;
77
+ /** Maximum quantity of a single product per order, or null when unlimited. */
78
+ maxItemsPerProduct: number | null;
79
+ /**
80
+ * How sold-out products behave. The SERVER enforces the buying rules; the
81
+ * template mirrors them in UX:
82
+ * - `HIDE`: sold-out products are already filtered out of browse/search/
83
+ * featured responses server-side; PDP direct links still resolve — render
84
+ * them as sold out with the buy button disabled.
85
+ * - `SHOW_SOLD_OUT`: sold-out products render with a "Vyprodáno" state and
86
+ * a disabled buy button; the API rejects over-stock adds with a 400.
87
+ * - `BACKORDER`: out-of-stock products stay purchasable (any quantity);
88
+ * render "Na objednávku" instead of disabling the button.
89
+ * For HIDE/SHOW_SOLD_OUT cap quantity steppers at `stockQuantity` — the
90
+ * cart API 400s on anything above it.
91
+ */
92
+ stockBehavior: StockBehavior;
93
+ /**
94
+ * Merchant enabled the "only X left" nudge. When true, products whose stock
95
+ * is within `lowStockThreshold` carry `lowStockRemaining` — render the badge
96
+ * from that field alone (it is null everywhere else).
97
+ */
98
+ showLowStock: boolean;
99
+ /** Stock level at (and below) which the low-stock nudge shows. */
100
+ lowStockThreshold: number;
101
+ /** Google Places address autocomplete is enabled; mount the UX when true. */
102
+ addressAutocompleteEnabled: boolean;
103
+ }
37
104
  interface ShopInfo {
38
105
  id: string;
39
106
  name: string;
@@ -56,6 +123,25 @@ interface ShopInfo {
56
123
  * than hardcoded template config.
57
124
  */
58
125
  quotesEnabled: boolean;
126
+ /** Full merchant checkout & cart contract. Honour these in cart + checkout. */
127
+ checkout: CheckoutSettings;
128
+ }
129
+ interface NewsletterSubscribeInput {
130
+ email: string;
131
+ /** Preferred locale (ISO-639-1) captured at signup. */
132
+ locale?: string;
133
+ /** Where the opt-in came from, e.g. "footer" or "checkout". */
134
+ source?: string;
135
+ /** Honeypot: keep empty. A filled value is treated as a bot and ignored. */
136
+ website?: string;
137
+ }
138
+ interface NewsletterSubscribeResult {
139
+ success: boolean;
140
+ /** True when this email was already an active subscriber. */
141
+ alreadySubscribed: boolean;
142
+ }
143
+ interface NewsletterUnsubscribeResult {
144
+ success: boolean;
59
145
  }
60
146
  interface ShopSeo {
61
147
  locale: string;
@@ -152,6 +238,8 @@ interface ProductVariant {
152
238
  price: ProductPrice | null;
153
239
  inStock: boolean;
154
240
  stockQuantity?: number;
241
+ /** "Only X left" for this variant — same contract as ProductListItem.lowStockRemaining. */
242
+ lowStockRemaining?: number | null;
155
243
  /**
156
244
  * Cover image URL for the variant. Falls back to the parent product's
157
245
  * cover when the variant has no photo of its own — see `imageIsInherited`.
@@ -170,6 +258,28 @@ interface ProductLabel {
170
258
  name: string;
171
259
  color?: string;
172
260
  }
261
+ /**
262
+ * Resolved availability status of a product. Either a merchant preset
263
+ * ("skladem", "na objednávku", "předobjednávka", custom) or, when the product
264
+ * has none assigned, a status DERIVED from stock server-side. Render `label`
265
+ * as-is — it is already localized to the requested locale.
266
+ */
267
+ interface ProductAvailability {
268
+ /**
269
+ * Stable machine code for styling hooks: a merchant preset slug (e.g.
270
+ * "preorder") or the derived `"in-stock"` / `"sold-out"`.
271
+ */
272
+ code: string;
273
+ /** Localized display label (requested locale → shop default → slug). */
274
+ label: string;
275
+ /** Optional merchant-configured hex badge color (e.g. "#f59e0b"). */
276
+ color?: string | null;
277
+ /**
278
+ * "Available from" date (epoch ms) for preorder / on-order style states.
279
+ * Render as "Skladem od 20. 7." when present; null when not scheduled.
280
+ */
281
+ restockAt?: number | null;
282
+ }
173
283
  interface ProductListItem {
174
284
  id: string;
175
285
  slug: string;
@@ -181,6 +291,15 @@ interface ProductListItem {
181
291
  price: ProductPrice | null;
182
292
  inStock: boolean;
183
293
  stockQuantity?: number;
294
+ /**
295
+ * "Zbývá posledních X kusů" nudge, computed SERVER-side. Non-null ONLY when
296
+ * the merchant enabled the low-stock indicator AND 0 < stock <= threshold;
297
+ * the value is the exact remaining quantity. Render the badge whenever this
298
+ * is a number — no client-side threshold math needed.
299
+ */
300
+ lowStockRemaining?: number | null;
301
+ /** Resolved availability status (merchant preset or derived from stock). */
302
+ availability: ProductAvailability;
184
303
  /** Cover image of the listing. The API returns an object (url + alt + order), never a bare string. */
185
304
  image?: {
186
305
  url: string;
@@ -532,6 +651,12 @@ interface CheckoutAddress {
532
651
  firstName: string;
533
652
  lastName: string;
534
653
  company?: string;
654
+ /** Company registration number (IČO). Required when `ShopInfo.checkout`
655
+ * requires tax ids; loosely validated (6-12 digits). */
656
+ companyId?: string;
657
+ /** VAT id (DIČ). Required alongside `companyId` when tax ids are required;
658
+ * loosely validated (optional 2-letter country prefix + 6-12 digits). */
659
+ vatId?: string;
535
660
  street: string;
536
661
  city: string;
537
662
  zip: string;
@@ -550,6 +675,15 @@ interface CheckoutInput {
550
675
  email: string;
551
676
  phone?: string;
552
677
  customerNote?: string;
678
+ /**
679
+ * Legal / marketing consent echoed from the checkout checkboxes. Render the
680
+ * boxes from `ShopInfo.checkout` (requireTermsConsent / requireGdprConsent /
681
+ * newsletterOptInDefault) and send the customer's choice. The backend rejects
682
+ * the order when a required consent is not `true`.
683
+ */
684
+ termsConsent?: boolean;
685
+ gdprConsent?: boolean;
686
+ newsletterOptIn?: boolean;
553
687
  /**
554
688
  * Chosen shipping method. Required whenever the eshop has at least one
555
689
  * enabled shipping method — the backend rejects the order without it.
@@ -563,7 +697,19 @@ interface CheckoutInput {
563
697
  * or foreign quote is rejected.
564
698
  */
565
699
  shippingQuoteId?: string;
700
+ /**
701
+ * Chosen pickup point `externalId` from `shipping.getPickupPoints()`.
702
+ * REQUIRED when the resolved shipping method has `supportsPickupPoints`;
703
+ * the backend rejects the order without it. Snapshotted onto the order.
704
+ */
705
+ pickupPointId?: string;
566
706
  paymentMethodId?: string;
707
+ /**
708
+ * Loyalty points to redeem on this order. Validated server-side against the
709
+ * customer's actual balance and the program's redemption cap; ignored for
710
+ * guests. See `customer.getLoyalty()` for the available balance.
711
+ */
712
+ redeemLoyaltyPoints?: number;
567
713
  }
568
714
  type OrderStatus = (typeof OrderStatuses)[keyof typeof OrderStatuses];
569
715
  type PaymentStatus = (typeof PaymentStatuses)[keyof typeof PaymentStatuses];
@@ -890,6 +1036,122 @@ interface ShippingQuote extends ShippingMethodSummary {
890
1036
  /** Quote expiry (epoch ms). Null for fixed-price methods. */
891
1037
  expiresAt: number | null;
892
1038
  }
1039
+ /**
1040
+ * A pickup point (parcel shop / locker) for a shipping method with
1041
+ * `supportsPickupPoints`. Fetch with `behio.shipping.getPickupPoints()`,
1042
+ * then send the chosen `externalId` as `checkout.pickupPointId`.
1043
+ */
1044
+ interface PickupPoint {
1045
+ /** Carrier-native id. Send this back as `checkout.pickupPointId`. */
1046
+ externalId: string;
1047
+ name: string;
1048
+ street: string | null;
1049
+ city: string;
1050
+ zip: string;
1051
+ country: string;
1052
+ latitude: number | null;
1053
+ longitude: number | null;
1054
+ cashOnDelivery: boolean;
1055
+ cardPayment: boolean;
1056
+ /** Per-day opening hours; empty when the provider gives none. */
1057
+ openingHours: PickupPointHours[];
1058
+ }
1059
+ /** One day's opening-hours block for a pickup point. */
1060
+ interface PickupPointHours {
1061
+ /** Provider-native day key (e.g. weekday name or index). */
1062
+ day: string;
1063
+ /** Morning open time. */
1064
+ from1: string | null;
1065
+ /** Morning close time. */
1066
+ to1: string | null;
1067
+ /** Afternoon open time. */
1068
+ from2: string | null;
1069
+ /** Afternoon close time. */
1070
+ to2: string | null;
1071
+ }
1072
+ /** Input for `behio.shipping.getPickupPoints()`. */
1073
+ interface PickupPointsInput {
1074
+ /** Shipping method id (must have `supportsPickupPoints`). */
1075
+ methodId: string;
1076
+ /** Free-text search over name / city / zip. */
1077
+ query?: string;
1078
+ /** ISO 3166-1 alpha-2 country filter; defaults to the method's first
1079
+ * allowed country or CZ. */
1080
+ country?: string;
1081
+ /** Max results (default 30, capped at 100). */
1082
+ limit?: number;
1083
+ }
1084
+ /** Public terms of the eshop's loyalty program. */
1085
+ interface LoyaltyProgram {
1086
+ name: string;
1087
+ pointName: string;
1088
+ pointNamePlural: string;
1089
+ /** 1 point = `pointValueRatio` currency units. */
1090
+ pointValueRatio: number;
1091
+ currency: string;
1092
+ minRedemptionPoints: number;
1093
+ maxRedemptionPercent: number;
1094
+ combineWithDiscounts: boolean;
1095
+ description: string | null;
1096
+ iconUrl: string | null;
1097
+ }
1098
+ interface LoyaltyBalance {
1099
+ currentPoints: number;
1100
+ /** `currentPoints` valued in the program currency. */
1101
+ currentPointsValue: number;
1102
+ lifetimePointsEarned: number;
1103
+ lifetimePointsRedeemed: number;
1104
+ lifetimeSpend: number;
1105
+ }
1106
+ interface LoyaltyTier {
1107
+ name: string;
1108
+ slug: string;
1109
+ color: string | null;
1110
+ earnMultiplier: number;
1111
+ /** Tier perks (human-readable perk lines), or null when the tier has none. */
1112
+ perks: LoyaltyTierPerks | null;
1113
+ }
1114
+ /** Perks attached to a loyalty tier. */
1115
+ interface LoyaltyTierPerks {
1116
+ /** Human-readable perk lines shown on the tier. */
1117
+ list: string[];
1118
+ }
1119
+ interface LoyaltyNextTier {
1120
+ name: string;
1121
+ slug: string;
1122
+ color: string | null;
1123
+ thresholdType: string;
1124
+ thresholdValue: number;
1125
+ currentValue: number;
1126
+ remaining: number;
1127
+ /** 0-100 progress toward this tier. */
1128
+ progressPercent: number;
1129
+ }
1130
+ interface LoyaltyTransaction {
1131
+ type: string;
1132
+ /** Positive = earned, negative = redeemed / expired. */
1133
+ points: number;
1134
+ balanceAfter: number;
1135
+ eventType: string | null;
1136
+ description: string | null;
1137
+ createdAt: number;
1138
+ }
1139
+ /**
1140
+ * Loyalty summary for the logged-in customer. `hasProgram` is false when the
1141
+ * eshop runs no program; `enrolled` is false when the customer has not yet
1142
+ * joined (then `program` still carries the public terms so you can render a
1143
+ * "join and earn" CTA).
1144
+ */
1145
+ interface LoyaltySummary {
1146
+ hasProgram: boolean;
1147
+ enrolled: boolean;
1148
+ program: LoyaltyProgram | null;
1149
+ balance: LoyaltyBalance | null;
1150
+ currentTier: LoyaltyTier | null;
1151
+ nextTier: LoyaltyNextTier | null;
1152
+ referralCode: string | null;
1153
+ transactions: LoyaltyTransaction[];
1154
+ }
893
1155
  interface CrossSellItem {
894
1156
  productId: string;
895
1157
  slug: string | null;
@@ -909,6 +1171,9 @@ interface CrossSellItem {
909
1171
  stockCached: number;
910
1172
  /** Convenience flag: `stockCached > 0`. */
911
1173
  inStock: boolean;
1174
+ /** Merchant-editable note ("proč se to hodí") resolved for the requested
1175
+ * locale (falls back to the eshop default language). `null` when unset. */
1176
+ note?: string | null;
912
1177
  }
913
1178
  interface ActivePromotion {
914
1179
  id: string;
@@ -1142,6 +1407,7 @@ declare class BehioStorefront {
1142
1407
  readonly quotes: QuotesModule;
1143
1408
  readonly addresses: AddressModule;
1144
1409
  readonly shipping: ShippingModule;
1410
+ readonly newsletter: NewsletterModule;
1145
1411
  /**
1146
1412
  * Called by the analytics tracker when the visitor grants (id) or revokes
1147
1413
  * (null) analytics consent. When set, requests carry the X-Behio-Vid header
@@ -1503,6 +1769,12 @@ declare class CustomerModule {
1503
1769
  updateAddress(addressId: string, data: Partial<CustomerAddress>): Promise<SdkResult<CustomerAddress>>;
1504
1770
  /** Delete address */
1505
1771
  deleteAddress(addressId: string): Promise<SdkResult<void>>;
1772
+ /**
1773
+ * Loyalty program summary for the logged-in customer (points balance +
1774
+ * value, current tier, next-tier progress, point ratio, referral code,
1775
+ * recent transactions). Requires an authenticated customer session.
1776
+ */
1777
+ getLoyalty(): Promise<SdkResult<LoyaltySummary>>;
1506
1778
  }
1507
1779
  declare class PagesModule {
1508
1780
  private client;
@@ -1642,6 +1914,29 @@ declare class ShippingModule {
1642
1914
  quote(input: ShippingQuoteInput): Promise<SdkResult<{
1643
1915
  items: ShippingQuote[];
1644
1916
  }>>;
1917
+ /**
1918
+ * List pickup points (parcel shops / lockers) for a method that has
1919
+ * `supportsPickupPoints`. Filter with `query` (name / city / zip) for a
1920
+ * "find your branch" box. Send the chosen point's `externalId` back as
1921
+ * `checkout.pickupPointId`.
1922
+ */
1923
+ getPickupPoints(input: PickupPointsInput): Promise<SdkResult<{
1924
+ items: PickupPoint[];
1925
+ }>>;
1926
+ }
1927
+ /**
1928
+ * First-party newsletter opt-in. Use for the footer signup block and the
1929
+ * checkout newsletter checkbox (render its default from
1930
+ * `ShopInfo.checkout.newsletterOptInDefault`). Subscribing is idempotent and
1931
+ * re-activates a previously unsubscribed email. Pass the hidden `website`
1932
+ * honeypot field straight through from your form: a filled value is silently
1933
+ * accepted but stored nowhere.
1934
+ */
1935
+ declare class NewsletterModule {
1936
+ private client;
1937
+ constructor(client: BehioStorefront);
1938
+ subscribe(input: NewsletterSubscribeInput): Promise<SdkResult<NewsletterSubscribeResult>>;
1939
+ unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
1645
1940
  }
1646
1941
 
1647
- 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 RequestInterceptor as aA, type RequestInterceptorConfig as aB, type ResponseInterceptor as aC, type ResponseInterceptorData as aD, type ReturnRequestItem as aE, type ReturnStatusItem as aF, type ReturnableOrderItem as aG, type SdkError as aH, type SdkResult as aI, type ShippingMethodSummary as aJ, type ShippingQuote as aK, type ShippingQuoteInput as aL, type ShopScript as aM, type ShopScriptPlacement as aN, type ShopScriptType as aO, err as aP, ok as aQ, toSdkError as aR, type BehioEventHandler as aa, type BehioEventType as ab, BehioNetworkError as ac, type CartBundleLine as ad, type CartBundleLineItem as ae, type CartItemProduct as af, type CartPromotion as ag, type CheckoutPaymentMethod as ah, type DataGroupFieldType as ai, FulfillmentStatuses as aj, type GiftCardSummary as ak, type MenuItem as al, type MenuItemRef as am, type MenuItemType as an, type OrderStatusHistory as ao, OrderStatuses as ap, type OrderTracking as aq, type PageAttachment as ar, PaymentStatuses as as, type ProductMedia as at, type ProductMediaVariant as au, ProductSort as av, type ProductSortValue as aw, type ProductVolumePrice as ax, type QuoteItem as ay, type RegisterResult 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 };
1942
+ export { type BundleItem as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ProductReviewsResponse as D, type SubmitReviewInput as E, type FilterField as F, type GiftCardBalance as G, type ReturnableOrder as H, type ReturnStatus as I, type ReturnRequest as J, type SubmitReturnInput as K, type LoyaltySummary as L, type Menu as M, type NewsletterSubscribeResult as N, type OrderListItem as O, type ProductsQuery as P, type CookieConsent as Q, type RegisterInput as R, type ShopInfo as S, type CookieConsentInput as T, type QuoteRequest as U, type SubmitQuoteInput as V, type WishlistItem as W, type BackInStockSubscription as X, type AddToCartInput as Y, type AuthTokens as Z, BehioApiError as _, BehioStorefront as a, type ShippingQuoteInput as a$, type CartDiscount as a0, type CartItem as a1, type CheckoutAddress as a2, type FulfillmentStatus as a3, type LoginInput as a4, type MessageResponse as a5, type OrderItem as a6, type OrderStatus as a7, type PaymentStatus as a8, type ProductPrice as a9, type MenuItemType as aA, type NewsletterOptInDefault as aB, type OrderStatusHistory as aC, OrderStatuses as aD, type OrderTracking as aE, type PageAttachment as aF, PaymentStatuses as aG, type PickupPointHours as aH, type ProductAvailability as aI, type ProductMedia as aJ, type ProductMediaVariant as aK, ProductSort as aL, type ProductSortValue as aM, type ProductVolumePrice as aN, type QuoteItem as aO, type RegisterResult as aP, type RequestInterceptor as aQ, type RequestInterceptorConfig as aR, type ResponseInterceptor as aS, type ResponseInterceptorData as aT, type ReturnRequestItem as aU, type ReturnStatusItem as aV, type ReturnableOrderItem as aW, type SdkError as aX, type SdkResult as aY, type ShippingMethodSummary as aZ, type ShippingQuote as a_, type ProductReview as aa, type ProductVariant as ab, type AddressType as ac, AddressTypes as ad, type BadgeTone as ae, type BehioErrorCode as af, type BehioEventHandler as ag, type BehioEventType as ah, BehioNetworkError as ai, type CartBundleLine as aj, type CartBundleLineItem as ak, type CartItemProduct as al, type CartPromotion as am, type CheckoutPaymentMethod as an, type CheckoutSettings as ao, type DataGroupFieldType as ap, FulfillmentStatuses as aq, type GiftCardSummary as ar, type LoyaltyBalance as as, type LoyaltyNextTier as at, type LoyaltyProgram as au, type LoyaltyTier as av, type LoyaltyTierPerks as aw, type LoyaltyTransaction as ax, type MenuItem as ay, type MenuItemRef as az, type PaginatedResponse as b, type ShopScript as b0, type ShopScriptPlacement as b1, type ShopScriptType as b2, type StockBehavior as b3, err as b4, ok as b5, toSdkError as b6, 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 PickupPointsInput as k, type PickupPoint as l, type NewsletterSubscribeInput as m, type NewsletterUnsubscribeResult as n, type OrderDetail as o, type OrderAccessRequestResponse as p, type OrderAccessVerifyResponse as q, type CheckoutInput as r, type PageDetail as s, type Page as t, type ShopScripts as u, type ShopSeo as v, type Bundle as w, type ProductGroup as x, type CrossSellItem as y, type ActivePromotion as z };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
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, ag as CartPromotion, C as Category, e as CategoryDetail, Y as CheckoutAddress, n as CheckoutInput, ah as CheckoutPaymentMethod, H as CookieConsent, I as CookieConsentInput, u as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ai as DataGroupFieldType, F as FilterField, Z as FulfillmentStatus, aj as FulfillmentStatuses, G as GiftCardBalance, ak as GiftCardSummary, _ as LoginInput, M as Menu, al as MenuItem, am as MenuItemRef, an as MenuItemType, $ as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, a0 as OrderItem, O as OrderListItem, a1 as OrderStatus, ao as OrderStatusHistory, ap as OrderStatuses, aq as OrderTracking, p as Page, ar as PageAttachment, o as PageDetail, b as PaginatedResponse, a2 as PaymentStatus, as as PaymentStatuses, d as ProductDetail, t as ProductGroup, f as ProductLabel, c as ProductListItem, at as ProductMedia, au as ProductMediaVariant, a3 as ProductPrice, a4 as ProductReview, w as ProductReviewsResponse, av as ProductSort, aw as ProductSortValue, a5 as ProductVariant, ax as ProductVolumePrice, P as ProductsQuery, ay as QuoteItem, Q as QuoteRequest, R as RegisterInput, az as RegisterResult, aA as RequestInterceptor, aB as RequestInterceptorConfig, aC as ResponseInterceptor, aD as ResponseInterceptorData, D as ReturnRequest, aE as ReturnRequestItem, z as ReturnStatus, aF as ReturnStatusItem, y as ReturnableOrder, aG as ReturnableOrderItem, aH as SdkError, aI as SdkResult, aJ as ShippingMethodSummary, aK as ShippingQuote, aL as ShippingQuoteInput, S as ShopInfo, aM as ShopScript, aN as ShopScriptPlacement, aO as ShopScriptType, q as ShopScripts, r as ShopSeo, J as SubmitQuoteInput, E as SubmitReturnInput, x as SubmitReviewInput, W as WishlistItem, aP as err, aQ as ok, aR as toSdkError } from './client-BQroQWyY.mjs';
1
+ export { z as ActivePromotion, Y as AddToCartInput, j as AddressDetail, A as AddressSuggestion, ac as AddressType, ad as AddressTypes, Z as AuthTokens, X as BackInStockSubscription, ae as BadgeTone, _ as BehioApiError, af as BehioErrorCode, ag as BehioEventHandler, ah as BehioEventType, ai as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, w as Bundle, $ as BundleItem, g as Cart, aj as CartBundleLine, ak as CartBundleLineItem, a0 as CartDiscount, a1 as CartItem, al as CartItemProduct, am as CartPromotion, C as Category, e as CategoryDetail, a2 as CheckoutAddress, r as CheckoutInput, an as CheckoutPaymentMethod, ao as CheckoutSettings, Q as CookieConsent, T as CookieConsentInput, y as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ap as DataGroupFieldType, F as FilterField, a3 as FulfillmentStatus, aq as FulfillmentStatuses, G as GiftCardBalance, ar as GiftCardSummary, a4 as LoginInput, as as LoyaltyBalance, at as LoyaltyNextTier, au as LoyaltyProgram, L as LoyaltySummary, av as LoyaltyTier, aw as LoyaltyTierPerks, ax as LoyaltyTransaction, M as Menu, ay as MenuItem, az as MenuItemRef, aA as MenuItemType, a5 as MessageResponse, aB as NewsletterOptInDefault, m as NewsletterSubscribeInput, N as NewsletterSubscribeResult, n as NewsletterUnsubscribeResult, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, o as OrderDetail, a6 as OrderItem, O as OrderListItem, a7 as OrderStatus, aC as OrderStatusHistory, aD as OrderStatuses, aE as OrderTracking, t as Page, aF as PageAttachment, s as PageDetail, b as PaginatedResponse, a8 as PaymentStatus, aG as PaymentStatuses, l as PickupPoint, aH as PickupPointHours, k as PickupPointsInput, aI as ProductAvailability, d as ProductDetail, x as ProductGroup, f as ProductLabel, c as ProductListItem, aJ as ProductMedia, aK as ProductMediaVariant, a9 as ProductPrice, aa as ProductReview, D as ProductReviewsResponse, aL as ProductSort, aM as ProductSortValue, ab as ProductVariant, aN as ProductVolumePrice, P as ProductsQuery, aO as QuoteItem, U as QuoteRequest, R as RegisterInput, aP as RegisterResult, aQ as RequestInterceptor, aR as RequestInterceptorConfig, aS as ResponseInterceptor, aT as ResponseInterceptorData, J as ReturnRequest, aU as ReturnRequestItem, I as ReturnStatus, aV as ReturnStatusItem, H as ReturnableOrder, aW as ReturnableOrderItem, aX as SdkError, aY as SdkResult, aZ as ShippingMethodSummary, a_ as ShippingQuote, a$ as ShippingQuoteInput, S as ShopInfo, b0 as ShopScript, b1 as ShopScriptPlacement, b2 as ShopScriptType, u as ShopScripts, v as ShopSeo, b3 as StockBehavior, V as SubmitQuoteInput, K as SubmitReturnInput, E as SubmitReviewInput, W as WishlistItem, b4 as err, b5 as ok, b6 as toSdkError } from './client-D1GZSa-N.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 { 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, ag as CartPromotion, C as Category, e as CategoryDetail, Y as CheckoutAddress, n as CheckoutInput, ah as CheckoutPaymentMethod, H as CookieConsent, I as CookieConsentInput, u as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ai as DataGroupFieldType, F as FilterField, Z as FulfillmentStatus, aj as FulfillmentStatuses, G as GiftCardBalance, ak as GiftCardSummary, _ as LoginInput, M as Menu, al as MenuItem, am as MenuItemRef, an as MenuItemType, $ as MessageResponse, l as OrderAccessRequestResponse, m as OrderAccessVerifyResponse, k as OrderDetail, a0 as OrderItem, O as OrderListItem, a1 as OrderStatus, ao as OrderStatusHistory, ap as OrderStatuses, aq as OrderTracking, p as Page, ar as PageAttachment, o as PageDetail, b as PaginatedResponse, a2 as PaymentStatus, as as PaymentStatuses, d as ProductDetail, t as ProductGroup, f as ProductLabel, c as ProductListItem, at as ProductMedia, au as ProductMediaVariant, a3 as ProductPrice, a4 as ProductReview, w as ProductReviewsResponse, av as ProductSort, aw as ProductSortValue, a5 as ProductVariant, ax as ProductVolumePrice, P as ProductsQuery, ay as QuoteItem, Q as QuoteRequest, R as RegisterInput, az as RegisterResult, aA as RequestInterceptor, aB as RequestInterceptorConfig, aC as ResponseInterceptor, aD as ResponseInterceptorData, D as ReturnRequest, aE as ReturnRequestItem, z as ReturnStatus, aF as ReturnStatusItem, y as ReturnableOrder, aG as ReturnableOrderItem, aH as SdkError, aI as SdkResult, aJ as ShippingMethodSummary, aK as ShippingQuote, aL as ShippingQuoteInput, S as ShopInfo, aM as ShopScript, aN as ShopScriptPlacement, aO as ShopScriptType, q as ShopScripts, r as ShopSeo, J as SubmitQuoteInput, E as SubmitReturnInput, x as SubmitReviewInput, W as WishlistItem, aP as err, aQ as ok, aR as toSdkError } from './client-BQroQWyY.js';
1
+ export { z as ActivePromotion, Y as AddToCartInput, j as AddressDetail, A as AddressSuggestion, ac as AddressType, ad as AddressTypes, Z as AuthTokens, X as BackInStockSubscription, ae as BadgeTone, _ as BehioApiError, af as BehioErrorCode, ag as BehioEventHandler, ah as BehioEventType, ai as BehioNetworkError, a as BehioStorefront, B as BehioStorefrontConfig, w as Bundle, $ as BundleItem, g as Cart, aj as CartBundleLine, ak as CartBundleLineItem, a0 as CartDiscount, a1 as CartItem, al as CartItemProduct, am as CartPromotion, C as Category, e as CategoryDetail, a2 as CheckoutAddress, r as CheckoutInput, an as CheckoutPaymentMethod, ao as CheckoutSettings, Q as CookieConsent, T as CookieConsentInput, y as CrossSellItem, i as CustomerAddress, h as CustomerProfile, ap as DataGroupFieldType, F as FilterField, a3 as FulfillmentStatus, aq as FulfillmentStatuses, G as GiftCardBalance, ar as GiftCardSummary, a4 as LoginInput, as as LoyaltyBalance, at as LoyaltyNextTier, au as LoyaltyProgram, L as LoyaltySummary, av as LoyaltyTier, aw as LoyaltyTierPerks, ax as LoyaltyTransaction, M as Menu, ay as MenuItem, az as MenuItemRef, aA as MenuItemType, a5 as MessageResponse, aB as NewsletterOptInDefault, m as NewsletterSubscribeInput, N as NewsletterSubscribeResult, n as NewsletterUnsubscribeResult, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, o as OrderDetail, a6 as OrderItem, O as OrderListItem, a7 as OrderStatus, aC as OrderStatusHistory, aD as OrderStatuses, aE as OrderTracking, t as Page, aF as PageAttachment, s as PageDetail, b as PaginatedResponse, a8 as PaymentStatus, aG as PaymentStatuses, l as PickupPoint, aH as PickupPointHours, k as PickupPointsInput, aI as ProductAvailability, d as ProductDetail, x as ProductGroup, f as ProductLabel, c as ProductListItem, aJ as ProductMedia, aK as ProductMediaVariant, a9 as ProductPrice, aa as ProductReview, D as ProductReviewsResponse, aL as ProductSort, aM as ProductSortValue, ab as ProductVariant, aN as ProductVolumePrice, P as ProductsQuery, aO as QuoteItem, U as QuoteRequest, R as RegisterInput, aP as RegisterResult, aQ as RequestInterceptor, aR as RequestInterceptorConfig, aS as ResponseInterceptor, aT as ResponseInterceptorData, J as ReturnRequest, aU as ReturnRequestItem, I as ReturnStatus, aV as ReturnStatusItem, H as ReturnableOrder, aW as ReturnableOrderItem, aX as SdkError, aY as SdkResult, aZ as ShippingMethodSummary, a_ as ShippingQuote, a$ as ShippingQuoteInput, S as ShopInfo, b0 as ShopScript, b1 as ShopScriptPlacement, b2 as ShopScriptType, u as ShopScripts, v as ShopSeo, b3 as StockBehavior, V as SubmitQuoteInput, K as SubmitReturnInput, E as SubmitReviewInput, W as WishlistItem, b4 as err, b5 as ok, b6 as toSdkError } from './client-D1GZSa-N.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 _chunkCXKZLKUYjs = require('./chunk-CXKZLKUY.js');
17
+ var _chunkNG46DR3Ajs = require('./chunk-NG46DR3A.js');
18
18
 
19
19
 
20
20
 
@@ -29,4 +29,4 @@ var _chunkCXKZLKUYjs = require('./chunk-CXKZLKUY.js');
29
29
 
30
30
 
31
31
 
32
- exports.AddressTypes = _chunkCXKZLKUYjs.AddressTypes; exports.BehioApiError = _chunkCXKZLKUYjs.BehioApiError; exports.BehioNetworkError = _chunkCXKZLKUYjs.BehioNetworkError; exports.BehioStorefront = _chunkCXKZLKUYjs.BehioStorefront; exports.FulfillmentStatuses = _chunkCXKZLKUYjs.FulfillmentStatuses; exports.OrderStatuses = _chunkCXKZLKUYjs.OrderStatuses; exports.PaymentStatuses = _chunkCXKZLKUYjs.PaymentStatuses; exports.ProductSort = _chunkCXKZLKUYjs.ProductSort; exports.err = _chunkCXKZLKUYjs.err; exports.formatPrice = _chunkJIAOZ5YWjs.formatPrice; exports.ok = _chunkCXKZLKUYjs.ok; exports.toSdkError = _chunkCXKZLKUYjs.toSdkError; exports.trackEcommerceEvent = _chunkJIAOZ5YWjs.trackEcommerceEvent;
32
+ exports.AddressTypes = _chunkNG46DR3Ajs.AddressTypes; exports.BehioApiError = _chunkNG46DR3Ajs.BehioApiError; exports.BehioNetworkError = _chunkNG46DR3Ajs.BehioNetworkError; exports.BehioStorefront = _chunkNG46DR3Ajs.BehioStorefront; exports.FulfillmentStatuses = _chunkNG46DR3Ajs.FulfillmentStatuses; exports.OrderStatuses = _chunkNG46DR3Ajs.OrderStatuses; exports.PaymentStatuses = _chunkNG46DR3Ajs.PaymentStatuses; exports.ProductSort = _chunkNG46DR3Ajs.ProductSort; exports.err = _chunkNG46DR3Ajs.err; exports.formatPrice = _chunkJIAOZ5YWjs.formatPrice; exports.ok = _chunkNG46DR3Ajs.ok; exports.toSdkError = _chunkNG46DR3Ajs.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-TN5C6CAB.mjs";
17
+ } from "./chunk-O7HDB5R4.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-BQroQWyY.mjs';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-D1GZSa-N.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-BQroQWyY.js';
1
+ import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-D1GZSa-N.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 _chunkCXKZLKUYjs = require('./chunk-CXKZLKUY.js');
3
+ var _chunkNG46DR3Ajs = require('./chunk-NG46DR3A.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, _chunkCXKZLKUYjs.BehioStorefront)({
21
+ const client = new (0, _chunkNG46DR3Ajs.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-TN5C6CAB.mjs";
3
+ } from "./chunk-O7HDB5R4.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 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-BQroQWyY.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-BQroQWyY.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, L as LoyaltySummary, k as PickupPointsInput, l as PickupPoint, N as NewsletterSubscribeResult, m as NewsletterSubscribeInput, n as NewsletterUnsubscribeResult, O as OrderListItem, o as OrderDetail, p as OrderAccessRequestResponse, q as OrderAccessVerifyResponse, r as CheckoutInput, s as PageDetail, t as Page, S as ShopInfo, u as ShopScripts, v as ShopSeo, w as Bundle, x as ProductGroup, y as CrossSellItem, z as ActivePromotion, G as GiftCardBalance, W as WishlistItem, D as ProductReviewsResponse, E as SubmitReviewInput, H as ReturnableOrder, I as ReturnStatus, J as ReturnRequest, K as SubmitReturnInput, Q as CookieConsent, T as CookieConsentInput, U as QuoteRequest, V as SubmitQuoteInput, X as BackInStockSubscription } from './client-D1GZSa-N.mjs';
5
+ export { Y as AddToCartInput, Z as AuthTokens, _ as BehioApiError, $ as BundleItem, a0 as CartDiscount, a1 as CartItem, a2 as CheckoutAddress, a3 as FulfillmentStatus, a4 as LoginInput, a5 as MessageResponse, a6 as OrderItem, a7 as OrderStatus, a8 as PaymentStatus, a9 as ProductPrice, aa as ProductReview, ab as ProductVariant } from './client-D1GZSa-N.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
 
@@ -305,6 +305,48 @@ interface UseAddressAutocompleteReturn {
305
305
  */
306
306
  declare function useAddressAutocomplete(options: UseAddressAutocompleteOptions): UseAddressAutocompleteReturn;
307
307
 
308
+ interface UseLoyaltyOptions {
309
+ enabled?: boolean;
310
+ }
311
+ /**
312
+ * Loyalty program summary for the logged-in customer (GAP-06): points
313
+ * balance + value, current tier, next-tier progress, point ratio, referral
314
+ * code and recent transactions. Only runs when a customer is authenticated.
315
+ */
316
+ declare function useLoyalty(options?: UseLoyaltyOptions): {
317
+ loyalty: NoInfer<LoyaltySummary> | undefined;
318
+ isLoading: boolean;
319
+ error: Error | null;
320
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<LoyaltySummary>, Error>>;
321
+ };
322
+
323
+ /**
324
+ * Pickup points (parcel shops / lockers) for a shipping method that supports
325
+ * them (GAP-03). Pass `methodId` and optionally a `query` (name / city / zip)
326
+ * for a "find your branch" search box. Send the chosen point's `externalId`
327
+ * as `checkout.pickupPointId`. The query is disabled until `methodId` is set.
328
+ */
329
+ declare function usePickupPoints(input: Partial<PickupPointsInput> & {
330
+ enabled?: boolean;
331
+ }): {
332
+ pickupPoints: PickupPoint[];
333
+ isLoading: boolean;
334
+ error: Error | null;
335
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
336
+ items: PickupPoint[];
337
+ }>, Error>>;
338
+ };
339
+
340
+ /**
341
+ * Subscribe an email to the shop newsletter (first-party opt-in, GAP-08).
342
+ * Use for the footer signup block; the checkout opt-in checkbox goes through
343
+ * the checkout input's `newsletterOptIn` instead. Subscribing is idempotent
344
+ * and re-activates a previously unsubscribed email.
345
+ */
346
+ declare function useNewsletterSubscribe(): _tanstack_react_query.UseMutationResult<NewsletterSubscribeResult, Error, NewsletterSubscribeInput, unknown>;
347
+ /** Unsubscribe an email from the shop newsletter (idempotent). */
348
+ declare function useNewsletterUnsubscribe(): _tanstack_react_query.UseMutationResult<NewsletterUnsubscribeResult, Error, string, unknown>;
349
+
308
350
  interface UseOrdersOptions {
309
351
  page?: number;
310
352
  limit?: number;
@@ -1071,4 +1113,4 @@ declare function useNotifyWhenAvailable(): _tanstack_react_query.UseMutationResu
1071
1113
  */
1072
1114
  declare function useBehioClient(): BehioStorefront;
1073
1115
 
1074
- 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 };
1116
+ 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 UseLoyaltyOptions, 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, useLoyalty, useMenu, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePickupPoints, useProduct, useProductGroup, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShopInfo, useShopScripts, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useWishlist };