@01.software/sdk 0.42.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/README.md +27 -22
- package/dist/client.cjs +99 -57
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +9 -6
- package/dist/client.d.ts +9 -6
- package/dist/client.js +99 -57
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-BhCMwIus.d.ts → collection-client-DWooaiTr.d.ts} +3 -3
- package/dist/{collection-client-B-qVIBnJ.d.cts → collection-client-Dyl-CDcj.d.cts} +3 -3
- package/dist/{const-pmHlwm3E.d.ts → const-1vleZ6ov.d.cts} +5 -5
- package/dist/{const-BiDujixF.d.cts → const-pGDnsy0o.d.ts} +5 -5
- package/dist/{index-B1UBDaKz.d.ts → index-DUNySyxV.d.ts} +4 -4
- package/dist/{index-D78ki6Ij.d.cts → index-a6g7vqAD.d.cts} +4 -4
- package/dist/index.cjs +111 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -8
- package/dist/index.d.ts +41 -8
- package/dist/index.js +111 -61
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-C7Ul4ElL.d.cts → payload-types-CDsuOEfM.d.cts} +401 -34
- package/dist/{payload-types-C7Ul4ElL.d.ts → payload-types-CDsuOEfM.d.ts} +401 -34
- package/dist/query.cjs +59 -7
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +59 -7
- 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 +130 -57
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +12 -7
- package/dist/server.d.ts +12 -7
- package/dist/server.js +130 -57
- package/dist/server.js.map +1 -1
- package/dist/{types-D5dSNIGs.d.ts → types-CDND3hzq.d.cts} +104 -10
- package/dist/{types-BL7M-EUV.d.cts → types-Dt9FJisi.d.ts} +104 -10
- package/dist/{types-ChV1t4ei.d.cts → types-SoXsbKhj.d.cts} +1 -1
- package/dist/{types-Bf2iCjy8.d.ts → types-oiae_LMm.d.ts} +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 +3 -1
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +4 -4
- package/dist/webhook.d.ts +4 -4
- package/dist/webhook.js +3 -1
- package/dist/webhook.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PublicCollection, S as ServerCollection } from './const-
|
|
2
|
-
import { C as CollectionType, P as PublicProduct } from './types-
|
|
3
|
-
import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-
|
|
1
|
+
import { P as PublicCollection, S as ServerCollection } from './const-1vleZ6ov.cjs';
|
|
2
|
+
import { C as CollectionType, P as PublicProduct } from './types-SoXsbKhj.cjs';
|
|
3
|
+
import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-CDsuOEfM.cjs';
|
|
4
4
|
|
|
5
5
|
interface CustomerScopedApiOptions {
|
|
6
6
|
publishableKey?: string;
|
|
@@ -402,6 +402,14 @@ type CustomerSnapshot = {
|
|
|
402
402
|
email: string;
|
|
403
403
|
phone?: string;
|
|
404
404
|
};
|
|
405
|
+
type CheckoutShippingAddress = {
|
|
406
|
+
recipientName: string;
|
|
407
|
+
phone: string;
|
|
408
|
+
postalCode: string;
|
|
409
|
+
address: string;
|
|
410
|
+
detailAddress: string;
|
|
411
|
+
deliveryMessage?: string;
|
|
412
|
+
};
|
|
405
413
|
type PublicOrderReference = string | {
|
|
406
414
|
id?: string | number | null;
|
|
407
415
|
title?: string | null;
|
|
@@ -524,6 +532,13 @@ type CreateOrderLineItemsInput = {
|
|
|
524
532
|
*/
|
|
525
533
|
orderItems?: never;
|
|
526
534
|
};
|
|
535
|
+
type PaymentProviderInput = {
|
|
536
|
+
pgPaymentId: string;
|
|
537
|
+
pgProvider: string;
|
|
538
|
+
} | {
|
|
539
|
+
pgPaymentId?: never;
|
|
540
|
+
pgProvider?: never;
|
|
541
|
+
};
|
|
527
542
|
type CreateOrderBodyBase = {
|
|
528
543
|
orderNumber: string;
|
|
529
544
|
customer?: string;
|
|
@@ -531,9 +546,8 @@ type CreateOrderBodyBase = {
|
|
|
531
546
|
shippingAddress?: Order['shippingAddress'];
|
|
532
547
|
totalAmount: number;
|
|
533
548
|
shippingAmount?: number;
|
|
534
|
-
pgPaymentId?: string;
|
|
535
549
|
discountCode?: string;
|
|
536
|
-
};
|
|
550
|
+
} & PaymentProviderInput;
|
|
537
551
|
type CreateOrderParams = WithIdempotencyKey<CreateOrderBodyBase & CreateOrderLineItemsInput>;
|
|
538
552
|
type UpdateOrderParams = {
|
|
539
553
|
orderNumber: string;
|
|
@@ -717,11 +731,12 @@ type ReturnWithRefundParams = WithIdempotencyKey<{
|
|
|
717
731
|
}>;
|
|
718
732
|
type CheckoutParams = WithIdempotencyKey<{
|
|
719
733
|
cartId: string;
|
|
734
|
+
cartToken?: string;
|
|
720
735
|
orderNumber: string;
|
|
721
736
|
customerSnapshot: CustomerSnapshot;
|
|
722
|
-
|
|
737
|
+
shippingAddress?: CheckoutShippingAddress;
|
|
723
738
|
discountCode?: string;
|
|
724
|
-
}>;
|
|
739
|
+
} & PaymentProviderInput>;
|
|
725
740
|
type CreateFulfillmentParams = WithIdempotencyKey<{
|
|
726
741
|
orderNumber: string;
|
|
727
742
|
fulfillmentOrderId?: string | number;
|
|
@@ -1032,6 +1047,7 @@ type PublicCartItem = {
|
|
|
1032
1047
|
discountAllocation?: number | null;
|
|
1033
1048
|
discountedUnitPrice?: number | null;
|
|
1034
1049
|
discountedTotalPrice?: number | null;
|
|
1050
|
+
requiresShipping?: boolean | null;
|
|
1035
1051
|
createdAt?: string | null;
|
|
1036
1052
|
updatedAt?: string | null;
|
|
1037
1053
|
};
|
|
@@ -1620,6 +1636,10 @@ type ProductFieldsInput = {
|
|
|
1620
1636
|
publishedAt?: string | null;
|
|
1621
1637
|
categories?: string[];
|
|
1622
1638
|
tags?: string[];
|
|
1639
|
+
seo?: {
|
|
1640
|
+
title?: string | null;
|
|
1641
|
+
description?: string | null;
|
|
1642
|
+
} | null;
|
|
1623
1643
|
metadata?: unknown;
|
|
1624
1644
|
};
|
|
1625
1645
|
type ProductUpsertGraphFields = {
|
|
@@ -2007,6 +2027,7 @@ type ValidateDiscountParams = {
|
|
|
2007
2027
|
code: string;
|
|
2008
2028
|
orderAmount: number;
|
|
2009
2029
|
};
|
|
2030
|
+
type DiscountErrorReasonCode = 'discount_code_not_found' | 'discount_not_started' | 'discount_expired' | 'discount_usage_limit' | 'discount_per_customer_limit' | 'discount_customer_required' | 'discount_first_order_only' | 'discount_customer_not_eligible' | 'discount_customer_excluded' | 'discount_items_required' | 'discount_product_not_eligible' | 'discount_product_excluded' | 'discount_min_order_amount';
|
|
2010
2031
|
type ValidateDiscountResult = {
|
|
2011
2032
|
valid: boolean;
|
|
2012
2033
|
code: string;
|
|
@@ -2014,6 +2035,7 @@ type ValidateDiscountResult = {
|
|
|
2014
2035
|
discountAmount: number;
|
|
2015
2036
|
freeShipping?: boolean;
|
|
2016
2037
|
reason?: string;
|
|
2038
|
+
reasonCode?: DiscountErrorReasonCode;
|
|
2017
2039
|
};
|
|
2018
2040
|
declare class DiscountApi extends BaseApi {
|
|
2019
2041
|
constructor(options: DiscountApiOptions);
|
|
@@ -2265,8 +2287,8 @@ interface EventsClientOptions {
|
|
|
2265
2287
|
}
|
|
2266
2288
|
type EventsDateParam = string | Date;
|
|
2267
2289
|
interface EventsRangeParams {
|
|
2268
|
-
start
|
|
2269
|
-
end
|
|
2290
|
+
start?: EventsDateParam;
|
|
2291
|
+
end?: EventsDateParam;
|
|
2270
2292
|
limit?: number;
|
|
2271
2293
|
page?: number;
|
|
2272
2294
|
calendar?: string;
|
|
@@ -2455,6 +2477,9 @@ interface TenantFeatureProgressResponse {
|
|
|
2455
2477
|
planBlocked: string[];
|
|
2456
2478
|
closureAdded: string[];
|
|
2457
2479
|
};
|
|
2480
|
+
config: {
|
|
2481
|
+
fulfillmentMode: 'shipping' | 'none';
|
|
2482
|
+
};
|
|
2458
2483
|
summary: {
|
|
2459
2484
|
complete: number;
|
|
2460
2485
|
total: number;
|
|
@@ -2507,6 +2532,67 @@ declare class TenantIntrospectionApi extends BaseApi implements TenantIntrospect
|
|
|
2507
2532
|
featureProgress(params: TenantFeatureProgressInput): Promise<TenantFeatureProgressResponse>;
|
|
2508
2533
|
}
|
|
2509
2534
|
|
|
2535
|
+
/**
|
|
2536
|
+
* SDK-local hand-declarations of the membership wire contract types.
|
|
2537
|
+
*
|
|
2538
|
+
* The public SDK must keep these types local because the canonical membership
|
|
2539
|
+
* contract package is private to the workspace. These public types are
|
|
2540
|
+
* structurally checked by membership contract-parity type tests.
|
|
2541
|
+
*/
|
|
2542
|
+
type MembershipStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'cancelled' | 'expired';
|
|
2543
|
+
/**
|
|
2544
|
+
* Parameters for the subscribe endpoint (delegated charge model).
|
|
2545
|
+
* The storefront already collected the first payment; this records it and
|
|
2546
|
+
* activates the membership.
|
|
2547
|
+
*/
|
|
2548
|
+
type SubscribeMembershipParams = {
|
|
2549
|
+
planId: string;
|
|
2550
|
+
/** Stable client-generated key used as the deduplication key for this subscription intent. */
|
|
2551
|
+
subscribeIntentKey: string;
|
|
2552
|
+
pgPaymentId: string;
|
|
2553
|
+
amount: number;
|
|
2554
|
+
currency: string;
|
|
2555
|
+
customerRef?: string;
|
|
2556
|
+
card?: {
|
|
2557
|
+
last4?: string;
|
|
2558
|
+
brand?: string;
|
|
2559
|
+
};
|
|
2560
|
+
};
|
|
2561
|
+
type SubscribeMembershipResponse = {
|
|
2562
|
+
membershipId: string;
|
|
2563
|
+
status: MembershipStatus;
|
|
2564
|
+
};
|
|
2565
|
+
/**
|
|
2566
|
+
* Parameters for cancelling a membership.
|
|
2567
|
+
* `immediate=false` (default) sets `cancelAtPeriodEnd`; benefits persist to
|
|
2568
|
+
* the last paid period. `immediate=true` cancels immediately and revokes groups.
|
|
2569
|
+
*/
|
|
2570
|
+
type CancelMembershipParams = {
|
|
2571
|
+
id: string;
|
|
2572
|
+
immediate?: boolean;
|
|
2573
|
+
};
|
|
2574
|
+
type CancelMembershipResponse = {
|
|
2575
|
+
status: MembershipStatus;
|
|
2576
|
+
};
|
|
2577
|
+
/**
|
|
2578
|
+
* The customer's own subscription view. Never includes a payment token or
|
|
2579
|
+
* subscribeIntentKey.
|
|
2580
|
+
*/
|
|
2581
|
+
type CustomerMembershipView = {
|
|
2582
|
+
id: string;
|
|
2583
|
+
plan: string;
|
|
2584
|
+
status: MembershipStatus;
|
|
2585
|
+
currentPeriodEnd: string;
|
|
2586
|
+
nextBillingAt: string | null;
|
|
2587
|
+
cancelAtPeriodEnd: boolean;
|
|
2588
|
+
amount: number;
|
|
2589
|
+
currency: string;
|
|
2590
|
+
card?: {
|
|
2591
|
+
last4?: string;
|
|
2592
|
+
brand?: string;
|
|
2593
|
+
} | null;
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2510
2596
|
interface ClientConfig {
|
|
2511
2597
|
publishableKey: string;
|
|
2512
2598
|
/** API base URL for staging, self-hosted, preview, or proxy deployments. */
|
|
@@ -2700,6 +2786,9 @@ interface RootClient {
|
|
|
2700
2786
|
events?: EventsClient;
|
|
2701
2787
|
customer: CustomerNamespace;
|
|
2702
2788
|
collections: RootCollectionClient;
|
|
2789
|
+
memberships: {
|
|
2790
|
+
me: () => Promise<CustomerMembershipView | null>;
|
|
2791
|
+
};
|
|
2703
2792
|
lastRequestId: string | null;
|
|
2704
2793
|
getState(): ClientState;
|
|
2705
2794
|
getConfig(): ClientConfig;
|
|
@@ -2707,6 +2796,11 @@ interface RootClient {
|
|
|
2707
2796
|
interface RootServerClient {
|
|
2708
2797
|
commerce: ServerCommerceClient;
|
|
2709
2798
|
tenant: TenantIntrospectionClient;
|
|
2799
|
+
memberships: {
|
|
2800
|
+
subscribe: (params: SubscribeMembershipParams) => Promise<SubscribeMembershipResponse>;
|
|
2801
|
+
cancel: (params: CancelMembershipParams) => Promise<CancelMembershipResponse>;
|
|
2802
|
+
me: () => Promise<CustomerMembershipView | null>;
|
|
2803
|
+
};
|
|
2710
2804
|
/** Set on {@link createServerClient} return values; optional for structural mocks. */
|
|
2711
2805
|
events?: EventsClient;
|
|
2712
2806
|
community: CommunityClient & {
|
|
@@ -2733,4 +2827,4 @@ type DeepPartial<T> = {
|
|
|
2733
2827
|
};
|
|
2734
2828
|
type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
|
|
2735
2829
|
|
|
2736
|
-
export { type
|
|
2830
|
+
export { type BanCustomerParams as $, type AddItemParams as A, type RootCollectionClient as B, CommerceClient as C, type DebugConfig as D, EventsClient as E, type RootReadOnlyQueryBuilder as F, type StorefrontContentListOptions as G, type StorefrontContentReference as H, type StorefrontGalleryItem as I, type StorefrontGalleryItemsListOptions as J, type StorefrontGalleryItemsSort as K, type StorefrontLink as L, type StorefrontLinksListOptions as M, type StorefrontLinksSort as N, BaseApi as O, type PayloadFindResponse as P, type ServerApiOptions as Q, type RemoveDiscountParams as R, type Sort as S, ServerCommerceClient as T, type UpdateItemParams as U, type TenantIntrospectionClient as V, type Where as W, type SubscribeMembershipParams as X, type SubscribeMembershipResponse as Y, type CancelMembershipParams as Z, type CancelMembershipResponse as _, CommunityClient as a, type ResolveProductSelectionMediaResult as a$, type CommunityBan as a0, type UnbanCustomerParams as a1, type ClientServerConfig as a2, type RootServerClientWithEvents as a3, type CollectionFieldSchema as a4, type CollectionSchemaResponse as a5, type EventGuestCancelParams as a6, type EventGuestRegistration as a7, type EventGuestRegistrationResponse as a8, type EventRegistrationAnswerInput as a9, TenantIntrospectionApi as aA, type TenantIntrospectionApiOptions as aB, type ApiDeleteOptions as aC, type PublicReadQueryOptions as aD, CustomerAuth as aE, type CustomerProfile as aF, type CustomerAuthResponse as aG, type CustomerLoginData as aH, type CustomerRegisterResponse as aI, type CustomerRegisterData as aJ, type CustomerRefreshResponse as aK, type UpdateProfileData as aL, type ProductListingPageBaseParams as aM, type ProductListingPageParams as aN, type ProductDetailParams as aO, type ProductDetailResult as aP, type ProductListingPageCatalogParams as aQ, type ProductListingPageResult as aR, type ProductListingGroupsCatalogItem as aS, type ProductListingPageFullParams as aT, type ProductListingGroupsItem as aU, type ProductDetail as aV, type ProductDetailCatalog as aW, type StockSnapshotResponse as aX, type ProductSelectionMediaSource as aY, type ProductDisplayMediaSource as aZ, type ResolveProductSelectionMediaInput as a_, type EventRegistrationAttendeeInput as aa, type EventRegistrationPublic as ab, type EventRegistrationRegisterParams as ac, type EventRegistrationRegisterResponse as ad, type EventsCalendarItem as ae, type EventsClientOptions as af, type EventsDateParam as ag, type EventsExternalSource as ah, type EventsLocation as ai, type EventsOccurrenceLocation as aj, type EventsRangeEvent as ak, type EventsRangeOccurrence as al, type EventsRangeParams as am, type EventsRangeResponse as an, type EventsTaxonomyItem as ao, ModerationApi as ap, type RootServerClient as aq, type TenantFeatureProgressEvidenceValue as ar, type TenantFeatureProgressFeature as as, type TenantFeatureProgressGroup as at, type TenantFeatureProgressInput as au, type TenantFeatureProgressItem as av, type TenantFeatureProgressItemState as aw, type TenantFeatureProgressResponse as ax, type TenantFeatureProgressSeverity as ay, type TenantFeatureProgressStatus as az, ContentClient as b, type ProductDetailImage as b$, type ProductSelectionMediaPointer as b0, type RootClientWithEvents as b1, type BulkImportFulfillmentsParams as b2, type BulkImportFulfillmentsResponse as b3, type CalculateShippingParams as b4, type CalculateShippingResult as b5, type CancelOrderParams as b6, type CancelOrderReconciliationStatus as b7, type CancelOrderResponse as b8, type CancelReasonCode as b9, type CustomerOrderListOptions as bA, type CustomerSnapshot as bB, DiscountApi as bC, type DiscountApiOptions as bD, type DiscountErrorReasonCode as bE, type FeaturedImagePointerInput as bF, type GetOrderByPaymentIdParams as bG, type LegacyProductSelectionParamEvent as bH, type ListingGroupsParams as bI, type MediaValue as bJ, type MembershipStatus as bK, type NormalizedOptionSwatch as bL, type NormalizedProductSelection as bM, OrderApi as bN, type OrderApiOptions as bO, type OrderByPaymentResult as bP, PRODUCT_PLP_FIND_OPTIONS as bQ, PRODUCT_UPSERT_READONLY_FIELD_REASON as bR, PRODUCT_UPSERT_UNKNOWN_FIELD_REASON as bS, type PrepareFulfillmentOrderParams as bT, type PrepareFulfillmentOrderResponse as bU, ProductApi as bV, type ProductApiOptions as bW, type ProductDetailBrand as bX, type ProductDetailCatalogResult as bY, type ProductDetailCatalogVariant as bZ, type ProductDetailCategory as b_, CartApi as ba, type CartApiOptions as bb, type CartMergeParams as bc, type CartMergeResult as bd, type CartMineResult as be, type Comment as bf, type CommerceClientOptions as bg, type CommunityClientOptions as bh, type CommunityComment as bi, type CommunityCommentListSort as bj, type CommunityPost as bk, type CommunityPostCategory as bl, type CommunityPostListSort as bm, type CommunityPostTag as bn, type CommunityPublicAuthorSnapshot as bo, type CommunityPublicMediaAsset as bp, type CommunityPublicReference as bq, type CompatibilityProductSelectionParamEvent as br, type ConfirmPaymentParams as bs, type ConfirmPaymentResponse as bt, type ConfirmPaymentWithOrderResult as bu, type CreateFulfillmentParams as bv, type CreateOrderItem as bw, type CreateOrderParams as bx, type CreateReturnParams as by, type CustomerAuthOptions as bz, CustomerNamespace as c, type ReturnItem as c$, type ProductDetailImageMedia as c0, type ProductDetailMedia as c1, type ProductDetailOption as c2, type ProductDetailOptionValue as c3, type ProductDetailTag as c4, type ProductDetailUnavailableReason as c5, type ProductDetailVariant as c6, type ProductDetailVariantOptionValue as c7, type ProductDetailVideo as c8, type ProductHrefGroup as c9, type ProductOptionShape as cA, type ProductOptionValueShape as cB, type ProductOptionValueSwatch as cC, type ProductOptionValueSwatchInput as cD, type ProductPriceRange as cE, type ProductSelectionAvailableSwatch as cF, type ProductSelectionAvailableValue as cG, type ProductSelectionByOptionValue as cH, ProductSelectionCodecError as cI, type ProductSelectionCodecOptions as cJ, type ProductSelectionInput as cK, type ProductSelectionOptionValue as cL, type ProductSelectionResolution as cM, type ProductSelectionResolutionContext as cN, type ProductSelectionUrlEmit as cO, type ProductSelectionVariant as cP, type ProductUpsertFieldValidationErrorBody as cQ, type ProductUpsertFieldValidationErrorReason as cR, type ProductVariantShape as cS, type RequestOptions as cT, type ResolveCancelRefundFailedResponse as cU, type ResolveCancelRefundOutcome as cV, type ResolveCancelRefundParams as cW, type ResolveCancelRefundResponse as cX, type ResolveCancelRefundSucceededResponse as cY, type ResolveProductDisplayMediaInput as cZ, type ResolveProductDisplayMediaResult as c_, type ProductHrefOptions as ca, type ProductHrefProduct as cb, type ProductListingCard as cc, type ProductListingCardOptions as cd, type ProductListingCardPriceRange as ce, type ProductListingCardRepresentativeVariant as cf, type ProductListingGroup as cg, type ProductListingGroupCatalogSummary as ch, type ProductListingGroupCatalogVariant as ci, type ProductListingGroupProjection as cj, type ProductListingGroupSummary as ck, type ProductListingGroupVariant as cl, type ProductListingGroupsCatalogProduct as cm, type ProductListingGroupsCatalogResponse as cn, type ProductListingGroupsProduct as co, type ProductListingGroupsResponse as cp, type ProductListingPageFilters as cq, type ProductListingPageSort as cr, type ProductListingProductShape as cs, type ProductListingSwatch as ct, type ProductMediaResolutionSource as cu, type ProductMoneyRange as cv, type ProductOptionMatrix as cw, type ProductOptionMatrixOption as cx, type ProductOptionMatrixValue as cy, type ProductOptionMatrixVariant as cz, type CustomerMembershipView as d, type ReturnReason as d0, type ReturnWithRefundItem as d1, type ReturnWithRefundParams as d2, ShippingApi as d3, type ShippingApiOptions as d4, type StockCheckParams as d5, type StockCheckResponse as d6, type StockCheckResult as d7, type StockSnapshotItem as d8, type StockSnapshotParams as d9, projectProductToListingShape as dA, resolveFeaturedImagePointer as dB, resolveProductDisplayMedia as dC, resolveProductSelection as dD, resolveProductSelectionFromMatrix as dE, resolveProductSelectionMedia as dF, resolveVariantForSelection as dG, selectNext as dH, selectedSwatchMediaItemId as dI, stringifyProductSelection as dJ, toShopifyPriceRangeV2 as dK, type TransactionStatus as da, type UpdateFulfillmentParams as db, type UpdateOrderParams as dc, type UpdateReturnParams as dd, type UpdateTransactionParams as de, type ValidateDiscountParams as df, type ValidateDiscountResult as dg, type WithIdempotencyKey as dh, buildProductHref as di, buildProductListingCard as dj, buildProductListingGroupProjection as dk, buildProductListingGroupsByOption as dl, buildProductOptionMatrix as dm, buildProductOptionMatrixFromDetail as dn, createProductSelectionCodec as dp, getAvailableOptionValues as dq, getProductSelectionImages as dr, getSelectedValueByOptionId as ds, getVariantAvailableForSale as dt, getVariantAvailableStock as du, isProductUpsertFieldValidationErrorBody as dv, normalizeProductSelection as dw, normalizeProductSelectionFromMatrix as dx, normalizeSelectedValueIds as dy, parseProductSelection as dz, type ClientState as e, type ClientConfig as f, type ApiQueryOptions as g, type ApplyDiscountParams as h, type CheckoutParams as i, type ClearCartParams as j, type ClientMetadata as k, type ContentClientOptions as l, type DeepPartial as m, type ExtractArrayType as n, type PayloadMutationResponse as o, type PublicCart as p, type PublicCartItem as q, type PublicCartReference as r, type PublicMediaAsset as s, type PublicMediaSize as t, type PublicOrder as u, type PublicOrderItem as v, type PublicOrderReference as w, type RemoveItemParams as x, type RetryConfig as y, type RootClient as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PublicCollection, S as ServerCollection } from './const-
|
|
2
|
-
import { C as CollectionType, P as PublicProduct } from './types-
|
|
3
|
-
import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-
|
|
1
|
+
import { P as PublicCollection, S as ServerCollection } from './const-pGDnsy0o.js';
|
|
2
|
+
import { C as CollectionType, P as PublicProduct } from './types-oiae_LMm.js';
|
|
3
|
+
import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-CDsuOEfM.js';
|
|
4
4
|
|
|
5
5
|
interface CustomerScopedApiOptions {
|
|
6
6
|
publishableKey?: string;
|
|
@@ -402,6 +402,14 @@ type CustomerSnapshot = {
|
|
|
402
402
|
email: string;
|
|
403
403
|
phone?: string;
|
|
404
404
|
};
|
|
405
|
+
type CheckoutShippingAddress = {
|
|
406
|
+
recipientName: string;
|
|
407
|
+
phone: string;
|
|
408
|
+
postalCode: string;
|
|
409
|
+
address: string;
|
|
410
|
+
detailAddress: string;
|
|
411
|
+
deliveryMessage?: string;
|
|
412
|
+
};
|
|
405
413
|
type PublicOrderReference = string | {
|
|
406
414
|
id?: string | number | null;
|
|
407
415
|
title?: string | null;
|
|
@@ -524,6 +532,13 @@ type CreateOrderLineItemsInput = {
|
|
|
524
532
|
*/
|
|
525
533
|
orderItems?: never;
|
|
526
534
|
};
|
|
535
|
+
type PaymentProviderInput = {
|
|
536
|
+
pgPaymentId: string;
|
|
537
|
+
pgProvider: string;
|
|
538
|
+
} | {
|
|
539
|
+
pgPaymentId?: never;
|
|
540
|
+
pgProvider?: never;
|
|
541
|
+
};
|
|
527
542
|
type CreateOrderBodyBase = {
|
|
528
543
|
orderNumber: string;
|
|
529
544
|
customer?: string;
|
|
@@ -531,9 +546,8 @@ type CreateOrderBodyBase = {
|
|
|
531
546
|
shippingAddress?: Order['shippingAddress'];
|
|
532
547
|
totalAmount: number;
|
|
533
548
|
shippingAmount?: number;
|
|
534
|
-
pgPaymentId?: string;
|
|
535
549
|
discountCode?: string;
|
|
536
|
-
};
|
|
550
|
+
} & PaymentProviderInput;
|
|
537
551
|
type CreateOrderParams = WithIdempotencyKey<CreateOrderBodyBase & CreateOrderLineItemsInput>;
|
|
538
552
|
type UpdateOrderParams = {
|
|
539
553
|
orderNumber: string;
|
|
@@ -717,11 +731,12 @@ type ReturnWithRefundParams = WithIdempotencyKey<{
|
|
|
717
731
|
}>;
|
|
718
732
|
type CheckoutParams = WithIdempotencyKey<{
|
|
719
733
|
cartId: string;
|
|
734
|
+
cartToken?: string;
|
|
720
735
|
orderNumber: string;
|
|
721
736
|
customerSnapshot: CustomerSnapshot;
|
|
722
|
-
|
|
737
|
+
shippingAddress?: CheckoutShippingAddress;
|
|
723
738
|
discountCode?: string;
|
|
724
|
-
}>;
|
|
739
|
+
} & PaymentProviderInput>;
|
|
725
740
|
type CreateFulfillmentParams = WithIdempotencyKey<{
|
|
726
741
|
orderNumber: string;
|
|
727
742
|
fulfillmentOrderId?: string | number;
|
|
@@ -1032,6 +1047,7 @@ type PublicCartItem = {
|
|
|
1032
1047
|
discountAllocation?: number | null;
|
|
1033
1048
|
discountedUnitPrice?: number | null;
|
|
1034
1049
|
discountedTotalPrice?: number | null;
|
|
1050
|
+
requiresShipping?: boolean | null;
|
|
1035
1051
|
createdAt?: string | null;
|
|
1036
1052
|
updatedAt?: string | null;
|
|
1037
1053
|
};
|
|
@@ -1620,6 +1636,10 @@ type ProductFieldsInput = {
|
|
|
1620
1636
|
publishedAt?: string | null;
|
|
1621
1637
|
categories?: string[];
|
|
1622
1638
|
tags?: string[];
|
|
1639
|
+
seo?: {
|
|
1640
|
+
title?: string | null;
|
|
1641
|
+
description?: string | null;
|
|
1642
|
+
} | null;
|
|
1623
1643
|
metadata?: unknown;
|
|
1624
1644
|
};
|
|
1625
1645
|
type ProductUpsertGraphFields = {
|
|
@@ -2007,6 +2027,7 @@ type ValidateDiscountParams = {
|
|
|
2007
2027
|
code: string;
|
|
2008
2028
|
orderAmount: number;
|
|
2009
2029
|
};
|
|
2030
|
+
type DiscountErrorReasonCode = 'discount_code_not_found' | 'discount_not_started' | 'discount_expired' | 'discount_usage_limit' | 'discount_per_customer_limit' | 'discount_customer_required' | 'discount_first_order_only' | 'discount_customer_not_eligible' | 'discount_customer_excluded' | 'discount_items_required' | 'discount_product_not_eligible' | 'discount_product_excluded' | 'discount_min_order_amount';
|
|
2010
2031
|
type ValidateDiscountResult = {
|
|
2011
2032
|
valid: boolean;
|
|
2012
2033
|
code: string;
|
|
@@ -2014,6 +2035,7 @@ type ValidateDiscountResult = {
|
|
|
2014
2035
|
discountAmount: number;
|
|
2015
2036
|
freeShipping?: boolean;
|
|
2016
2037
|
reason?: string;
|
|
2038
|
+
reasonCode?: DiscountErrorReasonCode;
|
|
2017
2039
|
};
|
|
2018
2040
|
declare class DiscountApi extends BaseApi {
|
|
2019
2041
|
constructor(options: DiscountApiOptions);
|
|
@@ -2265,8 +2287,8 @@ interface EventsClientOptions {
|
|
|
2265
2287
|
}
|
|
2266
2288
|
type EventsDateParam = string | Date;
|
|
2267
2289
|
interface EventsRangeParams {
|
|
2268
|
-
start
|
|
2269
|
-
end
|
|
2290
|
+
start?: EventsDateParam;
|
|
2291
|
+
end?: EventsDateParam;
|
|
2270
2292
|
limit?: number;
|
|
2271
2293
|
page?: number;
|
|
2272
2294
|
calendar?: string;
|
|
@@ -2455,6 +2477,9 @@ interface TenantFeatureProgressResponse {
|
|
|
2455
2477
|
planBlocked: string[];
|
|
2456
2478
|
closureAdded: string[];
|
|
2457
2479
|
};
|
|
2480
|
+
config: {
|
|
2481
|
+
fulfillmentMode: 'shipping' | 'none';
|
|
2482
|
+
};
|
|
2458
2483
|
summary: {
|
|
2459
2484
|
complete: number;
|
|
2460
2485
|
total: number;
|
|
@@ -2507,6 +2532,67 @@ declare class TenantIntrospectionApi extends BaseApi implements TenantIntrospect
|
|
|
2507
2532
|
featureProgress(params: TenantFeatureProgressInput): Promise<TenantFeatureProgressResponse>;
|
|
2508
2533
|
}
|
|
2509
2534
|
|
|
2535
|
+
/**
|
|
2536
|
+
* SDK-local hand-declarations of the membership wire contract types.
|
|
2537
|
+
*
|
|
2538
|
+
* The public SDK must keep these types local because the canonical membership
|
|
2539
|
+
* contract package is private to the workspace. These public types are
|
|
2540
|
+
* structurally checked by membership contract-parity type tests.
|
|
2541
|
+
*/
|
|
2542
|
+
type MembershipStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'cancelled' | 'expired';
|
|
2543
|
+
/**
|
|
2544
|
+
* Parameters for the subscribe endpoint (delegated charge model).
|
|
2545
|
+
* The storefront already collected the first payment; this records it and
|
|
2546
|
+
* activates the membership.
|
|
2547
|
+
*/
|
|
2548
|
+
type SubscribeMembershipParams = {
|
|
2549
|
+
planId: string;
|
|
2550
|
+
/** Stable client-generated key used as the deduplication key for this subscription intent. */
|
|
2551
|
+
subscribeIntentKey: string;
|
|
2552
|
+
pgPaymentId: string;
|
|
2553
|
+
amount: number;
|
|
2554
|
+
currency: string;
|
|
2555
|
+
customerRef?: string;
|
|
2556
|
+
card?: {
|
|
2557
|
+
last4?: string;
|
|
2558
|
+
brand?: string;
|
|
2559
|
+
};
|
|
2560
|
+
};
|
|
2561
|
+
type SubscribeMembershipResponse = {
|
|
2562
|
+
membershipId: string;
|
|
2563
|
+
status: MembershipStatus;
|
|
2564
|
+
};
|
|
2565
|
+
/**
|
|
2566
|
+
* Parameters for cancelling a membership.
|
|
2567
|
+
* `immediate=false` (default) sets `cancelAtPeriodEnd`; benefits persist to
|
|
2568
|
+
* the last paid period. `immediate=true` cancels immediately and revokes groups.
|
|
2569
|
+
*/
|
|
2570
|
+
type CancelMembershipParams = {
|
|
2571
|
+
id: string;
|
|
2572
|
+
immediate?: boolean;
|
|
2573
|
+
};
|
|
2574
|
+
type CancelMembershipResponse = {
|
|
2575
|
+
status: MembershipStatus;
|
|
2576
|
+
};
|
|
2577
|
+
/**
|
|
2578
|
+
* The customer's own subscription view. Never includes a payment token or
|
|
2579
|
+
* subscribeIntentKey.
|
|
2580
|
+
*/
|
|
2581
|
+
type CustomerMembershipView = {
|
|
2582
|
+
id: string;
|
|
2583
|
+
plan: string;
|
|
2584
|
+
status: MembershipStatus;
|
|
2585
|
+
currentPeriodEnd: string;
|
|
2586
|
+
nextBillingAt: string | null;
|
|
2587
|
+
cancelAtPeriodEnd: boolean;
|
|
2588
|
+
amount: number;
|
|
2589
|
+
currency: string;
|
|
2590
|
+
card?: {
|
|
2591
|
+
last4?: string;
|
|
2592
|
+
brand?: string;
|
|
2593
|
+
} | null;
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2510
2596
|
interface ClientConfig {
|
|
2511
2597
|
publishableKey: string;
|
|
2512
2598
|
/** API base URL for staging, self-hosted, preview, or proxy deployments. */
|
|
@@ -2700,6 +2786,9 @@ interface RootClient {
|
|
|
2700
2786
|
events?: EventsClient;
|
|
2701
2787
|
customer: CustomerNamespace;
|
|
2702
2788
|
collections: RootCollectionClient;
|
|
2789
|
+
memberships: {
|
|
2790
|
+
me: () => Promise<CustomerMembershipView | null>;
|
|
2791
|
+
};
|
|
2703
2792
|
lastRequestId: string | null;
|
|
2704
2793
|
getState(): ClientState;
|
|
2705
2794
|
getConfig(): ClientConfig;
|
|
@@ -2707,6 +2796,11 @@ interface RootClient {
|
|
|
2707
2796
|
interface RootServerClient {
|
|
2708
2797
|
commerce: ServerCommerceClient;
|
|
2709
2798
|
tenant: TenantIntrospectionClient;
|
|
2799
|
+
memberships: {
|
|
2800
|
+
subscribe: (params: SubscribeMembershipParams) => Promise<SubscribeMembershipResponse>;
|
|
2801
|
+
cancel: (params: CancelMembershipParams) => Promise<CancelMembershipResponse>;
|
|
2802
|
+
me: () => Promise<CustomerMembershipView | null>;
|
|
2803
|
+
};
|
|
2710
2804
|
/** Set on {@link createServerClient} return values; optional for structural mocks. */
|
|
2711
2805
|
events?: EventsClient;
|
|
2712
2806
|
community: CommunityClient & {
|
|
@@ -2733,4 +2827,4 @@ type DeepPartial<T> = {
|
|
|
2733
2827
|
};
|
|
2734
2828
|
type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
|
|
2735
2829
|
|
|
2736
|
-
export { type
|
|
2830
|
+
export { type BanCustomerParams as $, type AddItemParams as A, type RootCollectionClient as B, CommerceClient as C, type DebugConfig as D, EventsClient as E, type RootReadOnlyQueryBuilder as F, type StorefrontContentListOptions as G, type StorefrontContentReference as H, type StorefrontGalleryItem as I, type StorefrontGalleryItemsListOptions as J, type StorefrontGalleryItemsSort as K, type StorefrontLink as L, type StorefrontLinksListOptions as M, type StorefrontLinksSort as N, BaseApi as O, type PayloadFindResponse as P, type ServerApiOptions as Q, type RemoveDiscountParams as R, type Sort as S, ServerCommerceClient as T, type UpdateItemParams as U, type TenantIntrospectionClient as V, type Where as W, type SubscribeMembershipParams as X, type SubscribeMembershipResponse as Y, type CancelMembershipParams as Z, type CancelMembershipResponse as _, CommunityClient as a, type ResolveProductSelectionMediaResult as a$, type CommunityBan as a0, type UnbanCustomerParams as a1, type ClientServerConfig as a2, type RootServerClientWithEvents as a3, type CollectionFieldSchema as a4, type CollectionSchemaResponse as a5, type EventGuestCancelParams as a6, type EventGuestRegistration as a7, type EventGuestRegistrationResponse as a8, type EventRegistrationAnswerInput as a9, TenantIntrospectionApi as aA, type TenantIntrospectionApiOptions as aB, type ApiDeleteOptions as aC, type PublicReadQueryOptions as aD, CustomerAuth as aE, type CustomerProfile as aF, type CustomerAuthResponse as aG, type CustomerLoginData as aH, type CustomerRegisterResponse as aI, type CustomerRegisterData as aJ, type CustomerRefreshResponse as aK, type UpdateProfileData as aL, type ProductListingPageBaseParams as aM, type ProductListingPageParams as aN, type ProductDetailParams as aO, type ProductDetailResult as aP, type ProductListingPageCatalogParams as aQ, type ProductListingPageResult as aR, type ProductListingGroupsCatalogItem as aS, type ProductListingPageFullParams as aT, type ProductListingGroupsItem as aU, type ProductDetail as aV, type ProductDetailCatalog as aW, type StockSnapshotResponse as aX, type ProductSelectionMediaSource as aY, type ProductDisplayMediaSource as aZ, type ResolveProductSelectionMediaInput as a_, type EventRegistrationAttendeeInput as aa, type EventRegistrationPublic as ab, type EventRegistrationRegisterParams as ac, type EventRegistrationRegisterResponse as ad, type EventsCalendarItem as ae, type EventsClientOptions as af, type EventsDateParam as ag, type EventsExternalSource as ah, type EventsLocation as ai, type EventsOccurrenceLocation as aj, type EventsRangeEvent as ak, type EventsRangeOccurrence as al, type EventsRangeParams as am, type EventsRangeResponse as an, type EventsTaxonomyItem as ao, ModerationApi as ap, type RootServerClient as aq, type TenantFeatureProgressEvidenceValue as ar, type TenantFeatureProgressFeature as as, type TenantFeatureProgressGroup as at, type TenantFeatureProgressInput as au, type TenantFeatureProgressItem as av, type TenantFeatureProgressItemState as aw, type TenantFeatureProgressResponse as ax, type TenantFeatureProgressSeverity as ay, type TenantFeatureProgressStatus as az, ContentClient as b, type ProductDetailImage as b$, type ProductSelectionMediaPointer as b0, type RootClientWithEvents as b1, type BulkImportFulfillmentsParams as b2, type BulkImportFulfillmentsResponse as b3, type CalculateShippingParams as b4, type CalculateShippingResult as b5, type CancelOrderParams as b6, type CancelOrderReconciliationStatus as b7, type CancelOrderResponse as b8, type CancelReasonCode as b9, type CustomerOrderListOptions as bA, type CustomerSnapshot as bB, DiscountApi as bC, type DiscountApiOptions as bD, type DiscountErrorReasonCode as bE, type FeaturedImagePointerInput as bF, type GetOrderByPaymentIdParams as bG, type LegacyProductSelectionParamEvent as bH, type ListingGroupsParams as bI, type MediaValue as bJ, type MembershipStatus as bK, type NormalizedOptionSwatch as bL, type NormalizedProductSelection as bM, OrderApi as bN, type OrderApiOptions as bO, type OrderByPaymentResult as bP, PRODUCT_PLP_FIND_OPTIONS as bQ, PRODUCT_UPSERT_READONLY_FIELD_REASON as bR, PRODUCT_UPSERT_UNKNOWN_FIELD_REASON as bS, type PrepareFulfillmentOrderParams as bT, type PrepareFulfillmentOrderResponse as bU, ProductApi as bV, type ProductApiOptions as bW, type ProductDetailBrand as bX, type ProductDetailCatalogResult as bY, type ProductDetailCatalogVariant as bZ, type ProductDetailCategory as b_, CartApi as ba, type CartApiOptions as bb, type CartMergeParams as bc, type CartMergeResult as bd, type CartMineResult as be, type Comment as bf, type CommerceClientOptions as bg, type CommunityClientOptions as bh, type CommunityComment as bi, type CommunityCommentListSort as bj, type CommunityPost as bk, type CommunityPostCategory as bl, type CommunityPostListSort as bm, type CommunityPostTag as bn, type CommunityPublicAuthorSnapshot as bo, type CommunityPublicMediaAsset as bp, type CommunityPublicReference as bq, type CompatibilityProductSelectionParamEvent as br, type ConfirmPaymentParams as bs, type ConfirmPaymentResponse as bt, type ConfirmPaymentWithOrderResult as bu, type CreateFulfillmentParams as bv, type CreateOrderItem as bw, type CreateOrderParams as bx, type CreateReturnParams as by, type CustomerAuthOptions as bz, CustomerNamespace as c, type ReturnItem as c$, type ProductDetailImageMedia as c0, type ProductDetailMedia as c1, type ProductDetailOption as c2, type ProductDetailOptionValue as c3, type ProductDetailTag as c4, type ProductDetailUnavailableReason as c5, type ProductDetailVariant as c6, type ProductDetailVariantOptionValue as c7, type ProductDetailVideo as c8, type ProductHrefGroup as c9, type ProductOptionShape as cA, type ProductOptionValueShape as cB, type ProductOptionValueSwatch as cC, type ProductOptionValueSwatchInput as cD, type ProductPriceRange as cE, type ProductSelectionAvailableSwatch as cF, type ProductSelectionAvailableValue as cG, type ProductSelectionByOptionValue as cH, ProductSelectionCodecError as cI, type ProductSelectionCodecOptions as cJ, type ProductSelectionInput as cK, type ProductSelectionOptionValue as cL, type ProductSelectionResolution as cM, type ProductSelectionResolutionContext as cN, type ProductSelectionUrlEmit as cO, type ProductSelectionVariant as cP, type ProductUpsertFieldValidationErrorBody as cQ, type ProductUpsertFieldValidationErrorReason as cR, type ProductVariantShape as cS, type RequestOptions as cT, type ResolveCancelRefundFailedResponse as cU, type ResolveCancelRefundOutcome as cV, type ResolveCancelRefundParams as cW, type ResolveCancelRefundResponse as cX, type ResolveCancelRefundSucceededResponse as cY, type ResolveProductDisplayMediaInput as cZ, type ResolveProductDisplayMediaResult as c_, type ProductHrefOptions as ca, type ProductHrefProduct as cb, type ProductListingCard as cc, type ProductListingCardOptions as cd, type ProductListingCardPriceRange as ce, type ProductListingCardRepresentativeVariant as cf, type ProductListingGroup as cg, type ProductListingGroupCatalogSummary as ch, type ProductListingGroupCatalogVariant as ci, type ProductListingGroupProjection as cj, type ProductListingGroupSummary as ck, type ProductListingGroupVariant as cl, type ProductListingGroupsCatalogProduct as cm, type ProductListingGroupsCatalogResponse as cn, type ProductListingGroupsProduct as co, type ProductListingGroupsResponse as cp, type ProductListingPageFilters as cq, type ProductListingPageSort as cr, type ProductListingProductShape as cs, type ProductListingSwatch as ct, type ProductMediaResolutionSource as cu, type ProductMoneyRange as cv, type ProductOptionMatrix as cw, type ProductOptionMatrixOption as cx, type ProductOptionMatrixValue as cy, type ProductOptionMatrixVariant as cz, type CustomerMembershipView as d, type ReturnReason as d0, type ReturnWithRefundItem as d1, type ReturnWithRefundParams as d2, ShippingApi as d3, type ShippingApiOptions as d4, type StockCheckParams as d5, type StockCheckResponse as d6, type StockCheckResult as d7, type StockSnapshotItem as d8, type StockSnapshotParams as d9, projectProductToListingShape as dA, resolveFeaturedImagePointer as dB, resolveProductDisplayMedia as dC, resolveProductSelection as dD, resolveProductSelectionFromMatrix as dE, resolveProductSelectionMedia as dF, resolveVariantForSelection as dG, selectNext as dH, selectedSwatchMediaItemId as dI, stringifyProductSelection as dJ, toShopifyPriceRangeV2 as dK, type TransactionStatus as da, type UpdateFulfillmentParams as db, type UpdateOrderParams as dc, type UpdateReturnParams as dd, type UpdateTransactionParams as de, type ValidateDiscountParams as df, type ValidateDiscountResult as dg, type WithIdempotencyKey as dh, buildProductHref as di, buildProductListingCard as dj, buildProductListingGroupProjection as dk, buildProductListingGroupsByOption as dl, buildProductOptionMatrix as dm, buildProductOptionMatrixFromDetail as dn, createProductSelectionCodec as dp, getAvailableOptionValues as dq, getProductSelectionImages as dr, getSelectedValueByOptionId as ds, getVariantAvailableForSale as dt, getVariantAvailableStock as du, isProductUpsertFieldValidationErrorBody as dv, normalizeProductSelection as dw, normalizeProductSelectionFromMatrix as dx, normalizeSelectedValueIds as dy, parseProductSelection as dz, type ClientState as e, type ClientConfig as f, type ApiQueryOptions as g, type ApplyDiscountParams as h, type CheckoutParams as i, type ClearCartParams as j, type ClientMetadata as k, type ContentClientOptions as l, type DeepPartial as m, type ExtractArrayType as n, type PayloadMutationResponse as o, type PublicCart as p, type PublicCartItem as q, type PublicCartReference as r, type PublicMediaAsset as s, type PublicMediaSize as t, type PublicOrder as u, type PublicOrderItem as v, type PublicOrderReference as w, type RemoveItemParams as x, type RetryConfig as y, type RootClient as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-
|
|
1
|
+
import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-CDsuOEfM.cjs';
|
|
2
2
|
|
|
3
3
|
type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
|
|
4
4
|
type PublicCustomerProfileListEntry = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-
|
|
1
|
+
import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-CDsuOEfM.js';
|
|
2
2
|
|
|
3
3
|
type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
|
|
4
4
|
type PublicCustomerProfileListEntry = {
|
package/dist/ui/form.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { F as Form } from '../payload-types-
|
|
2
|
+
import { F as Form } from '../payload-types-CDsuOEfM.cjs';
|
|
3
3
|
import { RichTextData } from './rich-text.cjs';
|
|
4
4
|
import '@payloadcms/richtext-lexical';
|
|
5
5
|
import '@payloadcms/richtext-lexical/lexical';
|
package/dist/ui/form.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { F as Form } from '../payload-types-
|
|
2
|
+
import { F as Form } from '../payload-types-CDsuOEfM.js';
|
|
3
3
|
import { RichTextData } from './rich-text.js';
|
|
4
4
|
import '@payloadcms/richtext-lexical';
|
|
5
5
|
import '@payloadcms/richtext-lexical/lexical';
|
package/dist/ui/video.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { MuxPlayerProps, MuxPlayerRefAttributes } from '@mux/mux-player-react';
|
|
3
3
|
export { MuxPlayerRefAttributes as VideoPlayerRef } from '@mux/mux-player-react';
|
|
4
|
-
import { V as Video } from '../payload-types-
|
|
4
|
+
import { V as Video } from '../payload-types-CDsuOEfM.cjs';
|
|
5
5
|
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';
|
|
6
6
|
|
|
7
7
|
interface VideoPlayerCSSProperties extends CSSProperties {
|
package/dist/ui/video.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { MuxPlayerProps, MuxPlayerRefAttributes } from '@mux/mux-player-react';
|
|
3
3
|
export { MuxPlayerRefAttributes as VideoPlayerRef } from '@mux/mux-player-react';
|
|
4
|
-
import { V as Video } from '../payload-types-
|
|
4
|
+
import { V as Video } from '../payload-types-CDsuOEfM.js';
|
|
5
5
|
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';
|
|
6
6
|
|
|
7
7
|
interface VideoPlayerCSSProperties extends CSSProperties {
|
package/dist/webhook.cjs
CHANGED
|
@@ -56,6 +56,8 @@ var COMMERCE_NOTIFICATION_EVENTS = [
|
|
|
56
56
|
"fulfillmentShipped",
|
|
57
57
|
"orderDelivered",
|
|
58
58
|
"returnRequested",
|
|
59
|
+
"returnApproved",
|
|
60
|
+
"returnRejected",
|
|
59
61
|
"returnCompleted"
|
|
60
62
|
];
|
|
61
63
|
function isStringOrNumber(value) {
|
|
@@ -144,7 +146,7 @@ function isCommerceNotificationWebhookEvent(event) {
|
|
|
144
146
|
if (notification.event === "fulfillmentShipped") {
|
|
145
147
|
return sourceCollection === "fulfillments" && matchesOptionalId(data.fulfillmentId, sourceId) && typeof notification.fulfillmentId === "string" && notification.fulfillmentId.length > 0 && matchesOptionalId(notification.fulfillmentId, sourceId) && matchesOptionalId(data.fulfillmentId, notification.fulfillmentId) && matchesOptionalId(changeSourceId, notification.fulfillmentId);
|
|
146
148
|
}
|
|
147
|
-
if (notification.event === "returnRequested" || notification.event === "returnCompleted") {
|
|
149
|
+
if (notification.event === "returnRequested" || notification.event === "returnApproved" || notification.event === "returnRejected" || notification.event === "returnCompleted") {
|
|
148
150
|
return sourceCollection === "returns" && matchesOptionalId(data.returnId, sourceId) && typeof notification.returnId === "string" && notification.returnId.length > 0 && matchesOptionalId(notification.returnId, sourceId) && matchesOptionalId(data.returnId, notification.returnId) && matchesOptionalId(changeSourceId, notification.returnId);
|
|
149
151
|
}
|
|
150
152
|
return false;
|