@culturefy/shared 1.0.32 → 1.0.34
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/build/cjs/enums/secretKeys.enum.js +1 -0
- package/build/cjs/enums/secretKeys.enum.js.map +1 -1
- package/build/cjs/middlewares/token-validation.js +15 -462
- package/build/cjs/middlewares/token-validation.js.map +1 -1
- package/build/cjs/models/user.model.js +272 -366
- package/build/cjs/models/user.model.js.map +1 -1
- package/build/cjs/service/user.service.js +89 -84
- package/build/cjs/service/user.service.js.map +1 -1
- package/build/esm/enums/secretKeys.enum.js +1 -0
- package/build/esm/enums/secretKeys.enum.js.map +1 -1
- package/build/esm/middlewares/token-validation.js +16 -463
- package/build/esm/middlewares/token-validation.js.map +1 -1
- package/build/esm/models/user.model.js +272 -366
- package/build/esm/models/user.model.js.map +1 -1
- package/build/esm/service/user.service.js +89 -85
- package/build/esm/service/user.service.js.map +1 -1
- package/build/src/enums/secretKeys.enum.d.ts +2 -1
- package/build/src/enums/secretKeys.enum.js +1 -0
- package/build/src/enums/secretKeys.enum.js.map +1 -1
- package/build/src/middlewares/token-validation.d.ts +1 -1
- package/build/src/middlewares/token-validation.js +16 -314
- package/build/src/middlewares/token-validation.js.map +1 -1
- package/build/src/models/user.model.d.ts +0 -5
- package/build/src/models/user.model.js +266 -263
- package/build/src/models/user.model.js.map +1 -1
- package/build/src/service/user.service.d.ts +0 -6
- package/build/src/service/user.service.js +1 -107
- package/build/src/service/user.service.js.map +1 -1
- package/package.json +1 -1
- package/src/enums/secretKeys.enum.ts +1 -0
- package/src/middlewares/token-validation.ts +19 -432
- package/src/models/user.model.ts +265 -265
- package/src/service/user.service.ts +79 -77
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.js","names":["_dto","require","_mongoose","USER_DOCUMENT_NAME","exports","USER_COLLECTION_NAME","USER_TYPE","SocialLinksDTO","constructor","facebook","linkedin","instagram","twitter","MentorshipDTO","isOpenToMentorship","isLookingForMentorship","ThirdPartyAccounts_Enums","UserEmailAuthTokensDTO","refresh_token","access_token","accountType","GOOGLE","email","token_expiry","UserYoutubeAuthTokensDTO","RewardDTO","points","pointsToSend","pointsToReedem","amount","User","_id","Schema","Types","ObjectId","userId","id","fcm_token","google_id","cultureGroup","facebook_id","stripe_customerId","employeeId","password","profilePicUrl","role","roleId","verified","status","createdAt","Date","updatedAt","type","USER","firstName","lastName","dateOfBirth","phoneNumber","location","LocationDTO","socialLinks","business","businessId","bio","gender","skills","reward","profileviews","website","lifeExperience","position","isMentor","permissions","businessQuestionsAnswered","following","invitationHash","invitationHashExpiryDate","isinvitationHashExpired","coverPicUrl","isDeleted","isActive","departmentId","undefined","mentorship","ethnicity","personOfColor","tenure","satisfactionLevel","satisfactionLevelDate","performanceLevel","performanceLevelDate","salary","hireDate","jobLevel","supervisorId","enpsRating","disability","diverse","women","poc","isMfaVerified","mfaVerificationType","verificationOtp","otp","expiresAt","thirdPartyAuthTokens","youtubeAuthTokens","otpSchema","String","required","schema","trim","select","Number","default","ref","Mixed","Array","Boolean","min","blocked_transactions","versionKey","timestamps","collection","UserModel","model"],"sources":["../../../src/models/user.model.ts"],"sourcesContent":["// @ts-nocheck \n\nimport { LocationDTO } from '../dto';\nimport { model, Schema } from 'mongoose';\n\nexport const USER_DOCUMENT_NAME = 'User';\nexport const USER_COLLECTION_NAME = 'users';\n\nexport enum USER_TYPE {\n USER = \"USER\",\n ADMIN = \"ADMIN\",\n SUPER_ADMIN = \"SUPER_ADMIN\",\n}\n\nexport class SocialLinksDTO {\n facebook: string | null = ''\n linkedin: string | null = ''\n instagram: string | null = ''\n twitter: string | null = ''\n}\n\nexport interface ISocialLinks {\n facebook: string | null,\n linkedin: string | null,\n instagram: string | null,\n twitter: string | null,\n}\n\n\nexport class MentorshipDTO {\n isOpenToMentorship: boolean = false\n isLookingForMentorship: boolean = false\n}\n\nexport enum ThirdPartyAccounts_Enums {\n GOOGLE = \"GOOGLE\",\n MICROSOFT = \"MICROSOFT\",\n}\n\nexport class UserEmailAuthTokensDTO {\n refresh_token: string = ''\n access_token: string = ''\n accountType: ThirdPartyAccounts_Enums.GOOGLE | ThirdPartyAccounts_Enums.MICROSOFT = ThirdPartyAccounts_Enums.GOOGLE\n email: string = ''\n token_expiry: number = 0\n}\n\nexport class UserYoutubeAuthTokensDTO {\n refresh_token: string = ''\n access_token: string = ''\n email: string = ''\n token_expiry: number = 0\n}\n\nexport class RewardDTO {\n points: number | null = 0;\n pointsToSend: number | null = 0;\n pointsToReedem: number | null = 0;\n amount: number | null = 0;\n}\n\nexport class User implements IUser {\n _id: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n userId?: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n id: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n fcm_token: Array<any> = [];\n google_id?: string | undefined = '';\n cultureGroup?: Array<Schema.Types.ObjectId> = [];\n facebook_id?: string | undefined = '';\n stripe_customerId: string | null = '';\n email?: string | undefined = '';\n // employeeId?: number | null = null;\n employeeId?: string = '';\n password?: string | null | undefined = '';\n profilePicUrl?: string | undefined = '';\n role?: Schema.Types.ObjectId | undefined;\n roleId?: Schema.Types.ObjectId | null = new Schema.Types.ObjectId('');\n verified?: boolean | undefined = true;\n status?: boolean | undefined = true;\n createdAt: Date = new Date();\n updatedAt?: Date | undefined = new Date();\n type?: USER_TYPE.ADMIN | USER_TYPE.SUPER_ADMIN | USER_TYPE.USER = USER_TYPE.USER\n firstName?: string = '';\n lastName?: string = '';\n dateOfBirth?: Date | null = null;\n phoneNumber?: string = '';\n location?: LocationDTO = new LocationDTO()\n socialLinks?: SocialLinksDTO = new SocialLinksDTO()\n business?: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n businessId?: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n bio?: string = '';\n gender?: string = '';\n skills?: Array<Schema.Types.ObjectId> = [];\n reward?: RewardDTO = new RewardDTO();\n profileviews?: number = 0;\n website?: string = '';\n lifeExperience?: Array<Schema.Types.ObjectId> = [];\n position?: string = '';\n isMentor?: boolean = false;\n permissions?: string[] | undefined = [];\n\n businessQuestionsAnswered?: boolean = true;\n following?: Schema.Types.ObjectId[] = [];\n\n invitationHash?: string = ''\n invitationHashExpiryDate?: Date = new Date()\n isinvitationHashExpired?: boolean = false\n coverPicUrl?: string = ''\n isDeleted?: boolean = false\n isActive?: boolean = false\n departmentId?: Schema.Types.ObjectId | undefined = undefined;\n mentorship?: MentorshipDTO = new MentorshipDTO()\n ethnicity?: string = ''\n // race?: string = ''\n personOfColor?: string = ''\n tenure?: Number = 0\n satisfactionLevel?: Number = 1\n satisfactionLevelDate?: Date = new Date()\n performanceLevel?: Number = 1\n performanceLevelDate?: Date = new Date()\n salary?: Number = 0\n hireDate?: Date = new Date();\n jobLevel?: ''\n supervisorId?: Schema.Types.ObjectId | undefined = new Schema.Types.ObjectId('')\n enpsRating?: number = 0\n disability?: 'yes' | 'no' = 'no'\n diverse?: boolean = false\n women?: boolean = false\n poc?: boolean = false\n isMfaVerified?: boolean = false\n mfaVerificationType?: string = \"none\"\n verificationOtp?: {\n otp: string;\n expiresAt: Date;\n } = {\n otp: '',\n expiresAt: new Date(),\n }\n\n thirdPartyAuthTokens?: UserEmailAuthTokensDTO = new UserEmailAuthTokensDTO()\n youtubeAuthTokens?: UserYoutubeAuthTokensDTO = new UserYoutubeAuthTokensDTO()\n\n\n}\n\nexport default interface IUser {\n _id: Schema.Types.ObjectId,\n userId?: Schema.Types.ObjectId;\n email?: string;\n // employeeId?: number | null;\n employeeId?: string;\n profileviews?: number;\n password?: string | null;\n profilePicUrl?: string;\n role?: Schema.Types.ObjectId;\n fcm_token?: Array<any>;\n roleId?: Schema.Types.ObjectId | null;\n verified?: boolean;\n blocked_transactions?: boolean;\n status?: boolean;\n createdAt: Date;\n updatedAt?: Date;\n cultureGroup?: Array<Schema.Types.ObjectId>;\n type?: USER_TYPE.ADMIN | USER_TYPE.SUPER_ADMIN | USER_TYPE.USER\n\n firstName?: string,\n lastName?: string,\n dateOfBirth?: Date | null,\n\n phoneNumber?: string,\n location?: LocationDTO,\n reward?: RewardDTO,\n business?: Schema.Types.ObjectId,\n bio?: string,\n gender?: string,\n skills?: Array<Schema.Types.ObjectId>,\n website?: string,\n socialLinks?: ISocialLinks\n lifeExperience?: Array<Schema.Types.ObjectId>,\n businessId?: Schema.Types.ObjectId,\n position?: string,\n isMentor?: boolean,\n permissions?: string[],\n\n businessQuestionsAnswered?: boolean,\n following?: Schema.Types.ObjectId[],\n\n invitationHash?: string\n invitationHashExpiryDate?: Date\n isinvitationHashExpired?: boolean\n coverPicUrl?: string\n isDeleted?: boolean\n isActive?: boolean\n\n departmentId?: Schema.Types.ObjectId | undefined\n mentorship?: MentorshipDTO\n ethnicity?: string\n // race?: string\n personOfColor?: string\n tenure?: Number\n satisfactionLevel?: Number\n satisfactionLevelDate?: Date\n performanceLevel?: Number\n performanceLevelDate?: Date\n salary?: Number\n hireDate?: Date\n jobLevel?: ''\n supervisorId?: Schema.Types.ObjectId | undefined\n enpsRating?: number\n disability?: 'yes' | 'no'\n diverse?: boolean\n women?: boolean\n poc?: boolean\n isMfaVerified?: boolean\n mfaVerificationType?: string\n verificationOtp?: Object\n thirdPartyAuthTokens?: UserEmailAuthTokensDTO\n youtubeAuthTokens?: UserYoutubeAuthTokensDTO\n}\n\nconst otpSchema = new Schema({\n otp: { type: String, required: true },\n expiresAt: { type: Date, required: true }\n});\n\nconst schema = new Schema<IUser>(\n {\n email: {\n type: Schema.Types.String,\n required: false,\n // unique: true,\n trim: true,\n // select: false,\n },\n userId: {\n type: Schema.Types.ObjectId,\n required: false,\n },\n employeeId: {\n type: Schema.Types.String,\n required: false,\n },\n password: {\n type: Schema.Types.String,\n required: false,\n select: false,\n },\n profileviews: {\n type: Schema.Types.Number,\n required: false,\n default: 0,\n },\n profilePicUrl: {\n type: Schema.Types.String,\n required: false,\n trim: true,\n },\n cultureGroup: [{ type: Schema.Types.ObjectId, required: false, ref: 'Cultur' }],\n firstName: {\n type: Schema.Types.String,\n required: false,\n trim: true,\n },\n lastName: {\n type: Schema.Types.String,\n required: false,\n trim: true,\n },\n dateOfBirth: {\n type: Schema.Types.Date,\n required: false,\n },\n phoneNumber: {\n type: Schema.Types.String,\n required: false,\n },\n location: {\n type: Schema.Types.Mixed,\n required: false,\n },\n role: {\n type: Schema.Types.ObjectId,\n required: false,\n },\n roleId: {\n type: Schema.Types.ObjectId,\n required: false,\n },\n business: {\n type: Schema.Types.ObjectId,\n ref: 'Businesses',\n required: false,\n },\n following: {\n type: [Schema.Types.ObjectId],\n ref: USER_DOCUMENT_NAME,\n required: false,\n default: []\n },\n businessId: {\n type: Schema.Types.ObjectId,\n ref: 'Businesses',\n required: false,\n // strictPopulate: false,\n },\n fcm_token: { type: Schema.Types.Array, required: false },\n bio: { type: Schema.Types.String, required: false },\n gender: { type: Schema.Types.String, required: false },\n skills: [{ type: Schema.Types.ObjectId, required: false, ref: 'userSkills' }],\n website: { type: Schema.Types.String, required: false },\n socialLinks: {\n facebook: { type: Schema.Types.String, required: false },\n linkedin: { type: Schema.Types.String, required: false },\n instagram: { type: Schema.Types.String, required: false },\n twitter: { type: Schema.Types.String, required: false },\n },\n lifeExperience: [{ type: Schema.Types.ObjectId, required: false, ref: 'Life' }],\n\n position: { type: Schema.Types.String, required: false },\n isMentor: { type: Schema.Types.Boolean, required: false },\n\n permissions: [{ type: Schema.Types.Mixed, required: false }],\n businessQuestionsAnswered: {\n type: Schema.Types.Boolean,\n required: false,\n default: true\n },\n\n type: {\n type: Schema.Types.String,\n required: false,\n // enum: [USER_TYPE.ADMIN, USER_TYPE.SUPER_ADMIN, USER_TYPE.USER]\n },\n reward: {\n points: { type: Schema.Types.Number, default: 0, min: 0 },\n pointsToSend: { type: Schema.Types.Number, default: 0, min: 0 },\n pointsToReedem: { type: Schema.Types.Number, default: 0, min: 0 },\n amount: { type: Schema.Types.Number, default: 0, min: 0 },\n },\n verified: {\n type: Schema.Types.Boolean,\n default: false,\n },\n blocked_transactions: {\n type: Schema.Types.Boolean,\n default: false,\n },\n status: {\n type: Schema.Types.Boolean,\n default: true,\n },\n createdAt: {\n type: Date,\n required: false,\n select: false,\n },\n updatedAt: {\n type: Date,\n required: false,\n select: false,\n },\n invitationHash: { type: Schema.Types.String, required: false },\n invitationHashExpiryDate: { type: Schema.Types.Date, required: false },\n isinvitationHashExpired: { type: Schema.Types.Boolean, default: false },\n coverPicUrl: { type: Schema.Types.String, required: false },\n isDeleted: {\n type: Schema.Types.Boolean,\n default: false,\n },\n isActive: {\n type: Schema.Types.Boolean,\n default: false,\n },\n departmentId: {\n type: Schema.Types.ObjectId,\n required: false,\n },\n mentorship: {\n isOpenToMentorship: { type: Schema.Types.Boolean, default: false },\n isLookingForMentorship: { type: Schema.Types.Boolean, default: false }\n },\n ethnicity: {\n type: Schema.Types.String,\n required: false,\n },\n personOfColor: {\n type: Schema.Types.String,\n required: false,\n },\n tenure: {\n type: Schema.Types.Number,\n required: false,\n },\n satisfactionLevel: {\n type: Schema.Types.Number,\n required: false,\n },\n satisfactionLevelDate: {\n type: Schema.Types.Date,\n required: false,\n },\n performanceLevel: {\n type: Schema.Types.Number,\n required: false,\n },\n performanceLevelDate: {\n type: Schema.Types.Date,\n required: false,\n },\n salary: {\n type: Schema.Types.Number,\n required: false,\n },\n hireDate: {\n type: Schema.Types.Date,\n required: false,\n },\n jobLevel: {\n type: Schema.Types.String,\n required: false,\n default: ''\n },\n supervisorId: {\n type: Schema.Types.ObjectId,\n required: false,\n },\n enpsRating: {\n type: Schema.Types.Number,\n required: false,\n },\n disability: {\n type: Schema.Types.String,\n required: false,\n default: 'no'\n },\n diverse: {\n type: Schema.Types.Boolean,\n required: false,\n // default: false\n },\n women: {\n type: Schema.Types.Boolean,\n required: false,\n // default: false\n },\n poc: {\n type: Schema.Types.Boolean,\n required: false,\n // default: false\n },\n isMfaVerified: {\n type: Schema.Types.Boolean,\n default: false,\n required: false,\n // default: false\n },\n mfaVerificationType: {\n type: Schema.Types.String,\n default: 'none',\n required: false,\n // default: false\n },\n verificationOtp: {\n type: otpSchema,\n default: null,\n required: false,\n // default: false\n },\n thirdPartyAuthTokens: {\n access_token: { type: Schema.Types.String },\n refresh_token: { type: Schema.Types.String },\n accountType: { type: Schema.Types.String },\n email: { type: Schema.Types.String },\n token_expiry: { type: Schema.Types.Number }\n },\n youtubeAuthTokens: {\n access_token: { type: Schema.Types.String },\n refresh_token: { type: Schema.Types.String },\n email: { type: Schema.Types.String },\n token_expiry: { type: Schema.Types.Number }\n }\n },\n {\n versionKey: false,\n timestamps: true,\n collection: USER_COLLECTION_NAME\n },\n);\n\nexport const UserModel = model<IUser>(USER_DOCUMENT_NAME, schema, USER_COLLECTION_NAME);"],"mappings":";;;;AAEA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAHA;;AAKO,MAAME,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,MAAM;AACjC,MAAME,oBAAoB,GAAAD,OAAA,CAAAC,oBAAA,GAAG,OAAO;AAAC,IAEhCC,SAAS,GAAAF,OAAA,CAAAE,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAMd,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAA,KACxBC,QAAQ,GAAkB,EAAE;IAAA,KAC5BC,QAAQ,GAAkB,EAAE;IAAA,KAC5BC,SAAS,GAAkB,EAAE;IAAA,KAC7BC,OAAO,GAAkB,EAAE;EAAA;AAC/B;AAACR,OAAA,CAAAG,cAAA,GAAAA,cAAA;AAUM,MAAMM,aAAa,CAAC;EAAAL,YAAA;IAAA,KACvBM,kBAAkB,GAAY,KAAK;IAAA,KACnCC,sBAAsB,GAAY,KAAK;EAAA;AAC3C;AAACX,OAAA,CAAAS,aAAA,GAAAA,aAAA;AAAA,IAEWG,wBAAwB,GAAAZ,OAAA,CAAAY,wBAAA,0BAAxBA,wB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C3C1F,aAAa,EAAE;MAAEkC,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAAC2E;IAAO,CAAC;IAC5CxF,WAAW,EAAE;MAAEgC,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAAC2E;IAAO,CAAC;IAC1CtF,KAAK,EAAE;MAAE8B,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAAC2E;IAAO,CAAC;IACpCrF,YAAY,EAAE;MAAE6B,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAACgF;IAAO;EAC9C,CAAC;EACDP,iBAAiB,EAAE;IACfvF,YAAY,EAAE;MAAEiC,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAAC2E;IAAO,CAAC;IAC3C1F,aAAa,EAAE;MAAEkC,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAAC2E;IAAO,CAAC;IAC5CtF,KAAK,EAAE;MAAE8B,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAAC2E;IAAO,CAAC;IACpCrF,YAAY,EAAE;MAAE6B,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAACgF;IAAO;EAC9C;AACJ,CAAC,EACD;EACIQ,UAAU,EAAE,KAAK;EACjBC,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAEtH;AAChB,CACJ,CAAC;AAEM,MAAMuH,SAAS,GAAAxH,OAAA,CAAAwH,SAAA,GAAG,IAAAC,eAAK,EAAQ1H,kBAAkB,EAAE2G,MAAM,EAAEzG,oBAAoB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"user.model.js","names":["_dto","require","_mongoose","USER_DOCUMENT_NAME","exports","USER_COLLECTION_NAME","USER_TYPE","SocialLinksDTO","constructor","facebook","linkedin","instagram","twitter","MentorshipDTO","isOpenToMentorship","isLookingForMentorship","ThirdPartyAccounts_Enums","UserEmailAuthTokensDTO","refresh_token","access_token","accountType","GOOGLE","email","token_expiry","UserYoutubeAuthTokensDTO","RewardDTO","points","pointsToSend","pointsToReedem","amount","User","_id","Schema","Types","ObjectId","userId","id","fcm_token","google_id","cultureGroup","facebook_id","stripe_customerId","employeeId","password","profilePicUrl","role","roleId","verified","status","createdAt","Date","updatedAt","type","USER","firstName","lastName","dateOfBirth","phoneNumber","location","LocationDTO","socialLinks","business","businessId","bio","gender","skills","reward","profileviews","website","lifeExperience","position","isMentor","permissions","businessQuestionsAnswered","following","invitationHash","invitationHashExpiryDate","isinvitationHashExpired","coverPicUrl","isDeleted","isActive","departmentId","undefined","mentorship","ethnicity","personOfColor","tenure","satisfactionLevel","satisfactionLevelDate","performanceLevel","performanceLevelDate","salary","hireDate","jobLevel","supervisorId","enpsRating","disability","diverse","women","poc","isMfaVerified","mfaVerificationType","verificationOtp","otp","expiresAt","thirdPartyAuthTokens","youtubeAuthTokens"],"sources":["../../../src/models/user.model.ts"],"sourcesContent":["// @ts-nocheck \n\nimport { LocationDTO } from '../dto';\nimport { model, Schema } from 'mongoose';\n\nexport const USER_DOCUMENT_NAME = 'User';\nexport const USER_COLLECTION_NAME = 'users';\n\nexport enum USER_TYPE {\n USER = \"USER\",\n ADMIN = \"ADMIN\",\n SUPER_ADMIN = \"SUPER_ADMIN\",\n}\n\nexport class SocialLinksDTO {\n facebook: string | null = ''\n linkedin: string | null = ''\n instagram: string | null = ''\n twitter: string | null = ''\n}\n\nexport interface ISocialLinks {\n facebook: string | null,\n linkedin: string | null,\n instagram: string | null,\n twitter: string | null,\n}\n\n\nexport class MentorshipDTO {\n isOpenToMentorship: boolean = false\n isLookingForMentorship: boolean = false\n}\n\nexport enum ThirdPartyAccounts_Enums {\n GOOGLE = \"GOOGLE\",\n MICROSOFT = \"MICROSOFT\",\n}\n\nexport class UserEmailAuthTokensDTO {\n refresh_token: string = ''\n access_token: string = ''\n accountType: ThirdPartyAccounts_Enums.GOOGLE | ThirdPartyAccounts_Enums.MICROSOFT = ThirdPartyAccounts_Enums.GOOGLE\n email: string = ''\n token_expiry: number = 0\n}\n\nexport class UserYoutubeAuthTokensDTO {\n refresh_token: string = ''\n access_token: string = ''\n email: string = ''\n token_expiry: number = 0\n}\n\nexport class RewardDTO {\n points: number | null = 0;\n pointsToSend: number | null = 0;\n pointsToReedem: number | null = 0;\n amount: number | null = 0;\n}\n\nexport class User implements IUser {\n _id: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n userId?: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n id: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n fcm_token: Array<any> = [];\n google_id?: string | undefined = '';\n cultureGroup?: Array<Schema.Types.ObjectId> = [];\n facebook_id?: string | undefined = '';\n stripe_customerId: string | null = '';\n email?: string | undefined = '';\n // employeeId?: number | null = null;\n employeeId?: string = '';\n password?: string | null | undefined = '';\n profilePicUrl?: string | undefined = '';\n role?: Schema.Types.ObjectId | undefined;\n roleId?: Schema.Types.ObjectId | null = new Schema.Types.ObjectId('');\n verified?: boolean | undefined = true;\n status?: boolean | undefined = true;\n createdAt: Date = new Date();\n updatedAt?: Date | undefined = new Date();\n type?: USER_TYPE.ADMIN | USER_TYPE.SUPER_ADMIN | USER_TYPE.USER = USER_TYPE.USER\n firstName?: string = '';\n lastName?: string = '';\n dateOfBirth?: Date | null = null;\n phoneNumber?: string = '';\n location?: LocationDTO = new LocationDTO()\n socialLinks?: SocialLinksDTO = new SocialLinksDTO()\n business?: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n businessId?: Schema.Types.ObjectId = new Schema.Types.ObjectId('');\n bio?: string = '';\n gender?: string = '';\n skills?: Array<Schema.Types.ObjectId> = [];\n reward?: RewardDTO = new RewardDTO();\n profileviews?: number = 0;\n website?: string = '';\n lifeExperience?: Array<Schema.Types.ObjectId> = [];\n position?: string = '';\n isMentor?: boolean = false;\n permissions?: string[] | undefined = [];\n\n businessQuestionsAnswered?: boolean = true;\n following?: Schema.Types.ObjectId[] = [];\n\n invitationHash?: string = ''\n invitationHashExpiryDate?: Date = new Date()\n isinvitationHashExpired?: boolean = false\n coverPicUrl?: string = ''\n isDeleted?: boolean = false\n isActive?: boolean = false\n departmentId?: Schema.Types.ObjectId | undefined = undefined;\n mentorship?: MentorshipDTO = new MentorshipDTO()\n ethnicity?: string = ''\n // race?: string = ''\n personOfColor?: string = ''\n tenure?: Number = 0\n satisfactionLevel?: Number = 1\n satisfactionLevelDate?: Date = new Date()\n performanceLevel?: Number = 1\n performanceLevelDate?: Date = new Date()\n salary?: Number = 0\n hireDate?: Date = new Date();\n jobLevel?: ''\n supervisorId?: Schema.Types.ObjectId | undefined = new Schema.Types.ObjectId('')\n enpsRating?: number = 0\n disability?: 'yes' | 'no' = 'no'\n diverse?: boolean = false\n women?: boolean = false\n poc?: boolean = false\n isMfaVerified?: boolean = false\n mfaVerificationType?: string = \"none\"\n verificationOtp?: {\n otp: string;\n expiresAt: Date;\n } = {\n otp: '',\n expiresAt: new Date(),\n }\n\n thirdPartyAuthTokens?: UserEmailAuthTokensDTO = new UserEmailAuthTokensDTO()\n youtubeAuthTokens?: UserYoutubeAuthTokensDTO = new UserYoutubeAuthTokensDTO()\n\n\n}\n\nexport default interface IUser {\n _id: Schema.Types.ObjectId,\n userId?: Schema.Types.ObjectId;\n email?: string;\n // employeeId?: number | null;\n employeeId?: string;\n profileviews?: number;\n password?: string | null;\n profilePicUrl?: string;\n role?: Schema.Types.ObjectId;\n fcm_token?: Array<any>;\n roleId?: Schema.Types.ObjectId | null;\n verified?: boolean;\n blocked_transactions?: boolean;\n status?: boolean;\n createdAt: Date;\n updatedAt?: Date;\n cultureGroup?: Array<Schema.Types.ObjectId>;\n type?: USER_TYPE.ADMIN | USER_TYPE.SUPER_ADMIN | USER_TYPE.USER\n\n firstName?: string,\n lastName?: string,\n dateOfBirth?: Date | null,\n\n phoneNumber?: string,\n location?: LocationDTO,\n reward?: RewardDTO,\n business?: Schema.Types.ObjectId,\n bio?: string,\n gender?: string,\n skills?: Array<Schema.Types.ObjectId>,\n website?: string,\n socialLinks?: ISocialLinks\n lifeExperience?: Array<Schema.Types.ObjectId>,\n businessId?: Schema.Types.ObjectId,\n position?: string,\n isMentor?: boolean,\n permissions?: string[],\n\n businessQuestionsAnswered?: boolean,\n following?: Schema.Types.ObjectId[],\n\n invitationHash?: string\n invitationHashExpiryDate?: Date\n isinvitationHashExpired?: boolean\n coverPicUrl?: string\n isDeleted?: boolean\n isActive?: boolean\n\n departmentId?: Schema.Types.ObjectId | undefined\n mentorship?: MentorshipDTO\n ethnicity?: string\n // race?: string\n personOfColor?: string\n tenure?: Number\n satisfactionLevel?: Number\n satisfactionLevelDate?: Date\n performanceLevel?: Number\n performanceLevelDate?: Date\n salary?: Number\n hireDate?: Date\n jobLevel?: ''\n supervisorId?: Schema.Types.ObjectId | undefined\n enpsRating?: number\n disability?: 'yes' | 'no'\n diverse?: boolean\n women?: boolean\n poc?: boolean\n isMfaVerified?: boolean\n mfaVerificationType?: string\n verificationOtp?: Object\n thirdPartyAuthTokens?: UserEmailAuthTokensDTO\n youtubeAuthTokens?: UserYoutubeAuthTokensDTO\n}\n\n// const otpSchema = new Schema({\n// otp: { type: String, required: true },\n// expiresAt: { type: Date, required: true }\n// });\n\n// const schema = new Schema<IUser>(\n// {\n// email: {\n// type: Schema.Types.String,\n// required: false,\n// // unique: true,\n// trim: true,\n// // select: false,\n// },\n// userId: {\n// type: Schema.Types.ObjectId,\n// required: false,\n// },\n// employeeId: {\n// type: Schema.Types.String,\n// required: false,\n// },\n// password: {\n// type: Schema.Types.String,\n// required: false,\n// select: false,\n// },\n// profileviews: {\n// type: Schema.Types.Number,\n// required: false,\n// default: 0,\n// },\n// profilePicUrl: {\n// type: Schema.Types.String,\n// required: false,\n// trim: true,\n// },\n// cultureGroup: [{ type: Schema.Types.ObjectId, required: false, ref: 'Cultur' }],\n// firstName: {\n// type: Schema.Types.String,\n// required: false,\n// trim: true,\n// },\n// lastName: {\n// type: Schema.Types.String,\n// required: false,\n// trim: true,\n// },\n// dateOfBirth: {\n// type: Schema.Types.Date,\n// required: false,\n// },\n// phoneNumber: {\n// type: Schema.Types.String,\n// required: false,\n// },\n// location: {\n// type: Schema.Types.Mixed,\n// required: false,\n// },\n// role: {\n// type: Schema.Types.ObjectId,\n// required: false,\n// },\n// roleId: {\n// type: Schema.Types.ObjectId,\n// required: false,\n// },\n// business: {\n// type: Schema.Types.ObjectId,\n// ref: 'Businesses',\n// required: false,\n// },\n// following: {\n// type: [Schema.Types.ObjectId],\n// ref: USER_DOCUMENT_NAME,\n// required: false,\n// default: []\n// },\n// businessId: {\n// type: Schema.Types.ObjectId,\n// ref: 'Businesses',\n// required: false,\n// // strictPopulate: false,\n// },\n// fcm_token: { type: Schema.Types.Array, required: false },\n// bio: { type: Schema.Types.String, required: false },\n// gender: { type: Schema.Types.String, required: false },\n// skills: [{ type: Schema.Types.ObjectId, required: false, ref: 'userSkills' }],\n// website: { type: Schema.Types.String, required: false },\n// socialLinks: {\n// facebook: { type: Schema.Types.String, required: false },\n// linkedin: { type: Schema.Types.String, required: false },\n// instagram: { type: Schema.Types.String, required: false },\n// twitter: { type: Schema.Types.String, required: false },\n// },\n// lifeExperience: [{ type: Schema.Types.ObjectId, required: false, ref: 'Life' }],\n\n// position: { type: Schema.Types.String, required: false },\n// isMentor: { type: Schema.Types.Boolean, required: false },\n\n// permissions: [{ type: Schema.Types.Mixed, required: false }],\n// businessQuestionsAnswered: {\n// type: Schema.Types.Boolean,\n// required: false,\n// default: true\n// },\n\n// type: {\n// type: Schema.Types.String,\n// required: false,\n// // enum: [USER_TYPE.ADMIN, USER_TYPE.SUPER_ADMIN, USER_TYPE.USER]\n// },\n// reward: {\n// points: { type: Schema.Types.Number, default: 0, min: 0 },\n// pointsToSend: { type: Schema.Types.Number, default: 0, min: 0 },\n// pointsToReedem: { type: Schema.Types.Number, default: 0, min: 0 },\n// amount: { type: Schema.Types.Number, default: 0, min: 0 },\n// },\n// verified: {\n// type: Schema.Types.Boolean,\n// default: false,\n// },\n// blocked_transactions: {\n// type: Schema.Types.Boolean,\n// default: false,\n// },\n// status: {\n// type: Schema.Types.Boolean,\n// default: true,\n// },\n// createdAt: {\n// type: Date,\n// required: false,\n// select: false,\n// },\n// updatedAt: {\n// type: Date,\n// required: false,\n// select: false,\n// },\n// invitationHash: { type: Schema.Types.String, required: false },\n// invitationHashExpiryDate: { type: Schema.Types.Date, required: false },\n// isinvitationHashExpired: { type: Schema.Types.Boolean, default: false },\n// coverPicUrl: { type: Schema.Types.String, required: false },\n// isDeleted: {\n// type: Schema.Types.Boolean,\n// default: false,\n// },\n// isActive: {\n// type: Schema.Types.Boolean,\n// default: false,\n// },\n// departmentId: {\n// type: Schema.Types.ObjectId,\n// required: false,\n// },\n// mentorship: {\n// isOpenToMentorship: { type: Schema.Types.Boolean, default: false },\n// isLookingForMentorship: { type: Schema.Types.Boolean, default: false }\n// },\n// ethnicity: {\n// type: Schema.Types.String,\n// required: false,\n// },\n// personOfColor: {\n// type: Schema.Types.String,\n// required: false,\n// },\n// tenure: {\n// type: Schema.Types.Number,\n// required: false,\n// },\n// satisfactionLevel: {\n// type: Schema.Types.Number,\n// required: false,\n// },\n// satisfactionLevelDate: {\n// type: Schema.Types.Date,\n// required: false,\n// },\n// performanceLevel: {\n// type: Schema.Types.Number,\n// required: false,\n// },\n// performanceLevelDate: {\n// type: Schema.Types.Date,\n// required: false,\n// },\n// salary: {\n// type: Schema.Types.Number,\n// required: false,\n// },\n// hireDate: {\n// type: Schema.Types.Date,\n// required: false,\n// },\n// jobLevel: {\n// type: Schema.Types.String,\n// required: false,\n// default: ''\n// },\n// supervisorId: {\n// type: Schema.Types.ObjectId,\n// required: false,\n// },\n// enpsRating: {\n// type: Schema.Types.Number,\n// required: false,\n// },\n// disability: {\n// type: Schema.Types.String,\n// required: false,\n// default: 'no'\n// },\n// diverse: {\n// type: Schema.Types.Boolean,\n// required: false,\n// // default: false\n// },\n// women: {\n// type: Schema.Types.Boolean,\n// required: false,\n// // default: false\n// },\n// poc: {\n// type: Schema.Types.Boolean,\n// required: false,\n// // default: false\n// },\n// isMfaVerified: {\n// type: Schema.Types.Boolean,\n// default: false,\n// required: false,\n// // default: false\n// },\n// mfaVerificationType: {\n// type: Schema.Types.String,\n// default: 'none',\n// required: false,\n// // default: false\n// },\n// verificationOtp: {\n// type: otpSchema,\n// default: null,\n// required: false,\n// // default: false\n// },\n// thirdPartyAuthTokens: {\n// access_token: { type: Schema.Types.String },\n// refresh_token: { type: Schema.Types.String },\n// accountType: { type: Schema.Types.String },\n// email: { type: Schema.Types.String },\n// token_expiry: { type: Schema.Types.Number }\n// },\n// youtubeAuthTokens: {\n// access_token: { type: Schema.Types.String },\n// refresh_token: { type: Schema.Types.String },\n// email: { type: Schema.Types.String },\n// token_expiry: { type: Schema.Types.Number }\n// }\n// },\n// {\n// versionKey: false,\n// timestamps: true,\n// collection: USER_COLLECTION_NAME\n// },\n// );\n\n// export const UserModel = model<IUser>(USER_DOCUMENT_NAME, schema, USER_COLLECTION_NAME);"],"mappings":";;;;AAEA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAHA;;AAKO,MAAME,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,MAAM;AACjC,MAAME,oBAAoB,GAAAD,OAAA,CAAAC,oBAAA,GAAG,OAAO;AAAC,IAEhCC,SAAS,GAAAF,OAAA,CAAAE,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAMd,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAA,KACxBC,QAAQ,GAAkB,EAAE;IAAA,KAC5BC,QAAQ,GAAkB,EAAE;IAAA,KAC5BC,SAAS,GAAkB,EAAE;IAAA,KAC7BC,OAAO,GAAkB,EAAE;EAAA;AAC/B;AAACR,OAAA,CAAAG,cAAA,GAAAA,cAAA;AAUM,MAAMM,aAAa,CAAC;EAAAL,YAAA;IAAA,KACvBM,kBAAkB,GAAY,KAAK;IAAA,KACnCC,sBAAsB,GAAY,KAAK;EAAA;AAC3C;AAACX,OAAA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E,IAAItD,IAAI,CAAC;IACxB,CAAC;IAAA,KAELuD,oBAAoB,GAA4B,IAAIxF,sBAAsB,CAAC,CAAC;IAAA,KAC5EyF,iBAAiB,GAA8B,IAAIlF,wBAAwB,CAAC,CAAC;EAAA;AAGjF;;AA6EA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAAApB,OAAA,CAAA0B,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -2,94 +2,99 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.UserService = void 0;
|
|
5
|
-
var _mongoose = require("mongoose");
|
|
6
|
-
var _user = require("../models/user.model");
|
|
7
5
|
var _shared = require("@culturefy/shared");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let UserService = exports.UserService = (_class = class UserService extends _shared.Initializers {
|
|
6
|
+
class UserService extends _shared.Initializers {
|
|
7
|
+
// private readonly schema = UserModel.schema;
|
|
11
8
|
constructor(context, dbUrl) {
|
|
12
9
|
super(context, dbUrl);
|
|
13
|
-
this.schema = _user.UserModel.schema;
|
|
14
10
|
}
|
|
15
|
-
getModel() {
|
|
16
|
-
const connection = this.getConnection();
|
|
17
|
-
if (!connection) {
|
|
18
|
-
throw new Error('Database connection not established');
|
|
19
|
-
}
|
|
20
|
-
return connection.model(_user.UserModel.modelName, this.schema);
|
|
21
|
-
}
|
|
22
|
-
async getUserById(userId) {
|
|
23
|
-
try {
|
|
24
|
-
let model = this.getModel();
|
|
25
|
-
this.context.log("UserId:", JSON.stringify(userId));
|
|
26
11
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
objectId = new _mongoose.Types.ObjectId(userIdString);
|
|
35
|
-
}
|
|
36
|
-
this.context.log("ObjectId:", JSON.stringify(objectId));
|
|
37
|
-
const user = await model.findById(objectId);
|
|
38
|
-
this.context.log("User:", JSON.stringify(user));
|
|
39
|
-
return user;
|
|
40
|
-
} catch (error) {
|
|
41
|
-
this.context.error("Error in getUserById", error);
|
|
42
|
-
throw error;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
async getUserByBusinessId(businessId, email) {
|
|
46
|
-
try {
|
|
47
|
-
let model = this.getModel();
|
|
48
|
-
this.context.log("BusinessId:", JSON.stringify(businessId));
|
|
49
|
-
this.context.log("Email:", JSON.stringify(email));
|
|
50
|
-
if (!businessId) return null;
|
|
51
|
-
if (!email) return null;
|
|
52
|
-
businessId = businessId.toLowerCase();
|
|
53
|
-
businessId = businessId.trim();
|
|
54
|
-
email = email.toLowerCase();
|
|
55
|
-
email = email.trim();
|
|
12
|
+
// private getModel() {
|
|
13
|
+
// const connection = (this as any).getConnection();
|
|
14
|
+
// if (!connection) {
|
|
15
|
+
// throw new Error('Database connection not established');
|
|
16
|
+
// }
|
|
17
|
+
// return connection.model(UserModel.modelName, this.schema);
|
|
18
|
+
// }
|
|
56
19
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
20
|
+
// @WithDb
|
|
21
|
+
// async getUserById(userId: string): Promise<IUser | null> {
|
|
22
|
+
// try {
|
|
23
|
+
// let model = this.getModel();
|
|
24
|
+
// this.context.log("UserId:", JSON.stringify(userId));
|
|
25
|
+
|
|
26
|
+
// // Handle both string and SchemaObjectId inputs
|
|
27
|
+
// let objectId: Types.ObjectId;
|
|
28
|
+
// if (typeof userId === 'string') {
|
|
29
|
+
// objectId = new Types.ObjectId(userId);
|
|
30
|
+
// } else {
|
|
31
|
+
// // If it's already a SchemaObjectId, extract the string value
|
|
32
|
+
// const userIdString = (userId as any).path || (userId as any).toString();
|
|
33
|
+
// objectId = new Types.ObjectId(userIdString);
|
|
34
|
+
// }
|
|
35
|
+
|
|
36
|
+
// this.context.log("ObjectId:", JSON.stringify(objectId));
|
|
37
|
+
// const user = await model.findById(objectId);
|
|
38
|
+
// this.context.log("User:", JSON.stringify(user));
|
|
39
|
+
// return user;
|
|
40
|
+
// } catch (error) {
|
|
41
|
+
// this.context.error("Error in getUserById", error);
|
|
42
|
+
// throw error;
|
|
43
|
+
// }
|
|
44
|
+
// }
|
|
45
|
+
|
|
46
|
+
// @WithDb
|
|
47
|
+
// async getUserByBusinessId(businessId: string, email: string): Promise<IUser | null> {
|
|
48
|
+
// try {
|
|
49
|
+
// let model = this.getModel();
|
|
50
|
+
// this.context.log("BusinessId:", JSON.stringify(businessId));
|
|
51
|
+
// this.context.log("Email:", JSON.stringify(email));
|
|
52
|
+
|
|
53
|
+
// if(!businessId) return null;
|
|
54
|
+
// if(!email) return null;
|
|
55
|
+
|
|
56
|
+
// businessId = businessId.toLowerCase();
|
|
57
|
+
// businessId = businessId.trim();
|
|
58
|
+
|
|
59
|
+
// email = email.toLowerCase();
|
|
60
|
+
// email = email.trim();
|
|
61
|
+
|
|
62
|
+
// // Handle both string and SchemaObjectId inputs
|
|
63
|
+
// let objectId: Types.ObjectId;
|
|
64
|
+
// if (typeof businessId === 'string') {
|
|
65
|
+
// objectId = new Types.ObjectId(businessId);
|
|
66
|
+
// } else {
|
|
67
|
+
// // If it's already a SchemaObjectId, extract the string value
|
|
68
|
+
// const businessIdString = (businessId as any).path || (businessId as any).toString();
|
|
69
|
+
// objectId = new Types.ObjectId(businessIdString);
|
|
70
|
+
// }
|
|
71
|
+
|
|
72
|
+
// this.context.log("ObjectId:", JSON.stringify(objectId));
|
|
73
|
+
// const user = await model.findOne({ businessId: objectId, email: email });
|
|
74
|
+
// this.context.log("User:", JSON.stringify(user));
|
|
75
|
+
// return user;
|
|
76
|
+
// } catch (error) {
|
|
77
|
+
// this.context.error("Error in getUserByBusinessId", error);
|
|
78
|
+
// throw error;
|
|
79
|
+
// }
|
|
80
|
+
// }
|
|
81
|
+
|
|
82
|
+
// @WithDb
|
|
83
|
+
// async getUserByEmail(email: string) {
|
|
84
|
+
// try {
|
|
85
|
+
// let model = this.getModel();
|
|
86
|
+
// this.context.log("Email:", JSON.stringify(email));
|
|
87
|
+
|
|
88
|
+
// email = email.toLowerCase();
|
|
89
|
+
// email = email.trim();
|
|
90
|
+
// const user = await model.findOne({ email: email });
|
|
91
|
+
// this.context.log("User:", JSON.stringify(user));
|
|
92
|
+
// return user;
|
|
93
|
+
// } catch (error) {
|
|
94
|
+
// this.context.error("Error in getUserByEmail", error);
|
|
95
|
+
// throw error;
|
|
96
|
+
// }
|
|
97
|
+
// }
|
|
98
|
+
}
|
|
99
|
+
exports.UserService = UserService;
|
|
95
100
|
//# sourceMappingURL=user.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.service.js","names":["
|
|
1
|
+
{"version":3,"file":"user.service.js","names":["_shared","require","UserService","Initializers","constructor","context","dbUrl","exports"],"sources":["../../../src/service/user.service.ts"],"sourcesContent":["import { Types } from \"mongoose\";\nimport { InvocationContext } from \"@azure/functions\";\nimport IUser\n// { UserModel }\n from \"../models/user.model\";\nimport { Initializers, WithDb } from \"@culturefy/shared\";\n\nexport class UserService extends Initializers {\n\n // private readonly schema = UserModel.schema;\n constructor(context: InvocationContext, dbUrl:string) {\n super(context, dbUrl);\n }\n\n // private getModel() {\n // const connection = (this as any).getConnection();\n // if (!connection) {\n // throw new Error('Database connection not established');\n // }\n // return connection.model(UserModel.modelName, this.schema);\n // }\n\n // @WithDb\n // async getUserById(userId: string): Promise<IUser | null> {\n // try {\n // let model = this.getModel();\n // this.context.log(\"UserId:\", JSON.stringify(userId));\n \n // // Handle both string and SchemaObjectId inputs\n // let objectId: Types.ObjectId;\n // if (typeof userId === 'string') {\n // objectId = new Types.ObjectId(userId);\n // } else {\n // // If it's already a SchemaObjectId, extract the string value\n // const userIdString = (userId as any).path || (userId as any).toString();\n // objectId = new Types.ObjectId(userIdString);\n // }\n \n // this.context.log(\"ObjectId:\", JSON.stringify(objectId));\n // const user = await model.findById(objectId);\n // this.context.log(\"User:\", JSON.stringify(user));\n // return user;\n // } catch (error) {\n // this.context.error(\"Error in getUserById\", error);\n // throw error;\n // }\n // }\n\n // @WithDb\n // async getUserByBusinessId(businessId: string, email: string): Promise<IUser | null> {\n // try {\n // let model = this.getModel();\n // this.context.log(\"BusinessId:\", JSON.stringify(businessId));\n // this.context.log(\"Email:\", JSON.stringify(email));\n\n // if(!businessId) return null;\n // if(!email) return null;\n\n // businessId = businessId.toLowerCase();\n // businessId = businessId.trim();\n\n // email = email.toLowerCase();\n // email = email.trim();\n\n // // Handle both string and SchemaObjectId inputs\n // let objectId: Types.ObjectId;\n // if (typeof businessId === 'string') {\n // objectId = new Types.ObjectId(businessId);\n // } else {\n // // If it's already a SchemaObjectId, extract the string value\n // const businessIdString = (businessId as any).path || (businessId as any).toString();\n // objectId = new Types.ObjectId(businessIdString);\n // }\n \n // this.context.log(\"ObjectId:\", JSON.stringify(objectId));\n // const user = await model.findOne({ businessId: objectId, email: email });\n // this.context.log(\"User:\", JSON.stringify(user));\n // return user;\n // } catch (error) {\n // this.context.error(\"Error in getUserByBusinessId\", error);\n // throw error;\n // }\n // }\n\n // @WithDb\n // async getUserByEmail(email: string) {\n // try {\n // let model = this.getModel();\n // this.context.log(\"Email:\", JSON.stringify(email));\n\n // email = email.toLowerCase();\n // email = email.trim();\n // const user = await model.findOne({ email: email });\n // this.context.log(\"User:\", JSON.stringify(user));\n // return user;\n // } catch (error) {\n // this.context.error(\"Error in getUserByEmail\", error);\n // throw error;\n // }\n // }\n}\n"],"mappings":";;;;AAKA,IAAAA,OAAA,GAAAC,OAAA;AAEO,MAAMC,WAAW,SAASC,oBAAY,CAAC;EAE1C;EACAC,WAAWA,CAACC,OAA0B,EAAEC,KAAY,EAAE;IAClD,KAAK,CAACD,OAAO,EAAEC,KAAK,CAAC;EACzB;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACJ;AAACC,OAAA,CAAAL,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -30,6 +30,7 @@ export let AzureSecretKeysEnum = /*#__PURE__*/function (AzureSecretKeysEnum) {
|
|
|
30
30
|
AzureSecretKeysEnum["HMS_ACCESS_KEY"] = "MEETING-HMS-ACCESS-KEY-APP-SECRET";
|
|
31
31
|
AzureSecretKeysEnum["MEETING_ROOM_APP_SECRET"] = "MEETING-ROOM-APP-SECRET";
|
|
32
32
|
AzureSecretKeysEnum["BASE_DB_CLUSTER_CONNECTING_STRING_CHAT"] = "BASE-DB-CLUSTER-CONNECTING-STRING-CHAT";
|
|
33
|
+
AzureSecretKeysEnum["AUTH_SERVICE_AUTHENTICATION_URL"] = "AUTH-SERVICE-AUTHENTICATION-URL";
|
|
33
34
|
return AzureSecretKeysEnum;
|
|
34
35
|
}({});
|
|
35
36
|
//# sourceMappingURL=secretKeys.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secretKeys.enum.js","names":["AzureSecretKeysEnum"],"sources":["../../../src/enums/secretKeys.enum.ts"],"sourcesContent":["// Enum for secret keys\nexport enum AzureSecretKeysEnum {\n KEYCLOAK_ADMIN_CLIENT_SECRET = \"KEYCLOAK-ADMIN-CLIENT-SECRET\",\n KEYCLOAK_ADMIN_CLIENT_ID = \"KEYCLOAK-ADMIN-CLIENT-ID\",\n KEYCLOAK_BASE_URL = \"KEYCLOAK-BASE-URL\",\n STRIPE_PAYMENT_WEBHOOK_SECRET_KEY = \"Stripe-payment-webhook-secret-key\", // in-use\n STRIPE_PRODUCT_WEBHOOK_SECRET = \"Stripe-product-webhook-secret-key\", // in-use\n STRIPE_PRICE_WEBHOOK_SECRET = \"Stripe-price-webhook-secret-key\", // in-use\n EMAIL_SERVICE_URL = \"Email-Service-Url\", // in-use,\n DB_CONNECTING_STRING_AUTH = \"DB-CONNECTION-STRING-AUTH\",\n DB_CONNECTING_STRING_USER = \"DB-CONNECTION-STRING-USER\",\n DB_CONNECTING_STRING_TENANT_BRIDGE = \"DB-Connecting-String-Tenant-Bridge\",\n DB_CONNECTING_STRING_PAYMENT = \"DB-CONNECTION-STRING-PAYMENT\",\n DB_CONNECTING_STRING_CORE = \"DB-CONNECTION-STRING-CORE\",\n DB_CONNECTING_STRING_BILLING = \"DB-CONNECTION-STRING-BILLING\",\n DB_CONNECTING_STRING_STAGING = \"DB-CONNECTION-STRING-STAGING\",\n DB_CONNECTING_STRING_BNT_DEV = \"DB-CONNECTION-STRING-BNT-DEV\",\n SERVICE_BUS_CONNECTION_STRING = \"servicebus-connection-string\",\n STRIPE_CUSTOMER_SYNC_WEBHOOK_SECRET = \"stripe-customer-sync-webhook-secret-key\",\n STRIPE_INVOICE_SYNC_WEBHOOK_SECRET = \"stripe-invoice-sync-webhook-secret-key\",\n STRIPE_PRODUCT_SYNC_WEBHOOK_SECRET = \"stripe-product-sync-webhook-secret-key\",\n STRIPE_SECRET_KEY = \"Stripe-secret-key\",\n STRIPE_WEBHOOK_CUSTOMER_CREATED_SECRET_KEY = \"Stripe-Webhook-Customer-Created-Secret-Key\",\n STRIPE_SUBSCRIPTION_SYNC_WEBHOOK_SECRET = \"stripe-subscription-sync-webhook-secret-key\",\n FIREBASE_SERVICE_ACCOUNTS_VARIABLE = \"firebase_service_accounts_variable\",\n HMS_ACCESS_KEY=\"MEETING-HMS-ACCESS-KEY-APP-SECRET\",\n MEETING_ROOM_APP_SECRET=\"MEETING-ROOM-APP-SECRET\",\n BASE_DB_CLUSTER_CONNECTING_STRING_CHAT = \"BASE-DB-CLUSTER-CONNECTING-STRING-CHAT\",\n}\n"],"mappings":"AAAA;AACA,WAAYA,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAI4C;EAJ/DA,mBAAmB;EAKwC;EAL3DA,mBAAmB;EAMoC;EANvDA,mBAAmB;EAOY;EAP/BA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"secretKeys.enum.js","names":["AzureSecretKeysEnum"],"sources":["../../../src/enums/secretKeys.enum.ts"],"sourcesContent":["// Enum for secret keys\nexport enum AzureSecretKeysEnum {\n KEYCLOAK_ADMIN_CLIENT_SECRET = \"KEYCLOAK-ADMIN-CLIENT-SECRET\",\n KEYCLOAK_ADMIN_CLIENT_ID = \"KEYCLOAK-ADMIN-CLIENT-ID\",\n KEYCLOAK_BASE_URL = \"KEYCLOAK-BASE-URL\",\n STRIPE_PAYMENT_WEBHOOK_SECRET_KEY = \"Stripe-payment-webhook-secret-key\", // in-use\n STRIPE_PRODUCT_WEBHOOK_SECRET = \"Stripe-product-webhook-secret-key\", // in-use\n STRIPE_PRICE_WEBHOOK_SECRET = \"Stripe-price-webhook-secret-key\", // in-use\n EMAIL_SERVICE_URL = \"Email-Service-Url\", // in-use,\n DB_CONNECTING_STRING_AUTH = \"DB-CONNECTION-STRING-AUTH\",\n DB_CONNECTING_STRING_USER = \"DB-CONNECTION-STRING-USER\",\n DB_CONNECTING_STRING_TENANT_BRIDGE = \"DB-Connecting-String-Tenant-Bridge\",\n DB_CONNECTING_STRING_PAYMENT = \"DB-CONNECTION-STRING-PAYMENT\",\n DB_CONNECTING_STRING_CORE = \"DB-CONNECTION-STRING-CORE\",\n DB_CONNECTING_STRING_BILLING = \"DB-CONNECTION-STRING-BILLING\",\n DB_CONNECTING_STRING_STAGING = \"DB-CONNECTION-STRING-STAGING\",\n DB_CONNECTING_STRING_BNT_DEV = \"DB-CONNECTION-STRING-BNT-DEV\",\n SERVICE_BUS_CONNECTION_STRING = \"servicebus-connection-string\",\n STRIPE_CUSTOMER_SYNC_WEBHOOK_SECRET = \"stripe-customer-sync-webhook-secret-key\",\n STRIPE_INVOICE_SYNC_WEBHOOK_SECRET = \"stripe-invoice-sync-webhook-secret-key\",\n STRIPE_PRODUCT_SYNC_WEBHOOK_SECRET = \"stripe-product-sync-webhook-secret-key\",\n STRIPE_SECRET_KEY = \"Stripe-secret-key\",\n STRIPE_WEBHOOK_CUSTOMER_CREATED_SECRET_KEY = \"Stripe-Webhook-Customer-Created-Secret-Key\",\n STRIPE_SUBSCRIPTION_SYNC_WEBHOOK_SECRET = \"stripe-subscription-sync-webhook-secret-key\",\n FIREBASE_SERVICE_ACCOUNTS_VARIABLE = \"firebase_service_accounts_variable\",\n HMS_ACCESS_KEY=\"MEETING-HMS-ACCESS-KEY-APP-SECRET\",\n MEETING_ROOM_APP_SECRET=\"MEETING-ROOM-APP-SECRET\",\n BASE_DB_CLUSTER_CONNECTING_STRING_CHAT = \"BASE-DB-CLUSTER-CONNECTING-STRING-CHAT\",\n AUTH_SERVICE_AUTHENTICATION_URL = \"AUTH-SERVICE-AUTHENTICATION-URL\",\n}\n"],"mappings":"AAAA;AACA,WAAYA,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAI4C;EAJ/DA,mBAAmB;EAKwC;EAL3DA,mBAAmB;EAMoC;EANvDA,mBAAmB;EAOY;EAP/BA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA","ignoreList":[]}
|