@solvapay/react 2.0.1 → 2.0.2-preview-55843c4d7bb67bbe89bfcdabbbe0e3a679eb2805
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 +6 -0
- package/dist/{chunk-BHG7Z5XV.js → chunk-3H6GEMK7.js} +1 -1
- package/dist/{chunk-GMZU5M6R.js → chunk-JFW3WPVY.js} +362 -360
- package/dist/{chunk-ZKFTT5WD.js → chunk-Z2CCCBDY.js} +1 -1
- package/dist/{index-jmmZYs2K.d.cts → index-DrdpB1WK.d.cts} +1 -1
- package/dist/{index-DHcgeDBy.d.ts → index-DzBmS7A9.d.ts} +1 -1
- package/dist/index.cjs +368 -366
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/mcp/index.cjs +40 -49
- package/dist/mcp/index.d.cts +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +5 -18
- package/dist/mcp/styles.css +21 -8
- package/dist/primitives/index.cjs +453 -451
- package/dist/primitives/index.d.cts +4 -4
- package/dist/primitives/index.d.ts +4 -4
- package/dist/primitives/index.js +2 -2
- package/dist/{shared-BgyNW-D3.d.cts → shared-8vuWAyyz.d.cts} +20 -121
- package/dist/{shared-BI78qUom.d.ts → shared-DXOL9qKG.d.ts} +20 -121
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { Ref } from 'react';
|
|
3
|
-
import { b as Plan, y as Product, r as UseTopupAmountSelectorReturn, x as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, t as AutoRechargeConfig } from '../shared-
|
|
4
|
-
export { D as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../shared-
|
|
3
|
+
import { b as Plan, y as Product, r as UseTopupAmountSelectorReturn, x as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, t as AutoRechargeConfig } from '../shared-8vuWAyyz.cjs';
|
|
4
|
+
export { D as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../shared-8vuWAyyz.cjs';
|
|
5
5
|
import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
|
|
6
|
-
import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-
|
|
7
|
-
export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-
|
|
6
|
+
import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-DrdpB1WK.cjs';
|
|
7
|
+
export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-DrdpB1WK.cjs';
|
|
8
8
|
import { PaymentElement } from '@stripe/react-stripe-js';
|
|
9
9
|
import { Stripe, StripeElements } from '@stripe/stripe-js';
|
|
10
10
|
import '../adapters/auth.cjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { Ref } from 'react';
|
|
3
|
-
import { b as Plan, y as Product, r as UseTopupAmountSelectorReturn, x as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, t as AutoRechargeConfig } from '../shared-
|
|
4
|
-
export { D as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../shared-
|
|
3
|
+
import { b as Plan, y as Product, r as UseTopupAmountSelectorReturn, x as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, t as AutoRechargeConfig } from '../shared-DXOL9qKG.js';
|
|
4
|
+
export { D as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../shared-DXOL9qKG.js';
|
|
5
5
|
import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
|
|
6
|
-
import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-
|
|
7
|
-
export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-
|
|
6
|
+
import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-DzBmS7A9.js';
|
|
7
|
+
export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-DzBmS7A9.js';
|
|
8
8
|
import { PaymentElement } from '@stripe/react-stripe-js';
|
|
9
9
|
import { Stripe, StripeElements } from '@stripe/stripe-js';
|
|
10
10
|
import '../adapters/auth.js';
|
package/dist/primitives/index.js
CHANGED
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
useCreditGate,
|
|
89
89
|
usePaywallNotice,
|
|
90
90
|
usePurchaseGate
|
|
91
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-Z2CCCBDY.js";
|
|
92
92
|
import {
|
|
93
93
|
AmountPicker,
|
|
94
94
|
AmountPickerConfirm,
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
usePlanSelector,
|
|
176
176
|
useTopupForm,
|
|
177
177
|
useUsageMeter
|
|
178
|
-
} from "../chunk-
|
|
178
|
+
} from "../chunk-JFW3WPVY.js";
|
|
179
179
|
import "../chunk-UMXOAUW7.js";
|
|
180
180
|
import "../chunk-MLKGABMK.js";
|
|
181
181
|
export {
|
|
@@ -337,12 +337,6 @@ interface components {
|
|
|
337
337
|
/** @enum {string} */
|
|
338
338
|
onEnd: 'convert' | 'cancel' | 'downgrade';
|
|
339
339
|
requireCard?: boolean;
|
|
340
|
-
} | {
|
|
341
|
-
/** @enum {string} */
|
|
342
|
-
kind: 'prepaid';
|
|
343
|
-
label?: string;
|
|
344
|
-
lowBalanceUnits?: number;
|
|
345
|
-
minTopUpMinor?: number;
|
|
346
340
|
} | {
|
|
347
341
|
/** @enum {string} */
|
|
348
342
|
appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
|
|
@@ -540,12 +534,6 @@ interface components {
|
|
|
540
534
|
/** @enum {string} */
|
|
541
535
|
onEnd: 'convert' | 'cancel' | 'downgrade';
|
|
542
536
|
requireCard?: boolean;
|
|
543
|
-
} | {
|
|
544
|
-
/** @enum {string} */
|
|
545
|
-
kind: 'prepaid';
|
|
546
|
-
label?: string;
|
|
547
|
-
lowBalanceUnits?: number;
|
|
548
|
-
minTopUpMinor?: number;
|
|
549
537
|
} | {
|
|
550
538
|
/** @enum {string} */
|
|
551
539
|
appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
|
|
@@ -636,7 +624,7 @@ interface components {
|
|
|
636
624
|
* @example duplicate
|
|
637
625
|
* @enum {string}
|
|
638
626
|
*/
|
|
639
|
-
reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based';
|
|
627
|
+
reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based' | 'plan_billed_at_period_end';
|
|
640
628
|
};
|
|
641
629
|
CreditDebitSuccessResponse: {
|
|
642
630
|
/**
|
|
@@ -685,7 +673,7 @@ interface components {
|
|
|
685
673
|
* @example parity
|
|
686
674
|
* @enum {string}
|
|
687
675
|
*/
|
|
688
|
-
rateSource: 'parity' | 'db' | 'fallback';
|
|
676
|
+
rateSource: 'parity' | 'db' | 'fallback' | 'funding';
|
|
689
677
|
};
|
|
690
678
|
CustomerBalanceResponse: {
|
|
691
679
|
/**
|
|
@@ -742,11 +730,10 @@ interface components {
|
|
|
742
730
|
};
|
|
743
731
|
DisableAutoRechargeResponse: {
|
|
744
732
|
/**
|
|
745
|
-
*
|
|
733
|
+
* Whether auto-recharge was disabled
|
|
746
734
|
* @example true
|
|
747
|
-
* @enum {number}
|
|
748
735
|
*/
|
|
749
|
-
success:
|
|
736
|
+
success: boolean;
|
|
750
737
|
};
|
|
751
738
|
GetCustomerSessionResponse: {
|
|
752
739
|
/**
|
|
@@ -972,12 +959,6 @@ interface components {
|
|
|
972
959
|
/** @enum {string} */
|
|
973
960
|
onEnd: 'convert' | 'cancel' | 'downgrade';
|
|
974
961
|
requireCard?: boolean;
|
|
975
|
-
} | {
|
|
976
|
-
/** @enum {string} */
|
|
977
|
-
kind: 'prepaid';
|
|
978
|
-
label?: string;
|
|
979
|
-
lowBalanceUnits?: number;
|
|
980
|
-
minTopUpMinor?: number;
|
|
981
962
|
} | {
|
|
982
963
|
/** @enum {string} */
|
|
983
964
|
appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
|
|
@@ -1558,7 +1539,7 @@ interface components {
|
|
|
1558
1539
|
[key: string]: unknown;
|
|
1559
1540
|
} | null;
|
|
1560
1541
|
/**
|
|
1561
|
-
* Whether the frozen plan
|
|
1542
|
+
* Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
|
|
1562
1543
|
* @example true
|
|
1563
1544
|
*/
|
|
1564
1545
|
isMetered?: boolean;
|
|
@@ -1880,12 +1861,6 @@ interface components {
|
|
|
1880
1861
|
/** @enum {string} */
|
|
1881
1862
|
onEnd: 'convert' | 'cancel' | 'downgrade';
|
|
1882
1863
|
requireCard?: boolean;
|
|
1883
|
-
} | {
|
|
1884
|
-
/** @enum {string} */
|
|
1885
|
-
kind: 'prepaid';
|
|
1886
|
-
label?: string;
|
|
1887
|
-
lowBalanceUnits?: number;
|
|
1888
|
-
minTopUpMinor?: number;
|
|
1889
1864
|
} | {
|
|
1890
1865
|
/** @enum {string} */
|
|
1891
1866
|
appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
|
|
@@ -3777,19 +3752,7 @@ interface operations {
|
|
|
3777
3752
|
|
|
3778
3753
|
/** SDK purchase row. Generated from the OpenAPI `SdkPurchaseResponse` schema. */
|
|
3779
3754
|
type PurchaseInfo = components['schemas']['SdkPurchaseResponse'];
|
|
3780
|
-
|
|
3781
|
-
* One-time purchase information returned from payment processing
|
|
3782
|
-
*/
|
|
3783
|
-
interface OneTimePurchaseInfo {
|
|
3784
|
-
reference: string;
|
|
3785
|
-
customerRef: string;
|
|
3786
|
-
productRef?: string;
|
|
3787
|
-
amount: number;
|
|
3788
|
-
currency: string;
|
|
3789
|
-
creditsAdded?: number;
|
|
3790
|
-
completedAt: string;
|
|
3791
|
-
createdAt: string;
|
|
3792
|
-
}
|
|
3755
|
+
type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
|
|
3793
3756
|
/**
|
|
3794
3757
|
* Result from processing a payment intent.
|
|
3795
3758
|
*
|
|
@@ -3874,71 +3837,21 @@ type ActivatePlanResult = components['schemas']['ActivatePlanResponseDto'];
|
|
|
3874
3837
|
* `{ kind: 'card', ... } | { kind: 'none' }` discriminated union here.
|
|
3875
3838
|
*/
|
|
3876
3839
|
type PaymentMethodInfo = operations['PaymentMethodSdkController_getPaymentMethod']['responses']['200']['content']['application/json'];
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
topup: {
|
|
3885
|
-
mode: 'fixed';
|
|
3886
|
-
amountMinor: number;
|
|
3887
|
-
currency: string;
|
|
3888
|
-
};
|
|
3889
|
-
fundingSourceType?: 'saved_card' | 'tokenized_card';
|
|
3890
|
-
paymentMethodId?: string;
|
|
3891
|
-
status: AutoRechargeStatus;
|
|
3892
|
-
failureCount: number;
|
|
3893
|
-
maxMonthlySpendMinor?: number;
|
|
3894
|
-
monthlySpendMinor: number;
|
|
3895
|
-
monthlySpendPeriod?: string;
|
|
3896
|
-
lastChargeAt?: string;
|
|
3897
|
-
updatedAt?: string;
|
|
3898
|
-
/** Backend-computed display values — render verbatim; do not derive from trigger fields. */
|
|
3899
|
-
display?: AutoRechargeDisplayBlock;
|
|
3900
|
-
};
|
|
3901
|
-
type AutoRechargeDisplayBlock = {
|
|
3902
|
-
thresholdAmountMajor: number;
|
|
3903
|
-
topupAmountMajor: number;
|
|
3904
|
-
currency: string;
|
|
3905
|
-
formatted: {
|
|
3906
|
-
threshold: string;
|
|
3907
|
-
topup: string;
|
|
3908
|
-
};
|
|
3909
|
-
exchangeRate: number;
|
|
3910
|
-
rateSource: 'parity' | 'db' | 'fallback';
|
|
3911
|
-
};
|
|
3912
|
-
type CreditDisplayBlock$1 = {
|
|
3913
|
-
amountMajor: number;
|
|
3914
|
-
currency: string;
|
|
3915
|
-
formatted: string;
|
|
3916
|
-
exchangeRate: number;
|
|
3917
|
-
rateSource: 'parity' | 'db' | 'fallback';
|
|
3918
|
-
};
|
|
3919
|
-
type AutoRechargeInput = {
|
|
3920
|
-
enabled: boolean;
|
|
3921
|
-
triggerType: 'balance';
|
|
3922
|
-
thresholdAmountMajor?: number;
|
|
3923
|
-
topupAmountMajor?: number;
|
|
3924
|
-
maxMonthlySpendMajor?: number;
|
|
3925
|
-
currency: string;
|
|
3840
|
+
/**
|
|
3841
|
+
* Stored auto-recharge config. `display` is an SDK-side merge of the
|
|
3842
|
+
* sibling `AutoRechargeGetResponse.display` block so consumers can read
|
|
3843
|
+
* formatted amounts off the config object.
|
|
3844
|
+
*/
|
|
3845
|
+
type AutoRechargeConfig = components['schemas']['AutoRechargeConfigDto'] & {
|
|
3846
|
+
display?: components['schemas']['AutoRechargeDisplayDto'];
|
|
3926
3847
|
};
|
|
3848
|
+
type AutoRechargeDisplayBlock = components['schemas']['AutoRechargeDisplayDto'];
|
|
3849
|
+
type CreditDisplayBlock = components['schemas']['CustomerBalanceDisplayDto'];
|
|
3850
|
+
type AutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName' | 'deferSetupIntent'>;
|
|
3927
3851
|
/** PUT /sdk/auto-recharge — input plus request-only flags. */
|
|
3928
|
-
type SaveAutoRechargeInput =
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
type AutoRechargeResponse = {
|
|
3932
|
-
config: AutoRechargeConfig | null;
|
|
3933
|
-
display?: AutoRechargeDisplayBlock;
|
|
3934
|
-
};
|
|
3935
|
-
type SaveAutoRechargeResponse = {
|
|
3936
|
-
config: AutoRechargeConfig;
|
|
3937
|
-
display?: AutoRechargeDisplayBlock;
|
|
3938
|
-
setupClientSecret?: string;
|
|
3939
|
-
publishableKey?: string;
|
|
3940
|
-
stripeAccountId?: string;
|
|
3941
|
-
};
|
|
3852
|
+
type SaveAutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName'>;
|
|
3853
|
+
type AutoRechargeResponse = components['schemas']['AutoRechargeGetResponse'];
|
|
3854
|
+
type SaveAutoRechargeResponse = components['schemas']['SaveAutoRechargeResponse'];
|
|
3942
3855
|
|
|
3943
3856
|
/**
|
|
3944
3857
|
* Customer Helper (Core)
|
|
@@ -3947,14 +3860,7 @@ type SaveAutoRechargeResponse = {
|
|
|
3947
3860
|
* Works with standard Web API Request (works everywhere).
|
|
3948
3861
|
*/
|
|
3949
3862
|
|
|
3950
|
-
type CustomerBalanceResult =
|
|
3951
|
-
customerRef: string;
|
|
3952
|
-
credits: number;
|
|
3953
|
-
displayCurrency: string;
|
|
3954
|
-
creditsPerMinorUnit: number;
|
|
3955
|
-
displayExchangeRate: number;
|
|
3956
|
-
display?: CreditDisplayBlock$1;
|
|
3957
|
-
};
|
|
3863
|
+
type CustomerBalanceResult = components['schemas']['CustomerBalanceResponse'];
|
|
3958
3864
|
|
|
3959
3865
|
interface PurchaseCheckResult {
|
|
3960
3866
|
customerRef: string;
|
|
@@ -4363,13 +4269,6 @@ type PartialSolvaPayCopy = {
|
|
|
4363
4269
|
[K in keyof SolvaPayCopy]?: Partial<SolvaPayCopy[K]>;
|
|
4364
4270
|
};
|
|
4365
4271
|
|
|
4366
|
-
type CreditDisplayBlock = {
|
|
4367
|
-
amountMajor: number;
|
|
4368
|
-
currency: string;
|
|
4369
|
-
formatted: string;
|
|
4370
|
-
exchangeRate: number;
|
|
4371
|
-
rateSource: 'parity' | 'db' | 'fallback';
|
|
4372
|
-
};
|
|
4373
4272
|
interface TransportBalanceResult {
|
|
4374
4273
|
credits: number;
|
|
4375
4274
|
displayCurrency: string;
|
|
@@ -337,12 +337,6 @@ interface components {
|
|
|
337
337
|
/** @enum {string} */
|
|
338
338
|
onEnd: 'convert' | 'cancel' | 'downgrade';
|
|
339
339
|
requireCard?: boolean;
|
|
340
|
-
} | {
|
|
341
|
-
/** @enum {string} */
|
|
342
|
-
kind: 'prepaid';
|
|
343
|
-
label?: string;
|
|
344
|
-
lowBalanceUnits?: number;
|
|
345
|
-
minTopUpMinor?: number;
|
|
346
340
|
} | {
|
|
347
341
|
/** @enum {string} */
|
|
348
342
|
appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
|
|
@@ -540,12 +534,6 @@ interface components {
|
|
|
540
534
|
/** @enum {string} */
|
|
541
535
|
onEnd: 'convert' | 'cancel' | 'downgrade';
|
|
542
536
|
requireCard?: boolean;
|
|
543
|
-
} | {
|
|
544
|
-
/** @enum {string} */
|
|
545
|
-
kind: 'prepaid';
|
|
546
|
-
label?: string;
|
|
547
|
-
lowBalanceUnits?: number;
|
|
548
|
-
minTopUpMinor?: number;
|
|
549
537
|
} | {
|
|
550
538
|
/** @enum {string} */
|
|
551
539
|
appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
|
|
@@ -636,7 +624,7 @@ interface components {
|
|
|
636
624
|
* @example duplicate
|
|
637
625
|
* @enum {string}
|
|
638
626
|
*/
|
|
639
|
-
reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based';
|
|
627
|
+
reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based' | 'plan_billed_at_period_end';
|
|
640
628
|
};
|
|
641
629
|
CreditDebitSuccessResponse: {
|
|
642
630
|
/**
|
|
@@ -685,7 +673,7 @@ interface components {
|
|
|
685
673
|
* @example parity
|
|
686
674
|
* @enum {string}
|
|
687
675
|
*/
|
|
688
|
-
rateSource: 'parity' | 'db' | 'fallback';
|
|
676
|
+
rateSource: 'parity' | 'db' | 'fallback' | 'funding';
|
|
689
677
|
};
|
|
690
678
|
CustomerBalanceResponse: {
|
|
691
679
|
/**
|
|
@@ -742,11 +730,10 @@ interface components {
|
|
|
742
730
|
};
|
|
743
731
|
DisableAutoRechargeResponse: {
|
|
744
732
|
/**
|
|
745
|
-
*
|
|
733
|
+
* Whether auto-recharge was disabled
|
|
746
734
|
* @example true
|
|
747
|
-
* @enum {number}
|
|
748
735
|
*/
|
|
749
|
-
success:
|
|
736
|
+
success: boolean;
|
|
750
737
|
};
|
|
751
738
|
GetCustomerSessionResponse: {
|
|
752
739
|
/**
|
|
@@ -972,12 +959,6 @@ interface components {
|
|
|
972
959
|
/** @enum {string} */
|
|
973
960
|
onEnd: 'convert' | 'cancel' | 'downgrade';
|
|
974
961
|
requireCard?: boolean;
|
|
975
|
-
} | {
|
|
976
|
-
/** @enum {string} */
|
|
977
|
-
kind: 'prepaid';
|
|
978
|
-
label?: string;
|
|
979
|
-
lowBalanceUnits?: number;
|
|
980
|
-
minTopUpMinor?: number;
|
|
981
962
|
} | {
|
|
982
963
|
/** @enum {string} */
|
|
983
964
|
appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
|
|
@@ -1558,7 +1539,7 @@ interface components {
|
|
|
1558
1539
|
[key: string]: unknown;
|
|
1559
1540
|
} | null;
|
|
1560
1541
|
/**
|
|
1561
|
-
* Whether the frozen plan
|
|
1542
|
+
* Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
|
|
1562
1543
|
* @example true
|
|
1563
1544
|
*/
|
|
1564
1545
|
isMetered?: boolean;
|
|
@@ -1880,12 +1861,6 @@ interface components {
|
|
|
1880
1861
|
/** @enum {string} */
|
|
1881
1862
|
onEnd: 'convert' | 'cancel' | 'downgrade';
|
|
1882
1863
|
requireCard?: boolean;
|
|
1883
|
-
} | {
|
|
1884
|
-
/** @enum {string} */
|
|
1885
|
-
kind: 'prepaid';
|
|
1886
|
-
label?: string;
|
|
1887
|
-
lowBalanceUnits?: number;
|
|
1888
|
-
minTopUpMinor?: number;
|
|
1889
1864
|
} | {
|
|
1890
1865
|
/** @enum {string} */
|
|
1891
1866
|
appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
|
|
@@ -3777,19 +3752,7 @@ interface operations {
|
|
|
3777
3752
|
|
|
3778
3753
|
/** SDK purchase row. Generated from the OpenAPI `SdkPurchaseResponse` schema. */
|
|
3779
3754
|
type PurchaseInfo = components['schemas']['SdkPurchaseResponse'];
|
|
3780
|
-
|
|
3781
|
-
* One-time purchase information returned from payment processing
|
|
3782
|
-
*/
|
|
3783
|
-
interface OneTimePurchaseInfo {
|
|
3784
|
-
reference: string;
|
|
3785
|
-
customerRef: string;
|
|
3786
|
-
productRef?: string;
|
|
3787
|
-
amount: number;
|
|
3788
|
-
currency: string;
|
|
3789
|
-
creditsAdded?: number;
|
|
3790
|
-
completedAt: string;
|
|
3791
|
-
createdAt: string;
|
|
3792
|
-
}
|
|
3755
|
+
type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
|
|
3793
3756
|
/**
|
|
3794
3757
|
* Result from processing a payment intent.
|
|
3795
3758
|
*
|
|
@@ -3874,71 +3837,21 @@ type ActivatePlanResult = components['schemas']['ActivatePlanResponseDto'];
|
|
|
3874
3837
|
* `{ kind: 'card', ... } | { kind: 'none' }` discriminated union here.
|
|
3875
3838
|
*/
|
|
3876
3839
|
type PaymentMethodInfo = operations['PaymentMethodSdkController_getPaymentMethod']['responses']['200']['content']['application/json'];
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
topup: {
|
|
3885
|
-
mode: 'fixed';
|
|
3886
|
-
amountMinor: number;
|
|
3887
|
-
currency: string;
|
|
3888
|
-
};
|
|
3889
|
-
fundingSourceType?: 'saved_card' | 'tokenized_card';
|
|
3890
|
-
paymentMethodId?: string;
|
|
3891
|
-
status: AutoRechargeStatus;
|
|
3892
|
-
failureCount: number;
|
|
3893
|
-
maxMonthlySpendMinor?: number;
|
|
3894
|
-
monthlySpendMinor: number;
|
|
3895
|
-
monthlySpendPeriod?: string;
|
|
3896
|
-
lastChargeAt?: string;
|
|
3897
|
-
updatedAt?: string;
|
|
3898
|
-
/** Backend-computed display values — render verbatim; do not derive from trigger fields. */
|
|
3899
|
-
display?: AutoRechargeDisplayBlock;
|
|
3900
|
-
};
|
|
3901
|
-
type AutoRechargeDisplayBlock = {
|
|
3902
|
-
thresholdAmountMajor: number;
|
|
3903
|
-
topupAmountMajor: number;
|
|
3904
|
-
currency: string;
|
|
3905
|
-
formatted: {
|
|
3906
|
-
threshold: string;
|
|
3907
|
-
topup: string;
|
|
3908
|
-
};
|
|
3909
|
-
exchangeRate: number;
|
|
3910
|
-
rateSource: 'parity' | 'db' | 'fallback';
|
|
3911
|
-
};
|
|
3912
|
-
type CreditDisplayBlock$1 = {
|
|
3913
|
-
amountMajor: number;
|
|
3914
|
-
currency: string;
|
|
3915
|
-
formatted: string;
|
|
3916
|
-
exchangeRate: number;
|
|
3917
|
-
rateSource: 'parity' | 'db' | 'fallback';
|
|
3918
|
-
};
|
|
3919
|
-
type AutoRechargeInput = {
|
|
3920
|
-
enabled: boolean;
|
|
3921
|
-
triggerType: 'balance';
|
|
3922
|
-
thresholdAmountMajor?: number;
|
|
3923
|
-
topupAmountMajor?: number;
|
|
3924
|
-
maxMonthlySpendMajor?: number;
|
|
3925
|
-
currency: string;
|
|
3840
|
+
/**
|
|
3841
|
+
* Stored auto-recharge config. `display` is an SDK-side merge of the
|
|
3842
|
+
* sibling `AutoRechargeGetResponse.display` block so consumers can read
|
|
3843
|
+
* formatted amounts off the config object.
|
|
3844
|
+
*/
|
|
3845
|
+
type AutoRechargeConfig = components['schemas']['AutoRechargeConfigDto'] & {
|
|
3846
|
+
display?: components['schemas']['AutoRechargeDisplayDto'];
|
|
3926
3847
|
};
|
|
3848
|
+
type AutoRechargeDisplayBlock = components['schemas']['AutoRechargeDisplayDto'];
|
|
3849
|
+
type CreditDisplayBlock = components['schemas']['CustomerBalanceDisplayDto'];
|
|
3850
|
+
type AutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName' | 'deferSetupIntent'>;
|
|
3927
3851
|
/** PUT /sdk/auto-recharge — input plus request-only flags. */
|
|
3928
|
-
type SaveAutoRechargeInput =
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
type AutoRechargeResponse = {
|
|
3932
|
-
config: AutoRechargeConfig | null;
|
|
3933
|
-
display?: AutoRechargeDisplayBlock;
|
|
3934
|
-
};
|
|
3935
|
-
type SaveAutoRechargeResponse = {
|
|
3936
|
-
config: AutoRechargeConfig;
|
|
3937
|
-
display?: AutoRechargeDisplayBlock;
|
|
3938
|
-
setupClientSecret?: string;
|
|
3939
|
-
publishableKey?: string;
|
|
3940
|
-
stripeAccountId?: string;
|
|
3941
|
-
};
|
|
3852
|
+
type SaveAutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName'>;
|
|
3853
|
+
type AutoRechargeResponse = components['schemas']['AutoRechargeGetResponse'];
|
|
3854
|
+
type SaveAutoRechargeResponse = components['schemas']['SaveAutoRechargeResponse'];
|
|
3942
3855
|
|
|
3943
3856
|
/**
|
|
3944
3857
|
* Customer Helper (Core)
|
|
@@ -3947,14 +3860,7 @@ type SaveAutoRechargeResponse = {
|
|
|
3947
3860
|
* Works with standard Web API Request (works everywhere).
|
|
3948
3861
|
*/
|
|
3949
3862
|
|
|
3950
|
-
type CustomerBalanceResult =
|
|
3951
|
-
customerRef: string;
|
|
3952
|
-
credits: number;
|
|
3953
|
-
displayCurrency: string;
|
|
3954
|
-
creditsPerMinorUnit: number;
|
|
3955
|
-
displayExchangeRate: number;
|
|
3956
|
-
display?: CreditDisplayBlock$1;
|
|
3957
|
-
};
|
|
3863
|
+
type CustomerBalanceResult = components['schemas']['CustomerBalanceResponse'];
|
|
3958
3864
|
|
|
3959
3865
|
interface PurchaseCheckResult {
|
|
3960
3866
|
customerRef: string;
|
|
@@ -4363,13 +4269,6 @@ type PartialSolvaPayCopy = {
|
|
|
4363
4269
|
[K in keyof SolvaPayCopy]?: Partial<SolvaPayCopy[K]>;
|
|
4364
4270
|
};
|
|
4365
4271
|
|
|
4366
|
-
type CreditDisplayBlock = {
|
|
4367
|
-
amountMajor: number;
|
|
4368
|
-
currency: string;
|
|
4369
|
-
formatted: string;
|
|
4370
|
-
exchangeRate: number;
|
|
4371
|
-
rateSource: 'parity' | 'db' | 'fallback';
|
|
4372
|
-
};
|
|
4373
4272
|
interface TransportBalanceResult {
|
|
4374
4273
|
credits: number;
|
|
4375
4274
|
displayCurrency: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solvapay/react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2-preview-55843c4d7bb67bbe89bfcdabbbe0e3a679eb2805",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"typescript": "^5.9.3",
|
|
87
87
|
"vitest": "^4.1.2",
|
|
88
88
|
"@solvapay/mcp-core": "0.3.2",
|
|
89
|
-
"@solvapay/server": "2.2.
|
|
89
|
+
"@solvapay/server": "2.2.2-preview-55843c4d7bb67bbe89bfcdabbbe0e3a679eb2805",
|
|
90
90
|
"@solvapay/test-utils": "0.0.0"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|