@lyxa.ai/core 1.4.225 → 1.4.227

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.
@@ -18,6 +18,7 @@ import { Favourite } from './favourite.model';
18
18
  import { FeaturedSetting } from './featured-setting.model';
19
19
  import { FilterContainer } from './filter-container.model';
20
20
  import { LimitedTimeOfferCampaign } from './limited-time-offer-campaign.model';
21
+ import { LimitedTimeOfferCampaignSession } from './limited-time-offer-campaign-session.model';
21
22
  import { LimitedTimeOfferConfig } from './limited-time-offer-config';
22
23
  import { LimitedTimeOfferParticipant } from './limited-time-offer-participant.model';
23
24
  import { ListContainer } from './list-container.model';
@@ -188,6 +189,8 @@ export declare const DealSettingModel: ReturnModelType<typeof DealSetting>;
188
189
  export * from './deal-setting.model';
189
190
  export declare const LimitedTimeOfferCampaignModel: ReturnModelType<typeof LimitedTimeOfferCampaign>;
190
191
  export * from './limited-time-offer-campaign.model';
192
+ export declare const LimitedTimeOfferCampaignSessionModel: ReturnModelType<typeof LimitedTimeOfferCampaignSession>;
193
+ export * from './limited-time-offer-campaign-session.model';
191
194
  export declare const LimitedTimeOfferConfigModel: ReturnModelType<typeof LimitedTimeOfferConfig>;
192
195
  export * from './limited-time-offer-config';
193
196
  export declare const LimitedTimeOfferParticipantModel: ReturnModelType<typeof LimitedTimeOfferParticipant>;
@@ -14,9 +14,9 @@ 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.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.LimitedTimeOfferParticipantModel = exports.LimitedTimeOfferConfigModel = exports.LimitedTimeOfferCampaignModel = 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.UserActionModel = exports.ServiceControlModel = exports.AppAppearanceModel = exports.BrandModel = exports.BOBFinanceModel = exports.BannerModel = exports.AttributeModel = exports.UserAppSectionSettingModel = exports.AdminModel = exports.AdminAccessControlModel = exports.ActivityLogModel = void 0;
18
- exports.ProfessionalModel = exports.ServicePackageModel = exports.ServiceAddonModel = 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.DeliveryChargesModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.ShopModel = exports.ShopSectionModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.ServicePackageReviewModel = exports.VendorReviewModel = exports.RiderReviewModel = exports.ShopReviewModel = exports.ReviewModel = exports.RequestAreaModel = exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductUploadModel = exports.ProductModel = exports.ProductStockTrackerModel = exports.ProductMarketingModel = exports.VendorPayoutModel = exports.RiderPayoutModel = exports.ShopPayoutModel = exports.PayoutModel = exports.ParentModel = exports.ShopCourierOrderModel = void 0;
19
- exports.TournamentParticipantModel = exports.TournamentModel = exports.BookingCancellationReschedulingRuleModel = exports.IntegrationConfigurationModel = exports.ServiceFlagModel = exports.PaymentConfigurationModel = exports.AppInstanceModel = exports.ZoneExtraTimeModel = exports.LoggerModel = exports.ServicePromotionModel = exports.TicketActionModel = exports.ProfessionalBlockedTimeModel = exports.ServiceBookingModel = exports.ServiceCartModel = void 0;
17
+ 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.LimitedTimeOfferParticipantModel = exports.LimitedTimeOfferConfigModel = exports.LimitedTimeOfferCampaignSessionModel = exports.LimitedTimeOfferCampaignModel = 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.UserActionModel = exports.ServiceControlModel = exports.AppAppearanceModel = exports.BrandModel = exports.BOBFinanceModel = exports.BannerModel = exports.AttributeModel = exports.UserAppSectionSettingModel = exports.AdminModel = exports.AdminAccessControlModel = exports.ActivityLogModel = void 0;
18
+ exports.ServicePackageModel = exports.ServiceAddonModel = 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.DeliveryChargesModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.ShopModel = exports.ShopSectionModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.ServicePackageReviewModel = exports.VendorReviewModel = exports.RiderReviewModel = exports.ShopReviewModel = exports.ReviewModel = exports.RequestAreaModel = exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductUploadModel = exports.ProductModel = exports.ProductStockTrackerModel = exports.ProductMarketingModel = exports.VendorPayoutModel = exports.RiderPayoutModel = exports.ShopPayoutModel = exports.PayoutModel = exports.ParentModel = exports.ShopCourierOrderModel = exports.CourierOrderModel = void 0;
19
+ exports.TournamentParticipantModel = exports.TournamentModel = exports.BookingCancellationReschedulingRuleModel = exports.IntegrationConfigurationModel = exports.ServiceFlagModel = exports.PaymentConfigurationModel = exports.AppInstanceModel = exports.ZoneExtraTimeModel = exports.LoggerModel = exports.ServicePromotionModel = exports.TicketActionModel = exports.ProfessionalBlockedTimeModel = exports.ServiceBookingModel = exports.ServiceCartModel = exports.ProfessionalModel = void 0;
20
20
  exports.getCoreAuthIdentityModel = getCoreAuthIdentityModel;
21
21
  exports.getCoreEmailAuthIdentityModel = getCoreEmailAuthIdentityModel;
22
22
  exports.getCorePhoneAuthIdentityModel = getCorePhoneAuthIdentityModel;
@@ -47,6 +47,7 @@ const favourite_model_1 = require("./favourite.model");
47
47
  const featured_setting_model_1 = require("./featured-setting.model");
48
48
  const filter_container_model_1 = require("./filter-container.model");
49
49
  const limited_time_offer_campaign_model_1 = require("./limited-time-offer-campaign.model");
50
+ const limited_time_offer_campaign_session_model_1 = require("./limited-time-offer-campaign-session.model");
50
51
  const limited_time_offer_config_1 = require("./limited-time-offer-config");
51
52
  const limited_time_offer_participant_model_1 = require("./limited-time-offer-participant.model");
52
53
  const list_container_model_1 = require("./list-container.model");
@@ -271,6 +272,8 @@ exports.DealSettingModel = (0, typegoose_1.getModelForClass)(deal_setting_model_
271
272
  __exportStar(require("./deal-setting.model"), exports);
272
273
  exports.LimitedTimeOfferCampaignModel = (0, typegoose_1.getModelForClass)(limited_time_offer_campaign_model_1.LimitedTimeOfferCampaign);
273
274
  __exportStar(require("./limited-time-offer-campaign.model"), exports);
275
+ exports.LimitedTimeOfferCampaignSessionModel = (0, typegoose_1.getModelForClass)(limited_time_offer_campaign_session_model_1.LimitedTimeOfferCampaignSession);
276
+ __exportStar(require("./limited-time-offer-campaign-session.model"), exports);
274
277
  exports.LimitedTimeOfferConfigModel = (0, typegoose_1.getModelForClass)(limited_time_offer_config_1.LimitedTimeOfferConfig);
275
278
  __exportStar(require("./limited-time-offer-config"), exports);
276
279
  exports.LimitedTimeOfferParticipantModel = (0, typegoose_1.getModelForClass)(limited_time_offer_participant_model_1.LimitedTimeOfferParticipant);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAwLA,4DAIC;AAED,sEAIC;AAED,sEAIC;AAED,wEAIC;AAED,sEAIC;AAED,4CAIC;AAED,oCAGC;AAED,sDAIC;AAGD,wDAuCC;AA4XD,wEAKC;AAhpBD,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,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,2FAA+E;AAC/E,2EAAqE;AACrE,iGAAqF;AACrF,iEAAuD;AACvD,uDAA8C;AAC9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} 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 { 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 { LimitedTimeOfferCampaign } from './limited-time-offer-campaign.model';\nimport { LimitedTimeOfferConfig } from './limited-time-offer-config';\nimport { LimitedTimeOfferParticipant } from './limited-time-offer-participant.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 { 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 { ShopSection } from './shop-section.model';\nimport { Shop } from './shop.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\tCoreAuthIdentityType,\n\tCounterType,\n\tCouponType,\n\tMarketingType,\n\tOrderType,\n\tPayoutType,\n\tReviewType,\n} from '../../../utilities/enum';\nimport { ServiceAddon } from './service-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 { 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 { 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 { ServiceBooking } from './service-booking.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 { VendorReview } from './providers/vendor-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 { ProfessionalBlockedTime } from './professional-blocked-time.model';\nimport { ZoneExtraTime } from './zone-extra-time';\nimport { AppAppearance } from './app-appearance.model';\nimport { ServiceControl } from './service-control.model';\nimport { Log } from './log.model';\nimport { Card } from './card.model';\nimport { ProductStockTracker } from './product-stock-tracker.model';\nimport { PaymentIntent } from './payment-intent.model';\nimport { AppInstance } from './app-instance.model';\nimport { PaymentConfiguration } from './payment-configuration.model';\nimport { ServiceFlag } from './service-flag.model';\nimport { IntegrationConfiguration } from './integration-configuration.model';\nimport { ServicePackageReview } from './providers/service-package-review.model';\nimport { VendorPayout } from './providers/vendor-payout.model';\nimport { BookingCancellationReschedulingRule } from './booking-cancellation-rescheduling-rules.model';\nimport { UserAction } from './user-action.model';\nimport { Tournament } from './tournament.model';\nimport { TournamentParticipant } from './tournament-participant.model';\nimport { DeliveryCharges } from './delivery-charges.model';\nimport { UserAppSectionSetting } from './user-app-section-setting.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\nexport const UserActionModel: ReturnModelType<typeof UserAction> = getModelForClass(UserAction);\nexport * from './user-action.model';\n\n// Global models - will be set after initGlobalConnection()\nlet actualCoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> | null = null;\nlet actualCoreUserModel: ReturnModelType<typeof CoreUser> | null = null;\nlet actualCardModel: ReturnModelType<typeof Card> | null = null;\nlet actualPaymentIntentModel: ReturnModelType<typeof PaymentIntent> | null = null;\n\n// Global discriminator models - will be set after initGlobalConnection()\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 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 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 getPaymentIntentModel(): ReturnModelType<typeof PaymentIntent> {\n\tif (!actualPaymentIntentModel)\n\t\tthrow new Error('Payment Intent model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualPaymentIntentModel;\n}\n\n// Function to initialize all global models (called from initGlobalConnection)\nexport function initializeGlobalModels(globalConnection: any) {\n\t// Initialize base global models\n\tactualCoreAuthIdentityModel = getModelForClass(CoreAuthIdentity, { existingConnection: globalConnection });\n\tactualCoreUserModel = getModelForClass(CoreUser, { existingConnection: globalConnection });\n\tactualCardModel = getModelForClass(Card, { existingConnection: globalConnection });\n\tactualPaymentIntentModel = getModelForClass(PaymentIntent, { existingConnection: globalConnection });\n\n\t// Initialize discriminator models\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 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';\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 LimitedTimeOfferCampaignModel: ReturnModelType<typeof LimitedTimeOfferCampaign> =\n\tgetModelForClass(LimitedTimeOfferCampaign);\nexport * from './limited-time-offer-campaign.model';\n\nexport const LimitedTimeOfferConfigModel: ReturnModelType<typeof LimitedTimeOfferConfig> =\n\tgetModelForClass(LimitedTimeOfferConfig);\nexport * from './limited-time-offer-config';\n\nexport const LimitedTimeOfferParticipantModel: ReturnModelType<typeof LimitedTimeOfferParticipant> =\n\tgetModelForClass(LimitedTimeOfferParticipant);\nexport * from './limited-time-offer-participant.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 const VendorPayoutModel: ReturnModelType<typeof VendorPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tVendorPayout,\n\tPayoutType.VENDOR\n);\nexport * from './payout.model';\nexport * from './providers/shop-payout.model';\nexport * from './providers/rider-payout.model';\nexport * from './providers/vendor-payout.model';\n\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\n\tgetModelForClass(ProductMarketing);\nexport * from './product-marketing.model';\n\nexport const ProductStockTrackerModel: ReturnModelType<typeof ProductStockTracker> =\n\tgetModelForClass(ProductStockTracker);\nexport * from './product-stock-tracker.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 VendorReviewModel: ReturnModelType<typeof VendorReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tVendorReview,\n\tReviewType.VENDOR\n);\nexport const ServicePackageReviewModel: ReturnModelType<typeof ServicePackageReview> =\n\tgetDiscriminatorModelForClass(ReviewModel, ServicePackageReview, ReviewType.SERVICE_PACKAGE);\nexport * from './review.model';\nexport * from './providers/shop-review.model';\nexport * from './providers/rider-review.model';\nexport * from './providers/vendor-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 ShopSectionModel: ReturnModelType<typeof ShopSection> = getModelForClass(ShopSection);\nexport * from './shop-section.model';\n\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\nexport * from './shop.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 DeliveryChargesModel: ReturnModelType<typeof DeliveryCharges> =\n\tgetModelForClass(DeliveryCharges);\nexport * from './delivery-charges.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';\nexport * from './embedded/external-ref.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 ServiceAddonModel: ReturnModelType<typeof ServiceAddon> = getModelForClass(ServiceAddon);\nexport * from './service-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 ServiceBookingModel: ReturnModelType<typeof ServiceBooking> = getModelForClass(ServiceBooking);\nexport * from './service-booking.model';\n\nexport const ProfessionalBlockedTimeModel: ReturnModelType<typeof ProfessionalBlockedTime> =\n\tgetModelForClass(ProfessionalBlockedTime);\nexport * from './professional-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 LoggerModel: ReturnModelType<typeof Log> = getModelForClass(Log);\nexport * from './log.model';\n\nexport const ZoneExtraTimeModel: ReturnModelType<typeof ZoneExtraTime> = getModelForClass(ZoneExtraTime);\nexport * from './zone-extra-time';\n\nexport * from './google-maps-usage.model';\n\nexport const AppInstanceModel: ReturnModelType<typeof AppInstance> = getModelForClass(AppInstance);\nexport * from './app-instance.model';\n\nexport const PaymentConfigurationModel: ReturnModelType<typeof PaymentConfiguration> =\n\tgetModelForClass(PaymentConfiguration);\nexport * from './payment-configuration.model';\n\nexport const ServiceFlagModel: ReturnModelType<typeof ServiceFlag> = getModelForClass(ServiceFlag);\nexport * from './service-flag.model';\n\nexport const IntegrationConfigurationModel: ReturnModelType<typeof IntegrationConfiguration> =\n\tgetModelForClass(IntegrationConfiguration);\nexport * from './integration-configuration.model';\n\nexport function createIntegrationDiscriminator<U extends new (...args: any[]) => IntegrationConfiguration>(\n\tcls: U,\n\tkey: string\n): ReturnModelType<U> {\n\treturn getDiscriminatorModelForClass(IntegrationConfigurationModel, cls, key);\n}\n\nexport const BookingCancellationReschedulingRuleModel: ReturnModelType<\n\ttypeof BookingCancellationReschedulingRule\n> = getModelForClass(BookingCancellationReschedulingRule);\nexport * from './booking-cancellation-rescheduling-rules.model';\n\nexport const TournamentModel: ReturnModelType<typeof Tournament> = getModelForClass(Tournament);\nexport * from './tournament.model';\n\nexport const TournamentParticipantModel: ReturnModelType<typeof TournamentParticipant> =\n\tgetModelForClass(TournamentParticipant);\nexport * from './tournament-participant.model';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAyLA,4DAIC;AAED,sEAIC;AAED,sEAIC;AAED,wEAIC;AAED,sEAIC;AAED,4CAIC;AAED,oCAGC;AAED,sDAIC;AAGD,wDAuCC;AAgYD,wEAKC;AArpBD,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,uDAA8C;AAC9C,iDAAwC;AACxC,gEAAsD;AACtD,2DAAiD;AACjD,+CA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AAE,GAAG,CAAC,CAAC;AAC/E,CAAC;AAEY,QAAA,wCAAwC,GAEjD,IAAA,4BAAgB,EAAC,mFAAmC,CAAC,CAAC;AAC1D,kFAAgE;AAEnD,QAAA,eAAe,GAAuC,IAAA,4BAAgB,EAAC,6BAAU,CAAC,CAAC;AAChG,qDAAmC;AAEtB,QAAA,0BAA0B,GACtC,IAAA,4BAAgB,EAAC,oDAAqB,CAAC,CAAC;AACzC,iEAA+C","sourcesContent":["import { 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 { 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 { LimitedTimeOfferCampaign } from './limited-time-offer-campaign.model';\nimport { LimitedTimeOfferCampaignSession } from './limited-time-offer-campaign-session.model';\nimport { LimitedTimeOfferConfig } from './limited-time-offer-config';\nimport { LimitedTimeOfferParticipant } from './limited-time-offer-participant.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 { 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 { ShopSection } from './shop-section.model';\nimport { Shop } from './shop.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\tCoreAuthIdentityType,\n\tCounterType,\n\tCouponType,\n\tMarketingType,\n\tOrderType,\n\tPayoutType,\n\tReviewType,\n} from '../../../utilities/enum';\nimport { ServiceAddon } from './service-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 { 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 { 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 { ServiceBooking } from './service-booking.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 { VendorReview } from './providers/vendor-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 { ProfessionalBlockedTime } from './professional-blocked-time.model';\nimport { ZoneExtraTime } from './zone-extra-time';\nimport { AppAppearance } from './app-appearance.model';\nimport { ServiceControl } from './service-control.model';\nimport { Log } from './log.model';\nimport { Card } from './card.model';\nimport { ProductStockTracker } from './product-stock-tracker.model';\nimport { PaymentIntent } from './payment-intent.model';\nimport { AppInstance } from './app-instance.model';\nimport { PaymentConfiguration } from './payment-configuration.model';\nimport { ServiceFlag } from './service-flag.model';\nimport { IntegrationConfiguration } from './integration-configuration.model';\nimport { ServicePackageReview } from './providers/service-package-review.model';\nimport { VendorPayout } from './providers/vendor-payout.model';\nimport { BookingCancellationReschedulingRule } from './booking-cancellation-rescheduling-rules.model';\nimport { UserAction } from './user-action.model';\nimport { Tournament } from './tournament.model';\nimport { TournamentParticipant } from './tournament-participant.model';\nimport { DeliveryCharges } from './delivery-charges.model';\nimport { UserAppSectionSetting } from './user-app-section-setting.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\nexport const UserActionModel: ReturnModelType<typeof UserAction> = getModelForClass(UserAction);\nexport * from './user-action.model';\n\n// Global models - will be set after initGlobalConnection()\nlet actualCoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> | null = null;\nlet actualCoreUserModel: ReturnModelType<typeof CoreUser> | null = null;\nlet actualCardModel: ReturnModelType<typeof Card> | null = null;\nlet actualPaymentIntentModel: ReturnModelType<typeof PaymentIntent> | null = null;\n\n// Global discriminator models - will be set after initGlobalConnection()\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 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 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 getPaymentIntentModel(): ReturnModelType<typeof PaymentIntent> {\n\tif (!actualPaymentIntentModel)\n\t\tthrow new Error('Payment Intent model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualPaymentIntentModel;\n}\n\n// Function to initialize all global models (called from initGlobalConnection)\nexport function initializeGlobalModels(globalConnection: any) {\n\t// Initialize base global models\n\tactualCoreAuthIdentityModel = getModelForClass(CoreAuthIdentity, { existingConnection: globalConnection });\n\tactualCoreUserModel = getModelForClass(CoreUser, { existingConnection: globalConnection });\n\tactualCardModel = getModelForClass(Card, { existingConnection: globalConnection });\n\tactualPaymentIntentModel = getModelForClass(PaymentIntent, { existingConnection: globalConnection });\n\n\t// Initialize discriminator models\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 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';\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 LimitedTimeOfferCampaignModel: ReturnModelType<typeof LimitedTimeOfferCampaign> =\n\tgetModelForClass(LimitedTimeOfferCampaign);\nexport * from './limited-time-offer-campaign.model';\n\nexport const LimitedTimeOfferCampaignSessionModel: ReturnModelType<typeof LimitedTimeOfferCampaignSession> =\n\tgetModelForClass(LimitedTimeOfferCampaignSession);\nexport * from './limited-time-offer-campaign-session.model';\n\nexport const LimitedTimeOfferConfigModel: ReturnModelType<typeof LimitedTimeOfferConfig> =\n\tgetModelForClass(LimitedTimeOfferConfig);\nexport * from './limited-time-offer-config';\n\nexport const LimitedTimeOfferParticipantModel: ReturnModelType<typeof LimitedTimeOfferParticipant> =\n\tgetModelForClass(LimitedTimeOfferParticipant);\nexport * from './limited-time-offer-participant.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 const VendorPayoutModel: ReturnModelType<typeof VendorPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tVendorPayout,\n\tPayoutType.VENDOR\n);\nexport * from './payout.model';\nexport * from './providers/shop-payout.model';\nexport * from './providers/rider-payout.model';\nexport * from './providers/vendor-payout.model';\n\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\n\tgetModelForClass(ProductMarketing);\nexport * from './product-marketing.model';\n\nexport const ProductStockTrackerModel: ReturnModelType<typeof ProductStockTracker> =\n\tgetModelForClass(ProductStockTracker);\nexport * from './product-stock-tracker.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 VendorReviewModel: ReturnModelType<typeof VendorReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tVendorReview,\n\tReviewType.VENDOR\n);\nexport const ServicePackageReviewModel: ReturnModelType<typeof ServicePackageReview> =\n\tgetDiscriminatorModelForClass(ReviewModel, ServicePackageReview, ReviewType.SERVICE_PACKAGE);\nexport * from './review.model';\nexport * from './providers/shop-review.model';\nexport * from './providers/rider-review.model';\nexport * from './providers/vendor-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 ShopSectionModel: ReturnModelType<typeof ShopSection> = getModelForClass(ShopSection);\nexport * from './shop-section.model';\n\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\nexport * from './shop.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 DeliveryChargesModel: ReturnModelType<typeof DeliveryCharges> =\n\tgetModelForClass(DeliveryCharges);\nexport * from './delivery-charges.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';\nexport * from './embedded/external-ref.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 ServiceAddonModel: ReturnModelType<typeof ServiceAddon> = getModelForClass(ServiceAddon);\nexport * from './service-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 ServiceBookingModel: ReturnModelType<typeof ServiceBooking> = getModelForClass(ServiceBooking);\nexport * from './service-booking.model';\n\nexport const ProfessionalBlockedTimeModel: ReturnModelType<typeof ProfessionalBlockedTime> =\n\tgetModelForClass(ProfessionalBlockedTime);\nexport * from './professional-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 LoggerModel: ReturnModelType<typeof Log> = getModelForClass(Log);\nexport * from './log.model';\n\nexport const ZoneExtraTimeModel: ReturnModelType<typeof ZoneExtraTime> = getModelForClass(ZoneExtraTime);\nexport * from './zone-extra-time';\n\nexport * from './google-maps-usage.model';\n\nexport const AppInstanceModel: ReturnModelType<typeof AppInstance> = getModelForClass(AppInstance);\nexport * from './app-instance.model';\n\nexport const PaymentConfigurationModel: ReturnModelType<typeof PaymentConfiguration> =\n\tgetModelForClass(PaymentConfiguration);\nexport * from './payment-configuration.model';\n\nexport const ServiceFlagModel: ReturnModelType<typeof ServiceFlag> = getModelForClass(ServiceFlag);\nexport * from './service-flag.model';\n\nexport const IntegrationConfigurationModel: ReturnModelType<typeof IntegrationConfiguration> =\n\tgetModelForClass(IntegrationConfiguration);\nexport * from './integration-configuration.model';\n\nexport function createIntegrationDiscriminator<U extends new (...args: any[]) => IntegrationConfiguration>(\n\tcls: U,\n\tkey: string\n): ReturnModelType<U> {\n\treturn getDiscriminatorModelForClass(IntegrationConfigurationModel, cls, key);\n}\n\nexport const BookingCancellationReschedulingRuleModel: ReturnModelType<\n\ttypeof BookingCancellationReschedulingRule\n> = getModelForClass(BookingCancellationReschedulingRule);\nexport * from './booking-cancellation-rescheduling-rules.model';\n\nexport const TournamentModel: ReturnModelType<typeof Tournament> = getModelForClass(Tournament);\nexport * from './tournament.model';\n\nexport const TournamentParticipantModel: ReturnModelType<typeof TournamentParticipant> =\n\tgetModelForClass(TournamentParticipant);\nexport * from './tournament-participant.model';\n"]}
@@ -0,0 +1,9 @@
1
+ import { Ref } from '@typegoose/typegoose';
2
+ import { LimitedTimeOfferCampaign } from './limited-time-offer-campaign.model';
3
+ export declare class LimitedTimeOfferCampaignSession {
4
+ campaign: Ref<LimitedTimeOfferCampaign>;
5
+ startDate: Date;
6
+ endDate: Date;
7
+ shopCount: number;
8
+ archivedAt: Date;
9
+ }
@@ -0,0 +1,45 @@
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.LimitedTimeOfferCampaignSession = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ let LimitedTimeOfferCampaignSession = class LimitedTimeOfferCampaignSession {
15
+ campaign;
16
+ startDate;
17
+ endDate;
18
+ shopCount;
19
+ archivedAt;
20
+ };
21
+ exports.LimitedTimeOfferCampaignSession = LimitedTimeOfferCampaignSession;
22
+ __decorate([
23
+ (0, typegoose_1.prop)({ ref: 'LimitedTimeOfferCampaign', required: true }),
24
+ __metadata("design:type", Object)
25
+ ], LimitedTimeOfferCampaignSession.prototype, "campaign", void 0);
26
+ __decorate([
27
+ (0, typegoose_1.prop)({ required: true }),
28
+ __metadata("design:type", Date)
29
+ ], LimitedTimeOfferCampaignSession.prototype, "startDate", void 0);
30
+ __decorate([
31
+ (0, typegoose_1.prop)({ required: true }),
32
+ __metadata("design:type", Date)
33
+ ], LimitedTimeOfferCampaignSession.prototype, "endDate", void 0);
34
+ __decorate([
35
+ (0, typegoose_1.prop)({ default: 0 }),
36
+ __metadata("design:type", Number)
37
+ ], LimitedTimeOfferCampaignSession.prototype, "shopCount", void 0);
38
+ __decorate([
39
+ (0, typegoose_1.prop)(),
40
+ __metadata("design:type", Date)
41
+ ], LimitedTimeOfferCampaignSession.prototype, "archivedAt", void 0);
42
+ exports.LimitedTimeOfferCampaignSession = LimitedTimeOfferCampaignSession = __decorate([
43
+ (0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'limitedTimeOfferCampaignSessions' } })
44
+ ], LimitedTimeOfferCampaignSession);
45
+ //# sourceMappingURL=limited-time-offer-campaign-session.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limited-time-offer-campaign-session.model.js","sourceRoot":"/","sources":["libraries/mongo/models/limited-time-offer-campaign-session.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAIxD,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAE3C,QAAQ,CAAgC;IAGxC,SAAS,CAAO;IAGhB,OAAO,CAAO;IAGd,SAAS,CAAS;IAGlB,UAAU,CAAO;CACjB,CAAA;AAfY,0EAA+B;AAE3C;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEAClB;AAGxC;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACd,IAAI;kEAAC;AAGhB;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAChB,IAAI;gEAAC;AAGd;IADC,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kEACH;AAGlB;IADC,IAAA,gBAAI,GAAE;8BACK,IAAI;mEAAC;0CAdL,+BAA+B;IAD3C,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,kCAAkC,EAAE,EAAE,CAAC;GACvE,+BAA+B,CAe3C","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { LimitedTimeOfferCampaign } from './limited-time-offer-campaign.model';\n\n@modelOptions({ schemaOptions: { collection: 'limitedTimeOfferCampaignSessions' } })\nexport class LimitedTimeOfferCampaignSession {\n\t@prop({ ref: 'LimitedTimeOfferCampaign', required: true })\n\tcampaign: Ref<LimitedTimeOfferCampaign>;\n\n\t@prop({ required: true })\n\tstartDate: Date;\n\n\t@prop({ required: true })\n\tendDate: Date;\n\n\t@prop({ default: 0 })\n\tshopCount: number;\n\n\t@prop()\n\tarchivedAt: Date;\n}\n"]}
@@ -10,4 +10,5 @@ export declare class LimitedTimeOfferCampaign {
10
10
  campaignType: MarketingType;
11
11
  discountOptions: number[];
12
12
  maxDiscountCaps: number[];
13
+ repeatDays: number[];
13
14
  }
@@ -23,6 +23,7 @@ let LimitedTimeOfferCampaign = class LimitedTimeOfferCampaign {
23
23
  campaignType;
24
24
  discountOptions;
25
25
  maxDiscountCaps;
26
+ repeatDays;
26
27
  };
27
28
  exports.LimitedTimeOfferCampaign = LimitedTimeOfferCampaign;
28
29
  __decorate([
@@ -65,6 +66,10 @@ __decorate([
65
66
  (0, typegoose_1.prop)({ type: () => [Number], default: [] }),
66
67
  __metadata("design:type", Array)
67
68
  ], LimitedTimeOfferCampaign.prototype, "maxDiscountCaps", void 0);
69
+ __decorate([
70
+ (0, typegoose_1.prop)({ type: () => [Number], default: [] }),
71
+ __metadata("design:type", Array)
72
+ ], LimitedTimeOfferCampaign.prototype, "repeatDays", void 0);
68
73
  exports.LimitedTimeOfferCampaign = LimitedTimeOfferCampaign = __decorate([
69
74
  (0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'limitedTimeOfferCampaigns' } })
70
75
  ], LimitedTimeOfferCampaign);
@@ -1 +1 @@
1
- {"version":3,"file":"limited-time-offer-campaign.model.js","sourceRoot":"/","sources":["libraries/mongo/models/limited-time-offer-campaign.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,kDAAwF;AAGjF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEpC,cAAc,CAAS;IAGvB,KAAK,CAAS;IAGd,QAAQ,CAAS;IAGjB,SAAS,CAAO;IAGhB,OAAO,CAAO;IAGd,MAAM,CAAiC;IAGvC,UAAU,CAAQ;IAGlB,YAAY,CAAgB;IAG5B,eAAe,CAAW;IAG1B,eAAe,CAAW;CAC1B,CAAA;AA9BY,4DAAwB;AAEpC;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACF;AAGvB;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACX;AAGd;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACR;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACd,IAAI;2DAAC;AAGhB;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAChB,IAAI;yDAAC;AAGd;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,qCAA8B,EAAE,OAAO,EAAE,qCAA8B,CAAC,SAAS,EAAE,CAAC;;wDAC3D;AAGvC;IADC,IAAA,gBAAI,GAAE;8BACM,IAAI;4DAAC;AAGlB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,oBAAa,EAAE,OAAO,EAAE,oBAAa,CAAC,QAAQ,EAAE,CAAC;;8DACnC;AAG5B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;iEAClB;AAG1B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;iEAClB;mCA7Bd,wBAAwB;IADpC,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,2BAA2B,EAAE,EAAE,CAAC;GAChE,wBAAwB,CA8BpC","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { LimitedTimeOfferCampaignStatus, MarketingType } from '../../../utilities/enum';\n\n@modelOptions({ schemaOptions: { collection: 'limitedTimeOfferCampaigns' } })\nexport class LimitedTimeOfferCampaign {\n\t@prop({ required: true })\n\tcampaignNumber: number;\n\n\t@prop({ required: true })\n\ttitle: string;\n\n\t@prop({ required: true })\n\tsubTitle: string;\n\n\t@prop({ required: true })\n\tstartDate: Date;\n\n\t@prop({ required: true })\n\tendDate: Date;\n\n\t@prop({ enum: LimitedTimeOfferCampaignStatus, default: LimitedTimeOfferCampaignStatus.SCHEDULED })\n\tstatus: LimitedTimeOfferCampaignStatus;\n\n\t@prop()\n\tarchivedAt?: Date; // set when status → EXPIRED or CANCELLED\n\n\t@prop({ enum: MarketingType, default: MarketingType.DISCOUNT })\n\tcampaignType: MarketingType;\n\n\t@prop({ type: () => [Number], default: [] })\n\tdiscountOptions: number[];\n\n\t@prop({ type: () => [Number], default: [] })\n\tmaxDiscountCaps: number[];\n}\n"]}
1
+ {"version":3,"file":"limited-time-offer-campaign.model.js","sourceRoot":"/","sources":["libraries/mongo/models/limited-time-offer-campaign.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,kDAAwF;AAGjF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEpC,cAAc,CAAS;IAGvB,KAAK,CAAS;IAGd,QAAQ,CAAS;IAGjB,SAAS,CAAO;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;4DACvB;mCAjCT,wBAAwB;IADpC,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,2BAA2B,EAAE,EAAE,CAAC;GAChE,wBAAwB,CAkCpC","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { LimitedTimeOfferCampaignStatus, MarketingType } from '../../../utilities/enum';\n\n@modelOptions({ schemaOptions: { collection: 'limitedTimeOfferCampaigns' } })\nexport class LimitedTimeOfferCampaign {\n\t@prop({ required: true })\n\tcampaignNumber: number;\n\n\t@prop({ required: true })\n\ttitle: string;\n\n\t@prop({ required: true })\n\tsubTitle: string;\n\n\t@prop({ required: true })\n\tstartDate: Date;\n\n\t@prop({ required: true })\n\tendDate: Date;\n\n\t@prop({ enum: LimitedTimeOfferCampaignStatus, default: LimitedTimeOfferCampaignStatus.SCHEDULED })\n\tstatus: LimitedTimeOfferCampaignStatus;\n\n\t@prop()\n\tarchivedAt?: Date; // set when status → EXPIRED or CANCELLED\n\n\t@prop({ enum: MarketingType, default: MarketingType.DISCOUNT })\n\tcampaignType: MarketingType;\n\n\t@prop({ type: () => [Number], default: [] })\n\tdiscountOptions: number[];\n\n\t@prop({ type: () => [Number], default: [] })\n\tmaxDiscountCaps: number[];\n\n\t// 0 = Sunday, 1 = Monday, … 6 = Saturday\n\t@prop({ type: () => [Number], default: [] })\n\trepeatDays: number[];\n}\n"]}
@@ -98,7 +98,7 @@ __decorate([
98
98
  __decorate([
99
99
  (0, typegoose_1.prop)({
100
100
  ref: () => vendor_model_1.Vendor,
101
- foreignField: 'parent',
101
+ foreignField: 'vendorParent',
102
102
  localField: '_id',
103
103
  count: true,
104
104
  match: { deletedAt: null },
@@ -1 +1 @@
1
- {"version":3,"file":"vendor-parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/vendor-parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA8E;AAC9E,4EAAqE;AACrE,kDAA2E;AAC3E,+CAAsC;AACtC,0DAAiD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AC1B;KACD,CAAC;IACD,IAAA,eAAG,EAAe,MAAM,EAAE,KAAK;QAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,cAAc,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,aAAa,CAAC,CAAC;QACjF,CAAC;IACF,CAAC,CAAC;GACW,YAAY,CAmDxB","sourcesContent":["import { modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CounterType, ServiceType, Status } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\nimport { Charge } from './embedded/charge.model';\nimport { ParentDocument } from './embedded/parent-document.model';\nimport { Address } from './shared/address.model';\nimport { Duration } from './shared/duration.model';\nimport { Vendor } from './vendor.model';\nimport { generateId } from '../../../utilities/id-generator';\nimport { CounterModel } from '.';\n\n@modelOptions({\n\tschemaOptions: { collection: 'vendorParents', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@pre<VendorParent>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.vendorParentId = await generateId(CounterModel, CounterType.VENDOR_PARENT);\n\t}\n})\nexport class VendorParent extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic vendorParentId?: string;\n\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic phoneNumber!: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic address!: Address;\n\n\t@prop({ required: true, type: Charge })\n\tpublic charge!: Charge;\n\n\t@prop({ required: true, type: String, enum: ServiceType })\n\tpublic serviceType!: ServiceType;\n\n\t@prop({ required: true, type: Duration })\n\tpublic commissionDuration!: Duration;\n\n\t@prop({ required: true, type: Boolean, default: true })\n\tpublic isServiceFeeCharged!: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic businessDevExecutive?: Ref<Admin>;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ ref: () => Admin })\n\tpublic accountManager?: Ref<Admin>;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: ParentDocument })\n\tpublic document?: ParentDocument;\n\n\t@prop({\n\t\tref: () => Vendor,\n\t\tforeignField: 'parent',\n\t\tlocalField: '_id',\n\t\tcount: true,\n\t\tmatch: { deletedAt: null },\n\t})\n\tpublic vendorCount?: number;\n}\n"]}
1
+ {"version":3,"file":"vendor-parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/vendor-parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA8E;AAC9E,4EAAqE;AACrE,kDAA2E;AAC3E,+CAAsC;AACtC,0DAAiD;AACjD,4EAAkE;AAClE,0DAAiD;AACjD,4DAAmD;AACnD,iDAAwC;AACxC,kEAA6D;AAC7D,wBAAiC;AAa1B,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,2BAAU;IAEpC,cAAc,CAAU;IAGxB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,OAAO,CAAW;IAGlB,MAAM,CAAU;IAGhB,WAAW,CAAe;IAG1B,kBAAkB,CAAY;IAG9B,mBAAmB,CAAW;IAG9B,oBAAoB,CAAc;IAGlC,MAAM,CAAU;IAGhB,cAAc,CAAc;IAG5B,YAAY,CAAU;IAGtB,QAAQ,CAAkB;IAS1B,WAAW,CAAU;CAC5B,CAAA;AAnDY,oCAAY;AAEjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;oDACnB;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SA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;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,sCAAc,EAAE,CAAC;8BACb,sCAAc;8CAAC;AAS1B;IAPN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM;QACjB,YAAY,EAAE,cAAc;QAC5B,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;KAC1B,CAAC;;iDAC0B;uBAlDhB,YAAY;IAXxB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QACxG,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;IACD,IAAA,eAAG,EAAe,MAAM,EAAE,KAAK;QAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,cAAc,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,aAAa,CAAC,CAAC;QACjF,CAAC;IACF,CAAC,CAAC;GACW,YAAY,CAmDxB","sourcesContent":["import { modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CounterType, ServiceType, Status } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\nimport { Charge } from './embedded/charge.model';\nimport { ParentDocument } from './embedded/parent-document.model';\nimport { Address } from './shared/address.model';\nimport { Duration } from './shared/duration.model';\nimport { Vendor } from './vendor.model';\nimport { generateId } from '../../../utilities/id-generator';\nimport { CounterModel } from '.';\n\n@modelOptions({\n\tschemaOptions: { collection: 'vendorParents', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@pre<VendorParent>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.vendorParentId = await generateId(CounterModel, CounterType.VENDOR_PARENT);\n\t}\n})\nexport class VendorParent extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic vendorParentId?: string;\n\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic phoneNumber!: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic address!: Address;\n\n\t@prop({ required: true, type: Charge })\n\tpublic charge!: Charge;\n\n\t@prop({ required: true, type: String, enum: ServiceType })\n\tpublic serviceType!: ServiceType;\n\n\t@prop({ required: true, type: Duration })\n\tpublic commissionDuration!: Duration;\n\n\t@prop({ required: true, type: Boolean, default: true })\n\tpublic isServiceFeeCharged!: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic businessDevExecutive?: Ref<Admin>;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ ref: () => Admin })\n\tpublic accountManager?: Ref<Admin>;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: ParentDocument })\n\tpublic document?: ParentDocument;\n\n\t@prop({\n\t\tref: () => Vendor,\n\t\tforeignField: 'vendorParent',\n\t\tlocalField: '_id',\n\t\tcount: true,\n\t\tmatch: { deletedAt: null },\n\t})\n\tpublic vendorCount?: number;\n}\n"]}
@@ -248,7 +248,7 @@ class UploadService {
248
248
  let fileType;
249
249
  try {
250
250
  const newFilename = this.generateFilename(originalFilename, '.webp');
251
- const quality = options?.quality ?? 80;
251
+ const quality = options?.quality ?? 90;
252
252
  fileType = (await file_type_1.default.fileTypeFromBuffer(buffer))?.ext;
253
253
  if (!fileType)
254
254
  throw new Error('Unable to detect image type');
@@ -256,7 +256,7 @@ class UploadService {
256
256
  const width = options?.width || metadata.width;
257
257
  const height = options?.height || metadata.height;
258
258
  const processedImage = (0, sharp_1.default)(buffer)
259
- .resize(width, height, { fit: 'inside' })
259
+ .resize({ width, height, fit: 'inside', withoutEnlargement: true })
260
260
  .webp({ quality });
261
261
  const file = this.bucket.file(newFilename);
262
262
  return await new Promise((resolve, reject) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/upload/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,kDAA0B;AAC1B,oDAA4B;AAC5B,gDAAwB;AACxB,uCAA2C;AAC3C,4DAA8B;AAC9B,0DAAiC;AACjC,sDAA6B;AAE7B,SAAS,QAAQ,CAAC,KAAa;IAC9B,OAAO,KAAK;SACV,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED,MAAa,aAAa;IACjB,MAAM,CAAC;IACE,WAAW,CAAC;IAE7B,YAAY,UAAmB;QAC9B,IAAI,CAAC,UAAU,EAAE,CAAC;YACjB,UAAU,GAAG,aAAa,CAAC;QAC5B,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,IAAA,oBAAY,GAAE,CAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxF,IAAI,CAAC,WAAW,GAAG,OAAO,GAAG,IAAA,oBAAY,GAAE,CAAC,uBAAuB,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACrF,CAAC;IAKO,gBAAgB,CAAC,gBAAwB,EAAE,SAAkB;QACpE,MAAM,cAAc,GAAG,cAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC;QACzD,MAAM,YAAY,GAAG,SAAS,IAAI,cAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QACjE,MAAM,SAAS,GAAG,IAAA,gBAAM,GAAE,CAAC,MAAM,CAAC,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AAC;YACnD,CAAC;iBAAM,CAAC;gBACP,OAAO,IAAI,CAAC,0BAA0B,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;YAC3E,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAC3D,CAAC;CACD;AA7YD,sCA6YC","sourcesContent":["import axios from 'axios';\nimport sharp from 'sharp';\nimport moment from 'moment';\nimport path from 'path';\nimport { getLibraries } from '../../index';\nimport mime from 'mime-types';\nimport FileType from 'file-type';\nimport pRetry from 'p-retry';\n\nfunction makeSlug(input: string): string {\n\treturn input\n\t\t.toLowerCase()\n\t\t.replace(/[^a-z0-9]+/g, '-')\n\t\t.replace(/(^-|-$)/g, '');\n}\n\nexport class UploadService {\n\tprivate bucket;\n\tprivate readonly websiteName;\n\n\tconstructor(bucketName?: string) {\n\t\tif (!bucketName) {\n\t\t\tbucketName = 'lyxa-global';\n\t\t}\n\n\t\tthis.bucket = getLibraries().getFirebaseService().superApp.storage().bucket(bucketName);\n\t\tthis.websiteName = 'lyxa-' + getLibraries().getConfigurationService().options.tenet;\n\t}\n\n\t/**\n\t * Generates a unique filename using the original filename.\n\t */\n\tprivate generateFilename(originalFilename: string, extension?: string): string {\n\t\tconst nameWithoutExt = path.parse(originalFilename).name;\n\t\tconst newExtension = extension || path.extname(originalFilename);\n\t\tconst timestamp = moment().format('DDMMYYHmmss');\n\t\tconst randomId = Math.floor(Math.random() * 100);\n\t\tconst baseName = `${makeSlug(nameWithoutExt)}-${this.websiteName}-${timestamp}-${randomId}`;\n\t\treturn baseName + newExtension;\n\t}\n\n\t/**\n\t * Uploads an image buffer after processing it with Sharp.\n\t * An optional destinationPath can be provided (e.g., 'images/product.jpg').\n\t */\n\tasync uploadImage(buffer: Buffer, originalFilename: string): Promise<{ filename: string; url: string }> {\n\t\tlet fileType: string | undefined;\n\n\t\ttry {\n\t\t\t// Detect actual file type\n\t\t\tfileType = (await FileType.fileTypeFromBuffer(buffer))?.ext;\n\t\t\tif (!fileType) throw new Error('Unable to detect image type');\n\n\t\t\tconst newFilename = this.generateFilename(originalFilename);\n\t\t\tconst extension = path.extname(newFilename).toLowerCase();\n\t\t\tlet processedImage: sharp.Sharp;\n\t\t\tlet contentType: string;\n\t\t\tif (extension === '.png') {\n\t\t\t\tprocessedImage = sharp(buffer).png({ quality: 80 });\n\t\t\t\tcontentType = 'image/png';\n\t\t\t} else if (extension === '.webp') {\n\t\t\t\tprocessedImage = sharp(buffer).webp({ quality: 80 });\n\t\t\t\tcontentType = 'image/webp';\n\t\t\t} else {\n\t\t\t\tprocessedImage = sharp(buffer).jpeg({ quality: 80 });\n\t\t\t\tcontentType = 'image/jpeg';\n\t\t\t}\n\n\t\t\tconst file = this.bucket.file(newFilename);\n\t\t\treturn await new Promise((resolve, reject) => {\n\t\t\t\tconst blobStream = file.createWriteStream({\n\t\t\t\t\tresumable: false,\n\t\t\t\t\tcontentType,\n\t\t\t\t});\n\n\t\t\t\tprocessedImage.on('error', (err: Error) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\n\t\t\t\tblobStream.on('error', (err: Error) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\n\t\t\t\tblobStream.on('finish', async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait file.makePublic();\n\t\t\t\t\t\tconst publicUrl = `https://storage.googleapis.com/${this.bucket.name}/${file.name}`;\n\t\t\t\t\t\tresolve({ filename: file.name, url: publicUrl });\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tprocessedImage.pipe(blobStream);\n\t\t\t});\n\t\t} catch (err: any) {\n\t\t\tconsole.error('Image upload failed:', err);\n\t\t\tif (fileType) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`${fileType.toUpperCase()} format not supported. Please use JPEG, PNG, or WebP format instead.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new Error(`Image upload failed: ${err.message}`);\n\t\t}\n\t}\n\n\t/**\n\t * Transcodes (resizes) an image buffer into multiple resolutions.\n\t * An optional destinationPrefix can be provided to force a specific path or filename base.\n\t *\n\t * For example, if destinationPrefix is 'images/product', then the original might be\n\t * uploaded as 'images/product.jpg' and the resized versions as 'images/product-480.jpg', etc.\n\t */\n\tasync transcodeImage(\n\t\tbuffer: Buffer,\n\t\toriginalFilename: string,\n\t\tresolutions: number[]\n\t): Promise<{\n\t\toriginalUrl: string;\n\t\tresizedResults: Array<{ resolution: number; url: string }>;\n\t}> {\n\t\tconst extension = path.extname(originalFilename);\n\t\tconst contentType = `image/${extension.replace('.', '') || 'jpeg'}`;\n\t\tconst timestamp = moment().format('DDMMYYHmmss');\n\t\tconst randomId = Math.floor(Math.random() * 100);\n\n\t\tconst baseFilename = `${makeSlug(path.parse(originalFilename).name)}-${this.websiteName}-${timestamp}-${randomId}`;\n\n\t\tconst originalFileName = `${baseFilename}${extension}`;\n\t\tconst originalUrl = await this.uploadBuffer(buffer, originalFileName, contentType);\n\n\t\tconst metadata = await sharp(buffer).metadata();\n\t\tconst isLandscape = metadata.width && metadata.height ? metadata.width > metadata.height : true;\n\n\t\tconst resizedResults = await Promise.all(\n\t\t\tresolutions.map(async resolution => {\n\t\t\t\tconst resizeOptions = isLandscape ? { width: resolution } : { height: resolution };\n\t\t\t\tconst formatKey = (extension.replace('.', '') || 'jpeg') as keyof sharp.FormatEnum;\n\t\t\t\tconst resizedBuffer = await sharp(buffer)\n\t\t\t\t\t.resize({\n\t\t\t\t\t\t...resizeOptions,\n\t\t\t\t\t\twithoutEnlargement: true,\n\t\t\t\t\t})\n\t\t\t\t\t.toFormat(formatKey, { quality: 80 })\n\t\t\t\t\t.toBuffer();\n\t\t\t\tconst resizedFilename = `${baseFilename}-${resolution}${extension}`;\n\t\t\t\tconst resizedUrl = await this.uploadBuffer(resizedBuffer, resizedFilename, contentType);\n\t\t\t\treturn { resolution, url: resizedUrl };\n\t\t\t})\n\t\t);\n\n\t\treturn { originalUrl, resizedResults };\n\t}\n\n\t/**\n\t * Helper function to upload a buffer to a specified filename.\n\t */\n\tprivate async uploadBuffer(buffer: Buffer, filename: string, contentType: string): Promise<string> {\n\t\tconst file = this.bucket.file(filename);\n\t\tawait file.save(buffer, {\n\t\t\tresumable: false,\n\t\t\tcontentType,\n\t\t});\n\t\tawait file.makePublic();\n\t\treturn `https://storage.googleapis.com/${this.bucket.name}/${file.name}`;\n\t}\n\n\tasync getListFiles(): Promise<Array<{ name: string; url: string }>> {\n\t\tconst [files] = await this.bucket.getFiles();\n\t\treturn files.map(file => ({\n\t\t\tname: file.name!,\n\t\t\turl: file.metadata.mediaLink!,\n\t\t}));\n\t}\n\n\tasync downloadFile(filename: string): Promise<Buffer> {\n\t\tconst file = this.bucket.file(filename);\n\t\tconst [buffer] = await file.download();\n\t\treturn buffer;\n\t}\n\n\tasync deleteFile(filename: string): Promise<void> {\n\t\tconst file = this.bucket.file(filename);\n\t\tconst [exists] = await file.exists();\n\t\tif (!exists) {\n\t\t\tthrow new Error('File does not exist.');\n\t\t}\n\t\tawait file.delete();\n\t}\n\n\tasync getPublicUrlFromFilename(filename: string): Promise<{ status: boolean; url: string }> {\n\t\tconst file = this.bucket.file(filename);\n\t\tconst [exists] = await file.exists();\n\n\t\tif (!exists) {\n\t\t\treturn { status: false, url: '' };\n\t\t}\n\n\t\treturn {\n\t\t\tstatus: true,\n\t\t\turl: `https://storage.googleapis.com/${this.bucket.name}/${filename}`,\n\t\t};\n\t}\n\n\tpublic extractFilenameFromUrl(url: string): string {\n\t\ttry {\n\t\t\tconst urlObj = new URL(url);\n\t\t\tconst pathParts = urlObj.pathname.split('/');\n\t\t\treturn decodeURIComponent(pathParts[pathParts.length - 1]);\n\t\t} catch (err) {\n\t\t\tthrow new Error(`Invalid URL: ${url}`);\n\t\t}\n\t}\n\n\tasync deleteFileByUrl(url: string): Promise<void> {\n\t\tconst filename = this.extractFilenameFromUrl(url);\n\t\tconst file = this.bucket.file(filename);\n\t\tconst [exists] = await file.exists();\n\t\tif (!exists) {\n\t\t\tthrow new Error('File does not exist.');\n\t\t}\n\t\tawait file.delete();\n\t}\n\n\tasync downloadImage(url: string, retryTimes = 0): Promise<Buffer> {\n\t\tconst attemptDownload = async (): Promise<Buffer> => {\n\t\t\tconst response = await axios.get(url, {\n\t\t\t\tresponseType: 'arraybuffer',\n\t\t\t\ttimeout: 10000,\n\t\t\t\tmaxRedirects: 3,\n\t\t\t\tvalidateStatus: status => status >= 200 && status < 400,\n\t\t\t});\n\t\t\treturn Buffer.from(response.data, 'binary');\n\t\t};\n\n\t\ttry {\n\t\t\tconst buffer = await pRetry(attemptDownload, {\n\t\t\t\tretries: retryTimes,\n\t\t\t\tfactor: 2,\n\t\t\t\tminTimeout: 1000,\n\t\t\t\tmaxTimeout: 5000,\n\t\t\t\trandomize: true, // adds jitter for better efficiency\n\t\t\t\tonFailedAttempt: (error: any) => {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`[downloadImage] Attempt ${error.attemptNumber} failed (${error.retriesLeft} retries left): ${error.message}`\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t});\n\n\t\t\treturn buffer;\n\t\t} catch (error: any) {\n\t\t\tif (axios.isAxiosError(error)) {\n\t\t\t\tconst status = error.response?.status;\n\t\t\t\tlet reason = 'Image download failed';\n\n\t\t\t\tswitch (status) {\n\t\t\t\t\tcase 403:\n\t\t\t\t\t\treason = 'Image URL is not valid or access forbidden (403)';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 404:\n\t\t\t\t\t\treason = 'Image not found (404)';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 429:\n\t\t\t\t\t\treason = 'Too many requests (429) — rate limited by server';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treason = status\n\t\t\t\t\t\t\t? `Image download failed with status ${status}`\n\t\t\t\t\t\t\t: `Network or unknown error: ${error.message}`;\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(reason);\n\t\t\t}\n\n\t\t\tthrow new Error(`Unexpected error downloading image: ${error.message}`);\n\t\t}\n\t}\n\n\t/**\n\t * Uploads a buffer to Google Cloud Storage and makes it public\n\t */\n\tprivate async uploadToGCS(\n\t\tbuffer: Buffer,\n\t\tfilename: string,\n\t\tcontentType: string\n\t): Promise<{ filename: string; url: string }> {\n\t\tconst file = this.bucket.file(filename);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// Create a write stream to upload the file\n\t\t\tconst blobStream = file.createWriteStream({\n\t\t\t\tresumable: false,\n\t\t\t\tcontentType,\n\t\t\t});\n\n\t\t\tblobStream.on('error', reject);\n\n\t\t\tblobStream.on('finish', async () => {\n\t\t\t\ttry {\n\t\t\t\t\t// Make the file publicly accessible\n\t\t\t\t\tawait file.makePublic();\n\t\t\t\t\tconst publicUrl = `https://storage.googleapis.com/${this.bucket.name}/${file.name}`;\n\t\t\t\t\tresolve({ filename: file.name, url: publicUrl });\n\t\t\t\t} catch (err) {\n\t\t\t\t\treject(err);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Start uploading the buffer\n\t\t\tblobStream.end(buffer);\n\t\t});\n\t}\n\n\t/**\n\t * Uploads and converts an image to WebP format, resizes if needed, and uploads to GCS\n\t */\n\tasync uploadProcessedImageToWebp(\n\t\tbuffer: Buffer,\n\t\toriginalFilename: string,\n\t\toptions?: { quality?: number; width?: number; height?: number }\n\t): Promise<{ filename: string; url: string }> {\n\t\tlet fileType: string | undefined;\n\n\t\ttry {\n\t\t\tconst newFilename = this.generateFilename(originalFilename, '.webp');\n\t\t\tconst quality = options?.quality ?? 80;\n\n\t\t\t// Detect actual file type\n\t\t\tfileType = (await FileType.fileTypeFromBuffer(buffer))?.ext;\n\t\t\tif (!fileType) throw new Error('Unable to detect image type');\n\n\t\t\t// Get original image dimensions if width or height is missing\n\t\t\tconst metadata = await sharp(buffer).metadata();\n\t\t\tconst width = options?.width || metadata.width;\n\t\t\tconst height = options?.height || metadata.height;\n\n\t\t\t// Convert to WebP and resize\n\t\t\tconst processedImage: sharp.Sharp = sharp(buffer)\n\t\t\t\t.resize(width, height, { fit: 'inside' })\n\t\t\t\t.webp({ quality });\n\n\t\t\tconst file = this.bucket.file(newFilename);\n\n\t\t\treturn await new Promise((resolve, reject) => {\n\t\t\t\tconst blobStream = file.createWriteStream({\n\t\t\t\t\tresumable: false,\n\t\t\t\t\tcontentType: 'image/webp',\n\t\t\t\t});\n\n\t\t\t\tprocessedImage.on('error', (err: Error) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\n\t\t\t\tblobStream.on('error', (err: Error) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\n\t\t\t\tblobStream.on('finish', async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait file.makePublic();\n\t\t\t\t\t\tconst publicUrl = `https://storage.googleapis.com/${this.bucket.name}/${file.name}`;\n\t\t\t\t\t\tresolve({ filename: file.name, url: publicUrl });\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tprocessedImage.pipe(blobStream);\n\t\t\t});\n\t\t} catch (err: any) {\n\t\t\tconsole.error('Processed image upload failed:', err);\n\t\t\tif (fileType) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`${fileType.toUpperCase()} format not supported. Please use JPEG, PNG, or WebP format instead.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new Error(`Processed image upload failed: ${err.message}`);\n\t\t}\n\t}\n\n\t/**\n\t * Uploads any supported file type to GCS and returns its public URL\n\t */\n\tasync uploadFile(\n\t\tbuffer: Buffer,\n\t\toriginalFilename: string,\n\t\toptions?: {\n\t\t\tquality?: number;\n\t\t\twidth?: number;\n\t\t\theight?: number;\n\t\t\twithExtension?: boolean;\n\t\t\twithOriginalFilename?: boolean;\n\t\t}\n\t): Promise<{ filename: string; url: string }> {\n\t\tconst newFilename = options?.withOriginalFilename\n\t\t\t? originalFilename\n\t\t\t: this.generateFilename(originalFilename);\n\t\tconst extension = path.extname(newFilename).toLowerCase();\n\n\t\t// Guess the MIME type using the mime-types library\n\t\tconst contentType = mime.lookup(extension) || 'application/octet-stream';\n\n\t\t// Special image handling (compression)\n\t\tif (contentType.startsWith('image/')) {\n\t\t\tif (options?.withExtension) {\n\t\t\t\treturn this.uploadImage(buffer, originalFilename);\n\t\t\t} else {\n\t\t\t\treturn this.uploadProcessedImageToWebp(buffer, originalFilename, options);\n\t\t\t}\n\t\t}\n\n\t\treturn this.uploadToGCS(buffer, newFilename, contentType);\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/upload/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,kDAA0B;AAC1B,oDAA4B;AAC5B,gDAAwB;AACxB,uCAA2C;AAC3C,4DAA8B;AAC9B,0DAAiC;AACjC,sDAA6B;AAE7B,SAAS,QAAQ,CAAC,KAAa;IAC9B,OAAO,KAAK;SACV,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED,MAAa,aAAa;IACjB,MAAM,CAAC;IACE,WAAW,CAAC;IAE7B,YAAY,UAAmB;QAC9B,IAAI,CAAC,UAAU,EAAE,CAAC;YACjB,UAAU,GAAG,aAAa,CAAC;QAC5B,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,IAAA,oBAAY,GAAE,CAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxF,IAAI,CAAC,WAAW,GAAG,OAAO,GAAG,IAAA,oBAAY,GAAE,CAAC,uBAAuB,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACrF,CAAC;IAKO,gBAAgB,CAAC,gBAAwB,EAAE,SAA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AG1D,MAAM,WAAW,GAAG,oBAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,0BAA0B,CAAC;QAGzE,IAAI,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtC,IAAI,OAAO,EAAE,aAAa,EAAE,CAAC;gBAC5B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YACnD,CAAC;iBAAM,CAAC;gBACP,OAAO,IAAI,CAAC,0BAA0B,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;YAC3E,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAC3D,CAAC;CACD;AA7YD,sCA6YC","sourcesContent":["import axios from 'axios';\nimport sharp from 'sharp';\nimport moment from 'moment';\nimport path from 'path';\nimport { getLibraries } from '../../index';\nimport mime from 'mime-types';\nimport FileType from 'file-type';\nimport pRetry from 'p-retry';\n\nfunction makeSlug(input: string): string {\n\treturn input\n\t\t.toLowerCase()\n\t\t.replace(/[^a-z0-9]+/g, '-')\n\t\t.replace(/(^-|-$)/g, '');\n}\n\nexport class UploadService {\n\tprivate bucket;\n\tprivate readonly websiteName;\n\n\tconstructor(bucketName?: string) {\n\t\tif (!bucketName) {\n\t\t\tbucketName = 'lyxa-global';\n\t\t}\n\n\t\tthis.bucket = getLibraries().getFirebaseService().superApp.storage().bucket(bucketName);\n\t\tthis.websiteName = 'lyxa-' + getLibraries().getConfigurationService().options.tenet;\n\t}\n\n\t/**\n\t * Generates a unique filename using the original filename.\n\t */\n\tprivate generateFilename(originalFilename: string, extension?: string): string {\n\t\tconst nameWithoutExt = path.parse(originalFilename).name;\n\t\tconst newExtension = extension || path.extname(originalFilename);\n\t\tconst timestamp = moment().format('DDMMYYHmmss');\n\t\tconst randomId = Math.floor(Math.random() * 100);\n\t\tconst baseName = `${makeSlug(nameWithoutExt)}-${this.websiteName}-${timestamp}-${randomId}`;\n\t\treturn baseName + newExtension;\n\t}\n\n\t/**\n\t * Uploads an image buffer after processing it with Sharp.\n\t * An optional destinationPath can be provided (e.g., 'images/product.jpg').\n\t */\n\tasync uploadImage(buffer: Buffer, originalFilename: string): Promise<{ filename: string; url: string }> {\n\t\tlet fileType: string | undefined;\n\n\t\ttry {\n\t\t\t// Detect actual file type\n\t\t\tfileType = (await FileType.fileTypeFromBuffer(buffer))?.ext;\n\t\t\tif (!fileType) throw new Error('Unable to detect image type');\n\n\t\t\tconst newFilename = this.generateFilename(originalFilename);\n\t\t\tconst extension = path.extname(newFilename).toLowerCase();\n\t\t\tlet processedImage: sharp.Sharp;\n\t\t\tlet contentType: string;\n\t\t\tif (extension === '.png') {\n\t\t\t\tprocessedImage = sharp(buffer).png({ quality: 80 });\n\t\t\t\tcontentType = 'image/png';\n\t\t\t} else if (extension === '.webp') {\n\t\t\t\tprocessedImage = sharp(buffer).webp({ quality: 80 });\n\t\t\t\tcontentType = 'image/webp';\n\t\t\t} else {\n\t\t\t\tprocessedImage = sharp(buffer).jpeg({ quality: 80 });\n\t\t\t\tcontentType = 'image/jpeg';\n\t\t\t}\n\n\t\t\tconst file = this.bucket.file(newFilename);\n\t\t\treturn await new Promise((resolve, reject) => {\n\t\t\t\tconst blobStream = file.createWriteStream({\n\t\t\t\t\tresumable: false,\n\t\t\t\t\tcontentType,\n\t\t\t\t});\n\n\t\t\t\tprocessedImage.on('error', (err: Error) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\n\t\t\t\tblobStream.on('error', (err: Error) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\n\t\t\t\tblobStream.on('finish', async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait file.makePublic();\n\t\t\t\t\t\tconst publicUrl = `https://storage.googleapis.com/${this.bucket.name}/${file.name}`;\n\t\t\t\t\t\tresolve({ filename: file.name, url: publicUrl });\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tprocessedImage.pipe(blobStream);\n\t\t\t});\n\t\t} catch (err: any) {\n\t\t\tconsole.error('Image upload failed:', err);\n\t\t\tif (fileType) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`${fileType.toUpperCase()} format not supported. Please use JPEG, PNG, or WebP format instead.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new Error(`Image upload failed: ${err.message}`);\n\t\t}\n\t}\n\n\t/**\n\t * Transcodes (resizes) an image buffer into multiple resolutions.\n\t * An optional destinationPrefix can be provided to force a specific path or filename base.\n\t *\n\t * For example, if destinationPrefix is 'images/product', then the original might be\n\t * uploaded as 'images/product.jpg' and the resized versions as 'images/product-480.jpg', etc.\n\t */\n\tasync transcodeImage(\n\t\tbuffer: Buffer,\n\t\toriginalFilename: string,\n\t\tresolutions: number[]\n\t): Promise<{\n\t\toriginalUrl: string;\n\t\tresizedResults: Array<{ resolution: number; url: string }>;\n\t}> {\n\t\tconst extension = path.extname(originalFilename);\n\t\tconst contentType = `image/${extension.replace('.', '') || 'jpeg'}`;\n\t\tconst timestamp = moment().format('DDMMYYHmmss');\n\t\tconst randomId = Math.floor(Math.random() * 100);\n\n\t\tconst baseFilename = `${makeSlug(path.parse(originalFilename).name)}-${this.websiteName}-${timestamp}-${randomId}`;\n\n\t\tconst originalFileName = `${baseFilename}${extension}`;\n\t\tconst originalUrl = await this.uploadBuffer(buffer, originalFileName, contentType);\n\n\t\tconst metadata = await sharp(buffer).metadata();\n\t\tconst isLandscape = metadata.width && metadata.height ? metadata.width > metadata.height : true;\n\n\t\tconst resizedResults = await Promise.all(\n\t\t\tresolutions.map(async resolution => {\n\t\t\t\tconst resizeOptions = isLandscape ? { width: resolution } : { height: resolution };\n\t\t\t\tconst formatKey = (extension.replace('.', '') || 'jpeg') as keyof sharp.FormatEnum;\n\t\t\t\tconst resizedBuffer = await sharp(buffer)\n\t\t\t\t\t.resize({\n\t\t\t\t\t\t...resizeOptions,\n\t\t\t\t\t\twithoutEnlargement: true,\n\t\t\t\t\t})\n\t\t\t\t\t.toFormat(formatKey, { quality: 80 })\n\t\t\t\t\t.toBuffer();\n\t\t\t\tconst resizedFilename = `${baseFilename}-${resolution}${extension}`;\n\t\t\t\tconst resizedUrl = await this.uploadBuffer(resizedBuffer, resizedFilename, contentType);\n\t\t\t\treturn { resolution, url: resizedUrl };\n\t\t\t})\n\t\t);\n\n\t\treturn { originalUrl, resizedResults };\n\t}\n\n\t/**\n\t * Helper function to upload a buffer to a specified filename.\n\t */\n\tprivate async uploadBuffer(buffer: Buffer, filename: string, contentType: string): Promise<string> {\n\t\tconst file = this.bucket.file(filename);\n\t\tawait file.save(buffer, {\n\t\t\tresumable: false,\n\t\t\tcontentType,\n\t\t});\n\t\tawait file.makePublic();\n\t\treturn `https://storage.googleapis.com/${this.bucket.name}/${file.name}`;\n\t}\n\n\tasync getListFiles(): Promise<Array<{ name: string; url: string }>> {\n\t\tconst [files] = await this.bucket.getFiles();\n\t\treturn files.map(file => ({\n\t\t\tname: file.name!,\n\t\t\turl: file.metadata.mediaLink!,\n\t\t}));\n\t}\n\n\tasync downloadFile(filename: string): Promise<Buffer> {\n\t\tconst file = this.bucket.file(filename);\n\t\tconst [buffer] = await file.download();\n\t\treturn buffer;\n\t}\n\n\tasync deleteFile(filename: string): Promise<void> {\n\t\tconst file = this.bucket.file(filename);\n\t\tconst [exists] = await file.exists();\n\t\tif (!exists) {\n\t\t\tthrow new Error('File does not exist.');\n\t\t}\n\t\tawait file.delete();\n\t}\n\n\tasync getPublicUrlFromFilename(filename: string): Promise<{ status: boolean; url: string }> {\n\t\tconst file = this.bucket.file(filename);\n\t\tconst [exists] = await file.exists();\n\n\t\tif (!exists) {\n\t\t\treturn { status: false, url: '' };\n\t\t}\n\n\t\treturn {\n\t\t\tstatus: true,\n\t\t\turl: `https://storage.googleapis.com/${this.bucket.name}/${filename}`,\n\t\t};\n\t}\n\n\tpublic extractFilenameFromUrl(url: string): string {\n\t\ttry {\n\t\t\tconst urlObj = new URL(url);\n\t\t\tconst pathParts = urlObj.pathname.split('/');\n\t\t\treturn decodeURIComponent(pathParts[pathParts.length - 1]);\n\t\t} catch (err) {\n\t\t\tthrow new Error(`Invalid URL: ${url}`);\n\t\t}\n\t}\n\n\tasync deleteFileByUrl(url: string): Promise<void> {\n\t\tconst filename = this.extractFilenameFromUrl(url);\n\t\tconst file = this.bucket.file(filename);\n\t\tconst [exists] = await file.exists();\n\t\tif (!exists) {\n\t\t\tthrow new Error('File does not exist.');\n\t\t}\n\t\tawait file.delete();\n\t}\n\n\tasync downloadImage(url: string, retryTimes = 0): Promise<Buffer> {\n\t\tconst attemptDownload = async (): Promise<Buffer> => {\n\t\t\tconst response = await axios.get(url, {\n\t\t\t\tresponseType: 'arraybuffer',\n\t\t\t\ttimeout: 10000,\n\t\t\t\tmaxRedirects: 3,\n\t\t\t\tvalidateStatus: status => status >= 200 && status < 400,\n\t\t\t});\n\t\t\treturn Buffer.from(response.data, 'binary');\n\t\t};\n\n\t\ttry {\n\t\t\tconst buffer = await pRetry(attemptDownload, {\n\t\t\t\tretries: retryTimes,\n\t\t\t\tfactor: 2,\n\t\t\t\tminTimeout: 1000,\n\t\t\t\tmaxTimeout: 5000,\n\t\t\t\trandomize: true, // adds jitter for better efficiency\n\t\t\t\tonFailedAttempt: (error: any) => {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`[downloadImage] Attempt ${error.attemptNumber} failed (${error.retriesLeft} retries left): ${error.message}`\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t});\n\n\t\t\treturn buffer;\n\t\t} catch (error: any) {\n\t\t\tif (axios.isAxiosError(error)) {\n\t\t\t\tconst status = error.response?.status;\n\t\t\t\tlet reason = 'Image download failed';\n\n\t\t\t\tswitch (status) {\n\t\t\t\t\tcase 403:\n\t\t\t\t\t\treason = 'Image URL is not valid or access forbidden (403)';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 404:\n\t\t\t\t\t\treason = 'Image not found (404)';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 429:\n\t\t\t\t\t\treason = 'Too many requests (429) — rate limited by server';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treason = status\n\t\t\t\t\t\t\t? `Image download failed with status ${status}`\n\t\t\t\t\t\t\t: `Network or unknown error: ${error.message}`;\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(reason);\n\t\t\t}\n\n\t\t\tthrow new Error(`Unexpected error downloading image: ${error.message}`);\n\t\t}\n\t}\n\n\t/**\n\t * Uploads a buffer to Google Cloud Storage and makes it public\n\t */\n\tprivate async uploadToGCS(\n\t\tbuffer: Buffer,\n\t\tfilename: string,\n\t\tcontentType: string\n\t): Promise<{ filename: string; url: string }> {\n\t\tconst file = this.bucket.file(filename);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// Create a write stream to upload the file\n\t\t\tconst blobStream = file.createWriteStream({\n\t\t\t\tresumable: false,\n\t\t\t\tcontentType,\n\t\t\t});\n\n\t\t\tblobStream.on('error', reject);\n\n\t\t\tblobStream.on('finish', async () => {\n\t\t\t\ttry {\n\t\t\t\t\t// Make the file publicly accessible\n\t\t\t\t\tawait file.makePublic();\n\t\t\t\t\tconst publicUrl = `https://storage.googleapis.com/${this.bucket.name}/${file.name}`;\n\t\t\t\t\tresolve({ filename: file.name, url: publicUrl });\n\t\t\t\t} catch (err) {\n\t\t\t\t\treject(err);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Start uploading the buffer\n\t\t\tblobStream.end(buffer);\n\t\t});\n\t}\n\n\t/**\n\t * Uploads and converts an image to WebP format, resizes if needed, and uploads to GCS\n\t */\n\tasync uploadProcessedImageToWebp(\n\t\tbuffer: Buffer,\n\t\toriginalFilename: string,\n\t\toptions?: { quality?: number; width?: number; height?: number }\n\t): Promise<{ filename: string; url: string }> {\n\t\tlet fileType: string | undefined;\n\n\t\ttry {\n\t\t\tconst newFilename = this.generateFilename(originalFilename, '.webp');\n\t\t\tconst quality = options?.quality ?? 90;\n\n\t\t\t// Detect actual file type\n\t\t\tfileType = (await FileType.fileTypeFromBuffer(buffer))?.ext;\n\t\t\tif (!fileType) throw new Error('Unable to detect image type');\n\n\t\t\t// Get original image dimensions if width or height is missing\n\t\t\tconst metadata = await sharp(buffer).metadata();\n\t\t\tconst width = options?.width || metadata.width;\n\t\t\tconst height = options?.height || metadata.height;\n\n\t\t\t// Convert to WebP and resize\n\t\t\tconst processedImage: sharp.Sharp = sharp(buffer)\n\t\t\t\t.resize({ width, height, fit: 'inside', withoutEnlargement: true })\n\t\t\t\t.webp({ quality });\n\n\t\t\tconst file = this.bucket.file(newFilename);\n\n\t\t\treturn await new Promise((resolve, reject) => {\n\t\t\t\tconst blobStream = file.createWriteStream({\n\t\t\t\t\tresumable: false,\n\t\t\t\t\tcontentType: 'image/webp',\n\t\t\t\t});\n\n\t\t\t\tprocessedImage.on('error', (err: Error) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\n\t\t\t\tblobStream.on('error', (err: Error) => {\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\n\t\t\t\tblobStream.on('finish', async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait file.makePublic();\n\t\t\t\t\t\tconst publicUrl = `https://storage.googleapis.com/${this.bucket.name}/${file.name}`;\n\t\t\t\t\t\tresolve({ filename: file.name, url: publicUrl });\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tprocessedImage.pipe(blobStream);\n\t\t\t});\n\t\t} catch (err: any) {\n\t\t\tconsole.error('Processed image upload failed:', err);\n\t\t\tif (fileType) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`${fileType.toUpperCase()} format not supported. Please use JPEG, PNG, or WebP format instead.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new Error(`Processed image upload failed: ${err.message}`);\n\t\t}\n\t}\n\n\t/**\n\t * Uploads any supported file type to GCS and returns its public URL\n\t */\n\tasync uploadFile(\n\t\tbuffer: Buffer,\n\t\toriginalFilename: string,\n\t\toptions?: {\n\t\t\tquality?: number;\n\t\t\twidth?: number;\n\t\t\theight?: number;\n\t\t\twithExtension?: boolean;\n\t\t\twithOriginalFilename?: boolean;\n\t\t}\n\t): Promise<{ filename: string; url: string }> {\n\t\tconst newFilename = options?.withOriginalFilename\n\t\t\t? originalFilename\n\t\t\t: this.generateFilename(originalFilename);\n\t\tconst extension = path.extname(newFilename).toLowerCase();\n\n\t\t// Guess the MIME type using the mime-types library\n\t\tconst contentType = mime.lookup(extension) || 'application/octet-stream';\n\n\t\t// Special image handling (compression)\n\t\tif (contentType.startsWith('image/')) {\n\t\t\tif (options?.withExtension) {\n\t\t\t\treturn this.uploadImage(buffer, originalFilename);\n\t\t\t} else {\n\t\t\t\treturn this.uploadProcessedImageToWebp(buffer, originalFilename, options);\n\t\t\t}\n\t\t}\n\n\t\treturn this.uploadToGCS(buffer, newFilename, contentType);\n\t}\n}\n"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.4.225
25
+ Version: 1.4.227
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.225",
3
+ "version": "1.4.227",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.4.225",
3
+ "version": "1.4.227",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",