@behio/storefront-sdk 2.20.0 → 2.21.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-C5ODb5cR.d.mts} +61 -1
- package/dist/{client-B_nmL9ab.d.ts → client-C5ODb5cR.d.ts} +61 -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 +69 -1
- package/dist/react.d.ts +69 -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;
|
|
@@ -2397,6 +2397,42 @@ interface StorefrontCollectionQuery {
|
|
|
2397
2397
|
limit?: number;
|
|
2398
2398
|
offset?: number;
|
|
2399
2399
|
}
|
|
2400
|
+
/** One visible question of an FAQ group. */
|
|
2401
|
+
interface StorefrontFaqItem {
|
|
2402
|
+
id: string;
|
|
2403
|
+
question: string;
|
|
2404
|
+
/** Cleaned HTML of the answer (paragraphs, emphasis, links, lists). */
|
|
2405
|
+
answer: string;
|
|
2406
|
+
}
|
|
2407
|
+
/** An FAQ group in the list (`GET /faq`). */
|
|
2408
|
+
interface StorefrontFaqGroupSummary {
|
|
2409
|
+
id: string;
|
|
2410
|
+
/** Stable identifier the owner sets in the admin (use it in code). */
|
|
2411
|
+
slug: string;
|
|
2412
|
+
name: string;
|
|
2413
|
+
description: string | null;
|
|
2414
|
+
/** Number of visible questions. */
|
|
2415
|
+
itemCount: number;
|
|
2416
|
+
}
|
|
2417
|
+
/** FAQ groups of the site in the admin order (`GET /faq`). */
|
|
2418
|
+
interface StorefrontFaqGroups {
|
|
2419
|
+
items: StorefrontFaqGroupSummary[];
|
|
2420
|
+
/** Language the texts are in (the requested one when the site offers it, else the main language). */
|
|
2421
|
+
locale: string;
|
|
2422
|
+
}
|
|
2423
|
+
/** One FAQ group with its visible questions in the admin order (`GET /faq/{group}`). */
|
|
2424
|
+
interface StorefrontFaqGroup {
|
|
2425
|
+
id: string;
|
|
2426
|
+
slug: string;
|
|
2427
|
+
name: string;
|
|
2428
|
+
description: string | null;
|
|
2429
|
+
locale: string;
|
|
2430
|
+
items: StorefrontFaqItem[];
|
|
2431
|
+
}
|
|
2432
|
+
interface StorefrontFaqQuery {
|
|
2433
|
+
/** Language of the texts; defaults to the client locale, then the main language of the site. */
|
|
2434
|
+
locale?: string;
|
|
2435
|
+
}
|
|
2400
2436
|
/** Public definition of a form (`GET /forms/{slug}`). */
|
|
2401
2437
|
interface StorefrontForm {
|
|
2402
2438
|
slug: string;
|
|
@@ -3304,6 +3340,7 @@ declare class BehioStorefront {
|
|
|
3304
3340
|
readonly blog: BlogModule;
|
|
3305
3341
|
readonly forms: FormsModule;
|
|
3306
3342
|
readonly collections: CollectionsModule;
|
|
3343
|
+
readonly faq: FaqModule;
|
|
3307
3344
|
readonly wishlist: WishlistModule;
|
|
3308
3345
|
readonly reviews: ReviewsModule;
|
|
3309
3346
|
readonly returns: ReturnsModule;
|
|
@@ -4034,6 +4071,29 @@ declare class CollectionsModule {
|
|
|
4034
4071
|
*/
|
|
4035
4072
|
item(slug: string, itemSlugOrId: string): Promise<SdkResult<StorefrontCollectionItem>>;
|
|
4036
4073
|
}
|
|
4074
|
+
/**
|
|
4075
|
+
* Frequently asked questions: groups of questions and answers the owner
|
|
4076
|
+
* writes in the Behio admin (FAQ module) in every language of the site.
|
|
4077
|
+
* Only visible questions are returned, in the admin order, in the requested
|
|
4078
|
+
* language (a missing translation falls back to the main language of the
|
|
4079
|
+
* site). Answers are cleaned HTML (paragraphs, emphasis, links, lists).
|
|
4080
|
+
* Cached by Behio and invalidated on every admin change. Works with website
|
|
4081
|
+
* keys that have no e-shop attached.
|
|
4082
|
+
*
|
|
4083
|
+
* Tip: render the questions with `FAQPage` structured data (JSON-LD) so
|
|
4084
|
+
* search engines and AI assistants recognise them as answers.
|
|
4085
|
+
*/
|
|
4086
|
+
declare class FaqModule {
|
|
4087
|
+
private client;
|
|
4088
|
+
constructor(client: BehioStorefront);
|
|
4089
|
+
/** FAQ groups of the site in the admin order with the number of visible questions. */
|
|
4090
|
+
list(query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroups>>;
|
|
4091
|
+
/**
|
|
4092
|
+
* One group by its slug or id with its visible questions. 404
|
|
4093
|
+
* `be.faq.groupNotFound` for an unknown group.
|
|
4094
|
+
*/
|
|
4095
|
+
get(group: string, query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroup>>;
|
|
4096
|
+
}
|
|
4037
4097
|
/**
|
|
4038
4098
|
* Merchant-defined forms (contact, demand, registration to an event...).
|
|
4039
4099
|
* The definition is public and cacheable; a submit is validated server-side
|
|
@@ -4255,4 +4315,4 @@ declare function clearCartSummary(): void;
|
|
|
4255
4315
|
/** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
|
|
4256
4316
|
declare function publishCartSummary(summary: CartSummaryEvent): void;
|
|
4257
4317
|
|
|
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
|
|
4318
|
+
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 };
|
|
@@ -2397,6 +2397,42 @@ interface StorefrontCollectionQuery {
|
|
|
2397
2397
|
limit?: number;
|
|
2398
2398
|
offset?: number;
|
|
2399
2399
|
}
|
|
2400
|
+
/** One visible question of an FAQ group. */
|
|
2401
|
+
interface StorefrontFaqItem {
|
|
2402
|
+
id: string;
|
|
2403
|
+
question: string;
|
|
2404
|
+
/** Cleaned HTML of the answer (paragraphs, emphasis, links, lists). */
|
|
2405
|
+
answer: string;
|
|
2406
|
+
}
|
|
2407
|
+
/** An FAQ group in the list (`GET /faq`). */
|
|
2408
|
+
interface StorefrontFaqGroupSummary {
|
|
2409
|
+
id: string;
|
|
2410
|
+
/** Stable identifier the owner sets in the admin (use it in code). */
|
|
2411
|
+
slug: string;
|
|
2412
|
+
name: string;
|
|
2413
|
+
description: string | null;
|
|
2414
|
+
/** Number of visible questions. */
|
|
2415
|
+
itemCount: number;
|
|
2416
|
+
}
|
|
2417
|
+
/** FAQ groups of the site in the admin order (`GET /faq`). */
|
|
2418
|
+
interface StorefrontFaqGroups {
|
|
2419
|
+
items: StorefrontFaqGroupSummary[];
|
|
2420
|
+
/** Language the texts are in (the requested one when the site offers it, else the main language). */
|
|
2421
|
+
locale: string;
|
|
2422
|
+
}
|
|
2423
|
+
/** One FAQ group with its visible questions in the admin order (`GET /faq/{group}`). */
|
|
2424
|
+
interface StorefrontFaqGroup {
|
|
2425
|
+
id: string;
|
|
2426
|
+
slug: string;
|
|
2427
|
+
name: string;
|
|
2428
|
+
description: string | null;
|
|
2429
|
+
locale: string;
|
|
2430
|
+
items: StorefrontFaqItem[];
|
|
2431
|
+
}
|
|
2432
|
+
interface StorefrontFaqQuery {
|
|
2433
|
+
/** Language of the texts; defaults to the client locale, then the main language of the site. */
|
|
2434
|
+
locale?: string;
|
|
2435
|
+
}
|
|
2400
2436
|
/** Public definition of a form (`GET /forms/{slug}`). */
|
|
2401
2437
|
interface StorefrontForm {
|
|
2402
2438
|
slug: string;
|
|
@@ -3304,6 +3340,7 @@ declare class BehioStorefront {
|
|
|
3304
3340
|
readonly blog: BlogModule;
|
|
3305
3341
|
readonly forms: FormsModule;
|
|
3306
3342
|
readonly collections: CollectionsModule;
|
|
3343
|
+
readonly faq: FaqModule;
|
|
3307
3344
|
readonly wishlist: WishlistModule;
|
|
3308
3345
|
readonly reviews: ReviewsModule;
|
|
3309
3346
|
readonly returns: ReturnsModule;
|
|
@@ -4034,6 +4071,29 @@ declare class CollectionsModule {
|
|
|
4034
4071
|
*/
|
|
4035
4072
|
item(slug: string, itemSlugOrId: string): Promise<SdkResult<StorefrontCollectionItem>>;
|
|
4036
4073
|
}
|
|
4074
|
+
/**
|
|
4075
|
+
* Frequently asked questions: groups of questions and answers the owner
|
|
4076
|
+
* writes in the Behio admin (FAQ module) in every language of the site.
|
|
4077
|
+
* Only visible questions are returned, in the admin order, in the requested
|
|
4078
|
+
* language (a missing translation falls back to the main language of the
|
|
4079
|
+
* site). Answers are cleaned HTML (paragraphs, emphasis, links, lists).
|
|
4080
|
+
* Cached by Behio and invalidated on every admin change. Works with website
|
|
4081
|
+
* keys that have no e-shop attached.
|
|
4082
|
+
*
|
|
4083
|
+
* Tip: render the questions with `FAQPage` structured data (JSON-LD) so
|
|
4084
|
+
* search engines and AI assistants recognise them as answers.
|
|
4085
|
+
*/
|
|
4086
|
+
declare class FaqModule {
|
|
4087
|
+
private client;
|
|
4088
|
+
constructor(client: BehioStorefront);
|
|
4089
|
+
/** FAQ groups of the site in the admin order with the number of visible questions. */
|
|
4090
|
+
list(query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroups>>;
|
|
4091
|
+
/**
|
|
4092
|
+
* One group by its slug or id with its visible questions. 404
|
|
4093
|
+
* `be.faq.groupNotFound` for an unknown group.
|
|
4094
|
+
*/
|
|
4095
|
+
get(group: string, query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroup>>;
|
|
4096
|
+
}
|
|
4037
4097
|
/**
|
|
4038
4098
|
* Merchant-defined forms (contact, demand, registration to an event...).
|
|
4039
4099
|
* The definition is public and cacheable; a submit is validated server-side
|
|
@@ -4255,4 +4315,4 @@ declare function clearCartSummary(): void;
|
|
|
4255
4315
|
/** Publish only authoritative current totals; server cart consumers call this after hydration and revalidation. */
|
|
4256
4316
|
declare function publishCartSummary(summary: CartSummaryEvent): void;
|
|
4257
4317
|
|
|
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
|
|
4318
|
+
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-C5ODb5cR.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-C5ODb5cR.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-C5ODb5cR.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-C5ODb5cR.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-C5ODb5cR.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-C5ODb5cR.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 } : {},
|
package/dist/next.mjs
CHANGED
package/dist/react.d.mts
CHANGED
|
@@ -2454,6 +2454,42 @@ interface StorefrontCollectionQuery {
|
|
|
2454
2454
|
limit?: number;
|
|
2455
2455
|
offset?: number;
|
|
2456
2456
|
}
|
|
2457
|
+
/** One visible question of an FAQ group. */
|
|
2458
|
+
interface StorefrontFaqItem {
|
|
2459
|
+
id: string;
|
|
2460
|
+
question: string;
|
|
2461
|
+
/** Cleaned HTML of the answer (paragraphs, emphasis, links, lists). */
|
|
2462
|
+
answer: string;
|
|
2463
|
+
}
|
|
2464
|
+
/** An FAQ group in the list (`GET /faq`). */
|
|
2465
|
+
interface StorefrontFaqGroupSummary {
|
|
2466
|
+
id: string;
|
|
2467
|
+
/** Stable identifier the owner sets in the admin (use it in code). */
|
|
2468
|
+
slug: string;
|
|
2469
|
+
name: string;
|
|
2470
|
+
description: string | null;
|
|
2471
|
+
/** Number of visible questions. */
|
|
2472
|
+
itemCount: number;
|
|
2473
|
+
}
|
|
2474
|
+
/** FAQ groups of the site in the admin order (`GET /faq`). */
|
|
2475
|
+
interface StorefrontFaqGroups {
|
|
2476
|
+
items: StorefrontFaqGroupSummary[];
|
|
2477
|
+
/** Language the texts are in (the requested one when the site offers it, else the main language). */
|
|
2478
|
+
locale: string;
|
|
2479
|
+
}
|
|
2480
|
+
/** One FAQ group with its visible questions in the admin order (`GET /faq/{group}`). */
|
|
2481
|
+
interface StorefrontFaqGroup {
|
|
2482
|
+
id: string;
|
|
2483
|
+
slug: string;
|
|
2484
|
+
name: string;
|
|
2485
|
+
description: string | null;
|
|
2486
|
+
locale: string;
|
|
2487
|
+
items: StorefrontFaqItem[];
|
|
2488
|
+
}
|
|
2489
|
+
interface StorefrontFaqQuery {
|
|
2490
|
+
/** Language of the texts; defaults to the client locale, then the main language of the site. */
|
|
2491
|
+
locale?: string;
|
|
2492
|
+
}
|
|
2457
2493
|
/** Public definition of a form (`GET /forms/{slug}`). */
|
|
2458
2494
|
interface StorefrontForm {
|
|
2459
2495
|
slug: string;
|
|
@@ -3341,6 +3377,7 @@ declare class BehioStorefront {
|
|
|
3341
3377
|
readonly blog: BlogModule;
|
|
3342
3378
|
readonly forms: FormsModule;
|
|
3343
3379
|
readonly collections: CollectionsModule;
|
|
3380
|
+
readonly faq: FaqModule;
|
|
3344
3381
|
readonly wishlist: WishlistModule;
|
|
3345
3382
|
readonly reviews: ReviewsModule;
|
|
3346
3383
|
readonly returns: ReturnsModule;
|
|
@@ -4071,6 +4108,29 @@ declare class CollectionsModule {
|
|
|
4071
4108
|
*/
|
|
4072
4109
|
item(slug: string, itemSlugOrId: string): Promise<SdkResult<StorefrontCollectionItem>>;
|
|
4073
4110
|
}
|
|
4111
|
+
/**
|
|
4112
|
+
* Frequently asked questions: groups of questions and answers the owner
|
|
4113
|
+
* writes in the Behio admin (FAQ module) in every language of the site.
|
|
4114
|
+
* Only visible questions are returned, in the admin order, in the requested
|
|
4115
|
+
* language (a missing translation falls back to the main language of the
|
|
4116
|
+
* site). Answers are cleaned HTML (paragraphs, emphasis, links, lists).
|
|
4117
|
+
* Cached by Behio and invalidated on every admin change. Works with website
|
|
4118
|
+
* keys that have no e-shop attached.
|
|
4119
|
+
*
|
|
4120
|
+
* Tip: render the questions with `FAQPage` structured data (JSON-LD) so
|
|
4121
|
+
* search engines and AI assistants recognise them as answers.
|
|
4122
|
+
*/
|
|
4123
|
+
declare class FaqModule {
|
|
4124
|
+
private client;
|
|
4125
|
+
constructor(client: BehioStorefront);
|
|
4126
|
+
/** FAQ groups of the site in the admin order with the number of visible questions. */
|
|
4127
|
+
list(query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroups>>;
|
|
4128
|
+
/**
|
|
4129
|
+
* One group by its slug or id with its visible questions. 404
|
|
4130
|
+
* `be.faq.groupNotFound` for an unknown group.
|
|
4131
|
+
*/
|
|
4132
|
+
get(group: string, query?: StorefrontFaqQuery): Promise<SdkResult<StorefrontFaqGroup>>;
|
|
4133
|
+
}
|
|
4074
4134
|
/**
|
|
4075
4135
|
* Merchant-defined forms (contact, demand, registration to an event...).
|
|
4076
4136
|
* The definition is public and cacheable; a submit is validated server-side
|
|
@@ -5114,6 +5174,14 @@ declare function useCollection(slug: string, query?: StorefrontCollectionQuery,
|
|
|
5114
5174
|
/** One published collection item by slug or id (detail page). */
|
|
5115
5175
|
declare function useCollectionItem(slug: string, itemSlugOrId: string, options?: UseCollectionOptions): _tanstack_react_query.UseQueryResult<NoInfer<StorefrontCollectionItem>, Error>;
|
|
5116
5176
|
|
|
5177
|
+
interface UseFaqOptions {
|
|
5178
|
+
enabled?: boolean;
|
|
5179
|
+
}
|
|
5180
|
+
/** FAQ groups of the site with the number of visible questions. */
|
|
5181
|
+
declare function useFaqGroups(query?: StorefrontFaqQuery, options?: UseFaqOptions): _tanstack_react_query.UseQueryResult<NoInfer<StorefrontFaqGroups>, Error>;
|
|
5182
|
+
/** One FAQ group (slug or id) with its visible questions in the admin order. */
|
|
5183
|
+
declare function useFaqGroup(group: string, query?: StorefrontFaqQuery, options?: UseFaqOptions): _tanstack_react_query.UseQueryResult<NoInfer<StorefrontFaqGroup>, Error>;
|
|
5184
|
+
|
|
5117
5185
|
interface UseSiteFormOptions {
|
|
5118
5186
|
enabled?: boolean;
|
|
5119
5187
|
}
|
|
@@ -5983,4 +6051,4 @@ declare function revokeAnalyticsConsent(client: BehioStorefront): Promise<SdkRes
|
|
|
5983
6051
|
success: boolean;
|
|
5984
6052
|
}>>;
|
|
5985
6053
|
|
|
5986
|
-
export { type ActivePromotion, type AddToCartInput, type AnalyticsEventInput, type AuthTokens, BehioAnalyticsTracker, BehioApiError, BehioProvider, type BehioProviderProps, type Blog, type BlogPostDetail, type BlogPostListItem, type BlogPostsPage, type BlogPostsQuery, type BlogSettings, type BlogTag, type Bundle, type BundleItem, type Cart, type CartDiscount, type CartItem, type Category, type CategoryDetail, type CheckoutAddress, type CheckoutInput, type CheckoutPaymentMethod, type CookieConsent, type CookieConsentInput, type CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, type CustomerAddress, type CustomerProfile, type EcommerceEventName, type EcommerceItem, type EcommercePayload, type Facet, type FacetRange, type FacetValue, type FacetsResponse, type FilterField, type FulfillmentStatus, type GiftCardBalance, type LoginInput, type MessageResponse, type OrderDetail, type OrderItem, type OrderListItem, type OrderStatus, type Page, type PageAttachment, type PageDetail, type PaginatedResponse, type PaymentInstrument, type PaymentStatus, type PaymentSwift, type PersonalOffer, type ProductDetail, type ProductLabel, type ProductListItem, type ProductParameter, type ProductParameterGroup, type ProductParametersResponse, type ProductPrice, type ProductReview, type ProductReviewsResponse, type ProductVariant, type ProductsQuery, type QuoteRequest, type RegisterInput, type ReturnRequest, RichText, type RichTextProps, type ShopInfo, type ShopSeo, type SiteFormField, type SiteFormFieldOption, type SiteFormFieldType, type StorageAdapter, type StorefrontForm, type StorefrontFormFieldError, type StorefrontFormFieldErrorCode, type StorefrontFormSettings, type StorefrontFormSubmitInput, type StorefrontFormSubmitResult, StorefrontScripts, type StorefrontScriptsProps, type SubmitQuoteInput, type SubmitReturnInput, type SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseBlogPostOptions, type UseBlogPostsOptions, type UseBlogsOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCertificateVerificationOptions, type UseCollectionOptions, type UseCourseCertificatesOptions, type UseCourseOptions, type UseCoursesOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFacetsOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseLessonCommentsOptions, type UseLessonNoteOptions, type UseLessonQuizOptions, type UseLessonTutorOptions, type UseLoyaltyOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UsePaymentMethodsOptions, type UsePersonalOffersOptions, type UseProductOptions, type UseProductParametersOptions, type UseProductsOptions, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingQuoteOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, type UseSiteFormOptions, type UseSubscriptionsOptions, type UseVisitorMessagesOptions, type VisitorMessage, type WishlistItem, cookieStorage, createMemoryStorage, detectStorage, formatPrice, generateVisitorId, getStoredVisitorId, grantAnalyticsConsent, localStorageAdapter, memoryStorage, revokeAnalyticsConsent, trackEcommerceEvent, useAddressAutocomplete, useAddresses, useAnalyticsEvents, useAuth, useBehio, useBehioClient, useBlogPost, useBlogPosts, useBlogs, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCertificateVerification, useCheckout, useCheckoutPreview, useCollection, useCollectionItem, useCookieConsent, useCourse, useCourseCertificates, useCourses, useCrossSell, useCurrency, useCustomer, useFacets, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLessonComments, useLessonNote, useLessonQuiz, useLessonTutor, useLookupReturnableOrder, useLoyalty, useMenu, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePaymentMethods, usePersonalOffers, usePickupPoints, useProduct, useProductGroup, useProductParameters, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShippingMethods, useShippingQuote, useShopInfo, useShopScripts, useShopSeo, useSiteForm, useSiteFormSubmit, useSubmitQuote, useSubmitReturn, useSubmitReview, useSubscriptions, useVisitorMessages, useWishlist };
|
|
6054
|
+
export { type ActivePromotion, type AddToCartInput, type AnalyticsEventInput, type AuthTokens, BehioAnalyticsTracker, BehioApiError, BehioProvider, type BehioProviderProps, type Blog, type BlogPostDetail, type BlogPostListItem, type BlogPostsPage, type BlogPostsQuery, type BlogSettings, type BlogTag, type Bundle, type BundleItem, type Cart, type CartDiscount, type CartItem, type Category, type CategoryDetail, type CheckoutAddress, type CheckoutInput, type CheckoutPaymentMethod, type CookieConsent, type CookieConsentInput, type CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, type CustomerAddress, type CustomerProfile, type EcommerceEventName, type EcommerceItem, type EcommercePayload, type Facet, type FacetRange, type FacetValue, type FacetsResponse, type FilterField, type FulfillmentStatus, type GiftCardBalance, type LoginInput, type MessageResponse, type OrderDetail, type OrderItem, type OrderListItem, type OrderStatus, type Page, type PageAttachment, type PageDetail, type PaginatedResponse, type PaymentInstrument, type PaymentStatus, type PaymentSwift, type PersonalOffer, type ProductDetail, type ProductLabel, type ProductListItem, type ProductParameter, type ProductParameterGroup, type ProductParametersResponse, type ProductPrice, type ProductReview, type ProductReviewsResponse, type ProductVariant, type ProductsQuery, type QuoteRequest, type RegisterInput, type ReturnRequest, RichText, type RichTextProps, type ShopInfo, type ShopSeo, type SiteFormField, type SiteFormFieldOption, type SiteFormFieldType, type StorageAdapter, type StorefrontForm, type StorefrontFormFieldError, type StorefrontFormFieldErrorCode, type StorefrontFormSettings, type StorefrontFormSubmitInput, type StorefrontFormSubmitResult, StorefrontScripts, type StorefrontScriptsProps, type SubmitQuoteInput, type SubmitReturnInput, type SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseBlogPostOptions, type UseBlogPostsOptions, type UseBlogsOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCertificateVerificationOptions, type UseCollectionOptions, type UseCourseCertificatesOptions, type UseCourseOptions, type UseCoursesOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFacetsOptions, type UseFaqOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseLessonCommentsOptions, type UseLessonNoteOptions, type UseLessonQuizOptions, type UseLessonTutorOptions, type UseLoyaltyOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UsePaymentMethodsOptions, type UsePersonalOffersOptions, type UseProductOptions, type UseProductParametersOptions, type UseProductsOptions, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingQuoteOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, type UseSiteFormOptions, type UseSubscriptionsOptions, type UseVisitorMessagesOptions, type VisitorMessage, type WishlistItem, cookieStorage, createMemoryStorage, detectStorage, formatPrice, generateVisitorId, getStoredVisitorId, grantAnalyticsConsent, localStorageAdapter, memoryStorage, revokeAnalyticsConsent, trackEcommerceEvent, useAddressAutocomplete, useAddresses, useAnalyticsEvents, useAuth, useBehio, useBehioClient, useBlogPost, useBlogPosts, useBlogs, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCertificateVerification, useCheckout, useCheckoutPreview, useCollection, useCollectionItem, useCookieConsent, useCourse, useCourseCertificates, useCourses, useCrossSell, useCurrency, useCustomer, useFacets, useFaqGroup, useFaqGroups, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLessonComments, useLessonNote, useLessonQuiz, useLessonTutor, useLookupReturnableOrder, useLoyalty, useMenu, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePaymentMethods, usePersonalOffers, usePickupPoints, useProduct, useProductGroup, useProductParameters, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShippingMethods, useShippingQuote, useShopInfo, useShopScripts, useShopSeo, useSiteForm, useSiteFormSubmit, useSubmitQuote, useSubmitReturn, useSubmitReview, useSubscriptions, useVisitorMessages, useWishlist };
|