@solvapay/server 2.2.1 → 2.2.2-preview-e0daec2e600e51dda2adb4993d7d551508ead29c

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 {
@@ -333,13 +332,6 @@ interface components {
333
332
  label?: string;
334
333
  /** @enum {string} */
335
334
  onEnd: 'convert' | 'cancel' | 'downgrade';
336
- requireCard?: boolean;
337
- } | {
338
- /** @enum {string} */
339
- kind: 'prepaid';
340
- label?: string;
341
- lowBalanceUnits?: number;
342
- minTopUpMinor?: number;
343
335
  } | {
344
336
  /** @enum {string} */
345
337
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -536,13 +528,6 @@ interface components {
536
528
  label?: string;
537
529
  /** @enum {string} */
538
530
  onEnd: 'convert' | 'cancel' | 'downgrade';
539
- requireCard?: boolean;
540
- } | {
541
- /** @enum {string} */
542
- kind: 'prepaid';
543
- label?: string;
544
- lowBalanceUnits?: number;
545
- minTopUpMinor?: number;
546
531
  } | {
547
532
  /** @enum {string} */
548
533
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -633,7 +618,7 @@ interface components {
633
618
  * @example duplicate
634
619
  * @enum {string}
635
620
  */
636
- 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';
637
622
  };
638
623
  CreditDebitSuccessResponse: {
639
624
  /**
@@ -682,7 +667,7 @@ interface components {
682
667
  * @example parity
683
668
  * @enum {string}
684
669
  */
685
- rateSource: 'parity' | 'db' | 'fallback';
670
+ rateSource: 'parity' | 'db' | 'fallback' | 'funding';
686
671
  };
687
672
  CustomerBalanceResponse: {
688
673
  /**
@@ -739,11 +724,10 @@ interface components {
739
724
  };
740
725
  DisableAutoRechargeResponse: {
741
726
  /**
742
- * Always true on success
727
+ * Whether auto-recharge was disabled
743
728
  * @example true
744
- * @enum {number}
745
729
  */
746
- success: true;
730
+ success: boolean;
747
731
  };
748
732
  GetCustomerSessionResponse: {
749
733
  /**
@@ -968,13 +952,6 @@ interface components {
968
952
  label?: string;
969
953
  /** @enum {string} */
970
954
  onEnd: 'convert' | 'cancel' | 'downgrade';
971
- requireCard?: boolean;
972
- } | {
973
- /** @enum {string} */
974
- kind: 'prepaid';
975
- label?: string;
976
- lowBalanceUnits?: number;
977
- minTopUpMinor?: number;
978
955
  } | {
979
956
  /** @enum {string} */
980
957
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -1555,7 +1532,7 @@ interface components {
1555
1532
  [key: string]: unknown;
1556
1533
  } | null;
1557
1534
  /**
1558
- * Whether the frozen plan meters usage
1535
+ * Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
1559
1536
  * @example true
1560
1537
  */
1561
1538
  isMetered?: boolean;
@@ -1876,13 +1853,6 @@ interface components {
1876
1853
  label?: string;
1877
1854
  /** @enum {string} */
1878
1855
  onEnd: 'convert' | 'cancel' | 'downgrade';
1879
- requireCard?: boolean;
1880
- } | {
1881
- /** @enum {string} */
1882
- kind: 'prepaid';
1883
- label?: string;
1884
- lowBalanceUnits?: number;
1885
- minTopUpMinor?: number;
1886
1856
  } | {
1887
1857
  /** @enum {string} */
1888
1858
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -3826,29 +3796,9 @@ type WebhookEvent = {
3826
3796
  type PurchaseInfo = components['schemas']['SdkPurchaseResponse'];
3827
3797
  type AttachBusinessDetailsParams = {
3828
3798
  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
- };
3799
+ } & components['schemas']['BusinessDetailsDto'];
3800
+ type AttachBusinessDetailsResult = components['schemas']['AttachBusinessDetailsResponse'];
3801
+ type CheckLimitsRequest = components['schemas']['CheckLimitRequest'];
3852
3802
  /**
3853
3803
  * Extended LimitResponse with SDK-added plan field.
3854
3804
  *
@@ -3875,19 +3825,7 @@ type CustomerResponseMapped = {
3875
3825
  plan?: string;
3876
3826
  purchases?: PurchaseInfo[];
3877
3827
  };
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
- }
3828
+ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
3891
3829
  /**
3892
3830
  * Result from processing a payment intent.
3893
3831
  *
@@ -3972,71 +3910,11 @@ type ActivatePlanResult = components['schemas']['ActivatePlanResponseDto'];
3972
3910
  * `{ kind: 'card', ... } | { kind: 'none' }` discriminated union here.
3973
3911
  */
3974
3912
  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
- };
3913
+ type AutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName' | 'deferSetupIntent'>;
4025
3914
  /** 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
- };
3915
+ type SaveAutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName'>;
3916
+ type AutoRechargeResponse = components['schemas']['AutoRechargeGetResponse'];
3917
+ type SaveAutoRechargeResponse = components['schemas']['SaveAutoRechargeResponse'];
4040
3918
  /**
4041
3919
  * SDK-facing merchant identity (source: GET /v1/sdk/merchant).
4042
3920
  */
@@ -4070,40 +3948,9 @@ type McpBootstrapPlanInput = NonNullable<components['schemas']['McpBootstrapDto'
4070
3948
  type ToolPlanMappingInput = NonNullable<components['schemas']['McpBootstrapDto']['tools']>[number];
4071
3949
  type McpBootstrapRequest = components['schemas']['McpBootstrapDto'];
4072
3950
  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
- }
3951
+ type McpBootstrapResponse = components['schemas']['McpBootstrapResult'];
4092
3952
  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
- }
3953
+ type ConfigureMcpPlansResponse = components['schemas']['ConfigureMcpPlansResult'];
4107
3954
  /**
4108
3955
  * SolvaPay API Client Interface
4109
3956
  *
@@ -4124,13 +3971,7 @@ interface SolvaPayClient {
4124
3971
  * `externalRef` on an existing email-matched customer, and exposed
4125
3972
  * directly for integrators who need it.
4126
3973
  */
4127
- updateCustomer?(customerRef: string, params: {
4128
- email?: string;
4129
- name?: string;
4130
- telephone?: string;
4131
- metadata?: Record<string, unknown>;
4132
- externalRef?: string;
4133
- }): Promise<{
3974
+ updateCustomer?(customerRef: string, params: components['schemas']['UpdateCustomerRequest']): Promise<{
4134
3975
  customerRef: string;
4135
3976
  }>;
4136
3977
  getCustomer(params: {
@@ -4154,75 +3995,37 @@ interface SolvaPayClient {
4154
3995
  */
4155
3996
  getPlatformConfig?(): Promise<SdkPlatformConfigResponse>;
4156
3997
  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
- }>;
3998
+ listProducts?(): Promise<components['schemas']['SdkProductResponse'][]>;
3999
+ createProduct?(params: components['schemas']['CreateProductRequest']): Promise<components['schemas']['SdkProductResponse']>;
4166
4000
  bootstrapMcpProduct?(params: McpBootstrapRequest): Promise<McpBootstrapResponse>;
4167
4001
  configureMcpPlans?(productRef: string, params: ConfigureMcpPlansRequest): Promise<ConfigureMcpPlansResponse>;
4168
4002
  updateProduct?(productRef: string, params: components['schemas']['UpdateProductRequest']): Promise<components['schemas']['SdkProductResponse']>;
4169
4003
  deleteProduct?(productRef: string): Promise<void>;
4170
- cloneProduct?(productRef: string, overrides?: {
4171
- name?: string;
4172
- }): Promise<{
4173
- reference: string;
4174
- name: string;
4175
- }>;
4004
+ cloneProduct?(productRef: string, overrides?: components['schemas']['CloneProductDto']): Promise<components['schemas']['SdkProductResponse']>;
4176
4005
  listPlans?(productRef: string): Promise<components['schemas']['Plan'][]>;
4177
4006
  createPlan?(params: components['schemas']['CreatePlanRequest'] & {
4178
4007
  productRef: string;
4179
4008
  }): Promise<components['schemas']['Plan']>;
4180
4009
  updatePlan?(productRef: string, planRef: string, params: components['schemas']['UpdatePlanRequest']): Promise<components['schemas']['Plan']>;
4181
4010
  deletePlan?(productRef: string, planRef: string): Promise<void>;
4182
- createPaymentIntent?(params: {
4183
- productRef: string;
4184
- planRef: string;
4185
- customerRef: string;
4186
- currency?: string;
4011
+ createPaymentIntent?(params: Omit<components['schemas']['CreatePaymentIntentDto'], 'purpose'> & {
4012
+ purpose?: components['schemas']['CreatePaymentIntentDto']['purpose'];
4187
4013
  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;
4014
+ }): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4015
+ createTopupPaymentIntent?(params: Pick<components['schemas']['CreatePaymentIntentDto'], 'customerRef' | 'amount' | 'currency' | 'description' | 'autoRecharge'> & {
4204
4016
  currency: string;
4205
- description?: string;
4017
+ amount: number;
4206
4018
  idempotencyKey?: string;
4207
4019
  autoRecharge?: AutoRechargeInput;
4208
- }): Promise<{
4209
- processorPaymentId: string;
4210
- clientSecret: string;
4211
- publishableKey: string;
4212
- accountId?: string;
4213
- }>;
4214
- cancelPurchase?(params: {
4020
+ }): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4021
+ cancelPurchase?(params: components['schemas']['CancelPurchaseRequest'] & {
4215
4022
  purchaseRef: string;
4216
- reason?: string;
4217
4023
  }): Promise<PurchaseInfo>;
4218
4024
  reactivatePurchase?(params: {
4219
4025
  purchaseRef: string;
4220
4026
  }): Promise<PurchaseInfo>;
4221
- processPaymentIntent?(params: {
4027
+ processPaymentIntent?(params: components['schemas']['ProcessPaymentIntentDto'] & {
4222
4028
  paymentIntentId: string;
4223
- productRef?: string;
4224
- customerRef: string;
4225
- planRef?: string;
4226
4029
  }): Promise<ProcessPaymentResult>;
4227
4030
  attachBusinessDetails?(params: AttachBusinessDetailsParams): Promise<AttachBusinessDetailsResult>;
4228
4031
  getUserInfo?(params: {
@@ -4231,14 +4034,7 @@ interface SolvaPayClient {
4231
4034
  }): Promise<components['schemas']['UserInfoResponse']>;
4232
4035
  getCustomerBalance?(params: {
4233
4036
  customerRef: string;
4234
- }): Promise<{
4235
- customerRef: string;
4236
- credits: number;
4237
- displayCurrency: string;
4238
- creditsPerMinorUnit: number;
4239
- displayExchangeRate: number;
4240
- display?: CreditDisplayBlock;
4241
- }>;
4037
+ }): Promise<components['schemas']['CustomerBalanceResponse']>;
4242
4038
  createCheckoutSession(params: operations['CheckoutSessionSdkController_createCheckoutSession']['requestBody']['content']['application/json']): Promise<components['schemas']['CreateCheckoutSessionResponse']>;
4243
4039
  createCustomerSession(params: components['schemas']['CreateCustomerSessionRequest']): Promise<components['schemas']['CreateCustomerSessionResponse']>;
4244
4040
  activatePlan?(params: components['schemas']['ActivatePlanDto']): Promise<ActivatePlanResult>;
@@ -4253,9 +4049,7 @@ interface SolvaPayClient {
4253
4049
  }): Promise<SaveAutoRechargeResponse>;
4254
4050
  disableAutoRecharge?(params: {
4255
4051
  customerRef: string;
4256
- }): Promise<{
4257
- success: true;
4258
- }>;
4052
+ }): Promise<components['schemas']['DisableAutoRechargeResponse']>;
4259
4053
  }
4260
4054
 
4261
4055
  /**
@@ -5000,18 +4794,7 @@ interface SolvaPay {
5000
4794
  * // Use intent.clientSecret on the client to confirm payment
5001
4795
  * ```
5002
4796
  */
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
- }>;
4797
+ createPaymentIntent(params: Parameters<NonNullable<SolvaPayClient['createPaymentIntent']>>[0]): Promise<components['schemas']['SdkPaymentIntentResponse']>;
5015
4798
  /**
5016
4799
  * Create a payment intent for a credit top-up.
5017
4800
  *
@@ -5019,19 +4802,7 @@ interface SolvaPay {
5019
4802
  * Credits are recorded via webhook after payment confirmation — no
5020
4803
  * `processPaymentIntent` call is needed.
5021
4804
  */
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
- }>;
4805
+ createTopupPaymentIntent(params: Parameters<NonNullable<SolvaPayClient['createTopupPaymentIntent']>>[0]): Promise<components['schemas']['SdkPaymentIntentResponse']>;
5035
4806
  /**
5036
4807
  * Process a payment intent after client-side payment confirmation.
5037
4808
  *
@@ -5070,17 +4841,7 @@ interface SolvaPay {
5070
4841
  * Attach business purchase details to a payment intent
5071
4842
  * and retrieve the computed tax breakdown.
5072
4843
  */
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
- }>;
4844
+ attachBusinessDetails(params: AttachBusinessDetailsParams): Promise<AttachBusinessDetailsResult>;
5084
4845
  /**
5085
4846
  * Check if customer is within usage limits for a product.
5086
4847
  *
@@ -5221,13 +4982,7 @@ interface SolvaPay {
5221
4982
  */
5222
4983
  getCustomerBalance(params: {
5223
4984
  customerRef: string;
5224
- }): Promise<{
5225
- customerRef: string;
5226
- credits: number;
5227
- displayCurrency: string;
5228
- creditsPerMinorUnit: number;
5229
- displayExchangeRate: number;
5230
- }>;
4985
+ }): Promise<components['schemas']['CustomerBalanceResponse']>;
5231
4986
  /**
5232
4987
  * Create a hosted checkout session for a customer.
5233
4988
  *
@@ -5748,14 +5503,7 @@ declare function getAuthenticatedUserCore(request: Request, options?: {
5748
5503
  * Works with standard Web API Request (works everywhere).
5749
5504
  */
5750
5505
 
5751
- type CustomerBalanceResult = {
5752
- customerRef: string;
5753
- credits: number;
5754
- displayCurrency: string;
5755
- creditsPerMinorUnit: number;
5756
- displayExchangeRate: number;
5757
- display?: CreditDisplayBlock;
5758
- };
5506
+ type CustomerBalanceResult = components['schemas']['CustomerBalanceResponse'];
5759
5507
  /**
5760
5508
  * Sync customer with SolvaPay backend (ensure customer exists).
5761
5509
  *
@@ -6146,9 +5894,7 @@ type HelperOptions = {
6146
5894
  };
6147
5895
  declare function getAutoRechargeCore(request: Request, options?: HelperOptions): Promise<AutoRechargeResponse | ErrorResult>;
6148
5896
  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>;
5897
+ declare function disableAutoRechargeCore(request: Request, options?: HelperOptions): Promise<components['schemas']['DisableAutoRechargeResponse'] | ErrorResult>;
6152
5898
 
6153
5899
  /**
6154
5900
  * 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
  },
@@ -330,13 +330,6 @@ interface components {
330
330
  label?: string;
331
331
  /** @enum {string} */
332
332
  onEnd: 'convert' | 'cancel' | 'downgrade';
333
- requireCard?: boolean;
334
- } | {
335
- /** @enum {string} */
336
- kind: 'prepaid';
337
- label?: string;
338
- lowBalanceUnits?: number;
339
- minTopUpMinor?: number;
340
333
  } | {
341
334
  /** @enum {string} */
342
335
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -533,13 +526,6 @@ interface components {
533
526
  label?: string;
534
527
  /** @enum {string} */
535
528
  onEnd: 'convert' | 'cancel' | 'downgrade';
536
- requireCard?: boolean;
537
- } | {
538
- /** @enum {string} */
539
- kind: 'prepaid';
540
- label?: string;
541
- lowBalanceUnits?: number;
542
- minTopUpMinor?: number;
543
529
  } | {
544
530
  /** @enum {string} */
545
531
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -630,7 +616,7 @@ interface components {
630
616
  * @example duplicate
631
617
  * @enum {string}
632
618
  */
633
- reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based';
619
+ reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based' | 'plan_billed_at_period_end';
634
620
  };
635
621
  CreditDebitSuccessResponse: {
636
622
  /**
@@ -679,7 +665,7 @@ interface components {
679
665
  * @example parity
680
666
  * @enum {string}
681
667
  */
682
- rateSource: 'parity' | 'db' | 'fallback';
668
+ rateSource: 'parity' | 'db' | 'fallback' | 'funding';
683
669
  };
684
670
  CustomerBalanceResponse: {
685
671
  /**
@@ -736,11 +722,10 @@ interface components {
736
722
  };
737
723
  DisableAutoRechargeResponse: {
738
724
  /**
739
- * Always true on success
725
+ * Whether auto-recharge was disabled
740
726
  * @example true
741
- * @enum {number}
742
727
  */
743
- success: true;
728
+ success: boolean;
744
729
  };
745
730
  GetCustomerSessionResponse: {
746
731
  /**
@@ -965,13 +950,6 @@ interface components {
965
950
  label?: string;
966
951
  /** @enum {string} */
967
952
  onEnd: 'convert' | 'cancel' | 'downgrade';
968
- requireCard?: boolean;
969
- } | {
970
- /** @enum {string} */
971
- kind: 'prepaid';
972
- label?: string;
973
- lowBalanceUnits?: number;
974
- minTopUpMinor?: number;
975
953
  } | {
976
954
  /** @enum {string} */
977
955
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -1552,7 +1530,7 @@ interface components {
1552
1530
  [key: string]: unknown;
1553
1531
  } | null;
1554
1532
  /**
1555
- * Whether the frozen plan meters usage
1533
+ * Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
1556
1534
  * @example true
1557
1535
  */
1558
1536
  isMetered?: boolean;
@@ -1873,13 +1851,6 @@ interface components {
1873
1851
  label?: string;
1874
1852
  /** @enum {string} */
1875
1853
  onEnd: 'convert' | 'cancel' | 'downgrade';
1876
- requireCard?: boolean;
1877
- } | {
1878
- /** @enum {string} */
1879
- kind: 'prepaid';
1880
- label?: string;
1881
- lowBalanceUnits?: number;
1882
- minTopUpMinor?: number;
1883
1854
  } | {
1884
1855
  /** @enum {string} */
1885
1856
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';