@experts_hub/shared 1.0.100 → 1.0.101
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/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +88 -12
- package/dist/index.mjs +86 -12
- package/package.json +1 -1
package/dist/adapters/index.d.ts
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -666,10 +666,14 @@ declare const UserTCPAdapter: () => MicroserviceOptions;
|
|
|
666
666
|
|
|
667
667
|
declare const JobTCPAdapter: () => MicroserviceOptions;
|
|
668
668
|
|
|
669
|
+
declare const NotificationTCPAdapter: () => MicroserviceOptions;
|
|
670
|
+
|
|
669
671
|
declare const UserRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
670
672
|
|
|
671
673
|
declare const JobRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
672
674
|
|
|
675
|
+
declare const NotificationRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
676
|
+
|
|
673
677
|
declare enum QuestionFor {
|
|
674
678
|
CLIENT = "CLIENT",
|
|
675
679
|
FREELANCER = "FREELANCER"
|
|
@@ -694,4 +698,4 @@ declare class JobRoles extends BaseEntity {
|
|
|
694
698
|
isActive: boolean;
|
|
695
699
|
}
|
|
696
700
|
|
|
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 };
|
|
701
|
+
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, 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
|
@@ -666,10 +666,14 @@ declare const UserTCPAdapter: () => MicroserviceOptions;
|
|
|
666
666
|
|
|
667
667
|
declare const JobTCPAdapter: () => MicroserviceOptions;
|
|
668
668
|
|
|
669
|
+
declare const NotificationTCPAdapter: () => MicroserviceOptions;
|
|
670
|
+
|
|
669
671
|
declare const UserRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
670
672
|
|
|
671
673
|
declare const JobRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
672
674
|
|
|
675
|
+
declare const NotificationRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
676
|
+
|
|
673
677
|
declare enum QuestionFor {
|
|
674
678
|
CLIENT = "CLIENT",
|
|
675
679
|
FREELANCER = "FREELANCER"
|
|
@@ -694,4 +698,4 @@ declare class JobRoles extends BaseEntity {
|
|
|
694
698
|
isActive: boolean;
|
|
695
699
|
}
|
|
696
700
|
|
|
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 };
|
|
701
|
+
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, 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,6 +75,8 @@ __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,
|
|
@@ -1535,10 +1537,25 @@ var JobTCPAdapter = () => {
|
|
|
1535
1537
|
};
|
|
1536
1538
|
};
|
|
1537
1539
|
|
|
1538
|
-
// src/adapters/
|
|
1540
|
+
// src/adapters/tcp/notification.tcp.adapter.ts
|
|
1539
1541
|
var import_dotenv3 = require("dotenv");
|
|
1540
1542
|
var import_microservices3 = require("@nestjs/microservices");
|
|
1541
1543
|
(0, import_dotenv3.config)();
|
|
1544
|
+
var NotificationTCPAdapter = () => {
|
|
1545
|
+
return {
|
|
1546
|
+
name: "NOTIFICATION_MICROSERVICE",
|
|
1547
|
+
transport: import_microservices3.Transport.TCP,
|
|
1548
|
+
options: {
|
|
1549
|
+
host: process.env.NOTIFICATION_MICROSERVICE_TCP_HOST || "localhost",
|
|
1550
|
+
port: parseInt(process.env.NOTIFICATION_MICROSERVICE_TCP_PORT || "4003", 10)
|
|
1551
|
+
}
|
|
1552
|
+
};
|
|
1553
|
+
};
|
|
1554
|
+
|
|
1555
|
+
// src/adapters/rmq/user.rmq.adapter.ts
|
|
1556
|
+
var import_dotenv4 = require("dotenv");
|
|
1557
|
+
var import_microservices4 = require("@nestjs/microservices");
|
|
1558
|
+
(0, import_dotenv4.config)();
|
|
1542
1559
|
var UserRMQAdapter = (mode = "microservice") => {
|
|
1543
1560
|
const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1544
1561
|
"amqp://localhost:5672"
|
|
@@ -1555,9 +1572,9 @@ var UserRMQAdapter = (mode = "microservice") => {
|
|
|
1555
1572
|
const messageTtl = parseInt(
|
|
1556
1573
|
process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1557
1574
|
);
|
|
1558
|
-
const
|
|
1575
|
+
const config7 = {
|
|
1559
1576
|
name: "USER_MICROSERVICE",
|
|
1560
|
-
transport:
|
|
1577
|
+
transport: import_microservices4.Transport.RMQ,
|
|
1561
1578
|
options: {
|
|
1562
1579
|
urls,
|
|
1563
1580
|
queue,
|
|
@@ -1587,15 +1604,15 @@ var UserRMQAdapter = (mode = "microservice") => {
|
|
|
1587
1604
|
}
|
|
1588
1605
|
};
|
|
1589
1606
|
if (mode === "microservice") {
|
|
1590
|
-
|
|
1607
|
+
config7["options"]["noAck"] = false;
|
|
1591
1608
|
}
|
|
1592
|
-
return
|
|
1609
|
+
return config7;
|
|
1593
1610
|
};
|
|
1594
1611
|
|
|
1595
1612
|
// src/adapters/rmq/job.rmq.adapter.ts
|
|
1596
|
-
var
|
|
1597
|
-
var
|
|
1598
|
-
(0,
|
|
1613
|
+
var import_dotenv5 = require("dotenv");
|
|
1614
|
+
var import_microservices5 = require("@nestjs/microservices");
|
|
1615
|
+
(0, import_dotenv5.config)();
|
|
1599
1616
|
var JobRMQAdapter = (mode = "microservice") => {
|
|
1600
1617
|
const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1601
1618
|
"amqp://localhost:5672"
|
|
@@ -1612,9 +1629,9 @@ var JobRMQAdapter = (mode = "microservice") => {
|
|
|
1612
1629
|
const messageTtl = parseInt(
|
|
1613
1630
|
process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1614
1631
|
);
|
|
1615
|
-
const
|
|
1632
|
+
const config7 = {
|
|
1616
1633
|
name: "JOB_MICROSERVICE",
|
|
1617
|
-
transport:
|
|
1634
|
+
transport: import_microservices5.Transport.RMQ,
|
|
1618
1635
|
options: {
|
|
1619
1636
|
urls,
|
|
1620
1637
|
queue,
|
|
@@ -1644,9 +1661,66 @@ var JobRMQAdapter = (mode = "microservice") => {
|
|
|
1644
1661
|
}
|
|
1645
1662
|
};
|
|
1646
1663
|
if (mode === "microservice") {
|
|
1647
|
-
|
|
1664
|
+
config7["options"]["noAck"] = false;
|
|
1665
|
+
}
|
|
1666
|
+
return config7;
|
|
1667
|
+
};
|
|
1668
|
+
|
|
1669
|
+
// src/adapters/rmq/notification.rmq.adapter.ts
|
|
1670
|
+
var import_dotenv6 = require("dotenv");
|
|
1671
|
+
var import_microservices6 = require("@nestjs/microservices");
|
|
1672
|
+
(0, import_dotenv6.config)();
|
|
1673
|
+
var NotificationRMQAdapter = (mode = "microservice") => {
|
|
1674
|
+
const urls = process.env.NOTIFICATION_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1675
|
+
"amqp://localhost:5672"
|
|
1676
|
+
];
|
|
1677
|
+
const queue = process.env.NOTIFICATION_MICROSERVICE_RMQ_QUEUE || "notification_queue";
|
|
1678
|
+
const prefetchCount = parseInt(
|
|
1679
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
|
|
1680
|
+
);
|
|
1681
|
+
const heartbeat = parseInt(
|
|
1682
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_HEARTBEAT || "60"
|
|
1683
|
+
);
|
|
1684
|
+
const deadLetterExchange = process.env.NOTIFICATION_MICROSERVICE_RMQ_DLX || "notification_dlx";
|
|
1685
|
+
const deadLetterQueue = process.env.NOTIFICATION_MICROSERVICE_RMQ_DLQ || "notification_dlq";
|
|
1686
|
+
const messageTtl = parseInt(
|
|
1687
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1688
|
+
);
|
|
1689
|
+
const config7 = {
|
|
1690
|
+
name: "NOTIFICATION_MICROSERVICE",
|
|
1691
|
+
transport: import_microservices6.Transport.RMQ,
|
|
1692
|
+
options: {
|
|
1693
|
+
urls,
|
|
1694
|
+
queue,
|
|
1695
|
+
prefetchCount,
|
|
1696
|
+
heartbeat,
|
|
1697
|
+
queueOptions: {
|
|
1698
|
+
durable: true,
|
|
1699
|
+
arguments: {
|
|
1700
|
+
"x-dead-letter-exchange": deadLetterExchange,
|
|
1701
|
+
"x-dead-letter-routing-key": deadLetterQueue,
|
|
1702
|
+
"x-message-ttl": messageTtl
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
connectionOptions: {
|
|
1706
|
+
heartbeat,
|
|
1707
|
+
retry: true,
|
|
1708
|
+
retryAttempts: 5,
|
|
1709
|
+
retryDelay: 3e3,
|
|
1710
|
+
timeout: 1e4,
|
|
1711
|
+
poolSize: parseInt(process.env.NOTIFICATION_MICROSERVICE_RMQ_POOL_SIZE || "5"),
|
|
1712
|
+
...process.env.NOTIFICATION_MICROSERVICE_RMQ_USE_SSL === "true" && {
|
|
1713
|
+
ssl: {
|
|
1714
|
+
rejectUnauthorized: false
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
if (mode === "microservice") {
|
|
1721
|
+
config7["options"]["noAck"] = false;
|
|
1648
1722
|
}
|
|
1649
|
-
return
|
|
1723
|
+
return config7;
|
|
1650
1724
|
};
|
|
1651
1725
|
|
|
1652
1726
|
// src/entities/question.entity.ts
|
|
@@ -1754,6 +1828,8 @@ JobRoles = __decorateClass([
|
|
|
1754
1828
|
ModeOfHire,
|
|
1755
1829
|
ModeOfWork,
|
|
1756
1830
|
NatureOfWork,
|
|
1831
|
+
NotificationRMQAdapter,
|
|
1832
|
+
NotificationTCPAdapter,
|
|
1757
1833
|
ONBOARDING_PATTERN,
|
|
1758
1834
|
OTP_PATTERN,
|
|
1759
1835
|
OnboardingStepEnum,
|
package/dist/index.mjs
CHANGED
|
@@ -1573,10 +1573,25 @@ var JobTCPAdapter = () => {
|
|
|
1573
1573
|
};
|
|
1574
1574
|
};
|
|
1575
1575
|
|
|
1576
|
-
// src/adapters/
|
|
1576
|
+
// src/adapters/tcp/notification.tcp.adapter.ts
|
|
1577
1577
|
import { config as config3 } from "dotenv";
|
|
1578
1578
|
import { Transport as Transport3 } from "@nestjs/microservices";
|
|
1579
1579
|
config3();
|
|
1580
|
+
var NotificationTCPAdapter = () => {
|
|
1581
|
+
return {
|
|
1582
|
+
name: "NOTIFICATION_MICROSERVICE",
|
|
1583
|
+
transport: Transport3.TCP,
|
|
1584
|
+
options: {
|
|
1585
|
+
host: process.env.NOTIFICATION_MICROSERVICE_TCP_HOST || "localhost",
|
|
1586
|
+
port: parseInt(process.env.NOTIFICATION_MICROSERVICE_TCP_PORT || "4003", 10)
|
|
1587
|
+
}
|
|
1588
|
+
};
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1591
|
+
// src/adapters/rmq/user.rmq.adapter.ts
|
|
1592
|
+
import { config as config4 } from "dotenv";
|
|
1593
|
+
import { Transport as Transport4 } from "@nestjs/microservices";
|
|
1594
|
+
config4();
|
|
1580
1595
|
var UserRMQAdapter = (mode = "microservice") => {
|
|
1581
1596
|
const urls = process.env.USER_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1582
1597
|
"amqp://localhost:5672"
|
|
@@ -1593,9 +1608,9 @@ var UserRMQAdapter = (mode = "microservice") => {
|
|
|
1593
1608
|
const messageTtl = parseInt(
|
|
1594
1609
|
process.env.USER_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1595
1610
|
);
|
|
1596
|
-
const
|
|
1611
|
+
const config7 = {
|
|
1597
1612
|
name: "USER_MICROSERVICE",
|
|
1598
|
-
transport:
|
|
1613
|
+
transport: Transport4.RMQ,
|
|
1599
1614
|
options: {
|
|
1600
1615
|
urls,
|
|
1601
1616
|
queue,
|
|
@@ -1625,15 +1640,15 @@ var UserRMQAdapter = (mode = "microservice") => {
|
|
|
1625
1640
|
}
|
|
1626
1641
|
};
|
|
1627
1642
|
if (mode === "microservice") {
|
|
1628
|
-
|
|
1643
|
+
config7["options"]["noAck"] = false;
|
|
1629
1644
|
}
|
|
1630
|
-
return
|
|
1645
|
+
return config7;
|
|
1631
1646
|
};
|
|
1632
1647
|
|
|
1633
1648
|
// src/adapters/rmq/job.rmq.adapter.ts
|
|
1634
|
-
import { config as
|
|
1635
|
-
import { Transport as
|
|
1636
|
-
|
|
1649
|
+
import { config as config5 } from "dotenv";
|
|
1650
|
+
import { Transport as Transport5 } from "@nestjs/microservices";
|
|
1651
|
+
config5();
|
|
1637
1652
|
var JobRMQAdapter = (mode = "microservice") => {
|
|
1638
1653
|
const urls = process.env.JOB_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1639
1654
|
"amqp://localhost:5672"
|
|
@@ -1650,9 +1665,9 @@ var JobRMQAdapter = (mode = "microservice") => {
|
|
|
1650
1665
|
const messageTtl = parseInt(
|
|
1651
1666
|
process.env.JOB_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1652
1667
|
);
|
|
1653
|
-
const
|
|
1668
|
+
const config7 = {
|
|
1654
1669
|
name: "JOB_MICROSERVICE",
|
|
1655
|
-
transport:
|
|
1670
|
+
transport: Transport5.RMQ,
|
|
1656
1671
|
options: {
|
|
1657
1672
|
urls,
|
|
1658
1673
|
queue,
|
|
@@ -1682,9 +1697,66 @@ var JobRMQAdapter = (mode = "microservice") => {
|
|
|
1682
1697
|
}
|
|
1683
1698
|
};
|
|
1684
1699
|
if (mode === "microservice") {
|
|
1685
|
-
|
|
1700
|
+
config7["options"]["noAck"] = false;
|
|
1701
|
+
}
|
|
1702
|
+
return config7;
|
|
1703
|
+
};
|
|
1704
|
+
|
|
1705
|
+
// src/adapters/rmq/notification.rmq.adapter.ts
|
|
1706
|
+
import { config as config6 } from "dotenv";
|
|
1707
|
+
import { Transport as Transport6 } from "@nestjs/microservices";
|
|
1708
|
+
config6();
|
|
1709
|
+
var NotificationRMQAdapter = (mode = "microservice") => {
|
|
1710
|
+
const urls = process.env.NOTIFICATION_MICROSERVICE_RMQ_URL?.split(",") || [
|
|
1711
|
+
"amqp://localhost:5672"
|
|
1712
|
+
];
|
|
1713
|
+
const queue = process.env.NOTIFICATION_MICROSERVICE_RMQ_QUEUE || "notification_queue";
|
|
1714
|
+
const prefetchCount = parseInt(
|
|
1715
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_PREFETCH_COUNT || "10"
|
|
1716
|
+
);
|
|
1717
|
+
const heartbeat = parseInt(
|
|
1718
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_HEARTBEAT || "60"
|
|
1719
|
+
);
|
|
1720
|
+
const deadLetterExchange = process.env.NOTIFICATION_MICROSERVICE_RMQ_DLX || "notification_dlx";
|
|
1721
|
+
const deadLetterQueue = process.env.NOTIFICATION_MICROSERVICE_RMQ_DLQ || "notification_dlq";
|
|
1722
|
+
const messageTtl = parseInt(
|
|
1723
|
+
process.env.NOTIFICATION_MICROSERVICE_RMQ_MESSAGE_TTL || "30000"
|
|
1724
|
+
);
|
|
1725
|
+
const config7 = {
|
|
1726
|
+
name: "NOTIFICATION_MICROSERVICE",
|
|
1727
|
+
transport: Transport6.RMQ,
|
|
1728
|
+
options: {
|
|
1729
|
+
urls,
|
|
1730
|
+
queue,
|
|
1731
|
+
prefetchCount,
|
|
1732
|
+
heartbeat,
|
|
1733
|
+
queueOptions: {
|
|
1734
|
+
durable: true,
|
|
1735
|
+
arguments: {
|
|
1736
|
+
"x-dead-letter-exchange": deadLetterExchange,
|
|
1737
|
+
"x-dead-letter-routing-key": deadLetterQueue,
|
|
1738
|
+
"x-message-ttl": messageTtl
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1741
|
+
connectionOptions: {
|
|
1742
|
+
heartbeat,
|
|
1743
|
+
retry: true,
|
|
1744
|
+
retryAttempts: 5,
|
|
1745
|
+
retryDelay: 3e3,
|
|
1746
|
+
timeout: 1e4,
|
|
1747
|
+
poolSize: parseInt(process.env.NOTIFICATION_MICROSERVICE_RMQ_POOL_SIZE || "5"),
|
|
1748
|
+
...process.env.NOTIFICATION_MICROSERVICE_RMQ_USE_SSL === "true" && {
|
|
1749
|
+
ssl: {
|
|
1750
|
+
rejectUnauthorized: false
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
};
|
|
1756
|
+
if (mode === "microservice") {
|
|
1757
|
+
config7["options"]["noAck"] = false;
|
|
1686
1758
|
}
|
|
1687
|
-
return
|
|
1759
|
+
return config7;
|
|
1688
1760
|
};
|
|
1689
1761
|
|
|
1690
1762
|
// src/entities/question.entity.ts
|
|
@@ -1791,6 +1863,8 @@ export {
|
|
|
1791
1863
|
ModeOfHire,
|
|
1792
1864
|
ModeOfWork,
|
|
1793
1865
|
NatureOfWork,
|
|
1866
|
+
NotificationRMQAdapter,
|
|
1867
|
+
NotificationTCPAdapter,
|
|
1794
1868
|
ONBOARDING_PATTERN,
|
|
1795
1869
|
OTP_PATTERN,
|
|
1796
1870
|
OnboardingStepEnum,
|