@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Product, C as CustomerProfile, a as
|
|
1
|
+
import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-DC0xzR9i.js';
|
|
2
2
|
|
|
3
3
|
type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
|
|
4
4
|
type PublicCustomerProfileListEntry = {
|
|
@@ -16,10 +16,14 @@ type PublicCustomerProfileListEntry = {
|
|
|
16
16
|
type PublicCustomerProfileList = Omit<CustomerProfileList, 'tenant' | 'visibility' | 'metadata' | 'entries'> & {
|
|
17
17
|
entries?: PublicCustomerProfileListEntry[] | null;
|
|
18
18
|
};
|
|
19
|
+
type PublicCustomerProfileStats = Omit<CustomerProfileStat, 'tenant' | 'profile'> & {
|
|
20
|
+
profile: string | PublicCustomerProfile;
|
|
21
|
+
};
|
|
19
22
|
type PublicProduct = Omit<Product, 'collectionItems'>;
|
|
20
23
|
type PublicProductCollection = Omit<ProductCollection, 'items'>;
|
|
21
24
|
type PublicCollectionOverrides = {
|
|
22
25
|
'customer-profiles': PublicCustomerProfile;
|
|
26
|
+
'customer-profile-stats': PublicCustomerProfileStats;
|
|
23
27
|
'customer-profile-lists': PublicCustomerProfileList;
|
|
24
28
|
products: PublicProduct;
|
|
25
29
|
'product-collections': PublicProductCollection;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PublicCollection, S as ServerCollection } from './const-
|
|
2
|
-
import { C as CollectionType, P as PublicProduct } from './types-
|
|
3
|
-
import { O as Order,
|
|
1
|
+
import { P as PublicCollection, S as ServerCollection } from './const-4BUtUdGU.cjs';
|
|
2
|
+
import { C as CollectionType, P as PublicProduct } from './types-BvpjooU-.cjs';
|
|
3
|
+
import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-DC0xzR9i.cjs';
|
|
4
4
|
|
|
5
5
|
interface CustomerScopedApiOptions {
|
|
6
6
|
publishableKey?: string;
|
|
@@ -424,6 +424,7 @@ type PublicOrderItem = {
|
|
|
424
424
|
quantity?: number | null;
|
|
425
425
|
unitPrice?: number | null;
|
|
426
426
|
discountedUnitPrice?: number | null;
|
|
427
|
+
discountedTotalPrice?: number | null;
|
|
427
428
|
totalPrice?: number | null;
|
|
428
429
|
options?: unknown;
|
|
429
430
|
createdAt?: string | null;
|
|
@@ -433,11 +434,14 @@ type PublicOrderItem = {
|
|
|
433
434
|
type PublicOrder = {
|
|
434
435
|
id?: string | number;
|
|
435
436
|
orderNumber?: string | null;
|
|
437
|
+
/** @deprecated Read-only compatibility alias. Prefer the independent axes. */
|
|
436
438
|
status?: string | null;
|
|
439
|
+
/** @deprecated Read-only compatibility alias. Prefer the independent axes. */
|
|
437
440
|
displayStatus?: string | null;
|
|
438
441
|
primaryDisplayStatus?: string | null;
|
|
439
442
|
displayFinancialStatus?: string | null;
|
|
440
443
|
displayFulfillmentStatus?: string | null;
|
|
444
|
+
returnStatus?: string | null;
|
|
441
445
|
returnDisplayStatus?: string | null;
|
|
442
446
|
totalAmount?: number | null;
|
|
443
447
|
subtotalAmount?: number | null;
|
|
@@ -533,7 +537,7 @@ type UpdateOrderParams = {
|
|
|
533
537
|
orderNumber: string;
|
|
534
538
|
status: 'confirmed';
|
|
535
539
|
};
|
|
536
|
-
type TransactionStatus = 'pending' | 'paid' | 'failed' | 'canceled';
|
|
540
|
+
type TransactionStatus = 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded';
|
|
537
541
|
type UpdateTransactionParams = {
|
|
538
542
|
pgPaymentId: string;
|
|
539
543
|
status: TransactionStatus;
|
|
@@ -756,6 +760,12 @@ declare class OrderApi extends BaseApi {
|
|
|
756
760
|
confirmPayment(params: ConfirmPaymentParams): Promise<ConfirmPaymentResponse>;
|
|
757
761
|
cancelOrder(params: CancelOrderParams): Promise<CancelOrderResponse>;
|
|
758
762
|
resolveCancelRefund(params: ResolveCancelRefundParams): Promise<ResolveCancelRefundResponse>;
|
|
763
|
+
/**
|
|
764
|
+
* Returns a `PublicOrder`-compatible shape even when the server backs the
|
|
765
|
+
* response with a Checkout (checkout/order separation, #1285). `orderNumber`
|
|
766
|
+
* stays the stable cross-window key. A breaking `PublicCheckout` split is a
|
|
767
|
+
* deferred follow-up (design D10 / Q3-b); do not change this return type here.
|
|
768
|
+
*/
|
|
759
769
|
checkout(params: CheckoutParams): Promise<PublicOrder>;
|
|
760
770
|
createFulfillment(params: CreateFulfillmentParams): Promise<Fulfillment>;
|
|
761
771
|
prepareFulfillmentOrder(params: PrepareFulfillmentOrderParams): Promise<PrepareFulfillmentOrderResponse>;
|
|
@@ -831,6 +841,17 @@ interface CustomerAuthOptions {
|
|
|
831
841
|
onTokenChange?: (token: string | null) => void;
|
|
832
842
|
}
|
|
833
843
|
|
|
844
|
+
type CustomerOrderListOptions = {
|
|
845
|
+
page?: number;
|
|
846
|
+
limit?: number;
|
|
847
|
+
displayFinancialStatus?: string;
|
|
848
|
+
displayFulfillmentStatus?: string;
|
|
849
|
+
returnStatus?: string;
|
|
850
|
+
primaryDisplayStatus?: string;
|
|
851
|
+
returnDisplayStatus?: string;
|
|
852
|
+
/** @deprecated Read-only compatibility alias filter. Prefer independent status axes. */
|
|
853
|
+
status?: string;
|
|
854
|
+
};
|
|
834
855
|
/**
|
|
835
856
|
* Customer authentication client.
|
|
836
857
|
*
|
|
@@ -884,11 +905,7 @@ declare class CustomerAuth {
|
|
|
884
905
|
/**
|
|
885
906
|
* Get the authenticated customer's orders with pagination and optional status filter
|
|
886
907
|
*/
|
|
887
|
-
getMyOrders(options?:
|
|
888
|
-
page?: number;
|
|
889
|
-
limit?: number;
|
|
890
|
-
status?: string;
|
|
891
|
-
}): Promise<PayloadFindResponse<PublicOrder>>;
|
|
908
|
+
getMyOrders(options?: CustomerOrderListOptions): Promise<PayloadFindResponse<PublicOrder>>;
|
|
892
909
|
/**
|
|
893
910
|
* Get the current token (or null if not authenticated)
|
|
894
911
|
*/
|
|
@@ -1021,7 +1038,7 @@ type NormalizedOptionSwatch<TMedia = unknown> = {
|
|
|
1021
1038
|
};
|
|
1022
1039
|
declare function selectedSwatchMediaItemId(swatch: NormalizedOptionSwatch | null | undefined): string | null;
|
|
1023
1040
|
type ProductSelectionMediaSource = 'variant_media_selected' | 'variant_media_matching' | 'option_swatch' | 'none';
|
|
1024
|
-
type ProductDisplayMediaSource = '
|
|
1041
|
+
type ProductDisplayMediaSource = 'featured_image' | 'product_pool' | 'none';
|
|
1025
1042
|
/** @deprecated Use {@link ProductSelectionMediaSource} or {@link ProductDisplayMediaSource}. */
|
|
1026
1043
|
type ProductMediaResolutionSource = ProductSelectionMediaSource | ProductDisplayMediaSource;
|
|
1027
1044
|
type ProductSelectionVariant<TMedia> = {
|
|
@@ -1037,7 +1054,6 @@ type ProductSelectionMediaPointer = string | number | {
|
|
|
1037
1054
|
} | null;
|
|
1038
1055
|
type ResolveProductSelectionMediaInput<TMedia> = {
|
|
1039
1056
|
productMediaPool?: TMedia[] | null;
|
|
1040
|
-
productPrimaryMediaItemId?: ProductSelectionMediaPointer;
|
|
1041
1057
|
selectedVariant?: ProductSelectionVariant<TMedia> | null;
|
|
1042
1058
|
matchingVariants?: Array<ProductSelectionVariant<TMedia> | null | undefined> | null;
|
|
1043
1059
|
selectedOptionValues?: Array<ProductSelectionOptionValue | null | undefined> | null;
|
|
@@ -1049,8 +1065,7 @@ type ResolveProductSelectionMediaResult<TMedia> = {
|
|
|
1049
1065
|
};
|
|
1050
1066
|
type ResolveProductDisplayMediaInput<TMedia> = {
|
|
1051
1067
|
productMediaPool?: TMedia[] | null;
|
|
1052
|
-
|
|
1053
|
-
listingPrimaryImage?: ProductSelectionMediaPointer;
|
|
1068
|
+
featuredImage?: ProductSelectionMediaPointer;
|
|
1054
1069
|
};
|
|
1055
1070
|
type ResolveProductDisplayMediaResult<TMedia> = {
|
|
1056
1071
|
primaryImage: TMedia | null;
|
|
@@ -1059,15 +1074,13 @@ type ResolveProductDisplayMediaResult<TMedia> = {
|
|
|
1059
1074
|
};
|
|
1060
1075
|
declare function resolveProductSelectionMedia<TMedia>(input: ResolveProductSelectionMediaInput<TMedia>): ResolveProductSelectionMediaResult<TMedia>;
|
|
1061
1076
|
declare function resolveProductDisplayMedia<TMedia>(input: ResolveProductDisplayMediaInput<TMedia>): ResolveProductDisplayMediaResult<TMedia>;
|
|
1062
|
-
type
|
|
1077
|
+
type FeaturedImagePointerInput<TMedia> = {
|
|
1063
1078
|
productMediaPool?: TMedia[] | null;
|
|
1064
|
-
|
|
1065
|
-
productThumbnail?: TMedia | string | number | null;
|
|
1066
|
-
listingPrimaryImage?: TMedia | string | number | null;
|
|
1079
|
+
featuredImage?: TMedia | string | number | null;
|
|
1067
1080
|
resolvedPrimary?: TMedia | null;
|
|
1068
1081
|
resolvedSource?: ProductMediaResolutionSource;
|
|
1069
1082
|
};
|
|
1070
|
-
declare function
|
|
1083
|
+
declare function resolveFeaturedImagePointer<TMedia>(input: FeaturedImagePointerInput<TMedia>): string | null;
|
|
1071
1084
|
|
|
1072
1085
|
type EntityID = string;
|
|
1073
1086
|
type RelationshipValue = string | number | null | undefined | {
|
|
@@ -1115,12 +1128,27 @@ interface ProductVariantShape {
|
|
|
1115
1128
|
}
|
|
1116
1129
|
interface ProductListingProductShape {
|
|
1117
1130
|
id?: EntityID;
|
|
1118
|
-
thumbnail?: MediaValue;
|
|
1119
|
-
primaryMediaItemId?: MediaValue;
|
|
1120
1131
|
images?: MediaValue[] | null;
|
|
1121
|
-
|
|
1122
|
-
|
|
1132
|
+
featuredImage?: MediaValue;
|
|
1133
|
+
priceRange?: {
|
|
1134
|
+
minVariantPrice?: {
|
|
1135
|
+
amount?: number | null;
|
|
1136
|
+
} | null;
|
|
1137
|
+
maxVariantPrice?: {
|
|
1138
|
+
amount?: number | null;
|
|
1139
|
+
} | null;
|
|
1140
|
+
isPriceRange?: boolean | null;
|
|
1141
|
+
} | null;
|
|
1142
|
+
compareAtPriceRange?: {
|
|
1143
|
+
minVariantPrice?: {
|
|
1144
|
+
amount?: number | null;
|
|
1145
|
+
} | null;
|
|
1146
|
+
maxVariantPrice?: {
|
|
1147
|
+
amount?: number | null;
|
|
1148
|
+
} | null;
|
|
1123
1149
|
} | null;
|
|
1150
|
+
availableForSale?: boolean | null;
|
|
1151
|
+
selectedOrFirstAvailableVariant?: RelationshipValue | ProductVariantShape;
|
|
1124
1152
|
}
|
|
1125
1153
|
type ProductOptionMatrixValue = {
|
|
1126
1154
|
id: string;
|
|
@@ -1156,7 +1184,7 @@ type ProductOptionMatrix<TVariant extends ProductVariantShape = ProductVariantSh
|
|
|
1156
1184
|
valueToOptionSlug: Map<string, string>;
|
|
1157
1185
|
variants: ProductOptionMatrixVariant<TVariant>[];
|
|
1158
1186
|
};
|
|
1159
|
-
type
|
|
1187
|
+
type ProductListingGroupProjection = {
|
|
1160
1188
|
selectionHintVariant: EntityID | null;
|
|
1161
1189
|
primaryImage: EntityID | null;
|
|
1162
1190
|
minPrice: number | null;
|
|
@@ -1177,7 +1205,7 @@ type ProductListingGroup<TVariant extends ProductVariantShape = ProductVariantSh
|
|
|
1177
1205
|
variantIds: EntityID[];
|
|
1178
1206
|
variantCount: number;
|
|
1179
1207
|
variants: TVariant[];
|
|
1180
|
-
listing:
|
|
1208
|
+
listing: ProductListingGroupProjection;
|
|
1181
1209
|
};
|
|
1182
1210
|
type ProductListingCardPriceRange = {
|
|
1183
1211
|
minPrice: number | null;
|
|
@@ -1242,10 +1270,10 @@ type ProductSelectionCodecOptions = {
|
|
|
1242
1270
|
onLegacyOptionIdParam?: (event: LegacyProductSelectionParamEvent) => void;
|
|
1243
1271
|
};
|
|
1244
1272
|
type ProductSelectionResolutionContext = {
|
|
1245
|
-
detail?: Pick<ProductDetail, '
|
|
1273
|
+
detail?: Pick<ProductDetail, 'featuredImage' | 'images' | 'selectedOrFirstAvailableVariant'>;
|
|
1274
|
+
featuredImage?: ProductDetail['featuredImage'];
|
|
1246
1275
|
images?: ProductDetail['images'];
|
|
1247
|
-
|
|
1248
|
-
primaryMediaItemId?: ProductDetail['primaryMediaItemId'];
|
|
1276
|
+
selectedOrFirstAvailableVariant?: ProductDetail['selectedOrFirstAvailableVariant'];
|
|
1249
1277
|
};
|
|
1250
1278
|
type ProductSelectionAvailableSwatch = {
|
|
1251
1279
|
color?: string | null;
|
|
@@ -1353,7 +1381,23 @@ type ProductListingCardOptions = {
|
|
|
1353
1381
|
preferCompleteVariantFromHint?: boolean;
|
|
1354
1382
|
};
|
|
1355
1383
|
declare function buildProductHref(product: ProductHrefProduct, group?: ProductHrefGroup | null, options?: ProductHrefOptions): string;
|
|
1356
|
-
|
|
1384
|
+
/**
|
|
1385
|
+
* Server-equivalent sellability for a single variant: active, and either
|
|
1386
|
+
* unlimited or with positive sellable stock (`stock - reservedStock`). This is
|
|
1387
|
+
* the same rule the SDK applies when rolling availability up to the product, so
|
|
1388
|
+
* storefronts can compute a Shopify-style `availableForSale` without
|
|
1389
|
+
* re-implementing the check or shipping raw `stock`/`reservedStock` to the
|
|
1390
|
+
* browser.
|
|
1391
|
+
*/
|
|
1392
|
+
declare function getVariantAvailableForSale(variant: ProductVariantShape): boolean;
|
|
1393
|
+
/**
|
|
1394
|
+
* Sellable quantity for a single variant (`stock - reservedStock`, clamped at
|
|
1395
|
+
* zero), or `null` when the variant is unlimited and has no finite quantity.
|
|
1396
|
+
* Mirrors Shopify's `ProductVariant.quantityAvailable` (a single computed
|
|
1397
|
+
* number, never the raw stock/reserved breakdown).
|
|
1398
|
+
*/
|
|
1399
|
+
declare function getVariantAvailableStock(variant: ProductVariantShape): number | null;
|
|
1400
|
+
declare function buildProductListingGroupProjection(product: ProductListingProductShape | null | undefined, variants: ProductVariantShape[]): ProductListingGroupProjection;
|
|
1357
1401
|
declare function buildProductListingCard(item: ProductListingCardSourceItem, options?: ProductListingCardOptions): ProductListingCard;
|
|
1358
1402
|
/** Shopify `priceRangeV2` naming for persisted listing projection fields. */
|
|
1359
1403
|
declare function toShopifyPriceRangeV2(listing: {
|
|
@@ -1386,6 +1430,20 @@ declare function toShopifyPriceRangeV2(listing: {
|
|
|
1386
1430
|
* raw reads are constrained to `depth: 0`, `joins: false`, and no `populate`.
|
|
1387
1431
|
*/
|
|
1388
1432
|
declare const PRODUCT_PLP_FIND_OPTIONS: ApiQueryOptions;
|
|
1433
|
+
/**
|
|
1434
|
+
* Adapts a raw Payload product document (from
|
|
1435
|
+
* `collections.from('products').find()`) into the listing shape the SDK
|
|
1436
|
+
* listing builders consume. A raw product already carries `priceRange`,
|
|
1437
|
+
* `compareAtPriceRange`, `availableForSale`, and `selectedOrFirstAvailableVariant`,
|
|
1438
|
+
* but it has no `featuredImage` field — only the `images` gallery. This pure,
|
|
1439
|
+
* non-lossy adapter fills `featuredImage` from the first non-null gallery image
|
|
1440
|
+
* (when not already set) so SSG/sitemap consumers on the raw `find()` escape
|
|
1441
|
+
* hatch can feed `buildProductListingGroupsByOption` / `buildProductListingCard`
|
|
1442
|
+
* without hand-rolling the projection. An explicit `featuredImage` is preserved.
|
|
1443
|
+
*/
|
|
1444
|
+
declare function projectProductToListingShape<T extends ProductListingProductShape>(product: T): T & {
|
|
1445
|
+
featuredImage: MediaValue;
|
|
1446
|
+
};
|
|
1389
1447
|
/**
|
|
1390
1448
|
* Builds product-first listing groups for one primary option.
|
|
1391
1449
|
*
|
|
@@ -1453,8 +1511,6 @@ type ProductFieldsInput = {
|
|
|
1453
1511
|
description?: string | null;
|
|
1454
1512
|
status?: string;
|
|
1455
1513
|
slug?: string;
|
|
1456
|
-
primaryMediaItemId?: string | null;
|
|
1457
|
-
thumbnail?: string | null;
|
|
1458
1514
|
images?: string[];
|
|
1459
1515
|
vendor?: string | null;
|
|
1460
1516
|
productType?: string | null;
|
|
@@ -1517,40 +1573,33 @@ type ProductListingGroupSummary = ProductListingGroup<ProductListingGroupVariant
|
|
|
1517
1573
|
type ProductListingGroupCatalogVariant = Omit<ProductListingGroupVariant, 'stock'>;
|
|
1518
1574
|
type ProductListingGroupCatalogSummary = ProductListingGroup<ProductListingGroupCatalogVariant>;
|
|
1519
1575
|
type ProductListingGroupsProductVariants = NonNullable<PublicProduct['variants']>;
|
|
1520
|
-
type
|
|
1521
|
-
id?: string | number | null;
|
|
1522
|
-
} | null;
|
|
1523
|
-
type ProductListingGroupsProduct = Omit<PublicProduct, 'createdAt' | 'primaryMediaItemId' | 'updatedAt' | 'variants'> & {
|
|
1576
|
+
type ProductListingGroupsProduct = Omit<PublicProduct, 'createdAt' | 'updatedAt' | 'variants'> & {
|
|
1524
1577
|
id: string;
|
|
1525
1578
|
slug: string;
|
|
1526
1579
|
title: string;
|
|
1527
1580
|
createdAt?: PublicProduct['createdAt'];
|
|
1528
1581
|
updatedAt?: PublicProduct['updatedAt'];
|
|
1529
|
-
|
|
1582
|
+
featuredImage?: ProductDetailMedia | null;
|
|
1583
|
+
priceRange?: ProductPriceRange;
|
|
1584
|
+
compareAtPriceRange?: ProductMoneyRange;
|
|
1585
|
+
availableForSale?: boolean | null;
|
|
1586
|
+
selectedOrFirstAvailableVariant?: ProductListingGroupVariant | string | number | null;
|
|
1530
1587
|
variants?: (Omit<ProductListingGroupsProductVariants, 'docs'> & {
|
|
1531
1588
|
docs: ProductListingGroupVariant[];
|
|
1532
1589
|
}) | null;
|
|
1533
1590
|
};
|
|
1534
|
-
type ProductListingGroupsCatalogListing = {
|
|
1535
|
-
minPrice?: NonNullable<ProductListingGroupsProduct['listing']>['minPrice'];
|
|
1536
|
-
maxPrice?: NonNullable<ProductListingGroupsProduct['listing']>['maxPrice'];
|
|
1537
|
-
minCompareAtPrice?: NonNullable<ProductListingGroupsProduct['listing']>['minCompareAtPrice'];
|
|
1538
|
-
maxCompareAtPrice?: NonNullable<ProductListingGroupsProduct['listing']>['maxCompareAtPrice'];
|
|
1539
|
-
isPriceRange?: NonNullable<ProductListingGroupsProduct['listing']>['isPriceRange'];
|
|
1540
|
-
primaryImage?: NonNullable<ProductListingGroupsProduct['listing']>['primaryImage'];
|
|
1541
|
-
availableForSale?: NonNullable<ProductListingGroupsProduct['listing']>['availableForSale'];
|
|
1542
|
-
selectionHintVariant?: NonNullable<ProductListingGroupsProduct['listing']>['selectionHintVariant'];
|
|
1543
|
-
};
|
|
1544
1591
|
type ProductListingGroupsCatalogProduct = {
|
|
1545
1592
|
id: string;
|
|
1546
1593
|
slug: string;
|
|
1547
1594
|
handle?: string | null;
|
|
1548
1595
|
title: string;
|
|
1549
1596
|
subtitle?: ProductListingGroupsProduct['subtitle'];
|
|
1550
|
-
primaryMediaItemId?: ProductListingGroupsProductPrimaryMediaItemId;
|
|
1551
|
-
thumbnail?: ProductListingGroupsProduct['thumbnail'];
|
|
1552
1597
|
images?: ProductListingGroupsProduct['images'];
|
|
1553
|
-
|
|
1598
|
+
featuredImage?: ProductDetailMedia | null;
|
|
1599
|
+
priceRange?: ProductPriceRange;
|
|
1600
|
+
compareAtPriceRange?: ProductMoneyRange;
|
|
1601
|
+
availableForSale?: boolean | null;
|
|
1602
|
+
selectedOrFirstAvailableVariant?: ProductListingGroupCatalogVariant | string | number | null;
|
|
1554
1603
|
variants?: (Omit<NonNullable<ProductListingGroupsProduct['variants']>, 'docs'> & {
|
|
1555
1604
|
docs: ProductListingGroupCatalogVariant[];
|
|
1556
1605
|
}) | null;
|
|
@@ -1576,7 +1625,7 @@ type ProductListingGroupsResponse = {
|
|
|
1576
1625
|
type ProductListingGroupsCatalogResponse = Omit<ProductListingGroupsResponse, 'docs'> & {
|
|
1577
1626
|
docs: ProductListingGroupsCatalogItem[];
|
|
1578
1627
|
};
|
|
1579
|
-
type ProductListingPageSort = 'id' | '-id' | 'slug' | '-slug' | 'handle' | '-handle' | 'createdAt' | '-createdAt' | 'updatedAt' | '-updatedAt' | 'title' | '-title' | '
|
|
1628
|
+
type ProductListingPageSort = 'id' | '-id' | 'slug' | '-slug' | 'handle' | '-handle' | 'createdAt' | '-createdAt' | 'updatedAt' | '-updatedAt' | 'title' | '-title' | 'priceRange.minVariantPrice.amount' | '-priceRange.minVariantPrice.amount' | 'priceRange.maxVariantPrice.amount' | '-priceRange.maxVariantPrice.amount' | 'availableForSale' | '-availableForSale';
|
|
1580
1629
|
type ProductListingPageFilters = {
|
|
1581
1630
|
ids?: string[];
|
|
1582
1631
|
slugs?: string[];
|
|
@@ -1642,7 +1691,6 @@ type ProductOptionValueMediaSwatch<TMedia = ProductDetailMedia> = {
|
|
|
1642
1691
|
color?: null;
|
|
1643
1692
|
};
|
|
1644
1693
|
type ProductOptionValueSwatch<TMedia = ProductDetailMedia> = ProductOptionValueColorSwatch | ProductOptionValueMediaSwatch<TMedia> | null;
|
|
1645
|
-
type ProductDetailMediaValue = string | number | ProductDetailMedia | null;
|
|
1646
1694
|
type ProductDetailSelectionMediaSource = 'variant_media_selected' | 'variant_media_matching' | 'option_swatch' | 'none';
|
|
1647
1695
|
interface ProductDetailVariant {
|
|
1648
1696
|
id: string | number;
|
|
@@ -1704,20 +1752,18 @@ interface ProductDetailVideo {
|
|
|
1704
1752
|
id: string | number;
|
|
1705
1753
|
url?: string | null;
|
|
1706
1754
|
}
|
|
1707
|
-
interface
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1755
|
+
interface ProductMoneyRange {
|
|
1756
|
+
minVariantPrice: {
|
|
1757
|
+
amount: number | null;
|
|
1758
|
+
};
|
|
1759
|
+
maxVariantPrice: {
|
|
1760
|
+
amount: number | null;
|
|
1761
|
+
};
|
|
1762
|
+
}
|
|
1763
|
+
interface ProductPriceRange extends ProductMoneyRange {
|
|
1712
1764
|
isPriceRange?: boolean | null;
|
|
1713
|
-
primaryImage?: ProductDetailMedia | null;
|
|
1714
|
-
availableForSale?: boolean | null;
|
|
1715
|
-
selectionHintVariant?: string | number | null;
|
|
1716
1765
|
}
|
|
1717
1766
|
type ProductDetailCatalogVariant = Omit<ProductDetailVariant, 'stock' | 'reservedStock'>;
|
|
1718
|
-
type ProductDetailCatalogListing = Omit<ProductDetailListing, 'availableForSale'> & {
|
|
1719
|
-
liveStockRequired: true;
|
|
1720
|
-
};
|
|
1721
1767
|
interface ProductDetailCatalog {
|
|
1722
1768
|
product: Omit<ProductDetail['product'], 'totalInventory'>;
|
|
1723
1769
|
variants: ProductDetailCatalogVariant[];
|
|
@@ -1727,8 +1773,11 @@ interface ProductDetailCatalog {
|
|
|
1727
1773
|
tags: ProductDetail['tags'];
|
|
1728
1774
|
images: ProductDetail['images'];
|
|
1729
1775
|
videos: ProductDetail['videos'];
|
|
1730
|
-
|
|
1731
|
-
|
|
1776
|
+
featuredImage?: ProductDetail['featuredImage'];
|
|
1777
|
+
priceRange?: ProductPriceRange;
|
|
1778
|
+
compareAtPriceRange?: ProductMoneyRange;
|
|
1779
|
+
availableForSale?: boolean | null;
|
|
1780
|
+
selectedOrFirstAvailableVariant?: ProductDetailCatalogVariant | string | number | null;
|
|
1732
1781
|
}
|
|
1733
1782
|
type StockSnapshotItemStatus = 'available' | 'not_published' | 'archived' | 'not_found';
|
|
1734
1783
|
interface StockSnapshotItem {
|
|
@@ -1766,9 +1815,16 @@ interface ProductDetail {
|
|
|
1766
1815
|
tags: ProductDetailTag[];
|
|
1767
1816
|
images: ProductDetailImage[];
|
|
1768
1817
|
videos: ProductDetailVideo[];
|
|
1769
|
-
/**
|
|
1770
|
-
|
|
1771
|
-
|
|
1818
|
+
/** Shopify-shaped product/card image, resolved from the first product image. */
|
|
1819
|
+
featuredImage?: ProductDetailMedia | null;
|
|
1820
|
+
/** Shopify-shaped product price range derived from active variants. */
|
|
1821
|
+
priceRange?: ProductPriceRange;
|
|
1822
|
+
/** Shopify-shaped compare-at price range derived from active variants. */
|
|
1823
|
+
compareAtPriceRange?: ProductMoneyRange;
|
|
1824
|
+
/** Product-level sellability derived from active variants and inventory. */
|
|
1825
|
+
availableForSale?: boolean | null;
|
|
1826
|
+
/** Default variant for PDP/card selection, equivalent to Shopify selectedOrFirstAvailableVariant. */
|
|
1827
|
+
selectedOrFirstAvailableVariant?: ProductDetailVariant | string | number | null;
|
|
1772
1828
|
}
|
|
1773
1829
|
type ProductDetailUnavailableReason = 'not_found' | 'not_published' | 'feature_disabled';
|
|
1774
1830
|
type ProductDetailResult = {
|
|
@@ -1801,7 +1857,7 @@ declare function isProductUpsertFieldValidationErrorBody(value: unknown): value
|
|
|
1801
1857
|
type ProductUpsertResponse = {
|
|
1802
1858
|
ok: true;
|
|
1803
1859
|
product: PublicProduct;
|
|
1804
|
-
|
|
1860
|
+
productProjectionStale: boolean;
|
|
1805
1861
|
} | {
|
|
1806
1862
|
ok: false;
|
|
1807
1863
|
failedEntity: 'product' | 'option' | 'option-value' | 'variant';
|
|
@@ -1916,11 +1972,7 @@ declare class CommerceClient {
|
|
|
1916
1972
|
};
|
|
1917
1973
|
readonly orders: {
|
|
1918
1974
|
checkout: (params: CheckoutParams) => Promise<PublicOrder>;
|
|
1919
|
-
listMine: (options?:
|
|
1920
|
-
page?: number;
|
|
1921
|
-
limit?: number;
|
|
1922
|
-
status?: string;
|
|
1923
|
-
}) => Promise<PayloadFindResponse<PublicOrder>>;
|
|
1975
|
+
listMine: (options?: CustomerOrderListOptions) => Promise<PayloadFindResponse<PublicOrder>>;
|
|
1924
1976
|
};
|
|
1925
1977
|
readonly discounts: {
|
|
1926
1978
|
validate: (params: ValidateDiscountParams) => Promise<ValidateDiscountResult>;
|
|
@@ -2092,8 +2144,8 @@ interface EventsRangeParams {
|
|
|
2092
2144
|
end: EventsDateParam;
|
|
2093
2145
|
limit?: number;
|
|
2094
2146
|
page?: number;
|
|
2095
|
-
calendar?: string
|
|
2096
|
-
calendarSlug?: string
|
|
2147
|
+
calendar?: string;
|
|
2148
|
+
calendarSlug?: string;
|
|
2097
2149
|
category?: string | string[];
|
|
2098
2150
|
categorySlug?: string | string[];
|
|
2099
2151
|
tag?: string | string[];
|
|
@@ -2142,7 +2194,7 @@ interface EventsRangeEvent {
|
|
|
2142
2194
|
externalRegistrationUrl?: string | null;
|
|
2143
2195
|
externalSource: EventsExternalSource | null;
|
|
2144
2196
|
location: EventsLocation | null;
|
|
2145
|
-
|
|
2197
|
+
calendar: EventsCalendarItem;
|
|
2146
2198
|
categories: EventsTaxonomyItem[];
|
|
2147
2199
|
tags: EventsTaxonomyItem[];
|
|
2148
2200
|
}
|
|
@@ -2166,7 +2218,7 @@ interface EventsRangeResponse {
|
|
|
2166
2218
|
end: string;
|
|
2167
2219
|
};
|
|
2168
2220
|
docs: EventsRangeOccurrence[];
|
|
2169
|
-
|
|
2221
|
+
calendar: EventsCalendarItem | null;
|
|
2170
2222
|
events: EventsRangeEvent[];
|
|
2171
2223
|
categories: EventsTaxonomyItem[];
|
|
2172
2224
|
tags: EventsTaxonomyItem[];
|
|
@@ -2555,4 +2607,4 @@ type DeepPartial<T> = {
|
|
|
2555
2607
|
};
|
|
2556
2608
|
type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
|
|
2557
2609
|
|
|
2558
|
-
export { type CollectionFieldSchema as $, type AddItemParams as A, type RootReadOnlyQueryBuilder as B, CommerceClient as C, type DebugConfig as D, EventsClient as E, type StorefrontContentListOptions as F, type StorefrontContentReference as G, type StorefrontGalleryItem as H, type StorefrontGalleryItemsListOptions as I, type StorefrontGalleryItemsSort as J, type StorefrontLink as K, type StorefrontLinksListOptions as L, type StorefrontLinksSort as M, BaseApi as N, type ServerApiOptions as O, type PayloadFindResponse as P, ServerCommerceClient as Q, type RemoveDiscountParams as R, type Sort as S, type TenantIntrospectionClient as T, type UpdateItemParams as U, type BanCustomerParams as V, type Where as W, type CommunityBan as X, type UnbanCustomerParams as Y, type ClientServerConfig as Z, type RootServerClientWithEvents as _, CommunityClient as a, type CalculateShippingResult as a$, type CollectionSchemaResponse as a0, type EventGuestCancelParams as a1, type EventGuestRegistration as a2, type EventGuestRegistrationResponse as a3, type EventRegistrationAnswerInput as a4, type EventRegistrationAttendeeInput as a5, type EventRegistrationPublic as a6, type EventRegistrationRegisterParams as a7, type EventRegistrationRegisterResponse as a8, type EventsCalendarItem as a9, type CustomerAuthResponse as aA, type CustomerLoginData as aB, type CustomerRegisterResponse as aC, type CustomerRegisterData as aD, type CustomerRefreshResponse as aE, type UpdateProfileData as aF, type ProductListingPageBaseParams as aG, type ProductListingPageParams as aH, type ProductDetailParams as aI, type ProductDetailResult as aJ, type ProductListingPageCatalogParams as aK, type ProductListingPageResult as aL, type ProductListingGroupsCatalogItem as aM, type ProductListingPageFullParams as aN, type ProductListingGroupsItem as aO, type ProductDetail as aP, type ProductDetailCatalog as aQ, type StockSnapshotResponse as aR, type ProductSelectionMediaSource as aS, type ProductDisplayMediaSource as aT, type ResolveProductSelectionMediaInput as aU, type ResolveProductSelectionMediaResult as aV, type ProductSelectionMediaPointer as aW, type RootClientWithEvents as aX, type BulkImportFulfillmentsParams as aY, type BulkImportFulfillmentsResponse as aZ, type CalculateShippingParams as a_, type EventsClientOptions as aa, type EventsDateParam as ab, type EventsExternalSource as ac, type EventsLocation as ad, type EventsOccurrenceLocation as ae, type EventsRangeEvent as af, type EventsRangeOccurrence as ag, type EventsRangeParams as ah, type EventsRangeResponse as ai, type EventsTaxonomyItem as aj, ModerationApi as ak, type RootServerClient as al, type TenantFeatureProgressEvidenceValue as am, type TenantFeatureProgressFeature as an, type TenantFeatureProgressGroup as ao, type TenantFeatureProgressInput as ap, type TenantFeatureProgressItem as aq, type TenantFeatureProgressItemState as ar, type TenantFeatureProgressResponse as as, type TenantFeatureProgressSeverity as at, type TenantFeatureProgressStatus as au, TenantIntrospectionApi as av, type TenantIntrospectionApiOptions as aw, type PublicReadQueryOptions as ax, CustomerAuth as ay, type CustomerProfile as az, ContentClient as b, type
|
|
2610
|
+
export { type CollectionFieldSchema as $, type AddItemParams as A, type RootReadOnlyQueryBuilder as B, CommerceClient as C, type DebugConfig as D, EventsClient as E, type StorefrontContentListOptions as F, type StorefrontContentReference as G, type StorefrontGalleryItem as H, type StorefrontGalleryItemsListOptions as I, type StorefrontGalleryItemsSort as J, type StorefrontLink as K, type StorefrontLinksListOptions as L, type StorefrontLinksSort as M, BaseApi as N, type ServerApiOptions as O, type PayloadFindResponse as P, ServerCommerceClient as Q, type RemoveDiscountParams as R, type Sort as S, type TenantIntrospectionClient as T, type UpdateItemParams as U, type BanCustomerParams as V, type Where as W, type CommunityBan as X, type UnbanCustomerParams as Y, type ClientServerConfig as Z, type RootServerClientWithEvents as _, CommunityClient as a, type CalculateShippingResult as a$, type CollectionSchemaResponse as a0, type EventGuestCancelParams as a1, type EventGuestRegistration as a2, type EventGuestRegistrationResponse as a3, type EventRegistrationAnswerInput as a4, type EventRegistrationAttendeeInput as a5, type EventRegistrationPublic as a6, type EventRegistrationRegisterParams as a7, type EventRegistrationRegisterResponse as a8, type EventsCalendarItem as a9, type CustomerAuthResponse as aA, type CustomerLoginData as aB, type CustomerRegisterResponse as aC, type CustomerRegisterData as aD, type CustomerRefreshResponse as aE, type UpdateProfileData as aF, type ProductListingPageBaseParams as aG, type ProductListingPageParams as aH, type ProductDetailParams as aI, type ProductDetailResult as aJ, type ProductListingPageCatalogParams as aK, type ProductListingPageResult as aL, type ProductListingGroupsCatalogItem as aM, type ProductListingPageFullParams as aN, type ProductListingGroupsItem as aO, type ProductDetail as aP, type ProductDetailCatalog as aQ, type StockSnapshotResponse as aR, type ProductSelectionMediaSource as aS, type ProductDisplayMediaSource as aT, type ResolveProductSelectionMediaInput as aU, type ResolveProductSelectionMediaResult as aV, type ProductSelectionMediaPointer as aW, type RootClientWithEvents as aX, type BulkImportFulfillmentsParams as aY, type BulkImportFulfillmentsResponse as aZ, type CalculateShippingParams as a_, type EventsClientOptions as aa, type EventsDateParam as ab, type EventsExternalSource as ac, type EventsLocation as ad, type EventsOccurrenceLocation as ae, type EventsRangeEvent as af, type EventsRangeOccurrence as ag, type EventsRangeParams as ah, type EventsRangeResponse as ai, type EventsTaxonomyItem as aj, ModerationApi as ak, type RootServerClient as al, type TenantFeatureProgressEvidenceValue as am, type TenantFeatureProgressFeature as an, type TenantFeatureProgressGroup as ao, type TenantFeatureProgressInput as ap, type TenantFeatureProgressItem as aq, type TenantFeatureProgressItemState as ar, type TenantFeatureProgressResponse as as, type TenantFeatureProgressSeverity as at, type TenantFeatureProgressStatus as au, TenantIntrospectionApi as av, type TenantIntrospectionApiOptions as aw, type PublicReadQueryOptions as ax, CustomerAuth as ay, type CustomerProfile as az, ContentClient as b, type ProductListingCardOptions as b$, type CancelOrderParams as b0, type CancelOrderReconciliationStatus as b1, type CancelOrderResponse as b2, type CancelReasonCode as b3, CartApi as b4, type CartApiOptions as b5, type Comment as b6, type CommerceClientOptions as b7, type CommunityClientOptions as b8, type CommunityComment as b9, OrderApi as bA, type OrderApiOptions as bB, PRODUCT_PLP_FIND_OPTIONS as bC, PRODUCT_UPSERT_READONLY_FIELD_REASON as bD, PRODUCT_UPSERT_UNKNOWN_FIELD_REASON as bE, type PrepareFulfillmentOrderParams as bF, type PrepareFulfillmentOrderResponse as bG, ProductApi as bH, type ProductApiOptions as bI, type ProductDetailBrand as bJ, type ProductDetailCatalogResult as bK, type ProductDetailCatalogVariant as bL, type ProductDetailCategory as bM, type ProductDetailImage as bN, type ProductDetailImageMedia as bO, type ProductDetailMedia as bP, type ProductDetailOption as bQ, type ProductDetailOptionValue as bR, type ProductDetailTag as bS, type ProductDetailUnavailableReason as bT, type ProductDetailVariant as bU, type ProductDetailVariantOptionValue as bV, type ProductDetailVideo as bW, type ProductHrefGroup as bX, type ProductHrefOptions as bY, type ProductHrefProduct as bZ, type ProductListingCard as b_, type CommunityCommentListSort as ba, type CommunityPost as bb, type CommunityPostCategory as bc, type CommunityPostListSort as bd, type CommunityPostTag as be, type CommunityPublicAuthorSnapshot as bf, type CommunityPublicMediaAsset as bg, type CommunityPublicReference as bh, type CompatibilityProductSelectionParamEvent as bi, type ConfirmPaymentParams as bj, type ConfirmPaymentResponse as bk, type CreateFulfillmentParams as bl, type CreateOrderItem as bm, type CreateOrderParams as bn, type CreateReturnParams as bo, type CustomerAuthOptions as bp, type CustomerOrderListOptions as bq, type CustomerSnapshot as br, DiscountApi as bs, type DiscountApiOptions as bt, type FeaturedImagePointerInput as bu, type LegacyProductSelectionParamEvent as bv, type ListingGroupsParams as bw, type MediaValue as bx, type NormalizedOptionSwatch as by, type NormalizedProductSelection as bz, CustomerNamespace as c, type UpdateTransactionParams as c$, type ProductListingCardPriceRange as c0, type ProductListingCardRepresentativeVariant as c1, type ProductListingGroup as c2, type ProductListingGroupCatalogSummary as c3, type ProductListingGroupCatalogVariant as c4, type ProductListingGroupProjection as c5, type ProductListingGroupSummary as c6, type ProductListingGroupVariant as c7, type ProductListingGroupsCatalogProduct as c8, type ProductListingGroupsCatalogResponse as c9, type ProductSelectionUrlEmit as cA, type ProductSelectionVariant as cB, type ProductUpsertFieldValidationErrorBody as cC, type ProductUpsertFieldValidationErrorReason as cD, type ProductVariantShape as cE, type RequestOptions as cF, type ResolveCancelRefundFailedResponse as cG, type ResolveCancelRefundOutcome as cH, type ResolveCancelRefundParams as cI, type ResolveCancelRefundResponse as cJ, type ResolveCancelRefundSucceededResponse as cK, type ResolveProductDisplayMediaInput as cL, type ResolveProductDisplayMediaResult as cM, type ReturnItem as cN, type ReturnReason as cO, type ReturnWithRefundItem as cP, type ReturnWithRefundParams as cQ, ShippingApi as cR, type ShippingApiOptions as cS, type StockCheckParams as cT, type StockCheckResponse as cU, type StockCheckResult as cV, type StockSnapshotItem as cW, type StockSnapshotParams as cX, type UpdateFulfillmentParams as cY, type UpdateOrderParams as cZ, type UpdateReturnParams as c_, type ProductListingGroupsProduct as ca, type ProductListingGroupsResponse as cb, type ProductListingPageFilters as cc, type ProductListingPageSort as cd, type ProductListingProductShape as ce, type ProductListingSwatch as cf, type ProductMediaResolutionSource as cg, type ProductMoneyRange as ch, type ProductOptionMatrix as ci, type ProductOptionMatrixOption as cj, type ProductOptionMatrixValue as ck, type ProductOptionMatrixVariant as cl, type ProductOptionShape as cm, type ProductOptionValueShape as cn, type ProductOptionValueSwatch as co, type ProductOptionValueSwatchInput as cp, type ProductPriceRange as cq, type ProductSelectionAvailableSwatch as cr, type ProductSelectionAvailableValue as cs, type ProductSelectionByOptionValue as ct, ProductSelectionCodecError as cu, type ProductSelectionCodecOptions as cv, type ProductSelectionInput as cw, type ProductSelectionOptionValue as cx, type ProductSelectionResolution as cy, type ProductSelectionResolutionContext as cz, type ClientState as d, type ValidateDiscountParams as d0, type ValidateDiscountResult as d1, type WithIdempotencyKey as d2, buildProductHref as d3, buildProductListingCard as d4, buildProductListingGroupProjection as d5, buildProductListingGroupsByOption as d6, buildProductOptionMatrix as d7, buildProductOptionMatrixFromDetail as d8, createProductSelectionCodec as d9, getAvailableOptionValues as da, getProductSelectionImages as db, getSelectedValueByOptionId as dc, getVariantAvailableForSale as dd, getVariantAvailableStock as de, isProductUpsertFieldValidationErrorBody as df, normalizeProductSelection as dg, normalizeProductSelectionFromMatrix as dh, normalizeSelectedValueIds as di, parseProductSelection as dj, projectProductToListingShape as dk, resolveFeaturedImagePointer as dl, resolveProductDisplayMedia as dm, resolveProductSelection as dn, resolveProductSelectionFromMatrix as dp, resolveProductSelectionMedia as dq, resolveVariantForSelection as dr, selectNext as ds, selectedSwatchMediaItemId as dt, stringifyProductSelection as du, toShopifyPriceRangeV2 as dv, type ClientConfig as e, type ApiQueryOptions as f, type ApplyDiscountParams as g, type CheckoutParams as h, type ClearCartParams as i, type ClientMetadata as j, type ContentClientOptions as k, type DeepPartial as l, type ExtractArrayType as m, type PayloadMutationResponse as n, type PublicCart as o, type PublicCartItem as p, type PublicCartReference as q, type PublicMediaAsset as r, type PublicMediaSize as s, type PublicOrder as t, type PublicOrderItem as u, type PublicOrderReference as v, type RemoveItemParams as w, type RetryConfig as x, type RootClient as y, type RootCollectionClient as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Product, C as CustomerProfile, a as
|
|
1
|
+
import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-DC0xzR9i.cjs';
|
|
2
2
|
|
|
3
3
|
type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
|
|
4
4
|
type PublicCustomerProfileListEntry = {
|
|
@@ -16,10 +16,14 @@ type PublicCustomerProfileListEntry = {
|
|
|
16
16
|
type PublicCustomerProfileList = Omit<CustomerProfileList, 'tenant' | 'visibility' | 'metadata' | 'entries'> & {
|
|
17
17
|
entries?: PublicCustomerProfileListEntry[] | null;
|
|
18
18
|
};
|
|
19
|
+
type PublicCustomerProfileStats = Omit<CustomerProfileStat, 'tenant' | 'profile'> & {
|
|
20
|
+
profile: string | PublicCustomerProfile;
|
|
21
|
+
};
|
|
19
22
|
type PublicProduct = Omit<Product, 'collectionItems'>;
|
|
20
23
|
type PublicProductCollection = Omit<ProductCollection, 'items'>;
|
|
21
24
|
type PublicCollectionOverrides = {
|
|
22
25
|
'customer-profiles': PublicCustomerProfile;
|
|
26
|
+
'customer-profile-stats': PublicCustomerProfileStats;
|
|
23
27
|
'customer-profile-lists': PublicCustomerProfileList;
|
|
24
28
|
products: PublicProduct;
|
|
25
29
|
'product-collections': PublicProductCollection;
|