@behio/storefront-sdk 2.6.1 → 2.8.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/README.md +0 -6
- package/dist/{client-xoomjG8Z.d.mts → client-t58lBodJ.d.mts} +54 -2
- package/dist/{client-xoomjG8Z.d.ts → client-t58lBodJ.d.ts} +54 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -14
- package/dist/index.mjs +11 -14
- package/dist/next.d.mts +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/react.d.mts +53 -1
- package/dist/react.d.ts +53 -1
- package/dist/react.js +11 -14
- package/dist/react.mjs +11 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -269,12 +269,6 @@ does not double quantities. Expired links fail with
|
|
|
269
269
|
`be.storefront.cartLinkExpired`. Answer `GET /cart/link/_probe` with header
|
|
270
270
|
`x-behio-cart-link: 1` so Behio Chat knows the storefront supports links.
|
|
271
271
|
|
|
272
|
-
### Form validation errors (2.6.1)
|
|
273
|
-
|
|
274
|
-
`formFieldErrors(error)` retains every supported field code, including
|
|
275
|
-
`dateNotFuture`, `dateNotPast` and `tooManyFiles`. Display each error beside
|
|
276
|
-
its field and preserve entered values when a submission is rejected.
|
|
277
|
-
|
|
278
272
|
### Cart summary for page scripts (2.6)
|
|
279
273
|
|
|
280
274
|
Browser cart responses dispatch `behio:cart` on `window` with
|
|
@@ -1204,7 +1204,15 @@ interface CheckoutPreview {
|
|
|
1204
1204
|
expiresAt: number;
|
|
1205
1205
|
}
|
|
1206
1206
|
interface CheckoutResult extends OrderDetail {
|
|
1207
|
+
/** Guest checkout only: 30-minute token for `orders.getByAccessToken()`. */
|
|
1207
1208
|
orderAccessToken?: string | null;
|
|
1209
|
+
/**
|
|
1210
|
+
* Permanent secret of the order (SDK 2.7.0), the same one used in `/track/{token}`
|
|
1211
|
+
* links from order e-mails and SMS. Keep it in an HttpOnly cookie of the browser
|
|
1212
|
+
* that placed the order and read the order with `orders.track(token)`, so the
|
|
1213
|
+
* confirmation page works without a login, a code or an expiry.
|
|
1214
|
+
*/
|
|
1215
|
+
trackingToken?: string;
|
|
1208
1216
|
}
|
|
1209
1217
|
/**
|
|
1210
1218
|
* Result of a registration. When the eshop requires admin approval,
|
|
@@ -1561,7 +1569,13 @@ interface OrderListItem {
|
|
|
1561
1569
|
interface OrderItem {
|
|
1562
1570
|
productName: string;
|
|
1563
1571
|
sku: string;
|
|
1564
|
-
|
|
1572
|
+
/** Photo snapshot from checkout, or the product's current photo. */
|
|
1573
|
+
imageUrl?: string | null;
|
|
1574
|
+
/** Product still in the shop (SDK 2.8.0). Null when it was removed since,
|
|
1575
|
+
* so a template never links to a missing product page. */
|
|
1576
|
+
productId?: string | null;
|
|
1577
|
+
/** URL slug for a link back to the product page (SDK 2.8.0). */
|
|
1578
|
+
productSlug?: string | null;
|
|
1565
1579
|
quantity: number;
|
|
1566
1580
|
unitPrice: number;
|
|
1567
1581
|
totalPrice: number;
|
|
@@ -1585,6 +1599,36 @@ interface OrderTracking {
|
|
|
1585
1599
|
shippingCountry: string | null;
|
|
1586
1600
|
items: OrderItem[];
|
|
1587
1601
|
createdAt: number;
|
|
1602
|
+
/** Order summary, not personal data (SDK 2.8.0). */
|
|
1603
|
+
subtotal?: number;
|
|
1604
|
+
shippingTotal?: number;
|
|
1605
|
+
paymentFee?: number | null;
|
|
1606
|
+
discountTotal?: number;
|
|
1607
|
+
taxTotal?: number;
|
|
1608
|
+
taxBreakdown?: TaxBreakdownLine[];
|
|
1609
|
+
/** Shipping method as the customer chose it (SDK 2.8.0). */
|
|
1610
|
+
shippingMethodName?: string | null;
|
|
1611
|
+
/** Payment method in the order language (SDK 2.8.0). */
|
|
1612
|
+
paymentMethodName?: string | null;
|
|
1613
|
+
/** Pickup point the customer chose, a public place (SDK 2.8.0). */
|
|
1614
|
+
pickupPoint?: OrderPickupPoint | null;
|
|
1615
|
+
/** Parcels the customer can follow (SDK 2.8.0). */
|
|
1616
|
+
shipments?: OrderShipment[];
|
|
1617
|
+
}
|
|
1618
|
+
/** Pickup point the customer chose for an order (SDK 2.8.0). */
|
|
1619
|
+
interface OrderPickupPoint {
|
|
1620
|
+
name: string;
|
|
1621
|
+
street?: string | null;
|
|
1622
|
+
city?: string | null;
|
|
1623
|
+
zip?: string | null;
|
|
1624
|
+
country?: string | null;
|
|
1625
|
+
}
|
|
1626
|
+
/** A parcel on its way, with the carrier's tracking link (SDK 2.8.0). */
|
|
1627
|
+
interface OrderShipment {
|
|
1628
|
+
trackingNumber?: string | null;
|
|
1629
|
+
trackingUrl?: string | null;
|
|
1630
|
+
status: string;
|
|
1631
|
+
createdAt: number;
|
|
1588
1632
|
}
|
|
1589
1633
|
interface OrderStatusHistory {
|
|
1590
1634
|
fromStatus?: OrderStatus;
|
|
@@ -1598,6 +1642,14 @@ interface OrderDetail extends OrderListItem {
|
|
|
1598
1642
|
contentDeliveryPending?: boolean;
|
|
1599
1643
|
/** False for an order without physical delivery. */
|
|
1600
1644
|
requiresShipping?: boolean;
|
|
1645
|
+
/** Shipping method as the customer chose it (SDK 2.8.0). */
|
|
1646
|
+
shippingMethodName?: string | null;
|
|
1647
|
+
/** Payment method in the order language (SDK 2.8.0). */
|
|
1648
|
+
paymentMethodName?: string | null;
|
|
1649
|
+
/** Pickup point the customer chose, a public place (SDK 2.8.0). */
|
|
1650
|
+
pickupPoint?: OrderPickupPoint | null;
|
|
1651
|
+
/** Parcels the customer can follow (SDK 2.8.0). */
|
|
1652
|
+
shipments?: OrderShipment[];
|
|
1601
1653
|
items: OrderItem[];
|
|
1602
1654
|
shippingAddress: CheckoutAddress;
|
|
1603
1655
|
billingAddress: CheckoutAddress;
|
|
@@ -3843,4 +3895,4 @@ declare function clearCartSummary(): void;
|
|
|
3843
3895
|
/** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
|
|
3844
3896
|
declare function publishCartSummary(summary: CartSummaryEvent): void;
|
|
3845
3897
|
|
|
3846
|
-
export { type CourseCommentReply as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type Cart as D, type CartBundleLine as E, type CartBundleLineItem as F, type CartDiscount as G, type CartItem as H, type CartItemProduct as I, type CartLinkClaimed as J, type CartPromotion as K, type CartSummaryEvent as L, type Category as M, type CategoryDetail as N, type CertificateVerification as O, type ProductDetail as P, type CheckoutAddress as Q, type CheckoutInput as R, type SdkResult as S, type CheckoutPaymentMethod as T, type CheckoutPreview as U, type CheckoutResult as V, type CheckoutSettings as W, type CookieConsentInput as X, type CourseAttachment as Y, type CourseCertificate as Z, type CourseComment as _, type ProductVariant as a, type
|
|
3898
|
+
export { type CourseCommentReply as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type Cart as D, type CartBundleLine as E, type CartBundleLineItem as F, type CartDiscount as G, type CartItem as H, type CartItemProduct as I, type CartLinkClaimed as J, type CartPromotion as K, type CartSummaryEvent as L, type Category as M, type CategoryDetail as N, type CertificateVerification as O, type ProductDetail as P, type CheckoutAddress as Q, type CheckoutInput as R, type SdkResult as S, type CheckoutPaymentMethod as T, type CheckoutPreview as U, type CheckoutResult as V, type CheckoutSettings as W, type CookieConsentInput as X, type CourseAttachment as Y, type CourseCertificate as Z, type CourseComment as _, type ProductVariant as a, type PageDetail as a$, type CourseCommentsList as a0, type CourseDetail as a1, type CourseLesson as a2, type CourseListItem as a3, type CourseModule as a4, type CoursePostedComment as a5, type CourseProgress as a6, type CourseTutorMessage as a7, type CourseTutorThread as a8, type CrossSellItem as a9, type LoyaltyProgram as aA, type LoyaltySummary as aB, type LoyaltyTier as aC, type LoyaltyTierPerks as aD, type LoyaltyTransaction as aE, type Menu as aF, type MenuItem as aG, type MenuItemRef as aH, type MenuItemType as aI, type MessageResponse as aJ, type NewsletterOptInDefault as aK, type NewsletterSubscribeInput as aL, type NewsletterSubscribeResult as aM, type NewsletterUnsubscribeResult as aN, type OrderAccessRequestResponse as aO, type OrderAccessVerifyResponse as aP, type OrderDetail as aQ, type OrderItem as aR, type OrderListItem as aS, type OrderPickupPoint as aT, type OrderShipment as aU, type OrderStatus as aV, type OrderStatusHistory as aW, OrderStatuses as aX, type OrderTracking as aY, type Page as aZ, type PageAttachment as a_, type CurrencyDisplayFormat as aa, type CustomerAddress as ab, type CustomerProfile as ac, type DigitalDownload as ad, type DownloadUrl as ae, type Facet as af, type FacetAvailability as ag, type FacetCategory as ah, type FacetLabel as ai, type FacetPriceRange as aj, type FacetRange as ak, type FacetRatingBucket as al, type FacetValue as am, type FacetsResponse as an, type FilterField as ao, type FulfillmentStatus as ap, FulfillmentStatuses as aq, type GiftCardBalance as ar, type GiftCardPurchaseInput as as, type GiftCardPurchaseResult as at, type GiftCardSummary as au, type LessonNote as av, type LessonQuiz as aw, type LoginInput as ax, type LoyaltyBalance as ay, type LoyaltyNextTier as az, type StorefrontFormFieldError as b, type Sitemap as b$, type PaginatedResponse as b0, type PaymentInstrument as b1, type PaymentStatus as b2, PaymentStatuses as b3, type PaymentSwift as b4, type PickupPoint as b5, type PickupPointHours as b6, type PickupPointsInput as b7, type PickupWidgetConfig as b8, type PriceDisplay as b9, type RegisterInput as bA, type RegisterResult as bB, type RequestInterceptor as bC, type RequestInterceptorConfig as bD, type ResponseInterceptor as bE, type ResponseInterceptorData as bF, type ReturnRequest as bG, type ReturnRequestItem as bH, type ReturnStatus as bI, type ReturnStatusItem as bJ, type ReturnableOrder as bK, type ReturnableOrderItem as bL, type SdkError as bM, type ShippingMethodSummary as bN, type ShippingQuote as bO, type ShippingQuoteInput as bP, type ShopAppearance as bQ, type ShopInfo as bR, type ShopScript as bS, type ShopScriptPlacement as bT, type ShopScriptType as bU, type ShopScripts as bV, type ShopSeo as bW, type ShopSeoIdentity as bX, type SiteFormField as bY, type SiteFormFieldOption as bZ, type SiteFormFieldType as b_, 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 AddToCartInput as c, type SitemapEntry as c0, type StockBehavior as c1, type StockMode as c2, type StorefrontForm as c3, type StorefrontFormFieldErrorCode as c4, type StorefrontFormFile as c5, type StorefrontFormSettings as c6, type StorefrontFormSubmitInput as c7, type StorefrontFormSubmitResult as c8, type StorefrontFormUpload as c9, type SubmitQuoteInput as ca, type SubmitReturnInput as cb, type SubmitReviewInput as cc, type Subscription as cd, type SubscriptionAction as ce, type SubscriptionFrequency as cf, type SubscriptionItem as cg, type SubscriptionStatus as ch, type TaxBreakdownLine as ci, type VariantAxis as cj, type VariantAxisValue as ck, type WishlistItem as cl, clearCartSummary as cm, err as cn, ok as co, publishCartSummary as cp, toSdkError as cq, type AddressDetail as d, type AddressSuggestion as e, type AddressType as f, AddressTypes as g, type AuthTokens as h, type BackInStockSubscription as i, type BadgeTone as j, BehioApiError as k, type BehioErrorCode as l, type BehioEventHandler as m, type BehioEventType as n, BehioNetworkError as o, type BehioStorefrontConfig as p, type Blog as q, type BlogPostDetail as r, type BlogPostListItem as s, type BlogPostsPage as t, type BlogPostsQuery as u, type BlogSettings as v, type BlogTag as w, type Bundle as x, type BundleCatalogQuery as y, type BundleItem as z };
|
|
@@ -1204,7 +1204,15 @@ interface CheckoutPreview {
|
|
|
1204
1204
|
expiresAt: number;
|
|
1205
1205
|
}
|
|
1206
1206
|
interface CheckoutResult extends OrderDetail {
|
|
1207
|
+
/** Guest checkout only: 30-minute token for `orders.getByAccessToken()`. */
|
|
1207
1208
|
orderAccessToken?: string | null;
|
|
1209
|
+
/**
|
|
1210
|
+
* Permanent secret of the order (SDK 2.7.0), the same one used in `/track/{token}`
|
|
1211
|
+
* links from order e-mails and SMS. Keep it in an HttpOnly cookie of the browser
|
|
1212
|
+
* that placed the order and read the order with `orders.track(token)`, so the
|
|
1213
|
+
* confirmation page works without a login, a code or an expiry.
|
|
1214
|
+
*/
|
|
1215
|
+
trackingToken?: string;
|
|
1208
1216
|
}
|
|
1209
1217
|
/**
|
|
1210
1218
|
* Result of a registration. When the eshop requires admin approval,
|
|
@@ -1561,7 +1569,13 @@ interface OrderListItem {
|
|
|
1561
1569
|
interface OrderItem {
|
|
1562
1570
|
productName: string;
|
|
1563
1571
|
sku: string;
|
|
1564
|
-
|
|
1572
|
+
/** Photo snapshot from checkout, or the product's current photo. */
|
|
1573
|
+
imageUrl?: string | null;
|
|
1574
|
+
/** Product still in the shop (SDK 2.8.0). Null when it was removed since,
|
|
1575
|
+
* so a template never links to a missing product page. */
|
|
1576
|
+
productId?: string | null;
|
|
1577
|
+
/** URL slug for a link back to the product page (SDK 2.8.0). */
|
|
1578
|
+
productSlug?: string | null;
|
|
1565
1579
|
quantity: number;
|
|
1566
1580
|
unitPrice: number;
|
|
1567
1581
|
totalPrice: number;
|
|
@@ -1585,6 +1599,36 @@ interface OrderTracking {
|
|
|
1585
1599
|
shippingCountry: string | null;
|
|
1586
1600
|
items: OrderItem[];
|
|
1587
1601
|
createdAt: number;
|
|
1602
|
+
/** Order summary, not personal data (SDK 2.8.0). */
|
|
1603
|
+
subtotal?: number;
|
|
1604
|
+
shippingTotal?: number;
|
|
1605
|
+
paymentFee?: number | null;
|
|
1606
|
+
discountTotal?: number;
|
|
1607
|
+
taxTotal?: number;
|
|
1608
|
+
taxBreakdown?: TaxBreakdownLine[];
|
|
1609
|
+
/** Shipping method as the customer chose it (SDK 2.8.0). */
|
|
1610
|
+
shippingMethodName?: string | null;
|
|
1611
|
+
/** Payment method in the order language (SDK 2.8.0). */
|
|
1612
|
+
paymentMethodName?: string | null;
|
|
1613
|
+
/** Pickup point the customer chose, a public place (SDK 2.8.0). */
|
|
1614
|
+
pickupPoint?: OrderPickupPoint | null;
|
|
1615
|
+
/** Parcels the customer can follow (SDK 2.8.0). */
|
|
1616
|
+
shipments?: OrderShipment[];
|
|
1617
|
+
}
|
|
1618
|
+
/** Pickup point the customer chose for an order (SDK 2.8.0). */
|
|
1619
|
+
interface OrderPickupPoint {
|
|
1620
|
+
name: string;
|
|
1621
|
+
street?: string | null;
|
|
1622
|
+
city?: string | null;
|
|
1623
|
+
zip?: string | null;
|
|
1624
|
+
country?: string | null;
|
|
1625
|
+
}
|
|
1626
|
+
/** A parcel on its way, with the carrier's tracking link (SDK 2.8.0). */
|
|
1627
|
+
interface OrderShipment {
|
|
1628
|
+
trackingNumber?: string | null;
|
|
1629
|
+
trackingUrl?: string | null;
|
|
1630
|
+
status: string;
|
|
1631
|
+
createdAt: number;
|
|
1588
1632
|
}
|
|
1589
1633
|
interface OrderStatusHistory {
|
|
1590
1634
|
fromStatus?: OrderStatus;
|
|
@@ -1598,6 +1642,14 @@ interface OrderDetail extends OrderListItem {
|
|
|
1598
1642
|
contentDeliveryPending?: boolean;
|
|
1599
1643
|
/** False for an order without physical delivery. */
|
|
1600
1644
|
requiresShipping?: boolean;
|
|
1645
|
+
/** Shipping method as the customer chose it (SDK 2.8.0). */
|
|
1646
|
+
shippingMethodName?: string | null;
|
|
1647
|
+
/** Payment method in the order language (SDK 2.8.0). */
|
|
1648
|
+
paymentMethodName?: string | null;
|
|
1649
|
+
/** Pickup point the customer chose, a public place (SDK 2.8.0). */
|
|
1650
|
+
pickupPoint?: OrderPickupPoint | null;
|
|
1651
|
+
/** Parcels the customer can follow (SDK 2.8.0). */
|
|
1652
|
+
shipments?: OrderShipment[];
|
|
1601
1653
|
items: OrderItem[];
|
|
1602
1654
|
shippingAddress: CheckoutAddress;
|
|
1603
1655
|
billingAddress: CheckoutAddress;
|
|
@@ -3843,4 +3895,4 @@ declare function clearCartSummary(): void;
|
|
|
3843
3895
|
/** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
|
|
3844
3896
|
declare function publishCartSummary(summary: CartSummaryEvent): void;
|
|
3845
3897
|
|
|
3846
|
-
export { type CourseCommentReply as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type Cart as D, type CartBundleLine as E, type CartBundleLineItem as F, type CartDiscount as G, type CartItem as H, type CartItemProduct as I, type CartLinkClaimed as J, type CartPromotion as K, type CartSummaryEvent as L, type Category as M, type CategoryDetail as N, type CertificateVerification as O, type ProductDetail as P, type CheckoutAddress as Q, type CheckoutInput as R, type SdkResult as S, type CheckoutPaymentMethod as T, type CheckoutPreview as U, type CheckoutResult as V, type CheckoutSettings as W, type CookieConsentInput as X, type CourseAttachment as Y, type CourseCertificate as Z, type CourseComment as _, type ProductVariant as a, type
|
|
3898
|
+
export { type CourseCommentReply as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type Cart as D, type CartBundleLine as E, type CartBundleLineItem as F, type CartDiscount as G, type CartItem as H, type CartItemProduct as I, type CartLinkClaimed as J, type CartPromotion as K, type CartSummaryEvent as L, type Category as M, type CategoryDetail as N, type CertificateVerification as O, type ProductDetail as P, type CheckoutAddress as Q, type CheckoutInput as R, type SdkResult as S, type CheckoutPaymentMethod as T, type CheckoutPreview as U, type CheckoutResult as V, type CheckoutSettings as W, type CookieConsentInput as X, type CourseAttachment as Y, type CourseCertificate as Z, type CourseComment as _, type ProductVariant as a, type PageDetail as a$, type CourseCommentsList as a0, type CourseDetail as a1, type CourseLesson as a2, type CourseListItem as a3, type CourseModule as a4, type CoursePostedComment as a5, type CourseProgress as a6, type CourseTutorMessage as a7, type CourseTutorThread as a8, type CrossSellItem as a9, type LoyaltyProgram as aA, type LoyaltySummary as aB, type LoyaltyTier as aC, type LoyaltyTierPerks as aD, type LoyaltyTransaction as aE, type Menu as aF, type MenuItem as aG, type MenuItemRef as aH, type MenuItemType as aI, type MessageResponse as aJ, type NewsletterOptInDefault as aK, type NewsletterSubscribeInput as aL, type NewsletterSubscribeResult as aM, type NewsletterUnsubscribeResult as aN, type OrderAccessRequestResponse as aO, type OrderAccessVerifyResponse as aP, type OrderDetail as aQ, type OrderItem as aR, type OrderListItem as aS, type OrderPickupPoint as aT, type OrderShipment as aU, type OrderStatus as aV, type OrderStatusHistory as aW, OrderStatuses as aX, type OrderTracking as aY, type Page as aZ, type PageAttachment as a_, type CurrencyDisplayFormat as aa, type CustomerAddress as ab, type CustomerProfile as ac, type DigitalDownload as ad, type DownloadUrl as ae, type Facet as af, type FacetAvailability as ag, type FacetCategory as ah, type FacetLabel as ai, type FacetPriceRange as aj, type FacetRange as ak, type FacetRatingBucket as al, type FacetValue as am, type FacetsResponse as an, type FilterField as ao, type FulfillmentStatus as ap, FulfillmentStatuses as aq, type GiftCardBalance as ar, type GiftCardPurchaseInput as as, type GiftCardPurchaseResult as at, type GiftCardSummary as au, type LessonNote as av, type LessonQuiz as aw, type LoginInput as ax, type LoyaltyBalance as ay, type LoyaltyNextTier as az, type StorefrontFormFieldError as b, type Sitemap as b$, type PaginatedResponse as b0, type PaymentInstrument as b1, type PaymentStatus as b2, PaymentStatuses as b3, type PaymentSwift as b4, type PickupPoint as b5, type PickupPointHours as b6, type PickupPointsInput as b7, type PickupWidgetConfig as b8, type PriceDisplay as b9, type RegisterInput as bA, type RegisterResult as bB, type RequestInterceptor as bC, type RequestInterceptorConfig as bD, type ResponseInterceptor as bE, type ResponseInterceptorData as bF, type ReturnRequest as bG, type ReturnRequestItem as bH, type ReturnStatus as bI, type ReturnStatusItem as bJ, type ReturnableOrder as bK, type ReturnableOrderItem as bL, type SdkError as bM, type ShippingMethodSummary as bN, type ShippingQuote as bO, type ShippingQuoteInput as bP, type ShopAppearance as bQ, type ShopInfo as bR, type ShopScript as bS, type ShopScriptPlacement as bT, type ShopScriptType as bU, type ShopScripts as bV, type ShopSeo as bW, type ShopSeoIdentity as bX, type SiteFormField as bY, type SiteFormFieldOption as bZ, type SiteFormFieldType as b_, 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 AddToCartInput as c, type SitemapEntry as c0, type StockBehavior as c1, type StockMode as c2, type StorefrontForm as c3, type StorefrontFormFieldErrorCode as c4, type StorefrontFormFile as c5, type StorefrontFormSettings as c6, type StorefrontFormSubmitInput as c7, type StorefrontFormSubmitResult as c8, type StorefrontFormUpload as c9, type SubmitQuoteInput as ca, type SubmitReturnInput as cb, type SubmitReviewInput as cc, type Subscription as cd, type SubscriptionAction as ce, type SubscriptionFrequency as cf, type SubscriptionItem as cg, type SubscriptionStatus as ch, type TaxBreakdownLine as ci, type VariantAxis as cj, type VariantAxisValue as ck, type WishlistItem as cl, clearCartSummary as cm, err as cn, ok as co, publishCartSummary as cp, toSdkError as cq, type AddressDetail as d, type AddressSuggestion as e, type AddressType as f, AddressTypes as g, type AuthTokens as h, type BackInStockSubscription as i, type BadgeTone as j, BehioApiError as k, type BehioErrorCode as l, type BehioEventHandler as m, type BehioEventType as n, BehioNetworkError as o, type BehioStorefrontConfig as p, type Blog as q, type BlogPostDetail as r, type BlogPostListItem as s, type BlogPostsPage as t, type BlogPostsQuery as u, type BlogSettings as v, type BlogTag as w, type Bundle as x, type BundleCatalogQuery as y, type BundleItem as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-
|
|
2
|
-
export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartLinkClaimed, K as CartPromotion, L as CartSummaryEvent, M as Category, N as CategoryDetail, O as CertificateVerification, Q as CheckoutAddress, R as CheckoutInput, T as CheckoutPaymentMethod, U as CheckoutPreview, V as CheckoutResult, W as CheckoutSettings, X as CookieConsentInput, Y as CourseAttachment, Z as CourseCertificate, _ as CourseComment, $ as CourseCommentReply, a0 as CourseCommentsList, a1 as CourseDetail, a2 as CourseLesson, a3 as CourseListItem, a4 as CourseModule, a5 as CoursePostedComment, a6 as CourseProgress, a7 as CourseTutorMessage, a8 as CourseTutorThread, a9 as CrossSellItem, aa as CurrencyDisplayFormat, ab as CustomerAddress, ac as CustomerProfile, ad as DigitalDownload, ae as DownloadUrl, af as Facet, ag as FacetAvailability, ah as FacetCategory, ai as FacetLabel, aj as FacetPriceRange, ak as FacetRange, al as FacetRatingBucket, am as FacetValue, an as FacetsResponse, ao as FilterField, ap as FulfillmentStatus, aq as FulfillmentStatuses, ar as GiftCardBalance, as as GiftCardPurchaseInput, at as GiftCardPurchaseResult, au as GiftCardSummary, av as LessonNote, aw as LessonQuiz, ax as LoginInput, ay as LoyaltyBalance, az as LoyaltyNextTier, aA as LoyaltyProgram, aB as LoyaltySummary, aC as LoyaltyTier, aD as LoyaltyTierPerks, aE as LoyaltyTransaction, aF as Menu, aG as MenuItem, aH as MenuItemRef, aI as MenuItemType, aJ as MessageResponse, aK as NewsletterOptInDefault, aL as NewsletterSubscribeInput, aM as NewsletterSubscribeResult, aN as NewsletterUnsubscribeResult, aO as OrderAccessRequestResponse, aP as OrderAccessVerifyResponse, aQ as OrderDetail, aR as OrderItem, aS as OrderListItem, aT as
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-t58lBodJ.mjs';
|
|
2
|
+
export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartLinkClaimed, K as CartPromotion, L as CartSummaryEvent, M as Category, N as CategoryDetail, O as CertificateVerification, Q as CheckoutAddress, R as CheckoutInput, T as CheckoutPaymentMethod, U as CheckoutPreview, V as CheckoutResult, W as CheckoutSettings, X as CookieConsentInput, Y as CourseAttachment, Z as CourseCertificate, _ as CourseComment, $ as CourseCommentReply, a0 as CourseCommentsList, a1 as CourseDetail, a2 as CourseLesson, a3 as CourseListItem, a4 as CourseModule, a5 as CoursePostedComment, a6 as CourseProgress, a7 as CourseTutorMessage, a8 as CourseTutorThread, a9 as CrossSellItem, aa as CurrencyDisplayFormat, ab as CustomerAddress, ac as CustomerProfile, ad as DigitalDownload, ae as DownloadUrl, af as Facet, ag as FacetAvailability, ah as FacetCategory, ai as FacetLabel, aj as FacetPriceRange, ak as FacetRange, al as FacetRatingBucket, am as FacetValue, an as FacetsResponse, ao as FilterField, ap as FulfillmentStatus, aq as FulfillmentStatuses, ar as GiftCardBalance, as as GiftCardPurchaseInput, at as GiftCardPurchaseResult, au as GiftCardSummary, av as LessonNote, aw as LessonQuiz, ax as LoginInput, ay as LoyaltyBalance, az as LoyaltyNextTier, aA as LoyaltyProgram, aB as LoyaltySummary, aC as LoyaltyTier, aD as LoyaltyTierPerks, aE as LoyaltyTransaction, aF as Menu, aG as MenuItem, aH as MenuItemRef, aI as MenuItemType, aJ as MessageResponse, aK as NewsletterOptInDefault, aL as NewsletterSubscribeInput, aM as NewsletterSubscribeResult, aN as NewsletterUnsubscribeResult, aO as OrderAccessRequestResponse, aP as OrderAccessVerifyResponse, aQ as OrderDetail, aR as OrderItem, aS as OrderListItem, aT as OrderPickupPoint, aU as OrderShipment, aV as OrderStatus, aW as OrderStatusHistory, aX as OrderStatuses, aY as OrderTracking, aZ as Page, a_ as PageAttachment, a$ as PageDetail, b0 as PaginatedResponse, b1 as PaymentInstrument, b2 as PaymentStatus, b3 as PaymentStatuses, b4 as PaymentSwift, b5 as PickupPoint, b6 as PickupPointHours, b7 as PickupPointsInput, b8 as PickupWidgetConfig, b9 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, bA as RegisterInput, bB as RegisterResult, bC as RequestInterceptor, bD as RequestInterceptorConfig, bE as ResponseInterceptor, bF as ResponseInterceptorData, bG as ReturnRequest, bH as ReturnRequestItem, bI as ReturnStatus, bJ as ReturnStatusItem, bK as ReturnableOrder, bL as ReturnableOrderItem, bM as SdkError, bN as ShippingMethodSummary, bO as ShippingQuote, bP as ShippingQuoteInput, bQ as ShopAppearance, bR as ShopInfo, bS as ShopScript, bT as ShopScriptPlacement, bU as ShopScriptType, bV as ShopScripts, bW as ShopSeo, bX as ShopSeoIdentity, bY as SiteFormField, bZ as SiteFormFieldOption, b_ as SiteFormFieldType, b$ as Sitemap, c0 as SitemapEntry, c1 as StockBehavior, c2 as StockMode, c3 as StorefrontForm, c4 as StorefrontFormFieldErrorCode, c5 as StorefrontFormFile, c6 as StorefrontFormSettings, c7 as StorefrontFormSubmitInput, c8 as StorefrontFormSubmitResult, c9 as StorefrontFormUpload, ca as SubmitQuoteInput, cb as SubmitReturnInput, cc as SubmitReviewInput, cd as Subscription, ce as SubscriptionAction, cf as SubscriptionFrequency, cg as SubscriptionItem, ch as SubscriptionStatus, ci as TaxBreakdownLine, cj as VariantAxis, ck as VariantAxisValue, cl as WishlistItem, cm as clearCartSummary, cn as err, co as ok, cp as publishCartSummary, cq as toSdkError } from './client-t58lBodJ.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 AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartLinkClaimed, K as CartPromotion, L as CartSummaryEvent, M as Category, N as CategoryDetail, O as CertificateVerification, Q as CheckoutAddress, R as CheckoutInput, T as CheckoutPaymentMethod, U as CheckoutPreview, V as CheckoutResult, W as CheckoutSettings, X as CookieConsentInput, Y as CourseAttachment, Z as CourseCertificate, _ as CourseComment, $ as CourseCommentReply, a0 as CourseCommentsList, a1 as CourseDetail, a2 as CourseLesson, a3 as CourseListItem, a4 as CourseModule, a5 as CoursePostedComment, a6 as CourseProgress, a7 as CourseTutorMessage, a8 as CourseTutorThread, a9 as CrossSellItem, aa as CurrencyDisplayFormat, ab as CustomerAddress, ac as CustomerProfile, ad as DigitalDownload, ae as DownloadUrl, af as Facet, ag as FacetAvailability, ah as FacetCategory, ai as FacetLabel, aj as FacetPriceRange, ak as FacetRange, al as FacetRatingBucket, am as FacetValue, an as FacetsResponse, ao as FilterField, ap as FulfillmentStatus, aq as FulfillmentStatuses, ar as GiftCardBalance, as as GiftCardPurchaseInput, at as GiftCardPurchaseResult, au as GiftCardSummary, av as LessonNote, aw as LessonQuiz, ax as LoginInput, ay as LoyaltyBalance, az as LoyaltyNextTier, aA as LoyaltyProgram, aB as LoyaltySummary, aC as LoyaltyTier, aD as LoyaltyTierPerks, aE as LoyaltyTransaction, aF as Menu, aG as MenuItem, aH as MenuItemRef, aI as MenuItemType, aJ as MessageResponse, aK as NewsletterOptInDefault, aL as NewsletterSubscribeInput, aM as NewsletterSubscribeResult, aN as NewsletterUnsubscribeResult, aO as OrderAccessRequestResponse, aP as OrderAccessVerifyResponse, aQ as OrderDetail, aR as OrderItem, aS as OrderListItem, aT as
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-t58lBodJ.js';
|
|
2
|
+
export { A as ActivePromotion, c as AddToCartInput, d as AddressDetail, e as AddressSuggestion, f as AddressType, g as AddressTypes, h as AuthTokens, i as BackInStockSubscription, j as BadgeTone, k as BehioApiError, l as BehioErrorCode, m as BehioEventHandler, n as BehioEventType, o as BehioNetworkError, p as BehioStorefrontConfig, q as Blog, r as BlogPostDetail, s as BlogPostListItem, t as BlogPostsPage, u as BlogPostsQuery, v as BlogSettings, w as BlogTag, x as Bundle, y as BundleCatalogQuery, z as BundleItem, D as Cart, E as CartBundleLine, F as CartBundleLineItem, G as CartDiscount, H as CartItem, I as CartItemProduct, J as CartLinkClaimed, K as CartPromotion, L as CartSummaryEvent, M as Category, N as CategoryDetail, O as CertificateVerification, Q as CheckoutAddress, R as CheckoutInput, T as CheckoutPaymentMethod, U as CheckoutPreview, V as CheckoutResult, W as CheckoutSettings, X as CookieConsentInput, Y as CourseAttachment, Z as CourseCertificate, _ as CourseComment, $ as CourseCommentReply, a0 as CourseCommentsList, a1 as CourseDetail, a2 as CourseLesson, a3 as CourseListItem, a4 as CourseModule, a5 as CoursePostedComment, a6 as CourseProgress, a7 as CourseTutorMessage, a8 as CourseTutorThread, a9 as CrossSellItem, aa as CurrencyDisplayFormat, ab as CustomerAddress, ac as CustomerProfile, ad as DigitalDownload, ae as DownloadUrl, af as Facet, ag as FacetAvailability, ah as FacetCategory, ai as FacetLabel, aj as FacetPriceRange, ak as FacetRange, al as FacetRatingBucket, am as FacetValue, an as FacetsResponse, ao as FilterField, ap as FulfillmentStatus, aq as FulfillmentStatuses, ar as GiftCardBalance, as as GiftCardPurchaseInput, at as GiftCardPurchaseResult, au as GiftCardSummary, av as LessonNote, aw as LessonQuiz, ax as LoginInput, ay as LoyaltyBalance, az as LoyaltyNextTier, aA as LoyaltyProgram, aB as LoyaltySummary, aC as LoyaltyTier, aD as LoyaltyTierPerks, aE as LoyaltyTransaction, aF as Menu, aG as MenuItem, aH as MenuItemRef, aI as MenuItemType, aJ as MessageResponse, aK as NewsletterOptInDefault, aL as NewsletterSubscribeInput, aM as NewsletterSubscribeResult, aN as NewsletterUnsubscribeResult, aO as OrderAccessRequestResponse, aP as OrderAccessVerifyResponse, aQ as OrderDetail, aR as OrderItem, aS as OrderListItem, aT as OrderPickupPoint, aU as OrderShipment, aV as OrderStatus, aW as OrderStatusHistory, aX as OrderStatuses, aY as OrderTracking, aZ as Page, a_ as PageAttachment, a$ as PageDetail, b0 as PaginatedResponse, b1 as PaymentInstrument, b2 as PaymentStatus, b3 as PaymentStatuses, b4 as PaymentSwift, b5 as PickupPoint, b6 as PickupPointHours, b7 as PickupPointsInput, b8 as PickupWidgetConfig, b9 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, bA as RegisterInput, bB as RegisterResult, bC as RequestInterceptor, bD as RequestInterceptorConfig, bE as ResponseInterceptor, bF as ResponseInterceptorData, bG as ReturnRequest, bH as ReturnRequestItem, bI as ReturnStatus, bJ as ReturnStatusItem, bK as ReturnableOrder, bL as ReturnableOrderItem, bM as SdkError, bN as ShippingMethodSummary, bO as ShippingQuote, bP as ShippingQuoteInput, bQ as ShopAppearance, bR as ShopInfo, bS as ShopScript, bT as ShopScriptPlacement, bU as ShopScriptType, bV as ShopScripts, bW as ShopSeo, bX as ShopSeoIdentity, bY as SiteFormField, bZ as SiteFormFieldOption, b_ as SiteFormFieldType, b$ as Sitemap, c0 as SitemapEntry, c1 as StockBehavior, c2 as StockMode, c3 as StorefrontForm, c4 as StorefrontFormFieldErrorCode, c5 as StorefrontFormFile, c6 as StorefrontFormSettings, c7 as StorefrontFormSubmitInput, c8 as StorefrontFormSubmitResult, c9 as StorefrontFormUpload, ca as SubmitQuoteInput, cb as SubmitReturnInput, cc as SubmitReviewInput, cd as Subscription, ce as SubscriptionAction, cf as SubscriptionFrequency, cg as SubscriptionItem, ch as SubscriptionStatus, ci as TaxBreakdownLine, cj as VariantAxis, ck as VariantAxisValue, cl as WishlistItem, cm as clearCartSummary, cn as err, co as ok, cp as publishCartSummary, cq as toSdkError } from './client-t58lBodJ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
package/dist/index.js
CHANGED
|
@@ -1006,19 +1006,16 @@ function validationFieldMessages(err2, locale = "en") {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
return out;
|
|
1008
1008
|
}
|
|
1009
|
-
var FORM_FIELD_ERROR_CODES =
|
|
1010
|
-
required
|
|
1011
|
-
invalid
|
|
1012
|
-
tooShort
|
|
1013
|
-
tooLong
|
|
1014
|
-
min
|
|
1015
|
-
max
|
|
1016
|
-
notOption
|
|
1017
|
-
pattern
|
|
1018
|
-
|
|
1019
|
-
dateNotPast: true,
|
|
1020
|
-
tooManyFiles: true
|
|
1021
|
-
};
|
|
1009
|
+
var FORM_FIELD_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
1010
|
+
"required",
|
|
1011
|
+
"invalid",
|
|
1012
|
+
"tooShort",
|
|
1013
|
+
"tooLong",
|
|
1014
|
+
"min",
|
|
1015
|
+
"max",
|
|
1016
|
+
"notOption",
|
|
1017
|
+
"pattern"
|
|
1018
|
+
]);
|
|
1022
1019
|
function formFieldErrors(err2) {
|
|
1023
1020
|
if (errorCode(err2) !== "be.forms.validationFailed") return [];
|
|
1024
1021
|
const raw = errorParams(err2).errors;
|
|
@@ -1030,7 +1027,7 @@ function formFieldErrors(err2) {
|
|
|
1030
1027
|
if (idx <= 0) continue;
|
|
1031
1028
|
const key = entry.slice(0, idx);
|
|
1032
1029
|
const code = entry.slice(idx + 1);
|
|
1033
|
-
if (!
|
|
1030
|
+
if (!FORM_FIELD_ERROR_CODES.has(code)) continue;
|
|
1034
1031
|
out.push({ key, code });
|
|
1035
1032
|
}
|
|
1036
1033
|
return out;
|
package/dist/index.mjs
CHANGED
|
@@ -1006,19 +1006,16 @@ function validationFieldMessages(err2, locale = "en") {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
return out;
|
|
1008
1008
|
}
|
|
1009
|
-
var FORM_FIELD_ERROR_CODES =
|
|
1010
|
-
required
|
|
1011
|
-
invalid
|
|
1012
|
-
tooShort
|
|
1013
|
-
tooLong
|
|
1014
|
-
min
|
|
1015
|
-
max
|
|
1016
|
-
notOption
|
|
1017
|
-
pattern
|
|
1018
|
-
|
|
1019
|
-
dateNotPast: true,
|
|
1020
|
-
tooManyFiles: true
|
|
1021
|
-
};
|
|
1009
|
+
var FORM_FIELD_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
1010
|
+
"required",
|
|
1011
|
+
"invalid",
|
|
1012
|
+
"tooShort",
|
|
1013
|
+
"tooLong",
|
|
1014
|
+
"min",
|
|
1015
|
+
"max",
|
|
1016
|
+
"notOption",
|
|
1017
|
+
"pattern"
|
|
1018
|
+
]);
|
|
1022
1019
|
function formFieldErrors(err2) {
|
|
1023
1020
|
if (errorCode(err2) !== "be.forms.validationFailed") return [];
|
|
1024
1021
|
const raw = errorParams(err2).errors;
|
|
@@ -1030,7 +1027,7 @@ function formFieldErrors(err2) {
|
|
|
1030
1027
|
if (idx <= 0) continue;
|
|
1031
1028
|
const key = entry.slice(0, idx);
|
|
1032
1029
|
const code = entry.slice(idx + 1);
|
|
1033
|
-
if (!
|
|
1030
|
+
if (!FORM_FIELD_ERROR_CODES.has(code)) continue;
|
|
1034
1031
|
out.push({ key, code });
|
|
1035
1032
|
}
|
|
1036
1033
|
return out;
|
package/dist/next.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-
|
|
1
|
+
import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-t58lBodJ.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 { p as BehioStorefrontConfig, B as BehioStorefront } from './client-
|
|
1
|
+
import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-t58lBodJ.js';
|
|
2
2
|
|
|
3
3
|
interface GetBehioOptions extends Partial<BehioStorefrontConfig> {
|
|
4
4
|
/** Override the cart session cookie name (default: "behio_cart_session"). */
|
package/dist/react.d.mts
CHANGED
|
@@ -1260,7 +1260,15 @@ interface CheckoutPreview {
|
|
|
1260
1260
|
expiresAt: number;
|
|
1261
1261
|
}
|
|
1262
1262
|
interface CheckoutResult extends OrderDetail {
|
|
1263
|
+
/** Guest checkout only: 30-minute token for `orders.getByAccessToken()`. */
|
|
1263
1264
|
orderAccessToken?: string | null;
|
|
1265
|
+
/**
|
|
1266
|
+
* Permanent secret of the order (SDK 2.7.0), the same one used in `/track/{token}`
|
|
1267
|
+
* links from order e-mails and SMS. Keep it in an HttpOnly cookie of the browser
|
|
1268
|
+
* that placed the order and read the order with `orders.track(token)`, so the
|
|
1269
|
+
* confirmation page works without a login, a code or an expiry.
|
|
1270
|
+
*/
|
|
1271
|
+
trackingToken?: string;
|
|
1264
1272
|
}
|
|
1265
1273
|
/**
|
|
1266
1274
|
* Result of a registration. When the eshop requires admin approval,
|
|
@@ -1617,7 +1625,13 @@ interface OrderListItem {
|
|
|
1617
1625
|
interface OrderItem {
|
|
1618
1626
|
productName: string;
|
|
1619
1627
|
sku: string;
|
|
1620
|
-
|
|
1628
|
+
/** Photo snapshot from checkout, or the product's current photo. */
|
|
1629
|
+
imageUrl?: string | null;
|
|
1630
|
+
/** Product still in the shop (SDK 2.8.0). Null when it was removed since,
|
|
1631
|
+
* so a template never links to a missing product page. */
|
|
1632
|
+
productId?: string | null;
|
|
1633
|
+
/** URL slug for a link back to the product page (SDK 2.8.0). */
|
|
1634
|
+
productSlug?: string | null;
|
|
1621
1635
|
quantity: number;
|
|
1622
1636
|
unitPrice: number;
|
|
1623
1637
|
totalPrice: number;
|
|
@@ -1641,6 +1655,36 @@ interface OrderTracking {
|
|
|
1641
1655
|
shippingCountry: string | null;
|
|
1642
1656
|
items: OrderItem[];
|
|
1643
1657
|
createdAt: number;
|
|
1658
|
+
/** Order summary, not personal data (SDK 2.8.0). */
|
|
1659
|
+
subtotal?: number;
|
|
1660
|
+
shippingTotal?: number;
|
|
1661
|
+
paymentFee?: number | null;
|
|
1662
|
+
discountTotal?: number;
|
|
1663
|
+
taxTotal?: number;
|
|
1664
|
+
taxBreakdown?: TaxBreakdownLine[];
|
|
1665
|
+
/** Shipping method as the customer chose it (SDK 2.8.0). */
|
|
1666
|
+
shippingMethodName?: string | null;
|
|
1667
|
+
/** Payment method in the order language (SDK 2.8.0). */
|
|
1668
|
+
paymentMethodName?: string | null;
|
|
1669
|
+
/** Pickup point the customer chose, a public place (SDK 2.8.0). */
|
|
1670
|
+
pickupPoint?: OrderPickupPoint | null;
|
|
1671
|
+
/** Parcels the customer can follow (SDK 2.8.0). */
|
|
1672
|
+
shipments?: OrderShipment[];
|
|
1673
|
+
}
|
|
1674
|
+
/** Pickup point the customer chose for an order (SDK 2.8.0). */
|
|
1675
|
+
interface OrderPickupPoint {
|
|
1676
|
+
name: string;
|
|
1677
|
+
street?: string | null;
|
|
1678
|
+
city?: string | null;
|
|
1679
|
+
zip?: string | null;
|
|
1680
|
+
country?: string | null;
|
|
1681
|
+
}
|
|
1682
|
+
/** A parcel on its way, with the carrier's tracking link (SDK 2.8.0). */
|
|
1683
|
+
interface OrderShipment {
|
|
1684
|
+
trackingNumber?: string | null;
|
|
1685
|
+
trackingUrl?: string | null;
|
|
1686
|
+
status: string;
|
|
1687
|
+
createdAt: number;
|
|
1644
1688
|
}
|
|
1645
1689
|
interface OrderStatusHistory {
|
|
1646
1690
|
fromStatus?: OrderStatus;
|
|
@@ -1654,6 +1698,14 @@ interface OrderDetail extends OrderListItem {
|
|
|
1654
1698
|
contentDeliveryPending?: boolean;
|
|
1655
1699
|
/** False for an order without physical delivery. */
|
|
1656
1700
|
requiresShipping?: boolean;
|
|
1701
|
+
/** Shipping method as the customer chose it (SDK 2.8.0). */
|
|
1702
|
+
shippingMethodName?: string | null;
|
|
1703
|
+
/** Payment method in the order language (SDK 2.8.0). */
|
|
1704
|
+
paymentMethodName?: string | null;
|
|
1705
|
+
/** Pickup point the customer chose, a public place (SDK 2.8.0). */
|
|
1706
|
+
pickupPoint?: OrderPickupPoint | null;
|
|
1707
|
+
/** Parcels the customer can follow (SDK 2.8.0). */
|
|
1708
|
+
shipments?: OrderShipment[];
|
|
1657
1709
|
items: OrderItem[];
|
|
1658
1710
|
shippingAddress: CheckoutAddress;
|
|
1659
1711
|
billingAddress: CheckoutAddress;
|
package/dist/react.d.ts
CHANGED
|
@@ -1260,7 +1260,15 @@ interface CheckoutPreview {
|
|
|
1260
1260
|
expiresAt: number;
|
|
1261
1261
|
}
|
|
1262
1262
|
interface CheckoutResult extends OrderDetail {
|
|
1263
|
+
/** Guest checkout only: 30-minute token for `orders.getByAccessToken()`. */
|
|
1263
1264
|
orderAccessToken?: string | null;
|
|
1265
|
+
/**
|
|
1266
|
+
* Permanent secret of the order (SDK 2.7.0), the same one used in `/track/{token}`
|
|
1267
|
+
* links from order e-mails and SMS. Keep it in an HttpOnly cookie of the browser
|
|
1268
|
+
* that placed the order and read the order with `orders.track(token)`, so the
|
|
1269
|
+
* confirmation page works without a login, a code or an expiry.
|
|
1270
|
+
*/
|
|
1271
|
+
trackingToken?: string;
|
|
1264
1272
|
}
|
|
1265
1273
|
/**
|
|
1266
1274
|
* Result of a registration. When the eshop requires admin approval,
|
|
@@ -1617,7 +1625,13 @@ interface OrderListItem {
|
|
|
1617
1625
|
interface OrderItem {
|
|
1618
1626
|
productName: string;
|
|
1619
1627
|
sku: string;
|
|
1620
|
-
|
|
1628
|
+
/** Photo snapshot from checkout, or the product's current photo. */
|
|
1629
|
+
imageUrl?: string | null;
|
|
1630
|
+
/** Product still in the shop (SDK 2.8.0). Null when it was removed since,
|
|
1631
|
+
* so a template never links to a missing product page. */
|
|
1632
|
+
productId?: string | null;
|
|
1633
|
+
/** URL slug for a link back to the product page (SDK 2.8.0). */
|
|
1634
|
+
productSlug?: string | null;
|
|
1621
1635
|
quantity: number;
|
|
1622
1636
|
unitPrice: number;
|
|
1623
1637
|
totalPrice: number;
|
|
@@ -1641,6 +1655,36 @@ interface OrderTracking {
|
|
|
1641
1655
|
shippingCountry: string | null;
|
|
1642
1656
|
items: OrderItem[];
|
|
1643
1657
|
createdAt: number;
|
|
1658
|
+
/** Order summary, not personal data (SDK 2.8.0). */
|
|
1659
|
+
subtotal?: number;
|
|
1660
|
+
shippingTotal?: number;
|
|
1661
|
+
paymentFee?: number | null;
|
|
1662
|
+
discountTotal?: number;
|
|
1663
|
+
taxTotal?: number;
|
|
1664
|
+
taxBreakdown?: TaxBreakdownLine[];
|
|
1665
|
+
/** Shipping method as the customer chose it (SDK 2.8.0). */
|
|
1666
|
+
shippingMethodName?: string | null;
|
|
1667
|
+
/** Payment method in the order language (SDK 2.8.0). */
|
|
1668
|
+
paymentMethodName?: string | null;
|
|
1669
|
+
/** Pickup point the customer chose, a public place (SDK 2.8.0). */
|
|
1670
|
+
pickupPoint?: OrderPickupPoint | null;
|
|
1671
|
+
/** Parcels the customer can follow (SDK 2.8.0). */
|
|
1672
|
+
shipments?: OrderShipment[];
|
|
1673
|
+
}
|
|
1674
|
+
/** Pickup point the customer chose for an order (SDK 2.8.0). */
|
|
1675
|
+
interface OrderPickupPoint {
|
|
1676
|
+
name: string;
|
|
1677
|
+
street?: string | null;
|
|
1678
|
+
city?: string | null;
|
|
1679
|
+
zip?: string | null;
|
|
1680
|
+
country?: string | null;
|
|
1681
|
+
}
|
|
1682
|
+
/** A parcel on its way, with the carrier's tracking link (SDK 2.8.0). */
|
|
1683
|
+
interface OrderShipment {
|
|
1684
|
+
trackingNumber?: string | null;
|
|
1685
|
+
trackingUrl?: string | null;
|
|
1686
|
+
status: string;
|
|
1687
|
+
createdAt: number;
|
|
1644
1688
|
}
|
|
1645
1689
|
interface OrderStatusHistory {
|
|
1646
1690
|
fromStatus?: OrderStatus;
|
|
@@ -1654,6 +1698,14 @@ interface OrderDetail extends OrderListItem {
|
|
|
1654
1698
|
contentDeliveryPending?: boolean;
|
|
1655
1699
|
/** False for an order without physical delivery. */
|
|
1656
1700
|
requiresShipping?: boolean;
|
|
1701
|
+
/** Shipping method as the customer chose it (SDK 2.8.0). */
|
|
1702
|
+
shippingMethodName?: string | null;
|
|
1703
|
+
/** Payment method in the order language (SDK 2.8.0). */
|
|
1704
|
+
paymentMethodName?: string | null;
|
|
1705
|
+
/** Pickup point the customer chose, a public place (SDK 2.8.0). */
|
|
1706
|
+
pickupPoint?: OrderPickupPoint | null;
|
|
1707
|
+
/** Parcels the customer can follow (SDK 2.8.0). */
|
|
1708
|
+
shipments?: OrderShipment[];
|
|
1657
1709
|
items: OrderItem[];
|
|
1658
1710
|
shippingAddress: CheckoutAddress;
|
|
1659
1711
|
billingAddress: CheckoutAddress;
|
package/dist/react.js
CHANGED
|
@@ -4019,19 +4019,16 @@ function errorParams(err) {
|
|
|
4019
4019
|
const params = body?.params;
|
|
4020
4020
|
return params && typeof params === "object" && !Array.isArray(params) ? params : {};
|
|
4021
4021
|
}
|
|
4022
|
-
var FORM_FIELD_ERROR_CODES =
|
|
4023
|
-
required
|
|
4024
|
-
invalid
|
|
4025
|
-
tooShort
|
|
4026
|
-
tooLong
|
|
4027
|
-
min
|
|
4028
|
-
max
|
|
4029
|
-
notOption
|
|
4030
|
-
pattern
|
|
4031
|
-
|
|
4032
|
-
dateNotPast: true,
|
|
4033
|
-
tooManyFiles: true
|
|
4034
|
-
};
|
|
4022
|
+
var FORM_FIELD_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
4023
|
+
"required",
|
|
4024
|
+
"invalid",
|
|
4025
|
+
"tooShort",
|
|
4026
|
+
"tooLong",
|
|
4027
|
+
"min",
|
|
4028
|
+
"max",
|
|
4029
|
+
"notOption",
|
|
4030
|
+
"pattern"
|
|
4031
|
+
]);
|
|
4035
4032
|
function formFieldErrors(err) {
|
|
4036
4033
|
if (errorCode(err) !== "be.forms.validationFailed") return [];
|
|
4037
4034
|
const raw = errorParams(err).errors;
|
|
@@ -4043,7 +4040,7 @@ function formFieldErrors(err) {
|
|
|
4043
4040
|
if (idx <= 0) continue;
|
|
4044
4041
|
const key = entry.slice(0, idx);
|
|
4045
4042
|
const code = entry.slice(idx + 1);
|
|
4046
|
-
if (!
|
|
4043
|
+
if (!FORM_FIELD_ERROR_CODES.has(code)) continue;
|
|
4047
4044
|
out.push({ key, code });
|
|
4048
4045
|
}
|
|
4049
4046
|
return out;
|
package/dist/react.mjs
CHANGED
|
@@ -3909,19 +3909,16 @@ function errorParams(err) {
|
|
|
3909
3909
|
const params = body?.params;
|
|
3910
3910
|
return params && typeof params === "object" && !Array.isArray(params) ? params : {};
|
|
3911
3911
|
}
|
|
3912
|
-
var FORM_FIELD_ERROR_CODES =
|
|
3913
|
-
required
|
|
3914
|
-
invalid
|
|
3915
|
-
tooShort
|
|
3916
|
-
tooLong
|
|
3917
|
-
min
|
|
3918
|
-
max
|
|
3919
|
-
notOption
|
|
3920
|
-
pattern
|
|
3921
|
-
|
|
3922
|
-
dateNotPast: true,
|
|
3923
|
-
tooManyFiles: true
|
|
3924
|
-
};
|
|
3912
|
+
var FORM_FIELD_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
3913
|
+
"required",
|
|
3914
|
+
"invalid",
|
|
3915
|
+
"tooShort",
|
|
3916
|
+
"tooLong",
|
|
3917
|
+
"min",
|
|
3918
|
+
"max",
|
|
3919
|
+
"notOption",
|
|
3920
|
+
"pattern"
|
|
3921
|
+
]);
|
|
3925
3922
|
function formFieldErrors(err) {
|
|
3926
3923
|
if (errorCode(err) !== "be.forms.validationFailed") return [];
|
|
3927
3924
|
const raw = errorParams(err).errors;
|
|
@@ -3933,7 +3930,7 @@ function formFieldErrors(err) {
|
|
|
3933
3930
|
if (idx <= 0) continue;
|
|
3934
3931
|
const key = entry.slice(0, idx);
|
|
3935
3932
|
const code = entry.slice(idx + 1);
|
|
3936
|
-
if (!
|
|
3933
|
+
if (!FORM_FIELD_ERROR_CODES.has(code)) continue;
|
|
3937
3934
|
out.push({ key, code });
|
|
3938
3935
|
}
|
|
3939
3936
|
return out;
|