@lyxa.ai/core 1.0.164 → 1.0.166-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libraries/dispatcher/index.d.ts +2 -1
- package/dist/libraries/dispatcher/index.js +2 -1
- package/dist/libraries/dispatcher/index.js.map +1 -1
- package/dist/libraries/event/events/admin-logs-event.d.ts +1 -1
- package/dist/libraries/event/events/admin-logs-event.js.map +1 -1
- package/dist/libraries/mongo/models/core-user.model.d.ts +1 -2
- package/dist/libraries/mongo/models/core-user.model.js +2 -7
- package/dist/libraries/mongo/models/core-user.model.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +3 -0
- package/dist/libraries/mongo/models/index.js +4 -1
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/mongo/models/notification.model.d.ts +4 -3
- package/dist/libraries/mongo/models/notification.model.js +15 -11
- package/dist/libraries/mongo/models/notification.model.js.map +1 -1
- package/dist/libraries/mongo/models/user.model.d.ts +2 -2
- package/dist/libraries/mongo/models/user.model.js +5 -5
- package/dist/libraries/mongo/models/user.model.js.map +1 -1
- package/dist/libraries/trpc/context.d.ts +2 -1
- package/dist/libraries/trpc/context.js.map +1 -1
- package/dist/libraries/trpc/index.d.ts +43 -153
- package/dist/libraries/trpc/middlewares/auth.d.ts +10 -32
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +10 -32
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +10 -32
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/utilities/common/logs-common-methods.d.ts +8 -0
- package/dist/utilities/common/logs-common-methods.js +13 -0
- package/dist/utilities/common/logs-common-methods.js.map +1 -1
- package/package.json +3 -3
|
@@ -5,5 +5,6 @@ export declare class MicroServiceDispatcher {
|
|
|
5
5
|
constructor(secretService: SecretManagerService);
|
|
6
6
|
getMicroService<T extends AnyRouter>(serviceName: string, customURL?: string, options?: {
|
|
7
7
|
headers?: Record<string, string>;
|
|
8
|
-
|
|
8
|
+
transformer?: any;
|
|
9
|
+
}): Promise<import("@trpc/client").TRPCClient<T>>;
|
|
9
10
|
}
|
|
@@ -25,11 +25,12 @@ let MicroServiceDispatcher = class MicroServiceDispatcher {
|
|
|
25
25
|
if (!deploymentURL) {
|
|
26
26
|
throw new Error('The requested service does not have a configured secret URL');
|
|
27
27
|
}
|
|
28
|
-
return (0, client_1.
|
|
28
|
+
return (0, client_1.createTRPCClient)({
|
|
29
29
|
links: [
|
|
30
30
|
(0, client_1.httpBatchLink)({
|
|
31
31
|
url: deploymentURL,
|
|
32
32
|
headers: async () => options?.headers ?? {},
|
|
33
|
+
transformer: options?.transformer,
|
|
33
34
|
}),
|
|
34
35
|
],
|
|
35
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/dispatcher/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/dispatcher/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAiC;AACjC,yCAA+D;AAE/D,wCAAkD;AAG3C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC1B,cAAc,CAAuB;IAE7C,YAAY,aAAmC;QAC9C,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,eAAe,CAC3B,WAAmB,EACnB,SAAkB,EAClB,OAGC;QAED,MAAM,aAAa,GAClB,SAAS;YACT,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAChC,2BAA2B,GAAG,WAAW,CAAC,WAAW,EAAE,GAAG,WAAW,CACrE,CAAC,CAAC;QAEJ,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;QAE9C,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QAChF,CAAC;QAED,OAAO,IAAA,yBAAgB,EAAI;YAC1B,KAAK,EAAE;gBACN,IAAA,sBAAa,EAAC;oBACb,GAAG,EAAE,aAAa;oBAClB,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE;oBAC3C,WAAW,EAAE,OAAO,EAAE,WAAW;iBACjC,CAAC;aACF;SAED,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAtCY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,gBAAO,GAAE;qCAIkB,8BAAoB;GAHnC,sBAAsB,CAsClC","sourcesContent":["import { Service } from 'typedi';\nimport { createTRPCClient, httpBatchLink } from '@trpc/client';\nimport { AnyRouter } from '@trpc/server';\nimport { SecretManagerService } from '../secrets';\n\n@Service()\nexport class MicroServiceDispatcher {\n\tprivate _secretService: SecretManagerService;\n\n\tconstructor(secretService: SecretManagerService) {\n\t\tthis._secretService = secretService;\n\t}\n\n\tpublic async getMicroService<T extends AnyRouter>(\n\t\tserviceName: string,\n\t\tcustomURL?: string,\n\t\toptions?: {\n\t\t\theaders?: Record<string, string>;\n\t\t\ttransformer?: any;\n\t\t}\n\t) {\n\t\tconst deploymentURL =\n\t\t\tcustomURL ??\n\t\t\t(await this._secretService.getKey(\n\t\t\t\t'DEPLOYMENTS_MICROSERVICE_' + serviceName.toUpperCase() + '_ENDPOINT'\n\t\t\t));\n\n\t\tconsole.log(deploymentURL, 'deploymentURL--');\n\n\t\tif (!deploymentURL) {\n\t\t\tthrow new Error('The requested service does not have a configured secret URL');\n\t\t}\n\n\t\treturn createTRPCClient<T>({\n\t\t\tlinks: [\n\t\t\t\thttpBatchLink({\n\t\t\t\t\turl: deploymentURL,\n\t\t\t\t\theaders: async () => options?.headers ?? {},\n\t\t\t\t\ttransformer: options?.transformer,\n\t\t\t\t}),\n\t\t\t],\n\t\t\t//special http request header that has a token\n\t\t});\n\t}\n}\n"]}
|
|
@@ -18,7 +18,7 @@ declare const ActivityLogValidationSchema: z.ZodObject<{
|
|
|
18
18
|
oldDocument?: any;
|
|
19
19
|
newDocument?: any;
|
|
20
20
|
}>;
|
|
21
|
-
type CreateActivityLogDTO = DTO<typeof ActivityLogValidationSchema>;
|
|
21
|
+
export type CreateActivityLogDTO = DTO<typeof ActivityLogValidationSchema>;
|
|
22
22
|
export declare class AdminActivityLogsEvent extends BaseEvent<Record<string, unknown>> {
|
|
23
23
|
constructor(payload: CreateActivityLogDTO);
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-logs-event.js","sourceRoot":"/","sources":["libraries/event/events/admin-logs-event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAyC;AACzC,8CAAkD;AAClD,kDAAqE;AACrE,uFAA0G;AAE1G,MAAM,UAAU,GAAG;IAClB,KAAK,EAAE,iCAAa,CAAC,QAAQ,CAAC,OAAO,CAAC;IACtC,YAAY,EAAE,iCAAa,CAAC,QAAQ,CAAC,iCAA0B,EAAE,eAAe,CAAC;IACjF,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;IACpB,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;CACpB,CAAC;AACF,MAAM,aAAa,GAAG,IAAA,uCAAmB,EAAC,UAAU,CAAC,CAAC;AACtD,MAAM,EACL,UAAU,EAAE,2BAA2B,GACvC,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAIrD,MAAa,sBAAuB,SAAQ,qBAAkC;IAC7E,YAAY,OAA6B;QACxC,KAAK,CAAC,8BAAiB,CAAC,yBAAyB,EAAE,OAAkC,CAAC,CAAC;IACxF,CAAC;CACD;AAJD,wDAIC","sourcesContent":["import { z } from 'zod';\nimport { BaseEvent } from '../BaseEvent';\nimport { PublishEventEnums } from '../EventEnums';\nimport { AdminLogsUpdatedFieldsType } from '../../../utilities/enum';\nimport { createSchemaBuilder, DTO, ZodValidation } from '../../../utilities/validation/global-validation';\n\nconst baseFields = {\n\tadmin: ZodValidation.objectId('Admin'),\n\tupdatedField: ZodValidation.enumType(AdminLogsUpdatedFieldsType, 'Updated Field'),\n\toldDocument: z.any(),\n\tnewDocument: z.any(),\n};\nconst schemaBuilder = createSchemaBuilder(baseFields);\nconst {\n\tBaseSchema: ActivityLogValidationSchema,\n} = schemaBuilder.getAllSchemas({ createdAt: true });\n\
|
|
1
|
+
{"version":3,"file":"admin-logs-event.js","sourceRoot":"/","sources":["libraries/event/events/admin-logs-event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAyC;AACzC,8CAAkD;AAClD,kDAAqE;AACrE,uFAA0G;AAE1G,MAAM,UAAU,GAAG;IAClB,KAAK,EAAE,iCAAa,CAAC,QAAQ,CAAC,OAAO,CAAC;IACtC,YAAY,EAAE,iCAAa,CAAC,QAAQ,CAAC,iCAA0B,EAAE,eAAe,CAAC;IACjF,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;IACpB,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;CACpB,CAAC;AACF,MAAM,aAAa,GAAG,IAAA,uCAAmB,EAAC,UAAU,CAAC,CAAC;AACtD,MAAM,EACL,UAAU,EAAE,2BAA2B,GACvC,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAIrD,MAAa,sBAAuB,SAAQ,qBAAkC;IAC7E,YAAY,OAA6B;QACxC,KAAK,CAAC,8BAAiB,CAAC,yBAAyB,EAAE,OAAkC,CAAC,CAAC;IACxF,CAAC;CACD;AAJD,wDAIC","sourcesContent":["import { z } from 'zod';\nimport { BaseEvent } from '../BaseEvent';\nimport { PublishEventEnums } from '../EventEnums';\nimport { AdminLogsUpdatedFieldsType } from '../../../utilities/enum';\nimport { createSchemaBuilder, DTO, ZodValidation } from '../../../utilities/validation/global-validation';\n\nconst baseFields = {\n\tadmin: ZodValidation.objectId('Admin'),\n\tupdatedField: ZodValidation.enumType(AdminLogsUpdatedFieldsType, 'Updated Field'),\n\toldDocument: z.any(),\n\tnewDocument: z.any(),\n};\nconst schemaBuilder = createSchemaBuilder(baseFields);\nconst {\n\tBaseSchema: ActivityLogValidationSchema,\n} = schemaBuilder.getAllSchemas({ createdAt: true });\n\nexport type CreateActivityLogDTO = DTO<typeof ActivityLogValidationSchema>;\n\nexport class AdminActivityLogsEvent extends BaseEvent<Record<string, unknown>> {\n\tconstructor(payload: CreateActivityLogDTO) {\n\t\tsuper(PublishEventEnums.ADMIN_ACTIVITY_LOGS_EVENT, payload as Record<string, unknown>);\n\t}\n}"]}
|
|
@@ -6,10 +6,9 @@ export declare class CoreUser extends TimeStamps {
|
|
|
6
6
|
gender?: string;
|
|
7
7
|
dob?: Date;
|
|
8
8
|
countryISO2: string;
|
|
9
|
-
fcmTokens?: string[];
|
|
10
9
|
profilePhoto?: string;
|
|
11
10
|
status?: Status;
|
|
12
11
|
deviceIds: string[];
|
|
13
12
|
stripeCustomerId?: string;
|
|
14
|
-
|
|
13
|
+
rewardPoints?: number;
|
|
15
14
|
}
|
|
@@ -19,12 +19,11 @@ let CoreUser = class CoreUser extends defaultClasses_1.TimeStamps {
|
|
|
19
19
|
gender;
|
|
20
20
|
dob;
|
|
21
21
|
countryISO2;
|
|
22
|
-
fcmTokens;
|
|
23
22
|
profilePhoto;
|
|
24
23
|
status;
|
|
25
24
|
deviceIds;
|
|
26
25
|
stripeCustomerId;
|
|
27
|
-
|
|
26
|
+
rewardPoints;
|
|
28
27
|
};
|
|
29
28
|
exports.CoreUser = CoreUser;
|
|
30
29
|
__decorate([
|
|
@@ -47,10 +46,6 @@ __decorate([
|
|
|
47
46
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
48
47
|
__metadata("design:type", String)
|
|
49
48
|
], CoreUser.prototype, "countryISO2", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typegoose_1.prop)({ type: () => [String], default: [] }),
|
|
52
|
-
__metadata("design:type", Array)
|
|
53
|
-
], CoreUser.prototype, "fcmTokens", void 0);
|
|
54
49
|
__decorate([
|
|
55
50
|
(0, typegoose_1.prop)({ type: String }),
|
|
56
51
|
__metadata("design:type", String)
|
|
@@ -70,7 +65,7 @@ __decorate([
|
|
|
70
65
|
__decorate([
|
|
71
66
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
72
67
|
__metadata("design:type", Number)
|
|
73
|
-
], CoreUser.prototype, "
|
|
68
|
+
], CoreUser.prototype, "rewardPoints", void 0);
|
|
74
69
|
exports.CoreUser = CoreUser = __decorate([
|
|
75
70
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'coreUsers' } })
|
|
76
71
|
], CoreUser);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/core-user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAiD;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,GAAG,CAAQ;IAGX,WAAW,CAAU;IAGrB,
|
|
1
|
+
{"version":3,"file":"core-user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/core-user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAiD;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,GAAG,CAAQ;IAGX,WAAW,CAAU;IAGrB,YAAY,CAAU;IAGtB,MAAM,CAAU;IAGhB,SAAS,CAAY;IAGrB,gBAAgB,CAAU;IAG1B,YAAY,CAAU;CAC7B,CAAA;AA9BY,4BAAQ;AAEb;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uCACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCACjB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACzB,IAAI;qCAAC;AAGX;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACX;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACM;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;wCACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;2CACnB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACU;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8CACN;mBA7BjB,QAAQ;IADpB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC;GAChD,QAAQ,CA8BpB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status } from '../../../utilities/enum';\n\n@modelOptions({ schemaOptions: { collection: 'coreUsers' } })\nexport class CoreUser extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: false, type: String })\n\tpublic gender?: string;\n\n\t@prop({ required: false, type: Date })\n\tpublic dob?: Date;\n\n\t@prop({ required: true, type: String })\n\tpublic countryISO2!: string;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ required: true, type: () => [String] })\n\tpublic deviceIds!: string[];\n\n\t@prop({ type: String })\n\tpublic stripeCustomerId?: string;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic rewardPoints?: number;\n}\n"]}
|
|
@@ -93,6 +93,7 @@ import { VendorAccessControl } from './vendor-access-control.model';
|
|
|
93
93
|
import { ServiceCategory } from './service-category.model';
|
|
94
94
|
import { ServicePackage } from './service-package.model';
|
|
95
95
|
import { TeamMember } from './team-member.model';
|
|
96
|
+
import { ServiceOrder } from './service-order.model';
|
|
96
97
|
export declare const ActivityLogModel: ReturnModelType<typeof ActivityLog>;
|
|
97
98
|
export * from './activity-log.model';
|
|
98
99
|
export declare const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl>;
|
|
@@ -285,3 +286,5 @@ export declare const ServicePackageModel: ReturnModelType<typeof ServicePackage>
|
|
|
285
286
|
export * from './service-package.model';
|
|
286
287
|
export declare const TeamMemberModel: ReturnModelType<typeof TeamMember>;
|
|
287
288
|
export * from './team-member.model';
|
|
289
|
+
export declare const ServiceOrderModel: ReturnModelType<typeof ServiceOrder>;
|
|
290
|
+
export * from './service-order.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.TeamMemberModel = exports.ServicePackageModel = exports.ServiceCategoryModel = exports.VendorAccessControlModel = exports.VendorModel = exports.ServiceParentModel = exports.ChatroomModel = exports.AgentPerformanceModel = exports.MessageModel = exports.TicketModel = exports.RewardModel = exports.CancellationReasonModel = exports.SupportReasonModel = exports.TermsAndConditionsModel = exports.DefaultChatModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.SubscriptionSettingModel = exports.ShopModel = exports.ShopReviewModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.RiderReviewModel = exports.RequestAreaModel = exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductModel = void 0;
|
|
18
|
+
exports.ServiceOrderModel = exports.TeamMemberModel = exports.ServicePackageModel = exports.ServiceCategoryModel = exports.VendorAccessControlModel = exports.VendorModel = exports.ServiceParentModel = 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;
|
|
@@ -123,6 +123,7 @@ const vendor_access_control_model_1 = require("./vendor-access-control.model");
|
|
|
123
123
|
const service_category_model_1 = require("./service-category.model");
|
|
124
124
|
const service_package_model_1 = require("./service-package.model");
|
|
125
125
|
const team_member_model_1 = require("./team-member.model");
|
|
126
|
+
const service_order_model_1 = require("./service-order.model");
|
|
126
127
|
exports.ActivityLogModel = (0, typegoose_1.getModelForClass)(activity_log_model_1.ActivityLog);
|
|
127
128
|
__exportStar(require("./activity-log.model"), exports);
|
|
128
129
|
exports.AdminAccessControlModel = (0, typegoose_1.getModelForClass)(admin_access_control_model_1.AdminAccessControl);
|
|
@@ -372,4 +373,6 @@ exports.ServicePackageModel = (0, typegoose_1.getModelForClass)(service_package_
|
|
|
372
373
|
__exportStar(require("./service-package.model"), exports);
|
|
373
374
|
exports.TeamMemberModel = (0, typegoose_1.getModelForClass)(team_member_model_1.TeamMember);
|
|
374
375
|
__exportStar(require("./team-member.model"), exports);
|
|
376
|
+
exports.ServiceOrderModel = (0, typegoose_1.getModelForClass)(service_order_model_1.ServiceOrder);
|
|
377
|
+
__exportStar(require("./service-order.model"), exports);
|
|
375
378
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAkJA,oCAGC;AAED,gDAGC;AAED,4DAGC;AAED,sEAGC;AAED,sEAGC;AAED,wEAGC;AAED,sEAGC;AAED,4CAGC;AAED,oCAGC;AAGD,wDA8CC;AA9OD,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,qFAAyE;AACzE,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAAsE;AACtE,+EAAoE;AACpE,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6DAAmD;AACnD,6CAAoC;AACpC,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,2DAAiD;AACjD,6CAAoC;AACpC,6EAAmE;AACnE,6DAAoD;AACpD,2CAAkC;AAClC,6CAAoC;AACpC,qFAA0E;AAC1E,kDAOiC;AACjC,yEAA+D;AAC/D,mFAAyE;AACzE,mFAAyE;AACzE,6FAAkF;AAClF,yEAA+D;AAC/D,6FAAkF;AAClF,2FAAgF;AAChF,6FAAkF;AAClF,6EAAmE;AACnE,uFAA4E;AAC5E,2FAA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AC;AAC5G,0DAAwC;AAE3B,QAAA,eAAe,GAAuC,IAAA,4BAAgB,EAAC,8BAAU,CAAC,CAAA;AAC/F,sDAAmC","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';\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 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'"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAmJA,oCAGC;AAED,gDAGC;AAED,4DAGC;AAED,sEAGC;AAED,sEAGC;AAED,wEAGC;AAED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AAA,uBAAuB,GACnC,IAAA,4BAAgB,EAAC,8CAAkB,CAAC,CAAC;AACtC,8DAA4C;AAE5C,2DAAyC;AACzC,oEAAkD;AAErC,QAAA,WAAW,GAAmC,IAAA,4BAAgB,EAAC,qBAAM,CAAC,CAAC;AACpF,iDAA+B;AAElB,QAAA,WAAW,GAAmC,IAAA,4BAAgB,EAAC,qBAAM,CAAC,CAAC;AACpF,iDAA+B;AAElB,QAAA,YAAY,GAAoC,IAAA,4BAAgB,EAAC,uBAAO,CAAC,CAAC;AACvF,kDAAgC;AAEnB,QAAA,qBAAqB,GACjC,IAAA,4BAAgB,EAAC,0CAAgB,CAAC,CAAC;AACpC,4DAA0C;AAE7B,QAAA,aAAa,GAAqC,IAAA,4BAAgB,EAAC,0BAAQ,CAAC,CAAC;AAC1F,oDAAkC;AAElC,oEAAkD;AAErC,QAAA,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","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';\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 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'"]}
|
|
@@ -3,7 +3,6 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
|
3
3
|
import { ClickType, NotificationAccountType } from '../../../utilities/enum';
|
|
4
4
|
import { Admin } from './admin.model';
|
|
5
5
|
import { BOBFinance } from './bob-finance.model';
|
|
6
|
-
import { CoreUser } from './core-user.model';
|
|
7
6
|
import { ListContainer } from './list-container.model';
|
|
8
7
|
import { Order } from './order.model';
|
|
9
8
|
import { Parent } from './parent.model';
|
|
@@ -12,14 +11,15 @@ import { Product } from './product.model';
|
|
|
12
11
|
import { RequestArea } from './request-area.model';
|
|
13
12
|
import { Rider } from './rider.model';
|
|
14
13
|
import { Shop } from './shop.model';
|
|
14
|
+
import { User } from './user.model';
|
|
15
15
|
export declare class Notification extends TimeStamps {
|
|
16
16
|
title: string;
|
|
17
17
|
body: string;
|
|
18
18
|
image?: string;
|
|
19
19
|
sound?: string;
|
|
20
20
|
accountType: NotificationAccountType;
|
|
21
|
-
isGlobal
|
|
22
|
-
users?: Ref<
|
|
21
|
+
isGlobal: boolean;
|
|
22
|
+
users?: Ref<User>[];
|
|
23
23
|
parents?: Ref<Parent>[];
|
|
24
24
|
shops?: Ref<Shop>[];
|
|
25
25
|
riders?: Ref<Rider>[];
|
|
@@ -35,5 +35,6 @@ export declare class Notification extends TimeStamps {
|
|
|
35
35
|
clickableBOBFinance?: Ref<BOBFinance>;
|
|
36
36
|
clickableRequestArea?: Ref<RequestArea>;
|
|
37
37
|
isSendByAdmin?: boolean;
|
|
38
|
+
createdBy?: Ref<Admin>;
|
|
38
39
|
seenBy?: mongoose.Types.ObjectId[];
|
|
39
40
|
}
|
|
@@ -15,7 +15,6 @@ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
|
15
15
|
const enum_1 = require("../../../utilities/enum");
|
|
16
16
|
const admin_model_1 = require("./admin.model");
|
|
17
17
|
const bob_finance_model_1 = require("./bob-finance.model");
|
|
18
|
-
const core_user_model_1 = require("./core-user.model");
|
|
19
18
|
const list_container_model_1 = require("./list-container.model");
|
|
20
19
|
const order_model_1 = require("./order.model");
|
|
21
20
|
const parent_model_1 = require("./parent.model");
|
|
@@ -24,6 +23,7 @@ const product_model_1 = require("./product.model");
|
|
|
24
23
|
const request_area_model_1 = require("./request-area.model");
|
|
25
24
|
const rider_model_1 = require("./rider.model");
|
|
26
25
|
const shop_model_1 = require("./shop.model");
|
|
26
|
+
const user_model_1 = require("./user.model");
|
|
27
27
|
let Notification = class Notification extends defaultClasses_1.TimeStamps {
|
|
28
28
|
title;
|
|
29
29
|
body;
|
|
@@ -47,15 +47,16 @@ let Notification = class Notification extends defaultClasses_1.TimeStamps {
|
|
|
47
47
|
clickableBOBFinance;
|
|
48
48
|
clickableRequestArea;
|
|
49
49
|
isSendByAdmin;
|
|
50
|
+
createdBy;
|
|
50
51
|
seenBy;
|
|
51
52
|
};
|
|
52
53
|
exports.Notification = Notification;
|
|
53
54
|
__decorate([
|
|
54
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
55
|
+
(0, typegoose_1.prop)({ required: true, type: String, maxlength: 50 }),
|
|
55
56
|
__metadata("design:type", String)
|
|
56
57
|
], Notification.prototype, "title", void 0);
|
|
57
58
|
__decorate([
|
|
58
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
59
|
+
(0, typegoose_1.prop)({ required: true, type: String, maxlength: 250 }),
|
|
59
60
|
__metadata("design:type", String)
|
|
60
61
|
], Notification.prototype, "body", void 0);
|
|
61
62
|
__decorate([
|
|
@@ -71,11 +72,11 @@ __decorate([
|
|
|
71
72
|
__metadata("design:type", String)
|
|
72
73
|
], Notification.prototype, "accountType", void 0);
|
|
73
74
|
__decorate([
|
|
74
|
-
(0, typegoose_1.prop)({
|
|
75
|
+
(0, typegoose_1.prop)({ required: true, type: Boolean }),
|
|
75
76
|
__metadata("design:type", Boolean)
|
|
76
77
|
], Notification.prototype, "isGlobal", void 0);
|
|
77
78
|
__decorate([
|
|
78
|
-
(0, typegoose_1.prop)({ ref: () =>
|
|
79
|
+
(0, typegoose_1.prop)({ ref: () => user_model_1.User, default: [] }),
|
|
79
80
|
__metadata("design:type", Array)
|
|
80
81
|
], Notification.prototype, "users", void 0);
|
|
81
82
|
__decorate([
|
|
@@ -138,17 +139,20 @@ __decorate([
|
|
|
138
139
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
139
140
|
__metadata("design:type", Boolean)
|
|
140
141
|
], Notification.prototype, "isSendByAdmin", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
144
|
+
__metadata("design:type", Object)
|
|
145
|
+
], Notification.prototype, "createdBy", void 0);
|
|
141
146
|
__decorate([
|
|
142
147
|
(0, typegoose_1.prop)({ type: () => [typegoose_1.mongoose.Types.ObjectId], default: [] }),
|
|
143
148
|
__metadata("design:type", Array)
|
|
144
149
|
], Notification.prototype, "seenBy", void 0);
|
|
145
150
|
exports.Notification = Notification = __decorate([
|
|
146
151
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'notifications' } }),
|
|
147
|
-
(0, typegoose_1.index)({
|
|
148
|
-
(0, typegoose_1.index)({
|
|
149
|
-
(0, typegoose_1.index)({
|
|
150
|
-
(0, typegoose_1.index)({
|
|
151
|
-
(0, typegoose_1.index)({
|
|
152
|
-
(0, typegoose_1.index)({ accountType: 1, type: 1, createdAt: 1 })
|
|
152
|
+
(0, typegoose_1.index)({ isGlobal: 1, users: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.USER, deletedAt: null } }),
|
|
153
|
+
(0, typegoose_1.index)({ isGlobal: 1, shops: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.SHOP, deletedAt: null } }),
|
|
154
|
+
(0, typegoose_1.index)({ isGlobal: 1, riders: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.RIDER, deletedAt: null } }),
|
|
155
|
+
(0, typegoose_1.index)({ isGlobal: 1, admins: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.ADMIN, deletedAt: null } }),
|
|
156
|
+
(0, typegoose_1.index)({ isGlobal: 1, parents: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.PARENT, deletedAt: null } })
|
|
153
157
|
], Notification);
|
|
154
158
|
//# sourceMappingURL=notification.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.model.js","sourceRoot":"/","sources":["libraries/mongo/models/notification.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAA6E;AAC7E,+CAAsC;AACtC,2DAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"notification.model.js","sourceRoot":"/","sources":["libraries/mongo/models/notification.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAA6E;AAC7E,+CAAsC;AACtC,2DAAiD;AACjD,iEAAuD;AACvD,+CAAsC;AACtC,iDAAwC;AACxC,iDAAwC;AACxC,mDAA0C;AAC1C,6DAAmD;AACnD,+CAAsC;AACtC,6CAAoC;AACpC,6CAAoC;AAuB7B,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,2BAAU;IAEpC,KAAK,CAAU;IAGf,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,KAAK,CAAU;IAGf,WAAW,CAA2B;IAGtC,QAAQ,CAAW;IAGnB,KAAK,CAAe;IAGpB,OAAO,CAAiB;IAGxB,KAAK,CAAe;IAGpB,MAAM,CAAgB;IAGtB,MAAM,CAAgB;IAGtB,WAAW,CAAW;IAGtB,SAAS,CAAa;IAGtB,YAAY,CAAU;IAGtB,cAAc,CAAc;IAG5B,aAAa,CAAa;IAG1B,gBAAgB,CAAgB;IAGhC,sBAAsB,CAAsB;IAG5C,eAAe,CAAe;IAG9B,mBAAmB,CAAmB;IAGtC,oBAAoB,CAAoB;IAGxC,aAAa,CAAW;IAGxB,SAAS,CAAc;IAGvB,MAAM,CAA6B;CAC1C,CAAA;AAxEY,oCAAY;AAEjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;2CAChC;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM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AAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EACxC,EAAE,uBAAuB,EAAE,EAAE,WAAW,EAAE,8BAAuB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC3F;IACA,IAAA,iBAAK,EACL,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EACxC,EAAE,uBAAuB,EAAE,EAAE,WAAW,EAAE,8BAAuB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC3F;IACA,IAAA,iBAAK,EACL,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EACzC,EAAE,uBAAuB,EAAE,EAAE,WAAW,EAAE,8BAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC5F;IACA,IAAA,iBAAK,EACL,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EACzC,EAAE,uBAAuB,EAAE,EAAE,WAAW,EAAE,8BAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC5F;IACA,IAAA,iBAAK,EACL,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAC1C,EAAE,uBAAuB,EAAE,EAAE,WAAW,EAAE,8BAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC7F;GACY,YAAY,CAwExB","sourcesContent":["import { index, modelOptions, mongoose, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ClickType, NotificationAccountType } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\nimport { BOBFinance } from './bob-finance.model';\nimport { ListContainer } from './list-container.model';\nimport { Order } from './order.model';\nimport { Parent } from './parent.model';\nimport { Payout } from './payout.model';\nimport { Product } from './product.model';\nimport { RequestArea } from './request-area.model';\nimport { Rider } from './rider.model';\nimport { Shop } from './shop.model';\nimport { User } from './user.model';\n\n@modelOptions({ schemaOptions: { collection: 'notifications' } })\n@index(\n\t{ isGlobal: 1, users: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.USER, deletedAt: null } }\n)\n@index(\n\t{ isGlobal: 1, shops: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.SHOP, deletedAt: null } }\n)\n@index(\n\t{ isGlobal: 1, riders: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.RIDER, deletedAt: null } }\n)\n@index(\n\t{ isGlobal: 1, admins: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.ADMIN, deletedAt: null } }\n)\n@index(\n\t{ isGlobal: 1, parents: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.PARENT, deletedAt: null } }\n)\nexport class Notification extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic title!: string;\n\n\t@prop({ required: true, type: String, maxlength: 250 })\n\tpublic body!: string;\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({ type: String })\n\tpublic sound?: string;\n\n\t@prop({ required: true, type: String, enum: NotificationAccountType })\n\tpublic accountType!: NotificationAccountType;\n\n\t@prop({ required: true, type: Boolean })\n\tpublic isGlobal!: boolean;\n\n\t@prop({ ref: () => User, default: [] })\n\tpublic users?: Ref<User>[];\n\n\t@prop({ ref: () => Parent, default: [] })\n\tpublic parents?: Ref<Parent>[];\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ ref: () => Rider, default: [] })\n\tpublic riders?: Ref<Rider>[];\n\n\t@prop({ ref: () => Admin, default: [] })\n\tpublic admins?: Ref<Admin>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isClickable?: boolean;\n\n\t@prop({ type: String, enum: ClickType })\n\tpublic clickType?: ClickType;\n\n\t@prop({ type: String, trim: true })\n\tpublic clickableUrl?: string;\n\n\t@prop({ ref: () => Order })\n\tpublic clickableOrder?: Ref<Order>;\n\n\t@prop({ ref: () => Shop })\n\tpublic clickableShop?: Ref<Shop>;\n\n\t@prop({ ref: () => Product })\n\tpublic clickableProduct?: Ref<Product>;\n\n\t@prop({ ref: () => ListContainer })\n\tpublic clickableListContainer?: Ref<ListContainer>;\n\n\t@prop({ ref: () => Payout })\n\tpublic clickablePayout?: Ref<Payout>;\n\n\t@prop({ ref: () => BOBFinance })\n\tpublic clickableBOBFinance?: Ref<BOBFinance>;\n\n\t@prop({ ref: () => RequestArea })\n\tpublic clickableRequestArea?: Ref<RequestArea>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSendByAdmin?: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic createdBy?: Ref<Admin>;\n\n\t@prop({ type: () => [mongoose.Types.ObjectId], default: [] })\n\tpublic seenBy?: mongoose.Types.ObjectId[];\n}\n"]}
|
|
@@ -6,14 +6,13 @@ import { Shop } from './shop.model';
|
|
|
6
6
|
import { UserAddress } from './shared/address.model';
|
|
7
7
|
import { Coupon } from './coupon.model';
|
|
8
8
|
import { Subscription } from './subscription.model';
|
|
9
|
-
import { OnlineStatus
|
|
9
|
+
import { OnlineStatus } from '../../../utilities/enum';
|
|
10
10
|
import { OTPFields } from './embedded/otp-fields.model';
|
|
11
11
|
export declare class User extends TimeStamps {
|
|
12
12
|
coreUser: Ref<CoreUser>;
|
|
13
13
|
favoriteProducts?: Ref<Product>[];
|
|
14
14
|
favoriteShops?: Ref<Shop>[];
|
|
15
15
|
addresses?: UserAddress[];
|
|
16
|
-
status?: Status;
|
|
17
16
|
orderCompleted?: number;
|
|
18
17
|
repeatedOrderAt?: Date;
|
|
19
18
|
walletBalance?: number;
|
|
@@ -29,6 +28,7 @@ export declare class User extends TimeStamps {
|
|
|
29
28
|
phoneOtpInfo?: OTPFields;
|
|
30
29
|
isPhoneVerified?: boolean;
|
|
31
30
|
onlineStatus?: OnlineStatus;
|
|
31
|
+
fcmTokens?: string[];
|
|
32
32
|
static updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject> & Omit<User & {
|
|
33
33
|
_id: import("mongoose").Types.ObjectId;
|
|
34
34
|
} & {
|
|
@@ -26,7 +26,6 @@ let User = User_1 = class User extends defaultClasses_1.TimeStamps {
|
|
|
26
26
|
favoriteProducts;
|
|
27
27
|
favoriteShops;
|
|
28
28
|
addresses;
|
|
29
|
-
status;
|
|
30
29
|
orderCompleted;
|
|
31
30
|
repeatedOrderAt;
|
|
32
31
|
walletBalance;
|
|
@@ -42,6 +41,7 @@ let User = User_1 = class User extends defaultClasses_1.TimeStamps {
|
|
|
42
41
|
phoneOtpInfo;
|
|
43
42
|
isPhoneVerified;
|
|
44
43
|
onlineStatus;
|
|
44
|
+
fcmTokens;
|
|
45
45
|
static async updateWallet(userId, amount) {
|
|
46
46
|
return this.findByIdAndUpdate(userId, { $inc: { walletBalance: amount } }, { new: true });
|
|
47
47
|
}
|
|
@@ -63,10 +63,6 @@ __decorate([
|
|
|
63
63
|
(0, typegoose_1.prop)({ type: () => [address_model_1.UserAddress] }),
|
|
64
64
|
__metadata("design:type", Array)
|
|
65
65
|
], User.prototype, "addresses", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
68
|
-
__metadata("design:type", String)
|
|
69
|
-
], User.prototype, "status", void 0);
|
|
70
66
|
__decorate([
|
|
71
67
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
72
68
|
__metadata("design:type", Number)
|
|
@@ -131,6 +127,10 @@ __decorate([
|
|
|
131
127
|
}),
|
|
132
128
|
__metadata("design:type", String)
|
|
133
129
|
], User.prototype, "onlineStatus", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, typegoose_1.prop)({ type: () => [String], default: [] }),
|
|
132
|
+
__metadata("design:type", Array)
|
|
133
|
+
], User.prototype, "fcmTokens", void 0);
|
|
134
134
|
exports.User = User = User_1 = __decorate([
|
|
135
135
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'users' } }),
|
|
136
136
|
(0, typegoose_1.index)({ createdAt: 1, addresses: 1 })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAuF;AACvF,4EAAqE;AACrE,uDAA6C;AAC7C,mDAA0C;AAC1C,6CAAoC;AACpC,0DAAqD;AACrD,iDAAwC;AACxC,6DAAoD;AACpD,kDAAiF;AACjF,kEAAwD;AAIjD,IAAM,IAAI,YAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,QAAQ,CAAiB;IAGzB,gBAAgB,CAAkB;IAGlC,aAAa,CAAe;IAG5B,SAAS,CAAiB;IAG1B,
|
|
1
|
+
{"version":3,"file":"user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAuF;AACvF,4EAAqE;AACrE,uDAA6C;AAC7C,mDAA0C;AAC1C,6CAAoC;AACpC,0DAAqD;AACrD,iDAAwC;AACxC,6DAAoD;AACpD,kDAAiF;AACjF,kEAAwD;AAIjD,IAAM,IAAI,YAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,QAAQ,CAAiB;IAGzB,gBAAgB,CAAkB;IAGlC,aAAa,CAAe;IAG5B,SAAS,CAAiB;IAG1B,cAAc,CAAU;IAGxB,eAAe,CAAQ;IAGvB,aAAa,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;QAClB,OAAO,EAAE,mBAAY,CAAC,OAAO;KAC7B,CAAC;;0CACiC;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uCAChB;eA/DhB,IAAI;IAFhB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;IACxD,IAAA,iBAAK,EAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;GACzB,IAAI,CAoEhB","sourcesContent":["import { index, modelOptions, prop, Ref, ReturnModelType } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CoreUser } from './core-user.model';\nimport { Product } from './product.model';\nimport { Shop } from './shop.model';\nimport { UserAddress } from './shared/address.model';\nimport { Coupon } from './coupon.model';\nimport { Subscription } from './subscription.model';\nimport { OnlineStatus, ShopOnlineStatus, Status } from '../../../utilities/enum';\nimport { OTPFields } from './embedded/otp-fields.model';\n\n@modelOptions({ schemaOptions: { collection: 'users' } })\n@index({ createdAt: 1, addresses: 1 })\nexport class User extends TimeStamps {\n\t@prop({ required: true, ref: () => CoreUser })\n\tpublic coreUser!: Ref<CoreUser>;\n\n\t@prop({ type: () => [String], ref: () => Product })\n\tpublic favoriteProducts?: Ref<Product>[];\n\n\t@prop({ type: () => [String], ref: () => Shop })\n\tpublic favoriteShops?: Ref<Shop>[];\n\n\t@prop({ type: () => [UserAddress] })\n\tpublic addresses?: UserAddress[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic orderCompleted?: number;\n\n\t@prop({ type: Date })\n\tpublic repeatedOrderAt?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic walletBalance?: number;\n\n\t@prop({ ref: () => Coupon })\n\tpublic coupons?: Ref<Coupon>[];\n\n\t@prop({ type: String })\n\tpublic newUserCouponDiscountType?: string;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponValue?: number;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponMaximumDiscountLimit?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNewUserCouponShowed?: boolean;\n\n\t@prop({ ref: () => Coupon })\n\tpublic referralCode?: Ref<Coupon>;\n\n\t@prop({ type: String, ref: () => Subscription })\n\tpublic subscription?: Ref<Subscription>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSubscribed?: boolean;\n\n\t@prop({ type: String, unique: true, sparse: true })\n\tpublic phoneNumber?: string;\n\n\t@prop({ type: () => OTPFields })\n\tpublic phoneOtpInfo?: OTPFields;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPhoneVerified?: boolean;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: OnlineStatus,\n\t\tdefault: OnlineStatus.OFFLINE,\n\t})\n\tpublic onlineStatus?: OnlineStatus;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic fcmTokens?: string[];\n\n\tpublic static async updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number) {\n\t\treturn this.findByIdAndUpdate(userId, { $inc: { walletBalance: amount } }, { new: true });\n\t}\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateHTTPContextOptions } from '@trpc/server/
|
|
1
|
+
import { CreateHTTPContextOptions } from '@trpc/server/adapters/standalone';
|
|
2
2
|
import type { CreateWSSContextFnOptions } from '@trpc/server/adapters/ws';
|
|
3
3
|
import { AuthEntityType } from '../auth';
|
|
4
4
|
import jwt from 'jsonwebtoken';
|
|
@@ -24,6 +24,7 @@ export declare const createLyxaWsContext: (opts: CreateWSSContextFnOptions) => P
|
|
|
24
24
|
tokenRenewed: boolean;
|
|
25
25
|
req: import("http").IncomingMessage;
|
|
26
26
|
res: import("ws").WebSocket;
|
|
27
|
+
info: import("@trpc/server/dist/unstable-core-do-not-import.d-C6mFWtNG.cjs").TRPCRequestInfo;
|
|
27
28
|
}>;
|
|
28
29
|
export type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;
|
|
29
30
|
export type LyxaWSContext = Awaited<ReturnType<typeof createLyxaWsContext>>;
|
|
@@ -1 +1 @@
|
|
|
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/
|
|
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/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,178 +1,68 @@
|
|
|
1
|
-
export declare const t: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
stack: undefined;
|
|
14
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
15
|
-
};
|
|
16
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
17
|
-
}>;
|
|
18
|
-
procedure: import("@trpc/server").ProcedureBuilder<{
|
|
19
|
-
_config: import("@trpc/server").RootConfig<{
|
|
20
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
21
|
-
meta: object;
|
|
22
|
-
errorShape: {
|
|
23
|
-
message: string;
|
|
24
|
-
data: {
|
|
25
|
-
stack: undefined;
|
|
26
|
-
path: undefined;
|
|
27
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
28
|
-
httpStatus: number;
|
|
29
|
-
};
|
|
30
|
-
stack: undefined;
|
|
31
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
32
|
-
};
|
|
33
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
34
|
-
}>;
|
|
35
|
-
_ctx_out: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
36
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
37
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
38
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
39
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
40
|
-
_meta: object;
|
|
41
|
-
}>;
|
|
42
|
-
middleware: <TNewParams extends import("@trpc/server").ProcedureParams<import("@trpc/server").AnyRootConfig, unknown, unknown, unknown, unknown, unknown, unknown>>(fn: import("@trpc/server").MiddlewareFunction<{
|
|
43
|
-
_config: import("@trpc/server").RootConfig<{
|
|
44
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
45
|
-
meta: object;
|
|
46
|
-
errorShape: {
|
|
47
|
-
message: string;
|
|
48
|
-
data: {
|
|
49
|
-
stack: undefined;
|
|
50
|
-
path: undefined;
|
|
51
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
52
|
-
httpStatus: number;
|
|
53
|
-
};
|
|
54
|
-
stack: undefined;
|
|
55
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
56
|
-
};
|
|
57
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
58
|
-
}>;
|
|
59
|
-
_ctx_out: {};
|
|
60
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
61
|
-
_input_in: unknown;
|
|
62
|
-
_output_in: unknown;
|
|
63
|
-
_output_out: unknown;
|
|
64
|
-
_meta: object;
|
|
65
|
-
}, TNewParams>) => import("@trpc/server").MiddlewareBuilder<{
|
|
66
|
-
_config: import("@trpc/server").RootConfig<{
|
|
67
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
68
|
-
meta: object;
|
|
69
|
-
errorShape: {
|
|
70
|
-
message: string;
|
|
71
|
-
data: {
|
|
72
|
-
stack: undefined;
|
|
73
|
-
path: undefined;
|
|
74
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
75
|
-
httpStatus: number;
|
|
76
|
-
};
|
|
77
|
-
stack: undefined;
|
|
78
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
79
|
-
};
|
|
80
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
81
|
-
}>;
|
|
82
|
-
_ctx_out: {};
|
|
83
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
84
|
-
_input_in: unknown;
|
|
85
|
-
_output_in: unknown;
|
|
86
|
-
_output_out: unknown;
|
|
87
|
-
_meta: object;
|
|
88
|
-
}, TNewParams>;
|
|
89
|
-
router: <TProcRouterRecord extends import("@trpc/server").ProcedureRouterRecord>(procedures: TProcRouterRecord) => import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
|
90
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
91
|
-
meta: object;
|
|
92
|
-
errorShape: {
|
|
93
|
-
message: string;
|
|
94
|
-
data: {
|
|
95
|
-
stack: undefined;
|
|
96
|
-
path: undefined;
|
|
97
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
98
|
-
httpStatus: number;
|
|
99
|
-
};
|
|
100
|
-
stack: undefined;
|
|
101
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
102
|
-
};
|
|
103
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
104
|
-
}>, TProcRouterRecord>;
|
|
105
|
-
mergeRouters: typeof import("@trpc/server").mergeRouters;
|
|
106
|
-
createCallerFactory: <TRouter extends import("@trpc/server").Router<import("@trpc/server").AnyRouterDef<import("@trpc/server").RootConfig<{
|
|
107
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
108
|
-
meta: object;
|
|
109
|
-
errorShape: {
|
|
110
|
-
message: string;
|
|
111
|
-
data: {
|
|
112
|
-
stack: undefined;
|
|
113
|
-
path: undefined;
|
|
114
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
115
|
-
httpStatus: number;
|
|
116
|
-
};
|
|
1
|
+
export declare const t: import("@trpc/server").TRPCRootObject<import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams, object, {
|
|
2
|
+
errorFormatter({ shape, error }: {
|
|
3
|
+
error: import("@trpc/server").TRPCError;
|
|
4
|
+
type: import("@trpc/server").ProcedureType | "unknown";
|
|
5
|
+
path: string | undefined;
|
|
6
|
+
input: unknown;
|
|
7
|
+
ctx: (import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams) | undefined;
|
|
8
|
+
shape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
9
|
+
}): {
|
|
10
|
+
message: string;
|
|
11
|
+
data: {
|
|
117
12
|
stack: undefined;
|
|
118
|
-
|
|
13
|
+
path: undefined;
|
|
14
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
15
|
+
httpStatus: number;
|
|
119
16
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
data: {
|
|
130
|
-
stack: undefined;
|
|
131
|
-
path: undefined;
|
|
132
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
133
|
-
httpStatus: number;
|
|
134
|
-
};
|
|
17
|
+
stack: undefined;
|
|
18
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
ctx: import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
22
|
+
meta: object;
|
|
23
|
+
errorShape: {
|
|
24
|
+
message: string;
|
|
25
|
+
data: {
|
|
135
26
|
stack: undefined;
|
|
136
|
-
|
|
27
|
+
path: undefined;
|
|
28
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
29
|
+
httpStatus: number;
|
|
137
30
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
143
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
144
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
145
|
-
_meta: object;
|
|
31
|
+
stack: undefined;
|
|
32
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
33
|
+
};
|
|
34
|
+
transformer: false;
|
|
146
35
|
}>;
|
|
147
|
-
export declare const
|
|
148
|
-
|
|
36
|
+
export declare const publicProcedure: import("@trpc/server").TRPCProcedureBuilder<import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams, object, object, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
37
|
+
export declare const createTRPCRouter: import("@trpc/server").TRPCRouterBuilder<{
|
|
38
|
+
ctx: import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
149
39
|
meta: object;
|
|
150
40
|
errorShape: {
|
|
151
41
|
message: string;
|
|
152
42
|
data: {
|
|
153
43
|
stack: undefined;
|
|
154
44
|
path: undefined;
|
|
155
|
-
code: import("@trpc/server
|
|
45
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
156
46
|
httpStatus: number;
|
|
157
47
|
};
|
|
158
48
|
stack: undefined;
|
|
159
|
-
code: import("@trpc/server
|
|
49
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
160
50
|
};
|
|
161
|
-
transformer:
|
|
162
|
-
}
|
|
163
|
-
export declare const createCallerFactory:
|
|
164
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
51
|
+
transformer: false;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const createCallerFactory: import("@trpc/server").TRPCRouterCallerFactory<{
|
|
54
|
+
ctx: import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
165
55
|
meta: object;
|
|
166
56
|
errorShape: {
|
|
167
57
|
message: string;
|
|
168
58
|
data: {
|
|
169
59
|
stack: undefined;
|
|
170
60
|
path: undefined;
|
|
171
|
-
code: import("@trpc/server
|
|
61
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
172
62
|
httpStatus: number;
|
|
173
63
|
};
|
|
174
64
|
stack: undefined;
|
|
175
|
-
code: import("@trpc/server
|
|
65
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
176
66
|
};
|
|
177
|
-
transformer:
|
|
178
|
-
}
|
|
67
|
+
transformer: false;
|
|
68
|
+
}>;
|
|
@@ -4,36 +4,14 @@ interface AuthOptions {
|
|
|
4
4
|
allowRefreshToken?: boolean;
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
httpStatus: number;
|
|
18
|
-
};
|
|
19
|
-
stack: undefined;
|
|
20
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
21
|
-
};
|
|
22
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
23
|
-
}>;
|
|
24
|
-
_meta: object;
|
|
25
|
-
_ctx_out: {
|
|
26
|
-
requestId: string | undefined;
|
|
27
|
-
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
28
|
-
tokenType: TokenType | undefined;
|
|
29
|
-
entity: import("../context").EntityContext | undefined;
|
|
30
|
-
req: import("http").IncomingMessage;
|
|
31
|
-
usedRefreshToken: boolean | undefined;
|
|
32
|
-
tokenRenewed: boolean | undefined;
|
|
33
|
-
};
|
|
34
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
35
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
36
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
37
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
38
|
-
}>;
|
|
7
|
+
export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("../context").LyxaContextParams, object, {
|
|
8
|
+
info: import("@trpc/server/dist/unstable-core-do-not-import.d-C6mFWtNG.cjs").TRPCRequestInfo;
|
|
9
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
|
+
tokenType: TokenType | undefined;
|
|
11
|
+
entity: import("../context").EntityContext | undefined;
|
|
12
|
+
req: import("http").IncomingMessage;
|
|
13
|
+
requestId: string | undefined;
|
|
14
|
+
usedRefreshToken: boolean | undefined;
|
|
15
|
+
tokenRenewed: boolean | undefined;
|
|
16
|
+
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
39
17
|
export {};
|
|
@@ -2,36 +2,14 @@ import { AuthEntityType } from '../../auth';
|
|
|
2
2
|
interface PhoneVerifiedOptions {
|
|
3
3
|
entityTypes: AuthEntityType[];
|
|
4
4
|
}
|
|
5
|
-
export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
httpStatus: number;
|
|
16
|
-
};
|
|
17
|
-
stack: undefined;
|
|
18
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
19
|
-
};
|
|
20
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
21
|
-
}>;
|
|
22
|
-
_meta: object;
|
|
23
|
-
_ctx_out: {
|
|
24
|
-
requestId: string | undefined;
|
|
25
|
-
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
26
|
-
tokenType: import("../../auth").TokenType | undefined;
|
|
27
|
-
entity: import("../context").EntityContext | undefined;
|
|
28
|
-
req: import("http").IncomingMessage;
|
|
29
|
-
usedRefreshToken: boolean | undefined;
|
|
30
|
-
tokenRenewed: boolean | undefined;
|
|
31
|
-
};
|
|
32
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
33
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
34
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
35
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
36
|
-
}>;
|
|
5
|
+
export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").TRPCProcedureBuilder<import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("../context").LyxaContextParams, object, {
|
|
6
|
+
info: import("@trpc/server/dist/unstable-core-do-not-import.d-C6mFWtNG.cjs").TRPCRequestInfo;
|
|
7
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
8
|
+
tokenType: import("../../auth").TokenType | undefined;
|
|
9
|
+
entity: import("../context").EntityContext | undefined;
|
|
10
|
+
req: import("http").IncomingMessage;
|
|
11
|
+
requestId: string | undefined;
|
|
12
|
+
usedRefreshToken: boolean | undefined;
|
|
13
|
+
tokenRenewed: boolean | undefined;
|
|
14
|
+
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
37
15
|
export {};
|
|
@@ -4,36 +4,14 @@ interface AuthOptions {
|
|
|
4
4
|
allowRefreshToken?: boolean;
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
httpStatus: number;
|
|
18
|
-
};
|
|
19
|
-
stack: undefined;
|
|
20
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
21
|
-
};
|
|
22
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
23
|
-
}>;
|
|
24
|
-
_meta: object;
|
|
25
|
-
_ctx_out: {
|
|
26
|
-
requestId: string | undefined;
|
|
27
|
-
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
28
|
-
tokenType: TokenType | undefined;
|
|
29
|
-
entity: import("../context").EntityContext | undefined;
|
|
30
|
-
req: import("http").IncomingMessage;
|
|
31
|
-
usedRefreshToken: boolean | undefined;
|
|
32
|
-
tokenRenewed: boolean | undefined;
|
|
33
|
-
};
|
|
34
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
35
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
36
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
37
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
38
|
-
}>;
|
|
7
|
+
export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("../context").LyxaContextParams, object, {
|
|
8
|
+
info: import("@trpc/server/dist/unstable-core-do-not-import.d-C6mFWtNG.cjs").TRPCRequestInfo;
|
|
9
|
+
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
|
+
tokenType: TokenType | undefined;
|
|
11
|
+
entity: import("../context").EntityContext | undefined;
|
|
12
|
+
req: import("http").IncomingMessage;
|
|
13
|
+
requestId: string | undefined;
|
|
14
|
+
usedRefreshToken: boolean | undefined;
|
|
15
|
+
tokenRenewed: boolean | undefined;
|
|
16
|
+
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
39
17
|
export {};
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.166-test",
|
|
4
4
|
"description": "Lyxa type definitions and validation schemas for both frontend and backend",
|
|
5
5
|
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { mongoose } from "@typegoose/typegoose";
|
|
2
|
+
import { AdminLogsUpdatedFieldsType } from "../enum";
|
|
1
3
|
export declare function getChangedFields<T extends Record<string, any>>(oldDoc: T, newDoc: T, payload?: Partial<T>): Record<keyof T, {
|
|
2
4
|
old: any;
|
|
3
5
|
new: any;
|
|
@@ -13,3 +15,9 @@ export declare function extractChangedDocument(changes: Record<string, {
|
|
|
13
15
|
old: any;
|
|
14
16
|
new: any;
|
|
15
17
|
}>, type: 'old' | 'new'): Record<string, any>;
|
|
18
|
+
export declare function publishAdminLogsEvent(payload: {
|
|
19
|
+
deletedBy: mongoose.Types.ObjectId;
|
|
20
|
+
updatedField: AdminLogsUpdatedFieldsType;
|
|
21
|
+
oldDoc: any;
|
|
22
|
+
newDoc: any;
|
|
23
|
+
}): Promise<void>;
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getChangedFields = getChangedFields;
|
|
4
4
|
exports.filterRelevantChanges = filterRelevantChanges;
|
|
5
5
|
exports.extractChangedDocument = extractChangedDocument;
|
|
6
|
+
exports.publishAdminLogsEvent = publishAdminLogsEvent;
|
|
7
|
+
const event_1 = require("../../libraries/event");
|
|
8
|
+
const admin_logs_event_1 = require("../../libraries/event/events/admin-logs-event");
|
|
6
9
|
function getChangedFields(oldDoc, newDoc, payload) {
|
|
7
10
|
const changes = {};
|
|
8
11
|
const oldObj = typeof oldDoc.toObject === 'function' ? oldDoc.toObject() : oldDoc;
|
|
@@ -30,4 +33,14 @@ function filterRelevantChanges(allChanges, payload) {
|
|
|
30
33
|
function extractChangedDocument(changes, type) {
|
|
31
34
|
return Object.fromEntries(Object.entries(changes).map(([key, value]) => [key, value[type]]));
|
|
32
35
|
}
|
|
36
|
+
async function publishAdminLogsEvent(payload) {
|
|
37
|
+
const { deletedBy, updatedField, oldDoc, newDoc } = payload;
|
|
38
|
+
const adminActivityLogsEvent = new admin_logs_event_1.AdminActivityLogsEvent({
|
|
39
|
+
admin: deletedBy,
|
|
40
|
+
updatedField: updatedField,
|
|
41
|
+
oldDocument: oldDoc,
|
|
42
|
+
newDocument: newDoc,
|
|
43
|
+
});
|
|
44
|
+
await (0, event_1.publishEvent)(adminActivityLogsEvent);
|
|
45
|
+
}
|
|
33
46
|
//# sourceMappingURL=logs-common-methods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs-common-methods.js","sourceRoot":"/","sources":["utilities/common/logs-common-methods.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"logs-common-methods.js","sourceRoot":"/","sources":["utilities/common/logs-common-methods.ts"],"names":[],"mappings":";;AASC,4CAwBC;AAMD,sDAUC;AAKD,wDAOC;AAED,sDAcC;AA5EF,iDAAqD;AAErD,oFAAuF;AAMtF,SAAgB,gBAAgB,CAC/B,MAAS,EACT,MAAS,EACT,OAAoB;IAEpB,MAAM,OAAO,GAAG,EAA6C,CAAC;IAE9D,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAClF,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAElF,MAAM,WAAW,GAAG,OAAO;QAC1B,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM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O,CAAC;IAC5D,MAAM,sBAAsB,GAAuC,IAAI,yCAAsB,CAAC;QAC7F,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,YAAY;QAC1B,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,MAAM;KACnB,CAAC,CAAC;IACH,MAAM,IAAA,oBAAY,EAAC,sBAAsB,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import { mongoose } from \"@typegoose/typegoose\";\nimport { publishEvent } from \"../../libraries/event\";\nimport { BaseEvent } from \"../../libraries/event/BaseEvent\";\nimport { AdminActivityLogsEvent } from \"../../libraries/event/events/admin-logs-event\";\nimport { AdminLogsUpdatedFieldsType } from \"../enum\";\n\n/**\n\t * Returns changed fields between two objects (shallow comparison).\n\t */\n\texport function getChangedFields<T extends Record<string, any>>(\n\t\toldDoc: T,\n\t\tnewDoc: T,\n\t\tpayload?: Partial<T>\n\t): Record<keyof T, { old: any; new: any }> {\n\t\tconst changes = {} as Record<keyof T, { old: any; new: any }>;\n\n\t\tconst oldObj = typeof oldDoc.toObject === 'function' ? oldDoc.toObject() : oldDoc;\n\t\tconst newObj = typeof newDoc.toObject === 'function' ? newDoc.toObject() : newDoc;\n\n\t\tconst keysToCheck = payload\n\t\t\t? Object.keys(payload)\n\t\t\t: Array.from(new Set([...Object.keys(oldObj), ...Object.keys(newObj)]));\n\n\t\tfor (const key of keysToCheck) {\n\t\t\tconst oldValue = oldObj[key];\n\t\t\tconst newValue = newObj[key];\n\n\t\t\tif (payload || JSON.stringify(oldValue) !== JSON.stringify(newValue)) {\n\t\t\t\tchanges[key as keyof T] = { old: oldValue, new: newValue };\n\t\t\t}\n\t\t}\n\n\t\treturn changes;\n\t}\n\n\n\t/**\n\t * Filters changed fields to only those that exist in the payload.\n\t */\n\texport function filterRelevantChanges<T>(\n\t\tallChanges: Record<string, { old: any; new: any }>,\n\t\tpayload: Partial<T>\n\t): Record<string, { old: any; new: any }> {\n\t\treturn Object.keys(payload).reduce((acc, key) => {\n\t\t\tif (allChanges[key]) {\n\t\t\t\tacc[key] = allChanges[key];\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, {} as Record<string, { old: any; new: any }>);\n\t}\n\n\t/**\n\t * Extracts either 'old' or 'new' values from the changes object.\n\t */\n\texport function extractChangedDocument(\n\t\tchanges: Record<string, { old: any; new: any }>,\n\t\ttype: 'old' | 'new'\n\t): Record<string, any> {\n\t\treturn Object.fromEntries(\n\t\t\tObject.entries(changes).map(([key, value]) => [key, value[type]])\n\t\t);\n\t}\n\n\texport async function publishAdminLogsEvent(payload: {\n\t\tdeletedBy: mongoose.Types.ObjectId;\n\t\tupdatedField: AdminLogsUpdatedFieldsType;\n\t\toldDoc: any;\n\t\tnewDoc: any;\n\t}) {\n\t\tconst { deletedBy, updatedField, oldDoc, newDoc } = payload;\n\t\tconst adminActivityLogsEvent: BaseEvent<Record<string, unknown>> = new AdminActivityLogsEvent({\n\t\t\tadmin: deletedBy,\n\t\t\tupdatedField: updatedField,\n\t\t\toldDocument: oldDoc,\n\t\t\tnewDocument: newDoc,\n\t\t});\n\t\tawait publishEvent(adminActivityLogsEvent);\n\t}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.166-test",
|
|
4
4
|
"description": "The Core system of the Lyxa services.",
|
|
5
5
|
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@google-cloud/secret-manager": "^5.6.0",
|
|
22
22
|
"@mapbox/polyline": "^1.2.1",
|
|
23
|
-
"@trpc/client": "^
|
|
24
|
-
"@trpc/server": "^
|
|
23
|
+
"@trpc/client": "^11.4.3",
|
|
24
|
+
"@trpc/server": "^11.4.3",
|
|
25
25
|
"@typegoose/typegoose": "^12.10.1",
|
|
26
26
|
"@types/amqplib": "^0.10.7",
|
|
27
27
|
"@types/node": "^22.10.2",
|