@behio/storefront-sdk 1.19.0 → 2.0.1
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/README.md +214 -19
- package/dist/{chunk-W2P2D3EZ.mjs → chunk-SCFR6JH7.mjs} +73 -53
- package/dist/{chunk-GAYYRRUL.js → chunk-TDIAWIQR.js} +97 -77
- package/dist/{client-DhW5x2Zr.d.mts → client-C4dnHtID.d.mts} +197 -26
- package/dist/{client-DhW5x2Zr.d.ts → client-C4dnHtID.d.ts} +197 -26
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +84 -23
- package/dist/index.mjs +68 -7
- package/dist/next.d.mts +3 -1
- package/dist/next.d.ts +3 -1
- package/dist/next.js +9 -5
- package/dist/next.mjs +5 -1
- package/dist/react.d.mts +218 -32
- package/dist/react.d.ts +218 -32
- package/dist/react.js +166 -125
- package/dist/react.mjs +166 -126
- package/package.json +1 -1
|
@@ -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`:
|
|
129
|
-
*
|
|
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
|
}
|
|
@@ -1165,7 +1249,7 @@ interface CartItemProduct {
|
|
|
1165
1249
|
sku: string;
|
|
1166
1250
|
imageUrl?: string;
|
|
1167
1251
|
inStock: boolean;
|
|
1168
|
-
currentPrice: number;
|
|
1252
|
+
currentPrice: number | null;
|
|
1169
1253
|
/** Minimum order quantity (units); null = no minimum. Clamp the cart
|
|
1170
1254
|
* stepper's lower bound to this (GAP-48). */
|
|
1171
1255
|
minOrderQuantity?: number | null;
|
|
@@ -1175,6 +1259,14 @@ interface CartItemProduct {
|
|
|
1175
1259
|
}
|
|
1176
1260
|
interface CartItem {
|
|
1177
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
|
+
};
|
|
1178
1270
|
/**
|
|
1179
1271
|
* Eshop product ID of the sellable unit on this line. A variant is its own
|
|
1180
1272
|
* product, so this is the exact product/variant the customer added — use it
|
|
@@ -1183,19 +1275,19 @@ interface CartItem {
|
|
|
1183
1275
|
productId: string;
|
|
1184
1276
|
product: CartItemProduct;
|
|
1185
1277
|
quantity: number;
|
|
1186
|
-
unitPrice: number;
|
|
1187
|
-
totalPrice: number;
|
|
1278
|
+
unitPrice: number | null;
|
|
1279
|
+
totalPrice: number | null;
|
|
1188
1280
|
priceChanged: boolean;
|
|
1189
1281
|
volumePriceApplied: boolean;
|
|
1190
1282
|
/** VAT rate for this line in percent (e.g. 21). Estimated from the shop /
|
|
1191
1283
|
* product rate; refined by the shipping country at checkout (GAP-30). */
|
|
1192
1284
|
taxRate: number;
|
|
1193
1285
|
/** Net amount for this line (without VAT) = totalPrice. */
|
|
1194
|
-
netAmount: number;
|
|
1286
|
+
netAmount: number | null;
|
|
1195
1287
|
/** VAT amount for this line at `taxRate`. */
|
|
1196
|
-
taxAmount: number;
|
|
1288
|
+
taxAmount: number | null;
|
|
1197
1289
|
/** Gross amount for this line (net + VAT). */
|
|
1198
|
-
grossAmount: number;
|
|
1290
|
+
grossAmount: number | null;
|
|
1199
1291
|
}
|
|
1200
1292
|
/** One VAT rate's slice of a cart or order (GAP-30). Render "DPH {rate} %:
|
|
1201
1293
|
* {taxAmount}" summary rows from these. `netAmount + taxAmount = grossAmount`. */
|
|
@@ -1224,6 +1316,19 @@ interface CartPromotion {
|
|
|
1224
1316
|
discountAmount: number;
|
|
1225
1317
|
}
|
|
1226
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
|
+
};
|
|
1227
1332
|
id: string;
|
|
1228
1333
|
sessionToken?: string;
|
|
1229
1334
|
items: CartItem[];
|
|
@@ -1293,8 +1398,20 @@ interface CartBundleLine {
|
|
|
1293
1398
|
bundleSlug: string;
|
|
1294
1399
|
bundleName: string;
|
|
1295
1400
|
quantity: number;
|
|
1296
|
-
/**
|
|
1297
|
-
|
|
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;
|
|
1298
1415
|
currency: string;
|
|
1299
1416
|
items: CartBundleLineItem[];
|
|
1300
1417
|
}
|
|
@@ -1332,13 +1449,15 @@ interface CheckoutAddress {
|
|
|
1332
1449
|
phone?: string;
|
|
1333
1450
|
}
|
|
1334
1451
|
interface CheckoutInput {
|
|
1452
|
+
/** Five-minute token from checkout.preview; stale prices or choices fail closed. */
|
|
1453
|
+
previewToken?: string;
|
|
1335
1454
|
/**
|
|
1336
1455
|
* Consent-gated Behio Analytics visitor id (behio_visitor_id). Optional;
|
|
1337
1456
|
* lets the backend attribute the order to the visitor journey. Send it only
|
|
1338
1457
|
* when the visitor granted analytics consent.
|
|
1339
1458
|
*/
|
|
1340
1459
|
analyticsVisitorId?: string;
|
|
1341
|
-
shippingAddress
|
|
1460
|
+
shippingAddress?: CheckoutAddress;
|
|
1342
1461
|
billingAddress: CheckoutAddress;
|
|
1343
1462
|
email: string;
|
|
1344
1463
|
phone?: string;
|
|
@@ -1462,6 +1581,10 @@ interface OrderStatusHistory {
|
|
|
1462
1581
|
createdAt: number;
|
|
1463
1582
|
}
|
|
1464
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;
|
|
1465
1588
|
items: OrderItem[];
|
|
1466
1589
|
shippingAddress: CheckoutAddress;
|
|
1467
1590
|
billingAddress: CheckoutAddress;
|
|
@@ -1476,6 +1599,10 @@ interface OrderDetail extends OrderListItem {
|
|
|
1476
1599
|
/** DOMESTIC, OSS, REVERSE_CHARGE (no VAT, buyer accounts for it) or EXPORT (no VAT, outside EU). SDK 1.17.0. */
|
|
1477
1600
|
vatMode?: "DOMESTIC" | "OSS" | "REVERSE_CHARGE" | "EXPORT" | null;
|
|
1478
1601
|
shippingTotal: number;
|
|
1602
|
+
paymentFee?: number | null;
|
|
1603
|
+
roundingAdjustment?: number | null;
|
|
1604
|
+
loyaltyDiscount?: number | null;
|
|
1605
|
+
giftCardDeducted?: number | null;
|
|
1479
1606
|
discountTotal: number;
|
|
1480
1607
|
fulfillmentStatus: FulfillmentStatus;
|
|
1481
1608
|
statusHistory: OrderStatusHistory[];
|
|
@@ -1514,6 +1641,8 @@ interface OrderAccessVerifyResponse {
|
|
|
1514
1641
|
* (null = unlimited), optional `expiresAt`.
|
|
1515
1642
|
*/
|
|
1516
1643
|
interface DigitalDownload {
|
|
1644
|
+
/** Asset disabled or order no longer grants access. */
|
|
1645
|
+
isRevoked?: boolean;
|
|
1517
1646
|
id: string;
|
|
1518
1647
|
/** Order this grant originates from (null for legacy/manual grants). */
|
|
1519
1648
|
orderId: string | null;
|
|
@@ -1557,6 +1686,8 @@ interface CourseListItem {
|
|
|
1557
1686
|
/** Access expiry (epoch ms, null = never expires). */
|
|
1558
1687
|
expiresAt: number | null;
|
|
1559
1688
|
isExpired: boolean;
|
|
1689
|
+
/** Access was withdrawn; another paid, unexpired purchase keeps access active. */
|
|
1690
|
+
isRevoked?: boolean;
|
|
1560
1691
|
/**
|
|
1561
1692
|
* Course content opens at this time (epoch ms); null/undefined = already
|
|
1562
1693
|
* open. While in the future, render "Startujeme ..." + countdown.
|
|
@@ -2105,6 +2236,11 @@ interface ProductGroup {
|
|
|
2105
2236
|
description: string | null;
|
|
2106
2237
|
items: ProductListItem[];
|
|
2107
2238
|
}
|
|
2239
|
+
interface BundleCatalogQuery {
|
|
2240
|
+
locale?: string;
|
|
2241
|
+
currency?: string;
|
|
2242
|
+
country?: string;
|
|
2243
|
+
}
|
|
2108
2244
|
interface BundleItem {
|
|
2109
2245
|
productId: string;
|
|
2110
2246
|
slug: string | null;
|
|
@@ -2119,17 +2255,30 @@ interface Bundle {
|
|
|
2119
2255
|
slug: string;
|
|
2120
2256
|
name: string;
|
|
2121
2257
|
description: string | null;
|
|
2122
|
-
/** `null` when
|
|
2258
|
+
/** `null` when prices are hidden or the bundle has no active offer in the requested currency. */
|
|
2123
2259
|
bundlePrice: number | null;
|
|
2260
|
+
/** Requested currency. Only explicitly active bundle prices are purchasable. */
|
|
2124
2261
|
currency: string;
|
|
2262
|
+
priceHidden: boolean;
|
|
2263
|
+
isPurchasable: boolean;
|
|
2264
|
+
unavailableReason: "PRICE_HIDDEN" | "CURRENCY_UNAVAILABLE" | "QUANTITY_UNAVAILABLE" | "ITEM_UNAVAILABLE" | null;
|
|
2265
|
+
activeCurrencies: string[];
|
|
2125
2266
|
coverImage: string | null;
|
|
2126
2267
|
endsAt: number | null;
|
|
2127
|
-
/** `null` when prices are hidden
|
|
2268
|
+
/** `null` when any component has no comparable price in the requested currency, or prices are hidden. */
|
|
2128
2269
|
itemsSum: number | null;
|
|
2129
|
-
/** Absolute saving vs buying the components separately, in `currency`. `null` when
|
|
2270
|
+
/** Absolute saving vs buying the components separately, in `currency`. `null` when the offer or any comparable component price is unavailable. */
|
|
2130
2271
|
savings: number | null;
|
|
2131
|
-
/** Percentage saving, 0–100. 0 when `itemsSum` is zero. `null` when
|
|
2272
|
+
/** Percentage saving, 0–100. 0 when `itemsSum` is zero. `null` when the offer or any comparable component price is unavailable. */
|
|
2132
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;
|
|
2133
2282
|
/** Minimum bundles per order. Default 1. */
|
|
2134
2283
|
minQuantity: number;
|
|
2135
2284
|
/** Maximum bundles per order. `null` = uncapped. */
|
|
@@ -2189,6 +2338,12 @@ interface ShippingQuoteInput {
|
|
|
2189
2338
|
quantity: number;
|
|
2190
2339
|
weightKg?: number;
|
|
2191
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
|
+
*/
|
|
2192
2347
|
cartTotal?: number;
|
|
2193
2348
|
currency?: string;
|
|
2194
2349
|
}
|
|
@@ -2358,14 +2513,17 @@ interface CrossSellItem {
|
|
|
2358
2513
|
/** Price in the requested currency (or eshop default), including any price
|
|
2359
2514
|
* list override for the authenticated customer. `null` when hidden (B2B). */
|
|
2360
2515
|
price: number | null;
|
|
2516
|
+
/** Render priceFrom with an "from" label for a variant-only family. */
|
|
2517
|
+
variantsOnly?: boolean;
|
|
2518
|
+
priceFrom?: ProductPrice | null;
|
|
2361
2519
|
/** Original (crossed-out) price in the same currency, when on sale. */
|
|
2362
2520
|
compareAtPrice: number | null;
|
|
2363
2521
|
/** Currency code the `price` / `compareAtPrice` are expressed in. */
|
|
2364
2522
|
currency: string;
|
|
2365
2523
|
imageUrl: string | null;
|
|
2366
|
-
/**
|
|
2367
|
-
stockCached: number;
|
|
2368
|
-
/**
|
|
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. */
|
|
2369
2527
|
inStock: boolean;
|
|
2370
2528
|
/** Merchant-editable note ("proč se to hodí") resolved for the requested
|
|
2371
2529
|
* locale (falls back to the eshop default language). `null` when unset. */
|
|
@@ -2639,6 +2797,8 @@ interface SubmitQuoteInput {
|
|
|
2639
2797
|
}
|
|
2640
2798
|
/** One URL for the sitemap. Added in SDK 1.4.0. */
|
|
2641
2799
|
interface SitemapEntry {
|
|
2800
|
+
/** Actual translated slugs in enabled languages. Never reuse one locale slug for all URLs. */
|
|
2801
|
+
localizedSlugs?: Record<string, string>;
|
|
2642
2802
|
/** Slug without any prefix; the template builds the path. */
|
|
2643
2803
|
slug: string;
|
|
2644
2804
|
/** Last change (epoch ms) for `lastmod`. */
|
|
@@ -2827,6 +2987,10 @@ declare class BehioStorefront {
|
|
|
2827
2987
|
setCurrency(currency: string | undefined): void;
|
|
2828
2988
|
/** Get the current default currency, if any. */
|
|
2829
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;
|
|
2830
2994
|
/** Set the default locale sent on every catalog request (per-call wins). */
|
|
2831
2995
|
setLocale(locale: string | undefined): void;
|
|
2832
2996
|
/** Get the current default locale, if any. */
|
|
@@ -2915,6 +3079,7 @@ declare class CatalogModule {
|
|
|
2915
3079
|
getFeatured(options?: {
|
|
2916
3080
|
locale?: string;
|
|
2917
3081
|
currency?: string;
|
|
3082
|
+
country?: string;
|
|
2918
3083
|
}): Promise<SdkResult<PaginatedResponse<ProductListItem>>>;
|
|
2919
3084
|
/**
|
|
2920
3085
|
* Available filters for a dynamic filter UI.
|
|
@@ -2962,11 +3127,11 @@ declare class CatalogModule {
|
|
|
2962
3127
|
limit?: number;
|
|
2963
3128
|
}): Promise<SdkResult<PaginatedResponse<ProductListItem>>>;
|
|
2964
3129
|
/** List all active bundles */
|
|
2965
|
-
getBundles(): Promise<SdkResult<{
|
|
3130
|
+
getBundles(options?: BundleCatalogQuery): Promise<SdkResult<{
|
|
2966
3131
|
items: Bundle[];
|
|
2967
3132
|
}>>;
|
|
2968
3133
|
/** Get a single bundle by slug */
|
|
2969
|
-
getBundle(slug: string): Promise<SdkResult<Bundle>>;
|
|
3134
|
+
getBundle(slug: string, options?: BundleCatalogQuery): Promise<SdkResult<Bundle>>;
|
|
2970
3135
|
/**
|
|
2971
3136
|
* One product group ("collection") by slug with its products as standard
|
|
2972
3137
|
* list items. Groups are curated in the admin; use this to render curated
|
|
@@ -2976,6 +3141,7 @@ declare class CatalogModule {
|
|
|
2976
3141
|
getProductGroup(slug: string, options?: {
|
|
2977
3142
|
locale?: string;
|
|
2978
3143
|
currency?: string;
|
|
3144
|
+
country?: string;
|
|
2979
3145
|
}): Promise<SdkResult<ProductGroup>>;
|
|
2980
3146
|
/**
|
|
2981
3147
|
* Cross-sell / related / upsell products for a product. Returns three
|
|
@@ -2987,6 +3153,7 @@ declare class CatalogModule {
|
|
|
2987
3153
|
getCrossSell(productSlug: string, options?: {
|
|
2988
3154
|
locale?: string;
|
|
2989
3155
|
currency?: string;
|
|
3156
|
+
country?: string;
|
|
2990
3157
|
}): Promise<SdkResult<{
|
|
2991
3158
|
related: CrossSellItem[];
|
|
2992
3159
|
upsell: CrossSellItem[];
|
|
@@ -3122,10 +3289,10 @@ declare class CartModule {
|
|
|
3122
3289
|
} | {
|
|
3123
3290
|
slug: string;
|
|
3124
3291
|
}, quantity?: number): Promise<SdkResult<Cart>>;
|
|
3125
|
-
/** Update
|
|
3126
|
-
updateBundleQuantity(
|
|
3127
|
-
/** Remove
|
|
3128
|
-
removeBundle(
|
|
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>>;
|
|
3129
3296
|
/** Merge anonymous cart into authenticated customer cart */
|
|
3130
3297
|
merge(): Promise<SdkResult<Cart>>;
|
|
3131
3298
|
/** Apply discount code */
|
|
@@ -3136,8 +3303,12 @@ declare class CartModule {
|
|
|
3136
3303
|
declare class CheckoutModule {
|
|
3137
3304
|
private client;
|
|
3138
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>>;
|
|
3139
3310
|
/** Create order from cart */
|
|
3140
|
-
createOrder(input: CheckoutInput): Promise<SdkResult<
|
|
3311
|
+
createOrder(input: CheckoutInput): Promise<SdkResult<CheckoutResult>>;
|
|
3141
3312
|
}
|
|
3142
3313
|
declare class OrdersModule {
|
|
3143
3314
|
private client;
|
|
@@ -3556,4 +3727,4 @@ declare class NewsletterModule {
|
|
|
3556
3727
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
3557
3728
|
}
|
|
3558
3729
|
|
|
3559
|
-
export { type
|
|
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-
|
|
2
|
-
export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Bundle, y as
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-C4dnHtID.mjs';
|
|
2
|
+
export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartPromotion, K as Category, L as CategoryDetail, M as CertificateVerification, N as CheckoutAddress, O as CheckoutInput, Q as CheckoutPaymentMethod, R as CheckoutPreview, T as CheckoutResult, U as CheckoutSettings, V as CookieConsentInput, W as CourseAttachment, X as CourseCertificate, Y as CourseComment, Z as CourseCommentReply, _ as CourseCommentsList, $ as CourseDetail, a0 as CourseLesson, a1 as CourseListItem, a2 as CourseModule, a3 as CoursePostedComment, a4 as CourseProgress, a5 as CourseTutorMessage, a6 as CourseTutorThread, a7 as CrossSellItem, a8 as CurrencyDisplayFormat, a9 as CustomerAddress, aa as CustomerProfile, ab as DigitalDownload, ac as DownloadUrl, ad as Facet, ae as FacetAvailability, af as FacetCategory, ag as FacetLabel, ah as FacetPriceRange, ai as FacetRange, aj as FacetRatingBucket, ak as FacetValue, al as FacetsResponse, am as FilterField, an as FulfillmentStatus, ao as FulfillmentStatuses, ap as GiftCardBalance, aq as GiftCardPurchaseInput, ar as GiftCardPurchaseResult, as as GiftCardSummary, at as LessonNote, au as LessonQuiz, av as LoginInput, aw as LoyaltyBalance, ax as LoyaltyNextTier, ay as LoyaltyProgram, az as LoyaltySummary, aA as LoyaltyTier, aB as LoyaltyTierPerks, aC as LoyaltyTransaction, aD as Menu, aE as MenuItem, aF as MenuItemRef, aG as MenuItemType, aH as MessageResponse, aI as NewsletterOptInDefault, aJ as NewsletterSubscribeInput, aK as NewsletterSubscribeResult, aL as NewsletterUnsubscribeResult, aM as OrderAccessRequestResponse, aN as OrderAccessVerifyResponse, aO as OrderDetail, aP as OrderItem, aQ as OrderListItem, aR as OrderStatus, aS as OrderStatusHistory, aT as OrderStatuses, aU as OrderTracking, aV as Page, aW as PageAttachment, aX as PageDetail, aY as PaginatedResponse, aZ as PaymentInstrument, a_ as PaymentStatus, a$ as PaymentStatuses, b0 as PaymentSwift, b1 as PickupPoint, b2 as PickupPointHours, b3 as PickupPointsInput, b4 as PickupWidgetConfig, b5 as PriceDisplay, b6 as ProductAssetGroup, b7 as ProductAssetItem, b8 as ProductAvailability, b9 as ProductGroup, ba as ProductLabel, bb as ProductListItem, bc as ProductMedia, bd as ProductMediaVariant, be as ProductParameter, bf as ProductParameterGroup, bg as ProductParametersResponse, bh as ProductPrice, bi as ProductPromotionSummary, bj as ProductReview, bk as ProductReviewsResponse, bl as ProductSibling, bm as ProductSort, bn as ProductSortValue, bo as ProductVolumePrice, bp as ProductsQuery, bq as QuizAnswerInput, br as QuizAnswerResult, bs as QuizQuestion, bt as QuizResult, bu as QuoteItem, bv as QuoteRequest, bw as RegisterInput, bx as RegisterResult, by as RequestInterceptor, bz as RequestInterceptorConfig, bA as ResponseInterceptor, bB as ResponseInterceptorData, bC as ReturnRequest, bD as ReturnRequestItem, bE as ReturnStatus, bF as ReturnStatusItem, bG as ReturnableOrder, bH as ReturnableOrderItem, bI as SdkError, bJ as ShippingMethodSummary, bK as ShippingQuote, bL as ShippingQuoteInput, bM as ShopAppearance, bN as ShopInfo, bO as ShopScript, bP as ShopScriptPlacement, bQ as ShopScriptType, bR as ShopScripts, bS as ShopSeo, bT as ShopSeoIdentity, bU as SiteFormField, bV as SiteFormFieldOption, bW as SiteFormFieldType, bX as Sitemap, bY as SitemapEntry, bZ as StockBehavior, b_ as StockMode, b$ as StorefrontForm, c0 as StorefrontFormFieldErrorCode, c1 as StorefrontFormSettings, c2 as StorefrontFormSubmitInput, c3 as StorefrontFormSubmitResult, c4 as SubmitQuoteInput, c5 as SubmitReturnInput, c6 as SubmitReviewInput, c7 as Subscription, c8 as SubscriptionAction, c9 as SubscriptionFrequency, ca as SubscriptionItem, cb as SubscriptionStatus, cc as TaxBreakdownLine, cd as VariantAxis, ce as VariantAxisValue, cf as WishlistItem, cg as err, ch as ok, ci as toSdkError } from './client-C4dnHtID.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
|
@@ -9,7 +9,7 @@ export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as Add
|
|
|
9
9
|
* @param locale - BCP 47 locale string (e.g. "cs", "en", "de"). Defaults to "cs".
|
|
10
10
|
* @returns Formatted price string (e.g. "1 499 Kč", "24,99 €")
|
|
11
11
|
*/
|
|
12
|
-
declare function formatPrice(amount: number, currency: string, locale?: string): string;
|
|
12
|
+
declare function formatPrice(amount: number, currency: string, locale?: string, display?: "SYMBOL_BEFORE" | "SYMBOL_AFTER" | "CODE"): string;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Variant selection helpers — server-safe (no React, no DOM).
|
|
@@ -43,12 +43,16 @@ interface ResolvedVariantContent {
|
|
|
43
43
|
shortDescription: string | null;
|
|
44
44
|
longDescription: string | null;
|
|
45
45
|
images: ProductDetail["images"];
|
|
46
|
+
media: NonNullable<ProductDetail["media"]>;
|
|
47
|
+
assetGroups: ProductDetail["assetGroups"];
|
|
46
48
|
/** `true` for each field the variant overrode — handy for debugging a shop. */
|
|
47
49
|
overrides: {
|
|
48
50
|
name: boolean;
|
|
49
51
|
shortDescription: boolean;
|
|
50
52
|
longDescription: boolean;
|
|
51
53
|
images: boolean;
|
|
54
|
+
media: boolean;
|
|
55
|
+
assetGroups: boolean;
|
|
52
56
|
};
|
|
53
57
|
}
|
|
54
58
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-
|
|
2
|
-
export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Bundle, y as
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-C4dnHtID.js';
|
|
2
|
+
export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartPromotion, K as Category, L as CategoryDetail, M as CertificateVerification, N as CheckoutAddress, O as CheckoutInput, Q as CheckoutPaymentMethod, R as CheckoutPreview, T as CheckoutResult, U as CheckoutSettings, V as CookieConsentInput, W as CourseAttachment, X as CourseCertificate, Y as CourseComment, Z as CourseCommentReply, _ as CourseCommentsList, $ as CourseDetail, a0 as CourseLesson, a1 as CourseListItem, a2 as CourseModule, a3 as CoursePostedComment, a4 as CourseProgress, a5 as CourseTutorMessage, a6 as CourseTutorThread, a7 as CrossSellItem, a8 as CurrencyDisplayFormat, a9 as CustomerAddress, aa as CustomerProfile, ab as DigitalDownload, ac as DownloadUrl, ad as Facet, ae as FacetAvailability, af as FacetCategory, ag as FacetLabel, ah as FacetPriceRange, ai as FacetRange, aj as FacetRatingBucket, ak as FacetValue, al as FacetsResponse, am as FilterField, an as FulfillmentStatus, ao as FulfillmentStatuses, ap as GiftCardBalance, aq as GiftCardPurchaseInput, ar as GiftCardPurchaseResult, as as GiftCardSummary, at as LessonNote, au as LessonQuiz, av as LoginInput, aw as LoyaltyBalance, ax as LoyaltyNextTier, ay as LoyaltyProgram, az as LoyaltySummary, aA as LoyaltyTier, aB as LoyaltyTierPerks, aC as LoyaltyTransaction, aD as Menu, aE as MenuItem, aF as MenuItemRef, aG as MenuItemType, aH as MessageResponse, aI as NewsletterOptInDefault, aJ as NewsletterSubscribeInput, aK as NewsletterSubscribeResult, aL as NewsletterUnsubscribeResult, aM as OrderAccessRequestResponse, aN as OrderAccessVerifyResponse, aO as OrderDetail, aP as OrderItem, aQ as OrderListItem, aR as OrderStatus, aS as OrderStatusHistory, aT as OrderStatuses, aU as OrderTracking, aV as Page, aW as PageAttachment, aX as PageDetail, aY as PaginatedResponse, aZ as PaymentInstrument, a_ as PaymentStatus, a$ as PaymentStatuses, b0 as PaymentSwift, b1 as PickupPoint, b2 as PickupPointHours, b3 as PickupPointsInput, b4 as PickupWidgetConfig, b5 as PriceDisplay, b6 as ProductAssetGroup, b7 as ProductAssetItem, b8 as ProductAvailability, b9 as ProductGroup, ba as ProductLabel, bb as ProductListItem, bc as ProductMedia, bd as ProductMediaVariant, be as ProductParameter, bf as ProductParameterGroup, bg as ProductParametersResponse, bh as ProductPrice, bi as ProductPromotionSummary, bj as ProductReview, bk as ProductReviewsResponse, bl as ProductSibling, bm as ProductSort, bn as ProductSortValue, bo as ProductVolumePrice, bp as ProductsQuery, bq as QuizAnswerInput, br as QuizAnswerResult, bs as QuizQuestion, bt as QuizResult, bu as QuoteItem, bv as QuoteRequest, bw as RegisterInput, bx as RegisterResult, by as RequestInterceptor, bz as RequestInterceptorConfig, bA as ResponseInterceptor, bB as ResponseInterceptorData, bC as ReturnRequest, bD as ReturnRequestItem, bE as ReturnStatus, bF as ReturnStatusItem, bG as ReturnableOrder, bH as ReturnableOrderItem, bI as SdkError, bJ as ShippingMethodSummary, bK as ShippingQuote, bL as ShippingQuoteInput, bM as ShopAppearance, bN as ShopInfo, bO as ShopScript, bP as ShopScriptPlacement, bQ as ShopScriptType, bR as ShopScripts, bS as ShopSeo, bT as ShopSeoIdentity, bU as SiteFormField, bV as SiteFormFieldOption, bW as SiteFormFieldType, bX as Sitemap, bY as SitemapEntry, bZ as StockBehavior, b_ as StockMode, b$ as StorefrontForm, c0 as StorefrontFormFieldErrorCode, c1 as StorefrontFormSettings, c2 as StorefrontFormSubmitInput, c3 as StorefrontFormSubmitResult, c4 as SubmitQuoteInput, c5 as SubmitReturnInput, c6 as SubmitReviewInput, c7 as Subscription, c8 as SubscriptionAction, c9 as SubscriptionFrequency, ca as SubscriptionItem, cb as SubscriptionStatus, cc as TaxBreakdownLine, cd as VariantAxis, ce as VariantAxisValue, cf as WishlistItem, cg as err, ch as ok, ci as toSdkError } from './client-C4dnHtID.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
|
@@ -9,7 +9,7 @@ export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as Add
|
|
|
9
9
|
* @param locale - BCP 47 locale string (e.g. "cs", "en", "de"). Defaults to "cs".
|
|
10
10
|
* @returns Formatted price string (e.g. "1 499 Kč", "24,99 €")
|
|
11
11
|
*/
|
|
12
|
-
declare function formatPrice(amount: number, currency: string, locale?: string): string;
|
|
12
|
+
declare function formatPrice(amount: number, currency: string, locale?: string, display?: "SYMBOL_BEFORE" | "SYMBOL_AFTER" | "CODE"): string;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Variant selection helpers — server-safe (no React, no DOM).
|
|
@@ -43,12 +43,16 @@ interface ResolvedVariantContent {
|
|
|
43
43
|
shortDescription: string | null;
|
|
44
44
|
longDescription: string | null;
|
|
45
45
|
images: ProductDetail["images"];
|
|
46
|
+
media: NonNullable<ProductDetail["media"]>;
|
|
47
|
+
assetGroups: ProductDetail["assetGroups"];
|
|
46
48
|
/** `true` for each field the variant overrode — handy for debugging a shop. */
|
|
47
49
|
overrides: {
|
|
48
50
|
name: boolean;
|
|
49
51
|
shortDescription: boolean;
|
|
50
52
|
longDescription: boolean;
|
|
51
53
|
images: boolean;
|
|
54
|
+
media: boolean;
|
|
55
|
+
assetGroups: boolean;
|
|
52
56
|
};
|
|
53
57
|
}
|
|
54
58
|
/**
|