@blindpay/node 3.10.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-7PWF4J3Z.mjs → chunk-ECYZLQUR.mjs} +12 -12
- package/dist/{chunk-N4F3FBNB.mjs → chunk-L23IOSI3.mjs} +40 -40
- package/dist/chunk-SLKVEQUY.mjs +76 -0
- package/dist/{chunk-LEPGLH7Q.mjs → chunk-SWTOSLUI.mjs} +10 -10
- package/dist/{chunk-KMU6V4LW.mjs → chunk-TVOMVVOO.mjs} +11 -11
- package/dist/{chunk-FG25JHDX.mjs → chunk-VAVDEV6P.mjs} +14 -14
- package/dist/{chunk-QGNLMN6Z.mjs → chunk-YHI3J2CL.mjs} +7 -7
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +148 -141
- package/dist/index.mjs +12 -12
- package/dist/resources/api-keys/api-keys.test.js +146 -139
- package/dist/resources/api-keys/api-keys.test.mjs +7 -7
- package/dist/resources/available/available.test.js +146 -139
- package/dist/resources/available/available.test.mjs +7 -7
- package/dist/resources/bank-accounts/bank-accounts.test.js +173 -166
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +34 -34
- package/dist/resources/bank-accounts/index.d.mts +29 -29
- package/dist/resources/bank-accounts/index.d.ts +29 -29
- package/dist/resources/bank-accounts/index.js +40 -40
- package/dist/resources/bank-accounts/index.mjs +1 -1
- package/dist/resources/{receivers/receivers.test.js → customers/customers.test.js} +200 -193
- package/dist/resources/{receivers/receivers.test.mjs → customers/customers.test.mjs} +64 -64
- package/dist/resources/{receivers → customers}/index.d.mts +23 -23
- package/dist/resources/{receivers → customers}/index.d.ts +23 -23
- package/dist/resources/{receivers → customers}/index.js +32 -25
- package/dist/resources/customers/index.mjs +9 -0
- package/dist/resources/fees/fees.test.js +146 -139
- package/dist/resources/fees/fees.test.mjs +7 -7
- package/dist/resources/instances/instances.test.js +146 -139
- package/dist/resources/instances/instances.test.mjs +7 -7
- package/dist/resources/partner-fees/partner-fees.test.js +146 -139
- package/dist/resources/partner-fees/partner-fees.test.mjs +7 -7
- package/dist/resources/payins/payins-quotes.test.js +146 -139
- package/dist/resources/payins/payins-quotes.test.mjs +7 -7
- package/dist/resources/payins/payins.test.js +146 -139
- package/dist/resources/payins/payins.test.mjs +7 -7
- package/dist/resources/payouts/payouts.test.js +146 -139
- package/dist/resources/payouts/payouts.test.mjs +7 -7
- package/dist/resources/quotes/quotes.test.js +146 -139
- package/dist/resources/quotes/quotes.test.mjs +7 -7
- package/dist/resources/terms-of-service/terms-of-service.test.js +146 -139
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +7 -7
- package/dist/resources/transfers/transfers.test.js +146 -139
- package/dist/resources/transfers/transfers.test.mjs +7 -7
- package/dist/resources/upload/upload.test.js +146 -139
- package/dist/resources/upload/upload.test.mjs +7 -7
- package/dist/resources/virtual-accounts/index.d.mts +7 -7
- package/dist/resources/virtual-accounts/index.d.ts +7 -7
- package/dist/resources/virtual-accounts/index.js +10 -10
- package/dist/resources/virtual-accounts/index.mjs +1 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +150 -143
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +11 -11
- package/dist/resources/wallets/blockchain.d.mts +13 -13
- package/dist/resources/wallets/blockchain.d.ts +13 -13
- package/dist/resources/wallets/blockchain.js +14 -14
- package/dist/resources/wallets/blockchain.mjs +1 -1
- package/dist/resources/wallets/blockchain.test.js +154 -147
- package/dist/resources/wallets/blockchain.test.mjs +15 -15
- package/dist/resources/wallets/custodial.d.mts +9 -9
- package/dist/resources/wallets/custodial.d.ts +9 -9
- package/dist/resources/wallets/custodial.js +11 -11
- package/dist/resources/wallets/custodial.mjs +1 -1
- package/dist/resources/wallets/custodial.test.js +150 -143
- package/dist/resources/wallets/custodial.test.mjs +11 -11
- package/dist/resources/wallets/offramp.d.mts +7 -7
- package/dist/resources/wallets/offramp.d.ts +7 -7
- package/dist/resources/wallets/offramp.js +7 -7
- package/dist/resources/wallets/offramp.mjs +1 -1
- package/dist/resources/wallets/offramp.test.js +152 -145
- package/dist/resources/wallets/offramp.test.mjs +13 -13
- package/dist/resources/webhooks/webhooks.test.js +146 -139
- package/dist/resources/webhooks/webhooks.test.mjs +7 -7
- package/package.json +1 -1
- package/dist/chunk-YIZJM2GU.mjs +0 -69
- package/dist/resources/receivers/index.mjs +0 -9
- /package/dist/resources/{receivers/receivers.test.d.mts → customers/customers.test.d.mts} +0 -0
- /package/dist/resources/{receivers/receivers.test.d.ts → customers/customers.test.d.ts} +0 -0
|
@@ -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 = "4.0.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18754,141 +18754,203 @@ function createBankAccountsResource(instanceId, client) {
|
|
|
18754
18754
|
return {
|
|
18755
18755
|
list(_a3) {
|
|
18756
18756
|
var _b = _a3, {
|
|
18757
|
-
|
|
18757
|
+
customer_id
|
|
18758
18758
|
} = _b, params = __objRest(_b, [
|
|
18759
|
-
"
|
|
18759
|
+
"customer_id"
|
|
18760
18760
|
]);
|
|
18761
18761
|
const queryParams = Object.keys(params).length ? `?${new URLSearchParams(params)}` : "";
|
|
18762
18762
|
return client.get(
|
|
18763
|
-
`/instances/${instanceId}/
|
|
18763
|
+
`/instances/${instanceId}/customers/${customer_id}/bank-accounts${queryParams}`
|
|
18764
18764
|
);
|
|
18765
18765
|
},
|
|
18766
18766
|
get({
|
|
18767
|
-
|
|
18767
|
+
customer_id,
|
|
18768
18768
|
id
|
|
18769
18769
|
}) {
|
|
18770
18770
|
return client.get(
|
|
18771
|
-
`/instances/${instanceId}/
|
|
18771
|
+
`/instances/${instanceId}/customers/${customer_id}/bank-accounts/${id}`
|
|
18772
18772
|
);
|
|
18773
18773
|
},
|
|
18774
|
-
delete({
|
|
18774
|
+
delete({ customer_id, id }) {
|
|
18775
18775
|
return client.delete(
|
|
18776
|
-
`/instances/${instanceId}/
|
|
18776
|
+
`/instances/${instanceId}/customers/${customer_id}/bank-accounts/${id}`
|
|
18777
18777
|
);
|
|
18778
18778
|
},
|
|
18779
18779
|
createPix(_c) {
|
|
18780
18780
|
var _d = _c, {
|
|
18781
|
-
|
|
18781
|
+
customer_id
|
|
18782
18782
|
} = _d, data = __objRest(_d, [
|
|
18783
|
-
"
|
|
18783
|
+
"customer_id"
|
|
18784
18784
|
]);
|
|
18785
|
-
return client.post(`/instances/${instanceId}/
|
|
18785
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18786
18786
|
type: "pix"
|
|
18787
18787
|
}, data));
|
|
18788
18788
|
},
|
|
18789
18789
|
createPixSafe(_e) {
|
|
18790
18790
|
var _f = _e, {
|
|
18791
|
-
|
|
18791
|
+
customer_id
|
|
18792
18792
|
} = _f, data = __objRest(_f, [
|
|
18793
|
-
"
|
|
18793
|
+
"customer_id"
|
|
18794
18794
|
]);
|
|
18795
|
-
return client.post(`/instances/${instanceId}/
|
|
18795
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18796
18796
|
type: "pix_safe"
|
|
18797
18797
|
}, data));
|
|
18798
18798
|
},
|
|
18799
18799
|
createArgentinaTransfers(_g) {
|
|
18800
18800
|
var _h = _g, {
|
|
18801
|
-
|
|
18801
|
+
customer_id
|
|
18802
18802
|
} = _h, data = __objRest(_h, [
|
|
18803
|
-
"
|
|
18803
|
+
"customer_id"
|
|
18804
18804
|
]);
|
|
18805
|
-
return client.post(`/instances/${instanceId}/
|
|
18805
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18806
18806
|
type: "transfers_bitso"
|
|
18807
18807
|
}, data));
|
|
18808
18808
|
},
|
|
18809
18809
|
createSpei(_i) {
|
|
18810
18810
|
var _j = _i, {
|
|
18811
|
-
|
|
18811
|
+
customer_id
|
|
18812
18812
|
} = _j, data = __objRest(_j, [
|
|
18813
|
-
"
|
|
18813
|
+
"customer_id"
|
|
18814
18814
|
]);
|
|
18815
|
-
return client.post(`/instances/${instanceId}/
|
|
18815
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18816
18816
|
type: "spei_bitso"
|
|
18817
18817
|
}, data));
|
|
18818
18818
|
},
|
|
18819
18819
|
createColombiaAch(_k) {
|
|
18820
18820
|
var _l = _k, {
|
|
18821
|
-
|
|
18821
|
+
customer_id
|
|
18822
18822
|
} = _l, data = __objRest(_l, [
|
|
18823
|
-
"
|
|
18823
|
+
"customer_id"
|
|
18824
18824
|
]);
|
|
18825
|
-
return client.post(`/instances/${instanceId}/
|
|
18825
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18826
18826
|
type: "ach_cop_bitso"
|
|
18827
18827
|
}, data));
|
|
18828
18828
|
},
|
|
18829
18829
|
createAch(_m) {
|
|
18830
18830
|
var _n = _m, {
|
|
18831
|
-
|
|
18831
|
+
customer_id
|
|
18832
18832
|
} = _n, data = __objRest(_n, [
|
|
18833
|
-
"
|
|
18833
|
+
"customer_id"
|
|
18834
18834
|
]);
|
|
18835
|
-
return client.post(`/instances/${instanceId}/
|
|
18835
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18836
18836
|
type: "ach"
|
|
18837
18837
|
}, data));
|
|
18838
18838
|
},
|
|
18839
18839
|
createWire(_o) {
|
|
18840
18840
|
var _p = _o, {
|
|
18841
|
-
|
|
18841
|
+
customer_id
|
|
18842
18842
|
} = _p, data = __objRest(_p, [
|
|
18843
|
-
"
|
|
18843
|
+
"customer_id"
|
|
18844
18844
|
]);
|
|
18845
|
-
return client.post(`/instances/${instanceId}/
|
|
18845
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18846
18846
|
type: "wire"
|
|
18847
18847
|
}, data));
|
|
18848
18848
|
},
|
|
18849
18849
|
createInternationalSwift(_q) {
|
|
18850
18850
|
var _r = _q, {
|
|
18851
|
-
|
|
18851
|
+
customer_id
|
|
18852
18852
|
} = _r, data = __objRest(_r, [
|
|
18853
|
-
"
|
|
18853
|
+
"customer_id"
|
|
18854
18854
|
]);
|
|
18855
|
-
return client.post(`/instances/${instanceId}/
|
|
18855
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18856
18856
|
type: "international_swift"
|
|
18857
18857
|
}, data));
|
|
18858
18858
|
},
|
|
18859
18859
|
createRtp(_s) {
|
|
18860
18860
|
var _t = _s, {
|
|
18861
|
-
|
|
18861
|
+
customer_id
|
|
18862
18862
|
} = _t, data = __objRest(_t, [
|
|
18863
|
-
"
|
|
18863
|
+
"customer_id"
|
|
18864
18864
|
]);
|
|
18865
|
-
return client.post(`/instances/${instanceId}/
|
|
18865
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18866
18866
|
type: "rtp"
|
|
18867
18867
|
}, data));
|
|
18868
18868
|
},
|
|
18869
18869
|
createTed(_u) {
|
|
18870
18870
|
var _v = _u, {
|
|
18871
|
-
|
|
18871
|
+
customer_id
|
|
18872
18872
|
} = _v, data = __objRest(_v, [
|
|
18873
|
-
"
|
|
18873
|
+
"customer_id"
|
|
18874
18874
|
]);
|
|
18875
|
-
return client.post(`/instances/${instanceId}/
|
|
18875
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18876
18876
|
type: "ted"
|
|
18877
18877
|
}, data));
|
|
18878
18878
|
},
|
|
18879
18879
|
createSepa(_w) {
|
|
18880
18880
|
var _x = _w, {
|
|
18881
|
-
|
|
18881
|
+
customer_id
|
|
18882
18882
|
} = _x, data = __objRest(_x, [
|
|
18883
|
-
"
|
|
18883
|
+
"customer_id"
|
|
18884
18884
|
]);
|
|
18885
|
-
return client.post(`/instances/${instanceId}/
|
|
18885
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/bank-accounts`, __spreadValues({
|
|
18886
18886
|
type: "sepa"
|
|
18887
18887
|
}, data));
|
|
18888
18888
|
}
|
|
18889
18889
|
};
|
|
18890
18890
|
}
|
|
18891
18891
|
|
|
18892
|
+
// src/resources/customers/index.ts
|
|
18893
|
+
function createCustomersResource(instanceId, client) {
|
|
18894
|
+
return {
|
|
18895
|
+
list(params) {
|
|
18896
|
+
const wireParams = params ? Object.fromEntries(
|
|
18897
|
+
Object.entries(params).map(([k2, v2]) => {
|
|
18898
|
+
if (k2 === "customer_id") return ["receiver_id", v2];
|
|
18899
|
+
if (k2 === "customer_name") return ["receiver_name", v2];
|
|
18900
|
+
return [k2, v2];
|
|
18901
|
+
})
|
|
18902
|
+
) : void 0;
|
|
18903
|
+
const queryParams = wireParams ? `?${new URLSearchParams(wireParams)}` : "";
|
|
18904
|
+
return client.get(`/instances/${instanceId}/customers${queryParams}`);
|
|
18905
|
+
},
|
|
18906
|
+
createIndividualWithStandardKYC(data) {
|
|
18907
|
+
return client.post(`/instances/${instanceId}/customers`, __spreadValues({
|
|
18908
|
+
kyc_type: "standard",
|
|
18909
|
+
type: "individual"
|
|
18910
|
+
}, data));
|
|
18911
|
+
},
|
|
18912
|
+
createIndividualWithEnhancedKYC(data) {
|
|
18913
|
+
return client.post(`/instances/${instanceId}/customers`, __spreadValues({
|
|
18914
|
+
kyc_type: "enhanced",
|
|
18915
|
+
type: "individual"
|
|
18916
|
+
}, data));
|
|
18917
|
+
},
|
|
18918
|
+
createBusinessWithStandardKYB(data) {
|
|
18919
|
+
return client.post(`/instances/${instanceId}/customers`, __spreadValues({
|
|
18920
|
+
kyc_type: "standard",
|
|
18921
|
+
type: "business"
|
|
18922
|
+
}, data));
|
|
18923
|
+
},
|
|
18924
|
+
get(customer_id) {
|
|
18925
|
+
return client.get(`/instances/${instanceId}/customers/${customer_id}`);
|
|
18926
|
+
},
|
|
18927
|
+
update(_a3) {
|
|
18928
|
+
var _b = _a3, { customer_id } = _b, data = __objRest(_b, ["customer_id"]);
|
|
18929
|
+
return client.put(`/instances/${instanceId}/customers/${customer_id}`, data);
|
|
18930
|
+
},
|
|
18931
|
+
delete(customer_id) {
|
|
18932
|
+
return client.delete(`/instances/${instanceId}/customers/${customer_id}`);
|
|
18933
|
+
},
|
|
18934
|
+
getLimits(customer_id) {
|
|
18935
|
+
return client.get(`/instances/${instanceId}/limits/customers/${customer_id}`);
|
|
18936
|
+
},
|
|
18937
|
+
getLimitIncreaseRequests(customer_id) {
|
|
18938
|
+
return client.get(`/instances/${instanceId}/customers/${customer_id}/limit-increase`);
|
|
18939
|
+
},
|
|
18940
|
+
requestLimitIncrease(_c) {
|
|
18941
|
+
var _d = _c, {
|
|
18942
|
+
customer_id
|
|
18943
|
+
} = _d, data = __objRest(_d, [
|
|
18944
|
+
"customer_id"
|
|
18945
|
+
]);
|
|
18946
|
+
return client.post(
|
|
18947
|
+
`/instances/${instanceId}/customers/${customer_id}/limit-increase`,
|
|
18948
|
+
data
|
|
18949
|
+
);
|
|
18950
|
+
}
|
|
18951
|
+
};
|
|
18952
|
+
}
|
|
18953
|
+
|
|
18892
18954
|
// src/resources/fees/index.ts
|
|
18893
18955
|
function createFeesResource(instanceId, client) {
|
|
18894
18956
|
return {
|
|
@@ -19035,61 +19097,6 @@ function createQuotesResource(instanceId, client) {
|
|
|
19035
19097
|
};
|
|
19036
19098
|
}
|
|
19037
19099
|
|
|
19038
|
-
// src/resources/receivers/index.ts
|
|
19039
|
-
function createReceiversResource(instanceId, client) {
|
|
19040
|
-
return {
|
|
19041
|
-
list(params) {
|
|
19042
|
-
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
19043
|
-
return client.get(`/instances/${instanceId}/receivers${queryParams}`);
|
|
19044
|
-
},
|
|
19045
|
-
createIndividualWithStandardKYC(data) {
|
|
19046
|
-
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
19047
|
-
kyc_type: "standard",
|
|
19048
|
-
type: "individual"
|
|
19049
|
-
}, data));
|
|
19050
|
-
},
|
|
19051
|
-
createIndividualWithEnhancedKYC(data) {
|
|
19052
|
-
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
19053
|
-
kyc_type: "enhanced",
|
|
19054
|
-
type: "individual"
|
|
19055
|
-
}, data));
|
|
19056
|
-
},
|
|
19057
|
-
createBusinessWithStandardKYB(data) {
|
|
19058
|
-
return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
|
|
19059
|
-
kyc_type: "standard",
|
|
19060
|
-
type: "business"
|
|
19061
|
-
}, data));
|
|
19062
|
-
},
|
|
19063
|
-
get(receiver_id) {
|
|
19064
|
-
return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
|
|
19065
|
-
},
|
|
19066
|
-
update(_a3) {
|
|
19067
|
-
var _b = _a3, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
|
|
19068
|
-
return client.put(`/instances/${instanceId}/receivers/${receiver_id}`, data);
|
|
19069
|
-
},
|
|
19070
|
-
delete(receiver_id) {
|
|
19071
|
-
return client.delete(`/instances/${instanceId}/receivers/${receiver_id}`);
|
|
19072
|
-
},
|
|
19073
|
-
getLimits(receiver_id) {
|
|
19074
|
-
return client.get(`/instances/${instanceId}/limits/receivers/${receiver_id}`);
|
|
19075
|
-
},
|
|
19076
|
-
getLimitIncreaseRequests(receiver_id) {
|
|
19077
|
-
return client.get(`/instances/${instanceId}/receivers/${receiver_id}/limit-increase`);
|
|
19078
|
-
},
|
|
19079
|
-
requestLimitIncrease(_c) {
|
|
19080
|
-
var _d = _c, {
|
|
19081
|
-
receiver_id
|
|
19082
|
-
} = _d, data = __objRest(_d, [
|
|
19083
|
-
"receiver_id"
|
|
19084
|
-
]);
|
|
19085
|
-
return client.post(
|
|
19086
|
-
`/instances/${instanceId}/receivers/${receiver_id}/limit-increase`,
|
|
19087
|
-
data
|
|
19088
|
-
);
|
|
19089
|
-
}
|
|
19090
|
-
};
|
|
19091
|
-
}
|
|
19092
|
-
|
|
19093
19100
|
// src/resources/terms-of-service/index.ts
|
|
19094
19101
|
function createTermsOfServiceResource(instanceId, client) {
|
|
19095
19102
|
return {
|
|
@@ -19175,38 +19182,38 @@ function createUploadResource(baseUrl, headers) {
|
|
|
19175
19182
|
// src/resources/virtual-accounts/index.ts
|
|
19176
19183
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19177
19184
|
return {
|
|
19178
|
-
list(
|
|
19179
|
-
return client.get(`/instances/${instanceId}/
|
|
19185
|
+
list(customer_id) {
|
|
19186
|
+
return client.get(`/instances/${instanceId}/customers/${customer_id}/virtual-accounts`);
|
|
19180
19187
|
},
|
|
19181
19188
|
get({
|
|
19182
|
-
|
|
19189
|
+
customer_id,
|
|
19183
19190
|
id
|
|
19184
19191
|
}) {
|
|
19185
19192
|
return client.get(
|
|
19186
|
-
`/instances/${instanceId}/
|
|
19193
|
+
`/instances/${instanceId}/customers/${customer_id}/virtual-accounts/${id}`
|
|
19187
19194
|
);
|
|
19188
19195
|
},
|
|
19189
19196
|
create(_a3) {
|
|
19190
19197
|
var _b = _a3, {
|
|
19191
|
-
|
|
19198
|
+
customer_id
|
|
19192
19199
|
} = _b, data = __objRest(_b, [
|
|
19193
|
-
"
|
|
19200
|
+
"customer_id"
|
|
19194
19201
|
]);
|
|
19195
19202
|
return client.post(
|
|
19196
|
-
`/instances/${instanceId}/
|
|
19203
|
+
`/instances/${instanceId}/customers/${customer_id}/virtual-accounts`,
|
|
19197
19204
|
data
|
|
19198
19205
|
);
|
|
19199
19206
|
},
|
|
19200
19207
|
update(_c) {
|
|
19201
19208
|
var _d = _c, {
|
|
19202
|
-
|
|
19209
|
+
customer_id,
|
|
19203
19210
|
id
|
|
19204
19211
|
} = _d, data = __objRest(_d, [
|
|
19205
|
-
"
|
|
19212
|
+
"customer_id",
|
|
19206
19213
|
"id"
|
|
19207
19214
|
]);
|
|
19208
19215
|
return client.put(
|
|
19209
|
-
`/instances/${instanceId}/
|
|
19216
|
+
`/instances/${instanceId}/customers/${customer_id}/virtual-accounts/${id}`,
|
|
19210
19217
|
data
|
|
19211
19218
|
);
|
|
19212
19219
|
}
|
|
@@ -19216,19 +19223,19 @@ function createVirtualAccountsResource(instanceId, client) {
|
|
|
19216
19223
|
// src/resources/wallets/blockchain.ts
|
|
19217
19224
|
function createBlockchainWalletsResource(instanceId, client) {
|
|
19218
19225
|
return {
|
|
19219
|
-
list(
|
|
19226
|
+
list(customer_id) {
|
|
19220
19227
|
return client.get(
|
|
19221
|
-
`/instances/${instanceId}/
|
|
19228
|
+
`/instances/${instanceId}/customers/${customer_id}/blockchain-wallets`
|
|
19222
19229
|
);
|
|
19223
19230
|
},
|
|
19224
19231
|
createWithAddress(_a3) {
|
|
19225
19232
|
var _b = _a3, {
|
|
19226
|
-
|
|
19233
|
+
customer_id
|
|
19227
19234
|
} = _b, data = __objRest(_b, [
|
|
19228
|
-
"
|
|
19235
|
+
"customer_id"
|
|
19229
19236
|
]);
|
|
19230
19237
|
return client.post(
|
|
19231
|
-
`/instances/${instanceId}/
|
|
19238
|
+
`/instances/${instanceId}/customers/${customer_id}/blockchain-wallets`,
|
|
19232
19239
|
__spreadProps(__spreadValues({}, data), {
|
|
19233
19240
|
is_account_abstraction: true
|
|
19234
19241
|
})
|
|
@@ -19236,36 +19243,36 @@ function createBlockchainWalletsResource(instanceId, client) {
|
|
|
19236
19243
|
},
|
|
19237
19244
|
createWithHash(_c) {
|
|
19238
19245
|
var _d = _c, {
|
|
19239
|
-
|
|
19246
|
+
customer_id
|
|
19240
19247
|
} = _d, data = __objRest(_d, [
|
|
19241
|
-
"
|
|
19248
|
+
"customer_id"
|
|
19242
19249
|
]);
|
|
19243
19250
|
return client.post(
|
|
19244
|
-
`/instances/${instanceId}/
|
|
19251
|
+
`/instances/${instanceId}/customers/${customer_id}/blockchain-wallets`,
|
|
19245
19252
|
__spreadProps(__spreadValues({}, data), {
|
|
19246
19253
|
is_account_abstraction: false
|
|
19247
19254
|
})
|
|
19248
19255
|
);
|
|
19249
19256
|
},
|
|
19250
|
-
getWalletMessage(
|
|
19257
|
+
getWalletMessage(customer_id) {
|
|
19251
19258
|
return client.get(
|
|
19252
|
-
`/instances/${instanceId}/
|
|
19259
|
+
`/instances/${instanceId}/customers/${customer_id}/blockchain-wallets/sign-message`
|
|
19253
19260
|
);
|
|
19254
19261
|
},
|
|
19255
19262
|
get({
|
|
19256
|
-
|
|
19263
|
+
customer_id,
|
|
19257
19264
|
id
|
|
19258
19265
|
}) {
|
|
19259
19266
|
return client.get(
|
|
19260
|
-
`/instances/${instanceId}/
|
|
19267
|
+
`/instances/${instanceId}/customers/${customer_id}/blockchain-wallets/${id}`
|
|
19261
19268
|
);
|
|
19262
19269
|
},
|
|
19263
19270
|
delete({
|
|
19264
|
-
|
|
19271
|
+
customer_id,
|
|
19265
19272
|
id
|
|
19266
19273
|
}) {
|
|
19267
19274
|
return client.delete(
|
|
19268
|
-
`/instances/${instanceId}/
|
|
19275
|
+
`/instances/${instanceId}/customers/${customer_id}/blockchain-wallets/${id}`
|
|
19269
19276
|
);
|
|
19270
19277
|
},
|
|
19271
19278
|
createAssetTrustline(address) {
|
|
@@ -19291,36 +19298,36 @@ function createBlockchainWalletsResource(instanceId, client) {
|
|
|
19291
19298
|
// src/resources/wallets/custodial.ts
|
|
19292
19299
|
function createCustodialWalletsResource(instanceId, client) {
|
|
19293
19300
|
return {
|
|
19294
|
-
list(
|
|
19295
|
-
return client.get(`/instances/${instanceId}/
|
|
19301
|
+
list(customer_id) {
|
|
19302
|
+
return client.get(`/instances/${instanceId}/customers/${customer_id}/wallets`);
|
|
19296
19303
|
},
|
|
19297
19304
|
get({
|
|
19298
|
-
|
|
19305
|
+
customer_id,
|
|
19299
19306
|
id
|
|
19300
19307
|
}) {
|
|
19301
|
-
return client.get(`/instances/${instanceId}/
|
|
19308
|
+
return client.get(`/instances/${instanceId}/customers/${customer_id}/wallets/${id}`);
|
|
19302
19309
|
},
|
|
19303
19310
|
create(_a3) {
|
|
19304
19311
|
var _b = _a3, {
|
|
19305
|
-
|
|
19312
|
+
customer_id
|
|
19306
19313
|
} = _b, data = __objRest(_b, [
|
|
19307
|
-
"
|
|
19314
|
+
"customer_id"
|
|
19308
19315
|
]);
|
|
19309
|
-
return client.post(`/instances/${instanceId}/
|
|
19316
|
+
return client.post(`/instances/${instanceId}/customers/${customer_id}/wallets`, data);
|
|
19310
19317
|
},
|
|
19311
19318
|
getBalance({
|
|
19312
|
-
|
|
19319
|
+
customer_id,
|
|
19313
19320
|
id
|
|
19314
19321
|
}) {
|
|
19315
19322
|
return client.get(
|
|
19316
|
-
`/instances/${instanceId}/
|
|
19323
|
+
`/instances/${instanceId}/customers/${customer_id}/wallets/${id}/balance`
|
|
19317
19324
|
);
|
|
19318
19325
|
},
|
|
19319
19326
|
delete({
|
|
19320
|
-
|
|
19327
|
+
customer_id,
|
|
19321
19328
|
id
|
|
19322
19329
|
}) {
|
|
19323
|
-
return client.delete(`/instances/${instanceId}/
|
|
19330
|
+
return client.delete(`/instances/${instanceId}/customers/${customer_id}/wallets/${id}`);
|
|
19324
19331
|
}
|
|
19325
19332
|
};
|
|
19326
19333
|
}
|
|
@@ -19330,32 +19337,32 @@ function createOfframpWalletsResource(instanceId, client) {
|
|
|
19330
19337
|
return {
|
|
19331
19338
|
list({
|
|
19332
19339
|
bank_account_id,
|
|
19333
|
-
|
|
19340
|
+
customer_id
|
|
19334
19341
|
}) {
|
|
19335
19342
|
return client.get(
|
|
19336
|
-
`/instances/${instanceId}/
|
|
19343
|
+
`/instances/${instanceId}/customers/${customer_id}/bank-accounts/${bank_account_id}/offramp-wallets`
|
|
19337
19344
|
);
|
|
19338
19345
|
},
|
|
19339
19346
|
create(_a3) {
|
|
19340
19347
|
var _b = _a3, {
|
|
19341
|
-
|
|
19348
|
+
customer_id,
|
|
19342
19349
|
bank_account_id
|
|
19343
19350
|
} = _b, data = __objRest(_b, [
|
|
19344
|
-
"
|
|
19351
|
+
"customer_id",
|
|
19345
19352
|
"bank_account_id"
|
|
19346
19353
|
]);
|
|
19347
19354
|
return client.post(
|
|
19348
|
-
`/instances/${instanceId}/
|
|
19355
|
+
`/instances/${instanceId}/customers/${customer_id}/bank-accounts/${bank_account_id}/offramp-wallets`,
|
|
19349
19356
|
data
|
|
19350
19357
|
);
|
|
19351
19358
|
},
|
|
19352
19359
|
get({
|
|
19353
|
-
|
|
19360
|
+
customer_id,
|
|
19354
19361
|
bank_account_id,
|
|
19355
19362
|
id
|
|
19356
19363
|
}) {
|
|
19357
19364
|
return client.get(
|
|
19358
|
-
`/instances/${instanceId}/
|
|
19365
|
+
`/instances/${instanceId}/customers/${customer_id}/bank-accounts/${bank_account_id}/offramp-wallets/${id}`
|
|
19359
19366
|
);
|
|
19360
19367
|
}
|
|
19361
19368
|
};
|
|
@@ -19429,7 +19436,7 @@ var BlindPay = class {
|
|
|
19429
19436
|
this.transfers = createTransfersResource(this.instanceId, this.api);
|
|
19430
19437
|
this.fees = createFeesResource(this.instanceId, this.api);
|
|
19431
19438
|
this.upload = createUploadResource(this.baseUrl, this.headers);
|
|
19432
|
-
this.
|
|
19439
|
+
this.customers = __spreadProps(__spreadValues({}, createCustomersResource(this.instanceId, this.api)), {
|
|
19433
19440
|
bankAccounts: createBankAccountsResource(this.instanceId, this.api)
|
|
19434
19441
|
});
|
|
19435
19442
|
this.virtualAccounts = createVirtualAccountsResource(this.instanceId, this.api);
|
|
@@ -19549,8 +19556,8 @@ describe("Bank accounts", () => {
|
|
|
19549
19556
|
fetchMock.mockResponseOnce(JSON.stringify(mockedPixAccount), {
|
|
19550
19557
|
headers: { "Content-Type": "application/json" }
|
|
19551
19558
|
});
|
|
19552
|
-
const { data, error } = yield blindpay.
|
|
19553
|
-
|
|
19559
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createPix({
|
|
19560
|
+
customer_id: "re_000000000000",
|
|
19554
19561
|
name: "PIX Account",
|
|
19555
19562
|
pix_key: "14947677768"
|
|
19556
19563
|
});
|
|
@@ -19572,8 +19579,8 @@ describe("Bank accounts", () => {
|
|
|
19572
19579
|
fetchMock.mockResponseOnce(JSON.stringify(mockedArgentinaTransfersAccount), {
|
|
19573
19580
|
headers: { "Content-Type": "application/json" }
|
|
19574
19581
|
});
|
|
19575
|
-
const { data, error } = yield blindpay.
|
|
19576
|
-
|
|
19582
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createArgentinaTransfers({
|
|
19583
|
+
customer_id: "re_000000000000",
|
|
19577
19584
|
name: "Argentina Transfers Account",
|
|
19578
19585
|
beneficiary_name: "Individual full name or business name",
|
|
19579
19586
|
transfers_type: "CVU",
|
|
@@ -19598,8 +19605,8 @@ describe("Bank accounts", () => {
|
|
|
19598
19605
|
fetchMock.mockResponseOnce(JSON.stringify(mockedSpeiAccount), {
|
|
19599
19606
|
headers: { "Content-Type": "application/json" }
|
|
19600
19607
|
});
|
|
19601
|
-
const { data, error } = yield blindpay.
|
|
19602
|
-
|
|
19608
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createSpei({
|
|
19609
|
+
customer_id: "re_000000000000",
|
|
19603
19610
|
name: "SPEI Account",
|
|
19604
19611
|
beneficiary_name: "Individual full name or business name",
|
|
19605
19612
|
spei_protocol: "clabe",
|
|
@@ -19629,8 +19636,8 @@ describe("Bank accounts", () => {
|
|
|
19629
19636
|
fetchMock.mockResponseOnce(JSON.stringify(mockedColombiaAchAccount), {
|
|
19630
19637
|
headers: { "Content-Type": "application/json" }
|
|
19631
19638
|
});
|
|
19632
|
-
const { data, error } = yield blindpay.
|
|
19633
|
-
|
|
19639
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createColombiaAch({
|
|
19640
|
+
customer_id: "re_000000000000",
|
|
19634
19641
|
name: "Colombia ACH Account",
|
|
19635
19642
|
account_type: "checking",
|
|
19636
19643
|
ach_cop_beneficiary_first_name: "Fernando",
|
|
@@ -19675,8 +19682,8 @@ describe("Bank accounts", () => {
|
|
|
19675
19682
|
fetchMock.mockResponseOnce(JSON.stringify(mockedAchAccount), {
|
|
19676
19683
|
headers: { "Content-Type": "application/json" }
|
|
19677
19684
|
});
|
|
19678
|
-
const { data, error } = yield blindpay.
|
|
19679
|
-
|
|
19685
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createAch({
|
|
19686
|
+
customer_id: "re_000000000000",
|
|
19680
19687
|
name: "ACH Account",
|
|
19681
19688
|
account_class: "individual",
|
|
19682
19689
|
account_number: "1001001234",
|
|
@@ -19716,8 +19723,8 @@ describe("Bank accounts", () => {
|
|
|
19716
19723
|
fetchMock.mockResponseOnce(JSON.stringify(mockedWireAccount), {
|
|
19717
19724
|
headers: { "Content-Type": "application/json" }
|
|
19718
19725
|
});
|
|
19719
|
-
const { data, error } = yield blindpay.
|
|
19720
|
-
|
|
19726
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createWire({
|
|
19727
|
+
customer_id: "re_000000000000",
|
|
19721
19728
|
name: "Wire Account",
|
|
19722
19729
|
account_class: "individual",
|
|
19723
19730
|
account_number: "1001001234",
|
|
@@ -19776,8 +19783,8 @@ describe("Bank accounts", () => {
|
|
|
19776
19783
|
fetchMock.mockResponseOnce(JSON.stringify(mockedInternationalSwiftAccount), {
|
|
19777
19784
|
headers: { "Content-Type": "application/json" }
|
|
19778
19785
|
});
|
|
19779
|
-
const { data, error } = yield blindpay.
|
|
19780
|
-
|
|
19786
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createInternationalSwift({
|
|
19787
|
+
customer_id: "re_000000000000",
|
|
19781
19788
|
name: "International Swift Account",
|
|
19782
19789
|
account_class: "individual",
|
|
19783
19790
|
recipient_relationship: "first_party",
|
|
@@ -19826,8 +19833,8 @@ describe("Bank accounts", () => {
|
|
|
19826
19833
|
fetchMock.mockResponseOnce(JSON.stringify(mockedRtpAccount), {
|
|
19827
19834
|
headers: { "Content-Type": "application/json" }
|
|
19828
19835
|
});
|
|
19829
|
-
const { data, error } = yield blindpay.
|
|
19830
|
-
|
|
19836
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createRtp({
|
|
19837
|
+
customer_id: "re_000000000000",
|
|
19831
19838
|
name: "John Doe RTP",
|
|
19832
19839
|
account_class: "individual",
|
|
19833
19840
|
beneficiary_name: "John Doe",
|
|
@@ -19848,7 +19855,7 @@ describe("Bank accounts", () => {
|
|
|
19848
19855
|
it("should get a bank account", () => __async(null, null, function* () {
|
|
19849
19856
|
const mockedBankAccount = {
|
|
19850
19857
|
id: "ba_000000000000",
|
|
19851
|
-
|
|
19858
|
+
customer_id: "rcv_123",
|
|
19852
19859
|
account_holder_name: "Individual full name or business name",
|
|
19853
19860
|
account_number: "1001001234",
|
|
19854
19861
|
routing_number: "012345678",
|
|
@@ -19863,8 +19870,8 @@ describe("Bank accounts", () => {
|
|
|
19863
19870
|
fetchMock.mockResponseOnce(JSON.stringify(mockedBankAccount), {
|
|
19864
19871
|
headers: { "Content-Type": "application/json" }
|
|
19865
19872
|
});
|
|
19866
|
-
const { data, error } = yield blindpay.
|
|
19867
|
-
|
|
19873
|
+
const { data, error } = yield blindpay.customers.bankAccounts.get({
|
|
19874
|
+
customer_id: "re_000000000000",
|
|
19868
19875
|
id: "ba_000000000000"
|
|
19869
19876
|
});
|
|
19870
19877
|
globalExpect(error).toBeNull();
|
|
@@ -19939,8 +19946,8 @@ describe("Bank accounts", () => {
|
|
|
19939
19946
|
fetchMock.mockResponseOnce(JSON.stringify(mockedBankAccounts), {
|
|
19940
19947
|
headers: { "Content-Type": "application/json" }
|
|
19941
19948
|
});
|
|
19942
|
-
const { data, error } = yield blindpay.
|
|
19943
|
-
|
|
19949
|
+
const { data, error } = yield blindpay.customers.bankAccounts.list({
|
|
19950
|
+
customer_id: "re_000000000000"
|
|
19944
19951
|
});
|
|
19945
19952
|
globalExpect(error).toBeNull();
|
|
19946
19953
|
globalExpect(data).toEqual(mockedBankAccounts);
|
|
@@ -19963,8 +19970,8 @@ describe("Bank accounts", () => {
|
|
|
19963
19970
|
fetchMock.mockResponseOnce(JSON.stringify(mockedPixSafeAccount), {
|
|
19964
19971
|
headers: { "Content-Type": "application/json" }
|
|
19965
19972
|
});
|
|
19966
|
-
const { data, error } = yield blindpay.
|
|
19967
|
-
|
|
19973
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createPixSafe({
|
|
19974
|
+
customer_id: "re_000000000000",
|
|
19968
19975
|
name: "PIX Safe Account",
|
|
19969
19976
|
beneficiary_name: "Maria Silva",
|
|
19970
19977
|
account_number: "123456789",
|
|
@@ -19999,8 +20006,8 @@ describe("Bank accounts", () => {
|
|
|
19999
20006
|
fetchMock.mockResponseOnce(JSON.stringify(mockedSepaAccount), {
|
|
20000
20007
|
headers: { "Content-Type": "application/json" }
|
|
20001
20008
|
});
|
|
20002
|
-
const { data, error } = yield blindpay.
|
|
20003
|
-
|
|
20009
|
+
const { data, error } = yield blindpay.customers.bankAccounts.createSepa({
|
|
20010
|
+
customer_id: "re_000000000000",
|
|
20004
20011
|
name: "SEPA Account",
|
|
20005
20012
|
account_class: "individual",
|
|
20006
20013
|
sepa_iban: "BE68539007547034",
|
|
@@ -20020,8 +20027,8 @@ describe("Bank accounts", () => {
|
|
|
20020
20027
|
fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
|
|
20021
20028
|
headers: { "Content-Type": "application/json" }
|
|
20022
20029
|
});
|
|
20023
|
-
const { data, error } = yield blindpay.
|
|
20024
|
-
|
|
20030
|
+
const { data, error } = yield blindpay.customers.bankAccounts.delete({
|
|
20031
|
+
customer_id: "re_000000000000",
|
|
20025
20032
|
id: "ba_000000000000"
|
|
20026
20033
|
});
|
|
20027
20034
|
globalExpect(error).toBeNull();
|