@01.software/sdk 0.28.0 → 0.29.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.
@@ -2157,7 +2157,7 @@ interface ProductOptionValue {
2157
2157
  * When enabled, the slug will auto-generate from the title field on save and autosave.
2158
2158
  */
2159
2159
  generateSlug?: boolean | null;
2160
- slug?: string | null;
2160
+ slug: string;
2161
2161
  thumbnail?: (string | null) | Image;
2162
2162
  images?: (string | Image)[] | null;
2163
2163
  metadata?: {
@@ -2184,6 +2184,11 @@ interface ProductOption {
2184
2184
  * Option name (e.g. Color, Size)
2185
2185
  */
2186
2186
  title: string;
2187
+ /**
2188
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
2189
+ */
2190
+ generateSlug?: boolean | null;
2191
+ slug: string;
2187
2192
  values?: {
2188
2193
  docs?: (string | ProductOptionValue)[];
2189
2194
  hasNextPage?: boolean;
@@ -3589,7 +3594,6 @@ interface Article {
3589
3594
  * Canonical URL for search engines. Leave empty to use this article URL.
3590
3595
  */
3591
3596
  canonicalUrl?: string | null;
3592
- visibility?: ('public' | 'members' | 'paid') | null;
3593
3597
  /**
3594
3598
  * Scheduled publish metadata. No automatic publishing job runs from this field.
3595
3599
  */
@@ -6571,6 +6575,8 @@ interface ProductOptionsSelect<T extends boolean = true> {
6571
6575
  tenant?: T;
6572
6576
  product?: T;
6573
6577
  title?: T;
6578
+ generateSlug?: T;
6579
+ slug?: T;
6574
6580
  values?: T;
6575
6581
  updatedAt?: T;
6576
6582
  createdAt?: T;
@@ -7389,7 +7395,6 @@ interface ArticlesSelect<T extends boolean = true> {
7389
7395
  readingMinutes?: T;
7390
7396
  excerpt?: T;
7391
7397
  canonicalUrl?: T;
7392
- visibility?: T;
7393
7398
  scheduledAt?: T;
7394
7399
  featuredUntil?: T;
7395
7400
  relatedArticles?: T;
@@ -2157,7 +2157,7 @@ interface ProductOptionValue {
2157
2157
  * When enabled, the slug will auto-generate from the title field on save and autosave.
2158
2158
  */
2159
2159
  generateSlug?: boolean | null;
2160
- slug?: string | null;
2160
+ slug: string;
2161
2161
  thumbnail?: (string | null) | Image;
2162
2162
  images?: (string | Image)[] | null;
2163
2163
  metadata?: {
@@ -2184,6 +2184,11 @@ interface ProductOption {
2184
2184
  * Option name (e.g. Color, Size)
2185
2185
  */
2186
2186
  title: string;
2187
+ /**
2188
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
2189
+ */
2190
+ generateSlug?: boolean | null;
2191
+ slug: string;
2187
2192
  values?: {
2188
2193
  docs?: (string | ProductOptionValue)[];
2189
2194
  hasNextPage?: boolean;
@@ -3589,7 +3594,6 @@ interface Article {
3589
3594
  * Canonical URL for search engines. Leave empty to use this article URL.
3590
3595
  */
3591
3596
  canonicalUrl?: string | null;
3592
- visibility?: ('public' | 'members' | 'paid') | null;
3593
3597
  /**
3594
3598
  * Scheduled publish metadata. No automatic publishing job runs from this field.
3595
3599
  */
@@ -6571,6 +6575,8 @@ interface ProductOptionsSelect<T extends boolean = true> {
6571
6575
  tenant?: T;
6572
6576
  product?: T;
6573
6577
  title?: T;
6578
+ generateSlug?: T;
6579
+ slug?: T;
6574
6580
  values?: T;
6575
6581
  updatedAt?: T;
6576
6582
  createdAt?: T;
@@ -7389,7 +7395,6 @@ interface ArticlesSelect<T extends boolean = true> {
7389
7395
  readingMinutes?: T;
7390
7396
  excerpt?: T;
7391
7397
  canonicalUrl?: T;
7392
- visibility?: T;
7393
7398
  scheduledAt?: T;
7394
7399
  featuredUntil?: T;
7395
7400
  relatedArticles?: T;
@@ -1,7 +1,7 @@
1
1
  import { R as RealtimeEvent } from './realtime-D7HtUpqt.cjs';
2
2
  export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
3
- import { P as PublicCollection } from './const-Cz9Ki_I7.cjs';
4
- import './payload-types-BrSYb-sh.cjs';
3
+ import { P as PublicCollection } from './const-Dsixdi6z.cjs';
4
+ import './payload-types-Ci-ZA7aM.cjs';
5
5
 
6
6
  interface UseRealtimeQueryOptions {
7
7
  /** Filter events to specific collections. Empty/undefined = all collections. */
@@ -1,7 +1,7 @@
1
1
  import { R as RealtimeEvent } from './realtime-D7HtUpqt.js';
2
2
  export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.js';
3
- import { P as PublicCollection } from './const-mdQQtIOz.js';
4
- import './payload-types-BrSYb-sh.js';
3
+ import { P as PublicCollection } from './const-DAjQYNuM.js';
4
+ import './payload-types-Ci-ZA7aM.js';
5
5
 
6
6
  interface UseRealtimeQueryOptions {
7
7
  /** Filter events to specific collections. Empty/undefined = all collections. */
@@ -1,10 +1,10 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { QueryClient, InfiniteData, UseQueryResult } from '@tanstack/react-query';
3
- import { O as Order, d as Cart, e as CartItem, f as Product, l as OrderItem, m as Transaction, n as Fulfillment, o as Return } from './payload-types-BrSYb-sh.cjs';
3
+ import { O as Order, d as Cart, e as CartItem, f as Product, l as OrderItem, m as Transaction, n as Fulfillment, o as Return } from './payload-types-Ci-ZA7aM.cjs';
4
4
  import { Sort, Where } from 'payload';
5
5
  import { Metadata } from 'next';
6
- import { C as CollectionType } from './types-CW4PaIL7.cjs';
7
- import { P as PublicCollection, d as ServerCollection } from './const-Cz9Ki_I7.cjs';
6
+ import { C as CollectionType } from './types-zKjATmDK.cjs';
7
+ import { P as PublicCollection, d as ServerCollection } from './const-Dsixdi6z.cjs';
8
8
 
9
9
  declare function resolveApiUrl(): string;
10
10
  interface ClientConfig {
@@ -889,9 +889,7 @@ type EntityID = string;
889
889
  type RelationshipValue = string | number | null | undefined | {
890
890
  id?: string | number | null;
891
891
  };
892
- type MediaValue = {
893
- id?: EntityID | null;
894
- } | EntityID | null | undefined;
892
+ type MediaValue = ProductDetailMedia | null | undefined;
895
893
  interface ProductOptionValueShape {
896
894
  id?: string | number | null;
897
895
  option?: RelationshipValue;
@@ -906,6 +904,7 @@ interface ProductOptionValueShape {
906
904
  interface ProductOptionShape {
907
905
  id?: string | number | null;
908
906
  title?: string | null;
907
+ slug?: string | null;
909
908
  _order?: string | null;
910
909
  '_product-options_options_order'?: string | null;
911
910
  values?: {
@@ -933,6 +932,7 @@ interface ProductListingProductShape {
933
932
  type ProductOptionMatrixValue = {
934
933
  id: string;
935
934
  optionId: string;
935
+ optionSlug: string;
936
936
  label: string;
937
937
  slug: string | null;
938
938
  swatchColor?: string | null;
@@ -943,6 +943,7 @@ type ProductOptionMatrixValue = {
943
943
  type ProductOptionMatrixOption = {
944
944
  id: string;
945
945
  title: string;
946
+ slug: string;
946
947
  order: string;
947
948
  values: ProductOptionMatrixValue[];
948
949
  };
@@ -950,14 +951,18 @@ type ProductOptionMatrixVariant<TVariant extends ProductVariantShape = ProductVa
950
951
  id: string;
951
952
  optionValueIds: string[];
952
953
  optionValueByOptionId: Map<string, string>;
954
+ optionValueByOptionSlug: Map<string, string>;
953
955
  source: TVariant;
954
956
  };
955
957
  type ProductOptionMatrix<TVariant extends ProductVariantShape = ProductVariantShape> = {
956
958
  options: ProductOptionMatrixOption[];
957
959
  optionIds: string[];
960
+ optionSlugs: string[];
958
961
  optionById: Map<string, ProductOptionMatrixOption>;
962
+ optionBySlug: Map<string, ProductOptionMatrixOption>;
959
963
  valueById: Map<string, ProductOptionMatrixValue>;
960
964
  valueToOptionId: Map<string, string>;
965
+ valueToOptionSlug: Map<string, string>;
961
966
  variants: ProductOptionMatrixVariant<TVariant>[];
962
967
  };
963
968
  type ProductListingProjection = {
@@ -984,14 +989,90 @@ type ProductListingGroup<TVariant extends ProductVariantShape = ProductVariantSh
984
989
  variants: TVariant[];
985
990
  listing: ProductListingProjection;
986
991
  };
992
+ type ProductSelectionByOptionValue = string | number | null | undefined | {
993
+ valueId?: string | number | null;
994
+ valueSlug?: string | null;
995
+ };
996
+ type ProductSelectionInput = {
997
+ variantId?: string | number | null;
998
+ byOptionSlug?: Record<string, ProductSelectionByOptionValue>;
999
+ byOptionId?: Record<string, ProductSelectionByOptionValue>;
1000
+ valueIds?: Iterable<unknown>;
1001
+ search?: string | URLSearchParams | URL | null;
1002
+ };
1003
+ type NormalizedProductSelection = {
1004
+ byOptionSlug: Record<string, string>;
1005
+ byOptionId: Record<string, string>;
1006
+ valueIds: string[];
1007
+ variantId: string | null;
1008
+ };
1009
+ type LegacyProductSelectionParamEvent = {
1010
+ optionId: string;
1011
+ optionSlug: string;
1012
+ valueSlug: string;
1013
+ searchParam: string;
1014
+ };
1015
+ type ProductSelectionCodecOptions = {
1016
+ onLegacyOptionIdParam?: (event: LegacyProductSelectionParamEvent) => void;
1017
+ };
1018
+ type ProductSelectionAvailableValue = {
1019
+ valueId: string;
1020
+ value: string;
1021
+ slug: string;
1022
+ selected: boolean;
1023
+ available: boolean;
1024
+ swatchColor?: string | null;
1025
+ thumbnail?: MediaValue;
1026
+ images?: MediaValue[] | null;
1027
+ };
1028
+ type ProductSelectionResolution = {
1029
+ normalizedSelection: NormalizedProductSelection;
1030
+ selectedVariant: ProductDetailVariant | null;
1031
+ matchingVariants: ProductDetailVariant[];
1032
+ partialVariants: ProductDetailVariant[];
1033
+ availableValuesByOptionSlug: Record<string, ProductSelectionAvailableValue[]>;
1034
+ availableValuesByOptionId: Record<string, ProductSelectionAvailableValue[]>;
1035
+ allOptionsSelected: boolean;
1036
+ price: {
1037
+ min: number | null;
1038
+ max: number | null;
1039
+ compareAtMin: number | null;
1040
+ compareAtMax: number | null;
1041
+ isRange: boolean;
1042
+ };
1043
+ media: {
1044
+ primaryImage: ProductDetailMedia | null;
1045
+ images: ProductDetailMedia[];
1046
+ };
1047
+ stock: {
1048
+ availableForSale: boolean;
1049
+ isUnlimited: boolean;
1050
+ stock: number | null;
1051
+ reservedStock: number | null;
1052
+ availableStock: number | null;
1053
+ };
1054
+ };
1055
+ declare class ProductSelectionCodecError extends Error {
1056
+ code: string;
1057
+ constructor(message: string);
1058
+ }
987
1059
  declare function buildProductOptionMatrix<TVariant extends ProductVariantShape = ProductVariantShape>({ options, variants, }: {
988
1060
  options: ProductOptionShape[];
989
1061
  variants?: TVariant[];
990
1062
  }): ProductOptionMatrix<TVariant>;
1063
+ declare function buildProductOptionMatrixFromDetail(detail: ProductDetail): ProductOptionMatrix<ProductDetailVariant>;
991
1064
  declare function getSelectedValueByOptionId<TVariant extends ProductVariantShape = ProductVariantShape>(matrix: ProductOptionMatrix<TVariant>, selectedValueIds: Iterable<unknown>): Map<string, string>;
992
1065
  declare function normalizeSelectedValueIds<TVariant extends ProductVariantShape = ProductVariantShape>(matrix: ProductOptionMatrix<TVariant>, selectedValueIds: Iterable<unknown>): string[];
993
1066
  declare function getAvailableOptionValues<TVariant extends ProductVariantShape = ProductVariantShape>(matrix: ProductOptionMatrix<TVariant>, optionId: string, selectedValueIds: Iterable<unknown>): ProductOptionMatrixValue[];
994
1067
  declare function resolveVariantForSelection<TVariant extends ProductVariantShape = ProductVariantShape>(matrix: ProductOptionMatrix<TVariant>, selectedValueIds: Iterable<unknown>): ProductOptionMatrixVariant<TVariant> | undefined;
1068
+ declare function normalizeProductSelection(detail: ProductDetail, selection?: ProductSelectionInput, options?: ProductSelectionCodecOptions): NormalizedProductSelection;
1069
+ declare function parseProductSelection(detail: ProductDetail, search: string | URLSearchParams | URL | null | undefined, options?: ProductSelectionCodecOptions): NormalizedProductSelection;
1070
+ declare function stringifyProductSelection(detail: ProductDetail, selection?: ProductSelectionInput, options?: ProductSelectionCodecOptions): string;
1071
+ declare function createProductSelectionCodec(detail: ProductDetail, options?: ProductSelectionCodecOptions): {
1072
+ parse: (search: string | URLSearchParams | URL | null | undefined) => NormalizedProductSelection;
1073
+ stringify: (selection?: ProductSelectionInput) => string;
1074
+ };
1075
+ declare function resolveProductSelection(detail: ProductDetail, selection?: ProductSelectionInput, options?: ProductSelectionCodecOptions): ProductSelectionResolution;
995
1076
  declare function buildProductListingProjection(product: ProductListingProductShape | null | undefined, variants: ProductVariantShape[]): ProductListingProjection;
996
1077
  /**
997
1078
  * Builds product-first listing groups for one primary option.
@@ -1044,9 +1125,18 @@ type ProductDetailParams = {
1044
1125
  };
1045
1126
  interface ProductDetailVariantOptionValue {
1046
1127
  optionId: string | number;
1128
+ optionSlug: string;
1047
1129
  valueId: string | number;
1130
+ valueSlug: string;
1048
1131
  value?: string | null;
1049
1132
  }
1133
+ type ProductDetailMedia = string | number | {
1134
+ id?: string | number | null;
1135
+ url?: string | null;
1136
+ alt?: string | null;
1137
+ width?: number | null;
1138
+ height?: number | null;
1139
+ };
1050
1140
  interface ProductDetailVariant {
1051
1141
  id: string | number;
1052
1142
  optionKey: string;
@@ -1058,19 +1148,23 @@ interface ProductDetailVariant {
1058
1148
  stock: number;
1059
1149
  reservedStock: number;
1060
1150
  isUnlimited: boolean;
1061
- thumbnail?: unknown | null;
1062
- images?: unknown[];
1151
+ isActive: boolean;
1152
+ thumbnail?: ProductDetailMedia | null;
1153
+ images?: ProductDetailMedia[];
1063
1154
  optionValues: ProductDetailVariantOptionValue[];
1064
1155
  }
1065
1156
  interface ProductDetailOptionValue {
1066
1157
  id: string | number;
1067
1158
  value: string;
1159
+ slug: string;
1068
1160
  swatchColor?: string | null;
1069
- thumbnail?: unknown | null;
1161
+ thumbnail?: ProductDetailMedia | null;
1162
+ images?: ProductDetailMedia[] | null;
1070
1163
  }
1071
1164
  interface ProductDetailOption {
1072
1165
  id: string | number;
1073
1166
  title: string;
1167
+ slug: string;
1074
1168
  values: ProductDetailOptionValue[];
1075
1169
  }
1076
1170
  interface ProductDetailBrand {
@@ -1106,9 +1200,9 @@ interface ProductDetailListing {
1106
1200
  minCompareAtPrice?: number | null;
1107
1201
  maxCompareAtPrice?: number | null;
1108
1202
  isPriceRange?: boolean | null;
1109
- primaryImage?: unknown | null;
1203
+ primaryImage?: ProductDetailMedia | null;
1110
1204
  availableForSale?: boolean | null;
1111
- selectionHintVariant?: unknown | null;
1205
+ selectionHintVariant?: string | number | null;
1112
1206
  }
1113
1207
  interface ProductDetail {
1114
1208
  product: {
@@ -1145,11 +1239,17 @@ type ProductUpsertOptionValueInput = {
1145
1239
  type ProductUpsertOptionInput = {
1146
1240
  id?: string;
1147
1241
  title: string;
1242
+ slug?: string;
1148
1243
  values: ProductUpsertOptionValueInput[];
1149
1244
  };
1245
+ type ProductUpsertVariantOptionValue = string | {
1246
+ valueSlug?: string;
1247
+ valueId?: string;
1248
+ value?: string;
1249
+ };
1150
1250
  type ProductUpsertVariantInput = {
1151
1251
  id?: string;
1152
- optionValues?: Record<string, string> | string[];
1252
+ optionValues?: Record<string, ProductUpsertVariantOptionValue> | string[];
1153
1253
  sku?: string | null;
1154
1254
  title?: string | null;
1155
1255
  price: number;
@@ -1659,4 +1759,4 @@ declare class ServerClient {
1659
1759
  */
1660
1760
  declare function createServerClient(options: ClientServerConfig): ServerClient;
1661
1761
 
1662
- export { type CustomerAuthResponse as $, type AddItemParams as A, type BanCustomerParams as B, CustomerAuth as C, type ClientMetadata as D, type ClientServerConfig as E, CollectionClient as F, type CollectionDetailQueryParams as G, CollectionHooks as H, type CollectionInfiniteQueryParams as I, CollectionQueryBuilder as J, type CollectionQueryParams as K, type ListingGroupsParams as L, type CommunityBan as M, type CommunityClientOptions as N, type CommunityPost as O, type ProductListingGroupsResponse as P, ConfigError as Q, type RemoveItemParams as R, type StockCheckParams as S, type ConfirmPaymentParams as T, type UpdateItemParams as U, type ValidateDiscountParams as V, type ConfirmPaymentResponse as W, ConflictError as X, type CreateFulfillmentParams as Y, type CreateOrderParams as Z, type CreateReturnParams as _, type CustomerAuthOptions as a, type ServerCommerceClientOptions as a$, CustomerHooks as a0, type CustomerLoginData as a1, type CustomerProfile as a2, type CustomerRefreshResponse as a3, type CustomerRegisterData as a4, type CustomerRegisterResponse as a5, type CustomerSnapshot as a6, type DebugConfig as a7, type DeepPartial as a8, DiscountApi as a9, type ProductListingGroup as aA, type ProductListingGroupSummary as aB, type ProductListingGroupsItem as aC, type ProductListingProductShape as aD, type ProductListingProjection as aE, type ProductOptionMatrix as aF, type ProductOptionMatrixOption as aG, type ProductOptionMatrixValue as aH, type ProductOptionMatrixVariant as aI, type ProductOptionShape as aJ, type ProductOptionValueShape as aK, type ProductVariantShape as aL, QueryHooks as aM, type QueryOptions as aN, RateLimitError as aO, type ReadOnlyQueryBuilder as aP, type RequestOptions as aQ, type RetryConfig as aR, type ReturnItem as aS, type ReturnReason as aT, type ReturnWithRefundParams as aU, SDKError as aV, type ServerApiOptions as aW, ServerClient as aX, ServerCollectionClient as aY, ServerCollectionQueryBuilder as aZ, ServerCommerceClient as a_, type DiscountApiOptions as aa, type ExtractArrayType as ab, type GenerateMetadataOptions as ac, GoneError as ad, type InfiniteQueryOptions as ae, ModerationApi as af, type ModerationApiOptions as ag, NetworkError as ah, NotFoundError as ai, OrderApi as aj, type OrderApiOptions as ak, type PaginationMeta as al, type PayloadMutationResponse as am, PermissionError as an, ProductApi as ao, type ProductApiOptions as ap, type ProductDetailBrand as aq, type ProductDetailCategory as ar, type ProductDetailImage as as, type ProductDetailListing as at, type ProductDetailOption as au, type ProductDetailOptionValue as av, type ProductDetailTag as aw, type ProductDetailVariant as ax, type ProductDetailVariantOptionValue as ay, type ProductDetailVideo as az, type StockCheckResponse as b, ServiceUnavailableError as b0, ShippingApi as b1, type ShippingApiOptions as b2, type StockCheckResult as b3, type SuspenseInfiniteQueryOptions as b4, type SuspenseQueryOptions as b5, TimeoutError as b6, type UnbanCustomerParams as b7, type UpdateFulfillmentParams as b8, type UpdateOrderParams as b9, isServiceUnavailableError as bA, isTimeoutError as bB, isUsageLimitError as bC, isValidationError as bD, normalizeSelectedValueIds as bE, resolveApiUrl as bF, resolveVariantForSelection as bG, type UpdateProfileData as ba, type UpdateReturnParams as bb, type UpdateTransactionParams as bc, UsageLimitError as bd, ValidationError as be, buildProductListingGroupsByOption as bf, buildProductListingProjection as bg, buildProductOptionMatrix as bh, createAuthError as bi, createConflictError as bj, createNotFoundError as bk, createPermissionError as bl, createRateLimitError as bm, createServerClient as bn, getAvailableOptionValues as bo, getSelectedValueByOptionId as bp, isApiError as bq, isAuthError as br, isConfigError as bs, isConflictError as bt, isGoneError as bu, isNetworkError as bv, isNotFoundError as bw, isPermissionError as bx, isRateLimitError as by, isSDKError as bz, type ProductDetailParams as c, type ProductDetail as d, type ApplyDiscountParams as e, type RemoveDiscountParams as f, type ClearCartParams as g, type CheckoutParams as h, type PayloadFindResponse as i, type ValidateDiscountResult as j, type CalculateShippingParams as k, type CalculateShippingResult as l, type ApiQueryOptions as m, type ProductListingGroupsQueryOptions as n, CommunityClient as o, type ReadOnlyQueryHooks as p, ReadOnlyCollectionClient as q, type ClientState as r, type ClientConfig as s, ApiError as t, AuthError as u, BaseApi as v, type BulkImportFulfillmentsParams as w, type BulkImportFulfillmentsResponse as x, CartApi as y, type CartApiOptions as z };
1762
+ export { type CustomerAuthResponse as $, type AddItemParams as A, type BanCustomerParams as B, CustomerAuth as C, type ClientMetadata as D, type ClientServerConfig as E, CollectionClient as F, type CollectionDetailQueryParams as G, CollectionHooks as H, type CollectionInfiniteQueryParams as I, CollectionQueryBuilder as J, type CollectionQueryParams as K, type ListingGroupsParams as L, type CommunityBan as M, type CommunityClientOptions as N, type CommunityPost as O, type ProductListingGroupsResponse as P, ConfigError as Q, type RemoveItemParams as R, type StockCheckParams as S, type ConfirmPaymentParams as T, type UpdateItemParams as U, type ValidateDiscountParams as V, type ConfirmPaymentResponse as W, ConflictError as X, type CreateFulfillmentParams as Y, type CreateOrderParams as Z, type CreateReturnParams as _, type CustomerAuthOptions as a, type ReturnItem as a$, CustomerHooks as a0, type CustomerLoginData as a1, type CustomerProfile as a2, type CustomerRefreshResponse as a3, type CustomerRegisterData as a4, type CustomerRegisterResponse as a5, type CustomerSnapshot as a6, type DebugConfig as a7, type DeepPartial as a8, DiscountApi as a9, type ProductDetailVariant as aA, type ProductDetailVariantOptionValue as aB, type ProductDetailVideo as aC, type ProductListingGroup as aD, type ProductListingGroupSummary as aE, type ProductListingGroupsItem as aF, type ProductListingProductShape as aG, type ProductListingProjection as aH, type ProductOptionMatrix as aI, type ProductOptionMatrixOption as aJ, type ProductOptionMatrixValue as aK, type ProductOptionMatrixVariant as aL, type ProductOptionShape as aM, type ProductOptionValueShape as aN, type ProductSelectionAvailableValue as aO, type ProductSelectionByOptionValue as aP, ProductSelectionCodecError as aQ, type ProductSelectionCodecOptions as aR, type ProductSelectionInput as aS, type ProductSelectionResolution as aT, type ProductVariantShape as aU, QueryHooks as aV, type QueryOptions as aW, RateLimitError as aX, type ReadOnlyQueryBuilder as aY, type RequestOptions as aZ, type RetryConfig as a_, type DiscountApiOptions as aa, type ExtractArrayType as ab, type GenerateMetadataOptions as ac, GoneError as ad, type InfiniteQueryOptions as ae, type LegacyProductSelectionParamEvent as af, ModerationApi as ag, type ModerationApiOptions as ah, NetworkError as ai, type NormalizedProductSelection as aj, NotFoundError as ak, OrderApi as al, type OrderApiOptions as am, type PaginationMeta as an, type PayloadMutationResponse as ao, PermissionError as ap, ProductApi as aq, type ProductApiOptions as ar, type ProductDetailBrand as as, type ProductDetailCategory as at, type ProductDetailImage as au, type ProductDetailListing as av, type ProductDetailMedia as aw, type ProductDetailOption as ax, type ProductDetailOptionValue as ay, type ProductDetailTag as az, type StockCheckResponse as b, type ReturnReason as b0, type ReturnWithRefundParams as b1, SDKError as b2, type ServerApiOptions as b3, ServerClient as b4, ServerCollectionClient as b5, ServerCollectionQueryBuilder as b6, ServerCommerceClient as b7, type ServerCommerceClientOptions as b8, ServiceUnavailableError as b9, getSelectedValueByOptionId as bA, isApiError as bB, isAuthError as bC, isConfigError as bD, isConflictError as bE, isGoneError as bF, isNetworkError as bG, isNotFoundError as bH, isPermissionError as bI, isRateLimitError as bJ, isSDKError as bK, isServiceUnavailableError as bL, isTimeoutError as bM, isUsageLimitError as bN, isValidationError as bO, normalizeProductSelection as bP, normalizeSelectedValueIds as bQ, parseProductSelection as bR, resolveApiUrl as bS, resolveProductSelection as bT, resolveVariantForSelection as bU, stringifyProductSelection as bV, ShippingApi as ba, type ShippingApiOptions as bb, type StockCheckResult as bc, type SuspenseInfiniteQueryOptions as bd, type SuspenseQueryOptions as be, TimeoutError as bf, type UnbanCustomerParams as bg, type UpdateFulfillmentParams as bh, type UpdateOrderParams as bi, type UpdateProfileData as bj, type UpdateReturnParams as bk, type UpdateTransactionParams as bl, UsageLimitError as bm, ValidationError as bn, buildProductListingGroupsByOption as bo, buildProductListingProjection as bp, buildProductOptionMatrix as bq, buildProductOptionMatrixFromDetail as br, createAuthError as bs, createConflictError as bt, createNotFoundError as bu, createPermissionError as bv, createProductSelectionCodec as bw, createRateLimitError as bx, createServerClient as by, getAvailableOptionValues as bz, type ProductDetailParams as c, type ProductDetail as d, type ApplyDiscountParams as e, type RemoveDiscountParams as f, type ClearCartParams as g, type CheckoutParams as h, type PayloadFindResponse as i, type ValidateDiscountResult as j, type CalculateShippingParams as k, type CalculateShippingResult as l, type ApiQueryOptions as m, type ProductListingGroupsQueryOptions as n, CommunityClient as o, type ReadOnlyQueryHooks as p, ReadOnlyCollectionClient as q, type ClientState as r, type ClientConfig as s, ApiError as t, AuthError as u, BaseApi as v, type BulkImportFulfillmentsParams as w, type BulkImportFulfillmentsResponse as x, CartApi as y, type CartApiOptions as z };
@@ -1,10 +1,10 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { QueryClient, InfiniteData, UseQueryResult } from '@tanstack/react-query';
3
- import { O as Order, d as Cart, e as CartItem, f as Product, l as OrderItem, m as Transaction, n as Fulfillment, o as Return } from './payload-types-BrSYb-sh.js';
3
+ import { O as Order, d as Cart, e as CartItem, f as Product, l as OrderItem, m as Transaction, n as Fulfillment, o as Return } from './payload-types-Ci-ZA7aM.js';
4
4
  import { Sort, Where } from 'payload';
5
5
  import { Metadata } from 'next';
6
- import { C as CollectionType } from './types-BLUb4cYq.js';
7
- import { P as PublicCollection, d as ServerCollection } from './const-mdQQtIOz.js';
6
+ import { C as CollectionType } from './types-BWq_WlbB.js';
7
+ import { P as PublicCollection, d as ServerCollection } from './const-DAjQYNuM.js';
8
8
 
9
9
  declare function resolveApiUrl(): string;
10
10
  interface ClientConfig {
@@ -889,9 +889,7 @@ type EntityID = string;
889
889
  type RelationshipValue = string | number | null | undefined | {
890
890
  id?: string | number | null;
891
891
  };
892
- type MediaValue = {
893
- id?: EntityID | null;
894
- } | EntityID | null | undefined;
892
+ type MediaValue = ProductDetailMedia | null | undefined;
895
893
  interface ProductOptionValueShape {
896
894
  id?: string | number | null;
897
895
  option?: RelationshipValue;
@@ -906,6 +904,7 @@ interface ProductOptionValueShape {
906
904
  interface ProductOptionShape {
907
905
  id?: string | number | null;
908
906
  title?: string | null;
907
+ slug?: string | null;
909
908
  _order?: string | null;
910
909
  '_product-options_options_order'?: string | null;
911
910
  values?: {
@@ -933,6 +932,7 @@ interface ProductListingProductShape {
933
932
  type ProductOptionMatrixValue = {
934
933
  id: string;
935
934
  optionId: string;
935
+ optionSlug: string;
936
936
  label: string;
937
937
  slug: string | null;
938
938
  swatchColor?: string | null;
@@ -943,6 +943,7 @@ type ProductOptionMatrixValue = {
943
943
  type ProductOptionMatrixOption = {
944
944
  id: string;
945
945
  title: string;
946
+ slug: string;
946
947
  order: string;
947
948
  values: ProductOptionMatrixValue[];
948
949
  };
@@ -950,14 +951,18 @@ type ProductOptionMatrixVariant<TVariant extends ProductVariantShape = ProductVa
950
951
  id: string;
951
952
  optionValueIds: string[];
952
953
  optionValueByOptionId: Map<string, string>;
954
+ optionValueByOptionSlug: Map<string, string>;
953
955
  source: TVariant;
954
956
  };
955
957
  type ProductOptionMatrix<TVariant extends ProductVariantShape = ProductVariantShape> = {
956
958
  options: ProductOptionMatrixOption[];
957
959
  optionIds: string[];
960
+ optionSlugs: string[];
958
961
  optionById: Map<string, ProductOptionMatrixOption>;
962
+ optionBySlug: Map<string, ProductOptionMatrixOption>;
959
963
  valueById: Map<string, ProductOptionMatrixValue>;
960
964
  valueToOptionId: Map<string, string>;
965
+ valueToOptionSlug: Map<string, string>;
961
966
  variants: ProductOptionMatrixVariant<TVariant>[];
962
967
  };
963
968
  type ProductListingProjection = {
@@ -984,14 +989,90 @@ type ProductListingGroup<TVariant extends ProductVariantShape = ProductVariantSh
984
989
  variants: TVariant[];
985
990
  listing: ProductListingProjection;
986
991
  };
992
+ type ProductSelectionByOptionValue = string | number | null | undefined | {
993
+ valueId?: string | number | null;
994
+ valueSlug?: string | null;
995
+ };
996
+ type ProductSelectionInput = {
997
+ variantId?: string | number | null;
998
+ byOptionSlug?: Record<string, ProductSelectionByOptionValue>;
999
+ byOptionId?: Record<string, ProductSelectionByOptionValue>;
1000
+ valueIds?: Iterable<unknown>;
1001
+ search?: string | URLSearchParams | URL | null;
1002
+ };
1003
+ type NormalizedProductSelection = {
1004
+ byOptionSlug: Record<string, string>;
1005
+ byOptionId: Record<string, string>;
1006
+ valueIds: string[];
1007
+ variantId: string | null;
1008
+ };
1009
+ type LegacyProductSelectionParamEvent = {
1010
+ optionId: string;
1011
+ optionSlug: string;
1012
+ valueSlug: string;
1013
+ searchParam: string;
1014
+ };
1015
+ type ProductSelectionCodecOptions = {
1016
+ onLegacyOptionIdParam?: (event: LegacyProductSelectionParamEvent) => void;
1017
+ };
1018
+ type ProductSelectionAvailableValue = {
1019
+ valueId: string;
1020
+ value: string;
1021
+ slug: string;
1022
+ selected: boolean;
1023
+ available: boolean;
1024
+ swatchColor?: string | null;
1025
+ thumbnail?: MediaValue;
1026
+ images?: MediaValue[] | null;
1027
+ };
1028
+ type ProductSelectionResolution = {
1029
+ normalizedSelection: NormalizedProductSelection;
1030
+ selectedVariant: ProductDetailVariant | null;
1031
+ matchingVariants: ProductDetailVariant[];
1032
+ partialVariants: ProductDetailVariant[];
1033
+ availableValuesByOptionSlug: Record<string, ProductSelectionAvailableValue[]>;
1034
+ availableValuesByOptionId: Record<string, ProductSelectionAvailableValue[]>;
1035
+ allOptionsSelected: boolean;
1036
+ price: {
1037
+ min: number | null;
1038
+ max: number | null;
1039
+ compareAtMin: number | null;
1040
+ compareAtMax: number | null;
1041
+ isRange: boolean;
1042
+ };
1043
+ media: {
1044
+ primaryImage: ProductDetailMedia | null;
1045
+ images: ProductDetailMedia[];
1046
+ };
1047
+ stock: {
1048
+ availableForSale: boolean;
1049
+ isUnlimited: boolean;
1050
+ stock: number | null;
1051
+ reservedStock: number | null;
1052
+ availableStock: number | null;
1053
+ };
1054
+ };
1055
+ declare class ProductSelectionCodecError extends Error {
1056
+ code: string;
1057
+ constructor(message: string);
1058
+ }
987
1059
  declare function buildProductOptionMatrix<TVariant extends ProductVariantShape = ProductVariantShape>({ options, variants, }: {
988
1060
  options: ProductOptionShape[];
989
1061
  variants?: TVariant[];
990
1062
  }): ProductOptionMatrix<TVariant>;
1063
+ declare function buildProductOptionMatrixFromDetail(detail: ProductDetail): ProductOptionMatrix<ProductDetailVariant>;
991
1064
  declare function getSelectedValueByOptionId<TVariant extends ProductVariantShape = ProductVariantShape>(matrix: ProductOptionMatrix<TVariant>, selectedValueIds: Iterable<unknown>): Map<string, string>;
992
1065
  declare function normalizeSelectedValueIds<TVariant extends ProductVariantShape = ProductVariantShape>(matrix: ProductOptionMatrix<TVariant>, selectedValueIds: Iterable<unknown>): string[];
993
1066
  declare function getAvailableOptionValues<TVariant extends ProductVariantShape = ProductVariantShape>(matrix: ProductOptionMatrix<TVariant>, optionId: string, selectedValueIds: Iterable<unknown>): ProductOptionMatrixValue[];
994
1067
  declare function resolveVariantForSelection<TVariant extends ProductVariantShape = ProductVariantShape>(matrix: ProductOptionMatrix<TVariant>, selectedValueIds: Iterable<unknown>): ProductOptionMatrixVariant<TVariant> | undefined;
1068
+ declare function normalizeProductSelection(detail: ProductDetail, selection?: ProductSelectionInput, options?: ProductSelectionCodecOptions): NormalizedProductSelection;
1069
+ declare function parseProductSelection(detail: ProductDetail, search: string | URLSearchParams | URL | null | undefined, options?: ProductSelectionCodecOptions): NormalizedProductSelection;
1070
+ declare function stringifyProductSelection(detail: ProductDetail, selection?: ProductSelectionInput, options?: ProductSelectionCodecOptions): string;
1071
+ declare function createProductSelectionCodec(detail: ProductDetail, options?: ProductSelectionCodecOptions): {
1072
+ parse: (search: string | URLSearchParams | URL | null | undefined) => NormalizedProductSelection;
1073
+ stringify: (selection?: ProductSelectionInput) => string;
1074
+ };
1075
+ declare function resolveProductSelection(detail: ProductDetail, selection?: ProductSelectionInput, options?: ProductSelectionCodecOptions): ProductSelectionResolution;
995
1076
  declare function buildProductListingProjection(product: ProductListingProductShape | null | undefined, variants: ProductVariantShape[]): ProductListingProjection;
996
1077
  /**
997
1078
  * Builds product-first listing groups for one primary option.
@@ -1044,9 +1125,18 @@ type ProductDetailParams = {
1044
1125
  };
1045
1126
  interface ProductDetailVariantOptionValue {
1046
1127
  optionId: string | number;
1128
+ optionSlug: string;
1047
1129
  valueId: string | number;
1130
+ valueSlug: string;
1048
1131
  value?: string | null;
1049
1132
  }
1133
+ type ProductDetailMedia = string | number | {
1134
+ id?: string | number | null;
1135
+ url?: string | null;
1136
+ alt?: string | null;
1137
+ width?: number | null;
1138
+ height?: number | null;
1139
+ };
1050
1140
  interface ProductDetailVariant {
1051
1141
  id: string | number;
1052
1142
  optionKey: string;
@@ -1058,19 +1148,23 @@ interface ProductDetailVariant {
1058
1148
  stock: number;
1059
1149
  reservedStock: number;
1060
1150
  isUnlimited: boolean;
1061
- thumbnail?: unknown | null;
1062
- images?: unknown[];
1151
+ isActive: boolean;
1152
+ thumbnail?: ProductDetailMedia | null;
1153
+ images?: ProductDetailMedia[];
1063
1154
  optionValues: ProductDetailVariantOptionValue[];
1064
1155
  }
1065
1156
  interface ProductDetailOptionValue {
1066
1157
  id: string | number;
1067
1158
  value: string;
1159
+ slug: string;
1068
1160
  swatchColor?: string | null;
1069
- thumbnail?: unknown | null;
1161
+ thumbnail?: ProductDetailMedia | null;
1162
+ images?: ProductDetailMedia[] | null;
1070
1163
  }
1071
1164
  interface ProductDetailOption {
1072
1165
  id: string | number;
1073
1166
  title: string;
1167
+ slug: string;
1074
1168
  values: ProductDetailOptionValue[];
1075
1169
  }
1076
1170
  interface ProductDetailBrand {
@@ -1106,9 +1200,9 @@ interface ProductDetailListing {
1106
1200
  minCompareAtPrice?: number | null;
1107
1201
  maxCompareAtPrice?: number | null;
1108
1202
  isPriceRange?: boolean | null;
1109
- primaryImage?: unknown | null;
1203
+ primaryImage?: ProductDetailMedia | null;
1110
1204
  availableForSale?: boolean | null;
1111
- selectionHintVariant?: unknown | null;
1205
+ selectionHintVariant?: string | number | null;
1112
1206
  }
1113
1207
  interface ProductDetail {
1114
1208
  product: {
@@ -1145,11 +1239,17 @@ type ProductUpsertOptionValueInput = {
1145
1239
  type ProductUpsertOptionInput = {
1146
1240
  id?: string;
1147
1241
  title: string;
1242
+ slug?: string;
1148
1243
  values: ProductUpsertOptionValueInput[];
1149
1244
  };
1245
+ type ProductUpsertVariantOptionValue = string | {
1246
+ valueSlug?: string;
1247
+ valueId?: string;
1248
+ value?: string;
1249
+ };
1150
1250
  type ProductUpsertVariantInput = {
1151
1251
  id?: string;
1152
- optionValues?: Record<string, string> | string[];
1252
+ optionValues?: Record<string, ProductUpsertVariantOptionValue> | string[];
1153
1253
  sku?: string | null;
1154
1254
  title?: string | null;
1155
1255
  price: number;
@@ -1659,4 +1759,4 @@ declare class ServerClient {
1659
1759
  */
1660
1760
  declare function createServerClient(options: ClientServerConfig): ServerClient;
1661
1761
 
1662
- export { type CustomerAuthResponse as $, type AddItemParams as A, type BanCustomerParams as B, CustomerAuth as C, type ClientMetadata as D, type ClientServerConfig as E, CollectionClient as F, type CollectionDetailQueryParams as G, CollectionHooks as H, type CollectionInfiniteQueryParams as I, CollectionQueryBuilder as J, type CollectionQueryParams as K, type ListingGroupsParams as L, type CommunityBan as M, type CommunityClientOptions as N, type CommunityPost as O, type ProductListingGroupsResponse as P, ConfigError as Q, type RemoveItemParams as R, type StockCheckParams as S, type ConfirmPaymentParams as T, type UpdateItemParams as U, type ValidateDiscountParams as V, type ConfirmPaymentResponse as W, ConflictError as X, type CreateFulfillmentParams as Y, type CreateOrderParams as Z, type CreateReturnParams as _, type CustomerAuthOptions as a, type ServerCommerceClientOptions as a$, CustomerHooks as a0, type CustomerLoginData as a1, type CustomerProfile as a2, type CustomerRefreshResponse as a3, type CustomerRegisterData as a4, type CustomerRegisterResponse as a5, type CustomerSnapshot as a6, type DebugConfig as a7, type DeepPartial as a8, DiscountApi as a9, type ProductListingGroup as aA, type ProductListingGroupSummary as aB, type ProductListingGroupsItem as aC, type ProductListingProductShape as aD, type ProductListingProjection as aE, type ProductOptionMatrix as aF, type ProductOptionMatrixOption as aG, type ProductOptionMatrixValue as aH, type ProductOptionMatrixVariant as aI, type ProductOptionShape as aJ, type ProductOptionValueShape as aK, type ProductVariantShape as aL, QueryHooks as aM, type QueryOptions as aN, RateLimitError as aO, type ReadOnlyQueryBuilder as aP, type RequestOptions as aQ, type RetryConfig as aR, type ReturnItem as aS, type ReturnReason as aT, type ReturnWithRefundParams as aU, SDKError as aV, type ServerApiOptions as aW, ServerClient as aX, ServerCollectionClient as aY, ServerCollectionQueryBuilder as aZ, ServerCommerceClient as a_, type DiscountApiOptions as aa, type ExtractArrayType as ab, type GenerateMetadataOptions as ac, GoneError as ad, type InfiniteQueryOptions as ae, ModerationApi as af, type ModerationApiOptions as ag, NetworkError as ah, NotFoundError as ai, OrderApi as aj, type OrderApiOptions as ak, type PaginationMeta as al, type PayloadMutationResponse as am, PermissionError as an, ProductApi as ao, type ProductApiOptions as ap, type ProductDetailBrand as aq, type ProductDetailCategory as ar, type ProductDetailImage as as, type ProductDetailListing as at, type ProductDetailOption as au, type ProductDetailOptionValue as av, type ProductDetailTag as aw, type ProductDetailVariant as ax, type ProductDetailVariantOptionValue as ay, type ProductDetailVideo as az, type StockCheckResponse as b, ServiceUnavailableError as b0, ShippingApi as b1, type ShippingApiOptions as b2, type StockCheckResult as b3, type SuspenseInfiniteQueryOptions as b4, type SuspenseQueryOptions as b5, TimeoutError as b6, type UnbanCustomerParams as b7, type UpdateFulfillmentParams as b8, type UpdateOrderParams as b9, isServiceUnavailableError as bA, isTimeoutError as bB, isUsageLimitError as bC, isValidationError as bD, normalizeSelectedValueIds as bE, resolveApiUrl as bF, resolveVariantForSelection as bG, type UpdateProfileData as ba, type UpdateReturnParams as bb, type UpdateTransactionParams as bc, UsageLimitError as bd, ValidationError as be, buildProductListingGroupsByOption as bf, buildProductListingProjection as bg, buildProductOptionMatrix as bh, createAuthError as bi, createConflictError as bj, createNotFoundError as bk, createPermissionError as bl, createRateLimitError as bm, createServerClient as bn, getAvailableOptionValues as bo, getSelectedValueByOptionId as bp, isApiError as bq, isAuthError as br, isConfigError as bs, isConflictError as bt, isGoneError as bu, isNetworkError as bv, isNotFoundError as bw, isPermissionError as bx, isRateLimitError as by, isSDKError as bz, type ProductDetailParams as c, type ProductDetail as d, type ApplyDiscountParams as e, type RemoveDiscountParams as f, type ClearCartParams as g, type CheckoutParams as h, type PayloadFindResponse as i, type ValidateDiscountResult as j, type CalculateShippingParams as k, type CalculateShippingResult as l, type ApiQueryOptions as m, type ProductListingGroupsQueryOptions as n, CommunityClient as o, type ReadOnlyQueryHooks as p, ReadOnlyCollectionClient as q, type ClientState as r, type ClientConfig as s, ApiError as t, AuthError as u, BaseApi as v, type BulkImportFulfillmentsParams as w, type BulkImportFulfillmentsResponse as x, CartApi as y, type CartApiOptions as z };
1762
+ export { type CustomerAuthResponse as $, type AddItemParams as A, type BanCustomerParams as B, CustomerAuth as C, type ClientMetadata as D, type ClientServerConfig as E, CollectionClient as F, type CollectionDetailQueryParams as G, CollectionHooks as H, type CollectionInfiniteQueryParams as I, CollectionQueryBuilder as J, type CollectionQueryParams as K, type ListingGroupsParams as L, type CommunityBan as M, type CommunityClientOptions as N, type CommunityPost as O, type ProductListingGroupsResponse as P, ConfigError as Q, type RemoveItemParams as R, type StockCheckParams as S, type ConfirmPaymentParams as T, type UpdateItemParams as U, type ValidateDiscountParams as V, type ConfirmPaymentResponse as W, ConflictError as X, type CreateFulfillmentParams as Y, type CreateOrderParams as Z, type CreateReturnParams as _, type CustomerAuthOptions as a, type ReturnItem as a$, CustomerHooks as a0, type CustomerLoginData as a1, type CustomerProfile as a2, type CustomerRefreshResponse as a3, type CustomerRegisterData as a4, type CustomerRegisterResponse as a5, type CustomerSnapshot as a6, type DebugConfig as a7, type DeepPartial as a8, DiscountApi as a9, type ProductDetailVariant as aA, type ProductDetailVariantOptionValue as aB, type ProductDetailVideo as aC, type ProductListingGroup as aD, type ProductListingGroupSummary as aE, type ProductListingGroupsItem as aF, type ProductListingProductShape as aG, type ProductListingProjection as aH, type ProductOptionMatrix as aI, type ProductOptionMatrixOption as aJ, type ProductOptionMatrixValue as aK, type ProductOptionMatrixVariant as aL, type ProductOptionShape as aM, type ProductOptionValueShape as aN, type ProductSelectionAvailableValue as aO, type ProductSelectionByOptionValue as aP, ProductSelectionCodecError as aQ, type ProductSelectionCodecOptions as aR, type ProductSelectionInput as aS, type ProductSelectionResolution as aT, type ProductVariantShape as aU, QueryHooks as aV, type QueryOptions as aW, RateLimitError as aX, type ReadOnlyQueryBuilder as aY, type RequestOptions as aZ, type RetryConfig as a_, type DiscountApiOptions as aa, type ExtractArrayType as ab, type GenerateMetadataOptions as ac, GoneError as ad, type InfiniteQueryOptions as ae, type LegacyProductSelectionParamEvent as af, ModerationApi as ag, type ModerationApiOptions as ah, NetworkError as ai, type NormalizedProductSelection as aj, NotFoundError as ak, OrderApi as al, type OrderApiOptions as am, type PaginationMeta as an, type PayloadMutationResponse as ao, PermissionError as ap, ProductApi as aq, type ProductApiOptions as ar, type ProductDetailBrand as as, type ProductDetailCategory as at, type ProductDetailImage as au, type ProductDetailListing as av, type ProductDetailMedia as aw, type ProductDetailOption as ax, type ProductDetailOptionValue as ay, type ProductDetailTag as az, type StockCheckResponse as b, type ReturnReason as b0, type ReturnWithRefundParams as b1, SDKError as b2, type ServerApiOptions as b3, ServerClient as b4, ServerCollectionClient as b5, ServerCollectionQueryBuilder as b6, ServerCommerceClient as b7, type ServerCommerceClientOptions as b8, ServiceUnavailableError as b9, getSelectedValueByOptionId as bA, isApiError as bB, isAuthError as bC, isConfigError as bD, isConflictError as bE, isGoneError as bF, isNetworkError as bG, isNotFoundError as bH, isPermissionError as bI, isRateLimitError as bJ, isSDKError as bK, isServiceUnavailableError as bL, isTimeoutError as bM, isUsageLimitError as bN, isValidationError as bO, normalizeProductSelection as bP, normalizeSelectedValueIds as bQ, parseProductSelection as bR, resolveApiUrl as bS, resolveProductSelection as bT, resolveVariantForSelection as bU, stringifyProductSelection as bV, ShippingApi as ba, type ShippingApiOptions as bb, type StockCheckResult as bc, type SuspenseInfiniteQueryOptions as bd, type SuspenseQueryOptions as be, TimeoutError as bf, type UnbanCustomerParams as bg, type UpdateFulfillmentParams as bh, type UpdateOrderParams as bi, type UpdateProfileData as bj, type UpdateReturnParams as bk, type UpdateTransactionParams as bl, UsageLimitError as bm, ValidationError as bn, buildProductListingGroupsByOption as bo, buildProductListingProjection as bp, buildProductOptionMatrix as bq, buildProductOptionMatrixFromDetail as br, createAuthError as bs, createConflictError as bt, createNotFoundError as bu, createPermissionError as bv, createProductSelectionCodec as bw, createRateLimitError as bx, createServerClient as by, getAvailableOptionValues as bz, type ProductDetailParams as c, type ProductDetail as d, type ApplyDiscountParams as e, type RemoveDiscountParams as f, type ClearCartParams as g, type CheckoutParams as h, type PayloadFindResponse as i, type ValidateDiscountResult as j, type CalculateShippingParams as k, type CalculateShippingResult as l, type ApiQueryOptions as m, type ProductListingGroupsQueryOptions as n, CommunityClient as o, type ReadOnlyQueryHooks as p, ReadOnlyCollectionClient as q, type ClientState as r, type ClientConfig as s, ApiError as t, AuthError as u, BaseApi as v, type BulkImportFulfillmentsParams as w, type BulkImportFulfillmentsResponse as x, CartApi as y, type CartApiOptions as z };
package/dist/server.cjs CHANGED
@@ -1395,10 +1395,7 @@ var ProductApi = class extends BaseApi {
1395
1395
  * `product-upsert` tool.
1396
1396
  */
1397
1397
  upsert(params) {
1398
- return this.request(
1399
- "/api/products/upsert",
1400
- params
1401
- );
1398
+ return this.request("/api/products/upsert", params);
1402
1399
  }
1403
1400
  };
1404
1401