@blindpay/node 1.2.0 → 2.0.1
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-E4S6NTNE.mjs → chunk-4CYRFSJ7.mjs} +2 -2
- package/dist/{chunk-BONN6PYB.mjs → chunk-E6ALTWR5.mjs} +21 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -6
- package/dist/index.mjs +2 -2
- package/dist/resources/api-keys/api-keys.test.js +20 -6
- package/dist/resources/api-keys/api-keys.test.mjs +2 -2
- package/dist/resources/available/available.test.js +20 -6
- package/dist/resources/available/available.test.mjs +2 -2
- package/dist/resources/bank-accounts/bank-accounts.test.js +20 -6
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +2 -2
- package/dist/resources/instances/instances.test.js +20 -6
- package/dist/resources/instances/instances.test.mjs +2 -2
- package/dist/resources/partner-fees/partner-fees.test.js +20 -6
- package/dist/resources/partner-fees/partner-fees.test.mjs +2 -2
- package/dist/resources/payins/payins-quotes.test.js +20 -6
- package/dist/resources/payins/payins-quotes.test.mjs +2 -2
- package/dist/resources/payins/payins.test.js +20 -6
- package/dist/resources/payins/payins.test.mjs +2 -2
- package/dist/resources/payouts/payouts.test.js +20 -6
- package/dist/resources/payouts/payouts.test.mjs +2 -2
- package/dist/resources/quotes/quotes.test.js +20 -6
- package/dist/resources/quotes/quotes.test.mjs +2 -2
- package/dist/resources/receivers/index.d.mts +163 -53
- package/dist/resources/receivers/index.d.ts +163 -53
- package/dist/resources/receivers/index.js +31 -5
- package/dist/resources/receivers/index.mjs +1 -1
- package/dist/resources/receivers/receivers.test.js +284 -174
- package/dist/resources/receivers/receivers.test.mjs +266 -170
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +20 -6
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +2 -2
- package/dist/resources/wallets/blockchain.test.js +20 -6
- package/dist/resources/wallets/blockchain.test.mjs +2 -2
- package/dist/resources/wallets/offramp.test.js +20 -6
- package/dist/resources/wallets/offramp.test.mjs +2 -2
- package/dist/resources/webhooks/webhooks.test.js +20 -6
- package/dist/resources/webhooks/webhooks.test.mjs +2 -2
- package/package.json +1 -1
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-4CYRFSJ7.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-E6ALTWR5.mjs";
|
|
17
17
|
import "../../chunk-5XJJKYXE.mjs";
|
|
18
18
|
import "../../chunk-RC5NN5UF.mjs";
|
|
19
19
|
import "../../chunk-W7NJUABI.mjs";
|
|
@@ -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,128 @@ 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.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
206
|
+
const { data, error } = yield blindpay.receivers.createIndividualWithStandardKYC({
|
|
207
|
+
email: "bernardo.simonassi@gmail.com",
|
|
208
|
+
tax_id: "12345678900",
|
|
209
|
+
address_line_1: "Av. Paulista, 1000",
|
|
210
|
+
address_line_2: "Apto 101",
|
|
211
|
+
city: "S\xE3o Paulo",
|
|
212
|
+
state_province_region: "SP",
|
|
213
|
+
country: "BR",
|
|
214
|
+
postal_code: "01310-100",
|
|
215
|
+
first_name: "Bernardo",
|
|
216
|
+
last_name: "Simonassi",
|
|
217
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
218
|
+
id_doc_country: "BR",
|
|
219
|
+
id_doc_type: "PASSPORT",
|
|
220
|
+
id_doc_front_file: "https://example.com/image.png",
|
|
146
221
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
147
222
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
223
|
+
tos_id: "to_tPiz4bM2nh5K"
|
|
224
|
+
});
|
|
225
|
+
globalExpect(error).toBeNull();
|
|
226
|
+
globalExpect(data).toEqual({ id: "re_Euw7HN4OdxPn" });
|
|
227
|
+
}));
|
|
228
|
+
it("should create an individual receiver with enhanced KYC", () => __async(null, null, function* () {
|
|
229
|
+
const mockedReceiver = {
|
|
230
|
+
id: "re_YuaMcI2B8zbQ"
|
|
231
|
+
};
|
|
232
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
233
|
+
headers: { "Content-Type": "application/json" }
|
|
234
|
+
});
|
|
235
|
+
const { data, error } = yield blindpay.receivers.createIndividualWithEnhancedKYC({
|
|
236
|
+
email: "bernardo.simonassi@gmail.com",
|
|
237
|
+
tax_id: "12345678900",
|
|
238
|
+
address_line_1: "Av. Paulista, 1000",
|
|
239
|
+
address_line_2: "Apto 101",
|
|
240
|
+
city: "S\xE3o Paulo",
|
|
241
|
+
state_province_region: "SP",
|
|
242
|
+
country: "BR",
|
|
243
|
+
postal_code: "01310-100",
|
|
244
|
+
first_name: "Bernardo",
|
|
245
|
+
last_name: "Simonassi",
|
|
246
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
151
247
|
id_doc_country: "BR",
|
|
152
248
|
id_doc_type: "PASSPORT",
|
|
153
249
|
id_doc_front_file: "https://example.com/image.png",
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
250
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
251
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
252
|
+
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
253
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
254
|
+
source_of_funds_doc_type: "savings",
|
|
255
|
+
source_of_funds_doc_file: "https://example.com/image.png",
|
|
256
|
+
tos_id: "to_3ZZhllJkvo5Z"
|
|
257
|
+
});
|
|
258
|
+
globalExpect(error).toBeNull();
|
|
259
|
+
globalExpect(data).toEqual({ id: "re_YuaMcI2B8zbQ" });
|
|
260
|
+
}));
|
|
261
|
+
it("should create a business receiver with standard KYB", () => __async(null, null, function* () {
|
|
262
|
+
const mockedReceiver = {
|
|
263
|
+
id: "re_IOxAUL24LG7P"
|
|
264
|
+
};
|
|
265
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
266
|
+
headers: { "Content-Type": "application/json" }
|
|
267
|
+
});
|
|
268
|
+
const { data, error } = yield blindpay.receivers.createBusinessWithStandardKYB({
|
|
269
|
+
email: "contato@empresa.com.br",
|
|
270
|
+
tax_id: "20096178000195",
|
|
271
|
+
address_line_1: "Av. Brigadeiro Faria Lima, 400",
|
|
272
|
+
address_line_2: "Sala 1201",
|
|
273
|
+
city: "S\xE3o Paulo",
|
|
274
|
+
state_province_region: "SP",
|
|
275
|
+
country: "BR",
|
|
276
|
+
postal_code: "04538-132",
|
|
277
|
+
legal_name: "Empresa Exemplo Ltda",
|
|
278
|
+
alternate_name: "Exemplo",
|
|
279
|
+
formation_date: "2010-05-20T00:00:00.000Z",
|
|
280
|
+
incorporation_doc_file: "https://example.com/image.png",
|
|
281
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
282
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
283
|
+
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
284
|
+
tos_id: "to_nppX66ntvtHs",
|
|
285
|
+
website: "https://site.com/",
|
|
159
286
|
owners: [
|
|
160
287
|
{
|
|
161
|
-
first_name: "John",
|
|
162
|
-
last_name: "Doe",
|
|
163
288
|
role: "beneficial_owner",
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
289
|
+
first_name: "Carlos",
|
|
290
|
+
last_name: "Silva",
|
|
291
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
292
|
+
tax_id: "12345678901",
|
|
293
|
+
address_line_1: "Rua Augusta, 1500",
|
|
294
|
+
address_line_2: null,
|
|
295
|
+
city: "S\xE3o Paulo",
|
|
296
|
+
state_province_region: "SP",
|
|
297
|
+
country: "BR",
|
|
298
|
+
postal_code: "01304-001",
|
|
172
299
|
id_doc_country: "BR",
|
|
173
300
|
id_doc_type: "PASSPORT",
|
|
174
301
|
id_doc_front_file: "https://example.com/image.png",
|
|
175
302
|
id_doc_back_file: "https://example.com/image.png",
|
|
303
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
176
304
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
177
|
-
|
|
305
|
+
id: "ub_000000000000",
|
|
306
|
+
instance_id: "in_000000000000",
|
|
307
|
+
receiver_id: "re_IOxAUL24LG7P"
|
|
178
308
|
}
|
|
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"
|
|
309
|
+
]
|
|
189
310
|
});
|
|
190
311
|
globalExpect(error).toBeNull();
|
|
191
|
-
globalExpect(data).toEqual({ id: "
|
|
312
|
+
globalExpect(data).toEqual({ id: "re_IOxAUL24LG7P" });
|
|
192
313
|
}));
|
|
193
314
|
});
|
|
194
315
|
describe("Get receiver", () => {
|
|
195
316
|
it("should get a receiver", () => __async(null, null, function* () {
|
|
196
317
|
const mockedReceiver = {
|
|
197
|
-
id: "
|
|
318
|
+
id: "re_YuaMcI2B8zbQ",
|
|
198
319
|
type: "individual",
|
|
199
|
-
kyc_type: "
|
|
320
|
+
kyc_type: "enhanced",
|
|
200
321
|
kyc_status: "verifying",
|
|
201
322
|
kyc_warnings: [
|
|
202
323
|
{
|
|
@@ -206,60 +327,36 @@ var require_receivers_test = __commonJS({
|
|
|
206
327
|
warning_id: null
|
|
207
328
|
}
|
|
208
329
|
],
|
|
209
|
-
email: "
|
|
210
|
-
tax_id: "
|
|
211
|
-
address_line_1: "
|
|
212
|
-
address_line_2: "
|
|
213
|
-
city: "
|
|
214
|
-
state_province_region: "
|
|
215
|
-
country: "
|
|
216
|
-
postal_code: "
|
|
330
|
+
email: "bernardo.simonassi@gmail.com",
|
|
331
|
+
tax_id: "12345678900",
|
|
332
|
+
address_line_1: "Av. Paulista, 1000",
|
|
333
|
+
address_line_2: "Apto 101",
|
|
334
|
+
city: "S\xE3o Paulo",
|
|
335
|
+
state_province_region: "SP",
|
|
336
|
+
country: "BR",
|
|
337
|
+
postal_code: "01310-100",
|
|
217
338
|
ip_address: "127.0.0.1",
|
|
218
339
|
image_url: "https://example.com/image.png",
|
|
219
|
-
phone_number: "+
|
|
340
|
+
phone_number: "+5511987654321",
|
|
220
341
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
221
342
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
222
|
-
first_name: "
|
|
223
|
-
last_name: "
|
|
224
|
-
date_of_birth: "1998-
|
|
343
|
+
first_name: "Bernardo",
|
|
344
|
+
last_name: "Simonassi",
|
|
345
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
225
346
|
id_doc_country: "BR",
|
|
226
347
|
id_doc_type: "PASSPORT",
|
|
227
348
|
id_doc_front_file: "https://example.com/image.png",
|
|
228
349
|
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",
|
|
350
|
+
aiprise_validation_key: "",
|
|
351
|
+
source_of_funds_doc_type: "savings",
|
|
253
352
|
source_of_funds_doc_file: "https://example.com/image.png",
|
|
254
353
|
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",
|
|
354
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
355
|
+
purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
|
|
258
356
|
instance_id: "in_000000000000",
|
|
259
|
-
tos_id: "
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
updated_at: "2021-01-01T00:00:00Z",
|
|
357
|
+
tos_id: "to_3ZZhllJkvo5Z",
|
|
358
|
+
created_at: "2021-01-01T00:00:00.000Z",
|
|
359
|
+
updated_at: "2021-01-01T00:00:00.000Z",
|
|
263
360
|
limit: {
|
|
264
361
|
per_transaction: 1e5,
|
|
265
362
|
daily: 2e5,
|
|
@@ -269,7 +366,7 @@ var require_receivers_test = __commonJS({
|
|
|
269
366
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
|
|
270
367
|
headers: { "Content-Type": "application/json" }
|
|
271
368
|
});
|
|
272
|
-
const { data, error } = yield blindpay.receivers.get("
|
|
369
|
+
const { data, error } = yield blindpay.receivers.get("re_YuaMcI2B8zbQ");
|
|
273
370
|
globalExpect(error).toBeNull();
|
|
274
371
|
globalExpect(data).toEqual(mockedReceiver);
|
|
275
372
|
}));
|
|
@@ -280,45 +377,44 @@ var require_receivers_test = __commonJS({
|
|
|
280
377
|
headers: { "Content-Type": "application/json" }
|
|
281
378
|
});
|
|
282
379
|
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: "
|
|
380
|
+
receiver_id: "re_YuaMcI2B8zbQ",
|
|
381
|
+
email: "bernardo.simonassi@gmail.com",
|
|
382
|
+
tax_id: "12345678900",
|
|
383
|
+
address_line_1: "Av. Paulista, 1000",
|
|
384
|
+
address_line_2: "Apto 101",
|
|
385
|
+
city: "S\xE3o Paulo",
|
|
386
|
+
state_province_region: "SP",
|
|
387
|
+
country: "BR",
|
|
388
|
+
postal_code: "01310-100",
|
|
292
389
|
ip_address: "127.0.0.1",
|
|
293
390
|
image_url: "https://example.com/image.png",
|
|
294
|
-
phone_number: "+
|
|
391
|
+
phone_number: "+5511987654321",
|
|
295
392
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
296
393
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
297
|
-
first_name: "
|
|
298
|
-
last_name: "
|
|
299
|
-
date_of_birth: "1998-
|
|
394
|
+
first_name: "Bernardo",
|
|
395
|
+
last_name: "Simonassi",
|
|
396
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
300
397
|
id_doc_country: "BR",
|
|
301
398
|
id_doc_type: "PASSPORT",
|
|
302
399
|
id_doc_front_file: "https://example.com/image.png",
|
|
303
400
|
id_doc_back_file: "https://example.com/image.png",
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
website: "https://example.com",
|
|
401
|
+
alternate_name: "Exemplo",
|
|
402
|
+
formation_date: "2010-05-20T00:00:00.000Z",
|
|
403
|
+
website: "https://site.com",
|
|
308
404
|
owners: [
|
|
309
405
|
{
|
|
310
406
|
id: "ub_000000000000",
|
|
311
|
-
first_name: "
|
|
312
|
-
last_name: "
|
|
407
|
+
first_name: "Carlos",
|
|
408
|
+
last_name: "Silva",
|
|
313
409
|
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: "
|
|
410
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
411
|
+
tax_id: "12345678901",
|
|
412
|
+
address_line_1: "Rua Augusta, 1500",
|
|
413
|
+
address_line_2: null,
|
|
414
|
+
city: "S\xE3o Paulo",
|
|
415
|
+
state_province_region: "SP",
|
|
416
|
+
country: "BR",
|
|
417
|
+
postal_code: "01304-001",
|
|
322
418
|
id_doc_country: "BR",
|
|
323
419
|
id_doc_type: "PASSPORT",
|
|
324
420
|
id_doc_front_file: "https://example.com/image.png",
|
|
@@ -327,13 +423,13 @@ var require_receivers_test = __commonJS({
|
|
|
327
423
|
],
|
|
328
424
|
incorporation_doc_file: "https://example.com/image.png",
|
|
329
425
|
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
330
|
-
source_of_funds_doc_type: "
|
|
426
|
+
source_of_funds_doc_type: "savings",
|
|
331
427
|
source_of_funds_doc_file: "https://example.com/image.png",
|
|
332
428
|
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: "
|
|
429
|
+
purpose_of_transactions: "personal_or_living_expenses",
|
|
430
|
+
purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
|
|
431
|
+
external_id: "some-external-id",
|
|
432
|
+
tos_id: "to_3ZZhllJkvo5Z"
|
|
337
433
|
});
|
|
338
434
|
globalExpect(error).toBeNull();
|
|
339
435
|
globalExpect(data).toEqual({ data: null });
|
|
@@ -344,7 +440,7 @@ var require_receivers_test = __commonJS({
|
|
|
344
440
|
fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
|
|
345
441
|
headers: { "Content-Type": "application/json" }
|
|
346
442
|
});
|
|
347
|
-
const { data, error } = yield blindpay.receivers.delete("
|
|
443
|
+
const { data, error } = yield blindpay.receivers.delete("re_YuaMcI2B8zbQ");
|
|
348
444
|
globalExpect(error).toBeNull();
|
|
349
445
|
globalExpect(data).toEqual({ data: null });
|
|
350
446
|
}));
|
|
@@ -366,7 +462,7 @@ var require_receivers_test = __commonJS({
|
|
|
366
462
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceiverLimits), {
|
|
367
463
|
headers: { "Content-Type": "application/json" }
|
|
368
464
|
});
|
|
369
|
-
const { data, error } = yield blindpay.receivers.getLimits("
|
|
465
|
+
const { data, error } = yield blindpay.receivers.getLimits("re_YuaMcI2B8zbQ");
|
|
370
466
|
globalExpect(error).toBeNull();
|
|
371
467
|
globalExpect(data).toEqual(mockedReceiverLimits);
|
|
372
468
|
}));
|
|
@@ -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.1";
|
|
18718
18718
|
|
|
18719
18719
|
// src/internal/blindpay-error.ts
|
|
18720
18720
|
var BlindPayError = class extends Error {
|
|
@@ -18993,15 +18993,29 @@ function createReceiversResource(instanceId, client) {
|
|
|
18993
18993
|
list() {
|
|
18994
18994
|
return client.get(`/instances/${instanceId}/receivers`);
|
|
18995
18995
|
},
|
|
18996
|
-
|
|
18997
|
-
|
|
18998
|
-
|
|
18996
|
+
createIndividualWithStandardKYC(data) {
|
|
18997
|
+
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
18998
|
+
kyc_type: "standard",
|
|
18999
|
+
type: "individual"
|
|
19000
|
+
}, data));
|
|
19001
|
+
},
|
|
19002
|
+
createIndividualWithEnhancedKYC(data) {
|
|
19003
|
+
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
19004
|
+
kyc_type: "enhanced",
|
|
19005
|
+
type: "individual"
|
|
19006
|
+
}, data));
|
|
19007
|
+
},
|
|
19008
|
+
createBusinessWithStandardKYB(data) {
|
|
19009
|
+
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
19010
|
+
kyc_type: "standard",
|
|
19011
|
+
type: "business"
|
|
19012
|
+
}, data));
|
|
18999
19013
|
},
|
|
19000
19014
|
get(receiver_id) {
|
|
19001
19015
|
return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
|
|
19002
19016
|
},
|
|
19003
|
-
update(
|
|
19004
|
-
var
|
|
19017
|
+
update(_a3) {
|
|
19018
|
+
var _b = _a3, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
|
|
19005
19019
|
return client.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
|
|
19006
19020
|
},
|
|
19007
19021
|
delete(receiver_id) {
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-4CYRFSJ7.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-E6ALTWR5.mjs";
|
|
17
17
|
import "../../chunk-5XJJKYXE.mjs";
|
|
18
18
|
import "../../chunk-RC5NN5UF.mjs";
|
|
19
19
|
import "../../chunk-W7NJUABI.mjs";
|