dutchman-bridge 1.2.0 → 1.4.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/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { client, type CreateClientConfig } from './client.gen';
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, 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';
2
+ export { Bank, Countries, Customers, DutchmanBridge, Features, GlobalSend, Invoices, 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, BusinessDetailsDto, 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, InvoicesListData, InvoicesListResponses, InvoicesUploadData, InvoicesUploadResponse, InvoicesUploadResponses, 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, PartnerBusinessDto, PartnerBuyResultDto, PartnerCorridorDto, PartnerCountryDto, PartnerCustomerDto, PartnerCustomerKycSnapshotDto, PartnerCustomerSnapshotDto, PartnerCustomerWalletSnapshotDto, PartnerDepositAddressDto, PartnerFeatureDto, PartnerFundingChargeDto, PartnerGlobalSendQuoteDto, PartnerGlobalSendResultDto, PartnerInvoiceDto, 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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // This file is auto-generated by @hey-api/openapi-ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Webhook = exports.Wallet = exports.Send = exports.Receiving = exports.Ramp = exports.Profile = exports.Kyc = exports.GlobalSend = exports.Features = exports.DutchmanBridge = exports.Customers = exports.Countries = exports.Bank = exports.client = void 0;
4
+ exports.Webhook = exports.Wallet = exports.Send = exports.Receiving = exports.Ramp = exports.Profile = exports.Kyc = exports.Invoices = exports.GlobalSend = exports.Features = exports.DutchmanBridge = exports.Customers = exports.Countries = exports.Bank = exports.client = void 0;
5
5
  var client_gen_1 = require("./client.gen");
6
6
  Object.defineProperty(exports, "client", { enumerable: true, get: function () { return client_gen_1.client; } });
7
7
  var sdk_gen_1 = require("./sdk.gen");
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "Customers", { enumerable: true, get: function ()
11
11
  Object.defineProperty(exports, "DutchmanBridge", { enumerable: true, get: function () { return sdk_gen_1.DutchmanBridge; } });
12
12
  Object.defineProperty(exports, "Features", { enumerable: true, get: function () { return sdk_gen_1.Features; } });
13
13
  Object.defineProperty(exports, "GlobalSend", { enumerable: true, get: function () { return sdk_gen_1.GlobalSend; } });
14
+ Object.defineProperty(exports, "Invoices", { enumerable: true, get: function () { return sdk_gen_1.Invoices; } });
14
15
  Object.defineProperty(exports, "Kyc", { enumerable: true, get: function () { return sdk_gen_1.Kyc; } });
15
16
  Object.defineProperty(exports, "Profile", { enumerable: true, get: function () { return sdk_gen_1.Profile; } });
16
17
  Object.defineProperty(exports, "Ramp", { enumerable: true, get: function () { return sdk_gen_1.Ramp; } });
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, 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';
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, InvoicesListData, InvoicesListResponses, InvoicesUploadData, InvoicesUploadResponses, 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
@@ -69,6 +69,20 @@ export declare class Profile extends HeyApiClient {
69
69
  */
70
70
  withdrawals<ThrowOnError extends boolean = false>(options: Options<ProfileWithdrawalsData, ThrowOnError>): RequestResult<ProfileWithdrawalsResponses, unknown, ThrowOnError>;
71
71
  }
72
+ export declare class Invoices extends HeyApiClient {
73
+ /**
74
+ * A customer's invoices, newest first
75
+ *
76
+ * `usedByReference` is the send an invoice was attached to, or null while it is still unused.
77
+ */
78
+ list<ThrowOnError extends boolean = false>(options: Options<InvoicesListData, ThrowOnError>): RequestResult<InvoicesListResponses, unknown, ThrowOnError>;
79
+ /**
80
+ * Upload an invoice for a business customer
81
+ *
82
+ * Upload the invoice first, then pass the id it returns as `invoiceId` when initiating the send. Uploading it separately means an abandoned payment leaves an unused invoice rather than a payment with no evidence behind it. PDF, JPEG, PNG or WEBP, up to 10 MB.
83
+ */
84
+ upload<ThrowOnError extends boolean = false>(options: Options<InvoicesUploadData, ThrowOnError>): RequestResult<InvoicesUploadResponses, unknown, ThrowOnError>;
85
+ }
72
86
  export declare class Kyc extends HeyApiClient {
73
87
  /**
74
88
  * Where the customer stands, and what to submit next
@@ -321,6 +335,8 @@ export declare class DutchmanBridge extends HeyApiClient {
321
335
  get customers(): Customers;
322
336
  private _profile?;
323
337
  get profile(): Profile;
338
+ private _invoices?;
339
+ get invoices(): Invoices;
324
340
  private _kyc?;
325
341
  get kyc(): Kyc;
326
342
  private _wallet?;
package/dist/sdk.gen.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // This file is auto-generated by @hey-api/openapi-ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DutchmanBridge = exports.Webhook = exports.Features = exports.Countries = exports.Receiving = exports.Bank = exports.Ramp = exports.GlobalSend = exports.Send = exports.Wallet = exports.Kyc = exports.Profile = exports.Customers = void 0;
4
+ exports.DutchmanBridge = exports.Webhook = exports.Features = exports.Countries = exports.Receiving = exports.Bank = exports.Ramp = exports.GlobalSend = exports.Send = exports.Wallet = exports.Kyc = exports.Invoices = exports.Profile = exports.Customers = void 0;
5
5
  const client_1 = require("./client");
6
6
  const client_gen_1 = require("./client.gen");
7
7
  class HeyApiClient {
@@ -131,6 +131,38 @@ class Profile extends HeyApiClient {
131
131
  }
132
132
  }
133
133
  exports.Profile = Profile;
134
+ class Invoices extends HeyApiClient {
135
+ /**
136
+ * A customer's invoices, newest first
137
+ *
138
+ * `usedByReference` is the send an invoice was attached to, or null while it is still unused.
139
+ */
140
+ list(options) {
141
+ return (options.client ?? this.client).get({
142
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
143
+ url: '/api/v1/partner/v1/customers/{customerId}/invoices',
144
+ ...options
145
+ });
146
+ }
147
+ /**
148
+ * Upload an invoice for a business customer
149
+ *
150
+ * Upload the invoice first, then pass the id it returns as `invoiceId` when initiating the send. Uploading it separately means an abandoned payment leaves an unused invoice rather than a payment with no evidence behind it. PDF, JPEG, PNG or WEBP, up to 10 MB.
151
+ */
152
+ upload(options) {
153
+ return (options.client ?? this.client).post({
154
+ ...client_1.formDataBodySerializer,
155
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
156
+ url: '/api/v1/partner/v1/customers/{customerId}/invoices',
157
+ ...options,
158
+ headers: {
159
+ 'Content-Type': null,
160
+ ...options.headers
161
+ }
162
+ });
163
+ }
164
+ }
165
+ exports.Invoices = Invoices;
134
166
  class Kyc extends HeyApiClient {
135
167
  /**
136
168
  * Where the customer stands, and what to submit next
@@ -761,6 +793,9 @@ class DutchmanBridge extends HeyApiClient {
761
793
  get profile() {
762
794
  return this._profile ?? (this._profile = new Profile({ client: this.client }));
763
795
  }
796
+ get invoices() {
797
+ return this._invoices ?? (this._invoices = new Invoices({ client: this.client }));
798
+ }
764
799
  get kyc() {
765
800
  return this._kyc ?? (this._kyc = new Kyc({ client: this.client }));
766
801
  }
@@ -1,6 +1,24 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: 'https://app.dutchmannetwork.online' | (string & {});
3
3
  };
4
+ export type PartnerBusinessDto = {
5
+ legalName: string;
6
+ tradingName: string | null;
7
+ registrationNumber: string;
8
+ /**
9
+ * Country of incorporation.
10
+ */
11
+ country: string;
12
+ /**
13
+ * KYB state, in the same words a person's KYC uses. REVIEW means a human is looking at it -- including when the register was simply unreachable, which is not the same as a refusal.
14
+ */
15
+ kybStatus: 'PENDING' | 'REVIEW' | 'APPROVED' | 'REJECTED';
16
+ kybCheckedAt: string | null;
17
+ /**
18
+ * Why it did not clear. Null once approved.
19
+ */
20
+ kybRejectionReason: string | null;
21
+ };
4
22
  export type PartnerCustomerDto = {
5
23
  id: string;
6
24
  firstName: string;
@@ -21,6 +39,37 @@ export type PartnerCustomerDto = {
21
39
  verifiedAt: string | null;
22
40
  createdAt: string;
23
41
  updatedAt: string;
42
+ /**
43
+ * Present only when this customer is a company. Absent on an individual.
44
+ */
45
+ business?: PartnerBusinessDto;
46
+ };
47
+ export type BusinessDetailsDto = {
48
+ /**
49
+ * Registered name, exactly as the incorporation record has it. Checked against the register during KYB.
50
+ */
51
+ legalName: string;
52
+ /**
53
+ * Company registration number — the RC number in Nigeria. Unique per country of incorporation.
54
+ */
55
+ registrationNumber: string;
56
+ /**
57
+ * ISO 3166-1 alpha-2 country of incorporation. Decides which register the KYB check runs against, so it is not necessarily where the customer trades.
58
+ */
59
+ country: string;
60
+ /**
61
+ * Trading name where it differs. Display only, never matched.
62
+ */
63
+ tradingName?: string;
64
+ addressLine1?: string;
65
+ addressLine2?: string;
66
+ city?: string;
67
+ /**
68
+ * State or province.
69
+ */
70
+ subdivision?: string;
71
+ postalCode?: string;
72
+ website?: string;
24
73
  };
25
74
  export type RegisterCustomerDto = {
26
75
  firstName: string;
@@ -31,6 +80,10 @@ export type RegisterCustomerDto = {
31
80
  * ISO alpha-2 country code
32
81
  */
33
82
  country: string;
83
+ /**
84
+ * Supply this to register the customer as a business. Omit it and the customer is an individual, exactly as before.
85
+ */
86
+ business?: BusinessDetailsDto;
34
87
  };
35
88
  export type KycStatus = 'PENDING' | 'REVIEW' | 'APPROVED' | 'REJECTED';
36
89
  export type PartnerKycRecordDto = {
@@ -105,6 +158,28 @@ export type PartnerCustomerSnapshotDto = {
105
158
  kyc: PartnerCustomerKycSnapshotDto;
106
159
  wallet: PartnerCustomerWalletSnapshotDto;
107
160
  };
161
+ export type PartnerInvoiceDto = {
162
+ /**
163
+ * Pass as `invoiceId` when sending.
164
+ */
165
+ id: string;
166
+ fileName: string | null;
167
+ mimeType: string | null;
168
+ sizeBytes: number | null;
169
+ supplierName: string | null;
170
+ invoiceNumber: string | null;
171
+ /**
172
+ * Decimal string.
173
+ */
174
+ amount: string | null;
175
+ currency: string | null;
176
+ note: string | null;
177
+ /**
178
+ * The send this was attached to, or null while it is still unused.
179
+ */
180
+ usedByReference: string | null;
181
+ createdAt: string;
182
+ };
108
183
  /**
109
184
  * NOT_STARTED when nothing has been submitted for the tier; otherwise the decision on the newest submission.
110
185
  */
@@ -608,6 +683,10 @@ export type InitiateGlobalSendDto = {
608
683
  * Idempotency key. Resending the same value returns the existing send rather than moving money again — pass the client's request id. Letters, digits, dot, underscore and hyphen; 120 characters max.
609
684
  */
610
685
  reference?: string;
686
+ /**
687
+ * Id from POST .../invoices. Required when the customer is a business; ignored otherwise.
688
+ */
689
+ invoiceId?: string;
611
690
  };
612
691
  export type PartnerRampQuoteDto = {
613
692
  /**
@@ -1031,6 +1110,57 @@ export type CustomersFullResponses = {
1031
1110
  };
1032
1111
  };
1033
1112
  export type CustomersFullResponse = CustomersFullResponses[keyof CustomersFullResponses];
1113
+ export type InvoicesListData = {
1114
+ body?: never;
1115
+ path: {
1116
+ /**
1117
+ * Id of one of your customers, as returned by customers.register.
1118
+ */
1119
+ customerId: string;
1120
+ };
1121
+ query?: {
1122
+ /**
1123
+ * Page size.
1124
+ */
1125
+ limit?: number;
1126
+ /**
1127
+ * Opaque; the previous page's meta.nextCursor. Omit for the first page.
1128
+ */
1129
+ cursor?: string;
1130
+ };
1131
+ url: '/api/v1/partner/v1/customers/{customerId}/invoices';
1132
+ };
1133
+ export type InvoicesListResponses = {
1134
+ 200: unknown;
1135
+ };
1136
+ export type InvoicesUploadData = {
1137
+ body: {
1138
+ /**
1139
+ * The invoice: PDF, JPEG, PNG or WEBP, at most 10 MB.
1140
+ */
1141
+ file: Blob | File;
1142
+ supplierName?: string;
1143
+ invoiceNumber?: string;
1144
+ amount?: number;
1145
+ currency?: string;
1146
+ note?: string;
1147
+ };
1148
+ path: {
1149
+ /**
1150
+ * Id of one of your customers, as returned by customers.register.
1151
+ */
1152
+ customerId: string;
1153
+ };
1154
+ query?: never;
1155
+ url: '/api/v1/partner/v1/customers/{customerId}/invoices';
1156
+ };
1157
+ export type InvoicesUploadResponses = {
1158
+ 201: {
1159
+ success: boolean;
1160
+ data: PartnerInvoiceDto;
1161
+ };
1162
+ };
1163
+ export type InvoicesUploadResponse = InvoicesUploadResponses[keyof InvoicesUploadResponses];
1034
1164
  export type KycSummaryData = {
1035
1165
  body?: never;
1036
1166
  path: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dutchman-bridge",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "TypeScript SDK for the Dutchman Bridge Partner API, generated from its OpenAPI specification.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
3
  export { client, type CreateClientConfig } from './client.gen';
4
- export { Bank, Countries, Customers, DutchmanBridge, Features, GlobalSend, Kyc, type Options, Profile, Ramp, Receiving, Send, Wallet, Webhook } from './sdk.gen';
5
- 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';
4
+ export { Bank, Countries, Customers, DutchmanBridge, Features, GlobalSend, Invoices, Kyc, type Options, Profile, Ramp, Receiving, Send, Wallet, Webhook } from './sdk.gen';
5
+ export type { AddAccountDto, BankAddAccountData, BankAddAccountResponse, BankAddAccountResponses, BankBanksData, BankBanksResponse, BankBanksResponses, BankDeleteAccountData, BankDeleteAccountResponse, BankDeleteAccountResponses, BankGetAccountsData, BankGetAccountsResponse, BankGetAccountsResponses, BankSetDefaultAccountData, BankSetDefaultAccountResponse, BankSetDefaultAccountResponses, BankVerifyAccountData, BankVerifyAccountResponse, BankVerifyAccountResponses, BlockchainNetwork, BusinessDetailsDto, 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, InvoicesListData, InvoicesListResponses, InvoicesUploadData, InvoicesUploadResponse, InvoicesUploadResponses, 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, PartnerBusinessDto, PartnerBuyResultDto, PartnerCorridorDto, PartnerCountryDto, PartnerCustomerDto, PartnerCustomerKycSnapshotDto, PartnerCustomerSnapshotDto, PartnerCustomerWalletSnapshotDto, PartnerDepositAddressDto, PartnerFeatureDto, PartnerFundingChargeDto, PartnerGlobalSendQuoteDto, PartnerGlobalSendResultDto, PartnerInvoiceDto, 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/src/sdk.gen.ts CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { type Client, type ClientMeta, formDataBodySerializer, type Options as Options2, type RequestResult, type TDataShape } from './client';
4
4
  import { client } from './client.gen';
5
- 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';
5
+ 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, InvoicesListData, InvoicesListResponses, InvoicesUploadData, InvoicesUploadResponses, 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';
6
6
 
7
7
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
8
8
  /**
@@ -158,6 +158,39 @@ export class Profile extends HeyApiClient {
158
158
  }
159
159
  }
160
160
 
161
+ export class Invoices extends HeyApiClient {
162
+ /**
163
+ * A customer's invoices, newest first
164
+ *
165
+ * `usedByReference` is the send an invoice was attached to, or null while it is still unused.
166
+ */
167
+ public list<ThrowOnError extends boolean = false>(options: Options<InvoicesListData, ThrowOnError>): RequestResult<InvoicesListResponses, unknown, ThrowOnError> {
168
+ return (options.client ?? this.client).get<InvoicesListResponses, unknown, ThrowOnError>({
169
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
170
+ url: '/api/v1/partner/v1/customers/{customerId}/invoices',
171
+ ...options
172
+ });
173
+ }
174
+
175
+ /**
176
+ * Upload an invoice for a business customer
177
+ *
178
+ * Upload the invoice first, then pass the id it returns as `invoiceId` when initiating the send. Uploading it separately means an abandoned payment leaves an unused invoice rather than a payment with no evidence behind it. PDF, JPEG, PNG or WEBP, up to 10 MB.
179
+ */
180
+ public upload<ThrowOnError extends boolean = false>(options: Options<InvoicesUploadData, ThrowOnError>): RequestResult<InvoicesUploadResponses, unknown, ThrowOnError> {
181
+ return (options.client ?? this.client).post<InvoicesUploadResponses, unknown, ThrowOnError>({
182
+ ...formDataBodySerializer,
183
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
184
+ url: '/api/v1/partner/v1/customers/{customerId}/invoices',
185
+ ...options,
186
+ headers: {
187
+ 'Content-Type': null,
188
+ ...options.headers
189
+ }
190
+ });
191
+ }
192
+ }
193
+
161
194
  export class Kyc extends HeyApiClient {
162
195
  /**
163
196
  * Where the customer stands, and what to submit next
@@ -837,6 +870,11 @@ export class DutchmanBridge extends HeyApiClient {
837
870
  return this._profile ??= new Profile({ client: this.client });
838
871
  }
839
872
 
873
+ private _invoices?: Invoices;
874
+ get invoices(): Invoices {
875
+ return this._invoices ??= new Invoices({ client: this.client });
876
+ }
877
+
840
878
  private _kyc?: Kyc;
841
879
  get kyc(): Kyc {
842
880
  return this._kyc ??= new Kyc({ client: this.client });
package/src/types.gen.ts CHANGED
@@ -4,6 +4,25 @@ export type ClientOptions = {
4
4
  baseUrl: 'https://app.dutchmannetwork.online' | (string & {});
5
5
  };
6
6
 
7
+ export type PartnerBusinessDto = {
8
+ legalName: string;
9
+ tradingName: string | null;
10
+ registrationNumber: string;
11
+ /**
12
+ * Country of incorporation.
13
+ */
14
+ country: string;
15
+ /**
16
+ * KYB state, in the same words a person's KYC uses. REVIEW means a human is looking at it -- including when the register was simply unreachable, which is not the same as a refusal.
17
+ */
18
+ kybStatus: 'PENDING' | 'REVIEW' | 'APPROVED' | 'REJECTED';
19
+ kybCheckedAt: string | null;
20
+ /**
21
+ * Why it did not clear. Null once approved.
22
+ */
23
+ kybRejectionReason: string | null;
24
+ };
25
+
7
26
  export type PartnerCustomerDto = {
8
27
  id: string;
9
28
  firstName: string;
@@ -24,6 +43,38 @@ export type PartnerCustomerDto = {
24
43
  verifiedAt: string | null;
25
44
  createdAt: string;
26
45
  updatedAt: string;
46
+ /**
47
+ * Present only when this customer is a company. Absent on an individual.
48
+ */
49
+ business?: PartnerBusinessDto;
50
+ };
51
+
52
+ export type BusinessDetailsDto = {
53
+ /**
54
+ * Registered name, exactly as the incorporation record has it. Checked against the register during KYB.
55
+ */
56
+ legalName: string;
57
+ /**
58
+ * Company registration number — the RC number in Nigeria. Unique per country of incorporation.
59
+ */
60
+ registrationNumber: string;
61
+ /**
62
+ * ISO 3166-1 alpha-2 country of incorporation. Decides which register the KYB check runs against, so it is not necessarily where the customer trades.
63
+ */
64
+ country: string;
65
+ /**
66
+ * Trading name where it differs. Display only, never matched.
67
+ */
68
+ tradingName?: string;
69
+ addressLine1?: string;
70
+ addressLine2?: string;
71
+ city?: string;
72
+ /**
73
+ * State or province.
74
+ */
75
+ subdivision?: string;
76
+ postalCode?: string;
77
+ website?: string;
27
78
  };
28
79
 
29
80
  export type RegisterCustomerDto = {
@@ -35,6 +86,10 @@ export type RegisterCustomerDto = {
35
86
  * ISO alpha-2 country code
36
87
  */
37
88
  country: string;
89
+ /**
90
+ * Supply this to register the customer as a business. Omit it and the customer is an individual, exactly as before.
91
+ */
92
+ business?: BusinessDetailsDto;
38
93
  };
39
94
 
40
95
  export type KycStatus = 'PENDING' | 'REVIEW' | 'APPROVED' | 'REJECTED';
@@ -121,6 +176,29 @@ export type PartnerCustomerSnapshotDto = {
121
176
  wallet: PartnerCustomerWalletSnapshotDto;
122
177
  };
123
178
 
179
+ export type PartnerInvoiceDto = {
180
+ /**
181
+ * Pass as `invoiceId` when sending.
182
+ */
183
+ id: string;
184
+ fileName: string | null;
185
+ mimeType: string | null;
186
+ sizeBytes: number | null;
187
+ supplierName: string | null;
188
+ invoiceNumber: string | null;
189
+ /**
190
+ * Decimal string.
191
+ */
192
+ amount: string | null;
193
+ currency: string | null;
194
+ note: string | null;
195
+ /**
196
+ * The send this was attached to, or null while it is still unused.
197
+ */
198
+ usedByReference: string | null;
199
+ createdAt: string;
200
+ };
201
+
124
202
  /**
125
203
  * NOT_STARTED when nothing has been submitted for the tier; otherwise the decision on the newest submission.
126
204
  */
@@ -658,6 +736,10 @@ export type InitiateGlobalSendDto = {
658
736
  * Idempotency key. Resending the same value returns the existing send rather than moving money again — pass the client's request id. Letters, digits, dot, underscore and hyphen; 120 characters max.
659
737
  */
660
738
  reference?: string;
739
+ /**
740
+ * Id from POST .../invoices. Required when the customer is a business; ignored otherwise.
741
+ */
742
+ invoiceId?: string;
661
743
  };
662
744
 
663
745
  export type PartnerRampQuoteDto = {
@@ -1120,6 +1202,62 @@ export type CustomersFullResponses = {
1120
1202
 
1121
1203
  export type CustomersFullResponse = CustomersFullResponses[keyof CustomersFullResponses];
1122
1204
 
1205
+ export type InvoicesListData = {
1206
+ body?: never;
1207
+ path: {
1208
+ /**
1209
+ * Id of one of your customers, as returned by customers.register.
1210
+ */
1211
+ customerId: string;
1212
+ };
1213
+ query?: {
1214
+ /**
1215
+ * Page size.
1216
+ */
1217
+ limit?: number;
1218
+ /**
1219
+ * Opaque; the previous page's meta.nextCursor. Omit for the first page.
1220
+ */
1221
+ cursor?: string;
1222
+ };
1223
+ url: '/api/v1/partner/v1/customers/{customerId}/invoices';
1224
+ };
1225
+
1226
+ export type InvoicesListResponses = {
1227
+ 200: unknown;
1228
+ };
1229
+
1230
+ export type InvoicesUploadData = {
1231
+ body: {
1232
+ /**
1233
+ * The invoice: PDF, JPEG, PNG or WEBP, at most 10 MB.
1234
+ */
1235
+ file: Blob | File;
1236
+ supplierName?: string;
1237
+ invoiceNumber?: string;
1238
+ amount?: number;
1239
+ currency?: string;
1240
+ note?: string;
1241
+ };
1242
+ path: {
1243
+ /**
1244
+ * Id of one of your customers, as returned by customers.register.
1245
+ */
1246
+ customerId: string;
1247
+ };
1248
+ query?: never;
1249
+ url: '/api/v1/partner/v1/customers/{customerId}/invoices';
1250
+ };
1251
+
1252
+ export type InvoicesUploadResponses = {
1253
+ 201: {
1254
+ success: boolean;
1255
+ data: PartnerInvoiceDto;
1256
+ };
1257
+ };
1258
+
1259
+ export type InvoicesUploadResponse = InvoicesUploadResponses[keyof InvoicesUploadResponses];
1260
+
1123
1261
  export type KycSummaryData = {
1124
1262
  body?: never;
1125
1263
  path: {