@experts_hub/shared 1.0.68 → 1.0.70

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,
@@ -44,8 +45,11 @@ __export(index_exports, {
44
45
  FreelancerWorkShowcaseDto: () => FreelancerWorkShowcaseDto,
45
46
  FromUsOn: () => FromUsOn,
46
47
  JOB_ROLE_PATTERN: () => JOB_ROLE_PATTERN,
48
+ Job: () => Job,
49
+ JobLocation: () => JobLocation,
47
50
  JobRMQAdapter: () => JobRMQAdapter,
48
51
  JobRoles: () => JobRoles,
52
+ JobStatus: () => JobStatus,
49
53
  JobTCPAdapter: () => JobTCPAdapter,
50
54
  KindOfHire: () => KindOfHire,
51
55
  LoginDto: () => LoginDto,
@@ -64,6 +68,9 @@ __export(index_exports, {
64
68
  RefreshToken: () => RefreshToken,
65
69
  ResumeParserLog: () => ResumeParserLog,
66
70
  SUBADMIN_PATTERN: () => SUBADMIN_PATTERN,
71
+ TypeOfEmployment: () => TypeOfEmployment,
72
+ UpdateCompanyLogoDto: () => UpdateCompanyLogoDto,
73
+ UpdateCompanyProfileDto: () => UpdateCompanyProfileDto,
67
74
  UpdateSubAdminAccountStatusDto: () => UpdateSubAdminAccountStatusDto,
68
75
  UpdateSubAdminDto: () => UpdateSubAdminDto,
69
76
  User: () => User,
@@ -403,180 +410,18 @@ __decorateClass([
403
410
  (0, import_class_validator14.IsNotEmpty)({ message: "Please enter account status." })
404
411
  ], UpdateSubAdminDto.prototype, "accountStatus", 2);
405
412
 
406
- // src/modules/question/pattern/pattern.ts
407
- var QUESTION_PATTERN = {
408
- 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"
409
418
  };
410
419
 
411
- // src/modules/question/dto/create-question.dto.ts
420
+ // src/modules/user/client-profile/dto/update-client-profile.dto.ts
412
421
  var import_class_validator15 = require("class-validator");
413
- var CreateQuestionDto = class {
414
- };
415
- __decorateClass([
416
- (0, import_class_validator15.IsNotEmpty)({ message: "Please enter unique id." })
417
- ], CreateQuestionDto.prototype, "questionId", 2);
418
- __decorateClass([
419
- (0, import_class_validator15.IsNotEmpty)({ message: "Please enter question." })
420
- ], CreateQuestionDto.prototype, "question", 2);
421
- __decorateClass([
422
- (0, import_class_validator15.IsNotEmpty)({ message: "Please enter for whom the question is." })
423
- ], CreateQuestionDto.prototype, "questionFor", 2);
424
- __decorateClass([
425
- (0, import_class_validator15.IsNotEmpty)({ message: "Please enter options." })
426
- ], CreateQuestionDto.prototype, "options", 2);
427
- __decorateClass([
428
- (0, import_class_validator15.IsOptional)(),
429
- (0, import_class_validator15.IsBoolean)({ message: "Whether the question status active" })
430
- ], CreateQuestionDto.prototype, "isActive", 2);
431
-
432
- // src/modules/job/pattern/pattern.ts
433
- var JOB_ROLE_PATTERN = {
434
- fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
435
- };
436
-
437
- // src/adapters/tcp/user.tcp.adapter.ts
438
- var import_dotenv = require("dotenv");
439
- var import_microservices = require("@nestjs/microservices");
440
- (0, import_dotenv.config)();
441
- var UserTCPAdapter = () => {
442
- return {
443
- name: "USER_MICROSERVICE",
444
- transport: import_microservices.Transport.TCP,
445
- options: {
446
- host: process.env.USER_MICROSERVICE_TCP_HOST || "localhost",
447
- port: parseInt(process.env.USER_MICROSERVICE_TCP_PORT || "4001", 10)
448
- }
449
- };
450
- };
451
-
452
- // src/adapters/tcp/job.tcp.adapter.ts
453
- var import_dotenv2 = require("dotenv");
454
- var import_microservices2 = require("@nestjs/microservices");
455
- (0, import_dotenv2.config)();
456
- var JobTCPAdapter = () => {
457
- return {
458
- name: "JOB_MICROSERVICE",
459
- transport: import_microservices2.Transport.TCP,
460
- options: {
461
- host: process.env.JOB_MICROSERVICE_TCP_HOST || "localhost",
462
- port: parseInt(process.env.JOB_MICROSERVICE_TCP_PORT || "4002", 10)
463
- }
464
- };
465
- };
466
422
 
467
- // src/adapters/rmq/user.rmq.adapter.ts
468
- var import_dotenv3 = require("dotenv");
469
- var import_microservices3 = require("@nestjs/microservices");
470
- (0, import_dotenv3.config)();
471
- var UserRMQAdapter = (mode = "microservice") => {
472
- const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
473
- "amqp://localhost:5672"
474
- ];
475
- const queue = process.env.USER_MICROSERVICE_RMQ_QUEUE || "user_queue";
476
- const prefetchCount = parseInt(
477
- process.env.USER_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
478
- );
479
- const heartbeat = parseInt(
480
- process.env.USER_MICROSERVICE_RMQ_HEARTBEAT || "60"
481
- );
482
- const deadLetterExchange = process.env.USER_MICROSERVICE_RMQ_DLX || "user_dlx";
483
- const deadLetterQueue = process.env.USER_MICROSERVICE_RMQ_DLQ || "user_dlq";
484
- const messageTtl = parseInt(
485
- process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
486
- );
487
- const config5 = {
488
- name: "USER_MICROSERVICE",
489
- transport: import_microservices3.Transport.RMQ,
490
- options: {
491
- urls,
492
- queue,
493
- prefetchCount,
494
- heartbeat,
495
- queueOptions: {
496
- durable: true,
497
- arguments: {
498
- "x-dead-letter-exchange": deadLetterExchange,
499
- "x-dead-letter-routing-key": deadLetterQueue,
500
- "x-message-ttl": messageTtl
501
- }
502
- },
503
- connectionOptions: {
504
- heartbeat,
505
- retry: true,
506
- retryAttempts: 5,
507
- retryDelay: 3e3,
508
- timeout: 1e4,
509
- poolSize: parseInt(process.env.USER_MICROSERVICE_RMQ_POOL_SIZE || "5"),
510
- ...process.env.USER_MICROSERVICE_RMQ_USE_SSL === "true" && {
511
- ssl: {
512
- rejectUnauthorized: false
513
- }
514
- }
515
- }
516
- }
517
- };
518
- if (mode === "microservice") {
519
- config5["options"]["noAck"] = false;
520
- }
521
- return config5;
522
- };
523
-
524
- // src/adapters/rmq/job.rmq.adapter.ts
525
- var import_dotenv4 = require("dotenv");
526
- var import_microservices4 = require("@nestjs/microservices");
527
- (0, import_dotenv4.config)();
528
- var JobRMQAdapter = (mode = "microservice") => {
529
- const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
530
- "amqp://localhost:5672"
531
- ];
532
- const queue = process.env.JOB_MICROSERVICE_RMQ_QUEUE || "job_queue";
533
- const prefetchCount = parseInt(
534
- process.env.JOB_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
535
- );
536
- const heartbeat = parseInt(
537
- process.env.JOB_MICROSERVICE_RMQ_HEARTBEAT || "60"
538
- );
539
- const deadLetterExchange = process.env.JOB_MICROSERVICE_RMQ_DLX || "job_dlx";
540
- const deadLetterQueue = process.env.JOB_MICROSERVICE_RMQ_DLQ || "job_dlq";
541
- const messageTtl = parseInt(
542
- process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
543
- );
544
- const config5 = {
545
- name: "JOB_MICROSERVICE",
546
- transport: import_microservices4.Transport.RMQ,
547
- options: {
548
- urls,
549
- queue,
550
- prefetchCount,
551
- heartbeat,
552
- queueOptions: {
553
- durable: true,
554
- arguments: {
555
- "x-dead-letter-exchange": deadLetterExchange,
556
- "x-dead-letter-routing-key": deadLetterQueue,
557
- "x-message-ttl": messageTtl
558
- }
559
- },
560
- connectionOptions: {
561
- heartbeat,
562
- retry: true,
563
- retryAttempts: 5,
564
- retryDelay: 3e3,
565
- timeout: 1e4,
566
- poolSize: parseInt(process.env.JOB_MICROSERVICE_RMQ_POOL_SIZE || "5"),
567
- ...process.env.JOB_MICROSERVICE_RMQ_USE_SSL === "true" && {
568
- ssl: {
569
- rejectUnauthorized: false
570
- }
571
- }
572
- }
573
- }
574
- };
575
- if (mode === "microservice") {
576
- config5["options"]["noAck"] = false;
577
- }
578
- return config5;
579
- };
423
+ // src/entities/company-profile.entity.ts
424
+ var import_typeorm8 = require("typeorm");
580
425
 
581
426
  // src/entities/base.entity.ts
582
427
  var import_typeorm = require("typeorm");
@@ -824,74 +669,84 @@ FreelancerProfile = __decorateClass([
824
669
  (0, import_typeorm5.Entity)("freelancer_profiles")
825
670
  ], FreelancerProfile);
826
671
 
827
- // src/entities/company-profile.entity.ts
672
+ // src/entities/job-entity.ts
828
673
  var import_typeorm6 = require("typeorm");
829
- var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
830
- KindOfHire2["FULLTIME"] = "FULLTIME";
831
- KindOfHire2["SHORTTIME"] = "SHORTTIME";
832
- KindOfHire2["BOTH"] = "BOTH";
833
- return KindOfHire2;
834
- })(KindOfHire || {});
835
- var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
836
- ModeOfHire2["ONSITE"] = "ONSITE";
837
- ModeOfHire2["REMOTE"] = "REMOTE";
838
- ModeOfHire2["BOTH"] = "BOTH";
839
- return ModeOfHire2;
840
- })(ModeOfHire || {});
841
- var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
842
- FromUsOn2["LINKEDIN"] = "LINKEDIN";
843
- FromUsOn2["GOOGLE"] = "GOOGLE";
844
- FromUsOn2["REFERRAL"] = "REFERRAL";
845
- FromUsOn2["OTHER"] = "OTHER";
846
- return FromUsOn2;
847
- })(FromUsOn || {});
848
- var CompanyProfile = class extends BaseEntity {
674
+ var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
675
+ JobLocation2["ONSITE"] = "ONSITE";
676
+ JobLocation2["REMOTE"] = "REMOTE";
677
+ JobLocation2["BOTH"] = "BOTH";
678
+ return JobLocation2;
679
+ })(JobLocation || {});
680
+ var TypeOfEmployment = /* @__PURE__ */ ((TypeOfEmployment2) => {
681
+ TypeOfEmployment2["FULLTIME"] = "FULLTIME";
682
+ TypeOfEmployment2["PARTTIME"] = "PARTTIME";
683
+ TypeOfEmployment2["BOTH"] = "BOTH";
684
+ return TypeOfEmployment2;
685
+ })(TypeOfEmployment || {});
686
+ var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
687
+ JobStatus2["ACTIVE"] = "ACTIVE";
688
+ JobStatus2["OPEN"] = "OPEN";
689
+ JobStatus2["DRAFT"] = "DRAFT";
690
+ JobStatus2["ONHOLD"] = "ONHOLD";
691
+ JobStatus2["CLOSED"] = "CLOSED";
692
+ return JobStatus2;
693
+ })(JobStatus || {});
694
+ var Job = class extends BaseEntity {
849
695
  };
850
- // individual index to find company profile by user
696
+ __decorateClass([
697
+ (0, import_typeorm6.Column)({ name: "job_id", type: "varchar", unique: true, nullable: true })
698
+ ], Job.prototype, "jobId", 2);
699
+ // individual index to find jobs by user
851
700
  __decorateClass([
852
701
  (0, import_typeorm6.Column)({ name: "user_id", type: "integer", nullable: true }),
853
702
  (0, import_typeorm6.Index)()
854
- ], CompanyProfile.prototype, "userId", 2);
703
+ ], Job.prototype, "userId", 2);
855
704
  __decorateClass([
856
- (0, import_typeorm6.ManyToOne)(() => User, (user) => user.otps),
705
+ (0, import_typeorm6.ManyToOne)(() => User, (user) => user.jobs),
857
706
  (0, import_typeorm6.JoinColumn)({ name: "user_id" })
858
- ], CompanyProfile.prototype, "user", 2);
707
+ ], Job.prototype, "user", 2);
859
708
  __decorateClass([
860
- (0, import_typeorm6.Column)({ name: "company_name", type: "varchar", nullable: true })
861
- ], CompanyProfile.prototype, "companyName", 2);
709
+ (0, import_typeorm6.Column)({ name: "job_role", type: "varchar", nullable: true })
710
+ ], Job.prototype, "jobRole", 2);
862
711
  __decorateClass([
863
- (0, import_typeorm6.Column)({ name: "skills", type: "text", nullable: true })
864
- ], CompanyProfile.prototype, "skills", 2);
712
+ (0, import_typeorm6.Column)({ name: "note", type: "varchar", nullable: true })
713
+ ], Job.prototype, "note", 2);
865
714
  __decorateClass([
866
- (0, import_typeorm6.Column)({ name: "required_freelancer", type: "varchar", nullable: true })
867
- ], CompanyProfile.prototype, "requiredFreelancer", 2);
715
+ (0, import_typeorm6.Column)({ name: "openings", type: "integer", default: 0 })
716
+ ], Job.prototype, "openings", 2);
868
717
  __decorateClass([
869
718
  (0, import_typeorm6.Column)({
870
- name: "kind_of_hiring",
719
+ name: "location",
871
720
  type: "enum",
872
- enum: KindOfHire,
721
+ enum: JobLocation,
873
722
  nullable: true
874
723
  })
875
- ], CompanyProfile.prototype, "kindOfHiring", 2);
724
+ ], Job.prototype, "location", 2);
876
725
  __decorateClass([
877
726
  (0, import_typeorm6.Column)({
878
- name: "mode_of_hire",
727
+ name: "type_of_employment",
879
728
  type: "enum",
880
- enum: ModeOfHire,
729
+ enum: TypeOfEmployment,
881
730
  nullable: true
882
731
  })
883
- ], CompanyProfile.prototype, "modeOfHire", 2);
732
+ ], Job.prototype, "typeOfEmployment", 2);
733
+ __decorateClass([
734
+ (0, import_typeorm6.Column)({ name: "additional_comment", type: "varchar", nullable: true })
735
+ ], Job.prototype, "additionalComment", 2);
736
+ __decorateClass([
737
+ (0, import_typeorm6.Column)({ name: "description", type: "varchar", nullable: true })
738
+ ], Job.prototype, "description", 2);
884
739
  __decorateClass([
885
740
  (0, import_typeorm6.Column)({
886
- name: "found_us_on",
741
+ name: "status",
887
742
  type: "enum",
888
- enum: FromUsOn,
889
- nullable: true
743
+ enum: JobStatus,
744
+ default: "DRAFT" /* DRAFT */
890
745
  })
891
- ], CompanyProfile.prototype, "foundUsOn", 2);
892
- CompanyProfile = __decorateClass([
893
- (0, import_typeorm6.Entity)("company_profiles")
894
- ], CompanyProfile);
746
+ ], Job.prototype, "status", 2);
747
+ Job = __decorateClass([
748
+ (0, import_typeorm6.Entity)("jobs")
749
+ ], Job);
895
750
 
896
751
  // src/entities/user.entity.ts
897
752
  var AccountType = /* @__PURE__ */ ((AccountType2) => {
@@ -991,17 +846,325 @@ __decorateClass([
991
846
  )
992
847
  ], User.prototype, "freelancerProfile", 2);
993
848
  __decorateClass([
994
- (0, import_typeorm7.OneToOne)(
995
- () => CompanyProfile,
996
- (companyProfile) => companyProfile.user
997
- )
849
+ (0, import_typeorm7.OneToOne)(() => CompanyProfile, (companyProfile) => companyProfile.user)
998
850
  ], User.prototype, "companyProfile", 2);
851
+ __decorateClass([
852
+ (0, import_typeorm7.OneToMany)(() => Job, (job) => job.user)
853
+ ], User.prototype, "jobs", 2);
999
854
  User = __decorateClass([
1000
855
  (0, import_typeorm7.Entity)("users")
1001
856
  ], User);
1002
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: "rating", type: "float", nullable: true })
897
+ ], CompanyProfile.prototype, "rating", 2);
898
+ __decorateClass([
899
+ (0, import_typeorm8.Column)({ name: "agreement", type: "varchar" })
900
+ ], CompanyProfile.prototype, "agreement", 2);
901
+ __decorateClass([
902
+ (0, import_typeorm8.Column)({ name: "skills", type: "text", nullable: true })
903
+ ], CompanyProfile.prototype, "skills", 2);
904
+ __decorateClass([
905
+ (0, import_typeorm8.Column)({ name: "required_freelancer", type: "varchar", nullable: true })
906
+ ], CompanyProfile.prototype, "requiredFreelancer", 2);
907
+ __decorateClass([
908
+ (0, import_typeorm8.Column)({
909
+ name: "kind_of_hiring",
910
+ type: "enum",
911
+ enum: KindOfHire,
912
+ nullable: true
913
+ })
914
+ ], CompanyProfile.prototype, "kindOfHiring", 2);
915
+ __decorateClass([
916
+ (0, import_typeorm8.Column)({
917
+ name: "mode_of_hire",
918
+ type: "enum",
919
+ enum: ModeOfHire,
920
+ nullable: true
921
+ })
922
+ ], CompanyProfile.prototype, "modeOfHire", 2);
923
+ __decorateClass([
924
+ (0, import_typeorm8.Column)({
925
+ name: "found_us_on",
926
+ type: "enum",
927
+ enum: FromUsOn,
928
+ nullable: true
929
+ })
930
+ ], CompanyProfile.prototype, "foundUsOn", 2);
931
+ CompanyProfile = __decorateClass([
932
+ (0, import_typeorm8.Entity)("company_profiles")
933
+ ], CompanyProfile);
934
+
935
+ // src/modules/user/client-profile/dto/update-client-profile.dto.ts
936
+ var UpdateCompanyProfileDto = class {
937
+ };
938
+ __decorateClass([
939
+ (0, import_class_validator15.IsNumber)({}, { message: "User ID must be a number." })
940
+ ], UpdateCompanyProfileDto.prototype, "userId", 2);
941
+ __decorateClass([
942
+ (0, import_class_validator15.IsString)({ message: "Company name must be a string." })
943
+ ], UpdateCompanyProfileDto.prototype, "companyName", 2);
944
+ __decorateClass([
945
+ (0, import_class_validator15.IsOptional)(),
946
+ (0, import_class_validator15.IsString)({ message: "Bio must be a string." })
947
+ ], UpdateCompanyProfileDto.prototype, "bio", 2);
948
+ __decorateClass([
949
+ (0, import_class_validator15.IsOptional)(),
950
+ (0, import_class_validator15.IsNumber)({}, { message: "Rating must be a numeric value." })
951
+ ], UpdateCompanyProfileDto.prototype, "rating", 2);
952
+ __decorateClass([
953
+ (0, import_class_validator15.IsString)({ message: "Agreement must be a string (e.g., a file URL or path)." })
954
+ ], UpdateCompanyProfileDto.prototype, "agreement", 2);
955
+ __decorateClass([
956
+ (0, import_class_validator15.IsOptional)(),
957
+ (0, import_class_validator15.IsArray)({ message: "Skills must be an array of strings." }),
958
+ (0, import_class_validator15.IsString)({ each: true, message: "Each skill must be a string." })
959
+ ], UpdateCompanyProfileDto.prototype, "skills", 2);
960
+ __decorateClass([
961
+ (0, import_class_validator15.IsOptional)(),
962
+ (0, import_class_validator15.IsString)({ message: "Required freelancer must be a string." })
963
+ ], UpdateCompanyProfileDto.prototype, "requiredFreelancer", 2);
964
+ __decorateClass([
965
+ (0, import_class_validator15.IsOptional)(),
966
+ (0, import_class_validator15.IsEnum)(KindOfHire, {
967
+ message: `Kind of hiring must be one of: ${Object.values(KindOfHire).join(", ")}`
968
+ })
969
+ ], UpdateCompanyProfileDto.prototype, "kindOfHiring", 2);
970
+ __decorateClass([
971
+ (0, import_class_validator15.IsOptional)(),
972
+ (0, import_class_validator15.IsEnum)(ModeOfHire, {
973
+ message: `Mode of hire must be one of: ${Object.values(ModeOfHire).join(", ")}`
974
+ })
975
+ ], UpdateCompanyProfileDto.prototype, "modeOfHire", 2);
976
+ __decorateClass([
977
+ (0, import_class_validator15.IsOptional)(),
978
+ (0, import_class_validator15.IsEnum)(FromUsOn, {
979
+ message: `Found us on must be one of: ${Object.values(FromUsOn).join(", ")}`
980
+ })
981
+ ], UpdateCompanyProfileDto.prototype, "foundUsOn", 2);
982
+
983
+ // src/modules/user/client-profile/dto/update-client-logo.dto.ts
984
+ var import_class_validator16 = require("class-validator");
985
+ var UpdateCompanyLogoDto = class {
986
+ };
987
+ __decorateClass([
988
+ (0, import_class_validator16.IsString)({ message: "Logo must be a valid string URL or file path." })
989
+ ], UpdateCompanyLogoDto.prototype, "logo", 2);
990
+
991
+ // src/modules/question/pattern/pattern.ts
992
+ var QUESTION_PATTERN = {
993
+ fetchQuestions: "fetch.questions"
994
+ };
995
+
996
+ // src/modules/question/dto/create-question.dto.ts
997
+ var import_class_validator17 = require("class-validator");
998
+ var CreateQuestionDto = class {
999
+ };
1000
+ __decorateClass([
1001
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter unique id." })
1002
+ ], CreateQuestionDto.prototype, "questionId", 2);
1003
+ __decorateClass([
1004
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter question." })
1005
+ ], CreateQuestionDto.prototype, "question", 2);
1006
+ __decorateClass([
1007
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter for whom the question is." })
1008
+ ], CreateQuestionDto.prototype, "questionFor", 2);
1009
+ __decorateClass([
1010
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter options." })
1011
+ ], CreateQuestionDto.prototype, "options", 2);
1012
+ __decorateClass([
1013
+ (0, import_class_validator17.IsOptional)(),
1014
+ (0, import_class_validator17.IsBoolean)({ message: "Whether the question status active" })
1015
+ ], CreateQuestionDto.prototype, "isActive", 2);
1016
+
1017
+ // src/modules/job/pattern/pattern.ts
1018
+ var JOB_ROLE_PATTERN = {
1019
+ fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
1020
+ };
1021
+
1022
+ // src/adapters/tcp/user.tcp.adapter.ts
1023
+ var import_dotenv = require("dotenv");
1024
+ var import_microservices = require("@nestjs/microservices");
1025
+ (0, import_dotenv.config)();
1026
+ var UserTCPAdapter = () => {
1027
+ return {
1028
+ name: "USER_MICROSERVICE",
1029
+ transport: import_microservices.Transport.TCP,
1030
+ options: {
1031
+ host: process.env.USER_MICROSERVICE_TCP_HOST || "localhost",
1032
+ port: parseInt(process.env.USER_MICROSERVICE_TCP_PORT || "4001", 10)
1033
+ }
1034
+ };
1035
+ };
1036
+
1037
+ // src/adapters/tcp/job.tcp.adapter.ts
1038
+ var import_dotenv2 = require("dotenv");
1039
+ var import_microservices2 = require("@nestjs/microservices");
1040
+ (0, import_dotenv2.config)();
1041
+ var JobTCPAdapter = () => {
1042
+ return {
1043
+ name: "JOB_MICROSERVICE",
1044
+ transport: import_microservices2.Transport.TCP,
1045
+ options: {
1046
+ host: process.env.JOB_MICROSERVICE_TCP_HOST || "localhost",
1047
+ port: parseInt(process.env.JOB_MICROSERVICE_TCP_PORT || "4002", 10)
1048
+ }
1049
+ };
1050
+ };
1051
+
1052
+ // src/adapters/rmq/user.rmq.adapter.ts
1053
+ var import_dotenv3 = require("dotenv");
1054
+ var import_microservices3 = require("@nestjs/microservices");
1055
+ (0, import_dotenv3.config)();
1056
+ var UserRMQAdapter = (mode = "microservice") => {
1057
+ const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
1058
+ "amqp://localhost:5672"
1059
+ ];
1060
+ const queue = process.env.USER_MICROSERVICE_RMQ_QUEUE || "user_queue";
1061
+ const prefetchCount = parseInt(
1062
+ process.env.USER_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
1063
+ );
1064
+ const heartbeat = parseInt(
1065
+ process.env.USER_MICROSERVICE_RMQ_HEARTBEAT || "60"
1066
+ );
1067
+ const deadLetterExchange = process.env.USER_MICROSERVICE_RMQ_DLX || "user_dlx";
1068
+ const deadLetterQueue = process.env.USER_MICROSERVICE_RMQ_DLQ || "user_dlq";
1069
+ const messageTtl = parseInt(
1070
+ process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
1071
+ );
1072
+ const config5 = {
1073
+ name: "USER_MICROSERVICE",
1074
+ transport: import_microservices3.Transport.RMQ,
1075
+ options: {
1076
+ urls,
1077
+ queue,
1078
+ prefetchCount,
1079
+ heartbeat,
1080
+ queueOptions: {
1081
+ durable: true,
1082
+ arguments: {
1083
+ "x-dead-letter-exchange": deadLetterExchange,
1084
+ "x-dead-letter-routing-key": deadLetterQueue,
1085
+ "x-message-ttl": messageTtl
1086
+ }
1087
+ },
1088
+ connectionOptions: {
1089
+ heartbeat,
1090
+ retry: true,
1091
+ retryAttempts: 5,
1092
+ retryDelay: 3e3,
1093
+ timeout: 1e4,
1094
+ poolSize: parseInt(process.env.USER_MICROSERVICE_RMQ_POOL_SIZE || "5"),
1095
+ ...process.env.USER_MICROSERVICE_RMQ_USE_SSL === "true" && {
1096
+ ssl: {
1097
+ rejectUnauthorized: false
1098
+ }
1099
+ }
1100
+ }
1101
+ }
1102
+ };
1103
+ if (mode === "microservice") {
1104
+ config5["options"]["noAck"] = false;
1105
+ }
1106
+ return config5;
1107
+ };
1108
+
1109
+ // src/adapters/rmq/job.rmq.adapter.ts
1110
+ var import_dotenv4 = require("dotenv");
1111
+ var import_microservices4 = require("@nestjs/microservices");
1112
+ (0, import_dotenv4.config)();
1113
+ var JobRMQAdapter = (mode = "microservice") => {
1114
+ const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
1115
+ "amqp://localhost:5672"
1116
+ ];
1117
+ const queue = process.env.JOB_MICROSERVICE_RMQ_QUEUE || "job_queue";
1118
+ const prefetchCount = parseInt(
1119
+ process.env.JOB_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
1120
+ );
1121
+ const heartbeat = parseInt(
1122
+ process.env.JOB_MICROSERVICE_RMQ_HEARTBEAT || "60"
1123
+ );
1124
+ const deadLetterExchange = process.env.JOB_MICROSERVICE_RMQ_DLX || "job_dlx";
1125
+ const deadLetterQueue = process.env.JOB_MICROSERVICE_RMQ_DLQ || "job_dlq";
1126
+ const messageTtl = parseInt(
1127
+ process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
1128
+ );
1129
+ const config5 = {
1130
+ name: "JOB_MICROSERVICE",
1131
+ transport: import_microservices4.Transport.RMQ,
1132
+ options: {
1133
+ urls,
1134
+ queue,
1135
+ prefetchCount,
1136
+ heartbeat,
1137
+ queueOptions: {
1138
+ durable: true,
1139
+ arguments: {
1140
+ "x-dead-letter-exchange": deadLetterExchange,
1141
+ "x-dead-letter-routing-key": deadLetterQueue,
1142
+ "x-message-ttl": messageTtl
1143
+ }
1144
+ },
1145
+ connectionOptions: {
1146
+ heartbeat,
1147
+ retry: true,
1148
+ retryAttempts: 5,
1149
+ retryDelay: 3e3,
1150
+ timeout: 1e4,
1151
+ poolSize: parseInt(process.env.JOB_MICROSERVICE_RMQ_POOL_SIZE || "5"),
1152
+ ...process.env.JOB_MICROSERVICE_RMQ_USE_SSL === "true" && {
1153
+ ssl: {
1154
+ rejectUnauthorized: false
1155
+ }
1156
+ }
1157
+ }
1158
+ }
1159
+ };
1160
+ if (mode === "microservice") {
1161
+ config5["options"]["noAck"] = false;
1162
+ }
1163
+ return config5;
1164
+ };
1165
+
1003
1166
  // src/entities/question.entity.ts
1004
- var import_typeorm8 = require("typeorm");
1167
+ var import_typeorm9 = require("typeorm");
1005
1168
  var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
1006
1169
  QuestionFor2["CLIENT"] = "CLIENT";
1007
1170
  QuestionFor2["FREELANCER"] = "FREELANCER";
@@ -1010,16 +1173,16 @@ var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
1010
1173
  var Question = class extends BaseEntity {
1011
1174
  };
1012
1175
  __decorateClass([
1013
- (0, import_typeorm8.Column)({ name: "question", type: "varchar" })
1176
+ (0, import_typeorm9.Column)({ name: "question", type: "varchar" })
1014
1177
  ], Question.prototype, "question", 2);
1015
1178
  __decorateClass([
1016
- (0, import_typeorm8.Column)({ name: "hint", type: "varchar", nullable: true })
1179
+ (0, import_typeorm9.Column)({ name: "hint", type: "varchar", nullable: true })
1017
1180
  ], Question.prototype, "hint", 2);
1018
1181
  __decorateClass([
1019
- (0, import_typeorm8.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1182
+ (0, import_typeorm9.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1020
1183
  ], Question.prototype, "slug", 2);
1021
1184
  __decorateClass([
1022
- (0, import_typeorm8.Column)({
1185
+ (0, import_typeorm9.Column)({
1023
1186
  name: "question_for",
1024
1187
  type: "enum",
1025
1188
  enum: QuestionFor,
@@ -1027,33 +1190,33 @@ __decorateClass([
1027
1190
  })
1028
1191
  ], Question.prototype, "questionFor", 2);
1029
1192
  __decorateClass([
1030
- (0, import_typeorm8.Column)({ name: "type", type: "varchar", nullable: true })
1193
+ (0, import_typeorm9.Column)({ name: "type", type: "varchar", nullable: true })
1031
1194
  ], Question.prototype, "type", 2);
1032
1195
  __decorateClass([
1033
- (0, import_typeorm8.Column)({ name: "options", type: "jsonb", nullable: true })
1196
+ (0, import_typeorm9.Column)({ name: "options", type: "jsonb", nullable: true })
1034
1197
  ], Question.prototype, "options", 2);
1035
1198
  __decorateClass([
1036
- (0, import_typeorm8.Column)({ name: "is_active", type: "boolean", default: false })
1199
+ (0, import_typeorm9.Column)({ name: "is_active", type: "boolean", default: false })
1037
1200
  ], Question.prototype, "isActive", 2);
1038
1201
  Question = __decorateClass([
1039
- (0, import_typeorm8.Entity)("questions")
1202
+ (0, import_typeorm9.Entity)("questions")
1040
1203
  ], Question);
1041
1204
 
1042
1205
  // src/entities/job-role.entity.ts
1043
- var import_typeorm9 = require("typeorm");
1206
+ var import_typeorm10 = require("typeorm");
1044
1207
  var JobRoles = class extends BaseEntity {
1045
1208
  };
1046
1209
  __decorateClass([
1047
- (0, import_typeorm9.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1210
+ (0, import_typeorm10.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1048
1211
  ], JobRoles.prototype, "slug", 2);
1049
1212
  __decorateClass([
1050
- (0, import_typeorm9.Column)({ name: "name", type: "varchar", nullable: true })
1213
+ (0, import_typeorm10.Column)({ name: "name", type: "varchar", nullable: true })
1051
1214
  ], JobRoles.prototype, "name", 2);
1052
1215
  __decorateClass([
1053
- (0, import_typeorm9.Column)({ name: "is_active", type: "boolean", default: true })
1216
+ (0, import_typeorm10.Column)({ name: "is_active", type: "boolean", default: true })
1054
1217
  ], JobRoles.prototype, "isActive", 2);
1055
1218
  JobRoles = __decorateClass([
1056
- (0, import_typeorm9.Entity)("job_roles")
1219
+ (0, import_typeorm10.Entity)("job_roles")
1057
1220
  ], JobRoles);
1058
1221
  // Annotate the CommonJS export names for ESM import in node:
1059
1222
  0 && (module.exports = {
@@ -1061,6 +1224,7 @@ JobRoles = __decorateClass([
1061
1224
  AccountStatus,
1062
1225
  AccountType,
1063
1226
  BaseEntity,
1227
+ CLIENT_PROFILE_PATTERN,
1064
1228
  ClientCreateAccountDto,
1065
1229
  ClientProfileQuestionDto,
1066
1230
  CompanyProfile,
@@ -1074,8 +1238,11 @@ JobRoles = __decorateClass([
1074
1238
  FreelancerWorkShowcaseDto,
1075
1239
  FromUsOn,
1076
1240
  JOB_ROLE_PATTERN,
1241
+ Job,
1242
+ JobLocation,
1077
1243
  JobRMQAdapter,
1078
1244
  JobRoles,
1245
+ JobStatus,
1079
1246
  JobTCPAdapter,
1080
1247
  KindOfHire,
1081
1248
  LoginDto,
@@ -1094,6 +1261,9 @@ JobRoles = __decorateClass([
1094
1261
  RefreshToken,
1095
1262
  ResumeParserLog,
1096
1263
  SUBADMIN_PATTERN,
1264
+ TypeOfEmployment,
1265
+ UpdateCompanyLogoDto,
1266
+ UpdateCompanyProfileDto,
1097
1267
  UpdateSubAdminAccountStatusDto,
1098
1268
  UpdateSubAdminDto,
1099
1269
  User,