@platform-modules/foreign-ministry 1.3.336 → 1.3.337
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/.env +5 -11
- package/dist/auth/authenticate-jwt-session.d.ts +19 -0
- package/dist/auth/authenticate-jwt-session.js +35 -0
- package/dist/auth/jwt-token.helper.d.ts +18 -0
- package/dist/auth/jwt-token.helper.js +58 -0
- package/dist/auth/user-session-validation.d.ts +42 -0
- package/dist/auth/user-session-validation.js +95 -0
- package/dist/i18n/workflow-chat-i18n.json +41 -41
- package/dist/i18n/workflow-chat-message.builder.d.ts +9 -0
- package/dist/i18n/workflow-chat-message.builder.js +60 -27
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/models/AppointmentChatModel.d.ts +0 -2
- package/dist/models/AppointmentChatModel.js +0 -8
- package/dist/models/AppointmentWorkflowModel.d.ts +0 -2
- package/dist/models/AppointmentWorkflowModel.js +0 -8
- package/dist/models/AssistanceCitizensAbroadChatModel.d.ts +0 -2
- package/dist/models/AssistanceCitizensAbroadChatModel.js +0 -8
- package/dist/models/AssistanceCitizensAbroadWorkflowModel.d.ts +0 -1
- package/dist/models/AssistanceCitizensAbroadWorkflowModel.js +0 -4
- package/dist/models/ChildrensEducationChatModel.d.ts +0 -2
- package/dist/models/ChildrensEducationChatModel.js +0 -8
- package/dist/models/ChildrensEducationWorkflowModel.d.ts +0 -1
- package/dist/models/ChildrensEducationWorkflowModel.js +0 -4
- package/dist/models/DiplomaticAcademyChatModel.d.ts +0 -2
- package/dist/models/DiplomaticAcademyChatModel.js +0 -8
- package/dist/models/DiplomaticAcademyWorkflowModel.d.ts +0 -2
- package/dist/models/DiplomaticAcademyWorkflowModel.js +0 -8
- package/dist/models/DiplomaticChatsModel.d.ts +0 -2
- package/dist/models/DiplomaticChatsModel.js +0 -8
- package/dist/models/DiplomaticWorkFlowModel.d.ts +0 -2
- package/dist/models/DiplomaticWorkFlowModel.js +0 -8
- package/dist/models/DocumentTranslationChatModel.d.ts +0 -2
- package/dist/models/DocumentTranslationChatModel.js +0 -8
- package/dist/models/DocumentTranslationWorkflowModel.d.ts +0 -2
- package/dist/models/DocumentTranslationWorkflowModel.js +0 -8
- package/dist/models/EarlyCheckoutChatModel.d.ts +0 -2
- package/dist/models/EarlyCheckoutChatModel.js +0 -8
- package/dist/models/EarlyCheckoutWorkflowModel.d.ts +0 -2
- package/dist/models/EarlyCheckoutWorkflowModel.js +0 -8
- package/dist/models/EmbassyEvaluationChatModel.d.ts +0 -1
- package/dist/models/EmbassyEvaluationChatModel.js +0 -4
- package/dist/models/EmbassyEvaluationWorkflowModel.d.ts +0 -1
- package/dist/models/EmbassyEvaluationWorkflowModel.js +0 -4
- package/dist/models/EmployeeCardChatsModel.d.ts +0 -2
- package/dist/models/EmployeeCardChatsModel.js +0 -8
- package/dist/models/EmployeeCardWorkFlowModel.d.ts +0 -2
- package/dist/models/EmployeeCardWorkFlowModel.js +0 -8
- package/dist/models/EmployeeEvaluationChatModel.d.ts +0 -1
- package/dist/models/EmployeeEvaluationChatModel.js +0 -4
- package/dist/models/EmployeeEvaluationWorkflowModel.d.ts +0 -1
- package/dist/models/EmployeeEvaluationWorkflowModel.js +0 -4
- package/dist/models/EmployeeOfMonthNominationChatModel.d.ts +0 -1
- package/dist/models/EmployeeOfMonthNominationChatModel.js +0 -4
- package/dist/models/EmployeeOfMonthNominationWorkflowModel.d.ts +0 -1
- package/dist/models/EmployeeOfMonthNominationWorkflowModel.js +0 -4
- package/dist/models/EmployeeOfMonthSupportNominationChatModel.d.ts +0 -1
- package/dist/models/EmployeeOfMonthSupportNominationChatModel.js +0 -4
- package/dist/models/EmployeeOfMonthSupportNominationWorkflowModel.d.ts +0 -1
- package/dist/models/EmployeeOfMonthSupportNominationWorkflowModel.js +0 -4
- package/dist/models/FinancialChatsModel.d.ts +0 -2
- package/dist/models/FinancialChatsModel.js +0 -8
- package/dist/models/FinancialWorkFlowModel.d.ts +0 -2
- package/dist/models/FinancialWorkFlowModel.js +0 -8
- package/dist/models/FoodChatModel.d.ts +0 -1
- package/dist/models/FoodChatModel.js +0 -4
- package/dist/models/FoodWorkflowModel.d.ts +0 -2
- package/dist/models/FoodWorkflowModel.js +0 -8
- package/dist/models/GatePassChatsModel.d.ts +0 -2
- package/dist/models/GatePassChatsModel.js +0 -8
- package/dist/models/GatePassWorkFlowModel.d.ts +0 -2
- package/dist/models/GatePassWorkFlowModel.js +0 -8
- package/dist/models/GeneralServiceChatsModel.d.ts +0 -2
- package/dist/models/GeneralServiceChatsModel.js +0 -8
- package/dist/models/GeneralServiceWorkFlowModel.d.ts +0 -2
- package/dist/models/GeneralServiceWorkFlowModel.js +0 -8
- package/dist/models/HallChatModel.d.ts +0 -1
- package/dist/models/HallChatModel.js +0 -4
- package/dist/models/HallWorkflowModel.d.ts +0 -2
- package/dist/models/HallWorkflowModel.js +0 -8
- package/dist/models/HousingRentalAccommodationChatModel.d.ts +0 -2
- package/dist/models/HousingRentalAccommodationChatModel.js +0 -8
- package/dist/models/HousingRentalAccommodationWorkflowModel.d.ts +0 -1
- package/dist/models/HousingRentalAccommodationWorkflowModel.js +0 -4
- package/dist/models/HousingRentalVehicleChatModel.d.ts +0 -2
- package/dist/models/HousingRentalVehicleChatModel.js +0 -8
- package/dist/models/HousingRentalVehicleWorkflowModel.d.ts +0 -1
- package/dist/models/HousingRentalVehicleWorkflowModel.js +0 -4
- package/dist/models/InitiatorEmployeeNominationChatModel.d.ts +0 -1
- package/dist/models/InitiatorEmployeeNominationChatModel.js +0 -4
- package/dist/models/InitiatorEmployeeNominationWorkflowModel.d.ts +0 -1
- package/dist/models/InitiatorEmployeeNominationWorkflowModel.js +0 -4
- package/dist/models/InnovativeEmployeeNominationChatModel.d.ts +0 -1
- package/dist/models/InnovativeEmployeeNominationChatModel.js +0 -4
- package/dist/models/InnovativeEmployeeNominationWorkflowModel.d.ts +0 -1
- package/dist/models/InnovativeEmployeeNominationWorkflowModel.js +0 -4
- package/dist/models/IpeGrievanceChatModel.d.ts +0 -1
- package/dist/models/IpeGrievanceChatModel.js +0 -4
- package/dist/models/IpeGrievanceWorkflowModel.d.ts +0 -1
- package/dist/models/IpeGrievanceWorkflowModel.js +0 -4
- package/dist/models/LMSCourseExternalLecturerChatModel.d.ts +0 -2
- package/dist/models/LMSCourseExternalLecturerChatModel.js +0 -8
- package/dist/models/LMSCourseExternalLecturerWorkflowModel.d.ts +0 -2
- package/dist/models/LMSCourseExternalLecturerWorkflowModel.js +0 -8
- package/dist/models/LMSExternalCourseParticipationChatModel.d.ts +0 -2
- package/dist/models/LMSExternalCourseParticipationChatModel.js +0 -8
- package/dist/models/LMSExternalCourseParticipationWorkflowModel.d.ts +0 -2
- package/dist/models/LMSExternalCourseParticipationWorkflowModel.js +0 -8
- package/dist/models/LMSExternalEntityTrainedChatModel.d.ts +0 -2
- package/dist/models/LMSExternalEntityTrainedChatModel.js +0 -8
- package/dist/models/LMSExternalEntityTrainedWorkflowModel.d.ts +0 -2
- package/dist/models/LMSExternalEntityTrainedWorkflowModel.js +0 -8
- package/dist/models/LanguageCourseChatModel.d.ts +0 -2
- package/dist/models/LanguageCourseChatModel.js +0 -8
- package/dist/models/LanguageCourseWorkflowModel.d.ts +0 -2
- package/dist/models/LanguageCourseWorkflowModel.js +0 -8
- package/dist/models/LeaveChatModel.d.ts +0 -2
- package/dist/models/LeaveChatModel.js +0 -8
- package/dist/models/LeaveWorkFlowModel.d.ts +0 -2
- package/dist/models/LeaveWorkFlowModel.js +0 -8
- package/dist/models/MediaChatModel.d.ts +0 -2
- package/dist/models/MediaChatModel.js +0 -8
- package/dist/models/MediaWorkflowModel.d.ts +0 -2
- package/dist/models/MediaWorkflowModel.js +0 -8
- package/dist/models/MedicalExpensesChatModel.d.ts +0 -2
- package/dist/models/MedicalExpensesChatModel.js +0 -8
- package/dist/models/MedicalExpensesWorkflowModel.d.ts +0 -1
- package/dist/models/MedicalExpensesWorkflowModel.js +0 -4
- package/dist/models/MeetingChatModel.d.ts +0 -2
- package/dist/models/MeetingChatModel.js +0 -8
- package/dist/models/MeetingWorkflowModel.d.ts +0 -2
- package/dist/models/MeetingWorkflowModel.js +0 -8
- package/dist/models/MissionBankAccountChatModel.d.ts +0 -2
- package/dist/models/MissionBankAccountChatModel.js +0 -8
- package/dist/models/MissionBankAccountWorkflowModel.d.ts +0 -2
- package/dist/models/MissionBankAccountWorkflowModel.js +0 -8
- package/dist/models/MissionContractsChatModel.d.ts +0 -2
- package/dist/models/MissionContractsChatModel.js +0 -8
- package/dist/models/MissionContractsWorkflowModel.d.ts +0 -1
- package/dist/models/MissionContractsWorkflowModel.js +0 -4
- package/dist/models/MissionTravelChatModel.d.ts +0 -1
- package/dist/models/MissionTravelChatModel.js +0 -4
- package/dist/models/MissionTravelWorkflowModel.d.ts +0 -2
- package/dist/models/MissionTravelWorkflowModel.js +0 -8
- package/dist/models/NationalDayCelebrationsChatModel.d.ts +0 -2
- package/dist/models/NationalDayCelebrationsChatModel.js +0 -8
- package/dist/models/NationalDayCelebrationsWorkflowModel.d.ts +0 -1
- package/dist/models/NationalDayCelebrationsWorkflowModel.js +0 -4
- package/dist/models/RecruitmentDomesticWorkersChatModel.d.ts +0 -2
- package/dist/models/RecruitmentDomesticWorkersChatModel.js +0 -8
- package/dist/models/RecruitmentDomesticWorkersWorkflowModel.d.ts +0 -1
- package/dist/models/RecruitmentDomesticWorkersWorkflowModel.js +0 -4
- package/dist/models/RegisterCandidateChatModel.d.ts +0 -2
- package/dist/models/RegisterCandidateChatModel.js +0 -8
- package/dist/models/RegisterCandidateWorkflowModel.d.ts +0 -2
- package/dist/models/RegisterCandidateWorkflowModel.js +0 -8
- package/dist/models/RegisterVacancyChatModel.d.ts +0 -2
- package/dist/models/RegisterVacancyChatModel.js +0 -8
- package/dist/models/RegisterVacancyWorkflowModel.d.ts +0 -2
- package/dist/models/RegisterVacancyWorkflowModel.js +0 -8
- package/dist/models/RepatriationCitizensChatModel.d.ts +0 -2
- package/dist/models/RepatriationCitizensChatModel.js +0 -8
- package/dist/models/RepatriationCitizensWorkflowModel.d.ts +0 -1
- package/dist/models/RepatriationCitizensWorkflowModel.js +0 -4
- package/dist/models/RequestParcelChatModel.d.ts +0 -2
- package/dist/models/RequestParcelChatModel.js +0 -8
- package/dist/models/RequestParcelWorkflowModel.d.ts +0 -2
- package/dist/models/RequestParcelWorkflowModel.js +0 -8
- package/dist/models/RequestPassportChatModel.d.ts +0 -2
- package/dist/models/RequestPassportChatModel.js +0 -8
- package/dist/models/RequestPassportWorkflowModel.d.ts +0 -2
- package/dist/models/RequestPassportWorkflowModel.js +0 -8
- package/dist/models/ResignationTerminationChatModel.d.ts +0 -2
- package/dist/models/ResignationTerminationChatModel.js +0 -8
- package/dist/models/ResignationTerminationWorkflowModel.d.ts +0 -2
- package/dist/models/ResignationTerminationWorkflowModel.js +0 -8
- package/dist/models/RetiredCardChatsModel.d.ts +0 -2
- package/dist/models/RetiredCardChatsModel.js +0 -8
- package/dist/models/RetiredCardWorkFlowModel.d.ts +0 -2
- package/dist/models/RetiredCardWorkFlowModel.js +0 -8
- package/dist/models/SecurityChatsModel.d.ts +0 -2
- package/dist/models/SecurityChatsModel.js +0 -8
- package/dist/models/StayAfterHoursChatModel.d.ts +0 -2
- package/dist/models/StayAfterHoursChatModel.js +0 -8
- package/dist/models/StayAfterHoursWorkflowModel.d.ts +0 -2
- package/dist/models/StayAfterHoursWorkflowModel.js +0 -8
- package/dist/models/TransferAllowanceChatModel.d.ts +0 -2
- package/dist/models/TransferAllowanceChatModel.js +0 -8
- package/dist/models/TransferAllowanceWorkflowModel.d.ts +0 -1
- package/dist/models/TransferAllowanceWorkflowModel.js +0 -4
- package/dist/models/TransferMissionChatModel.d.ts +0 -2
- package/dist/models/TransferMissionChatModel.js +0 -8
- package/dist/models/TransferMissionWorkflowModel.d.ts +0 -2
- package/dist/models/TransferMissionWorkflowModel.js +0 -8
- package/dist/models/TransferSalaryBankAccountChatModel.d.ts +0 -2
- package/dist/models/TransferSalaryBankAccountChatModel.js +0 -8
- package/dist/models/TransferSalaryBankAccountWorkflowModel.d.ts +0 -1
- package/dist/models/TransferSalaryBankAccountWorkflowModel.js +0 -4
- package/dist/models/UpdateAttendanceChatModel.d.ts +0 -1
- package/dist/models/UpdateAttendanceChatModel.js +0 -4
- package/dist/models/UpdateAttendanceWorkflowModel.d.ts +0 -2
- package/dist/models/UpdateAttendanceWorkflowModel.js +0 -8
- package/dist/models/user.d.ts +1 -0
- package/dist/models/user.js +4 -0
- package/package.json +1 -1
- package/sql/add_users_is_selected_lang.sql +11 -0
- package/src/index.ts +1 -3
- package/src/models/AppointmentChatModel.ts +0 -6
- package/src/models/AppointmentWorkflowModel.ts +0 -6
- package/src/models/AssistanceCitizensAbroadChatModel.ts +0 -6
- package/src/models/AssistanceCitizensAbroadWorkflowModel.ts +0 -3
- package/src/models/ChildrensEducationChatModel.ts +0 -6
- package/src/models/ChildrensEducationWorkflowModel.ts +0 -3
- package/src/models/DiplomaticAcademyChatModel.ts +0 -6
- package/src/models/DiplomaticAcademyWorkflowModel.ts +0 -6
- package/src/models/DiplomaticChatsModel.ts +0 -6
- package/src/models/DiplomaticWorkFlowModel.ts +0 -6
- package/src/models/DocumentTranslationChatModel.ts +0 -6
- package/src/models/DocumentTranslationWorkflowModel.ts +0 -6
- package/src/models/EarlyCheckoutChatModel.ts +0 -6
- package/src/models/EarlyCheckoutWorkflowModel.ts +0 -6
- package/src/models/EmbassyEvaluationChatModel.ts +0 -3
- package/src/models/EmbassyEvaluationWorkflowModel.ts +0 -3
- package/src/models/EmployeeCardChatsModel.ts +0 -6
- package/src/models/EmployeeCardWorkFlowModel.ts +2 -8
- package/src/models/EmployeeEvaluationChatModel.ts +0 -3
- package/src/models/EmployeeEvaluationWorkflowModel.ts +0 -3
- package/src/models/EmployeeOfMonthNominationChatModel.ts +0 -3
- package/src/models/EmployeeOfMonthNominationWorkflowModel.ts +0 -3
- package/src/models/EmployeeOfMonthSupportNominationChatModel.ts +0 -3
- package/src/models/EmployeeOfMonthSupportNominationWorkflowModel.ts +0 -3
- package/src/models/FinancialChatsModel.ts +0 -6
- package/src/models/FinancialWorkFlowModel.ts +0 -6
- package/src/models/FoodChatModel.ts +0 -3
- package/src/models/FoodWorkflowModel.ts +0 -6
- package/src/models/GatePassChatsModel.ts +0 -6
- package/src/models/GatePassWorkFlowModel.ts +2 -8
- package/src/models/GeneralServiceChatsModel.ts +0 -6
- package/src/models/GeneralServiceWorkFlowModel.ts +0 -6
- package/src/models/HallChatModel.ts +0 -3
- package/src/models/HallWorkflowModel.ts +0 -6
- package/src/models/HousingRentalAccommodationChatModel.ts +0 -6
- package/src/models/HousingRentalAccommodationWorkflowModel.ts +0 -3
- package/src/models/HousingRentalVehicleChatModel.ts +0 -6
- package/src/models/HousingRentalVehicleWorkflowModel.ts +0 -3
- package/src/models/InitiatorEmployeeNominationChatModel.ts +0 -3
- package/src/models/InitiatorEmployeeNominationWorkflowModel.ts +0 -3
- package/src/models/InnovativeEmployeeNominationChatModel.ts +0 -3
- package/src/models/InnovativeEmployeeNominationWorkflowModel.ts +0 -3
- package/src/models/IpeGrievanceChatModel.ts +0 -3
- package/src/models/IpeGrievanceWorkflowModel.ts +0 -3
- package/src/models/LMSCourseExternalLecturerChatModel.ts +0 -6
- package/src/models/LMSCourseExternalLecturerWorkflowModel.ts +0 -6
- package/src/models/LMSExternalCourseParticipationChatModel.ts +0 -6
- package/src/models/LMSExternalCourseParticipationWorkflowModel.ts +0 -6
- package/src/models/LMSExternalEntityTrainedChatModel.ts +0 -6
- package/src/models/LMSExternalEntityTrainedWorkflowModel.ts +0 -6
- package/src/models/LanguageCourseChatModel.ts +0 -6
- package/src/models/LanguageCourseWorkflowModel.ts +0 -6
- package/src/models/LeaveChatModel.ts +1 -7
- package/src/models/LeaveWorkFlowModel.ts +0 -6
- package/src/models/MediaChatModel.ts +0 -6
- package/src/models/MediaWorkflowModel.ts +0 -6
- package/src/models/MedicalExpensesChatModel.ts +0 -6
- package/src/models/MedicalExpensesWorkflowModel.ts +0 -3
- package/src/models/MeetingChatModel.ts +0 -6
- package/src/models/MeetingWorkflowModel.ts +0 -6
- package/src/models/MissionBankAccountChatModel.ts +0 -6
- package/src/models/MissionBankAccountWorkflowModel.ts +0 -6
- package/src/models/MissionContractsChatModel.ts +0 -6
- package/src/models/MissionContractsWorkflowModel.ts +0 -3
- package/src/models/MissionTravelChatModel.ts +0 -3
- package/src/models/MissionTravelWorkflowModel.ts +0 -6
- package/src/models/NationalDayCelebrationsChatModel.ts +0 -6
- package/src/models/NationalDayCelebrationsWorkflowModel.ts +0 -3
- package/src/models/RecruitmentDomesticWorkersChatModel.ts +0 -6
- package/src/models/RecruitmentDomesticWorkersWorkflowModel.ts +0 -3
- package/src/models/RegisterCandidateChatModel.ts +0 -6
- package/src/models/RegisterCandidateWorkflowModel.ts +0 -6
- package/src/models/RegisterVacancyChatModel.ts +0 -6
- package/src/models/RegisterVacancyWorkflowModel.ts +0 -6
- package/src/models/RepatriationCitizensChatModel.ts +0 -6
- package/src/models/RepatriationCitizensWorkflowModel.ts +0 -3
- package/src/models/RequestParcelChatModel.ts +0 -6
- package/src/models/RequestParcelWorkflowModel.ts +0 -6
- package/src/models/RequestPassportChatModel.ts +0 -6
- package/src/models/RequestPassportWorkflowModel.ts +0 -6
- package/src/models/ResignationTerminationChatModel.ts +0 -6
- package/src/models/ResignationTerminationWorkflowModel.ts +0 -6
- package/src/models/RetiredCardChatsModel.ts +0 -6
- package/src/models/RetiredCardWorkFlowModel.ts +2 -8
- package/src/models/SecurityChatsModel.ts +0 -6
- package/src/models/StayAfterHoursChatModel.ts +0 -6
- package/src/models/StayAfterHoursWorkflowModel.ts +0 -6
- package/src/models/TransferAllowanceChatModel.ts +0 -6
- package/src/models/TransferAllowanceWorkflowModel.ts +0 -3
- package/src/models/TransferMissionChatModel.ts +0 -6
- package/src/models/TransferMissionWorkflowModel.ts +0 -6
- package/src/models/TransferSalaryBankAccountChatModel.ts +0 -6
- package/src/models/TransferSalaryBankAccountWorkflowModel.ts +0 -3
- package/src/models/UpdateAttendanceChatModel.ts +0 -3
- package/src/models/UpdateAttendanceWorkflowModel.ts +0 -6
- package/src/models/user.ts +3 -0
- package/tsconfig.json +0 -1
- package/sql/add_fm_workflow_chat_arabic_columns.sql +0 -153
- package/src/i18n/workflow-chat-i18n.json +0 -320
- package/src/i18n/workflow-chat-i18n.ts +0 -5
- package/src/i18n/workflow-chat-message.builder.ts +0 -1405
|
@@ -23,6 +23,7 @@ exports.buildSynchronizedChatMessage = buildSynchronizedChatMessage;
|
|
|
23
23
|
exports.buildWorkflowLogUpdateFields = buildWorkflowLogUpdateFields;
|
|
24
24
|
exports.toWorkflowPersistFields = toWorkflowPersistFields;
|
|
25
25
|
exports.toChatPersistFields = toChatPersistFields;
|
|
26
|
+
exports.buildUserEnteredChatPersistFields = buildUserEnteredChatPersistFields;
|
|
26
27
|
exports.toContentChatPersistFields = toContentChatPersistFields;
|
|
27
28
|
exports.buildApprovalWorkflowContent = buildApprovalWorkflowContent;
|
|
28
29
|
exports.buildHumanApprovalWorkflowContent = buildHumanApprovalWorkflowContent;
|
|
@@ -52,6 +53,7 @@ exports.resolveChatStatusAr = resolveChatStatusAr;
|
|
|
52
53
|
exports.extractBilingualActorsFromRecord = extractBilingualActorsFromRecord;
|
|
53
54
|
exports.resolveWorkflowContentAr = resolveWorkflowContentAr;
|
|
54
55
|
exports.resolveChatMessageAr = resolveChatMessageAr;
|
|
56
|
+
exports.isSystemGeneratedChatMessage = isSystemGeneratedChatMessage;
|
|
55
57
|
exports.enrichWorkflowLog = enrichWorkflowLog;
|
|
56
58
|
exports.enrichChatMessage = enrichChatMessage;
|
|
57
59
|
/**
|
|
@@ -277,6 +279,15 @@ function toChatPersistFields(bilingual, status) {
|
|
|
277
279
|
status_ar: resolveChatStatusAr(status),
|
|
278
280
|
};
|
|
279
281
|
}
|
|
282
|
+
/** User-typed chat — never auto-translate; message_ar stays null. */
|
|
283
|
+
function buildUserEnteredChatPersistFields(message, status) {
|
|
284
|
+
return {
|
|
285
|
+
message,
|
|
286
|
+
message_ar: null,
|
|
287
|
+
status,
|
|
288
|
+
status_ar: resolveChatStatusAr(status),
|
|
289
|
+
};
|
|
290
|
+
}
|
|
280
291
|
/** Bilingual chat insert fields for models using `content` column (Leave, Financial, etc.). */
|
|
281
292
|
function toContentChatPersistFields(bilingual, status) {
|
|
282
293
|
return {
|
|
@@ -772,6 +783,47 @@ function resolveArabicChatRoleName(actors, parsedEnglishRole) {
|
|
|
772
783
|
}
|
|
773
784
|
return resolveBilingualName(parsedEnglishRole, actors?.roleArabicName);
|
|
774
785
|
}
|
|
786
|
+
function escapeRegexLiteral(value) {
|
|
787
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
788
|
+
}
|
|
789
|
+
/** Match a templated EN message and extract placeholder values (full-structure match). */
|
|
790
|
+
function matchTemplateMessage(templateEn, message) {
|
|
791
|
+
if (!/\{\{\w+\}\}/.test(templateEn))
|
|
792
|
+
return null;
|
|
793
|
+
const placeholders = [];
|
|
794
|
+
let regexBody = '';
|
|
795
|
+
let cursor = 0;
|
|
796
|
+
const tokenRe = /\{\{(\w+)\}\}/g;
|
|
797
|
+
let tokenMatch;
|
|
798
|
+
while ((tokenMatch = tokenRe.exec(templateEn)) !== null) {
|
|
799
|
+
regexBody += escapeRegexLiteral(templateEn.slice(cursor, tokenMatch.index));
|
|
800
|
+
const key = tokenMatch[1];
|
|
801
|
+
placeholders.push(key);
|
|
802
|
+
regexBody += key === 'comment' ? '(.*)' : '(.+?)';
|
|
803
|
+
cursor = tokenMatch.index + tokenMatch[0].length;
|
|
804
|
+
}
|
|
805
|
+
regexBody += escapeRegexLiteral(templateEn.slice(cursor));
|
|
806
|
+
const match = message.match(new RegExp(`^${regexBody}$`, 's'));
|
|
807
|
+
if (!match)
|
|
808
|
+
return null;
|
|
809
|
+
const params = {};
|
|
810
|
+
placeholders.forEach((key, index) => {
|
|
811
|
+
params[key] = match[index + 1] ?? '';
|
|
812
|
+
});
|
|
813
|
+
return params;
|
|
814
|
+
}
|
|
815
|
+
function buildArabicChatTemplateParams(params, actors) {
|
|
816
|
+
const arParams = { ...params };
|
|
817
|
+
if (params.roleName !== undefined) {
|
|
818
|
+
arParams.roleName = resolveArabicChatRoleName(actors, params.roleName.trim());
|
|
819
|
+
}
|
|
820
|
+
if (params.userName !== undefined) {
|
|
821
|
+
arParams.userName = actors?.userName?.trim()
|
|
822
|
+
? resolveBilingualName(actors.userName, actors.userArabicName)
|
|
823
|
+
: resolveBilingualName(params.userName.trim(), actors?.userArabicName);
|
|
824
|
+
}
|
|
825
|
+
return arParams;
|
|
826
|
+
}
|
|
775
827
|
function resolveWorkflowContentAr(content, actors) {
|
|
776
828
|
if (content == null || content.trim() === '')
|
|
777
829
|
return null;
|
|
@@ -824,39 +876,20 @@ function resolveChatMessageAr(message, actors) {
|
|
|
824
876
|
if (tpl.en === normalized)
|
|
825
877
|
return tpl.ar;
|
|
826
878
|
}
|
|
827
|
-
for (const tplKey of ['request_submitted_by', 'cancellation_submitted_by']) {
|
|
828
|
-
const submittedTpl = CHAT_TEMPLATES[tplKey];
|
|
829
|
-
if (!submittedTpl)
|
|
830
|
-
continue;
|
|
831
|
-
const prefix = submittedTpl.en.split('{{userName}}')[0];
|
|
832
|
-
if (!normalized.startsWith(prefix))
|
|
833
|
-
continue;
|
|
834
|
-
const afterPrefix = normalized.slice(prefix.length);
|
|
835
|
-
const parenMatch = afterPrefix.match(/^(.+?) \((.+)\)$/);
|
|
836
|
-
if (parenMatch) {
|
|
837
|
-
const userEn = parenMatch[1].trim();
|
|
838
|
-
const employeeId = parenMatch[2].trim();
|
|
839
|
-
const userAr = actors?.userName?.trim()
|
|
840
|
-
? resolveBilingualName(actors.userName, actors.userArabicName)
|
|
841
|
-
: resolveBilingualName(userEn, actors?.userArabicName);
|
|
842
|
-
return interpolate(submittedTpl.ar, { userName: userAr, employeeId });
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
879
|
for (const tpl of Object.values(CHAT_TEMPLATES)) {
|
|
846
|
-
if (
|
|
880
|
+
if (!/\{\{\w+\}\}/.test(tpl.en))
|
|
847
881
|
continue;
|
|
848
|
-
const
|
|
849
|
-
if (!
|
|
882
|
+
const params = matchTemplateMessage(tpl.en, normalized);
|
|
883
|
+
if (!params)
|
|
850
884
|
continue;
|
|
851
|
-
|
|
852
|
-
const commentIdx = rest.lastIndexOf(' - ');
|
|
853
|
-
const roleNameEn = commentIdx >= 0 ? rest.slice(0, commentIdx) : rest;
|
|
854
|
-
const commentSuffix = commentIdx >= 0 ? rest.slice(commentIdx) : '';
|
|
855
|
-
const roleNameAr = resolveArabicChatRoleName(actors, roleNameEn.trim());
|
|
856
|
-
return interpolate(tpl.ar, { roleName: roleNameAr, comment: commentSuffix });
|
|
885
|
+
return interpolate(tpl.ar, buildArabicChatTemplateParams(params, actors));
|
|
857
886
|
}
|
|
858
887
|
return null;
|
|
859
888
|
}
|
|
889
|
+
/** True when message matches a known system chat template (safe to resolve message_ar). */
|
|
890
|
+
function isSystemGeneratedChatMessage(message, actors) {
|
|
891
|
+
return resolveChatMessageAr(message, actors) != null;
|
|
892
|
+
}
|
|
860
893
|
/** Generic workflow log enricher — use in all module repositories. */
|
|
861
894
|
function enrichWorkflowLog(log) {
|
|
862
895
|
const status = log.status != null ? String(log.status) : null;
|
package/dist/index.d.ts
CHANGED
|
@@ -459,4 +459,3 @@ export { EmbassyEvaluationRequestAttachment } from './models/EmbassyEvaluationAt
|
|
|
459
459
|
export { EvaluationForm, EvaluationFormType, } from './models/EvaluationFormModel';
|
|
460
460
|
export { EvaluationFormSection } from './models/EvaluationFormSectionModel';
|
|
461
461
|
export { EvaluationFormQuestion, EvaluationFormQuestionType, } from './models/EvaluationFormQuestionModel';
|
|
462
|
-
export * from './i18n/workflow-chat-message.builder';
|
package/dist/index.js
CHANGED
|
@@ -645,4 +645,3 @@ Object.defineProperty(exports, "EvaluationFormSection", { enumerable: true, get:
|
|
|
645
645
|
var EvaluationFormQuestionModel_1 = require("./models/EvaluationFormQuestionModel");
|
|
646
646
|
Object.defineProperty(exports, "EvaluationFormQuestion", { enumerable: true, get: function () { return EvaluationFormQuestionModel_1.EvaluationFormQuestion; } });
|
|
647
647
|
Object.defineProperty(exports, "EvaluationFormQuestionType", { enumerable: true, get: function () { return EvaluationFormQuestionModel_1.EvaluationFormQuestionType; } });
|
|
648
|
-
__exportStar(require("./i18n/workflow-chat-message.builder"), exports);
|
|
@@ -13,9 +13,7 @@ export declare class AppointmentRequestChat extends BaseModel {
|
|
|
13
13
|
user_id: number;
|
|
14
14
|
role_id: number;
|
|
15
15
|
message: string;
|
|
16
|
-
message_ar: string | null;
|
|
17
16
|
messageType: AppointmentMessageType;
|
|
18
17
|
status: string;
|
|
19
|
-
status_ar: string | null;
|
|
20
18
|
constructor(appointment_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: AppointmentMessageType, status?: string);
|
|
21
19
|
}
|
|
@@ -58,10 +58,6 @@ __decorate([
|
|
|
58
58
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
59
59
|
__metadata("design:type", String)
|
|
60
60
|
], AppointmentRequestChat.prototype, "message", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
63
|
-
__metadata("design:type", Object)
|
|
64
|
-
], AppointmentRequestChat.prototype, "message_ar", void 0);
|
|
65
61
|
__decorate([
|
|
66
62
|
(0, typeorm_1.Column)({
|
|
67
63
|
type: 'enum',
|
|
@@ -75,10 +71,6 @@ __decorate([
|
|
|
75
71
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
76
72
|
__metadata("design:type", String)
|
|
77
73
|
], AppointmentRequestChat.prototype, "status", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
80
|
-
__metadata("design:type", Object)
|
|
81
|
-
], AppointmentRequestChat.prototype, "status_ar", void 0);
|
|
82
74
|
exports.AppointmentRequestChat = AppointmentRequestChat = __decorate([
|
|
83
75
|
(0, typeorm_1.Entity)({ name: 'appointment_chats' }),
|
|
84
76
|
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
@@ -9,9 +9,7 @@ export declare class AppointmentWorkFlow extends BaseModel {
|
|
|
9
9
|
service_id: number | null;
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
|
-
content_ar: string | null;
|
|
13
12
|
status: AppointmentWorkFlowStatus;
|
|
14
|
-
status_ar: string | null;
|
|
15
13
|
user_id: number | null;
|
|
16
14
|
role_id: number | null;
|
|
17
15
|
department_id: number | null;
|
|
@@ -37,18 +37,10 @@ __decorate([
|
|
|
37
37
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], AppointmentWorkFlow.prototype, "content", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], AppointmentWorkFlow.prototype, "content_ar", void 0);
|
|
44
40
|
__decorate([
|
|
45
41
|
(0, typeorm_1.Column)({ type: 'enum', enum: AppointmentWorkFlowStatus, default: AppointmentWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
46
42
|
__metadata("design:type", String)
|
|
47
43
|
], AppointmentWorkFlow.prototype, "status", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], AppointmentWorkFlow.prototype, "status_ar", void 0);
|
|
52
44
|
__decorate([
|
|
53
45
|
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
54
46
|
__metadata("design:type", Object)
|
|
@@ -13,9 +13,7 @@ export declare class AssistanceCitizensAbroadRequestChat extends BaseModel {
|
|
|
13
13
|
user_id: number;
|
|
14
14
|
role_id: number;
|
|
15
15
|
message: string;
|
|
16
|
-
message_ar: string | null;
|
|
17
16
|
messageType: AssistanceCitizensAbroadMessageType;
|
|
18
17
|
status: string;
|
|
19
|
-
status_ar: string | null;
|
|
20
18
|
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: AssistanceCitizensAbroadMessageType, status?: string);
|
|
21
19
|
}
|
|
@@ -59,10 +59,6 @@ __decorate([
|
|
|
59
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
60
60
|
__metadata("design:type", String)
|
|
61
61
|
], AssistanceCitizensAbroadRequestChat.prototype, "message", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], AssistanceCitizensAbroadRequestChat.prototype, "message_ar", void 0);
|
|
66
62
|
__decorate([
|
|
67
63
|
(0, typeorm_1.Column)({
|
|
68
64
|
type: 'enum',
|
|
@@ -76,10 +72,6 @@ __decorate([
|
|
|
76
72
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
77
73
|
__metadata("design:type", String)
|
|
78
74
|
], AssistanceCitizensAbroadRequestChat.prototype, "status", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
81
|
-
__metadata("design:type", Object)
|
|
82
|
-
], AssistanceCitizensAbroadRequestChat.prototype, "status_ar", void 0);
|
|
83
75
|
exports.AssistanceCitizensAbroadRequestChat = AssistanceCitizensAbroadRequestChat = __decorate([
|
|
84
76
|
(0, typeorm_1.Entity)({ name: 'assistance_citizens_abroad_chats' }),
|
|
85
77
|
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
@@ -9,7 +9,6 @@ export declare class AssistanceCitizensAbroadWorkFlow extends BaseModel {
|
|
|
9
9
|
service_id: number | null;
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
|
-
content_ar: string | null;
|
|
13
12
|
status: AssistanceCitizensAbroadWorkFlowStatus;
|
|
14
13
|
user_id: number | null;
|
|
15
14
|
role_id: number | null;
|
|
@@ -37,10 +37,6 @@ __decorate([
|
|
|
37
37
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], AssistanceCitizensAbroadWorkFlow.prototype, "content", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], AssistanceCitizensAbroadWorkFlow.prototype, "content_ar", void 0);
|
|
44
40
|
__decorate([
|
|
45
41
|
(0, typeorm_1.Column)({
|
|
46
42
|
type: 'enum',
|
|
@@ -13,9 +13,7 @@ export declare class ChildrensEducationRequestChat extends BaseModel {
|
|
|
13
13
|
user_id: number;
|
|
14
14
|
role_id: number;
|
|
15
15
|
message: string;
|
|
16
|
-
message_ar: string | null;
|
|
17
16
|
messageType: ChildrensEducationMessageType;
|
|
18
17
|
status: string;
|
|
19
|
-
status_ar: string | null;
|
|
20
18
|
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: ChildrensEducationMessageType, status?: string);
|
|
21
19
|
}
|
|
@@ -58,10 +58,6 @@ __decorate([
|
|
|
58
58
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
59
59
|
__metadata("design:type", String)
|
|
60
60
|
], ChildrensEducationRequestChat.prototype, "message", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
63
|
-
__metadata("design:type", Object)
|
|
64
|
-
], ChildrensEducationRequestChat.prototype, "message_ar", void 0);
|
|
65
61
|
__decorate([
|
|
66
62
|
(0, typeorm_1.Column)({
|
|
67
63
|
type: 'enum',
|
|
@@ -75,10 +71,6 @@ __decorate([
|
|
|
75
71
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
76
72
|
__metadata("design:type", String)
|
|
77
73
|
], ChildrensEducationRequestChat.prototype, "status", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
80
|
-
__metadata("design:type", Object)
|
|
81
|
-
], ChildrensEducationRequestChat.prototype, "status_ar", void 0);
|
|
82
74
|
exports.ChildrensEducationRequestChat = ChildrensEducationRequestChat = __decorate([
|
|
83
75
|
(0, typeorm_1.Entity)({ name: 'childrens_education_chats' }),
|
|
84
76
|
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
@@ -9,7 +9,6 @@ export declare class ChildrensEducationWorkFlow extends BaseModel {
|
|
|
9
9
|
service_id: number | null;
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
|
-
content_ar: string | null;
|
|
13
12
|
status: ChildrensEducationWorkFlowStatus;
|
|
14
13
|
user_id: number | null;
|
|
15
14
|
role_id: number | null;
|
|
@@ -37,10 +37,6 @@ __decorate([
|
|
|
37
37
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], ChildrensEducationWorkFlow.prototype, "content", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], ChildrensEducationWorkFlow.prototype, "content_ar", void 0);
|
|
44
40
|
__decorate([
|
|
45
41
|
(0, typeorm_1.Column)({
|
|
46
42
|
type: 'enum',
|
|
@@ -13,9 +13,7 @@ export declare class DiplomaticAcademyRequestChat extends BaseModel {
|
|
|
13
13
|
user_id: number;
|
|
14
14
|
role_id: number;
|
|
15
15
|
message: string;
|
|
16
|
-
message_ar: string | null;
|
|
17
16
|
messageType: DiplomaticAcademyMessageType;
|
|
18
17
|
status: string;
|
|
19
|
-
status_ar: string | null;
|
|
20
18
|
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: DiplomaticAcademyMessageType, status?: string);
|
|
21
19
|
}
|
|
@@ -59,10 +59,6 @@ __decorate([
|
|
|
59
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
60
60
|
__metadata("design:type", String)
|
|
61
61
|
], DiplomaticAcademyRequestChat.prototype, "message", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], DiplomaticAcademyRequestChat.prototype, "message_ar", void 0);
|
|
66
62
|
__decorate([
|
|
67
63
|
(0, typeorm_1.Column)({
|
|
68
64
|
type: 'enum',
|
|
@@ -76,10 +72,6 @@ __decorate([
|
|
|
76
72
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
77
73
|
__metadata("design:type", String)
|
|
78
74
|
], DiplomaticAcademyRequestChat.prototype, "status", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
81
|
-
__metadata("design:type", Object)
|
|
82
|
-
], DiplomaticAcademyRequestChat.prototype, "status_ar", void 0);
|
|
83
75
|
exports.DiplomaticAcademyRequestChat = DiplomaticAcademyRequestChat = __decorate([
|
|
84
76
|
(0, typeorm_1.Entity)({ name: 'diplomatic_academy_chats' }),
|
|
85
77
|
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
@@ -9,9 +9,7 @@ export declare class DiplomaticAcademyWorkFlow extends BaseModel {
|
|
|
9
9
|
service_id: number | null;
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
|
-
content_ar: string | null;
|
|
13
12
|
status: DiplomaticAcademyWorkFlowStatus;
|
|
14
|
-
status_ar: string | null;
|
|
15
13
|
user_id: number | null;
|
|
16
14
|
role_id: number | null;
|
|
17
15
|
department_id: number | null;
|
|
@@ -37,18 +37,10 @@ __decorate([
|
|
|
37
37
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], DiplomaticAcademyWorkFlow.prototype, "content", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], DiplomaticAcademyWorkFlow.prototype, "content_ar", void 0);
|
|
44
40
|
__decorate([
|
|
45
41
|
(0, typeorm_1.Column)({ type: 'enum', enum: DiplomaticAcademyWorkFlowStatus, default: DiplomaticAcademyWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
46
42
|
__metadata("design:type", String)
|
|
47
43
|
], DiplomaticAcademyWorkFlow.prototype, "status", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], DiplomaticAcademyWorkFlow.prototype, "status_ar", void 0);
|
|
52
44
|
__decorate([
|
|
53
45
|
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
54
46
|
__metadata("design:type", Object)
|
|
@@ -10,11 +10,9 @@ export declare enum DiplomaticMessageType {
|
|
|
10
10
|
export declare class DiplomaticChats extends BaseModel {
|
|
11
11
|
diplomatic_request_id: number;
|
|
12
12
|
content: string;
|
|
13
|
-
content_ar: string | null;
|
|
14
13
|
sender_user_id: number;
|
|
15
14
|
role_id: number | null;
|
|
16
15
|
status: string | null;
|
|
17
|
-
status_ar: string | null;
|
|
18
16
|
message_type: DiplomaticMessageType | null;
|
|
19
17
|
sender_role_id: number | null;
|
|
20
18
|
diplomaticRequest?: DiplomaticRequests;
|
|
@@ -39,10 +39,6 @@ __decorate([
|
|
|
39
39
|
(0, typeorm_1.Column)({ type: 'text' }),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], DiplomaticChats.prototype, "content", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
44
|
-
__metadata("design:type", Object)
|
|
45
|
-
], DiplomaticChats.prototype, "content_ar", void 0);
|
|
46
42
|
__decorate([
|
|
47
43
|
(0, typeorm_1.Column)({ type: 'int' }),
|
|
48
44
|
__metadata("design:type", Number)
|
|
@@ -55,10 +51,6 @@ __decorate([
|
|
|
55
51
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
56
52
|
__metadata("design:type", Object)
|
|
57
53
|
], DiplomaticChats.prototype, "status", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
60
|
-
__metadata("design:type", Object)
|
|
61
|
-
], DiplomaticChats.prototype, "status_ar", void 0);
|
|
62
54
|
__decorate([
|
|
63
55
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
64
56
|
__metadata("design:type", Object)
|
|
@@ -10,9 +10,7 @@ export declare class DiplomaticWorkFlow extends BaseModel {
|
|
|
10
10
|
service_id: number | null;
|
|
11
11
|
sub_service_id: number | null;
|
|
12
12
|
content: string;
|
|
13
|
-
content_ar: string | null;
|
|
14
13
|
status: DiplomaticWorkFlowStatus;
|
|
15
|
-
status_ar: string | null;
|
|
16
14
|
user_id: number | null;
|
|
17
15
|
step_order: number | null;
|
|
18
16
|
diplomatic_approval_id: number | null;
|
|
@@ -46,18 +46,10 @@ __decorate([
|
|
|
46
46
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], DiplomaticWorkFlow.prototype, "content", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
51
|
-
__metadata("design:type", Object)
|
|
52
|
-
], DiplomaticWorkFlow.prototype, "content_ar", void 0);
|
|
53
49
|
__decorate([
|
|
54
50
|
(0, typeorm_1.Column)({ type: 'enum', enum: DiplomaticWorkFlowStatus, default: DiplomaticWorkFlowStatus.NOT_YET_STARTED }),
|
|
55
51
|
__metadata("design:type", String)
|
|
56
52
|
], DiplomaticWorkFlow.prototype, "status", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
59
|
-
__metadata("design:type", Object)
|
|
60
|
-
], DiplomaticWorkFlow.prototype, "status_ar", void 0);
|
|
61
53
|
__decorate([
|
|
62
54
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
63
55
|
__metadata("design:type", Object)
|
|
@@ -13,9 +13,7 @@ export declare class DocumentTranslationRequestChat extends BaseModel {
|
|
|
13
13
|
user_id: number;
|
|
14
14
|
role_id: number;
|
|
15
15
|
message: string;
|
|
16
|
-
message_ar: string | null;
|
|
17
16
|
messageType: DocumentTranslationMessageType;
|
|
18
17
|
status: string;
|
|
19
|
-
status_ar: string | null;
|
|
20
18
|
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: DocumentTranslationMessageType, status?: string);
|
|
21
19
|
}
|
|
@@ -59,10 +59,6 @@ __decorate([
|
|
|
59
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
60
60
|
__metadata("design:type", String)
|
|
61
61
|
], DocumentTranslationRequestChat.prototype, "message", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], DocumentTranslationRequestChat.prototype, "message_ar", void 0);
|
|
66
62
|
__decorate([
|
|
67
63
|
(0, typeorm_1.Column)({
|
|
68
64
|
type: 'enum',
|
|
@@ -76,10 +72,6 @@ __decorate([
|
|
|
76
72
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
77
73
|
__metadata("design:type", String)
|
|
78
74
|
], DocumentTranslationRequestChat.prototype, "status", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
81
|
-
__metadata("design:type", Object)
|
|
82
|
-
], DocumentTranslationRequestChat.prototype, "status_ar", void 0);
|
|
83
75
|
exports.DocumentTranslationRequestChat = DocumentTranslationRequestChat = __decorate([
|
|
84
76
|
(0, typeorm_1.Entity)({ name: 'document_translation_chats' }),
|
|
85
77
|
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
@@ -9,9 +9,7 @@ export declare class DocumentTranslationWorkFlow extends BaseModel {
|
|
|
9
9
|
service_id: number | null;
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
|
-
content_ar: string | null;
|
|
13
12
|
status: DocumentTranslationWorkFlowStatus;
|
|
14
|
-
status_ar: string | null;
|
|
15
13
|
user_id: number | null;
|
|
16
14
|
role_id: number | null;
|
|
17
15
|
department_id: number | null;
|
|
@@ -37,18 +37,10 @@ __decorate([
|
|
|
37
37
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], DocumentTranslationWorkFlow.prototype, "content", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], DocumentTranslationWorkFlow.prototype, "content_ar", void 0);
|
|
44
40
|
__decorate([
|
|
45
41
|
(0, typeorm_1.Column)({ type: 'enum', enum: DocumentTranslationWorkFlowStatus, default: DocumentTranslationWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
46
42
|
__metadata("design:type", String)
|
|
47
43
|
], DocumentTranslationWorkFlow.prototype, "status", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], DocumentTranslationWorkFlow.prototype, "status_ar", void 0);
|
|
52
44
|
__decorate([
|
|
53
45
|
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
54
46
|
__metadata("design:type", Object)
|
|
@@ -14,9 +14,7 @@ export declare class EarlyCheckoutRequestChat extends BaseModel {
|
|
|
14
14
|
user_id: number;
|
|
15
15
|
role_id: number;
|
|
16
16
|
message: string;
|
|
17
|
-
message_ar: string | null;
|
|
18
17
|
messageType: EarlyCheckoutMessageType;
|
|
19
18
|
status: string;
|
|
20
|
-
status_ar: string | null;
|
|
21
19
|
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: EarlyCheckoutMessageType, status?: EarlyCheckoutApprovalStatus);
|
|
22
20
|
}
|
|
@@ -59,10 +59,6 @@ __decorate([
|
|
|
59
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
60
60
|
__metadata("design:type", String)
|
|
61
61
|
], EarlyCheckoutRequestChat.prototype, "message", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], EarlyCheckoutRequestChat.prototype, "message_ar", void 0);
|
|
66
62
|
__decorate([
|
|
67
63
|
(0, typeorm_1.Column)({
|
|
68
64
|
type: 'enum',
|
|
@@ -76,10 +72,6 @@ __decorate([
|
|
|
76
72
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
77
73
|
__metadata("design:type", String)
|
|
78
74
|
], EarlyCheckoutRequestChat.prototype, "status", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
81
|
-
__metadata("design:type", Object)
|
|
82
|
-
], EarlyCheckoutRequestChat.prototype, "status_ar", void 0);
|
|
83
75
|
exports.EarlyCheckoutRequestChat = EarlyCheckoutRequestChat = __decorate([
|
|
84
76
|
(0, typeorm_1.Entity)({ name: 'early_checkout_chats' }),
|
|
85
77
|
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
@@ -9,9 +9,7 @@ export declare class EarlyCheckoutWorkFlow extends BaseModel {
|
|
|
9
9
|
service_id: number | null;
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
|
-
content_ar: string | null;
|
|
13
12
|
status: EarlyCheckoutWorkFlowStatus;
|
|
14
|
-
status_ar: string | null;
|
|
15
13
|
user_id: number | null;
|
|
16
14
|
role_id: number | null;
|
|
17
15
|
department_id: number | null;
|
|
@@ -37,18 +37,10 @@ __decorate([
|
|
|
37
37
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], EarlyCheckoutWorkFlow.prototype, "content", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], EarlyCheckoutWorkFlow.prototype, "content_ar", void 0);
|
|
44
40
|
__decorate([
|
|
45
41
|
(0, typeorm_1.Column)({ type: 'enum', enum: EarlyCheckoutWorkFlowStatus, default: EarlyCheckoutWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
46
42
|
__metadata("design:type", String)
|
|
47
43
|
], EarlyCheckoutWorkFlow.prototype, "status", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], EarlyCheckoutWorkFlow.prototype, "status_ar", void 0);
|
|
52
44
|
__decorate([
|
|
53
45
|
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
54
46
|
__metadata("design:type", Object)
|
|
@@ -47,10 +47,6 @@ __decorate([
|
|
|
47
47
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
48
48
|
__metadata("design:type", String)
|
|
49
49
|
], EmbassyEvaluationRequestChat.prototype, "message", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
52
|
-
__metadata("design:type", Object)
|
|
53
|
-
], EmbassyEvaluationRequestChat.prototype, "message_ar", void 0);
|
|
54
50
|
__decorate([
|
|
55
51
|
(0, typeorm_1.Column)({
|
|
56
52
|
type: 'enum',
|
|
@@ -54,10 +54,6 @@ __decorate([
|
|
|
54
54
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
55
55
|
__metadata("design:type", String)
|
|
56
56
|
], EmbassyEvaluationWorkFlow.prototype, "content", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
59
|
-
__metadata("design:type", Object)
|
|
60
|
-
], EmbassyEvaluationWorkFlow.prototype, "content_ar", void 0);
|
|
61
57
|
__decorate([
|
|
62
58
|
(0, typeorm_1.Column)({
|
|
63
59
|
type: 'enum',
|
|
@@ -7,13 +7,11 @@ import { BaseModel } from './BaseModel';
|
|
|
7
7
|
export declare class EmployeeCardChat extends BaseModel {
|
|
8
8
|
employee_card_request_id: number;
|
|
9
9
|
content: string;
|
|
10
|
-
content_ar: string | null;
|
|
11
10
|
sender_user_id: number;
|
|
12
11
|
service_id: number | null;
|
|
13
12
|
sub_service_id: number | null;
|
|
14
13
|
role_id: number | null;
|
|
15
14
|
status: string | null;
|
|
16
|
-
status_ar: string | null;
|
|
17
15
|
department_id: number | null;
|
|
18
16
|
section_id: number | null;
|
|
19
17
|
is_internal: boolean | null;
|