@01.software/sdk 0.26.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.
- package/README.md +28 -3
- package/dist/analytics/react.cjs +249 -0
- package/dist/analytics/react.cjs.map +1 -0
- package/dist/analytics/react.d.cts +8 -0
- package/dist/analytics/react.d.ts +8 -0
- package/dist/analytics/react.js +228 -0
- package/dist/analytics/react.js.map +1 -0
- package/dist/{const-CEiFBZMW.d.cts → const-C0GlmeJ_.d.cts} +5 -5
- package/dist/{const-R3AyqOHY.d.ts → const-D-xucnw4.d.ts} +5 -5
- package/dist/{image-TT8lTsk5.d.cts → image-BDz2-AaO.d.cts} +1 -1
- package/dist/{image-TT8lTsk5.d.ts → image-BDz2-AaO.d.ts} +1 -1
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BF8VVFt6.d.cts → payload-types-BPvUmPAq.d.cts} +221 -53
- package/dist/{payload-types-BF8VVFt6.d.ts → payload-types-BPvUmPAq.d.ts} +221 -53
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/{server-DLdbWJVv.d.cts → server-BINWywT8.d.cts} +1 -1
- package/dist/{server-DLdbWJVv.d.ts → server-BINWywT8.d.ts} +1 -1
- package/dist/{server-CZrUwqDs.d.cts → server-_zvihptw.d.ts} +27 -4
- package/dist/{server-DULueNYi.d.ts → server-n3xK4Nks.d.cts} +27 -4
- package/dist/server.cjs +8 -0
- 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 +8 -0
- package/dist/server.js.map +1 -1
- package/dist/{types-CZ1laT6s.d.ts → types-BLdthWiW.d.ts} +1 -1
- package/dist/{types-lPRgx_rC.d.cts → types-DzWNu9pw.d.cts} +1 -1
- package/dist/ui/canvas/server.d.cts +1 -1
- package/dist/ui/canvas/server.d.ts +1 -1
- package/dist/ui/canvas.d.cts +3 -3
- package/dist/ui/canvas.d.ts +3 -3
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/image.d.cts +1 -1
- package/dist/ui/image.d.ts +1 -1
- package/dist/ui/video.d.cts +2 -2
- package/dist/ui/video.d.ts +2 -2
- package/dist/{video-DbLL8yuc.d.cts → video-WR_TFO9a.d.cts} +1 -1
- package/dist/{video-DbLL8yuc.d.ts → video-WR_TFO9a.d.ts} +1 -1
- package/dist/webhook.d.cts +3 -3
- package/dist/webhook.d.ts +3 -3
- package/package.json +42 -26
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-
|
|
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
|
|
4
|
-
export {
|
|
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-
|
|
7
|
-
import { P as PublicCollection } from './const-
|
|
8
|
-
export {
|
|
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 {
|
|
12
|
-
export {
|
|
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-
|
|
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
|
|
4
|
-
export {
|
|
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-
|
|
7
|
-
import { P as PublicCollection } from './const-
|
|
8
|
-
export {
|
|
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 {
|
|
12
|
-
export {
|
|
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
|
@@ -1224,8 +1224,6 @@ var COLLECTIONS = [
|
|
|
1224
1224
|
"reaction-types",
|
|
1225
1225
|
"bookmarks",
|
|
1226
1226
|
"post-categories",
|
|
1227
|
-
"reports",
|
|
1228
|
-
"community-bans",
|
|
1229
1227
|
// Events
|
|
1230
1228
|
"event-calendars",
|
|
1231
1229
|
"events",
|
|
@@ -1233,7 +1231,11 @@ var COLLECTIONS = [
|
|
|
1233
1231
|
"event-occurrences",
|
|
1234
1232
|
"event-tags"
|
|
1235
1233
|
];
|
|
1236
|
-
var SERVER_ONLY_COLLECTIONS = [
|
|
1234
|
+
var SERVER_ONLY_COLLECTIONS = [
|
|
1235
|
+
"customer-groups",
|
|
1236
|
+
"reports",
|
|
1237
|
+
"community-bans"
|
|
1238
|
+
];
|
|
1237
1239
|
var SERVER_COLLECTIONS = [
|
|
1238
1240
|
...COLLECTIONS,
|
|
1239
1241
|
...SERVER_ONLY_COLLECTIONS
|
|
@@ -1928,6 +1930,13 @@ var OrderApi = class extends BaseApi {
|
|
|
1928
1930
|
updateTransaction(params) {
|
|
1929
1931
|
return this.request("/api/transactions/update", params);
|
|
1930
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
|
+
}
|
|
1931
1940
|
checkout(params) {
|
|
1932
1941
|
return this.request("/api/orders/checkout", params);
|
|
1933
1942
|
}
|
|
@@ -1993,6 +2002,7 @@ var ServerCommerceClient = class {
|
|
|
1993
2002
|
create: orderApi.createOrder.bind(orderApi),
|
|
1994
2003
|
update: orderApi.updateOrder.bind(orderApi),
|
|
1995
2004
|
updateTransaction: orderApi.updateTransaction.bind(orderApi),
|
|
2005
|
+
confirmPayment: orderApi.confirmPayment.bind(orderApi),
|
|
1996
2006
|
createFulfillment: orderApi.createFulfillment.bind(orderApi),
|
|
1997
2007
|
updateFulfillment: orderApi.updateFulfillment.bind(orderApi),
|
|
1998
2008
|
bulkImportFulfillments: orderApi.bulkImportFulfillments.bind(orderApi),
|