@infrab4a/connect 5.6.4 → 5.6.5-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 +58 -4
- package/index.esm.js +58 -5
- package/package.json +1 -1
- package/src/infra/mercado-pago/adapters/mercado-pago-base-axios.d.ts +6 -0
- package/src/infra/mercado-pago/adapters/mercado-pago-card-payment-axios.adapter.d.ts +5 -4
- package/src/infra/mercado-pago/adapters/mercado-pago-pix-payment-axios.adapter.d.ts +4 -3
- package/src/infra/pagarme/adapters/v5/index.d.ts +1 -0
- package/src/infra/pagarme/adapters/v5/pagarmev5-base-axios.d.ts +6 -0
- package/src/infra/pagarme/adapters/v5/pagarmev5-card-payment-axios.adapter.d.ts +5 -4
- package/src/infra/pagarme/adapters/v5/pagarmev5-pix-payment-axios.adapter.d.ts +4 -3
package/index.cjs.js
CHANGED
|
@@ -9877,8 +9877,36 @@ class MercadoPagoBankSlipAxiosAdapter {
|
|
|
9877
9877
|
}
|
|
9878
9878
|
}
|
|
9879
9879
|
|
|
9880
|
-
class
|
|
9880
|
+
class MercadoPagoBaseAxiosAdapter {
|
|
9881
|
+
constructor(credentials) {
|
|
9882
|
+
this.credentials = credentials;
|
|
9883
|
+
}
|
|
9884
|
+
async refund(order, amount) {
|
|
9885
|
+
const { data } = await axios__default["default"]({
|
|
9886
|
+
method: 'POST',
|
|
9887
|
+
url: `${this.credentials.url}/orders/${order.id}/refund`,
|
|
9888
|
+
headers: {
|
|
9889
|
+
'X-Idempotency-Key': `${order.id}-${new Date().getTime()}`,
|
|
9890
|
+
Authorization: `Bearer ${this.credentials.api_key}`,
|
|
9891
|
+
'Content-Type': 'application/json',
|
|
9892
|
+
},
|
|
9893
|
+
data: {
|
|
9894
|
+
transactions: [
|
|
9895
|
+
{
|
|
9896
|
+
id: order.id,
|
|
9897
|
+
amount,
|
|
9898
|
+
},
|
|
9899
|
+
],
|
|
9900
|
+
},
|
|
9901
|
+
});
|
|
9902
|
+
console.warn('[RESPONSE MERCADO PAGO REFUND]', JSON.stringify(data));
|
|
9903
|
+
return data;
|
|
9904
|
+
}
|
|
9905
|
+
}
|
|
9906
|
+
|
|
9907
|
+
class MercadoPagoCardAxiosAdapter extends MercadoPagoBaseAxiosAdapter {
|
|
9881
9908
|
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
9909
|
+
super(credentials);
|
|
9882
9910
|
this.credentials = credentials;
|
|
9883
9911
|
this.paymentRepository = paymentRepository;
|
|
9884
9912
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
@@ -10007,8 +10035,9 @@ class MercadoPagoCardAxiosAdapter {
|
|
|
10007
10035
|
}
|
|
10008
10036
|
}
|
|
10009
10037
|
|
|
10010
|
-
class MercadoPagoPixAxiosAdapter {
|
|
10038
|
+
class MercadoPagoPixAxiosAdapter extends MercadoPagoBaseAxiosAdapter {
|
|
10011
10039
|
constructor(credentials, paymentRepository) {
|
|
10040
|
+
super(credentials);
|
|
10012
10041
|
this.credentials = credentials;
|
|
10013
10042
|
this.paymentRepository = paymentRepository;
|
|
10014
10043
|
}
|
|
@@ -10883,8 +10912,31 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
10883
10912
|
}
|
|
10884
10913
|
}
|
|
10885
10914
|
|
|
10886
|
-
class
|
|
10915
|
+
class PagarmeV5BaseAxiosAdapter {
|
|
10916
|
+
constructor(credentials) {
|
|
10917
|
+
this.credentials = credentials;
|
|
10918
|
+
}
|
|
10919
|
+
async refund(order, amount) {
|
|
10920
|
+
const amountToSend = amount * 100;
|
|
10921
|
+
const { data } = await axios__default["default"]({
|
|
10922
|
+
method: 'DELETE',
|
|
10923
|
+
url: `${this.credentials.URL}/charges/${order.payment.charger_id}`,
|
|
10924
|
+
headers: {
|
|
10925
|
+
Authorization: 'Basic ' + Buffer.from(`${this.credentials.API_KEY}:`).toString('base64'),
|
|
10926
|
+
'Content-Type': 'application/json',
|
|
10927
|
+
},
|
|
10928
|
+
data: {
|
|
10929
|
+
amount: amountToSend,
|
|
10930
|
+
},
|
|
10931
|
+
});
|
|
10932
|
+
console.warn('[RESPONSE PAGARME REFUND]', JSON.stringify(data));
|
|
10933
|
+
return data;
|
|
10934
|
+
}
|
|
10935
|
+
}
|
|
10936
|
+
|
|
10937
|
+
class PagarmeV5CardAxiosAdapter extends PagarmeV5BaseAxiosAdapter {
|
|
10887
10938
|
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
10939
|
+
super(credentials);
|
|
10888
10940
|
this.credentials = credentials;
|
|
10889
10941
|
this.paymentRepository = paymentRepository;
|
|
10890
10942
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
@@ -11054,8 +11106,9 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
11054
11106
|
}
|
|
11055
11107
|
}
|
|
11056
11108
|
|
|
11057
|
-
class PagarmeV5PixAxiosAdapter {
|
|
11109
|
+
class PagarmeV5PixAxiosAdapter extends PagarmeV5BaseAxiosAdapter {
|
|
11058
11110
|
constructor(credentials, paymentRepository) {
|
|
11111
|
+
super(credentials);
|
|
11059
11112
|
this.credentials = credentials;
|
|
11060
11113
|
this.paymentRepository = paymentRepository;
|
|
11061
11114
|
}
|
|
@@ -11471,6 +11524,7 @@ exports.PagarmeCardAxiosAdapter = PagarmeCardAxiosAdapter;
|
|
|
11471
11524
|
exports.PagarmePaymentMethodFactory = PagarmePaymentMethodFactory;
|
|
11472
11525
|
exports.PagarmePixAxiosAdapter = PagarmePixAxiosAdapter;
|
|
11473
11526
|
exports.PagarmeV5BankSlipAxiosAdapter = PagarmeV5BankSlipAxiosAdapter;
|
|
11527
|
+
exports.PagarmeV5BaseAxiosAdapter = PagarmeV5BaseAxiosAdapter;
|
|
11474
11528
|
exports.PagarmeV5CardAxiosAdapter = PagarmeV5CardAxiosAdapter;
|
|
11475
11529
|
exports.PagarmeV5PixAxiosAdapter = PagarmeV5PixAxiosAdapter;
|
|
11476
11530
|
exports.Payment = Payment;
|
package/index.esm.js
CHANGED
|
@@ -9853,8 +9853,36 @@ class MercadoPagoBankSlipAxiosAdapter {
|
|
|
9853
9853
|
}
|
|
9854
9854
|
}
|
|
9855
9855
|
|
|
9856
|
-
class
|
|
9856
|
+
class MercadoPagoBaseAxiosAdapter {
|
|
9857
|
+
constructor(credentials) {
|
|
9858
|
+
this.credentials = credentials;
|
|
9859
|
+
}
|
|
9860
|
+
async refund(order, amount) {
|
|
9861
|
+
const { data } = await axios({
|
|
9862
|
+
method: 'POST',
|
|
9863
|
+
url: `${this.credentials.url}/orders/${order.id}/refund`,
|
|
9864
|
+
headers: {
|
|
9865
|
+
'X-Idempotency-Key': `${order.id}-${new Date().getTime()}`,
|
|
9866
|
+
Authorization: `Bearer ${this.credentials.api_key}`,
|
|
9867
|
+
'Content-Type': 'application/json',
|
|
9868
|
+
},
|
|
9869
|
+
data: {
|
|
9870
|
+
transactions: [
|
|
9871
|
+
{
|
|
9872
|
+
id: order.id,
|
|
9873
|
+
amount,
|
|
9874
|
+
},
|
|
9875
|
+
],
|
|
9876
|
+
},
|
|
9877
|
+
});
|
|
9878
|
+
console.warn('[RESPONSE MERCADO PAGO REFUND]', JSON.stringify(data));
|
|
9879
|
+
return data;
|
|
9880
|
+
}
|
|
9881
|
+
}
|
|
9882
|
+
|
|
9883
|
+
class MercadoPagoCardAxiosAdapter extends MercadoPagoBaseAxiosAdapter {
|
|
9857
9884
|
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
9885
|
+
super(credentials);
|
|
9858
9886
|
this.credentials = credentials;
|
|
9859
9887
|
this.paymentRepository = paymentRepository;
|
|
9860
9888
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
@@ -9983,8 +10011,9 @@ class MercadoPagoCardAxiosAdapter {
|
|
|
9983
10011
|
}
|
|
9984
10012
|
}
|
|
9985
10013
|
|
|
9986
|
-
class MercadoPagoPixAxiosAdapter {
|
|
10014
|
+
class MercadoPagoPixAxiosAdapter extends MercadoPagoBaseAxiosAdapter {
|
|
9987
10015
|
constructor(credentials, paymentRepository) {
|
|
10016
|
+
super(credentials);
|
|
9988
10017
|
this.credentials = credentials;
|
|
9989
10018
|
this.paymentRepository = paymentRepository;
|
|
9990
10019
|
}
|
|
@@ -10859,8 +10888,31 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
10859
10888
|
}
|
|
10860
10889
|
}
|
|
10861
10890
|
|
|
10862
|
-
class
|
|
10891
|
+
class PagarmeV5BaseAxiosAdapter {
|
|
10892
|
+
constructor(credentials) {
|
|
10893
|
+
this.credentials = credentials;
|
|
10894
|
+
}
|
|
10895
|
+
async refund(order, amount) {
|
|
10896
|
+
const amountToSend = amount * 100;
|
|
10897
|
+
const { data } = await axios({
|
|
10898
|
+
method: 'DELETE',
|
|
10899
|
+
url: `${this.credentials.URL}/charges/${order.payment.charger_id}`,
|
|
10900
|
+
headers: {
|
|
10901
|
+
Authorization: 'Basic ' + Buffer.from(`${this.credentials.API_KEY}:`).toString('base64'),
|
|
10902
|
+
'Content-Type': 'application/json',
|
|
10903
|
+
},
|
|
10904
|
+
data: {
|
|
10905
|
+
amount: amountToSend,
|
|
10906
|
+
},
|
|
10907
|
+
});
|
|
10908
|
+
console.warn('[RESPONSE PAGARME REFUND]', JSON.stringify(data));
|
|
10909
|
+
return data;
|
|
10910
|
+
}
|
|
10911
|
+
}
|
|
10912
|
+
|
|
10913
|
+
class PagarmeV5CardAxiosAdapter extends PagarmeV5BaseAxiosAdapter {
|
|
10863
10914
|
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
10915
|
+
super(credentials);
|
|
10864
10916
|
this.credentials = credentials;
|
|
10865
10917
|
this.paymentRepository = paymentRepository;
|
|
10866
10918
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
@@ -11030,8 +11082,9 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
11030
11082
|
}
|
|
11031
11083
|
}
|
|
11032
11084
|
|
|
11033
|
-
class PagarmeV5PixAxiosAdapter {
|
|
11085
|
+
class PagarmeV5PixAxiosAdapter extends PagarmeV5BaseAxiosAdapter {
|
|
11034
11086
|
constructor(credentials, paymentRepository) {
|
|
11087
|
+
super(credentials);
|
|
11035
11088
|
this.credentials = credentials;
|
|
11036
11089
|
this.paymentRepository = paymentRepository;
|
|
11037
11090
|
}
|
|
@@ -11225,4 +11278,4 @@ class ProductsVertexSearch {
|
|
|
11225
11278
|
}
|
|
11226
11279
|
}
|
|
11227
11280
|
|
|
11228
|
-
export { AccessoryImportances, Address, AdyenCardAxiosAdapter, AdyenPaymentMethodFactory, AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService, AntifraudProviderFactory, AntifraudProviders, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, BrandCategory, BrandCategoryFirestoreRepository, BrandEquityOptions, BusinessError, BusinessUnitEnum, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, CategoryProduct, CategoryProductHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponCategories, CouponCategory, CouponChannels, CouponFirestoreRepository, CouponOldCategories, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, ErrorsCode, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, FraudValidationError, GenderDestination, GlampointsPaymentMethodFactory, GlampointsPaymentService, Group, GroupFirestoreRepository, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, InvalidCheckoutError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoErrorHelper, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, MercadoPagoStatusDetailEnum, MercadoPagoStatusEnum, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, OrderPaymentStatus, OrderStatus, PagarMeV5OrderStatus, PagarMeV5PaymentStatus, PagarmeBankSlipAxiosAdapter, PagarmeCardAxiosAdapter, PagarmePaymentMethodFactory, PagarmePaymentStatus, PagarmePixAxiosAdapter, PagarmeV5BankSlipAxiosAdapter, PagarmeV5CardAxiosAdapter, PagarmeV5PixAxiosAdapter, Payment, PaymentError, PaymentFirestoreRepository, PaymentMethods, PaymentProviderFactory, PaymentProviders, PaymentTransaction, PaymentType, PersonTypes, Plans, Product, ProductCatalogHasuraGraphQL, ProductCatalogHasuraGraphQLRepository, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductGroup, ProductGroupHasuraGraphQLRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductPriceLog, ProductPriceLogHasuraGraphQLRepository, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockEntry, ProductStockEntryHasuraGraphQL, ProductStockEntryHasuraGraphQLRepository, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, ShopConfigs, ShopConfigsFirestoreRepository, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, StockLimitError, StockOutError, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, TransactionPaymentMethods, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, VertexAxiosAdapter, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, WishlistLogType, deserialize, getClass, is, isDebuggable, isUUID, parseDateTime, registerClass, resolveClass, serialize, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
|
11281
|
+
export { AccessoryImportances, Address, AdyenCardAxiosAdapter, AdyenPaymentMethodFactory, AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService, AntifraudProviderFactory, AntifraudProviders, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, BrandCategory, BrandCategoryFirestoreRepository, BrandEquityOptions, BusinessError, BusinessUnitEnum, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, CategoryProduct, CategoryProductHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponCategories, CouponCategory, CouponChannels, CouponFirestoreRepository, CouponOldCategories, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, ErrorsCode, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, FraudValidationError, GenderDestination, GlampointsPaymentMethodFactory, GlampointsPaymentService, Group, GroupFirestoreRepository, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, InvalidCheckoutError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoErrorHelper, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, MercadoPagoStatusDetailEnum, MercadoPagoStatusEnum, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, OrderPaymentStatus, OrderStatus, PagarMeV5OrderStatus, PagarMeV5PaymentStatus, PagarmeBankSlipAxiosAdapter, PagarmeCardAxiosAdapter, PagarmePaymentMethodFactory, PagarmePaymentStatus, PagarmePixAxiosAdapter, PagarmeV5BankSlipAxiosAdapter, PagarmeV5BaseAxiosAdapter, PagarmeV5CardAxiosAdapter, PagarmeV5PixAxiosAdapter, Payment, PaymentError, PaymentFirestoreRepository, PaymentMethods, PaymentProviderFactory, PaymentProviders, PaymentTransaction, PaymentType, PersonTypes, Plans, Product, ProductCatalogHasuraGraphQL, ProductCatalogHasuraGraphQLRepository, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductGroup, ProductGroupHasuraGraphQLRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductPriceLog, ProductPriceLogHasuraGraphQLRepository, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockEntry, ProductStockEntryHasuraGraphQL, ProductStockEntryHasuraGraphQLRepository, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, ShopConfigs, ShopConfigsFirestoreRepository, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, StockLimitError, StockOutError, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, TransactionPaymentMethods, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, VertexAxiosAdapter, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, WishlistLogType, deserialize, getClass, is, isDebuggable, isUUID, parseDateTime, registerClass, resolveClass, serialize, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
package/package.json
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MercadoPagoCredentials, Order } from '../../../domain';
|
|
2
|
+
export declare class MercadoPagoBaseAxiosAdapter {
|
|
3
|
+
protected credentials: MercadoPagoCredentials;
|
|
4
|
+
constructor(credentials: MercadoPagoCredentials);
|
|
5
|
+
refund(order: Order, amount: number): Promise<any>;
|
|
6
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BusinessUnitEnum, CardInfo, Checkout, MercadoPagoCard, MercadoPagoCardTokenResponse, MercadoPagoCredentials, OrderBlockedRepository, Payment, PaymentCardInfo, PaymentProviderCard, PaymentRepository, PaymentTransaction, Shops, User, UserAddress } from '../../../domain';
|
|
2
2
|
import { MercadoPagoResponse } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { MercadoPagoBaseAxiosAdapter } from './mercado-pago-base-axios';
|
|
4
|
+
export declare class MercadoPagoCardAxiosAdapter extends MercadoPagoBaseAxiosAdapter implements PaymentProviderCard<MercadoPagoCard> {
|
|
5
|
+
protected credentials: MercadoPagoCredentials;
|
|
6
|
+
protected paymentRepository: PaymentRepository;
|
|
7
|
+
protected orderBlockedRepository: OrderBlockedRepository;
|
|
7
8
|
constructor(credentials: MercadoPagoCredentials, paymentRepository: PaymentRepository, orderBlockedRepository: OrderBlockedRepository);
|
|
8
9
|
pay(checkout: Checkout, card: PaymentCardInfo): Promise<Payment>;
|
|
9
10
|
requestPayment(checkout: Checkout, payload: any): Promise<MercadoPagoResponse>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Checkout, MercadoPagoCredentials, Payment, PaymentProviderPix, PaymentRepository } from '../../../domain';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { MercadoPagoBaseAxiosAdapter } from './mercado-pago-base-axios';
|
|
3
|
+
export declare class MercadoPagoPixAxiosAdapter extends MercadoPagoBaseAxiosAdapter implements PaymentProviderPix {
|
|
4
|
+
protected credentials: MercadoPagoCredentials;
|
|
5
|
+
protected paymentRepository: PaymentRepository;
|
|
5
6
|
constructor(credentials: MercadoPagoCredentials, paymentRepository: PaymentRepository);
|
|
6
7
|
pay(checkout: Checkout): Promise<Payment>;
|
|
7
8
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Order, PagarmeCredentialsV5 } from '../../../../domain';
|
|
2
|
+
export declare class PagarmeV5BaseAxiosAdapter {
|
|
3
|
+
protected credentials: PagarmeCredentialsV5;
|
|
4
|
+
constructor(credentials: PagarmeCredentialsV5);
|
|
5
|
+
refund(order: Order, amount: number): Promise<any>;
|
|
6
|
+
}
|
|
@@ -5,10 +5,11 @@ import { Checkout, Payment, PaymentTransaction } from '../../../../domain/shoppi
|
|
|
5
5
|
import { OrderBlockedRepository, PaymentRepository } from '../../../../domain/shopping/repositories';
|
|
6
6
|
import { CardInfo, PagarMeCard, PagarmeCredentialsV5, PaymentCardInfo } from '../../../../domain/shopping/types';
|
|
7
7
|
import { PagarMeV5Customer } from '../../types';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { PagarmeV5BaseAxiosAdapter } from './pagarmev5-base-axios';
|
|
9
|
+
export declare class PagarmeV5CardAxiosAdapter extends PagarmeV5BaseAxiosAdapter implements PaymentProviderCard<PagarMeCard> {
|
|
10
|
+
protected credentials: PagarmeCredentialsV5;
|
|
11
|
+
protected paymentRepository: PaymentRepository;
|
|
12
|
+
protected orderBlockedRepository: OrderBlockedRepository;
|
|
12
13
|
constructor(credentials: PagarmeCredentialsV5, paymentRepository: PaymentRepository, orderBlockedRepository: OrderBlockedRepository);
|
|
13
14
|
pay(checkout: Checkout, card: PaymentCardInfo): Promise<Payment>;
|
|
14
15
|
addCard(card: CardInfo, customer: User & {
|
|
@@ -2,9 +2,10 @@ import { PagarmeCredentialsV5 } from '../../../../domain';
|
|
|
2
2
|
import { PaymentProviderPix } from '../../../../domain/shopping/interfaces';
|
|
3
3
|
import { Checkout, Payment } from '../../../../domain/shopping/models';
|
|
4
4
|
import { PaymentRepository } from '../../../../domain/shopping/repositories';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { PagarmeV5BaseAxiosAdapter } from './pagarmev5-base-axios';
|
|
6
|
+
export declare class PagarmeV5PixAxiosAdapter extends PagarmeV5BaseAxiosAdapter implements PaymentProviderPix {
|
|
7
|
+
protected credentials: PagarmeCredentialsV5;
|
|
8
|
+
protected paymentRepository: PaymentRepository;
|
|
8
9
|
constructor(credentials: PagarmeCredentialsV5, paymentRepository: PaymentRepository);
|
|
9
10
|
pay(checkout: Checkout): Promise<Payment>;
|
|
10
11
|
}
|