@01.software/sdk 0.31.0 → 0.32.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.
Files changed (52) hide show
  1. package/README.md +87 -29
  2. package/dist/analytics/react.cjs.map +1 -1
  3. package/dist/analytics/react.js.map +1 -1
  4. package/dist/analytics.cjs.map +1 -1
  5. package/dist/analytics.js.map +1 -1
  6. package/dist/client.cjs +10 -46
  7. package/dist/client.cjs.map +1 -1
  8. package/dist/client.d.cts +6 -6
  9. package/dist/client.d.ts +6 -6
  10. package/dist/client.js +10 -46
  11. package/dist/client.js.map +1 -1
  12. package/dist/{collection-client-DFXXz0vk.d.cts → collection-client-CORhppPb.d.cts} +3 -3
  13. package/dist/{collection-client-ByzY3hWK.d.ts → collection-client-DPGXnhoF.d.ts} +3 -3
  14. package/dist/{const-AytzliEu.d.cts → const-Brk2Ff0q.d.cts} +1 -1
  15. package/dist/{const-BGCP-OJL.d.ts → const-DcY2_z9O.d.ts} +1 -1
  16. package/dist/index.cjs +58 -47
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +7 -7
  19. package/dist/index.d.ts +7 -7
  20. package/dist/index.js +58 -47
  21. package/dist/index.js.map +1 -1
  22. package/dist/{payload-types-Wa4-eC6x.d.cts → payload-types-DVK1QCeU.d.cts} +8 -2
  23. package/dist/{payload-types-Wa4-eC6x.d.ts → payload-types-DVK1QCeU.d.ts} +8 -2
  24. package/dist/query.cjs.map +1 -1
  25. package/dist/query.d.cts +16 -16
  26. package/dist/query.d.ts +16 -16
  27. package/dist/query.js.map +1 -1
  28. package/dist/realtime.cjs.map +1 -1
  29. package/dist/realtime.d.cts +2 -2
  30. package/dist/realtime.d.ts +2 -2
  31. package/dist/realtime.js.map +1 -1
  32. package/dist/server.cjs +34 -1
  33. package/dist/server.cjs.map +1 -1
  34. package/dist/server.d.cts +99 -7
  35. package/dist/server.d.ts +99 -7
  36. package/dist/server.js +34 -1
  37. package/dist/server.js.map +1 -1
  38. package/dist/{types-CmLG-7RL.d.cts → types-ByMrR_Z_.d.cts} +1 -1
  39. package/dist/{types-DChFjQGz.d.cts → types-CAkWqIr6.d.cts} +41 -8
  40. package/dist/{types-BX2mqDf6.d.ts → types-CYMSBkJC.d.ts} +41 -8
  41. package/dist/{types-CVA10VC-.d.ts → types-DUPC7Xn6.d.ts} +1 -1
  42. package/dist/ui/form.d.cts +1 -1
  43. package/dist/ui/form.d.ts +1 -1
  44. package/dist/ui/video.d.cts +1 -1
  45. package/dist/ui/video.d.ts +1 -1
  46. package/dist/webhook.cjs +48 -1
  47. package/dist/webhook.cjs.map +1 -1
  48. package/dist/webhook.d.cts +73 -4
  49. package/dist/webhook.d.ts +73 -4
  50. package/dist/webhook.js +48 -1
  51. package/dist/webhook.js.map +1 -1
  52. package/package.json +3 -3
package/dist/index.d.cts CHANGED
@@ -1,10 +1,10 @@
1
- import { d as ClientConfig, h as RootClient } from './types-DChFjQGz.cjs';
2
- export { k as AddItemParams, A as ApiQueryOptions, l as ApplyDiscountParams, B as BaseApi, m as BulkImportFulfillmentsParams, n as BulkImportFulfillmentsResponse, o as CalculateShippingParams, p as CalculateShippingResult, q as CartApi, r as CartApiOptions, s as CheckoutParams, t as ClearCartParams, e as ClientMetadata, c as ClientState, C as CommerceClient, u as CommerceClientOptions, a as CommunityClient, v as CommunityClientOptions, w as CommunityPost, x as CompatibilityProductSelectionParamEvent, y as ConfirmPaymentParams, z as ConfirmPaymentResponse, F as CreateFulfillmentParams, G as CreateOrderParams, H as CreateReturnParams, I as CustomerAuth, J as CustomerAuthOptions, K as CustomerAuthResponse, L as CustomerLoginData, b as CustomerNamespace, M as CustomerProfile, N as CustomerRefreshResponse, O as CustomerRegisterData, Q as CustomerRegisterResponse, T as CustomerSnapshot, D as DebugConfig, f as DeepPartial, U as DiscountApi, V as DiscountApiOptions, E as ExtractArrayType, X as LegacyProductSelectionParamEvent, Y as ListingGroupsParams, Z as NormalizedProductSelection, _ as OrderApi, $ as OrderApiOptions, P as PayloadFindResponse, g as PayloadMutationResponse, a0 as ProductApi, a1 as ProductApiOptions, a2 as ProductDetail, a3 as ProductDetailBrand, a4 as ProductDetailCategory, a5 as ProductDetailImage, a6 as ProductDetailImageMedia, a7 as ProductDetailListing, a8 as ProductDetailMedia, a9 as ProductDetailOption, aa as ProductDetailOptionValue, ab as ProductDetailParams, ac as ProductDetailTag, ad as ProductDetailVariant, ae as ProductDetailVariantOptionValue, af as ProductDetailVideo, ag as ProductHrefGroup, ah as ProductHrefOptions, ai as ProductHrefProduct, aj as ProductListingCard, ak as ProductListingCardPriceRange, al as ProductListingGroup, am as ProductListingGroupSummary, an as ProductListingGroupsItem, ao as ProductListingGroupsProduct, ap as ProductListingGroupsResponse, aq as ProductListingProductShape, ar as ProductListingProjection, as as ProductListingSwatch, at as ProductOptionMatrix, au as ProductOptionMatrixOption, av as ProductOptionMatrixValue, aw as ProductOptionMatrixVariant, ax as ProductOptionShape, ay as ProductOptionValueShape, az as ProductSelectionAvailableValue, aA as ProductSelectionByOptionValue, aB as ProductSelectionCodecError, aC as ProductSelectionCodecOptions, aD as ProductSelectionInput, aE as ProductSelectionResolution, aF as ProductSelectionResolutionContext, aG as ProductVariantShape, aH as RemoveDiscountParams, aI as RemoveItemParams, aJ as RequestOptions, R as RetryConfig, aK as ReturnItem, aL as ReturnReason, aM as ReturnWithRefundParams, i as RootCollectionClient, j as RootReadOnlyQueryBuilder, aN as ServerApiOptions, aO as ShippingApi, aP as ShippingApiOptions, S as Sort, aQ as StockCheckParams, aR as StockCheckResponse, aS as StockCheckResult, aT as UpdateFulfillmentParams, aU as UpdateItemParams, aV as UpdateOrderParams, aW as UpdateProfileData, aX as UpdateReturnParams, aY as UpdateTransactionParams, aZ as ValidateDiscountParams, a_ as ValidateDiscountResult, W as Where, a$ as buildProductHref, b0 as buildProductListingCard, b1 as buildProductListingGroupsByOption, b2 as buildProductListingProjection, b3 as buildProductOptionMatrix, b4 as buildProductOptionMatrixFromDetail, b5 as createProductSelectionCodec, b6 as getAvailableOptionValues, b7 as getProductSelectionImages, b8 as getSelectedValueByOptionId, b9 as normalizeProductSelection, ba as normalizeProductSelectionFromMatrix, bb as normalizeSelectedValueIds, bc as parseProductSelection, bd as resolveProductSelection, be as resolveProductSelectionFromMatrix, bf as resolveVariantForSelection, bg as stringifyProductSelection } from './types-DChFjQGz.cjs';
3
- import { P as Product } from './payload-types-Wa4-eC6x.cjs';
4
- export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, i as Cart, j as CartItem, D as Document, I as Image, O as Order, c as Post, k as PostCategory, l as ProductVariant, T as Tenant, V as Video } from './payload-types-Wa4-eC6x.cjs';
5
- export { C as CollectionType, P as Product, a as ProductCollection } from './types-CmLG-7RL.cjs';
6
- export { CUSTOMER_PASSWORD_RESET_OPERATION, CustomerAuthWebhookEvent, CustomerAuthWebhookHandlers, CustomerPasswordResetWebhookData, CustomerPasswordResetWebhookEvent, WebhookEvent, WebhookHandler, WebhookOperation, WebhookOptions, createCustomerAuthWebhookHandler, createTypedWebhookHandler, handleWebhook, isCustomerPasswordResetWebhookEvent, isValidWebhookEvent } from './webhook.cjs';
7
- export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection, S as SERVER_COLLECTIONS, b as SERVER_ONLY_COLLECTIONS } from './const-AytzliEu.cjs';
1
+ import { d as ClientConfig, h as RootClient } from './types-CAkWqIr6.cjs';
2
+ export { k as AddItemParams, A as ApiQueryOptions, l as ApplyDiscountParams, B as BaseApi, m as BulkImportFulfillmentsParams, n as BulkImportFulfillmentsResponse, o as CalculateShippingParams, p as CalculateShippingResult, q as CartApi, r as CartApiOptions, s as CheckoutParams, t as ClearCartParams, e as ClientMetadata, c as ClientState, C as CommerceClient, u as CommerceClientOptions, a as CommunityClient, v as CommunityClientOptions, w as CommunityPost, x as CompatibilityProductSelectionParamEvent, y as ConfirmPaymentParams, z as ConfirmPaymentResponse, F as CreateFulfillmentParams, G as CreateOrderItem, H as CreateOrderParams, I as CreateReturnParams, J as CustomerAuth, K as CustomerAuthOptions, L as CustomerAuthResponse, M as CustomerLoginData, b as CustomerNamespace, N as CustomerProfile, O as CustomerRefreshResponse, Q as CustomerRegisterData, T as CustomerRegisterResponse, U as CustomerSnapshot, D as DebugConfig, f as DeepPartial, V as DiscountApi, X as DiscountApiOptions, E as ExtractArrayType, Y as LegacyProductSelectionParamEvent, Z as ListingGroupingState, _ as ListingGroupsParams, $ as NormalizedProductSelection, a0 as OrderApi, a1 as OrderApiOptions, P as PayloadFindResponse, g as PayloadMutationResponse, a2 as ProductApi, a3 as ProductApiOptions, a4 as ProductDetail, a5 as ProductDetailBrand, a6 as ProductDetailCategory, a7 as ProductDetailImage, a8 as ProductDetailImageMedia, a9 as ProductDetailListing, aa as ProductDetailMedia, ab as ProductDetailOption, ac as ProductDetailOptionValue, ad as ProductDetailParams, ae as ProductDetailTag, af as ProductDetailVariant, ag as ProductDetailVariantOptionValue, ah as ProductDetailVideo, ai as ProductHrefGroup, aj as ProductHrefOptions, ak as ProductHrefProduct, al as ProductListingCard, am as ProductListingCardPriceRange, an as ProductListingGroup, ao as ProductListingGroupSummary, ap as ProductListingGroupVariant, aq as ProductListingGroupsItem, ar as ProductListingGroupsProduct, as as ProductListingGroupsResponse, at as ProductListingProductShape, au as ProductListingProjection, av as ProductListingSwatch, aw as ProductOptionMatrix, ax as ProductOptionMatrixOption, ay as ProductOptionMatrixValue, az as ProductOptionMatrixVariant, aA as ProductOptionShape, aB as ProductOptionValueShape, aC as ProductSelectionAvailableValue, aD as ProductSelectionByOptionValue, aE as ProductSelectionCodecError, aF as ProductSelectionCodecOptions, aG as ProductSelectionInput, aH as ProductSelectionResolution, aI as ProductSelectionResolutionContext, aJ as ProductVariantShape, aK as RemoveDiscountParams, aL as RemoveItemParams, aM as RequestOptions, R as RetryConfig, aN as ReturnItem, aO as ReturnReason, aP as ReturnWithRefundParams, i as RootCollectionClient, j as RootReadOnlyQueryBuilder, aQ as ServerApiOptions, aR as ShippingApi, aS as ShippingApiOptions, S as Sort, aT as StockCheckParams, aU as StockCheckResponse, aV as StockCheckResult, aW as UpdateFulfillmentParams, aX as UpdateItemParams, aY as UpdateOrderParams, aZ as UpdateProfileData, a_ as UpdateReturnParams, a$ as UpdateTransactionParams, b0 as ValidateDiscountParams, b1 as ValidateDiscountResult, W as Where, b2 as buildProductHref, b3 as buildProductListingCard, b4 as buildProductListingGroupsByOption, b5 as buildProductListingProjection, b6 as buildProductOptionMatrix, b7 as buildProductOptionMatrixFromDetail, b8 as createProductSelectionCodec, b9 as getAvailableOptionValues, ba as getProductSelectionImages, bb as getSelectedValueByOptionId, bc as normalizeProductSelection, bd as normalizeProductSelectionFromMatrix, be as normalizeSelectedValueIds, bf as parseProductSelection, bg as resolveProductSelection, bh as resolveProductSelectionFromMatrix, bi as resolveVariantForSelection, bj as stringifyProductSelection } from './types-CAkWqIr6.cjs';
3
+ import { P as Product } from './payload-types-DVK1QCeU.cjs';
4
+ export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, i as Cart, j as CartItem, D as Document, I as Image, O as Order, c as Post, k as PostCategory, l as ProductVariant, T as Tenant, V as Video } from './payload-types-DVK1QCeU.cjs';
5
+ export { C as CollectionType, P as Product, a as ProductCollection } from './types-ByMrR_Z_.cjs';
6
+ export { CUSTOMER_PASSWORD_RESET_OPERATION, CollectionWebhookOperation, CustomerAuthWebhookEvent, CustomerAuthWebhookHandlers, CustomerPasswordResetWebhookData, CustomerPasswordResetWebhookEvent, ORDER_CHANGED_EVENT_TYPE, OrderChangedWebhookEvent, WebhookChange, WebhookEvent, WebhookHandler, WebhookKnownOperation, WebhookOperation, WebhookOptions, WebhookOrderChange, WebhookOrderMoved, WebhookOrderScope, createCustomerAuthWebhookHandler, createTypedWebhookHandler, handleWebhook, isCustomerPasswordResetWebhookEvent, isOrderChangedWebhookEvent, isValidWebhookEvent, isWebhookCollection, isWebhookOperation } from './webhook.cjs';
7
+ export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection, S as SERVER_COLLECTIONS, b as SERVER_ONLY_COLLECTIONS } from './const-Brk2Ff0q.cjs';
8
8
  export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
9
9
  export { a as IMAGE_SIZES, I as ImageData, b as ImagePalette, c as ImagePlaceholderOptions, g as getImageLqip, d as getImagePalette, e as getImagePlaceholderStyle, f as getImageSrcSet, h as getImageUrl } from './image-BDz2-AaO.cjs';
10
10
  export { V as VideoGifOptions, a as VideoThumbnailOptions, g as getVideoGif, b as getVideoMp4Url, c as getVideoStoryboard, d as getVideoStreamUrl, e as getVideoThumbnail } from './video-WR_TFO9a.cjs';
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { d as ClientConfig, h as RootClient } from './types-BX2mqDf6.js';
2
- export { k as AddItemParams, A as ApiQueryOptions, l as ApplyDiscountParams, B as BaseApi, m as BulkImportFulfillmentsParams, n as BulkImportFulfillmentsResponse, o as CalculateShippingParams, p as CalculateShippingResult, q as CartApi, r as CartApiOptions, s as CheckoutParams, t as ClearCartParams, e as ClientMetadata, c as ClientState, C as CommerceClient, u as CommerceClientOptions, a as CommunityClient, v as CommunityClientOptions, w as CommunityPost, x as CompatibilityProductSelectionParamEvent, y as ConfirmPaymentParams, z as ConfirmPaymentResponse, F as CreateFulfillmentParams, G as CreateOrderParams, H as CreateReturnParams, I as CustomerAuth, J as CustomerAuthOptions, K as CustomerAuthResponse, L as CustomerLoginData, b as CustomerNamespace, M as CustomerProfile, N as CustomerRefreshResponse, O as CustomerRegisterData, Q as CustomerRegisterResponse, T as CustomerSnapshot, D as DebugConfig, f as DeepPartial, U as DiscountApi, V as DiscountApiOptions, E as ExtractArrayType, X as LegacyProductSelectionParamEvent, Y as ListingGroupsParams, Z as NormalizedProductSelection, _ as OrderApi, $ as OrderApiOptions, P as PayloadFindResponse, g as PayloadMutationResponse, a0 as ProductApi, a1 as ProductApiOptions, a2 as ProductDetail, a3 as ProductDetailBrand, a4 as ProductDetailCategory, a5 as ProductDetailImage, a6 as ProductDetailImageMedia, a7 as ProductDetailListing, a8 as ProductDetailMedia, a9 as ProductDetailOption, aa as ProductDetailOptionValue, ab as ProductDetailParams, ac as ProductDetailTag, ad as ProductDetailVariant, ae as ProductDetailVariantOptionValue, af as ProductDetailVideo, ag as ProductHrefGroup, ah as ProductHrefOptions, ai as ProductHrefProduct, aj as ProductListingCard, ak as ProductListingCardPriceRange, al as ProductListingGroup, am as ProductListingGroupSummary, an as ProductListingGroupsItem, ao as ProductListingGroupsProduct, ap as ProductListingGroupsResponse, aq as ProductListingProductShape, ar as ProductListingProjection, as as ProductListingSwatch, at as ProductOptionMatrix, au as ProductOptionMatrixOption, av as ProductOptionMatrixValue, aw as ProductOptionMatrixVariant, ax as ProductOptionShape, ay as ProductOptionValueShape, az as ProductSelectionAvailableValue, aA as ProductSelectionByOptionValue, aB as ProductSelectionCodecError, aC as ProductSelectionCodecOptions, aD as ProductSelectionInput, aE as ProductSelectionResolution, aF as ProductSelectionResolutionContext, aG as ProductVariantShape, aH as RemoveDiscountParams, aI as RemoveItemParams, aJ as RequestOptions, R as RetryConfig, aK as ReturnItem, aL as ReturnReason, aM as ReturnWithRefundParams, i as RootCollectionClient, j as RootReadOnlyQueryBuilder, aN as ServerApiOptions, aO as ShippingApi, aP as ShippingApiOptions, S as Sort, aQ as StockCheckParams, aR as StockCheckResponse, aS as StockCheckResult, aT as UpdateFulfillmentParams, aU as UpdateItemParams, aV as UpdateOrderParams, aW as UpdateProfileData, aX as UpdateReturnParams, aY as UpdateTransactionParams, aZ as ValidateDiscountParams, a_ as ValidateDiscountResult, W as Where, a$ as buildProductHref, b0 as buildProductListingCard, b1 as buildProductListingGroupsByOption, b2 as buildProductListingProjection, b3 as buildProductOptionMatrix, b4 as buildProductOptionMatrixFromDetail, b5 as createProductSelectionCodec, b6 as getAvailableOptionValues, b7 as getProductSelectionImages, b8 as getSelectedValueByOptionId, b9 as normalizeProductSelection, ba as normalizeProductSelectionFromMatrix, bb as normalizeSelectedValueIds, bc as parseProductSelection, bd as resolveProductSelection, be as resolveProductSelectionFromMatrix, bf as resolveVariantForSelection, bg as stringifyProductSelection } from './types-BX2mqDf6.js';
3
- import { P as Product } from './payload-types-Wa4-eC6x.js';
4
- export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, i as Cart, j as CartItem, D as Document, I as Image, O as Order, c as Post, k as PostCategory, l as ProductVariant, T as Tenant, V as Video } from './payload-types-Wa4-eC6x.js';
5
- export { C as CollectionType, P as Product, a as ProductCollection } from './types-CVA10VC-.js';
6
- export { CUSTOMER_PASSWORD_RESET_OPERATION, CustomerAuthWebhookEvent, CustomerAuthWebhookHandlers, CustomerPasswordResetWebhookData, CustomerPasswordResetWebhookEvent, WebhookEvent, WebhookHandler, WebhookOperation, WebhookOptions, createCustomerAuthWebhookHandler, createTypedWebhookHandler, handleWebhook, isCustomerPasswordResetWebhookEvent, isValidWebhookEvent } from './webhook.js';
7
- export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection, S as SERVER_COLLECTIONS, b as SERVER_ONLY_COLLECTIONS } from './const-BGCP-OJL.js';
1
+ import { d as ClientConfig, h as RootClient } from './types-CYMSBkJC.js';
2
+ export { k as AddItemParams, A as ApiQueryOptions, l as ApplyDiscountParams, B as BaseApi, m as BulkImportFulfillmentsParams, n as BulkImportFulfillmentsResponse, o as CalculateShippingParams, p as CalculateShippingResult, q as CartApi, r as CartApiOptions, s as CheckoutParams, t as ClearCartParams, e as ClientMetadata, c as ClientState, C as CommerceClient, u as CommerceClientOptions, a as CommunityClient, v as CommunityClientOptions, w as CommunityPost, x as CompatibilityProductSelectionParamEvent, y as ConfirmPaymentParams, z as ConfirmPaymentResponse, F as CreateFulfillmentParams, G as CreateOrderItem, H as CreateOrderParams, I as CreateReturnParams, J as CustomerAuth, K as CustomerAuthOptions, L as CustomerAuthResponse, M as CustomerLoginData, b as CustomerNamespace, N as CustomerProfile, O as CustomerRefreshResponse, Q as CustomerRegisterData, T as CustomerRegisterResponse, U as CustomerSnapshot, D as DebugConfig, f as DeepPartial, V as DiscountApi, X as DiscountApiOptions, E as ExtractArrayType, Y as LegacyProductSelectionParamEvent, Z as ListingGroupingState, _ as ListingGroupsParams, $ as NormalizedProductSelection, a0 as OrderApi, a1 as OrderApiOptions, P as PayloadFindResponse, g as PayloadMutationResponse, a2 as ProductApi, a3 as ProductApiOptions, a4 as ProductDetail, a5 as ProductDetailBrand, a6 as ProductDetailCategory, a7 as ProductDetailImage, a8 as ProductDetailImageMedia, a9 as ProductDetailListing, aa as ProductDetailMedia, ab as ProductDetailOption, ac as ProductDetailOptionValue, ad as ProductDetailParams, ae as ProductDetailTag, af as ProductDetailVariant, ag as ProductDetailVariantOptionValue, ah as ProductDetailVideo, ai as ProductHrefGroup, aj as ProductHrefOptions, ak as ProductHrefProduct, al as ProductListingCard, am as ProductListingCardPriceRange, an as ProductListingGroup, ao as ProductListingGroupSummary, ap as ProductListingGroupVariant, aq as ProductListingGroupsItem, ar as ProductListingGroupsProduct, as as ProductListingGroupsResponse, at as ProductListingProductShape, au as ProductListingProjection, av as ProductListingSwatch, aw as ProductOptionMatrix, ax as ProductOptionMatrixOption, ay as ProductOptionMatrixValue, az as ProductOptionMatrixVariant, aA as ProductOptionShape, aB as ProductOptionValueShape, aC as ProductSelectionAvailableValue, aD as ProductSelectionByOptionValue, aE as ProductSelectionCodecError, aF as ProductSelectionCodecOptions, aG as ProductSelectionInput, aH as ProductSelectionResolution, aI as ProductSelectionResolutionContext, aJ as ProductVariantShape, aK as RemoveDiscountParams, aL as RemoveItemParams, aM as RequestOptions, R as RetryConfig, aN as ReturnItem, aO as ReturnReason, aP as ReturnWithRefundParams, i as RootCollectionClient, j as RootReadOnlyQueryBuilder, aQ as ServerApiOptions, aR as ShippingApi, aS as ShippingApiOptions, S as Sort, aT as StockCheckParams, aU as StockCheckResponse, aV as StockCheckResult, aW as UpdateFulfillmentParams, aX as UpdateItemParams, aY as UpdateOrderParams, aZ as UpdateProfileData, a_ as UpdateReturnParams, a$ as UpdateTransactionParams, b0 as ValidateDiscountParams, b1 as ValidateDiscountResult, W as Where, b2 as buildProductHref, b3 as buildProductListingCard, b4 as buildProductListingGroupsByOption, b5 as buildProductListingProjection, b6 as buildProductOptionMatrix, b7 as buildProductOptionMatrixFromDetail, b8 as createProductSelectionCodec, b9 as getAvailableOptionValues, ba as getProductSelectionImages, bb as getSelectedValueByOptionId, bc as normalizeProductSelection, bd as normalizeProductSelectionFromMatrix, be as normalizeSelectedValueIds, bf as parseProductSelection, bg as resolveProductSelection, bh as resolveProductSelectionFromMatrix, bi as resolveVariantForSelection, bj as stringifyProductSelection } from './types-CYMSBkJC.js';
3
+ import { P as Product } from './payload-types-DVK1QCeU.js';
4
+ export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, i as Cart, j as CartItem, D as Document, I as Image, O as Order, c as Post, k as PostCategory, l as ProductVariant, T as Tenant, V as Video } from './payload-types-DVK1QCeU.js';
5
+ export { C as CollectionType, P as Product, a as ProductCollection } from './types-DUPC7Xn6.js';
6
+ export { CUSTOMER_PASSWORD_RESET_OPERATION, CollectionWebhookOperation, CustomerAuthWebhookEvent, CustomerAuthWebhookHandlers, CustomerPasswordResetWebhookData, CustomerPasswordResetWebhookEvent, ORDER_CHANGED_EVENT_TYPE, OrderChangedWebhookEvent, WebhookChange, WebhookEvent, WebhookHandler, WebhookKnownOperation, WebhookOperation, WebhookOptions, WebhookOrderChange, WebhookOrderMoved, WebhookOrderScope, createCustomerAuthWebhookHandler, createTypedWebhookHandler, handleWebhook, isCustomerPasswordResetWebhookEvent, isOrderChangedWebhookEvent, isValidWebhookEvent, isWebhookCollection, isWebhookOperation } from './webhook.js';
7
+ export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection, S as SERVER_COLLECTIONS, b as SERVER_ONLY_COLLECTIONS } from './const-DcY2_z9O.js';
8
8
  export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.js';
9
9
  export { a as IMAGE_SIZES, I as ImageData, b as ImagePalette, c as ImagePlaceholderOptions, g as getImageLqip, d as getImagePalette, e as getImagePlaceholderStyle, f as getImageSrcSet, h as getImageUrl } from './image-BDz2-AaO.js';
10
10
  export { V as VideoGifOptions, a as VideoThumbnailOptions, g as getVideoGif, b as getVideoMp4Url, c as getVideoStoryboard, d as getVideoStreamUrl, e as getVideoThumbnail } from './video-WR_TFO9a.js';
package/dist/index.js CHANGED
@@ -1226,7 +1226,7 @@ var CustomerAuth = class {
1226
1226
  );
1227
1227
  return data.customer ?? null;
1228
1228
  } catch (error) {
1229
- if (error instanceof ApiError && error.status === 401) {
1229
+ if (error instanceof SDKError && error.status === 401) {
1230
1230
  this.setToken(null);
1231
1231
  return null;
1232
1232
  }
@@ -1321,51 +1321,15 @@ var CustomerAuth = class {
1321
1321
  if (!headers.has("Content-Type") && init.body) {
1322
1322
  headers.set("Content-Type", "application/json");
1323
1323
  }
1324
- const controller = new AbortController();
1325
- const timeoutId = setTimeout(() => controller.abort(), DEFAULT_TIMEOUT2);
1326
- let res;
1327
- try {
1328
- res = await fetch(`${this.baseUrl}${path}`, {
1329
- ...init,
1330
- headers,
1331
- signal: controller.signal
1332
- });
1333
- } catch (error) {
1334
- clearTimeout(timeoutId);
1335
- if (error instanceof Error && error.name === "AbortError") {
1336
- throw new TimeoutError(`Request timed out after ${DEFAULT_TIMEOUT2}ms`, {
1337
- url: path,
1338
- timeout: DEFAULT_TIMEOUT2
1339
- });
1340
- }
1341
- throw new NetworkError(
1342
- error instanceof Error ? error.message : "Network request failed",
1343
- void 0,
1344
- { url: path },
1345
- "Network connection failed.",
1346
- "Please check your internet connection and try again."
1347
- );
1348
- }
1349
- clearTimeout(timeoutId);
1350
- if (!res.ok) {
1351
- const body = await res.json().catch(() => ({}));
1352
- throw new ApiError(
1353
- body.error || `HTTP ${res.status}`,
1354
- res.status,
1355
- body.details,
1356
- body.error
1357
- );
1358
- }
1359
- try {
1360
- return await res.json();
1361
- } catch {
1362
- throw new ApiError(
1363
- "Invalid JSON response from server",
1364
- res.status,
1365
- void 0,
1366
- "INVALID_RESPONSE"
1367
- );
1368
- }
1324
+ const response = await httpFetch(path, {
1325
+ ...init,
1326
+ apiUrl: this.baseUrl,
1327
+ publishableKey: this.publishableKey,
1328
+ headers,
1329
+ timeout: DEFAULT_TIMEOUT2,
1330
+ retry: { maxRetries: 0 }
1331
+ });
1332
+ return parseApiResponse(response, path);
1369
1333
  }
1370
1334
  };
1371
1335
 
@@ -1702,7 +1666,7 @@ var ProductApi = class extends BaseApi {
1702
1666
  /**
1703
1667
  * Fetch full product detail by slug or id.
1704
1668
  * Returns `null` on 404 regardless of reason (`not_found` / `not_published` /
1705
- * `tenant_mismatch` / `feature_disabled`). For the reason behind a null,
1669
+ * `feature_disabled`). For the reason behind a null,
1706
1670
  * inspect `client.lastRequestId` against backend logs.
1707
1671
  */
1708
1672
  async detail(params) {
@@ -1725,11 +1689,54 @@ var ProductApi = class extends BaseApi {
1725
1689
  };
1726
1690
 
1727
1691
  // src/core/webhook/index.ts
1692
+ var ORDER_CHANGED_EVENT_TYPE = "collection.orderChanged";
1728
1693
  function isValidWebhookEvent(data) {
1729
1694
  if (typeof data !== "object" || data === null) return false;
1730
1695
  const obj = data;
1731
1696
  return typeof obj.collection === "string" && typeof obj.operation === "string" && obj.operation.length > 0 && typeof obj.data === "object" && obj.data !== null;
1732
1697
  }
1698
+ function isStringOrNumber(value) {
1699
+ return typeof value === "string" || typeof value === "number";
1700
+ }
1701
+ function isWebhookOrderScope(value) {
1702
+ if (!isRecord(value)) return false;
1703
+ if (value.kind === "collection") {
1704
+ return typeof value.collection === "string";
1705
+ }
1706
+ if (value.kind === "join") {
1707
+ return typeof value.collection === "string" && typeof value.field === "string" && isStringOrNumber(value.id);
1708
+ }
1709
+ return false;
1710
+ }
1711
+ function isWebhookOrderMoved(value) {
1712
+ if (!isRecord(value)) return false;
1713
+ return typeof value.collection === "string" && isStringOrNumber(value.id) && (value.relatedCollection === void 0 || typeof value.relatedCollection === "string") && (value.relatedId === void 0 || isStringOrNumber(value.relatedId));
1714
+ }
1715
+ function hasOptionalOrderValue(value, key) {
1716
+ return value[key] === void 0 || value[key] === null || typeof value[key] === "string";
1717
+ }
1718
+ function isWebhookOrderChange(value) {
1719
+ if (!isRecord(value)) return false;
1720
+ return value.type === "order" && value.source === "payload-orderable" && (value.orderableFieldName === void 0 || typeof value.orderableFieldName === "string") && hasOptionalOrderValue(value, "previousOrder") && hasOptionalOrderValue(value, "nextOrder") && isWebhookOrderScope(value.scope) && isWebhookOrderMoved(value.moved);
1721
+ }
1722
+ function isOrderChangedWebhookEvent(event) {
1723
+ if (!isValidWebhookEvent(event) || event.operation !== "update" || event.eventType !== ORDER_CHANGED_EVENT_TYPE || !isWebhookOrderChange(event.change)) {
1724
+ return false;
1725
+ }
1726
+ if (event.collection !== event.change.scope.collection) {
1727
+ return false;
1728
+ }
1729
+ if (event.change.scope.kind === "collection" && event.change.moved.collection !== event.change.scope.collection) {
1730
+ return false;
1731
+ }
1732
+ return true;
1733
+ }
1734
+ function isWebhookCollection(event, collection) {
1735
+ return isValidWebhookEvent(event) && event.collection === collection;
1736
+ }
1737
+ function isWebhookOperation(event, operation) {
1738
+ return isValidWebhookEvent(event) && event.operation === operation;
1739
+ }
1733
1740
  var CUSTOMER_PASSWORD_RESET_OPERATION = "password-reset";
1734
1741
  function isRecord(value) {
1735
1742
  return typeof value === "object" && value !== null;
@@ -3506,6 +3513,7 @@ export {
3506
3513
  INTERNAL_COLLECTIONS,
3507
3514
  NetworkError,
3508
3515
  NotFoundError,
3516
+ ORDER_CHANGED_EVENT_TYPE,
3509
3517
  OrderApi,
3510
3518
  PermissionError,
3511
3519
  ProductApi,
@@ -3560,6 +3568,7 @@ export {
3560
3568
  isGoneError,
3561
3569
  isNetworkError,
3562
3570
  isNotFoundError,
3571
+ isOrderChangedWebhookEvent,
3563
3572
  isPermissionError,
3564
3573
  isRateLimitError,
3565
3574
  isSDKError,
@@ -3568,6 +3577,8 @@ export {
3568
3577
  isUsageLimitError,
3569
3578
  isValidWebhookEvent,
3570
3579
  isValidationError,
3580
+ isWebhookCollection,
3581
+ isWebhookOperation,
3571
3582
  normalizeProductSelection,
3572
3583
  normalizeProductSelectionFromMatrix,
3573
3584
  normalizeSelectedValueIds,