@infrab4a/connect 5.6.5 → 5.7.0-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 +110 -0
- package/index.esm.js +107 -1
- package/package.json +1 -1
- package/src/domain/catalog/models/enums/shops.enum.d.ts +2 -0
- package/src/domain/shopping/models/enums/index.d.ts +2 -0
- package/src/domain/shopping/models/enums/shopping-recurrence-cycle.enum.d.ts +5 -0
- package/src/domain/shopping/models/enums/shopping-recurrence-execution-status.enum.d.ts +9 -0
- package/src/domain/shopping/models/enums/shopping-recurrence-status.enum.d.ts +7 -0
- package/src/domain/shopping/models/index.d.ts +1 -0
- package/src/domain/shopping/models/order.d.ts +3 -0
- package/src/domain/shopping/models/recurrence/index.d.ts +2 -0
- package/src/domain/shopping/models/recurrence/shopping-recurrence-edition.d.ts +18 -0
- package/src/domain/shopping/models/recurrence/shopping-recurrence.d.ts +45 -0
- package/src/domain/shopping/models/types/index.d.ts +1 -0
- package/src/domain/shopping/models/types/line-item-recurrence.type.d.ts +2 -0
- package/src/domain/shopping/repositories/index.d.ts +1 -0
- package/src/domain/shopping/repositories/recurrence/index.d.ts +2 -0
- package/src/domain/shopping/repositories/recurrence/shopping-recurrence-edition.repository.d.ts +4 -0
- package/src/domain/shopping/repositories/recurrence/shopping-recurrence.repository.d.ts +9 -0
- package/src/domain/shopping/types/checkout-paylod-request.type.d.ts +2 -0
- package/src/domain/shopping/types/create-recurrency-payload.type.d.ts +4 -0
- package/src/domain/shopping/types/index.d.ts +1 -0
- package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +2 -0
- package/src/infra/firebase/firestore/repositories/shopping/shopping-recurrence-edition-firestore.repository.d.ts +7 -0
- package/src/infra/firebase/firestore/repositories/shopping/shopping-recurrence-firestore.repository.d.ts +10 -0
package/index.cjs.js
CHANGED
|
@@ -715,6 +715,8 @@ exports.Shops = void 0;
|
|
|
715
715
|
Shops["MENSMARKET"] = "mensmarket";
|
|
716
716
|
Shops["GLAMSHOP"] = "Glamshop";
|
|
717
717
|
Shops["GLAMPOINTS"] = "Glampoints";
|
|
718
|
+
Shops["GLAMBEAUTY"] = "Glambeauty";
|
|
719
|
+
Shops["ELLA"] = "ella";
|
|
718
720
|
Shops["ALL"] = "ALL";
|
|
719
721
|
})(exports.Shops || (exports.Shops = {}));
|
|
720
722
|
|
|
@@ -1694,6 +1696,22 @@ exports.OrderStatus = void 0;
|
|
|
1694
1696
|
OrderStatus["AGUARDANDO_STOCK_REENVIO"] = "Aguardando stock para reenvio";
|
|
1695
1697
|
})(exports.OrderStatus || (exports.OrderStatus = {}));
|
|
1696
1698
|
|
|
1699
|
+
exports.ShoppingRecurrenceCycle = void 0;
|
|
1700
|
+
(function (ShoppingRecurrenceCycle) {
|
|
1701
|
+
ShoppingRecurrenceCycle[ShoppingRecurrenceCycle["MONTHLY"] = 1] = "MONTHLY";
|
|
1702
|
+
ShoppingRecurrenceCycle[ShoppingRecurrenceCycle["BIMONTHLY"] = 2] = "BIMONTHLY";
|
|
1703
|
+
ShoppingRecurrenceCycle[ShoppingRecurrenceCycle["QUARTERLY"] = 3] = "QUARTERLY";
|
|
1704
|
+
})(exports.ShoppingRecurrenceCycle || (exports.ShoppingRecurrenceCycle = {}));
|
|
1705
|
+
|
|
1706
|
+
exports.ShoppingRecurrenceStatus = void 0;
|
|
1707
|
+
(function (ShoppingRecurrenceStatus) {
|
|
1708
|
+
ShoppingRecurrenceStatus["ACTIVE"] = "active";
|
|
1709
|
+
ShoppingRecurrenceStatus["PAUSED"] = "paused";
|
|
1710
|
+
ShoppingRecurrenceStatus["CANCELLED"] = "cancelled";
|
|
1711
|
+
ShoppingRecurrenceStatus["PAYMENT_FAILED"] = "payment_failed";
|
|
1712
|
+
ShoppingRecurrenceStatus["WAITING_STOCK"] = "waiting_stock";
|
|
1713
|
+
})(exports.ShoppingRecurrenceStatus || (exports.ShoppingRecurrenceStatus = {}));
|
|
1714
|
+
|
|
1697
1715
|
class Order extends Checkout {
|
|
1698
1716
|
}
|
|
1699
1717
|
tslib.__decorate([
|
|
@@ -1707,6 +1725,38 @@ class OrderBlocked extends BaseModel {
|
|
|
1707
1725
|
}
|
|
1708
1726
|
}
|
|
1709
1727
|
|
|
1728
|
+
class ShoppingRecurrence extends BaseModel {
|
|
1729
|
+
static get identifiersFields() {
|
|
1730
|
+
return ['id'];
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
tslib.__decorate([
|
|
1734
|
+
classTransformer.Type(() => User),
|
|
1735
|
+
tslib.__metadata("design:type", User)
|
|
1736
|
+
], ShoppingRecurrence.prototype, "user", void 0);
|
|
1737
|
+
tslib.__decorate([
|
|
1738
|
+
classTransformer.Type(() => UserAddress),
|
|
1739
|
+
tslib.__metadata("design:type", UserAddress)
|
|
1740
|
+
], ShoppingRecurrence.prototype, "shippingAddress", void 0);
|
|
1741
|
+
tslib.__decorate([
|
|
1742
|
+
classTransformer.Type(() => UserAddress),
|
|
1743
|
+
tslib.__metadata("design:type", UserAddress)
|
|
1744
|
+
], ShoppingRecurrence.prototype, "billingAddress", void 0);
|
|
1745
|
+
tslib.__decorate([
|
|
1746
|
+
classTransformer.Type(() => ShippingMethod),
|
|
1747
|
+
tslib.__metadata("design:type", ShippingMethod)
|
|
1748
|
+
], ShoppingRecurrence.prototype, "shipping", void 0);
|
|
1749
|
+
tslib.__decorate([
|
|
1750
|
+
classTransformer.Type(() => Coupon),
|
|
1751
|
+
tslib.__metadata("design:type", Coupon)
|
|
1752
|
+
], ShoppingRecurrence.prototype, "coupon", void 0);
|
|
1753
|
+
|
|
1754
|
+
class ShoppingRecurrenceEdition extends BaseModel {
|
|
1755
|
+
static get identifiersFields() {
|
|
1756
|
+
return ['id'];
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1710
1760
|
class CheckoutSubscription extends BaseModel {
|
|
1711
1761
|
static get identifiersFields() {
|
|
1712
1762
|
return ['id'];
|
|
@@ -5507,6 +5557,62 @@ class PaymentFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
5507
5557
|
}
|
|
5508
5558
|
}
|
|
5509
5559
|
|
|
5560
|
+
class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5561
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5562
|
+
super({
|
|
5563
|
+
firestore,
|
|
5564
|
+
collectionName: 'shopping_recurrence_editions',
|
|
5565
|
+
model: ShoppingRecurrenceEdition,
|
|
5566
|
+
interceptors,
|
|
5567
|
+
cache,
|
|
5568
|
+
});
|
|
5569
|
+
}
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5572
|
+
class ShoppingRecurrenceFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5573
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5574
|
+
super({
|
|
5575
|
+
firestore,
|
|
5576
|
+
collectionName: 'shopping_recurrences',
|
|
5577
|
+
model: ShoppingRecurrence,
|
|
5578
|
+
interceptors,
|
|
5579
|
+
cache,
|
|
5580
|
+
});
|
|
5581
|
+
}
|
|
5582
|
+
async findByUserId(userId) {
|
|
5583
|
+
const result = await this.find({
|
|
5584
|
+
filters: {
|
|
5585
|
+
user: {
|
|
5586
|
+
id: userId,
|
|
5587
|
+
},
|
|
5588
|
+
},
|
|
5589
|
+
});
|
|
5590
|
+
return result.data;
|
|
5591
|
+
}
|
|
5592
|
+
async findByUserIdAndStatus(userId, status) {
|
|
5593
|
+
const result = await this.find({
|
|
5594
|
+
filters: {
|
|
5595
|
+
user: {
|
|
5596
|
+
id: userId,
|
|
5597
|
+
},
|
|
5598
|
+
status,
|
|
5599
|
+
},
|
|
5600
|
+
});
|
|
5601
|
+
return result.data;
|
|
5602
|
+
}
|
|
5603
|
+
async findByUserAndShop(userId, shop) {
|
|
5604
|
+
const result = await this.find({
|
|
5605
|
+
filters: {
|
|
5606
|
+
user: {
|
|
5607
|
+
id: userId,
|
|
5608
|
+
},
|
|
5609
|
+
shop,
|
|
5610
|
+
},
|
|
5611
|
+
});
|
|
5612
|
+
return result.data;
|
|
5613
|
+
}
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5510
5616
|
class SubscriptionPlanFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5511
5617
|
constructor({ firestore, interceptors, cache, }) {
|
|
5512
5618
|
super({
|
|
@@ -11632,6 +11738,10 @@ exports.ShopMenu = ShopMenu;
|
|
|
11632
11738
|
exports.ShopMenuFirestoreRepository = ShopMenuFirestoreRepository;
|
|
11633
11739
|
exports.ShopSettings = ShopSettings;
|
|
11634
11740
|
exports.ShopSettingsFirestoreRepository = ShopSettingsFirestoreRepository;
|
|
11741
|
+
exports.ShoppingRecurrence = ShoppingRecurrence;
|
|
11742
|
+
exports.ShoppingRecurrenceEdition = ShoppingRecurrenceEdition;
|
|
11743
|
+
exports.ShoppingRecurrenceEditionFirestoreRepository = ShoppingRecurrenceEditionFirestoreRepository;
|
|
11744
|
+
exports.ShoppingRecurrenceFirestoreRepository = ShoppingRecurrenceFirestoreRepository;
|
|
11635
11745
|
exports.SignOut = SignOut;
|
|
11636
11746
|
exports.StockLimitError = StockLimitError;
|
|
11637
11747
|
exports.StockOutError = StockOutError;
|
package/index.esm.js
CHANGED
|
@@ -691,6 +691,8 @@ var Shops;
|
|
|
691
691
|
Shops["MENSMARKET"] = "mensmarket";
|
|
692
692
|
Shops["GLAMSHOP"] = "Glamshop";
|
|
693
693
|
Shops["GLAMPOINTS"] = "Glampoints";
|
|
694
|
+
Shops["GLAMBEAUTY"] = "Glambeauty";
|
|
695
|
+
Shops["ELLA"] = "ella";
|
|
694
696
|
Shops["ALL"] = "ALL";
|
|
695
697
|
})(Shops || (Shops = {}));
|
|
696
698
|
|
|
@@ -1670,6 +1672,22 @@ var OrderStatus;
|
|
|
1670
1672
|
OrderStatus["AGUARDANDO_STOCK_REENVIO"] = "Aguardando stock para reenvio";
|
|
1671
1673
|
})(OrderStatus || (OrderStatus = {}));
|
|
1672
1674
|
|
|
1675
|
+
var ShoppingRecurrenceCycle;
|
|
1676
|
+
(function (ShoppingRecurrenceCycle) {
|
|
1677
|
+
ShoppingRecurrenceCycle[ShoppingRecurrenceCycle["MONTHLY"] = 1] = "MONTHLY";
|
|
1678
|
+
ShoppingRecurrenceCycle[ShoppingRecurrenceCycle["BIMONTHLY"] = 2] = "BIMONTHLY";
|
|
1679
|
+
ShoppingRecurrenceCycle[ShoppingRecurrenceCycle["QUARTERLY"] = 3] = "QUARTERLY";
|
|
1680
|
+
})(ShoppingRecurrenceCycle || (ShoppingRecurrenceCycle = {}));
|
|
1681
|
+
|
|
1682
|
+
var ShoppingRecurrenceStatus;
|
|
1683
|
+
(function (ShoppingRecurrenceStatus) {
|
|
1684
|
+
ShoppingRecurrenceStatus["ACTIVE"] = "active";
|
|
1685
|
+
ShoppingRecurrenceStatus["PAUSED"] = "paused";
|
|
1686
|
+
ShoppingRecurrenceStatus["CANCELLED"] = "cancelled";
|
|
1687
|
+
ShoppingRecurrenceStatus["PAYMENT_FAILED"] = "payment_failed";
|
|
1688
|
+
ShoppingRecurrenceStatus["WAITING_STOCK"] = "waiting_stock";
|
|
1689
|
+
})(ShoppingRecurrenceStatus || (ShoppingRecurrenceStatus = {}));
|
|
1690
|
+
|
|
1673
1691
|
class Order extends Checkout {
|
|
1674
1692
|
}
|
|
1675
1693
|
__decorate([
|
|
@@ -1683,6 +1701,38 @@ class OrderBlocked extends BaseModel {
|
|
|
1683
1701
|
}
|
|
1684
1702
|
}
|
|
1685
1703
|
|
|
1704
|
+
class ShoppingRecurrence extends BaseModel {
|
|
1705
|
+
static get identifiersFields() {
|
|
1706
|
+
return ['id'];
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
__decorate([
|
|
1710
|
+
Type(() => User),
|
|
1711
|
+
__metadata("design:type", User)
|
|
1712
|
+
], ShoppingRecurrence.prototype, "user", void 0);
|
|
1713
|
+
__decorate([
|
|
1714
|
+
Type(() => UserAddress),
|
|
1715
|
+
__metadata("design:type", UserAddress)
|
|
1716
|
+
], ShoppingRecurrence.prototype, "shippingAddress", void 0);
|
|
1717
|
+
__decorate([
|
|
1718
|
+
Type(() => UserAddress),
|
|
1719
|
+
__metadata("design:type", UserAddress)
|
|
1720
|
+
], ShoppingRecurrence.prototype, "billingAddress", void 0);
|
|
1721
|
+
__decorate([
|
|
1722
|
+
Type(() => ShippingMethod),
|
|
1723
|
+
__metadata("design:type", ShippingMethod)
|
|
1724
|
+
], ShoppingRecurrence.prototype, "shipping", void 0);
|
|
1725
|
+
__decorate([
|
|
1726
|
+
Type(() => Coupon),
|
|
1727
|
+
__metadata("design:type", Coupon)
|
|
1728
|
+
], ShoppingRecurrence.prototype, "coupon", void 0);
|
|
1729
|
+
|
|
1730
|
+
class ShoppingRecurrenceEdition extends BaseModel {
|
|
1731
|
+
static get identifiersFields() {
|
|
1732
|
+
return ['id'];
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1686
1736
|
class CheckoutSubscription extends BaseModel {
|
|
1687
1737
|
static get identifiersFields() {
|
|
1688
1738
|
return ['id'];
|
|
@@ -5483,6 +5533,62 @@ class PaymentFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
5483
5533
|
}
|
|
5484
5534
|
}
|
|
5485
5535
|
|
|
5536
|
+
class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5537
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5538
|
+
super({
|
|
5539
|
+
firestore,
|
|
5540
|
+
collectionName: 'shopping_recurrence_editions',
|
|
5541
|
+
model: ShoppingRecurrenceEdition,
|
|
5542
|
+
interceptors,
|
|
5543
|
+
cache,
|
|
5544
|
+
});
|
|
5545
|
+
}
|
|
5546
|
+
}
|
|
5547
|
+
|
|
5548
|
+
class ShoppingRecurrenceFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5549
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5550
|
+
super({
|
|
5551
|
+
firestore,
|
|
5552
|
+
collectionName: 'shopping_recurrences',
|
|
5553
|
+
model: ShoppingRecurrence,
|
|
5554
|
+
interceptors,
|
|
5555
|
+
cache,
|
|
5556
|
+
});
|
|
5557
|
+
}
|
|
5558
|
+
async findByUserId(userId) {
|
|
5559
|
+
const result = await this.find({
|
|
5560
|
+
filters: {
|
|
5561
|
+
user: {
|
|
5562
|
+
id: userId,
|
|
5563
|
+
},
|
|
5564
|
+
},
|
|
5565
|
+
});
|
|
5566
|
+
return result.data;
|
|
5567
|
+
}
|
|
5568
|
+
async findByUserIdAndStatus(userId, status) {
|
|
5569
|
+
const result = await this.find({
|
|
5570
|
+
filters: {
|
|
5571
|
+
user: {
|
|
5572
|
+
id: userId,
|
|
5573
|
+
},
|
|
5574
|
+
status,
|
|
5575
|
+
},
|
|
5576
|
+
});
|
|
5577
|
+
return result.data;
|
|
5578
|
+
}
|
|
5579
|
+
async findByUserAndShop(userId, shop) {
|
|
5580
|
+
const result = await this.find({
|
|
5581
|
+
filters: {
|
|
5582
|
+
user: {
|
|
5583
|
+
id: userId,
|
|
5584
|
+
},
|
|
5585
|
+
shop,
|
|
5586
|
+
},
|
|
5587
|
+
});
|
|
5588
|
+
return result.data;
|
|
5589
|
+
}
|
|
5590
|
+
}
|
|
5591
|
+
|
|
5486
5592
|
class SubscriptionPlanFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5487
5593
|
constructor({ firestore, interceptors, cache, }) {
|
|
5488
5594
|
super({
|
|
@@ -11339,4 +11445,4 @@ class ProductsVertexSearch {
|
|
|
11339
11445
|
}
|
|
11340
11446
|
}
|
|
11341
11447
|
|
|
11342
|
-
export { AccessoryImportances, Address, AdyenCardAxiosAdapter, AdyenPaymentMethodFactory, AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService, AntifraudProviderFactory, AntifraudProviders, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, BrandCategory, BrandCategoryFirestoreRepository, BrandEquityOptions, BusinessError, BusinessUnitEnum, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, CategoryProduct, CategoryProductHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponCategories, CouponCategory, CouponChannels, CouponFirestoreRepository, CouponOldCategories, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, ErrorsCode, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, FraudValidationError, GenderDestination, GlampointsPaymentMethodFactory, GlampointsPaymentService, Group, GroupFirestoreRepository, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, InvalidCheckoutError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoErrorHelper, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, MercadoPagoStatusDetailEnum, MercadoPagoStatusEnum, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, OrderPaymentStatus, OrderStatus, PagarMeV5OrderStatus, PagarMeV5PaymentStatus, PagarmeBankSlipAxiosAdapter, PagarmeCardAxiosAdapter, PagarmePaymentMethodFactory, PagarmePaymentStatus, PagarmePixAxiosAdapter, PagarmeV5BankSlipAxiosAdapter, PagarmeV5BaseAxiosAdapter, PagarmeV5CardAxiosAdapter, PagarmeV5PixAxiosAdapter, Payment, PaymentError, PaymentFirestoreRepository, PaymentMethods, PaymentProviderFactory, PaymentProviders, PaymentTransaction, PaymentType, PersonTypes, Plans, Product, ProductCatalogHasuraGraphQL, ProductCatalogHasuraGraphQLRepository, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductGroup, ProductGroupHasuraGraphQLRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductPriceLog, ProductPriceLogHasuraGraphQLRepository, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockEntry, ProductStockEntryHasuraGraphQL, ProductStockEntryHasuraGraphQLRepository, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, ShopConfigs, ShopConfigsFirestoreRepository, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, StockLimitError, StockOutError, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, TransactionPaymentMethods, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, VertexAxiosAdapter, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, WishlistLogType, deserialize, getClass, is, isDebuggable, isUUID, parseDateTime, registerClass, resolveClass, serialize, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
|
11448
|
+
export { AccessoryImportances, Address, AdyenCardAxiosAdapter, AdyenPaymentMethodFactory, AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService, AntifraudProviderFactory, AntifraudProviders, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, BrandCategory, BrandCategoryFirestoreRepository, BrandEquityOptions, BusinessError, BusinessUnitEnum, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, CategoryProduct, CategoryProductHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponCategories, CouponCategory, CouponChannels, CouponFirestoreRepository, CouponOldCategories, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, ErrorsCode, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, FraudValidationError, GenderDestination, GlampointsPaymentMethodFactory, GlampointsPaymentService, Group, GroupFirestoreRepository, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, InvalidCheckoutError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoErrorHelper, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, MercadoPagoStatusDetailEnum, MercadoPagoStatusEnum, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, OrderPaymentStatus, OrderStatus, PagarMeV5OrderStatus, PagarMeV5PaymentStatus, PagarmeBankSlipAxiosAdapter, PagarmeCardAxiosAdapter, PagarmePaymentMethodFactory, PagarmePaymentStatus, PagarmePixAxiosAdapter, PagarmeV5BankSlipAxiosAdapter, PagarmeV5BaseAxiosAdapter, PagarmeV5CardAxiosAdapter, PagarmeV5PixAxiosAdapter, Payment, PaymentError, PaymentFirestoreRepository, PaymentMethods, PaymentProviderFactory, PaymentProviders, PaymentTransaction, PaymentType, PersonTypes, Plans, Product, ProductCatalogHasuraGraphQL, ProductCatalogHasuraGraphQLRepository, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductGroup, ProductGroupHasuraGraphQLRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductPriceLog, ProductPriceLogHasuraGraphQLRepository, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockEntry, ProductStockEntryHasuraGraphQL, ProductStockEntryHasuraGraphQLRepository, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, ShopConfigs, ShopConfigsFirestoreRepository, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, ShoppingRecurrence, ShoppingRecurrenceCycle, ShoppingRecurrenceEdition, ShoppingRecurrenceEditionFirestoreRepository, ShoppingRecurrenceFirestoreRepository, ShoppingRecurrenceStatus, 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,9 @@
|
|
|
1
|
+
export declare enum ShoppingRecurrenceExecutionStatus {
|
|
2
|
+
SCHEDULED = "scheduled",
|
|
3
|
+
PROCESSING = "processing",
|
|
4
|
+
FINISHED = "finished",
|
|
5
|
+
PAYMENT_FAIL = "payment_fail",
|
|
6
|
+
AWAITING_PAYMENT = "awaiting_payment",
|
|
7
|
+
STOCK_VALIDATION = "stock_validation",
|
|
8
|
+
CANCELLED = "cancelled"
|
|
9
|
+
}
|
|
@@ -9,6 +9,7 @@ export * from './order';
|
|
|
9
9
|
export * from './order-blocked';
|
|
10
10
|
export * from './payment';
|
|
11
11
|
export * from './payment-transaction';
|
|
12
|
+
export * from './recurrence';
|
|
12
13
|
export * from './shipping-method';
|
|
13
14
|
export * from './subscription';
|
|
14
15
|
export * from './types';
|
|
@@ -16,6 +16,9 @@ export declare class Order extends Checkout {
|
|
|
16
16
|
reshipmentOrderId?: string;
|
|
17
17
|
isChange?: boolean;
|
|
18
18
|
isReshipment?: boolean;
|
|
19
|
+
isRecurrenceOrder?: boolean;
|
|
20
|
+
recurrenceId?: string;
|
|
21
|
+
recurrenceExecutionId?: string;
|
|
19
22
|
metadata?: {
|
|
20
23
|
ip?: string;
|
|
21
24
|
userAgent?: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
2
|
+
import { ShoppingRecurrenceExecutionStatus } from '../enums/shopping-recurrence-execution-status.enum';
|
|
3
|
+
export declare class ShoppingRecurrenceEdition extends BaseModel<ShoppingRecurrenceEdition> {
|
|
4
|
+
id: string;
|
|
5
|
+
recurrenceId: string;
|
|
6
|
+
scheduledDate: Date;
|
|
7
|
+
nextScheduledDate?: Date;
|
|
8
|
+
status: ShoppingRecurrenceExecutionStatus;
|
|
9
|
+
errorCode?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
orderId?: string;
|
|
12
|
+
paymentId?: string;
|
|
13
|
+
processedAt?: Date;
|
|
14
|
+
failedAttempts?: number;
|
|
15
|
+
createdAt?: Date;
|
|
16
|
+
updatedAt?: Date;
|
|
17
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Shops } from '../../../catalog/models/enums/shops.enum';
|
|
2
|
+
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
3
|
+
import { User, UserAddress } from '../../../users';
|
|
4
|
+
import { PaymentMethod } from '../../types';
|
|
5
|
+
import { PaymentProvider } from '../../types/payment-provider.type';
|
|
6
|
+
import { Coupon } from '../coupons/coupon';
|
|
7
|
+
import { ShoppingRecurrenceCycle } from '../enums/shopping-recurrence-cycle.enum';
|
|
8
|
+
import { ShoppingRecurrenceStatus } from '../enums/shopping-recurrence-status.enum';
|
|
9
|
+
import { ShippingMethod } from '../shipping-method';
|
|
10
|
+
import { LineItemRecurrence } from '../types';
|
|
11
|
+
export declare class ShoppingRecurrence extends BaseModel<ShoppingRecurrence> {
|
|
12
|
+
id: string;
|
|
13
|
+
shop: Shops;
|
|
14
|
+
active: boolean;
|
|
15
|
+
status: ShoppingRecurrenceStatus;
|
|
16
|
+
recurrenceCycle: ShoppingRecurrenceCycle;
|
|
17
|
+
nextChargeDate: Date;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
cancelledAt?: Date;
|
|
21
|
+
shippingPrice: number;
|
|
22
|
+
subTotalPrice: number;
|
|
23
|
+
discount?: number;
|
|
24
|
+
totalPrice: number;
|
|
25
|
+
paymentMethod: PaymentMethod;
|
|
26
|
+
cards: Array<{
|
|
27
|
+
paymentProvider: PaymentProvider;
|
|
28
|
+
cardId: string;
|
|
29
|
+
}>;
|
|
30
|
+
originalOrderId: string;
|
|
31
|
+
lastOrderId?: string;
|
|
32
|
+
user: User;
|
|
33
|
+
lineItems: LineItemRecurrence[];
|
|
34
|
+
shippingAddress: UserAddress;
|
|
35
|
+
billingAddress?: UserAddress;
|
|
36
|
+
shipping: ShippingMethod;
|
|
37
|
+
coupon?: Coupon;
|
|
38
|
+
history?: Array<{
|
|
39
|
+
active: boolean;
|
|
40
|
+
status: ShoppingRecurrenceStatus;
|
|
41
|
+
date: Date;
|
|
42
|
+
description?: string;
|
|
43
|
+
}>;
|
|
44
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
45
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Shops } from '../../../catalog';
|
|
2
|
+
import { CrudRepository } from '../../../generic/repository/crud.repository';
|
|
3
|
+
import { ShoppingRecurrenceStatus } from '../../models';
|
|
4
|
+
import { ShoppingRecurrence } from '../../models/recurrence/shopping-recurrence';
|
|
5
|
+
export interface ShoppingRecurrenceRepository extends CrudRepository<ShoppingRecurrence> {
|
|
6
|
+
findByUserId(userId: string): Promise<ShoppingRecurrence[]>;
|
|
7
|
+
findByUserIdAndStatus(userId: string, status: ShoppingRecurrenceStatus): Promise<ShoppingRecurrence[]>;
|
|
8
|
+
findByUserAndShop(userId: string, shop: Shops): Promise<ShoppingRecurrence[]>;
|
|
9
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CreateRecurrencyPayload } from './create-recurrency-payload.type';
|
|
1
2
|
import { PaymentCardInfo } from './payment-card-info.type';
|
|
2
3
|
export type CheckoutPayloadRequest = {
|
|
3
4
|
checkoutId: string;
|
|
@@ -7,4 +8,5 @@ export type CheckoutPayloadRequest = {
|
|
|
7
8
|
boleto?: boolean;
|
|
8
9
|
pix?: boolean;
|
|
9
10
|
applicationVersion?: string;
|
|
11
|
+
createRecurrency?: CreateRecurrencyPayload;
|
|
10
12
|
};
|
|
@@ -4,6 +4,7 @@ export * from './antifraud-provider.type';
|
|
|
4
4
|
export * from './card-info.type';
|
|
5
5
|
export * from './checkout-paylod-request.type';
|
|
6
6
|
export * from './checkout-response.type';
|
|
7
|
+
export * from './create-recurrency-payload.type';
|
|
7
8
|
export * from './checkout-stock-validation.type';
|
|
8
9
|
export * from './glam-credentials.type';
|
|
9
10
|
export * from './mercado-pago-card.type';
|
|
@@ -8,4 +8,6 @@ export * from './legacy-order-firestore.repository';
|
|
|
8
8
|
export * from './order-blocked-firestore.repository';
|
|
9
9
|
export * from './order-firestore.repository';
|
|
10
10
|
export * from './payment-firestore.repository';
|
|
11
|
+
export * from './shopping-recurrence-edition-firestore.repository';
|
|
12
|
+
export * from './shopping-recurrence-firestore.repository';
|
|
11
13
|
export * from './subscription-plan-firestore.repository';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ShoppingRecurrenceEdition, ShoppingRecurrenceEditionRepository } from '../../../../../domain';
|
|
2
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
+
declare const ShoppingRecurrenceEditionFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<ShoppingRecurrenceEdition> & import("../../../../../domain").CrudRepository<ShoppingRecurrenceEdition, import("../../../../../domain").CrudParams<ShoppingRecurrenceEdition>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<ShoppingRecurrenceEdition>, ...any[]]>;
|
|
4
|
+
export declare class ShoppingRecurrenceEditionFirestoreRepository extends ShoppingRecurrenceEditionFirestoreRepository_base implements ShoppingRecurrenceEditionRepository {
|
|
5
|
+
constructor({ firestore, interceptors, cache, }: Pick<FirestoreConstructorParams<ShoppingRecurrenceEdition>, 'firestore' | 'interceptors' | 'cache'>);
|
|
6
|
+
}
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShoppingRecurrence, ShoppingRecurrenceRepository, ShoppingRecurrenceStatus, Shops } from '../../../../../domain';
|
|
2
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
+
declare const ShoppingRecurrenceFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<ShoppingRecurrence> & import("../../../../../domain").CrudRepository<ShoppingRecurrence, import("../../../../../domain").CrudParams<ShoppingRecurrence>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<ShoppingRecurrence>, ...any[]]>;
|
|
4
|
+
export declare class ShoppingRecurrenceFirestoreRepository extends ShoppingRecurrenceFirestoreRepository_base implements ShoppingRecurrenceRepository {
|
|
5
|
+
constructor({ firestore, interceptors, cache, }: Pick<FirestoreConstructorParams<ShoppingRecurrence>, 'firestore' | 'interceptors' | 'cache'>);
|
|
6
|
+
findByUserId(userId: string): Promise<ShoppingRecurrence[]>;
|
|
7
|
+
findByUserIdAndStatus(userId: string, status: ShoppingRecurrenceStatus): Promise<ShoppingRecurrence[]>;
|
|
8
|
+
findByUserAndShop(userId: string, shop: Shops): Promise<ShoppingRecurrence[]>;
|
|
9
|
+
}
|
|
10
|
+
export {};
|