@solvapay/react 2.2.2-preview-cf2672297243fbf98ba33872a7348aca170e7b01 → 2.2.2

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.
@@ -981,10 +981,8 @@ var enCopy = {
981
981
  addFunds: "Add funds",
982
982
  autoRechargeOn: "Auto-recharge on",
983
983
  autoRechargeOff: "Auto-recharge off",
984
- autoRechargePending: "Auto-recharge starts once this payment clears",
985
- turnOn: "Turn on",
986
- manage: "Manage",
987
- fixCard: "Fix card",
984
+ turnOn: "Turn on \u2192",
985
+ manage: "Manage \u2192",
988
986
  autoRechargeOffCaption: "Calls fail the moment the balance runs out.",
989
987
  autoRechargeOffFixCaption: "Turning it on stops this happening again.",
990
988
  callsFailingCaption: "The plan is active, but calls fail until you add credits.",
@@ -1,13 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { Ref } from 'react';
3
- import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-BpIrBHDT.cjs';
4
- export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-BpIrBHDT.cjs';
3
+ import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-CRd_E6J3.cjs';
4
+ export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-CRd_E6J3.cjs';
5
5
  import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
6
- import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-CLYaY7rM.cjs';
7
- export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 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, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-CLYaY7rM.cjs';
6
+ import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-B5QUesJE.cjs';
7
+ export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 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, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-B5QUesJE.cjs';
8
8
  import { PaymentElement } from '@stripe/react-stripe-js';
9
9
  import { Stripe, StripeElements } from '@stripe/stripe-js';
10
- export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-wjQ1xFpP.cjs';
10
+ export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-BiujMmVR.cjs';
11
11
  import '../adapters/auth.cjs';
12
12
 
13
13
  type PlanPricingOption = {
@@ -1,13 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { Ref } from 'react';
3
- import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-SizdkzW3.js';
4
- export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-SizdkzW3.js';
3
+ import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-DSPWQ37m.js';
4
+ export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-DSPWQ37m.js';
5
5
  import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
6
- import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-ZnFJaFNZ.js';
7
- export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 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, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-ZnFJaFNZ.js';
6
+ import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-BAYpUp5R.js';
7
+ export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 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, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-BAYpUp5R.js';
8
8
  import { PaymentElement } from '@stripe/react-stripe-js';
9
9
  import { Stripe, StripeElements } from '@stripe/stripe-js';
10
- export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-CCWxdw12.js';
10
+ export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-BZWfC5KX.js';
11
11
  import '../adapters/auth.js';
12
12
 
13
13
  type PlanPricingOption = {
@@ -89,7 +89,7 @@ import {
89
89
  useCreditGate,
90
90
  usePaywallNotice,
91
91
  usePurchaseGate
92
- } from "../chunk-C4QZGH7X.js";
92
+ } from "../chunk-KUH3SNWZ.js";
93
93
  import {
94
94
  AmountPicker,
95
95
  AmountPickerConfirm,
@@ -175,7 +175,7 @@ import {
175
175
  usePlanSelector,
176
176
  useTopupForm,
177
177
  useUsageMeter
178
- } from "../chunk-JVBZHE7B.js";
178
+ } from "../chunk-GPP4MY3I.js";
179
179
  import "../chunk-UMXOAUW7.js";
180
180
  import "../chunk-MLKGABMK.js";
181
181
  export {
@@ -829,15 +829,15 @@ interface components {
829
829
  LimitBalanceDto: {
830
830
  /** @description Credit balance in credits (100 credits = 1 minor currency unit) */
831
831
  creditBalance: number;
832
- /** @description Credits per minor unit of `currency` (typically 100) */
833
- creditsPerMinorUnit?: number;
834
832
  /** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
835
833
  creditsPerUnit: number;
836
834
  currency: string;
837
- /** @description USD → display-currency rate used with creditsPerMinorUnit */
838
- displayExchangeRate?: number;
839
835
  /** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
840
836
  remainingUnits?: number;
837
+ /** @description Credits per minor unit of `currency` (typically 100) */
838
+ creditsPerMinorUnit?: number;
839
+ /** @description USD → display-currency rate used with creditsPerMinorUnit */
840
+ displayExchangeRate?: number;
841
841
  };
842
842
  LimitPlanItemDto: {
843
843
  /** @description Derived billing cycle */
@@ -1208,17 +1208,17 @@ interface components {
1208
1208
  };
1209
1209
  ProcessPaymentCancelled: {
1210
1210
  /**
1211
- * @example cancelled
1211
+ * discriminator enum property added by openapi-typescript
1212
1212
  * @enum {string}
1213
1213
  */
1214
- status: 'cancelled';
1214
+ status: 'ProcessPaymentCancelled';
1215
1215
  };
1216
1216
  ProcessPaymentFailed: {
1217
1217
  /**
1218
- * @example failed
1218
+ * discriminator enum property added by openapi-typescript
1219
1219
  * @enum {string}
1220
1220
  */
1221
- status: 'failed';
1221
+ status: 'ProcessPaymentFailed';
1222
1222
  };
1223
1223
  ProcessPaymentIntentDto: {
1224
1224
  customerRef: string;
@@ -1227,25 +1227,25 @@ interface components {
1227
1227
  };
1228
1228
  ProcessPaymentProcessing: {
1229
1229
  /**
1230
- * @example processing
1230
+ * discriminator enum property added by openapi-typescript
1231
1231
  * @enum {string}
1232
1232
  */
1233
- status: 'processing';
1233
+ status: 'ProcessPaymentProcessing';
1234
1234
  };
1235
1235
  ProcessPaymentSucceededBare: {
1236
1236
  /**
1237
- * @example succeeded
1237
+ * discriminator enum property added by openapi-typescript
1238
1238
  * @enum {string}
1239
1239
  */
1240
- status: 'succeeded';
1240
+ status: 'ProcessPaymentSucceededBare';
1241
1241
  };
1242
1242
  ProcessPaymentSucceededOneTime: {
1243
1243
  oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
1244
1244
  /**
1245
- * @example succeeded
1245
+ * discriminator enum property added by openapi-typescript
1246
1246
  * @enum {string}
1247
1247
  */
1248
- status: 'succeeded';
1248
+ status: 'ProcessPaymentSucceededOneTime';
1249
1249
  /**
1250
1250
  * @example one-time
1251
1251
  * @enum {string}
@@ -1255,10 +1255,10 @@ interface components {
1255
1255
  ProcessPaymentSucceededRecurring: {
1256
1256
  purchase: components['schemas']['SdkPurchaseResponse'];
1257
1257
  /**
1258
- * @example succeeded
1258
+ * discriminator enum property added by openapi-typescript
1259
1259
  * @enum {string}
1260
1260
  */
1261
- status: 'succeeded';
1261
+ status: 'ProcessPaymentSucceededRecurring';
1262
1262
  /**
1263
1263
  * @example recurring
1264
1264
  * @enum {string}
@@ -1269,10 +1269,10 @@ interface components {
1269
1269
  /** @description Detail message describing the timeout */
1270
1270
  message?: string;
1271
1271
  /**
1272
- * @example timeout
1272
+ * discriminator enum property added by openapi-typescript
1273
1273
  * @enum {string}
1274
1274
  */
1275
- status: 'timeout';
1275
+ status: 'ProcessPaymentTimeout';
1276
1276
  };
1277
1277
  ProductConfigDto: {
1278
1278
  /**
@@ -3214,10 +3214,10 @@ interface operations {
3214
3214
  content: {
3215
3215
  'application/json': {
3216
3216
  /**
3217
- * Outcome of the delete: deactivation when purchases exist, otherwise soft-delete. Same in sandbox and live.
3217
+ * Outcome of the delete: hard delete in sandbox, soft-delete or deactivation in live depending on existing purchases
3218
3218
  * @enum {string}
3219
3219
  */
3220
- action?: 'deactivated' | 'soft_deleted';
3220
+ action?: 'deleted' | 'deactivated' | 'soft_deleted';
3221
3221
  success?: boolean;
3222
3222
  };
3223
3223
  };
@@ -3884,23 +3884,42 @@ type LimitResponseWithPlan = components['schemas']['LimitResponse'] & {
3884
3884
  /** @deprecated Never populated by the backend. Read `planRef` instead. */
3885
3885
  plan?: string;
3886
3886
  };
3887
+ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
3887
3888
  /**
3888
3889
  * Result from processing a payment intent.
3889
3890
  *
3890
- * Derived from the generated `/v1/sdk/payment-intents/{id}/process` 200
3891
- * response. The `succeeded` branches further discriminate on `type` so
3892
- * consumers can route to recurring vs one-time handling without guarding
3893
- * against `purchase === undefined`. A bare `{ status: 'succeeded' }` is
3894
- * returned when the webhook race means the backend can't yet enrich the
3895
- * response with the created purchase — callers should fall back to
3896
- * refetching.
3891
+ * Mirrors the backend's discriminated `oneOf` response. The `succeeded`
3892
+ * branches are further discriminated on `type` so consumers can route to
3893
+ * recurring vs one-time purchase handling without guarding against
3894
+ * `purchase === undefined`. A bare `{ status: 'succeeded' }` is returned
3895
+ * when the webhook race means the backend can't yet enrich the response
3896
+ * with the created purchase — callers should fall back to refetching.
3897
3897
  *
3898
- * `failed` and `cancelled` are returned when the Stripe PaymentIntent is
3899
- * in a terminal non-success state and are routed to `onError` by
3900
- * `reconcilePayment`. `timeout` carries a retry hint and is routed to
3901
- * the timeout branch.
3898
+ * `failed` and `cancelled` are returned by the backend when the Stripe
3899
+ * PaymentIntent is in a terminal non-success state and are routed to
3900
+ * `onError` by `reconcilePayment`. `timeout` carries a retry hint and is
3901
+ * routed to the timeout branch.
3902
3902
  */
3903
- type ProcessPaymentResult = operations['PaymentIntentSdkController_processPaymentIntent']['responses']['200']['content']['application/json'];
3903
+ type ProcessPaymentResult = {
3904
+ status: 'succeeded';
3905
+ type: 'recurring';
3906
+ purchase: PurchaseInfo;
3907
+ } | {
3908
+ status: 'succeeded';
3909
+ type: 'one-time';
3910
+ oneTimePurchase: OneTimePurchaseInfo;
3911
+ } | {
3912
+ status: 'succeeded';
3913
+ } | {
3914
+ status: 'processing';
3915
+ } | {
3916
+ status: 'timeout';
3917
+ message?: string;
3918
+ } | {
3919
+ status: 'failed';
3920
+ } | {
3921
+ status: 'cancelled';
3922
+ };
3904
3923
  /**
3905
3924
  * Result from processing a credit-topup payment intent.
3906
3925
  *
@@ -4293,13 +4312,9 @@ interface SolvaPayCopy {
4293
4312
  addFunds: string;
4294
4313
  autoRechargeOn: string;
4295
4314
  autoRechargeOff: string;
4296
- /** Status line while a top-up that enabled auto-recharge is still pending. */
4297
- autoRechargePending: string;
4298
4315
  turnOn: string;
4299
- /** On-state link that opens the hosted portal auto-recharge form. */
4316
+ /** On-state link that opens the dedicated auto-recharge view. */
4300
4317
  manage: string;
4301
- /** Failed-card link that opens the hosted portal auto-recharge form. */
4302
- fixCard: string;
4303
4318
  /** Caption under auto-recharge off on a running credit plan (B). */
4304
4319
  autoRechargeOffCaption: string;
4305
4320
  /** Caption under auto-recharge off when calls are already failing (D). */
@@ -829,15 +829,15 @@ interface components {
829
829
  LimitBalanceDto: {
830
830
  /** @description Credit balance in credits (100 credits = 1 minor currency unit) */
831
831
  creditBalance: number;
832
- /** @description Credits per minor unit of `currency` (typically 100) */
833
- creditsPerMinorUnit?: number;
834
832
  /** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
835
833
  creditsPerUnit: number;
836
834
  currency: string;
837
- /** @description USD → display-currency rate used with creditsPerMinorUnit */
838
- displayExchangeRate?: number;
839
835
  /** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
840
836
  remainingUnits?: number;
837
+ /** @description Credits per minor unit of `currency` (typically 100) */
838
+ creditsPerMinorUnit?: number;
839
+ /** @description USD → display-currency rate used with creditsPerMinorUnit */
840
+ displayExchangeRate?: number;
841
841
  };
842
842
  LimitPlanItemDto: {
843
843
  /** @description Derived billing cycle */
@@ -1208,17 +1208,17 @@ interface components {
1208
1208
  };
1209
1209
  ProcessPaymentCancelled: {
1210
1210
  /**
1211
- * @example cancelled
1211
+ * discriminator enum property added by openapi-typescript
1212
1212
  * @enum {string}
1213
1213
  */
1214
- status: 'cancelled';
1214
+ status: 'ProcessPaymentCancelled';
1215
1215
  };
1216
1216
  ProcessPaymentFailed: {
1217
1217
  /**
1218
- * @example failed
1218
+ * discriminator enum property added by openapi-typescript
1219
1219
  * @enum {string}
1220
1220
  */
1221
- status: 'failed';
1221
+ status: 'ProcessPaymentFailed';
1222
1222
  };
1223
1223
  ProcessPaymentIntentDto: {
1224
1224
  customerRef: string;
@@ -1227,25 +1227,25 @@ interface components {
1227
1227
  };
1228
1228
  ProcessPaymentProcessing: {
1229
1229
  /**
1230
- * @example processing
1230
+ * discriminator enum property added by openapi-typescript
1231
1231
  * @enum {string}
1232
1232
  */
1233
- status: 'processing';
1233
+ status: 'ProcessPaymentProcessing';
1234
1234
  };
1235
1235
  ProcessPaymentSucceededBare: {
1236
1236
  /**
1237
- * @example succeeded
1237
+ * discriminator enum property added by openapi-typescript
1238
1238
  * @enum {string}
1239
1239
  */
1240
- status: 'succeeded';
1240
+ status: 'ProcessPaymentSucceededBare';
1241
1241
  };
1242
1242
  ProcessPaymentSucceededOneTime: {
1243
1243
  oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
1244
1244
  /**
1245
- * @example succeeded
1245
+ * discriminator enum property added by openapi-typescript
1246
1246
  * @enum {string}
1247
1247
  */
1248
- status: 'succeeded';
1248
+ status: 'ProcessPaymentSucceededOneTime';
1249
1249
  /**
1250
1250
  * @example one-time
1251
1251
  * @enum {string}
@@ -1255,10 +1255,10 @@ interface components {
1255
1255
  ProcessPaymentSucceededRecurring: {
1256
1256
  purchase: components['schemas']['SdkPurchaseResponse'];
1257
1257
  /**
1258
- * @example succeeded
1258
+ * discriminator enum property added by openapi-typescript
1259
1259
  * @enum {string}
1260
1260
  */
1261
- status: 'succeeded';
1261
+ status: 'ProcessPaymentSucceededRecurring';
1262
1262
  /**
1263
1263
  * @example recurring
1264
1264
  * @enum {string}
@@ -1269,10 +1269,10 @@ interface components {
1269
1269
  /** @description Detail message describing the timeout */
1270
1270
  message?: string;
1271
1271
  /**
1272
- * @example timeout
1272
+ * discriminator enum property added by openapi-typescript
1273
1273
  * @enum {string}
1274
1274
  */
1275
- status: 'timeout';
1275
+ status: 'ProcessPaymentTimeout';
1276
1276
  };
1277
1277
  ProductConfigDto: {
1278
1278
  /**
@@ -3214,10 +3214,10 @@ interface operations {
3214
3214
  content: {
3215
3215
  'application/json': {
3216
3216
  /**
3217
- * Outcome of the delete: deactivation when purchases exist, otherwise soft-delete. Same in sandbox and live.
3217
+ * Outcome of the delete: hard delete in sandbox, soft-delete or deactivation in live depending on existing purchases
3218
3218
  * @enum {string}
3219
3219
  */
3220
- action?: 'deactivated' | 'soft_deleted';
3220
+ action?: 'deleted' | 'deactivated' | 'soft_deleted';
3221
3221
  success?: boolean;
3222
3222
  };
3223
3223
  };
@@ -3884,23 +3884,42 @@ type LimitResponseWithPlan = components['schemas']['LimitResponse'] & {
3884
3884
  /** @deprecated Never populated by the backend. Read `planRef` instead. */
3885
3885
  plan?: string;
3886
3886
  };
3887
+ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
3887
3888
  /**
3888
3889
  * Result from processing a payment intent.
3889
3890
  *
3890
- * Derived from the generated `/v1/sdk/payment-intents/{id}/process` 200
3891
- * response. The `succeeded` branches further discriminate on `type` so
3892
- * consumers can route to recurring vs one-time handling without guarding
3893
- * against `purchase === undefined`. A bare `{ status: 'succeeded' }` is
3894
- * returned when the webhook race means the backend can't yet enrich the
3895
- * response with the created purchase — callers should fall back to
3896
- * refetching.
3891
+ * Mirrors the backend's discriminated `oneOf` response. The `succeeded`
3892
+ * branches are further discriminated on `type` so consumers can route to
3893
+ * recurring vs one-time purchase handling without guarding against
3894
+ * `purchase === undefined`. A bare `{ status: 'succeeded' }` is returned
3895
+ * when the webhook race means the backend can't yet enrich the response
3896
+ * with the created purchase — callers should fall back to refetching.
3897
3897
  *
3898
- * `failed` and `cancelled` are returned when the Stripe PaymentIntent is
3899
- * in a terminal non-success state and are routed to `onError` by
3900
- * `reconcilePayment`. `timeout` carries a retry hint and is routed to
3901
- * the timeout branch.
3898
+ * `failed` and `cancelled` are returned by the backend when the Stripe
3899
+ * PaymentIntent is in a terminal non-success state and are routed to
3900
+ * `onError` by `reconcilePayment`. `timeout` carries a retry hint and is
3901
+ * routed to the timeout branch.
3902
3902
  */
3903
- type ProcessPaymentResult = operations['PaymentIntentSdkController_processPaymentIntent']['responses']['200']['content']['application/json'];
3903
+ type ProcessPaymentResult = {
3904
+ status: 'succeeded';
3905
+ type: 'recurring';
3906
+ purchase: PurchaseInfo;
3907
+ } | {
3908
+ status: 'succeeded';
3909
+ type: 'one-time';
3910
+ oneTimePurchase: OneTimePurchaseInfo;
3911
+ } | {
3912
+ status: 'succeeded';
3913
+ } | {
3914
+ status: 'processing';
3915
+ } | {
3916
+ status: 'timeout';
3917
+ message?: string;
3918
+ } | {
3919
+ status: 'failed';
3920
+ } | {
3921
+ status: 'cancelled';
3922
+ };
3904
3923
  /**
3905
3924
  * Result from processing a credit-topup payment intent.
3906
3925
  *
@@ -4293,13 +4312,9 @@ interface SolvaPayCopy {
4293
4312
  addFunds: string;
4294
4313
  autoRechargeOn: string;
4295
4314
  autoRechargeOff: string;
4296
- /** Status line while a top-up that enabled auto-recharge is still pending. */
4297
- autoRechargePending: string;
4298
4315
  turnOn: string;
4299
- /** On-state link that opens the hosted portal auto-recharge form. */
4316
+ /** On-state link that opens the dedicated auto-recharge view. */
4300
4317
  manage: string;
4301
- /** Failed-card link that opens the hosted portal auto-recharge form. */
4302
- fixCard: string;
4303
4318
  /** Caption under auto-recharge off on a running credit plan (B). */
4304
4319
  autoRechargeOffCaption: string;
4305
4320
  /** Caption under auto-recharge off when calls are already failing (D). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvapay/react",
3
- "version": "2.2.2-preview-cf2672297243fbf98ba33872a7348aca170e7b01",
3
+ "version": "2.2.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -57,7 +57,7 @@
57
57
  "directory": "packages/react"
58
58
  },
59
59
  "peerDependencies": {
60
- "@solvapay/mcp-core": "0.4.2-preview-cf2672297243fbf98ba33872a7348aca170e7b01",
60
+ "@solvapay/mcp-core": "^0.2.8 || ^0.3.0 || ^0.4.0",
61
61
  "react": "^18.2.0 || ^19.0.0",
62
62
  "react-dom": "^18.2.0 || ^19.0.0"
63
63
  },
@@ -85,8 +85,8 @@
85
85
  "react-dom": "^19.2.5",
86
86
  "typescript": "^5.9.3",
87
87
  "vitest": "^4.1.2",
88
- "@solvapay/mcp-core": "0.4.2-preview-cf2672297243fbf98ba33872a7348aca170e7b01",
89
- "@solvapay/server": "2.6.0-preview-cf2672297243fbf98ba33872a7348aca170e7b01",
88
+ "@solvapay/mcp-core": "0.4.2",
89
+ "@solvapay/server": "2.6.0",
90
90
  "@solvapay/test-utils": "0.0.0"
91
91
  },
92
92
  "scripts": {