@blindpay/node 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +1 -1
  2. package/dist/api-client-Cu0yYexQ.d.ts +16 -0
  3. package/dist/api-client-DV5jG52T.d.mts +16 -0
  4. package/dist/chunk-ALHMJWQN.mjs +21 -0
  5. package/dist/{chunk-VOB7TMKL.mjs → chunk-F5Z45GCA.mjs} +8 -0
  6. package/dist/chunk-ISHZTBAN.mjs +39 -0
  7. package/dist/{chunk-AFXWEXL6.mjs → chunk-JOHWDSDM.mjs} +44 -20
  8. package/dist/chunk-KMU6V4LW.mjs +50 -0
  9. package/dist/chunk-UDRMLZWT.mjs +53 -0
  10. package/dist/{chunk-CPOSU35L.mjs → chunk-UOAM7SX3.mjs} +43 -25
  11. package/dist/{chunk-U7CKUUO7.mjs → chunk-WE73MTQL.mjs} +3 -0
  12. package/dist/{chunk-67XECGMJ.mjs → chunk-YIZJM2GU.mjs} +4 -3
  13. package/dist/{api-client-CIPV5zmo.d.mts → index.d-yOiKSwHO.d.mts} +6 -19
  14. package/dist/{api-client-CIPV5zmo.d.ts → index.d-yOiKSwHO.d.ts} +6 -19
  15. package/dist/index.d.mts +19 -6
  16. package/dist/index.d.ts +19 -6
  17. package/dist/index.js +183 -30
  18. package/dist/index.mjs +43 -19
  19. package/dist/resources/api-keys/api-keys.test.js +175 -30
  20. package/dist/resources/api-keys/api-keys.test.mjs +12 -8
  21. package/dist/resources/api-keys/index.d.mts +2 -1
  22. package/dist/resources/api-keys/index.d.ts +2 -1
  23. package/dist/resources/available/available.test.js +199 -30
  24. package/dist/resources/available/available.test.mjs +36 -8
  25. package/dist/resources/available/index.d.mts +8 -2
  26. package/dist/resources/available/index.d.ts +8 -2
  27. package/dist/resources/available/index.js +3 -0
  28. package/dist/resources/available/index.mjs +1 -1
  29. package/dist/resources/bank-accounts/bank-accounts.test.js +230 -32
  30. package/dist/resources/bank-accounts/bank-accounts.test.mjs +67 -10
  31. package/dist/resources/bank-accounts/index.d.mts +83 -9
  32. package/dist/resources/bank-accounts/index.d.ts +83 -9
  33. package/dist/resources/bank-accounts/index.js +43 -25
  34. package/dist/resources/bank-accounts/index.mjs +1 -1
  35. package/dist/resources/fees/fees.test.d.mts +2 -0
  36. package/dist/resources/fees/fees.test.d.ts +2 -0
  37. package/dist/resources/fees/fees.test.js +19845 -0
  38. package/dist/resources/fees/fees.test.mjs +85 -0
  39. package/dist/resources/fees/index.d.mts +36 -0
  40. package/dist/resources/fees/index.d.ts +36 -0
  41. package/dist/resources/fees/index.js +36 -0
  42. package/dist/resources/fees/index.mjs +9 -0
  43. package/dist/resources/instances/index.d.mts +2 -1
  44. package/dist/resources/instances/index.d.ts +2 -1
  45. package/dist/resources/instances/instances.test.js +175 -30
  46. package/dist/resources/instances/instances.test.mjs +12 -8
  47. package/dist/resources/partner-fees/index.d.mts +2 -1
  48. package/dist/resources/partner-fees/index.d.ts +2 -1
  49. package/dist/resources/partner-fees/partner-fees.test.js +175 -30
  50. package/dist/resources/partner-fees/partner-fees.test.mjs +12 -8
  51. package/dist/resources/payins/index.d.mts +2 -1
  52. package/dist/resources/payins/index.d.ts +2 -1
  53. package/dist/resources/payins/payins-quotes.test.js +175 -30
  54. package/dist/resources/payins/payins-quotes.test.mjs +12 -8
  55. package/dist/resources/payins/payins.test.js +175 -30
  56. package/dist/resources/payins/payins.test.mjs +12 -8
  57. package/dist/resources/payins/quotes.d.mts +2 -1
  58. package/dist/resources/payins/quotes.d.ts +2 -1
  59. package/dist/resources/payouts/index.d.mts +15 -3
  60. package/dist/resources/payouts/index.d.ts +15 -3
  61. package/dist/resources/payouts/index.js +8 -0
  62. package/dist/resources/payouts/index.mjs +1 -1
  63. package/dist/resources/payouts/payouts.test.js +194 -30
  64. package/dist/resources/payouts/payouts.test.mjs +31 -8
  65. package/dist/resources/quotes/index.d.mts +2 -1
  66. package/dist/resources/quotes/index.d.ts +2 -1
  67. package/dist/resources/quotes/quotes.test.js +175 -30
  68. package/dist/resources/quotes/quotes.test.mjs +12 -8
  69. package/dist/resources/receivers/index.d.mts +16 -4
  70. package/dist/resources/receivers/index.d.ts +16 -4
  71. package/dist/resources/receivers/index.js +4 -3
  72. package/dist/resources/receivers/index.mjs +1 -1
  73. package/dist/resources/receivers/receivers.test.js +331 -179
  74. package/dist/resources/receivers/receivers.test.mjs +168 -157
  75. package/dist/resources/terms-of-service/index.d.mts +2 -1
  76. package/dist/resources/terms-of-service/index.d.ts +2 -1
  77. package/dist/resources/terms-of-service/terms-of-service.test.js +175 -30
  78. package/dist/resources/terms-of-service/terms-of-service.test.mjs +12 -8
  79. package/dist/resources/transfers/index.d.mts +94 -0
  80. package/dist/resources/transfers/index.d.ts +94 -0
  81. package/dist/resources/transfers/index.js +67 -0
  82. package/dist/resources/transfers/index.mjs +9 -0
  83. package/dist/resources/transfers/transfers.test.d.mts +2 -0
  84. package/dist/resources/transfers/transfers.test.d.ts +2 -0
  85. package/dist/resources/transfers/transfers.test.js +19931 -0
  86. package/dist/resources/transfers/transfers.test.mjs +171 -0
  87. package/dist/resources/upload/index.d.mts +16 -0
  88. package/dist/resources/upload/index.d.ts +16 -0
  89. package/dist/resources/upload/index.js +100 -0
  90. package/dist/resources/upload/index.mjs +9 -0
  91. package/dist/resources/upload/upload.test.d.mts +2 -0
  92. package/dist/resources/upload/upload.test.d.ts +2 -0
  93. package/dist/resources/upload/upload.test.js +19840 -0
  94. package/dist/resources/upload/upload.test.mjs +80 -0
  95. package/dist/resources/virtual-accounts/index.d.mts +2 -1
  96. package/dist/resources/virtual-accounts/index.d.ts +2 -1
  97. package/dist/resources/virtual-accounts/virtual-accounts.test.js +175 -30
  98. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +12 -8
  99. package/dist/resources/wallets/blockchain.d.mts +2 -1
  100. package/dist/resources/wallets/blockchain.d.ts +2 -1
  101. package/dist/resources/wallets/blockchain.test.js +175 -30
  102. package/dist/resources/wallets/blockchain.test.mjs +12 -8
  103. package/dist/resources/wallets/custodial.d.mts +55 -0
  104. package/dist/resources/wallets/custodial.d.ts +55 -0
  105. package/dist/resources/wallets/custodial.js +78 -0
  106. package/dist/resources/wallets/custodial.mjs +9 -0
  107. package/dist/resources/wallets/custodial.test.d.mts +2 -0
  108. package/dist/resources/wallets/custodial.test.d.ts +2 -0
  109. package/dist/resources/wallets/custodial.test.js +19901 -0
  110. package/dist/resources/wallets/custodial.test.mjs +141 -0
  111. package/dist/resources/wallets/offramp.d.mts +2 -1
  112. package/dist/resources/wallets/offramp.d.ts +2 -1
  113. package/dist/resources/wallets/offramp.test.js +175 -30
  114. package/dist/resources/wallets/offramp.test.mjs +12 -8
  115. package/dist/resources/webhooks/index.d.mts +3 -2
  116. package/dist/resources/webhooks/index.d.ts +3 -2
  117. package/dist/resources/webhooks/webhooks.test.js +175 -30
  118. package/dist/resources/webhooks/webhooks.test.mjs +12 -8
  119. package/package.json +2 -2
@@ -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.2.0";
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(receiver_id) {
18753
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}/bank-accounts`);
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(_a3) {
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: "transfers_bitso"
18786
+ type: "pix"
18786
18787
  }, data));
18787
18788
  },
18788
- createSpei(_e) {
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: "spei_bitso"
18796
+ type: "pix_safe"
18796
18797
  }, data));
18797
18798
  },
18798
- createColombiaAch(_g) {
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: "ach_cop_bitso"
18806
+ type: "transfers_bitso"
18806
18807
  }, data));
18807
18808
  },
18808
- createAch(_i) {
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: "ach"
18816
+ type: "spei_bitso"
18816
18817
  }, data));
18817
18818
  },
18818
- createWire(_k) {
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: "wire"
18826
+ type: "ach_cop_bitso"
18826
18827
  }, data));
18827
18828
  },
18828
- createInternationalSwift(_m) {
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: "international_swift"
18836
+ type: "ach"
18836
18837
  }, data));
18837
18838
  },
18838
- createRtp(_o) {
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
- return client.get(`/instances/${instanceId}/receivers`);
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.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
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) {
@@ -19487,6 +19632,7 @@ describe("Bank accounts", () => {
19487
19632
  account_number: "1001001234",
19488
19633
  account_type: "checking",
19489
19634
  account_class: "individual",
19635
+ recipient_relationship: "first_party",
19490
19636
  address_line_1: null,
19491
19637
  address_line_2: null,
19492
19638
  city: null,
@@ -19512,7 +19658,13 @@ describe("Bank accounts", () => {
19512
19658
  account_number: "1001001234",
19513
19659
  account_type: "checking",
19514
19660
  beneficiary_name: "Individual full name or business name",
19515
- routing_number: "012345678"
19661
+ routing_number: "012345678",
19662
+ recipient_relationship: "first_party",
19663
+ address_line_1: "123 Main St",
19664
+ city: "New York",
19665
+ state_province_region: "NY",
19666
+ country: "US",
19667
+ postal_code: "10001"
19516
19668
  });
19517
19669
  globalExpect(error).toBeNull();
19518
19670
  globalExpect(data).toEqual(mockedAchAccount);
@@ -19527,6 +19679,8 @@ describe("Bank accounts", () => {
19527
19679
  beneficiary_name: "Individual full name or business name",
19528
19680
  routing_number: "012345678",
19529
19681
  account_number: "1001001234",
19682
+ account_class: "individual",
19683
+ recipient_relationship: "first_party",
19530
19684
  address_line_1: "Address line 1",
19531
19685
  address_line_2: "Address line 2",
19532
19686
  city: "City",
@@ -19541,9 +19695,11 @@ describe("Bank accounts", () => {
19541
19695
  const { data, error } = yield blindpay.receivers.bankAccounts.createWire({
19542
19696
  receiver_id: "re_000000000000",
19543
19697
  name: "Wire Account",
19698
+ account_class: "individual",
19544
19699
  account_number: "1001001234",
19545
19700
  beneficiary_name: "Individual full name or business name",
19546
19701
  routing_number: "012345678",
19702
+ recipient_relationship: "first_party",
19547
19703
  address_line_1: "Address line 1",
19548
19704
  address_line_2: "Address line 2",
19549
19705
  city: "City",
@@ -19562,6 +19718,8 @@ describe("Bank accounts", () => {
19562
19718
  type: "international_swift",
19563
19719
  name: "International Swift Account",
19564
19720
  beneficiary_name: null,
19721
+ account_class: "individual",
19722
+ recipient_relationship: "first_party",
19565
19723
  address_line_1: null,
19566
19724
  address_line_2: null,
19567
19725
  city: null,
@@ -19588,6 +19746,7 @@ describe("Bank accounts", () => {
19588
19746
  swift_intermediary_bank_account_number_iban: null,
19589
19747
  swift_intermediary_bank_name: null,
19590
19748
  swift_intermediary_bank_country: null,
19749
+ swift_payment_code: null,
19591
19750
  created_at: "2021-01-01T00:00:00Z"
19592
19751
  };
19593
19752
  fetchMock.mockResponseOnce(JSON.stringify(mockedInternationalSwiftAccount), {
@@ -19596,6 +19755,8 @@ describe("Bank accounts", () => {
19596
19755
  const { data, error } = yield blindpay.receivers.bankAccounts.createInternationalSwift({
19597
19756
  receiver_id: "re_000000000000",
19598
19757
  name: "International Swift Account",
19758
+ account_class: "individual",
19759
+ recipient_relationship: "first_party",
19599
19760
  swift_account_holder_name: "John Doe",
19600
19761
  swift_account_number_iban: "123456789",
19601
19762
  swift_bank_address_line_1: "123 Main Street, Suite 100, Downtown District, City Center CP 12345",
@@ -19628,6 +19789,8 @@ describe("Bank accounts", () => {
19628
19789
  beneficiary_name: "John Doe",
19629
19790
  routing_number: "121000358",
19630
19791
  account_number: "325203027578",
19792
+ account_class: "individual",
19793
+ recipient_relationship: "first_party",
19631
19794
  address_line_1: "Street of the fools",
19632
19795
  address_line_2: null,
19633
19796
  city: "Fools City",
@@ -19642,9 +19805,11 @@ describe("Bank accounts", () => {
19642
19805
  const { data, error } = yield blindpay.receivers.bankAccounts.createRtp({
19643
19806
  receiver_id: "re_000000000000",
19644
19807
  name: "John Doe RTP",
19808
+ account_class: "individual",
19645
19809
  beneficiary_name: "John Doe",
19646
19810
  routing_number: "121000358",
19647
19811
  account_number: "325203027578",
19812
+ recipient_relationship: "first_party",
19648
19813
  address_line_1: "Street of the fools",
19649
19814
  city: "Fools City",
19650
19815
  state_province_region: "FL",
@@ -19750,11 +19915,44 @@ describe("Bank accounts", () => {
19750
19915
  fetchMock.mockResponseOnce(JSON.stringify(mockedBankAccounts), {
19751
19916
  headers: { "Content-Type": "application/json" }
19752
19917
  });
19753
- const { data, error } = yield blindpay.receivers.bankAccounts.list("re_000000000000");
19918
+ const { data, error } = yield blindpay.receivers.bankAccounts.list({
19919
+ receiver_id: "re_000000000000"
19920
+ });
19754
19921
  globalExpect(error).toBeNull();
19755
19922
  globalExpect(data).toEqual(mockedBankAccounts);
19756
19923
  }));
19757
19924
  });
19925
+ describe("Create pix safe bank account", () => {
19926
+ it("should create a pix safe bank account", () => __async(null, null, function* () {
19927
+ const mockedPixSafeAccount = {
19928
+ id: "ba_000000000000",
19929
+ type: "pix_safe",
19930
+ name: "PIX Safe Account",
19931
+ beneficiary_name: "Maria Silva",
19932
+ account_number: "123456789",
19933
+ account_type: "checking",
19934
+ pix_safe_bank_code: "001",
19935
+ pix_safe_branch_code: "0001",
19936
+ pix_safe_cpf_cnpj: "12345678901",
19937
+ created_at: "2021-01-01T00:00:00Z"
19938
+ };
19939
+ fetchMock.mockResponseOnce(JSON.stringify(mockedPixSafeAccount), {
19940
+ headers: { "Content-Type": "application/json" }
19941
+ });
19942
+ const { data, error } = yield blindpay.receivers.bankAccounts.createPixSafe({
19943
+ receiver_id: "re_000000000000",
19944
+ name: "PIX Safe Account",
19945
+ beneficiary_name: "Maria Silva",
19946
+ account_number: "123456789",
19947
+ account_type: "checking",
19948
+ pix_safe_bank_code: "001",
19949
+ pix_safe_branch_code: "0001",
19950
+ pix_safe_cpf_cnpj: "12345678901"
19951
+ });
19952
+ globalExpect(error).toBeNull();
19953
+ globalExpect(data).toEqual(mockedPixSafeAccount);
19954
+ }));
19955
+ });
19758
19956
  describe("Delete bank account", () => {
19759
19957
  it("should delete a bank account", () => __async(null, null, function* () {
19760
19958
  fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
@@ -8,22 +8,26 @@ import {
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-AFXWEXL6.mjs";
11
+ } from "../../chunk-JOHWDSDM.mjs";
12
12
  import "../../chunk-FG25JHDX.mjs";
13
+ import "../../chunk-KMU6V4LW.mjs";
13
14
  import "../../chunk-QGNLMN6Z.mjs";
14
15
  import "../../chunk-UC57SCKQ.mjs";
16
+ import "../../chunk-ISHZTBAN.mjs";
17
+ import "../../chunk-UDRMLZWT.mjs";
18
+ import "../../chunk-LEPGLH7Q.mjs";
19
+ import "../../chunk-E7M4CJKR.mjs";
20
+ import "../../chunk-F5Z45GCA.mjs";
15
21
  import "../../chunk-TBTA7A2P.mjs";
16
- import "../../chunk-67XECGMJ.mjs";
22
+ import "../../chunk-YIZJM2GU.mjs";
17
23
  import "../../chunk-Z6EYX4D3.mjs";
18
- import "../../chunk-LEPGLH7Q.mjs";
24
+ import "../../chunk-ALHMJWQN.mjs";
25
+ import "../../chunk-B5T7AQLH.mjs";
19
26
  import "../../chunk-RC5NN5UF.mjs";
20
27
  import "../../chunk-VGU72ZNI.mjs";
21
- import "../../chunk-E7M4CJKR.mjs";
22
- import "../../chunk-VOB7TMKL.mjs";
23
28
  import "../../chunk-LRHWT4JU.mjs";
24
- import "../../chunk-U7CKUUO7.mjs";
25
- import "../../chunk-CPOSU35L.mjs";
26
- import "../../chunk-B5T7AQLH.mjs";
29
+ import "../../chunk-WE73MTQL.mjs";
30
+ import "../../chunk-UOAM7SX3.mjs";
27
31
  import {
28
32
  __async,
29
33
  __commonJS
@@ -156,6 +160,7 @@ var require_bank_accounts_test = __commonJS({
156
160
  account_number: "1001001234",
157
161
  account_type: "checking",
158
162
  account_class: "individual",
163
+ recipient_relationship: "first_party",
159
164
  address_line_1: null,
160
165
  address_line_2: null,
161
166
  city: null,
@@ -181,7 +186,13 @@ var require_bank_accounts_test = __commonJS({
181
186
  account_number: "1001001234",
182
187
  account_type: "checking",
183
188
  beneficiary_name: "Individual full name or business name",
184
- routing_number: "012345678"
189
+ routing_number: "012345678",
190
+ recipient_relationship: "first_party",
191
+ address_line_1: "123 Main St",
192
+ city: "New York",
193
+ state_province_region: "NY",
194
+ country: "US",
195
+ postal_code: "10001"
185
196
  });
186
197
  globalExpect(error).toBeNull();
187
198
  globalExpect(data).toEqual(mockedAchAccount);
@@ -196,6 +207,8 @@ var require_bank_accounts_test = __commonJS({
196
207
  beneficiary_name: "Individual full name or business name",
197
208
  routing_number: "012345678",
198
209
  account_number: "1001001234",
210
+ account_class: "individual",
211
+ recipient_relationship: "first_party",
199
212
  address_line_1: "Address line 1",
200
213
  address_line_2: "Address line 2",
201
214
  city: "City",
@@ -210,9 +223,11 @@ var require_bank_accounts_test = __commonJS({
210
223
  const { data, error } = yield blindpay.receivers.bankAccounts.createWire({
211
224
  receiver_id: "re_000000000000",
212
225
  name: "Wire Account",
226
+ account_class: "individual",
213
227
  account_number: "1001001234",
214
228
  beneficiary_name: "Individual full name or business name",
215
229
  routing_number: "012345678",
230
+ recipient_relationship: "first_party",
216
231
  address_line_1: "Address line 1",
217
232
  address_line_2: "Address line 2",
218
233
  city: "City",
@@ -231,6 +246,8 @@ var require_bank_accounts_test = __commonJS({
231
246
  type: "international_swift",
232
247
  name: "International Swift Account",
233
248
  beneficiary_name: null,
249
+ account_class: "individual",
250
+ recipient_relationship: "first_party",
234
251
  address_line_1: null,
235
252
  address_line_2: null,
236
253
  city: null,
@@ -257,6 +274,7 @@ var require_bank_accounts_test = __commonJS({
257
274
  swift_intermediary_bank_account_number_iban: null,
258
275
  swift_intermediary_bank_name: null,
259
276
  swift_intermediary_bank_country: null,
277
+ swift_payment_code: null,
260
278
  created_at: "2021-01-01T00:00:00Z"
261
279
  };
262
280
  fetchMock.mockResponseOnce(JSON.stringify(mockedInternationalSwiftAccount), {
@@ -265,6 +283,8 @@ var require_bank_accounts_test = __commonJS({
265
283
  const { data, error } = yield blindpay.receivers.bankAccounts.createInternationalSwift({
266
284
  receiver_id: "re_000000000000",
267
285
  name: "International Swift Account",
286
+ account_class: "individual",
287
+ recipient_relationship: "first_party",
268
288
  swift_account_holder_name: "John Doe",
269
289
  swift_account_number_iban: "123456789",
270
290
  swift_bank_address_line_1: "123 Main Street, Suite 100, Downtown District, City Center CP 12345",
@@ -297,6 +317,8 @@ var require_bank_accounts_test = __commonJS({
297
317
  beneficiary_name: "John Doe",
298
318
  routing_number: "121000358",
299
319
  account_number: "325203027578",
320
+ account_class: "individual",
321
+ recipient_relationship: "first_party",
300
322
  address_line_1: "Street of the fools",
301
323
  address_line_2: null,
302
324
  city: "Fools City",
@@ -311,9 +333,11 @@ var require_bank_accounts_test = __commonJS({
311
333
  const { data, error } = yield blindpay.receivers.bankAccounts.createRtp({
312
334
  receiver_id: "re_000000000000",
313
335
  name: "John Doe RTP",
336
+ account_class: "individual",
314
337
  beneficiary_name: "John Doe",
315
338
  routing_number: "121000358",
316
339
  account_number: "325203027578",
340
+ recipient_relationship: "first_party",
317
341
  address_line_1: "Street of the fools",
318
342
  city: "Fools City",
319
343
  state_province_region: "FL",
@@ -419,11 +443,44 @@ var require_bank_accounts_test = __commonJS({
419
443
  fetchMock.mockResponseOnce(JSON.stringify(mockedBankAccounts), {
420
444
  headers: { "Content-Type": "application/json" }
421
445
  });
422
- const { data, error } = yield blindpay.receivers.bankAccounts.list("re_000000000000");
446
+ const { data, error } = yield blindpay.receivers.bankAccounts.list({
447
+ receiver_id: "re_000000000000"
448
+ });
423
449
  globalExpect(error).toBeNull();
424
450
  globalExpect(data).toEqual(mockedBankAccounts);
425
451
  }));
426
452
  });
453
+ describe("Create pix safe bank account", () => {
454
+ it("should create a pix safe bank account", () => __async(null, null, function* () {
455
+ const mockedPixSafeAccount = {
456
+ id: "ba_000000000000",
457
+ type: "pix_safe",
458
+ name: "PIX Safe Account",
459
+ beneficiary_name: "Maria Silva",
460
+ account_number: "123456789",
461
+ account_type: "checking",
462
+ pix_safe_bank_code: "001",
463
+ pix_safe_branch_code: "0001",
464
+ pix_safe_cpf_cnpj: "12345678901",
465
+ created_at: "2021-01-01T00:00:00Z"
466
+ };
467
+ fetchMock.mockResponseOnce(JSON.stringify(mockedPixSafeAccount), {
468
+ headers: { "Content-Type": "application/json" }
469
+ });
470
+ const { data, error } = yield blindpay.receivers.bankAccounts.createPixSafe({
471
+ receiver_id: "re_000000000000",
472
+ name: "PIX Safe Account",
473
+ beneficiary_name: "Maria Silva",
474
+ account_number: "123456789",
475
+ account_type: "checking",
476
+ pix_safe_bank_code: "001",
477
+ pix_safe_branch_code: "0001",
478
+ pix_safe_cpf_cnpj: "12345678901"
479
+ });
480
+ globalExpect(error).toBeNull();
481
+ globalExpect(data).toEqual(mockedPixSafeAccount);
482
+ }));
483
+ });
427
484
  describe("Delete bank account", () => {
428
485
  it("should delete a bank account", () => __async(null, null, function* () {
429
486
  fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {