@blindpay/node 2.5.0 → 3.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.
Files changed (74) hide show
  1. package/dist/{api-client-Drd7alfK.d.mts → api-client-B7VQkM_4.d.mts} +94 -33
  2. package/dist/{api-client-Drd7alfK.d.ts → api-client-B7VQkM_4.d.ts} +94 -33
  3. package/dist/{chunk-5XJJKYXE.mjs → chunk-LEPGLH7Q.mjs} +20 -10
  4. package/dist/{chunk-3QQCDR3E.mjs → chunk-VBZHAPK7.mjs} +8 -0
  5. package/dist/{chunk-CEJF5Y4K.mjs → chunk-WH2VNZE7.mjs} +11 -11
  6. package/dist/index.d.mts +4 -4
  7. package/dist/index.d.ts +4 -4
  8. package/dist/index.js +29 -11
  9. package/dist/index.mjs +11 -11
  10. package/dist/resources/api-keys/api-keys.test.js +29 -11
  11. package/dist/resources/api-keys/api-keys.test.mjs +5 -5
  12. package/dist/resources/api-keys/index.d.mts +1 -1
  13. package/dist/resources/api-keys/index.d.ts +1 -1
  14. package/dist/resources/available/available.test.js +29 -11
  15. package/dist/resources/available/available.test.mjs +5 -5
  16. package/dist/resources/available/index.d.mts +1 -1
  17. package/dist/resources/available/index.d.ts +1 -1
  18. package/dist/resources/bank-accounts/bank-accounts.test.js +29 -11
  19. package/dist/resources/bank-accounts/bank-accounts.test.mjs +5 -5
  20. package/dist/resources/bank-accounts/index.d.mts +2 -4
  21. package/dist/resources/bank-accounts/index.d.ts +2 -4
  22. package/dist/resources/instances/index.d.mts +1 -1
  23. package/dist/resources/instances/index.d.ts +1 -1
  24. package/dist/resources/instances/instances.test.js +29 -11
  25. package/dist/resources/instances/instances.test.mjs +5 -5
  26. package/dist/resources/partner-fees/index.d.mts +1 -1
  27. package/dist/resources/partner-fees/index.d.ts +1 -1
  28. package/dist/resources/partner-fees/partner-fees.test.js +29 -11
  29. package/dist/resources/partner-fees/partner-fees.test.mjs +5 -5
  30. package/dist/resources/payins/index.d.mts +9 -33
  31. package/dist/resources/payins/index.d.ts +9 -33
  32. package/dist/resources/payins/payins-quotes.test.js +29 -11
  33. package/dist/resources/payins/payins-quotes.test.mjs +5 -5
  34. package/dist/resources/payins/payins.test.js +141 -36
  35. package/dist/resources/payins/payins.test.mjs +117 -30
  36. package/dist/resources/payins/quotes.d.mts +1 -1
  37. package/dist/resources/payins/quotes.d.ts +1 -1
  38. package/dist/resources/payouts/index.d.mts +42 -17
  39. package/dist/resources/payouts/index.d.ts +42 -17
  40. package/dist/resources/payouts/index.js +8 -0
  41. package/dist/resources/payouts/index.mjs +1 -1
  42. package/dist/resources/payouts/payouts.test.js +139 -11
  43. package/dist/resources/payouts/payouts.test.mjs +115 -5
  44. package/dist/resources/quotes/index.d.mts +1 -1
  45. package/dist/resources/quotes/index.d.ts +1 -1
  46. package/dist/resources/quotes/quotes.test.js +29 -11
  47. package/dist/resources/quotes/quotes.test.mjs +5 -5
  48. package/dist/resources/receivers/index.d.mts +9 -7
  49. package/dist/resources/receivers/index.d.ts +9 -7
  50. package/dist/resources/receivers/receivers.test.js +36 -19
  51. package/dist/resources/receivers/receivers.test.mjs +12 -13
  52. package/dist/resources/terms-of-service/index.d.mts +1 -1
  53. package/dist/resources/terms-of-service/index.d.ts +1 -1
  54. package/dist/resources/terms-of-service/terms-of-service.test.js +29 -11
  55. package/dist/resources/terms-of-service/terms-of-service.test.mjs +5 -5
  56. package/dist/resources/virtual-accounts/index.d.mts +22 -7
  57. package/dist/resources/virtual-accounts/index.d.ts +22 -7
  58. package/dist/resources/virtual-accounts/index.js +20 -10
  59. package/dist/resources/virtual-accounts/index.mjs +1 -1
  60. package/dist/resources/virtual-accounts/virtual-accounts.test.js +148 -30
  61. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +124 -24
  62. package/dist/resources/wallets/blockchain.d.mts +1 -1
  63. package/dist/resources/wallets/blockchain.d.ts +1 -1
  64. package/dist/resources/wallets/blockchain.test.js +29 -11
  65. package/dist/resources/wallets/blockchain.test.mjs +5 -5
  66. package/dist/resources/wallets/offramp.d.mts +1 -1
  67. package/dist/resources/wallets/offramp.d.ts +1 -1
  68. package/dist/resources/wallets/offramp.test.js +29 -11
  69. package/dist/resources/wallets/offramp.test.mjs +5 -5
  70. package/dist/resources/webhooks/index.d.mts +1 -1
  71. package/dist/resources/webhooks/index.d.ts +1 -1
  72. package/dist/resources/webhooks/webhooks.test.js +29 -11
  73. package/dist/resources/webhooks/webhooks.test.mjs +5 -5
  74. package/package.json +2 -1
@@ -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 = "2.5.0";
18705
+ var version = "3.0.0";
18706
18706
 
18707
18707
  // src/internal/blindpay-error.ts
18708
18708
  var BlindPayError = class extends Error {
@@ -18967,6 +18967,14 @@ function createPayoutsResource(instanceId, client) {
18967
18967
  createEvm(_c) {
18968
18968
  var data = __objRest(_c, []);
18969
18969
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
18970
+ },
18971
+ authorizeSolana(_d) {
18972
+ var data = __objRest(_d, []);
18973
+ return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
18974
+ },
18975
+ createSolana(_e) {
18976
+ var data = __objRest(_e, []);
18977
+ return client.post(`/instances/${instanceId}/payouts/solana`, data);
18970
18978
  }
18971
18979
  };
18972
18980
  }
@@ -19059,30 +19067,40 @@ function createTermsOfServiceResource(instanceId, client) {
19059
19067
  // src/resources/virtual-accounts/index.ts
19060
19068
  function createVirtualAccountsResource(instanceId, client) {
19061
19069
  return {
19062
- update(_a3) {
19070
+ list(receiver_id) {
19071
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19072
+ },
19073
+ get({
19074
+ receiver_id,
19075
+ id
19076
+ }) {
19077
+ return client.get(
19078
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
19079
+ );
19080
+ },
19081
+ create(_a3) {
19063
19082
  var _b = _a3, {
19064
19083
  receiver_id
19065
19084
  } = _b, data = __objRest(_b, [
19066
19085
  "receiver_id"
19067
19086
  ]);
19068
- return client.put(
19087
+ return client.post(
19069
19088
  `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19070
19089
  data
19071
19090
  );
19072
19091
  },
19073
- create(_c) {
19092
+ update(_c) {
19074
19093
  var _d = _c, {
19075
- receiver_id
19094
+ receiver_id,
19095
+ id
19076
19096
  } = _d, data = __objRest(_d, [
19077
- "receiver_id"
19097
+ "receiver_id",
19098
+ "id"
19078
19099
  ]);
19079
- return client.post(
19080
- `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19100
+ return client.put(
19101
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
19081
19102
  data
19082
19103
  );
19083
- },
19084
- get(receiver_id) {
19085
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19086
19104
  }
19087
19105
  };
19088
19106
  }
@@ -19378,6 +19396,7 @@ describe("Receivers", () => {
19378
19396
  type: "individual",
19379
19397
  kyc_type: "standard",
19380
19398
  kyc_status: "verifying",
19399
+ is_tos_accepted: true,
19381
19400
  kyc_warnings: [
19382
19401
  {
19383
19402
  code: null,
@@ -19420,6 +19439,7 @@ describe("Receivers", () => {
19420
19439
  {
19421
19440
  id: "re_YuaMcI2B8zbQ",
19422
19441
  type: "individual",
19442
+ is_tos_accepted: true,
19423
19443
  kyc_type: "enhanced",
19424
19444
  kyc_status: "approved",
19425
19445
  kyc_warnings: null,
@@ -19463,6 +19483,8 @@ describe("Receivers", () => {
19463
19483
  id: "re_IOxAUL24LG7P",
19464
19484
  type: "business",
19465
19485
  kyc_type: "standard",
19486
+ is_tos_accepted: true,
19487
+ is_fbo: false,
19466
19488
  kyc_status: "pending",
19467
19489
  kyc_warnings: null,
19468
19490
  email: "business@example.com",
@@ -19501,9 +19523,7 @@ describe("Receivers", () => {
19501
19523
  id_doc_back_file: "https://example.com/image.png",
19502
19524
  proof_of_address_doc_type: "UTILITY_BILL",
19503
19525
  proof_of_address_doc_file: "https://example.com/image.png",
19504
- id: "ub_000000000000",
19505
- instance_id: "in_000000000000",
19506
- receiver_id: "re_IOxAUL24LG7P"
19526
+ id: "ub_000000000000"
19507
19527
  }
19508
19528
  ],
19509
19529
  incorporation_doc_file: "https://example.com/image.png",
@@ -19640,10 +19660,7 @@ describe("Receivers", () => {
19640
19660
  id_doc_front_file: "https://example.com/image.png",
19641
19661
  id_doc_back_file: "https://example.com/image.png",
19642
19662
  proof_of_address_doc_type: "UTILITY_BILL",
19643
- proof_of_address_doc_file: "https://example.com/image.png",
19644
- id: "ub_000000000000",
19645
- instance_id: "in_000000000000",
19646
- receiver_id: "re_IOxAUL24LG7P"
19663
+ proof_of_address_doc_file: "https://example.com/image.png"
19647
19664
  }
19648
19665
  ]
19649
19666
  });
@@ -19655,6 +19672,7 @@ describe("Receivers", () => {
19655
19672
  it("should get a receiver", () => __async(null, null, function* () {
19656
19673
  const mockedReceiver = {
19657
19674
  id: "re_YuaMcI2B8zbQ",
19675
+ is_tos_accepted: true,
19658
19676
  type: "individual",
19659
19677
  kyc_type: "enhanced",
19660
19678
  kyc_status: "verifying",
@@ -19742,7 +19760,6 @@ describe("Receivers", () => {
19742
19760
  website: "https://site.com",
19743
19761
  owners: [
19744
19762
  {
19745
- id: "ub_000000000000",
19746
19763
  first_name: "Carlos",
19747
19764
  last_name: "Silva",
19748
19765
  role: "beneficial_owner",
@@ -8,21 +8,21 @@ import {
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-CEJF5Y4K.mjs";
12
- import "../../chunk-UC57SCKQ.mjs";
11
+ } from "../../chunk-WH2VNZE7.mjs";
13
12
  import "../../chunk-FG25JHDX.mjs";
14
13
  import "../../chunk-QGNLMN6Z.mjs";
14
+ import "../../chunk-UC57SCKQ.mjs";
15
15
  import "../../chunk-TBTA7A2P.mjs";
16
16
  import "../../chunk-67XECGMJ.mjs";
17
17
  import "../../chunk-Z6EYX4D3.mjs";
18
- import "../../chunk-5XJJKYXE.mjs";
19
- import "../../chunk-U7CKUUO7.mjs";
18
+ import "../../chunk-LEPGLH7Q.mjs";
20
19
  import "../../chunk-RC5NN5UF.mjs";
21
20
  import "../../chunk-W7NJUABI.mjs";
22
21
  import "../../chunk-VRA5HP7F.mjs";
23
- import "../../chunk-3QQCDR3E.mjs";
22
+ import "../../chunk-VBZHAPK7.mjs";
24
23
  import "../../chunk-LRHWT4JU.mjs";
25
24
  import "../../chunk-CPOSU35L.mjs";
25
+ import "../../chunk-U7CKUUO7.mjs";
26
26
  import "../../chunk-B5T7AQLH.mjs";
27
27
  import {
28
28
  __async,
@@ -45,6 +45,7 @@ var require_receivers_test = __commonJS({
45
45
  type: "individual",
46
46
  kyc_type: "standard",
47
47
  kyc_status: "verifying",
48
+ is_tos_accepted: true,
48
49
  kyc_warnings: [
49
50
  {
50
51
  code: null,
@@ -87,6 +88,7 @@ var require_receivers_test = __commonJS({
87
88
  {
88
89
  id: "re_YuaMcI2B8zbQ",
89
90
  type: "individual",
91
+ is_tos_accepted: true,
90
92
  kyc_type: "enhanced",
91
93
  kyc_status: "approved",
92
94
  kyc_warnings: null,
@@ -130,6 +132,8 @@ var require_receivers_test = __commonJS({
130
132
  id: "re_IOxAUL24LG7P",
131
133
  type: "business",
132
134
  kyc_type: "standard",
135
+ is_tos_accepted: true,
136
+ is_fbo: false,
133
137
  kyc_status: "pending",
134
138
  kyc_warnings: null,
135
139
  email: "business@example.com",
@@ -168,9 +172,7 @@ var require_receivers_test = __commonJS({
168
172
  id_doc_back_file: "https://example.com/image.png",
169
173
  proof_of_address_doc_type: "UTILITY_BILL",
170
174
  proof_of_address_doc_file: "https://example.com/image.png",
171
- id: "ub_000000000000",
172
- instance_id: "in_000000000000",
173
- receiver_id: "re_IOxAUL24LG7P"
175
+ id: "ub_000000000000"
174
176
  }
175
177
  ],
176
178
  incorporation_doc_file: "https://example.com/image.png",
@@ -307,10 +309,7 @@ var require_receivers_test = __commonJS({
307
309
  id_doc_front_file: "https://example.com/image.png",
308
310
  id_doc_back_file: "https://example.com/image.png",
309
311
  proof_of_address_doc_type: "UTILITY_BILL",
310
- proof_of_address_doc_file: "https://example.com/image.png",
311
- id: "ub_000000000000",
312
- instance_id: "in_000000000000",
313
- receiver_id: "re_IOxAUL24LG7P"
312
+ proof_of_address_doc_file: "https://example.com/image.png"
314
313
  }
315
314
  ]
316
315
  });
@@ -322,6 +321,7 @@ var require_receivers_test = __commonJS({
322
321
  it("should get a receiver", () => __async(null, null, function* () {
323
322
  const mockedReceiver = {
324
323
  id: "re_YuaMcI2B8zbQ",
324
+ is_tos_accepted: true,
325
325
  type: "individual",
326
326
  kyc_type: "enhanced",
327
327
  kyc_status: "verifying",
@@ -409,7 +409,6 @@ var require_receivers_test = __commonJS({
409
409
  website: "https://site.com",
410
410
  owners: [
411
411
  {
412
- id: "ub_000000000000",
413
412
  first_name: "Carlos",
414
413
  last_name: "Silva",
415
414
  role: "beneficial_owner",
@@ -1,4 +1,4 @@
1
- import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.mjs';
1
+ import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-B7VQkM_4.mjs';
2
2
 
3
3
  type InitiateInput = {
4
4
  idempotency_key: string;
@@ -1,4 +1,4 @@
1
- import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.js';
1
+ import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-B7VQkM_4.js';
2
2
 
3
3
  type InitiateInput = {
4
4
  idempotency_key: string;
@@ -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 = "2.5.0";
18705
+ var version = "3.0.0";
18706
18706
 
18707
18707
  // src/internal/blindpay-error.ts
18708
18708
  var BlindPayError = class extends Error {
@@ -18967,6 +18967,14 @@ function createPayoutsResource(instanceId, client) {
18967
18967
  createEvm(_c) {
18968
18968
  var data = __objRest(_c, []);
18969
18969
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
18970
+ },
18971
+ authorizeSolana(_d) {
18972
+ var data = __objRest(_d, []);
18973
+ return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
18974
+ },
18975
+ createSolana(_e) {
18976
+ var data = __objRest(_e, []);
18977
+ return client.post(`/instances/${instanceId}/payouts/solana`, data);
18970
18978
  }
18971
18979
  };
18972
18980
  }
@@ -19059,30 +19067,40 @@ function createTermsOfServiceResource(instanceId, client) {
19059
19067
  // src/resources/virtual-accounts/index.ts
19060
19068
  function createVirtualAccountsResource(instanceId, client) {
19061
19069
  return {
19062
- update(_a3) {
19070
+ list(receiver_id) {
19071
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19072
+ },
19073
+ get({
19074
+ receiver_id,
19075
+ id
19076
+ }) {
19077
+ return client.get(
19078
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
19079
+ );
19080
+ },
19081
+ create(_a3) {
19063
19082
  var _b = _a3, {
19064
19083
  receiver_id
19065
19084
  } = _b, data = __objRest(_b, [
19066
19085
  "receiver_id"
19067
19086
  ]);
19068
- return client.put(
19087
+ return client.post(
19069
19088
  `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19070
19089
  data
19071
19090
  );
19072
19091
  },
19073
- create(_c) {
19092
+ update(_c) {
19074
19093
  var _d = _c, {
19075
- receiver_id
19094
+ receiver_id,
19095
+ id
19076
19096
  } = _d, data = __objRest(_d, [
19077
- "receiver_id"
19097
+ "receiver_id",
19098
+ "id"
19078
19099
  ]);
19079
- return client.post(
19080
- `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
19100
+ return client.put(
19101
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
19081
19102
  data
19082
19103
  );
19083
- },
19084
- get(receiver_id) {
19085
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
19086
19104
  }
19087
19105
  };
19088
19106
  }
@@ -8,21 +8,21 @@ import {
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-CEJF5Y4K.mjs";
12
- import "../../chunk-UC57SCKQ.mjs";
11
+ } from "../../chunk-WH2VNZE7.mjs";
13
12
  import "../../chunk-FG25JHDX.mjs";
14
13
  import "../../chunk-QGNLMN6Z.mjs";
14
+ import "../../chunk-UC57SCKQ.mjs";
15
15
  import "../../chunk-TBTA7A2P.mjs";
16
16
  import "../../chunk-67XECGMJ.mjs";
17
17
  import "../../chunk-Z6EYX4D3.mjs";
18
- import "../../chunk-5XJJKYXE.mjs";
19
- import "../../chunk-U7CKUUO7.mjs";
18
+ import "../../chunk-LEPGLH7Q.mjs";
20
19
  import "../../chunk-RC5NN5UF.mjs";
21
20
  import "../../chunk-W7NJUABI.mjs";
22
21
  import "../../chunk-VRA5HP7F.mjs";
23
- import "../../chunk-3QQCDR3E.mjs";
22
+ import "../../chunk-VBZHAPK7.mjs";
24
23
  import "../../chunk-LRHWT4JU.mjs";
25
24
  import "../../chunk-CPOSU35L.mjs";
25
+ import "../../chunk-U7CKUUO7.mjs";
26
26
  import "../../chunk-B5T7AQLH.mjs";
27
27
  import {
28
28
  __async,
@@ -1,7 +1,10 @@
1
- import { I as InternalApiClient, S as StablecoinToken, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.mjs';
1
+ import { I as InternalApiClient, B as BlindpayApiResponse, S as StablecoinToken, N as Network } from '../../api-client-B7VQkM_4.mjs';
2
2
 
3
+ type BankingPartner = "jpmorgan" | "citi";
3
4
  type VirtualAccount = {
4
5
  id: string;
6
+ banking_partner: BankingPartner;
7
+ kyc_status: string;
5
8
  us: {
6
9
  ach: {
7
10
  routing_number: string;
@@ -30,24 +33,36 @@ type VirtualAccount = {
30
33
  };
31
34
  token: StablecoinToken;
32
35
  blockchain_wallet_id: string;
36
+ blockchain_wallet: {
37
+ network: Network;
38
+ address: string;
39
+ } | null;
33
40
  };
41
+ type ListVirtualAccountsInput = string;
42
+ type ListVirtualAccountsResponse = VirtualAccount[];
34
43
  type CreateVirtualAccountInput = {
35
44
  receiver_id: string;
36
- blockchain_wallet_id: string;
45
+ banking_partner: BankingPartner;
37
46
  token: StablecoinToken;
47
+ blockchain_wallet_id: string;
38
48
  };
39
49
  type CreateVirtualAccountResponse = VirtualAccount;
40
- type GetVirtualAccountInput = string;
50
+ type GetVirtualAccountInput = {
51
+ receiver_id: string;
52
+ id: string;
53
+ };
41
54
  type GetVirtualAccountResponse = VirtualAccount;
42
55
  type UpdateVirtualAccountInput = {
43
56
  receiver_id: string;
44
- blockchain_wallet_id: string;
57
+ id: string;
45
58
  token: StablecoinToken;
59
+ blockchain_wallet_id: string;
46
60
  };
47
61
  declare function createVirtualAccountsResource(instanceId: string, client: InternalApiClient): {
48
- update({ receiver_id, ...data }: UpdateVirtualAccountInput): Promise<BlindpayApiResponse<void>>;
62
+ list(receiver_id: ListVirtualAccountsInput): Promise<BlindpayApiResponse<ListVirtualAccountsResponse>>;
63
+ get({ receiver_id, id, }: GetVirtualAccountInput): Promise<BlindpayApiResponse<GetVirtualAccountResponse>>;
49
64
  create({ receiver_id, ...data }: CreateVirtualAccountInput): Promise<BlindpayApiResponse<CreateVirtualAccountResponse>>;
50
- get(receiver_id: GetVirtualAccountInput): Promise<BlindpayApiResponse<GetVirtualAccountResponse>>;
65
+ update({ receiver_id, id, ...data }: UpdateVirtualAccountInput): Promise<BlindpayApiResponse<void>>;
51
66
  };
52
67
 
53
- export { type CreateVirtualAccountInput, type CreateVirtualAccountResponse, type GetVirtualAccountInput, type GetVirtualAccountResponse, type UpdateVirtualAccountInput, type VirtualAccount, createVirtualAccountsResource };
68
+ export { type BankingPartner, type CreateVirtualAccountInput, type CreateVirtualAccountResponse, type GetVirtualAccountInput, type GetVirtualAccountResponse, type ListVirtualAccountsInput, type ListVirtualAccountsResponse, type UpdateVirtualAccountInput, type VirtualAccount, createVirtualAccountsResource };
@@ -1,7 +1,10 @@
1
- import { I as InternalApiClient, S as StablecoinToken, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.js';
1
+ import { I as InternalApiClient, B as BlindpayApiResponse, S as StablecoinToken, N as Network } from '../../api-client-B7VQkM_4.js';
2
2
 
3
+ type BankingPartner = "jpmorgan" | "citi";
3
4
  type VirtualAccount = {
4
5
  id: string;
6
+ banking_partner: BankingPartner;
7
+ kyc_status: string;
5
8
  us: {
6
9
  ach: {
7
10
  routing_number: string;
@@ -30,24 +33,36 @@ type VirtualAccount = {
30
33
  };
31
34
  token: StablecoinToken;
32
35
  blockchain_wallet_id: string;
36
+ blockchain_wallet: {
37
+ network: Network;
38
+ address: string;
39
+ } | null;
33
40
  };
41
+ type ListVirtualAccountsInput = string;
42
+ type ListVirtualAccountsResponse = VirtualAccount[];
34
43
  type CreateVirtualAccountInput = {
35
44
  receiver_id: string;
36
- blockchain_wallet_id: string;
45
+ banking_partner: BankingPartner;
37
46
  token: StablecoinToken;
47
+ blockchain_wallet_id: string;
38
48
  };
39
49
  type CreateVirtualAccountResponse = VirtualAccount;
40
- type GetVirtualAccountInput = string;
50
+ type GetVirtualAccountInput = {
51
+ receiver_id: string;
52
+ id: string;
53
+ };
41
54
  type GetVirtualAccountResponse = VirtualAccount;
42
55
  type UpdateVirtualAccountInput = {
43
56
  receiver_id: string;
44
- blockchain_wallet_id: string;
57
+ id: string;
45
58
  token: StablecoinToken;
59
+ blockchain_wallet_id: string;
46
60
  };
47
61
  declare function createVirtualAccountsResource(instanceId: string, client: InternalApiClient): {
48
- update({ receiver_id, ...data }: UpdateVirtualAccountInput): Promise<BlindpayApiResponse<void>>;
62
+ list(receiver_id: ListVirtualAccountsInput): Promise<BlindpayApiResponse<ListVirtualAccountsResponse>>;
63
+ get({ receiver_id, id, }: GetVirtualAccountInput): Promise<BlindpayApiResponse<GetVirtualAccountResponse>>;
49
64
  create({ receiver_id, ...data }: CreateVirtualAccountInput): Promise<BlindpayApiResponse<CreateVirtualAccountResponse>>;
50
- get(receiver_id: GetVirtualAccountInput): Promise<BlindpayApiResponse<GetVirtualAccountResponse>>;
65
+ update({ receiver_id, id, ...data }: UpdateVirtualAccountInput): Promise<BlindpayApiResponse<void>>;
51
66
  };
52
67
 
53
- export { type CreateVirtualAccountInput, type CreateVirtualAccountResponse, type GetVirtualAccountInput, type GetVirtualAccountResponse, type UpdateVirtualAccountInput, type VirtualAccount, createVirtualAccountsResource };
68
+ export { type BankingPartner, type CreateVirtualAccountInput, type CreateVirtualAccountResponse, type GetVirtualAccountInput, type GetVirtualAccountResponse, type ListVirtualAccountsInput, type ListVirtualAccountsResponse, type UpdateVirtualAccountInput, type VirtualAccount, createVirtualAccountsResource };
@@ -39,30 +39,40 @@ __export(virtual_accounts_exports, {
39
39
  module.exports = __toCommonJS(virtual_accounts_exports);
40
40
  function createVirtualAccountsResource(instanceId, client) {
41
41
  return {
42
- update(_a) {
42
+ list(receiver_id) {
43
+ return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
44
+ },
45
+ get({
46
+ receiver_id,
47
+ id
48
+ }) {
49
+ return client.get(
50
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`
51
+ );
52
+ },
53
+ create(_a) {
43
54
  var _b = _a, {
44
55
  receiver_id
45
56
  } = _b, data = __objRest(_b, [
46
57
  "receiver_id"
47
58
  ]);
48
- return client.put(
59
+ return client.post(
49
60
  `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
50
61
  data
51
62
  );
52
63
  },
53
- create(_c) {
64
+ update(_c) {
54
65
  var _d = _c, {
55
- receiver_id
66
+ receiver_id,
67
+ id
56
68
  } = _d, data = __objRest(_d, [
57
- "receiver_id"
69
+ "receiver_id",
70
+ "id"
58
71
  ]);
59
- return client.post(
60
- `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`,
72
+ return client.put(
73
+ `/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts/${id}`,
61
74
  data
62
75
  );
63
- },
64
- get(receiver_id) {
65
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}/virtual-accounts`);
66
76
  }
67
77
  };
68
78
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createVirtualAccountsResource,
3
3
  init_virtual_accounts
4
- } from "../../chunk-5XJJKYXE.mjs";
4
+ } from "../../chunk-LEPGLH7Q.mjs";
5
5
  import "../../chunk-OBKEW4AQ.mjs";
6
6
  init_virtual_accounts();
7
7
  export {