@01.software/sdk 0.34.0 → 0.36.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/client.cjs +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-DkREjhQ9.d.ts → collection-client-Bq5Zd7p7.d.ts} +3 -3
- package/dist/{collection-client-CR2B8c1v.d.cts → collection-client-Cv0D2w1Q.d.cts} +3 -3
- package/dist/{const-CdqCauHQ.d.ts → const-BDUKFP9w.d.ts} +1 -1
- package/dist/{const-BTvdrXtY.d.cts → const-DVcM7Ac_.d.cts} +1 -1
- package/dist/errors.cjs +300 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/{index-BGEhoDUs.d.cts → errors.d.cts} +13 -1
- package/dist/{index-BGEhoDUs.d.ts → errors.d.ts} +13 -1
- package/dist/errors.js +277 -0
- package/dist/errors.js.map +1 -0
- package/dist/{index-CjA3U6X3.d.cts → index-BHDKJ6B3.d.cts} +3 -3
- package/dist/{index-DK8_NXkh.d.ts → index-DTSXUYkr.d.ts} +3 -3
- package/dist/index.cjs +58 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +58 -5
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-C7tb7Xbs.d.cts → payload-types-BCui2Oml.d.cts} +0 -20
- package/dist/{payload-types-C7tb7Xbs.d.ts → payload-types-BCui2Oml.d.ts} +0 -20
- package/dist/query.cjs +1 -1
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +6 -6
- package/dist/query.d.ts +6 -6
- package/dist/query.js +1 -1
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +16 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.js +16 -1
- package/dist/server.js.map +1 -1
- package/dist/{types-1ylMrCuW.d.ts → types-3qV6sY7T.d.ts} +1 -1
- package/dist/{types-Bx558PU6.d.cts → types-CEzLf3PX.d.cts} +1 -1
- package/dist/{types-Byo_Rty4.d.ts → types-DK9EnLwJ.d.ts} +83 -17
- package/dist/{types-DDhtZI6E.d.cts → types-Dib-zdK6.d.cts} +83 -17
- 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.d.cts +4 -4
- package/dist/webhook.d.ts +4 -4
- package/package.json +11 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { aj as ProductDetail, ak as ProductDetailCatalog, al as StockSnapshotResponse, am as ProductSelectionMediaSource, an as ProductDisplayMediaSource, ao as ResolveProductSelectionMediaInput, ap as ResolveProductSelectionMediaResult, aq as ProductSelectionMediaPointer, d as ClientConfig, ar as RootClientWithEvents } from './types-
|
|
2
|
-
export { as as AddItemParams, A as ApiQueryOptions, at as ApplyDiscountParams, B as BaseApi, au as BulkImportFulfillmentsParams, av as BulkImportFulfillmentsResponse, aw as CalculateShippingParams, ax as CalculateShippingResult, ay as CancelOrderParams, az as CancelOrderReconciliationStatus, aA as CancelOrderResponse, aB as CancelReasonCode, aC as CartApi, aD as CartApiOptions, aE as CheckoutParams, aF as ClearCartParams, i as Client, e as ClientMetadata, c as ClientState, i as ClientType, aG as Comment, C as CommerceClient, aH as CommerceClientOptions, a as CommunityClient, aI as CommunityClientOptions, aJ as CommunityComment, aK as CommunityCommentListSort, aL as CommunityPost, aM as CommunityPostCategory, aN as CommunityPostListSort, aO as CommunityPostTag, aP as CompatibilityProductSelectionParamEvent, aQ as ConfirmPaymentParams, aR as ConfirmPaymentResponse, aS as CreateFulfillmentParams, aT as CreateOrderItem, aU as CreateOrderParams, aV as CreateReturnParams, a8 as CustomerAuth, aW as CustomerAuthOptions, aa as CustomerAuthResponse, ab as CustomerLoginData, b as CustomerNamespace, a9 as CustomerProfile, ae as CustomerRefreshResponse, ad as CustomerRegisterData, ac as CustomerRegisterResponse, aX as CustomerSnapshot, D as DebugConfig, f as DeepPartial, aY as DiscountApi, aZ as DiscountApiOptions, t as EventGuestCancelParams, u as EventGuestRegistration, v as EventGuestRegistrationResponse, w as EventRegistrationAnswerInput, x as EventRegistrationAttendeeInput, y as EventRegistrationPublic, z as EventRegistrationRegisterParams, F as EventRegistrationRegisterResponse, G as EventsCalendarItem, E as EventsClient, H as EventsClientOptions, I as EventsDateParam, J as EventsExternalSource, K as EventsLocation, L as EventsOccurrenceLocation, M as EventsRangeEvent, N as EventsRangeOccurrence, O as EventsRangeParams, Q as EventsRangeResponse, V as EventsTaxonomyItem, g as ExtractArrayType, a_ as LegacyProductSelectionParamEvent, a$ as
|
|
3
|
-
import { P as Product } from './payload-types-
|
|
4
|
-
export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, i as Cart, j as CartItem, D as Document, I as Image, O as Order, c as Post, k as PostCategory, l as ProductVariant, T as Tenant, V as Video } from './payload-types-
|
|
5
|
-
export { C as CollectionType, P as Product, a as ProductCollection } from './types-
|
|
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 CommerceNotificationEventName, m as CommerceNotificationSource, n as CommerceNotificationSourceCollection, o as CommerceNotificationWebhookEvent, p as CustomerAuthWebhookEvent, q as CustomerAuthWebhookHandlers, r as CustomerPasswordResetWebhookData, s as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, t as OrderChangedWebhookEvent, W as WebhookChange, u as WebhookCommerceNotificationChange, v as WebhookEvent, w as WebhookHandler, x as WebhookKnownOperation, y as WebhookOperation, z as WebhookOptions, A as WebhookOrderChange, B as WebhookOrderMoved, D as WebhookOrderScope, E as createCommerceEmailWebhookHandler, F as createCustomerAuthWebhookHandler, G as createTypedWebhookHandler, H as defineCommerceEmailConfig, I as getCommerceNotificationIdempotencyKey, J as handleWebhook, K as isCommerceNotificationWebhookEvent, L as isCustomerPasswordResetWebhookEvent, M as isOrderChangedWebhookEvent, N as isValidWebhookEvent, P as isWebhookCollection, Q 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 { aj as ProductDetail, ak as ProductDetailCatalog, al as StockSnapshotResponse, am as ProductSelectionMediaSource, an as ProductDisplayMediaSource, ao as ResolveProductSelectionMediaInput, ap as ResolveProductSelectionMediaResult, aq as ProductSelectionMediaPointer, d as ClientConfig, ar as RootClientWithEvents } from './types-Dib-zdK6.cjs';
|
|
2
|
+
export { as as AddItemParams, A as ApiQueryOptions, at as ApplyDiscountParams, B as BaseApi, au as BulkImportFulfillmentsParams, av as BulkImportFulfillmentsResponse, aw as CalculateShippingParams, ax as CalculateShippingResult, ay as CancelOrderParams, az as CancelOrderReconciliationStatus, aA as CancelOrderResponse, aB as CancelReasonCode, aC as CartApi, aD as CartApiOptions, aE as CheckoutParams, aF as ClearCartParams, i as Client, e as ClientMetadata, c as ClientState, i as ClientType, aG as Comment, C as CommerceClient, aH as CommerceClientOptions, a as CommunityClient, aI as CommunityClientOptions, aJ as CommunityComment, aK as CommunityCommentListSort, aL as CommunityPost, aM as CommunityPostCategory, aN as CommunityPostListSort, aO as CommunityPostTag, aP as CompatibilityProductSelectionParamEvent, aQ as ConfirmPaymentParams, aR as ConfirmPaymentResponse, aS as CreateFulfillmentParams, aT as CreateOrderItem, aU as CreateOrderParams, aV as CreateReturnParams, a8 as CustomerAuth, aW as CustomerAuthOptions, aa as CustomerAuthResponse, ab as CustomerLoginData, b as CustomerNamespace, a9 as CustomerProfile, ae as CustomerRefreshResponse, ad as CustomerRegisterData, ac as CustomerRegisterResponse, aX as CustomerSnapshot, D as DebugConfig, f as DeepPartial, aY as DiscountApi, aZ as DiscountApiOptions, t as EventGuestCancelParams, u as EventGuestRegistration, v as EventGuestRegistrationResponse, w as EventRegistrationAnswerInput, x as EventRegistrationAttendeeInput, y as EventRegistrationPublic, z as EventRegistrationRegisterParams, F as EventRegistrationRegisterResponse, G as EventsCalendarItem, E as EventsClient, H as EventsClientOptions, I as EventsDateParam, J as EventsExternalSource, K as EventsLocation, L as EventsOccurrenceLocation, M as EventsRangeEvent, N as EventsRangeOccurrence, O as EventsRangeParams, Q as EventsRangeResponse, V as EventsTaxonomyItem, g as ExtractArrayType, a_ as LegacyProductSelectionParamEvent, a$ as ListingGroupsParams, b0 as ListingPrimaryImageFallbackInput, b1 as MediaValue, b2 as NormalizedOptionSwatch, b3 as NormalizedProductSelection, b4 as OrderApi, b5 as OrderApiOptions, b6 as PRODUCT_UPSERT_READONLY_FIELD_REASON, b7 as PRODUCT_UPSERT_UNKNOWN_FIELD_REASON, P as PayloadFindResponse, h as PayloadMutationResponse, b8 as ProductApi, b9 as ProductApiOptions, ba as ProductDetailBrand, bb as ProductDetailCatalogListing, bc as ProductDetailCatalogResult, bd as ProductDetailCatalogVariant, be as ProductDetailCategory, bf as ProductDetailImage, bg as ProductDetailImageMedia, bh as ProductDetailListing, bi as ProductDetailMedia, bj as ProductDetailOption, bk as ProductDetailOptionValue, ag as ProductDetailParams, ah as ProductDetailResult, bl as ProductDetailTag, bm as ProductDetailUnavailableReason, bn as ProductDetailVariant, bo as ProductDetailVariantOptionValue, bp as ProductDetailVideo, bq as ProductHrefGroup, br as ProductHrefOptions, bs as ProductHrefProduct, bt as ProductListingCard, bu as ProductListingCardOptions, bv as ProductListingCardPriceRange, bw as ProductListingCardRepresentativeVariant, bx as ProductListingGroup, by as ProductListingGroupSummary, bz as ProductListingGroupVariant, ai as ProductListingGroupsItem, bA as ProductListingGroupsProduct, bB as ProductListingGroupsResponse, bC as ProductListingProductShape, bD as ProductListingProjection, bE as ProductListingSwatch, bF as ProductMediaResolutionSource, bG as ProductOptionMatrix, bH as ProductOptionMatrixOption, bI as ProductOptionMatrixValue, bJ as ProductOptionMatrixVariant, bK as ProductOptionShape, bL as ProductOptionValueShape, bM as ProductOptionValueSwatch, bN as ProductOptionValueSwatchInput, bO as ProductSelectionAvailableSwatch, bP as ProductSelectionAvailableValue, bQ as ProductSelectionByOptionValue, bR as ProductSelectionCodecError, bS as ProductSelectionCodecOptions, bT as ProductSelectionInput, bU as ProductSelectionOptionValue, bV as ProductSelectionResolution, bW as ProductSelectionResolutionContext, bX as ProductSelectionUrlEmit, bY as ProductSelectionVariant, bZ as ProductUpsertFieldValidationErrorBody, b_ as ProductUpsertFieldValidationErrorReason, b$ as ProductVariantShape, c0 as RemoveDiscountParams, c1 as RemoveItemParams, c2 as RequestOptions, c3 as ResolveCancelRefundFailedResponse, c4 as ResolveCancelRefundOutcome, c5 as ResolveCancelRefundParams, c6 as ResolveCancelRefundResponse, c7 as ResolveCancelRefundSucceededResponse, c8 as ResolveProductDisplayMediaInput, c9 as ResolveProductDisplayMediaResult, R as RetryConfig, ca as ReturnItem, cb as ReturnReason, cc as ReturnWithRefundItem, cd as ReturnWithRefundParams, i as RootClient, j as RootCollectionClient, k as RootReadOnlyQueryBuilder, l as ServerApiOptions, ce as ShippingApi, cf as ShippingApiOptions, S as Sort, cg as StockCheckParams, ch as StockCheckResponse, ci as StockCheckResult, cj as StockSnapshotItem, ck as StockSnapshotParams, cl as UpdateFulfillmentParams, cm as UpdateItemParams, cn as UpdateOrderParams, af as UpdateProfileData, co as UpdateReturnParams, cp as UpdateTransactionParams, cq as ValidateDiscountParams, cr as ValidateDiscountResult, W as Where, cs as WithIdempotencyKey, ct as buildProductHref, cu as buildProductListingCard, cv as buildProductListingGroupsByOption, cw as buildProductListingProjection, cx as buildProductOptionMatrix, cy as buildProductOptionMatrixFromDetail, cz as createProductSelectionCodec, cA as getAvailableOptionValues, cB as getProductSelectionImages, cC as getSelectedValueByOptionId, cD as isProductUpsertFieldValidationErrorBody, cE as normalizeProductSelection, cF as normalizeProductSelectionFromMatrix, cG as normalizeSelectedValueIds, cH as parseProductSelection, cI as resolveListingPrimaryImagePointer, cJ as resolveProductDisplayMedia, cK as resolveProductSelection, cL as resolveProductSelectionFromMatrix, cM as resolveProductSelectionMedia, cN as resolveVariantForSelection, cO as selectNext, cP as selectedSwatchMediaItemId, cQ as stringifyProductSelection, cR as toShopifyPriceRangeV2 } from './types-Dib-zdK6.cjs';
|
|
3
|
+
import { P as Product } from './payload-types-BCui2Oml.cjs';
|
|
4
|
+
export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, i as Cart, j as CartItem, D as Document, I as Image, O as Order, c as Post, k as PostCategory, l as ProductVariant, T as Tenant, V as Video } from './payload-types-BCui2Oml.cjs';
|
|
5
|
+
export { C as CollectionType, P as Product, a as ProductCollection } from './types-CEzLf3PX.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 CommerceNotificationEventName, m as CommerceNotificationSource, n as CommerceNotificationSourceCollection, o as CommerceNotificationWebhookEvent, p as CustomerAuthWebhookEvent, q as CustomerAuthWebhookHandlers, r as CustomerPasswordResetWebhookData, s as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, t as OrderChangedWebhookEvent, W as WebhookChange, u as WebhookCommerceNotificationChange, v as WebhookEvent, w as WebhookHandler, x as WebhookKnownOperation, y as WebhookOperation, z as WebhookOptions, A as WebhookOrderChange, B as WebhookOrderMoved, D as WebhookOrderScope, E as createCommerceEmailWebhookHandler, F as createCustomerAuthWebhookHandler, G as createTypedWebhookHandler, H as defineCommerceEmailConfig, I as getCommerceNotificationIdempotencyKey, J as handleWebhook, K as isCommerceNotificationWebhookEvent, L as isCustomerPasswordResetWebhookEvent, M as isOrderChangedWebhookEvent, N as isValidWebhookEvent, P as isWebhookCollection, Q as isWebhookOperation } from './index-BHDKJ6B3.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-DVcM7Ac_.cjs';
|
|
8
8
|
export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
|
|
9
9
|
export { a as IMAGE_SIZES, I as ImageData, b as ImagePalette, c as ImagePlaceholderOptions, g as getImageLqip, d as getImagePalette, e as getImagePlaceholderStyle, f as getImageSrcSet, h as getImageUrl } from './image-BDz2-AaO.cjs';
|
|
10
10
|
export { V as VideoGifOptions, a as VideoThumbnailOptions, g as getVideoGif, b as getVideoMp4Url, c as getVideoStoryboard, d as getVideoStreamUrl, e as getVideoThumbnail } from './video-WR_TFO9a.cjs';
|
|
11
11
|
export { Analytics, AnalyticsConfig, createAnalytics } from './analytics.cjs';
|
|
12
|
-
export {
|
|
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';
|
|
13
13
|
|
|
14
14
|
type ProductDetailStockMergeStatus = 'complete' | 'partial';
|
|
15
15
|
interface MergedProductDetailResult {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { aj as ProductDetail, ak as ProductDetailCatalog, al as StockSnapshotResponse, am as ProductSelectionMediaSource, an as ProductDisplayMediaSource, ao as ResolveProductSelectionMediaInput, ap as ResolveProductSelectionMediaResult, aq as ProductSelectionMediaPointer, d as ClientConfig, ar as RootClientWithEvents } from './types-
|
|
2
|
-
export { as as AddItemParams, A as ApiQueryOptions, at as ApplyDiscountParams, B as BaseApi, au as BulkImportFulfillmentsParams, av as BulkImportFulfillmentsResponse, aw as CalculateShippingParams, ax as CalculateShippingResult, ay as CancelOrderParams, az as CancelOrderReconciliationStatus, aA as CancelOrderResponse, aB as CancelReasonCode, aC as CartApi, aD as CartApiOptions, aE as CheckoutParams, aF as ClearCartParams, i as Client, e as ClientMetadata, c as ClientState, i as ClientType, aG as Comment, C as CommerceClient, aH as CommerceClientOptions, a as CommunityClient, aI as CommunityClientOptions, aJ as CommunityComment, aK as CommunityCommentListSort, aL as CommunityPost, aM as CommunityPostCategory, aN as CommunityPostListSort, aO as CommunityPostTag, aP as CompatibilityProductSelectionParamEvent, aQ as ConfirmPaymentParams, aR as ConfirmPaymentResponse, aS as CreateFulfillmentParams, aT as CreateOrderItem, aU as CreateOrderParams, aV as CreateReturnParams, a8 as CustomerAuth, aW as CustomerAuthOptions, aa as CustomerAuthResponse, ab as CustomerLoginData, b as CustomerNamespace, a9 as CustomerProfile, ae as CustomerRefreshResponse, ad as CustomerRegisterData, ac as CustomerRegisterResponse, aX as CustomerSnapshot, D as DebugConfig, f as DeepPartial, aY as DiscountApi, aZ as DiscountApiOptions, t as EventGuestCancelParams, u as EventGuestRegistration, v as EventGuestRegistrationResponse, w as EventRegistrationAnswerInput, x as EventRegistrationAttendeeInput, y as EventRegistrationPublic, z as EventRegistrationRegisterParams, F as EventRegistrationRegisterResponse, G as EventsCalendarItem, E as EventsClient, H as EventsClientOptions, I as EventsDateParam, J as EventsExternalSource, K as EventsLocation, L as EventsOccurrenceLocation, M as EventsRangeEvent, N as EventsRangeOccurrence, O as EventsRangeParams, Q as EventsRangeResponse, V as EventsTaxonomyItem, g as ExtractArrayType, a_ as LegacyProductSelectionParamEvent, a$ as
|
|
3
|
-
import { P as Product } from './payload-types-
|
|
4
|
-
export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, i as Cart, j as CartItem, D as Document, I as Image, O as Order, c as Post, k as PostCategory, l as ProductVariant, T as Tenant, V as Video } from './payload-types-
|
|
5
|
-
export { C as CollectionType, P as Product, a as ProductCollection } from './types-
|
|
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 CommerceNotificationEventName, m as CommerceNotificationSource, n as CommerceNotificationSourceCollection, o as CommerceNotificationWebhookEvent, p as CustomerAuthWebhookEvent, q as CustomerAuthWebhookHandlers, r as CustomerPasswordResetWebhookData, s as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, t as OrderChangedWebhookEvent, W as WebhookChange, u as WebhookCommerceNotificationChange, v as WebhookEvent, w as WebhookHandler, x as WebhookKnownOperation, y as WebhookOperation, z as WebhookOptions, A as WebhookOrderChange, B as WebhookOrderMoved, D as WebhookOrderScope, E as createCommerceEmailWebhookHandler, F as createCustomerAuthWebhookHandler, G as createTypedWebhookHandler, H as defineCommerceEmailConfig, I as getCommerceNotificationIdempotencyKey, J as handleWebhook, K as isCommerceNotificationWebhookEvent, L as isCustomerPasswordResetWebhookEvent, M as isOrderChangedWebhookEvent, N as isValidWebhookEvent, P as isWebhookCollection, Q 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 { aj as ProductDetail, ak as ProductDetailCatalog, al as StockSnapshotResponse, am as ProductSelectionMediaSource, an as ProductDisplayMediaSource, ao as ResolveProductSelectionMediaInput, ap as ResolveProductSelectionMediaResult, aq as ProductSelectionMediaPointer, d as ClientConfig, ar as RootClientWithEvents } from './types-DK9EnLwJ.js';
|
|
2
|
+
export { as as AddItemParams, A as ApiQueryOptions, at as ApplyDiscountParams, B as BaseApi, au as BulkImportFulfillmentsParams, av as BulkImportFulfillmentsResponse, aw as CalculateShippingParams, ax as CalculateShippingResult, ay as CancelOrderParams, az as CancelOrderReconciliationStatus, aA as CancelOrderResponse, aB as CancelReasonCode, aC as CartApi, aD as CartApiOptions, aE as CheckoutParams, aF as ClearCartParams, i as Client, e as ClientMetadata, c as ClientState, i as ClientType, aG as Comment, C as CommerceClient, aH as CommerceClientOptions, a as CommunityClient, aI as CommunityClientOptions, aJ as CommunityComment, aK as CommunityCommentListSort, aL as CommunityPost, aM as CommunityPostCategory, aN as CommunityPostListSort, aO as CommunityPostTag, aP as CompatibilityProductSelectionParamEvent, aQ as ConfirmPaymentParams, aR as ConfirmPaymentResponse, aS as CreateFulfillmentParams, aT as CreateOrderItem, aU as CreateOrderParams, aV as CreateReturnParams, a8 as CustomerAuth, aW as CustomerAuthOptions, aa as CustomerAuthResponse, ab as CustomerLoginData, b as CustomerNamespace, a9 as CustomerProfile, ae as CustomerRefreshResponse, ad as CustomerRegisterData, ac as CustomerRegisterResponse, aX as CustomerSnapshot, D as DebugConfig, f as DeepPartial, aY as DiscountApi, aZ as DiscountApiOptions, t as EventGuestCancelParams, u as EventGuestRegistration, v as EventGuestRegistrationResponse, w as EventRegistrationAnswerInput, x as EventRegistrationAttendeeInput, y as EventRegistrationPublic, z as EventRegistrationRegisterParams, F as EventRegistrationRegisterResponse, G as EventsCalendarItem, E as EventsClient, H as EventsClientOptions, I as EventsDateParam, J as EventsExternalSource, K as EventsLocation, L as EventsOccurrenceLocation, M as EventsRangeEvent, N as EventsRangeOccurrence, O as EventsRangeParams, Q as EventsRangeResponse, V as EventsTaxonomyItem, g as ExtractArrayType, a_ as LegacyProductSelectionParamEvent, a$ as ListingGroupsParams, b0 as ListingPrimaryImageFallbackInput, b1 as MediaValue, b2 as NormalizedOptionSwatch, b3 as NormalizedProductSelection, b4 as OrderApi, b5 as OrderApiOptions, b6 as PRODUCT_UPSERT_READONLY_FIELD_REASON, b7 as PRODUCT_UPSERT_UNKNOWN_FIELD_REASON, P as PayloadFindResponse, h as PayloadMutationResponse, b8 as ProductApi, b9 as ProductApiOptions, ba as ProductDetailBrand, bb as ProductDetailCatalogListing, bc as ProductDetailCatalogResult, bd as ProductDetailCatalogVariant, be as ProductDetailCategory, bf as ProductDetailImage, bg as ProductDetailImageMedia, bh as ProductDetailListing, bi as ProductDetailMedia, bj as ProductDetailOption, bk as ProductDetailOptionValue, ag as ProductDetailParams, ah as ProductDetailResult, bl as ProductDetailTag, bm as ProductDetailUnavailableReason, bn as ProductDetailVariant, bo as ProductDetailVariantOptionValue, bp as ProductDetailVideo, bq as ProductHrefGroup, br as ProductHrefOptions, bs as ProductHrefProduct, bt as ProductListingCard, bu as ProductListingCardOptions, bv as ProductListingCardPriceRange, bw as ProductListingCardRepresentativeVariant, bx as ProductListingGroup, by as ProductListingGroupSummary, bz as ProductListingGroupVariant, ai as ProductListingGroupsItem, bA as ProductListingGroupsProduct, bB as ProductListingGroupsResponse, bC as ProductListingProductShape, bD as ProductListingProjection, bE as ProductListingSwatch, bF as ProductMediaResolutionSource, bG as ProductOptionMatrix, bH as ProductOptionMatrixOption, bI as ProductOptionMatrixValue, bJ as ProductOptionMatrixVariant, bK as ProductOptionShape, bL as ProductOptionValueShape, bM as ProductOptionValueSwatch, bN as ProductOptionValueSwatchInput, bO as ProductSelectionAvailableSwatch, bP as ProductSelectionAvailableValue, bQ as ProductSelectionByOptionValue, bR as ProductSelectionCodecError, bS as ProductSelectionCodecOptions, bT as ProductSelectionInput, bU as ProductSelectionOptionValue, bV as ProductSelectionResolution, bW as ProductSelectionResolutionContext, bX as ProductSelectionUrlEmit, bY as ProductSelectionVariant, bZ as ProductUpsertFieldValidationErrorBody, b_ as ProductUpsertFieldValidationErrorReason, b$ as ProductVariantShape, c0 as RemoveDiscountParams, c1 as RemoveItemParams, c2 as RequestOptions, c3 as ResolveCancelRefundFailedResponse, c4 as ResolveCancelRefundOutcome, c5 as ResolveCancelRefundParams, c6 as ResolveCancelRefundResponse, c7 as ResolveCancelRefundSucceededResponse, c8 as ResolveProductDisplayMediaInput, c9 as ResolveProductDisplayMediaResult, R as RetryConfig, ca as ReturnItem, cb as ReturnReason, cc as ReturnWithRefundItem, cd as ReturnWithRefundParams, i as RootClient, j as RootCollectionClient, k as RootReadOnlyQueryBuilder, l as ServerApiOptions, ce as ShippingApi, cf as ShippingApiOptions, S as Sort, cg as StockCheckParams, ch as StockCheckResponse, ci as StockCheckResult, cj as StockSnapshotItem, ck as StockSnapshotParams, cl as UpdateFulfillmentParams, cm as UpdateItemParams, cn as UpdateOrderParams, af as UpdateProfileData, co as UpdateReturnParams, cp as UpdateTransactionParams, cq as ValidateDiscountParams, cr as ValidateDiscountResult, W as Where, cs as WithIdempotencyKey, ct as buildProductHref, cu as buildProductListingCard, cv as buildProductListingGroupsByOption, cw as buildProductListingProjection, cx as buildProductOptionMatrix, cy as buildProductOptionMatrixFromDetail, cz as createProductSelectionCodec, cA as getAvailableOptionValues, cB as getProductSelectionImages, cC as getSelectedValueByOptionId, cD as isProductUpsertFieldValidationErrorBody, cE as normalizeProductSelection, cF as normalizeProductSelectionFromMatrix, cG as normalizeSelectedValueIds, cH as parseProductSelection, cI as resolveListingPrimaryImagePointer, cJ as resolveProductDisplayMedia, cK as resolveProductSelection, cL as resolveProductSelectionFromMatrix, cM as resolveProductSelectionMedia, cN as resolveVariantForSelection, cO as selectNext, cP as selectedSwatchMediaItemId, cQ as stringifyProductSelection, cR as toShopifyPriceRangeV2 } from './types-DK9EnLwJ.js';
|
|
3
|
+
import { P as Product } from './payload-types-BCui2Oml.js';
|
|
4
|
+
export { A as Article, f as ArticleAuthor, g as ArticleCategory, h as ArticleTag, i as Cart, j as CartItem, D as Document, I as Image, O as Order, c as Post, k as PostCategory, l as ProductVariant, T as Tenant, V as Video } from './payload-types-BCui2Oml.js';
|
|
5
|
+
export { C as CollectionType, P as Product, a as ProductCollection } from './types-3qV6sY7T.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 CommerceNotificationEventName, m as CommerceNotificationSource, n as CommerceNotificationSourceCollection, o as CommerceNotificationWebhookEvent, p as CustomerAuthWebhookEvent, q as CustomerAuthWebhookHandlers, r as CustomerPasswordResetWebhookData, s as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, t as OrderChangedWebhookEvent, W as WebhookChange, u as WebhookCommerceNotificationChange, v as WebhookEvent, w as WebhookHandler, x as WebhookKnownOperation, y as WebhookOperation, z as WebhookOptions, A as WebhookOrderChange, B as WebhookOrderMoved, D as WebhookOrderScope, E as createCommerceEmailWebhookHandler, F as createCustomerAuthWebhookHandler, G as createTypedWebhookHandler, H as defineCommerceEmailConfig, I as getCommerceNotificationIdempotencyKey, J as handleWebhook, K as isCommerceNotificationWebhookEvent, L as isCustomerPasswordResetWebhookEvent, M as isOrderChangedWebhookEvent, N as isValidWebhookEvent, P as isWebhookCollection, Q as isWebhookOperation } from './index-DTSXUYkr.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-BDUKFP9w.js';
|
|
8
8
|
export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.js';
|
|
9
9
|
export { a as IMAGE_SIZES, I as ImageData, b as ImagePalette, c as ImagePlaceholderOptions, g as getImageLqip, d as getImagePalette, e as getImagePlaceholderStyle, f as getImageSrcSet, h as getImageUrl } from './image-BDz2-AaO.js';
|
|
10
10
|
export { V as VideoGifOptions, a as VideoThumbnailOptions, g as getVideoGif, b as getVideoMp4Url, c as getVideoStoryboard, d as getVideoStreamUrl, e as getVideoThumbnail } from './video-WR_TFO9a.js';
|
|
11
11
|
export { Analytics, AnalyticsConfig, createAnalytics } from './analytics.js';
|
|
12
|
-
export {
|
|
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';
|
|
13
13
|
|
|
14
14
|
type ProductDetailStockMergeStatus = 'complete' | 'partial';
|
|
15
15
|
interface MergedProductDetailResult {
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/core/collection/http-client.ts
|
|
2
2
|
import { stringify } from "qs-esm";
|
|
3
3
|
|
|
4
|
-
// src/core/
|
|
4
|
+
// src/core/errors.ts
|
|
5
5
|
var SDKError = class extends Error {
|
|
6
6
|
constructor(code, message, status, details, userMessage, suggestion, requestId) {
|
|
7
7
|
super(message);
|
|
@@ -1796,6 +1796,20 @@ var OrderApi = class extends BaseApi {
|
|
|
1796
1796
|
idempotencyKey ? { headers: { "X-Idempotency-Key": idempotencyKey } } : void 0
|
|
1797
1797
|
);
|
|
1798
1798
|
}
|
|
1799
|
+
resolveCancelRefund(params) {
|
|
1800
|
+
return this.request(
|
|
1801
|
+
"/api/orders/resolve-cancel-refund",
|
|
1802
|
+
{
|
|
1803
|
+
orderNumber: params.orderNumber,
|
|
1804
|
+
idempotencyKey: params.idempotencyKey,
|
|
1805
|
+
outcome: params.outcome,
|
|
1806
|
+
refundedAmount: params.refundedAmount,
|
|
1807
|
+
pgProvider: params.pgProvider,
|
|
1808
|
+
...params.pgRefundId ? { pgRefundId: params.pgRefundId } : {}
|
|
1809
|
+
},
|
|
1810
|
+
idempotencyRequestOptions(params.idempotencyKey)
|
|
1811
|
+
);
|
|
1812
|
+
}
|
|
1799
1813
|
checkout(params) {
|
|
1800
1814
|
const { body, idempotencyKey } = splitIdempotencyKey(params);
|
|
1801
1815
|
return this.request(
|
|
@@ -4275,10 +4289,12 @@ function buildProductListingCard(item, options = {}) {
|
|
|
4275
4289
|
const listingPrimaryMedia = listingPrimaryPointer ? productMediaPool.find(
|
|
4276
4290
|
(item2) => getRelationID(item2) === listingPrimaryPointer
|
|
4277
4291
|
) ?? resolvedPrimaryMedia.primaryImage ?? null : null;
|
|
4278
|
-
const priceRange =
|
|
4279
|
-
|
|
4280
|
-
|
|
4292
|
+
const priceRange = resolveListingCardPriceRange(
|
|
4293
|
+
product,
|
|
4294
|
+
projectedListing,
|
|
4295
|
+
groups
|
|
4281
4296
|
);
|
|
4297
|
+
const availableForSale = product.listing?.availableForSale != null ? product.listing.availableForSale : groups.length > 0 ? groups.some((group) => group.listing.availableForSale) : projectedListing.availableForSale;
|
|
4282
4298
|
const swatches = groups.length > 1 ? groups.map((group) => buildListingSwatch(product, group, options)) : [];
|
|
4283
4299
|
return {
|
|
4284
4300
|
id: String(product.id),
|
|
@@ -4318,6 +4334,42 @@ function findListingCardRepresentativeVariant(variants, representativeVariantId)
|
|
|
4318
4334
|
(variant) => getRelationID(variant.id) === representativeVariantId
|
|
4319
4335
|
) ?? null;
|
|
4320
4336
|
}
|
|
4337
|
+
function toShopifyPriceRangeV2(listing) {
|
|
4338
|
+
return {
|
|
4339
|
+
minVariantPrice: { amount: listing.minPrice ?? null },
|
|
4340
|
+
maxVariantPrice: { amount: listing.maxPrice ?? null }
|
|
4341
|
+
};
|
|
4342
|
+
}
|
|
4343
|
+
function hasCompleteListingPriceProjection(listing) {
|
|
4344
|
+
return listing?.minPrice != null && listing?.maxPrice != null;
|
|
4345
|
+
}
|
|
4346
|
+
function listingDefinesCompareAtProjection(listing) {
|
|
4347
|
+
return "minCompareAtPrice" in listing || "maxCompareAtPrice" in listing;
|
|
4348
|
+
}
|
|
4349
|
+
function resolveListingCardPriceRange(product, projectedListing, groups) {
|
|
4350
|
+
const listing = product.listing;
|
|
4351
|
+
if (hasCompleteListingPriceProjection(listing)) {
|
|
4352
|
+
const groupRange = groups.length > 0 ? aggregateListingPriceRange(groups) : null;
|
|
4353
|
+
const definesCompareAt = listingDefinesCompareAtProjection(listing);
|
|
4354
|
+
return {
|
|
4355
|
+
minPrice: listing.minPrice,
|
|
4356
|
+
maxPrice: listing.maxPrice,
|
|
4357
|
+
minCompareAtPrice: definesCompareAt ? listing.minCompareAtPrice ?? null : groupRange?.minCompareAtPrice ?? projectedListing.minCompareAtPrice,
|
|
4358
|
+
maxCompareAtPrice: definesCompareAt ? listing.maxCompareAtPrice ?? null : groupRange?.maxCompareAtPrice ?? projectedListing.maxCompareAtPrice,
|
|
4359
|
+
isPriceRange: listing.isPriceRange ?? listing.minPrice !== listing.maxPrice
|
|
4360
|
+
};
|
|
4361
|
+
}
|
|
4362
|
+
if (groups.length > 0) {
|
|
4363
|
+
return aggregateListingPriceRange(groups);
|
|
4364
|
+
}
|
|
4365
|
+
return {
|
|
4366
|
+
minPrice: projectedListing.minPrice,
|
|
4367
|
+
maxPrice: projectedListing.maxPrice,
|
|
4368
|
+
minCompareAtPrice: projectedListing.minCompareAtPrice,
|
|
4369
|
+
maxCompareAtPrice: projectedListing.maxCompareAtPrice,
|
|
4370
|
+
isPriceRange: projectedListing.isPriceRange
|
|
4371
|
+
};
|
|
4372
|
+
}
|
|
4321
4373
|
function aggregateListingPriceRange(groups) {
|
|
4322
4374
|
const minPrice = minOfNullable(groups.map((g) => g.listing.minPrice));
|
|
4323
4375
|
const maxPrice = maxOfNullable(groups.map((g) => g.listing.maxPrice));
|
|
@@ -4978,6 +5030,7 @@ export {
|
|
|
4978
5030
|
resolveVariantForSelection,
|
|
4979
5031
|
selectNext,
|
|
4980
5032
|
selectedSwatchMediaItemId,
|
|
4981
|
-
stringifyProductSelection
|
|
5033
|
+
stringifyProductSelection,
|
|
5034
|
+
toShopifyPriceRangeV2
|
|
4982
5035
|
};
|
|
4983
5036
|
//# sourceMappingURL=index.js.map
|