dutchman-bridge 1.0.0 → 1.2.0

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/README.md CHANGED
@@ -11,20 +11,14 @@ and response is typed, and it is regenerated whenever the API changes.
11
11
 
12
12
  ## Install
13
13
 
14
- The package is distributed from a private GitHub repository you have been given read
15
- access to. Pin a tag in your `package.json`:
16
-
17
- ```json
18
- {
19
- "dependencies": {
20
- "dutchman-bridge": "github:Dutchman-io/dutchman-bridge-sdk#v1.0.0"
21
- }
22
- }
14
+ ```bash
15
+ npm install dutchman-bridge
23
16
  ```
24
17
 
25
- or `npm install github:Dutchman-io/dutchman-bridge-sdk#v1.0.0`. npm needs credentials
26
- that can read the repository — an SSH key or a `GITHUB_TOKEN`/git credential helper on
27
- the machine running the install (including CI).
18
+ Published on the public npm registry. To pin the exact generated source instead, a
19
+ git dependency on a release tag also works:
20
+ `"dutchman-bridge": "github:Dutchman-io/dutchman-bridge-sdk#v1.0.0"` (needs read
21
+ access to the repository).
28
22
 
29
23
  ## Configure
30
24
 
@@ -144,6 +138,32 @@ do {
144
138
  } while (cursor);
145
139
  ```
146
140
 
141
+ ## Retrying safely
142
+
143
+ Every call that moves money takes an optional `reference` — your own request id.
144
+ Send the same value again and you get the original record back; nothing moves
145
+ twice.
146
+
147
+ ```ts
148
+ await bridge.wallet.withdraw({
149
+ path: { customerId },
150
+ body: { amount: 50000, reference: 'req_01HZY4K8N2' },
151
+ });
152
+ ```
153
+
154
+ It is accepted by `wallet.withdraw`, `send.submit`, `wallet.initiateFundingCharge`
155
+ and `globalSend.initiate`. Letters, digits, dot, underscore and hyphen; 120
156
+ characters max. It is scoped per endpoint, so the same value on a withdrawal and
157
+ on a send are two different records — choose one per intended operation (a
158
+ request id, not a customer id).
159
+
160
+ **A timeout is not a failure.** If a call times out or answers 5xx, retry it with
161
+ the same `reference` rather than assuming nothing happened — that is the only way
162
+ to find out which. Without one, a retry is a second withdrawal.
163
+
164
+ Buy and sell are covered by their quote instead: a `quoteId` executes exactly
165
+ once, including when two requests arrive together.
166
+
147
167
  ## Errors
148
168
 
149
169
  On a non-2xx status `error` is the parsed JSON body and `data` is `undefined`. The API
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { client, type CreateClientConfig } from './client.gen';
2
2
  export { Bank, Countries, Customers, DutchmanBridge, Features, GlobalSend, Kyc, type Options, Profile, Ramp, Receiving, Send, Wallet, Webhook } from './sdk.gen';
3
- export type { AddAccountDto, BankAddAccountData, BankAddAccountResponse, BankAddAccountResponses, BankBanksData, BankBanksResponse, BankBanksResponses, BankDeleteAccountData, BankDeleteAccountResponse, BankDeleteAccountResponses, BankGetAccountsData, BankGetAccountsResponse, BankGetAccountsResponses, BankSetDefaultAccountData, BankSetDefaultAccountResponse, BankSetDefaultAccountResponses, BankVerifyAccountData, BankVerifyAccountResponse, BankVerifyAccountResponses, BlockchainNetwork, CheckSelfieDto, ClientOptions, CountriesListData, CountriesListResponse, CountriesListResponses, CustomerSellDto, CustomersFullData, CustomersFullResponse, CustomersFullResponses, CustomersGetData, CustomersGetResponse, CustomersGetResponses, CustomersRegisterData, CustomersRegisterResponse, CustomersRegisterResponses, FeaturesListData, FeaturesListResponse, FeaturesListResponses, FeatureStatus, FundingChargeStatus, GetQuoteDto, GlobalSendBeneficiaryDto, GlobalSendCorridorsData, GlobalSendCorridorsResponse, GlobalSendCorridorsResponses, GlobalSendInitiateData, GlobalSendInitiateResponse, GlobalSendInitiateResponses, GlobalSendQuoteData, GlobalSendQuoteDto, GlobalSendQuoteResponse, GlobalSendQuoteResponses, GlobalSendVerificationStatusData, GlobalSendVerificationStatusResponse, GlobalSendVerificationStatusResponses, InitiateFundingChargeDto, InitiateGlobalSendDto, KycDocumentData, KycDocumentResponse, KycDocumentResponses, KycReverificationData, KycReverificationResponse, KycReverificationResponses, KycSelfieCheckRouteData, KycSelfieCheckRouteResponse, KycSelfieCheckRouteResponses, KycStatus, KycStatusData, KycStatusResponse, KycStatusResponses, KycTier1Data, KycTier1Response, KycTier1Responses, KycTier2Data, KycTier2Response, KycTier2Responses, KycTier3Data, KycTier3Response, KycTier3Responses, LedgerEntryType, PartnerAccountVerificationDto, PartnerBalanceDto, PartnerBankAccountDto, PartnerBankDto, PartnerBuyResultDto, PartnerCorridorDto, PartnerCountryDto, PartnerCustomerDto, PartnerCustomerKycSnapshotDto, PartnerCustomerSnapshotDto, PartnerCustomerWalletSnapshotDto, PartnerDepositAddressDto, PartnerFeatureDto, PartnerFundingChargeDto, PartnerGlobalSendQuoteDto, PartnerGlobalSendResultDto, PartnerKycRecordDto, PartnerKycSubmissionDto, PartnerLedgerEntryDto, PartnerNetworkDto, PartnerRampQuoteDto, PartnerRateDto, PartnerReceivingAccountDto, PartnerReceivingActivityDto, PartnerReverificationRequestDto, PartnerSelfieCheckDto, PartnerSellResultDto, PartnerSendNetworkDto, PartnerSendQuoteDto, PartnerSendResultDto, PartnerSettlementModeDto, PartnerUploadedDocumentDto, PartnerVerificationRecordDto, PartnerVirtualAccountDto, PartnerWebhookConfigDto, PartnerWebhookDeliveryDetailDto, PartnerWebhookDeliveryDto, PartnerWebhookSecretDto, PartnerWebhookTestDto, PartnerWithdrawalBankAccountDto, PartnerWithdrawalDto, ProfileChangePasswordData, ProfileChangePasswordResponse, ProfileChangePasswordResponses, ProfileDeleteAccountData, ProfileDeleteAccountResponse, ProfileDeleteAccountResponses, ProfileGetSettlementModeData, ProfileGetSettlementModeResponse, ProfileGetSettlementModeResponses, ProfileProfileData, ProfileProfileResponse, ProfileProfileResponses, ProfileSetSettlementModeData, ProfileSetSettlementModeResponse, ProfileSetSettlementModeResponses, ProfileUpdateProfileData, ProfileUpdateProfileResponse, ProfileUpdateProfileResponses, ProfileWithdrawalsData, ProfileWithdrawalsResponse, ProfileWithdrawalsResponses, QuoteSendDto, RampBuyData, RampBuyQuoteData, RampBuyQuoteResponse, RampBuyQuoteResponses, RampBuyResponse, RampBuyResponses, RampRateData, RampRateResponse, RampRateResponses, RampSellData, RampSellNetworksData, RampSellNetworksResponse, RampSellNetworksResponses, RampSellQuoteData, RampSellQuoteResponse, RampSellQuoteResponses, RampSellResponse, RampSellResponses, ReceivingActivityData, ReceivingActivityResponse, ReceivingActivityResponses, ReceivingCurrenciesData, ReceivingCurrenciesResponse, ReceivingCurrenciesResponses, ReceivingListData, ReceivingListResponse, ReceivingListResponses, ReceivingOpenData, ReceivingOpenResponse, ReceivingOpenResponses, ReceivingRefreshData, ReceivingRefreshResponse, ReceivingRefreshResponses, RegisterCustomerDto, ResetPassword, ReverificationItem, ReverificationStatus, SendDto, SendNetworksData, SendNetworksResponse, SendNetworksResponses, SendQuoteData, SendQuoteResponse, SendQuoteResponses, SendSubmitData, SendSubmitResponse, SendSubmitResponses, SettlementMode, SettlementModeDto, SetWebhookUrlDto, SubmitTier3Dto, Tier1KycDto, Tier2KycDto, UpdateCustomerProfileDto, VerifyAccountNumberInput, WalletAddressesData, WalletAddressesResponse, WalletAddressesResponses, WalletBalanceData, WalletBalanceResponse, WalletBalanceResponses, WalletFundingChargesData, WalletFundingChargesResponse, WalletFundingChargesResponses, WalletInitiateFundingChargeData, WalletInitiateFundingChargeResponse, WalletInitiateFundingChargeResponses, WalletStreamBalanceData, WalletStreamBalanceResponses, WalletTransactionsData, WalletTransactionsResponse, WalletTransactionsResponses, WalletVirtualAccountForData, WalletVirtualAccountForResponse, WalletVirtualAccountForResponses, WalletWithdrawData, WalletWithdrawResponse, WalletWithdrawResponses, WebhookConfigData, WebhookConfigResponse, WebhookConfigResponses, WebhookDeliveriesData, WebhookDeliveriesResponse, WebhookDeliveriesResponses, WebhookDeliveryData, WebhookDeliveryResponse, WebhookDeliveryResponses, WebhookDeliveryStatus, WebhookReplayData, WebhookReplayResponse, WebhookReplayResponses, WebhookRotateSecretData, WebhookRotateSecretResponse, WebhookRotateSecretResponses, WebhookSetUrlData, WebhookSetUrlResponse, WebhookSetUrlResponses, WithdrawalStatus, WithdrawDto } from './types.gen';
3
+ export type { AddAccountDto, BankAddAccountData, BankAddAccountResponse, BankAddAccountResponses, BankBanksData, BankBanksResponse, BankBanksResponses, BankDeleteAccountData, BankDeleteAccountResponse, BankDeleteAccountResponses, BankGetAccountsData, BankGetAccountsResponse, BankGetAccountsResponses, BankSetDefaultAccountData, BankSetDefaultAccountResponse, BankSetDefaultAccountResponses, BankVerifyAccountData, BankVerifyAccountResponse, BankVerifyAccountResponses, BlockchainNetwork, CheckSelfieDto, ClientOptions, CountriesListData, CountriesListResponse, CountriesListResponses, CustomerSellDto, CustomersFullData, CustomersFullResponse, CustomersFullResponses, CustomersGetData, CustomersGetResponse, CustomersGetResponses, CustomersRegisterData, CustomersRegisterResponse, CustomersRegisterResponses, FeaturesListData, FeaturesListResponse, FeaturesListResponses, FeatureStatus, FundingChargeStatus, GetQuoteDto, GlobalSendBeneficiaryDto, GlobalSendCorridorsData, GlobalSendCorridorsResponse, GlobalSendCorridorsResponses, GlobalSendInitiateData, GlobalSendInitiateResponse, GlobalSendInitiateResponses, GlobalSendQuoteData, GlobalSendQuoteDto, GlobalSendQuoteResponse, GlobalSendQuoteResponses, GlobalSendVerificationStatusData, GlobalSendVerificationStatusResponse, GlobalSendVerificationStatusResponses, InitiateFundingChargeDto, InitiateGlobalSendDto, KycDocumentData, KycDocumentResponse, KycDocumentResponses, KycReverificationData, KycReverificationResponse, KycReverificationResponses, KycSelfieCheckRouteData, KycSelfieCheckRouteResponse, KycSelfieCheckRouteResponses, KycStatus, KycStatusData, KycStatusResponse, KycStatusResponses, KycSummaryData, KycSummaryResponse, KycSummaryResponses, KycTier1Data, KycTier1Response, KycTier1Responses, KycTier2Data, KycTier2Response, KycTier2Responses, KycTier3Data, KycTier3Response, KycTier3Responses, LedgerEntryType, PartnerAccountVerificationDto, PartnerBalanceDto, PartnerBankAccountDto, PartnerBankDto, PartnerBuyResultDto, PartnerCorridorDto, PartnerCountryDto, PartnerCustomerDto, PartnerCustomerKycSnapshotDto, PartnerCustomerSnapshotDto, PartnerCustomerWalletSnapshotDto, PartnerDepositAddressDto, PartnerFeatureDto, PartnerFundingChargeDto, PartnerGlobalSendQuoteDto, PartnerGlobalSendResultDto, PartnerKycRecordDto, PartnerKycSubmissionDto, PartnerLedgerEntryDto, PartnerNetworkDto, PartnerRampQuoteDto, PartnerRateDto, PartnerReceivingAccountDto, PartnerReceivingActivityDto, PartnerReverificationRequestDto, PartnerSelfieCheckDto, PartnerSellResultDto, PartnerSendNetworkDto, PartnerSendQuoteDto, PartnerSendResultDto, PartnerTierStateDto, PartnerTierStatus, PartnerUploadedDocumentDto, PartnerVerificationInput, PartnerVerificationRecordDto, PartnerVerificationSummaryDto, PartnerVerificationTiersDto, PartnerVirtualAccountDto, PartnerWebhookConfigDto, PartnerWebhookDeliveryDetailDto, PartnerWebhookDeliveryDto, PartnerWebhookSecretDto, PartnerWebhookTestDto, PartnerWithdrawalBankAccountDto, PartnerWithdrawalDto, PartnerWithdrawalQuoteDto, ProfileChangePasswordData, ProfileChangePasswordResponse, ProfileChangePasswordResponses, ProfileDeleteAccountData, ProfileDeleteAccountResponse, ProfileDeleteAccountResponses, ProfileProfileData, ProfileProfileResponse, ProfileProfileResponses, ProfileUpdateProfileData, ProfileUpdateProfileResponse, ProfileUpdateProfileResponses, ProfileWithdrawalsData, ProfileWithdrawalsResponse, ProfileWithdrawalsResponses, QuoteSendDto, RampBuyData, RampBuyQuoteData, RampBuyQuoteResponse, RampBuyQuoteResponses, RampBuyResponse, RampBuyResponses, RampRateData, RampRateResponse, RampRateResponses, RampSellData, RampSellNetworksData, RampSellNetworksResponse, RampSellNetworksResponses, RampSellQuoteData, RampSellQuoteResponse, RampSellQuoteResponses, RampSellResponse, RampSellResponses, ReceivingActivityData, ReceivingActivityResponse, ReceivingActivityResponses, ReceivingCurrenciesData, ReceivingCurrenciesResponse, ReceivingCurrenciesResponses, ReceivingListData, ReceivingListResponse, ReceivingListResponses, ReceivingOpenData, ReceivingOpenResponse, ReceivingOpenResponses, ReceivingRefreshData, ReceivingRefreshResponse, ReceivingRefreshResponses, RegisterCustomerDto, ResetPassword, ReverificationItem, ReverificationStatus, SendDto, SendNetworksData, SendNetworksResponse, SendNetworksResponses, SendQuoteData, SendQuoteResponse, SendQuoteResponses, SendSubmitData, SendSubmitResponse, SendSubmitResponses, SetWebhookUrlDto, SubmitTier3Dto, Tier1KycDto, Tier2KycDto, UpdateCustomerProfileDto, VerifyAccountNumberInput, WalletAddressesData, WalletAddressesResponse, WalletAddressesResponses, WalletBalanceData, WalletBalanceResponse, WalletBalanceResponses, WalletFundingChargesData, WalletFundingChargesResponse, WalletFundingChargesResponses, WalletInitiateFundingChargeData, WalletInitiateFundingChargeResponse, WalletInitiateFundingChargeResponses, WalletStreamBalanceData, WalletStreamBalanceResponses, WalletTransactionsData, WalletTransactionsResponse, WalletTransactionsResponses, WalletVirtualAccountForData, WalletVirtualAccountForResponse, WalletVirtualAccountForResponses, WalletWithdrawalQuoteData, WalletWithdrawalQuoteResponse, WalletWithdrawalQuoteResponses, WalletWithdrawData, WalletWithdrawResponse, WalletWithdrawResponses, WebhookConfigData, WebhookConfigResponse, WebhookConfigResponses, WebhookDeliveriesData, WebhookDeliveriesResponse, WebhookDeliveriesResponses, WebhookDeliveryData, WebhookDeliveryResponse, WebhookDeliveryResponses, WebhookDeliveryStatus, WebhookReplayData, WebhookReplayResponse, WebhookReplayResponses, WebhookRotateSecretData, WebhookRotateSecretResponse, WebhookRotateSecretResponses, WebhookSetUrlData, WebhookSetUrlResponse, WebhookSetUrlResponses, WithdrawalStatus, WithdrawDto } from './types.gen';
package/dist/sdk.gen.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Client, type ClientMeta, type Options as Options2, type RequestResult, type TDataShape } from './client';
2
- import type { BankAddAccountData, BankAddAccountResponses, BankBanksData, BankBanksResponses, BankDeleteAccountData, BankDeleteAccountResponses, BankGetAccountsData, BankGetAccountsResponses, BankSetDefaultAccountData, BankSetDefaultAccountResponses, BankVerifyAccountData, BankVerifyAccountResponses, CountriesListData, CountriesListResponses, CustomersFullData, CustomersFullResponses, CustomersGetData, CustomersGetResponses, CustomersRegisterData, CustomersRegisterResponses, FeaturesListData, FeaturesListResponses, GlobalSendCorridorsData, GlobalSendCorridorsResponses, GlobalSendInitiateData, GlobalSendInitiateResponses, GlobalSendQuoteData, GlobalSendQuoteResponses, GlobalSendVerificationStatusData, GlobalSendVerificationStatusResponses, KycDocumentData, KycDocumentResponses, KycReverificationData, KycReverificationResponses, KycSelfieCheckRouteData, KycSelfieCheckRouteResponses, KycStatusData, KycStatusResponses, KycTier1Data, KycTier1Responses, KycTier2Data, KycTier2Responses, KycTier3Data, KycTier3Responses, ProfileChangePasswordData, ProfileChangePasswordResponses, ProfileDeleteAccountData, ProfileDeleteAccountResponses, ProfileGetSettlementModeData, ProfileGetSettlementModeResponses, ProfileProfileData, ProfileProfileResponses, ProfileSetSettlementModeData, ProfileSetSettlementModeResponses, ProfileUpdateProfileData, ProfileUpdateProfileResponses, ProfileWithdrawalsData, ProfileWithdrawalsResponses, RampBuyData, RampBuyQuoteData, RampBuyQuoteResponses, RampBuyResponses, RampRateData, RampRateResponses, RampSellData, RampSellNetworksData, RampSellNetworksResponses, RampSellQuoteData, RampSellQuoteResponses, RampSellResponses, ReceivingActivityData, ReceivingActivityResponses, ReceivingCurrenciesData, ReceivingCurrenciesResponses, ReceivingListData, ReceivingListResponses, ReceivingOpenData, ReceivingOpenResponses, ReceivingRefreshData, ReceivingRefreshResponses, SendNetworksData, SendNetworksResponses, SendQuoteData, SendQuoteResponses, SendSubmitData, SendSubmitResponses, WalletAddressesData, WalletAddressesResponses, WalletBalanceData, WalletBalanceResponses, WalletFundingChargesData, WalletFundingChargesResponses, WalletInitiateFundingChargeData, WalletInitiateFundingChargeResponses, WalletStreamBalanceData, WalletStreamBalanceResponses, WalletTransactionsData, WalletTransactionsResponses, WalletVirtualAccountForData, WalletVirtualAccountForResponses, WalletWithdrawData, WalletWithdrawResponses, WebhookConfigData, WebhookConfigResponses, WebhookDeliveriesData, WebhookDeliveriesResponses, WebhookDeliveryData, WebhookDeliveryResponses, WebhookReplayData, WebhookReplayResponses, WebhookRotateSecretData, WebhookRotateSecretResponses, WebhookSetUrlData, WebhookSetUrlResponses } from './types.gen';
2
+ import type { BankAddAccountData, BankAddAccountResponses, BankBanksData, BankBanksResponses, BankDeleteAccountData, BankDeleteAccountResponses, BankGetAccountsData, BankGetAccountsResponses, BankSetDefaultAccountData, BankSetDefaultAccountResponses, BankVerifyAccountData, BankVerifyAccountResponses, CountriesListData, CountriesListResponses, CustomersFullData, CustomersFullResponses, CustomersGetData, CustomersGetResponses, CustomersRegisterData, CustomersRegisterResponses, FeaturesListData, FeaturesListResponses, GlobalSendCorridorsData, GlobalSendCorridorsResponses, GlobalSendInitiateData, GlobalSendInitiateResponses, GlobalSendQuoteData, GlobalSendQuoteResponses, GlobalSendVerificationStatusData, GlobalSendVerificationStatusResponses, KycDocumentData, KycDocumentResponses, KycReverificationData, KycReverificationResponses, KycSelfieCheckRouteData, KycSelfieCheckRouteResponses, KycStatusData, KycStatusResponses, KycSummaryData, KycSummaryResponses, KycTier1Data, KycTier1Responses, KycTier2Data, KycTier2Responses, KycTier3Data, KycTier3Responses, ProfileChangePasswordData, ProfileChangePasswordResponses, ProfileDeleteAccountData, ProfileDeleteAccountResponses, ProfileProfileData, ProfileProfileResponses, ProfileUpdateProfileData, ProfileUpdateProfileResponses, ProfileWithdrawalsData, ProfileWithdrawalsResponses, RampBuyData, RampBuyQuoteData, RampBuyQuoteResponses, RampBuyResponses, RampRateData, RampRateResponses, RampSellData, RampSellNetworksData, RampSellNetworksResponses, RampSellQuoteData, RampSellQuoteResponses, RampSellResponses, ReceivingActivityData, ReceivingActivityResponses, ReceivingCurrenciesData, ReceivingCurrenciesResponses, ReceivingListData, ReceivingListResponses, ReceivingOpenData, ReceivingOpenResponses, ReceivingRefreshData, ReceivingRefreshResponses, SendNetworksData, SendNetworksResponses, SendQuoteData, SendQuoteResponses, SendSubmitData, SendSubmitResponses, WalletAddressesData, WalletAddressesResponses, WalletBalanceData, WalletBalanceResponses, WalletFundingChargesData, WalletFundingChargesResponses, WalletInitiateFundingChargeData, WalletInitiateFundingChargeResponses, WalletStreamBalanceData, WalletStreamBalanceResponses, WalletTransactionsData, WalletTransactionsResponses, WalletVirtualAccountForData, WalletVirtualAccountForResponses, WalletWithdrawalQuoteData, WalletWithdrawalQuoteResponses, WalletWithdrawData, WalletWithdrawResponses, WebhookConfigData, WebhookConfigResponses, WebhookDeliveriesData, WebhookDeliveriesResponses, WebhookDeliveryData, WebhookDeliveryResponses, WebhookReplayData, WebhookReplayResponses, WebhookRotateSecretData, WebhookRotateSecretResponses, WebhookSetUrlData, WebhookSetUrlResponses } from './types.gen';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -64,20 +64,18 @@ export declare class Profile extends HeyApiClient {
64
64
  * Change the customer's password
65
65
  */
66
66
  changePassword<ThrowOnError extends boolean = false>(options: Options<ProfileChangePasswordData, ThrowOnError>): RequestResult<ProfileChangePasswordResponses, unknown, ThrowOnError>;
67
- /**
68
- * Read the customer's settlement preference (AUTO to default bank vs MANUAL hold)
69
- */
70
- getSettlementMode<ThrowOnError extends boolean = false>(options: Options<ProfileGetSettlementModeData, ThrowOnError>): RequestResult<ProfileGetSettlementModeResponses, unknown, ThrowOnError>;
71
- /**
72
- * Update how the customer's sale proceeds settle
73
- */
74
- setSettlementMode<ThrowOnError extends boolean = false>(options: Options<ProfileSetSettlementModeData, ThrowOnError>): RequestResult<ProfileSetSettlementModeResponses, unknown, ThrowOnError>;
75
67
  /**
76
68
  * The customer's withdrawal / global payout history, newest first
77
69
  */
78
70
  withdrawals<ThrowOnError extends boolean = false>(options: Options<ProfileWithdrawalsData, ThrowOnError>): RequestResult<ProfileWithdrawalsResponses, unknown, ThrowOnError>;
79
71
  }
80
72
  export declare class Kyc extends HeyApiClient {
73
+ /**
74
+ * Where the customer stands, and what to submit next
75
+ *
76
+ * The recommended single read: the highest approved tier, each tier's status, the inputs to submit next (with any open re-verification items first), the open re-verification request, and the KYC records. Replaces calling GET .../kyc and GET .../kyc/reverification separately.
77
+ */
78
+ summary<ThrowOnError extends boolean = false>(options: Options<KycSummaryData, ThrowOnError>): RequestResult<KycSummaryResponses, unknown, ThrowOnError>;
81
79
  /**
82
80
  * A customer's KYC records, newest first
83
81
  */
@@ -136,8 +134,16 @@ export declare class Wallet extends HeyApiClient {
136
134
  * Issued on first read in the customer's own fiat (NGN needs an approved BVN first); the same account is returned on every read after.
137
135
  */
138
136
  virtualAccountFor<ThrowOnError extends boolean = false>(options: Options<WalletVirtualAccountForData, ThrowOnError>): RequestResult<WalletVirtualAccountForResponses, unknown, ThrowOnError>;
137
+ /**
138
+ * Price a withdrawal before submitting it
139
+ *
140
+ * The withdrawal fee (a percentage of the amount plus a fixed charge for the currency) is charged on top of the amount: the bank receives `amount`, the balance is debited `totalDebited`. Nothing is reserved.
141
+ */
142
+ withdrawalQuote<ThrowOnError extends boolean = false>(options: Options<WalletWithdrawalQuoteData, ThrowOnError>): RequestResult<WalletWithdrawalQuoteResponses, unknown, ThrowOnError>;
139
143
  /**
140
144
  * Pay a held balance out to the customer's default bank account
145
+ *
146
+ * The bank receives `amount`; the withdrawal fee is debited on top of it. Price it first with GET .../withdraw/quote.
141
147
  */
142
148
  withdraw<ThrowOnError extends boolean = false>(options: Options<WalletWithdrawData, ThrowOnError>): RequestResult<WalletWithdrawResponses, unknown, ThrowOnError>;
143
149
  /**
@@ -183,7 +189,7 @@ export declare class GlobalSend extends HeyApiClient {
183
189
  }
184
190
  export declare class Ramp extends HeyApiClient {
185
191
  /**
186
- * Price a buy (fiat -> USDT) against the customer's fiat balance
192
+ * Price a buy (fiat -> stablecoin) against the customer's fiat balance
187
193
  */
188
194
  buyQuote<ThrowOnError extends boolean = false>(options: Options<RampBuyQuoteData, ThrowOnError>): RequestResult<RampBuyQuoteResponses, unknown, ThrowOnError>;
189
195
  /**
@@ -191,21 +197,21 @@ export declare class Ramp extends HeyApiClient {
191
197
  */
192
198
  buy<ThrowOnError extends boolean = false>(options: Options<RampBuyData, ThrowOnError>): RequestResult<RampBuyResponses, unknown, ThrowOnError>;
193
199
  /**
194
- * Networks the customer can sell USDT on
200
+ * Networks the customer can deposit stablecoins on
195
201
  */
196
202
  sellNetworks<ThrowOnError extends boolean = false>(options: Options<RampSellNetworksData, ThrowOnError>): RequestResult<RampSellNetworksResponses, unknown, ThrowOnError>;
197
203
  /**
198
- * Live USDT rates in the customer's local fiat, for previewing a conversion
204
+ * Live all-in stablecoin rates in the customer's local fiat, for previewing a conversion
199
205
  *
200
- * Does not lock a rate -- checkout still goes through the quote routes.
206
+ * Rates include our spread and every fee, so amount * rate is what the customer pays or receives. Pass ?asset to price a specific stablecoin (default RAMP_DEFAULT_ASSET) and ?amount to fold the fixed exchange fee into sellRate for that amount. Does not lock a rate -- checkout still goes through the quote routes.
201
207
  */
202
208
  rate<ThrowOnError extends boolean = false>(options: Options<RampRateData, ThrowOnError>): RequestResult<RampRateResponses, unknown, ThrowOnError>;
203
209
  /**
204
- * Price a sell (USDT -> fiat) against the customer's USDT balance
210
+ * Price a sell (stablecoin -> fiat) against the customer's balance
205
211
  */
206
212
  sellQuote<ThrowOnError extends boolean = false>(options: Options<RampSellQuoteData, ThrowOnError>): RequestResult<RampSellQuoteResponses, unknown, ThrowOnError>;
207
213
  /**
208
- * Execute a sell from the customer's USDT balance
214
+ * Execute a sell from the customer's stablecoin balance
209
215
  */
210
216
  sell<ThrowOnError extends boolean = false>(options: Options<RampSellData, ThrowOnError>): RequestResult<RampSellResponses, unknown, ThrowOnError>;
211
217
  }
package/dist/sdk.gen.js CHANGED
@@ -120,42 +120,30 @@ class Profile extends HeyApiClient {
120
120
  });
121
121
  }
122
122
  /**
123
- * Read the customer's settlement preference (AUTO to default bank vs MANUAL hold)
123
+ * The customer's withdrawal / global payout history, newest first
124
124
  */
125
- getSettlementMode(options) {
125
+ withdrawals(options) {
126
126
  return (options.client ?? this.client).get({
127
127
  security: [{ name: 'x-api-key', type: 'apiKey' }],
128
- url: '/api/v1/partner/v1/customers/{customerId}/settlement-mode',
128
+ url: '/api/v1/partner/v1/customers/{customerId}/withdrawals',
129
129
  ...options
130
130
  });
131
131
  }
132
+ }
133
+ exports.Profile = Profile;
134
+ class Kyc extends HeyApiClient {
132
135
  /**
133
- * Update how the customer's sale proceeds settle
134
- */
135
- setSettlementMode(options) {
136
- return (options.client ?? this.client).patch({
137
- security: [{ name: 'x-api-key', type: 'apiKey' }],
138
- url: '/api/v1/partner/v1/customers/{customerId}/settlement-mode',
139
- ...options,
140
- headers: {
141
- 'Content-Type': 'application/json',
142
- ...options.headers
143
- }
144
- });
145
- }
146
- /**
147
- * The customer's withdrawal / global payout history, newest first
136
+ * Where the customer stands, and what to submit next
137
+ *
138
+ * The recommended single read: the highest approved tier, each tier's status, the inputs to submit next (with any open re-verification items first), the open re-verification request, and the KYC records. Replaces calling GET .../kyc and GET .../kyc/reverification separately.
148
139
  */
149
- withdrawals(options) {
140
+ summary(options) {
150
141
  return (options.client ?? this.client).get({
151
142
  security: [{ name: 'x-api-key', type: 'apiKey' }],
152
- url: '/api/v1/partner/v1/customers/{customerId}/withdrawals',
143
+ url: '/api/v1/partner/v1/customers/{customerId}/verification',
153
144
  ...options
154
145
  });
155
146
  }
156
- }
157
- exports.Profile = Profile;
158
- class Kyc extends HeyApiClient {
159
147
  /**
160
148
  * A customer's KYC records, newest first
161
149
  */
@@ -308,8 +296,22 @@ class Wallet extends HeyApiClient {
308
296
  ...options
309
297
  });
310
298
  }
299
+ /**
300
+ * Price a withdrawal before submitting it
301
+ *
302
+ * The withdrawal fee (a percentage of the amount plus a fixed charge for the currency) is charged on top of the amount: the bank receives `amount`, the balance is debited `totalDebited`. Nothing is reserved.
303
+ */
304
+ withdrawalQuote(options) {
305
+ return (options.client ?? this.client).get({
306
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
307
+ url: '/api/v1/partner/v1/customers/{customerId}/withdraw/quote',
308
+ ...options
309
+ });
310
+ }
311
311
  /**
312
312
  * Pay a held balance out to the customer's default bank account
313
+ *
314
+ * The bank receives `amount`; the withdrawal fee is debited on top of it. Price it first with GET .../withdraw/quote.
313
315
  */
314
316
  withdraw(options) {
315
317
  return (options.client ?? this.client).post({
@@ -442,7 +444,7 @@ class GlobalSend extends HeyApiClient {
442
444
  exports.GlobalSend = GlobalSend;
443
445
  class Ramp extends HeyApiClient {
444
446
  /**
445
- * Price a buy (fiat -> USDT) against the customer's fiat balance
447
+ * Price a buy (fiat -> stablecoin) against the customer's fiat balance
446
448
  */
447
449
  buyQuote(options) {
448
450
  return (options.client ?? this.client).post({
@@ -470,7 +472,7 @@ class Ramp extends HeyApiClient {
470
472
  });
471
473
  }
472
474
  /**
473
- * Networks the customer can sell USDT on
475
+ * Networks the customer can deposit stablecoins on
474
476
  */
475
477
  sellNetworks(options) {
476
478
  return (options.client ?? this.client).get({
@@ -480,9 +482,9 @@ class Ramp extends HeyApiClient {
480
482
  });
481
483
  }
482
484
  /**
483
- * Live USDT rates in the customer's local fiat, for previewing a conversion
485
+ * Live all-in stablecoin rates in the customer's local fiat, for previewing a conversion
484
486
  *
485
- * Does not lock a rate -- checkout still goes through the quote routes.
487
+ * Rates include our spread and every fee, so amount * rate is what the customer pays or receives. Pass ?asset to price a specific stablecoin (default RAMP_DEFAULT_ASSET) and ?amount to fold the fixed exchange fee into sellRate for that amount. Does not lock a rate -- checkout still goes through the quote routes.
486
488
  */
487
489
  rate(options) {
488
490
  return (options.client ?? this.client).get({
@@ -492,7 +494,7 @@ class Ramp extends HeyApiClient {
492
494
  });
493
495
  }
494
496
  /**
495
- * Price a sell (USDT -> fiat) against the customer's USDT balance
497
+ * Price a sell (stablecoin -> fiat) against the customer's balance
496
498
  */
497
499
  sellQuote(options) {
498
500
  return (options.client ?? this.client).post({
@@ -506,7 +508,7 @@ class Ramp extends HeyApiClient {
506
508
  });
507
509
  }
508
510
  /**
509
- * Execute a sell from the customer's USDT balance
511
+ * Execute a sell from the customer's stablecoin balance
510
512
  */
511
513
  sell(options) {
512
514
  return (options.client ?? this.client).post({