@infrab4a/connect 5.4.1-beta.0 → 5.5.1-beta.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 (53) hide show
  1. package/index.cjs.js +1272 -162
  2. package/index.esm.js +1263 -163
  3. package/package.json +1 -1
  4. package/src/domain/catalog/models/category-brand.d.ts +17 -0
  5. package/src/domain/catalog/models/index.d.ts +1 -0
  6. package/src/domain/catalog/models/product-base.d.ts +1 -0
  7. package/src/domain/catalog/models/product-review.d.ts +2 -0
  8. package/src/domain/catalog/models/product.d.ts +1 -0
  9. package/src/domain/catalog/repositories/category-brand.repository.d.ts +4 -0
  10. package/src/domain/catalog/repositories/index.d.ts +2 -0
  11. package/src/domain/catalog/repositories/product-catalog.repository.d.ts +17 -0
  12. package/src/domain/shopping/enums/index.d.ts +1 -0
  13. package/src/domain/shopping/enums/order-payment-status.enum.d.ts +10 -0
  14. package/src/domain/shopping/enums/payment-providers.enum.d.ts +2 -1
  15. package/src/domain/shopping/factories/index.d.ts +1 -0
  16. package/src/domain/shopping/factories/mercado-pago-payment-method.factory.d.ts +11 -0
  17. package/src/domain/shopping/factories/payment-provider.factory.d.ts +2 -0
  18. package/src/domain/shopping/models/order.d.ts +1 -1
  19. package/src/domain/shopping/models/payment-transaction.d.ts +2 -0
  20. package/src/domain/shopping/models/payment.d.ts +1 -0
  21. package/src/domain/shopping/services/antifraud-card.service.d.ts +2 -0
  22. package/src/domain/shopping/types/checkout-paylod-request.type.d.ts +2 -7
  23. package/src/domain/shopping/types/index.d.ts +2 -0
  24. package/src/domain/shopping/types/mercado-pago-card.type.d.ts +14 -0
  25. package/src/domain/shopping/types/mercado-pago-credentials.type.d.ts +5 -0
  26. package/src/domain/shopping/types/payment-card-info.type.d.ts +3 -0
  27. package/src/infra/firebase/firestore/repositories/catalog/category-brand-firestore.repository.d.ts +7 -0
  28. package/src/infra/firebase/firestore/repositories/catalog/index.d.ts +1 -0
  29. package/src/infra/hasura-graphql/models/index.d.ts +1 -0
  30. package/src/infra/hasura-graphql/models/product-catalog-hasura-graphql.d.ts +16 -0
  31. package/src/infra/hasura-graphql/models/variant-hasura-graphql.d.ts +7 -0
  32. package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +1 -0
  33. package/src/infra/hasura-graphql/repositories/catalog/product-catalog-hasura-graphql.repository.d.ts +22 -0
  34. package/src/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +1 -0
  35. package/src/infra/index.d.ts +1 -0
  36. package/src/infra/mercado-pago/adapters/index.d.ts +3 -0
  37. package/src/infra/mercado-pago/adapters/mercado-pago-boleto-payment-axios.adapter.d.ts +8 -0
  38. package/src/infra/mercado-pago/adapters/mercado-pago-card-payment-axios.adapter.d.ts +20 -0
  39. package/src/infra/mercado-pago/adapters/mercado-pago-pix-payment-axios.adapter.d.ts +7 -0
  40. package/src/infra/mercado-pago/enums/index.d.ts +2 -0
  41. package/src/infra/mercado-pago/enums/mercado-pago-status-detail.enum.d.ts +33 -0
  42. package/src/infra/mercado-pago/enums/mercado-pago-status.enum.d.ts +10 -0
  43. package/src/infra/mercado-pago/helpers/index.d.ts +2 -0
  44. package/src/infra/mercado-pago/helpers/mercado-pago-request.helper.d.ts +60 -0
  45. package/src/infra/mercado-pago/helpers/mercado-pago-response.helper.d.ts +10 -0
  46. package/src/infra/mercado-pago/index.d.ts +4 -0
  47. package/src/infra/mercado-pago/types/index.d.ts +3 -0
  48. package/src/infra/mercado-pago/types/mercado-pago-request.type.d.ts +1 -0
  49. package/src/infra/mercado-pago/types/mercado-pago-response.type.d.ts +188 -0
  50. package/src/infra/mercado-pago/types/mercado-pago-status-detail.type.d.ts +2 -0
  51. package/src/infra/mercado-pago/types/mercado-pago-status.type.d.ts +2 -0
  52. package/src/infra/pagarme/adapters/helpers/pagarme-v5-request.helper.d.ts +1 -0
  53. package/src/infra/pagarme/types/v5/pagarmev5-order-request-payload.type.d.ts +3 -1
@@ -0,0 +1,188 @@
1
+ import { MercadoPagoStatusDetail } from './mercado-pago-status-detail.type';
2
+ import { MercadoPagoStatus } from './mercado-pago-status.type';
3
+ export type MercadoPagoResponse = {
4
+ id: number;
5
+ date_created?: string;
6
+ date_approved?: string;
7
+ date_last_updated?: string;
8
+ date_of_expiration?: string;
9
+ money_release_date?: string;
10
+ money_release_status?: string;
11
+ operation_type?: string;
12
+ issuer_id?: string;
13
+ payment_method_id?: string;
14
+ payment_type_id?: string;
15
+ payment_method?: {
16
+ id?: string;
17
+ type?: string;
18
+ issuer_id?: string;
19
+ data?: {
20
+ routing_data?: {
21
+ merchant_account_id?: string;
22
+ };
23
+ };
24
+ };
25
+ status: MercadoPagoStatus;
26
+ status_detail?: MercadoPagoStatusDetail;
27
+ currency_id?: string;
28
+ description?: string;
29
+ live_mode?: boolean;
30
+ sponsor_id?: string;
31
+ authorization_code?: string;
32
+ money_release_schema?: string;
33
+ taxes_amount?: number;
34
+ counter_currency?: string;
35
+ brand_id?: any;
36
+ shipping_amount?: number;
37
+ build_version?: string;
38
+ pos_id?: any;
39
+ store_id?: any;
40
+ integrator_id?: any;
41
+ platform_id?: any;
42
+ corporation_id?: any;
43
+ payer?: {
44
+ type?: string;
45
+ id?: string;
46
+ operator_id?: string;
47
+ email?: string;
48
+ identification: {
49
+ number?: string;
50
+ type?: string;
51
+ };
52
+ phone: {
53
+ number?: string;
54
+ extension?: string;
55
+ area_code?: string;
56
+ };
57
+ first_name?: string;
58
+ last_name?: string;
59
+ entity_type?: string;
60
+ };
61
+ collector_id?: number;
62
+ marketplace_owner?: any;
63
+ metadata?: {
64
+ order_number?: string;
65
+ };
66
+ additional_info?: {
67
+ items?: [
68
+ {
69
+ id?: string;
70
+ title?: string;
71
+ description?: string;
72
+ picture_url?: string;
73
+ category_id?: string;
74
+ quantity?: string;
75
+ unit_price?: string;
76
+ }
77
+ ];
78
+ payer?: {
79
+ phone: {
80
+ area_code?: string;
81
+ number?: string;
82
+ };
83
+ address: {
84
+ zip_code?: string;
85
+ street_name?: string;
86
+ street_number?: string;
87
+ };
88
+ first_name?: string;
89
+ last_name?: string;
90
+ registration_date?: string;
91
+ };
92
+ available_balance?: any;
93
+ nsu_processadora?: any;
94
+ authentication_code?: any;
95
+ };
96
+ order?: any;
97
+ external_reference?: string;
98
+ transaction_amount?: number;
99
+ transaction_amount_refunded?: number;
100
+ coupon_amount?: number;
101
+ differential_pricing_id?: any;
102
+ financing_group?: any;
103
+ deduction_schema?: string;
104
+ installments?: number;
105
+ barcode?: {
106
+ content?: string;
107
+ };
108
+ transaction_details?: {
109
+ payment_method_reference_id?: any;
110
+ acquirer_reference?: any;
111
+ net_received_amount?: number;
112
+ total_paid_amount?: number;
113
+ overpaid_amount?: number;
114
+ external_resource_url?: any;
115
+ installment_amount?: number;
116
+ financial_institution?: any;
117
+ payable_deferral_period?: any;
118
+ digitable_line?: string;
119
+ barcode?: {
120
+ content?: string;
121
+ };
122
+ verification_code?: string;
123
+ };
124
+ fee_details?: any[];
125
+ charges_details?: [
126
+ {
127
+ id?: string;
128
+ name?: string;
129
+ type?: string;
130
+ accounts?: {
131
+ from?: string;
132
+ to?: string;
133
+ };
134
+ client_id?: number;
135
+ date_created?: string;
136
+ last_updated?: string;
137
+ amounts?: {
138
+ original?: number;
139
+ refunded?: number;
140
+ };
141
+ metadata?: any;
142
+ reserve_id?: any;
143
+ refund_charges?: any[];
144
+ }
145
+ ];
146
+ captured?: boolean;
147
+ binary_mode?: boolean;
148
+ call_for_authorize_id?: any;
149
+ statement_descriptor?: string;
150
+ card?: {
151
+ id?: string;
152
+ first_six_digits?: string;
153
+ last_four_digits?: string;
154
+ bin?: string;
155
+ expiration_month?: number;
156
+ expiration_year?: number;
157
+ date_created?: string;
158
+ date_last_updated?: string;
159
+ cardholder?: {
160
+ name?: string;
161
+ identification?: {
162
+ number?: string;
163
+ type?: string;
164
+ };
165
+ };
166
+ };
167
+ notification_url?: string;
168
+ refunds?: any;
169
+ processing_mode?: string;
170
+ merchant_account_id?: any;
171
+ merchant_number?: any;
172
+ acquirer_reconciliation?: any[];
173
+ point_of_interaction?: {
174
+ type?: string;
175
+ business_info?: {
176
+ unit?: string;
177
+ sub_unit?: string;
178
+ branch?: string;
179
+ };
180
+ transaction_data?: {
181
+ qr_code?: string;
182
+ qr_code_base64?: string;
183
+ ticket_url?: string;
184
+ };
185
+ };
186
+ accounts_info?: any;
187
+ tags?: any;
188
+ };
@@ -0,0 +1,2 @@
1
+ import { MercadoPagoStatusDetailEnum } from '../enums';
2
+ export type MercadoPagoStatusDetail = `${MercadoPagoStatusDetailEnum}`;
@@ -0,0 +1,2 @@
1
+ import { MercadoPagoStatusEnum } from '../enums';
2
+ export type MercadoPagoStatus = `${MercadoPagoStatusEnum}`;
@@ -9,4 +9,5 @@ export declare class PagarMeV5RequestHelper {
9
9
  private static getPixOrder;
10
10
  private static getBoletoOrder;
11
11
  private static getCardOrder;
12
+ private static buildAdditionalInfo;
12
13
  }
@@ -3,6 +3,7 @@ export type PagarMeV5RequestPayload = {
3
3
  customer: PagarMeV5OrderCustomer;
4
4
  payments: PagarMeV5OrderPaymentInfo[];
5
5
  shipping?: PagarMeV5OrderShippingInfo;
6
+ antifraude_enabled?: boolean;
6
7
  };
7
8
  export type PagarMeV5OrderCustomer = {
8
9
  name: string;
@@ -44,7 +45,8 @@ export type PagarMeV5OrderPaymentInfo = {
44
45
  credit_card?: PagarMeV5OrderPaymentCardInfo;
45
46
  };
46
47
  export type PagarMeV5OrderPaymentPixInfo = {
47
- expires_at: string;
48
+ expires_at?: string;
49
+ expires_in?: number;
48
50
  additional_information?: [
49
51
  {
50
52
  name: string;