@lyxa.ai/core 1.3.62 → 1.3.64
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/embedded/status-timeline.model.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +0 -3
- package/dist/libraries/mongo/models/index.js +2 -6
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/mongo/models/service-order.model.d.ts +1 -0
- package/dist/libraries/mongo/models/service-order.model.js +5 -0
- package/dist/libraries/mongo/models/service-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-package.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-promotion.model.d.ts +5 -5
- package/dist/libraries/mongo/models/service-promotion.model.js +19 -15
- package/dist/libraries/mongo/models/service-promotion.model.js.map +1 -1
- package/dist/libraries/mongo/models/shared/promotion-duration.model.d.ts +7 -2
- package/dist/libraries/mongo/models/shared/promotion-duration.model.js +14 -5
- package/dist/libraries/mongo/models/shared/promotion-duration.model.js.map +1 -1
- package/dist/libraries/socket/PushNotificationEvent.d.ts +1 -1
- package/dist/libraries/socket/PushNotificationEvent.js.map +1 -1
- package/dist/libraries/socket/core/socket-event-publisher.js +13 -10
- package/dist/libraries/socket/core/socket-event-publisher.js.map +1 -1
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.js +7 -1
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.js.map +1 -1
- package/dist/libraries/socket/events/order-actions.socket.event.d.ts +0 -2
- package/dist/libraries/socket/events/order-actions.socket.event.js +7 -3
- package/dist/libraries/socket/events/order-actions.socket.event.js.map +1 -1
- package/dist/libraries/socket/events/socketNotificationEvent.d.ts +13 -0
- package/dist/libraries/socket/events/socketNotificationEvent.js +2 -0
- package/dist/libraries/socket/events/socketNotificationEvent.js.map +1 -1
- package/dist/libraries/socket/events/ticket-assign.socket.event.js +7 -1
- package/dist/libraries/socket/events/ticket-assign.socket.event.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +12 -12
- package/package.json +1 -1
- package/dist/libraries/mongo/models/faq.model.d.ts +0 -9
- package/dist/libraries/mongo/models/faq.model.js +0 -53
- package/dist/libraries/mongo/models/faq.model.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-timeline.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/status-timeline.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAMoC;AAEpC,MAAM,cAAc;IAEZ,SAAS,CAAQ;IAGjB,SAAS,CAAc;IAGvB,KAAK,CAAU;IAGf,WAAW,CAAe;CACjC;AAVO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;8BACvB,IAAI;iDAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;iDACG;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACD;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAW,EAAE,CAAC;;mDACT;AAGlC,MAAa,0BAA2B,SAAQ,cAAc;IAKtD,MAAM,CAAU;IAMhB,YAAY,CAAU;CAC7B;AAZD,gEAYC;AAPO;IAJN,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,yBAAkB;KACxB,CAAC;;0DACqB;AAMhB;IAJN,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,yBAAkB;KACxB,CAAC;;gEAC2B;AAG9B,MAAa,0BAA2B,SAAQ,cAAc;IAKtD,MAAM,CAAU;CACvB;AAND,gEAMC;AADO;IAJN,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,yBAAkB;KACxB,CAAC;;0DACqB;AAGxB,MAAa,0BAA2B,SAAQ,cAAc;IAMtD,MAAM,CAAU;CACvB;AAPD,gEAOC;AADO;IALN,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,yBAAkB;QACxB,OAAO,EAAE,yBAAkB,CAAC,OAAO;KACnC,CAAC;;0DACqB","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Admin } from '../admin.model';\nimport {\n\tCourierOrderStatus,\n\tRegularOrderStatus,\n\tRequestFrom,\n\tServiceOrderStatus,\n\tStatusTimelineType,\n} from '../../../../utilities/enum';\n\nclass StatusTimeline {\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date; // scope for discussion to change the name to date\n\n\t@prop({ ref: () => Admin })\n\tpublic updatedBy?: Ref<Admin>;\n\n\t@prop({ type: String })\n\tpublic notes?: string;\n\n\t@prop({ type: String, enum: RequestFrom })\n\tpublic requestFrom?: RequestFrom;\n}\n\nexport class RegularOrderStatusTimeline extends StatusTimeline {\n\t@prop({\n\t\ttype: String,\n\t\tenum: RegularOrderStatus,\n\t})\n\tpublic status?: string;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: StatusTimelineType,\n\t})\n\tpublic timelineType?: string;\n}\n\nexport class CourierOrderStatusTimeline extends StatusTimeline {\n\t@prop({\n\t\ttype: String,\n\t\tenum: CourierOrderStatus,\n\t})\n\tpublic status?: string;\n}\n\nexport class ServiceOrderStatusTimeline extends StatusTimeline {\n\t@prop({\n\t\ttype: String,\n\t\tenum: ServiceOrderStatus,\n\t\tdefault: ServiceOrderStatus.PENDING,\n\t})\n\tpublic status?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"status-timeline.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/status-timeline.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA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from '@typegoose/typegoose';\nimport { Admin } from '../admin.model';\nimport {\n\tCourierOrderStatus,\n\tRegularOrderStatus,\n\tRequestFrom,\n\tServiceOrderStatus,\n\tStatusTimelineType,\n} from '../../../../utilities/enum';\n\nclass StatusTimeline {\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date; // scope for discussion to change the name to date\n\n\t@prop({ ref: () => Admin })\n\tpublic updatedBy?: Ref<Admin>;\n\n\t@prop({ type: String })\n\tpublic notes?: string;\n\n\t@prop({ type: String, enum: RequestFrom })\n\tpublic requestFrom?: RequestFrom;\n}\n\nexport class RegularOrderStatusTimeline extends StatusTimeline {\n\t@prop({\n\t\ttype: String,\n\t\tenum: RegularOrderStatus,\n\t})\n\tpublic status?: string;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: StatusTimelineType,\n\t})\n\tpublic timelineType?: string;\n}\n \nexport class CourierOrderStatusTimeline extends StatusTimeline {\n\t@prop({\n\t\ttype: String,\n\t\tenum: CourierOrderStatus,\n\t}) \n\tpublic status?: string;\n}\n \nexport class ServiceOrderStatusTimeline extends StatusTimeline {\n\t@prop({\n\t\ttype: String,\n\t\tenum: ServiceOrderStatus,\n\t\tdefault: ServiceOrderStatus.PENDING,\n\t})\n\tpublic status?: string;\n}\n"]}
|
|
@@ -16,7 +16,6 @@ import { Counter } from './counter.model';
|
|
|
16
16
|
import { Coupon } from './coupon.model';
|
|
17
17
|
import { DealSetting } from './deal-setting.model';
|
|
18
18
|
import { Dish } from './dish.model';
|
|
19
|
-
import { Faq } from './faq.model';
|
|
20
19
|
import { Favourite } from './favourite.model';
|
|
21
20
|
import { FeaturedSetting } from './featured-setting.model';
|
|
22
21
|
import { FilterContainer } from './filter-container.model';
|
|
@@ -178,8 +177,6 @@ export declare const DealSettingModel: ReturnModelType<typeof DealSetting>;
|
|
|
178
177
|
export * from './deal-setting.model';
|
|
179
178
|
export declare const DishModel: ReturnModelType<typeof Dish>;
|
|
180
179
|
export * from './dish.model';
|
|
181
|
-
export declare const FaqModel: ReturnModelType<typeof Faq>;
|
|
182
|
-
export * from './faq.model';
|
|
183
180
|
export declare const FavouriteModel: ReturnModelType<typeof Favourite>;
|
|
184
181
|
export * from './favourite.model';
|
|
185
182
|
export declare const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting>;
|
|
@@ -14,9 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.PayoutModel = exports.ParentModel = exports.ShopCourierOrderModel = exports.CourierOrderModel = exports.RegularOrderModel = exports.OrderModel = exports.NutritionModel = exports.NotificationModel = exports.MealPlanModel = exports.PunchMarketingModel = exports.FreeDeliveryMarketingModel = exports.FeaturedMarketingModel = exports.DiscountMarketingModel = exports.Buy1Get1MarketingModel = exports.MarketingModel = exports.ListContainerModel = exports.LineItemModel = exports.GalleryUploadModel = exports.GalleryModel = exports.FlagModel = exports.FinanceSettlementModel = exports.FilterContainerModel = exports.FeaturedSettingModel = exports.FavouriteModel = exports.
|
|
18
|
-
exports.ServicePromotionModel = exports.TicketActionModel = exports.BlockedTimeModel = exports.ProfessionalScheduleModel = exports.ServiceOrderModel = exports.ServiceLineItemModel = exports.ServiceCartModel = exports.ProfessionalModel = exports.ServicePackageModel = exports.AddOnModel = exports.ServiceCategoryModel = exports.VendorAccessControlModel = exports.VendorModel = exports.VendorParentModel = exports.ServiceModel = exports.ChatroomModel = exports.AgentPerformanceModel = exports.MessageModel = exports.TicketModel = exports.RewardModel = exports.CancellationReasonModel = exports.SupportReasonModel = exports.TermsAndConditionsModel = exports.DefaultChatModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.ServiceOrderReviewModel = exports.RiderReviewModel = exports.ShopReviewModel = exports.ReviewModel = exports.RequestAreaModel = exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductUploadModel = exports.ProductModel = exports.ProductMarketingModel = exports.RiderPayoutModel =
|
|
19
|
-
exports.ZoneExtraTimeModel = void 0;
|
|
17
|
+
exports.ShopPayoutModel = exports.PayoutModel = exports.ParentModel = exports.ShopCourierOrderModel = exports.CourierOrderModel = exports.RegularOrderModel = exports.OrderModel = exports.NutritionModel = exports.NotificationModel = exports.MealPlanModel = exports.PunchMarketingModel = exports.FreeDeliveryMarketingModel = exports.FeaturedMarketingModel = exports.DiscountMarketingModel = exports.Buy1Get1MarketingModel = exports.MarketingModel = exports.ListContainerModel = exports.LineItemModel = exports.GalleryUploadModel = exports.GalleryModel = exports.FlagModel = exports.FinanceSettlementModel = exports.FilterContainerModel = exports.FeaturedSettingModel = exports.FavouriteModel = exports.DishModel = exports.DealSettingModel = exports.ReferralRewardCouponModel = exports.ReferralCodeCouponModel = exports.IndividualUserCouponModel = exports.IndividualStoreCouponModel = exports.ShopsCategoriesCouponModel = exports.GlobalCouponModel = exports.CustomCouponModel = exports.BaseCouponModel = exports.CouponModel = exports.CounterModel = exports.CategoryModel = exports.CartParticipantModel = exports.CartModel = exports.ServiceControlModel = exports.AppAppearanceModel = exports.BrandModel = exports.BOBFinanceModel = exports.BannerModel = exports.AttributeModel = exports.UserAppSectionSettingModel = exports.AdminModel = exports.AdminAccessControlModel = exports.ActivityLogModel = void 0;
|
|
18
|
+
exports.ZoneExtraTimeModel = exports.ServicePromotionModel = exports.TicketActionModel = exports.BlockedTimeModel = exports.ProfessionalScheduleModel = exports.ServiceOrderModel = exports.ServiceLineItemModel = exports.ServiceCartModel = exports.ProfessionalModel = exports.ServicePackageModel = exports.AddOnModel = exports.ServiceCategoryModel = exports.VendorAccessControlModel = exports.VendorModel = exports.VendorParentModel = exports.ServiceModel = exports.ChatroomModel = exports.AgentPerformanceModel = exports.MessageModel = exports.TicketModel = exports.RewardModel = exports.CancellationReasonModel = exports.SupportReasonModel = exports.TermsAndConditionsModel = exports.DefaultChatModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.ServiceOrderReviewModel = exports.RiderReviewModel = exports.ShopReviewModel = exports.ReviewModel = exports.RequestAreaModel = exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductUploadModel = exports.ProductModel = exports.ProductMarketingModel = exports.RiderPayoutModel = void 0;
|
|
20
19
|
exports.getCardModel = getCardModel;
|
|
21
20
|
exports.getAreebaCardModel = getAreebaCardModel;
|
|
22
21
|
exports.getCoreAuthIdentityModel = getCoreAuthIdentityModel;
|
|
@@ -45,7 +44,6 @@ const counter_model_1 = require("./counter.model");
|
|
|
45
44
|
const coupon_model_1 = require("./coupon.model");
|
|
46
45
|
const deal_setting_model_1 = require("./deal-setting.model");
|
|
47
46
|
const dish_model_1 = require("./dish.model");
|
|
48
|
-
const faq_model_1 = require("./faq.model");
|
|
49
47
|
const favourite_model_1 = require("./favourite.model");
|
|
50
48
|
const featured_setting_model_1 = require("./featured-setting.model");
|
|
51
49
|
const filter_container_model_1 = require("./filter-container.model");
|
|
@@ -269,8 +267,6 @@ exports.DealSettingModel = (0, typegoose_1.getModelForClass)(deal_setting_model_
|
|
|
269
267
|
__exportStar(require("./deal-setting.model"), exports);
|
|
270
268
|
exports.DishModel = (0, typegoose_1.getModelForClass)(dish_model_1.Dish);
|
|
271
269
|
__exportStar(require("./dish.model"), exports);
|
|
272
|
-
exports.FaqModel = (0, typegoose_1.getModelForClass)(faq_model_1.Faq);
|
|
273
|
-
__exportStar(require("./faq.model"), exports);
|
|
274
270
|
exports.FavouriteModel = (0, typegoose_1.getModelForClass)(favourite_model_1.Favourite);
|
|
275
271
|
__exportStar(require("./favourite.model"), exports);
|
|
276
272
|
exports.FeaturedSettingModel = (0, typegoose_1.getModelForClass)(featured_setting_model_1.FeaturedSetting);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA2KA,oCAGC;AAED,gDAIC;AAED,4DAIC;AAED,sEAIC;AAED,sEAIC;AAED,wEAIC;AAED,sEAIC;AAED,4CAIC;AAED,oCAGC;AAGD,wDA2CC;AA3QD,uEAA4D;AAC5D,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,qFAAyE;AACzE,uDAA8C;AAC9C,iDAAwC;AACxC,gEAAsD;AACtD,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6CAAoC;AACpC,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,6CAAoC;AACpC,6EAAmE;AACnE,6DAAoD;AACpD,2CAAkC;AAClC,6CAAoC;AACpC,qFAA0E;AAC1E,kDASiC;AACjC,+CAAsC;AACtC,yEAA+D;AAC/D,mFAAyE;AACzE,mFAAyE;AACzE,6FAAkF;AAClF,yEAA+D;AAC/D,6FAAkF;AAClF,2FAAg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AAU,GAAkC,IAAA,4BAAgB,EAAC,mBAAK,CAAC,CAAC;AACjF,gDAA8B;AAEjB,QAAA,mBAAmB,GAA2C,IAAA,4BAAgB,EAAC,sCAAc,CAAC,CAAC;AAC5G,0DAAwC;AAE3B,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,iCAAY,CAAC,CAAC;AACtG,uDAAqC;AAExB,QAAA,gBAAgB,GAAwC,IAAA,4BAAgB,EAAC,gCAAW,CAAC,CAAC;AACnG,uDAAqC;AAExB,QAAA,oBAAoB,GAChC,IAAA,4BAAgB,EAAC,yCAAe,CAAC,CAAC;AACnC,4DAA0C;AAE7B,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,kCAAY,CAAC,CAAC;AACtG,wDAAsC;AAEzB,QAAA,yBAAyB,GACrC,IAAA,4BAAgB,EAAC,4CAAoB,CAAC,CAAC;AACxC,0DAAwC;AAE3B,QAAA,gBAAgB,GAAwC,IAAA,4BAAgB,EAAC,gCAAW,CAAC,CAAC;AACnG,uDAAqC;AAExB,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,kCAAY,CAAC,CAAC;AACtG,wDAAsC;AAEzB,QAAA,qBAAqB,GACjC,IAAA,4BAAgB,EAAC,0CAAgB,CAAC,CAAC;AACpC,4DAA0C;AAE7B,QAAA,kBAAkB,GAA0C,IAAA,4BAAgB,EAAC,+BAAa,CAAC,CAAC;AACzG,oDAAkC;AAElC,4DAA0C","sourcesContent":["import { ServiceLineItem } from './service-line-item.model';\nimport { RiderPayout } from './providers/rider-payout.model';\nimport { ShopPayout } from './providers/shop-payout.model';\nimport { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\nimport { Admin } from './admin.model';\nimport { AdminAccessControl } from './admin-access-control.model';\nimport { ActivityLog } from './activity-log.model';\nimport { UserAppSectionSetting } from './user-app-section-setting.model';\nimport { Attribute } from './attribute.model';\nimport { Banner } from './banner.model';\nimport { BaseCoupon } from './base/base-coupon.model';\nimport { BOBFinance } from './bob-finance.model';\nimport { Brand } from './brand.model';\nimport { Category } from './category.model';\nimport { Counter } from './counter.model';\nimport { Coupon } from './coupon.model';\nimport { DealSetting } from './deal-setting.model';\nimport { Dish } from './dish.model';\nimport { Faq } from './faq.model';\nimport { Favourite } from './favourite.model';\nimport { FeaturedSetting } from './featured-setting.model';\nimport { FilterContainer } from './filter-container.model';\nimport { ListContainer } from './list-container.model';\nimport { Marketing } from './marketing.model';\nimport { MealPlan } from './meal-plan.model';\nimport { Nutrition } from './nutrition.model';\nimport { Parent } from './parent.model';\nimport { ProductMarketing } from './product-marketing.model';\nimport { Product } from './product.model';\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\nimport { RatingSetting } from './rating-setting.model';\nimport { ReferralSetting } from './referral-setting.model';\nimport { RequestArea } from './request-area.model';\nimport { Role } from './role.model';\nimport { Setting } from './setting.model';\nimport { ShopAccessControl } from './shop-access-control.model';\nimport { ShopCategory } from './shop-category.model';\nimport { ShopMealPlan } from './shop-meal-plan.model';\nimport { Shop } from './shop.model';\nimport { SubscriptionSetting } from './subscription-setting.model';\nimport { Subscription } from './subscription.model';\nimport { Tag } from './tag.model';\nimport { Zone } from './zone.model';\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\nimport {\n\tCardType,\n\tCoreAuthIdentityType,\n\tCounterType,\n\tCouponType,\n\tMarketingType,\n\tOrderType,\n\tPayoutType,\n\tReviewType,\n} from '../../../utilities/enum';\nimport { AddOn } from './addon.model';\nimport { CustomCoupon } from './providers/custom-coupon.model';\nimport { DiscountMarketing } from './providers/discount-marketing.model';\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\nimport { GlobalCoupon } from './providers/global-coupon.model';\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\nimport { PunchMarketing } from './providers/punch-marketing.model';\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\nimport { Notification } from './notification.model';\nimport { CoreAuthIdentity } from './core-auth-identity.model';\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\nimport { CoreUser } from './core-user.model';\nimport { Card } from './card.model';\nimport { AreebaCard } from './providers/areeba-card.model';\nimport { RiderTracking } from './rider-tracking.model';\nimport { Rider } from './rider.model';\nimport { RiderTimeout } from './rider-timeout.model';\nimport { User } from './user.model';\nimport { Cart } from './cart.model';\nimport { LineItem } from './line-item.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { Gallery } from './gallery.model';\nimport { Order } from './order.model';\nimport { RegularOrder } from './providers/regular-order.model';\nimport { CourierOrder } from './providers/courier-order.model';\nimport { FinanceSettlement } from './finance-settlement.model';\nimport { DefaultChat } from './default-chat.model';\nimport { TermsAndConditions } from './terms-and-conditions.model';\nimport { SupportReason } from './support-reason.model';\nimport { CancellationReason } from './cancellation-reason.model';\nimport { Payout } from './payout.model';\nimport { Reward } from './reward.model';\nimport { Ticket } from './ticket.model';\nimport { Message } from './message.model';\nimport { AgentPerformance } from './agent-performance.model';\nimport { Chatroom } from './chat-room.model';\nimport { initializeRefreshTokenModel } from '../../auth';\nimport { VendorParent } from './vendor-parent.model';\nimport { Vendor } from './vendor.model';\nimport { VendorAccessControl } from './vendor-access-control.model';\nimport { ServiceCategory } from './service-category.model';\nimport { ServicePackage } from './service-package.model';\nimport { Professional } from './professional.model';\nimport { ServiceOrder } from './service-order.model';\nimport { ProfessionalSchedule } from './professional-schedule';\nimport { Service } from './service.model';\nimport { TicketAction } from './ticket-action.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ShopCourierOrder } from './providers/shop-courier.model';\nimport { ServicePromotion } from './service-promotion.model';\nimport { Flag } from './flag.model';\nimport { Review } from './review.model';\nimport { ShopReview } from './providers/shop-review.model';\nimport { RiderReview } from './providers/rider-review.model';\nimport { ServiceOrderReview } from './providers/service-order-review.model';\nimport { assignIdsToDocuments } from '../../../utilities/id-generator';\nimport { GalleryUpload } from './gallery-upload.model';\nimport { ProductUpload } from './product-upload.model';\nimport { ShopsCategoriesCoupon } from './providers/shops-categories-coupon.model';\nimport { BlockedTime } from './blocked-time.model';\nimport { ZoneExtraTime } from './zone-extra-time';\nimport { AppAppearance } from './app-appearance.model';\nimport { ServiceControl } from './service-control.model';\n\n// Regular models (using standard getModelForClass)\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\nexport * from './activity-log.model';\n\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\n\tgetModelForClass(AdminAccessControl);\nexport * from './admin-access-control.model';\n\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\nexport * from './admin.model';\n\nexport const UserAppSectionSettingModel: ReturnModelType<typeof UserAppSectionSetting> =\n\tgetModelForClass(UserAppSectionSetting);\nexport * from './user-app-section-setting.model';\n\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\nexport * from './attribute.model';\n\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\nexport * from './banner.model';\n\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\nexport * from './bob-finance.model';\n\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\nexport * from './brand.model';\n\nexport const AppAppearanceModel: ReturnModelType<typeof AppAppearance> = getModelForClass(AppAppearance);\nexport * from './app-appearance.model';\n\nexport const ServiceControlModel: ReturnModelType<typeof ServiceControl> = getModelForClass(ServiceControl);\nexport * from './service-control.model';\n\n// Global models - will be set after initGlobalConnection()\nlet actualCardModel: ReturnModelType<typeof Card> | null = null;\nlet actualCoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> | null = null;\nlet actualCoreUserModel: ReturnModelType<typeof CoreUser> | null = null;\nlet actualRoleModel: ReturnModelType<typeof Role> | null = null;\n\n// Global discriminator models - will be set after initGlobalConnection()\nlet actualAreebaCardModel: ReturnModelType<typeof AreebaCard> | null = null;\nlet actualCoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> | null = null;\nlet actualCorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> | null = null;\nlet actualCoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> | null = null;\nlet actualCoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> | null = null;\n\n// Export getter functions for global models\nexport function getCardModel(): ReturnModelType<typeof Card> {\n\tif (!actualCardModel) throw new Error('Card model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCardModel;\n}\n\nexport function getAreebaCardModel(): ReturnModelType<typeof AreebaCard> {\n\tif (!actualAreebaCardModel)\n\t\tthrow new Error('AreebaCard model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualAreebaCardModel;\n}\n\nexport function getCoreAuthIdentityModel(): ReturnModelType<typeof CoreAuthIdentity> {\n\tif (!actualCoreAuthIdentityModel)\n\t\tthrow new Error('CoreAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAuthIdentityModel;\n}\n\nexport function getCoreEmailAuthIdentityModel(): ReturnModelType<typeof CoreEmailAuthIdentity> {\n\tif (!actualCoreEmailAuthIdentityModel)\n\t\tthrow new Error('CoreEmailAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreEmailAuthIdentityModel;\n}\n\nexport function getCorePhoneAuthIdentityModel(): ReturnModelType<typeof CorePhoneAuthIdentity> {\n\tif (!actualCorePhoneAuthIdentityModel)\n\t\tthrow new Error('CorePhoneAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCorePhoneAuthIdentityModel;\n}\n\nexport function getCoreGoogleAuthIdentityModel(): ReturnModelType<typeof CoreGoogleAuthIdentity> {\n\tif (!actualCoreGoogleAuthIdentityModel)\n\t\tthrow new Error('CoreGoogleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreGoogleAuthIdentityModel;\n}\n\nexport function getCoreAppleAuthIdentityModel(): ReturnModelType<typeof CoreAppleAuthIdentity> {\n\tif (!actualCoreAppleAuthIdentityModel)\n\t\tthrow new Error('CoreAppleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAppleAuthIdentityModel;\n}\n\nexport function getCoreUserModel(): ReturnModelType<typeof CoreUser> {\n\tif (!actualCoreUserModel)\n\t\tthrow new Error('CoreUser model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreUserModel;\n}\n\nexport function getRoleModel(): ReturnModelType<typeof Role> {\n\tif (!actualRoleModel) throw new Error('Role model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualRoleModel;\n}\n\n// Function to initialize all global models (called from initGlobalConnection)\nexport function initializeGlobalModels(globalConnection: any) {\n\t// Initialize base global models\n\tactualCardModel = getModelForClass(Card, { existingConnection: globalConnection });\n\tactualCoreAuthIdentityModel = getModelForClass(CoreAuthIdentity, { existingConnection: globalConnection });\n\tactualCoreUserModel = getModelForClass(CoreUser, { existingConnection: globalConnection });\n\tactualRoleModel = getModelForClass(Role, { existingConnection: globalConnection });\n\n\t// Initialize discriminator models\n\tactualAreebaCardModel = getDiscriminatorModelForClass(actualCardModel, AreebaCard, CardType.AREEEBA, {\n\t\texistingConnection: globalConnection,\n\t});\n\n\tactualCoreEmailAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreEmailAuthIdentity,\n\t\tCoreAuthIdentityType.EMAIL,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCorePhoneAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCorePhoneAuthIdentity,\n\t\tCoreAuthIdentityType.PHONE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreGoogleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreGoogleAuthIdentity,\n\t\tCoreAuthIdentityType.GOOGLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreAppleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreAppleAuthIdentity,\n\t\tCoreAuthIdentityType.APPLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tinitializeRefreshTokenModel(globalConnection);\n\n\tconsole.log('✅ All global models initialized');\n}\n\nexport * from './card.model';\nexport * from './providers/areeba-card.model';\n\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\nexport * from './cart.model';\n\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\n\tgetModelForClass(CartParticipant);\nexport * from './cart-participant.model';\n\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\nexport * from './category.model';\n\nexport * from './core-auth-identity.model';\nexport * from './providers/core-apple-auth-identity.model';\nexport * from './providers/core-email-auth-identity.model';\nexport * from './providers/core-google-auth-identity.model';\nexport * from './providers/core-phone-auth-identity.model';\nexport * from './core-user.model';\nexport * from './role.model';\n\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\nexport * from './counter.model';\n\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\nexport const BaseCouponModel: ReturnModelType<typeof BaseCoupon> = getModelForClass(BaseCoupon);\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\n\tCouponModel,\n\tCustomCoupon,\n\tCouponType.CUSTOM_COUPON\n);\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\n\tCouponModel,\n\tGlobalCoupon,\n\tCouponType.GLOBAL\n);\nexport const ShopsCategoriesCouponModel: ReturnModelType<typeof ShopsCategoriesCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ShopsCategoriesCoupon, CouponType.SHOPS_CATEGORIES);\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\nexport * from './coupon.model';\nexport * from './base/base-coupon.model';\nexport * from './providers/custom-coupon.model';\nexport * from './providers/global-coupon.model';\nexport * from './providers/shops-categories-coupon.model';\nexport * from './providers/individual-store-coupon.model';\nexport * from './providers/individual-user-coupon.model';\nexport * from './providers/referral-code-coupon.model';\nexport * from './providers/referral-reward-coupon.model';\n\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\nexport * from './deal-setting.model';\n\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\nexport * from './dish.model';\n\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\nexport * from './faq.model';\n\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\nexport * from './favourite.model';\n\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\n\tgetModelForClass(FeaturedSetting);\nexport * from './featured-setting.model';\n\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\n\tgetModelForClass(FilterContainer);\nexport * from './filter-container.model';\n\nexport const FinanceSettlementModel: ReturnModelType<typeof FinanceSettlement> =\n\tgetModelForClass(FinanceSettlement);\nexport * from './finance-settlement.model';\n\nexport const FlagModel: ReturnModelType<typeof Flag> = getModelForClass(Flag);\nexport * from './flag.model';\n\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\nexport * from './gallery.model';\n\nexport const GalleryUploadModel: ReturnModelType<typeof GalleryUpload> = getModelForClass(GalleryUpload);\nexport * from './gallery-upload.model';\n\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\nexport * from './line-item.model';\n\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\nexport * from './list-container.model';\n\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\n\tMarketingModel,\n\tPunchMarketing,\n\tMarketingType.PUNCH_MARKETING\n);\nexport * from './marketing.model';\nexport * from './providers/buy1-get1-marketing.model';\nexport * from './providers/discount-marketing.model';\nexport * from './providers/featured-marketing.model';\nexport * from './providers/free-delivery-marketing.model';\nexport * from './providers/punch-marketing.model';\n\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\nexport * from './meal-plan.model';\n\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\nexport * from './notification.model';\n\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\nexport * from './nutrition.model';\n\nexport const OrderModel: ReturnModelType<typeof Order> = getModelForClass(Order);\nexport const RegularOrderModel: ReturnModelType<typeof RegularOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tRegularOrder,\n\tOrderType.REGULAR\n);\nexport const CourierOrderModel: ReturnModelType<typeof CourierOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tCourierOrder,\n\tOrderType.COURIER\n);\n\nexport const ShopCourierOrderModel: ReturnModelType<typeof ShopCourierOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tShopCourierOrder,\n\tOrderType.SHOP_COURIER\n);\n\nexport * from './order.model';\nexport * from './providers/regular-order.model';\nexport * from './providers/courier-order.model';\nexport * from './providers/shop-courier.model';\n\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\nexport * from './parent.model';\n\nexport const PayoutModel: ReturnModelType<typeof Payout> = getModelForClass(Payout);\nexport const ShopPayoutModel: ReturnModelType<typeof ShopPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tShopPayout,\n\tPayoutType.SHOP\n);\nexport const RiderPayoutModel: ReturnModelType<typeof RiderPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tRiderPayout,\n\tPayoutType.RIDER\n);\nexport * from './payout.model';\nexport * from './providers/shop-payout.model';\nexport * from './providers/rider-payout.model';\n\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\n\tgetModelForClass(ProductMarketing);\nexport * from './product-marketing.model';\n\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\nexport * from './product.model';\nProductModel.schema.pre('insertMany', async function (next, docs: Product[]) {\n\t// Generate all IDs at once (ATOMIC)\n\tawait assignIdsToDocuments(CounterModel, CounterType.ITEM, docs, 'productId');\n\tnext();\n});\n\nexport const ProductUploadModel: ReturnModelType<typeof ProductUpload> = getModelForClass(ProductUpload);\nexport * from './product-upload.model';\n\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\n\tgetModelForClass(PunchMarketingHistory);\nexport * from './punch-marketing-history.model';\n\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\nexport * from './rating-setting.model';\n\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\n\tgetModelForClass(ReferralSetting);\nexport * from './referral-setting.model';\n\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\nexport * from './request-area.model';\n\nexport const ReviewModel: ReturnModelType<typeof Review> = getModelForClass(Review);\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tShopReview,\n\tReviewType.SHOP\n);\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tRiderReview,\n\tReviewType.RIDER\n);\nexport const ServiceOrderReviewModel: ReturnModelType<typeof ServiceOrderReview> =\n\tgetDiscriminatorModelForClass(ReviewModel, ServiceOrderReview, ReviewType.SERVICE_ORDER);\nexport * from './review.model';\nexport * from './providers/shop-review.model';\nexport * from './providers/rider-review.model';\nexport * from './providers/service-order-review.model';\n\nexport const RiderTimeoutModel: ReturnModelType<typeof RiderTimeout> = getModelForClass(RiderTimeout);\nexport * from './rider-timeout.model';\n\nexport const RiderTrackingModel: ReturnModelType<typeof RiderTracking> = getModelForClass(RiderTracking);\nexport * from './rider-tracking.model';\n\nexport const RiderModel: ReturnModelType<typeof Rider> = getModelForClass(Rider);\nexport * from './rider.model';\n\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\nexport * from './setting.model';\n\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\n\tgetModelForClass(ShopAccessControl);\nexport * from './shop-access-control.model';\n\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\nexport * from './shop-category.model';\n\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\nexport * from './shop-meal-plan.model';\n\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\nexport * from './shop.model';\n\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\n\tgetModelForClass(SubscriptionSetting);\nexport * from './subscription-setting.model';\n\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\nexport * from './subscription.model';\n\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\nexport * from './tag.model';\n\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\nexport * from './user.model';\n\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\nexport * from './zone.model';\n\nexport const DefaultChatModel: ReturnModelType<typeof DefaultChat> = getModelForClass(DefaultChat);\nexport * from './default-chat.model';\n\nexport const TermsAndConditionsModel: ReturnModelType<typeof TermsAndConditions> =\n\tgetModelForClass(TermsAndConditions);\nexport * from './terms-and-conditions.model';\n\nexport const SupportReasonModel: ReturnModelType<typeof SupportReason> = getModelForClass(SupportReason);\nexport * from './support-reason.model';\n\nexport const CancellationReasonModel: ReturnModelType<typeof CancellationReason> =\n\tgetModelForClass(CancellationReason);\nexport * from './cancellation-reason.model';\n\nexport * from './embedded/trip-leg.mode';\nexport * from './embedded/rider-assignment-model';\n\nexport const RewardModel: ReturnModelType<typeof Reward> = getModelForClass(Reward);\nexport * from './reward.model';\n\nexport const TicketModel: ReturnModelType<typeof Ticket> = getModelForClass(Ticket);\nexport * from './ticket.model';\n\nexport const MessageModel: ReturnModelType<typeof Message> = getModelForClass(Message);\nexport * from './message.model';\n\nexport const AgentPerformanceModel: ReturnModelType<typeof AgentPerformance> =\n\tgetModelForClass(AgentPerformance);\nexport * from './agent-performance.model';\n\nexport const ChatroomModel: ReturnModelType<typeof Chatroom> = getModelForClass(Chatroom);\nexport * from './chat-room.model';\n\nexport * from './embedded/chat-participant.model';\n\nexport const ServiceModel: ReturnModelType<typeof Service> = getModelForClass(Service);\nexport * from './service.model';\n\nexport const VendorParentModel: ReturnModelType<typeof VendorParent> = getModelForClass(VendorParent);\nexport * from './vendor-parent.model';\n\nexport const VendorModel: ReturnModelType<typeof Vendor> = getModelForClass(Vendor);\nexport * from './vendor.model';\n\nexport const VendorAccessControlModel: ReturnModelType<typeof VendorAccessControl> =\n\tgetModelForClass(VendorAccessControl);\nexport * from './vendor-access-control.model';\n\nexport const ServiceCategoryModel: ReturnModelType<typeof ServiceCategory> =\n\tgetModelForClass(ServiceCategory);\nexport * from './service-category.model';\n\nexport const AddOnModel: ReturnModelType<typeof AddOn> = getModelForClass(AddOn);\nexport * from './addon.model';\n\nexport const ServicePackageModel: ReturnModelType<typeof ServicePackage> = getModelForClass(ServicePackage);\nexport * from './service-package.model';\n\nexport const ProfessionalModel: ReturnModelType<typeof Professional> = getModelForClass(Professional);\nexport * from './professional.model';\n\nexport const ServiceCartModel: ReturnModelType<typeof ServiceCart> = getModelForClass(ServiceCart);\nexport * from './service-cart.model';\n\nexport const ServiceLineItemModel: ReturnModelType<typeof ServiceLineItem> =\n\tgetModelForClass(ServiceLineItem);\nexport * from './service-line-item.model';\n\nexport const ServiceOrderModel: ReturnModelType<typeof ServiceOrder> = getModelForClass(ServiceOrder);\nexport * from './service-order.model';\n\nexport const ProfessionalScheduleModel: ReturnModelType<typeof ProfessionalSchedule> =\n\tgetModelForClass(ProfessionalSchedule);\nexport * from './professional-schedule';\n\nexport const BlockedTimeModel: ReturnModelType<typeof BlockedTime> = getModelForClass(BlockedTime);\nexport * from './blocked-time.model';\n\nexport const TicketActionModel: ReturnModelType<typeof TicketAction> = getModelForClass(TicketAction);\nexport * from './ticket-action.model';\n\nexport const ServicePromotionModel: ReturnModelType<typeof ServicePromotion> =\n\tgetModelForClass(ServicePromotion);\nexport * from './service-promotion.model';\n\nexport const ZoneExtraTimeModel: ReturnModelType<typeof ZoneExtraTime> = getModelForClass(ZoneExtraTime);\nexport * from './zone-extra-time';\n\nexport * from './google-maps-usage.model';"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA0KA,oCAGC;AAED,gDAIC;AAED,4DAIC;AAED,sEAIC;AAED,sEAIC;AAED,wEAIC;AAED,sEAIC;AAED,4CAIC;AAED,oCAGC;AAGD,wDA2CC;AA1QD,uEAA4D;AAC5D,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,qFAAyE;AACzE,uDAA8C;AAC9C,iDAAwC;AACxC,gEAAsD;AACtD,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6CAAoC;AACpC,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,6CAAoC;AACpC,6EAAmE;AACnE,6DAAoD;AACpD,2CAAkC;AAClC,6CAAoC;AACpC,qFAA0E;AAC1E,kDASiC;AACjC,+CAAsC;AACtC,yEAA+D;AAC/D,mFAAyE;AACzE,mFAAyE;AACzE,6FAAkF;AAClF,yEAA+D;AAC/D,6FAAkF;AAClF,2FAAgF;AAChF,6EAAmE;AACnE,uFAA4E;AAC5E,2FAAgF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C,CAAC;AAC5G,0DAAwC;AAE3B,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,iCAAY,CAAC,CAAC;AACtG,uDAAqC;AAExB,QAAA,gBAAgB,GAAwC,IAAA,4BAAgB,EAAC,gCAAW,CAAC,CAAC;AACnG,uDAAqC;AAExB,QAAA,oBAAoB,GAChC,IAAA,4BAAgB,EAAC,yCAAe,CAAC,CAAC;AACnC,4DAA0C;AAE7B,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,kCAAY,CAAC,CAAC;AACtG,wDAAsC;AAEzB,QAAA,yBAAyB,GACrC,IAAA,4BAAgB,EAAC,4CAAoB,CAAC,CAAC;AACxC,0DAAwC;AAE3B,QAAA,gBAAgB,GAAwC,IAAA,4BAAgB,EAAC,gCAAW,CAAC,CAAC;AACnG,uDAAqC;AAExB,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,kCAAY,CAAC,CAAC;AACtG,wDAAsC;AAEzB,QAAA,qBAAqB,GACjC,IAAA,4BAAgB,EAAC,0CAAgB,CAAC,CAAC;AACpC,4DAA0C;AAI7B,QAAA,kBAAkB,GAA0C,IAAA,4BAAgB,EAAC,+BAAa,CAAC,CAAC;AACzG,oDAAkC;AAElC,4DAA0C","sourcesContent":["import { ServiceLineItem } from './service-line-item.model';\nimport { RiderPayout } from './providers/rider-payout.model';\nimport { ShopPayout } from './providers/shop-payout.model';\nimport { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\nimport { Admin } from './admin.model';\nimport { AdminAccessControl } from './admin-access-control.model';\nimport { ActivityLog } from './activity-log.model';\nimport { UserAppSectionSetting } from './user-app-section-setting.model';\nimport { Attribute } from './attribute.model';\nimport { Banner } from './banner.model';\nimport { BaseCoupon } from './base/base-coupon.model';\nimport { BOBFinance } from './bob-finance.model';\nimport { Brand } from './brand.model';\nimport { Category } from './category.model';\nimport { Counter } from './counter.model';\nimport { Coupon } from './coupon.model';\nimport { DealSetting } from './deal-setting.model';\nimport { Dish } from './dish.model';\nimport { Favourite } from './favourite.model';\nimport { FeaturedSetting } from './featured-setting.model';\nimport { FilterContainer } from './filter-container.model';\nimport { ListContainer } from './list-container.model';\nimport { Marketing } from './marketing.model';\nimport { MealPlan } from './meal-plan.model';\nimport { Nutrition } from './nutrition.model';\nimport { Parent } from './parent.model';\nimport { ProductMarketing } from './product-marketing.model';\nimport { Product } from './product.model';\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\nimport { RatingSetting } from './rating-setting.model';\nimport { ReferralSetting } from './referral-setting.model';\nimport { RequestArea } from './request-area.model';\nimport { Role } from './role.model';\nimport { Setting } from './setting.model';\nimport { ShopAccessControl } from './shop-access-control.model';\nimport { ShopCategory } from './shop-category.model';\nimport { ShopMealPlan } from './shop-meal-plan.model';\nimport { Shop } from './shop.model';\nimport { SubscriptionSetting } from './subscription-setting.model';\nimport { Subscription } from './subscription.model';\nimport { Tag } from './tag.model';\nimport { Zone } from './zone.model';\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\nimport {\n\tCardType,\n\tCoreAuthIdentityType,\n\tCounterType,\n\tCouponType,\n\tMarketingType,\n\tOrderType,\n\tPayoutType,\n\tReviewType,\n} from '../../../utilities/enum';\nimport { AddOn } from './addon.model';\nimport { CustomCoupon } from './providers/custom-coupon.model';\nimport { DiscountMarketing } from './providers/discount-marketing.model';\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\nimport { GlobalCoupon } from './providers/global-coupon.model';\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\nimport { PunchMarketing } from './providers/punch-marketing.model';\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\nimport { Notification } from './notification.model';\nimport { CoreAuthIdentity } from './core-auth-identity.model';\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\nimport { CoreUser } from './core-user.model';\nimport { Card } from './card.model';\nimport { AreebaCard } from './providers/areeba-card.model';\nimport { RiderTracking } from './rider-tracking.model';\nimport { Rider } from './rider.model';\nimport { RiderTimeout } from './rider-timeout.model';\nimport { User } from './user.model';\nimport { Cart } from './cart.model';\nimport { LineItem } from './line-item.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { Gallery } from './gallery.model';\nimport { Order } from './order.model';\nimport { RegularOrder } from './providers/regular-order.model';\nimport { CourierOrder } from './providers/courier-order.model';\nimport { FinanceSettlement } from './finance-settlement.model';\nimport { DefaultChat } from './default-chat.model';\nimport { TermsAndConditions } from './terms-and-conditions.model';\nimport { SupportReason } from './support-reason.model';\nimport { CancellationReason } from './cancellation-reason.model';\nimport { Payout } from './payout.model';\nimport { Reward } from './reward.model';\nimport { Ticket } from './ticket.model';\nimport { Message } from './message.model';\nimport { AgentPerformance } from './agent-performance.model';\nimport { Chatroom } from './chat-room.model';\nimport { initializeRefreshTokenModel } from '../../auth';\nimport { VendorParent } from './vendor-parent.model';\nimport { Vendor } from './vendor.model';\nimport { VendorAccessControl } from './vendor-access-control.model';\nimport { ServiceCategory } from './service-category.model';\nimport { ServicePackage } from './service-package.model';\nimport { Professional } from './professional.model';\nimport { ServiceOrder } from './service-order.model';\nimport { ProfessionalSchedule } from './professional-schedule';\nimport { Service } from './service.model';\nimport { TicketAction } from './ticket-action.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ShopCourierOrder } from './providers/shop-courier.model';\nimport { ServicePromotion } from './service-promotion.model';\nimport { Flag } from './flag.model';\nimport { Review } from './review.model';\nimport { ShopReview } from './providers/shop-review.model';\nimport { RiderReview } from './providers/rider-review.model';\nimport { ServiceOrderReview } from './providers/service-order-review.model';\nimport { assignIdsToDocuments } from '../../../utilities/id-generator';\nimport { GalleryUpload } from './gallery-upload.model';\nimport { ProductUpload } from './product-upload.model';\nimport { ShopsCategoriesCoupon } from './providers/shops-categories-coupon.model';\nimport { BlockedTime } from './blocked-time.model';\nimport { ZoneExtraTime } from './zone-extra-time';\nimport { AppAppearance } from './app-appearance.model';\nimport { ServiceControl } from './service-control.model';\n\n// Regular models (using standard getModelForClass)\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\nexport * from './activity-log.model';\n\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\n\tgetModelForClass(AdminAccessControl);\nexport * from './admin-access-control.model';\n\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\nexport * from './admin.model';\n\nexport const UserAppSectionSettingModel: ReturnModelType<typeof UserAppSectionSetting> =\n\tgetModelForClass(UserAppSectionSetting);\nexport * from './user-app-section-setting.model';\n\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\nexport * from './attribute.model';\n\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\nexport * from './banner.model';\n\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\nexport * from './bob-finance.model';\n\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\nexport * from './brand.model';\n\nexport const AppAppearanceModel: ReturnModelType<typeof AppAppearance> = getModelForClass(AppAppearance);\nexport * from './app-appearance.model';\n\nexport const ServiceControlModel: ReturnModelType<typeof ServiceControl> = getModelForClass(ServiceControl);\nexport * from './service-control.model';\n\n// Global models - will be set after initGlobalConnection()\nlet actualCardModel: ReturnModelType<typeof Card> | null = null;\nlet actualCoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> | null = null;\nlet actualCoreUserModel: ReturnModelType<typeof CoreUser> | null = null;\nlet actualRoleModel: ReturnModelType<typeof Role> | null = null;\n\n// Global discriminator models - will be set after initGlobalConnection()\nlet actualAreebaCardModel: ReturnModelType<typeof AreebaCard> | null = null;\nlet actualCoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> | null = null;\nlet actualCorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> | null = null;\nlet actualCoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> | null = null;\nlet actualCoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> | null = null;\n\n// Export getter functions for global models\nexport function getCardModel(): ReturnModelType<typeof Card> {\n\tif (!actualCardModel) throw new Error('Card model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCardModel;\n}\n\nexport function getAreebaCardModel(): ReturnModelType<typeof AreebaCard> {\n\tif (!actualAreebaCardModel)\n\t\tthrow new Error('AreebaCard model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualAreebaCardModel;\n}\n\nexport function getCoreAuthIdentityModel(): ReturnModelType<typeof CoreAuthIdentity> {\n\tif (!actualCoreAuthIdentityModel)\n\t\tthrow new Error('CoreAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAuthIdentityModel;\n}\n\nexport function getCoreEmailAuthIdentityModel(): ReturnModelType<typeof CoreEmailAuthIdentity> {\n\tif (!actualCoreEmailAuthIdentityModel)\n\t\tthrow new Error('CoreEmailAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreEmailAuthIdentityModel;\n}\n\nexport function getCorePhoneAuthIdentityModel(): ReturnModelType<typeof CorePhoneAuthIdentity> {\n\tif (!actualCorePhoneAuthIdentityModel)\n\t\tthrow new Error('CorePhoneAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCorePhoneAuthIdentityModel;\n}\n\nexport function getCoreGoogleAuthIdentityModel(): ReturnModelType<typeof CoreGoogleAuthIdentity> {\n\tif (!actualCoreGoogleAuthIdentityModel)\n\t\tthrow new Error('CoreGoogleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreGoogleAuthIdentityModel;\n}\n\nexport function getCoreAppleAuthIdentityModel(): ReturnModelType<typeof CoreAppleAuthIdentity> {\n\tif (!actualCoreAppleAuthIdentityModel)\n\t\tthrow new Error('CoreAppleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAppleAuthIdentityModel;\n}\n\nexport function getCoreUserModel(): ReturnModelType<typeof CoreUser> {\n\tif (!actualCoreUserModel)\n\t\tthrow new Error('CoreUser model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreUserModel;\n}\n\nexport function getRoleModel(): ReturnModelType<typeof Role> {\n\tif (!actualRoleModel) throw new Error('Role model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualRoleModel;\n}\n\n// Function to initialize all global models (called from initGlobalConnection)\nexport function initializeGlobalModels(globalConnection: any) {\n\t// Initialize base global models\n\tactualCardModel = getModelForClass(Card, { existingConnection: globalConnection });\n\tactualCoreAuthIdentityModel = getModelForClass(CoreAuthIdentity, { existingConnection: globalConnection });\n\tactualCoreUserModel = getModelForClass(CoreUser, { existingConnection: globalConnection });\n\tactualRoleModel = getModelForClass(Role, { existingConnection: globalConnection });\n\n\t// Initialize discriminator models\n\tactualAreebaCardModel = getDiscriminatorModelForClass(actualCardModel, AreebaCard, CardType.AREEEBA, {\n\t\texistingConnection: globalConnection,\n\t});\n\n\tactualCoreEmailAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreEmailAuthIdentity,\n\t\tCoreAuthIdentityType.EMAIL,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCorePhoneAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCorePhoneAuthIdentity,\n\t\tCoreAuthIdentityType.PHONE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreGoogleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreGoogleAuthIdentity,\n\t\tCoreAuthIdentityType.GOOGLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreAppleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreAppleAuthIdentity,\n\t\tCoreAuthIdentityType.APPLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tinitializeRefreshTokenModel(globalConnection);\n\n\tconsole.log('✅ All global models initialized');\n}\n\nexport * from './card.model';\nexport * from './providers/areeba-card.model';\n\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\nexport * from './cart.model';\n\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\n\tgetModelForClass(CartParticipant);\nexport * from './cart-participant.model';\n\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\nexport * from './category.model';\n\nexport * from './core-auth-identity.model';\nexport * from './providers/core-apple-auth-identity.model';\nexport * from './providers/core-email-auth-identity.model';\nexport * from './providers/core-google-auth-identity.model';\nexport * from './providers/core-phone-auth-identity.model';\nexport * from './core-user.model';\nexport * from './role.model';\n\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\nexport * from './counter.model';\n\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\nexport const BaseCouponModel: ReturnModelType<typeof BaseCoupon> = getModelForClass(BaseCoupon);\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\n\tCouponModel,\n\tCustomCoupon,\n\tCouponType.CUSTOM_COUPON\n);\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\n\tCouponModel,\n\tGlobalCoupon,\n\tCouponType.GLOBAL\n);\nexport const ShopsCategoriesCouponModel: ReturnModelType<typeof ShopsCategoriesCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ShopsCategoriesCoupon, CouponType.SHOPS_CATEGORIES);\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\nexport * from './coupon.model';\nexport * from './base/base-coupon.model';\nexport * from './providers/custom-coupon.model';\nexport * from './providers/global-coupon.model';\nexport * from './providers/shops-categories-coupon.model';\nexport * from './providers/individual-store-coupon.model';\nexport * from './providers/individual-user-coupon.model';\nexport * from './providers/referral-code-coupon.model';\nexport * from './providers/referral-reward-coupon.model';\n\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\nexport * from './deal-setting.model';\n\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\nexport * from './dish.model';\n\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\nexport * from './favourite.model';\n\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\n\tgetModelForClass(FeaturedSetting);\nexport * from './featured-setting.model';\n\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\n\tgetModelForClass(FilterContainer);\nexport * from './filter-container.model';\n\nexport const FinanceSettlementModel: ReturnModelType<typeof FinanceSettlement> =\n\tgetModelForClass(FinanceSettlement);\nexport * from './finance-settlement.model';\n\nexport const FlagModel: ReturnModelType<typeof Flag> = getModelForClass(Flag);\nexport * from './flag.model';\n\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\nexport * from './gallery.model';\n\nexport const GalleryUploadModel: ReturnModelType<typeof GalleryUpload> = getModelForClass(GalleryUpload);\nexport * from './gallery-upload.model';\n\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\nexport * from './line-item.model';\n\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\nexport * from './list-container.model';\n\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\n\tMarketingModel,\n\tPunchMarketing,\n\tMarketingType.PUNCH_MARKETING\n);\nexport * from './marketing.model';\nexport * from './providers/buy1-get1-marketing.model';\nexport * from './providers/discount-marketing.model';\nexport * from './providers/featured-marketing.model';\nexport * from './providers/free-delivery-marketing.model';\nexport * from './providers/punch-marketing.model';\n\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\nexport * from './meal-plan.model';\n\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\nexport * from './notification.model';\n\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\nexport * from './nutrition.model';\n\nexport const OrderModel: ReturnModelType<typeof Order> = getModelForClass(Order);\nexport const RegularOrderModel: ReturnModelType<typeof RegularOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tRegularOrder,\n\tOrderType.REGULAR\n);\nexport const CourierOrderModel: ReturnModelType<typeof CourierOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tCourierOrder,\n\tOrderType.COURIER\n);\n\nexport const ShopCourierOrderModel: ReturnModelType<typeof ShopCourierOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tShopCourierOrder,\n\tOrderType.SHOP_COURIER\n);\n\nexport * from './order.model';\nexport * from './providers/regular-order.model';\nexport * from './providers/courier-order.model';\nexport * from './providers/shop-courier.model';\n\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\nexport * from './parent.model';\n\nexport const PayoutModel: ReturnModelType<typeof Payout> = getModelForClass(Payout);\nexport const ShopPayoutModel: ReturnModelType<typeof ShopPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tShopPayout,\n\tPayoutType.SHOP\n);\nexport const RiderPayoutModel: ReturnModelType<typeof RiderPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tRiderPayout,\n\tPayoutType.RIDER\n);\nexport * from './payout.model';\nexport * from './providers/shop-payout.model';\nexport * from './providers/rider-payout.model';\n\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\n\tgetModelForClass(ProductMarketing);\nexport * from './product-marketing.model';\n\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\nexport * from './product.model';\nProductModel.schema.pre('insertMany', async function (next, docs: Product[]) {\n\t// Generate all IDs at once (ATOMIC)\n\tawait assignIdsToDocuments(CounterModel, CounterType.ITEM, docs, 'productId');\n\tnext();\n});\n\nexport const ProductUploadModel: ReturnModelType<typeof ProductUpload> = getModelForClass(ProductUpload);\nexport * from './product-upload.model';\n\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\n\tgetModelForClass(PunchMarketingHistory);\nexport * from './punch-marketing-history.model';\n\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\nexport * from './rating-setting.model';\n\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\n\tgetModelForClass(ReferralSetting);\nexport * from './referral-setting.model';\n\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\nexport * from './request-area.model';\n\nexport const ReviewModel: ReturnModelType<typeof Review> = getModelForClass(Review);\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tShopReview,\n\tReviewType.SHOP\n);\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tRiderReview,\n\tReviewType.RIDER\n);\nexport const ServiceOrderReviewModel: ReturnModelType<typeof ServiceOrderReview> =\n\tgetDiscriminatorModelForClass(ReviewModel, ServiceOrderReview, ReviewType.SERVICE_ORDER);\nexport * from './review.model';\nexport * from './providers/shop-review.model';\nexport * from './providers/rider-review.model';\nexport * from './providers/service-order-review.model';\n\nexport const RiderTimeoutModel: ReturnModelType<typeof RiderTimeout> = getModelForClass(RiderTimeout);\nexport * from './rider-timeout.model';\n\nexport const RiderTrackingModel: ReturnModelType<typeof RiderTracking> = getModelForClass(RiderTracking);\nexport * from './rider-tracking.model';\n\nexport const RiderModel: ReturnModelType<typeof Rider> = getModelForClass(Rider);\nexport * from './rider.model';\n\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\nexport * from './setting.model';\n\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\n\tgetModelForClass(ShopAccessControl);\nexport * from './shop-access-control.model';\n\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\nexport * from './shop-category.model';\n\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\nexport * from './shop-meal-plan.model';\n\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\nexport * from './shop.model';\n\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\n\tgetModelForClass(SubscriptionSetting);\nexport * from './subscription-setting.model';\n\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\nexport * from './subscription.model';\n\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\nexport * from './tag.model';\n\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\nexport * from './user.model';\n\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\nexport * from './zone.model';\n\nexport const DefaultChatModel: ReturnModelType<typeof DefaultChat> = getModelForClass(DefaultChat);\nexport * from './default-chat.model';\n\nexport const TermsAndConditionsModel: ReturnModelType<typeof TermsAndConditions> =\n\tgetModelForClass(TermsAndConditions);\nexport * from './terms-and-conditions.model';\n\nexport const SupportReasonModel: ReturnModelType<typeof SupportReason> = getModelForClass(SupportReason);\nexport * from './support-reason.model';\n\nexport const CancellationReasonModel: ReturnModelType<typeof CancellationReason> =\n\tgetModelForClass(CancellationReason);\nexport * from './cancellation-reason.model';\n\nexport * from './embedded/trip-leg.mode';\nexport * from './embedded/rider-assignment-model';\n\nexport const RewardModel: ReturnModelType<typeof Reward> = getModelForClass(Reward);\nexport * from './reward.model';\n\nexport const TicketModel: ReturnModelType<typeof Ticket> = getModelForClass(Ticket);\nexport * from './ticket.model';\n\nexport const MessageModel: ReturnModelType<typeof Message> = getModelForClass(Message);\nexport * from './message.model';\n\nexport const AgentPerformanceModel: ReturnModelType<typeof AgentPerformance> =\n\tgetModelForClass(AgentPerformance);\nexport * from './agent-performance.model';\n\nexport const ChatroomModel: ReturnModelType<typeof Chatroom> = getModelForClass(Chatroom);\nexport * from './chat-room.model';\n\nexport * from './embedded/chat-participant.model';\n\nexport const ServiceModel: ReturnModelType<typeof Service> = getModelForClass(Service);\nexport * from './service.model';\n\nexport const VendorParentModel: ReturnModelType<typeof VendorParent> = getModelForClass(VendorParent);\nexport * from './vendor-parent.model';\n\nexport const VendorModel: ReturnModelType<typeof Vendor> = getModelForClass(Vendor);\nexport * from './vendor.model';\n\nexport const VendorAccessControlModel: ReturnModelType<typeof VendorAccessControl> =\n\tgetModelForClass(VendorAccessControl);\nexport * from './vendor-access-control.model';\n\nexport const ServiceCategoryModel: ReturnModelType<typeof ServiceCategory> =\n\tgetModelForClass(ServiceCategory);\nexport * from './service-category.model';\n\nexport const AddOnModel: ReturnModelType<typeof AddOn> = getModelForClass(AddOn);\nexport * from './addon.model';\n\nexport const ServicePackageModel: ReturnModelType<typeof ServicePackage> = getModelForClass(ServicePackage);\nexport * from './service-package.model';\n\nexport const ProfessionalModel: ReturnModelType<typeof Professional> = getModelForClass(Professional);\nexport * from './professional.model';\n\nexport const ServiceCartModel: ReturnModelType<typeof ServiceCart> = getModelForClass(ServiceCart);\nexport * from './service-cart.model';\n\nexport const ServiceLineItemModel: ReturnModelType<typeof ServiceLineItem> =\n\tgetModelForClass(ServiceLineItem);\nexport * from './service-line-item.model';\n\nexport const ServiceOrderModel: ReturnModelType<typeof ServiceOrder> = getModelForClass(ServiceOrder);\nexport * from './service-order.model';\n\nexport const ProfessionalScheduleModel: ReturnModelType<typeof ProfessionalSchedule> =\n\tgetModelForClass(ProfessionalSchedule);\nexport * from './professional-schedule';\n\nexport const BlockedTimeModel: ReturnModelType<typeof BlockedTime> = getModelForClass(BlockedTime);\nexport * from './blocked-time.model';\n\nexport const TicketActionModel: ReturnModelType<typeof TicketAction> = getModelForClass(TicketAction);\nexport * from './ticket-action.model';\n\nexport const ServicePromotionModel: ReturnModelType<typeof ServicePromotion> =\n\tgetModelForClass(ServicePromotion);\nexport * from './service-promotion.model';\n\n\n\nexport const ZoneExtraTimeModel: ReturnModelType<typeof ZoneExtraTime> = getModelForClass(ZoneExtraTime);\nexport * from './zone-extra-time';\n\nexport * from './google-maps-usage.model';"]}
|
|
@@ -37,6 +37,7 @@ let ServiceOrder = class ServiceOrder {
|
|
|
37
37
|
userNotes;
|
|
38
38
|
vendorNotes;
|
|
39
39
|
professionals;
|
|
40
|
+
responsibleProfessional;
|
|
40
41
|
serviceTimer;
|
|
41
42
|
flag;
|
|
42
43
|
confirmedAt;
|
|
@@ -104,6 +105,10 @@ __decorate([
|
|
|
104
105
|
(0, typegoose_1.prop)({ ref: () => professional_model_1.Professional, type: () => [mongoose_1.Types.ObjectId] }),
|
|
105
106
|
__metadata("design:type", Array)
|
|
106
107
|
], ServiceOrder.prototype, "professionals", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typegoose_1.prop)({ ref: () => professional_model_1.Professional }),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], ServiceOrder.prototype, "responsibleProfessional", void 0);
|
|
107
112
|
__decorate([
|
|
108
113
|
(0, typegoose_1.prop)({ type: () => service_timer_model_1.ServiceTimer }),
|
|
109
114
|
__metadata("design:type", service_timer_model_1.ServiceTimer)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,6CAAoC;AACpC,iDAAwC;AAExC,kDAAiI;AACjI,6DAAoD;AACpD,wEAA8D;AAC9D,kFAAuE;AACvE,6DAAmD;AACnD,oFAA0E;AAC1E,wFAA6E;AAC7E,oFAA0E;AAC1E,4EAA8E;AAC9E,mDAA0C;AAE1C,uCAAiC;AAO1B,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEd,OAAO,CAAS;IAGhB,OAAO,CAAe;IAGtB,IAAI,CAAY;IAGhB,MAAM,CAAc;IAGpB,IAAI,CAAmB;IAG9B,MAAM,CAAqB;IAGpB,QAAQ,CAAuB;IAG/B,QAAQ,CAAQ;IAGhB,MAAM,CAAQ;IAGd,SAAS,CAAU;IAGnB,WAAW,CAAU;IAGrB,aAAa,CAA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I,EAAE,oBAAa,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACP;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8CAAkB,EAAE,CAAC;8BACb,8CAAkB;wDAAC;AAGxC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8CAAkB,EAAE,CAAC;8BACpB,8CAAkB;iDAAC;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,kDAA0B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;oDACZ;AAG7C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACS;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACG;uBAzFjB,YAAY;IALxB,IAAA,wBAAY,EAAC;QACV,aAAa,EAAE;YACX,UAAU,EAAE,cAAc;SAC7B;KACJ,CAAC;GACW,YAAY,CA0FxB","sourcesContent":["import { modelOptions, prop, Ref } from \"@typegoose/typegoose\";\nimport { User } from \"./user.model\";\nimport { Vendor } from \"./vendor.model\";\nimport { ServicePackage } from \"./service-package.model\";\nimport { ServiceOrderRecurrencePattern, PaymentMethod, ServiceOrderPriority, ServiceOrderStatus } from \"../../../utilities/enum\";\nimport { Professional } from \"./professional.model\";\nimport { ServiceTimer } from \"./embedded/service-timer.model\";\nimport { ServiceOrderFlag } from \"./embedded/service-order-flag.model\";\nimport { ServiceCart } from \"./service-cart.model\";\nimport { PaymentInformation } from \"./embedded/payment-infromation.model\";\nimport { ServiceOrderFinance } from \"./embedded/service-order-finance.model\";\nimport { ServiceOrderCancel } from \"./embedded/service-order-cance.model\";\nimport { ServiceOrderStatusTimeline } from \"./embedded/status-timeline.model\";\nimport { Service } from \"./service.model\";\nimport { StartEndTime } from \"./shared/work-hour.model\";\nimport { Types } from \"mongoose\";\n\n@modelOptions({\n schemaOptions: {\n collection: \"serviceOrder\"\n }\n})\nexport class ServiceOrder {\n @prop({ type: String, required: true, unique: true })\n public orderId!: string\n\n @prop({ ref: () => Service, required: true })\n public service!: Ref<Service>\n\n @prop({ ref: () => User, required: true })\n public user!: Ref<User>\n\n @prop({ ref: () => Vendor, required: true })\n public vendor!: Ref<Vendor>\n\n @prop({ ref: () => ServiceCart, required: true })\n public cart!: Ref<ServiceCart>\n\n @prop({ enum: ServiceOrderStatus, default: ServiceOrderStatus.PENDING })\n status!: ServiceOrderStatus\n\n @prop({ enum: ServiceOrderPriority, default: ServiceOrderPriority.NORMAL })\n public priority!: ServiceOrderPriority\n\n @prop({ required: true })\n public timeFrom!: Date;\n\n @prop({ required: true })\n public timeTo!: Date;\n\n @prop({ type: String })\n public userNotes?: string;\n\n @prop({ type: String })\n public vendorNotes?: string;\n\n @prop({ ref: () => Professional, type: () => [Types.ObjectId] })\n public professionals!: Ref<Professional>[];\n\n @prop({ref: ()=> Professional})\n public responsibleProfessional?: Ref<Professional>;\n\n @prop({ type: () => ServiceTimer })\n public serviceTimer?: ServiceTimer\n\n @prop({ type: () => ServiceOrderFlag })\n public flag?: ServiceOrderFlag\n\n @prop()\n public confirmedAt?: Date;\n\n @prop()\n public autoConfirmedAt?: Date;\n\n @prop({ default: false })\n public isUrgent!: boolean;\n\n @prop()\n public urgentAt?: Date;\n\n @prop({ default: false })\n public isOverdue!: boolean;\n\n @prop()\n public overdueAt?: Date;\n\n @prop({ required: true, type: ServiceOrderFinance })\n public finance: ServiceOrderFinance\n\n @prop({ enum: ServiceOrderRecurrencePattern, default: ServiceOrderRecurrencePattern.ONETIME })\n public recurrencePattern?: ServiceOrderRecurrencePattern\n\n @prop({ default: false })\n public isPaid!: boolean;\n\n @prop({ enum: PaymentMethod, type: String })\n public paymentMethod?: PaymentMethod;\n\n @prop({ type: () => PaymentInformation })\n public paymentInformation?: PaymentInformation;\n\n @prop({ type: () => ServiceOrderCancel })\n public orderCancel?: ServiceOrderCancel;\n\n @prop({ type: () => [ServiceOrderStatusTimeline], default: [] })\n public statusTimeline: ServiceOrderStatusTimeline[];\n\n @prop({ type: Number })\n public serviceDuration!: number; // minutes\n\n @prop({ type: Number })\n public bufferTime: number; // minutes\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-package.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-package.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,kDAAiD;AACjD,iDAAwC;AACxC,qEAA2D;AAC3D,mDAA0C;AAC1C,mCAAqD;AA8B9C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEnC,IAAI,CAAU;IAGd,MAAM,CAAe;IAGrB,OAAO,CAAc;IAGrB,QAAQ,CAAwB;IAGhC,KAAK,CAAU;IAOf,KAAK,CAAU;IAQf,OAAO,CAAU;IAGjB,qBAAqB,CAAU;IAG/B,WAAW,CAAU;IAGrB,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,MAAM,CAAgB;IAGtB,MAAM,CAAS;IAGf,gBAAgB,CAAW;IAG3B,aAAa,CAAU;IAGvB,YAAY,CAAU;IAGtB,SAAS,CAAS;CAC5B,CAAA;AA5DY,wCAAc;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;4CAC7C;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,CAAC;;8CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAO,EAAE,CAAC;;+CACjB;AAGrB;IADN,IAAA,gBAAI,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AAE,CAAC;IACX,CAAC,CAAC;GACW,cAAc,CA4D1B","sourcesContent":["import { Index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status } from '../../../utilities/enum';\nimport { Vendor } from './vendor.model';\nimport { ServiceCategory } from './service-category.model';\nimport { Service } from \"./service.model\";\nimport { AddOn, ServicePackageModel } from './index';\n\n\n@modelOptions({ schemaOptions: { collection: 'servicePackages', timestamps: true } })\n@Index(\n { name: 1, vendor: 1 },\n { unique: true, partialFilterExpression: { deletedAt: null } }\n)\n@pre<ServicePackage>('save', async function (next) {\n // Only set sortingOrder if it's a new document or sortingOrder is not set\n if (this.isNew || typeof this.sortingOrder === 'undefined') {\n try {\n // Find the maximum sortingOrder for shops with the same itemType that aren't deleted\n const maxSortingOrder = await ServicePackageModel.aggregate<{ maxSortingOrder: number }>([\n {\n $group: {\n _id: null,\n maxSortingOrder: { $max: '$sortingOrder' },\n },\n },\n ]).exec();\n\n // Set the new sortingOrder to max + 1 (or 0 if no items found)\n this.sortingOrder = (maxSortingOrder[0]?.maxSortingOrder ?? -1) + 1;\n } catch (error) {\n return next(error as Error);\n }\n }\n next();\n})\nexport class ServicePackage extends TimeStamps {\n @prop({ required: true, type: String, trim: true, maxlength: 20 })\n public name!: string;\n\n @prop({ required: true, ref: () => Vendor })\n public vendor!: Ref<Vendor
|
|
1
|
+
{"version":3,"file":"service-package.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-package.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,kDAAiD;AACjD,iDAAwC;AACxC,qEAA2D;AAC3D,mDAA0C;AAC1C,mCAAqD;AA8B9C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEnC,IAAI,CAAU;IAGd,MAAM,CAAe;IAGrB,OAAO,CAAc;IAGrB,QAAQ,CAAwB;IAGhC,KAAK,CAAU;IAOf,K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AI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CACjE;IACA,IAAA,eAAG,EAAiB,MAAM,EAAE,KAAK,WAAW,IAAI;QAE7C,IAAI,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,WAAW,EAAE,CAAC;YACzD,IAAI,CAAC;gBAED,MAAM,eAAe,GAAG,MAAM,2BAAmB,CAAC,SAAS,CAA8B;oBACrF;wBACI,MAAM,EAAE;4BACJ,GAAG,EAAE,IAAI;4BACT,eAAe,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;yBAC7C;qBACJ;iBACJ,CAAC,CAAC,IAAI,EAAE,CAAC;gBAGV,IAAI,CAAC,YAAY,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACxE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,IAAI,CAAC,KAAc,CAAC,CAAC;YAChC,CAAC;QACL,CAAC;QACD,IAAI,EAAE,CAAC;IACX,CAAC,CAAC;GACW,cAAc,CA4D1B","sourcesContent":["import { Index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status } from '../../../utilities/enum';\nimport { Vendor } from './vendor.model';\nimport { ServiceCategory } from './service-category.model';\nimport { Service } from \"./service.model\";\nimport { AddOn, ServicePackageModel } from './index';\n\n\n@modelOptions({ schemaOptions: { collection: 'servicePackages', timestamps: true } })\n@Index(\n { name: 1, vendor: 1 },\n { unique: true, partialFilterExpression: { deletedAt: null } }\n)\n@pre<ServicePackage>('save', async function (next) {\n // Only set sortingOrder if it's a new document or sortingOrder is not set\n if (this.isNew || typeof this.sortingOrder === 'undefined') {\n try {\n // Find the maximum sortingOrder for shops with the same itemType that aren't deleted\n const maxSortingOrder = await ServicePackageModel.aggregate<{ maxSortingOrder: number }>([\n {\n $group: {\n _id: null,\n maxSortingOrder: { $max: '$sortingOrder' },\n },\n },\n ]).exec();\n\n // Set the new sortingOrder to max + 1 (or 0 if no items found)\n this.sortingOrder = (maxSortingOrder[0]?.maxSortingOrder ?? -1) + 1;\n } catch (error) {\n return next(error as Error);\n }\n }\n next();\n}) \nexport class ServicePackage extends TimeStamps {\n @prop({ required: true, type: String, trim: true, maxlength: 20 })\n public name!: string;\n\n @prop({ required: true, ref: () => Vendor })\n public vendor!: Ref<Vendor>; \n\n @prop({ required: true, ref: () => Service })\n public service: Ref<Service>\n\n @prop({ required: true, ref: () => ServiceCategory })\n public category!: Ref<ServiceCategory>;\n\n @prop({ required: true, type: Number, min: 0 })\n public price!: number;\n\n @prop({\n required: true,\n type: Number,\n min: 0,\n })\n public hours!: number;\n\n @prop({\n required: true,\n type: Number,\n min: 0,\n max: 59,\n })\n public minutes!: number;\n\n @prop({ required: true, type: Number, min: 1 })\n public numberOfProfessionals?: number; // no need for furniture cleaning\n\n @prop({ type: String, trim: true })\n public description?: string;\n\n @prop({ type: String })\n public image!: string;\n\n @prop({ type: String, maxlength: 250 })\n public vendorNotes?: string;\n\n @prop({ ref: () => AddOn, default: [], type: [String] })\n public addons?: Ref<AddOn>[];\n\n @prop({ type: String, enum: Status, default: Status.ACTIVE })\n public status: Status;\n\n @prop({ type: Boolean, default: false })\n public includeMaterials!: boolean;\n\n @prop({ type: Number, default: 0, min: 0 })\n public materialsCost?: number;\n\n @prop({ type: Number })\n public sortingOrder?: number;\n\n @prop({ type: Boolean, deafult: true })\n public isVisible: boolean\n}\n\n"]}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { Ref } from '@typegoose/typegoose';
|
|
2
2
|
import { Vendor } from './vendor.model';
|
|
3
3
|
import { MarketingStatus, PromotionType, ValueType } from '../../../utilities/enum';
|
|
4
|
-
import {
|
|
4
|
+
import { Duration, SlotRange } from './shared/promotion-duration.model';
|
|
5
5
|
import { ServicePackage } from './service-package.model';
|
|
6
|
-
import { StartEndTime } from './shared/work-hour.model';
|
|
7
6
|
export declare class ServicePromotion {
|
|
8
7
|
vendor: Ref<Vendor>;
|
|
9
8
|
promotionType: PromotionType;
|
|
10
|
-
|
|
11
|
-
duration: PromotionDuration;
|
|
9
|
+
duration: Duration;
|
|
12
10
|
servicePackages?: Ref<ServicePackage>[];
|
|
13
|
-
|
|
11
|
+
isEntireMenu?: boolean;
|
|
12
|
+
slotRange?: SlotRange[];
|
|
14
13
|
spendLimit?: number;
|
|
15
14
|
spendAmount?: number;
|
|
16
15
|
maxDiscountPerOrder?: number;
|
|
@@ -18,4 +17,5 @@ export declare class ServicePromotion {
|
|
|
18
17
|
value?: number;
|
|
19
18
|
deactivationReason?: string;
|
|
20
19
|
description?: string;
|
|
20
|
+
status: MarketingStatus;
|
|
21
21
|
}
|
|
@@ -15,14 +15,13 @@ const vendor_model_1 = require("./vendor.model");
|
|
|
15
15
|
const enum_1 = require("../../../utilities/enum");
|
|
16
16
|
const promotion_duration_model_1 = require("./shared/promotion-duration.model");
|
|
17
17
|
const service_package_model_1 = require("./service-package.model");
|
|
18
|
-
const work_hour_model_1 = require("./shared/work-hour.model");
|
|
19
18
|
let ServicePromotion = class ServicePromotion {
|
|
20
19
|
vendor;
|
|
21
20
|
promotionType;
|
|
22
|
-
status;
|
|
23
21
|
duration;
|
|
24
22
|
servicePackages;
|
|
25
|
-
|
|
23
|
+
isEntireMenu;
|
|
24
|
+
slotRange;
|
|
26
25
|
spendLimit;
|
|
27
26
|
spendAmount;
|
|
28
27
|
maxDiscountPerOrder;
|
|
@@ -30,6 +29,7 @@ let ServicePromotion = class ServicePromotion {
|
|
|
30
29
|
value;
|
|
31
30
|
deactivationReason;
|
|
32
31
|
description;
|
|
32
|
+
status;
|
|
33
33
|
};
|
|
34
34
|
exports.ServicePromotion = ServicePromotion;
|
|
35
35
|
__decorate([
|
|
@@ -41,25 +41,21 @@ __decorate([
|
|
|
41
41
|
__metadata("design:type", String)
|
|
42
42
|
], ServicePromotion.prototype, "promotionType", void 0);
|
|
43
43
|
__decorate([
|
|
44
|
-
(0, typegoose_1.prop)({
|
|
45
|
-
|
|
46
|
-
enum: enum_1.MarketingStatus,
|
|
47
|
-
default: enum_1.MarketingStatus.ACTIVE,
|
|
48
|
-
}),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], ServicePromotion.prototype, "status", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typegoose_1.prop)({ required: true, type: promotion_duration_model_1.PromotionDuration }),
|
|
53
|
-
__metadata("design:type", promotion_duration_model_1.PromotionDuration)
|
|
44
|
+
(0, typegoose_1.prop)({ required: true, type: promotion_duration_model_1.Duration }),
|
|
45
|
+
__metadata("design:type", promotion_duration_model_1.Duration)
|
|
54
46
|
], ServicePromotion.prototype, "duration", void 0);
|
|
55
47
|
__decorate([
|
|
56
48
|
(0, typegoose_1.prop)({ ref: () => service_package_model_1.ServicePackage, required: true }),
|
|
57
49
|
__metadata("design:type", Array)
|
|
58
50
|
], ServicePromotion.prototype, "servicePackages", void 0);
|
|
59
51
|
__decorate([
|
|
60
|
-
(0, typegoose_1.prop)({ type:
|
|
52
|
+
(0, typegoose_1.prop)({ type: Boolean }),
|
|
53
|
+
__metadata("design:type", Boolean)
|
|
54
|
+
], ServicePromotion.prototype, "isEntireMenu", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typegoose_1.prop)({ type: promotion_duration_model_1.SlotRange }),
|
|
61
57
|
__metadata("design:type", Array)
|
|
62
|
-
], ServicePromotion.prototype, "
|
|
58
|
+
], ServicePromotion.prototype, "slotRange", void 0);
|
|
63
59
|
__decorate([
|
|
64
60
|
(0, typegoose_1.prop)({ type: Number, min: 0 }),
|
|
65
61
|
__metadata("design:type", Number)
|
|
@@ -88,6 +84,14 @@ __decorate([
|
|
|
88
84
|
(0, typegoose_1.prop)({ type: String, trim: true, maxlength: 500 }),
|
|
89
85
|
__metadata("design:type", String)
|
|
90
86
|
], ServicePromotion.prototype, "description", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typegoose_1.prop)({
|
|
89
|
+
type: String,
|
|
90
|
+
enum: enum_1.MarketingStatus,
|
|
91
|
+
default: enum_1.MarketingStatus.ACTIVE,
|
|
92
|
+
}),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], ServicePromotion.prototype, "status", void 0);
|
|
91
95
|
exports.ServicePromotion = ServicePromotion = __decorate([
|
|
92
96
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'servicePromotions' } })
|
|
93
97
|
], ServicePromotion);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-promotion.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-promotion.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,iDAAwC;AACxC,kDAAoF;AACpF,
|
|
1
|
+
{"version":3,"file":"service-promotion.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-promotion.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,iDAAwC;AACxC,kDAAoF;AACpF,gFAAwE;AACxE,mEAAyD;AAGlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAElB,MAAM,CAAe;IAGrB,aAAa,CAAiB;IAG9B,QAAQ,CAAW;IAGnB,eAAe,CAAwB;IAGvC,YAAY,CAAW;IAGvB,SAAS,CAAc;IAGvB,UAAU,CAAU;IAGpB,WAAW,CAAU;IAGrB,mBAAmB,CAAU;IAG7B,SAAS,CAAa;IAGtB,KAAK,CAAU;IAGf,kBAAkB,CAAU;IAG5B,WAAW,CAAU;IAOrB,MAAM,CAAkB;CAClC,CAAA;AA9CY,4CAAgB;AAElB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,oBAAa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gDAC6B;2BA7CtB,gBAAgB;IAD5B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,EAAE,CAAC;GACxD,gBAAgB,CA8C5B","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { Vendor } from './vendor.model';\nimport { MarketingStatus, PromotionType, ValueType } from '../../../utilities/enum';\nimport { Duration, SlotRange } from './shared/promotion-duration.model';\nimport { ServicePackage } from './service-package.model';\n\n@modelOptions({ schemaOptions: { collection: 'servicePromotions' } })\nexport class ServicePromotion {\n @prop({ ref: () => Vendor, required: true })\n public vendor!: Ref<Vendor>;\n\n @prop({ enum: PromotionType, required: true })\n public promotionType!: PromotionType;\n\n @prop({ required: true, type: Duration })\n public duration!: Duration\n\n @prop({ ref: () => ServicePackage, required: true })\n public servicePackages?: Ref<ServicePackage>[]\n\n @prop({ type: Boolean })\n public isEntireMenu?: boolean;\n\n @prop({ type: SlotRange })\n public slotRange?: SlotRange[]\n\n @prop({ type: Number, min: 0 })\n public spendLimit?: number;\n\n @prop({ type: Number, default: 0, min: 0 })\n public spendAmount?: number;\n\n @prop({ type: Number })\n public maxDiscountPerOrder?: number;\n\n @prop({ type: String, enum: ValueType })\n public valueType?: ValueType;\n\n @prop({ type: Number })\n public value?: number;\n\n @prop({ type: String })\n public deactivationReason?: string;\n\n @prop({ type: String, trim: true, maxlength: 500 })\n public description?: string;\n\n @prop({\n type: String,\n enum: MarketingStatus,\n default: MarketingStatus.ACTIVE,\n })\n public status: MarketingStatus;\n}\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { Ref } from '@typegoose/typegoose';
|
|
2
|
+
import { Service } from '../service.model';
|
|
3
|
+
export declare class Duration {
|
|
2
4
|
start: Date;
|
|
3
|
-
end
|
|
5
|
+
end: Date;
|
|
6
|
+
}
|
|
7
|
+
export declare class SlotRange extends Duration {
|
|
8
|
+
services: Ref<Service>[];
|
|
4
9
|
}
|
|
@@ -9,19 +9,28 @@ 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
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.SlotRange = exports.Duration = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
-
|
|
14
|
+
const service_model_1 = require("../service.model");
|
|
15
|
+
class Duration {
|
|
15
16
|
start;
|
|
16
17
|
end;
|
|
17
18
|
}
|
|
18
|
-
exports.
|
|
19
|
+
exports.Duration = Duration;
|
|
19
20
|
__decorate([
|
|
20
21
|
(0, typegoose_1.prop)({ required: true, type: Date }),
|
|
21
22
|
__metadata("design:type", Date)
|
|
22
|
-
],
|
|
23
|
+
], Duration.prototype, "start", void 0);
|
|
23
24
|
__decorate([
|
|
24
25
|
(0, typegoose_1.prop)({ type: Date }),
|
|
25
26
|
__metadata("design:type", Date)
|
|
26
|
-
],
|
|
27
|
+
], Duration.prototype, "end", void 0);
|
|
28
|
+
class SlotRange extends Duration {
|
|
29
|
+
services;
|
|
30
|
+
}
|
|
31
|
+
exports.SlotRange = SlotRange;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typegoose_1.prop)({ ref: () => service_model_1.Service, required: true }),
|
|
34
|
+
__metadata("design:type", Array)
|
|
35
|
+
], SlotRange.prototype, "services", void 0);
|
|
27
36
|
//# sourceMappingURL=promotion-duration.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promotion-duration.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/promotion-duration.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"promotion-duration.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/promotion-duration.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,oDAA2C;AAE3C,MAAa,QAAQ;IAEV,KAAK,CAAQ;IAGb,GAAG,CAAO;CACpB;AAND,4BAMC;AAJU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACtB,IAAI;uCAAC;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACT,IAAI;qCAAC;AAGrB,MAAa,SAAU,SAAQ,QAAQ;IAE5B,QAAQ,CAAiB;CACnC;AAHD,8BAGC;AADU;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Service } from '../service.model';\n\nexport class Duration {\n @prop({ required: true, type: Date })\n public start!: Date;\n\n @prop({ type: Date })\n public end: Date;\n}\n\nexport class SlotRange extends Duration {\n @prop({ ref: () => Service, required: true })\n public services!: Ref<Service>[]\n}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseEvent } from '../event/BaseEvent';
|
|
2
|
-
import {
|
|
2
|
+
import { ClickType, SocketEventType } from '../../utilities/enum';
|
|
3
3
|
import { EntitySubscription } from './core/socket-redis-connections';
|
|
4
4
|
import { REGISTRY } from './core/socket-event-registry.map';
|
|
5
5
|
type SocketEventPayloads = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushNotificationEvent.js","sourceRoot":"/","sources":["libraries/socket/PushNotificationEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA+C;AAG/C,2DAA6D;AAC7D,oDAAwD;AAgCjD,IAAM,qBAAqB,GAA3B,MAAM,qBAAmE,SAAQ,qBAEvF;IACA,YACC,SAAY,EACZ,IAA4B,EAC5B,UAAgC,EAChC,QAA8B;QAE9B,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,KAAK,CAAC,8BAAiB,CAAC,8BAA8B,EAAE;YACvD,SAAS;YACT,UAAU;YACV,OAAO;YACP,oBAAoB,EAAE,QAAQ;SACE,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,UAAU;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7B,CAAC;CACD,CAAA;AA7BY,sDAAqB;gCAArB,qBAAqB;IALjC,IAAA,wBAAa,EAAC,mBAAmB,EAAE;QACnC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,iBAAiB,EAAE;QAC9C,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,sBAAsB,EAAE;QACpD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE;KAChC,CAAC;;GACW,qBAAqB,CA6BjC","sourcesContent":["import { BaseEvent } from '../event/BaseEvent';\nimport {
|
|
1
|
+
{"version":3,"file":"PushNotificationEvent.js","sourceRoot":"/","sources":["libraries/socket/PushNotificationEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA+C;AAG/C,2DAA6D;AAC7D,oDAAwD;AAgCjD,IAAM,qBAAqB,GAA3B,MAAM,qBAAmE,SAAQ,qBAEvF;IACA,YACC,SAAY,EACZ,IAA4B,EAC5B,UAAgC,EAChC,QAA8B;QAE9B,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,KAAK,CAAC,8BAAiB,CAAC,8BAA8B,EAAE;YACvD,SAAS;YACT,UAAU;YACV,OAAO;YACP,oBAAoB,EAAE,QAAQ;SACE,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,UAAU;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7B,CAAC;CACD,CAAA;AA7BY,sDAAqB;gCAArB,qBAAqB;IALjC,IAAA,wBAAa,EAAC,mBAAmB,EAAE;QACnC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,iBAAiB,EAAE;QAC9C,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,sBAAsB,EAAE;QACpD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE;KAChC,CAAC;;GACW,qBAAqB,CA6BjC","sourcesContent":["import { BaseEvent } from '../event/BaseEvent';\nimport { ClickType, SocketEventType } from '../../utilities/enum';\nimport { EntitySubscription } from './core/socket-redis-connections';\nimport { EventMetadata } from '../event/decorators/metadata';\nimport { PublishEventEnums } from '../event/EventEnums';\nimport { REGISTRY } from './core/socket-event-registry.map';\n\n// Extract payload types from the registry - use pushNotificationOutput when available, otherwise output\ntype SocketEventPayloads = {\n\t[K in SocketEventType]: (typeof REGISTRY)[K] extends { schemas: { pushNotificationOutput: any } }\n\t\t? import('zod').infer<(typeof REGISTRY)[K]['schemas']['pushNotificationOutput']>\n\t\t: (typeof REGISTRY)[K] extends { schemas: { output: any } }\n\t\t\t? import('zod').infer<(typeof REGISTRY)[K]['schemas']['output']>\n\t\t\t: any;\n};\n\nexport type NotificationSettings =\n\t| { isPushNotification: false }\n\t| {\n\t\t\tisPushNotification: true;\n\t\t\tisClickable: boolean;\n\t\t\tclickType: ClickType;\n\t };\n\nexport type PushNotificationEventData<T extends SocketEventType = SocketEventType> = {\n\teventName: T;\n\trecipients: EntitySubscription[];\n\tpayload: SocketEventPayloads[T];\n\tnotificationSettings: NotificationSettings;\n};\n\n@EventMetadata('notification.push', [\n\t{ name: 'eventName', type: 'SocketEventType' },\n\t{ name: 'recipients', type: 'EntitySubscription[]' },\n\t{ name: 'payload', type: 'any' },\n])\nexport class PushNotificationEvent<T extends SocketEventType = SocketEventType> extends BaseEvent<\n\tPushNotificationEventData<T>\n> {\n\tconstructor(\n\t\teventName: T,\n\t\tdata: SocketEventPayloads[T],\n\t\trecipients: EntitySubscription[],\n\t\tsettings: NotificationSettings\n\t) {\n\t\tconst payload = data;\n\t\tsuper(PublishEventEnums.SOCKET_PUSH_NOTIFICATION_EVENT, {\n\t\t\teventName,\n\t\t\trecipients,\n\t\t\tpayload,\n\t\t\tnotificationSettings: settings,\n\t\t} as PushNotificationEventData<T>);\n\t}\n\n\tget type(): T {\n\t\treturn this.payload.eventName;\n\t}\n\n\tget recipients(): EntitySubscription[] {\n\t\treturn this.payload.recipients;\n\t}\n\n\tgetPayload(): SocketEventPayloads[T] {\n\t\treturn this.payload.payload;\n\t}\n}\n"]}
|
|
@@ -63,23 +63,26 @@ async function getActiveSubscribedRecipients(recipients, localKey) {
|
|
|
63
63
|
return { subscribed, unsubscribed };
|
|
64
64
|
}
|
|
65
65
|
async function publishSocketEvent(event, recipients) {
|
|
66
|
+
const logger = (0, __1.getLibraries)().getLogger().logger;
|
|
66
67
|
if (recipients.length === 0)
|
|
67
68
|
return;
|
|
68
69
|
const localKey = event.getSubscriptionKey();
|
|
69
70
|
const payload = event.payload();
|
|
70
71
|
const { subscribed, unsubscribed } = await getActiveSubscribedRecipients(recipients, localKey);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (subscribed.length > 0) {
|
|
72
|
+
logger.debug({ subscribed }, '[Socket] Subscribed recipients:');
|
|
73
|
+
logger.debug({ unsubscribed }, '[Socket] Unsubscribed recipients:');
|
|
74
|
+
if (subscribed.length > 0)
|
|
75
75
|
publishToInstances(subscribed, localKey, payload);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
if (unsubscribed.length > 0) {
|
|
77
|
+
logger.debug({ unsubscribed }, '[Socket] Processing unsubscribed recipients');
|
|
78
|
+
if (event.notificationSettings?.isPushNotification) {
|
|
79
|
+
const pushNotificationPayload = event.getPushNotificationPayload();
|
|
80
|
+
const settings = event.notificationSettings;
|
|
81
|
+
await (0, event_1.publishEvent)(new PushNotificationEvent_1.PushNotificationEvent(event.eventType(), pushNotificationPayload, unsubscribed, settings)).catch(err => console.error('[Socket] Push notification failed:', err));
|
|
82
|
+
}
|
|
79
83
|
const socketNotificationPayload = event.getSocketNotificationEvent();
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (socketNotificationPayload) {
|
|
84
|
+
logger.debug({ socketNotificationPayload }, '[Socket] Socket notification payload');
|
|
85
|
+
if (event.getSocketNotificationEvent()) {
|
|
83
86
|
await publishNotificationSocketEvent(socketNotificationPayload, unsubscribed);
|
|
84
87
|
}
|
|
85
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket-event-publisher.js","sourceRoot":"/","sources":["libraries/socket/core/socket-event-publisher.ts"],"names":[],"mappings":";;AA6FA,gDAiCC;AAED,wEAmCC;AAnKD,gCAAwC;AAExC,yEAA0F;AAE1F,uCAA6F;AAC7F,oEAAiE;AAIjE,MAAM,eAAe,GAAG;IACvB,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,IAAI;CACP,CAAC;AAGX,SAAS,kBAAkB,CAC1B,uBAAsF,EACtF,QAAgB,EAChB,OAAgB;IAEhB,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEjD,MAAM,OAAO,GAAG,IAAA,kBAAU,GAAE,CAAC,UAAU,CAAC;IAGxC,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,IAAW,EAAE,CAAC;IAG9D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,uBAAuB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzD,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,uBAAuB,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K,CAAC,aAAa,CAAC,IAAA,mDAAwB,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;QAEzF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;YACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACzC,IAAI,CAAC;oBACJ,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC1C,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;gBACxC,CAAC;gBAAC,MAAM,CAAC;gBAET,CAAC;YACF,CAAC;YACD,IAAI,WAAW,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;gBAC1B,cAAc,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACxE,CAAC;QACF,CAAC;IACF,CAAC,CAAC,CACF,CAAC;IAEF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,kBAAkB,CAAC,cAAc,EAAE,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC","sourcesContent":["import { getLibraries } from '../../..';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { EntitySubscription, getEntityEventSocketsKey } from './socket-redis-connections';\nimport { SocketNotificationEvent } from '../events';\nimport { EXCHANGE_NAME, getChannel, INSTANCE_ROUTE_PREFIX, publishEvent } from '../../event';\nimport { PushNotificationEvent } from '../PushNotificationEvent';\nimport type { ZodTypeAny } from 'zod';\n\n// Reusable publish options\nconst PUBLISH_OPTIONS = {\n\tcontentType: 'application/json',\n\tpersistent: true,\n} as const;\n\n// Zero-overhead publishing - minimal allocations\nfunction publishToInstances(\n\trecipientsWithInstances: Array<{ recipient: EntitySubscription; instances: string[] }>,\n\tlocalKey: string,\n\tpayload: unknown\n): void {\n\tif (recipientsWithInstances.length === 0) return;\n\n\tconst channel = getChannel().pubChannel;\n\n\t// Pre-serialize message once\n\tconst message = { localKey, payload, recipient: null as any };\n\n\t// Fire-and-forget with minimal overhead\n\tfor (let i = 0; i < recipientsWithInstances.length; i++) {\n\t\tconst { recipient, instances } = recipientsWithInstances[i];\n\t\tmessage.recipient = recipient;\n\t\tconst messageStr = JSON.stringify(message);\n\n\t\tfor (let j = 0; j < instances.length; j++) {\n\t\t\tconst routingKey = `${INSTANCE_ROUTE_PREFIX}.${instances[j]}`;\n\n\t\t\ttry {\n\t\t\t\t// Direct publish - Buffer.from creates minimal overhead\n\t\t\t\tchannel.publish(EXCHANGE_NAME, routingKey, Buffer.from(messageStr, 'utf8'), PUBLISH_OPTIONS);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(`[Socket] Publish failed: ${routingKey}`, error);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Ultra-simple: Direct Redis lookups, no batch/cache/parsing!\nasync function getActiveSubscribedRecipients(\n\trecipients: EntitySubscription[],\n\tlocalKey: string\n): Promise<{\n\tsubscribed: Array<{ recipient: EntitySubscription; instances: string[] }>;\n\tunsubscribed: EntitySubscription[];\n}> {\n\tif (recipients.length === 0) {\n\t\treturn { subscribed: [], unsubscribed: [] };\n\t}\n\n\tconst redis = getLibraries().getRedisService();\n\tconst subscribed: Array<{ recipient: EntitySubscription; instances: string[] }> = [];\n\tconst unsubscribed: EntitySubscription[] = [];\n\n\t// Parallel lookups - one key per recipient\n\tawait Promise.all(\n\t\trecipients.map(async recipient => {\n\t\t\tconst sockets = await redis.getSetMembers(getEntityEventSocketsKey(recipient, localKey));\n\n\t\t\tif (sockets.length > 0) {\n\t\t\t\t// Extract instances\n\t\t\t\tconst instanceSet = new Set<string>();\n\t\t\t\tfor (let i = 0; i < sockets.length; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst socketInfo = JSON.parse(sockets[i]);\n\t\t\t\t\t\tinstanceSet.add(socketInfo.instanceId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Skip malformed socket data\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (instanceSet.size > 0) {\n\t\t\t\t\tsubscribed.push({ recipient, instances: Array.from(instanceSet) });\n\t\t\t\t} else {\n\t\t\t\t\tunsubscribed.push(recipient);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunsubscribed.push(recipient);\n\t\t\t}\n\t\t})\n\t);\n\n\treturn { subscribed, unsubscribed };\n}\n\n// Minimal overhead publish - early returns, lazy evaluation\nexport async function publishSocketEvent(\n\tevent: BaseSocketEvent<ZodTypeAny, ZodTypeAny, ZodTypeAny | undefined>,\n\trecipients: EntitySubscription[]\n): Promise<void> {\n\tif (recipients.length === 0) return;\n\n\tconst localKey = event.getSubscriptionKey();\n\tconst payload = event.payload();\n\n\tconst { subscribed, unsubscribed } = await getActiveSubscribedRecipients(recipients, localKey);\n\n\tconsole.log('payloadaa', payload);\n\n\tconsole.log('subscribed', subscribed);\n\tconsole.log('unsubscribed', unsubscribed);\n\n\tif (subscribed.length > 0) {\n\t\tpublishToInstances(subscribed, localKey, payload);\n\t}\n\n\tif (unsubscribed.length > 0 && event.notificationSettings?.isPushNotification) {\n\t\tconst pushNotificationPayload = event.getPushNotificationPayload();\n\t\tconst socketNotificationPayload = event.getSocketNotificationEvent();\n\n\t\tconst settings = event.notificationSettings;\n\t\tawait publishEvent(\n\t\t\tnew PushNotificationEvent(event.eventType(), pushNotificationPayload, unsubscribed, settings)\n\t\t).catch(err => console.error('[Socket] Push notification failed:', err));\n\n\t\tif (socketNotificationPayload) {\n\t\t\tawait publishNotificationSocketEvent(socketNotificationPayload, unsubscribed);\n\t\t}\n\t}\n}\n\nexport async function publishNotificationSocketEvent(\n\tevent: SocketNotificationEvent,\n\trecipients: EntitySubscription[]\n): Promise<void> {\n\tif (recipients.length === 0) return;\n\n\tconst eventKey = event.getSubscriptionKey();\n\tconst redis = getLibraries().getRedisService();\n\tconst validInstances: Array<{ recipient: EntitySubscription; instances: string[] }> = [];\n\n\t// Parallel direct lookups\n\tawait Promise.all(\n\t\trecipients.map(async recipient => {\n\t\t\tconst sockets = await redis.getSetMembers(getEntityEventSocketsKey(recipient, eventKey));\n\n\t\t\tif (sockets.length > 0) {\n\t\t\t\tconst instanceSet = new Set<string>();\n\t\t\t\tfor (let i = 0; i < sockets.length; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst socketInfo = JSON.parse(sockets[i]);\n\t\t\t\t\t\tinstanceSet.add(socketInfo.instanceId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Skip malformed socket data\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (instanceSet.size > 0) {\n\t\t\t\t\tvalidInstances.push({ recipient, instances: Array.from(instanceSet) });\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t);\n\n\tif (validInstances.length > 0) {\n\t\tpublishToInstances(validInstances, eventKey, event.payload());\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"socket-event-publisher.js","sourceRoot":"/","sources":["libraries/socket/core/socket-event-publisher.ts"],"names":[],"mappings":";;AA6FA,gDAmCC;AAED,wEAmCC;AArKD,gCAAwC;AAExC,yEAA0F;AAE1F,uCAA6F;AAC7F,oEAAiE;AAIjE,MAAM,eAAe,GAAG;IACvB,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,IAAI;CACP,CAAC;AAGX,SAAS,kBAAkB,CAC1B,uBAAsF,EACtF,QAAgB,EAChB,OAAgB;IAEhB,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEjD,MAAM,OAAO,GAAG,IAAA,kBAAU,GAAE,CAAC,UAAU,CAAC;IAGxC,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,OAAO,EAA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,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC","sourcesContent":["import { getLibraries } from '../../..';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { EntitySubscription, getEntityEventSocketsKey } from './socket-redis-connections';\nimport { SocketNotificationEvent } from '../events';\nimport { EXCHANGE_NAME, getChannel, INSTANCE_ROUTE_PREFIX, publishEvent } from '../../event';\nimport { PushNotificationEvent } from '../PushNotificationEvent';\nimport type { ZodTypeAny } from 'zod';\n\n// Reusable publish options\nconst PUBLISH_OPTIONS = {\n\tcontentType: 'application/json',\n\tpersistent: true,\n} as const;\n\n// Zero-overhead publishing - minimal allocations\nfunction publishToInstances(\n\trecipientsWithInstances: Array<{ recipient: EntitySubscription; instances: string[] }>,\n\tlocalKey: string,\n\tpayload: unknown\n): void {\n\tif (recipientsWithInstances.length === 0) return;\n\n\tconst channel = getChannel().pubChannel;\n\n\t// Pre-serialize message once\n\tconst message = { localKey, payload, recipient: null as any };\n\n\t// Fire-and-forget with minimal overhead\n\tfor (let i = 0; i < recipientsWithInstances.length; i++) {\n\t\tconst { recipient, instances } = recipientsWithInstances[i];\n\t\tmessage.recipient = recipient;\n\t\tconst messageStr = JSON.stringify(message);\n\n\t\tfor (let j = 0; j < instances.length; j++) {\n\t\t\tconst routingKey = `${INSTANCE_ROUTE_PREFIX}.${instances[j]}`;\n\n\t\t\ttry {\n\t\t\t\t// Direct publish - Buffer.from creates minimal overhead\n\t\t\t\tchannel.publish(EXCHANGE_NAME, routingKey, Buffer.from(messageStr, 'utf8'), PUBLISH_OPTIONS);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(`[Socket] Publish failed: ${routingKey}`, error);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Ultra-simple: Direct Redis lookups, no batch/cache/parsing!\nasync function getActiveSubscribedRecipients(\n\trecipients: EntitySubscription[],\n\tlocalKey: string\n): Promise<{\n\tsubscribed: Array<{ recipient: EntitySubscription; instances: string[] }>;\n\tunsubscribed: EntitySubscription[];\n}> {\n\tif (recipients.length === 0) {\n\t\treturn { subscribed: [], unsubscribed: [] };\n\t}\n\n\tconst redis = getLibraries().getRedisService();\n\tconst subscribed: Array<{ recipient: EntitySubscription; instances: string[] }> = [];\n\tconst unsubscribed: EntitySubscription[] = [];\n\n\t// Parallel lookups - one key per recipient\n\tawait Promise.all(\n\t\trecipients.map(async recipient => {\n\t\t\tconst sockets = await redis.getSetMembers(getEntityEventSocketsKey(recipient, localKey));\n\n\t\t\tif (sockets.length > 0) {\n\t\t\t\t// Extract instances\n\t\t\t\tconst instanceSet = new Set<string>();\n\t\t\t\tfor (let i = 0; i < sockets.length; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst socketInfo = JSON.parse(sockets[i]);\n\t\t\t\t\t\tinstanceSet.add(socketInfo.instanceId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Skip malformed socket data\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (instanceSet.size > 0) {\n\t\t\t\t\tsubscribed.push({ recipient, instances: Array.from(instanceSet) });\n\t\t\t\t} else {\n\t\t\t\t\tunsubscribed.push(recipient);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunsubscribed.push(recipient);\n\t\t\t}\n\t\t})\n\t);\n\n\treturn { subscribed, unsubscribed };\n}\n\n// Minimal overhead publish - early returns, lazy evaluation\nexport async function publishSocketEvent(\n\tevent: BaseSocketEvent<ZodTypeAny, ZodTypeAny, ZodTypeAny | undefined>,\n\trecipients: EntitySubscription[]\n): Promise<void> {\n\tconst logger = getLibraries().getLogger().logger;\n\tif (recipients.length === 0) return;\n\n\tconst localKey = event.getSubscriptionKey();\n\tconst payload = event.payload();\n\n\tconst { subscribed, unsubscribed } = await getActiveSubscribedRecipients(recipients, localKey);\n\n\tlogger.debug({ subscribed }, '[Socket] Subscribed recipients:');\n\tlogger.debug({ unsubscribed }, '[Socket] Unsubscribed recipients:');\n\n\tif (subscribed.length > 0) publishToInstances(subscribed, localKey, payload);\n\n\tif (unsubscribed.length > 0) {\n\t\tlogger.debug({ unsubscribed }, '[Socket] Processing unsubscribed recipients');\n\t\tif (event.notificationSettings?.isPushNotification) {\n\t\t\tconst pushNotificationPayload = event.getPushNotificationPayload();\n\t\t\tconst settings = event.notificationSettings;\n\t\t\tawait publishEvent(\n\t\t\t\tnew PushNotificationEvent(event.eventType(), pushNotificationPayload, unsubscribed, settings)\n\t\t\t).catch(err => console.error('[Socket] Push notification failed:', err));\n\t\t}\n\n\t\tconst socketNotificationPayload = event.getSocketNotificationEvent();\n\n\t\tlogger.debug({ socketNotificationPayload }, '[Socket] Socket notification payload');\n\n\t\tif (event.getSocketNotificationEvent()) {\n\t\t\tawait publishNotificationSocketEvent(socketNotificationPayload!, unsubscribed);\n\t\t}\n\t}\n}\n\nexport async function publishNotificationSocketEvent(\n\tevent: SocketNotificationEvent,\n\trecipients: EntitySubscription[]\n): Promise<void> {\n\tif (recipients.length === 0) return;\n\n\tconst eventKey = event.getSubscriptionKey();\n\tconst redis = getLibraries().getRedisService();\n\tconst validInstances: Array<{ recipient: EntitySubscription; instances: string[] }> = [];\n\n\t// Parallel direct lookups\n\tawait Promise.all(\n\t\trecipients.map(async recipient => {\n\t\t\tconst sockets = await redis.getSetMembers(getEntityEventSocketsKey(recipient, eventKey));\n\n\t\t\tif (sockets.length > 0) {\n\t\t\t\tconst instanceSet = new Set<string>();\n\t\t\t\tfor (let i = 0; i < sockets.length; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst socketInfo = JSON.parse(sockets[i]);\n\t\t\t\t\t\tinstanceSet.add(socketInfo.instanceId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Skip malformed socket data\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (instanceSet.size > 0) {\n\t\t\t\t\tvalidInstances.push({ recipient, instances: Array.from(instanceSet) });\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t);\n\n\tif (validInstances.length > 0) {\n\t\tpublishToInstances(validInstances, eventKey, event.payload());\n\t}\n}\n"]}
|
|
@@ -8,6 +8,7 @@ const zod_1 = __importDefault(require("zod"));
|
|
|
8
8
|
const enum_1 = require("../../../utilities/enum");
|
|
9
9
|
const validation_1 = require("../../../utilities/validation");
|
|
10
10
|
const BaseSocketEvent_1 = require("../BaseSocketEvent");
|
|
11
|
+
const core_1 = require("../core");
|
|
11
12
|
exports.ChatroomMessageSendSocketInputSchema = zod_1.default.object({
|
|
12
13
|
chatroomId: validation_1.IdSchema,
|
|
13
14
|
});
|
|
@@ -61,7 +62,12 @@ class ChatroomMessageSendSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
|
61
62
|
chatroomId: payload.chatroomId,
|
|
62
63
|
type: payload.chatroomType,
|
|
63
64
|
};
|
|
64
|
-
|
|
65
|
+
const socketNotificationEvent = core_1.EventFactory.createEvent(enum_1.SocketEventType.NOTIFICATION, {
|
|
66
|
+
message: 'New message!',
|
|
67
|
+
notificationType: enum_1.SocketEventType.CHATROOM_MESSAGE_SEND,
|
|
68
|
+
_id: payload._id,
|
|
69
|
+
});
|
|
70
|
+
super(enum_1.SocketEventType.CHATROOM_MESSAGE_SEND, ChatroomMessageSendSocketEvent.schemas, payload, pushPayload, socketNotificationEvent);
|
|
65
71
|
}
|
|
66
72
|
static identifier(input) {
|
|
67
73
|
return input.chatroomId.toString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatroom-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatroom-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAuG;AACvG,8DAA6E;AAC7E,wDAAqD;
|
|
1
|
+
{"version":3,"file":"chatroom-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatroom-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAuG;AACvG,8DAA6E;AAC7E,wDA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G,EAAE,OAAO,CAAC,GAAG;SAChB,CAAC,CAAC;QAEH,KAAK,CACJ,sBAAe,CAAC,qBAAqB,EACrC,8BAA8B,CAAC,OAAO,EACtC,OAAO,EACP,WAAW,EACX,uBAAuB,CACvB,CAAC;IACH,CAAC;IAER,MAAM,CAAC,UAAU,CAAC,KAA2D;QAC5E,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;IAEM,0BAA0B;QAChC,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;IAES,aAAa;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,SAAS,CAAC;IACtD,CAAC;;AAnDF,wEAoDC","sourcesContent":["import z from 'zod';\nimport { ChatroomType, ClickType, MediaType, SocketEventType, UserRef } from '../../../utilities/enum';\nimport { DTO, IdSchema, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSettings } from '../PushNotificationEvent';\nimport { EventFactory } from '../core';\n\nexport const ChatroomMessageSendSocketInputSchema = z.object({\n\tchatroomId: IdSchema,\n});\n\nexport const ChatroomMessageSendOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId('_id'),\n\tchatroomType: ZodValidation.enumType(ChatroomType, 'chatroomType'),\n\tsenderId: ZodValidation.coerce.objectId('senderId'), // DEPRECATED\n\tsenderType: ZodValidation.enumType(UserRef, 'senderType'), // DEPRECATED\n\tsender: z.object({\n\t\tid: ZodValidation.coerce.objectId('sender.id'),\n\t\ttype: ZodValidation.enumType(UserRef, 'sender.type'),\n\t}),\n\tcontent: ZodValidation.string('content').optional(),\n\tmedia: z.array(\n\t\tz.object({\n\t\t\tmimeType: ZodValidation.string('mimeType'),\n\t\t\tmediaType: ZodValidation.enumType(MediaType, 'mediaType'),\n\t\t\tmediaUrl: ZodValidation.string('url'),\n\t\t\tthumbnailUrl: ZodValidation.string('thumbnailUrl').optional(),\n\t\t\tname: ZodValidation.string('name').optional(),\n\t\t})\n\t),\n\tlocation: z\n\t\t.object({\n\t\t\tlongitude: ZodValidation.coerce.number('longitude').optional(),\n\t\t\tlatitude: ZodValidation.coerce.number('latitude').optional(),\n\t\t})\n\t\t.optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\tcreatedAt: ZodValidation.coerce.date(),\n});\n\nexport const ChatroomMessageSendPushOutputSchema = z.object({\n\tlastMessage: ZodValidation.string('lastMessage').optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\ttype: ZodValidation.enumType(ChatroomType, 'type'),\n});\n\nexport type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatroomMessageSendPushOutputSchema>;\n\nexport type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;\nexport type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSocketInputSchema>;\n\nexport class ChatroomMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatroomMessageSendSocketInputSchema,\n\ttypeof ChatroomMessageSendOutputSchema,\n\ttypeof ChatroomMessageSendPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatroomMessageSendSocketInputSchema,\n\t\toutput: ChatroomMessageSendOutputSchema,\n\t\tpushNotificationOutput: ChatroomMessageSendPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_MESSAGE,\n\t\t};\n\t}\n\n\t constructor(payload: ChatroomMessageSendSocketOutputDTO) {\n\t\t const pushPayload: ChatlistMessageSendPushOutputDTO = {\n\t\t\t lastMessage: payload.content,\n\t\t\t chatroomId: payload.chatroomId,\n\t\t\t type: payload.chatroomType,\n\t\t };\n\n\t\t const socketNotificationEvent = EventFactory.createEvent(SocketEventType.NOTIFICATION, {\n\t\t\t message: 'New message!',\n\t\t\t notificationType: SocketEventType.CHATROOM_MESSAGE_SEND,\n\t\t\t _id: payload._id,\n\t\t });\n\n\t\t super(\n\t\t\t SocketEventType.CHATROOM_MESSAGE_SEND,\n\t\t\t ChatroomMessageSendSocketEvent.schemas,\n\t\t\t payload,\n\t\t\t pushPayload,\n\t\t\t socketNotificationEvent\n\t\t );\n\t }\n\n\tstatic identifier(input: z.infer<typeof ChatroomMessageSendSocketInputSchema>): string {\n\t\treturn input.chatroomId.toString();\n\t}\n\n\tpublic getPushNotificationPayload() {\n\t\treturn this.pushNotificationData;\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn this.data.chatroomId?.toString() ?? 'default';\n\t}\n}\n"]}
|
|
@@ -2,7 +2,6 @@ import { z } from 'zod';
|
|
|
2
2
|
import { DTO } from '../../../utilities/validation/';
|
|
3
3
|
import { PaymentMethod, RegularOrderStatus } from '../../../utilities/enum';
|
|
4
4
|
import { BaseSocketEvent } from '../BaseSocketEvent';
|
|
5
|
-
import { SocketNotificationEvent } from './socketNotificationEvent';
|
|
6
5
|
export declare enum OrderAction {
|
|
7
6
|
PLACED = "placed",
|
|
8
7
|
ADJUSTMENT = "adjustment",
|
|
@@ -296,7 +295,6 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
|
|
|
296
295
|
orderAction: OrderAction;
|
|
297
296
|
preparationTimeMinutes: number;
|
|
298
297
|
}>;
|
|
299
|
-
socketNotificationEvent: SocketNotificationEvent;
|
|
300
298
|
};
|
|
301
299
|
constructor(payload: OrderActionSocketOutputDTO);
|
|
302
300
|
static identifier(input: z.infer<typeof OrderActionsInputSchema>): string;
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const validation_1 = require("../../../utilities/validation/");
|
|
6
6
|
const enum_1 = require("../../../utilities/enum");
|
|
7
7
|
const BaseSocketEvent_1 = require("../BaseSocketEvent");
|
|
8
|
-
const
|
|
8
|
+
const core_1 = require("../core");
|
|
9
9
|
var OrderAction;
|
|
10
10
|
(function (OrderAction) {
|
|
11
11
|
OrderAction["PLACED"] = "placed";
|
|
@@ -51,10 +51,14 @@ class OrderActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
|
51
51
|
static schemas = {
|
|
52
52
|
input: exports.OrderActionsInputSchema,
|
|
53
53
|
output: exports.OrderActionsOutputSchema,
|
|
54
|
-
socketNotificationEvent: new socketNotificationEvent_1.SocketNotificationEvent({ message: 'New Order!' }),
|
|
55
54
|
};
|
|
56
55
|
constructor(payload) {
|
|
57
|
-
|
|
56
|
+
const socketNotificationEvent = core_1.EventFactory.createEvent(enum_1.SocketEventType.NOTIFICATION, {
|
|
57
|
+
message: 'New Order!',
|
|
58
|
+
notificationType: enum_1.SocketEventType.ORDER_ACTIONS,
|
|
59
|
+
_id: payload._id,
|
|
60
|
+
});
|
|
61
|
+
super(enum_1.SocketEventType.ORDER_ACTIONS, OrderActionsSocketEvent.schemas, payload, undefined, socketNotificationEvent);
|
|
58
62
|
}
|
|
59
63
|
static identifier(input) {
|
|
60
64
|
return input.shopId.toString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/order-actions.socket.event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+DAAoE;AACpE,kDAA6F;AAC7F,wDAAqD;
|
|
1
|
+
{"version":3,"file":"order-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/order-actions.socket.event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+DAAoE;AACpE,kDAA6F;AAC7F,wDAAqD;AAErD,kCAAuC;AAEvC,IAAY,WAIX;AAJD,WAAY,WAAW;IACtB,gCAAiB,CAAA;IACjB,wCAAyB,CAAA;IACzB,0CAA2B,CAAA;AAC5B,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,0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import { DTO, ZodValidation } from '../../../utilities/validation/';\nimport { PaymentMethod, RegularOrderStatus, SocketEventType } from '../../../utilities/enum';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { SocketNotificationEvent } from './socketNotificationEvent';\nimport { EventFactory } from '../core';\n\nexport enum OrderAction {\n\tPLACED = 'placed',\n\tADJUSTMENT = 'adjustment',\n\tREPLACEMENT = 'replacement',\n}\n\nconst OrderUserSchema = z.object({\n\t_id: ZodValidation.objectId('User ID'),\n\tname: ZodValidation.string('User Name'),\n});\n\nexport const OrderActionsOutputSchema = z.object({\n\t_id: ZodValidation.objectId('Order ID'),\n\tshopId: ZodValidation.objectId('shopId'),\n\torderId: ZodValidation.string('Readable Order ID'),\n\tuser: OrderUserSchema,\n\torderStatus: ZodValidation.enumType(RegularOrderStatus, 'status'),\n\torderAction: ZodValidation.enumType(OrderAction, 'orderAction'),\n\tpaymentMethod: ZodValidation.enumType(PaymentMethod, 'paymentMethod'),\n\tpreparationTimeMinutes: ZodValidation.number('Preparation Time (minutes)', {\n\t\tisNonnegative: true,\n\t}),\n\tadjustedFinance: z.object({\n\t\tpaymentMethod: ZodValidation.enumType(PaymentMethod, 'paymentMethod'),\n\t\tshopProfit: ZodValidation.number('shopProfit'),\n\t\tpricing: z.object({\n\t\t\ttotal: ZodValidation.number('total'),\n\t\t\tsecondaryTotal: ZodValidation.number('secondaryTotal'),\n\t\t\tpaidAmount: ZodValidation.number('paidAmount'),\n\t\t\tsecondaryPaidAmount: ZodValidation.number('secondaryPaidAmount'),\n\t\t\tdeliveryFee: ZodValidation.number('deliveryFee'),\n\t\t\tsecondaryDeliveryFee: ZodValidation.number('secondaryDeliveryFee'),\n\t\t\triderTips: ZodValidation.number('riderTip'),\n\t\t\tsecondaryRiderTips: ZodValidation.number('secondaryRiderTips'),\n\t\t}),\n\t}),\n\tcreatedAt: ZodValidation.coerce.date('Order Creation Date'),\n\ttriggerAt: ZodValidation.coerce.date('Order Trigger Date'),\n});\n\nexport const OrderActionsInputSchema = z.object({\n\tshopId: ZodValidation.objectId('shopId'),\n});\n\nexport type OrderActionSocketInputDTO = DTO<typeof OrderActionsInputSchema>;\nexport type OrderActionSocketOutputDTO = DTO<typeof OrderActionsOutputSchema>;\n\nexport class OrderActionsSocketEvent extends BaseSocketEvent<\n\ttypeof OrderActionsInputSchema,\n\ttypeof OrderActionsOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: OrderActionsInputSchema,\n\t\toutput: OrderActionsOutputSchema,\n\t};\n\n\tconstructor(payload: OrderActionSocketOutputDTO) {\n\t\tconst socketNotificationEvent = EventFactory.createEvent(SocketEventType.NOTIFICATION, {\n\t\t\tmessage: 'New Order!',\n\t\t\tnotificationType: SocketEventType.ORDER_ACTIONS,\n\t\t\t_id: payload._id,\n\t\t});\n\n\t\tsuper(\n\t\t\tSocketEventType.ORDER_ACTIONS,\n\t\t\tOrderActionsSocketEvent.schemas,\n\t\t\tpayload,\n\t\t\tundefined,\n\t\t\tsocketNotificationEvent\n\t\t);\n\t}\n\n\tstatic identifier(input: z.infer<typeof OrderActionsInputSchema>): string {\n\t\treturn input.shopId.toString();\n\t}\n\n\tprotected getIdentifier(): string {\n\t\tconsole.log('this.data.shopId.toString(): ', this.data.shopId.toString());\n\t\treturn this.data.shopId.toString();\n\t}\n}\n"]}
|
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
import { BaseSocketEvent } from '../BaseSocketEvent';
|
|
2
2
|
import z from 'zod';
|
|
3
3
|
import { DTO } from '../../../utilities/validation';
|
|
4
|
+
import { SocketEventType } from '../../../utilities/enum';
|
|
4
5
|
export declare const NotificationSocketInputSchema: z.ZodUndefined;
|
|
5
6
|
export declare const NotificationSocketOutputSchema: z.ZodObject<{
|
|
7
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
6
8
|
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
9
|
+
notificationType: z.ZodNativeEnum<typeof SocketEventType>;
|
|
7
10
|
}, "strip", z.ZodTypeAny, {
|
|
8
11
|
message: string;
|
|
12
|
+
notificationType: SocketEventType;
|
|
13
|
+
_id?: import("mongoose").Types.ObjectId | undefined;
|
|
9
14
|
}, {
|
|
10
15
|
message: string;
|
|
16
|
+
notificationType: SocketEventType;
|
|
17
|
+
_id?: string | import("mongoose").Types.ObjectId | undefined;
|
|
11
18
|
}>;
|
|
12
19
|
export type NotificationSocketOutputDTO = DTO<typeof NotificationSocketOutputSchema>;
|
|
13
20
|
export declare class SocketNotificationEvent extends BaseSocketEvent<typeof NotificationSocketInputSchema, typeof NotificationSocketOutputSchema> {
|
|
14
21
|
static readonly schemas: {
|
|
15
22
|
input: z.ZodUndefined;
|
|
16
23
|
output: z.ZodObject<{
|
|
24
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
17
25
|
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
26
|
+
notificationType: z.ZodNativeEnum<typeof SocketEventType>;
|
|
18
27
|
}, "strip", z.ZodTypeAny, {
|
|
19
28
|
message: string;
|
|
29
|
+
notificationType: SocketEventType;
|
|
30
|
+
_id?: import("mongoose").Types.ObjectId | undefined;
|
|
20
31
|
}, {
|
|
21
32
|
message: string;
|
|
33
|
+
notificationType: SocketEventType;
|
|
34
|
+
_id?: string | import("mongoose").Types.ObjectId | undefined;
|
|
22
35
|
}>;
|
|
23
36
|
};
|
|
24
37
|
constructor(payload: DTO<typeof NotificationSocketOutputSchema>);
|
|
@@ -10,7 +10,9 @@ const validation_1 = require("../../../utilities/validation");
|
|
|
10
10
|
const enum_1 = require("../../../utilities/enum");
|
|
11
11
|
exports.NotificationSocketInputSchema = zod_1.default.undefined();
|
|
12
12
|
exports.NotificationSocketOutputSchema = zod_1.default.object({
|
|
13
|
+
_id: validation_1.ZodValidation.objectId().optional(),
|
|
13
14
|
message: validation_1.ZodValidation.string(),
|
|
15
|
+
notificationType: validation_1.ZodValidation.enumType(enum_1.SocketEventType, 'type'),
|
|
14
16
|
});
|
|
15
17
|
class SocketNotificationEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
16
18
|
static schemas = { input: exports.NotificationSocketInputSchema, output: exports.NotificationSocketOutputSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socketNotificationEvent.js","sourceRoot":"/","sources":["libraries/socket/events/socketNotificationEvent.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAqD;AACrD,8CAAoB;AACpB,8DAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"socketNotificationEvent.js","sourceRoot":"/","sources":["libraries/socket/events/socketNotificationEvent.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAqD;AACrD,8CAAoB;AACpB,8DAAmE;AACnE,kDAA0D;AAE7C,QAAA,6BAA6B,GAAG,aAAC,CAAC,SAAS,EAAE,CAAC;AAC9C,QAAA,8BAA8B,GAAG,aAAC,CAAC,MAAM,CAAC;IACtD,GAAG,EAAE,0BAAa,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACxC,OAAO,EAAE,0BAAa,CAAC,MAAM,EAAE;IAC/B,gBAAgB,EAAE,0BAAa,CAAC,QAAQ,CAAC,sBAAe,EAAE,MAAM,CAAC;CACjE,CAAC,CAAC;AAIH,MAAa,uBAAwB,SAAQ,iCAG5C;IACA,MAAM,CAAU,OAAO,GAAG,EAAE,KAAK,EAAE,qCAA6B,EAAE,MAAM,EAAE,sCAA8B,EAAE,CAAC;IAE3G,YAAY,OAAmD;QAC9D,KAAK,CAAC,sBAAe,CAAC,YAAY,EAAE,uBAAuB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AAZF,0DAaC","sourcesContent":["import { BaseSocketEvent } from '../BaseSocketEvent';\nimport z from 'zod';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { SocketEventType } from '../../../utilities/enum';\n\nexport const NotificationSocketInputSchema = z.undefined();\nexport const NotificationSocketOutputSchema = z.object({\n\t_id: ZodValidation.objectId().optional(),\n\tmessage: ZodValidation.string(),\n\tnotificationType: ZodValidation.enumType(SocketEventType, 'type'),\n});\n\nexport type NotificationSocketOutputDTO = DTO<typeof NotificationSocketOutputSchema>;\n\nexport class SocketNotificationEvent extends BaseSocketEvent<\n\ttypeof NotificationSocketInputSchema,\n\ttypeof NotificationSocketOutputSchema\n> {\n\tstatic readonly schemas = { input: NotificationSocketInputSchema, output: NotificationSocketOutputSchema };\n\n\tconstructor(payload: DTO<typeof NotificationSocketOutputSchema>) {\n\t\tsuper(SocketEventType.NOTIFICATION, SocketNotificationEvent.schemas, payload);\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
|
|
@@ -8,6 +8,7 @@ const zod_1 = __importDefault(require("zod"));
|
|
|
8
8
|
const enum_1 = require("../../../utilities/enum");
|
|
9
9
|
const validation_1 = require("../../../utilities/validation");
|
|
10
10
|
const BaseSocketEvent_1 = require("../BaseSocketEvent");
|
|
11
|
+
const core_1 = require("../core");
|
|
11
12
|
exports.TicketAssignSocketInputSchema = zod_1.default.undefined({});
|
|
12
13
|
exports.TicketAssignSocketOutputSchema = zod_1.default.object({
|
|
13
14
|
_id: validation_1.IdSchema,
|
|
@@ -32,7 +33,12 @@ exports.TicketAssignSocketOutputSchema = zod_1.default.object({
|
|
|
32
33
|
class TicketAssignEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
33
34
|
static schemas = { input: exports.TicketAssignSocketInputSchema, output: exports.TicketAssignSocketOutputSchema };
|
|
34
35
|
constructor(payload) {
|
|
35
|
-
|
|
36
|
+
const socketNotificationEvent = core_1.EventFactory.createEvent(enum_1.SocketEventType.NOTIFICATION, {
|
|
37
|
+
message: 'Ticket assigned!',
|
|
38
|
+
notificationType: enum_1.SocketEventType.TICKET_ASSIGN,
|
|
39
|
+
_id: payload._id,
|
|
40
|
+
});
|
|
41
|
+
super(enum_1.SocketEventType.TICKET_ASSIGN, TicketAssignEvent.schemas, payload, undefined, socketNotificationEvent);
|
|
36
42
|
}
|
|
37
43
|
getIdentifier() {
|
|
38
44
|
return 'default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket-assign.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/ticket-assign.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAwH;AACxH,8DAA6E;AAC7E,wDAAqD;
|
|
1
|
+
{"version":3,"file":"ticket-assign.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/ticket-assign.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAwH;AACxH,8DAA6E;AAC7E,wDAAqD;AACrD,kCAAuC;AAE1B,QAAA,6BAA6B,GAAG,aAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AAEhD,QAAA,8BAA8B,GAAG,aAAC,CAAC,MAAM,CAAC;IACtD,GAAG,EAAE,qBAAQ;IACb,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,iBAAU,EAAE,MAAM,CAAC;IAChD,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,QAAQ,CAAC;IACtD,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;QAChB,GAAG,EAAE,0BAAa,CAAC,QAAQ,CAAC,KAAK,CAAC;QAClC,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,cAAO,EAAE,YAAY,CAAC;QACnD,IAAI,EAAE,0BAAa,CAAC,MAAM,CAAC,MAAM,CAAC;QAClC,YAAY,EAAE,0BAAa,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;KAC7D,CAAC;IACF,SAAS,EAAE,0BAAa,CAAC,IAAI,CAAC,WAAW,CAAC;IAC1C,SAAS,EAAE,0BAAa,CAAC,IAAI,CAAC,WAAW,CAAC;IAC1C,OAAO,EAAE,0BAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;IACrD,UAAU,EAAE,0BAAa,CAAC,QAAQ,CAAC,YAAY,CAAC;IAChD,WAAW,EAAE,aAAC,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,SAAS,CAAC;QACxC,SAAS,EAAE,0BAAa,CAAC,IAAI,CAAC,WAAW,CAAC;KAC1C,CAAC;IACF,WAAW,EAAE,0BAAa,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACvD,CAAC,CAAC;AAIH,MAAa,iBAAkB,SAAQ,iCAGtC;IACA,MAAM,CAAU,OAAO,GAAG,EAAE,KAAK,EAAE,qCAA6B,EAAE,MAAM,EAAE,sCAA8B,EAAE,CAAC;IAEpG,YAAY,OAAmD;QAC9D,MAAM,uBAAuB,GAAG,mBAAY,CAAC,WAAW,CAAC,sBAAe,CAAC,YAAY,EAAE;YACtF,OAAO,EAAE,kBAAkB;YAC3B,gBAAgB,EAAE,sBAAe,CAAC,aAAa;YAC/C,GAAG,EAAE,OAAO,CAAC,GAAG;SAChB,CAAC,CAAC;QACH,KAAK,CACJ,sBAAe,CAAC,aAAa,EAC7B,iBAAiB,CAAC,OAAO,EACzB,OAAO,EACP,SAAS,EACT,uBAAuB,CACvB,CAAC;IACH,CAAC;IAEE,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AAvBF,8CAwBC","sourcesContent":["import z from 'zod';\nimport { PushNotificationEventType, SocketEventType, TicketStatus, TicketType, UserRef } from '../../../utilities/enum';\nimport { DTO, IdSchema, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { EventFactory } from '../core';\n\nexport const TicketAssignSocketInputSchema = z.undefined({});\n\nexport const TicketAssignSocketOutputSchema = z.object({\n\t_id: IdSchema,\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\tclient: z.object({\n\t\t_id: ZodValidation.objectId('_id'),\n\t\ttype: ZodValidation.enumType(UserRef, 'clientType'),\n\t\tname: ZodValidation.string('name'),\n\t\tprofilePhoto: ZodValidation.string('profilePhoto').nullable(),\n\t}),\n\tcreatedAt: ZodValidation.date('createdAt'),\n\tupdatedAt: ZodValidation.date('updatedAt'),\n\torderId: ZodValidation.objectId('orderId').optional(),\n\tchatroomId: ZodValidation.objectId('chatroomId'),\n\tlastMessage: z.object({\n\t\tcontent: ZodValidation.string('content'),\n\t\tcreatedAt: ZodValidation.date('createdAt'),\n\t}),\n\tunreadCount: ZodValidation.number('unreadCount').min(0),\n});\n\nexport type TicketAssignSocketOutputDTO = DTO<typeof TicketAssignSocketOutputSchema>;\n\nexport class TicketAssignEvent extends BaseSocketEvent<\n\ttypeof TicketAssignSocketInputSchema,\n\ttypeof TicketAssignSocketOutputSchema\n> {\n\tstatic readonly schemas = { input: TicketAssignSocketInputSchema, output: TicketAssignSocketOutputSchema };\n\n\t constructor(payload: DTO<typeof TicketAssignSocketOutputSchema>) {\n\t\t const socketNotificationEvent = EventFactory.createEvent(SocketEventType.NOTIFICATION, {\n\t\t\t message: 'Ticket assigned!',\n\t\t\t notificationType: SocketEventType.TICKET_ASSIGN,\n\t\t\t _id: payload._id,\n\t\t });\n\t\t super(\n\t\t\t SocketEventType.TICKET_ASSIGN,\n\t\t\t TicketAssignEvent.schemas,\n\t\t\t payload,\n\t\t\t undefined,\n\t\t\t socketNotificationEvent\n\t\t );\n\t }\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -26,8 +26,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
26
26
|
searchFields?: string[] | undefined;
|
|
27
27
|
} | undefined;
|
|
28
28
|
sort?: Record<string, 1 | -1> | undefined;
|
|
29
|
-
populate?: any;
|
|
30
29
|
select?: Record<string, 0 | 1> | undefined;
|
|
30
|
+
populate?: any;
|
|
31
31
|
query?: Record<string, any> | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
search?: {
|
|
@@ -36,8 +36,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
36
36
|
} | undefined;
|
|
37
37
|
sort?: Record<string, 1 | -1> | undefined;
|
|
38
38
|
size?: number | undefined;
|
|
39
|
-
populate?: any;
|
|
40
39
|
select?: Record<string, 0 | 1> | undefined;
|
|
40
|
+
populate?: any;
|
|
41
41
|
query?: Record<string, any> | undefined;
|
|
42
42
|
page?: number | undefined;
|
|
43
43
|
}>>;
|
|
@@ -733,12 +733,12 @@ export declare const GetByIdInputSchema: z.ZodObject<{
|
|
|
733
733
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
734
734
|
}, "strip", z.ZodTypeAny, {
|
|
735
735
|
_id: import("mongoose").Types.ObjectId;
|
|
736
|
-
populate?: any;
|
|
737
736
|
select?: Record<string, 0 | 1> | undefined;
|
|
737
|
+
populate?: any;
|
|
738
738
|
}, {
|
|
739
739
|
_id: string | import("mongoose").Types.ObjectId;
|
|
740
|
-
populate?: any;
|
|
741
740
|
select?: Record<string, 0 | 1> | undefined;
|
|
741
|
+
populate?: any;
|
|
742
742
|
}>;
|
|
743
743
|
export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
|
|
744
744
|
export declare const GetProductByIdInputSchema: z.ZodObject<{
|
|
@@ -751,12 +751,12 @@ export declare const GetProductByIdInputSchema: z.ZodObject<{
|
|
|
751
751
|
_id: import("mongoose").Types.ObjectId;
|
|
752
752
|
withAttributeHiddenItems: boolean;
|
|
753
753
|
withAddonsHiddenItems: boolean;
|
|
754
|
-
populate?: any;
|
|
755
754
|
select?: Record<string, 0 | 1> | undefined;
|
|
755
|
+
populate?: any;
|
|
756
756
|
}, {
|
|
757
757
|
_id: string | import("mongoose").Types.ObjectId;
|
|
758
|
-
populate?: any;
|
|
759
758
|
select?: Record<string, 0 | 1> | undefined;
|
|
759
|
+
populate?: any;
|
|
760
760
|
withAttributeHiddenItems?: boolean | undefined;
|
|
761
761
|
withAddonsHiddenItems?: boolean | undefined;
|
|
762
762
|
}>;
|
|
@@ -768,13 +768,13 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
|
|
|
768
768
|
userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
|
|
769
769
|
}, "strip", z.ZodTypeAny, {
|
|
770
770
|
_id: import("mongoose").Types.ObjectId;
|
|
771
|
-
populate?: any;
|
|
772
771
|
select?: Record<string, 0 | 1> | undefined;
|
|
772
|
+
populate?: any;
|
|
773
773
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
774
774
|
}, {
|
|
775
775
|
_id: string | import("mongoose").Types.ObjectId;
|
|
776
|
-
populate?: any;
|
|
777
776
|
select?: Record<string, 0 | 1> | undefined;
|
|
777
|
+
populate?: any;
|
|
778
778
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
779
779
|
}>;
|
|
780
780
|
export type GetOrderByIdInputDTO = DTO<typeof GetOrderByIdInputSchema>;
|
|
@@ -782,11 +782,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
|
|
|
782
782
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
783
783
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
784
784
|
}, "strip", z.ZodTypeAny, {
|
|
785
|
-
populate?: any;
|
|
786
785
|
select?: Record<string, 0 | 1> | undefined;
|
|
787
|
-
}, {
|
|
788
786
|
populate?: any;
|
|
787
|
+
}, {
|
|
789
788
|
select?: Record<string, 0 | 1> | undefined;
|
|
789
|
+
populate?: any;
|
|
790
790
|
}>>;
|
|
791
791
|
export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
|
|
792
792
|
export declare const GetOneQuerySchema: z.ZodObject<{
|
|
@@ -794,12 +794,12 @@ export declare const GetOneQuerySchema: z.ZodObject<{
|
|
|
794
794
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
795
795
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
796
796
|
}, "strip", z.ZodTypeAny, {
|
|
797
|
-
populate?: any;
|
|
798
797
|
select?: Record<string, 0 | 1> | undefined;
|
|
798
|
+
populate?: any;
|
|
799
799
|
query?: Record<string, any> | undefined;
|
|
800
800
|
}, {
|
|
801
|
-
populate?: any;
|
|
802
801
|
select?: Record<string, 0 | 1> | undefined;
|
|
802
|
+
populate?: any;
|
|
803
803
|
query?: Record<string, any> | undefined;
|
|
804
804
|
}>;
|
|
805
805
|
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
2
|
-
import { FaqAccountType, Status } from '../../../utilities/enum';
|
|
3
|
-
export declare class Faq extends TimeStamps {
|
|
4
|
-
question: string;
|
|
5
|
-
answer: string;
|
|
6
|
-
accountType: FaqAccountType;
|
|
7
|
-
status?: Status;
|
|
8
|
-
sortingOrder?: number;
|
|
9
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Faq = void 0;
|
|
13
|
-
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
-
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
-
const enum_1 = require("../../../utilities/enum");
|
|
16
|
-
const _1 = require(".");
|
|
17
|
-
const sorting_order_hooks_1 = require("../utilities/sorting-order.hooks");
|
|
18
|
-
let Faq = class Faq extends defaultClasses_1.TimeStamps {
|
|
19
|
-
question;
|
|
20
|
-
answer;
|
|
21
|
-
accountType;
|
|
22
|
-
status;
|
|
23
|
-
sortingOrder;
|
|
24
|
-
};
|
|
25
|
-
exports.Faq = Faq;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], Faq.prototype, "question", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], Faq.prototype, "answer", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typegoose_1.prop)({ required: true, enum: enum_1.FaqAccountType }),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], Faq.prototype, "accountType", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typegoose_1.prop)({ enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], Faq.prototype, "status", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typegoose_1.prop)({ type: Number }),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], Faq.prototype, "sortingOrder", void 0);
|
|
46
|
-
exports.Faq = Faq = __decorate([
|
|
47
|
-
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'faqs' } }),
|
|
48
|
-
(0, typegoose_1.pre)('save', async function (next) {
|
|
49
|
-
await sorting_order_hooks_1.handlePreSaveForSorting.call(this, _1.FaqModel);
|
|
50
|
-
next();
|
|
51
|
-
})
|
|
52
|
-
], Faq);
|
|
53
|
-
//# sourceMappingURL=faq.model.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"faq.model.js","sourceRoot":"/","sources":["libraries/mongo/models/faq.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,kDAAiE;AACjE,wBAA6B;AAC7B,0EAA2E;AASpE,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQ,2BAAU;IAE3B,QAAQ,CAAU;IAGlB,MAAM,CAAU;IAGhB,WAAW,CAAkB;IAG7B,MAAM,CAAU;IAGhB,YAAY,CAAU;CAC7B,CAAA;AAfY,kBAAG;AAER;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qCACd;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mCAChB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,qBAAc,EAAE,CAAC;;wCACX;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;mCACxB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACM;cAdjB,GAAG;IAPf,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;IACvD,IAAA,eAAG,EAAM,MAAM,EAAE,KAAK,WAAW,IAAI;QAErC,MAAM,6CAAuB,CAAC,IAAI,CAAC,IAAI,EAAE,WAAQ,CAAC,CAAC;QAEnD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,GAAG,CAef","sourcesContent":["import { modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { FaqAccountType, Status } from '../../../utilities/enum';\nimport { FaqModel } from '.';\nimport { handlePreSaveForSorting } from '../utilities/sorting-order.hooks';\n\n@modelOptions({ schemaOptions: { collection: 'faqs' } })\n@pre<Faq>('save', async function (next) {\n\t// Set sortingOrder\n\tawait handlePreSaveForSorting.call(this, FaqModel);\n\n\tnext();\n})\nexport class Faq extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic question!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic answer!: string;\n\n\t@prop({ required: true, enum: FaqAccountType })\n\tpublic accountType!: FaqAccountType;\n\n\t@prop({ enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
|