@behio/storefront-sdk 1.18.0 → 2.0.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.
@@ -15,6 +15,8 @@ interface BehioStorefrontConfig {
15
15
  locale?: string;
16
16
  /** Default currency for price resolution. Default: none (uses shop default) */
17
17
  currency?: string;
18
+ /** Default delivery country (ISO-2) for catalog price rules. Does not mutate the cart. */
19
+ country?: string;
18
20
  /** Custom fetch implementation (for Node.js < 18 or testing) */
19
21
  fetch?: typeof fetch;
20
22
  /**
@@ -78,6 +80,14 @@ type StockMode = "TRACKED" | "ALWAYS_AVAILABLE" | "MADE_TO_ORDER";
78
80
  * progress) rather than a security boundary.
79
81
  */
80
82
  interface CheckoutSettings {
83
+ /** Single page or address / delivery / confirmation steps. Missing = SINGLE_PAGE. */
84
+ checkoutLayout?: "SINGLE_PAGE" | "STEP_BY_STEP";
85
+ /** Hide the optional subtotal/tax/discount breakdown, never the payable total. */
86
+ showCartPriceBreakdown?: boolean;
87
+ /** Show a delivery estimate only if the selected method supplies one. */
88
+ showEstimatedDelivery?: boolean;
89
+ /** Merchant's plain-text order confirmation message. */
90
+ orderConfirmationText?: string | null;
81
91
  /** Guests may order without an account (also on ShopInfo for back-compat). */
82
92
  allowGuestCheckout: boolean;
83
93
  /** Checkout requires a logged-in / registered account. */
@@ -125,8 +135,10 @@ interface CheckoutSettings {
125
135
  * them as sold out with the buy button disabled.
126
136
  * - `SHOW_SOLD_OUT`: sold-out products render with a "Vyprodáno" state and
127
137
  * a disabled buy button; the API rejects over-stock adds with a 400.
128
- * - `BACKORDER`: out-of-stock products stay purchasable (any quantity);
129
- * render "Na objednávku" instead of disabling the button.
138
+ * - `BACKORDER`: follow `isPurchasable`; the merchant can cap negative stock
139
+ * with a positive safetyStock allowance. Zero keeps backorders unlimited.
140
+ * The cart validates ordinary and bundled quantities together and returns
141
+ * quantityControls for accepted repair/increase targets.
130
142
  * For HIDE/SHOW_SOLD_OUT cap quantity steppers at `stockQuantity` — the
131
143
  * cart API 400s on anything above it.
132
144
  */
@@ -158,7 +170,20 @@ interface CheckoutSettings {
158
170
  }
159
171
  /** Price presentation mode (Eshop.priceDisplay). See `CheckoutSettings.priceDisplay`. */
160
172
  type PriceDisplay = "INCL_VAT" | "EXCL_VAT" | "CUSTOMER_CHOICE";
173
+ type CurrencyDisplayFormat = "SYMBOL_BEFORE" | "SYMBOL_AFTER" | "CODE";
161
174
  interface ShopInfo {
175
+ currencyDisplayFormat?: CurrencyDisplayFormat;
176
+ account?: {
177
+ passwordMinLength: number;
178
+ requireEmailVerification: boolean;
179
+ };
180
+ /** Admin overrides take precedence over template tokens; null inherits them. */
181
+ appearance?: ShopAppearance;
182
+ /** Separate from isActive. Explicit maintenance applies to preview shops too. */
183
+ maintenance?: {
184
+ enabled: boolean;
185
+ message: string | null;
186
+ };
162
187
  id: string;
163
188
  name: string;
164
189
  domain: string;
@@ -205,6 +230,15 @@ interface ShopInfo {
205
230
  */
206
231
  seo?: ShopSeoIdentity;
207
232
  }
233
+ interface ShopAppearance {
234
+ primaryColor: string | null;
235
+ secondaryColor: string | null;
236
+ /** CSS family list. Templates validate syntax and retain local fallbacks. */
237
+ fontFamily: string | null;
238
+ /** CSS only. Escape raw-text closing tags when embedding in a style element. */
239
+ customCss: string | null;
240
+ showPoweredBy: boolean;
241
+ }
208
242
  /** Public shop identity for SEO / structured data (GAP-31). */
209
243
  interface ShopSeoIdentity {
210
244
  /** Merchant shop description — Organization JSON-LD `description`. */
@@ -230,6 +264,8 @@ interface NewsletterUnsubscribeResult {
230
264
  success: boolean;
231
265
  }
232
266
  interface ShopSeo {
267
+ robotsTxt?: string | null;
268
+ googleSiteVerification?: string | null;
233
269
  locale: string;
234
270
  title: string | null;
235
271
  description: string | null;
@@ -356,7 +392,16 @@ interface ProductVariant {
356
392
  * the chosen variant.
357
393
  */
358
394
  id: string;
395
+ /** Public supporting files/media of this variant; no paid download URLs. */
396
+ assetGroups?: ProductAssetGroup[];
397
+ /** Approved reviews of this exact sellable listing. */
398
+ ratingAverage?: number | null;
399
+ ratingCount?: number;
400
+ requiresShipping?: boolean;
401
+ isDigital?: boolean;
359
402
  sku: string;
403
+ /** Barcode of this sellable variant; never inherit the parent barcode. */
404
+ gtin?: string | null;
360
405
  /**
361
406
  * Variant name in the requested locale. Before SDK 1.1.0 this was always the
362
407
  * warehouse item name, so translated shops showed one language to everyone.
@@ -391,6 +436,8 @@ interface ProductVariant {
391
436
  * Added in SDK 1.1.0.
392
437
  */
393
438
  images: ProductDetail["images"];
439
+ /** Own image/video gallery. Empty means inherit the parent gallery. */
440
+ media?: ProductMedia[];
394
441
  /**
395
442
  * Per-variant SEO/OG overrides, or `null` when the merchant wrote none. The
396
443
  * canonical URL stays the parent's, so use these only when a variant is
@@ -418,6 +465,16 @@ interface ProductVariant {
418
465
  /** `null` when prices are gated behind login for guests (B2B mode). */
419
466
  price: ProductPrice | null;
420
467
  inStock: boolean;
468
+ /** Own sale window and stock policy. Never infer eligibility from price. */
469
+ isPurchasable?: boolean;
470
+ availability?: ProductAvailability;
471
+ /** Own purchase rules; null means no constraint, not inheritance. */
472
+ minOrderQuantity?: number | null;
473
+ orderQuantityStep?: number | null;
474
+ saleStartAt?: number | null;
475
+ saleEndAt?: number | null;
476
+ /** This variant's quantity tiers in the requested currency. Empty for gated guests. */
477
+ volumePricing?: ProductVolumePrice[];
421
478
  /** Exact remaining stock, or `null` when the merchant hides the count
422
479
  * (showStockCount off) — treat null as "unknown", never as 0. */
423
480
  stockQuantity?: number | null;
@@ -824,6 +881,8 @@ interface ProductDetail extends ProductListItem {
824
881
  * indexing = PARENT_PAGE). Added in SDK 1.4.0.
825
882
  */
826
883
  canonicalSlug?: string | null;
884
+ /** Actual canonical translations, for hreflang and locale navigation. */
885
+ localizedSlugs?: Record<string, string>;
827
886
  /**
828
887
  * `true` = render `noindex, follow`. Set on a parent product that colour
829
888
  * cards have taken over, so it stops competing with its own cards.
@@ -851,6 +910,8 @@ interface ProductDetail extends ProductListItem {
851
910
  * active digital asset (PDF, MP3, ...) delivered instantly after purchase.
852
911
  */
853
912
  isDigital?: boolean;
913
+ /** Independent of attached digital content. */
914
+ requiresShipping?: boolean;
854
915
  }
855
916
  interface Category {
856
917
  id: string;
@@ -1111,6 +1172,27 @@ interface AuthTokens {
1111
1172
  accessToken: string;
1112
1173
  refreshToken: string;
1113
1174
  }
1175
+ /** Checkout-only response. The guest token reads exactly the newly created order
1176
+ * for 30 minutes. Keep it out of URLs and analytics; prefer an HttpOnly cookie. */
1177
+ interface CheckoutPreview {
1178
+ currency: string;
1179
+ subtotal: number;
1180
+ taxTotal: number;
1181
+ shippingTotal: number;
1182
+ paymentFee: number;
1183
+ /** Includes loyaltyDiscount and giftCardDeducted; do not subtract them twice. */
1184
+ discountTotal: number;
1185
+ loyaltyPointsUsed: number;
1186
+ loyaltyDiscount: number;
1187
+ giftCardDeducted: number;
1188
+ roundingAdjustment: number;
1189
+ grandTotal: number;
1190
+ previewToken: string;
1191
+ expiresAt: number;
1192
+ }
1193
+ interface CheckoutResult extends OrderDetail {
1194
+ orderAccessToken?: string | null;
1195
+ }
1114
1196
  /**
1115
1197
  * Result of a registration. When the eshop requires admin approval,
1116
1198
  * `pendingApproval` is true and the tokens are null (the account is created but
@@ -1119,6 +1201,8 @@ interface AuthTokens {
1119
1201
  */
1120
1202
  interface RegisterResult {
1121
1203
  pendingApproval: boolean;
1204
+ /** Account created, but no session until the e-mail link is verified. */
1205
+ pendingEmailVerification?: boolean;
1122
1206
  accessToken: string | null;
1123
1207
  refreshToken: string | null;
1124
1208
  }
@@ -1127,6 +1211,18 @@ interface RegisterInput {
1127
1211
  password: string;
1128
1212
  firstName?: string;
1129
1213
  lastName?: string;
1214
+ /** B2B sign-up: company name. */
1215
+ company?: string;
1216
+ /** Company registration number. */
1217
+ companyId?: string;
1218
+ /**
1219
+ * VAT ID. EU numbers are verified in VIES on the server; a confirmed one
1220
+ * creates a default billing address and can auto-join the merchant's
1221
+ * "EU companies" customer group.
1222
+ */
1223
+ vatId?: string;
1224
+ /** ISO-2 country of the company (VIES fallback when `vatId` has no prefix). */
1225
+ country?: string;
1130
1226
  }
1131
1227
  interface LoginInput {
1132
1228
  email: string;
@@ -1153,7 +1249,7 @@ interface CartItemProduct {
1153
1249
  sku: string;
1154
1250
  imageUrl?: string;
1155
1251
  inStock: boolean;
1156
- currentPrice: number;
1252
+ currentPrice: number | null;
1157
1253
  /** Minimum order quantity (units); null = no minimum. Clamp the cart
1158
1254
  * stepper's lower bound to this (GAP-48). */
1159
1255
  minOrderQuantity?: number | null;
@@ -1163,6 +1259,14 @@ interface CartItemProduct {
1163
1259
  }
1164
1260
  interface CartItem {
1165
1261
  id: string;
1262
+ /** A retained row can be unavailable after the merchant changes its offer. */
1263
+ isPurchasable: boolean;
1264
+ unavailableReason: "CURRENCY_UNAVAILABLE" | "ITEM_UNAVAILABLE" | "QUANTITY_UNAVAILABLE" | null;
1265
+ /** Valid adjacent line quantities, including units in bundles. Older servers omit it. */
1266
+ quantityControls?: {
1267
+ decreaseTo: number | null;
1268
+ increaseTo: number | null;
1269
+ };
1166
1270
  /**
1167
1271
  * Eshop product ID of the sellable unit on this line. A variant is its own
1168
1272
  * product, so this is the exact product/variant the customer added — use it
@@ -1171,19 +1275,19 @@ interface CartItem {
1171
1275
  productId: string;
1172
1276
  product: CartItemProduct;
1173
1277
  quantity: number;
1174
- unitPrice: number;
1175
- totalPrice: number;
1278
+ unitPrice: number | null;
1279
+ totalPrice: number | null;
1176
1280
  priceChanged: boolean;
1177
1281
  volumePriceApplied: boolean;
1178
1282
  /** VAT rate for this line in percent (e.g. 21). Estimated from the shop /
1179
1283
  * product rate; refined by the shipping country at checkout (GAP-30). */
1180
1284
  taxRate: number;
1181
1285
  /** Net amount for this line (without VAT) = totalPrice. */
1182
- netAmount: number;
1286
+ netAmount: number | null;
1183
1287
  /** VAT amount for this line at `taxRate`. */
1184
- taxAmount: number;
1288
+ taxAmount: number | null;
1185
1289
  /** Gross amount for this line (net + VAT). */
1186
- grossAmount: number;
1290
+ grossAmount: number | null;
1187
1291
  }
1188
1292
  /** One VAT rate's slice of a cart or order (GAP-30). Render "DPH {rate} %:
1189
1293
  * {taxAmount}" summary rows from these. `netAmount + taxAmount = grossAmount`. */
@@ -1212,6 +1316,19 @@ interface CartPromotion {
1212
1316
  discountAmount: number;
1213
1317
  }
1214
1318
  interface Cart {
1319
+ /** Hide payable amounts and block checkout while an unavailable line remains. */
1320
+ totalsAvailable: boolean;
1321
+ /** Physical delivery required by any cart or bundle product. Assume true when omitted by older APIs. */
1322
+ requiresShipping?: boolean;
1323
+ /** Delivery threshold basis after product promotions and before order coupons/loyalty/gift cards, in displayed price mode and cart currency. Includes bundles. */
1324
+ shippingSubtotal?: number;
1325
+ /** A currently applicable FREE_SHIPPING promotion waives delivery at checkout. */
1326
+ shippingPromotionApplied?: boolean;
1327
+ /** Authoritative admin limits converted to cart currency. Compare subtotal before shipping/codes. */
1328
+ checkoutLimits?: {
1329
+ minOrderValue: number | null;
1330
+ maxOrderValue: number | null;
1331
+ };
1215
1332
  id: string;
1216
1333
  sessionToken?: string;
1217
1334
  items: CartItem[];
@@ -1281,8 +1398,20 @@ interface CartBundleLine {
1281
1398
  bundleSlug: string;
1282
1399
  bundleName: string;
1283
1400
  quantity: number;
1284
- /** Snapshot of the bundle's per-unit price when it was added. */
1285
- bundlePriceSnapshot: number;
1401
+ /** Current per-unit offer in cart currency; the API keeps this legacy name.
1402
+ * Reading the cart does not rewrite stored cart/order snapshots. */
1403
+ bundlePriceSnapshot: number | null;
1404
+ isPurchasable: boolean;
1405
+ unavailableReason: "CURRENCY_UNAVAILABLE" | "OFFER_UNAVAILABLE" | "QUANTITY_UNAVAILABLE" | "ITEM_UNAVAILABLE" | null;
1406
+ priceChanged: boolean;
1407
+ /** Adjacent valid quantities across every component, other cart line and shared stock. Older servers omit this field. */
1408
+ quantityControls?: {
1409
+ decreaseTo: number | null;
1410
+ increaseTo: number | null;
1411
+ };
1412
+ minQuantity: number;
1413
+ maxQuantity: number | null;
1414
+ remainingStock: number | null;
1286
1415
  currency: string;
1287
1416
  items: CartBundleLineItem[];
1288
1417
  }
@@ -1320,13 +1449,15 @@ interface CheckoutAddress {
1320
1449
  phone?: string;
1321
1450
  }
1322
1451
  interface CheckoutInput {
1452
+ /** Five-minute token from checkout.preview; stale prices or choices fail closed. */
1453
+ previewToken?: string;
1323
1454
  /**
1324
1455
  * Consent-gated Behio Analytics visitor id (behio_visitor_id). Optional;
1325
1456
  * lets the backend attribute the order to the visitor journey. Send it only
1326
1457
  * when the visitor granted analytics consent.
1327
1458
  */
1328
1459
  analyticsVisitorId?: string;
1329
- shippingAddress: CheckoutAddress;
1460
+ shippingAddress?: CheckoutAddress;
1330
1461
  billingAddress: CheckoutAddress;
1331
1462
  email: string;
1332
1463
  phone?: string;
@@ -1450,6 +1581,10 @@ interface OrderStatusHistory {
1450
1581
  createdAt: number;
1451
1582
  }
1452
1583
  interface OrderDetail extends OrderListItem {
1584
+ /** Payment is recorded; access delivery will retry automatically. Do not place a duplicate order. */
1585
+ contentDeliveryPending?: boolean;
1586
+ /** False for an order without physical delivery. */
1587
+ requiresShipping?: boolean;
1453
1588
  items: OrderItem[];
1454
1589
  shippingAddress: CheckoutAddress;
1455
1590
  billingAddress: CheckoutAddress;
@@ -1464,6 +1599,10 @@ interface OrderDetail extends OrderListItem {
1464
1599
  /** DOMESTIC, OSS, REVERSE_CHARGE (no VAT, buyer accounts for it) or EXPORT (no VAT, outside EU). SDK 1.17.0. */
1465
1600
  vatMode?: "DOMESTIC" | "OSS" | "REVERSE_CHARGE" | "EXPORT" | null;
1466
1601
  shippingTotal: number;
1602
+ paymentFee?: number | null;
1603
+ roundingAdjustment?: number | null;
1604
+ loyaltyDiscount?: number | null;
1605
+ giftCardDeducted?: number | null;
1467
1606
  discountTotal: number;
1468
1607
  fulfillmentStatus: FulfillmentStatus;
1469
1608
  statusHistory: OrderStatusHistory[];
@@ -1502,6 +1641,8 @@ interface OrderAccessVerifyResponse {
1502
1641
  * (null = unlimited), optional `expiresAt`.
1503
1642
  */
1504
1643
  interface DigitalDownload {
1644
+ /** Asset disabled or order no longer grants access. */
1645
+ isRevoked?: boolean;
1505
1646
  id: string;
1506
1647
  /** Order this grant originates from (null for legacy/manual grants). */
1507
1648
  orderId: string | null;
@@ -1545,6 +1686,8 @@ interface CourseListItem {
1545
1686
  /** Access expiry (epoch ms, null = never expires). */
1546
1687
  expiresAt: number | null;
1547
1688
  isExpired: boolean;
1689
+ /** Access was withdrawn; another paid, unexpired purchase keeps access active. */
1690
+ isRevoked?: boolean;
1548
1691
  /**
1549
1692
  * Course content opens at this time (epoch ms); null/undefined = already
1550
1693
  * open. While in the future, render "Startujeme ..." + countdown.
@@ -2093,6 +2236,11 @@ interface ProductGroup {
2093
2236
  description: string | null;
2094
2237
  items: ProductListItem[];
2095
2238
  }
2239
+ interface BundleCatalogQuery {
2240
+ locale?: string;
2241
+ currency?: string;
2242
+ country?: string;
2243
+ }
2096
2244
  interface BundleItem {
2097
2245
  productId: string;
2098
2246
  slug: string | null;
@@ -2107,17 +2255,30 @@ interface Bundle {
2107
2255
  slug: string;
2108
2256
  name: string;
2109
2257
  description: string | null;
2110
- /** `null` when the eshop hides prices from guests and this visitor has no price entitlement. */
2258
+ /** `null` when prices are hidden or the bundle has no active offer in the requested currency. */
2111
2259
  bundlePrice: number | null;
2260
+ /** Requested currency. Only explicitly active bundle prices are purchasable. */
2112
2261
  currency: string;
2262
+ priceHidden: boolean;
2263
+ isPurchasable: boolean;
2264
+ unavailableReason: "PRICE_HIDDEN" | "CURRENCY_UNAVAILABLE" | "QUANTITY_UNAVAILABLE" | "ITEM_UNAVAILABLE" | null;
2265
+ activeCurrencies: string[];
2113
2266
  coverImage: string | null;
2114
2267
  endsAt: number | null;
2115
- /** `null` when prices are hidden (see `bundlePrice`). */
2268
+ /** `null` when any component has no comparable price in the requested currency, or prices are hidden. */
2116
2269
  itemsSum: number | null;
2117
- /** Absolute saving vs buying the components separately, in `currency`. `null` when prices are hidden. */
2270
+ /** Absolute saving vs buying the components separately, in `currency`. `null` when the offer or any comparable component price is unavailable. */
2118
2271
  savings: number | null;
2119
- /** Percentage saving, 0–100. 0 when `itemsSum` is zero. `null` when prices are hidden. */
2272
+ /** Percentage saving, 0–100. 0 when `itemsSum` is zero. `null` when the offer or any comparable component price is unavailable. */
2120
2273
  savingsPercent: number | null;
2274
+ /** Valid additional quantities for the current basket; null means no compatible range.
2275
+ * Hidden inventory counts do not appear as a numerical stock ceiling.
2276
+ * Send the current cart session. A stale offer is still rechecked on mutation. */
2277
+ quantityRules?: {
2278
+ minimum: number;
2279
+ maximum: number | null;
2280
+ step: number;
2281
+ } | null;
2121
2282
  /** Minimum bundles per order. Default 1. */
2122
2283
  minQuantity: number;
2123
2284
  /** Maximum bundles per order. `null` = uncapped. */
@@ -2177,6 +2338,12 @@ interface ShippingQuoteInput {
2177
2338
  quantity: number;
2178
2339
  weightKg?: number;
2179
2340
  }>;
2341
+ /**
2342
+ * @deprecated Ignored by the API. The free-shipping threshold is computed
2343
+ * from the visitor's cart (the `X-Cart-Session` the client already sends)
2344
+ * or from `items`; a client-supplied total was never trusted. Kept only so
2345
+ * existing storefronts keep compiling.
2346
+ */
2180
2347
  cartTotal?: number;
2181
2348
  currency?: string;
2182
2349
  }
@@ -2346,14 +2513,17 @@ interface CrossSellItem {
2346
2513
  /** Price in the requested currency (or eshop default), including any price
2347
2514
  * list override for the authenticated customer. `null` when hidden (B2B). */
2348
2515
  price: number | null;
2516
+ /** Render priceFrom with an "from" label for a variant-only family. */
2517
+ variantsOnly?: boolean;
2518
+ priceFrom?: ProductPrice | null;
2349
2519
  /** Original (crossed-out) price in the same currency, when on sale. */
2350
2520
  compareAtPrice: number | null;
2351
2521
  /** Currency code the `price` / `compareAtPrice` are expressed in. */
2352
2522
  currency: string;
2353
2523
  imageUrl: string | null;
2354
- /** Cached stock quantity of the recommended product. */
2355
- stockCached: number;
2356
- /** Convenience flag: `stockCached > 0`. */
2524
+ /** Selected-warehouse quantity; null when the merchant hides exact stock. */
2525
+ stockCached: number | null;
2526
+ /** Availability follows the shop's stock mode and published variants. */
2357
2527
  inStock: boolean;
2358
2528
  /** Merchant-editable note ("proč se to hodí") resolved for the requested
2359
2529
  * locale (falls back to the eshop default language). `null` when unset. */
@@ -2627,6 +2797,8 @@ interface SubmitQuoteInput {
2627
2797
  }
2628
2798
  /** One URL for the sitemap. Added in SDK 1.4.0. */
2629
2799
  interface SitemapEntry {
2800
+ /** Actual translated slugs in enabled languages. Never reuse one locale slug for all URLs. */
2801
+ localizedSlugs?: Record<string, string>;
2630
2802
  /** Slug without any prefix; the template builds the path. */
2631
2803
  slug: string;
2632
2804
  /** Last change (epoch ms) for `lastmod`. */
@@ -2815,6 +2987,10 @@ declare class BehioStorefront {
2815
2987
  setCurrency(currency: string | undefined): void;
2816
2988
  /** Get the current default currency, if any. */
2817
2989
  getCurrency(): string | undefined;
2990
+ private defaultCountry?;
2991
+ /** Set the catalog's delivery country. Use cart.setDestination separately for the cart. */
2992
+ setCountry(country: string | undefined): void;
2993
+ getCountry(): string | undefined;
2818
2994
  /** Set the default locale sent on every catalog request (per-call wins). */
2819
2995
  setLocale(locale: string | undefined): void;
2820
2996
  /** Get the current default locale, if any. */
@@ -2903,6 +3079,7 @@ declare class CatalogModule {
2903
3079
  getFeatured(options?: {
2904
3080
  locale?: string;
2905
3081
  currency?: string;
3082
+ country?: string;
2906
3083
  }): Promise<SdkResult<PaginatedResponse<ProductListItem>>>;
2907
3084
  /**
2908
3085
  * Available filters for a dynamic filter UI.
@@ -2950,11 +3127,11 @@ declare class CatalogModule {
2950
3127
  limit?: number;
2951
3128
  }): Promise<SdkResult<PaginatedResponse<ProductListItem>>>;
2952
3129
  /** List all active bundles */
2953
- getBundles(): Promise<SdkResult<{
3130
+ getBundles(options?: BundleCatalogQuery): Promise<SdkResult<{
2954
3131
  items: Bundle[];
2955
3132
  }>>;
2956
3133
  /** Get a single bundle by slug */
2957
- getBundle(slug: string): Promise<SdkResult<Bundle>>;
3134
+ getBundle(slug: string, options?: BundleCatalogQuery): Promise<SdkResult<Bundle>>;
2958
3135
  /**
2959
3136
  * One product group ("collection") by slug with its products as standard
2960
3137
  * list items. Groups are curated in the admin; use this to render curated
@@ -2964,6 +3141,7 @@ declare class CatalogModule {
2964
3141
  getProductGroup(slug: string, options?: {
2965
3142
  locale?: string;
2966
3143
  currency?: string;
3144
+ country?: string;
2967
3145
  }): Promise<SdkResult<ProductGroup>>;
2968
3146
  /**
2969
3147
  * Cross-sell / related / upsell products for a product. Returns three
@@ -2975,6 +3153,7 @@ declare class CatalogModule {
2975
3153
  getCrossSell(productSlug: string, options?: {
2976
3154
  locale?: string;
2977
3155
  currency?: string;
3156
+ country?: string;
2978
3157
  }): Promise<SdkResult<{
2979
3158
  related: CrossSellItem[];
2980
3159
  upsell: CrossSellItem[];
@@ -3110,10 +3289,10 @@ declare class CartModule {
3110
3289
  } | {
3111
3290
  slug: string;
3112
3291
  }, quantity?: number): Promise<SdkResult<Cart>>;
3113
- /** Update quantity of a bundle already in the cart */
3114
- updateBundleQuantity(bundleId: string, quantity: number): Promise<SdkResult<Cart>>;
3115
- /** Remove a bundle from the cart */
3116
- removeBundle(bundleId: string): Promise<SdkResult<Cart>>;
3292
+ /** Update by CartBundleLine.id; legacy catalog bundle IDs are accepted by the API */
3293
+ updateBundleQuantity(lineId: string, quantity: number): Promise<SdkResult<Cart>>;
3294
+ /** Remove by CartBundleLine.id; scoped to the current visitor cart */
3295
+ removeBundle(lineId: string): Promise<SdkResult<Cart>>;
3117
3296
  /** Merge anonymous cart into authenticated customer cart */
3118
3297
  merge(): Promise<SdkResult<Cart>>;
3119
3298
  /** Apply discount code */
@@ -3124,8 +3303,12 @@ declare class CartModule {
3124
3303
  declare class CheckoutModule {
3125
3304
  private client;
3126
3305
  constructor(client: BehioStorefront);
3306
+ /** Recalculate the current cart including shipping, fees, benefits and rounding.
3307
+ * No order, stock claim, payment or gift-card redemption is created. Required
3308
+ * legal consents are enforced only on createOrder, not while quoting. */
3309
+ preview(input: CheckoutInput): Promise<SdkResult<CheckoutPreview>>;
3127
3310
  /** Create order from cart */
3128
- createOrder(input: CheckoutInput): Promise<SdkResult<OrderDetail>>;
3311
+ createOrder(input: CheckoutInput): Promise<SdkResult<CheckoutResult>>;
3129
3312
  }
3130
3313
  declare class OrdersModule {
3131
3314
  private client;
@@ -3544,4 +3727,4 @@ declare class NewsletterModule {
3544
3727
  unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
3545
3728
  }
3546
3729
 
3547
- export { type CourseModule as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type CartBundleLine as D, type CartBundleLineItem as E, type CartDiscount as F, type CartItem as G, type CartItemProduct as H, type CartPromotion as I, type Category as J, type CategoryDetail as K, type CertificateVerification as L, type CheckoutAddress as M, type CheckoutInput as N, type CheckoutPaymentMethod as O, type ProductDetail as P, type CheckoutSettings as Q, type CookieConsentInput as R, type SdkResult as S, type CourseAttachment as T, type CourseCertificate as U, type CourseComment as V, type CourseCommentReply as W, type CourseCommentsList as X, type CourseDetail as Y, type CourseLesson as Z, type CourseListItem as _, type ProductVariant as a, type PickupPointsInput as a$, type CoursePostedComment as a0, type CourseProgress as a1, type CourseTutorMessage as a2, type CourseTutorThread as a3, type CrossSellItem as a4, type CustomerAddress as a5, type CustomerProfile as a6, type DigitalDownload as a7, type DownloadUrl as a8, type Facet as a9, type MenuItem as aA, type MenuItemRef as aB, type MenuItemType as aC, type MessageResponse as aD, type NewsletterOptInDefault as aE, type NewsletterSubscribeInput as aF, type NewsletterSubscribeResult as aG, type NewsletterUnsubscribeResult as aH, type OrderAccessRequestResponse as aI, type OrderAccessVerifyResponse as aJ, type OrderDetail as aK, type OrderItem as aL, type OrderListItem as aM, type OrderStatus as aN, type OrderStatusHistory as aO, OrderStatuses as aP, type OrderTracking as aQ, type Page as aR, type PageAttachment as aS, type PageDetail as aT, type PaginatedResponse as aU, type PaymentInstrument as aV, type PaymentStatus as aW, PaymentStatuses as aX, type PaymentSwift as aY, type PickupPoint as aZ, type PickupPointHours as a_, type FacetAvailability as aa, type FacetCategory as ab, type FacetLabel as ac, type FacetPriceRange as ad, type FacetRange as ae, type FacetRatingBucket as af, type FacetValue as ag, type FacetsResponse as ah, type FilterField as ai, type FulfillmentStatus as aj, FulfillmentStatuses as ak, type GiftCardBalance as al, type GiftCardPurchaseInput as am, type GiftCardPurchaseResult as an, type GiftCardSummary as ao, type LessonNote as ap, type LessonQuiz as aq, type LoginInput as ar, type LoyaltyBalance as as, type LoyaltyNextTier as at, type LoyaltyProgram as au, type LoyaltySummary as av, type LoyaltyTier as aw, type LoyaltyTierPerks as ax, type LoyaltyTransaction as ay, type Menu as az, type StorefrontFormFieldError as b, type SubmitQuoteInput as b$, type PickupWidgetConfig as b0, type PriceDisplay as b1, type ProductAssetGroup as b2, type ProductAssetItem as b3, type ProductAvailability as b4, type ProductGroup as b5, type ProductLabel as b6, type ProductListItem as b7, type ProductMedia as b8, type ProductMediaVariant as b9, type ReturnStatus as bA, type ReturnStatusItem as bB, type ReturnableOrder as bC, type ReturnableOrderItem as bD, type SdkError as bE, type ShippingMethodSummary as bF, type ShippingQuote as bG, type ShippingQuoteInput as bH, type ShopInfo as bI, type ShopScript as bJ, type ShopScriptPlacement as bK, type ShopScriptType as bL, type ShopScripts as bM, type ShopSeo as bN, type ShopSeoIdentity as bO, type SiteFormField as bP, type SiteFormFieldOption as bQ, type SiteFormFieldType as bR, type Sitemap as bS, type SitemapEntry as bT, type StockBehavior as bU, type StockMode as bV, type StorefrontForm as bW, type StorefrontFormFieldErrorCode as bX, type StorefrontFormSettings as bY, type StorefrontFormSubmitInput as bZ, type StorefrontFormSubmitResult as b_, type ProductParameter as ba, type ProductParameterGroup as bb, type ProductParametersResponse as bc, type ProductPrice as bd, type ProductPromotionSummary as be, type ProductReview as bf, type ProductReviewsResponse as bg, type ProductSibling as bh, ProductSort as bi, type ProductSortValue as bj, type ProductVolumePrice as bk, type ProductsQuery as bl, type QuizAnswerInput as bm, type QuizAnswerResult as bn, type QuizQuestion as bo, type QuizResult as bp, type QuoteItem as bq, type QuoteRequest as br, type RegisterInput as bs, type RegisterResult as bt, type RequestInterceptor as bu, type RequestInterceptorConfig as bv, type ResponseInterceptor as bw, type ResponseInterceptorData as bx, type ReturnRequest as by, type ReturnRequestItem as bz, type AddToCartInput as c, type SubmitReturnInput as c0, type SubmitReviewInput as c1, type Subscription as c2, type SubscriptionAction as c3, type SubscriptionFrequency as c4, type SubscriptionItem as c5, type SubscriptionStatus as c6, type TaxBreakdownLine as c7, type VariantAxis as c8, type VariantAxisValue as c9, type WishlistItem as ca, err as cb, ok as cc, toSdkError as cd, type AddressDetail as d, type AddressSuggestion as e, type AddressType as f, AddressTypes as g, type AuthTokens as h, type BackInStockSubscription as i, type BadgeTone as j, BehioApiError as k, type BehioErrorCode as l, type BehioEventHandler as m, type BehioEventType as n, BehioNetworkError as o, type BehioStorefrontConfig as p, type Blog as q, type BlogPostDetail as r, type BlogPostListItem as s, type BlogPostsPage as t, type BlogPostsQuery as u, type BlogSettings as v, type BlogTag as w, type Bundle as x, type BundleItem as y, type Cart as z };
3730
+ export { type CourseDetail as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type Cart as D, type CartBundleLine as E, type CartBundleLineItem as F, type CartDiscount as G, type CartItem as H, type CartItemProduct as I, type CartPromotion as J, type Category as K, type CategoryDetail as L, type CertificateVerification as M, type CheckoutAddress as N, type CheckoutInput as O, type ProductDetail as P, type CheckoutPaymentMethod as Q, type CheckoutPreview as R, type SdkResult as S, type CheckoutResult as T, type CheckoutSettings as U, type CookieConsentInput as V, type CourseAttachment as W, type CourseCertificate as X, type CourseComment as Y, type CourseCommentReply as Z, type CourseCommentsList as _, type ProductVariant as a, PaymentStatuses as a$, type CourseLesson as a0, type CourseListItem as a1, type CourseModule as a2, type CoursePostedComment as a3, type CourseProgress as a4, type CourseTutorMessage as a5, type CourseTutorThread as a6, type CrossSellItem as a7, type CurrencyDisplayFormat as a8, type CustomerAddress as a9, type LoyaltyTier as aA, type LoyaltyTierPerks as aB, type LoyaltyTransaction as aC, type Menu as aD, type MenuItem as aE, type MenuItemRef as aF, type MenuItemType as aG, type MessageResponse as aH, type NewsletterOptInDefault as aI, type NewsletterSubscribeInput as aJ, type NewsletterSubscribeResult as aK, type NewsletterUnsubscribeResult as aL, type OrderAccessRequestResponse as aM, type OrderAccessVerifyResponse as aN, type OrderDetail as aO, type OrderItem as aP, type OrderListItem as aQ, type OrderStatus as aR, type OrderStatusHistory as aS, OrderStatuses as aT, type OrderTracking as aU, type Page as aV, type PageAttachment as aW, type PageDetail as aX, type PaginatedResponse as aY, type PaymentInstrument as aZ, type PaymentStatus as a_, type CustomerProfile as aa, type DigitalDownload as ab, type DownloadUrl as ac, type Facet as ad, type FacetAvailability as ae, type FacetCategory as af, type FacetLabel as ag, type FacetPriceRange as ah, type FacetRange as ai, type FacetRatingBucket as aj, type FacetValue as ak, type FacetsResponse as al, type FilterField as am, type FulfillmentStatus as an, FulfillmentStatuses as ao, type GiftCardBalance as ap, type GiftCardPurchaseInput as aq, type GiftCardPurchaseResult as ar, type GiftCardSummary as as, type LessonNote as at, type LessonQuiz as au, type LoginInput as av, type LoyaltyBalance as aw, type LoyaltyNextTier as ax, type LoyaltyProgram as ay, type LoyaltySummary as az, type StorefrontFormFieldError as b, type StorefrontForm as b$, type PaymentSwift as b0, type PickupPoint as b1, type PickupPointHours as b2, type PickupPointsInput as b3, type PickupWidgetConfig as b4, type PriceDisplay as b5, type ProductAssetGroup as b6, type ProductAssetItem as b7, type ProductAvailability as b8, type ProductGroup as b9, type ResponseInterceptor as bA, type ResponseInterceptorData as bB, type ReturnRequest as bC, type ReturnRequestItem as bD, type ReturnStatus as bE, type ReturnStatusItem as bF, type ReturnableOrder as bG, type ReturnableOrderItem as bH, type SdkError as bI, type ShippingMethodSummary as bJ, type ShippingQuote as bK, type ShippingQuoteInput as bL, type ShopAppearance as bM, type ShopInfo as bN, type ShopScript as bO, type ShopScriptPlacement as bP, type ShopScriptType as bQ, type ShopScripts as bR, type ShopSeo as bS, type ShopSeoIdentity as bT, type SiteFormField as bU, type SiteFormFieldOption as bV, type SiteFormFieldType as bW, type Sitemap as bX, type SitemapEntry as bY, type StockBehavior as bZ, type StockMode as b_, type ProductLabel as ba, type ProductListItem as bb, type ProductMedia as bc, type ProductMediaVariant as bd, type ProductParameter as be, type ProductParameterGroup as bf, type ProductParametersResponse as bg, type ProductPrice as bh, type ProductPromotionSummary as bi, type ProductReview as bj, type ProductReviewsResponse as bk, type ProductSibling as bl, ProductSort as bm, type ProductSortValue as bn, type ProductVolumePrice as bo, type ProductsQuery as bp, type QuizAnswerInput as bq, type QuizAnswerResult as br, type QuizQuestion as bs, type QuizResult as bt, type QuoteItem as bu, type QuoteRequest as bv, type RegisterInput as bw, type RegisterResult as bx, type RequestInterceptor as by, type RequestInterceptorConfig as bz, type AddToCartInput as c, type StorefrontFormFieldErrorCode as c0, type StorefrontFormSettings as c1, type StorefrontFormSubmitInput as c2, type StorefrontFormSubmitResult as c3, type SubmitQuoteInput as c4, type SubmitReturnInput as c5, type SubmitReviewInput as c6, type Subscription as c7, type SubscriptionAction as c8, type SubscriptionFrequency as c9, type SubscriptionItem as ca, type SubscriptionStatus as cb, type TaxBreakdownLine as cc, type VariantAxis as cd, type VariantAxisValue as ce, type WishlistItem as cf, err as cg, ok as ch, toSdkError as ci, type AddressDetail as d, type AddressSuggestion as e, type AddressType as f, AddressTypes as g, type AuthTokens as h, type BackInStockSubscription as i, type BadgeTone as j, BehioApiError as k, type BehioErrorCode as l, type BehioEventHandler as m, type BehioEventType as n, BehioNetworkError as o, type BehioStorefrontConfig as p, type Blog as q, type BlogPostDetail as r, type BlogPostListItem as s, type BlogPostsPage as t, type BlogPostsQuery as u, type BlogSettings as v, type BlogTag as w, type Bundle as x, type BundleCatalogQuery as y, type BundleItem as z };