@infrab4a/connect 5.4.0-beta.2 → 5.4.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.
- package/index.cjs.js +530 -582
- package/index.esm.js +531 -580
- 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.d.ts +0 -1
- package/src/domain/catalog/models/variant.d.ts +0 -2
- 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/payment-providers.enum.d.ts +2 -1
- package/src/domain/shopping/factories/mercado-pago-payment-method.factory.d.ts +9 -0
- package/src/domain/shopping/factories/payment-provider.factory.d.ts +2 -0
- package/src/domain/shopping/models/order.d.ts +7 -0
- 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 +3 -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 +2 -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/product-hasura-graphql.repository.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 +2 -0
- package/src/infra/mercado-pago/adapters/mercado-pago-card-payment-axios.adapter.d.ts +19 -0
- package/src/infra/mercado-pago/adapters/mercado-pago-pix-payment-axios.adapter.d.ts +7 -0
- package/src/infra/mercado-pago/helpers/index.d.ts +2 -0
- package/src/infra/mercado-pago/helpers/mercado-pago-request.helper.d.ts +58 -0
- package/src/infra/mercado-pago/helpers/mercado-pago-response.helper.d.ts +8 -0
- package/src/infra/mercado-pago/index.d.ts +3 -0
- package/src/infra/mercado-pago/types/index.d.ts +2 -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 +180 -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 -13
- 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.
|
|
3
|
+
"version": "5.4.0-beta.20",
|
|
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": "
|
|
15
|
-
"date-fns-tz": "
|
|
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,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
|
}
|
|
@@ -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';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PaymentProviderCard } from '../interfaces';
|
|
2
|
+
import { MercadoPagoCard } from '../types';
|
|
3
|
+
import { BasePaymentMethodFactory } from './base-payment-method.factory';
|
|
4
|
+
type MercadoPagoPaymentFactoryMethods = {
|
|
5
|
+
card?: PaymentProviderCard<MercadoPagoCard>;
|
|
6
|
+
};
|
|
7
|
+
export declare class MercadoPagoPaymentMethodFactory extends BasePaymentMethodFactory<MercadoPagoPaymentFactoryMethods> {
|
|
8
|
+
}
|
|
9
|
+
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;
|
|
@@ -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 {
|
|
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
|
-
|
|
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';
|
|
@@ -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
|
|
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;
|
package/src/infra/firebase/firestore/repositories/catalog/category-brand-firestore.repository.d.ts
ADDED
|
@@ -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 {};
|
|
@@ -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';
|
package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts
CHANGED
|
@@ -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>;
|
package/src/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts
CHANGED
|
@@ -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 {};
|
package/src/infra/index.d.ts
CHANGED
|
@@ -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,58 @@
|
|
|
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
|
+
installments: any;
|
|
12
|
+
token: any;
|
|
13
|
+
transaction_amount: number;
|
|
14
|
+
notification_url: string;
|
|
15
|
+
metadata: {
|
|
16
|
+
checkoutId: string;
|
|
17
|
+
};
|
|
18
|
+
payer: {
|
|
19
|
+
first_name: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
email: string;
|
|
22
|
+
identification: {
|
|
23
|
+
type: string;
|
|
24
|
+
number: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
statement_descriptor: string;
|
|
28
|
+
additional_info: {
|
|
29
|
+
items: {
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
picture_url: string;
|
|
34
|
+
category_id: string;
|
|
35
|
+
quantity: number;
|
|
36
|
+
unit_price: number;
|
|
37
|
+
}[];
|
|
38
|
+
payer: {
|
|
39
|
+
first_name: string;
|
|
40
|
+
last_name: string;
|
|
41
|
+
phone: {
|
|
42
|
+
area_code: string;
|
|
43
|
+
number: string;
|
|
44
|
+
};
|
|
45
|
+
address: {
|
|
46
|
+
zip_code: string;
|
|
47
|
+
street_name: string;
|
|
48
|
+
street_number: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
private static buildItems;
|
|
54
|
+
private static buildPayer;
|
|
55
|
+
private static buildFullPayer;
|
|
56
|
+
private static buildCardPayment;
|
|
57
|
+
private static buildPixPayment;
|
|
58
|
+
}
|
|
@@ -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 @@
|
|
|
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
|
+
};
|
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,13 +0,0 @@
|
|
|
1
|
-
import { FindRepositoryParams, RepositoryCacheOptions, RepositoryFindResult } from '../../generic';
|
|
2
|
-
import { Product, ProductGender } from '../models';
|
|
3
|
-
export interface ProductCatalogRepository {
|
|
4
|
-
get({ id }: {
|
|
5
|
-
id: string;
|
|
6
|
-
}): Promise<Product>;
|
|
7
|
-
getByEAN(EAN: string, options?: {
|
|
8
|
-
cache?: RepositoryCacheOptions;
|
|
9
|
-
}): Promise<Product>;
|
|
10
|
-
findCatalog(params: FindRepositoryParams<Product>, mainGender?: Extract<ProductGender, 'female' | 'male' | 'unisex'>, options?: {
|
|
11
|
-
cache?: RepositoryCacheOptions;
|
|
12
|
-
}): Promise<RepositoryFindResult<Product>>;
|
|
13
|
-
}
|
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 {};
|