@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.
Files changed (33) hide show
  1. package/build/cjs/enums/secretKeys.enum.js +1 -0
  2. package/build/cjs/enums/secretKeys.enum.js.map +1 -1
  3. package/build/cjs/middlewares/token-validation.js +15 -462
  4. package/build/cjs/middlewares/token-validation.js.map +1 -1
  5. package/build/cjs/models/user.model.js +272 -366
  6. package/build/cjs/models/user.model.js.map +1 -1
  7. package/build/cjs/service/user.service.js +89 -84
  8. package/build/cjs/service/user.service.js.map +1 -1
  9. package/build/esm/enums/secretKeys.enum.js +1 -0
  10. package/build/esm/enums/secretKeys.enum.js.map +1 -1
  11. package/build/esm/middlewares/token-validation.js +16 -463
  12. package/build/esm/middlewares/token-validation.js.map +1 -1
  13. package/build/esm/models/user.model.js +272 -366
  14. package/build/esm/models/user.model.js.map +1 -1
  15. package/build/esm/service/user.service.js +89 -85
  16. package/build/esm/service/user.service.js.map +1 -1
  17. package/build/src/enums/secretKeys.enum.d.ts +2 -1
  18. package/build/src/enums/secretKeys.enum.js +1 -0
  19. package/build/src/enums/secretKeys.enum.js.map +1 -1
  20. package/build/src/middlewares/token-validation.d.ts +1 -1
  21. package/build/src/middlewares/token-validation.js +16 -314
  22. package/build/src/middlewares/token-validation.js.map +1 -1
  23. package/build/src/models/user.model.d.ts +0 -5
  24. package/build/src/models/user.model.js +266 -263
  25. package/build/src/models/user.model.js.map +1 -1
  26. package/build/src/service/user.service.d.ts +0 -6
  27. package/build/src/service/user.service.js +1 -107
  28. package/build/src/service/user.service.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/enums/secretKeys.enum.ts +1 -0
  31. package/src/middlewares/token-validation.ts +19 -432
  32. package/src/models/user.model.ts +265 -265
  33. 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,aA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F,YAAY,EAAE;MAAEiC,IAAI,EAAEpB,gBAAM,CAACC,KAAK,CAAC2E;IAAO,CAAC;IAC3C1F,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,kBAAk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,MAAM;IAAA,KACrCC,eAAe,GAGX;MACIC,GAAG,EAAE,EAAE;MACPC,SAAS,EAAE,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
- var _class;
9
- function _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }
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
- // Handle both string and SchemaObjectId inputs
28
- let objectId;
29
- if (typeof userId === 'string') {
30
- objectId = new _mongoose.Types.ObjectId(userId);
31
- } else {
32
- // If it's already a SchemaObjectId, extract the string value
33
- const userIdString = userId.path || userId.toString();
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
- // Handle both string and SchemaObjectId inputs
58
- let objectId;
59
- if (typeof businessId === 'string') {
60
- objectId = new _mongoose.Types.ObjectId(businessId);
61
- } else {
62
- // If it's already a SchemaObjectId, extract the string value
63
- const businessIdString = businessId.path || businessId.toString();
64
- objectId = new _mongoose.Types.ObjectId(businessIdString);
65
- }
66
- this.context.log("ObjectId:", JSON.stringify(objectId));
67
- const user = await model.findOne({
68
- businessId: objectId,
69
- email: email
70
- });
71
- this.context.log("User:", JSON.stringify(user));
72
- return user;
73
- } catch (error) {
74
- this.context.error("Error in getUserByBusinessId", error);
75
- throw error;
76
- }
77
- }
78
- async getUserByEmail(email) {
79
- try {
80
- let model = this.getModel();
81
- this.context.log("Email:", JSON.stringify(email));
82
- email = email.toLowerCase();
83
- email = email.trim();
84
- const user = await model.findOne({
85
- email: email
86
- });
87
- this.context.log("User:", JSON.stringify(user));
88
- return user;
89
- } catch (error) {
90
- this.context.error("Error in getUserByEmail", error);
91
- throw error;
92
- }
93
- }
94
- }, _applyDecoratedDescriptor(_class.prototype, "getUserById", [_shared.WithDb], Object.getOwnPropertyDescriptor(_class.prototype, "getUserById"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "getUserByBusinessId", [_shared.WithDb], Object.getOwnPropertyDescriptor(_class.prototype, "getUserByBusinessId"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "getUserByEmail", [_shared.WithDb], Object.getOwnPropertyDescriptor(_class.prototype, "getUserByEmail"), _class.prototype), _class);
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":["_mongoose","require","_user","_shared","_class","_applyDecoratedDescriptor","i","e","r","n","l","a","Object","keys","forEach","enumerable","configurable","initializer","writable","slice","reverse","reduce","value","call","defineProperty","UserService","exports","Initializers","constructor","context","dbUrl","schema","UserModel","getModel","connection","getConnection","Error","model","modelName","getUserById","userId","log","JSON","stringify","objectId","Types","ObjectId","userIdString","path","toString","user","findById","error","getUserByBusinessId","businessId","email","toLowerCase","trim","businessIdString","findOne","getUserByEmail","prototype","WithDb","getOwnPropertyDescriptor"],"sources":["../../../src/service/user.service.ts"],"sourcesContent":["import { Types } from \"mongoose\";\nimport { InvocationContext } from \"@azure/functions\";\nimport IUser, { UserModel } 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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AAlD,MAAA,CAAAmD,wBAAA,CAAA3D,MAAA,CAAAyD,SAAA,qBAAAzD,MAAA,CAAAyD,SAAA,GAAAzD,MAAA","ignoreList":[]}
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":[]}