@infrab4a/connect 5.3.10-alpha.0 → 5.3.10-beta.1

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
@@ -757,6 +757,30 @@ tslib.__decorate([
757
757
  ], Category.prototype, "filters", void 0);
758
758
  registerClass('Category', Category);
759
759
 
760
+ class BrandCategory extends BaseModel {
761
+ get glamImages() {
762
+ return this.images?.[exports.Shops.GLAMSHOP]
763
+ ? this.images[exports.Shops.GLAMSHOP]
764
+ : {
765
+ brandBanner: null,
766
+ brandBannerMobile: null,
767
+ image: null,
768
+ };
769
+ }
770
+ get mensImages() {
771
+ return this.images?.[exports.Shops.MENSMARKET]
772
+ ? this.images[exports.Shops.MENSMARKET]
773
+ : {
774
+ brandBanner: null,
775
+ brandBannerMobile: null,
776
+ image: null,
777
+ };
778
+ }
779
+ static get identifiersFields() {
780
+ return ['id'];
781
+ }
782
+ }
783
+
760
784
  class CategoryCollectionChildren extends BaseModel {
761
785
  static get identifiersFields() {
762
786
  return ['collectionId', 'categoryId'];
@@ -1623,7 +1647,7 @@ exports.OrderStatus = void 0;
1623
1647
  OrderStatus["AGUARDANDO_PAGAMENTO"] = "Aguardando pagamento";
1624
1648
  OrderStatus["EM_PREPARO"] = "Preparando pedido";
1625
1649
  OrderStatus["NF_EMITIDA"] = "Nota Fiscal Emitida";
1626
- OrderStatus["AGUARDANDO_ENVIO"] = "Aguardando Transportadora";
1650
+ OrderStatus["AGUARDANDO_ENVIO"] = "Aguardando Transaportadora";
1627
1651
  OrderStatus["ENVIADO"] = "Enviado";
1628
1652
  OrderStatus["ENTREGUE"] = "Entregue";
1629
1653
  OrderStatus["CANCELADO"] = "Cancelado";
@@ -1760,19 +1784,57 @@ class AntifraudCardService {
1760
1784
  constructor(orderRepository, orderBlockedRepository) {
1761
1785
  this.orderRepository = orderRepository;
1762
1786
  this.orderBlockedRepository = orderBlockedRepository;
1763
- this.LIMIT_ORDERS_DAY = 2;
1764
- this.LIMIT_ORDERS_WEEK = 7;
1765
- this.LIMIT_BLOCKED_ORDERS_DAY = 5;
1787
+ this.LIMIT_ORDERS_DAY = null;
1788
+ this.LIMIT_ORDERS_WEEK = null;
1766
1789
  }
1767
1790
  async validate(checkout, card) {
1791
+ this.setLimitsByUserType(checkout.user.isSubscriber);
1768
1792
  await this.validateBlockedOrderAttempts(checkout, card);
1769
1793
  await this.validateDayAndWeekOrderLimits(checkout, card);
1770
1794
  return true;
1771
1795
  }
1796
+ setLimitsByUserType(isSubscriber) {
1797
+ this.LIMIT_ORDERS_DAY = {
1798
+ subscriber: {
1799
+ cpf: 4,
1800
+ email: 4,
1801
+ telefone: 4,
1802
+ card: 4,
1803
+ cep: 4,
1804
+ },
1805
+ nonSubscriber: {
1806
+ cpf: 2,
1807
+ email: 2,
1808
+ telefone: 2,
1809
+ card: 2,
1810
+ cep: 2,
1811
+ },
1812
+ };
1813
+ this.LIMIT_ORDERS_WEEK = {
1814
+ subscriber: {
1815
+ cpf: 12,
1816
+ email: 12,
1817
+ telefone: 12,
1818
+ card: 12,
1819
+ cep: Infinity,
1820
+ },
1821
+ nonSubscriber: {
1822
+ cpf: 7,
1823
+ email: 7,
1824
+ telefone: 7,
1825
+ card: 7,
1826
+ cep: 7,
1827
+ },
1828
+ };
1829
+ this.LIMIT_BLOCKED_ORDERS_DAY = isSubscriber ? 7 : 5;
1830
+ }
1831
+ getLimitsByUserType(isSubscriber) {
1832
+ return isSubscriber ? this.LIMIT_ORDERS_DAY['subscriber'] : this.LIMIT_ORDERS_DAY['nonSubscriber'];
1833
+ }
1772
1834
  async validateBlockedOrderAttempts(checkout, card) {
1773
1835
  const isValid = await this.verifyBlockedOrderAttempts(checkout, card);
1774
1836
  if (!isValid) {
1775
- throw new FraudValidationError('Cliente com mais de 5 compras negadas/bloqueadas no dia', {
1837
+ throw new FraudValidationError(`Cliente com mais de ${this.LIMIT_BLOCKED_ORDERS_DAY} compras negadas/bloqueadas no dia`, {
1776
1838
  checkoutId: checkout.id,
1777
1839
  userEmail: checkout.user.email,
1778
1840
  info: {
@@ -1786,7 +1848,7 @@ class AntifraudCardService {
1786
1848
  async validateDayAndWeekOrderLimits(checkout, card) {
1787
1849
  const isValid = await this.verifyDayAndWeekOrders(checkout, card);
1788
1850
  if (!isValid) {
1789
- throw new FraudValidationError('Cliente tentando comprar mais de 2 vezes no dia ou 7 vezes na semana', {
1851
+ throw new FraudValidationError('Cliente tentando comprar mais do que o permitido no dia/semana', {
1790
1852
  checkoutId: checkout.id,
1791
1853
  userEmail: checkout.user.email,
1792
1854
  info: {
@@ -1805,7 +1867,7 @@ class AntifraudCardService {
1805
1867
  await this.createBlockedOrderRecord({
1806
1868
  checkout,
1807
1869
  card,
1808
- reason: 'More than 5 attempts have failed',
1870
+ reason: `More than ${this.LIMIT_BLOCKED_ORDERS_DAY} attempts have failed`,
1809
1871
  key: 'Failed attempts',
1810
1872
  period: 'day',
1811
1873
  });
@@ -1926,26 +1988,28 @@ class AntifraudCardService {
1926
1988
  }
1927
1989
  async validateDayOrderLimits(checkout, params) {
1928
1990
  const ordersPerDay = await this.validateOrdersByRange(params, this.getDateRange('day'));
1991
+ const limits = this.getLimitsByUserType(checkout.user.isSubscriber);
1929
1992
  return this.checkOrderLimitsAndBlock({
1930
1993
  checkout,
1931
1994
  orderCounts: ordersPerDay,
1932
- limit: this.LIMIT_ORDERS_DAY,
1995
+ limit: limits,
1933
1996
  period: 'day',
1934
1997
  });
1935
1998
  }
1936
1999
  async validateWeekOrderLimits(checkout, params) {
1937
2000
  const ordersPerWeek = await this.validateOrdersByRange(params, this.getDateRange('week'));
2001
+ const limits = this.getLimitsByUserType(checkout.user.isSubscriber);
1938
2002
  return this.checkOrderLimitsAndBlock({
1939
2003
  checkout,
1940
2004
  orderCounts: ordersPerWeek,
1941
- limit: this.LIMIT_ORDERS_WEEK,
2005
+ limit: limits,
1942
2006
  period: 'week',
1943
2007
  });
1944
2008
  }
1945
2009
  async checkOrderLimitsAndBlock(params) {
1946
2010
  const { checkout, orderCounts, limit, period } = params;
1947
2011
  for (const key in orderCounts) {
1948
- if (orderCounts[key] >= limit) {
2012
+ if (orderCounts[key] >= limit[key]) {
1949
2013
  await this.createBlockedOrderRecord({
1950
2014
  checkout,
1951
2015
  card: null,
@@ -4763,6 +4827,17 @@ const withCrudFirestore = (MixinBase) => {
4763
4827
  };
4764
4828
  };
4765
4829
 
4830
+ class BrandCategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
4831
+ constructor({ firestore, interceptors, }) {
4832
+ super({
4833
+ firestore,
4834
+ collectionName: 'brandsCategory',
4835
+ model: BrandCategory,
4836
+ interceptors,
4837
+ });
4838
+ }
4839
+ }
4840
+
4766
4841
  class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
4767
4842
  constructor({ firestore, interceptors }) {
4768
4843
  super({
@@ -9816,6 +9891,8 @@ exports.Base = Base;
9816
9891
  exports.BaseModel = BaseModel;
9817
9892
  exports.BeautyProfile = BeautyProfile;
9818
9893
  exports.BeautyQuestionsHelper = BeautyQuestionsHelper;
9894
+ exports.BrandCategory = BrandCategory;
9895
+ exports.BrandCategoryFirestoreRepository = BrandCategoryFirestoreRepository;
9819
9896
  exports.BusinessError = BusinessError;
9820
9897
  exports.Buy2Win = Buy2Win;
9821
9898
  exports.Buy2WinFirestoreRepository = Buy2WinFirestoreRepository;
package/index.esm.js CHANGED
@@ -733,6 +733,30 @@ __decorate([
733
733
  ], Category.prototype, "filters", void 0);
734
734
  registerClass('Category', Category);
735
735
 
736
+ class BrandCategory extends BaseModel {
737
+ get glamImages() {
738
+ return this.images?.[Shops.GLAMSHOP]
739
+ ? this.images[Shops.GLAMSHOP]
740
+ : {
741
+ brandBanner: null,
742
+ brandBannerMobile: null,
743
+ image: null,
744
+ };
745
+ }
746
+ get mensImages() {
747
+ return this.images?.[Shops.MENSMARKET]
748
+ ? this.images[Shops.MENSMARKET]
749
+ : {
750
+ brandBanner: null,
751
+ brandBannerMobile: null,
752
+ image: null,
753
+ };
754
+ }
755
+ static get identifiersFields() {
756
+ return ['id'];
757
+ }
758
+ }
759
+
736
760
  class CategoryCollectionChildren extends BaseModel {
737
761
  static get identifiersFields() {
738
762
  return ['collectionId', 'categoryId'];
@@ -1599,7 +1623,7 @@ var OrderStatus;
1599
1623
  OrderStatus["AGUARDANDO_PAGAMENTO"] = "Aguardando pagamento";
1600
1624
  OrderStatus["EM_PREPARO"] = "Preparando pedido";
1601
1625
  OrderStatus["NF_EMITIDA"] = "Nota Fiscal Emitida";
1602
- OrderStatus["AGUARDANDO_ENVIO"] = "Aguardando Transportadora";
1626
+ OrderStatus["AGUARDANDO_ENVIO"] = "Aguardando Transaportadora";
1603
1627
  OrderStatus["ENVIADO"] = "Enviado";
1604
1628
  OrderStatus["ENTREGUE"] = "Entregue";
1605
1629
  OrderStatus["CANCELADO"] = "Cancelado";
@@ -1736,19 +1760,57 @@ class AntifraudCardService {
1736
1760
  constructor(orderRepository, orderBlockedRepository) {
1737
1761
  this.orderRepository = orderRepository;
1738
1762
  this.orderBlockedRepository = orderBlockedRepository;
1739
- this.LIMIT_ORDERS_DAY = 2;
1740
- this.LIMIT_ORDERS_WEEK = 7;
1741
- this.LIMIT_BLOCKED_ORDERS_DAY = 5;
1763
+ this.LIMIT_ORDERS_DAY = null;
1764
+ this.LIMIT_ORDERS_WEEK = null;
1742
1765
  }
1743
1766
  async validate(checkout, card) {
1767
+ this.setLimitsByUserType(checkout.user.isSubscriber);
1744
1768
  await this.validateBlockedOrderAttempts(checkout, card);
1745
1769
  await this.validateDayAndWeekOrderLimits(checkout, card);
1746
1770
  return true;
1747
1771
  }
1772
+ setLimitsByUserType(isSubscriber) {
1773
+ this.LIMIT_ORDERS_DAY = {
1774
+ subscriber: {
1775
+ cpf: 4,
1776
+ email: 4,
1777
+ telefone: 4,
1778
+ card: 4,
1779
+ cep: 4,
1780
+ },
1781
+ nonSubscriber: {
1782
+ cpf: 2,
1783
+ email: 2,
1784
+ telefone: 2,
1785
+ card: 2,
1786
+ cep: 2,
1787
+ },
1788
+ };
1789
+ this.LIMIT_ORDERS_WEEK = {
1790
+ subscriber: {
1791
+ cpf: 12,
1792
+ email: 12,
1793
+ telefone: 12,
1794
+ card: 12,
1795
+ cep: Infinity,
1796
+ },
1797
+ nonSubscriber: {
1798
+ cpf: 7,
1799
+ email: 7,
1800
+ telefone: 7,
1801
+ card: 7,
1802
+ cep: 7,
1803
+ },
1804
+ };
1805
+ this.LIMIT_BLOCKED_ORDERS_DAY = isSubscriber ? 7 : 5;
1806
+ }
1807
+ getLimitsByUserType(isSubscriber) {
1808
+ return isSubscriber ? this.LIMIT_ORDERS_DAY['subscriber'] : this.LIMIT_ORDERS_DAY['nonSubscriber'];
1809
+ }
1748
1810
  async validateBlockedOrderAttempts(checkout, card) {
1749
1811
  const isValid = await this.verifyBlockedOrderAttempts(checkout, card);
1750
1812
  if (!isValid) {
1751
- throw new FraudValidationError('Cliente com mais de 5 compras negadas/bloqueadas no dia', {
1813
+ throw new FraudValidationError(`Cliente com mais de ${this.LIMIT_BLOCKED_ORDERS_DAY} compras negadas/bloqueadas no dia`, {
1752
1814
  checkoutId: checkout.id,
1753
1815
  userEmail: checkout.user.email,
1754
1816
  info: {
@@ -1762,7 +1824,7 @@ class AntifraudCardService {
1762
1824
  async validateDayAndWeekOrderLimits(checkout, card) {
1763
1825
  const isValid = await this.verifyDayAndWeekOrders(checkout, card);
1764
1826
  if (!isValid) {
1765
- throw new FraudValidationError('Cliente tentando comprar mais de 2 vezes no dia ou 7 vezes na semana', {
1827
+ throw new FraudValidationError('Cliente tentando comprar mais do que o permitido no dia/semana', {
1766
1828
  checkoutId: checkout.id,
1767
1829
  userEmail: checkout.user.email,
1768
1830
  info: {
@@ -1781,7 +1843,7 @@ class AntifraudCardService {
1781
1843
  await this.createBlockedOrderRecord({
1782
1844
  checkout,
1783
1845
  card,
1784
- reason: 'More than 5 attempts have failed',
1846
+ reason: `More than ${this.LIMIT_BLOCKED_ORDERS_DAY} attempts have failed`,
1785
1847
  key: 'Failed attempts',
1786
1848
  period: 'day',
1787
1849
  });
@@ -1902,26 +1964,28 @@ class AntifraudCardService {
1902
1964
  }
1903
1965
  async validateDayOrderLimits(checkout, params) {
1904
1966
  const ordersPerDay = await this.validateOrdersByRange(params, this.getDateRange('day'));
1967
+ const limits = this.getLimitsByUserType(checkout.user.isSubscriber);
1905
1968
  return this.checkOrderLimitsAndBlock({
1906
1969
  checkout,
1907
1970
  orderCounts: ordersPerDay,
1908
- limit: this.LIMIT_ORDERS_DAY,
1971
+ limit: limits,
1909
1972
  period: 'day',
1910
1973
  });
1911
1974
  }
1912
1975
  async validateWeekOrderLimits(checkout, params) {
1913
1976
  const ordersPerWeek = await this.validateOrdersByRange(params, this.getDateRange('week'));
1977
+ const limits = this.getLimitsByUserType(checkout.user.isSubscriber);
1914
1978
  return this.checkOrderLimitsAndBlock({
1915
1979
  checkout,
1916
1980
  orderCounts: ordersPerWeek,
1917
- limit: this.LIMIT_ORDERS_WEEK,
1981
+ limit: limits,
1918
1982
  period: 'week',
1919
1983
  });
1920
1984
  }
1921
1985
  async checkOrderLimitsAndBlock(params) {
1922
1986
  const { checkout, orderCounts, limit, period } = params;
1923
1987
  for (const key in orderCounts) {
1924
- if (orderCounts[key] >= limit) {
1988
+ if (orderCounts[key] >= limit[key]) {
1925
1989
  await this.createBlockedOrderRecord({
1926
1990
  checkout,
1927
1991
  card: null,
@@ -4739,6 +4803,17 @@ const withCrudFirestore = (MixinBase) => {
4739
4803
  };
4740
4804
  };
4741
4805
 
4806
+ class BrandCategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
4807
+ constructor({ firestore, interceptors, }) {
4808
+ super({
4809
+ firestore,
4810
+ collectionName: 'brandsCategory',
4811
+ model: BrandCategory,
4812
+ interceptors,
4813
+ });
4814
+ }
4815
+ }
4816
+
4742
4817
  class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
4743
4818
  constructor({ firestore, interceptors }) {
4744
4819
  super({
@@ -9653,4 +9728,4 @@ class ProductsVertexSearch {
9653
9728
  }
9654
9729
  }
9655
9730
 
9656
- 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, 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, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, 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 };
9731
+ 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, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, 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.3.10-alpha.0",
3
+ "version": "5.3.10-beta.1",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -0,0 +1,17 @@
1
+ import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
2
+ import { Shops } from './enums';
3
+ export declare class BrandCategory extends BaseModel<BrandCategory> {
4
+ id: string;
5
+ name: string;
6
+ slug: string;
7
+ brand_category: boolean;
8
+ published: boolean;
9
+ images?: string[];
10
+ brand_logo?: string;
11
+ brand_banner?: string;
12
+ brand_banner_mobile?: string;
13
+ shops: Shops[];
14
+ get glamImages(): any;
15
+ get mensImages(): any;
16
+ static get identifiersFields(): GenericIdentifier[];
17
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './category';
2
+ export * from './category-brand';
2
3
  export * from './category-collection-children';
3
4
  export * from './category-filter';
4
5
  export * from './category-product';
@@ -0,0 +1,4 @@
1
+ import { CrudRepository } from '../../generic/repository/crud.repository';
2
+ import { BrandCategory } from '../models';
3
+ export interface BrandCategoryRepository extends CrudRepository<BrandCategory> {
4
+ }
@@ -1,3 +1,4 @@
1
+ export * from './category-brand.repository';
1
2
  export * from './category-collection-children.repository';
2
3
  export * from './category-filter.repository';
3
4
  export * from './category-product.repository';
@@ -2,7 +2,7 @@ export declare enum OrderStatus {
2
2
  AGUARDANDO_PAGAMENTO = "Aguardando pagamento",
3
3
  EM_PREPARO = "Preparando pedido",
4
4
  NF_EMITIDA = "Nota Fiscal Emitida",
5
- AGUARDANDO_ENVIO = "Aguardando Transportadora",
5
+ AGUARDANDO_ENVIO = "Aguardando Transaportadora",
6
6
  ENVIADO = "Enviado",
7
7
  ENTREGUE = "Entregue",
8
8
  CANCELADO = "Cancelado",
@@ -10,6 +10,8 @@ export declare class AntifraudCardService implements AntifraudProvider {
10
10
  private LIMIT_BLOCKED_ORDERS_DAY;
11
11
  constructor(orderRepository: OrderRepository, orderBlockedRepository: OrderBlockedRepository);
12
12
  validate(checkout: Checkout, card: PaymentCardInfo): Promise<Boolean>;
13
+ private setLimitsByUserType;
14
+ private getLimitsByUserType;
13
15
  private validateBlockedOrderAttempts;
14
16
  private validateDayAndWeekOrderLimits;
15
17
  private verifyBlockedOrderAttempts;
@@ -5,7 +5,7 @@ import { FirestoreRepository, FirestoreSubRepository } from '../types';
5
5
  export declare const withHelpers: <TMixinBase extends MixinCtor<any, any[]> = MixinCtor<any, any[]>>(MixinBase: MixinCtor<any, any[]> & TMixinBase) => {
6
6
  new (...args: any[]): {
7
7
  [x: string]: any;
8
- toArray<T extends ModelBaseStructure<T, T["identifiersFields"][number]>>(snapShot: QuerySnapshot<T> | QueryDocumentSnapshot<T>[]): T[];
8
+ toArray<T extends ModelBaseStructure<T, T["identifiersFields"][number]>>(snapShot: QuerySnapshot<T, import("firebase/firestore").DocumentData> | QueryDocumentSnapshot<T, import("firebase/firestore").DocumentData>[]): T[];
9
9
  isSubCollection<T_1 extends ModelBaseStructure<T_1, T_1["identifiersFields"][number]>, E extends ModelBaseStructure<E, E["identifiersFields"][number]>>(repository: FirestoreRepository<T_1> | FirestoreSubRepository<T_1, E>): repository is FirestoreSubRepository<T_1, E>;
10
10
  };
11
11
  } & TMixinBase;
@@ -0,0 +1,7 @@
1
+ import { BrandCategory, BrandCategoryRepository } from '../../../../../domain';
2
+ import { FirestoreConstructorParams } from '../../mixins';
3
+ declare const BrandCategoryFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<BrandCategory> & import("../../../../../domain").CrudRepository<BrandCategory, import("../../../../../domain").CrudParams<BrandCategory>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<BrandCategory>, ...any[]]>;
4
+ export declare class BrandCategoryFirestoreRepository extends BrandCategoryFirestoreRepository_base implements BrandCategoryRepository {
5
+ constructor({ firestore, interceptors, }: Pick<FirestoreConstructorParams<BrandCategory>, 'firestore' | 'interceptors'>);
6
+ }
7
+ export {};
@@ -1,3 +1,4 @@
1
+ export * from './category-brand-firestore.repository';
1
2
  export * from './category-firestore.repository';
2
3
  export * from './group-firestore.repository';
3
4
  export * from './product-firestore.repository';