@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.
Files changed (78) hide show
  1. package/dist/{chunk-7PWF4J3Z.mjs → chunk-ECYZLQUR.mjs} +12 -12
  2. package/dist/{chunk-N4F3FBNB.mjs → chunk-L23IOSI3.mjs} +40 -40
  3. package/dist/chunk-SLKVEQUY.mjs +76 -0
  4. package/dist/{chunk-LEPGLH7Q.mjs → chunk-SWTOSLUI.mjs} +10 -10
  5. package/dist/{chunk-KMU6V4LW.mjs → chunk-TVOMVVOO.mjs} +11 -11
  6. package/dist/{chunk-FG25JHDX.mjs → chunk-VAVDEV6P.mjs} +14 -14
  7. package/dist/{chunk-QGNLMN6Z.mjs → chunk-YHI3J2CL.mjs} +7 -7
  8. package/dist/index.d.mts +4 -4
  9. package/dist/index.d.ts +4 -4
  10. package/dist/index.js +148 -141
  11. package/dist/index.mjs +12 -12
  12. package/dist/resources/api-keys/api-keys.test.js +146 -139
  13. package/dist/resources/api-keys/api-keys.test.mjs +7 -7
  14. package/dist/resources/available/available.test.js +146 -139
  15. package/dist/resources/available/available.test.mjs +7 -7
  16. package/dist/resources/bank-accounts/bank-accounts.test.js +173 -166
  17. package/dist/resources/bank-accounts/bank-accounts.test.mjs +34 -34
  18. package/dist/resources/bank-accounts/index.d.mts +29 -29
  19. package/dist/resources/bank-accounts/index.d.ts +29 -29
  20. package/dist/resources/bank-accounts/index.js +40 -40
  21. package/dist/resources/bank-accounts/index.mjs +1 -1
  22. package/dist/resources/{receivers/receivers.test.js → customers/customers.test.js} +200 -193
  23. package/dist/resources/{receivers/receivers.test.mjs → customers/customers.test.mjs} +64 -64
  24. package/dist/resources/{receivers → customers}/index.d.mts +23 -23
  25. package/dist/resources/{receivers → customers}/index.d.ts +23 -23
  26. package/dist/resources/{receivers → customers}/index.js +32 -25
  27. package/dist/resources/customers/index.mjs +9 -0
  28. package/dist/resources/fees/fees.test.js +146 -139
  29. package/dist/resources/fees/fees.test.mjs +7 -7
  30. package/dist/resources/instances/instances.test.js +146 -139
  31. package/dist/resources/instances/instances.test.mjs +7 -7
  32. package/dist/resources/partner-fees/partner-fees.test.js +146 -139
  33. package/dist/resources/partner-fees/partner-fees.test.mjs +7 -7
  34. package/dist/resources/payins/payins-quotes.test.js +146 -139
  35. package/dist/resources/payins/payins-quotes.test.mjs +7 -7
  36. package/dist/resources/payins/payins.test.js +146 -139
  37. package/dist/resources/payins/payins.test.mjs +7 -7
  38. package/dist/resources/payouts/payouts.test.js +146 -139
  39. package/dist/resources/payouts/payouts.test.mjs +7 -7
  40. package/dist/resources/quotes/quotes.test.js +146 -139
  41. package/dist/resources/quotes/quotes.test.mjs +7 -7
  42. package/dist/resources/terms-of-service/terms-of-service.test.js +146 -139
  43. package/dist/resources/terms-of-service/terms-of-service.test.mjs +7 -7
  44. package/dist/resources/transfers/transfers.test.js +146 -139
  45. package/dist/resources/transfers/transfers.test.mjs +7 -7
  46. package/dist/resources/upload/upload.test.js +146 -139
  47. package/dist/resources/upload/upload.test.mjs +7 -7
  48. package/dist/resources/virtual-accounts/index.d.mts +7 -7
  49. package/dist/resources/virtual-accounts/index.d.ts +7 -7
  50. package/dist/resources/virtual-accounts/index.js +10 -10
  51. package/dist/resources/virtual-accounts/index.mjs +1 -1
  52. package/dist/resources/virtual-accounts/virtual-accounts.test.js +150 -143
  53. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +11 -11
  54. package/dist/resources/wallets/blockchain.d.mts +13 -13
  55. package/dist/resources/wallets/blockchain.d.ts +13 -13
  56. package/dist/resources/wallets/blockchain.js +14 -14
  57. package/dist/resources/wallets/blockchain.mjs +1 -1
  58. package/dist/resources/wallets/blockchain.test.js +154 -147
  59. package/dist/resources/wallets/blockchain.test.mjs +15 -15
  60. package/dist/resources/wallets/custodial.d.mts +9 -9
  61. package/dist/resources/wallets/custodial.d.ts +9 -9
  62. package/dist/resources/wallets/custodial.js +11 -11
  63. package/dist/resources/wallets/custodial.mjs +1 -1
  64. package/dist/resources/wallets/custodial.test.js +150 -143
  65. package/dist/resources/wallets/custodial.test.mjs +11 -11
  66. package/dist/resources/wallets/offramp.d.mts +7 -7
  67. package/dist/resources/wallets/offramp.d.ts +7 -7
  68. package/dist/resources/wallets/offramp.js +7 -7
  69. package/dist/resources/wallets/offramp.mjs +1 -1
  70. package/dist/resources/wallets/offramp.test.js +152 -145
  71. package/dist/resources/wallets/offramp.test.mjs +13 -13
  72. package/dist/resources/webhooks/webhooks.test.js +146 -139
  73. package/dist/resources/webhooks/webhooks.test.mjs +7 -7
  74. package/package.json +1 -1
  75. package/dist/chunk-YIZJM2GU.mjs +0 -69
  76. package/dist/resources/receivers/index.mjs +0 -9
  77. /package/dist/resources/{receivers/receivers.test.d.mts → customers/customers.test.d.mts} +0 -0
  78. /package/dist/resources/{receivers/receivers.test.d.ts → customers/customers.test.d.ts} +0 -0
@@ -8,42 +8,42 @@ import {
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-7PWF4J3Z.mjs";
12
- import "../../chunk-FG25JHDX.mjs";
13
- import "../../chunk-KMU6V4LW.mjs";
14
- import "../../chunk-QGNLMN6Z.mjs";
11
+ } from "../../chunk-ECYZLQUR.mjs";
12
+ import "../../chunk-VAVDEV6P.mjs";
13
+ import "../../chunk-TVOMVVOO.mjs";
14
+ import "../../chunk-YHI3J2CL.mjs";
15
15
  import "../../chunk-UC57SCKQ.mjs";
16
16
  import "../../chunk-ISHZTBAN.mjs";
17
17
  import "../../chunk-UDRMLZWT.mjs";
18
- import "../../chunk-LEPGLH7Q.mjs";
18
+ import "../../chunk-SWTOSLUI.mjs";
19
19
  import "../../chunk-E7M4CJKR.mjs";
20
20
  import "../../chunk-F5Z45GCA.mjs";
21
21
  import "../../chunk-TBTA7A2P.mjs";
22
- import "../../chunk-YIZJM2GU.mjs";
23
22
  import "../../chunk-Z6EYX4D3.mjs";
23
+ import "../../chunk-SLKVEQUY.mjs";
24
24
  import "../../chunk-ALHMJWQN.mjs";
25
25
  import "../../chunk-KYOUR4KX.mjs";
26
26
  import "../../chunk-RC5NN5UF.mjs";
27
27
  import "../../chunk-VGU72ZNI.mjs";
28
28
  import "../../chunk-LRHWT4JU.mjs";
29
29
  import "../../chunk-WE73MTQL.mjs";
30
- import "../../chunk-N4F3FBNB.mjs";
30
+ import "../../chunk-L23IOSI3.mjs";
31
31
  import {
32
32
  __async,
33
33
  __commonJS
34
34
  } from "../../chunk-OBKEW4AQ.mjs";
35
35
 
36
- // src/resources/receivers/receivers.test.ts
37
- var require_receivers_test = __commonJS({
38
- "src/resources/receivers/receivers.test.ts"(exports) {
36
+ // src/resources/customers/customers.test.ts
37
+ var require_customers_test = __commonJS({
38
+ "src/resources/customers/customers.test.ts"(exports) {
39
39
  init_dist();
40
40
  init_client();
41
- describe("Receivers", () => {
41
+ describe("Customers", () => {
42
42
  afterEach(() => fetchMock.resetMocks());
43
43
  const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
44
- describe("List receivers", () => {
45
- it("should list receivers", () => __async(null, null, function* () {
46
- const mockedReceivers = {
44
+ describe("List customers", () => {
45
+ it("should list customers", () => __async(null, null, function* () {
46
+ const mockedCustomers = {
47
47
  data: [
48
48
  {
49
49
  id: "re_Euw7HN4OdxPn",
@@ -203,23 +203,23 @@ var require_receivers_test = __commonJS({
203
203
  prev_page: ""
204
204
  }
205
205
  };
206
- fetchMock.mockResponseOnce(JSON.stringify(mockedReceivers), {
206
+ fetchMock.mockResponseOnce(JSON.stringify(mockedCustomers), {
207
207
  headers: { "Content-Type": "application/json" }
208
208
  });
209
- const { data, error } = yield blindpay.receivers.list();
209
+ const { data, error } = yield blindpay.customers.list();
210
210
  globalExpect(error).toBeNull();
211
- globalExpect(data).toEqual(mockedReceivers);
211
+ globalExpect(data).toEqual(mockedCustomers);
212
212
  }));
213
213
  });
214
- describe("Create receiver", () => {
215
- it("should create an individual receiver with standard KYC", () => __async(null, null, function* () {
216
- const mockedReceiver = {
214
+ describe("Create customer", () => {
215
+ it("should create an individual customer with standard KYC", () => __async(null, null, function* () {
216
+ const mockedCustomer = {
217
217
  id: "re_Euw7HN4OdxPn"
218
218
  };
219
- fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
219
+ fetchMock.mockResponseOnce(JSON.stringify(mockedCustomer), {
220
220
  headers: { "Content-Type": "application/json" }
221
221
  });
222
- const { data, error } = yield blindpay.receivers.createIndividualWithStandardKYC({
222
+ const { data, error } = yield blindpay.customers.createIndividualWithStandardKYC({
223
223
  email: "bernardo.simonassi@gmail.com",
224
224
  country: "BR",
225
225
  tax_id: "12345678900",
@@ -243,14 +243,14 @@ var require_receivers_test = __commonJS({
243
243
  globalExpect(error).toBeNull();
244
244
  globalExpect(data).toEqual({ id: "re_Euw7HN4OdxPn" });
245
245
  }));
246
- it("should create an individual receiver with enhanced KYC", () => __async(null, null, function* () {
247
- const mockedReceiver = {
246
+ it("should create an individual customer with enhanced KYC", () => __async(null, null, function* () {
247
+ const mockedCustomer = {
248
248
  id: "re_YuaMcI2B8zbQ"
249
249
  };
250
- fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
250
+ fetchMock.mockResponseOnce(JSON.stringify(mockedCustomer), {
251
251
  headers: { "Content-Type": "application/json" }
252
252
  });
253
- const { data, error } = yield blindpay.receivers.createIndividualWithEnhancedKYC({
253
+ const { data, error } = yield blindpay.customers.createIndividualWithEnhancedKYC({
254
254
  email: "bernardo.simonassi@gmail.com",
255
255
  country: "BR",
256
256
  tax_id: "12345678900",
@@ -279,14 +279,14 @@ var require_receivers_test = __commonJS({
279
279
  globalExpect(error).toBeNull();
280
280
  globalExpect(data).toEqual({ id: "re_YuaMcI2B8zbQ" });
281
281
  }));
282
- it("should create a business receiver with standard KYB", () => __async(null, null, function* () {
283
- const mockedReceiver = {
282
+ it("should create a business customer with standard KYB", () => __async(null, null, function* () {
283
+ const mockedCustomer = {
284
284
  id: "re_IOxAUL24LG7P"
285
285
  };
286
- fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
286
+ fetchMock.mockResponseOnce(JSON.stringify(mockedCustomer), {
287
287
  headers: { "Content-Type": "application/json" }
288
288
  });
289
- const { data, error } = yield blindpay.receivers.createBusinessWithStandardKYB({
289
+ const { data, error } = yield blindpay.customers.createBusinessWithStandardKYB({
290
290
  email: "contato@empresa.com.br",
291
291
  country: "BR",
292
292
  tax_id: "20096178000195",
@@ -339,9 +339,9 @@ var require_receivers_test = __commonJS({
339
339
  globalExpect(data).toEqual({ id: "re_IOxAUL24LG7P" });
340
340
  }));
341
341
  });
342
- describe("Get receiver", () => {
343
- it("should get a receiver with new fields", () => __async(null, null, function* () {
344
- const mockedReceiver = {
342
+ describe("Get customer", () => {
343
+ it("should get a customer with new fields", () => __async(null, null, function* () {
344
+ const mockedCustomer = {
345
345
  id: "re_YuaMcI2B8zbQ",
346
346
  is_tos_accepted: true,
347
347
  type: "individual",
@@ -398,15 +398,15 @@ var require_receivers_test = __commonJS({
398
398
  external_id: "ext_123",
399
399
  is_fbo: false
400
400
  };
401
- fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
401
+ fetchMock.mockResponseOnce(JSON.stringify(mockedCustomer), {
402
402
  headers: { "Content-Type": "application/json" }
403
403
  });
404
- const { data, error } = yield blindpay.receivers.get("re_YuaMcI2B8zbQ");
404
+ const { data, error } = yield blindpay.customers.get("re_YuaMcI2B8zbQ");
405
405
  globalExpect(error).toBeNull();
406
- globalExpect(data).toEqual(mockedReceiver);
406
+ globalExpect(data).toEqual(mockedCustomer);
407
407
  }));
408
- it("should get a receiver", () => __async(null, null, function* () {
409
- const mockedReceiver = {
408
+ it("should get a customer", () => __async(null, null, function* () {
409
+ const mockedCustomer = {
410
410
  id: "re_YuaMcI2B8zbQ",
411
411
  is_tos_accepted: true,
412
412
  type: "individual",
@@ -456,21 +456,21 @@ var require_receivers_test = __commonJS({
456
456
  monthly: 1e6
457
457
  }
458
458
  };
459
- fetchMock.mockResponseOnce(JSON.stringify(mockedReceiver), {
459
+ fetchMock.mockResponseOnce(JSON.stringify(mockedCustomer), {
460
460
  headers: { "Content-Type": "application/json" }
461
461
  });
462
- const { data, error } = yield blindpay.receivers.get("re_YuaMcI2B8zbQ");
462
+ const { data, error } = yield blindpay.customers.get("re_YuaMcI2B8zbQ");
463
463
  globalExpect(error).toBeNull();
464
- globalExpect(data).toEqual(mockedReceiver);
464
+ globalExpect(data).toEqual(mockedCustomer);
465
465
  }));
466
466
  });
467
- describe("Update receiver", () => {
468
- it("should update a receiver", () => __async(null, null, function* () {
467
+ describe("Update customer", () => {
468
+ it("should update a customer", () => __async(null, null, function* () {
469
469
  fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
470
470
  headers: { "Content-Type": "application/json" }
471
471
  });
472
- const { data, error } = yield blindpay.receivers.update({
473
- receiver_id: "re_YuaMcI2B8zbQ",
472
+ const { data, error } = yield blindpay.customers.update({
473
+ customer_id: "re_YuaMcI2B8zbQ",
474
474
  email: "bernardo.simonassi@gmail.com",
475
475
  tax_id: "12345678900",
476
476
  address_line_1: "Av. Paulista, 1000",
@@ -530,19 +530,19 @@ var require_receivers_test = __commonJS({
530
530
  globalExpect(data).toEqual({ data: null });
531
531
  }));
532
532
  });
533
- describe("Delete receiver", () => {
534
- it("should delete a receiver", () => __async(null, null, function* () {
533
+ describe("Delete customer", () => {
534
+ it("should delete a customer", () => __async(null, null, function* () {
535
535
  fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
536
536
  headers: { "Content-Type": "application/json" }
537
537
  });
538
- const { data, error } = yield blindpay.receivers.delete("re_YuaMcI2B8zbQ");
538
+ const { data, error } = yield blindpay.customers.delete("re_YuaMcI2B8zbQ");
539
539
  globalExpect(error).toBeNull();
540
540
  globalExpect(data).toEqual({ data: null });
541
541
  }));
542
542
  });
543
- describe("Get receiver limits", () => {
544
- it("should get receiver limits", () => __async(null, null, function* () {
545
- const mockedReceiverLimits = {
543
+ describe("Get customer limits", () => {
544
+ it("should get customer limits", () => __async(null, null, function* () {
545
+ const mockedCustomerLimits = {
546
546
  limits: {
547
547
  payin: {
548
548
  daily: 1e4,
@@ -554,20 +554,20 @@ var require_receivers_test = __commonJS({
554
554
  }
555
555
  }
556
556
  };
557
- fetchMock.mockResponseOnce(JSON.stringify(mockedReceiverLimits), {
557
+ fetchMock.mockResponseOnce(JSON.stringify(mockedCustomerLimits), {
558
558
  headers: { "Content-Type": "application/json" }
559
559
  });
560
- const { data, error } = yield blindpay.receivers.getLimits("re_YuaMcI2B8zbQ");
560
+ const { data, error } = yield blindpay.customers.getLimits("re_YuaMcI2B8zbQ");
561
561
  globalExpect(error).toBeNull();
562
- globalExpect(data).toEqual(mockedReceiverLimits);
562
+ globalExpect(data).toEqual(mockedCustomerLimits);
563
563
  }));
564
564
  });
565
565
  describe("Get limit increase requests", () => {
566
- it("should get limit increase requests for a receiver", () => __async(null, null, function* () {
566
+ it("should get limit increase requests for a customer", () => __async(null, null, function* () {
567
567
  const mockedLimitIncreaseRequests = [
568
568
  {
569
569
  id: "rl_000000000000",
570
- receiver_id: "re_YuaMcI2B8zbQ",
570
+ customer_id: "re_YuaMcI2B8zbQ",
571
571
  status: "in_review",
572
572
  daily: 5e4,
573
573
  monthly: 25e4,
@@ -579,7 +579,7 @@ var require_receivers_test = __commonJS({
579
579
  },
580
580
  {
581
581
  id: "rl_000000000000",
582
- receiver_id: "re_YuaMcI2B8zbQ",
582
+ customer_id: "re_YuaMcI2B8zbQ",
583
583
  status: "approved",
584
584
  daily: 3e4,
585
585
  monthly: 15e4,
@@ -593,7 +593,7 @@ var require_receivers_test = __commonJS({
593
593
  fetchMock.mockResponseOnce(JSON.stringify(mockedLimitIncreaseRequests), {
594
594
  headers: { "Content-Type": "application/json" }
595
595
  });
596
- const { data, error } = yield blindpay.receivers.getLimitIncreaseRequests("re_YuaMcI2B8zbQ");
596
+ const { data, error } = yield blindpay.customers.getLimitIncreaseRequests("re_YuaMcI2B8zbQ");
597
597
  globalExpect(error).toBeNull();
598
598
  globalExpect(data).toEqual(mockedLimitIncreaseRequests);
599
599
  }));
@@ -603,7 +603,7 @@ var require_receivers_test = __commonJS({
603
603
  const mockedLimitIncreaseRequests = [
604
604
  {
605
605
  id: "rl_000000000000",
606
- receiver_id: "re_YuaMcI2B8zbQ",
606
+ customer_id: "re_YuaMcI2B8zbQ",
607
607
  status: "approved",
608
608
  daily: 5e4,
609
609
  monthly: 25e4,
@@ -620,21 +620,21 @@ var require_receivers_test = __commonJS({
620
620
  fetchMock.mockResponseOnce(JSON.stringify(mockedLimitIncreaseRequests), {
621
621
  headers: { "Content-Type": "application/json" }
622
622
  });
623
- const { data, error } = yield blindpay.receivers.getLimitIncreaseRequests("re_YuaMcI2B8zbQ");
623
+ const { data, error } = yield blindpay.customers.getLimitIncreaseRequests("re_YuaMcI2B8zbQ");
624
624
  globalExpect(error).toBeNull();
625
625
  globalExpect(data).toEqual(mockedLimitIncreaseRequests);
626
626
  }));
627
627
  });
628
628
  describe("Request limit increase", () => {
629
- it("should request a limit increase for a receiver", () => __async(null, null, function* () {
629
+ it("should request a limit increase for a customer", () => __async(null, null, function* () {
630
630
  const mockedResponse = {
631
631
  id: "rl_000000000000"
632
632
  };
633
633
  fetchMock.mockResponseOnce(JSON.stringify(mockedResponse), {
634
634
  headers: { "Content-Type": "application/json" }
635
635
  });
636
- const { data, error } = yield blindpay.receivers.requestLimitIncrease({
637
- receiver_id: "re_YuaMcI2B8zbQ",
636
+ const { data, error } = yield blindpay.customers.requestLimitIncrease({
637
+ customer_id: "re_YuaMcI2B8zbQ",
638
638
  daily: 1e5,
639
639
  monthly: 5e5,
640
640
  per_transaction: 5e4,
@@ -648,4 +648,4 @@ var require_receivers_test = __commonJS({
648
648
  });
649
649
  }
650
650
  });
651
- export default require_receivers_test();
651
+ export default require_customers_test();
@@ -45,7 +45,7 @@ type Owner = {
45
45
  title: string | null;
46
46
  tax_type?: OwnerTaxType | null;
47
47
  instance_id?: string;
48
- receiver_id?: string;
48
+ customer_id?: string;
49
49
  };
50
50
  type IndividualWithStandardKYC = {
51
51
  id: string;
@@ -346,22 +346,22 @@ type CreateBusinessWithStandardKYBInput = {
346
346
  type CreateBusinessWithStandardKYBResponse = {
347
347
  id: string;
348
348
  };
349
- type ListReceiversInput = PaginationParams & {
349
+ type ListCustomersInput = PaginationParams & {
350
350
  full_name?: string;
351
- receiver_name?: string;
351
+ customer_name?: string;
352
352
  status?: string;
353
- receiver_id?: string;
353
+ customer_id?: string;
354
354
  bank_account_id?: string;
355
355
  country?: Country;
356
356
  };
357
- type ListReceiversResponse = {
357
+ type ListCustomersResponse = {
358
358
  data: Array<IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB>;
359
359
  pagination: PaginationMetadata;
360
360
  };
361
- type GetReceiverInput = string;
362
- type GetReceiverResponse = IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB;
363
- type UpdateReceiverInput = {
364
- receiver_id: string;
361
+ type GetCustomerInput = string;
362
+ type GetCustomerResponse = IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB;
363
+ type UpdateCustomerInput = {
364
+ customer_id: string;
365
365
  account_purpose?: AccountPurpose | null;
366
366
  address_line_1?: string;
367
367
  address_line_2?: string;
@@ -408,9 +408,9 @@ type UpdateReceiverInput = {
408
408
  recipient_relationship?: RecipientRelationship | null;
409
409
  sole_proprietor_doc_type?: SoleProprietorDocType | null;
410
410
  };
411
- type DeleteReceiverInput = string;
412
- type GetReceiverLimitsInput = string;
413
- type GetReceiverLimitsResponse = {
411
+ type DeleteCustomerInput = string;
412
+ type GetCustomerLimitsInput = string;
413
+ type GetCustomerLimitsResponse = {
414
414
  limits: {
415
415
  payin: {
416
416
  daily: number;
@@ -427,7 +427,7 @@ type LimitIncreaseRequestStatus = "in_review" | "approved" | "rejected";
427
427
  type LimitIncreaseRequestSupportingDocumentType = "individual_bank_statement" | "individual_tax_return" | "individual_proof_of_income" | "business_bank_statement" | "business_financial_statements" | "business_tax_return";
428
428
  type GetLimitIncreaseRequestsResponse = Array<{
429
429
  id: string;
430
- receiver_id: string;
430
+ customer_id: string;
431
431
  status: LimitIncreaseRequestStatus;
432
432
  daily: number;
433
433
  monthly: number;
@@ -441,7 +441,7 @@ type GetLimitIncreaseRequestsResponse = Array<{
441
441
  approved_monthly?: number | null;
442
442
  }>;
443
443
  type RequestLimitIncreaseInput = {
444
- receiver_id: string;
444
+ customer_id: string;
445
445
  daily: number;
446
446
  monthly: number;
447
447
  per_transaction: number;
@@ -451,17 +451,17 @@ type RequestLimitIncreaseInput = {
451
451
  type RequestLimitIncreaseResponse = {
452
452
  id: string;
453
453
  };
454
- declare function createReceiversResource(instanceId: string, client: InternalApiClient): {
455
- list(params?: ListReceiversInput): Promise<BlindpayApiResponse<ListReceiversResponse>>;
454
+ declare function createCustomersResource(instanceId: string, client: InternalApiClient): {
455
+ list(params?: ListCustomersInput): Promise<BlindpayApiResponse<ListCustomersResponse>>;
456
456
  createIndividualWithStandardKYC(data: CreateIndividualWithStandardKYCInput): Promise<BlindpayApiResponse<CreateIndividualWithStandardKYCResponse>>;
457
457
  createIndividualWithEnhancedKYC(data: CreateIndividualWithEnhancedKYCInput): Promise<BlindpayApiResponse<CreateIndividualWithEnhancedKYCResponse>>;
458
458
  createBusinessWithStandardKYB(data: CreateBusinessWithStandardKYBInput): Promise<BlindpayApiResponse<CreateBusinessWithStandardKYBResponse>>;
459
- get(receiver_id: GetReceiverInput): Promise<BlindpayApiResponse<GetReceiverResponse>>;
460
- update({ receiver_id, ...data }: UpdateReceiverInput): Promise<BlindpayApiResponse<void>>;
461
- delete(receiver_id: DeleteReceiverInput): Promise<BlindpayApiResponse<void>>;
462
- getLimits(receiver_id: GetReceiverLimitsInput): Promise<BlindpayApiResponse<GetReceiverLimitsResponse>>;
463
- getLimitIncreaseRequests(receiver_id: GetLimitIncreaseRequestsInput): Promise<BlindpayApiResponse<GetLimitIncreaseRequestsResponse>>;
464
- requestLimitIncrease({ receiver_id, ...data }: RequestLimitIncreaseInput): Promise<BlindpayApiResponse<RequestLimitIncreaseResponse>>;
459
+ get(customer_id: GetCustomerInput): Promise<BlindpayApiResponse<GetCustomerResponse>>;
460
+ update({ customer_id, ...data }: UpdateCustomerInput): Promise<BlindpayApiResponse<void>>;
461
+ delete(customer_id: DeleteCustomerInput): Promise<BlindpayApiResponse<void>>;
462
+ getLimits(customer_id: GetCustomerLimitsInput): Promise<BlindpayApiResponse<GetCustomerLimitsResponse>>;
463
+ getLimitIncreaseRequests(customer_id: GetLimitIncreaseRequestsInput): Promise<BlindpayApiResponse<GetLimitIncreaseRequestsResponse>>;
464
+ requestLimitIncrease({ customer_id, ...data }: RequestLimitIncreaseInput): Promise<BlindpayApiResponse<RequestLimitIncreaseResponse>>;
465
465
  };
466
466
 
467
- export { type AmlHits, type AmlStatus, type BusinessWithStandardKYB, type CreateBusinessWithStandardKYBInput, type CreateBusinessWithStandardKYBResponse, type CreateIndividualWithEnhancedKYCInput, type CreateIndividualWithEnhancedKYCResponse, type CreateIndividualWithStandardKYCInput, type CreateIndividualWithStandardKYCResponse, type DeleteReceiverInput, type FraudWarning, type GetLimitIncreaseRequestsInput, type GetLimitIncreaseRequestsResponse, type GetReceiverInput, type GetReceiverLimitsInput, type GetReceiverLimitsResponse, type GetReceiverResponse, type IdentificationDocument, type IndividualWithEnhancedKYC, type IndividualWithStandardKYC, type KycType, type LimitIncreaseRequestStatus, type LimitIncreaseRequestSupportingDocumentType, type ListReceiversInput, type ListReceiversResponse, type Owner, type OwnerRole, type OwnerTaxType, type ProofOfAddressDocType, type RequestLimitIncreaseInput, type RequestLimitIncreaseResponse, type UpdateReceiverInput, createReceiversResource };
467
+ export { type AmlHits, type AmlStatus, type BusinessWithStandardKYB, type CreateBusinessWithStandardKYBInput, type CreateBusinessWithStandardKYBResponse, type CreateIndividualWithEnhancedKYCInput, type CreateIndividualWithEnhancedKYCResponse, type CreateIndividualWithStandardKYCInput, type CreateIndividualWithStandardKYCResponse, type DeleteCustomerInput, type FraudWarning, type GetCustomerInput, type GetCustomerLimitsInput, type GetCustomerLimitsResponse, type GetCustomerResponse, type GetLimitIncreaseRequestsInput, type GetLimitIncreaseRequestsResponse, type IdentificationDocument, type IndividualWithEnhancedKYC, type IndividualWithStandardKYC, type KycType, type LimitIncreaseRequestStatus, type LimitIncreaseRequestSupportingDocumentType, type ListCustomersInput, type ListCustomersResponse, type Owner, type OwnerRole, type OwnerTaxType, type ProofOfAddressDocType, type RequestLimitIncreaseInput, type RequestLimitIncreaseResponse, type UpdateCustomerInput, createCustomersResource };
@@ -45,7 +45,7 @@ type Owner = {
45
45
  title: string | null;
46
46
  tax_type?: OwnerTaxType | null;
47
47
  instance_id?: string;
48
- receiver_id?: string;
48
+ customer_id?: string;
49
49
  };
50
50
  type IndividualWithStandardKYC = {
51
51
  id: string;
@@ -346,22 +346,22 @@ type CreateBusinessWithStandardKYBInput = {
346
346
  type CreateBusinessWithStandardKYBResponse = {
347
347
  id: string;
348
348
  };
349
- type ListReceiversInput = PaginationParams & {
349
+ type ListCustomersInput = PaginationParams & {
350
350
  full_name?: string;
351
- receiver_name?: string;
351
+ customer_name?: string;
352
352
  status?: string;
353
- receiver_id?: string;
353
+ customer_id?: string;
354
354
  bank_account_id?: string;
355
355
  country?: Country;
356
356
  };
357
- type ListReceiversResponse = {
357
+ type ListCustomersResponse = {
358
358
  data: Array<IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB>;
359
359
  pagination: PaginationMetadata;
360
360
  };
361
- type GetReceiverInput = string;
362
- type GetReceiverResponse = IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB;
363
- type UpdateReceiverInput = {
364
- receiver_id: string;
361
+ type GetCustomerInput = string;
362
+ type GetCustomerResponse = IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB;
363
+ type UpdateCustomerInput = {
364
+ customer_id: string;
365
365
  account_purpose?: AccountPurpose | null;
366
366
  address_line_1?: string;
367
367
  address_line_2?: string;
@@ -408,9 +408,9 @@ type UpdateReceiverInput = {
408
408
  recipient_relationship?: RecipientRelationship | null;
409
409
  sole_proprietor_doc_type?: SoleProprietorDocType | null;
410
410
  };
411
- type DeleteReceiverInput = string;
412
- type GetReceiverLimitsInput = string;
413
- type GetReceiverLimitsResponse = {
411
+ type DeleteCustomerInput = string;
412
+ type GetCustomerLimitsInput = string;
413
+ type GetCustomerLimitsResponse = {
414
414
  limits: {
415
415
  payin: {
416
416
  daily: number;
@@ -427,7 +427,7 @@ type LimitIncreaseRequestStatus = "in_review" | "approved" | "rejected";
427
427
  type LimitIncreaseRequestSupportingDocumentType = "individual_bank_statement" | "individual_tax_return" | "individual_proof_of_income" | "business_bank_statement" | "business_financial_statements" | "business_tax_return";
428
428
  type GetLimitIncreaseRequestsResponse = Array<{
429
429
  id: string;
430
- receiver_id: string;
430
+ customer_id: string;
431
431
  status: LimitIncreaseRequestStatus;
432
432
  daily: number;
433
433
  monthly: number;
@@ -441,7 +441,7 @@ type GetLimitIncreaseRequestsResponse = Array<{
441
441
  approved_monthly?: number | null;
442
442
  }>;
443
443
  type RequestLimitIncreaseInput = {
444
- receiver_id: string;
444
+ customer_id: string;
445
445
  daily: number;
446
446
  monthly: number;
447
447
  per_transaction: number;
@@ -451,17 +451,17 @@ type RequestLimitIncreaseInput = {
451
451
  type RequestLimitIncreaseResponse = {
452
452
  id: string;
453
453
  };
454
- declare function createReceiversResource(instanceId: string, client: InternalApiClient): {
455
- list(params?: ListReceiversInput): Promise<BlindpayApiResponse<ListReceiversResponse>>;
454
+ declare function createCustomersResource(instanceId: string, client: InternalApiClient): {
455
+ list(params?: ListCustomersInput): Promise<BlindpayApiResponse<ListCustomersResponse>>;
456
456
  createIndividualWithStandardKYC(data: CreateIndividualWithStandardKYCInput): Promise<BlindpayApiResponse<CreateIndividualWithStandardKYCResponse>>;
457
457
  createIndividualWithEnhancedKYC(data: CreateIndividualWithEnhancedKYCInput): Promise<BlindpayApiResponse<CreateIndividualWithEnhancedKYCResponse>>;
458
458
  createBusinessWithStandardKYB(data: CreateBusinessWithStandardKYBInput): Promise<BlindpayApiResponse<CreateBusinessWithStandardKYBResponse>>;
459
- get(receiver_id: GetReceiverInput): Promise<BlindpayApiResponse<GetReceiverResponse>>;
460
- update({ receiver_id, ...data }: UpdateReceiverInput): Promise<BlindpayApiResponse<void>>;
461
- delete(receiver_id: DeleteReceiverInput): Promise<BlindpayApiResponse<void>>;
462
- getLimits(receiver_id: GetReceiverLimitsInput): Promise<BlindpayApiResponse<GetReceiverLimitsResponse>>;
463
- getLimitIncreaseRequests(receiver_id: GetLimitIncreaseRequestsInput): Promise<BlindpayApiResponse<GetLimitIncreaseRequestsResponse>>;
464
- requestLimitIncrease({ receiver_id, ...data }: RequestLimitIncreaseInput): Promise<BlindpayApiResponse<RequestLimitIncreaseResponse>>;
459
+ get(customer_id: GetCustomerInput): Promise<BlindpayApiResponse<GetCustomerResponse>>;
460
+ update({ customer_id, ...data }: UpdateCustomerInput): Promise<BlindpayApiResponse<void>>;
461
+ delete(customer_id: DeleteCustomerInput): Promise<BlindpayApiResponse<void>>;
462
+ getLimits(customer_id: GetCustomerLimitsInput): Promise<BlindpayApiResponse<GetCustomerLimitsResponse>>;
463
+ getLimitIncreaseRequests(customer_id: GetLimitIncreaseRequestsInput): Promise<BlindpayApiResponse<GetLimitIncreaseRequestsResponse>>;
464
+ requestLimitIncrease({ customer_id, ...data }: RequestLimitIncreaseInput): Promise<BlindpayApiResponse<RequestLimitIncreaseResponse>>;
465
465
  };
466
466
 
467
- export { type AmlHits, type AmlStatus, type BusinessWithStandardKYB, type CreateBusinessWithStandardKYBInput, type CreateBusinessWithStandardKYBResponse, type CreateIndividualWithEnhancedKYCInput, type CreateIndividualWithEnhancedKYCResponse, type CreateIndividualWithStandardKYCInput, type CreateIndividualWithStandardKYCResponse, type DeleteReceiverInput, type FraudWarning, type GetLimitIncreaseRequestsInput, type GetLimitIncreaseRequestsResponse, type GetReceiverInput, type GetReceiverLimitsInput, type GetReceiverLimitsResponse, type GetReceiverResponse, type IdentificationDocument, type IndividualWithEnhancedKYC, type IndividualWithStandardKYC, type KycType, type LimitIncreaseRequestStatus, type LimitIncreaseRequestSupportingDocumentType, type ListReceiversInput, type ListReceiversResponse, type Owner, type OwnerRole, type OwnerTaxType, type ProofOfAddressDocType, type RequestLimitIncreaseInput, type RequestLimitIncreaseResponse, type UpdateReceiverInput, createReceiversResource };
467
+ export { type AmlHits, type AmlStatus, type BusinessWithStandardKYB, type CreateBusinessWithStandardKYBInput, type CreateBusinessWithStandardKYBResponse, type CreateIndividualWithEnhancedKYCInput, type CreateIndividualWithEnhancedKYCResponse, type CreateIndividualWithStandardKYCInput, type CreateIndividualWithStandardKYCResponse, type DeleteCustomerInput, type FraudWarning, type GetCustomerInput, type GetCustomerLimitsInput, type GetCustomerLimitsResponse, type GetCustomerResponse, type GetLimitIncreaseRequestsInput, type GetLimitIncreaseRequestsResponse, type IdentificationDocument, type IndividualWithEnhancedKYC, type IndividualWithStandardKYC, type KycType, type LimitIncreaseRequestStatus, type LimitIncreaseRequestSupportingDocumentType, type ListCustomersInput, type ListCustomersResponse, type Owner, type OwnerRole, type OwnerTaxType, type ProofOfAddressDocType, type RequestLimitIncreaseInput, type RequestLimitIncreaseResponse, type UpdateCustomerInput, createCustomersResource };
@@ -43,60 +43,67 @@ var __copyProps = (to, from, except, desc) => {
43
43
  };
44
44
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
45
45
 
46
- // src/resources/receivers/index.ts
47
- var receivers_exports = {};
48
- __export(receivers_exports, {
49
- createReceiversResource: () => createReceiversResource
46
+ // src/resources/customers/index.ts
47
+ var customers_exports = {};
48
+ __export(customers_exports, {
49
+ createCustomersResource: () => createCustomersResource
50
50
  });
51
- module.exports = __toCommonJS(receivers_exports);
52
- function createReceiversResource(instanceId, client) {
51
+ module.exports = __toCommonJS(customers_exports);
52
+ function createCustomersResource(instanceId, client) {
53
53
  return {
54
54
  list(params) {
55
- const queryParams = params ? `?${new URLSearchParams(params)}` : "";
56
- return client.get(`/instances/${instanceId}/receivers${queryParams}`);
55
+ const wireParams = params ? Object.fromEntries(
56
+ Object.entries(params).map(([k, v]) => {
57
+ if (k === "customer_id") return ["receiver_id", v];
58
+ if (k === "customer_name") return ["receiver_name", v];
59
+ return [k, v];
60
+ })
61
+ ) : void 0;
62
+ const queryParams = wireParams ? `?${new URLSearchParams(wireParams)}` : "";
63
+ return client.get(`/instances/${instanceId}/customers${queryParams}`);
57
64
  },
58
65
  createIndividualWithStandardKYC(data) {
59
- return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
66
+ return client.post(`/instances/${instanceId}/customers`, __spreadValues({
60
67
  kyc_type: "standard",
61
68
  type: "individual"
62
69
  }, data));
63
70
  },
64
71
  createIndividualWithEnhancedKYC(data) {
65
- return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
72
+ return client.post(`/instances/${instanceId}/customers`, __spreadValues({
66
73
  kyc_type: "enhanced",
67
74
  type: "individual"
68
75
  }, data));
69
76
  },
70
77
  createBusinessWithStandardKYB(data) {
71
- return client.post(`/instances/${instanceId}/receivers`, __spreadValues({
78
+ return client.post(`/instances/${instanceId}/customers`, __spreadValues({
72
79
  kyc_type: "standard",
73
80
  type: "business"
74
81
  }, data));
75
82
  },
76
- get(receiver_id) {
77
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
83
+ get(customer_id) {
84
+ return client.get(`/instances/${instanceId}/customers/${customer_id}`);
78
85
  },
79
86
  update(_a) {
80
- var _b = _a, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
81
- return client.put(`/instances/${instanceId}/receivers/${receiver_id}`, data);
87
+ var _b = _a, { customer_id } = _b, data = __objRest(_b, ["customer_id"]);
88
+ return client.put(`/instances/${instanceId}/customers/${customer_id}`, data);
82
89
  },
83
- delete(receiver_id) {
84
- return client.delete(`/instances/${instanceId}/receivers/${receiver_id}`);
90
+ delete(customer_id) {
91
+ return client.delete(`/instances/${instanceId}/customers/${customer_id}`);
85
92
  },
86
- getLimits(receiver_id) {
87
- return client.get(`/instances/${instanceId}/limits/receivers/${receiver_id}`);
93
+ getLimits(customer_id) {
94
+ return client.get(`/instances/${instanceId}/limits/customers/${customer_id}`);
88
95
  },
89
- getLimitIncreaseRequests(receiver_id) {
90
- return client.get(`/instances/${instanceId}/receivers/${receiver_id}/limit-increase`);
96
+ getLimitIncreaseRequests(customer_id) {
97
+ return client.get(`/instances/${instanceId}/customers/${customer_id}/limit-increase`);
91
98
  },
92
99
  requestLimitIncrease(_c) {
93
100
  var _d = _c, {
94
- receiver_id
101
+ customer_id
95
102
  } = _d, data = __objRest(_d, [
96
- "receiver_id"
103
+ "customer_id"
97
104
  ]);
98
105
  return client.post(
99
- `/instances/${instanceId}/receivers/${receiver_id}/limit-increase`,
106
+ `/instances/${instanceId}/customers/${customer_id}/limit-increase`,
100
107
  data
101
108
  );
102
109
  }
@@ -104,5 +111,5 @@ function createReceiversResource(instanceId, client) {
104
111
  }
105
112
  // Annotate the CommonJS export names for ESM import in node:
106
113
  0 && (module.exports = {
107
- createReceiversResource
114
+ createCustomersResource
108
115
  });
@@ -0,0 +1,9 @@
1
+ import {
2
+ createCustomersResource,
3
+ init_customers
4
+ } from "../../chunk-SLKVEQUY.mjs";
5
+ import "../../chunk-OBKEW4AQ.mjs";
6
+ init_customers();
7
+ export {
8
+ createCustomersResource
9
+ };