@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/entities/company-profile.entity.d.ts +3 -0
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/job-entity.d.ts +32 -0
- package/dist/entities/refresh-token.entity.d.ts +1 -1
- package/dist/entities/user.entity.d.ts +2 -0
- package/dist/index.d.mts +158 -59
- package/dist/index.d.ts +158 -59
- package/dist/index.js +402 -232
- package/dist/index.mjs +410 -241
- 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
398
|
|
|
433
|
-
// src/
|
|
434
|
-
import {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
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
|
-
|
|
505
|
-
// src/adapters/rmq/job.rmq.adapter.ts
|
|
506
|
-
import { config as config4 } from "dotenv";
|
|
507
|
-
import { Transport as Transport4 } from "@nestjs/microservices";
|
|
508
|
-
config4();
|
|
509
|
-
var JobRMQAdapter = (mode = "microservice") => {
|
|
510
|
-
const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
511
|
-
"amqp://localhost:5672"
|
|
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 {
|
|
@@ -841,80 +687,84 @@ FreelancerProfile = __decorateClass([
|
|
|
841
687
|
Entity4("freelancer_profiles")
|
|
842
688
|
], FreelancerProfile);
|
|
843
689
|
|
|
844
|
-
// src/entities/
|
|
845
|
-
import {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
var
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
return
|
|
857
|
-
})(
|
|
858
|
-
var
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
FromUsOn2["REFERRAL"] = "REFERRAL";
|
|
868
|
-
FromUsOn2["OTHER"] = "OTHER";
|
|
869
|
-
return FromUsOn2;
|
|
870
|
-
})(FromUsOn || {});
|
|
871
|
-
var CompanyProfile = class extends BaseEntity {
|
|
690
|
+
// src/entities/job-entity.ts
|
|
691
|
+
import { Entity as Entity5, Column as Column6, Index as Index3, ManyToOne as ManyToOne5, JoinColumn as JoinColumn5 } from "typeorm";
|
|
692
|
+
var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
|
|
693
|
+
JobLocation2["ONSITE"] = "ONSITE";
|
|
694
|
+
JobLocation2["REMOTE"] = "REMOTE";
|
|
695
|
+
JobLocation2["BOTH"] = "BOTH";
|
|
696
|
+
return JobLocation2;
|
|
697
|
+
})(JobLocation || {});
|
|
698
|
+
var TypeOfEmployment = /* @__PURE__ */ ((TypeOfEmployment2) => {
|
|
699
|
+
TypeOfEmployment2["FULLTIME"] = "FULLTIME";
|
|
700
|
+
TypeOfEmployment2["PARTTIME"] = "PARTTIME";
|
|
701
|
+
TypeOfEmployment2["BOTH"] = "BOTH";
|
|
702
|
+
return TypeOfEmployment2;
|
|
703
|
+
})(TypeOfEmployment || {});
|
|
704
|
+
var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
|
|
705
|
+
JobStatus2["ACTIVE"] = "ACTIVE";
|
|
706
|
+
JobStatus2["OPEN"] = "OPEN";
|
|
707
|
+
JobStatus2["DRAFT"] = "DRAFT";
|
|
708
|
+
JobStatus2["ONHOLD"] = "ONHOLD";
|
|
709
|
+
JobStatus2["CLOSED"] = "CLOSED";
|
|
710
|
+
return JobStatus2;
|
|
711
|
+
})(JobStatus || {});
|
|
712
|
+
var Job = class extends BaseEntity {
|
|
872
713
|
};
|
|
873
|
-
|
|
714
|
+
__decorateClass([
|
|
715
|
+
Column6({ name: "job_id", type: "varchar", unique: true, nullable: true })
|
|
716
|
+
], Job.prototype, "jobId", 2);
|
|
717
|
+
// individual index to find jobs by user
|
|
874
718
|
__decorateClass([
|
|
875
719
|
Column6({ name: "user_id", type: "integer", nullable: true }),
|
|
876
720
|
Index3()
|
|
877
|
-
],
|
|
721
|
+
], Job.prototype, "userId", 2);
|
|
878
722
|
__decorateClass([
|
|
879
|
-
ManyToOne5(() => User, (user) => user.
|
|
723
|
+
ManyToOne5(() => User, (user) => user.jobs),
|
|
880
724
|
JoinColumn5({ name: "user_id" })
|
|
881
|
-
],
|
|
725
|
+
], Job.prototype, "user", 2);
|
|
882
726
|
__decorateClass([
|
|
883
|
-
Column6({ name: "
|
|
884
|
-
],
|
|
727
|
+
Column6({ name: "job_role", type: "varchar", nullable: true })
|
|
728
|
+
], Job.prototype, "jobRole", 2);
|
|
885
729
|
__decorateClass([
|
|
886
|
-
Column6({ name: "
|
|
887
|
-
],
|
|
730
|
+
Column6({ name: "note", type: "varchar", nullable: true })
|
|
731
|
+
], Job.prototype, "note", 2);
|
|
888
732
|
__decorateClass([
|
|
889
|
-
Column6({ name: "
|
|
890
|
-
],
|
|
733
|
+
Column6({ name: "openings", type: "integer", default: 0 })
|
|
734
|
+
], Job.prototype, "openings", 2);
|
|
891
735
|
__decorateClass([
|
|
892
736
|
Column6({
|
|
893
|
-
name: "
|
|
737
|
+
name: "location",
|
|
894
738
|
type: "enum",
|
|
895
|
-
enum:
|
|
739
|
+
enum: JobLocation,
|
|
896
740
|
nullable: true
|
|
897
741
|
})
|
|
898
|
-
],
|
|
742
|
+
], Job.prototype, "location", 2);
|
|
899
743
|
__decorateClass([
|
|
900
744
|
Column6({
|
|
901
|
-
name: "
|
|
745
|
+
name: "type_of_employment",
|
|
902
746
|
type: "enum",
|
|
903
|
-
enum:
|
|
747
|
+
enum: TypeOfEmployment,
|
|
904
748
|
nullable: true
|
|
905
749
|
})
|
|
906
|
-
],
|
|
750
|
+
], Job.prototype, "typeOfEmployment", 2);
|
|
751
|
+
__decorateClass([
|
|
752
|
+
Column6({ name: "additional_comment", type: "varchar", nullable: true })
|
|
753
|
+
], Job.prototype, "additionalComment", 2);
|
|
754
|
+
__decorateClass([
|
|
755
|
+
Column6({ name: "description", type: "varchar", nullable: true })
|
|
756
|
+
], Job.prototype, "description", 2);
|
|
907
757
|
__decorateClass([
|
|
908
758
|
Column6({
|
|
909
|
-
name: "
|
|
759
|
+
name: "status",
|
|
910
760
|
type: "enum",
|
|
911
|
-
enum:
|
|
912
|
-
|
|
761
|
+
enum: JobStatus,
|
|
762
|
+
default: "DRAFT" /* DRAFT */
|
|
913
763
|
})
|
|
914
|
-
],
|
|
915
|
-
|
|
916
|
-
Entity5("
|
|
917
|
-
],
|
|
764
|
+
], Job.prototype, "status", 2);
|
|
765
|
+
Job = __decorateClass([
|
|
766
|
+
Entity5("jobs")
|
|
767
|
+
], Job);
|
|
918
768
|
|
|
919
769
|
// src/entities/user.entity.ts
|
|
920
770
|
var AccountType = /* @__PURE__ */ ((AccountType2) => {
|
|
@@ -1014,17 +864,329 @@ __decorateClass([
|
|
|
1014
864
|
)
|
|
1015
865
|
], User.prototype, "freelancerProfile", 2);
|
|
1016
866
|
__decorateClass([
|
|
1017
|
-
OneToOne(
|
|
1018
|
-
() => CompanyProfile,
|
|
1019
|
-
(companyProfile) => companyProfile.user
|
|
1020
|
-
)
|
|
867
|
+
OneToOne(() => CompanyProfile, (companyProfile) => companyProfile.user)
|
|
1021
868
|
], User.prototype, "companyProfile", 2);
|
|
869
|
+
__decorateClass([
|
|
870
|
+
OneToMany2(() => Job, (job) => job.user)
|
|
871
|
+
], User.prototype, "jobs", 2);
|
|
1022
872
|
User = __decorateClass([
|
|
1023
873
|
Entity6("users")
|
|
1024
874
|
], User);
|
|
1025
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
|
+
|
|
1026
1188
|
// src/entities/question.entity.ts
|
|
1027
|
-
import { Entity as
|
|
1189
|
+
import { Entity as Entity8, Column as Column9 } from "typeorm";
|
|
1028
1190
|
var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
|
|
1029
1191
|
QuestionFor2["CLIENT"] = "CLIENT";
|
|
1030
1192
|
QuestionFor2["FREELANCER"] = "FREELANCER";
|
|
@@ -1033,16 +1195,16 @@ var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
|
|
|
1033
1195
|
var Question = class extends BaseEntity {
|
|
1034
1196
|
};
|
|
1035
1197
|
__decorateClass([
|
|
1036
|
-
|
|
1198
|
+
Column9({ name: "question", type: "varchar" })
|
|
1037
1199
|
], Question.prototype, "question", 2);
|
|
1038
1200
|
__decorateClass([
|
|
1039
|
-
|
|
1201
|
+
Column9({ name: "hint", type: "varchar", nullable: true })
|
|
1040
1202
|
], Question.prototype, "hint", 2);
|
|
1041
1203
|
__decorateClass([
|
|
1042
|
-
|
|
1204
|
+
Column9({ name: "slug", type: "varchar", nullable: true, unique: true })
|
|
1043
1205
|
], Question.prototype, "slug", 2);
|
|
1044
1206
|
__decorateClass([
|
|
1045
|
-
|
|
1207
|
+
Column9({
|
|
1046
1208
|
name: "question_for",
|
|
1047
1209
|
type: "enum",
|
|
1048
1210
|
enum: QuestionFor,
|
|
@@ -1050,39 +1212,40 @@ __decorateClass([
|
|
|
1050
1212
|
})
|
|
1051
1213
|
], Question.prototype, "questionFor", 2);
|
|
1052
1214
|
__decorateClass([
|
|
1053
|
-
|
|
1215
|
+
Column9({ name: "type", type: "varchar", nullable: true })
|
|
1054
1216
|
], Question.prototype, "type", 2);
|
|
1055
1217
|
__decorateClass([
|
|
1056
|
-
|
|
1218
|
+
Column9({ name: "options", type: "jsonb", nullable: true })
|
|
1057
1219
|
], Question.prototype, "options", 2);
|
|
1058
1220
|
__decorateClass([
|
|
1059
|
-
|
|
1221
|
+
Column9({ name: "is_active", type: "boolean", default: false })
|
|
1060
1222
|
], Question.prototype, "isActive", 2);
|
|
1061
1223
|
Question = __decorateClass([
|
|
1062
|
-
|
|
1224
|
+
Entity8("questions")
|
|
1063
1225
|
], Question);
|
|
1064
1226
|
|
|
1065
1227
|
// src/entities/job-role.entity.ts
|
|
1066
|
-
import { Entity as
|
|
1228
|
+
import { Entity as Entity9, Column as Column10 } from "typeorm";
|
|
1067
1229
|
var JobRoles = class extends BaseEntity {
|
|
1068
1230
|
};
|
|
1069
1231
|
__decorateClass([
|
|
1070
|
-
|
|
1232
|
+
Column10({ name: "slug", type: "varchar", nullable: true, unique: true })
|
|
1071
1233
|
], JobRoles.prototype, "slug", 2);
|
|
1072
1234
|
__decorateClass([
|
|
1073
|
-
|
|
1235
|
+
Column10({ name: "name", type: "varchar", nullable: true })
|
|
1074
1236
|
], JobRoles.prototype, "name", 2);
|
|
1075
1237
|
__decorateClass([
|
|
1076
|
-
|
|
1238
|
+
Column10({ name: "is_active", type: "boolean", default: true })
|
|
1077
1239
|
], JobRoles.prototype, "isActive", 2);
|
|
1078
1240
|
JobRoles = __decorateClass([
|
|
1079
|
-
|
|
1241
|
+
Entity9("job_roles")
|
|
1080
1242
|
], JobRoles);
|
|
1081
1243
|
export {
|
|
1082
1244
|
AUTHENTICATION_PATTERN,
|
|
1083
1245
|
AccountStatus,
|
|
1084
1246
|
AccountType,
|
|
1085
1247
|
BaseEntity,
|
|
1248
|
+
CLIENT_PROFILE_PATTERN,
|
|
1086
1249
|
ClientCreateAccountDto,
|
|
1087
1250
|
ClientProfileQuestionDto,
|
|
1088
1251
|
CompanyProfile,
|
|
@@ -1096,8 +1259,11 @@ export {
|
|
|
1096
1259
|
FreelancerWorkShowcaseDto,
|
|
1097
1260
|
FromUsOn,
|
|
1098
1261
|
JOB_ROLE_PATTERN,
|
|
1262
|
+
Job,
|
|
1263
|
+
JobLocation,
|
|
1099
1264
|
JobRMQAdapter,
|
|
1100
1265
|
JobRoles,
|
|
1266
|
+
JobStatus,
|
|
1101
1267
|
JobTCPAdapter,
|
|
1102
1268
|
KindOfHire,
|
|
1103
1269
|
LoginDto,
|
|
@@ -1116,6 +1282,9 @@ export {
|
|
|
1116
1282
|
RefreshToken,
|
|
1117
1283
|
ResumeParserLog,
|
|
1118
1284
|
SUBADMIN_PATTERN,
|
|
1285
|
+
TypeOfEmployment,
|
|
1286
|
+
UpdateCompanyLogoDto,
|
|
1287
|
+
UpdateCompanyProfileDto,
|
|
1119
1288
|
UpdateSubAdminAccountStatusDto,
|
|
1120
1289
|
UpdateSubAdminDto,
|
|
1121
1290
|
User,
|