@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
|
@@ -566,8 +566,7 @@ var CatalogModule = class {
|
|
|
566
566
|
if (query.inStock !== void 0) q.inStock = query.inStock;
|
|
567
567
|
if (query.ratingMin !== void 0) q.ratingMin = query.ratingMin;
|
|
568
568
|
if (query.search) q.search = query.search;
|
|
569
|
-
if (query.
|
|
570
|
-
q.customFields = JSON.stringify(query.customFields);
|
|
569
|
+
if (query.parameters) q.parameters = JSON.stringify(query.parameters);
|
|
571
570
|
if (query.facets) q.facets = JSON.stringify(query.facets);
|
|
572
571
|
if (query.ids && query.ids.length > 0) q.ids = query.ids;
|
|
573
572
|
if (query.slugs && query.slugs.length > 0) q.slugs = query.slugs;
|
|
@@ -659,18 +658,52 @@ var CatalogModule = class {
|
|
|
659
658
|
}
|
|
660
659
|
);
|
|
661
660
|
}
|
|
662
|
-
/**
|
|
663
|
-
|
|
661
|
+
/**
|
|
662
|
+
* Available filters for a dynamic filter UI.
|
|
663
|
+
*
|
|
664
|
+
* Derived from curated PARAMETERS the merchant marked filterable, so a
|
|
665
|
+
* visitor can never filter by something that does not appear in the
|
|
666
|
+
* product's parameters. Labels are per language, hence `locale`.
|
|
667
|
+
*/
|
|
668
|
+
async getFilters(options) {
|
|
669
|
+
return this.client.request(
|
|
670
|
+
"GET",
|
|
671
|
+
"/catalog/filters",
|
|
672
|
+
{ query: { locale: _optionalChain([options, 'optionalAccess', _25 => _25.locale]) } }
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Curated parameter groups of a product, already resolved (label, value,
|
|
677
|
+
* unit, order). Returns an ARRAY of groups so a template can lay them out
|
|
678
|
+
* however it likes: one group as a spec table, another as badges.
|
|
679
|
+
*
|
|
680
|
+
* A variant's own parameters ride along on `ProductDetail.variants[]`, so
|
|
681
|
+
* this call is for the parent product.
|
|
682
|
+
*/
|
|
683
|
+
async getProductParameters(slug, options) {
|
|
684
|
+
return this.client.request(
|
|
685
|
+
"GET",
|
|
686
|
+
`/catalog/products/${slug}/parameters`,
|
|
687
|
+
{ query: { locale: _optionalChain([options, 'optionalAccess', _26 => _26.locale]) } }
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* One specific parameter group of a product, by its slug. 404 when the
|
|
692
|
+
* product does not have that group, which is deliberate: the caller asked
|
|
693
|
+
* for a named thing, so an empty array would hide a wrong slug.
|
|
694
|
+
*/
|
|
695
|
+
async getProductParameterGroup(slug, groupSlug, options) {
|
|
664
696
|
return this.client.request(
|
|
665
697
|
"GET",
|
|
666
|
-
|
|
698
|
+
`/catalog/products/${slug}/parameters/${groupSlug}`,
|
|
699
|
+
{ query: { locale: _optionalChain([options, 'optionalAccess', _27 => _27.locale]) } }
|
|
667
700
|
);
|
|
668
701
|
}
|
|
669
702
|
/**
|
|
670
|
-
* Facet groups + selection-aware counts for the current filter set
|
|
671
|
-
*
|
|
672
|
-
* query you pass to `getProducts` (category, search, price, inStock,
|
|
673
|
-
*
|
|
703
|
+
* Facet groups + selection-aware counts for the current filter set
|
|
704
|
+
* (parameters, labels, price, availability, rating, subcategories). Pass the
|
|
705
|
+
* SAME query you pass to `getProducts` (category, search, price, inStock,
|
|
706
|
+
* ratingMin, parameters, facets slugs, labels): counts are computed with
|
|
674
707
|
* that facet excluded, and values that drop to 0 are still returned (render
|
|
675
708
|
* them disabled). Use this to build an Alza-style filter sidebar.
|
|
676
709
|
*/
|
|
@@ -686,8 +719,7 @@ var CatalogModule = class {
|
|
|
686
719
|
if (query.inStock !== void 0) q.inStock = query.inStock;
|
|
687
720
|
if (query.ratingMin !== void 0) q.ratingMin = query.ratingMin;
|
|
688
721
|
if (query.search) q.search = query.search;
|
|
689
|
-
if (query.
|
|
690
|
-
q.customFields = JSON.stringify(query.customFields);
|
|
722
|
+
if (query.parameters) q.parameters = JSON.stringify(query.parameters);
|
|
691
723
|
if (query.facets) q.facets = JSON.stringify(query.facets);
|
|
692
724
|
if (query.labels && query.labels.length > 0) q.labels = query.labels;
|
|
693
725
|
if (query.categories && query.categories.length > 0)
|
|
@@ -722,7 +754,7 @@ var CatalogModule = class {
|
|
|
722
754
|
"GET",
|
|
723
755
|
`/catalog/product-groups/${encodeURIComponent(slug)}`,
|
|
724
756
|
{
|
|
725
|
-
query: { locale: _optionalChain([options, 'optionalAccess',
|
|
757
|
+
query: { locale: _optionalChain([options, 'optionalAccess', _28 => _28.locale]), currency: _optionalChain([options, 'optionalAccess', _29 => _29.currency]) }
|
|
726
758
|
}
|
|
727
759
|
);
|
|
728
760
|
}
|
|
@@ -737,7 +769,7 @@ var CatalogModule = class {
|
|
|
737
769
|
return this.client.request(
|
|
738
770
|
"GET",
|
|
739
771
|
`/catalog/products/${encodeURIComponent(productSlug)}/cross-sell`,
|
|
740
|
-
{ query: { locale: _optionalChain([options, 'optionalAccess',
|
|
772
|
+
{ query: { locale: _optionalChain([options, 'optionalAccess', _30 => _30.locale]), currency: _optionalChain([options, 'optionalAccess', _31 => _31.currency]) } }
|
|
741
773
|
);
|
|
742
774
|
}
|
|
743
775
|
/** Active promotions applicable to a product (with countdown end time) */
|
|
@@ -777,7 +809,7 @@ var CatalogModule = class {
|
|
|
777
809
|
/** List configured payment methods (filtered by currency). */
|
|
778
810
|
async listPaymentMethods(opts) {
|
|
779
811
|
const query = {};
|
|
780
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
812
|
+
if (_optionalChain([opts, 'optionalAccess', _32 => _32.currency])) query.currency = opts.currency;
|
|
781
813
|
return this.client.request(
|
|
782
814
|
"GET",
|
|
783
815
|
"/catalog/payment-methods",
|
|
@@ -1071,7 +1103,7 @@ var OrdersModule = class {
|
|
|
1071
1103
|
"GET",
|
|
1072
1104
|
"/orders",
|
|
1073
1105
|
{
|
|
1074
|
-
query: { page: _optionalChain([options, 'optionalAccess',
|
|
1106
|
+
query: { page: _optionalChain([options, 'optionalAccess', _33 => _33.page]), limit: _optionalChain([options, 'optionalAccess', _34 => _34.limit]) }
|
|
1075
1107
|
}
|
|
1076
1108
|
);
|
|
1077
1109
|
}
|
|
@@ -1566,7 +1598,7 @@ var ConsentModule = class {
|
|
|
1566
1598
|
}
|
|
1567
1599
|
if (result.error) return { data: null, error: result.error };
|
|
1568
1600
|
return {
|
|
1569
|
-
data: _optionalChain([result, 'access',
|
|
1601
|
+
data: _optionalChain([result, 'access', _35 => _35.data, 'optionalAccess', _36 => _36.consented]) ? result.data.consent : null,
|
|
1570
1602
|
error: null
|
|
1571
1603
|
};
|
|
1572
1604
|
}
|
|
@@ -1653,10 +1685,10 @@ var ShippingModule = class {
|
|
|
1653
1685
|
*/
|
|
1654
1686
|
async listMethods(opts) {
|
|
1655
1687
|
const query = {};
|
|
1656
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1657
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1658
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1659
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1688
|
+
if (_optionalChain([opts, 'optionalAccess', _37 => _37.currency])) query.currency = opts.currency;
|
|
1689
|
+
if (_optionalChain([opts, 'optionalAccess', _38 => _38.country])) query.country = opts.country;
|
|
1690
|
+
if (_optionalChain([opts, 'optionalAccess', _39 => _39.cartTotal]) != null) query.cartTotal = String(opts.cartTotal);
|
|
1691
|
+
if (_optionalChain([opts, 'optionalAccess', _40 => _40.cartWeightKg]) != null)
|
|
1660
1692
|
query.cartWeightKg = String(opts.cartWeightKg);
|
|
1661
1693
|
return this.client.request(
|
|
1662
1694
|
"GET",
|
|
@@ -566,8 +566,7 @@ var CatalogModule = class {
|
|
|
566
566
|
if (query.inStock !== void 0) q.inStock = query.inStock;
|
|
567
567
|
if (query.ratingMin !== void 0) q.ratingMin = query.ratingMin;
|
|
568
568
|
if (query.search) q.search = query.search;
|
|
569
|
-
if (query.
|
|
570
|
-
q.customFields = JSON.stringify(query.customFields);
|
|
569
|
+
if (query.parameters) q.parameters = JSON.stringify(query.parameters);
|
|
571
570
|
if (query.facets) q.facets = JSON.stringify(query.facets);
|
|
572
571
|
if (query.ids && query.ids.length > 0) q.ids = query.ids;
|
|
573
572
|
if (query.slugs && query.slugs.length > 0) q.slugs = query.slugs;
|
|
@@ -659,18 +658,52 @@ var CatalogModule = class {
|
|
|
659
658
|
}
|
|
660
659
|
);
|
|
661
660
|
}
|
|
662
|
-
/**
|
|
663
|
-
|
|
661
|
+
/**
|
|
662
|
+
* Available filters for a dynamic filter UI.
|
|
663
|
+
*
|
|
664
|
+
* Derived from curated PARAMETERS the merchant marked filterable, so a
|
|
665
|
+
* visitor can never filter by something that does not appear in the
|
|
666
|
+
* product's parameters. Labels are per language, hence `locale`.
|
|
667
|
+
*/
|
|
668
|
+
async getFilters(options) {
|
|
669
|
+
return this.client.request(
|
|
670
|
+
"GET",
|
|
671
|
+
"/catalog/filters",
|
|
672
|
+
{ query: { locale: options?.locale } }
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Curated parameter groups of a product, already resolved (label, value,
|
|
677
|
+
* unit, order). Returns an ARRAY of groups so a template can lay them out
|
|
678
|
+
* however it likes: one group as a spec table, another as badges.
|
|
679
|
+
*
|
|
680
|
+
* A variant's own parameters ride along on `ProductDetail.variants[]`, so
|
|
681
|
+
* this call is for the parent product.
|
|
682
|
+
*/
|
|
683
|
+
async getProductParameters(slug, options) {
|
|
684
|
+
return this.client.request(
|
|
685
|
+
"GET",
|
|
686
|
+
`/catalog/products/${slug}/parameters`,
|
|
687
|
+
{ query: { locale: options?.locale } }
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* One specific parameter group of a product, by its slug. 404 when the
|
|
692
|
+
* product does not have that group, which is deliberate: the caller asked
|
|
693
|
+
* for a named thing, so an empty array would hide a wrong slug.
|
|
694
|
+
*/
|
|
695
|
+
async getProductParameterGroup(slug, groupSlug, options) {
|
|
664
696
|
return this.client.request(
|
|
665
697
|
"GET",
|
|
666
|
-
|
|
698
|
+
`/catalog/products/${slug}/parameters/${groupSlug}`,
|
|
699
|
+
{ query: { locale: options?.locale } }
|
|
667
700
|
);
|
|
668
701
|
}
|
|
669
702
|
/**
|
|
670
|
-
* Facet groups + selection-aware counts for the current filter set
|
|
671
|
-
*
|
|
672
|
-
* query you pass to `getProducts` (category, search, price, inStock,
|
|
673
|
-
*
|
|
703
|
+
* Facet groups + selection-aware counts for the current filter set
|
|
704
|
+
* (parameters, labels, price, availability, rating, subcategories). Pass the
|
|
705
|
+
* SAME query you pass to `getProducts` (category, search, price, inStock,
|
|
706
|
+
* ratingMin, parameters, facets slugs, labels): counts are computed with
|
|
674
707
|
* that facet excluded, and values that drop to 0 are still returned (render
|
|
675
708
|
* them disabled). Use this to build an Alza-style filter sidebar.
|
|
676
709
|
*/
|
|
@@ -686,8 +719,7 @@ var CatalogModule = class {
|
|
|
686
719
|
if (query.inStock !== void 0) q.inStock = query.inStock;
|
|
687
720
|
if (query.ratingMin !== void 0) q.ratingMin = query.ratingMin;
|
|
688
721
|
if (query.search) q.search = query.search;
|
|
689
|
-
if (query.
|
|
690
|
-
q.customFields = JSON.stringify(query.customFields);
|
|
722
|
+
if (query.parameters) q.parameters = JSON.stringify(query.parameters);
|
|
691
723
|
if (query.facets) q.facets = JSON.stringify(query.facets);
|
|
692
724
|
if (query.labels && query.labels.length > 0) q.labels = query.labels;
|
|
693
725
|
if (query.categories && query.categories.length > 0)
|
|
@@ -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 };
|