@blindpay/node 3.1.1 → 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 +2 -2
- 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-I4KOWV46.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 +134 -85
- package/dist/resources/receivers/index.d.ts +134 -85
- package/dist/resources/receivers/index.js +4 -3
- package/dist/resources/receivers/index.mjs +1 -1
- package/dist/resources/receivers/receivers.test.js +350 -184
- package/dist/resources/receivers/receivers.test.mjs +187 -162
- 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 +4 -2
- package/dist/resources/virtual-accounts/index.d.ts +4 -2
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +177 -31
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +14 -9
- 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 +3 -3
|
@@ -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 = "3.
|
|
18705
|
+
var version = "3.3.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18740,6 +18740,9 @@ function createAvailableResource(client) {
|
|
|
18740
18740
|
getRails() {
|
|
18741
18741
|
return client.get("/available/rails");
|
|
18742
18742
|
},
|
|
18743
|
+
getNaicsCodes() {
|
|
18744
|
+
return client.get("/available/naics");
|
|
18745
|
+
},
|
|
18743
18746
|
getSwiftCodeBankDetails(swift) {
|
|
18744
18747
|
return client.get(`/available/swift/${swift}`);
|
|
18745
18748
|
}
|
|
@@ -18749,8 +18752,16 @@ function createAvailableResource(client) {
|
|
|
18749
18752
|
// src/resources/bank-accounts/index.ts
|
|
18750
18753
|
function createBankAccountsResource(instanceId, client) {
|
|
18751
18754
|
return {
|
|
18752
|
-
list(
|
|
18753
|
-
|
|
18755
|
+
list(_a3) {
|
|
18756
|
+
var _b = _a3, {
|
|
18757
|
+
receiver_id
|
|
18758
|
+
} = _b, params = __objRest(_b, [
|
|
18759
|
+
"receiver_id"
|
|
18760
|
+
]);
|
|
18761
|
+
const queryParams = Object.keys(params).length ? `?${new URLSearchParams(params)}` : "";
|
|
18762
|
+
return client.get(
|
|
18763
|
+
`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts${queryParams}`
|
|
18764
|
+
);
|
|
18754
18765
|
},
|
|
18755
18766
|
get({
|
|
18756
18767
|
receiver_id,
|
|
@@ -18765,82 +18776,92 @@ function createBankAccountsResource(instanceId, client) {
|
|
|
18765
18776
|
`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts/${id}`
|
|
18766
18777
|
);
|
|
18767
18778
|
},
|
|
18768
|
-
createPix(
|
|
18769
|
-
var _b = _a3, {
|
|
18770
|
-
receiver_id
|
|
18771
|
-
} = _b, data = __objRest(_b, [
|
|
18772
|
-
"receiver_id"
|
|
18773
|
-
]);
|
|
18774
|
-
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18775
|
-
type: "pix"
|
|
18776
|
-
}, data));
|
|
18777
|
-
},
|
|
18778
|
-
createArgentinaTransfers(_c) {
|
|
18779
|
+
createPix(_c) {
|
|
18779
18780
|
var _d = _c, {
|
|
18780
18781
|
receiver_id
|
|
18781
18782
|
} = _d, data = __objRest(_d, [
|
|
18782
18783
|
"receiver_id"
|
|
18783
18784
|
]);
|
|
18784
18785
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18785
|
-
type: "
|
|
18786
|
+
type: "pix"
|
|
18786
18787
|
}, data));
|
|
18787
18788
|
},
|
|
18788
|
-
|
|
18789
|
+
createPixSafe(_e) {
|
|
18789
18790
|
var _f = _e, {
|
|
18790
18791
|
receiver_id
|
|
18791
18792
|
} = _f, data = __objRest(_f, [
|
|
18792
18793
|
"receiver_id"
|
|
18793
18794
|
]);
|
|
18794
18795
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18795
|
-
type: "
|
|
18796
|
+
type: "pix_safe"
|
|
18796
18797
|
}, data));
|
|
18797
18798
|
},
|
|
18798
|
-
|
|
18799
|
+
createArgentinaTransfers(_g) {
|
|
18799
18800
|
var _h = _g, {
|
|
18800
18801
|
receiver_id
|
|
18801
18802
|
} = _h, data = __objRest(_h, [
|
|
18802
18803
|
"receiver_id"
|
|
18803
18804
|
]);
|
|
18804
18805
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18805
|
-
type: "
|
|
18806
|
+
type: "transfers_bitso"
|
|
18806
18807
|
}, data));
|
|
18807
18808
|
},
|
|
18808
|
-
|
|
18809
|
+
createSpei(_i) {
|
|
18809
18810
|
var _j = _i, {
|
|
18810
18811
|
receiver_id
|
|
18811
18812
|
} = _j, data = __objRest(_j, [
|
|
18812
18813
|
"receiver_id"
|
|
18813
18814
|
]);
|
|
18814
18815
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18815
|
-
type: "
|
|
18816
|
+
type: "spei_bitso"
|
|
18816
18817
|
}, data));
|
|
18817
18818
|
},
|
|
18818
|
-
|
|
18819
|
+
createColombiaAch(_k) {
|
|
18819
18820
|
var _l = _k, {
|
|
18820
18821
|
receiver_id
|
|
18821
18822
|
} = _l, data = __objRest(_l, [
|
|
18822
18823
|
"receiver_id"
|
|
18823
18824
|
]);
|
|
18824
18825
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18825
|
-
type: "
|
|
18826
|
+
type: "ach_cop_bitso"
|
|
18826
18827
|
}, data));
|
|
18827
18828
|
},
|
|
18828
|
-
|
|
18829
|
+
createAch(_m) {
|
|
18829
18830
|
var _n = _m, {
|
|
18830
18831
|
receiver_id
|
|
18831
18832
|
} = _n, data = __objRest(_n, [
|
|
18832
18833
|
"receiver_id"
|
|
18833
18834
|
]);
|
|
18834
18835
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18835
|
-
type: "
|
|
18836
|
+
type: "ach"
|
|
18836
18837
|
}, data));
|
|
18837
18838
|
},
|
|
18838
|
-
|
|
18839
|
+
createWire(_o) {
|
|
18839
18840
|
var _p = _o, {
|
|
18840
18841
|
receiver_id
|
|
18841
18842
|
} = _p, data = __objRest(_p, [
|
|
18842
18843
|
"receiver_id"
|
|
18843
18844
|
]);
|
|
18845
|
+
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18846
|
+
type: "wire"
|
|
18847
|
+
}, data));
|
|
18848
|
+
},
|
|
18849
|
+
createInternationalSwift(_q) {
|
|
18850
|
+
var _r = _q, {
|
|
18851
|
+
receiver_id
|
|
18852
|
+
} = _r, data = __objRest(_r, [
|
|
18853
|
+
"receiver_id"
|
|
18854
|
+
]);
|
|
18855
|
+
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18856
|
+
type: "international_swift"
|
|
18857
|
+
}, data));
|
|
18858
|
+
},
|
|
18859
|
+
createRtp(_s) {
|
|
18860
|
+
var _t = _s, {
|
|
18861
|
+
receiver_id
|
|
18862
|
+
} = _t, data = __objRest(_t, [
|
|
18863
|
+
"receiver_id"
|
|
18864
|
+
]);
|
|
18844
18865
|
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`, __spreadValues({
|
|
18845
18866
|
type: "rtp"
|
|
18846
18867
|
}, data));
|
|
@@ -18848,6 +18869,15 @@ function createBankAccountsResource(instanceId, client) {
|
|
|
18848
18869
|
};
|
|
18849
18870
|
}
|
|
18850
18871
|
|
|
18872
|
+
// src/resources/fees/index.ts
|
|
18873
|
+
function createFeesResource(instanceId, client) {
|
|
18874
|
+
return {
|
|
18875
|
+
get() {
|
|
18876
|
+
return client.get(`/instances/${instanceId}/billing/fees`);
|
|
18877
|
+
}
|
|
18878
|
+
};
|
|
18879
|
+
}
|
|
18880
|
+
|
|
18851
18881
|
// src/resources/instances/index.ts
|
|
18852
18882
|
function createInstancesResource(instanceId, client) {
|
|
18853
18883
|
return {
|
|
@@ -18955,6 +18985,14 @@ function createPayoutsResource(instanceId, client) {
|
|
|
18955
18985
|
createSolana(_d) {
|
|
18956
18986
|
var data = __objRest(_d, []);
|
|
18957
18987
|
return client.post(`/instances/${instanceId}/payouts/solana`, data);
|
|
18988
|
+
},
|
|
18989
|
+
submitDocuments(_e) {
|
|
18990
|
+
var _f = _e, {
|
|
18991
|
+
payout_id
|
|
18992
|
+
} = _f, data = __objRest(_f, [
|
|
18993
|
+
"payout_id"
|
|
18994
|
+
]);
|
|
18995
|
+
return client.post(`/instances/${instanceId}/payouts/${payout_id}/documents`, data);
|
|
18958
18996
|
}
|
|
18959
18997
|
};
|
|
18960
18998
|
}
|
|
@@ -18976,8 +19014,9 @@ function createQuotesResource(instanceId, client) {
|
|
|
18976
19014
|
// src/resources/receivers/index.ts
|
|
18977
19015
|
function createReceiversResource(instanceId, client) {
|
|
18978
19016
|
return {
|
|
18979
|
-
list() {
|
|
18980
|
-
|
|
19017
|
+
list(params) {
|
|
19018
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
19019
|
+
return client.get(`/instances/${instanceId}/receivers${queryParams}`);
|
|
18981
19020
|
},
|
|
18982
19021
|
createIndividualWithStandardKYC(data) {
|
|
18983
19022
|
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
@@ -19002,7 +19041,7 @@ function createReceiversResource(instanceId, client) {
|
|
|
19002
19041
|
},
|
|
19003
19042
|
update(_a3) {
|
|
19004
19043
|
var _b = _a3, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
|
|
19005
|
-
return client.
|
|
19044
|
+
return client.put(`/instances/${instanceId}/receivers/${receiver_id}`, data);
|
|
19006
19045
|
},
|
|
19007
19046
|
delete(receiver_id) {
|
|
19008
19047
|
return client.delete(`/instances/${instanceId}/receivers/${receiver_id}`);
|
|
@@ -19044,6 +19083,71 @@ function createTermsOfServiceResource(instanceId, client) {
|
|
|
19044
19083
|
};
|
|
19045
19084
|
}
|
|
19046
19085
|
|
|
19086
|
+
// src/resources/transfers/index.ts
|
|
19087
|
+
function createTransfersResource(instanceId, client) {
|
|
19088
|
+
return {
|
|
19089
|
+
quotes: {
|
|
19090
|
+
create(_a3) {
|
|
19091
|
+
var data = __objRest(_a3, []);
|
|
19092
|
+
return client.post(`/instances/${instanceId}/transfer-quotes`, data);
|
|
19093
|
+
}
|
|
19094
|
+
},
|
|
19095
|
+
create(_b) {
|
|
19096
|
+
var data = __objRest(_b, []);
|
|
19097
|
+
return client.post(`/instances/${instanceId}/transfers`, data);
|
|
19098
|
+
},
|
|
19099
|
+
list(params) {
|
|
19100
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
19101
|
+
return client.get(`/instances/${instanceId}/transfers${queryParams}`);
|
|
19102
|
+
},
|
|
19103
|
+
get(transferId) {
|
|
19104
|
+
return client.get(`/instances/${instanceId}/transfers/${transferId}`);
|
|
19105
|
+
},
|
|
19106
|
+
getTrack(transferId) {
|
|
19107
|
+
return client.get(`/e/transfers/${transferId}`);
|
|
19108
|
+
}
|
|
19109
|
+
};
|
|
19110
|
+
}
|
|
19111
|
+
|
|
19112
|
+
// src/resources/upload/index.ts
|
|
19113
|
+
function createUploadResource(baseUrl, headers) {
|
|
19114
|
+
return {
|
|
19115
|
+
upload(_0) {
|
|
19116
|
+
return __async(this, arguments, function* ({
|
|
19117
|
+
file,
|
|
19118
|
+
bucket,
|
|
19119
|
+
instance_id
|
|
19120
|
+
}) {
|
|
19121
|
+
var _b;
|
|
19122
|
+
const formData = new FormData();
|
|
19123
|
+
formData.append("file", file);
|
|
19124
|
+
formData.append("bucket", bucket);
|
|
19125
|
+
const queryParams = instance_id ? `?instance_id=${instance_id}` : "";
|
|
19126
|
+
const _a4 = headers, { "Content-Type": _ } = _a4, headersWithoutContentType = __objRest(_a4, ["Content-Type"]);
|
|
19127
|
+
const response = yield fetch(`${baseUrl}/upload${queryParams}`, {
|
|
19128
|
+
method: "POST",
|
|
19129
|
+
headers: headersWithoutContentType,
|
|
19130
|
+
body: formData
|
|
19131
|
+
});
|
|
19132
|
+
if (!response.ok) {
|
|
19133
|
+
const error = yield response.json();
|
|
19134
|
+
return {
|
|
19135
|
+
data: null,
|
|
19136
|
+
error: {
|
|
19137
|
+
message: (_b = error == null ? void 0 : error.message) != null ? _b : "Unknown error"
|
|
19138
|
+
}
|
|
19139
|
+
};
|
|
19140
|
+
}
|
|
19141
|
+
const data = yield response.json();
|
|
19142
|
+
return {
|
|
19143
|
+
data,
|
|
19144
|
+
error: null
|
|
19145
|
+
};
|
|
19146
|
+
});
|
|
19147
|
+
}
|
|
19148
|
+
};
|
|
19149
|
+
}
|
|
19150
|
+
|
|
19047
19151
|
// src/resources/virtual-accounts/index.ts
|
|
19048
19152
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19049
19153
|
return {
|
|
@@ -19160,6 +19264,43 @@ function createBlockchainWalletsResource(instanceId, client) {
|
|
|
19160
19264
|
};
|
|
19161
19265
|
}
|
|
19162
19266
|
|
|
19267
|
+
// src/resources/wallets/custodial.ts
|
|
19268
|
+
function createCustodialWalletsResource(instanceId, client) {
|
|
19269
|
+
return {
|
|
19270
|
+
list(receiver_id) {
|
|
19271
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/wallets`);
|
|
19272
|
+
},
|
|
19273
|
+
get({
|
|
19274
|
+
receiver_id,
|
|
19275
|
+
id
|
|
19276
|
+
}) {
|
|
19277
|
+
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/wallets/${id}`);
|
|
19278
|
+
},
|
|
19279
|
+
create(_a3) {
|
|
19280
|
+
var _b = _a3, {
|
|
19281
|
+
receiver_id
|
|
19282
|
+
} = _b, data = __objRest(_b, [
|
|
19283
|
+
"receiver_id"
|
|
19284
|
+
]);
|
|
19285
|
+
return client.post(`/instances/${instanceId}/receivers/${receiver_id}/wallets`, data);
|
|
19286
|
+
},
|
|
19287
|
+
getBalance({
|
|
19288
|
+
receiver_id,
|
|
19289
|
+
id
|
|
19290
|
+
}) {
|
|
19291
|
+
return client.get(
|
|
19292
|
+
`/instances/${instanceId}/receivers/${receiver_id}/wallets/${id}/balance`
|
|
19293
|
+
);
|
|
19294
|
+
},
|
|
19295
|
+
delete({
|
|
19296
|
+
receiver_id,
|
|
19297
|
+
id
|
|
19298
|
+
}) {
|
|
19299
|
+
return client.delete(`/instances/${instanceId}/receivers/${receiver_id}/wallets/${id}`);
|
|
19300
|
+
}
|
|
19301
|
+
};
|
|
19302
|
+
}
|
|
19303
|
+
|
|
19163
19304
|
// src/resources/wallets/offramp.ts
|
|
19164
19305
|
function createOfframpWalletsResource(instanceId, client) {
|
|
19165
19306
|
return {
|
|
@@ -19261,13 +19402,17 @@ var BlindPay = class {
|
|
|
19261
19402
|
});
|
|
19262
19403
|
this.quotes = createQuotesResource(this.instanceId, this.api);
|
|
19263
19404
|
this.payouts = createPayoutsResource(this.instanceId, this.api);
|
|
19405
|
+
this.transfers = createTransfersResource(this.instanceId, this.api);
|
|
19406
|
+
this.fees = createFeesResource(this.instanceId, this.api);
|
|
19407
|
+
this.upload = createUploadResource(this.baseUrl, this.headers);
|
|
19264
19408
|
this.receivers = __spreadProps(__spreadValues({}, createReceiversResource(this.instanceId, this.api)), {
|
|
19265
19409
|
bankAccounts: createBankAccountsResource(this.instanceId, this.api)
|
|
19266
19410
|
});
|
|
19267
19411
|
this.virtualAccounts = createVirtualAccountsResource(this.instanceId, this.api);
|
|
19268
19412
|
this.wallets = {
|
|
19269
19413
|
blockchain: createBlockchainWalletsResource(this.instanceId, this.api),
|
|
19270
|
-
offramp: createOfframpWalletsResource(this.instanceId, this.api)
|
|
19414
|
+
offramp: createOfframpWalletsResource(this.instanceId, this.api),
|
|
19415
|
+
custodial: createCustodialWalletsResource(this.instanceId, this.api)
|
|
19271
19416
|
};
|
|
19272
19417
|
}
|
|
19273
19418
|
request(method, path, body) {
|
|
@@ -19370,157 +19515,166 @@ describe("Receivers", () => {
|
|
|
19370
19515
|
const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
|
|
19371
19516
|
describe("List receivers", () => {
|
|
19372
19517
|
it("should list receivers", () => __async(null, null, function* () {
|
|
19373
|
-
const mockedReceivers =
|
|
19374
|
-
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
|
|
19378
|
-
|
|
19379
|
-
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
19518
|
+
const mockedReceivers = {
|
|
19519
|
+
data: [
|
|
19520
|
+
{
|
|
19521
|
+
id: "re_Euw7HN4OdxPn",
|
|
19522
|
+
type: "individual",
|
|
19523
|
+
kyc_type: "standard",
|
|
19524
|
+
kyc_status: "verifying",
|
|
19525
|
+
is_tos_accepted: true,
|
|
19526
|
+
kyc_warnings: [
|
|
19527
|
+
{
|
|
19528
|
+
code: null,
|
|
19529
|
+
message: null,
|
|
19530
|
+
resolution_status: null,
|
|
19531
|
+
warning_id: null
|
|
19532
|
+
}
|
|
19533
|
+
],
|
|
19534
|
+
email: "bernardo@gmail.com",
|
|
19535
|
+
tax_id: "12345678900",
|
|
19536
|
+
address_line_1: "Av. Paulista, 1000",
|
|
19537
|
+
address_line_2: "Apto 101",
|
|
19538
|
+
city: "S\xE3o Paulo",
|
|
19539
|
+
state_province_region: "SP",
|
|
19540
|
+
country: "BR",
|
|
19541
|
+
postal_code: "01310-100",
|
|
19542
|
+
ip_address: "127.0.0.1",
|
|
19543
|
+
image_url: "https://example.com/image.png",
|
|
19544
|
+
phone_number: "+5511987654321",
|
|
19545
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19546
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19547
|
+
first_name: "Bernardo",
|
|
19548
|
+
last_name: "Simonassi",
|
|
19549
|
+
date_of_birth: "1998-02-02T00:00:00.000Z",
|
|
19550
|
+
id_doc_country: "BR",
|
|
19551
|
+
id_doc_type: "PASSPORT",
|
|
19552
|
+
id_doc_front_file: "https://example.com/image.png",
|
|
19553
|
+
id_doc_back_file: "https://example.com/image.png",
|
|
19554
|
+
aiprise_validation_key: "",
|
|
19555
|
+
instance_id: "in_000000000000",
|
|
19556
|
+
tos_id: "to_3ZZhllJkvo5Z",
|
|
19557
|
+
created_at: "2021-01-01T00:00:00.000Z",
|
|
19558
|
+
updated_at: "2021-01-01T00:00:00.000Z",
|
|
19559
|
+
limit: {
|
|
19560
|
+
per_transaction: 1e5,
|
|
19561
|
+
daily: 2e5,
|
|
19562
|
+
monthly: 1e6
|
|
19386
19563
|
}
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19391
|
-
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19396
|
-
|
|
19397
|
-
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
|
|
19410
|
-
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19424
|
-
|
|
19425
|
-
|
|
19426
|
-
|
|
19427
|
-
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
|
|
19431
|
-
|
|
19432
|
-
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
|
|
19473
|
-
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
{
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
19493
|
-
tax_id: "12345678901",
|
|
19494
|
-
address_line_1: "Rua Augusta, 1500",
|
|
19495
|
-
address_line_2: null,
|
|
19496
|
-
city: "S\xE3o Paulo",
|
|
19497
|
-
state_province_region: "SP",
|
|
19498
|
-
country: "BR",
|
|
19499
|
-
postal_code: "01304-001",
|
|
19500
|
-
id_doc_country: "BR",
|
|
19501
|
-
id_doc_type: "PASSPORT",
|
|
19502
|
-
id_doc_front_file: "https://example.com/image.png",
|
|
19503
|
-
id_doc_back_file: "https://example.com/image.png",
|
|
19504
|
-
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19505
|
-
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19506
|
-
id: "ub_000000000000"
|
|
19564
|
+
},
|
|
19565
|
+
{
|
|
19566
|
+
id: "re_YuaMcI2B8zbQ",
|
|
19567
|
+
type: "individual",
|
|
19568
|
+
is_tos_accepted: true,
|
|
19569
|
+
kyc_type: "enhanced",
|
|
19570
|
+
kyc_status: "approved",
|
|
19571
|
+
kyc_warnings: null,
|
|
19572
|
+
email: "alice.johnson@example.com",
|
|
19573
|
+
tax_id: "98765432100",
|
|
19574
|
+
address_line_1: "123 Main St",
|
|
19575
|
+
address_line_2: null,
|
|
19576
|
+
city: "New York",
|
|
19577
|
+
state_province_region: "NY",
|
|
19578
|
+
country: "US",
|
|
19579
|
+
postal_code: "10001",
|
|
19580
|
+
ip_address: "192.168.1.1",
|
|
19581
|
+
image_url: null,
|
|
19582
|
+
phone_number: "+15555555555",
|
|
19583
|
+
proof_of_address_doc_type: "BANK_STATEMENT",
|
|
19584
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19585
|
+
first_name: "Alice",
|
|
19586
|
+
last_name: "Johnson",
|
|
19587
|
+
date_of_birth: "1990-05-10T00:00:00.000Z",
|
|
19588
|
+
id_doc_country: "US",
|
|
19589
|
+
id_doc_type: "PASSPORT",
|
|
19590
|
+
id_doc_front_file: "https://example.com/image.png",
|
|
19591
|
+
id_doc_back_file: null,
|
|
19592
|
+
aiprise_validation_key: "enhanced-key",
|
|
19593
|
+
instance_id: "in_000000000001",
|
|
19594
|
+
source_of_funds_doc_type: "salary",
|
|
19595
|
+
source_of_funds_doc_file: "https://example.com/image.png",
|
|
19596
|
+
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
19597
|
+
purpose_of_transactions: "investment_purposes",
|
|
19598
|
+
purpose_of_transactions_explanation: "Investing in stocks",
|
|
19599
|
+
tos_id: "to_nppX66ntvtHs",
|
|
19600
|
+
created_at: "2022-02-02T00:00:00.000Z",
|
|
19601
|
+
updated_at: "2022-02-02T00:00:00.000Z",
|
|
19602
|
+
limit: {
|
|
19603
|
+
per_transaction: 5e4,
|
|
19604
|
+
daily: 1e5,
|
|
19605
|
+
monthly: 5e5
|
|
19606
|
+
}
|
|
19607
|
+
},
|
|
19608
|
+
{
|
|
19609
|
+
id: "re_IOxAUL24LG7P",
|
|
19610
|
+
type: "business",
|
|
19611
|
+
kyc_type: "standard",
|
|
19612
|
+
is_tos_accepted: true,
|
|
19613
|
+
is_fbo: false,
|
|
19614
|
+
kyc_status: "pending",
|
|
19615
|
+
kyc_warnings: null,
|
|
19616
|
+
email: "business@example.com",
|
|
19617
|
+
tax_id: "20096178000195",
|
|
19618
|
+
address_line_1: "1 King St W",
|
|
19619
|
+
address_line_2: "Suite 100",
|
|
19620
|
+
city: "Toronto",
|
|
19621
|
+
state_province_region: "ON",
|
|
19622
|
+
country: "CA",
|
|
19623
|
+
postal_code: "M5H 1A1",
|
|
19624
|
+
ip_address: null,
|
|
19625
|
+
image_url: null,
|
|
19626
|
+
phone_number: "+14165555555",
|
|
19627
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19628
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19629
|
+
legal_name: "Business Corp",
|
|
19630
|
+
alternate_name: "BizCo",
|
|
19631
|
+
formation_date: "2010-01-01T00:00:00.000Z",
|
|
19632
|
+
website: "https://businesscorp.com",
|
|
19633
|
+
owners: [
|
|
19634
|
+
{
|
|
19635
|
+
role: "beneficial_owner",
|
|
19636
|
+
first_name: "Carlos",
|
|
19637
|
+
last_name: "Silva",
|
|
19638
|
+
date_of_birth: "1995-05-15T00:00:00.000Z",
|
|
19639
|
+
tax_id: "12345678901",
|
|
19640
|
+
address_line_1: "Rua Augusta, 1500",
|
|
19641
|
+
address_line_2: null,
|
|
19642
|
+
city: "S\xE3o Paulo",
|
|
19643
|
+
state_province_region: "SP",
|
|
19644
|
+
country: "BR",
|
|
19645
|
+
postal_code: "01304-001",
|
|
19646
|
+
id_doc_country: "BR",
|
|
19647
|
+
id_doc_type: "PASSPORT",
|
|
19648
|
+
id_doc_front_file: "https://example.com/image.png",
|
|
19649
|
+
id_doc_back_file: "https://example.com/image.png",
|
|
19650
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19651
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19652
|
+
ownership_percentage: 25,
|
|
19653
|
+
title: "CEO",
|
|
19654
|
+
id: "ub_000000000000"
|
|
19655
|
+
}
|
|
19656
|
+
],
|
|
19657
|
+
incorporation_doc_file: "https://example.com/image.png",
|
|
19658
|
+
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19659
|
+
external_id: null,
|
|
19660
|
+
instance_id: "in_000000000002",
|
|
19661
|
+
tos_id: "to_nppX66ntvtHs",
|
|
19662
|
+
aiprise_validation_key: "",
|
|
19663
|
+
created_at: "2015-03-15T00:00:00.000Z",
|
|
19664
|
+
updated_at: "2015-03-15T00:00:00.000Z",
|
|
19665
|
+
limit: {
|
|
19666
|
+
per_transaction: 2e5,
|
|
19667
|
+
daily: 4e5,
|
|
19668
|
+
monthly: 2e6
|
|
19507
19669
|
}
|
|
19508
|
-
],
|
|
19509
|
-
incorporation_doc_file: "https://example.com/image.png",
|
|
19510
|
-
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19511
|
-
external_id: null,
|
|
19512
|
-
instance_id: "in_000000000002",
|
|
19513
|
-
tos_id: "to_nppX66ntvtHs",
|
|
19514
|
-
aiprise_validation_key: "",
|
|
19515
|
-
created_at: "2015-03-15T00:00:00.000Z",
|
|
19516
|
-
updated_at: "2015-03-15T00:00:00.000Z",
|
|
19517
|
-
limit: {
|
|
19518
|
-
per_transaction: 2e5,
|
|
19519
|
-
daily: 4e5,
|
|
19520
|
-
monthly: 2e6
|
|
19521
19670
|
}
|
|
19671
|
+
],
|
|
19672
|
+
pagination: {
|
|
19673
|
+
has_more: false,
|
|
19674
|
+
next_page: "",
|
|
19675
|
+
prev_page: ""
|
|
19522
19676
|
}
|
|
19523
|
-
|
|
19677
|
+
};
|
|
19524
19678
|
fetchMock.mockResponseOnce(JSON.stringify(mockedReceivers), {
|
|
19525
19679
|
headers: { "Content-Type": "application/json" }
|
|
19526
19680
|
});
|
|
@@ -19539,12 +19693,12 @@ describe("Receivers", () => {
|
|
|
19539
19693
|
});
|
|
19540
19694
|
const { data, error } = yield blindpay.receivers.createIndividualWithStandardKYC({
|
|
19541
19695
|
email: "bernardo.simonassi@gmail.com",
|
|
19696
|
+
country: "BR",
|
|
19542
19697
|
tax_id: "12345678900",
|
|
19543
19698
|
address_line_1: "Av. Paulista, 1000",
|
|
19544
19699
|
address_line_2: "Apto 101",
|
|
19545
19700
|
city: "S\xE3o Paulo",
|
|
19546
19701
|
state_province_region: "SP",
|
|
19547
|
-
country: "BR",
|
|
19548
19702
|
postal_code: "01310-100",
|
|
19549
19703
|
phone_number: "+5511987654321",
|
|
19550
19704
|
first_name: "Bernardo",
|
|
@@ -19570,12 +19724,12 @@ describe("Receivers", () => {
|
|
|
19570
19724
|
});
|
|
19571
19725
|
const { data, error } = yield blindpay.receivers.createIndividualWithEnhancedKYC({
|
|
19572
19726
|
email: "bernardo.simonassi@gmail.com",
|
|
19727
|
+
country: "BR",
|
|
19573
19728
|
tax_id: "12345678900",
|
|
19574
19729
|
address_line_1: "Av. Paulista, 1000",
|
|
19575
19730
|
address_line_2: "Apto 101",
|
|
19576
19731
|
city: "S\xE3o Paulo",
|
|
19577
19732
|
state_province_region: "SP",
|
|
19578
|
-
country: "BR",
|
|
19579
19733
|
postal_code: "01310-100",
|
|
19580
19734
|
first_name: "Bernardo",
|
|
19581
19735
|
last_name: "Simonassi",
|
|
@@ -19587,11 +19741,11 @@ describe("Receivers", () => {
|
|
|
19587
19741
|
id_doc_back_file: "https://example.com/image.png",
|
|
19588
19742
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19589
19743
|
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19590
|
-
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
19591
19744
|
purpose_of_transactions: "personal_or_living_expenses",
|
|
19592
19745
|
source_of_funds_doc_type: "savings",
|
|
19593
19746
|
purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
|
|
19594
19747
|
source_of_funds_doc_file: "https://example.com/image.png",
|
|
19748
|
+
selfie_file: "https://example.com/image.png",
|
|
19595
19749
|
tos_id: "to_3ZZhllJkvo5Z"
|
|
19596
19750
|
});
|
|
19597
19751
|
globalExpect(error).toBeNull();
|
|
@@ -19606,12 +19760,12 @@ describe("Receivers", () => {
|
|
|
19606
19760
|
});
|
|
19607
19761
|
const { data, error } = yield blindpay.receivers.createBusinessWithStandardKYB({
|
|
19608
19762
|
email: "contato@empresa.com.br",
|
|
19763
|
+
country: "BR",
|
|
19609
19764
|
tax_id: "20096178000195",
|
|
19610
19765
|
address_line_1: "Av. Brigadeiro Faria Lima, 400",
|
|
19611
19766
|
address_line_2: "Sala 1201",
|
|
19612
19767
|
city: "S\xE3o Paulo",
|
|
19613
19768
|
state_province_region: "SP",
|
|
19614
|
-
country: "BR",
|
|
19615
19769
|
postal_code: "04538-132",
|
|
19616
19770
|
legal_name: "Empresa Exemplo Ltda",
|
|
19617
19771
|
alternate_name: "Exemplo",
|
|
@@ -19622,6 +19776,13 @@ describe("Receivers", () => {
|
|
|
19622
19776
|
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19623
19777
|
tos_id: "to_nppX66ntvtHs",
|
|
19624
19778
|
website: "https://site.com/",
|
|
19779
|
+
business_type: "llc",
|
|
19780
|
+
business_description: "Software development company",
|
|
19781
|
+
business_industry: "541511",
|
|
19782
|
+
estimated_annual_revenue: "1000000_9999999",
|
|
19783
|
+
source_of_wealth: "affiliate_or_royalty_income",
|
|
19784
|
+
publicly_traded: false,
|
|
19785
|
+
account_purpose: "treasury_management",
|
|
19625
19786
|
owners: [
|
|
19626
19787
|
{
|
|
19627
19788
|
role: "beneficial_owner",
|
|
@@ -19640,7 +19801,9 @@ describe("Receivers", () => {
|
|
|
19640
19801
|
id_doc_front_file: "https://example.com/image.png",
|
|
19641
19802
|
id_doc_back_file: "https://example.com/image.png",
|
|
19642
19803
|
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19643
|
-
proof_of_address_doc_file: "https://example.com/image.png"
|
|
19804
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19805
|
+
ownership_percentage: 25,
|
|
19806
|
+
title: "CEO"
|
|
19644
19807
|
}
|
|
19645
19808
|
]
|
|
19646
19809
|
});
|
|
@@ -19754,14 +19917,17 @@ describe("Receivers", () => {
|
|
|
19754
19917
|
id_doc_country: "BR",
|
|
19755
19918
|
id_doc_type: "PASSPORT",
|
|
19756
19919
|
id_doc_front_file: "https://example.com/image.png",
|
|
19757
|
-
id_doc_back_file: "https://example.com/image.png"
|
|
19920
|
+
id_doc_back_file: "https://example.com/image.png",
|
|
19921
|
+
proof_of_address_doc_type: "UTILITY_BILL",
|
|
19922
|
+
proof_of_address_doc_file: "https://example.com/image.png",
|
|
19923
|
+
ownership_percentage: 25,
|
|
19924
|
+
title: "CEO"
|
|
19758
19925
|
}
|
|
19759
19926
|
],
|
|
19760
19927
|
incorporation_doc_file: "https://example.com/image.png",
|
|
19761
19928
|
proof_of_ownership_doc_file: "https://example.com/image.png",
|
|
19762
19929
|
source_of_funds_doc_type: "savings",
|
|
19763
19930
|
source_of_funds_doc_file: "https://example.com/image.png",
|
|
19764
|
-
individual_holding_doc_front_file: "https://example.com/image.png",
|
|
19765
19931
|
purpose_of_transactions: "personal_or_living_expenses",
|
|
19766
19932
|
purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
|
|
19767
19933
|
external_id: "some-external-id",
|