@infrab4a/connect 5.3.0-beta.21 → 5.3.0-beta.23
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 +72 -26
- package/index.esm.js +69 -27
- package/package.json +1 -1
- package/src/domain/catalog/models/index.d.ts +1 -0
- package/src/domain/catalog/models/product-stock-entry.d.ts +16 -0
- package/src/domain/catalog/repositories/index.d.ts +1 -0
- package/src/domain/catalog/repositories/product-stock-entry.repository.d.ts +4 -0
- package/src/domain/shop-settings/models/shop-configs.d.ts +9 -3
- package/src/domain/shop-settings/models/types/index.d.ts +1 -0
- package/src/domain/shop-settings/models/types/limit-orders.type.d.ts +7 -0
- package/src/domain/shop-settings/models/types/shop-error-messages.type.d.ts +2 -0
- package/src/errors/index.d.ts +1 -0
- package/src/errors/invalid-checkout.error.d.ts +7 -0
- package/src/infra/firebase/firestore/repositories/shopping/order-blocked-firestore.repository.d.ts +1 -0
- package/src/infra/hasura-graphql/models/index.d.ts +1 -0
- package/src/infra/hasura-graphql/models/product-stock-entry-hasura-graphql.d.ts +3 -0
- package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +1 -0
- package/src/infra/hasura-graphql/repositories/catalog/product-stock-entry-hasura-graphql.repository.d.ts +8 -0
package/index.cjs.js
CHANGED
|
@@ -939,6 +939,12 @@ tslib.__decorate([
|
|
|
939
939
|
tslib.__metadata("design:type", Object)
|
|
940
940
|
], ProductErrors.prototype, "product", void 0);
|
|
941
941
|
|
|
942
|
+
class ProductStockEntry extends BaseModel {
|
|
943
|
+
static get identifiersFields() {
|
|
944
|
+
return ['id'];
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
942
948
|
class ProductStockNotification extends BaseModel {
|
|
943
949
|
static get identifiersFields() {
|
|
944
950
|
return ['id'];
|
|
@@ -1710,20 +1716,6 @@ tslib.__decorate([
|
|
|
1710
1716
|
tslib.__metadata("design:type", Coupon)
|
|
1711
1717
|
], CheckoutSubscription.prototype, "coupon", void 0);
|
|
1712
1718
|
|
|
1713
|
-
class BusinessError extends tsCustomError.CustomError {
|
|
1714
|
-
constructor(message, additionalData, type = '') {
|
|
1715
|
-
super(message);
|
|
1716
|
-
this.additionalData = additionalData;
|
|
1717
|
-
this.type = type;
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
class DuplicatedResultsError extends tsCustomError.CustomError {
|
|
1722
|
-
constructor(message) {
|
|
1723
|
-
super(message);
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
1719
|
exports.ErrorsCode = void 0;
|
|
1728
1720
|
(function (ErrorsCode) {
|
|
1729
1721
|
ErrorsCode["genericError"] = "generic-error";
|
|
@@ -1740,6 +1732,20 @@ exports.ErrorsCode = void 0;
|
|
|
1740
1732
|
ErrorsCode["paymentError"] = "payment-error";
|
|
1741
1733
|
})(exports.ErrorsCode || (exports.ErrorsCode = {}));
|
|
1742
1734
|
|
|
1735
|
+
class BusinessError extends tsCustomError.CustomError {
|
|
1736
|
+
constructor(message, additionalData, type) {
|
|
1737
|
+
super(message);
|
|
1738
|
+
this.additionalData = additionalData;
|
|
1739
|
+
this.type = type || exports.ErrorsCode.businessError;
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
class DuplicatedResultsError extends tsCustomError.CustomError {
|
|
1744
|
+
constructor(message) {
|
|
1745
|
+
super(message);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1743
1749
|
class FraudValidationError extends tsCustomError.CustomError {
|
|
1744
1750
|
constructor(message, type, additionalData) {
|
|
1745
1751
|
super(message);
|
|
@@ -1754,6 +1760,14 @@ class InvalidArgumentError extends tsCustomError.CustomError {
|
|
|
1754
1760
|
}
|
|
1755
1761
|
}
|
|
1756
1762
|
|
|
1763
|
+
class InvalidCheckoutError extends tsCustomError.CustomError {
|
|
1764
|
+
constructor(message, additionalData) {
|
|
1765
|
+
super(message);
|
|
1766
|
+
this.additionalData = additionalData;
|
|
1767
|
+
this.type = exports.ErrorsCode.invalidCheckoutError;
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1757
1771
|
class NotFoundError extends tsCustomError.CustomError {
|
|
1758
1772
|
constructor(message) {
|
|
1759
1773
|
super(message);
|
|
@@ -5379,6 +5393,7 @@ class OrderBlockedFirestoreRepository extends withCrudFirestore(withHelpers(with
|
|
|
5379
5393
|
card,
|
|
5380
5394
|
checkout,
|
|
5381
5395
|
date: new Date(),
|
|
5396
|
+
gatewayInfo: params.gatewayInfo || {},
|
|
5382
5397
|
}));
|
|
5383
5398
|
}
|
|
5384
5399
|
formatZip(zip) {
|
|
@@ -6003,6 +6018,9 @@ tslib.__decorate([
|
|
|
6003
6018
|
tslib.__metadata("design:type", Object)
|
|
6004
6019
|
], ProductErrorsHasuraGraphQL.prototype, "product", void 0);
|
|
6005
6020
|
|
|
6021
|
+
class ProductStockEntryHasuraGraphQL extends ProductStockEntry {
|
|
6022
|
+
}
|
|
6023
|
+
|
|
6006
6024
|
class CategoryCollectionChildrenHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
6007
6025
|
constructor({ endpoint, authOptions, interceptors, cache, }) {
|
|
6008
6026
|
super({
|
|
@@ -8663,6 +8681,33 @@ tslib.__decorate([
|
|
|
8663
8681
|
tslib.__metadata("design:returntype", void 0)
|
|
8664
8682
|
], ProductReviewHasuraGraphQLRepository.prototype, "disaproveReview", null);
|
|
8665
8683
|
|
|
8684
|
+
class ProductStockEntryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
8685
|
+
constructor({ endpoint, authOptions, interceptors, cache, }) {
|
|
8686
|
+
super({
|
|
8687
|
+
tableName: 'product_millenium_stock_entry',
|
|
8688
|
+
model: ProductStockEntry,
|
|
8689
|
+
endpoint,
|
|
8690
|
+
authOptions,
|
|
8691
|
+
interceptors,
|
|
8692
|
+
cache,
|
|
8693
|
+
fields: [
|
|
8694
|
+
'id',
|
|
8695
|
+
{ productId: { columnName: 'product_id' } },
|
|
8696
|
+
{ codProduct: { columnName: 'cod_product' } },
|
|
8697
|
+
{ productDescription: { columnName: 'product_description' } },
|
|
8698
|
+
{ eventDescription: { columnName: 'event_description' } },
|
|
8699
|
+
{ invoiceValue: { columnName: 'invoice_value' } },
|
|
8700
|
+
'price',
|
|
8701
|
+
'quantity',
|
|
8702
|
+
{ invoiceId: { columnName: 'invoice_id' } },
|
|
8703
|
+
{ nfeKey: { columnName: 'nfe_key' } },
|
|
8704
|
+
'batch',
|
|
8705
|
+
{ createdAt: { columnName: 'created_at' } },
|
|
8706
|
+
],
|
|
8707
|
+
});
|
|
8708
|
+
}
|
|
8709
|
+
}
|
|
8710
|
+
|
|
8666
8711
|
class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
8667
8712
|
constructor({ endpoint, authOptions, interceptors, cache, }) {
|
|
8668
8713
|
super({
|
|
@@ -9679,13 +9724,14 @@ class MercadoPagoCardAxiosAdapter {
|
|
|
9679
9724
|
}
|
|
9680
9725
|
catch (error) {
|
|
9681
9726
|
if (error instanceof axios.AxiosError) {
|
|
9682
|
-
console.warn(JSON.stringify(error.response
|
|
9727
|
+
console.warn(JSON.stringify(error.response?.data?.message));
|
|
9728
|
+
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', exports.ErrorsCode.paymentError, {
|
|
9729
|
+
checkoutId: checkout.id,
|
|
9730
|
+
userEmail: checkout.user.email,
|
|
9731
|
+
info: error.response?.data?.message || error.message?.toString(),
|
|
9732
|
+
});
|
|
9683
9733
|
}
|
|
9684
|
-
throw
|
|
9685
|
-
checkoutId: checkout.id,
|
|
9686
|
-
userEmail: checkout.user.email,
|
|
9687
|
-
info: error.response.data?.message || error.message?.toString(),
|
|
9688
|
-
});
|
|
9734
|
+
throw error;
|
|
9689
9735
|
}
|
|
9690
9736
|
}
|
|
9691
9737
|
async requestPayment(checkout, payload) {
|
|
@@ -10688,15 +10734,11 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
10688
10734
|
return payment;
|
|
10689
10735
|
}
|
|
10690
10736
|
catch (error) {
|
|
10691
|
-
if (error instanceof PaymentError) {
|
|
10692
|
-
throw error;
|
|
10693
|
-
}
|
|
10694
10737
|
if (error instanceof axios.AxiosError) {
|
|
10695
10738
|
console.error('error data: ', JSON.stringify(error.response?.data));
|
|
10739
|
+
throw PagarmeBlockedOrderHelper.createGenericPaymentError(checkout, exports.ErrorsCode.paymentError, error.response?.data);
|
|
10696
10740
|
}
|
|
10697
|
-
|
|
10698
|
-
const errorCode = PagarMeErrorHelper.getErrorTypeFromResponse(returnCode);
|
|
10699
|
-
throw PagarmeBlockedOrderHelper.createGenericPaymentError(checkout, errorCode, error.response?.data);
|
|
10741
|
+
throw error;
|
|
10700
10742
|
}
|
|
10701
10743
|
}
|
|
10702
10744
|
async addCard(card, customer) {
|
|
@@ -11210,6 +11252,7 @@ exports.GroupFirestoreRepository = GroupFirestoreRepository;
|
|
|
11210
11252
|
exports.Home = Home;
|
|
11211
11253
|
exports.HomeFirestoreRepository = HomeFirestoreRepository;
|
|
11212
11254
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
11255
|
+
exports.InvalidCheckoutError = InvalidCheckoutError;
|
|
11213
11256
|
exports.KitProduct = KitProduct;
|
|
11214
11257
|
exports.KitProductHasuraGraphQL = KitProductHasuraGraphQL;
|
|
11215
11258
|
exports.Lead = Lead;
|
|
@@ -11256,6 +11299,9 @@ exports.ProductHasuraGraphQL = ProductHasuraGraphQL;
|
|
|
11256
11299
|
exports.ProductHasuraGraphQLRepository = ProductHasuraGraphQLRepository;
|
|
11257
11300
|
exports.ProductReview = ProductReview;
|
|
11258
11301
|
exports.ProductReviewHasuraGraphQLRepository = ProductReviewHasuraGraphQLRepository;
|
|
11302
|
+
exports.ProductStockEntry = ProductStockEntry;
|
|
11303
|
+
exports.ProductStockEntryHasuraGraphQL = ProductStockEntryHasuraGraphQL;
|
|
11304
|
+
exports.ProductStockEntryHasuraGraphQLRepository = ProductStockEntryHasuraGraphQLRepository;
|
|
11259
11305
|
exports.ProductStockNotification = ProductStockNotification;
|
|
11260
11306
|
exports.ProductStockNotificationHasuraGraphQLRepository = ProductStockNotificationHasuraGraphQLRepository;
|
|
11261
11307
|
exports.ProductVariantFirestoreRepository = ProductVariantFirestoreRepository;
|
package/index.esm.js
CHANGED
|
@@ -915,6 +915,12 @@ __decorate([
|
|
|
915
915
|
__metadata("design:type", Object)
|
|
916
916
|
], ProductErrors.prototype, "product", void 0);
|
|
917
917
|
|
|
918
|
+
class ProductStockEntry extends BaseModel {
|
|
919
|
+
static get identifiersFields() {
|
|
920
|
+
return ['id'];
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
918
924
|
class ProductStockNotification extends BaseModel {
|
|
919
925
|
static get identifiersFields() {
|
|
920
926
|
return ['id'];
|
|
@@ -1686,20 +1692,6 @@ __decorate([
|
|
|
1686
1692
|
__metadata("design:type", Coupon)
|
|
1687
1693
|
], CheckoutSubscription.prototype, "coupon", void 0);
|
|
1688
1694
|
|
|
1689
|
-
class BusinessError extends CustomError {
|
|
1690
|
-
constructor(message, additionalData, type = '') {
|
|
1691
|
-
super(message);
|
|
1692
|
-
this.additionalData = additionalData;
|
|
1693
|
-
this.type = type;
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
class DuplicatedResultsError extends CustomError {
|
|
1698
|
-
constructor(message) {
|
|
1699
|
-
super(message);
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
1695
|
var ErrorsCode;
|
|
1704
1696
|
(function (ErrorsCode) {
|
|
1705
1697
|
ErrorsCode["genericError"] = "generic-error";
|
|
@@ -1716,6 +1708,20 @@ var ErrorsCode;
|
|
|
1716
1708
|
ErrorsCode["paymentError"] = "payment-error";
|
|
1717
1709
|
})(ErrorsCode || (ErrorsCode = {}));
|
|
1718
1710
|
|
|
1711
|
+
class BusinessError extends CustomError {
|
|
1712
|
+
constructor(message, additionalData, type) {
|
|
1713
|
+
super(message);
|
|
1714
|
+
this.additionalData = additionalData;
|
|
1715
|
+
this.type = type || ErrorsCode.businessError;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
class DuplicatedResultsError extends CustomError {
|
|
1720
|
+
constructor(message) {
|
|
1721
|
+
super(message);
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1719
1725
|
class FraudValidationError extends CustomError {
|
|
1720
1726
|
constructor(message, type, additionalData) {
|
|
1721
1727
|
super(message);
|
|
@@ -1730,6 +1736,14 @@ class InvalidArgumentError extends CustomError {
|
|
|
1730
1736
|
}
|
|
1731
1737
|
}
|
|
1732
1738
|
|
|
1739
|
+
class InvalidCheckoutError extends CustomError {
|
|
1740
|
+
constructor(message, additionalData) {
|
|
1741
|
+
super(message);
|
|
1742
|
+
this.additionalData = additionalData;
|
|
1743
|
+
this.type = ErrorsCode.invalidCheckoutError;
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1733
1747
|
class NotFoundError extends CustomError {
|
|
1734
1748
|
constructor(message) {
|
|
1735
1749
|
super(message);
|
|
@@ -5355,6 +5369,7 @@ class OrderBlockedFirestoreRepository extends withCrudFirestore(withHelpers(with
|
|
|
5355
5369
|
card,
|
|
5356
5370
|
checkout,
|
|
5357
5371
|
date: new Date(),
|
|
5372
|
+
gatewayInfo: params.gatewayInfo || {},
|
|
5358
5373
|
}));
|
|
5359
5374
|
}
|
|
5360
5375
|
formatZip(zip) {
|
|
@@ -5979,6 +5994,9 @@ __decorate([
|
|
|
5979
5994
|
__metadata("design:type", Object)
|
|
5980
5995
|
], ProductErrorsHasuraGraphQL.prototype, "product", void 0);
|
|
5981
5996
|
|
|
5997
|
+
class ProductStockEntryHasuraGraphQL extends ProductStockEntry {
|
|
5998
|
+
}
|
|
5999
|
+
|
|
5982
6000
|
class CategoryCollectionChildrenHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
5983
6001
|
constructor({ endpoint, authOptions, interceptors, cache, }) {
|
|
5984
6002
|
super({
|
|
@@ -8639,6 +8657,33 @@ __decorate([
|
|
|
8639
8657
|
__metadata("design:returntype", void 0)
|
|
8640
8658
|
], ProductReviewHasuraGraphQLRepository.prototype, "disaproveReview", null);
|
|
8641
8659
|
|
|
8660
|
+
class ProductStockEntryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
8661
|
+
constructor({ endpoint, authOptions, interceptors, cache, }) {
|
|
8662
|
+
super({
|
|
8663
|
+
tableName: 'product_millenium_stock_entry',
|
|
8664
|
+
model: ProductStockEntry,
|
|
8665
|
+
endpoint,
|
|
8666
|
+
authOptions,
|
|
8667
|
+
interceptors,
|
|
8668
|
+
cache,
|
|
8669
|
+
fields: [
|
|
8670
|
+
'id',
|
|
8671
|
+
{ productId: { columnName: 'product_id' } },
|
|
8672
|
+
{ codProduct: { columnName: 'cod_product' } },
|
|
8673
|
+
{ productDescription: { columnName: 'product_description' } },
|
|
8674
|
+
{ eventDescription: { columnName: 'event_description' } },
|
|
8675
|
+
{ invoiceValue: { columnName: 'invoice_value' } },
|
|
8676
|
+
'price',
|
|
8677
|
+
'quantity',
|
|
8678
|
+
{ invoiceId: { columnName: 'invoice_id' } },
|
|
8679
|
+
{ nfeKey: { columnName: 'nfe_key' } },
|
|
8680
|
+
'batch',
|
|
8681
|
+
{ createdAt: { columnName: 'created_at' } },
|
|
8682
|
+
],
|
|
8683
|
+
});
|
|
8684
|
+
}
|
|
8685
|
+
}
|
|
8686
|
+
|
|
8642
8687
|
class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
8643
8688
|
constructor({ endpoint, authOptions, interceptors, cache, }) {
|
|
8644
8689
|
super({
|
|
@@ -9655,13 +9700,14 @@ class MercadoPagoCardAxiosAdapter {
|
|
|
9655
9700
|
}
|
|
9656
9701
|
catch (error) {
|
|
9657
9702
|
if (error instanceof AxiosError) {
|
|
9658
|
-
console.warn(JSON.stringify(error.response
|
|
9703
|
+
console.warn(JSON.stringify(error.response?.data?.message));
|
|
9704
|
+
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', ErrorsCode.paymentError, {
|
|
9705
|
+
checkoutId: checkout.id,
|
|
9706
|
+
userEmail: checkout.user.email,
|
|
9707
|
+
info: error.response?.data?.message || error.message?.toString(),
|
|
9708
|
+
});
|
|
9659
9709
|
}
|
|
9660
|
-
throw
|
|
9661
|
-
checkoutId: checkout.id,
|
|
9662
|
-
userEmail: checkout.user.email,
|
|
9663
|
-
info: error.response.data?.message || error.message?.toString(),
|
|
9664
|
-
});
|
|
9710
|
+
throw error;
|
|
9665
9711
|
}
|
|
9666
9712
|
}
|
|
9667
9713
|
async requestPayment(checkout, payload) {
|
|
@@ -10664,15 +10710,11 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
10664
10710
|
return payment;
|
|
10665
10711
|
}
|
|
10666
10712
|
catch (error) {
|
|
10667
|
-
if (error instanceof PaymentError) {
|
|
10668
|
-
throw error;
|
|
10669
|
-
}
|
|
10670
10713
|
if (error instanceof AxiosError) {
|
|
10671
10714
|
console.error('error data: ', JSON.stringify(error.response?.data));
|
|
10715
|
+
throw PagarmeBlockedOrderHelper.createGenericPaymentError(checkout, ErrorsCode.paymentError, error.response?.data);
|
|
10672
10716
|
}
|
|
10673
|
-
|
|
10674
|
-
const errorCode = PagarMeErrorHelper.getErrorTypeFromResponse(returnCode);
|
|
10675
|
-
throw PagarmeBlockedOrderHelper.createGenericPaymentError(checkout, errorCode, error.response?.data);
|
|
10717
|
+
throw error;
|
|
10676
10718
|
}
|
|
10677
10719
|
}
|
|
10678
10720
|
async addCard(card, customer) {
|
|
@@ -10993,4 +11035,4 @@ class ProductsVertexSearch {
|
|
|
10993
11035
|
}
|
|
10994
11036
|
}
|
|
10995
11037
|
|
|
10996
|
-
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, 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, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, 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 };
|
|
11038
|
+
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, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, 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
|
@@ -11,6 +11,7 @@ export * from './kit-product';
|
|
|
11
11
|
export * from './product';
|
|
12
12
|
export * from './product-errors';
|
|
13
13
|
export * from './product-review';
|
|
14
|
+
export * from './product-stock-entry';
|
|
14
15
|
export * from './product-stock-notification';
|
|
15
16
|
export * from './types';
|
|
16
17
|
export * from './variant';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
|
+
export declare class ProductStockEntry extends BaseModel<ProductStockEntry> {
|
|
3
|
+
id: number;
|
|
4
|
+
productId: string;
|
|
5
|
+
codProduct: string;
|
|
6
|
+
productDescription: string;
|
|
7
|
+
eventDescription: string;
|
|
8
|
+
invoiceValue: number;
|
|
9
|
+
price: number;
|
|
10
|
+
quantity: number;
|
|
11
|
+
invoiceId: number;
|
|
12
|
+
nfeKey: string;
|
|
13
|
+
batch: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
16
|
+
}
|
|
@@ -9,6 +9,7 @@ export * from './group.repository';
|
|
|
9
9
|
export * from './product-catalog.repository';
|
|
10
10
|
export * from './product-errors.repository';
|
|
11
11
|
export * from './product-reviews.repository';
|
|
12
|
+
export * from './product-stock-entry.repository';
|
|
12
13
|
export * from './product-stock-notification.repository';
|
|
13
14
|
export * from './product.repository';
|
|
14
15
|
export * from './subscription-product.repository';
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
|
-
import { ShopErrorMessages, ShopSameDayNotAvailable } from './types';
|
|
2
|
+
import { LimitOrders, ShopErrorMessages, ShopSameDayNotAvailable } from './types';
|
|
3
3
|
export declare class ShopConfigs extends BaseModel<ShopConfigs> {
|
|
4
4
|
errors?: ShopErrorMessages[];
|
|
5
5
|
antifraude?: {
|
|
6
6
|
enabled: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
week: {
|
|
8
|
+
subscriber: LimitOrders;
|
|
9
|
+
nonSubscriber: LimitOrders;
|
|
10
|
+
};
|
|
11
|
+
day: {
|
|
12
|
+
subscriber: LimitOrders;
|
|
13
|
+
nonSubscriber: LimitOrders;
|
|
14
|
+
};
|
|
9
15
|
};
|
|
10
16
|
sameDayNotAvaliable?: ShopSameDayNotAvailable;
|
|
11
17
|
static get identifiersFields(): GenericIdentifier[];
|
|
@@ -4,6 +4,7 @@ export * from './brands-carousel.type';
|
|
|
4
4
|
export * from './campaign-page';
|
|
5
5
|
export * from './home-data.type';
|
|
6
6
|
export * from './landing-page';
|
|
7
|
+
export * from './limit-orders.type';
|
|
7
8
|
export * from './menu-nav.type';
|
|
8
9
|
export * from './sections.type';
|
|
9
10
|
export * from './shop-banner.type';
|
package/src/errors/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './duplicated-results.error';
|
|
|
3
3
|
export * from './enum';
|
|
4
4
|
export * from './fraud-validation.error';
|
|
5
5
|
export * from './invalid-argument.error';
|
|
6
|
+
export * from './invalid-checkout.error';
|
|
6
7
|
export * from './not-found.error';
|
|
7
8
|
export * from './payment.error';
|
|
8
9
|
export * from './required-argument.error';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CustomError } from 'ts-custom-error';
|
|
2
|
+
import { checkoutAdditionalDataError } from './types';
|
|
3
|
+
export declare class InvalidCheckoutError extends CustomError {
|
|
4
|
+
additionalData?: checkoutAdditionalDataError;
|
|
5
|
+
type: string;
|
|
6
|
+
constructor(message: string, additionalData?: checkoutAdditionalDataError);
|
|
7
|
+
}
|
package/src/infra/firebase/firestore/repositories/shopping/order-blocked-firestore.repository.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ type CreateBlockedOrderParams = {
|
|
|
6
6
|
type: OrderBlockedType;
|
|
7
7
|
limiteRange: string;
|
|
8
8
|
card?: PaymentCardInfo;
|
|
9
|
+
gatewayInfo?: any;
|
|
9
10
|
};
|
|
10
11
|
declare const OrderBlockedFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<OrderBlocked> & import("../../../../../domain").CrudRepository<OrderBlocked, import("../../../../../domain").CrudParams<OrderBlocked>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<OrderBlocked>, ...any[]]>;
|
|
11
12
|
export declare class OrderBlockedFirestoreRepository extends OrderBlockedFirestoreRepository_base implements OrderBlockedRepository {
|
|
@@ -3,4 +3,5 @@ export * from './kit-product-hasura-graphql';
|
|
|
3
3
|
export * from './product-catalog-hasura-graphql';
|
|
4
4
|
export * from './product-errors-hasura-graphql';
|
|
5
5
|
export * from './product-hasura-graphql';
|
|
6
|
+
export * from './product-stock-entry-hasura-graphql';
|
|
6
7
|
export * from './variant-hasura-graphql';
|
|
@@ -8,6 +8,7 @@ export * from './product-catalog-hasura-graphql.repository';
|
|
|
8
8
|
export * from './product-errors-hasura-graphql.repository';
|
|
9
9
|
export * from './product-hasura-graphql.repository';
|
|
10
10
|
export * from './product-review-hasura-graphql.repository';
|
|
11
|
+
export * from './product-stock-entry-hasura-graphql.repository';
|
|
11
12
|
export * from './product-stock-notification-hasura-graphql.repository';
|
|
12
13
|
export * from './variant-hasura-graphql.repository';
|
|
13
14
|
export * from './wishlist-hasura-graphql.repository';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProductStockEntry } from '../../../../domain';
|
|
2
|
+
import { ProductStockEntryRepository } from '../../../../domain/catalog/repositories';
|
|
3
|
+
import { HasuraConstructorParams } from '../../mixins';
|
|
4
|
+
declare const ProductStockEntryHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<ProductStockEntry> & import("../../../../domain").CrudRepository<ProductStockEntry, import("../../../../domain").CrudParams<ProductStockEntry>> & import("../../mixins").UpdateHasuraGraphQLRepositoryType<ProductStockEntry>, [HasuraConstructorParams<ProductStockEntry> & import("../../mixins/factories").CreateConstructorParams & import("../../mixins/factories").DeleteConstructorParams & import("../../mixins/factories").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
5
|
+
export declare class ProductStockEntryHasuraGraphQLRepository extends ProductStockEntryHasuraGraphQLRepository_base implements ProductStockEntryRepository {
|
|
6
|
+
constructor({ endpoint, authOptions, interceptors, cache, }: Pick<HasuraConstructorParams<ProductStockEntry>, 'endpoint' | 'authOptions' | 'interceptors' | 'cache'>);
|
|
7
|
+
}
|
|
8
|
+
export {};
|