@lyxa.ai/core 1.0.184 → 1.0.185-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libraries/dispatcher/index.d.ts +2 -1
- package/dist/libraries/dispatcher/index.js +2 -1
- package/dist/libraries/dispatcher/index.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +3 -0
- package/dist/libraries/mongo/models/index.js +4 -1
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/trpc/context.d.ts +13 -12
- package/dist/libraries/trpc/context.js +4 -2
- package/dist/libraries/trpc/context.js.map +1 -1
- package/dist/libraries/trpc/index.d.ts +49 -153
- package/dist/libraries/trpc/index.js +7 -1
- package/dist/libraries/trpc/index.js.map +1 -1
- package/dist/libraries/trpc/middlewares/auth.d.ts +9 -32
- package/dist/libraries/trpc/middlewares/auth.js +7 -3
- package/dist/libraries/trpc/middlewares/auth.js.map +1 -1
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +9 -32
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +9 -32
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +7 -3
|
@@ -5,5 +5,6 @@ export declare class MicroServiceDispatcher {
|
|
|
5
5
|
constructor(secretService: SecretManagerService);
|
|
6
6
|
getMicroService<T extends AnyRouter>(serviceName: string, customURL?: string, options?: {
|
|
7
7
|
headers?: Record<string, string>;
|
|
8
|
-
|
|
8
|
+
transformer?: any;
|
|
9
|
+
}): Promise<import("@trpc/client").TRPCClient<T>>;
|
|
9
10
|
}
|
|
@@ -25,11 +25,12 @@ let MicroServiceDispatcher = class MicroServiceDispatcher {
|
|
|
25
25
|
if (!deploymentURL) {
|
|
26
26
|
throw new Error('The requested service does not have a configured secret URL');
|
|
27
27
|
}
|
|
28
|
-
return (0, client_1.
|
|
28
|
+
return (0, client_1.createTRPCClient)({
|
|
29
29
|
links: [
|
|
30
30
|
(0, client_1.httpBatchLink)({
|
|
31
31
|
url: deploymentURL,
|
|
32
32
|
headers: async () => options?.headers ?? {},
|
|
33
|
+
transformer: options?.transformer,
|
|
33
34
|
}),
|
|
34
35
|
],
|
|
35
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/dispatcher/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/dispatcher/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAiC;AACjC,yCAA+D;AAE/D,wCAAkD;AAG3C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC1B,cAAc,CAAuB;IAE7C,YAAY,aAAmC;QAC9C,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,eAAe,CAC3B,WAAmB,EACnB,SAAkB,EAClB,OAGC;QAED,MAAM,aAAa,GAClB,SAAS;YACT,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAChC,2BAA2B,GAAG,WAAW,CAAC,WAAW,EAAE,GAAG,WAAW,CACrE,CAAC,CAAC;QAEJ,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;QAE9C,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QAChF,CAAC;QAED,OAAO,IAAA,yBAAgB,EAAI;YAC1B,KAAK,EAAE;gBACN,IAAA,sBAAa,EAAC;oBACb,GAAG,EAAE,aAAa;oBAClB,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE;oBAC3C,WAAW,EAAE,OAAO,EAAE,WAAW;iBACjC,CAAC;aACF;SAED,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAtCY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,gBAAO,GAAE;qCAIkB,8BAAoB;GAHnC,sBAAsB,CAsClC","sourcesContent":["import { Service } from 'typedi';\nimport { createTRPCClient, httpBatchLink } from '@trpc/client';\nimport { AnyRouter } from '@trpc/server';\nimport { SecretManagerService } from '../secrets';\n\n@Service()\nexport class MicroServiceDispatcher {\n\tprivate _secretService: SecretManagerService;\n\n\tconstructor(secretService: SecretManagerService) {\n\t\tthis._secretService = secretService;\n\t}\n\n\tpublic async getMicroService<T extends AnyRouter>(\n\t\tserviceName: string,\n\t\tcustomURL?: string,\n\t\toptions?: {\n\t\t\theaders?: Record<string, string>;\n\t\t\ttransformer?: any;\n\t\t}\n\t) {\n\t\tconst deploymentURL =\n\t\t\tcustomURL ??\n\t\t\t(await this._secretService.getKey(\n\t\t\t\t'DEPLOYMENTS_MICROSERVICE_' + serviceName.toUpperCase() + '_ENDPOINT'\n\t\t\t));\n\n\t\tconsole.log(deploymentURL, 'deploymentURL--');\n\n\t\tif (!deploymentURL) {\n\t\t\tthrow new Error('The requested service does not have a configured secret URL');\n\t\t}\n\n\t\treturn createTRPCClient<T>({\n\t\t\tlinks: [\n\t\t\t\thttpBatchLink({\n\t\t\t\t\turl: deploymentURL,\n\t\t\t\t\theaders: async () => options?.headers ?? {},\n\t\t\t\t\ttransformer: options?.transformer,\n\t\t\t\t}),\n\t\t\t],\n\t\t\t//special http request header that has a token\n\t\t});\n\t}\n}\n"]}
|
|
@@ -97,6 +97,7 @@ import { ServiceOrder } from './service-order.model';
|
|
|
97
97
|
import { TeamMemberReview } from './team-member-review.model';
|
|
98
98
|
import { TeamMemberBlockedTime } from './team-member-blocked-time';
|
|
99
99
|
import { Service } from './service.model';
|
|
100
|
+
import { TicketAction } from './ticket-action.model';
|
|
100
101
|
export declare const ActivityLogModel: ReturnModelType<typeof ActivityLog>;
|
|
101
102
|
export * from './activity-log.model';
|
|
102
103
|
export declare const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl>;
|
|
@@ -297,3 +298,5 @@ export declare const TeamMemberReviewModel: ReturnModelType<typeof TeamMemberRev
|
|
|
297
298
|
export * from './team-member-review.model';
|
|
298
299
|
export declare const TeamMemberBlockedTimeModel: ReturnModelType<typeof TeamMemberBlockedTime>;
|
|
299
300
|
export * from './team-member-blocked-time';
|
|
301
|
+
export declare const TicketActionModel: ReturnModelType<typeof TicketAction>;
|
|
302
|
+
export * from './ticket-action.model';
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ProductMarketingModel = exports.RiderPayoutModel = exports.ShopPayoutModel = exports.PayoutModel = exports.ParentModel = exports.OrderDeliveryModel = exports.CourierOrderModel = exports.RegularOrderModel = exports.OrderModel = exports.NutritionModel = exports.NotificationModel = exports.MealPlanModel = exports.PunchMarketingModel = exports.LoyaltyPointMarketingModel = exports.FreeDeliveryMarketingModel = exports.FeaturedMarketingModel = exports.DiscountMarketingModel = exports.Buy1Get1MarketingModel = exports.MarketingModel = exports.LoyaltyPointSettingModel = exports.LoyaltyPointCategoryModel = exports.ListContainerModel = exports.LineItemModel = exports.GalleryModel = exports.FinanceSettlementModel = exports.FilterContainerModel = exports.FeaturedSettingModel = exports.FavouriteModel = exports.FaqModel = exports.DishModel = exports.DealSettingModel = exports.ReferralRewardCouponModel = exports.ReferralCodeCouponModel = exports.IndividualUserCouponModel = exports.IndividualStoreCouponModel = exports.GlobalCouponModel = exports.CustomCouponModel = exports.CouponModel = exports.CounterModel = exports.CategoryModel = exports.CartParticipantModel = exports.CartModel = exports.BrandModel = exports.BOBFinanceModel = exports.BannerModel = exports.AttributeModel = exports.UserAppSectionSettingModel = exports.AdminModel = exports.AdminAccessControlModel = exports.ActivityLogModel = void 0;
|
|
18
|
-
exports.TeamMemberBlockedTimeModel = exports.TeamMemberReviewModel = exports.ServiceOrderModel = exports.TeamMemberModel = exports.ServicePackageModel = exports.ServiceCategoryModel = exports.VendorAccessControlModel = exports.VendorModel = exports.ServiceParentModel = exports.ServiceModel = exports.ChatroomModel = exports.AgentPerformanceModel = exports.MessageModel = exports.TicketModel = exports.RewardModel = exports.CancellationReasonModel = exports.SupportReasonModel = exports.TermsAndConditionsModel = exports.DefaultChatModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopReviewModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.RiderReviewModel = exports.RequestAreaModel = exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductModel = void 0;
|
|
18
|
+
exports.TicketActionModel = exports.TeamMemberBlockedTimeModel = exports.TeamMemberReviewModel = exports.ServiceOrderModel = exports.TeamMemberModel = exports.ServicePackageModel = exports.ServiceCategoryModel = exports.VendorAccessControlModel = exports.VendorModel = exports.ServiceParentModel = exports.ServiceModel = exports.ChatroomModel = exports.AgentPerformanceModel = exports.MessageModel = exports.TicketModel = exports.RewardModel = exports.CancellationReasonModel = exports.SupportReasonModel = exports.TermsAndConditionsModel = exports.DefaultChatModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopReviewModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.RiderReviewModel = exports.RequestAreaModel = exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductModel = void 0;
|
|
19
19
|
exports.getCardModel = getCardModel;
|
|
20
20
|
exports.getAreebaCardModel = getAreebaCardModel;
|
|
21
21
|
exports.getCoreAuthIdentityModel = getCoreAuthIdentityModel;
|
|
@@ -127,6 +127,7 @@ const service_order_model_1 = require("./service-order.model");
|
|
|
127
127
|
const team_member_review_model_1 = require("./team-member-review.model");
|
|
128
128
|
const team_member_blocked_time_1 = require("./team-member-blocked-time");
|
|
129
129
|
const service_model_1 = require("./service.model");
|
|
130
|
+
const ticket_action_model_1 = require("./ticket-action.model");
|
|
130
131
|
exports.ActivityLogModel = (0, typegoose_1.getModelForClass)(activity_log_model_1.ActivityLog);
|
|
131
132
|
__exportStar(require("./activity-log.model"), exports);
|
|
132
133
|
exports.AdminAccessControlModel = (0, typegoose_1.getModelForClass)(admin_access_control_model_1.AdminAccessControl);
|
|
@@ -384,4 +385,6 @@ exports.TeamMemberReviewModel = (0, typegoose_1.getModelForClass)(team_member_re
|
|
|
384
385
|
__exportStar(require("./team-member-review.model"), exports);
|
|
385
386
|
exports.TeamMemberBlockedTimeModel = (0, typegoose_1.getModelForClass)(team_member_blocked_time_1.TeamMemberBlockedTime);
|
|
386
387
|
__exportStar(require("./team-member-blocked-time"), exports);
|
|
388
|
+
exports.TicketActionModel = (0, typegoose_1.getModelForClass)(ticket_action_model_1.TicketAction);
|
|
389
|
+
__exportStar(require("./ticket-action.model"), exports);
|
|
387
390
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAsJA,oCAGC;AAED,gDAGC;AAED,4DAGC;AAED,sEAGC;AAED,sEAGC;AAED,wEAGC;AAED,sEAGC;AAED,4CAGC;AAED,oCAGC;AAGD,wDA8CC;AAlPD,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,qFAAyE;AACzE,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uD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AAElB,QAAA,YAAY,GAAoC,IAAA,4BAAgB,EAAC,uBAAO,CAAC,CAAC;AACvF,kDAAgC;AAEnB,QAAA,qBAAqB,GACjC,IAAA,4BAAgB,EAAC,0CAAgB,CAAC,CAAC;AACpC,4DAA0C;AAE7B,QAAA,aAAa,GAAqC,IAAA,4BAAgB,EAAC,0BAAQ,CAAC,CAAC;AAC1F,oDAAkC;AAElC,oEAAkD;AAErC,QAAA,YAAY,GAAoC,IAAA,4BAAgB,EAAC,uBAAO,CAAC,CAAC;AACvF,kDAA+B;AAElB,QAAA,kBAAkB,GAA0C,IAAA,4BAAgB,EAAC,oCAAa,CAAC,CAAC;AACzG,yDAAuC;AAE1B,QAAA,WAAW,GAAmC,IAAA,4BAAgB,EAAC,qBAAM,CAAC,CAAC;AACpF,iDAA+B;AAElB,QAAA,wBAAwB,GAAgD,IAAA,4BAAgB,EAAC,iDAAmB,CAAC,CAAC;AAC3H,gEAA8C;AAEjC,QAAA,oBAAoB,GAA4C,IAAA,4BAAgB,EAAC,wCAAe,CAAC,CAAC;AAC/G,2DAAyC;AAE5B,QAAA,mBAAmB,GAA2C,IAAA,4BAAgB,EAAC,sCAAc,CAAC,CAAC;AAC5G,0DAAwC;AAE3B,QAAA,eAAe,GAAuC,IAAA,4BAAgB,EAAC,8BAAU,CAAC,CAAA;AAC/F,sDAAmC;AAEtB,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,kCAAY,CAAC,CAAA;AACrG,wDAAqC;AAExB,QAAA,qBAAqB,GAA6C,IAAA,4BAAgB,EAAC,2CAAgB,CAAC,CAAA;AACjH,6DAA0C;AAE7B,QAAA,0BAA0B,GAAkD,IAAA,4BAAgB,EAAC,gDAAqB,CAAC,CAAA;AAChI,6DAA0C","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 { UserAppSectionSetting } from './user-app-section-setting.model';\nimport { Attribute } from './attribute.model';\nimport { Banner } from './banner.model';\nimport { BOBFinance } from './bob-finance.model';\nimport { Brand } from './brand.model';\nimport { Category } from './category.model';\nimport { Counter } from './counter.model';\nimport { Coupon } from './coupon.model';\nimport { DealSetting } from './deal-setting.model';\nimport { Dish } from './dish.model';\nimport { Faq } from './faq.model';\nimport { Favourite } from './favourite.model';\nimport { FeaturedSetting } from './featured-setting.model';\nimport { FilterContainer } from './filter-container.model';\nimport { ListContainer } from './list-container.model';\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\nimport { LoyaltyPointSetting } from './loyalty-point-setting.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 { RiderReview } from './rider-review.model';\nimport { Role } from './role.model';\nimport { Setting } from './setting.model';\nimport { ShopAccessControl } from './shop-access-control.model';\nimport { ShopCategory } from './shop-category.model';\nimport { ShopMealPlan } from './shop-meal-plan.model';\nimport { ShopReview } from './shop-review.model';\nimport { Shop } from './shop.model';\nimport { SubscriptionSetting } from './subscription-setting.model';\nimport { Subscription } from './subscription.model';\nimport { Tag } from './tag.model';\nimport { Zone } from './zone.model';\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\nimport {\n\tCardType,\n\tCoreAuthIdentityType,\n\tCouponType,\n\tMarketingType,\n\tOrderType,\n\tPayoutType,\n} from '../../../utilities/enum';\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 { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model';\nimport { PunchMarketing } from './providers/punch-marketing.model';\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\nimport { Notification } from './notification.model';\nimport { CoreAuthIdentity } from './core-auth-identity.model';\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\nimport { CoreUser } from './core-user.model';\nimport { Card } from './card.model';\nimport { AreebaCard } from './providers/areeba-card.model';\nimport { RiderTracking } from './rider-tracking.model';\nimport { Rider } from './rider.model';\nimport { RiderTimeout } from './rider-timeout.model';\nimport { User } from './user.model';\nimport { Cart } from './cart.model';\nimport { LineItem } from './line-item.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { Gallery } from './gallery.model';\nimport { Order } from './order.model';\nimport { RegularOrder } from './providers/regular-order.model';\nimport { CourierOrder } from './providers/courier-order.model';\nimport { OrderDelivery } from './order-delivery.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 { ServiceParent } from './service-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 { TeamMember } from './team-member.model';\nimport { ServiceOrder } from './service-order.model';\nimport { TeamMemberReview } from './team-member-review.model';\nimport { TeamMemberBlockedTime } from './team-member-blocked-time';\nimport { Service } from './service.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\n// Global models - will be set after initGlobalConnection()\nlet actualCardModel: ReturnModelType<typeof Card> | null = null;\nlet actualCoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> | null = null;\nlet actualCoreUserModel: ReturnModelType<typeof CoreUser> | null = null;\nlet actualRoleModel: ReturnModelType<typeof Role> | null = null;\n\n// Global discriminator models - will be set after initGlobalConnection()\nlet actualAreebaCardModel: ReturnModelType<typeof AreebaCard> | null = null;\nlet actualCoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> | null = null;\nlet actualCorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> | null = null;\nlet actualCoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> | null = null;\nlet actualCoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> | null = null;\n\n// Export getter functions for global models\nexport function getCardModel(): ReturnModelType<typeof Card> {\n\tif (!actualCardModel) throw new Error('Card model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCardModel;\n}\n\nexport function getAreebaCardModel(): ReturnModelType<typeof AreebaCard> {\n\tif (!actualAreebaCardModel) throw new Error('AreebaCard model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualAreebaCardModel;\n}\n\nexport function getCoreAuthIdentityModel(): ReturnModelType<typeof CoreAuthIdentity> {\n\tif (!actualCoreAuthIdentityModel) throw new Error('CoreAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAuthIdentityModel;\n}\n\nexport function getCoreEmailAuthIdentityModel(): ReturnModelType<typeof CoreEmailAuthIdentity> {\n\tif (!actualCoreEmailAuthIdentityModel) throw new Error('CoreEmailAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreEmailAuthIdentityModel;\n}\n\nexport function getCorePhoneAuthIdentityModel(): ReturnModelType<typeof CorePhoneAuthIdentity> {\n\tif (!actualCorePhoneAuthIdentityModel) throw new Error('CorePhoneAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCorePhoneAuthIdentityModel;\n}\n\nexport function getCoreGoogleAuthIdentityModel(): ReturnModelType<typeof CoreGoogleAuthIdentity> {\n\tif (!actualCoreGoogleAuthIdentityModel) throw new Error('CoreGoogleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreGoogleAuthIdentityModel;\n}\n\nexport function getCoreAppleAuthIdentityModel(): ReturnModelType<typeof CoreAppleAuthIdentity> {\n\tif (!actualCoreAppleAuthIdentityModel) throw new Error('CoreAppleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAppleAuthIdentityModel;\n}\n\nexport function getCoreUserModel(): ReturnModelType<typeof CoreUser> {\n\tif (!actualCoreUserModel) throw new Error('CoreUser model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreUserModel;\n}\n\nexport function getRoleModel(): ReturnModelType<typeof Role> {\n\tif (!actualRoleModel) throw new Error('Role model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualRoleModel;\n}\n\n// Function to initialize all global models (called from initGlobalConnection)\nexport function initializeGlobalModels(globalConnection: any) {\n\t// Initialize base global models\n\tactualCardModel = getModelForClass(Card, { existingConnection: globalConnection });\n\tactualCoreAuthIdentityModel = getModelForClass(CoreAuthIdentity, { existingConnection: globalConnection });\n\tactualCoreUserModel = getModelForClass(CoreUser, { existingConnection: globalConnection });\n\tactualRoleModel = getModelForClass(Role, { existingConnection: globalConnection });\n\n\t// Initialize discriminator models\n\tactualAreebaCardModel = getDiscriminatorModelForClass(\n\t\tactualCardModel,\n\t\tAreebaCard,\n\t\tCardType.AREEBA,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreEmailAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreEmailAuthIdentity,\n\t\tCoreAuthIdentityType.EMAIL,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCorePhoneAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCorePhoneAuthIdentity,\n\t\tCoreAuthIdentityType.PHONE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreGoogleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreGoogleAuthIdentity,\n\t\tCoreAuthIdentityType.GOOGLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreAppleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreAppleAuthIdentity,\n\t\tCoreAuthIdentityType.APPLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tinitializeRefreshTokenModel(globalConnection);\n\n\tconsole.log('✅ All global models initialized');\n}\n\nexport * from './card.model';\nexport * from './providers/areeba-card.model';\n\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\nexport * from './cart.model';\n\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\n\tgetModelForClass(CartParticipant);\nexport * from './cart-participant.model';\n\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\nexport * from './category.model';\n\nexport * from './core-auth-identity.model';\nexport * from './providers/core-apple-auth-identity.model';\nexport * from './providers/core-email-auth-identity.model';\nexport * from './providers/core-google-auth-identity.model';\nexport * from './providers/core-phone-auth-identity.model';\nexport * from './core-user.model';\nexport * from './role.model';\n\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\nexport * from './counter.model';\n\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\nexport const 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 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 './providers/custom-coupon.model';\nexport * from './providers/global-coupon.model';\nexport * from './providers/individual-store-coupon.model';\nexport * from './providers/individual-user-coupon.model';\nexport * from './providers/referral-code-coupon.model';\nexport * from './providers/referral-reward-coupon.model';\n\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\nexport * from './deal-setting.model';\n\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\nexport * from './dish.model';\n\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\nexport * from './faq.model';\n\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\nexport * from './favourite.model';\n\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\n\tgetModelForClass(FeaturedSetting);\nexport * from './featured-setting.model';\n\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\n\tgetModelForClass(FilterContainer);\nexport * from './filter-container.model';\n\nexport const FinanceSettlementModel: ReturnModelType<typeof FinanceSettlement> =\n\tgetModelForClass(FinanceSettlement);\nexport * from './finance-settlement.model';\n\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\nexport * from './gallery.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 LoyaltyPointCategoryModel: ReturnModelType<typeof LoyaltyPointCategory> =\n\tgetModelForClass(LoyaltyPointCategory);\nexport * from './loyalty-point-category.model';\n\nexport const LoyaltyPointSettingModel: ReturnModelType<typeof LoyaltyPointSetting> =\n\tgetModelForClass(LoyaltyPointSetting);\nexport * from './loyalty-point-setting.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 LoyaltyPointMarketingModel: ReturnModelType<typeof LoyaltyPointMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, LoyaltyPointMarketing, MarketingType.LOYALTY_POINT);\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/loyalty-point-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);\nexport * from './order.model';\nexport * from './providers/regular-order.model';\nexport * from './providers/courier-order.model';\n\nexport const OrderDeliveryModel: ReturnModelType<typeof OrderDelivery> = getModelForClass(OrderDelivery);\nexport * from './order-delivery.model';\n\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\nexport * from './parent.model';\n\nexport const PayoutModel: ReturnModelType<typeof Payout> = getModelForClass(Payout);\nexport const ShopPayoutModel: ReturnModelType<typeof ShopPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tShopPayout,\n\tPayoutType.SHOP\n);\nexport const RiderPayoutModel: ReturnModelType<typeof RiderPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tRiderPayout,\n\tPayoutType.RIDER\n);\nexport * from './payout.model';\nexport * from './providers/shop-payout.model';\nexport * from './providers/rider-payout.model';\n\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\n\tgetModelForClass(ProductMarketing);\nexport * from './product-marketing.model';\n\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\nexport * from './product.model';\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 RiderReviewModel: ReturnModelType<typeof RiderReview> = getModelForClass(RiderReview);\nexport * from './rider-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 ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\nexport * from './shop-review.model';\n\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\nexport * from './shop.model';\n\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\n\tgetModelForClass(SubscriptionSetting);\nexport * from './subscription-setting.model';\n\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\nexport * from './subscription.model';\n\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\nexport * from './tag.model';\n\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\nexport * from './user.model';\n\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\nexport * from './zone.model';\n\nexport const DefaultChatModel: ReturnModelType<typeof DefaultChat> = getModelForClass(DefaultChat);\nexport * from './default-chat.model';\n\nexport const TermsAndConditionsModel: ReturnModelType<typeof TermsAndConditions> =\n\tgetModelForClass(TermsAndConditions);\nexport * from './terms-and-conditions.model';\n\nexport const SupportReasonModel: ReturnModelType<typeof SupportReason> = getModelForClass(SupportReason);\nexport * from './support-reason.model';\n\nexport const CancellationReasonModel: ReturnModelType<typeof CancellationReason> =\n\tgetModelForClass(CancellationReason);\nexport * from './cancellation-reason.model';\n\nexport * from './embedded/trip-leg.mode';\nexport * from './embedded/rider-assignment-model';\n\nexport const RewardModel: ReturnModelType<typeof Reward> = getModelForClass(Reward);\nexport * from './reward.model';\n\nexport const TicketModel: ReturnModelType<typeof Ticket> = getModelForClass(Ticket);\nexport * from './ticket.model';\n\nexport const MessageModel: ReturnModelType<typeof Message> = getModelForClass(Message);\nexport * from './message.model';\n\nexport const AgentPerformanceModel: ReturnModelType<typeof AgentPerformance> =\n\tgetModelForClass(AgentPerformance);\nexport * from './agent-performance.model';\n\nexport const ChatroomModel: ReturnModelType<typeof Chatroom> = getModelForClass(Chatroom);\nexport * from './chat-room.model';\n\nexport * from './embedded/chat-participant.model';\n\nexport const ServiceModel: ReturnModelType<typeof Service> = getModelForClass(Service);\nexport * from './service.model'\n\nexport const ServiceParentModel: ReturnModelType<typeof ServiceParent> = getModelForClass(ServiceParent);\nexport * from './service-parent.model';\n\nexport const VendorModel: ReturnModelType<typeof Vendor> = getModelForClass(Vendor);\nexport * from './vendor.model';\n\nexport const VendorAccessControlModel: ReturnModelType<typeof VendorAccessControl> = getModelForClass(VendorAccessControl);\nexport * from './vendor-access-control.model';\n\nexport const ServiceCategoryModel: ReturnModelType<typeof ServiceCategory> = getModelForClass(ServiceCategory);\nexport * from './service-category.model'; \n\nexport const ServicePackageModel: ReturnModelType<typeof ServicePackage> = getModelForClass(ServicePackage);\nexport * from './service-package.model';\n\nexport const TeamMemberModel: ReturnModelType<typeof TeamMember> = getModelForClass(TeamMember)\nexport * from './team-member.model'\n\nexport const ServiceOrderModel: ReturnModelType<typeof ServiceOrder> = getModelForClass(ServiceOrder)\nexport * from './service-order.model'\n\nexport const TeamMemberReviewModel: ReturnModelType<typeof TeamMemberReview> = getModelForClass(TeamMemberReview)\nexport * from './team-member-review.model'\n\nexport const TeamMemberBlockedTimeModel: ReturnModelType<typeof TeamMemberBlockedTime> = getModelForClass(TeamMemberBlockedTime)\nexport * from './team-member-blocked-time'"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuJA,oCAGC;AAED,gDAGC;AAED,4DAGC;AAED,sEAGC;AAED,sEAGC;AAED,wEAGC;AAED,sEAGC;AAED,4CAGC;AAED,oCAGC;AAGD,wDA8CC;AAnPD,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,qFAAyE;AACzE,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAAsE;AACtE,+EAAoE;AACpE,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6DAAmD;AACnD,6CAAoC;AACpC,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,2DAAiD;AACjD,6CAAoC;AACpC,6EAAmE;AACnE,6DAAoD;AACpD,2CAAkC;AAClC,6CAAoC;AACpC,qFAA0E;AAC1E,kDAOiC;AACjC,yEAA+D;AAC/D,mFAAyE;AACzE,mFAAyE;AACzE,6FAAkF;AAClF,yEAA+D;AAC/D,6FAAkF;AAClF,2FAAgF;AAChF,6FAAkF;AAClF,6EAAmE;AACnE,uFAA4E;AAC5E,2FAAgF;AAChF,6DAAoD;AACpD,yEAA8D;AAC9D,+FAAmF;AACnF,+FAAmF;AACnF,iGAAqF;AACrF,+FAAmF;AACnF,uDAA6C;AAC7C,6CAAoC;AACpC,qEAA2D;AAC3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Ac,CAAC,CAAC;AAC5G,0DAAwC;AAE3B,QAAA,eAAe,GAAuC,IAAA,4BAAgB,EAAC,8BAAU,CAAC,CAAA;AAC/F,sDAAmC;AAEtB,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,kCAAY,CAAC,CAAA;AACrG,wDAAqC;AAExB,QAAA,qBAAqB,GAA6C,IAAA,4BAAgB,EAAC,2CAAgB,CAAC,CAAA;AACjH,6DAA0C;AAE7B,QAAA,0BAA0B,GAAkD,IAAA,4BAAgB,EAAC,gDAAqB,CAAC,CAAA;AAChI,6DAA0C;AAE7B,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,kCAAY,CAAC,CAAC;AACtG,wDAAsC","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 { UserAppSectionSetting } from './user-app-section-setting.model';\nimport { Attribute } from './attribute.model';\nimport { Banner } from './banner.model';\nimport { BOBFinance } from './bob-finance.model';\nimport { Brand } from './brand.model';\nimport { Category } from './category.model';\nimport { Counter } from './counter.model';\nimport { Coupon } from './coupon.model';\nimport { DealSetting } from './deal-setting.model';\nimport { Dish } from './dish.model';\nimport { Faq } from './faq.model';\nimport { Favourite } from './favourite.model';\nimport { FeaturedSetting } from './featured-setting.model';\nimport { FilterContainer } from './filter-container.model';\nimport { ListContainer } from './list-container.model';\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\nimport { LoyaltyPointSetting } from './loyalty-point-setting.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 { RiderReview } from './rider-review.model';\nimport { Role } from './role.model';\nimport { Setting } from './setting.model';\nimport { ShopAccessControl } from './shop-access-control.model';\nimport { ShopCategory } from './shop-category.model';\nimport { ShopMealPlan } from './shop-meal-plan.model';\nimport { ShopReview } from './shop-review.model';\nimport { Shop } from './shop.model';\nimport { SubscriptionSetting } from './subscription-setting.model';\nimport { Subscription } from './subscription.model';\nimport { Tag } from './tag.model';\nimport { Zone } from './zone.model';\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\nimport {\n\tCardType,\n\tCoreAuthIdentityType,\n\tCouponType,\n\tMarketingType,\n\tOrderType,\n\tPayoutType,\n} from '../../../utilities/enum';\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 { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model';\nimport { PunchMarketing } from './providers/punch-marketing.model';\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\nimport { Notification } from './notification.model';\nimport { CoreAuthIdentity } from './core-auth-identity.model';\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\nimport { CoreUser } from './core-user.model';\nimport { Card } from './card.model';\nimport { AreebaCard } from './providers/areeba-card.model';\nimport { RiderTracking } from './rider-tracking.model';\nimport { Rider } from './rider.model';\nimport { RiderTimeout } from './rider-timeout.model';\nimport { User } from './user.model';\nimport { Cart } from './cart.model';\nimport { LineItem } from './line-item.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { Gallery } from './gallery.model';\nimport { Order } from './order.model';\nimport { RegularOrder } from './providers/regular-order.model';\nimport { CourierOrder } from './providers/courier-order.model';\nimport { OrderDelivery } from './order-delivery.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 { ServiceParent } from './service-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 { TeamMember } from './team-member.model';\nimport { ServiceOrder } from './service-order.model';\nimport { TeamMemberReview } from './team-member-review.model';\nimport { TeamMemberBlockedTime } from './team-member-blocked-time';\nimport { Service } from './service.model'\nimport { TicketAction } from './ticket-action.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\n// Global models - will be set after initGlobalConnection()\nlet actualCardModel: ReturnModelType<typeof Card> | null = null;\nlet actualCoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> | null = null;\nlet actualCoreUserModel: ReturnModelType<typeof CoreUser> | null = null;\nlet actualRoleModel: ReturnModelType<typeof Role> | null = null;\n\n// Global discriminator models - will be set after initGlobalConnection()\nlet actualAreebaCardModel: ReturnModelType<typeof AreebaCard> | null = null;\nlet actualCoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> | null = null;\nlet actualCorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> | null = null;\nlet actualCoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> | null = null;\nlet actualCoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> | null = null;\n\n// Export getter functions for global models\nexport function getCardModel(): ReturnModelType<typeof Card> {\n\tif (!actualCardModel) throw new Error('Card model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCardModel;\n}\n\nexport function getAreebaCardModel(): ReturnModelType<typeof AreebaCard> {\n\tif (!actualAreebaCardModel) throw new Error('AreebaCard model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualAreebaCardModel;\n}\n\nexport function getCoreAuthIdentityModel(): ReturnModelType<typeof CoreAuthIdentity> {\n\tif (!actualCoreAuthIdentityModel) throw new Error('CoreAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAuthIdentityModel;\n}\n\nexport function getCoreEmailAuthIdentityModel(): ReturnModelType<typeof CoreEmailAuthIdentity> {\n\tif (!actualCoreEmailAuthIdentityModel) throw new Error('CoreEmailAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreEmailAuthIdentityModel;\n}\n\nexport function getCorePhoneAuthIdentityModel(): ReturnModelType<typeof CorePhoneAuthIdentity> {\n\tif (!actualCorePhoneAuthIdentityModel) throw new Error('CorePhoneAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCorePhoneAuthIdentityModel;\n}\n\nexport function getCoreGoogleAuthIdentityModel(): ReturnModelType<typeof CoreGoogleAuthIdentity> {\n\tif (!actualCoreGoogleAuthIdentityModel) throw new Error('CoreGoogleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreGoogleAuthIdentityModel;\n}\n\nexport function getCoreAppleAuthIdentityModel(): ReturnModelType<typeof CoreAppleAuthIdentity> {\n\tif (!actualCoreAppleAuthIdentityModel) throw new Error('CoreAppleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAppleAuthIdentityModel;\n}\n\nexport function getCoreUserModel(): ReturnModelType<typeof CoreUser> {\n\tif (!actualCoreUserModel) throw new Error('CoreUser model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreUserModel;\n}\n\nexport function getRoleModel(): ReturnModelType<typeof Role> {\n\tif (!actualRoleModel) throw new Error('Role model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualRoleModel;\n}\n\n// Function to initialize all global models (called from initGlobalConnection)\nexport function initializeGlobalModels(globalConnection: any) {\n\t// Initialize base global models\n\tactualCardModel = getModelForClass(Card, { existingConnection: globalConnection });\n\tactualCoreAuthIdentityModel = getModelForClass(CoreAuthIdentity, { existingConnection: globalConnection });\n\tactualCoreUserModel = getModelForClass(CoreUser, { existingConnection: globalConnection });\n\tactualRoleModel = getModelForClass(Role, { existingConnection: globalConnection });\n\n\t// Initialize discriminator models\n\tactualAreebaCardModel = getDiscriminatorModelForClass(\n\t\tactualCardModel,\n\t\tAreebaCard,\n\t\tCardType.AREEBA,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreEmailAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreEmailAuthIdentity,\n\t\tCoreAuthIdentityType.EMAIL,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCorePhoneAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCorePhoneAuthIdentity,\n\t\tCoreAuthIdentityType.PHONE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreGoogleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreGoogleAuthIdentity,\n\t\tCoreAuthIdentityType.GOOGLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreAppleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreAppleAuthIdentity,\n\t\tCoreAuthIdentityType.APPLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tinitializeRefreshTokenModel(globalConnection);\n\n\tconsole.log('✅ All global models initialized');\n}\n\nexport * from './card.model';\nexport * from './providers/areeba-card.model';\n\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\nexport * from './cart.model';\n\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\n\tgetModelForClass(CartParticipant);\nexport * from './cart-participant.model';\n\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\nexport * from './category.model';\n\nexport * from './core-auth-identity.model';\nexport * from './providers/core-apple-auth-identity.model';\nexport * from './providers/core-email-auth-identity.model';\nexport * from './providers/core-google-auth-identity.model';\nexport * from './providers/core-phone-auth-identity.model';\nexport * from './core-user.model';\nexport * from './role.model';\n\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\nexport * from './counter.model';\n\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\nexport const 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 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 './providers/custom-coupon.model';\nexport * from './providers/global-coupon.model';\nexport * from './providers/individual-store-coupon.model';\nexport * from './providers/individual-user-coupon.model';\nexport * from './providers/referral-code-coupon.model';\nexport * from './providers/referral-reward-coupon.model';\n\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\nexport * from './deal-setting.model';\n\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\nexport * from './dish.model';\n\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\nexport * from './faq.model';\n\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\nexport * from './favourite.model';\n\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\n\tgetModelForClass(FeaturedSetting);\nexport * from './featured-setting.model';\n\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\n\tgetModelForClass(FilterContainer);\nexport * from './filter-container.model';\n\nexport const FinanceSettlementModel: ReturnModelType<typeof FinanceSettlement> =\n\tgetModelForClass(FinanceSettlement);\nexport * from './finance-settlement.model';\n\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\nexport * from './gallery.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 LoyaltyPointCategoryModel: ReturnModelType<typeof LoyaltyPointCategory> =\n\tgetModelForClass(LoyaltyPointCategory);\nexport * from './loyalty-point-category.model';\n\nexport const LoyaltyPointSettingModel: ReturnModelType<typeof LoyaltyPointSetting> =\n\tgetModelForClass(LoyaltyPointSetting);\nexport * from './loyalty-point-setting.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 LoyaltyPointMarketingModel: ReturnModelType<typeof LoyaltyPointMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, LoyaltyPointMarketing, MarketingType.LOYALTY_POINT);\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/loyalty-point-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);\nexport * from './order.model';\nexport * from './providers/regular-order.model';\nexport * from './providers/courier-order.model';\n\nexport const OrderDeliveryModel: ReturnModelType<typeof OrderDelivery> = getModelForClass(OrderDelivery);\nexport * from './order-delivery.model';\n\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\nexport * from './parent.model';\n\nexport const PayoutModel: ReturnModelType<typeof Payout> = getModelForClass(Payout);\nexport const ShopPayoutModel: ReturnModelType<typeof ShopPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tShopPayout,\n\tPayoutType.SHOP\n);\nexport const RiderPayoutModel: ReturnModelType<typeof RiderPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tRiderPayout,\n\tPayoutType.RIDER\n);\nexport * from './payout.model';\nexport * from './providers/shop-payout.model';\nexport * from './providers/rider-payout.model';\n\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\n\tgetModelForClass(ProductMarketing);\nexport * from './product-marketing.model';\n\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\nexport * from './product.model';\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 RiderReviewModel: ReturnModelType<typeof RiderReview> = getModelForClass(RiderReview);\nexport * from './rider-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 ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\nexport * from './shop-review.model';\n\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\nexport * from './shop.model';\n\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\n\tgetModelForClass(SubscriptionSetting);\nexport * from './subscription-setting.model';\n\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\nexport * from './subscription.model';\n\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\nexport * from './tag.model';\n\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\nexport * from './user.model';\n\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\nexport * from './zone.model';\n\nexport const DefaultChatModel: ReturnModelType<typeof DefaultChat> = getModelForClass(DefaultChat);\nexport * from './default-chat.model';\n\nexport const TermsAndConditionsModel: ReturnModelType<typeof TermsAndConditions> =\n\tgetModelForClass(TermsAndConditions);\nexport * from './terms-and-conditions.model';\n\nexport const SupportReasonModel: ReturnModelType<typeof SupportReason> = getModelForClass(SupportReason);\nexport * from './support-reason.model';\n\nexport const CancellationReasonModel: ReturnModelType<typeof CancellationReason> =\n\tgetModelForClass(CancellationReason);\nexport * from './cancellation-reason.model';\n\nexport * from './embedded/trip-leg.mode';\nexport * from './embedded/rider-assignment-model';\n\nexport const RewardModel: ReturnModelType<typeof Reward> = getModelForClass(Reward);\nexport * from './reward.model';\n\nexport const TicketModel: ReturnModelType<typeof Ticket> = getModelForClass(Ticket);\nexport * from './ticket.model';\n\nexport const MessageModel: ReturnModelType<typeof Message> = getModelForClass(Message);\nexport * from './message.model';\n\nexport const AgentPerformanceModel: ReturnModelType<typeof AgentPerformance> =\n\tgetModelForClass(AgentPerformance);\nexport * from './agent-performance.model';\n\nexport const ChatroomModel: ReturnModelType<typeof Chatroom> = getModelForClass(Chatroom);\nexport * from './chat-room.model';\n\nexport * from './embedded/chat-participant.model';\n\nexport const ServiceModel: ReturnModelType<typeof Service> = getModelForClass(Service);\nexport * from './service.model'\n\nexport const ServiceParentModel: ReturnModelType<typeof ServiceParent> = getModelForClass(ServiceParent);\nexport * from './service-parent.model';\n\nexport const VendorModel: ReturnModelType<typeof Vendor> = getModelForClass(Vendor);\nexport * from './vendor.model';\n\nexport const VendorAccessControlModel: ReturnModelType<typeof VendorAccessControl> = getModelForClass(VendorAccessControl);\nexport * from './vendor-access-control.model';\n\nexport const ServiceCategoryModel: ReturnModelType<typeof ServiceCategory> = getModelForClass(ServiceCategory);\nexport * from './service-category.model'; \n\nexport const ServicePackageModel: ReturnModelType<typeof ServicePackage> = getModelForClass(ServicePackage);\nexport * from './service-package.model';\n\nexport const TeamMemberModel: ReturnModelType<typeof TeamMember> = getModelForClass(TeamMember)\nexport * from './team-member.model'\n\nexport const ServiceOrderModel: ReturnModelType<typeof ServiceOrder> = getModelForClass(ServiceOrder)\nexport * from './service-order.model'\n\nexport const TeamMemberReviewModel: ReturnModelType<typeof TeamMemberReview> = getModelForClass(TeamMemberReview)\nexport * from './team-member-review.model'\n\nexport const TeamMemberBlockedTimeModel: ReturnModelType<typeof TeamMemberBlockedTime> = getModelForClass(TeamMemberBlockedTime)\nexport * from './team-member-blocked-time'\n\nexport const TicketActionModel: ReturnModelType<typeof TicketAction> = getModelForClass(TicketAction);\nexport * from './ticket-action.model';"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { CreateHTTPContextOptions } from '@trpc/server/
|
|
1
|
+
import { CreateHTTPContextOptions } from '@trpc/server/adapters/standalone';
|
|
2
|
+
import type { NodeHTTPCreateContextFnOptions } from '@trpc/server/adapters/node-http';
|
|
2
3
|
import type { CreateWSSContextFnOptions } from '@trpc/server/adapters/ws';
|
|
3
4
|
import { AuthEntityType } from '../auth';
|
|
4
5
|
import jwt from 'jsonwebtoken';
|
|
5
6
|
import { TokenType } from '../auth';
|
|
7
|
+
import type { IncomingMessage, ServerResponse } from 'http';
|
|
6
8
|
export interface EntityContext extends jwt.JwtPayload {
|
|
7
9
|
id: string;
|
|
8
10
|
type: AuthEntityType;
|
|
@@ -15,15 +17,14 @@ export interface LyxaContextParams {
|
|
|
15
17
|
usedRefreshToken?: boolean;
|
|
16
18
|
tokenRenewed?: boolean;
|
|
17
19
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
export interface LyxaHTTPContext extends LyxaContextParams {
|
|
21
|
+
req: IncomingMessage;
|
|
22
|
+
res: ServerResponse;
|
|
23
|
+
}
|
|
24
|
+
export interface LyxaWSContext extends LyxaContextParams {
|
|
25
|
+
req: any;
|
|
26
|
+
res: any;
|
|
27
|
+
}
|
|
28
|
+
export declare const createLyxaContext: (opts: CreateHTTPContextOptions | NodeHTTPCreateContextFnOptions<IncomingMessage, ServerResponse>) => Promise<LyxaHTTPContext>;
|
|
29
|
+
export declare const createLyxaWsContext: (opts: CreateWSSContextFnOptions) => Promise<LyxaWSContext>;
|
|
28
30
|
export type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;
|
|
29
|
-
export type LyxaWSContext = Awaited<ReturnType<typeof createLyxaWsContext>>;
|
|
@@ -3,23 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createLyxaWsContext = exports.createLyxaContext = void 0;
|
|
4
4
|
const createLyxaContext = async (opts) => {
|
|
5
5
|
return {
|
|
6
|
-
...opts,
|
|
7
6
|
entity: undefined,
|
|
8
7
|
requestId: undefined,
|
|
9
8
|
tokenType: undefined,
|
|
10
9
|
usedRefreshToken: false,
|
|
11
10
|
tokenRenewed: false,
|
|
11
|
+
req: opts.req,
|
|
12
|
+
res: opts.res,
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
exports.createLyxaContext = createLyxaContext;
|
|
15
16
|
const createLyxaWsContext = async (opts) => {
|
|
16
17
|
return {
|
|
17
|
-
...opts,
|
|
18
18
|
entity: undefined,
|
|
19
19
|
requestId: undefined,
|
|
20
20
|
tokenType: undefined,
|
|
21
21
|
usedRefreshToken: false,
|
|
22
22
|
tokenRenewed: false,
|
|
23
|
+
req: opts.req,
|
|
24
|
+
res: opts.res,
|
|
23
25
|
};
|
|
24
26
|
};
|
|
25
27
|
exports.createLyxaWsContext = createLyxaWsContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"/","sources":["libraries/trpc/context.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"/","sources":["libraries/trpc/context.ts"],"names":[],"mappings":";;;AAgCO,MAAM,iBAAiB,GAAG,KAAK,EACrC,IAAgG,EACrE,EAAE;IAC7B,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;QACnB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG;KACb,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEK,MAAM,mBAAmB,GAAG,KAAK,EACvC,IAA+B,EACN,EAAE;IAC3B,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;QACnB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG;KACb,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B","sourcesContent":["import { CreateHTTPContextOptions } from '@trpc/server/adapters/standalone';\nimport type { NodeHTTPCreateContextFnOptions } from '@trpc/server/adapters/node-http';\nimport type { CreateWSSContextFnOptions } from '@trpc/server/adapters/ws';\nimport { AuthEntityType } from '../auth';\nimport jwt from 'jsonwebtoken';\nimport { TokenType } from '../auth';\nimport type { IncomingMessage, ServerResponse } from 'http';\n\nexport interface EntityContext extends jwt.JwtPayload {\n\tid: string;\n\ttype: AuthEntityType;\n\tparameters: Record<string, unknown>;\n}\n\nexport interface LyxaContextParams {\n\tentity?: EntityContext;\n\trequestId?: string;\n\ttokenType?: TokenType;\n\tusedRefreshToken?: boolean;\n\ttokenRenewed?: boolean;\n}\n\nexport interface LyxaHTTPContext extends LyxaContextParams {\n\treq: IncomingMessage;\n\tres: ServerResponse;\n}\n\nexport interface LyxaWSContext extends LyxaContextParams {\n\treq: any;\n\tres: any;\n}\n\nexport const createLyxaContext = async (\n\topts: CreateHTTPContextOptions | NodeHTTPCreateContextFnOptions<IncomingMessage, ServerResponse>\n): Promise<LyxaHTTPContext> => {\n\treturn {\n\t\tentity: undefined,\n\t\trequestId: undefined,\n\t\ttokenType: undefined,\n\t\tusedRefreshToken: false,\n\t\ttokenRenewed: false,\n\t\treq: opts.req,\n\t\tres: opts.res,\n\t};\n};\n\nexport const createLyxaWsContext = async (\n\topts: CreateWSSContextFnOptions\n): Promise<LyxaWSContext> => {\n\treturn {\n\t\tentity: undefined,\n\t\trequestId: undefined,\n\t\ttokenType: undefined,\n\t\tusedRefreshToken: false,\n\t\ttokenRenewed: false,\n\t\treq: opts.req,\n\t\tres: opts.res,\n\t};\n};\nexport type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;"]}
|
|
@@ -1,178 +1,74 @@
|
|
|
1
|
-
export declare const t: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
stack: undefined;
|
|
14
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
15
|
-
};
|
|
16
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
17
|
-
}>;
|
|
18
|
-
procedure: import("@trpc/server").ProcedureBuilder<{
|
|
19
|
-
_config: import("@trpc/server").RootConfig<{
|
|
20
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
21
|
-
meta: object;
|
|
22
|
-
errorShape: {
|
|
23
|
-
message: string;
|
|
24
|
-
data: {
|
|
25
|
-
stack: undefined;
|
|
26
|
-
path: undefined;
|
|
27
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
28
|
-
httpStatus: number;
|
|
29
|
-
};
|
|
30
|
-
stack: undefined;
|
|
31
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
32
|
-
};
|
|
33
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
34
|
-
}>;
|
|
35
|
-
_ctx_out: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
36
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
37
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
38
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
39
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
40
|
-
_meta: object;
|
|
41
|
-
}>;
|
|
42
|
-
middleware: <TNewParams extends import("@trpc/server").ProcedureParams<import("@trpc/server").AnyRootConfig, unknown, unknown, unknown, unknown, unknown, unknown>>(fn: import("@trpc/server").MiddlewareFunction<{
|
|
43
|
-
_config: import("@trpc/server").RootConfig<{
|
|
44
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
45
|
-
meta: object;
|
|
46
|
-
errorShape: {
|
|
47
|
-
message: string;
|
|
48
|
-
data: {
|
|
49
|
-
stack: undefined;
|
|
50
|
-
path: undefined;
|
|
51
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
52
|
-
httpStatus: number;
|
|
53
|
-
};
|
|
54
|
-
stack: undefined;
|
|
55
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
56
|
-
};
|
|
57
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
58
|
-
}>;
|
|
59
|
-
_ctx_out: {};
|
|
60
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
61
|
-
_input_in: unknown;
|
|
62
|
-
_output_in: unknown;
|
|
63
|
-
_output_out: unknown;
|
|
64
|
-
_meta: object;
|
|
65
|
-
}, TNewParams>) => import("@trpc/server").MiddlewareBuilder<{
|
|
66
|
-
_config: import("@trpc/server").RootConfig<{
|
|
67
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
68
|
-
meta: object;
|
|
69
|
-
errorShape: {
|
|
70
|
-
message: string;
|
|
71
|
-
data: {
|
|
72
|
-
stack: undefined;
|
|
73
|
-
path: undefined;
|
|
74
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
75
|
-
httpStatus: number;
|
|
76
|
-
};
|
|
77
|
-
stack: undefined;
|
|
78
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
79
|
-
};
|
|
80
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
81
|
-
}>;
|
|
82
|
-
_ctx_out: {};
|
|
83
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
84
|
-
_input_in: unknown;
|
|
85
|
-
_output_in: unknown;
|
|
86
|
-
_output_out: unknown;
|
|
87
|
-
_meta: object;
|
|
88
|
-
}, TNewParams>;
|
|
89
|
-
router: <TProcRouterRecord extends import("@trpc/server").ProcedureRouterRecord>(procedures: TProcRouterRecord) => import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
|
90
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
91
|
-
meta: object;
|
|
92
|
-
errorShape: {
|
|
93
|
-
message: string;
|
|
94
|
-
data: {
|
|
95
|
-
stack: undefined;
|
|
96
|
-
path: undefined;
|
|
97
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
98
|
-
httpStatus: number;
|
|
99
|
-
};
|
|
100
|
-
stack: undefined;
|
|
101
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
102
|
-
};
|
|
103
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
104
|
-
}>, TProcRouterRecord>;
|
|
105
|
-
mergeRouters: typeof import("@trpc/server").mergeRouters;
|
|
106
|
-
createCallerFactory: <TRouter extends import("@trpc/server").Router<import("@trpc/server").AnyRouterDef<import("@trpc/server").RootConfig<{
|
|
107
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
108
|
-
meta: object;
|
|
109
|
-
errorShape: {
|
|
110
|
-
message: string;
|
|
111
|
-
data: {
|
|
112
|
-
stack: undefined;
|
|
113
|
-
path: undefined;
|
|
114
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
115
|
-
httpStatus: number;
|
|
116
|
-
};
|
|
1
|
+
export declare const t: import("@trpc/server").TRPCRootObject<import("./context").LyxaHTTPContext, object, {
|
|
2
|
+
errorFormatter({ shape, error }: {
|
|
3
|
+
error: import("@trpc/server").TRPCError;
|
|
4
|
+
type: import("@trpc/server").ProcedureType | "unknown";
|
|
5
|
+
path: string | undefined;
|
|
6
|
+
input: unknown;
|
|
7
|
+
ctx: import("./context").LyxaHTTPContext | undefined;
|
|
8
|
+
shape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
9
|
+
}): {
|
|
10
|
+
message: string;
|
|
11
|
+
data: {
|
|
117
12
|
stack: undefined;
|
|
118
|
-
|
|
13
|
+
path: undefined;
|
|
14
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
15
|
+
httpStatus: number;
|
|
119
16
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
data: {
|
|
130
|
-
stack: undefined;
|
|
131
|
-
path: undefined;
|
|
132
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
133
|
-
httpStatus: number;
|
|
134
|
-
};
|
|
17
|
+
stack: undefined;
|
|
18
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
ctx: import("./context").LyxaHTTPContext;
|
|
22
|
+
meta: object;
|
|
23
|
+
errorShape: {
|
|
24
|
+
message: string;
|
|
25
|
+
data: {
|
|
135
26
|
stack: undefined;
|
|
136
|
-
|
|
27
|
+
path: undefined;
|
|
28
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
29
|
+
httpStatus: number;
|
|
137
30
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
143
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
144
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
145
|
-
_meta: object;
|
|
31
|
+
stack: undefined;
|
|
32
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
33
|
+
};
|
|
34
|
+
transformer: false;
|
|
146
35
|
}>;
|
|
147
|
-
export declare const
|
|
148
|
-
|
|
36
|
+
export declare const publicProcedure: import("@trpc/server").TRPCProcedureBuilder<import("./context").LyxaHTTPContext, object, object, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
37
|
+
export declare const createTRPCRouter: import("@trpc/server").TRPCRouterBuilder<{
|
|
38
|
+
ctx: import("./context").LyxaHTTPContext;
|
|
149
39
|
meta: object;
|
|
150
40
|
errorShape: {
|
|
151
41
|
message: string;
|
|
152
42
|
data: {
|
|
153
43
|
stack: undefined;
|
|
154
44
|
path: undefined;
|
|
155
|
-
code: import("@trpc/server
|
|
45
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
156
46
|
httpStatus: number;
|
|
157
47
|
};
|
|
158
48
|
stack: undefined;
|
|
159
|
-
code: import("@trpc/server
|
|
49
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
160
50
|
};
|
|
161
|
-
transformer:
|
|
162
|
-
}
|
|
163
|
-
export declare const createCallerFactory:
|
|
164
|
-
ctx: import("
|
|
51
|
+
transformer: false;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const createCallerFactory: import("@trpc/server").TRPCRouterCallerFactory<{
|
|
54
|
+
ctx: import("./context").LyxaHTTPContext;
|
|
165
55
|
meta: object;
|
|
166
56
|
errorShape: {
|
|
167
57
|
message: string;
|
|
168
58
|
data: {
|
|
169
59
|
stack: undefined;
|
|
170
60
|
path: undefined;
|
|
171
|
-
code: import("@trpc/server
|
|
61
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
172
62
|
httpStatus: number;
|
|
173
63
|
};
|
|
174
64
|
stack: undefined;
|
|
175
|
-
code: import("@trpc/server
|
|
65
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
176
66
|
};
|
|
177
|
-
transformer:
|
|
178
|
-
}
|
|
67
|
+
transformer: false;
|
|
68
|
+
}>;
|
|
69
|
+
export type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
70
|
+
export type { AnyTRPCRouter } from '@trpc/server';
|
|
71
|
+
export { createHTTPHandler } from '@trpc/server/adapters/standalone';
|
|
72
|
+
export { observable } from '@trpc/server/observable';
|
|
73
|
+
export { TRPCError } from '@trpc/server';
|
|
74
|
+
export type LyxaRouter = ReturnType<typeof createTRPCRouter>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createCallerFactory = exports.createTRPCRouter = exports.publicProcedure = exports.t = void 0;
|
|
3
|
+
exports.TRPCError = exports.observable = exports.createHTTPHandler = exports.createCallerFactory = exports.createTRPCRouter = exports.publicProcedure = exports.t = void 0;
|
|
4
4
|
const server_1 = require("@trpc/server");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.t = server_1.initTRPC.context().create({
|
|
@@ -28,4 +28,10 @@ exports.t = server_1.initTRPC.context().create({
|
|
|
28
28
|
exports.publicProcedure = exports.t.procedure;
|
|
29
29
|
exports.createTRPCRouter = exports.t.router;
|
|
30
30
|
exports.createCallerFactory = exports.t.createCallerFactory;
|
|
31
|
+
var standalone_1 = require("@trpc/server/adapters/standalone");
|
|
32
|
+
Object.defineProperty(exports, "createHTTPHandler", { enumerable: true, get: function () { return standalone_1.createHTTPHandler; } });
|
|
33
|
+
var observable_1 = require("@trpc/server/observable");
|
|
34
|
+
Object.defineProperty(exports, "observable", { enumerable: true, get: function () { return observable_1.observable; } });
|
|
35
|
+
var server_2 = require("@trpc/server");
|
|
36
|
+
Object.defineProperty(exports, "TRPCError", { enumerable: true, get: function () { return server_2.TRPCError; } });
|
|
31
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/trpc/index.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AACxC,6BAA+B;AAGlB,QAAA,CAAC,GAAG,iBAAQ,CAAC,OAAO,EAAe,CAAC,MAAM,CAAC;IACvD,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE;QAC9B,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,IAAI,KAAK,CAAC,KAAK,YAAY,cAAQ,EAAE,CAAC;YACrE,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACxC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC;QACnC,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QAE5D,OAAO;YACN,GAAG,KAAK;YACR,OAAO,EACN,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ;gBACzC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO;gBACnD,CAAC,CAAC,KAAK,CAAC,OAAO;YACjB,IAAI,EAAE;gBACL,GAAG,KAAK,CAAC,IAAI;gBAEb,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,SAAS;aACf;YAED,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,SAAC,CAAC,SAAS,CAAC;AAC9B,QAAA,gBAAgB,GAAG,SAAC,CAAC,MAAM,CAAC;AAC5B,QAAA,mBAAmB,GAAG,SAAC,CAAC,mBAAmB,CAAC","sourcesContent":["import { initTRPC } from '@trpc/server';\nimport { ZodError } from 'zod';\nimport { LyxaContext } from './context';\n\nexport const t = initTRPC.context<LyxaContext>().create({\n\terrorFormatter({ shape, error }) {\n\t\tlet zodErrors = null;\n\n\t\tif (error.code === 'BAD_REQUEST' && error.cause instanceof ZodError) {\n\t\t\tconst flattened = error.cause.flatten();\n\t\t\tzodErrors = flattened.fieldErrors;\n\t\t}\n\n\t\tconsole.log('Error:', error, shape, 'error log', zodErrors);\n\n\t\treturn {\n\t\t\t...shape,\n\t\t\tmessage:\n\t\t\t\tzodErrors && typeof zodErrors === 'object'\n\t\t\t\t\t? Object.values(zodErrors)[0]?.[0] || shape.message\n\t\t\t\t\t: shape.message,\n\t\t\tdata: {\n\t\t\t\t...shape.data,\n\n\t\t\t\tstack: undefined,\n\t\t\t\tpath: undefined,\n\t\t\t},\n\t\t\t// Prevent stack trace from being returned in the response\n\t\t\tstack: undefined,\n\t\t};\n\t},\n});\n\nexport const publicProcedure = t.procedure;\nexport const createTRPCRouter = t.router;\nexport const createCallerFactory = t.createCallerFactory;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/trpc/index.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AACxC,6BAA+B;AAGlB,QAAA,CAAC,GAAG,iBAAQ,CAAC,OAAO,EAAe,CAAC,MAAM,CAAC;IACvD,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE;QAC9B,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,IAAI,KAAK,CAAC,KAAK,YAAY,cAAQ,EAAE,CAAC;YACrE,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACxC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC;QACnC,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QAE5D,OAAO;YACN,GAAG,KAAK;YACR,OAAO,EACN,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ;gBACzC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO;gBACnD,CAAC,CAAC,KAAK,CAAC,OAAO;YACjB,IAAI,EAAE;gBACL,GAAG,KAAK,CAAC,IAAI;gBAEb,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,SAAS;aACf;YAED,KAAK,EAAE,SAAS;SAChB,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,SAAC,CAAC,SAAS,CAAC;AAC9B,QAAA,gBAAgB,GAAG,SAAC,CAAC,MAAM,CAAC;AAC5B,QAAA,mBAAmB,GAAG,SAAC,CAAC,mBAAmB,CAAC;AAIzD,+DAAqE;AAA5D,+GAAA,iBAAiB,OAAA;AAC1B,sDAAqD;AAA5C,wGAAA,UAAU,OAAA;AACnB,uCAAyC;AAAhC,mGAAA,SAAS,OAAA","sourcesContent":["import { initTRPC } from '@trpc/server';\nimport { ZodError } from 'zod';\nimport { LyxaContext } from './context';\n\nexport const t = initTRPC.context<LyxaContext>().create({\n\terrorFormatter({ shape, error }) {\n\t\tlet zodErrors = null;\n\n\t\tif (error.code === 'BAD_REQUEST' && error.cause instanceof ZodError) {\n\t\t\tconst flattened = error.cause.flatten();\n\t\t\tzodErrors = flattened.fieldErrors;\n\t\t}\n\n\t\tconsole.log('Error:', error, shape, 'error log', zodErrors);\n\n\t\treturn {\n\t\t\t...shape,\n\t\t\tmessage:\n\t\t\t\tzodErrors && typeof zodErrors === 'object'\n\t\t\t\t\t? Object.values(zodErrors)[0]?.[0] || shape.message\n\t\t\t\t\t: shape.message,\n\t\t\tdata: {\n\t\t\t\t...shape.data,\n\n\t\t\t\tstack: undefined,\n\t\t\t\tpath: undefined,\n\t\t\t},\n\t\t\t// Prevent stack trace from being returned in the response\n\t\t\tstack: undefined,\n\t\t};\n\t},\n});\n\nexport const publicProcedure = t.procedure;\nexport const createTRPCRouter = t.router;\nexport const createCallerFactory = t.createCallerFactory;\n\nexport type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';\nexport type { AnyTRPCRouter } from '@trpc/server';\nexport { createHTTPHandler } from '@trpc/server/adapters/standalone';\nexport { observable } from '@trpc/server/observable';\nexport { TRPCError } from '@trpc/server';\n\nexport type LyxaRouter = ReturnType<typeof createTRPCRouter>;"]}
|
|
@@ -4,36 +4,13 @@ interface AuthOptions {
|
|
|
4
4
|
allowRefreshToken?: boolean;
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
17
|
-
httpStatus: number;
|
|
18
|
-
};
|
|
19
|
-
stack: undefined;
|
|
20
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
21
|
-
};
|
|
22
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
23
|
-
}>;
|
|
24
|
-
_meta: object;
|
|
25
|
-
_ctx_out: {
|
|
26
|
-
requestId: string | undefined;
|
|
27
|
-
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
28
|
-
tokenType: TokenType | undefined;
|
|
29
|
-
entity: import("../context").EntityContext | undefined;
|
|
30
|
-
req: import("http").IncomingMessage;
|
|
31
|
-
usedRefreshToken: boolean | undefined;
|
|
32
|
-
tokenRenewed: boolean | undefined;
|
|
33
|
-
};
|
|
34
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
35
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
36
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
37
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
38
|
-
}>;
|
|
7
|
+
export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
8
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
|
+
tokenType: TokenType | undefined;
|
|
10
|
+
entity: import("../context").EntityContext | undefined;
|
|
11
|
+
req: import("http").IncomingMessage;
|
|
12
|
+
requestId: string | undefined;
|
|
13
|
+
usedRefreshToken: boolean | undefined;
|
|
14
|
+
tokenRenewed: boolean | undefined;
|
|
15
|
+
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
39
16
|
export {};
|
|
@@ -5,6 +5,7 @@ const server_1 = require("@trpc/server");
|
|
|
5
5
|
const index_1 = require("../index");
|
|
6
6
|
const auth_1 = require("../../auth");
|
|
7
7
|
const models_1 = require("../../mongo/models");
|
|
8
|
+
const enum_1 = require("../../../utilities/enum");
|
|
8
9
|
function createAuthenticatedProcedure(options) {
|
|
9
10
|
const { entityTypes, allowRefreshToken = true, autoRefresh = true } = options;
|
|
10
11
|
return index_1.publicProcedure.use(async ({ ctx, next }) => {
|
|
@@ -26,17 +27,20 @@ function createAuthenticatedProcedure(options) {
|
|
|
26
27
|
}
|
|
27
28
|
let entity = await (0, auth_1.verifyAccessToken)(entityTypes, accessToken);
|
|
28
29
|
if (entity?.type == 'USER') {
|
|
29
|
-
const user = await models_1.
|
|
30
|
+
const user = await (0, models_1.getCoreUserModel)().findOne({ _id: entity.parameters.coreUserId });
|
|
30
31
|
if (!user) {
|
|
31
32
|
throw new server_1.TRPCError({ code: 'UNAUTHORIZED', message: 'User not found' });
|
|
32
33
|
}
|
|
34
|
+
if (user.status !== enum_1.Status.ACTIVE) {
|
|
35
|
+
throw new server_1.TRPCError({ code: 'UNAUTHORIZED', message: 'User is not active' });
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
if (entity?.type == 'CRM') {
|
|
35
|
-
const admin = await models_1.AdminModel.findOne({ _id: entity.
|
|
39
|
+
const admin = await models_1.AdminModel.findOne({ _id: entity.parameters.adminId });
|
|
36
40
|
if (!admin) {
|
|
37
41
|
throw new server_1.TRPCError({ code: 'UNAUTHORIZED', message: 'Admin not found' });
|
|
38
42
|
}
|
|
39
|
-
if (admin.status !==
|
|
43
|
+
if (admin.status !== enum_1.Status.ACTIVE) {
|
|
40
44
|
throw new server_1.TRPCError({ code: 'UNAUTHORIZED', message: 'Admin is not active' });
|
|
41
45
|
}
|
|
42
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"/","sources":["libraries/trpc/middlewares/auth.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"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AAG,CAAC,SAAS,CAAC,oBAAoB,EAAE,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YAC9E,CAAC;YAED,IAAI,aAAa,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;gBAC1C,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,aAAa,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YAChF,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { TRPCError } from '@trpc/server';\nimport { publicProcedure } from '../index';\nimport {\n\tAuthEntityType,\n\tverifyAccessToken,\n\tvalidateRefreshToken,\n\tsignAccessToken,\n\tTokenType,\n\trefreshTokens,\n\thandleTokenRenewal,\n} from '../../auth';\nimport { AdminModel, getCoreUserModel, UserModel } from '../../mongo/models';\nimport { Status } from '../../../utilities/enum';\n\ninterface AuthOptions {\n\tentityTypes: AuthEntityType[];\n\tallowRefreshToken?: boolean;\n\tautoRefresh?: boolean;\n}\n\n/**\n * A factory that creates an authenticated procedure, optionally allowing\n * refresh tokens and auto-refreshing expired access tokens.\n */\nexport function createAuthenticatedProcedure(options: AuthOptions) {\n\tconst { entityTypes, allowRefreshToken = true, autoRefresh = true } = options;\n\n\treturn publicProcedure.use(async ({ ctx, next }) => {\n\t\tconst authHeader = ctx.req.headers['authorization'];\n\t\tconst refreshTokenHeader = ctx.req.headers['x-refresh-token'];\n\n\t\tif (!authHeader) {\n\t\t\tthrow new TRPCError({ code: 'UNAUTHORIZED', message: 'No authorization header' });\n\t\t}\n\n\t\tconst accessToken = authHeader.replace(/^Bearer\\s+/, '');\n\t\tlet refreshToken = '';\n\n\t\tif (refreshTokenHeader) {\n\t\t\trefreshToken =\n\t\t\t\ttypeof refreshTokenHeader === 'string'\n\t\t\t\t\t? refreshTokenHeader.replace(/^Bearer\\s+/, '')\n\t\t\t\t\t: refreshTokenHeader[0].replace(/^Bearer\\s+/, '');\n\t\t}\n\n\t\tif (!accessToken) {\n\t\t\tthrow new TRPCError({ code: 'UNAUTHORIZED', message: 'Missing access token' });\n\t\t}\n\n\t\tlet entity = await verifyAccessToken(entityTypes, accessToken);\n\n\t\tif (entity?.type == 'USER') {\n\t\t\tconst user = await getCoreUserModel().findOne({ _id: entity.parameters.coreUserId });\n\t\t\tif (!user) {\n\t\t\t\tthrow new TRPCError({ code: 'UNAUTHORIZED', message: 'User not found' });\n\t\t\t}\n\t\t\tif (user.status !== Status.ACTIVE) {\n\t\t\t\tthrow new TRPCError({ code: 'UNAUTHORIZED', message: 'User is not active' });\n\t\t\t}\n\t\t}\n\t\tif (entity?.type == 'CRM') {\n\t\t\tconst admin = await AdminModel.findOne({ _id: entity.parameters.adminId });\n\t\t\tif (!admin) {\n\t\t\t\tthrow new TRPCError({ code: 'UNAUTHORIZED', message: 'Admin not found' });\n\t\t\t}\n\t\t\tif (admin.status !== Status.ACTIVE) {\n\t\t\t\tthrow new TRPCError({ code: 'UNAUTHORIZED', message: 'Admin is not active' });\n\t\t\t}\n\t\t}\n\t\tif (entity) {\n\t\t\tctx.entity = entity;\n\t\t\tctx.tokenType = TokenType.ACCESS;\n\t\t\tctx.usedRefreshToken = false;\n\t\t\tctx.tokenRenewed = false;\n\n\t\t\treturn next({ ctx });\n\t\t}\n\n\t\tif (!allowRefreshToken || !refreshToken) {\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'UNAUTHORIZED',\n\t\t\t\tmessage: 'Invalid access token',\n\t\t\t});\n\t\t}\n\n\t\tconst renewalResult = await handleTokenRenewal(refreshToken);\n\n\t\tif (!renewalResult.success) {\n\t\t\tconst errorMessage =\n\t\t\t\trenewalResult.tokenStatus === 'revoked' ? 'Refresh token has been revoked' : 'Invalid refresh token';\n\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'UNAUTHORIZED',\n\t\t\t\tmessage: errorMessage,\n\t\t\t});\n\t\t}\n\n\t\tif (!entityTypes.includes(renewalResult.entity!.type)) {\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'UNAUTHORIZED',\n\t\t\t\tmessage: 'Unauthorized entity type',\n\t\t\t});\n\t\t}\n\n\t\tctx.entity = renewalResult.entity;\n\t\tctx.tokenType = TokenType.REFRESH;\n\t\tctx.usedRefreshToken = true;\n\n\t\tctx.tokenRenewed = renewalResult.tokenStatus === 'expired';\n\n\t\tif (autoRefresh && renewalResult.newTokens) {\n\t\t\tif (renewalResult.newTokens.accessToken) {\n\t\t\t\tctx.res.setHeader('X-New-Access-Token', renewalResult.newTokens.accessToken);\n\t\t\t}\n\n\t\t\tif (renewalResult.newTokens.refreshToken) {\n\t\t\t\tctx.res.setHeader('X-New-Refresh-Token', renewalResult.newTokens.refreshToken);\n\t\t\t}\n\t\t}\n\n\t\treturn next({ ctx });\n\t});\n}\n"]}
|
|
@@ -2,36 +2,13 @@ import { AuthEntityType } from '../../auth';
|
|
|
2
2
|
interface PhoneVerifiedOptions {
|
|
3
3
|
entityTypes: AuthEntityType[];
|
|
4
4
|
}
|
|
5
|
-
export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
15
|
-
httpStatus: number;
|
|
16
|
-
};
|
|
17
|
-
stack: undefined;
|
|
18
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
19
|
-
};
|
|
20
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
21
|
-
}>;
|
|
22
|
-
_meta: object;
|
|
23
|
-
_ctx_out: {
|
|
24
|
-
requestId: string | undefined;
|
|
25
|
-
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
26
|
-
tokenType: import("../../auth").TokenType | undefined;
|
|
27
|
-
entity: import("../context").EntityContext | undefined;
|
|
28
|
-
req: import("http").IncomingMessage;
|
|
29
|
-
usedRefreshToken: boolean | undefined;
|
|
30
|
-
tokenRenewed: boolean | undefined;
|
|
31
|
-
};
|
|
32
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
33
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
34
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
35
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
36
|
-
}>;
|
|
5
|
+
export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
6
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
7
|
+
tokenType: import("../../auth").TokenType | undefined;
|
|
8
|
+
entity: import("../context").EntityContext | undefined;
|
|
9
|
+
req: import("http").IncomingMessage;
|
|
10
|
+
requestId: string | undefined;
|
|
11
|
+
usedRefreshToken: boolean | undefined;
|
|
12
|
+
tokenRenewed: boolean | undefined;
|
|
13
|
+
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
37
14
|
export {};
|
|
@@ -4,36 +4,13 @@ interface AuthOptions {
|
|
|
4
4
|
allowRefreshToken?: boolean;
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
17
|
-
httpStatus: number;
|
|
18
|
-
};
|
|
19
|
-
stack: undefined;
|
|
20
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
21
|
-
};
|
|
22
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
23
|
-
}>;
|
|
24
|
-
_meta: object;
|
|
25
|
-
_ctx_out: {
|
|
26
|
-
requestId: string | undefined;
|
|
27
|
-
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
28
|
-
tokenType: TokenType | undefined;
|
|
29
|
-
entity: import("../context").EntityContext | undefined;
|
|
30
|
-
req: import("http").IncomingMessage;
|
|
31
|
-
usedRefreshToken: boolean | undefined;
|
|
32
|
-
tokenRenewed: boolean | undefined;
|
|
33
|
-
};
|
|
34
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
35
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
36
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
37
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
38
|
-
}>;
|
|
7
|
+
export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
8
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
|
+
tokenType: TokenType | undefined;
|
|
10
|
+
entity: import("../context").EntityContext | undefined;
|
|
11
|
+
req: import("http").IncomingMessage;
|
|
12
|
+
requestId: string | undefined;
|
|
13
|
+
usedRefreshToken: boolean | undefined;
|
|
14
|
+
tokenRenewed: boolean | undefined;
|
|
15
|
+
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
39
16
|
export {};
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.185-test",
|
|
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.0.
|
|
3
|
+
"version": "1.0.185-test",
|
|
4
4
|
"description": "The Core system of the Lyxa services.",
|
|
5
5
|
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,11 +17,13 @@
|
|
|
17
17
|
"publish:core": "npm publish --ignore-scripts",
|
|
18
18
|
"release": "npm run build && npm run publish:types && npm run publish:core"
|
|
19
19
|
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@trpc/server": "^11.4.3",
|
|
22
|
+
"@trpc/client": "^11.4.3"
|
|
23
|
+
},
|
|
20
24
|
"dependencies": {
|
|
21
25
|
"@google-cloud/secret-manager": "^5.6.0",
|
|
22
26
|
"@mapbox/polyline": "^1.2.1",
|
|
23
|
-
"@trpc/client": "^10.45.2",
|
|
24
|
-
"@trpc/server": "^10.45.2",
|
|
25
27
|
"@typegoose/typegoose": "^12.10.1",
|
|
26
28
|
"@types/amqplib": "^0.10.7",
|
|
27
29
|
"@types/node": "^22.10.2",
|
|
@@ -51,6 +53,8 @@
|
|
|
51
53
|
"zod": "^3.24.1"
|
|
52
54
|
},
|
|
53
55
|
"devDependencies": {
|
|
56
|
+
"@trpc/client": "^11.4.3",
|
|
57
|
+
"@trpc/server": "^11.4.3",
|
|
54
58
|
"@types/mapbox__polyline": "^1.0.5",
|
|
55
59
|
"@types/mime-types": "^2.1.4",
|
|
56
60
|
"@types/ws": "^8.18.1",
|