@01.software/sdk 0.71.0 → 0.73.1
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 +118 -0
- package/README.md +71 -1
- package/dist/client.cjs +83 -9
- 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 +83 -9
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-D18xyUq_.d.cts → collection-client-BH4dIZ6c.d.cts} +4 -4
- package/dist/{collection-client-CUGJcTpl.d.ts → collection-client-lLAl3xCZ.d.ts} +4 -4
- package/dist/{const-oGEoxCXZ.d.cts → const-BS2EaIp4.d.cts} +1 -1
- package/dist/{const-Dlu0mXmj.d.ts → const-CCvoknRY.d.ts} +1 -1
- package/dist/{index-HHVtIKXs.d.cts → index-CHdrzJ8-.d.cts} +3 -3
- package/dist/{index-Ccd4NYTL.d.ts → index-DVqNpmsc.d.ts} +3 -3
- package/dist/index.cjs +84 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +84 -10
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BgOEk6Y9.d.cts → payload-types-PXkmefhZ.d.cts} +267 -185
- package/dist/{payload-types-BgOEk6Y9.d.ts → payload-types-PXkmefhZ.d.ts} +267 -185
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +113 -17
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +8 -7
- package/dist/server.d.ts +8 -7
- package/dist/server.js +113 -17
- package/dist/server.js.map +1 -1
- package/dist/{types-CSvp2fJ_.d.ts → types-CQRsG6sA.d.ts} +2 -2
- package/dist/{types-DLHEIsAx.d.cts → types-Chwgg4CQ.d.cts} +63 -7
- package/dist/{types-BzG3NO7R.d.cts → types-CyMz0Kzc.d.cts} +2 -2
- package/dist/{types-nyOvcO0K.d.ts → types-lbzbJSZh.d.ts} +63 -7
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.d.cts +5 -5
- package/dist/webhook.d.ts +5 -5
- package/package.json +2 -4
package/dist/server.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as RawBaseApi, S as ServerApiOptions, a as ServerCommerceClient, T as TenantIntrospectionClient, b as SubscribeMembershipParams, c as SubscribeMembershipResponse, E as EndSubscribeIntentParams, d as EndSubscribeIntentResponse, C as CancelMembershipParams, e as CancelMembershipResponse, B as BillingCustodyParams, f as BillingCustodyResponse, g as
|
|
2
|
-
export { A as AddItemParams,
|
|
3
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
4
|
-
export { C as CollectionClient } from './collection-client-
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { R as RawBaseApi, S as ServerApiOptions, a as ServerCommerceClient, T as TenantIntrospectionClient, b as SubscribeMembershipParams, c as SubscribeMembershipResponse, E as EndSubscribeIntentParams, d as EndSubscribeIntentResponse, C as CancelMembershipParams, e as CancelMembershipResponse, B as BillingCustodyParams, f as BillingCustodyResponse, g as BillingCustodyContextParams, h as BillingCustodyContextResponse, i as CustomerGroupApi, j as ExternalEffectClaimsApi, I as InstallationCredentialsApi, k as ExternalCustomerLinksApi, l as BenefitVouchersApi, m as CreditsApi, V as VideoPlaybackClient, n as CommunityClient, o as BanCustomerParams, p as CommunityBan, U as UnbanCustomerParams, M as MarketDiscovery, q as ClientState, r as ClientServerConfig, s as RootServerClientWithEvents } from './types-Chwgg4CQ.cjs';
|
|
2
|
+
export { A as AddItemParams, t as BENEFIT_VOUCHER_ERROR_REASONS, u as BENEFIT_VOUCHER_VOID_REASONS, v as BenefitVoucher, w as BenefitVoucherErrorReason, x as CancelServerPaymentSessionParams, y as CaptureExternalCustomerPreviousStateParams, z as CartApi, D as CartApiOptions, F as CartMergeResult, G as CartMineResult, H as CartMutationResult, J as CheckoutAbandonedReason, K as CheckoutAmounts, L as CheckoutApi, N as CheckoutApiOptions, O as CheckoutListItem, P as CheckoutOrderReference, Q as CheckoutPaymentSessionRef, W as CheckoutQueryParams, X as CheckoutQueryResult, Y as CheckoutShippingAddress, Z as CheckoutStatus, _ as ClaimExternalEffectParams, $ as ClearCartParams, a0 as CollectionCustomFieldDefinition, a1 as CollectionCustomFields, a2 as CollectionFieldSchema, a3 as CollectionSchemaResponse, a4 as ConfirmCustomPaymentSessionOptions, a5 as ConfirmCustomPaymentSessionParams, a6 as ConfirmCustomPaymentSessionResponse, a7 as ConfirmTossPaymentSessionParams, a8 as ConnectExternalCustomerLinkParams, a9 as CreateCartParams, aa as CreateCartResult, ab as CreateCustomPaymentSessionParams, ac as CreateInstallationCredentialParams, ad as CreatePaymentSessionParams, ae as CreatePortOnePaymentSessionParams, af as CreateServerCheckoutParams, ag as CreateServerCheckoutResult, ah as CreateServerPaymentSessionParams, ai as CreateServerPortOnePaymentSessionParams, aj as CustomPaymentSession, ak as CustomPaymentSessionProof, al as CustomerBenefitVoucher, am as CustomerCreditAccountResponse, an as CustomerCreditBalances, ao as CustomerCreditGrant, ap as CustomerGroupApiOptions, aq as CustomerGroupManualSource, ar as CustomerGroupMember, as as CustomerGroupMemberCommandResponse, at as CustomerGroupMemberSource, au as CustomerGroupMembershipSource, av as CustomerGroupMembershipState, aw as CustomerMembershipView, ax as CustomerSnapshot, ay as DisposeInstallationCredentialParams, az as EventAdmissionAvailabilityParams, aA as EventAdmissionAvailabilityResponse, aB as EventAdmissionAvailabilityType, aC as EventAdmissionPricePresentment, aD as EventGuestCancelParams, aE as EventGuestRegistration, aF as EventGuestRegistrationResponse, aG as EventMyRegistration, aH as EventMyRegistrationsParams, aI as EventMyRegistrationsResponse, aJ as EventRegistrationAnswerInput, aK as EventRegistrationAttendeeInput, aL as EventRegistrationPublic, aM as EventRegistrationRegisterParams, aN as EventRegistrationRegisterResponse, aO as EventsCalendarItem, aP as EventsClient, aQ as EventsClientOptions, aR as EventsDateParam, aS as EventsExternalSource, aT as EventsLocation, aU as EventsOccurrenceLocation, aV as EventsRangeEvent, aW as EventsRangeOccurrence, aX as EventsRangeParams, aY as EventsRangeResponse, aZ as EventsTaxonomyItem, a_ as ExternalCustomerLink, a$ as ExternalCustomerLinkListResponse, b0 as ExternalCustomerPreviousState, b1 as ExternalEffectClaimErrorReason, b2 as ExternalEffectClaimSnapshot, b3 as ExternalEffectClaimState, b4 as ExternalEffectLeaseParams, b5 as ExternalEffectLocator, b6 as FindPortOnePaymentParams, b7 as FindPortOnePaymentResult, b8 as GetBenefitVoucherRequest, b9 as GetCustomerCreditAccountRequest, ba as GetCustomerCreditGrantRequest, bb as GetExternalCustomerLinkParams, bc as GetExternalEffectClaimParams, bd as GrantCustomerCreditRequest, be as GrantCustomerGroupMemberParams, bf as InstallationCredentialIdentity, bg as InstallationCredentialSnapshot, bh as IssueBenefitVoucherRequest, bi as IssueBenefitVoucherResponse, bj as ListBenefitVouchersRequest, bk as ListBenefitVouchersResponse, bl as ListCustomerGroupMembersParams, bm as ListCustomerGroupMembersResponse, bn as ListExternalCustomerLinksParams, bo as ListMyBenefitVouchersRequest, bp as ListMyBenefitVouchersResponse, bq as MembershipStatus, br as ModerationApi, bs as Money, bt as MutateBenefitVoucherResponse, bu as MutateExternalCustomerLinkParams, bv as MyCustomerCreditHistoryRequest, bw as MyCustomerCreditHistoryResponse, bx as MyCustomerCreditsRequest, by as MyCustomerCreditsResponse, bz as OpenCheckoutPaymentState, bA as PaymentFailureReason, bB as PaymentNextAction, bC as PaymentProviderStatus, bD as PaymentReconciliationReason, bE as PaymentSessionApi, bF as PaymentSessionApiOptions, bG as PaymentSessionRole, bH as PortOneHostedPaymentMethod, bI as PortOnePaymentCurrentState, bJ as PortOnePaymentNextAction, bK as PortOnePaymentReconciliationApi, bL as PortOnePaymentSelector, bM as PortOnePublicPaymentSession, bN as PortOneReconciliationDisposition, bO as ProductGraphRevisionParams, bP as ProductGraphRevisionResponse, bQ as ProductUpsertInput, bR as ProductUpsertParams, bS as ProductUpsertResponse, bT as ProductUpsertVariantInput, bU as PublicAttribute, bV as PublicCaptureEvidence, bW as PublicCart, bX as PublicCartItem, bY as PublicCartItemAdmission, bZ as PublicCartMarket, b_ as PublicCartReference, b$ as PublicCheckout, c0 as PublicCheckoutItem, c1 as PublicMediaAsset, c2 as PublicMediaSize, c3 as PublicOrder, c4 as PublicOrderAmounts, c5 as PublicOrderItem, c6 as PublicOrderReference, c7 as PublicPaymentSession, c8 as ReconcilePortOnePaymentParams, c9 as ReconcilePortOnePaymentResult, ca as ReconciliationRequired, cb as RecordExternalEffectRecoveryParams, cc as RedeemBenefitVoucherRequest, cd as RemoveItemParams, ce as ReplaceInstallationCredentialParams, cf as ReportExternalEffectParams, cg as RetrieveCartParams, ch as RetrieveCheckoutParams, ci as RetrieveCustomPaymentSessionParams, cj as RetrieveServerCheckoutParams, ck as RetrieveServerPaymentSessionParams, cl as RetrievedCustomPaymentSession, cm as RevokeCustomerCreditRequest, cn as RevokeCustomerCreditResponse, co as RevokeCustomerGroupMemberParams, cp as RootServerClient, cq as ServerAddItemParams, cr as ServerCartMergeParams, cs as ServerCartMineParams, ct as ServerCheckout, cu as ServerUpdateItemParams, cv as ShippingLine, cw as SpentCheckoutPaymentState, cx as TENANT_CONTEXT_PATH, cy as TenantContextInput, cz as TenantContextResponse, cA as TenantCustomFieldType, cB as TenantFeatureProgressEvidenceValue, cC as TenantFeatureProgressFeature, cD as TenantFeatureProgressGroup, cE as TenantFeatureProgressInput, cF as TenantFeatureProgressItem, cG as TenantFeatureProgressItemState, cH as TenantFeatureProgressResponse, cI as TenantFeatureProgressSeverity, cJ as TenantFeatureProgressStatus, cK as TenantFieldConfigState, cL as TenantIntrospectionApi, cM as TenantIntrospectionApiOptions, cN as UpdateCartAttributesParams, cO as UpdateDiscountCodesParams, cP as UpdateItemParams, cQ as VariantInput, cR as VariantPricesUpdateInput, cS as VariantPricesUpdateParams, cT as VariantPricesUpdateResponse, cU as VoidBenefitVoucherRequest, cV as getExternalEffectClaimErrorReason, cW as invalidBenefitVoucherResponse, cX as parseBenefitVoucher, cY as parseBenefitVoucherList, cZ as parseCustomerCreditAccount, c_ as parseCustomerCreditGrant, c$ as parseMyCustomerCreditHistory, d0 as parseMyCustomerCredits, d1 as parseRevokeCustomerCredit } from './types-Chwgg4CQ.cjs';
|
|
3
|
+
import { S as ServerCollectionClient } from './collection-client-BH4dIZ6c.cjs';
|
|
4
|
+
export { C as CollectionClient } from './collection-client-BH4dIZ6c.cjs';
|
|
5
|
+
import './payload-types-PXkmefhZ.cjs';
|
|
6
6
|
export { isApiError, isAuthError, isCommerceSDKError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.cjs';
|
|
7
|
-
import './const-
|
|
8
|
-
import './types-
|
|
7
|
+
import './const-BS2EaIp4.cjs';
|
|
8
|
+
import './types-CyMz0Kzc.cjs';
|
|
9
9
|
import './metadata.cjs';
|
|
10
10
|
|
|
11
11
|
type PreviewDetailParams = {
|
|
@@ -37,6 +37,7 @@ declare class ServerClient {
|
|
|
37
37
|
endSubscribeIntent: (params: EndSubscribeIntentParams) => Promise<EndSubscribeIntentResponse>;
|
|
38
38
|
cancel: (params: CancelMembershipParams) => Promise<CancelMembershipResponse>;
|
|
39
39
|
billingCustody: (params: BillingCustodyParams) => Promise<BillingCustodyResponse>;
|
|
40
|
+
billingCustodyContext: (params: BillingCustodyContextParams) => Promise<BillingCustodyContextResponse>;
|
|
40
41
|
};
|
|
41
42
|
customerGroups: CustomerGroupApi;
|
|
42
43
|
externalEffectClaims: ExternalEffectClaimsApi;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as RawBaseApi, S as ServerApiOptions, a as ServerCommerceClient, T as TenantIntrospectionClient, b as SubscribeMembershipParams, c as SubscribeMembershipResponse, E as EndSubscribeIntentParams, d as EndSubscribeIntentResponse, C as CancelMembershipParams, e as CancelMembershipResponse, B as BillingCustodyParams, f as BillingCustodyResponse, g as
|
|
2
|
-
export { A as AddItemParams,
|
|
3
|
-
import { S as ServerCollectionClient } from './collection-client-
|
|
4
|
-
export { C as CollectionClient } from './collection-client-
|
|
5
|
-
import './payload-types-
|
|
1
|
+
import { R as RawBaseApi, S as ServerApiOptions, a as ServerCommerceClient, T as TenantIntrospectionClient, b as SubscribeMembershipParams, c as SubscribeMembershipResponse, E as EndSubscribeIntentParams, d as EndSubscribeIntentResponse, C as CancelMembershipParams, e as CancelMembershipResponse, B as BillingCustodyParams, f as BillingCustodyResponse, g as BillingCustodyContextParams, h as BillingCustodyContextResponse, i as CustomerGroupApi, j as ExternalEffectClaimsApi, I as InstallationCredentialsApi, k as ExternalCustomerLinksApi, l as BenefitVouchersApi, m as CreditsApi, V as VideoPlaybackClient, n as CommunityClient, o as BanCustomerParams, p as CommunityBan, U as UnbanCustomerParams, M as MarketDiscovery, q as ClientState, r as ClientServerConfig, s as RootServerClientWithEvents } from './types-lbzbJSZh.js';
|
|
2
|
+
export { A as AddItemParams, t as BENEFIT_VOUCHER_ERROR_REASONS, u as BENEFIT_VOUCHER_VOID_REASONS, v as BenefitVoucher, w as BenefitVoucherErrorReason, x as CancelServerPaymentSessionParams, y as CaptureExternalCustomerPreviousStateParams, z as CartApi, D as CartApiOptions, F as CartMergeResult, G as CartMineResult, H as CartMutationResult, J as CheckoutAbandonedReason, K as CheckoutAmounts, L as CheckoutApi, N as CheckoutApiOptions, O as CheckoutListItem, P as CheckoutOrderReference, Q as CheckoutPaymentSessionRef, W as CheckoutQueryParams, X as CheckoutQueryResult, Y as CheckoutShippingAddress, Z as CheckoutStatus, _ as ClaimExternalEffectParams, $ as ClearCartParams, a0 as CollectionCustomFieldDefinition, a1 as CollectionCustomFields, a2 as CollectionFieldSchema, a3 as CollectionSchemaResponse, a4 as ConfirmCustomPaymentSessionOptions, a5 as ConfirmCustomPaymentSessionParams, a6 as ConfirmCustomPaymentSessionResponse, a7 as ConfirmTossPaymentSessionParams, a8 as ConnectExternalCustomerLinkParams, a9 as CreateCartParams, aa as CreateCartResult, ab as CreateCustomPaymentSessionParams, ac as CreateInstallationCredentialParams, ad as CreatePaymentSessionParams, ae as CreatePortOnePaymentSessionParams, af as CreateServerCheckoutParams, ag as CreateServerCheckoutResult, ah as CreateServerPaymentSessionParams, ai as CreateServerPortOnePaymentSessionParams, aj as CustomPaymentSession, ak as CustomPaymentSessionProof, al as CustomerBenefitVoucher, am as CustomerCreditAccountResponse, an as CustomerCreditBalances, ao as CustomerCreditGrant, ap as CustomerGroupApiOptions, aq as CustomerGroupManualSource, ar as CustomerGroupMember, as as CustomerGroupMemberCommandResponse, at as CustomerGroupMemberSource, au as CustomerGroupMembershipSource, av as CustomerGroupMembershipState, aw as CustomerMembershipView, ax as CustomerSnapshot, ay as DisposeInstallationCredentialParams, az as EventAdmissionAvailabilityParams, aA as EventAdmissionAvailabilityResponse, aB as EventAdmissionAvailabilityType, aC as EventAdmissionPricePresentment, aD as EventGuestCancelParams, aE as EventGuestRegistration, aF as EventGuestRegistrationResponse, aG as EventMyRegistration, aH as EventMyRegistrationsParams, aI as EventMyRegistrationsResponse, aJ as EventRegistrationAnswerInput, aK as EventRegistrationAttendeeInput, aL as EventRegistrationPublic, aM as EventRegistrationRegisterParams, aN as EventRegistrationRegisterResponse, aO as EventsCalendarItem, aP as EventsClient, aQ as EventsClientOptions, aR as EventsDateParam, aS as EventsExternalSource, aT as EventsLocation, aU as EventsOccurrenceLocation, aV as EventsRangeEvent, aW as EventsRangeOccurrence, aX as EventsRangeParams, aY as EventsRangeResponse, aZ as EventsTaxonomyItem, a_ as ExternalCustomerLink, a$ as ExternalCustomerLinkListResponse, b0 as ExternalCustomerPreviousState, b1 as ExternalEffectClaimErrorReason, b2 as ExternalEffectClaimSnapshot, b3 as ExternalEffectClaimState, b4 as ExternalEffectLeaseParams, b5 as ExternalEffectLocator, b6 as FindPortOnePaymentParams, b7 as FindPortOnePaymentResult, b8 as GetBenefitVoucherRequest, b9 as GetCustomerCreditAccountRequest, ba as GetCustomerCreditGrantRequest, bb as GetExternalCustomerLinkParams, bc as GetExternalEffectClaimParams, bd as GrantCustomerCreditRequest, be as GrantCustomerGroupMemberParams, bf as InstallationCredentialIdentity, bg as InstallationCredentialSnapshot, bh as IssueBenefitVoucherRequest, bi as IssueBenefitVoucherResponse, bj as ListBenefitVouchersRequest, bk as ListBenefitVouchersResponse, bl as ListCustomerGroupMembersParams, bm as ListCustomerGroupMembersResponse, bn as ListExternalCustomerLinksParams, bo as ListMyBenefitVouchersRequest, bp as ListMyBenefitVouchersResponse, bq as MembershipStatus, br as ModerationApi, bs as Money, bt as MutateBenefitVoucherResponse, bu as MutateExternalCustomerLinkParams, bv as MyCustomerCreditHistoryRequest, bw as MyCustomerCreditHistoryResponse, bx as MyCustomerCreditsRequest, by as MyCustomerCreditsResponse, bz as OpenCheckoutPaymentState, bA as PaymentFailureReason, bB as PaymentNextAction, bC as PaymentProviderStatus, bD as PaymentReconciliationReason, bE as PaymentSessionApi, bF as PaymentSessionApiOptions, bG as PaymentSessionRole, bH as PortOneHostedPaymentMethod, bI as PortOnePaymentCurrentState, bJ as PortOnePaymentNextAction, bK as PortOnePaymentReconciliationApi, bL as PortOnePaymentSelector, bM as PortOnePublicPaymentSession, bN as PortOneReconciliationDisposition, bO as ProductGraphRevisionParams, bP as ProductGraphRevisionResponse, bQ as ProductUpsertInput, bR as ProductUpsertParams, bS as ProductUpsertResponse, bT as ProductUpsertVariantInput, bU as PublicAttribute, bV as PublicCaptureEvidence, bW as PublicCart, bX as PublicCartItem, bY as PublicCartItemAdmission, bZ as PublicCartMarket, b_ as PublicCartReference, b$ as PublicCheckout, c0 as PublicCheckoutItem, c1 as PublicMediaAsset, c2 as PublicMediaSize, c3 as PublicOrder, c4 as PublicOrderAmounts, c5 as PublicOrderItem, c6 as PublicOrderReference, c7 as PublicPaymentSession, c8 as ReconcilePortOnePaymentParams, c9 as ReconcilePortOnePaymentResult, ca as ReconciliationRequired, cb as RecordExternalEffectRecoveryParams, cc as RedeemBenefitVoucherRequest, cd as RemoveItemParams, ce as ReplaceInstallationCredentialParams, cf as ReportExternalEffectParams, cg as RetrieveCartParams, ch as RetrieveCheckoutParams, ci as RetrieveCustomPaymentSessionParams, cj as RetrieveServerCheckoutParams, ck as RetrieveServerPaymentSessionParams, cl as RetrievedCustomPaymentSession, cm as RevokeCustomerCreditRequest, cn as RevokeCustomerCreditResponse, co as RevokeCustomerGroupMemberParams, cp as RootServerClient, cq as ServerAddItemParams, cr as ServerCartMergeParams, cs as ServerCartMineParams, ct as ServerCheckout, cu as ServerUpdateItemParams, cv as ShippingLine, cw as SpentCheckoutPaymentState, cx as TENANT_CONTEXT_PATH, cy as TenantContextInput, cz as TenantContextResponse, cA as TenantCustomFieldType, cB as TenantFeatureProgressEvidenceValue, cC as TenantFeatureProgressFeature, cD as TenantFeatureProgressGroup, cE as TenantFeatureProgressInput, cF as TenantFeatureProgressItem, cG as TenantFeatureProgressItemState, cH as TenantFeatureProgressResponse, cI as TenantFeatureProgressSeverity, cJ as TenantFeatureProgressStatus, cK as TenantFieldConfigState, cL as TenantIntrospectionApi, cM as TenantIntrospectionApiOptions, cN as UpdateCartAttributesParams, cO as UpdateDiscountCodesParams, cP as UpdateItemParams, cQ as VariantInput, cR as VariantPricesUpdateInput, cS as VariantPricesUpdateParams, cT as VariantPricesUpdateResponse, cU as VoidBenefitVoucherRequest, cV as getExternalEffectClaimErrorReason, cW as invalidBenefitVoucherResponse, cX as parseBenefitVoucher, cY as parseBenefitVoucherList, cZ as parseCustomerCreditAccount, c_ as parseCustomerCreditGrant, c$ as parseMyCustomerCreditHistory, d0 as parseMyCustomerCredits, d1 as parseRevokeCustomerCredit } from './types-lbzbJSZh.js';
|
|
3
|
+
import { S as ServerCollectionClient } from './collection-client-lLAl3xCZ.js';
|
|
4
|
+
export { C as CollectionClient } from './collection-client-lLAl3xCZ.js';
|
|
5
|
+
import './payload-types-PXkmefhZ.js';
|
|
6
6
|
export { isApiError, isAuthError, isCommerceSDKError, isConfigError, isConflictError, isGoneError, isNetworkError, isNotFoundError, isPermissionError, isRateLimitError, isSDKError, isServiceUnavailableError, isTimeoutError, isUsageLimitError, isValidationError } from './errors.js';
|
|
7
|
-
import './const-
|
|
8
|
-
import './types-
|
|
7
|
+
import './const-CCvoknRY.js';
|
|
8
|
+
import './types-CQRsG6sA.js';
|
|
9
9
|
import './metadata.js';
|
|
10
10
|
|
|
11
11
|
type PreviewDetailParams = {
|
|
@@ -37,6 +37,7 @@ declare class ServerClient {
|
|
|
37
37
|
endSubscribeIntent: (params: EndSubscribeIntentParams) => Promise<EndSubscribeIntentResponse>;
|
|
38
38
|
cancel: (params: CancelMembershipParams) => Promise<CancelMembershipResponse>;
|
|
39
39
|
billingCustody: (params: BillingCustodyParams) => Promise<BillingCustodyResponse>;
|
|
40
|
+
billingCustodyContext: (params: BillingCustodyContextParams) => Promise<BillingCustodyContextResponse>;
|
|
40
41
|
};
|
|
41
42
|
customerGroups: CustomerGroupApi;
|
|
42
43
|
externalEffectClaims: ExternalEffectClaimsApi;
|
package/dist/server.js
CHANGED
|
@@ -853,7 +853,7 @@ async function httpFetch(url, options) {
|
|
|
853
853
|
);
|
|
854
854
|
const usageError = attachRequestId(
|
|
855
855
|
createUsageLimitError(
|
|
856
|
-
`Monthly API usage limit exceeded (${current.toLocaleString()}/${limit.toLocaleString()})`,
|
|
856
|
+
`Monthly API usage limit exceeded (${current.toLocaleString("en-US")}/${limit.toLocaleString("en-US")})`,
|
|
857
857
|
{ limit, current, remaining },
|
|
858
858
|
{
|
|
859
859
|
url,
|
|
@@ -2932,7 +2932,18 @@ var ABANDONED_REASONS = ["expired", "customer", "operator"];
|
|
|
2932
2932
|
function managedPaymentProviders(providers) {
|
|
2933
2933
|
return providers;
|
|
2934
2934
|
}
|
|
2935
|
-
var PAYMENT_PROVIDERS = managedPaymentProviders([
|
|
2935
|
+
var PAYMENT_PROVIDERS = managedPaymentProviders([
|
|
2936
|
+
"toss",
|
|
2937
|
+
"portone",
|
|
2938
|
+
"stripe"
|
|
2939
|
+
]);
|
|
2940
|
+
var CANCEL_RECOVERY_METHODS = {
|
|
2941
|
+
toss: "cancel()",
|
|
2942
|
+
portone: "cancelPortOne()",
|
|
2943
|
+
stripe: null
|
|
2944
|
+
};
|
|
2945
|
+
var STRIPE_RETURN_URL_RAW_CHARACTERS = /^[^\s\u0000-\u001F\u007F\\]+$/;
|
|
2946
|
+
var STRIPE_RETURN_URL_AUTHORITY = /^[A-Za-z][A-Za-z0-9+.-]*:\/\/[^/?#@]+(?:[/?#]|$)/;
|
|
2936
2947
|
var PAYMENT_PROVIDER_STATUSES = [
|
|
2937
2948
|
"requires_payment_method",
|
|
2938
2949
|
"requires_action",
|
|
@@ -2993,11 +3004,8 @@ function fail(resource, path, expected) {
|
|
|
2993
3004
|
invalidCanonicalResponse(resource, { path, expected });
|
|
2994
3005
|
}
|
|
2995
3006
|
function providerMismatch(resource, expected, actual, operation2) {
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
toss: "cancel()",
|
|
2999
|
-
portone: "cancelPortOne()"
|
|
3000
|
-
}[actual];
|
|
3007
|
+
const method = CANCEL_RECOVERY_METHODS[actual];
|
|
3008
|
+
if (operation2 === "cancel" && method !== null) {
|
|
3001
3009
|
throw createApiError(
|
|
3002
3010
|
`Canonical ${resource} response provider mismatch: expected ${expected}, received ${actual}.`,
|
|
3003
3011
|
502,
|
|
@@ -4188,6 +4196,65 @@ function validateRequiredReconciliation(value, allowed, resource, path) {
|
|
|
4188
4196
|
}
|
|
4189
4197
|
function validateNextAction(value, provider, resource, path) {
|
|
4190
4198
|
const action = record(value, resource, path);
|
|
4199
|
+
if (provider === "stripe") {
|
|
4200
|
+
exact(
|
|
4201
|
+
action,
|
|
4202
|
+
["type", "clientSecret", "publishableKey", "returnUrl"],
|
|
4203
|
+
[],
|
|
4204
|
+
resource,
|
|
4205
|
+
path
|
|
4206
|
+
);
|
|
4207
|
+
if (action.type !== "stripe_payment_element")
|
|
4208
|
+
fail(resource, `${path}.type`, "stripe_payment_element");
|
|
4209
|
+
const clientSecret = boundedString(
|
|
4210
|
+
action.clientSecret,
|
|
4211
|
+
255,
|
|
4212
|
+
resource,
|
|
4213
|
+
`${path}.clientSecret`
|
|
4214
|
+
);
|
|
4215
|
+
if (!/^pi_[A-Za-z0-9]+_secret_[A-Za-z0-9]+$/.test(clientSecret)) {
|
|
4216
|
+
fail(
|
|
4217
|
+
resource,
|
|
4218
|
+
`${path}.clientSecret`,
|
|
4219
|
+
"Stripe PaymentIntent client secret"
|
|
4220
|
+
);
|
|
4221
|
+
}
|
|
4222
|
+
const publishableKey = boundedString(
|
|
4223
|
+
action.publishableKey,
|
|
4224
|
+
255,
|
|
4225
|
+
resource,
|
|
4226
|
+
`${path}.publishableKey`
|
|
4227
|
+
);
|
|
4228
|
+
if (!/^pk_(?:test|live)_[A-Za-z0-9]+$/.test(publishableKey)) {
|
|
4229
|
+
fail(resource, `${path}.publishableKey`, "Stripe publishable key");
|
|
4230
|
+
}
|
|
4231
|
+
const returnUrl = boundedString(
|
|
4232
|
+
action.returnUrl,
|
|
4233
|
+
2048,
|
|
4234
|
+
resource,
|
|
4235
|
+
`${path}.returnUrl`
|
|
4236
|
+
);
|
|
4237
|
+
if (!STRIPE_RETURN_URL_RAW_CHARACTERS.test(returnUrl) || !STRIPE_RETURN_URL_AUTHORITY.test(returnUrl)) {
|
|
4238
|
+
fail(
|
|
4239
|
+
resource,
|
|
4240
|
+
`${path}.returnUrl`,
|
|
4241
|
+
"HTTPS or loopback URL without embedded credentials"
|
|
4242
|
+
);
|
|
4243
|
+
}
|
|
4244
|
+
try {
|
|
4245
|
+
const parsed = new URL(returnUrl);
|
|
4246
|
+
const loopback = parsed.protocol === "http:" && (parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1");
|
|
4247
|
+
if (!loopback && parsed.protocol !== "https:" || parsed.username || parsed.password)
|
|
4248
|
+
throw new Error("unsafe return URL");
|
|
4249
|
+
} catch {
|
|
4250
|
+
fail(
|
|
4251
|
+
resource,
|
|
4252
|
+
`${path}.returnUrl`,
|
|
4253
|
+
"HTTPS or loopback URL without embedded credentials"
|
|
4254
|
+
);
|
|
4255
|
+
}
|
|
4256
|
+
return;
|
|
4257
|
+
}
|
|
4191
4258
|
if (provider === "portone") {
|
|
4192
4259
|
if (action.type === "portone_sdk") {
|
|
4193
4260
|
const hasCancelable = "cancelable" in action;
|
|
@@ -4563,7 +4630,7 @@ function validatePublicPaymentSession(value, expectedProvider, operation2) {
|
|
|
4563
4630
|
);
|
|
4564
4631
|
}
|
|
4565
4632
|
if (expectedProvider !== void 0 && provider !== expectedProvider) {
|
|
4566
|
-
if (operation2 === "cancel" && status !== "canceling" && status !== "canceled") {
|
|
4633
|
+
if (operation2 === "cancel" && CANCEL_RECOVERY_METHODS[provider] !== null && status !== "canceling" && status !== "canceled") {
|
|
4567
4634
|
fail(
|
|
4568
4635
|
resource,
|
|
4569
4636
|
"$.providerStatus",
|
|
@@ -4843,6 +4910,11 @@ function getRelationID(value) {
|
|
|
4843
4910
|
}
|
|
4844
4911
|
return void 0;
|
|
4845
4912
|
}
|
|
4913
|
+
function compareOrdinal(left, right) {
|
|
4914
|
+
if (left < right) return -1;
|
|
4915
|
+
if (left > right) return 1;
|
|
4916
|
+
return 0;
|
|
4917
|
+
}
|
|
4846
4918
|
function extractEntityId(value) {
|
|
4847
4919
|
if (typeof value === "string") return value;
|
|
4848
4920
|
if (typeof value === "number") return String(value);
|
|
@@ -5455,7 +5527,7 @@ function compareVariantOrder(a, b) {
|
|
|
5455
5527
|
}
|
|
5456
5528
|
const aId = String(getRelationID(a.id) ?? "");
|
|
5457
5529
|
const bId = String(getRelationID(b.id) ?? "");
|
|
5458
|
-
return aId
|
|
5530
|
+
return compareOrdinal(aId, bId);
|
|
5459
5531
|
}
|
|
5460
5532
|
function getVariantAvailableForSale(variant) {
|
|
5461
5533
|
if (variant.isActive === false) return false;
|
|
@@ -6662,6 +6734,8 @@ function buildRangeEndpoint(params) {
|
|
|
6662
6734
|
function buildAdmissionAvailabilityEndpoint(params) {
|
|
6663
6735
|
const urlParams = new URLSearchParams();
|
|
6664
6736
|
urlParams.set("occurrence", params.occurrence);
|
|
6737
|
+
const normalizedMarket2 = params.market?.trim();
|
|
6738
|
+
if (normalizedMarket2) urlParams.set("market", normalizedMarket2);
|
|
6665
6739
|
return resolveOperationPath(
|
|
6666
6740
|
EVENTS_ENDPOINT_OPERATIONS.occurrences.admissionAvailability,
|
|
6667
6741
|
{ query: urlParams }
|
|
@@ -6864,16 +6938,37 @@ var MembershipApi = class extends BaseApi {
|
|
|
6864
6938
|
}
|
|
6865
6939
|
/**
|
|
6866
6940
|
* Store/read only app-encrypted billing ciphertext for the Membership's
|
|
6867
|
-
* method.
|
|
6868
|
-
*
|
|
6869
|
-
*
|
|
6941
|
+
* method. Obtain generation from billingCustodyContext before a new upload
|
|
6942
|
+
* or read, and retain that same generation for every mutation based on the
|
|
6943
|
+
* read. Never rediscover and retry a mutation after a generation mismatch.
|
|
6870
6944
|
*/
|
|
6871
6945
|
async billingCustody(params) {
|
|
6872
6946
|
const { webhookSecret, ...input } = params;
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6947
|
+
return this.requestBillingCustody(
|
|
6948
|
+
{
|
|
6949
|
+
kind: "billing-custody.v1",
|
|
6950
|
+
...input
|
|
6951
|
+
},
|
|
6952
|
+
webhookSecret
|
|
6953
|
+
);
|
|
6954
|
+
}
|
|
6955
|
+
/** Requires the same server key, Membership and delegated HMAC as custody. */
|
|
6956
|
+
async billingCustodyContext(params) {
|
|
6957
|
+
const result = await this.requestBillingCustody(
|
|
6958
|
+
{
|
|
6959
|
+
kind: "billing-custody.v1",
|
|
6960
|
+
action: "context",
|
|
6961
|
+
membershipId: params.membershipId
|
|
6962
|
+
},
|
|
6963
|
+
params.webhookSecret
|
|
6964
|
+
);
|
|
6965
|
+
if (!result || typeof result !== "object" || Array.isArray(result) || Object.keys(result).length !== 2 || !("action" in result) || result.action !== "context" || !("generation" in result) || typeof result.generation !== "string" || !/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(
|
|
6966
|
+
result.generation
|
|
6967
|
+
))
|
|
6968
|
+
throw new Error("Invalid billing custody context response");
|
|
6969
|
+
return { action: "context", generation: result.generation };
|
|
6970
|
+
}
|
|
6971
|
+
async requestBillingCustody(body, webhookSecret) {
|
|
6877
6972
|
const timestamp2 = Date.now().toString();
|
|
6878
6973
|
const deliveryId = crypto.randomUUID();
|
|
6879
6974
|
const signature = await custodySignature(
|
|
@@ -7237,7 +7332,8 @@ var ServerClient = class _ServerClient {
|
|
|
7237
7332
|
subscribe: membershipApi.subscribe.bind(membershipApi),
|
|
7238
7333
|
endSubscribeIntent: membershipApi.endSubscribeIntent.bind(membershipApi),
|
|
7239
7334
|
cancel: membershipApi.cancel.bind(membershipApi),
|
|
7240
|
-
billingCustody: membershipApi.billingCustody.bind(membershipApi)
|
|
7335
|
+
billingCustody: membershipApi.billingCustody.bind(membershipApi),
|
|
7336
|
+
billingCustodyContext: membershipApi.billingCustodyContext.bind(membershipApi)
|
|
7241
7337
|
};
|
|
7242
7338
|
this.customerGroups = new CustomerGroupApi(serverOptions);
|
|
7243
7339
|
this.externalEffectClaims = new ExternalEffectClaimsApi(serverOptions);
|