@blindpay/node 1.0.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/LICENSE +21 -0
- package/README.md +124 -0
- package/dist/api-client-Cw2mNJeR.d.mts +349 -0
- package/dist/api-client-Cw2mNJeR.d.ts +349 -0
- package/dist/chunk-2DAKB5XK.mjs +212 -0
- package/dist/chunk-3CZJEDS5.mjs +41 -0
- package/dist/chunk-CNNEROQ7.mjs +46 -0
- package/dist/chunk-ES7RXEM7.mjs +245 -0
- package/dist/chunk-GCCHFONX.mjs +17893 -0
- package/dist/chunk-GEDDLCJY.mjs +77 -0
- package/dist/chunk-GNDAATIJ.mjs +35 -0
- package/dist/chunk-HKFAJXJG.mjs +65 -0
- package/dist/chunk-LK3JPQ6I.mjs +49 -0
- package/dist/chunk-LLWEHHKB.mjs +47 -0
- package/dist/chunk-LUDGZPXY.mjs +51 -0
- package/dist/chunk-M6IYYMRW.mjs +35 -0
- package/dist/chunk-OBKEW4AQ.mjs +91 -0
- package/dist/chunk-QHMIK7U3.mjs +24 -0
- package/dist/chunk-QVOSGLUO.mjs +36 -0
- package/dist/chunk-UCAW3RTZ.mjs +47 -0
- package/dist/chunk-VKN2AMCW.mjs +57 -0
- package/dist/index.d.mts +81 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +895 -0
- package/dist/index.mjs +95 -0
- package/dist/magic-string.es-6D2DRE4K.mjs +1325 -0
- package/dist/resources/api-keys/api-keys.test.d.mts +2 -0
- package/dist/resources/api-keys/api-keys.test.d.ts +2 -0
- package/dist/resources/api-keys/api-keys.test.js +19881 -0
- package/dist/resources/api-keys/api-keys.test.mjs +130 -0
- package/dist/resources/api-keys/index.d.mts +45 -0
- package/dist/resources/api-keys/index.d.ts +45 -0
- package/dist/resources/api-keys/index.js +64 -0
- package/dist/resources/api-keys/index.mjs +9 -0
- package/dist/resources/available/available.test.d.mts +2 -0
- package/dist/resources/available/available.test.d.ts +2 -0
- package/dist/resources/available/available.test.js +19877 -0
- package/dist/resources/available/available.test.mjs +122 -0
- package/dist/resources/available/index.d.mts +25 -0
- package/dist/resources/available/index.d.ts +25 -0
- package/dist/resources/available/index.js +39 -0
- package/dist/resources/available/index.mjs +9 -0
- package/dist/resources/bank-accounts/bank-accounts.test.d.mts +2 -0
- package/dist/resources/bank-accounts/bank-accounts.test.d.ts +2 -0
- package/dist/resources/bank-accounts/bank-accounts.test.js +20173 -0
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +418 -0
- package/dist/resources/bank-accounts/index.d.mts +414 -0
- package/dist/resources/bank-accounts/index.d.ts +414 -0
- package/dist/resources/bank-accounts/index.js +227 -0
- package/dist/resources/bank-accounts/index.mjs +9 -0
- package/dist/resources/instances/index.d.mts +42 -0
- package/dist/resources/instances/index.d.ts +42 -0
- package/dist/resources/instances/index.js +75 -0
- package/dist/resources/instances/index.mjs +9 -0
- package/dist/resources/instances/instances.test.d.mts +2 -0
- package/dist/resources/instances/instances.test.d.ts +2 -0
- package/dist/resources/instances/instances.test.js +19873 -0
- package/dist/resources/instances/instances.test.mjs +118 -0
- package/dist/resources/partner-fees/index.d.mts +65 -0
- package/dist/resources/partner-fees/index.d.ts +65 -0
- package/dist/resources/partner-fees/index.js +69 -0
- package/dist/resources/partner-fees/index.mjs +9 -0
- package/dist/resources/partner-fees/partner-fees.test.d.mts +2 -0
- package/dist/resources/partner-fees/partner-fees.test.d.ts +2 -0
- package/dist/resources/partner-fees/partner-fees.test.js +19889 -0
- package/dist/resources/partner-fees/partner-fees.test.mjs +134 -0
- package/dist/resources/payins/index.d.mts +200 -0
- package/dist/resources/payins/index.d.ts +200 -0
- package/dist/resources/payins/index.js +75 -0
- package/dist/resources/payins/index.mjs +9 -0
- package/dist/resources/payins/payins-quotes.test.d.mts +2 -0
- package/dist/resources/payins/payins-quotes.test.d.ts +2 -0
- package/dist/resources/payins/payins-quotes.test.js +19852 -0
- package/dist/resources/payins/payins-quotes.test.mjs +97 -0
- package/dist/resources/payins/payins.test.d.mts +2 -0
- package/dist/resources/payins/payins.test.d.ts +2 -0
- package/dist/resources/payins/payins.test.js +20268 -0
- package/dist/resources/payins/payins.test.mjs +513 -0
- package/dist/resources/payins/quotes.d.mts +45 -0
- package/dist/resources/payins/quotes.d.ts +45 -0
- package/dist/resources/payins/quotes.js +63 -0
- package/dist/resources/payins/quotes.mjs +9 -0
- package/dist/resources/payouts/index.d.mts +155 -0
- package/dist/resources/payouts/index.d.ts +155 -0
- package/dist/resources/payouts/index.js +93 -0
- package/dist/resources/payouts/index.mjs +9 -0
- package/dist/resources/payouts/payouts.test.d.mts +2 -0
- package/dist/resources/payouts/payouts.test.d.ts +2 -0
- package/dist/resources/payouts/payouts.test.js +20346 -0
- package/dist/resources/payouts/payouts.test.mjs +591 -0
- package/dist/resources/quotes/index.d.mts +59 -0
- package/dist/resources/quotes/index.d.ts +59 -0
- package/dist/resources/quotes/index.js +63 -0
- package/dist/resources/quotes/index.mjs +9 -0
- package/dist/resources/quotes/quotes.test.d.mts +2 -0
- package/dist/resources/quotes/quotes.test.d.ts +2 -0
- package/dist/resources/quotes/quotes.test.js +19866 -0
- package/dist/resources/quotes/quotes.test.mjs +111 -0
- package/dist/resources/receivers/index.d.mts +205 -0
- package/dist/resources/receivers/index.d.ts +205 -0
- package/dist/resources/receivers/index.js +85 -0
- package/dist/resources/receivers/index.mjs +9 -0
- package/dist/resources/receivers/receivers.test.d.mts +2 -0
- package/dist/resources/receivers/receivers.test.d.ts +2 -0
- package/dist/resources/receivers/receivers.test.js +20145 -0
- package/dist/resources/receivers/receivers.test.mjs +390 -0
- package/dist/resources/virtual-accounts/index.d.mts +58 -0
- package/dist/resources/virtual-accounts/index.d.ts +58 -0
- package/dist/resources/virtual-accounts/index.js +79 -0
- package/dist/resources/virtual-accounts/index.mjs +9 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.d.mts +2 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.d.ts +2 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +19902 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +147 -0
- package/dist/resources/wallets/blockchain.d.mts +83 -0
- package/dist/resources/wallets/blockchain.d.ts +83 -0
- package/dist/resources/wallets/blockchain.js +105 -0
- package/dist/resources/wallets/blockchain.mjs +9 -0
- package/dist/resources/wallets/blockchain.test.d.mts +2 -0
- package/dist/resources/wallets/blockchain.test.d.ts +2 -0
- package/dist/resources/wallets/blockchain.test.js +19897 -0
- package/dist/resources/wallets/blockchain.test.mjs +142 -0
- package/dist/resources/wallets/offramp.d.mts +46 -0
- package/dist/resources/wallets/offramp.d.ts +46 -0
- package/dist/resources/wallets/offramp.js +77 -0
- package/dist/resources/wallets/offramp.mjs +9 -0
- package/dist/resources/wallets/offramp.test.d.mts +2 -0
- package/dist/resources/wallets/offramp.test.d.ts +2 -0
- package/dist/resources/wallets/offramp.test.js +19872 -0
- package/dist/resources/wallets/offramp.test.mjs +117 -0
- package/dist/resources/webhooks/index.d.mts +49 -0
- package/dist/resources/webhooks/index.d.ts +49 -0
- package/dist/resources/webhooks/index.js +74 -0
- package/dist/resources/webhooks/index.mjs +9 -0
- package/dist/resources/webhooks/webhooks.test.d.mts +2 -0
- package/dist/resources/webhooks/webhooks.test.d.ts +2 -0
- package/dist/resources/webhooks/webhooks.test.js +19878 -0
- package/dist/resources/webhooks/webhooks.test.mjs +123 -0
- package/package.json +65 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
afterEach,
|
|
3
|
+
describe,
|
|
4
|
+
globalExpect,
|
|
5
|
+
init_dist,
|
|
6
|
+
it
|
|
7
|
+
} from "../../chunk-GCCHFONX.mjs";
|
|
8
|
+
import {
|
|
9
|
+
Blindpay,
|
|
10
|
+
init_client
|
|
11
|
+
} from "../../chunk-ES7RXEM7.mjs";
|
|
12
|
+
import "../../chunk-GEDDLCJY.mjs";
|
|
13
|
+
import "../../chunk-LK3JPQ6I.mjs";
|
|
14
|
+
import "../../chunk-CNNEROQ7.mjs";
|
|
15
|
+
import "../../chunk-GNDAATIJ.mjs";
|
|
16
|
+
import "../../chunk-VKN2AMCW.mjs";
|
|
17
|
+
import "../../chunk-LUDGZPXY.mjs";
|
|
18
|
+
import "../../chunk-3CZJEDS5.mjs";
|
|
19
|
+
import "../../chunk-UCAW3RTZ.mjs";
|
|
20
|
+
import "../../chunk-M6IYYMRW.mjs";
|
|
21
|
+
import "../../chunk-HKFAJXJG.mjs";
|
|
22
|
+
import "../../chunk-QVOSGLUO.mjs";
|
|
23
|
+
import "../../chunk-2DAKB5XK.mjs";
|
|
24
|
+
import "../../chunk-QHMIK7U3.mjs";
|
|
25
|
+
import "../../chunk-LLWEHHKB.mjs";
|
|
26
|
+
import {
|
|
27
|
+
__async,
|
|
28
|
+
__commonJS
|
|
29
|
+
} from "../../chunk-OBKEW4AQ.mjs";
|
|
30
|
+
|
|
31
|
+
// src/resources/quotes/quotes.test.ts
|
|
32
|
+
var require_quotes_test = __commonJS({
|
|
33
|
+
"src/resources/quotes/quotes.test.ts"(exports) {
|
|
34
|
+
init_dist();
|
|
35
|
+
init_client();
|
|
36
|
+
describe("Quotes", () => {
|
|
37
|
+
afterEach(() => fetchMock.resetMocks());
|
|
38
|
+
const blindpay = new Blindpay("test-key");
|
|
39
|
+
describe("Create quote", () => {
|
|
40
|
+
it("should create a quote", () => __async(null, null, function* () {
|
|
41
|
+
const mockedQuote = {
|
|
42
|
+
id: "qu_000000000000",
|
|
43
|
+
expires_at: 1712958191,
|
|
44
|
+
commercial_quotation: 495,
|
|
45
|
+
blindpay_quotation: 485,
|
|
46
|
+
receiver_amount: 5240,
|
|
47
|
+
sender_amount: 1010,
|
|
48
|
+
partner_fee_amount: 150,
|
|
49
|
+
flat_fee: 50,
|
|
50
|
+
contract: {
|
|
51
|
+
abi: [{}],
|
|
52
|
+
address: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
|
|
53
|
+
functionName: "approve",
|
|
54
|
+
blindpayContractAddress: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
|
|
55
|
+
amount: "1000000000000000000",
|
|
56
|
+
network: {
|
|
57
|
+
name: "Ethereum",
|
|
58
|
+
chainId: 1
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
receiver_local_amount: 1e3,
|
|
62
|
+
description: "Memo code or description, only works with USD and BRL"
|
|
63
|
+
};
|
|
64
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedQuote), {
|
|
65
|
+
headers: { "Content-Type": "application/json" }
|
|
66
|
+
});
|
|
67
|
+
const { data, error } = yield blindpay.quotes.create({
|
|
68
|
+
instanceId: "in_000000000000",
|
|
69
|
+
bank_account_id: "ba_000000000000",
|
|
70
|
+
currency_type: "sender",
|
|
71
|
+
network: "sepolia",
|
|
72
|
+
request_amount: 1e3,
|
|
73
|
+
token: "USDC",
|
|
74
|
+
cover_fees: true,
|
|
75
|
+
description: "Memo code or description, only works with USD and BRL",
|
|
76
|
+
partner_fee_id: "pf_000000000000",
|
|
77
|
+
transaction_document_file: null,
|
|
78
|
+
transaction_document_id: null,
|
|
79
|
+
transaction_document_type: "invoice"
|
|
80
|
+
});
|
|
81
|
+
globalExpect(error).toBeNull();
|
|
82
|
+
globalExpect(data).toEqual(mockedQuote);
|
|
83
|
+
}));
|
|
84
|
+
});
|
|
85
|
+
describe("Get FX rate", () => {
|
|
86
|
+
it("should get FX rate", () => __async(null, null, function* () {
|
|
87
|
+
const mockedFxRate = {
|
|
88
|
+
commercial_quotation: 495,
|
|
89
|
+
blindpay_quotation: 485,
|
|
90
|
+
result_amount: 1,
|
|
91
|
+
instance_flat_fee: 50,
|
|
92
|
+
instance_percentage_fee: 0
|
|
93
|
+
};
|
|
94
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedFxRate), {
|
|
95
|
+
headers: { "Content-Type": "application/json" }
|
|
96
|
+
});
|
|
97
|
+
const { data, error } = yield blindpay.quotes.getFxRate({
|
|
98
|
+
instanceId: "in_000000000000",
|
|
99
|
+
currency_type: "sender",
|
|
100
|
+
from: "USD",
|
|
101
|
+
to: "BRL",
|
|
102
|
+
request_amount: 1e3
|
|
103
|
+
});
|
|
104
|
+
globalExpect(error).toBeNull();
|
|
105
|
+
globalExpect(data).toEqual(mockedFxRate);
|
|
106
|
+
}));
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export default require_quotes_test();
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse, A as AccountClass, C as Country } from '../../api-client-Cw2mNJeR.mjs';
|
|
2
|
+
|
|
3
|
+
type ProofOfAddressDocType = "UTILITY_BILL" | "BANK_STATEMENT" | "RENTAL_AGREEMENT" | "TAX_DOCUMENT" | "GOVERNMENT_CORRESPONDENCE";
|
|
4
|
+
type PurposeOfTransactions = "business_transactions" | "charitable_donations" | "investment_purposes" | "payments_to_friends_or_family_abroad" | "personal_or_living_expenses";
|
|
5
|
+
type SourceOfFundsDocType = "business_income" | "gambling_proceeds" | "gifts" | "government_benefits" | "inheritance";
|
|
6
|
+
type IdentificationDocument = "PASSPORT" | "ID_CARD" | "DRIVERS";
|
|
7
|
+
type KycType = "light" | "standard" | "enhanced";
|
|
8
|
+
type OwnerRole = "beneficial_controlling" | "beneficial_owner" | "controlling_person";
|
|
9
|
+
type Owner = {
|
|
10
|
+
address_line_1: string;
|
|
11
|
+
address_line_2: string;
|
|
12
|
+
city: string;
|
|
13
|
+
country: Country;
|
|
14
|
+
date_of_birth: string;
|
|
15
|
+
first_name: string;
|
|
16
|
+
id_doc_country: Country;
|
|
17
|
+
id_doc_front_file: string;
|
|
18
|
+
id_doc_type: IdentificationDocument;
|
|
19
|
+
last_name: string;
|
|
20
|
+
postal_code: string;
|
|
21
|
+
role: OwnerRole;
|
|
22
|
+
state_province_region: string;
|
|
23
|
+
tax_id: string;
|
|
24
|
+
id_doc_back_file: string;
|
|
25
|
+
proof_of_address_doc_file: string;
|
|
26
|
+
proof_of_address_doc_type: ProofOfAddressDocType;
|
|
27
|
+
};
|
|
28
|
+
type Receiver = {
|
|
29
|
+
id: string;
|
|
30
|
+
type: AccountClass;
|
|
31
|
+
kyc_type: KycType;
|
|
32
|
+
kyc_status: string;
|
|
33
|
+
kyc_warnings: Array<{
|
|
34
|
+
code: string | null;
|
|
35
|
+
message: string | null;
|
|
36
|
+
resolution_status: string | null;
|
|
37
|
+
warning_id: string | null;
|
|
38
|
+
}>;
|
|
39
|
+
email: string;
|
|
40
|
+
tax_id: string;
|
|
41
|
+
address_line_1: string;
|
|
42
|
+
address_line_2?: string;
|
|
43
|
+
city: string;
|
|
44
|
+
state_province_region: string;
|
|
45
|
+
country: Country;
|
|
46
|
+
postal_code: string;
|
|
47
|
+
ip_address: string;
|
|
48
|
+
image_url: string;
|
|
49
|
+
phone_number: string;
|
|
50
|
+
proof_of_address_doc_type: ProofOfAddressDocType;
|
|
51
|
+
proof_of_address_doc_file: string;
|
|
52
|
+
first_name: string;
|
|
53
|
+
last_name: string;
|
|
54
|
+
date_of_birth: string;
|
|
55
|
+
id_doc_country: Country;
|
|
56
|
+
id_doc_type: IdentificationDocument;
|
|
57
|
+
id_doc_front_file: string;
|
|
58
|
+
id_doc_back_file: string;
|
|
59
|
+
legal_name: string;
|
|
60
|
+
alternate_name: string;
|
|
61
|
+
formation_date: string;
|
|
62
|
+
website: string;
|
|
63
|
+
owners: Array<{
|
|
64
|
+
id: string;
|
|
65
|
+
} & Pick<Owner, "first_name" | "last_name" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
|
|
66
|
+
incorporation_doc_file: string;
|
|
67
|
+
proof_of_ownership_doc_file: string;
|
|
68
|
+
source_of_funds_doc_type: SourceOfFundsDocType;
|
|
69
|
+
source_of_funds_doc_file: string;
|
|
70
|
+
individual_holding_doc_front_file: string;
|
|
71
|
+
purpose_of_transactions: PurposeOfTransactions;
|
|
72
|
+
purpose_of_transactions_explanation: string;
|
|
73
|
+
external_id: string;
|
|
74
|
+
instance_id: string;
|
|
75
|
+
tos_id: string;
|
|
76
|
+
aiprise_validation_key: string;
|
|
77
|
+
created_at: string;
|
|
78
|
+
updated_at: string;
|
|
79
|
+
limit: {
|
|
80
|
+
per_transaction: number;
|
|
81
|
+
daily: number;
|
|
82
|
+
monthly: number;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
type ListReceiversInput = {
|
|
86
|
+
instanceId: string;
|
|
87
|
+
};
|
|
88
|
+
type ListReceiversResponse = Receiver[];
|
|
89
|
+
type CreateReceiverInput = {
|
|
90
|
+
instanceId: string;
|
|
91
|
+
country: Country;
|
|
92
|
+
kyc_type: KycType;
|
|
93
|
+
type: AccountClass;
|
|
94
|
+
address_line_1: string;
|
|
95
|
+
address_line_2?: string;
|
|
96
|
+
city: string;
|
|
97
|
+
image_url: string;
|
|
98
|
+
ip_address: string;
|
|
99
|
+
postal_code: string;
|
|
100
|
+
state_province_region: string;
|
|
101
|
+
tax_id: string;
|
|
102
|
+
alternate_name?: string;
|
|
103
|
+
date_of_birth: string;
|
|
104
|
+
external_id: string;
|
|
105
|
+
first_name: string;
|
|
106
|
+
formation_date: string;
|
|
107
|
+
id_doc_back_file: string;
|
|
108
|
+
id_doc_front_file: string;
|
|
109
|
+
id_doc_type: IdentificationDocument;
|
|
110
|
+
id_doc_country: Country;
|
|
111
|
+
email: string;
|
|
112
|
+
incorporation_doc_file: string;
|
|
113
|
+
individual_holding_doc_front_file: string;
|
|
114
|
+
last_name: string;
|
|
115
|
+
legal_name: string;
|
|
116
|
+
owners: Owner[];
|
|
117
|
+
phone_number: string;
|
|
118
|
+
proof_of_address_doc_file: string;
|
|
119
|
+
proof_of_address_doc_type: ProofOfAddressDocType;
|
|
120
|
+
proof_of_ownership_doc_file: string;
|
|
121
|
+
purpose_of_transactions: PurposeOfTransactions;
|
|
122
|
+
purpose_of_transactions_explanation: string;
|
|
123
|
+
source_of_funds_doc_file: string;
|
|
124
|
+
source_of_funds_doc_type: SourceOfFundsDocType;
|
|
125
|
+
tos_id: string;
|
|
126
|
+
website: string;
|
|
127
|
+
};
|
|
128
|
+
type CreateReceiverResponse = {
|
|
129
|
+
id: string;
|
|
130
|
+
};
|
|
131
|
+
type GetReceiverInput = {
|
|
132
|
+
instanceId: string;
|
|
133
|
+
id: string;
|
|
134
|
+
};
|
|
135
|
+
type GetReceiverResponse = Receiver;
|
|
136
|
+
type UpdateReceiverInput = {
|
|
137
|
+
instanceId: string;
|
|
138
|
+
id: string;
|
|
139
|
+
email?: string;
|
|
140
|
+
tax_id?: string;
|
|
141
|
+
address_line_1?: string;
|
|
142
|
+
address_line_2?: string;
|
|
143
|
+
city?: string;
|
|
144
|
+
state_province_region?: string;
|
|
145
|
+
country?: Country;
|
|
146
|
+
postal_code?: string;
|
|
147
|
+
ip_address?: string;
|
|
148
|
+
image_url?: string;
|
|
149
|
+
phone_number?: string;
|
|
150
|
+
proof_of_address_doc_type?: ProofOfAddressDocType;
|
|
151
|
+
proof_of_address_doc_file?: string;
|
|
152
|
+
first_name?: string;
|
|
153
|
+
last_name?: string;
|
|
154
|
+
date_of_birth?: string;
|
|
155
|
+
id_doc_country?: Country;
|
|
156
|
+
id_doc_type?: IdentificationDocument;
|
|
157
|
+
id_doc_front_file?: string;
|
|
158
|
+
id_doc_back_file?: string;
|
|
159
|
+
legal_name?: string;
|
|
160
|
+
alternate_name?: string;
|
|
161
|
+
formation_date?: string;
|
|
162
|
+
website?: string;
|
|
163
|
+
owners?: Array<{
|
|
164
|
+
id: string;
|
|
165
|
+
} & Pick<Owner, "first_name" | "last_name" | "role" | "date_of_birth" | "tax_id" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
|
|
166
|
+
incorporation_doc_file?: string;
|
|
167
|
+
proof_of_ownership_doc_file?: string;
|
|
168
|
+
source_of_funds_doc_type?: SourceOfFundsDocType;
|
|
169
|
+
source_of_funds_doc_file?: string;
|
|
170
|
+
individual_holding_doc_front_file?: string;
|
|
171
|
+
purpose_of_transactions?: PurposeOfTransactions;
|
|
172
|
+
purpose_of_transactions_explanation?: string;
|
|
173
|
+
external_id?: string;
|
|
174
|
+
tos_id?: string;
|
|
175
|
+
};
|
|
176
|
+
type DeleteReceiverInput = {
|
|
177
|
+
instanceId: string;
|
|
178
|
+
id: string;
|
|
179
|
+
};
|
|
180
|
+
type GetReceiverLimitsInput = {
|
|
181
|
+
instanceId: string;
|
|
182
|
+
id: string;
|
|
183
|
+
};
|
|
184
|
+
type GetReceiverLimitsResponse = {
|
|
185
|
+
limits: {
|
|
186
|
+
payin: {
|
|
187
|
+
daily: number;
|
|
188
|
+
monthly: number;
|
|
189
|
+
};
|
|
190
|
+
payout: {
|
|
191
|
+
daily: number;
|
|
192
|
+
monthly: number;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
declare function createReceiversResource(client: InternalApiClient): {
|
|
197
|
+
list({ instanceId, }: ListReceiversInput): Promise<BlindpayApiResponse<ListReceiversResponse>>;
|
|
198
|
+
create({ instanceId, ...data }: CreateReceiverInput): Promise<BlindpayApiResponse<CreateReceiverResponse>>;
|
|
199
|
+
get({ instanceId, id, }: GetReceiverInput): Promise<BlindpayApiResponse<GetReceiverResponse>>;
|
|
200
|
+
update({ instanceId, id, ...data }: UpdateReceiverInput): Promise<BlindpayApiResponse<void>>;
|
|
201
|
+
delete({ instanceId, id }: DeleteReceiverInput): Promise<BlindpayApiResponse<void>>;
|
|
202
|
+
getLimits({ instanceId, id, }: GetReceiverLimitsInput): Promise<BlindpayApiResponse<GetReceiverLimitsResponse>>;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export { type CreateReceiverInput, type CreateReceiverResponse, type DeleteReceiverInput, type GetReceiverInput, type GetReceiverLimitsInput, type GetReceiverLimitsResponse, type GetReceiverResponse, type IdentificationDocument, type KycType, type ListReceiversInput, type ListReceiversResponse, type Owner, type OwnerRole, type ProofOfAddressDocType, type PurposeOfTransactions, type Receiver, type SourceOfFundsDocType, type UpdateReceiverInput, createReceiversResource };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse, A as AccountClass, C as Country } from '../../api-client-Cw2mNJeR.js';
|
|
2
|
+
|
|
3
|
+
type ProofOfAddressDocType = "UTILITY_BILL" | "BANK_STATEMENT" | "RENTAL_AGREEMENT" | "TAX_DOCUMENT" | "GOVERNMENT_CORRESPONDENCE";
|
|
4
|
+
type PurposeOfTransactions = "business_transactions" | "charitable_donations" | "investment_purposes" | "payments_to_friends_or_family_abroad" | "personal_or_living_expenses";
|
|
5
|
+
type SourceOfFundsDocType = "business_income" | "gambling_proceeds" | "gifts" | "government_benefits" | "inheritance";
|
|
6
|
+
type IdentificationDocument = "PASSPORT" | "ID_CARD" | "DRIVERS";
|
|
7
|
+
type KycType = "light" | "standard" | "enhanced";
|
|
8
|
+
type OwnerRole = "beneficial_controlling" | "beneficial_owner" | "controlling_person";
|
|
9
|
+
type Owner = {
|
|
10
|
+
address_line_1: string;
|
|
11
|
+
address_line_2: string;
|
|
12
|
+
city: string;
|
|
13
|
+
country: Country;
|
|
14
|
+
date_of_birth: string;
|
|
15
|
+
first_name: string;
|
|
16
|
+
id_doc_country: Country;
|
|
17
|
+
id_doc_front_file: string;
|
|
18
|
+
id_doc_type: IdentificationDocument;
|
|
19
|
+
last_name: string;
|
|
20
|
+
postal_code: string;
|
|
21
|
+
role: OwnerRole;
|
|
22
|
+
state_province_region: string;
|
|
23
|
+
tax_id: string;
|
|
24
|
+
id_doc_back_file: string;
|
|
25
|
+
proof_of_address_doc_file: string;
|
|
26
|
+
proof_of_address_doc_type: ProofOfAddressDocType;
|
|
27
|
+
};
|
|
28
|
+
type Receiver = {
|
|
29
|
+
id: string;
|
|
30
|
+
type: AccountClass;
|
|
31
|
+
kyc_type: KycType;
|
|
32
|
+
kyc_status: string;
|
|
33
|
+
kyc_warnings: Array<{
|
|
34
|
+
code: string | null;
|
|
35
|
+
message: string | null;
|
|
36
|
+
resolution_status: string | null;
|
|
37
|
+
warning_id: string | null;
|
|
38
|
+
}>;
|
|
39
|
+
email: string;
|
|
40
|
+
tax_id: string;
|
|
41
|
+
address_line_1: string;
|
|
42
|
+
address_line_2?: string;
|
|
43
|
+
city: string;
|
|
44
|
+
state_province_region: string;
|
|
45
|
+
country: Country;
|
|
46
|
+
postal_code: string;
|
|
47
|
+
ip_address: string;
|
|
48
|
+
image_url: string;
|
|
49
|
+
phone_number: string;
|
|
50
|
+
proof_of_address_doc_type: ProofOfAddressDocType;
|
|
51
|
+
proof_of_address_doc_file: string;
|
|
52
|
+
first_name: string;
|
|
53
|
+
last_name: string;
|
|
54
|
+
date_of_birth: string;
|
|
55
|
+
id_doc_country: Country;
|
|
56
|
+
id_doc_type: IdentificationDocument;
|
|
57
|
+
id_doc_front_file: string;
|
|
58
|
+
id_doc_back_file: string;
|
|
59
|
+
legal_name: string;
|
|
60
|
+
alternate_name: string;
|
|
61
|
+
formation_date: string;
|
|
62
|
+
website: string;
|
|
63
|
+
owners: Array<{
|
|
64
|
+
id: string;
|
|
65
|
+
} & Pick<Owner, "first_name" | "last_name" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
|
|
66
|
+
incorporation_doc_file: string;
|
|
67
|
+
proof_of_ownership_doc_file: string;
|
|
68
|
+
source_of_funds_doc_type: SourceOfFundsDocType;
|
|
69
|
+
source_of_funds_doc_file: string;
|
|
70
|
+
individual_holding_doc_front_file: string;
|
|
71
|
+
purpose_of_transactions: PurposeOfTransactions;
|
|
72
|
+
purpose_of_transactions_explanation: string;
|
|
73
|
+
external_id: string;
|
|
74
|
+
instance_id: string;
|
|
75
|
+
tos_id: string;
|
|
76
|
+
aiprise_validation_key: string;
|
|
77
|
+
created_at: string;
|
|
78
|
+
updated_at: string;
|
|
79
|
+
limit: {
|
|
80
|
+
per_transaction: number;
|
|
81
|
+
daily: number;
|
|
82
|
+
monthly: number;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
type ListReceiversInput = {
|
|
86
|
+
instanceId: string;
|
|
87
|
+
};
|
|
88
|
+
type ListReceiversResponse = Receiver[];
|
|
89
|
+
type CreateReceiverInput = {
|
|
90
|
+
instanceId: string;
|
|
91
|
+
country: Country;
|
|
92
|
+
kyc_type: KycType;
|
|
93
|
+
type: AccountClass;
|
|
94
|
+
address_line_1: string;
|
|
95
|
+
address_line_2?: string;
|
|
96
|
+
city: string;
|
|
97
|
+
image_url: string;
|
|
98
|
+
ip_address: string;
|
|
99
|
+
postal_code: string;
|
|
100
|
+
state_province_region: string;
|
|
101
|
+
tax_id: string;
|
|
102
|
+
alternate_name?: string;
|
|
103
|
+
date_of_birth: string;
|
|
104
|
+
external_id: string;
|
|
105
|
+
first_name: string;
|
|
106
|
+
formation_date: string;
|
|
107
|
+
id_doc_back_file: string;
|
|
108
|
+
id_doc_front_file: string;
|
|
109
|
+
id_doc_type: IdentificationDocument;
|
|
110
|
+
id_doc_country: Country;
|
|
111
|
+
email: string;
|
|
112
|
+
incorporation_doc_file: string;
|
|
113
|
+
individual_holding_doc_front_file: string;
|
|
114
|
+
last_name: string;
|
|
115
|
+
legal_name: string;
|
|
116
|
+
owners: Owner[];
|
|
117
|
+
phone_number: string;
|
|
118
|
+
proof_of_address_doc_file: string;
|
|
119
|
+
proof_of_address_doc_type: ProofOfAddressDocType;
|
|
120
|
+
proof_of_ownership_doc_file: string;
|
|
121
|
+
purpose_of_transactions: PurposeOfTransactions;
|
|
122
|
+
purpose_of_transactions_explanation: string;
|
|
123
|
+
source_of_funds_doc_file: string;
|
|
124
|
+
source_of_funds_doc_type: SourceOfFundsDocType;
|
|
125
|
+
tos_id: string;
|
|
126
|
+
website: string;
|
|
127
|
+
};
|
|
128
|
+
type CreateReceiverResponse = {
|
|
129
|
+
id: string;
|
|
130
|
+
};
|
|
131
|
+
type GetReceiverInput = {
|
|
132
|
+
instanceId: string;
|
|
133
|
+
id: string;
|
|
134
|
+
};
|
|
135
|
+
type GetReceiverResponse = Receiver;
|
|
136
|
+
type UpdateReceiverInput = {
|
|
137
|
+
instanceId: string;
|
|
138
|
+
id: string;
|
|
139
|
+
email?: string;
|
|
140
|
+
tax_id?: string;
|
|
141
|
+
address_line_1?: string;
|
|
142
|
+
address_line_2?: string;
|
|
143
|
+
city?: string;
|
|
144
|
+
state_province_region?: string;
|
|
145
|
+
country?: Country;
|
|
146
|
+
postal_code?: string;
|
|
147
|
+
ip_address?: string;
|
|
148
|
+
image_url?: string;
|
|
149
|
+
phone_number?: string;
|
|
150
|
+
proof_of_address_doc_type?: ProofOfAddressDocType;
|
|
151
|
+
proof_of_address_doc_file?: string;
|
|
152
|
+
first_name?: string;
|
|
153
|
+
last_name?: string;
|
|
154
|
+
date_of_birth?: string;
|
|
155
|
+
id_doc_country?: Country;
|
|
156
|
+
id_doc_type?: IdentificationDocument;
|
|
157
|
+
id_doc_front_file?: string;
|
|
158
|
+
id_doc_back_file?: string;
|
|
159
|
+
legal_name?: string;
|
|
160
|
+
alternate_name?: string;
|
|
161
|
+
formation_date?: string;
|
|
162
|
+
website?: string;
|
|
163
|
+
owners?: Array<{
|
|
164
|
+
id: string;
|
|
165
|
+
} & Pick<Owner, "first_name" | "last_name" | "role" | "date_of_birth" | "tax_id" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
|
|
166
|
+
incorporation_doc_file?: string;
|
|
167
|
+
proof_of_ownership_doc_file?: string;
|
|
168
|
+
source_of_funds_doc_type?: SourceOfFundsDocType;
|
|
169
|
+
source_of_funds_doc_file?: string;
|
|
170
|
+
individual_holding_doc_front_file?: string;
|
|
171
|
+
purpose_of_transactions?: PurposeOfTransactions;
|
|
172
|
+
purpose_of_transactions_explanation?: string;
|
|
173
|
+
external_id?: string;
|
|
174
|
+
tos_id?: string;
|
|
175
|
+
};
|
|
176
|
+
type DeleteReceiverInput = {
|
|
177
|
+
instanceId: string;
|
|
178
|
+
id: string;
|
|
179
|
+
};
|
|
180
|
+
type GetReceiverLimitsInput = {
|
|
181
|
+
instanceId: string;
|
|
182
|
+
id: string;
|
|
183
|
+
};
|
|
184
|
+
type GetReceiverLimitsResponse = {
|
|
185
|
+
limits: {
|
|
186
|
+
payin: {
|
|
187
|
+
daily: number;
|
|
188
|
+
monthly: number;
|
|
189
|
+
};
|
|
190
|
+
payout: {
|
|
191
|
+
daily: number;
|
|
192
|
+
monthly: number;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
declare function createReceiversResource(client: InternalApiClient): {
|
|
197
|
+
list({ instanceId, }: ListReceiversInput): Promise<BlindpayApiResponse<ListReceiversResponse>>;
|
|
198
|
+
create({ instanceId, ...data }: CreateReceiverInput): Promise<BlindpayApiResponse<CreateReceiverResponse>>;
|
|
199
|
+
get({ instanceId, id, }: GetReceiverInput): Promise<BlindpayApiResponse<GetReceiverResponse>>;
|
|
200
|
+
update({ instanceId, id, ...data }: UpdateReceiverInput): Promise<BlindpayApiResponse<void>>;
|
|
201
|
+
delete({ instanceId, id }: DeleteReceiverInput): Promise<BlindpayApiResponse<void>>;
|
|
202
|
+
getLimits({ instanceId, id, }: GetReceiverLimitsInput): Promise<BlindpayApiResponse<GetReceiverLimitsResponse>>;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export { type CreateReceiverInput, type CreateReceiverResponse, type DeleteReceiverInput, type GetReceiverInput, type GetReceiverLimitsInput, type GetReceiverLimitsResponse, type GetReceiverResponse, type IdentificationDocument, type KycType, type ListReceiversInput, type ListReceiversResponse, type Owner, type OwnerRole, type ProofOfAddressDocType, type PurposeOfTransactions, type Receiver, type SourceOfFundsDocType, type UpdateReceiverInput, createReceiversResource };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __objRest = (source, exclude) => {
|
|
9
|
+
var target = {};
|
|
10
|
+
for (var prop in source)
|
|
11
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
12
|
+
target[prop] = source[prop];
|
|
13
|
+
if (source != null && __getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
15
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
16
|
+
target[prop] = source[prop];
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
+
|
|
34
|
+
// src/resources/receivers/index.ts
|
|
35
|
+
var receivers_exports = {};
|
|
36
|
+
__export(receivers_exports, {
|
|
37
|
+
createReceiversResource: () => createReceiversResource
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(receivers_exports);
|
|
40
|
+
function createReceiversResource(client) {
|
|
41
|
+
return {
|
|
42
|
+
list({
|
|
43
|
+
instanceId
|
|
44
|
+
}) {
|
|
45
|
+
return client.get(`/instances/${instanceId}/receivers`);
|
|
46
|
+
},
|
|
47
|
+
create(_a) {
|
|
48
|
+
var _b = _a, {
|
|
49
|
+
instanceId
|
|
50
|
+
} = _b, data = __objRest(_b, [
|
|
51
|
+
"instanceId"
|
|
52
|
+
]);
|
|
53
|
+
return client.post(`/instances/${instanceId}/receivers`, data);
|
|
54
|
+
},
|
|
55
|
+
get({
|
|
56
|
+
instanceId,
|
|
57
|
+
id
|
|
58
|
+
}) {
|
|
59
|
+
return client.get(`/instances/${instanceId}/receivers/${id}`);
|
|
60
|
+
},
|
|
61
|
+
update(_c) {
|
|
62
|
+
var _d = _c, {
|
|
63
|
+
instanceId,
|
|
64
|
+
id
|
|
65
|
+
} = _d, data = __objRest(_d, [
|
|
66
|
+
"instanceId",
|
|
67
|
+
"id"
|
|
68
|
+
]);
|
|
69
|
+
return client.patch(`/instances/${instanceId}/receivers/${id}`, data);
|
|
70
|
+
},
|
|
71
|
+
delete({ instanceId, id }) {
|
|
72
|
+
return client.delete(`/instances/${instanceId}/receivers/${id}`);
|
|
73
|
+
},
|
|
74
|
+
getLimits({
|
|
75
|
+
instanceId,
|
|
76
|
+
id
|
|
77
|
+
}) {
|
|
78
|
+
return client.get(`/instances/${instanceId}/limits/receivers/${id}`);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
createReceiversResource
|
|
85
|
+
});
|