@infrab4a/connect 5.3.9 → 5.3.10-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 +68 -9
- package/index.esm.js +67 -10
- package/package.json +1 -1
- package/src/domain/catalog/models/category-brand.d.ts +15 -0
- package/src/domain/catalog/models/index.d.ts +1 -0
- package/src/domain/catalog/repositories/category-brand.repository.d.ts +4 -0
- package/src/domain/catalog/repositories/index.d.ts +1 -0
- package/src/domain/shopping/services/antifraud-card.service.d.ts +2 -0
- package/src/infra/firebase/firestore/repositories/catalog/category-brand-firestore.repository.d.ts +7 -0
- package/src/infra/firebase/firestore/repositories/catalog/index.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -757,6 +757,12 @@ tslib.__decorate([
|
|
|
757
757
|
], Category.prototype, "filters", void 0);
|
|
758
758
|
registerClass('Category', Category);
|
|
759
759
|
|
|
760
|
+
class BrandCategory extends BaseModel {
|
|
761
|
+
static get identifiersFields() {
|
|
762
|
+
return ['id'];
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
760
766
|
class CategoryCollectionChildren extends BaseModel {
|
|
761
767
|
static get identifiersFields() {
|
|
762
768
|
return ['collectionId', 'categoryId'];
|
|
@@ -1760,19 +1766,57 @@ class AntifraudCardService {
|
|
|
1760
1766
|
constructor(orderRepository, orderBlockedRepository) {
|
|
1761
1767
|
this.orderRepository = orderRepository;
|
|
1762
1768
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
1763
|
-
this.LIMIT_ORDERS_DAY =
|
|
1764
|
-
this.LIMIT_ORDERS_WEEK =
|
|
1765
|
-
this.LIMIT_BLOCKED_ORDERS_DAY = 5;
|
|
1769
|
+
this.LIMIT_ORDERS_DAY = null;
|
|
1770
|
+
this.LIMIT_ORDERS_WEEK = null;
|
|
1766
1771
|
}
|
|
1767
1772
|
async validate(checkout, card) {
|
|
1773
|
+
this.setLimitsByUserType(checkout.user.isSubscriber);
|
|
1768
1774
|
await this.validateBlockedOrderAttempts(checkout, card);
|
|
1769
1775
|
await this.validateDayAndWeekOrderLimits(checkout, card);
|
|
1770
1776
|
return true;
|
|
1771
1777
|
}
|
|
1778
|
+
setLimitsByUserType(isSubscriber) {
|
|
1779
|
+
this.LIMIT_ORDERS_DAY = {
|
|
1780
|
+
subscriber: {
|
|
1781
|
+
cpf: 4,
|
|
1782
|
+
email: 4,
|
|
1783
|
+
telefone: 4,
|
|
1784
|
+
card: 4,
|
|
1785
|
+
cep: 4,
|
|
1786
|
+
},
|
|
1787
|
+
nonSubscriber: {
|
|
1788
|
+
cpf: 2,
|
|
1789
|
+
email: 2,
|
|
1790
|
+
telefone: 2,
|
|
1791
|
+
card: 2,
|
|
1792
|
+
cep: 2,
|
|
1793
|
+
},
|
|
1794
|
+
};
|
|
1795
|
+
this.LIMIT_ORDERS_WEEK = {
|
|
1796
|
+
subscriber: {
|
|
1797
|
+
cpf: 12,
|
|
1798
|
+
email: 12,
|
|
1799
|
+
telefone: 12,
|
|
1800
|
+
card: 12,
|
|
1801
|
+
cep: Infinity,
|
|
1802
|
+
},
|
|
1803
|
+
nonSubscriber: {
|
|
1804
|
+
cpf: 7,
|
|
1805
|
+
email: 7,
|
|
1806
|
+
telefone: 7,
|
|
1807
|
+
card: 7,
|
|
1808
|
+
cep: 7,
|
|
1809
|
+
},
|
|
1810
|
+
};
|
|
1811
|
+
this.LIMIT_BLOCKED_ORDERS_DAY = isSubscriber ? 7 : 5;
|
|
1812
|
+
}
|
|
1813
|
+
getLimitsByUserType(isSubscriber) {
|
|
1814
|
+
return isSubscriber ? this.LIMIT_ORDERS_DAY['subscriber'] : this.LIMIT_ORDERS_DAY['nonSubscriber'];
|
|
1815
|
+
}
|
|
1772
1816
|
async validateBlockedOrderAttempts(checkout, card) {
|
|
1773
1817
|
const isValid = await this.verifyBlockedOrderAttempts(checkout, card);
|
|
1774
1818
|
if (!isValid) {
|
|
1775
|
-
throw new FraudValidationError(
|
|
1819
|
+
throw new FraudValidationError(`Cliente com mais de ${this.LIMIT_BLOCKED_ORDERS_DAY} compras negadas/bloqueadas no dia`, {
|
|
1776
1820
|
checkoutId: checkout.id,
|
|
1777
1821
|
userEmail: checkout.user.email,
|
|
1778
1822
|
info: {
|
|
@@ -1786,7 +1830,7 @@ class AntifraudCardService {
|
|
|
1786
1830
|
async validateDayAndWeekOrderLimits(checkout, card) {
|
|
1787
1831
|
const isValid = await this.verifyDayAndWeekOrders(checkout, card);
|
|
1788
1832
|
if (!isValid) {
|
|
1789
|
-
throw new FraudValidationError('Cliente tentando comprar mais
|
|
1833
|
+
throw new FraudValidationError('Cliente tentando comprar mais do que o permitido no dia/semana', {
|
|
1790
1834
|
checkoutId: checkout.id,
|
|
1791
1835
|
userEmail: checkout.user.email,
|
|
1792
1836
|
info: {
|
|
@@ -1805,7 +1849,7 @@ class AntifraudCardService {
|
|
|
1805
1849
|
await this.createBlockedOrderRecord({
|
|
1806
1850
|
checkout,
|
|
1807
1851
|
card,
|
|
1808
|
-
reason:
|
|
1852
|
+
reason: `More than ${this.LIMIT_BLOCKED_ORDERS_DAY} attempts have failed`,
|
|
1809
1853
|
key: 'Failed attempts',
|
|
1810
1854
|
period: 'day',
|
|
1811
1855
|
});
|
|
@@ -1926,26 +1970,28 @@ class AntifraudCardService {
|
|
|
1926
1970
|
}
|
|
1927
1971
|
async validateDayOrderLimits(checkout, params) {
|
|
1928
1972
|
const ordersPerDay = await this.validateOrdersByRange(params, this.getDateRange('day'));
|
|
1973
|
+
const limits = this.getLimitsByUserType(checkout.user.isSubscriber);
|
|
1929
1974
|
return this.checkOrderLimitsAndBlock({
|
|
1930
1975
|
checkout,
|
|
1931
1976
|
orderCounts: ordersPerDay,
|
|
1932
|
-
limit:
|
|
1977
|
+
limit: limits,
|
|
1933
1978
|
period: 'day',
|
|
1934
1979
|
});
|
|
1935
1980
|
}
|
|
1936
1981
|
async validateWeekOrderLimits(checkout, params) {
|
|
1937
1982
|
const ordersPerWeek = await this.validateOrdersByRange(params, this.getDateRange('week'));
|
|
1983
|
+
const limits = this.getLimitsByUserType(checkout.user.isSubscriber);
|
|
1938
1984
|
return this.checkOrderLimitsAndBlock({
|
|
1939
1985
|
checkout,
|
|
1940
1986
|
orderCounts: ordersPerWeek,
|
|
1941
|
-
limit:
|
|
1987
|
+
limit: limits,
|
|
1942
1988
|
period: 'week',
|
|
1943
1989
|
});
|
|
1944
1990
|
}
|
|
1945
1991
|
async checkOrderLimitsAndBlock(params) {
|
|
1946
1992
|
const { checkout, orderCounts, limit, period } = params;
|
|
1947
1993
|
for (const key in orderCounts) {
|
|
1948
|
-
if (orderCounts[key] >= limit) {
|
|
1994
|
+
if (orderCounts[key] >= limit[key]) {
|
|
1949
1995
|
await this.createBlockedOrderRecord({
|
|
1950
1996
|
checkout,
|
|
1951
1997
|
card: null,
|
|
@@ -4763,6 +4809,17 @@ const withCrudFirestore = (MixinBase) => {
|
|
|
4763
4809
|
};
|
|
4764
4810
|
};
|
|
4765
4811
|
|
|
4812
|
+
class BrandCategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
4813
|
+
constructor({ firestore, interceptors, }) {
|
|
4814
|
+
super({
|
|
4815
|
+
firestore,
|
|
4816
|
+
collectionName: 'brandsCategory',
|
|
4817
|
+
model: BrandCategory,
|
|
4818
|
+
interceptors,
|
|
4819
|
+
});
|
|
4820
|
+
}
|
|
4821
|
+
}
|
|
4822
|
+
|
|
4766
4823
|
class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
4767
4824
|
constructor({ firestore, interceptors }) {
|
|
4768
4825
|
super({
|
|
@@ -9816,6 +9873,8 @@ exports.Base = Base;
|
|
|
9816
9873
|
exports.BaseModel = BaseModel;
|
|
9817
9874
|
exports.BeautyProfile = BeautyProfile;
|
|
9818
9875
|
exports.BeautyQuestionsHelper = BeautyQuestionsHelper;
|
|
9876
|
+
exports.BrandCategory = BrandCategory;
|
|
9877
|
+
exports.BrandCategoryFirestoreRepository = BrandCategoryFirestoreRepository;
|
|
9819
9878
|
exports.BusinessError = BusinessError;
|
|
9820
9879
|
exports.Buy2Win = Buy2Win;
|
|
9821
9880
|
exports.Buy2WinFirestoreRepository = Buy2WinFirestoreRepository;
|
package/index.esm.js
CHANGED
|
@@ -733,6 +733,12 @@ __decorate([
|
|
|
733
733
|
], Category.prototype, "filters", void 0);
|
|
734
734
|
registerClass('Category', Category);
|
|
735
735
|
|
|
736
|
+
class BrandCategory extends BaseModel {
|
|
737
|
+
static get identifiersFields() {
|
|
738
|
+
return ['id'];
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
736
742
|
class CategoryCollectionChildren extends BaseModel {
|
|
737
743
|
static get identifiersFields() {
|
|
738
744
|
return ['collectionId', 'categoryId'];
|
|
@@ -1736,19 +1742,57 @@ class AntifraudCardService {
|
|
|
1736
1742
|
constructor(orderRepository, orderBlockedRepository) {
|
|
1737
1743
|
this.orderRepository = orderRepository;
|
|
1738
1744
|
this.orderBlockedRepository = orderBlockedRepository;
|
|
1739
|
-
this.LIMIT_ORDERS_DAY =
|
|
1740
|
-
this.LIMIT_ORDERS_WEEK =
|
|
1741
|
-
this.LIMIT_BLOCKED_ORDERS_DAY = 5;
|
|
1745
|
+
this.LIMIT_ORDERS_DAY = null;
|
|
1746
|
+
this.LIMIT_ORDERS_WEEK = null;
|
|
1742
1747
|
}
|
|
1743
1748
|
async validate(checkout, card) {
|
|
1749
|
+
this.setLimitsByUserType(checkout.user.isSubscriber);
|
|
1744
1750
|
await this.validateBlockedOrderAttempts(checkout, card);
|
|
1745
1751
|
await this.validateDayAndWeekOrderLimits(checkout, card);
|
|
1746
1752
|
return true;
|
|
1747
1753
|
}
|
|
1754
|
+
setLimitsByUserType(isSubscriber) {
|
|
1755
|
+
this.LIMIT_ORDERS_DAY = {
|
|
1756
|
+
subscriber: {
|
|
1757
|
+
cpf: 4,
|
|
1758
|
+
email: 4,
|
|
1759
|
+
telefone: 4,
|
|
1760
|
+
card: 4,
|
|
1761
|
+
cep: 4,
|
|
1762
|
+
},
|
|
1763
|
+
nonSubscriber: {
|
|
1764
|
+
cpf: 2,
|
|
1765
|
+
email: 2,
|
|
1766
|
+
telefone: 2,
|
|
1767
|
+
card: 2,
|
|
1768
|
+
cep: 2,
|
|
1769
|
+
},
|
|
1770
|
+
};
|
|
1771
|
+
this.LIMIT_ORDERS_WEEK = {
|
|
1772
|
+
subscriber: {
|
|
1773
|
+
cpf: 12,
|
|
1774
|
+
email: 12,
|
|
1775
|
+
telefone: 12,
|
|
1776
|
+
card: 12,
|
|
1777
|
+
cep: Infinity,
|
|
1778
|
+
},
|
|
1779
|
+
nonSubscriber: {
|
|
1780
|
+
cpf: 7,
|
|
1781
|
+
email: 7,
|
|
1782
|
+
telefone: 7,
|
|
1783
|
+
card: 7,
|
|
1784
|
+
cep: 7,
|
|
1785
|
+
},
|
|
1786
|
+
};
|
|
1787
|
+
this.LIMIT_BLOCKED_ORDERS_DAY = isSubscriber ? 7 : 5;
|
|
1788
|
+
}
|
|
1789
|
+
getLimitsByUserType(isSubscriber) {
|
|
1790
|
+
return isSubscriber ? this.LIMIT_ORDERS_DAY['subscriber'] : this.LIMIT_ORDERS_DAY['nonSubscriber'];
|
|
1791
|
+
}
|
|
1748
1792
|
async validateBlockedOrderAttempts(checkout, card) {
|
|
1749
1793
|
const isValid = await this.verifyBlockedOrderAttempts(checkout, card);
|
|
1750
1794
|
if (!isValid) {
|
|
1751
|
-
throw new FraudValidationError(
|
|
1795
|
+
throw new FraudValidationError(`Cliente com mais de ${this.LIMIT_BLOCKED_ORDERS_DAY} compras negadas/bloqueadas no dia`, {
|
|
1752
1796
|
checkoutId: checkout.id,
|
|
1753
1797
|
userEmail: checkout.user.email,
|
|
1754
1798
|
info: {
|
|
@@ -1762,7 +1806,7 @@ class AntifraudCardService {
|
|
|
1762
1806
|
async validateDayAndWeekOrderLimits(checkout, card) {
|
|
1763
1807
|
const isValid = await this.verifyDayAndWeekOrders(checkout, card);
|
|
1764
1808
|
if (!isValid) {
|
|
1765
|
-
throw new FraudValidationError('Cliente tentando comprar mais
|
|
1809
|
+
throw new FraudValidationError('Cliente tentando comprar mais do que o permitido no dia/semana', {
|
|
1766
1810
|
checkoutId: checkout.id,
|
|
1767
1811
|
userEmail: checkout.user.email,
|
|
1768
1812
|
info: {
|
|
@@ -1781,7 +1825,7 @@ class AntifraudCardService {
|
|
|
1781
1825
|
await this.createBlockedOrderRecord({
|
|
1782
1826
|
checkout,
|
|
1783
1827
|
card,
|
|
1784
|
-
reason:
|
|
1828
|
+
reason: `More than ${this.LIMIT_BLOCKED_ORDERS_DAY} attempts have failed`,
|
|
1785
1829
|
key: 'Failed attempts',
|
|
1786
1830
|
period: 'day',
|
|
1787
1831
|
});
|
|
@@ -1902,26 +1946,28 @@ class AntifraudCardService {
|
|
|
1902
1946
|
}
|
|
1903
1947
|
async validateDayOrderLimits(checkout, params) {
|
|
1904
1948
|
const ordersPerDay = await this.validateOrdersByRange(params, this.getDateRange('day'));
|
|
1949
|
+
const limits = this.getLimitsByUserType(checkout.user.isSubscriber);
|
|
1905
1950
|
return this.checkOrderLimitsAndBlock({
|
|
1906
1951
|
checkout,
|
|
1907
1952
|
orderCounts: ordersPerDay,
|
|
1908
|
-
limit:
|
|
1953
|
+
limit: limits,
|
|
1909
1954
|
period: 'day',
|
|
1910
1955
|
});
|
|
1911
1956
|
}
|
|
1912
1957
|
async validateWeekOrderLimits(checkout, params) {
|
|
1913
1958
|
const ordersPerWeek = await this.validateOrdersByRange(params, this.getDateRange('week'));
|
|
1959
|
+
const limits = this.getLimitsByUserType(checkout.user.isSubscriber);
|
|
1914
1960
|
return this.checkOrderLimitsAndBlock({
|
|
1915
1961
|
checkout,
|
|
1916
1962
|
orderCounts: ordersPerWeek,
|
|
1917
|
-
limit:
|
|
1963
|
+
limit: limits,
|
|
1918
1964
|
period: 'week',
|
|
1919
1965
|
});
|
|
1920
1966
|
}
|
|
1921
1967
|
async checkOrderLimitsAndBlock(params) {
|
|
1922
1968
|
const { checkout, orderCounts, limit, period } = params;
|
|
1923
1969
|
for (const key in orderCounts) {
|
|
1924
|
-
if (orderCounts[key] >= limit) {
|
|
1970
|
+
if (orderCounts[key] >= limit[key]) {
|
|
1925
1971
|
await this.createBlockedOrderRecord({
|
|
1926
1972
|
checkout,
|
|
1927
1973
|
card: null,
|
|
@@ -4739,6 +4785,17 @@ const withCrudFirestore = (MixinBase) => {
|
|
|
4739
4785
|
};
|
|
4740
4786
|
};
|
|
4741
4787
|
|
|
4788
|
+
class BrandCategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
4789
|
+
constructor({ firestore, interceptors, }) {
|
|
4790
|
+
super({
|
|
4791
|
+
firestore,
|
|
4792
|
+
collectionName: 'brandsCategory',
|
|
4793
|
+
model: BrandCategory,
|
|
4794
|
+
interceptors,
|
|
4795
|
+
});
|
|
4796
|
+
}
|
|
4797
|
+
}
|
|
4798
|
+
|
|
4742
4799
|
class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
4743
4800
|
constructor({ firestore, interceptors }) {
|
|
4744
4801
|
super({
|
|
@@ -9653,4 +9710,4 @@ class ProductsVertexSearch {
|
|
|
9653
9710
|
}
|
|
9654
9711
|
}
|
|
9655
9712
|
|
|
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 };
|
|
9713
|
+
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
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
15
|
+
}
|
|
@@ -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;
|
package/src/infra/firebase/firestore/repositories/catalog/category-brand-firestore.repository.d.ts
ADDED
|
@@ -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 {};
|