@infrab4a/connect 5.4.0-beta.2 → 5.4.0-beta.21

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 (45) hide show
  1. package/index.cjs.js +638 -619
  2. package/index.esm.js +637 -617
  3. package/package.json +3 -3
  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.d.ts +0 -1
  7. package/src/domain/catalog/models/variant.d.ts +0 -2
  8. package/src/domain/catalog/repositories/category-brand.repository.d.ts +4 -0
  9. package/src/domain/catalog/repositories/index.d.ts +1 -1
  10. package/src/domain/shopping/enums/payment-providers.enum.d.ts +2 -1
  11. package/src/domain/shopping/factories/index.d.ts +1 -0
  12. package/src/domain/shopping/factories/mercado-pago-payment-method.factory.d.ts +10 -0
  13. package/src/domain/shopping/factories/payment-provider.factory.d.ts +2 -0
  14. package/src/domain/shopping/models/order.d.ts +7 -0
  15. package/src/domain/shopping/models/payment-transaction.d.ts +2 -0
  16. package/src/domain/shopping/models/payment.d.ts +1 -0
  17. package/src/domain/shopping/services/antifraud-card.service.d.ts +2 -0
  18. package/src/domain/shopping/types/checkout-paylod-request.type.d.ts +2 -7
  19. package/src/domain/shopping/types/index.d.ts +2 -0
  20. package/src/domain/shopping/types/mercado-pago-card.type.d.ts +3 -0
  21. package/src/domain/shopping/types/mercado-pago-credentials.type.d.ts +5 -0
  22. package/src/domain/shopping/types/payment-card-info.type.d.ts +2 -0
  23. package/src/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +1 -1
  24. package/src/infra/firebase/firestore/repositories/catalog/category-brand-firestore.repository.d.ts +7 -0
  25. package/src/infra/firebase/firestore/repositories/catalog/index.d.ts +1 -0
  26. package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +0 -1
  27. package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +0 -1
  28. package/src/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +0 -1
  29. package/src/infra/index.d.ts +1 -0
  30. package/src/infra/mercado-pago/adapters/index.d.ts +3 -0
  31. package/src/infra/mercado-pago/adapters/mercado-pago-boleto-payment-axios.adapter.d.ts +8 -0
  32. package/src/infra/mercado-pago/adapters/mercado-pago-card-payment-axios.adapter.d.ts +19 -0
  33. package/src/infra/mercado-pago/adapters/mercado-pago-pix-payment-axios.adapter.d.ts +7 -0
  34. package/src/infra/mercado-pago/helpers/index.d.ts +2 -0
  35. package/src/infra/mercado-pago/helpers/mercado-pago-request.helper.d.ts +69 -0
  36. package/src/infra/mercado-pago/helpers/mercado-pago-response.helper.d.ts +8 -0
  37. package/src/infra/mercado-pago/index.d.ts +3 -0
  38. package/src/infra/mercado-pago/types/index.d.ts +2 -0
  39. package/src/infra/mercado-pago/types/mercado-pago-request.type.d.ts +1 -0
  40. package/src/infra/mercado-pago/types/mercado-pago-response.type.d.ts +180 -0
  41. package/src/infra/pagarme/adapters/helpers/pagarme-v5-request.helper.d.ts +1 -0
  42. package/src/infra/pagarme/types/v5/pagarmev5-order-request-payload.type.d.ts +1 -0
  43. package/src/utils/index.d.ts +2 -2
  44. package/src/domain/catalog/repositories/product-catalog.repository.d.ts +0 -13
  45. package/src/infra/hasura-graphql/repositories/catalog/product-catalog-hasura-graphql.repository.d.ts +0 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "5.4.0-beta.2",
3
+ "version": "5.4.0-beta.21",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -11,8 +11,8 @@
11
11
  "dependencies": {
12
12
  "axios": "^0.27.2",
13
13
  "class-transformer": "^0.5.1",
14
- "date-fns": "^2.28.0",
15
- "date-fns-tz": "^3.2.0",
14
+ "date-fns": "2.28.0",
15
+ "date-fns-tz": "2.0.1",
16
16
  "debug": "^4.3.4",
17
17
  "firebase": "^9.22.0",
18
18
  "gql-query-builder": "3.7.0",
@@ -0,0 +1,17 @@
1
+ import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
2
+ import { Shops } from './enums';
3
+ export declare class BrandCategory extends BaseModel<BrandCategory> {
4
+ id: string;
5
+ name: string;
6
+ slug: string;
7
+ brand_category: boolean;
8
+ published: boolean;
9
+ images?: string[];
10
+ brand_logo?: string;
11
+ brand_banner?: string;
12
+ brand_banner_mobile?: string;
13
+ shops: Shops[];
14
+ get glamImages(): any;
15
+ get mensImages(): any;
16
+ static get identifiersFields(): GenericIdentifier[];
17
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './category';
2
+ export * from './category-brand';
2
3
  export * from './category-collection-children';
3
4
  export * from './category-filter';
4
5
  export * from './category-product';
@@ -2,6 +2,5 @@ import { ProductBase } from './product-base';
2
2
  import { Variant } from './variant';
3
3
  export declare class Product extends ProductBase<Product> {
4
4
  hasVariants: boolean;
5
- showVariants: boolean;
6
5
  variants?: Variant[];
7
6
  }
@@ -1,10 +1,8 @@
1
- import { Product } from './product';
2
1
  import { ProductBase } from './product-base';
3
2
  import { VariantGrade } from './types';
4
3
  export type ProductVariantIdentifiers = 'id' | 'productId';
5
4
  export declare class Variant extends ProductBase<Variant, ProductVariantIdentifiers> {
6
5
  productId: string;
7
6
  grade?: VariantGrade[];
8
- product?: Product;
9
7
  static get identifiersFields(): ProductVariantIdentifiers[];
10
8
  }
@@ -0,0 +1,4 @@
1
+ import { CrudRepository } from '../../generic/repository/crud.repository';
2
+ import { BrandCategory } from '../models';
3
+ export interface BrandCategoryRepository extends CrudRepository<BrandCategory> {
4
+ }
@@ -1,3 +1,4 @@
1
+ export * from './category-brand.repository';
1
2
  export * from './category-collection-children.repository';
2
3
  export * from './category-filter.repository';
3
4
  export * from './category-product.repository';
@@ -5,7 +6,6 @@ export * from './category.repository';
5
6
  export * from './filter-option.repository';
6
7
  export * from './filter.repository';
7
8
  export * from './group.repository';
8
- export * from './product-catalog.repository';
9
9
  export * from './product-errors.repository';
10
10
  export * from './product-reviews.repository';
11
11
  export * from './product-stock-notification.repository';
@@ -1,5 +1,6 @@
1
1
  export declare enum PaymentProviders {
2
2
  PAGARME = "pagarMe",
3
3
  ADYEN = "adyen",
4
- GLAMPOINTS = "glampoints"
4
+ GLAMPOINTS = "glampoints",
5
+ MERCADOPAGO = "mercadoPago"
5
6
  }
@@ -1,5 +1,6 @@
1
1
  export * from './adyen-payment-method.factory';
2
2
  export * from './antifraud-provider.factory';
3
3
  export * from './glampoints-payment-method.factory';
4
+ export * from './mercado-pago-payment-method.factory';
4
5
  export * from './pagarme-payment-method.factory';
5
6
  export * from './payment-provider.factory';
@@ -0,0 +1,10 @@
1
+ import { PaymentProviderCard, PaymentProviderPix } from '../interfaces';
2
+ import { MercadoPagoCard } from '../types';
3
+ import { BasePaymentMethodFactory } from './base-payment-method.factory';
4
+ type MercadoPagoPaymentFactoryMethods = {
5
+ card?: PaymentProviderCard<MercadoPagoCard>;
6
+ pix?: PaymentProviderPix;
7
+ };
8
+ export declare class MercadoPagoPaymentMethodFactory extends BasePaymentMethodFactory<MercadoPagoPaymentFactoryMethods> {
9
+ }
10
+ export {};
@@ -1,11 +1,13 @@
1
1
  import { PaymentProvider } from '../types';
2
2
  import { AdyenPaymentMethodFactory } from './adyen-payment-method.factory';
3
3
  import { GlampointsPaymentMethodFactory } from './glampoints-payment-method.factory';
4
+ import { MercadoPagoPaymentMethodFactory } from './mercado-pago-payment-method.factory';
4
5
  import { PagarmePaymentMethodFactory } from './pagarme-payment-method.factory';
5
6
  type PaymentProviderFactoryFactories = {
6
7
  pagarMe?: PagarmePaymentMethodFactory;
7
8
  adyen?: AdyenPaymentMethodFactory;
8
9
  glampoints?: GlampointsPaymentMethodFactory;
10
+ mercadoPago?: MercadoPagoPaymentMethodFactory;
9
11
  };
10
12
  export declare class PaymentProviderFactory {
11
13
  private readonly paymentProviders;
@@ -14,4 +14,11 @@ export declare class Order extends Checkout {
14
14
  reshipmentOrderId?: string;
15
15
  isChange?: boolean;
16
16
  isReshipment?: boolean;
17
+ pedidov?: number;
18
+ metadata?: {
19
+ ip?: string;
20
+ userAgent?: string;
21
+ plataform?: string;
22
+ origin?: string;
23
+ };
17
24
  }
@@ -49,6 +49,8 @@ export declare class PaymentTransaction extends BaseModel<PaymentTransaction> {
49
49
  card_brand?: string;
50
50
  card_pin_mode?: string;
51
51
  card_magstripe_fallback?: boolean;
52
+ card_expiration_month?: string;
53
+ card_expiration_year?: string;
52
54
  cvm_pin?: boolean;
53
55
  postback_url?: string;
54
56
  payment_method?: string;
@@ -6,6 +6,7 @@ export declare class Payment extends BaseModel<Payment> {
6
6
  checkoutId: string;
7
7
  orderId?: string;
8
8
  pagarMeOrderId?: string;
9
+ mercadoPagoId?: number;
9
10
  totalPrice: number;
10
11
  userId: string;
11
12
  paymentProvider: PaymentProvider;
@@ -10,6 +10,8 @@ export declare class AntifraudCardService implements AntifraudProvider {
10
10
  private LIMIT_BLOCKED_ORDERS_DAY;
11
11
  constructor(orderRepository: OrderRepository, orderBlockedRepository: OrderBlockedRepository);
12
12
  validate(checkout: Checkout, card: PaymentCardInfo): Promise<Boolean>;
13
+ private setLimitsByUserType;
14
+ private getLimitsByUserType;
13
15
  private validateBlockedOrderAttempts;
14
16
  private validateDayAndWeekOrderLimits;
15
17
  private verifyBlockedOrderAttempts;
@@ -1,14 +1,9 @@
1
- import { PaymentProvider } from './payment-provider.type';
1
+ import { PaymentCardInfo } from './payment-card-info.type';
2
2
  export type CheckoutPayloadRequest = {
3
3
  checkoutId: string;
4
4
  shopId: string;
5
- paymentProvider: PaymentProvider;
6
5
  isChange?: boolean;
7
- card?: {
8
- installments: number;
9
- cardId: string;
10
- cardCvv?: string;
11
- };
6
+ cards?: PaymentCardInfo[];
12
7
  boleto?: boolean;
13
8
  pix?: boolean;
14
9
  applicationVersion?: string;
@@ -6,6 +6,8 @@ export * from './checkout-paylod-request.type';
6
6
  export * from './checkout-response.type';
7
7
  export * from './checkout-stock-validation.type';
8
8
  export * from './glam-credentials.type';
9
+ export * from './mercado-pago-card.type';
10
+ export * from './mercado-pago-credentials.type';
9
11
  export * from './order-tracking-events.type';
10
12
  export * from './pagarme-card.type';
11
13
  export * from './pagarme-credentials-v5.type';
@@ -0,0 +1,3 @@
1
+ import { BaseCard } from './base-card.type';
2
+ export interface MercadoPagoCard extends BaseCard {
3
+ }
@@ -0,0 +1,5 @@
1
+ export type MercadoPagoCredentials = {
2
+ url: string;
3
+ api_key: string;
4
+ postback: string;
5
+ };
@@ -1,7 +1,9 @@
1
+ import { PaymentProviders } from '../enums';
1
2
  export type PaymentCardInfo = {
2
3
  cardId: string;
3
4
  cardCvv?: string;
4
5
  installments: number;
5
6
  cpf?: string;
6
7
  fingerprint?: string;
8
+ paymentProvider?: PaymentProviders;
7
9
  };
@@ -5,7 +5,7 @@ import { FirestoreRepository, FirestoreSubRepository } from '../types';
5
5
  export declare const withHelpers: <TMixinBase extends MixinCtor<any, any[]> = MixinCtor<any, any[]>>(MixinBase: MixinCtor<any, any[]> & TMixinBase) => {
6
6
  new (...args: any[]): {
7
7
  [x: string]: any;
8
- toArray<T extends ModelBaseStructure<T, T["identifiersFields"][number]>>(snapShot: QuerySnapshot<T, import("firebase/firestore").DocumentData> | QueryDocumentSnapshot<T, import("firebase/firestore").DocumentData>[]): T[];
8
+ toArray<T extends ModelBaseStructure<T, T["identifiersFields"][number]>>(snapShot: QuerySnapshot<T> | QueryDocumentSnapshot<T>[]): T[];
9
9
  isSubCollection<T_1 extends ModelBaseStructure<T_1, T_1["identifiersFields"][number]>, E extends ModelBaseStructure<E, E["identifiersFields"][number]>>(repository: FirestoreRepository<T_1> | FirestoreSubRepository<T_1, E>): repository is FirestoreSubRepository<T_1, E>;
10
10
  };
11
11
  } & TMixinBase;
@@ -0,0 +1,7 @@
1
+ import { BrandCategory, BrandCategoryRepository } from '../../../../../domain';
2
+ import { FirestoreConstructorParams } from '../../mixins';
3
+ declare const BrandCategoryFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<BrandCategory> & import("../../../../../domain").CrudRepository<BrandCategory, import("../../../../../domain").CrudParams<BrandCategory>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<BrandCategory>, ...any[]]>;
4
+ export declare class BrandCategoryFirestoreRepository extends BrandCategoryFirestoreRepository_base implements BrandCategoryRepository {
5
+ constructor({ firestore, interceptors, }: Pick<FirestoreConstructorParams<BrandCategory>, 'firestore' | 'interceptors'>);
6
+ }
7
+ export {};
@@ -1,3 +1,4 @@
1
+ export * from './category-brand-firestore.repository';
1
2
  export * from './category-firestore.repository';
2
3
  export * from './group-firestore.repository';
3
4
  export * from './product-firestore.repository';
@@ -4,7 +4,6 @@ export * from './category-hasura-graphql.repository';
4
4
  export * from './category-product-hasura-graphql.repository';
5
5
  export * from './filter-hasura-graphql.repository';
6
6
  export * from './filter-option-hasura-graphql.repository';
7
- export * from './product-catalog-hasura-graphql.repository';
8
7
  export * from './product-errors-hasura-graphql.repository';
9
8
  export * from './product-hasura-graphql.repository';
10
9
  export * from './product-review-hasura-graphql.repository';
@@ -15,7 +15,6 @@ export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQL
15
15
  getBySlug(slug: string, options?: {
16
16
  cache?: RepositoryCacheOptions;
17
17
  }): Promise<ProductHasuraGraphQL>;
18
- private getBySlugVariantData;
19
18
  getByEAN(EAN: string, options?: {
20
19
  cache?: RepositoryCacheOptions;
21
20
  }): Promise<ProductHasuraGraphQL>;
@@ -8,7 +8,6 @@ export declare class VariantHasuraGraphQLRepository extends VariantHasuraGraphQL
8
8
  find(params?: FindRepositoryParams<VariantHasuraGraphQL>): Promise<RepositoryFindResult<VariantHasuraGraphQL>>;
9
9
  getByEAN(EAN: string): Promise<VariantHasuraGraphQL>;
10
10
  update(params: UpdateRepositoryParams<VariantHasuraGraphQL>): Promise<VariantHasuraGraphQL>;
11
- private updateMetadata;
12
11
  private getId;
13
12
  }
14
13
  export {};
@@ -3,5 +3,6 @@ export * from './cache';
3
3
  export * from './elasticsearch';
4
4
  export * from './firebase';
5
5
  export * from './hasura-graphql';
6
+ export * from './mercado-pago';
6
7
  export * from './pagarme';
7
8
  export * from './vertex-ai';
@@ -0,0 +1,3 @@
1
+ export * from './mercado-pago-boleto-payment-axios.adapter';
2
+ export * from './mercado-pago-card-payment-axios.adapter';
3
+ export * from './mercado-pago-pix-payment-axios.adapter';
@@ -0,0 +1,8 @@
1
+ import { Checkout, MercadoPagoCredentials, Payment, PaymentProviderBankSlip, PaymentRepository, PaymentTransaction } from '../../../domain';
2
+ export declare class MercadoPagoBankSlipAxiosAdapter implements PaymentProviderBankSlip {
3
+ private credentials;
4
+ private paymentRepository;
5
+ constructor(credentials: MercadoPagoCredentials, paymentRepository: PaymentRepository);
6
+ pay(checkout: Checkout): Promise<Payment>;
7
+ getBoletoTransaction(paymentId: number): Promise<PaymentTransaction>;
8
+ }
@@ -0,0 +1,19 @@
1
+ import { BusinessUnitEnum, CardInfo, Checkout, MercadoPagoCard, MercadoPagoCredentials, OrderBlockedRepository, Payment, PaymentCardInfo, PaymentProviderCard, PaymentRepository, PaymentTransaction, Shops, User, UserAddress } from '../../../domain';
2
+ import { MercadoPagoResponse } from '../types';
3
+ export declare class MercadoPagoCardAxiosAdapter implements PaymentProviderCard<MercadoPagoCard> {
4
+ private credentials;
5
+ private paymentRepository;
6
+ private orderBlockedRepository;
7
+ constructor(credentials: MercadoPagoCredentials, paymentRepository: PaymentRepository, orderBlockedRepository: OrderBlockedRepository);
8
+ pay(checkout: Checkout, card: PaymentCardInfo): Promise<Payment>;
9
+ addCard?(card: CardInfo, customer: User & {
10
+ billingAddress: Partial<UserAddress>;
11
+ }): Promise<MercadoPagoCard>;
12
+ getCardByToken(token: string): Promise<MercadoPagoCard>;
13
+ getCardByToken(customerId: string, token: string): Promise<MercadoPagoCard>;
14
+ createCardHash<T>(bu: BusinessUnitEnum, shop: Shops, card?: CardInfo): Promise<string | T>;
15
+ createTransaction(info: any): Promise<PaymentTransaction>;
16
+ createOrUpdateCustomer?(customer: User & {
17
+ billingAddress: Partial<UserAddress>;
18
+ }): Promise<MercadoPagoResponse>;
19
+ }
@@ -0,0 +1,7 @@
1
+ import { Checkout, MercadoPagoCredentials, Payment, PaymentProviderPix, PaymentRepository } from '../../../domain';
2
+ export declare class MercadoPagoPixAxiosAdapter implements PaymentProviderPix {
3
+ private credentials;
4
+ private paymentRepository;
5
+ constructor(credentials: MercadoPagoCredentials, paymentRepository: PaymentRepository);
6
+ pay(checkout: Checkout): Promise<Payment>;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './mercado-pago-request.helper';
2
+ export * from './mercado-pago-response.helper';
@@ -0,0 +1,69 @@
1
+ import { Checkout, PaymentCardInfo } from '../../../domain';
2
+ export declare class MercadoPagoRequestHelper {
3
+ static build(data: {
4
+ checkout: Checkout;
5
+ method: 'pix' | 'boleto' | 'credit_card';
6
+ postback: string;
7
+ card?: PaymentCardInfo;
8
+ }): {
9
+ payment_method_id: string;
10
+ date_of_expiration: string;
11
+ payer: {
12
+ first_name: string;
13
+ last_name: string;
14
+ phone: {
15
+ area_code: string;
16
+ number: string;
17
+ };
18
+ address: {
19
+ zip_code: string;
20
+ street_name: string;
21
+ street_number: string;
22
+ neighborhood: string;
23
+ city: string;
24
+ federal_unit: string;
25
+ };
26
+ };
27
+ installments: any;
28
+ token: any;
29
+ transaction_amount: number;
30
+ notification_url: string;
31
+ metadata: {
32
+ checkoutId: string;
33
+ };
34
+ statement_descriptor: string;
35
+ additional_info: {
36
+ items: {
37
+ id: string;
38
+ title: string;
39
+ description: string;
40
+ picture_url: string;
41
+ category_id: string;
42
+ quantity: number;
43
+ unit_price: number;
44
+ }[];
45
+ payer: {
46
+ first_name: string;
47
+ last_name: string;
48
+ phone: {
49
+ area_code: string;
50
+ number: string;
51
+ };
52
+ address: {
53
+ zip_code: string;
54
+ street_name: string;
55
+ street_number: string;
56
+ neighborhood: string;
57
+ city: string;
58
+ federal_unit: string;
59
+ };
60
+ };
61
+ };
62
+ };
63
+ private static buildItems;
64
+ private static buildPayer;
65
+ private static buildFullPayer;
66
+ private static buildCardPayment;
67
+ private static buildPixPayment;
68
+ private static buildBoletoPayment;
69
+ }
@@ -0,0 +1,8 @@
1
+ import { Checkout, Payment, TransactionPaymentMethods } from '../../../domain';
2
+ import { MercadoPagoResponse } from '../types';
3
+ export declare class MercadoPagoResponseHelper {
4
+ static build(method: TransactionPaymentMethods, checkout: Checkout, response: MercadoPagoResponse): Payment;
5
+ private static buildPaymentTransaction;
6
+ private static getPixReponse;
7
+ private static getCardReponse;
8
+ }
@@ -0,0 +1,3 @@
1
+ export * from './adapters';
2
+ export * from './helpers';
3
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './mercado-pago-request.type';
2
+ export * from './mercado-pago-response.type';
@@ -0,0 +1 @@
1
+ export type MercadoPagoRequest = {};
@@ -0,0 +1,180 @@
1
+ export type MercadoPagoStatusDetail = 'accredited' | 'partially_refunded' | 'pending_capture' | 'offline_process' | 'pending_contingency' | 'pending_review_manual' | 'pending_waiting_transfer' | 'pending_waiting_payment' | 'pending_challenge' | 'bank_error' | 'cc_rejected_3ds_mandatory' | 'cc_rejected_bad_filled_card_number' | 'cc_rejected_bad_filled_date' | 'cc_rejected_bad_filled_other' | 'cc_rejected_bad_filled_security_code' | 'cc_rejected_blacklist' | 'cc_rejected_call_for_authorize' | 'cc_rejected_card_disabled' | 'cc_rejected_card_error' | 'cc_rejected_duplicated_payment' | 'cc_rejected_high_risk' | 'cc_rejected_insufficient_amount' | 'cc_rejected_invalid_installments' | 'cc_rejected_max_attempts' | 'cc_rejected_other_reason' | 'cc_amount_rate_limit_exceeded' | 'rejected_insufficient_data' | 'rejected_by_bank' | 'cc_amount_rate_limit_exceeded' | 'rejected_by_regulations' | 'insufficient_amount' | 'cc_rejected_card_type_not_allowed';
2
+ export type MercadoPagoStatus = 'approved' | 'authorized' | 'in_process' | 'rejected' | 'pending' | string;
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
+ transaction_details?: {
106
+ payment_method_reference_id?: any;
107
+ acquirer_reference?: any;
108
+ net_received_amount?: number;
109
+ total_paid_amount?: number;
110
+ overpaid_amount?: number;
111
+ external_resource_url?: any;
112
+ installment_amount?: number;
113
+ financial_institution?: any;
114
+ payable_deferral_period?: any;
115
+ };
116
+ fee_details?: any[];
117
+ charges_details?: [
118
+ {
119
+ id?: string;
120
+ name?: string;
121
+ type?: string;
122
+ accounts?: {
123
+ from?: string;
124
+ to?: string;
125
+ };
126
+ client_id?: number;
127
+ date_created?: string;
128
+ last_updated?: string;
129
+ amounts?: {
130
+ original?: number;
131
+ refunded?: number;
132
+ };
133
+ metadata?: any;
134
+ reserve_id?: any;
135
+ refund_charges?: any[];
136
+ }
137
+ ];
138
+ captured?: boolean;
139
+ binary_mode?: boolean;
140
+ call_for_authorize_id?: any;
141
+ statement_descriptor?: string;
142
+ card?: {
143
+ id?: string;
144
+ first_six_digits?: string;
145
+ last_four_digits?: string;
146
+ bin?: string;
147
+ expiration_month?: number;
148
+ expiration_year?: number;
149
+ date_created?: string;
150
+ date_last_updated?: string;
151
+ cardholder?: {
152
+ name?: string;
153
+ identification?: {
154
+ number?: string;
155
+ type?: string;
156
+ };
157
+ };
158
+ };
159
+ notification_url?: string;
160
+ refunds?: any;
161
+ processing_mode?: string;
162
+ merchant_account_id?: any;
163
+ merchant_number?: any;
164
+ acquirer_reconciliation?: any[];
165
+ point_of_interaction?: {
166
+ type?: string;
167
+ business_info?: {
168
+ unit?: string;
169
+ sub_unit?: string;
170
+ branch?: string;
171
+ };
172
+ transaction_data?: {
173
+ qr_code?: string;
174
+ qr_code_base64?: string;
175
+ ticket_url?: string;
176
+ };
177
+ };
178
+ accounts_info?: any;
179
+ tags?: any;
180
+ };
@@ -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;
@@ -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, fromZonedTime, toZonedTime } from 'date-fns-tz';
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, toZonedTime, formatInTimeZone, fromZonedTime, 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, };
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, };