@blindpay/node 1.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/LICENSE +21 -0
- package/README.md +124 -0
- package/dist/api-client-Cw2mNJeR.d.mts +349 -0
- package/dist/api-client-Cw2mNJeR.d.ts +349 -0
- package/dist/chunk-2DAKB5XK.mjs +212 -0
- package/dist/chunk-3CZJEDS5.mjs +41 -0
- package/dist/chunk-CNNEROQ7.mjs +46 -0
- package/dist/chunk-ES7RXEM7.mjs +245 -0
- package/dist/chunk-GCCHFONX.mjs +17893 -0
- package/dist/chunk-GEDDLCJY.mjs +77 -0
- package/dist/chunk-GNDAATIJ.mjs +35 -0
- package/dist/chunk-HKFAJXJG.mjs +65 -0
- package/dist/chunk-LK3JPQ6I.mjs +49 -0
- package/dist/chunk-LLWEHHKB.mjs +47 -0
- package/dist/chunk-LUDGZPXY.mjs +51 -0
- package/dist/chunk-M6IYYMRW.mjs +35 -0
- package/dist/chunk-OBKEW4AQ.mjs +91 -0
- package/dist/chunk-QHMIK7U3.mjs +24 -0
- package/dist/chunk-QVOSGLUO.mjs +36 -0
- package/dist/chunk-UCAW3RTZ.mjs +47 -0
- package/dist/chunk-VKN2AMCW.mjs +57 -0
- package/dist/index.d.mts +81 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +895 -0
- package/dist/index.mjs +95 -0
- package/dist/magic-string.es-6D2DRE4K.mjs +1325 -0
- package/dist/resources/api-keys/api-keys.test.d.mts +2 -0
- package/dist/resources/api-keys/api-keys.test.d.ts +2 -0
- package/dist/resources/api-keys/api-keys.test.js +19881 -0
- package/dist/resources/api-keys/api-keys.test.mjs +130 -0
- package/dist/resources/api-keys/index.d.mts +45 -0
- package/dist/resources/api-keys/index.d.ts +45 -0
- package/dist/resources/api-keys/index.js +64 -0
- package/dist/resources/api-keys/index.mjs +9 -0
- package/dist/resources/available/available.test.d.mts +2 -0
- package/dist/resources/available/available.test.d.ts +2 -0
- package/dist/resources/available/available.test.js +19877 -0
- package/dist/resources/available/available.test.mjs +122 -0
- package/dist/resources/available/index.d.mts +25 -0
- package/dist/resources/available/index.d.ts +25 -0
- package/dist/resources/available/index.js +39 -0
- package/dist/resources/available/index.mjs +9 -0
- package/dist/resources/bank-accounts/bank-accounts.test.d.mts +2 -0
- package/dist/resources/bank-accounts/bank-accounts.test.d.ts +2 -0
- package/dist/resources/bank-accounts/bank-accounts.test.js +20173 -0
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +418 -0
- package/dist/resources/bank-accounts/index.d.mts +414 -0
- package/dist/resources/bank-accounts/index.d.ts +414 -0
- package/dist/resources/bank-accounts/index.js +227 -0
- package/dist/resources/bank-accounts/index.mjs +9 -0
- package/dist/resources/instances/index.d.mts +42 -0
- package/dist/resources/instances/index.d.ts +42 -0
- package/dist/resources/instances/index.js +75 -0
- package/dist/resources/instances/index.mjs +9 -0
- package/dist/resources/instances/instances.test.d.mts +2 -0
- package/dist/resources/instances/instances.test.d.ts +2 -0
- package/dist/resources/instances/instances.test.js +19873 -0
- package/dist/resources/instances/instances.test.mjs +118 -0
- package/dist/resources/partner-fees/index.d.mts +65 -0
- package/dist/resources/partner-fees/index.d.ts +65 -0
- package/dist/resources/partner-fees/index.js +69 -0
- package/dist/resources/partner-fees/index.mjs +9 -0
- package/dist/resources/partner-fees/partner-fees.test.d.mts +2 -0
- package/dist/resources/partner-fees/partner-fees.test.d.ts +2 -0
- package/dist/resources/partner-fees/partner-fees.test.js +19889 -0
- package/dist/resources/partner-fees/partner-fees.test.mjs +134 -0
- package/dist/resources/payins/index.d.mts +200 -0
- package/dist/resources/payins/index.d.ts +200 -0
- package/dist/resources/payins/index.js +75 -0
- package/dist/resources/payins/index.mjs +9 -0
- package/dist/resources/payins/payins-quotes.test.d.mts +2 -0
- package/dist/resources/payins/payins-quotes.test.d.ts +2 -0
- package/dist/resources/payins/payins-quotes.test.js +19852 -0
- package/dist/resources/payins/payins-quotes.test.mjs +97 -0
- package/dist/resources/payins/payins.test.d.mts +2 -0
- package/dist/resources/payins/payins.test.d.ts +2 -0
- package/dist/resources/payins/payins.test.js +20268 -0
- package/dist/resources/payins/payins.test.mjs +513 -0
- package/dist/resources/payins/quotes.d.mts +45 -0
- package/dist/resources/payins/quotes.d.ts +45 -0
- package/dist/resources/payins/quotes.js +63 -0
- package/dist/resources/payins/quotes.mjs +9 -0
- package/dist/resources/payouts/index.d.mts +155 -0
- package/dist/resources/payouts/index.d.ts +155 -0
- package/dist/resources/payouts/index.js +93 -0
- package/dist/resources/payouts/index.mjs +9 -0
- package/dist/resources/payouts/payouts.test.d.mts +2 -0
- package/dist/resources/payouts/payouts.test.d.ts +2 -0
- package/dist/resources/payouts/payouts.test.js +20346 -0
- package/dist/resources/payouts/payouts.test.mjs +591 -0
- package/dist/resources/quotes/index.d.mts +59 -0
- package/dist/resources/quotes/index.d.ts +59 -0
- package/dist/resources/quotes/index.js +63 -0
- package/dist/resources/quotes/index.mjs +9 -0
- package/dist/resources/quotes/quotes.test.d.mts +2 -0
- package/dist/resources/quotes/quotes.test.d.ts +2 -0
- package/dist/resources/quotes/quotes.test.js +19866 -0
- package/dist/resources/quotes/quotes.test.mjs +111 -0
- package/dist/resources/receivers/index.d.mts +205 -0
- package/dist/resources/receivers/index.d.ts +205 -0
- package/dist/resources/receivers/index.js +85 -0
- package/dist/resources/receivers/index.mjs +9 -0
- package/dist/resources/receivers/receivers.test.d.mts +2 -0
- package/dist/resources/receivers/receivers.test.d.ts +2 -0
- package/dist/resources/receivers/receivers.test.js +20145 -0
- package/dist/resources/receivers/receivers.test.mjs +390 -0
- package/dist/resources/virtual-accounts/index.d.mts +58 -0
- package/dist/resources/virtual-accounts/index.d.ts +58 -0
- package/dist/resources/virtual-accounts/index.js +79 -0
- package/dist/resources/virtual-accounts/index.mjs +9 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.d.mts +2 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.d.ts +2 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +19902 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +147 -0
- package/dist/resources/wallets/blockchain.d.mts +83 -0
- package/dist/resources/wallets/blockchain.d.ts +83 -0
- package/dist/resources/wallets/blockchain.js +105 -0
- package/dist/resources/wallets/blockchain.mjs +9 -0
- package/dist/resources/wallets/blockchain.test.d.mts +2 -0
- package/dist/resources/wallets/blockchain.test.d.ts +2 -0
- package/dist/resources/wallets/blockchain.test.js +19897 -0
- package/dist/resources/wallets/blockchain.test.mjs +142 -0
- package/dist/resources/wallets/offramp.d.mts +46 -0
- package/dist/resources/wallets/offramp.d.ts +46 -0
- package/dist/resources/wallets/offramp.js +77 -0
- package/dist/resources/wallets/offramp.mjs +9 -0
- package/dist/resources/wallets/offramp.test.d.mts +2 -0
- package/dist/resources/wallets/offramp.test.d.ts +2 -0
- package/dist/resources/wallets/offramp.test.js +19872 -0
- package/dist/resources/wallets/offramp.test.mjs +117 -0
- package/dist/resources/webhooks/index.d.mts +49 -0
- package/dist/resources/webhooks/index.d.ts +49 -0
- package/dist/resources/webhooks/index.js +74 -0
- package/dist/resources/webhooks/index.mjs +9 -0
- package/dist/resources/webhooks/webhooks.test.d.mts +2 -0
- package/dist/resources/webhooks/webhooks.test.d.ts +2 -0
- package/dist/resources/webhooks/webhooks.test.js +19878 -0
- package/dist/resources/webhooks/webhooks.test.mjs +123 -0
- package/package.json +65 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import {
|
|
2
|
+
afterEach,
|
|
3
|
+
describe,
|
|
4
|
+
globalExpect,
|
|
5
|
+
init_dist,
|
|
6
|
+
it
|
|
7
|
+
} from "../../chunk-GCCHFONX.mjs";
|
|
8
|
+
import {
|
|
9
|
+
Blindpay,
|
|
10
|
+
init_client
|
|
11
|
+
} from "../../chunk-ES7RXEM7.mjs";
|
|
12
|
+
import "../../chunk-GEDDLCJY.mjs";
|
|
13
|
+
import "../../chunk-LK3JPQ6I.mjs";
|
|
14
|
+
import "../../chunk-CNNEROQ7.mjs";
|
|
15
|
+
import "../../chunk-GNDAATIJ.mjs";
|
|
16
|
+
import "../../chunk-VKN2AMCW.mjs";
|
|
17
|
+
import "../../chunk-LUDGZPXY.mjs";
|
|
18
|
+
import "../../chunk-3CZJEDS5.mjs";
|
|
19
|
+
import "../../chunk-UCAW3RTZ.mjs";
|
|
20
|
+
import "../../chunk-M6IYYMRW.mjs";
|
|
21
|
+
import "../../chunk-HKFAJXJG.mjs";
|
|
22
|
+
import "../../chunk-QVOSGLUO.mjs";
|
|
23
|
+
import "../../chunk-2DAKB5XK.mjs";
|
|
24
|
+
import "../../chunk-QHMIK7U3.mjs";
|
|
25
|
+
import "../../chunk-LLWEHHKB.mjs";
|
|
26
|
+
import {
|
|
27
|
+
__async,
|
|
28
|
+
__commonJS
|
|
29
|
+
} from "../../chunk-OBKEW4AQ.mjs";
|
|
30
|
+
|
|
31
|
+
// src/resources/available/available.test.ts
|
|
32
|
+
var require_available_test = __commonJS({
|
|
33
|
+
"src/resources/available/available.test.ts"(exports) {
|
|
34
|
+
init_dist();
|
|
35
|
+
init_client();
|
|
36
|
+
describe("Available", () => {
|
|
37
|
+
afterEach(() => fetchMock.resetMocks());
|
|
38
|
+
const blindpay = new Blindpay("test-key");
|
|
39
|
+
describe("Get bank details", () => {
|
|
40
|
+
it("should get bank details for a rail", () => __async(null, null, function* () {
|
|
41
|
+
const mockedBankDetails = [
|
|
42
|
+
{
|
|
43
|
+
label: "Account Type",
|
|
44
|
+
regex: "",
|
|
45
|
+
key: "account_type",
|
|
46
|
+
items: [
|
|
47
|
+
{
|
|
48
|
+
label: "Checking",
|
|
49
|
+
value: "checking"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "Savings",
|
|
53
|
+
value: "saving"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
required: true
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedBankDetails), {
|
|
60
|
+
headers: { "Content-Type": "application/json" }
|
|
61
|
+
});
|
|
62
|
+
const { data, error } = yield blindpay.available.getBankDetails("pix");
|
|
63
|
+
globalExpect(error).toBeNull();
|
|
64
|
+
globalExpect(data).toEqual(mockedBankDetails);
|
|
65
|
+
}));
|
|
66
|
+
});
|
|
67
|
+
describe("Get rails", () => {
|
|
68
|
+
it("should get available rails", () => __async(null, null, function* () {
|
|
69
|
+
const mockedRails = [
|
|
70
|
+
{
|
|
71
|
+
label: "Domestic Wire",
|
|
72
|
+
value: "wire",
|
|
73
|
+
country: "US"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: "ACH",
|
|
77
|
+
value: "ach",
|
|
78
|
+
country: "US"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: "PIX",
|
|
82
|
+
value: "pix",
|
|
83
|
+
country: "BR"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: "SPEI",
|
|
87
|
+
value: "spei_bitso",
|
|
88
|
+
country: "MX"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: "Transfers 3.0",
|
|
92
|
+
value: "transfers_bitso",
|
|
93
|
+
country: "AR"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: "ACH Colombia",
|
|
97
|
+
value: "ach_cop_bitso",
|
|
98
|
+
country: "CO"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: "International Swift",
|
|
102
|
+
value: "international_swift",
|
|
103
|
+
country: "US"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: "RTP",
|
|
107
|
+
value: "rtp",
|
|
108
|
+
country: "US"
|
|
109
|
+
}
|
|
110
|
+
];
|
|
111
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedRails), {
|
|
112
|
+
headers: { "Content-Type": "application/json" }
|
|
113
|
+
});
|
|
114
|
+
const { data, error } = yield blindpay.available.getRails();
|
|
115
|
+
globalExpect(error).toBeNull();
|
|
116
|
+
globalExpect(data).toEqual(mockedRails);
|
|
117
|
+
}));
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export default require_available_test();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { I as InternalApiClient, R as Rail, B as BlindpayApiResponse } from '../../api-client-Cw2mNJeR.mjs';
|
|
2
|
+
|
|
3
|
+
type BankDetailKey = "type" | "name" | "pix_key" | "beneficiary_name" | "routing_number" | "account_number" | "account_type" | "account_class" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "checkbook_account_id" | "checkbook_user_key" | "spei_protocol" | "spei_institution_code" | "spei_clabe" | "transfers_type" | "transfers_account" | "ach_cop_beneficiary_first_name" | "ach_cop_beneficiary_last_name" | "ach_cop_document_id" | "ach_cop_document_type" | "ach_cop_email" | "ach_cop_bank_code" | "ach_cop_bank_account" | "swift_code_bic" | "swift_account_holder_name" | "swift_account_number_iban" | "swift_beneficiary_address_line_1" | "swift_beneficiary_address_line_2" | "swift_beneficiary_country" | "swift_beneficiary_city" | "swift_beneficiary_state_province_region" | "swift_beneficiary_postal_code" | "swift_bank_name" | "swift_bank_address_line_1" | "swift_bank_address_line_2" | "swift_bank_country" | "swift_bank_city" | "swift_bank_state_province_region" | "swift_bank_postal_code" | "swift_intermediary_bank_swift_code_bic" | "swift_intermediary_bank_account_number_iban" | "swift_intermediary_bank_name" | "swift_intermediary_bank_country";
|
|
4
|
+
type GetBankDetailsResponse = Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
regex: string;
|
|
7
|
+
key: BankDetailKey;
|
|
8
|
+
items?: Array<{
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
is_active?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
required: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
type GetRailsResponse = Array<{
|
|
16
|
+
label: string;
|
|
17
|
+
value: Rail;
|
|
18
|
+
country: string;
|
|
19
|
+
}>;
|
|
20
|
+
declare function createAvailableResource(client: InternalApiClient): {
|
|
21
|
+
getBankDetails(rail: Rail): Promise<BlindpayApiResponse<GetBankDetailsResponse>>;
|
|
22
|
+
getRails(): Promise<BlindpayApiResponse<GetRailsResponse>>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { type BankDetailKey, type GetBankDetailsResponse, type GetRailsResponse, createAvailableResource };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { I as InternalApiClient, R as Rail, B as BlindpayApiResponse } from '../../api-client-Cw2mNJeR.js';
|
|
2
|
+
|
|
3
|
+
type BankDetailKey = "type" | "name" | "pix_key" | "beneficiary_name" | "routing_number" | "account_number" | "account_type" | "account_class" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "checkbook_account_id" | "checkbook_user_key" | "spei_protocol" | "spei_institution_code" | "spei_clabe" | "transfers_type" | "transfers_account" | "ach_cop_beneficiary_first_name" | "ach_cop_beneficiary_last_name" | "ach_cop_document_id" | "ach_cop_document_type" | "ach_cop_email" | "ach_cop_bank_code" | "ach_cop_bank_account" | "swift_code_bic" | "swift_account_holder_name" | "swift_account_number_iban" | "swift_beneficiary_address_line_1" | "swift_beneficiary_address_line_2" | "swift_beneficiary_country" | "swift_beneficiary_city" | "swift_beneficiary_state_province_region" | "swift_beneficiary_postal_code" | "swift_bank_name" | "swift_bank_address_line_1" | "swift_bank_address_line_2" | "swift_bank_country" | "swift_bank_city" | "swift_bank_state_province_region" | "swift_bank_postal_code" | "swift_intermediary_bank_swift_code_bic" | "swift_intermediary_bank_account_number_iban" | "swift_intermediary_bank_name" | "swift_intermediary_bank_country";
|
|
4
|
+
type GetBankDetailsResponse = Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
regex: string;
|
|
7
|
+
key: BankDetailKey;
|
|
8
|
+
items?: Array<{
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
is_active?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
required: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
type GetRailsResponse = Array<{
|
|
16
|
+
label: string;
|
|
17
|
+
value: Rail;
|
|
18
|
+
country: string;
|
|
19
|
+
}>;
|
|
20
|
+
declare function createAvailableResource(client: InternalApiClient): {
|
|
21
|
+
getBankDetails(rail: Rail): Promise<BlindpayApiResponse<GetBankDetailsResponse>>;
|
|
22
|
+
getRails(): Promise<BlindpayApiResponse<GetRailsResponse>>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { type BankDetailKey, type GetBankDetailsResponse, type GetRailsResponse, createAvailableResource };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/resources/available/index.ts
|
|
21
|
+
var available_exports = {};
|
|
22
|
+
__export(available_exports, {
|
|
23
|
+
createAvailableResource: () => createAvailableResource
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(available_exports);
|
|
26
|
+
function createAvailableResource(client) {
|
|
27
|
+
return {
|
|
28
|
+
getBankDetails(rail) {
|
|
29
|
+
return client.get(`/available/bank-details?rail=${rail}`);
|
|
30
|
+
},
|
|
31
|
+
getRails() {
|
|
32
|
+
return client.get("/available/rails");
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
createAvailableResource
|
|
39
|
+
});
|