@infrab4a/connect 5.4.0-beta.8 → 5.4.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.
- package/index.cjs.js +671 -623
- package/index.esm.js +670 -621
- package/package.json +3 -3
- package/src/domain/catalog/models/category-brand.d.ts +17 -0
- package/src/domain/catalog/models/index.d.ts +1 -0
- package/src/domain/catalog/models/product-base.d.ts +0 -1
- package/src/domain/catalog/models/product.d.ts +0 -1
- package/src/domain/catalog/repositories/category-brand.repository.d.ts +4 -0
- package/src/domain/catalog/repositories/index.d.ts +1 -1
- package/src/domain/shopping/enums/index.d.ts +1 -0
- package/src/domain/shopping/enums/order-payment-status.enum.d.ts +10 -0
- package/src/domain/shopping/enums/payment-providers.enum.d.ts +2 -1
- package/src/domain/shopping/factories/index.d.ts +1 -0
- package/src/domain/shopping/factories/mercado-pago-payment-method.factory.d.ts +11 -0
- package/src/domain/shopping/factories/payment-provider.factory.d.ts +2 -0
- package/src/domain/shopping/models/order.d.ts +7 -1
- package/src/domain/shopping/models/payment-transaction.d.ts +2 -0
- package/src/domain/shopping/models/payment.d.ts +1 -0
- package/src/domain/shopping/services/antifraud-card.service.d.ts +2 -0
- package/src/domain/shopping/types/checkout-paylod-request.type.d.ts +2 -7
- package/src/domain/shopping/types/index.d.ts +2 -0
- package/src/domain/shopping/types/mercado-pago-card.type.d.ts +14 -0
- package/src/domain/shopping/types/mercado-pago-credentials.type.d.ts +5 -0
- package/src/domain/shopping/types/payment-card-info.type.d.ts +3 -0
- package/src/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +1 -1
- package/src/infra/firebase/firestore/repositories/catalog/category-brand-firestore.repository.d.ts +7 -0
- package/src/infra/firebase/firestore/repositories/catalog/index.d.ts +1 -0
- package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +0 -1
- package/src/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +0 -1
- package/src/infra/index.d.ts +1 -0
- package/src/infra/mercado-pago/adapters/index.d.ts +3 -0
- package/src/infra/mercado-pago/adapters/mercado-pago-boleto-payment-axios.adapter.d.ts +8 -0
- package/src/infra/mercado-pago/adapters/mercado-pago-card-payment-axios.adapter.d.ts +20 -0
- package/src/infra/mercado-pago/adapters/mercado-pago-pix-payment-axios.adapter.d.ts +7 -0
- package/src/infra/mercado-pago/enums/index.d.ts +2 -0
- package/src/infra/mercado-pago/enums/mercado-pago-status-detail.enum.d.ts +33 -0
- package/src/infra/mercado-pago/enums/mercado-pago-status.enum.d.ts +10 -0
- package/src/infra/mercado-pago/helpers/index.d.ts +2 -0
- package/src/infra/mercado-pago/helpers/mercado-pago-request.helper.d.ts +60 -0
- package/src/infra/mercado-pago/helpers/mercado-pago-response.helper.d.ts +10 -0
- package/src/infra/mercado-pago/index.d.ts +4 -0
- package/src/infra/mercado-pago/types/index.d.ts +3 -0
- package/src/infra/mercado-pago/types/mercado-pago-request.type.d.ts +1 -0
- package/src/infra/mercado-pago/types/mercado-pago-response.type.d.ts +188 -0
- package/src/infra/mercado-pago/types/mercado-pago-status-detail.type.d.ts +2 -0
- package/src/infra/mercado-pago/types/mercado-pago-status.type.d.ts +2 -0
- package/src/infra/pagarme/adapters/helpers/pagarme-v5-request.helper.d.ts +1 -0
- package/src/infra/pagarme/types/v5/pagarmev5-order-request-payload.type.d.ts +1 -0
- package/src/utils/index.d.ts +2 -2
- package/src/domain/catalog/repositories/product-catalog.repository.d.ts +0 -17
- package/src/infra/hasura-graphql/repositories/catalog/product-catalog-hasura-graphql.repository.d.ts +0 -20
|
@@ -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
|
+
};
|
package/src/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { add, addBusinessDays, addDays, addMonths, addYears, Duration, endOfDay, format, formatISO9075, parseISO, startOfDay, sub, subDays } from 'date-fns';
|
|
2
|
-
import { formatInTimeZone
|
|
2
|
+
import { formatInTimeZone } from 'date-fns-tz';
|
|
3
3
|
import { chunk, each, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set, sortBy, unset } from 'lodash';
|
|
4
4
|
export type DateDuration = Duration;
|
|
5
5
|
export * from './circular-dependencies';
|
|
@@ -14,4 +14,4 @@ export * from './obs-emitter';
|
|
|
14
14
|
export * from './parse-datetime';
|
|
15
15
|
export * from './serialize';
|
|
16
16
|
export * from './types';
|
|
17
|
-
export { add, addBusinessDays, addDays, addMonths, addYears,
|
|
17
|
+
export { add, addBusinessDays, addDays, addMonths, addYears, formatInTimeZone, chunk, each, endOfDay, format, formatISO9075, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, parseISO, pick, set, sortBy, startOfDay, sub, subDays, unset, };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ProductHasuraGraphQL } from '../../../infra';
|
|
2
|
-
import { FindRepositoryParams, RepositoryCacheOptions, RepositoryFindResult } from '../../generic';
|
|
3
|
-
import { Product, ProductGender } from '../models';
|
|
4
|
-
export interface ProductCatalogRepository {
|
|
5
|
-
get({ id }: {
|
|
6
|
-
id: string;
|
|
7
|
-
}): Promise<Product>;
|
|
8
|
-
find(params?: FindRepositoryParams<ProductHasuraGraphQL>, optionsParams?: {
|
|
9
|
-
cache?: RepositoryCacheOptions;
|
|
10
|
-
}): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
|
|
11
|
-
getByEAN(EAN: string, options?: {
|
|
12
|
-
cache?: RepositoryCacheOptions;
|
|
13
|
-
}): Promise<Product>;
|
|
14
|
-
findCatalog(params: FindRepositoryParams<Product>, mainGender?: Extract<ProductGender, 'female' | 'male' | 'unisex'>, options?: {
|
|
15
|
-
cache?: RepositoryCacheOptions;
|
|
16
|
-
}): Promise<RepositoryFindResult<Product>>;
|
|
17
|
-
}
|
package/src/infra/hasura-graphql/repositories/catalog/product-catalog-hasura-graphql.repository.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FindRepositoryParams, Product, ProductCatalogRepository, ProductGender, RepositoryCacheOptions, RepositoryFindResult } from '../../../../domain';
|
|
2
|
-
import { HasuraConstructorParams } from '../../mixins';
|
|
3
|
-
import { ProductHasuraGraphQL } from '../../models';
|
|
4
|
-
declare const ProductCatalogHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<ProductHasuraGraphQL> & import("../../../../domain").FindRepository<ProductHasuraGraphQL, FindRepositoryParams<ProductHasuraGraphQL>>, any[]>;
|
|
5
|
-
export declare class ProductCatalogHasuraGraphQLRepository extends ProductCatalogHasuraGraphQLRepository_base implements ProductCatalogRepository {
|
|
6
|
-
constructor({ endpoint, authOptions, interceptors, cache, }: Pick<HasuraConstructorParams<ProductHasuraGraphQL>, 'endpoint' | 'authOptions' | 'interceptors' | 'cache'>);
|
|
7
|
-
get({ id }: {
|
|
8
|
-
id: string;
|
|
9
|
-
}): Promise<Product>;
|
|
10
|
-
getByEAN(EAN: string, options?: {
|
|
11
|
-
cache?: RepositoryCacheOptions;
|
|
12
|
-
}): Promise<Product>;
|
|
13
|
-
find(params?: FindRepositoryParams<ProductHasuraGraphQL>, optionsParams?: {
|
|
14
|
-
cache?: RepositoryCacheOptions;
|
|
15
|
-
}): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
|
|
16
|
-
findCatalog(params: FindRepositoryParams<ProductHasuraGraphQL>, mainGender?: Extract<ProductGender, 'female' | 'male'>, options?: {
|
|
17
|
-
cache?: RepositoryCacheOptions;
|
|
18
|
-
}): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
|
|
19
|
-
}
|
|
20
|
-
export {};
|