@behio/storefront-sdk 0.34.1 → 0.36.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-5KJDVDUM.mjs → chunk-5C6MNGGB.mjs} +44 -4
- package/dist/{chunk-Y4ZCK5HD.js → chunk-QKEW2EU5.js} +48 -8
- package/dist/{client-DNOo-M26.d.mts → client-Bf2bJGyN.d.mts} +85 -2
- package/dist/{client-DNOo-M26.d.ts → client-Bf2bJGyN.d.ts} +85 -2
- 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 +15 -3
- package/dist/react.d.ts +15 -3
- package/dist/react.js +87 -75
- package/dist/react.mjs +74 -62
- package/package.json +2 -2
|
@@ -5,7 +5,9 @@ var ProductSort = {
|
|
|
5
5
|
NAME_ASC: "name_asc",
|
|
6
6
|
NAME_DESC: "name_desc",
|
|
7
7
|
NEWEST: "newest",
|
|
8
|
-
FEATURED: "featured"
|
|
8
|
+
FEATURED: "featured",
|
|
9
|
+
BESTSELLING: "bestselling",
|
|
10
|
+
RATING: "rating"
|
|
9
11
|
};
|
|
10
12
|
var OrderStatuses = {
|
|
11
13
|
PENDING: "PENDING",
|
|
@@ -499,8 +501,10 @@ var CatalogModule = class {
|
|
|
499
501
|
if (query.locale) q.locale = query.locale;
|
|
500
502
|
if (query.sort) q.sort = query.sort;
|
|
501
503
|
if (query.inStock !== void 0) q.inStock = query.inStock;
|
|
504
|
+
if (query.ratingMin !== void 0) q.ratingMin = query.ratingMin;
|
|
502
505
|
if (query.search) q.search = query.search;
|
|
503
506
|
if (query.customFields) q.customFields = JSON.stringify(query.customFields);
|
|
507
|
+
if (query.facets) q.facets = JSON.stringify(query.facets);
|
|
504
508
|
if (query.ids && query.ids.length > 0) q.ids = query.ids;
|
|
505
509
|
if (query.slugs && query.slugs.length > 0) q.slugs = query.slugs;
|
|
506
510
|
if (query.labels && query.labels.length > 0) q.labels = query.labels;
|
|
@@ -568,6 +572,35 @@ var CatalogModule = class {
|
|
|
568
572
|
async getFilters() {
|
|
569
573
|
return this.client.request("GET", "/catalog/filters");
|
|
570
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* Facet groups + selection-aware counts for the current filter set (custom
|
|
577
|
+
* fields, labels, price, availability, rating, subcategories). Pass the SAME
|
|
578
|
+
* query you pass to `getProducts` (category, search, price, inStock, ratingMin,
|
|
579
|
+
* customFields, facets slugs, labels): counts for each facet are computed with
|
|
580
|
+
* that facet excluded, and values that drop to 0 are still returned (render
|
|
581
|
+
* them disabled). Use this to build an Alza-style filter sidebar.
|
|
582
|
+
*/
|
|
583
|
+
async getFacets(query) {
|
|
584
|
+
const q = {};
|
|
585
|
+
if (query) {
|
|
586
|
+
if (query.category) q.category = query.category;
|
|
587
|
+
if (query.label) q.label = query.label;
|
|
588
|
+
if (query.priceMin) q.priceMin = query.priceMin;
|
|
589
|
+
if (query.priceMax) q.priceMax = query.priceMax;
|
|
590
|
+
if (query.currency) q.currency = query.currency;
|
|
591
|
+
if (query.locale) q.locale = query.locale;
|
|
592
|
+
if (query.inStock !== void 0) q.inStock = query.inStock;
|
|
593
|
+
if (query.ratingMin !== void 0) q.ratingMin = query.ratingMin;
|
|
594
|
+
if (query.search) q.search = query.search;
|
|
595
|
+
if (query.customFields) q.customFields = JSON.stringify(query.customFields);
|
|
596
|
+
if (query.facets) q.facets = JSON.stringify(query.facets);
|
|
597
|
+
if (query.labels && query.labels.length > 0) q.labels = query.labels;
|
|
598
|
+
if (query.categories && query.categories.length > 0) q.categories = query.categories;
|
|
599
|
+
if (query.excludeCategories && query.excludeCategories.length > 0)
|
|
600
|
+
q.excludeCategories = query.excludeCategories;
|
|
601
|
+
}
|
|
602
|
+
return this.client.request("GET", "/catalog/facets", { query: q });
|
|
603
|
+
}
|
|
571
604
|
/** Search products */
|
|
572
605
|
async search(query, options) {
|
|
573
606
|
return this.getProducts({ search: query, ...options });
|
|
@@ -1114,11 +1147,18 @@ var ConsentModule = class {
|
|
|
1114
1147
|
return this.client.request("POST", "/consent", { body: input, auth: false });
|
|
1115
1148
|
}
|
|
1116
1149
|
async get(visitorId) {
|
|
1117
|
-
const result = await this.client.request(
|
|
1150
|
+
const result = await this.client.request(
|
|
1151
|
+
"GET",
|
|
1152
|
+
`/consent/${visitorId}/status`,
|
|
1153
|
+
{ auth: false }
|
|
1154
|
+
);
|
|
1118
1155
|
if (result.error && result.error.status === 404) {
|
|
1119
|
-
|
|
1156
|
+
const legacy = await this.client.request("GET", `/consent/${visitorId}`, { auth: false });
|
|
1157
|
+
if (legacy.error && legacy.error.status === 404) return { data: null, error: null };
|
|
1158
|
+
return legacy;
|
|
1120
1159
|
}
|
|
1121
|
-
return result;
|
|
1160
|
+
if (result.error) return { data: null, error: result.error };
|
|
1161
|
+
return { data: result.data?.consented ? result.data.consent : null, error: null };
|
|
1122
1162
|
}
|
|
1123
1163
|
async revoke(visitorId) {
|
|
1124
1164
|
return this.client.request("DELETE", `/consent/${visitorId}`, { auth: false });
|
|
@@ -5,7 +5,9 @@ var ProductSort = {
|
|
|
5
5
|
NAME_ASC: "name_asc",
|
|
6
6
|
NAME_DESC: "name_desc",
|
|
7
7
|
NEWEST: "newest",
|
|
8
|
-
FEATURED: "featured"
|
|
8
|
+
FEATURED: "featured",
|
|
9
|
+
BESTSELLING: "bestselling",
|
|
10
|
+
RATING: "rating"
|
|
9
11
|
};
|
|
10
12
|
var OrderStatuses = {
|
|
11
13
|
PENDING: "PENDING",
|
|
@@ -499,8 +501,10 @@ var CatalogModule = class {
|
|
|
499
501
|
if (query.locale) q.locale = query.locale;
|
|
500
502
|
if (query.sort) q.sort = query.sort;
|
|
501
503
|
if (query.inStock !== void 0) q.inStock = query.inStock;
|
|
504
|
+
if (query.ratingMin !== void 0) q.ratingMin = query.ratingMin;
|
|
502
505
|
if (query.search) q.search = query.search;
|
|
503
506
|
if (query.customFields) q.customFields = JSON.stringify(query.customFields);
|
|
507
|
+
if (query.facets) q.facets = JSON.stringify(query.facets);
|
|
504
508
|
if (query.ids && query.ids.length > 0) q.ids = query.ids;
|
|
505
509
|
if (query.slugs && query.slugs.length > 0) q.slugs = query.slugs;
|
|
506
510
|
if (query.labels && query.labels.length > 0) q.labels = query.labels;
|
|
@@ -568,6 +572,35 @@ var CatalogModule = class {
|
|
|
568
572
|
async getFilters() {
|
|
569
573
|
return this.client.request("GET", "/catalog/filters");
|
|
570
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* Facet groups + selection-aware counts for the current filter set (custom
|
|
577
|
+
* fields, labels, price, availability, rating, subcategories). Pass the SAME
|
|
578
|
+
* query you pass to `getProducts` (category, search, price, inStock, ratingMin,
|
|
579
|
+
* customFields, facets slugs, labels): counts for each facet are computed with
|
|
580
|
+
* that facet excluded, and values that drop to 0 are still returned (render
|
|
581
|
+
* them disabled). Use this to build an Alza-style filter sidebar.
|
|
582
|
+
*/
|
|
583
|
+
async getFacets(query) {
|
|
584
|
+
const q = {};
|
|
585
|
+
if (query) {
|
|
586
|
+
if (query.category) q.category = query.category;
|
|
587
|
+
if (query.label) q.label = query.label;
|
|
588
|
+
if (query.priceMin) q.priceMin = query.priceMin;
|
|
589
|
+
if (query.priceMax) q.priceMax = query.priceMax;
|
|
590
|
+
if (query.currency) q.currency = query.currency;
|
|
591
|
+
if (query.locale) q.locale = query.locale;
|
|
592
|
+
if (query.inStock !== void 0) q.inStock = query.inStock;
|
|
593
|
+
if (query.ratingMin !== void 0) q.ratingMin = query.ratingMin;
|
|
594
|
+
if (query.search) q.search = query.search;
|
|
595
|
+
if (query.customFields) q.customFields = JSON.stringify(query.customFields);
|
|
596
|
+
if (query.facets) q.facets = JSON.stringify(query.facets);
|
|
597
|
+
if (query.labels && query.labels.length > 0) q.labels = query.labels;
|
|
598
|
+
if (query.categories && query.categories.length > 0) q.categories = query.categories;
|
|
599
|
+
if (query.excludeCategories && query.excludeCategories.length > 0)
|
|
600
|
+
q.excludeCategories = query.excludeCategories;
|
|
601
|
+
}
|
|
602
|
+
return this.client.request("GET", "/catalog/facets", { query: q });
|
|
603
|
+
}
|
|
571
604
|
/** Search products */
|
|
572
605
|
async search(query, options) {
|
|
573
606
|
return this.getProducts({ search: query, ...options });
|
|
@@ -1114,11 +1147,18 @@ var ConsentModule = class {
|
|
|
1114
1147
|
return this.client.request("POST", "/consent", { body: input, auth: false });
|
|
1115
1148
|
}
|
|
1116
1149
|
async get(visitorId) {
|
|
1117
|
-
const result = await this.client.request(
|
|
1150
|
+
const result = await this.client.request(
|
|
1151
|
+
"GET",
|
|
1152
|
+
`/consent/${visitorId}/status`,
|
|
1153
|
+
{ auth: false }
|
|
1154
|
+
);
|
|
1118
1155
|
if (result.error && result.error.status === 404) {
|
|
1119
|
-
|
|
1156
|
+
const legacy = await this.client.request("GET", `/consent/${visitorId}`, { auth: false });
|
|
1157
|
+
if (legacy.error && legacy.error.status === 404) return { data: null, error: null };
|
|
1158
|
+
return legacy;
|
|
1120
1159
|
}
|
|
1121
|
-
return result;
|
|
1160
|
+
if (result.error) return { data: null, error: result.error };
|
|
1161
|
+
return { data: _optionalChain([result, 'access', _32 => _32.data, 'optionalAccess', _33 => _33.consented]) ? result.data.consent : null, error: null };
|
|
1122
1162
|
}
|
|
1123
1163
|
async revoke(visitorId) {
|
|
1124
1164
|
return this.client.request("DELETE", `/consent/${visitorId}`, { auth: false });
|
|
@@ -1178,10 +1218,10 @@ var ShippingModule = class {
|
|
|
1178
1218
|
*/
|
|
1179
1219
|
async listMethods(opts) {
|
|
1180
1220
|
const query = {};
|
|
1181
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1182
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1183
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1184
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1221
|
+
if (_optionalChain([opts, 'optionalAccess', _34 => _34.currency])) query.currency = opts.currency;
|
|
1222
|
+
if (_optionalChain([opts, 'optionalAccess', _35 => _35.country])) query.country = opts.country;
|
|
1223
|
+
if (_optionalChain([opts, 'optionalAccess', _36 => _36.cartTotal]) != null) query.cartTotal = String(opts.cartTotal);
|
|
1224
|
+
if (_optionalChain([opts, 'optionalAccess', _37 => _37.cartWeightKg]) != null) query.cartWeightKg = String(opts.cartWeightKg);
|
|
1185
1225
|
return this.client.request(
|
|
1186
1226
|
"GET",
|
|
1187
1227
|
"/catalog/shipping-methods",
|
|
@@ -620,6 +620,71 @@ interface FilterField {
|
|
|
620
620
|
groupName: string;
|
|
621
621
|
values?: string[];
|
|
622
622
|
}
|
|
623
|
+
interface FacetValue {
|
|
624
|
+
/** Raw stored value (normalized), for exact filtering. */
|
|
625
|
+
value: string;
|
|
626
|
+
/** Human-readable label. */
|
|
627
|
+
label: string;
|
|
628
|
+
/** Stable URL slug for SEO landing pages (e.g. "cerna"); pass back via
|
|
629
|
+
* `ProductsQuery.facets`. */
|
|
630
|
+
slug: string;
|
|
631
|
+
/** Count under the current selection (this facet excluded). 0 = present in
|
|
632
|
+
* context but excluded by other filters — render disabled, don't hide. */
|
|
633
|
+
count: number;
|
|
634
|
+
}
|
|
635
|
+
interface FacetRange {
|
|
636
|
+
min: number | null;
|
|
637
|
+
max: number | null;
|
|
638
|
+
}
|
|
639
|
+
interface Facet {
|
|
640
|
+
key: string;
|
|
641
|
+
name: string;
|
|
642
|
+
/** "enum" (checkboxes), "range" (slider) or "boolean". */
|
|
643
|
+
type: "enum" | "range" | "boolean" | string;
|
|
644
|
+
groupKey: string;
|
|
645
|
+
groupName: string;
|
|
646
|
+
/** Underlying data-group field type (TEXT, NUMBER, MONEY, ...). */
|
|
647
|
+
fieldType: string;
|
|
648
|
+
/** enum/boolean facets: selectable values with counts. */
|
|
649
|
+
values?: FacetValue[];
|
|
650
|
+
/** range facets: numeric bounds within the current context. */
|
|
651
|
+
range?: FacetRange | null;
|
|
652
|
+
/** currency for MONEY range facets, "%" for PERCENTAGE, else null. */
|
|
653
|
+
unit?: string | null;
|
|
654
|
+
}
|
|
655
|
+
interface FacetPriceRange {
|
|
656
|
+
min: number | null;
|
|
657
|
+
max: number | null;
|
|
658
|
+
currency: string;
|
|
659
|
+
}
|
|
660
|
+
interface FacetRatingBucket {
|
|
661
|
+
from: number;
|
|
662
|
+
count: number;
|
|
663
|
+
}
|
|
664
|
+
interface FacetLabel {
|
|
665
|
+
slug: string;
|
|
666
|
+
name: string;
|
|
667
|
+
color?: string | null;
|
|
668
|
+
count: number;
|
|
669
|
+
}
|
|
670
|
+
interface FacetCategory {
|
|
671
|
+
slug: string;
|
|
672
|
+
name: string;
|
|
673
|
+
count: number;
|
|
674
|
+
}
|
|
675
|
+
interface FacetAvailability {
|
|
676
|
+
inStockCount: number;
|
|
677
|
+
outOfStockCount: number;
|
|
678
|
+
}
|
|
679
|
+
interface FacetsResponse {
|
|
680
|
+
priceRange: FacetPriceRange | null;
|
|
681
|
+
facets: Facet[];
|
|
682
|
+
availability: FacetAvailability;
|
|
683
|
+
rating: FacetRatingBucket[];
|
|
684
|
+
labels: FacetLabel[];
|
|
685
|
+
/** Child subcategories of the current category (or top-level), with counts. */
|
|
686
|
+
categories: FacetCategory[];
|
|
687
|
+
}
|
|
623
688
|
declare const ProductSort: {
|
|
624
689
|
readonly PRICE_ASC: "price_asc";
|
|
625
690
|
readonly PRICE_DESC: "price_desc";
|
|
@@ -627,6 +692,8 @@ declare const ProductSort: {
|
|
|
627
692
|
readonly NAME_DESC: "name_desc";
|
|
628
693
|
readonly NEWEST: "newest";
|
|
629
694
|
readonly FEATURED: "featured";
|
|
695
|
+
readonly BESTSELLING: "bestselling";
|
|
696
|
+
readonly RATING: "rating";
|
|
630
697
|
};
|
|
631
698
|
type ProductSortValue = (typeof ProductSort)[keyof typeof ProductSort];
|
|
632
699
|
declare const OrderStatuses: {
|
|
@@ -669,8 +736,15 @@ interface ProductsQuery {
|
|
|
669
736
|
locale?: string;
|
|
670
737
|
sort?: ProductSortValue;
|
|
671
738
|
inStock?: boolean;
|
|
739
|
+
/** Minimum aggregate rating, e.g. 4 for "4 and up". */
|
|
740
|
+
ratingMin?: number;
|
|
672
741
|
search?: string;
|
|
673
|
-
|
|
742
|
+
/** Custom-field filters. A value may be an array = multi-select (OR within
|
|
743
|
+
* the key), e.g. {"barva": ["cerna", "bila"]}. */
|
|
744
|
+
customFields?: Record<string, string | number | boolean | string[] | unknown>;
|
|
745
|
+
/** Slug-based facet selection for SEO URLs: facet key -> value slugs, e.g.
|
|
746
|
+
* {"barva": ["cerna"]}. Resolved server-side to the underlying values. */
|
|
747
|
+
facets?: Record<string, string[]>;
|
|
674
748
|
/** Filter by specific product IDs (comma-separated in URL) */
|
|
675
749
|
ids?: string[];
|
|
676
750
|
/** Filter by specific product slugs */
|
|
@@ -1906,6 +1980,15 @@ declare class CatalogModule {
|
|
|
1906
1980
|
getFilters(): Promise<SdkResult<{
|
|
1907
1981
|
filters: FilterField[];
|
|
1908
1982
|
}>>;
|
|
1983
|
+
/**
|
|
1984
|
+
* Facet groups + selection-aware counts for the current filter set (custom
|
|
1985
|
+
* fields, labels, price, availability, rating, subcategories). Pass the SAME
|
|
1986
|
+
* query you pass to `getProducts` (category, search, price, inStock, ratingMin,
|
|
1987
|
+
* customFields, facets slugs, labels): counts for each facet are computed with
|
|
1988
|
+
* that facet excluded, and values that drop to 0 are still returned (render
|
|
1989
|
+
* them disabled). Use this to build an Alza-style filter sidebar.
|
|
1990
|
+
*/
|
|
1991
|
+
getFacets(query?: ProductsQuery): Promise<SdkResult<FacetsResponse>>;
|
|
1909
1992
|
/** Search products */
|
|
1910
1993
|
search(query: string, options?: {
|
|
1911
1994
|
page?: number;
|
|
@@ -2316,4 +2399,4 @@ declare class NewsletterModule {
|
|
|
2316
2399
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
2317
2400
|
}
|
|
2318
2401
|
|
|
2319
|
-
export { type
|
|
2402
|
+
export { type CookieConsentInput as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ShopInfo as D, type ShopScripts as E, type FilterField as F, type ShopSeo as G, type Bundle as H, type ProductGroup as I, type CrossSellItem as J, type ActivePromotion as K, type LoyaltySummary as L, type Menu as M, type NewsletterSubscribeResult as N, type OrderListItem as O, type ProductsQuery as P, type GiftCardBalance as Q, type RegisterInput as R, type Subscription as S, type ProductReviewsResponse as T, type SubmitReviewInput as U, type ReturnableOrder as V, type WishlistItem as W, type ReturnStatus as X, type ReturnRequest as Y, type SubmitReturnInput as Z, type CookieConsent as _, BehioStorefront as a, type PriceDisplay as a$, type QuoteRequest as a0, type SubmitQuoteInput as a1, type BackInStockSubscription as a2, type AddToCartInput as a3, type AuthTokens as a4, BehioApiError as a5, type BundleItem as a6, type CartDiscount as a7, type CartItem as a8, type CheckoutAddress as a9, type FacetAvailability as aA, type FacetCategory as aB, type FacetLabel as aC, type FacetPriceRange as aD, type FacetRange as aE, type FacetRatingBucket as aF, type FacetValue as aG, FulfillmentStatuses as aH, type GiftCardPurchaseInput as aI, type GiftCardPurchaseResult as aJ, type GiftCardSummary as aK, type LoyaltyBalance as aL, type LoyaltyNextTier as aM, type LoyaltyProgram as aN, type LoyaltyTier as aO, type LoyaltyTierPerks as aP, type LoyaltyTransaction as aQ, type MenuItem as aR, type MenuItemRef as aS, type MenuItemType as aT, type NewsletterOptInDefault as aU, type OrderStatusHistory as aV, OrderStatuses as aW, type OrderTracking as aX, type PageAttachment as aY, PaymentStatuses as aZ, type PickupPointHours as a_, type FulfillmentStatus as aa, type LoginInput as ab, type MessageResponse as ac, type OrderItem as ad, type OrderStatus as ae, type PaymentStatus as af, type ProductPrice as ag, type ProductReview as ah, type ProductVariant as ai, type SdkResult as aj, type AddressType as ak, AddressTypes as al, type BadgeTone as am, type BehioErrorCode as an, type BehioEventHandler as ao, type BehioEventType as ap, BehioNetworkError as aq, type CartBundleLine as ar, type CartBundleLineItem as as, type CartItemProduct as at, type CartPromotion as au, type CheckoutSettings as av, type DataGroupFieldType as aw, type DigitalDownload as ax, type DownloadUrl as ay, type Facet as az, type PaginatedResponse as b, type ProductAvailability as b0, type ProductCustomField as b1, type ProductCustomFieldGroup as b2, type ProductMedia as b3, type ProductMediaVariant as b4, type ProductPromotionSummary as b5, ProductSort as b6, type ProductSortValue as b7, type ProductVolumePrice as b8, type QuoteItem as b9, type RegisterResult as ba, type RequestInterceptor as bb, type RequestInterceptorConfig as bc, type ResponseInterceptor as bd, type ResponseInterceptorData as be, type ReturnRequestItem as bf, type ReturnStatusItem as bg, type ReturnableOrderItem as bh, type SdkError as bi, type ShopScript as bj, type ShopScriptPlacement as bk, type ShopScriptType as bl, type ShopSeoIdentity as bm, type StockBehavior as bn, type SubscriptionFrequency as bo, type SubscriptionItem as bp, type SubscriptionStatus as bq, type TaxBreakdownLine as br, type VariantAxis as bs, type VariantAxisValue as bt, err as bu, ok as bv, toSdkError as bw, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type FacetsResponse as g, type Cart as h, type CustomerProfile as i, type CustomerAddress as j, type AddressDetail as k, type SubscriptionAction as l, type PickupPointsInput as m, type PickupPoint as n, type ShippingMethodSummary as o, type ShippingQuoteInput as p, type ShippingQuote as q, type CheckoutPaymentMethod as r, type NewsletterSubscribeInput as s, type NewsletterUnsubscribeResult as t, type OrderDetail as u, type OrderAccessRequestResponse as v, type OrderAccessVerifyResponse as w, type CheckoutInput as x, type PageDetail as y, type Page as z };
|
|
@@ -620,6 +620,71 @@ interface FilterField {
|
|
|
620
620
|
groupName: string;
|
|
621
621
|
values?: string[];
|
|
622
622
|
}
|
|
623
|
+
interface FacetValue {
|
|
624
|
+
/** Raw stored value (normalized), for exact filtering. */
|
|
625
|
+
value: string;
|
|
626
|
+
/** Human-readable label. */
|
|
627
|
+
label: string;
|
|
628
|
+
/** Stable URL slug for SEO landing pages (e.g. "cerna"); pass back via
|
|
629
|
+
* `ProductsQuery.facets`. */
|
|
630
|
+
slug: string;
|
|
631
|
+
/** Count under the current selection (this facet excluded). 0 = present in
|
|
632
|
+
* context but excluded by other filters — render disabled, don't hide. */
|
|
633
|
+
count: number;
|
|
634
|
+
}
|
|
635
|
+
interface FacetRange {
|
|
636
|
+
min: number | null;
|
|
637
|
+
max: number | null;
|
|
638
|
+
}
|
|
639
|
+
interface Facet {
|
|
640
|
+
key: string;
|
|
641
|
+
name: string;
|
|
642
|
+
/** "enum" (checkboxes), "range" (slider) or "boolean". */
|
|
643
|
+
type: "enum" | "range" | "boolean" | string;
|
|
644
|
+
groupKey: string;
|
|
645
|
+
groupName: string;
|
|
646
|
+
/** Underlying data-group field type (TEXT, NUMBER, MONEY, ...). */
|
|
647
|
+
fieldType: string;
|
|
648
|
+
/** enum/boolean facets: selectable values with counts. */
|
|
649
|
+
values?: FacetValue[];
|
|
650
|
+
/** range facets: numeric bounds within the current context. */
|
|
651
|
+
range?: FacetRange | null;
|
|
652
|
+
/** currency for MONEY range facets, "%" for PERCENTAGE, else null. */
|
|
653
|
+
unit?: string | null;
|
|
654
|
+
}
|
|
655
|
+
interface FacetPriceRange {
|
|
656
|
+
min: number | null;
|
|
657
|
+
max: number | null;
|
|
658
|
+
currency: string;
|
|
659
|
+
}
|
|
660
|
+
interface FacetRatingBucket {
|
|
661
|
+
from: number;
|
|
662
|
+
count: number;
|
|
663
|
+
}
|
|
664
|
+
interface FacetLabel {
|
|
665
|
+
slug: string;
|
|
666
|
+
name: string;
|
|
667
|
+
color?: string | null;
|
|
668
|
+
count: number;
|
|
669
|
+
}
|
|
670
|
+
interface FacetCategory {
|
|
671
|
+
slug: string;
|
|
672
|
+
name: string;
|
|
673
|
+
count: number;
|
|
674
|
+
}
|
|
675
|
+
interface FacetAvailability {
|
|
676
|
+
inStockCount: number;
|
|
677
|
+
outOfStockCount: number;
|
|
678
|
+
}
|
|
679
|
+
interface FacetsResponse {
|
|
680
|
+
priceRange: FacetPriceRange | null;
|
|
681
|
+
facets: Facet[];
|
|
682
|
+
availability: FacetAvailability;
|
|
683
|
+
rating: FacetRatingBucket[];
|
|
684
|
+
labels: FacetLabel[];
|
|
685
|
+
/** Child subcategories of the current category (or top-level), with counts. */
|
|
686
|
+
categories: FacetCategory[];
|
|
687
|
+
}
|
|
623
688
|
declare const ProductSort: {
|
|
624
689
|
readonly PRICE_ASC: "price_asc";
|
|
625
690
|
readonly PRICE_DESC: "price_desc";
|
|
@@ -627,6 +692,8 @@ declare const ProductSort: {
|
|
|
627
692
|
readonly NAME_DESC: "name_desc";
|
|
628
693
|
readonly NEWEST: "newest";
|
|
629
694
|
readonly FEATURED: "featured";
|
|
695
|
+
readonly BESTSELLING: "bestselling";
|
|
696
|
+
readonly RATING: "rating";
|
|
630
697
|
};
|
|
631
698
|
type ProductSortValue = (typeof ProductSort)[keyof typeof ProductSort];
|
|
632
699
|
declare const OrderStatuses: {
|
|
@@ -669,8 +736,15 @@ interface ProductsQuery {
|
|
|
669
736
|
locale?: string;
|
|
670
737
|
sort?: ProductSortValue;
|
|
671
738
|
inStock?: boolean;
|
|
739
|
+
/** Minimum aggregate rating, e.g. 4 for "4 and up". */
|
|
740
|
+
ratingMin?: number;
|
|
672
741
|
search?: string;
|
|
673
|
-
|
|
742
|
+
/** Custom-field filters. A value may be an array = multi-select (OR within
|
|
743
|
+
* the key), e.g. {"barva": ["cerna", "bila"]}. */
|
|
744
|
+
customFields?: Record<string, string | number | boolean | string[] | unknown>;
|
|
745
|
+
/** Slug-based facet selection for SEO URLs: facet key -> value slugs, e.g.
|
|
746
|
+
* {"barva": ["cerna"]}. Resolved server-side to the underlying values. */
|
|
747
|
+
facets?: Record<string, string[]>;
|
|
674
748
|
/** Filter by specific product IDs (comma-separated in URL) */
|
|
675
749
|
ids?: string[];
|
|
676
750
|
/** Filter by specific product slugs */
|
|
@@ -1906,6 +1980,15 @@ declare class CatalogModule {
|
|
|
1906
1980
|
getFilters(): Promise<SdkResult<{
|
|
1907
1981
|
filters: FilterField[];
|
|
1908
1982
|
}>>;
|
|
1983
|
+
/**
|
|
1984
|
+
* Facet groups + selection-aware counts for the current filter set (custom
|
|
1985
|
+
* fields, labels, price, availability, rating, subcategories). Pass the SAME
|
|
1986
|
+
* query you pass to `getProducts` (category, search, price, inStock, ratingMin,
|
|
1987
|
+
* customFields, facets slugs, labels): counts for each facet are computed with
|
|
1988
|
+
* that facet excluded, and values that drop to 0 are still returned (render
|
|
1989
|
+
* them disabled). Use this to build an Alza-style filter sidebar.
|
|
1990
|
+
*/
|
|
1991
|
+
getFacets(query?: ProductsQuery): Promise<SdkResult<FacetsResponse>>;
|
|
1909
1992
|
/** Search products */
|
|
1910
1993
|
search(query: string, options?: {
|
|
1911
1994
|
page?: number;
|
|
@@ -2316,4 +2399,4 @@ declare class NewsletterModule {
|
|
|
2316
2399
|
unsubscribe(email: string): Promise<SdkResult<NewsletterUnsubscribeResult>>;
|
|
2317
2400
|
}
|
|
2318
2401
|
|
|
2319
|
-
export { type
|
|
2402
|
+
export { type CookieConsentInput as $, type AddressSuggestion as A, type BehioStorefrontConfig as B, type Category as C, type ShopInfo as D, type ShopScripts as E, type FilterField as F, type ShopSeo as G, type Bundle as H, type ProductGroup as I, type CrossSellItem as J, type ActivePromotion as K, type LoyaltySummary as L, type Menu as M, type NewsletterSubscribeResult as N, type OrderListItem as O, type ProductsQuery as P, type GiftCardBalance as Q, type RegisterInput as R, type Subscription as S, type ProductReviewsResponse as T, type SubmitReviewInput as U, type ReturnableOrder as V, type WishlistItem as W, type ReturnStatus as X, type ReturnRequest as Y, type SubmitReturnInput as Z, type CookieConsent as _, BehioStorefront as a, type PriceDisplay as a$, type QuoteRequest as a0, type SubmitQuoteInput as a1, type BackInStockSubscription as a2, type AddToCartInput as a3, type AuthTokens as a4, BehioApiError as a5, type BundleItem as a6, type CartDiscount as a7, type CartItem as a8, type CheckoutAddress as a9, type FacetAvailability as aA, type FacetCategory as aB, type FacetLabel as aC, type FacetPriceRange as aD, type FacetRange as aE, type FacetRatingBucket as aF, type FacetValue as aG, FulfillmentStatuses as aH, type GiftCardPurchaseInput as aI, type GiftCardPurchaseResult as aJ, type GiftCardSummary as aK, type LoyaltyBalance as aL, type LoyaltyNextTier as aM, type LoyaltyProgram as aN, type LoyaltyTier as aO, type LoyaltyTierPerks as aP, type LoyaltyTransaction as aQ, type MenuItem as aR, type MenuItemRef as aS, type MenuItemType as aT, type NewsletterOptInDefault as aU, type OrderStatusHistory as aV, OrderStatuses as aW, type OrderTracking as aX, type PageAttachment as aY, PaymentStatuses as aZ, type PickupPointHours as a_, type FulfillmentStatus as aa, type LoginInput as ab, type MessageResponse as ac, type OrderItem as ad, type OrderStatus as ae, type PaymentStatus as af, type ProductPrice as ag, type ProductReview as ah, type ProductVariant as ai, type SdkResult as aj, type AddressType as ak, AddressTypes as al, type BadgeTone as am, type BehioErrorCode as an, type BehioEventHandler as ao, type BehioEventType as ap, BehioNetworkError as aq, type CartBundleLine as ar, type CartBundleLineItem as as, type CartItemProduct as at, type CartPromotion as au, type CheckoutSettings as av, type DataGroupFieldType as aw, type DigitalDownload as ax, type DownloadUrl as ay, type Facet as az, type PaginatedResponse as b, type ProductAvailability as b0, type ProductCustomField as b1, type ProductCustomFieldGroup as b2, type ProductMedia as b3, type ProductMediaVariant as b4, type ProductPromotionSummary as b5, ProductSort as b6, type ProductSortValue as b7, type ProductVolumePrice as b8, type QuoteItem as b9, type RegisterResult as ba, type RequestInterceptor as bb, type RequestInterceptorConfig as bc, type ResponseInterceptor as bd, type ResponseInterceptorData as be, type ReturnRequestItem as bf, type ReturnStatusItem as bg, type ReturnableOrderItem as bh, type SdkError as bi, type ShopScript as bj, type ShopScriptPlacement as bk, type ShopScriptType as bl, type ShopSeoIdentity as bm, type StockBehavior as bn, type SubscriptionFrequency as bo, type SubscriptionItem as bp, type SubscriptionStatus as bq, type TaxBreakdownLine as br, type VariantAxis as bs, type VariantAxisValue as bt, err as bu, ok as bv, toSdkError as bw, type ProductListItem as c, type ProductDetail as d, type CategoryDetail as e, type ProductLabel as f, type FacetsResponse as g, type Cart as h, type CustomerProfile as i, type CustomerAddress as j, type AddressDetail as k, type SubscriptionAction as l, type PickupPointsInput as m, type PickupPoint as n, type ShippingMethodSummary as o, type ShippingQuoteInput as p, type ShippingQuote as q, type CheckoutPaymentMethod as r, type NewsletterSubscribeInput as s, type NewsletterUnsubscribeResult as t, type OrderDetail as u, type OrderAccessRequestResponse as v, type OrderAccessVerifyResponse as w, type CheckoutInput as x, type PageDetail as y, type Page as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as BehioStorefront,
|
|
2
|
-
export {
|
|
1
|
+
import { a as BehioStorefront, aj as SdkResult, _ as CookieConsent } from './client-Bf2bJGyN.mjs';
|
|
2
|
+
export { K as ActivePromotion, a3 as AddToCartInput, k as AddressDetail, A as AddressSuggestion, ak as AddressType, al as AddressTypes, a4 as AuthTokens, a2 as BackInStockSubscription, am as BadgeTone, a5 as BehioApiError, an as BehioErrorCode, ao as BehioEventHandler, ap as BehioEventType, aq as BehioNetworkError, B as BehioStorefrontConfig, H as Bundle, a6 as BundleItem, h as Cart, ar as CartBundleLine, as as CartBundleLineItem, a7 as CartDiscount, a8 as CartItem, at as CartItemProduct, au as CartPromotion, C as Category, e as CategoryDetail, a9 as CheckoutAddress, x as CheckoutInput, r as CheckoutPaymentMethod, av as CheckoutSettings, $ as CookieConsentInput, J as CrossSellItem, j as CustomerAddress, i as CustomerProfile, aw as DataGroupFieldType, ax as DigitalDownload, ay as DownloadUrl, az as Facet, aA as FacetAvailability, aB as FacetCategory, aC as FacetLabel, aD as FacetPriceRange, aE as FacetRange, aF as FacetRatingBucket, aG as FacetValue, g as FacetsResponse, F as FilterField, aa as FulfillmentStatus, aH as FulfillmentStatuses, Q as GiftCardBalance, aI as GiftCardPurchaseInput, aJ as GiftCardPurchaseResult, aK as GiftCardSummary, ab as LoginInput, aL as LoyaltyBalance, aM as LoyaltyNextTier, aN as LoyaltyProgram, L as LoyaltySummary, aO as LoyaltyTier, aP as LoyaltyTierPerks, aQ as LoyaltyTransaction, M as Menu, aR as MenuItem, aS as MenuItemRef, aT as MenuItemType, ac as MessageResponse, aU as NewsletterOptInDefault, s as NewsletterSubscribeInput, N as NewsletterSubscribeResult, t as NewsletterUnsubscribeResult, v as OrderAccessRequestResponse, w as OrderAccessVerifyResponse, u as OrderDetail, ad as OrderItem, O as OrderListItem, ae as OrderStatus, aV as OrderStatusHistory, aW as OrderStatuses, aX as OrderTracking, z as Page, aY as PageAttachment, y as PageDetail, b as PaginatedResponse, af as PaymentStatus, aZ as PaymentStatuses, n as PickupPoint, a_ as PickupPointHours, m as PickupPointsInput, a$ as PriceDisplay, b0 as ProductAvailability, b1 as ProductCustomField, b2 as ProductCustomFieldGroup, d as ProductDetail, I as ProductGroup, f as ProductLabel, c as ProductListItem, b3 as ProductMedia, b4 as ProductMediaVariant, ag as ProductPrice, b5 as ProductPromotionSummary, ah as ProductReview, T as ProductReviewsResponse, b6 as ProductSort, b7 as ProductSortValue, ai as ProductVariant, b8 as ProductVolumePrice, P as ProductsQuery, b9 as QuoteItem, a0 as QuoteRequest, R as RegisterInput, ba as RegisterResult, bb as RequestInterceptor, bc as RequestInterceptorConfig, bd as ResponseInterceptor, be as ResponseInterceptorData, Y as ReturnRequest, bf as ReturnRequestItem, X as ReturnStatus, bg as ReturnStatusItem, V as ReturnableOrder, bh as ReturnableOrderItem, bi as SdkError, o as ShippingMethodSummary, q as ShippingQuote, p as ShippingQuoteInput, D as ShopInfo, bj as ShopScript, bk as ShopScriptPlacement, bl as ShopScriptType, E as ShopScripts, G as ShopSeo, bm as ShopSeoIdentity, bn as StockBehavior, a1 as SubmitQuoteInput, Z as SubmitReturnInput, U as SubmitReviewInput, S as Subscription, l as SubscriptionAction, bo as SubscriptionFrequency, bp as SubscriptionItem, bq as SubscriptionStatus, br as TaxBreakdownLine, bs as VariantAxis, bt as VariantAxisValue, W as WishlistItem, bu as err, bv as ok, bw as toSdkError } from './client-Bf2bJGyN.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 { a as BehioStorefront,
|
|
2
|
-
export {
|
|
1
|
+
import { a as BehioStorefront, aj as SdkResult, _ as CookieConsent } from './client-Bf2bJGyN.js';
|
|
2
|
+
export { K as ActivePromotion, a3 as AddToCartInput, k as AddressDetail, A as AddressSuggestion, ak as AddressType, al as AddressTypes, a4 as AuthTokens, a2 as BackInStockSubscription, am as BadgeTone, a5 as BehioApiError, an as BehioErrorCode, ao as BehioEventHandler, ap as BehioEventType, aq as BehioNetworkError, B as BehioStorefrontConfig, H as Bundle, a6 as BundleItem, h as Cart, ar as CartBundleLine, as as CartBundleLineItem, a7 as CartDiscount, a8 as CartItem, at as CartItemProduct, au as CartPromotion, C as Category, e as CategoryDetail, a9 as CheckoutAddress, x as CheckoutInput, r as CheckoutPaymentMethod, av as CheckoutSettings, $ as CookieConsentInput, J as CrossSellItem, j as CustomerAddress, i as CustomerProfile, aw as DataGroupFieldType, ax as DigitalDownload, ay as DownloadUrl, az as Facet, aA as FacetAvailability, aB as FacetCategory, aC as FacetLabel, aD as FacetPriceRange, aE as FacetRange, aF as FacetRatingBucket, aG as FacetValue, g as FacetsResponse, F as FilterField, aa as FulfillmentStatus, aH as FulfillmentStatuses, Q as GiftCardBalance, aI as GiftCardPurchaseInput, aJ as GiftCardPurchaseResult, aK as GiftCardSummary, ab as LoginInput, aL as LoyaltyBalance, aM as LoyaltyNextTier, aN as LoyaltyProgram, L as LoyaltySummary, aO as LoyaltyTier, aP as LoyaltyTierPerks, aQ as LoyaltyTransaction, M as Menu, aR as MenuItem, aS as MenuItemRef, aT as MenuItemType, ac as MessageResponse, aU as NewsletterOptInDefault, s as NewsletterSubscribeInput, N as NewsletterSubscribeResult, t as NewsletterUnsubscribeResult, v as OrderAccessRequestResponse, w as OrderAccessVerifyResponse, u as OrderDetail, ad as OrderItem, O as OrderListItem, ae as OrderStatus, aV as OrderStatusHistory, aW as OrderStatuses, aX as OrderTracking, z as Page, aY as PageAttachment, y as PageDetail, b as PaginatedResponse, af as PaymentStatus, aZ as PaymentStatuses, n as PickupPoint, a_ as PickupPointHours, m as PickupPointsInput, a$ as PriceDisplay, b0 as ProductAvailability, b1 as ProductCustomField, b2 as ProductCustomFieldGroup, d as ProductDetail, I as ProductGroup, f as ProductLabel, c as ProductListItem, b3 as ProductMedia, b4 as ProductMediaVariant, ag as ProductPrice, b5 as ProductPromotionSummary, ah as ProductReview, T as ProductReviewsResponse, b6 as ProductSort, b7 as ProductSortValue, ai as ProductVariant, b8 as ProductVolumePrice, P as ProductsQuery, b9 as QuoteItem, a0 as QuoteRequest, R as RegisterInput, ba as RegisterResult, bb as RequestInterceptor, bc as RequestInterceptorConfig, bd as ResponseInterceptor, be as ResponseInterceptorData, Y as ReturnRequest, bf as ReturnRequestItem, X as ReturnStatus, bg as ReturnStatusItem, V as ReturnableOrder, bh as ReturnableOrderItem, bi as SdkError, o as ShippingMethodSummary, q as ShippingQuote, p as ShippingQuoteInput, D as ShopInfo, bj as ShopScript, bk as ShopScriptPlacement, bl as ShopScriptType, E as ShopScripts, G as ShopSeo, bm as ShopSeoIdentity, bn as StockBehavior, a1 as SubmitQuoteInput, Z as SubmitReturnInput, U as SubmitReviewInput, S as Subscription, l as SubscriptionAction, bo as SubscriptionFrequency, bp as SubscriptionItem, bq as SubscriptionStatus, br as TaxBreakdownLine, bs as VariantAxis, bt as VariantAxisValue, W as WishlistItem, bu as err, bv as ok, bw as toSdkError } from './client-Bf2bJGyN.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Format a price amount with currency using Intl.NumberFormat.
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var _chunkCZRSJULDjs = require('./chunk-CZRSJULD.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkQKEW2EU5js = require('./chunk-QKEW2EU5.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -37,4 +37,4 @@ var _chunkY4ZCK5HDjs = require('./chunk-Y4ZCK5HD.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
exports.AddressTypes =
|
|
40
|
+
exports.AddressTypes = _chunkQKEW2EU5js.AddressTypes; exports.BehioApiError = _chunkQKEW2EU5js.BehioApiError; exports.BehioNetworkError = _chunkQKEW2EU5js.BehioNetworkError; exports.BehioStorefront = _chunkQKEW2EU5js.BehioStorefront; exports.FulfillmentStatuses = _chunkQKEW2EU5js.FulfillmentStatuses; exports.OrderStatuses = _chunkQKEW2EU5js.OrderStatuses; exports.PaymentStatuses = _chunkQKEW2EU5js.PaymentStatuses; exports.ProductSort = _chunkQKEW2EU5js.ProductSort; exports.err = _chunkQKEW2EU5js.err; exports.formatPrice = _chunkCZRSJULDjs.formatPrice; exports.generateVisitorId = _chunkCZRSJULDjs.generateVisitorId; exports.getStoredVisitorId = _chunkCZRSJULDjs.getStoredVisitorId; exports.grantAnalyticsConsent = _chunkCZRSJULDjs.grantAnalyticsConsent; exports.ok = _chunkQKEW2EU5js.ok; exports.revokeAnalyticsConsent = _chunkCZRSJULDjs.revokeAnalyticsConsent; exports.toSdkError = _chunkQKEW2EU5js.toSdkError; exports.trackEcommerceEvent = _chunkCZRSJULDjs.trackEcommerceEvent;
|
package/dist/index.mjs
CHANGED
package/dist/next.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-
|
|
1
|
+
import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-Bf2bJGyN.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 { B as BehioStorefrontConfig, a as BehioStorefront } from './client-
|
|
1
|
+
import { B as BehioStorefrontConfig, a as BehioStorefront } from './client-Bf2bJGyN.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 _chunkQKEW2EU5js = require('./chunk-QKEW2EU5.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, _chunkQKEW2EU5js.BehioStorefront)({
|
|
22
22
|
apiKey,
|
|
23
23
|
...baseUrl ? { baseUrl } : {},
|
|
24
24
|
...locale ? { locale } : {},
|
package/dist/next.mjs
CHANGED
package/dist/react.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
3
|
import { QueryClient } from '@tanstack/react-query';
|
|
4
|
-
import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as
|
|
5
|
-
export {
|
|
4
|
+
import { a as BehioStorefront, P as ProductsQuery, b as PaginatedResponse, c as ProductListItem, d as ProductDetail, C as Category, e as CategoryDetail, M as Menu, f as ProductLabel, F as FilterField, g as FacetsResponse, h as Cart, i as CustomerProfile, R as RegisterInput, j as CustomerAddress, A as AddressSuggestion, k as AddressDetail, L as LoyaltySummary, S as Subscription, l as SubscriptionAction, m as PickupPointsInput, n as PickupPoint, o as ShippingMethodSummary, p as ShippingQuoteInput, q as ShippingQuote, r as CheckoutPaymentMethod, N as NewsletterSubscribeResult, s as NewsletterSubscribeInput, t as NewsletterUnsubscribeResult, O as OrderListItem, u as OrderDetail, v as OrderAccessRequestResponse, w as OrderAccessVerifyResponse, x as CheckoutInput, y as PageDetail, z as Page, D as ShopInfo, E as ShopScripts, G as ShopSeo, H as Bundle, I as ProductGroup, J as CrossSellItem, K as ActivePromotion, Q as GiftCardBalance, W as WishlistItem, T as ProductReviewsResponse, U as SubmitReviewInput, V as ReturnableOrder, X as ReturnStatus, Y as ReturnRequest, Z as SubmitReturnInput, _ as CookieConsent, $ as CookieConsentInput, a0 as QuoteRequest, a1 as SubmitQuoteInput, a2 as BackInStockSubscription } from './client-Bf2bJGyN.mjs';
|
|
5
|
+
export { a3 as AddToCartInput, a4 as AuthTokens, a5 as BehioApiError, a6 as BundleItem, a7 as CartDiscount, a8 as CartItem, a9 as CheckoutAddress, aa as FulfillmentStatus, ab as LoginInput, ac as MessageResponse, ad as OrderItem, ae as OrderStatus, af as PaymentStatus, ag as ProductPrice, ah as ProductReview, ai as ProductVariant } from './client-Bf2bJGyN.mjs';
|
|
6
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
7
|
export { EcommerceEventName, EcommerceItem, EcommercePayload, formatPrice, generateVisitorId, getStoredVisitorId, grantAnalyticsConsent, revokeAnalyticsConsent, trackEcommerceEvent } from './index.mjs';
|
|
8
8
|
|
|
@@ -179,6 +179,18 @@ interface UseFiltersOptions {
|
|
|
179
179
|
}
|
|
180
180
|
declare function useFilters(options?: UseFiltersOptions): _tanstack_react_query.UseQueryResult<NoInfer<FilterField[]>, Error>;
|
|
181
181
|
|
|
182
|
+
interface UseFacetsOptions {
|
|
183
|
+
enabled?: boolean;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Facet groups + selection-aware counts for the given filter query (the same
|
|
187
|
+
* shape you pass to `useProducts`). Drives an Alza-style filter sidebar: counts
|
|
188
|
+
* update as the customer ticks values, and zero-count values are returned so you
|
|
189
|
+
* can render them disabled instead of hiding them. The query key includes the
|
|
190
|
+
* serialized filters so switching filters refetches.
|
|
191
|
+
*/
|
|
192
|
+
declare function useFacets(query?: ProductsQuery, options?: UseFacetsOptions): _tanstack_react_query.UseQueryResult<NoInfer<FacetsResponse>, Error>;
|
|
193
|
+
|
|
182
194
|
interface UseSearchOptions {
|
|
183
195
|
page?: number;
|
|
184
196
|
limit?: number;
|
|
@@ -1281,4 +1293,4 @@ declare function useNotifyWhenAvailable(): _tanstack_react_query.UseMutationResu
|
|
|
1281
1293
|
*/
|
|
1282
1294
|
declare function useBehioClient(): BehioStorefront;
|
|
1283
1295
|
|
|
1284
|
-
export { ActivePromotion, type AnalyticsEventInput, BehioAnalyticsTracker, BehioProvider, type BehioProviderProps, Bundle, Cart, Category, CategoryDetail, CheckoutInput, CookieConsent, CookieConsentInput, CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, CustomerAddress, CustomerProfile, FilterField, GiftCardBalance, OrderDetail, OrderListItem, Page, PageDetail, PaginatedResponse, type PersonalOffer, ProductDetail, ProductLabel, ProductListItem, ProductReviewsResponse, ProductsQuery, QuoteRequest, RegisterInput, ReturnRequest, ShopInfo, ShopSeo, type StorageAdapter, StorefrontScripts, type StorefrontScriptsProps, SubmitQuoteInput, SubmitReturnInput, SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseLoyaltyOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UsePaymentMethodsOptions, type UsePersonalOffersOptions, type UseProductOptions, type UseProductsOptions, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingQuoteOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, type UseSubscriptionsOptions, WishlistItem, cookieStorage, createMemoryStorage, detectStorage, localStorageAdapter, memoryStorage, useAddressAutocomplete, useAddresses, useAnalyticsEvents, useAuth, useBehio, useBehioClient, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCheckout, useCookieConsent, useCrossSell, useCurrency, useCustomer, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLookupReturnableOrder, useLoyalty, useMenu, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePaymentMethods, usePersonalOffers, usePickupPoints, useProduct, useProductGroup, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShippingMethods, useShippingQuote, useShopInfo, useShopScripts, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useSubscriptions, useWishlist };
|
|
1296
|
+
export { ActivePromotion, type AnalyticsEventInput, BehioAnalyticsTracker, BehioProvider, type BehioProviderProps, Bundle, Cart, Category, CategoryDetail, CheckoutInput, CookieConsent, CookieConsentInput, CrossSellItem, CurrencySwitcher, type CurrencySwitcherProps, type CurrencySwitcherRenderProps, CustomerAddress, CustomerProfile, FilterField, GiftCardBalance, OrderDetail, OrderListItem, Page, PageDetail, PaginatedResponse, type PersonalOffer, ProductDetail, ProductLabel, ProductListItem, ProductReviewsResponse, ProductsQuery, QuoteRequest, RegisterInput, ReturnRequest, ShopInfo, ShopSeo, type StorageAdapter, StorefrontScripts, type StorefrontScriptsProps, SubmitQuoteInput, SubmitReturnInput, SubmitReviewInput, type UseAddressAutocompleteOptions, type UseAddressAutocompleteReturn, type UseAddressesOptions, type UseCartCountOptions, type UseCartOptions, type UseCategoriesOptions, type UseCategoryOptions, type UseCurrencyResult, type UseCustomerOptions, type UseFacetsOptions, type UseFeaturedOptions, type UseFiltersOptions, type UseLabelsOptions, type UseLoyaltyOptions, type UseMenuOptions, type UseOrderOptions, type UseOrdersOptions, type UsePageOptions, type UsePagesOptions, type UsePaymentMethodsOptions, type UsePersonalOffersOptions, type UseProductOptions, type UseProductsOptions, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingQuoteOptions, type UseShopInfoOptions, type UseShopScriptsOptions, type UseShopSeoOptions, type UseSubscriptionsOptions, WishlistItem, cookieStorage, createMemoryStorage, detectStorage, localStorageAdapter, memoryStorage, useAddressAutocomplete, useAddresses, useAnalyticsEvents, useAuth, useBehio, useBehioClient, useBundle, useBundles, useCart, useCartCount, useCategories, useCategory, useCheckout, useCookieConsent, useCrossSell, useCurrency, useCustomer, useFacets, useFeatured, useFilters, useGiftCardBalance, useIsInWishlist, useLabels, useLookupReturnableOrder, useLoyalty, useMenu, useNewsletterSubscribe, useNewsletterUnsubscribe, useNotifyWhenAvailable, useOrder, useOrderAccess, useOrders, usePage, usePages, usePaymentMethods, usePersonalOffers, usePickupPoints, useProduct, useProductGroup, useProductPromotions, useProductReviews, useProducts, useQuoteStatus, useReturnStatus, useSearch, useShippingMethods, useShippingQuote, useShopInfo, useShopScripts, useShopSeo, useSubmitQuote, useSubmitReturn, useSubmitReview, useSubscriptions, useWishlist };
|