@infrab4a/connect 5.3.0-beta.2 → 5.3.0-beta.20

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 (85) hide show
  1. package/index.cjs.js +1990 -242
  2. package/index.esm.js +1976 -244
  3. package/package.json +4 -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-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/models/types/brands-shop-menu.type.d.ts +13 -0
  10. package/src/domain/catalog/models/types/index.d.ts +1 -0
  11. package/src/domain/catalog/repositories/category-brand.repository.d.ts +4 -0
  12. package/src/domain/catalog/repositories/category.repository.d.ts +1 -0
  13. package/src/domain/catalog/repositories/index.d.ts +2 -0
  14. package/src/domain/catalog/repositories/product-catalog.repository.d.ts +17 -0
  15. package/src/domain/shopping/enums/index.d.ts +3 -0
  16. package/src/domain/shopping/enums/order-payment-status.enum.d.ts +10 -0
  17. package/src/domain/shopping/enums/pagarme-v5-payment-status.enum.d.ts +24 -0
  18. package/src/domain/shopping/enums/payment-providers.enum.d.ts +2 -1
  19. package/src/domain/shopping/enums/transaction-payment-methods.enum.d.ts +5 -0
  20. package/src/domain/shopping/factories/index.d.ts +1 -0
  21. package/src/domain/shopping/factories/mercado-pago-payment-method.factory.d.ts +11 -0
  22. package/src/domain/shopping/factories/payment-provider.factory.d.ts +2 -0
  23. package/src/domain/shopping/interfaces/payment-provider-card.interface.d.ts +10 -2
  24. package/src/domain/shopping/models/order.d.ts +7 -0
  25. package/src/domain/shopping/models/payment-transaction.d.ts +19 -2
  26. package/src/domain/shopping/models/payment.d.ts +3 -1
  27. package/src/domain/shopping/services/antifraud-card.service.d.ts +2 -0
  28. package/src/domain/shopping/types/card-info.type.d.ts +1 -0
  29. package/src/domain/shopping/types/checkout-paylod-request.type.d.ts +2 -7
  30. package/src/domain/shopping/types/index.d.ts +3 -0
  31. package/src/domain/shopping/types/mercado-pago-card.type.d.ts +14 -0
  32. package/src/domain/shopping/types/mercado-pago-credentials.type.d.ts +5 -0
  33. package/src/domain/shopping/types/pagarme-card.type.d.ts +9 -3
  34. package/src/domain/shopping/types/pagarme-credentials-v5.type.d.ts +4 -0
  35. package/src/domain/shopping/types/pagarme-credentials.type.d.ts +9 -3
  36. package/src/domain/shopping/types/payment-card-info.type.d.ts +3 -0
  37. package/src/domain/users/models/user-payment-method.d.ts +2 -0
  38. package/src/infra/firebase/firestore/repositories/catalog/category-brand-firestore.repository.d.ts +7 -0
  39. package/src/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +1 -0
  40. package/src/infra/firebase/firestore/repositories/catalog/index.d.ts +1 -0
  41. package/src/infra/hasura-graphql/models/index.d.ts +1 -0
  42. package/src/infra/hasura-graphql/models/product-catalog-hasura-graphql.d.ts +16 -0
  43. package/src/infra/hasura-graphql/models/variant-hasura-graphql.d.ts +7 -0
  44. package/src/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +1 -0
  45. package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +1 -0
  46. package/src/infra/hasura-graphql/repositories/catalog/product-catalog-hasura-graphql.repository.d.ts +22 -0
  47. package/src/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +1 -0
  48. package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts +1 -0
  49. package/src/infra/index.d.ts +1 -0
  50. package/src/infra/mercado-pago/adapters/index.d.ts +3 -0
  51. package/src/infra/mercado-pago/adapters/mercado-pago-boleto-payment-axios.adapter.d.ts +8 -0
  52. package/src/infra/mercado-pago/adapters/mercado-pago-card-payment-axios.adapter.d.ts +20 -0
  53. package/src/infra/mercado-pago/adapters/mercado-pago-pix-payment-axios.adapter.d.ts +7 -0
  54. package/src/infra/mercado-pago/enums/index.d.ts +2 -0
  55. package/src/infra/mercado-pago/enums/mercado-pago-status-detail.enum.d.ts +33 -0
  56. package/src/infra/mercado-pago/enums/mercado-pago-status.enum.d.ts +10 -0
  57. package/src/infra/mercado-pago/helpers/index.d.ts +2 -0
  58. package/src/infra/mercado-pago/helpers/mercado-pago-request.helper.d.ts +60 -0
  59. package/src/infra/mercado-pago/helpers/mercado-pago-response.helper.d.ts +10 -0
  60. package/src/infra/mercado-pago/index.d.ts +4 -0
  61. package/src/infra/mercado-pago/types/index.d.ts +3 -0
  62. package/src/infra/mercado-pago/types/mercado-pago-request.type.d.ts +1 -0
  63. package/src/infra/mercado-pago/types/mercado-pago-response.type.d.ts +188 -0
  64. package/src/infra/mercado-pago/types/mercado-pago-status-detail.type.d.ts +2 -0
  65. package/src/infra/mercado-pago/types/mercado-pago-status.type.d.ts +2 -0
  66. package/src/infra/pagarme/adapters/helpers/index.d.ts +2 -0
  67. package/src/infra/pagarme/adapters/helpers/pagarme-v5-request.helper.d.ts +13 -0
  68. package/src/infra/pagarme/adapters/helpers/pagarme-v5-response.helper.d.ts +10 -0
  69. package/src/infra/pagarme/adapters/index.d.ts +2 -3
  70. package/src/infra/pagarme/adapters/v4/index.d.ts +3 -0
  71. package/src/infra/pagarme/adapters/{pagarme-bank-slip-payment-axios.adapter.d.ts → v4/pagarme-bank-slip-payment-axios.adapter.d.ts} +4 -4
  72. package/src/infra/pagarme/adapters/{pagarme-card-payment-axios.adapter.d.ts → v4/pagarme-card-payment-axios.adapter.d.ts} +7 -6
  73. package/src/infra/pagarme/adapters/{pagarme-pix-payment-axios.adapter.d.ts → v4/pagarme-pix-payment-axios.adapter.d.ts} +4 -4
  74. package/src/infra/pagarme/adapters/v5/index.d.ts +3 -0
  75. package/src/infra/pagarme/adapters/v5/pagarmev5-bank-slip-payment-axios.adapter.d.ts +11 -0
  76. package/src/infra/pagarme/adapters/v5/pagarmev5-card-payment-axios.adapter.d.ts +24 -0
  77. package/src/infra/pagarme/adapters/v5/pagarmev5-pix-payment-axios.adapter.d.ts +10 -0
  78. package/src/infra/pagarme/index.d.ts +1 -0
  79. package/src/infra/pagarme/types/index.d.ts +1 -0
  80. package/src/infra/pagarme/types/v5/index.d.ts +4 -0
  81. package/src/infra/pagarme/types/v5/pagarmev5-customer.type.d.ts +19 -0
  82. package/src/infra/pagarme/types/v5/pagarmev5-order-request-payload.type.d.ts +90 -0
  83. package/src/infra/pagarme/types/v5/pagarmev5-order-response.type.d.ts +126 -0
  84. package/src/infra/pagarme/types/v5/pagarmev5-postback-response.type.d.ts +11 -0
  85. package/src/utils/index.d.ts +2 -1
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "5.3.0-beta.2",
3
+ "version": "5.3.0-beta.20",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/B4AGroup/b4a-firebase-libs"
9
+ "url": "https://github.com/B4AGroup/activation-services"
10
10
  },
11
11
  "dependencies": {
12
12
  "axios": "^0.27.2",
13
13
  "class-transformer": "^0.5.1",
14
- "date-fns": "^2.28.0",
14
+ "date-fns": "2.28.0",
15
+ "date-fns-tz": "2.0.1",
15
16
  "debug": "^4.3.4",
16
17
  "firebase": "^10.12.0",
17
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';
@@ -19,6 +19,7 @@ export declare class ProductBase<T extends ProductBase<T, I>, I = ProductIdentif
19
19
  costPrice: number;
20
20
  images?: string[];
21
21
  miniatures?: string[];
22
+ imagesCard?: string[];
22
23
  published: boolean;
23
24
  createdAt?: Date;
24
25
  updatedAt?: Date;
@@ -1,5 +1,6 @@
1
1
  import { BaseModel, GenericIdentifier } from '../../generic/model';
2
2
  import { Shops } from './enums';
3
+ import { Product } from './product';
3
4
  export declare class ProductReview extends BaseModel<ProductReview> {
4
5
  id: number;
5
6
  productId: string;
@@ -16,5 +17,6 @@ export declare class ProductReview extends BaseModel<ProductReview> {
16
17
  orderId?: string;
17
18
  createdAt?: Date;
18
19
  updatedAt?: Date;
20
+ product: Product;
19
21
  static get identifiersFields(): GenericIdentifier[];
20
22
  }
@@ -2,5 +2,6 @@ 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;
5
6
  variants?: Variant[];
6
7
  }
@@ -0,0 +1,13 @@
1
+ import { CategoryImages } from './category-images.type';
2
+ export type BrandsShopMenu = {
3
+ id: string;
4
+ name: string;
5
+ slug: string;
6
+ brand_category: boolean;
7
+ published: boolean;
8
+ images: CategoryImages;
9
+ shops?: string[];
10
+ brand_logo?: string;
11
+ brand_banner?: string;
12
+ brand_banner_mobile?: string;
13
+ };
@@ -1,4 +1,5 @@
1
1
  export * from './brand-equity-option.type';
2
+ export * from './brands-shop-menu.type';
2
3
  export * from './category-condition.type';
3
4
  export * from './category-images.type';
4
5
  export * from './category-metadata.type';
@@ -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
+ }
@@ -38,5 +38,6 @@ export interface CategoryRepository<T extends Category = Category> extends CrudR
38
38
  cache?: RepositoryCacheOptions;
39
39
  }): Promise<Category[]>;
40
40
  isChild(id: number, parentId: number): Promise<boolean>;
41
+ getBrandsWithProducts(): Promise<Category[]>;
41
42
  }
42
43
  export {};
@@ -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,6 +6,7 @@ export * from './category.repository';
5
6
  export * from './filter-option.repository';
6
7
  export * from './filter.repository';
7
8
  export * from './group.repository';
9
+ export * from './product-catalog.repository';
8
10
  export * from './product-errors.repository';
9
11
  export * from './product-reviews.repository';
10
12
  export * from './product-stock-notification.repository';
@@ -0,0 +1,17 @@
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
+ }
@@ -1,6 +1,9 @@
1
1
  export * from './antifraud-providers.enum';
2
2
  export * from './business-unit.enum';
3
3
  export * from './order-blocked.enum';
4
+ export * from './order-payment-status.enum';
4
5
  export * from './pagarme-payment-status.enum';
6
+ export * from './pagarme-v5-payment-status.enum';
5
7
  export * from './payment-methods.enum';
6
8
  export * from './payment-providers.enum';
9
+ export * from './transaction-payment-methods.enum';
@@ -0,0 +1,10 @@
1
+ export declare enum OrderPaymentStatus {
2
+ 'Em processamento' = "processing",
3
+ 'Autorizada' = "authorized",
4
+ 'Pago' = "paid",
5
+ 'Estornada' = "refunded",
6
+ 'Aguardando pagamento' = "waiting_payment",
7
+ 'Aguardando estorno' = "pending_refund",
8
+ 'Recusada/Não autorizada' = "refused",
9
+ 'Chargedback' = "chargedback"
10
+ }
@@ -0,0 +1,24 @@
1
+ export declare enum PagarMeV5PaymentStatus {
2
+ 'Em processamento' = "processing",
3
+ 'Gerado' = "generated",
4
+ 'Visualizado' = "viewed",
5
+ 'Pago a menor' = "underpaid",
6
+ 'Pago a maior' = "overpaid",
7
+ 'Aguardando pagamento' = "waiting_payment",
8
+ 'Pago' = "paid",
9
+ 'Aguardando estorno' = "pending_refund",
10
+ 'Autorizada pendente de captura' = "authorized_pending_capture",
11
+ 'Não autorizada' = "not_authorized",
12
+ 'Capturada' = "captured",
13
+ 'Aguardando captura' = "waiting_capture",
14
+ 'Com erro' = "with_error",
15
+ 'Estornado' = "refunded",
16
+ 'Cancelado' = "voided",
17
+ 'Falha' = "failed"
18
+ }
19
+ export declare enum PagarMeV5OrderStatus {
20
+ 'Pendente' = "pending",
21
+ 'Pago' = "paid",
22
+ 'Cancelado' = "canceled",
23
+ 'Falha' = "failed"
24
+ }
@@ -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
  }
@@ -0,0 +1,5 @@
1
+ export declare enum TransactionPaymentMethods {
2
+ CARD = "credit_card",
3
+ BANKSLIP = "boleto",
4
+ PIX = "pix"
5
+ }
@@ -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,11 @@
1
+ import { PaymentProviderBankSlip, 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
+ bankSlip?: PaymentProviderBankSlip;
8
+ };
9
+ export declare class MercadoPagoPaymentMethodFactory extends BasePaymentMethodFactory<MercadoPagoPaymentFactoryMethods> {
10
+ }
11
+ 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;
@@ -1,3 +1,5 @@
1
+ import { Shops } from '../../catalog';
2
+ import { User, UserAddress } from '../../users';
1
3
  import { BusinessUnitEnum } from '../enums';
2
4
  import { PaymentTransaction } from '../models';
3
5
  import { Checkout } from '../models/checkout';
@@ -6,8 +8,14 @@ import { CardInfo, PaymentCardInfo } from '../types';
6
8
  import { BaseCard } from '../types/base-card.type';
7
9
  export interface PaymentProviderCard<Card extends BaseCard = BaseCard> {
8
10
  pay(checkout: Checkout, card: PaymentCardInfo): Promise<Payment>;
9
- addCard(card: CardInfo): Promise<Card>;
11
+ addCard?(card: CardInfo, customer: User & {
12
+ billingAddress: Partial<UserAddress>;
13
+ }): Promise<Card>;
10
14
  getCardByToken(token: string): Promise<Card>;
11
- createCardHash<T>(bu: BusinessUnitEnum, card?: CardInfo): Promise<string | T>;
15
+ getCardByToken(customerId: string, token: string): Promise<Card>;
16
+ createCardHash<T>(bu: BusinessUnitEnum, shop: Shops, card?: CardInfo): Promise<string | T>;
12
17
  createTransaction(info: any): Promise<PaymentTransaction>;
18
+ createOrUpdateCustomer?(customer: User & {
19
+ billingAddress: Partial<UserAddress>;
20
+ }): any;
13
21
  }
@@ -11,7 +11,14 @@ export declare class Order extends Checkout {
11
11
  deliveredAt?: string;
12
12
  trackingEvents?: OrderTrackingEvent[];
13
13
  payment: PaymentTransaction;
14
+ pedidov?: number;
14
15
  reshipmentOrderId?: string;
15
16
  isChange?: boolean;
16
17
  isReshipment?: boolean;
18
+ metadata?: {
19
+ ip?: string;
20
+ userAgent?: string;
21
+ plataform?: string;
22
+ origin?: string;
23
+ };
17
24
  }
@@ -1,12 +1,14 @@
1
1
  import { BaseModel } from '../../generic/model/base.model';
2
2
  import { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types';
3
3
  export declare class PaymentTransaction extends BaseModel<PaymentTransaction> {
4
- id?: number;
4
+ id?: string;
5
5
  object?: string;
6
6
  status?: string;
7
- tid?: number;
7
+ tid?: string;
8
+ gateway_id?: string;
8
9
  nsu?: number;
9
10
  amount: number;
11
+ currency?: string;
10
12
  cost: number;
11
13
  installments?: number;
12
14
  referer: string;
@@ -26,8 +28,12 @@ export declare class PaymentTransaction extends BaseModel<PaymentTransaction> {
26
28
  refuse_reason?: string;
27
29
  status_reason?: string;
28
30
  acquirer_response_code?: string;
31
+ acquirer_auth_code?: string;
32
+ acquirer_return_code?: string;
29
33
  acquirer_name?: string;
34
+ acquirer_message?: string;
30
35
  acquirer_id?: string;
36
+ acquirer_nsu?: string;
31
37
  authorization_code?: string;
32
38
  soft_descriptor?: string;
33
39
  date_created?: string;
@@ -36,20 +42,29 @@ export declare class PaymentTransaction extends BaseModel<PaymentTransaction> {
36
42
  paid_amount?: number;
37
43
  paid_at?: string;
38
44
  refunded_amount?: number;
45
+ card_id?: string;
39
46
  card_holder_name?: string;
40
47
  card_last_digits?: string;
41
48
  card_first_digits?: string;
42
49
  card_brand?: string;
43
50
  card_pin_mode?: string;
44
51
  card_magstripe_fallback?: boolean;
52
+ card_expiration_month?: string;
53
+ card_expiration_year?: string;
45
54
  cvm_pin?: boolean;
46
55
  postback_url?: string;
47
56
  payment_method?: string;
48
57
  capture_method?: string;
49
58
  antifraud_score?: string;
50
59
  boleto_url?: string;
60
+ boleto_line?: string;
51
61
  boleto_barcode?: string;
62
+ boleto_qr_code?: string;
52
63
  boleto_expiration_date?: string;
64
+ boleto_instructions?: string;
65
+ boleto_nosso_numero?: string;
66
+ boleto_type?: string;
67
+ boleto_document_number?: string;
53
68
  subscription_id?: string;
54
69
  split_rules?: string;
55
70
  antifraud_metadata?: any;
@@ -59,9 +74,11 @@ export declare class PaymentTransaction extends BaseModel<PaymentTransaction> {
59
74
  fraudCovered?: boolean;
60
75
  fraud_reimbursed?: string;
61
76
  order_id?: string;
77
+ charger_id?: string;
62
78
  risk_level?: string;
63
79
  receipt_url?: string;
64
80
  private_label?: string;
65
81
  pix_qr_code?: string;
82
+ pix_qr_code_url?: string;
66
83
  pix_expiration_date?: string;
67
84
  }
@@ -2,9 +2,11 @@ import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
2
2
  import { PaymentProvider } from '../types';
3
3
  import { PaymentTransaction } from './payment-transaction';
4
4
  export declare class Payment extends BaseModel<Payment> {
5
- id: number;
5
+ id: string | number;
6
6
  checkoutId: string;
7
7
  orderId?: string;
8
+ pagarMeOrderId?: string;
9
+ mercadoPagoId?: number;
8
10
  totalPrice: number;
9
11
  userId: string;
10
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;
@@ -5,4 +5,5 @@ export type CardInfo = {
5
5
  cvv: string;
6
6
  installments?: string;
7
7
  cpf: string;
8
+ flag?: string;
8
9
  };
@@ -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,8 +6,11 @@ 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';
13
+ export * from './pagarme-credentials-v5.type';
11
14
  export * from './pagarme-credentials.type';
12
15
  export * from './payment-card-info.type';
13
16
  export * from './payment-method.type';
@@ -0,0 +1,14 @@
1
+ import { BaseCard } from './base-card.type';
2
+ export interface MercadoPagoCard extends BaseCard {
3
+ }
4
+ export interface MercadoPagoCardTokenResponse {
5
+ id: string;
6
+ card_id: string;
7
+ status: boolean;
8
+ date_created: string;
9
+ date_last_updated: string;
10
+ date_due: string;
11
+ luhn_validation: boolean;
12
+ live_mode: boolean;
13
+ require_esc: boolean;
14
+ }
@@ -0,0 +1,5 @@
1
+ export type MercadoPagoCredentials = {
2
+ url: string;
3
+ api_key: string;
4
+ postback: string;
5
+ };
@@ -4,13 +4,19 @@ export interface PagarMeCard extends BaseCard {
4
4
  id: string;
5
5
  date_created: string;
6
6
  date_updated: string;
7
- brand: string;
7
+ brand?: string;
8
8
  holder_name: string;
9
- first_digits: string;
10
- last_digits: string;
9
+ first_digits?: string;
10
+ first_six_digits?: string;
11
+ last_digits?: string;
12
+ last_four_digits?: string;
13
+ exp_month?: number;
14
+ exp_year?: number;
11
15
  country: string;
12
16
  fingerprint: string;
13
17
  customer: string;
14
18
  valid: boolean;
19
+ status?: string;
15
20
  expiration_date: string;
21
+ type: string;
16
22
  }
@@ -0,0 +1,4 @@
1
+ export type PagarmeCredentialsV5 = {
2
+ URL: string;
3
+ API_KEY: string;
4
+ };
@@ -1,7 +1,13 @@
1
1
  export type PagarmeCredentials = {
2
2
  URL: string;
3
- URL_POSTBACK: string;
3
+ URL_POSTBACK?: string;
4
4
  API_KEY: string;
5
- SUBSCRIPTION_API_KEY: string;
6
- SHOP_API_KEY: string;
5
+ Glamshop: {
6
+ SUBSCRIPTION_API_KEY: string;
7
+ SHOP_API_KEY: string;
8
+ };
9
+ mensmarket: {
10
+ SUBSCRIPTION_API_KEY: string;
11
+ SHOP_API_KEY: string;
12
+ };
7
13
  };
@@ -1,7 +1,10 @@
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;
9
+ customerId?: string;
7
10
  };
@@ -5,6 +5,8 @@ export declare class UserPaymentMethod extends BaseModel<UserPaymentMethod, User
5
5
  cpf: string;
6
6
  holderName: string;
7
7
  last4: string;
8
+ last_digits?: string;
9
+ first_digits?: string;
8
10
  pagarmeToken: string;
9
11
  validUntil: string;
10
12
  userId: string;
@@ -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 {};
@@ -28,5 +28,6 @@ export declare class CategoryFirestoreRepository extends CategoryFirestoreReposi
28
28
  getCategoryByShop(_shop: string): Promise<Category[]>;
29
29
  getChildren(_parentId: number): Promise<Category[]>;
30
30
  isChild(_id: number, _parentId: number): Promise<boolean>;
31
+ getBrandsWithProducts(): Promise<Category[]>;
31
32
  }
32
33
  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';
@@ -1,5 +1,6 @@
1
1
  export * from './category-hasura-graphql';
2
2
  export * from './kit-product-hasura-graphql';
3
+ export * from './product-catalog-hasura-graphql';
3
4
  export * from './product-errors-hasura-graphql';
4
5
  export * from './product-hasura-graphql';
5
6
  export * from './variant-hasura-graphql';
@@ -0,0 +1,16 @@
1
+ import { Product } from '../../../domain';
2
+ export declare class ProductCatalogHasuraGraphQL extends Product {
3
+ firestoreId?: string;
4
+ fullPrice?: number;
5
+ subscriberDiscountPercentage?: number;
6
+ subscriberPrice?: number;
7
+ productId?: number;
8
+ differentials?: string;
9
+ whoMustUse?: string;
10
+ howToUse?: string;
11
+ brandDescription?: string;
12
+ categoryId?: number;
13
+ ingredients?: string;
14
+ hasStock?: boolean;
15
+ intGender?: number;
16
+ }
@@ -5,4 +5,11 @@ export declare class VariantHasuraGraphQL extends Variant {
5
5
  subscriberDiscountPercentage?: number;
6
6
  subscriberPrice?: number;
7
7
  hasStock?: boolean;
8
+ differentials?: string;
9
+ whoMustUse?: string;
10
+ howToUse?: string;
11
+ brandDescription?: string;
12
+ categoryId?: number;
13
+ ingredients?: string;
14
+ intGender?: number;
8
15
  }
@@ -33,5 +33,6 @@ export declare class CategoryHasuraGraphQLRepository extends CategoryHasuraGraph
33
33
  private updateProducts;
34
34
  private updateMetadata;
35
35
  private updateFilters;
36
+ getBrandsWithProducts(): Promise<Category[]>;
36
37
  }
37
38
  export {};
@@ -4,6 +4,7 @@ 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';
7
8
  export * from './product-errors-hasura-graphql.repository';
8
9
  export * from './product-hasura-graphql.repository';
9
10
  export * from './product-review-hasura-graphql.repository';
@@ -0,0 +1,22 @@
1
+ import { FindRepositoryParams, Product, ProductCatalogRepository, ProductGender, RepositoryCacheOptions, RepositoryFindResult } from '../../../../domain';
2
+ import { HasuraConstructorParams } from '../../mixins';
3
+ import { ProductCatalogHasuraGraphQL, ProductHasuraGraphQL } from '../../models';
4
+ declare const ProductCatalogHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<ProductCatalogHasuraGraphQL> & import("../../../../domain").FindRepository<ProductCatalogHasuraGraphQL, FindRepositoryParams<ProductCatalogHasuraGraphQL>>, any[]>;
5
+ export declare class ProductCatalogHasuraGraphQLRepository extends ProductCatalogHasuraGraphQLRepository_base implements ProductCatalogRepository {
6
+ constructor({ endpoint, authOptions, interceptors, cache, }: Pick<HasuraConstructorParams<ProductCatalogHasuraGraphQL>, 'endpoint' | 'authOptions' | 'interceptors' | 'cache'>);
7
+ get({ id }: {
8
+ id: string;
9
+ }, options?: {
10
+ cache?: RepositoryCacheOptions;
11
+ }): Promise<Product>;
12
+ getByEAN(EAN: string, options?: {
13
+ cache?: RepositoryCacheOptions;
14
+ }): Promise<Product>;
15
+ find(params?: FindRepositoryParams<ProductHasuraGraphQL>, optionsParams?: {
16
+ cache?: RepositoryCacheOptions;
17
+ }): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
18
+ findCatalog(params: FindRepositoryParams<ProductHasuraGraphQL>, mainGender?: Extract<ProductGender, 'female' | 'male'>, options?: {
19
+ cache?: RepositoryCacheOptions;
20
+ }): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
21
+ }
22
+ export {};
@@ -8,6 +8,7 @@ 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;
11
12
  private getId;
12
13
  }
13
14
  export {};
@@ -25,5 +25,6 @@ export declare class WishlistHasuraGraphQLRepository extends WishlistHasuraGraph
25
25
  private updateMetadata;
26
26
  addProduct(wishlistId: string, productId: string): Promise<void>;
27
27
  removeProduct(wishlistId: string, productId: string): Promise<void>;
28
+ getBrandsWithProducts(): Promise<Category[]>;
28
29
  }
29
30
  export {};