@blindpay/node 2.0.3 → 2.1.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 (40) hide show
  1. package/dist/{chunk-E6ALTWR5.mjs → chunk-67XECGMJ.mjs} +14 -0
  2. package/dist/{chunk-GCCHFONX.mjs → chunk-D6N3USMR.mjs} +752 -764
  3. package/dist/{chunk-2QAVOGLK.mjs → chunk-YP536RWJ.mjs} +10 -10
  4. package/dist/index.d.mts +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +15 -1
  7. package/dist/index.mjs +10 -10
  8. package/dist/resources/api-keys/api-keys.test.js +785 -783
  9. package/dist/resources/api-keys/api-keys.test.mjs +5 -5
  10. package/dist/resources/available/available.test.js +785 -783
  11. package/dist/resources/available/available.test.mjs +5 -5
  12. package/dist/resources/bank-accounts/bank-accounts.test.js +785 -783
  13. package/dist/resources/bank-accounts/bank-accounts.test.mjs +5 -5
  14. package/dist/resources/instances/instances.test.js +785 -783
  15. package/dist/resources/instances/instances.test.mjs +5 -5
  16. package/dist/resources/partner-fees/partner-fees.test.js +785 -783
  17. package/dist/resources/partner-fees/partner-fees.test.mjs +5 -5
  18. package/dist/resources/payins/payins-quotes.test.js +785 -783
  19. package/dist/resources/payins/payins-quotes.test.mjs +5 -5
  20. package/dist/resources/payins/payins.test.js +785 -783
  21. package/dist/resources/payins/payins.test.mjs +5 -5
  22. package/dist/resources/payouts/payouts.test.js +785 -783
  23. package/dist/resources/payouts/payouts.test.mjs +5 -5
  24. package/dist/resources/quotes/quotes.test.js +785 -783
  25. package/dist/resources/quotes/quotes.test.mjs +5 -5
  26. package/dist/resources/receivers/index.d.mts +33 -2
  27. package/dist/resources/receivers/index.d.ts +33 -2
  28. package/dist/resources/receivers/index.js +14 -0
  29. package/dist/resources/receivers/index.mjs +1 -1
  30. package/dist/resources/receivers/receivers.test.js +844 -783
  31. package/dist/resources/receivers/receivers.test.mjs +64 -5
  32. package/dist/resources/virtual-accounts/virtual-accounts.test.js +785 -783
  33. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +5 -5
  34. package/dist/resources/wallets/blockchain.test.js +785 -783
  35. package/dist/resources/wallets/blockchain.test.mjs +5 -5
  36. package/dist/resources/wallets/offramp.test.js +785 -783
  37. package/dist/resources/wallets/offramp.test.mjs +5 -5
  38. package/dist/resources/webhooks/webhooks.test.js +785 -783
  39. package/dist/resources/webhooks/webhooks.test.mjs +5 -5
  40. package/package.json +1 -1
@@ -4,24 +4,24 @@ import {
4
4
  globalExpect,
5
5
  init_dist,
6
6
  it
7
- } from "../../chunk-GCCHFONX.mjs";
7
+ } from "../../chunk-D6N3USMR.mjs";
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-2QAVOGLK.mjs";
11
+ } from "../../chunk-YP536RWJ.mjs";
12
12
  import "../../chunk-IZYPRCCV.mjs";
13
13
  import "../../chunk-QGNLMN6Z.mjs";
14
+ import "../../chunk-UC57SCKQ.mjs";
14
15
  import "../../chunk-TBTA7A2P.mjs";
15
- import "../../chunk-E6ALTWR5.mjs";
16
+ import "../../chunk-67XECGMJ.mjs";
16
17
  import "../../chunk-5XJJKYXE.mjs";
17
- import "../../chunk-UC57SCKQ.mjs";
18
18
  import "../../chunk-RC5NN5UF.mjs";
19
19
  import "../../chunk-W7NJUABI.mjs";
20
20
  import "../../chunk-E7M4CJKR.mjs";
21
21
  import "../../chunk-3QQCDR3E.mjs";
22
22
  import "../../chunk-LRHWT4JU.mjs";
23
- import "../../chunk-QHMIK7U3.mjs";
24
23
  import "../../chunk-CPOSU35L.mjs";
24
+ import "../../chunk-QHMIK7U3.mjs";
25
25
  import "../../chunk-B5T7AQLH.mjs";
26
26
  import {
27
27
  __async,
@@ -219,6 +219,7 @@ var require_receivers_test = __commonJS({
219
219
  id_doc_country: "BR",
220
220
  id_doc_type: "PASSPORT",
221
221
  id_doc_front_file: "https://example.com/image.png",
222
+ id_doc_back_file: "https://example.com/image.png",
222
223
  proof_of_address_doc_type: "UTILITY_BILL",
223
224
  proof_of_address_doc_file: "https://example.com/image.png",
224
225
  tos_id: "to_tPiz4bM2nh5K"
@@ -249,11 +250,13 @@ var require_receivers_test = __commonJS({
249
250
  id_doc_country: "BR",
250
251
  id_doc_type: "PASSPORT",
251
252
  id_doc_front_file: "https://example.com/image.png",
253
+ id_doc_back_file: "https://example.com/image.png",
252
254
  proof_of_address_doc_type: "UTILITY_BILL",
253
255
  proof_of_address_doc_file: "https://example.com/image.png",
254
256
  individual_holding_doc_front_file: "https://example.com/image.png",
255
257
  purpose_of_transactions: "personal_or_living_expenses",
256
258
  source_of_funds_doc_type: "savings",
259
+ purpose_of_transactions_explanation: "I am receiving salary payments from my employer",
257
260
  source_of_funds_doc_file: "https://example.com/image.png",
258
261
  tos_id: "to_3ZZhllJkvo5Z"
259
262
  });
@@ -469,6 +472,62 @@ var require_receivers_test = __commonJS({
469
472
  globalExpect(data).toEqual(mockedReceiverLimits);
470
473
  }));
471
474
  });
475
+ describe("Get limit increase requests", () => {
476
+ it("should get limit increase requests for a receiver", () => __async(null, null, function* () {
477
+ const mockedLimitIncreaseRequests = [
478
+ {
479
+ id: "rl_000000000000",
480
+ receiver_id: "re_YuaMcI2B8zbQ",
481
+ status: "in_review",
482
+ daily: 5e4,
483
+ monthly: 25e4,
484
+ per_transaction: 25e3,
485
+ supporting_document_file: "https://example.com/bank-statement.pdf",
486
+ supporting_document_type: "individual_bank_statement",
487
+ created_at: "2025-01-15T10:30:00.000Z",
488
+ updated_at: "2025-01-15T10:30:00.000Z"
489
+ },
490
+ {
491
+ id: "rl_000000000000",
492
+ receiver_id: "re_YuaMcI2B8zbQ",
493
+ status: "approved",
494
+ daily: 3e4,
495
+ monthly: 15e4,
496
+ per_transaction: 15e3,
497
+ supporting_document_file: "https://example.com/proof-of-income.pdf",
498
+ supporting_document_type: "individual_proof_of_income",
499
+ created_at: "2024-12-10T14:20:00.000Z",
500
+ updated_at: "2024-12-12T09:45:00.000Z"
501
+ }
502
+ ];
503
+ fetchMock.mockResponseOnce(JSON.stringify(mockedLimitIncreaseRequests), {
504
+ headers: { "Content-Type": "application/json" }
505
+ });
506
+ const { data, error } = yield blindpay.receivers.getLimitIncreaseRequests("re_YuaMcI2B8zbQ");
507
+ globalExpect(error).toBeNull();
508
+ globalExpect(data).toEqual(mockedLimitIncreaseRequests);
509
+ }));
510
+ });
511
+ describe("Request limit increase", () => {
512
+ it("should request a limit increase for a receiver", () => __async(null, null, function* () {
513
+ const mockedResponse = {
514
+ id: "rl_000000000000"
515
+ };
516
+ fetchMock.mockResponseOnce(JSON.stringify(mockedResponse), {
517
+ headers: { "Content-Type": "application/json" }
518
+ });
519
+ const { data, error } = yield blindpay.receivers.requestLimitIncrease({
520
+ receiver_id: "re_YuaMcI2B8zbQ",
521
+ daily: 1e5,
522
+ monthly: 5e5,
523
+ per_transaction: 5e4,
524
+ supporting_document_file: "https://example.com/tax-return.pdf",
525
+ supporting_document_type: "individual_tax_return"
526
+ });
527
+ globalExpect(error).toBeNull();
528
+ globalExpect(data).toEqual(mockedResponse);
529
+ }));
530
+ });
472
531
  });
473
532
  }
474
533
  });