@experts_hub/shared 1.0.134 → 1.0.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -564,1528 +564,1503 @@ var CLIENT_PROFILE_PATTERN = {
564
564
 
565
565
  // src/modules/user/client-profile/dto/update-client-profile.dto.ts
566
566
  var import_class_validator17 = require("class-validator");
567
-
568
- // src/entities/company-profile.entity.ts
569
- var import_typeorm16 = require("typeorm");
570
-
571
- // src/entities/base.entity.ts
572
- var import_typeorm = require("typeorm");
573
- var BaseEntity = class {
567
+ var UpdateCompanyProfileDto = class {
574
568
  };
575
569
  __decorateClass([
576
- (0, import_typeorm.PrimaryGeneratedColumn)("increment", { type: "integer" })
577
- ], BaseEntity.prototype, "id", 2);
578
- __decorateClass([
579
- (0, import_typeorm.Column)({ type: "uuid" }),
580
- (0, import_typeorm.Generated)("uuid")
581
- ], BaseEntity.prototype, "uuid", 2);
570
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter company name." }),
571
+ (0, import_class_validator17.IsString)({ message: "Company name must be a string." }),
572
+ (0, import_class_validator17.Length)(2, 255, { message: "Company name must be between 2 and 255 characters" })
573
+ ], UpdateCompanyProfileDto.prototype, "companyName", 2);
582
574
  __decorateClass([
583
- (0, import_typeorm.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
584
- ], BaseEntity.prototype, "createdAt", 2);
575
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter company website url." }),
576
+ (0, import_class_validator17.IsUrl)({}, { message: "Invalid website URL format" })
577
+ ], UpdateCompanyProfileDto.prototype, "webSite", 2);
585
578
  __decorateClass([
586
- (0, import_typeorm.Column)({ name: "created_by", type: "integer", nullable: true })
587
- ], BaseEntity.prototype, "createdBy", 2);
579
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter company address." }),
580
+ (0, import_class_validator17.IsString)({ message: "Company address must be a string" }),
581
+ (0, import_class_validator17.Length)(5, 1e3, { message: "Address must be between 5 and 1000 characters" })
582
+ ], UpdateCompanyProfileDto.prototype, "companyAddress", 2);
588
583
  __decorateClass([
589
- (0, import_typeorm.UpdateDateColumn)({ name: "updated_at", type: "timestamp with time zone" })
590
- ], BaseEntity.prototype, "updatedAt", 2);
584
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter phone number." }),
585
+ (0, import_class_validator17.Matches)(/^(\+1\s?)?(\(?\d{3}\)?[\s.-]?)?\d{3}[\s.-]?\d{4}$/, {
586
+ message: "Please enter a valid US phone number"
587
+ })
588
+ ], UpdateCompanyProfileDto.prototype, "phoneNumber", 2);
591
589
  __decorateClass([
592
- (0, import_typeorm.Column)({ name: "updated_by", type: "integer", nullable: true })
593
- ], BaseEntity.prototype, "updatedBy", 2);
590
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter email." }),
591
+ (0, import_class_validator17.IsEmail)()
592
+ ], UpdateCompanyProfileDto.prototype, "email", 2);
594
593
  __decorateClass([
595
- (0, import_typeorm.Column)({ name: "is_deleted", type: "boolean", default: false })
596
- ], BaseEntity.prototype, "isDeleted", 2);
594
+ (0, import_class_validator17.IsOptional)(),
595
+ (0, import_class_validator17.IsString)({ message: "About company must be a string." })
596
+ ], UpdateCompanyProfileDto.prototype, "aboutCompany", 2);
597
+
598
+ // src/modules/user/client-profile/dto/client-change-password.dto.ts
599
+ var import_class_validator18 = require("class-validator");
600
+ var ClientChangePasswordDto = class {
601
+ };
597
602
  __decorateClass([
598
- (0, import_typeorm.Column)({ name: "deleted_by", type: "integer", nullable: true })
599
- ], BaseEntity.prototype, "deletedBy", 2);
603
+ (0, import_class_validator18.IsNotEmpty)({ message: "Please enter Old Password." }),
604
+ (0, import_class_validator18.IsString)()
605
+ ], ClientChangePasswordDto.prototype, "oldPassword", 2);
600
606
  __decorateClass([
601
- (0, import_typeorm.DeleteDateColumn)({
602
- name: "deleted_at",
603
- type: "timestamp with time zone",
604
- nullable: true
607
+ (0, import_class_validator18.IsNotEmpty)({ message: "Please enter New Password." }),
608
+ (0, import_class_validator18.IsString)(),
609
+ (0, import_class_validator18.MinLength)(6),
610
+ (0, import_class_validator18.MaxLength)(32),
611
+ (0, import_class_validator18.Matches)(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
612
+ message: "New Password must include letters, numbers and symbols."
605
613
  })
606
- ], BaseEntity.prototype, "deletedAt", 2);
614
+ ], ClientChangePasswordDto.prototype, "newPassword", 2);
607
615
 
608
- // src/entities/user.entity.ts
609
- var import_typeorm15 = require("typeorm");
616
+ // src/modules/question/pattern/pattern.ts
617
+ var QUESTION_PATTERN = {
618
+ fetchQuestions: "fetch.questions"
619
+ };
610
620
 
611
- // src/entities/refresh-token.entity.ts
612
- var import_typeorm2 = require("typeorm");
613
- var RefreshToken = class {
621
+ // src/modules/question/dto/create-question.dto.ts
622
+ var import_class_validator19 = require("class-validator");
623
+ var CreateQuestionDto = class {
614
624
  };
615
625
  __decorateClass([
616
- (0, import_typeorm2.PrimaryGeneratedColumn)("uuid")
617
- ], RefreshToken.prototype, "id", 2);
618
- __decorateClass([
619
- (0, import_typeorm2.Column)({ name: "user_id", type: "integer" })
620
- ], RefreshToken.prototype, "userId", 2);
621
- __decorateClass([
622
- (0, import_typeorm2.Column)({ name: "token_id", type: "varchar" })
623
- ], RefreshToken.prototype, "tokenId", 2);
624
- __decorateClass([
625
- (0, import_typeorm2.Column)({ name: "device_info", type: "json", nullable: true })
626
- ], RefreshToken.prototype, "deviceInfo", 2);
627
- __decorateClass([
628
- (0, import_typeorm2.Column)({ name: "is_revoked", type: "boolean", default: false })
629
- ], RefreshToken.prototype, "isRevoked", 2);
626
+ (0, import_class_validator19.IsNotEmpty)({ message: "Please enter unique id." })
627
+ ], CreateQuestionDto.prototype, "questionId", 2);
630
628
  __decorateClass([
631
- (0, import_typeorm2.Column)({ name: "expires_at", type: "timestamp with time zone" })
632
- ], RefreshToken.prototype, "expiresAt", 2);
629
+ (0, import_class_validator19.IsNotEmpty)({ message: "Please enter question." })
630
+ ], CreateQuestionDto.prototype, "question", 2);
633
631
  __decorateClass([
634
- (0, import_typeorm2.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
635
- ], RefreshToken.prototype, "createdAt", 2);
632
+ (0, import_class_validator19.IsNotEmpty)({ message: "Please enter for whom the question is." })
633
+ ], CreateQuestionDto.prototype, "questionFor", 2);
636
634
  __decorateClass([
637
- (0, import_typeorm2.UpdateDateColumn)({ name: "updated_at", type: "timestamp with time zone" })
638
- ], RefreshToken.prototype, "updatedAt", 2);
635
+ (0, import_class_validator19.IsNotEmpty)({ message: "Please enter options." })
636
+ ], CreateQuestionDto.prototype, "options", 2);
639
637
  __decorateClass([
640
- (0, import_typeorm2.ManyToOne)(() => User, (user) => user.refreshTokens),
641
- (0, import_typeorm2.JoinColumn)({ name: "user_id" })
642
- ], RefreshToken.prototype, "user", 2);
643
- RefreshToken = __decorateClass([
644
- (0, import_typeorm2.Entity)("refresh_tokens")
645
- ], RefreshToken);
638
+ (0, import_class_validator19.IsOptional)(),
639
+ (0, import_class_validator19.IsBoolean)({ message: "Whether the question status active" })
640
+ ], CreateQuestionDto.prototype, "isActive", 2);
646
641
 
647
- // src/entities/senseloaf-log.entity.ts
648
- var import_typeorm3 = require("typeorm");
649
- var SenseloafLog = class {
642
+ // src/modules/job/pattern/pattern.ts
643
+ var JOB_ROLE_PATTERN = {
644
+ fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
645
+ };
646
+ var JOB_PATTERN = {
647
+ fetchJobs: "fetch.jobs",
648
+ fetchJobCountAsPerStatus: "fetch.job.count.as.per.status",
649
+ fetchJobsDropdown: "fetch.jobs.dropdown",
650
+ fetchJobDetail: "fetch.job.details",
651
+ handleJdUpload: "handle.jd.upload",
652
+ fetchJobBasicInformation: "fetch.job.basic.information",
653
+ createJobBasicInformation: "create.job.basic.information",
654
+ updateJobBasicInformation: "update.job.basic.information",
655
+ fetchJobAdditionalComments: "fetch.job.additional.comments",
656
+ updateJobAdditionalComments: "update.job.additional.comments",
657
+ fetchJobDescription: "fetch.job.description",
658
+ updateJobDescription: "update.job.description",
659
+ updateJobStatus: "update.job.status",
660
+ searchJobsByRoleAndSkills: "search.jobs.by.role.and.skills"
661
+ };
662
+
663
+ // src/modules/job/dto/job-basic-information.dto.ts
664
+ var import_class_validator20 = require("class-validator");
665
+ var import_class_transformer = require("class-transformer");
666
+ var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
667
+ JobLocation2["ONSITE"] = "ONSITE";
668
+ JobLocation2["REMOTE"] = "REMOTE";
669
+ JobLocation2["BOTH"] = "BOTH";
670
+ return JobLocation2;
671
+ })(JobLocation || {});
672
+ var EmploymentType = /* @__PURE__ */ ((EmploymentType2) => {
673
+ EmploymentType2["FULLTIME"] = "FULLTIME";
674
+ EmploymentType2["PARTTIME"] = "PARTTIME";
675
+ EmploymentType2["BOTH"] = "BOTH";
676
+ return EmploymentType2;
677
+ })(EmploymentType || {});
678
+ var JobBasicInformationDto = class {
650
679
  };
651
680
  __decorateClass([
652
- (0, import_typeorm3.PrimaryGeneratedColumn)("increment", { type: "integer" })
653
- ], SenseloafLog.prototype, "id", 2);
654
- __decorateClass([
655
- (0, import_typeorm3.Column)({ name: "user_id", type: "integer", nullable: true })
656
- ], SenseloafLog.prototype, "userId", 2);
681
+ (0, import_class_validator20.IsNotEmpty)({ message: "Please enter job role" }),
682
+ (0, import_class_validator20.IsString)({ message: "Job role must be a string" })
683
+ ], JobBasicInformationDto.prototype, "jobRole", 2);
657
684
  __decorateClass([
658
- (0, import_typeorm3.Column)({ name: "type", type: "varchar", nullable: true })
659
- ], SenseloafLog.prototype, "type", 2);
685
+ (0, import_class_validator20.IsOptional)(),
686
+ (0, import_class_validator20.IsString)({ message: "Note must be a string" })
687
+ ], JobBasicInformationDto.prototype, "note", 2);
660
688
  __decorateClass([
661
- (0, import_typeorm3.Column)({ name: "end_point", type: "varchar" })
662
- ], SenseloafLog.prototype, "endpoint", 2);
689
+ (0, import_class_validator20.IsArray)({ message: "Skills must be an array" }),
690
+ (0, import_class_validator20.ArrayNotEmpty)({ message: "Please select at least one skill" }),
691
+ (0, import_class_validator20.IsNumber)({}, { each: true, message: "Each skill must be a number" }),
692
+ (0, import_class_transformer.Type)(() => Number)
693
+ ], JobBasicInformationDto.prototype, "skills", 2);
663
694
  __decorateClass([
664
- (0, import_typeorm3.Column)({ name: "success", type: "boolean" })
665
- ], SenseloafLog.prototype, "success", 2);
695
+ (0, import_class_validator20.IsNumber)({}, { message: "Openings must be a number" }),
696
+ (0, import_class_validator20.Min)(1, { message: "There must be at least 1 opening" }),
697
+ (0, import_class_transformer.Type)(() => Number)
698
+ ], JobBasicInformationDto.prototype, "openings", 2);
666
699
  __decorateClass([
667
- (0, import_typeorm3.Column)({ name: "request", type: "jsonb", nullable: true })
668
- ], SenseloafLog.prototype, "request", 2);
700
+ (0, import_class_validator20.IsEnum)(JobLocation, {
701
+ message: `Location must be one of: ${Object.values(JobLocation).join(
702
+ ", "
703
+ )}`
704
+ })
705
+ ], JobBasicInformationDto.prototype, "location", 2);
669
706
  __decorateClass([
670
- (0, import_typeorm3.Column)({ name: "response", type: "jsonb", nullable: true })
671
- ], SenseloafLog.prototype, "response", 2);
707
+ (0, import_class_validator20.IsEnum)(EmploymentType, {
708
+ message: `Type of employment must be one of: ${Object.values(
709
+ EmploymentType
710
+ ).join(", ")}`
711
+ })
712
+ ], JobBasicInformationDto.prototype, "typeOfEmployment", 2);
672
713
  __decorateClass([
673
- (0, import_typeorm3.Column)({ name: "error_message", type: "text", nullable: true })
674
- ], SenseloafLog.prototype, "errorMessage", 2);
714
+ (0, import_class_validator20.IsNumber)({}, { message: "Expected salary (from) must be a number" }),
715
+ (0, import_class_validator20.Min)(0, { message: "Expected salary (from) cannot be negative" }),
716
+ (0, import_class_transformer.Type)(() => Number)
717
+ ], JobBasicInformationDto.prototype, "expectedSalaryFrom", 2);
675
718
  __decorateClass([
676
- (0, import_typeorm3.Column)({ name: "scope", type: "varchar", nullable: true })
677
- ], SenseloafLog.prototype, "scope", 2);
719
+ (0, import_class_validator20.IsNumber)({}, { message: "Expected salary (to) must be a number" }),
720
+ (0, import_class_validator20.Min)(0, { message: "Expected salary (to) cannot be negative" }),
721
+ (0, import_class_transformer.Type)(() => Number)
722
+ ], JobBasicInformationDto.prototype, "expectedSalaryTo", 2);
678
723
  __decorateClass([
679
- (0, import_typeorm3.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
680
- ], SenseloafLog.prototype, "createdAt", 2);
724
+ (0, import_class_validator20.IsString)({ message: "Onboarding TAT must be a string" }),
725
+ (0, import_class_validator20.IsOptional)()
726
+ ], JobBasicInformationDto.prototype, "onboardingTat", 2);
681
727
  __decorateClass([
682
- (0, import_typeorm3.ManyToOne)(() => User, (user) => user.senseloafLogs),
683
- (0, import_typeorm3.JoinColumn)({ name: "user_id" })
684
- ], SenseloafLog.prototype, "user", 2);
685
- SenseloafLog = __decorateClass([
686
- (0, import_typeorm3.Entity)("senseloaf_logs")
687
- ], SenseloafLog);
728
+ (0, import_class_validator20.IsString)({ message: "Candidate communication skills must be a string" }),
729
+ (0, import_class_validator20.IsOptional)()
730
+ ], JobBasicInformationDto.prototype, "candidateCommunicationSkills", 2);
688
731
 
689
- // src/entities/otp.entity.ts
690
- var import_typeorm4 = require("typeorm");
691
- var Otp = class {
732
+ // src/modules/job/dto/job-additional-comment.dto.ts
733
+ var import_class_validator21 = require("class-validator");
734
+ var JobAdditionalCommentDto = class {
692
735
  };
693
736
  __decorateClass([
694
- (0, import_typeorm4.PrimaryGeneratedColumn)("increment", { type: "integer" })
695
- ], Otp.prototype, "id", 2);
696
- // individual index to find OTPs by user
697
- __decorateClass([
698
- (0, import_typeorm4.Column)({ name: "user_id", type: "integer", nullable: true }),
699
- (0, import_typeorm4.Index)()
700
- ], Otp.prototype, "userId", 2);
701
- __decorateClass([
702
- (0, import_typeorm4.Column)({ name: "otp", type: "varchar", length: 4 }),
703
- (0, import_typeorm4.Index)()
704
- ], Otp.prototype, "otp", 2);
737
+ (0, import_class_validator21.IsOptional)(),
738
+ (0, import_class_validator21.IsString)({ message: "Additional comment must be a string" }),
739
+ (0, import_class_validator21.MaxLength)(500, { message: "Additional comment must not exceed 500 characters" })
740
+ ], JobAdditionalCommentDto.prototype, "additionalComment", 2);
741
+
742
+ // src/modules/job/dto/job-description.dto.ts
743
+ var import_class_validator22 = require("class-validator");
744
+ var JobDescriptionDto = class {
745
+ };
705
746
  __decorateClass([
706
- (0, import_typeorm4.Column)({ name: "otp_purpose", type: "varchar", length: 50 })
707
- ], Otp.prototype, "otpPurpose", 2);
747
+ (0, import_class_validator22.IsNotEmpty)({ message: "Please enter job description" }),
748
+ (0, import_class_validator22.IsString)({ message: "Description must be a string" }),
749
+ (0, import_class_validator22.MaxLength)(5e3, { message: "Description must not exceed 5000 characters" })
750
+ ], JobDescriptionDto.prototype, "description", 2);
751
+
752
+ // src/modules/job/dto/job-status.dto.ts
753
+ var import_class_validator23 = require("class-validator");
754
+ var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
755
+ JobStatus2["ACTIVE"] = "ACTIVE";
756
+ JobStatus2["OPEN"] = "OPEN";
757
+ JobStatus2["DRAFT"] = "DRAFT";
758
+ JobStatus2["ONHOLD"] = "ONHOLD";
759
+ JobStatus2["CLOSED"] = "CLOSED";
760
+ return JobStatus2;
761
+ })(JobStatus || {});
762
+ var JobStatusDto = class {
763
+ };
708
764
  __decorateClass([
709
- (0, import_typeorm4.Column)({ name: "target", type: "varchar", nullable: true }),
710
- (0, import_typeorm4.Index)()
711
- ], Otp.prototype, "target", 2);
712
- // support expiration checks
713
- __decorateClass([
714
- (0, import_typeorm4.Column)({ name: "expire_at", type: "timestamp" }),
715
- (0, import_typeorm4.Index)()
716
- ], Otp.prototype, "expiresAt", 2);
717
- __decorateClass([
718
- (0, import_typeorm4.Column)({ name: "is_used", type: "boolean", default: false }),
719
- (0, import_typeorm4.Index)()
720
- ], Otp.prototype, "isUsed", 2);
765
+ (0, import_class_validator23.IsNotEmpty)({ message: "Please provide a job status" }),
766
+ (0, import_class_validator23.IsEnum)(JobStatus, {
767
+ message: `Status must be one of: ${Object.values(JobStatus).join(", ")}`
768
+ })
769
+ ], JobStatusDto.prototype, "status", 2);
770
+
771
+ // src/modules/job/dto/job-id-param.dto.ts
772
+ var import_class_validator24 = require("class-validator");
773
+ var JobIdParamDto = class {
774
+ };
721
775
  __decorateClass([
722
- (0, import_typeorm4.Column)({ name: "resend_count", type: "int", default: 0 })
723
- ], Otp.prototype, "resendCount", 2);
776
+ (0, import_class_validator24.IsUUID)("4", {
777
+ message: "Invalid job ID. It must be a valid UUID version 4."
778
+ })
779
+ ], JobIdParamDto.prototype, "id", 2);
780
+
781
+ // src/modules/user/freelancer-profile/pattern/pattern.ts
782
+ var PROFILE_PATTERN = {
783
+ fetchFreelancerProfile: "fetch.freelancer.profile",
784
+ changeFreelancerPassword: "change.freelancer.password",
785
+ uploadFreelancerProfilePic: "upload.freelancer.profilepic",
786
+ updateFreelancerProfile: "update.freelancer.profile"
787
+ };
788
+
789
+ // src/modules/user/freelancer-profile/dto/freelancer-change-password.dto.ts
790
+ var import_class_validator25 = require("class-validator");
791
+ var FreelancerChangePasswordDto = class {
792
+ };
724
793
  __decorateClass([
725
- (0, import_typeorm4.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
726
- ], Otp.prototype, "createdAt", 2);
794
+ (0, import_class_validator25.IsNotEmpty)({ message: "Please enter Old Password." }),
795
+ (0, import_class_validator25.IsString)()
796
+ ], FreelancerChangePasswordDto.prototype, "oldPassword", 2);
727
797
  __decorateClass([
728
- (0, import_typeorm4.ManyToOne)(() => User, (user) => user.otps),
729
- (0, import_typeorm4.JoinColumn)({ name: "user_id" })
730
- ], Otp.prototype, "user", 2);
731
- Otp = __decorateClass([
732
- (0, import_typeorm4.Entity)("otps"),
733
- (0, import_typeorm4.Index)(["userId", "otp", "otpPurpose", "isUsed"])
734
- ], Otp);
798
+ (0, import_class_validator25.IsNotEmpty)({ message: "Please enter New Password." }),
799
+ (0, import_class_validator25.IsString)(),
800
+ (0, import_class_validator25.MinLength)(6),
801
+ (0, import_class_validator25.MaxLength)(32),
802
+ (0, import_class_validator25.Matches)(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
803
+ message: "New Password must include letters, numbers and symbols."
804
+ })
805
+ ], FreelancerChangePasswordDto.prototype, "newPassword", 2);
735
806
 
736
- // src/entities/freelancer-profile.entity.ts
737
- var import_typeorm5 = require("typeorm");
738
- var NatureOfWork = /* @__PURE__ */ ((NatureOfWork2) => {
739
- NatureOfWork2["FULLTIME"] = "FULLTIME";
740
- NatureOfWork2["PARTTIME"] = "PARTTIME";
741
- NatureOfWork2["BOTH"] = "BOTH";
742
- return NatureOfWork2;
743
- })(NatureOfWork || {});
744
- var ModeOfWork = /* @__PURE__ */ ((ModeOfWork2) => {
745
- ModeOfWork2["ONSITE"] = "ONSITE";
746
- ModeOfWork2["REMOTE"] = "REMOTE";
747
- ModeOfWork2["BOTH"] = "BOTH";
748
- return ModeOfWork2;
749
- })(ModeOfWork || {});
750
- var OnboardingStepEnum = /* @__PURE__ */ ((OnboardingStepEnum2) => {
751
- OnboardingStepEnum2["SIGN_UP"] = "SIGN_UP";
752
- OnboardingStepEnum2["OTP_VERIFIED"] = "OTP_VERIFIED";
753
- OnboardingStepEnum2["UPLOAD_RESUME"] = "UPLOAD_RESUME";
754
- OnboardingStepEnum2["AI_VIDEO_ASSESMENT"] = "AI_VIDEO_ASSESMENT";
755
- OnboardingStepEnum2["CODING_CHALLENGE"] = "CODING_CHALLENGE";
756
- OnboardingStepEnum2["PROFILE_COMPLETION"] = "PROFILE_COMPLETION";
757
- return OnboardingStepEnum2;
758
- })(OnboardingStepEnum || {});
759
- var FreelancerProfile = class extends BaseEntity {
807
+ // src/modules/user/freelancer-profile/dto/update-freelancer-profile.dto.ts
808
+ var import_class_validator26 = require("class-validator");
809
+ var NatureOfWorkDto = /* @__PURE__ */ ((NatureOfWorkDto2) => {
810
+ NatureOfWorkDto2["FULLTIME"] = "FULLTIME";
811
+ NatureOfWorkDto2["PARTTIME"] = "PARTTIME";
812
+ NatureOfWorkDto2["BOTH"] = "BOTH";
813
+ return NatureOfWorkDto2;
814
+ })(NatureOfWorkDto || {});
815
+ var UpdateFreelancerProfileDto = class {
760
816
  };
761
- // individual index to find profile by user
762
- __decorateClass([
763
- (0, import_typeorm5.Column)({ name: "user_id", type: "integer", nullable: true }),
764
- (0, import_typeorm5.Index)()
765
- ], FreelancerProfile.prototype, "userId", 2);
766
817
  __decorateClass([
767
- (0, import_typeorm5.ManyToOne)(() => User, (user) => user.freelancerProfile),
768
- (0, import_typeorm5.JoinColumn)({ name: "user_id" })
769
- ], FreelancerProfile.prototype, "user", 2);
818
+ (0, import_class_validator26.IsOptional)(),
819
+ (0, import_class_validator26.IsString)()
820
+ ], UpdateFreelancerProfileDto.prototype, "firstName", 2);
770
821
  __decorateClass([
771
- (0, import_typeorm5.Column)({ name: "resume_url", type: "text", nullable: true })
772
- ], FreelancerProfile.prototype, "resumeUrl", 2);
822
+ (0, import_class_validator26.IsOptional)(),
823
+ (0, import_class_validator26.IsString)()
824
+ ], UpdateFreelancerProfileDto.prototype, "lastName", 2);
773
825
  __decorateClass([
774
- (0, import_typeorm5.Column)({ name: "resume_data", type: "jsonb", nullable: true })
775
- ], FreelancerProfile.prototype, "resumeData", 2);
826
+ (0, import_class_validator26.IsOptional)(),
827
+ (0, import_class_validator26.IsEmail)()
828
+ ], UpdateFreelancerProfileDto.prototype, "email", 2);
776
829
  __decorateClass([
777
- (0, import_typeorm5.Column)({ name: "is_developer", type: "boolean", default: false })
778
- ], FreelancerProfile.prototype, "isDeveloper", 2);
830
+ (0, import_class_validator26.IsOptional)(),
831
+ (0, import_class_validator26.IsString)()
832
+ ], UpdateFreelancerProfileDto.prototype, "mobile", 2);
779
833
  __decorateClass([
780
- (0, import_typeorm5.Column)({
781
- name: "nature_of_work",
782
- type: "enum",
783
- enum: NatureOfWork,
784
- nullable: true
785
- })
786
- ], FreelancerProfile.prototype, "natureOfWork", 2);
834
+ (0, import_class_validator26.IsOptional)(),
835
+ (0, import_class_validator26.IsNumber)()
836
+ ], UpdateFreelancerProfileDto.prototype, "countryId", 2);
787
837
  __decorateClass([
788
- (0, import_typeorm5.Column)({ name: "currency", type: "varchar", default: "USD" })
789
- ], FreelancerProfile.prototype, "currency", 2);
838
+ (0, import_class_validator26.IsOptional)(),
839
+ (0, import_class_validator26.IsString)()
840
+ ], UpdateFreelancerProfileDto.prototype, "currency", 2);
790
841
  __decorateClass([
791
- (0, import_typeorm5.Column)({
792
- name: "expected_hourly_compensation",
793
- type: "numeric",
794
- precision: 10,
795
- scale: 2,
796
- nullable: true
797
- })
798
- ], FreelancerProfile.prototype, "expectedHourlyCompensation", 2);
842
+ (0, import_class_validator26.IsOptional)(),
843
+ (0, import_class_validator26.IsString)()
844
+ ], UpdateFreelancerProfileDto.prototype, "expectedHourlyCompensation", 2);
799
845
  __decorateClass([
800
- (0, import_typeorm5.Column)({
801
- name: "mode_of_work",
802
- type: "enum",
803
- enum: ModeOfWork,
804
- nullable: true
846
+ (0, import_class_validator26.IsOptional)(),
847
+ (0, import_class_validator26.IsEnum)(NatureOfWorkDto, {
848
+ message: `Engagement Type must be one of: ${Object.values(NatureOfWorkDto).join(", ")}`
805
849
  })
806
- ], FreelancerProfile.prototype, "modeOfWork", 2);
807
- __decorateClass([
808
- (0, import_typeorm5.Column)({ name: "availability_to_join", type: "varchar", nullable: true })
809
- ], FreelancerProfile.prototype, "availabilityToJoin", 2);
810
- __decorateClass([
811
- (0, import_typeorm5.Column)({ name: "is_immediate_joiner", type: "boolean", nullable: true })
812
- ], FreelancerProfile.prototype, "isImmediateJoiner", 2);
813
- __decorateClass([
814
- (0, import_typeorm5.Column)({ name: "linkedin_profile_link", type: "varchar", nullable: true })
815
- ], FreelancerProfile.prototype, "linkedinProfileLink", 2);
816
- __decorateClass([
817
- (0, import_typeorm5.Column)({ name: "kaggle_profile_link", type: "varchar", nullable: true })
818
- ], FreelancerProfile.prototype, "kaggleProfileLink", 2);
850
+ ], UpdateFreelancerProfileDto.prototype, "natureOfWork", 2);
819
851
  __decorateClass([
820
- (0, import_typeorm5.Column)({ name: "github_profile_link", type: "varchar", nullable: true })
821
- ], FreelancerProfile.prototype, "githubProfileLink", 2);
852
+ (0, import_class_validator26.IsOptional)(),
853
+ (0, import_class_validator26.IsString)()
854
+ ], UpdateFreelancerProfileDto.prototype, "portfolioLink", 2);
822
855
  __decorateClass([
823
- (0, import_typeorm5.Column)({
824
- name: "stack_overflow_profile_link",
825
- type: "varchar",
826
- nullable: true
827
- })
828
- ], FreelancerProfile.prototype, "stackOverflowProfileLink", 2);
856
+ (0, import_class_validator26.IsOptional)(),
857
+ (0, import_class_validator26.IsString)()
858
+ ], UpdateFreelancerProfileDto.prototype, "address", 2);
829
859
  __decorateClass([
830
- (0, import_typeorm5.Column)({ name: "portfolio_link", type: "varchar", nullable: true })
831
- ], FreelancerProfile.prototype, "portfolioLink", 2);
860
+ (0, import_class_validator26.IsOptional)(),
861
+ (0, import_class_validator26.IsString)()
862
+ ], UpdateFreelancerProfileDto.prototype, "about", 2);
832
863
  __decorateClass([
833
- (0, import_typeorm5.Column)({
834
- name: "onboarding_step_completed",
835
- type: "enum",
836
- enum: OnboardingStepEnum,
837
- nullable: true
838
- })
839
- ], FreelancerProfile.prototype, "onboardingStepCompleted", 2);
864
+ (0, import_class_validator26.IsOptional)(),
865
+ (0, import_class_validator26.IsString)()
866
+ ], UpdateFreelancerProfileDto.prototype, "linkedinProfileLink", 2);
840
867
  __decorateClass([
841
- (0, import_typeorm5.Column)({ name: "country_id", type: "integer", nullable: true })
842
- ], FreelancerProfile.prototype, "countryId", 2);
868
+ (0, import_class_validator26.IsOptional)(),
869
+ (0, import_class_validator26.IsString)()
870
+ ], UpdateFreelancerProfileDto.prototype, "kaggleProfileLink", 2);
843
871
  __decorateClass([
844
- (0, import_typeorm5.Column)({ name: "address", type: "varchar", nullable: true })
845
- ], FreelancerProfile.prototype, "address", 2);
872
+ (0, import_class_validator26.IsOptional)(),
873
+ (0, import_class_validator26.IsString)()
874
+ ], UpdateFreelancerProfileDto.prototype, "githubProfileLink", 2);
846
875
  __decorateClass([
847
- (0, import_typeorm5.Column)({ name: "about", type: "varchar", nullable: true })
848
- ], FreelancerProfile.prototype, "about", 2);
849
- FreelancerProfile = __decorateClass([
850
- (0, import_typeorm5.Entity)("freelancer_profiles")
851
- ], FreelancerProfile);
852
-
853
- // src/entities/job.entity.ts
854
- var import_typeorm9 = require("typeorm");
876
+ (0, import_class_validator26.IsOptional)(),
877
+ (0, import_class_validator26.IsString)()
878
+ ], UpdateFreelancerProfileDto.prototype, "stackOverflowProfileLink", 2);
855
879
 
856
- // src/entities/job-skill.entity.ts
857
- var import_typeorm7 = require("typeorm");
880
+ // src/modules/bank/pattern/pattern.ts
881
+ var BANK_PATTERN = {
882
+ addFreelancerBankDetails: "add.freelancer.bankdetails",
883
+ fetchFreelancerBankDetails: "fetch.freelancer.bank.details",
884
+ updateFreelancerBankDetails: "update.freelancer.bank.details"
885
+ };
858
886
 
859
- // src/entities/skill.entity.ts
860
- var import_typeorm6 = require("typeorm");
861
- var Skill = class extends BaseEntity {
887
+ // src/modules/bank/dto/freelancer-bank-details.dto.ts
888
+ var import_class_validator27 = require("class-validator");
889
+ var BankAccountScope = /* @__PURE__ */ ((BankAccountScope2) => {
890
+ BankAccountScope2["DOMESTIC"] = "DOMESTIC";
891
+ BankAccountScope2["INTERNATIONAL"] = "INTERNATIONAL";
892
+ return BankAccountScope2;
893
+ })(BankAccountScope || {});
894
+ var FreelancerBankDetailsDto = class {
862
895
  };
863
896
  __decorateClass([
864
- (0, import_typeorm6.Column)({ name: "name", type: "varchar", nullable: true })
865
- ], Skill.prototype, "name", 2);
897
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Account Holder Name." })
898
+ ], FreelancerBankDetailsDto.prototype, "name", 2);
866
899
  __decorateClass([
867
- (0, import_typeorm6.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
868
- ], Skill.prototype, "slug", 2);
900
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Mobile Number." })
901
+ ], FreelancerBankDetailsDto.prototype, "mobile", 2);
869
902
  __decorateClass([
870
- (0, import_typeorm6.Column)({ name: "is_active", type: "boolean", default: false })
871
- ], Skill.prototype, "isActive", 2);
903
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Email." })
904
+ ], FreelancerBankDetailsDto.prototype, "email", 2);
872
905
  __decorateClass([
873
- (0, import_typeorm6.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.skill)
874
- ], Skill.prototype, "jobSkills", 2);
875
- Skill = __decorateClass([
876
- (0, import_typeorm6.Entity)("skills")
877
- ], Skill);
878
-
879
- // src/entities/job-skill.entity.ts
880
- var JobSkill = class extends BaseEntity {
881
- };
906
+ (0, import_class_validator27.IsOptional)()
907
+ ], FreelancerBankDetailsDto.prototype, "address", 2);
882
908
  __decorateClass([
883
- (0, import_typeorm7.Column)({ name: "job_id", type: "integer" }),
884
- (0, import_typeorm7.Index)()
885
- ], JobSkill.prototype, "jobId", 2);
886
- __decorateClass([
887
- (0, import_typeorm7.ManyToOne)(() => Job, (job) => job.jobSkills, { onDelete: "CASCADE" }),
888
- (0, import_typeorm7.JoinColumn)({ name: "job_id" })
889
- ], JobSkill.prototype, "job", 2);
909
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Account Number." })
910
+ ], FreelancerBankDetailsDto.prototype, "accountNumber", 2);
890
911
  __decorateClass([
891
- (0, import_typeorm7.Column)({ name: "skill_id", type: "integer" }),
892
- (0, import_typeorm7.Index)()
893
- ], JobSkill.prototype, "skillId", 2);
912
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Bank Name." })
913
+ ], FreelancerBankDetailsDto.prototype, "bankName", 2);
894
914
  __decorateClass([
895
- (0, import_typeorm7.ManyToOne)(() => Skill, (skill) => skill.jobSkills, { onDelete: "CASCADE" }),
896
- (0, import_typeorm7.JoinColumn)({ name: "skill_id" })
897
- ], JobSkill.prototype, "skill", 2);
898
- JobSkill = __decorateClass([
899
- (0, import_typeorm7.Entity)("job_skills")
900
- ], JobSkill);
901
-
902
- // src/entities/job-application.entity.ts
903
- var import_typeorm8 = require("typeorm");
904
- var ApplicationStatusEnum = /* @__PURE__ */ ((ApplicationStatusEnum2) => {
905
- ApplicationStatusEnum2["PENDING"] = "PENDING";
906
- ApplicationStatusEnum2["SHORTLISTED"] = "SHORTLISTED";
907
- ApplicationStatusEnum2["INTERVIEW_IN_PROGRESS"] = "INTERVIEW_IN_PROGRESS";
908
- ApplicationStatusEnum2["INTERVIEWED"] = "INTERVIEWED";
909
- ApplicationStatusEnum2["OFFERED"] = "OFFERED";
910
- ApplicationStatusEnum2["HIRED"] = "HIRED";
911
- ApplicationStatusEnum2["REJECTED_BEFORE_INTERVIEW"] = "REJECTED_BEFORE_INTERVIEW";
912
- ApplicationStatusEnum2["REJECTED_IN_INTERVIEW"] = "REJECTED_IN_INTERVIEW";
913
- ApplicationStatusEnum2["REJECTED_AFTER_INTERVIEW"] = "REJECTED_AFTER_INTERVIEW";
914
- ApplicationStatusEnum2["NOT_SUITABLE"] = "NOT_SUITABLE";
915
- ApplicationStatusEnum2["WITHDRAWN"] = "WITHDRAWN";
916
- return ApplicationStatusEnum2;
917
- })(ApplicationStatusEnum || {});
918
- var JobApplication = class extends BaseEntity {
919
- };
915
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Branch Name." })
916
+ ], FreelancerBankDetailsDto.prototype, "branchName", 2);
920
917
  __decorateClass([
921
- (0, import_typeorm8.Column)({
922
- name: "job_application_id",
923
- type: "varchar",
924
- unique: true,
925
- nullable: true
926
- })
927
- ], JobApplication.prototype, "jobApplicationId", 2);
918
+ (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "DOMESTIC"),
919
+ (0, import_class_validator27.IsNotEmpty)({ message: "IFSC Code is required for DOMESTIC accounts." })
920
+ ], FreelancerBankDetailsDto.prototype, "ifscCode", 2);
928
921
  __decorateClass([
929
- (0, import_typeorm8.Column)({ name: "job_id", type: "integer" }),
930
- (0, import_typeorm8.Index)()
931
- ], JobApplication.prototype, "jobId", 2);
922
+ (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
923
+ (0, import_class_validator27.IsNotEmpty)({ message: "Routing Number/Sort Code is required for INTERNATIONAL accounts." })
924
+ ], FreelancerBankDetailsDto.prototype, "routingNo", 2);
932
925
  __decorateClass([
933
- (0, import_typeorm8.ManyToOne)(() => Job, (job) => job.jobApplications, { onDelete: "CASCADE" }),
934
- (0, import_typeorm8.JoinColumn)({ name: "job_id" })
935
- ], JobApplication.prototype, "job", 2);
926
+ (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
927
+ (0, import_class_validator27.IsNotEmpty)({ message: "ABA Number is required for INTERNATIONAL accounts." })
928
+ ], FreelancerBankDetailsDto.prototype, "abaNumber", 2);
936
929
  __decorateClass([
937
- (0, import_typeorm8.Column)({ name: "user_id", type: "integer" }),
938
- (0, import_typeorm8.Index)()
939
- ], JobApplication.prototype, "userId", 2);
930
+ (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
931
+ (0, import_class_validator27.IsNotEmpty)({ message: "IBAN is required for INTERNATIONAL accounts." })
932
+ ], FreelancerBankDetailsDto.prototype, "iban", 2);
940
933
  __decorateClass([
941
- (0, import_typeorm8.ManyToOne)(() => User, (user) => user.jobApplications),
942
- (0, import_typeorm8.JoinColumn)({ name: "user_id" })
943
- ], JobApplication.prototype, "user", 2);
934
+ (0, import_class_validator27.IsOptional)()
935
+ ], FreelancerBankDetailsDto.prototype, "accountType", 2);
944
936
  __decorateClass([
945
- (0, import_typeorm8.Column)({
946
- name: "status",
947
- type: "enum",
948
- enum: ApplicationStatusEnum,
949
- default: "PENDING" /* PENDING */
937
+ (0, import_class_validator27.IsEnum)(BankAccountScope, {
938
+ message: `Type of Account Scope must be one of: ${Object.values(
939
+ BankAccountScope
940
+ ).join(", ")}`
950
941
  })
951
- ], JobApplication.prototype, "status", 2);
942
+ ], FreelancerBankDetailsDto.prototype, "accountScope", 2);
943
+
944
+ // src/modules/plan/pattern/pattern.ts
945
+ var PLAN_PATTERN = {
946
+ fetchPlans: "fetch.plans"
947
+ };
948
+
949
+ // src/modules/system-preference/pattern/pattern.ts
950
+ var SYSTEM_PREFERENCES_PATTERN = {
951
+ fetchSystemPreference: "fetch.system.preferences",
952
+ updateSystemPreference: "update.system.preferences",
953
+ createSystemPreference: "create.system.preferences"
954
+ };
955
+
956
+ // src/modules/system-preference/dto/system-preference.dto.ts
957
+ var import_class_validator28 = require("class-validator");
958
+ var SystemPreferenceKey = /* @__PURE__ */ ((SystemPreferenceKey2) => {
959
+ SystemPreferenceKey2["EMAIL_NOTIFICATION"] = "EMAIL_NOTIFICATION";
960
+ SystemPreferenceKey2["DARK_MODE"] = "DARK_MODE";
961
+ return SystemPreferenceKey2;
962
+ })(SystemPreferenceKey || {});
963
+ var SystemPreferenceDto = class {
964
+ };
952
965
  __decorateClass([
953
- (0, import_typeorm8.Column)({
954
- name: "applied_at",
955
- type: "timestamp with time zone",
956
- default: () => "CURRENT_TIMESTAMP"
957
- })
958
- ], JobApplication.prototype, "appliedAt", 2);
966
+ (0, import_class_validator28.IsBoolean)()
967
+ ], SystemPreferenceDto.prototype, "value", 2);
959
968
  __decorateClass([
960
- (0, import_typeorm8.Column)({
961
- name: "shortlisted_at",
962
- type: "timestamp with time zone",
963
- nullable: true
969
+ (0, import_class_validator28.IsEnum)(SystemPreferenceKey, {
970
+ message: `key must be one of: ${Object.values(
971
+ SystemPreferenceKey
972
+ ).join(", ")}`
964
973
  })
965
- ], JobApplication.prototype, "shortlistedAt", 2);
974
+ ], SystemPreferenceDto.prototype, "key", 2);
975
+
976
+ // src/modules/notification/pattern/pattern.ts
977
+ var NOTIFICATION_PATTERN = {
978
+ handleAccountVerificationNotification: "handle.account.verification.notification",
979
+ handleResetLinkNotification: "handle.reset.link.notification"
980
+ };
981
+
982
+ // src/modules/rating/pattern/pattern.ts
983
+ var RATING_PATTERN = {
984
+ addRating: "add.rating",
985
+ fetchRating: "fetch.rating"
986
+ };
987
+
988
+ // src/modules/rating/dto/add.rating.dto.ts
989
+ var import_class_validator29 = require("class-validator");
990
+
991
+ // src/entities/rating.entity.ts
992
+ var import_typeorm16 = require("typeorm");
993
+
994
+ // src/entities/user.entity.ts
995
+ var import_typeorm15 = require("typeorm");
996
+
997
+ // src/entities/base.entity.ts
998
+ var import_typeorm = require("typeorm");
999
+ var BaseEntity = class {
1000
+ };
966
1001
  __decorateClass([
967
- (0, import_typeorm8.Column)({
968
- name: "interview_started_at",
969
- type: "timestamp with time zone",
970
- nullable: true
971
- })
972
- ], JobApplication.prototype, "interviewStartedAt", 2);
1002
+ (0, import_typeorm.PrimaryGeneratedColumn)("increment", { type: "integer" })
1003
+ ], BaseEntity.prototype, "id", 2);
973
1004
  __decorateClass([
974
- (0, import_typeorm8.Column)({
975
- name: "interview_completed_at",
976
- type: "timestamp with time zone",
977
- nullable: true
978
- })
979
- ], JobApplication.prototype, "interviewCompletedAt", 2);
1005
+ (0, import_typeorm.Column)({ type: "uuid" }),
1006
+ (0, import_typeorm.Generated)("uuid")
1007
+ ], BaseEntity.prototype, "uuid", 2);
980
1008
  __decorateClass([
981
- (0, import_typeorm8.Column)({
982
- name: "offered_at",
983
- type: "timestamp with time zone",
984
- nullable: true
985
- })
986
- ], JobApplication.prototype, "offeredAt", 2);
1009
+ (0, import_typeorm.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
1010
+ ], BaseEntity.prototype, "createdAt", 2);
987
1011
  __decorateClass([
988
- (0, import_typeorm8.Column)({
989
- name: "hired_at",
990
- type: "timestamp with time zone",
991
- nullable: true
992
- })
993
- ], JobApplication.prototype, "hiredAt", 2);
1012
+ (0, import_typeorm.Column)({ name: "created_by", type: "integer", nullable: true })
1013
+ ], BaseEntity.prototype, "createdBy", 2);
994
1014
  __decorateClass([
995
- (0, import_typeorm8.Column)({
996
- name: "rejected_at",
997
- type: "timestamp with time zone",
998
- nullable: true
999
- })
1000
- ], JobApplication.prototype, "rejectedAt", 2);
1015
+ (0, import_typeorm.UpdateDateColumn)({ name: "updated_at", type: "timestamp with time zone" })
1016
+ ], BaseEntity.prototype, "updatedAt", 2);
1001
1017
  __decorateClass([
1002
- (0, import_typeorm8.Column)({ name: "rejection_reason", type: "varchar", nullable: true })
1003
- ], JobApplication.prototype, "rejectionReason", 2);
1018
+ (0, import_typeorm.Column)({ name: "updated_by", type: "integer", nullable: true })
1019
+ ], BaseEntity.prototype, "updatedBy", 2);
1004
1020
  __decorateClass([
1005
- (0, import_typeorm8.Column)({
1006
- name: "withdrawn_at",
1021
+ (0, import_typeorm.Column)({ name: "is_deleted", type: "boolean", default: false })
1022
+ ], BaseEntity.prototype, "isDeleted", 2);
1023
+ __decorateClass([
1024
+ (0, import_typeorm.Column)({ name: "deleted_by", type: "integer", nullable: true })
1025
+ ], BaseEntity.prototype, "deletedBy", 2);
1026
+ __decorateClass([
1027
+ (0, import_typeorm.DeleteDateColumn)({
1028
+ name: "deleted_at",
1007
1029
  type: "timestamp with time zone",
1008
1030
  nullable: true
1009
1031
  })
1010
- ], JobApplication.prototype, "withdrawnAt", 2);
1011
- __decorateClass([
1012
- (0, import_typeorm8.Column)({ name: "withdrawn_reason", type: "varchar", nullable: true })
1013
- ], JobApplication.prototype, "withdrawnReason", 2);
1014
- JobApplication = __decorateClass([
1015
- (0, import_typeorm8.Entity)("job_applications")
1016
- ], JobApplication);
1032
+ ], BaseEntity.prototype, "deletedAt", 2);
1017
1033
 
1018
- // src/entities/job.entity.ts
1019
- var JobLocationEnum = /* @__PURE__ */ ((JobLocationEnum2) => {
1020
- JobLocationEnum2["ONSITE"] = "ONSITE";
1021
- JobLocationEnum2["REMOTE"] = "REMOTE";
1022
- JobLocationEnum2["BOTH"] = "BOTH";
1023
- return JobLocationEnum2;
1024
- })(JobLocationEnum || {});
1025
- var TypeOfEmploymentEnum = /* @__PURE__ */ ((TypeOfEmploymentEnum2) => {
1026
- TypeOfEmploymentEnum2["FULLTIME"] = "FULLTIME";
1027
- TypeOfEmploymentEnum2["PARTTIME"] = "PARTTIME";
1028
- TypeOfEmploymentEnum2["BOTH"] = "BOTH";
1029
- return TypeOfEmploymentEnum2;
1030
- })(TypeOfEmploymentEnum || {});
1031
- var Step = /* @__PURE__ */ ((Step2) => {
1032
- Step2["BASIC_INFORMATION"] = "BASIC_INFORMATION";
1033
- Step2["ADDITIONAL_COMMENTS"] = "ADDITIONAL_COMMENTS";
1034
- Step2["JOB_DESCRIPTION"] = "JOB_DESCRIPTION";
1035
- return Step2;
1036
- })(Step || {});
1037
- var JobStatusEnum = /* @__PURE__ */ ((JobStatusEnum2) => {
1038
- JobStatusEnum2["ACTIVE"] = "ACTIVE";
1039
- JobStatusEnum2["OPEN"] = "OPEN";
1040
- JobStatusEnum2["DRAFT"] = "DRAFT";
1041
- JobStatusEnum2["ONHOLD"] = "ONHOLD";
1042
- JobStatusEnum2["CLOSED"] = "CLOSED";
1043
- return JobStatusEnum2;
1044
- })(JobStatusEnum || {});
1045
- var DurationTypeEnum = /* @__PURE__ */ ((DurationTypeEnum2) => {
1046
- DurationTypeEnum2["DAY"] = "DAY";
1047
- DurationTypeEnum2["WEEK"] = "WEEK";
1048
- DurationTypeEnum2["MONTH"] = "MONTH";
1049
- DurationTypeEnum2["YEAR"] = "YEAR";
1050
- return DurationTypeEnum2;
1051
- })(DurationTypeEnum || {});
1052
- var Job = class extends BaseEntity {
1034
+ // src/entities/refresh-token.entity.ts
1035
+ var import_typeorm2 = require("typeorm");
1036
+ var RefreshToken = class {
1053
1037
  };
1054
1038
  __decorateClass([
1055
- (0, import_typeorm9.Column)({ name: "job_id", type: "varchar", unique: true, nullable: true })
1056
- ], Job.prototype, "jobId", 2);
1057
- // individual index to find jobs by user
1039
+ (0, import_typeorm2.PrimaryGeneratedColumn)("uuid")
1040
+ ], RefreshToken.prototype, "id", 2);
1058
1041
  __decorateClass([
1059
- (0, import_typeorm9.Column)({ name: "user_id", type: "integer", nullable: true }),
1060
- (0, import_typeorm9.Index)()
1061
- ], Job.prototype, "userId", 2);
1042
+ (0, import_typeorm2.Column)({ name: "user_id", type: "integer" })
1043
+ ], RefreshToken.prototype, "userId", 2);
1062
1044
  __decorateClass([
1063
- (0, import_typeorm9.ManyToOne)(() => User, (user) => user.jobs),
1064
- (0, import_typeorm9.JoinColumn)({ name: "user_id" })
1065
- ], Job.prototype, "user", 2);
1045
+ (0, import_typeorm2.Column)({ name: "token_id", type: "varchar" })
1046
+ ], RefreshToken.prototype, "tokenId", 2);
1066
1047
  __decorateClass([
1067
- (0, import_typeorm9.Column)({ name: "job_role", type: "varchar", nullable: true })
1068
- ], Job.prototype, "jobRole", 2);
1048
+ (0, import_typeorm2.Column)({ name: "device_info", type: "json", nullable: true })
1049
+ ], RefreshToken.prototype, "deviceInfo", 2);
1069
1050
  __decorateClass([
1070
- (0, import_typeorm9.Column)({ name: "note", type: "varchar", nullable: true })
1071
- ], Job.prototype, "note", 2);
1051
+ (0, import_typeorm2.Column)({ name: "is_revoked", type: "boolean", default: false })
1052
+ ], RefreshToken.prototype, "isRevoked", 2);
1072
1053
  __decorateClass([
1073
- (0, import_typeorm9.Column)({ name: "openings", type: "integer", default: 0 })
1074
- ], Job.prototype, "openings", 2);
1054
+ (0, import_typeorm2.Column)({ name: "expires_at", type: "timestamp with time zone" })
1055
+ ], RefreshToken.prototype, "expiresAt", 2);
1075
1056
  __decorateClass([
1076
- (0, import_typeorm9.Column)({
1077
- name: "location",
1078
- type: "enum",
1079
- enum: JobLocationEnum,
1080
- nullable: true
1081
- })
1082
- ], Job.prototype, "location", 2);
1057
+ (0, import_typeorm2.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
1058
+ ], RefreshToken.prototype, "createdAt", 2);
1083
1059
  __decorateClass([
1084
- (0, import_typeorm9.Column)({
1085
- name: "type_of_employment",
1086
- type: "enum",
1087
- enum: TypeOfEmploymentEnum,
1088
- nullable: true
1089
- })
1090
- ], Job.prototype, "typeOfEmployment", 2);
1091
- __decorateClass([
1092
- (0, import_typeorm9.Column)({ name: "currency", type: "varchar", default: "USD" })
1093
- ], Job.prototype, "currency", 2);
1094
- __decorateClass([
1095
- (0, import_typeorm9.Column)({
1096
- name: "expected_salary_from",
1097
- type: "decimal",
1098
- precision: 10,
1099
- scale: 2,
1100
- default: 0
1101
- })
1102
- ], Job.prototype, "expectedSalaryFrom", 2);
1060
+ (0, import_typeorm2.UpdateDateColumn)({ name: "updated_at", type: "timestamp with time zone" })
1061
+ ], RefreshToken.prototype, "updatedAt", 2);
1103
1062
  __decorateClass([
1104
- (0, import_typeorm9.Column)({
1105
- name: "expected_salary_to",
1106
- type: "decimal",
1107
- precision: 10,
1108
- scale: 2,
1109
- default: 0
1110
- })
1111
- ], Job.prototype, "expectedSalaryTo", 2);
1063
+ (0, import_typeorm2.ManyToOne)(() => User, (user) => user.refreshTokens),
1064
+ (0, import_typeorm2.JoinColumn)({ name: "user_id" })
1065
+ ], RefreshToken.prototype, "user", 2);
1066
+ RefreshToken = __decorateClass([
1067
+ (0, import_typeorm2.Entity)("refresh_tokens")
1068
+ ], RefreshToken);
1069
+
1070
+ // src/entities/senseloaf-log.entity.ts
1071
+ var import_typeorm3 = require("typeorm");
1072
+ var SenseloafLog = class {
1073
+ };
1112
1074
  __decorateClass([
1113
- (0, import_typeorm9.Column)({ name: "tentative_start_date", type: "date", nullable: true })
1114
- ], Job.prototype, "tentativeStartDate", 2);
1075
+ (0, import_typeorm3.PrimaryGeneratedColumn)("increment", { type: "integer" })
1076
+ ], SenseloafLog.prototype, "id", 2);
1115
1077
  __decorateClass([
1116
- (0, import_typeorm9.Column)({ name: "duration", type: "varchar", nullable: true })
1117
- ], Job.prototype, "duration", 2);
1078
+ (0, import_typeorm3.Column)({ name: "user_id", type: "integer", nullable: true })
1079
+ ], SenseloafLog.prototype, "userId", 2);
1118
1080
  __decorateClass([
1119
- (0, import_typeorm9.Column)({
1120
- name: "duration_type",
1121
- type: "enum",
1122
- enum: DurationTypeEnum,
1123
- nullable: true
1124
- })
1125
- ], Job.prototype, "durationType", 2);
1081
+ (0, import_typeorm3.Column)({ name: "type", type: "varchar", nullable: true })
1082
+ ], SenseloafLog.prototype, "type", 2);
1126
1083
  __decorateClass([
1127
- (0, import_typeorm9.Column)({ name: "description", type: "varchar", nullable: true })
1128
- ], Job.prototype, "description", 2);
1084
+ (0, import_typeorm3.Column)({ name: "end_point", type: "varchar" })
1085
+ ], SenseloafLog.prototype, "endpoint", 2);
1129
1086
  __decorateClass([
1130
- (0, import_typeorm9.Column)({ name: "additional_comment", type: "varchar", nullable: true })
1131
- ], Job.prototype, "additionalComment", 2);
1087
+ (0, import_typeorm3.Column)({ name: "success", type: "boolean" })
1088
+ ], SenseloafLog.prototype, "success", 2);
1132
1089
  __decorateClass([
1133
- (0, import_typeorm9.Column)({
1134
- name: "onboarding_tat",
1135
- type: "varchar",
1136
- length: 50,
1137
- nullable: true
1138
- })
1139
- ], Job.prototype, "onboardingTat", 2);
1090
+ (0, import_typeorm3.Column)({ name: "request", type: "jsonb", nullable: true })
1091
+ ], SenseloafLog.prototype, "request", 2);
1140
1092
  __decorateClass([
1141
- (0, import_typeorm9.Column)({
1142
- name: "candidate_communication_skills",
1143
- type: "varchar",
1144
- nullable: true
1145
- })
1146
- ], Job.prototype, "candidateCommunicationSkills", 2);
1093
+ (0, import_typeorm3.Column)({ name: "response", type: "jsonb", nullable: true })
1094
+ ], SenseloafLog.prototype, "response", 2);
1147
1095
  __decorateClass([
1148
- (0, import_typeorm9.Column)({
1149
- name: "step_completed",
1150
- type: "enum",
1151
- enum: Step,
1152
- nullable: true
1153
- })
1154
- ], Job.prototype, "stepCompleted", 2);
1096
+ (0, import_typeorm3.Column)({ name: "error_message", type: "text", nullable: true })
1097
+ ], SenseloafLog.prototype, "errorMessage", 2);
1155
1098
  __decorateClass([
1156
- (0, import_typeorm9.Column)({
1157
- name: "status",
1158
- type: "enum",
1159
- enum: JobStatusEnum,
1160
- default: "DRAFT" /* DRAFT */
1161
- })
1162
- ], Job.prototype, "status", 2);
1099
+ (0, import_typeorm3.Column)({ name: "scope", type: "varchar", nullable: true })
1100
+ ], SenseloafLog.prototype, "scope", 2);
1163
1101
  __decorateClass([
1164
- (0, import_typeorm9.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.job, { cascade: true })
1165
- ], Job.prototype, "jobSkills", 2);
1102
+ (0, import_typeorm3.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
1103
+ ], SenseloafLog.prototype, "createdAt", 2);
1166
1104
  __decorateClass([
1167
- (0, import_typeorm9.OneToMany)(() => JobApplication, (jobApplication) => jobApplication.job, {
1168
- cascade: true
1169
- })
1170
- ], Job.prototype, "jobApplications", 2);
1171
- Job = __decorateClass([
1172
- (0, import_typeorm9.Entity)("jobs")
1173
- ], Job);
1105
+ (0, import_typeorm3.ManyToOne)(() => User, (user) => user.senseloafLogs),
1106
+ (0, import_typeorm3.JoinColumn)({ name: "user_id" })
1107
+ ], SenseloafLog.prototype, "user", 2);
1108
+ SenseloafLog = __decorateClass([
1109
+ (0, import_typeorm3.Entity)("senseloaf_logs")
1110
+ ], SenseloafLog);
1174
1111
 
1175
- // src/entities/bank-details.entity.ts
1176
- var import_typeorm10 = require("typeorm");
1177
- var BankAccountTypeEnum = /* @__PURE__ */ ((BankAccountTypeEnum2) => {
1178
- BankAccountTypeEnum2["PRIMARY"] = "PRIMARY";
1179
- BankAccountTypeEnum2["SECONDARY"] = "SECONDARY";
1180
- return BankAccountTypeEnum2;
1181
- })(BankAccountTypeEnum || {});
1182
- var BankAccountScopeEnum = /* @__PURE__ */ ((BankAccountScopeEnum2) => {
1183
- BankAccountScopeEnum2["DOMESTIC"] = "DOMESTIC";
1184
- BankAccountScopeEnum2["INTERNATIONAL"] = "INTERNATIONAL";
1185
- return BankAccountScopeEnum2;
1186
- })(BankAccountScopeEnum || {});
1187
- var BankDetail = class extends BaseEntity {
1112
+ // src/entities/otp.entity.ts
1113
+ var import_typeorm4 = require("typeorm");
1114
+ var Otp = class {
1188
1115
  };
1189
- // individual index to find bank details by user
1190
1116
  __decorateClass([
1191
- (0, import_typeorm10.Column)({ name: "user_id", type: "integer", nullable: true }),
1192
- (0, import_typeorm10.Index)()
1193
- ], BankDetail.prototype, "userId", 2);
1117
+ (0, import_typeorm4.PrimaryGeneratedColumn)("increment", { type: "integer" })
1118
+ ], Otp.prototype, "id", 2);
1119
+ // individual index to find OTPs by user
1194
1120
  __decorateClass([
1195
- (0, import_typeorm10.ManyToOne)(() => User, (user) => user.bankDetail),
1196
- (0, import_typeorm10.JoinColumn)({ name: "user_id" })
1197
- ], BankDetail.prototype, "user", 2);
1121
+ (0, import_typeorm4.Column)({ name: "user_id", type: "integer", nullable: true }),
1122
+ (0, import_typeorm4.Index)()
1123
+ ], Otp.prototype, "userId", 2);
1198
1124
  __decorateClass([
1199
- (0, import_typeorm10.Column)({ name: "name", type: "varchar", nullable: true })
1200
- ], BankDetail.prototype, "name", 2);
1125
+ (0, import_typeorm4.Column)({ name: "otp", type: "varchar", length: 4 }),
1126
+ (0, import_typeorm4.Index)()
1127
+ ], Otp.prototype, "otp", 2);
1201
1128
  __decorateClass([
1202
- (0, import_typeorm10.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1203
- ], BankDetail.prototype, "mobile", 2);
1129
+ (0, import_typeorm4.Column)({ name: "otp_purpose", type: "varchar", length: 50 })
1130
+ ], Otp.prototype, "otpPurpose", 2);
1204
1131
  __decorateClass([
1205
- (0, import_typeorm10.Column)({ name: "email", type: "varchar", unique: true })
1206
- ], BankDetail.prototype, "email", 2);
1132
+ (0, import_typeorm4.Column)({ name: "target", type: "varchar", nullable: true }),
1133
+ (0, import_typeorm4.Index)()
1134
+ ], Otp.prototype, "target", 2);
1135
+ // support expiration checks
1207
1136
  __decorateClass([
1208
- (0, import_typeorm10.Column)({ name: "address", type: "varchar", nullable: true })
1209
- ], BankDetail.prototype, "address", 2);
1137
+ (0, import_typeorm4.Column)({ name: "expire_at", type: "timestamp" }),
1138
+ (0, import_typeorm4.Index)()
1139
+ ], Otp.prototype, "expiresAt", 2);
1210
1140
  __decorateClass([
1211
- (0, import_typeorm10.Column)({ name: "account_number", type: "varchar", unique: true, nullable: true })
1212
- ], BankDetail.prototype, "accountNumber", 2);
1141
+ (0, import_typeorm4.Column)({ name: "is_used", type: "boolean", default: false }),
1142
+ (0, import_typeorm4.Index)()
1143
+ ], Otp.prototype, "isUsed", 2);
1213
1144
  __decorateClass([
1214
- (0, import_typeorm10.Column)({ name: "bank_name", type: "varchar", nullable: true })
1215
- ], BankDetail.prototype, "bankName", 2);
1145
+ (0, import_typeorm4.Column)({ name: "resend_count", type: "int", default: 0 })
1146
+ ], Otp.prototype, "resendCount", 2);
1216
1147
  __decorateClass([
1217
- (0, import_typeorm10.Column)({ name: "ifsc_code", type: "varchar", nullable: true })
1218
- ], BankDetail.prototype, "ifscCode", 2);
1148
+ (0, import_typeorm4.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
1149
+ ], Otp.prototype, "createdAt", 2);
1219
1150
  __decorateClass([
1220
- (0, import_typeorm10.Column)({ name: "branch_name", type: "varchar", nullable: true })
1221
- ], BankDetail.prototype, "branchName", 2);
1151
+ (0, import_typeorm4.ManyToOne)(() => User, (user) => user.otps),
1152
+ (0, import_typeorm4.JoinColumn)({ name: "user_id" })
1153
+ ], Otp.prototype, "user", 2);
1154
+ Otp = __decorateClass([
1155
+ (0, import_typeorm4.Entity)("otps"),
1156
+ (0, import_typeorm4.Index)(["userId", "otp", "otpPurpose", "isUsed"])
1157
+ ], Otp);
1158
+
1159
+ // src/entities/freelancer-profile.entity.ts
1160
+ var import_typeorm5 = require("typeorm");
1161
+ var NatureOfWork = /* @__PURE__ */ ((NatureOfWork2) => {
1162
+ NatureOfWork2["FULLTIME"] = "FULLTIME";
1163
+ NatureOfWork2["PARTTIME"] = "PARTTIME";
1164
+ NatureOfWork2["BOTH"] = "BOTH";
1165
+ return NatureOfWork2;
1166
+ })(NatureOfWork || {});
1167
+ var ModeOfWork = /* @__PURE__ */ ((ModeOfWork2) => {
1168
+ ModeOfWork2["ONSITE"] = "ONSITE";
1169
+ ModeOfWork2["REMOTE"] = "REMOTE";
1170
+ ModeOfWork2["BOTH"] = "BOTH";
1171
+ return ModeOfWork2;
1172
+ })(ModeOfWork || {});
1173
+ var OnboardingStepEnum = /* @__PURE__ */ ((OnboardingStepEnum2) => {
1174
+ OnboardingStepEnum2["SIGN_UP"] = "SIGN_UP";
1175
+ OnboardingStepEnum2["OTP_VERIFIED"] = "OTP_VERIFIED";
1176
+ OnboardingStepEnum2["UPLOAD_RESUME"] = "UPLOAD_RESUME";
1177
+ OnboardingStepEnum2["AI_VIDEO_ASSESMENT"] = "AI_VIDEO_ASSESMENT";
1178
+ OnboardingStepEnum2["CODING_CHALLENGE"] = "CODING_CHALLENGE";
1179
+ OnboardingStepEnum2["PROFILE_COMPLETION"] = "PROFILE_COMPLETION";
1180
+ return OnboardingStepEnum2;
1181
+ })(OnboardingStepEnum || {});
1182
+ var FreelancerProfile = class extends BaseEntity {
1183
+ };
1184
+ // individual index to find profile by user
1222
1185
  __decorateClass([
1223
- (0, import_typeorm10.Column)({ name: "routing_no", type: "varchar", nullable: true })
1224
- ], BankDetail.prototype, "routingNo", 2);
1186
+ (0, import_typeorm5.Column)({ name: "user_id", type: "integer", nullable: true }),
1187
+ (0, import_typeorm5.Index)()
1188
+ ], FreelancerProfile.prototype, "userId", 2);
1225
1189
  __decorateClass([
1226
- (0, import_typeorm10.Column)({ name: "aba_no", type: "varchar", nullable: true })
1227
- ], BankDetail.prototype, "abaNumber", 2);
1190
+ (0, import_typeorm5.ManyToOne)(() => User, (user) => user.freelancerProfile),
1191
+ (0, import_typeorm5.JoinColumn)({ name: "user_id" })
1192
+ ], FreelancerProfile.prototype, "user", 2);
1228
1193
  __decorateClass([
1229
- (0, import_typeorm10.Column)({ name: "iban", type: "varchar", nullable: true })
1230
- ], BankDetail.prototype, "iban", 2);
1194
+ (0, import_typeorm5.Column)({ name: "resume_url", type: "text", nullable: true })
1195
+ ], FreelancerProfile.prototype, "resumeUrl", 2);
1231
1196
  __decorateClass([
1232
- (0, import_typeorm10.Column)({
1233
- name: "account_type",
1234
- type: "enum",
1235
- enum: BankAccountTypeEnum,
1236
- default: "PRIMARY" /* PRIMARY */
1237
- })
1238
- ], BankDetail.prototype, "accountType", 2);
1197
+ (0, import_typeorm5.Column)({ name: "resume_data", type: "jsonb", nullable: true })
1198
+ ], FreelancerProfile.prototype, "resumeData", 2);
1239
1199
  __decorateClass([
1240
- (0, import_typeorm10.Column)({
1241
- name: "account_scope",
1200
+ (0, import_typeorm5.Column)({ name: "is_developer", type: "boolean", default: false })
1201
+ ], FreelancerProfile.prototype, "isDeveloper", 2);
1202
+ __decorateClass([
1203
+ (0, import_typeorm5.Column)({
1204
+ name: "nature_of_work",
1242
1205
  type: "enum",
1243
- enum: BankAccountScopeEnum,
1244
- default: "DOMESTIC" /* DOMESTIC */
1206
+ enum: NatureOfWork,
1207
+ nullable: true
1245
1208
  })
1246
- ], BankDetail.prototype, "accountScope", 2);
1247
- BankDetail = __decorateClass([
1248
- (0, import_typeorm10.Entity)("bank_details")
1249
- ], BankDetail);
1250
-
1251
- // src/entities/system-preference.entity.ts
1252
- var import_typeorm11 = require("typeorm");
1253
- var SystemPreference = class extends BaseEntity {
1254
- };
1255
- // individual index to find system preference by user
1256
- __decorateClass([
1257
- (0, import_typeorm11.Column)({ name: "user_id", type: "integer", nullable: true }),
1258
- (0, import_typeorm11.Index)()
1259
- ], SystemPreference.prototype, "userId", 2);
1209
+ ], FreelancerProfile.prototype, "natureOfWork", 2);
1260
1210
  __decorateClass([
1261
- (0, import_typeorm11.ManyToOne)(() => User, (user) => user.systemPreference),
1262
- (0, import_typeorm11.JoinColumn)({ name: "user_id" })
1263
- ], SystemPreference.prototype, "user", 2);
1211
+ (0, import_typeorm5.Column)({ name: "currency", type: "varchar", default: "USD" })
1212
+ ], FreelancerProfile.prototype, "currency", 2);
1264
1213
  __decorateClass([
1265
- (0, import_typeorm11.Column)({ name: "key", type: "varchar", unique: true, nullable: false })
1266
- ], SystemPreference.prototype, "key", 2);
1214
+ (0, import_typeorm5.Column)({
1215
+ name: "expected_hourly_compensation",
1216
+ type: "numeric",
1217
+ precision: 10,
1218
+ scale: 2,
1219
+ nullable: true
1220
+ })
1221
+ ], FreelancerProfile.prototype, "expectedHourlyCompensation", 2);
1267
1222
  __decorateClass([
1268
- (0, import_typeorm11.Column)({ name: "value", type: "boolean", default: false })
1269
- ], SystemPreference.prototype, "value", 2);
1270
- SystemPreference = __decorateClass([
1271
- (0, import_typeorm11.Entity)("system_preferences")
1272
- ], SystemPreference);
1273
-
1274
- // src/entities/rating.entity.ts
1275
- var import_typeorm12 = require("typeorm");
1276
- var RatingTypeEnum = /* @__PURE__ */ ((RatingTypeEnum2) => {
1277
- RatingTypeEnum2["FREELANCER_TO_CLIENT"] = "FREELANCER_TO_CLIENT";
1278
- RatingTypeEnum2["CLIENT_TO_FREELANCER"] = "CLIENT_TO_FREELANCER";
1279
- return RatingTypeEnum2;
1280
- })(RatingTypeEnum || {});
1281
- var Rating = class extends BaseEntity {
1282
- };
1283
- __decorateClass([
1284
- (0, import_typeorm12.Column)({ name: "reviewer_id", type: "integer" }),
1285
- (0, import_typeorm12.Index)()
1286
- ], Rating.prototype, "reviewer_id", 2);
1287
- __decorateClass([
1288
- (0, import_typeorm12.ManyToOne)(() => User, { onDelete: "CASCADE" }),
1289
- (0, import_typeorm12.JoinColumn)({ name: "reviewer_id" })
1290
- ], Rating.prototype, "reviewer", 2);
1291
- __decorateClass([
1292
- (0, import_typeorm12.Column)({ name: "reviewee_id", type: "integer" }),
1293
- (0, import_typeorm12.Index)()
1294
- ], Rating.prototype, "reviewee_id", 2);
1295
- __decorateClass([
1296
- (0, import_typeorm12.ManyToOne)(() => User, { onDelete: "CASCADE" }),
1297
- (0, import_typeorm12.JoinColumn)({ name: "reviewee_id" })
1298
- ], Rating.prototype, "reviewee", 2);
1299
- __decorateClass([
1300
- (0, import_typeorm12.Column)({
1223
+ (0, import_typeorm5.Column)({
1224
+ name: "mode_of_work",
1301
1225
  type: "enum",
1302
- enum: RatingTypeEnum,
1226
+ enum: ModeOfWork,
1303
1227
  nullable: true
1304
1228
  })
1305
- ], Rating.prototype, "ratingType", 2);
1306
- __decorateClass([
1307
- (0, import_typeorm12.Column)({ type: "integer", nullable: true })
1308
- ], Rating.prototype, "rating", 2);
1309
- __decorateClass([
1310
- (0, import_typeorm12.Column)({ type: "text", nullable: true })
1311
- ], Rating.prototype, "review", 2);
1312
- Rating = __decorateClass([
1313
- (0, import_typeorm12.Entity)("ratings")
1314
- ], Rating);
1315
-
1316
- // src/entities/company-role.entity.ts
1317
- var import_typeorm13 = require("typeorm");
1318
- var CompanyRole = class extends BaseEntity {
1319
- };
1320
- // individual index to find company roles by user
1321
- __decorateClass([
1322
- (0, import_typeorm13.Column)({ name: "user_id", type: "integer", nullable: true }),
1323
- (0, import_typeorm13.Index)()
1324
- ], CompanyRole.prototype, "userId", 2);
1229
+ ], FreelancerProfile.prototype, "modeOfWork", 2);
1325
1230
  __decorateClass([
1326
- (0, import_typeorm13.ManyToOne)(() => User, (user) => user.companyRole),
1327
- (0, import_typeorm13.JoinColumn)({ name: "user_id" })
1328
- ], CompanyRole.prototype, "user", 2);
1231
+ (0, import_typeorm5.Column)({ name: "availability_to_join", type: "varchar", nullable: true })
1232
+ ], FreelancerProfile.prototype, "availabilityToJoin", 2);
1329
1233
  __decorateClass([
1330
- (0, import_typeorm13.Column)({ name: "name", type: "varchar" })
1331
- ], CompanyRole.prototype, "name", 2);
1234
+ (0, import_typeorm5.Column)({ name: "is_immediate_joiner", type: "boolean", nullable: true })
1235
+ ], FreelancerProfile.prototype, "isImmediateJoiner", 2);
1332
1236
  __decorateClass([
1333
- (0, import_typeorm13.Column)({ name: "slug", type: "varchar", nullable: true, unique: true }),
1334
- (0, import_typeorm13.Index)()
1335
- ], CompanyRole.prototype, "slug", 2);
1237
+ (0, import_typeorm5.Column)({ name: "linkedin_profile_link", type: "varchar", nullable: true })
1238
+ ], FreelancerProfile.prototype, "linkedinProfileLink", 2);
1336
1239
  __decorateClass([
1337
- (0, import_typeorm13.Column)({ name: "description", type: "text", nullable: true })
1338
- ], CompanyRole.prototype, "description", 2);
1240
+ (0, import_typeorm5.Column)({ name: "kaggle_profile_link", type: "varchar", nullable: true })
1241
+ ], FreelancerProfile.prototype, "kaggleProfileLink", 2);
1339
1242
  __decorateClass([
1340
- (0, import_typeorm13.Column)({ name: "is_active", type: "boolean", default: true })
1341
- ], CompanyRole.prototype, "isActive", 2);
1342
- CompanyRole = __decorateClass([
1343
- (0, import_typeorm13.Entity)("company_roles")
1344
- ], CompanyRole);
1345
-
1346
- // src/entities/freelancer-experience.entity.ts
1347
- var import_typeorm14 = require("typeorm");
1348
- var FreelancerExperience = class extends BaseEntity {
1349
- };
1350
- // individual index to find experence by user
1243
+ (0, import_typeorm5.Column)({ name: "github_profile_link", type: "varchar", nullable: true })
1244
+ ], FreelancerProfile.prototype, "githubProfileLink", 2);
1351
1245
  __decorateClass([
1352
- (0, import_typeorm14.Column)({ name: "user_id", type: "integer", nullable: true }),
1353
- (0, import_typeorm14.Index)()
1354
- ], FreelancerExperience.prototype, "userId", 2);
1246
+ (0, import_typeorm5.Column)({
1247
+ name: "stack_overflow_profile_link",
1248
+ type: "varchar",
1249
+ nullable: true
1250
+ })
1251
+ ], FreelancerProfile.prototype, "stackOverflowProfileLink", 2);
1355
1252
  __decorateClass([
1356
- (0, import_typeorm14.ManyToOne)(() => User, (user) => user.freelancerExperience),
1357
- (0, import_typeorm14.JoinColumn)({ name: "user_id" })
1358
- ], FreelancerExperience.prototype, "user", 2);
1253
+ (0, import_typeorm5.Column)({ name: "portfolio_link", type: "varchar", nullable: true })
1254
+ ], FreelancerProfile.prototype, "portfolioLink", 2);
1359
1255
  __decorateClass([
1360
- (0, import_typeorm14.Column)({ name: "company_name", type: "varchar", nullable: true })
1361
- ], FreelancerExperience.prototype, "companyName", 2);
1256
+ (0, import_typeorm5.Column)({
1257
+ name: "onboarding_step_completed",
1258
+ type: "enum",
1259
+ enum: OnboardingStepEnum,
1260
+ nullable: true
1261
+ })
1262
+ ], FreelancerProfile.prototype, "onboardingStepCompleted", 2);
1362
1263
  __decorateClass([
1363
- (0, import_typeorm14.Column)({ name: "designation", type: "varchar", nullable: true })
1364
- ], FreelancerExperience.prototype, "designation", 2);
1264
+ (0, import_typeorm5.Column)({ name: "country_id", type: "integer", nullable: true })
1265
+ ], FreelancerProfile.prototype, "countryId", 2);
1365
1266
  __decorateClass([
1366
- (0, import_typeorm14.Column)({ name: "job_duration", type: "varchar", nullable: true })
1367
- ], FreelancerExperience.prototype, "jobDuration", 2);
1267
+ (0, import_typeorm5.Column)({ name: "address", type: "varchar", nullable: true })
1268
+ ], FreelancerProfile.prototype, "address", 2);
1368
1269
  __decorateClass([
1369
- (0, import_typeorm14.Column)({ name: "description", type: "varchar", nullable: true })
1370
- ], FreelancerExperience.prototype, "description", 2);
1371
- FreelancerExperience = __decorateClass([
1372
- (0, import_typeorm14.Entity)("freelancer_experiences")
1373
- ], FreelancerExperience);
1270
+ (0, import_typeorm5.Column)({ name: "about", type: "varchar", nullable: true })
1271
+ ], FreelancerProfile.prototype, "about", 2);
1272
+ FreelancerProfile = __decorateClass([
1273
+ (0, import_typeorm5.Entity)("freelancer_profiles")
1274
+ ], FreelancerProfile);
1374
1275
 
1375
- // src/entities/user.entity.ts
1376
- var AccountType = /* @__PURE__ */ ((AccountType2) => {
1377
- AccountType2["ADMIN"] = "ADMIN";
1378
- AccountType2["SUB_ADMIN"] = "SUB_ADMIN";
1379
- AccountType2["CLIENT"] = "CLIENT";
1380
- AccountType2["FREELANCER"] = "FREELANCER";
1381
- return AccountType2;
1382
- })(AccountType || {});
1383
- var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
1384
- AccountStatus2["INACTIVE"] = "INACTIVE";
1385
- AccountStatus2["ACTIVE"] = "ACTIVE";
1386
- AccountStatus2["SUSPENDED"] = "SUSPENDED";
1387
- AccountStatus2["BLOCKED"] = "BLOCKED";
1388
- return AccountStatus2;
1389
- })(AccountStatus || {});
1390
- var Provider = /* @__PURE__ */ ((Provider2) => {
1391
- Provider2["LINKEDIN"] = "LINKEDIN";
1392
- Provider2["GOOGLE"] = "GOOGLE";
1393
- Provider2["GITLABS"] = "GITLABS";
1394
- return Provider2;
1395
- })(Provider || {});
1396
- var User = class extends BaseEntity {
1276
+ // src/entities/company-profile.entity.ts
1277
+ var import_typeorm6 = require("typeorm");
1278
+ var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
1279
+ KindOfHire2["FULLTIME"] = "FULLTIME";
1280
+ KindOfHire2["SHORTTIME"] = "SHORTTIME";
1281
+ KindOfHire2["BOTH"] = "BOTH";
1282
+ return KindOfHire2;
1283
+ })(KindOfHire || {});
1284
+ var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
1285
+ ModeOfHire2["ONSITE"] = "ONSITE";
1286
+ ModeOfHire2["REMOTE"] = "REMOTE";
1287
+ ModeOfHire2["BOTH"] = "BOTH";
1288
+ return ModeOfHire2;
1289
+ })(ModeOfHire || {});
1290
+ var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
1291
+ FromUsOn2["LINKEDIN"] = "LINKEDIN";
1292
+ FromUsOn2["GOOGLE"] = "GOOGLE";
1293
+ FromUsOn2["REFERRAL"] = "REFERRAL";
1294
+ FromUsOn2["OTHER"] = "OTHER";
1295
+ return FromUsOn2;
1296
+ })(FromUsOn || {});
1297
+ var CompanyProfile = class extends BaseEntity {
1397
1298
  };
1299
+ // individual index to find company profile by user
1398
1300
  __decorateClass([
1399
- (0, import_typeorm15.Column)({ name: "unique_id", type: "varchar", unique: true })
1400
- ], User.prototype, "uniqueId", 2);
1401
- __decorateClass([
1402
- (0, import_typeorm15.Column)({ name: "parent_id", type: "integer", nullable: true }),
1403
- (0, import_typeorm15.Index)()
1404
- ], User.prototype, "parentId", 2);
1405
- __decorateClass([
1406
- (0, import_typeorm15.ManyToOne)(() => User, (user) => user.children, { nullable: true }),
1407
- (0, import_typeorm15.JoinColumn)({ name: "parent_id" })
1408
- ], User.prototype, "parent", 2);
1409
- __decorateClass([
1410
- (0, import_typeorm15.OneToMany)(() => User, (user) => user.parent)
1411
- ], User.prototype, "children", 2);
1301
+ (0, import_typeorm6.Column)({ name: "user_id", type: "integer", nullable: true }),
1302
+ (0, import_typeorm6.Index)()
1303
+ ], CompanyProfile.prototype, "userId", 2);
1412
1304
  __decorateClass([
1413
- (0, import_typeorm15.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
1414
- ], User.prototype, "username", 2);
1305
+ (0, import_typeorm6.ManyToOne)(() => User, (user) => user.otps),
1306
+ (0, import_typeorm6.JoinColumn)({ name: "user_id" })
1307
+ ], CompanyProfile.prototype, "user", 2);
1415
1308
  __decorateClass([
1416
- (0, import_typeorm15.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
1417
- ], User.prototype, "firstName", 2);
1309
+ (0, import_typeorm6.Column)({ name: "company_name", type: "varchar", nullable: true })
1310
+ ], CompanyProfile.prototype, "companyName", 2);
1418
1311
  __decorateClass([
1419
- (0, import_typeorm15.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
1420
- ], User.prototype, "lastName", 2);
1312
+ (0, import_typeorm6.Column)({ name: "bio", type: "varchar", nullable: true })
1313
+ ], CompanyProfile.prototype, "bio", 2);
1421
1314
  __decorateClass([
1422
- (0, import_typeorm15.Column)({ name: "date_of_birth", type: "date", nullable: true })
1423
- ], User.prototype, "dateOfBirth", 2);
1315
+ (0, import_typeorm6.Column)({ name: "website", type: "varchar", nullable: true })
1316
+ ], CompanyProfile.prototype, "webSite", 2);
1424
1317
  __decorateClass([
1425
- (0, import_typeorm15.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
1426
- ], User.prototype, "gender", 2);
1318
+ (0, import_typeorm6.Column)({ name: "about_company", type: "varchar", nullable: true })
1319
+ ], CompanyProfile.prototype, "aboutCompany", 2);
1427
1320
  __decorateClass([
1428
- (0, import_typeorm15.Column)({ name: "profile_picture_url", type: "text", nullable: true })
1429
- ], User.prototype, "profilePictureUrl", 2);
1321
+ (0, import_typeorm6.Column)({ name: "is_service_aggrement_signed", type: "boolean", default: false })
1322
+ ], CompanyProfile.prototype, "isServiceAgreementSigned", 2);
1430
1323
  __decorateClass([
1431
- (0, import_typeorm15.Column)({ name: "email", type: "varchar", unique: true })
1432
- ], User.prototype, "email", 2);
1324
+ (0, import_typeorm6.Column)({ name: "company_address", type: "varchar", nullable: true })
1325
+ ], CompanyProfile.prototype, "companyAddress", 2);
1433
1326
  __decorateClass([
1434
- (0, import_typeorm15.Column)({ name: "mobile_code", type: "varchar", nullable: true })
1435
- ], User.prototype, "mobileCode", 2);
1327
+ (0, import_typeorm6.Column)({ name: "phone_number", type: "varchar", nullable: true })
1328
+ ], CompanyProfile.prototype, "phoneNumber", 2);
1436
1329
  __decorateClass([
1437
- (0, import_typeorm15.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1438
- ], User.prototype, "mobile", 2);
1330
+ (0, import_typeorm6.Column)({ name: "skills", type: "text", nullable: true })
1331
+ ], CompanyProfile.prototype, "skills", 2);
1439
1332
  __decorateClass([
1440
- (0, import_typeorm15.Column)({ name: "password", type: "varchar" })
1441
- ], User.prototype, "password", 2);
1333
+ (0, import_typeorm6.Column)({ name: "required_freelancer", type: "varchar", nullable: true })
1334
+ ], CompanyProfile.prototype, "requiredFreelancer", 2);
1442
1335
  __decorateClass([
1443
- (0, import_typeorm15.Column)({
1444
- name: "account_type",
1336
+ (0, import_typeorm6.Column)({
1337
+ name: "kind_of_hiring",
1445
1338
  type: "enum",
1446
- enum: AccountType,
1447
- default: "FREELANCER" /* FREELANCER */
1339
+ enum: KindOfHire,
1340
+ nullable: true
1448
1341
  })
1449
- ], User.prototype, "accountType", 2);
1342
+ ], CompanyProfile.prototype, "kindOfHiring", 2);
1450
1343
  __decorateClass([
1451
- (0, import_typeorm15.Column)({
1452
- name: "account_status",
1344
+ (0, import_typeorm6.Column)({
1345
+ name: "mode_of_hire",
1453
1346
  type: "enum",
1454
- enum: AccountStatus,
1455
- default: "INACTIVE" /* INACTIVE */
1347
+ enum: ModeOfHire,
1348
+ nullable: true
1456
1349
  })
1457
- ], User.prototype, "accountStatus", 2);
1458
- __decorateClass([
1459
- (0, import_typeorm15.Column)({ name: "is_email_verified", type: "boolean", default: false })
1460
- ], User.prototype, "isEmailVerified", 2);
1461
- __decorateClass([
1462
- (0, import_typeorm15.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
1463
- ], User.prototype, "isMobileVerified", 2);
1350
+ ], CompanyProfile.prototype, "modeOfHire", 2);
1464
1351
  __decorateClass([
1465
- (0, import_typeorm15.Column)({
1466
- name: "last_login_at",
1467
- type: "timestamp with time zone",
1352
+ (0, import_typeorm6.Column)({
1353
+ name: "found_us_on",
1354
+ type: "enum",
1355
+ enum: FromUsOn,
1468
1356
  nullable: true
1469
1357
  })
1470
- ], User.prototype, "lastLoginAt", 2);
1358
+ ], CompanyProfile.prototype, "foundUsOn", 2);
1359
+ CompanyProfile = __decorateClass([
1360
+ (0, import_typeorm6.Entity)("company_profiles")
1361
+ ], CompanyProfile);
1362
+
1363
+ // src/entities/job.entity.ts
1364
+ var import_typeorm10 = require("typeorm");
1365
+
1366
+ // src/entities/job-skill.entity.ts
1367
+ var import_typeorm8 = require("typeorm");
1368
+
1369
+ // src/entities/skill.entity.ts
1370
+ var import_typeorm7 = require("typeorm");
1371
+ var Skill = class extends BaseEntity {
1372
+ };
1471
1373
  __decorateClass([
1472
- (0, import_typeorm15.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
1473
- ], User.prototype, "lastLoginIp", 2);
1374
+ (0, import_typeorm7.Column)({ name: "name", type: "varchar", nullable: true })
1375
+ ], Skill.prototype, "name", 2);
1474
1376
  __decorateClass([
1475
- (0, import_typeorm15.Column)({ name: "reset_token", type: "varchar", nullable: true })
1476
- ], User.prototype, "resetToken", 2);
1477
- __decorateClass([
1478
- (0, import_typeorm15.Column)({
1479
- name: "reset_token_expire_at",
1480
- type: "timestamp with time zone",
1481
- nullable: true
1482
- })
1483
- ], User.prototype, "resetTokenExpireAt", 2);
1484
- __decorateClass([
1485
- (0, import_typeorm15.OneToMany)(() => RefreshToken, (token) => token.user)
1486
- ], User.prototype, "refreshTokens", 2);
1487
- __decorateClass([
1488
- (0, import_typeorm15.Column)({
1489
- name: "provider",
1490
- type: "enum",
1491
- enum: Provider,
1492
- default: null,
1493
- nullable: true
1494
- })
1495
- ], User.prototype, "provider", 2);
1496
- __decorateClass([
1497
- (0, import_typeorm15.Column)({ name: "provider_token", type: "varchar", nullable: true })
1498
- ], User.prototype, "providerToken", 2);
1499
- __decorateClass([
1500
- (0, import_typeorm15.Column)({ name: "linkedin_id", type: "varchar", nullable: true })
1501
- ], User.prototype, "linkedInId", 2);
1502
- __decorateClass([
1503
- (0, import_typeorm15.Column)({ name: "google_id", type: "varchar", nullable: true })
1504
- ], User.prototype, "googleId", 2);
1505
- __decorateClass([
1506
- (0, import_typeorm15.Column)({ name: "gitlabs_id", type: "varchar", nullable: true })
1507
- ], User.prototype, "gitLabsId", 2);
1508
- __decorateClass([
1509
- (0, import_typeorm15.OneToMany)(() => Otp, (otp) => otp.user)
1510
- ], User.prototype, "otps", 2);
1511
- __decorateClass([
1512
- (0, import_typeorm15.OneToMany)(() => SenseloafLog, (senseloafLog) => senseloafLog.user)
1513
- ], User.prototype, "senseloafLogs", 2);
1514
- __decorateClass([
1515
- (0, import_typeorm15.OneToOne)(
1516
- () => FreelancerProfile,
1517
- (freelancerProfile) => freelancerProfile.user
1518
- )
1519
- ], User.prototype, "freelancerProfile", 2);
1520
- __decorateClass([
1521
- (0, import_typeorm15.OneToOne)(() => CompanyProfile, (companyProfile) => companyProfile.user)
1522
- ], User.prototype, "companyProfile", 2);
1523
- __decorateClass([
1524
- (0, import_typeorm15.OneToMany)(() => Job, (job) => job.user)
1525
- ], User.prototype, "jobs", 2);
1526
- __decorateClass([
1527
- (0, import_typeorm15.OneToMany)(() => BankDetail, (bankDetail) => bankDetail.user)
1528
- ], User.prototype, "bankDetail", 2);
1529
- __decorateClass([
1530
- (0, import_typeorm15.OneToMany)(
1531
- () => SystemPreference,
1532
- (systemPreference) => systemPreference.user
1533
- )
1534
- ], User.prototype, "systemPreference", 2);
1535
- __decorateClass([
1536
- (0, import_typeorm15.OneToMany)(() => Rating, (rating) => rating.reviewer)
1537
- ], User.prototype, "givenRatings", 2);
1538
- __decorateClass([
1539
- (0, import_typeorm15.OneToMany)(() => Rating, (rating) => rating.reviewee)
1540
- ], User.prototype, "receivedRatings", 2);
1541
- __decorateClass([
1542
- (0, import_typeorm15.OneToMany)(() => JobApplication, (jobApplication) => jobApplication.user)
1543
- ], User.prototype, "jobApplications", 2);
1377
+ (0, import_typeorm7.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1378
+ ], Skill.prototype, "slug", 2);
1544
1379
  __decorateClass([
1545
- (0, import_typeorm15.OneToMany)(() => CompanyRole, (companyRole) => companyRole.user)
1546
- ], User.prototype, "companyRole", 2);
1380
+ (0, import_typeorm7.Column)({ name: "is_active", type: "boolean", default: false })
1381
+ ], Skill.prototype, "isActive", 2);
1547
1382
  __decorateClass([
1548
- (0, import_typeorm15.OneToOne)(() => FreelancerExperience, (freelancerExperience) => freelancerExperience.user)
1549
- ], User.prototype, "freelancerExperience", 2);
1550
- User = __decorateClass([
1551
- (0, import_typeorm15.Entity)("users")
1552
- ], User);
1383
+ (0, import_typeorm7.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.skill)
1384
+ ], Skill.prototype, "jobSkills", 2);
1385
+ Skill = __decorateClass([
1386
+ (0, import_typeorm7.Entity)("skills")
1387
+ ], Skill);
1553
1388
 
1554
- // src/entities/company-profile.entity.ts
1555
- var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
1556
- KindOfHire2["FULLTIME"] = "FULLTIME";
1557
- KindOfHire2["SHORTTIME"] = "SHORTTIME";
1558
- KindOfHire2["BOTH"] = "BOTH";
1559
- return KindOfHire2;
1560
- })(KindOfHire || {});
1561
- var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
1562
- ModeOfHire2["ONSITE"] = "ONSITE";
1563
- ModeOfHire2["REMOTE"] = "REMOTE";
1564
- ModeOfHire2["BOTH"] = "BOTH";
1565
- return ModeOfHire2;
1566
- })(ModeOfHire || {});
1567
- var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
1568
- FromUsOn2["LINKEDIN"] = "LINKEDIN";
1569
- FromUsOn2["GOOGLE"] = "GOOGLE";
1570
- FromUsOn2["REFERRAL"] = "REFERRAL";
1571
- FromUsOn2["OTHER"] = "OTHER";
1572
- return FromUsOn2;
1573
- })(FromUsOn || {});
1574
- var CompanyProfile = class extends BaseEntity {
1389
+ // src/entities/job-skill.entity.ts
1390
+ var JobSkill = class extends BaseEntity {
1575
1391
  };
1576
- // individual index to find company profile by user
1577
1392
  __decorateClass([
1578
- (0, import_typeorm16.Column)({ name: "user_id", type: "integer", nullable: true }),
1579
- (0, import_typeorm16.Index)()
1580
- ], CompanyProfile.prototype, "userId", 2);
1393
+ (0, import_typeorm8.Column)({ name: "job_id", type: "integer" }),
1394
+ (0, import_typeorm8.Index)()
1395
+ ], JobSkill.prototype, "jobId", 2);
1581
1396
  __decorateClass([
1582
- (0, import_typeorm16.ManyToOne)(() => User, (user) => user.otps),
1583
- (0, import_typeorm16.JoinColumn)({ name: "user_id" })
1584
- ], CompanyProfile.prototype, "user", 2);
1397
+ (0, import_typeorm8.ManyToOne)(() => Job, (job) => job.jobSkills, { onDelete: "CASCADE" }),
1398
+ (0, import_typeorm8.JoinColumn)({ name: "job_id" })
1399
+ ], JobSkill.prototype, "job", 2);
1585
1400
  __decorateClass([
1586
- (0, import_typeorm16.Column)({ name: "company_name", type: "varchar", nullable: true })
1587
- ], CompanyProfile.prototype, "companyName", 2);
1401
+ (0, import_typeorm8.Column)({ name: "skill_id", type: "integer" }),
1402
+ (0, import_typeorm8.Index)()
1403
+ ], JobSkill.prototype, "skillId", 2);
1588
1404
  __decorateClass([
1589
- (0, import_typeorm16.Column)({ name: "bio", type: "varchar", nullable: true })
1590
- ], CompanyProfile.prototype, "bio", 2);
1405
+ (0, import_typeorm8.ManyToOne)(() => Skill, (skill) => skill.jobSkills, { onDelete: "CASCADE" }),
1406
+ (0, import_typeorm8.JoinColumn)({ name: "skill_id" })
1407
+ ], JobSkill.prototype, "skill", 2);
1408
+ JobSkill = __decorateClass([
1409
+ (0, import_typeorm8.Entity)("job_skills")
1410
+ ], JobSkill);
1411
+
1412
+ // src/entities/job-application.entity.ts
1413
+ var import_typeorm9 = require("typeorm");
1414
+ var ApplicationStatusEnum = /* @__PURE__ */ ((ApplicationStatusEnum2) => {
1415
+ ApplicationStatusEnum2["PENDING"] = "PENDING";
1416
+ ApplicationStatusEnum2["SHORTLISTED"] = "SHORTLISTED";
1417
+ ApplicationStatusEnum2["INTERVIEW_IN_PROGRESS"] = "INTERVIEW_IN_PROGRESS";
1418
+ ApplicationStatusEnum2["INTERVIEWED"] = "INTERVIEWED";
1419
+ ApplicationStatusEnum2["OFFERED"] = "OFFERED";
1420
+ ApplicationStatusEnum2["HIRED"] = "HIRED";
1421
+ ApplicationStatusEnum2["REJECTED_BEFORE_INTERVIEW"] = "REJECTED_BEFORE_INTERVIEW";
1422
+ ApplicationStatusEnum2["REJECTED_IN_INTERVIEW"] = "REJECTED_IN_INTERVIEW";
1423
+ ApplicationStatusEnum2["REJECTED_AFTER_INTERVIEW"] = "REJECTED_AFTER_INTERVIEW";
1424
+ ApplicationStatusEnum2["NOT_SUITABLE"] = "NOT_SUITABLE";
1425
+ ApplicationStatusEnum2["WITHDRAWN"] = "WITHDRAWN";
1426
+ return ApplicationStatusEnum2;
1427
+ })(ApplicationStatusEnum || {});
1428
+ var JobApplication = class extends BaseEntity {
1429
+ };
1591
1430
  __decorateClass([
1592
- (0, import_typeorm16.Column)({ name: "website", type: "varchar", nullable: true })
1593
- ], CompanyProfile.prototype, "webSite", 2);
1431
+ (0, import_typeorm9.Column)({
1432
+ name: "job_application_id",
1433
+ type: "varchar",
1434
+ unique: true,
1435
+ nullable: true
1436
+ })
1437
+ ], JobApplication.prototype, "jobApplicationId", 2);
1594
1438
  __decorateClass([
1595
- (0, import_typeorm16.Column)({ name: "about_company", type: "varchar", nullable: true })
1596
- ], CompanyProfile.prototype, "aboutCompany", 2);
1439
+ (0, import_typeorm9.Column)({ name: "job_id", type: "integer" }),
1440
+ (0, import_typeorm9.Index)()
1441
+ ], JobApplication.prototype, "jobId", 2);
1597
1442
  __decorateClass([
1598
- (0, import_typeorm16.Column)({ name: "is_service_aggrement_signed", type: "boolean", default: false })
1599
- ], CompanyProfile.prototype, "isServiceAgreementSigned", 2);
1443
+ (0, import_typeorm9.ManyToOne)(() => Job, (job) => job.jobApplications, { onDelete: "CASCADE" }),
1444
+ (0, import_typeorm9.JoinColumn)({ name: "job_id" })
1445
+ ], JobApplication.prototype, "job", 2);
1600
1446
  __decorateClass([
1601
- (0, import_typeorm16.Column)({ name: "company_address", type: "varchar", nullable: true })
1602
- ], CompanyProfile.prototype, "companyAddress", 2);
1447
+ (0, import_typeorm9.Column)({ name: "user_id", type: "integer" }),
1448
+ (0, import_typeorm9.Index)()
1449
+ ], JobApplication.prototype, "userId", 2);
1603
1450
  __decorateClass([
1604
- (0, import_typeorm16.Column)({ name: "phone_number", type: "varchar", nullable: true })
1605
- ], CompanyProfile.prototype, "phoneNumber", 2);
1451
+ (0, import_typeorm9.ManyToOne)(() => User, (user) => user.jobApplications),
1452
+ (0, import_typeorm9.JoinColumn)({ name: "user_id" })
1453
+ ], JobApplication.prototype, "user", 2);
1606
1454
  __decorateClass([
1607
- (0, import_typeorm16.Column)({ name: "skills", type: "text", nullable: true })
1608
- ], CompanyProfile.prototype, "skills", 2);
1455
+ (0, import_typeorm9.Column)({
1456
+ name: "status",
1457
+ type: "enum",
1458
+ enum: ApplicationStatusEnum,
1459
+ default: "PENDING" /* PENDING */
1460
+ })
1461
+ ], JobApplication.prototype, "status", 2);
1609
1462
  __decorateClass([
1610
- (0, import_typeorm16.Column)({ name: "required_freelancer", type: "varchar", nullable: true })
1611
- ], CompanyProfile.prototype, "requiredFreelancer", 2);
1463
+ (0, import_typeorm9.Column)({
1464
+ name: "applied_at",
1465
+ type: "timestamp with time zone",
1466
+ default: () => "CURRENT_TIMESTAMP"
1467
+ })
1468
+ ], JobApplication.prototype, "appliedAt", 2);
1612
1469
  __decorateClass([
1613
- (0, import_typeorm16.Column)({
1614
- name: "kind_of_hiring",
1615
- type: "enum",
1616
- enum: KindOfHire,
1470
+ (0, import_typeorm9.Column)({
1471
+ name: "shortlisted_at",
1472
+ type: "timestamp with time zone",
1617
1473
  nullable: true
1618
1474
  })
1619
- ], CompanyProfile.prototype, "kindOfHiring", 2);
1475
+ ], JobApplication.prototype, "shortlistedAt", 2);
1620
1476
  __decorateClass([
1621
- (0, import_typeorm16.Column)({
1622
- name: "mode_of_hire",
1623
- type: "enum",
1624
- enum: ModeOfHire,
1477
+ (0, import_typeorm9.Column)({
1478
+ name: "interview_started_at",
1479
+ type: "timestamp with time zone",
1625
1480
  nullable: true
1626
1481
  })
1627
- ], CompanyProfile.prototype, "modeOfHire", 2);
1482
+ ], JobApplication.prototype, "interviewStartedAt", 2);
1628
1483
  __decorateClass([
1629
- (0, import_typeorm16.Column)({
1630
- name: "found_us_on",
1631
- type: "enum",
1632
- enum: FromUsOn,
1484
+ (0, import_typeorm9.Column)({
1485
+ name: "interview_completed_at",
1486
+ type: "timestamp with time zone",
1633
1487
  nullable: true
1634
1488
  })
1635
- ], CompanyProfile.prototype, "foundUsOn", 2);
1636
- CompanyProfile = __decorateClass([
1637
- (0, import_typeorm16.Entity)("company_profiles")
1638
- ], CompanyProfile);
1639
-
1640
- // src/modules/user/client-profile/dto/update-client-profile.dto.ts
1641
- var UpdateCompanyProfileDto = class {
1642
- };
1643
- __decorateClass([
1644
- (0, import_class_validator17.IsString)({ message: "Company name must be a string." })
1645
- ], UpdateCompanyProfileDto.prototype, "companyName", 2);
1646
- __decorateClass([
1647
- (0, import_class_validator17.IsOptional)(),
1648
- (0, import_class_validator17.IsString)({ message: "Company bio must be a string." })
1649
- ], UpdateCompanyProfileDto.prototype, "bio", 2);
1650
- __decorateClass([
1651
- (0, import_class_validator17.IsOptional)(),
1652
- (0, import_class_validator17.IsString)({ message: "Company website url must be a string." })
1653
- ], UpdateCompanyProfileDto.prototype, "webSite", 2);
1654
- __decorateClass([
1655
- (0, import_class_validator17.IsOptional)(),
1656
- (0, import_class_validator17.IsString)({ message: "About company must be a string." })
1657
- ], UpdateCompanyProfileDto.prototype, "aboutCompany", 2);
1658
- __decorateClass([
1659
- (0, import_class_validator17.IsBoolean)({ message: "Service agreement must be boolean" })
1660
- ], UpdateCompanyProfileDto.prototype, "isServiceAgreementSigned", 2);
1661
- __decorateClass([
1662
- (0, import_class_validator17.IsOptional)(),
1663
- (0, import_class_validator17.IsString)({ message: "Company address must be a string." })
1664
- ], UpdateCompanyProfileDto.prototype, "companyAddress", 2);
1665
- __decorateClass([
1666
- (0, import_class_validator17.IsOptional)(),
1667
- (0, import_class_validator17.IsString)({ message: "Phone number must be a string." })
1668
- ], UpdateCompanyProfileDto.prototype, "phoneNumber", 2);
1669
- __decorateClass([
1670
- (0, import_class_validator17.IsOptional)(),
1671
- (0, import_class_validator17.IsArray)({ message: "Skills must be an array of strings." }),
1672
- (0, import_class_validator17.IsString)({ each: true, message: "Each skill must be a string." })
1673
- ], UpdateCompanyProfileDto.prototype, "skills", 2);
1674
- __decorateClass([
1675
- (0, import_class_validator17.IsOptional)(),
1676
- (0, import_class_validator17.IsString)({ message: "Required freelancer must be a string." })
1677
- ], UpdateCompanyProfileDto.prototype, "requiredFreelancer", 2);
1489
+ ], JobApplication.prototype, "interviewCompletedAt", 2);
1678
1490
  __decorateClass([
1679
- (0, import_class_validator17.IsOptional)(),
1680
- (0, import_class_validator17.IsEnum)(KindOfHire, {
1681
- message: `Kind of hiring must be one of: ${Object.values(KindOfHire).join(", ")}`
1491
+ (0, import_typeorm9.Column)({
1492
+ name: "offered_at",
1493
+ type: "timestamp with time zone",
1494
+ nullable: true
1682
1495
  })
1683
- ], UpdateCompanyProfileDto.prototype, "kindOfHiring", 2);
1496
+ ], JobApplication.prototype, "offeredAt", 2);
1684
1497
  __decorateClass([
1685
- (0, import_class_validator17.IsOptional)(),
1686
- (0, import_class_validator17.IsEnum)(ModeOfHire, {
1687
- message: `Mode of hire must be one of: ${Object.values(ModeOfHire).join(", ")}`
1498
+ (0, import_typeorm9.Column)({
1499
+ name: "hired_at",
1500
+ type: "timestamp with time zone",
1501
+ nullable: true
1688
1502
  })
1689
- ], UpdateCompanyProfileDto.prototype, "modeOfHire", 2);
1503
+ ], JobApplication.prototype, "hiredAt", 2);
1690
1504
  __decorateClass([
1691
- (0, import_class_validator17.IsOptional)(),
1692
- (0, import_class_validator17.IsEnum)(FromUsOn, {
1693
- message: `Found us on must be one of: ${Object.values(FromUsOn).join(", ")}`
1505
+ (0, import_typeorm9.Column)({
1506
+ name: "rejected_at",
1507
+ type: "timestamp with time zone",
1508
+ nullable: true
1694
1509
  })
1695
- ], UpdateCompanyProfileDto.prototype, "foundUsOn", 2);
1696
-
1697
- // src/modules/user/client-profile/dto/client-change-password.dto.ts
1698
- var import_class_validator18 = require("class-validator");
1699
- var ClientChangePasswordDto = class {
1700
- };
1510
+ ], JobApplication.prototype, "rejectedAt", 2);
1701
1511
  __decorateClass([
1702
- (0, import_class_validator18.IsNotEmpty)({ message: "Please enter Old Password." }),
1703
- (0, import_class_validator18.IsString)()
1704
- ], ClientChangePasswordDto.prototype, "oldPassword", 2);
1512
+ (0, import_typeorm9.Column)({ name: "rejection_reason", type: "varchar", nullable: true })
1513
+ ], JobApplication.prototype, "rejectionReason", 2);
1705
1514
  __decorateClass([
1706
- (0, import_class_validator18.IsNotEmpty)({ message: "Please enter New Password." }),
1707
- (0, import_class_validator18.IsString)(),
1708
- (0, import_class_validator18.MinLength)(6),
1709
- (0, import_class_validator18.MaxLength)(32),
1710
- (0, import_class_validator18.Matches)(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
1711
- message: "New Password must include letters, numbers and symbols."
1515
+ (0, import_typeorm9.Column)({
1516
+ name: "withdrawn_at",
1517
+ type: "timestamp with time zone",
1518
+ nullable: true
1712
1519
  })
1713
- ], ClientChangePasswordDto.prototype, "newPassword", 2);
1714
-
1715
- // src/modules/question/pattern/pattern.ts
1716
- var QUESTION_PATTERN = {
1717
- fetchQuestions: "fetch.questions"
1718
- };
1520
+ ], JobApplication.prototype, "withdrawnAt", 2);
1521
+ __decorateClass([
1522
+ (0, import_typeorm9.Column)({ name: "withdrawn_reason", type: "varchar", nullable: true })
1523
+ ], JobApplication.prototype, "withdrawnReason", 2);
1524
+ JobApplication = __decorateClass([
1525
+ (0, import_typeorm9.Entity)("job_applications")
1526
+ ], JobApplication);
1719
1527
 
1720
- // src/modules/question/dto/create-question.dto.ts
1721
- var import_class_validator19 = require("class-validator");
1722
- var CreateQuestionDto = class {
1528
+ // src/entities/job.entity.ts
1529
+ var JobLocationEnum = /* @__PURE__ */ ((JobLocationEnum2) => {
1530
+ JobLocationEnum2["ONSITE"] = "ONSITE";
1531
+ JobLocationEnum2["REMOTE"] = "REMOTE";
1532
+ JobLocationEnum2["BOTH"] = "BOTH";
1533
+ return JobLocationEnum2;
1534
+ })(JobLocationEnum || {});
1535
+ var TypeOfEmploymentEnum = /* @__PURE__ */ ((TypeOfEmploymentEnum2) => {
1536
+ TypeOfEmploymentEnum2["FULLTIME"] = "FULLTIME";
1537
+ TypeOfEmploymentEnum2["PARTTIME"] = "PARTTIME";
1538
+ TypeOfEmploymentEnum2["BOTH"] = "BOTH";
1539
+ return TypeOfEmploymentEnum2;
1540
+ })(TypeOfEmploymentEnum || {});
1541
+ var Step = /* @__PURE__ */ ((Step2) => {
1542
+ Step2["BASIC_INFORMATION"] = "BASIC_INFORMATION";
1543
+ Step2["ADDITIONAL_COMMENTS"] = "ADDITIONAL_COMMENTS";
1544
+ Step2["JOB_DESCRIPTION"] = "JOB_DESCRIPTION";
1545
+ return Step2;
1546
+ })(Step || {});
1547
+ var JobStatusEnum = /* @__PURE__ */ ((JobStatusEnum2) => {
1548
+ JobStatusEnum2["ACTIVE"] = "ACTIVE";
1549
+ JobStatusEnum2["OPEN"] = "OPEN";
1550
+ JobStatusEnum2["DRAFT"] = "DRAFT";
1551
+ JobStatusEnum2["ONHOLD"] = "ONHOLD";
1552
+ JobStatusEnum2["CLOSED"] = "CLOSED";
1553
+ return JobStatusEnum2;
1554
+ })(JobStatusEnum || {});
1555
+ var DurationTypeEnum = /* @__PURE__ */ ((DurationTypeEnum2) => {
1556
+ DurationTypeEnum2["DAY"] = "DAY";
1557
+ DurationTypeEnum2["WEEK"] = "WEEK";
1558
+ DurationTypeEnum2["MONTH"] = "MONTH";
1559
+ DurationTypeEnum2["YEAR"] = "YEAR";
1560
+ return DurationTypeEnum2;
1561
+ })(DurationTypeEnum || {});
1562
+ var Job = class extends BaseEntity {
1723
1563
  };
1724
1564
  __decorateClass([
1725
- (0, import_class_validator19.IsNotEmpty)({ message: "Please enter unique id." })
1726
- ], CreateQuestionDto.prototype, "questionId", 2);
1565
+ (0, import_typeorm10.Column)({ name: "job_id", type: "varchar", unique: true, nullable: true })
1566
+ ], Job.prototype, "jobId", 2);
1567
+ // individual index to find jobs by user
1727
1568
  __decorateClass([
1728
- (0, import_class_validator19.IsNotEmpty)({ message: "Please enter question." })
1729
- ], CreateQuestionDto.prototype, "question", 2);
1569
+ (0, import_typeorm10.Column)({ name: "user_id", type: "integer", nullable: true }),
1570
+ (0, import_typeorm10.Index)()
1571
+ ], Job.prototype, "userId", 2);
1730
1572
  __decorateClass([
1731
- (0, import_class_validator19.IsNotEmpty)({ message: "Please enter for whom the question is." })
1732
- ], CreateQuestionDto.prototype, "questionFor", 2);
1573
+ (0, import_typeorm10.ManyToOne)(() => User, (user) => user.jobs),
1574
+ (0, import_typeorm10.JoinColumn)({ name: "user_id" })
1575
+ ], Job.prototype, "user", 2);
1733
1576
  __decorateClass([
1734
- (0, import_class_validator19.IsNotEmpty)({ message: "Please enter options." })
1735
- ], CreateQuestionDto.prototype, "options", 2);
1577
+ (0, import_typeorm10.Column)({ name: "job_role", type: "varchar", nullable: true })
1578
+ ], Job.prototype, "jobRole", 2);
1736
1579
  __decorateClass([
1737
- (0, import_class_validator19.IsOptional)(),
1738
- (0, import_class_validator19.IsBoolean)({ message: "Whether the question status active" })
1739
- ], CreateQuestionDto.prototype, "isActive", 2);
1740
-
1741
- // src/modules/job/pattern/pattern.ts
1742
- var JOB_ROLE_PATTERN = {
1743
- fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
1744
- };
1745
- var JOB_PATTERN = {
1746
- fetchJobs: "fetch.jobs",
1747
- fetchJobCountAsPerStatus: "fetch.job.count.as.per.status",
1748
- fetchJobsDropdown: "fetch.jobs.dropdown",
1749
- fetchJobDetail: "fetch.job.details",
1750
- handleJdUpload: "handle.jd.upload",
1751
- fetchJobBasicInformation: "fetch.job.basic.information",
1752
- createJobBasicInformation: "create.job.basic.information",
1753
- updateJobBasicInformation: "update.job.basic.information",
1754
- fetchJobAdditionalComments: "fetch.job.additional.comments",
1755
- updateJobAdditionalComments: "update.job.additional.comments",
1756
- fetchJobDescription: "fetch.job.description",
1757
- updateJobDescription: "update.job.description",
1758
- updateJobStatus: "update.job.status",
1759
- searchJobsByRoleAndSkills: "search.jobs.by.role.and.skills"
1760
- };
1761
-
1762
- // src/modules/job/dto/job-basic-information.dto.ts
1763
- var import_class_validator20 = require("class-validator");
1764
- var import_class_transformer = require("class-transformer");
1765
- var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
1766
- JobLocation2["ONSITE"] = "ONSITE";
1767
- JobLocation2["REMOTE"] = "REMOTE";
1768
- JobLocation2["BOTH"] = "BOTH";
1769
- return JobLocation2;
1770
- })(JobLocation || {});
1771
- var EmploymentType = /* @__PURE__ */ ((EmploymentType2) => {
1772
- EmploymentType2["FULLTIME"] = "FULLTIME";
1773
- EmploymentType2["PARTTIME"] = "PARTTIME";
1774
- EmploymentType2["BOTH"] = "BOTH";
1775
- return EmploymentType2;
1776
- })(EmploymentType || {});
1777
- var JobBasicInformationDto = class {
1778
- };
1580
+ (0, import_typeorm10.Column)({ name: "note", type: "varchar", nullable: true })
1581
+ ], Job.prototype, "note", 2);
1779
1582
  __decorateClass([
1780
- (0, import_class_validator20.IsNotEmpty)({ message: "Please enter job role" }),
1781
- (0, import_class_validator20.IsString)({ message: "Job role must be a string" })
1782
- ], JobBasicInformationDto.prototype, "jobRole", 2);
1583
+ (0, import_typeorm10.Column)({ name: "openings", type: "integer", default: 0 })
1584
+ ], Job.prototype, "openings", 2);
1783
1585
  __decorateClass([
1784
- (0, import_class_validator20.IsOptional)(),
1785
- (0, import_class_validator20.IsString)({ message: "Note must be a string" })
1786
- ], JobBasicInformationDto.prototype, "note", 2);
1586
+ (0, import_typeorm10.Column)({
1587
+ name: "location",
1588
+ type: "enum",
1589
+ enum: JobLocationEnum,
1590
+ nullable: true
1591
+ })
1592
+ ], Job.prototype, "location", 2);
1787
1593
  __decorateClass([
1788
- (0, import_class_validator20.IsArray)({ message: "Skills must be an array" }),
1789
- (0, import_class_validator20.ArrayNotEmpty)({ message: "Please select at least one skill" }),
1790
- (0, import_class_validator20.IsNumber)({}, { each: true, message: "Each skill must be a number" }),
1791
- (0, import_class_transformer.Type)(() => Number)
1792
- ], JobBasicInformationDto.prototype, "skills", 2);
1594
+ (0, import_typeorm10.Column)({
1595
+ name: "type_of_employment",
1596
+ type: "enum",
1597
+ enum: TypeOfEmploymentEnum,
1598
+ nullable: true
1599
+ })
1600
+ ], Job.prototype, "typeOfEmployment", 2);
1793
1601
  __decorateClass([
1794
- (0, import_class_validator20.IsNumber)({}, { message: "Openings must be a number" }),
1795
- (0, import_class_validator20.Min)(1, { message: "There must be at least 1 opening" }),
1796
- (0, import_class_transformer.Type)(() => Number)
1797
- ], JobBasicInformationDto.prototype, "openings", 2);
1602
+ (0, import_typeorm10.Column)({ name: "currency", type: "varchar", default: "USD" })
1603
+ ], Job.prototype, "currency", 2);
1798
1604
  __decorateClass([
1799
- (0, import_class_validator20.IsEnum)(JobLocation, {
1800
- message: `Location must be one of: ${Object.values(JobLocation).join(
1801
- ", "
1802
- )}`
1605
+ (0, import_typeorm10.Column)({
1606
+ name: "expected_salary_from",
1607
+ type: "decimal",
1608
+ precision: 10,
1609
+ scale: 2,
1610
+ default: 0
1803
1611
  })
1804
- ], JobBasicInformationDto.prototype, "location", 2);
1612
+ ], Job.prototype, "expectedSalaryFrom", 2);
1805
1613
  __decorateClass([
1806
- (0, import_class_validator20.IsEnum)(EmploymentType, {
1807
- message: `Type of employment must be one of: ${Object.values(
1808
- EmploymentType
1809
- ).join(", ")}`
1614
+ (0, import_typeorm10.Column)({
1615
+ name: "expected_salary_to",
1616
+ type: "decimal",
1617
+ precision: 10,
1618
+ scale: 2,
1619
+ default: 0
1810
1620
  })
1811
- ], JobBasicInformationDto.prototype, "typeOfEmployment", 2);
1621
+ ], Job.prototype, "expectedSalaryTo", 2);
1812
1622
  __decorateClass([
1813
- (0, import_class_validator20.IsNumber)({}, { message: "Expected salary (from) must be a number" }),
1814
- (0, import_class_validator20.Min)(0, { message: "Expected salary (from) cannot be negative" }),
1815
- (0, import_class_transformer.Type)(() => Number)
1816
- ], JobBasicInformationDto.prototype, "expectedSalaryFrom", 2);
1623
+ (0, import_typeorm10.Column)({ name: "tentative_start_date", type: "date", nullable: true })
1624
+ ], Job.prototype, "tentativeStartDate", 2);
1817
1625
  __decorateClass([
1818
- (0, import_class_validator20.IsNumber)({}, { message: "Expected salary (to) must be a number" }),
1819
- (0, import_class_validator20.Min)(0, { message: "Expected salary (to) cannot be negative" }),
1820
- (0, import_class_transformer.Type)(() => Number)
1821
- ], JobBasicInformationDto.prototype, "expectedSalaryTo", 2);
1626
+ (0, import_typeorm10.Column)({ name: "duration", type: "varchar", nullable: true })
1627
+ ], Job.prototype, "duration", 2);
1822
1628
  __decorateClass([
1823
- (0, import_class_validator20.IsString)({ message: "Onboarding TAT must be a string" }),
1824
- (0, import_class_validator20.IsOptional)()
1825
- ], JobBasicInformationDto.prototype, "onboardingTat", 2);
1629
+ (0, import_typeorm10.Column)({
1630
+ name: "duration_type",
1631
+ type: "enum",
1632
+ enum: DurationTypeEnum,
1633
+ nullable: true
1634
+ })
1635
+ ], Job.prototype, "durationType", 2);
1826
1636
  __decorateClass([
1827
- (0, import_class_validator20.IsString)({ message: "Candidate communication skills must be a string" }),
1828
- (0, import_class_validator20.IsOptional)()
1829
- ], JobBasicInformationDto.prototype, "candidateCommunicationSkills", 2);
1830
-
1831
- // src/modules/job/dto/job-additional-comment.dto.ts
1832
- var import_class_validator21 = require("class-validator");
1833
- var JobAdditionalCommentDto = class {
1834
- };
1637
+ (0, import_typeorm10.Column)({ name: "description", type: "varchar", nullable: true })
1638
+ ], Job.prototype, "description", 2);
1835
1639
  __decorateClass([
1836
- (0, import_class_validator21.IsOptional)(),
1837
- (0, import_class_validator21.IsString)({ message: "Additional comment must be a string" }),
1838
- (0, import_class_validator21.MaxLength)(500, { message: "Additional comment must not exceed 500 characters" })
1839
- ], JobAdditionalCommentDto.prototype, "additionalComment", 2);
1840
-
1841
- // src/modules/job/dto/job-description.dto.ts
1842
- var import_class_validator22 = require("class-validator");
1843
- var JobDescriptionDto = class {
1844
- };
1640
+ (0, import_typeorm10.Column)({ name: "additional_comment", type: "varchar", nullable: true })
1641
+ ], Job.prototype, "additionalComment", 2);
1845
1642
  __decorateClass([
1846
- (0, import_class_validator22.IsNotEmpty)({ message: "Please enter job description" }),
1847
- (0, import_class_validator22.IsString)({ message: "Description must be a string" }),
1848
- (0, import_class_validator22.MaxLength)(5e3, { message: "Description must not exceed 5000 characters" })
1849
- ], JobDescriptionDto.prototype, "description", 2);
1643
+ (0, import_typeorm10.Column)({
1644
+ name: "onboarding_tat",
1645
+ type: "varchar",
1646
+ length: 50,
1647
+ nullable: true
1648
+ })
1649
+ ], Job.prototype, "onboardingTat", 2);
1650
+ __decorateClass([
1651
+ (0, import_typeorm10.Column)({
1652
+ name: "candidate_communication_skills",
1653
+ type: "varchar",
1654
+ nullable: true
1655
+ })
1656
+ ], Job.prototype, "candidateCommunicationSkills", 2);
1657
+ __decorateClass([
1658
+ (0, import_typeorm10.Column)({
1659
+ name: "step_completed",
1660
+ type: "enum",
1661
+ enum: Step,
1662
+ nullable: true
1663
+ })
1664
+ ], Job.prototype, "stepCompleted", 2);
1665
+ __decorateClass([
1666
+ (0, import_typeorm10.Column)({
1667
+ name: "status",
1668
+ type: "enum",
1669
+ enum: JobStatusEnum,
1670
+ default: "DRAFT" /* DRAFT */
1671
+ })
1672
+ ], Job.prototype, "status", 2);
1673
+ __decorateClass([
1674
+ (0, import_typeorm10.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.job, { cascade: true })
1675
+ ], Job.prototype, "jobSkills", 2);
1676
+ __decorateClass([
1677
+ (0, import_typeorm10.OneToMany)(() => JobApplication, (jobApplication) => jobApplication.job, {
1678
+ cascade: true
1679
+ })
1680
+ ], Job.prototype, "jobApplications", 2);
1681
+ Job = __decorateClass([
1682
+ (0, import_typeorm10.Entity)("jobs")
1683
+ ], Job);
1850
1684
 
1851
- // src/modules/job/dto/job-status.dto.ts
1852
- var import_class_validator23 = require("class-validator");
1853
- var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
1854
- JobStatus2["ACTIVE"] = "ACTIVE";
1855
- JobStatus2["OPEN"] = "OPEN";
1856
- JobStatus2["DRAFT"] = "DRAFT";
1857
- JobStatus2["ONHOLD"] = "ONHOLD";
1858
- JobStatus2["CLOSED"] = "CLOSED";
1859
- return JobStatus2;
1860
- })(JobStatus || {});
1861
- var JobStatusDto = class {
1685
+ // src/entities/bank-details.entity.ts
1686
+ var import_typeorm11 = require("typeorm");
1687
+ var BankAccountTypeEnum = /* @__PURE__ */ ((BankAccountTypeEnum2) => {
1688
+ BankAccountTypeEnum2["PRIMARY"] = "PRIMARY";
1689
+ BankAccountTypeEnum2["SECONDARY"] = "SECONDARY";
1690
+ return BankAccountTypeEnum2;
1691
+ })(BankAccountTypeEnum || {});
1692
+ var BankAccountScopeEnum = /* @__PURE__ */ ((BankAccountScopeEnum2) => {
1693
+ BankAccountScopeEnum2["DOMESTIC"] = "DOMESTIC";
1694
+ BankAccountScopeEnum2["INTERNATIONAL"] = "INTERNATIONAL";
1695
+ return BankAccountScopeEnum2;
1696
+ })(BankAccountScopeEnum || {});
1697
+ var BankDetail = class extends BaseEntity {
1862
1698
  };
1699
+ // individual index to find bank details by user
1863
1700
  __decorateClass([
1864
- (0, import_class_validator23.IsNotEmpty)({ message: "Please provide a job status" }),
1865
- (0, import_class_validator23.IsEnum)(JobStatus, {
1866
- message: `Status must be one of: ${Object.values(JobStatus).join(", ")}`
1701
+ (0, import_typeorm11.Column)({ name: "user_id", type: "integer", nullable: true }),
1702
+ (0, import_typeorm11.Index)()
1703
+ ], BankDetail.prototype, "userId", 2);
1704
+ __decorateClass([
1705
+ (0, import_typeorm11.ManyToOne)(() => User, (user) => user.bankDetail),
1706
+ (0, import_typeorm11.JoinColumn)({ name: "user_id" })
1707
+ ], BankDetail.prototype, "user", 2);
1708
+ __decorateClass([
1709
+ (0, import_typeorm11.Column)({ name: "name", type: "varchar", nullable: true })
1710
+ ], BankDetail.prototype, "name", 2);
1711
+ __decorateClass([
1712
+ (0, import_typeorm11.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1713
+ ], BankDetail.prototype, "mobile", 2);
1714
+ __decorateClass([
1715
+ (0, import_typeorm11.Column)({ name: "email", type: "varchar", unique: true })
1716
+ ], BankDetail.prototype, "email", 2);
1717
+ __decorateClass([
1718
+ (0, import_typeorm11.Column)({ name: "address", type: "varchar", nullable: true })
1719
+ ], BankDetail.prototype, "address", 2);
1720
+ __decorateClass([
1721
+ (0, import_typeorm11.Column)({ name: "account_number", type: "varchar", unique: true, nullable: true })
1722
+ ], BankDetail.prototype, "accountNumber", 2);
1723
+ __decorateClass([
1724
+ (0, import_typeorm11.Column)({ name: "bank_name", type: "varchar", nullable: true })
1725
+ ], BankDetail.prototype, "bankName", 2);
1726
+ __decorateClass([
1727
+ (0, import_typeorm11.Column)({ name: "ifsc_code", type: "varchar", nullable: true })
1728
+ ], BankDetail.prototype, "ifscCode", 2);
1729
+ __decorateClass([
1730
+ (0, import_typeorm11.Column)({ name: "branch_name", type: "varchar", nullable: true })
1731
+ ], BankDetail.prototype, "branchName", 2);
1732
+ __decorateClass([
1733
+ (0, import_typeorm11.Column)({ name: "routing_no", type: "varchar", nullable: true })
1734
+ ], BankDetail.prototype, "routingNo", 2);
1735
+ __decorateClass([
1736
+ (0, import_typeorm11.Column)({ name: "aba_no", type: "varchar", nullable: true })
1737
+ ], BankDetail.prototype, "abaNumber", 2);
1738
+ __decorateClass([
1739
+ (0, import_typeorm11.Column)({ name: "iban", type: "varchar", nullable: true })
1740
+ ], BankDetail.prototype, "iban", 2);
1741
+ __decorateClass([
1742
+ (0, import_typeorm11.Column)({
1743
+ name: "account_type",
1744
+ type: "enum",
1745
+ enum: BankAccountTypeEnum,
1746
+ default: "PRIMARY" /* PRIMARY */
1867
1747
  })
1868
- ], JobStatusDto.prototype, "status", 2);
1748
+ ], BankDetail.prototype, "accountType", 2);
1749
+ __decorateClass([
1750
+ (0, import_typeorm11.Column)({
1751
+ name: "account_scope",
1752
+ type: "enum",
1753
+ enum: BankAccountScopeEnum,
1754
+ default: "DOMESTIC" /* DOMESTIC */
1755
+ })
1756
+ ], BankDetail.prototype, "accountScope", 2);
1757
+ BankDetail = __decorateClass([
1758
+ (0, import_typeorm11.Entity)("bank_details")
1759
+ ], BankDetail);
1869
1760
 
1870
- // src/modules/job/dto/job-id-param.dto.ts
1871
- var import_class_validator24 = require("class-validator");
1872
- var JobIdParamDto = class {
1761
+ // src/entities/system-preference.entity.ts
1762
+ var import_typeorm12 = require("typeorm");
1763
+ var SystemPreference = class extends BaseEntity {
1873
1764
  };
1765
+ // individual index to find system preference by user
1874
1766
  __decorateClass([
1875
- (0, import_class_validator24.IsUUID)("4", {
1876
- message: "Invalid job ID. It must be a valid UUID version 4."
1877
- })
1878
- ], JobIdParamDto.prototype, "id", 2);
1767
+ (0, import_typeorm12.Column)({ name: "user_id", type: "integer", nullable: true }),
1768
+ (0, import_typeorm12.Index)()
1769
+ ], SystemPreference.prototype, "userId", 2);
1770
+ __decorateClass([
1771
+ (0, import_typeorm12.ManyToOne)(() => User, (user) => user.systemPreference),
1772
+ (0, import_typeorm12.JoinColumn)({ name: "user_id" })
1773
+ ], SystemPreference.prototype, "user", 2);
1774
+ __decorateClass([
1775
+ (0, import_typeorm12.Column)({ name: "key", type: "varchar", unique: true, nullable: false })
1776
+ ], SystemPreference.prototype, "key", 2);
1777
+ __decorateClass([
1778
+ (0, import_typeorm12.Column)({ name: "value", type: "boolean", default: false })
1779
+ ], SystemPreference.prototype, "value", 2);
1780
+ SystemPreference = __decorateClass([
1781
+ (0, import_typeorm12.Entity)("system_preferences")
1782
+ ], SystemPreference);
1879
1783
 
1880
- // src/modules/user/freelancer-profile/pattern/pattern.ts
1881
- var PROFILE_PATTERN = {
1882
- fetchFreelancerProfile: "fetch.freelancer.profile",
1883
- changeFreelancerPassword: "change.freelancer.password",
1884
- uploadFreelancerProfilePic: "upload.freelancer.profilepic",
1885
- updateFreelancerProfile: "update.freelancer.profile"
1784
+ // src/entities/company-role.entity.ts
1785
+ var import_typeorm13 = require("typeorm");
1786
+ var CompanyRole = class extends BaseEntity {
1886
1787
  };
1788
+ // individual index to find company roles by user
1789
+ __decorateClass([
1790
+ (0, import_typeorm13.Column)({ name: "user_id", type: "integer", nullable: true }),
1791
+ (0, import_typeorm13.Index)()
1792
+ ], CompanyRole.prototype, "userId", 2);
1793
+ __decorateClass([
1794
+ (0, import_typeorm13.ManyToOne)(() => User, (user) => user.companyRole),
1795
+ (0, import_typeorm13.JoinColumn)({ name: "user_id" })
1796
+ ], CompanyRole.prototype, "user", 2);
1797
+ __decorateClass([
1798
+ (0, import_typeorm13.Column)({ name: "name", type: "varchar" })
1799
+ ], CompanyRole.prototype, "name", 2);
1800
+ __decorateClass([
1801
+ (0, import_typeorm13.Column)({ name: "slug", type: "varchar", nullable: true, unique: true }),
1802
+ (0, import_typeorm13.Index)()
1803
+ ], CompanyRole.prototype, "slug", 2);
1804
+ __decorateClass([
1805
+ (0, import_typeorm13.Column)({ name: "description", type: "text", nullable: true })
1806
+ ], CompanyRole.prototype, "description", 2);
1807
+ __decorateClass([
1808
+ (0, import_typeorm13.Column)({ name: "is_active", type: "boolean", default: true })
1809
+ ], CompanyRole.prototype, "isActive", 2);
1810
+ CompanyRole = __decorateClass([
1811
+ (0, import_typeorm13.Entity)("company_roles")
1812
+ ], CompanyRole);
1887
1813
 
1888
- // src/modules/user/freelancer-profile/dto/freelancer-change-password.dto.ts
1889
- var import_class_validator25 = require("class-validator");
1890
- var FreelancerChangePasswordDto = class {
1814
+ // src/entities/freelancer-experience.entity.ts
1815
+ var import_typeorm14 = require("typeorm");
1816
+ var FreelancerExperience = class extends BaseEntity {
1891
1817
  };
1818
+ // individual index to find experence by user
1892
1819
  __decorateClass([
1893
- (0, import_class_validator25.IsNotEmpty)({ message: "Please enter Old Password." }),
1894
- (0, import_class_validator25.IsString)()
1895
- ], FreelancerChangePasswordDto.prototype, "oldPassword", 2);
1820
+ (0, import_typeorm14.Column)({ name: "user_id", type: "integer", nullable: true }),
1821
+ (0, import_typeorm14.Index)()
1822
+ ], FreelancerExperience.prototype, "userId", 2);
1896
1823
  __decorateClass([
1897
- (0, import_class_validator25.IsNotEmpty)({ message: "Please enter New Password." }),
1898
- (0, import_class_validator25.IsString)(),
1899
- (0, import_class_validator25.MinLength)(6),
1900
- (0, import_class_validator25.MaxLength)(32),
1901
- (0, import_class_validator25.Matches)(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
1902
- message: "New Password must include letters, numbers and symbols."
1903
- })
1904
- ], FreelancerChangePasswordDto.prototype, "newPassword", 2);
1824
+ (0, import_typeorm14.ManyToOne)(() => User, (user) => user.freelancerExperience),
1825
+ (0, import_typeorm14.JoinColumn)({ name: "user_id" })
1826
+ ], FreelancerExperience.prototype, "user", 2);
1827
+ __decorateClass([
1828
+ (0, import_typeorm14.Column)({ name: "company_name", type: "varchar", nullable: true })
1829
+ ], FreelancerExperience.prototype, "companyName", 2);
1830
+ __decorateClass([
1831
+ (0, import_typeorm14.Column)({ name: "designation", type: "varchar", nullable: true })
1832
+ ], FreelancerExperience.prototype, "designation", 2);
1833
+ __decorateClass([
1834
+ (0, import_typeorm14.Column)({ name: "job_duration", type: "varchar", nullable: true })
1835
+ ], FreelancerExperience.prototype, "jobDuration", 2);
1836
+ __decorateClass([
1837
+ (0, import_typeorm14.Column)({ name: "description", type: "varchar", nullable: true })
1838
+ ], FreelancerExperience.prototype, "description", 2);
1839
+ FreelancerExperience = __decorateClass([
1840
+ (0, import_typeorm14.Entity)("freelancer_experiences")
1841
+ ], FreelancerExperience);
1905
1842
 
1906
- // src/modules/user/freelancer-profile/dto/update-freelancer-profile.dto.ts
1907
- var import_class_validator26 = require("class-validator");
1908
- var NatureOfWorkDto = /* @__PURE__ */ ((NatureOfWorkDto2) => {
1909
- NatureOfWorkDto2["FULLTIME"] = "FULLTIME";
1910
- NatureOfWorkDto2["PARTTIME"] = "PARTTIME";
1911
- NatureOfWorkDto2["BOTH"] = "BOTH";
1912
- return NatureOfWorkDto2;
1913
- })(NatureOfWorkDto || {});
1914
- var UpdateFreelancerProfileDto = class {
1843
+ // src/entities/user.entity.ts
1844
+ var AccountType = /* @__PURE__ */ ((AccountType2) => {
1845
+ AccountType2["ADMIN"] = "ADMIN";
1846
+ AccountType2["SUB_ADMIN"] = "SUB_ADMIN";
1847
+ AccountType2["CLIENT"] = "CLIENT";
1848
+ AccountType2["FREELANCER"] = "FREELANCER";
1849
+ return AccountType2;
1850
+ })(AccountType || {});
1851
+ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
1852
+ AccountStatus2["INACTIVE"] = "INACTIVE";
1853
+ AccountStatus2["ACTIVE"] = "ACTIVE";
1854
+ AccountStatus2["SUSPENDED"] = "SUSPENDED";
1855
+ AccountStatus2["BLOCKED"] = "BLOCKED";
1856
+ return AccountStatus2;
1857
+ })(AccountStatus || {});
1858
+ var Provider = /* @__PURE__ */ ((Provider2) => {
1859
+ Provider2["LINKEDIN"] = "LINKEDIN";
1860
+ Provider2["GOOGLE"] = "GOOGLE";
1861
+ Provider2["GITLABS"] = "GITLABS";
1862
+ return Provider2;
1863
+ })(Provider || {});
1864
+ var User = class extends BaseEntity {
1915
1865
  };
1916
1866
  __decorateClass([
1917
- (0, import_class_validator26.IsOptional)(),
1918
- (0, import_class_validator26.IsString)()
1919
- ], UpdateFreelancerProfileDto.prototype, "firstName", 2);
1867
+ (0, import_typeorm15.Column)({ name: "unique_id", type: "varchar", unique: true })
1868
+ ], User.prototype, "uniqueId", 2);
1869
+ __decorateClass([
1870
+ (0, import_typeorm15.Column)({ name: "parent_id", type: "integer", nullable: true }),
1871
+ (0, import_typeorm15.Index)()
1872
+ ], User.prototype, "parentId", 2);
1873
+ __decorateClass([
1874
+ (0, import_typeorm15.ManyToOne)(() => User, (user) => user.children, { nullable: true }),
1875
+ (0, import_typeorm15.JoinColumn)({ name: "parent_id" })
1876
+ ], User.prototype, "parent", 2);
1877
+ __decorateClass([
1878
+ (0, import_typeorm15.OneToMany)(() => User, (user) => user.parent)
1879
+ ], User.prototype, "children", 2);
1880
+ __decorateClass([
1881
+ (0, import_typeorm15.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
1882
+ ], User.prototype, "username", 2);
1883
+ __decorateClass([
1884
+ (0, import_typeorm15.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
1885
+ ], User.prototype, "firstName", 2);
1886
+ __decorateClass([
1887
+ (0, import_typeorm15.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
1888
+ ], User.prototype, "lastName", 2);
1889
+ __decorateClass([
1890
+ (0, import_typeorm15.Column)({ name: "date_of_birth", type: "date", nullable: true })
1891
+ ], User.prototype, "dateOfBirth", 2);
1892
+ __decorateClass([
1893
+ (0, import_typeorm15.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
1894
+ ], User.prototype, "gender", 2);
1895
+ __decorateClass([
1896
+ (0, import_typeorm15.Column)({ name: "profile_picture_url", type: "text", nullable: true })
1897
+ ], User.prototype, "profilePictureUrl", 2);
1898
+ __decorateClass([
1899
+ (0, import_typeorm15.Column)({ name: "email", type: "varchar", unique: true })
1900
+ ], User.prototype, "email", 2);
1901
+ __decorateClass([
1902
+ (0, import_typeorm15.Column)({ name: "mobile_code", type: "varchar", nullable: true })
1903
+ ], User.prototype, "mobileCode", 2);
1920
1904
  __decorateClass([
1921
- (0, import_class_validator26.IsOptional)(),
1922
- (0, import_class_validator26.IsString)()
1923
- ], UpdateFreelancerProfileDto.prototype, "lastName", 2);
1905
+ (0, import_typeorm15.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1906
+ ], User.prototype, "mobile", 2);
1924
1907
  __decorateClass([
1925
- (0, import_class_validator26.IsOptional)(),
1926
- (0, import_class_validator26.IsEmail)()
1927
- ], UpdateFreelancerProfileDto.prototype, "email", 2);
1908
+ (0, import_typeorm15.Column)({ name: "password", type: "varchar" })
1909
+ ], User.prototype, "password", 2);
1928
1910
  __decorateClass([
1929
- (0, import_class_validator26.IsOptional)(),
1930
- (0, import_class_validator26.IsString)()
1931
- ], UpdateFreelancerProfileDto.prototype, "mobile", 2);
1911
+ (0, import_typeorm15.Column)({
1912
+ name: "account_type",
1913
+ type: "enum",
1914
+ enum: AccountType,
1915
+ default: "FREELANCER" /* FREELANCER */
1916
+ })
1917
+ ], User.prototype, "accountType", 2);
1932
1918
  __decorateClass([
1933
- (0, import_class_validator26.IsOptional)(),
1934
- (0, import_class_validator26.IsNumber)()
1935
- ], UpdateFreelancerProfileDto.prototype, "countryId", 2);
1919
+ (0, import_typeorm15.Column)({
1920
+ name: "account_status",
1921
+ type: "enum",
1922
+ enum: AccountStatus,
1923
+ default: "INACTIVE" /* INACTIVE */
1924
+ })
1925
+ ], User.prototype, "accountStatus", 2);
1936
1926
  __decorateClass([
1937
- (0, import_class_validator26.IsOptional)(),
1938
- (0, import_class_validator26.IsString)()
1939
- ], UpdateFreelancerProfileDto.prototype, "currency", 2);
1927
+ (0, import_typeorm15.Column)({ name: "is_email_verified", type: "boolean", default: false })
1928
+ ], User.prototype, "isEmailVerified", 2);
1940
1929
  __decorateClass([
1941
- (0, import_class_validator26.IsOptional)(),
1942
- (0, import_class_validator26.IsString)()
1943
- ], UpdateFreelancerProfileDto.prototype, "expectedHourlyCompensation", 2);
1930
+ (0, import_typeorm15.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
1931
+ ], User.prototype, "isMobileVerified", 2);
1944
1932
  __decorateClass([
1945
- (0, import_class_validator26.IsOptional)(),
1946
- (0, import_class_validator26.IsEnum)(NatureOfWorkDto, {
1947
- message: `Engagement Type must be one of: ${Object.values(NatureOfWorkDto).join(", ")}`
1933
+ (0, import_typeorm15.Column)({
1934
+ name: "last_login_at",
1935
+ type: "timestamp with time zone",
1936
+ nullable: true
1948
1937
  })
1949
- ], UpdateFreelancerProfileDto.prototype, "natureOfWork", 2);
1938
+ ], User.prototype, "lastLoginAt", 2);
1950
1939
  __decorateClass([
1951
- (0, import_class_validator26.IsOptional)(),
1952
- (0, import_class_validator26.IsString)()
1953
- ], UpdateFreelancerProfileDto.prototype, "portfolioLink", 2);
1940
+ (0, import_typeorm15.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
1941
+ ], User.prototype, "lastLoginIp", 2);
1954
1942
  __decorateClass([
1955
- (0, import_class_validator26.IsOptional)(),
1956
- (0, import_class_validator26.IsString)()
1957
- ], UpdateFreelancerProfileDto.prototype, "address", 2);
1943
+ (0, import_typeorm15.Column)({ name: "reset_token", type: "varchar", nullable: true })
1944
+ ], User.prototype, "resetToken", 2);
1958
1945
  __decorateClass([
1959
- (0, import_class_validator26.IsOptional)(),
1960
- (0, import_class_validator26.IsString)()
1961
- ], UpdateFreelancerProfileDto.prototype, "about", 2);
1946
+ (0, import_typeorm15.Column)({
1947
+ name: "reset_token_expire_at",
1948
+ type: "timestamp with time zone",
1949
+ nullable: true
1950
+ })
1951
+ ], User.prototype, "resetTokenExpireAt", 2);
1962
1952
  __decorateClass([
1963
- (0, import_class_validator26.IsOptional)(),
1964
- (0, import_class_validator26.IsString)()
1965
- ], UpdateFreelancerProfileDto.prototype, "linkedinProfileLink", 2);
1953
+ (0, import_typeorm15.OneToMany)(() => RefreshToken, (token) => token.user)
1954
+ ], User.prototype, "refreshTokens", 2);
1966
1955
  __decorateClass([
1967
- (0, import_class_validator26.IsOptional)(),
1968
- (0, import_class_validator26.IsString)()
1969
- ], UpdateFreelancerProfileDto.prototype, "kaggleProfileLink", 2);
1956
+ (0, import_typeorm15.Column)({
1957
+ name: "provider",
1958
+ type: "enum",
1959
+ enum: Provider,
1960
+ default: null,
1961
+ nullable: true
1962
+ })
1963
+ ], User.prototype, "provider", 2);
1970
1964
  __decorateClass([
1971
- (0, import_class_validator26.IsOptional)(),
1972
- (0, import_class_validator26.IsString)()
1973
- ], UpdateFreelancerProfileDto.prototype, "githubProfileLink", 2);
1965
+ (0, import_typeorm15.Column)({ name: "provider_token", type: "varchar", nullable: true })
1966
+ ], User.prototype, "providerToken", 2);
1974
1967
  __decorateClass([
1975
- (0, import_class_validator26.IsOptional)(),
1976
- (0, import_class_validator26.IsString)()
1977
- ], UpdateFreelancerProfileDto.prototype, "stackOverflowProfileLink", 2);
1978
-
1979
- // src/modules/bank/pattern/pattern.ts
1980
- var BANK_PATTERN = {
1981
- addFreelancerBankDetails: "add.freelancer.bankdetails",
1982
- fetchFreelancerBankDetails: "fetch.freelancer.bank.details",
1983
- updateFreelancerBankDetails: "update.freelancer.bank.details"
1984
- };
1985
-
1986
- // src/modules/bank/dto/freelancer-bank-details.dto.ts
1987
- var import_class_validator27 = require("class-validator");
1988
- var BankAccountScope = /* @__PURE__ */ ((BankAccountScope2) => {
1989
- BankAccountScope2["DOMESTIC"] = "DOMESTIC";
1990
- BankAccountScope2["INTERNATIONAL"] = "INTERNATIONAL";
1991
- return BankAccountScope2;
1992
- })(BankAccountScope || {});
1993
- var FreelancerBankDetailsDto = class {
1994
- };
1968
+ (0, import_typeorm15.Column)({ name: "linkedin_id", type: "varchar", nullable: true })
1969
+ ], User.prototype, "linkedInId", 2);
1995
1970
  __decorateClass([
1996
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Account Holder Name." })
1997
- ], FreelancerBankDetailsDto.prototype, "name", 2);
1971
+ (0, import_typeorm15.Column)({ name: "google_id", type: "varchar", nullable: true })
1972
+ ], User.prototype, "googleId", 2);
1998
1973
  __decorateClass([
1999
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Mobile Number." })
2000
- ], FreelancerBankDetailsDto.prototype, "mobile", 2);
1974
+ (0, import_typeorm15.Column)({ name: "gitlabs_id", type: "varchar", nullable: true })
1975
+ ], User.prototype, "gitLabsId", 2);
2001
1976
  __decorateClass([
2002
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Email." })
2003
- ], FreelancerBankDetailsDto.prototype, "email", 2);
1977
+ (0, import_typeorm15.OneToMany)(() => Otp, (otp) => otp.user)
1978
+ ], User.prototype, "otps", 2);
2004
1979
  __decorateClass([
2005
- (0, import_class_validator27.IsOptional)()
2006
- ], FreelancerBankDetailsDto.prototype, "address", 2);
1980
+ (0, import_typeorm15.OneToMany)(() => SenseloafLog, (senseloafLog) => senseloafLog.user)
1981
+ ], User.prototype, "senseloafLogs", 2);
2007
1982
  __decorateClass([
2008
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Account Number." })
2009
- ], FreelancerBankDetailsDto.prototype, "accountNumber", 2);
1983
+ (0, import_typeorm15.OneToOne)(
1984
+ () => FreelancerProfile,
1985
+ (freelancerProfile) => freelancerProfile.user
1986
+ )
1987
+ ], User.prototype, "freelancerProfile", 2);
2010
1988
  __decorateClass([
2011
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Bank Name." })
2012
- ], FreelancerBankDetailsDto.prototype, "bankName", 2);
1989
+ (0, import_typeorm15.OneToOne)(() => CompanyProfile, (companyProfile) => companyProfile.user, { cascade: true })
1990
+ ], User.prototype, "companyProfile", 2);
2013
1991
  __decorateClass([
2014
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Branch Name." })
2015
- ], FreelancerBankDetailsDto.prototype, "branchName", 2);
1992
+ (0, import_typeorm15.OneToMany)(() => Job, (job) => job.user)
1993
+ ], User.prototype, "jobs", 2);
2016
1994
  __decorateClass([
2017
- (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "DOMESTIC"),
2018
- (0, import_class_validator27.IsNotEmpty)({ message: "IFSC Code is required for DOMESTIC accounts." })
2019
- ], FreelancerBankDetailsDto.prototype, "ifscCode", 2);
1995
+ (0, import_typeorm15.OneToMany)(() => BankDetail, (bankDetail) => bankDetail.user)
1996
+ ], User.prototype, "bankDetail", 2);
2020
1997
  __decorateClass([
2021
- (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
2022
- (0, import_class_validator27.IsNotEmpty)({ message: "Routing Number/Sort Code is required for INTERNATIONAL accounts." })
2023
- ], FreelancerBankDetailsDto.prototype, "routingNo", 2);
1998
+ (0, import_typeorm15.OneToMany)(
1999
+ () => SystemPreference,
2000
+ (systemPreference) => systemPreference.user
2001
+ )
2002
+ ], User.prototype, "systemPreference", 2);
2024
2003
  __decorateClass([
2025
- (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
2026
- (0, import_class_validator27.IsNotEmpty)({ message: "ABA Number is required for INTERNATIONAL accounts." })
2027
- ], FreelancerBankDetailsDto.prototype, "abaNumber", 2);
2004
+ (0, import_typeorm15.OneToMany)(() => Rating, (rating) => rating.reviewer)
2005
+ ], User.prototype, "givenRatings", 2);
2028
2006
  __decorateClass([
2029
- (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
2030
- (0, import_class_validator27.IsNotEmpty)({ message: "IBAN is required for INTERNATIONAL accounts." })
2031
- ], FreelancerBankDetailsDto.prototype, "iban", 2);
2007
+ (0, import_typeorm15.OneToMany)(() => Rating, (rating) => rating.reviewee)
2008
+ ], User.prototype, "receivedRatings", 2);
2032
2009
  __decorateClass([
2033
- (0, import_class_validator27.IsOptional)()
2034
- ], FreelancerBankDetailsDto.prototype, "accountType", 2);
2010
+ (0, import_typeorm15.OneToMany)(() => JobApplication, (jobApplication) => jobApplication.user)
2011
+ ], User.prototype, "jobApplications", 2);
2035
2012
  __decorateClass([
2036
- (0, import_class_validator27.IsEnum)(BankAccountScope, {
2037
- message: `Type of Account Scope must be one of: ${Object.values(
2038
- BankAccountScope
2039
- ).join(", ")}`
2040
- })
2041
- ], FreelancerBankDetailsDto.prototype, "accountScope", 2);
2042
-
2043
- // src/modules/plan/pattern/pattern.ts
2044
- var PLAN_PATTERN = {
2045
- fetchPlans: "fetch.plans"
2046
- };
2047
-
2048
- // src/modules/system-preference/pattern/pattern.ts
2049
- var SYSTEM_PREFERENCES_PATTERN = {
2050
- fetchSystemPreference: "fetch.system.preferences",
2051
- updateSystemPreference: "update.system.preferences",
2052
- createSystemPreference: "create.system.preferences"
2053
- };
2013
+ (0, import_typeorm15.OneToMany)(() => CompanyRole, (companyRole) => companyRole.user)
2014
+ ], User.prototype, "companyRole", 2);
2015
+ __decorateClass([
2016
+ (0, import_typeorm15.OneToOne)(() => FreelancerExperience, (freelancerExperience) => freelancerExperience.user)
2017
+ ], User.prototype, "freelancerExperience", 2);
2018
+ User = __decorateClass([
2019
+ (0, import_typeorm15.Entity)("users")
2020
+ ], User);
2054
2021
 
2055
- // src/modules/system-preference/dto/system-preference.dto.ts
2056
- var import_class_validator28 = require("class-validator");
2057
- var SystemPreferenceKey = /* @__PURE__ */ ((SystemPreferenceKey2) => {
2058
- SystemPreferenceKey2["EMAIL_NOTIFICATION"] = "EMAIL_NOTIFICATION";
2059
- SystemPreferenceKey2["DARK_MODE"] = "DARK_MODE";
2060
- return SystemPreferenceKey2;
2061
- })(SystemPreferenceKey || {});
2062
- var SystemPreferenceDto = class {
2022
+ // src/entities/rating.entity.ts
2023
+ var RatingTypeEnum = /* @__PURE__ */ ((RatingTypeEnum2) => {
2024
+ RatingTypeEnum2["FREELANCER_TO_CLIENT"] = "FREELANCER_TO_CLIENT";
2025
+ RatingTypeEnum2["CLIENT_TO_FREELANCER"] = "CLIENT_TO_FREELANCER";
2026
+ return RatingTypeEnum2;
2027
+ })(RatingTypeEnum || {});
2028
+ var Rating = class extends BaseEntity {
2063
2029
  };
2064
2030
  __decorateClass([
2065
- (0, import_class_validator28.IsBoolean)()
2066
- ], SystemPreferenceDto.prototype, "value", 2);
2031
+ (0, import_typeorm16.Column)({ name: "reviewer_id", type: "integer" }),
2032
+ (0, import_typeorm16.Index)()
2033
+ ], Rating.prototype, "reviewer_id", 2);
2067
2034
  __decorateClass([
2068
- (0, import_class_validator28.IsEnum)(SystemPreferenceKey, {
2069
- message: `key must be one of: ${Object.values(
2070
- SystemPreferenceKey
2071
- ).join(", ")}`
2035
+ (0, import_typeorm16.ManyToOne)(() => User, { onDelete: "CASCADE" }),
2036
+ (0, import_typeorm16.JoinColumn)({ name: "reviewer_id" })
2037
+ ], Rating.prototype, "reviewer", 2);
2038
+ __decorateClass([
2039
+ (0, import_typeorm16.Column)({ name: "reviewee_id", type: "integer" }),
2040
+ (0, import_typeorm16.Index)()
2041
+ ], Rating.prototype, "reviewee_id", 2);
2042
+ __decorateClass([
2043
+ (0, import_typeorm16.ManyToOne)(() => User, { onDelete: "CASCADE" }),
2044
+ (0, import_typeorm16.JoinColumn)({ name: "reviewee_id" })
2045
+ ], Rating.prototype, "reviewee", 2);
2046
+ __decorateClass([
2047
+ (0, import_typeorm16.Column)({
2048
+ type: "enum",
2049
+ enum: RatingTypeEnum,
2050
+ nullable: true
2072
2051
  })
2073
- ], SystemPreferenceDto.prototype, "key", 2);
2074
-
2075
- // src/modules/notification/pattern/pattern.ts
2076
- var NOTIFICATION_PATTERN = {
2077
- handleAccountVerificationNotification: "handle.account.verification.notification",
2078
- handleResetLinkNotification: "handle.reset.link.notification"
2079
- };
2080
-
2081
- // src/modules/rating/pattern/pattern.ts
2082
- var RATING_PATTERN = {
2083
- addRating: "add.rating",
2084
- fetchRating: "fetch.rating"
2085
- };
2052
+ ], Rating.prototype, "ratingType", 2);
2053
+ __decorateClass([
2054
+ (0, import_typeorm16.Column)({ type: "integer", nullable: true })
2055
+ ], Rating.prototype, "rating", 2);
2056
+ __decorateClass([
2057
+ (0, import_typeorm16.Column)({ type: "text", nullable: true })
2058
+ ], Rating.prototype, "review", 2);
2059
+ Rating = __decorateClass([
2060
+ (0, import_typeorm16.Entity)("ratings")
2061
+ ], Rating);
2086
2062
 
2087
2063
  // src/modules/rating/dto/add.rating.dto.ts
2088
- var import_class_validator29 = require("class-validator");
2089
2064
  var CreateRatingDto = class {
2090
2065
  };
2091
2066
  __decorateClass([