@behio/storefront-sdk 2.6.1 → 2.7.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 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,
@@ -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,
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-xoomjG8Z.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 OrderStatus, aU as OrderStatusHistory, aV as OrderStatuses, aW as OrderTracking, aX as Page, aY as PageAttachment, aZ as PageDetail, a_ as PaginatedResponse, a$ as PaymentInstrument, b0 as PaymentStatus, b1 as PaymentStatuses, b2 as PaymentSwift, b3 as PickupPoint, b4 as PickupPointHours, b5 as PickupPointsInput, b6 as PickupWidgetConfig, b7 as PriceDisplay, b8 as ProductAssetGroup, b9 as ProductAssetItem, ba as ProductAvailability, bb as ProductGroup, bc as ProductLabel, bd as ProductListItem, be as ProductMedia, bf as ProductMediaVariant, bg as ProductParameter, bh as ProductParameterGroup, bi as ProductParametersResponse, bj as ProductPrice, bk as ProductPromotionSummary, bl as ProductReview, bm as ProductReviewsResponse, bn as ProductSibling, bo as ProductSort, bp as ProductSortValue, bq as ProductVolumePrice, br as ProductsQuery, bs as QuizAnswerInput, bt as QuizAnswerResult, bu as QuizQuestion, bv as QuizResult, bw as QuoteItem, bx as QuoteRequest, by as RegisterInput, bz as RegisterResult, bA as RequestInterceptor, bB as RequestInterceptorConfig, bC as ResponseInterceptor, bD as ResponseInterceptorData, bE as ReturnRequest, bF as ReturnRequestItem, bG as ReturnStatus, bH as ReturnStatusItem, bI as ReturnableOrder, bJ as ReturnableOrderItem, bK as SdkError, bL as ShippingMethodSummary, bM as ShippingQuote, bN as ShippingQuoteInput, bO as ShopAppearance, bP as ShopInfo, bQ as ShopScript, bR as ShopScriptPlacement, bS as ShopScriptType, bT as ShopScripts, bU as ShopSeo, bV as ShopSeoIdentity, bW as SiteFormField, bX as SiteFormFieldOption, bY as SiteFormFieldType, bZ as Sitemap, b_ as SitemapEntry, b$ as StockBehavior, c0 as StockMode, c1 as StorefrontForm, c2 as StorefrontFormFieldErrorCode, c3 as StorefrontFormFile, c4 as StorefrontFormSettings, c5 as StorefrontFormSubmitInput, c6 as StorefrontFormSubmitResult, c7 as StorefrontFormUpload, c8 as SubmitQuoteInput, c9 as SubmitReturnInput, ca as SubmitReviewInput, cb as Subscription, cc as SubscriptionAction, cd as SubscriptionFrequency, ce as SubscriptionItem, cf as SubscriptionStatus, cg as TaxBreakdownLine, ch as VariantAxis, ci as VariantAxisValue, cj as WishlistItem, ck as clearCartSummary, cl as err, cm as ok, cn as publishCartSummary, co as toSdkError } from './client-xoomjG8Z.mjs';
1
+ import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-SeKujCLk.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 OrderStatus, aU as OrderStatusHistory, aV as OrderStatuses, aW as OrderTracking, aX as Page, aY as PageAttachment, aZ as PageDetail, a_ as PaginatedResponse, a$ as PaymentInstrument, b0 as PaymentStatus, b1 as PaymentStatuses, b2 as PaymentSwift, b3 as PickupPoint, b4 as PickupPointHours, b5 as PickupPointsInput, b6 as PickupWidgetConfig, b7 as PriceDisplay, b8 as ProductAssetGroup, b9 as ProductAssetItem, ba as ProductAvailability, bb as ProductGroup, bc as ProductLabel, bd as ProductListItem, be as ProductMedia, bf as ProductMediaVariant, bg as ProductParameter, bh as ProductParameterGroup, bi as ProductParametersResponse, bj as ProductPrice, bk as ProductPromotionSummary, bl as ProductReview, bm as ProductReviewsResponse, bn as ProductSibling, bo as ProductSort, bp as ProductSortValue, bq as ProductVolumePrice, br as ProductsQuery, bs as QuizAnswerInput, bt as QuizAnswerResult, bu as QuizQuestion, bv as QuizResult, bw as QuoteItem, bx as QuoteRequest, by as RegisterInput, bz as RegisterResult, bA as RequestInterceptor, bB as RequestInterceptorConfig, bC as ResponseInterceptor, bD as ResponseInterceptorData, bE as ReturnRequest, bF as ReturnRequestItem, bG as ReturnStatus, bH as ReturnStatusItem, bI as ReturnableOrder, bJ as ReturnableOrderItem, bK as SdkError, bL as ShippingMethodSummary, bM as ShippingQuote, bN as ShippingQuoteInput, bO as ShopAppearance, bP as ShopInfo, bQ as ShopScript, bR as ShopScriptPlacement, bS as ShopScriptType, bT as ShopScripts, bU as ShopSeo, bV as ShopSeoIdentity, bW as SiteFormField, bX as SiteFormFieldOption, bY as SiteFormFieldType, bZ as Sitemap, b_ as SitemapEntry, b$ as StockBehavior, c0 as StockMode, c1 as StorefrontForm, c2 as StorefrontFormFieldErrorCode, c3 as StorefrontFormFile, c4 as StorefrontFormSettings, c5 as StorefrontFormSubmitInput, c6 as StorefrontFormSubmitResult, c7 as StorefrontFormUpload, c8 as SubmitQuoteInput, c9 as SubmitReturnInput, ca as SubmitReviewInput, cb as Subscription, cc as SubscriptionAction, cd as SubscriptionFrequency, ce as SubscriptionItem, cf as SubscriptionStatus, cg as TaxBreakdownLine, ch as VariantAxis, ci as VariantAxisValue, cj as WishlistItem, ck as clearCartSummary, cl as err, cm as ok, cn as publishCartSummary, co as toSdkError } from './client-SeKujCLk.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-xoomjG8Z.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 OrderStatus, aU as OrderStatusHistory, aV as OrderStatuses, aW as OrderTracking, aX as Page, aY as PageAttachment, aZ as PageDetail, a_ as PaginatedResponse, a$ as PaymentInstrument, b0 as PaymentStatus, b1 as PaymentStatuses, b2 as PaymentSwift, b3 as PickupPoint, b4 as PickupPointHours, b5 as PickupPointsInput, b6 as PickupWidgetConfig, b7 as PriceDisplay, b8 as ProductAssetGroup, b9 as ProductAssetItem, ba as ProductAvailability, bb as ProductGroup, bc as ProductLabel, bd as ProductListItem, be as ProductMedia, bf as ProductMediaVariant, bg as ProductParameter, bh as ProductParameterGroup, bi as ProductParametersResponse, bj as ProductPrice, bk as ProductPromotionSummary, bl as ProductReview, bm as ProductReviewsResponse, bn as ProductSibling, bo as ProductSort, bp as ProductSortValue, bq as ProductVolumePrice, br as ProductsQuery, bs as QuizAnswerInput, bt as QuizAnswerResult, bu as QuizQuestion, bv as QuizResult, bw as QuoteItem, bx as QuoteRequest, by as RegisterInput, bz as RegisterResult, bA as RequestInterceptor, bB as RequestInterceptorConfig, bC as ResponseInterceptor, bD as ResponseInterceptorData, bE as ReturnRequest, bF as ReturnRequestItem, bG as ReturnStatus, bH as ReturnStatusItem, bI as ReturnableOrder, bJ as ReturnableOrderItem, bK as SdkError, bL as ShippingMethodSummary, bM as ShippingQuote, bN as ShippingQuoteInput, bO as ShopAppearance, bP as ShopInfo, bQ as ShopScript, bR as ShopScriptPlacement, bS as ShopScriptType, bT as ShopScripts, bU as ShopSeo, bV as ShopSeoIdentity, bW as SiteFormField, bX as SiteFormFieldOption, bY as SiteFormFieldType, bZ as Sitemap, b_ as SitemapEntry, b$ as StockBehavior, c0 as StockMode, c1 as StorefrontForm, c2 as StorefrontFormFieldErrorCode, c3 as StorefrontFormFile, c4 as StorefrontFormSettings, c5 as StorefrontFormSubmitInput, c6 as StorefrontFormSubmitResult, c7 as StorefrontFormUpload, c8 as SubmitQuoteInput, c9 as SubmitReturnInput, ca as SubmitReviewInput, cb as Subscription, cc as SubscriptionAction, cd as SubscriptionFrequency, ce as SubscriptionItem, cf as SubscriptionStatus, cg as TaxBreakdownLine, ch as VariantAxis, ci as VariantAxisValue, cj as WishlistItem, ck as clearCartSummary, cl as err, cm as ok, cn as publishCartSummary, co as toSdkError } from './client-xoomjG8Z.js';
1
+ import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-SeKujCLk.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 OrderStatus, aU as OrderStatusHistory, aV as OrderStatuses, aW as OrderTracking, aX as Page, aY as PageAttachment, aZ as PageDetail, a_ as PaginatedResponse, a$ as PaymentInstrument, b0 as PaymentStatus, b1 as PaymentStatuses, b2 as PaymentSwift, b3 as PickupPoint, b4 as PickupPointHours, b5 as PickupPointsInput, b6 as PickupWidgetConfig, b7 as PriceDisplay, b8 as ProductAssetGroup, b9 as ProductAssetItem, ba as ProductAvailability, bb as ProductGroup, bc as ProductLabel, bd as ProductListItem, be as ProductMedia, bf as ProductMediaVariant, bg as ProductParameter, bh as ProductParameterGroup, bi as ProductParametersResponse, bj as ProductPrice, bk as ProductPromotionSummary, bl as ProductReview, bm as ProductReviewsResponse, bn as ProductSibling, bo as ProductSort, bp as ProductSortValue, bq as ProductVolumePrice, br as ProductsQuery, bs as QuizAnswerInput, bt as QuizAnswerResult, bu as QuizQuestion, bv as QuizResult, bw as QuoteItem, bx as QuoteRequest, by as RegisterInput, bz as RegisterResult, bA as RequestInterceptor, bB as RequestInterceptorConfig, bC as ResponseInterceptor, bD as ResponseInterceptorData, bE as ReturnRequest, bF as ReturnRequestItem, bG as ReturnStatus, bH as ReturnStatusItem, bI as ReturnableOrder, bJ as ReturnableOrderItem, bK as SdkError, bL as ShippingMethodSummary, bM as ShippingQuote, bN as ShippingQuoteInput, bO as ShopAppearance, bP as ShopInfo, bQ as ShopScript, bR as ShopScriptPlacement, bS as ShopScriptType, bT as ShopScripts, bU as ShopSeo, bV as ShopSeoIdentity, bW as SiteFormField, bX as SiteFormFieldOption, bY as SiteFormFieldType, bZ as Sitemap, b_ as SitemapEntry, b$ as StockBehavior, c0 as StockMode, c1 as StorefrontForm, c2 as StorefrontFormFieldErrorCode, c3 as StorefrontFormFile, c4 as StorefrontFormSettings, c5 as StorefrontFormSubmitInput, c6 as StorefrontFormSubmitResult, c7 as StorefrontFormUpload, c8 as SubmitQuoteInput, c9 as SubmitReturnInput, ca as SubmitReviewInput, cb as Subscription, cc as SubscriptionAction, cd as SubscriptionFrequency, ce as SubscriptionItem, cf as SubscriptionStatus, cg as TaxBreakdownLine, ch as VariantAxis, ci as VariantAxisValue, cj as WishlistItem, ck as clearCartSummary, cl as err, cm as ok, cn as publishCartSummary, co as toSdkError } from './client-SeKujCLk.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: true,
1011
- invalid: true,
1012
- tooShort: true,
1013
- tooLong: true,
1014
- min: true,
1015
- max: true,
1016
- notOption: true,
1017
- pattern: true,
1018
- dateNotFuture: true,
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 (!Object.prototype.hasOwnProperty.call(FORM_FIELD_ERROR_CODES, code)) continue;
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: true,
1011
- invalid: true,
1012
- tooShort: true,
1013
- tooLong: true,
1014
- min: true,
1015
- max: true,
1016
- notOption: true,
1017
- pattern: true,
1018
- dateNotFuture: true,
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 (!Object.prototype.hasOwnProperty.call(FORM_FIELD_ERROR_CODES, code)) continue;
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-xoomjG8Z.mjs';
1
+ import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-SeKujCLk.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-xoomjG8Z.js';
1
+ import { p as BehioStorefrontConfig, B as BehioStorefront } from './client-SeKujCLk.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,
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,
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: true,
4024
- invalid: true,
4025
- tooShort: true,
4026
- tooLong: true,
4027
- min: true,
4028
- max: true,
4029
- notOption: true,
4030
- pattern: true,
4031
- dateNotFuture: true,
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 (!Object.prototype.hasOwnProperty.call(FORM_FIELD_ERROR_CODES, code)) continue;
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: true,
3914
- invalid: true,
3915
- tooShort: true,
3916
- tooLong: true,
3917
- min: true,
3918
- max: true,
3919
- notOption: true,
3920
- pattern: true,
3921
- dateNotFuture: true,
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 (!Object.prototype.hasOwnProperty.call(FORM_FIELD_ERROR_CODES, code)) continue;
3933
+ if (!FORM_FIELD_ERROR_CODES.has(code)) continue;
3937
3934
  out.push({ key, code });
3938
3935
  }
3939
3936
  return out;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@behio/storefront-sdk",
3
- "version": "2.6.1",
3
+ "version": "2.7.0",
4
4
  "description": "TypeScript SDK for Behio headless e-commerce: core client + React hooks",
5
5
  "author": "Behio",
6
6
  "license": "MIT",