@01.software/sdk 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{const-C8UhtzLn.d.cts → const-CEiFBZMW.d.cts} +2 -2
- package/dist/{const-Bs-QcTj0.d.ts → const-R3AyqOHY.d.ts} +2 -2
- package/dist/index.cjs +19 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BaK4zCQ8.d.cts → payload-types-BF8VVFt6.d.cts} +618 -692
- package/dist/{payload-types-BaK4zCQ8.d.ts → payload-types-BF8VVFt6.d.ts} +618 -692
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/{server-CkGfBnSx.d.cts → server-CZrUwqDs.d.cts} +3 -3
- package/dist/{server-DQYWLnkt.d.ts → server-DULueNYi.d.ts} +3 -3
- package/dist/server.cjs +17 -4
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +17 -4
- package/dist/server.js.map +1 -1
- package/dist/{types-DjaaBExv.d.ts → types-CZ1laT6s.d.ts} +1 -1
- package/dist/{types-BH-YBrFs.d.cts → types-lPRgx_rC.d.cts} +1 -1
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/rich-text.cjs +138 -0
- package/dist/ui/rich-text.cjs.map +1 -1
- package/dist/ui/rich-text.d.cts +23 -1
- package/dist/ui/rich-text.d.ts +23 -1
- package/dist/ui/rich-text.js +138 -0
- package/dist/ui/rich-text.js.map +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.d.cts +3 -3
- package/dist/webhook.d.ts +3 -3
- package/package.json +8 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as Cart, e as CartItem, O as Order, f as Product } from './payload-types-
|
|
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-
|
|
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-
|
|
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-
|
|
1
|
+
import { d as Cart, e as CartItem, O as Order, f as Product } from './payload-types-BF8VVFt6.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-BF8VVFt6.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-CZrUwqDs.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-CZrUwqDs.cjs';
|
|
5
5
|
import { QueryClient } from '@tanstack/react-query';
|
|
6
|
-
export { C as CollectionType } from './types-
|
|
7
|
-
import { P as PublicCollection } from './const-
|
|
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-
|
|
6
|
+
export { C as CollectionType } from './types-lPRgx_rC.cjs';
|
|
7
|
+
import { P as PublicCollection } from './const-CEiFBZMW.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-CEiFBZMW.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
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as Cart, e as CartItem, O as Order, f as Product } from './payload-types-
|
|
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-
|
|
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-
|
|
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-
|
|
1
|
+
import { d as Cart, e as CartItem, O as Order, f as Product } from './payload-types-BF8VVFt6.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-BF8VVFt6.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-DULueNYi.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-DULueNYi.js';
|
|
5
5
|
import { QueryClient } from '@tanstack/react-query';
|
|
6
|
-
export { C as CollectionType } from './types-
|
|
7
|
-
import { P as PublicCollection } from './const-
|
|
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-
|
|
6
|
+
export { C as CollectionType } from './types-CZ1laT6s.js';
|
|
7
|
+
import { P as PublicCollection } from './const-R3AyqOHY.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-R3AyqOHY.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
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';
|
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)
|
|
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)
|
|
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
|
|
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
|
-
{
|
|
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",
|