@infrab4a/connect 4.20.0-beta.9 → 4.21.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +120 -865
- package/index.esm.js +121 -842
- package/package.json +1 -1
- package/src/domain/catalog/models/category-product.d.ts +8 -0
- package/src/domain/catalog/models/index.d.ts +1 -0
- package/src/domain/catalog/models/product-base.d.ts +2 -0
- package/src/domain/catalog/models/types/index.d.ts +0 -1
- package/src/domain/catalog/models/variant.d.ts +2 -0
- package/src/domain/catalog/repositories/category-product.repository.d.ts +6 -0
- package/src/domain/catalog/repositories/index.d.ts +1 -0
- package/src/domain/general/models/index.d.ts +0 -1
- package/src/domain/general/repositories/index.d.ts +0 -1
- package/src/domain/shopping/index.d.ts +0 -4
- package/src/domain/shopping/models/index.d.ts +0 -1
- package/src/domain/shopping/models/order-blocked.d.ts +6 -4
- package/src/domain/shopping/models/order.d.ts +2 -2
- package/src/domain/shopping/models/payment.d.ts +63 -10
- package/src/domain/shopping/models/types/index.d.ts +4 -4
- package/src/domain/shopping/types/index.d.ts +0 -8
- package/src/errors/index.d.ts +2 -8
- package/src/infra/elasticsearch/indexes/products-index.d.ts +2 -0
- package/src/infra/firebase/firestore/repositories/general/index.d.ts +0 -1
- package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +1 -1
- package/src/infra/firebase/firestore/repositories/shopping/{order-blocked-firestore.repository.d.ts → order-blocked-firestore.repository.ts.d.ts} +2 -2
- package/src/infra/hasura-graphql/repositories/catalog/category-product-hasura-graphql.repository.d.ts +11 -0
- package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +1 -0
- package/src/infra/index.d.ts +0 -2
- package/src/utils/index.d.ts +2 -2
- package/src/domain/general/models/sequences.d.ts +0 -9
- package/src/domain/general/repositories/sequences.repository.d.ts +0 -4
- package/src/domain/shopping/enums/antifraud-providers.enum.d.ts +0 -6
- package/src/domain/shopping/enums/business-unit.enum.d.ts +0 -4
- package/src/domain/shopping/enums/index.d.ts +0 -6
- package/src/domain/shopping/enums/order-blocked.enum.d.ts +0 -5
- package/src/domain/shopping/enums/pagarme-payment-status.enum.d.ts +0 -10
- package/src/domain/shopping/enums/payment-methods.enum.d.ts +0 -6
- package/src/domain/shopping/enums/payment-providers.enum.d.ts +0 -5
- package/src/domain/shopping/factories/adyen-payment-method.factory.d.ts +0 -9
- package/src/domain/shopping/factories/antifraud-provider.factory.d.ts +0 -15
- package/src/domain/shopping/factories/base-payment-method.factory.d.ts +0 -7
- package/src/domain/shopping/factories/glampoints-payment-method.factory.d.ts +0 -8
- package/src/domain/shopping/factories/index.d.ts +0 -5
- package/src/domain/shopping/factories/pagarme-payment-method.factory.d.ts +0 -11
- package/src/domain/shopping/factories/payment-provider.factory.d.ts +0 -15
- package/src/domain/shopping/interfaces/antifraud-method-factory.interface.d.ts +0 -11
- package/src/domain/shopping/interfaces/antifraud-provider.interface.d.ts +0 -5
- package/src/domain/shopping/interfaces/index.d.ts +0 -7
- package/src/domain/shopping/interfaces/payment-method-factory.interface.d.ts +0 -14
- package/src/domain/shopping/interfaces/payment-provider-bank-slip.interface.d.ts +0 -7
- package/src/domain/shopping/interfaces/payment-provider-card.interface.d.ts +0 -13
- package/src/domain/shopping/interfaces/payment-provider-glampoints.interface.d.ts +0 -5
- package/src/domain/shopping/interfaces/payment-provider-pix.interface.d.ts +0 -5
- package/src/domain/shopping/models/payment-transaction.d.ts +0 -67
- package/src/domain/shopping/services/antifraud-bankslip.service.d.ts +0 -9
- package/src/domain/shopping/services/antifraud-card.service.d.ts +0 -18
- package/src/domain/shopping/services/antifraud-glampoints.service.d.ts +0 -6
- package/src/domain/shopping/services/antifraud-pix.service.d.ts +0 -6
- package/src/domain/shopping/services/glampoints-payment.service.d.ts +0 -8
- package/src/domain/shopping/services/index.d.ts +0 -5
- package/src/domain/shopping/types/adyen-card.type.d.ts +0 -3
- package/src/domain/shopping/types/adyen-credentials.type.d.ts +0 -6
- package/src/domain/shopping/types/antifraud-provider.type.d.ts +0 -2
- package/src/domain/shopping/types/base-card.type.d.ts +0 -2
- package/src/domain/shopping/types/card-info.type.d.ts +0 -8
- package/src/domain/shopping/types/pagarme-card-manual-hash.type.d.ts +0 -6
- package/src/domain/shopping/types/pagarme-card.type.d.ts +0 -16
- package/src/domain/shopping/types/pagarme-credentials.type.d.ts +0 -7
- package/src/domain/shopping/types/payment-method.type.d.ts +0 -2
- package/src/domain/shopping/types/payment-provider.type.d.ts +0 -2
- package/src/errors/business.error.d.ts +0 -7
- package/src/errors/fraud-validation.error.d.ts +0 -7
- package/src/errors/payment.error.d.ts +0 -7
- package/src/errors/stock-limit.error.d.ts +0 -5
- package/src/errors/stock-out.error.d.ts +0 -5
- package/src/errors/types/checkout-additional-data-erro.type.d.ts +0 -6
- package/src/errors/types/index.d.ts +0 -2
- package/src/errors/types/pagarme-erros.type.d.ts +0 -9
- package/src/infra/adyen/adapters/adyen-card-payment-axios.adapter.d.ts +0 -17
- package/src/infra/adyen/adapters/index.d.ts +0 -1
- package/src/infra/adyen/index.d.ts +0 -1
- package/src/infra/firebase/firestore/repositories/general/sequences-firestore.repository.d.ts +0 -7
- package/src/infra/pagarme/adapters/index.d.ts +0 -3
- package/src/infra/pagarme/adapters/pagarme-bank-slip-payment-axios.adapter.d.ts +0 -12
- package/src/infra/pagarme/adapters/pagarme-card-payment-axios.adapter.d.ts +0 -17
- package/src/infra/pagarme/adapters/pagarme-pix-payment-axios.adapter.d.ts +0 -11
- package/src/infra/pagarme/index.d.ts +0 -1
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from '../../generic/model/base.model';
|
|
2
|
-
import { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types';
|
|
3
|
-
export declare class PaymentTransaction extends BaseModel<PaymentTransaction> {
|
|
4
|
-
id: number;
|
|
5
|
-
object: string;
|
|
6
|
-
status: string;
|
|
7
|
-
tid: number;
|
|
8
|
-
nsu: number;
|
|
9
|
-
amount: number;
|
|
10
|
-
cost: number;
|
|
11
|
-
installments: number;
|
|
12
|
-
referer: string;
|
|
13
|
-
ip: string;
|
|
14
|
-
phone: string;
|
|
15
|
-
address: string;
|
|
16
|
-
metadata: any;
|
|
17
|
-
device: string;
|
|
18
|
-
payment: string;
|
|
19
|
-
addition: string;
|
|
20
|
-
discount: string;
|
|
21
|
-
customer: PaymentCustomer;
|
|
22
|
-
billing: PaymentBilling;
|
|
23
|
-
shipping: PaymentShipping;
|
|
24
|
-
items: PaymentItem[];
|
|
25
|
-
card: PaymentCard;
|
|
26
|
-
refuseReason: string;
|
|
27
|
-
statusReason: string;
|
|
28
|
-
acquirerResponseCode: string;
|
|
29
|
-
acquirerName: string;
|
|
30
|
-
acquirerId: string;
|
|
31
|
-
authorizationCode: string;
|
|
32
|
-
softDescriptor: string;
|
|
33
|
-
dateCreated: string;
|
|
34
|
-
dateUpdated: string;
|
|
35
|
-
authorizedAmount: number;
|
|
36
|
-
paidAmount: number;
|
|
37
|
-
paidAt: string;
|
|
38
|
-
refundedAmount: number;
|
|
39
|
-
cardHolderName: string;
|
|
40
|
-
cardLastDigits: string;
|
|
41
|
-
cardFirstDigits: string;
|
|
42
|
-
cardBrand: string;
|
|
43
|
-
cardPinMode: string;
|
|
44
|
-
cardMagstripeFallback: boolean;
|
|
45
|
-
cvmPin: boolean;
|
|
46
|
-
postbackUrl: string;
|
|
47
|
-
paymentMethod: string;
|
|
48
|
-
captureMethod: string;
|
|
49
|
-
antifraudScore: string;
|
|
50
|
-
boletoUrl: string;
|
|
51
|
-
boletoBarcode: string;
|
|
52
|
-
boletoExpirationDate: string;
|
|
53
|
-
subscriptionId: string;
|
|
54
|
-
splitRules: string;
|
|
55
|
-
antifraudMetadata: any;
|
|
56
|
-
referenceKey: string;
|
|
57
|
-
localTransactionId: string;
|
|
58
|
-
localTime: string;
|
|
59
|
-
fraudCovered: boolean;
|
|
60
|
-
fraudReimbursed: string;
|
|
61
|
-
orderId: string;
|
|
62
|
-
riskLevel: string;
|
|
63
|
-
receiptUrl: string;
|
|
64
|
-
privateLabel: string;
|
|
65
|
-
pixQrCode: string;
|
|
66
|
-
pixExpirationDate: string;
|
|
67
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AntifraudProvider } from '../interfaces';
|
|
2
|
-
import { Checkout } from '../models';
|
|
3
|
-
import { OrderBlockedRepository } from '../repositories';
|
|
4
|
-
export declare class AntifraudBankSlipService implements AntifraudProvider {
|
|
5
|
-
private orderBlockedRepository;
|
|
6
|
-
private MAX_ORDER_VALUE;
|
|
7
|
-
constructor(orderBlockedRepository: OrderBlockedRepository);
|
|
8
|
-
validate(checkout: Checkout): Promise<Boolean>;
|
|
9
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AntifraudProvider } from '../interfaces';
|
|
2
|
-
import { Checkout } from '../models';
|
|
3
|
-
import { OrderBlockedRepository, OrderRepository } from '../repositories';
|
|
4
|
-
import { PaymentCardInfo } from '../types';
|
|
5
|
-
export declare class AntifraudCardService implements AntifraudProvider {
|
|
6
|
-
private orderRepository;
|
|
7
|
-
private orderBlockedRepository;
|
|
8
|
-
private LIMIT_ORDERS_DAY;
|
|
9
|
-
private LIMIT_ORDERS_WEEK;
|
|
10
|
-
private LIMIT_BLOCKED_ORDERS_DAY;
|
|
11
|
-
constructor(orderRepository: OrderRepository, orderBlockedRepository: OrderBlockedRepository);
|
|
12
|
-
validate(checkout: Checkout, card: PaymentCardInfo): Promise<Boolean>;
|
|
13
|
-
private verifyBlockedOrderAttempts;
|
|
14
|
-
private verifyDayAndWeekOrders;
|
|
15
|
-
private validateOrdersByRange;
|
|
16
|
-
private countOrdersByField;
|
|
17
|
-
private getDateRange;
|
|
18
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PaymentProviderGlampoints } from '../interfaces';
|
|
2
|
-
import { Checkout, Payment } from '../models';
|
|
3
|
-
import { PaymentRepository } from '../repositories';
|
|
4
|
-
export declare class GlampointsPaymentService implements PaymentProviderGlampoints {
|
|
5
|
-
private paymentRepository;
|
|
6
|
-
constructor(paymentRepository: PaymentRepository);
|
|
7
|
-
pay(checkout: Checkout): Promise<Payment>;
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseCard } from './base-card.type';
|
|
2
|
-
export interface PagarMeCard extends BaseCard {
|
|
3
|
-
object: string;
|
|
4
|
-
id: string;
|
|
5
|
-
date_created: string;
|
|
6
|
-
date_updated: string;
|
|
7
|
-
brand: string;
|
|
8
|
-
holder_name: string;
|
|
9
|
-
first_digits: string;
|
|
10
|
-
last_digits: string;
|
|
11
|
-
country: string;
|
|
12
|
-
fingerprint: string;
|
|
13
|
-
customer: string;
|
|
14
|
-
valid: boolean;
|
|
15
|
-
expiration_date: string;
|
|
16
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
import { checkoutAdditionalDataError } from './types';
|
|
3
|
-
export declare class BusinessError extends CustomError {
|
|
4
|
-
additionalData?: checkoutAdditionalDataError;
|
|
5
|
-
type: string;
|
|
6
|
-
constructor(message: string, additionalData?: checkoutAdditionalDataError, type?: string);
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
import { checkoutAdditionalDataError } from './types';
|
|
3
|
-
export declare class FraudValidationError extends CustomError {
|
|
4
|
-
additionalData?: checkoutAdditionalDataError;
|
|
5
|
-
type: string;
|
|
6
|
-
constructor(message: string, additionalData?: checkoutAdditionalDataError);
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
import { checkoutAdditionalDataError } from './types';
|
|
3
|
-
export declare class PaymentError extends CustomError {
|
|
4
|
-
additionalData?: checkoutAdditionalDataError;
|
|
5
|
-
type: string;
|
|
6
|
-
constructor(message: string, additionalData?: checkoutAdditionalDataError);
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BusinessUnitEnum } from '../../../domain';
|
|
2
|
-
import { PaymentProviderCard } from '../../../domain/shopping/interfaces';
|
|
3
|
-
import { Checkout, Payment, PaymentTransaction } from '../../../domain/shopping/models';
|
|
4
|
-
import { OrderBlockedRepository, PaymentRepository } from '../../../domain/shopping/repositories';
|
|
5
|
-
import { AdyenCard, AdyenCredentials, PaymentCardInfo } from '../../../domain/shopping/types';
|
|
6
|
-
export declare class AdyenCardAxiosAdapter implements PaymentProviderCard<AdyenCard> {
|
|
7
|
-
private credentials;
|
|
8
|
-
private paymentRepository;
|
|
9
|
-
private orderBlockedRepository;
|
|
10
|
-
constructor(credentials: AdyenCredentials, paymentRepository: PaymentRepository, orderBlockedRepository: OrderBlockedRepository);
|
|
11
|
-
createCardHash(bu: BusinessUnitEnum): Promise<string>;
|
|
12
|
-
pay(checkout: Checkout, card: PaymentCardInfo): Promise<Payment>;
|
|
13
|
-
private createCardPayment;
|
|
14
|
-
addCard(): Promise<AdyenCard>;
|
|
15
|
-
getCardByToken(token: string): Promise<AdyenCard>;
|
|
16
|
-
createTransaction(info: any): Promise<PaymentTransaction>;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './adyen-card-payment-axios.adapter';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './adapters';
|
package/src/infra/firebase/firestore/repositories/general/sequences-firestore.repository.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Sequence, SequenceRepository } from '../../../../../domain';
|
|
2
|
-
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
-
declare const SequenceFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<Sequence> & import("../../../../../domain").CrudRepository<Sequence, import("../../../../../domain").CrudParams<Sequence>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<Sequence>, ...any[]]>;
|
|
4
|
-
export declare class SequenceFirestoreRepository extends SequenceFirestoreRepository_base implements SequenceRepository {
|
|
5
|
-
constructor({ firestore, interceptors }: Pick<FirestoreConstructorParams<Sequence>, 'firestore' | 'interceptors'>);
|
|
6
|
-
}
|
|
7
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PaymentProviderBankSlip } from '../../../domain/shopping/interfaces';
|
|
2
|
-
import { Checkout, Payment, PaymentTransaction } from '../../../domain/shopping/models';
|
|
3
|
-
import { PaymentRepository } from '../../../domain/shopping/repositories';
|
|
4
|
-
import { PagarmeCredentials } from '../../../domain/shopping/types';
|
|
5
|
-
export declare class PagarmeBankSlipAxiosAdapter implements PaymentProviderBankSlip {
|
|
6
|
-
private credentials;
|
|
7
|
-
private paymentRepository;
|
|
8
|
-
constructor(credentials: PagarmeCredentials, paymentRepository: PaymentRepository);
|
|
9
|
-
pay(checkout: Checkout): Promise<Payment>;
|
|
10
|
-
getBoletoTransaction(paymentId: number): Promise<PaymentTransaction>;
|
|
11
|
-
private createBoletoPayment;
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BusinessUnitEnum } from '../../../domain/shopping/enums';
|
|
2
|
-
import { PaymentProviderCard } from '../../../domain/shopping/interfaces';
|
|
3
|
-
import { Checkout, Payment, PaymentTransaction } from '../../../domain/shopping/models';
|
|
4
|
-
import { OrderBlockedRepository, PaymentRepository } from '../../../domain/shopping/repositories';
|
|
5
|
-
import { CardInfo, PagarMeCard, PagarmeCredentials, PaymentCardInfo } from '../../../domain/shopping/types';
|
|
6
|
-
export declare class PagarmeCardAxiosAdapter implements PaymentProviderCard<PagarMeCard> {
|
|
7
|
-
private credentials;
|
|
8
|
-
private paymentRepository;
|
|
9
|
-
private orderBlockedRepository;
|
|
10
|
-
constructor(credentials: PagarmeCredentials, paymentRepository: PaymentRepository, orderBlockedRepository: OrderBlockedRepository);
|
|
11
|
-
pay(checkout: Checkout, card: PaymentCardInfo): Promise<Payment>;
|
|
12
|
-
addCard(card: CardInfo): Promise<PagarMeCard>;
|
|
13
|
-
createCardHash<PagarMeCardManualHash>(bu: BusinessUnitEnum): Promise<PagarMeCardManualHash>;
|
|
14
|
-
getCardByToken(id: string): Promise<PagarMeCard>;
|
|
15
|
-
createTransaction(info: any): Promise<PaymentTransaction>;
|
|
16
|
-
private createCardPayment;
|
|
17
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PaymentProviderPix } from '../../../domain/shopping/interfaces';
|
|
2
|
-
import { Checkout, Payment } from '../../../domain/shopping/models';
|
|
3
|
-
import { PaymentRepository } from '../../../domain/shopping/repositories';
|
|
4
|
-
import { PagarmeCredentials } from '../../../domain/shopping/types';
|
|
5
|
-
export declare class PagarmePixAxiosAdapter implements PaymentProviderPix {
|
|
6
|
-
private credentials;
|
|
7
|
-
private paymentRepository;
|
|
8
|
-
constructor(credentials: PagarmeCredentials, paymentRepository: PaymentRepository);
|
|
9
|
-
pay(checkout: Checkout): Promise<Payment>;
|
|
10
|
-
private createPixPayment;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './adapters';
|