@solvapay/server 2.2.1 → 2.2.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/dist/edge.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as _solvapay_core from '@solvapay/core';
2
1
  import { BusinessDetailsInput, TaxBreakdown } from '@solvapay/core';
3
2
 
4
3
  interface components {
@@ -334,12 +333,6 @@ interface components {
334
333
  /** @enum {string} */
335
334
  onEnd: 'convert' | 'cancel' | 'downgrade';
336
335
  requireCard?: boolean;
337
- } | {
338
- /** @enum {string} */
339
- kind: 'prepaid';
340
- label?: string;
341
- lowBalanceUnits?: number;
342
- minTopUpMinor?: number;
343
336
  } | {
344
337
  /** @enum {string} */
345
338
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -537,12 +530,6 @@ interface components {
537
530
  /** @enum {string} */
538
531
  onEnd: 'convert' | 'cancel' | 'downgrade';
539
532
  requireCard?: boolean;
540
- } | {
541
- /** @enum {string} */
542
- kind: 'prepaid';
543
- label?: string;
544
- lowBalanceUnits?: number;
545
- minTopUpMinor?: number;
546
533
  } | {
547
534
  /** @enum {string} */
548
535
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -633,7 +620,7 @@ interface components {
633
620
  * @example duplicate
634
621
  * @enum {string}
635
622
  */
636
- reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based';
623
+ reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based' | 'plan_billed_at_period_end';
637
624
  };
638
625
  CreditDebitSuccessResponse: {
639
626
  /**
@@ -682,7 +669,7 @@ interface components {
682
669
  * @example parity
683
670
  * @enum {string}
684
671
  */
685
- rateSource: 'parity' | 'db' | 'fallback';
672
+ rateSource: 'parity' | 'db' | 'fallback' | 'funding';
686
673
  };
687
674
  CustomerBalanceResponse: {
688
675
  /**
@@ -739,11 +726,10 @@ interface components {
739
726
  };
740
727
  DisableAutoRechargeResponse: {
741
728
  /**
742
- * Always true on success
729
+ * Whether auto-recharge was disabled
743
730
  * @example true
744
- * @enum {number}
745
731
  */
746
- success: true;
732
+ success: boolean;
747
733
  };
748
734
  GetCustomerSessionResponse: {
749
735
  /**
@@ -969,12 +955,6 @@ interface components {
969
955
  /** @enum {string} */
970
956
  onEnd: 'convert' | 'cancel' | 'downgrade';
971
957
  requireCard?: boolean;
972
- } | {
973
- /** @enum {string} */
974
- kind: 'prepaid';
975
- label?: string;
976
- lowBalanceUnits?: number;
977
- minTopUpMinor?: number;
978
958
  } | {
979
959
  /** @enum {string} */
980
960
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -1555,7 +1535,7 @@ interface components {
1555
1535
  [key: string]: unknown;
1556
1536
  } | null;
1557
1537
  /**
1558
- * Whether the frozen plan meters usage
1538
+ * Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
1559
1539
  * @example true
1560
1540
  */
1561
1541
  isMetered?: boolean;
@@ -1877,12 +1857,6 @@ interface components {
1877
1857
  /** @enum {string} */
1878
1858
  onEnd: 'convert' | 'cancel' | 'downgrade';
1879
1859
  requireCard?: boolean;
1880
- } | {
1881
- /** @enum {string} */
1882
- kind: 'prepaid';
1883
- label?: string;
1884
- lowBalanceUnits?: number;
1885
- minTopUpMinor?: number;
1886
1860
  } | {
1887
1861
  /** @enum {string} */
1888
1862
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -3826,29 +3800,9 @@ type WebhookEvent = {
3826
3800
  type PurchaseInfo = components['schemas']['SdkPurchaseResponse'];
3827
3801
  type AttachBusinessDetailsParams = {
3828
3802
  paymentIntentId: string;
3829
- customerRef?: string;
3830
- } & BusinessDetailsInput;
3831
- type AttachBusinessDetailsResult = {
3832
- taxBreakdown: TaxBreakdown;
3833
- };
3834
- type CheckLimitsRequest = components['schemas']['CheckLimitRequest'] & {
3835
- /**
3836
- * When `true`, the backend mints a checkout session (or customer
3837
- * portal session for activation flows) and returns its URL / id on
3838
- * the response. Default `false` so read-only callers like
3839
- * `useLimits` / `checkLimitsCore` stop creating orphan
3840
- * `CheckoutSession` documents and firing spurious
3841
- * `checkout_session.created` webhooks on every refetch.
3842
- *
3843
- * `paywall.decide()` opts in because it bakes the URL into the
3844
- * 402 `PaywallStructuredContent`.
3845
- *
3846
- * NOTE: this intersection is a temporary stand-in until the
3847
- * backend OpenAPI spec is republished and `generated.ts` is
3848
- * regenerated to include the field natively.
3849
- */
3850
- includeCheckoutSession?: boolean;
3851
- };
3803
+ } & components['schemas']['BusinessDetailsDto'];
3804
+ type AttachBusinessDetailsResult = components['schemas']['AttachBusinessDetailsResponse'];
3805
+ type CheckLimitsRequest = components['schemas']['CheckLimitRequest'];
3852
3806
  /**
3853
3807
  * Extended LimitResponse with SDK-added plan field.
3854
3808
  *
@@ -3875,19 +3829,7 @@ type CustomerResponseMapped = {
3875
3829
  plan?: string;
3876
3830
  purchases?: PurchaseInfo[];
3877
3831
  };
3878
- /**
3879
- * One-time purchase information returned from payment processing
3880
- */
3881
- interface OneTimePurchaseInfo {
3882
- reference: string;
3883
- customerRef: string;
3884
- productRef?: string;
3885
- amount: number;
3886
- currency: string;
3887
- creditsAdded?: number;
3888
- completedAt: string;
3889
- createdAt: string;
3890
- }
3832
+ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
3891
3833
  /**
3892
3834
  * Result from processing a payment intent.
3893
3835
  *
@@ -3972,71 +3914,11 @@ type ActivatePlanResult = components['schemas']['ActivatePlanResponseDto'];
3972
3914
  * `{ kind: 'card', ... } | { kind: 'none' }` discriminated union here.
3973
3915
  */
3974
3916
  type PaymentMethodInfo = operations['PaymentMethodSdkController_getPaymentMethod']['responses']['200']['content']['application/json'];
3975
- type AutoRechargeStatus = 'active' | 'disabled' | 'failed' | 'pending_setup';
3976
- type AutoRechargeConfig = {
3977
- enabled: boolean;
3978
- trigger: {
3979
- type: 'balance';
3980
- thresholdAmountMinor: number;
3981
- };
3982
- topup: {
3983
- mode: 'fixed';
3984
- amountMinor: number;
3985
- currency: string;
3986
- };
3987
- fundingSourceType?: 'saved_card' | 'tokenized_card';
3988
- paymentMethodId?: string;
3989
- status: AutoRechargeStatus;
3990
- failureCount: number;
3991
- maxMonthlySpendMinor?: number;
3992
- monthlySpendMinor: number;
3993
- monthlySpendPeriod?: string;
3994
- lastChargeAt?: string;
3995
- updatedAt?: string;
3996
- /** Backend-computed display values — render verbatim; do not derive from trigger fields. */
3997
- display?: AutoRechargeDisplayBlock;
3998
- };
3999
- type AutoRechargeDisplayBlock = {
4000
- thresholdAmountMajor: number;
4001
- topupAmountMajor: number;
4002
- currency: string;
4003
- formatted: {
4004
- threshold: string;
4005
- topup: string;
4006
- };
4007
- exchangeRate: number;
4008
- rateSource: 'parity' | 'db' | 'fallback';
4009
- };
4010
- type CreditDisplayBlock = {
4011
- amountMajor: number;
4012
- currency: string;
4013
- formatted: string;
4014
- exchangeRate: number;
4015
- rateSource: 'parity' | 'db' | 'fallback';
4016
- };
4017
- type AutoRechargeInput = {
4018
- enabled: boolean;
4019
- triggerType: 'balance';
4020
- thresholdAmountMajor?: number;
4021
- topupAmountMajor?: number;
4022
- maxMonthlySpendMajor?: number;
4023
- currency: string;
4024
- };
3917
+ type AutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName' | 'deferSetupIntent'>;
4025
3918
  /** PUT /sdk/auto-recharge — input plus request-only flags. */
4026
- type SaveAutoRechargeInput = AutoRechargeInput & {
4027
- deferSetupIntent?: boolean;
4028
- };
4029
- type AutoRechargeResponse = {
4030
- config: AutoRechargeConfig | null;
4031
- display?: AutoRechargeDisplayBlock;
4032
- };
4033
- type SaveAutoRechargeResponse = {
4034
- config: AutoRechargeConfig;
4035
- display?: AutoRechargeDisplayBlock;
4036
- setupClientSecret?: string;
4037
- publishableKey?: string;
4038
- stripeAccountId?: string;
4039
- };
3919
+ type SaveAutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName'>;
3920
+ type AutoRechargeResponse = components['schemas']['AutoRechargeGetResponse'];
3921
+ type SaveAutoRechargeResponse = components['schemas']['SaveAutoRechargeResponse'];
4040
3922
  /**
4041
3923
  * SDK-facing merchant identity (source: GET /v1/sdk/merchant).
4042
3924
  */
@@ -4070,40 +3952,9 @@ type McpBootstrapPlanInput = NonNullable<components['schemas']['McpBootstrapDto'
4070
3952
  type ToolPlanMappingInput = NonNullable<components['schemas']['McpBootstrapDto']['tools']>[number];
4071
3953
  type McpBootstrapRequest = components['schemas']['McpBootstrapDto'];
4072
3954
  type McpToolPlanMappingInput = NonNullable<components['schemas']['ConfigureMcpPlansDto']['toolMapping']>[number];
4073
- interface McpBootstrapResponse {
4074
- product: components['schemas']['SdkProductResponse'];
4075
- mcpServer: {
4076
- reference?: string;
4077
- subdomain?: string;
4078
- mcpProxyUrl?: string;
4079
- url: string;
4080
- defaultPlanRef?: string;
4081
- };
4082
- planMap: Record<string, {
4083
- reference: string;
4084
- name?: string;
4085
- }>;
4086
- toolsAutoMapped?: boolean;
4087
- autoMappedTools?: Array<{
4088
- name: string;
4089
- description?: string;
4090
- }>;
4091
- }
3955
+ type McpBootstrapResponse = components['schemas']['McpBootstrapResult'];
4092
3956
  type ConfigureMcpPlansRequest = components['schemas']['ConfigureMcpPlansDto'];
4093
- interface ConfigureMcpPlansResponse {
4094
- product: components['schemas']['SdkProductResponse'];
4095
- mcpServer: {
4096
- reference?: string;
4097
- subdomain?: string;
4098
- mcpProxyUrl?: string;
4099
- url: string;
4100
- defaultPlanRef?: string;
4101
- };
4102
- planMap: Record<string, {
4103
- reference: string;
4104
- name?: string;
4105
- }>;
4106
- }
3957
+ type ConfigureMcpPlansResponse = components['schemas']['ConfigureMcpPlansResult'];
4107
3958
  /**
4108
3959
  * SolvaPay API Client Interface
4109
3960
  *
@@ -4124,13 +3975,7 @@ interface SolvaPayClient {
4124
3975
  * `externalRef` on an existing email-matched customer, and exposed
4125
3976
  * directly for integrators who need it.
4126
3977
  */
4127
- updateCustomer?(customerRef: string, params: {
4128
- email?: string;
4129
- name?: string;
4130
- telephone?: string;
4131
- metadata?: Record<string, unknown>;
4132
- externalRef?: string;
4133
- }): Promise<{
3978
+ updateCustomer?(customerRef: string, params: components['schemas']['UpdateCustomerRequest']): Promise<{
4134
3979
  customerRef: string;
4135
3980
  }>;
4136
3981
  getCustomer(params: {
@@ -4154,75 +3999,37 @@ interface SolvaPayClient {
4154
3999
  */
4155
4000
  getPlatformConfig?(): Promise<SdkPlatformConfigResponse>;
4156
4001
  getProduct?(productRef: string): Promise<SdkProductResponse>;
4157
- listProducts?(): Promise<Array<{
4158
- reference: string;
4159
- name: string;
4160
- description?: string;
4161
- }>>;
4162
- createProduct?(params: components['schemas']['CreateProductRequest']): Promise<{
4163
- reference: string;
4164
- name: string;
4165
- }>;
4002
+ listProducts?(): Promise<components['schemas']['SdkProductResponse'][]>;
4003
+ createProduct?(params: components['schemas']['CreateProductRequest']): Promise<components['schemas']['SdkProductResponse']>;
4166
4004
  bootstrapMcpProduct?(params: McpBootstrapRequest): Promise<McpBootstrapResponse>;
4167
4005
  configureMcpPlans?(productRef: string, params: ConfigureMcpPlansRequest): Promise<ConfigureMcpPlansResponse>;
4168
4006
  updateProduct?(productRef: string, params: components['schemas']['UpdateProductRequest']): Promise<components['schemas']['SdkProductResponse']>;
4169
4007
  deleteProduct?(productRef: string): Promise<void>;
4170
- cloneProduct?(productRef: string, overrides?: {
4171
- name?: string;
4172
- }): Promise<{
4173
- reference: string;
4174
- name: string;
4175
- }>;
4008
+ cloneProduct?(productRef: string, overrides?: components['schemas']['CloneProductDto']): Promise<components['schemas']['SdkProductResponse']>;
4176
4009
  listPlans?(productRef: string): Promise<components['schemas']['Plan'][]>;
4177
4010
  createPlan?(params: components['schemas']['CreatePlanRequest'] & {
4178
4011
  productRef: string;
4179
4012
  }): Promise<components['schemas']['Plan']>;
4180
4013
  updatePlan?(productRef: string, planRef: string, params: components['schemas']['UpdatePlanRequest']): Promise<components['schemas']['Plan']>;
4181
4014
  deletePlan?(productRef: string, planRef: string): Promise<void>;
4182
- createPaymentIntent?(params: {
4183
- productRef: string;
4184
- planRef: string;
4185
- customerRef: string;
4186
- currency?: string;
4015
+ createPaymentIntent?(params: Omit<components['schemas']['CreatePaymentIntentDto'], 'purpose'> & {
4016
+ purpose?: components['schemas']['CreatePaymentIntentDto']['purpose'];
4187
4017
  idempotencyKey?: string;
4188
- }): Promise<{
4189
- processorPaymentId: string;
4190
- clientSecret: string;
4191
- publishableKey: string;
4192
- accountId?: string;
4193
- /** USD ledger amount in minor units. */
4194
- amount: number;
4195
- /** Presentment amount in minor units (matches `currency`). */
4196
- originalAmount?: number;
4197
- currency?: string;
4198
- exchangeRate?: number;
4199
- status?: string;
4200
- }>;
4201
- createTopupPaymentIntent?(params: {
4202
- customerRef: string;
4203
- amount: number;
4018
+ }): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4019
+ createTopupPaymentIntent?(params: Pick<components['schemas']['CreatePaymentIntentDto'], 'customerRef' | 'amount' | 'currency' | 'description' | 'autoRecharge'> & {
4204
4020
  currency: string;
4205
- description?: string;
4021
+ amount: number;
4206
4022
  idempotencyKey?: string;
4207
4023
  autoRecharge?: AutoRechargeInput;
4208
- }): Promise<{
4209
- processorPaymentId: string;
4210
- clientSecret: string;
4211
- publishableKey: string;
4212
- accountId?: string;
4213
- }>;
4214
- cancelPurchase?(params: {
4024
+ }): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4025
+ cancelPurchase?(params: components['schemas']['CancelPurchaseRequest'] & {
4215
4026
  purchaseRef: string;
4216
- reason?: string;
4217
4027
  }): Promise<PurchaseInfo>;
4218
4028
  reactivatePurchase?(params: {
4219
4029
  purchaseRef: string;
4220
4030
  }): Promise<PurchaseInfo>;
4221
- processPaymentIntent?(params: {
4031
+ processPaymentIntent?(params: components['schemas']['ProcessPaymentIntentDto'] & {
4222
4032
  paymentIntentId: string;
4223
- productRef?: string;
4224
- customerRef: string;
4225
- planRef?: string;
4226
4033
  }): Promise<ProcessPaymentResult>;
4227
4034
  attachBusinessDetails?(params: AttachBusinessDetailsParams): Promise<AttachBusinessDetailsResult>;
4228
4035
  getUserInfo?(params: {
@@ -4231,14 +4038,7 @@ interface SolvaPayClient {
4231
4038
  }): Promise<components['schemas']['UserInfoResponse']>;
4232
4039
  getCustomerBalance?(params: {
4233
4040
  customerRef: string;
4234
- }): Promise<{
4235
- customerRef: string;
4236
- credits: number;
4237
- displayCurrency: string;
4238
- creditsPerMinorUnit: number;
4239
- displayExchangeRate: number;
4240
- display?: CreditDisplayBlock;
4241
- }>;
4041
+ }): Promise<components['schemas']['CustomerBalanceResponse']>;
4242
4042
  createCheckoutSession(params: operations['CheckoutSessionSdkController_createCheckoutSession']['requestBody']['content']['application/json']): Promise<components['schemas']['CreateCheckoutSessionResponse']>;
4243
4043
  createCustomerSession(params: components['schemas']['CreateCustomerSessionRequest']): Promise<components['schemas']['CreateCustomerSessionResponse']>;
4244
4044
  activatePlan?(params: components['schemas']['ActivatePlanDto']): Promise<ActivatePlanResult>;
@@ -4253,9 +4053,7 @@ interface SolvaPayClient {
4253
4053
  }): Promise<SaveAutoRechargeResponse>;
4254
4054
  disableAutoRecharge?(params: {
4255
4055
  customerRef: string;
4256
- }): Promise<{
4257
- success: true;
4258
- }>;
4056
+ }): Promise<components['schemas']['DisableAutoRechargeResponse']>;
4259
4057
  }
4260
4058
 
4261
4059
  /**
@@ -5000,18 +4798,7 @@ interface SolvaPay {
5000
4798
  * // Use intent.clientSecret on the client to confirm payment
5001
4799
  * ```
5002
4800
  */
5003
- createPaymentIntent(params: {
5004
- productRef: string;
5005
- planRef: string;
5006
- customerRef: string;
5007
- currency?: string;
5008
- idempotencyKey?: string;
5009
- }): Promise<{
5010
- processorPaymentId: string;
5011
- clientSecret: string;
5012
- publishableKey: string;
5013
- accountId?: string;
5014
- }>;
4801
+ createPaymentIntent(params: Parameters<NonNullable<SolvaPayClient['createPaymentIntent']>>[0]): Promise<components['schemas']['SdkPaymentIntentResponse']>;
5015
4802
  /**
5016
4803
  * Create a payment intent for a credit top-up.
5017
4804
  *
@@ -5019,19 +4806,7 @@ interface SolvaPay {
5019
4806
  * Credits are recorded via webhook after payment confirmation — no
5020
4807
  * `processPaymentIntent` call is needed.
5021
4808
  */
5022
- createTopupPaymentIntent(params: {
5023
- customerRef: string;
5024
- amount: number;
5025
- currency: string;
5026
- description?: string;
5027
- idempotencyKey?: string;
5028
- autoRecharge?: AutoRechargeInput;
5029
- }): Promise<{
5030
- processorPaymentId: string;
5031
- clientSecret: string;
5032
- publishableKey: string;
5033
- accountId?: string;
5034
- }>;
4809
+ createTopupPaymentIntent(params: Parameters<NonNullable<SolvaPayClient['createTopupPaymentIntent']>>[0]): Promise<components['schemas']['SdkPaymentIntentResponse']>;
5035
4810
  /**
5036
4811
  * Process a payment intent after client-side payment confirmation.
5037
4812
  *
@@ -5070,17 +4845,7 @@ interface SolvaPay {
5070
4845
  * Attach business purchase details to a payment intent
5071
4846
  * and retrieve the computed tax breakdown.
5072
4847
  */
5073
- attachBusinessDetails(params: {
5074
- paymentIntentId: string;
5075
- customerRef?: string;
5076
- isBusiness: boolean;
5077
- businessName?: string;
5078
- country?: string;
5079
- taxId?: string;
5080
- taxIdType?: _solvapay_core.TaxIdType;
5081
- }): Promise<{
5082
- taxBreakdown: _solvapay_core.TaxBreakdown;
5083
- }>;
4848
+ attachBusinessDetails(params: AttachBusinessDetailsParams): Promise<AttachBusinessDetailsResult>;
5084
4849
  /**
5085
4850
  * Check if customer is within usage limits for a product.
5086
4851
  *
@@ -5221,13 +4986,7 @@ interface SolvaPay {
5221
4986
  */
5222
4987
  getCustomerBalance(params: {
5223
4988
  customerRef: string;
5224
- }): Promise<{
5225
- customerRef: string;
5226
- credits: number;
5227
- displayCurrency: string;
5228
- creditsPerMinorUnit: number;
5229
- displayExchangeRate: number;
5230
- }>;
4989
+ }): Promise<components['schemas']['CustomerBalanceResponse']>;
5231
4990
  /**
5232
4991
  * Create a hosted checkout session for a customer.
5233
4992
  *
@@ -5748,14 +5507,7 @@ declare function getAuthenticatedUserCore(request: Request, options?: {
5748
5507
  * Works with standard Web API Request (works everywhere).
5749
5508
  */
5750
5509
 
5751
- type CustomerBalanceResult = {
5752
- customerRef: string;
5753
- credits: number;
5754
- displayCurrency: string;
5755
- creditsPerMinorUnit: number;
5756
- displayExchangeRate: number;
5757
- display?: CreditDisplayBlock;
5758
- };
5510
+ type CustomerBalanceResult = components['schemas']['CustomerBalanceResponse'];
5759
5511
  /**
5760
5512
  * Sync customer with SolvaPay backend (ensure customer exists).
5761
5513
  *
@@ -6146,9 +5898,7 @@ type HelperOptions = {
6146
5898
  };
6147
5899
  declare function getAutoRechargeCore(request: Request, options?: HelperOptions): Promise<AutoRechargeResponse | ErrorResult>;
6148
5900
  declare function saveAutoRechargeCore(request: Request, input: AutoRechargeInput, options?: HelperOptions): Promise<SaveAutoRechargeResponse | ErrorResult>;
6149
- declare function disableAutoRechargeCore(request: Request, options?: HelperOptions): Promise<{
6150
- success: true;
6151
- } | ErrorResult>;
5901
+ declare function disableAutoRechargeCore(request: Request, options?: HelperOptions): Promise<components['schemas']['DisableAutoRechargeResponse'] | ErrorResult>;
6152
5902
 
6153
5903
  /**
6154
5904
  * Plans Helper (Core)
package/dist/edge.js CHANGED
@@ -2114,9 +2114,7 @@ function createSolvaPay(config) {
2114
2114
  },
2115
2115
  attachBusinessDetails(params) {
2116
2116
  if (!apiClient.attachBusinessDetails) {
2117
- throw new SolvaPayError4(
2118
- "attachBusinessDetails is not available on this API client"
2119
- );
2117
+ throw new SolvaPayError4("attachBusinessDetails is not available on this API client");
2120
2118
  }
2121
2119
  return apiClient.attachBusinessDetails(params);
2122
2120
  },
@@ -2261,9 +2261,7 @@ function createSolvaPay(config) {
2261
2261
  },
2262
2262
  attachBusinessDetails(params) {
2263
2263
  if (!apiClient.attachBusinessDetails) {
2264
- throw new import_core4.SolvaPayError(
2265
- "attachBusinessDetails is not available on this API client"
2266
- );
2264
+ throw new import_core4.SolvaPayError("attachBusinessDetails is not available on this API client");
2267
2265
  }
2268
2266
  return apiClient.attachBusinessDetails(params);
2269
2267
  },
@@ -331,12 +331,6 @@ interface components {
331
331
  /** @enum {string} */
332
332
  onEnd: 'convert' | 'cancel' | 'downgrade';
333
333
  requireCard?: boolean;
334
- } | {
335
- /** @enum {string} */
336
- kind: 'prepaid';
337
- label?: string;
338
- lowBalanceUnits?: number;
339
- minTopUpMinor?: number;
340
334
  } | {
341
335
  /** @enum {string} */
342
336
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -534,12 +528,6 @@ interface components {
534
528
  /** @enum {string} */
535
529
  onEnd: 'convert' | 'cancel' | 'downgrade';
536
530
  requireCard?: boolean;
537
- } | {
538
- /** @enum {string} */
539
- kind: 'prepaid';
540
- label?: string;
541
- lowBalanceUnits?: number;
542
- minTopUpMinor?: number;
543
531
  } | {
544
532
  /** @enum {string} */
545
533
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -630,7 +618,7 @@ interface components {
630
618
  * @example duplicate
631
619
  * @enum {string}
632
620
  */
633
- reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based';
621
+ reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based' | 'plan_billed_at_period_end';
634
622
  };
635
623
  CreditDebitSuccessResponse: {
636
624
  /**
@@ -679,7 +667,7 @@ interface components {
679
667
  * @example parity
680
668
  * @enum {string}
681
669
  */
682
- rateSource: 'parity' | 'db' | 'fallback';
670
+ rateSource: 'parity' | 'db' | 'fallback' | 'funding';
683
671
  };
684
672
  CustomerBalanceResponse: {
685
673
  /**
@@ -736,11 +724,10 @@ interface components {
736
724
  };
737
725
  DisableAutoRechargeResponse: {
738
726
  /**
739
- * Always true on success
727
+ * Whether auto-recharge was disabled
740
728
  * @example true
741
- * @enum {number}
742
729
  */
743
- success: true;
730
+ success: boolean;
744
731
  };
745
732
  GetCustomerSessionResponse: {
746
733
  /**
@@ -966,12 +953,6 @@ interface components {
966
953
  /** @enum {string} */
967
954
  onEnd: 'convert' | 'cancel' | 'downgrade';
968
955
  requireCard?: boolean;
969
- } | {
970
- /** @enum {string} */
971
- kind: 'prepaid';
972
- label?: string;
973
- lowBalanceUnits?: number;
974
- minTopUpMinor?: number;
975
956
  } | {
976
957
  /** @enum {string} */
977
958
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -1552,7 +1533,7 @@ interface components {
1552
1533
  [key: string]: unknown;
1553
1534
  } | null;
1554
1535
  /**
1555
- * Whether the frozen plan meters usage
1536
+ * Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
1556
1537
  * @example true
1557
1538
  */
1558
1539
  isMetered?: boolean;
@@ -1874,12 +1855,6 @@ interface components {
1874
1855
  /** @enum {string} */
1875
1856
  onEnd: 'convert' | 'cancel' | 'downgrade';
1876
1857
  requireCard?: boolean;
1877
- } | {
1878
- /** @enum {string} */
1879
- kind: 'prepaid';
1880
- label?: string;
1881
- lowBalanceUnits?: number;
1882
- minTopUpMinor?: number;
1883
1858
  } | {
1884
1859
  /** @enum {string} */
1885
1860
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';