@blindpay/node 3.0.0 → 3.1.1

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 (77) hide show
  1. package/dist/{api-client-B7VQkM_4.d.mts → api-client-CIPV5zmo.d.mts} +38 -24
  2. package/dist/{api-client-B7VQkM_4.d.ts → api-client-CIPV5zmo.d.ts} +38 -24
  3. package/dist/{chunk-VRA5HP7F.mjs → chunk-E7M4CJKR.mjs} +0 -7
  4. package/dist/{chunk-WH2VNZE7.mjs → chunk-I4KOWV46.mjs} +8 -8
  5. package/dist/{chunk-W7NJUABI.mjs → chunk-VGU72ZNI.mjs} +1 -7
  6. package/dist/{chunk-VBZHAPK7.mjs → chunk-VOB7TMKL.mjs} +1 -9
  7. package/dist/index.d.mts +4 -4
  8. package/dist/index.d.ts +4 -4
  9. package/dist/index.js +2 -22
  10. package/dist/index.mjs +8 -8
  11. package/dist/resources/api-keys/api-keys.test.js +2 -22
  12. package/dist/resources/api-keys/api-keys.test.mjs +5 -5
  13. package/dist/resources/api-keys/index.d.mts +1 -1
  14. package/dist/resources/api-keys/index.d.ts +1 -1
  15. package/dist/resources/available/available.test.js +2 -22
  16. package/dist/resources/available/available.test.mjs +5 -5
  17. package/dist/resources/available/index.d.mts +1 -1
  18. package/dist/resources/available/index.d.ts +1 -1
  19. package/dist/resources/bank-accounts/bank-accounts.test.js +2 -22
  20. package/dist/resources/bank-accounts/bank-accounts.test.mjs +5 -5
  21. package/dist/resources/bank-accounts/index.d.mts +1 -1
  22. package/dist/resources/bank-accounts/index.d.ts +1 -1
  23. package/dist/resources/instances/index.d.mts +1 -1
  24. package/dist/resources/instances/index.d.ts +1 -1
  25. package/dist/resources/instances/instances.test.js +2 -22
  26. package/dist/resources/instances/instances.test.mjs +5 -5
  27. package/dist/resources/partner-fees/index.d.mts +1 -1
  28. package/dist/resources/partner-fees/index.d.ts +1 -1
  29. package/dist/resources/partner-fees/partner-fees.test.js +2 -22
  30. package/dist/resources/partner-fees/partner-fees.test.mjs +5 -5
  31. package/dist/resources/payins/index.d.mts +60 -123
  32. package/dist/resources/payins/index.d.ts +60 -123
  33. package/dist/resources/payins/index.js +0 -19
  34. package/dist/resources/payins/index.mjs +1 -1
  35. package/dist/resources/payins/payins-quotes.test.js +2 -108
  36. package/dist/resources/payins/payins-quotes.test.mjs +5 -91
  37. package/dist/resources/payins/payins.test.js +2 -157
  38. package/dist/resources/payins/payins.test.mjs +5 -140
  39. package/dist/resources/payins/quotes.d.mts +7 -72
  40. package/dist/resources/payins/quotes.d.ts +7 -72
  41. package/dist/resources/payins/quotes.js +0 -7
  42. package/dist/resources/payins/quotes.mjs +1 -1
  43. package/dist/resources/payouts/index.d.mts +2 -13
  44. package/dist/resources/payouts/index.d.ts +2 -13
  45. package/dist/resources/payouts/index.js +1 -9
  46. package/dist/resources/payouts/index.mjs +1 -1
  47. package/dist/resources/payouts/payouts.test.js +2 -148
  48. package/dist/resources/payouts/payouts.test.mjs +5 -131
  49. package/dist/resources/quotes/index.d.mts +16 -16
  50. package/dist/resources/quotes/index.d.ts +16 -16
  51. package/dist/resources/quotes/quotes.test.js +3 -23
  52. package/dist/resources/quotes/quotes.test.mjs +6 -6
  53. package/dist/resources/receivers/index.d.mts +1 -1
  54. package/dist/resources/receivers/index.d.ts +1 -1
  55. package/dist/resources/receivers/receivers.test.js +2 -22
  56. package/dist/resources/receivers/receivers.test.mjs +5 -5
  57. package/dist/resources/terms-of-service/index.d.mts +1 -1
  58. package/dist/resources/terms-of-service/index.d.ts +1 -1
  59. package/dist/resources/terms-of-service/terms-of-service.test.js +2 -22
  60. package/dist/resources/terms-of-service/terms-of-service.test.mjs +5 -5
  61. package/dist/resources/virtual-accounts/index.d.mts +1 -1
  62. package/dist/resources/virtual-accounts/index.d.ts +1 -1
  63. package/dist/resources/virtual-accounts/virtual-accounts.test.js +2 -22
  64. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +5 -5
  65. package/dist/resources/wallets/blockchain.d.mts +1 -1
  66. package/dist/resources/wallets/blockchain.d.ts +1 -1
  67. package/dist/resources/wallets/blockchain.test.js +2 -22
  68. package/dist/resources/wallets/blockchain.test.mjs +5 -5
  69. package/dist/resources/wallets/offramp.d.mts +1 -1
  70. package/dist/resources/wallets/offramp.d.ts +1 -1
  71. package/dist/resources/wallets/offramp.test.js +2 -22
  72. package/dist/resources/wallets/offramp.test.mjs +5 -5
  73. package/dist/resources/webhooks/index.d.mts +1 -1
  74. package/dist/resources/webhooks/index.d.ts +1 -1
  75. package/dist/resources/webhooks/webhooks.test.js +2 -22
  76. package/dist/resources/webhooks/webhooks.test.mjs +5 -5
  77. package/package.json +1 -1
@@ -1,66 +1,68 @@
1
- import { I as InternalApiClient, P as PaginationParams, T as TransactionStatus, B as BlindpayApiResponse, d as PayinTrackingTransaction, e as PayinTrackingPayment, f as PayinTrackingComplete, g as PayinTrackingPartnerFee, S as StablecoinToken, N as Network, h as PaginationMetadata } from '../../api-client-B7VQkM_4.js';
1
+ import { I as InternalApiClient, P as PaginationParams, T as TransactionStatus, B as BlindpayApiResponse, d as PayinTrackingTransaction, e as PayinTrackingPayment, f as PayinTrackingComplete, g as PayinTrackingPartnerFee, A as AccountClass, h as PayinPaymentMethod, S as StablecoinToken, i as Currency, j as PayerRules, N as Network, b as AchCopDocument, k as PaginationMetadata } from '../../api-client-CIPV5zmo.js';
2
2
 
3
+ type BlindpayBankDetails = {
4
+ routing_number: string;
5
+ account_number: string;
6
+ account_type: string;
7
+ swift_bic_code?: string | null;
8
+ ach?: {
9
+ routing_number: string;
10
+ account_number: string;
11
+ } | null;
12
+ wire?: {
13
+ routing_number: string;
14
+ account_number: string;
15
+ } | null;
16
+ rtp?: {
17
+ routing_number: string;
18
+ account_number: string;
19
+ } | null;
20
+ beneficiary: {
21
+ name: string;
22
+ address_line_1: string;
23
+ address_line_2: string;
24
+ };
25
+ };
3
26
  type Payin = {
4
- receiver_id: string;
5
27
  id: string;
6
- pix_code?: string;
7
- memo_code?: string;
8
- clabe?: string;
28
+ receiver_id: string;
29
+ pix_code?: string | null;
30
+ memo_code?: string | null;
31
+ clabe?: string | null;
9
32
  status: TransactionStatus;
10
33
  payin_quote_id: string;
11
34
  instance_id: string;
12
- tracking_transaction?: PayinTrackingTransaction;
13
- tracking_payment?: PayinTrackingPayment;
14
- tracking_complete?: PayinTrackingComplete;
35
+ tracking_transaction: PayinTrackingTransaction;
36
+ tracking_payment: PayinTrackingPayment;
37
+ tracking_complete: PayinTrackingComplete;
15
38
  tracking_partner_fee?: PayinTrackingPartnerFee;
16
39
  created_at: string;
17
40
  updated_at: string;
18
- image_url?: string;
19
- first_name?: string;
20
- last_name?: string;
21
- legal_name?: string;
22
- type: string;
23
- payment_method: string;
41
+ image_url?: string | null | undefined;
42
+ first_name?: string | null | undefined;
43
+ last_name?: string | null | undefined;
44
+ legal_name?: string | null | undefined;
45
+ type: AccountClass;
46
+ payment_method: PayinPaymentMethod;
24
47
  sender_amount: number;
25
48
  receiver_amount: number;
26
49
  token: StablecoinToken;
27
- partner_fee_amount: number;
28
- total_fee_amount: number;
50
+ partner_fee_amount?: number | null;
51
+ total_fee_amount?: number | null;
29
52
  commercial_quotation: number;
30
53
  blindpay_quotation: number;
31
- currency: string;
32
- billing_fee: number;
54
+ currency: Extract<Currency, "BRL" | "USD" | "MXN" | "COP" | "ARS">;
55
+ billing_fee?: number | null;
56
+ is_otc?: boolean | null;
57
+ payer_rules?: PayerRules | null;
33
58
  name: string;
34
- address: string;
59
+ address?: string | null;
35
60
  network: Network;
36
- blindpay_bank_details: {
37
- routing_number: string;
38
- account_number: string;
39
- account_type: string;
40
- swift_bic_code: string;
41
- ach: {
42
- routing_number: string;
43
- account_number: string;
44
- };
45
- wire: {
46
- routing_number: string;
47
- account_number: string;
48
- };
49
- rtp: {
50
- routing_number: string;
51
- account_number: string;
52
- };
53
- beneficiary: {
54
- name: string;
55
- address_line_1: string;
56
- address_line_2: string;
57
- };
58
- receiving_bank: {
59
- name: string;
60
- address_line_1: string;
61
- address_line_2: string;
62
- };
63
- };
61
+ blindpay_bank_details?: BlindpayBankDetails | null;
62
+ pse_payment_link?: string | null;
63
+ pse_full_name?: string | null;
64
+ pse_tax_id?: string | null;
65
+ pse_document_type?: Extract<AchCopDocument, "CC" | "NIT"> | null;
64
66
  };
65
67
  type ListPayinsInput = PaginationParams & {
66
68
  status?: TransactionStatus;
@@ -69,93 +71,28 @@ type ListPayinsInput = PaginationParams & {
69
71
  type ListPayinsResponse = {
70
72
  data: Payin[];
71
73
  pagination: PaginationMetadata;
72
- };
74
+ } | Payin[];
73
75
  type CreatePayinInput = {
74
76
  quote_id: string;
75
- sender_address: string;
76
- receiver_address: string;
77
- amount: number;
78
- token: StablecoinToken;
79
- network: Network;
80
- description?: string | null;
81
77
  };
82
78
  type GetPayinInput = string;
83
79
  type GetPayinResponse = Payin;
84
80
  type GetPayinTrackInput = string;
85
- type GetPayinTrackResponse = {
86
- receiver_id: string;
87
- id: string;
88
- pix_code: string;
89
- memo_code: string;
90
- clabe: string;
91
- status: string;
92
- payin_quote_id: string;
93
- instance_id: string;
94
- tracking_transaction: PayinTrackingTransaction;
95
- tracking_payment: PayinTrackingPayment;
96
- tracking_complete: PayinTrackingComplete;
97
- tracking_partner_fee: PayinTrackingPartnerFee;
98
- created_at: string;
99
- updated_at: string;
100
- image_url: string;
101
- first_name: string;
102
- last_name: string;
103
- legal_name: string;
104
- type: string;
105
- payment_method: string;
106
- sender_amount: number;
107
- receiver_amount: number;
108
- token: StablecoinToken;
109
- partner_fee_amount: number;
110
- total_fee_amount: number;
111
- commercial_quotation: number;
112
- blindpay_quotation: number;
113
- currency: string;
114
- billing_fee: number;
115
- name: string;
116
- address: string;
117
- network: Network;
118
- blindpay_bank_details: {
119
- routing_number: string;
120
- account_number: string;
121
- account_type: string;
122
- swift_bic_code: string;
123
- ach: {
124
- routing_number: string;
125
- account_number: string;
126
- };
127
- wire: {
128
- routing_number: string;
129
- account_number: string;
130
- };
131
- rtp: {
132
- routing_number: string;
133
- account_number: string;
134
- };
135
- beneficiary: {
136
- name: string;
137
- address_line_1: string;
138
- address_line_2: string;
139
- };
140
- receiving_bank: {
141
- name: string;
142
- address_line_1: string;
143
- address_line_2: string;
144
- };
145
- };
146
- };
147
- type ExportPayinsInput = Pick<PaginationParams, "limit" | "offset"> & {
148
- status: TransactionStatus;
149
- };
150
- type ExportPayinsResponse = Payin[];
81
+ type GetPayinTrackResponse = Payin;
151
82
  type CreateEvmPayinInput = string;
152
- type CreateEvmPayinResponse = Pick<Payin, "id" | "status" | "pix_code" | "memo_code" | "clabe" | "tracking_complete" | "tracking_payment" | "tracking_transaction" | "tracking_partner_fee" | "blindpay_bank_details" | "receiver_id" | "receiver_amount">;
83
+ type CreateEvmPayinResponse = Pick<Payin, "id" | "status" | "pix_code" | "memo_code" | "clabe" | "tracking_complete" | "tracking_payment" | "tracking_transaction" | "tracking_partner_fee"> & {
84
+ blindpay_bank_details: BlindpayBankDetails;
85
+ receiver_id?: string | null;
86
+ receiver_amount?: number | null;
87
+ payment_method?: PayinPaymentMethod | null;
88
+ billing_fee?: number | null;
89
+ sender_amount?: number | null;
90
+ };
153
91
  declare function createPayinsResource(instanceId: string, client: InternalApiClient): {
154
92
  list(params?: ListPayinsInput): Promise<BlindpayApiResponse<ListPayinsResponse>>;
155
93
  get(payinId: GetPayinInput): Promise<BlindpayApiResponse<GetPayinResponse>>;
156
94
  getTrack(payinId: GetPayinTrackInput): Promise<BlindpayApiResponse<GetPayinTrackResponse>>;
157
- export({ ...params }: ExportPayinsInput): Promise<BlindpayApiResponse<ExportPayinsResponse>>;
158
95
  createEvm(payin_quote_id: CreateEvmPayinInput): Promise<BlindpayApiResponse<CreateEvmPayinResponse>>;
159
96
  };
160
97
 
161
- export { type CreateEvmPayinInput, type CreateEvmPayinResponse, type CreatePayinInput, type ExportPayinsInput, type ExportPayinsResponse, type GetPayinInput, type GetPayinResponse, type GetPayinTrackInput, type GetPayinTrackResponse, type ListPayinsInput, type ListPayinsResponse, type Payin, createPayinsResource };
98
+ export { type BlindpayBankDetails, type CreateEvmPayinInput, type CreateEvmPayinResponse, type CreatePayinInput, type GetPayinInput, type GetPayinResponse, type GetPayinTrackInput, type GetPayinTrackResponse, type ListPayinsInput, type ListPayinsResponse, type Payin, createPayinsResource };
@@ -2,21 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __objRest = (source, exclude) => {
9
- var target = {};
10
- for (var prop in source)
11
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
12
- target[prop] = source[prop];
13
- if (source != null && __getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(source)) {
15
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
16
- target[prop] = source[prop];
17
- }
18
- return target;
19
- };
20
6
  var __export = (target, all) => {
21
7
  for (var name in all)
22
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -49,11 +35,6 @@ function createPayinsResource(instanceId, client) {
49
35
  getTrack(payinId) {
50
36
  return client.get(`/e/payins/${payinId}`);
51
37
  },
52
- export(_a) {
53
- var params = __objRest(_a, []);
54
- const queryParams = params ? `?${new URLSearchParams(params)}` : "";
55
- return client.get(`/instances/${instanceId}/export/payins${queryParams}`);
56
- },
57
38
  createEvm(payin_quote_id) {
58
39
  return client.post(`/instances/${instanceId}/payins/evm`, {
59
40
  payin_quote_id
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPayinsResource,
3
3
  init_payins
4
- } from "../../chunk-W7NJUABI.mjs";
4
+ } from "../../chunk-VGU72ZNI.mjs";
5
5
  import "../../chunk-OBKEW4AQ.mjs";
6
6
  init_payins();
7
7
  export {
@@ -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.0.0";
18705
+ var version = "3.1.1";
18706
18706
 
18707
18707
  // src/internal/blindpay-error.ts
18708
18708
  var BlindPayError = class extends Error {
@@ -18905,11 +18905,6 @@ function createPayinsResource(instanceId, client) {
18905
18905
  getTrack(payinId) {
18906
18906
  return client.get(`/e/payins/${payinId}`);
18907
18907
  },
18908
- export(_a3) {
18909
- var params = __objRest(_a3, []);
18910
- const queryParams = params ? `?${new URLSearchParams(params)}` : "";
18911
- return client.get(`/instances/${instanceId}/export/payins${queryParams}`);
18912
- },
18913
18908
  createEvm(payin_quote_id) {
18914
18909
  return client.post(`/instances/${instanceId}/payins/evm`, {
18915
18910
  payin_quote_id
@@ -18928,13 +18923,6 @@ function createPayinQuotesResource(instanceId, client) {
18928
18923
  getFxRate(_b) {
18929
18924
  var data = __objRest(_b, []);
18930
18925
  return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
18931
- },
18932
- get(id) {
18933
- return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
18934
- },
18935
- list(params) {
18936
- const queryParams = params ? `?${new URLSearchParams(params)}` : "";
18937
- return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
18938
18926
  }
18939
18927
  };
18940
18928
  }
@@ -18946,10 +18934,6 @@ function createPayoutsResource(instanceId, client) {
18946
18934
  const queryParams = params ? `?${new URLSearchParams(params)}` : "";
18947
18935
  return client.get(`/instances/${instanceId}/payouts${queryParams}`);
18948
18936
  },
18949
- export(params) {
18950
- const queryParams = params ? `?${new URLSearchParams(params)}` : "";
18951
- return client.get(`/instances/${instanceId}/export/payouts${queryParams}`);
18952
- },
18953
18937
  get(payoutId) {
18954
18938
  return client.get(`/instances/${instanceId}/payouts/${payoutId}`);
18955
18939
  },
@@ -18968,12 +18952,8 @@ function createPayoutsResource(instanceId, client) {
18968
18952
  var data = __objRest(_c, []);
18969
18953
  return client.post(`/instances/${instanceId}/payouts/evm`, data);
18970
18954
  },
18971
- authorizeSolana(_d) {
18955
+ createSolana(_d) {
18972
18956
  var data = __objRest(_d, []);
18973
- return client.post(`/instances/${instanceId}/payouts/solana/authorize`, data);
18974
- },
18975
- createSolana(_e) {
18976
- var data = __objRest(_e, []);
18977
18957
  return client.post(`/instances/${instanceId}/payouts/solana`, data);
18978
18958
  }
18979
18959
  };
@@ -19441,92 +19421,6 @@ describe("Payin quotes", () => {
19441
19421
  globalExpect(data).toEqual(mockedFxRate);
19442
19422
  }));
19443
19423
  });
19444
- describe("Get payin quote", () => {
19445
- it("should get a payin quote", () => __async(null, null, function* () {
19446
- const mockedPayinQuote = {
19447
- id: "qu_000000000000",
19448
- payment_method: "pix",
19449
- token: "USDC",
19450
- request_amount: 1e3,
19451
- cover_fees: true,
19452
- currency_type: "sender",
19453
- expires_at: 1712958191,
19454
- currency: "BRL",
19455
- commercial_quotation: 495,
19456
- blindpay_quotation: 505,
19457
- receiver_amount: 1010,
19458
- sender_amount: 5240,
19459
- partner_fee_amount: 150,
19460
- flat_fee: 50,
19461
- total_fee_amount: 1.53,
19462
- payer_rules: {
19463
- pix_allowed_tax_ids: ["149.476.037-68"]
19464
- },
19465
- blockchain_wallet_id: "bw_000000000000",
19466
- instance_id: "in_000000000000",
19467
- partner_fee_id: "pf_000000000000",
19468
- billing_fee: 100,
19469
- created_at: "2021-01-01T00:00:00Z",
19470
- updated_at: "2021-01-01T00:00:00Z"
19471
- };
19472
- fetchMock.mockResponseOnce(JSON.stringify(mockedPayinQuote), {
19473
- headers: { "Content-Type": "application/json" }
19474
- });
19475
- const { data, error } = yield blindpay.payins.quotes.get("qu_000000000000");
19476
- globalExpect(error).toBeNull();
19477
- globalExpect(data).toEqual(mockedPayinQuote);
19478
- }));
19479
- });
19480
- describe("List payin quotes", () => {
19481
- it("should get a payin quote", () => __async(null, null, function* () {
19482
- const mockedPayinQuote = {
19483
- data: [
19484
- {
19485
- id: "qu_000000000000",
19486
- payment_method: "pix",
19487
- token: "USDC",
19488
- request_amount: 1e3,
19489
- cover_fees: true,
19490
- currency_type: "sender",
19491
- expires_at: 1712958191,
19492
- currency: "BRL",
19493
- commercial_quotation: 495,
19494
- blindpay_quotation: 505,
19495
- receiver_amount: 1010,
19496
- sender_amount: 5240,
19497
- partner_fee_amount: 150,
19498
- flat_fee: 50,
19499
- total_fee_amount: 1.53,
19500
- payer_rules: {
19501
- pix_allowed_tax_ids: ["149.476.037-68"]
19502
- },
19503
- blockchain_wallet_id: "bw_000000000000",
19504
- instance_id: "in_000000000000",
19505
- partner_fee_id: "pf_000000000000",
19506
- billing_fee: 100,
19507
- created_at: "2021-01-01T00:00:00Z",
19508
- updated_at: "2021-01-01T00:00:00Z"
19509
- }
19510
- ],
19511
- pagination: {
19512
- has_more: true,
19513
- next_page: "qu_123",
19514
- prev_page: "qu_123"
19515
- }
19516
- };
19517
- fetchMock.mockResponseOnce(JSON.stringify(mockedPayinQuote), {
19518
- headers: { "Content-Type": "application/json" }
19519
- });
19520
- const { data, error } = yield blindpay.payins.quotes.list({
19521
- blockchain_wallet_id: "bw_000000000000",
19522
- payment_method: "pix",
19523
- token: "USDC",
19524
- receiver_id: "re_000000000000"
19525
- });
19526
- globalExpect(error).toBeNull();
19527
- globalExpect(data).toEqual(mockedPayinQuote);
19528
- }));
19529
- });
19530
19424
  });
19531
19425
  /*! Bundled license information:
19532
19426
 
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-WH2VNZE7.mjs";
11
+ } from "../../chunk-I4KOWV46.mjs";
12
12
  import "../../chunk-FG25JHDX.mjs";
13
13
  import "../../chunk-QGNLMN6Z.mjs";
14
14
  import "../../chunk-UC57SCKQ.mjs";
@@ -17,12 +17,12 @@ import "../../chunk-67XECGMJ.mjs";
17
17
  import "../../chunk-Z6EYX4D3.mjs";
18
18
  import "../../chunk-LEPGLH7Q.mjs";
19
19
  import "../../chunk-RC5NN5UF.mjs";
20
- import "../../chunk-W7NJUABI.mjs";
21
- import "../../chunk-VRA5HP7F.mjs";
22
- import "../../chunk-VBZHAPK7.mjs";
20
+ import "../../chunk-VGU72ZNI.mjs";
21
+ import "../../chunk-E7M4CJKR.mjs";
22
+ import "../../chunk-VOB7TMKL.mjs";
23
23
  import "../../chunk-LRHWT4JU.mjs";
24
- import "../../chunk-CPOSU35L.mjs";
25
24
  import "../../chunk-U7CKUUO7.mjs";
25
+ import "../../chunk-CPOSU35L.mjs";
26
26
  import "../../chunk-B5T7AQLH.mjs";
27
27
  import {
28
28
  __async,
@@ -90,92 +90,6 @@ var require_payins_quotes_test = __commonJS({
90
90
  globalExpect(data).toEqual(mockedFxRate);
91
91
  }));
92
92
  });
93
- describe("Get payin quote", () => {
94
- it("should get a payin quote", () => __async(null, null, function* () {
95
- const mockedPayinQuote = {
96
- id: "qu_000000000000",
97
- payment_method: "pix",
98
- token: "USDC",
99
- request_amount: 1e3,
100
- cover_fees: true,
101
- currency_type: "sender",
102
- expires_at: 1712958191,
103
- currency: "BRL",
104
- commercial_quotation: 495,
105
- blindpay_quotation: 505,
106
- receiver_amount: 1010,
107
- sender_amount: 5240,
108
- partner_fee_amount: 150,
109
- flat_fee: 50,
110
- total_fee_amount: 1.53,
111
- payer_rules: {
112
- pix_allowed_tax_ids: ["149.476.037-68"]
113
- },
114
- blockchain_wallet_id: "bw_000000000000",
115
- instance_id: "in_000000000000",
116
- partner_fee_id: "pf_000000000000",
117
- billing_fee: 100,
118
- created_at: "2021-01-01T00:00:00Z",
119
- updated_at: "2021-01-01T00:00:00Z"
120
- };
121
- fetchMock.mockResponseOnce(JSON.stringify(mockedPayinQuote), {
122
- headers: { "Content-Type": "application/json" }
123
- });
124
- const { data, error } = yield blindpay.payins.quotes.get("qu_000000000000");
125
- globalExpect(error).toBeNull();
126
- globalExpect(data).toEqual(mockedPayinQuote);
127
- }));
128
- });
129
- describe("List payin quotes", () => {
130
- it("should get a payin quote", () => __async(null, null, function* () {
131
- const mockedPayinQuote = {
132
- data: [
133
- {
134
- id: "qu_000000000000",
135
- payment_method: "pix",
136
- token: "USDC",
137
- request_amount: 1e3,
138
- cover_fees: true,
139
- currency_type: "sender",
140
- expires_at: 1712958191,
141
- currency: "BRL",
142
- commercial_quotation: 495,
143
- blindpay_quotation: 505,
144
- receiver_amount: 1010,
145
- sender_amount: 5240,
146
- partner_fee_amount: 150,
147
- flat_fee: 50,
148
- total_fee_amount: 1.53,
149
- payer_rules: {
150
- pix_allowed_tax_ids: ["149.476.037-68"]
151
- },
152
- blockchain_wallet_id: "bw_000000000000",
153
- instance_id: "in_000000000000",
154
- partner_fee_id: "pf_000000000000",
155
- billing_fee: 100,
156
- created_at: "2021-01-01T00:00:00Z",
157
- updated_at: "2021-01-01T00:00:00Z"
158
- }
159
- ],
160
- pagination: {
161
- has_more: true,
162
- next_page: "qu_123",
163
- prev_page: "qu_123"
164
- }
165
- };
166
- fetchMock.mockResponseOnce(JSON.stringify(mockedPayinQuote), {
167
- headers: { "Content-Type": "application/json" }
168
- });
169
- const { data, error } = yield blindpay.payins.quotes.list({
170
- blockchain_wallet_id: "bw_000000000000",
171
- payment_method: "pix",
172
- token: "USDC",
173
- receiver_id: "re_000000000000"
174
- });
175
- globalExpect(error).toBeNull();
176
- globalExpect(data).toEqual(mockedPayinQuote);
177
- }));
178
- });
179
93
  });
180
94
  }
181
95
  });