@01.software/sdk 0.43.0 → 0.45.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/CHANGELOG.md +375 -2
- package/MIGRATION.md +89 -10
- package/README.md +451 -109
- package/dist/{server-nXOezi4b.d.cts → catalog-mappers-sIshKNb3.d.cts} +14 -3
- package/dist/{server-nXOezi4b.d.ts → catalog-mappers-sIshKNb3.d.ts} +14 -3
- package/dist/client.cjs +2680 -345
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +10 -7
- package/dist/client.d.ts +10 -7
- package/dist/client.js +2680 -345
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-U70KizLf.d.cts → collection-client-BSo7VXQE.d.cts} +8 -5
- package/dist/{collection-client-gWsA7BVP.d.ts → collection-client-Ckfusuee.d.ts} +8 -5
- package/dist/{const-_WWHU-gX.d.ts → const-BAG0MH0u.d.cts} +13 -10
- package/dist/{const-BBynifk0.d.cts → const-CaPq2AE4.d.ts} +13 -10
- package/dist/errors.cjs +74 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +38 -1
- package/dist/errors.d.ts +38 -1
- package/dist/errors.js +74 -1
- package/dist/errors.js.map +1 -1
- package/dist/{index-DPi5NWU8.d.ts → index-BNICJxBL.d.ts} +4 -4
- package/dist/{index-Dg4Y6Aq7.d.cts → index-YGrZrxNn.d.cts} +4 -4
- package/dist/index.cjs +2741 -368
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -19
- package/dist/index.d.ts +18 -19
- package/dist/index.js +2741 -368
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-DLxkB7Mv.d.cts → payload-types-CJZuXcgF.d.cts} +6873 -4208
- package/dist/{payload-types-DLxkB7Mv.d.ts → payload-types-CJZuXcgF.d.ts} +6873 -4208
- package/dist/query.cjs +550 -101
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +43 -45
- package/dist/query.d.ts +43 -45
- package/dist/query.js +550 -101
- package/dist/query.js.map +1 -1
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/realtime.js.map +1 -1
- package/dist/server.cjs +2252 -444
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +11 -10
- package/dist/server.d.ts +11 -10
- package/dist/server.js +2252 -444
- package/dist/server.js.map +1 -1
- package/dist/storefront-cache.cjs +65 -1
- package/dist/storefront-cache.cjs.map +1 -1
- package/dist/storefront-cache.js +65 -1
- package/dist/storefront-cache.js.map +1 -1
- package/dist/types-BC6rVmJa.d.ts +47 -0
- package/dist/{types-B9lGhZlB.d.ts → types-BlOvjoTX.d.ts} +1095 -504
- package/dist/{types-Bpx5sYKo.d.cts → types-C4WuJfw7.d.cts} +1095 -504
- package/dist/types-D5p7-m1l.d.cts +47 -0
- package/dist/ui/canvas/server.cjs +244 -2
- package/dist/ui/canvas/server.cjs.map +1 -1
- package/dist/ui/canvas/server.d.cts +27 -1
- package/dist/ui/canvas/server.d.ts +27 -1
- package/dist/ui/canvas/server.js +244 -2
- package/dist/ui/canvas/server.js.map +1 -1
- package/dist/ui/canvas.cjs +419 -103
- package/dist/ui/canvas.cjs.map +1 -1
- package/dist/ui/canvas.d.cts +19 -7
- package/dist/ui/canvas.d.ts +19 -7
- package/dist/ui/canvas.js +419 -103
- package/dist/ui/canvas.js.map +1 -1
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.cjs +2 -1
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +4 -4
- package/dist/webhook.d.ts +4 -4
- package/dist/webhook.js +2 -1
- package/dist/webhook.js.map +1 -1
- package/package.json +12 -11
- package/dist/types-B1ngKbWI.d.cts +0 -33
- package/dist/types-BiKNBwRA.d.ts +0 -33
package/dist/index.d.cts
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AddItemParams,
|
|
3
|
-
import { P as Product } from './payload-types-
|
|
4
|
-
export { A as Article,
|
|
5
|
-
export { C as CollectionType, P as
|
|
6
|
-
export { C as COMMERCE_NOTIFICATION_EVENTS, a as COMMERCE_NOTIFICATION_EVENT_TYPE, b as COMMERCE_NOTIFICATION_OPERATION, c as CUSTOMER_PASSWORD_RESET_OPERATION, d as CollectionWebhookOperation, e as CommerceEmailChannel, f as CommerceEmailConfig, g as CommerceEmailEventConfig, h as CommerceEmailEventHandlers, i as CommerceEmailHandlerContext, j as CommerceNotification, k as CommerceNotificationData, l as CommerceNotificationEventHandlers, m as CommerceNotificationEventName, n as CommerceNotificationHandlerContext, o as CommerceNotificationSource, p as CommerceNotificationSourceCollection, q as CommerceNotificationWebhookEvent, r as CustomerAuthWebhookEvent, s as CustomerAuthWebhookHandlers, t as CustomerPasswordResetWebhookData, u as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, v as OrderChangedWebhookEvent, W as WebhookChange, w as WebhookCommerceNotificationChange, x as WebhookEvent, y as WebhookHandler, z as WebhookKnownOperation, A as WebhookOperation, B as WebhookOptions, D as WebhookOrderChange, E as WebhookOrderMoved, F as WebhookOrderScope, G as createCommerceEmailWebhookHandler, H as createCommerceNotificationWebhookHandler, I as createCustomerAuthWebhookHandler, J as createTypedWebhookHandler, K as defineCommerceEmailConfig, L as getCommerceNotificationIdempotencyKey, M as handleWebhook, N as isCommerceNotificationWebhookEvent, P as isCustomerPasswordResetWebhookEvent, Q as isOrderChangedWebhookEvent, R as isValidWebhookEvent, S as isWebhookCollection, T as isWebhookOperation } from './index-
|
|
7
|
-
export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection, b as SERVER_COLLECTIONS, c as SERVER_ONLY_COLLECTIONS } from './const-
|
|
1
|
+
import { b_ as BaseApi, aB as ServerApiOptions, aE as SubscribeMembershipParams, aF as SubscribeMembershipResponse, e as CancelMembershipParams, f as CancelMembershipResponse, b$ as ProductDetail, c0 as ProductDetailCatalog, c1 as StockSnapshotResponse, c2 as ProductSelectionMediaSource, c3 as ProductDisplayMediaSource, c4 as ResolveProductSelectionMediaInput, c5 as ResolveProductSelectionMediaResult, c6 as ProductSelectionMediaPointer, h as ClientConfig, c7 as RootClientWithEvents } from './types-C4WuJfw7.cjs';
|
|
2
|
+
export { A as AddItemParams, i as ApiQueryOptions, c8 as BulkImportFulfillmentsParams, c9 as BulkImportFulfillmentsResponse, ca as CalculateShippingParams, cb as CalculateShippingResult, j as CancelBrowserPaymentSessionParams, cc as CancelOrderParams, cd as CancelOrderResponse, ce as CancelReasonCode, cf as CartDiscountCode, k as CartMergeParams, l as CartMergeResult, m as CartMineResult, n as CartMutationResult, cg as CartWarning, ch as CartWarningCode, o as CheckoutAbandonedReason, p as CheckoutAmounts, q as CheckoutOrderReference, r as CheckoutPaymentSessionRef, s as CheckoutShippingAddress, t as ClearCartParams, ah as Client, u as ClientMetadata, g as ClientState, ah as ClientType, ci as Comment, C as CommerceClient, cj as CommerceClientOptions, a as CommunityClient, ck as CommunityClientOptions, cl as CommunityComment, cm as CommunityCommentListSort, cn as CommunityPost, co as CommunityPostCategory, cp as CommunityPostListSort, cq as CommunityPostTag, cr as CommunityPublicAuthorSnapshot, cs as CommunityPublicMediaAsset, ct as CommunityPublicReference, cu as CompatibilityProductSelectionParamEvent, b as ContentClient, v as ContentClientOptions, w as CreateCartParams, x as CreateCartResult, y as CreateCheckoutParams, z as CreateCheckoutResult, cv as CreateFulfillmentParams, B as CreatePaymentSessionParams, cw as CreateReturnParams, bJ as CustomerAuth, cx as CustomerAuthOptions, bL as CustomerAuthResponse, cy as CustomerAuthorizationUrlInput, cz as CustomerAuthorizationUrlResult, bM as CustomerLoginData, d as CustomerMembershipView, c as CustomerNamespace, cA as CustomerOAuth, cB as CustomerOAuthCallbackResult, cC as CustomerOAuthConfig, cD as CustomerOAuthTokenSet, cE as CustomerOrderListOptions, bK as CustomerProfile, bP as CustomerRefreshResponse, bO as CustomerRegisterData, bN as CustomerRegisterResponse, D as CustomerSnapshot, F as DebugConfig, G as DeepPartial, cF as DiscountApi, cG as DiscountApiOptions, cH as DiscountErrorReasonCode, aZ as EventAdmissionAvailabilityParams, a_ as EventAdmissionAvailabilityResponse, a$ as EventAdmissionAvailabilityType, b0 as EventAdmissionPricePresentment, b1 as EventGuestCancelParams, b2 as EventGuestRegistration, b3 as EventGuestRegistrationResponse, b4 as EventRegistrationAnswerInput, b5 as EventRegistrationAttendeeInput, b6 as EventRegistrationPublic, b7 as EventRegistrationRegisterParams, b8 as EventRegistrationRegisterResponse, b9 as EventsCalendarItem, E as EventsClient, ba as EventsClientOptions, bb as EventsDateParam, bc as EventsExternalSource, bd as EventsLocation, be as EventsOccurrenceLocation, bf as EventsRangeEvent, bg as EventsRangeOccurrence, bh as EventsRangeParams, bi as EventsRangeResponse, bj as EventsTaxonomyItem, H as ExtractArrayType, cI as FeaturedImagePointerInput, cJ as GetOrderByPaymentIdParams, cK as LegacyProductSelectionParamEvent, cL as ListingGroupsParams, cM as MAX_CART_LINE_ADMISSIONS, cN as MarketDTO, cO as MediaValue, I as MembershipStatus, J as Money, cP as NormalizedOptionSwatch, cQ as NormalizedProductSelection, O as OpenCheckoutPaymentState, cR as OrderApi, cS as OrderApiOptions, cT as OrderByPaymentResult, cU as PRODUCT_PLP_FIND_OPTIONS, cV as PRODUCT_UPSERT_READONLY_FIELD_REASON, cW as PRODUCT_UPSERT_UNKNOWN_FIELD_REASON, P as PayloadFindResponse, K as PayloadMutationResponse, L as PaymentFailureReason, N as PaymentNextAction, Q as PaymentProviderStatus, R as PaymentReconciliationReason, S as PaymentSessionRole, cX as PrepareFulfillmentOrderParams, cY as PrepareFulfillmentOrderResponse, cZ as ProductApi, c_ as ProductApiOptions, c$ as ProductDetailBrand, bU as ProductDetailCatalogResult, d0 as ProductDetailCatalogVariant, d1 as ProductDetailCategory, d2 as ProductDetailImage, d3 as ProductDetailImageMedia, d4 as ProductDetailMedia, d5 as ProductDetailOption, d6 as ProductDetailOptionValue, bT as ProductDetailParams, d7 as ProductDetailResult, d8 as ProductDetailTag, d9 as ProductDetailUnavailableReason, da as ProductDetailVariant, db as ProductDetailVariantOptionValue, dc as ProductDetailVideo, dd as ProductFallbackLocaleOption, de as ProductHrefGroup, df as ProductHrefOptions, dg as ProductHrefProduct, dh as ProductListingCard, di as ProductListingCardOptions, dj as ProductListingCardPriceRange, dk as ProductListingCardRepresentativeVariant, dl as ProductListingGroup, dm as ProductListingGroupCatalogSummary, dn as ProductListingGroupCatalogVariant, dp as ProductListingGroupProjection, dq as ProductListingGroupSummary, dr as ProductListingGroupVariant, bX as ProductListingGroupsCatalogItem, ds as ProductListingGroupsCatalogProduct, dt as ProductListingGroupsCatalogResponse, bZ as ProductListingGroupsItem, du as ProductListingGroupsProduct, dv as ProductListingGroupsResponse, bS as ProductListingPageBaseParams, bV as ProductListingPageCatalogParams, dw as ProductListingPageFilters, bY as ProductListingPageFullParams, bR as ProductListingPageParams, bW as ProductListingPageResult, dx as ProductListingPageSort, dy as ProductListingProductShape, dz as ProductListingSwatch, dA as ProductLocaleOption, dB as ProductLocaleReadParams, dC as ProductLocalizedText, dD as ProductLocalizedValue, dE as ProductMediaResolutionSource, dF as ProductMoneyRange, dG as ProductOptionMatrix, dH as ProductOptionMatrixOption, dI as ProductOptionMatrixValue, dJ as ProductOptionMatrixVariant, dK as ProductOptionShape, dL as ProductOptionValueShape, dM as ProductOptionValueSwatch, dN as ProductOptionValueSwatchInput, dO as ProductPriceRange, dP as ProductSelectionAvailableSwatch, dQ as ProductSelectionAvailableValue, dR as ProductSelectionByOptionValue, dS as ProductSelectionCodecError, dT as ProductSelectionCodecOptions, dU as ProductSelectionInput, dV as ProductSelectionOptionValue, dW as ProductSelectionResolution, dX as ProductSelectionResolutionContext, dY as ProductSelectionUrlEmit, dZ as ProductSelectionVariant, d_ as ProductUpsertFieldValidationErrorBody, d$ as ProductUpsertFieldValidationErrorReason, T as ProductUpsertInput, U as ProductUpsertParams, V as ProductUpsertResponse, W as ProductUpsertVariantInput, e0 as ProductVariantShape, X as PublicAttribute, Y as PublicCaptureEvidence, Z as PublicCart, _ as PublicCartItem, $ as PublicCartItemAdmission, a0 as PublicCartMarket, a1 as PublicCartReference, a2 as PublicCheckout, e1 as PublicCheckoutBase, a3 as PublicCheckoutItem, a4 as PublicMediaAsset, a5 as PublicMediaSize, a6 as PublicOrder, a7 as PublicOrderAmounts, a8 as PublicOrderItem, a9 as PublicOrderReference, aa as PublicPaymentSession, bI as PublicReadQueryOptions, ab as ReconciliationRequired, ac as RemoveItemParams, e2 as RequestOptions, e3 as ResolveCancelRefundFailedResponse, e4 as ResolveCancelRefundOutcome, e5 as ResolveCancelRefundParams, e6 as ResolveCancelRefundResponse, e7 as ResolveCancelRefundSucceededResponse, e8 as ResolveProductDisplayMediaInput, e9 as ResolveProductDisplayMediaResult, ea as ResolvedCatalogPrice, ad as RetrieveBrowserPaymentSessionParams, ae as RetrieveCartParams, af as RetrieveCheckoutParams, bn as RetrieveServerCheckoutParams, ag as RetryConfig, eb as ReturnCancellationReasonCode, ec as ReturnItem, ed as ReturnReason, ee as ReturnWithRefundItem, ef as ReturnWithRefundParams, ah as RootClient, ai as RootCollectionClient, aj as RootReadOnlyQueryBuilder, eg as ShippingApi, eh as ShippingApiOptions, ak as ShippingLine, al as Sort, am as SpentCheckoutPaymentState, ei as StockCheckParams, ej as StockCheckResponse, ek as StockCheckResult, el as StockSnapshotItem, em as StockSnapshotParams, an as StorefrontContentListOptions, ao as StorefrontContentReference, ap as StorefrontGalleryItem, aq as StorefrontGalleryItemsListOptions, ar as StorefrontGalleryItemsSort, as as StorefrontLink, at as StorefrontLinksListOptions, au as StorefrontLinksSort, av as UpdateCartAttributesParams, aw as UpdateDiscountCodesParams, en as UpdateFulfillmentParams, ax as UpdateItemParams, eo as UpdateOrderParams, bQ as UpdateProfileData, ep as UpdateReturnParams, eq as ValidateDiscountParams, er as ValidateDiscountResult, ay as VariantInput, az as Where, es as WithIdempotencyKey, et as buildProductHref, eu as buildProductListingCard, ev as buildProductListingGroupProjection, ew as buildProductListingGroupsByOption, ex as buildProductOptionMatrix, ey as buildProductOptionMatrixFromDetail, ez as createProductSelectionCodec, eA as getAvailableOptionValues, eB as getProductSelectionImages, eC as getSelectedValueByOptionId, eD as getVariantAvailableForSale, eE as getVariantAvailableStock, eF as isProductUpsertFieldValidationErrorBody, eG as normalizeProductSelection, eH as normalizeProductSelectionFromMatrix, eI as normalizeSelectedValueIds, eJ as parseProductSelection, eK as projectProductToListingShape, eL as resolveFeaturedImagePointer, eM as resolveProductDisplayMedia, eN as resolveProductSelection, eO as resolveProductSelectionFromMatrix, eP as resolveProductSelectionMedia, eQ as resolveVariantForSelection, eR as selectNext, eS as selectedSwatchMediaItemId, eT as stringifyProductSelection, eU as toShopifyPriceRangeV2 } from './types-C4WuJfw7.cjs';
|
|
3
|
+
import { P as Product } from './payload-types-CJZuXcgF.cjs';
|
|
4
|
+
export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, D as Document, I as Image, i as Post, j as PostCategory, T as Tenant, V as Video } from './payload-types-CJZuXcgF.cjs';
|
|
5
|
+
export { C as CollectionType, P as Market, a as Product, b as ProductCollection, c as ProductVariant } from './types-D5p7-m1l.cjs';
|
|
6
|
+
export { C as COMMERCE_NOTIFICATION_EVENTS, a as COMMERCE_NOTIFICATION_EVENT_TYPE, b as COMMERCE_NOTIFICATION_OPERATION, c as CUSTOMER_PASSWORD_RESET_OPERATION, d as CollectionWebhookOperation, e as CommerceEmailChannel, f as CommerceEmailConfig, g as CommerceEmailEventConfig, h as CommerceEmailEventHandlers, i as CommerceEmailHandlerContext, j as CommerceNotification, k as CommerceNotificationData, l as CommerceNotificationEventHandlers, m as CommerceNotificationEventName, n as CommerceNotificationHandlerContext, o as CommerceNotificationSource, p as CommerceNotificationSourceCollection, q as CommerceNotificationWebhookEvent, r as CustomerAuthWebhookEvent, s as CustomerAuthWebhookHandlers, t as CustomerPasswordResetWebhookData, u as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, v as OrderChangedWebhookEvent, W as WebhookChange, w as WebhookCommerceNotificationChange, x as WebhookEvent, y as WebhookHandler, z as WebhookKnownOperation, A as WebhookOperation, B as WebhookOptions, D as WebhookOrderChange, E as WebhookOrderMoved, F as WebhookOrderScope, G as createCommerceEmailWebhookHandler, H as createCommerceNotificationWebhookHandler, I as createCustomerAuthWebhookHandler, J as createTypedWebhookHandler, K as defineCommerceEmailConfig, L as getCommerceNotificationIdempotencyKey, M as handleWebhook, N as isCommerceNotificationWebhookEvent, P as isCustomerPasswordResetWebhookEvent, Q as isOrderChangedWebhookEvent, R as isValidWebhookEvent, S as isWebhookCollection, T as isWebhookOperation } from './index-YGrZrxNn.cjs';
|
|
7
|
+
export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection, b as SERVER_COLLECTIONS, c as SERVER_ONLY_COLLECTIONS } from './const-BAG0MH0u.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 ImageDataSizeEntry, c as ImageDataSizes, d as ImagePalette, e as ImagePlaceholderOptions, g as getImageLqip, f as getImagePalette, h as getImagePlaceholderStyle, i as getImageSrcSet, j as getImageUrl } from './image-BDjHp03R.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';
|
|
11
11
|
export { Analytics, AnalyticsConfig, createAnalytics } from './analytics.cjs';
|
|
12
|
-
export { ApiError, AuthError, ConfigError, ConflictError, GoneError, NetworkError, NotFoundError, PermissionError, RateLimitError, SDKError, ServiceUnavailableError, TimeoutError, UsageLimitError, ValidationError, createAuthError, createConflictError, createNotFoundError, createPermissionError, createRateLimitError, isApiError, isAuthError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.cjs';
|
|
12
|
+
export { ApiError, AuthError, COMMERCE_ERROR_CODES, CommerceErrorCode, CommerceSDKError, ConfigError, ConflictError, GoneError, NetworkError, NotFoundError, PermissionError, RateLimitError, SDKError, ServiceUnavailableError, TimeoutError, UsageLimitError, ValidationError, createAuthError, createConflictError, createNotFoundError, createPermissionError, createRateLimitError, isApiError, isAuthError, isCommerceSDKError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.cjs';
|
|
13
|
+
|
|
14
|
+
declare function isCommerceIdempotencyKey(value: unknown): value is string;
|
|
15
|
+
declare function assertCommerceIdempotencyKey(value: unknown): asserts value is string;
|
|
16
|
+
/** Create a cryptographically strong key for one logical commerce operation. */
|
|
17
|
+
declare function createCommerceIdempotencyKey(): string;
|
|
13
18
|
|
|
14
19
|
type MembershipApiOptions = ServerApiOptions;
|
|
15
20
|
/**
|
|
16
21
|
* Server-only (secret-key) API for membership lifecycle operations.
|
|
17
22
|
*
|
|
18
23
|
* subscribe / cancel are sk-only (admin-sk-only policy).
|
|
19
|
-
*
|
|
20
|
-
* server-side method reuses the same endpoint.
|
|
24
|
+
* Customer-JWT membership view/cancel methods are exposed by the browser client.
|
|
21
25
|
*/
|
|
22
26
|
declare class MembershipApi extends BaseApi {
|
|
23
27
|
constructor(options: MembershipApiOptions);
|
|
@@ -32,16 +36,11 @@ declare class MembershipApi extends BaseApi {
|
|
|
32
36
|
subscribe(params: SubscribeMembershipParams): Promise<SubscribeMembershipResponse>;
|
|
33
37
|
/**
|
|
34
38
|
* Cancel a membership by id.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* membership groups
|
|
39
|
+
* By default this sets `cancelAtPeriodEnd`, keeps benefits until
|
|
40
|
+
* `currentPeriodEnd`, and stops renewal. Pass `immediate=true` to cancel
|
|
41
|
+
* immediately and revoke membership groups now.
|
|
38
42
|
*/
|
|
39
43
|
cancel(params: CancelMembershipParams): Promise<CancelMembershipResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* Retrieve the authenticated customer's own membership view.
|
|
42
|
-
* Never returns payment tokens or internal keys.
|
|
43
|
-
*/
|
|
44
|
-
me(): Promise<CustomerMembershipView | null>;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
type ProductDetailStockMergeStatus = 'complete' | 'partial';
|
|
@@ -130,4 +129,4 @@ declare function resolveRelation<T>(ref: unknown): T | null;
|
|
|
130
129
|
|
|
131
130
|
declare function createClient(options: ClientConfig): RootClientWithEvents;
|
|
132
131
|
|
|
133
|
-
export { BaseApi, CancelMembershipParams, CancelMembershipResponse, ClientConfig,
|
|
132
|
+
export { BaseApi, CancelMembershipParams, CancelMembershipResponse, ClientConfig, type MediaPointerSource, MembershipApi, type MembershipApiOptions, type MergedProductDetailResult, ProductDetail, ProductDetailCatalog, type ProductDetailStockMergeStatus, ProductDisplayMediaSource, type ProductGallerySource, type ProductMediaSetInput, type ProductMediaSetMatchType, ProductSelectionMediaPointer, ProductSelectionMediaSource, type ResolveProductGalleryInput, type ResolveProductGalleryResult, type ResolveProductMediaInput, type ResolveProductMediaResult, ResolveProductSelectionMediaInput, ResolveProductSelectionMediaResult, RootClientWithEvents, ServerApiOptions, StockSnapshotResponse, SubscribeMembershipParams, SubscribeMembershipResponse, assertCommerceIdempotencyKey, createClient, createCommerceIdempotencyKey, formatOrderName, generateOrderNumber, isCommerceIdempotencyKey, mergeProductDetailWithStock, resolveProductGallery, resolveProductMedia, resolveRelation };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AddItemParams,
|
|
3
|
-
import { P as Product } from './payload-types-
|
|
4
|
-
export { A as Article,
|
|
5
|
-
export { C as CollectionType, P as
|
|
6
|
-
export { C as COMMERCE_NOTIFICATION_EVENTS, a as COMMERCE_NOTIFICATION_EVENT_TYPE, b as COMMERCE_NOTIFICATION_OPERATION, c as CUSTOMER_PASSWORD_RESET_OPERATION, d as CollectionWebhookOperation, e as CommerceEmailChannel, f as CommerceEmailConfig, g as CommerceEmailEventConfig, h as CommerceEmailEventHandlers, i as CommerceEmailHandlerContext, j as CommerceNotification, k as CommerceNotificationData, l as CommerceNotificationEventHandlers, m as CommerceNotificationEventName, n as CommerceNotificationHandlerContext, o as CommerceNotificationSource, p as CommerceNotificationSourceCollection, q as CommerceNotificationWebhookEvent, r as CustomerAuthWebhookEvent, s as CustomerAuthWebhookHandlers, t as CustomerPasswordResetWebhookData, u as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, v as OrderChangedWebhookEvent, W as WebhookChange, w as WebhookCommerceNotificationChange, x as WebhookEvent, y as WebhookHandler, z as WebhookKnownOperation, A as WebhookOperation, B as WebhookOptions, D as WebhookOrderChange, E as WebhookOrderMoved, F as WebhookOrderScope, G as createCommerceEmailWebhookHandler, H as createCommerceNotificationWebhookHandler, I as createCustomerAuthWebhookHandler, J as createTypedWebhookHandler, K as defineCommerceEmailConfig, L as getCommerceNotificationIdempotencyKey, M as handleWebhook, N as isCommerceNotificationWebhookEvent, P as isCustomerPasswordResetWebhookEvent, Q as isOrderChangedWebhookEvent, R as isValidWebhookEvent, S as isWebhookCollection, T as isWebhookOperation } from './index-
|
|
7
|
-
export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection, b as SERVER_COLLECTIONS, c as SERVER_ONLY_COLLECTIONS } from './const-
|
|
1
|
+
import { b_ as BaseApi, aB as ServerApiOptions, aE as SubscribeMembershipParams, aF as SubscribeMembershipResponse, e as CancelMembershipParams, f as CancelMembershipResponse, b$ as ProductDetail, c0 as ProductDetailCatalog, c1 as StockSnapshotResponse, c2 as ProductSelectionMediaSource, c3 as ProductDisplayMediaSource, c4 as ResolveProductSelectionMediaInput, c5 as ResolveProductSelectionMediaResult, c6 as ProductSelectionMediaPointer, h as ClientConfig, c7 as RootClientWithEvents } from './types-BlOvjoTX.js';
|
|
2
|
+
export { A as AddItemParams, i as ApiQueryOptions, c8 as BulkImportFulfillmentsParams, c9 as BulkImportFulfillmentsResponse, ca as CalculateShippingParams, cb as CalculateShippingResult, j as CancelBrowserPaymentSessionParams, cc as CancelOrderParams, cd as CancelOrderResponse, ce as CancelReasonCode, cf as CartDiscountCode, k as CartMergeParams, l as CartMergeResult, m as CartMineResult, n as CartMutationResult, cg as CartWarning, ch as CartWarningCode, o as CheckoutAbandonedReason, p as CheckoutAmounts, q as CheckoutOrderReference, r as CheckoutPaymentSessionRef, s as CheckoutShippingAddress, t as ClearCartParams, ah as Client, u as ClientMetadata, g as ClientState, ah as ClientType, ci as Comment, C as CommerceClient, cj as CommerceClientOptions, a as CommunityClient, ck as CommunityClientOptions, cl as CommunityComment, cm as CommunityCommentListSort, cn as CommunityPost, co as CommunityPostCategory, cp as CommunityPostListSort, cq as CommunityPostTag, cr as CommunityPublicAuthorSnapshot, cs as CommunityPublicMediaAsset, ct as CommunityPublicReference, cu as CompatibilityProductSelectionParamEvent, b as ContentClient, v as ContentClientOptions, w as CreateCartParams, x as CreateCartResult, y as CreateCheckoutParams, z as CreateCheckoutResult, cv as CreateFulfillmentParams, B as CreatePaymentSessionParams, cw as CreateReturnParams, bJ as CustomerAuth, cx as CustomerAuthOptions, bL as CustomerAuthResponse, cy as CustomerAuthorizationUrlInput, cz as CustomerAuthorizationUrlResult, bM as CustomerLoginData, d as CustomerMembershipView, c as CustomerNamespace, cA as CustomerOAuth, cB as CustomerOAuthCallbackResult, cC as CustomerOAuthConfig, cD as CustomerOAuthTokenSet, cE as CustomerOrderListOptions, bK as CustomerProfile, bP as CustomerRefreshResponse, bO as CustomerRegisterData, bN as CustomerRegisterResponse, D as CustomerSnapshot, F as DebugConfig, G as DeepPartial, cF as DiscountApi, cG as DiscountApiOptions, cH as DiscountErrorReasonCode, aZ as EventAdmissionAvailabilityParams, a_ as EventAdmissionAvailabilityResponse, a$ as EventAdmissionAvailabilityType, b0 as EventAdmissionPricePresentment, b1 as EventGuestCancelParams, b2 as EventGuestRegistration, b3 as EventGuestRegistrationResponse, b4 as EventRegistrationAnswerInput, b5 as EventRegistrationAttendeeInput, b6 as EventRegistrationPublic, b7 as EventRegistrationRegisterParams, b8 as EventRegistrationRegisterResponse, b9 as EventsCalendarItem, E as EventsClient, ba as EventsClientOptions, bb as EventsDateParam, bc as EventsExternalSource, bd as EventsLocation, be as EventsOccurrenceLocation, bf as EventsRangeEvent, bg as EventsRangeOccurrence, bh as EventsRangeParams, bi as EventsRangeResponse, bj as EventsTaxonomyItem, H as ExtractArrayType, cI as FeaturedImagePointerInput, cJ as GetOrderByPaymentIdParams, cK as LegacyProductSelectionParamEvent, cL as ListingGroupsParams, cM as MAX_CART_LINE_ADMISSIONS, cN as MarketDTO, cO as MediaValue, I as MembershipStatus, J as Money, cP as NormalizedOptionSwatch, cQ as NormalizedProductSelection, O as OpenCheckoutPaymentState, cR as OrderApi, cS as OrderApiOptions, cT as OrderByPaymentResult, cU as PRODUCT_PLP_FIND_OPTIONS, cV as PRODUCT_UPSERT_READONLY_FIELD_REASON, cW as PRODUCT_UPSERT_UNKNOWN_FIELD_REASON, P as PayloadFindResponse, K as PayloadMutationResponse, L as PaymentFailureReason, N as PaymentNextAction, Q as PaymentProviderStatus, R as PaymentReconciliationReason, S as PaymentSessionRole, cX as PrepareFulfillmentOrderParams, cY as PrepareFulfillmentOrderResponse, cZ as ProductApi, c_ as ProductApiOptions, c$ as ProductDetailBrand, bU as ProductDetailCatalogResult, d0 as ProductDetailCatalogVariant, d1 as ProductDetailCategory, d2 as ProductDetailImage, d3 as ProductDetailImageMedia, d4 as ProductDetailMedia, d5 as ProductDetailOption, d6 as ProductDetailOptionValue, bT as ProductDetailParams, d7 as ProductDetailResult, d8 as ProductDetailTag, d9 as ProductDetailUnavailableReason, da as ProductDetailVariant, db as ProductDetailVariantOptionValue, dc as ProductDetailVideo, dd as ProductFallbackLocaleOption, de as ProductHrefGroup, df as ProductHrefOptions, dg as ProductHrefProduct, dh as ProductListingCard, di as ProductListingCardOptions, dj as ProductListingCardPriceRange, dk as ProductListingCardRepresentativeVariant, dl as ProductListingGroup, dm as ProductListingGroupCatalogSummary, dn as ProductListingGroupCatalogVariant, dp as ProductListingGroupProjection, dq as ProductListingGroupSummary, dr as ProductListingGroupVariant, bX as ProductListingGroupsCatalogItem, ds as ProductListingGroupsCatalogProduct, dt as ProductListingGroupsCatalogResponse, bZ as ProductListingGroupsItem, du as ProductListingGroupsProduct, dv as ProductListingGroupsResponse, bS as ProductListingPageBaseParams, bV as ProductListingPageCatalogParams, dw as ProductListingPageFilters, bY as ProductListingPageFullParams, bR as ProductListingPageParams, bW as ProductListingPageResult, dx as ProductListingPageSort, dy as ProductListingProductShape, dz as ProductListingSwatch, dA as ProductLocaleOption, dB as ProductLocaleReadParams, dC as ProductLocalizedText, dD as ProductLocalizedValue, dE as ProductMediaResolutionSource, dF as ProductMoneyRange, dG as ProductOptionMatrix, dH as ProductOptionMatrixOption, dI as ProductOptionMatrixValue, dJ as ProductOptionMatrixVariant, dK as ProductOptionShape, dL as ProductOptionValueShape, dM as ProductOptionValueSwatch, dN as ProductOptionValueSwatchInput, dO as ProductPriceRange, dP as ProductSelectionAvailableSwatch, dQ as ProductSelectionAvailableValue, dR as ProductSelectionByOptionValue, dS as ProductSelectionCodecError, dT as ProductSelectionCodecOptions, dU as ProductSelectionInput, dV as ProductSelectionOptionValue, dW as ProductSelectionResolution, dX as ProductSelectionResolutionContext, dY as ProductSelectionUrlEmit, dZ as ProductSelectionVariant, d_ as ProductUpsertFieldValidationErrorBody, d$ as ProductUpsertFieldValidationErrorReason, T as ProductUpsertInput, U as ProductUpsertParams, V as ProductUpsertResponse, W as ProductUpsertVariantInput, e0 as ProductVariantShape, X as PublicAttribute, Y as PublicCaptureEvidence, Z as PublicCart, _ as PublicCartItem, $ as PublicCartItemAdmission, a0 as PublicCartMarket, a1 as PublicCartReference, a2 as PublicCheckout, e1 as PublicCheckoutBase, a3 as PublicCheckoutItem, a4 as PublicMediaAsset, a5 as PublicMediaSize, a6 as PublicOrder, a7 as PublicOrderAmounts, a8 as PublicOrderItem, a9 as PublicOrderReference, aa as PublicPaymentSession, bI as PublicReadQueryOptions, ab as ReconciliationRequired, ac as RemoveItemParams, e2 as RequestOptions, e3 as ResolveCancelRefundFailedResponse, e4 as ResolveCancelRefundOutcome, e5 as ResolveCancelRefundParams, e6 as ResolveCancelRefundResponse, e7 as ResolveCancelRefundSucceededResponse, e8 as ResolveProductDisplayMediaInput, e9 as ResolveProductDisplayMediaResult, ea as ResolvedCatalogPrice, ad as RetrieveBrowserPaymentSessionParams, ae as RetrieveCartParams, af as RetrieveCheckoutParams, bn as RetrieveServerCheckoutParams, ag as RetryConfig, eb as ReturnCancellationReasonCode, ec as ReturnItem, ed as ReturnReason, ee as ReturnWithRefundItem, ef as ReturnWithRefundParams, ah as RootClient, ai as RootCollectionClient, aj as RootReadOnlyQueryBuilder, eg as ShippingApi, eh as ShippingApiOptions, ak as ShippingLine, al as Sort, am as SpentCheckoutPaymentState, ei as StockCheckParams, ej as StockCheckResponse, ek as StockCheckResult, el as StockSnapshotItem, em as StockSnapshotParams, an as StorefrontContentListOptions, ao as StorefrontContentReference, ap as StorefrontGalleryItem, aq as StorefrontGalleryItemsListOptions, ar as StorefrontGalleryItemsSort, as as StorefrontLink, at as StorefrontLinksListOptions, au as StorefrontLinksSort, av as UpdateCartAttributesParams, aw as UpdateDiscountCodesParams, en as UpdateFulfillmentParams, ax as UpdateItemParams, eo as UpdateOrderParams, bQ as UpdateProfileData, ep as UpdateReturnParams, eq as ValidateDiscountParams, er as ValidateDiscountResult, ay as VariantInput, az as Where, es as WithIdempotencyKey, et as buildProductHref, eu as buildProductListingCard, ev as buildProductListingGroupProjection, ew as buildProductListingGroupsByOption, ex as buildProductOptionMatrix, ey as buildProductOptionMatrixFromDetail, ez as createProductSelectionCodec, eA as getAvailableOptionValues, eB as getProductSelectionImages, eC as getSelectedValueByOptionId, eD as getVariantAvailableForSale, eE as getVariantAvailableStock, eF as isProductUpsertFieldValidationErrorBody, eG as normalizeProductSelection, eH as normalizeProductSelectionFromMatrix, eI as normalizeSelectedValueIds, eJ as parseProductSelection, eK as projectProductToListingShape, eL as resolveFeaturedImagePointer, eM as resolveProductDisplayMedia, eN as resolveProductSelection, eO as resolveProductSelectionFromMatrix, eP as resolveProductSelectionMedia, eQ as resolveVariantForSelection, eR as selectNext, eS as selectedSwatchMediaItemId, eT as stringifyProductSelection, eU as toShopifyPriceRangeV2 } from './types-BlOvjoTX.js';
|
|
3
|
+
import { P as Product } from './payload-types-CJZuXcgF.js';
|
|
4
|
+
export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, D as Document, I as Image, i as Post, j as PostCategory, T as Tenant, V as Video } from './payload-types-CJZuXcgF.js';
|
|
5
|
+
export { C as CollectionType, P as Market, a as Product, b as ProductCollection, c as ProductVariant } from './types-BC6rVmJa.js';
|
|
6
|
+
export { C as COMMERCE_NOTIFICATION_EVENTS, a as COMMERCE_NOTIFICATION_EVENT_TYPE, b as COMMERCE_NOTIFICATION_OPERATION, c as CUSTOMER_PASSWORD_RESET_OPERATION, d as CollectionWebhookOperation, e as CommerceEmailChannel, f as CommerceEmailConfig, g as CommerceEmailEventConfig, h as CommerceEmailEventHandlers, i as CommerceEmailHandlerContext, j as CommerceNotification, k as CommerceNotificationData, l as CommerceNotificationEventHandlers, m as CommerceNotificationEventName, n as CommerceNotificationHandlerContext, o as CommerceNotificationSource, p as CommerceNotificationSourceCollection, q as CommerceNotificationWebhookEvent, r as CustomerAuthWebhookEvent, s as CustomerAuthWebhookHandlers, t as CustomerPasswordResetWebhookData, u as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, v as OrderChangedWebhookEvent, W as WebhookChange, w as WebhookCommerceNotificationChange, x as WebhookEvent, y as WebhookHandler, z as WebhookKnownOperation, A as WebhookOperation, B as WebhookOptions, D as WebhookOrderChange, E as WebhookOrderMoved, F as WebhookOrderScope, G as createCommerceEmailWebhookHandler, H as createCommerceNotificationWebhookHandler, I as createCustomerAuthWebhookHandler, J as createTypedWebhookHandler, K as defineCommerceEmailConfig, L as getCommerceNotificationIdempotencyKey, M as handleWebhook, N as isCommerceNotificationWebhookEvent, P as isCustomerPasswordResetWebhookEvent, Q as isOrderChangedWebhookEvent, R as isValidWebhookEvent, S as isWebhookCollection, T as isWebhookOperation } from './index-BNICJxBL.js';
|
|
7
|
+
export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection, b as SERVER_COLLECTIONS, c as SERVER_ONLY_COLLECTIONS } from './const-CaPq2AE4.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 ImageDataSizeEntry, c as ImageDataSizes, d as ImagePalette, e as ImagePlaceholderOptions, g as getImageLqip, f as getImagePalette, h as getImagePlaceholderStyle, i as getImageSrcSet, j as getImageUrl } from './image-BDjHp03R.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';
|
|
11
11
|
export { Analytics, AnalyticsConfig, createAnalytics } from './analytics.js';
|
|
12
|
-
export { ApiError, AuthError, ConfigError, ConflictError, GoneError, NetworkError, NotFoundError, PermissionError, RateLimitError, SDKError, ServiceUnavailableError, TimeoutError, UsageLimitError, ValidationError, createAuthError, createConflictError, createNotFoundError, createPermissionError, createRateLimitError, isApiError, isAuthError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.js';
|
|
12
|
+
export { ApiError, AuthError, COMMERCE_ERROR_CODES, CommerceErrorCode, CommerceSDKError, ConfigError, ConflictError, GoneError, NetworkError, NotFoundError, PermissionError, RateLimitError, SDKError, ServiceUnavailableError, TimeoutError, UsageLimitError, ValidationError, createAuthError, createConflictError, createNotFoundError, createPermissionError, createRateLimitError, isApiError, isAuthError, isCommerceSDKError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.js';
|
|
13
|
+
|
|
14
|
+
declare function isCommerceIdempotencyKey(value: unknown): value is string;
|
|
15
|
+
declare function assertCommerceIdempotencyKey(value: unknown): asserts value is string;
|
|
16
|
+
/** Create a cryptographically strong key for one logical commerce operation. */
|
|
17
|
+
declare function createCommerceIdempotencyKey(): string;
|
|
13
18
|
|
|
14
19
|
type MembershipApiOptions = ServerApiOptions;
|
|
15
20
|
/**
|
|
16
21
|
* Server-only (secret-key) API for membership lifecycle operations.
|
|
17
22
|
*
|
|
18
23
|
* subscribe / cancel are sk-only (admin-sk-only policy).
|
|
19
|
-
*
|
|
20
|
-
* server-side method reuses the same endpoint.
|
|
24
|
+
* Customer-JWT membership view/cancel methods are exposed by the browser client.
|
|
21
25
|
*/
|
|
22
26
|
declare class MembershipApi extends BaseApi {
|
|
23
27
|
constructor(options: MembershipApiOptions);
|
|
@@ -32,16 +36,11 @@ declare class MembershipApi extends BaseApi {
|
|
|
32
36
|
subscribe(params: SubscribeMembershipParams): Promise<SubscribeMembershipResponse>;
|
|
33
37
|
/**
|
|
34
38
|
* Cancel a membership by id.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* membership groups
|
|
39
|
+
* By default this sets `cancelAtPeriodEnd`, keeps benefits until
|
|
40
|
+
* `currentPeriodEnd`, and stops renewal. Pass `immediate=true` to cancel
|
|
41
|
+
* immediately and revoke membership groups now.
|
|
38
42
|
*/
|
|
39
43
|
cancel(params: CancelMembershipParams): Promise<CancelMembershipResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* Retrieve the authenticated customer's own membership view.
|
|
42
|
-
* Never returns payment tokens or internal keys.
|
|
43
|
-
*/
|
|
44
|
-
me(): Promise<CustomerMembershipView | null>;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
type ProductDetailStockMergeStatus = 'complete' | 'partial';
|
|
@@ -130,4 +129,4 @@ declare function resolveRelation<T>(ref: unknown): T | null;
|
|
|
130
129
|
|
|
131
130
|
declare function createClient(options: ClientConfig): RootClientWithEvents;
|
|
132
131
|
|
|
133
|
-
export { BaseApi, CancelMembershipParams, CancelMembershipResponse, ClientConfig,
|
|
132
|
+
export { BaseApi, CancelMembershipParams, CancelMembershipResponse, ClientConfig, type MediaPointerSource, MembershipApi, type MembershipApiOptions, type MergedProductDetailResult, ProductDetail, ProductDetailCatalog, type ProductDetailStockMergeStatus, ProductDisplayMediaSource, type ProductGallerySource, type ProductMediaSetInput, type ProductMediaSetMatchType, ProductSelectionMediaPointer, ProductSelectionMediaSource, type ResolveProductGalleryInput, type ResolveProductGalleryResult, type ResolveProductMediaInput, type ResolveProductMediaResult, ResolveProductSelectionMediaInput, ResolveProductSelectionMediaResult, RootClientWithEvents, ServerApiOptions, StockSnapshotResponse, SubscribeMembershipParams, SubscribeMembershipResponse, assertCommerceIdempotencyKey, createClient, createCommerceIdempotencyKey, formatOrderName, generateOrderNumber, isCommerceIdempotencyKey, mergeProductDetailWithStock, resolveProductGallery, resolveProductMedia, resolveRelation };
|