@01.software/sdk 0.42.0 → 0.43.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 +38 -0
- package/README.md +10 -4
- 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-B-qVIBnJ.d.cts → collection-client-U70KizLf.d.cts} +3 -3
- package/dist/{collection-client-BhCMwIus.d.ts → collection-client-gWsA7BVP.d.ts} +3 -3
- package/dist/{const-pmHlwm3E.d.ts → const-BBynifk0.d.cts} +5 -5
- package/dist/{const-BiDujixF.d.cts → const-_WWHU-gX.d.ts} +5 -5
- package/dist/{index-B1UBDaKz.d.ts → index-DPi5NWU8.d.ts} +4 -4
- package/dist/{index-D78ki6Ij.d.cts → index-Dg4Y6Aq7.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-DLxkB7Mv.d.cts} +399 -27
- package/dist/{payload-types-C7Ul4ElL.d.ts → payload-types-DLxkB7Mv.d.ts} +399 -27
- 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-ChV1t4ei.d.cts → types-B1ngKbWI.d.cts} +1 -1
- package/dist/{types-BL7M-EUV.d.cts → types-B9lGhZlB.d.ts} +95 -6
- package/dist/{types-Bf2iCjy8.d.ts → types-BiKNBwRA.d.ts} +1 -1
- package/dist/{types-D5dSNIGs.d.ts → types-Bpx5sYKo.d.cts} +95 -6
- 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,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-DLxkB7Mv.cjs';
|
|
2
2
|
|
|
3
3
|
type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
|
|
4
4
|
type PublicCustomerProfileListEntry = {
|
|
@@ -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-_WWHU-gX.js';
|
|
2
|
+
import { C as CollectionType, P as PublicProduct } from './types-BiKNBwRA.js';
|
|
3
|
+
import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-DLxkB7Mv.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;
|
|
@@ -717,8 +725,10 @@ type ReturnWithRefundParams = WithIdempotencyKey<{
|
|
|
717
725
|
}>;
|
|
718
726
|
type CheckoutParams = WithIdempotencyKey<{
|
|
719
727
|
cartId: string;
|
|
728
|
+
cartToken?: string;
|
|
720
729
|
orderNumber: string;
|
|
721
730
|
customerSnapshot: CustomerSnapshot;
|
|
731
|
+
shippingAddress?: CheckoutShippingAddress;
|
|
722
732
|
pgPaymentId?: string;
|
|
723
733
|
discountCode?: string;
|
|
724
734
|
}>;
|
|
@@ -1032,6 +1042,7 @@ type PublicCartItem = {
|
|
|
1032
1042
|
discountAllocation?: number | null;
|
|
1033
1043
|
discountedUnitPrice?: number | null;
|
|
1034
1044
|
discountedTotalPrice?: number | null;
|
|
1045
|
+
requiresShipping?: boolean | null;
|
|
1035
1046
|
createdAt?: string | null;
|
|
1036
1047
|
updatedAt?: string | null;
|
|
1037
1048
|
};
|
|
@@ -1620,6 +1631,10 @@ type ProductFieldsInput = {
|
|
|
1620
1631
|
publishedAt?: string | null;
|
|
1621
1632
|
categories?: string[];
|
|
1622
1633
|
tags?: string[];
|
|
1634
|
+
seo?: {
|
|
1635
|
+
title?: string | null;
|
|
1636
|
+
description?: string | null;
|
|
1637
|
+
} | null;
|
|
1623
1638
|
metadata?: unknown;
|
|
1624
1639
|
};
|
|
1625
1640
|
type ProductUpsertGraphFields = {
|
|
@@ -2007,6 +2022,7 @@ type ValidateDiscountParams = {
|
|
|
2007
2022
|
code: string;
|
|
2008
2023
|
orderAmount: number;
|
|
2009
2024
|
};
|
|
2025
|
+
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
2026
|
type ValidateDiscountResult = {
|
|
2011
2027
|
valid: boolean;
|
|
2012
2028
|
code: string;
|
|
@@ -2014,6 +2030,7 @@ type ValidateDiscountResult = {
|
|
|
2014
2030
|
discountAmount: number;
|
|
2015
2031
|
freeShipping?: boolean;
|
|
2016
2032
|
reason?: string;
|
|
2033
|
+
reasonCode?: DiscountErrorReasonCode;
|
|
2017
2034
|
};
|
|
2018
2035
|
declare class DiscountApi extends BaseApi {
|
|
2019
2036
|
constructor(options: DiscountApiOptions);
|
|
@@ -2265,8 +2282,8 @@ interface EventsClientOptions {
|
|
|
2265
2282
|
}
|
|
2266
2283
|
type EventsDateParam = string | Date;
|
|
2267
2284
|
interface EventsRangeParams {
|
|
2268
|
-
start
|
|
2269
|
-
end
|
|
2285
|
+
start?: EventsDateParam;
|
|
2286
|
+
end?: EventsDateParam;
|
|
2270
2287
|
limit?: number;
|
|
2271
2288
|
page?: number;
|
|
2272
2289
|
calendar?: string;
|
|
@@ -2455,6 +2472,9 @@ interface TenantFeatureProgressResponse {
|
|
|
2455
2472
|
planBlocked: string[];
|
|
2456
2473
|
closureAdded: string[];
|
|
2457
2474
|
};
|
|
2475
|
+
config: {
|
|
2476
|
+
fulfillmentMode: 'shipping' | 'none';
|
|
2477
|
+
};
|
|
2458
2478
|
summary: {
|
|
2459
2479
|
complete: number;
|
|
2460
2480
|
total: number;
|
|
@@ -2507,6 +2527,67 @@ declare class TenantIntrospectionApi extends BaseApi implements TenantIntrospect
|
|
|
2507
2527
|
featureProgress(params: TenantFeatureProgressInput): Promise<TenantFeatureProgressResponse>;
|
|
2508
2528
|
}
|
|
2509
2529
|
|
|
2530
|
+
/**
|
|
2531
|
+
* SDK-local hand-declarations of the membership wire contract types.
|
|
2532
|
+
*
|
|
2533
|
+
* The public SDK must keep these types local because the canonical membership
|
|
2534
|
+
* contract package is private to the workspace. These public types are
|
|
2535
|
+
* structurally checked by membership contract-parity type tests.
|
|
2536
|
+
*/
|
|
2537
|
+
type MembershipStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'cancelled' | 'expired';
|
|
2538
|
+
/**
|
|
2539
|
+
* Parameters for the subscribe endpoint (delegated charge model).
|
|
2540
|
+
* The storefront already collected the first payment; this records it and
|
|
2541
|
+
* activates the membership.
|
|
2542
|
+
*/
|
|
2543
|
+
type SubscribeMembershipParams = {
|
|
2544
|
+
planId: string;
|
|
2545
|
+
/** Stable client-generated key used as the deduplication key for this subscription intent. */
|
|
2546
|
+
subscribeIntentKey: string;
|
|
2547
|
+
pgPaymentId: string;
|
|
2548
|
+
amount: number;
|
|
2549
|
+
currency: string;
|
|
2550
|
+
customerRef?: string;
|
|
2551
|
+
card?: {
|
|
2552
|
+
last4?: string;
|
|
2553
|
+
brand?: string;
|
|
2554
|
+
};
|
|
2555
|
+
};
|
|
2556
|
+
type SubscribeMembershipResponse = {
|
|
2557
|
+
membershipId: string;
|
|
2558
|
+
status: MembershipStatus;
|
|
2559
|
+
};
|
|
2560
|
+
/**
|
|
2561
|
+
* Parameters for cancelling a membership.
|
|
2562
|
+
* `immediate=false` (default) sets `cancelAtPeriodEnd`; benefits persist to
|
|
2563
|
+
* the last paid period. `immediate=true` cancels immediately and revokes groups.
|
|
2564
|
+
*/
|
|
2565
|
+
type CancelMembershipParams = {
|
|
2566
|
+
id: string;
|
|
2567
|
+
immediate?: boolean;
|
|
2568
|
+
};
|
|
2569
|
+
type CancelMembershipResponse = {
|
|
2570
|
+
status: MembershipStatus;
|
|
2571
|
+
};
|
|
2572
|
+
/**
|
|
2573
|
+
* The customer's own subscription view. Never includes a payment token or
|
|
2574
|
+
* subscribeIntentKey.
|
|
2575
|
+
*/
|
|
2576
|
+
type CustomerMembershipView = {
|
|
2577
|
+
id: string;
|
|
2578
|
+
plan: string;
|
|
2579
|
+
status: MembershipStatus;
|
|
2580
|
+
currentPeriodEnd: string;
|
|
2581
|
+
nextBillingAt: string | null;
|
|
2582
|
+
cancelAtPeriodEnd: boolean;
|
|
2583
|
+
amount: number;
|
|
2584
|
+
currency: string;
|
|
2585
|
+
card?: {
|
|
2586
|
+
last4?: string;
|
|
2587
|
+
brand?: string;
|
|
2588
|
+
} | null;
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2510
2591
|
interface ClientConfig {
|
|
2511
2592
|
publishableKey: string;
|
|
2512
2593
|
/** API base URL for staging, self-hosted, preview, or proxy deployments. */
|
|
@@ -2700,6 +2781,9 @@ interface RootClient {
|
|
|
2700
2781
|
events?: EventsClient;
|
|
2701
2782
|
customer: CustomerNamespace;
|
|
2702
2783
|
collections: RootCollectionClient;
|
|
2784
|
+
memberships: {
|
|
2785
|
+
me: () => Promise<CustomerMembershipView | null>;
|
|
2786
|
+
};
|
|
2703
2787
|
lastRequestId: string | null;
|
|
2704
2788
|
getState(): ClientState;
|
|
2705
2789
|
getConfig(): ClientConfig;
|
|
@@ -2707,6 +2791,11 @@ interface RootClient {
|
|
|
2707
2791
|
interface RootServerClient {
|
|
2708
2792
|
commerce: ServerCommerceClient;
|
|
2709
2793
|
tenant: TenantIntrospectionClient;
|
|
2794
|
+
memberships: {
|
|
2795
|
+
subscribe: (params: SubscribeMembershipParams) => Promise<SubscribeMembershipResponse>;
|
|
2796
|
+
cancel: (params: CancelMembershipParams) => Promise<CancelMembershipResponse>;
|
|
2797
|
+
me: () => Promise<CustomerMembershipView | null>;
|
|
2798
|
+
};
|
|
2710
2799
|
/** Set on {@link createServerClient} return values; optional for structural mocks. */
|
|
2711
2800
|
events?: EventsClient;
|
|
2712
2801
|
community: CommunityClient & {
|
|
@@ -2733,4 +2822,4 @@ type DeepPartial<T> = {
|
|
|
2733
2822
|
};
|
|
2734
2823
|
type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
|
|
2735
2824
|
|
|
2736
|
-
export { type
|
|
2825
|
+
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-DLxkB7Mv.js';
|
|
2
2
|
|
|
3
3
|
type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
|
|
4
4
|
type PublicCustomerProfileListEntry = {
|
|
@@ -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-BBynifk0.cjs';
|
|
2
|
+
import { C as CollectionType, P as PublicProduct } from './types-B1ngKbWI.cjs';
|
|
3
|
+
import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-DLxkB7Mv.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;
|
|
@@ -717,8 +725,10 @@ type ReturnWithRefundParams = WithIdempotencyKey<{
|
|
|
717
725
|
}>;
|
|
718
726
|
type CheckoutParams = WithIdempotencyKey<{
|
|
719
727
|
cartId: string;
|
|
728
|
+
cartToken?: string;
|
|
720
729
|
orderNumber: string;
|
|
721
730
|
customerSnapshot: CustomerSnapshot;
|
|
731
|
+
shippingAddress?: CheckoutShippingAddress;
|
|
722
732
|
pgPaymentId?: string;
|
|
723
733
|
discountCode?: string;
|
|
724
734
|
}>;
|
|
@@ -1032,6 +1042,7 @@ type PublicCartItem = {
|
|
|
1032
1042
|
discountAllocation?: number | null;
|
|
1033
1043
|
discountedUnitPrice?: number | null;
|
|
1034
1044
|
discountedTotalPrice?: number | null;
|
|
1045
|
+
requiresShipping?: boolean | null;
|
|
1035
1046
|
createdAt?: string | null;
|
|
1036
1047
|
updatedAt?: string | null;
|
|
1037
1048
|
};
|
|
@@ -1620,6 +1631,10 @@ type ProductFieldsInput = {
|
|
|
1620
1631
|
publishedAt?: string | null;
|
|
1621
1632
|
categories?: string[];
|
|
1622
1633
|
tags?: string[];
|
|
1634
|
+
seo?: {
|
|
1635
|
+
title?: string | null;
|
|
1636
|
+
description?: string | null;
|
|
1637
|
+
} | null;
|
|
1623
1638
|
metadata?: unknown;
|
|
1624
1639
|
};
|
|
1625
1640
|
type ProductUpsertGraphFields = {
|
|
@@ -2007,6 +2022,7 @@ type ValidateDiscountParams = {
|
|
|
2007
2022
|
code: string;
|
|
2008
2023
|
orderAmount: number;
|
|
2009
2024
|
};
|
|
2025
|
+
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
2026
|
type ValidateDiscountResult = {
|
|
2011
2027
|
valid: boolean;
|
|
2012
2028
|
code: string;
|
|
@@ -2014,6 +2030,7 @@ type ValidateDiscountResult = {
|
|
|
2014
2030
|
discountAmount: number;
|
|
2015
2031
|
freeShipping?: boolean;
|
|
2016
2032
|
reason?: string;
|
|
2033
|
+
reasonCode?: DiscountErrorReasonCode;
|
|
2017
2034
|
};
|
|
2018
2035
|
declare class DiscountApi extends BaseApi {
|
|
2019
2036
|
constructor(options: DiscountApiOptions);
|
|
@@ -2265,8 +2282,8 @@ interface EventsClientOptions {
|
|
|
2265
2282
|
}
|
|
2266
2283
|
type EventsDateParam = string | Date;
|
|
2267
2284
|
interface EventsRangeParams {
|
|
2268
|
-
start
|
|
2269
|
-
end
|
|
2285
|
+
start?: EventsDateParam;
|
|
2286
|
+
end?: EventsDateParam;
|
|
2270
2287
|
limit?: number;
|
|
2271
2288
|
page?: number;
|
|
2272
2289
|
calendar?: string;
|
|
@@ -2455,6 +2472,9 @@ interface TenantFeatureProgressResponse {
|
|
|
2455
2472
|
planBlocked: string[];
|
|
2456
2473
|
closureAdded: string[];
|
|
2457
2474
|
};
|
|
2475
|
+
config: {
|
|
2476
|
+
fulfillmentMode: 'shipping' | 'none';
|
|
2477
|
+
};
|
|
2458
2478
|
summary: {
|
|
2459
2479
|
complete: number;
|
|
2460
2480
|
total: number;
|
|
@@ -2507,6 +2527,67 @@ declare class TenantIntrospectionApi extends BaseApi implements TenantIntrospect
|
|
|
2507
2527
|
featureProgress(params: TenantFeatureProgressInput): Promise<TenantFeatureProgressResponse>;
|
|
2508
2528
|
}
|
|
2509
2529
|
|
|
2530
|
+
/**
|
|
2531
|
+
* SDK-local hand-declarations of the membership wire contract types.
|
|
2532
|
+
*
|
|
2533
|
+
* The public SDK must keep these types local because the canonical membership
|
|
2534
|
+
* contract package is private to the workspace. These public types are
|
|
2535
|
+
* structurally checked by membership contract-parity type tests.
|
|
2536
|
+
*/
|
|
2537
|
+
type MembershipStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'cancelled' | 'expired';
|
|
2538
|
+
/**
|
|
2539
|
+
* Parameters for the subscribe endpoint (delegated charge model).
|
|
2540
|
+
* The storefront already collected the first payment; this records it and
|
|
2541
|
+
* activates the membership.
|
|
2542
|
+
*/
|
|
2543
|
+
type SubscribeMembershipParams = {
|
|
2544
|
+
planId: string;
|
|
2545
|
+
/** Stable client-generated key used as the deduplication key for this subscription intent. */
|
|
2546
|
+
subscribeIntentKey: string;
|
|
2547
|
+
pgPaymentId: string;
|
|
2548
|
+
amount: number;
|
|
2549
|
+
currency: string;
|
|
2550
|
+
customerRef?: string;
|
|
2551
|
+
card?: {
|
|
2552
|
+
last4?: string;
|
|
2553
|
+
brand?: string;
|
|
2554
|
+
};
|
|
2555
|
+
};
|
|
2556
|
+
type SubscribeMembershipResponse = {
|
|
2557
|
+
membershipId: string;
|
|
2558
|
+
status: MembershipStatus;
|
|
2559
|
+
};
|
|
2560
|
+
/**
|
|
2561
|
+
* Parameters for cancelling a membership.
|
|
2562
|
+
* `immediate=false` (default) sets `cancelAtPeriodEnd`; benefits persist to
|
|
2563
|
+
* the last paid period. `immediate=true` cancels immediately and revokes groups.
|
|
2564
|
+
*/
|
|
2565
|
+
type CancelMembershipParams = {
|
|
2566
|
+
id: string;
|
|
2567
|
+
immediate?: boolean;
|
|
2568
|
+
};
|
|
2569
|
+
type CancelMembershipResponse = {
|
|
2570
|
+
status: MembershipStatus;
|
|
2571
|
+
};
|
|
2572
|
+
/**
|
|
2573
|
+
* The customer's own subscription view. Never includes a payment token or
|
|
2574
|
+
* subscribeIntentKey.
|
|
2575
|
+
*/
|
|
2576
|
+
type CustomerMembershipView = {
|
|
2577
|
+
id: string;
|
|
2578
|
+
plan: string;
|
|
2579
|
+
status: MembershipStatus;
|
|
2580
|
+
currentPeriodEnd: string;
|
|
2581
|
+
nextBillingAt: string | null;
|
|
2582
|
+
cancelAtPeriodEnd: boolean;
|
|
2583
|
+
amount: number;
|
|
2584
|
+
currency: string;
|
|
2585
|
+
card?: {
|
|
2586
|
+
last4?: string;
|
|
2587
|
+
brand?: string;
|
|
2588
|
+
} | null;
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2510
2591
|
interface ClientConfig {
|
|
2511
2592
|
publishableKey: string;
|
|
2512
2593
|
/** API base URL for staging, self-hosted, preview, or proxy deployments. */
|
|
@@ -2700,6 +2781,9 @@ interface RootClient {
|
|
|
2700
2781
|
events?: EventsClient;
|
|
2701
2782
|
customer: CustomerNamespace;
|
|
2702
2783
|
collections: RootCollectionClient;
|
|
2784
|
+
memberships: {
|
|
2785
|
+
me: () => Promise<CustomerMembershipView | null>;
|
|
2786
|
+
};
|
|
2703
2787
|
lastRequestId: string | null;
|
|
2704
2788
|
getState(): ClientState;
|
|
2705
2789
|
getConfig(): ClientConfig;
|
|
@@ -2707,6 +2791,11 @@ interface RootClient {
|
|
|
2707
2791
|
interface RootServerClient {
|
|
2708
2792
|
commerce: ServerCommerceClient;
|
|
2709
2793
|
tenant: TenantIntrospectionClient;
|
|
2794
|
+
memberships: {
|
|
2795
|
+
subscribe: (params: SubscribeMembershipParams) => Promise<SubscribeMembershipResponse>;
|
|
2796
|
+
cancel: (params: CancelMembershipParams) => Promise<CancelMembershipResponse>;
|
|
2797
|
+
me: () => Promise<CustomerMembershipView | null>;
|
|
2798
|
+
};
|
|
2710
2799
|
/** Set on {@link createServerClient} return values; optional for structural mocks. */
|
|
2711
2800
|
events?: EventsClient;
|
|
2712
2801
|
community: CommunityClient & {
|
|
@@ -2733,4 +2822,4 @@ type DeepPartial<T> = {
|
|
|
2733
2822
|
};
|
|
2734
2823
|
type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
|
|
2735
2824
|
|
|
2736
|
-
export { type
|
|
2825
|
+
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 };
|
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-DLxkB7Mv.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-DLxkB7Mv.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-DLxkB7Mv.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-DLxkB7Mv.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;
|