@infrab4a/connect 5.6.3 → 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 +59 -4
- package/index.esm.js +59 -5
- package/package.json +1 -1
- package/src/domain/shopping/models/enums/order-status.enum.d.ts +2 -1
- package/src/domain/shopping/models/shipping-method.d.ts +2 -0
- 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
|
@@ -1691,6 +1691,7 @@ exports.OrderStatus = void 0;
|
|
|
1691
1691
|
OrderStatus["ENTREGUE"] = "Entregue";
|
|
1692
1692
|
OrderStatus["CANCELADO"] = "Cancelado";
|
|
1693
1693
|
OrderStatus["PENDENTE_REENVIO"] = "Pendente reenvio";
|
|
1694
|
+
OrderStatus["AGUARDANDO_STOCK_REENVIO"] = "Aguardando stock para reenvio";
|
|
1694
1695
|
})(exports.OrderStatus || (exports.OrderStatus = {}));
|
|
1695
1696
|
|
|
1696
1697
|
class Order extends Checkout {
|
|
@@ -9876,8 +9877,36 @@ class MercadoPagoBankSlipAxiosAdapter {
|
|
|
9876
9877
|
}
|
|
9877
9878
|
}
|
|
9878
9879
|
|
|
9879
|
-
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 {
|
|
9880
9908
|
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
9909
|
+
super(credentials);
|
|
9881
9910
|
this.credentials = credentials;
|
|
9882
9911
|
this.paymentRepository = paymentRepository;
|
|
9883
9912
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
@@ -10006,8 +10035,9 @@ class MercadoPagoCardAxiosAdapter {
|
|
|
10006
10035
|
}
|
|
10007
10036
|
}
|
|
10008
10037
|
|
|
10009
|
-
class MercadoPagoPixAxiosAdapter {
|
|
10038
|
+
class MercadoPagoPixAxiosAdapter extends MercadoPagoBaseAxiosAdapter {
|
|
10010
10039
|
constructor(credentials, paymentRepository) {
|
|
10040
|
+
super(credentials);
|
|
10011
10041
|
this.credentials = credentials;
|
|
10012
10042
|
this.paymentRepository = paymentRepository;
|
|
10013
10043
|
}
|
|
@@ -10882,8 +10912,31 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
10882
10912
|
}
|
|
10883
10913
|
}
|
|
10884
10914
|
|
|
10885
|
-
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 {
|
|
10886
10938
|
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
10939
|
+
super(credentials);
|
|
10887
10940
|
this.credentials = credentials;
|
|
10888
10941
|
this.paymentRepository = paymentRepository;
|
|
10889
10942
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
@@ -11053,8 +11106,9 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
11053
11106
|
}
|
|
11054
11107
|
}
|
|
11055
11108
|
|
|
11056
|
-
class PagarmeV5PixAxiosAdapter {
|
|
11109
|
+
class PagarmeV5PixAxiosAdapter extends PagarmeV5BaseAxiosAdapter {
|
|
11057
11110
|
constructor(credentials, paymentRepository) {
|
|
11111
|
+
super(credentials);
|
|
11058
11112
|
this.credentials = credentials;
|
|
11059
11113
|
this.paymentRepository = paymentRepository;
|
|
11060
11114
|
}
|
|
@@ -11470,6 +11524,7 @@ exports.PagarmeCardAxiosAdapter = PagarmeCardAxiosAdapter;
|
|
|
11470
11524
|
exports.PagarmePaymentMethodFactory = PagarmePaymentMethodFactory;
|
|
11471
11525
|
exports.PagarmePixAxiosAdapter = PagarmePixAxiosAdapter;
|
|
11472
11526
|
exports.PagarmeV5BankSlipAxiosAdapter = PagarmeV5BankSlipAxiosAdapter;
|
|
11527
|
+
exports.PagarmeV5BaseAxiosAdapter = PagarmeV5BaseAxiosAdapter;
|
|
11473
11528
|
exports.PagarmeV5CardAxiosAdapter = PagarmeV5CardAxiosAdapter;
|
|
11474
11529
|
exports.PagarmeV5PixAxiosAdapter = PagarmeV5PixAxiosAdapter;
|
|
11475
11530
|
exports.Payment = Payment;
|
package/index.esm.js
CHANGED
|
@@ -1667,6 +1667,7 @@ var OrderStatus;
|
|
|
1667
1667
|
OrderStatus["ENTREGUE"] = "Entregue";
|
|
1668
1668
|
OrderStatus["CANCELADO"] = "Cancelado";
|
|
1669
1669
|
OrderStatus["PENDENTE_REENVIO"] = "Pendente reenvio";
|
|
1670
|
+
OrderStatus["AGUARDANDO_STOCK_REENVIO"] = "Aguardando stock para reenvio";
|
|
1670
1671
|
})(OrderStatus || (OrderStatus = {}));
|
|
1671
1672
|
|
|
1672
1673
|
class Order extends Checkout {
|
|
@@ -9852,8 +9853,36 @@ class MercadoPagoBankSlipAxiosAdapter {
|
|
|
9852
9853
|
}
|
|
9853
9854
|
}
|
|
9854
9855
|
|
|
9855
|
-
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 {
|
|
9856
9884
|
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
9885
|
+
super(credentials);
|
|
9857
9886
|
this.credentials = credentials;
|
|
9858
9887
|
this.paymentRepository = paymentRepository;
|
|
9859
9888
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
@@ -9982,8 +10011,9 @@ class MercadoPagoCardAxiosAdapter {
|
|
|
9982
10011
|
}
|
|
9983
10012
|
}
|
|
9984
10013
|
|
|
9985
|
-
class MercadoPagoPixAxiosAdapter {
|
|
10014
|
+
class MercadoPagoPixAxiosAdapter extends MercadoPagoBaseAxiosAdapter {
|
|
9986
10015
|
constructor(credentials, paymentRepository) {
|
|
10016
|
+
super(credentials);
|
|
9987
10017
|
this.credentials = credentials;
|
|
9988
10018
|
this.paymentRepository = paymentRepository;
|
|
9989
10019
|
}
|
|
@@ -10858,8 +10888,31 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
10858
10888
|
}
|
|
10859
10889
|
}
|
|
10860
10890
|
|
|
10861
|
-
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 {
|
|
10862
10914
|
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
10915
|
+
super(credentials);
|
|
10863
10916
|
this.credentials = credentials;
|
|
10864
10917
|
this.paymentRepository = paymentRepository;
|
|
10865
10918
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
@@ -11029,8 +11082,9 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
11029
11082
|
}
|
|
11030
11083
|
}
|
|
11031
11084
|
|
|
11032
|
-
class PagarmeV5PixAxiosAdapter {
|
|
11085
|
+
class PagarmeV5PixAxiosAdapter extends PagarmeV5BaseAxiosAdapter {
|
|
11033
11086
|
constructor(credentials, paymentRepository) {
|
|
11087
|
+
super(credentials);
|
|
11034
11088
|
this.credentials = credentials;
|
|
11035
11089
|
this.paymentRepository = paymentRepository;
|
|
11036
11090
|
}
|
|
@@ -11224,4 +11278,4 @@ class ProductsVertexSearch {
|
|
|
11224
11278
|
}
|
|
11225
11279
|
}
|
|
11226
11280
|
|
|
11227
|
-
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
|
@@ -17,5 +17,7 @@ export declare class ShippingMethod extends BaseModel<ShippingMethod> {
|
|
|
17
17
|
additionalDescription?: string;
|
|
18
18
|
serviceCode?: string;
|
|
19
19
|
isSubscriptionAddress?: boolean;
|
|
20
|
+
theme?: string;
|
|
21
|
+
editionId?: string;
|
|
20
22
|
static get identifiersFields(): GenericIdentifier[];
|
|
21
23
|
}
|
|
@@ -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
|
}
|