@lyxa.ai/core 1.0.34 → 1.0.36
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/dist/libraries/mongo/models/core-user.model.d.ts +1 -0
- package/dist/libraries/mongo/models/core-user.model.js +5 -0
- package/dist/libraries/mongo/models/core-user.model.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +3 -0
- package/dist/libraries/mongo/models/index.js +4 -1
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/mongo/models/providers/regular-order.model.d.ts +3 -3
- package/dist/libraries/mongo/models/providers/regular-order.model.js +3 -3
- package/dist/libraries/mongo/models/providers/regular-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/rider.model.d.ts +3 -2
- package/dist/libraries/mongo/models/rider.model.js +19 -9
- package/dist/libraries/mongo/models/rider.model.js.map +1 -1
- package/dist/utilities/common/password.d.ts +1 -0
- package/dist/utilities/common/password.js +11 -0
- package/dist/utilities/common/password.js.map +1 -1
- package/dist/utilities/enum.d.ts +4 -0
- package/dist/utilities/enum.js +6 -1
- package/dist/utilities/enum.js.map +1 -1
- package/dist/utilities/validation/common-validation.d.ts +18 -0
- package/dist/utilities/validation/common-validation.js +1 -0
- package/dist/utilities/validation/common-validation.js.map +1 -1
- package/package.json +2 -2
|
@@ -23,6 +23,7 @@ let CoreUser = class CoreUser extends defaultClasses_1.TimeStamps {
|
|
|
23
23
|
profilePhoto;
|
|
24
24
|
status;
|
|
25
25
|
deviceIds;
|
|
26
|
+
stripeCustomerId;
|
|
26
27
|
};
|
|
27
28
|
exports.CoreUser = CoreUser;
|
|
28
29
|
__decorate([
|
|
@@ -61,6 +62,10 @@ __decorate([
|
|
|
61
62
|
(0, typegoose_1.prop)({ required: true, type: () => [String] }),
|
|
62
63
|
__metadata("design:type", Array)
|
|
63
64
|
], CoreUser.prototype, "deviceIds", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], CoreUser.prototype, "stripeCustomerId", void 0);
|
|
64
69
|
exports.CoreUser = CoreUser = __decorate([
|
|
65
70
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'coreUsers' } })
|
|
66
71
|
], CoreUser);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/core-user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAiD;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,GAAG,CAAQ;IAGX,WAAW,CAAU;IAGrB,SAAS,CAAY;IAGrB,YAAY,CAAU;IAGtB,MAAM,CAAU;IAGhB,SAAS,CAAY;
|
|
1
|
+
{"version":3,"file":"core-user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/core-user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAiD;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,GAAG,CAAQ;IAGX,WAAW,CAAU;IAGrB,SAAS,CAAY;IAGrB,YAAY,CAAU;IAGtB,MAAM,CAAU;IAGhB,SAAS,CAAY;IAGrB,gBAAgB,CAAU;CACjC,CAAA;AA9BY,4BAAQ;AAEb;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uCACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCAChB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACxB,IAAI;qCAAC;AAGX;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACX;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACM;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;wCACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;2CACnB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACU;mBA7BrB,QAAQ;IADpB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC;GAChD,QAAQ,CA8BpB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { Status } from '../../../utilities/enum';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'coreUsers' } })\r\nexport class CoreUser extends TimeStamps {\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic gender!: string;\r\n\r\n\t@prop({ required: true, type: Date })\r\n\tpublic dob!: Date;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic countryISO2!: string;\r\n\r\n\t@prop({ type: () => [String], default: [] })\r\n\tpublic fcmTokens?: string[];\r\n\r\n\t@prop({ type: String })\r\n\tpublic profilePhoto?: string;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ required: true, type: () => [String] })\r\n\tpublic deviceIds!: string[];\r\n\r\n\t@prop({ type: String })\r\n\tpublic stripeCustomerId?: string;\r\n}\r\n"]}
|
|
@@ -73,6 +73,7 @@ import { Gallery } from './gallery.model';
|
|
|
73
73
|
import { Order } from './order.model';
|
|
74
74
|
import { RegularOrder } from './providers/regular-order.model';
|
|
75
75
|
import { CourierOrder } from './providers/courier-order.model';
|
|
76
|
+
import { OrderDelivery } from './order-delivery.model';
|
|
76
77
|
export declare const ActivityLogModel: ReturnModelType<typeof ActivityLog>;
|
|
77
78
|
export * from './activity-log.model';
|
|
78
79
|
export declare const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl>;
|
|
@@ -221,3 +222,5 @@ export * from './providers/regular-order.model';
|
|
|
221
222
|
export * from './providers/courier-order.model';
|
|
222
223
|
export declare const GalleryModel: ReturnModelType<typeof Gallery>;
|
|
223
224
|
export * from './gallery.model';
|
|
225
|
+
export declare const OrderDeliveryModel: ReturnModelType<typeof OrderDelivery>;
|
|
226
|
+
export * from './order-delivery.model';
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductModel = exports.ProductMarketingModel = exports.ParentModel = exports.NutritionModel = exports.NotificationModel = exports.MealPlanModel = exports.PunchMarketingModel = exports.LoyaltyPointMarketingModel = exports.FreeDeliveryMarketingModel = exports.FeaturedMarketingModel = exports.DiscountMarketingModel = exports.Buy1Get1MarketingModel = exports.MarketingModel = exports.LoyaltyPointSettingModel = exports.LoyaltyPointCategoryModel = exports.ListContainerModel = exports.FilterContainerModel = exports.FeaturedSettingModel = exports.FavouriteModel = exports.FaqModel = exports.DishModel = exports.DealSettingModel = exports.ReferralRewardCouponModel = exports.ReferralCodeCouponModel = exports.IndividualUserCouponModel = exports.IndividualStoreCouponModel = exports.GlobalCouponModel = exports.CustomCouponModel = exports.CouponModel = exports.CounterModel = exports.CoreUserModel = exports.CoreAppleAuthIdentityModel = exports.CoreGoogleAuthIdentityModel = exports.CorePhoneAuthIdentityModel = exports.CoreEmailAuthIdentityModel = exports.CoreAuthIdentityModel = exports.CategoryModel = exports.AreebaCardModel = exports.CardModel = exports.BrandModel = exports.BOBFinanceModel = exports.BannerModel = exports.AttributeModel = exports.AppScreenSettingModel = exports.AdminModel = exports.AdminAccessControlModel = exports.ActivityLogModel = void 0;
|
|
18
|
-
exports.GalleryModel = exports.CourierOrderModel = exports.RegularOrderModel = exports.OrderModel = exports.CartParticipantModel = exports.LineItemModel = exports.CartModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopReviewModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RoleModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.RiderReviewModel = exports.RequestAreaModel = void 0;
|
|
18
|
+
exports.OrderDeliveryModel = exports.GalleryModel = exports.CourierOrderModel = exports.RegularOrderModel = exports.OrderModel = exports.CartParticipantModel = exports.LineItemModel = exports.CartModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopReviewModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RoleModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.RiderReviewModel = exports.RequestAreaModel = void 0;
|
|
19
19
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
20
20
|
const admin_model_1 = require("./admin.model");
|
|
21
21
|
const admin_access_control_model_1 = require("./admin-access-control.model");
|
|
@@ -93,6 +93,7 @@ const gallery_model_1 = require("./gallery.model");
|
|
|
93
93
|
const order_model_1 = require("./order.model");
|
|
94
94
|
const regular_order_model_1 = require("./providers/regular-order.model");
|
|
95
95
|
const courier_order_model_1 = require("./providers/courier-order.model");
|
|
96
|
+
const order_delivery_model_1 = require("./order-delivery.model");
|
|
96
97
|
exports.ActivityLogModel = (0, typegoose_1.getModelForClass)(activity_log_model_1.ActivityLog);
|
|
97
98
|
__exportStar(require("./activity-log.model"), exports);
|
|
98
99
|
exports.AdminAccessControlModel = (0, typegoose_1.getModelForClass)(admin_access_control_model_1.AdminAccessControl);
|
|
@@ -241,4 +242,6 @@ __exportStar(require("./providers/regular-order.model"), exports);
|
|
|
241
242
|
__exportStar(require("./providers/courier-order.model"), exports);
|
|
242
243
|
exports.GalleryModel = (0, typegoose_1.getModelForClass)(gallery_model_1.Gallery);
|
|
243
244
|
__exportStar(require("./gallery.model"), exports);
|
|
245
|
+
exports.OrderDeliveryModel = (0, typegoose_1.getModelForClass)(order_delivery_model_1.OrderDelivery);
|
|
246
|
+
__exportStar(require("./order-delivery.model"), exports);
|
|
244
247
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,yEAA8D;AAC9D,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA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UAAU,GAAkC,IAAA,4BAAgB,EAAC,mBAAK,CAAC,CAAC;AACpE,QAAA,iBAAiB,GAAyC,IAAA,yCAA6B,EACnG,kBAAU,EACV,kCAAY,EACZ,gBAAS,CAAC,OAAO,CACjB,CAAC;AACW,QAAA,iBAAiB,GAAyC,IAAA,yCAA6B,EACnG,kBAAU,EACV,kCAAY,EACZ,gBAAS,CAAC,OAAO,CACjB,CAAC;AACF,gDAA8B;AAC9B,kEAAgD;AAChD,kEAAgD;AAEnC,QAAA,YAAY,GAAoC,IAAA,4BAAgB,EAAC,uBAAO,CAAC,CAAC;AACvF,kDAAgC","sourcesContent":["import { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\r\nimport { Admin } from './admin.model';\r\nimport { AdminAccessControl } from './admin-access-control.model';\r\nimport { ActivityLog } from './activity-log.model';\r\nimport { AppScreenSetting } from './app-screen-setting.model';\r\nimport { Attribute } from './attribute.model';\r\nimport { Banner } from './banner.model';\r\nimport { BOBFinance } from './bob-finance.model';\r\nimport { Brand } from './brand.model';\r\nimport { Category } from './category.model';\r\nimport { Counter } from './counter.model';\r\nimport { Coupon } from './coupon.model';\r\nimport { DealSetting } from './deal-setting.model';\r\nimport { Dish } from './dish.model';\r\nimport { Faq } from './faq.model';\r\nimport { Favourite } from './favourite.model';\r\nimport { FeaturedSetting } from './featured-setting.model';\r\nimport { FilterContainer } from './filter-container.model';\r\nimport { ListContainer } from './list-container.model';\r\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\r\nimport { LoyaltyPointSetting } from './loyalty-point-setting.model';\r\nimport { Marketing } from './marketing.model';\r\nimport { MealPlan } from './meal-plan.model';\r\nimport { Nutrition } from './nutrition.model';\r\nimport { Parent } from './parent.model';\r\nimport { ProductMarketing } from './product-marketing.model';\r\nimport { Product } from './product.model';\r\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\r\nimport { RatingSetting } from './rating-setting.model';\r\nimport { ReferralSetting } from './referral-setting.model';\r\nimport { RequestArea } from './request-area.model';\r\nimport { RiderReview } from './rider-review.model';\r\nimport { Role } from './role.model';\r\nimport { createGlobalDiscriminatorModel, createGlobalModel } from '../../mongo';\r\nimport { Setting } from './setting.model';\r\nimport { ShopAccessControl } from './shop-access-control.model';\r\nimport { ShopCategory } from './shop-category.model';\r\nimport { ShopMealPlan } from './shop-meal-plan.model';\r\nimport { ShopReview } from './shop-review.model';\r\nimport { Shop } from './shop.model';\r\nimport { SubscriptionSetting } from './subscription-setting.model';\r\nimport { Subscription } from './subscription.model';\r\nimport { Tag } from './tag.model';\r\nimport { Zone } from './zone.model';\r\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\r\nimport {\r\n\tCardType,\r\n\tCoreAuthIdentityType,\r\n\tCouponType,\r\n\tMarketingType,\r\n\tOrderType,\r\n} from '../../../utilities/enum';\r\nimport { CustomCoupon } from './providers/custom-coupon.model';\r\nimport { DiscountMarketing } from './providers/discount-marketing.model';\r\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\r\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\r\nimport { GlobalCoupon } from './providers/global-coupon.model';\r\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\r\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\r\nimport { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model';\r\nimport { PunchMarketing } from './providers/punch-marketing.model';\r\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\r\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\r\nimport { Notification } from './notification.model';\r\nimport { CoreAuthIdentity } from './core-auth-identity.model';\r\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\r\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\r\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\r\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\r\nimport { CoreUser } from './core-user.model';\r\nimport { Card } from './card.model';\r\nimport { AreebaCard } from './providers/areeba-card.model';\r\nimport { RiderTracking } from './rider-tracking.model';\r\nimport { Rider } from './rider.model';\r\nimport { RiderTimeout } from './rider-timeout.model';\r\nimport { User } from './user.model';\r\nimport { Cart } from './cart.model';\r\nimport { LineItem } from './line-item.model';\r\nimport { CartParticipant } from './cart-participant.model';\r\nimport { Gallery } from './gallery.model';\r\nimport { Order } from './order.model';\r\nimport { RegularOrder } from './providers/regular-order.model';\r\nimport { CourierOrder } from './providers/courier-order.model';\r\n\r\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\r\nexport * from './activity-log.model';\r\n\r\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\r\n\tgetModelForClass(AdminAccessControl);\r\nexport * from './admin-access-control.model';\r\n\r\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\r\nexport * from './admin.model';\r\n\r\nexport const AppScreenSettingModel: ReturnModelType<typeof AppScreenSetting> =\r\n\tgetModelForClass(AppScreenSetting);\r\nexport * from './app-screen-setting.model';\r\n\r\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\r\nexport * from './attribute.model';\r\n\r\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\r\nexport * from './banner.model';\r\n\r\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\r\nexport * from './bob-finance.model';\r\n\r\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\r\nexport * from './brand.model';\r\n\r\nexport const CardModel: ReturnModelType<typeof Card> = createGlobalModel(Card);\r\nexport const AreebaCardModel: ReturnModelType<typeof AreebaCard> = createGlobalDiscriminatorModel(\r\n\tCardModel,\r\n\tAreebaCard,\r\n\tCardType.AREEBA\r\n);\r\nexport * from './card.model';\r\nexport * from './providers/areeba-card.model';\r\n\r\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\r\nexport * from './category.model';\r\n\r\nexport const CoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> =\r\n\tcreateGlobalModel(CoreAuthIdentity);\r\nexport const CoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreEmailAuthIdentity, CoreAuthIdentityType.EMAIL);\r\nexport const CorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CorePhoneAuthIdentity, CoreAuthIdentityType.PHONE);\r\nexport const CoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreGoogleAuthIdentity, CoreAuthIdentityType.GOOGLE);\r\nexport const CoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreAppleAuthIdentity, CoreAuthIdentityType.APPLE);\r\nexport * from './core-auth-identity.model';\r\nexport * from './providers/core-apple-auth-identity.model';\r\nexport * from './providers/core-email-auth-identity.model';\r\nexport * from './providers/core-google-auth-identity.model';\r\nexport * from './providers/core-phone-auth-identity.model';\r\n\r\nexport const CoreUserModel: ReturnModelType<typeof CoreUser> = createGlobalModel(CoreUser);\r\nexport * from './core-user.model';\r\n\r\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\r\nexport * from './counter.model';\r\n\r\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\r\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tCustomCoupon,\r\n\tCouponType.CUSTOM_COUPON\r\n);\r\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tGlobalCoupon,\r\n\tCouponType.GLOBAL\r\n);\r\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\r\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\r\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\r\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\r\nexport * from './coupon.model';\r\nexport * from './providers/custom-coupon.model';\r\nexport * from './providers/global-coupon.model';\r\nexport * from './providers/individual-store-coupon.model';\r\nexport * from './providers/individual-user-coupon.model';\r\nexport * from './providers/referral-code-coupon.model';\r\nexport * from './providers/referral-reward-coupon.model';\r\n\r\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\r\nexport * from './deal-setting.model';\r\n\r\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\r\nexport * from './dish.model';\r\n\r\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\r\nexport * from './faq.model';\r\n\r\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\r\nexport * from './favourite.model';\r\n\r\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\r\n\tgetModelForClass(FeaturedSetting);\r\nexport * from './featured-setting.model';\r\n\r\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\r\n\tgetModelForClass(FilterContainer);\r\nexport * from './filter-container.model';\r\n\r\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\r\nexport * from './list-container.model';\r\n\r\nexport const LoyaltyPointCategoryModel: ReturnModelType<typeof LoyaltyPointCategory> =\r\n\tgetModelForClass(LoyaltyPointCategory);\r\nexport * from './loyalty-point-category.model';\r\n\r\nexport const LoyaltyPointSettingModel: ReturnModelType<typeof LoyaltyPointSetting> =\r\n\tgetModelForClass(LoyaltyPointSetting);\r\nexport * from './loyalty-point-setting.model';\r\n\r\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\r\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\r\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\r\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\r\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\r\nexport const LoyaltyPointMarketingModel: ReturnModelType<typeof LoyaltyPointMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, LoyaltyPointMarketing, MarketingType.LOYALTY_POINT);\r\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\r\n\tMarketingModel,\r\n\tPunchMarketing,\r\n\tMarketingType.PUNCH_MARKETING\r\n);\r\nexport * from './marketing.model';\r\nexport * from './providers/buy1-get1-marketing.model';\r\nexport * from './providers/discount-marketing.model';\r\nexport * from './providers/featured-marketing.model';\r\nexport * from './providers/free-delivery-marketing.model';\r\nexport * from './providers/loyalty-point-marketing.model';\r\nexport * from './providers/punch-marketing.model';\r\n\r\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\r\nexport * from './meal-plan.model';\r\n\r\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\r\nexport * from './notification.model';\r\n\r\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\r\nexport * from './nutrition.model';\r\n\r\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\r\nexport * from './parent.model';\r\n\r\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\r\n\tgetModelForClass(ProductMarketing);\r\nexport * from './product-marketing.model';\r\n\r\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\r\nexport * from './product.model';\r\n\r\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\r\n\tgetModelForClass(PunchMarketingHistory);\r\nexport * from './punch-marketing-history.model';\r\n\r\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\r\nexport * from './rating-setting.model';\r\n\r\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\r\n\tgetModelForClass(ReferralSetting);\r\nexport * from './referral-setting.model';\r\n\r\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\r\nexport * from './request-area.model';\r\n\r\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getModelForClass(RiderReview);\r\nexport * from './rider-review.model';\r\n\r\nexport const RiderTimeoutModel: ReturnModelType<typeof RiderTimeout> = getModelForClass(RiderTimeout);\r\nexport * from './rider-timeout.model';\r\n\r\nexport const RiderTrackingModel: ReturnModelType<typeof RiderTracking> = getModelForClass(RiderTracking);\r\nexport * from './rider-tracking.model';\r\n\r\nexport const RiderModel: ReturnModelType<typeof Rider> = getModelForClass(Rider);\r\nexport * from './rider.model';\r\n\r\nexport const RoleModel: ReturnModelType<typeof Role> = createGlobalModel(Role);\r\nexport * from './role.model';\r\n\r\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\r\nexport * from './setting.model';\r\n\r\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\r\n\tgetModelForClass(ShopAccessControl);\r\nexport * from './shop-access-control.model';\r\n\r\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\r\nexport * from './shop-category.model';\r\n\r\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\r\nexport * from './shop-meal-plan.model';\r\n\r\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\r\nexport * from './shop-review.model';\r\n\r\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\r\nexport * from './shop.model';\r\n\r\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\r\n\tgetModelForClass(SubscriptionSetting);\r\nexport * from './subscription-setting.model';\r\n\r\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\r\nexport * from './subscription.model';\r\n\r\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\r\nexport * from './tag.model';\r\n\r\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\r\nexport * from './user.model';\r\n\r\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\r\nexport * from './zone.model';\r\n\r\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\r\nexport * from './cart.model';\r\n\r\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\r\nexport * from './line-item.model';\r\n\r\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\r\n\tgetModelForClass(CartParticipant);\r\nexport * from './cart-participant.model';\r\n\r\nexport const OrderModel: ReturnModelType<typeof Order> = getModelForClass(Order);\r\nexport const RegularOrderModel: ReturnModelType<typeof RegularOrder> = getDiscriminatorModelForClass(\r\n\tOrderModel,\r\n\tRegularOrder,\r\n\tOrderType.REGULAR\r\n);\r\nexport const CourierOrderModel: ReturnModelType<typeof CourierOrder> = getDiscriminatorModelForClass(\r\n\tOrderModel,\r\n\tCourierOrder,\r\n\tOrderType.COURIER\r\n);\r\nexport * from './order.model';\r\nexport * from './providers/regular-order.model';\r\nexport * from './providers/courier-order.model';\r\n\r\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\r\nexport * from './gallery.model';\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,yEAA8D;AAC9D,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAAsE;AACtE,+EAAoE;AACpE,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6DAAmD;AACnD,6CAAoC;AACpC,uCAAgF;AAChF,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,2DAAiD;AACjD,6CAAoC;AACpC,6EAAmE;AACnE,6DAAoD;AACpD,2CAAkC;AAClC,6CAAoC;AACpC,qFAA0E;AAC1E,kDAMiC;AACjC,yEAA+D;AAC/D,mFAAyE;AACzE,mFAAyE;AACzE,6FAAkF;AAClF,yEAA+D;AAC/D,6FAAkF;AAClF,2FAAgF;AAChF,6FAAkF;AAClF,6EAAmE;AACnE,uFAA4E;AAC5E,2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BAAiB,GAAyC,IAAA,4BAAgB,EAAC,iCAAY,CAAC,CAAC;AACtG,uDAAqC;AAExB,QAAA,QAAQ,GAAgC,IAAA,4BAAgB,EAAC,eAAG,CAAC,CAAC;AAC3E,8CAA4B;AAEf,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,iBAAI,CAAC,CAAC;AAC9E,+CAA6B;AAEhB,QAAA,aAAa,GAAqC,IAAA,4BAAgB,EAAC,0BAAQ,CAAC,CAAC;AAC1F,oDAAkC;AAErB,QAAA,oBAAoB,GAChC,IAAA,4BAAgB,EAAC,wCAAe,CAAC,CAAC;AACnC,2DAAyC;AAE5B,QAAA,UAAU,GAAkC,IAAA,4BAAgB,EAAC,mBAAK,CAAC,CAAC;AACpE,QAAA,iBAAiB,GAAyC,IAAA,yCAA6B,EACnG,kBAAU,EACV,kCAAY,EACZ,gBAAS,CAAC,OAAO,CACjB,CAAC;AACW,QAAA,iBAAiB,GAAyC,IAAA,yCAA6B,EACnG,kBAAU,EACV,kCAAY,EACZ,gBAAS,CAAC,OAAO,CACjB,CAAC;AACF,gDAA8B;AAC9B,kEAAgD;AAChD,kEAAgD;AAEnC,QAAA,YAAY,GAAoC,IAAA,4BAAgB,EAAC,uBAAO,CAAC,CAAC;AACvF,kDAAgC;AAEnB,QAAA,kBAAkB,GAA0C,IAAA,4BAAgB,EAAC,oCAAa,CAAC,CAAC;AACzG,yDAAuC","sourcesContent":["import { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\r\nimport { Admin } from './admin.model';\r\nimport { AdminAccessControl } from './admin-access-control.model';\r\nimport { ActivityLog } from './activity-log.model';\r\nimport { AppScreenSetting } from './app-screen-setting.model';\r\nimport { Attribute } from './attribute.model';\r\nimport { Banner } from './banner.model';\r\nimport { BOBFinance } from './bob-finance.model';\r\nimport { Brand } from './brand.model';\r\nimport { Category } from './category.model';\r\nimport { Counter } from './counter.model';\r\nimport { Coupon } from './coupon.model';\r\nimport { DealSetting } from './deal-setting.model';\r\nimport { Dish } from './dish.model';\r\nimport { Faq } from './faq.model';\r\nimport { Favourite } from './favourite.model';\r\nimport { FeaturedSetting } from './featured-setting.model';\r\nimport { FilterContainer } from './filter-container.model';\r\nimport { ListContainer } from './list-container.model';\r\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\r\nimport { LoyaltyPointSetting } from './loyalty-point-setting.model';\r\nimport { Marketing } from './marketing.model';\r\nimport { MealPlan } from './meal-plan.model';\r\nimport { Nutrition } from './nutrition.model';\r\nimport { Parent } from './parent.model';\r\nimport { ProductMarketing } from './product-marketing.model';\r\nimport { Product } from './product.model';\r\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\r\nimport { RatingSetting } from './rating-setting.model';\r\nimport { ReferralSetting } from './referral-setting.model';\r\nimport { RequestArea } from './request-area.model';\r\nimport { RiderReview } from './rider-review.model';\r\nimport { Role } from './role.model';\r\nimport { createGlobalDiscriminatorModel, createGlobalModel } from '../../mongo';\r\nimport { Setting } from './setting.model';\r\nimport { ShopAccessControl } from './shop-access-control.model';\r\nimport { ShopCategory } from './shop-category.model';\r\nimport { ShopMealPlan } from './shop-meal-plan.model';\r\nimport { ShopReview } from './shop-review.model';\r\nimport { Shop } from './shop.model';\r\nimport { SubscriptionSetting } from './subscription-setting.model';\r\nimport { Subscription } from './subscription.model';\r\nimport { Tag } from './tag.model';\r\nimport { Zone } from './zone.model';\r\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\r\nimport {\r\n\tCardType,\r\n\tCoreAuthIdentityType,\r\n\tCouponType,\r\n\tMarketingType,\r\n\tOrderType,\r\n} from '../../../utilities/enum';\r\nimport { CustomCoupon } from './providers/custom-coupon.model';\r\nimport { DiscountMarketing } from './providers/discount-marketing.model';\r\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\r\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\r\nimport { GlobalCoupon } from './providers/global-coupon.model';\r\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\r\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\r\nimport { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model';\r\nimport { PunchMarketing } from './providers/punch-marketing.model';\r\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\r\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\r\nimport { Notification } from './notification.model';\r\nimport { CoreAuthIdentity } from './core-auth-identity.model';\r\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\r\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\r\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\r\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\r\nimport { CoreUser } from './core-user.model';\r\nimport { Card } from './card.model';\r\nimport { AreebaCard } from './providers/areeba-card.model';\r\nimport { RiderTracking } from './rider-tracking.model';\r\nimport { Rider } from './rider.model';\r\nimport { RiderTimeout } from './rider-timeout.model';\r\nimport { User } from './user.model';\r\nimport { Cart } from './cart.model';\r\nimport { LineItem } from './line-item.model';\r\nimport { CartParticipant } from './cart-participant.model';\r\nimport { Gallery } from './gallery.model';\r\nimport { Order } from './order.model';\r\nimport { RegularOrder } from './providers/regular-order.model';\r\nimport { CourierOrder } from './providers/courier-order.model';\r\nimport { OrderDelivery } from './order-delivery.model';\r\n\r\n\r\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\r\nexport * from './activity-log.model';\r\n\r\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\r\n\tgetModelForClass(AdminAccessControl);\r\nexport * from './admin-access-control.model';\r\n\r\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\r\nexport * from './admin.model';\r\n\r\nexport const AppScreenSettingModel: ReturnModelType<typeof AppScreenSetting> =\r\n\tgetModelForClass(AppScreenSetting);\r\nexport * from './app-screen-setting.model';\r\n\r\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\r\nexport * from './attribute.model';\r\n\r\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\r\nexport * from './banner.model';\r\n\r\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\r\nexport * from './bob-finance.model';\r\n\r\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\r\nexport * from './brand.model';\r\n\r\nexport const CardModel: ReturnModelType<typeof Card> = createGlobalModel(Card);\r\nexport const AreebaCardModel: ReturnModelType<typeof AreebaCard> = createGlobalDiscriminatorModel(\r\n\tCardModel,\r\n\tAreebaCard,\r\n\tCardType.AREEBA\r\n);\r\nexport * from './card.model';\r\nexport * from './providers/areeba-card.model';\r\n\r\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\r\nexport * from './category.model';\r\n\r\nexport const CoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> =\r\n\tcreateGlobalModel(CoreAuthIdentity);\r\nexport const CoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreEmailAuthIdentity, CoreAuthIdentityType.EMAIL);\r\nexport const CorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CorePhoneAuthIdentity, CoreAuthIdentityType.PHONE);\r\nexport const CoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreGoogleAuthIdentity, CoreAuthIdentityType.GOOGLE);\r\nexport const CoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> =\r\n\tcreateGlobalDiscriminatorModel(CoreAuthIdentityModel, CoreAppleAuthIdentity, CoreAuthIdentityType.APPLE);\r\nexport * from './core-auth-identity.model';\r\nexport * from './providers/core-apple-auth-identity.model';\r\nexport * from './providers/core-email-auth-identity.model';\r\nexport * from './providers/core-google-auth-identity.model';\r\nexport * from './providers/core-phone-auth-identity.model';\r\n\r\nexport const CoreUserModel: ReturnModelType<typeof CoreUser> = createGlobalModel(CoreUser);\r\nexport * from './core-user.model';\r\n\r\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\r\nexport * from './counter.model';\r\n\r\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\r\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tCustomCoupon,\r\n\tCouponType.CUSTOM_COUPON\r\n);\r\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tGlobalCoupon,\r\n\tCouponType.GLOBAL\r\n);\r\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\r\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\r\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\r\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\r\nexport * from './coupon.model';\r\nexport * from './providers/custom-coupon.model';\r\nexport * from './providers/global-coupon.model';\r\nexport * from './providers/individual-store-coupon.model';\r\nexport * from './providers/individual-user-coupon.model';\r\nexport * from './providers/referral-code-coupon.model';\r\nexport * from './providers/referral-reward-coupon.model';\r\n\r\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\r\nexport * from './deal-setting.model';\r\n\r\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\r\nexport * from './dish.model';\r\n\r\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\r\nexport * from './faq.model';\r\n\r\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\r\nexport * from './favourite.model';\r\n\r\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\r\n\tgetModelForClass(FeaturedSetting);\r\nexport * from './featured-setting.model';\r\n\r\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\r\n\tgetModelForClass(FilterContainer);\r\nexport * from './filter-container.model';\r\n\r\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\r\nexport * from './list-container.model';\r\n\r\nexport const LoyaltyPointCategoryModel: ReturnModelType<typeof LoyaltyPointCategory> =\r\n\tgetModelForClass(LoyaltyPointCategory);\r\nexport * from './loyalty-point-category.model';\r\n\r\nexport const LoyaltyPointSettingModel: ReturnModelType<typeof LoyaltyPointSetting> =\r\n\tgetModelForClass(LoyaltyPointSetting);\r\nexport * from './loyalty-point-setting.model';\r\n\r\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\r\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\r\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\r\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\r\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\r\nexport const LoyaltyPointMarketingModel: ReturnModelType<typeof LoyaltyPointMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, LoyaltyPointMarketing, MarketingType.LOYALTY_POINT);\r\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\r\n\tMarketingModel,\r\n\tPunchMarketing,\r\n\tMarketingType.PUNCH_MARKETING\r\n);\r\nexport * from './marketing.model';\r\nexport * from './providers/buy1-get1-marketing.model';\r\nexport * from './providers/discount-marketing.model';\r\nexport * from './providers/featured-marketing.model';\r\nexport * from './providers/free-delivery-marketing.model';\r\nexport * from './providers/loyalty-point-marketing.model';\r\nexport * from './providers/punch-marketing.model';\r\n\r\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\r\nexport * from './meal-plan.model';\r\n\r\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\r\nexport * from './notification.model';\r\n\r\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\r\nexport * from './nutrition.model';\r\n\r\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\r\nexport * from './parent.model';\r\n\r\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\r\n\tgetModelForClass(ProductMarketing);\r\nexport * from './product-marketing.model';\r\n\r\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\r\nexport * from './product.model';\r\n\r\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\r\n\tgetModelForClass(PunchMarketingHistory);\r\nexport * from './punch-marketing-history.model';\r\n\r\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\r\nexport * from './rating-setting.model';\r\n\r\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\r\n\tgetModelForClass(ReferralSetting);\r\nexport * from './referral-setting.model';\r\n\r\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\r\nexport * from './request-area.model';\r\n\r\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getModelForClass(RiderReview);\r\nexport * from './rider-review.model';\r\n\r\nexport const RiderTimeoutModel: ReturnModelType<typeof RiderTimeout> = getModelForClass(RiderTimeout);\r\nexport * from './rider-timeout.model';\r\n\r\nexport const RiderTrackingModel: ReturnModelType<typeof RiderTracking> = getModelForClass(RiderTracking);\r\nexport * from './rider-tracking.model';\r\n\r\nexport const RiderModel: ReturnModelType<typeof Rider> = getModelForClass(Rider);\r\nexport * from './rider.model';\r\n\r\nexport const RoleModel: ReturnModelType<typeof Role> = createGlobalModel(Role);\r\nexport * from './role.model';\r\n\r\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\r\nexport * from './setting.model';\r\n\r\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\r\n\tgetModelForClass(ShopAccessControl);\r\nexport * from './shop-access-control.model';\r\n\r\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\r\nexport * from './shop-category.model';\r\n\r\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\r\nexport * from './shop-meal-plan.model';\r\n\r\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\r\nexport * from './shop-review.model';\r\n\r\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\r\nexport * from './shop.model';\r\n\r\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\r\n\tgetModelForClass(SubscriptionSetting);\r\nexport * from './subscription-setting.model';\r\n\r\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\r\nexport * from './subscription.model';\r\n\r\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\r\nexport * from './tag.model';\r\n\r\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\r\nexport * from './user.model';\r\n\r\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\r\nexport * from './zone.model';\r\n\r\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\r\nexport * from './cart.model';\r\n\r\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\r\nexport * from './line-item.model';\r\n\r\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\r\n\tgetModelForClass(CartParticipant);\r\nexport * from './cart-participant.model';\r\n\r\nexport const OrderModel: ReturnModelType<typeof Order> = getModelForClass(Order);\r\nexport const RegularOrderModel: ReturnModelType<typeof RegularOrder> = getDiscriminatorModelForClass(\r\n\tOrderModel,\r\n\tRegularOrder,\r\n\tOrderType.REGULAR\r\n);\r\nexport const CourierOrderModel: ReturnModelType<typeof CourierOrder> = getDiscriminatorModelForClass(\r\n\tOrderModel,\r\n\tCourierOrder,\r\n\tOrderType.COURIER\r\n);\r\nexport * from './order.model';\r\nexport * from './providers/regular-order.model';\r\nexport * from './providers/courier-order.model';\r\n\r\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\r\nexport * from './gallery.model';\r\n\r\nexport const OrderDeliveryModel: ReturnModelType<typeof OrderDelivery> = getModelForClass(OrderDelivery);\r\nexport * from './order-delivery.model';"]}
|
|
@@ -13,9 +13,9 @@ export declare class RegularOrder extends Order {
|
|
|
13
13
|
itemType?: string;
|
|
14
14
|
pickupAddress: Address;
|
|
15
15
|
deliveryAddress: UserAddress;
|
|
16
|
-
parent
|
|
17
|
-
shop
|
|
18
|
-
cart
|
|
16
|
+
parent: Ref<Parent>;
|
|
17
|
+
shop: Ref<Shop>;
|
|
18
|
+
cart: Ref<Cart>;
|
|
19
19
|
isShopDelivery?: boolean;
|
|
20
20
|
preparingTimeInMinutes?: number;
|
|
21
21
|
isReplacementOrder?: boolean;
|
|
@@ -55,15 +55,15 @@ __decorate([
|
|
|
55
55
|
__metadata("design:type", address_model_1.UserAddress)
|
|
56
56
|
], RegularOrder.prototype, "deliveryAddress", void 0);
|
|
57
57
|
__decorate([
|
|
58
|
-
(0, typegoose_1.prop)({ ref: () => parent_model_1.Parent }),
|
|
58
|
+
(0, typegoose_1.prop)({ equired: true, ref: () => parent_model_1.Parent }),
|
|
59
59
|
__metadata("design:type", Object)
|
|
60
60
|
], RegularOrder.prototype, "parent", void 0);
|
|
61
61
|
__decorate([
|
|
62
|
-
(0, typegoose_1.prop)({ ref: () => shop_model_1.Shop }),
|
|
62
|
+
(0, typegoose_1.prop)({ required: true, ref: () => shop_model_1.Shop }),
|
|
63
63
|
__metadata("design:type", Object)
|
|
64
64
|
], RegularOrder.prototype, "shop", void 0);
|
|
65
65
|
__decorate([
|
|
66
|
-
(0, typegoose_1.prop)({ ref: () => cart_model_1.Cart }),
|
|
66
|
+
(0, typegoose_1.prop)({ required: true, ref: () => cart_model_1.Cart, unique: true }),
|
|
67
67
|
__metadata("design:type", Object)
|
|
68
68
|
], RegularOrder.prototype, "cart", void 0);
|
|
69
69
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAqF;AACrF,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAA+D;AAC/D,6EAA+E;AAE/E,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,M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AAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;0CACvC;AAGV;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACR;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;4DACI;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wDACJ;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;iEACqB","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\r\nimport { Order } from '../order.model';\r\nimport { ItemType, OrderType, RegularOrderStatus } from '../../../../utilities/enum';\r\nimport { Parent } from '../parent.model';\r\nimport { Shop } from '../shop.model';\r\nimport { Cart } from '../cart.model';\r\nimport { Address, UserAddress } from '../shared/address.model';\r\nimport { RegularOrderStatusTimeline } from '../embedded/status-timeline.model';\r\n\r\nexport class RegularOrder extends Order {\r\n\tpublic orderType = OrderType.REGULAR as const;\r\n\r\n\t@prop({ type: String, enum: RegularOrderStatus, default: RegularOrderStatus.PLACED })\r\n\tpublic status?: string;\r\n\r\n\t@prop({ type: () => [RegularOrderStatusTimeline], default: [] })\r\n\tpublic statusTimeline: RegularOrderStatusTimeline[];\r\n\r\n\t@prop({ type: String, enum: ItemType, default: ItemType.FOOD })\r\n\titemType?: string;\r\n\r\n\t@prop({ required: true, type: Address })\r\n\tpickupAddress: Address;\r\n\r\n\t@prop({ required: true, type: UserAddress })\r\n\tdeliveryAddress: UserAddress;\r\n\r\n\t@prop({ equired: true, ref: () => Parent })\r\n\tparent!: Ref<Parent>;\r\n\r\n\t@prop({ required: true, ref: () => Shop })\r\n\tshop!: Ref<Shop>;\r\n\r\n\t@prop({ required: true, ref: () => Cart, unique: true })\r\n\tcart!: Ref<Cart>;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isShopDelivery?: boolean;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic preparingTimeInMinutes?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isReplacementOrder?: boolean;\r\n\r\n\t@prop({ ref: () => Order })\r\n\tpublic originalOrderForReplacement?: Ref<Order>;\r\n}\r\n"]}
|
|
@@ -4,13 +4,13 @@ import { GeoLocation } from './shared/geo-location.model';
|
|
|
4
4
|
import { RiderReview } from './rider-review.model';
|
|
5
5
|
import { Zone } from './zone.model';
|
|
6
6
|
import { Shop } from './shop.model';
|
|
7
|
-
import { CreatedBy, Language, LiveStatus, RiderType, ShiftType, Status } from '../../../utilities/enum';
|
|
7
|
+
import { CreatedBy, Language, LiveStatus, RiderBagSize, RiderType, ShiftType, Status } from '../../../utilities/enum';
|
|
8
8
|
import { RiderEquipment } from './embedded/rider-equipment.model';
|
|
9
9
|
export declare class Rider extends TimeStamps {
|
|
10
10
|
name: string;
|
|
11
11
|
image?: string;
|
|
12
12
|
email: string;
|
|
13
|
-
password
|
|
13
|
+
password: string;
|
|
14
14
|
gender?: string;
|
|
15
15
|
countryCode?: string;
|
|
16
16
|
language?: Language;
|
|
@@ -40,6 +40,7 @@ export declare class Rider extends TimeStamps {
|
|
|
40
40
|
shift?: ShiftType;
|
|
41
41
|
zone?: Ref<Zone>;
|
|
42
42
|
riderType?: RiderType;
|
|
43
|
+
bagSize?: RiderBagSize;
|
|
43
44
|
shop?: Ref<Shop>;
|
|
44
45
|
riderNationality?: string;
|
|
45
46
|
isCashSettlementLimitReached?: boolean;
|
|
@@ -8,13 +8,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.Rider = void 0;
|
|
16
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
17
|
-
const bcryptjs_1 = __importDefault(require("bcryptjs"));
|
|
18
14
|
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
19
15
|
const geo_location_model_1 = require("./shared/geo-location.model");
|
|
20
16
|
const rider_review_model_1 = require("./rider-review.model");
|
|
@@ -22,6 +18,7 @@ const zone_model_1 = require("./zone.model");
|
|
|
22
18
|
const shop_model_1 = require("./shop.model");
|
|
23
19
|
const enum_1 = require("../../../utilities/enum");
|
|
24
20
|
const rider_equipment_model_1 = require("./embedded/rider-equipment.model");
|
|
21
|
+
const password_1 = require("../../../utilities/common/password");
|
|
25
22
|
let Rider = class Rider extends defaultClasses_1.TimeStamps {
|
|
26
23
|
name;
|
|
27
24
|
image;
|
|
@@ -56,6 +53,7 @@ let Rider = class Rider extends defaultClasses_1.TimeStamps {
|
|
|
56
53
|
shift;
|
|
57
54
|
zone;
|
|
58
55
|
riderType;
|
|
56
|
+
bagSize;
|
|
59
57
|
shop;
|
|
60
58
|
riderNationality;
|
|
61
59
|
isCashSettlementLimitReached;
|
|
@@ -198,6 +196,10 @@ __decorate([
|
|
|
198
196
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.RiderType, default: enum_1.RiderType.LYXA_RIDER }),
|
|
199
197
|
__metadata("design:type", String)
|
|
200
198
|
], Rider.prototype, "riderType", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.RiderBagSize, default: enum_1.RiderBagSize.REGULAR }),
|
|
201
|
+
__metadata("design:type", String)
|
|
202
|
+
], Rider.prototype, "bagSize", void 0);
|
|
201
203
|
__decorate([
|
|
202
204
|
(0, typegoose_1.prop)({ type: String, ref: () => shop_model_1.Shop }),
|
|
203
205
|
__metadata("design:type", Object)
|
|
@@ -231,11 +233,19 @@ __decorate([
|
|
|
231
233
|
__metadata("design:type", String)
|
|
232
234
|
], Rider.prototype, "proofOfResidence", void 0);
|
|
233
235
|
exports.Rider = Rider = __decorate([
|
|
234
|
-
(0, typegoose_1.pre)('save', async function () {
|
|
235
|
-
if (
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
(0, typegoose_1.pre)('save', async function (next) {
|
|
237
|
+
if (this.isModified('password')) {
|
|
238
|
+
this.password = await (0, password_1.hashPassword)(this.password);
|
|
239
|
+
}
|
|
240
|
+
next();
|
|
241
|
+
}),
|
|
242
|
+
(0, typegoose_1.pre)('findOneAndUpdate', async function (next) {
|
|
243
|
+
const update = this.getUpdate();
|
|
244
|
+
if (update?.password) {
|
|
245
|
+
update.password = await (0, password_1.hashPassword)(update.password);
|
|
246
|
+
this.setUpdate(update);
|
|
247
|
+
}
|
|
248
|
+
next();
|
|
239
249
|
}),
|
|
240
250
|
(0, typegoose_1.index)({ location: '2dsphere' }),
|
|
241
251
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'riders', timestamps: true } })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rider.model.js","sourceRoot":"/","sources":["libraries/mongo/models/rider.model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rider.model.js","sourceRoot":"/","sources":["libraries/mongo/models/rider.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAE3E,4EAAqE;AACrE,oEAA0D;AAC1D,6DAAmD;AACnD,6CAAoC;AACpC,6CAAoC;AACpC,kDAAsH;AACtH,4EAAkE;AAElE,iEAAkE;AAmB3D,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,IAAI,CAAU;I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AAI,EAAE,MAAM,EAAE,CAAC;;8CACS;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACU;gBA7HrB,KAAK;IAjBjB,IAAA,eAAG,EAAQ,MAAM,EAAE,KAAK,WAAW,IAAI;QACvC,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,eAAG,EAAoB,kBAAkB,EAAE,KAAK,WAAW,IAAI;QAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAyB,CAAC;QACvD,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;YACtB,MAAM,CAAC,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IAED,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC/B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GAC/D,KAAK,CA8HjB","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\r\nimport bcrypt from 'bcryptjs';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { GeoLocation } from './shared/geo-location.model';\r\nimport { RiderReview } from './rider-review.model';\r\nimport { Zone } from './zone.model';\r\nimport { Shop } from './shop.model';\r\nimport { CreatedBy, Language, LiveStatus, RiderBagSize, RiderType, ShiftType, Status } from '../../../utilities/enum';\r\nimport { RiderEquipment } from './embedded/rider-equipment.model';\r\nimport { Query } from 'mongoose';\r\nimport { hashPassword } from '../../../utilities/common/password';\r\n\r\n@pre<Rider>('save', async function (next) {\r\n\tif (this.isModified('password')) {\r\n\t\tthis.password = await hashPassword(this.password);\r\n\t}\r\n\tnext();\r\n})\r\n@pre<Query<any, Rider>>('findOneAndUpdate', async function (next) {\r\n\tconst update = this.getUpdate() as Record<string, any>;\r\n\tif (update?.password) {\r\n\t\tupdate.password = await hashPassword(update.password);\r\n\t\tthis.setUpdate(update);\r\n\t}\r\n\tnext();\r\n})\r\n\r\n@index({ location: '2dsphere' })\r\n@modelOptions({ schemaOptions: { collection: 'riders', timestamps: true } })\r\nexport class Rider extends TimeStamps {\r\n\t@prop({ type: String, required: true })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic image?: string;\r\n\r\n\t@prop({ type: String, required: true })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic password!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic gender?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic countryCode?: string;\r\n\r\n\t@prop({ type: String, enum: Language, default: Language.EN })\r\n\tpublic language?: Language;\r\n\r\n\t@prop({ type: String })\r\n\tpublic number?: string;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.INACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ type: Date })\r\n\tpublic dob?: Date;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic totalOrder?: number;\r\n\r\n\t@prop({ type: String, enum: LiveStatus, default: LiveStatus.OFFLINE })\r\n\tpublic liveStatus?: LiveStatus;\r\n\r\n\t@prop({ type: () => [String], default: [] })\r\n\tpublic fcmToken?: string[];\r\n\r\n\t@prop({ type: Date, default: Date.now })\r\n\tpublic lastLogin?: Date;\r\n\r\n\t@prop({ type: Date, default: Date.now })\r\n\tpublic lastOnline?: Date;\r\n\r\n\t@prop({ type: String })\r\n\tpublic nationalIdDocument?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic vehicleRegistrationDocument?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic vehicleType?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic vehicleNumber?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic address?: string;\r\n\r\n\t@prop({ type: GeoLocation })\r\n\tpublic location?: GeoLocation;\r\n\r\n\t@prop({ type: String })\r\n\tpublic forgetToken?: string;\r\n\r\n\t@prop({ type: Date })\r\n\tpublic forgetExpired?: Date;\r\n\r\n\t@prop({ type: Date })\r\n\tpublic lastLocationUpdateAt?: Date;\r\n\r\n\t@prop({ type: String })\r\n\tpublic contractImage?: string;\r\n\r\n\t@prop({ type: String, enum: CreatedBy, default: CreatedBy.ADMIN })\r\n\tpublic createdBy?: CreatedBy;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isLogin?: boolean;\r\n\r\n\t@prop({ type: String })\r\n\tpublic lastLoginDeviceId?: string;\r\n\r\n\t@prop({ type: () => [String], ref: () => RiderReview, default: [] })\r\n\tpublic reviews?: Ref<RiderReview>[];\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic rating?: number;\r\n\r\n\t@prop({ type: String, enum: ShiftType, default: ShiftType.DAY })\r\n\tpublic shift?: ShiftType;\r\n\r\n\t@prop({ type: String, ref: () => Zone })\r\n\tpublic zone?: Ref<Zone>;\r\n\r\n\t@prop({ type: String, enum: RiderType, default: RiderType.LYXA_RIDER })\r\n\tpublic riderType?: RiderType;\r\n\r\n\t@prop({ type: String, enum: RiderBagSize, default: RiderBagSize.REGULAR })\r\n\tpublic bagSize?: RiderBagSize;\r\n\r\n\t@prop({ type: String, ref: () => Shop })\r\n\tpublic shop?: Ref<Shop>;\r\n\r\n\t@prop({ type: String })\r\n\tpublic riderNationality?: string;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isCashSettlementLimitReached?: boolean;\r\n\r\n\t@prop({ type: Date, default: null })\r\n\tpublic firstActiveAt?: Date | null;\r\n\r\n\t@prop({ type: () => [RiderEquipment], default: [] })\r\n\tpublic riderEquipments?: RiderEquipment[];\r\n\r\n\t@prop({ type: String })\r\n\tpublic insurance?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic powerOfAttorney?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic proofOfResidence?: string;\r\n}\r\n"]}
|
|
@@ -4,9 +4,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.hashPassword = hashPassword;
|
|
7
|
+
exports.verifyPassword = verifyPassword;
|
|
8
|
+
const server_1 = require("@trpc/server");
|
|
7
9
|
const bcryptjs_1 = __importDefault(require("bcryptjs"));
|
|
8
10
|
async function hashPassword(password) {
|
|
9
11
|
const salt = await bcryptjs_1.default.genSalt(10);
|
|
10
12
|
return bcryptjs_1.default.hash(password, salt);
|
|
11
13
|
}
|
|
14
|
+
async function verifyPassword(inputPassword, hashedPassword) {
|
|
15
|
+
const isPasswordValid = await bcryptjs_1.default.compare(inputPassword, hashedPassword);
|
|
16
|
+
if (!isPasswordValid) {
|
|
17
|
+
throw new server_1.TRPCError({
|
|
18
|
+
code: 'UNAUTHORIZED',
|
|
19
|
+
message: 'Incorrect email or password.',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
12
23
|
//# sourceMappingURL=password.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.js","sourceRoot":"/","sources":["utilities/common/password.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"password.js","sourceRoot":"/","sources":["utilities/common/password.ts"],"names":[],"mappings":";;;;;AAGA,oCAGC;AAED,wCAQC;AAhBD,yCAAyC;AACzC,wDAA8B;AAEvB,KAAK,UAAU,YAAY,CAAC,QAAgB;IAClD,MAAM,IAAI,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,kBAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,aAAqB,EAAE,cAAsB;IACjF,MAAM,eAAe,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAC5E,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,MAAM,IAAI,kBAAS,CAAC;YACnB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,8BAA8B;SACvC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC","sourcesContent":["import { TRPCError } from '@trpc/server';\r\nimport bcrypt from 'bcryptjs';\r\n\r\nexport async function hashPassword(password: string): Promise<string> {\r\n\tconst salt = await bcrypt.genSalt(10);\r\n\treturn bcrypt.hash(password, salt);\r\n}\r\n\r\nexport async function verifyPassword(inputPassword: string, hashedPassword: string) {\r\n\tconst isPasswordValid = await bcrypt.compare(inputPassword, hashedPassword);\r\n\tif (!isPasswordValid) {\r\n\t\tthrow new TRPCError({\r\n\t\t\tcode: 'UNAUTHORIZED',\r\n\t\t\tmessage: 'Incorrect email or password.',\r\n\t\t});\r\n\t}\r\n}\r\n"]}
|
package/dist/utilities/enum.d.ts
CHANGED
|
@@ -306,6 +306,10 @@ export declare enum RiderType {
|
|
|
306
306
|
SHOP_RIDER = "shop_rider",
|
|
307
307
|
LYXA_RIDER = "lyxa_rider"
|
|
308
308
|
}
|
|
309
|
+
export declare enum RiderBagSize {
|
|
310
|
+
REGULAR = "regular",
|
|
311
|
+
LARGE = "large"
|
|
312
|
+
}
|
|
309
313
|
export declare enum Language {
|
|
310
314
|
EN = "en",
|
|
311
315
|
AR = "ar"
|
package/dist/utilities/enum.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreatedBy = exports.LiveStatus = exports.AreebaCardStatus = exports.CardUserType = exports.CardType = exports.PaymentPreference = exports.CartStatus = exports.AdminRole = exports.MarketingStatus = exports.MarketingType = exports.FavouriteType = exports.CouponExpirationReason = exports.CouponType = exports.BobType = exports.BobModel = exports.BobSettlementStatus = exports.BobSettlementType = exports.BobAccountType = exports.ZoneStatus = exports.FaqAccountType = exports.CounterType = exports.BannerUserType = exports.BannerLinkType = exports.BannerClickType = exports.ShopRole = exports.ShopOnlineStatus = exports.ChargeType = exports.ClickType = exports.NotificationAccountType = exports.DishCategory = exports.ProductDietaryType = exports.AttributeItemSelectionType = exports.PriceOption = exports.ProductType = exports.CoreAuthIdentityType = exports.SectionType = exports.UpdatedField = exports.GeoLocationType = exports.RatingAccountType = exports.SubscriptionStatus = exports.SubscriptionPackage = exports.PaidCurrency = exports.PaymentStatus = exports.PaymentMethod = exports.ValueType = exports.HolidayWorkStatus = exports.WorkStatus = exports.WeekDay = exports.ItemType = exports.Status = void 0;
|
|
4
|
-
exports.MediaType = exports.WorkingHourSettingsType = exports.ZoneGeometryType = exports.RiderAssignmentStatus = exports.CourierServiceType = exports.OrderCancelBy = exports.DeliveryStatus = exports.CourierOrderStatus = exports.RegularOrderStatus = exports.OrderType = exports.Language = exports.RiderType = exports.ShiftType = void 0;
|
|
4
|
+
exports.MediaType = exports.WorkingHourSettingsType = exports.ZoneGeometryType = exports.RiderAssignmentStatus = exports.CourierServiceType = exports.OrderCancelBy = exports.DeliveryStatus = exports.CourierOrderStatus = exports.RegularOrderStatus = exports.OrderType = exports.Language = exports.RiderBagSize = exports.RiderType = exports.ShiftType = void 0;
|
|
5
5
|
var Status;
|
|
6
6
|
(function (Status) {
|
|
7
7
|
Status["ACTIVE"] = "active";
|
|
@@ -362,6 +362,11 @@ var RiderType;
|
|
|
362
362
|
RiderType["SHOP_RIDER"] = "shop_rider";
|
|
363
363
|
RiderType["LYXA_RIDER"] = "lyxa_rider";
|
|
364
364
|
})(RiderType || (exports.RiderType = RiderType = {}));
|
|
365
|
+
var RiderBagSize;
|
|
366
|
+
(function (RiderBagSize) {
|
|
367
|
+
RiderBagSize["REGULAR"] = "regular";
|
|
368
|
+
RiderBagSize["LARGE"] = "large";
|
|
369
|
+
})(RiderBagSize || (exports.RiderBagSize = RiderBagSize = {}));
|
|
365
370
|
var Language;
|
|
366
371
|
(function (Language) {
|
|
367
372
|
Language["EN"] = "en";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"/","sources":["utilities/enum.ts"],"names":[],"mappings":";;;;AAAA,IAAY,MAGX;AAHD,WAAY,MAAM;IACjB,2BAAiB,CAAA;IACjB,+BAAqB,CAAA;AACtB,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,IAAY,QAQX;AARD,WAAY,QAAQ;IACnB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,6CAAiC,CAAA;AAClC,CAAC,EARW,QAAQ,wBAAR,QAAQ,QAQnB;AAED,IAAY,OAQX;AARD,WAAY,OAAO;IAClB,yCAAU,CAAA;IACV,yCAAU,CAAA;IACV,2CAAW,CAAA;IACX,+CAAa,CAAA;IACb,6CAAY,CAAA;IACZ,yCAAU,CAAA;IACV,6CAAY,CAAA;AACb,CAAC,EARW,OAAO,uBAAP,OAAO,QAQlB;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IACrB,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;AACtB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC5B,sCAA0B,CAAA;IAC1B,0CAA8B,CAAA;AAC/B,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACpB,sCAAyB,CAAA;IACzB,4B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AAkB,QAG7B;AAED,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAChC,gDAAuB,CAAA;IACvB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACtB,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,gBAEX;AAFD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;AACpB,CAAC,EAFW,gBAAgB,gCAAhB,gBAAgB,QAE3B;AAED,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAClC,4CAAiB,CAAA;IACjB,wCAAa,CAAA;AACd,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AAED,IAAY,SAEX;AAFD,WAAY,SAAS;IACpB,4BAAe,CAAA;AAChB,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB","sourcesContent":["export enum Status {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n}\r\n\r\nexport enum ItemType {\r\n\tFOOD = 'food',\r\n\tGROCERY = 'grocery',\r\n\tPHARMACY = 'pharmacy',\r\n\tCOFFEE = 'coffee',\r\n\tFLOWER = 'flower',\r\n\tPET = 'pet',\r\n\tHEALTHY_CORNER = 'healthy_corner',\r\n}\r\n\r\nexport enum WeekDay {\r\n\tSunday = 0,\r\n\tMonday = 1,\r\n\tTuesday = 2,\r\n\tWednesday = 3,\r\n\tThursday = 4,\r\n\tFriday = 5,\r\n\tSaturday = 6,\r\n}\r\n\r\nexport enum WorkStatus {\r\n\tOPEN = 'open',\r\n\tCLOSED = 'closed',\r\n\tFULL_DAY = 'full_day',\r\n}\r\n\r\nexport enum HolidayWorkStatus {\r\n\tCLOSED = WorkStatus.CLOSED,\r\n\tFULL_DAY = WorkStatus.FULL_DAY,\r\n}\r\n\r\nexport enum ValueType {\r\n\tPERCENTAGE = 'percentage',\r\n\tFIXED = 'fixed',\r\n}\r\n\r\nexport enum PaymentMethod {\r\n\tCASH = 'cash',\r\n\tCARD = 'card',\r\n}\r\n\r\nexport enum PaymentStatus {\r\n\tPAID = 'paid',\r\n\tPENDING = 'pending',\r\n\tFAILED = 'failed',\r\n\tREFUNDED = 'refunded',\r\n\tPARTIALLY_REFUNDED = 'partially_refunded',\r\n}\r\n\r\nexport enum PaidCurrency {\r\n\tBASE = 'base',\r\n\tSECONDARY = 'secondary',\r\n\tMIXED = 'mixed',\r\n}\r\n\r\nexport enum SubscriptionPackage {\r\n\tMONTHLY = 'monthly',\r\n\tYEARLY = 'yearly',\r\n}\r\n\r\nexport enum SubscriptionStatus {\r\n\tONGOING = 'ongoing',\r\n\tEXPIRED = 'expired',\r\n}\r\n\r\nexport enum RatingAccountType {\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum GeoLocationType {\r\n\tPOINT = 'Point',\r\n}\r\n\r\nexport enum UpdatedField {\r\n\tMAX_TOTAL_EST_ITEMS_PRICE = 'max_total_est_items_price',\r\n\tMAX_DISTANCE = 'max_distance',\r\n\tDAILY_WORKING_HOURS = 'daily_working_hours',\r\n\tBOB_CASH_SETTLEMENT_LIMIT = 'bob_cash_settlement_limit',\r\n\tTIPS = 'tips',\r\n\tEQUIPMENTS = 'equipments',\r\n\tMONTHLY_SHOP_TARGET = 'monthly_shop_target',\r\n\tMONTHLY_REWARD_PRIZE = 'monthly_reward_prize',\r\n\tBASE_CURRENCY = 'base_currency',\r\n\tSECONDARY_CURRENCY = 'secondary_currency',\r\n\tIS_DUAL_CURRENCY_ENABLED = 'is_dual_currency_enabled',\r\n\tEXCHANGE_RATE = 'exchange_rate',\r\n\tISSUANCE_DAY = 'issuance_day',\r\n\tOVER_DUE_PERIODS = 'over_due_periods',\r\n\tPAY_LIMIT_FOR_USER = 'pay_limit_for_user',\r\n\tVAT_PERCENTAGE = 'vat_percentage',\r\n\tRIDER_SEARCH_RANGES = 'rider_search_ranges',\r\n\tNEAR_BY_SHOP_DISTANCE = 'near_by_shop_distance',\r\n\tNEAR_BY_SHOP_DISTANCE_IN_HOME_SCREEN = 'near_by_shop_distance_in_home_screen',\r\n\tUNITS = 'units',\r\n\tCURRENCY_SETTING = 'currency_setting',\r\n\tPAYMENT_METHODS = 'payment_methods',\r\n\tIS_GROUND_ORDER_ENABLED = 'is_ground_order_enabled',\r\n\tCUSTOMER_SUPPORT_PHONE_NUMBER = 'customer_support_phone_number',\r\n}\r\n\r\nexport enum SectionType {\r\n\tSTORE_PUNCHES = 'store_punches',\r\n\tNEARBY_RESTAURANT = 'nearby_restaurant',\r\n\tNEARBY_GROCERY = 'nearby_grocery',\r\n\tNEARBY_PHARMACY = 'nearby_pharmacy',\r\n\tDISCOUNT = 'discount',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tCRAZY_OFFER_SHOPS = 'crazy_offer_shops',\r\n\tORDER_AGAIN = 'order_again',\r\n\tFEATURED = 'featured',\r\n\tLOVE = 'love',\r\n\tAUTHENTIC_BEIRUT = 'authentic_beirut',\r\n\tNEAR_ME = 'near_me',\r\n}\r\n\r\nexport enum CoreAuthIdentityType {\r\n\tEMAIL = 'email',\r\n\tPHONE = 'phone',\r\n\tGOOGLE = 'google',\r\n\tAPPLE = 'apple',\r\n}\r\n\r\nexport enum ProductType {\r\n\tMEAT = 'meat',\r\n\tCHICKEN = 'chicken',\r\n\tFISH = 'fish',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tOTHER = 'other',\r\n}\r\n\r\nexport enum PriceOption {\r\n\tSINGLE_PRICE = 'single_price',\r\n\tPRICE_PER_UNIT = 'price_per_unit',\r\n\tPRICE_PER_PORTION = 'price_per_portion',\r\n}\r\n\r\nexport enum AttributeItemSelectionType {\r\n\tSINGLE = 'single',\r\n\tMULTIPLE = 'multiple',\r\n}\r\n\r\nexport enum ProductDietaryType {\r\n\tGLUTEN_FREE = 'gluten_free',\r\n\tLOW_CAL = 'low_cal',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tVEGAN = 'vegan',\r\n\tKETO = 'keto',\r\n\tLACTOSE_FREE = 'lactose_free',\r\n\tHIGH_PROTEIN = 'high_protein',\r\n}\r\n\r\nexport enum DishCategory {\r\n\tBREAKFAST = 'breakfast',\r\n\tLUNCH = 'lunch',\r\n\tDINNER = 'dinner',\r\n\tSNACKS = 'snacks',\r\n}\r\n\r\nexport enum NotificationAccountType {\r\n\tUSER = 'user',\r\n\tPARENT = 'parent',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n\tADMIN = 'admin',\r\n\tCUSTOMER_SERVICE = 'customer_service',\r\n}\r\n\r\nexport enum ClickType {\r\n\tCLICKABLE_URL = 'clickable_url',\r\n\tCLICKABLE_ORDER = 'clickable_order',\r\n\tCLICKABLE_SHOP = 'clickable_shop',\r\n\tCLICKABLE_PRODUCT = 'clickable_product',\r\n\tCLICKABLE_LIST_CONTAINER = 'clickable_list_container',\r\n\tCLICKABLE_PAYOUT = 'clickable_payout',\r\n\tCLICKABLE_BOB_FINANCE = 'clickable_bob_finance',\r\n\tCLICKABLE_REQUEST_AREA = 'clickable_request_area',\r\n}\r\n\r\nexport enum ChargeType {\r\n\tCUSTOM = 'custom',\r\n}\r\n\r\nexport enum ShopOnlineStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum ShopRole {\r\n\tPARENT = 'parent',\r\n\tPARENT_MANAGER = 'parent_manager',\r\n\tPARENT_ORDER_MANAGER = 'parent_order_manager',\r\n\tSHOP = 'shop',\r\n\tSHOP_MANAGER = 'shop_manager',\r\n\tSHOP_ORDER_MANAGER = 'shop_order_manager',\r\n}\r\n\r\nexport enum BannerClickType {\r\n\tLINK = 'link',\r\n\tSHOP = 'shop',\r\n\tPRODUCT = 'product',\r\n\tLIST_CONTAINER = 'list_container',\r\n\tPLUS = 'plus',\r\n}\r\n\r\nexport enum BannerLinkType {\r\n\tURL = 'url',\r\n\tAPP_ROUTE = 'app-route',\r\n}\r\n\r\nexport enum BannerUserType {\r\n\tALL = 'all',\r\n\tPLUS = 'plus',\r\n\tNORMAL = 'normal',\r\n}\r\n\r\nexport enum CounterType {\r\n\tORDER = 'order',\r\n\tCRM_NUMBER = 'crm_number',\r\n\tshop = 'shop',\r\n}\r\n\r\nexport enum FaqAccountType {\r\n\tUSER = 'user',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum ZoneStatus {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum BobAccountType {\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum BobSettlementType {\r\n\tSETTLE_CASH = 'settle_cash',\r\n\tSETTLE_PAYOUT = 'settle_Payout',\r\n}\r\n\r\nexport enum BobSettlementStatus {\r\n\tNOT_PAID = 'not_paid',\r\n\tPAID = 'paid',\r\n\tREVOKED = 'revoked',\r\n}\r\n\r\nexport enum BobModel {\r\n\tC2B = 'C2B',\r\n\tB2C = 'B2C',\r\n}\r\n\r\nexport enum BobType {\r\n\tINWARD = 'inward',\r\n\tOUTWARD = 'outward',\r\n}\r\n\r\nexport enum CouponType {\r\n\tGLOBAL = 'global',\r\n\tINDIVIDUAL_STORE = 'individual_store',\r\n\tINDIVIDUAL_USER = 'individual_user',\r\n\tCUSTOM_COUPON = 'custom_coupon',\r\n\tREFERRAL_CODE = 'referral_code',\r\n\tREFERRAL_REWARD = 'referral_reward',\r\n}\r\n\r\nexport enum CouponExpirationReason {\r\n\tDURATION = 'duration',\r\n\tSPEND_LIMIT = 'spendLimit',\r\n\tTOTAL_ORDER_LIMIT = 'totalOrderLimit',\r\n}\r\n\r\nexport enum FavouriteType {\r\n\tPRODUCT = 'product',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum MarketingType {\r\n\tDISCOUNT = 'discount',\r\n\tBUY1GET1 = 'buy1get1',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tFEATURED = 'featured',\r\n\tLOYALTY_POINT = 'loyalty_point',\r\n\tPUNCH_MARKETING = 'punch_marketing',\r\n}\r\n\r\nexport enum MarketingStatus {\r\n\tACTIVE = 'active',\r\n\tPAUSED = 'paused',\r\n\tEXPIRED = 'expired',\r\n\tDELETED = 'deleted',\r\n}\r\n\r\nexport enum AdminRole {\r\n\tSUPER_ADMIN = 'super_admin',\r\n\tGENERAL_MANAGER = 'general_manager',\r\n\tORDER_MANAGEMENT_MANAGER = 'order_management_lead',\r\n\tORDER_MANAGEMENT_AGENT = 'order_management_agent',\r\n\tACCOUNT_MANAGER = 'account_manager',\r\n\tBUSINESS_DEVELOPMENT_EXECUTIVE = 'business_development_executive',\r\n\tACCOUNTING = 'accounting',\r\n\tMARKETING_MANAGER = 'marketing_manager',\r\n}\r\n\r\nexport enum CartStatus {\r\n\tACTIVE = 'active',\r\n\tLOCKED = 'locked',\r\n\tSUBMITTED = 'submitted',\r\n}\r\n\r\nexport enum PaymentPreference {\r\n\tPAY_FOR_EVERYONE = 'pay_for_everyone',\r\n\tPAY_FOR_THEMSELVES = 'pay_for_themselves',\r\n}\r\n\r\nexport enum CardType {\r\n\tAREEBA = 'areeba',\r\n}\r\n\r\nexport enum CardUserType {\r\n\tPARENT = 'parent',\r\n\tADMIN = 'admin',\r\n\tUSER = 'user',\r\n}\r\n\r\nexport enum AreebaCardStatus {\r\n\tPENDING = 'pending',\r\n\tACTIVE = 'active',\r\n}\r\n\r\nexport enum LiveStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n}\r\n\r\nexport enum CreatedBy {\r\n\tADMIN = 'admin',\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum ShiftType {\r\n\tDAY = 'day',\r\n\tNIGHT = 'night',\r\n}\r\n\r\nexport enum RiderType {\r\n\tSHOP_RIDER = 'shop_rider',\r\n\tLYXA_RIDER = 'lyxa_rider',\r\n}\r\n\r\nexport enum Language {\r\n\tEN = 'en',\r\n\tAR = 'ar',\r\n}\r\n\r\nexport enum OrderType {\r\n\tREGULAR = 'regular',\r\n\tCOURIER = 'courier',\r\n}\r\n\r\nexport enum RegularOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tPREPARING = 'preparing',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum CourierOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum DeliveryStatus {\r\n\tPENDING = 'pending',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum OrderCancelBy {\r\n\tUSER = 'user',\r\n\tADMIN = 'admin',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum CourierServiceType {\r\n\tDELIVERY_ONLY = 'delivery_only',\r\n\tPURCHASE_AND_DELIVER = 'purchase_and_deliver',\r\n}\r\n\r\nexport enum RiderAssignmentStatus {\r\n\tREQUESTED = 'requested',\r\n\tASSIGNED = 'assigned',\r\n\tREJECTED = 'rejected',\r\n\tCANCELED = 'canceled',\r\n}\r\n\r\nexport enum ZoneGeometryType {\r\n\tPOLYGON = 'Polygon',\r\n}\r\n\r\nexport enum WorkingHourSettingsType {\r\n\tGLOBAL = 'Global',\r\n\tSHOP = 'Shop',\r\n}\r\n\r\nexport enum MediaType {\r\n\tIMAGE = 'image',\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"enum.js","s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IAAY,gBAEX;AAFD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;AACpB,CAAC,EAFW,gBAAgB,gCAAhB,gBAAgB,QAE3B;AAED,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAClC,4CAAiB,CAAA;IACjB,wCAAa,CAAA;AACd,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AAED,IAAY,SAEX;AAFD,WAAY,SAAS;IACpB,4BAAe,CAAA;AAChB,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB","sourcesContent":["export enum Status {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n}\r\n\r\nexport enum ItemType {\r\n\tFOOD = 'food',\r\n\tGROCERY = 'grocery',\r\n\tPHARMACY = 'pharmacy',\r\n\tCOFFEE = 'coffee',\r\n\tFLOWER = 'flower',\r\n\tPET = 'pet',\r\n\tHEALTHY_CORNER = 'healthy_corner',\r\n}\r\n\r\nexport enum WeekDay {\r\n\tSunday = 0,\r\n\tMonday = 1,\r\n\tTuesday = 2,\r\n\tWednesday = 3,\r\n\tThursday = 4,\r\n\tFriday = 5,\r\n\tSaturday = 6,\r\n}\r\n\r\nexport enum WorkStatus {\r\n\tOPEN = 'open',\r\n\tCLOSED = 'closed',\r\n\tFULL_DAY = 'full_day',\r\n}\r\n\r\nexport enum HolidayWorkStatus {\r\n\tCLOSED = WorkStatus.CLOSED,\r\n\tFULL_DAY = WorkStatus.FULL_DAY,\r\n}\r\n\r\nexport enum ValueType {\r\n\tPERCENTAGE = 'percentage',\r\n\tFIXED = 'fixed',\r\n}\r\n\r\nexport enum PaymentMethod {\r\n\tCASH = 'cash',\r\n\tCARD = 'card',\r\n}\r\n\r\nexport enum PaymentStatus {\r\n\tPAID = 'paid',\r\n\tPENDING = 'pending',\r\n\tFAILED = 'failed',\r\n\tREFUNDED = 'refunded',\r\n\tPARTIALLY_REFUNDED = 'partially_refunded',\r\n}\r\n\r\nexport enum PaidCurrency {\r\n\tBASE = 'base',\r\n\tSECONDARY = 'secondary',\r\n\tMIXED = 'mixed',\r\n}\r\n\r\nexport enum SubscriptionPackage {\r\n\tMONTHLY = 'monthly',\r\n\tYEARLY = 'yearly',\r\n}\r\n\r\nexport enum SubscriptionStatus {\r\n\tONGOING = 'ongoing',\r\n\tEXPIRED = 'expired',\r\n}\r\n\r\nexport enum RatingAccountType {\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum GeoLocationType {\r\n\tPOINT = 'Point',\r\n}\r\n\r\nexport enum UpdatedField {\r\n\tMAX_TOTAL_EST_ITEMS_PRICE = 'max_total_est_items_price',\r\n\tMAX_DISTANCE = 'max_distance',\r\n\tDAILY_WORKING_HOURS = 'daily_working_hours',\r\n\tBOB_CASH_SETTLEMENT_LIMIT = 'bob_cash_settlement_limit',\r\n\tTIPS = 'tips',\r\n\tEQUIPMENTS = 'equipments',\r\n\tMONTHLY_SHOP_TARGET = 'monthly_shop_target',\r\n\tMONTHLY_REWARD_PRIZE = 'monthly_reward_prize',\r\n\tBASE_CURRENCY = 'base_currency',\r\n\tSECONDARY_CURRENCY = 'secondary_currency',\r\n\tIS_DUAL_CURRENCY_ENABLED = 'is_dual_currency_enabled',\r\n\tEXCHANGE_RATE = 'exchange_rate',\r\n\tISSUANCE_DAY = 'issuance_day',\r\n\tOVER_DUE_PERIODS = 'over_due_periods',\r\n\tPAY_LIMIT_FOR_USER = 'pay_limit_for_user',\r\n\tVAT_PERCENTAGE = 'vat_percentage',\r\n\tRIDER_SEARCH_RANGES = 'rider_search_ranges',\r\n\tNEAR_BY_SHOP_DISTANCE = 'near_by_shop_distance',\r\n\tNEAR_BY_SHOP_DISTANCE_IN_HOME_SCREEN = 'near_by_shop_distance_in_home_screen',\r\n\tUNITS = 'units',\r\n\tCURRENCY_SETTING = 'currency_setting',\r\n\tPAYMENT_METHODS = 'payment_methods',\r\n\tIS_GROUND_ORDER_ENABLED = 'is_ground_order_enabled',\r\n\tCUSTOMER_SUPPORT_PHONE_NUMBER = 'customer_support_phone_number',\r\n}\r\n\r\nexport enum SectionType {\r\n\tSTORE_PUNCHES = 'store_punches',\r\n\tNEARBY_RESTAURANT = 'nearby_restaurant',\r\n\tNEARBY_GROCERY = 'nearby_grocery',\r\n\tNEARBY_PHARMACY = 'nearby_pharmacy',\r\n\tDISCOUNT = 'discount',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tCRAZY_OFFER_SHOPS = 'crazy_offer_shops',\r\n\tORDER_AGAIN = 'order_again',\r\n\tFEATURED = 'featured',\r\n\tLOVE = 'love',\r\n\tAUTHENTIC_BEIRUT = 'authentic_beirut',\r\n\tNEAR_ME = 'near_me',\r\n}\r\n\r\nexport enum CoreAuthIdentityType {\r\n\tEMAIL = 'email',\r\n\tPHONE = 'phone',\r\n\tGOOGLE = 'google',\r\n\tAPPLE = 'apple',\r\n}\r\n\r\nexport enum ProductType {\r\n\tMEAT = 'meat',\r\n\tCHICKEN = 'chicken',\r\n\tFISH = 'fish',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tOTHER = 'other',\r\n}\r\n\r\nexport enum PriceOption {\r\n\tSINGLE_PRICE = 'single_price',\r\n\tPRICE_PER_UNIT = 'price_per_unit',\r\n\tPRICE_PER_PORTION = 'price_per_portion',\r\n}\r\n\r\nexport enum AttributeItemSelectionType {\r\n\tSINGLE = 'single',\r\n\tMULTIPLE = 'multiple',\r\n}\r\n\r\nexport enum ProductDietaryType {\r\n\tGLUTEN_FREE = 'gluten_free',\r\n\tLOW_CAL = 'low_cal',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tVEGAN = 'vegan',\r\n\tKETO = 'keto',\r\n\tLACTOSE_FREE = 'lactose_free',\r\n\tHIGH_PROTEIN = 'high_protein',\r\n}\r\n\r\nexport enum DishCategory {\r\n\tBREAKFAST = 'breakfast',\r\n\tLUNCH = 'lunch',\r\n\tDINNER = 'dinner',\r\n\tSNACKS = 'snacks',\r\n}\r\n\r\nexport enum NotificationAccountType {\r\n\tUSER = 'user',\r\n\tPARENT = 'parent',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n\tADMIN = 'admin',\r\n\tCUSTOMER_SERVICE = 'customer_service',\r\n}\r\n\r\nexport enum ClickType {\r\n\tCLICKABLE_URL = 'clickable_url',\r\n\tCLICKABLE_ORDER = 'clickable_order',\r\n\tCLICKABLE_SHOP = 'clickable_shop',\r\n\tCLICKABLE_PRODUCT = 'clickable_product',\r\n\tCLICKABLE_LIST_CONTAINER = 'clickable_list_container',\r\n\tCLICKABLE_PAYOUT = 'clickable_payout',\r\n\tCLICKABLE_BOB_FINANCE = 'clickable_bob_finance',\r\n\tCLICKABLE_REQUEST_AREA = 'clickable_request_area',\r\n}\r\n\r\nexport enum ChargeType {\r\n\tCUSTOM = 'custom',\r\n}\r\n\r\nexport enum ShopOnlineStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum ShopRole {\r\n\tPARENT = 'parent',\r\n\tPARENT_MANAGER = 'parent_manager',\r\n\tPARENT_ORDER_MANAGER = 'parent_order_manager',\r\n\tSHOP = 'shop',\r\n\tSHOP_MANAGER = 'shop_manager',\r\n\tSHOP_ORDER_MANAGER = 'shop_order_manager',\r\n}\r\n\r\nexport enum BannerClickType {\r\n\tLINK = 'link',\r\n\tSHOP = 'shop',\r\n\tPRODUCT = 'product',\r\n\tLIST_CONTAINER = 'list_container',\r\n\tPLUS = 'plus',\r\n}\r\n\r\nexport enum BannerLinkType {\r\n\tURL = 'url',\r\n\tAPP_ROUTE = 'app-route',\r\n}\r\n\r\nexport enum BannerUserType {\r\n\tALL = 'all',\r\n\tPLUS = 'plus',\r\n\tNORMAL = 'normal',\r\n}\r\n\r\nexport enum CounterType {\r\n\tORDER = 'order',\r\n\tCRM_NUMBER = 'crm_number',\r\n\tshop = 'shop',\r\n}\r\n\r\nexport enum FaqAccountType {\r\n\tUSER = 'user',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum ZoneStatus {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum BobAccountType {\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum BobSettlementType {\r\n\tSETTLE_CASH = 'settle_cash',\r\n\tSETTLE_PAYOUT = 'settle_Payout',\r\n}\r\n\r\nexport enum BobSettlementStatus {\r\n\tNOT_PAID = 'not_paid',\r\n\tPAID = 'paid',\r\n\tREVOKED = 'revoked',\r\n}\r\n\r\nexport enum BobModel {\r\n\tC2B = 'C2B',\r\n\tB2C = 'B2C',\r\n}\r\n\r\nexport enum BobType {\r\n\tINWARD = 'inward',\r\n\tOUTWARD = 'outward',\r\n}\r\n\r\nexport enum CouponType {\r\n\tGLOBAL = 'global',\r\n\tINDIVIDUAL_STORE = 'individual_store',\r\n\tINDIVIDUAL_USER = 'individual_user',\r\n\tCUSTOM_COUPON = 'custom_coupon',\r\n\tREFERRAL_CODE = 'referral_code',\r\n\tREFERRAL_REWARD = 'referral_reward',\r\n}\r\n\r\nexport enum CouponExpirationReason {\r\n\tDURATION = 'duration',\r\n\tSPEND_LIMIT = 'spendLimit',\r\n\tTOTAL_ORDER_LIMIT = 'totalOrderLimit',\r\n}\r\n\r\nexport enum FavouriteType {\r\n\tPRODUCT = 'product',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum MarketingType {\r\n\tDISCOUNT = 'discount',\r\n\tBUY1GET1 = 'buy1get1',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tFEATURED = 'featured',\r\n\tLOYALTY_POINT = 'loyalty_point',\r\n\tPUNCH_MARKETING = 'punch_marketing',\r\n}\r\n\r\nexport enum MarketingStatus {\r\n\tACTIVE = 'active',\r\n\tPAUSED = 'paused',\r\n\tEXPIRED = 'expired',\r\n\tDELETED = 'deleted',\r\n}\r\n\r\nexport enum AdminRole {\r\n\tSUPER_ADMIN = 'super_admin',\r\n\tGENERAL_MANAGER = 'general_manager',\r\n\tORDER_MANAGEMENT_MANAGER = 'order_management_lead',\r\n\tORDER_MANAGEMENT_AGENT = 'order_management_agent',\r\n\tACCOUNT_MANAGER = 'account_manager',\r\n\tBUSINESS_DEVELOPMENT_EXECUTIVE = 'business_development_executive',\r\n\tACCOUNTING = 'accounting',\r\n\tMARKETING_MANAGER = 'marketing_manager',\r\n}\r\n\r\nexport enum CartStatus {\r\n\tACTIVE = 'active',\r\n\tLOCKED = 'locked',\r\n\tSUBMITTED = 'submitted',\r\n}\r\n\r\nexport enum PaymentPreference {\r\n\tPAY_FOR_EVERYONE = 'pay_for_everyone',\r\n\tPAY_FOR_THEMSELVES = 'pay_for_themselves',\r\n}\r\n\r\nexport enum CardType {\r\n\tAREEBA = 'areeba',\r\n}\r\n\r\nexport enum CardUserType {\r\n\tPARENT = 'parent',\r\n\tADMIN = 'admin',\r\n\tUSER = 'user',\r\n}\r\n\r\nexport enum AreebaCardStatus {\r\n\tPENDING = 'pending',\r\n\tACTIVE = 'active',\r\n}\r\n\r\nexport enum LiveStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n}\r\n\r\nexport enum CreatedBy {\r\n\tADMIN = 'admin',\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum ShiftType {\r\n\tDAY = 'day',\r\n\tNIGHT = 'night',\r\n}\r\n\r\nexport enum RiderType {\r\n\tSHOP_RIDER = 'shop_rider',\r\n\tLYXA_RIDER = 'lyxa_rider',\r\n}\r\n\r\nexport enum RiderBagSize {\r\n\tREGULAR = 'regular',\r\n\tLARGE = 'large',\r\n}\r\n\r\nexport enum Language {\r\n\tEN = 'en',\r\n\tAR = 'ar',\r\n}\r\n\r\nexport enum OrderType {\r\n\tREGULAR = 'regular',\r\n\tCOURIER = 'courier',\r\n}\r\n\r\nexport enum RegularOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tPREPARING = 'preparing',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum CourierOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum DeliveryStatus {\r\n\tPENDING = 'pending',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum OrderCancelBy {\r\n\tUSER = 'user',\r\n\tADMIN = 'admin',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum CourierServiceType {\r\n\tDELIVERY_ONLY = 'delivery_only',\r\n\tPURCHASE_AND_DELIVER = 'purchase_and_deliver',\r\n}\r\n\r\nexport enum RiderAssignmentStatus {\r\n\tREQUESTED = 'requested',\r\n\tASSIGNED = 'assigned',\r\n\tREJECTED = 'rejected',\r\n\tCANCELED = 'canceled',\r\n}\r\n\r\nexport enum ZoneGeometryType {\r\n\tPOLYGON = 'Polygon',\r\n}\r\n\r\nexport enum WorkingHourSettingsType {\r\n\tGLOBAL = 'Global',\r\n\tSHOP = 'Shop',\r\n}\r\n\r\nexport enum MediaType {\r\n\tIMAGE = 'image',\r\n}\r\n"]}
|
|
@@ -78,9 +78,23 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
78
78
|
limit?: number | undefined;
|
|
79
79
|
} | undefined;
|
|
80
80
|
}>, "many">]>>;
|
|
81
|
+
search: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
searchKey: z.ZodString;
|
|
83
|
+
searchFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
searchKey: string;
|
|
86
|
+
searchFields?: string[] | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
searchKey: string;
|
|
89
|
+
searchFields?: string[] | undefined;
|
|
90
|
+
}>>;
|
|
81
91
|
}, "strip", z.ZodTypeAny, {
|
|
82
92
|
page: number;
|
|
83
93
|
size: number;
|
|
94
|
+
search?: {
|
|
95
|
+
searchKey: string;
|
|
96
|
+
searchFields?: string[] | undefined;
|
|
97
|
+
} | undefined;
|
|
84
98
|
sort?: Record<string, 1 | -1> | undefined;
|
|
85
99
|
select?: Record<string, 0 | 1> | undefined;
|
|
86
100
|
query?: Record<string, any> | undefined;
|
|
@@ -104,6 +118,10 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
104
118
|
} | undefined;
|
|
105
119
|
}[] | undefined;
|
|
106
120
|
}, {
|
|
121
|
+
search?: {
|
|
122
|
+
searchKey: string;
|
|
123
|
+
searchFields?: string[] | undefined;
|
|
124
|
+
} | undefined;
|
|
107
125
|
sort?: Record<string, 1 | -1> | undefined;
|
|
108
126
|
page?: number | undefined;
|
|
109
127
|
select?: Record<string, 0 | 1> | undefined;
|
|
@@ -47,6 +47,7 @@ exports.FilterSchema = zod_1.z
|
|
|
47
47
|
query: MongoQuerySchema.optional(),
|
|
48
48
|
select: zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)])).optional(),
|
|
49
49
|
populate: zod_1.z.union([populateSchema, zod_1.z.array(populateSchema)]).optional(),
|
|
50
|
+
search: zod_1.z.object({ searchKey: zod_1.z.string(), searchFields: zod_1.z.array(zod_1.z.string()).optional() }).optional(),
|
|
50
51
|
})
|
|
51
52
|
.optional();
|
|
52
53
|
exports.StringSchema = zod_1.z.string().min(1, 'String cannot be empty').max(255, 'String is too long');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-validation.js","sourceRoot":"/","sources":["utilities/validation/common-validation.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AACnC,2DAAyD;AACzD,kCAAkF;AAKlF,MAAM,gBAAgB,GAAmC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAClD,CAAC;AAKF,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACxB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACxB,GAAG,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAChC,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;IAC1C,GAAG,EAAE,OAAC,CAAC,KAAK,CAAC,gBAAgB,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AC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;CACnE,CAAC,CAAC;AAMU,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,GAAG,EAAE,iCAAa,CAAC,QAAQ,CAAC,KAAK,CAAC;IAClC,UAAU,EAAE,iCAAa,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CAC9D,CAAC,CAAC;AAMU,QAAA,QAAQ,GAAG,iCAAa,CAAC,QAAQ,EAAE,CAAC","sourcesContent":["import { z, ZodSchema } from 'zod';\r\nimport { DTO, ZodValidation } from './global-validation';\r\nimport { GeoLocationType, HolidayWorkStatus, WeekDay, WorkStatus } from '../enum';\r\n\r\n/**\r\n * Define MongoDB query schema (fields + operators) using lazy evaluation to avoid circular dependency\r\n */\r\nconst MongoQuerySchema: z.ZodType<Record<string, any>> = z.lazy(() =>\r\n\tz.record(z.union([z.any(), MongoOperatorsSchema]))\r\n);\r\n\r\n/**\r\n * Define allowed MongoDB query operators\r\n */\r\nconst MongoOperatorsSchema = z.object({\r\n\t$eq: z.any().optional(),\r\n\t$ne: z.any().optional(),\r\n\t$gt: z.any().optional(),\r\n\t$gte: z.any().optional(),\r\n\t$lt: z.any().optional(),\r\n\t$lte: z.any().optional(),\r\n\t$in: z.array(z.any()).optional(),\r\n\t$nin: z.array(z.any()).optional(),\r\n\t$exists: z.boolean().optional(),\r\n\t$regex: z.string().optional(),\r\n\t$and: z.array(MongoQuerySchema).optional(),\r\n\t$or: z.array(MongoQuerySchema).optional(),\r\n\t$not: MongoQuerySchema.optional(),\r\n\t$nor: z.array(MongoQuerySchema).optional(),\r\n});\r\n\r\nconst sortSchema = z.record(z.string(), z.union([z.literal(1), z.literal(-1)]));\r\n\r\nconst populateSchema = z.object({\r\n\tpath: z.string(), // required\r\n\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\tmatch: z.record(z.string(), z.any()).optional(),\r\n\toptions: z\r\n\t\t.object({\r\n\t\t\tsort: sortSchema.optional(),\r\n\t\t\tlimit: z.number().optional(),\r\n\t\t\tskip: z.number().optional(),\r\n\t\t})\r\n\t\t.optional(),\r\n});\r\n\r\n/**\r\n * Define the filter schema using MongoQuerySchema\r\n */\r\nexport const FilterSchema = z\r\n\t.object({\r\n\t\tsize: z\r\n\t\t\t.number()\r\n\t\t\t.min(1, { message: 'Size must be greater than 0.' })\r\n\t\t\t.max(100, { message: 'Size cannot exceed 100.' })\r\n\t\t\t.optional()\r\n\t\t\t.default(10),\r\n\t\tpage: z.number().min(1, { message: 'Page number must be at least 1.' }).optional().default(1),\r\n\t\tsort: sortSchema.optional(),\r\n\t\tquery: MongoQuerySchema.optional(),\r\n\t\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\t\tpopulate: z.union([populateSchema, z.array(populateSchema)]).optional(),\r\n\t})\r\n\t.optional();\r\n\r\n/**\r\n * Infer TypeScript type from Zod schema\r\n */\r\nexport type FilterDTO = z.infer<typeof FilterSchema>;\r\n\r\n/**\r\n * Define String schema\r\n */\r\nexport const StringSchema = z.string().min(1, 'String cannot be empty').max(255, 'String is too long');\r\n\r\n/**\r\n * Common address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: AddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const AddressSchema = z.object({\r\n\taddress: ZodValidation.string('Address'),\r\n\tdescription: ZodValidation.string('Description').optional(),\r\n\tcity: ZodValidation.string('City'),\r\n\tstate: ZodValidation.string('State'),\r\n\tcountry: ZodValidation.string('Country'),\r\n\tlocation: z.object({\r\n\t\ttype: ZodValidation.enumType(GeoLocationType, 'GeoLocationType').default(GeoLocationType.POINT),\r\n\t\tcoordinates: ZodValidation.array(ZodValidation.number('Coordinate'), 'Coordinates', 2, 2),\r\n\t}),\r\n\tlatitude: ZodValidation.number('Latitude'),\r\n\tlongitude: ZodValidation.number('Longitude'),\r\n\tzone: ZodValidation.objectId('Zone').optional(),\r\n});\r\n\r\n/**\r\n * Common user address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: UserAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const UserAddressSchema = AddressSchema.extend({\r\n\taddressLabel: ZodValidation.string('Address Label'),\r\n\tapartment: ZodValidation.string('Apartment'),\r\n\tbuildingName: ZodValidation.string('Building Name'),\r\n\tdeliveryOption: ZodValidation.string('Delivery Option').optional(),\r\n\tinstructions: ZodValidation.string('Instructions').optional(),\r\n});\r\n\r\n/**\r\n * Common courier address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const courierAddressSchema = z.object({\r\n * name: z.string(),\r\n * address: courierAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const CourierAddressSchema = UserAddressSchema.extend({\r\n\tname: ZodValidation.string('Name'),\r\n\tphoneNumber: ZodValidation.string('Phone Number'),\r\n});\r\n\r\n/**\r\n * Common duration validation schema that can be reused across models.\r\n * Provides validation for duration fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const subscriptionSchema = z.object({\r\n * fee: z.number(),\r\n * duration: DurationSchema\r\n * });\r\n * ```\r\n */\r\nexport const DurationSchema = z.object({\r\n\tstart: ZodValidation.date('Start'),\r\n\tend: ZodValidation.date('End').optional(),\r\n});\r\n\r\n/**\r\n * Common Work Hour validation schema that can be reused across models.\r\n * Provides validation for workHourSetting fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const settingSchema = z.object({\r\n * vat: z.number(),\r\n * workHourSetting: WorkHourSettingSchema\r\n * });\r\n * ```\r\n */\r\nconst StartEndTimeSchema = z.object({\r\n\tstart: ZodValidation.string('Start'),\r\n\tend: ZodValidation.string('End'),\r\n});\r\n\r\nexport const NormalHourSchema = z.object({\r\n\tday: ZodValidation.enumType(WeekDay, 'Day'),\r\n\tstatus: ZodValidation.enumType(WorkStatus, 'Status'),\r\n\topeningHours: ZodValidation.array(StartEndTimeSchema).default([]),\r\n});\r\n\r\nexport const HolidayHourSchema = z.object({\r\n\tdate: ZodValidation.date('Date'),\r\n\tstatus: ZodValidation.enumType(HolidayWorkStatus, 'Status'),\r\n\tclosingHour: StartEndTimeSchema,\r\n});\r\n\r\nexport const WorkHourSettingSchema = z.object({\r\n\tnormalHours: ZodValidation.array(NormalHourSchema).default([]),\r\n\tholidayHours: ZodValidation.array(HolidayHourSchema).default([]),\r\n});\r\n\r\n/**\r\n * Schema for validating user login credentials.\r\n * This schema ensures that the provided email and password meet the required validation rules.\r\n *\r\n * @example\r\n * ```typescript\r\n * const credentials = {\r\n * email: 'user@example.com',\r\n * password: 'securePassword123',\r\n * };\r\n * ```\r\n */\r\nexport const LoginSchema = z.object({\r\n\temail: ZodValidation.email('Email', {\r\n\t\trequiredMessage: 'Please enter a valid email address.',\r\n\t\tinvalidMessage: 'Please enter a valid email address.',\r\n\t}),\r\n\tpassword: ZodValidation.string('Password', { requiredMessage: 'Please enter password' }),\r\n});\r\nexport type LoginDTO = DTO<typeof LoginSchema>;\r\n\r\nconst metadataSchema = z.object({\r\n\tpage: ZodValidation.number(),\r\n\tsize: ZodValidation.number(),\r\n\ttotalElements: ZodValidation.number(),\r\n\ttotalPages: ZodValidation.number(),\r\n});\r\nexport const createPaginatedSchema = <T>(documentSchema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tmetadata: metadataSchema.optional(),\r\n\t\tdocuments: ZodValidation.array(documentSchema),\r\n\t});\r\n\r\nexport const createResponseSchema = <T>(schema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tsuccess: ZodValidation.boolean(),\r\n\t\tmessage: ZodValidation.string(),\r\n\t\tdata: z.union([createPaginatedSchema(schema), schema]).optional(),\r\n\t});\r\n\r\n/**\r\n * Schema for validating token data, typically used for authentication.\r\n * This schema ensures that the provided access token and refresh token are valid strings.\r\n *\r\n * @example\r\n * ```typescript\r\n * const tokens = {\r\n * accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * refreshToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * };\r\n * ```\r\n */\r\nexport const TokenSchema = z.object({\r\n\taccessToken: ZodValidation.string('AccessToken'),\r\n\trefreshToken: ZodValidation.string('RefreshToken'),\r\n});\r\n\r\n/**\r\n * Schema validation for sorting order\r\n */\r\nexport const UpdateSortingOrderSchema = z.object({\r\n\tstartIndex: ZodValidation.number('StartIndex').default(1),\r\n\tlist: ZodValidation.array(ZodValidation.objectId('_id'), 'List', 1),\r\n});\r\nexport type UpdateSortingOrderDTO = DTO<typeof UpdateSortingOrderSchema>;\r\n\r\n/**\r\n * Schema validation for delete\r\n */\r\nexport const DeleteSchema = z.object({\r\n\t_id: ZodValidation.objectId('_id'),\r\n\tsoftDelete: ZodValidation.boolean('Soft Delete').default(true),\r\n});\r\nexport type DeleteDTO = DTO<typeof DeleteSchema>;\r\n\r\n/**\r\n * Schema validation for Id\r\n */\r\nexport const IdSchema = ZodValidation.objectId();\r\n"]}
|
|
1
|
+
{"version":3,"file":"common-validation.js","sourceRoot":"/","sources":["utilities/validation/common-validation.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AACnC,2DAAyD;AACzD,kCAAkF;AAKlF,MAAM,gBAAgB,GAAmC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAClD,CAAC;AAKF,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,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":["import { z, ZodSchema } from 'zod';\r\nimport { DTO, ZodValidation } from './global-validation';\r\nimport { GeoLocationType, HolidayWorkStatus, WeekDay, WorkStatus } from '../enum';\r\n\r\n/**\r\n * Define MongoDB query schema (fields + operators) using lazy evaluation to avoid circular dependency\r\n */\r\nconst MongoQuerySchema: z.ZodType<Record<string, any>> = z.lazy(() =>\r\n\tz.record(z.union([z.any(), MongoOperatorsSchema]))\r\n);\r\n\r\n/**\r\n * Define allowed MongoDB query operators\r\n */\r\nconst MongoOperatorsSchema = z.object({\r\n\t$eq: z.any().optional(),\r\n\t$ne: z.any().optional(),\r\n\t$gt: z.any().optional(),\r\n\t$gte: z.any().optional(),\r\n\t$lt: z.any().optional(),\r\n\t$lte: z.any().optional(),\r\n\t$in: z.array(z.any()).optional(),\r\n\t$nin: z.array(z.any()).optional(),\r\n\t$exists: z.boolean().optional(),\r\n\t$regex: z.string().optional(),\r\n\t$and: z.array(MongoQuerySchema).optional(),\r\n\t$or: z.array(MongoQuerySchema).optional(),\r\n\t$not: MongoQuerySchema.optional(),\r\n\t$nor: z.array(MongoQuerySchema).optional(),\r\n});\r\n\r\nconst sortSchema = z.record(z.string(), z.union([z.literal(1), z.literal(-1)]));\r\n\r\nconst populateSchema = z.object({\r\n\tpath: z.string(), // required\r\n\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\tmatch: z.record(z.string(), z.any()).optional(),\r\n\toptions: z\r\n\t\t.object({\r\n\t\t\tsort: sortSchema.optional(),\r\n\t\t\tlimit: z.number().optional(),\r\n\t\t\tskip: z.number().optional(),\r\n\t\t})\r\n\t\t.optional(),\r\n});\r\n\r\n/**\r\n * Define the filter schema using MongoQuerySchema\r\n */\r\nexport const FilterSchema = z\r\n\t.object({\r\n\t\tsize: z\r\n\t\t\t.number()\r\n\t\t\t.min(1, { message: 'Size must be greater than 0.' })\r\n\t\t\t.max(100, { message: 'Size cannot exceed 100.' })\r\n\t\t\t.optional()\r\n\t\t\t.default(10),\r\n\t\tpage: z.number().min(1, { message: 'Page number must be at least 1.' }).optional().default(1),\r\n\t\tsort: sortSchema.optional(),\r\n\t\tquery: MongoQuerySchema.optional(),\r\n\t\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\t\tpopulate: z.union([populateSchema, z.array(populateSchema)]).optional(),\r\n\t\tsearch: z.object({ searchKey: z.string(), searchFields: z.array(z.string()).optional() }).optional(),\r\n\t})\r\n\t.optional();\r\n\r\n/**\r\n * Infer TypeScript type from Zod schema\r\n */\r\nexport type FilterDTO = z.infer<typeof FilterSchema>;\r\n\r\n/**\r\n * Define String schema\r\n */\r\nexport const StringSchema = z.string().min(1, 'String cannot be empty').max(255, 'String is too long');\r\n\r\n/**\r\n * Common address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: AddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const AddressSchema = z.object({\r\n\taddress: ZodValidation.string('Address'),\r\n\tdescription: ZodValidation.string('Description').optional(),\r\n\tcity: ZodValidation.string('City'),\r\n\tstate: ZodValidation.string('State'),\r\n\tcountry: ZodValidation.string('Country'),\r\n\tlocation: z.object({\r\n\t\ttype: ZodValidation.enumType(GeoLocationType, 'GeoLocationType').default(GeoLocationType.POINT),\r\n\t\tcoordinates: ZodValidation.array(ZodValidation.number('Coordinate'), 'Coordinates', 2, 2),\r\n\t}),\r\n\tlatitude: ZodValidation.number('Latitude'),\r\n\tlongitude: ZodValidation.number('Longitude'),\r\n\tzone: ZodValidation.objectId('Zone').optional(),\r\n});\r\n\r\n/**\r\n * Common user address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: UserAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const UserAddressSchema = AddressSchema.extend({\r\n\taddressLabel: ZodValidation.string('Address Label'),\r\n\tapartment: ZodValidation.string('Apartment'),\r\n\tbuildingName: ZodValidation.string('Building Name'),\r\n\tdeliveryOption: ZodValidation.string('Delivery Option').optional(),\r\n\tinstructions: ZodValidation.string('Instructions').optional(),\r\n});\r\n\r\n/**\r\n * Common courier address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const courierAddressSchema = z.object({\r\n * name: z.string(),\r\n * address: courierAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const CourierAddressSchema = UserAddressSchema.extend({\r\n\tname: ZodValidation.string('Name'),\r\n\tphoneNumber: ZodValidation.string('Phone Number'),\r\n});\r\n\r\n/**\r\n * Common duration validation schema that can be reused across models.\r\n * Provides validation for duration fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const subscriptionSchema = z.object({\r\n * fee: z.number(),\r\n * duration: DurationSchema\r\n * });\r\n * ```\r\n */\r\nexport const DurationSchema = z.object({\r\n\tstart: ZodValidation.date('Start'),\r\n\tend: ZodValidation.date('End').optional(),\r\n});\r\n\r\n/**\r\n * Common Work Hour validation schema that can be reused across models.\r\n * Provides validation for workHourSetting fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const settingSchema = z.object({\r\n * vat: z.number(),\r\n * workHourSetting: WorkHourSettingSchema\r\n * });\r\n * ```\r\n */\r\nconst StartEndTimeSchema = z.object({\r\n\tstart: ZodValidation.string('Start'),\r\n\tend: ZodValidation.string('End'),\r\n});\r\n\r\nexport const NormalHourSchema = z.object({\r\n\tday: ZodValidation.enumType(WeekDay, 'Day'),\r\n\tstatus: ZodValidation.enumType(WorkStatus, 'Status'),\r\n\topeningHours: ZodValidation.array(StartEndTimeSchema).default([]),\r\n});\r\n\r\nexport const HolidayHourSchema = z.object({\r\n\tdate: ZodValidation.date('Date'),\r\n\tstatus: ZodValidation.enumType(HolidayWorkStatus, 'Status'),\r\n\tclosingHour: StartEndTimeSchema,\r\n});\r\n\r\nexport const WorkHourSettingSchema = z.object({\r\n\tnormalHours: ZodValidation.array(NormalHourSchema).default([]),\r\n\tholidayHours: ZodValidation.array(HolidayHourSchema).default([]),\r\n});\r\n\r\n/**\r\n * Schema for validating user login credentials.\r\n * This schema ensures that the provided email and password meet the required validation rules.\r\n *\r\n * @example\r\n * ```typescript\r\n * const credentials = {\r\n * email: 'user@example.com',\r\n * password: 'securePassword123',\r\n * };\r\n * ```\r\n */\r\nexport const LoginSchema = z.object({\r\n\temail: ZodValidation.email('Email', {\r\n\t\trequiredMessage: 'Please enter a valid email address.',\r\n\t\tinvalidMessage: 'Please enter a valid email address.',\r\n\t}),\r\n\tpassword: ZodValidation.string('Password', { requiredMessage: 'Please enter password' }),\r\n});\r\nexport type LoginDTO = DTO<typeof LoginSchema>;\r\n\r\nconst metadataSchema = z.object({\r\n\tpage: ZodValidation.number(),\r\n\tsize: ZodValidation.number(),\r\n\ttotalElements: ZodValidation.number(),\r\n\ttotalPages: ZodValidation.number(),\r\n});\r\nexport const createPaginatedSchema = <T>(documentSchema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tmetadata: metadataSchema.optional(),\r\n\t\tdocuments: ZodValidation.array(documentSchema),\r\n\t});\r\n\r\nexport const createResponseSchema = <T>(schema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tsuccess: ZodValidation.boolean(),\r\n\t\tmessage: ZodValidation.string(),\r\n\t\tdata: z.union([createPaginatedSchema(schema), schema]).optional(),\r\n\t});\r\n\r\n/**\r\n * Schema for validating token data, typically used for authentication.\r\n * This schema ensures that the provided access token and refresh token are valid strings.\r\n *\r\n * @example\r\n * ```typescript\r\n * const tokens = {\r\n * accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * refreshToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * };\r\n * ```\r\n */\r\nexport const TokenSchema = z.object({\r\n\taccessToken: ZodValidation.string('AccessToken'),\r\n\trefreshToken: ZodValidation.string('RefreshToken'),\r\n});\r\n\r\n/**\r\n * Schema validation for sorting order\r\n */\r\nexport const UpdateSortingOrderSchema = z.object({\r\n\tstartIndex: ZodValidation.number('StartIndex').default(1),\r\n\tlist: ZodValidation.array(ZodValidation.objectId('_id'), 'List', 1),\r\n});\r\nexport type UpdateSortingOrderDTO = DTO<typeof UpdateSortingOrderSchema>;\r\n\r\n/**\r\n * Schema validation for delete\r\n */\r\nexport const DeleteSchema = z.object({\r\n\t_id: ZodValidation.objectId('_id'),\r\n\tsoftDelete: ZodValidation.boolean('Soft Delete').default(true),\r\n});\r\nexport type DeleteDTO = DTO<typeof DeleteSchema>;\r\n\r\n/**\r\n * Schema validation for Id\r\n */\r\nexport const IdSchema = ZodValidation.objectId();\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
4
4
|
"description": "The Core system of the Lyxa services.",
|
|
5
5
|
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"jsonwebtoken": "^9.0.2",
|
|
32
32
|
"mime-types": "^3.0.1",
|
|
33
33
|
"moment": "^2.30.1",
|
|
34
|
-
"mongoose": "^8.
|
|
34
|
+
"mongoose": "^8.13.0",
|
|
35
35
|
"nanoid": "^5.1.5",
|
|
36
36
|
"pino": "^9.5.0",
|
|
37
37
|
"pino-mongodb": "^4.3.0",
|