@infrab4a/connect 0.4.1 → 0.4.3
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/bundles/infrab4a-connect.umd.js +25 -0
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/lib/domain/shop-settings/models/index.js +2 -1
- package/esm2015/lib/domain/shop-settings/models/shop-menu.js +7 -0
- package/esm2015/lib/domain/shop-settings/models/types/index.js +3 -1
- package/esm2015/lib/domain/shop-settings/models/types/menu-nav.type.js +2 -0
- package/esm2015/lib/domain/shop-settings/models/types/sub-menu.type.js +2 -0
- package/esm2015/lib/domain/shop-settings/repositories/index.js +2 -1
- package/esm2015/lib/domain/shop-settings/repositories/shop-menu.repository.js +2 -0
- package/esm2015/lib/domain/shopping/models/coupons/coupon.js +1 -1
- package/esm2015/lib/infra/firebase/firestore/repositories/shop-settings/index.js +2 -1
- package/esm2015/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.js +12 -0
- package/fesm2015/infrab4a-connect.js +16 -1
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/lib/domain/shop-settings/models/index.d.ts +1 -0
- package/lib/domain/shop-settings/models/shop-menu.d.ts +7 -0
- package/lib/domain/shop-settings/models/types/index.d.ts +2 -0
- package/lib/domain/shop-settings/models/types/menu-nav.type.d.ts +8 -0
- package/lib/domain/shop-settings/models/types/sub-menu.type.d.ts +8 -0
- package/lib/domain/shop-settings/repositories/index.d.ts +1 -0
- package/lib/domain/shop-settings/repositories/shop-menu.repository.d.ts +4 -0
- package/lib/domain/shopping/models/coupons/coupon.d.ts +1 -1
- package/lib/infra/firebase/firestore/repositories/shop-settings/index.d.ts +1 -0
- package/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +49 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './home';
|
|
2
|
+
export * from './shop-menu';
|
|
2
3
|
export * from './types';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9saWIvZG9tYWluL3Nob3Atc2V0dGluZ3MvbW9kZWxzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsUUFBUSxDQUFBO0FBQ3RCLGNBQWMsYUFBYSxDQUFBO0FBQzNCLGNBQWMsU0FBUyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9ob21lJ1xyXG5leHBvcnQgKiBmcm9tICcuL3Nob3AtbWVudSdcclxuZXhwb3J0ICogZnJvbSAnLi90eXBlcydcclxuIl19
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseModel } from '../../general/model';
|
|
2
|
+
export class ShopMenu extends BaseModel {
|
|
3
|
+
identifierFields() {
|
|
4
|
+
return ['id'];
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hvcC1tZW51LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29ubmVjdC9zcmMvbGliL2RvbWFpbi9zaG9wLXNldHRpbmdzL21vZGVscy9zaG9wLW1lbnUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBOEMsTUFBTSxxQkFBcUIsQ0FBQTtBQUczRixNQUFNLE9BQU8sUUFBUyxTQUFRLFNBQW1CO0lBSS9DLGdCQUFnQjtRQUNkLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQTtJQUNmLENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEJhc2VNb2RlbCwgSWRlbnRpZmllckZpZWxkcywgTm9uRnVuY3Rpb25Qcm9wZXJ0eU5hbWVzIH0gZnJvbSAnLi4vLi4vZ2VuZXJhbC9tb2RlbCdcclxuaW1wb3J0IHsgTWVudU5hdiB9IGZyb20gJy4vdHlwZXMvbWVudS1uYXYudHlwZSdcclxuXHJcbmV4cG9ydCBjbGFzcyBTaG9wTWVudSBleHRlbmRzIEJhc2VNb2RlbDxTaG9wTWVudT4gaW1wbGVtZW50cyBJZGVudGlmaWVyRmllbGRzPFNob3BNZW51PiB7XHJcbiAgbWVudU5hdjogTWVudU5hdltdXHJcbiAgaWQ6IHN0cmluZ1xyXG5cclxuICBpZGVudGlmaWVyRmllbGRzKCk6IE5vbkZ1bmN0aW9uUHJvcGVydHlOYW1lczxTaG9wTWVudT5bXSB7XHJcbiAgICByZXR1cm4gWydpZCddXHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export * from './banner.type';
|
|
2
2
|
export * from './benefit.type';
|
|
3
|
-
|
|
3
|
+
export * from './menu-nav.type';
|
|
4
|
+
export * from './sub-menu.type';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9saWIvZG9tYWluL3Nob3Atc2V0dGluZ3MvbW9kZWxzL3R5cGVzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFBO0FBQzdCLGNBQWMsZ0JBQWdCLENBQUE7QUFDOUIsY0FBYyxpQkFBaUIsQ0FBQTtBQUMvQixjQUFjLGlCQUFpQixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9iYW5uZXIudHlwZSdcclxuZXhwb3J0ICogZnJvbSAnLi9iZW5lZml0LnR5cGUnXHJcbmV4cG9ydCAqIGZyb20gJy4vbWVudS1uYXYudHlwZSdcclxuZXhwb3J0ICogZnJvbSAnLi9zdWItbWVudS50eXBlJ1xyXG4iXX0=
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS1uYXYudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2xpYi9kb21haW4vc2hvcC1zZXR0aW5ncy9tb2RlbHMvdHlwZXMvbWVudS1uYXYudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3ViTWVudSB9IGZyb20gXCIuL3N1Yi1tZW51LnR5cGVcIlxyXG5cclxuZXhwb3J0IHR5cGUgTWVudU5hdiA9IHtcclxuICBpbWFnZTogc3RyaW5nXHJcbiAgbGFiZWw6IHN0cmluZ1xyXG4gIHBhdGg6IHN0cmluZ1xyXG4gIHBvc2l0aW9uOiBzdHJpbmdcclxuICBzdWJNZW51OiBTdWJNZW51W11cclxufVxyXG4iXX0=
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ViLW1lbnUudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2xpYi9kb21haW4vc2hvcC1zZXR0aW5ncy9tb2RlbHMvdHlwZXMvc3ViLW1lbnUudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiXHJcbmV4cG9ydCB0eXBlIFN1Yk1lbnUgPSBTdWJNZW51SXRlbSAmIHtcclxuICBzdWJDaGlsZE1lbnU6IFN1Yk1lbnVJdGVtW11cclxufVxyXG5cclxudHlwZSBTdWJNZW51SXRlbSA9IHtcclxuICBsYWJlbDogc3RyaW5nXHJcbiAgcGF0aDogc3RyaW5nXHJcbn1cclxuIl19
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export * from './home.repository';
|
|
2
|
-
|
|
2
|
+
export * from './shop-menu.repository';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9saWIvZG9tYWluL3Nob3Atc2V0dGluZ3MvcmVwb3NpdG9yaWVzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsbUJBQW1CLENBQUE7QUFDakMsY0FBYyx3QkFBd0IsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vaG9tZS5yZXBvc2l0b3J5J1xyXG5leHBvcnQgKiBmcm9tICcuL3Nob3AtbWVudS5yZXBvc2l0b3J5J1xyXG4iXX0=
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hvcC1tZW51LnJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9saWIvZG9tYWluL3Nob3Atc2V0dGluZ3MvcmVwb3NpdG9yaWVzL3Nob3AtbWVudS5yZXBvc2l0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDcnVkUmVwb3NpdG9yeSB9IGZyb20gJy4uLy4uL2dlbmVyYWwvcmVwb3NpdG9yeS9jcnVkLnJlcG9zaXRvcnknXHJcbmltcG9ydCB7IFNob3BNZW51IH0gZnJvbSAnLi4vbW9kZWxzL3Nob3AtbWVudSc7XHJcblxyXG5leHBvcnQgaW50ZXJmYWNlIFNob3BNZW51UmVwb3NpdG9yeSBleHRlbmRzIENydWRSZXBvc2l0b3J5PFNob3BNZW51PiB7IH1cclxuIl19
|
|
@@ -12,4 +12,4 @@ __decorate([
|
|
|
12
12
|
__decorate([
|
|
13
13
|
Expose({ name: 'exclusivity_type' })
|
|
14
14
|
], Coupon.prototype, "exclusivityType", void 0);
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291cG9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29ubmVjdC9zcmMvbGliL2RvbWFpbi9zaG9wcGluZy9tb2RlbHMvY291cG9ucy9jb3Vwb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUUxQyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sbUNBQW1DLENBQUE7QUFRN0QsTUFBTSxPQUFPLE1BQU8sU0FBUSxTQUFpQjtJQXFCM0MsZ0JBQWdCO1FBQ2QsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFBO0lBQ2YsQ0FBQztDQUNGO0FBUEM7SUFEQyxNQUFNLENBQUMsRUFB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uIl19
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export * from './home-firestore.repository';
|
|
2
|
-
|
|
2
|
+
export * from './shop-menu-firestore.repository';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9saWIvaW5mcmEvZmlyZWJhc2UvZmlyZXN0b3JlL3JlcG9zaXRvcmllcy9zaG9wLXNldHRpbmdzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsNkJBQTZCLENBQUE7QUFDM0MsY0FBYyxrQ0FBa0MsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vaG9tZS1maXJlc3RvcmUucmVwb3NpdG9yeSdcclxuZXhwb3J0ICogZnJvbSAnLi9zaG9wLW1lbnUtZmlyZXN0b3JlLnJlcG9zaXRvcnknXHJcbiJdfQ==
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ShopMenu } from '../../../../../domain';
|
|
2
|
+
import { Base } from '../../../../../utils';
|
|
3
|
+
import { withCrudFirestore, withFirestore, withHelpers } from '../../mixins';
|
|
4
|
+
export class ShopMenuFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5
|
+
constructor(firestore) {
|
|
6
|
+
super();
|
|
7
|
+
this.firestore = firestore;
|
|
8
|
+
this.collectionName = 'shopMenus';
|
|
9
|
+
this.model = ShopMenu;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hvcC1tZW51LWZpcmVzdG9yZS5yZXBvc2l0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOls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IHdpdGhGaXJlc3RvcmUsIHdpdGhIZWxwZXJzIH0gZnJvbSAnLi4vLi4vbWl4aW5zJ1xyXG5cclxuZXhwb3J0IGNsYXNzIFNob3BNZW51RmlyZXN0b3JlUmVwb3NpdG9yeVxyXG4gIGV4dGVuZHMgd2l0aENydWRGaXJlc3RvcmUod2l0aEhlbHBlcnMod2l0aEZpcmVzdG9yZTxTaG9wTWVudT4oQmFzZSkpKVxyXG4gIGltcGxlbWVudHMgU2hvcE1lbnVSZXBvc2l0b3J5IHtcclxuICBjb25zdHJ1Y3RvcihyZWFkb25seSBmaXJlc3RvcmU6IEZpcmViYXNlRmlyZXN0b3JlKSB7XHJcbiAgICBzdXBlcigpXHJcbiAgICB0aGlzLmNvbGxlY3Rpb25OYW1lID0gJ3Nob3BNZW51cydcclxuICAgIHRoaXMubW9kZWwgPSBTaG9wTWVudVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -490,6 +490,12 @@ class Home extends BaseModel {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
+
class ShopMenu extends BaseModel {
|
|
494
|
+
identifierFields() {
|
|
495
|
+
return ['id'];
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
493
499
|
class InvalidArgumentError extends Error {
|
|
494
500
|
constructor(message) {
|
|
495
501
|
super(message);
|
|
@@ -923,6 +929,15 @@ class HomeFirestoreRepository extends withCrudFirestore(withHelpers(withFirestor
|
|
|
923
929
|
}
|
|
924
930
|
}
|
|
925
931
|
|
|
932
|
+
class ShopMenuFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
933
|
+
constructor(firestore) {
|
|
934
|
+
super();
|
|
935
|
+
this.firestore = firestore;
|
|
936
|
+
this.collectionName = 'shopMenus';
|
|
937
|
+
this.model = ShopMenu;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
926
941
|
class AuthenticationFirebaseAuthService {
|
|
927
942
|
constructor(firebaseAuth) {
|
|
928
943
|
this.firebaseAuth = firebaseAuth;
|
|
@@ -952,5 +967,5 @@ class AuthenticationFirebaseAuthService {
|
|
|
952
967
|
* Generated bundle index. Do not edit.
|
|
953
968
|
*/
|
|
954
969
|
|
|
955
|
-
export { Address, Area, Authentication, AuthenticationFirebaseAuthService, Base, BaseModel, BeardSizes, BeautyProfile, BillingStatus, Buy2Win, Buy2WinFirestoreRepository, Category, CategoryFirestoreRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Edition, EditionStatus, Exclusivities, FinancialCoupon, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, LineItem, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Product, ProductFirestoreRepository, ProductVariantFirestoreRepository, RequiredArgumentError, ShippingMethod, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, UnauthorizedError, UpdateOptionActions, User, UserAddress, UserAddressFirestoreRepository, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserType, Variant, Where, withCreateFirestore, withCrudFirestore, withDeleteFirestore, withFindFirestore, withFirestore, withGetFirestore, withHelpers, withSubCollection, withUpdateFirestore };
|
|
970
|
+
export { Address, Area, Authentication, AuthenticationFirebaseAuthService, Base, BaseModel, BeardSizes, BeautyProfile, BillingStatus, Buy2Win, Buy2WinFirestoreRepository, Category, CategoryFirestoreRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Edition, EditionStatus, Exclusivities, FinancialCoupon, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, LineItem, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Product, ProductFirestoreRepository, ProductVariantFirestoreRepository, RequiredArgumentError, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, UnauthorizedError, UpdateOptionActions, User, UserAddress, UserAddressFirestoreRepository, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserType, Variant, Where, withCreateFirestore, withCrudFirestore, withDeleteFirestore, withFindFirestore, withFirestore, withGetFirestore, withHelpers, withSubCollection, withUpdateFirestore };
|
|
956
971
|
//# sourceMappingURL=infrab4a-connect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infrab4a-connect.js","sources":["../../../projects/connect/src/lib/domain/general/model/base.model.ts","../../../projects/connect/src/lib/domain/general/repository/enums/where.enum.ts","../../../projects/connect/src/lib/domain/general/repository/enums/update-option-actions.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/user-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/beard-sizes.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/hair-types.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/area.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/office-position.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/billing-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/edition-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/payment-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/edition.ts","../../../projects/connect/src/lib/domain/users/models/subscription/payment.ts","../../../projects/connect/src/lib/domain/users/models/subscription/subscription.ts","../../../projects/connect/src/lib/domain/users/models/user.ts","../../../projects/connect/src/lib/domain/users/models/beauty-profile.ts","../../../projects/connect/src/lib/domain/location/models/address.ts","../../../projects/connect/src/lib/domain/users/models/user-address.ts","../../../projects/connect/src/lib/utils/mixins/base.mixin.ts","../../../projects/connect/src/lib/domain/users/errors/unauthorized.error.ts","../../../projects/connect/src/lib/domain/users/use-cases/authentication.ts","../../../projects/connect/src/lib/domain/users/use-cases/signout.ts","../../../projects/connect/src/lib/domain/catalog/models/enums/shops.enum.ts","../../../projects/connect/src/lib/domain/catalog/models/category.ts","../../../projects/connect/src/lib/domain/catalog/models/product.ts","../../../projects/connect/src/lib/domain/catalog/models/variant.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-subtypes.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/exclusivities.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/checkout-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/financial-coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/order-status.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/line-item.ts","../../../projects/connect/src/lib/domain/shopping/models/order.ts","../../../projects/connect/src/lib/domain/shopping/models/payment.ts","../../../projects/connect/src/lib/domain/shopping/models/shipping-method.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/plan.ts","../../../projects/connect/src/lib/domain/shopping/models/buy-2-win.ts","../../../projects/connect/src/lib/domain/shop-settings/models/home.ts","../../../projects/connect/src/lib/errors/invalid-argument.error.ts","../../../projects/connect/src/lib/errors/required-argument.error.ts","../../../projects/connect/src/lib/errors/not-found.error.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-helpers.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/auth/authentication-firebase-auth.service.ts","../../../projects/connect/src/infrab4a-connect.ts"],"sourcesContent":["import { plainToClass, classToPlain } from 'class-transformer'\r\n\r\nimport { NonFunctionProperties } from './types/non-function-properties.type'\r\n\r\nexport class BaseModel<Model> {\r\n constructor(args?: Partial<Model>) {\r\n Object.assign(this, args)\r\n }\r\n\r\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T>): T {\r\n return plainToClass(this, data) as any\r\n }\r\n\r\n toPlain(): any {\r\n return classToPlain(this, { exposeUnsetFields: false })\r\n }\r\n}\r\n","export enum Where {\r\n EQUALS = '==',\r\n GT = '>',\r\n GTE = '>=',\r\n IN = 'in',\r\n LT = '<',\r\n LTE = '<=',\r\n LIKE = 'like',\r\n}\r\n","export enum UpdateOptionActions {\r\n UPDATE = 'update',\r\n MERGE = 'merge',\r\n REMOVE = 'remove',\r\n REMOVE_FIELD = 'removeField',\r\n NULL = 'null',\r\n}\r\n","export enum UserType {\r\n B2C = 'Cliente Transacional',\r\n GlamGirl = 'Glamgirl',\r\n MensBoy = 'Mensboy',\r\n B2B = 'Company',\r\n Collaborator = 'Funcionário',\r\n Influencer = 'Influencer',\r\n}\r\n","export enum BeardSizes {\r\n BIG = 'Grande',\r\n MEDIUM = 'Média',\r\n SHORT = 'Curta',\r\n MUSTACHE = 'Bigode',\r\n NOTHING = 'Sem Barba',\r\n}\r\n","export enum HairTypes {\r\n Smooth = 'Liso',\r\n WAVY = 'Ondulado',\r\n CURLY = 'Cacheado',\r\n FRIZZY = 'Crespo',\r\n BALD = 'Sou careca',\r\n}\r\n","export enum Area {\r\n GP = 'Geral',\r\n CRM = 'CRM',\r\n MediaProd = 'Media Production',\r\n Tech = 'Tecnologia',\r\n Transactional = 'Transacional',\r\n Operations = 'Opera\\u00E7\\u00F5es',\r\n Sales = 'Comercial',\r\n Finantial = 'Financeiro',\r\n HR = 'RH',\r\n}\r\n","export enum OfficePosition {\r\n Intern = 'Estagi\\u00E1rio',\r\n Analyst = 'Analista',\r\n Manager = 'Gerente',\r\n Director = 'Diretor',\r\n}\r\n","export enum BillingStatus {\r\n PAYED = 'PAGO',\r\n}\r\n","export enum EditionStatus {\r\n ALLOCATION_WAITING = 'Aguardando alocação',\r\n}\r\n","export enum PaymentType {\r\n AQUISITION = 'Aquisição',\r\n RENEWAL = 'Renovação',\r\n FREIGHT = 'mudança de endereço, Frete',\r\n}\r\n","export enum Status {\r\n ACTIVE = 'active',\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\r\n\r\nimport { EditionStatus, BillingStatus } from './enums'\r\n\r\nexport class Edition extends BaseModel<Edition> implements IdentifierFields<Edition> {\r\n id: string\r\n subscriptionId: string\r\n billingStatus: BillingStatus\r\n editionId: number\r\n editionStatus: EditionStatus\r\n installment: number\r\n paymentId: string\r\n draftId?: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Edition>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { Payment } from '../../../shopping/models/payment'\r\n\r\nimport { PaymentType } from './enums/payment-type.enum'\r\n\r\nexport class SubscriptionPayment\r\n extends BaseModel<SubscriptionPayment>\r\n implements IdentifierFields<SubscriptionPayment>\r\n{\r\n id: string\r\n subscriptionId: string\r\n paymentType: PaymentType\r\n payment: Payment\r\n createdAt: Date\r\n attempts?: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<SubscriptionPayment>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Address } from '../../../location/models/address'\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { Coupon } from '../../../shopping/models/coupons/coupon'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\r\nimport { SubscriptionPlan } from '../../../shopping/models/subscription/plan'\r\nimport { User } from '../user'\r\n\r\nimport { Edition } from './edition'\r\nimport { Status } from './enums/status.enum'\r\nimport { SubscriptionPayment } from './payment'\r\n\r\nexport class Subscription extends BaseModel<Subscription> implements IdentifierFields<Subscription> {\r\n id: string\r\n nextPayment: Date\r\n recurrence: boolean\r\n status: Status\r\n user: User\r\n subscriptionPlan: SubscriptionPlan\r\n shippingAddress: Address\r\n billingAddress?: Address\r\n cardToken: string\r\n coupon?: Coupon\r\n subtotalPrice?: number\r\n discount?: number\r\n totalPrice?: number\r\n editions: Edition[]\r\n payment?: SubscriptionPayment[]\r\n createdAt: Date\r\n updatedAt: Date\r\n\r\n identifierFields(): NonFunctionPropertyNames<Subscription>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionProperties, NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nimport { Area, OfficePosition, UserType } from './enums'\r\nimport { BeautyProfile } from './beauty-profile'\r\n\r\nexport class User extends BaseModel<User> implements IdentifierFields<User> {\r\n id: string\r\n cpf?: string\r\n email: string\r\n firstName: string\r\n lastName: string\r\n displayName?: string\r\n phone: string\r\n birthday?: Date\r\n acceptsNewsletter: boolean\r\n type?: UserType\r\n beautyProfile?: BeautyProfile\r\n area?: Area\r\n officePosition?: OfficePosition\r\n\r\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T> & NonFunctionProperties<User>): T {\r\n const instance = super.toInstance<User>(data)\r\n\r\n instance.displayName = `${data.firstName} ${data.lastName}`\r\n\r\n return instance as any\r\n }\r\n\r\n identifierFields(): NonFunctionPropertyNames<User>[] {\r\n return ['id']\r\n }\r\n\r\n toPlain(): any {\r\n const plain = super.toPlain()\r\n\r\n delete plain.beautyProfile\r\n\r\n return plain\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\r\n\r\nimport { BeardSizes, HairTypes } from './enums'\r\n\r\nexport class BeautyProfile extends BaseModel<BeautyProfile> implements IdentifierFields<BeautyProfile> {\r\n id: string\r\n userId: string\r\n beardSize?: BeardSizes\r\n hairType?: HairTypes\r\n\r\n toPlain(): any {\r\n const plain = super.toPlain()\r\n\r\n delete plain.id\r\n\r\n return plain\r\n }\r\n\r\n identifierFields(): NonFunctionPropertyNames<BeautyProfile>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\n\r\nimport { LocationGeometry } from './types/location-geometry.type'\r\n\r\nexport abstract class Address extends BaseModel<Address> {\r\n default?: boolean\r\n recipient?: string\r\n zip?: string\r\n street?: string\r\n number?: string\r\n extension?: string\r\n district?: string\r\n city?: string\r\n regionalPole?: string\r\n region?: string\r\n state?: string\r\n country?: string\r\n mailbox?: boolean\r\n mailboxNumber?: string\r\n formattedAddress?: string\r\n placeId?: string\r\n geometry?: LocationGeometry\r\n}\r\n","import { Address } from '../../location/models/address'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\r\n\r\nexport class UserAddress extends Address {\r\n id: string\r\n userId: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<UserAddress>[] {\r\n return ['id']\r\n }\r\n}\r\n","export class Base {\r\n constructor(...args: Array<any>) {\r\n Object.assign(this, ...args)\r\n }\r\n}\r\n","export class UnauthorizedError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","import { Area, OfficePosition, User, UserType } from '../models'\r\nimport { AuthenticationService } from '../services/authentication.service'\r\nimport { isNil } from '../../../utils'\r\nimport { UnauthorizedError } from '../errors/unauthorized.error'\r\nimport { UserRepository } from '../repositories/user.repository'\r\n\r\nexport enum SignInMethods {\r\n EMAIL_PASSWORD = 'email_password',\r\n GOOGLE = 'google',\r\n}\r\n\r\ntype SignInMethod = Lowercase<keyof typeof SignInMethods>\r\n\r\ntype SignInParams = {\r\n email?: string\r\n password?: string\r\n}\r\n\r\nexport class Authentication {\r\n constructor(private readonly authService: AuthenticationService, private readonly userRepository: UserRepository) {}\r\n\r\n async signIn({ email, password }: SignInParams, signInMethod: SignInMethod): Promise<User> {\r\n const method = this.getServiceByMethod(signInMethod)\r\n const userAuth = await this.authService[method]({ email, password })\r\n const user = this.userRepository.get(userAuth)\r\n\r\n if (!isNil(user)) return user\r\n if (/^.+@b4a.com.br$/.test(userAuth.email)) return this.createsUserByCredential(userAuth)\r\n\r\n throw new UnauthorizedError('Invalid credentials')\r\n }\r\n\r\n private getServiceByMethod(signInMethod: SignInMethod): string {\r\n return signInMethod === SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle'\r\n }\r\n\r\n private async createsUserByCredential(user: Partial<User>): Promise<User> {\r\n const [firstName, lastName] = user.displayName?.split(/\\s/)\r\n const person = User.toInstance({\r\n ...user,\r\n cpf: '',\r\n birthday: new Date(),\r\n firstName,\r\n lastName,\r\n acceptsNewsletter: false,\r\n area: Area.Transactional,\r\n officePosition: OfficePosition.Intern,\r\n type: UserType.Collaborator,\r\n })\r\n\r\n return this.userRepository.create(person)\r\n }\r\n}\r\n","import { AuthenticationService } from '../services/authentication.service'\r\n\r\nexport class SignOut {\r\n constructor(private readonly authService: AuthenticationService) {}\r\n\r\n async signOut(): Promise<void> {\r\n await this.authService.signOut()\r\n }\r\n}\r\n","export enum Shops {\r\n MENSMARKET = `Men's Market`,\r\n GLAMSHOP = 'Glamshop',\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\nimport { Shops } from './enums'\r\n\r\nimport { CategoryCondition, CategoryFilter } from './types'\r\n\r\nexport class Category extends BaseModel<Category> implements IdentifierFields<Category> {\r\n id: string\r\n brandCategory: boolean\r\n brandLogo?: string\r\n name: string\r\n slug: string\r\n image?: string\r\n brandCategoryBanner?: string\r\n description: string\r\n conditions?: CategoryCondition\r\n products?: string[]\r\n filters?: CategoryFilter[]\r\n createdAt: Date\r\n updatedAt: Date\r\n shop: Shops\r\n\r\n identifierFields(): NonFunctionPropertyNames<Category>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\n\r\nimport { Shops } from './enums/shops.enum'\r\nimport { ProductReview, ShopsDescription, ShopsPrice, Stock } from './types'\r\nimport { Variant } from './variant'\r\n\r\nexport class Product extends BaseModel<Product> implements IdentifierFields<Product> {\r\n id: string\r\n name: string\r\n slug: string\r\n shopAvailability: Shops[]\r\n description: ShopsDescription\r\n sku: string\r\n price: ShopsPrice\r\n hasVariants: boolean\r\n NCM: string\r\n EAN: string\r\n CEST: string\r\n weight: number\r\n stock: Stock\r\n costPrice: number\r\n images?: string[]\r\n published: boolean\r\n createdAt: Date\r\n updatedAt: Date\r\n brand: string\r\n tags?: string[]\r\n type?: string\r\n categories?: string[]\r\n reviews?: ProductReview[]\r\n variant?: Variant\r\n\r\n identifierFields(): NonFunctionPropertyNames<Product>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\n\r\nimport { ShopsPrice, Stock, VariantGrade } from './types'\r\n\r\nexport class Variant extends BaseModel<Variant> implements IdentifierFields<Variant> {\r\n id: string\r\n productId: string\r\n sku: string\r\n price: ShopsPrice\r\n EAN: string\r\n stock: Stock\r\n grade: VariantGrade[]\r\n\r\n identifierFields(): NonFunctionPropertyNames<Variant>[] {\r\n return ['id']\r\n }\r\n}\r\n","export enum CouponTypes {\r\n FINANCIAL = 1,\r\n PRODUCT,\r\n GIFTCARD,\r\n VOUCHER,\r\n}\r\n","export enum CouponSubtypes {\r\n ABSOLUTE = 1,\r\n PERCENTAGE,\r\n}\r\n","export enum Exclusivities {\r\n ALL_USERS = 1,\r\n SPECIFIC_USER = 2,\r\n COLLABORATORS = 3,\r\n}\r\n","import { Expose } from 'class-transformer'\r\n\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { Shops } from '../../../catalog/models/enums/shops.enum'\r\n\r\nimport { CouponTypes, Exclusivities } from './enums'\r\n\r\nexport class Coupon extends BaseModel<Coupon> implements IdentifierFields<Coupon> {\r\n id: string\r\n type: CouponTypes\r\n discount?: number\r\n user?: string\r\n recipient?: string\r\n store?: Shops\r\n campaign?: string\r\n name: string\r\n nickname: string\r\n expiresIn?: Date\r\n useLimit?: number\r\n createdAt: Date\r\n updatedAt?: Date\r\n shopAvailability: Shops[]\r\n\r\n @Expose({ name: 'checkout_type' })\r\n checkoutType: CheckoutTypes\r\n @Expose({ name: 'exclusivity_type' })\r\n exclusivityType?: Exclusivities\r\n\r\n identifierFields(): NonFunctionPropertyNames<Coupon>[] {\r\n return ['id']\r\n }\r\n}\r\n","export enum CheckoutTypes {\r\n ECOMMERCE = 1,\r\n SUBSCRIPTION = 2,\r\n}\r\n","import { Md5 } from 'ts-md5'\r\n\r\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\r\n\r\nimport { Coupon } from './coupon'\r\nimport { CouponTypes, CouponSubtypes } from './enums'\r\n\r\nconst COUPON_EXPIRATION = 60 * 60 * 24 * 30\r\n\r\nexport class FinancialCoupon extends Coupon {\r\n type = CouponTypes.FINANCIAL\r\n subtype: CouponSubtypes\r\n\r\n static isFinancialCoupon(coupon: Partial<FinancialCoupon>): coupon is FinancialCoupon {\r\n return coupon.type === CouponTypes.FINANCIAL && !!coupon.subtype\r\n }\r\n\r\n static createCoupon(userId: string): FinancialCoupon {\r\n return this.toInstance({\r\n name: Md5.hashStr(`${userId}_${Date.now}`).toString(),\r\n nickname: `${Date.now()}`,\r\n type: CouponTypes.FINANCIAL,\r\n subtype: CouponSubtypes.PERCENTAGE,\r\n checkoutType: CheckoutTypes.ECOMMERCE,\r\n discount: 30,\r\n user: userId,\r\n createdAt: new Date(Date.now()),\r\n expiresIn: new Date(Date.now() + COUPON_EXPIRATION),\r\n })\r\n }\r\n}\r\n","export enum OrderStatus {\r\n AGUARDANDO_PAGAMENTO = 'Aguardando pagamento',\r\n EM_PREPARO = 'Preparando pedido',\r\n NF_EMITIDA = 'Nota Fiscal Emitida',\r\n AGUARDANDO_ENVIO = 'Aguardando Transaportadora',\r\n ENVIADO = 'Pedido Enviado',\r\n ENTREGUE = 'Pedido entregue',\r\n CANCELADO = 'Cancelado',\r\n CREDIT_CARD = 'credit_card',\r\n}\r\n","import { Address } from '../../location/models/address'\r\nimport { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\nimport { User } from '../../users/models/user'\r\n\r\nimport { Coupon } from './coupons/coupon'\r\nimport { LineItem } from './line-item'\r\nimport { ShippingMethod } from './shipping-method'\r\nimport { Shops } from '../../catalog/models/enums/shops.enum'\r\n\r\nexport class Checkout extends BaseModel<Checkout> implements IdentifierFields<Checkout> {\r\n id?: string\r\n paymentId?: string\r\n status?: string\r\n createdAt?: Date\r\n updatedAt?: Date\r\n completedAt?: Date\r\n lineItems?: LineItem[]\r\n user?: Partial<User>\r\n shippingAddress?: Partial<Address>\r\n billingAddress?: Partial<Address>\r\n shipping?: ShippingMethod\r\n coupon?: Coupon\r\n discount?: number\r\n subTotalPrice?: number\r\n totalPrice?: number\r\n shop: Shops\r\n\r\n identifierFields(): NonFunctionPropertyNames<Checkout>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Product } from '../../catalog/models/product'\r\n\r\nexport class LineItem extends Product {\r\n parentId?: string\r\n quantity: number\r\n isGift?: boolean\r\n pricePaid?: number\r\n}\r\n","import { Checkout } from './checkout'\r\nimport { OrderStatus } from './enums/order-status.enum'\r\nimport { Payment } from './payment'\r\n\r\nexport class Order extends Checkout {\r\n status: OrderStatus\r\n payment: Payment\r\n}\r\n","import { Expose } from 'class-transformer'\r\n\r\nimport { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nimport { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types'\r\n\r\nexport class Payment extends BaseModel<Payment> implements IdentifierFields<Payment> {\r\n id: number\r\n object: string\r\n status: string\r\n tid: number\r\n nsu: number\r\n amount: number\r\n cost: number\r\n installments: number\r\n referer: string\r\n ip: string\r\n phone: string\r\n address: string\r\n metadata: any\r\n device: string\r\n payment: string\r\n addition: string\r\n discount: string\r\n customer: PaymentCustomer\r\n billing: PaymentBilling\r\n shipping: PaymentShipping\r\n items: PaymentItem[]\r\n card: PaymentCard\r\n\r\n @Expose({ name: 'refuse_reason' })\r\n refuseReason: string\r\n @Expose({ name: 'status_reason' })\r\n statusReason: string\r\n @Expose({ name: 'acquirer_response_code' })\r\n acquirerResponseCode: string\r\n @Expose({ name: 'acquirer_name' })\r\n acquirerName: string\r\n @Expose({ name: 'acquirer_id' })\r\n acquirerId: string\r\n @Expose({ name: 'authorization_code' })\r\n authorizationCode: string\r\n @Expose({ name: 'soft_descriptor' })\r\n softDescriptor: string\r\n @Expose({ name: 'date_created' })\r\n dateCreated: string\r\n @Expose({ name: 'date_updated' })\r\n dateUpdated: string\r\n @Expose({ name: 'authorized_amount' })\r\n authorizedAmount: number\r\n @Expose({ name: 'paid_amount' })\r\n paidAmount: number\r\n @Expose({ name: 'refunded_amount' })\r\n refundedAmount: number\r\n @Expose({ name: 'card_holder_name' })\r\n cardHolderName: string\r\n @Expose({ name: 'card_last_digits' })\r\n cardLastDigits: string\r\n @Expose({ name: 'card_first_digits' })\r\n cardFirstDigits: string\r\n @Expose({ name: 'card_brand' })\r\n cardBrand: string\r\n @Expose({ name: 'card_pin_mode' })\r\n cardPinMode: string\r\n @Expose({ name: 'card_magstripe_fallback' })\r\n cardMagstripeFallback: boolean\r\n @Expose({ name: 'cvm_pin' })\r\n cvmPin: boolean\r\n @Expose({ name: 'postback_url' })\r\n postbackUrl: string\r\n @Expose({ name: 'payment_method' })\r\n paymentMethod: string\r\n @Expose({ name: 'capture_method' })\r\n captureMethod: string\r\n @Expose({ name: 'antifraud_score' })\r\n antifraudScore: string\r\n @Expose({ name: 'boleto_url' })\r\n boletoUrl: string\r\n @Expose({ name: 'boleto_barcode' })\r\n boletoBarcode: string\r\n @Expose({ name: 'boleto_expiration_date' })\r\n boletoExpirationDate: string\r\n @Expose({ name: 'subscription_id' })\r\n subscriptionId: string\r\n @Expose({ name: 'split_rules' })\r\n splitRules: string\r\n @Expose({ name: 'antifraud_metadata' })\r\n antifraudMetadata: any\r\n @Expose({ name: 'reference_key' })\r\n referenceKey: string\r\n @Expose({ name: 'local_transaction_id' })\r\n localTransactionId: string\r\n @Expose({ name: 'local_time' })\r\n localTime: string\r\n @Expose({ name: 'fraud_covered' })\r\n fraudCovered: boolean\r\n @Expose({ name: 'fraud_reimbursed' })\r\n fraudReimbursed: string\r\n @Expose({ name: 'order_id' })\r\n orderId: string\r\n @Expose({ name: 'risk_level' })\r\n riskLevel: string\r\n @Expose({ name: 'receipt_url' })\r\n receiptUrl: string\r\n @Expose({ name: 'private_label' })\r\n privateLabel: string\r\n @Expose({ name: 'pix_qr_code' })\r\n pixQrCode: string\r\n @Expose({ name: 'pix_expiration_date' })\r\n pixExpirationDate: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Payment>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nexport class ShippingMethod extends BaseModel<ShippingMethod> implements IdentifierFields<ShippingMethod> {\r\n id: string\r\n CNPJ: string\r\n DaysToDelivery: number\r\n MaxGrams: number\r\n MinGrams: number\r\n ServiceCompanyRangeId: number\r\n ShippingCompanyId: number\r\n ShippingCompanyName: string\r\n ShippingPrice: number\r\n State: string\r\n ZipEnd: number\r\n ZipStart: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<ShippingMethod>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Address } from '../../../location/models/address'\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { Coupon } from '../coupons/coupon'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { User } from '../../../users/models/user'\r\n\r\nimport { SubscriptionPlan } from './plan'\r\n\r\nexport class CheckoutSubscription\r\n extends BaseModel<CheckoutSubscription>\r\n implements IdentifierFields<CheckoutSubscription>\r\n{\r\n id?: string\r\n user: User\r\n createdAt: Date\r\n updatedAt: Date\r\n completedAt?: Date\r\n shippingAddress: Address\r\n subscriptionPlan: SubscriptionPlan\r\n billingAddress?: Address\r\n userId?: string\r\n coupon?: Coupon\r\n discount?: number\r\n subTotalPrice?: number\r\n totalPrice?: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<CheckoutSubscription>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\n\r\nexport class SubscriptionPlan extends BaseModel<SubscriptionPlan> implements IdentifierFields<SubscriptionPlan> {\r\n id: string\r\n name: string\r\n billingPrice: number\r\n recurrencePrice: number\r\n recurrenceCycle: number\r\n maxAttempts: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<SubscriptionPlan>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\nimport { Shops, Category } from '../../catalog/models'\r\n\r\nexport class Buy2Win extends BaseModel<Buy2Win> implements IdentifierFields<Buy2Win> {\r\n active: boolean\r\n cartValue: number\r\n categories: Category[]\r\n createdAt: Date\r\n endDate: Date\r\n id?: string\r\n name: string\r\n products?: string[]\r\n shop: Shops\r\n startDate: Date\r\n updatedAt?: Date\r\n\r\n identifierFields(): NonFunctionPropertyNames<Buy2Win>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\nimport { Banner } from './types/banner.type'\r\nimport { Benefit } from './types/benefit.type'\r\n\r\nexport class Home extends BaseModel<Home> implements IdentifierFields<Home> {\r\n benefitsSection: Benefit\r\n blockBanners: Banner[]\r\n blogBanner: Banner\r\n brandsCarousel: Banner[]\r\n buyToWinBanner: Banner\r\n discoverCategories: string[]\r\n featuredCampaignBanner: Banner\r\n featuredCategories: string[]\r\n heroCarousel: Banner[]\r\n verticalCarousels: string[]\r\n id: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Home>[] {\r\n return ['id']\r\n }\r\n}\r\n","export class InvalidArgumentError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","export class RequiredArgumentError extends Error {\r\n arguments: string[]\r\n\r\n constructor(readonly args: string[]) {\r\n super(`Required arguments: ${args.join(', ')}`)\r\n\r\n this.arguments = args\r\n }\r\n}\r\n","export class NotFoundError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\nimport firebase from 'firebase'\r\n\r\nimport { BaseModelBuilder, BaseModelWithIdentifier } from '../../../../domain'\r\nimport { FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withFirestore = <TBase extends BaseModelWithIdentifier<TBase>>(MixinBase: MixinCtor) => {\r\n return class extends MixinBase implements FirestoreRepository<TBase> {\r\n readonly firestore?: FirebaseFirestore\r\n collectionName: string\r\n model: BaseModelBuilder<TBase>\r\n\r\n constructor(...args: Array<any>) {\r\n super(args)\r\n }\r\n\r\n collection(path?: string): CollectionReference<TBase> {\r\n return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance())\r\n }\r\n\r\n buildModelInstance(): {\r\n toFirestore: (data: TBase) => DocumentData\r\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>) => TBase\r\n } {\r\n return {\r\n toFirestore: (data: TBase): DocumentData => data.toPlain(),\r\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>): TBase => {\r\n const data = snap.data()\r\n\r\n Object.keys(data).forEach((key) => {\r\n if (data[key] instanceof firebase.firestore.Timestamp) {\r\n data[key] = data[key].toDate()\r\n }\r\n })\r\n\r\n return this.model.toInstance({ id: snap.id, ...data })\r\n },\r\n }\r\n }\r\n }\r\n}\r\n","import { QuerySnapshot, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { BaseModelWithIdentifier } from '../../../../domain'\r\n\r\nimport { FirestoreHelpers, FirestoreRepository, FirestoreSubRepository } from '../types'\r\nimport { isNil, MixinCtor } from '../../../../utils'\r\n\r\nexport const withHelpers = <Model extends BaseModelWithIdentifier<Model>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor & TMixinBase,\r\n) => {\r\n return class extends MixinBase implements FirestoreHelpers {\r\n toArray<T extends BaseModelWithIdentifier<T>>(snapShot: QuerySnapshot<T> | QueryDocumentSnapshot<T>[]): T[] {\r\n if (Array.isArray(snapShot)) {\r\n return snapShot.map((doc: QueryDocumentSnapshot<T>) => doc.data())\r\n } else {\r\n return snapShot.docs.map((doc: QueryDocumentSnapshot<T>) => doc.data())\r\n }\r\n }\r\n\r\n isSubCollection<T extends BaseModelWithIdentifier<T>>(\r\n repository: FirestoreRepository<T>,\r\n ): repository is FirestoreSubRepository<T> {\r\n return !isNil(Object.keys(this).find((key) => key === 'parentRepository'))\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, GetRepository, NonFunctionProperties } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isNil, MixinCtor } from '../../../../utils'\r\nimport { NotFoundError } from '../../../../errors'\r\n\r\nexport const withGetFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class GetFirestore extends MixinBase implements GetRepository<TBase> {\r\n async get(identifiers: NonFunctionProperties<TBase>): Promise<TBase> {\r\n const doc = await this.collection(this.buildCollectionPathForGet(identifiers))\r\n .doc(Object.values(identifiers).shift().toString())\r\n .get()\r\n const data = doc.data()\r\n\r\n if (isNil(data)) throw new NotFoundError(`Document ${JSON.stringify(identifiers)} not found`)\r\n\r\n return data\r\n }\r\n\r\n buildCollectionPathForGet(identifiers: NonFunctionProperties<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import { CollectionReference, Query, WhereFilterOp } from '@firebase/firestore-types'\r\n\r\nimport {\r\n BaseModelWithIdentifier,\r\n FindRepository,\r\n NonFunctionPropertyNames,\r\n RepositoryFindFielters,\r\n RepositoryFindFieltersOptions,\r\n RepositoryFindResult,\r\n RepositoryLimitOptions,\r\n RepositoryOrderByList,\r\n Where,\r\n} from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor, isNumber, isString } from '../../../../utils'\r\n\r\nexport const withFindFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class FindFirestore extends MixinBase implements FindRepository<TBase> {\r\n async find(\r\n filters?: RepositoryFindFielters<TBase>[],\r\n limits?: RepositoryLimitOptions<TBase>,\r\n orderBy?: RepositoryOrderByList<TBase>,\r\n ): Promise<RepositoryFindResult<TBase>> {\r\n let query: CollectionReference<TBase> | Query<TBase> = this.collection(this.buildCollectionPathForFind(filters))\r\n\r\n filters?.forEach((filterer) => (query = this.makeFirestoreWhere(query, filterer)))\r\n\r\n orderBy?.forEach((orderer) =>\r\n Object.keys(orderer).forEach((fieldName) => (query = query.orderBy(fieldName, orderer[fieldName]))),\r\n )\r\n\r\n query = this.defineLimits(query, filters, limits)\r\n\r\n const docs = await query.get()\r\n const data = docs.docs.map((doc) => doc.data())\r\n\r\n return {\r\n data,\r\n count: this.calculateCount(data, limits),\r\n }\r\n }\r\n\r\n buildCollectionPathForFind(filters: RepositoryFindFielters<TBase>[]): string {\r\n if (!this.isSubCollection<TBase>(this)) return this.collectionName\r\n\r\n const parentIdField = this.parentIdField\r\n const parentId = filters.find((groupFilter) => Boolean(groupFilter[parentIdField]?.value))?.[parentIdField].value\r\n\r\n return `${this.parentRepository.collectionName}/${parentId}/${this.collectionName}`\r\n }\r\n\r\n makeFirestoreWhere = (\r\n queryReference: CollectionReference<TBase> | Query<TBase>,\r\n filter: RepositoryFindFielters<TBase>,\r\n ): Query<TBase> =>\r\n Object.keys(filter).reduce(\r\n (query: Query<TBase>, fieldName: string) =>\r\n this.buildWhereSentence(query, fieldName as NonFunctionPropertyNames<TBase>, filter[fieldName]),\r\n queryReference,\r\n )\r\n\r\n buildWhereSentence = (\r\n queryReference: CollectionReference<TBase> | Query<TBase>,\r\n fieldName: NonFunctionPropertyNames<TBase>,\r\n options: RepositoryFindFieltersOptions<TBase, NonFunctionPropertyNames<TBase>>,\r\n ): Query<TBase> => {\r\n if (this.isSubCollection<TBase>(this) && fieldName === this.parentIdField) return queryReference\r\n if (options.operator === Where.LIKE) {\r\n queryReference = queryReference.where(fieldName.toString(), '>=', options.value)\r\n queryReference = queryReference.where(fieldName.toString(), '<=', `${options.value}~`)\r\n\r\n return queryReference\r\n }\r\n\r\n return queryReference.where(fieldName.toString(), options.operator as WhereFilterOp, options.value)\r\n }\r\n\r\n defineLimits(\r\n query: CollectionReference<TBase> | Query<TBase>,\r\n filters: RepositoryFindFielters<TBase>[],\r\n limits: RepositoryLimitOptions<TBase>,\r\n ): Query<TBase> {\r\n if (limits?.offset) {\r\n if (limits.offset instanceof this.model)\r\n query = query.startAfter(\r\n this.collection(this.buildCollectionPathForFind(filters)).doc(\r\n limits.offset[limits.offset.identifierFields().shift() as string],\r\n ),\r\n )\r\n if (isNumber(limits.offset) || isString(limits.offset)) query = query.startAt(limits.offset)\r\n }\r\n if (limits?.limit) query = query.limit(limits.limit)\r\n\r\n return query\r\n }\r\n\r\n calculateCount(data: TBase[], limits: RepositoryLimitOptions<TBase>): number {\r\n if (data.length <= 0) return 0\r\n if (data.length < limits?.limit) return data.length\r\n\r\n return Infinity\r\n }\r\n }\r\n}\r\n","import { DocumentReference } from '@firebase/firestore-types'\r\n\r\nimport { CreateRepository, BaseModelWithIdentifier } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isEmpty, MixinCtor } from '../../../../utils'\r\n\r\nexport const withCreateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class CreateFirestore extends MixinBase implements CreateRepository<TBase> {\r\n async create(data: Partial<TBase>): Promise<TBase> {\r\n const docRef = await this.save(this.model.toInstance(data))\r\n const doc = await docRef.get()\r\n\r\n return doc.data()\r\n }\r\n\r\n async save(data: TBase): Promise<DocumentReference<TBase>> {\r\n const id = data[data.identifierFields().shift()]?.toString()\r\n\r\n if (isEmpty(id)) return this.collection(this.buildCollectionPathForAdd(data)).add(data)\r\n\r\n const docRef = this.collection().doc(id)\r\n await docRef.set(data)\r\n\r\n return docRef\r\n }\r\n\r\n buildCollectionPathForAdd(identifiers: Partial<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import firebase from 'firebase'\r\n\r\nimport {\r\n BaseModelWithIdentifier,\r\n NonFunctionPropertyNames,\r\n RepositoryUpdateParams,\r\n UpdateOptionActions,\r\n UpdateOptions,\r\n UpdateRepository,\r\n} from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isNil, MixinCtor, PropType } from '../../../../utils'\r\n\r\nexport const withUpdateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n const getValueFromParams = (\r\n params: RepositoryUpdateParams<TBase>,\r\n field: NonFunctionPropertyNames<TBase>,\r\n ): PropType<TBase, NonFunctionPropertyNames<TBase>> =>\r\n (isNil(params[field as string]?.value) ? params[field as string] : params[field as string].value) || null\r\n const getValueByAction = (options: UpdateOptions<TBase>): firebase.firestore.FieldValue | unknown => {\r\n const fieldValues = firebase.firestore.FieldValue\r\n\r\n if (options.action === UpdateOptionActions.REMOVE_FIELD) return fieldValues.delete()\r\n if (Array.isArray(options.value)) {\r\n if (options.action === UpdateOptionActions.MERGE) return fieldValues.arrayUnion(options.value)\r\n if (options.action === UpdateOptionActions.REMOVE) return fieldValues.arrayRemove(options.value)\r\n }\r\n\r\n return options.value\r\n }\r\n\r\n return class UpdateFirestore extends MixinBase implements UpdateRepository<TBase> {\r\n async update(data: RepositoryUpdateParams<TBase>): Promise<TBase> {\r\n const model = new this.model()\r\n const keyField = model.identifierFields().shift()\r\n const docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(\r\n getValueFromParams(data, keyField).toString(),\r\n )\r\n\r\n await docRef.update(this.paramsToPlain(data))\r\n\r\n const doc = await docRef.get()\r\n\r\n return doc.data()\r\n }\r\n\r\n buildCollectionPathForUpdate(identifiers: RepositoryUpdateParams<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${getValueFromParams(identifiers, this.parentIdField)}/${\r\n this.collectionName\r\n }`\r\n : this.collectionName\r\n }\r\n\r\n paramsToPlain(params: RepositoryUpdateParams<TBase>): Partial<TBase> {\r\n const model = this.model\r\n\r\n if (params instanceof model) return params.toPlain()\r\n\r\n return Object.keys(params).reduce(\r\n (data, currentKey) => ({ ...data, [currentKey]: getValueByAction(data[currentKey]) }),\r\n {},\r\n )\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, NonFunctionProperties, DeleteRepository } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withDeleteFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class DeleteFirestore extends MixinBase implements DeleteRepository<TBase> {\r\n async delete(identifiers: NonFunctionProperties<TBase>): Promise<void> {\r\n await this.collection(this.buildCollectionPathForRemove(identifiers))\r\n .doc(Object.values(identifiers).shift().toString())\r\n .delete()\r\n }\r\n\r\n buildCollectionPathForRemove(identifiers: NonFunctionProperties<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { BaseModelWithIdentifier, NonFunctionPropertyNames } from '../../../../domain'\r\nimport { FirestoreRepository, FirestoreSubRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withSubCollection = <\r\n TBase extends BaseModelWithIdentifier<TBase>,\r\n TBaseParent extends BaseModelWithIdentifier<TBaseParent>,\r\n TMixinBase extends MixinCtor,\r\n>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase>> & TMixinBase,\r\n ParentModel: new () => TBaseParent,\r\n) => {\r\n return class SubCollectionMix\r\n extends MixinBase\r\n implements FirestoreSubRepository<TBase, InstanceType<typeof ParentModel>>\r\n {\r\n readonly parentRepository: FirestoreRepository<InstanceType<typeof ParentModel>>\r\n parentIdField: NonFunctionPropertyNames<TBase>\r\n\r\n constructor(...args: Array<any>) {\r\n super(args)\r\n }\r\n\r\n collection(path?: string): CollectionReference<TBase> {\r\n return super.collection(path)\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, CrudRepository } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nimport { withCreateFirestore } from './with-create-firestore.mixin'\r\nimport { withDeleteFirestore } from './with-delete-firestore.mixin'\r\nimport { withFindFirestore } from './with-find-firestore.mixin'\r\nimport { withGetFirestore } from './with-get-firestore.mixin'\r\nimport { withUpdateFirestore } from './with-update-firestore.mixin'\r\n\r\nexport const withCrudFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class CrudFirestore\r\n extends withUpdateFirestore(\r\n withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))),\r\n )\r\n implements CrudRepository<TBase> {}\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Subscription, SubscriptionRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class SubscriptionFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Subscription>(Base)))\r\n implements SubscriptionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'subscription'\r\n this.model = Subscription\r\n }\r\n}\r\n","import { DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { BeautyProfile, User, UserRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class UserFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<User>(Base)))\r\n implements UserRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'users'\r\n this.model = User\r\n }\r\n\r\n async get(identifiers: Partial<User>): Promise<User> {\r\n const user = await super.get({ id: identifiers.id })\r\n\r\n user.beautyProfile = await this.getBeautyProfile(user.id)\r\n\r\n return user\r\n }\r\n\r\n private async getBeautyProfile(userId: string): Promise<BeautyProfile> {\r\n const beautyProfile = await this.collection()\r\n .doc(userId)\r\n .collection('CX')\r\n .withConverter(this.buildBeautyProfileModelInstance())\r\n .doc('beautyProfile')\r\n .get()\r\n\r\n return beautyProfile.data()\r\n }\r\n\r\n private buildBeautyProfileModelInstance(): {\r\n toFirestore: (data: BeautyProfile) => DocumentData\r\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>) => BeautyProfile\r\n } {\r\n return {\r\n toFirestore: (data: BeautyProfile): DocumentData => data.toPlain(),\r\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>): BeautyProfile =>\r\n BeautyProfile.toInstance(snap.data()),\r\n }\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Edition, Subscription, EditionRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\r\n\r\nexport class SubscriptionEditionFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Edition>(Base))), Subscription)\r\n implements EditionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\r\n super()\r\n this.collectionName = 'editions'\r\n this.parentIdField = 'subscriptionId'\r\n this.model = Edition\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { BeautyProfile, BeautyProfileRepository, User } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { UserFirestoreRepository } from './user-firestore.repository'\r\n\r\nexport class UserBeautyProfileFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<BeautyProfile>(Base))), User)\r\n implements BeautyProfileRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\r\n super()\r\n this.collectionName = 'CX'\r\n this.parentIdField = 'userId'\r\n this.model = BeautyProfile\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { User, UserAddress, UserAddressRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { UserFirestoreRepository } from './user-firestore.repository'\r\n\r\nexport class UserAddressFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<UserAddress>(Base))), User)\r\n implements UserAddressRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\r\n super()\r\n this.collectionName = 'address'\r\n this.parentIdField = 'userId'\r\n this.model = UserAddress\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { SubscriptionPayment, Subscription, SubscriptionPaymentRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\r\n\r\nexport class SubscriptionPaymentFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<SubscriptionPayment>(Base))), Subscription)\r\n implements SubscriptionPaymentRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\r\n super()\r\n this.collectionName = 'Payments'\r\n this.parentIdField = 'subscriptionId'\r\n this.model = SubscriptionPayment\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Category, CategoryRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CategoryFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Category>(Base)))\r\n implements CategoryRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'categories'\r\n this.model = Category\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Product, ProductRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class ProductFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Product>(Base)))\r\n implements ProductRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'products'\r\n this.model = Product\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Product, Variant, VariantRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { ProductFirestoreRepository } from './product-firestore.repository'\r\n\r\nexport class ProductVariantFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Variant>(Base))), Product)\r\n implements VariantRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: ProductFirestoreRepository) {\r\n super()\r\n this.collectionName = 'Variants'\r\n this.parentIdField = 'productId'\r\n this.model = Variant\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Checkout, CheckoutRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CheckoutFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Checkout>(Base)))\r\n implements CheckoutRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'checkouts'\r\n this.model = Checkout\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Coupon, CouponRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CouponFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Coupon>(Base)))\r\n implements CouponRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'coupons'\r\n this.model = Coupon\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Order, OrderRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class OrderFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Order>(Base)))\r\n implements OrderRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'orders'\r\n this.model = Order\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Payment, PaymentRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class PaymentFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Payment>(Base)))\r\n implements PaymentRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'payments'\r\n this.model = Payment\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { CheckoutSubscription, CheckoutSubscriptionRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CheckoutSubscriptionFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<CheckoutSubscription>(Base)))\r\n implements CheckoutSubscriptionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'checkoutsSubscription'\r\n this.model = CheckoutSubscription\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { SubscriptionPlan, SubscriptionPlanRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class SubscriptionPlanFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<SubscriptionPlan>(Base)))\r\n implements SubscriptionPlanRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'subscriptionPlans'\r\n this.model = SubscriptionPlan\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Buy2Win, Buy2WinRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class Buy2WinFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Buy2Win>(Base)))\r\n implements Buy2WinRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'buy2win'\r\n this.model = Buy2Win\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Home, HomeRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class HomeFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Home>(Base)))\r\n implements HomeRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'dms'\r\n this.model = Home\r\n }\r\n}\r\n","import firebase from 'firebase/app'\r\n\r\nimport { AuthenticationService, LoginAndPasswordParams, User } from '../../../domain'\r\n\r\nexport class AuthenticationFirebaseAuthService implements AuthenticationService {\r\n constructor(private readonly firebaseAuth: firebase.auth.Auth) {}\r\n\r\n async signInWithEmailAndPassword(data: LoginAndPasswordParams): Promise<Partial<User>> {\r\n const credentials = await this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password)\r\n const user = credentials.user\r\n\r\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\r\n }\r\n\r\n async signInWithGoogle(): Promise<Partial<User>> {\r\n const credentials = await this.firebaseAuth.signInWithPopup(new firebase.auth.GoogleAuthProvider())\r\n const user = credentials.user\r\n\r\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\r\n }\r\n\r\n async signOut(): Promise<void> {\r\n this.firebaseAuth.signOut()\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["firebase"],"mappings":";;;;;;;;MAIa,SAAS;IACpB,YAAY,IAAqB;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAA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ect/src/lib/domain/general/model/base.model.ts","../../../projects/connect/src/lib/domain/general/repository/enums/where.enum.ts","../../../projects/connect/src/lib/domain/general/repository/enums/update-option-actions.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/user-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/beard-sizes.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/hair-types.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/area.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/office-position.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/billing-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/edition-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/payment-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/edition.ts","../../../projects/connect/src/lib/domain/users/models/subscription/payment.ts","../../../projects/connect/src/lib/domain/users/models/subscription/subscription.ts","../../../projects/connect/src/lib/domain/users/models/user.ts","../../../projects/connect/src/lib/domain/users/models/beauty-profile.ts","../../../projects/connect/src/lib/domain/location/models/address.ts","../../../projects/connect/src/lib/domain/users/models/user-address.ts","../../../projects/connect/src/lib/utils/mixins/base.mixin.ts","../../../projects/connect/src/lib/domain/users/errors/unauthorized.error.ts","../../../projects/connect/src/lib/domain/users/use-cases/authentication.ts","../../../projects/connect/src/lib/domain/users/use-cases/signout.ts","../../../projects/connect/src/lib/domain/catalog/models/enums/shops.enum.ts","../../../projects/connect/src/lib/domain/catalog/models/category.ts","../../../projects/connect/src/lib/domain/catalog/models/product.ts","../../../projects/connect/src/lib/domain/catalog/models/variant.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-subtypes.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/exclusivities.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/checkout-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/financial-coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/order-status.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/line-item.ts","../../../projects/connect/src/lib/domain/shopping/models/order.ts","../../../projects/connect/src/lib/domain/shopping/models/payment.ts","../../../projects/connect/src/lib/domain/shopping/models/shipping-method.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/plan.ts","../../../projects/connect/src/lib/domain/shopping/models/buy-2-win.ts","../../../projects/connect/src/lib/domain/shop-settings/models/home.ts","../../../projects/connect/src/lib/domain/shop-settings/models/shop-menu.ts","../../../projects/connect/src/lib/errors/invalid-argument.error.ts","../../../projects/connect/src/lib/errors/required-argument.error.ts","../../../projects/connect/src/lib/errors/not-found.error.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-helpers.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/auth/authentication-firebase-auth.service.ts","../../../projects/connect/src/infrab4a-connect.ts"],"sourcesContent":["import { plainToClass, classToPlain } from 'class-transformer'\r\n\r\nimport { NonFunctionProperties } from './types/non-function-properties.type'\r\n\r\nexport class BaseModel<Model> {\r\n constructor(args?: Partial<Model>) {\r\n Object.assign(this, args)\r\n }\r\n\r\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T>): T {\r\n return plainToClass(this, data) as any\r\n }\r\n\r\n toPlain(): any {\r\n return classToPlain(this, { exposeUnsetFields: false })\r\n }\r\n}\r\n","export enum Where {\r\n EQUALS = '==',\r\n GT = '>',\r\n GTE = '>=',\r\n IN = 'in',\r\n LT = '<',\r\n LTE = '<=',\r\n LIKE = 'like',\r\n}\r\n","export enum UpdateOptionActions {\r\n UPDATE = 'update',\r\n MERGE = 'merge',\r\n REMOVE = 'remove',\r\n REMOVE_FIELD = 'removeField',\r\n NULL = 'null',\r\n}\r\n","export enum UserType {\r\n B2C = 'Cliente Transacional',\r\n GlamGirl = 'Glamgirl',\r\n MensBoy = 'Mensboy',\r\n B2B = 'Company',\r\n Collaborator = 'Funcionário',\r\n Influencer = 'Influencer',\r\n}\r\n","export enum BeardSizes {\r\n BIG = 'Grande',\r\n MEDIUM = 'Média',\r\n SHORT = 'Curta',\r\n MUSTACHE = 'Bigode',\r\n NOTHING = 'Sem Barba',\r\n}\r\n","export enum HairTypes {\r\n Smooth = 'Liso',\r\n WAVY = 'Ondulado',\r\n CURLY = 'Cacheado',\r\n FRIZZY = 'Crespo',\r\n BALD = 'Sou careca',\r\n}\r\n","export enum Area {\r\n GP = 'Geral',\r\n CRM = 'CRM',\r\n MediaProd = 'Media Production',\r\n Tech = 'Tecnologia',\r\n Transactional = 'Transacional',\r\n Operations = 'Opera\\u00E7\\u00F5es',\r\n Sales = 'Comercial',\r\n Finantial = 'Financeiro',\r\n HR = 'RH',\r\n}\r\n","export enum OfficePosition {\r\n Intern = 'Estagi\\u00E1rio',\r\n Analyst = 'Analista',\r\n Manager = 'Gerente',\r\n Director = 'Diretor',\r\n}\r\n","export enum BillingStatus {\r\n PAYED = 'PAGO',\r\n}\r\n","export enum EditionStatus {\r\n ALLOCATION_WAITING = 'Aguardando alocação',\r\n}\r\n","export enum PaymentType {\r\n AQUISITION = 'Aquisição',\r\n RENEWAL = 'Renovação',\r\n FREIGHT = 'mudança de endereço, Frete',\r\n}\r\n","export enum Status {\r\n ACTIVE = 'active',\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\r\n\r\nimport { EditionStatus, BillingStatus } from './enums'\r\n\r\nexport class Edition extends BaseModel<Edition> implements IdentifierFields<Edition> {\r\n id: string\r\n subscriptionId: string\r\n billingStatus: BillingStatus\r\n editionId: number\r\n editionStatus: EditionStatus\r\n installment: number\r\n paymentId: string\r\n draftId?: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Edition>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { Payment } from '../../../shopping/models/payment'\r\n\r\nimport { PaymentType } from './enums/payment-type.enum'\r\n\r\nexport class SubscriptionPayment\r\n extends BaseModel<SubscriptionPayment>\r\n implements IdentifierFields<SubscriptionPayment>\r\n{\r\n id: string\r\n subscriptionId: string\r\n paymentType: PaymentType\r\n payment: Payment\r\n createdAt: Date\r\n attempts?: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<SubscriptionPayment>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Address } from '../../../location/models/address'\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { Coupon } from '../../../shopping/models/coupons/coupon'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\r\nimport { SubscriptionPlan } from '../../../shopping/models/subscription/plan'\r\nimport { User } from '../user'\r\n\r\nimport { Edition } from './edition'\r\nimport { Status } from './enums/status.enum'\r\nimport { SubscriptionPayment } from './payment'\r\n\r\nexport class Subscription extends BaseModel<Subscription> implements IdentifierFields<Subscription> {\r\n id: string\r\n nextPayment: Date\r\n recurrence: boolean\r\n status: Status\r\n user: User\r\n subscriptionPlan: SubscriptionPlan\r\n shippingAddress: Address\r\n billingAddress?: Address\r\n cardToken: string\r\n coupon?: Coupon\r\n subtotalPrice?: number\r\n discount?: number\r\n totalPrice?: number\r\n editions: Edition[]\r\n payment?: SubscriptionPayment[]\r\n createdAt: Date\r\n updatedAt: Date\r\n\r\n identifierFields(): NonFunctionPropertyNames<Subscription>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionProperties, NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nimport { Area, OfficePosition, UserType } from './enums'\r\nimport { BeautyProfile } from './beauty-profile'\r\n\r\nexport class User extends BaseModel<User> implements IdentifierFields<User> {\r\n id: string\r\n cpf?: string\r\n email: string\r\n firstName: string\r\n lastName: string\r\n displayName?: string\r\n phone: string\r\n birthday?: Date\r\n acceptsNewsletter: boolean\r\n type?: UserType\r\n beautyProfile?: BeautyProfile\r\n area?: Area\r\n officePosition?: OfficePosition\r\n\r\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T> & NonFunctionProperties<User>): T {\r\n const instance = super.toInstance<User>(data)\r\n\r\n instance.displayName = `${data.firstName} ${data.lastName}`\r\n\r\n return instance as any\r\n }\r\n\r\n identifierFields(): NonFunctionPropertyNames<User>[] {\r\n return ['id']\r\n }\r\n\r\n toPlain(): any {\r\n const plain = super.toPlain()\r\n\r\n delete plain.beautyProfile\r\n\r\n return plain\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\r\n\r\nimport { BeardSizes, HairTypes } from './enums'\r\n\r\nexport class BeautyProfile extends BaseModel<BeautyProfile> implements IdentifierFields<BeautyProfile> {\r\n id: string\r\n userId: string\r\n beardSize?: BeardSizes\r\n hairType?: HairTypes\r\n\r\n toPlain(): any {\r\n const plain = super.toPlain()\r\n\r\n delete plain.id\r\n\r\n return plain\r\n }\r\n\r\n identifierFields(): NonFunctionPropertyNames<BeautyProfile>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\n\r\nimport { LocationGeometry } from './types/location-geometry.type'\r\n\r\nexport abstract class Address extends BaseModel<Address> {\r\n default?: boolean\r\n recipient?: string\r\n zip?: string\r\n street?: string\r\n number?: string\r\n extension?: string\r\n district?: string\r\n city?: string\r\n regionalPole?: string\r\n region?: string\r\n state?: string\r\n country?: string\r\n mailbox?: boolean\r\n mailboxNumber?: string\r\n formattedAddress?: string\r\n placeId?: string\r\n geometry?: LocationGeometry\r\n}\r\n","import { Address } from '../../location/models/address'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\r\n\r\nexport class UserAddress extends Address {\r\n id: string\r\n userId: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<UserAddress>[] {\r\n return ['id']\r\n }\r\n}\r\n","export class Base {\r\n constructor(...args: Array<any>) {\r\n Object.assign(this, ...args)\r\n }\r\n}\r\n","export class UnauthorizedError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","import { Area, OfficePosition, User, UserType } from '../models'\r\nimport { AuthenticationService } from '../services/authentication.service'\r\nimport { isNil } from '../../../utils'\r\nimport { UnauthorizedError } from '../errors/unauthorized.error'\r\nimport { UserRepository } from '../repositories/user.repository'\r\n\r\nexport enum SignInMethods {\r\n EMAIL_PASSWORD = 'email_password',\r\n GOOGLE = 'google',\r\n}\r\n\r\ntype SignInMethod = Lowercase<keyof typeof SignInMethods>\r\n\r\ntype SignInParams = {\r\n email?: string\r\n password?: string\r\n}\r\n\r\nexport class Authentication {\r\n constructor(private readonly authService: AuthenticationService, private readonly userRepository: UserRepository) {}\r\n\r\n async signIn({ email, password }: SignInParams, signInMethod: SignInMethod): Promise<User> {\r\n const method = this.getServiceByMethod(signInMethod)\r\n const userAuth = await this.authService[method]({ email, password })\r\n const user = this.userRepository.get(userAuth)\r\n\r\n if (!isNil(user)) return user\r\n if (/^.+@b4a.com.br$/.test(userAuth.email)) return this.createsUserByCredential(userAuth)\r\n\r\n throw new UnauthorizedError('Invalid credentials')\r\n }\r\n\r\n private getServiceByMethod(signInMethod: SignInMethod): string {\r\n return signInMethod === SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle'\r\n }\r\n\r\n private async createsUserByCredential(user: Partial<User>): Promise<User> {\r\n const [firstName, lastName] = user.displayName?.split(/\\s/)\r\n const person = User.toInstance({\r\n ...user,\r\n cpf: '',\r\n birthday: new Date(),\r\n firstName,\r\n lastName,\r\n acceptsNewsletter: false,\r\n area: Area.Transactional,\r\n officePosition: OfficePosition.Intern,\r\n type: UserType.Collaborator,\r\n })\r\n\r\n return this.userRepository.create(person)\r\n }\r\n}\r\n","import { AuthenticationService } from '../services/authentication.service'\r\n\r\nexport class SignOut {\r\n constructor(private readonly authService: AuthenticationService) {}\r\n\r\n async signOut(): Promise<void> {\r\n await this.authService.signOut()\r\n }\r\n}\r\n","export enum Shops {\r\n MENSMARKET = `Men's Market`,\r\n GLAMSHOP = 'Glamshop',\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\nimport { Shops } from './enums'\r\n\r\nimport { CategoryCondition, CategoryFilter } from './types'\r\n\r\nexport class Category extends BaseModel<Category> implements IdentifierFields<Category> {\r\n id: string\r\n brandCategory: boolean\r\n brandLogo?: string\r\n name: string\r\n slug: string\r\n image?: string\r\n brandCategoryBanner?: string\r\n description: string\r\n conditions?: CategoryCondition\r\n products?: string[]\r\n filters?: CategoryFilter[]\r\n createdAt: Date\r\n updatedAt: Date\r\n shop: Shops\r\n\r\n identifierFields(): NonFunctionPropertyNames<Category>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\n\r\nimport { Shops } from './enums/shops.enum'\r\nimport { ProductReview, ShopsDescription, ShopsPrice, Stock } from './types'\r\nimport { Variant } from './variant'\r\n\r\nexport class Product extends BaseModel<Product> implements IdentifierFields<Product> {\r\n id: string\r\n name: string\r\n slug: string\r\n shopAvailability: Shops[]\r\n description: ShopsDescription\r\n sku: string\r\n price: ShopsPrice\r\n hasVariants: boolean\r\n NCM: string\r\n EAN: string\r\n CEST: string\r\n weight: number\r\n stock: Stock\r\n costPrice: number\r\n images?: string[]\r\n published: boolean\r\n createdAt: Date\r\n updatedAt: Date\r\n brand: string\r\n tags?: string[]\r\n type?: string\r\n categories?: string[]\r\n reviews?: ProductReview[]\r\n variant?: Variant\r\n\r\n identifierFields(): NonFunctionPropertyNames<Product>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\n\r\nimport { ShopsPrice, Stock, VariantGrade } from './types'\r\n\r\nexport class Variant extends BaseModel<Variant> implements IdentifierFields<Variant> {\r\n id: string\r\n productId: string\r\n sku: string\r\n price: ShopsPrice\r\n EAN: string\r\n stock: Stock\r\n grade: VariantGrade[]\r\n\r\n identifierFields(): NonFunctionPropertyNames<Variant>[] {\r\n return ['id']\r\n }\r\n}\r\n","export enum CouponTypes {\r\n FINANCIAL = 1,\r\n PRODUCT,\r\n GIFTCARD,\r\n VOUCHER,\r\n}\r\n","export enum CouponSubtypes {\r\n ABSOLUTE = 1,\r\n PERCENTAGE,\r\n}\r\n","export enum Exclusivities {\r\n ALL_USERS = 1,\r\n SPECIFIC_USER = 2,\r\n COLLABORATORS = 3,\r\n}\r\n","import { Expose } from 'class-transformer'\r\n\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { Shops } from '../../../catalog/models/enums/shops.enum'\r\n\r\nimport { CouponTypes, Exclusivities } from './enums'\r\n\r\nexport class Coupon extends BaseModel<Coupon> implements IdentifierFields<Coupon> {\r\n id: string\r\n type: CouponTypes\r\n discount?: number\r\n user?: string\r\n recipient?: string\r\n store?: Shops\r\n campaign?: string\r\n name: string\r\n nickname: string\r\n expiresIn?: Date\r\n useLimit?: number\r\n createdAt: Date\r\n updatedAt?: Date\r\n shopAvailability: Shops\r\n\r\n @Expose({ name: 'checkout_type' })\r\n checkoutType: CheckoutTypes\r\n @Expose({ name: 'exclusivity_type' })\r\n exclusivityType?: Exclusivities\r\n\r\n identifierFields(): NonFunctionPropertyNames<Coupon>[] {\r\n return ['id']\r\n }\r\n}\r\n","export enum CheckoutTypes {\r\n ECOMMERCE = 1,\r\n SUBSCRIPTION = 2,\r\n}\r\n","import { Md5 } from 'ts-md5'\r\n\r\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\r\n\r\nimport { Coupon } from './coupon'\r\nimport { CouponTypes, CouponSubtypes } from './enums'\r\n\r\nconst COUPON_EXPIRATION = 60 * 60 * 24 * 30\r\n\r\nexport class FinancialCoupon extends Coupon {\r\n type = CouponTypes.FINANCIAL\r\n subtype: CouponSubtypes\r\n\r\n static isFinancialCoupon(coupon: Partial<FinancialCoupon>): coupon is FinancialCoupon {\r\n return coupon.type === CouponTypes.FINANCIAL && !!coupon.subtype\r\n }\r\n\r\n static createCoupon(userId: string): FinancialCoupon {\r\n return this.toInstance({\r\n name: Md5.hashStr(`${userId}_${Date.now}`).toString(),\r\n nickname: `${Date.now()}`,\r\n type: CouponTypes.FINANCIAL,\r\n subtype: CouponSubtypes.PERCENTAGE,\r\n checkoutType: CheckoutTypes.ECOMMERCE,\r\n discount: 30,\r\n user: userId,\r\n createdAt: new Date(Date.now()),\r\n expiresIn: new Date(Date.now() + COUPON_EXPIRATION),\r\n })\r\n }\r\n}\r\n","export enum OrderStatus {\r\n AGUARDANDO_PAGAMENTO = 'Aguardando pagamento',\r\n EM_PREPARO = 'Preparando pedido',\r\n NF_EMITIDA = 'Nota Fiscal Emitida',\r\n AGUARDANDO_ENVIO = 'Aguardando Transaportadora',\r\n ENVIADO = 'Pedido Enviado',\r\n ENTREGUE = 'Pedido entregue',\r\n CANCELADO = 'Cancelado',\r\n CREDIT_CARD = 'credit_card',\r\n}\r\n","import { Address } from '../../location/models/address'\r\nimport { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\nimport { User } from '../../users/models/user'\r\n\r\nimport { Coupon } from './coupons/coupon'\r\nimport { LineItem } from './line-item'\r\nimport { ShippingMethod } from './shipping-method'\r\nimport { Shops } from '../../catalog/models/enums/shops.enum'\r\n\r\nexport class Checkout extends BaseModel<Checkout> implements IdentifierFields<Checkout> {\r\n id?: string\r\n paymentId?: string\r\n status?: string\r\n createdAt?: Date\r\n updatedAt?: Date\r\n completedAt?: Date\r\n lineItems?: LineItem[]\r\n user?: Partial<User>\r\n shippingAddress?: Partial<Address>\r\n billingAddress?: Partial<Address>\r\n shipping?: ShippingMethod\r\n coupon?: Coupon\r\n discount?: number\r\n subTotalPrice?: number\r\n totalPrice?: number\r\n shop: Shops\r\n\r\n identifierFields(): NonFunctionPropertyNames<Checkout>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Product } from '../../catalog/models/product'\r\n\r\nexport class LineItem extends Product {\r\n parentId?: string\r\n quantity: number\r\n isGift?: boolean\r\n pricePaid?: number\r\n}\r\n","import { Checkout } from './checkout'\r\nimport { OrderStatus } from './enums/order-status.enum'\r\nimport { Payment } from './payment'\r\n\r\nexport class Order extends Checkout {\r\n status: OrderStatus\r\n payment: Payment\r\n}\r\n","import { Expose } from 'class-transformer'\r\n\r\nimport { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nimport { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types'\r\n\r\nexport class Payment extends BaseModel<Payment> implements IdentifierFields<Payment> {\r\n id: number\r\n object: string\r\n status: string\r\n tid: number\r\n nsu: number\r\n amount: number\r\n cost: number\r\n installments: number\r\n referer: string\r\n ip: string\r\n phone: string\r\n address: string\r\n metadata: any\r\n device: string\r\n payment: string\r\n addition: string\r\n discount: string\r\n customer: PaymentCustomer\r\n billing: PaymentBilling\r\n shipping: PaymentShipping\r\n items: PaymentItem[]\r\n card: PaymentCard\r\n\r\n @Expose({ name: 'refuse_reason' })\r\n refuseReason: string\r\n @Expose({ name: 'status_reason' })\r\n statusReason: string\r\n @Expose({ name: 'acquirer_response_code' })\r\n acquirerResponseCode: string\r\n @Expose({ name: 'acquirer_name' })\r\n acquirerName: string\r\n @Expose({ name: 'acquirer_id' })\r\n acquirerId: string\r\n @Expose({ name: 'authorization_code' })\r\n authorizationCode: string\r\n @Expose({ name: 'soft_descriptor' })\r\n softDescriptor: string\r\n @Expose({ name: 'date_created' })\r\n dateCreated: string\r\n @Expose({ name: 'date_updated' })\r\n dateUpdated: string\r\n @Expose({ name: 'authorized_amount' })\r\n authorizedAmount: number\r\n @Expose({ name: 'paid_amount' })\r\n paidAmount: number\r\n @Expose({ name: 'refunded_amount' })\r\n refundedAmount: number\r\n @Expose({ name: 'card_holder_name' })\r\n cardHolderName: string\r\n @Expose({ name: 'card_last_digits' })\r\n cardLastDigits: string\r\n @Expose({ name: 'card_first_digits' })\r\n cardFirstDigits: string\r\n @Expose({ name: 'card_brand' })\r\n cardBrand: string\r\n @Expose({ name: 'card_pin_mode' })\r\n cardPinMode: string\r\n @Expose({ name: 'card_magstripe_fallback' })\r\n cardMagstripeFallback: boolean\r\n @Expose({ name: 'cvm_pin' })\r\n cvmPin: boolean\r\n @Expose({ name: 'postback_url' })\r\n postbackUrl: string\r\n @Expose({ name: 'payment_method' })\r\n paymentMethod: string\r\n @Expose({ name: 'capture_method' })\r\n captureMethod: string\r\n @Expose({ name: 'antifraud_score' })\r\n antifraudScore: string\r\n @Expose({ name: 'boleto_url' })\r\n boletoUrl: string\r\n @Expose({ name: 'boleto_barcode' })\r\n boletoBarcode: string\r\n @Expose({ name: 'boleto_expiration_date' })\r\n boletoExpirationDate: string\r\n @Expose({ name: 'subscription_id' })\r\n subscriptionId: string\r\n @Expose({ name: 'split_rules' })\r\n splitRules: string\r\n @Expose({ name: 'antifraud_metadata' })\r\n antifraudMetadata: any\r\n @Expose({ name: 'reference_key' })\r\n referenceKey: string\r\n @Expose({ name: 'local_transaction_id' })\r\n localTransactionId: string\r\n @Expose({ name: 'local_time' })\r\n localTime: string\r\n @Expose({ name: 'fraud_covered' })\r\n fraudCovered: boolean\r\n @Expose({ name: 'fraud_reimbursed' })\r\n fraudReimbursed: string\r\n @Expose({ name: 'order_id' })\r\n orderId: string\r\n @Expose({ name: 'risk_level' })\r\n riskLevel: string\r\n @Expose({ name: 'receipt_url' })\r\n receiptUrl: string\r\n @Expose({ name: 'private_label' })\r\n privateLabel: string\r\n @Expose({ name: 'pix_qr_code' })\r\n pixQrCode: string\r\n @Expose({ name: 'pix_expiration_date' })\r\n pixExpirationDate: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Payment>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nexport class ShippingMethod extends BaseModel<ShippingMethod> implements IdentifierFields<ShippingMethod> {\r\n id: string\r\n CNPJ: string\r\n DaysToDelivery: number\r\n MaxGrams: number\r\n MinGrams: number\r\n ServiceCompanyRangeId: number\r\n ShippingCompanyId: number\r\n ShippingCompanyName: string\r\n ShippingPrice: number\r\n State: string\r\n ZipEnd: number\r\n ZipStart: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<ShippingMethod>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Address } from '../../../location/models/address'\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { Coupon } from '../coupons/coupon'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { User } from '../../../users/models/user'\r\n\r\nimport { SubscriptionPlan } from './plan'\r\n\r\nexport class CheckoutSubscription\r\n extends BaseModel<CheckoutSubscription>\r\n implements IdentifierFields<CheckoutSubscription>\r\n{\r\n id?: string\r\n user: User\r\n createdAt: Date\r\n updatedAt: Date\r\n completedAt?: Date\r\n shippingAddress: Address\r\n subscriptionPlan: SubscriptionPlan\r\n billingAddress?: Address\r\n userId?: string\r\n coupon?: Coupon\r\n discount?: number\r\n subTotalPrice?: number\r\n totalPrice?: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<CheckoutSubscription>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\n\r\nexport class SubscriptionPlan extends BaseModel<SubscriptionPlan> implements IdentifierFields<SubscriptionPlan> {\r\n id: string\r\n name: string\r\n billingPrice: number\r\n recurrencePrice: number\r\n recurrenceCycle: number\r\n maxAttempts: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<SubscriptionPlan>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\nimport { Shops, Category } from '../../catalog/models'\r\n\r\nexport class Buy2Win extends BaseModel<Buy2Win> implements IdentifierFields<Buy2Win> {\r\n active: boolean\r\n cartValue: number\r\n categories: Category[]\r\n createdAt: Date\r\n endDate: Date\r\n id?: string\r\n name: string\r\n products?: string[]\r\n shop: Shops\r\n startDate: Date\r\n updatedAt?: Date\r\n\r\n identifierFields(): NonFunctionPropertyNames<Buy2Win>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\nimport { Banner } from './types/banner.type'\r\nimport { Benefit } from './types/benefit.type'\r\n\r\nexport class Home extends BaseModel<Home> implements IdentifierFields<Home> {\r\n benefitsSection: Benefit\r\n blockBanners: Banner[]\r\n blogBanner: Banner\r\n brandsCarousel: Banner[]\r\n buyToWinBanner: Banner\r\n discoverCategories: string[]\r\n featuredCampaignBanner: Banner\r\n featuredCategories: string[]\r\n heroCarousel: Banner[]\r\n verticalCarousels: string[]\r\n id: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Home>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\nimport { MenuNav } from './types/menu-nav.type'\r\n\r\nexport class ShopMenu extends BaseModel<ShopMenu> implements IdentifierFields<ShopMenu> {\r\n menuNav: MenuNav[]\r\n id: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<ShopMenu>[] {\r\n return ['id']\r\n }\r\n}\r\n","export class InvalidArgumentError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","export class RequiredArgumentError extends Error {\r\n arguments: string[]\r\n\r\n constructor(readonly args: string[]) {\r\n super(`Required arguments: ${args.join(', ')}`)\r\n\r\n this.arguments = args\r\n }\r\n}\r\n","export class NotFoundError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\nimport firebase from 'firebase'\r\n\r\nimport { BaseModelBuilder, BaseModelWithIdentifier } from '../../../../domain'\r\nimport { FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withFirestore = <TBase extends BaseModelWithIdentifier<TBase>>(MixinBase: MixinCtor) => {\r\n return class extends MixinBase implements FirestoreRepository<TBase> {\r\n readonly firestore?: FirebaseFirestore\r\n collectionName: string\r\n model: BaseModelBuilder<TBase>\r\n\r\n constructor(...args: Array<any>) {\r\n super(args)\r\n }\r\n\r\n collection(path?: string): CollectionReference<TBase> {\r\n return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance())\r\n }\r\n\r\n buildModelInstance(): {\r\n toFirestore: (data: TBase) => DocumentData\r\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>) => TBase\r\n } {\r\n return {\r\n toFirestore: (data: TBase): DocumentData => data.toPlain(),\r\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>): TBase => {\r\n const data = snap.data()\r\n\r\n Object.keys(data).forEach((key) => {\r\n if (data[key] instanceof firebase.firestore.Timestamp) {\r\n data[key] = data[key].toDate()\r\n }\r\n })\r\n\r\n return this.model.toInstance({ id: snap.id, ...data })\r\n },\r\n }\r\n }\r\n }\r\n}\r\n","import { QuerySnapshot, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { BaseModelWithIdentifier } from '../../../../domain'\r\n\r\nimport { FirestoreHelpers, FirestoreRepository, FirestoreSubRepository } from '../types'\r\nimport { isNil, MixinCtor } from '../../../../utils'\r\n\r\nexport const withHelpers = <Model extends BaseModelWithIdentifier<Model>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor & TMixinBase,\r\n) => {\r\n return class extends MixinBase implements FirestoreHelpers {\r\n toArray<T extends BaseModelWithIdentifier<T>>(snapShot: QuerySnapshot<T> | QueryDocumentSnapshot<T>[]): T[] {\r\n if (Array.isArray(snapShot)) {\r\n return snapShot.map((doc: QueryDocumentSnapshot<T>) => doc.data())\r\n } else {\r\n return snapShot.docs.map((doc: QueryDocumentSnapshot<T>) => doc.data())\r\n }\r\n }\r\n\r\n isSubCollection<T extends BaseModelWithIdentifier<T>>(\r\n repository: FirestoreRepository<T>,\r\n ): repository is FirestoreSubRepository<T> {\r\n return !isNil(Object.keys(this).find((key) => key === 'parentRepository'))\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, GetRepository, NonFunctionProperties } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isNil, MixinCtor } from '../../../../utils'\r\nimport { NotFoundError } from '../../../../errors'\r\n\r\nexport const withGetFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class GetFirestore extends MixinBase implements GetRepository<TBase> {\r\n async get(identifiers: NonFunctionProperties<TBase>): Promise<TBase> {\r\n const doc = await this.collection(this.buildCollectionPathForGet(identifiers))\r\n .doc(Object.values(identifiers).shift().toString())\r\n .get()\r\n const data = doc.data()\r\n\r\n if (isNil(data)) throw new NotFoundError(`Document ${JSON.stringify(identifiers)} not found`)\r\n\r\n return data\r\n }\r\n\r\n buildCollectionPathForGet(identifiers: NonFunctionProperties<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import { CollectionReference, Query, WhereFilterOp } from '@firebase/firestore-types'\r\n\r\nimport {\r\n BaseModelWithIdentifier,\r\n FindRepository,\r\n NonFunctionPropertyNames,\r\n RepositoryFindFielters,\r\n RepositoryFindFieltersOptions,\r\n RepositoryFindResult,\r\n RepositoryLimitOptions,\r\n RepositoryOrderByList,\r\n Where,\r\n} from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor, isNumber, isString } from '../../../../utils'\r\n\r\nexport const withFindFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class FindFirestore extends MixinBase implements FindRepository<TBase> {\r\n async find(\r\n filters?: RepositoryFindFielters<TBase>[],\r\n limits?: RepositoryLimitOptions<TBase>,\r\n orderBy?: RepositoryOrderByList<TBase>,\r\n ): Promise<RepositoryFindResult<TBase>> {\r\n let query: CollectionReference<TBase> | Query<TBase> = this.collection(this.buildCollectionPathForFind(filters))\r\n\r\n filters?.forEach((filterer) => (query = this.makeFirestoreWhere(query, filterer)))\r\n\r\n orderBy?.forEach((orderer) =>\r\n Object.keys(orderer).forEach((fieldName) => (query = query.orderBy(fieldName, orderer[fieldName]))),\r\n )\r\n\r\n query = this.defineLimits(query, filters, limits)\r\n\r\n const docs = await query.get()\r\n const data = docs.docs.map((doc) => doc.data())\r\n\r\n return {\r\n data,\r\n count: this.calculateCount(data, limits),\r\n }\r\n }\r\n\r\n buildCollectionPathForFind(filters: RepositoryFindFielters<TBase>[]): string {\r\n if (!this.isSubCollection<TBase>(this)) return this.collectionName\r\n\r\n const parentIdField = this.parentIdField\r\n const parentId = filters.find((groupFilter) => Boolean(groupFilter[parentIdField]?.value))?.[parentIdField].value\r\n\r\n return `${this.parentRepository.collectionName}/${parentId}/${this.collectionName}`\r\n }\r\n\r\n makeFirestoreWhere = (\r\n queryReference: CollectionReference<TBase> | Query<TBase>,\r\n filter: RepositoryFindFielters<TBase>,\r\n ): Query<TBase> =>\r\n Object.keys(filter).reduce(\r\n (query: Query<TBase>, fieldName: string) =>\r\n this.buildWhereSentence(query, fieldName as NonFunctionPropertyNames<TBase>, filter[fieldName]),\r\n queryReference,\r\n )\r\n\r\n buildWhereSentence = (\r\n queryReference: CollectionReference<TBase> | Query<TBase>,\r\n fieldName: NonFunctionPropertyNames<TBase>,\r\n options: RepositoryFindFieltersOptions<TBase, NonFunctionPropertyNames<TBase>>,\r\n ): Query<TBase> => {\r\n if (this.isSubCollection<TBase>(this) && fieldName === this.parentIdField) return queryReference\r\n if (options.operator === Where.LIKE) {\r\n queryReference = queryReference.where(fieldName.toString(), '>=', options.value)\r\n queryReference = queryReference.where(fieldName.toString(), '<=', `${options.value}~`)\r\n\r\n return queryReference\r\n }\r\n\r\n return queryReference.where(fieldName.toString(), options.operator as WhereFilterOp, options.value)\r\n }\r\n\r\n defineLimits(\r\n query: CollectionReference<TBase> | Query<TBase>,\r\n filters: RepositoryFindFielters<TBase>[],\r\n limits: RepositoryLimitOptions<TBase>,\r\n ): Query<TBase> {\r\n if (limits?.offset) {\r\n if (limits.offset instanceof this.model)\r\n query = query.startAfter(\r\n this.collection(this.buildCollectionPathForFind(filters)).doc(\r\n limits.offset[limits.offset.identifierFields().shift() as string],\r\n ),\r\n )\r\n if (isNumber(limits.offset) || isString(limits.offset)) query = query.startAt(limits.offset)\r\n }\r\n if (limits?.limit) query = query.limit(limits.limit)\r\n\r\n return query\r\n }\r\n\r\n calculateCount(data: TBase[], limits: RepositoryLimitOptions<TBase>): number {\r\n if (data.length <= 0) return 0\r\n if (data.length < limits?.limit) return data.length\r\n\r\n return Infinity\r\n }\r\n }\r\n}\r\n","import { DocumentReference } from '@firebase/firestore-types'\r\n\r\nimport { CreateRepository, BaseModelWithIdentifier } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isEmpty, MixinCtor } from '../../../../utils'\r\n\r\nexport const withCreateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class CreateFirestore extends MixinBase implements CreateRepository<TBase> {\r\n async create(data: Partial<TBase>): Promise<TBase> {\r\n const docRef = await this.save(this.model.toInstance(data))\r\n const doc = await docRef.get()\r\n\r\n return doc.data()\r\n }\r\n\r\n async save(data: TBase): Promise<DocumentReference<TBase>> {\r\n const id = data[data.identifierFields().shift()]?.toString()\r\n\r\n if (isEmpty(id)) return this.collection(this.buildCollectionPathForAdd(data)).add(data)\r\n\r\n const docRef = this.collection().doc(id)\r\n await docRef.set(data)\r\n\r\n return docRef\r\n }\r\n\r\n buildCollectionPathForAdd(identifiers: Partial<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import firebase from 'firebase'\r\n\r\nimport {\r\n BaseModelWithIdentifier,\r\n NonFunctionPropertyNames,\r\n RepositoryUpdateParams,\r\n UpdateOptionActions,\r\n UpdateOptions,\r\n UpdateRepository,\r\n} from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isNil, MixinCtor, PropType } from '../../../../utils'\r\n\r\nexport const withUpdateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n const getValueFromParams = (\r\n params: RepositoryUpdateParams<TBase>,\r\n field: NonFunctionPropertyNames<TBase>,\r\n ): PropType<TBase, NonFunctionPropertyNames<TBase>> =>\r\n (isNil(params[field as string]?.value) ? params[field as string] : params[field as string].value) || null\r\n const getValueByAction = (options: UpdateOptions<TBase>): firebase.firestore.FieldValue | unknown => {\r\n const fieldValues = firebase.firestore.FieldValue\r\n\r\n if (options.action === UpdateOptionActions.REMOVE_FIELD) return fieldValues.delete()\r\n if (Array.isArray(options.value)) {\r\n if (options.action === UpdateOptionActions.MERGE) return fieldValues.arrayUnion(options.value)\r\n if (options.action === UpdateOptionActions.REMOVE) return fieldValues.arrayRemove(options.value)\r\n }\r\n\r\n return options.value\r\n }\r\n\r\n return class UpdateFirestore extends MixinBase implements UpdateRepository<TBase> {\r\n async update(data: RepositoryUpdateParams<TBase>): Promise<TBase> {\r\n const model = new this.model()\r\n const keyField = model.identifierFields().shift()\r\n const docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(\r\n getValueFromParams(data, keyField).toString(),\r\n )\r\n\r\n await docRef.update(this.paramsToPlain(data))\r\n\r\n const doc = await docRef.get()\r\n\r\n return doc.data()\r\n }\r\n\r\n buildCollectionPathForUpdate(identifiers: RepositoryUpdateParams<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${getValueFromParams(identifiers, this.parentIdField)}/${\r\n this.collectionName\r\n }`\r\n : this.collectionName\r\n }\r\n\r\n paramsToPlain(params: RepositoryUpdateParams<TBase>): Partial<TBase> {\r\n const model = this.model\r\n\r\n if (params instanceof model) return params.toPlain()\r\n\r\n return Object.keys(params).reduce(\r\n (data, currentKey) => ({ ...data, [currentKey]: getValueByAction(data[currentKey]) }),\r\n {},\r\n )\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, NonFunctionProperties, DeleteRepository } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withDeleteFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class DeleteFirestore extends MixinBase implements DeleteRepository<TBase> {\r\n async delete(identifiers: NonFunctionProperties<TBase>): Promise<void> {\r\n await this.collection(this.buildCollectionPathForRemove(identifiers))\r\n .doc(Object.values(identifiers).shift().toString())\r\n .delete()\r\n }\r\n\r\n buildCollectionPathForRemove(identifiers: NonFunctionProperties<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { BaseModelWithIdentifier, NonFunctionPropertyNames } from '../../../../domain'\r\nimport { FirestoreRepository, FirestoreSubRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withSubCollection = <\r\n TBase extends BaseModelWithIdentifier<TBase>,\r\n TBaseParent extends BaseModelWithIdentifier<TBaseParent>,\r\n TMixinBase extends MixinCtor,\r\n>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase>> & TMixinBase,\r\n ParentModel: new () => TBaseParent,\r\n) => {\r\n return class SubCollectionMix\r\n extends MixinBase\r\n implements FirestoreSubRepository<TBase, InstanceType<typeof ParentModel>>\r\n {\r\n readonly parentRepository: FirestoreRepository<InstanceType<typeof ParentModel>>\r\n parentIdField: NonFunctionPropertyNames<TBase>\r\n\r\n constructor(...args: Array<any>) {\r\n super(args)\r\n }\r\n\r\n collection(path?: string): CollectionReference<TBase> {\r\n return super.collection(path)\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, CrudRepository } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nimport { withCreateFirestore } from './with-create-firestore.mixin'\r\nimport { withDeleteFirestore } from './with-delete-firestore.mixin'\r\nimport { withFindFirestore } from './with-find-firestore.mixin'\r\nimport { withGetFirestore } from './with-get-firestore.mixin'\r\nimport { withUpdateFirestore } from './with-update-firestore.mixin'\r\n\r\nexport const withCrudFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class CrudFirestore\r\n extends withUpdateFirestore(\r\n withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))),\r\n )\r\n implements CrudRepository<TBase> {}\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Subscription, SubscriptionRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class SubscriptionFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Subscription>(Base)))\r\n implements SubscriptionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'subscription'\r\n this.model = Subscription\r\n }\r\n}\r\n","import { DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { BeautyProfile, User, UserRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class UserFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<User>(Base)))\r\n implements UserRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'users'\r\n this.model = User\r\n }\r\n\r\n async get(identifiers: Partial<User>): Promise<User> {\r\n const user = await super.get({ id: identifiers.id })\r\n\r\n user.beautyProfile = await this.getBeautyProfile(user.id)\r\n\r\n return user\r\n }\r\n\r\n private async getBeautyProfile(userId: string): Promise<BeautyProfile> {\r\n const beautyProfile = await this.collection()\r\n .doc(userId)\r\n .collection('CX')\r\n .withConverter(this.buildBeautyProfileModelInstance())\r\n .doc('beautyProfile')\r\n .get()\r\n\r\n return beautyProfile.data()\r\n }\r\n\r\n private buildBeautyProfileModelInstance(): {\r\n toFirestore: (data: BeautyProfile) => DocumentData\r\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>) => BeautyProfile\r\n } {\r\n return {\r\n toFirestore: (data: BeautyProfile): DocumentData => data.toPlain(),\r\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>): BeautyProfile =>\r\n BeautyProfile.toInstance(snap.data()),\r\n }\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Edition, Subscription, EditionRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\r\n\r\nexport class SubscriptionEditionFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Edition>(Base))), Subscription)\r\n implements EditionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\r\n super()\r\n this.collectionName = 'editions'\r\n this.parentIdField = 'subscriptionId'\r\n this.model = Edition\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { BeautyProfile, BeautyProfileRepository, User } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { UserFirestoreRepository } from './user-firestore.repository'\r\n\r\nexport class UserBeautyProfileFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<BeautyProfile>(Base))), User)\r\n implements BeautyProfileRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\r\n super()\r\n this.collectionName = 'CX'\r\n this.parentIdField = 'userId'\r\n this.model = BeautyProfile\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { User, UserAddress, UserAddressRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { UserFirestoreRepository } from './user-firestore.repository'\r\n\r\nexport class UserAddressFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<UserAddress>(Base))), User)\r\n implements UserAddressRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\r\n super()\r\n this.collectionName = 'address'\r\n this.parentIdField = 'userId'\r\n this.model = UserAddress\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { SubscriptionPayment, Subscription, SubscriptionPaymentRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\r\n\r\nexport class SubscriptionPaymentFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<SubscriptionPayment>(Base))), Subscription)\r\n implements SubscriptionPaymentRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\r\n super()\r\n this.collectionName = 'Payments'\r\n this.parentIdField = 'subscriptionId'\r\n this.model = SubscriptionPayment\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Category, CategoryRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CategoryFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Category>(Base)))\r\n implements CategoryRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'categories'\r\n this.model = Category\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Product, ProductRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class ProductFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Product>(Base)))\r\n implements ProductRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'products'\r\n this.model = Product\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Product, Variant, VariantRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { ProductFirestoreRepository } from './product-firestore.repository'\r\n\r\nexport class ProductVariantFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Variant>(Base))), Product)\r\n implements VariantRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: ProductFirestoreRepository) {\r\n super()\r\n this.collectionName = 'Variants'\r\n this.parentIdField = 'productId'\r\n this.model = Variant\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Checkout, CheckoutRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CheckoutFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Checkout>(Base)))\r\n implements CheckoutRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'checkouts'\r\n this.model = Checkout\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Coupon, CouponRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CouponFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Coupon>(Base)))\r\n implements CouponRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'coupons'\r\n this.model = Coupon\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Order, OrderRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class OrderFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Order>(Base)))\r\n implements OrderRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'orders'\r\n this.model = Order\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Payment, PaymentRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class PaymentFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Payment>(Base)))\r\n implements PaymentRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'payments'\r\n this.model = Payment\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { CheckoutSubscription, CheckoutSubscriptionRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CheckoutSubscriptionFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<CheckoutSubscription>(Base)))\r\n implements CheckoutSubscriptionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'checkoutsSubscription'\r\n this.model = CheckoutSubscription\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { SubscriptionPlan, SubscriptionPlanRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class SubscriptionPlanFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<SubscriptionPlan>(Base)))\r\n implements SubscriptionPlanRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'subscriptionPlans'\r\n this.model = SubscriptionPlan\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Buy2Win, Buy2WinRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class Buy2WinFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Buy2Win>(Base)))\r\n implements Buy2WinRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'buy2win'\r\n this.model = Buy2Win\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Home, HomeRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class HomeFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Home>(Base)))\r\n implements HomeRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'dms'\r\n this.model = Home\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\nimport { ShopMenu, ShopMenuRepository } from '../../../../../domain'\r\n\r\nimport { Base } from '../../../../../utils'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class ShopMenuFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<ShopMenu>(Base)))\r\n implements ShopMenuRepository {\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'shopMenus'\r\n this.model = ShopMenu\r\n }\r\n}\r\n","import firebase from 'firebase/app'\r\n\r\nimport { AuthenticationService, LoginAndPasswordParams, User } from '../../../domain'\r\n\r\nexport class AuthenticationFirebaseAuthService implements AuthenticationService {\r\n constructor(private readonly firebaseAuth: firebase.auth.Auth) {}\r\n\r\n async signInWithEmailAndPassword(data: LoginAndPasswordParams): Promise<Partial<User>> {\r\n const credentials = await this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password)\r\n const user = credentials.user\r\n\r\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\r\n }\r\n\r\n async signInWithGoogle(): Promise<Partial<User>> {\r\n const credentials = await this.firebaseAuth.signInWithPopup(new firebase.auth.GoogleAuthProvider())\r\n const user = credentials.user\r\n\r\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\r\n }\r\n\r\n async signOut(): Promise<void> {\r\n this.firebaseAuth.signOut()\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["firebase"],"mappings":";;;;;;;;M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