@behio/storefront-sdk 0.42.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3TPJG2WV.js → chunk-ODAMBLGY.js} +52 -20
- package/dist/{chunk-QOZYQMK2.mjs → chunk-WMZH72WS.mjs} +43 -11
- package/dist/{client-B0vlHxB1.d.mts → client-BKNtLTcu.d.mts} +122 -46
- package/dist/{client-B0vlHxB1.d.ts → client-BKNtLTcu.d.ts} +122 -46
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- 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 +140 -46
- package/dist/react.d.ts +140 -46
- package/dist/react.js +215 -151
- package/dist/react.mjs +149 -86
- package/package.json +1 -1
|
@@ -300,6 +300,14 @@ interface ProductVariant {
|
|
|
300
300
|
* "default photo" or to render the picture in a subtler style.
|
|
301
301
|
*/
|
|
302
302
|
imageIsInherited: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* Parameters of this variant. A variant carries its own value where it has
|
|
305
|
+
* one and inherits the parent's everywhere else, so you can render the rows
|
|
306
|
+
* that actually differ under each variant. Empty when nothing is assigned.
|
|
307
|
+
*
|
|
308
|
+
* Added in SDK 1.0.0.
|
|
309
|
+
*/
|
|
310
|
+
parameterGroups: ProductParameterGroup[];
|
|
303
311
|
}
|
|
304
312
|
interface ProductLabel {
|
|
305
313
|
id: string;
|
|
@@ -513,25 +521,41 @@ interface VariantAxis {
|
|
|
513
521
|
values: VariantAxisValue[];
|
|
514
522
|
}
|
|
515
523
|
/**
|
|
516
|
-
* One
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
524
|
+
* One row of a curated parameter group.
|
|
525
|
+
*
|
|
526
|
+
* A parameter is something the merchant explicitly published: a label they
|
|
527
|
+
* wrote, a value resolved from a fixed string, a product field, or ONE named
|
|
528
|
+
* field of one warehouse data group. Nothing here reveals warehouse structure:
|
|
529
|
+
* no ids, no field keys, no internal types.
|
|
530
|
+
*
|
|
531
|
+
* `value` is null only for boolean parameters, where `booleanValue` carries the
|
|
532
|
+
* typed value so the storefront localizes Ano/Ne itself. A parameter with no
|
|
533
|
+
* value is omitted from the array rather than rendered as an empty row.
|
|
520
534
|
*/
|
|
521
|
-
interface
|
|
522
|
-
|
|
523
|
-
name: string;
|
|
524
|
-
/** TEXT | NUMBER | DECIMAL | BOOLEAN | DATE | TIME | DATETIME | PERCENTAGE | MONEY | ITEM_LIST | ... */
|
|
525
|
-
type: string;
|
|
535
|
+
interface ProductParameter {
|
|
536
|
+
label: string;
|
|
526
537
|
value: string | null;
|
|
527
538
|
booleanValue: boolean | null;
|
|
539
|
+
/** "cm", "g", a currency code, "%"; null when the parameter has none. */
|
|
528
540
|
unit: string | null;
|
|
529
541
|
}
|
|
530
|
-
/**
|
|
531
|
-
|
|
532
|
-
|
|
542
|
+
/**
|
|
543
|
+
* One curated parameter group. A product can carry several, so a template can
|
|
544
|
+
* render one as a spec table and another as badges. Ordering is array order,
|
|
545
|
+
* both for the groups and for the parameters inside them.
|
|
546
|
+
*/
|
|
547
|
+
interface ProductParameterGroup {
|
|
548
|
+
/**
|
|
549
|
+
* Stable public identifier derived from the merchant's own group name
|
|
550
|
+
* ("Parametry oblečení" -> "parametry-obleceni"). Pass it to
|
|
551
|
+
* `catalog.getProductParameterGroup` to fetch just this group.
|
|
552
|
+
*/
|
|
553
|
+
slug: string;
|
|
533
554
|
name: string;
|
|
534
|
-
|
|
555
|
+
parameters: ProductParameter[];
|
|
556
|
+
}
|
|
557
|
+
interface ProductParametersResponse {
|
|
558
|
+
groups: ProductParameterGroup[];
|
|
535
559
|
}
|
|
536
560
|
interface ProductDetail extends ProductListItem {
|
|
537
561
|
longDescription?: string;
|
|
@@ -561,14 +585,15 @@ interface ProductDetail extends ProductListItem {
|
|
|
561
585
|
variantAxes: VariantAxis[];
|
|
562
586
|
volumePricing: ProductVolumePrice[];
|
|
563
587
|
/**
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
588
|
+
* Curated parameter groups, already resolved. Empty when the merchant
|
|
589
|
+
* assigned none. Distinct from `longDescription` (free HTML): this is
|
|
590
|
+
* machine-readable key/value data for a "Parametry" table, comparison
|
|
591
|
+
* engines and AEO.
|
|
592
|
+
*
|
|
593
|
+
* Replaced `customFields` in SDK 1.0.0. The old field returned raw warehouse
|
|
594
|
+
* data groups, which published internal bookkeeping nobody curated.
|
|
570
595
|
*/
|
|
571
|
-
|
|
596
|
+
parameterGroups: ProductParameterGroup[];
|
|
572
597
|
seo: {
|
|
573
598
|
title?: string | null;
|
|
574
599
|
description?: string | null;
|
|
@@ -675,13 +700,22 @@ interface CategoryDetail extends Category {
|
|
|
675
700
|
ogImage?: string | null;
|
|
676
701
|
};
|
|
677
702
|
}
|
|
678
|
-
|
|
703
|
+
/**
|
|
704
|
+
* One available filter, derived from a curated parameter the merchant marked
|
|
705
|
+
* filterable. A visitor can therefore never filter by a field that does not
|
|
706
|
+
* appear in the product's parameters.
|
|
707
|
+
*/
|
|
679
708
|
interface FilterField {
|
|
709
|
+
/** Parameter slug. Pass it back in `ProductsQuery.parameters` or `facets`. */
|
|
680
710
|
key: string;
|
|
711
|
+
/** Parameter label in the requested language. */
|
|
681
712
|
name: string;
|
|
682
|
-
|
|
683
|
-
|
|
713
|
+
/** How to render it: value list, numeric range, or yes/no. */
|
|
714
|
+
type: "enum" | "range" | "boolean" | string;
|
|
715
|
+
/** Slug of the parameter group this filter belongs to. */
|
|
716
|
+
groupSlug: string;
|
|
684
717
|
groupName: string;
|
|
718
|
+
unit?: string | null;
|
|
685
719
|
values?: string[];
|
|
686
720
|
}
|
|
687
721
|
interface FacetValue {
|
|
@@ -701,14 +735,14 @@ interface FacetRange {
|
|
|
701
735
|
max: number | null;
|
|
702
736
|
}
|
|
703
737
|
interface Facet {
|
|
738
|
+
/** Parameter slug. Never a warehouse field key. */
|
|
704
739
|
key: string;
|
|
705
740
|
name: string;
|
|
706
741
|
/** "enum" (checkboxes), "range" (slider) or "boolean". */
|
|
707
742
|
type: "enum" | "range" | "boolean" | string;
|
|
708
|
-
|
|
743
|
+
/** Slug of the parameter group this facet belongs to. */
|
|
744
|
+
groupSlug: string;
|
|
709
745
|
groupName: string;
|
|
710
|
-
/** Underlying data-group field type (TEXT, NUMBER, MONEY, ...). */
|
|
711
|
-
fieldType: string;
|
|
712
746
|
/** enum/boolean facets: selectable values with counts. */
|
|
713
747
|
values?: FacetValue[];
|
|
714
748
|
/** range facets: numeric bounds within the current context. */
|
|
@@ -803,11 +837,17 @@ interface ProductsQuery {
|
|
|
803
837
|
/** Minimum aggregate rating, e.g. 4 for "4 and up". */
|
|
804
838
|
ratingMin?: number;
|
|
805
839
|
search?: string;
|
|
806
|
-
/**
|
|
807
|
-
*
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
*
|
|
840
|
+
/**
|
|
841
|
+
* Parameter filters, keyed by PARAMETER SLUG. A value may be an array =
|
|
842
|
+
* multi-select (OR within the key), e.g. {"barva": ["cerna", "bila"]}.
|
|
843
|
+
* Range filters use the `_min` / `_max` suffix, e.g. {"hmotnost_min": 100}.
|
|
844
|
+
*
|
|
845
|
+
* Replaced `customFields` in SDK 1.0.0, which was keyed by a warehouse
|
|
846
|
+
* data-group field key.
|
|
847
|
+
*/
|
|
848
|
+
parameters?: Record<string, string | number | boolean | string[] | unknown>;
|
|
849
|
+
/** Slug-based facet selection for SEO URLs: parameter slug -> value slugs,
|
|
850
|
+
* e.g. {"barva": ["cerna"]}. Resolved server-side to the stored values. */
|
|
811
851
|
facets?: Record<string, string[]>;
|
|
812
852
|
/** Filter by specific product IDs (comma-separated in URL) */
|
|
813
853
|
ids?: string[];
|
|
@@ -1146,7 +1186,10 @@ interface DigitalDownload {
|
|
|
1146
1186
|
fileName: string;
|
|
1147
1187
|
/** Localized product name the file belongs to (may be null). */
|
|
1148
1188
|
productName: string | null;
|
|
1149
|
-
/**
|
|
1189
|
+
/**
|
|
1190
|
+
* Product slug for linking back to the PDP (may be null). Resolved the same
|
|
1191
|
+
* way as everywhere else: per-locale slug first, then the product id.
|
|
1192
|
+
*/
|
|
1150
1193
|
productSlug: string | null;
|
|
1151
1194
|
fileSize: number;
|
|
1152
1195
|
mimeType: string;
|
|
@@ -1168,7 +1211,10 @@ interface CourseListItem {
|
|
|
1168
1211
|
courseId: string;
|
|
1169
1212
|
/** Localized course (product) name, best-effort. */
|
|
1170
1213
|
name: string | null;
|
|
1171
|
-
/**
|
|
1214
|
+
/**
|
|
1215
|
+
* Product slug for linking to the PDP. Resolved the same way as in the
|
|
1216
|
+
* catalog: per-locale slug first, then the product id.
|
|
1217
|
+
*/
|
|
1172
1218
|
slug: string;
|
|
1173
1219
|
imageUrl: string | null;
|
|
1174
1220
|
totalLessons: number;
|
|
@@ -1220,6 +1266,7 @@ interface CourseModule {
|
|
|
1220
1266
|
interface CourseDetail {
|
|
1221
1267
|
courseId: string;
|
|
1222
1268
|
name: string | null;
|
|
1269
|
+
/** Product slug for linking to the PDP (resolved per-locale slug, else id). */
|
|
1223
1270
|
slug: string;
|
|
1224
1271
|
imageUrl: string | null;
|
|
1225
1272
|
/** Welcome text shown at the top of the member area (markdown). */
|
|
@@ -1572,15 +1619,17 @@ interface Bundle {
|
|
|
1572
1619
|
slug: string;
|
|
1573
1620
|
name: string;
|
|
1574
1621
|
description: string | null;
|
|
1575
|
-
|
|
1622
|
+
/** `null` when the eshop hides prices from guests and this visitor has no price entitlement. */
|
|
1623
|
+
bundlePrice: number | null;
|
|
1576
1624
|
currency: string;
|
|
1577
1625
|
coverImage: string | null;
|
|
1578
1626
|
endsAt: number | null;
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1627
|
+
/** `null` when prices are hidden (see `bundlePrice`). */
|
|
1628
|
+
itemsSum: number | null;
|
|
1629
|
+
/** Absolute saving vs buying the components separately, in `currency`. `null` when prices are hidden. */
|
|
1630
|
+
savings: number | null;
|
|
1631
|
+
/** Percentage saving, 0–100. 0 when `itemsSum` is zero. `null` when prices are hidden. */
|
|
1632
|
+
savingsPercent: number | null;
|
|
1584
1633
|
/** Minimum bundles per order. Default 1. */
|
|
1585
1634
|
minQuantity: number;
|
|
1586
1635
|
/** Maximum bundles per order. `null` = uncapped. */
|
|
@@ -2284,15 +2333,42 @@ declare class CatalogModule {
|
|
|
2284
2333
|
locale?: string;
|
|
2285
2334
|
currency?: string;
|
|
2286
2335
|
}): Promise<SdkResult<PaginatedResponse<ProductListItem>>>;
|
|
2287
|
-
/**
|
|
2288
|
-
|
|
2336
|
+
/**
|
|
2337
|
+
* Available filters for a dynamic filter UI.
|
|
2338
|
+
*
|
|
2339
|
+
* Derived from curated PARAMETERS the merchant marked filterable, so a
|
|
2340
|
+
* visitor can never filter by something that does not appear in the
|
|
2341
|
+
* product's parameters. Labels are per language, hence `locale`.
|
|
2342
|
+
*/
|
|
2343
|
+
getFilters(options?: {
|
|
2344
|
+
locale?: string;
|
|
2345
|
+
}): Promise<SdkResult<{
|
|
2289
2346
|
filters: FilterField[];
|
|
2290
2347
|
}>>;
|
|
2291
2348
|
/**
|
|
2292
|
-
*
|
|
2293
|
-
*
|
|
2294
|
-
*
|
|
2295
|
-
*
|
|
2349
|
+
* Curated parameter groups of a product, already resolved (label, value,
|
|
2350
|
+
* unit, order). Returns an ARRAY of groups so a template can lay them out
|
|
2351
|
+
* however it likes: one group as a spec table, another as badges.
|
|
2352
|
+
*
|
|
2353
|
+
* A variant's own parameters ride along on `ProductDetail.variants[]`, so
|
|
2354
|
+
* this call is for the parent product.
|
|
2355
|
+
*/
|
|
2356
|
+
getProductParameters(slug: string, options?: {
|
|
2357
|
+
locale?: string;
|
|
2358
|
+
}): Promise<SdkResult<ProductParametersResponse>>;
|
|
2359
|
+
/**
|
|
2360
|
+
* One specific parameter group of a product, by its slug. 404 when the
|
|
2361
|
+
* product does not have that group, which is deliberate: the caller asked
|
|
2362
|
+
* for a named thing, so an empty array would hide a wrong slug.
|
|
2363
|
+
*/
|
|
2364
|
+
getProductParameterGroup(slug: string, groupSlug: string, options?: {
|
|
2365
|
+
locale?: string;
|
|
2366
|
+
}): Promise<SdkResult<ProductParameterGroup>>;
|
|
2367
|
+
/**
|
|
2368
|
+
* Facet groups + selection-aware counts for the current filter set
|
|
2369
|
+
* (parameters, labels, price, availability, rating, subcategories). Pass the
|
|
2370
|
+
* SAME query you pass to `getProducts` (category, search, price, inStock,
|
|
2371
|
+
* ratingMin, parameters, facets slugs, labels): counts are computed with
|
|
2296
2372
|
* that facet excluded, and values that drop to 0 are still returned (render
|
|
2297
2373
|
* them disabled). Use this to build an Alza-style filter sidebar.
|
|
2298
2374
|
*/
|
|
@@ -2794,4 +2870,4 @@ declare class NewsletterModule {
|
|
|
2794
2870
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
2795
2871
|
}
|
|
2796
2872
|
|
|
2797
|
-
export { type
|
|
2873
|
+
export { type Facet as $, type ActivePromotion as A, BehioStorefront as B, type CookieConsent as C, type CheckoutAddress as D, type CheckoutInput as E, type CheckoutPaymentMethod as F, type CheckoutSettings as G, type CookieConsentInput as H, type CourseAttachment as I, type CourseCertificate as J, type CourseComment as K, type CourseCommentReply as L, type CourseCommentsList as M, type CourseDetail as N, type CourseLesson as O, type CourseListItem as P, type CourseModule as Q, type CoursePostedComment as R, type SdkResult as S, type CourseProgress as T, type CourseTutorMessage as U, type CourseTutorThread as V, type CrossSellItem as W, type CustomerAddress as X, type CustomerProfile as Y, type DigitalDownload as Z, type DownloadUrl as _, type AddToCartInput as a, type ProductPrice as a$, type FacetAvailability as a0, type FacetCategory as a1, type FacetLabel as a2, type FacetPriceRange as a3, type FacetRange as a4, type FacetRatingBucket as a5, type FacetValue as a6, type FacetsResponse as a7, type FilterField as a8, type FulfillmentStatus as a9, type OrderDetail as aA, type OrderItem as aB, type OrderListItem as aC, type OrderStatus as aD, type OrderStatusHistory as aE, OrderStatuses as aF, type OrderTracking as aG, type Page as aH, type PageAttachment as aI, type PageDetail as aJ, type PaginatedResponse as aK, type PaymentStatus as aL, PaymentStatuses as aM, type PickupPoint as aN, type PickupPointHours as aO, type PickupPointsInput as aP, type PriceDisplay as aQ, type ProductAvailability as aR, type ProductDetail as aS, type ProductGroup as aT, type ProductLabel as aU, type ProductListItem as aV, type ProductMedia as aW, type ProductMediaVariant as aX, type ProductParameter as aY, type ProductParameterGroup as aZ, type ProductParametersResponse as a_, FulfillmentStatuses as aa, type GiftCardBalance as ab, type GiftCardPurchaseInput as ac, type GiftCardPurchaseResult as ad, type GiftCardSummary as ae, type LessonNote as af, type LessonQuiz as ag, type LoginInput as ah, type LoyaltyBalance as ai, type LoyaltyNextTier as aj, type LoyaltyProgram as ak, type LoyaltySummary as al, type LoyaltyTier as am, type LoyaltyTierPerks as an, type LoyaltyTransaction as ao, type Menu as ap, type MenuItem as aq, type MenuItemRef as ar, type MenuItemType as as, type MessageResponse as at, type NewsletterOptInDefault as au, type NewsletterSubscribeInput as av, type NewsletterSubscribeResult as aw, type NewsletterUnsubscribeResult as ax, type OrderAccessRequestResponse as ay, type OrderAccessVerifyResponse as az, type AddressDetail as b, type ProductPromotionSummary as b0, type ProductReview as b1, type ProductReviewsResponse as b2, ProductSort as b3, type ProductSortValue as b4, type ProductVariant as b5, type ProductVolumePrice as b6, type ProductsQuery as b7, type QuizAnswerInput as b8, type QuizAnswerResult as b9, type ShopSeoIdentity as bA, type StockBehavior as bB, type StockMode as bC, type SubmitQuoteInput as bD, type SubmitReturnInput as bE, type SubmitReviewInput as bF, type Subscription as bG, type SubscriptionAction as bH, type SubscriptionFrequency as bI, type SubscriptionItem as bJ, type SubscriptionStatus as bK, type TaxBreakdownLine as bL, type VariantAxis as bM, type VariantAxisValue as bN, type WishlistItem as bO, err as bP, ok as bQ, toSdkError as bR, type QuizQuestion as ba, type QuizResult as bb, type QuoteItem as bc, type QuoteRequest as bd, type RegisterInput as be, type RegisterResult as bf, type RequestInterceptor as bg, type RequestInterceptorConfig as bh, type ResponseInterceptor as bi, type ResponseInterceptorData as bj, type ReturnRequest as bk, type ReturnRequestItem as bl, type ReturnStatus as bm, type ReturnStatusItem as bn, type ReturnableOrder as bo, type ReturnableOrderItem as bp, type SdkError as bq, type ShippingMethodSummary as br, type ShippingQuote as bs, type ShippingQuoteInput as bt, type ShopInfo as bu, type ShopScript as bv, type ShopScriptPlacement as bw, type ShopScriptType as bx, type ShopScripts as by, type ShopSeo as bz, type AddressSuggestion as c, type AddressType as d, AddressTypes as e, type AuthTokens as f, type BackInStockSubscription as g, type BadgeTone as h, BehioApiError as i, type BehioErrorCode as j, type BehioEventHandler as k, type BehioEventType as l, BehioNetworkError as m, type BehioStorefrontConfig as n, type Bundle as o, type BundleItem as p, type Cart as q, type CartBundleLine as r, type CartBundleLineItem as s, type CartDiscount as t, type CartItem as u, type CartItemProduct as v, type CartPromotion as w, type Category as x, type CategoryDetail as y, type CertificateVerification as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BehioStorefront, S as SdkResult, C as CookieConsent } from './client-
|
|
2
|
-
export { A as ActivePromotion, a as AddToCartInput, b as AddressDetail, c as AddressSuggestion, d as AddressType, e as AddressTypes, f as AuthTokens, g as BackInStockSubscription, h as BadgeTone, i as BehioApiError, j as BehioErrorCode, k as BehioEventHandler, l as BehioEventType, m as BehioNetworkError, n as BehioStorefrontConfig, o as Bundle, p as BundleItem, q as Cart, r as CartBundleLine, s as CartBundleLineItem, t as CartDiscount, u as CartItem, v as CartItemProduct, w as CartPromotion, x as Category, y as CategoryDetail, z as CertificateVerification, D as CheckoutAddress, E as CheckoutInput, F as CheckoutPaymentMethod, G as CheckoutSettings, H as CookieConsentInput, I as CourseAttachment, J as CourseCertificate, K as CourseComment, L as CourseCommentReply, M as CourseCommentsList, N as CourseDetail, O as CourseLesson, P as CourseListItem, Q as CourseModule, R as CoursePostedComment, T as CourseProgress, U as CourseTutorMessage, V as CourseTutorThread, W as CrossSellItem, X as CustomerAddress, Y as CustomerProfile, Z as
|
|
1
|
+
import { B as BehioStorefront, S as SdkResult, C as CookieConsent } from './client-BKNtLTcu.mjs';
|
|
2
|
+
export { A as ActivePromotion, a as AddToCartInput, b as AddressDetail, c as AddressSuggestion, d as AddressType, e as AddressTypes, f as AuthTokens, g as BackInStockSubscription, h as BadgeTone, i as BehioApiError, j as BehioErrorCode, k as BehioEventHandler, l as BehioEventType, m as BehioNetworkError, n as BehioStorefrontConfig, o as Bundle, p as BundleItem, q as Cart, r as CartBundleLine, s as CartBundleLineItem, t as CartDiscount, u as CartItem, v as CartItemProduct, w as CartPromotion, x as Category, y as CategoryDetail, z as CertificateVerification, D as CheckoutAddress, E as CheckoutInput, F as CheckoutPaymentMethod, G as CheckoutSettings, H as CookieConsentInput, I as CourseAttachment, J as CourseCertificate, K as CourseComment, L as CourseCommentReply, M as CourseCommentsList, N as CourseDetail, O as CourseLesson, P as CourseListItem, Q as CourseModule, R as CoursePostedComment, T as CourseProgress, U as CourseTutorMessage, V as CourseTutorThread, W as CrossSellItem, X as CustomerAddress, Y as CustomerProfile, Z as DigitalDownload, _ as DownloadUrl, $ as Facet, a0 as FacetAvailability, a1 as FacetCategory, a2 as FacetLabel, a3 as FacetPriceRange, a4 as FacetRange, a5 as FacetRatingBucket, a6 as FacetValue, a7 as FacetsResponse, a8 as FilterField, a9 as FulfillmentStatus, aa as FulfillmentStatuses, ab as GiftCardBalance, ac as GiftCardPurchaseInput, ad as GiftCardPurchaseResult, ae as GiftCardSummary, af as LessonNote, ag as LessonQuiz, ah as LoginInput, ai as LoyaltyBalance, aj as LoyaltyNextTier, ak as LoyaltyProgram, al as LoyaltySummary, am as LoyaltyTier, an as LoyaltyTierPerks, ao as LoyaltyTransaction, ap as Menu, aq as MenuItem, ar as MenuItemRef, as as MenuItemType, at as MessageResponse, au as NewsletterOptInDefault, av as NewsletterSubscribeInput, aw as NewsletterSubscribeResult, ax as NewsletterUnsubscribeResult, ay as OrderAccessRequestResponse, az as OrderAccessVerifyResponse, aA as OrderDetail, aB as OrderItem, aC as OrderListItem, aD as OrderStatus, aE as OrderStatusHistory, aF as OrderStatuses, aG as OrderTracking, aH as Page, aI as PageAttachment, aJ as PageDetail, aK as PaginatedResponse, aL as PaymentStatus, aM as PaymentStatuses, aN as PickupPoint, aO as PickupPointHours, aP as PickupPointsInput, aQ as PriceDisplay, aR as ProductAvailability, aS as ProductDetail, aT as ProductGroup, aU as ProductLabel, aV as ProductListItem, aW as ProductMedia, aX as ProductMediaVariant, aY as ProductParameter, aZ as ProductParameterGroup, a_ as ProductParametersResponse, a$ as ProductPrice, b0 as ProductPromotionSummary, b1 as ProductReview, b2 as ProductReviewsResponse, b3 as ProductSort, b4 as ProductSortValue, b5 as ProductVariant, b6 as ProductVolumePrice, b7 as ProductsQuery, b8 as QuizAnswerInput, b9 as QuizAnswerResult, ba as QuizQuestion, bb as QuizResult, bc as QuoteItem, bd as QuoteRequest, be as RegisterInput, bf as RegisterResult, bg as RequestInterceptor, bh as RequestInterceptorConfig, bi as ResponseInterceptor, bj as ResponseInterceptorData, bk as ReturnRequest, bl as ReturnRequestItem, bm as ReturnStatus, bn as ReturnStatusItem, bo as ReturnableOrder, bp as ReturnableOrderItem, bq as SdkError, br as ShippingMethodSummary, bs as ShippingQuote, bt as ShippingQuoteInput, bu as ShopInfo, bv as ShopScript, bw as ShopScriptPlacement, bx as ShopScriptType, by as ShopScripts, bz as ShopSeo, bA as ShopSeoIdentity, bB as StockBehavior, bC as StockMode, bD as SubmitQuoteInput, bE as SubmitReturnInput, bF as SubmitReviewInput, bG as Subscription, bH as SubscriptionAction, bI as SubscriptionFrequency, bJ as SubscriptionItem, bK as SubscriptionStatus, bL as TaxBreakdownLine, bM as VariantAxis, bN as VariantAxisValue, bO as WishlistItem, bP as err, bQ as ok, bR as toSdkError } from './client-BKNtLTcu.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 { B as BehioStorefront, S as SdkResult, C as CookieConsent } from './client-
|
|
2
|
-
export { A as ActivePromotion, a as AddToCartInput, b as AddressDetail, c as AddressSuggestion, d as AddressType, e as AddressTypes, f as AuthTokens, g as BackInStockSubscription, h as BadgeTone, i as BehioApiError, j as BehioErrorCode, k as BehioEventHandler, l as BehioEventType, m as BehioNetworkError, n as BehioStorefrontConfig, o as Bundle, p as BundleItem, q as Cart, r as CartBundleLine, s as CartBundleLineItem, t as CartDiscount, u as CartItem, v as CartItemProduct, w as CartPromotion, x as Category, y as CategoryDetail, z as CertificateVerification, D as CheckoutAddress, E as CheckoutInput, F as CheckoutPaymentMethod, G as CheckoutSettings, H as CookieConsentInput, I as CourseAttachment, J as CourseCertificate, K as CourseComment, L as CourseCommentReply, M as CourseCommentsList, N as CourseDetail, O as CourseLesson, P as CourseListItem, Q as CourseModule, R as CoursePostedComment, T as CourseProgress, U as CourseTutorMessage, V as CourseTutorThread, W as CrossSellItem, X as CustomerAddress, Y as CustomerProfile, Z as
|
|
1
|
+
import { B as BehioStorefront, S as SdkResult, C as CookieConsent } from './client-BKNtLTcu.js';
|
|
2
|
+
export { A as ActivePromotion, a as AddToCartInput, b as AddressDetail, c as AddressSuggestion, d as AddressType, e as AddressTypes, f as AuthTokens, g as BackInStockSubscription, h as BadgeTone, i as BehioApiError, j as BehioErrorCode, k as BehioEventHandler, l as BehioEventType, m as BehioNetworkError, n as BehioStorefrontConfig, o as Bundle, p as BundleItem, q as Cart, r as CartBundleLine, s as CartBundleLineItem, t as CartDiscount, u as CartItem, v as CartItemProduct, w as CartPromotion, x as Category, y as CategoryDetail, z as CertificateVerification, D as CheckoutAddress, E as CheckoutInput, F as CheckoutPaymentMethod, G as CheckoutSettings, H as CookieConsentInput, I as CourseAttachment, J as CourseCertificate, K as CourseComment, L as CourseCommentReply, M as CourseCommentsList, N as CourseDetail, O as CourseLesson, P as CourseListItem, Q as CourseModule, R as CoursePostedComment, T as CourseProgress, U as CourseTutorMessage, V as CourseTutorThread, W as CrossSellItem, X as CustomerAddress, Y as CustomerProfile, Z as DigitalDownload, _ as DownloadUrl, $ as Facet, a0 as FacetAvailability, a1 as FacetCategory, a2 as FacetLabel, a3 as FacetPriceRange, a4 as FacetRange, a5 as FacetRatingBucket, a6 as FacetValue, a7 as FacetsResponse, a8 as FilterField, a9 as FulfillmentStatus, aa as FulfillmentStatuses, ab as GiftCardBalance, ac as GiftCardPurchaseInput, ad as GiftCardPurchaseResult, ae as GiftCardSummary, af as LessonNote, ag as LessonQuiz, ah as LoginInput, ai as LoyaltyBalance, aj as LoyaltyNextTier, ak as LoyaltyProgram, al as LoyaltySummary, am as LoyaltyTier, an as LoyaltyTierPerks, ao as LoyaltyTransaction, ap as Menu, aq as MenuItem, ar as MenuItemRef, as as MenuItemType, at as MessageResponse, au as NewsletterOptInDefault, av as NewsletterSubscribeInput, aw as NewsletterSubscribeResult, ax as NewsletterUnsubscribeResult, ay as OrderAccessRequestResponse, az as OrderAccessVerifyResponse, aA as OrderDetail, aB as OrderItem, aC as OrderListItem, aD as OrderStatus, aE as OrderStatusHistory, aF as OrderStatuses, aG as OrderTracking, aH as Page, aI as PageAttachment, aJ as PageDetail, aK as PaginatedResponse, aL as PaymentStatus, aM as PaymentStatuses, aN as PickupPoint, aO as PickupPointHours, aP as PickupPointsInput, aQ as PriceDisplay, aR as ProductAvailability, aS as ProductDetail, aT as ProductGroup, aU as ProductLabel, aV as ProductListItem, aW as ProductMedia, aX as ProductMediaVariant, aY as ProductParameter, aZ as ProductParameterGroup, a_ as ProductParametersResponse, a$ as ProductPrice, b0 as ProductPromotionSummary, b1 as ProductReview, b2 as ProductReviewsResponse, b3 as ProductSort, b4 as ProductSortValue, b5 as ProductVariant, b6 as ProductVolumePrice, b7 as ProductsQuery, b8 as QuizAnswerInput, b9 as QuizAnswerResult, ba as QuizQuestion, bb as QuizResult, bc as QuoteItem, bd as QuoteRequest, be as RegisterInput, bf as RegisterResult, bg as RequestInterceptor, bh as RequestInterceptorConfig, bi as ResponseInterceptor, bj as ResponseInterceptorData, bk as ReturnRequest, bl as ReturnRequestItem, bm as ReturnStatus, bn as ReturnStatusItem, bo as ReturnableOrder, bp as ReturnableOrderItem, bq as SdkError, br as ShippingMethodSummary, bs as ShippingQuote, bt as ShippingQuoteInput, bu as ShopInfo, bv as ShopScript, bw as ShopScriptPlacement, bx as ShopScriptType, by as ShopScripts, bz as ShopSeo, bA as ShopSeoIdentity, bB as StockBehavior, bC as StockMode, bD as SubmitQuoteInput, bE as SubmitReturnInput, bF as SubmitReviewInput, bG as Subscription, bH as SubscriptionAction, bI as SubscriptionFrequency, bJ as SubscriptionItem, bK as SubscriptionStatus, bL as TaxBreakdownLine, bM as VariantAxis, bN as VariantAxisValue, bO as WishlistItem, bP as err, bQ as ok, bR as toSdkError } from './client-BKNtLTcu.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkODAMBLGYjs = require('./chunk-ODAMBLGY.js');
|
|
14
14
|
|
|
15
15
|
// src/react/utils/format-price.ts
|
|
16
16
|
function formatPrice(amount, currency, locale) {
|
|
@@ -139,4 +139,4 @@ async function revokeAnalyticsConsent(client) {
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
exports.AddressTypes =
|
|
142
|
+
exports.AddressTypes = _chunkODAMBLGYjs.AddressTypes; exports.BehioApiError = _chunkODAMBLGYjs.BehioApiError; exports.BehioNetworkError = _chunkODAMBLGYjs.BehioNetworkError; exports.BehioStorefront = _chunkODAMBLGYjs.BehioStorefront; exports.FulfillmentStatuses = _chunkODAMBLGYjs.FulfillmentStatuses; exports.OrderStatuses = _chunkODAMBLGYjs.OrderStatuses; exports.PaymentStatuses = _chunkODAMBLGYjs.PaymentStatuses; exports.ProductSort = _chunkODAMBLGYjs.ProductSort; exports.err = _chunkODAMBLGYjs.err; exports.formatPrice = formatPrice; exports.generateVisitorId = generateVisitorId; exports.getStoredVisitorId = getStoredVisitorId; exports.grantAnalyticsConsent = grantAnalyticsConsent; exports.ok = _chunkODAMBLGYjs.ok; exports.revokeAnalyticsConsent = revokeAnalyticsConsent; exports.toSdkError = _chunkODAMBLGYjs.toSdkError; exports.trackEcommerceEvent = trackEcommerceEvent;
|
package/dist/index.mjs
CHANGED
package/dist/next.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as BehioStorefrontConfig, B as BehioStorefront } from './client-
|
|
1
|
+
import { n as BehioStorefrontConfig, B as BehioStorefront } from './client-BKNtLTcu.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 { n as BehioStorefrontConfig, B as BehioStorefront } from './client-
|
|
1
|
+
import { n as BehioStorefrontConfig, B as BehioStorefront } from './client-BKNtLTcu.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 _chunkODAMBLGYjs = require('./chunk-ODAMBLGY.js');
|
|
4
4
|
|
|
5
5
|
// src/next.ts
|
|
6
6
|
var _headers = require('next/headers');
|
|
@@ -18,7 +18,7 @@ async function getBehio(options = {}) {
|
|
|
18
18
|
const locale = _nullishCoalesce(options.locale, () => ( process.env.BEHIO_LOCALE));
|
|
19
19
|
const currency = _nullishCoalesce(options.currency, () => ( process.env.BEHIO_CURRENCY));
|
|
20
20
|
const cookieName = _nullishCoalesce(options.cartCookieName, () => ( CART_COOKIE_NAME));
|
|
21
|
-
const client = new (0,
|
|
21
|
+
const client = new (0, _chunkODAMBLGYjs.BehioStorefront)({
|
|
22
22
|
apiKey,
|
|
23
23
|
...baseUrl ? { baseUrl } : {},
|
|
24
24
|
...locale ? { locale } : {},
|