@experts_hub/shared 1.0.69 → 1.0.71

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
@@ -31,6 +31,7 @@ __export(index_exports, {
31
31
  AccountStatus: () => AccountStatus,
32
32
  AccountType: () => AccountType,
33
33
  BaseEntity: () => BaseEntity,
34
+ CLIENT_PROFILE_PATTERN: () => CLIENT_PROFILE_PATTERN,
34
35
  ClientCreateAccountDto: () => ClientCreateAccountDto,
35
36
  ClientProfileQuestionDto: () => ClientProfileQuestionDto,
36
37
  CompanyProfile: () => CompanyProfile,
@@ -68,6 +69,8 @@ __export(index_exports, {
68
69
  ResumeParserLog: () => ResumeParserLog,
69
70
  SUBADMIN_PATTERN: () => SUBADMIN_PATTERN,
70
71
  TypeOfEmployment: () => TypeOfEmployment,
72
+ UpdateCompanyLogoDto: () => UpdateCompanyLogoDto,
73
+ UpdateCompanyProfileDto: () => UpdateCompanyProfileDto,
71
74
  UpdateSubAdminAccountStatusDto: () => UpdateSubAdminAccountStatusDto,
72
75
  UpdateSubAdminDto: () => UpdateSubAdminDto,
73
76
  User: () => User,
@@ -407,180 +410,18 @@ __decorateClass([
407
410
  (0, import_class_validator14.IsNotEmpty)({ message: "Please enter account status." })
408
411
  ], UpdateSubAdminDto.prototype, "accountStatus", 2);
409
412
 
410
- // src/modules/question/pattern/pattern.ts
411
- var QUESTION_PATTERN = {
412
- fetchQuestions: "fetch.questions"
413
+ // src/modules/user/client-profile/pattern/pattern.ts
414
+ var CLIENT_PROFILE_PATTERN = {
415
+ fetchClientProfile: "fetch.client.profile",
416
+ updateClientProfile: "update.client.profile",
417
+ updateClientLogo: "update.client.logo"
413
418
  };
414
419
 
415
- // src/modules/question/dto/create-question.dto.ts
420
+ // src/modules/user/client-profile/dto/update-client-profile.dto.ts
416
421
  var import_class_validator15 = require("class-validator");
417
- var CreateQuestionDto = class {
418
- };
419
- __decorateClass([
420
- (0, import_class_validator15.IsNotEmpty)({ message: "Please enter unique id." })
421
- ], CreateQuestionDto.prototype, "questionId", 2);
422
- __decorateClass([
423
- (0, import_class_validator15.IsNotEmpty)({ message: "Please enter question." })
424
- ], CreateQuestionDto.prototype, "question", 2);
425
- __decorateClass([
426
- (0, import_class_validator15.IsNotEmpty)({ message: "Please enter for whom the question is." })
427
- ], CreateQuestionDto.prototype, "questionFor", 2);
428
- __decorateClass([
429
- (0, import_class_validator15.IsNotEmpty)({ message: "Please enter options." })
430
- ], CreateQuestionDto.prototype, "options", 2);
431
- __decorateClass([
432
- (0, import_class_validator15.IsOptional)(),
433
- (0, import_class_validator15.IsBoolean)({ message: "Whether the question status active" })
434
- ], CreateQuestionDto.prototype, "isActive", 2);
435
-
436
- // src/modules/job/pattern/pattern.ts
437
- var JOB_ROLE_PATTERN = {
438
- fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
439
- };
440
-
441
- // src/adapters/tcp/user.tcp.adapter.ts
442
- var import_dotenv = require("dotenv");
443
- var import_microservices = require("@nestjs/microservices");
444
- (0, import_dotenv.config)();
445
- var UserTCPAdapter = () => {
446
- return {
447
- name: "USER_MICROSERVICE",
448
- transport: import_microservices.Transport.TCP,
449
- options: {
450
- host: process.env.USER_MICROSERVICE_TCP_HOST || "localhost",
451
- port: parseInt(process.env.USER_MICROSERVICE_TCP_PORT || "4001", 10)
452
- }
453
- };
454
- };
455
-
456
- // src/adapters/tcp/job.tcp.adapter.ts
457
- var import_dotenv2 = require("dotenv");
458
- var import_microservices2 = require("@nestjs/microservices");
459
- (0, import_dotenv2.config)();
460
- var JobTCPAdapter = () => {
461
- return {
462
- name: "JOB_MICROSERVICE",
463
- transport: import_microservices2.Transport.TCP,
464
- options: {
465
- host: process.env.JOB_MICROSERVICE_TCP_HOST || "localhost",
466
- port: parseInt(process.env.JOB_MICROSERVICE_TCP_PORT || "4002", 10)
467
- }
468
- };
469
- };
470
422
 
471
- // src/adapters/rmq/user.rmq.adapter.ts
472
- var import_dotenv3 = require("dotenv");
473
- var import_microservices3 = require("@nestjs/microservices");
474
- (0, import_dotenv3.config)();
475
- var UserRMQAdapter = (mode = "microservice") => {
476
- const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
477
- "amqp://localhost:5672"
478
- ];
479
- const queue = process.env.USER_MICROSERVICE_RMQ_QUEUE || "user_queue";
480
- const prefetchCount = parseInt(
481
- process.env.USER_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
482
- );
483
- const heartbeat = parseInt(
484
- process.env.USER_MICROSERVICE_RMQ_HEARTBEAT || "60"
485
- );
486
- const deadLetterExchange = process.env.USER_MICROSERVICE_RMQ_DLX || "user_dlx";
487
- const deadLetterQueue = process.env.USER_MICROSERVICE_RMQ_DLQ || "user_dlq";
488
- const messageTtl = parseInt(
489
- process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
490
- );
491
- const config5 = {
492
- name: "USER_MICROSERVICE",
493
- transport: import_microservices3.Transport.RMQ,
494
- options: {
495
- urls,
496
- queue,
497
- prefetchCount,
498
- heartbeat,
499
- queueOptions: {
500
- durable: true,
501
- arguments: {
502
- "x-dead-letter-exchange": deadLetterExchange,
503
- "x-dead-letter-routing-key": deadLetterQueue,
504
- "x-message-ttl": messageTtl
505
- }
506
- },
507
- connectionOptions: {
508
- heartbeat,
509
- retry: true,
510
- retryAttempts: 5,
511
- retryDelay: 3e3,
512
- timeout: 1e4,
513
- poolSize: parseInt(process.env.USER_MICROSERVICE_RMQ_POOL_SIZE || "5"),
514
- ...process.env.USER_MICROSERVICE_RMQ_USE_SSL === "true" && {
515
- ssl: {
516
- rejectUnauthorized: false
517
- }
518
- }
519
- }
520
- }
521
- };
522
- if (mode === "microservice") {
523
- config5["options"]["noAck"] = false;
524
- }
525
- return config5;
526
- };
527
-
528
- // src/adapters/rmq/job.rmq.adapter.ts
529
- var import_dotenv4 = require("dotenv");
530
- var import_microservices4 = require("@nestjs/microservices");
531
- (0, import_dotenv4.config)();
532
- var JobRMQAdapter = (mode = "microservice") => {
533
- const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
534
- "amqp://localhost:5672"
535
- ];
536
- const queue = process.env.JOB_MICROSERVICE_RMQ_QUEUE || "job_queue";
537
- const prefetchCount = parseInt(
538
- process.env.JOB_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
539
- );
540
- const heartbeat = parseInt(
541
- process.env.JOB_MICROSERVICE_RMQ_HEARTBEAT || "60"
542
- );
543
- const deadLetterExchange = process.env.JOB_MICROSERVICE_RMQ_DLX || "job_dlx";
544
- const deadLetterQueue = process.env.JOB_MICROSERVICE_RMQ_DLQ || "job_dlq";
545
- const messageTtl = parseInt(
546
- process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
547
- );
548
- const config5 = {
549
- name: "JOB_MICROSERVICE",
550
- transport: import_microservices4.Transport.RMQ,
551
- options: {
552
- urls,
553
- queue,
554
- prefetchCount,
555
- heartbeat,
556
- queueOptions: {
557
- durable: true,
558
- arguments: {
559
- "x-dead-letter-exchange": deadLetterExchange,
560
- "x-dead-letter-routing-key": deadLetterQueue,
561
- "x-message-ttl": messageTtl
562
- }
563
- },
564
- connectionOptions: {
565
- heartbeat,
566
- retry: true,
567
- retryAttempts: 5,
568
- retryDelay: 3e3,
569
- timeout: 1e4,
570
- poolSize: parseInt(process.env.JOB_MICROSERVICE_RMQ_POOL_SIZE || "5"),
571
- ...process.env.JOB_MICROSERVICE_RMQ_USE_SSL === "true" && {
572
- ssl: {
573
- rejectUnauthorized: false
574
- }
575
- }
576
- }
577
- }
578
- };
579
- if (mode === "microservice") {
580
- config5["options"]["noAck"] = false;
581
- }
582
- return config5;
583
- };
423
+ // src/entities/company-profile.entity.ts
424
+ var import_typeorm8 = require("typeorm");
584
425
 
585
426
  // src/entities/base.entity.ts
586
427
  var import_typeorm = require("typeorm");
@@ -620,7 +461,7 @@ __decorateClass([
620
461
  ], BaseEntity.prototype, "deletedAt", 2);
621
462
 
622
463
  // src/entities/user.entity.ts
623
- var import_typeorm8 = require("typeorm");
464
+ var import_typeorm7 = require("typeorm");
624
465
 
625
466
  // src/entities/refresh-token.entity.ts
626
467
  var import_typeorm2 = require("typeorm");
@@ -828,77 +669,8 @@ FreelancerProfile = __decorateClass([
828
669
  (0, import_typeorm5.Entity)("freelancer_profiles")
829
670
  ], FreelancerProfile);
830
671
 
831
- // src/entities/company-profile.entity.ts
832
- var import_typeorm6 = require("typeorm");
833
- var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
834
- KindOfHire2["FULLTIME"] = "FULLTIME";
835
- KindOfHire2["SHORTTIME"] = "SHORTTIME";
836
- KindOfHire2["BOTH"] = "BOTH";
837
- return KindOfHire2;
838
- })(KindOfHire || {});
839
- var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
840
- ModeOfHire2["ONSITE"] = "ONSITE";
841
- ModeOfHire2["REMOTE"] = "REMOTE";
842
- ModeOfHire2["BOTH"] = "BOTH";
843
- return ModeOfHire2;
844
- })(ModeOfHire || {});
845
- var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
846
- FromUsOn2["LINKEDIN"] = "LINKEDIN";
847
- FromUsOn2["GOOGLE"] = "GOOGLE";
848
- FromUsOn2["REFERRAL"] = "REFERRAL";
849
- FromUsOn2["OTHER"] = "OTHER";
850
- return FromUsOn2;
851
- })(FromUsOn || {});
852
- var CompanyProfile = class extends BaseEntity {
853
- };
854
- // individual index to find company profile by user
855
- __decorateClass([
856
- (0, import_typeorm6.Column)({ name: "user_id", type: "integer", nullable: true }),
857
- (0, import_typeorm6.Index)()
858
- ], CompanyProfile.prototype, "userId", 2);
859
- __decorateClass([
860
- (0, import_typeorm6.ManyToOne)(() => User, (user) => user.otps),
861
- (0, import_typeorm6.JoinColumn)({ name: "user_id" })
862
- ], CompanyProfile.prototype, "user", 2);
863
- __decorateClass([
864
- (0, import_typeorm6.Column)({ name: "company_name", type: "varchar", nullable: true })
865
- ], CompanyProfile.prototype, "companyName", 2);
866
- __decorateClass([
867
- (0, import_typeorm6.Column)({ name: "skills", type: "text", nullable: true })
868
- ], CompanyProfile.prototype, "skills", 2);
869
- __decorateClass([
870
- (0, import_typeorm6.Column)({ name: "required_freelancer", type: "varchar", nullable: true })
871
- ], CompanyProfile.prototype, "requiredFreelancer", 2);
872
- __decorateClass([
873
- (0, import_typeorm6.Column)({
874
- name: "kind_of_hiring",
875
- type: "enum",
876
- enum: KindOfHire,
877
- nullable: true
878
- })
879
- ], CompanyProfile.prototype, "kindOfHiring", 2);
880
- __decorateClass([
881
- (0, import_typeorm6.Column)({
882
- name: "mode_of_hire",
883
- type: "enum",
884
- enum: ModeOfHire,
885
- nullable: true
886
- })
887
- ], CompanyProfile.prototype, "modeOfHire", 2);
888
- __decorateClass([
889
- (0, import_typeorm6.Column)({
890
- name: "found_us_on",
891
- type: "enum",
892
- enum: FromUsOn,
893
- nullable: true
894
- })
895
- ], CompanyProfile.prototype, "foundUsOn", 2);
896
- CompanyProfile = __decorateClass([
897
- (0, import_typeorm6.Entity)("company_profiles")
898
- ], CompanyProfile);
899
-
900
672
  // src/entities/job-entity.ts
901
- var import_typeorm7 = require("typeorm");
673
+ var import_typeorm6 = require("typeorm");
902
674
  var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
903
675
  JobLocation2["ONSITE"] = "ONSITE";
904
676
  JobLocation2["REMOTE"] = "REMOTE";
@@ -922,28 +694,28 @@ var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
922
694
  var Job = class extends BaseEntity {
923
695
  };
924
696
  __decorateClass([
925
- (0, import_typeorm7.Column)({ name: "job_id", type: "varchar", unique: true, nullable: true })
697
+ (0, import_typeorm6.Column)({ name: "job_id", type: "varchar", unique: true, nullable: true })
926
698
  ], Job.prototype, "jobId", 2);
927
699
  // individual index to find jobs by user
928
700
  __decorateClass([
929
- (0, import_typeorm7.Column)({ name: "user_id", type: "integer", nullable: true }),
930
- (0, import_typeorm7.Index)()
701
+ (0, import_typeorm6.Column)({ name: "user_id", type: "integer", nullable: true }),
702
+ (0, import_typeorm6.Index)()
931
703
  ], Job.prototype, "userId", 2);
932
704
  __decorateClass([
933
- (0, import_typeorm7.ManyToOne)(() => User, (user) => user.jobs),
934
- (0, import_typeorm7.JoinColumn)({ name: "user_id" })
705
+ (0, import_typeorm6.ManyToOne)(() => User, (user) => user.jobs),
706
+ (0, import_typeorm6.JoinColumn)({ name: "user_id" })
935
707
  ], Job.prototype, "user", 2);
936
708
  __decorateClass([
937
- (0, import_typeorm7.Column)({ name: "job_role", type: "varchar", nullable: true })
709
+ (0, import_typeorm6.Column)({ name: "job_role", type: "varchar", nullable: true })
938
710
  ], Job.prototype, "jobRole", 2);
939
711
  __decorateClass([
940
- (0, import_typeorm7.Column)({ name: "note", type: "varchar", nullable: true })
712
+ (0, import_typeorm6.Column)({ name: "note", type: "varchar", nullable: true })
941
713
  ], Job.prototype, "note", 2);
942
714
  __decorateClass([
943
- (0, import_typeorm7.Column)({ name: "openings", type: "integer", default: 0 })
715
+ (0, import_typeorm6.Column)({ name: "openings", type: "integer", default: 0 })
944
716
  ], Job.prototype, "openings", 2);
945
717
  __decorateClass([
946
- (0, import_typeorm7.Column)({
718
+ (0, import_typeorm6.Column)({
947
719
  name: "location",
948
720
  type: "enum",
949
721
  enum: JobLocation,
@@ -951,7 +723,7 @@ __decorateClass([
951
723
  })
952
724
  ], Job.prototype, "location", 2);
953
725
  __decorateClass([
954
- (0, import_typeorm7.Column)({
726
+ (0, import_typeorm6.Column)({
955
727
  name: "type_of_employment",
956
728
  type: "enum",
957
729
  enum: TypeOfEmployment,
@@ -959,13 +731,13 @@ __decorateClass([
959
731
  })
960
732
  ], Job.prototype, "typeOfEmployment", 2);
961
733
  __decorateClass([
962
- (0, import_typeorm7.Column)({ name: "additional_comment", type: "varchar", nullable: true })
734
+ (0, import_typeorm6.Column)({ name: "additional_comment", type: "varchar", nullable: true })
963
735
  ], Job.prototype, "additionalComment", 2);
964
736
  __decorateClass([
965
- (0, import_typeorm7.Column)({ name: "description", type: "varchar", nullable: true })
737
+ (0, import_typeorm6.Column)({ name: "description", type: "varchar", nullable: true })
966
738
  ], Job.prototype, "description", 2);
967
739
  __decorateClass([
968
- (0, import_typeorm7.Column)({
740
+ (0, import_typeorm6.Column)({
969
741
  name: "status",
970
742
  type: "enum",
971
743
  enum: JobStatus,
@@ -973,7 +745,7 @@ __decorateClass([
973
745
  })
974
746
  ], Job.prototype, "status", 2);
975
747
  Job = __decorateClass([
976
- (0, import_typeorm7.Entity)("jobs")
748
+ (0, import_typeorm6.Entity)("jobs")
977
749
  ], Job);
978
750
 
979
751
  // src/entities/user.entity.ts
@@ -994,40 +766,40 @@ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
994
766
  var User = class extends BaseEntity {
995
767
  };
996
768
  __decorateClass([
997
- (0, import_typeorm8.Column)({ name: "unique_id", type: "varchar", unique: true })
769
+ (0, import_typeorm7.Column)({ name: "unique_id", type: "varchar", unique: true })
998
770
  ], User.prototype, "uniqueId", 2);
999
771
  __decorateClass([
1000
- (0, import_typeorm8.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
772
+ (0, import_typeorm7.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
1001
773
  ], User.prototype, "username", 2);
1002
774
  __decorateClass([
1003
- (0, import_typeorm8.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
775
+ (0, import_typeorm7.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
1004
776
  ], User.prototype, "firstName", 2);
1005
777
  __decorateClass([
1006
- (0, import_typeorm8.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
778
+ (0, import_typeorm7.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
1007
779
  ], User.prototype, "lastName", 2);
1008
780
  __decorateClass([
1009
- (0, import_typeorm8.Column)({ name: "date_of_birth", type: "date", nullable: true })
781
+ (0, import_typeorm7.Column)({ name: "date_of_birth", type: "date", nullable: true })
1010
782
  ], User.prototype, "dateOfBirth", 2);
1011
783
  __decorateClass([
1012
- (0, import_typeorm8.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
784
+ (0, import_typeorm7.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
1013
785
  ], User.prototype, "gender", 2);
1014
786
  __decorateClass([
1015
- (0, import_typeorm8.Column)({ name: "profile_picture_url", type: "text", nullable: true })
787
+ (0, import_typeorm7.Column)({ name: "profile_picture_url", type: "text", nullable: true })
1016
788
  ], User.prototype, "profilePictureUrl", 2);
1017
789
  __decorateClass([
1018
- (0, import_typeorm8.Column)({ name: "email", type: "varchar", unique: true })
790
+ (0, import_typeorm7.Column)({ name: "email", type: "varchar", unique: true })
1019
791
  ], User.prototype, "email", 2);
1020
792
  __decorateClass([
1021
- (0, import_typeorm8.Column)({ name: "mobile_code", type: "varchar", nullable: true })
793
+ (0, import_typeorm7.Column)({ name: "mobile_code", type: "varchar", nullable: true })
1022
794
  ], User.prototype, "mobileCode", 2);
1023
795
  __decorateClass([
1024
- (0, import_typeorm8.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
796
+ (0, import_typeorm7.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1025
797
  ], User.prototype, "mobile", 2);
1026
798
  __decorateClass([
1027
- (0, import_typeorm8.Column)({ name: "password", type: "varchar" })
799
+ (0, import_typeorm7.Column)({ name: "password", type: "varchar" })
1028
800
  ], User.prototype, "password", 2);
1029
801
  __decorateClass([
1030
- (0, import_typeorm8.Column)({
802
+ (0, import_typeorm7.Column)({
1031
803
  name: "account_type",
1032
804
  type: "enum",
1033
805
  enum: AccountType,
@@ -1035,7 +807,7 @@ __decorateClass([
1035
807
  })
1036
808
  ], User.prototype, "accountType", 2);
1037
809
  __decorateClass([
1038
- (0, import_typeorm8.Column)({
810
+ (0, import_typeorm7.Column)({
1039
811
  name: "account_status",
1040
812
  type: "enum",
1041
813
  enum: AccountStatus,
@@ -1043,46 +815,358 @@ __decorateClass([
1043
815
  })
1044
816
  ], User.prototype, "accountStatus", 2);
1045
817
  __decorateClass([
1046
- (0, import_typeorm8.Column)({ name: "is_email_verified", type: "boolean", default: false })
818
+ (0, import_typeorm7.Column)({ name: "is_email_verified", type: "boolean", default: false })
1047
819
  ], User.prototype, "isEmailVerified", 2);
1048
820
  __decorateClass([
1049
- (0, import_typeorm8.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
821
+ (0, import_typeorm7.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
1050
822
  ], User.prototype, "isMobileVerified", 2);
1051
823
  __decorateClass([
1052
- (0, import_typeorm8.Column)({
824
+ (0, import_typeorm7.Column)({
1053
825
  name: "last_login_at",
1054
826
  type: "timestamp with time zone",
1055
827
  nullable: true
1056
828
  })
1057
829
  ], User.prototype, "lastLoginAt", 2);
1058
830
  __decorateClass([
1059
- (0, import_typeorm8.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
831
+ (0, import_typeorm7.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
1060
832
  ], User.prototype, "lastLoginIp", 2);
1061
833
  __decorateClass([
1062
- (0, import_typeorm8.OneToMany)(() => RefreshToken, (token) => token.user)
834
+ (0, import_typeorm7.OneToMany)(() => RefreshToken, (token) => token.user)
1063
835
  ], User.prototype, "refreshTokens", 2);
1064
836
  __decorateClass([
1065
- (0, import_typeorm8.OneToMany)(() => Otp, (otp) => otp.user)
837
+ (0, import_typeorm7.OneToMany)(() => Otp, (otp) => otp.user)
1066
838
  ], User.prototype, "otps", 2);
1067
839
  __decorateClass([
1068
- (0, import_typeorm8.OneToMany)(() => ResumeParserLog, (resumeParser) => resumeParser.user)
840
+ (0, import_typeorm7.OneToMany)(() => ResumeParserLog, (resumeParser) => resumeParser.user)
1069
841
  ], User.prototype, "resumeParserLogs", 2);
1070
842
  __decorateClass([
1071
- (0, import_typeorm8.OneToOne)(
843
+ (0, import_typeorm7.OneToOne)(
1072
844
  () => FreelancerProfile,
1073
845
  (freelancerProfile) => freelancerProfile.user
1074
846
  )
1075
847
  ], User.prototype, "freelancerProfile", 2);
1076
848
  __decorateClass([
1077
- (0, import_typeorm8.OneToOne)(() => CompanyProfile, (companyProfile) => companyProfile.user)
849
+ (0, import_typeorm7.OneToOne)(() => CompanyProfile, (companyProfile) => companyProfile.user)
1078
850
  ], User.prototype, "companyProfile", 2);
1079
851
  __decorateClass([
1080
- (0, import_typeorm8.OneToMany)(() => Job, (job) => job.user)
852
+ (0, import_typeorm7.OneToMany)(() => Job, (job) => job.user)
1081
853
  ], User.prototype, "jobs", 2);
1082
854
  User = __decorateClass([
1083
- (0, import_typeorm8.Entity)("users")
855
+ (0, import_typeorm7.Entity)("users")
1084
856
  ], User);
1085
857
 
858
+ // src/entities/company-profile.entity.ts
859
+ var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
860
+ KindOfHire2["FULLTIME"] = "FULLTIME";
861
+ KindOfHire2["SHORTTIME"] = "SHORTTIME";
862
+ KindOfHire2["BOTH"] = "BOTH";
863
+ return KindOfHire2;
864
+ })(KindOfHire || {});
865
+ var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
866
+ ModeOfHire2["ONSITE"] = "ONSITE";
867
+ ModeOfHire2["REMOTE"] = "REMOTE";
868
+ ModeOfHire2["BOTH"] = "BOTH";
869
+ return ModeOfHire2;
870
+ })(ModeOfHire || {});
871
+ var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
872
+ FromUsOn2["LINKEDIN"] = "LINKEDIN";
873
+ FromUsOn2["GOOGLE"] = "GOOGLE";
874
+ FromUsOn2["REFERRAL"] = "REFERRAL";
875
+ FromUsOn2["OTHER"] = "OTHER";
876
+ return FromUsOn2;
877
+ })(FromUsOn || {});
878
+ var CompanyProfile = class extends BaseEntity {
879
+ };
880
+ // individual index to find company profile by user
881
+ __decorateClass([
882
+ (0, import_typeorm8.Column)({ name: "user_id", type: "integer", nullable: true }),
883
+ (0, import_typeorm8.Index)()
884
+ ], CompanyProfile.prototype, "userId", 2);
885
+ __decorateClass([
886
+ (0, import_typeorm8.ManyToOne)(() => User, (user) => user.otps),
887
+ (0, import_typeorm8.JoinColumn)({ name: "user_id" })
888
+ ], CompanyProfile.prototype, "user", 2);
889
+ __decorateClass([
890
+ (0, import_typeorm8.Column)({ name: "company_name", type: "varchar", nullable: true })
891
+ ], CompanyProfile.prototype, "companyName", 2);
892
+ __decorateClass([
893
+ (0, import_typeorm8.Column)({ name: "bio", type: "varchar", nullable: true })
894
+ ], CompanyProfile.prototype, "bio", 2);
895
+ __decorateClass([
896
+ (0, import_typeorm8.Column)({ name: "website", type: "varchar" })
897
+ ], CompanyProfile.prototype, "webSite", 2);
898
+ __decorateClass([
899
+ (0, import_typeorm8.Column)({ name: "about_company", type: "varchar" })
900
+ ], CompanyProfile.prototype, "aboutCompany", 2);
901
+ __decorateClass([
902
+ (0, import_typeorm8.Column)({ name: "service_agreement", type: "boolean", default: false })
903
+ ], CompanyProfile.prototype, "serviceAgreement", 2);
904
+ __decorateClass([
905
+ (0, import_typeorm8.Column)({ name: "skills", type: "text", nullable: true })
906
+ ], CompanyProfile.prototype, "skills", 2);
907
+ __decorateClass([
908
+ (0, import_typeorm8.Column)({ name: "required_freelancer", type: "varchar", nullable: true })
909
+ ], CompanyProfile.prototype, "requiredFreelancer", 2);
910
+ __decorateClass([
911
+ (0, import_typeorm8.Column)({
912
+ name: "kind_of_hiring",
913
+ type: "enum",
914
+ enum: KindOfHire,
915
+ nullable: true
916
+ })
917
+ ], CompanyProfile.prototype, "kindOfHiring", 2);
918
+ __decorateClass([
919
+ (0, import_typeorm8.Column)({
920
+ name: "mode_of_hire",
921
+ type: "enum",
922
+ enum: ModeOfHire,
923
+ nullable: true
924
+ })
925
+ ], CompanyProfile.prototype, "modeOfHire", 2);
926
+ __decorateClass([
927
+ (0, import_typeorm8.Column)({
928
+ name: "found_us_on",
929
+ type: "enum",
930
+ enum: FromUsOn,
931
+ nullable: true
932
+ })
933
+ ], CompanyProfile.prototype, "foundUsOn", 2);
934
+ CompanyProfile = __decorateClass([
935
+ (0, import_typeorm8.Entity)("company_profiles")
936
+ ], CompanyProfile);
937
+
938
+ // src/modules/user/client-profile/dto/update-client-profile.dto.ts
939
+ var UpdateCompanyProfileDto = class {
940
+ };
941
+ __decorateClass([
942
+ (0, import_class_validator15.IsNumber)({}, { message: "User ID must be a number." })
943
+ ], UpdateCompanyProfileDto.prototype, "userId", 2);
944
+ __decorateClass([
945
+ (0, import_class_validator15.IsString)({ message: "Company name must be a string." })
946
+ ], UpdateCompanyProfileDto.prototype, "companyName", 2);
947
+ __decorateClass([
948
+ (0, import_class_validator15.IsOptional)(),
949
+ (0, import_class_validator15.IsString)({ message: "Bio must be a string." })
950
+ ], UpdateCompanyProfileDto.prototype, "bio", 2);
951
+ __decorateClass([
952
+ (0, import_class_validator15.IsOptional)(),
953
+ (0, import_class_validator15.IsNumber)({}, { message: "Rating must be a numeric value." })
954
+ ], UpdateCompanyProfileDto.prototype, "rating", 2);
955
+ __decorateClass([
956
+ (0, import_class_validator15.IsString)({ message: "Agreement must be a string (e.g., a file URL or path)." })
957
+ ], UpdateCompanyProfileDto.prototype, "agreement", 2);
958
+ __decorateClass([
959
+ (0, import_class_validator15.IsOptional)(),
960
+ (0, import_class_validator15.IsArray)({ message: "Skills must be an array of strings." }),
961
+ (0, import_class_validator15.IsString)({ each: true, message: "Each skill must be a string." })
962
+ ], UpdateCompanyProfileDto.prototype, "skills", 2);
963
+ __decorateClass([
964
+ (0, import_class_validator15.IsOptional)(),
965
+ (0, import_class_validator15.IsString)({ message: "Required freelancer must be a string." })
966
+ ], UpdateCompanyProfileDto.prototype, "requiredFreelancer", 2);
967
+ __decorateClass([
968
+ (0, import_class_validator15.IsOptional)(),
969
+ (0, import_class_validator15.IsEnum)(KindOfHire, {
970
+ message: `Kind of hiring must be one of: ${Object.values(KindOfHire).join(", ")}`
971
+ })
972
+ ], UpdateCompanyProfileDto.prototype, "kindOfHiring", 2);
973
+ __decorateClass([
974
+ (0, import_class_validator15.IsOptional)(),
975
+ (0, import_class_validator15.IsEnum)(ModeOfHire, {
976
+ message: `Mode of hire must be one of: ${Object.values(ModeOfHire).join(", ")}`
977
+ })
978
+ ], UpdateCompanyProfileDto.prototype, "modeOfHire", 2);
979
+ __decorateClass([
980
+ (0, import_class_validator15.IsOptional)(),
981
+ (0, import_class_validator15.IsEnum)(FromUsOn, {
982
+ message: `Found us on must be one of: ${Object.values(FromUsOn).join(", ")}`
983
+ })
984
+ ], UpdateCompanyProfileDto.prototype, "foundUsOn", 2);
985
+
986
+ // src/modules/user/client-profile/dto/update-client-logo.dto.ts
987
+ var import_class_validator16 = require("class-validator");
988
+ var UpdateCompanyLogoDto = class {
989
+ };
990
+ __decorateClass([
991
+ (0, import_class_validator16.IsNotEmpty)({ message: "Please enter uuid." }),
992
+ (0, import_class_validator16.IsUUID)()
993
+ ], UpdateCompanyLogoDto.prototype, "uuid", 2);
994
+
995
+ // src/modules/question/pattern/pattern.ts
996
+ var QUESTION_PATTERN = {
997
+ fetchQuestions: "fetch.questions"
998
+ };
999
+
1000
+ // src/modules/question/dto/create-question.dto.ts
1001
+ var import_class_validator17 = require("class-validator");
1002
+ var CreateQuestionDto = class {
1003
+ };
1004
+ __decorateClass([
1005
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter unique id." })
1006
+ ], CreateQuestionDto.prototype, "questionId", 2);
1007
+ __decorateClass([
1008
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter question." })
1009
+ ], CreateQuestionDto.prototype, "question", 2);
1010
+ __decorateClass([
1011
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter for whom the question is." })
1012
+ ], CreateQuestionDto.prototype, "questionFor", 2);
1013
+ __decorateClass([
1014
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter options." })
1015
+ ], CreateQuestionDto.prototype, "options", 2);
1016
+ __decorateClass([
1017
+ (0, import_class_validator17.IsOptional)(),
1018
+ (0, import_class_validator17.IsBoolean)({ message: "Whether the question status active" })
1019
+ ], CreateQuestionDto.prototype, "isActive", 2);
1020
+
1021
+ // src/modules/job/pattern/pattern.ts
1022
+ var JOB_ROLE_PATTERN = {
1023
+ fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
1024
+ };
1025
+
1026
+ // src/adapters/tcp/user.tcp.adapter.ts
1027
+ var import_dotenv = require("dotenv");
1028
+ var import_microservices = require("@nestjs/microservices");
1029
+ (0, import_dotenv.config)();
1030
+ var UserTCPAdapter = () => {
1031
+ return {
1032
+ name: "USER_MICROSERVICE",
1033
+ transport: import_microservices.Transport.TCP,
1034
+ options: {
1035
+ host: process.env.USER_MICROSERVICE_TCP_HOST || "localhost",
1036
+ port: parseInt(process.env.USER_MICROSERVICE_TCP_PORT || "4001", 10)
1037
+ }
1038
+ };
1039
+ };
1040
+
1041
+ // src/adapters/tcp/job.tcp.adapter.ts
1042
+ var import_dotenv2 = require("dotenv");
1043
+ var import_microservices2 = require("@nestjs/microservices");
1044
+ (0, import_dotenv2.config)();
1045
+ var JobTCPAdapter = () => {
1046
+ return {
1047
+ name: "JOB_MICROSERVICE",
1048
+ transport: import_microservices2.Transport.TCP,
1049
+ options: {
1050
+ host: process.env.JOB_MICROSERVICE_TCP_HOST || "localhost",
1051
+ port: parseInt(process.env.JOB_MICROSERVICE_TCP_PORT || "4002", 10)
1052
+ }
1053
+ };
1054
+ };
1055
+
1056
+ // src/adapters/rmq/user.rmq.adapter.ts
1057
+ var import_dotenv3 = require("dotenv");
1058
+ var import_microservices3 = require("@nestjs/microservices");
1059
+ (0, import_dotenv3.config)();
1060
+ var UserRMQAdapter = (mode = "microservice") => {
1061
+ const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
1062
+ "amqp://localhost:5672"
1063
+ ];
1064
+ const queue = process.env.USER_MICROSERVICE_RMQ_QUEUE || "user_queue";
1065
+ const prefetchCount = parseInt(
1066
+ process.env.USER_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
1067
+ );
1068
+ const heartbeat = parseInt(
1069
+ process.env.USER_MICROSERVICE_RMQ_HEARTBEAT || "60"
1070
+ );
1071
+ const deadLetterExchange = process.env.USER_MICROSERVICE_RMQ_DLX || "user_dlx";
1072
+ const deadLetterQueue = process.env.USER_MICROSERVICE_RMQ_DLQ || "user_dlq";
1073
+ const messageTtl = parseInt(
1074
+ process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
1075
+ );
1076
+ const config5 = {
1077
+ name: "USER_MICROSERVICE",
1078
+ transport: import_microservices3.Transport.RMQ,
1079
+ options: {
1080
+ urls,
1081
+ queue,
1082
+ prefetchCount,
1083
+ heartbeat,
1084
+ queueOptions: {
1085
+ durable: true,
1086
+ arguments: {
1087
+ "x-dead-letter-exchange": deadLetterExchange,
1088
+ "x-dead-letter-routing-key": deadLetterQueue,
1089
+ "x-message-ttl": messageTtl
1090
+ }
1091
+ },
1092
+ connectionOptions: {
1093
+ heartbeat,
1094
+ retry: true,
1095
+ retryAttempts: 5,
1096
+ retryDelay: 3e3,
1097
+ timeout: 1e4,
1098
+ poolSize: parseInt(process.env.USER_MICROSERVICE_RMQ_POOL_SIZE || "5"),
1099
+ ...process.env.USER_MICROSERVICE_RMQ_USE_SSL === "true" && {
1100
+ ssl: {
1101
+ rejectUnauthorized: false
1102
+ }
1103
+ }
1104
+ }
1105
+ }
1106
+ };
1107
+ if (mode === "microservice") {
1108
+ config5["options"]["noAck"] = false;
1109
+ }
1110
+ return config5;
1111
+ };
1112
+
1113
+ // src/adapters/rmq/job.rmq.adapter.ts
1114
+ var import_dotenv4 = require("dotenv");
1115
+ var import_microservices4 = require("@nestjs/microservices");
1116
+ (0, import_dotenv4.config)();
1117
+ var JobRMQAdapter = (mode = "microservice") => {
1118
+ const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
1119
+ "amqp://localhost:5672"
1120
+ ];
1121
+ const queue = process.env.JOB_MICROSERVICE_RMQ_QUEUE || "job_queue";
1122
+ const prefetchCount = parseInt(
1123
+ process.env.JOB_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
1124
+ );
1125
+ const heartbeat = parseInt(
1126
+ process.env.JOB_MICROSERVICE_RMQ_HEARTBEAT || "60"
1127
+ );
1128
+ const deadLetterExchange = process.env.JOB_MICROSERVICE_RMQ_DLX || "job_dlx";
1129
+ const deadLetterQueue = process.env.JOB_MICROSERVICE_RMQ_DLQ || "job_dlq";
1130
+ const messageTtl = parseInt(
1131
+ process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
1132
+ );
1133
+ const config5 = {
1134
+ name: "JOB_MICROSERVICE",
1135
+ transport: import_microservices4.Transport.RMQ,
1136
+ options: {
1137
+ urls,
1138
+ queue,
1139
+ prefetchCount,
1140
+ heartbeat,
1141
+ queueOptions: {
1142
+ durable: true,
1143
+ arguments: {
1144
+ "x-dead-letter-exchange": deadLetterExchange,
1145
+ "x-dead-letter-routing-key": deadLetterQueue,
1146
+ "x-message-ttl": messageTtl
1147
+ }
1148
+ },
1149
+ connectionOptions: {
1150
+ heartbeat,
1151
+ retry: true,
1152
+ retryAttempts: 5,
1153
+ retryDelay: 3e3,
1154
+ timeout: 1e4,
1155
+ poolSize: parseInt(process.env.JOB_MICROSERVICE_RMQ_POOL_SIZE || "5"),
1156
+ ...process.env.JOB_MICROSERVICE_RMQ_USE_SSL === "true" && {
1157
+ ssl: {
1158
+ rejectUnauthorized: false
1159
+ }
1160
+ }
1161
+ }
1162
+ }
1163
+ };
1164
+ if (mode === "microservice") {
1165
+ config5["options"]["noAck"] = false;
1166
+ }
1167
+ return config5;
1168
+ };
1169
+
1086
1170
  // src/entities/question.entity.ts
1087
1171
  var import_typeorm9 = require("typeorm");
1088
1172
  var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
@@ -1144,6 +1228,7 @@ JobRoles = __decorateClass([
1144
1228
  AccountStatus,
1145
1229
  AccountType,
1146
1230
  BaseEntity,
1231
+ CLIENT_PROFILE_PATTERN,
1147
1232
  ClientCreateAccountDto,
1148
1233
  ClientProfileQuestionDto,
1149
1234
  CompanyProfile,
@@ -1181,6 +1266,8 @@ JobRoles = __decorateClass([
1181
1266
  ResumeParserLog,
1182
1267
  SUBADMIN_PATTERN,
1183
1268
  TypeOfEmployment,
1269
+ UpdateCompanyLogoDto,
1270
+ UpdateCompanyProfileDto,
1184
1271
  UpdateSubAdminAccountStatusDto,
1185
1272
  UpdateSubAdminDto,
1186
1273
  User,