@blindpay/node 3.2.0 → 3.3.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/README.md +1 -1
- package/dist/api-client-Cu0yYexQ.d.ts +16 -0
- package/dist/api-client-DV5jG52T.d.mts +16 -0
- package/dist/chunk-ALHMJWQN.mjs +21 -0
- package/dist/{chunk-VOB7TMKL.mjs → chunk-F5Z45GCA.mjs} +8 -0
- package/dist/chunk-ISHZTBAN.mjs +39 -0
- package/dist/{chunk-AFXWEXL6.mjs → chunk-JOHWDSDM.mjs} +44 -20
- package/dist/chunk-KMU6V4LW.mjs +50 -0
- package/dist/chunk-UDRMLZWT.mjs +53 -0
- package/dist/{chunk-CPOSU35L.mjs → chunk-UOAM7SX3.mjs} +43 -25
- package/dist/{chunk-U7CKUUO7.mjs → chunk-WE73MTQL.mjs} +3 -0
- package/dist/{chunk-67XECGMJ.mjs → chunk-YIZJM2GU.mjs} +4 -3
- package/dist/{api-client-CIPV5zmo.d.mts → index.d-yOiKSwHO.d.mts} +6 -19
- package/dist/{api-client-CIPV5zmo.d.ts → index.d-yOiKSwHO.d.ts} +6 -19
- package/dist/index.d.mts +19 -6
- package/dist/index.d.ts +19 -6
- package/dist/index.js +183 -30
- package/dist/index.mjs +43 -19
- package/dist/resources/api-keys/api-keys.test.js +175 -30
- package/dist/resources/api-keys/api-keys.test.mjs +12 -8
- package/dist/resources/api-keys/index.d.mts +2 -1
- package/dist/resources/api-keys/index.d.ts +2 -1
- package/dist/resources/available/available.test.js +199 -30
- package/dist/resources/available/available.test.mjs +36 -8
- package/dist/resources/available/index.d.mts +8 -2
- package/dist/resources/available/index.d.ts +8 -2
- package/dist/resources/available/index.js +3 -0
- package/dist/resources/available/index.mjs +1 -1
- package/dist/resources/bank-accounts/bank-accounts.test.js +230 -32
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +67 -10
- package/dist/resources/bank-accounts/index.d.mts +83 -9
- package/dist/resources/bank-accounts/index.d.ts +83 -9
- package/dist/resources/bank-accounts/index.js +43 -25
- package/dist/resources/bank-accounts/index.mjs +1 -1
- package/dist/resources/fees/fees.test.d.mts +2 -0
- package/dist/resources/fees/fees.test.d.ts +2 -0
- package/dist/resources/fees/fees.test.js +19845 -0
- package/dist/resources/fees/fees.test.mjs +85 -0
- package/dist/resources/fees/index.d.mts +36 -0
- package/dist/resources/fees/index.d.ts +36 -0
- package/dist/resources/fees/index.js +36 -0
- package/dist/resources/fees/index.mjs +9 -0
- package/dist/resources/instances/index.d.mts +2 -1
- package/dist/resources/instances/index.d.ts +2 -1
- package/dist/resources/instances/instances.test.js +175 -30
- package/dist/resources/instances/instances.test.mjs +12 -8
- package/dist/resources/partner-fees/index.d.mts +2 -1
- package/dist/resources/partner-fees/index.d.ts +2 -1
- package/dist/resources/partner-fees/partner-fees.test.js +175 -30
- package/dist/resources/partner-fees/partner-fees.test.mjs +12 -8
- package/dist/resources/payins/index.d.mts +2 -1
- package/dist/resources/payins/index.d.ts +2 -1
- package/dist/resources/payins/payins-quotes.test.js +175 -30
- package/dist/resources/payins/payins-quotes.test.mjs +12 -8
- package/dist/resources/payins/payins.test.js +175 -30
- package/dist/resources/payins/payins.test.mjs +12 -8
- package/dist/resources/payins/quotes.d.mts +2 -1
- package/dist/resources/payins/quotes.d.ts +2 -1
- package/dist/resources/payouts/index.d.mts +15 -3
- package/dist/resources/payouts/index.d.ts +15 -3
- package/dist/resources/payouts/index.js +8 -0
- package/dist/resources/payouts/index.mjs +1 -1
- package/dist/resources/payouts/payouts.test.js +194 -30
- package/dist/resources/payouts/payouts.test.mjs +31 -8
- package/dist/resources/quotes/index.d.mts +2 -1
- package/dist/resources/quotes/index.d.ts +2 -1
- package/dist/resources/quotes/quotes.test.js +175 -30
- package/dist/resources/quotes/quotes.test.mjs +12 -8
- package/dist/resources/receivers/index.d.mts +16 -4
- package/dist/resources/receivers/index.d.ts +16 -4
- package/dist/resources/receivers/index.js +4 -3
- package/dist/resources/receivers/index.mjs +1 -1
- package/dist/resources/receivers/receivers.test.js +331 -179
- package/dist/resources/receivers/receivers.test.mjs +168 -157
- package/dist/resources/terms-of-service/index.d.mts +2 -1
- package/dist/resources/terms-of-service/index.d.ts +2 -1
- package/dist/resources/terms-of-service/terms-of-service.test.js +175 -30
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +12 -8
- package/dist/resources/transfers/index.d.mts +94 -0
- package/dist/resources/transfers/index.d.ts +94 -0
- package/dist/resources/transfers/index.js +67 -0
- package/dist/resources/transfers/index.mjs +9 -0
- package/dist/resources/transfers/transfers.test.d.mts +2 -0
- package/dist/resources/transfers/transfers.test.d.ts +2 -0
- package/dist/resources/transfers/transfers.test.js +19931 -0
- package/dist/resources/transfers/transfers.test.mjs +171 -0
- package/dist/resources/upload/index.d.mts +16 -0
- package/dist/resources/upload/index.d.ts +16 -0
- package/dist/resources/upload/index.js +100 -0
- package/dist/resources/upload/index.mjs +9 -0
- package/dist/resources/upload/upload.test.d.mts +2 -0
- package/dist/resources/upload/upload.test.d.ts +2 -0
- package/dist/resources/upload/upload.test.js +19840 -0
- package/dist/resources/upload/upload.test.mjs +80 -0
- package/dist/resources/virtual-accounts/index.d.mts +2 -1
- package/dist/resources/virtual-accounts/index.d.ts +2 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +175 -30
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +12 -8
- package/dist/resources/wallets/blockchain.d.mts +2 -1
- package/dist/resources/wallets/blockchain.d.ts +2 -1
- package/dist/resources/wallets/blockchain.test.js +175 -30
- package/dist/resources/wallets/blockchain.test.mjs +12 -8
- package/dist/resources/wallets/custodial.d.mts +55 -0
- package/dist/resources/wallets/custodial.d.ts +55 -0
- package/dist/resources/wallets/custodial.js +78 -0
- package/dist/resources/wallets/custodial.mjs +9 -0
- package/dist/resources/wallets/custodial.test.d.mts +2 -0
- package/dist/resources/wallets/custodial.test.d.ts +2 -0
- package/dist/resources/wallets/custodial.test.js +19901 -0
- package/dist/resources/wallets/custodial.test.mjs +141 -0
- package/dist/resources/wallets/offramp.d.mts +2 -1
- package/dist/resources/wallets/offramp.d.ts +2 -1
- package/dist/resources/wallets/offramp.test.js +175 -30
- package/dist/resources/wallets/offramp.test.mjs +12 -8
- package/dist/resources/webhooks/index.d.mts +3 -2
- package/dist/resources/webhooks/index.d.ts +3 -2
- package/dist/resources/webhooks/webhooks.test.js +175 -30
- package/dist/resources/webhooks/webhooks.test.mjs +12 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ For detailed API documentation, visit:
|
|
|
99
99
|
|
|
100
100
|
## Support
|
|
101
101
|
|
|
102
|
-
- 📧 Email: [
|
|
102
|
+
- 📧 Email: [alves@blindpay.com](mailto:alves@blindpay.com)
|
|
103
103
|
- 🐛 Issues: [GitHub Issues](https://github.com/blindpaylabs/blindpay-node/issues)
|
|
104
104
|
|
|
105
105
|
## License
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { B as BlindpayApiResponse } from './index.d-yOiKSwHO.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Internal API client interface that resources use to make HTTP requests.
|
|
6
|
+
* This interface is not exposed to SDK users.
|
|
7
|
+
*/
|
|
8
|
+
interface InternalApiClient {
|
|
9
|
+
get: <T>(path: string) => Promise<BlindpayApiResponse<T>>;
|
|
10
|
+
post: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
11
|
+
put: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
12
|
+
patch: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
13
|
+
delete: <T>(path: string, body?: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type { InternalApiClient as I };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { B as BlindpayApiResponse } from './index.d-yOiKSwHO.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Internal API client interface that resources use to make HTTP requests.
|
|
6
|
+
* This interface is not exposed to SDK users.
|
|
7
|
+
*/
|
|
8
|
+
interface InternalApiClient {
|
|
9
|
+
get: <T>(path: string) => Promise<BlindpayApiResponse<T>>;
|
|
10
|
+
post: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
11
|
+
put: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
12
|
+
patch: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
13
|
+
delete: <T>(path: string, body?: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type { InternalApiClient as I };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__esm
|
|
3
|
+
} from "./chunk-OBKEW4AQ.mjs";
|
|
4
|
+
|
|
5
|
+
// src/resources/fees/index.ts
|
|
6
|
+
function createFeesResource(instanceId, client) {
|
|
7
|
+
return {
|
|
8
|
+
get() {
|
|
9
|
+
return client.get(`/instances/${instanceId}/billing/fees`);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
var init_fees = __esm({
|
|
14
|
+
"src/resources/fees/index.ts"() {
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
createFeesResource,
|
|
20
|
+
init_fees
|
|
21
|
+
};
|
|
@@ -31,6 +31,14 @@ function createPayoutsResource(instanceId, client) {
|
|
|
31
31
|
createSolana(_d) {
|
|
32
32
|
var data = __objRest(_d, []);
|
|
33
33
|
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
34
|
+
},
|
|
35
|
+
submitDocuments(_e) {
|
|
36
|
+
var _f = _e, {
|
|
37
|
+
payout_id
|
|
38
|
+
} = _f, data = __objRest(_f, [
|
|
39
|
+
"payout_id"
|
|
40
|
+
]);
|
|
41
|
+
return client.post(`/instances/${instanceId}/payouts/${payout_id}/documents`, data);
|
|
34
42
|
}
|
|
35
43
|
};
|
|
36
44
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__esm,
|
|
3
|
+
__objRest
|
|
4
|
+
} from "./chunk-OBKEW4AQ.mjs";
|
|
5
|
+
|
|
6
|
+
// src/resources/transfers/index.ts
|
|
7
|
+
function createTransfersResource(instanceId, client) {
|
|
8
|
+
return {
|
|
9
|
+
quotes: {
|
|
10
|
+
create(_a) {
|
|
11
|
+
var data = __objRest(_a, []);
|
|
12
|
+
return client.post(`/instances/${instanceId}/transfer-quotes`, data);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
create(_b) {
|
|
16
|
+
var data = __objRest(_b, []);
|
|
17
|
+
return client.post(`/instances/${instanceId}/transfers`, data);
|
|
18
|
+
},
|
|
19
|
+
list(params) {
|
|
20
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
21
|
+
return client.get(`/instances/${instanceId}/transfers${queryParams}`);
|
|
22
|
+
},
|
|
23
|
+
get(transferId) {
|
|
24
|
+
return client.get(`/instances/${instanceId}/transfers/${transferId}`);
|
|
25
|
+
},
|
|
26
|
+
getTrack(transferId) {
|
|
27
|
+
return client.get(`/e/transfers/${transferId}`);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
var init_transfers = __esm({
|
|
32
|
+
"src/resources/transfers/index.ts"() {
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
createTransfersResource,
|
|
38
|
+
init_transfers
|
|
39
|
+
};
|
|
@@ -2,6 +2,10 @@ import {
|
|
|
2
2
|
createBlockchainWalletsResource,
|
|
3
3
|
init_blockchain
|
|
4
4
|
} from "./chunk-FG25JHDX.mjs";
|
|
5
|
+
import {
|
|
6
|
+
createCustodialWalletsResource,
|
|
7
|
+
init_custodial
|
|
8
|
+
} from "./chunk-KMU6V4LW.mjs";
|
|
5
9
|
import {
|
|
6
10
|
createOfframpWalletsResource,
|
|
7
11
|
init_offramp
|
|
@@ -10,6 +14,26 @@ import {
|
|
|
10
14
|
createWebhookEndpointsResource,
|
|
11
15
|
init_webhooks
|
|
12
16
|
} from "./chunk-UC57SCKQ.mjs";
|
|
17
|
+
import {
|
|
18
|
+
createTransfersResource,
|
|
19
|
+
init_transfers
|
|
20
|
+
} from "./chunk-ISHZTBAN.mjs";
|
|
21
|
+
import {
|
|
22
|
+
createUploadResource,
|
|
23
|
+
init_upload
|
|
24
|
+
} from "./chunk-UDRMLZWT.mjs";
|
|
25
|
+
import {
|
|
26
|
+
createVirtualAccountsResource,
|
|
27
|
+
init_virtual_accounts
|
|
28
|
+
} from "./chunk-LEPGLH7Q.mjs";
|
|
29
|
+
import {
|
|
30
|
+
createPayinQuotesResource,
|
|
31
|
+
init_quotes
|
|
32
|
+
} from "./chunk-E7M4CJKR.mjs";
|
|
33
|
+
import {
|
|
34
|
+
createPayoutsResource,
|
|
35
|
+
init_payouts
|
|
36
|
+
} from "./chunk-F5Z45GCA.mjs";
|
|
13
37
|
import {
|
|
14
38
|
createQuotesResource,
|
|
15
39
|
init_quotes as init_quotes2
|
|
@@ -17,15 +41,19 @@ import {
|
|
|
17
41
|
import {
|
|
18
42
|
createReceiversResource,
|
|
19
43
|
init_receivers
|
|
20
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-YIZJM2GU.mjs";
|
|
21
45
|
import {
|
|
22
46
|
createTermsOfServiceResource,
|
|
23
47
|
init_terms_of_service
|
|
24
48
|
} from "./chunk-Z6EYX4D3.mjs";
|
|
25
49
|
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} from "./chunk-
|
|
50
|
+
createFeesResource,
|
|
51
|
+
init_fees
|
|
52
|
+
} from "./chunk-ALHMJWQN.mjs";
|
|
53
|
+
import {
|
|
54
|
+
createInstancesResource,
|
|
55
|
+
init_instances
|
|
56
|
+
} from "./chunk-B5T7AQLH.mjs";
|
|
29
57
|
import {
|
|
30
58
|
createPartnerFeesResource,
|
|
31
59
|
init_partner_fees
|
|
@@ -34,14 +62,6 @@ import {
|
|
|
34
62
|
createPayinsResource,
|
|
35
63
|
init_payins
|
|
36
64
|
} from "./chunk-VGU72ZNI.mjs";
|
|
37
|
-
import {
|
|
38
|
-
createPayinQuotesResource,
|
|
39
|
-
init_quotes
|
|
40
|
-
} from "./chunk-E7M4CJKR.mjs";
|
|
41
|
-
import {
|
|
42
|
-
createPayoutsResource,
|
|
43
|
-
init_payouts
|
|
44
|
-
} from "./chunk-VOB7TMKL.mjs";
|
|
45
65
|
import {
|
|
46
66
|
createApiKeysResource,
|
|
47
67
|
init_api_keys
|
|
@@ -49,15 +69,11 @@ import {
|
|
|
49
69
|
import {
|
|
50
70
|
createAvailableResource,
|
|
51
71
|
init_available
|
|
52
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-WE73MTQL.mjs";
|
|
53
73
|
import {
|
|
54
74
|
createBankAccountsResource,
|
|
55
75
|
init_bank_accounts
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import {
|
|
58
|
-
createInstancesResource,
|
|
59
|
-
init_instances
|
|
60
|
-
} from "./chunk-B5T7AQLH.mjs";
|
|
76
|
+
} from "./chunk-UOAM7SX3.mjs";
|
|
61
77
|
import {
|
|
62
78
|
__async,
|
|
63
79
|
__esm,
|
|
@@ -69,7 +85,7 @@ import {
|
|
|
69
85
|
var version;
|
|
70
86
|
var init_package = __esm({
|
|
71
87
|
"package.json"() {
|
|
72
|
-
version = "3.
|
|
88
|
+
version = "3.3.0";
|
|
73
89
|
}
|
|
74
90
|
});
|
|
75
91
|
|
|
@@ -98,6 +114,7 @@ var init_client = __esm({
|
|
|
98
114
|
init_api_keys();
|
|
99
115
|
init_available();
|
|
100
116
|
init_bank_accounts();
|
|
117
|
+
init_fees();
|
|
101
118
|
init_instances();
|
|
102
119
|
init_partner_fees();
|
|
103
120
|
init_payins();
|
|
@@ -106,8 +123,11 @@ var init_client = __esm({
|
|
|
106
123
|
init_quotes2();
|
|
107
124
|
init_receivers();
|
|
108
125
|
init_terms_of_service();
|
|
126
|
+
init_transfers();
|
|
127
|
+
init_upload();
|
|
109
128
|
init_virtual_accounts();
|
|
110
129
|
init_blockchain();
|
|
130
|
+
init_custodial();
|
|
111
131
|
init_offramp();
|
|
112
132
|
init_webhooks();
|
|
113
133
|
BlindPay = class {
|
|
@@ -152,13 +172,17 @@ var init_client = __esm({
|
|
|
152
172
|
});
|
|
153
173
|
this.quotes = createQuotesResource(this.instanceId, this.api);
|
|
154
174
|
this.payouts = createPayoutsResource(this.instanceId, this.api);
|
|
175
|
+
this.transfers = createTransfersResource(this.instanceId, this.api);
|
|
176
|
+
this.fees = createFeesResource(this.instanceId, this.api);
|
|
177
|
+
this.upload = createUploadResource(this.baseUrl, this.headers);
|
|
155
178
|
this.receivers = __spreadProps(__spreadValues({}, createReceiversResource(this.instanceId, this.api)), {
|
|
156
179
|
bankAccounts: createBankAccountsResource(this.instanceId, this.api)
|
|
157
180
|
});
|
|
158
181
|
this.virtualAccounts = createVirtualAccountsResource(this.instanceId, this.api);
|
|
159
182
|
this.wallets = {
|
|
160
183
|
blockchain: createBlockchainWalletsResource(this.instanceId, this.api),
|
|
161
|
-
offramp: createOfframpWalletsResource(this.instanceId, this.api)
|
|
184
|
+
offramp: createOfframpWalletsResource(this.instanceId, this.api),
|
|
185
|
+
custodial: createCustodialWalletsResource(this.instanceId, this.api)
|
|
162
186
|
};
|
|
163
187
|
}
|
|
164
188
|
request(method, path, body) {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__esm,
|
|
3
|
+
__objRest
|
|
4
|
+
} from "./chunk-OBKEW4AQ.mjs";
|
|
5
|
+
|
|
6
|
+
// src/resources/wallets/custodial.ts
|
|
7
|
+
function createCustodialWalletsResource(instanceId, client) {
|
|
8
|
+
return {
|
|
9
|
+
list(receiver_id) {
|
|
10
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/wallets`);
|
|
11
|
+
},
|
|
12
|
+
get({
|
|
13
|
+
receiver_id,
|
|
14
|
+
id
|
|
15
|
+
}) {
|
|
16
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/wallets/${id}`);
|
|
17
|
+
},
|
|
18
|
+
create(_a) {
|
|
19
|
+
var _b = _a, {
|
|
20
|
+
receiver_id
|
|
21
|
+
} = _b, data = __objRest(_b, [
|
|
22
|
+
"receiver_id"
|
|
23
|
+
]);
|
|
24
|
+
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/wallets`, data);
|
|
25
|
+
},
|
|
26
|
+
getBalance({
|
|
27
|
+
receiver_id,
|
|
28
|
+
id
|
|
29
|
+
}) {
|
|
30
|
+
return client.get(
|
|
31
|
+
`/instances/${instanceId}/receivers/${receiver_id}/wallets/${id}/balance`
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
delete({
|
|
35
|
+
receiver_id,
|
|
36
|
+
id
|
|
37
|
+
}) {
|
|
38
|
+
return client.delete(`/instances/${instanceId}/receivers/${receiver_id}/wallets/${id}`);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
var init_custodial = __esm({
|
|
43
|
+
"src/resources/wallets/custodial.ts"() {
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
createCustodialWalletsResource,
|
|
49
|
+
init_custodial
|
|
50
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__async,
|
|
3
|
+
__esm,
|
|
4
|
+
__objRest
|
|
5
|
+
} from "./chunk-OBKEW4AQ.mjs";
|
|
6
|
+
|
|
7
|
+
// src/resources/upload/index.ts
|
|
8
|
+
function createUploadResource(baseUrl, headers) {
|
|
9
|
+
return {
|
|
10
|
+
upload(_0) {
|
|
11
|
+
return __async(this, arguments, function* ({
|
|
12
|
+
file,
|
|
13
|
+
bucket,
|
|
14
|
+
instance_id
|
|
15
|
+
}) {
|
|
16
|
+
var _b;
|
|
17
|
+
const formData = new FormData();
|
|
18
|
+
formData.append("file", file);
|
|
19
|
+
formData.append("bucket", bucket);
|
|
20
|
+
const queryParams = instance_id ? `?instance_id=${instance_id}` : "";
|
|
21
|
+
const _a2 = headers, { "Content-Type": _ } = _a2, headersWithoutContentType = __objRest(_a2, ["Content-Type"]);
|
|
22
|
+
const response = yield fetch(`${baseUrl}/upload${queryParams}`, {
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers: headersWithoutContentType,
|
|
25
|
+
body: formData
|
|
26
|
+
});
|
|
27
|
+
if (!response.ok) {
|
|
28
|
+
const error = yield response.json();
|
|
29
|
+
return {
|
|
30
|
+
data: null,
|
|
31
|
+
error: {
|
|
32
|
+
message: (_b = error == null ? void 0 : error.message) != null ? _b : "Unknown error"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const data = yield response.json();
|
|
37
|
+
return {
|
|
38
|
+
data,
|
|
39
|
+
error: null
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
var init_upload = __esm({
|
|
46
|
+
"src/resources/upload/index.ts"() {
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
createUploadResource,
|
|
52
|
+
init_upload
|
|
53
|
+
};
|
|
@@ -7,8 +7,16 @@ import {
|
|
|
7
7
|
// src/resources/bank-accounts/index.ts
|
|
8
8
|
function createBankAccountsResource(instanceId, client) {
|
|
9
9
|
return {
|
|
10
|
-
list(
|
|
11
|
-
|
|
10
|
+
list(_a) {
|
|
11
|
+
var _b = _a, {
|
|
12
|
+
receiver_id
|
|
13
|
+
} = _b, params = __objRest(_b, [
|
|
14
|
+
"receiver_id"
|
|
15
|
+
]);
|
|
16
|
+
const queryParams = Object.keys(params).length ? `?${new URLSearchParams(params)}` : "";
|
|
17
|
+
return client.get(
|
|
18
|
+
`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts${queryParams}`
|
|
19
|
+
);
|
|
12
20
|
},
|
|
13
21
|
get({
|
|
14
22
|
receiver_id,
|
|
@@ -23,82 +31,92 @@ function createBankAccountsResource(instanceId, client) {
|
|
|
23
31
|
`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${id}`
|
|
24
32
|
);
|
|
25
33
|
},
|
|
26
|
-
createPix(
|
|
27
|
-
var _b = _a, {
|
|
28
|
-
receiver_id
|
|
29
|
-
} = _b, data = __objRest(_b, [
|
|
30
|
-
"receiver_id"
|
|
31
|
-
]);
|
|
32
|
-
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
33
|
-
type: "pix"
|
|
34
|
-
}, data));
|
|
35
|
-
},
|
|
36
|
-
createArgentinaTransfers(_c) {
|
|
34
|
+
createPix(_c) {
|
|
37
35
|
var _d = _c, {
|
|
38
36
|
receiver_id
|
|
39
37
|
} = _d, data = __objRest(_d, [
|
|
40
38
|
"receiver_id"
|
|
41
39
|
]);
|
|
42
40
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
43
|
-
type: "
|
|
41
|
+
type: "pix"
|
|
44
42
|
}, data));
|
|
45
43
|
},
|
|
46
|
-
|
|
44
|
+
createPixSafe(_e) {
|
|
47
45
|
var _f = _e, {
|
|
48
46
|
receiver_id
|
|
49
47
|
} = _f, data = __objRest(_f, [
|
|
50
48
|
"receiver_id"
|
|
51
49
|
]);
|
|
52
50
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
53
|
-
type: "
|
|
51
|
+
type: "pix_safe"
|
|
54
52
|
}, data));
|
|
55
53
|
},
|
|
56
|
-
|
|
54
|
+
createArgentinaTransfers(_g) {
|
|
57
55
|
var _h = _g, {
|
|
58
56
|
receiver_id
|
|
59
57
|
} = _h, data = __objRest(_h, [
|
|
60
58
|
"receiver_id"
|
|
61
59
|
]);
|
|
62
60
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
63
|
-
type: "
|
|
61
|
+
type: "transfers_bitso"
|
|
64
62
|
}, data));
|
|
65
63
|
},
|
|
66
|
-
|
|
64
|
+
createSpei(_i) {
|
|
67
65
|
var _j = _i, {
|
|
68
66
|
receiver_id
|
|
69
67
|
} = _j, data = __objRest(_j, [
|
|
70
68
|
"receiver_id"
|
|
71
69
|
]);
|
|
72
70
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
73
|
-
type: "
|
|
71
|
+
type: "spei_bitso"
|
|
74
72
|
}, data));
|
|
75
73
|
},
|
|
76
|
-
|
|
74
|
+
createColombiaAch(_k) {
|
|
77
75
|
var _l = _k, {
|
|
78
76
|
receiver_id
|
|
79
77
|
} = _l, data = __objRest(_l, [
|
|
80
78
|
"receiver_id"
|
|
81
79
|
]);
|
|
82
80
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
83
|
-
type: "
|
|
81
|
+
type: "ach_cop_bitso"
|
|
84
82
|
}, data));
|
|
85
83
|
},
|
|
86
|
-
|
|
84
|
+
createAch(_m) {
|
|
87
85
|
var _n = _m, {
|
|
88
86
|
receiver_id
|
|
89
87
|
} = _n, data = __objRest(_n, [
|
|
90
88
|
"receiver_id"
|
|
91
89
|
]);
|
|
92
90
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
93
|
-
type: "
|
|
91
|
+
type: "ach"
|
|
94
92
|
}, data));
|
|
95
93
|
},
|
|
96
|
-
|
|
94
|
+
createWire(_o) {
|
|
97
95
|
var _p = _o, {
|
|
98
96
|
receiver_id
|
|
99
97
|
} = _p, data = __objRest(_p, [
|
|
100
98
|
"receiver_id"
|
|
101
99
|
]);
|
|
100
|
+
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
101
|
+
type: "wire"
|
|
102
|
+
}, data));
|
|
103
|
+
},
|
|
104
|
+
createInternationalSwift(_q) {
|
|
105
|
+
var _r = _q, {
|
|
106
|
+
receiver_id
|
|
107
|
+
} = _r, data = __objRest(_r, [
|
|
108
|
+
"receiver_id"
|
|
109
|
+
]);
|
|
110
|
+
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
111
|
+
type: "international_swift"
|
|
112
|
+
}, data));
|
|
113
|
+
},
|
|
114
|
+
createRtp(_s) {
|
|
115
|
+
var _t = _s, {
|
|
116
|
+
receiver_id
|
|
117
|
+
} = _t, data = __objRest(_t, [
|
|
118
|
+
"receiver_id"
|
|
119
|
+
]);
|
|
102
120
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
103
121
|
type: "rtp"
|
|
104
122
|
}, data));
|
|
@@ -11,6 +11,9 @@ function createAvailableResource(client) {
|
|
|
11
11
|
getRails() {
|
|
12
12
|
return client.get("/available/rails");
|
|
13
13
|
},
|
|
14
|
+
getNaicsCodes() {
|
|
15
|
+
return client.get("/available/naics");
|
|
16
|
+
},
|
|
14
17
|
getSwiftCodeBankDetails(swift) {
|
|
15
18
|
return client.get(`/available/swift/${swift}`);
|
|
16
19
|
}
|
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
// src/resources/receivers/index.ts
|
|
8
8
|
function createReceiversResource(instanceId, client) {
|
|
9
9
|
return {
|
|
10
|
-
list() {
|
|
11
|
-
|
|
10
|
+
list(params) {
|
|
11
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
12
|
+
return client.get(`/instances/${instanceId}/receivers${queryParams}`);
|
|
12
13
|
},
|
|
13
14
|
createIndividualWithStandardKYC(data) {
|
|
14
15
|
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
@@ -33,7 +34,7 @@ function createReceiversResource(instanceId, client) {
|
|
|
33
34
|
},
|
|
34
35
|
update(_a) {
|
|
35
36
|
var _b = _a, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
|
|
36
|
-
return client.
|
|
37
|
+
return client.put(`/instances/${instanceId}/receivers/${receiver_id}`, data);
|
|
37
38
|
},
|
|
38
39
|
delete(receiver_id) {
|
|
39
40
|
return client.delete(`/instances/${instanceId}/receivers/${receiver_id}`);
|
|
@@ -26,7 +26,7 @@ type BankAccountType = "checking" | "saving";
|
|
|
26
26
|
|
|
27
27
|
type Currency = "USDC" | "USDT" | "USDB" | "BRL" | "USD" | "MXN" | "COP" | "ARS";
|
|
28
28
|
|
|
29
|
-
type Rail = "wire" | "ach" | "pix" | "spei_bitso" | "transfers_bitso" | "ach_cop_bitso" | "international_swift" | "rtp";
|
|
29
|
+
type Rail = "wire" | "ach" | "pix" | "pix_safe" | "spei_bitso" | "transfers_bitso" | "ach_cop_bitso" | "international_swift" | "rtp";
|
|
30
30
|
|
|
31
31
|
type AccountClass = "individual" | "business";
|
|
32
32
|
|
|
@@ -284,8 +284,8 @@ type Country =
|
|
|
284
284
|
| "AX";
|
|
285
285
|
|
|
286
286
|
type PaginationParams = {
|
|
287
|
-
limit?: '10' | '50' | '100' | '200' | '1000';
|
|
288
|
-
offset?: '0' | '10' | '50' | '100' | '200' | '1000';
|
|
287
|
+
limit?: '10' | '50' | '100' | '200' | '500' | '1000';
|
|
288
|
+
offset?: '0' | '10' | '50' | '100' | '200' | '500' | '1000';
|
|
289
289
|
starting_after?: string;
|
|
290
290
|
ending_before?: string;
|
|
291
291
|
}
|
|
@@ -347,7 +347,7 @@ type PayinTrackingPartnerFee = {
|
|
|
347
347
|
completed_at?: string | null
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
type PayinPaymentMethod = "ach" | "wire" | "pix" | "spei" | "transfers" | "pse"
|
|
350
|
+
type PayinPaymentMethod = "ach" | "wire" | "pix" | "spei" | "transfers" | "pse" | "international_swift"
|
|
351
351
|
|
|
352
352
|
type PayerRules = {
|
|
353
353
|
pix_allowed_tax_ids?: string[] | null;
|
|
@@ -361,7 +361,7 @@ type PayerRules = {
|
|
|
361
361
|
pse_bank_code?: string | null;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
type TrackingStatus = 'processing' | 'on_hold' | 'completed';
|
|
364
|
+
type TrackingStatus = 'processing' | 'on_hold' | 'completed' | 'pending_review';
|
|
365
365
|
|
|
366
366
|
type EstimatedTimeOfArrival = '5_min' | '30_min' | '2_hours' | '1_business_day' | '2_business_days' | '5_business_days';
|
|
367
367
|
|
|
@@ -408,17 +408,4 @@ type PayoutTrackingPartnerFee = {
|
|
|
408
408
|
completed_at: string | null;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
|
|
412
|
-
*
|
|
413
|
-
* Internal API client interface that resources use to make HTTP requests.
|
|
414
|
-
* This interface is not exposed to SDK users.
|
|
415
|
-
*/
|
|
416
|
-
interface InternalApiClient {
|
|
417
|
-
get: <T>(path: string) => Promise<BlindpayApiResponse<T>>;
|
|
418
|
-
post: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
419
|
-
put: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
420
|
-
patch: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
421
|
-
delete: <T>(path: string, body?: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
export type { AccountClass as A, BlindpayApiResponse as B, Country as C, InternalApiClient as I, Network as N, PaginationParams as P, Rail as R, StablecoinToken as S, TransactionStatus as T, BankAccountType as a, AchCopDocument as b, ArgentinaTransfers as c, PayinTrackingTransaction as d, PayinTrackingPayment as e, PayinTrackingComplete as f, PayinTrackingPartnerFee as g, PayinPaymentMethod as h, Currency as i, PayerRules as j, PaginationMetadata as k, CurrencyType as l, PayoutTrackingTransaction as m, PayoutTrackingPayment as n, PayoutTrackingLiquidity as o, PayoutTrackingComplete as p, PayoutTrackingPartnerFee as q, TransactionDocumentType as r };
|
|
411
|
+
export type { AccountClass as A, BlindpayApiResponse as B, Country as C, Network as N, PaginationParams as P, Rail as R, StablecoinToken as S, TransactionStatus as T, BankAccountType as a, AchCopDocument as b, ArgentinaTransfers as c, PayinTrackingTransaction as d, PayinTrackingPayment as e, PayinTrackingComplete as f, PayinTrackingPartnerFee as g, PayinPaymentMethod as h, Currency as i, PayerRules as j, PaginationMetadata as k, CurrencyType as l, PayoutTrackingTransaction as m, PayoutTrackingPayment as n, PayoutTrackingLiquidity as o, PayoutTrackingComplete as p, PayoutTrackingPartnerFee as q, TransactionDocumentType as r, TrackingStatus as s };
|
|
@@ -26,7 +26,7 @@ type BankAccountType = "checking" | "saving";
|
|
|
26
26
|
|
|
27
27
|
type Currency = "USDC" | "USDT" | "USDB" | "BRL" | "USD" | "MXN" | "COP" | "ARS";
|
|
28
28
|
|
|
29
|
-
type Rail = "wire" | "ach" | "pix" | "spei_bitso" | "transfers_bitso" | "ach_cop_bitso" | "international_swift" | "rtp";
|
|
29
|
+
type Rail = "wire" | "ach" | "pix" | "pix_safe" | "spei_bitso" | "transfers_bitso" | "ach_cop_bitso" | "international_swift" | "rtp";
|
|
30
30
|
|
|
31
31
|
type AccountClass = "individual" | "business";
|
|
32
32
|
|
|
@@ -284,8 +284,8 @@ type Country =
|
|
|
284
284
|
| "AX";
|
|
285
285
|
|
|
286
286
|
type PaginationParams = {
|
|
287
|
-
limit?: '10' | '50' | '100' | '200' | '1000';
|
|
288
|
-
offset?: '0' | '10' | '50' | '100' | '200' | '1000';
|
|
287
|
+
limit?: '10' | '50' | '100' | '200' | '500' | '1000';
|
|
288
|
+
offset?: '0' | '10' | '50' | '100' | '200' | '500' | '1000';
|
|
289
289
|
starting_after?: string;
|
|
290
290
|
ending_before?: string;
|
|
291
291
|
}
|
|
@@ -347,7 +347,7 @@ type PayinTrackingPartnerFee = {
|
|
|
347
347
|
completed_at?: string | null
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
type PayinPaymentMethod = "ach" | "wire" | "pix" | "spei" | "transfers" | "pse"
|
|
350
|
+
type PayinPaymentMethod = "ach" | "wire" | "pix" | "spei" | "transfers" | "pse" | "international_swift"
|
|
351
351
|
|
|
352
352
|
type PayerRules = {
|
|
353
353
|
pix_allowed_tax_ids?: string[] | null;
|
|
@@ -361,7 +361,7 @@ type PayerRules = {
|
|
|
361
361
|
pse_bank_code?: string | null;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
type TrackingStatus = 'processing' | 'on_hold' | 'completed';
|
|
364
|
+
type TrackingStatus = 'processing' | 'on_hold' | 'completed' | 'pending_review';
|
|
365
365
|
|
|
366
366
|
type EstimatedTimeOfArrival = '5_min' | '30_min' | '2_hours' | '1_business_day' | '2_business_days' | '5_business_days';
|
|
367
367
|
|
|
@@ -408,17 +408,4 @@ type PayoutTrackingPartnerFee = {
|
|
|
408
408
|
completed_at: string | null;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
|
|
412
|
-
*
|
|
413
|
-
* Internal API client interface that resources use to make HTTP requests.
|
|
414
|
-
* This interface is not exposed to SDK users.
|
|
415
|
-
*/
|
|
416
|
-
interface InternalApiClient {
|
|
417
|
-
get: <T>(path: string) => Promise<BlindpayApiResponse<T>>;
|
|
418
|
-
post: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
419
|
-
put: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
420
|
-
patch: <T>(path: string, body: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
421
|
-
delete: <T>(path: string, body?: Record<string, unknown>) => Promise<BlindpayApiResponse<T>>;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
export type { AccountClass as A, BlindpayApiResponse as B, Country as C, InternalApiClient as I, Network as N, PaginationParams as P, Rail as R, StablecoinToken as S, TransactionStatus as T, BankAccountType as a, AchCopDocument as b, ArgentinaTransfers as c, PayinTrackingTransaction as d, PayinTrackingPayment as e, PayinTrackingComplete as f, PayinTrackingPartnerFee as g, PayinPaymentMethod as h, Currency as i, PayerRules as j, PaginationMetadata as k, CurrencyType as l, PayoutTrackingTransaction as m, PayoutTrackingPayment as n, PayoutTrackingLiquidity as o, PayoutTrackingComplete as p, PayoutTrackingPartnerFee as q, TransactionDocumentType as r };
|
|
411
|
+
export type { AccountClass as A, BlindpayApiResponse as B, Country as C, Network as N, PaginationParams as P, Rail as R, StablecoinToken as S, TransactionStatus as T, BankAccountType as a, AchCopDocument as b, ArgentinaTransfers as c, PayinTrackingTransaction as d, PayinTrackingPayment as e, PayinTrackingComplete as f, PayinTrackingPartnerFee as g, PayinPaymentMethod as h, Currency as i, PayerRules as j, PaginationMetadata as k, CurrencyType as l, PayoutTrackingTransaction as m, PayoutTrackingPayment as n, PayoutTrackingLiquidity as o, PayoutTrackingComplete as p, PayoutTrackingPartnerFee as q, TransactionDocumentType as r, TrackingStatus as s };
|