@blindpay/node 2.5.0 → 3.1.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/{api-client-Drd7alfK.d.mts → api-client-DhY5DFpq.d.mts} +109 -34
- package/dist/{api-client-Drd7alfK.d.ts → api-client-DhY5DFpq.d.ts} +109 -34
- package/dist/{chunk-VRA5HP7F.mjs → chunk-E7M4CJKR.mjs} +0 -7
- package/dist/{chunk-5XJJKYXE.mjs → chunk-LEPGLH7Q.mjs} +20 -10
- package/dist/{chunk-CEJF5Y4K.mjs → chunk-V4V47AUC.mjs} +17 -17
- package/dist/{chunk-W7NJUABI.mjs → chunk-VGU72ZNI.mjs} +1 -7
- package/dist/{chunk-3QQCDR3E.mjs → chunk-VOB7TMKL.mjs} +4 -4
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +25 -27
- package/dist/index.mjs +17 -17
- package/dist/resources/api-keys/api-keys.test.js +25 -27
- package/dist/resources/api-keys/api-keys.test.mjs +7 -7
- package/dist/resources/api-keys/index.d.mts +1 -1
- package/dist/resources/api-keys/index.d.ts +1 -1
- package/dist/resources/available/available.test.js +25 -27
- package/dist/resources/available/available.test.mjs +7 -7
- package/dist/resources/available/index.d.mts +1 -1
- package/dist/resources/available/index.d.ts +1 -1
- package/dist/resources/bank-accounts/bank-accounts.test.js +25 -27
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +7 -7
- package/dist/resources/bank-accounts/index.d.mts +2 -4
- package/dist/resources/bank-accounts/index.d.ts +2 -4
- package/dist/resources/instances/index.d.mts +1 -1
- package/dist/resources/instances/index.d.ts +1 -1
- package/dist/resources/instances/instances.test.js +25 -27
- package/dist/resources/instances/instances.test.mjs +7 -7
- package/dist/resources/partner-fees/index.d.mts +1 -1
- package/dist/resources/partner-fees/index.d.ts +1 -1
- package/dist/resources/partner-fees/partner-fees.test.js +25 -27
- package/dist/resources/partner-fees/partner-fees.test.mjs +7 -7
- package/dist/resources/payins/index.d.mts +61 -148
- package/dist/resources/payins/index.d.ts +61 -148
- package/dist/resources/payins/index.js +0 -19
- package/dist/resources/payins/index.mjs +1 -1
- package/dist/resources/payins/payins-quotes.test.js +25 -113
- package/dist/resources/payins/payins-quotes.test.mjs +7 -93
- package/dist/resources/payins/payins.test.js +113 -163
- package/dist/resources/payins/payins.test.mjs +95 -143
- package/dist/resources/payins/quotes.d.mts +7 -72
- package/dist/resources/payins/quotes.d.ts +7 -72
- package/dist/resources/payins/quotes.js +0 -7
- package/dist/resources/payins/quotes.mjs +1 -1
- package/dist/resources/payouts/index.d.mts +34 -20
- package/dist/resources/payouts/index.d.ts +34 -20
- package/dist/resources/payouts/index.js +4 -4
- package/dist/resources/payouts/index.mjs +1 -1
- package/dist/resources/payouts/payouts.test.js +113 -131
- package/dist/resources/payouts/payouts.test.mjs +95 -111
- package/dist/resources/quotes/index.d.mts +16 -16
- package/dist/resources/quotes/index.d.ts +16 -16
- package/dist/resources/quotes/quotes.test.js +26 -28
- package/dist/resources/quotes/quotes.test.mjs +8 -8
- package/dist/resources/receivers/index.d.mts +9 -7
- package/dist/resources/receivers/index.d.ts +9 -7
- package/dist/resources/receivers/receivers.test.js +32 -35
- package/dist/resources/receivers/receivers.test.mjs +14 -15
- package/dist/resources/terms-of-service/index.d.mts +1 -1
- package/dist/resources/terms-of-service/index.d.ts +1 -1
- package/dist/resources/terms-of-service/terms-of-service.test.js +25 -27
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +7 -7
- package/dist/resources/virtual-accounts/index.d.mts +22 -7
- package/dist/resources/virtual-accounts/index.d.ts +22 -7
- package/dist/resources/virtual-accounts/index.js +20 -10
- package/dist/resources/virtual-accounts/index.mjs +1 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +144 -46
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +126 -26
- package/dist/resources/wallets/blockchain.d.mts +1 -1
- package/dist/resources/wallets/blockchain.d.ts +1 -1
- package/dist/resources/wallets/blockchain.test.js +25 -27
- package/dist/resources/wallets/blockchain.test.mjs +7 -7
- package/dist/resources/wallets/offramp.d.mts +1 -1
- package/dist/resources/wallets/offramp.d.ts +1 -1
- package/dist/resources/wallets/offramp.test.js +25 -27
- package/dist/resources/wallets/offramp.test.mjs +7 -7
- package/dist/resources/webhooks/index.d.mts +1 -1
- package/dist/resources/webhooks/index.d.ts +1 -1
- package/dist/resources/webhooks/webhooks.test.js +25 -27
- package/dist/resources/webhooks/webhooks.test.mjs +7 -7
- package/package.json +2 -1
|
@@ -1,66 +1,68 @@
|
|
|
1
|
-
import { I as InternalApiClient, P as PaginationParams, T as TransactionStatus, B as BlindpayApiResponse,
|
|
1
|
+
import { I as InternalApiClient, P as PaginationParams, T as TransactionStatus, B as BlindpayApiResponse, d as PayinTrackingTransaction, e as PayinTrackingPayment, f as PayinTrackingComplete, g as PayinTrackingPartnerFee, A as AccountClass, h as PayinPaymentMethod, S as StablecoinToken, i as Currency, j as PayerRules, N as Network, b as AchCopDocument, k as PaginationMetadata } from '../../api-client-DhY5DFpq.js';
|
|
2
2
|
|
|
3
|
+
type BlindpayBankDetails = {
|
|
4
|
+
routing_number: string;
|
|
5
|
+
account_number: string;
|
|
6
|
+
account_type: string;
|
|
7
|
+
swift_bic_code?: string | null;
|
|
8
|
+
ach?: {
|
|
9
|
+
routing_number: string;
|
|
10
|
+
account_number: string;
|
|
11
|
+
} | null;
|
|
12
|
+
wire?: {
|
|
13
|
+
routing_number: string;
|
|
14
|
+
account_number: string;
|
|
15
|
+
} | null;
|
|
16
|
+
rtp?: {
|
|
17
|
+
routing_number: string;
|
|
18
|
+
account_number: string;
|
|
19
|
+
} | null;
|
|
20
|
+
beneficiary: {
|
|
21
|
+
name: string;
|
|
22
|
+
address_line_1: string;
|
|
23
|
+
address_line_2: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
3
26
|
type Payin = {
|
|
4
|
-
receiver_id: string;
|
|
5
27
|
id: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
28
|
+
receiver_id: string;
|
|
29
|
+
pix_code?: string | null;
|
|
30
|
+
memo_code?: string | null;
|
|
31
|
+
clabe?: string | null;
|
|
9
32
|
status: TransactionStatus;
|
|
10
33
|
payin_quote_id: string;
|
|
11
34
|
instance_id: string;
|
|
12
|
-
tracking_transaction
|
|
13
|
-
tracking_payment
|
|
14
|
-
tracking_complete
|
|
15
|
-
tracking_partner_fee?:
|
|
35
|
+
tracking_transaction: PayinTrackingTransaction;
|
|
36
|
+
tracking_payment: PayinTrackingPayment;
|
|
37
|
+
tracking_complete: PayinTrackingComplete;
|
|
38
|
+
tracking_partner_fee?: PayinTrackingPartnerFee;
|
|
16
39
|
created_at: string;
|
|
17
40
|
updated_at: string;
|
|
18
|
-
image_url?: string;
|
|
19
|
-
first_name?: string;
|
|
20
|
-
last_name?: string;
|
|
21
|
-
legal_name?: string;
|
|
22
|
-
type:
|
|
23
|
-
payment_method:
|
|
41
|
+
image_url?: string | null | undefined;
|
|
42
|
+
first_name?: string | null | undefined;
|
|
43
|
+
last_name?: string | null | undefined;
|
|
44
|
+
legal_name?: string | null | undefined;
|
|
45
|
+
type: AccountClass;
|
|
46
|
+
payment_method: PayinPaymentMethod;
|
|
24
47
|
sender_amount: number;
|
|
25
48
|
receiver_amount: number;
|
|
26
49
|
token: StablecoinToken;
|
|
27
|
-
partner_fee_amount
|
|
28
|
-
total_fee_amount
|
|
50
|
+
partner_fee_amount?: number | null;
|
|
51
|
+
total_fee_amount?: number | null;
|
|
29
52
|
commercial_quotation: number;
|
|
30
53
|
blindpay_quotation: number;
|
|
31
|
-
currency:
|
|
32
|
-
billing_fee
|
|
54
|
+
currency: Extract<Currency, "BRL" | "USD" | "MXN" | "COP" | "ARS">;
|
|
55
|
+
billing_fee?: number | null;
|
|
56
|
+
is_otc?: boolean | null;
|
|
57
|
+
payer_rules?: PayerRules | null;
|
|
33
58
|
name: string;
|
|
34
|
-
address
|
|
59
|
+
address?: string | null;
|
|
35
60
|
network: Network;
|
|
36
|
-
blindpay_bank_details
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
ach: {
|
|
42
|
-
routing_number: string;
|
|
43
|
-
account_number: string;
|
|
44
|
-
};
|
|
45
|
-
wire: {
|
|
46
|
-
routing_number: string;
|
|
47
|
-
account_number: string;
|
|
48
|
-
};
|
|
49
|
-
rtp: {
|
|
50
|
-
routing_number: string;
|
|
51
|
-
account_number: string;
|
|
52
|
-
};
|
|
53
|
-
beneficiary: {
|
|
54
|
-
name: string;
|
|
55
|
-
address_line_1: string;
|
|
56
|
-
address_line_2: string;
|
|
57
|
-
};
|
|
58
|
-
receiving_bank: {
|
|
59
|
-
name: string;
|
|
60
|
-
address_line_1: string;
|
|
61
|
-
address_line_2: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
61
|
+
blindpay_bank_details?: BlindpayBankDetails | null;
|
|
62
|
+
pse_payment_link?: string | null;
|
|
63
|
+
pse_full_name?: string | null;
|
|
64
|
+
pse_tax_id?: string | null;
|
|
65
|
+
pse_document_type?: Extract<AchCopDocument, "CC" | "NIT"> | null;
|
|
64
66
|
};
|
|
65
67
|
type ListPayinsInput = PaginationParams & {
|
|
66
68
|
status?: TransactionStatus;
|
|
@@ -69,117 +71,28 @@ type ListPayinsInput = PaginationParams & {
|
|
|
69
71
|
type ListPayinsResponse = {
|
|
70
72
|
data: Payin[];
|
|
71
73
|
pagination: PaginationMetadata;
|
|
72
|
-
};
|
|
74
|
+
} | Payin[];
|
|
73
75
|
type CreatePayinInput = {
|
|
74
76
|
quote_id: string;
|
|
75
|
-
sender_address: string;
|
|
76
|
-
receiver_address: string;
|
|
77
|
-
amount: number;
|
|
78
|
-
token: StablecoinToken;
|
|
79
|
-
network: Network;
|
|
80
|
-
description?: string | null;
|
|
81
77
|
};
|
|
82
78
|
type GetPayinInput = string;
|
|
83
79
|
type GetPayinResponse = Payin;
|
|
84
80
|
type GetPayinTrackInput = string;
|
|
85
|
-
type GetPayinTrackResponse =
|
|
86
|
-
receiver_id: string;
|
|
87
|
-
id: string;
|
|
88
|
-
pix_code: string;
|
|
89
|
-
memo_code: string;
|
|
90
|
-
clabe: string;
|
|
91
|
-
status: string;
|
|
92
|
-
payin_quote_id: string;
|
|
93
|
-
instance_id: string;
|
|
94
|
-
tracking_transaction: {
|
|
95
|
-
step: string;
|
|
96
|
-
status: string;
|
|
97
|
-
external_id: string;
|
|
98
|
-
completed_at: string;
|
|
99
|
-
sender_name: string;
|
|
100
|
-
sender_tax_id: string;
|
|
101
|
-
sender_bank_code: string;
|
|
102
|
-
sender_account_number: string;
|
|
103
|
-
trace_number: string;
|
|
104
|
-
transaction_reference: string;
|
|
105
|
-
description: string;
|
|
106
|
-
};
|
|
107
|
-
tracking_payment: {
|
|
108
|
-
step: string;
|
|
109
|
-
provider_name: string;
|
|
110
|
-
completed_at: string;
|
|
111
|
-
};
|
|
112
|
-
tracking_complete: {
|
|
113
|
-
step: string;
|
|
114
|
-
transaction_hash: string;
|
|
115
|
-
completed_at: string;
|
|
116
|
-
};
|
|
117
|
-
tracking_partner_fee: {
|
|
118
|
-
step: string;
|
|
119
|
-
transaction_hash: string;
|
|
120
|
-
completed_at: string;
|
|
121
|
-
};
|
|
122
|
-
created_at: string;
|
|
123
|
-
updated_at: string;
|
|
124
|
-
image_url: string;
|
|
125
|
-
first_name: string;
|
|
126
|
-
last_name: string;
|
|
127
|
-
legal_name: string;
|
|
128
|
-
type: string;
|
|
129
|
-
payment_method: string;
|
|
130
|
-
sender_amount: number;
|
|
131
|
-
receiver_amount: number;
|
|
132
|
-
token: StablecoinToken;
|
|
133
|
-
partner_fee_amount: number;
|
|
134
|
-
total_fee_amount: number;
|
|
135
|
-
commercial_quotation: number;
|
|
136
|
-
blindpay_quotation: number;
|
|
137
|
-
currency: string;
|
|
138
|
-
billing_fee: number;
|
|
139
|
-
name: string;
|
|
140
|
-
address: string;
|
|
141
|
-
network: Network;
|
|
142
|
-
blindpay_bank_details: {
|
|
143
|
-
routing_number: string;
|
|
144
|
-
account_number: string;
|
|
145
|
-
account_type: string;
|
|
146
|
-
swift_bic_code: string;
|
|
147
|
-
ach: {
|
|
148
|
-
routing_number: string;
|
|
149
|
-
account_number: string;
|
|
150
|
-
};
|
|
151
|
-
wire: {
|
|
152
|
-
routing_number: string;
|
|
153
|
-
account_number: string;
|
|
154
|
-
};
|
|
155
|
-
rtp: {
|
|
156
|
-
routing_number: string;
|
|
157
|
-
account_number: string;
|
|
158
|
-
};
|
|
159
|
-
beneficiary: {
|
|
160
|
-
name: string;
|
|
161
|
-
address_line_1: string;
|
|
162
|
-
address_line_2: string;
|
|
163
|
-
};
|
|
164
|
-
receiving_bank: {
|
|
165
|
-
name: string;
|
|
166
|
-
address_line_1: string;
|
|
167
|
-
address_line_2: string;
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
type ExportPayinsInput = Pick<PaginationParams, "limit" | "offset"> & {
|
|
172
|
-
status: TransactionStatus;
|
|
173
|
-
};
|
|
174
|
-
type ExportPayinsResponse = Payin[];
|
|
81
|
+
type GetPayinTrackResponse = Payin;
|
|
175
82
|
type CreateEvmPayinInput = string;
|
|
176
|
-
type CreateEvmPayinResponse = Pick<Payin, "id" | "status" | "pix_code" | "memo_code" | "clabe" | "tracking_complete" | "tracking_payment" | "tracking_transaction" | "tracking_partner_fee"
|
|
83
|
+
type CreateEvmPayinResponse = Pick<Payin, "id" | "status" | "pix_code" | "memo_code" | "clabe" | "tracking_complete" | "tracking_payment" | "tracking_transaction" | "tracking_partner_fee"> & {
|
|
84
|
+
blindpay_bank_details: BlindpayBankDetails;
|
|
85
|
+
receiver_id?: string | null;
|
|
86
|
+
receiver_amount?: number | null;
|
|
87
|
+
payment_method?: PayinPaymentMethod | null;
|
|
88
|
+
billing_fee?: number | null;
|
|
89
|
+
sender_amount?: number | null;
|
|
90
|
+
};
|
|
177
91
|
declare function createPayinsResource(instanceId: string, client: InternalApiClient): {
|
|
178
92
|
list(params?: ListPayinsInput): Promise<BlindpayApiResponse<ListPayinsResponse>>;
|
|
179
93
|
get(payinId: GetPayinInput): Promise<BlindpayApiResponse<GetPayinResponse>>;
|
|
180
94
|
getTrack(payinId: GetPayinTrackInput): Promise<BlindpayApiResponse<GetPayinTrackResponse>>;
|
|
181
|
-
export({ ...params }: ExportPayinsInput): Promise<BlindpayApiResponse<ExportPayinsResponse>>;
|
|
182
95
|
createEvm(payin_quote_id: CreateEvmPayinInput): Promise<BlindpayApiResponse<CreateEvmPayinResponse>>;
|
|
183
96
|
};
|
|
184
97
|
|
|
185
|
-
export { type
|
|
98
|
+
export { type BlindpayBankDetails, type CreateEvmPayinInput, type CreateEvmPayinResponse, type CreatePayinInput, type GetPayinInput, type GetPayinResponse, type GetPayinTrackInput, type GetPayinTrackResponse, type ListPayinsInput, type ListPayinsResponse, type Payin, createPayinsResource };
|
|
@@ -2,21 +2,7 @@
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
5
|
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
6
|
var __export = (target, all) => {
|
|
21
7
|
for (var name in all)
|
|
22
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -49,11 +35,6 @@ function createPayinsResource(instanceId, client) {
|
|
|
49
35
|
getTrack(payinId) {
|
|
50
36
|
return client.get(`/e/payins/${payinId}`);
|
|
51
37
|
},
|
|
52
|
-
export(_a) {
|
|
53
|
-
var params = __objRest(_a, []);
|
|
54
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
55
|
-
return client.get(`/instances/${instanceId}/export/payins${queryParams}`);
|
|
56
|
-
},
|
|
57
38
|
createEvm(payin_quote_id) {
|
|
58
39
|
return client.post(`/instances/${instanceId}/payins/evm`, {
|
|
59
40
|
payin_quote_id
|
|
@@ -18702,7 +18702,7 @@ var import_expect_type = __toESM(require_dist(), 1);
|
|
|
18702
18702
|
var import_svix = require("svix");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "
|
|
18705
|
+
var version = "3.1.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18905,11 +18905,6 @@ function createPayinsResource(instanceId, client) {
|
|
|
18905
18905
|
getTrack(payinId) {
|
|
18906
18906
|
return client.get(`/e/payins/${payinId}`);
|
|
18907
18907
|
},
|
|
18908
|
-
export(_a3) {
|
|
18909
|
-
var params = __objRest(_a3, []);
|
|
18910
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18911
|
-
return client.get(`/instances/${instanceId}/export/payins${queryParams}`);
|
|
18912
|
-
},
|
|
18913
18908
|
createEvm(payin_quote_id) {
|
|
18914
18909
|
return client.post(`/instances/${instanceId}/payins/evm`, {
|
|
18915
18910
|
payin_quote_id
|
|
@@ -18928,13 +18923,6 @@ function createPayinQuotesResource(instanceId, client) {
|
|
|
18928
18923
|
getFxRate(_b) {
|
|
18929
18924
|
var data = __objRest(_b, []);
|
|
18930
18925
|
return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
|
|
18931
|
-
},
|
|
18932
|
-
get(id) {
|
|
18933
|
-
return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
|
|
18934
|
-
},
|
|
18935
|
-
list(params) {
|
|
18936
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18937
|
-
return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
|
|
18938
18926
|
}
|
|
18939
18927
|
};
|
|
18940
18928
|
}
|
|
@@ -18946,10 +18934,6 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18946
18934
|
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18947
18935
|
return client.get(`/instances/${instanceId}/payouts${queryParams}`);
|
|
18948
18936
|
},
|
|
18949
|
-
export(params) {
|
|
18950
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18951
|
-
return client.get(`/instances/${instanceId}/export/payouts${queryParams}`);
|
|
18952
|
-
},
|
|
18953
18937
|
get(payoutId) {
|
|
18954
18938
|
return client.get(`/instances/${instanceId}/payouts/${payoutId}`);
|
|
18955
18939
|
},
|
|
@@ -18967,6 +18951,10 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18967
18951
|
createEvm(_c) {
|
|
18968
18952
|
var data = __objRest(_c, []);
|
|
18969
18953
|
return client.post(`/instances/${instanceId}/payouts/evm`, data);
|
|
18954
|
+
},
|
|
18955
|
+
createSolana(_d) {
|
|
18956
|
+
var data = __objRest(_d, []);
|
|
18957
|
+
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
18970
18958
|
}
|
|
18971
18959
|
};
|
|
18972
18960
|
}
|
|
@@ -19059,30 +19047,40 @@ function createTermsOfServiceResource(instanceId, client) {
|
|
|
19059
19047
|
// src/resources/virtual-accounts/index.ts
|
|
19060
19048
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19061
19049
|
return {
|
|
19062
|
-
|
|
19050
|
+
list(receiver_id) {
|
|
19051
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19052
|
+
},
|
|
19053
|
+
get({
|
|
19054
|
+
receiver_id,
|
|
19055
|
+
id
|
|
19056
|
+
}) {
|
|
19057
|
+
return client.get(
|
|
19058
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
|
|
19059
|
+
);
|
|
19060
|
+
},
|
|
19061
|
+
create(_a3) {
|
|
19063
19062
|
var _b = _a3, {
|
|
19064
19063
|
receiver_id
|
|
19065
19064
|
} = _b, data = __objRest(_b, [
|
|
19066
19065
|
"receiver_id"
|
|
19067
19066
|
]);
|
|
19068
|
-
return client.
|
|
19067
|
+
return client.post(
|
|
19069
19068
|
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19070
19069
|
data
|
|
19071
19070
|
);
|
|
19072
19071
|
},
|
|
19073
|
-
|
|
19072
|
+
update(_c) {
|
|
19074
19073
|
var _d = _c, {
|
|
19075
|
-
receiver_id
|
|
19074
|
+
receiver_id,
|
|
19075
|
+
id
|
|
19076
19076
|
} = _d, data = __objRest(_d, [
|
|
19077
|
-
"receiver_id"
|
|
19077
|
+
"receiver_id",
|
|
19078
|
+
"id"
|
|
19078
19079
|
]);
|
|
19079
|
-
return client.
|
|
19080
|
-
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
|
|
19080
|
+
return client.put(
|
|
19081
|
+
`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
|
|
19081
19082
|
data
|
|
19082
19083
|
);
|
|
19083
|
-
},
|
|
19084
|
-
get(receiver_id) {
|
|
19085
|
-
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
|
|
19086
19084
|
}
|
|
19087
19085
|
};
|
|
19088
19086
|
}
|
|
@@ -19423,92 +19421,6 @@ describe("Payin quotes", () => {
|
|
|
19423
19421
|
globalExpect(data).toEqual(mockedFxRate);
|
|
19424
19422
|
}));
|
|
19425
19423
|
});
|
|
19426
|
-
describe("Get payin quote", () => {
|
|
19427
|
-
it("should get a payin quote", () => __async(null, null, function* () {
|
|
19428
|
-
const mockedPayinQuote = {
|
|
19429
|
-
id: "qu_000000000000",
|
|
19430
|
-
payment_method: "pix",
|
|
19431
|
-
token: "USDC",
|
|
19432
|
-
request_amount: 1e3,
|
|
19433
|
-
cover_fees: true,
|
|
19434
|
-
currency_type: "sender",
|
|
19435
|
-
expires_at: 1712958191,
|
|
19436
|
-
currency: "BRL",
|
|
19437
|
-
commercial_quotation: 495,
|
|
19438
|
-
blindpay_quotation: 505,
|
|
19439
|
-
receiver_amount: 1010,
|
|
19440
|
-
sender_amount: 5240,
|
|
19441
|
-
partner_fee_amount: 150,
|
|
19442
|
-
flat_fee: 50,
|
|
19443
|
-
total_fee_amount: 1.53,
|
|
19444
|
-
payer_rules: {
|
|
19445
|
-
pix_allowed_tax_ids: ["149.476.037-68"]
|
|
19446
|
-
},
|
|
19447
|
-
blockchain_wallet_id: "bw_000000000000",
|
|
19448
|
-
instance_id: "in_000000000000",
|
|
19449
|
-
partner_fee_id: "pf_000000000000",
|
|
19450
|
-
billing_fee: 100,
|
|
19451
|
-
created_at: "2021-01-01T00:00:00Z",
|
|
19452
|
-
updated_at: "2021-01-01T00:00:00Z"
|
|
19453
|
-
};
|
|
19454
|
-
fetchMock.mockResponseOnce(JSON.stringify(mockedPayinQuote), {
|
|
19455
|
-
headers: { "Content-Type": "application/json" }
|
|
19456
|
-
});
|
|
19457
|
-
const { data, error } = yield blindpay.payins.quotes.get("qu_000000000000");
|
|
19458
|
-
globalExpect(error).toBeNull();
|
|
19459
|
-
globalExpect(data).toEqual(mockedPayinQuote);
|
|
19460
|
-
}));
|
|
19461
|
-
});
|
|
19462
|
-
describe("List payin quotes", () => {
|
|
19463
|
-
it("should get a payin quote", () => __async(null, null, function* () {
|
|
19464
|
-
const mockedPayinQuote = {
|
|
19465
|
-
data: [
|
|
19466
|
-
{
|
|
19467
|
-
id: "qu_000000000000",
|
|
19468
|
-
payment_method: "pix",
|
|
19469
|
-
token: "USDC",
|
|
19470
|
-
request_amount: 1e3,
|
|
19471
|
-
cover_fees: true,
|
|
19472
|
-
currency_type: "sender",
|
|
19473
|
-
expires_at: 1712958191,
|
|
19474
|
-
currency: "BRL",
|
|
19475
|
-
commercial_quotation: 495,
|
|
19476
|
-
blindpay_quotation: 505,
|
|
19477
|
-
receiver_amount: 1010,
|
|
19478
|
-
sender_amount: 5240,
|
|
19479
|
-
partner_fee_amount: 150,
|
|
19480
|
-
flat_fee: 50,
|
|
19481
|
-
total_fee_amount: 1.53,
|
|
19482
|
-
payer_rules: {
|
|
19483
|
-
pix_allowed_tax_ids: ["149.476.037-68"]
|
|
19484
|
-
},
|
|
19485
|
-
blockchain_wallet_id: "bw_000000000000",
|
|
19486
|
-
instance_id: "in_000000000000",
|
|
19487
|
-
partner_fee_id: "pf_000000000000",
|
|
19488
|
-
billing_fee: 100,
|
|
19489
|
-
created_at: "2021-01-01T00:00:00Z",
|
|
19490
|
-
updated_at: "2021-01-01T00:00:00Z"
|
|
19491
|
-
}
|
|
19492
|
-
],
|
|
19493
|
-
pagination: {
|
|
19494
|
-
has_more: true,
|
|
19495
|
-
next_page: "qu_123",
|
|
19496
|
-
prev_page: "qu_123"
|
|
19497
|
-
}
|
|
19498
|
-
};
|
|
19499
|
-
fetchMock.mockResponseOnce(JSON.stringify(mockedPayinQuote), {
|
|
19500
|
-
headers: { "Content-Type": "application/json" }
|
|
19501
|
-
});
|
|
19502
|
-
const { data, error } = yield blindpay.payins.quotes.list({
|
|
19503
|
-
blockchain_wallet_id: "bw_000000000000",
|
|
19504
|
-
payment_method: "pix",
|
|
19505
|
-
token: "USDC",
|
|
19506
|
-
receiver_id: "re_000000000000"
|
|
19507
|
-
});
|
|
19508
|
-
globalExpect(error).toBeNull();
|
|
19509
|
-
globalExpect(data).toEqual(mockedPayinQuote);
|
|
19510
|
-
}));
|
|
19511
|
-
});
|
|
19512
19424
|
});
|
|
19513
19425
|
/*! Bundled license information:
|
|
19514
19426
|
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
11
|
+
} from "../../chunk-V4V47AUC.mjs";
|
|
13
12
|
import "../../chunk-FG25JHDX.mjs";
|
|
14
13
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-LEPGLH7Q.mjs";
|
|
19
|
+
import "../../chunk-VGU72ZNI.mjs";
|
|
20
|
+
import "../../chunk-E7M4CJKR.mjs";
|
|
21
|
+
import "../../chunk-VOB7TMKL.mjs";
|
|
20
22
|
import "../../chunk-RC5NN5UF.mjs";
|
|
21
|
-
import "../../chunk-W7NJUABI.mjs";
|
|
22
|
-
import "../../chunk-VRA5HP7F.mjs";
|
|
23
|
-
import "../../chunk-3QQCDR3E.mjs";
|
|
24
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
@@ -90,92 +90,6 @@ var require_payins_quotes_test = __commonJS({
|
|
|
90
90
|
globalExpect(data).toEqual(mockedFxRate);
|
|
91
91
|
}));
|
|
92
92
|
});
|
|
93
|
-
describe("Get payin quote", () => {
|
|
94
|
-
it("should get a payin quote", () => __async(null, null, function* () {
|
|
95
|
-
const mockedPayinQuote = {
|
|
96
|
-
id: "qu_000000000000",
|
|
97
|
-
payment_method: "pix",
|
|
98
|
-
token: "USDC",
|
|
99
|
-
request_amount: 1e3,
|
|
100
|
-
cover_fees: true,
|
|
101
|
-
currency_type: "sender",
|
|
102
|
-
expires_at: 1712958191,
|
|
103
|
-
currency: "BRL",
|
|
104
|
-
commercial_quotation: 495,
|
|
105
|
-
blindpay_quotation: 505,
|
|
106
|
-
receiver_amount: 1010,
|
|
107
|
-
sender_amount: 5240,
|
|
108
|
-
partner_fee_amount: 150,
|
|
109
|
-
flat_fee: 50,
|
|
110
|
-
total_fee_amount: 1.53,
|
|
111
|
-
payer_rules: {
|
|
112
|
-
pix_allowed_tax_ids: ["149.476.037-68"]
|
|
113
|
-
},
|
|
114
|
-
blockchain_wallet_id: "bw_000000000000",
|
|
115
|
-
instance_id: "in_000000000000",
|
|
116
|
-
partner_fee_id: "pf_000000000000",
|
|
117
|
-
billing_fee: 100,
|
|
118
|
-
created_at: "2021-01-01T00:00:00Z",
|
|
119
|
-
updated_at: "2021-01-01T00:00:00Z"
|
|
120
|
-
};
|
|
121
|
-
fetchMock.mockResponseOnce(JSON.stringify(mockedPayinQuote), {
|
|
122
|
-
headers: { "Content-Type": "application/json" }
|
|
123
|
-
});
|
|
124
|
-
const { data, error } = yield blindpay.payins.quotes.get("qu_000000000000");
|
|
125
|
-
globalExpect(error).toBeNull();
|
|
126
|
-
globalExpect(data).toEqual(mockedPayinQuote);
|
|
127
|
-
}));
|
|
128
|
-
});
|
|
129
|
-
describe("List payin quotes", () => {
|
|
130
|
-
it("should get a payin quote", () => __async(null, null, function* () {
|
|
131
|
-
const mockedPayinQuote = {
|
|
132
|
-
data: [
|
|
133
|
-
{
|
|
134
|
-
id: "qu_000000000000",
|
|
135
|
-
payment_method: "pix",
|
|
136
|
-
token: "USDC",
|
|
137
|
-
request_amount: 1e3,
|
|
138
|
-
cover_fees: true,
|
|
139
|
-
currency_type: "sender",
|
|
140
|
-
expires_at: 1712958191,
|
|
141
|
-
currency: "BRL",
|
|
142
|
-
commercial_quotation: 495,
|
|
143
|
-
blindpay_quotation: 505,
|
|
144
|
-
receiver_amount: 1010,
|
|
145
|
-
sender_amount: 5240,
|
|
146
|
-
partner_fee_amount: 150,
|
|
147
|
-
flat_fee: 50,
|
|
148
|
-
total_fee_amount: 1.53,
|
|
149
|
-
payer_rules: {
|
|
150
|
-
pix_allowed_tax_ids: ["149.476.037-68"]
|
|
151
|
-
},
|
|
152
|
-
blockchain_wallet_id: "bw_000000000000",
|
|
153
|
-
instance_id: "in_000000000000",
|
|
154
|
-
partner_fee_id: "pf_000000000000",
|
|
155
|
-
billing_fee: 100,
|
|
156
|
-
created_at: "2021-01-01T00:00:00Z",
|
|
157
|
-
updated_at: "2021-01-01T00:00:00Z"
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
pagination: {
|
|
161
|
-
has_more: true,
|
|
162
|
-
next_page: "qu_123",
|
|
163
|
-
prev_page: "qu_123"
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
fetchMock.mockResponseOnce(JSON.stringify(mockedPayinQuote), {
|
|
167
|
-
headers: { "Content-Type": "application/json" }
|
|
168
|
-
});
|
|
169
|
-
const { data, error } = yield blindpay.payins.quotes.list({
|
|
170
|
-
blockchain_wallet_id: "bw_000000000000",
|
|
171
|
-
payment_method: "pix",
|
|
172
|
-
token: "USDC",
|
|
173
|
-
receiver_id: "re_000000000000"
|
|
174
|
-
});
|
|
175
|
-
globalExpect(error).toBeNull();
|
|
176
|
-
globalExpect(data).toEqual(mockedPayinQuote);
|
|
177
|
-
}));
|
|
178
|
-
});
|
|
179
93
|
});
|
|
180
94
|
}
|
|
181
95
|
});
|