@behio/storefront-sdk 2.27.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-OOLOURJM.js → chunk-SBPQZG4Y.js} +14 -1
- package/dist/{chunk-3TAXKDUJ.mjs → chunk-YDZ2OF4O.mjs} +14 -1
- package/dist/{client-EjtvqiPK.d.mts → client-CAPtdqzd.d.mts} +19 -2
- package/dist/{client-EjtvqiPK.d.ts → client-CAPtdqzd.d.ts} +19 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -3
- package/dist/index.mjs +13 -1
- package/dist/next.d.mts +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +2 -2
- package/dist/next.mjs +1 -1
- package/dist/react.d.mts +26 -2
- package/dist/react.d.ts +26 -2
- package/dist/react.js +29 -2
- package/dist/react.mjs +28 -2
- package/package.json +1 -1
|
@@ -48,6 +48,7 @@ var BE_CODE_TO_ERROR = {
|
|
|
48
48
|
"be.storefront.discountNotApplicable": "INVALID_DISCOUNT",
|
|
49
49
|
"be.storefront.discountNotYetValid": "INVALID_DISCOUNT",
|
|
50
50
|
"be.storefront.discountUsageLimitReached": "INVALID_DISCOUNT",
|
|
51
|
+
"be.storefront.personalDiscountNotEligible": "INVALID_DISCOUNT",
|
|
51
52
|
"be.storefront.discountLimitedToGroups": "INVALID_DISCOUNT",
|
|
52
53
|
"be.storefront.tokenInvalid": "TOKEN_INVALID",
|
|
53
54
|
"be.storefront.orderAccessTokenInvalid": "TOKEN_INVALID",
|
|
@@ -1184,13 +1185,19 @@ var CartModule = class {
|
|
|
1184
1185
|
/** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
|
|
1185
1186
|
async addItems(input) {
|
|
1186
1187
|
const res = await this.client.request("POST", "/cart/items/batch", {
|
|
1187
|
-
body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity })) }
|
|
1188
|
+
body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity, ...item.assignToProductId ? { assignToProductId: item.assignToProductId } : {} })) }
|
|
1188
1189
|
});
|
|
1189
1190
|
if (res.error) return res;
|
|
1190
1191
|
if (res.data.newSessionToken) this.client.setCartSession(res.data.newSessionToken);
|
|
1191
1192
|
this.client.emit("cart:updated", res.data);
|
|
1192
1193
|
return res;
|
|
1193
1194
|
}
|
|
1195
|
+
/** Idempotent selection of one extra package for a particular main cart line. */
|
|
1196
|
+
async setAddon(itemId, productId, selected) {
|
|
1197
|
+
const res = await this.client.request("PUT", `/cart/items/${encodeURIComponent(itemId)}/addons/${encodeURIComponent(productId)}`, { body: { selected } });
|
|
1198
|
+
if (!res.error) this.client.emit("cart:updated", res.data);
|
|
1199
|
+
return res;
|
|
1200
|
+
}
|
|
1194
1201
|
/**
|
|
1195
1202
|
* Switch the CART currency server-side. The backend re-prices every line in
|
|
1196
1203
|
* the new currency (no FX conversion: a product must have a price configured
|
|
@@ -2309,6 +2316,12 @@ var NewsletterModule = class {
|
|
|
2309
2316
|
}
|
|
2310
2317
|
);
|
|
2311
2318
|
}
|
|
2319
|
+
async confirm(token) {
|
|
2320
|
+
return this.client.request("POST", "/newsletter/confirm", {
|
|
2321
|
+
body: { token },
|
|
2322
|
+
auth: false
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2312
2325
|
async unsubscribe(email) {
|
|
2313
2326
|
return this.client.request(
|
|
2314
2327
|
"POST",
|
|
@@ -48,6 +48,7 @@ var BE_CODE_TO_ERROR = {
|
|
|
48
48
|
"be.storefront.discountNotApplicable": "INVALID_DISCOUNT",
|
|
49
49
|
"be.storefront.discountNotYetValid": "INVALID_DISCOUNT",
|
|
50
50
|
"be.storefront.discountUsageLimitReached": "INVALID_DISCOUNT",
|
|
51
|
+
"be.storefront.personalDiscountNotEligible": "INVALID_DISCOUNT",
|
|
51
52
|
"be.storefront.discountLimitedToGroups": "INVALID_DISCOUNT",
|
|
52
53
|
"be.storefront.tokenInvalid": "TOKEN_INVALID",
|
|
53
54
|
"be.storefront.orderAccessTokenInvalid": "TOKEN_INVALID",
|
|
@@ -1184,13 +1185,19 @@ var CartModule = class {
|
|
|
1184
1185
|
/** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
|
|
1185
1186
|
async addItems(input) {
|
|
1186
1187
|
const res = await this.client.request("POST", "/cart/items/batch", {
|
|
1187
|
-
body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity })) }
|
|
1188
|
+
body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity, ...item.assignToProductId ? { assignToProductId: item.assignToProductId } : {} })) }
|
|
1188
1189
|
});
|
|
1189
1190
|
if (res.error) return res;
|
|
1190
1191
|
if (res.data.newSessionToken) this.client.setCartSession(res.data.newSessionToken);
|
|
1191
1192
|
this.client.emit("cart:updated", res.data);
|
|
1192
1193
|
return res;
|
|
1193
1194
|
}
|
|
1195
|
+
/** Idempotent selection of one extra package for a particular main cart line. */
|
|
1196
|
+
async setAddon(itemId, productId, selected) {
|
|
1197
|
+
const res = await this.client.request("PUT", `/cart/items/${encodeURIComponent(itemId)}/addons/${encodeURIComponent(productId)}`, { body: { selected } });
|
|
1198
|
+
if (!res.error) this.client.emit("cart:updated", res.data);
|
|
1199
|
+
return res;
|
|
1200
|
+
}
|
|
1194
1201
|
/**
|
|
1195
1202
|
* Switch the CART currency server-side. The backend re-prices every line in
|
|
1196
1203
|
* the new currency (no FX conversion: a product must have a price configured
|
|
@@ -2309,6 +2316,12 @@ var NewsletterModule = class {
|
|
|
2309
2316
|
}
|
|
2310
2317
|
);
|
|
2311
2318
|
}
|
|
2319
|
+
async confirm(token) {
|
|
2320
|
+
return this.client.request("POST", "/newsletter/confirm", {
|
|
2321
|
+
body: { token },
|
|
2322
|
+
auth: false
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2312
2325
|
async unsubscribe(email) {
|
|
2313
2326
|
return this.client.request(
|
|
2314
2327
|
"POST",
|
|
@@ -303,9 +303,16 @@ interface NewsletterSubscribeInput {
|
|
|
303
303
|
}
|
|
304
304
|
interface NewsletterSubscribeResult {
|
|
305
305
|
success: boolean;
|
|
306
|
+
/** Confirm the email before the subscription becomes active. */
|
|
307
|
+
confirmationRequired?: boolean;
|
|
306
308
|
/** True when this email was already an active subscriber. */
|
|
307
309
|
alreadySubscribed: boolean;
|
|
308
310
|
}
|
|
311
|
+
interface NewsletterConfirmResult {
|
|
312
|
+
success: boolean;
|
|
313
|
+
/** The actual code is delivered by email, never returned to the browser. */
|
|
314
|
+
welcomeDiscountIssued: boolean;
|
|
315
|
+
}
|
|
309
316
|
interface NewsletterUnsubscribeResult {
|
|
310
317
|
success: boolean;
|
|
311
318
|
}
|
|
@@ -1370,6 +1377,11 @@ interface CartItemProduct {
|
|
|
1370
1377
|
orderQuantityStep?: number | null;
|
|
1371
1378
|
}
|
|
1372
1379
|
interface CartItem {
|
|
1380
|
+
/** Extras allocated to this exact main cart line. Older servers omit it. */
|
|
1381
|
+
addonSelections?: Array<{
|
|
1382
|
+
productId: string;
|
|
1383
|
+
quantity: number;
|
|
1384
|
+
}>;
|
|
1373
1385
|
id: string;
|
|
1374
1386
|
/** A retained row can be unavailable after the merchant changes its offer. */
|
|
1375
1387
|
isPurchasable: boolean;
|
|
@@ -1558,7 +1570,9 @@ interface GiftCardSummary {
|
|
|
1558
1570
|
}
|
|
1559
1571
|
/** Atomic multi-product purchase; every product is validated before any line changes. */
|
|
1560
1572
|
interface AddToCartItemsInput {
|
|
1561
|
-
items: AddToCartInput
|
|
1573
|
+
items: Array<AddToCartInput & {
|
|
1574
|
+
assignToProductId?: string;
|
|
1575
|
+
}>;
|
|
1562
1576
|
}
|
|
1563
1577
|
interface AddToCartInput {
|
|
1564
1578
|
/**
|
|
@@ -3981,6 +3995,8 @@ declare class CartModule {
|
|
|
3981
3995
|
addItems(input: AddToCartItemsInput): Promise<SdkResult<Cart & {
|
|
3982
3996
|
newSessionToken?: string;
|
|
3983
3997
|
}>>;
|
|
3998
|
+
/** Idempotent selection of one extra package for a particular main cart line. */
|
|
3999
|
+
setAddon(itemId: string, productId: string, selected: boolean): Promise<SdkResult<Cart>>;
|
|
3984
4000
|
/**
|
|
3985
4001
|
* Switch the CART currency server-side. The backend re-prices every line in
|
|
3986
4002
|
* the new currency (no FX conversion: a product must have a price configured
|
|
@@ -4615,6 +4631,7 @@ declare class NewsletterModule {
|
|
|
4615
4631
|
private client;
|
|
4616
4632
|
constructor(client: BehioStorefront);
|
|
4617
4633
|
subscribe(input: NewsletterSubscribeInput): Promise<SdkResult<NewsletterSubscribeResult>>;
|
|
4634
|
+
confirm(token: string): Promise<SdkResult<NewsletterConfirmResult>>;
|
|
4618
4635
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
4619
4636
|
}
|
|
4620
4637
|
/** Souhrn kosiku pro skripty na strance (Behio Chat, analytika). */
|
|
@@ -4628,4 +4645,4 @@ declare function clearCartSummary(): void;
|
|
|
4628
4645
|
/** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
|
|
4629
4646
|
declare function publishCartSummary(summary: CartSummaryEvent): void;
|
|
4630
4647
|
|
|
4631
|
-
export { type CartPromotion as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type BookingConfig as D, type BookingCreateInput as E, type BookingCreated as F, type BookingLocale as G, type BookingLocation as H, type BookingManageSlotsQuery as I, type BookingService as J, type BookingSlot as K, type BookingSlots as L, type BookingSlotsQuery as M, type BookingStaff as N, type BookingStatus as O, type ProductDetail as P, type Bundle as Q, type BundleCatalogQuery as R, type SdkResult as S, type BundleItem as T, type Cart as U, type CartBundleLine as V, type CartBundleLineItem as W, type CartDiscount as X, type CartItem as Y, type CartItemProduct as Z, type CartLinkClaimed as _, type ProductVariant as a, type Menu as a$, type CartSummaryEvent as a0, type Category as a1, type CategoryDetail as a2, type CertificateVerification as a3, type CheckoutAddress as a4, type CheckoutInput as a5, type CheckoutPaymentMethod as a6, type CheckoutPreview as a7, type CheckoutResult as a8, type CheckoutSettings as a9, type FacetCategory as aA, type FacetLabel as aB, type FacetPriceRange as aC, type FacetRange as aD, type FacetRatingBucket as aE, type FacetValue as aF, type FacetsResponse as aG, type FilterField as aH, type FulfillmentStatus as aI, FulfillmentStatuses as aJ, type GamificationRefreshResult 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 LoyaltyQuery as aV, type LoyaltyReferralResult as aW, type LoyaltySummary as aX, type LoyaltyTier as aY, type LoyaltyTierPerks as aZ, type LoyaltyTransaction as a_, type CookieConsentInput as aa, type CourseAttachment as ab, type CourseCertificate as ac, type CourseComment as ad, type CourseCommentReply as ae, type CourseCommentsList as af, type CourseDetail as ag, type CourseLesson as ah, type CourseListItem as ai, type CourseModule as aj, type CoursePostedComment as ak, type CourseProgress as al, type CourseTutorMessage as am, type CourseTutorThread as an, type CrossSellItem as ao, type CurrencyDisplayFormat as ap, type CustomerAddress as aq, type CustomerBadge as ar, type CustomerChallenge as as, type CustomerGamification as at, type CustomerGamificationQuery as au, type CustomerProfile as av, type DigitalDownload as aw, type DownloadUrl as ax, type Facet as ay, type FacetAvailability as az, type StorefrontFormFieldError as b, type
|
|
4648
|
+
export { type CartPromotion as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type BookingConfig as D, type BookingCreateInput as E, type BookingCreated as F, type BookingLocale as G, type BookingLocation as H, type BookingManageSlotsQuery as I, type BookingService as J, type BookingSlot as K, type BookingSlots as L, type BookingSlotsQuery as M, type BookingStaff as N, type BookingStatus as O, type ProductDetail as P, type Bundle as Q, type BundleCatalogQuery as R, type SdkResult as S, type BundleItem as T, type Cart as U, type CartBundleLine as V, type CartBundleLineItem as W, type CartDiscount as X, type CartItem as Y, type CartItemProduct as Z, type CartLinkClaimed as _, type ProductVariant as a, type Menu as a$, type CartSummaryEvent as a0, type Category as a1, type CategoryDetail as a2, type CertificateVerification as a3, type CheckoutAddress as a4, type CheckoutInput as a5, type CheckoutPaymentMethod as a6, type CheckoutPreview as a7, type CheckoutResult as a8, type CheckoutSettings as a9, type FacetCategory as aA, type FacetLabel as aB, type FacetPriceRange as aC, type FacetRange as aD, type FacetRatingBucket as aE, type FacetValue as aF, type FacetsResponse as aG, type FilterField as aH, type FulfillmentStatus as aI, FulfillmentStatuses as aJ, type GamificationRefreshResult 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 LoyaltyQuery as aV, type LoyaltyReferralResult as aW, type LoyaltySummary as aX, type LoyaltyTier as aY, type LoyaltyTierPerks as aZ, type LoyaltyTransaction as a_, type CookieConsentInput as aa, type CourseAttachment as ab, type CourseCertificate as ac, type CourseComment as ad, type CourseCommentReply as ae, type CourseCommentsList as af, type CourseDetail as ag, type CourseLesson as ah, type CourseListItem as ai, type CourseModule as aj, type CoursePostedComment as ak, type CourseProgress as al, type CourseTutorMessage as am, type CourseTutorThread as an, type CrossSellItem as ao, type CurrencyDisplayFormat as ap, type CustomerAddress as aq, type CustomerBadge as ar, type CustomerChallenge as as, type CustomerGamification as at, type CustomerGamificationQuery as au, type CustomerProfile as av, type DigitalDownload as aw, type DownloadUrl as ax, type Facet as ay, type FacetAvailability as az, type StorefrontFormFieldError as b, type RegisterResult as b$, type MenuItem as b0, type MenuItemRef as b1, type MenuItemType as b2, type MessageResponse as b3, type NewsletterConfirmResult as b4, type NewsletterOptInDefault as b5, type NewsletterSubscribeInput as b6, type NewsletterSubscribeResult as b7, type NewsletterUnsubscribeResult as b8, type OrderAccessRequestResponse as b9, type ProductAssetGroup as bA, type ProductAssetItem as bB, type ProductAvailability as bC, type ProductGroup as bD, type ProductLabel as bE, type ProductListItem as bF, type ProductMedia as bG, type ProductMediaVariant as bH, type ProductParameter as bI, type ProductParameterGroup as bJ, type ProductParametersResponse as bK, type ProductPrice as bL, type ProductPromotionSummary as bM, type ProductReview as bN, type ProductReviewsResponse as bO, type ProductSibling as bP, ProductSort as bQ, type ProductSortValue as bR, type ProductVolumePrice as bS, type ProductsQuery as bT, type QuizAnswerInput as bU, type QuizAnswerResult as bV, type QuizQuestion as bW, type QuizResult as bX, type QuoteItem as bY, type QuoteRequest as bZ, type RegisterInput as b_, type OrderAccessVerifyResponse as ba, type OrderDetail as bb, type OrderDiscount as bc, type OrderDocument as bd, type OrderItem as be, type OrderListItem as bf, type OrderPaymentInstructions as bg, type OrderPickupPoint as bh, type OrderShipment as bi, type OrderStatus as bj, type OrderStatusHistory as bk, OrderStatuses as bl, type OrderTracking as bm, type Page as bn, type PageAttachment as bo, type PageDetail as bp, type PaginatedResponse as bq, type PaymentInstrument as br, type PaymentStatus as bs, PaymentStatuses as bt, type PaymentSwift as bu, type PickupPoint as bv, type PickupPointHours as bw, type PickupPointsInput as bx, type PickupWidgetConfig as by, type PriceDisplay as bz, type AddToCartInput as c, type WithdrawalSettings as c$, type RequestInterceptor as c0, type RequestInterceptorConfig as c1, type ResponseInterceptor as c2, type ResponseInterceptorData as c3, type ReturnRequest as c4, type ReturnRequestItem as c5, type ReturnStatus as c6, type ReturnStatusItem as c7, type ReturnableOrder as c8, type ReturnableOrderItem as c9, type StorefrontFaqGroup as cA, type StorefrontFaqGroupSummary as cB, type StorefrontFaqGroups as cC, type StorefrontFaqItem as cD, type StorefrontFaqQuery as cE, type StorefrontForm as cF, type StorefrontFormFieldErrorCode as cG, type StorefrontFormFile as cH, type StorefrontFormSettings as cI, type StorefrontFormSubmitInput as cJ, type StorefrontFormSubmitResult as cK, type StorefrontFormUpload as cL, type SubmitQuoteInput as cM, type SubmitReturnInput as cN, type SubmitReviewInput as cO, type SubmitWithdrawalInput as cP, type Subscription as cQ, type SubscriptionAction as cR, type SubscriptionFrequency as cS, type SubscriptionItem as cT, type SubscriptionStatus as cU, type TaxBreakdownLine as cV, type VariantAxis as cW, type VariantAxisValue as cX, type WishlistItem as cY, type WithdrawalAcknowledgement as cZ, type WithdrawalFlag as c_, type SdkError as ca, type ShippingMethodSummary as cb, type ShippingPublicConfig as cc, type ShippingQuote as cd, type ShippingQuoteInput as ce, type ShopAppearance as cf, type ShopCommerce as cg, type ShopInfo as ch, type ShopScript as ci, type ShopScriptPlacement as cj, type ShopScriptType as ck, type ShopScripts as cl, type ShopSeo as cm, type ShopSeoIdentity as cn, type SiteFormField as co, type SiteFormFieldOption as cp, type SiteFormFieldType as cq, type Sitemap as cr, type SitemapEntry as cs, type StockBehavior as ct, type StockMode as cu, type StorefrontCollection as cv, type StorefrontCollectionField as cw, type StorefrontCollectionFieldType as cx, type StorefrontCollectionItem as cy, type StorefrontCollectionQuery as cz, type AddToCartItemsInput as d, type WithdrawalWindow as d0, clearCartSummary as d1, err as d2, ok as d3, publishCartSummary as d4, toSdkError as d5, type AddressDetail as e, type AddressSuggestion as f, type AddressType as g, AddressTypes as h, type AuthTokens as i, type BackInStockSubscription as j, type BadgeTone as k, BehioApiError as l, type BehioErrorCode as m, type BehioEventHandler as n, type BehioEventType as o, BehioNetworkError as p, type BehioStorefrontConfig as q, type Blog as r, type BlogPostDetail as s, type BlogPostListItem as t, type BlogPostsPage as u, type BlogPostsQuery as v, type BlogSettings as w, type BlogTag as x, type Booking as y, type BookingCategory as z };
|
|
@@ -303,9 +303,16 @@ interface NewsletterSubscribeInput {
|
|
|
303
303
|
}
|
|
304
304
|
interface NewsletterSubscribeResult {
|
|
305
305
|
success: boolean;
|
|
306
|
+
/** Confirm the email before the subscription becomes active. */
|
|
307
|
+
confirmationRequired?: boolean;
|
|
306
308
|
/** True when this email was already an active subscriber. */
|
|
307
309
|
alreadySubscribed: boolean;
|
|
308
310
|
}
|
|
311
|
+
interface NewsletterConfirmResult {
|
|
312
|
+
success: boolean;
|
|
313
|
+
/** The actual code is delivered by email, never returned to the browser. */
|
|
314
|
+
welcomeDiscountIssued: boolean;
|
|
315
|
+
}
|
|
309
316
|
interface NewsletterUnsubscribeResult {
|
|
310
317
|
success: boolean;
|
|
311
318
|
}
|
|
@@ -1370,6 +1377,11 @@ interface CartItemProduct {
|
|
|
1370
1377
|
orderQuantityStep?: number | null;
|
|
1371
1378
|
}
|
|
1372
1379
|
interface CartItem {
|
|
1380
|
+
/** Extras allocated to this exact main cart line. Older servers omit it. */
|
|
1381
|
+
addonSelections?: Array<{
|
|
1382
|
+
productId: string;
|
|
1383
|
+
quantity: number;
|
|
1384
|
+
}>;
|
|
1373
1385
|
id: string;
|
|
1374
1386
|
/** A retained row can be unavailable after the merchant changes its offer. */
|
|
1375
1387
|
isPurchasable: boolean;
|
|
@@ -1558,7 +1570,9 @@ interface GiftCardSummary {
|
|
|
1558
1570
|
}
|
|
1559
1571
|
/** Atomic multi-product purchase; every product is validated before any line changes. */
|
|
1560
1572
|
interface AddToCartItemsInput {
|
|
1561
|
-
items: AddToCartInput
|
|
1573
|
+
items: Array<AddToCartInput & {
|
|
1574
|
+
assignToProductId?: string;
|
|
1575
|
+
}>;
|
|
1562
1576
|
}
|
|
1563
1577
|
interface AddToCartInput {
|
|
1564
1578
|
/**
|
|
@@ -3981,6 +3995,8 @@ declare class CartModule {
|
|
|
3981
3995
|
addItems(input: AddToCartItemsInput): Promise<SdkResult<Cart & {
|
|
3982
3996
|
newSessionToken?: string;
|
|
3983
3997
|
}>>;
|
|
3998
|
+
/** Idempotent selection of one extra package for a particular main cart line. */
|
|
3999
|
+
setAddon(itemId: string, productId: string, selected: boolean): Promise<SdkResult<Cart>>;
|
|
3984
4000
|
/**
|
|
3985
4001
|
* Switch the CART currency server-side. The backend re-prices every line in
|
|
3986
4002
|
* the new currency (no FX conversion: a product must have a price configured
|
|
@@ -4615,6 +4631,7 @@ declare class NewsletterModule {
|
|
|
4615
4631
|
private client;
|
|
4616
4632
|
constructor(client: BehioStorefront);
|
|
4617
4633
|
subscribe(input: NewsletterSubscribeInput): Promise<SdkResult<NewsletterSubscribeResult>>;
|
|
4634
|
+
confirm(token: string): Promise<SdkResult<NewsletterConfirmResult>>;
|
|
4618
4635
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
4619
4636
|
}
|
|
4620
4637
|
/** Souhrn kosiku pro skripty na strance (Behio Chat, analytika). */
|
|
@@ -4628,4 +4645,4 @@ declare function clearCartSummary(): void;
|
|
|
4628
4645
|
/** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
|
|
4629
4646
|
declare function publishCartSummary(summary: CartSummaryEvent): void;
|
|
4630
4647
|
|
|
4631
|
-
export { type CartPromotion as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type BookingConfig as D, type BookingCreateInput as E, type BookingCreated as F, type BookingLocale as G, type BookingLocation as H, type BookingManageSlotsQuery as I, type BookingService as J, type BookingSlot as K, type BookingSlots as L, type BookingSlotsQuery as M, type BookingStaff as N, type BookingStatus as O, type ProductDetail as P, type Bundle as Q, type BundleCatalogQuery as R, type SdkResult as S, type BundleItem as T, type Cart as U, type CartBundleLine as V, type CartBundleLineItem as W, type CartDiscount as X, type CartItem as Y, type CartItemProduct as Z, type CartLinkClaimed as _, type ProductVariant as a, type Menu as a$, type CartSummaryEvent as a0, type Category as a1, type CategoryDetail as a2, type CertificateVerification as a3, type CheckoutAddress as a4, type CheckoutInput as a5, type CheckoutPaymentMethod as a6, type CheckoutPreview as a7, type CheckoutResult as a8, type CheckoutSettings as a9, type FacetCategory as aA, type FacetLabel as aB, type FacetPriceRange as aC, type FacetRange as aD, type FacetRatingBucket as aE, type FacetValue as aF, type FacetsResponse as aG, type FilterField as aH, type FulfillmentStatus as aI, FulfillmentStatuses as aJ, type GamificationRefreshResult 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 LoyaltyQuery as aV, type LoyaltyReferralResult as aW, type LoyaltySummary as aX, type LoyaltyTier as aY, type LoyaltyTierPerks as aZ, type LoyaltyTransaction as a_, type CookieConsentInput as aa, type CourseAttachment as ab, type CourseCertificate as ac, type CourseComment as ad, type CourseCommentReply as ae, type CourseCommentsList as af, type CourseDetail as ag, type CourseLesson as ah, type CourseListItem as ai, type CourseModule as aj, type CoursePostedComment as ak, type CourseProgress as al, type CourseTutorMessage as am, type CourseTutorThread as an, type CrossSellItem as ao, type CurrencyDisplayFormat as ap, type CustomerAddress as aq, type CustomerBadge as ar, type CustomerChallenge as as, type CustomerGamification as at, type CustomerGamificationQuery as au, type CustomerProfile as av, type DigitalDownload as aw, type DownloadUrl as ax, type Facet as ay, type FacetAvailability as az, type StorefrontFormFieldError as b, type
|
|
4648
|
+
export { type CartPromotion as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type BookingConfig as D, type BookingCreateInput as E, type BookingCreated as F, type BookingLocale as G, type BookingLocation as H, type BookingManageSlotsQuery as I, type BookingService as J, type BookingSlot as K, type BookingSlots as L, type BookingSlotsQuery as M, type BookingStaff as N, type BookingStatus as O, type ProductDetail as P, type Bundle as Q, type BundleCatalogQuery as R, type SdkResult as S, type BundleItem as T, type Cart as U, type CartBundleLine as V, type CartBundleLineItem as W, type CartDiscount as X, type CartItem as Y, type CartItemProduct as Z, type CartLinkClaimed as _, type ProductVariant as a, type Menu as a$, type CartSummaryEvent as a0, type Category as a1, type CategoryDetail as a2, type CertificateVerification as a3, type CheckoutAddress as a4, type CheckoutInput as a5, type CheckoutPaymentMethod as a6, type CheckoutPreview as a7, type CheckoutResult as a8, type CheckoutSettings as a9, type FacetCategory as aA, type FacetLabel as aB, type FacetPriceRange as aC, type FacetRange as aD, type FacetRatingBucket as aE, type FacetValue as aF, type FacetsResponse as aG, type FilterField as aH, type FulfillmentStatus as aI, FulfillmentStatuses as aJ, type GamificationRefreshResult 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 LoyaltyQuery as aV, type LoyaltyReferralResult as aW, type LoyaltySummary as aX, type LoyaltyTier as aY, type LoyaltyTierPerks as aZ, type LoyaltyTransaction as a_, type CookieConsentInput as aa, type CourseAttachment as ab, type CourseCertificate as ac, type CourseComment as ad, type CourseCommentReply as ae, type CourseCommentsList as af, type CourseDetail as ag, type CourseLesson as ah, type CourseListItem as ai, type CourseModule as aj, type CoursePostedComment as ak, type CourseProgress as al, type CourseTutorMessage as am, type CourseTutorThread as an, type CrossSellItem as ao, type CurrencyDisplayFormat as ap, type CustomerAddress as aq, type CustomerBadge as ar, type CustomerChallenge as as, type CustomerGamification as at, type CustomerGamificationQuery as au, type CustomerProfile as av, type DigitalDownload as aw, type DownloadUrl as ax, type Facet as ay, type FacetAvailability as az, type StorefrontFormFieldError as b, type RegisterResult as b$, type MenuItem as b0, type MenuItemRef as b1, type MenuItemType as b2, type MessageResponse as b3, type NewsletterConfirmResult as b4, type NewsletterOptInDefault as b5, type NewsletterSubscribeInput as b6, type NewsletterSubscribeResult as b7, type NewsletterUnsubscribeResult as b8, type OrderAccessRequestResponse as b9, type ProductAssetGroup as bA, type ProductAssetItem as bB, type ProductAvailability as bC, type ProductGroup as bD, type ProductLabel as bE, type ProductListItem as bF, type ProductMedia as bG, type ProductMediaVariant as bH, type ProductParameter as bI, type ProductParameterGroup as bJ, type ProductParametersResponse as bK, type ProductPrice as bL, type ProductPromotionSummary as bM, type ProductReview as bN, type ProductReviewsResponse as bO, type ProductSibling as bP, ProductSort as bQ, type ProductSortValue as bR, type ProductVolumePrice as bS, type ProductsQuery as bT, type QuizAnswerInput as bU, type QuizAnswerResult as bV, type QuizQuestion as bW, type QuizResult as bX, type QuoteItem as bY, type QuoteRequest as bZ, type RegisterInput as b_, type OrderAccessVerifyResponse as ba, type OrderDetail as bb, type OrderDiscount as bc, type OrderDocument as bd, type OrderItem as be, type OrderListItem as bf, type OrderPaymentInstructions as bg, type OrderPickupPoint as bh, type OrderShipment as bi, type OrderStatus as bj, type OrderStatusHistory as bk, OrderStatuses as bl, type OrderTracking as bm, type Page as bn, type PageAttachment as bo, type PageDetail as bp, type PaginatedResponse as bq, type PaymentInstrument as br, type PaymentStatus as bs, PaymentStatuses as bt, type PaymentSwift as bu, type PickupPoint as bv, type PickupPointHours as bw, type PickupPointsInput as bx, type PickupWidgetConfig as by, type PriceDisplay as bz, type AddToCartInput as c, type WithdrawalSettings as c$, type RequestInterceptor as c0, type RequestInterceptorConfig as c1, type ResponseInterceptor as c2, type ResponseInterceptorData as c3, type ReturnRequest as c4, type ReturnRequestItem as c5, type ReturnStatus as c6, type ReturnStatusItem as c7, type ReturnableOrder as c8, type ReturnableOrderItem as c9, type StorefrontFaqGroup as cA, type StorefrontFaqGroupSummary as cB, type StorefrontFaqGroups as cC, type StorefrontFaqItem as cD, type StorefrontFaqQuery as cE, type StorefrontForm as cF, type StorefrontFormFieldErrorCode as cG, type StorefrontFormFile as cH, type StorefrontFormSettings as cI, type StorefrontFormSubmitInput as cJ, type StorefrontFormSubmitResult as cK, type StorefrontFormUpload as cL, type SubmitQuoteInput as cM, type SubmitReturnInput as cN, type SubmitReviewInput as cO, type SubmitWithdrawalInput as cP, type Subscription as cQ, type SubscriptionAction as cR, type SubscriptionFrequency as cS, type SubscriptionItem as cT, type SubscriptionStatus as cU, type TaxBreakdownLine as cV, type VariantAxis as cW, type VariantAxisValue as cX, type WishlistItem as cY, type WithdrawalAcknowledgement as cZ, type WithdrawalFlag as c_, type SdkError as ca, type ShippingMethodSummary as cb, type ShippingPublicConfig as cc, type ShippingQuote as cd, type ShippingQuoteInput as ce, type ShopAppearance as cf, type ShopCommerce as cg, type ShopInfo as ch, type ShopScript as ci, type ShopScriptPlacement as cj, type ShopScriptType as ck, type ShopScripts as cl, type ShopSeo as cm, type ShopSeoIdentity as cn, type SiteFormField as co, type SiteFormFieldOption as cp, type SiteFormFieldType as cq, type Sitemap as cr, type SitemapEntry as cs, type StockBehavior as ct, type StockMode as cu, type StorefrontCollection as cv, type StorefrontCollectionField as cw, type StorefrontCollectionFieldType as cx, type StorefrontCollectionItem as cy, type StorefrontCollectionQuery as cz, type AddToCartItemsInput as d, type WithdrawalWindow as d0, clearCartSummary as d1, err as d2, ok as d3, publishCartSummary as d4, toSdkError as d5, type AddressDetail as e, type AddressSuggestion as f, type AddressType as g, AddressTypes as h, type AuthTokens as i, type BackInStockSubscription as j, type BadgeTone as k, BehioApiError as l, type BehioErrorCode as m, type BehioEventHandler as n, type BehioEventType as o, BehioNetworkError as p, type BehioStorefrontConfig as q, type Blog as r, type BlogPostDetail as s, type BlogPostListItem as t, type BlogPostsPage as u, type BlogPostsQuery as v, type BlogSettings as w, type BlogTag as x, type Booking as y, type BookingCategory 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 AddToCartItemsInput, e as AddressDetail, f as AddressSuggestion, g as AddressType, h as AddressTypes, i as AuthTokens, j as BackInStockSubscription, k as BadgeTone, l as BehioApiError, m as BehioErrorCode, n as BehioEventHandler, o as BehioEventType, p as BehioNetworkError, q as BehioStorefrontConfig, r as Blog, s as BlogPostDetail, t as BlogPostListItem, u as BlogPostsPage, v as BlogPostsQuery, w as BlogSettings, x as BlogTag, y as Booking, z as BookingCategory, D as BookingConfig, E as BookingCreateInput, F as BookingCreated, G as BookingLocale, H as BookingLocation, I as BookingManageSlotsQuery, J as BookingService, K as BookingSlot, L as BookingSlots, M as BookingSlotsQuery, N as BookingStaff, O as BookingStatus, Q as Bundle, R as BundleCatalogQuery, T as BundleItem, U as Cart, V as CartBundleLine, W as CartBundleLineItem, X as CartDiscount, Y as CartItem, Z as CartItemProduct, _ as CartLinkClaimed, $ as CartPromotion, a0 as CartSummaryEvent, a1 as Category, a2 as CategoryDetail, a3 as CertificateVerification, a4 as CheckoutAddress, a5 as CheckoutInput, a6 as CheckoutPaymentMethod, a7 as CheckoutPreview, a8 as CheckoutResult, a9 as CheckoutSettings, aa as CookieConsentInput, ab as CourseAttachment, ac as CourseCertificate, ad as CourseComment, ae as CourseCommentReply, af as CourseCommentsList, ag as CourseDetail, ah as CourseLesson, ai as CourseListItem, aj as CourseModule, ak as CoursePostedComment, al as CourseProgress, am as CourseTutorMessage, an as CourseTutorThread, ao as CrossSellItem, ap as CurrencyDisplayFormat, aq as CustomerAddress, ar as CustomerBadge, as as CustomerChallenge, at as CustomerGamification, au as CustomerGamificationQuery, av as CustomerProfile, aw as DigitalDownload, ax as DownloadUrl, ay as Facet, az as FacetAvailability, aA as FacetCategory, aB as FacetLabel, aC as FacetPriceRange, aD as FacetRange, aE as FacetRatingBucket, aF as FacetValue, aG as FacetsResponse, aH as FilterField, aI as FulfillmentStatus, aJ as FulfillmentStatuses, aK as GamificationRefreshResult, aL as GiftCardBalance, aM as GiftCardPurchaseInput, aN as GiftCardPurchaseResult, aO as GiftCardSummary, aP as LessonNote, aQ as LessonQuiz, aR as LoginInput, aS as LoyaltyBalance, aT as LoyaltyNextTier, aU as LoyaltyProgram, aV as LoyaltyQuery, aW as LoyaltyReferralResult, aX as LoyaltySummary, aY as LoyaltyTier, aZ as LoyaltyTierPerks, a_ as LoyaltyTransaction, a$ as Menu, b0 as MenuItem, b1 as MenuItemRef, b2 as MenuItemType, b3 as MessageResponse, b4 as
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-CAPtdqzd.mjs';
|
|
2
|
+
export { A as ActivePromotion, c as AddToCartInput, d as AddToCartItemsInput, e as AddressDetail, f as AddressSuggestion, g as AddressType, h as AddressTypes, i as AuthTokens, j as BackInStockSubscription, k as BadgeTone, l as BehioApiError, m as BehioErrorCode, n as BehioEventHandler, o as BehioEventType, p as BehioNetworkError, q as BehioStorefrontConfig, r as Blog, s as BlogPostDetail, t as BlogPostListItem, u as BlogPostsPage, v as BlogPostsQuery, w as BlogSettings, x as BlogTag, y as Booking, z as BookingCategory, D as BookingConfig, E as BookingCreateInput, F as BookingCreated, G as BookingLocale, H as BookingLocation, I as BookingManageSlotsQuery, J as BookingService, K as BookingSlot, L as BookingSlots, M as BookingSlotsQuery, N as BookingStaff, O as BookingStatus, Q as Bundle, R as BundleCatalogQuery, T as BundleItem, U as Cart, V as CartBundleLine, W as CartBundleLineItem, X as CartDiscount, Y as CartItem, Z as CartItemProduct, _ as CartLinkClaimed, $ as CartPromotion, a0 as CartSummaryEvent, a1 as Category, a2 as CategoryDetail, a3 as CertificateVerification, a4 as CheckoutAddress, a5 as CheckoutInput, a6 as CheckoutPaymentMethod, a7 as CheckoutPreview, a8 as CheckoutResult, a9 as CheckoutSettings, aa as CookieConsentInput, ab as CourseAttachment, ac as CourseCertificate, ad as CourseComment, ae as CourseCommentReply, af as CourseCommentsList, ag as CourseDetail, ah as CourseLesson, ai as CourseListItem, aj as CourseModule, ak as CoursePostedComment, al as CourseProgress, am as CourseTutorMessage, an as CourseTutorThread, ao as CrossSellItem, ap as CurrencyDisplayFormat, aq as CustomerAddress, ar as CustomerBadge, as as CustomerChallenge, at as CustomerGamification, au as CustomerGamificationQuery, av as CustomerProfile, aw as DigitalDownload, ax as DownloadUrl, ay as Facet, az as FacetAvailability, aA as FacetCategory, aB as FacetLabel, aC as FacetPriceRange, aD as FacetRange, aE as FacetRatingBucket, aF as FacetValue, aG as FacetsResponse, aH as FilterField, aI as FulfillmentStatus, aJ as FulfillmentStatuses, aK as GamificationRefreshResult, aL as GiftCardBalance, aM as GiftCardPurchaseInput, aN as GiftCardPurchaseResult, aO as GiftCardSummary, aP as LessonNote, aQ as LessonQuiz, aR as LoginInput, aS as LoyaltyBalance, aT as LoyaltyNextTier, aU as LoyaltyProgram, aV as LoyaltyQuery, aW as LoyaltyReferralResult, aX as LoyaltySummary, aY as LoyaltyTier, aZ as LoyaltyTierPerks, a_ as LoyaltyTransaction, a$ as Menu, b0 as MenuItem, b1 as MenuItemRef, b2 as MenuItemType, b3 as MessageResponse, b4 as NewsletterConfirmResult, b5 as NewsletterOptInDefault, b6 as NewsletterSubscribeInput, b7 as NewsletterSubscribeResult, b8 as NewsletterUnsubscribeResult, b9 as OrderAccessRequestResponse, ba as OrderAccessVerifyResponse, bb as OrderDetail, bc as OrderDiscount, bd as OrderDocument, be as OrderItem, bf as OrderListItem, bg as OrderPaymentInstructions, bh as OrderPickupPoint, bi as OrderShipment, bj as OrderStatus, bk as OrderStatusHistory, bl as OrderStatuses, bm as OrderTracking, bn as Page, bo as PageAttachment, bp as PageDetail, bq as PaginatedResponse, br as PaymentInstrument, bs as PaymentStatus, bt as PaymentStatuses, bu as PaymentSwift, bv as PickupPoint, bw as PickupPointHours, bx as PickupPointsInput, by as PickupWidgetConfig, bz as PriceDisplay, bA as ProductAssetGroup, bB as ProductAssetItem, bC as ProductAvailability, bD as ProductGroup, bE as ProductLabel, bF as ProductListItem, bG as ProductMedia, bH as ProductMediaVariant, bI as ProductParameter, bJ as ProductParameterGroup, bK as ProductParametersResponse, bL as ProductPrice, bM as ProductPromotionSummary, bN as ProductReview, bO as ProductReviewsResponse, bP as ProductSibling, bQ as ProductSort, bR as ProductSortValue, bS as ProductVolumePrice, bT as ProductsQuery, bU as QuizAnswerInput, bV as QuizAnswerResult, bW as QuizQuestion, bX as QuizResult, bY as QuoteItem, bZ as QuoteRequest, b_ as RegisterInput, b$ as RegisterResult, c0 as RequestInterceptor, c1 as RequestInterceptorConfig, c2 as ResponseInterceptor, c3 as ResponseInterceptorData, c4 as ReturnRequest, c5 as ReturnRequestItem, c6 as ReturnStatus, c7 as ReturnStatusItem, c8 as ReturnableOrder, c9 as ReturnableOrderItem, ca as SdkError, cb as ShippingMethodSummary, cc as ShippingPublicConfig, cd as ShippingQuote, ce as ShippingQuoteInput, cf as ShopAppearance, cg as ShopCommerce, ch as ShopInfo, ci as ShopScript, cj as ShopScriptPlacement, ck as ShopScriptType, cl as ShopScripts, cm as ShopSeo, cn as ShopSeoIdentity, co as SiteFormField, cp as SiteFormFieldOption, cq as SiteFormFieldType, cr as Sitemap, cs as SitemapEntry, ct as StockBehavior, cu as StockMode, cv as StorefrontCollection, cw as StorefrontCollectionField, cx as StorefrontCollectionFieldType, cy as StorefrontCollectionItem, cz as StorefrontCollectionQuery, cA as StorefrontFaqGroup, cB as StorefrontFaqGroupSummary, cC as StorefrontFaqGroups, cD as StorefrontFaqItem, cE as StorefrontFaqQuery, cF as StorefrontForm, cG as StorefrontFormFieldErrorCode, cH as StorefrontFormFile, cI as StorefrontFormSettings, cJ as StorefrontFormSubmitInput, cK as StorefrontFormSubmitResult, cL as StorefrontFormUpload, cM as SubmitQuoteInput, cN as SubmitReturnInput, cO as SubmitReviewInput, cP as SubmitWithdrawalInput, cQ as Subscription, cR as SubscriptionAction, cS as SubscriptionFrequency, cT as SubscriptionItem, cU as SubscriptionStatus, cV as TaxBreakdownLine, cW as VariantAxis, cX as VariantAxisValue, cY as WishlistItem, cZ as WithdrawalAcknowledgement, c_ as WithdrawalFlag, c$ as WithdrawalSettings, d0 as WithdrawalWindow, d1 as clearCartSummary, d2 as err, d3 as ok, d4 as publishCartSummary, d5 as toSdkError } from './client-CAPtdqzd.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
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 AddToCartItemsInput, e as AddressDetail, f as AddressSuggestion, g as AddressType, h as AddressTypes, i as AuthTokens, j as BackInStockSubscription, k as BadgeTone, l as BehioApiError, m as BehioErrorCode, n as BehioEventHandler, o as BehioEventType, p as BehioNetworkError, q as BehioStorefrontConfig, r as Blog, s as BlogPostDetail, t as BlogPostListItem, u as BlogPostsPage, v as BlogPostsQuery, w as BlogSettings, x as BlogTag, y as Booking, z as BookingCategory, D as BookingConfig, E as BookingCreateInput, F as BookingCreated, G as BookingLocale, H as BookingLocation, I as BookingManageSlotsQuery, J as BookingService, K as BookingSlot, L as BookingSlots, M as BookingSlotsQuery, N as BookingStaff, O as BookingStatus, Q as Bundle, R as BundleCatalogQuery, T as BundleItem, U as Cart, V as CartBundleLine, W as CartBundleLineItem, X as CartDiscount, Y as CartItem, Z as CartItemProduct, _ as CartLinkClaimed, $ as CartPromotion, a0 as CartSummaryEvent, a1 as Category, a2 as CategoryDetail, a3 as CertificateVerification, a4 as CheckoutAddress, a5 as CheckoutInput, a6 as CheckoutPaymentMethod, a7 as CheckoutPreview, a8 as CheckoutResult, a9 as CheckoutSettings, aa as CookieConsentInput, ab as CourseAttachment, ac as CourseCertificate, ad as CourseComment, ae as CourseCommentReply, af as CourseCommentsList, ag as CourseDetail, ah as CourseLesson, ai as CourseListItem, aj as CourseModule, ak as CoursePostedComment, al as CourseProgress, am as CourseTutorMessage, an as CourseTutorThread, ao as CrossSellItem, ap as CurrencyDisplayFormat, aq as CustomerAddress, ar as CustomerBadge, as as CustomerChallenge, at as CustomerGamification, au as CustomerGamificationQuery, av as CustomerProfile, aw as DigitalDownload, ax as DownloadUrl, ay as Facet, az as FacetAvailability, aA as FacetCategory, aB as FacetLabel, aC as FacetPriceRange, aD as FacetRange, aE as FacetRatingBucket, aF as FacetValue, aG as FacetsResponse, aH as FilterField, aI as FulfillmentStatus, aJ as FulfillmentStatuses, aK as GamificationRefreshResult, aL as GiftCardBalance, aM as GiftCardPurchaseInput, aN as GiftCardPurchaseResult, aO as GiftCardSummary, aP as LessonNote, aQ as LessonQuiz, aR as LoginInput, aS as LoyaltyBalance, aT as LoyaltyNextTier, aU as LoyaltyProgram, aV as LoyaltyQuery, aW as LoyaltyReferralResult, aX as LoyaltySummary, aY as LoyaltyTier, aZ as LoyaltyTierPerks, a_ as LoyaltyTransaction, a$ as Menu, b0 as MenuItem, b1 as MenuItemRef, b2 as MenuItemType, b3 as MessageResponse, b4 as
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-CAPtdqzd.js';
|
|
2
|
+
export { A as ActivePromotion, c as AddToCartInput, d as AddToCartItemsInput, e as AddressDetail, f as AddressSuggestion, g as AddressType, h as AddressTypes, i as AuthTokens, j as BackInStockSubscription, k as BadgeTone, l as BehioApiError, m as BehioErrorCode, n as BehioEventHandler, o as BehioEventType, p as BehioNetworkError, q as BehioStorefrontConfig, r as Blog, s as BlogPostDetail, t as BlogPostListItem, u as BlogPostsPage, v as BlogPostsQuery, w as BlogSettings, x as BlogTag, y as Booking, z as BookingCategory, D as BookingConfig, E as BookingCreateInput, F as BookingCreated, G as BookingLocale, H as BookingLocation, I as BookingManageSlotsQuery, J as BookingService, K as BookingSlot, L as BookingSlots, M as BookingSlotsQuery, N as BookingStaff, O as BookingStatus, Q as Bundle, R as BundleCatalogQuery, T as BundleItem, U as Cart, V as CartBundleLine, W as CartBundleLineItem, X as CartDiscount, Y as CartItem, Z as CartItemProduct, _ as CartLinkClaimed, $ as CartPromotion, a0 as CartSummaryEvent, a1 as Category, a2 as CategoryDetail, a3 as CertificateVerification, a4 as CheckoutAddress, a5 as CheckoutInput, a6 as CheckoutPaymentMethod, a7 as CheckoutPreview, a8 as CheckoutResult, a9 as CheckoutSettings, aa as CookieConsentInput, ab as CourseAttachment, ac as CourseCertificate, ad as CourseComment, ae as CourseCommentReply, af as CourseCommentsList, ag as CourseDetail, ah as CourseLesson, ai as CourseListItem, aj as CourseModule, ak as CoursePostedComment, al as CourseProgress, am as CourseTutorMessage, an as CourseTutorThread, ao as CrossSellItem, ap as CurrencyDisplayFormat, aq as CustomerAddress, ar as CustomerBadge, as as CustomerChallenge, at as CustomerGamification, au as CustomerGamificationQuery, av as CustomerProfile, aw as DigitalDownload, ax as DownloadUrl, ay as Facet, az as FacetAvailability, aA as FacetCategory, aB as FacetLabel, aC as FacetPriceRange, aD as FacetRange, aE as FacetRatingBucket, aF as FacetValue, aG as FacetsResponse, aH as FilterField, aI as FulfillmentStatus, aJ as FulfillmentStatuses, aK as GamificationRefreshResult, aL as GiftCardBalance, aM as GiftCardPurchaseInput, aN as GiftCardPurchaseResult, aO as GiftCardSummary, aP as LessonNote, aQ as LessonQuiz, aR as LoginInput, aS as LoyaltyBalance, aT as LoyaltyNextTier, aU as LoyaltyProgram, aV as LoyaltyQuery, aW as LoyaltyReferralResult, aX as LoyaltySummary, aY as LoyaltyTier, aZ as LoyaltyTierPerks, a_ as LoyaltyTransaction, a$ as Menu, b0 as MenuItem, b1 as MenuItemRef, b2 as MenuItemType, b3 as MessageResponse, b4 as NewsletterConfirmResult, b5 as NewsletterOptInDefault, b6 as NewsletterSubscribeInput, b7 as NewsletterSubscribeResult, b8 as NewsletterUnsubscribeResult, b9 as OrderAccessRequestResponse, ba as OrderAccessVerifyResponse, bb as OrderDetail, bc as OrderDiscount, bd as OrderDocument, be as OrderItem, bf as OrderListItem, bg as OrderPaymentInstructions, bh as OrderPickupPoint, bi as OrderShipment, bj as OrderStatus, bk as OrderStatusHistory, bl as OrderStatuses, bm as OrderTracking, bn as Page, bo as PageAttachment, bp as PageDetail, bq as PaginatedResponse, br as PaymentInstrument, bs as PaymentStatus, bt as PaymentStatuses, bu as PaymentSwift, bv as PickupPoint, bw as PickupPointHours, bx as PickupPointsInput, by as PickupWidgetConfig, bz as PriceDisplay, bA as ProductAssetGroup, bB as ProductAssetItem, bC as ProductAvailability, bD as ProductGroup, bE as ProductLabel, bF as ProductListItem, bG as ProductMedia, bH as ProductMediaVariant, bI as ProductParameter, bJ as ProductParameterGroup, bK as ProductParametersResponse, bL as ProductPrice, bM as ProductPromotionSummary, bN as ProductReview, bO as ProductReviewsResponse, bP as ProductSibling, bQ as ProductSort, bR as ProductSortValue, bS as ProductVolumePrice, bT as ProductsQuery, bU as QuizAnswerInput, bV as QuizAnswerResult, bW as QuizQuestion, bX as QuizResult, bY as QuoteItem, bZ as QuoteRequest, b_ as RegisterInput, b$ as RegisterResult, c0 as RequestInterceptor, c1 as RequestInterceptorConfig, c2 as ResponseInterceptor, c3 as ResponseInterceptorData, c4 as ReturnRequest, c5 as ReturnRequestItem, c6 as ReturnStatus, c7 as ReturnStatusItem, c8 as ReturnableOrder, c9 as ReturnableOrderItem, ca as SdkError, cb as ShippingMethodSummary, cc as ShippingPublicConfig, cd as ShippingQuote, ce as ShippingQuoteInput, cf as ShopAppearance, cg as ShopCommerce, ch as ShopInfo, ci as ShopScript, cj as ShopScriptPlacement, ck as ShopScriptType, cl as ShopScripts, cm as ShopSeo, cn as ShopSeoIdentity, co as SiteFormField, cp as SiteFormFieldOption, cq as SiteFormFieldType, cr as Sitemap, cs as SitemapEntry, ct as StockBehavior, cu as StockMode, cv as StorefrontCollection, cw as StorefrontCollectionField, cx as StorefrontCollectionFieldType, cy as StorefrontCollectionItem, cz as StorefrontCollectionQuery, cA as StorefrontFaqGroup, cB as StorefrontFaqGroupSummary, cC as StorefrontFaqGroups, cD as StorefrontFaqItem, cE as StorefrontFaqQuery, cF as StorefrontForm, cG as StorefrontFormFieldErrorCode, cH as StorefrontFormFile, cI as StorefrontFormSettings, cJ as StorefrontFormSubmitInput, cK as StorefrontFormSubmitResult, cL as StorefrontFormUpload, cM as SubmitQuoteInput, cN as SubmitReturnInput, cO as SubmitReviewInput, cP as SubmitWithdrawalInput, cQ as Subscription, cR as SubscriptionAction, cS as SubscriptionFrequency, cT as SubscriptionItem, cU as SubscriptionStatus, cV as TaxBreakdownLine, cW as VariantAxis, cX as VariantAxisValue, cY as WishlistItem, cZ as WithdrawalAcknowledgement, c_ as WithdrawalFlag, c$ as WithdrawalSettings, d0 as WithdrawalWindow, d1 as clearCartSummary, d2 as err, d3 as ok, d4 as publishCartSummary, d5 as toSdkError } from './client-CAPtdqzd.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkSBPQZG4Yjs = require('./chunk-SBPQZG4Y.js');
|
|
16
16
|
|
|
17
17
|
// src/react/utils/format-price.ts
|
|
18
18
|
function formatPrice(amount, currency, locale, display) {
|
|
@@ -416,6 +416,7 @@ var ERROR_MESSAGES = {
|
|
|
416
416
|
"be.storefront.mollieMissingCredentials": "Metod\u011B Mollie chyb\xED API kl\xED\u010D.",
|
|
417
417
|
"be.storefront.mollieWebhookInvalid": "Notifikace Mollie nenese id platby.",
|
|
418
418
|
"be.storefront.newCustomerNotEnrolled": "Nov\xFD z\xE1kazn\xEDk nen\xED v programu zapsan\xFD.",
|
|
419
|
+
"be.storefront.newsletterConfirmationInvalid": "Potvrzovac\xED odkaz je neplatn\xFD nebo vypr\u0161el. Vy\u017E\xE1dejte si nov\xFD e-mail.",
|
|
419
420
|
"be.storefront.noConsentRecorded": "N\xE1v\u0161t\u011Bvn\xEDk nem\xE1 zaznamenan\xFD souhlas.",
|
|
420
421
|
"be.storefront.noPickupPoints": "Tato doprava nem\xE1 v\xFDdejn\xED m\xEDsta.",
|
|
421
422
|
"be.storefront.noReferralRules": "Program nem\xE1 nastaven\xE1 doporu\u010Dovac\xED pravidla.",
|
|
@@ -444,6 +445,7 @@ var ERROR_MESSAGES = {
|
|
|
444
445
|
"be.storefront.paymentReconciliationInvalid": "\xDAdaje platebn\xED br\xE1ny neodpov\xEDdaj\xED objedn\xE1vce. Stav platby se nezm\u011Bnil.",
|
|
445
446
|
"be.storefront.paypalMissingCredentials": "Metod\u011B PayPal chyb\xED p\u0159ihla\u0161ovac\xED \xFAdaje.",
|
|
446
447
|
"be.storefront.paypalWebhookInvalid": "Notifikace PayPal nenese id objedn\xE1vky.",
|
|
448
|
+
"be.storefront.personalDiscountNotEligible": "Tento k\xF3d nelze pro tuto objedn\xE1vku pou\u017E\xEDt. Zkontrolujte e-mail p\u0159\xEDjemce a podm\xEDnku prvn\xED objedn\xE1vky.",
|
|
447
449
|
"be.storefront.phoneRequired": "K dokon\u010Den\xED objedn\xE1vky je pot\u0159eba telefonn\xED \u010D\xEDslo.",
|
|
448
450
|
"be.storefront.pickupPointCountryMismatch": "Vyberte v\xFDdejn\xED m\xEDsto v zemi doru\u010Den\xED.",
|
|
449
451
|
"be.storefront.pickupPointNotFound": "Vybran\xE9 v\xFDdejn\xED m\xEDsto dopravce nezn\xE1. Vyberte pros\xEDm jin\xE9.",
|
|
@@ -501,6 +503,8 @@ var ERROR_MESSAGES = {
|
|
|
501
503
|
"be.storefront.tokenInvalid": "Neplatn\xFD nebo pro\u0161l\xFD token.",
|
|
502
504
|
"be.storefront.tokenWrongEshop": "Token pro tento e-shop neplat\xED.",
|
|
503
505
|
"be.storefront.uniqueItemNoRestock": "Tento origin\xE1l se znovu vyr\xE1b\u011Bt nebude, hl\xEDdat ho nejde. Napi\u0161te n\xE1m, pokud chcete podobn\xFD.",
|
|
506
|
+
"be.storefront.uniqueQuantityInvalid": "Unik\xE1t se prod\xE1v\xE1 po jednom kusu. Nastavte minim\xE1ln\xED odb\u011Br a krok mno\u017Estv\xED na 1. U variant ozna\u010Dte jednotliv\xE9 kusy, ne cel\xFD spole\u010Dn\xFD produkt.",
|
|
507
|
+
"be.storefront.uniqueStockInvalid": "Unik\xE1t m\u016F\u017Ee m\xEDt na v\u0161ech skladech dohromady 0 nebo 1 kus. Nejd\u0159\xEDv opravte skladov\xE9 mno\u017Estv\xED.",
|
|
504
508
|
"be.storefront.unknownPaymentProvider": "Nezn\xE1m\xFD poskytovatel plateb {provider}.",
|
|
505
509
|
"be.storefront.variantsOnlyParent": "Produkt {name} nejde koupit p\u0159\xEDmo. Vyberte jednu z jeho variant.",
|
|
506
510
|
"be.storefront.wishlistItemNotFound": "Polo\u017Eka obl\xEDben\xFDch nenalezena.",
|
|
@@ -703,6 +707,7 @@ var ERROR_MESSAGES = {
|
|
|
703
707
|
"be.storefront.mollieMissingCredentials": "Met\xF3de Mollie ch\xFDba API k\u013E\xFA\u010D.",
|
|
704
708
|
"be.storefront.mollieWebhookInvalid": "Notifik\xE1cia Mollie nenesie id platby.",
|
|
705
709
|
"be.storefront.newCustomerNotEnrolled": "Nov\xFD z\xE1kazn\xEDk nie je v programe zap\xEDsan\xFD.",
|
|
710
|
+
"be.storefront.newsletterConfirmationInvalid": "Potvrdzovac\xED odkaz je neplatn\xFD alebo vypr\u0161al. Vy\u017Eiadajte si nov\xFD e-mail.",
|
|
706
711
|
"be.storefront.noConsentRecorded": "N\xE1v\u0161tevn\xEDk nem\xE1 zaznamenan\xFD s\xFAhlas.",
|
|
707
712
|
"be.storefront.noPickupPoints": "T\xE1to doprava nem\xE1 v\xFDdajn\xE9 miesta.",
|
|
708
713
|
"be.storefront.noReferralRules": "Program nem\xE1 nastaven\xE9 odpor\xFA\u010Dacie pravidl\xE1.",
|
|
@@ -731,6 +736,7 @@ var ERROR_MESSAGES = {
|
|
|
731
736
|
"be.storefront.paymentReconciliationInvalid": "\xDAdaje platobnej br\xE1ny nezodpovedaj\xFA objedn\xE1vke. Stav platby sa nezmenil.",
|
|
732
737
|
"be.storefront.paypalMissingCredentials": "Met\xF3de PayPal ch\xFDbaj\xFA prihlasovacie \xFAdaje.",
|
|
733
738
|
"be.storefront.paypalWebhookInvalid": "Notifik\xE1cia PayPal nenesie id objedn\xE1vky.",
|
|
739
|
+
"be.storefront.personalDiscountNotEligible": "Tento k\xF3d nemo\u017Eno pou\u017Ei\u0165 na t\xFAto objedn\xE1vku. Skontrolujte e-mail pr\xEDjemcu a podmienku prvej objedn\xE1vky.",
|
|
734
740
|
"be.storefront.phoneRequired": "Na dokon\u010Denie objedn\xE1vky je potrebn\xE9 telef\xF3nne \u010D\xEDslo.",
|
|
735
741
|
"be.storefront.pickupPointCountryMismatch": "Vyberte v\xFDdajn\xE9 miesto v krajine doru\u010Denia.",
|
|
736
742
|
"be.storefront.pickupPointNotFound": "Vybran\xE9 v\xFDdajn\xE9 miesto dopravca nepozn\xE1. Vyberte pros\xEDm in\xE9.",
|
|
@@ -788,6 +794,8 @@ var ERROR_MESSAGES = {
|
|
|
788
794
|
"be.storefront.tokenInvalid": "Neplatn\xFD alebo expirovan\xFD token.",
|
|
789
795
|
"be.storefront.tokenWrongEshop": "Token pre tento e-shop neplat\xED.",
|
|
790
796
|
"be.storefront.uniqueItemNoRestock": "Tento origin\xE1l sa znovu vyr\xE1ba\u0165 nebude, str\xE1\u017Ei\u0165 ho nejde. Nap\xED\u0161te n\xE1m, ak chcete podobn\xFD.",
|
|
797
|
+
"be.storefront.uniqueQuantityInvalid": "Unik\xE1t sa pred\xE1va po jednom kuse. Nastavte minim\xE1lny odber a krok mno\u017Estva na 1. Pri variantoch ozna\u010Dte jednotliv\xE9 kusy, nie cel\xFD spolo\u010Dn\xFD produkt.",
|
|
798
|
+
"be.storefront.uniqueStockInvalid": "Unik\xE1t m\xF4\u017Ee ma\u0165 na v\u0161etk\xFDch skladoch spolu 0 alebo 1 kus. Najprv opravte skladov\xE9 mno\u017Estvo.",
|
|
791
799
|
"be.storefront.unknownPaymentProvider": "Nezn\xE1my poskytovate\u013E platieb {provider}.",
|
|
792
800
|
"be.storefront.variantsOnlyParent": "Produkt {name} sa ned\xE1 k\xFApi\u0165 priamo. Vyberte jeden z jeho variantov.",
|
|
793
801
|
"be.storefront.wishlistItemNotFound": "Polo\u017Eka ob\u013E\xFAben\xFDch sa nena\u0161la.",
|
|
@@ -990,6 +998,7 @@ var ERROR_MESSAGES = {
|
|
|
990
998
|
"be.storefront.mollieMissingCredentials": "Mollie method is missing the API key",
|
|
991
999
|
"be.storefront.mollieWebhookInvalid": "Mollie webhook is missing the payment id",
|
|
992
1000
|
"be.storefront.newCustomerNotEnrolled": "New customer is not enrolled in this program",
|
|
1001
|
+
"be.storefront.newsletterConfirmationInvalid": "The confirmation link is invalid or expired. Request a new email.",
|
|
993
1002
|
"be.storefront.noConsentRecorded": "No consent recorded for this visitor",
|
|
994
1003
|
"be.storefront.noPickupPoints": "This shipping method has no pickup points",
|
|
995
1004
|
"be.storefront.noReferralRules": "No referral rules configured for this program",
|
|
@@ -1018,6 +1027,7 @@ var ERROR_MESSAGES = {
|
|
|
1018
1027
|
"be.storefront.paymentReconciliationInvalid": "The payment gateway data does not match the order. The payment status has not changed.",
|
|
1019
1028
|
"be.storefront.paypalMissingCredentials": "PayPal method is missing credentials",
|
|
1020
1029
|
"be.storefront.paypalWebhookInvalid": "PayPal webhook is missing the order id",
|
|
1030
|
+
"be.storefront.personalDiscountNotEligible": "This code is not eligible for this order. Check the recipient email and first-order requirement.",
|
|
1021
1031
|
"be.storefront.phoneRequired": "Phone number is required to place this order",
|
|
1022
1032
|
"be.storefront.pickupPointCountryMismatch": "Select a pickup point in the delivery country.",
|
|
1023
1033
|
"be.storefront.pickupPointNotFound": "The carrier does not know the selected pickup point. Please choose another one.",
|
|
@@ -1075,6 +1085,8 @@ var ERROR_MESSAGES = {
|
|
|
1075
1085
|
"be.storefront.tokenInvalid": "Invalid or expired token",
|
|
1076
1086
|
"be.storefront.tokenWrongEshop": "Token is not valid for this e-shop",
|
|
1077
1087
|
"be.storefront.uniqueItemNoRestock": "This one-of-a-kind piece will not be made again, so it cannot be watched. Contact us if you would like a similar one.",
|
|
1088
|
+
"be.storefront.uniqueQuantityInvalid": "A unique item is sold one piece at a time. Set the minimum order and quantity step to 1. Mark individual variants, not their shared parent product.",
|
|
1089
|
+
"be.storefront.uniqueStockInvalid": "A unique item can have a total stock of 0 or 1 across all warehouses. Correct the stock quantity first.",
|
|
1078
1090
|
"be.storefront.unknownPaymentProvider": "Unknown payment provider",
|
|
1079
1091
|
"be.storefront.variantsOnlyParent": "{name} cannot be purchased directly, choose one of its variants",
|
|
1080
1092
|
"be.storefront.wishlistItemNotFound": "Wishlist item not found",
|
|
@@ -1106,7 +1118,7 @@ var GENERIC = {
|
|
|
1106
1118
|
en: "Something went wrong, please try again."
|
|
1107
1119
|
};
|
|
1108
1120
|
function bodyOf(err2) {
|
|
1109
|
-
const body = err2 instanceof
|
|
1121
|
+
const body = err2 instanceof _chunkSBPQZG4Yjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
|
|
1110
1122
|
return body && typeof body === "object" ? body : null;
|
|
1111
1123
|
}
|
|
1112
1124
|
function errorCode(err2) {
|
|
@@ -1223,4 +1235,4 @@ function formFieldErrors(err2) {
|
|
|
1223
1235
|
|
|
1224
1236
|
|
|
1225
1237
|
|
|
1226
|
-
exports.AddressTypes =
|
|
1238
|
+
exports.AddressTypes = _chunkSBPQZG4Yjs.AddressTypes; exports.BehioApiError = _chunkSBPQZG4Yjs.BehioApiError; exports.BehioNetworkError = _chunkSBPQZG4Yjs.BehioNetworkError; exports.BehioStorefront = _chunkSBPQZG4Yjs.BehioStorefront; exports.FulfillmentStatuses = _chunkSBPQZG4Yjs.FulfillmentStatuses; exports.OrderStatuses = _chunkSBPQZG4Yjs.OrderStatuses; exports.PaymentStatuses = _chunkSBPQZG4Yjs.PaymentStatuses; exports.ProductSort = _chunkSBPQZG4Yjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.clearCartSummary = _chunkSBPQZG4Yjs.clearCartSummary; exports.err = _chunkSBPQZG4Yjs.err; exports.errorCode = errorCode; exports.errorMessage = errorMessage; exports.errorParams = errorParams; exports.findVariantByAttributes = findVariantByAttributes; exports.formFieldErrors = formFieldErrors; exports.formatPrice = formatPrice; exports.generateVisitorId = generateVisitorId; exports.getStoredVisitorId = getStoredVisitorId; exports.grantAnalyticsConsent = grantAnalyticsConsent; exports.ok = _chunkSBPQZG4Yjs.ok; exports.publishCartSummary = _chunkSBPQZG4Yjs.publishCartSummary; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkSBPQZG4Yjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
|
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ok,
|
|
13
13
|
publishCartSummary,
|
|
14
14
|
toSdkError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YDZ2OF4O.mjs";
|
|
16
16
|
|
|
17
17
|
// src/react/utils/format-price.ts
|
|
18
18
|
function formatPrice(amount, currency, locale, display) {
|
|
@@ -416,6 +416,7 @@ var ERROR_MESSAGES = {
|
|
|
416
416
|
"be.storefront.mollieMissingCredentials": "Metod\u011B Mollie chyb\xED API kl\xED\u010D.",
|
|
417
417
|
"be.storefront.mollieWebhookInvalid": "Notifikace Mollie nenese id platby.",
|
|
418
418
|
"be.storefront.newCustomerNotEnrolled": "Nov\xFD z\xE1kazn\xEDk nen\xED v programu zapsan\xFD.",
|
|
419
|
+
"be.storefront.newsletterConfirmationInvalid": "Potvrzovac\xED odkaz je neplatn\xFD nebo vypr\u0161el. Vy\u017E\xE1dejte si nov\xFD e-mail.",
|
|
419
420
|
"be.storefront.noConsentRecorded": "N\xE1v\u0161t\u011Bvn\xEDk nem\xE1 zaznamenan\xFD souhlas.",
|
|
420
421
|
"be.storefront.noPickupPoints": "Tato doprava nem\xE1 v\xFDdejn\xED m\xEDsta.",
|
|
421
422
|
"be.storefront.noReferralRules": "Program nem\xE1 nastaven\xE1 doporu\u010Dovac\xED pravidla.",
|
|
@@ -444,6 +445,7 @@ var ERROR_MESSAGES = {
|
|
|
444
445
|
"be.storefront.paymentReconciliationInvalid": "\xDAdaje platebn\xED br\xE1ny neodpov\xEDdaj\xED objedn\xE1vce. Stav platby se nezm\u011Bnil.",
|
|
445
446
|
"be.storefront.paypalMissingCredentials": "Metod\u011B PayPal chyb\xED p\u0159ihla\u0161ovac\xED \xFAdaje.",
|
|
446
447
|
"be.storefront.paypalWebhookInvalid": "Notifikace PayPal nenese id objedn\xE1vky.",
|
|
448
|
+
"be.storefront.personalDiscountNotEligible": "Tento k\xF3d nelze pro tuto objedn\xE1vku pou\u017E\xEDt. Zkontrolujte e-mail p\u0159\xEDjemce a podm\xEDnku prvn\xED objedn\xE1vky.",
|
|
447
449
|
"be.storefront.phoneRequired": "K dokon\u010Den\xED objedn\xE1vky je pot\u0159eba telefonn\xED \u010D\xEDslo.",
|
|
448
450
|
"be.storefront.pickupPointCountryMismatch": "Vyberte v\xFDdejn\xED m\xEDsto v zemi doru\u010Den\xED.",
|
|
449
451
|
"be.storefront.pickupPointNotFound": "Vybran\xE9 v\xFDdejn\xED m\xEDsto dopravce nezn\xE1. Vyberte pros\xEDm jin\xE9.",
|
|
@@ -501,6 +503,8 @@ var ERROR_MESSAGES = {
|
|
|
501
503
|
"be.storefront.tokenInvalid": "Neplatn\xFD nebo pro\u0161l\xFD token.",
|
|
502
504
|
"be.storefront.tokenWrongEshop": "Token pro tento e-shop neplat\xED.",
|
|
503
505
|
"be.storefront.uniqueItemNoRestock": "Tento origin\xE1l se znovu vyr\xE1b\u011Bt nebude, hl\xEDdat ho nejde. Napi\u0161te n\xE1m, pokud chcete podobn\xFD.",
|
|
506
|
+
"be.storefront.uniqueQuantityInvalid": "Unik\xE1t se prod\xE1v\xE1 po jednom kusu. Nastavte minim\xE1ln\xED odb\u011Br a krok mno\u017Estv\xED na 1. U variant ozna\u010Dte jednotliv\xE9 kusy, ne cel\xFD spole\u010Dn\xFD produkt.",
|
|
507
|
+
"be.storefront.uniqueStockInvalid": "Unik\xE1t m\u016F\u017Ee m\xEDt na v\u0161ech skladech dohromady 0 nebo 1 kus. Nejd\u0159\xEDv opravte skladov\xE9 mno\u017Estv\xED.",
|
|
504
508
|
"be.storefront.unknownPaymentProvider": "Nezn\xE1m\xFD poskytovatel plateb {provider}.",
|
|
505
509
|
"be.storefront.variantsOnlyParent": "Produkt {name} nejde koupit p\u0159\xEDmo. Vyberte jednu z jeho variant.",
|
|
506
510
|
"be.storefront.wishlistItemNotFound": "Polo\u017Eka obl\xEDben\xFDch nenalezena.",
|
|
@@ -703,6 +707,7 @@ var ERROR_MESSAGES = {
|
|
|
703
707
|
"be.storefront.mollieMissingCredentials": "Met\xF3de Mollie ch\xFDba API k\u013E\xFA\u010D.",
|
|
704
708
|
"be.storefront.mollieWebhookInvalid": "Notifik\xE1cia Mollie nenesie id platby.",
|
|
705
709
|
"be.storefront.newCustomerNotEnrolled": "Nov\xFD z\xE1kazn\xEDk nie je v programe zap\xEDsan\xFD.",
|
|
710
|
+
"be.storefront.newsletterConfirmationInvalid": "Potvrdzovac\xED odkaz je neplatn\xFD alebo vypr\u0161al. Vy\u017Eiadajte si nov\xFD e-mail.",
|
|
706
711
|
"be.storefront.noConsentRecorded": "N\xE1v\u0161tevn\xEDk nem\xE1 zaznamenan\xFD s\xFAhlas.",
|
|
707
712
|
"be.storefront.noPickupPoints": "T\xE1to doprava nem\xE1 v\xFDdajn\xE9 miesta.",
|
|
708
713
|
"be.storefront.noReferralRules": "Program nem\xE1 nastaven\xE9 odpor\xFA\u010Dacie pravidl\xE1.",
|
|
@@ -731,6 +736,7 @@ var ERROR_MESSAGES = {
|
|
|
731
736
|
"be.storefront.paymentReconciliationInvalid": "\xDAdaje platobnej br\xE1ny nezodpovedaj\xFA objedn\xE1vke. Stav platby sa nezmenil.",
|
|
732
737
|
"be.storefront.paypalMissingCredentials": "Met\xF3de PayPal ch\xFDbaj\xFA prihlasovacie \xFAdaje.",
|
|
733
738
|
"be.storefront.paypalWebhookInvalid": "Notifik\xE1cia PayPal nenesie id objedn\xE1vky.",
|
|
739
|
+
"be.storefront.personalDiscountNotEligible": "Tento k\xF3d nemo\u017Eno pou\u017Ei\u0165 na t\xFAto objedn\xE1vku. Skontrolujte e-mail pr\xEDjemcu a podmienku prvej objedn\xE1vky.",
|
|
734
740
|
"be.storefront.phoneRequired": "Na dokon\u010Denie objedn\xE1vky je potrebn\xE9 telef\xF3nne \u010D\xEDslo.",
|
|
735
741
|
"be.storefront.pickupPointCountryMismatch": "Vyberte v\xFDdajn\xE9 miesto v krajine doru\u010Denia.",
|
|
736
742
|
"be.storefront.pickupPointNotFound": "Vybran\xE9 v\xFDdajn\xE9 miesto dopravca nepozn\xE1. Vyberte pros\xEDm in\xE9.",
|
|
@@ -788,6 +794,8 @@ var ERROR_MESSAGES = {
|
|
|
788
794
|
"be.storefront.tokenInvalid": "Neplatn\xFD alebo expirovan\xFD token.",
|
|
789
795
|
"be.storefront.tokenWrongEshop": "Token pre tento e-shop neplat\xED.",
|
|
790
796
|
"be.storefront.uniqueItemNoRestock": "Tento origin\xE1l sa znovu vyr\xE1ba\u0165 nebude, str\xE1\u017Ei\u0165 ho nejde. Nap\xED\u0161te n\xE1m, ak chcete podobn\xFD.",
|
|
797
|
+
"be.storefront.uniqueQuantityInvalid": "Unik\xE1t sa pred\xE1va po jednom kuse. Nastavte minim\xE1lny odber a krok mno\u017Estva na 1. Pri variantoch ozna\u010Dte jednotliv\xE9 kusy, nie cel\xFD spolo\u010Dn\xFD produkt.",
|
|
798
|
+
"be.storefront.uniqueStockInvalid": "Unik\xE1t m\xF4\u017Ee ma\u0165 na v\u0161etk\xFDch skladoch spolu 0 alebo 1 kus. Najprv opravte skladov\xE9 mno\u017Estvo.",
|
|
791
799
|
"be.storefront.unknownPaymentProvider": "Nezn\xE1my poskytovate\u013E platieb {provider}.",
|
|
792
800
|
"be.storefront.variantsOnlyParent": "Produkt {name} sa ned\xE1 k\xFApi\u0165 priamo. Vyberte jeden z jeho variantov.",
|
|
793
801
|
"be.storefront.wishlistItemNotFound": "Polo\u017Eka ob\u013E\xFAben\xFDch sa nena\u0161la.",
|
|
@@ -990,6 +998,7 @@ var ERROR_MESSAGES = {
|
|
|
990
998
|
"be.storefront.mollieMissingCredentials": "Mollie method is missing the API key",
|
|
991
999
|
"be.storefront.mollieWebhookInvalid": "Mollie webhook is missing the payment id",
|
|
992
1000
|
"be.storefront.newCustomerNotEnrolled": "New customer is not enrolled in this program",
|
|
1001
|
+
"be.storefront.newsletterConfirmationInvalid": "The confirmation link is invalid or expired. Request a new email.",
|
|
993
1002
|
"be.storefront.noConsentRecorded": "No consent recorded for this visitor",
|
|
994
1003
|
"be.storefront.noPickupPoints": "This shipping method has no pickup points",
|
|
995
1004
|
"be.storefront.noReferralRules": "No referral rules configured for this program",
|
|
@@ -1018,6 +1027,7 @@ var ERROR_MESSAGES = {
|
|
|
1018
1027
|
"be.storefront.paymentReconciliationInvalid": "The payment gateway data does not match the order. The payment status has not changed.",
|
|
1019
1028
|
"be.storefront.paypalMissingCredentials": "PayPal method is missing credentials",
|
|
1020
1029
|
"be.storefront.paypalWebhookInvalid": "PayPal webhook is missing the order id",
|
|
1030
|
+
"be.storefront.personalDiscountNotEligible": "This code is not eligible for this order. Check the recipient email and first-order requirement.",
|
|
1021
1031
|
"be.storefront.phoneRequired": "Phone number is required to place this order",
|
|
1022
1032
|
"be.storefront.pickupPointCountryMismatch": "Select a pickup point in the delivery country.",
|
|
1023
1033
|
"be.storefront.pickupPointNotFound": "The carrier does not know the selected pickup point. Please choose another one.",
|
|
@@ -1075,6 +1085,8 @@ var ERROR_MESSAGES = {
|
|
|
1075
1085
|
"be.storefront.tokenInvalid": "Invalid or expired token",
|
|
1076
1086
|
"be.storefront.tokenWrongEshop": "Token is not valid for this e-shop",
|
|
1077
1087
|
"be.storefront.uniqueItemNoRestock": "This one-of-a-kind piece will not be made again, so it cannot be watched. Contact us if you would like a similar one.",
|
|
1088
|
+
"be.storefront.uniqueQuantityInvalid": "A unique item is sold one piece at a time. Set the minimum order and quantity step to 1. Mark individual variants, not their shared parent product.",
|
|
1089
|
+
"be.storefront.uniqueStockInvalid": "A unique item can have a total stock of 0 or 1 across all warehouses. Correct the stock quantity first.",
|
|
1078
1090
|
"be.storefront.unknownPaymentProvider": "Unknown payment provider",
|
|
1079
1091
|
"be.storefront.variantsOnlyParent": "{name} cannot be purchased directly, choose one of its variants",
|
|
1080
1092
|
"be.storefront.wishlistItemNotFound": "Wishlist item not found",
|
package/dist/next.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as BehioStorefrontConfig, B as BehioStorefront } from './client-
|
|
1
|
+
import { q as BehioStorefrontConfig, B as BehioStorefront } from './client-CAPtdqzd.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 { q as BehioStorefrontConfig, B as BehioStorefront } from './client-
|
|
1
|
+
import { q as BehioStorefrontConfig, B as BehioStorefront } from './client-CAPtdqzd.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
|
|
3
|
+
var _chunkSBPQZG4Yjs = require('./chunk-SBPQZG4Y.js');
|
|
4
4
|
|
|
5
5
|
// src/next.ts
|
|
6
6
|
var _headers = require('next/headers');
|
|
@@ -19,7 +19,7 @@ async function getBehio(options = {}) {
|
|
|
19
19
|
const locale = _nullishCoalesce(options.locale, () => ( process.env.BEHIO_LOCALE));
|
|
20
20
|
const currency = _nullishCoalesce(options.currency, () => ( process.env.BEHIO_CURRENCY));
|
|
21
21
|
const cookieName = _nullishCoalesce(options.cartCookieName, () => ( CART_COOKIE_NAME));
|
|
22
|
-
const client = new (0,
|
|
22
|
+
const client = new (0, _chunkSBPQZG4Yjs.BehioStorefront)({
|
|
23
23
|
apiKey,
|
|
24
24
|
...baseUrl ? { baseUrl } : {},
|
|
25
25
|
...locale ? { locale } : {},
|
package/dist/next.mjs
CHANGED
package/dist/react.d.mts
CHANGED
|
@@ -360,9 +360,16 @@ interface NewsletterSubscribeInput {
|
|
|
360
360
|
}
|
|
361
361
|
interface NewsletterSubscribeResult {
|
|
362
362
|
success: boolean;
|
|
363
|
+
/** Confirm the email before the subscription becomes active. */
|
|
364
|
+
confirmationRequired?: boolean;
|
|
363
365
|
/** True when this email was already an active subscriber. */
|
|
364
366
|
alreadySubscribed: boolean;
|
|
365
367
|
}
|
|
368
|
+
interface NewsletterConfirmResult {
|
|
369
|
+
success: boolean;
|
|
370
|
+
/** The actual code is delivered by email, never returned to the browser. */
|
|
371
|
+
welcomeDiscountIssued: boolean;
|
|
372
|
+
}
|
|
366
373
|
interface NewsletterUnsubscribeResult {
|
|
367
374
|
success: boolean;
|
|
368
375
|
}
|
|
@@ -1427,6 +1434,11 @@ interface CartItemProduct {
|
|
|
1427
1434
|
orderQuantityStep?: number | null;
|
|
1428
1435
|
}
|
|
1429
1436
|
interface CartItem {
|
|
1437
|
+
/** Extras allocated to this exact main cart line. Older servers omit it. */
|
|
1438
|
+
addonSelections?: Array<{
|
|
1439
|
+
productId: string;
|
|
1440
|
+
quantity: number;
|
|
1441
|
+
}>;
|
|
1430
1442
|
id: string;
|
|
1431
1443
|
/** A retained row can be unavailable after the merchant changes its offer. */
|
|
1432
1444
|
isPurchasable: boolean;
|
|
@@ -1615,7 +1627,9 @@ interface GiftCardSummary {
|
|
|
1615
1627
|
}
|
|
1616
1628
|
/** Atomic multi-product purchase; every product is validated before any line changes. */
|
|
1617
1629
|
interface AddToCartItemsInput {
|
|
1618
|
-
items: AddToCartInput
|
|
1630
|
+
items: Array<AddToCartInput & {
|
|
1631
|
+
assignToProductId?: string;
|
|
1632
|
+
}>;
|
|
1619
1633
|
}
|
|
1620
1634
|
interface AddToCartInput {
|
|
1621
1635
|
/**
|
|
@@ -4018,6 +4032,8 @@ declare class CartModule {
|
|
|
4018
4032
|
addItems(input: AddToCartItemsInput): Promise<SdkResult<Cart & {
|
|
4019
4033
|
newSessionToken?: string;
|
|
4020
4034
|
}>>;
|
|
4035
|
+
/** Idempotent selection of one extra package for a particular main cart line. */
|
|
4036
|
+
setAddon(itemId: string, productId: string, selected: boolean): Promise<SdkResult<Cart>>;
|
|
4021
4037
|
/**
|
|
4022
4038
|
* Switch the CART currency server-side. The backend re-prices every line in
|
|
4023
4039
|
* the new currency (no FX conversion: a product must have a price configured
|
|
@@ -4652,6 +4668,7 @@ declare class NewsletterModule {
|
|
|
4652
4668
|
private client;
|
|
4653
4669
|
constructor(client: BehioStorefront);
|
|
4654
4670
|
subscribe(input: NewsletterSubscribeInput): Promise<SdkResult<NewsletterSubscribeResult>>;
|
|
4671
|
+
confirm(token: string): Promise<SdkResult<NewsletterConfirmResult>>;
|
|
4655
4672
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
4656
4673
|
}
|
|
4657
4674
|
|
|
@@ -4830,6 +4847,11 @@ declare function useCart(options?: UseCartOptions): {
|
|
|
4830
4847
|
addItems: _tanstack_react_query.UseMutateAsyncFunction<Cart & {
|
|
4831
4848
|
newSessionToken?: string;
|
|
4832
4849
|
}, Error, AddToCartItemsInput, void>;
|
|
4850
|
+
setAddon: _tanstack_react_query.UseMutateAsyncFunction<Cart, Error, {
|
|
4851
|
+
itemId: string;
|
|
4852
|
+
productId: string;
|
|
4853
|
+
selected: boolean;
|
|
4854
|
+
}, void>;
|
|
4833
4855
|
updateQuantity: (itemId: string, quantity: number) => Promise<Cart>;
|
|
4834
4856
|
removeItem: (itemId: string) => Promise<Cart>;
|
|
4835
4857
|
clear: () => Promise<void>;
|
|
@@ -5363,6 +5385,8 @@ declare function useAnalyticsEvents(): {
|
|
|
5363
5385
|
declare function useNewsletterSubscribe(): _tanstack_react_query.UseMutationResult<NewsletterSubscribeResult, Error, NewsletterSubscribeInput, unknown>;
|
|
5364
5386
|
/** Unsubscribe an email from the shop newsletter (idempotent). */
|
|
5365
5387
|
declare function useNewsletterUnsubscribe(): _tanstack_react_query.UseMutationResult<NewsletterUnsubscribeResult, Error, string, unknown>;
|
|
5388
|
+
/** Explicit confirmation only. Never call on page load or link prefetch. */
|
|
5389
|
+
declare function useNewsletterConfirm(): _tanstack_react_query.UseMutationResult<NewsletterConfirmResult, Error, string, unknown>;
|
|
5366
5390
|
|
|
5367
5391
|
interface UseOrdersOptions {
|
|
5368
5392
|
page?: number;
|
|
@@ -6400,4 +6424,4 @@ declare function revokeAnalyticsConsent(client: BehioStorefront): Promise<SdkRes
|
|
|
6400
6424
|
success: boolean;
|
|
6401
6425
|
}>>;
|
|
6402
6426
|
|
|
6403
|
-
export { type ActivePromotion, type AddToCartInput, type AnalyticsEventInput, type AuthTokens, BehioAnalyticsTracker, BehioApiError, BehioProvider, type BehioProviderProps, type Blog, type BlogPostDetail, type BlogPostListItem, type BlogPostsPage, type BlogPostsQuery, type BlogSettings, type BlogTag, type Booking, type BookingCategory, type BookingConfig, type BookingCreateInput, type BookingCreated, type BookingLocale, type BookingLocation, type BookingManageSlotsQuery, type BookingService, type BookingSlot, type BookingSlots, type BookingSlotsQuery, type BookingStaff, type BookingStatus, type Bundle, type BundleItem, type Cart, type CartDiscount, type CartItem, type Category, type CategoryDetail, type CheckoutAddress, type CheckoutInput, type CheckoutPaymentMethod, type CookieConsent, type CookieConsentInput, type CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, type CustomerAddress, type CustomerProfile, type EcommerceEventName, type EcommerceItem, type EcommercePayload, type Facet, type FacetRange, type FacetValue, type FacetsResponse, type FilterField, type FulfillmentStatus, type GiftCardBalance, type LoginInput, type MessageResponse, type OrderDetail, type OrderItem, type OrderListItem, type OrderStatus, type Page, type PageAttachment, type PageDetail, type PaginatedResponse, type PaymentInstrument, type PaymentStatus, type PaymentSwift, type PersonalOffer, type ProductDetail, type ProductLabel, type ProductListItem, type ProductParameter, type ProductParameterGroup, type ProductParametersResponse, type ProductPrice, type ProductReview, type ProductReviewsResponse, type ProductVariant, type ProductsQuery, type QuoteRequest, type RegisterInput, type ReturnRequest, RichText, type RichTextProps, type ShopInfo, type ShopSeo, type SiteFormField, type SiteFormFieldOption, type SiteFormFieldType, type StorageAdapter, type StorefrontForm, type StorefrontFormFieldError, type StorefrontFormFieldErrorCode, type StorefrontFormSettings, type StorefrontFormSubmitInput, type StorefrontFormSubmitResult, StorefrontScripts, type StorefrontScriptsProps, type SubmitQuoteInput, type SubmitReturnInput, type SubmitReviewInput, type SubmitWithdrawalInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseBlogPostOptions, type UseBlogPostsOptions, type UseBlogsOptions, type UseBookingsOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCertificateVerificationOptions, type UseCollectionOptions, type UseCourseCertificatesOptions, type UseCourseOptions, type UseCoursesOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFacetsOptions, type UseFaqOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseLessonCommentsOptions, type UseLessonNoteOptions, type UseLessonQuizOptions, type UseLessonTutorOptions, type UseLoyaltyOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UsePaymentMethodsOptions, type UsePersonalOffersOptions, type UseProductOptions, type UseProductParametersOptions, type UseProductsOptions, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingQuoteOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, type UseSiteFormOptions, type UseSubscriptionsOptions, type UseVisitorMessagesOptions, type VisitorMessage, type WishlistItem, type WithdrawalAcknowledgement, type WithdrawalWindow, cookieStorage, createMemoryStorage, detectStorage, formatPrice, generateVisitorId, getStoredVisitorId, grantAnalyticsConsent, localStorageAdapter, memoryStorage, revokeAnalyticsConsent, trackEcommerceEvent, useAddressAutocomplete, useAddresses, useAnalyticsEvents, useAuth, useBehio, useBehioClient, useBlogPost, useBlogPosts, useBlogs, useBookingConfig, useBookingSlots, useBundle, useBundles, useCancelBooking, useCart, useCartCount, useCategories, useCategory, useCertificateVerification, useCheckout, useCheckoutPreview, useCollection, useCollectionItem, useCookieConsent, useCourse, useCourseCertificates, useCourses, useCreateBooking, useCrossSell, useCurrency, useCustomer, useFacets, useFaqGroup, useFaqGroups, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLessonComments, useLessonNote, useLessonQuiz, useLessonTutor, useLookupReturnableOrder, useLoyalty, useManagedBooking, useManagedBookingSlots, useMenu, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePaymentMethods, usePersonalOffers, usePickupPoints, useProduct, useProductGroup, useProductParameters, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useRescheduleBooking, useReturnStatus, useSearch, useShippingMethods, useShippingQuote, useShopInfo, useShopScripts, useShopSeo, useSiteForm, useSiteFormSubmit, useSubmitQuote, useSubmitReturn, useSubmitReview, useSubmitWithdrawal, useSubscriptions, useVisitorMessages, useWishlist };
|
|
6427
|
+
export { type ActivePromotion, type AddToCartInput, type AnalyticsEventInput, type AuthTokens, BehioAnalyticsTracker, BehioApiError, BehioProvider, type BehioProviderProps, type Blog, type BlogPostDetail, type BlogPostListItem, type BlogPostsPage, type BlogPostsQuery, type BlogSettings, type BlogTag, type Booking, type BookingCategory, type BookingConfig, type BookingCreateInput, type BookingCreated, type BookingLocale, type BookingLocation, type BookingManageSlotsQuery, type BookingService, type BookingSlot, type BookingSlots, type BookingSlotsQuery, type BookingStaff, type BookingStatus, type Bundle, type BundleItem, type Cart, type CartDiscount, type CartItem, type Category, type CategoryDetail, type CheckoutAddress, type CheckoutInput, type CheckoutPaymentMethod, type CookieConsent, type CookieConsentInput, type CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, type CustomerAddress, type CustomerProfile, type EcommerceEventName, type EcommerceItem, type EcommercePayload, type Facet, type FacetRange, type FacetValue, type FacetsResponse, type FilterField, type FulfillmentStatus, type GiftCardBalance, type LoginInput, type MessageResponse, type OrderDetail, type OrderItem, type OrderListItem, type OrderStatus, type Page, type PageAttachment, type PageDetail, type PaginatedResponse, type PaymentInstrument, type PaymentStatus, type PaymentSwift, type PersonalOffer, type ProductDetail, type ProductLabel, type ProductListItem, type ProductParameter, type ProductParameterGroup, type ProductParametersResponse, type ProductPrice, type ProductReview, type ProductReviewsResponse, type ProductVariant, type ProductsQuery, type QuoteRequest, type RegisterInput, type ReturnRequest, RichText, type RichTextProps, type ShopInfo, type ShopSeo, type SiteFormField, type SiteFormFieldOption, type SiteFormFieldType, type StorageAdapter, type StorefrontForm, type StorefrontFormFieldError, type StorefrontFormFieldErrorCode, type StorefrontFormSettings, type StorefrontFormSubmitInput, type StorefrontFormSubmitResult, StorefrontScripts, type StorefrontScriptsProps, type SubmitQuoteInput, type SubmitReturnInput, type SubmitReviewInput, type SubmitWithdrawalInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseBlogPostOptions, type UseBlogPostsOptions, type UseBlogsOptions, type UseBookingsOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCertificateVerificationOptions, type UseCollectionOptions, type UseCourseCertificatesOptions, type UseCourseOptions, type UseCoursesOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFacetsOptions, type UseFaqOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseLessonCommentsOptions, type UseLessonNoteOptions, type UseLessonQuizOptions, type UseLessonTutorOptions, type UseLoyaltyOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UsePaymentMethodsOptions, type UsePersonalOffersOptions, type UseProductOptions, type UseProductParametersOptions, type UseProductsOptions, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingQuoteOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, type UseSiteFormOptions, type UseSubscriptionsOptions, type UseVisitorMessagesOptions, type VisitorMessage, type WishlistItem, type WithdrawalAcknowledgement, type WithdrawalWindow, cookieStorage, createMemoryStorage, detectStorage, formatPrice, generateVisitorId, getStoredVisitorId, grantAnalyticsConsent, localStorageAdapter, memoryStorage, revokeAnalyticsConsent, trackEcommerceEvent, useAddressAutocomplete, useAddresses, useAnalyticsEvents, useAuth, useBehio, useBehioClient, useBlogPost, useBlogPosts, useBlogs, useBookingConfig, useBookingSlots, useBundle, useBundles, useCancelBooking, useCart, useCartCount, useCategories, useCategory, useCertificateVerification, useCheckout, useCheckoutPreview, useCollection, useCollectionItem, useCookieConsent, useCourse, useCourseCertificates, useCourses, useCreateBooking, useCrossSell, useCurrency, useCustomer, useFacets, useFaqGroup, useFaqGroups, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLessonComments, useLessonNote, useLessonQuiz, useLessonTutor, useLookupReturnableOrder, useLoyalty, useManagedBooking, useManagedBookingSlots, useMenu, useNewsletterConfirm, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePaymentMethods, usePersonalOffers, usePickupPoints, useProduct, useProductGroup, useProductParameters, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useRescheduleBooking, useReturnStatus, useSearch, useShippingMethods, useShippingQuote, useShopInfo, useShopScripts, useShopSeo, useSiteForm, useSiteFormSubmit, useSubmitQuote, useSubmitReturn, useSubmitReview, useSubmitWithdrawal, useSubscriptions, useVisitorMessages, useWishlist };
|
package/dist/react.d.ts
CHANGED
|
@@ -360,9 +360,16 @@ interface NewsletterSubscribeInput {
|
|
|
360
360
|
}
|
|
361
361
|
interface NewsletterSubscribeResult {
|
|
362
362
|
success: boolean;
|
|
363
|
+
/** Confirm the email before the subscription becomes active. */
|
|
364
|
+
confirmationRequired?: boolean;
|
|
363
365
|
/** True when this email was already an active subscriber. */
|
|
364
366
|
alreadySubscribed: boolean;
|
|
365
367
|
}
|
|
368
|
+
interface NewsletterConfirmResult {
|
|
369
|
+
success: boolean;
|
|
370
|
+
/** The actual code is delivered by email, never returned to the browser. */
|
|
371
|
+
welcomeDiscountIssued: boolean;
|
|
372
|
+
}
|
|
366
373
|
interface NewsletterUnsubscribeResult {
|
|
367
374
|
success: boolean;
|
|
368
375
|
}
|
|
@@ -1427,6 +1434,11 @@ interface CartItemProduct {
|
|
|
1427
1434
|
orderQuantityStep?: number | null;
|
|
1428
1435
|
}
|
|
1429
1436
|
interface CartItem {
|
|
1437
|
+
/** Extras allocated to this exact main cart line. Older servers omit it. */
|
|
1438
|
+
addonSelections?: Array<{
|
|
1439
|
+
productId: string;
|
|
1440
|
+
quantity: number;
|
|
1441
|
+
}>;
|
|
1430
1442
|
id: string;
|
|
1431
1443
|
/** A retained row can be unavailable after the merchant changes its offer. */
|
|
1432
1444
|
isPurchasable: boolean;
|
|
@@ -1615,7 +1627,9 @@ interface GiftCardSummary {
|
|
|
1615
1627
|
}
|
|
1616
1628
|
/** Atomic multi-product purchase; every product is validated before any line changes. */
|
|
1617
1629
|
interface AddToCartItemsInput {
|
|
1618
|
-
items: AddToCartInput
|
|
1630
|
+
items: Array<AddToCartInput & {
|
|
1631
|
+
assignToProductId?: string;
|
|
1632
|
+
}>;
|
|
1619
1633
|
}
|
|
1620
1634
|
interface AddToCartInput {
|
|
1621
1635
|
/**
|
|
@@ -4018,6 +4032,8 @@ declare class CartModule {
|
|
|
4018
4032
|
addItems(input: AddToCartItemsInput): Promise<SdkResult<Cart & {
|
|
4019
4033
|
newSessionToken?: string;
|
|
4020
4034
|
}>>;
|
|
4035
|
+
/** Idempotent selection of one extra package for a particular main cart line. */
|
|
4036
|
+
setAddon(itemId: string, productId: string, selected: boolean): Promise<SdkResult<Cart>>;
|
|
4021
4037
|
/**
|
|
4022
4038
|
* Switch the CART currency server-side. The backend re-prices every line in
|
|
4023
4039
|
* the new currency (no FX conversion: a product must have a price configured
|
|
@@ -4652,6 +4668,7 @@ declare class NewsletterModule {
|
|
|
4652
4668
|
private client;
|
|
4653
4669
|
constructor(client: BehioStorefront);
|
|
4654
4670
|
subscribe(input: NewsletterSubscribeInput): Promise<SdkResult<NewsletterSubscribeResult>>;
|
|
4671
|
+
confirm(token: string): Promise<SdkResult<NewsletterConfirmResult>>;
|
|
4655
4672
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
4656
4673
|
}
|
|
4657
4674
|
|
|
@@ -4830,6 +4847,11 @@ declare function useCart(options?: UseCartOptions): {
|
|
|
4830
4847
|
addItems: _tanstack_react_query.UseMutateAsyncFunction<Cart & {
|
|
4831
4848
|
newSessionToken?: string;
|
|
4832
4849
|
}, Error, AddToCartItemsInput, void>;
|
|
4850
|
+
setAddon: _tanstack_react_query.UseMutateAsyncFunction<Cart, Error, {
|
|
4851
|
+
itemId: string;
|
|
4852
|
+
productId: string;
|
|
4853
|
+
selected: boolean;
|
|
4854
|
+
}, void>;
|
|
4833
4855
|
updateQuantity: (itemId: string, quantity: number) => Promise<Cart>;
|
|
4834
4856
|
removeItem: (itemId: string) => Promise<Cart>;
|
|
4835
4857
|
clear: () => Promise<void>;
|
|
@@ -5363,6 +5385,8 @@ declare function useAnalyticsEvents(): {
|
|
|
5363
5385
|
declare function useNewsletterSubscribe(): _tanstack_react_query.UseMutationResult<NewsletterSubscribeResult, Error, NewsletterSubscribeInput, unknown>;
|
|
5364
5386
|
/** Unsubscribe an email from the shop newsletter (idempotent). */
|
|
5365
5387
|
declare function useNewsletterUnsubscribe(): _tanstack_react_query.UseMutationResult<NewsletterUnsubscribeResult, Error, string, unknown>;
|
|
5388
|
+
/** Explicit confirmation only. Never call on page load or link prefetch. */
|
|
5389
|
+
declare function useNewsletterConfirm(): _tanstack_react_query.UseMutationResult<NewsletterConfirmResult, Error, string, unknown>;
|
|
5366
5390
|
|
|
5367
5391
|
interface UseOrdersOptions {
|
|
5368
5392
|
page?: number;
|
|
@@ -6400,4 +6424,4 @@ declare function revokeAnalyticsConsent(client: BehioStorefront): Promise<SdkRes
|
|
|
6400
6424
|
success: boolean;
|
|
6401
6425
|
}>>;
|
|
6402
6426
|
|
|
6403
|
-
export { type ActivePromotion, type AddToCartInput, type AnalyticsEventInput, type AuthTokens, BehioAnalyticsTracker, BehioApiError, BehioProvider, type BehioProviderProps, type Blog, type BlogPostDetail, type BlogPostListItem, type BlogPostsPage, type BlogPostsQuery, type BlogSettings, type BlogTag, type Booking, type BookingCategory, type BookingConfig, type BookingCreateInput, type BookingCreated, type BookingLocale, type BookingLocation, type BookingManageSlotsQuery, type BookingService, type BookingSlot, type BookingSlots, type BookingSlotsQuery, type BookingStaff, type BookingStatus, type Bundle, type BundleItem, type Cart, type CartDiscount, type CartItem, type Category, type CategoryDetail, type CheckoutAddress, type CheckoutInput, type CheckoutPaymentMethod, type CookieConsent, type CookieConsentInput, type CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, type CustomerAddress, type CustomerProfile, type EcommerceEventName, type EcommerceItem, type EcommercePayload, type Facet, type FacetRange, type FacetValue, type FacetsResponse, type FilterField, type FulfillmentStatus, type GiftCardBalance, type LoginInput, type MessageResponse, type OrderDetail, type OrderItem, type OrderListItem, type OrderStatus, type Page, type PageAttachment, type PageDetail, type PaginatedResponse, type PaymentInstrument, type PaymentStatus, type PaymentSwift, type PersonalOffer, type ProductDetail, type ProductLabel, type ProductListItem, type ProductParameter, type ProductParameterGroup, type ProductParametersResponse, type ProductPrice, type ProductReview, type ProductReviewsResponse, type ProductVariant, type ProductsQuery, type QuoteRequest, type RegisterInput, type ReturnRequest, RichText, type RichTextProps, type ShopInfo, type ShopSeo, type SiteFormField, type SiteFormFieldOption, type SiteFormFieldType, type StorageAdapter, type StorefrontForm, type StorefrontFormFieldError, type StorefrontFormFieldErrorCode, type StorefrontFormSettings, type StorefrontFormSubmitInput, type StorefrontFormSubmitResult, StorefrontScripts, type StorefrontScriptsProps, type SubmitQuoteInput, type SubmitReturnInput, type SubmitReviewInput, type SubmitWithdrawalInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseBlogPostOptions, type UseBlogPostsOptions, type UseBlogsOptions, type UseBookingsOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCertificateVerificationOptions, type UseCollectionOptions, type UseCourseCertificatesOptions, type UseCourseOptions, type UseCoursesOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFacetsOptions, type UseFaqOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseLessonCommentsOptions, type UseLessonNoteOptions, type UseLessonQuizOptions, type UseLessonTutorOptions, type UseLoyaltyOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UsePaymentMethodsOptions, type UsePersonalOffersOptions, type UseProductOptions, type UseProductParametersOptions, type UseProductsOptions, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingQuoteOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, type UseSiteFormOptions, type UseSubscriptionsOptions, type UseVisitorMessagesOptions, type VisitorMessage, type WishlistItem, type WithdrawalAcknowledgement, type WithdrawalWindow, cookieStorage, createMemoryStorage, detectStorage, formatPrice, generateVisitorId, getStoredVisitorId, grantAnalyticsConsent, localStorageAdapter, memoryStorage, revokeAnalyticsConsent, trackEcommerceEvent, useAddressAutocomplete, useAddresses, useAnalyticsEvents, useAuth, useBehio, useBehioClient, useBlogPost, useBlogPosts, useBlogs, useBookingConfig, useBookingSlots, useBundle, useBundles, useCancelBooking, useCart, useCartCount, useCategories, useCategory, useCertificateVerification, useCheckout, useCheckoutPreview, useCollection, useCollectionItem, useCookieConsent, useCourse, useCourseCertificates, useCourses, useCreateBooking, useCrossSell, useCurrency, useCustomer, useFacets, useFaqGroup, useFaqGroups, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLessonComments, useLessonNote, useLessonQuiz, useLessonTutor, useLookupReturnableOrder, useLoyalty, useManagedBooking, useManagedBookingSlots, useMenu, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePaymentMethods, usePersonalOffers, usePickupPoints, useProduct, useProductGroup, useProductParameters, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useRescheduleBooking, useReturnStatus, useSearch, useShippingMethods, useShippingQuote, useShopInfo, useShopScripts, useShopSeo, useSiteForm, useSiteFormSubmit, useSubmitQuote, useSubmitReturn, useSubmitReview, useSubmitWithdrawal, useSubscriptions, useVisitorMessages, useWishlist };
|
|
6427
|
+
export { type ActivePromotion, type AddToCartInput, type AnalyticsEventInput, type AuthTokens, BehioAnalyticsTracker, BehioApiError, BehioProvider, type BehioProviderProps, type Blog, type BlogPostDetail, type BlogPostListItem, type BlogPostsPage, type BlogPostsQuery, type BlogSettings, type BlogTag, type Booking, type BookingCategory, type BookingConfig, type BookingCreateInput, type BookingCreated, type BookingLocale, type BookingLocation, type BookingManageSlotsQuery, type BookingService, type BookingSlot, type BookingSlots, type BookingSlotsQuery, type BookingStaff, type BookingStatus, type Bundle, type BundleItem, type Cart, type CartDiscount, type CartItem, type Category, type CategoryDetail, type CheckoutAddress, type CheckoutInput, type CheckoutPaymentMethod, type CookieConsent, type CookieConsentInput, type CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, type CustomerAddress, type CustomerProfile, type EcommerceEventName, type EcommerceItem, type EcommercePayload, type Facet, type FacetRange, type FacetValue, type FacetsResponse, type FilterField, type FulfillmentStatus, type GiftCardBalance, type LoginInput, type MessageResponse, type OrderDetail, type OrderItem, type OrderListItem, type OrderStatus, type Page, type PageAttachment, type PageDetail, type PaginatedResponse, type PaymentInstrument, type PaymentStatus, type PaymentSwift, type PersonalOffer, type ProductDetail, type ProductLabel, type ProductListItem, type ProductParameter, type ProductParameterGroup, type ProductParametersResponse, type ProductPrice, type ProductReview, type ProductReviewsResponse, type ProductVariant, type ProductsQuery, type QuoteRequest, type RegisterInput, type ReturnRequest, RichText, type RichTextProps, type ShopInfo, type ShopSeo, type SiteFormField, type SiteFormFieldOption, type SiteFormFieldType, type StorageAdapter, type StorefrontForm, type StorefrontFormFieldError, type StorefrontFormFieldErrorCode, type StorefrontFormSettings, type StorefrontFormSubmitInput, type StorefrontFormSubmitResult, StorefrontScripts, type StorefrontScriptsProps, type SubmitQuoteInput, type SubmitReturnInput, type SubmitReviewInput, type SubmitWithdrawalInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseBlogPostOptions, type UseBlogPostsOptions, type UseBlogsOptions, type UseBookingsOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCertificateVerificationOptions, type UseCollectionOptions, type UseCourseCertificatesOptions, type UseCourseOptions, type UseCoursesOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFacetsOptions, type UseFaqOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseLessonCommentsOptions, type UseLessonNoteOptions, type UseLessonQuizOptions, type UseLessonTutorOptions, type UseLoyaltyOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UsePaymentMethodsOptions, type UsePersonalOffersOptions, type UseProductOptions, type UseProductParametersOptions, type UseProductsOptions, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingQuoteOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, type UseSiteFormOptions, type UseSubscriptionsOptions, type UseVisitorMessagesOptions, type VisitorMessage, type WishlistItem, type WithdrawalAcknowledgement, type WithdrawalWindow, cookieStorage, createMemoryStorage, detectStorage, formatPrice, generateVisitorId, getStoredVisitorId, grantAnalyticsConsent, localStorageAdapter, memoryStorage, revokeAnalyticsConsent, trackEcommerceEvent, useAddressAutocomplete, useAddresses, useAnalyticsEvents, useAuth, useBehio, useBehioClient, useBlogPost, useBlogPosts, useBlogs, useBookingConfig, useBookingSlots, useBundle, useBundles, useCancelBooking, useCart, useCartCount, useCategories, useCategory, useCertificateVerification, useCheckout, useCheckoutPreview, useCollection, useCollectionItem, useCookieConsent, useCourse, useCourseCertificates, useCourses, useCreateBooking, useCrossSell, useCurrency, useCustomer, useFacets, useFaqGroup, useFaqGroups, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLessonComments, useLessonNote, useLessonQuiz, useLessonTutor, useLookupReturnableOrder, useLoyalty, useManagedBooking, useManagedBookingSlots, useMenu, useNewsletterConfirm, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePaymentMethods, usePersonalOffers, usePickupPoints, useProduct, useProductGroup, useProductParameters, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useRescheduleBooking, useReturnStatus, useSearch, useShippingMethods, useShippingQuote, useShopInfo, useShopScripts, useShopSeo, useSiteForm, useSiteFormSubmit, useSubmitQuote, useSubmitReturn, useSubmitReview, useSubmitWithdrawal, useSubscriptions, useVisitorMessages, useWishlist };
|
package/dist/react.js
CHANGED
|
@@ -85,6 +85,7 @@ __export(react_exports, {
|
|
|
85
85
|
useManagedBooking: () => useManagedBooking,
|
|
86
86
|
useManagedBookingSlots: () => useManagedBookingSlots,
|
|
87
87
|
useMenu: () => useMenu,
|
|
88
|
+
useNewsletterConfirm: () => useNewsletterConfirm,
|
|
88
89
|
useNewsletterSubscribe: () => useNewsletterSubscribe,
|
|
89
90
|
useNewsletterUnsubscribe: () => useNewsletterUnsubscribe,
|
|
90
91
|
useNotifyWhenAvailable: () => useNotifyWhenAvailable,
|
|
@@ -143,6 +144,7 @@ var BE_CODE_TO_ERROR = {
|
|
|
143
144
|
"be.storefront.discountNotApplicable": "INVALID_DISCOUNT",
|
|
144
145
|
"be.storefront.discountNotYetValid": "INVALID_DISCOUNT",
|
|
145
146
|
"be.storefront.discountUsageLimitReached": "INVALID_DISCOUNT",
|
|
147
|
+
"be.storefront.personalDiscountNotEligible": "INVALID_DISCOUNT",
|
|
146
148
|
"be.storefront.discountLimitedToGroups": "INVALID_DISCOUNT",
|
|
147
149
|
"be.storefront.tokenInvalid": "TOKEN_INVALID",
|
|
148
150
|
"be.storefront.orderAccessTokenInvalid": "TOKEN_INVALID",
|
|
@@ -1276,13 +1278,19 @@ var CartModule = class {
|
|
|
1276
1278
|
/** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
|
|
1277
1279
|
async addItems(input) {
|
|
1278
1280
|
const res = await this.client.request("POST", "/cart/items/batch", {
|
|
1279
|
-
body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity })) }
|
|
1281
|
+
body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity, ...item.assignToProductId ? { assignToProductId: item.assignToProductId } : {} })) }
|
|
1280
1282
|
});
|
|
1281
1283
|
if (res.error) return res;
|
|
1282
1284
|
if (res.data.newSessionToken) this.client.setCartSession(res.data.newSessionToken);
|
|
1283
1285
|
this.client.emit("cart:updated", res.data);
|
|
1284
1286
|
return res;
|
|
1285
1287
|
}
|
|
1288
|
+
/** Idempotent selection of one extra package for a particular main cart line. */
|
|
1289
|
+
async setAddon(itemId, productId, selected) {
|
|
1290
|
+
const res = await this.client.request("PUT", `/cart/items/${encodeURIComponent(itemId)}/addons/${encodeURIComponent(productId)}`, { body: { selected } });
|
|
1291
|
+
if (!res.error) this.client.emit("cart:updated", res.data);
|
|
1292
|
+
return res;
|
|
1293
|
+
}
|
|
1286
1294
|
/**
|
|
1287
1295
|
* Switch the CART currency server-side. The backend re-prices every line in
|
|
1288
1296
|
* the new currency (no FX conversion: a product must have a price configured
|
|
@@ -2401,6 +2409,12 @@ var NewsletterModule = class {
|
|
|
2401
2409
|
}
|
|
2402
2410
|
);
|
|
2403
2411
|
}
|
|
2412
|
+
async confirm(token) {
|
|
2413
|
+
return this.client.request("POST", "/newsletter/confirm", {
|
|
2414
|
+
body: { token },
|
|
2415
|
+
auth: false
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2404
2418
|
async unsubscribe(email) {
|
|
2405
2419
|
return this.client.request(
|
|
2406
2420
|
"POST",
|
|
@@ -2970,6 +2984,11 @@ function useCart(options) {
|
|
|
2970
2984
|
await acceptCart(result);
|
|
2971
2985
|
}
|
|
2972
2986
|
});
|
|
2987
|
+
const setAddonMutation = (0, import_react_query12.useMutation)({
|
|
2988
|
+
mutationFn: ({ itemId, productId, selected }) => unwrap(client.cart.setAddon(itemId, productId, selected)),
|
|
2989
|
+
onMutate: cancelCartRead,
|
|
2990
|
+
onSuccess: acceptCart
|
|
2991
|
+
});
|
|
2973
2992
|
const updateMutation = (0, import_react_query12.useMutation)({
|
|
2974
2993
|
mutationFn: async ({ itemId, quantity }) => {
|
|
2975
2994
|
return unwrap(client.cart.updateQuantity(itemId, quantity));
|
|
@@ -3089,6 +3108,7 @@ function useCart(options) {
|
|
|
3089
3108
|
// Actions
|
|
3090
3109
|
addItem,
|
|
3091
3110
|
addItems: addItemsMutation.mutateAsync,
|
|
3111
|
+
setAddon: setAddonMutation.mutateAsync,
|
|
3092
3112
|
updateQuantity,
|
|
3093
3113
|
removeItem,
|
|
3094
3114
|
clear,
|
|
@@ -3103,7 +3123,7 @@ function useCart(options) {
|
|
|
3103
3123
|
isEmpty: !cart || cart.items.length === 0 && (cart.bundleLines?.length ?? 0) === 0,
|
|
3104
3124
|
// Mutation states
|
|
3105
3125
|
isAdding: addMutation.isPending || addItemsMutation.isPending,
|
|
3106
|
-
isUpdating: updateMutation.isPending,
|
|
3126
|
+
isUpdating: updateMutation.isPending || setAddonMutation.isPending,
|
|
3107
3127
|
isRemoving: removeMutation.isPending,
|
|
3108
3128
|
isUpdatingBundle: addBundleMutation.isPending || updateBundleMutation.isPending || removeBundleMutation.isPending
|
|
3109
3129
|
};
|
|
@@ -3978,6 +3998,12 @@ function useNewsletterUnsubscribe() {
|
|
|
3978
3998
|
mutationFn: (email) => unwrap(client.newsletter.unsubscribe(email))
|
|
3979
3999
|
});
|
|
3980
4000
|
}
|
|
4001
|
+
function useNewsletterConfirm() {
|
|
4002
|
+
const { client } = useBehio();
|
|
4003
|
+
return (0, import_react_query30.useMutation)({
|
|
4004
|
+
mutationFn: (token) => unwrap(client.newsletter.confirm(token))
|
|
4005
|
+
});
|
|
4006
|
+
}
|
|
3981
4007
|
|
|
3982
4008
|
// src/react/hooks/use-orders.ts
|
|
3983
4009
|
var import_react13 = require("react");
|
|
@@ -5268,6 +5294,7 @@ async function revokeAnalyticsConsent(client) {
|
|
|
5268
5294
|
useManagedBooking,
|
|
5269
5295
|
useManagedBookingSlots,
|
|
5270
5296
|
useMenu,
|
|
5297
|
+
useNewsletterConfirm,
|
|
5271
5298
|
useNewsletterSubscribe,
|
|
5272
5299
|
useNewsletterUnsubscribe,
|
|
5273
5300
|
useNotifyWhenAvailable,
|
package/dist/react.mjs
CHANGED
|
@@ -20,6 +20,7 @@ var BE_CODE_TO_ERROR = {
|
|
|
20
20
|
"be.storefront.discountNotApplicable": "INVALID_DISCOUNT",
|
|
21
21
|
"be.storefront.discountNotYetValid": "INVALID_DISCOUNT",
|
|
22
22
|
"be.storefront.discountUsageLimitReached": "INVALID_DISCOUNT",
|
|
23
|
+
"be.storefront.personalDiscountNotEligible": "INVALID_DISCOUNT",
|
|
23
24
|
"be.storefront.discountLimitedToGroups": "INVALID_DISCOUNT",
|
|
24
25
|
"be.storefront.tokenInvalid": "TOKEN_INVALID",
|
|
25
26
|
"be.storefront.orderAccessTokenInvalid": "TOKEN_INVALID",
|
|
@@ -1153,13 +1154,19 @@ var CartModule = class {
|
|
|
1153
1154
|
/** Add the complete selection atomically. Invalid/unavailable lines leave the cart unchanged. */
|
|
1154
1155
|
async addItems(input) {
|
|
1155
1156
|
const res = await this.client.request("POST", "/cart/items/batch", {
|
|
1156
|
-
body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity })) }
|
|
1157
|
+
body: { items: input.items.map((item) => ({ productId: item.productId, quantity: item.quantity, ...item.assignToProductId ? { assignToProductId: item.assignToProductId } : {} })) }
|
|
1157
1158
|
});
|
|
1158
1159
|
if (res.error) return res;
|
|
1159
1160
|
if (res.data.newSessionToken) this.client.setCartSession(res.data.newSessionToken);
|
|
1160
1161
|
this.client.emit("cart:updated", res.data);
|
|
1161
1162
|
return res;
|
|
1162
1163
|
}
|
|
1164
|
+
/** Idempotent selection of one extra package for a particular main cart line. */
|
|
1165
|
+
async setAddon(itemId, productId, selected) {
|
|
1166
|
+
const res = await this.client.request("PUT", `/cart/items/${encodeURIComponent(itemId)}/addons/${encodeURIComponent(productId)}`, { body: { selected } });
|
|
1167
|
+
if (!res.error) this.client.emit("cart:updated", res.data);
|
|
1168
|
+
return res;
|
|
1169
|
+
}
|
|
1163
1170
|
/**
|
|
1164
1171
|
* Switch the CART currency server-side. The backend re-prices every line in
|
|
1165
1172
|
* the new currency (no FX conversion: a product must have a price configured
|
|
@@ -2278,6 +2285,12 @@ var NewsletterModule = class {
|
|
|
2278
2285
|
}
|
|
2279
2286
|
);
|
|
2280
2287
|
}
|
|
2288
|
+
async confirm(token) {
|
|
2289
|
+
return this.client.request("POST", "/newsletter/confirm", {
|
|
2290
|
+
body: { token },
|
|
2291
|
+
auth: false
|
|
2292
|
+
});
|
|
2293
|
+
}
|
|
2281
2294
|
async unsubscribe(email) {
|
|
2282
2295
|
return this.client.request(
|
|
2283
2296
|
"POST",
|
|
@@ -2847,6 +2860,11 @@ function useCart(options) {
|
|
|
2847
2860
|
await acceptCart(result);
|
|
2848
2861
|
}
|
|
2849
2862
|
});
|
|
2863
|
+
const setAddonMutation = useMutation({
|
|
2864
|
+
mutationFn: ({ itemId, productId, selected }) => unwrap(client.cart.setAddon(itemId, productId, selected)),
|
|
2865
|
+
onMutate: cancelCartRead,
|
|
2866
|
+
onSuccess: acceptCart
|
|
2867
|
+
});
|
|
2850
2868
|
const updateMutation = useMutation({
|
|
2851
2869
|
mutationFn: async ({ itemId, quantity }) => {
|
|
2852
2870
|
return unwrap(client.cart.updateQuantity(itemId, quantity));
|
|
@@ -2966,6 +2984,7 @@ function useCart(options) {
|
|
|
2966
2984
|
// Actions
|
|
2967
2985
|
addItem,
|
|
2968
2986
|
addItems: addItemsMutation.mutateAsync,
|
|
2987
|
+
setAddon: setAddonMutation.mutateAsync,
|
|
2969
2988
|
updateQuantity,
|
|
2970
2989
|
removeItem,
|
|
2971
2990
|
clear,
|
|
@@ -2980,7 +2999,7 @@ function useCart(options) {
|
|
|
2980
2999
|
isEmpty: !cart || cart.items.length === 0 && (cart.bundleLines?.length ?? 0) === 0,
|
|
2981
3000
|
// Mutation states
|
|
2982
3001
|
isAdding: addMutation.isPending || addItemsMutation.isPending,
|
|
2983
|
-
isUpdating: updateMutation.isPending,
|
|
3002
|
+
isUpdating: updateMutation.isPending || setAddonMutation.isPending,
|
|
2984
3003
|
isRemoving: removeMutation.isPending,
|
|
2985
3004
|
isUpdatingBundle: addBundleMutation.isPending || updateBundleMutation.isPending || removeBundleMutation.isPending
|
|
2986
3005
|
};
|
|
@@ -3855,6 +3874,12 @@ function useNewsletterUnsubscribe() {
|
|
|
3855
3874
|
mutationFn: (email) => unwrap(client.newsletter.unsubscribe(email))
|
|
3856
3875
|
});
|
|
3857
3876
|
}
|
|
3877
|
+
function useNewsletterConfirm() {
|
|
3878
|
+
const { client } = useBehio();
|
|
3879
|
+
return useMutation11({
|
|
3880
|
+
mutationFn: (token) => unwrap(client.newsletter.confirm(token))
|
|
3881
|
+
});
|
|
3882
|
+
}
|
|
3858
3883
|
|
|
3859
3884
|
// src/react/hooks/use-orders.ts
|
|
3860
3885
|
import { useCallback as useCallback11, useMemo as useMemo3, useState as useState7 } from "react";
|
|
@@ -5144,6 +5169,7 @@ export {
|
|
|
5144
5169
|
useManagedBooking,
|
|
5145
5170
|
useManagedBookingSlots,
|
|
5146
5171
|
useMenu,
|
|
5172
|
+
useNewsletterConfirm,
|
|
5147
5173
|
useNewsletterSubscribe,
|
|
5148
5174
|
useNewsletterUnsubscribe,
|
|
5149
5175
|
useNotifyWhenAvailable,
|