@blindpay/node 1.2.0 → 2.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/dist/{chunk-BONN6PYB.mjs → chunk-MPJKYFDD.mjs} +9 -4
- package/dist/{chunk-E4S6NTNE.mjs → chunk-URXUVGMC.mjs} +6 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -5
- package/dist/index.mjs +6 -6
- package/dist/resources/api-keys/api-keys.test.js +10 -5
- package/dist/resources/api-keys/api-keys.test.mjs +3 -3
- package/dist/resources/available/available.test.js +10 -5
- package/dist/resources/available/available.test.mjs +3 -3
- package/dist/resources/bank-accounts/bank-accounts.test.js +10 -5
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +3 -3
- package/dist/resources/instances/instances.test.js +10 -5
- package/dist/resources/instances/instances.test.mjs +3 -3
- package/dist/resources/partner-fees/partner-fees.test.js +10 -5
- package/dist/resources/partner-fees/partner-fees.test.mjs +3 -3
- package/dist/resources/payins/payins-quotes.test.js +10 -5
- package/dist/resources/payins/payins-quotes.test.mjs +3 -3
- package/dist/resources/payins/payins.test.js +10 -5
- package/dist/resources/payins/payins.test.mjs +3 -3
- package/dist/resources/payouts/payouts.test.js +10 -5
- package/dist/resources/payouts/payouts.test.mjs +3 -3
- package/dist/resources/quotes/quotes.test.js +10 -5
- package/dist/resources/quotes/quotes.test.mjs +3 -3
- package/dist/resources/receivers/index.d.mts +169 -53
- package/dist/resources/receivers/index.d.ts +169 -53
- package/dist/resources/receivers/index.js +9 -4
- package/dist/resources/receivers/index.mjs +1 -1
- package/dist/resources/receivers/receivers.test.js +278 -171
- package/dist/resources/receivers/receivers.test.mjs +271 -169
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +10 -5
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +3 -3
- package/dist/resources/wallets/blockchain.test.js +10 -5
- package/dist/resources/wallets/blockchain.test.mjs +3 -3
- package/dist/resources/wallets/offramp.test.js +10 -5
- package/dist/resources/wallets/offramp.test.mjs +3 -3
- package/dist/resources/webhooks/webhooks.test.js +10 -5
- package/dist/resources/webhooks/webhooks.test.mjs +3 -3
- package/package.json +1 -1
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-URXUVGMC.mjs";
|
|
12
12
|
import "../../chunk-IZYPRCCV.mjs";
|
|
13
13
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
14
|
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
|
-
import "../../chunk-
|
|
16
|
+
import "../../chunk-MPJKYFDD.mjs";
|
|
17
17
|
import "../../chunk-5XJJKYXE.mjs";
|
|
18
|
+
import "../../chunk-CPOSU35L.mjs";
|
|
18
19
|
import "../../chunk-RC5NN5UF.mjs";
|
|
19
20
|
import "../../chunk-W7NJUABI.mjs";
|
|
20
21
|
import "../../chunk-E7M4CJKR.mjs";
|
|
21
22
|
import "../../chunk-3QQCDR3E.mjs";
|
|
22
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
23
24
|
import "../../chunk-QHMIK7U3.mjs";
|
|
24
|
-
import "../../chunk-CPOSU35L.mjs";
|
|
25
25
|
import "../../chunk-B5T7AQLH.mjs";
|
|
26
26
|
import {
|
|
27
27
|
__async,
|
|
@@ -40,7 +40,7 @@ var require_receivers_test = __commonJS({
|
|
|
40
40
|
it("should list receivers", () => __async(null, null, function* () {
|
|
41
41
|
const mockedReceivers = [
|
|
42
42
|
{
|
|
43
|
-
id: "
|
|
43
|
+
id: "re_Euw7HN4OdxPn",
|
|
44
44
|
type: "individual",
|
|
45
45
|
kyc_type: "standard",
|
|
46
46
|
kyc_status: "verifying",
|
|
@@ -52,64 +52,138 @@ var require_receivers_test = __commonJS({
|
|
|
52
52
|
warning_id: null
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
|
-
email: "
|
|
56
|
-
tax_id: "
|
|
57
|
-
address_line_1: "
|
|
58
|
-
address_line_2: "
|
|
59
|
-
city: "
|
|
60
|
-
state_province_region: "
|
|
61
|
-
country: "
|
|
62
|
-
postal_code: "
|
|
55
|
+
email: "bernardo@gmail.com",
|
|
56
|
+
tax_id: "12345678900",
|
|
57
|
+
address_line_1: "Av. Paulista, 1000",
|
|
58
|
+
address_line_2: "Apto 101",
|
|
59
|
+
city: "S\xE3o Paulo",
|
|
60
|
+
state_province_region: "SP",
|
|
61
|
+
country: "BR",
|
|
62
|
+
postal_code: "01310-100",
|
|
63
63
|
ip_address: "127.0.0.1",
|
|
64
64
|
image_url: "https://example.com/image.png",
|
|
65
|
-
phone_number: "+
|
|
65
|
+
phone_number: "+5511987654321",
|
|
66
66
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
67
67
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
68
|
-
first_name: "
|
|
69
|
-
last_name: "
|
|
70
|
-
date_of_birth: "1998-
|
|
68
|
+
first_name: "Bernardo",
|
|
69
|
+
last_name: "Simonassi",
|
|
70
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
71
71
|
id_doc_country: "BR",
|
|
72
72
|
id_doc_type: "PASSPORT",
|
|
73
73
|
id_doc_front_file: "https://example.com/image.png",
|
|
74
74
|
id_doc_back_file: "https://example.com/image.png",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
aiprise_validation_key: "",
|
|
76
|
+
instance_id: "in_000000000000",
|
|
77
|
+
tos_id: "to_3ZZhllJkvo5Z",
|
|
78
|
+
created_at: "2021-01-01T00:00:00.000Z",
|
|
79
|
+
updated_at: "2021-01-01T00:00:00.000Z",
|
|
80
|
+
limit: {
|
|
81
|
+
per_transaction: 1e5,
|
|
82
|
+
daily: 2e5,
|
|
83
|
+
monthly: 1e6
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "re_YuaMcI2B8zbQ",
|
|
88
|
+
type: "individual",
|
|
89
|
+
kyc_type: "enhanced",
|
|
90
|
+
kyc_status: "approved",
|
|
91
|
+
kyc_warnings: null,
|
|
92
|
+
email: "alice.johnson@example.com",
|
|
93
|
+
tax_id: "98765432100",
|
|
94
|
+
address_line_1: "123 Main St",
|
|
95
|
+
address_line_2: null,
|
|
96
|
+
city: "New York",
|
|
97
|
+
state_province_region: "NY",
|
|
98
|
+
country: "US",
|
|
99
|
+
postal_code: "10001",
|
|
100
|
+
ip_address: "192.168.1.1",
|
|
101
|
+
image_url: null,
|
|
102
|
+
phone_number: "+15555555555",
|
|
103
|
+
proof_of_address_doc_type: "BANK_STATEMENT",
|
|
104
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
105
|
+
first_name: "Alice",
|
|
106
|
+
last_name: "Johnson",
|
|
107
|
+
date_of_birth: "1990-05-10T00:00:00.000Z",
|
|
108
|
+
id_doc_country: "US",
|
|
109
|
+
id_doc_type: "PASSPORT",
|
|
110
|
+
id_doc_front_file: "https://example.com/image.png",
|
|
111
|
+
id_doc_back_file: null,
|
|
112
|
+
aiprise_validation_key: "enhanced-key",
|
|
113
|
+
instance_id: "in_000000000001",
|
|
114
|
+
source_of_funds_doc_type: "salary",
|
|
115
|
+
source_of_funds_doc_file: "https://example.com/image.png",
|
|
116
|
+
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
117
|
+
purpose_of_transactions: "investment_purposes",
|
|
118
|
+
purpose_of_transactions_explanation: "Investing in stocks",
|
|
119
|
+
tos_id: "to_nppX66ntvtHs",
|
|
120
|
+
created_at: "2022-02-02T00:00:00.000Z",
|
|
121
|
+
updated_at: "2022-02-02T00:00:00.000Z",
|
|
122
|
+
limit: {
|
|
123
|
+
per_transaction: 5e4,
|
|
124
|
+
daily: 1e5,
|
|
125
|
+
monthly: 5e5
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "re_IOxAUL24LG7P",
|
|
130
|
+
type: "business",
|
|
131
|
+
kyc_type: "standard",
|
|
132
|
+
kyc_status: "pending",
|
|
133
|
+
kyc_warnings: null,
|
|
134
|
+
email: "business@example.com",
|
|
135
|
+
tax_id: "20096178000195",
|
|
136
|
+
address_line_1: "1 King St W",
|
|
137
|
+
address_line_2: "Suite 100",
|
|
138
|
+
city: "Toronto",
|
|
139
|
+
state_province_region: "ON",
|
|
140
|
+
country: "CA",
|
|
141
|
+
postal_code: "M5H 1A1",
|
|
142
|
+
ip_address: null,
|
|
143
|
+
image_url: null,
|
|
144
|
+
phone_number: "+14165555555",
|
|
145
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
146
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
147
|
+
legal_name: "Business Corp",
|
|
148
|
+
alternate_name: "BizCo",
|
|
149
|
+
formation_date: "2010-01-01T00:00:00.000Z",
|
|
150
|
+
website: "https://businesscorp.com",
|
|
79
151
|
owners: [
|
|
80
152
|
{
|
|
81
|
-
|
|
82
|
-
first_name: "
|
|
83
|
-
last_name: "
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
153
|
+
role: "beneficial_owner",
|
|
154
|
+
first_name: "Carlos",
|
|
155
|
+
last_name: "Silva",
|
|
156
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
157
|
+
tax_id: "12345678901",
|
|
158
|
+
address_line_1: "Rua Augusta, 1500",
|
|
159
|
+
address_line_2: null,
|
|
160
|
+
city: "S\xE3o Paulo",
|
|
161
|
+
state_province_region: "SP",
|
|
162
|
+
country: "BR",
|
|
163
|
+
postal_code: "01304-001",
|
|
90
164
|
id_doc_country: "BR",
|
|
91
165
|
id_doc_type: "PASSPORT",
|
|
92
166
|
id_doc_front_file: "https://example.com/image.png",
|
|
93
|
-
id_doc_back_file: "https://example.com/image.png"
|
|
167
|
+
id_doc_back_file: "https://example.com/image.png",
|
|
168
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
169
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
170
|
+
id: "ub_000000000000",
|
|
171
|
+
instance_id: "in_000000000000",
|
|
172
|
+
receiver_id: "re_IOxAUL24LG7P"
|
|
94
173
|
}
|
|
95
174
|
],
|
|
96
175
|
incorporation_doc_file: "https://example.com/image.png",
|
|
97
176
|
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
purpose_of_transactions: "business_transactions",
|
|
102
|
-
purpose_of_transactions_explanation: "I am a business owner and I want to receive payments from my customers",
|
|
103
|
-
external_id: "your_company_external_id",
|
|
104
|
-
instance_id: "in_000000000000",
|
|
105
|
-
tos_id: "to_000000000000",
|
|
177
|
+
external_id: null,
|
|
178
|
+
instance_id: "in_000000000002",
|
|
179
|
+
tos_id: "to_nppX66ntvtHs",
|
|
106
180
|
aiprise_validation_key: "",
|
|
107
|
-
created_at: "
|
|
108
|
-
updated_at: "
|
|
181
|
+
created_at: "2015-03-15T00:00:00.000Z",
|
|
182
|
+
updated_at: "2015-03-15T00:00:00.000Z",
|
|
109
183
|
limit: {
|
|
110
|
-
per_transaction:
|
|
111
|
-
daily:
|
|
112
|
-
monthly:
|
|
184
|
+
per_transaction: 2e5,
|
|
185
|
+
daily: 4e5,
|
|
186
|
+
monthly: 2e6
|
|
113
187
|
}
|
|
114
188
|
}
|
|
115
189
|
];
|
|
@@ -122,81 +196,134 @@ var require_receivers_test = __commonJS({
|
|
|
122
196
|
}));
|
|
123
197
|
});
|
|
124
198
|
describe("Create receiver", () => {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
199
|
+
it("should create an individual receiver with standard KYC", () => __async(null, null, function* () {
|
|
200
|
+
const mockedReceiver = {
|
|
201
|
+
id: "re_Euw7HN4OdxPn"
|
|
202
|
+
};
|
|
129
203
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
130
204
|
headers: { "Content-Type": "application/json" }
|
|
131
205
|
});
|
|
132
|
-
const { data, error } = yield blindpay.receivers.
|
|
206
|
+
const { data, error } = yield blindpay.receivers.createIndividualWithStandardKYC({
|
|
133
207
|
type: "individual",
|
|
134
208
|
kyc_type: "standard",
|
|
135
|
-
email: "
|
|
136
|
-
tax_id: "
|
|
137
|
-
address_line_1: "
|
|
138
|
-
address_line_2: "
|
|
139
|
-
city: "
|
|
140
|
-
state_province_region: "
|
|
141
|
-
country: "
|
|
142
|
-
postal_code: "
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
209
|
+
email: "bernardo.simonassi@gmail.com",
|
|
210
|
+
tax_id: "12345678900",
|
|
211
|
+
address_line_1: "Av. Paulista, 1000",
|
|
212
|
+
address_line_2: "Apto 101",
|
|
213
|
+
city: "S\xE3o Paulo",
|
|
214
|
+
state_province_region: "SP",
|
|
215
|
+
country: "BR",
|
|
216
|
+
postal_code: "01310-100",
|
|
217
|
+
first_name: "Bernardo",
|
|
218
|
+
last_name: "Simonassi",
|
|
219
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
220
|
+
id_doc_country: "BR",
|
|
221
|
+
id_doc_type: "PASSPORT",
|
|
222
|
+
id_doc_front_file: "https://example.com/image.png",
|
|
146
223
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
147
224
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
225
|
+
tos_id: "to_tPiz4bM2nh5K"
|
|
226
|
+
});
|
|
227
|
+
globalExpect(error).toBeNull();
|
|
228
|
+
globalExpect(data).toEqual({ id: "re_Euw7HN4OdxPn" });
|
|
229
|
+
}));
|
|
230
|
+
it("should create an individual receiver with enhanced KYC", () => __async(null, null, function* () {
|
|
231
|
+
const mockedReceiver = {
|
|
232
|
+
id: "re_YuaMcI2B8zbQ"
|
|
233
|
+
};
|
|
234
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
235
|
+
headers: { "Content-Type": "application/json" }
|
|
236
|
+
});
|
|
237
|
+
const { data, error } = yield blindpay.receivers.createIndividualWithEnhancedKYC({
|
|
238
|
+
type: "individual",
|
|
239
|
+
kyc_type: "enhanced",
|
|
240
|
+
email: "bernardo.simonassi@gmail.com",
|
|
241
|
+
tax_id: "12345678900",
|
|
242
|
+
address_line_1: "Av. Paulista, 1000",
|
|
243
|
+
address_line_2: "Apto 101",
|
|
244
|
+
city: "S\xE3o Paulo",
|
|
245
|
+
state_province_region: "SP",
|
|
246
|
+
country: "BR",
|
|
247
|
+
postal_code: "01310-100",
|
|
248
|
+
first_name: "Bernardo",
|
|
249
|
+
last_name: "Simonassi",
|
|
250
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
151
251
|
id_doc_country: "BR",
|
|
152
252
|
id_doc_type: "PASSPORT",
|
|
153
253
|
id_doc_front_file: "https://example.com/image.png",
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
254
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
255
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
256
|
+
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
257
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
258
|
+
source_of_funds_doc_type: "savings",
|
|
259
|
+
source_of_funds_doc_file: "https://example.com/image.png",
|
|
260
|
+
tos_id: "to_3ZZhllJkvo5Z"
|
|
261
|
+
});
|
|
262
|
+
globalExpect(error).toBeNull();
|
|
263
|
+
globalExpect(data).toEqual({ id: "re_YuaMcI2B8zbQ" });
|
|
264
|
+
}));
|
|
265
|
+
it("should create a business receiver with standard KYB", () => __async(null, null, function* () {
|
|
266
|
+
const mockedReceiver = {
|
|
267
|
+
id: "re_IOxAUL24LG7P"
|
|
268
|
+
};
|
|
269
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
270
|
+
headers: { "Content-Type": "application/json" }
|
|
271
|
+
});
|
|
272
|
+
const { data, error } = yield blindpay.receivers.createBusinessWithStandardKYB({
|
|
273
|
+
type: "business",
|
|
274
|
+
kyc_type: "standard",
|
|
275
|
+
email: "contato@empresa.com.br",
|
|
276
|
+
tax_id: "20096178000195",
|
|
277
|
+
address_line_1: "Av. Brigadeiro Faria Lima, 400",
|
|
278
|
+
address_line_2: "Sala 1201",
|
|
279
|
+
city: "S\xE3o Paulo",
|
|
280
|
+
state_province_region: "SP",
|
|
281
|
+
country: "BR",
|
|
282
|
+
postal_code: "04538-132",
|
|
283
|
+
legal_name: "Empresa Exemplo Ltda",
|
|
284
|
+
alternate_name: "Exemplo",
|
|
285
|
+
formation_date: "2010-05-20T00:00:00.000Z",
|
|
286
|
+
incorporation_doc_file: "https://example.com/image.png",
|
|
287
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
288
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
289
|
+
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
290
|
+
tos_id: "to_nppX66ntvtHs",
|
|
291
|
+
website: "https://site.com/",
|
|
159
292
|
owners: [
|
|
160
293
|
{
|
|
161
|
-
first_name: "John",
|
|
162
|
-
last_name: "Doe",
|
|
163
294
|
role: "beneficial_owner",
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
295
|
+
first_name: "Carlos",
|
|
296
|
+
last_name: "Silva",
|
|
297
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
298
|
+
tax_id: "12345678901",
|
|
299
|
+
address_line_1: "Rua Augusta, 1500",
|
|
300
|
+
address_line_2: null,
|
|
301
|
+
city: "S\xE3o Paulo",
|
|
302
|
+
state_province_region: "SP",
|
|
303
|
+
country: "BR",
|
|
304
|
+
postal_code: "01304-001",
|
|
172
305
|
id_doc_country: "BR",
|
|
173
306
|
id_doc_type: "PASSPORT",
|
|
174
307
|
id_doc_front_file: "https://example.com/image.png",
|
|
175
308
|
id_doc_back_file: "https://example.com/image.png",
|
|
309
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
176
310
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
177
|
-
|
|
311
|
+
id: "ub_000000000000",
|
|
312
|
+
instance_id: "in_000000000000",
|
|
313
|
+
receiver_id: "re_IOxAUL24LG7P"
|
|
178
314
|
}
|
|
179
|
-
]
|
|
180
|
-
incorporation_doc_file: "https://example.com/image.png",
|
|
181
|
-
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
182
|
-
source_of_funds_doc_type: "business_income",
|
|
183
|
-
source_of_funds_doc_file: "https://example.com/image.png",
|
|
184
|
-
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
185
|
-
purpose_of_transactions: "business_transactions",
|
|
186
|
-
purpose_of_transactions_explanation: "I am a business owner and I want to receive payments from my customers",
|
|
187
|
-
external_id: "your_company_external_id",
|
|
188
|
-
tos_id: "to_000000000000"
|
|
315
|
+
]
|
|
189
316
|
});
|
|
190
317
|
globalExpect(error).toBeNull();
|
|
191
|
-
globalExpect(data).toEqual({ id: "
|
|
318
|
+
globalExpect(data).toEqual({ id: "re_IOxAUL24LG7P" });
|
|
192
319
|
}));
|
|
193
320
|
});
|
|
194
321
|
describe("Get receiver", () => {
|
|
195
322
|
it("should get a receiver", () => __async(null, null, function* () {
|
|
196
323
|
const mockedReceiver = {
|
|
197
|
-
id: "
|
|
324
|
+
id: "re_YuaMcI2B8zbQ",
|
|
198
325
|
type: "individual",
|
|
199
|
-
kyc_type: "
|
|
326
|
+
kyc_type: "enhanced",
|
|
200
327
|
kyc_status: "verifying",
|
|
201
328
|
kyc_warnings: [
|
|
202
329
|
{
|
|
@@ -206,60 +333,36 @@ var require_receivers_test = __commonJS({
|
|
|
206
333
|
warning_id: null
|
|
207
334
|
}
|
|
208
335
|
],
|
|
209
|
-
email: "
|
|
210
|
-
tax_id: "
|
|
211
|
-
address_line_1: "
|
|
212
|
-
address_line_2: "
|
|
213
|
-
city: "
|
|
214
|
-
state_province_region: "
|
|
215
|
-
country: "
|
|
216
|
-
postal_code: "
|
|
336
|
+
email: "bernardo.simonassi@gmail.com",
|
|
337
|
+
tax_id: "12345678900",
|
|
338
|
+
address_line_1: "Av. Paulista, 1000",
|
|
339
|
+
address_line_2: "Apto 101",
|
|
340
|
+
city: "S\xE3o Paulo",
|
|
341
|
+
state_province_region: "SP",
|
|
342
|
+
country: "BR",
|
|
343
|
+
postal_code: "01310-100",
|
|
217
344
|
ip_address: "127.0.0.1",
|
|
218
345
|
image_url: "https://example.com/image.png",
|
|
219
|
-
phone_number: "+
|
|
346
|
+
phone_number: "+5511987654321",
|
|
220
347
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
221
348
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
222
|
-
first_name: "
|
|
223
|
-
last_name: "
|
|
224
|
-
date_of_birth: "1998-
|
|
349
|
+
first_name: "Bernardo",
|
|
350
|
+
last_name: "Simonassi",
|
|
351
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
225
352
|
id_doc_country: "BR",
|
|
226
353
|
id_doc_type: "PASSPORT",
|
|
227
354
|
id_doc_front_file: "https://example.com/image.png",
|
|
228
355
|
id_doc_back_file: "https://example.com/image.png",
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
formation_date: "1998-01-01T00:00:00Z",
|
|
232
|
-
website: "https://example.com",
|
|
233
|
-
owners: [
|
|
234
|
-
{
|
|
235
|
-
id: "ub_000000000000",
|
|
236
|
-
first_name: "John",
|
|
237
|
-
last_name: "Doe",
|
|
238
|
-
address_line_1: "738 Plain St",
|
|
239
|
-
address_line_2: "Building 22",
|
|
240
|
-
city: "Marshfield",
|
|
241
|
-
state_province_region: "MA",
|
|
242
|
-
country: "US",
|
|
243
|
-
postal_code: "02050",
|
|
244
|
-
id_doc_country: "BR",
|
|
245
|
-
id_doc_type: "PASSPORT",
|
|
246
|
-
id_doc_front_file: "https://example.com/image.png",
|
|
247
|
-
id_doc_back_file: "https://example.com/image.png"
|
|
248
|
-
}
|
|
249
|
-
],
|
|
250
|
-
incorporation_doc_file: "https://example.com/image.png",
|
|
251
|
-
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
252
|
-
source_of_funds_doc_type: "business_income",
|
|
356
|
+
aiprise_validation_key: "",
|
|
357
|
+
source_of_funds_doc_type: "savings",
|
|
253
358
|
source_of_funds_doc_file: "https://example.com/image.png",
|
|
254
359
|
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
255
|
-
purpose_of_transactions: "
|
|
256
|
-
purpose_of_transactions_explanation: "I am
|
|
257
|
-
external_id: "your_company_external_id",
|
|
360
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
361
|
+
purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
|
|
258
362
|
instance_id: "in_000000000000",
|
|
259
|
-
tos_id: "
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
updated_at: "2021-01-01T00:00:00Z",
|
|
363
|
+
tos_id: "to_3ZZhllJkvo5Z",
|
|
364
|
+
created_at: "2021-01-01T00:00:00.000Z",
|
|
365
|
+
updated_at: "2021-01-01T00:00:00.000Z",
|
|
263
366
|
limit: {
|
|
264
367
|
per_transaction: 1e5,
|
|
265
368
|
daily: 2e5,
|
|
@@ -269,7 +372,7 @@ var require_receivers_test = __commonJS({
|
|
|
269
372
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
270
373
|
headers: { "Content-Type": "application/json" }
|
|
271
374
|
});
|
|
272
|
-
const { data, error } = yield blindpay.receivers.get("
|
|
375
|
+
const { data, error } = yield blindpay.receivers.get("re_YuaMcI2B8zbQ");
|
|
273
376
|
globalExpect(error).toBeNull();
|
|
274
377
|
globalExpect(data).toEqual(mockedReceiver);
|
|
275
378
|
}));
|
|
@@ -280,45 +383,44 @@ var require_receivers_test = __commonJS({
|
|
|
280
383
|
headers: { "Content-Type": "application/json" }
|
|
281
384
|
});
|
|
282
385
|
const { data, error } = yield blindpay.receivers.update({
|
|
283
|
-
receiver_id: "
|
|
284
|
-
email: "
|
|
285
|
-
tax_id: "
|
|
286
|
-
address_line_1: "
|
|
287
|
-
address_line_2: "
|
|
288
|
-
city: "
|
|
289
|
-
state_province_region: "
|
|
290
|
-
country: "
|
|
291
|
-
postal_code: "
|
|
386
|
+
receiver_id: "re_YuaMcI2B8zbQ",
|
|
387
|
+
email: "bernardo.simonassi@gmail.com",
|
|
388
|
+
tax_id: "12345678900",
|
|
389
|
+
address_line_1: "Av. Paulista, 1000",
|
|
390
|
+
address_line_2: "Apto 101",
|
|
391
|
+
city: "S\xE3o Paulo",
|
|
392
|
+
state_province_region: "SP",
|
|
393
|
+
country: "BR",
|
|
394
|
+
postal_code: "01310-100",
|
|
292
395
|
ip_address: "127.0.0.1",
|
|
293
396
|
image_url: "https://example.com/image.png",
|
|
294
|
-
phone_number: "+
|
|
397
|
+
phone_number: "+5511987654321",
|
|
295
398
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
296
399
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
297
|
-
first_name: "
|
|
298
|
-
last_name: "
|
|
299
|
-
date_of_birth: "1998-
|
|
400
|
+
first_name: "Bernardo",
|
|
401
|
+
last_name: "Simonassi",
|
|
402
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
300
403
|
id_doc_country: "BR",
|
|
301
404
|
id_doc_type: "PASSPORT",
|
|
302
405
|
id_doc_front_file: "https://example.com/image.png",
|
|
303
406
|
id_doc_back_file: "https://example.com/image.png",
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
website: "https://example.com",
|
|
407
|
+
alternate_name: "Exemplo",
|
|
408
|
+
formation_date: "2010-05-20T00:00:00.000Z",
|
|
409
|
+
website: "https://site.com",
|
|
308
410
|
owners: [
|
|
309
411
|
{
|
|
310
412
|
id: "ub_000000000000",
|
|
311
|
-
first_name: "
|
|
312
|
-
last_name: "
|
|
413
|
+
first_name: "Carlos",
|
|
414
|
+
last_name: "Silva",
|
|
313
415
|
role: "beneficial_owner",
|
|
314
|
-
date_of_birth: "
|
|
315
|
-
tax_id: "
|
|
316
|
-
address_line_1: "
|
|
317
|
-
address_line_2:
|
|
318
|
-
city: "
|
|
319
|
-
state_province_region: "
|
|
320
|
-
country: "
|
|
321
|
-
postal_code: "
|
|
416
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
417
|
+
tax_id: "12345678901",
|
|
418
|
+
address_line_1: "Rua Augusta, 1500",
|
|
419
|
+
address_line_2: null,
|
|
420
|
+
city: "S\xE3o Paulo",
|
|
421
|
+
state_province_region: "SP",
|
|
422
|
+
country: "BR",
|
|
423
|
+
postal_code: "01304-001",
|
|
322
424
|
id_doc_country: "BR",
|
|
323
425
|
id_doc_type: "PASSPORT",
|
|
324
426
|
id_doc_front_file: "https://example.com/image.png",
|
|
@@ -327,13 +429,13 @@ var require_receivers_test = __commonJS({
|
|
|
327
429
|
],
|
|
328
430
|
incorporation_doc_file: "https://example.com/image.png",
|
|
329
431
|
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
330
|
-
source_of_funds_doc_type: "
|
|
432
|
+
source_of_funds_doc_type: "savings",
|
|
331
433
|
source_of_funds_doc_file: "https://example.com/image.png",
|
|
332
434
|
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
333
|
-
purpose_of_transactions: "
|
|
334
|
-
purpose_of_transactions_explanation: "I am
|
|
335
|
-
external_id: "
|
|
336
|
-
tos_id: "
|
|
435
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
436
|
+
purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
|
|
437
|
+
external_id: "some-external-id",
|
|
438
|
+
tos_id: "to_3ZZhllJkvo5Z"
|
|
337
439
|
});
|
|
338
440
|
globalExpect(error).toBeNull();
|
|
339
441
|
globalExpect(data).toEqual({ data: null });
|
|
@@ -344,7 +446,7 @@ var require_receivers_test = __commonJS({
|
|
|
344
446
|
fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
|
|
345
447
|
headers: { "Content-Type": "application/json" }
|
|
346
448
|
});
|
|
347
|
-
const { data, error } = yield blindpay.receivers.delete("
|
|
449
|
+
const { data, error } = yield blindpay.receivers.delete("re_YuaMcI2B8zbQ");
|
|
348
450
|
globalExpect(error).toBeNull();
|
|
349
451
|
globalExpect(data).toEqual({ data: null });
|
|
350
452
|
}));
|
|
@@ -366,7 +468,7 @@ var require_receivers_test = __commonJS({
|
|
|
366
468
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiverLimits), {
|
|
367
469
|
headers: { "Content-Type": "application/json" }
|
|
368
470
|
});
|
|
369
|
-
const { data, error } = yield blindpay.receivers.getLimits("
|
|
471
|
+
const { data, error } = yield blindpay.receivers.getLimits("re_YuaMcI2B8zbQ");
|
|
370
472
|
globalExpect(error).toBeNull();
|
|
371
473
|
globalExpect(data).toEqual(mockedReceiverLimits);
|
|
372
474
|
}));
|
|
@@ -18714,7 +18714,7 @@ var import_expect_type = __toESM(require_dist(), 1);
|
|
|
18714
18714
|
var import_node_crypto = require("crypto");
|
|
18715
18715
|
|
|
18716
18716
|
// package.json
|
|
18717
|
-
var version = "
|
|
18717
|
+
var version = "2.0.0";
|
|
18718
18718
|
|
|
18719
18719
|
// src/internal/blindpay-error.ts
|
|
18720
18720
|
var BlindPayError = class extends Error {
|
|
@@ -18993,15 +18993,20 @@ function createReceiversResource(instanceId, client) {
|
|
|
18993
18993
|
list() {
|
|
18994
18994
|
return client.get(`/instances/${instanceId}/receivers`);
|
|
18995
18995
|
},
|
|
18996
|
-
|
|
18997
|
-
|
|
18996
|
+
createIndividualWithStandardKYC(data) {
|
|
18997
|
+
return client.post(`/instances/${instanceId}/receivers`, data);
|
|
18998
|
+
},
|
|
18999
|
+
createIndividualWithEnhancedKYC(data) {
|
|
19000
|
+
return client.post(`/instances/${instanceId}/receivers`, data);
|
|
19001
|
+
},
|
|
19002
|
+
createBusinessWithStandardKYB(data) {
|
|
18998
19003
|
return client.post(`/instances/${instanceId}/receivers`, data);
|
|
18999
19004
|
},
|
|
19000
19005
|
get(receiver_id) {
|
|
19001
19006
|
return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
|
|
19002
19007
|
},
|
|
19003
|
-
update(
|
|
19004
|
-
var
|
|
19008
|
+
update(_a3) {
|
|
19009
|
+
var _b = _a3, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
|
|
19005
19010
|
return client.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
|
|
19006
19011
|
},
|
|
19007
19012
|
delete(receiver_id) {
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-URXUVGMC.mjs";
|
|
12
12
|
import "../../chunk-IZYPRCCV.mjs";
|
|
13
13
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
14
|
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
|
-
import "../../chunk-
|
|
16
|
+
import "../../chunk-MPJKYFDD.mjs";
|
|
17
17
|
import "../../chunk-5XJJKYXE.mjs";
|
|
18
|
+
import "../../chunk-CPOSU35L.mjs";
|
|
18
19
|
import "../../chunk-RC5NN5UF.mjs";
|
|
19
20
|
import "../../chunk-W7NJUABI.mjs";
|
|
20
21
|
import "../../chunk-E7M4CJKR.mjs";
|
|
21
22
|
import "../../chunk-3QQCDR3E.mjs";
|
|
22
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
23
24
|
import "../../chunk-QHMIK7U3.mjs";
|
|
24
|
-
import "../../chunk-CPOSU35L.mjs";
|
|
25
25
|
import "../../chunk-B5T7AQLH.mjs";
|
|
26
26
|
import {
|
|
27
27
|
__async,
|