@01.software/sdk 0.25.0 → 0.27.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 (54) hide show
  1. package/README.md +28 -3
  2. package/dist/analytics/react.cjs +249 -0
  3. package/dist/analytics/react.cjs.map +1 -0
  4. package/dist/analytics/react.d.cts +8 -0
  5. package/dist/analytics/react.d.ts +8 -0
  6. package/dist/analytics/react.js +228 -0
  7. package/dist/analytics/react.js.map +1 -0
  8. package/dist/{const-C8UhtzLn.d.cts → const-C0GlmeJ_.d.cts} +6 -6
  9. package/dist/{const-Bs-QcTj0.d.ts → const-D-xucnw4.d.ts} +6 -6
  10. package/dist/{image-TT8lTsk5.d.cts → image-BDz2-AaO.d.cts} +1 -1
  11. package/dist/{image-TT8lTsk5.d.ts → image-BDz2-AaO.d.ts} +1 -1
  12. package/dist/index.cjs +32 -7
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +9 -9
  15. package/dist/index.d.ts +9 -9
  16. package/dist/index.js +32 -7
  17. package/dist/index.js.map +1 -1
  18. package/dist/{payload-types-BaK4zCQ8.d.cts → payload-types-BPvUmPAq.d.cts} +803 -709
  19. package/dist/{payload-types-BaK4zCQ8.d.ts → payload-types-BPvUmPAq.d.ts} +803 -709
  20. package/dist/realtime.d.cts +2 -2
  21. package/dist/realtime.d.ts +2 -2
  22. package/dist/{server-DLdbWJVv.d.cts → server-BINWywT8.d.cts} +1 -1
  23. package/dist/{server-DLdbWJVv.d.ts → server-BINWywT8.d.ts} +1 -1
  24. package/dist/{server-CkGfBnSx.d.cts → server-_zvihptw.d.ts} +27 -4
  25. package/dist/{server-DQYWLnkt.d.ts → server-n3xK4Nks.d.cts} +27 -4
  26. package/dist/server.cjs +25 -4
  27. package/dist/server.cjs.map +1 -1
  28. package/dist/server.d.cts +4 -4
  29. package/dist/server.d.ts +4 -4
  30. package/dist/server.js +25 -4
  31. package/dist/server.js.map +1 -1
  32. package/dist/{types-DjaaBExv.d.ts → types-BLdthWiW.d.ts} +1 -1
  33. package/dist/{types-BH-YBrFs.d.cts → types-DzWNu9pw.d.cts} +1 -1
  34. package/dist/ui/canvas/server.d.cts +1 -1
  35. package/dist/ui/canvas/server.d.ts +1 -1
  36. package/dist/ui/canvas.d.cts +3 -3
  37. package/dist/ui/canvas.d.ts +3 -3
  38. package/dist/ui/form.d.cts +1 -1
  39. package/dist/ui/form.d.ts +1 -1
  40. package/dist/ui/image.d.cts +1 -1
  41. package/dist/ui/image.d.ts +1 -1
  42. package/dist/ui/rich-text.cjs +138 -0
  43. package/dist/ui/rich-text.cjs.map +1 -1
  44. package/dist/ui/rich-text.d.cts +23 -1
  45. package/dist/ui/rich-text.d.ts +23 -1
  46. package/dist/ui/rich-text.js +138 -0
  47. package/dist/ui/rich-text.js.map +1 -1
  48. package/dist/ui/video.d.cts +2 -2
  49. package/dist/ui/video.d.ts +2 -2
  50. package/dist/{video-DbLL8yuc.d.cts → video-WR_TFO9a.d.cts} +1 -1
  51. package/dist/{video-DbLL8yuc.d.ts → video-WR_TFO9a.d.ts} +1 -1
  52. package/dist/webhook.d.cts +3 -3
  53. package/dist/webhook.d.ts +3 -3
  54. package/package.json +41 -24
package/dist/index.d.cts CHANGED
@@ -1,15 +1,15 @@
1
- import { d as Cart, e as CartItem, O as Order, f as Product } from './payload-types-BaK4zCQ8.cjs';
2
- export { A as Article, g as ArticleAuthor, h as ArticleCategory, i as ArticleTag, D as Document, I as Image, P as Post, j as PostCategory, k as ProductVariant, T as Tenant, V as Video } from './payload-types-BaK4zCQ8.cjs';
3
- import { C as CustomerAuth, a as CustomerAuthOptions, S as StockCheckParams, b as StockCheckResponse, L as ListingGroupsParams, P as ProductListingGroupsResponse, A as AddItemParams, U as UpdateItemParams, R as RemoveItemParams, c as ApplyDiscountParams, d as RemoveDiscountParams, e as ClearCartParams, f as CheckoutParams, g as PayloadFindResponse, V as ValidateDiscountParams, h as ValidateDiscountResult, i as CalculateShippingParams, j as CalculateShippingResult, k as ApiQueryOptions, l as ProductListingGroupsQueryOptions, m as ClientConfig, n as CommunityClient, o as ReadOnlyQueryHooks, p as ReadOnlyCollectionClient, q as ClientState } from './server-CkGfBnSx.cjs';
4
- export { v as ApiError, z as AuthError, aV as BanCustomerParams, af as BaseApi, ap as BulkImportFulfillmentsParams, aq as BulkImportFulfillmentsResponse, aB as CartApi, aC as CartApiOptions, ac as ClientMetadata, ab as ClientServerConfig, aL as CollectionClient, b3 as CollectionDetailQueryParams, b9 as CollectionHooks, b4 as CollectionInfiniteQueryParams, aI as CollectionQueryBuilder, b2 as CollectionQueryParams, aU as CommunityBan, aQ as CommunityClientOptions, aR as CommunityPost, w as ConfigError, H as ConflictError, au as CreateFulfillmentParams, an as CreateOrderParams, ar as CreateReturnParams, aX as CustomerAuthResponse, ba as CustomerHooks, b0 as CustomerLoginData, a_ as CustomerProfile, aY as CustomerRefreshResponse, a$ as CustomerRegisterData, aZ as CustomerRegisterResponse, ak as CustomerSnapshot, r as DebugConfig, D as DeepPartial, ax as DiscountApi, ay as DiscountApiOptions, E as ExtractArrayType, aN as GenerateMetadataOptions, G as GoneError, b7 as InfiniteQueryOptions, aS as ModerationApi, aT as ModerationApiOptions, N as NetworkError, F as NotFoundError, ai as OrderApi, aj as OrderApiOptions, ad as PaginationMeta, ae as PayloadMutationResponse, B as PermissionError, aD as ProductApi, aE as ProductApiOptions, bl as ProductListingGroup, aF as ProductListingGroupSummary, aG as ProductListingGroupsItem, bf as ProductListingProductShape, bk as ProductListingProjection, bj as ProductOptionMatrix, bh as ProductOptionMatrixOption, bg as ProductOptionMatrixValue, bi as ProductOptionMatrixVariant, bd as ProductOptionShape, bc as ProductOptionValueShape, be as ProductVariantShape, bb as QueryHooks, b5 as QueryOptions, I as RateLimitError, aK as ReadOnlyQueryBuilder, ah as RequestOptions, s as RetryConfig, am as ReturnItem, al as ReturnReason, av as ReturnWithRefundParams, t as SDKError, ag as ServerApiOptions, a9 as ServerClient, a9 as ServerClientType, aM as ServerCollectionClient, aJ as ServerCollectionQueryBuilder, aO as ServerCommerceClient, aP as ServerCommerceClientOptions, x as ServiceUnavailableError, az as ShippingApi, aA as ShippingApiOptions, aH as StockCheckResult, b8 as SuspenseInfiniteQueryOptions, b6 as SuspenseQueryOptions, T as TimeoutError, aW as UnbanCustomerParams, aw as UpdateFulfillmentParams, ao as UpdateOrderParams, b1 as UpdateProfileData, as as UpdateReturnParams, at as UpdateTransactionParams, y as UsageLimitError, u as ValidationError, bs as buildProductListingGroupsByOption, br as buildProductListingProjection, bm as buildProductOptionMatrix, a3 as createAuthError, a6 as createConflictError, a5 as createNotFoundError, a4 as createPermissionError, a7 as createRateLimitError, a8 as createServerClient, bp as getAvailableOptionValues, bn as getSelectedValueByOptionId, O as isApiError, _ as isAuthError, Q as isConfigError, a1 as isConflictError, X as isGoneError, K as isNetworkError, a0 as isNotFoundError, $ as isPermissionError, a2 as isRateLimitError, J as isSDKError, Y as isServiceUnavailableError, W as isTimeoutError, Z as isUsageLimitError, M as isValidationError, bo as normalizeSelectedValueIds, aa as resolveApiUrl, bq as resolveVariantForSelection } from './server-CkGfBnSx.cjs';
1
+ import { d as Cart, e as CartItem, O as Order, f as Product } from './payload-types-BPvUmPAq.cjs';
2
+ export { A as Article, g as ArticleAuthor, h as ArticleCategory, i as ArticleTag, D as Document, I as Image, P as Post, j as PostCategory, k as ProductVariant, T as Tenant, V as Video } from './payload-types-BPvUmPAq.cjs';
3
+ import { C as CustomerAuth, a as CustomerAuthOptions, S as StockCheckParams, b as StockCheckResponse, L as ListingGroupsParams, P as ProductListingGroupsResponse, A as AddItemParams, U as UpdateItemParams, R as RemoveItemParams, c as ApplyDiscountParams, d as RemoveDiscountParams, e as ClearCartParams, f as CheckoutParams, g as PayloadFindResponse, V as ValidateDiscountParams, h as ValidateDiscountResult, i as CalculateShippingParams, j as CalculateShippingResult, k as ApiQueryOptions, l as ProductListingGroupsQueryOptions, m as CommunityClient, n as ReadOnlyQueryHooks, o as ReadOnlyCollectionClient, p as ClientState, q as ClientConfig } from './server-n3xK4Nks.cjs';
4
+ export { r as ApiError, s as AuthError, B as BanCustomerParams, t as BaseApi, u as BulkImportFulfillmentsParams, v as BulkImportFulfillmentsResponse, w as CartApi, x as CartApiOptions, y as ClientMetadata, z as ClientServerConfig, D as CollectionClient, E as CollectionDetailQueryParams, F as CollectionHooks, G as CollectionInfiniteQueryParams, H as CollectionQueryBuilder, I as CollectionQueryParams, J as CommunityBan, K as CommunityClientOptions, M as CommunityPost, N as ConfigError, O as ConfirmPaymentParams, Q as ConfirmPaymentResponse, T as ConflictError, W as CreateFulfillmentParams, X as CreateOrderParams, Y as CreateReturnParams, Z as CustomerAuthResponse, _ as CustomerHooks, $ as CustomerLoginData, a0 as CustomerProfile, a1 as CustomerRefreshResponse, a2 as CustomerRegisterData, a3 as CustomerRegisterResponse, a4 as CustomerSnapshot, a5 as DebugConfig, a6 as DeepPartial, a7 as DiscountApi, a8 as DiscountApiOptions, a9 as ExtractArrayType, aa as GenerateMetadataOptions, ab as GoneError, ac as InfiniteQueryOptions, ad as ModerationApi, ae as ModerationApiOptions, af as NetworkError, ag as NotFoundError, ah as OrderApi, ai as OrderApiOptions, aj as PaginationMeta, ak as PayloadMutationResponse, al as PermissionError, am as ProductApi, an as ProductApiOptions, ao as ProductListingGroup, ap as ProductListingGroupSummary, aq as ProductListingGroupsItem, ar as ProductListingProductShape, as as ProductListingProjection, at as ProductOptionMatrix, au as ProductOptionMatrixOption, av as ProductOptionMatrixValue, aw as ProductOptionMatrixVariant, ax as ProductOptionShape, ay as ProductOptionValueShape, az as ProductVariantShape, aA as QueryHooks, aB as QueryOptions, aC as RateLimitError, aD as ReadOnlyQueryBuilder, aE as RequestOptions, aF as RetryConfig, aG as ReturnItem, aH as ReturnReason, aI as ReturnWithRefundParams, aJ as SDKError, aK as ServerApiOptions, aL as ServerClient, aL as ServerClientType, aM as ServerCollectionClient, aN as ServerCollectionQueryBuilder, aO as ServerCommerceClient, aP as ServerCommerceClientOptions, aQ as ServiceUnavailableError, aR as ShippingApi, aS as ShippingApiOptions, aT as StockCheckResult, aU as SuspenseInfiniteQueryOptions, aV as SuspenseQueryOptions, aW as TimeoutError, aX as UnbanCustomerParams, aY as UpdateFulfillmentParams, aZ as UpdateOrderParams, a_ as UpdateProfileData, a$ as UpdateReturnParams, b0 as UpdateTransactionParams, b1 as UsageLimitError, b2 as ValidationError, b3 as buildProductListingGroupsByOption, b4 as buildProductListingProjection, b5 as buildProductOptionMatrix, b6 as createAuthError, b7 as createConflictError, b8 as createNotFoundError, b9 as createPermissionError, ba as createRateLimitError, bb as createServerClient, bc as getAvailableOptionValues, bd as getSelectedValueByOptionId, be as isApiError, bf as isAuthError, bg as isConfigError, bh as isConflictError, bi as isGoneError, bj as isNetworkError, bk as isNotFoundError, bl as isPermissionError, bm as isRateLimitError, bn as isSDKError, bo as isServiceUnavailableError, bp as isTimeoutError, bq as isUsageLimitError, br as isValidationError, bs as normalizeSelectedValueIds, bt as resolveApiUrl, bu as resolveVariantForSelection } from './server-n3xK4Nks.cjs';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
- export { C as CollectionType } from './types-BH-YBrFs.cjs';
7
- import { P as PublicCollection } from './const-C8UhtzLn.cjs';
8
- export { b as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, e as InternalCollection, d as SERVER_COLLECTIONS, c as SERVER_ONLY_COLLECTIONS, S as ServerCollection, a as ServerOnlyCollection } from './const-C8UhtzLn.cjs';
6
+ export { C as CollectionType } from './types-DzWNu9pw.cjs';
7
+ import { P as PublicCollection } from './const-C0GlmeJ_.cjs';
8
+ export { C as COLLECTIONS, a as Collection, I as INTERNAL_COLLECTIONS, b as InternalCollection, S as SERVER_COLLECTIONS, c as SERVER_ONLY_COLLECTIONS, d as ServerCollection, e as ServerOnlyCollection } from './const-C0GlmeJ_.cjs';
9
9
  export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
10
10
  export { CUSTOMER_PASSWORD_RESET_OPERATION, CustomerAuthWebhookEvent, CustomerAuthWebhookHandlers, CustomerPasswordResetWebhookData, CustomerPasswordResetWebhookEvent, WebhookEvent, WebhookHandler, WebhookOperation, WebhookOptions, createCustomerAuthWebhookHandler, createTypedWebhookHandler, handleWebhook, isCustomerPasswordResetWebhookEvent, isValidWebhookEvent } from './webhook.cjs';
11
- export { b as IMAGE_SIZES, I as ImageData, a as ImagePalette, f as ImagePlaceholderOptions, d as getImageLqip, e as getImagePalette, h as getImagePlaceholderStyle, c as getImageSrcSet, g as getImageUrl } from './image-TT8lTsk5.cjs';
12
- export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from './video-DbLL8yuc.cjs';
11
+ 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';
12
+ 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';
13
13
  export { Analytics, AnalyticsConfig, createAnalytics } from './analytics.cjs';
14
14
  import 'payload';
15
15
  import 'next';
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { d as Cart, e as CartItem, O as Order, f as Product } from './payload-types-BaK4zCQ8.js';
2
- export { A as Article, g as ArticleAuthor, h as ArticleCategory, i as ArticleTag, D as Document, I as Image, P as Post, j as PostCategory, k as ProductVariant, T as Tenant, V as Video } from './payload-types-BaK4zCQ8.js';
3
- import { C as CustomerAuth, a as CustomerAuthOptions, S as StockCheckParams, b as StockCheckResponse, L as ListingGroupsParams, P as ProductListingGroupsResponse, A as AddItemParams, U as UpdateItemParams, R as RemoveItemParams, c as ApplyDiscountParams, d as RemoveDiscountParams, e as ClearCartParams, f as CheckoutParams, g as PayloadFindResponse, V as ValidateDiscountParams, h as ValidateDiscountResult, i as CalculateShippingParams, j as CalculateShippingResult, k as ApiQueryOptions, l as ProductListingGroupsQueryOptions, m as ClientConfig, n as CommunityClient, o as ReadOnlyQueryHooks, p as ReadOnlyCollectionClient, q as ClientState } from './server-DQYWLnkt.js';
4
- export { v as ApiError, z as AuthError, aV as BanCustomerParams, af as BaseApi, ap as BulkImportFulfillmentsParams, aq as BulkImportFulfillmentsResponse, aB as CartApi, aC as CartApiOptions, ac as ClientMetadata, ab as ClientServerConfig, aL as CollectionClient, b3 as CollectionDetailQueryParams, b9 as CollectionHooks, b4 as CollectionInfiniteQueryParams, aI as CollectionQueryBuilder, b2 as CollectionQueryParams, aU as CommunityBan, aQ as CommunityClientOptions, aR as CommunityPost, w as ConfigError, H as ConflictError, au as CreateFulfillmentParams, an as CreateOrderParams, ar as CreateReturnParams, aX as CustomerAuthResponse, ba as CustomerHooks, b0 as CustomerLoginData, a_ as CustomerProfile, aY as CustomerRefreshResponse, a$ as CustomerRegisterData, aZ as CustomerRegisterResponse, ak as CustomerSnapshot, r as DebugConfig, D as DeepPartial, ax as DiscountApi, ay as DiscountApiOptions, E as ExtractArrayType, aN as GenerateMetadataOptions, G as GoneError, b7 as InfiniteQueryOptions, aS as ModerationApi, aT as ModerationApiOptions, N as NetworkError, F as NotFoundError, ai as OrderApi, aj as OrderApiOptions, ad as PaginationMeta, ae as PayloadMutationResponse, B as PermissionError, aD as ProductApi, aE as ProductApiOptions, bl as ProductListingGroup, aF as ProductListingGroupSummary, aG as ProductListingGroupsItem, bf as ProductListingProductShape, bk as ProductListingProjection, bj as ProductOptionMatrix, bh as ProductOptionMatrixOption, bg as ProductOptionMatrixValue, bi as ProductOptionMatrixVariant, bd as ProductOptionShape, bc as ProductOptionValueShape, be as ProductVariantShape, bb as QueryHooks, b5 as QueryOptions, I as RateLimitError, aK as ReadOnlyQueryBuilder, ah as RequestOptions, s as RetryConfig, am as ReturnItem, al as ReturnReason, av as ReturnWithRefundParams, t as SDKError, ag as ServerApiOptions, a9 as ServerClient, a9 as ServerClientType, aM as ServerCollectionClient, aJ as ServerCollectionQueryBuilder, aO as ServerCommerceClient, aP as ServerCommerceClientOptions, x as ServiceUnavailableError, az as ShippingApi, aA as ShippingApiOptions, aH as StockCheckResult, b8 as SuspenseInfiniteQueryOptions, b6 as SuspenseQueryOptions, T as TimeoutError, aW as UnbanCustomerParams, aw as UpdateFulfillmentParams, ao as UpdateOrderParams, b1 as UpdateProfileData, as as UpdateReturnParams, at as UpdateTransactionParams, y as UsageLimitError, u as ValidationError, bs as buildProductListingGroupsByOption, br as buildProductListingProjection, bm as buildProductOptionMatrix, a3 as createAuthError, a6 as createConflictError, a5 as createNotFoundError, a4 as createPermissionError, a7 as createRateLimitError, a8 as createServerClient, bp as getAvailableOptionValues, bn as getSelectedValueByOptionId, O as isApiError, _ as isAuthError, Q as isConfigError, a1 as isConflictError, X as isGoneError, K as isNetworkError, a0 as isNotFoundError, $ as isPermissionError, a2 as isRateLimitError, J as isSDKError, Y as isServiceUnavailableError, W as isTimeoutError, Z as isUsageLimitError, M as isValidationError, bo as normalizeSelectedValueIds, aa as resolveApiUrl, bq as resolveVariantForSelection } from './server-DQYWLnkt.js';
1
+ import { d as Cart, e as CartItem, O as Order, f as Product } from './payload-types-BPvUmPAq.js';
2
+ export { A as Article, g as ArticleAuthor, h as ArticleCategory, i as ArticleTag, D as Document, I as Image, P as Post, j as PostCategory, k as ProductVariant, T as Tenant, V as Video } from './payload-types-BPvUmPAq.js';
3
+ import { C as CustomerAuth, a as CustomerAuthOptions, S as StockCheckParams, b as StockCheckResponse, L as ListingGroupsParams, P as ProductListingGroupsResponse, A as AddItemParams, U as UpdateItemParams, R as RemoveItemParams, c as ApplyDiscountParams, d as RemoveDiscountParams, e as ClearCartParams, f as CheckoutParams, g as PayloadFindResponse, V as ValidateDiscountParams, h as ValidateDiscountResult, i as CalculateShippingParams, j as CalculateShippingResult, k as ApiQueryOptions, l as ProductListingGroupsQueryOptions, m as CommunityClient, n as ReadOnlyQueryHooks, o as ReadOnlyCollectionClient, p as ClientState, q as ClientConfig } from './server-_zvihptw.js';
4
+ export { r as ApiError, s as AuthError, B as BanCustomerParams, t as BaseApi, u as BulkImportFulfillmentsParams, v as BulkImportFulfillmentsResponse, w as CartApi, x as CartApiOptions, y as ClientMetadata, z as ClientServerConfig, D as CollectionClient, E as CollectionDetailQueryParams, F as CollectionHooks, G as CollectionInfiniteQueryParams, H as CollectionQueryBuilder, I as CollectionQueryParams, J as CommunityBan, K as CommunityClientOptions, M as CommunityPost, N as ConfigError, O as ConfirmPaymentParams, Q as ConfirmPaymentResponse, T as ConflictError, W as CreateFulfillmentParams, X as CreateOrderParams, Y as CreateReturnParams, Z as CustomerAuthResponse, _ as CustomerHooks, $ as CustomerLoginData, a0 as CustomerProfile, a1 as CustomerRefreshResponse, a2 as CustomerRegisterData, a3 as CustomerRegisterResponse, a4 as CustomerSnapshot, a5 as DebugConfig, a6 as DeepPartial, a7 as DiscountApi, a8 as DiscountApiOptions, a9 as ExtractArrayType, aa as GenerateMetadataOptions, ab as GoneError, ac as InfiniteQueryOptions, ad as ModerationApi, ae as ModerationApiOptions, af as NetworkError, ag as NotFoundError, ah as OrderApi, ai as OrderApiOptions, aj as PaginationMeta, ak as PayloadMutationResponse, al as PermissionError, am as ProductApi, an as ProductApiOptions, ao as ProductListingGroup, ap as ProductListingGroupSummary, aq as ProductListingGroupsItem, ar as ProductListingProductShape, as as ProductListingProjection, at as ProductOptionMatrix, au as ProductOptionMatrixOption, av as ProductOptionMatrixValue, aw as ProductOptionMatrixVariant, ax as ProductOptionShape, ay as ProductOptionValueShape, az as ProductVariantShape, aA as QueryHooks, aB as QueryOptions, aC as RateLimitError, aD as ReadOnlyQueryBuilder, aE as RequestOptions, aF as RetryConfig, aG as ReturnItem, aH as ReturnReason, aI as ReturnWithRefundParams, aJ as SDKError, aK as ServerApiOptions, aL as ServerClient, aL as ServerClientType, aM as ServerCollectionClient, aN as ServerCollectionQueryBuilder, aO as ServerCommerceClient, aP as ServerCommerceClientOptions, aQ as ServiceUnavailableError, aR as ShippingApi, aS as ShippingApiOptions, aT as StockCheckResult, aU as SuspenseInfiniteQueryOptions, aV as SuspenseQueryOptions, aW as TimeoutError, aX as UnbanCustomerParams, aY as UpdateFulfillmentParams, aZ as UpdateOrderParams, a_ as UpdateProfileData, a$ as UpdateReturnParams, b0 as UpdateTransactionParams, b1 as UsageLimitError, b2 as ValidationError, b3 as buildProductListingGroupsByOption, b4 as buildProductListingProjection, b5 as buildProductOptionMatrix, b6 as createAuthError, b7 as createConflictError, b8 as createNotFoundError, b9 as createPermissionError, ba as createRateLimitError, bb as createServerClient, bc as getAvailableOptionValues, bd as getSelectedValueByOptionId, be as isApiError, bf as isAuthError, bg as isConfigError, bh as isConflictError, bi as isGoneError, bj as isNetworkError, bk as isNotFoundError, bl as isPermissionError, bm as isRateLimitError, bn as isSDKError, bo as isServiceUnavailableError, bp as isTimeoutError, bq as isUsageLimitError, br as isValidationError, bs as normalizeSelectedValueIds, bt as resolveApiUrl, bu as resolveVariantForSelection } from './server-_zvihptw.js';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
- export { C as CollectionType } from './types-DjaaBExv.js';
7
- import { P as PublicCollection } from './const-Bs-QcTj0.js';
8
- export { b as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, e as InternalCollection, d as SERVER_COLLECTIONS, c as SERVER_ONLY_COLLECTIONS, S as ServerCollection, a as ServerOnlyCollection } from './const-Bs-QcTj0.js';
6
+ export { C as CollectionType } from './types-BLdthWiW.js';
7
+ import { P as PublicCollection } from './const-D-xucnw4.js';
8
+ export { C as COLLECTIONS, a as Collection, I as INTERNAL_COLLECTIONS, b as InternalCollection, S as SERVER_COLLECTIONS, c as SERVER_ONLY_COLLECTIONS, d as ServerCollection, e as ServerOnlyCollection } from './const-D-xucnw4.js';
9
9
  export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.js';
10
10
  export { CUSTOMER_PASSWORD_RESET_OPERATION, CustomerAuthWebhookEvent, CustomerAuthWebhookHandlers, CustomerPasswordResetWebhookData, CustomerPasswordResetWebhookEvent, WebhookEvent, WebhookHandler, WebhookOperation, WebhookOptions, createCustomerAuthWebhookHandler, createTypedWebhookHandler, handleWebhook, isCustomerPasswordResetWebhookEvent, isValidWebhookEvent } from './webhook.js';
11
- export { b as IMAGE_SIZES, I as ImageData, a as ImagePalette, f as ImagePlaceholderOptions, d as getImageLqip, e as getImagePalette, h as getImagePlaceholderStyle, c as getImageSrcSet, g as getImageUrl } from './image-TT8lTsk5.js';
12
- export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from './video-DbLL8yuc.js';
11
+ 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';
12
+ 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';
13
13
  export { Analytics, AnalyticsConfig, createAnalytics } from './analytics.js';
14
14
  import 'payload';
15
15
  import 'next';
package/dist/index.js CHANGED
@@ -455,14 +455,23 @@ function debugLog(debug, type, message, data) {
455
455
  }
456
456
  }
457
457
  function getErrorSuggestion(status) {
458
- if (status === 400) return "The request data failed validation. Check field values and types.";
458
+ if (status === 400)
459
+ return "The request data failed validation. Check field values and types.";
459
460
  if (status === 401) return "Please check your authentication credentials.";
460
- if (status === 403) return "Access denied. Check your credentials or permissions.";
461
+ if (status === 403)
462
+ return "Access denied. Check your credentials or permissions.";
461
463
  if (status === 404) return "The requested resource was not found.";
462
464
  if (status === 422) return "The request data failed validation.";
463
465
  if (status >= 500) return "A server error occurred. Please try again later.";
464
466
  return void 0;
465
467
  }
468
+ function isUsageLimitExceededResponse(response) {
469
+ if (response.status !== 429) return false;
470
+ const limit = parseInt(response.headers.get("X-Usage-Limit") || "", 10);
471
+ const current = parseInt(response.headers.get("X-Usage-Current") || "", 10);
472
+ if (!Number.isFinite(limit) || !Number.isFinite(current)) return false;
473
+ return response.headers.get("X-Usage-Exceeded") === "true" || current > limit;
474
+ }
466
475
  async function parseErrorBody(response) {
467
476
  const fallback = {
468
477
  errorMessage: `HTTP ${response.status}: ${response.statusText}`,
@@ -662,7 +671,7 @@ async function httpFetch(url, options) {
662
671
  headers: Object.fromEntries(response.headers.entries())
663
672
  });
664
673
  if (!response.ok) {
665
- if (response.status === 429 && response.headers.get("X-Usage-Limit")) {
674
+ if (isUsageLimitExceededResponse(response)) {
666
675
  const limit = parseInt(
667
676
  response.headers.get("X-Usage-Limit") || "0",
668
677
  10
@@ -679,7 +688,11 @@ async function httpFetch(url, options) {
679
688
  createUsageLimitError(
680
689
  `Monthly API usage limit exceeded (${current.toLocaleString()}/${limit.toLocaleString()})`,
681
690
  { limit, current, remaining },
682
- { url, method: requestInit.method || "GET", attempt: attempt + 1 },
691
+ {
692
+ url,
693
+ method: requestInit.method || "GET",
694
+ attempt: attempt + 1
695
+ },
683
696
  "Monthly API call limit exceeded. Please upgrade your plan.",
684
697
  "Upgrade your tenant plan to increase the monthly API call limit."
685
698
  ),
@@ -1124,6 +1137,7 @@ var INTERNAL_COLLECTIONS = [
1124
1137
  "email-logs",
1125
1138
  "api-usage",
1126
1139
  "tenant-analytics-daily",
1140
+ "tenant-web-analytics-config",
1127
1141
  "analytics-event-schemas",
1128
1142
  "subscriptions",
1129
1143
  "billing-history",
@@ -1131,6 +1145,7 @@ var INTERNAL_COLLECTIONS = [
1131
1145
  "api-keys",
1132
1146
  "personal-access-tokens",
1133
1147
  "tenant-entitlements",
1148
+ "tenant-purge-jobs",
1134
1149
  "direct-upload-sessions",
1135
1150
  "webhook-events",
1136
1151
  "webhook-deliveries",
@@ -1209,8 +1224,6 @@ var COLLECTIONS = [
1209
1224
  "reaction-types",
1210
1225
  "bookmarks",
1211
1226
  "post-categories",
1212
- "reports",
1213
- "community-bans",
1214
1227
  // Events
1215
1228
  "event-calendars",
1216
1229
  "events",
@@ -1218,7 +1231,11 @@ var COLLECTIONS = [
1218
1231
  "event-occurrences",
1219
1232
  "event-tags"
1220
1233
  ];
1221
- var SERVER_ONLY_COLLECTIONS = ["customer-groups"];
1234
+ var SERVER_ONLY_COLLECTIONS = [
1235
+ "customer-groups",
1236
+ "reports",
1237
+ "community-bans"
1238
+ ];
1222
1239
  var SERVER_COLLECTIONS = [
1223
1240
  ...COLLECTIONS,
1224
1241
  ...SERVER_ONLY_COLLECTIONS
@@ -1913,6 +1930,13 @@ var OrderApi = class extends BaseApi {
1913
1930
  updateTransaction(params) {
1914
1931
  return this.request("/api/transactions/update", params);
1915
1932
  }
1933
+ confirmPayment(params) {
1934
+ return this.request(
1935
+ "/api/orders/confirm-payment",
1936
+ params,
1937
+ params.providerEventId ? { headers: { "X-Idempotency-Key": params.providerEventId } } : void 0
1938
+ );
1939
+ }
1916
1940
  checkout(params) {
1917
1941
  return this.request("/api/orders/checkout", params);
1918
1942
  }
@@ -1978,6 +2002,7 @@ var ServerCommerceClient = class {
1978
2002
  create: orderApi.createOrder.bind(orderApi),
1979
2003
  update: orderApi.updateOrder.bind(orderApi),
1980
2004
  updateTransaction: orderApi.updateTransaction.bind(orderApi),
2005
+ confirmPayment: orderApi.confirmPayment.bind(orderApi),
1981
2006
  createFulfillment: orderApi.createFulfillment.bind(orderApi),
1982
2007
  updateFulfillment: orderApi.updateFulfillment.bind(orderApi),
1983
2008
  bulkImportFulfillments: orderApi.bulkImportFulfillments.bind(orderApi),