@infrab4a/connect 5.4.0-beta.22 → 5.4.0-beta.24

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 CHANGED
@@ -8788,7 +8788,6 @@ class MercadoPagoRequestHelper {
8788
8788
  statement_descriptor: checkout.shop === exports.Shops.GLAMSHOP ? 'Glam' : 'Mens Market',
8789
8789
  additional_info: {
8790
8790
  items: this.buildItems(checkout),
8791
- ...(method === 'credit_card' && { payer: this.buildFullPayer(checkout) }),
8792
8791
  },
8793
8792
  ...(method === 'credit_card' && this.buildCardPayment(card)),
8794
8793
  ...(method === 'pix' && this.buildPixPayment()),
@@ -8985,9 +8984,7 @@ class MercadoPagoBankSlipAxiosAdapter {
8985
8984
  }
8986
8985
  catch (error) {
8987
8986
  if (error instanceof axios.AxiosError) {
8988
- console.warn(error.response);
8989
- console.warn(error.response.data);
8990
- console.warn(error.response.data.cause);
8987
+ console.warn(JSON.stringify(error.response.data.cause));
8991
8988
  }
8992
8989
  }
8993
8990
  }
@@ -9003,40 +9000,48 @@ class MercadoPagoCardAxiosAdapter {
9003
9000
  this.orderBlockedRepository = orderBlockedRepository;
9004
9001
  }
9005
9002
  async pay(checkout, card) {
9006
- const payload = MercadoPagoRequestHelper.build({
9007
- checkout,
9008
- method: 'credit_card',
9009
- postback: this.credentials.postback,
9010
- card,
9011
- });
9012
- console.warn('[MERCADO PAGO CARD DATA TO SEND]', JSON.stringify(payload));
9013
- const { data } = await axios__default["default"]({
9014
- method: 'POST',
9015
- url: `${this.credentials.url}/v1/payments`,
9016
- headers: {
9017
- 'X-Idempotency-Key': `${checkout.id}-${new Date().getTime()}`,
9018
- Authorization: `Bearer ${this.credentials.api_key}`,
9019
- 'Content-Type': 'application/json',
9020
- },
9021
- data: payload,
9022
- });
9023
- console.warn('[MERCADO PAGO RESPONSE CARD DATA]', JSON.stringify(data));
9024
- if ((data.status !== 'approved' && data.status_detail !== 'accredited') || data.status !== 'authorized') {
9025
- await this.orderBlockedRepository.createBlockedOrderOrPayment({
9003
+ try {
9004
+ const payload = MercadoPagoRequestHelper.build({
9026
9005
  checkout,
9027
- blockType: 'Card not authorized',
9028
- type: 'Card',
9029
- limiteRange: 'day',
9006
+ method: 'credit_card',
9007
+ postback: this.credentials.postback,
9030
9008
  card,
9031
9009
  });
9032
- throw new PaymentError('Seu pagamento com cartão não foi autorizado. Para não perder seus produtos, pague com PIX ou outro cartão de crédito', {
9033
- checkoutId: checkout.id,
9034
- userEmail: checkout.user.email,
9035
- info: data,
9010
+ console.warn('[MERCADO PAGO CARD DATA TO SEND]', JSON.stringify(payload));
9011
+ const { data } = await axios__default["default"]({
9012
+ method: 'POST',
9013
+ url: `${this.credentials.url}/v1/payments`,
9014
+ headers: {
9015
+ 'X-Idempotency-Key': `${checkout.id}-${new Date().getTime()}`,
9016
+ Authorization: `Bearer ${this.credentials.api_key}`,
9017
+ 'Content-Type': 'application/json',
9018
+ },
9019
+ data: payload,
9036
9020
  });
9021
+ console.warn('[MERCADO PAGO RESPONSE CARD DATA]', JSON.stringify(data));
9022
+ if ((data.status !== 'approved' && data.status_detail !== exports.MercadoPagoStatusDetailEnum.accredited) ||
9023
+ data.status !== 'authorized') {
9024
+ await this.orderBlockedRepository.createBlockedOrderOrPayment({
9025
+ checkout,
9026
+ blockType: 'Card not authorized',
9027
+ type: 'Card',
9028
+ limiteRange: 'day',
9029
+ card,
9030
+ });
9031
+ throw new PaymentError('Seu pagamento com cartão não foi autorizado. Para não perder seus produtos, pague com PIX ou outro cartão de crédito', {
9032
+ checkoutId: checkout.id,
9033
+ userEmail: checkout.user.email,
9034
+ info: data,
9035
+ });
9036
+ }
9037
+ const payment = await this.paymentRepository.create(MercadoPagoResponseHelper.build(exports.TransactionPaymentMethods.CARD, checkout, data));
9038
+ return payment;
9039
+ }
9040
+ catch (error) {
9041
+ if (error instanceof axios.AxiosError) {
9042
+ console.warn(JSON.stringify(error.response.data.cause));
9043
+ }
9037
9044
  }
9038
- const payment = await this.paymentRepository.create(MercadoPagoResponseHelper.build(exports.TransactionPaymentMethods.CARD, checkout, data));
9039
- return payment;
9040
9045
  }
9041
9046
  async addCard(card, customer) {
9042
9047
  const { data } = await axios__default["default"]({
@@ -9134,14 +9139,59 @@ class MercadoPagoPixAxiosAdapter {
9134
9139
  }
9135
9140
  catch (error) {
9136
9141
  if (error instanceof axios.AxiosError) {
9137
- console.warn(error.response);
9138
- console.warn(error.response.data);
9139
- console.warn(error.response.data.cause);
9142
+ console.warn(JSON.stringify(error.response.data.cause));
9140
9143
  }
9141
9144
  }
9142
9145
  }
9143
9146
  }
9144
9147
 
9148
+ exports.MercadoPagoStatusDetailEnum = void 0;
9149
+ (function (MercadoPagoStatusDetailEnum) {
9150
+ MercadoPagoStatusDetailEnum["accredited"] = "accredited";
9151
+ MercadoPagoStatusDetailEnum["partially_refunded"] = "partially_refunded";
9152
+ MercadoPagoStatusDetailEnum["pending_capture"] = "pending_capture";
9153
+ MercadoPagoStatusDetailEnum["offline_process"] = "offline_process";
9154
+ MercadoPagoStatusDetailEnum["pending_contingency"] = "pending_contingency";
9155
+ MercadoPagoStatusDetailEnum["pending_review_manual"] = "pending_review_manual";
9156
+ MercadoPagoStatusDetailEnum["pending_waiting_transfer"] = "pending_waiting_transfer";
9157
+ MercadoPagoStatusDetailEnum["pending_waiting_payment"] = "pending_waiting_payment";
9158
+ MercadoPagoStatusDetailEnum["pending_challenge"] = "pending_challenge";
9159
+ MercadoPagoStatusDetailEnum["bank_error"] = "bank_error";
9160
+ MercadoPagoStatusDetailEnum["cc_rejected_3ds_mandatory"] = "cc_rejected_3ds_mandatory";
9161
+ MercadoPagoStatusDetailEnum["cc_rejected_bad_filled_card_number"] = "cc_rejected_bad_filled_card_number";
9162
+ MercadoPagoStatusDetailEnum["cc_rejected_bad_filled_date"] = "cc_rejected_bad_filled_date";
9163
+ MercadoPagoStatusDetailEnum["cc_rejected_bad_filled_other"] = "cc_rejected_bad_filled_other";
9164
+ MercadoPagoStatusDetailEnum["cc_rejected_bad_filled_security_code"] = "cc_rejected_bad_filled_security_code";
9165
+ MercadoPagoStatusDetailEnum["cc_rejected_blacklist"] = "cc_rejected_blacklist";
9166
+ MercadoPagoStatusDetailEnum["cc_rejected_call_for_authorize"] = "cc_rejected_call_for_authorize";
9167
+ MercadoPagoStatusDetailEnum["cc_rejected_card_disabled"] = "cc_rejected_card_disabled";
9168
+ MercadoPagoStatusDetailEnum["cc_rejected_card_error"] = "cc_rejected_card_error";
9169
+ MercadoPagoStatusDetailEnum["cc_rejected_duplicated_payment"] = "cc_rejected_duplicated_payment";
9170
+ MercadoPagoStatusDetailEnum["cc_rejected_high_risk"] = "cc_rejected_high_risk";
9171
+ MercadoPagoStatusDetailEnum["cc_rejected_insufficient_amount"] = "cc_rejected_insufficient_amount";
9172
+ MercadoPagoStatusDetailEnum["cc_rejected_invalid_installments"] = "cc_rejected_invalid_installments";
9173
+ MercadoPagoStatusDetailEnum["cc_rejected_max_attempts"] = "cc_rejected_max_attempts";
9174
+ MercadoPagoStatusDetailEnum["cc_rejected_other_reason"] = "cc_rejected_other_reason";
9175
+ MercadoPagoStatusDetailEnum["cc_amount_rate_limit_exceeded"] = "cc_amount_rate_limit_exceeded";
9176
+ MercadoPagoStatusDetailEnum["rejected_insufficient_data"] = "rejected_insufficient_data";
9177
+ MercadoPagoStatusDetailEnum["rejected_by_bank"] = "rejected_by_bank";
9178
+ MercadoPagoStatusDetailEnum["rejected_by_regulations"] = "rejected_by_regulations";
9179
+ MercadoPagoStatusDetailEnum["insufficient_amount"] = "insufficient_amount";
9180
+ MercadoPagoStatusDetailEnum["cc_rejected_card_type_not_allowed"] = "cc_rejected_card_type_not_allowed";
9181
+ })(exports.MercadoPagoStatusDetailEnum || (exports.MercadoPagoStatusDetailEnum = {}));
9182
+
9183
+ exports.MercadoPagoStatusEnum = void 0;
9184
+ (function (MercadoPagoStatusEnum) {
9185
+ MercadoPagoStatusEnum["approved"] = "approved";
9186
+ MercadoPagoStatusEnum["authorized"] = "authorized";
9187
+ MercadoPagoStatusEnum["pending"] = "pending";
9188
+ MercadoPagoStatusEnum["in_process"] = "in_process";
9189
+ MercadoPagoStatusEnum["rejected"] = "rejected";
9190
+ MercadoPagoStatusEnum["cancelled"] = "cancelled";
9191
+ MercadoPagoStatusEnum["refunded"] = "refunded";
9192
+ MercadoPagoStatusEnum["charged_back"] = "charged_back";
9193
+ })(exports.MercadoPagoStatusEnum || (exports.MercadoPagoStatusEnum = {}));
9194
+
9145
9195
  class PagarmeBankSlipAxiosAdapter {
9146
9196
  constructor(credentials, paymentRepository) {
9147
9197
  this.credentials = credentials;
package/index.esm.js CHANGED
@@ -8764,7 +8764,6 @@ class MercadoPagoRequestHelper {
8764
8764
  statement_descriptor: checkout.shop === Shops.GLAMSHOP ? 'Glam' : 'Mens Market',
8765
8765
  additional_info: {
8766
8766
  items: this.buildItems(checkout),
8767
- ...(method === 'credit_card' && { payer: this.buildFullPayer(checkout) }),
8768
8767
  },
8769
8768
  ...(method === 'credit_card' && this.buildCardPayment(card)),
8770
8769
  ...(method === 'pix' && this.buildPixPayment()),
@@ -8961,9 +8960,7 @@ class MercadoPagoBankSlipAxiosAdapter {
8961
8960
  }
8962
8961
  catch (error) {
8963
8962
  if (error instanceof AxiosError) {
8964
- console.warn(error.response);
8965
- console.warn(error.response.data);
8966
- console.warn(error.response.data.cause);
8963
+ console.warn(JSON.stringify(error.response.data.cause));
8967
8964
  }
8968
8965
  }
8969
8966
  }
@@ -8979,40 +8976,48 @@ class MercadoPagoCardAxiosAdapter {
8979
8976
  this.orderBlockedRepository = orderBlockedRepository;
8980
8977
  }
8981
8978
  async pay(checkout, card) {
8982
- const payload = MercadoPagoRequestHelper.build({
8983
- checkout,
8984
- method: 'credit_card',
8985
- postback: this.credentials.postback,
8986
- card,
8987
- });
8988
- console.warn('[MERCADO PAGO CARD DATA TO SEND]', JSON.stringify(payload));
8989
- const { data } = await axios({
8990
- method: 'POST',
8991
- url: `${this.credentials.url}/v1/payments`,
8992
- headers: {
8993
- 'X-Idempotency-Key': `${checkout.id}-${new Date().getTime()}`,
8994
- Authorization: `Bearer ${this.credentials.api_key}`,
8995
- 'Content-Type': 'application/json',
8996
- },
8997
- data: payload,
8998
- });
8999
- console.warn('[MERCADO PAGO RESPONSE CARD DATA]', JSON.stringify(data));
9000
- if ((data.status !== 'approved' && data.status_detail !== 'accredited') || data.status !== 'authorized') {
9001
- await this.orderBlockedRepository.createBlockedOrderOrPayment({
8979
+ try {
8980
+ const payload = MercadoPagoRequestHelper.build({
9002
8981
  checkout,
9003
- blockType: 'Card not authorized',
9004
- type: 'Card',
9005
- limiteRange: 'day',
8982
+ method: 'credit_card',
8983
+ postback: this.credentials.postback,
9006
8984
  card,
9007
8985
  });
9008
- throw new PaymentError('Seu pagamento com cartão não foi autorizado. Para não perder seus produtos, pague com PIX ou outro cartão de crédito', {
9009
- checkoutId: checkout.id,
9010
- userEmail: checkout.user.email,
9011
- info: data,
8986
+ console.warn('[MERCADO PAGO CARD DATA TO SEND]', JSON.stringify(payload));
8987
+ const { data } = await axios({
8988
+ method: 'POST',
8989
+ url: `${this.credentials.url}/v1/payments`,
8990
+ headers: {
8991
+ 'X-Idempotency-Key': `${checkout.id}-${new Date().getTime()}`,
8992
+ Authorization: `Bearer ${this.credentials.api_key}`,
8993
+ 'Content-Type': 'application/json',
8994
+ },
8995
+ data: payload,
9012
8996
  });
8997
+ console.warn('[MERCADO PAGO RESPONSE CARD DATA]', JSON.stringify(data));
8998
+ if ((data.status !== 'approved' && data.status_detail !== MercadoPagoStatusDetailEnum.accredited) ||
8999
+ data.status !== 'authorized') {
9000
+ await this.orderBlockedRepository.createBlockedOrderOrPayment({
9001
+ checkout,
9002
+ blockType: 'Card not authorized',
9003
+ type: 'Card',
9004
+ limiteRange: 'day',
9005
+ card,
9006
+ });
9007
+ throw new PaymentError('Seu pagamento com cartão não foi autorizado. Para não perder seus produtos, pague com PIX ou outro cartão de crédito', {
9008
+ checkoutId: checkout.id,
9009
+ userEmail: checkout.user.email,
9010
+ info: data,
9011
+ });
9012
+ }
9013
+ const payment = await this.paymentRepository.create(MercadoPagoResponseHelper.build(TransactionPaymentMethods.CARD, checkout, data));
9014
+ return payment;
9015
+ }
9016
+ catch (error) {
9017
+ if (error instanceof AxiosError) {
9018
+ console.warn(JSON.stringify(error.response.data.cause));
9019
+ }
9013
9020
  }
9014
- const payment = await this.paymentRepository.create(MercadoPagoResponseHelper.build(TransactionPaymentMethods.CARD, checkout, data));
9015
- return payment;
9016
9021
  }
9017
9022
  async addCard(card, customer) {
9018
9023
  const { data } = await axios({
@@ -9110,14 +9115,59 @@ class MercadoPagoPixAxiosAdapter {
9110
9115
  }
9111
9116
  catch (error) {
9112
9117
  if (error instanceof AxiosError) {
9113
- console.warn(error.response);
9114
- console.warn(error.response.data);
9115
- console.warn(error.response.data.cause);
9118
+ console.warn(JSON.stringify(error.response.data.cause));
9116
9119
  }
9117
9120
  }
9118
9121
  }
9119
9122
  }
9120
9123
 
9124
+ var MercadoPagoStatusDetailEnum;
9125
+ (function (MercadoPagoStatusDetailEnum) {
9126
+ MercadoPagoStatusDetailEnum["accredited"] = "accredited";
9127
+ MercadoPagoStatusDetailEnum["partially_refunded"] = "partially_refunded";
9128
+ MercadoPagoStatusDetailEnum["pending_capture"] = "pending_capture";
9129
+ MercadoPagoStatusDetailEnum["offline_process"] = "offline_process";
9130
+ MercadoPagoStatusDetailEnum["pending_contingency"] = "pending_contingency";
9131
+ MercadoPagoStatusDetailEnum["pending_review_manual"] = "pending_review_manual";
9132
+ MercadoPagoStatusDetailEnum["pending_waiting_transfer"] = "pending_waiting_transfer";
9133
+ MercadoPagoStatusDetailEnum["pending_waiting_payment"] = "pending_waiting_payment";
9134
+ MercadoPagoStatusDetailEnum["pending_challenge"] = "pending_challenge";
9135
+ MercadoPagoStatusDetailEnum["bank_error"] = "bank_error";
9136
+ MercadoPagoStatusDetailEnum["cc_rejected_3ds_mandatory"] = "cc_rejected_3ds_mandatory";
9137
+ MercadoPagoStatusDetailEnum["cc_rejected_bad_filled_card_number"] = "cc_rejected_bad_filled_card_number";
9138
+ MercadoPagoStatusDetailEnum["cc_rejected_bad_filled_date"] = "cc_rejected_bad_filled_date";
9139
+ MercadoPagoStatusDetailEnum["cc_rejected_bad_filled_other"] = "cc_rejected_bad_filled_other";
9140
+ MercadoPagoStatusDetailEnum["cc_rejected_bad_filled_security_code"] = "cc_rejected_bad_filled_security_code";
9141
+ MercadoPagoStatusDetailEnum["cc_rejected_blacklist"] = "cc_rejected_blacklist";
9142
+ MercadoPagoStatusDetailEnum["cc_rejected_call_for_authorize"] = "cc_rejected_call_for_authorize";
9143
+ MercadoPagoStatusDetailEnum["cc_rejected_card_disabled"] = "cc_rejected_card_disabled";
9144
+ MercadoPagoStatusDetailEnum["cc_rejected_card_error"] = "cc_rejected_card_error";
9145
+ MercadoPagoStatusDetailEnum["cc_rejected_duplicated_payment"] = "cc_rejected_duplicated_payment";
9146
+ MercadoPagoStatusDetailEnum["cc_rejected_high_risk"] = "cc_rejected_high_risk";
9147
+ MercadoPagoStatusDetailEnum["cc_rejected_insufficient_amount"] = "cc_rejected_insufficient_amount";
9148
+ MercadoPagoStatusDetailEnum["cc_rejected_invalid_installments"] = "cc_rejected_invalid_installments";
9149
+ MercadoPagoStatusDetailEnum["cc_rejected_max_attempts"] = "cc_rejected_max_attempts";
9150
+ MercadoPagoStatusDetailEnum["cc_rejected_other_reason"] = "cc_rejected_other_reason";
9151
+ MercadoPagoStatusDetailEnum["cc_amount_rate_limit_exceeded"] = "cc_amount_rate_limit_exceeded";
9152
+ MercadoPagoStatusDetailEnum["rejected_insufficient_data"] = "rejected_insufficient_data";
9153
+ MercadoPagoStatusDetailEnum["rejected_by_bank"] = "rejected_by_bank";
9154
+ MercadoPagoStatusDetailEnum["rejected_by_regulations"] = "rejected_by_regulations";
9155
+ MercadoPagoStatusDetailEnum["insufficient_amount"] = "insufficient_amount";
9156
+ MercadoPagoStatusDetailEnum["cc_rejected_card_type_not_allowed"] = "cc_rejected_card_type_not_allowed";
9157
+ })(MercadoPagoStatusDetailEnum || (MercadoPagoStatusDetailEnum = {}));
9158
+
9159
+ var MercadoPagoStatusEnum;
9160
+ (function (MercadoPagoStatusEnum) {
9161
+ MercadoPagoStatusEnum["approved"] = "approved";
9162
+ MercadoPagoStatusEnum["authorized"] = "authorized";
9163
+ MercadoPagoStatusEnum["pending"] = "pending";
9164
+ MercadoPagoStatusEnum["in_process"] = "in_process";
9165
+ MercadoPagoStatusEnum["rejected"] = "rejected";
9166
+ MercadoPagoStatusEnum["cancelled"] = "cancelled";
9167
+ MercadoPagoStatusEnum["refunded"] = "refunded";
9168
+ MercadoPagoStatusEnum["charged_back"] = "charged_back";
9169
+ })(MercadoPagoStatusEnum || (MercadoPagoStatusEnum = {}));
9170
+
9121
9171
  class PagarmeBankSlipAxiosAdapter {
9122
9172
  constructor(credentials, paymentRepository) {
9123
9173
  this.credentials = credentials;
@@ -10112,4 +10162,4 @@ class ProductsVertexSearch {
10112
10162
  }
10113
10163
  }
10114
10164
 
10115
- 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, 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, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, 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, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, 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 };
10165
+ 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, 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, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, 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, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "5.4.0-beta.22",
3
+ "version": "5.4.0-beta.24",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -1,9 +1,10 @@
1
- import { PaymentProviderCard, PaymentProviderPix } from '../interfaces';
1
+ import { PaymentProviderBankSlip, PaymentProviderCard, PaymentProviderPix } from '../interfaces';
2
2
  import { MercadoPagoCard } from '../types';
3
3
  import { BasePaymentMethodFactory } from './base-payment-method.factory';
4
4
  type MercadoPagoPaymentFactoryMethods = {
5
5
  card?: PaymentProviderCard<MercadoPagoCard>;
6
6
  pix?: PaymentProviderPix;
7
+ bankSlip?: PaymentProviderBankSlip;
7
8
  };
8
9
  export declare class MercadoPagoPaymentMethodFactory extends BasePaymentMethodFactory<MercadoPagoPaymentFactoryMethods> {
9
10
  }
@@ -0,0 +1,2 @@
1
+ export * from './mercado-pago-status-detail.enum';
2
+ export * from './mercado-pago-status.enum';
@@ -0,0 +1,33 @@
1
+ export declare enum MercadoPagoStatusDetailEnum {
2
+ 'accredited' = "accredited",
3
+ 'partially_refunded' = "partially_refunded",
4
+ 'pending_capture' = "pending_capture",
5
+ 'offline_process' = "offline_process",
6
+ 'pending_contingency' = "pending_contingency",
7
+ 'pending_review_manual' = "pending_review_manual",
8
+ 'pending_waiting_transfer' = "pending_waiting_transfer",
9
+ 'pending_waiting_payment' = "pending_waiting_payment",
10
+ 'pending_challenge' = "pending_challenge",
11
+ 'bank_error' = "bank_error",
12
+ 'cc_rejected_3ds_mandatory' = "cc_rejected_3ds_mandatory",
13
+ 'cc_rejected_bad_filled_card_number' = "cc_rejected_bad_filled_card_number",
14
+ 'cc_rejected_bad_filled_date' = "cc_rejected_bad_filled_date",
15
+ 'cc_rejected_bad_filled_other' = "cc_rejected_bad_filled_other",
16
+ 'cc_rejected_bad_filled_security_code' = "cc_rejected_bad_filled_security_code",
17
+ 'cc_rejected_blacklist' = "cc_rejected_blacklist",
18
+ 'cc_rejected_call_for_authorize' = "cc_rejected_call_for_authorize",
19
+ 'cc_rejected_card_disabled' = "cc_rejected_card_disabled",
20
+ 'cc_rejected_card_error' = "cc_rejected_card_error",
21
+ 'cc_rejected_duplicated_payment' = "cc_rejected_duplicated_payment",
22
+ 'cc_rejected_high_risk' = "cc_rejected_high_risk",
23
+ 'cc_rejected_insufficient_amount' = "cc_rejected_insufficient_amount",
24
+ 'cc_rejected_invalid_installments' = "cc_rejected_invalid_installments",
25
+ 'cc_rejected_max_attempts' = "cc_rejected_max_attempts",
26
+ 'cc_rejected_other_reason' = "cc_rejected_other_reason",
27
+ 'cc_amount_rate_limit_exceeded' = "cc_amount_rate_limit_exceeded",
28
+ 'rejected_insufficient_data' = "rejected_insufficient_data",
29
+ 'rejected_by_bank' = "rejected_by_bank",
30
+ 'rejected_by_regulations' = "rejected_by_regulations",
31
+ 'insufficient_amount' = "insufficient_amount",
32
+ 'cc_rejected_card_type_not_allowed' = "cc_rejected_card_type_not_allowed"
33
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum MercadoPagoStatusEnum {
2
+ 'approved' = "approved",
3
+ 'authorized' = "authorized",
4
+ 'pending' = "pending",
5
+ 'in_process' = "in_process",
6
+ 'rejected' = "rejected",
7
+ 'cancelled' = "cancelled",
8
+ 'refunded' = "refunded",
9
+ 'charged_back' = "charged_back"
10
+ }
@@ -38,22 +38,6 @@ export declare class MercadoPagoRequestHelper {
38
38
  };
39
39
  statement_descriptor: string;
40
40
  additional_info: {
41
- payer: {
42
- first_name: string;
43
- last_name: string;
44
- phone: {
45
- area_code: string;
46
- number: string;
47
- };
48
- address: {
49
- zip_code: string;
50
- street_name: string;
51
- street_number: string;
52
- neighborhood: string;
53
- city: string;
54
- federal_unit: string;
55
- };
56
- };
57
41
  items: {
58
42
  id: string;
59
43
  title: string;
@@ -6,5 +6,5 @@ export declare class MercadoPagoResponseHelper {
6
6
  private static getBoletoReponse;
7
7
  private static getPixReponse;
8
8
  private static getCardReponse;
9
- private static statusMapping;
9
+ static statusMapping(status: string): string;
10
10
  }
@@ -1,3 +1,4 @@
1
1
  export * from './adapters';
2
+ export * from './enums';
2
3
  export * from './helpers';
3
4
  export * from './types';
@@ -1,2 +1,3 @@
1
1
  export * from './mercado-pago-request.type';
2
2
  export * from './mercado-pago-response.type';
3
+ export * from './mercado-pago-status.type';
@@ -1,5 +1,5 @@
1
- export type MercadoPagoStatusDetail = 'accredited' | 'partially_refunded' | 'pending_capture' | 'offline_process' | 'pending_contingency' | 'pending_review_manual' | 'pending_waiting_transfer' | 'pending_waiting_payment' | 'pending_challenge' | 'bank_error' | 'cc_rejected_3ds_mandatory' | 'cc_rejected_bad_filled_card_number' | 'cc_rejected_bad_filled_date' | 'cc_rejected_bad_filled_other' | 'cc_rejected_bad_filled_security_code' | 'cc_rejected_blacklist' | 'cc_rejected_call_for_authorize' | 'cc_rejected_card_disabled' | 'cc_rejected_card_error' | 'cc_rejected_duplicated_payment' | 'cc_rejected_high_risk' | 'cc_rejected_insufficient_amount' | 'cc_rejected_invalid_installments' | 'cc_rejected_max_attempts' | 'cc_rejected_other_reason' | 'cc_amount_rate_limit_exceeded' | 'rejected_insufficient_data' | 'rejected_by_bank' | 'cc_amount_rate_limit_exceeded' | 'rejected_by_regulations' | 'insufficient_amount' | 'cc_rejected_card_type_not_allowed';
2
- export type MercadoPagoStatus = 'approved' | 'authorized' | 'in_process' | 'rejected' | 'pending' | string;
1
+ import { MercadoPagoStatusDetail } from './mercado-pago-status-detail.type';
2
+ import { MercadoPagoStatus } from './mercado-pago-status.type';
3
3
  export type MercadoPagoResponse = {
4
4
  id: number;
5
5
  date_created?: string;
@@ -0,0 +1,2 @@
1
+ import { MercadoPagoStatusDetailEnum } from '../enums';
2
+ export type MercadoPagoStatusDetail = `${MercadoPagoStatusDetailEnum}`;
@@ -0,0 +1,2 @@
1
+ import { MercadoPagoStatusEnum } from '../enums';
2
+ export type MercadoPagoStatus = `${MercadoPagoStatusEnum}`;