@experts_hub/shared 1.0.69 → 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/entities/company-profile.entity.d.ts +3 -0
- package/dist/index.d.mts +134 -67
- package/dist/index.d.ts +134 -67
- package/dist/index.js +362 -279
- package/dist/index.mjs +367 -281
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/user/client-profile/client-profile.interface.d.ts +40 -0
- package/dist/modules/user/client-profile/dto/index.d.ts +2 -0
- package/dist/modules/user/client-profile/dto/update-client-logo.dto.d.ts +3 -0
- package/dist/modules/user/client-profile/dto/update-client-profile.dto.d.ts +13 -0
- package/dist/modules/user/client-profile/index.d.ts +3 -0
- package/dist/modules/user/client-profile/pattern/pattern.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -380,184 +380,30 @@ __decorateClass([
|
|
|
380
380
|
IsNotEmpty12({ message: "Please enter account status." })
|
|
381
381
|
], UpdateSubAdminDto.prototype, "accountStatus", 2);
|
|
382
382
|
|
|
383
|
-
// src/modules/
|
|
384
|
-
var
|
|
385
|
-
|
|
383
|
+
// src/modules/user/client-profile/pattern/pattern.ts
|
|
384
|
+
var CLIENT_PROFILE_PATTERN = {
|
|
385
|
+
fetchClientProfile: "fetch.client.profile",
|
|
386
|
+
updateClientProfile: "update.client.profile",
|
|
387
|
+
updateClientLogo: "update.client.logo"
|
|
386
388
|
};
|
|
387
389
|
|
|
388
|
-
// src/modules/
|
|
390
|
+
// src/modules/user/client-profile/dto/update-client-profile.dto.ts
|
|
389
391
|
import {
|
|
390
|
-
|
|
392
|
+
IsEnum,
|
|
391
393
|
IsOptional as IsOptional4,
|
|
392
|
-
|
|
394
|
+
IsString as IsString8,
|
|
395
|
+
IsNumber,
|
|
396
|
+
IsArray
|
|
393
397
|
} from "class-validator";
|
|
394
|
-
var CreateQuestionDto = class {
|
|
395
|
-
};
|
|
396
|
-
__decorateClass([
|
|
397
|
-
IsNotEmpty13({ message: "Please enter unique id." })
|
|
398
|
-
], CreateQuestionDto.prototype, "questionId", 2);
|
|
399
|
-
__decorateClass([
|
|
400
|
-
IsNotEmpty13({ message: "Please enter question." })
|
|
401
|
-
], CreateQuestionDto.prototype, "question", 2);
|
|
402
|
-
__decorateClass([
|
|
403
|
-
IsNotEmpty13({ message: "Please enter for whom the question is." })
|
|
404
|
-
], CreateQuestionDto.prototype, "questionFor", 2);
|
|
405
|
-
__decorateClass([
|
|
406
|
-
IsNotEmpty13({ message: "Please enter options." })
|
|
407
|
-
], CreateQuestionDto.prototype, "options", 2);
|
|
408
|
-
__decorateClass([
|
|
409
|
-
IsOptional4(),
|
|
410
|
-
IsBoolean4({ message: "Whether the question status active" })
|
|
411
|
-
], CreateQuestionDto.prototype, "isActive", 2);
|
|
412
|
-
|
|
413
|
-
// src/modules/job/pattern/pattern.ts
|
|
414
|
-
var JOB_ROLE_PATTERN = {
|
|
415
|
-
fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
// src/adapters/tcp/user.tcp.adapter.ts
|
|
419
|
-
import { config } from "dotenv";
|
|
420
|
-
import { Transport } from "@nestjs/microservices";
|
|
421
|
-
config();
|
|
422
|
-
var UserTCPAdapter = () => {
|
|
423
|
-
return {
|
|
424
|
-
name: "USER_MICROSERVICE",
|
|
425
|
-
transport: Transport.TCP,
|
|
426
|
-
options: {
|
|
427
|
-
host: process.env.USER_MICROSERVICE_TCP_HOST || "localhost",
|
|
428
|
-
port: parseInt(process.env.USER_MICROSERVICE_TCP_PORT || "4001", 10)
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
};
|
|
432
|
-
|
|
433
|
-
// src/adapters/tcp/job.tcp.adapter.ts
|
|
434
|
-
import { config as config2 } from "dotenv";
|
|
435
|
-
import { Transport as Transport2 } from "@nestjs/microservices";
|
|
436
|
-
config2();
|
|
437
|
-
var JobTCPAdapter = () => {
|
|
438
|
-
return {
|
|
439
|
-
name: "JOB_MICROSERVICE",
|
|
440
|
-
transport: Transport2.TCP,
|
|
441
|
-
options: {
|
|
442
|
-
host: process.env.JOB_MICROSERVICE_TCP_HOST || "localhost",
|
|
443
|
-
port: parseInt(process.env.JOB_MICROSERVICE_TCP_PORT || "4002", 10)
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
// src/adapters/rmq/user.rmq.adapter.ts
|
|
449
|
-
import { config as config3 } from "dotenv";
|
|
450
|
-
import { Transport as Transport3 } from "@nestjs/microservices";
|
|
451
|
-
config3();
|
|
452
|
-
var UserRMQAdapter = (mode = "microservice") => {
|
|
453
|
-
const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
454
|
-
"amqp://localhost:5672"
|
|
455
|
-
];
|
|
456
|
-
const queue = process.env.USER_MICROSERVICE_RMQ_QUEUE || "user_queue";
|
|
457
|
-
const prefetchCount = parseInt(
|
|
458
|
-
process.env.USER_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
|
|
459
|
-
);
|
|
460
|
-
const heartbeat = parseInt(
|
|
461
|
-
process.env.USER_MICROSERVICE_RMQ_HEARTBEAT || "60"
|
|
462
|
-
);
|
|
463
|
-
const deadLetterExchange = process.env.USER_MICROSERVICE_RMQ_DLX || "user_dlx";
|
|
464
|
-
const deadLetterQueue = process.env.USER_MICROSERVICE_RMQ_DLQ || "user_dlq";
|
|
465
|
-
const messageTtl = parseInt(
|
|
466
|
-
process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
467
|
-
);
|
|
468
|
-
const config5 = {
|
|
469
|
-
name: "USER_MICROSERVICE",
|
|
470
|
-
transport: Transport3.RMQ,
|
|
471
|
-
options: {
|
|
472
|
-
urls,
|
|
473
|
-
queue,
|
|
474
|
-
prefetchCount,
|
|
475
|
-
heartbeat,
|
|
476
|
-
queueOptions: {
|
|
477
|
-
durable: true,
|
|
478
|
-
arguments: {
|
|
479
|
-
"x-dead-letter-exchange": deadLetterExchange,
|
|
480
|
-
"x-dead-letter-routing-key": deadLetterQueue,
|
|
481
|
-
"x-message-ttl": messageTtl
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
connectionOptions: {
|
|
485
|
-
heartbeat,
|
|
486
|
-
retry: true,
|
|
487
|
-
retryAttempts: 5,
|
|
488
|
-
retryDelay: 3e3,
|
|
489
|
-
timeout: 1e4,
|
|
490
|
-
poolSize: parseInt(process.env.USER_MICROSERVICE_RMQ_POOL_SIZE || "5"),
|
|
491
|
-
...process.env.USER_MICROSERVICE_RMQ_USE_SSL === "true" && {
|
|
492
|
-
ssl: {
|
|
493
|
-
rejectUnauthorized: false
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
};
|
|
499
|
-
if (mode === "microservice") {
|
|
500
|
-
config5["options"]["noAck"] = false;
|
|
501
|
-
}
|
|
502
|
-
return config5;
|
|
503
|
-
};
|
|
504
398
|
|
|
505
|
-
// src/
|
|
506
|
-
import {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
const queue = process.env.JOB_MICROSERVICE_RMQ_QUEUE || "job_queue";
|
|
514
|
-
const prefetchCount = parseInt(
|
|
515
|
-
process.env.JOB_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
|
|
516
|
-
);
|
|
517
|
-
const heartbeat = parseInt(
|
|
518
|
-
process.env.JOB_MICROSERVICE_RMQ_HEARTBEAT || "60"
|
|
519
|
-
);
|
|
520
|
-
const deadLetterExchange = process.env.JOB_MICROSERVICE_RMQ_DLX || "job_dlx";
|
|
521
|
-
const deadLetterQueue = process.env.JOB_MICROSERVICE_RMQ_DLQ || "job_dlq";
|
|
522
|
-
const messageTtl = parseInt(
|
|
523
|
-
process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
524
|
-
);
|
|
525
|
-
const config5 = {
|
|
526
|
-
name: "JOB_MICROSERVICE",
|
|
527
|
-
transport: Transport4.RMQ,
|
|
528
|
-
options: {
|
|
529
|
-
urls,
|
|
530
|
-
queue,
|
|
531
|
-
prefetchCount,
|
|
532
|
-
heartbeat,
|
|
533
|
-
queueOptions: {
|
|
534
|
-
durable: true,
|
|
535
|
-
arguments: {
|
|
536
|
-
"x-dead-letter-exchange": deadLetterExchange,
|
|
537
|
-
"x-dead-letter-routing-key": deadLetterQueue,
|
|
538
|
-
"x-message-ttl": messageTtl
|
|
539
|
-
}
|
|
540
|
-
},
|
|
541
|
-
connectionOptions: {
|
|
542
|
-
heartbeat,
|
|
543
|
-
retry: true,
|
|
544
|
-
retryAttempts: 5,
|
|
545
|
-
retryDelay: 3e3,
|
|
546
|
-
timeout: 1e4,
|
|
547
|
-
poolSize: parseInt(process.env.JOB_MICROSERVICE_RMQ_POOL_SIZE || "5"),
|
|
548
|
-
...process.env.JOB_MICROSERVICE_RMQ_USE_SSL === "true" && {
|
|
549
|
-
ssl: {
|
|
550
|
-
rejectUnauthorized: false
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
if (mode === "microservice") {
|
|
557
|
-
config5["options"]["noAck"] = false;
|
|
558
|
-
}
|
|
559
|
-
return config5;
|
|
560
|
-
};
|
|
399
|
+
// src/entities/company-profile.entity.ts
|
|
400
|
+
import {
|
|
401
|
+
Entity as Entity7,
|
|
402
|
+
Column as Column8,
|
|
403
|
+
ManyToOne as ManyToOne6,
|
|
404
|
+
JoinColumn as JoinColumn6,
|
|
405
|
+
Index as Index4
|
|
406
|
+
} from "typeorm";
|
|
561
407
|
|
|
562
408
|
// src/entities/base.entity.ts
|
|
563
409
|
import {
|
|
@@ -604,7 +450,7 @@ __decorateClass([
|
|
|
604
450
|
], BaseEntity.prototype, "deletedAt", 2);
|
|
605
451
|
|
|
606
452
|
// src/entities/user.entity.ts
|
|
607
|
-
import { Entity as
|
|
453
|
+
import { Entity as Entity6, Column as Column7, OneToMany as OneToMany2, OneToOne } from "typeorm";
|
|
608
454
|
|
|
609
455
|
// src/entities/refresh-token.entity.ts
|
|
610
456
|
import {
|
|
@@ -841,83 +687,8 @@ FreelancerProfile = __decorateClass([
|
|
|
841
687
|
Entity4("freelancer_profiles")
|
|
842
688
|
], FreelancerProfile);
|
|
843
689
|
|
|
844
|
-
// src/entities/company-profile.entity.ts
|
|
845
|
-
import {
|
|
846
|
-
Entity as Entity5,
|
|
847
|
-
Column as Column6,
|
|
848
|
-
ManyToOne as ManyToOne5,
|
|
849
|
-
JoinColumn as JoinColumn5,
|
|
850
|
-
Index as Index3
|
|
851
|
-
} from "typeorm";
|
|
852
|
-
var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
|
|
853
|
-
KindOfHire2["FULLTIME"] = "FULLTIME";
|
|
854
|
-
KindOfHire2["SHORTTIME"] = "SHORTTIME";
|
|
855
|
-
KindOfHire2["BOTH"] = "BOTH";
|
|
856
|
-
return KindOfHire2;
|
|
857
|
-
})(KindOfHire || {});
|
|
858
|
-
var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
|
|
859
|
-
ModeOfHire2["ONSITE"] = "ONSITE";
|
|
860
|
-
ModeOfHire2["REMOTE"] = "REMOTE";
|
|
861
|
-
ModeOfHire2["BOTH"] = "BOTH";
|
|
862
|
-
return ModeOfHire2;
|
|
863
|
-
})(ModeOfHire || {});
|
|
864
|
-
var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
|
|
865
|
-
FromUsOn2["LINKEDIN"] = "LINKEDIN";
|
|
866
|
-
FromUsOn2["GOOGLE"] = "GOOGLE";
|
|
867
|
-
FromUsOn2["REFERRAL"] = "REFERRAL";
|
|
868
|
-
FromUsOn2["OTHER"] = "OTHER";
|
|
869
|
-
return FromUsOn2;
|
|
870
|
-
})(FromUsOn || {});
|
|
871
|
-
var CompanyProfile = class extends BaseEntity {
|
|
872
|
-
};
|
|
873
|
-
// individual index to find company profile by user
|
|
874
|
-
__decorateClass([
|
|
875
|
-
Column6({ name: "user_id", type: "integer", nullable: true }),
|
|
876
|
-
Index3()
|
|
877
|
-
], CompanyProfile.prototype, "userId", 2);
|
|
878
|
-
__decorateClass([
|
|
879
|
-
ManyToOne5(() => User, (user) => user.otps),
|
|
880
|
-
JoinColumn5({ name: "user_id" })
|
|
881
|
-
], CompanyProfile.prototype, "user", 2);
|
|
882
|
-
__decorateClass([
|
|
883
|
-
Column6({ name: "company_name", type: "varchar", nullable: true })
|
|
884
|
-
], CompanyProfile.prototype, "companyName", 2);
|
|
885
|
-
__decorateClass([
|
|
886
|
-
Column6({ name: "skills", type: "text", nullable: true })
|
|
887
|
-
], CompanyProfile.prototype, "skills", 2);
|
|
888
|
-
__decorateClass([
|
|
889
|
-
Column6({ name: "required_freelancer", type: "varchar", nullable: true })
|
|
890
|
-
], CompanyProfile.prototype, "requiredFreelancer", 2);
|
|
891
|
-
__decorateClass([
|
|
892
|
-
Column6({
|
|
893
|
-
name: "kind_of_hiring",
|
|
894
|
-
type: "enum",
|
|
895
|
-
enum: KindOfHire,
|
|
896
|
-
nullable: true
|
|
897
|
-
})
|
|
898
|
-
], CompanyProfile.prototype, "kindOfHiring", 2);
|
|
899
|
-
__decorateClass([
|
|
900
|
-
Column6({
|
|
901
|
-
name: "mode_of_hire",
|
|
902
|
-
type: "enum",
|
|
903
|
-
enum: ModeOfHire,
|
|
904
|
-
nullable: true
|
|
905
|
-
})
|
|
906
|
-
], CompanyProfile.prototype, "modeOfHire", 2);
|
|
907
|
-
__decorateClass([
|
|
908
|
-
Column6({
|
|
909
|
-
name: "found_us_on",
|
|
910
|
-
type: "enum",
|
|
911
|
-
enum: FromUsOn,
|
|
912
|
-
nullable: true
|
|
913
|
-
})
|
|
914
|
-
], CompanyProfile.prototype, "foundUsOn", 2);
|
|
915
|
-
CompanyProfile = __decorateClass([
|
|
916
|
-
Entity5("company_profiles")
|
|
917
|
-
], CompanyProfile);
|
|
918
|
-
|
|
919
690
|
// src/entities/job-entity.ts
|
|
920
|
-
import { Entity as
|
|
691
|
+
import { Entity as Entity5, Column as Column6, Index as Index3, ManyToOne as ManyToOne5, JoinColumn as JoinColumn5 } from "typeorm";
|
|
921
692
|
var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
|
|
922
693
|
JobLocation2["ONSITE"] = "ONSITE";
|
|
923
694
|
JobLocation2["REMOTE"] = "REMOTE";
|
|
@@ -941,28 +712,28 @@ var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
|
|
|
941
712
|
var Job = class extends BaseEntity {
|
|
942
713
|
};
|
|
943
714
|
__decorateClass([
|
|
944
|
-
|
|
715
|
+
Column6({ name: "job_id", type: "varchar", unique: true, nullable: true })
|
|
945
716
|
], Job.prototype, "jobId", 2);
|
|
946
717
|
// individual index to find jobs by user
|
|
947
718
|
__decorateClass([
|
|
948
|
-
|
|
949
|
-
|
|
719
|
+
Column6({ name: "user_id", type: "integer", nullable: true }),
|
|
720
|
+
Index3()
|
|
950
721
|
], Job.prototype, "userId", 2);
|
|
951
722
|
__decorateClass([
|
|
952
|
-
|
|
953
|
-
|
|
723
|
+
ManyToOne5(() => User, (user) => user.jobs),
|
|
724
|
+
JoinColumn5({ name: "user_id" })
|
|
954
725
|
], Job.prototype, "user", 2);
|
|
955
726
|
__decorateClass([
|
|
956
|
-
|
|
727
|
+
Column6({ name: "job_role", type: "varchar", nullable: true })
|
|
957
728
|
], Job.prototype, "jobRole", 2);
|
|
958
729
|
__decorateClass([
|
|
959
|
-
|
|
730
|
+
Column6({ name: "note", type: "varchar", nullable: true })
|
|
960
731
|
], Job.prototype, "note", 2);
|
|
961
732
|
__decorateClass([
|
|
962
|
-
|
|
733
|
+
Column6({ name: "openings", type: "integer", default: 0 })
|
|
963
734
|
], Job.prototype, "openings", 2);
|
|
964
735
|
__decorateClass([
|
|
965
|
-
|
|
736
|
+
Column6({
|
|
966
737
|
name: "location",
|
|
967
738
|
type: "enum",
|
|
968
739
|
enum: JobLocation,
|
|
@@ -970,7 +741,7 @@ __decorateClass([
|
|
|
970
741
|
})
|
|
971
742
|
], Job.prototype, "location", 2);
|
|
972
743
|
__decorateClass([
|
|
973
|
-
|
|
744
|
+
Column6({
|
|
974
745
|
name: "type_of_employment",
|
|
975
746
|
type: "enum",
|
|
976
747
|
enum: TypeOfEmployment,
|
|
@@ -978,13 +749,13 @@ __decorateClass([
|
|
|
978
749
|
})
|
|
979
750
|
], Job.prototype, "typeOfEmployment", 2);
|
|
980
751
|
__decorateClass([
|
|
981
|
-
|
|
752
|
+
Column6({ name: "additional_comment", type: "varchar", nullable: true })
|
|
982
753
|
], Job.prototype, "additionalComment", 2);
|
|
983
754
|
__decorateClass([
|
|
984
|
-
|
|
755
|
+
Column6({ name: "description", type: "varchar", nullable: true })
|
|
985
756
|
], Job.prototype, "description", 2);
|
|
986
757
|
__decorateClass([
|
|
987
|
-
|
|
758
|
+
Column6({
|
|
988
759
|
name: "status",
|
|
989
760
|
type: "enum",
|
|
990
761
|
enum: JobStatus,
|
|
@@ -992,7 +763,7 @@ __decorateClass([
|
|
|
992
763
|
})
|
|
993
764
|
], Job.prototype, "status", 2);
|
|
994
765
|
Job = __decorateClass([
|
|
995
|
-
|
|
766
|
+
Entity5("jobs")
|
|
996
767
|
], Job);
|
|
997
768
|
|
|
998
769
|
// src/entities/user.entity.ts
|
|
@@ -1013,40 +784,40 @@ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
|
|
|
1013
784
|
var User = class extends BaseEntity {
|
|
1014
785
|
};
|
|
1015
786
|
__decorateClass([
|
|
1016
|
-
|
|
787
|
+
Column7({ name: "unique_id", type: "varchar", unique: true })
|
|
1017
788
|
], User.prototype, "uniqueId", 2);
|
|
1018
789
|
__decorateClass([
|
|
1019
|
-
|
|
790
|
+
Column7({ name: "username", type: "varchar", unique: true, nullable: true })
|
|
1020
791
|
], User.prototype, "username", 2);
|
|
1021
792
|
__decorateClass([
|
|
1022
|
-
|
|
793
|
+
Column7({ name: "first_name", type: "varchar", length: 100, nullable: true })
|
|
1023
794
|
], User.prototype, "firstName", 2);
|
|
1024
795
|
__decorateClass([
|
|
1025
|
-
|
|
796
|
+
Column7({ name: "last_name", type: "varchar", length: 100, nullable: true })
|
|
1026
797
|
], User.prototype, "lastName", 2);
|
|
1027
798
|
__decorateClass([
|
|
1028
|
-
|
|
799
|
+
Column7({ name: "date_of_birth", type: "date", nullable: true })
|
|
1029
800
|
], User.prototype, "dateOfBirth", 2);
|
|
1030
801
|
__decorateClass([
|
|
1031
|
-
|
|
802
|
+
Column7({ name: "gender", type: "varchar", length: 10, nullable: true })
|
|
1032
803
|
], User.prototype, "gender", 2);
|
|
1033
804
|
__decorateClass([
|
|
1034
|
-
|
|
805
|
+
Column7({ name: "profile_picture_url", type: "text", nullable: true })
|
|
1035
806
|
], User.prototype, "profilePictureUrl", 2);
|
|
1036
807
|
__decorateClass([
|
|
1037
|
-
|
|
808
|
+
Column7({ name: "email", type: "varchar", unique: true })
|
|
1038
809
|
], User.prototype, "email", 2);
|
|
1039
810
|
__decorateClass([
|
|
1040
|
-
|
|
811
|
+
Column7({ name: "mobile_code", type: "varchar", nullable: true })
|
|
1041
812
|
], User.prototype, "mobileCode", 2);
|
|
1042
813
|
__decorateClass([
|
|
1043
|
-
|
|
814
|
+
Column7({ name: "mobile", type: "varchar", unique: true, nullable: true })
|
|
1044
815
|
], User.prototype, "mobile", 2);
|
|
1045
816
|
__decorateClass([
|
|
1046
|
-
|
|
817
|
+
Column7({ name: "password", type: "varchar" })
|
|
1047
818
|
], User.prototype, "password", 2);
|
|
1048
819
|
__decorateClass([
|
|
1049
|
-
|
|
820
|
+
Column7({
|
|
1050
821
|
name: "account_type",
|
|
1051
822
|
type: "enum",
|
|
1052
823
|
enum: AccountType,
|
|
@@ -1054,7 +825,7 @@ __decorateClass([
|
|
|
1054
825
|
})
|
|
1055
826
|
], User.prototype, "accountType", 2);
|
|
1056
827
|
__decorateClass([
|
|
1057
|
-
|
|
828
|
+
Column7({
|
|
1058
829
|
name: "account_status",
|
|
1059
830
|
type: "enum",
|
|
1060
831
|
enum: AccountStatus,
|
|
@@ -1062,20 +833,20 @@ __decorateClass([
|
|
|
1062
833
|
})
|
|
1063
834
|
], User.prototype, "accountStatus", 2);
|
|
1064
835
|
__decorateClass([
|
|
1065
|
-
|
|
836
|
+
Column7({ name: "is_email_verified", type: "boolean", default: false })
|
|
1066
837
|
], User.prototype, "isEmailVerified", 2);
|
|
1067
838
|
__decorateClass([
|
|
1068
|
-
|
|
839
|
+
Column7({ name: "is_mobile_verified", type: "boolean", default: false })
|
|
1069
840
|
], User.prototype, "isMobileVerified", 2);
|
|
1070
841
|
__decorateClass([
|
|
1071
|
-
|
|
842
|
+
Column7({
|
|
1072
843
|
name: "last_login_at",
|
|
1073
844
|
type: "timestamp with time zone",
|
|
1074
845
|
nullable: true
|
|
1075
846
|
})
|
|
1076
847
|
], User.prototype, "lastLoginAt", 2);
|
|
1077
848
|
__decorateClass([
|
|
1078
|
-
|
|
849
|
+
Column7({ name: "last_login_ip", type: "varchar", nullable: true })
|
|
1079
850
|
], User.prototype, "lastLoginIp", 2);
|
|
1080
851
|
__decorateClass([
|
|
1081
852
|
OneToMany2(() => RefreshToken, (token) => token.user)
|
|
@@ -1099,9 +870,321 @@ __decorateClass([
|
|
|
1099
870
|
OneToMany2(() => Job, (job) => job.user)
|
|
1100
871
|
], User.prototype, "jobs", 2);
|
|
1101
872
|
User = __decorateClass([
|
|
1102
|
-
|
|
873
|
+
Entity6("users")
|
|
1103
874
|
], User);
|
|
1104
875
|
|
|
876
|
+
// src/entities/company-profile.entity.ts
|
|
877
|
+
var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
|
|
878
|
+
KindOfHire2["FULLTIME"] = "FULLTIME";
|
|
879
|
+
KindOfHire2["SHORTTIME"] = "SHORTTIME";
|
|
880
|
+
KindOfHire2["BOTH"] = "BOTH";
|
|
881
|
+
return KindOfHire2;
|
|
882
|
+
})(KindOfHire || {});
|
|
883
|
+
var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
|
|
884
|
+
ModeOfHire2["ONSITE"] = "ONSITE";
|
|
885
|
+
ModeOfHire2["REMOTE"] = "REMOTE";
|
|
886
|
+
ModeOfHire2["BOTH"] = "BOTH";
|
|
887
|
+
return ModeOfHire2;
|
|
888
|
+
})(ModeOfHire || {});
|
|
889
|
+
var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
|
|
890
|
+
FromUsOn2["LINKEDIN"] = "LINKEDIN";
|
|
891
|
+
FromUsOn2["GOOGLE"] = "GOOGLE";
|
|
892
|
+
FromUsOn2["REFERRAL"] = "REFERRAL";
|
|
893
|
+
FromUsOn2["OTHER"] = "OTHER";
|
|
894
|
+
return FromUsOn2;
|
|
895
|
+
})(FromUsOn || {});
|
|
896
|
+
var CompanyProfile = class extends BaseEntity {
|
|
897
|
+
};
|
|
898
|
+
// individual index to find company profile by user
|
|
899
|
+
__decorateClass([
|
|
900
|
+
Column8({ name: "user_id", type: "integer", nullable: true }),
|
|
901
|
+
Index4()
|
|
902
|
+
], CompanyProfile.prototype, "userId", 2);
|
|
903
|
+
__decorateClass([
|
|
904
|
+
ManyToOne6(() => User, (user) => user.otps),
|
|
905
|
+
JoinColumn6({ name: "user_id" })
|
|
906
|
+
], CompanyProfile.prototype, "user", 2);
|
|
907
|
+
__decorateClass([
|
|
908
|
+
Column8({ name: "company_name", type: "varchar", nullable: true })
|
|
909
|
+
], CompanyProfile.prototype, "companyName", 2);
|
|
910
|
+
__decorateClass([
|
|
911
|
+
Column8({ name: "bio", type: "varchar", nullable: true })
|
|
912
|
+
], CompanyProfile.prototype, "bio", 2);
|
|
913
|
+
__decorateClass([
|
|
914
|
+
Column8({ name: "rating", type: "float", nullable: true })
|
|
915
|
+
], CompanyProfile.prototype, "rating", 2);
|
|
916
|
+
__decorateClass([
|
|
917
|
+
Column8({ name: "agreement", type: "varchar" })
|
|
918
|
+
], CompanyProfile.prototype, "agreement", 2);
|
|
919
|
+
__decorateClass([
|
|
920
|
+
Column8({ name: "skills", type: "text", nullable: true })
|
|
921
|
+
], CompanyProfile.prototype, "skills", 2);
|
|
922
|
+
__decorateClass([
|
|
923
|
+
Column8({ name: "required_freelancer", type: "varchar", nullable: true })
|
|
924
|
+
], CompanyProfile.prototype, "requiredFreelancer", 2);
|
|
925
|
+
__decorateClass([
|
|
926
|
+
Column8({
|
|
927
|
+
name: "kind_of_hiring",
|
|
928
|
+
type: "enum",
|
|
929
|
+
enum: KindOfHire,
|
|
930
|
+
nullable: true
|
|
931
|
+
})
|
|
932
|
+
], CompanyProfile.prototype, "kindOfHiring", 2);
|
|
933
|
+
__decorateClass([
|
|
934
|
+
Column8({
|
|
935
|
+
name: "mode_of_hire",
|
|
936
|
+
type: "enum",
|
|
937
|
+
enum: ModeOfHire,
|
|
938
|
+
nullable: true
|
|
939
|
+
})
|
|
940
|
+
], CompanyProfile.prototype, "modeOfHire", 2);
|
|
941
|
+
__decorateClass([
|
|
942
|
+
Column8({
|
|
943
|
+
name: "found_us_on",
|
|
944
|
+
type: "enum",
|
|
945
|
+
enum: FromUsOn,
|
|
946
|
+
nullable: true
|
|
947
|
+
})
|
|
948
|
+
], CompanyProfile.prototype, "foundUsOn", 2);
|
|
949
|
+
CompanyProfile = __decorateClass([
|
|
950
|
+
Entity7("company_profiles")
|
|
951
|
+
], CompanyProfile);
|
|
952
|
+
|
|
953
|
+
// src/modules/user/client-profile/dto/update-client-profile.dto.ts
|
|
954
|
+
var UpdateCompanyProfileDto = class {
|
|
955
|
+
};
|
|
956
|
+
__decorateClass([
|
|
957
|
+
IsNumber({}, { message: "User ID must be a number." })
|
|
958
|
+
], UpdateCompanyProfileDto.prototype, "userId", 2);
|
|
959
|
+
__decorateClass([
|
|
960
|
+
IsString8({ message: "Company name must be a string." })
|
|
961
|
+
], UpdateCompanyProfileDto.prototype, "companyName", 2);
|
|
962
|
+
__decorateClass([
|
|
963
|
+
IsOptional4(),
|
|
964
|
+
IsString8({ message: "Bio must be a string." })
|
|
965
|
+
], UpdateCompanyProfileDto.prototype, "bio", 2);
|
|
966
|
+
__decorateClass([
|
|
967
|
+
IsOptional4(),
|
|
968
|
+
IsNumber({}, { message: "Rating must be a numeric value." })
|
|
969
|
+
], UpdateCompanyProfileDto.prototype, "rating", 2);
|
|
970
|
+
__decorateClass([
|
|
971
|
+
IsString8({ message: "Agreement must be a string (e.g., a file URL or path)." })
|
|
972
|
+
], UpdateCompanyProfileDto.prototype, "agreement", 2);
|
|
973
|
+
__decorateClass([
|
|
974
|
+
IsOptional4(),
|
|
975
|
+
IsArray({ message: "Skills must be an array of strings." }),
|
|
976
|
+
IsString8({ each: true, message: "Each skill must be a string." })
|
|
977
|
+
], UpdateCompanyProfileDto.prototype, "skills", 2);
|
|
978
|
+
__decorateClass([
|
|
979
|
+
IsOptional4(),
|
|
980
|
+
IsString8({ message: "Required freelancer must be a string." })
|
|
981
|
+
], UpdateCompanyProfileDto.prototype, "requiredFreelancer", 2);
|
|
982
|
+
__decorateClass([
|
|
983
|
+
IsOptional4(),
|
|
984
|
+
IsEnum(KindOfHire, {
|
|
985
|
+
message: `Kind of hiring must be one of: ${Object.values(KindOfHire).join(", ")}`
|
|
986
|
+
})
|
|
987
|
+
], UpdateCompanyProfileDto.prototype, "kindOfHiring", 2);
|
|
988
|
+
__decorateClass([
|
|
989
|
+
IsOptional4(),
|
|
990
|
+
IsEnum(ModeOfHire, {
|
|
991
|
+
message: `Mode of hire must be one of: ${Object.values(ModeOfHire).join(", ")}`
|
|
992
|
+
})
|
|
993
|
+
], UpdateCompanyProfileDto.prototype, "modeOfHire", 2);
|
|
994
|
+
__decorateClass([
|
|
995
|
+
IsOptional4(),
|
|
996
|
+
IsEnum(FromUsOn, {
|
|
997
|
+
message: `Found us on must be one of: ${Object.values(FromUsOn).join(", ")}`
|
|
998
|
+
})
|
|
999
|
+
], UpdateCompanyProfileDto.prototype, "foundUsOn", 2);
|
|
1000
|
+
|
|
1001
|
+
// src/modules/user/client-profile/dto/update-client-logo.dto.ts
|
|
1002
|
+
import { IsString as IsString9 } from "class-validator";
|
|
1003
|
+
var UpdateCompanyLogoDto = class {
|
|
1004
|
+
};
|
|
1005
|
+
__decorateClass([
|
|
1006
|
+
IsString9({ message: "Logo must be a valid string URL or file path." })
|
|
1007
|
+
], UpdateCompanyLogoDto.prototype, "logo", 2);
|
|
1008
|
+
|
|
1009
|
+
// src/modules/question/pattern/pattern.ts
|
|
1010
|
+
var QUESTION_PATTERN = {
|
|
1011
|
+
fetchQuestions: "fetch.questions"
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
// src/modules/question/dto/create-question.dto.ts
|
|
1015
|
+
import {
|
|
1016
|
+
IsNotEmpty as IsNotEmpty13,
|
|
1017
|
+
IsOptional as IsOptional5,
|
|
1018
|
+
IsBoolean as IsBoolean4
|
|
1019
|
+
} from "class-validator";
|
|
1020
|
+
var CreateQuestionDto = class {
|
|
1021
|
+
};
|
|
1022
|
+
__decorateClass([
|
|
1023
|
+
IsNotEmpty13({ message: "Please enter unique id." })
|
|
1024
|
+
], CreateQuestionDto.prototype, "questionId", 2);
|
|
1025
|
+
__decorateClass([
|
|
1026
|
+
IsNotEmpty13({ message: "Please enter question." })
|
|
1027
|
+
], CreateQuestionDto.prototype, "question", 2);
|
|
1028
|
+
__decorateClass([
|
|
1029
|
+
IsNotEmpty13({ message: "Please enter for whom the question is." })
|
|
1030
|
+
], CreateQuestionDto.prototype, "questionFor", 2);
|
|
1031
|
+
__decorateClass([
|
|
1032
|
+
IsNotEmpty13({ message: "Please enter options." })
|
|
1033
|
+
], CreateQuestionDto.prototype, "options", 2);
|
|
1034
|
+
__decorateClass([
|
|
1035
|
+
IsOptional5(),
|
|
1036
|
+
IsBoolean4({ message: "Whether the question status active" })
|
|
1037
|
+
], CreateQuestionDto.prototype, "isActive", 2);
|
|
1038
|
+
|
|
1039
|
+
// src/modules/job/pattern/pattern.ts
|
|
1040
|
+
var JOB_ROLE_PATTERN = {
|
|
1041
|
+
fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
// src/adapters/tcp/user.tcp.adapter.ts
|
|
1045
|
+
import { config } from "dotenv";
|
|
1046
|
+
import { Transport } from "@nestjs/microservices";
|
|
1047
|
+
config();
|
|
1048
|
+
var UserTCPAdapter = () => {
|
|
1049
|
+
return {
|
|
1050
|
+
name: "USER_MICROSERVICE",
|
|
1051
|
+
transport: Transport.TCP,
|
|
1052
|
+
options: {
|
|
1053
|
+
host: process.env.USER_MICROSERVICE_TCP_HOST || "localhost",
|
|
1054
|
+
port: parseInt(process.env.USER_MICROSERVICE_TCP_PORT || "4001", 10)
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
// src/adapters/tcp/job.tcp.adapter.ts
|
|
1060
|
+
import { config as config2 } from "dotenv";
|
|
1061
|
+
import { Transport as Transport2 } from "@nestjs/microservices";
|
|
1062
|
+
config2();
|
|
1063
|
+
var JobTCPAdapter = () => {
|
|
1064
|
+
return {
|
|
1065
|
+
name: "JOB_MICROSERVICE",
|
|
1066
|
+
transport: Transport2.TCP,
|
|
1067
|
+
options: {
|
|
1068
|
+
host: process.env.JOB_MICROSERVICE_TCP_HOST || "localhost",
|
|
1069
|
+
port: parseInt(process.env.JOB_MICROSERVICE_TCP_PORT || "4002", 10)
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1074
|
+
// src/adapters/rmq/user.rmq.adapter.ts
|
|
1075
|
+
import { config as config3 } from "dotenv";
|
|
1076
|
+
import { Transport as Transport3 } from "@nestjs/microservices";
|
|
1077
|
+
config3();
|
|
1078
|
+
var UserRMQAdapter = (mode = "microservice") => {
|
|
1079
|
+
const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1080
|
+
"amqp://localhost:5672"
|
|
1081
|
+
];
|
|
1082
|
+
const queue = process.env.USER_MICROSERVICE_RMQ_QUEUE || "user_queue";
|
|
1083
|
+
const prefetchCount = parseInt(
|
|
1084
|
+
process.env.USER_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
|
|
1085
|
+
);
|
|
1086
|
+
const heartbeat = parseInt(
|
|
1087
|
+
process.env.USER_MICROSERVICE_RMQ_HEARTBEAT || "60"
|
|
1088
|
+
);
|
|
1089
|
+
const deadLetterExchange = process.env.USER_MICROSERVICE_RMQ_DLX || "user_dlx";
|
|
1090
|
+
const deadLetterQueue = process.env.USER_MICROSERVICE_RMQ_DLQ || "user_dlq";
|
|
1091
|
+
const messageTtl = parseInt(
|
|
1092
|
+
process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1093
|
+
);
|
|
1094
|
+
const config5 = {
|
|
1095
|
+
name: "USER_MICROSERVICE",
|
|
1096
|
+
transport: Transport3.RMQ,
|
|
1097
|
+
options: {
|
|
1098
|
+
urls,
|
|
1099
|
+
queue,
|
|
1100
|
+
prefetchCount,
|
|
1101
|
+
heartbeat,
|
|
1102
|
+
queueOptions: {
|
|
1103
|
+
durable: true,
|
|
1104
|
+
arguments: {
|
|
1105
|
+
"x-dead-letter-exchange": deadLetterExchange,
|
|
1106
|
+
"x-dead-letter-routing-key": deadLetterQueue,
|
|
1107
|
+
"x-message-ttl": messageTtl
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
connectionOptions: {
|
|
1111
|
+
heartbeat,
|
|
1112
|
+
retry: true,
|
|
1113
|
+
retryAttempts: 5,
|
|
1114
|
+
retryDelay: 3e3,
|
|
1115
|
+
timeout: 1e4,
|
|
1116
|
+
poolSize: parseInt(process.env.USER_MICROSERVICE_RMQ_POOL_SIZE || "5"),
|
|
1117
|
+
...process.env.USER_MICROSERVICE_RMQ_USE_SSL === "true" && {
|
|
1118
|
+
ssl: {
|
|
1119
|
+
rejectUnauthorized: false
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
if (mode === "microservice") {
|
|
1126
|
+
config5["options"]["noAck"] = false;
|
|
1127
|
+
}
|
|
1128
|
+
return config5;
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
// src/adapters/rmq/job.rmq.adapter.ts
|
|
1132
|
+
import { config as config4 } from "dotenv";
|
|
1133
|
+
import { Transport as Transport4 } from "@nestjs/microservices";
|
|
1134
|
+
config4();
|
|
1135
|
+
var JobRMQAdapter = (mode = "microservice") => {
|
|
1136
|
+
const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1137
|
+
"amqp://localhost:5672"
|
|
1138
|
+
];
|
|
1139
|
+
const queue = process.env.JOB_MICROSERVICE_RMQ_QUEUE || "job_queue";
|
|
1140
|
+
const prefetchCount = parseInt(
|
|
1141
|
+
process.env.JOB_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
|
|
1142
|
+
);
|
|
1143
|
+
const heartbeat = parseInt(
|
|
1144
|
+
process.env.JOB_MICROSERVICE_RMQ_HEARTBEAT || "60"
|
|
1145
|
+
);
|
|
1146
|
+
const deadLetterExchange = process.env.JOB_MICROSERVICE_RMQ_DLX || "job_dlx";
|
|
1147
|
+
const deadLetterQueue = process.env.JOB_MICROSERVICE_RMQ_DLQ || "job_dlq";
|
|
1148
|
+
const messageTtl = parseInt(
|
|
1149
|
+
process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1150
|
+
);
|
|
1151
|
+
const config5 = {
|
|
1152
|
+
name: "JOB_MICROSERVICE",
|
|
1153
|
+
transport: Transport4.RMQ,
|
|
1154
|
+
options: {
|
|
1155
|
+
urls,
|
|
1156
|
+
queue,
|
|
1157
|
+
prefetchCount,
|
|
1158
|
+
heartbeat,
|
|
1159
|
+
queueOptions: {
|
|
1160
|
+
durable: true,
|
|
1161
|
+
arguments: {
|
|
1162
|
+
"x-dead-letter-exchange": deadLetterExchange,
|
|
1163
|
+
"x-dead-letter-routing-key": deadLetterQueue,
|
|
1164
|
+
"x-message-ttl": messageTtl
|
|
1165
|
+
}
|
|
1166
|
+
},
|
|
1167
|
+
connectionOptions: {
|
|
1168
|
+
heartbeat,
|
|
1169
|
+
retry: true,
|
|
1170
|
+
retryAttempts: 5,
|
|
1171
|
+
retryDelay: 3e3,
|
|
1172
|
+
timeout: 1e4,
|
|
1173
|
+
poolSize: parseInt(process.env.JOB_MICROSERVICE_RMQ_POOL_SIZE || "5"),
|
|
1174
|
+
...process.env.JOB_MICROSERVICE_RMQ_USE_SSL === "true" && {
|
|
1175
|
+
ssl: {
|
|
1176
|
+
rejectUnauthorized: false
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
if (mode === "microservice") {
|
|
1183
|
+
config5["options"]["noAck"] = false;
|
|
1184
|
+
}
|
|
1185
|
+
return config5;
|
|
1186
|
+
};
|
|
1187
|
+
|
|
1105
1188
|
// src/entities/question.entity.ts
|
|
1106
1189
|
import { Entity as Entity8, Column as Column9 } from "typeorm";
|
|
1107
1190
|
var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
|
|
@@ -1162,6 +1245,7 @@ export {
|
|
|
1162
1245
|
AccountStatus,
|
|
1163
1246
|
AccountType,
|
|
1164
1247
|
BaseEntity,
|
|
1248
|
+
CLIENT_PROFILE_PATTERN,
|
|
1165
1249
|
ClientCreateAccountDto,
|
|
1166
1250
|
ClientProfileQuestionDto,
|
|
1167
1251
|
CompanyProfile,
|
|
@@ -1199,6 +1283,8 @@ export {
|
|
|
1199
1283
|
ResumeParserLog,
|
|
1200
1284
|
SUBADMIN_PATTERN,
|
|
1201
1285
|
TypeOfEmployment,
|
|
1286
|
+
UpdateCompanyLogoDto,
|
|
1287
|
+
UpdateCompanyProfileDto,
|
|
1202
1288
|
UpdateSubAdminAccountStatusDto,
|
|
1203
1289
|
UpdateSubAdminDto,
|
|
1204
1290
|
User,
|