@behio/storefront-sdk 2.20.0 → 2.22.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 +22 -1
- package/dist/{chunk-NBYEO5KC.js → chunk-L7IIU5MZ.js} +26 -5
- package/dist/{chunk-N6YG4AJ4.mjs → chunk-VHHDIU6J.mjs} +21 -0
- package/dist/{client-B_nmL9ab.d.mts → client-BgU2lmu-.d.mts} +67 -1
- package/dist/{client-B_nmL9ab.d.ts → client-BgU2lmu-.d.ts} +67 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -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 +75 -1
- package/dist/react.d.ts +75 -1
- package/dist/react.js +88 -44
- package/dist/react.mjs +72 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ if (orderResult.error) throw new Error(orderResult.error.message);
|
|
|
78
78
|
### Websites without a shop (2.17.1)
|
|
79
79
|
|
|
80
80
|
Every Behio storefront belongs to a site. A site starts as a website: shop
|
|
81
|
-
info, SEO, pages, blogs, forms, collections and analytics work with its key,
|
|
81
|
+
info, SEO, pages, blogs, FAQ, forms, collections and analytics work with its key,
|
|
82
82
|
and categories and featured products return empty lists. The other shop
|
|
83
83
|
endpoints (products, cart, checkout, customer accounts, orders) answer 404 with
|
|
84
84
|
the code `be.storefront.siteKeyNotAllowed` until the merchant adds a shop to
|
|
@@ -204,6 +204,7 @@ The provider notifies hooks after restoring browser session storage.
|
|
|
204
204
|
| `consent` | Cookie consent (GDPR) |
|
|
205
205
|
| `quotes` | B2B quote requests |
|
|
206
206
|
| `pages` | CMS pages |
|
|
207
|
+
| `faq` | FAQ groups and visible questions in the requested language (web + e-shop) |
|
|
207
208
|
| `blog` | Blogs and published posts (web + e-shop) |
|
|
208
209
|
| `forms` | Merchant-defined forms: definition + validated submit with per-field errors (web + e-shop) |
|
|
209
210
|
|
|
@@ -211,6 +212,26 @@ The provider notifies hooks after restoring browser session storage.
|
|
|
211
212
|
|
|
212
213
|
`useProducts` · `useProduct` · `useCategories` · `useFeatured` · `useLabels` · `useSearch` · `useFilters` · `useBundles` · `useBundle` · `useCrossSell` · `useProductPromotions` · `useGiftCardBalance` · `useCart` · `useCheckout` · `useOrders` · `useOrder` · `useCustomer` · `useAddresses` · `useAddressAutocomplete` · `useWishlist` · `useProductReviews` · `useSubmitReview` · `useShopInfo` · `useShopSeo` · `useCartCount` · `useBlogs` · `useBlogPosts` · `useBlogPost` · `useSiteForm` · `useSiteFormSubmit`
|
|
213
214
|
|
|
215
|
+
### FAQ content (2.21.0)
|
|
216
|
+
|
|
217
|
+
Read FAQ groups configured for the site in the Behio admin. A group can be
|
|
218
|
+
addressed by its slug or ID. Hidden questions are excluded; missing translations
|
|
219
|
+
fall back to the site's default language. An unknown group returns a 404 error.
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
const groups = await storefront.faq.list({locale: 'cs'});
|
|
223
|
+
if (groups.error) throw new Error(groups.error.message);
|
|
224
|
+
|
|
225
|
+
const delivery = await storefront.faq.get('delivery', {locale: 'cs'});
|
|
226
|
+
if (delivery.error) throw new Error(delivery.error.message);
|
|
227
|
+
// delivery.data.items contains questions and sanitized HTML answers in admin order.
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
React clients can use `useFaqGroups({locale})` and `useFaqGroup(slugOrId, {locale})`
|
|
231
|
+
from `@behio/storefront-sdk/react` within `BehioProvider`. For SEO, include the
|
|
232
|
+
questions in server-rendered HTML and emit one FAQPage JSON-LD object containing
|
|
233
|
+
only the questions actually visible on that page.
|
|
234
|
+
|
|
214
235
|
### Framework Support
|
|
215
236
|
|
|
216
237
|
- **Next.js**: Server components + client hooks, SSR ready
|
|
@@ -203,6 +203,7 @@ var BehioStorefront = class {
|
|
|
203
203
|
this.blog = new BlogModule(this);
|
|
204
204
|
this.forms = new FormsModule(this);
|
|
205
205
|
this.collections = new CollectionsModule(this);
|
|
206
|
+
this.faq = new FaqModule(this);
|
|
206
207
|
this.wishlist = new WishlistModule(this);
|
|
207
208
|
this.reviews = new ReviewsModule(this);
|
|
208
209
|
this.returns = new ReturnsModule(this);
|
|
@@ -1859,6 +1860,26 @@ var CollectionsModule = class {
|
|
|
1859
1860
|
);
|
|
1860
1861
|
}
|
|
1861
1862
|
};
|
|
1863
|
+
var FaqModule = class {
|
|
1864
|
+
constructor(client) {
|
|
1865
|
+
this.client = client;
|
|
1866
|
+
}
|
|
1867
|
+
/** FAQ groups of the site in the admin order with the number of visible questions. */
|
|
1868
|
+
async list(query) {
|
|
1869
|
+
return this.client.request("GET", "/faq", {
|
|
1870
|
+
query: { locale: _optionalChain([query, 'optionalAccess', _49 => _49.locale]) }
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1873
|
+
/**
|
|
1874
|
+
* One group by its slug or id with its visible questions. 404
|
|
1875
|
+
* `be.faq.groupNotFound` for an unknown group.
|
|
1876
|
+
*/
|
|
1877
|
+
async get(group, query) {
|
|
1878
|
+
return this.client.request("GET", `/faq/${encodeURIComponent(group)}`, {
|
|
1879
|
+
query: { locale: _optionalChain([query, 'optionalAccess', _50 => _50.locale]) }
|
|
1880
|
+
});
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1862
1883
|
var FormsModule = class {
|
|
1863
1884
|
constructor(client) {
|
|
1864
1885
|
this.client = client;
|
|
@@ -2060,7 +2081,7 @@ var ConsentModule = class {
|
|
|
2060
2081
|
}
|
|
2061
2082
|
if (result.error) return { data: null, error: result.error };
|
|
2062
2083
|
return {
|
|
2063
|
-
data: _optionalChain([result, 'access',
|
|
2084
|
+
data: _optionalChain([result, 'access', _51 => _51.data, 'optionalAccess', _52 => _52.consented]) ? result.data.consent : null,
|
|
2064
2085
|
error: null
|
|
2065
2086
|
};
|
|
2066
2087
|
}
|
|
@@ -2147,10 +2168,10 @@ var ShippingModule = class {
|
|
|
2147
2168
|
*/
|
|
2148
2169
|
async listMethods(opts) {
|
|
2149
2170
|
const query = {};
|
|
2150
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
2151
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
2152
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
2153
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
2171
|
+
if (_optionalChain([opts, 'optionalAccess', _53 => _53.currency])) query.currency = opts.currency;
|
|
2172
|
+
if (_optionalChain([opts, 'optionalAccess', _54 => _54.country])) query.country = opts.country;
|
|
2173
|
+
if (_optionalChain([opts, 'optionalAccess', _55 => _55.cartTotal]) != null) query.cartTotal = String(opts.cartTotal);
|
|
2174
|
+
if (_optionalChain([opts, 'optionalAccess', _56 => _56.cartWeightKg]) != null)
|
|
2154
2175
|
query.cartWeightKg = String(opts.cartWeightKg);
|
|
2155
2176
|
return this.client.request(
|
|
2156
2177
|
"GET",
|
|
@@ -203,6 +203,7 @@ var BehioStorefront = class {
|
|
|
203
203
|
this.blog = new BlogModule(this);
|
|
204
204
|
this.forms = new FormsModule(this);
|
|
205
205
|
this.collections = new CollectionsModule(this);
|
|
206
|
+
this.faq = new FaqModule(this);
|
|
206
207
|
this.wishlist = new WishlistModule(this);
|
|
207
208
|
this.reviews = new ReviewsModule(this);
|
|
208
209
|
this.returns = new ReturnsModule(this);
|
|
@@ -1859,6 +1860,26 @@ var CollectionsModule = class {
|
|
|
1859
1860
|
);
|
|
1860
1861
|
}
|
|
1861
1862
|
};
|
|
1863
|
+
var FaqModule = class {
|
|
1864
|
+
constructor(client) {
|
|
1865
|
+
this.client = client;
|
|
1866
|
+
}
|
|
1867
|
+
/** FAQ groups of the site in the admin order with the number of visible questions. */
|
|
1868
|
+
async list(query) {
|
|
1869
|
+
return this.client.request("GET", "/faq", {
|
|
1870
|
+
query: { locale: query?.locale }
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1873
|
+
/**
|
|
1874
|
+
* One group by its slug or id with its visible questions. 404
|
|
1875
|
+
* `be.faq.groupNotFound` for an unknown group.
|
|
1876
|
+
*/
|
|
1877
|
+
async get(group, query) {
|
|
1878
|
+
return this.client.request("GET", `/faq/${encodeURIComponent(group)}`, {
|
|
1879
|
+
query: { locale: query?.locale }
|
|
1880
|
+
});
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1862
1883
|
var FormsModule = class {
|
|
1863
1884
|
constructor(client) {
|
|
1864
1885
|
this.client = client;
|
|
@@ -2200,6 +2200,8 @@ interface Page {
|
|
|
2200
2200
|
updatedAt?: number;
|
|
2201
2201
|
}
|
|
2202
2202
|
interface PageDetail {
|
|
2203
|
+
/** Stable public content identifier for template assignment. */
|
|
2204
|
+
id: string;
|
|
2203
2205
|
slug: string;
|
|
2204
2206
|
title: string;
|
|
2205
2207
|
/**
|
|
@@ -2241,6 +2243,8 @@ interface BlogSettings {
|
|
|
2241
2243
|
}
|
|
2242
2244
|
/** One blog (a group of posts). A site can have several: news, recipes, stories. */
|
|
2243
2245
|
interface Blog {
|
|
2246
|
+
/** Stable public content identifier for template assignment. */
|
|
2247
|
+
id: string;
|
|
2244
2248
|
/** URL segment: /blog/{handle} */
|
|
2245
2249
|
handle: string;
|
|
2246
2250
|
name: string;
|
|
@@ -2275,6 +2279,8 @@ interface BlogPostsPage {
|
|
|
2275
2279
|
tags: BlogTag[];
|
|
2276
2280
|
}
|
|
2277
2281
|
interface BlogPostDetail {
|
|
2282
|
+
/** Stable public content identifier for template assignment. */
|
|
2283
|
+
id: string;
|
|
2278
2284
|
slug: string;
|
|
2279
2285
|
blogHandle: string;
|
|
2280
2286
|
blogName: string;
|
|
@@ -2397,6 +2403,42 @@ interface StorefrontCollectionQuery {
|
|
|
2397
2403
|
limit?: number;
|
|
2398
2404
|
offset?: number;
|
|
2399
2405
|
}
|
|
2406
|
+
/** One visible question of an FAQ group. */
|
|
2407
|
+
interface StorefrontFaqItem {
|
|
2408
|
+
id: string;
|
|
2409
|
+
question: string;
|
|
2410
|
+
/** Cleaned HTML of the answer (paragraphs, emphasis, links, lists). */
|
|
2411
|
+
answer: string;
|
|
2412
|
+
}
|
|
2413
|
+
/** An FAQ group in the list (`GET /faq`). */
|
|
2414
|
+
interface StorefrontFaqGroupSummary {
|
|
2415
|
+
id: string;
|
|
2416
|
+
/** Stable identifier the owner sets in the admin (use it in code). */
|
|
2417
|
+
slug: string;
|
|
2418
|
+
name: string;
|
|
2419
|
+
description: string | null;
|
|
2420
|
+
/** Number of visible questions. */
|
|
2421
|
+
itemCount: number;
|
|
2422
|
+
}
|
|
2423
|
+
/** FAQ groups of the site in the admin order (`GET /faq`). */
|
|
2424
|
+
interface StorefrontFaqGroups {
|
|
2425
|
+
items: StorefrontFaqGroupSummary[];
|
|
2426
|
+
/** Language the texts are in (the requested one when the site offers it, else the main language). */
|
|
2427
|
+
locale: string;
|
|
2428
|
+
}
|
|
2429
|
+
/** One FAQ group with its visible questions in the admin order (`GET /faq/{group}`). */
|
|
2430
|
+
interface StorefrontFaqGroup {
|
|
2431
|
+
id: string;
|
|
2432
|
+
slug: string;
|
|
2433
|
+
name: string;
|
|
2434
|
+
description: string | null;
|
|
2435
|
+
locale: string;
|
|
2436
|
+
items: StorefrontFaqItem[];
|
|
2437
|
+
}
|
|
2438
|
+
interface StorefrontFaqQuery {
|
|
2439
|
+
/** Language of the texts; defaults to the client locale, then the main language of the site. */
|
|
2440
|
+
locale?: string;
|
|
2441
|
+
}
|
|
2400
2442
|
/** Public definition of a form (`GET /forms/{slug}`). */
|
|
2401
2443
|
interface StorefrontForm {
|
|
2402
2444
|
slug: string;
|
|
@@ -3304,6 +3346,7 @@ declare class BehioStorefront {
|
|
|
3304
3346
|
readonly blog: BlogModule;
|
|
3305
3347
|
readonly forms: FormsModule;
|
|
3306
3348
|
readonly collections: CollectionsModule;
|
|
3349
|
+
readonly faq: FaqModule;
|
|
3307
3350
|
readonly wishlist: WishlistModule;
|
|
3308
3351
|
readonly reviews: ReviewsModule;
|
|
3309
3352
|
readonly returns: ReturnsModule;
|
|
@@ -4034,6 +4077,29 @@ declare class CollectionsModule {
|
|
|
4034
4077
|
*/
|
|
4035
4078
|
item(slug: string, itemSlugOrId: string): Promise<SdkResult<StorefrontCollectionItem>>;
|
|
4036
4079
|
}
|
|
4080
|
+
/**
|
|
4081
|
+
* Frequently asked questions: groups of questions and answers the owner
|
|
4082
|
+
* writes in the Behio admin (FAQ module) in every language of the site.
|
|
4083
|
+
* Only visible questions are returned, in the admin order, in the requested
|
|
4084
|
+
* language (a missing translation falls back to the main language of the
|
|
4085
|
+
* site). Answers are cleaned HTML (paragraphs, emphasis, links, lists).
|
|
4086
|
+
* Cached by Behio and invalidated on every admin change. Works with website
|
|
4087
|
+
* keys that have no e-shop attached.
|
|
4088
|
+
*
|
|
4089
|
+
* Tip: render the questions with `FAQPage` structured data (JSON-LD) so
|
|
4090
|
+
* search engines and AI assistants recognise them as answers.
|
|
4091
|
+
*/
|
|
4092
|
+
declare class FaqModule {
|
|
4093
|
+
private client;
|
|
4094
|
+
constructor(client: BehioStorefront);
|
|
4095
|
+
/** FAQ groups of the site in the admin order with the number of visible questions. */
|
|
4096
|
+
list(query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroups>>;
|
|
4097
|
+
/**
|
|
4098
|
+
* One group by its slug or id with its visible questions. 404
|
|
4099
|
+
* `be.faq.groupNotFound` for an unknown group.
|
|
4100
|
+
*/
|
|
4101
|
+
get(group: string, query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroup>>;
|
|
4102
|
+
}
|
|
4037
4103
|
/**
|
|
4038
4104
|
* Merchant-defined forms (contact, demand, registration to an event...).
|
|
4039
4105
|
* The definition is public and cacheable; a submit is validated server-side
|
|
@@ -4255,4 +4321,4 @@ declare function clearCartSummary(): void;
|
|
|
4255
4321
|
/** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
|
|
4256
4322
|
declare function publishCartSummary(summary: CartSummaryEvent): void;
|
|
4257
4323
|
|
|
4258
|
-
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 OrderPaymentInstructions 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 LessonNote as aA, type LessonQuiz as aB, type LoginInput as aC, type LoyaltyBalance as aD, type LoyaltyNextTier as aE, type LoyaltyProgram as aF, type LoyaltyQuery as aG, type LoyaltyReferralResult as aH, type LoyaltySummary as aI, type LoyaltyTier as aJ, type LoyaltyTierPerks as aK, type LoyaltyTransaction as aL, type Menu as aM, type MenuItem as aN, type MenuItemRef as aO, type MenuItemType as aP, type MessageResponse as aQ, type NewsletterOptInDefault as aR, type NewsletterSubscribeInput as aS, type NewsletterSubscribeResult as aT, type NewsletterUnsubscribeResult as aU, type OrderAccessRequestResponse as aV, type OrderAccessVerifyResponse as aW, type OrderDetail as aX, type OrderDiscount as aY, type OrderItem as aZ, type OrderListItem as a_, type CurrencyDisplayFormat as aa, type CustomerAddress as ab, type CustomerBadge as ac, type CustomerChallenge as ad, type CustomerGamification as ae, type CustomerGamificationQuery as af, type CustomerProfile as ag, type DigitalDownload as ah, type DownloadUrl as ai, type Facet as aj, type FacetAvailability as ak, type FacetCategory as al, type FacetLabel as am, type FacetPriceRange as an, type FacetRange as ao, type FacetRatingBucket as ap, type FacetValue as aq, type FacetsResponse as ar, type FilterField as as, type FulfillmentStatus as at, FulfillmentStatuses as au, type GamificationRefreshResult as av, type GiftCardBalance as aw, type GiftCardPurchaseInput as ax, type GiftCardPurchaseResult as ay, type GiftCardSummary as az, type StorefrontFormFieldError as b, type ShopCommerce as b$, type OrderPickupPoint as b0, type OrderShipment as b1, type OrderStatus as b2, type OrderStatusHistory as b3, OrderStatuses as b4, type OrderTracking as b5, type Page as b6, type PageAttachment as b7, type PageDetail as b8, type PaginatedResponse as b9, type ProductSortValue as bA, type ProductVolumePrice as bB, type ProductsQuery as bC, type QuizAnswerInput as bD, type QuizAnswerResult as bE, type QuizQuestion as bF, type QuizResult as bG, type QuoteItem as bH, type QuoteRequest as bI, type RegisterInput as bJ, type RegisterResult as bK, type RequestInterceptor as bL, type RequestInterceptorConfig as bM, type ResponseInterceptor as bN, type ResponseInterceptorData as bO, type ReturnRequest as bP, type ReturnRequestItem as bQ, type ReturnStatus as bR, type ReturnStatusItem as bS, type ReturnableOrder as bT, type ReturnableOrderItem as bU, type SdkError as bV, type ShippingMethodSummary as bW, type ShippingPublicConfig as bX, type ShippingQuote as bY, type ShippingQuoteInput as bZ, type ShopAppearance as b_, type PaymentInstrument as ba, type PaymentStatus as bb, PaymentStatuses as bc, type PaymentSwift as bd, type PickupPoint as be, type PickupPointHours as bf, type PickupPointsInput as bg, type PickupWidgetConfig as bh, type PriceDisplay as bi, type ProductAssetGroup as bj, type ProductAssetItem as bk, type ProductAvailability as bl, type ProductGroup as bm, type ProductLabel as bn, type ProductListItem as bo, type ProductMedia as bp, type ProductMediaVariant as bq, type ProductParameter as br, type ProductParameterGroup as bs, type ProductParametersResponse as bt, type ProductPrice as bu, type ProductPromotionSummary as bv, type ProductReview as bw, type ProductReviewsResponse as bx, type ProductSibling as by, ProductSort as bz, type AddToCartInput as c, type ShopInfo as c0, type ShopScript as c1, type ShopScriptPlacement as c2, type ShopScriptType as c3, type ShopScripts as c4, type ShopSeo as c5, type ShopSeoIdentity as c6, type SiteFormField as c7, type SiteFormFieldOption as c8, type SiteFormFieldType as c9, type
|
|
4324
|
+
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 OrderPaymentInstructions 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 LessonNote as aA, type LessonQuiz as aB, type LoginInput as aC, type LoyaltyBalance as aD, type LoyaltyNextTier as aE, type LoyaltyProgram as aF, type LoyaltyQuery as aG, type LoyaltyReferralResult as aH, type LoyaltySummary as aI, type LoyaltyTier as aJ, type LoyaltyTierPerks as aK, type LoyaltyTransaction as aL, type Menu as aM, type MenuItem as aN, type MenuItemRef as aO, type MenuItemType as aP, type MessageResponse as aQ, type NewsletterOptInDefault as aR, type NewsletterSubscribeInput as aS, type NewsletterSubscribeResult as aT, type NewsletterUnsubscribeResult as aU, type OrderAccessRequestResponse as aV, type OrderAccessVerifyResponse as aW, type OrderDetail as aX, type OrderDiscount as aY, type OrderItem as aZ, type OrderListItem as a_, type CurrencyDisplayFormat as aa, type CustomerAddress as ab, type CustomerBadge as ac, type CustomerChallenge as ad, type CustomerGamification as ae, type CustomerGamificationQuery as af, type CustomerProfile as ag, type DigitalDownload as ah, type DownloadUrl as ai, type Facet as aj, type FacetAvailability as ak, type FacetCategory as al, type FacetLabel as am, type FacetPriceRange as an, type FacetRange as ao, type FacetRatingBucket as ap, type FacetValue as aq, type FacetsResponse as ar, type FilterField as as, type FulfillmentStatus as at, FulfillmentStatuses as au, type GamificationRefreshResult as av, type GiftCardBalance as aw, type GiftCardPurchaseInput as ax, type GiftCardPurchaseResult as ay, type GiftCardSummary as az, type StorefrontFormFieldError as b, type ShopCommerce as b$, type OrderPickupPoint as b0, type OrderShipment as b1, type OrderStatus as b2, type OrderStatusHistory as b3, OrderStatuses as b4, type OrderTracking as b5, type Page as b6, type PageAttachment as b7, type PageDetail as b8, type PaginatedResponse as b9, type ProductSortValue as bA, type ProductVolumePrice as bB, type ProductsQuery as bC, type QuizAnswerInput as bD, type QuizAnswerResult as bE, type QuizQuestion as bF, type QuizResult as bG, type QuoteItem as bH, type QuoteRequest as bI, type RegisterInput as bJ, type RegisterResult as bK, type RequestInterceptor as bL, type RequestInterceptorConfig as bM, type ResponseInterceptor as bN, type ResponseInterceptorData as bO, type ReturnRequest as bP, type ReturnRequestItem as bQ, type ReturnStatus as bR, type ReturnStatusItem as bS, type ReturnableOrder as bT, type ReturnableOrderItem as bU, type SdkError as bV, type ShippingMethodSummary as bW, type ShippingPublicConfig as bX, type ShippingQuote as bY, type ShippingQuoteInput as bZ, type ShopAppearance as b_, type PaymentInstrument as ba, type PaymentStatus as bb, PaymentStatuses as bc, type PaymentSwift as bd, type PickupPoint as be, type PickupPointHours as bf, type PickupPointsInput as bg, type PickupWidgetConfig as bh, type PriceDisplay as bi, type ProductAssetGroup as bj, type ProductAssetItem as bk, type ProductAvailability as bl, type ProductGroup as bm, type ProductLabel as bn, type ProductListItem as bo, type ProductMedia as bp, type ProductMediaVariant as bq, type ProductParameter as br, type ProductParameterGroup as bs, type ProductParametersResponse as bt, type ProductPrice as bu, type ProductPromotionSummary as bv, type ProductReview as bw, type ProductReviewsResponse as bx, type ProductSibling as by, ProductSort as bz, type AddToCartInput as c, type ShopInfo as c0, type ShopScript as c1, type ShopScriptPlacement as c2, type ShopScriptType as c3, type ShopScripts as c4, type ShopSeo as c5, type ShopSeoIdentity as c6, type SiteFormField as c7, type SiteFormFieldOption as c8, type SiteFormFieldType as c9, type SubscriptionFrequency as cA, type SubscriptionItem as cB, type SubscriptionStatus as cC, type TaxBreakdownLine as cD, type VariantAxis as cE, type VariantAxisValue as cF, type WishlistItem as cG, clearCartSummary as cH, err as cI, ok as cJ, publishCartSummary as cK, toSdkError as cL, type Sitemap as ca, type SitemapEntry as cb, type StockBehavior as cc, type StockMode as cd, type StorefrontCollection as ce, type StorefrontCollectionField as cf, type StorefrontCollectionFieldType as cg, type StorefrontCollectionItem as ch, type StorefrontCollectionQuery as ci, type StorefrontFaqGroup as cj, type StorefrontFaqGroupSummary as ck, type StorefrontFaqGroups as cl, type StorefrontFaqItem as cm, type StorefrontFaqQuery as cn, type StorefrontForm as co, type StorefrontFormFieldErrorCode as cp, type StorefrontFormFile as cq, type StorefrontFormSettings as cr, type StorefrontFormSubmitInput as cs, type StorefrontFormSubmitResult as ct, type StorefrontFormUpload as cu, type SubmitQuoteInput as cv, type SubmitReturnInput as cw, type SubmitReviewInput as cx, type Subscription as cy, type SubscriptionAction as cz, 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 };
|
|
@@ -2200,6 +2200,8 @@ interface Page {
|
|
|
2200
2200
|
updatedAt?: number;
|
|
2201
2201
|
}
|
|
2202
2202
|
interface PageDetail {
|
|
2203
|
+
/** Stable public content identifier for template assignment. */
|
|
2204
|
+
id: string;
|
|
2203
2205
|
slug: string;
|
|
2204
2206
|
title: string;
|
|
2205
2207
|
/**
|
|
@@ -2241,6 +2243,8 @@ interface BlogSettings {
|
|
|
2241
2243
|
}
|
|
2242
2244
|
/** One blog (a group of posts). A site can have several: news, recipes, stories. */
|
|
2243
2245
|
interface Blog {
|
|
2246
|
+
/** Stable public content identifier for template assignment. */
|
|
2247
|
+
id: string;
|
|
2244
2248
|
/** URL segment: /blog/{handle} */
|
|
2245
2249
|
handle: string;
|
|
2246
2250
|
name: string;
|
|
@@ -2275,6 +2279,8 @@ interface BlogPostsPage {
|
|
|
2275
2279
|
tags: BlogTag[];
|
|
2276
2280
|
}
|
|
2277
2281
|
interface BlogPostDetail {
|
|
2282
|
+
/** Stable public content identifier for template assignment. */
|
|
2283
|
+
id: string;
|
|
2278
2284
|
slug: string;
|
|
2279
2285
|
blogHandle: string;
|
|
2280
2286
|
blogName: string;
|
|
@@ -2397,6 +2403,42 @@ interface StorefrontCollectionQuery {
|
|
|
2397
2403
|
limit?: number;
|
|
2398
2404
|
offset?: number;
|
|
2399
2405
|
}
|
|
2406
|
+
/** One visible question of an FAQ group. */
|
|
2407
|
+
interface StorefrontFaqItem {
|
|
2408
|
+
id: string;
|
|
2409
|
+
question: string;
|
|
2410
|
+
/** Cleaned HTML of the answer (paragraphs, emphasis, links, lists). */
|
|
2411
|
+
answer: string;
|
|
2412
|
+
}
|
|
2413
|
+
/** An FAQ group in the list (`GET /faq`). */
|
|
2414
|
+
interface StorefrontFaqGroupSummary {
|
|
2415
|
+
id: string;
|
|
2416
|
+
/** Stable identifier the owner sets in the admin (use it in code). */
|
|
2417
|
+
slug: string;
|
|
2418
|
+
name: string;
|
|
2419
|
+
description: string | null;
|
|
2420
|
+
/** Number of visible questions. */
|
|
2421
|
+
itemCount: number;
|
|
2422
|
+
}
|
|
2423
|
+
/** FAQ groups of the site in the admin order (`GET /faq`). */
|
|
2424
|
+
interface StorefrontFaqGroups {
|
|
2425
|
+
items: StorefrontFaqGroupSummary[];
|
|
2426
|
+
/** Language the texts are in (the requested one when the site offers it, else the main language). */
|
|
2427
|
+
locale: string;
|
|
2428
|
+
}
|
|
2429
|
+
/** One FAQ group with its visible questions in the admin order (`GET /faq/{group}`). */
|
|
2430
|
+
interface StorefrontFaqGroup {
|
|
2431
|
+
id: string;
|
|
2432
|
+
slug: string;
|
|
2433
|
+
name: string;
|
|
2434
|
+
description: string | null;
|
|
2435
|
+
locale: string;
|
|
2436
|
+
items: StorefrontFaqItem[];
|
|
2437
|
+
}
|
|
2438
|
+
interface StorefrontFaqQuery {
|
|
2439
|
+
/** Language of the texts; defaults to the client locale, then the main language of the site. */
|
|
2440
|
+
locale?: string;
|
|
2441
|
+
}
|
|
2400
2442
|
/** Public definition of a form (`GET /forms/{slug}`). */
|
|
2401
2443
|
interface StorefrontForm {
|
|
2402
2444
|
slug: string;
|
|
@@ -3304,6 +3346,7 @@ declare class BehioStorefront {
|
|
|
3304
3346
|
readonly blog: BlogModule;
|
|
3305
3347
|
readonly forms: FormsModule;
|
|
3306
3348
|
readonly collections: CollectionsModule;
|
|
3349
|
+
readonly faq: FaqModule;
|
|
3307
3350
|
readonly wishlist: WishlistModule;
|
|
3308
3351
|
readonly reviews: ReviewsModule;
|
|
3309
3352
|
readonly returns: ReturnsModule;
|
|
@@ -4034,6 +4077,29 @@ declare class CollectionsModule {
|
|
|
4034
4077
|
*/
|
|
4035
4078
|
item(slug: string, itemSlugOrId: string): Promise<SdkResult<StorefrontCollectionItem>>;
|
|
4036
4079
|
}
|
|
4080
|
+
/**
|
|
4081
|
+
* Frequently asked questions: groups of questions and answers the owner
|
|
4082
|
+
* writes in the Behio admin (FAQ module) in every language of the site.
|
|
4083
|
+
* Only visible questions are returned, in the admin order, in the requested
|
|
4084
|
+
* language (a missing translation falls back to the main language of the
|
|
4085
|
+
* site). Answers are cleaned HTML (paragraphs, emphasis, links, lists).
|
|
4086
|
+
* Cached by Behio and invalidated on every admin change. Works with website
|
|
4087
|
+
* keys that have no e-shop attached.
|
|
4088
|
+
*
|
|
4089
|
+
* Tip: render the questions with `FAQPage` structured data (JSON-LD) so
|
|
4090
|
+
* search engines and AI assistants recognise them as answers.
|
|
4091
|
+
*/
|
|
4092
|
+
declare class FaqModule {
|
|
4093
|
+
private client;
|
|
4094
|
+
constructor(client: BehioStorefront);
|
|
4095
|
+
/** FAQ groups of the site in the admin order with the number of visible questions. */
|
|
4096
|
+
list(query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroups>>;
|
|
4097
|
+
/**
|
|
4098
|
+
* One group by its slug or id with its visible questions. 404
|
|
4099
|
+
* `be.faq.groupNotFound` for an unknown group.
|
|
4100
|
+
*/
|
|
4101
|
+
get(group: string, query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroup>>;
|
|
4102
|
+
}
|
|
4037
4103
|
/**
|
|
4038
4104
|
* Merchant-defined forms (contact, demand, registration to an event...).
|
|
4039
4105
|
* The definition is public and cacheable; a submit is validated server-side
|
|
@@ -4255,4 +4321,4 @@ declare function clearCartSummary(): void;
|
|
|
4255
4321
|
/** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
|
|
4256
4322
|
declare function publishCartSummary(summary: CartSummaryEvent): void;
|
|
4257
4323
|
|
|
4258
|
-
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 OrderPaymentInstructions 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 LessonNote as aA, type LessonQuiz as aB, type LoginInput as aC, type LoyaltyBalance as aD, type LoyaltyNextTier as aE, type LoyaltyProgram as aF, type LoyaltyQuery as aG, type LoyaltyReferralResult as aH, type LoyaltySummary as aI, type LoyaltyTier as aJ, type LoyaltyTierPerks as aK, type LoyaltyTransaction as aL, type Menu as aM, type MenuItem as aN, type MenuItemRef as aO, type MenuItemType as aP, type MessageResponse as aQ, type NewsletterOptInDefault as aR, type NewsletterSubscribeInput as aS, type NewsletterSubscribeResult as aT, type NewsletterUnsubscribeResult as aU, type OrderAccessRequestResponse as aV, type OrderAccessVerifyResponse as aW, type OrderDetail as aX, type OrderDiscount as aY, type OrderItem as aZ, type OrderListItem as a_, type CurrencyDisplayFormat as aa, type CustomerAddress as ab, type CustomerBadge as ac, type CustomerChallenge as ad, type CustomerGamification as ae, type CustomerGamificationQuery as af, type CustomerProfile as ag, type DigitalDownload as ah, type DownloadUrl as ai, type Facet as aj, type FacetAvailability as ak, type FacetCategory as al, type FacetLabel as am, type FacetPriceRange as an, type FacetRange as ao, type FacetRatingBucket as ap, type FacetValue as aq, type FacetsResponse as ar, type FilterField as as, type FulfillmentStatus as at, FulfillmentStatuses as au, type GamificationRefreshResult as av, type GiftCardBalance as aw, type GiftCardPurchaseInput as ax, type GiftCardPurchaseResult as ay, type GiftCardSummary as az, type StorefrontFormFieldError as b, type ShopCommerce as b$, type OrderPickupPoint as b0, type OrderShipment as b1, type OrderStatus as b2, type OrderStatusHistory as b3, OrderStatuses as b4, type OrderTracking as b5, type Page as b6, type PageAttachment as b7, type PageDetail as b8, type PaginatedResponse as b9, type ProductSortValue as bA, type ProductVolumePrice as bB, type ProductsQuery as bC, type QuizAnswerInput as bD, type QuizAnswerResult as bE, type QuizQuestion as bF, type QuizResult as bG, type QuoteItem as bH, type QuoteRequest as bI, type RegisterInput as bJ, type RegisterResult as bK, type RequestInterceptor as bL, type RequestInterceptorConfig as bM, type ResponseInterceptor as bN, type ResponseInterceptorData as bO, type ReturnRequest as bP, type ReturnRequestItem as bQ, type ReturnStatus as bR, type ReturnStatusItem as bS, type ReturnableOrder as bT, type ReturnableOrderItem as bU, type SdkError as bV, type ShippingMethodSummary as bW, type ShippingPublicConfig as bX, type ShippingQuote as bY, type ShippingQuoteInput as bZ, type ShopAppearance as b_, type PaymentInstrument as ba, type PaymentStatus as bb, PaymentStatuses as bc, type PaymentSwift as bd, type PickupPoint as be, type PickupPointHours as bf, type PickupPointsInput as bg, type PickupWidgetConfig as bh, type PriceDisplay as bi, type ProductAssetGroup as bj, type ProductAssetItem as bk, type ProductAvailability as bl, type ProductGroup as bm, type ProductLabel as bn, type ProductListItem as bo, type ProductMedia as bp, type ProductMediaVariant as bq, type ProductParameter as br, type ProductParameterGroup as bs, type ProductParametersResponse as bt, type ProductPrice as bu, type ProductPromotionSummary as bv, type ProductReview as bw, type ProductReviewsResponse as bx, type ProductSibling as by, ProductSort as bz, type AddToCartInput as c, type ShopInfo as c0, type ShopScript as c1, type ShopScriptPlacement as c2, type ShopScriptType as c3, type ShopScripts as c4, type ShopSeo as c5, type ShopSeoIdentity as c6, type SiteFormField as c7, type SiteFormFieldOption as c8, type SiteFormFieldType as c9, type
|
|
4324
|
+
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 OrderPaymentInstructions 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 LessonNote as aA, type LessonQuiz as aB, type LoginInput as aC, type LoyaltyBalance as aD, type LoyaltyNextTier as aE, type LoyaltyProgram as aF, type LoyaltyQuery as aG, type LoyaltyReferralResult as aH, type LoyaltySummary as aI, type LoyaltyTier as aJ, type LoyaltyTierPerks as aK, type LoyaltyTransaction as aL, type Menu as aM, type MenuItem as aN, type MenuItemRef as aO, type MenuItemType as aP, type MessageResponse as aQ, type NewsletterOptInDefault as aR, type NewsletterSubscribeInput as aS, type NewsletterSubscribeResult as aT, type NewsletterUnsubscribeResult as aU, type OrderAccessRequestResponse as aV, type OrderAccessVerifyResponse as aW, type OrderDetail as aX, type OrderDiscount as aY, type OrderItem as aZ, type OrderListItem as a_, type CurrencyDisplayFormat as aa, type CustomerAddress as ab, type CustomerBadge as ac, type CustomerChallenge as ad, type CustomerGamification as ae, type CustomerGamificationQuery as af, type CustomerProfile as ag, type DigitalDownload as ah, type DownloadUrl as ai, type Facet as aj, type FacetAvailability as ak, type FacetCategory as al, type FacetLabel as am, type FacetPriceRange as an, type FacetRange as ao, type FacetRatingBucket as ap, type FacetValue as aq, type FacetsResponse as ar, type FilterField as as, type FulfillmentStatus as at, FulfillmentStatuses as au, type GamificationRefreshResult as av, type GiftCardBalance as aw, type GiftCardPurchaseInput as ax, type GiftCardPurchaseResult as ay, type GiftCardSummary as az, type StorefrontFormFieldError as b, type ShopCommerce as b$, type OrderPickupPoint as b0, type OrderShipment as b1, type OrderStatus as b2, type OrderStatusHistory as b3, OrderStatuses as b4, type OrderTracking as b5, type Page as b6, type PageAttachment as b7, type PageDetail as b8, type PaginatedResponse as b9, type ProductSortValue as bA, type ProductVolumePrice as bB, type ProductsQuery as bC, type QuizAnswerInput as bD, type QuizAnswerResult as bE, type QuizQuestion as bF, type QuizResult as bG, type QuoteItem as bH, type QuoteRequest as bI, type RegisterInput as bJ, type RegisterResult as bK, type RequestInterceptor as bL, type RequestInterceptorConfig as bM, type ResponseInterceptor as bN, type ResponseInterceptorData as bO, type ReturnRequest as bP, type ReturnRequestItem as bQ, type ReturnStatus as bR, type ReturnStatusItem as bS, type ReturnableOrder as bT, type ReturnableOrderItem as bU, type SdkError as bV, type ShippingMethodSummary as bW, type ShippingPublicConfig as bX, type ShippingQuote as bY, type ShippingQuoteInput as bZ, type ShopAppearance as b_, type PaymentInstrument as ba, type PaymentStatus as bb, PaymentStatuses as bc, type PaymentSwift as bd, type PickupPoint as be, type PickupPointHours as bf, type PickupPointsInput as bg, type PickupWidgetConfig as bh, type PriceDisplay as bi, type ProductAssetGroup as bj, type ProductAssetItem as bk, type ProductAvailability as bl, type ProductGroup as bm, type ProductLabel as bn, type ProductListItem as bo, type ProductMedia as bp, type ProductMediaVariant as bq, type ProductParameter as br, type ProductParameterGroup as bs, type ProductParametersResponse as bt, type ProductPrice as bu, type ProductPromotionSummary as bv, type ProductReview as bw, type ProductReviewsResponse as bx, type ProductSibling as by, ProductSort as bz, type AddToCartInput as c, type ShopInfo as c0, type ShopScript as c1, type ShopScriptPlacement as c2, type ShopScriptType as c3, type ShopScripts as c4, type ShopSeo as c5, type ShopSeoIdentity as c6, type SiteFormField as c7, type SiteFormFieldOption as c8, type SiteFormFieldType as c9, type SubscriptionFrequency as cA, type SubscriptionItem as cB, type SubscriptionStatus as cC, type TaxBreakdownLine as cD, type VariantAxis as cE, type VariantAxisValue as cF, type WishlistItem as cG, clearCartSummary as cH, err as cI, ok as cJ, publishCartSummary as cK, toSdkError as cL, type Sitemap as ca, type SitemapEntry as cb, type StockBehavior as cc, type StockMode as cd, type StorefrontCollection as ce, type StorefrontCollectionField as cf, type StorefrontCollectionFieldType as cg, type StorefrontCollectionItem as ch, type StorefrontCollectionQuery as ci, type StorefrontFaqGroup as cj, type StorefrontFaqGroupSummary as ck, type StorefrontFaqGroups as cl, type StorefrontFaqItem as cm, type StorefrontFaqQuery as cn, type StorefrontForm as co, type StorefrontFormFieldErrorCode as cp, type StorefrontFormFile as cq, type StorefrontFormSettings as cr, type StorefrontFormSubmitInput as cs, type StorefrontFormSubmitResult as ct, type StorefrontFormUpload as cu, type SubmitQuoteInput as cv, type SubmitReturnInput as cw, type SubmitReviewInput as cx, type Subscription as cy, type SubscriptionAction as cz, 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 CustomerBadge, ad as CustomerChallenge, ae as CustomerGamification, af as CustomerGamificationQuery, ag as CustomerProfile, ah as DigitalDownload, ai as DownloadUrl, aj as Facet, ak as FacetAvailability, al as FacetCategory, am as FacetLabel, an as FacetPriceRange, ao as FacetRange, ap as FacetRatingBucket, aq as FacetValue, ar as FacetsResponse, as as FilterField, at as FulfillmentStatus, au as FulfillmentStatuses, av as GamificationRefreshResult, aw as GiftCardBalance, ax as GiftCardPurchaseInput, ay as GiftCardPurchaseResult, az as GiftCardSummary, aA as LessonNote, aB as LessonQuiz, aC as LoginInput, aD as LoyaltyBalance, aE as LoyaltyNextTier, aF as LoyaltyProgram, aG as LoyaltyQuery, aH as LoyaltyReferralResult, aI as LoyaltySummary, aJ as LoyaltyTier, aK as LoyaltyTierPerks, aL as LoyaltyTransaction, aM as Menu, aN as MenuItem, aO as MenuItemRef, aP as MenuItemType, aQ as MessageResponse, aR as NewsletterOptInDefault, aS as NewsletterSubscribeInput, aT as NewsletterSubscribeResult, aU as NewsletterUnsubscribeResult, aV as OrderAccessRequestResponse, aW as OrderAccessVerifyResponse, aX as OrderDetail, aY as OrderDiscount, aZ as OrderItem, a_ as OrderListItem, a$ as OrderPaymentInstructions, b0 as OrderPickupPoint, b1 as OrderShipment, b2 as OrderStatus, b3 as OrderStatusHistory, b4 as OrderStatuses, b5 as OrderTracking, b6 as Page, b7 as PageAttachment, b8 as PageDetail, b9 as PaginatedResponse, ba as PaymentInstrument, bb as PaymentStatus, bc as PaymentStatuses, bd as PaymentSwift, be as PickupPoint, bf as PickupPointHours, bg as PickupPointsInput, bh as PickupWidgetConfig, bi as PriceDisplay, bj as ProductAssetGroup, bk as ProductAssetItem, bl as ProductAvailability, bm as ProductGroup, bn as ProductLabel, bo as ProductListItem, bp as ProductMedia, bq as ProductMediaVariant, br as ProductParameter, bs as ProductParameterGroup, bt as ProductParametersResponse, bu as ProductPrice, bv as ProductPromotionSummary, bw as ProductReview, bx as ProductReviewsResponse, by as ProductSibling, bz as ProductSort, bA as ProductSortValue, bB as ProductVolumePrice, bC as ProductsQuery, bD as QuizAnswerInput, bE as QuizAnswerResult, bF as QuizQuestion, bG as QuizResult, bH as QuoteItem, bI as QuoteRequest, bJ as RegisterInput, bK as RegisterResult, bL as RequestInterceptor, bM as RequestInterceptorConfig, bN as ResponseInterceptor, bO as ResponseInterceptorData, bP as ReturnRequest, bQ as ReturnRequestItem, bR as ReturnStatus, bS as ReturnStatusItem, bT as ReturnableOrder, bU as ReturnableOrderItem, bV as SdkError, bW as ShippingMethodSummary, bX as ShippingPublicConfig, bY as ShippingQuote, bZ as ShippingQuoteInput, b_ as ShopAppearance, b$ as ShopCommerce, c0 as ShopInfo, c1 as ShopScript, c2 as ShopScriptPlacement, c3 as ShopScriptType, c4 as ShopScripts, c5 as ShopSeo, c6 as ShopSeoIdentity, c7 as SiteFormField, c8 as SiteFormFieldOption, c9 as SiteFormFieldType, ca as Sitemap, cb as SitemapEntry, cc as StockBehavior, cd as StockMode, ce as StorefrontCollection, cf as StorefrontCollectionField, cg as StorefrontCollectionFieldType, ch as StorefrontCollectionItem, ci as StorefrontCollectionQuery, cj as
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-BgU2lmu-.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 CustomerBadge, ad as CustomerChallenge, ae as CustomerGamification, af as CustomerGamificationQuery, ag as CustomerProfile, ah as DigitalDownload, ai as DownloadUrl, aj as Facet, ak as FacetAvailability, al as FacetCategory, am as FacetLabel, an as FacetPriceRange, ao as FacetRange, ap as FacetRatingBucket, aq as FacetValue, ar as FacetsResponse, as as FilterField, at as FulfillmentStatus, au as FulfillmentStatuses, av as GamificationRefreshResult, aw as GiftCardBalance, ax as GiftCardPurchaseInput, ay as GiftCardPurchaseResult, az as GiftCardSummary, aA as LessonNote, aB as LessonQuiz, aC as LoginInput, aD as LoyaltyBalance, aE as LoyaltyNextTier, aF as LoyaltyProgram, aG as LoyaltyQuery, aH as LoyaltyReferralResult, aI as LoyaltySummary, aJ as LoyaltyTier, aK as LoyaltyTierPerks, aL as LoyaltyTransaction, aM as Menu, aN as MenuItem, aO as MenuItemRef, aP as MenuItemType, aQ as MessageResponse, aR as NewsletterOptInDefault, aS as NewsletterSubscribeInput, aT as NewsletterSubscribeResult, aU as NewsletterUnsubscribeResult, aV as OrderAccessRequestResponse, aW as OrderAccessVerifyResponse, aX as OrderDetail, aY as OrderDiscount, aZ as OrderItem, a_ as OrderListItem, a$ as OrderPaymentInstructions, b0 as OrderPickupPoint, b1 as OrderShipment, b2 as OrderStatus, b3 as OrderStatusHistory, b4 as OrderStatuses, b5 as OrderTracking, b6 as Page, b7 as PageAttachment, b8 as PageDetail, b9 as PaginatedResponse, ba as PaymentInstrument, bb as PaymentStatus, bc as PaymentStatuses, bd as PaymentSwift, be as PickupPoint, bf as PickupPointHours, bg as PickupPointsInput, bh as PickupWidgetConfig, bi as PriceDisplay, bj as ProductAssetGroup, bk as ProductAssetItem, bl as ProductAvailability, bm as ProductGroup, bn as ProductLabel, bo as ProductListItem, bp as ProductMedia, bq as ProductMediaVariant, br as ProductParameter, bs as ProductParameterGroup, bt as ProductParametersResponse, bu as ProductPrice, bv as ProductPromotionSummary, bw as ProductReview, bx as ProductReviewsResponse, by as ProductSibling, bz as ProductSort, bA as ProductSortValue, bB as ProductVolumePrice, bC as ProductsQuery, bD as QuizAnswerInput, bE as QuizAnswerResult, bF as QuizQuestion, bG as QuizResult, bH as QuoteItem, bI as QuoteRequest, bJ as RegisterInput, bK as RegisterResult, bL as RequestInterceptor, bM as RequestInterceptorConfig, bN as ResponseInterceptor, bO as ResponseInterceptorData, bP as ReturnRequest, bQ as ReturnRequestItem, bR as ReturnStatus, bS as ReturnStatusItem, bT as ReturnableOrder, bU as ReturnableOrderItem, bV as SdkError, bW as ShippingMethodSummary, bX as ShippingPublicConfig, bY as ShippingQuote, bZ as ShippingQuoteInput, b_ as ShopAppearance, b$ as ShopCommerce, c0 as ShopInfo, c1 as ShopScript, c2 as ShopScriptPlacement, c3 as ShopScriptType, c4 as ShopScripts, c5 as ShopSeo, c6 as ShopSeoIdentity, c7 as SiteFormField, c8 as SiteFormFieldOption, c9 as SiteFormFieldType, ca as Sitemap, cb as SitemapEntry, cc as StockBehavior, cd as StockMode, ce as StorefrontCollection, cf as StorefrontCollectionField, cg as StorefrontCollectionFieldType, ch as StorefrontCollectionItem, ci as StorefrontCollectionQuery, cj as StorefrontFaqGroup, ck as StorefrontFaqGroupSummary, cl as StorefrontFaqGroups, cm as StorefrontFaqItem, cn as StorefrontFaqQuery, co as StorefrontForm, cp as StorefrontFormFieldErrorCode, cq as StorefrontFormFile, cr as StorefrontFormSettings, cs as StorefrontFormSubmitInput, ct as StorefrontFormSubmitResult, cu as StorefrontFormUpload, cv as SubmitQuoteInput, cw as SubmitReturnInput, cx as SubmitReviewInput, cy as Subscription, cz as SubscriptionAction, cA as SubscriptionFrequency, cB as SubscriptionItem, cC as SubscriptionStatus, cD as TaxBreakdownLine, cE as VariantAxis, cF as VariantAxisValue, cG as WishlistItem, cH as clearCartSummary, cI as err, cJ as ok, cK as publishCartSummary, cL as toSdkError } from './client-BgU2lmu-.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 CustomerBadge, ad as CustomerChallenge, ae as CustomerGamification, af as CustomerGamificationQuery, ag as CustomerProfile, ah as DigitalDownload, ai as DownloadUrl, aj as Facet, ak as FacetAvailability, al as FacetCategory, am as FacetLabel, an as FacetPriceRange, ao as FacetRange, ap as FacetRatingBucket, aq as FacetValue, ar as FacetsResponse, as as FilterField, at as FulfillmentStatus, au as FulfillmentStatuses, av as GamificationRefreshResult, aw as GiftCardBalance, ax as GiftCardPurchaseInput, ay as GiftCardPurchaseResult, az as GiftCardSummary, aA as LessonNote, aB as LessonQuiz, aC as LoginInput, aD as LoyaltyBalance, aE as LoyaltyNextTier, aF as LoyaltyProgram, aG as LoyaltyQuery, aH as LoyaltyReferralResult, aI as LoyaltySummary, aJ as LoyaltyTier, aK as LoyaltyTierPerks, aL as LoyaltyTransaction, aM as Menu, aN as MenuItem, aO as MenuItemRef, aP as MenuItemType, aQ as MessageResponse, aR as NewsletterOptInDefault, aS as NewsletterSubscribeInput, aT as NewsletterSubscribeResult, aU as NewsletterUnsubscribeResult, aV as OrderAccessRequestResponse, aW as OrderAccessVerifyResponse, aX as OrderDetail, aY as OrderDiscount, aZ as OrderItem, a_ as OrderListItem, a$ as OrderPaymentInstructions, b0 as OrderPickupPoint, b1 as OrderShipment, b2 as OrderStatus, b3 as OrderStatusHistory, b4 as OrderStatuses, b5 as OrderTracking, b6 as Page, b7 as PageAttachment, b8 as PageDetail, b9 as PaginatedResponse, ba as PaymentInstrument, bb as PaymentStatus, bc as PaymentStatuses, bd as PaymentSwift, be as PickupPoint, bf as PickupPointHours, bg as PickupPointsInput, bh as PickupWidgetConfig, bi as PriceDisplay, bj as ProductAssetGroup, bk as ProductAssetItem, bl as ProductAvailability, bm as ProductGroup, bn as ProductLabel, bo as ProductListItem, bp as ProductMedia, bq as ProductMediaVariant, br as ProductParameter, bs as ProductParameterGroup, bt as ProductParametersResponse, bu as ProductPrice, bv as ProductPromotionSummary, bw as ProductReview, bx as ProductReviewsResponse, by as ProductSibling, bz as ProductSort, bA as ProductSortValue, bB as ProductVolumePrice, bC as ProductsQuery, bD as QuizAnswerInput, bE as QuizAnswerResult, bF as QuizQuestion, bG as QuizResult, bH as QuoteItem, bI as QuoteRequest, bJ as RegisterInput, bK as RegisterResult, bL as RequestInterceptor, bM as RequestInterceptorConfig, bN as ResponseInterceptor, bO as ResponseInterceptorData, bP as ReturnRequest, bQ as ReturnRequestItem, bR as ReturnStatus, bS as ReturnStatusItem, bT as ReturnableOrder, bU as ReturnableOrderItem, bV as SdkError, bW as ShippingMethodSummary, bX as ShippingPublicConfig, bY as ShippingQuote, bZ as ShippingQuoteInput, b_ as ShopAppearance, b$ as ShopCommerce, c0 as ShopInfo, c1 as ShopScript, c2 as ShopScriptPlacement, c3 as ShopScriptType, c4 as ShopScripts, c5 as ShopSeo, c6 as ShopSeoIdentity, c7 as SiteFormField, c8 as SiteFormFieldOption, c9 as SiteFormFieldType, ca as Sitemap, cb as SitemapEntry, cc as StockBehavior, cd as StockMode, ce as StorefrontCollection, cf as StorefrontCollectionField, cg as StorefrontCollectionFieldType, ch as StorefrontCollectionItem, ci as StorefrontCollectionQuery, cj as
|
|
1
|
+
import { P as ProductDetail, a as ProductVariant, B as BehioStorefront, S as SdkResult, C as CookieConsent, b as StorefrontFormFieldError } from './client-BgU2lmu-.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 CustomerBadge, ad as CustomerChallenge, ae as CustomerGamification, af as CustomerGamificationQuery, ag as CustomerProfile, ah as DigitalDownload, ai as DownloadUrl, aj as Facet, ak as FacetAvailability, al as FacetCategory, am as FacetLabel, an as FacetPriceRange, ao as FacetRange, ap as FacetRatingBucket, aq as FacetValue, ar as FacetsResponse, as as FilterField, at as FulfillmentStatus, au as FulfillmentStatuses, av as GamificationRefreshResult, aw as GiftCardBalance, ax as GiftCardPurchaseInput, ay as GiftCardPurchaseResult, az as GiftCardSummary, aA as LessonNote, aB as LessonQuiz, aC as LoginInput, aD as LoyaltyBalance, aE as LoyaltyNextTier, aF as LoyaltyProgram, aG as LoyaltyQuery, aH as LoyaltyReferralResult, aI as LoyaltySummary, aJ as LoyaltyTier, aK as LoyaltyTierPerks, aL as LoyaltyTransaction, aM as Menu, aN as MenuItem, aO as MenuItemRef, aP as MenuItemType, aQ as MessageResponse, aR as NewsletterOptInDefault, aS as NewsletterSubscribeInput, aT as NewsletterSubscribeResult, aU as NewsletterUnsubscribeResult, aV as OrderAccessRequestResponse, aW as OrderAccessVerifyResponse, aX as OrderDetail, aY as OrderDiscount, aZ as OrderItem, a_ as OrderListItem, a$ as OrderPaymentInstructions, b0 as OrderPickupPoint, b1 as OrderShipment, b2 as OrderStatus, b3 as OrderStatusHistory, b4 as OrderStatuses, b5 as OrderTracking, b6 as Page, b7 as PageAttachment, b8 as PageDetail, b9 as PaginatedResponse, ba as PaymentInstrument, bb as PaymentStatus, bc as PaymentStatuses, bd as PaymentSwift, be as PickupPoint, bf as PickupPointHours, bg as PickupPointsInput, bh as PickupWidgetConfig, bi as PriceDisplay, bj as ProductAssetGroup, bk as ProductAssetItem, bl as ProductAvailability, bm as ProductGroup, bn as ProductLabel, bo as ProductListItem, bp as ProductMedia, bq as ProductMediaVariant, br as ProductParameter, bs as ProductParameterGroup, bt as ProductParametersResponse, bu as ProductPrice, bv as ProductPromotionSummary, bw as ProductReview, bx as ProductReviewsResponse, by as ProductSibling, bz as ProductSort, bA as ProductSortValue, bB as ProductVolumePrice, bC as ProductsQuery, bD as QuizAnswerInput, bE as QuizAnswerResult, bF as QuizQuestion, bG as QuizResult, bH as QuoteItem, bI as QuoteRequest, bJ as RegisterInput, bK as RegisterResult, bL as RequestInterceptor, bM as RequestInterceptorConfig, bN as ResponseInterceptor, bO as ResponseInterceptorData, bP as ReturnRequest, bQ as ReturnRequestItem, bR as ReturnStatus, bS as ReturnStatusItem, bT as ReturnableOrder, bU as ReturnableOrderItem, bV as SdkError, bW as ShippingMethodSummary, bX as ShippingPublicConfig, bY as ShippingQuote, bZ as ShippingQuoteInput, b_ as ShopAppearance, b$ as ShopCommerce, c0 as ShopInfo, c1 as ShopScript, c2 as ShopScriptPlacement, c3 as ShopScriptType, c4 as ShopScripts, c5 as ShopSeo, c6 as ShopSeoIdentity, c7 as SiteFormField, c8 as SiteFormFieldOption, c9 as SiteFormFieldType, ca as Sitemap, cb as SitemapEntry, cc as StockBehavior, cd as StockMode, ce as StorefrontCollection, cf as StorefrontCollectionField, cg as StorefrontCollectionFieldType, ch as StorefrontCollectionItem, ci as StorefrontCollectionQuery, cj as StorefrontFaqGroup, ck as StorefrontFaqGroupSummary, cl as StorefrontFaqGroups, cm as StorefrontFaqItem, cn as StorefrontFaqQuery, co as StorefrontForm, cp as StorefrontFormFieldErrorCode, cq as StorefrontFormFile, cr as StorefrontFormSettings, cs as StorefrontFormSubmitInput, ct as StorefrontFormSubmitResult, cu as StorefrontFormUpload, cv as SubmitQuoteInput, cw as SubmitReturnInput, cx as SubmitReviewInput, cy as Subscription, cz as SubscriptionAction, cA as SubscriptionFrequency, cB as SubscriptionItem, cC as SubscriptionStatus, cD as TaxBreakdownLine, cE as VariantAxis, cF as VariantAxisValue, cG as WishlistItem, cH as clearCartSummary, cI as err, cJ as ok, cK as publishCartSummary, cL as toSdkError } from './client-BgU2lmu-.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 _chunkL7IIU5MZjs = require('./chunk-L7IIU5MZ.js');
|
|
16
16
|
|
|
17
17
|
// src/react/utils/format-price.ts
|
|
18
18
|
function formatPrice(amount, currency, locale, display) {
|
|
@@ -1040,7 +1040,7 @@ var GENERIC = {
|
|
|
1040
1040
|
en: "Something went wrong, please try again."
|
|
1041
1041
|
};
|
|
1042
1042
|
function bodyOf(err2) {
|
|
1043
|
-
const body = err2 instanceof
|
|
1043
|
+
const body = err2 instanceof _chunkL7IIU5MZjs.BehioApiError ? err2.body : err2 && typeof err2 === "object" && "body" in err2 ? err2.body : err2;
|
|
1044
1044
|
return body && typeof body === "object" ? body : null;
|
|
1045
1045
|
}
|
|
1046
1046
|
function errorCode(err2) {
|
|
@@ -1157,4 +1157,4 @@ function formFieldErrors(err2) {
|
|
|
1157
1157
|
|
|
1158
1158
|
|
|
1159
1159
|
|
|
1160
|
-
exports.AddressTypes =
|
|
1160
|
+
exports.AddressTypes = _chunkL7IIU5MZjs.AddressTypes; exports.BehioApiError = _chunkL7IIU5MZjs.BehioApiError; exports.BehioNetworkError = _chunkL7IIU5MZjs.BehioNetworkError; exports.BehioStorefront = _chunkL7IIU5MZjs.BehioStorefront; exports.FulfillmentStatuses = _chunkL7IIU5MZjs.FulfillmentStatuses; exports.OrderStatuses = _chunkL7IIU5MZjs.OrderStatuses; exports.PaymentStatuses = _chunkL7IIU5MZjs.PaymentStatuses; exports.ProductSort = _chunkL7IIU5MZjs.ProductSort; exports.VARIANT_QUERY_PARAM = VARIANT_QUERY_PARAM; exports.availableAxisValues = availableAxisValues; exports.buildVariantComparison = buildVariantComparison; exports.clearCartSummary = _chunkL7IIU5MZjs.clearCartSummary; exports.err = _chunkL7IIU5MZjs.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 = _chunkL7IIU5MZjs.ok; exports.publishCartSummary = _chunkL7IIU5MZjs.publishCartSummary; exports.resolveVariantContent = resolveVariantContent; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkL7IIU5MZjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent; exports.validationFieldMessages = validationFieldMessages; exports.variantFromQuery = variantFromQuery; exports.variantHref = variantHref;
|
package/dist/index.mjs
CHANGED
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-BgU2lmu-.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-BgU2lmu-.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 _chunkL7IIU5MZjs = require('./chunk-L7IIU5MZ.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, _chunkL7IIU5MZjs.BehioStorefront)({
|
|
23
23
|
apiKey,
|
|
24
24
|
...baseUrl ? { baseUrl } : {},
|
|
25
25
|
...locale ? { locale } : {},
|