@01.software/sdk 0.37.0 → 0.38.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 +75 -53
- package/dist/client.cjs +67 -104
- 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 +67 -104
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-zOmnxwdA.d.cts → collection-client-B0J9wMNE.d.cts} +5 -5
- package/dist/{collection-client-DyELGUcL.d.ts → collection-client-BroIWHY1.d.ts} +5 -5
- package/dist/const-6XHz_jej.d.ts +32 -0
- package/dist/const-B5KT72c7.d.cts +32 -0
- package/dist/{index-DRJs7QIh.d.cts → index-BOLQxveo.d.cts} +3 -3
- package/dist/{index-DTqoUZk_.d.ts → index-CSwR2HSg.d.ts} +3 -3
- package/dist/index.cjs +95 -123
- 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 +95 -123
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-CREOjFNT.d.cts → payload-types-m3jjhxk9.d.cts} +418 -106
- package/dist/{payload-types-CREOjFNT.d.ts → payload-types-m3jjhxk9.d.ts} +418 -106
- package/dist/query.cjs +3 -1035
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +13 -13
- package/dist/query.d.ts +13 -13
- package/dist/query.js +3 -1035
- 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 +42 -21
- 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 +42 -21
- package/dist/server.js.map +1 -1
- package/dist/{types-DMvVHdb1.d.ts → types-CIGscmus.d.cts} +1455 -1208
- package/dist/{types-CxzWHspI.d.ts → types-Cmrd1ezc.d.ts} +1 -15
- package/dist/{types-BkZNhuBh.d.cts → types-D0ubzQw0.d.cts} +1 -15
- package/dist/{types-BWMUr3Zw.d.cts → types-D2xYdz4P.d.ts} +1455 -1208
- 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 +3 -3
- package/dist/const-CK_FPaIn.d.cts +0 -32
- package/dist/const-Dqz05oaG.d.ts +0 -32
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { P as Product } from './payload-types-
|
|
4
|
-
export { A as Article,
|
|
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 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 { az as ProductDetail, aA as ProductDetailCatalog, aB as StockSnapshotResponse, aC as ProductSelectionMediaSource, aD as ProductDisplayMediaSource, aE as ResolveProductSelectionMediaInput, aF as ResolveProductSelectionMediaResult, aG as ProductSelectionMediaPointer, d as ClientConfig, aH as RootClientWithEvents } from './types-CIGscmus.cjs';
|
|
2
|
+
export { A as AddItemParams, e as ApiQueryOptions, f as ApplyDiscountParams, B as BaseApi, aI as BulkImportFulfillmentsParams, aJ as BulkImportFulfillmentsResponse, aK as CalculateShippingParams, aL as CalculateShippingResult, aM as CancelOrderParams, aN as CancelOrderReconciliationStatus, aO as CancelOrderResponse, aP as CancelReasonCode, aQ as CartApi, aR as CartApiOptions, g as CheckoutParams, h as ClearCartParams, w as Client, i as ClientMetadata, c as ClientState, w as ClientType, aS as Comment, C as CommerceClient, aT as CommerceClientOptions, a as CommunityClient, aU as CommunityClientOptions, aV as CommunityComment, aW as CommunityCommentListSort, aX as CommunityPost, aY as CommunityPostCategory, aZ as CommunityPostListSort, a_ as CommunityPostTag, a$ as CommunityPublicAuthorSnapshot, b0 as CommunityPublicMediaAsset, b1 as CommunityPublicReference, b2 as CompatibilityProductSelectionParamEvent, b3 as ConfirmPaymentParams, b4 as ConfirmPaymentResponse, b5 as CreateFulfillmentParams, b6 as CreateOrderItem, b7 as CreateOrderParams, b8 as CreateReturnParams, an as CustomerAuth, b9 as CustomerAuthOptions, ap as CustomerAuthResponse, aq as CustomerLoginData, b as CustomerNamespace, ao as CustomerProfile, at as CustomerRefreshResponse, as as CustomerRegisterData, ar as CustomerRegisterResponse, ba as CustomerSnapshot, D as DebugConfig, j as DeepPartial, bb as DiscountApi, bc as DiscountApiOptions, N as EventGuestCancelParams, O as EventGuestRegistration, Q as EventGuestRegistrationResponse, V as EventRegistrationAnswerInput, X as EventRegistrationAttendeeInput, Y as EventRegistrationPublic, Z as EventRegistrationRegisterParams, _ as EventRegistrationRegisterResponse, $ as EventsCalendarItem, E as EventsClient, a0 as EventsClientOptions, a1 as EventsDateParam, a2 as EventsExternalSource, a3 as EventsLocation, a4 as EventsOccurrenceLocation, a5 as EventsRangeEvent, a6 as EventsRangeOccurrence, a7 as EventsRangeParams, a8 as EventsRangeResponse, a9 as EventsTaxonomyItem, k as ExtractArrayType, bd as LegacyProductSelectionParamEvent, be as ListingGroupsParams, bf as ListingPrimaryImageFallbackInput, bg as MediaValue, bh as NormalizedOptionSwatch, bi as NormalizedProductSelection, bj as OrderApi, bk as OrderApiOptions, bl as PRODUCT_PLP_FIND_OPTIONS, bm as PRODUCT_UPSERT_READONLY_FIELD_REASON, bn as PRODUCT_UPSERT_UNKNOWN_FIELD_REASON, P as PayloadFindResponse, l as PayloadMutationResponse, bo as PrepareFulfillmentOrderParams, bp as PrepareFulfillmentOrderResponse, bq as ProductApi, br as ProductApiOptions, bs as ProductDetailBrand, bt as ProductDetailCatalogListing, bu as ProductDetailCatalogResult, bv as ProductDetailCatalogVariant, bw as ProductDetailCategory, bx as ProductDetailImage, by as ProductDetailImageMedia, bz as ProductDetailListing, bA as ProductDetailMedia, bB as ProductDetailOption, bC as ProductDetailOptionValue, av as ProductDetailParams, aw as ProductDetailResult, bD as ProductDetailTag, bE as ProductDetailUnavailableReason, bF as ProductDetailVariant, bG as ProductDetailVariantOptionValue, bH as ProductDetailVideo, bI as ProductHrefGroup, bJ as ProductHrefOptions, bK as ProductHrefProduct, bL as ProductListingCard, bM as ProductListingCardOptions, bN as ProductListingCardPriceRange, bO as ProductListingCardRepresentativeVariant, bP as ProductListingGroup, bQ as ProductListingGroupCatalogSummary, bR as ProductListingGroupCatalogVariant, bS as ProductListingGroupSummary, bT as ProductListingGroupVariant, ay as ProductListingGroupsCatalogItem, bU as ProductListingGroupsCatalogProduct, bV as ProductListingGroupsCatalogResponse, ax as ProductListingGroupsItem, bW as ProductListingGroupsProduct, bX as ProductListingGroupsResponse, bY as ProductListingProductShape, bZ as ProductListingProjection, b_ as ProductListingSwatch, b$ as ProductMediaResolutionSource, c0 as ProductOptionMatrix, c1 as ProductOptionMatrixOption, c2 as ProductOptionMatrixValue, c3 as ProductOptionMatrixVariant, c4 as ProductOptionShape, c5 as ProductOptionValueShape, c6 as ProductOptionValueSwatch, c7 as ProductOptionValueSwatchInput, c8 as ProductSelectionAvailableSwatch, c9 as ProductSelectionAvailableValue, ca as ProductSelectionByOptionValue, cb as ProductSelectionCodecError, cc as ProductSelectionCodecOptions, cd as ProductSelectionInput, ce as ProductSelectionOptionValue, cf as ProductSelectionResolution, cg as ProductSelectionResolutionContext, ch as ProductSelectionUrlEmit, ci as ProductSelectionVariant, cj as ProductUpsertFieldValidationErrorBody, ck as ProductUpsertFieldValidationErrorReason, cl as ProductVariantShape, m as PublicCart, n as PublicCartItem, o as PublicCartReference, p as PublicMediaAsset, q as PublicMediaSize, r as PublicOrder, s as PublicOrderItem, t as PublicOrderReference, R as RemoveDiscountParams, u as RemoveItemParams, cm as RequestOptions, cn as ResolveCancelRefundFailedResponse, co as ResolveCancelRefundOutcome, cp as ResolveCancelRefundParams, cq as ResolveCancelRefundResponse, cr as ResolveCancelRefundSucceededResponse, cs as ResolveProductDisplayMediaInput, ct as ResolveProductDisplayMediaResult, v as RetryConfig, cu as ReturnItem, cv as ReturnReason, cw as ReturnWithRefundItem, cx as ReturnWithRefundParams, w as RootClient, x as RootCollectionClient, y as RootReadOnlyQueryBuilder, z as ServerApiOptions, cy as ShippingApi, cz as ShippingApiOptions, S as Sort, cA as StockCheckParams, cB as StockCheckResponse, cC as StockCheckResult, cD as StockSnapshotItem, cE as StockSnapshotParams, cF as UpdateFulfillmentParams, U as UpdateItemParams, cG as UpdateOrderParams, au as UpdateProfileData, cH as UpdateReturnParams, cI as UpdateTransactionParams, cJ as ValidateDiscountParams, cK as ValidateDiscountResult, W as Where, cL as WithIdempotencyKey, cM as buildProductHref, cN as buildProductListingCard, cO as buildProductListingGroupsByOption, cP as buildProductListingProjection, cQ as buildProductOptionMatrix, cR as buildProductOptionMatrixFromDetail, cS as createProductSelectionCodec, cT as getAvailableOptionValues, cU as getProductSelectionImages, cV as getSelectedValueByOptionId, cW as isProductUpsertFieldValidationErrorBody, cX as normalizeProductSelection, cY as normalizeProductSelectionFromMatrix, cZ as normalizeSelectedValueIds, c_ as parseProductSelection, c$ as resolveListingPrimaryImagePointer, d0 as resolveProductDisplayMedia, d1 as resolveProductSelection, d2 as resolveProductSelectionFromMatrix, d3 as resolveProductSelectionMedia, d4 as resolveVariantForSelection, d5 as selectNext, d6 as selectedSwatchMediaItemId, d7 as stringifyProductSelection, d8 as toShopifyPriceRangeV2 } from './types-CIGscmus.cjs';
|
|
3
|
+
import { P as Product } from './payload-types-m3jjhxk9.cjs';
|
|
4
|
+
export { A as Article, d as ArticleAuthor, e as ArticleCategory, f as ArticleTag, g as Cart, h as CartItem, D as Document, I as Image, O as Order, i as Post, j as PostCategory, k as ProductVariant, T as Tenant, V as Video } from './payload-types-m3jjhxk9.cjs';
|
|
5
|
+
export { C as CollectionType, P as Product, a as ProductCollection } from './types-D0ubzQw0.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-BOLQxveo.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-B5KT72c7.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';
|
|
@@ -38,14 +38,14 @@ type ResolveProductMediaResult<TMedia> = Omit<ResolveProductSelectionMediaResult
|
|
|
38
38
|
source: MediaPointerSource;
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
|
-
* @deprecated One-release shim for ADR
|
|
41
|
+
* @deprecated One-release shim for ADR 0025. Prefer
|
|
42
42
|
* `resolveProductSelectionMedia()`. Legacy direct-media fallbacks are ignored;
|
|
43
43
|
* callers fall through to product display media (`resolveProductDisplayMedia`)
|
|
44
44
|
* or `none`.
|
|
45
45
|
*/
|
|
46
46
|
declare function resolveProductMedia<TMedia>(input: ResolveProductMediaInput<TMedia>): ResolveProductMediaResult<TMedia>;
|
|
47
47
|
|
|
48
|
-
/** @deprecated ADR
|
|
48
|
+
/** @deprecated ADR 0025 replaces media sets with variant `images[]` subsets. */
|
|
49
49
|
type ProductMediaSetMatchType = 'default' | 'option-values' | 'exact-variant';
|
|
50
50
|
/** @deprecated Use `ResolveProductSelectionMediaInput` and variant `images[]`. */
|
|
51
51
|
type ProductMediaSetInput = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { P as Product } from './payload-types-
|
|
4
|
-
export { A as Article,
|
|
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 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 { az as ProductDetail, aA as ProductDetailCatalog, aB as StockSnapshotResponse, aC as ProductSelectionMediaSource, aD as ProductDisplayMediaSource, aE as ResolveProductSelectionMediaInput, aF as ResolveProductSelectionMediaResult, aG as ProductSelectionMediaPointer, d as ClientConfig, aH as RootClientWithEvents } from './types-D2xYdz4P.js';
|
|
2
|
+
export { A as AddItemParams, e as ApiQueryOptions, f as ApplyDiscountParams, B as BaseApi, aI as BulkImportFulfillmentsParams, aJ as BulkImportFulfillmentsResponse, aK as CalculateShippingParams, aL as CalculateShippingResult, aM as CancelOrderParams, aN as CancelOrderReconciliationStatus, aO as CancelOrderResponse, aP as CancelReasonCode, aQ as CartApi, aR as CartApiOptions, g as CheckoutParams, h as ClearCartParams, w as Client, i as ClientMetadata, c as ClientState, w as ClientType, aS as Comment, C as CommerceClient, aT as CommerceClientOptions, a as CommunityClient, aU as CommunityClientOptions, aV as CommunityComment, aW as CommunityCommentListSort, aX as CommunityPost, aY as CommunityPostCategory, aZ as CommunityPostListSort, a_ as CommunityPostTag, a$ as CommunityPublicAuthorSnapshot, b0 as CommunityPublicMediaAsset, b1 as CommunityPublicReference, b2 as CompatibilityProductSelectionParamEvent, b3 as ConfirmPaymentParams, b4 as ConfirmPaymentResponse, b5 as CreateFulfillmentParams, b6 as CreateOrderItem, b7 as CreateOrderParams, b8 as CreateReturnParams, an as CustomerAuth, b9 as CustomerAuthOptions, ap as CustomerAuthResponse, aq as CustomerLoginData, b as CustomerNamespace, ao as CustomerProfile, at as CustomerRefreshResponse, as as CustomerRegisterData, ar as CustomerRegisterResponse, ba as CustomerSnapshot, D as DebugConfig, j as DeepPartial, bb as DiscountApi, bc as DiscountApiOptions, N as EventGuestCancelParams, O as EventGuestRegistration, Q as EventGuestRegistrationResponse, V as EventRegistrationAnswerInput, X as EventRegistrationAttendeeInput, Y as EventRegistrationPublic, Z as EventRegistrationRegisterParams, _ as EventRegistrationRegisterResponse, $ as EventsCalendarItem, E as EventsClient, a0 as EventsClientOptions, a1 as EventsDateParam, a2 as EventsExternalSource, a3 as EventsLocation, a4 as EventsOccurrenceLocation, a5 as EventsRangeEvent, a6 as EventsRangeOccurrence, a7 as EventsRangeParams, a8 as EventsRangeResponse, a9 as EventsTaxonomyItem, k as ExtractArrayType, bd as LegacyProductSelectionParamEvent, be as ListingGroupsParams, bf as ListingPrimaryImageFallbackInput, bg as MediaValue, bh as NormalizedOptionSwatch, bi as NormalizedProductSelection, bj as OrderApi, bk as OrderApiOptions, bl as PRODUCT_PLP_FIND_OPTIONS, bm as PRODUCT_UPSERT_READONLY_FIELD_REASON, bn as PRODUCT_UPSERT_UNKNOWN_FIELD_REASON, P as PayloadFindResponse, l as PayloadMutationResponse, bo as PrepareFulfillmentOrderParams, bp as PrepareFulfillmentOrderResponse, bq as ProductApi, br as ProductApiOptions, bs as ProductDetailBrand, bt as ProductDetailCatalogListing, bu as ProductDetailCatalogResult, bv as ProductDetailCatalogVariant, bw as ProductDetailCategory, bx as ProductDetailImage, by as ProductDetailImageMedia, bz as ProductDetailListing, bA as ProductDetailMedia, bB as ProductDetailOption, bC as ProductDetailOptionValue, av as ProductDetailParams, aw as ProductDetailResult, bD as ProductDetailTag, bE as ProductDetailUnavailableReason, bF as ProductDetailVariant, bG as ProductDetailVariantOptionValue, bH as ProductDetailVideo, bI as ProductHrefGroup, bJ as ProductHrefOptions, bK as ProductHrefProduct, bL as ProductListingCard, bM as ProductListingCardOptions, bN as ProductListingCardPriceRange, bO as ProductListingCardRepresentativeVariant, bP as ProductListingGroup, bQ as ProductListingGroupCatalogSummary, bR as ProductListingGroupCatalogVariant, bS as ProductListingGroupSummary, bT as ProductListingGroupVariant, ay as ProductListingGroupsCatalogItem, bU as ProductListingGroupsCatalogProduct, bV as ProductListingGroupsCatalogResponse, ax as ProductListingGroupsItem, bW as ProductListingGroupsProduct, bX as ProductListingGroupsResponse, bY as ProductListingProductShape, bZ as ProductListingProjection, b_ as ProductListingSwatch, b$ as ProductMediaResolutionSource, c0 as ProductOptionMatrix, c1 as ProductOptionMatrixOption, c2 as ProductOptionMatrixValue, c3 as ProductOptionMatrixVariant, c4 as ProductOptionShape, c5 as ProductOptionValueShape, c6 as ProductOptionValueSwatch, c7 as ProductOptionValueSwatchInput, c8 as ProductSelectionAvailableSwatch, c9 as ProductSelectionAvailableValue, ca as ProductSelectionByOptionValue, cb as ProductSelectionCodecError, cc as ProductSelectionCodecOptions, cd as ProductSelectionInput, ce as ProductSelectionOptionValue, cf as ProductSelectionResolution, cg as ProductSelectionResolutionContext, ch as ProductSelectionUrlEmit, ci as ProductSelectionVariant, cj as ProductUpsertFieldValidationErrorBody, ck as ProductUpsertFieldValidationErrorReason, cl as ProductVariantShape, m as PublicCart, n as PublicCartItem, o as PublicCartReference, p as PublicMediaAsset, q as PublicMediaSize, r as PublicOrder, s as PublicOrderItem, t as PublicOrderReference, R as RemoveDiscountParams, u as RemoveItemParams, cm as RequestOptions, cn as ResolveCancelRefundFailedResponse, co as ResolveCancelRefundOutcome, cp as ResolveCancelRefundParams, cq as ResolveCancelRefundResponse, cr as ResolveCancelRefundSucceededResponse, cs as ResolveProductDisplayMediaInput, ct as ResolveProductDisplayMediaResult, v as RetryConfig, cu as ReturnItem, cv as ReturnReason, cw as ReturnWithRefundItem, cx as ReturnWithRefundParams, w as RootClient, x as RootCollectionClient, y as RootReadOnlyQueryBuilder, z as ServerApiOptions, cy as ShippingApi, cz as ShippingApiOptions, S as Sort, cA as StockCheckParams, cB as StockCheckResponse, cC as StockCheckResult, cD as StockSnapshotItem, cE as StockSnapshotParams, cF as UpdateFulfillmentParams, U as UpdateItemParams, cG as UpdateOrderParams, au as UpdateProfileData, cH as UpdateReturnParams, cI as UpdateTransactionParams, cJ as ValidateDiscountParams, cK as ValidateDiscountResult, W as Where, cL as WithIdempotencyKey, cM as buildProductHref, cN as buildProductListingCard, cO as buildProductListingGroupsByOption, cP as buildProductListingProjection, cQ as buildProductOptionMatrix, cR as buildProductOptionMatrixFromDetail, cS as createProductSelectionCodec, cT as getAvailableOptionValues, cU as getProductSelectionImages, cV as getSelectedValueByOptionId, cW as isProductUpsertFieldValidationErrorBody, cX as normalizeProductSelection, cY as normalizeProductSelectionFromMatrix, cZ as normalizeSelectedValueIds, c_ as parseProductSelection, c$ as resolveListingPrimaryImagePointer, d0 as resolveProductDisplayMedia, d1 as resolveProductSelection, d2 as resolveProductSelectionFromMatrix, d3 as resolveProductSelectionMedia, d4 as resolveVariantForSelection, d5 as selectNext, d6 as selectedSwatchMediaItemId, d7 as stringifyProductSelection, d8 as toShopifyPriceRangeV2 } from './types-D2xYdz4P.js';
|
|
3
|
+
import { P as Product } from './payload-types-m3jjhxk9.js';
|
|
4
|
+
export { A as Article, d as ArticleAuthor, e as ArticleCategory, f as ArticleTag, g as Cart, h as CartItem, D as Document, I as Image, O as Order, i as Post, j as PostCategory, k as ProductVariant, T as Tenant, V as Video } from './payload-types-m3jjhxk9.js';
|
|
5
|
+
export { C as CollectionType, P as Product, a as ProductCollection } from './types-Cmrd1ezc.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-CSwR2HSg.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-6XHz_jej.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';
|
|
@@ -38,14 +38,14 @@ type ResolveProductMediaResult<TMedia> = Omit<ResolveProductSelectionMediaResult
|
|
|
38
38
|
source: MediaPointerSource;
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
|
-
* @deprecated One-release shim for ADR
|
|
41
|
+
* @deprecated One-release shim for ADR 0025. Prefer
|
|
42
42
|
* `resolveProductSelectionMedia()`. Legacy direct-media fallbacks are ignored;
|
|
43
43
|
* callers fall through to product display media (`resolveProductDisplayMedia`)
|
|
44
44
|
* or `none`.
|
|
45
45
|
*/
|
|
46
46
|
declare function resolveProductMedia<TMedia>(input: ResolveProductMediaInput<TMedia>): ResolveProductMediaResult<TMedia>;
|
|
47
47
|
|
|
48
|
-
/** @deprecated ADR
|
|
48
|
+
/** @deprecated ADR 0025 replaces media sets with variant `images[]` subsets. */
|
|
49
49
|
type ProductMediaSetMatchType = 'default' | 'option-values' | 'exact-variant';
|
|
50
50
|
/** @deprecated Use `ResolveProductSelectionMediaInput` and variant `images[]`. */
|
|
51
51
|
type ProductMediaSetInput = {
|
package/dist/index.js
CHANGED
|
@@ -813,66 +813,14 @@ function resolveRelation(ref) {
|
|
|
813
813
|
return ref;
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
// src/core/
|
|
817
|
-
|
|
818
|
-
var LEGACY_OPEN_GRAPH_IMAGE_SIZE = "1536";
|
|
819
|
-
function extractSeo(doc) {
|
|
820
|
-
const seo = doc.seo ?? {};
|
|
821
|
-
const og = seo.openGraph ?? {};
|
|
822
|
-
return {
|
|
823
|
-
title: seo.title ?? doc.title ?? null,
|
|
824
|
-
description: seo.description ?? null,
|
|
825
|
-
noIndex: seo.noIndex ?? null,
|
|
826
|
-
canonical: seo.canonical ?? null,
|
|
827
|
-
openGraph: {
|
|
828
|
-
title: og.title ?? null,
|
|
829
|
-
description: og.description ?? null,
|
|
830
|
-
image: og.image ?? null
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
function generateMetadata(input, options) {
|
|
835
|
-
const title = input.title ?? void 0;
|
|
836
|
-
const description = input.description ?? void 0;
|
|
837
|
-
const ogTitle = input.openGraph?.title ?? title;
|
|
838
|
-
const ogDescription = input.openGraph?.description ?? description;
|
|
839
|
-
const image = resolveMetaImage(input.openGraph?.image);
|
|
840
|
-
return {
|
|
841
|
-
title,
|
|
842
|
-
description,
|
|
843
|
-
...input.noIndex && { robots: { index: false, follow: false } },
|
|
844
|
-
...input.canonical && { alternates: { canonical: input.canonical } },
|
|
845
|
-
openGraph: {
|
|
846
|
-
...ogTitle && { title: ogTitle },
|
|
847
|
-
...ogDescription && { description: ogDescription },
|
|
848
|
-
...options?.siteName && { siteName: options.siteName },
|
|
849
|
-
...image && { images: [image] }
|
|
850
|
-
},
|
|
851
|
-
twitter: {
|
|
852
|
-
card: image ? "summary_large_image" : "summary",
|
|
853
|
-
...ogTitle && { title: ogTitle },
|
|
854
|
-
...ogDescription && { description: ogDescription },
|
|
855
|
-
...image && { images: [image.url] }
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
}
|
|
859
|
-
function resolveMetaImage(ref) {
|
|
860
|
-
const image = resolveRelation(ref);
|
|
861
|
-
if (!image) return null;
|
|
862
|
-
const sized = image.sizes?.[OPEN_GRAPH_IMAGE_SIZE] ?? image.sizes?.[LEGACY_OPEN_GRAPH_IMAGE_SIZE];
|
|
863
|
-
const url = sized?.url || image.url;
|
|
864
|
-
if (!url) return null;
|
|
865
|
-
const width = sized?.url ? sized.width : image.width;
|
|
866
|
-
const height = sized?.url ? sized.height : image.height;
|
|
816
|
+
// src/core/collection/query-builder.ts
|
|
817
|
+
function withDefaultPublicReadOptions(options) {
|
|
867
818
|
return {
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
...image.alt && { alt: image.alt }
|
|
819
|
+
...options,
|
|
820
|
+
depth: options?.depth ?? 0,
|
|
821
|
+
joins: options?.joins ?? false
|
|
872
822
|
};
|
|
873
823
|
}
|
|
874
|
-
|
|
875
|
-
// src/core/collection/query-builder.ts
|
|
876
824
|
var ReadOnlyCollectionQueryBuilder = class {
|
|
877
825
|
constructor(api, collection) {
|
|
878
826
|
this.api = api;
|
|
@@ -881,13 +829,13 @@ var ReadOnlyCollectionQueryBuilder = class {
|
|
|
881
829
|
async find(options) {
|
|
882
830
|
return this.api.requestFind(
|
|
883
831
|
`/api/${String(this.collection)}`,
|
|
884
|
-
options
|
|
832
|
+
withDefaultPublicReadOptions(options)
|
|
885
833
|
);
|
|
886
834
|
}
|
|
887
835
|
async findById(id, options) {
|
|
888
836
|
return this.api.requestFindById(
|
|
889
837
|
`/api/${String(this.collection)}/${String(id)}`,
|
|
890
|
-
options
|
|
838
|
+
withDefaultPublicReadOptions(options)
|
|
891
839
|
);
|
|
892
840
|
}
|
|
893
841
|
async count(options) {
|
|
@@ -896,22 +844,6 @@ var ReadOnlyCollectionQueryBuilder = class {
|
|
|
896
844
|
options
|
|
897
845
|
);
|
|
898
846
|
}
|
|
899
|
-
async findMetadata(options, metadataOptions) {
|
|
900
|
-
const { docs } = await this.find({ ...options, limit: 1, depth: 1 });
|
|
901
|
-
const doc = docs[0];
|
|
902
|
-
if (!doc) return null;
|
|
903
|
-
return generateMetadata(
|
|
904
|
-
extractSeo(doc),
|
|
905
|
-
metadataOptions
|
|
906
|
-
);
|
|
907
|
-
}
|
|
908
|
-
async findMetadataById(id, metadataOptions) {
|
|
909
|
-
const doc = await this.findById(id, { depth: 1 });
|
|
910
|
-
return generateMetadata(
|
|
911
|
-
extractSeo(doc),
|
|
912
|
-
metadataOptions
|
|
913
|
-
);
|
|
914
|
-
}
|
|
915
847
|
};
|
|
916
848
|
|
|
917
849
|
// src/core/collection/collection-client.ts
|
|
@@ -927,6 +859,21 @@ var ReadOnlyCollectionClient = class extends HttpClient {
|
|
|
927
859
|
});
|
|
928
860
|
return this.parseFindResponse(response);
|
|
929
861
|
}
|
|
862
|
+
async requestFindEndpoint(endpoint, data) {
|
|
863
|
+
const response = await this.fetchWithTracking(endpoint, {
|
|
864
|
+
...this.defaultOptions,
|
|
865
|
+
method: "POST",
|
|
866
|
+
body: data ? JSON.stringify(data) : void 0
|
|
867
|
+
});
|
|
868
|
+
return this.parseFindResponse(response);
|
|
869
|
+
}
|
|
870
|
+
async requestFindEndpointGet(endpoint) {
|
|
871
|
+
const response = await this.fetchWithTracking(endpoint, {
|
|
872
|
+
...this.defaultOptions,
|
|
873
|
+
method: "GET"
|
|
874
|
+
});
|
|
875
|
+
return this.parseFindResponse(response);
|
|
876
|
+
}
|
|
930
877
|
async requestFindById(endpoint, options) {
|
|
931
878
|
const url = this.buildUrl(endpoint, options);
|
|
932
879
|
const response = await this.fetchWithTracking(url, {
|
|
@@ -1057,7 +1004,8 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1057
1004
|
const urlParams = new URLSearchParams();
|
|
1058
1005
|
const sort = params?.sort ?? DEFAULT_POST_LIST_SORT;
|
|
1059
1006
|
urlParams.set("sort", sort);
|
|
1060
|
-
if (params?.limit !== void 0)
|
|
1007
|
+
if (params?.limit !== void 0)
|
|
1008
|
+
urlParams.set("limit", String(params.limit));
|
|
1061
1009
|
if (params?.page !== void 0) urlParams.set("page", String(params.page));
|
|
1062
1010
|
if (params?.categoryId !== void 0) {
|
|
1063
1011
|
urlParams.set("where[categories][in]", params.categoryId);
|
|
@@ -1065,7 +1013,7 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1065
1013
|
if (params?.tagId !== void 0) {
|
|
1066
1014
|
urlParams.set("where[tags][in]", params.tagId);
|
|
1067
1015
|
}
|
|
1068
|
-
return `/api/posts?${urlParams.toString()}`;
|
|
1016
|
+
return `/api/posts/public?${urlParams.toString()}`;
|
|
1069
1017
|
}
|
|
1070
1018
|
buildCommentsListQuery(params) {
|
|
1071
1019
|
const urlParams = new URLSearchParams();
|
|
@@ -1085,7 +1033,7 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1085
1033
|
}
|
|
1086
1034
|
if (params.limit !== void 0) urlParams.set("limit", String(params.limit));
|
|
1087
1035
|
if (params.page !== void 0) urlParams.set("page", String(params.page));
|
|
1088
|
-
return `/api/comments?${urlParams.toString()}`;
|
|
1036
|
+
return `/api/comments/public?${urlParams.toString()}`;
|
|
1089
1037
|
}
|
|
1090
1038
|
async execute(endpoint, method, body) {
|
|
1091
1039
|
return this.request(endpoint, { method, body });
|
|
@@ -1095,7 +1043,11 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1095
1043
|
return unwrapPayloadDoc(response);
|
|
1096
1044
|
}
|
|
1097
1045
|
createPost(params) {
|
|
1098
|
-
return this.executeDoc(
|
|
1046
|
+
return this.executeDoc(
|
|
1047
|
+
"/api/posts",
|
|
1048
|
+
"POST",
|
|
1049
|
+
params
|
|
1050
|
+
);
|
|
1099
1051
|
}
|
|
1100
1052
|
/**
|
|
1101
1053
|
* Public post feed. Server applies the same visibility contract as
|
|
@@ -1152,7 +1104,11 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1152
1104
|
if (parentId !== void 0) {
|
|
1153
1105
|
body.parent = parentId;
|
|
1154
1106
|
}
|
|
1155
|
-
return this.executeDoc(
|
|
1107
|
+
return this.executeDoc(
|
|
1108
|
+
"/api/comments",
|
|
1109
|
+
"POST",
|
|
1110
|
+
body
|
|
1111
|
+
);
|
|
1156
1112
|
}
|
|
1157
1113
|
/**
|
|
1158
1114
|
* List comments for a post.
|
|
@@ -1221,10 +1177,14 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1221
1177
|
400
|
|
1222
1178
|
);
|
|
1223
1179
|
}
|
|
1224
|
-
return this.executeDoc(
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1180
|
+
return this.executeDoc(
|
|
1181
|
+
"/api/reactions",
|
|
1182
|
+
"POST",
|
|
1183
|
+
{
|
|
1184
|
+
post: postId,
|
|
1185
|
+
type: reactionType
|
|
1186
|
+
}
|
|
1187
|
+
);
|
|
1228
1188
|
}
|
|
1229
1189
|
removeReaction(params) {
|
|
1230
1190
|
const { postId, type } = params;
|
|
@@ -1243,10 +1203,14 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1243
1203
|
400
|
|
1244
1204
|
);
|
|
1245
1205
|
}
|
|
1246
|
-
return this.executeDoc(
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1206
|
+
return this.executeDoc(
|
|
1207
|
+
"/api/reactions",
|
|
1208
|
+
"POST",
|
|
1209
|
+
{
|
|
1210
|
+
comment: commentId,
|
|
1211
|
+
type: reactionType
|
|
1212
|
+
}
|
|
1213
|
+
);
|
|
1250
1214
|
}
|
|
1251
1215
|
removeCommentReaction(params) {
|
|
1252
1216
|
const { commentId, type } = params;
|
|
@@ -1275,9 +1239,13 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1275
1239
|
}
|
|
1276
1240
|
// Bookmarks
|
|
1277
1241
|
addBookmark(params) {
|
|
1278
|
-
return this.executeDoc(
|
|
1279
|
-
|
|
1280
|
-
|
|
1242
|
+
return this.executeDoc(
|
|
1243
|
+
"/api/bookmarks",
|
|
1244
|
+
"POST",
|
|
1245
|
+
{
|
|
1246
|
+
post: params.postId
|
|
1247
|
+
}
|
|
1248
|
+
);
|
|
1281
1249
|
}
|
|
1282
1250
|
removeBookmark(params) {
|
|
1283
1251
|
return this.execute(
|
|
@@ -1293,10 +1261,7 @@ var CommunityClient = class extends CustomerScopedApi {
|
|
|
1293
1261
|
}
|
|
1294
1262
|
// Profiles
|
|
1295
1263
|
listProfileLists(params) {
|
|
1296
|
-
return this.execute(
|
|
1297
|
-
`/api/customer-profile-lists${this.buildQuery(params)}`,
|
|
1298
|
-
"GET"
|
|
1299
|
-
);
|
|
1264
|
+
return this.execute(`/api/customer-profile-lists${this.buildQuery(params)}`, "GET");
|
|
1300
1265
|
}
|
|
1301
1266
|
async getProfileList(params) {
|
|
1302
1267
|
const query = "slug" in params ? `?where[slug][equals]=${encodeURIComponent(params.slug)}&limit=1` : `?where[id][equals]=${encodeURIComponent(params.id)}&limit=1`;
|
|
@@ -1534,7 +1499,10 @@ var CartApi = class extends CustomerScopedApi {
|
|
|
1534
1499
|
return this.request(endpoint, { method, body });
|
|
1535
1500
|
}
|
|
1536
1501
|
getCart(cartId) {
|
|
1537
|
-
return this.execute(
|
|
1502
|
+
return this.execute(
|
|
1503
|
+
`/api/carts/${cartId}?depth=0&joins=false`,
|
|
1504
|
+
"GET"
|
|
1505
|
+
);
|
|
1538
1506
|
}
|
|
1539
1507
|
addItem(params) {
|
|
1540
1508
|
return this.execute("/api/carts/add-item", "POST", params);
|
|
@@ -1903,7 +1871,9 @@ var CommerceClient = class {
|
|
|
1903
1871
|
stockCheck: (params) => api.post("/api/products/stock-check", params),
|
|
1904
1872
|
stockSnapshot: (params) => api.get(stockSnapshotQuery(params)),
|
|
1905
1873
|
listingGroups: (params) => api.get(listingGroupsQuery(params)),
|
|
1906
|
-
listingGroupsCatalog: (params) => api.get(
|
|
1874
|
+
listingGroupsCatalog: (params) => api.get(
|
|
1875
|
+
listingGroupsCatalogQuery(params)
|
|
1876
|
+
),
|
|
1907
1877
|
detail: async (params) => {
|
|
1908
1878
|
try {
|
|
1909
1879
|
const product = await api.get(productDetailQuery(params));
|
|
@@ -2464,6 +2434,7 @@ var INTERNAL_COLLECTIONS = [
|
|
|
2464
2434
|
"subscriptions",
|
|
2465
2435
|
"billing-history",
|
|
2466
2436
|
"inventory-reservations",
|
|
2437
|
+
"inventory-adjustments",
|
|
2467
2438
|
"commerce-notification-intents",
|
|
2468
2439
|
"product-collection-items",
|
|
2469
2440
|
"order-status-logs",
|
|
@@ -2482,7 +2453,6 @@ var INTERNAL_COLLECTIONS = [
|
|
|
2482
2453
|
var COLLECTIONS = [
|
|
2483
2454
|
"tenants",
|
|
2484
2455
|
"tenant-metadata",
|
|
2485
|
-
"tenant-logos",
|
|
2486
2456
|
"products",
|
|
2487
2457
|
"product-variants",
|
|
2488
2458
|
"product-options",
|
|
@@ -2491,21 +2461,7 @@ var COLLECTIONS = [
|
|
|
2491
2461
|
"product-tags",
|
|
2492
2462
|
"product-collections",
|
|
2493
2463
|
"brands",
|
|
2494
|
-
"brand-logos",
|
|
2495
|
-
"orders",
|
|
2496
|
-
"order-items",
|
|
2497
|
-
"returns",
|
|
2498
|
-
"return-items",
|
|
2499
|
-
"fulfillment-orders",
|
|
2500
|
-
"fulfillment-order-items",
|
|
2501
|
-
"fulfillments",
|
|
2502
|
-
"fulfillment-items",
|
|
2503
|
-
"transactions",
|
|
2504
|
-
"customers",
|
|
2505
2464
|
"customer-profiles",
|
|
2506
|
-
"customer-addresses",
|
|
2507
|
-
"carts",
|
|
2508
|
-
"cart-items",
|
|
2509
2465
|
"discounts",
|
|
2510
2466
|
"shipping-policies",
|
|
2511
2467
|
"shipping-zones",
|
|
@@ -2536,19 +2492,11 @@ var COLLECTIONS = [
|
|
|
2536
2492
|
"canvas-tags",
|
|
2537
2493
|
"canvas-nodes",
|
|
2538
2494
|
"canvas-edges",
|
|
2539
|
-
"videos",
|
|
2540
2495
|
"video-categories",
|
|
2541
2496
|
"video-tags",
|
|
2542
|
-
"live-streams",
|
|
2543
|
-
"images",
|
|
2544
2497
|
"forms",
|
|
2545
|
-
"form-submissions",
|
|
2546
2498
|
// Community
|
|
2547
|
-
"posts",
|
|
2548
|
-
"comments",
|
|
2549
|
-
"reactions",
|
|
2550
2499
|
"reaction-types",
|
|
2551
|
-
"bookmarks",
|
|
2552
2500
|
"post-categories",
|
|
2553
2501
|
"post-tags",
|
|
2554
2502
|
"customer-profile-lists",
|
|
@@ -2560,9 +2508,33 @@ var COLLECTIONS = [
|
|
|
2560
2508
|
"event-tags"
|
|
2561
2509
|
];
|
|
2562
2510
|
var SERVER_ONLY_COLLECTIONS = [
|
|
2511
|
+
"tenant-logos",
|
|
2512
|
+
"brand-logos",
|
|
2513
|
+
"images",
|
|
2514
|
+
"videos",
|
|
2515
|
+
"orders",
|
|
2516
|
+
"order-items",
|
|
2517
|
+
"returns",
|
|
2518
|
+
"return-items",
|
|
2519
|
+
"fulfillment-orders",
|
|
2520
|
+
"fulfillment-order-items",
|
|
2521
|
+
"fulfillments",
|
|
2522
|
+
"fulfillment-items",
|
|
2523
|
+
"transactions",
|
|
2524
|
+
"customers",
|
|
2525
|
+
"customer-addresses",
|
|
2526
|
+
"form-submissions",
|
|
2527
|
+
"carts",
|
|
2528
|
+
"cart-items",
|
|
2529
|
+
"posts",
|
|
2530
|
+
"comments",
|
|
2531
|
+
"reactions",
|
|
2532
|
+
"bookmarks",
|
|
2533
|
+
"live-streams",
|
|
2563
2534
|
"customer-groups",
|
|
2564
2535
|
"reports",
|
|
2565
|
-
"community-bans"
|
|
2536
|
+
"community-bans",
|
|
2537
|
+
"order-export-profiles"
|
|
2566
2538
|
];
|
|
2567
2539
|
var SERVER_COLLECTIONS = [
|
|
2568
2540
|
...COLLECTIONS,
|
|
@@ -4615,8 +4587,6 @@ function resolveLegacyMediaSet(input) {
|
|
|
4615
4587
|
};
|
|
4616
4588
|
}
|
|
4617
4589
|
function resolveProductGallery(input) {
|
|
4618
|
-
const legacyResolved = resolveLegacyMediaSet(input);
|
|
4619
|
-
if (legacyResolved && legacyResolved.source !== "none") return legacyResolved;
|
|
4620
4590
|
const selectedVariantId = mediaId(input.selectedVariantId);
|
|
4621
4591
|
const selectedOptionValueIds = relationshipIds(input.selectedOptionValueIds);
|
|
4622
4592
|
const selection = resolveProductSelectionMedia({
|
|
@@ -4628,6 +4598,8 @@ function resolveProductGallery(input) {
|
|
|
4628
4598
|
if (selection.source !== "none") {
|
|
4629
4599
|
return selection;
|
|
4630
4600
|
}
|
|
4601
|
+
const legacyResolved = resolveLegacyMediaSet(input);
|
|
4602
|
+
if (legacyResolved && legacyResolved.source !== "none") return legacyResolved;
|
|
4631
4603
|
return resolveProductDisplayMedia({
|
|
4632
4604
|
productMediaPool: input.productMediaPool ?? input.pool ?? null,
|
|
4633
4605
|
productPrimaryMediaItemId: input.productPrimaryMediaItemId,
|