@infrab4a/connect 5.6.5 → 5.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +121 -0
- package/index.esm.js +118 -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 +3 -0
- package/src/domain/shopping/models/enums/shopping-recurrence-cycle.enum.d.ts +5 -0
- package/src/domain/shopping/models/enums/shopping-recurrence-edition-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/create-recurrency-payload.type.d.ts +8 -0
- package/src/domain/shopping/types/index.d.ts +1 -0
- package/src/domain/shopping/types/payment-card-info.type.d.ts +5 -3
- 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,33 @@ 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.ShoppingRecurrenceEditionStatus = void 0;
|
|
1707
|
+
(function (ShoppingRecurrenceEditionStatus) {
|
|
1708
|
+
ShoppingRecurrenceEditionStatus["SCHEDULED"] = "scheduled";
|
|
1709
|
+
ShoppingRecurrenceEditionStatus["PROCESSING"] = "processing";
|
|
1710
|
+
ShoppingRecurrenceEditionStatus["FINISHED"] = "finished";
|
|
1711
|
+
ShoppingRecurrenceEditionStatus["PAYMENT_FAIL"] = "payment_fail";
|
|
1712
|
+
ShoppingRecurrenceEditionStatus["AWAITING_PAYMENT"] = "awaiting_payment";
|
|
1713
|
+
ShoppingRecurrenceEditionStatus["STOCK_VALIDATION"] = "stock_validation";
|
|
1714
|
+
ShoppingRecurrenceEditionStatus["CANCELLED"] = "cancelled";
|
|
1715
|
+
})(exports.ShoppingRecurrenceEditionStatus || (exports.ShoppingRecurrenceEditionStatus = {}));
|
|
1716
|
+
|
|
1717
|
+
exports.ShoppingRecurrenceStatus = void 0;
|
|
1718
|
+
(function (ShoppingRecurrenceStatus) {
|
|
1719
|
+
ShoppingRecurrenceStatus["ACTIVE"] = "active";
|
|
1720
|
+
ShoppingRecurrenceStatus["PAUSED"] = "paused";
|
|
1721
|
+
ShoppingRecurrenceStatus["CANCELLED"] = "cancelled";
|
|
1722
|
+
ShoppingRecurrenceStatus["PAYMENT_FAILED"] = "payment_failed";
|
|
1723
|
+
ShoppingRecurrenceStatus["WAITING_STOCK"] = "waiting_stock";
|
|
1724
|
+
})(exports.ShoppingRecurrenceStatus || (exports.ShoppingRecurrenceStatus = {}));
|
|
1725
|
+
|
|
1697
1726
|
class Order extends Checkout {
|
|
1698
1727
|
}
|
|
1699
1728
|
tslib.__decorate([
|
|
@@ -1707,6 +1736,38 @@ class OrderBlocked extends BaseModel {
|
|
|
1707
1736
|
}
|
|
1708
1737
|
}
|
|
1709
1738
|
|
|
1739
|
+
class ShoppingRecurrence extends BaseModel {
|
|
1740
|
+
static get identifiersFields() {
|
|
1741
|
+
return ['id'];
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
tslib.__decorate([
|
|
1745
|
+
classTransformer.Type(() => User),
|
|
1746
|
+
tslib.__metadata("design:type", User)
|
|
1747
|
+
], ShoppingRecurrence.prototype, "user", void 0);
|
|
1748
|
+
tslib.__decorate([
|
|
1749
|
+
classTransformer.Type(() => UserAddress),
|
|
1750
|
+
tslib.__metadata("design:type", UserAddress)
|
|
1751
|
+
], ShoppingRecurrence.prototype, "shippingAddress", void 0);
|
|
1752
|
+
tslib.__decorate([
|
|
1753
|
+
classTransformer.Type(() => UserAddress),
|
|
1754
|
+
tslib.__metadata("design:type", UserAddress)
|
|
1755
|
+
], ShoppingRecurrence.prototype, "billingAddress", void 0);
|
|
1756
|
+
tslib.__decorate([
|
|
1757
|
+
classTransformer.Type(() => ShippingMethod),
|
|
1758
|
+
tslib.__metadata("design:type", ShippingMethod)
|
|
1759
|
+
], ShoppingRecurrence.prototype, "shipping", void 0);
|
|
1760
|
+
tslib.__decorate([
|
|
1761
|
+
classTransformer.Type(() => Coupon),
|
|
1762
|
+
tslib.__metadata("design:type", Coupon)
|
|
1763
|
+
], ShoppingRecurrence.prototype, "coupon", void 0);
|
|
1764
|
+
|
|
1765
|
+
class ShoppingRecurrenceEdition extends BaseModel {
|
|
1766
|
+
static get identifiersFields() {
|
|
1767
|
+
return ['id'];
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1710
1771
|
class CheckoutSubscription extends BaseModel {
|
|
1711
1772
|
static get identifiersFields() {
|
|
1712
1773
|
return ['id'];
|
|
@@ -5507,6 +5568,62 @@ class PaymentFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
5507
5568
|
}
|
|
5508
5569
|
}
|
|
5509
5570
|
|
|
5571
|
+
class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5572
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5573
|
+
super({
|
|
5574
|
+
firestore,
|
|
5575
|
+
collectionName: 'shoppingRecurrenceEditions',
|
|
5576
|
+
model: ShoppingRecurrenceEdition,
|
|
5577
|
+
interceptors,
|
|
5578
|
+
cache,
|
|
5579
|
+
});
|
|
5580
|
+
}
|
|
5581
|
+
}
|
|
5582
|
+
|
|
5583
|
+
class ShoppingRecurrenceFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5584
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5585
|
+
super({
|
|
5586
|
+
firestore,
|
|
5587
|
+
collectionName: 'shoppingRecurrences',
|
|
5588
|
+
model: ShoppingRecurrence,
|
|
5589
|
+
interceptors,
|
|
5590
|
+
cache,
|
|
5591
|
+
});
|
|
5592
|
+
}
|
|
5593
|
+
async findByUserId(userId) {
|
|
5594
|
+
const result = await this.find({
|
|
5595
|
+
filters: {
|
|
5596
|
+
user: {
|
|
5597
|
+
id: userId,
|
|
5598
|
+
},
|
|
5599
|
+
},
|
|
5600
|
+
});
|
|
5601
|
+
return result.data;
|
|
5602
|
+
}
|
|
5603
|
+
async findByUserIdAndStatus(userId, status) {
|
|
5604
|
+
const result = await this.find({
|
|
5605
|
+
filters: {
|
|
5606
|
+
user: {
|
|
5607
|
+
id: userId,
|
|
5608
|
+
},
|
|
5609
|
+
status,
|
|
5610
|
+
},
|
|
5611
|
+
});
|
|
5612
|
+
return result.data;
|
|
5613
|
+
}
|
|
5614
|
+
async findByUserAndShop(userId, shop) {
|
|
5615
|
+
const result = await this.find({
|
|
5616
|
+
filters: {
|
|
5617
|
+
user: {
|
|
5618
|
+
id: userId,
|
|
5619
|
+
},
|
|
5620
|
+
shop,
|
|
5621
|
+
},
|
|
5622
|
+
});
|
|
5623
|
+
return result.data;
|
|
5624
|
+
}
|
|
5625
|
+
}
|
|
5626
|
+
|
|
5510
5627
|
class SubscriptionPlanFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5511
5628
|
constructor({ firestore, interceptors, cache, }) {
|
|
5512
5629
|
super({
|
|
@@ -11632,6 +11749,10 @@ exports.ShopMenu = ShopMenu;
|
|
|
11632
11749
|
exports.ShopMenuFirestoreRepository = ShopMenuFirestoreRepository;
|
|
11633
11750
|
exports.ShopSettings = ShopSettings;
|
|
11634
11751
|
exports.ShopSettingsFirestoreRepository = ShopSettingsFirestoreRepository;
|
|
11752
|
+
exports.ShoppingRecurrence = ShoppingRecurrence;
|
|
11753
|
+
exports.ShoppingRecurrenceEdition = ShoppingRecurrenceEdition;
|
|
11754
|
+
exports.ShoppingRecurrenceEditionFirestoreRepository = ShoppingRecurrenceEditionFirestoreRepository;
|
|
11755
|
+
exports.ShoppingRecurrenceFirestoreRepository = ShoppingRecurrenceFirestoreRepository;
|
|
11635
11756
|
exports.SignOut = SignOut;
|
|
11636
11757
|
exports.StockLimitError = StockLimitError;
|
|
11637
11758
|
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,33 @@ 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 ShoppingRecurrenceEditionStatus;
|
|
1683
|
+
(function (ShoppingRecurrenceEditionStatus) {
|
|
1684
|
+
ShoppingRecurrenceEditionStatus["SCHEDULED"] = "scheduled";
|
|
1685
|
+
ShoppingRecurrenceEditionStatus["PROCESSING"] = "processing";
|
|
1686
|
+
ShoppingRecurrenceEditionStatus["FINISHED"] = "finished";
|
|
1687
|
+
ShoppingRecurrenceEditionStatus["PAYMENT_FAIL"] = "payment_fail";
|
|
1688
|
+
ShoppingRecurrenceEditionStatus["AWAITING_PAYMENT"] = "awaiting_payment";
|
|
1689
|
+
ShoppingRecurrenceEditionStatus["STOCK_VALIDATION"] = "stock_validation";
|
|
1690
|
+
ShoppingRecurrenceEditionStatus["CANCELLED"] = "cancelled";
|
|
1691
|
+
})(ShoppingRecurrenceEditionStatus || (ShoppingRecurrenceEditionStatus = {}));
|
|
1692
|
+
|
|
1693
|
+
var ShoppingRecurrenceStatus;
|
|
1694
|
+
(function (ShoppingRecurrenceStatus) {
|
|
1695
|
+
ShoppingRecurrenceStatus["ACTIVE"] = "active";
|
|
1696
|
+
ShoppingRecurrenceStatus["PAUSED"] = "paused";
|
|
1697
|
+
ShoppingRecurrenceStatus["CANCELLED"] = "cancelled";
|
|
1698
|
+
ShoppingRecurrenceStatus["PAYMENT_FAILED"] = "payment_failed";
|
|
1699
|
+
ShoppingRecurrenceStatus["WAITING_STOCK"] = "waiting_stock";
|
|
1700
|
+
})(ShoppingRecurrenceStatus || (ShoppingRecurrenceStatus = {}));
|
|
1701
|
+
|
|
1673
1702
|
class Order extends Checkout {
|
|
1674
1703
|
}
|
|
1675
1704
|
__decorate([
|
|
@@ -1683,6 +1712,38 @@ class OrderBlocked extends BaseModel {
|
|
|
1683
1712
|
}
|
|
1684
1713
|
}
|
|
1685
1714
|
|
|
1715
|
+
class ShoppingRecurrence extends BaseModel {
|
|
1716
|
+
static get identifiersFields() {
|
|
1717
|
+
return ['id'];
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
__decorate([
|
|
1721
|
+
Type(() => User),
|
|
1722
|
+
__metadata("design:type", User)
|
|
1723
|
+
], ShoppingRecurrence.prototype, "user", void 0);
|
|
1724
|
+
__decorate([
|
|
1725
|
+
Type(() => UserAddress),
|
|
1726
|
+
__metadata("design:type", UserAddress)
|
|
1727
|
+
], ShoppingRecurrence.prototype, "shippingAddress", void 0);
|
|
1728
|
+
__decorate([
|
|
1729
|
+
Type(() => UserAddress),
|
|
1730
|
+
__metadata("design:type", UserAddress)
|
|
1731
|
+
], ShoppingRecurrence.prototype, "billingAddress", void 0);
|
|
1732
|
+
__decorate([
|
|
1733
|
+
Type(() => ShippingMethod),
|
|
1734
|
+
__metadata("design:type", ShippingMethod)
|
|
1735
|
+
], ShoppingRecurrence.prototype, "shipping", void 0);
|
|
1736
|
+
__decorate([
|
|
1737
|
+
Type(() => Coupon),
|
|
1738
|
+
__metadata("design:type", Coupon)
|
|
1739
|
+
], ShoppingRecurrence.prototype, "coupon", void 0);
|
|
1740
|
+
|
|
1741
|
+
class ShoppingRecurrenceEdition extends BaseModel {
|
|
1742
|
+
static get identifiersFields() {
|
|
1743
|
+
return ['id'];
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1686
1747
|
class CheckoutSubscription extends BaseModel {
|
|
1687
1748
|
static get identifiersFields() {
|
|
1688
1749
|
return ['id'];
|
|
@@ -5483,6 +5544,62 @@ class PaymentFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
5483
5544
|
}
|
|
5484
5545
|
}
|
|
5485
5546
|
|
|
5547
|
+
class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5548
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5549
|
+
super({
|
|
5550
|
+
firestore,
|
|
5551
|
+
collectionName: 'shoppingRecurrenceEditions',
|
|
5552
|
+
model: ShoppingRecurrenceEdition,
|
|
5553
|
+
interceptors,
|
|
5554
|
+
cache,
|
|
5555
|
+
});
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
class ShoppingRecurrenceFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5560
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5561
|
+
super({
|
|
5562
|
+
firestore,
|
|
5563
|
+
collectionName: 'shoppingRecurrences',
|
|
5564
|
+
model: ShoppingRecurrence,
|
|
5565
|
+
interceptors,
|
|
5566
|
+
cache,
|
|
5567
|
+
});
|
|
5568
|
+
}
|
|
5569
|
+
async findByUserId(userId) {
|
|
5570
|
+
const result = await this.find({
|
|
5571
|
+
filters: {
|
|
5572
|
+
user: {
|
|
5573
|
+
id: userId,
|
|
5574
|
+
},
|
|
5575
|
+
},
|
|
5576
|
+
});
|
|
5577
|
+
return result.data;
|
|
5578
|
+
}
|
|
5579
|
+
async findByUserIdAndStatus(userId, status) {
|
|
5580
|
+
const result = await this.find({
|
|
5581
|
+
filters: {
|
|
5582
|
+
user: {
|
|
5583
|
+
id: userId,
|
|
5584
|
+
},
|
|
5585
|
+
status,
|
|
5586
|
+
},
|
|
5587
|
+
});
|
|
5588
|
+
return result.data;
|
|
5589
|
+
}
|
|
5590
|
+
async findByUserAndShop(userId, shop) {
|
|
5591
|
+
const result = await this.find({
|
|
5592
|
+
filters: {
|
|
5593
|
+
user: {
|
|
5594
|
+
id: userId,
|
|
5595
|
+
},
|
|
5596
|
+
shop,
|
|
5597
|
+
},
|
|
5598
|
+
});
|
|
5599
|
+
return result.data;
|
|
5600
|
+
}
|
|
5601
|
+
}
|
|
5602
|
+
|
|
5486
5603
|
class SubscriptionPlanFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5487
5604
|
constructor({ firestore, interceptors, cache, }) {
|
|
5488
5605
|
super({
|
|
@@ -11339,4 +11456,4 @@ class ProductsVertexSearch {
|
|
|
11339
11456
|
}
|
|
11340
11457
|
}
|
|
11341
11458
|
|
|
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 };
|
|
11459
|
+
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, ShoppingRecurrenceEditionStatus, 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 ShoppingRecurrenceEditionStatus {
|
|
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 { ShoppingRecurrenceEditionStatus } from '../enums/shopping-recurrence-edition-status.enum';
|
|
3
|
+
export declare class ShoppingRecurrenceEdition extends BaseModel<ShoppingRecurrenceEdition> {
|
|
4
|
+
id: string;
|
|
5
|
+
recurrenceId: string;
|
|
6
|
+
scheduledDate: Date;
|
|
7
|
+
nextScheduledDate?: Date;
|
|
8
|
+
status: ShoppingRecurrenceEditionStatus;
|
|
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
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ShoppingRecurrenceCycle } from "../models";
|
|
2
|
+
import { PaymentCardInfo } from "./payment-card-info.type";
|
|
3
|
+
export type CreateShoppingRecurrencyPayload = {
|
|
4
|
+
shopId: string;
|
|
5
|
+
cards?: PaymentCardInfo[];
|
|
6
|
+
orderId: string;
|
|
7
|
+
recurrence: ShoppingRecurrenceCycle;
|
|
8
|
+
};
|
|
@@ -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';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { PaymentProviders } from '../enums';
|
|
2
|
-
export type
|
|
2
|
+
export type CardForPaymentInfo = {
|
|
3
3
|
cardId: string;
|
|
4
|
+
paymentProvider: PaymentProviders;
|
|
5
|
+
customerId?: string;
|
|
6
|
+
};
|
|
7
|
+
export type PaymentCardInfo = CardForPaymentInfo & {
|
|
4
8
|
cardCvv?: string;
|
|
5
9
|
installments: number;
|
|
6
10
|
cpf?: string;
|
|
7
11
|
fingerprint?: string;
|
|
8
|
-
paymentProvider?: PaymentProviders;
|
|
9
|
-
customerId?: string;
|
|
10
12
|
};
|
|
@@ -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 {};
|