@01.software/sdk 0.39.0 → 0.41.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/CHANGELOG.md +492 -0
- package/MIGRATION.md +183 -0
- package/README.md +64 -21
- package/dist/client.cjs +47 -69
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +47 -69
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-DVfB0Em1.d.cts → collection-client-Bymfni8u.d.cts} +3 -3
- package/dist/{collection-client-CaMgs5KE.d.ts → collection-client-CN4lj6gi.d.ts} +3 -3
- package/dist/const-4BUtUdGU.d.cts +32 -0
- package/dist/const-ymprfiPf.d.ts +32 -0
- package/dist/{index-BOLQxveo.d.cts → index-Dquv4xTL.d.cts} +3 -3
- package/dist/{index-CSwR2HSg.d.ts → index-w36lpSkU.d.ts} +3 -3
- package/dist/index.cjs +119 -136
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +119 -136
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-m3jjhxk9.d.cts → payload-types-DC0xzR9i.d.cts} +470 -265
- package/dist/{payload-types-m3jjhxk9.d.ts → payload-types-DC0xzR9i.d.ts} +470 -265
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +40 -69
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.js +40 -69
- package/dist/server.js.map +1 -1
- package/dist/{types-Cmrd1ezc.d.ts → types-Bh2p-EMc.d.ts} +5 -1
- package/dist/{types-CVf8sCZ-.d.ts → types-Bl-m9ttd.d.cts} +129 -77
- package/dist/{types-D0ubzQw0.d.cts → types-BvpjooU-.d.cts} +5 -1
- package/dist/{types-BQo7UdI9.d.cts → types-CHrzs2GB.d.ts} +129 -77
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.d.cts +4 -4
- package/dist/webhook.d.ts +4 -4
- package/package.json +6 -4
- package/dist/const-6XHz_jej.d.ts +0 -32
- package/dist/const-B5KT72c7.d.cts +0 -32
package/dist/server.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
2
|
-
export { C as CollectionClient } from './collection-client-
|
|
3
|
-
import { N as BaseApi, O as ServerApiOptions, Q as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, V as BanCustomerParams, X as CommunityBan, Y as UnbanCustomerParams, d as ClientState, Z as ClientServerConfig, E as EventsClient, _ as RootServerClientWithEvents } from './types-
|
|
4
|
-
export { A as AddItemParams, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, $ as CollectionFieldSchema, a0 as CollectionSchemaResponse, a1 as EventGuestCancelParams, a2 as EventGuestRegistration, a3 as EventGuestRegistrationResponse, a4 as EventRegistrationAnswerInput, a5 as EventRegistrationAttendeeInput, a6 as EventRegistrationPublic, a7 as EventRegistrationRegisterParams, a8 as EventRegistrationRegisterResponse, a9 as EventsCalendarItem, aa as EventsClientOptions, ab as EventsDateParam, ac as EventsExternalSource, ad as EventsLocation, ae as EventsOccurrenceLocation, af as EventsRangeEvent, ag as EventsRangeOccurrence, ah as EventsRangeParams, ai as EventsRangeResponse, aj as EventsTaxonomyItem, ak as ModerationApi, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, al as RootServerClient, am as TenantFeatureProgressEvidenceValue, an as TenantFeatureProgressFeature, ao as TenantFeatureProgressGroup, ap as TenantFeatureProgressInput, aq as TenantFeatureProgressItem, ar as TenantFeatureProgressItemState, as as TenantFeatureProgressResponse, at as TenantFeatureProgressSeverity, au as TenantFeatureProgressStatus, av as TenantIntrospectionApi, aw as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-Bymfni8u.cjs';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-Bymfni8u.cjs';
|
|
3
|
+
import { N as BaseApi, O as ServerApiOptions, Q as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, V as BanCustomerParams, X as CommunityBan, Y as UnbanCustomerParams, d as ClientState, Z as ClientServerConfig, E as EventsClient, _ as RootServerClientWithEvents } from './types-Bl-m9ttd.cjs';
|
|
4
|
+
export { A as AddItemParams, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, $ as CollectionFieldSchema, a0 as CollectionSchemaResponse, a1 as EventGuestCancelParams, a2 as EventGuestRegistration, a3 as EventGuestRegistrationResponse, a4 as EventRegistrationAnswerInput, a5 as EventRegistrationAttendeeInput, a6 as EventRegistrationPublic, a7 as EventRegistrationRegisterParams, a8 as EventRegistrationRegisterResponse, a9 as EventsCalendarItem, aa as EventsClientOptions, ab as EventsDateParam, ac as EventsExternalSource, ad as EventsLocation, ae as EventsOccurrenceLocation, af as EventsRangeEvent, ag as EventsRangeOccurrence, ah as EventsRangeParams, ai as EventsRangeResponse, aj as EventsTaxonomyItem, ak as ModerationApi, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, al as RootServerClient, am as TenantFeatureProgressEvidenceValue, an as TenantFeatureProgressFeature, ao as TenantFeatureProgressGroup, ap as TenantFeatureProgressInput, aq as TenantFeatureProgressItem, ar as TenantFeatureProgressItemState, as as TenantFeatureProgressResponse, at as TenantFeatureProgressSeverity, au as TenantFeatureProgressStatus, av as TenantIntrospectionApi, aw as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-Bl-m9ttd.cjs';
|
|
5
|
+
import './payload-types-DC0xzR9i.cjs';
|
|
6
6
|
import './metadata.cjs';
|
|
7
|
-
import './const-
|
|
8
|
-
import './types-
|
|
7
|
+
import './const-4BUtUdGU.cjs';
|
|
8
|
+
import './types-BvpjooU-.cjs';
|
|
9
9
|
|
|
10
10
|
type PreviewDetailParams = {
|
|
11
11
|
collection: string;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
2
|
-
export { C as CollectionClient } from './collection-client-
|
|
3
|
-
import { N as BaseApi, O as ServerApiOptions, Q as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, V as BanCustomerParams, X as CommunityBan, Y as UnbanCustomerParams, d as ClientState, Z as ClientServerConfig, E as EventsClient, _ as RootServerClientWithEvents } from './types-
|
|
4
|
-
export { A as AddItemParams, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, $ as CollectionFieldSchema, a0 as CollectionSchemaResponse, a1 as EventGuestCancelParams, a2 as EventGuestRegistration, a3 as EventGuestRegistrationResponse, a4 as EventRegistrationAnswerInput, a5 as EventRegistrationAttendeeInput, a6 as EventRegistrationPublic, a7 as EventRegistrationRegisterParams, a8 as EventRegistrationRegisterResponse, a9 as EventsCalendarItem, aa as EventsClientOptions, ab as EventsDateParam, ac as EventsExternalSource, ad as EventsLocation, ae as EventsOccurrenceLocation, af as EventsRangeEvent, ag as EventsRangeOccurrence, ah as EventsRangeParams, ai as EventsRangeResponse, aj as EventsTaxonomyItem, ak as ModerationApi, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, al as RootServerClient, am as TenantFeatureProgressEvidenceValue, an as TenantFeatureProgressFeature, ao as TenantFeatureProgressGroup, ap as TenantFeatureProgressInput, aq as TenantFeatureProgressItem, ar as TenantFeatureProgressItemState, as as TenantFeatureProgressResponse, at as TenantFeatureProgressSeverity, au as TenantFeatureProgressStatus, av as TenantIntrospectionApi, aw as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-CN4lj6gi.js';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-CN4lj6gi.js';
|
|
3
|
+
import { N as BaseApi, O as ServerApiOptions, Q as ServerCommerceClient, T as TenantIntrospectionClient, a as CommunityClient, V as BanCustomerParams, X as CommunityBan, Y as UnbanCustomerParams, d as ClientState, Z as ClientServerConfig, E as EventsClient, _ as RootServerClientWithEvents } from './types-CHrzs2GB.js';
|
|
4
|
+
export { A as AddItemParams, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, $ as CollectionFieldSchema, a0 as CollectionSchemaResponse, a1 as EventGuestCancelParams, a2 as EventGuestRegistration, a3 as EventGuestRegistrationResponse, a4 as EventRegistrationAnswerInput, a5 as EventRegistrationAttendeeInput, a6 as EventRegistrationPublic, a7 as EventRegistrationRegisterParams, a8 as EventRegistrationRegisterResponse, a9 as EventsCalendarItem, aa as EventsClientOptions, ab as EventsDateParam, ac as EventsExternalSource, ad as EventsLocation, ae as EventsOccurrenceLocation, af as EventsRangeEvent, ag as EventsRangeOccurrence, ah as EventsRangeParams, ai as EventsRangeResponse, aj as EventsTaxonomyItem, ak as ModerationApi, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, al as RootServerClient, am as TenantFeatureProgressEvidenceValue, an as TenantFeatureProgressFeature, ao as TenantFeatureProgressGroup, ap as TenantFeatureProgressInput, aq as TenantFeatureProgressItem, ar as TenantFeatureProgressItemState, as as TenantFeatureProgressResponse, at as TenantFeatureProgressSeverity, au as TenantFeatureProgressStatus, av as TenantIntrospectionApi, aw as TenantIntrospectionApiOptions, U as UpdateItemParams } from './types-CHrzs2GB.js';
|
|
5
|
+
import './payload-types-DC0xzR9i.js';
|
|
6
6
|
import './metadata.js';
|
|
7
|
-
import './const-
|
|
8
|
-
import './types-
|
|
7
|
+
import './const-ymprfiPf.js';
|
|
8
|
+
import './types-Bh2p-EMc.js';
|
|
9
9
|
|
|
10
10
|
type PreviewDetailParams = {
|
|
11
11
|
collection: string;
|
package/dist/server.js
CHANGED
|
@@ -1636,9 +1636,6 @@ function getMediaId(value) {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
return null;
|
|
1638
1638
|
}
|
|
1639
|
-
function toPointerId(value) {
|
|
1640
|
-
return getMediaId(value);
|
|
1641
|
-
}
|
|
1642
1639
|
function mediaArray(value) {
|
|
1643
1640
|
if (!Array.isArray(value)) return [];
|
|
1644
1641
|
return value.filter((entry) => entry != null);
|
|
@@ -1755,22 +1752,16 @@ function resolveProductSelectionMedia(input) {
|
|
|
1755
1752
|
source: "none"
|
|
1756
1753
|
};
|
|
1757
1754
|
}
|
|
1758
|
-
function
|
|
1755
|
+
function resolveFeaturedImagePointer(input) {
|
|
1759
1756
|
const pool = mediaArray(input.productMediaPool);
|
|
1760
1757
|
const resolvedPointer = getMediaId(input.resolvedPrimary);
|
|
1761
1758
|
if (resolvedPointer && input.resolvedSource !== "product_pool" && input.resolvedSource !== "none") {
|
|
1762
1759
|
return resolvedPointer;
|
|
1763
1760
|
}
|
|
1764
1761
|
const poolById = buildPoolById(pool);
|
|
1765
|
-
const
|
|
1766
|
-
if (
|
|
1767
|
-
return
|
|
1768
|
-
}
|
|
1769
|
-
const primaryPointer = toPointerId(input.productPrimaryMediaItemId);
|
|
1770
|
-
if (primaryPointer && poolById.has(primaryPointer)) return primaryPointer;
|
|
1771
|
-
const thumbnailPointer = getMediaId(input.productThumbnail);
|
|
1772
|
-
if (thumbnailPointer && poolById.has(thumbnailPointer)) {
|
|
1773
|
-
return thumbnailPointer;
|
|
1762
|
+
const featuredImagePointer = getMediaId(input.featuredImage);
|
|
1763
|
+
if (featuredImagePointer && poolById.has(featuredImagePointer)) {
|
|
1764
|
+
return featuredImagePointer;
|
|
1774
1765
|
}
|
|
1775
1766
|
if (pool.length > 0) {
|
|
1776
1767
|
const firstPoolId = getMediaId(pool[0]);
|
|
@@ -1825,13 +1816,9 @@ function extractEntityId(value) {
|
|
|
1825
1816
|
return null;
|
|
1826
1817
|
}
|
|
1827
1818
|
function resolveGenericListingPrimaryImage(product, resolvedPrimary, resolvedSource) {
|
|
1828
|
-
return
|
|
1819
|
+
return resolveFeaturedImagePointer({
|
|
1829
1820
|
productMediaPool: product?.images ?? [],
|
|
1830
|
-
|
|
1831
|
-
product?.primaryMediaItemId ?? null
|
|
1832
|
-
),
|
|
1833
|
-
productThumbnail: product?.thumbnail ?? null,
|
|
1834
|
-
listingPrimaryImage: product?.listing?.primaryImage ?? null,
|
|
1821
|
+
featuredImage: product?.featuredImage ?? null,
|
|
1835
1822
|
resolvedPrimary,
|
|
1836
1823
|
resolvedSource
|
|
1837
1824
|
});
|
|
@@ -2433,11 +2420,14 @@ function compareVariantOrder(a, b) {
|
|
|
2433
2420
|
const bId = String(getRelationID(b.id) ?? "");
|
|
2434
2421
|
return aId.localeCompare(bId);
|
|
2435
2422
|
}
|
|
2436
|
-
function
|
|
2423
|
+
function getVariantAvailableForSale(variant) {
|
|
2437
2424
|
if (variant.isActive === false) return false;
|
|
2438
2425
|
if (variant.isUnlimited) return true;
|
|
2439
2426
|
return (variant.stock ?? 0) - (variant.reservedStock ?? 0) > 0;
|
|
2440
2427
|
}
|
|
2428
|
+
function isVariantAvailableForSale(variant) {
|
|
2429
|
+
return getVariantAvailableForSale(variant);
|
|
2430
|
+
}
|
|
2441
2431
|
function sortVariantsForMediaSelection(variants) {
|
|
2442
2432
|
const orderedVariants = [...variants].sort(compareVariantOrder);
|
|
2443
2433
|
const activeVariants = orderedVariants.filter(
|
|
@@ -2470,7 +2460,7 @@ function getMinMax(values) {
|
|
|
2470
2460
|
max: Math.max(...numbers)
|
|
2471
2461
|
};
|
|
2472
2462
|
}
|
|
2473
|
-
function
|
|
2463
|
+
function buildProductListingGroupProjection(product, variants) {
|
|
2474
2464
|
const orderedVariants = [...variants].sort(compareVariantOrder);
|
|
2475
2465
|
const activeVariants = orderedVariants.filter(
|
|
2476
2466
|
(variant) => variant.isActive !== false
|
|
@@ -2491,7 +2481,6 @@ function buildProductListingProjection(product, variants) {
|
|
|
2491
2481
|
const mediaSelectionVariants = sortVariantsForMediaSelection(variants);
|
|
2492
2482
|
const resolvedProductMedia = resolveProductSelectionMedia({
|
|
2493
2483
|
productMediaPool,
|
|
2494
|
-
productPrimaryMediaItemId: getRelationID(product?.primaryMediaItemId),
|
|
2495
2484
|
selectedVariant: selectionHintVariant && selectionHintHasPoolMedia ? {
|
|
2496
2485
|
id: selectionHintVariant.id,
|
|
2497
2486
|
images: selectionHintVariant.images
|
|
@@ -2517,47 +2506,22 @@ function buildProductListingCard(item, options = {}) {
|
|
|
2517
2506
|
const product = item.product;
|
|
2518
2507
|
const groups = item.groups;
|
|
2519
2508
|
const variants = getProductListingCardVariants(item);
|
|
2520
|
-
const projectedListing =
|
|
2521
|
-
const selectionHintVariant = getRelationID(
|
|
2522
|
-
product.listing && "selectionHintVariant" in product.listing ? product.listing.selectionHintVariant : null
|
|
2523
|
-
) ?? projectedListing.selectionHintVariant;
|
|
2509
|
+
const projectedListing = buildProductListingGroupProjection(product, variants);
|
|
2510
|
+
const selectionHintVariant = getRelationID(product.selectedOrFirstAvailableVariant) ?? projectedListing.selectionHintVariant;
|
|
2524
2511
|
const representativeVariant = findListingCardRepresentativeVariant(
|
|
2525
2512
|
variants,
|
|
2526
2513
|
selectionHintVariant
|
|
2527
2514
|
);
|
|
2528
2515
|
const productMediaPool = mediaArray2(product.images);
|
|
2529
|
-
const
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
(poolItem) => getRelationID(poolItem) === getRelationID(image)
|
|
2533
|
-
)
|
|
2534
|
-
)
|
|
2535
|
-
);
|
|
2536
|
-
const resolvedPrimaryMedia = resolveProductSelectionMedia(
|
|
2537
|
-
{
|
|
2538
|
-
productMediaPool,
|
|
2539
|
-
productPrimaryMediaItemId: getRelationID(product.primaryMediaItemId),
|
|
2540
|
-
selectedVariant: representativeHasPoolMedia ? representativeVariant : null,
|
|
2541
|
-
matchingVariants: representativeHasPoolMedia ? [] : variants
|
|
2542
|
-
}
|
|
2543
|
-
);
|
|
2544
|
-
const listingPrimaryPointer = resolveListingPrimaryImagePointer({
|
|
2545
|
-
productMediaPool,
|
|
2546
|
-
productPrimaryMediaItemId: getRelationID(product.primaryMediaItemId),
|
|
2547
|
-
productThumbnail: product.thumbnail ?? null,
|
|
2548
|
-
listingPrimaryImage: product.listing?.primaryImage ?? null,
|
|
2549
|
-
resolvedPrimary: resolvedPrimaryMedia.primaryImage,
|
|
2550
|
-
resolvedSource: resolvedPrimaryMedia.source
|
|
2551
|
-
});
|
|
2552
|
-
const listingPrimaryMedia = listingPrimaryPointer ? productMediaPool.find(
|
|
2553
|
-
(item2) => getRelationID(item2) === listingPrimaryPointer
|
|
2554
|
-
) ?? resolvedPrimaryMedia.primaryImage ?? null : null;
|
|
2516
|
+
const featuredImageId = getRelationID(product.featuredImage);
|
|
2517
|
+
const featuredImageFromPool = featuredImageId ? productMediaPool.find((item2) => getRelationID(item2) === featuredImageId) : void 0;
|
|
2518
|
+
const listingPrimaryMedia = featuredImageFromPool ?? product.featuredImage ?? productMediaPool[0] ?? null;
|
|
2555
2519
|
const priceRange = resolveListingCardPriceRange(
|
|
2556
2520
|
product,
|
|
2557
2521
|
projectedListing,
|
|
2558
2522
|
groups
|
|
2559
2523
|
);
|
|
2560
|
-
const availableForSale = product.
|
|
2524
|
+
const availableForSale = product.availableForSale != null ? product.availableForSale : groups.length > 0 ? groups.some((group) => group.listing.availableForSale) : projectedListing.availableForSale;
|
|
2561
2525
|
const swatches = groups.length > 1 ? groups.map((group) => buildListingSwatch(product, group, options)) : [];
|
|
2562
2526
|
return {
|
|
2563
2527
|
id: String(product.id),
|
|
@@ -2597,23 +2561,20 @@ function findListingCardRepresentativeVariant(variants, representativeVariantId)
|
|
|
2597
2561
|
(variant) => getRelationID(variant.id) === representativeVariantId
|
|
2598
2562
|
) ?? null;
|
|
2599
2563
|
}
|
|
2600
|
-
function
|
|
2601
|
-
return
|
|
2602
|
-
}
|
|
2603
|
-
function listingDefinesCompareAtProjection(listing) {
|
|
2604
|
-
return "minCompareAtPrice" in listing || "maxCompareAtPrice" in listing;
|
|
2564
|
+
function hasCompleteProductPriceRange(priceRange) {
|
|
2565
|
+
return priceRange?.minVariantPrice?.amount != null && priceRange?.maxVariantPrice?.amount != null;
|
|
2605
2566
|
}
|
|
2606
2567
|
function resolveListingCardPriceRange(product, projectedListing, groups) {
|
|
2607
|
-
|
|
2608
|
-
if (hasCompleteListingPriceProjection(listing)) {
|
|
2568
|
+
if (hasCompleteProductPriceRange(product.priceRange)) {
|
|
2609
2569
|
const groupRange = groups.length > 0 ? aggregateListingPriceRange(groups) : null;
|
|
2610
|
-
const
|
|
2570
|
+
const minCompareAtPrice = product.compareAtPriceRange?.minVariantPrice?.amount ?? groupRange?.minCompareAtPrice ?? null;
|
|
2571
|
+
const maxCompareAtPrice = product.compareAtPriceRange?.maxVariantPrice?.amount ?? groupRange?.maxCompareAtPrice ?? null;
|
|
2611
2572
|
return {
|
|
2612
|
-
minPrice:
|
|
2613
|
-
maxPrice:
|
|
2614
|
-
minCompareAtPrice
|
|
2615
|
-
maxCompareAtPrice
|
|
2616
|
-
isPriceRange:
|
|
2573
|
+
minPrice: product.priceRange.minVariantPrice.amount,
|
|
2574
|
+
maxPrice: product.priceRange.maxVariantPrice.amount,
|
|
2575
|
+
minCompareAtPrice,
|
|
2576
|
+
maxCompareAtPrice,
|
|
2577
|
+
isPriceRange: product.priceRange.isPriceRange ?? product.priceRange.minVariantPrice.amount !== product.priceRange.maxVariantPrice.amount
|
|
2617
2578
|
};
|
|
2618
2579
|
}
|
|
2619
2580
|
if (groups.length > 0) {
|
|
@@ -2725,15 +2686,19 @@ function buildProductListingPageWhere(params) {
|
|
|
2725
2686
|
if (tagIds) clauses.push({ tags: { in: tagIds } });
|
|
2726
2687
|
const minPrice = filters?.price?.min;
|
|
2727
2688
|
if (minPrice != null) {
|
|
2728
|
-
clauses.push({
|
|
2689
|
+
clauses.push({
|
|
2690
|
+
"priceRange.maxVariantPrice.amount": { greater_than_equal: minPrice }
|
|
2691
|
+
});
|
|
2729
2692
|
}
|
|
2730
2693
|
const maxPrice = filters?.price?.max;
|
|
2731
2694
|
if (maxPrice != null) {
|
|
2732
|
-
clauses.push({
|
|
2695
|
+
clauses.push({
|
|
2696
|
+
"priceRange.minVariantPrice.amount": { less_than_equal: maxPrice }
|
|
2697
|
+
});
|
|
2733
2698
|
}
|
|
2734
2699
|
if (filters?.availableForSale != null) {
|
|
2735
2700
|
clauses.push({
|
|
2736
|
-
|
|
2701
|
+
availableForSale: { equals: filters.availableForSale }
|
|
2737
2702
|
});
|
|
2738
2703
|
}
|
|
2739
2704
|
if (clauses.length === 0) return void 0;
|
|
@@ -2970,6 +2935,12 @@ var OrderApi = class extends BaseApi {
|
|
|
2970
2935
|
idempotencyRequestOptions(params.idempotencyKey)
|
|
2971
2936
|
);
|
|
2972
2937
|
}
|
|
2938
|
+
/**
|
|
2939
|
+
* Returns a `PublicOrder`-compatible shape even when the server backs the
|
|
2940
|
+
* response with a Checkout (checkout/order separation, #1285). `orderNumber`
|
|
2941
|
+
* stays the stable cross-window key. A breaking `PublicCheckout` split is a
|
|
2942
|
+
* deferred follow-up (design D10 / Q3-b); do not change this return type here.
|
|
2943
|
+
*/
|
|
2973
2944
|
checkout(params) {
|
|
2974
2945
|
const { body, idempotencyKey } = splitIdempotencyKey(params);
|
|
2975
2946
|
return this.request(
|