@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
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseModel } from '../../generic/model';
|
|
2
|
+
export type CategoryProductIdentifiers = 'productId' | 'categoryId';
|
|
3
|
+
export declare class CategoryProduct extends BaseModel<CategoryProduct, CategoryProductIdentifiers> {
|
|
4
|
+
categoryId: number;
|
|
5
|
+
productId: number;
|
|
6
|
+
order: number;
|
|
7
|
+
static get identifiersFields(): CategoryProductIdentifiers[];
|
|
8
|
+
}
|
|
@@ -35,6 +35,8 @@ export declare class ProductBase<ChildProduct extends ModelBaseStructure<ChildPr
|
|
|
35
35
|
metadata: ProductMetadata;
|
|
36
36
|
outlet?: boolean;
|
|
37
37
|
label?: ProductLabel;
|
|
38
|
+
group?: number;
|
|
39
|
+
validity: boolean;
|
|
38
40
|
private reviewsTotal?;
|
|
39
41
|
get evaluation(): ProductEvaluation;
|
|
40
42
|
set evaluation(evaluation: ProductEvaluation);
|
|
@@ -2,7 +2,6 @@ export * from './category-condition.type';
|
|
|
2
2
|
export * from './category-images.type';
|
|
3
3
|
export * from './category-metadata.type';
|
|
4
4
|
export * from './category-most-relevant.type';
|
|
5
|
-
export * from './category-product';
|
|
6
5
|
export * from './product-evaluation.type';
|
|
7
6
|
export * from './product-gender.type';
|
|
8
7
|
export * from './product-label.type';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
|
+
import { CategoryProduct } from '../models';
|
|
3
|
+
export interface CategoryProductRepository extends CrudRepository<CategoryProduct> {
|
|
4
|
+
removeProductFromCategory(categoryId: string, productId: string): Promise<void>;
|
|
5
|
+
addProductToCategory(categoryId: string, productId: string): Promise<void>;
|
|
6
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './category-collection-children.repository';
|
|
2
2
|
export * from './category-filter.repository';
|
|
3
|
+
export * from './category-product.repository';
|
|
3
4
|
export * from './category.repository';
|
|
4
5
|
export * from './filter-option.repository';
|
|
5
6
|
export * from './filter.repository';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { BaseModel, GenericIdentifier } from '../../generic';
|
|
2
2
|
import { UserAddress } from '../../users';
|
|
3
|
-
import { OrderBlockedType } from '../enums';
|
|
4
|
-
import { Checkout } from './checkout';
|
|
5
3
|
export declare class OrderBlocked extends BaseModel<OrderBlocked> {
|
|
6
4
|
id?: string;
|
|
7
5
|
customer: {
|
|
@@ -16,9 +14,13 @@ export declare class OrderBlocked extends BaseModel<OrderBlocked> {
|
|
|
16
14
|
};
|
|
17
15
|
blockType: string;
|
|
18
16
|
limiteRange: string;
|
|
19
|
-
type:
|
|
17
|
+
type: string;
|
|
20
18
|
card?: any;
|
|
21
|
-
checkout:
|
|
19
|
+
checkout: {
|
|
20
|
+
id: string;
|
|
21
|
+
shop: string;
|
|
22
|
+
total: number;
|
|
23
|
+
};
|
|
22
24
|
date: Date;
|
|
23
25
|
static get identifiersFields(): GenericIdentifier[];
|
|
24
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OrderTrackingEvent } from '../types';
|
|
2
2
|
import { Checkout } from './checkout';
|
|
3
3
|
import { OrderStatus } from './enums/order-status.enum';
|
|
4
|
-
import {
|
|
4
|
+
import { Payment } from './payment';
|
|
5
5
|
export declare class Order extends Checkout {
|
|
6
6
|
status: OrderStatus;
|
|
7
7
|
orderNumber?: string;
|
|
@@ -10,5 +10,5 @@ export declare class Order extends Checkout {
|
|
|
10
10
|
sentAt?: string;
|
|
11
11
|
deliveredAt?: string;
|
|
12
12
|
trackingEvents?: OrderTrackingEvent[];
|
|
13
|
-
payment:
|
|
13
|
+
payment: Payment;
|
|
14
14
|
}
|
|
@@ -1,15 +1,68 @@
|
|
|
1
1
|
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
2
|
-
import {
|
|
3
|
-
import { PaymentTransaction } from './payment-transaction';
|
|
2
|
+
import { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types';
|
|
4
3
|
export declare class Payment extends BaseModel<Payment> {
|
|
5
4
|
id: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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;
|
|
14
67
|
static get identifiersFields(): GenericIdentifier[];
|
|
15
68
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './payment-address.type';
|
|
2
|
-
export * from './payment-billing.type';
|
|
3
|
-
export * from './payment-card.type';
|
|
4
1
|
export * from './payment-customer.type';
|
|
5
2
|
export * from './payment-document.type';
|
|
6
|
-
export * from './payment-
|
|
3
|
+
export * from './payment-address.type';
|
|
4
|
+
export * from './payment-billing.type';
|
|
7
5
|
export * from './payment-shipping.type';
|
|
6
|
+
export * from './payment-item.type';
|
|
7
|
+
export * from './payment-card.type';
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
export * from './adyen-card.type';
|
|
2
|
-
export * from './adyen-credentials.type';
|
|
3
|
-
export * from './antifraud-provider.type';
|
|
4
|
-
export * from './card-info.type';
|
|
5
1
|
export * from './order-tracking-events.type';
|
|
6
|
-
export * from './pagarme-card.type';
|
|
7
|
-
export * from './pagarme-credentials.type';
|
|
8
2
|
export * from './payment-card-info.type';
|
|
9
|
-
export * from './payment-method.type';
|
|
10
|
-
export * from './payment-provider.type';
|
package/src/errors/index.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
export * from './business.error';
|
|
2
|
-
export * from './duplicated-results.error';
|
|
3
|
-
export * from './fraud-validation.error';
|
|
4
1
|
export * from './invalid-argument.error';
|
|
5
|
-
export * from './not-found.error';
|
|
6
|
-
export * from './payment.error';
|
|
7
2
|
export * from './required-argument.error';
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './types';
|
|
3
|
+
export * from './not-found.error';
|
|
4
|
+
export * from './duplicated-results.error';
|
|
@@ -42,6 +42,8 @@ export declare class ProductsIndex {
|
|
|
42
42
|
metadata: import("../../../domain").ProductMetadata;
|
|
43
43
|
outlet?: boolean;
|
|
44
44
|
label?: import("../../../domain").ProductLabel;
|
|
45
|
+
group?: number;
|
|
46
|
+
validity: boolean;
|
|
45
47
|
}[]>;
|
|
46
48
|
save(product: ProductHasuraGraphQL): Promise<void>;
|
|
47
49
|
update(product: ProductHasuraGraphQL): Promise<void>;
|
|
@@ -5,7 +5,7 @@ export * from './checkout-firestore.repository';
|
|
|
5
5
|
export * from './checkout-subscription-firestore.repository';
|
|
6
6
|
export * from './coupon-firestore.repository';
|
|
7
7
|
export * from './legacy-order-firestore.repository';
|
|
8
|
-
export * from './order-blocked-firestore.repository';
|
|
8
|
+
export * from './order-blocked-firestore.repository.ts';
|
|
9
9
|
export * from './order-firestore.repository';
|
|
10
10
|
export * from './payment-firestore.repository';
|
|
11
11
|
export * from './subscription-plan-firestore.repository';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Checkout, OrderBlocked, OrderBlockedRepository,
|
|
1
|
+
import { Checkout, OrderBlocked, OrderBlockedRepository, PaymentCardInfo } from '../../../../../domain';
|
|
2
2
|
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
3
|
declare const OrderBlockedFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<OrderBlocked> & import("../../../../../domain").CrudRepository<OrderBlocked, import("../../../../../domain").CrudParams<OrderBlocked>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<OrderBlocked>, ...any[]]>;
|
|
4
4
|
export declare class OrderBlockedFirestoreRepository extends OrderBlockedFirestoreRepository_base implements OrderBlockedRepository {
|
|
5
5
|
constructor({ firestore, interceptors, }: Pick<FirestoreConstructorParams<OrderBlocked>, 'firestore' | 'interceptors'>);
|
|
6
|
-
createBlockedOrderOrPayment(checkout: Checkout, blockType: string, type:
|
|
6
|
+
createBlockedOrderOrPayment(checkout: Checkout, blockType: string, type: string, limiteRange: string, card?: PaymentCardInfo): Promise<OrderBlocked>;
|
|
7
7
|
private formatZip;
|
|
8
8
|
}
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CategoryProduct, CategoryProductRepository } from '../../../../domain';
|
|
2
|
+
import { HasuraConstructorParams } from '../../mixins';
|
|
3
|
+
declare const CategoryProductHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<CategoryProduct> & import("../../../../domain").CrudRepository<CategoryProduct, import("../../../../domain").CrudParams<CategoryProduct>> & import("../../../../domain").UpdateRepository<CategoryProduct, import("../../../../domain").RepositoryUpdateParams<CategoryProduct>> & {
|
|
4
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<CategoryProduct>): Partial<CategoryProduct>;
|
|
5
|
+
}, [HasuraConstructorParams<CategoryProduct> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
6
|
+
export declare class CategoryProductHasuraGraphQLRepository extends CategoryProductHasuraGraphQLRepository_base implements CategoryProductRepository {
|
|
7
|
+
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<CategoryProduct>, 'endpoint' | 'authOptions' | 'interceptors'>);
|
|
8
|
+
removeProductFromCategory(categoryId: string, productId: string): Promise<void>;
|
|
9
|
+
addProductToCategory(categoryId: string, productId: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './category-collection-children-hasura-graphql.repository';
|
|
2
2
|
export * from './category-filter-hasura-graphql.repository';
|
|
3
3
|
export * from './category-hasura-graphql.repository';
|
|
4
|
+
export * from './category-product-hasura-graphql.repository';
|
|
4
5
|
export * from './filter-hasura-graphql.repository';
|
|
5
6
|
export * from './filter-option-hasura-graphql.repository';
|
|
6
7
|
export * from './product-hasura-graphql.repository';
|
package/src/infra/index.d.ts
CHANGED
package/src/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add, addBusinessDays, addDays, addMonths, addYears, Duration, endOfDay, format, formatISO9075, parseISO, startOfDay, sub
|
|
1
|
+
import { add, addBusinessDays, addDays, addMonths, addYears, Duration, endOfDay, format, formatISO9075, parseISO, startOfDay, sub } from 'date-fns';
|
|
2
2
|
import { chunk, each, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set, sortBy, unset } from 'lodash';
|
|
3
3
|
export type DateDuration = Duration;
|
|
4
4
|
export * from './decorators';
|
|
@@ -10,4 +10,4 @@ export * from './log.utils';
|
|
|
10
10
|
export * from './mixins';
|
|
11
11
|
export * from './parse-datetime';
|
|
12
12
|
export * from './types';
|
|
13
|
-
export { add, addBusinessDays, addDays, addMonths, addYears, chunk, each, endOfDay, format, formatISO9075, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, parseISO, pick, set, sortBy, startOfDay, sub,
|
|
13
|
+
export { add, addBusinessDays, addDays, addMonths, addYears, chunk, each, endOfDay, format, formatISO9075, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, parseISO, pick, set, sortBy, startOfDay, sub, unset, };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier } from '../../generic';
|
|
2
|
-
export declare class Sequence extends BaseModel<Sequence> {
|
|
3
|
-
id?: string;
|
|
4
|
-
type: string;
|
|
5
|
-
counter: number;
|
|
6
|
-
month: number;
|
|
7
|
-
year: number;
|
|
8
|
-
static get identifiersFields(): GenericIdentifier[];
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum PagarmePaymentStatus {
|
|
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
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PaymentProviderCard } from '../interfaces';
|
|
2
|
-
import { AdyenCard } from '../types';
|
|
3
|
-
import { BasePaymentMethodFactory } from './base-payment-method.factory';
|
|
4
|
-
type AdyenPaymentFactoryMethods = {
|
|
5
|
-
card?: PaymentProviderCard<AdyenCard>;
|
|
6
|
-
};
|
|
7
|
-
export declare class AdyenPaymentMethodFactory extends BasePaymentMethodFactory<AdyenPaymentFactoryMethods> {
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AntifraudMethodFactory } from '../interfaces';
|
|
2
|
-
import { AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService } from '../services';
|
|
3
|
-
import { AntifraudeProvider } from '../types';
|
|
4
|
-
type AntifraudMethods = {
|
|
5
|
-
bankSlip?: AntifraudBankSlipService;
|
|
6
|
-
card?: AntifraudCardService;
|
|
7
|
-
pix?: AntifraudPixService;
|
|
8
|
-
glampoints?: AntifraudGlampointsService;
|
|
9
|
-
};
|
|
10
|
-
export declare class AntifraudProviderFactory implements AntifraudMethodFactory {
|
|
11
|
-
private readonly antifraudProviders;
|
|
12
|
-
constructor(antifraudProviders: AntifraudMethods);
|
|
13
|
-
build<T extends AntifraudeProvider>(provider: T): AntifraudProviderFactory['antifraudProviders'][T];
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PaymentMethodFactory, PaymentMethodFactoryMethods } from '../interfaces';
|
|
2
|
-
import { PaymentMethod } from '../types';
|
|
3
|
-
export declare abstract class BasePaymentMethodFactory<T extends PaymentMethodFactoryMethods = PaymentMethodFactoryMethods> implements PaymentMethodFactory {
|
|
4
|
-
private readonly methods;
|
|
5
|
-
constructor(methods: T);
|
|
6
|
-
build<T extends PaymentMethod>(method: T): BasePaymentMethodFactory['methods'][T];
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GlampointsPaymentService } from '../services';
|
|
2
|
-
import { BasePaymentMethodFactory } from './base-payment-method.factory';
|
|
3
|
-
type GlampointsPaymentFactoryMethods = {
|
|
4
|
-
glampoints: GlampointsPaymentService;
|
|
5
|
-
};
|
|
6
|
-
export declare class GlampointsPaymentMethodFactory extends BasePaymentMethodFactory<GlampointsPaymentFactoryMethods> {
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PaymentProviderBankSlip, PaymentProviderCard, PaymentProviderPix } from '../interfaces';
|
|
2
|
-
import { PagarMeCard } from '../types';
|
|
3
|
-
import { BasePaymentMethodFactory } from './base-payment-method.factory';
|
|
4
|
-
type PagarmePaymentFactoryMethods = {
|
|
5
|
-
card?: PaymentProviderCard<PagarMeCard>;
|
|
6
|
-
bankSlip?: PaymentProviderBankSlip;
|
|
7
|
-
pix?: PaymentProviderPix;
|
|
8
|
-
};
|
|
9
|
-
export declare class PagarmePaymentMethodFactory extends BasePaymentMethodFactory<PagarmePaymentFactoryMethods> {
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PaymentProvider } from '../types';
|
|
2
|
-
import { AdyenPaymentMethodFactory } from './adyen-payment-method.factory';
|
|
3
|
-
import { GlampointsPaymentMethodFactory } from './glampoints-payment-method.factory';
|
|
4
|
-
import { PagarmePaymentMethodFactory } from './pagarme-payment-method.factory';
|
|
5
|
-
type PaymentProviderFactoryFactories = {
|
|
6
|
-
pagarMe?: PagarmePaymentMethodFactory;
|
|
7
|
-
adyen?: AdyenPaymentMethodFactory;
|
|
8
|
-
glampoints?: GlampointsPaymentMethodFactory;
|
|
9
|
-
};
|
|
10
|
-
export declare class PaymentProviderFactory {
|
|
11
|
-
private readonly paymentProviders;
|
|
12
|
-
constructor(paymentProviders: PaymentProviderFactoryFactories);
|
|
13
|
-
build<T extends PaymentProvider>(provider: T): PaymentProviderFactory['paymentProviders'][T];
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AntifraudeProvider } from '../types';
|
|
2
|
-
import { AntifraudProvider } from './antifraud-provider.interface';
|
|
3
|
-
export type AntifraudMethods = {
|
|
4
|
-
bankSlip?: AntifraudProvider;
|
|
5
|
-
card?: AntifraudProvider;
|
|
6
|
-
pix?: AntifraudProvider;
|
|
7
|
-
glampoints?: AntifraudProvider;
|
|
8
|
-
};
|
|
9
|
-
export interface AntifraudMethodFactory {
|
|
10
|
-
build<T extends AntifraudeProvider>(method: T): AntifraudMethods[T];
|
|
11
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './antifraud-method-factory.interface';
|
|
2
|
-
export * from './antifraud-provider.interface';
|
|
3
|
-
export * from './payment-method-factory.interface';
|
|
4
|
-
export * from './payment-provider-bank-slip.interface';
|
|
5
|
-
export * from './payment-provider-card.interface';
|
|
6
|
-
export * from './payment-provider-glampoints.interface';
|
|
7
|
-
export * from './payment-provider-pix.interface';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PaymentMethod } from '../types';
|
|
2
|
-
import { PaymentProviderBankSlip } from './payment-provider-bank-slip.interface';
|
|
3
|
-
import { PaymentProviderCard } from './payment-provider-card.interface';
|
|
4
|
-
import { PaymentProviderGlampoints } from './payment-provider-glampoints.interface';
|
|
5
|
-
import { PaymentProviderPix } from './payment-provider-pix.interface';
|
|
6
|
-
export type PaymentMethodFactoryMethods = {
|
|
7
|
-
card?: PaymentProviderCard;
|
|
8
|
-
bankSlip?: PaymentProviderBankSlip;
|
|
9
|
-
pix?: PaymentProviderPix;
|
|
10
|
-
glampoints?: PaymentProviderGlampoints;
|
|
11
|
-
};
|
|
12
|
-
export interface PaymentMethodFactory {
|
|
13
|
-
build<T extends PaymentMethod>(method: T): PaymentMethodFactoryMethods[T];
|
|
14
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PaymentTransaction } from '../models';
|
|
2
|
-
import { Checkout } from '../models/checkout';
|
|
3
|
-
import { Payment } from '../models/payment';
|
|
4
|
-
export interface PaymentProviderBankSlip {
|
|
5
|
-
pay(checkout: Checkout): Promise<Payment>;
|
|
6
|
-
getBoletoTransaction(paymentId: number): Promise<PaymentTransaction>;
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BusinessUnitEnum } from '../enums';
|
|
2
|
-
import { PaymentTransaction } from '../models';
|
|
3
|
-
import { Checkout } from '../models/checkout';
|
|
4
|
-
import { Payment } from '../models/payment';
|
|
5
|
-
import { CardInfo, PaymentCardInfo } from '../types';
|
|
6
|
-
import { BaseCard } from '../types/base-card.type';
|
|
7
|
-
export interface PaymentProviderCard<Card extends BaseCard = BaseCard> {
|
|
8
|
-
pay(checkout: Checkout, card: PaymentCardInfo): Promise<Payment>;
|
|
9
|
-
addCard(card: CardInfo): Promise<Card>;
|
|
10
|
-
getCardByToken(token: string): Promise<Card>;
|
|
11
|
-
createCardHash<T>(bu: BusinessUnitEnum, card?: CardInfo): Promise<string | T>;
|
|
12
|
-
createTransaction(info: any): Promise<PaymentTransaction>;
|
|
13
|
-
}
|