@experts_hub/shared 1.0.100 → 1.0.102
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/adapters/index.d.ts +2 -0
- package/dist/adapters/rmq/notification.rmq.adapter.d.ts +2 -0
- package/dist/adapters/tcp/notification.tcp.adapter.d.ts +2 -0
- package/dist/entities/user.entity.d.ts +10 -0
- package/dist/index.d.mts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +117 -12
- package/dist/index.mjs +114 -12
- package/package.json +1 -1
package/dist/adapters/index.d.ts
CHANGED
|
@@ -18,6 +18,11 @@ export declare enum AccountStatus {
|
|
|
18
18
|
SUSPENDED = "SUSPENDED",
|
|
19
19
|
BLOCKED = "BLOCKED"
|
|
20
20
|
}
|
|
21
|
+
export declare enum Provider {
|
|
22
|
+
LINKEDIN = "LINKEDIN",
|
|
23
|
+
GOOGLE = "GOOGLE",
|
|
24
|
+
GITLABS = "GITLABS"
|
|
25
|
+
}
|
|
21
26
|
export declare class User extends BaseEntity {
|
|
22
27
|
uniqueId: string;
|
|
23
28
|
username: string;
|
|
@@ -39,6 +44,11 @@ export declare class User extends BaseEntity {
|
|
|
39
44
|
resetToken: string | null;
|
|
40
45
|
resetTokenExpireAt: Date | null;
|
|
41
46
|
refreshTokens: RefreshToken[];
|
|
47
|
+
provider: Provider;
|
|
48
|
+
providerToken: string;
|
|
49
|
+
linkedInId: string;
|
|
50
|
+
googleId: string;
|
|
51
|
+
gitLabsId: string;
|
|
42
52
|
otps: Otp[];
|
|
43
53
|
resumeParserLogs: ResumeParserLog[];
|
|
44
54
|
freelancerProfile: FreelancerProfile;
|
package/dist/index.d.mts
CHANGED
|
@@ -397,6 +397,11 @@ declare enum AccountStatus {
|
|
|
397
397
|
SUSPENDED = "SUSPENDED",
|
|
398
398
|
BLOCKED = "BLOCKED"
|
|
399
399
|
}
|
|
400
|
+
declare enum Provider {
|
|
401
|
+
LINKEDIN = "LINKEDIN",
|
|
402
|
+
GOOGLE = "GOOGLE",
|
|
403
|
+
GITLABS = "GITLABS"
|
|
404
|
+
}
|
|
400
405
|
declare class User extends BaseEntity {
|
|
401
406
|
uniqueId: string;
|
|
402
407
|
username: string;
|
|
@@ -418,6 +423,11 @@ declare class User extends BaseEntity {
|
|
|
418
423
|
resetToken: string | null;
|
|
419
424
|
resetTokenExpireAt: Date | null;
|
|
420
425
|
refreshTokens: RefreshToken[];
|
|
426
|
+
provider: Provider;
|
|
427
|
+
providerToken: string;
|
|
428
|
+
linkedInId: string;
|
|
429
|
+
googleId: string;
|
|
430
|
+
gitLabsId: string;
|
|
421
431
|
otps: Otp[];
|
|
422
432
|
resumeParserLogs: ResumeParserLog[];
|
|
423
433
|
freelancerProfile: FreelancerProfile;
|
|
@@ -666,10 +676,14 @@ declare const UserTCPAdapter: () => MicroserviceOptions;
|
|
|
666
676
|
|
|
667
677
|
declare const JobTCPAdapter: () => MicroserviceOptions;
|
|
668
678
|
|
|
679
|
+
declare const NotificationTCPAdapter: () => MicroserviceOptions;
|
|
680
|
+
|
|
669
681
|
declare const UserRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
670
682
|
|
|
671
683
|
declare const JobRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
672
684
|
|
|
685
|
+
declare const NotificationRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
686
|
+
|
|
673
687
|
declare enum QuestionFor {
|
|
674
688
|
CLIENT = "CLIENT",
|
|
675
689
|
FREELANCER = "FREELANCER"
|
|
@@ -694,4 +708,4 @@ declare class JobRoles extends BaseEntity {
|
|
|
694
708
|
isActive: boolean;
|
|
695
709
|
}
|
|
696
710
|
|
|
697
|
-
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BANK_PATTERN, BankAccountScope, BankAccountScopeEnum, BankAccountTypeEnum, BankDetail, BaseEntity, CLIENT_PROFILE_PATTERN, ClientChangePasswordDto, ClientCreateAccountDto, ClientProfileQuestionDto, CompanyProfile, CreateQuestionDto, CreateSubAdminDto, EmploymentType, FreelancerBankDetailsDto, FreelancerChangePasswordDto, FreelancerCreateAccountDto, FreelancerDevelopmentPreferenceDto, FreelancerProfile, FreelancerProfileQuestionDto, FreelancerUploadResumeDto, FreelancerWorkShowcaseDto, FromUsOn, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchClientProfileQuery, type IFetchClientProfileResponse, type IFetchQuestionQuery, type IFetchQuestionResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateClientLogoPayload, type IUpdateClientLogoResponse, type IUpdateClientPasswordPayload, type IUpdateClientProfilePayload, type IUpdateClientProfileResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JOB_PATTERN, JOB_ROLE_PATTERN, Job, JobAdditionalCommentDto, JobBasicInformationDto, JobDescriptionDto, JobIdParamDto, JobLocation, JobLocationEnum, JobRMQAdapter, JobRoles, JobSkill, JobStatus, JobStatusDto, JobStatusEnum, JobTCPAdapter, KindOfHire, LoginDto, LogoutDto, ModeOfHire, ModeOfWork, NatureOfWork, ONBOARDING_PATTERN, OTP_PATTERN, OnboardingStepEnum, Otp, PROFILE_PATTERN, QUESTION_PATTERN, Question, QuestionFor, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, ScopeEnum, Skill, Step, TypeOfEmploymentEnum, UpdateCompanyProfileDto, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
|
|
711
|
+
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BANK_PATTERN, BankAccountScope, BankAccountScopeEnum, BankAccountTypeEnum, BankDetail, BaseEntity, CLIENT_PROFILE_PATTERN, ClientChangePasswordDto, ClientCreateAccountDto, ClientProfileQuestionDto, CompanyProfile, CreateQuestionDto, CreateSubAdminDto, EmploymentType, FreelancerBankDetailsDto, FreelancerChangePasswordDto, FreelancerCreateAccountDto, FreelancerDevelopmentPreferenceDto, FreelancerProfile, FreelancerProfileQuestionDto, FreelancerUploadResumeDto, FreelancerWorkShowcaseDto, FromUsOn, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchClientProfileQuery, type IFetchClientProfileResponse, type IFetchQuestionQuery, type IFetchQuestionResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateClientLogoPayload, type IUpdateClientLogoResponse, type IUpdateClientPasswordPayload, type IUpdateClientProfilePayload, type IUpdateClientProfileResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JOB_PATTERN, JOB_ROLE_PATTERN, Job, JobAdditionalCommentDto, JobBasicInformationDto, JobDescriptionDto, JobIdParamDto, JobLocation, JobLocationEnum, JobRMQAdapter, JobRoles, JobSkill, JobStatus, JobStatusDto, JobStatusEnum, JobTCPAdapter, KindOfHire, LoginDto, LogoutDto, ModeOfHire, ModeOfWork, NatureOfWork, NotificationRMQAdapter, NotificationTCPAdapter, ONBOARDING_PATTERN, OTP_PATTERN, OnboardingStepEnum, Otp, PROFILE_PATTERN, Provider, QUESTION_PATTERN, Question, QuestionFor, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, ScopeEnum, Skill, Step, TypeOfEmploymentEnum, UpdateCompanyProfileDto, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
|
package/dist/index.d.ts
CHANGED
|
@@ -397,6 +397,11 @@ declare enum AccountStatus {
|
|
|
397
397
|
SUSPENDED = "SUSPENDED",
|
|
398
398
|
BLOCKED = "BLOCKED"
|
|
399
399
|
}
|
|
400
|
+
declare enum Provider {
|
|
401
|
+
LINKEDIN = "LINKEDIN",
|
|
402
|
+
GOOGLE = "GOOGLE",
|
|
403
|
+
GITLABS = "GITLABS"
|
|
404
|
+
}
|
|
400
405
|
declare class User extends BaseEntity {
|
|
401
406
|
uniqueId: string;
|
|
402
407
|
username: string;
|
|
@@ -418,6 +423,11 @@ declare class User extends BaseEntity {
|
|
|
418
423
|
resetToken: string | null;
|
|
419
424
|
resetTokenExpireAt: Date | null;
|
|
420
425
|
refreshTokens: RefreshToken[];
|
|
426
|
+
provider: Provider;
|
|
427
|
+
providerToken: string;
|
|
428
|
+
linkedInId: string;
|
|
429
|
+
googleId: string;
|
|
430
|
+
gitLabsId: string;
|
|
421
431
|
otps: Otp[];
|
|
422
432
|
resumeParserLogs: ResumeParserLog[];
|
|
423
433
|
freelancerProfile: FreelancerProfile;
|
|
@@ -666,10 +676,14 @@ declare const UserTCPAdapter: () => MicroserviceOptions;
|
|
|
666
676
|
|
|
667
677
|
declare const JobTCPAdapter: () => MicroserviceOptions;
|
|
668
678
|
|
|
679
|
+
declare const NotificationTCPAdapter: () => MicroserviceOptions;
|
|
680
|
+
|
|
669
681
|
declare const UserRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
670
682
|
|
|
671
683
|
declare const JobRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
672
684
|
|
|
685
|
+
declare const NotificationRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
686
|
+
|
|
673
687
|
declare enum QuestionFor {
|
|
674
688
|
CLIENT = "CLIENT",
|
|
675
689
|
FREELANCER = "FREELANCER"
|
|
@@ -694,4 +708,4 @@ declare class JobRoles extends BaseEntity {
|
|
|
694
708
|
isActive: boolean;
|
|
695
709
|
}
|
|
696
710
|
|
|
697
|
-
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BANK_PATTERN, BankAccountScope, BankAccountScopeEnum, BankAccountTypeEnum, BankDetail, BaseEntity, CLIENT_PROFILE_PATTERN, ClientChangePasswordDto, ClientCreateAccountDto, ClientProfileQuestionDto, CompanyProfile, CreateQuestionDto, CreateSubAdminDto, EmploymentType, FreelancerBankDetailsDto, FreelancerChangePasswordDto, FreelancerCreateAccountDto, FreelancerDevelopmentPreferenceDto, FreelancerProfile, FreelancerProfileQuestionDto, FreelancerUploadResumeDto, FreelancerWorkShowcaseDto, FromUsOn, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchClientProfileQuery, type IFetchClientProfileResponse, type IFetchQuestionQuery, type IFetchQuestionResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateClientLogoPayload, type IUpdateClientLogoResponse, type IUpdateClientPasswordPayload, type IUpdateClientProfilePayload, type IUpdateClientProfileResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JOB_PATTERN, JOB_ROLE_PATTERN, Job, JobAdditionalCommentDto, JobBasicInformationDto, JobDescriptionDto, JobIdParamDto, JobLocation, JobLocationEnum, JobRMQAdapter, JobRoles, JobSkill, JobStatus, JobStatusDto, JobStatusEnum, JobTCPAdapter, KindOfHire, LoginDto, LogoutDto, ModeOfHire, ModeOfWork, NatureOfWork, ONBOARDING_PATTERN, OTP_PATTERN, OnboardingStepEnum, Otp, PROFILE_PATTERN, QUESTION_PATTERN, Question, QuestionFor, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, ScopeEnum, Skill, Step, TypeOfEmploymentEnum, UpdateCompanyProfileDto, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
|
|
711
|
+
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BANK_PATTERN, BankAccountScope, BankAccountScopeEnum, BankAccountTypeEnum, BankDetail, BaseEntity, CLIENT_PROFILE_PATTERN, ClientChangePasswordDto, ClientCreateAccountDto, ClientProfileQuestionDto, CompanyProfile, CreateQuestionDto, CreateSubAdminDto, EmploymentType, FreelancerBankDetailsDto, FreelancerChangePasswordDto, FreelancerCreateAccountDto, FreelancerDevelopmentPreferenceDto, FreelancerProfile, FreelancerProfileQuestionDto, FreelancerUploadResumeDto, FreelancerWorkShowcaseDto, FromUsOn, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchClientProfileQuery, type IFetchClientProfileResponse, type IFetchQuestionQuery, type IFetchQuestionResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateClientLogoPayload, type IUpdateClientLogoResponse, type IUpdateClientPasswordPayload, type IUpdateClientProfilePayload, type IUpdateClientProfileResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JOB_PATTERN, JOB_ROLE_PATTERN, Job, JobAdditionalCommentDto, JobBasicInformationDto, JobDescriptionDto, JobIdParamDto, JobLocation, JobLocationEnum, JobRMQAdapter, JobRoles, JobSkill, JobStatus, JobStatusDto, JobStatusEnum, JobTCPAdapter, KindOfHire, LoginDto, LogoutDto, ModeOfHire, ModeOfWork, NatureOfWork, NotificationRMQAdapter, NotificationTCPAdapter, ONBOARDING_PATTERN, OTP_PATTERN, OnboardingStepEnum, Otp, PROFILE_PATTERN, Provider, QUESTION_PATTERN, Question, QuestionFor, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, ScopeEnum, Skill, Step, TypeOfEmploymentEnum, UpdateCompanyProfileDto, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
|
package/dist/index.js
CHANGED
|
@@ -75,11 +75,14 @@ __export(index_exports, {
|
|
|
75
75
|
ModeOfHire: () => ModeOfHire,
|
|
76
76
|
ModeOfWork: () => ModeOfWork,
|
|
77
77
|
NatureOfWork: () => NatureOfWork,
|
|
78
|
+
NotificationRMQAdapter: () => NotificationRMQAdapter,
|
|
79
|
+
NotificationTCPAdapter: () => NotificationTCPAdapter,
|
|
78
80
|
ONBOARDING_PATTERN: () => ONBOARDING_PATTERN,
|
|
79
81
|
OTP_PATTERN: () => OTP_PATTERN,
|
|
80
82
|
OnboardingStepEnum: () => OnboardingStepEnum,
|
|
81
83
|
Otp: () => Otp,
|
|
82
84
|
PROFILE_PATTERN: () => PROFILE_PATTERN,
|
|
85
|
+
Provider: () => Provider,
|
|
83
86
|
QUESTION_PATTERN: () => QUESTION_PATTERN,
|
|
84
87
|
Question: () => Question,
|
|
85
88
|
QuestionFor: () => QuestionFor,
|
|
@@ -991,6 +994,12 @@ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
|
|
|
991
994
|
AccountStatus2["BLOCKED"] = "BLOCKED";
|
|
992
995
|
return AccountStatus2;
|
|
993
996
|
})(AccountStatus || {});
|
|
997
|
+
var Provider = /* @__PURE__ */ ((Provider2) => {
|
|
998
|
+
Provider2["LINKEDIN"] = "LINKEDIN";
|
|
999
|
+
Provider2["GOOGLE"] = "GOOGLE";
|
|
1000
|
+
Provider2["GITLABS"] = "GITLABS";
|
|
1001
|
+
return Provider2;
|
|
1002
|
+
})(Provider || {});
|
|
994
1003
|
var User = class extends BaseEntity {
|
|
995
1004
|
};
|
|
996
1005
|
__decorateClass([
|
|
@@ -1067,6 +1076,27 @@ __decorateClass([
|
|
|
1067
1076
|
__decorateClass([
|
|
1068
1077
|
(0, import_typeorm10.OneToMany)(() => RefreshToken, (token) => token.user)
|
|
1069
1078
|
], User.prototype, "refreshTokens", 2);
|
|
1079
|
+
__decorateClass([
|
|
1080
|
+
(0, import_typeorm10.Column)({
|
|
1081
|
+
name: "provider",
|
|
1082
|
+
type: "enum",
|
|
1083
|
+
enum: Provider,
|
|
1084
|
+
default: null,
|
|
1085
|
+
nullable: true
|
|
1086
|
+
})
|
|
1087
|
+
], User.prototype, "provider", 2);
|
|
1088
|
+
__decorateClass([
|
|
1089
|
+
(0, import_typeorm10.Column)({ name: "provider_token", type: "varchar", nullable: true })
|
|
1090
|
+
], User.prototype, "providerToken", 2);
|
|
1091
|
+
__decorateClass([
|
|
1092
|
+
(0, import_typeorm10.Column)({ name: "linkedin_id", type: "varchar", nullable: true })
|
|
1093
|
+
], User.prototype, "linkedInId", 2);
|
|
1094
|
+
__decorateClass([
|
|
1095
|
+
(0, import_typeorm10.Column)({ name: "google_id", type: "varchar", nullable: true })
|
|
1096
|
+
], User.prototype, "googleId", 2);
|
|
1097
|
+
__decorateClass([
|
|
1098
|
+
(0, import_typeorm10.Column)({ name: "gitlabs_id", type: "varchar", nullable: true })
|
|
1099
|
+
], User.prototype, "gitLabsId", 2);
|
|
1070
1100
|
__decorateClass([
|
|
1071
1101
|
(0, import_typeorm10.OneToMany)(() => Otp, (otp) => otp.user)
|
|
1072
1102
|
], User.prototype, "otps", 2);
|
|
@@ -1535,10 +1565,25 @@ var JobTCPAdapter = () => {
|
|
|
1535
1565
|
};
|
|
1536
1566
|
};
|
|
1537
1567
|
|
|
1538
|
-
// src/adapters/
|
|
1568
|
+
// src/adapters/tcp/notification.tcp.adapter.ts
|
|
1539
1569
|
var import_dotenv3 = require("dotenv");
|
|
1540
1570
|
var import_microservices3 = require("@nestjs/microservices");
|
|
1541
1571
|
(0, import_dotenv3.config)();
|
|
1572
|
+
var NotificationTCPAdapter = () => {
|
|
1573
|
+
return {
|
|
1574
|
+
name: "NOTIFICATION_MICROSERVICE",
|
|
1575
|
+
transport: import_microservices3.Transport.TCP,
|
|
1576
|
+
options: {
|
|
1577
|
+
host: process.env.NOTIFICATION_MICROSERVICE_TCP_HOST || "localhost",
|
|
1578
|
+
port: parseInt(process.env.NOTIFICATION_MICROSERVICE_TCP_PORT || "4003", 10)
|
|
1579
|
+
}
|
|
1580
|
+
};
|
|
1581
|
+
};
|
|
1582
|
+
|
|
1583
|
+
// src/adapters/rmq/user.rmq.adapter.ts
|
|
1584
|
+
var import_dotenv4 = require("dotenv");
|
|
1585
|
+
var import_microservices4 = require("@nestjs/microservices");
|
|
1586
|
+
(0, import_dotenv4.config)();
|
|
1542
1587
|
var UserRMQAdapter = (mode = "microservice") => {
|
|
1543
1588
|
const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1544
1589
|
"amqp://localhost:5672"
|
|
@@ -1555,9 +1600,9 @@ var UserRMQAdapter = (mode = "microservice") => {
|
|
|
1555
1600
|
const messageTtl = parseInt(
|
|
1556
1601
|
process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1557
1602
|
);
|
|
1558
|
-
const
|
|
1603
|
+
const config7 = {
|
|
1559
1604
|
name: "USER_MICROSERVICE",
|
|
1560
|
-
transport:
|
|
1605
|
+
transport: import_microservices4.Transport.RMQ,
|
|
1561
1606
|
options: {
|
|
1562
1607
|
urls,
|
|
1563
1608
|
queue,
|
|
@@ -1587,15 +1632,15 @@ var UserRMQAdapter = (mode = "microservice") => {
|
|
|
1587
1632
|
}
|
|
1588
1633
|
};
|
|
1589
1634
|
if (mode === "microservice") {
|
|
1590
|
-
|
|
1635
|
+
config7["options"]["noAck"] = false;
|
|
1591
1636
|
}
|
|
1592
|
-
return
|
|
1637
|
+
return config7;
|
|
1593
1638
|
};
|
|
1594
1639
|
|
|
1595
1640
|
// src/adapters/rmq/job.rmq.adapter.ts
|
|
1596
|
-
var
|
|
1597
|
-
var
|
|
1598
|
-
(0,
|
|
1641
|
+
var import_dotenv5 = require("dotenv");
|
|
1642
|
+
var import_microservices5 = require("@nestjs/microservices");
|
|
1643
|
+
(0, import_dotenv5.config)();
|
|
1599
1644
|
var JobRMQAdapter = (mode = "microservice") => {
|
|
1600
1645
|
const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1601
1646
|
"amqp://localhost:5672"
|
|
@@ -1612,9 +1657,9 @@ var JobRMQAdapter = (mode = "microservice") => {
|
|
|
1612
1657
|
const messageTtl = parseInt(
|
|
1613
1658
|
process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1614
1659
|
);
|
|
1615
|
-
const
|
|
1660
|
+
const config7 = {
|
|
1616
1661
|
name: "JOB_MICROSERVICE",
|
|
1617
|
-
transport:
|
|
1662
|
+
transport: import_microservices5.Transport.RMQ,
|
|
1618
1663
|
options: {
|
|
1619
1664
|
urls,
|
|
1620
1665
|
queue,
|
|
@@ -1644,9 +1689,66 @@ var JobRMQAdapter = (mode = "microservice") => {
|
|
|
1644
1689
|
}
|
|
1645
1690
|
};
|
|
1646
1691
|
if (mode === "microservice") {
|
|
1647
|
-
|
|
1692
|
+
config7["options"]["noAck"] = false;
|
|
1693
|
+
}
|
|
1694
|
+
return config7;
|
|
1695
|
+
};
|
|
1696
|
+
|
|
1697
|
+
// src/adapters/rmq/notification.rmq.adapter.ts
|
|
1698
|
+
var import_dotenv6 = require("dotenv");
|
|
1699
|
+
var import_microservices6 = require("@nestjs/microservices");
|
|
1700
|
+
(0, import_dotenv6.config)();
|
|
1701
|
+
var NotificationRMQAdapter = (mode = "microservice") => {
|
|
1702
|
+
const urls = process.env.NOTIFICATION_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1703
|
+
"amqp://localhost:5672"
|
|
1704
|
+
];
|
|
1705
|
+
const queue = process.env.NOTIFICATION_MICROSERVICE_RMQ_QUEUE || "notification_queue";
|
|
1706
|
+
const prefetchCount = parseInt(
|
|
1707
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
|
|
1708
|
+
);
|
|
1709
|
+
const heartbeat = parseInt(
|
|
1710
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_HEARTBEAT || "60"
|
|
1711
|
+
);
|
|
1712
|
+
const deadLetterExchange = process.env.NOTIFICATION_MICROSERVICE_RMQ_DLX || "notification_dlx";
|
|
1713
|
+
const deadLetterQueue = process.env.NOTIFICATION_MICROSERVICE_RMQ_DLQ || "notification_dlq";
|
|
1714
|
+
const messageTtl = parseInt(
|
|
1715
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1716
|
+
);
|
|
1717
|
+
const config7 = {
|
|
1718
|
+
name: "NOTIFICATION_MICROSERVICE",
|
|
1719
|
+
transport: import_microservices6.Transport.RMQ,
|
|
1720
|
+
options: {
|
|
1721
|
+
urls,
|
|
1722
|
+
queue,
|
|
1723
|
+
prefetchCount,
|
|
1724
|
+
heartbeat,
|
|
1725
|
+
queueOptions: {
|
|
1726
|
+
durable: true,
|
|
1727
|
+
arguments: {
|
|
1728
|
+
"x-dead-letter-exchange": deadLetterExchange,
|
|
1729
|
+
"x-dead-letter-routing-key": deadLetterQueue,
|
|
1730
|
+
"x-message-ttl": messageTtl
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
connectionOptions: {
|
|
1734
|
+
heartbeat,
|
|
1735
|
+
retry: true,
|
|
1736
|
+
retryAttempts: 5,
|
|
1737
|
+
retryDelay: 3e3,
|
|
1738
|
+
timeout: 1e4,
|
|
1739
|
+
poolSize: parseInt(process.env.NOTIFICATION_MICROSERVICE_RMQ_POOL_SIZE || "5"),
|
|
1740
|
+
...process.env.NOTIFICATION_MICROSERVICE_RMQ_USE_SSL === "true" && {
|
|
1741
|
+
ssl: {
|
|
1742
|
+
rejectUnauthorized: false
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
};
|
|
1748
|
+
if (mode === "microservice") {
|
|
1749
|
+
config7["options"]["noAck"] = false;
|
|
1648
1750
|
}
|
|
1649
|
-
return
|
|
1751
|
+
return config7;
|
|
1650
1752
|
};
|
|
1651
1753
|
|
|
1652
1754
|
// src/entities/question.entity.ts
|
|
@@ -1754,11 +1856,14 @@ JobRoles = __decorateClass([
|
|
|
1754
1856
|
ModeOfHire,
|
|
1755
1857
|
ModeOfWork,
|
|
1756
1858
|
NatureOfWork,
|
|
1859
|
+
NotificationRMQAdapter,
|
|
1860
|
+
NotificationTCPAdapter,
|
|
1757
1861
|
ONBOARDING_PATTERN,
|
|
1758
1862
|
OTP_PATTERN,
|
|
1759
1863
|
OnboardingStepEnum,
|
|
1760
1864
|
Otp,
|
|
1761
1865
|
PROFILE_PATTERN,
|
|
1866
|
+
Provider,
|
|
1762
1867
|
QUESTION_PATTERN,
|
|
1763
1868
|
Question,
|
|
1764
1869
|
QuestionFor,
|
package/dist/index.mjs
CHANGED
|
@@ -999,6 +999,12 @@ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
|
|
|
999
999
|
AccountStatus2["BLOCKED"] = "BLOCKED";
|
|
1000
1000
|
return AccountStatus2;
|
|
1001
1001
|
})(AccountStatus || {});
|
|
1002
|
+
var Provider = /* @__PURE__ */ ((Provider2) => {
|
|
1003
|
+
Provider2["LINKEDIN"] = "LINKEDIN";
|
|
1004
|
+
Provider2["GOOGLE"] = "GOOGLE";
|
|
1005
|
+
Provider2["GITLABS"] = "GITLABS";
|
|
1006
|
+
return Provider2;
|
|
1007
|
+
})(Provider || {});
|
|
1002
1008
|
var User = class extends BaseEntity {
|
|
1003
1009
|
};
|
|
1004
1010
|
__decorateClass([
|
|
@@ -1075,6 +1081,27 @@ __decorateClass([
|
|
|
1075
1081
|
__decorateClass([
|
|
1076
1082
|
OneToMany5(() => RefreshToken, (token) => token.user)
|
|
1077
1083
|
], User.prototype, "refreshTokens", 2);
|
|
1084
|
+
__decorateClass([
|
|
1085
|
+
Column10({
|
|
1086
|
+
name: "provider",
|
|
1087
|
+
type: "enum",
|
|
1088
|
+
enum: Provider,
|
|
1089
|
+
default: null,
|
|
1090
|
+
nullable: true
|
|
1091
|
+
})
|
|
1092
|
+
], User.prototype, "provider", 2);
|
|
1093
|
+
__decorateClass([
|
|
1094
|
+
Column10({ name: "provider_token", type: "varchar", nullable: true })
|
|
1095
|
+
], User.prototype, "providerToken", 2);
|
|
1096
|
+
__decorateClass([
|
|
1097
|
+
Column10({ name: "linkedin_id", type: "varchar", nullable: true })
|
|
1098
|
+
], User.prototype, "linkedInId", 2);
|
|
1099
|
+
__decorateClass([
|
|
1100
|
+
Column10({ name: "google_id", type: "varchar", nullable: true })
|
|
1101
|
+
], User.prototype, "googleId", 2);
|
|
1102
|
+
__decorateClass([
|
|
1103
|
+
Column10({ name: "gitlabs_id", type: "varchar", nullable: true })
|
|
1104
|
+
], User.prototype, "gitLabsId", 2);
|
|
1078
1105
|
__decorateClass([
|
|
1079
1106
|
OneToMany5(() => Otp, (otp) => otp.user)
|
|
1080
1107
|
], User.prototype, "otps", 2);
|
|
@@ -1573,10 +1600,25 @@ var JobTCPAdapter = () => {
|
|
|
1573
1600
|
};
|
|
1574
1601
|
};
|
|
1575
1602
|
|
|
1576
|
-
// src/adapters/
|
|
1603
|
+
// src/adapters/tcp/notification.tcp.adapter.ts
|
|
1577
1604
|
import { config as config3 } from "dotenv";
|
|
1578
1605
|
import { Transport as Transport3 } from "@nestjs/microservices";
|
|
1579
1606
|
config3();
|
|
1607
|
+
var NotificationTCPAdapter = () => {
|
|
1608
|
+
return {
|
|
1609
|
+
name: "NOTIFICATION_MICROSERVICE",
|
|
1610
|
+
transport: Transport3.TCP,
|
|
1611
|
+
options: {
|
|
1612
|
+
host: process.env.NOTIFICATION_MICROSERVICE_TCP_HOST || "localhost",
|
|
1613
|
+
port: parseInt(process.env.NOTIFICATION_MICROSERVICE_TCP_PORT || "4003", 10)
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
// src/adapters/rmq/user.rmq.adapter.ts
|
|
1619
|
+
import { config as config4 } from "dotenv";
|
|
1620
|
+
import { Transport as Transport4 } from "@nestjs/microservices";
|
|
1621
|
+
config4();
|
|
1580
1622
|
var UserRMQAdapter = (mode = "microservice") => {
|
|
1581
1623
|
const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1582
1624
|
"amqp://localhost:5672"
|
|
@@ -1593,9 +1635,9 @@ var UserRMQAdapter = (mode = "microservice") => {
|
|
|
1593
1635
|
const messageTtl = parseInt(
|
|
1594
1636
|
process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1595
1637
|
);
|
|
1596
|
-
const
|
|
1638
|
+
const config7 = {
|
|
1597
1639
|
name: "USER_MICROSERVICE",
|
|
1598
|
-
transport:
|
|
1640
|
+
transport: Transport4.RMQ,
|
|
1599
1641
|
options: {
|
|
1600
1642
|
urls,
|
|
1601
1643
|
queue,
|
|
@@ -1625,15 +1667,15 @@ var UserRMQAdapter = (mode = "microservice") => {
|
|
|
1625
1667
|
}
|
|
1626
1668
|
};
|
|
1627
1669
|
if (mode === "microservice") {
|
|
1628
|
-
|
|
1670
|
+
config7["options"]["noAck"] = false;
|
|
1629
1671
|
}
|
|
1630
|
-
return
|
|
1672
|
+
return config7;
|
|
1631
1673
|
};
|
|
1632
1674
|
|
|
1633
1675
|
// src/adapters/rmq/job.rmq.adapter.ts
|
|
1634
|
-
import { config as
|
|
1635
|
-
import { Transport as
|
|
1636
|
-
|
|
1676
|
+
import { config as config5 } from "dotenv";
|
|
1677
|
+
import { Transport as Transport5 } from "@nestjs/microservices";
|
|
1678
|
+
config5();
|
|
1637
1679
|
var JobRMQAdapter = (mode = "microservice") => {
|
|
1638
1680
|
const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1639
1681
|
"amqp://localhost:5672"
|
|
@@ -1650,9 +1692,9 @@ var JobRMQAdapter = (mode = "microservice") => {
|
|
|
1650
1692
|
const messageTtl = parseInt(
|
|
1651
1693
|
process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1652
1694
|
);
|
|
1653
|
-
const
|
|
1695
|
+
const config7 = {
|
|
1654
1696
|
name: "JOB_MICROSERVICE",
|
|
1655
|
-
transport:
|
|
1697
|
+
transport: Transport5.RMQ,
|
|
1656
1698
|
options: {
|
|
1657
1699
|
urls,
|
|
1658
1700
|
queue,
|
|
@@ -1682,9 +1724,66 @@ var JobRMQAdapter = (mode = "microservice") => {
|
|
|
1682
1724
|
}
|
|
1683
1725
|
};
|
|
1684
1726
|
if (mode === "microservice") {
|
|
1685
|
-
|
|
1727
|
+
config7["options"]["noAck"] = false;
|
|
1728
|
+
}
|
|
1729
|
+
return config7;
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1732
|
+
// src/adapters/rmq/notification.rmq.adapter.ts
|
|
1733
|
+
import { config as config6 } from "dotenv";
|
|
1734
|
+
import { Transport as Transport6 } from "@nestjs/microservices";
|
|
1735
|
+
config6();
|
|
1736
|
+
var NotificationRMQAdapter = (mode = "microservice") => {
|
|
1737
|
+
const urls = process.env.NOTIFICATION_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1738
|
+
"amqp://localhost:5672"
|
|
1739
|
+
];
|
|
1740
|
+
const queue = process.env.NOTIFICATION_MICROSERVICE_RMQ_QUEUE || "notification_queue";
|
|
1741
|
+
const prefetchCount = parseInt(
|
|
1742
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
|
|
1743
|
+
);
|
|
1744
|
+
const heartbeat = parseInt(
|
|
1745
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_HEARTBEAT || "60"
|
|
1746
|
+
);
|
|
1747
|
+
const deadLetterExchange = process.env.NOTIFICATION_MICROSERVICE_RMQ_DLX || "notification_dlx";
|
|
1748
|
+
const deadLetterQueue = process.env.NOTIFICATION_MICROSERVICE_RMQ_DLQ || "notification_dlq";
|
|
1749
|
+
const messageTtl = parseInt(
|
|
1750
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1751
|
+
);
|
|
1752
|
+
const config7 = {
|
|
1753
|
+
name: "NOTIFICATION_MICROSERVICE",
|
|
1754
|
+
transport: Transport6.RMQ,
|
|
1755
|
+
options: {
|
|
1756
|
+
urls,
|
|
1757
|
+
queue,
|
|
1758
|
+
prefetchCount,
|
|
1759
|
+
heartbeat,
|
|
1760
|
+
queueOptions: {
|
|
1761
|
+
durable: true,
|
|
1762
|
+
arguments: {
|
|
1763
|
+
"x-dead-letter-exchange": deadLetterExchange,
|
|
1764
|
+
"x-dead-letter-routing-key": deadLetterQueue,
|
|
1765
|
+
"x-message-ttl": messageTtl
|
|
1766
|
+
}
|
|
1767
|
+
},
|
|
1768
|
+
connectionOptions: {
|
|
1769
|
+
heartbeat,
|
|
1770
|
+
retry: true,
|
|
1771
|
+
retryAttempts: 5,
|
|
1772
|
+
retryDelay: 3e3,
|
|
1773
|
+
timeout: 1e4,
|
|
1774
|
+
poolSize: parseInt(process.env.NOTIFICATION_MICROSERVICE_RMQ_POOL_SIZE || "5"),
|
|
1775
|
+
...process.env.NOTIFICATION_MICROSERVICE_RMQ_USE_SSL === "true" && {
|
|
1776
|
+
ssl: {
|
|
1777
|
+
rejectUnauthorized: false
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
};
|
|
1783
|
+
if (mode === "microservice") {
|
|
1784
|
+
config7["options"]["noAck"] = false;
|
|
1686
1785
|
}
|
|
1687
|
-
return
|
|
1786
|
+
return config7;
|
|
1688
1787
|
};
|
|
1689
1788
|
|
|
1690
1789
|
// src/entities/question.entity.ts
|
|
@@ -1791,11 +1890,14 @@ export {
|
|
|
1791
1890
|
ModeOfHire,
|
|
1792
1891
|
ModeOfWork,
|
|
1793
1892
|
NatureOfWork,
|
|
1893
|
+
NotificationRMQAdapter,
|
|
1894
|
+
NotificationTCPAdapter,
|
|
1794
1895
|
ONBOARDING_PATTERN,
|
|
1795
1896
|
OTP_PATTERN,
|
|
1796
1897
|
OnboardingStepEnum,
|
|
1797
1898
|
Otp,
|
|
1798
1899
|
PROFILE_PATTERN,
|
|
1900
|
+
Provider,
|
|
1799
1901
|
QUESTION_PATTERN,
|
|
1800
1902
|
Question,
|
|
1801
1903
|
QuestionFor,
|