@commerce-blocks/sdk 2.0.0-alpha.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +458 -439
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -502,6 +502,7 @@ interface CollectionResult {
|
|
|
502
502
|
resultsPerPage?: number
|
|
503
503
|
facets: Record<string, Record<string, number>>
|
|
504
504
|
facetRanges?: Record<string, { min: number; max: number }>
|
|
505
|
+
priceRange?: PriceRange // Formatted min/max prices from result set
|
|
505
506
|
attributionToken: string
|
|
506
507
|
collection?: StorefrontCollection
|
|
507
508
|
}
|
|
@@ -514,6 +515,7 @@ interface SearchResult {
|
|
|
514
515
|
resultsPerPage?: number
|
|
515
516
|
facets: Record<string, Record<string, number>>
|
|
516
517
|
facetRanges?: Record<string, { min: number; max: number }>
|
|
518
|
+
priceRange?: PriceRange // Formatted min/max prices from result set
|
|
517
519
|
attributionToken: string
|
|
518
520
|
}
|
|
519
521
|
|
|
@@ -525,10 +527,22 @@ interface BlocksResult {
|
|
|
525
527
|
resultsPerPage?: number
|
|
526
528
|
facets: Record<string, Record<string, number>>
|
|
527
529
|
facetRanges?: Record<string, { min: number; max: number }>
|
|
530
|
+
priceRange?: PriceRange // Formatted min/max prices from result set
|
|
528
531
|
attributionToken: string
|
|
529
532
|
block?: BlocksInfo // { id, title, anchor_type, strategy_type, strategy_key }
|
|
530
533
|
}
|
|
531
534
|
|
|
535
|
+
interface PriceRange {
|
|
536
|
+
min: Price
|
|
537
|
+
max: Price
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
interface Price {
|
|
541
|
+
amount: number
|
|
542
|
+
currencyCode: string
|
|
543
|
+
formatted: string
|
|
544
|
+
}
|
|
545
|
+
|
|
532
546
|
interface StorefrontResult {
|
|
533
547
|
products: Product[]
|
|
534
548
|
collection?: StorefrontCollection
|
package/dist/index.d.ts
CHANGED
|
@@ -52,14 +52,8 @@ declare interface BaseProduct {
|
|
|
52
52
|
description: string;
|
|
53
53
|
availableForSale: boolean;
|
|
54
54
|
images: Image_2[];
|
|
55
|
-
priceRange:
|
|
56
|
-
|
|
57
|
-
max: Price;
|
|
58
|
-
};
|
|
59
|
-
compareAtPriceRange?: {
|
|
60
|
-
min: Price;
|
|
61
|
-
max: Price;
|
|
62
|
-
};
|
|
55
|
+
priceRange: PriceRange;
|
|
56
|
+
compareAtPriceRange?: PriceRange;
|
|
63
57
|
options: RichProductOption[];
|
|
64
58
|
tags: string[];
|
|
65
59
|
variants: ProductVariant[];
|
|
@@ -630,6 +624,11 @@ export declare interface Price {
|
|
|
630
624
|
formatted: string;
|
|
631
625
|
}
|
|
632
626
|
|
|
627
|
+
export declare interface PriceRange {
|
|
628
|
+
min: Price;
|
|
629
|
+
max: Price;
|
|
630
|
+
}
|
|
631
|
+
|
|
633
632
|
declare interface PriceRangeResult {
|
|
634
633
|
minVariantPrice: MoneyResult;
|
|
635
634
|
maxVariantPrice: MoneyResult;
|
|
@@ -777,6 +776,7 @@ declare interface QueryResult<P extends Product = Product> {
|
|
|
777
776
|
min: number;
|
|
778
777
|
max: number;
|
|
779
778
|
}>;
|
|
779
|
+
priceRange?: PriceRange;
|
|
780
780
|
attributionToken?: string;
|
|
781
781
|
_meta?: LayersMeta;
|
|
782
782
|
_workflow?: unknown;
|