@01.software/sdk 0.65.1 → 0.67.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 +68 -0
- package/README.md +79 -2
- package/dist/client.cjs +79 -27
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +79 -27
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-C2sMvfme.d.ts → collection-client-D4HEOoO_.d.ts} +4 -4
- package/dist/{collection-client-B7rsTtVj.d.cts → collection-client-jrNFGbrO.d.cts} +4 -4
- package/dist/{const-CRxPTDGt.d.ts → const-BU79hCFB.d.ts} +2 -2
- package/dist/{const-D6ZRQLxI.d.cts → const-CCQ3MdLE.d.cts} +2 -2
- package/dist/{index-1auUEYrl.d.ts → index-CwKxWHIa.d.ts} +3 -3
- package/dist/{index-Bbpf5t-l.d.cts → index-DiyhsVHd.d.cts} +3 -3
- package/dist/index.cjs +80 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +80 -27
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BnIET0xU.d.cts → payload-types-jdsUXunB.d.cts} +128 -49
- package/dist/{payload-types-BnIET0xU.d.ts → payload-types-jdsUXunB.d.ts} +128 -49
- package/dist/query.cjs +14 -1
- 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 +14 -1
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +96 -3
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.js +96 -3
- package/dist/server.js.map +1 -1
- package/dist/{types-Dp1oYpD3.d.cts → types-BPwXAFZ7.d.cts} +2 -2
- package/dist/{types-D1y4TgQm.d.ts → types-BusejG-v.d.ts} +2 -2
- package/dist/{types-Dzn0LD2N.d.cts → types-CvdBV3ri.d.cts} +71 -6
- package/dist/{types-DnRC3nLG.d.ts → types-I2k6Laad.d.ts} +71 -6
- package/dist/ui/canvas.cjs +5 -1
- package/dist/ui/canvas.cjs.map +1 -1
- package/dist/ui/canvas.js +5 -1
- 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.cjs +9 -2
- package/dist/ui/video.cjs.map +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/ui/video.js +9 -2
- package/dist/ui/video.js.map +1 -1
- package/dist/webhook.d.cts +5 -5
- package/dist/webhook.d.ts +5 -5
- package/package.json +3 -3
package/dist/server.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
2
|
-
export { C as CollectionClient } from './collection-client-
|
|
3
|
-
import { aE as RawBaseApi, aF as ServerApiOptions, aG as ServerCommerceClient, aH as TenantIntrospectionClient, aI as SubscribeMembershipParams, aJ as SubscribeMembershipResponse, e as CancelMembershipParams, f as CancelMembershipResponse, aK as BillingCustodyParams, aL as BillingCustodyResponse, aM as CustomerGroupApi, aN as ExternalEffectClaimsApi, aO as InstallationCredentialsApi, aP as ExternalCustomerLinksApi, aQ as VideoPlaybackClient, a as CommunityClient, aR as BanCustomerParams, aS as CommunityBan, aT as UnbanCustomerParams, M as MarketDiscovery, g as ClientState, aU as ClientServerConfig,
|
|
4
|
-
export { A as AddItemParams, aW as CancelServerPaymentSessionParams, aX as CaptureExternalCustomerPreviousStateParams, aY as CartApi, aZ as CartApiOptions, l as CartMergeResult, m as CartMineResult, n as CartMutationResult, o as CheckoutAbandonedReason, p as CheckoutAmounts, a_ as CheckoutApi, a$ as CheckoutApiOptions, b0 as CheckoutListItem, q as CheckoutOrderReference, r as CheckoutPaymentSessionRef, b1 as CheckoutQueryParams, b2 as CheckoutQueryResult, s as CheckoutShippingAddress, b3 as CheckoutStatus, b4 as ClaimExternalEffectParams, t as ClearCartParams, b5 as CollectionCustomFieldDefinition, b6 as CollectionCustomFields, b7 as CollectionFieldSchema, b8 as CollectionSchemaResponse, b9 as ConfirmCustomPaymentSessionOptions, ba as ConfirmCustomPaymentSessionParams, bb as ConfirmCustomPaymentSessionResponse, bc as ConfirmTossPaymentSessionParams, bd as ConnectExternalCustomerLinkParams, w as CreateCartParams, x as CreateCartResult, be as CreateCustomPaymentSessionParams, bf as CreateInstallationCredentialParams, B as CreatePaymentSessionParams, D as CreatePortOnePaymentSessionParams, bg as CreateServerCheckoutParams, bh as CreateServerCheckoutResult, bi as CreateServerPaymentSessionParams, bj as CreateServerPortOnePaymentSessionParams, bk as CustomPaymentSession, bl as CustomPaymentSessionProof, bm as CustomerGroupApiOptions, bn as CustomerGroupManualSource, bo as CustomerGroupMember, bp as CustomerGroupMemberCommandResponse, bq as CustomerGroupMemberSource, br as CustomerGroupMembershipSource, bs as CustomerGroupMembershipState, d as CustomerMembershipView, F as CustomerSnapshot, bt as DisposeInstallationCredentialParams, bu as EventAdmissionAvailabilityParams, bv as EventAdmissionAvailabilityResponse, bw as EventAdmissionAvailabilityType, bx as EventAdmissionPricePresentment, by as EventGuestCancelParams, bz as EventGuestRegistration, bA as EventGuestRegistrationResponse, bB as
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-jrNFGbrO.cjs';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-jrNFGbrO.cjs';
|
|
3
|
+
import { aE as RawBaseApi, aF as ServerApiOptions, aG as ServerCommerceClient, aH as TenantIntrospectionClient, aI as SubscribeMembershipParams, aJ as SubscribeMembershipResponse, e as CancelMembershipParams, f as CancelMembershipResponse, aK as BillingCustodyParams, aL as BillingCustodyResponse, aM as CustomerGroupApi, aN as ExternalEffectClaimsApi, aO as InstallationCredentialsApi, aP as ExternalCustomerLinksApi, aQ as VideoPlaybackClient, a as CommunityClient, aR as BanCustomerParams, aS as CommunityBan, aT as UnbanCustomerParams, M as MarketDiscovery, g as ClientState, aU as ClientServerConfig, aV as RootServerClientWithEvents } from './types-CvdBV3ri.cjs';
|
|
4
|
+
export { A as AddItemParams, aW as CancelServerPaymentSessionParams, aX as CaptureExternalCustomerPreviousStateParams, aY as CartApi, aZ as CartApiOptions, l as CartMergeResult, m as CartMineResult, n as CartMutationResult, o as CheckoutAbandonedReason, p as CheckoutAmounts, a_ as CheckoutApi, a$ as CheckoutApiOptions, b0 as CheckoutListItem, q as CheckoutOrderReference, r as CheckoutPaymentSessionRef, b1 as CheckoutQueryParams, b2 as CheckoutQueryResult, s as CheckoutShippingAddress, b3 as CheckoutStatus, b4 as ClaimExternalEffectParams, t as ClearCartParams, b5 as CollectionCustomFieldDefinition, b6 as CollectionCustomFields, b7 as CollectionFieldSchema, b8 as CollectionSchemaResponse, b9 as ConfirmCustomPaymentSessionOptions, ba as ConfirmCustomPaymentSessionParams, bb as ConfirmCustomPaymentSessionResponse, bc as ConfirmTossPaymentSessionParams, bd as ConnectExternalCustomerLinkParams, w as CreateCartParams, x as CreateCartResult, be as CreateCustomPaymentSessionParams, bf as CreateInstallationCredentialParams, B as CreatePaymentSessionParams, D as CreatePortOnePaymentSessionParams, bg as CreateServerCheckoutParams, bh as CreateServerCheckoutResult, bi as CreateServerPaymentSessionParams, bj as CreateServerPortOnePaymentSessionParams, bk as CustomPaymentSession, bl as CustomPaymentSessionProof, bm as CustomerGroupApiOptions, bn as CustomerGroupManualSource, bo as CustomerGroupMember, bp as CustomerGroupMemberCommandResponse, bq as CustomerGroupMemberSource, br as CustomerGroupMembershipSource, bs as CustomerGroupMembershipState, d as CustomerMembershipView, F as CustomerSnapshot, bt as DisposeInstallationCredentialParams, bu as EventAdmissionAvailabilityParams, bv as EventAdmissionAvailabilityResponse, bw as EventAdmissionAvailabilityType, bx as EventAdmissionPricePresentment, by as EventGuestCancelParams, bz as EventGuestRegistration, bA as EventGuestRegistrationResponse, bB as EventMyRegistration, bC as EventMyRegistrationsParams, bD as EventMyRegistrationsResponse, bE as EventRegistrationAnswerInput, bF as EventRegistrationAttendeeInput, bG as EventRegistrationPublic, bH as EventRegistrationRegisterParams, bI as EventRegistrationRegisterResponse, bJ as EventsCalendarItem, E as EventsClient, bK as EventsClientOptions, bL as EventsDateParam, bM as EventsExternalSource, bN as EventsLocation, bO as EventsOccurrenceLocation, bP as EventsRangeEvent, bQ as EventsRangeOccurrence, bR as EventsRangeParams, bS as EventsRangeResponse, bT as EventsTaxonomyItem, bU as ExternalCustomerLink, bV as ExternalCustomerLinkListResponse, bW as ExternalCustomerPreviousState, bX as ExternalEffectClaimErrorReason, bY as ExternalEffectClaimSnapshot, bZ as ExternalEffectClaimState, b_ as ExternalEffectLeaseParams, b$ as ExternalEffectLocator, c0 as FindPortOnePaymentParams, c1 as FindPortOnePaymentResult, c2 as GetExternalCustomerLinkParams, c3 as GetExternalEffectClaimParams, c4 as GrantCustomerGroupMemberParams, c5 as InstallationCredentialIdentity, c6 as InstallationCredentialSnapshot, c7 as ListCustomerGroupMembersParams, c8 as ListCustomerGroupMembersResponse, c9 as ListExternalCustomerLinksParams, J as MembershipStatus, ca as ModerationApi, K as Money, cb as MutateExternalCustomerLinkParams, O as OpenCheckoutPaymentState, N as PaymentFailureReason, Q as PaymentNextAction, R as PaymentProviderStatus, S as PaymentReconciliationReason, cc as PaymentSessionApi, cd as PaymentSessionApiOptions, T as PaymentSessionRole, U as PortOneHostedPaymentMethod, ce as PortOnePaymentCurrentState, V as PortOnePaymentNextAction, cf as PortOnePaymentReconciliationApi, cg as PortOnePaymentSelector, W as PortOnePublicPaymentSession, ch as PortOneReconciliationDisposition, ci as ProductGraphRevisionParams, cj as ProductGraphRevisionResponse, X as ProductUpsertInput, Y as ProductUpsertParams, Z as ProductUpsertResponse, _ as ProductUpsertVariantInput, $ as PublicAttribute, a0 as PublicCaptureEvidence, a1 as PublicCart, a2 as PublicCartItem, a3 as PublicCartItemAdmission, a4 as PublicCartMarket, a5 as PublicCartReference, a6 as PublicCheckout, a7 as PublicCheckoutItem, a8 as PublicMediaAsset, a9 as PublicMediaSize, aa as PublicOrder, ab as PublicOrderAmounts, ac as PublicOrderItem, ad as PublicOrderReference, ae as PublicPaymentSession, ck as ReconcilePortOnePaymentParams, cl as ReconcilePortOnePaymentResult, af as ReconciliationRequired, cm as RecordExternalEffectRecoveryParams, ag as RemoveItemParams, cn as ReplaceInstallationCredentialParams, co as ReportExternalEffectParams, ai as RetrieveCartParams, aj as RetrieveCheckoutParams, cp as RetrieveCustomPaymentSessionParams, cq as RetrieveServerCheckoutParams, cr as RetrieveServerPaymentSessionParams, cs as RetrievedCustomPaymentSession, ct as RevokeCustomerGroupMemberParams, cu as RootServerClient, cv as ServerAddItemParams, cw as ServerCartMergeParams, cx as ServerCartMineParams, cy as ServerCheckout, cz as ServerUpdateItemParams, ao as ShippingLine, aq as SpentCheckoutPaymentState, cA as TENANT_CONTEXT_PATH, cB as TenantContextInput, cC as TenantContextResponse, cD as TenantCustomFieldType, cE as TenantFeatureProgressEvidenceValue, cF as TenantFeatureProgressFeature, cG as TenantFeatureProgressGroup, cH as TenantFeatureProgressInput, cI as TenantFeatureProgressItem, cJ as TenantFeatureProgressItemState, cK as TenantFeatureProgressResponse, cL as TenantFeatureProgressSeverity, cM as TenantFeatureProgressStatus, cN as TenantFieldConfigState, cO as TenantIntrospectionApi, cP as TenantIntrospectionApiOptions, az as UpdateCartAttributesParams, aA as UpdateDiscountCodesParams, aB as UpdateItemParams, aC as VariantInput, cQ as VariantPricesUpdateInput, cR as VariantPricesUpdateParams, cS as VariantPricesUpdateResponse, cT as getExternalEffectClaimErrorReason } from './types-CvdBV3ri.cjs';
|
|
5
|
+
import './payload-types-jdsUXunB.cjs';
|
|
6
6
|
export { isApiError, isAuthError, isCommerceSDKError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.cjs';
|
|
7
7
|
import './metadata.cjs';
|
|
8
|
-
import './const-
|
|
9
|
-
import './types-
|
|
8
|
+
import './const-CCQ3MdLE.cjs';
|
|
9
|
+
import './types-BPwXAFZ7.cjs';
|
|
10
10
|
|
|
11
11
|
type PreviewDetailParams = {
|
|
12
12
|
collection: string;
|
|
@@ -60,7 +60,7 @@ declare class ServerClient {
|
|
|
60
60
|
protected state: ClientState;
|
|
61
61
|
protected config: ClientServerConfig;
|
|
62
62
|
constructor(options: ClientServerConfig);
|
|
63
|
-
get events():
|
|
63
|
+
get events(): RootServerClientWithEvents['events'];
|
|
64
64
|
getState(): ClientState;
|
|
65
65
|
withMarket(market: string): ServerClient;
|
|
66
66
|
getConfig(): Omit<ClientServerConfig, 'secretKey'>;
|
|
@@ -71,4 +71,4 @@ declare class ServerClient {
|
|
|
71
71
|
*/
|
|
72
72
|
declare function createServerClient(options: ClientServerConfig): RootServerClientWithEvents;
|
|
73
73
|
|
|
74
|
-
export { CancelMembershipParams, CancelMembershipResponse, ClientServerConfig, CommunityClient, CustomerGroupApi,
|
|
74
|
+
export { CancelMembershipParams, CancelMembershipResponse, ClientServerConfig, CommunityClient, CustomerGroupApi, ExternalCustomerLinksApi, ExternalEffectClaimsApi, InstallationCredentialsApi, type PreviewDetailOptions, type PreviewDetailParams, RootServerClientWithEvents, ServerClient, ServerCollectionClient, ServerCommerceClient, ServerPreviewClient, SubscribeMembershipParams, SubscribeMembershipResponse, TenantIntrospectionClient, createServerClient };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
2
|
-
export { C as CollectionClient } from './collection-client-
|
|
3
|
-
import { aE as RawBaseApi, aF as ServerApiOptions, aG as ServerCommerceClient, aH as TenantIntrospectionClient, aI as SubscribeMembershipParams, aJ as SubscribeMembershipResponse, e as CancelMembershipParams, f as CancelMembershipResponse, aK as BillingCustodyParams, aL as BillingCustodyResponse, aM as CustomerGroupApi, aN as ExternalEffectClaimsApi, aO as InstallationCredentialsApi, aP as ExternalCustomerLinksApi, aQ as VideoPlaybackClient, a as CommunityClient, aR as BanCustomerParams, aS as CommunityBan, aT as UnbanCustomerParams, M as MarketDiscovery, g as ClientState, aU as ClientServerConfig,
|
|
4
|
-
export { A as AddItemParams, aW as CancelServerPaymentSessionParams, aX as CaptureExternalCustomerPreviousStateParams, aY as CartApi, aZ as CartApiOptions, l as CartMergeResult, m as CartMineResult, n as CartMutationResult, o as CheckoutAbandonedReason, p as CheckoutAmounts, a_ as CheckoutApi, a$ as CheckoutApiOptions, b0 as CheckoutListItem, q as CheckoutOrderReference, r as CheckoutPaymentSessionRef, b1 as CheckoutQueryParams, b2 as CheckoutQueryResult, s as CheckoutShippingAddress, b3 as CheckoutStatus, b4 as ClaimExternalEffectParams, t as ClearCartParams, b5 as CollectionCustomFieldDefinition, b6 as CollectionCustomFields, b7 as CollectionFieldSchema, b8 as CollectionSchemaResponse, b9 as ConfirmCustomPaymentSessionOptions, ba as ConfirmCustomPaymentSessionParams, bb as ConfirmCustomPaymentSessionResponse, bc as ConfirmTossPaymentSessionParams, bd as ConnectExternalCustomerLinkParams, w as CreateCartParams, x as CreateCartResult, be as CreateCustomPaymentSessionParams, bf as CreateInstallationCredentialParams, B as CreatePaymentSessionParams, D as CreatePortOnePaymentSessionParams, bg as CreateServerCheckoutParams, bh as CreateServerCheckoutResult, bi as CreateServerPaymentSessionParams, bj as CreateServerPortOnePaymentSessionParams, bk as CustomPaymentSession, bl as CustomPaymentSessionProof, bm as CustomerGroupApiOptions, bn as CustomerGroupManualSource, bo as CustomerGroupMember, bp as CustomerGroupMemberCommandResponse, bq as CustomerGroupMemberSource, br as CustomerGroupMembershipSource, bs as CustomerGroupMembershipState, d as CustomerMembershipView, F as CustomerSnapshot, bt as DisposeInstallationCredentialParams, bu as EventAdmissionAvailabilityParams, bv as EventAdmissionAvailabilityResponse, bw as EventAdmissionAvailabilityType, bx as EventAdmissionPricePresentment, by as EventGuestCancelParams, bz as EventGuestRegistration, bA as EventGuestRegistrationResponse, bB as
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { S as ServerCollectionClient } from './collection-client-D4HEOoO_.js';
|
|
2
|
+
export { C as CollectionClient } from './collection-client-D4HEOoO_.js';
|
|
3
|
+
import { aE as RawBaseApi, aF as ServerApiOptions, aG as ServerCommerceClient, aH as TenantIntrospectionClient, aI as SubscribeMembershipParams, aJ as SubscribeMembershipResponse, e as CancelMembershipParams, f as CancelMembershipResponse, aK as BillingCustodyParams, aL as BillingCustodyResponse, aM as CustomerGroupApi, aN as ExternalEffectClaimsApi, aO as InstallationCredentialsApi, aP as ExternalCustomerLinksApi, aQ as VideoPlaybackClient, a as CommunityClient, aR as BanCustomerParams, aS as CommunityBan, aT as UnbanCustomerParams, M as MarketDiscovery, g as ClientState, aU as ClientServerConfig, aV as RootServerClientWithEvents } from './types-I2k6Laad.js';
|
|
4
|
+
export { A as AddItemParams, aW as CancelServerPaymentSessionParams, aX as CaptureExternalCustomerPreviousStateParams, aY as CartApi, aZ as CartApiOptions, l as CartMergeResult, m as CartMineResult, n as CartMutationResult, o as CheckoutAbandonedReason, p as CheckoutAmounts, a_ as CheckoutApi, a$ as CheckoutApiOptions, b0 as CheckoutListItem, q as CheckoutOrderReference, r as CheckoutPaymentSessionRef, b1 as CheckoutQueryParams, b2 as CheckoutQueryResult, s as CheckoutShippingAddress, b3 as CheckoutStatus, b4 as ClaimExternalEffectParams, t as ClearCartParams, b5 as CollectionCustomFieldDefinition, b6 as CollectionCustomFields, b7 as CollectionFieldSchema, b8 as CollectionSchemaResponse, b9 as ConfirmCustomPaymentSessionOptions, ba as ConfirmCustomPaymentSessionParams, bb as ConfirmCustomPaymentSessionResponse, bc as ConfirmTossPaymentSessionParams, bd as ConnectExternalCustomerLinkParams, w as CreateCartParams, x as CreateCartResult, be as CreateCustomPaymentSessionParams, bf as CreateInstallationCredentialParams, B as CreatePaymentSessionParams, D as CreatePortOnePaymentSessionParams, bg as CreateServerCheckoutParams, bh as CreateServerCheckoutResult, bi as CreateServerPaymentSessionParams, bj as CreateServerPortOnePaymentSessionParams, bk as CustomPaymentSession, bl as CustomPaymentSessionProof, bm as CustomerGroupApiOptions, bn as CustomerGroupManualSource, bo as CustomerGroupMember, bp as CustomerGroupMemberCommandResponse, bq as CustomerGroupMemberSource, br as CustomerGroupMembershipSource, bs as CustomerGroupMembershipState, d as CustomerMembershipView, F as CustomerSnapshot, bt as DisposeInstallationCredentialParams, bu as EventAdmissionAvailabilityParams, bv as EventAdmissionAvailabilityResponse, bw as EventAdmissionAvailabilityType, bx as EventAdmissionPricePresentment, by as EventGuestCancelParams, bz as EventGuestRegistration, bA as EventGuestRegistrationResponse, bB as EventMyRegistration, bC as EventMyRegistrationsParams, bD as EventMyRegistrationsResponse, bE as EventRegistrationAnswerInput, bF as EventRegistrationAttendeeInput, bG as EventRegistrationPublic, bH as EventRegistrationRegisterParams, bI as EventRegistrationRegisterResponse, bJ as EventsCalendarItem, E as EventsClient, bK as EventsClientOptions, bL as EventsDateParam, bM as EventsExternalSource, bN as EventsLocation, bO as EventsOccurrenceLocation, bP as EventsRangeEvent, bQ as EventsRangeOccurrence, bR as EventsRangeParams, bS as EventsRangeResponse, bT as EventsTaxonomyItem, bU as ExternalCustomerLink, bV as ExternalCustomerLinkListResponse, bW as ExternalCustomerPreviousState, bX as ExternalEffectClaimErrorReason, bY as ExternalEffectClaimSnapshot, bZ as ExternalEffectClaimState, b_ as ExternalEffectLeaseParams, b$ as ExternalEffectLocator, c0 as FindPortOnePaymentParams, c1 as FindPortOnePaymentResult, c2 as GetExternalCustomerLinkParams, c3 as GetExternalEffectClaimParams, c4 as GrantCustomerGroupMemberParams, c5 as InstallationCredentialIdentity, c6 as InstallationCredentialSnapshot, c7 as ListCustomerGroupMembersParams, c8 as ListCustomerGroupMembersResponse, c9 as ListExternalCustomerLinksParams, J as MembershipStatus, ca as ModerationApi, K as Money, cb as MutateExternalCustomerLinkParams, O as OpenCheckoutPaymentState, N as PaymentFailureReason, Q as PaymentNextAction, R as PaymentProviderStatus, S as PaymentReconciliationReason, cc as PaymentSessionApi, cd as PaymentSessionApiOptions, T as PaymentSessionRole, U as PortOneHostedPaymentMethod, ce as PortOnePaymentCurrentState, V as PortOnePaymentNextAction, cf as PortOnePaymentReconciliationApi, cg as PortOnePaymentSelector, W as PortOnePublicPaymentSession, ch as PortOneReconciliationDisposition, ci as ProductGraphRevisionParams, cj as ProductGraphRevisionResponse, X as ProductUpsertInput, Y as ProductUpsertParams, Z as ProductUpsertResponse, _ as ProductUpsertVariantInput, $ as PublicAttribute, a0 as PublicCaptureEvidence, a1 as PublicCart, a2 as PublicCartItem, a3 as PublicCartItemAdmission, a4 as PublicCartMarket, a5 as PublicCartReference, a6 as PublicCheckout, a7 as PublicCheckoutItem, a8 as PublicMediaAsset, a9 as PublicMediaSize, aa as PublicOrder, ab as PublicOrderAmounts, ac as PublicOrderItem, ad as PublicOrderReference, ae as PublicPaymentSession, ck as ReconcilePortOnePaymentParams, cl as ReconcilePortOnePaymentResult, af as ReconciliationRequired, cm as RecordExternalEffectRecoveryParams, ag as RemoveItemParams, cn as ReplaceInstallationCredentialParams, co as ReportExternalEffectParams, ai as RetrieveCartParams, aj as RetrieveCheckoutParams, cp as RetrieveCustomPaymentSessionParams, cq as RetrieveServerCheckoutParams, cr as RetrieveServerPaymentSessionParams, cs as RetrievedCustomPaymentSession, ct as RevokeCustomerGroupMemberParams, cu as RootServerClient, cv as ServerAddItemParams, cw as ServerCartMergeParams, cx as ServerCartMineParams, cy as ServerCheckout, cz as ServerUpdateItemParams, ao as ShippingLine, aq as SpentCheckoutPaymentState, cA as TENANT_CONTEXT_PATH, cB as TenantContextInput, cC as TenantContextResponse, cD as TenantCustomFieldType, cE as TenantFeatureProgressEvidenceValue, cF as TenantFeatureProgressFeature, cG as TenantFeatureProgressGroup, cH as TenantFeatureProgressInput, cI as TenantFeatureProgressItem, cJ as TenantFeatureProgressItemState, cK as TenantFeatureProgressResponse, cL as TenantFeatureProgressSeverity, cM as TenantFeatureProgressStatus, cN as TenantFieldConfigState, cO as TenantIntrospectionApi, cP as TenantIntrospectionApiOptions, az as UpdateCartAttributesParams, aA as UpdateDiscountCodesParams, aB as UpdateItemParams, aC as VariantInput, cQ as VariantPricesUpdateInput, cR as VariantPricesUpdateParams, cS as VariantPricesUpdateResponse, cT as getExternalEffectClaimErrorReason } from './types-I2k6Laad.js';
|
|
5
|
+
import './payload-types-jdsUXunB.js';
|
|
6
6
|
export { isApiError, isAuthError, isCommerceSDKError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.js';
|
|
7
7
|
import './metadata.js';
|
|
8
|
-
import './const-
|
|
9
|
-
import './types-
|
|
8
|
+
import './const-BU79hCFB.js';
|
|
9
|
+
import './types-BusejG-v.js';
|
|
10
10
|
|
|
11
11
|
type PreviewDetailParams = {
|
|
12
12
|
collection: string;
|
|
@@ -60,7 +60,7 @@ declare class ServerClient {
|
|
|
60
60
|
protected state: ClientState;
|
|
61
61
|
protected config: ClientServerConfig;
|
|
62
62
|
constructor(options: ClientServerConfig);
|
|
63
|
-
get events():
|
|
63
|
+
get events(): RootServerClientWithEvents['events'];
|
|
64
64
|
getState(): ClientState;
|
|
65
65
|
withMarket(market: string): ServerClient;
|
|
66
66
|
getConfig(): Omit<ClientServerConfig, 'secretKey'>;
|
|
@@ -71,4 +71,4 @@ declare class ServerClient {
|
|
|
71
71
|
*/
|
|
72
72
|
declare function createServerClient(options: ClientServerConfig): RootServerClientWithEvents;
|
|
73
73
|
|
|
74
|
-
export { CancelMembershipParams, CancelMembershipResponse, ClientServerConfig, CommunityClient, CustomerGroupApi,
|
|
74
|
+
export { CancelMembershipParams, CancelMembershipResponse, ClientServerConfig, CommunityClient, CustomerGroupApi, ExternalCustomerLinksApi, ExternalEffectClaimsApi, InstallationCredentialsApi, type PreviewDetailOptions, type PreviewDetailParams, RootServerClientWithEvents, ServerClient, ServerCollectionClient, ServerCommerceClient, ServerPreviewClient, SubscribeMembershipParams, SubscribeMembershipResponse, TenantIntrospectionClient, createServerClient };
|
package/dist/server.js
CHANGED
|
@@ -1651,7 +1651,9 @@ var COMMERCE_ENDPOINT_OPERATIONS = {
|
|
|
1651
1651
|
),
|
|
1652
1652
|
stockCheck: operation("products", "post", "/stock-check"),
|
|
1653
1653
|
stockSnapshot: operation("products", "get", "/stock"),
|
|
1654
|
-
upsert: operation("products", "post", "/upsert")
|
|
1654
|
+
upsert: operation("products", "post", "/upsert"),
|
|
1655
|
+
graphRevision: operation("products", "get", "/:id/graph-revision"),
|
|
1656
|
+
variantsPatch: operation("products", "patch", "/:id/variants")
|
|
1655
1657
|
},
|
|
1656
1658
|
orders: {
|
|
1657
1659
|
create: operation("orders", "post", "/create"),
|
|
@@ -1820,6 +1822,14 @@ var CUSTOMER_GROUP_ENDPOINT_OPERATIONS = {
|
|
|
1820
1822
|
revoke: operation("customer-groups", "post", "/:id/members/revoke")
|
|
1821
1823
|
};
|
|
1822
1824
|
var CUSTOMER_AUTH_ENDPOINT_OPERATIONS = {
|
|
1825
|
+
register: operation("customers", "post", "/register"),
|
|
1826
|
+
login: operation("customers", "post", "/login"),
|
|
1827
|
+
refresh: operation("customers", "post", "/refresh"),
|
|
1828
|
+
me: operation("customers", "get", "/me"),
|
|
1829
|
+
updateProfile: operation("customers", "patch", "/me"),
|
|
1830
|
+
forgotPassword: operation("customers", "post", "/forgot-password"),
|
|
1831
|
+
resetPassword: operation("customers", "post", "/reset-password"),
|
|
1832
|
+
changePassword: operation("customers", "post", "/change-password"),
|
|
1823
1833
|
revokeRefresh: operation("customers", "post", "/revoke-refresh"),
|
|
1824
1834
|
withdraw: operation("customers", "post", "/withdraw")
|
|
1825
1835
|
};
|
|
@@ -1829,6 +1839,9 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
|
|
|
1829
1839
|
disable: operation("tenants", "delete", "/embedded-admin-app")
|
|
1830
1840
|
};
|
|
1831
1841
|
var EVENTS_ENDPOINT_OPERATIONS = {
|
|
1842
|
+
registrations: {
|
|
1843
|
+
listMine: operation("event-registrations", "get", "/my")
|
|
1844
|
+
},
|
|
1832
1845
|
events: {
|
|
1833
1846
|
convertSchedule: operation("events", "post", "/:id/schedule")
|
|
1834
1847
|
},
|
|
@@ -5367,10 +5380,68 @@ function normalizeProductUpsertParams(params) {
|
|
|
5367
5380
|
variants
|
|
5368
5381
|
};
|
|
5369
5382
|
}
|
|
5383
|
+
function assertPriceOperationObject(value, allowed) {
|
|
5384
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || Object.keys(value).some((key) => !allowed.includes(key))) {
|
|
5385
|
+
throw createValidationError(
|
|
5386
|
+
"Product price operations accept only their declared fields."
|
|
5387
|
+
);
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5390
|
+
function productGraphQuery(params) {
|
|
5391
|
+
if (typeof params.productId !== "string" || !params.productId.trim() || params.locale !== void 0 && params.locale !== "ko" && params.locale !== "en") {
|
|
5392
|
+
throw createValidationError(
|
|
5393
|
+
"Provide a productId and, when specified, a ko or en content locale."
|
|
5394
|
+
);
|
|
5395
|
+
}
|
|
5396
|
+
return new URLSearchParams(
|
|
5397
|
+
params.locale ? { locale: params.locale } : void 0
|
|
5398
|
+
);
|
|
5399
|
+
}
|
|
5370
5400
|
var ProductApi = class extends BaseApi {
|
|
5371
5401
|
constructor(options) {
|
|
5372
5402
|
super("ProductApi", options);
|
|
5373
5403
|
}
|
|
5404
|
+
/** Read a baseline before reviewing values in the same content locale. */
|
|
5405
|
+
async graphRevision(params) {
|
|
5406
|
+
assertPriceOperationObject(params, ["productId", "locale"]);
|
|
5407
|
+
return this.requestEndpoint(
|
|
5408
|
+
COMMERCE_ENDPOINT_OPERATIONS.products.graphRevision,
|
|
5409
|
+
void 0,
|
|
5410
|
+
{
|
|
5411
|
+
pathParams: { id: params.productId },
|
|
5412
|
+
query: productGraphQuery(params)
|
|
5413
|
+
}
|
|
5414
|
+
);
|
|
5415
|
+
}
|
|
5416
|
+
/** Update existing base prices only; conflicts never trigger a rebase or full upsert. */
|
|
5417
|
+
async updateVariantPrices(params) {
|
|
5418
|
+
assertPriceOperationObject(params, [
|
|
5419
|
+
"productId",
|
|
5420
|
+
"locale",
|
|
5421
|
+
"graphRevision",
|
|
5422
|
+
"updates"
|
|
5423
|
+
]);
|
|
5424
|
+
const query = productGraphQuery(params);
|
|
5425
|
+
if (typeof params.graphRevision !== "string" || !params.graphRevision.length || !Array.isArray(params.updates) || params.updates.length < 1 || params.updates.length > 250) {
|
|
5426
|
+
throw createValidationError(
|
|
5427
|
+
"Provide graphRevision and between 1 and 250 price updates."
|
|
5428
|
+
);
|
|
5429
|
+
}
|
|
5430
|
+
const updates = params.updates.map((row) => {
|
|
5431
|
+
assertPriceOperationObject(row, ["id", "price"]);
|
|
5432
|
+
if (typeof row.id !== "string" || !row.id.trim() || typeof row.price !== "number" || !Number.isFinite(row.price)) {
|
|
5433
|
+
throw createValidationError(
|
|
5434
|
+
"Each price update requires an existing variant id and numeric price."
|
|
5435
|
+
);
|
|
5436
|
+
}
|
|
5437
|
+
return { id: row.id, price: row.price };
|
|
5438
|
+
});
|
|
5439
|
+
return this.requestEndpoint(
|
|
5440
|
+
COMMERCE_ENDPOINT_OPERATIONS.products.variantsPatch,
|
|
5441
|
+
{ graphRevision: params.graphRevision, updates },
|
|
5442
|
+
{ pathParams: { id: params.productId }, query }
|
|
5443
|
+
);
|
|
5444
|
+
}
|
|
5374
5445
|
/**
|
|
5375
5446
|
* Check point-in-time stock availability for one or more product variants.
|
|
5376
5447
|
* Results reflect available stock at the moment of the call and are not guaranteed
|
|
@@ -5932,7 +6003,9 @@ var ServerCommerceClient = class {
|
|
|
5932
6003
|
detail: (params) => productApi.detail(this.withMarket(params)),
|
|
5933
6004
|
detailCatalog: (params) => productApi.detailCatalog(this.withMarket(params)),
|
|
5934
6005
|
previewDetail: productApi.previewDetail.bind(productApi),
|
|
5935
|
-
upsert: productApi.upsert.bind(productApi)
|
|
6006
|
+
upsert: productApi.upsert.bind(productApi),
|
|
6007
|
+
graphRevision: productApi.graphRevision.bind(productApi),
|
|
6008
|
+
updateVariantPrices: productApi.updateVariantPrices.bind(productApi)
|
|
5936
6009
|
};
|
|
5937
6010
|
this.carts = {
|
|
5938
6011
|
create: (params) => cartApi.create(this.withMarket(params ?? {})),
|
|
@@ -6033,6 +6106,18 @@ var EventsClient = class {
|
|
|
6033
6106
|
{ useCustomerAuth: false }
|
|
6034
6107
|
);
|
|
6035
6108
|
}
|
|
6109
|
+
listMyRegistrations(params = {}) {
|
|
6110
|
+
const query = new URLSearchParams();
|
|
6111
|
+
if (params.page !== void 0) query.set("page", String(params.page));
|
|
6112
|
+
if (params.limit !== void 0) query.set("limit", String(params.limit));
|
|
6113
|
+
const operation2 = EVENTS_ENDPOINT_OPERATIONS.registrations.listMine;
|
|
6114
|
+
return this.execute(
|
|
6115
|
+
resolveOperationPath(operation2, { query }),
|
|
6116
|
+
resolveOperationMethod(operation2),
|
|
6117
|
+
void 0,
|
|
6118
|
+
{ useCustomerAuth: true, noStore: true }
|
|
6119
|
+
);
|
|
6120
|
+
}
|
|
6036
6121
|
register(params) {
|
|
6037
6122
|
return this.execute(
|
|
6038
6123
|
"/api/event-registrations/register",
|
|
@@ -6063,6 +6148,7 @@ var EventsClient = class {
|
|
|
6063
6148
|
try {
|
|
6064
6149
|
const response = await httpFetch(endpoint, {
|
|
6065
6150
|
method,
|
|
6151
|
+
...options.noStore && { cache: "no-store" },
|
|
6066
6152
|
apiUrl: this.apiUrl,
|
|
6067
6153
|
publishableKey: this.publishableKey,
|
|
6068
6154
|
...useCustomerAuth && token ? { customerToken: token } : {},
|
|
@@ -6713,13 +6799,20 @@ var ServerClient = class _ServerClient {
|
|
|
6713
6799
|
"publishableKey is required for server.events. It is sent as X-Publishable-Key for rate limiting and quota enforcement. Get it from Console > Settings > API Keys."
|
|
6714
6800
|
);
|
|
6715
6801
|
}
|
|
6716
|
-
|
|
6802
|
+
const events = new EventsClient({
|
|
6717
6803
|
publishableKey: this.config.publishableKey,
|
|
6718
6804
|
apiUrl: this.config.apiUrl,
|
|
6719
6805
|
onRequestId: (id) => {
|
|
6720
6806
|
this.lastRequestId = id;
|
|
6721
6807
|
}
|
|
6722
6808
|
});
|
|
6809
|
+
this._events = {
|
|
6810
|
+
getRange: events.getRange.bind(events),
|
|
6811
|
+
getAdmissionAvailability: events.getAdmissionAvailability.bind(events),
|
|
6812
|
+
register: events.register.bind(events),
|
|
6813
|
+
getGuestRegistration: events.getGuestRegistration.bind(events),
|
|
6814
|
+
cancelGuestRegistration: events.cancelGuestRegistration.bind(events)
|
|
6815
|
+
};
|
|
6723
6816
|
}
|
|
6724
6817
|
return this._events;
|
|
6725
6818
|
}
|