@lyxa.ai/core 1.0.183 → 1.0.184
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 +1 -2
- package/dist/libraries/dispatcher/index.js +1 -2
- package/dist/libraries/dispatcher/index.js.map +1 -1
- package/dist/libraries/mongo/models/banner.model.d.ts +2 -0
- package/dist/libraries/mongo/models/banner.model.js +5 -0
- package/dist/libraries/mongo/models/banner.model.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +0 -3
- package/dist/libraries/mongo/models/index.js +1 -4
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/trpc/context.d.ts +12 -13
- package/dist/libraries/trpc/context.js +2 -4
- package/dist/libraries/trpc/context.js.map +1 -1
- package/dist/libraries/trpc/index.d.ts +153 -49
- package/dist/libraries/trpc/index.js +1 -7
- package/dist/libraries/trpc/index.js.map +1 -1
- package/dist/libraries/trpc/middlewares/auth.d.ts +32 -9
- package/dist/libraries/trpc/middlewares/auth.js +2 -6
- package/dist/libraries/trpc/middlewares/auth.js.map +1 -1
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +32 -9
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +32 -9
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +3 -7
|
@@ -5,6 +5,5 @@ 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
|
-
|
|
9
|
-
}): Promise<import("@trpc/client").TRPCClient<T>>;
|
|
8
|
+
}): Promise<import("@trpc/client").CreateTRPCProxyClient<T>>;
|
|
10
9
|
}
|
|
@@ -25,12 +25,11 @@ 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.createTRPCProxyClient)({
|
|
29
29
|
links: [
|
|
30
30
|
(0, client_1.httpBatchLink)({
|
|
31
31
|
url: deploymentURL,
|
|
32
32
|
headers: async () => options?.headers ?? {},
|
|
33
|
-
transformer: options?.transformer,
|
|
34
33
|
}),
|
|
35
34
|
],
|
|
36
35
|
});
|
|
@@ -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,yCAAoE;AAEpE,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,OAEC;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;QAGD,OAAO,IAAA,8BAAqB,EAAI;YAC/B,KAAK,EAAE;gBACN,IAAA,sBAAa,EAAC;oBACb,GAAG,EAAE,aAAa;oBAClB,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE;iBAC3C,CAAC;aACF;SAED,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AArCY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,gBAAO,GAAE;qCAIkB,8BAAoB;GAHnC,sBAAsB,CAqClC","sourcesContent":["import { Service } from 'typedi';\nimport { createTRPCProxyClient, 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}\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\t// @ts-ignore\n\t\treturn createTRPCProxyClient<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}),\n\t\t\t],\n\t\t\t//special http request header that has a token\n\t\t});\n\t}\n}\n"]}
|
|
@@ -4,6 +4,7 @@ import { BannerClickType, BannerLinkType, BannerUserType, Status, UserAppSection
|
|
|
4
4
|
import { Shop } from './shop.model';
|
|
5
5
|
import { Product } from './product.model';
|
|
6
6
|
import { ListContainer } from './list-container.model';
|
|
7
|
+
import { Zone } from '.';
|
|
7
8
|
export declare class Banner extends TimeStamps {
|
|
8
9
|
title: string;
|
|
9
10
|
image: string;
|
|
@@ -15,6 +16,7 @@ export declare class Banner extends TimeStamps {
|
|
|
15
16
|
linkType?: BannerLinkType;
|
|
16
17
|
link?: string;
|
|
17
18
|
shop?: Ref<Shop>;
|
|
19
|
+
zones: Ref<Zone>[];
|
|
18
20
|
product?: Ref<Product>;
|
|
19
21
|
listContainer?: Ref<ListContainer>;
|
|
20
22
|
sortingOrder?: number;
|
|
@@ -28,6 +28,7 @@ let Banner = class Banner extends defaultClasses_1.TimeStamps {
|
|
|
28
28
|
linkType;
|
|
29
29
|
link;
|
|
30
30
|
shop;
|
|
31
|
+
zones;
|
|
31
32
|
product;
|
|
32
33
|
listContainer;
|
|
33
34
|
sortingOrder;
|
|
@@ -73,6 +74,10 @@ __decorate([
|
|
|
73
74
|
(0, typegoose_1.prop)({ ref: () => shop_model_1.Shop }),
|
|
74
75
|
__metadata("design:type", Object)
|
|
75
76
|
], Banner.prototype, "shop", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typegoose_1.prop)({ required: true, ref: () => _1.Zone, type: () => [String] }),
|
|
79
|
+
__metadata("design:type", Array)
|
|
80
|
+
], Banner.prototype, "zones", void 0);
|
|
76
81
|
__decorate([
|
|
77
82
|
(0, typegoose_1.prop)({ ref: () => product_model_1.Product }),
|
|
78
83
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.model.js","sourceRoot":"/","sources":["libraries/mongo/models/banner.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,4EAAqE;AACrE,kDAAoI;AACpI,6CAAoC;AACpC,mDAA0C;AAC1C,iEAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"banner.model.js","sourceRoot":"/","sources":["libraries/mongo/models/banner.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,4EAAqE;AACrE,kDAAoI;AACpI,6CAAoC;AACpC,mDAA0C;AAC1C,iEAAuD;AACvD,wBAAsC;AA8B/B,IAAM,MAAM,GAAZ,MAAM,MAA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eAAe,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACrE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,KAAc,CAAC,CAAC;YAC7B,CAAC;QACF,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,MAAM,CA0ClB","sourcesContent":["import { modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { BannerClickType, BannerLinkType, BannerUserType, ItemType, Status, UserAppSectionItemType } from '../../../utilities/enum';\nimport { Shop } from './shop.model';\nimport { Product } from './product.model';\nimport { ListContainer } from './list-container.model';\nimport { BannerModel, Zone } from '.';\n\n@modelOptions({ schemaOptions: { collection: 'banners' } })\n@pre<Banner>('save', async function (next) {\n\t// Only set sortingOrder if it's a new document or sortingOrder is not set\n\tif (this.isNew || typeof this.sortingOrder === 'undefined') {\n\t\ttry {\n\t\t\t// Find the maximum sortingOrder that aren't deleted\n\t\t\tconst maxSortingOrder = await BannerModel.aggregate<{ maxSortingOrder: number }>([\n\t\t\t\t{\n\t\t\t\t\t$match: {\n\t\t\t\t\t\tdeletedAt: null,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t$group: {\n\t\t\t\t\t\t_id: null,\n\t\t\t\t\t\tmaxSortingOrder: { $max: '$sortingOrder' },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t]).exec();\n\n\t\t\t// Set the new sortingOrder to max + 1 (or 0 if no items found)\n\t\t\tthis.sortingOrder = (maxSortingOrder[0]?.maxSortingOrder ?? -1) + 1;\n\t\t} catch (error) {\n\t\t\treturn next(error as Error);\n\t\t}\n\t}\n\tnext();\n})\nexport class Banner extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic title!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic image!: string;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: UserAppSectionItemType;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: String, enum: BannerUserType, default: BannerUserType.ALL })\n\tpublic visibility?: BannerUserType;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isClickable?: boolean;\n\n\t@prop({ type: String, enum: BannerClickType })\n\tpublic clickType?: BannerClickType;\n\n\t@prop({ type: String, enum: BannerLinkType })\n\tpublic linkType?: BannerLinkType;\n\n\t@prop({ type: String, trim: true })\n\tpublic link?: string;\n\n\t@prop({ ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Zone, type: () => [String] })\n\tpublic zones!: Ref<Zone>[];\n\n\t@prop({ ref: () => Product })\n\tpublic product?: Ref<Product>;\n\n\t@prop({ ref: () => ListContainer })\n\tpublic listContainer?: Ref<ListContainer>;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic sortingOrder?: number;\n}\n"]}
|
|
@@ -97,7 +97,6 @@ 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';
|
|
101
100
|
export declare const ActivityLogModel: ReturnModelType<typeof ActivityLog>;
|
|
102
101
|
export * from './activity-log.model';
|
|
103
102
|
export declare const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl>;
|
|
@@ -298,5 +297,3 @@ export declare const TeamMemberReviewModel: ReturnModelType<typeof TeamMemberRev
|
|
|
298
297
|
export * from './team-member-review.model';
|
|
299
298
|
export declare const TeamMemberBlockedTimeModel: ReturnModelType<typeof TeamMemberBlockedTime>;
|
|
300
299
|
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.
|
|
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;
|
|
19
19
|
exports.getCardModel = getCardModel;
|
|
20
20
|
exports.getAreebaCardModel = getAreebaCardModel;
|
|
21
21
|
exports.getCoreAuthIdentityModel = getCoreAuthIdentityModel;
|
|
@@ -127,7 +127,6 @@ 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");
|
|
131
130
|
exports.ActivityLogModel = (0, typegoose_1.getModelForClass)(activity_log_model_1.ActivityLog);
|
|
132
131
|
__exportStar(require("./activity-log.model"), exports);
|
|
133
132
|
exports.AdminAccessControlModel = (0, typegoose_1.getModelForClass)(admin_access_control_model_1.AdminAccessControl);
|
|
@@ -385,6 +384,4 @@ exports.TeamMemberReviewModel = (0, typegoose_1.getModelForClass)(team_member_re
|
|
|
385
384
|
__exportStar(require("./team-member-review.model"), exports);
|
|
386
385
|
exports.TeamMemberBlockedTimeModel = (0, typegoose_1.getModelForClass)(team_member_blocked_time_1.TeamMemberBlockedTime);
|
|
387
386
|
__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);
|
|
390
387
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuJA,oCA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,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
|
+
{"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,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAAsE;AACtE,+EAAoE;AACpE,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,m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7B,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,10 +1,8 @@
|
|
|
1
|
-
import { CreateHTTPContextOptions } from '@trpc/server/adapters/standalone';
|
|
2
|
-
import type { NodeHTTPCreateContextFnOptions } from '@trpc/server/adapters/node-http';
|
|
1
|
+
import { CreateHTTPContextOptions } from '@trpc/server/dist/adapters/standalone';
|
|
3
2
|
import type { CreateWSSContextFnOptions } from '@trpc/server/adapters/ws';
|
|
4
3
|
import { AuthEntityType } from '../auth';
|
|
5
4
|
import jwt from 'jsonwebtoken';
|
|
6
5
|
import { TokenType } from '../auth';
|
|
7
|
-
import type { IncomingMessage, ServerResponse } from 'http';
|
|
8
6
|
export interface EntityContext extends jwt.JwtPayload {
|
|
9
7
|
id: string;
|
|
10
8
|
type: AuthEntityType;
|
|
@@ -17,14 +15,15 @@ export interface LyxaContextParams {
|
|
|
17
15
|
usedRefreshToken?: boolean;
|
|
18
16
|
tokenRenewed?: boolean;
|
|
19
17
|
}
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
export declare const createLyxaContext: (opts: CreateHTTPContextOptions) => Promise<CreateHTTPContextOptions & LyxaContextParams>;
|
|
19
|
+
export declare const createLyxaWsContext: (opts: CreateWSSContextFnOptions) => Promise<{
|
|
20
|
+
entity: undefined;
|
|
21
|
+
requestId: undefined;
|
|
22
|
+
tokenType: undefined;
|
|
23
|
+
usedRefreshToken: boolean;
|
|
24
|
+
tokenRenewed: boolean;
|
|
25
|
+
req: import("http").IncomingMessage;
|
|
26
|
+
res: import("ws").WebSocket;
|
|
27
|
+
}>;
|
|
30
28
|
export type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;
|
|
29
|
+
export type LyxaWSContext = Awaited<ReturnType<typeof createLyxaWsContext>>;
|
|
@@ -3,25 +3,23 @@ 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,
|
|
6
7
|
entity: undefined,
|
|
7
8
|
requestId: undefined,
|
|
8
9
|
tokenType: undefined,
|
|
9
10
|
usedRefreshToken: false,
|
|
10
11
|
tokenRenewed: false,
|
|
11
|
-
req: opts.req,
|
|
12
|
-
res: opts.res,
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
14
|
exports.createLyxaContext = createLyxaContext;
|
|
16
15
|
const createLyxaWsContext = async (opts) => {
|
|
17
16
|
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,
|
|
25
23
|
};
|
|
26
24
|
};
|
|
27
25
|
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":";;;AAqBO,MAAM,iBAAiB,GAAG,KAAK,EACrC,IAA8B,EAC0B,EAAE;IAC1D,OAAO;QACN,GAAG,IAAI;QACP,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;KACnB,CAAC;AACH,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B;AAEK,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAA+B,EAAE,EAAE;IAC5E,OAAO;QACN,GAAG,IAAI;QACP,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;KACnB,CAAC;AACH,CAAC,CAAC;AATW,QAAA,mBAAmB,uBAS9B","sourcesContent":["import { CreateHTTPContextOptions } from '@trpc/server/dist/adapters/standalone';\nimport type { CreateWSSContextFnOptions } from '@trpc/server/adapters/ws';\nimport { AuthEntityType } from '../auth';\nimport jwt from 'jsonwebtoken';\nimport { TokenType } from '../auth';\nimport { request } 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 const createLyxaContext = async (\n\topts: CreateHTTPContextOptions\n): Promise<CreateHTTPContextOptions & LyxaContextParams> => {\n\treturn {\n\t\t...opts,\n\t\tentity: undefined,\n\t\trequestId: undefined,\n\t\ttokenType: undefined,\n\t\tusedRefreshToken: false,\n\t\ttokenRenewed: false,\n\t};\n};\n\nexport const createLyxaWsContext = async (opts: CreateWSSContextFnOptions) => {\n\treturn {\n\t\t...opts,\n\t\tentity: undefined,\n\t\trequestId: undefined,\n\t\ttokenType: undefined,\n\t\tusedRefreshToken: false,\n\t\ttokenRenewed: false,\n\t};\n};\n\nexport type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;\nexport type LyxaWSContext = Awaited<ReturnType<typeof createLyxaWsContext>>;\n"]}
|
|
@@ -1,74 +1,178 @@
|
|
|
1
|
-
export declare const t:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
export declare const t: {
|
|
2
|
+
_config: import("@trpc/server").RootConfig<{
|
|
3
|
+
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
4
|
+
meta: object;
|
|
5
|
+
errorShape: {
|
|
6
|
+
message: string;
|
|
7
|
+
data: {
|
|
8
|
+
stack: undefined;
|
|
9
|
+
path: undefined;
|
|
10
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
11
|
+
httpStatus: number;
|
|
12
|
+
};
|
|
12
13
|
stack: undefined;
|
|
13
|
-
|
|
14
|
-
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
15
|
-
httpStatus: number;
|
|
14
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
16
15
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
};
|
|
26
100
|
stack: undefined;
|
|
27
|
-
|
|
28
|
-
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
29
|
-
httpStatus: number;
|
|
101
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
30
102
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
+
};
|
|
117
|
+
stack: undefined;
|
|
118
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
119
|
+
};
|
|
120
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
121
|
+
}>, any>>>(router: TRouter) => import("@trpc/server").RouterCaller<TRouter["_def"]>;
|
|
122
|
+
};
|
|
123
|
+
export declare const publicProcedure: import("@trpc/server").ProcedureBuilder<{
|
|
124
|
+
_config: import("@trpc/server").RootConfig<{
|
|
125
|
+
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
126
|
+
meta: object;
|
|
127
|
+
errorShape: {
|
|
128
|
+
message: string;
|
|
129
|
+
data: {
|
|
130
|
+
stack: undefined;
|
|
131
|
+
path: undefined;
|
|
132
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
133
|
+
httpStatus: number;
|
|
134
|
+
};
|
|
135
|
+
stack: undefined;
|
|
136
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
137
|
+
};
|
|
138
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
139
|
+
}>;
|
|
140
|
+
_ctx_out: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
141
|
+
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
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;
|
|
35
146
|
}>;
|
|
36
|
-
export declare const
|
|
37
|
-
|
|
38
|
-
ctx: import("./context").LyxaHTTPContext;
|
|
147
|
+
export declare const createTRPCRouter: <TProcRouterRecord extends import("@trpc/server").ProcedureRouterRecord>(procedures: TProcRouterRecord) => import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
|
148
|
+
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
39
149
|
meta: object;
|
|
40
150
|
errorShape: {
|
|
41
151
|
message: string;
|
|
42
152
|
data: {
|
|
43
153
|
stack: undefined;
|
|
44
154
|
path: undefined;
|
|
45
|
-
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
155
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
46
156
|
httpStatus: number;
|
|
47
157
|
};
|
|
48
158
|
stack: undefined;
|
|
49
|
-
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
159
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
50
160
|
};
|
|
51
|
-
transformer:
|
|
52
|
-
}>;
|
|
53
|
-
export declare const createCallerFactory: import("@trpc/server").
|
|
54
|
-
ctx: import("./context").
|
|
161
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
162
|
+
}>, TProcRouterRecord>;
|
|
163
|
+
export declare const createCallerFactory: <TRouter extends import("@trpc/server").Router<import("@trpc/server").AnyRouterDef<import("@trpc/server").RootConfig<{
|
|
164
|
+
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
55
165
|
meta: object;
|
|
56
166
|
errorShape: {
|
|
57
167
|
message: string;
|
|
58
168
|
data: {
|
|
59
169
|
stack: undefined;
|
|
60
170
|
path: undefined;
|
|
61
|
-
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
171
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
62
172
|
httpStatus: number;
|
|
63
173
|
};
|
|
64
174
|
stack: undefined;
|
|
65
|
-
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
175
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
66
176
|
};
|
|
67
|
-
transformer:
|
|
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>;
|
|
177
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
178
|
+
}>, any>>>(router: TRouter) => import("@trpc/server").RouterCaller<TRouter["_def"]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
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,10 +28,4 @@ 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; } });
|
|
37
31
|
//# 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
|
|
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"]}
|
|
@@ -4,13 +4,36 @@ 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
|
-
|
|
7
|
+
export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").ProcedureBuilder<{
|
|
8
|
+
_config: import("@trpc/server").RootConfig<{
|
|
9
|
+
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("../context").LyxaContextParams;
|
|
10
|
+
meta: object;
|
|
11
|
+
errorShape: {
|
|
12
|
+
message: string;
|
|
13
|
+
data: {
|
|
14
|
+
stack: undefined;
|
|
15
|
+
path: undefined;
|
|
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
|
+
}>;
|
|
16
39
|
export {};
|
|
@@ -5,7 +5,6 @@ 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");
|
|
9
8
|
function createAuthenticatedProcedure(options) {
|
|
10
9
|
const { entityTypes, allowRefreshToken = true, autoRefresh = true } = options;
|
|
11
10
|
return index_1.publicProcedure.use(async ({ ctx, next }) => {
|
|
@@ -27,20 +26,17 @@ function createAuthenticatedProcedure(options) {
|
|
|
27
26
|
}
|
|
28
27
|
let entity = await (0, auth_1.verifyAccessToken)(entityTypes, accessToken);
|
|
29
28
|
if (entity?.type == 'USER') {
|
|
30
|
-
const user = await
|
|
29
|
+
const user = await models_1.UserModel.findOne({ _id: entity.id });
|
|
31
30
|
if (!user) {
|
|
32
31
|
throw new server_1.TRPCError({ code: 'UNAUTHORIZED', message: 'User not found' });
|
|
33
32
|
}
|
|
34
|
-
if (user.status !== enum_1.Status.ACTIVE) {
|
|
35
|
-
throw new server_1.TRPCError({ code: 'UNAUTHORIZED', message: 'User is not active' });
|
|
36
|
-
}
|
|
37
33
|
}
|
|
38
34
|
if (entity?.type == 'CRM') {
|
|
39
35
|
const admin = await models_1.AdminModel.findOne({ _id: entity.id });
|
|
40
36
|
if (!admin) {
|
|
41
37
|
throw new server_1.TRPCError({ code: 'UNAUTHORIZED', message: 'Admin not found' });
|
|
42
38
|
}
|
|
43
|
-
if (admin.status !==
|
|
39
|
+
if (admin.status !== 'ACTIVE') {
|
|
44
40
|
throw new server_1.TRPCError({ code: 'UNAUTHORIZED', message: 'Admin is not active' });
|
|
45
41
|
}
|
|
46
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"/","sources":["libraries/trpc/middlewares/auth.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"/","sources":["libraries/trpc/middlewares/auth.ts"],"names":[],"mappings":";;AAuBA,oEA+FC;AAtHD,yCAAyC;AACzC,oCAA2C;AAC3C,qCAQoB;AACpB,+CAA2D;AAY3D,SAAgB,4BAA4B,CAAC,OAAoB;IAChE,MAAM,EAAE,WAAW,EAAE,iBAAiB,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAE9E,OAAO,uBAAe,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE;QAClD,MAAM,UAAU,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QACpD,MAAM,kBAAkB,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAE9D,IAAI,CAAC,UAAU,EAAE,CAAC;YACjB,MAAM,IAAI,kBAAS,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QACzD,IAAI,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GAAG,IAAI,CAAC;QAE5B,GAAG,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW,KAAK,SAAS,CAAC;QAE3D,IAAI,WAAW,IAAI,aAAa,CAAC,SAAS,EAAE,CAAC;YAC5C,IAAI,aAAa,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,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, UserModel } from '../../mongo/models';\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 UserModel.findOne({ _id: entity.id });\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}\n\t\tif (entity?.type == 'CRM') {\n\t\t\tconst admin = await AdminModel.findOne({ _id: entity.id });\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 !== '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,13 +2,36 @@ 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
|
-
|
|
5
|
+
export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").ProcedureBuilder<{
|
|
6
|
+
_config: import("@trpc/server").RootConfig<{
|
|
7
|
+
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("../context").LyxaContextParams;
|
|
8
|
+
meta: object;
|
|
9
|
+
errorShape: {
|
|
10
|
+
message: string;
|
|
11
|
+
data: {
|
|
12
|
+
stack: undefined;
|
|
13
|
+
path: undefined;
|
|
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
|
+
}>;
|
|
14
37
|
export {};
|
|
@@ -4,13 +4,36 @@ 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
|
-
|
|
7
|
+
export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").ProcedureBuilder<{
|
|
8
|
+
_config: import("@trpc/server").RootConfig<{
|
|
9
|
+
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("../context").LyxaContextParams;
|
|
10
|
+
meta: object;
|
|
11
|
+
errorShape: {
|
|
12
|
+
message: string;
|
|
13
|
+
data: {
|
|
14
|
+
stack: undefined;
|
|
15
|
+
path: undefined;
|
|
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
|
+
}>;
|
|
16
39
|
export {};
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.184",
|
|
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,13 +17,11 @@
|
|
|
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
|
-
},
|
|
24
20
|
"dependencies": {
|
|
25
21
|
"@google-cloud/secret-manager": "^5.6.0",
|
|
26
22
|
"@mapbox/polyline": "^1.2.1",
|
|
23
|
+
"@trpc/client": "^10.45.2",
|
|
24
|
+
"@trpc/server": "^10.45.2",
|
|
27
25
|
"@typegoose/typegoose": "^12.10.1",
|
|
28
26
|
"@types/amqplib": "^0.10.7",
|
|
29
27
|
"@types/node": "^22.10.2",
|
|
@@ -53,8 +51,6 @@
|
|
|
53
51
|
"zod": "^3.24.1"
|
|
54
52
|
},
|
|
55
53
|
"devDependencies": {
|
|
56
|
-
"@trpc/client": "^11.4.3",
|
|
57
|
-
"@trpc/server": "^11.4.3",
|
|
58
54
|
"@types/mapbox__polyline": "^1.0.5",
|
|
59
55
|
"@types/mime-types": "^2.1.4",
|
|
60
56
|
"@types/ws": "^8.18.1",
|