@01.software/sdk 0.33.0 → 0.35.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 +214 -22
- package/dist/analytics/react.cjs.map +1 -1
- package/dist/analytics/react.js.map +1 -1
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.js.map +1 -1
- package/dist/client.cjs +342 -27
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +7 -6
- package/dist/client.d.ts +7 -6
- package/dist/client.js +342 -27
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-De6eKW1J.d.cts → collection-client-CR2B8c1v.d.cts} +7 -3
- package/dist/{collection-client-B6SlhzIP.d.ts → collection-client-DkREjhQ9.d.ts} +7 -3
- package/dist/{const-sPR2IkCe.d.cts → const-BTvdrXtY.d.cts} +4 -4
- package/dist/{const-DwmSDeWq.d.ts → const-CdqCauHQ.d.ts} +4 -4
- 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 +186 -0
- package/dist/index-DK8_NXkh.d.ts +186 -0
- package/dist/index.cjs +1402 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -10
- package/dist/index.d.ts +75 -10
- package/dist/index.js +1402 -177
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-dkeQyrDC.d.cts → payload-types-C7tb7Xbs.d.cts} +208 -52
- package/dist/{payload-types-dkeQyrDC.d.ts → payload-types-C7tb7Xbs.d.ts} +208 -52
- package/dist/query.cjs +195 -36
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +45 -18
- package/dist/query.d.ts +45 -18
- package/dist/query.js +195 -36
- 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-CrsPyqEc.d.cts → server-nXOezi4b.d.cts} +22 -6
- package/dist/{server-CrsPyqEc.d.ts → server-nXOezi4b.d.ts} +22 -6
- package/dist/server.cjs +440 -33
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +11 -179
- package/dist/server.d.ts +11 -179
- package/dist/server.js +440 -33
- package/dist/server.js.map +1 -1
- package/dist/{types-Cel_4L9t.d.ts → types-1ylMrCuW.d.ts} +1 -1
- package/dist/{types-B3YT092I.d.cts → types-Bx558PU6.d.cts} +1 -1
- package/dist/{types-BHh0YLmq.d.ts → types-Byo_Rty4.d.ts} +705 -69
- package/dist/{types-BZKxss8Y.d.cts → types-DDhtZI6E.d.cts} +705 -69
- package/dist/ui/canvas/server.cjs +231 -38
- package/dist/ui/canvas/server.cjs.map +1 -1
- package/dist/ui/canvas/server.d.cts +1 -1
- package/dist/ui/canvas/server.d.ts +1 -1
- package/dist/ui/canvas/server.js +221 -38
- package/dist/ui/canvas/server.js.map +1 -1
- package/dist/ui/canvas.cjs +320 -257
- package/dist/ui/canvas.cjs.map +1 -1
- package/dist/ui/canvas.d.cts +5 -19
- package/dist/ui/canvas.d.ts +5 -19
- package/dist/ui/canvas.js +323 -260
- 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 +20 -179
- package/dist/webhook.d.ts +20 -179
- package/dist/webhook.js +2 -1
- package/dist/webhook.js.map +1 -1
- package/package.json +12 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,80 @@
|
|
|
1
|
-
import { d as ClientConfig,
|
|
2
|
-
export {
|
|
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 { COMMERCE_NOTIFICATION_EVENTS, COMMERCE_NOTIFICATION_EVENT_TYPE, COMMERCE_NOTIFICATION_OPERATION, CUSTOMER_PASSWORD_RESET_OPERATION, CollectionWebhookOperation, CommerceEmailChannel, CommerceEmailConfig, CommerceEmailEventConfig, CommerceEmailEventHandlers, CommerceEmailHandlerContext, CommerceNotification, CommerceNotificationData, CommerceNotificationEventName, CommerceNotificationSource, CommerceNotificationSourceCollection, CommerceNotificationWebhookEvent, CustomerAuthWebhookEvent, CustomerAuthWebhookHandlers, CustomerPasswordResetWebhookData, CustomerPasswordResetWebhookEvent, ORDER_CHANGED_EVENT_TYPE, OrderChangedWebhookEvent, WebhookChange, WebhookCommerceNotificationChange, WebhookEvent, WebhookHandler, WebhookKnownOperation, WebhookOperation, WebhookOptions, WebhookOrderChange, WebhookOrderMoved, WebhookOrderScope, createCommerceEmailWebhookHandler, createCustomerAuthWebhookHandler, createTypedWebhookHandler, defineCommerceEmailConfig, getCommerceNotificationIdempotencyKey, handleWebhook, isCommerceNotificationWebhookEvent, isCustomerPasswordResetWebhookEvent, isOrderChangedWebhookEvent, isValidWebhookEvent, isWebhookCollection, isWebhookOperation } from './
|
|
7
|
-
export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection,
|
|
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-DDhtZI6E.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 ListingGroupingEmptyReason, b0 as ListingGroupingState, b1 as ListingGroupsParams, b2 as ListingPrimaryImageFallbackInput, b3 as MediaValue, b4 as NormalizedOptionSwatch, b5 as NormalizedProductSelection, b6 as OrderApi, b7 as OrderApiOptions, b8 as PRODUCT_UPSERT_READONLY_FIELD_REASON, b9 as PRODUCT_UPSERT_UNKNOWN_FIELD_REASON, P as PayloadFindResponse, h as PayloadMutationResponse, ba as ProductApi, bb as ProductApiOptions, bc as ProductDetailBrand, bd as ProductDetailCatalogListing, be as ProductDetailCatalogResult, bf as ProductDetailCatalogVariant, bg as ProductDetailCategory, bh as ProductDetailImage, bi as ProductDetailImageMedia, bj as ProductDetailListing, bk as ProductDetailMedia, bl as ProductDetailOption, bm as ProductDetailOptionValue, ag as ProductDetailParams, ah as ProductDetailResult, bn as ProductDetailTag, bo as ProductDetailUnavailableReason, bp as ProductDetailVariant, bq as ProductDetailVariantOptionValue, br as ProductDetailVideo, bs as ProductHrefGroup, bt as ProductHrefOptions, bu as ProductHrefProduct, bv as ProductListingCard, bw as ProductListingCardOptions, bx as ProductListingCardPriceRange, by as ProductListingCardRepresentativeVariant, bz as ProductListingGroup, bA as ProductListingGroupSummary, bB as ProductListingGroupVariant, ai as ProductListingGroupsItem, bC as ProductListingGroupsProduct, bD as ProductListingGroupsResponse, bE as ProductListingProductShape, bF as ProductListingProjection, bG as ProductListingSwatch, bH as ProductMediaResolutionSource, bI as ProductOptionMatrix, bJ as ProductOptionMatrixOption, bK as ProductOptionMatrixValue, bL as ProductOptionMatrixVariant, bM as ProductOptionShape, bN as ProductOptionValueShape, bO as ProductOptionValueSwatch, bP as ProductOptionValueSwatchInput, bQ as ProductSelectionAvailableSwatch, bR as ProductSelectionAvailableValue, bS as ProductSelectionByOptionValue, bT as ProductSelectionCodecError, bU as ProductSelectionCodecOptions, bV as ProductSelectionInput, bW as ProductSelectionOptionValue, bX as ProductSelectionResolution, bY as ProductSelectionResolutionContext, bZ as ProductSelectionUrlEmit, b_ as ProductSelectionVariant, b$ as ProductUpsertFieldValidationErrorBody, c0 as ProductUpsertFieldValidationErrorReason, c1 as ProductVariantShape, c2 as RemoveDiscountParams, c3 as RemoveItemParams, c4 as RequestOptions, c5 as ResolveProductDisplayMediaInput, c6 as ResolveProductDisplayMediaResult, R as RetryConfig, c7 as ReturnItem, c8 as ReturnReason, c9 as ReturnWithRefundItem, ca as ReturnWithRefundParams, i as RootClient, j as RootCollectionClient, k as RootReadOnlyQueryBuilder, l as ServerApiOptions, cb as ShippingApi, cc as ShippingApiOptions, S as Sort, cd as StockCheckParams, ce as StockCheckResponse, cf as StockCheckResult, cg as StockSnapshotItem, ch as StockSnapshotParams, ci as UpdateFulfillmentParams, cj as UpdateItemParams, ck as UpdateOrderParams, af as UpdateProfileData, cl as UpdateReturnParams, cm as UpdateTransactionParams, cn as ValidateDiscountParams, co as ValidateDiscountResult, W as Where, cp as WithIdempotencyKey, cq as buildProductHref, cr as buildProductListingCard, cs as buildProductListingGroupsByOption, ct as buildProductListingProjection, cu as buildProductOptionMatrix, cv as buildProductOptionMatrixFromDetail, cw as createProductSelectionCodec, cx as getAvailableOptionValues, cy as getProductSelectionImages, cz as getSelectedValueByOptionId, cA as isProductUpsertFieldValidationErrorBody, cB as normalizeProductSelection, cC as normalizeProductSelectionFromMatrix, cD as normalizeSelectedValueIds, cE as parseProductSelection, cF as resolveListingPrimaryImagePointer, cG as resolveProductDisplayMedia, cH as resolveProductSelection, cI as resolveProductSelectionFromMatrix, cJ as resolveProductSelectionMedia, cK as resolveVariantForSelection, cL as selectNext, cM as selectedSwatchMediaItemId, cN as stringifyProductSelection } from './types-DDhtZI6E.cjs';
|
|
3
|
+
import { P as Product } from './payload-types-C7tb7Xbs.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-C7tb7Xbs.cjs';
|
|
5
|
+
export { C as CollectionType, P as Product, a as ProductCollection } from './types-Bx558PU6.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-CjA3U6X3.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-BTvdrXtY.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
|
+
|
|
14
|
+
type ProductDetailStockMergeStatus = 'complete' | 'partial';
|
|
15
|
+
interface MergedProductDetailResult {
|
|
16
|
+
stockMergeStatus: ProductDetailStockMergeStatus;
|
|
17
|
+
product: ProductDetail;
|
|
18
|
+
}
|
|
19
|
+
declare function mergeProductDetailWithStock(catalog: ProductDetailCatalog, snapshot: StockSnapshotResponse): MergedProductDetailResult;
|
|
20
|
+
|
|
21
|
+
/** @deprecated Use `ProductSelectionMediaSource` or `ProductDisplayMediaSource`. */
|
|
22
|
+
type MediaPointerSource = ProductSelectionMediaSource | ProductDisplayMediaSource | 'variant_featured';
|
|
23
|
+
/** @deprecated Use `ResolveProductSelectionMediaInput`. */
|
|
24
|
+
type ResolveProductMediaInput<TMedia> = ResolveProductSelectionMediaInput<TMedia> & {
|
|
25
|
+
variantFeaturedMediaItemId?: string | number | null;
|
|
26
|
+
selectedOptionValueMediaItemIds?: Array<string | number | null | undefined>;
|
|
27
|
+
legacy?: {
|
|
28
|
+
variantThumbnail?: TMedia | null;
|
|
29
|
+
variantImages?: TMedia[] | null;
|
|
30
|
+
optionValueThumbnails?: Array<TMedia | null | undefined>;
|
|
31
|
+
optionValueImages?: Array<TMedia[] | null | undefined>;
|
|
32
|
+
productThumbnail?: TMedia | null;
|
|
33
|
+
productImages?: TMedia[] | null;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/** @deprecated Use `ResolveProductSelectionMediaResult`. */
|
|
37
|
+
type ResolveProductMediaResult<TMedia> = Omit<ResolveProductSelectionMediaResult<TMedia>, 'source'> & {
|
|
38
|
+
source: MediaPointerSource;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated One-release shim for ADR 0016. Prefer
|
|
42
|
+
* `resolveProductSelectionMedia()`. Legacy direct-media fallbacks are ignored;
|
|
43
|
+
* callers fall through to product display media (`resolveProductDisplayMedia`)
|
|
44
|
+
* or `none`.
|
|
45
|
+
*/
|
|
46
|
+
declare function resolveProductMedia<TMedia>(input: ResolveProductMediaInput<TMedia>): ResolveProductMediaResult<TMedia>;
|
|
47
|
+
|
|
48
|
+
/** @deprecated ADR 0016 replaces media sets with variant `images[]` subsets. */
|
|
49
|
+
type ProductMediaSetMatchType = 'default' | 'option-values' | 'exact-variant';
|
|
50
|
+
/** @deprecated Use `ResolveProductSelectionMediaInput` and variant `images[]`. */
|
|
51
|
+
type ProductMediaSetInput = {
|
|
52
|
+
label?: string | null;
|
|
53
|
+
matchType: ProductMediaSetMatchType;
|
|
54
|
+
optionValueIds?: Array<string | number | null | undefined> | null;
|
|
55
|
+
variantIds?: Array<string | number | null | undefined> | null;
|
|
56
|
+
items: Array<string | number | null | undefined>;
|
|
57
|
+
primaryMediaItemId?: string | number | null;
|
|
58
|
+
};
|
|
59
|
+
type LegacyProductGallerySource = 'exact_variant_set' | 'option_value_set' | 'default_set';
|
|
60
|
+
/** @deprecated Use `ResolveProductSelectionMediaInput`. */
|
|
61
|
+
type ResolveProductGalleryInput<TMedia> = ResolveProductSelectionMediaInput<TMedia> & {
|
|
62
|
+
pool?: TMedia[] | null;
|
|
63
|
+
mediaSets?: ProductMediaSetInput[] | null;
|
|
64
|
+
selectedVariantId?: string | number | null;
|
|
65
|
+
selectedOptionValueIds?: Array<string | number | null | undefined> | null;
|
|
66
|
+
listingPrimaryImage?: ProductSelectionMediaPointer;
|
|
67
|
+
};
|
|
68
|
+
/** @deprecated Use selection or display media source types. */
|
|
69
|
+
type ProductGallerySource = ProductSelectionMediaSource | ProductDisplayMediaSource | LegacyProductGallerySource;
|
|
70
|
+
/** @deprecated Use `ResolveProductSelectionMediaResult`. */
|
|
71
|
+
type ResolveProductGalleryResult<TMedia> = {
|
|
72
|
+
primaryImage: TMedia | null;
|
|
73
|
+
images: TMedia[];
|
|
74
|
+
source: ProductGallerySource;
|
|
75
|
+
};
|
|
76
|
+
/** @deprecated Use `resolveProductSelectionMedia()`. */
|
|
77
|
+
declare function resolveProductGallery<TMedia>(input: ResolveProductGalleryInput<TMedia>): ResolveProductGalleryResult<TMedia>;
|
|
13
78
|
|
|
14
79
|
declare const generateOrderNumber: () => string;
|
|
15
80
|
|
|
@@ -29,6 +94,6 @@ declare const formatOrderName: (items: OrderItem[]) => string;
|
|
|
29
94
|
*/
|
|
30
95
|
declare const resolveRelation: <T>(ref: T | string | number | null | undefined) => T | null;
|
|
31
96
|
|
|
32
|
-
declare function createClient(options: ClientConfig):
|
|
97
|
+
declare function createClient(options: ClientConfig): RootClientWithEvents;
|
|
33
98
|
|
|
34
|
-
export {
|
|
99
|
+
export { ClientConfig, type MediaPointerSource, 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, StockSnapshotResponse, createClient, formatOrderName, generateOrderNumber, mergeProductDetailWithStock, resolveProductGallery, resolveProductMedia, resolveRelation };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,80 @@
|
|
|
1
|
-
import { d as ClientConfig,
|
|
2
|
-
export {
|
|
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 { COMMERCE_NOTIFICATION_EVENTS, COMMERCE_NOTIFICATION_EVENT_TYPE, COMMERCE_NOTIFICATION_OPERATION, CUSTOMER_PASSWORD_RESET_OPERATION, CollectionWebhookOperation, CommerceEmailChannel, CommerceEmailConfig, CommerceEmailEventConfig, CommerceEmailEventHandlers, CommerceEmailHandlerContext, CommerceNotification, CommerceNotificationData, CommerceNotificationEventName, CommerceNotificationSource, CommerceNotificationSourceCollection, CommerceNotificationWebhookEvent, CustomerAuthWebhookEvent, CustomerAuthWebhookHandlers, CustomerPasswordResetWebhookData, CustomerPasswordResetWebhookEvent, ORDER_CHANGED_EVENT_TYPE, OrderChangedWebhookEvent, WebhookChange, WebhookCommerceNotificationChange, WebhookEvent, WebhookHandler, WebhookKnownOperation, WebhookOperation, WebhookOptions, WebhookOrderChange, WebhookOrderMoved, WebhookOrderScope, createCommerceEmailWebhookHandler, createCustomerAuthWebhookHandler, createTypedWebhookHandler, defineCommerceEmailConfig, getCommerceNotificationIdempotencyKey, handleWebhook, isCommerceNotificationWebhookEvent, isCustomerPasswordResetWebhookEvent, isOrderChangedWebhookEvent, isValidWebhookEvent, isWebhookCollection, isWebhookOperation } from './
|
|
7
|
-
export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS, P as PublicCollection,
|
|
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-Byo_Rty4.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 ListingGroupingEmptyReason, b0 as ListingGroupingState, b1 as ListingGroupsParams, b2 as ListingPrimaryImageFallbackInput, b3 as MediaValue, b4 as NormalizedOptionSwatch, b5 as NormalizedProductSelection, b6 as OrderApi, b7 as OrderApiOptions, b8 as PRODUCT_UPSERT_READONLY_FIELD_REASON, b9 as PRODUCT_UPSERT_UNKNOWN_FIELD_REASON, P as PayloadFindResponse, h as PayloadMutationResponse, ba as ProductApi, bb as ProductApiOptions, bc as ProductDetailBrand, bd as ProductDetailCatalogListing, be as ProductDetailCatalogResult, bf as ProductDetailCatalogVariant, bg as ProductDetailCategory, bh as ProductDetailImage, bi as ProductDetailImageMedia, bj as ProductDetailListing, bk as ProductDetailMedia, bl as ProductDetailOption, bm as ProductDetailOptionValue, ag as ProductDetailParams, ah as ProductDetailResult, bn as ProductDetailTag, bo as ProductDetailUnavailableReason, bp as ProductDetailVariant, bq as ProductDetailVariantOptionValue, br as ProductDetailVideo, bs as ProductHrefGroup, bt as ProductHrefOptions, bu as ProductHrefProduct, bv as ProductListingCard, bw as ProductListingCardOptions, bx as ProductListingCardPriceRange, by as ProductListingCardRepresentativeVariant, bz as ProductListingGroup, bA as ProductListingGroupSummary, bB as ProductListingGroupVariant, ai as ProductListingGroupsItem, bC as ProductListingGroupsProduct, bD as ProductListingGroupsResponse, bE as ProductListingProductShape, bF as ProductListingProjection, bG as ProductListingSwatch, bH as ProductMediaResolutionSource, bI as ProductOptionMatrix, bJ as ProductOptionMatrixOption, bK as ProductOptionMatrixValue, bL as ProductOptionMatrixVariant, bM as ProductOptionShape, bN as ProductOptionValueShape, bO as ProductOptionValueSwatch, bP as ProductOptionValueSwatchInput, bQ as ProductSelectionAvailableSwatch, bR as ProductSelectionAvailableValue, bS as ProductSelectionByOptionValue, bT as ProductSelectionCodecError, bU as ProductSelectionCodecOptions, bV as ProductSelectionInput, bW as ProductSelectionOptionValue, bX as ProductSelectionResolution, bY as ProductSelectionResolutionContext, bZ as ProductSelectionUrlEmit, b_ as ProductSelectionVariant, b$ as ProductUpsertFieldValidationErrorBody, c0 as ProductUpsertFieldValidationErrorReason, c1 as ProductVariantShape, c2 as RemoveDiscountParams, c3 as RemoveItemParams, c4 as RequestOptions, c5 as ResolveProductDisplayMediaInput, c6 as ResolveProductDisplayMediaResult, R as RetryConfig, c7 as ReturnItem, c8 as ReturnReason, c9 as ReturnWithRefundItem, ca as ReturnWithRefundParams, i as RootClient, j as RootCollectionClient, k as RootReadOnlyQueryBuilder, l as ServerApiOptions, cb as ShippingApi, cc as ShippingApiOptions, S as Sort, cd as StockCheckParams, ce as StockCheckResponse, cf as StockCheckResult, cg as StockSnapshotItem, ch as StockSnapshotParams, ci as UpdateFulfillmentParams, cj as UpdateItemParams, ck as UpdateOrderParams, af as UpdateProfileData, cl as UpdateReturnParams, cm as UpdateTransactionParams, cn as ValidateDiscountParams, co as ValidateDiscountResult, W as Where, cp as WithIdempotencyKey, cq as buildProductHref, cr as buildProductListingCard, cs as buildProductListingGroupsByOption, ct as buildProductListingProjection, cu as buildProductOptionMatrix, cv as buildProductOptionMatrixFromDetail, cw as createProductSelectionCodec, cx as getAvailableOptionValues, cy as getProductSelectionImages, cz as getSelectedValueByOptionId, cA as isProductUpsertFieldValidationErrorBody, cB as normalizeProductSelection, cC as normalizeProductSelectionFromMatrix, cD as normalizeSelectedValueIds, cE as parseProductSelection, cF as resolveListingPrimaryImagePointer, cG as resolveProductDisplayMedia, cH as resolveProductSelection, cI as resolveProductSelectionFromMatrix, cJ as resolveProductSelectionMedia, cK as resolveVariantForSelection, cL as selectNext, cM as selectedSwatchMediaItemId, cN as stringifyProductSelection } from './types-Byo_Rty4.js';
|
|
3
|
+
import { P as Product } from './payload-types-C7tb7Xbs.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-C7tb7Xbs.js';
|
|
5
|
+
export { C as CollectionType, P as Product, a as ProductCollection } from './types-1ylMrCuW.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-DK8_NXkh.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-CdqCauHQ.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
|
+
|
|
14
|
+
type ProductDetailStockMergeStatus = 'complete' | 'partial';
|
|
15
|
+
interface MergedProductDetailResult {
|
|
16
|
+
stockMergeStatus: ProductDetailStockMergeStatus;
|
|
17
|
+
product: ProductDetail;
|
|
18
|
+
}
|
|
19
|
+
declare function mergeProductDetailWithStock(catalog: ProductDetailCatalog, snapshot: StockSnapshotResponse): MergedProductDetailResult;
|
|
20
|
+
|
|
21
|
+
/** @deprecated Use `ProductSelectionMediaSource` or `ProductDisplayMediaSource`. */
|
|
22
|
+
type MediaPointerSource = ProductSelectionMediaSource | ProductDisplayMediaSource | 'variant_featured';
|
|
23
|
+
/** @deprecated Use `ResolveProductSelectionMediaInput`. */
|
|
24
|
+
type ResolveProductMediaInput<TMedia> = ResolveProductSelectionMediaInput<TMedia> & {
|
|
25
|
+
variantFeaturedMediaItemId?: string | number | null;
|
|
26
|
+
selectedOptionValueMediaItemIds?: Array<string | number | null | undefined>;
|
|
27
|
+
legacy?: {
|
|
28
|
+
variantThumbnail?: TMedia | null;
|
|
29
|
+
variantImages?: TMedia[] | null;
|
|
30
|
+
optionValueThumbnails?: Array<TMedia | null | undefined>;
|
|
31
|
+
optionValueImages?: Array<TMedia[] | null | undefined>;
|
|
32
|
+
productThumbnail?: TMedia | null;
|
|
33
|
+
productImages?: TMedia[] | null;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/** @deprecated Use `ResolveProductSelectionMediaResult`. */
|
|
37
|
+
type ResolveProductMediaResult<TMedia> = Omit<ResolveProductSelectionMediaResult<TMedia>, 'source'> & {
|
|
38
|
+
source: MediaPointerSource;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated One-release shim for ADR 0016. Prefer
|
|
42
|
+
* `resolveProductSelectionMedia()`. Legacy direct-media fallbacks are ignored;
|
|
43
|
+
* callers fall through to product display media (`resolveProductDisplayMedia`)
|
|
44
|
+
* or `none`.
|
|
45
|
+
*/
|
|
46
|
+
declare function resolveProductMedia<TMedia>(input: ResolveProductMediaInput<TMedia>): ResolveProductMediaResult<TMedia>;
|
|
47
|
+
|
|
48
|
+
/** @deprecated ADR 0016 replaces media sets with variant `images[]` subsets. */
|
|
49
|
+
type ProductMediaSetMatchType = 'default' | 'option-values' | 'exact-variant';
|
|
50
|
+
/** @deprecated Use `ResolveProductSelectionMediaInput` and variant `images[]`. */
|
|
51
|
+
type ProductMediaSetInput = {
|
|
52
|
+
label?: string | null;
|
|
53
|
+
matchType: ProductMediaSetMatchType;
|
|
54
|
+
optionValueIds?: Array<string | number | null | undefined> | null;
|
|
55
|
+
variantIds?: Array<string | number | null | undefined> | null;
|
|
56
|
+
items: Array<string | number | null | undefined>;
|
|
57
|
+
primaryMediaItemId?: string | number | null;
|
|
58
|
+
};
|
|
59
|
+
type LegacyProductGallerySource = 'exact_variant_set' | 'option_value_set' | 'default_set';
|
|
60
|
+
/** @deprecated Use `ResolveProductSelectionMediaInput`. */
|
|
61
|
+
type ResolveProductGalleryInput<TMedia> = ResolveProductSelectionMediaInput<TMedia> & {
|
|
62
|
+
pool?: TMedia[] | null;
|
|
63
|
+
mediaSets?: ProductMediaSetInput[] | null;
|
|
64
|
+
selectedVariantId?: string | number | null;
|
|
65
|
+
selectedOptionValueIds?: Array<string | number | null | undefined> | null;
|
|
66
|
+
listingPrimaryImage?: ProductSelectionMediaPointer;
|
|
67
|
+
};
|
|
68
|
+
/** @deprecated Use selection or display media source types. */
|
|
69
|
+
type ProductGallerySource = ProductSelectionMediaSource | ProductDisplayMediaSource | LegacyProductGallerySource;
|
|
70
|
+
/** @deprecated Use `ResolveProductSelectionMediaResult`. */
|
|
71
|
+
type ResolveProductGalleryResult<TMedia> = {
|
|
72
|
+
primaryImage: TMedia | null;
|
|
73
|
+
images: TMedia[];
|
|
74
|
+
source: ProductGallerySource;
|
|
75
|
+
};
|
|
76
|
+
/** @deprecated Use `resolveProductSelectionMedia()`. */
|
|
77
|
+
declare function resolveProductGallery<TMedia>(input: ResolveProductGalleryInput<TMedia>): ResolveProductGalleryResult<TMedia>;
|
|
13
78
|
|
|
14
79
|
declare const generateOrderNumber: () => string;
|
|
15
80
|
|
|
@@ -29,6 +94,6 @@ declare const formatOrderName: (items: OrderItem[]) => string;
|
|
|
29
94
|
*/
|
|
30
95
|
declare const resolveRelation: <T>(ref: T | string | number | null | undefined) => T | null;
|
|
31
96
|
|
|
32
|
-
declare function createClient(options: ClientConfig):
|
|
97
|
+
declare function createClient(options: ClientConfig): RootClientWithEvents;
|
|
33
98
|
|
|
34
|
-
export {
|
|
99
|
+
export { ClientConfig, type MediaPointerSource, 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, StockSnapshotResponse, createClient, formatOrderName, generateOrderNumber, mergeProductDetailWithStock, resolveProductGallery, resolveProductMedia, resolveRelation };
|