@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/index.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,21 @@ 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;
3913
+ /**
3914
+ * Stored auto-recharge config. `display` is an SDK-side merge of the
3915
+ * sibling `AutoRechargeGetResponse.display` block so consumers can read
3916
+ * formatted amounts off the config object.
3917
+ */
3918
+ type AutoRechargeConfig = components['schemas']['AutoRechargeConfigDto'] & {
3919
+ display?: components['schemas']['AutoRechargeDisplayDto'];
4024
3920
  };
3921
+ type AutoRechargeDisplayBlock = components['schemas']['AutoRechargeDisplayDto'];
3922
+ type CreditDisplayBlock = components['schemas']['CustomerBalanceDisplayDto'];
3923
+ type AutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName' | 'deferSetupIntent'>;
4025
3924
  /** 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
- };
3925
+ type SaveAutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName'>;
3926
+ type AutoRechargeResponse = components['schemas']['AutoRechargeGetResponse'];
3927
+ type SaveAutoRechargeResponse = components['schemas']['SaveAutoRechargeResponse'];
4040
3928
  /**
4041
3929
  * SDK-facing merchant identity (source: GET /v1/sdk/merchant).
4042
3930
  */
@@ -4072,40 +3960,9 @@ type McpBootstrapPlanInput = NonNullable<components['schemas']['McpBootstrapDto'
4072
3960
  type ToolPlanMappingInput = NonNullable<components['schemas']['McpBootstrapDto']['tools']>[number];
4073
3961
  type McpBootstrapRequest = components['schemas']['McpBootstrapDto'];
4074
3962
  type McpToolPlanMappingInput = NonNullable<components['schemas']['ConfigureMcpPlansDto']['toolMapping']>[number];
4075
- interface McpBootstrapResponse {
4076
- product: components['schemas']['SdkProductResponse'];
4077
- mcpServer: {
4078
- reference?: string;
4079
- subdomain?: string;
4080
- mcpProxyUrl?: string;
4081
- url: string;
4082
- defaultPlanRef?: string;
4083
- };
4084
- planMap: Record<string, {
4085
- reference: string;
4086
- name?: string;
4087
- }>;
4088
- toolsAutoMapped?: boolean;
4089
- autoMappedTools?: Array<{
4090
- name: string;
4091
- description?: string;
4092
- }>;
4093
- }
3963
+ type McpBootstrapResponse = components['schemas']['McpBootstrapResult'];
4094
3964
  type ConfigureMcpPlansRequest = components['schemas']['ConfigureMcpPlansDto'];
4095
- interface ConfigureMcpPlansResponse {
4096
- product: components['schemas']['SdkProductResponse'];
4097
- mcpServer: {
4098
- reference?: string;
4099
- subdomain?: string;
4100
- mcpProxyUrl?: string;
4101
- url: string;
4102
- defaultPlanRef?: string;
4103
- };
4104
- planMap: Record<string, {
4105
- reference: string;
4106
- name?: string;
4107
- }>;
4108
- }
3965
+ type ConfigureMcpPlansResponse = components['schemas']['ConfigureMcpPlansResult'];
4109
3966
  /**
4110
3967
  * SolvaPay API Client Interface
4111
3968
  *
@@ -4126,13 +3983,7 @@ interface SolvaPayClient {
4126
3983
  * `externalRef` on an existing email-matched customer, and exposed
4127
3984
  * directly for integrators who need it.
4128
3985
  */
4129
- updateCustomer?(customerRef: string, params: {
4130
- email?: string;
4131
- name?: string;
4132
- telephone?: string;
4133
- metadata?: Record<string, unknown>;
4134
- externalRef?: string;
4135
- }): Promise<{
3986
+ updateCustomer?(customerRef: string, params: components['schemas']['UpdateCustomerRequest']): Promise<{
4136
3987
  customerRef: string;
4137
3988
  }>;
4138
3989
  getCustomer(params: {
@@ -4156,75 +4007,37 @@ interface SolvaPayClient {
4156
4007
  */
4157
4008
  getPlatformConfig?(): Promise<SdkPlatformConfigResponse>;
4158
4009
  getProduct?(productRef: string): Promise<SdkProductResponse>;
4159
- listProducts?(): Promise<Array<{
4160
- reference: string;
4161
- name: string;
4162
- description?: string;
4163
- }>>;
4164
- createProduct?(params: components['schemas']['CreateProductRequest']): Promise<{
4165
- reference: string;
4166
- name: string;
4167
- }>;
4010
+ listProducts?(): Promise<components['schemas']['SdkProductResponse'][]>;
4011
+ createProduct?(params: components['schemas']['CreateProductRequest']): Promise<components['schemas']['SdkProductResponse']>;
4168
4012
  bootstrapMcpProduct?(params: McpBootstrapRequest): Promise<McpBootstrapResponse>;
4169
4013
  configureMcpPlans?(productRef: string, params: ConfigureMcpPlansRequest): Promise<ConfigureMcpPlansResponse>;
4170
4014
  updateProduct?(productRef: string, params: components['schemas']['UpdateProductRequest']): Promise<components['schemas']['SdkProductResponse']>;
4171
4015
  deleteProduct?(productRef: string): Promise<void>;
4172
- cloneProduct?(productRef: string, overrides?: {
4173
- name?: string;
4174
- }): Promise<{
4175
- reference: string;
4176
- name: string;
4177
- }>;
4016
+ cloneProduct?(productRef: string, overrides?: components['schemas']['CloneProductDto']): Promise<components['schemas']['SdkProductResponse']>;
4178
4017
  listPlans?(productRef: string): Promise<components['schemas']['Plan'][]>;
4179
4018
  createPlan?(params: components['schemas']['CreatePlanRequest'] & {
4180
4019
  productRef: string;
4181
4020
  }): Promise<components['schemas']['Plan']>;
4182
4021
  updatePlan?(productRef: string, planRef: string, params: components['schemas']['UpdatePlanRequest']): Promise<components['schemas']['Plan']>;
4183
4022
  deletePlan?(productRef: string, planRef: string): Promise<void>;
4184
- createPaymentIntent?(params: {
4185
- productRef: string;
4186
- planRef: string;
4187
- customerRef: string;
4188
- currency?: string;
4023
+ createPaymentIntent?(params: Omit<components['schemas']['CreatePaymentIntentDto'], 'purpose'> & {
4024
+ purpose?: components['schemas']['CreatePaymentIntentDto']['purpose'];
4189
4025
  idempotencyKey?: string;
4190
- }): Promise<{
4191
- processorPaymentId: string;
4192
- clientSecret: string;
4193
- publishableKey: string;
4194
- accountId?: string;
4195
- /** USD ledger amount in minor units. */
4196
- amount: number;
4197
- /** Presentment amount in minor units (matches `currency`). */
4198
- originalAmount?: number;
4199
- currency?: string;
4200
- exchangeRate?: number;
4201
- status?: string;
4202
- }>;
4203
- createTopupPaymentIntent?(params: {
4204
- customerRef: string;
4205
- amount: number;
4026
+ }): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4027
+ createTopupPaymentIntent?(params: Pick<components['schemas']['CreatePaymentIntentDto'], 'customerRef' | 'amount' | 'currency' | 'description' | 'autoRecharge'> & {
4206
4028
  currency: string;
4207
- description?: string;
4029
+ amount: number;
4208
4030
  idempotencyKey?: string;
4209
4031
  autoRecharge?: AutoRechargeInput;
4210
- }): Promise<{
4211
- processorPaymentId: string;
4212
- clientSecret: string;
4213
- publishableKey: string;
4214
- accountId?: string;
4215
- }>;
4216
- cancelPurchase?(params: {
4032
+ }): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4033
+ cancelPurchase?(params: components['schemas']['CancelPurchaseRequest'] & {
4217
4034
  purchaseRef: string;
4218
- reason?: string;
4219
4035
  }): Promise<PurchaseInfo>;
4220
4036
  reactivatePurchase?(params: {
4221
4037
  purchaseRef: string;
4222
4038
  }): Promise<PurchaseInfo>;
4223
- processPaymentIntent?(params: {
4039
+ processPaymentIntent?(params: components['schemas']['ProcessPaymentIntentDto'] & {
4224
4040
  paymentIntentId: string;
4225
- productRef?: string;
4226
- customerRef: string;
4227
- planRef?: string;
4228
4041
  }): Promise<ProcessPaymentResult>;
4229
4042
  attachBusinessDetails?(params: AttachBusinessDetailsParams): Promise<AttachBusinessDetailsResult>;
4230
4043
  getUserInfo?(params: {
@@ -4233,14 +4046,7 @@ interface SolvaPayClient {
4233
4046
  }): Promise<components['schemas']['UserInfoResponse']>;
4234
4047
  getCustomerBalance?(params: {
4235
4048
  customerRef: string;
4236
- }): Promise<{
4237
- customerRef: string;
4238
- credits: number;
4239
- displayCurrency: string;
4240
- creditsPerMinorUnit: number;
4241
- displayExchangeRate: number;
4242
- display?: CreditDisplayBlock;
4243
- }>;
4049
+ }): Promise<components['schemas']['CustomerBalanceResponse']>;
4244
4050
  createCheckoutSession(params: operations['CheckoutSessionSdkController_createCheckoutSession']['requestBody']['content']['application/json']): Promise<components['schemas']['CreateCheckoutSessionResponse']>;
4245
4051
  createCustomerSession(params: components['schemas']['CreateCustomerSessionRequest']): Promise<components['schemas']['CreateCustomerSessionResponse']>;
4246
4052
  activatePlan?(params: components['schemas']['ActivatePlanDto']): Promise<ActivatePlanResult>;
@@ -4255,9 +4061,7 @@ interface SolvaPayClient {
4255
4061
  }): Promise<SaveAutoRechargeResponse>;
4256
4062
  disableAutoRecharge?(params: {
4257
4063
  customerRef: string;
4258
- }): Promise<{
4259
- success: true;
4260
- }>;
4064
+ }): Promise<components['schemas']['DisableAutoRechargeResponse']>;
4261
4065
  }
4262
4066
 
4263
4067
  /**
@@ -4930,18 +4734,7 @@ interface SolvaPay {
4930
4734
  * // Use intent.clientSecret on the client to confirm payment
4931
4735
  * ```
4932
4736
  */
4933
- createPaymentIntent(params: {
4934
- productRef: string;
4935
- planRef: string;
4936
- customerRef: string;
4937
- currency?: string;
4938
- idempotencyKey?: string;
4939
- }): Promise<{
4940
- processorPaymentId: string;
4941
- clientSecret: string;
4942
- publishableKey: string;
4943
- accountId?: string;
4944
- }>;
4737
+ createPaymentIntent(params: Parameters<NonNullable<SolvaPayClient['createPaymentIntent']>>[0]): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4945
4738
  /**
4946
4739
  * Create a payment intent for a credit top-up.
4947
4740
  *
@@ -4949,19 +4742,7 @@ interface SolvaPay {
4949
4742
  * Credits are recorded via webhook after payment confirmation — no
4950
4743
  * `processPaymentIntent` call is needed.
4951
4744
  */
4952
- createTopupPaymentIntent(params: {
4953
- customerRef: string;
4954
- amount: number;
4955
- currency: string;
4956
- description?: string;
4957
- idempotencyKey?: string;
4958
- autoRecharge?: AutoRechargeInput;
4959
- }): Promise<{
4960
- processorPaymentId: string;
4961
- clientSecret: string;
4962
- publishableKey: string;
4963
- accountId?: string;
4964
- }>;
4745
+ createTopupPaymentIntent(params: Parameters<NonNullable<SolvaPayClient['createTopupPaymentIntent']>>[0]): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4965
4746
  /**
4966
4747
  * Process a payment intent after client-side payment confirmation.
4967
4748
  *
@@ -5000,17 +4781,7 @@ interface SolvaPay {
5000
4781
  * Attach business purchase details to a payment intent
5001
4782
  * and retrieve the computed tax breakdown.
5002
4783
  */
5003
- attachBusinessDetails(params: {
5004
- paymentIntentId: string;
5005
- customerRef?: string;
5006
- isBusiness: boolean;
5007
- businessName?: string;
5008
- country?: string;
5009
- taxId?: string;
5010
- taxIdType?: _solvapay_core.TaxIdType;
5011
- }): Promise<{
5012
- taxBreakdown: _solvapay_core.TaxBreakdown;
5013
- }>;
4784
+ attachBusinessDetails(params: AttachBusinessDetailsParams): Promise<AttachBusinessDetailsResult>;
5014
4785
  /**
5015
4786
  * Check if customer is within usage limits for a product.
5016
4787
  *
@@ -5151,13 +4922,7 @@ interface SolvaPay {
5151
4922
  */
5152
4923
  getCustomerBalance(params: {
5153
4924
  customerRef: string;
5154
- }): Promise<{
5155
- customerRef: string;
5156
- credits: number;
5157
- displayCurrency: string;
5158
- creditsPerMinorUnit: number;
5159
- displayExchangeRate: number;
5160
- }>;
4925
+ }): Promise<components['schemas']['CustomerBalanceResponse']>;
5161
4926
  /**
5162
4927
  * Create a hosted checkout session for a customer.
5163
4928
  *
@@ -5797,14 +5562,7 @@ declare function getAuthenticatedUserCore(request: Request, options?: {
5797
5562
  * Works with standard Web API Request (works everywhere).
5798
5563
  */
5799
5564
 
5800
- type CustomerBalanceResult = {
5801
- customerRef: string;
5802
- credits: number;
5803
- displayCurrency: string;
5804
- creditsPerMinorUnit: number;
5805
- displayExchangeRate: number;
5806
- display?: CreditDisplayBlock;
5807
- };
5565
+ type CustomerBalanceResult = components['schemas']['CustomerBalanceResponse'];
5808
5566
  /**
5809
5567
  * Sync customer with SolvaPay backend (ensure customer exists).
5810
5568
  *
@@ -6195,9 +5953,7 @@ type HelperOptions = {
6195
5953
  };
6196
5954
  declare function getAutoRechargeCore(request: Request, options?: HelperOptions): Promise<AutoRechargeResponse | ErrorResult>;
6197
5955
  declare function saveAutoRechargeCore(request: Request, input: AutoRechargeInput, options?: HelperOptions): Promise<SaveAutoRechargeResponse | ErrorResult>;
6198
- declare function disableAutoRechargeCore(request: Request, options?: HelperOptions): Promise<{
6199
- success: true;
6200
- } | ErrorResult>;
5956
+ declare function disableAutoRechargeCore(request: Request, options?: HelperOptions): Promise<components['schemas']['DisableAutoRechargeResponse'] | ErrorResult>;
6201
5957
 
6202
5958
  /**
6203
5959
  * Plans Helper (Core)
@@ -6393,4 +6149,4 @@ declare function verifyWebhook({ body, signature, secret, }: {
6393
6149
  secret: string;
6394
6150
  }): WebhookEvent;
6395
6151
 
6396
- export { type ActivatePlanResult, type AssignCreditsRequest, type AssignCreditsResponse, type AuthenticatedUser, type AutoRechargeConfig, type AutoRechargeDisplayBlock, type AutoRechargeInput, type AutoRechargeResponse, BALANCE_RECONCILE_DELAYS_MS, type ConfigureMcpPlansRequest, type ConfigureMcpPlansResponse, type CreateSolvaPayConfig, type CreditDebitResult, type CreditDebitSkipReason, type CreditDisplayBlock, type CustomerBalanceResult, type CustomerResponseMapped, type CustomerWebhookObject, type ErrorResult, type GetUsageResult, type HttpAdapterOptions, type LimitActivationBalance, type LimitActivationProduct, type LimitPlanSummary, type LimitResponseWithPlan, type McpBootstrapPlanInput, type McpBootstrapRequest, type McpBootstrapResponse, type McpServerLike, type McpToolPlanMappingInput, type NextAdapterOptions, type OneTimePurchaseInfo, type PayableAllowResult, type PayableFunction, type PayableGateOptions, type PayableGateResult, type PayableOptions, type PayablePaywallResult, type PaymentMethodInfo, type PaywallArgs, type PaywallDecision, PaywallError, type PaywallMetadata, type PaywallState, type PaywallStructuredContent, type ProcessPaymentResult, type ProductConfigurationStatus, type ProtectHandlerContext, type PurchaseCheckResult, type PurchaseInfo, type RegisterVirtualToolsMcpOptions, type RetryOptions, type SaveAutoRechargeInput, type SaveAutoRechargeResponse, type SdkMerchantResponse, type SdkProductResponse, type ServerClientOptions, type SolvaPay, type SolvaPayClient, TOPUP_BALANCE_POLL_DELAYS_MS, type ToolPlanMappingInput, type TopupProcessResult, type TrackUsageBulkRequest, type TrackUsageBulkResponse, type TrackUsageRequest, type TrackUsageResponse, VIRTUAL_TOOL_DEFINITIONS, type VerifyProductConfigurationOptions, type VirtualToolDefinition, type VirtualToolsOptions, type WebhookEvent, type WebhookEventForType, type WebhookEventObjectMap, type WebhookEventType, type WebhookProduct, activatePlanCore, attachBusinessDetailsCore, buildGateMessage, buildNudgeMessage, buildPaywallGate, cancelPurchaseCore, checkLimitsCore, checkPurchaseCore, classifyPaywallState, type components, createCheckoutSessionCore, createCustomerSessionCore, createPaymentIntentCore, createSolvaPay, createSolvaPayClient, createTopupPaymentIntentCore, createVirtualTools, disableAutoRechargeCore, getAuthenticatedUserCore, getAutoRechargeCore, getCustomerBalanceCore, getMerchantCore, getPaymentMethodCore, getProductCore, getUsageCore, handleRouteError, isErrorResult, isPaywallStructuredContent, jsonSchemaToZodRawShape, listPlansCore, paywallErrorToClientPayload, pollBalanceUntilIncreased, processPaymentIntentCore, processTopupPaymentIntentCore, reactivatePurchaseCore, registerVirtualToolsMcpImpl, saveAutoRechargeCore, syncCustomerCore, trackUsageCore, verifyProductConfiguration, verifyWebhook, withRetry };
6152
+ export { type ActivatePlanResult, type AssignCreditsRequest, type AssignCreditsResponse, type AttachBusinessDetailsParams, type AttachBusinessDetailsResult, type AuthenticatedUser, type AutoRechargeConfig, type AutoRechargeDisplayBlock, type AutoRechargeInput, type AutoRechargeResponse, BALANCE_RECONCILE_DELAYS_MS, type ConfigureMcpPlansRequest, type ConfigureMcpPlansResponse, type CreateSolvaPayConfig, type CreditDebitResult, type CreditDebitSkipReason, type CreditDisplayBlock, type CustomerBalanceResult, type CustomerResponseMapped, type CustomerWebhookObject, type ErrorResult, type GetUsageResult, type HttpAdapterOptions, type LimitActivationBalance, type LimitActivationProduct, type LimitPlanSummary, type LimitResponseWithPlan, type McpBootstrapPlanInput, type McpBootstrapRequest, type McpBootstrapResponse, type McpServerLike, type McpToolPlanMappingInput, type NextAdapterOptions, type OneTimePurchaseInfo, type PayableAllowResult, type PayableFunction, type PayableGateOptions, type PayableGateResult, type PayableOptions, type PayablePaywallResult, type PaymentMethodInfo, type PaywallArgs, type PaywallDecision, PaywallError, type PaywallMetadata, type PaywallState, type PaywallStructuredContent, type ProcessPaymentResult, type ProductConfigurationStatus, type ProtectHandlerContext, type PurchaseCheckResult, type PurchaseInfo, type RegisterVirtualToolsMcpOptions, type RetryOptions, type SaveAutoRechargeInput, type SaveAutoRechargeResponse, type SdkMerchantResponse, type SdkProductResponse, type ServerClientOptions, type SolvaPay, type SolvaPayClient, TOPUP_BALANCE_POLL_DELAYS_MS, type ToolPlanMappingInput, type TopupProcessResult, type TrackUsageBulkRequest, type TrackUsageBulkResponse, type TrackUsageRequest, type TrackUsageResponse, VIRTUAL_TOOL_DEFINITIONS, type VerifyProductConfigurationOptions, type VirtualToolDefinition, type VirtualToolsOptions, type WebhookEvent, type WebhookEventForType, type WebhookEventObjectMap, type WebhookEventType, type WebhookProduct, activatePlanCore, attachBusinessDetailsCore, buildGateMessage, buildNudgeMessage, buildPaywallGate, cancelPurchaseCore, checkLimitsCore, checkPurchaseCore, classifyPaywallState, type components, createCheckoutSessionCore, createCustomerSessionCore, createPaymentIntentCore, createSolvaPay, createSolvaPayClient, createTopupPaymentIntentCore, createVirtualTools, disableAutoRechargeCore, getAuthenticatedUserCore, getAutoRechargeCore, getCustomerBalanceCore, getMerchantCore, getPaymentMethodCore, getProductCore, getUsageCore, handleRouteError, isErrorResult, isPaywallStructuredContent, jsonSchemaToZodRawShape, listPlansCore, paywallErrorToClientPayload, pollBalanceUntilIncreased, processPaymentIntentCore, processTopupPaymentIntentCore, reactivatePurchaseCore, registerVirtualToolsMcpImpl, saveAutoRechargeCore, syncCustomerCore, trackUsageCore, verifyProductConfiguration, verifyWebhook, withRetry };
package/dist/index.js CHANGED
@@ -2073,9 +2073,7 @@ function createSolvaPay(config) {
2073
2073
  },
2074
2074
  attachBusinessDetails(params) {
2075
2075
  if (!apiClient.attachBusinessDetails) {
2076
- throw new SolvaPayError3(
2077
- "attachBusinessDetails is not available on this API client"
2078
- );
2076
+ throw new SolvaPayError3("attachBusinessDetails is not available on this API client");
2079
2077
  }
2080
2078
  return apiClient.attachBusinessDetails(params);
2081
2079
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvapay/server",
3
- "version": "2.2.1",
3
+ "version": "2.2.2-preview-e0daec2e600e51dda2adb4993d7d551508ead29c",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",