easywork-common-lib 1.0.756 → 1.0.757
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/common/@types/enums/crm.enum.d.ts +8 -0
- package/dist/common/@types/enums/crm.enum.js +14 -0
- package/dist/common/@types/enums/crm.enum.js.map +1 -0
- package/dist/common/@types/enums/index.d.ts +3 -0
- package/dist/common/@types/enums/index.js +20 -0
- package/dist/common/@types/enums/index.js.map +1 -0
- package/dist/common/@types/enums/misc.enum.d.ts +60 -0
- package/dist/common/@types/enums/misc.enum.js +81 -0
- package/dist/common/@types/enums/misc.enum.js.map +1 -0
- package/dist/common/@types/enums/permission.enum.d.ts +13 -0
- package/dist/common/@types/enums/permission.enum.js +19 -0
- package/dist/common/@types/enums/permission.enum.js.map +1 -0
- package/dist/common/@types/index.d.ts +2 -0
- package/dist/common/@types/index.js +19 -0
- package/dist/common/@types/index.js.map +1 -0
- package/dist/common/@types/interfaces/authentication.interface.d.ts +17 -0
- package/dist/common/@types/interfaces/authentication.interface.js +3 -0
- package/dist/common/@types/interfaces/authentication.interface.js.map +1 -0
- package/dist/common/@types/interfaces/crm.interface.d.ts +131 -0
- package/dist/common/@types/interfaces/crm.interface.js +3 -0
- package/dist/common/@types/interfaces/crm.interface.js.map +1 -0
- package/dist/common/@types/interfaces/file.interface.d.ts +14 -0
- package/dist/common/@types/interfaces/file.interface.js +3 -0
- package/dist/common/@types/interfaces/file.interface.js.map +1 -0
- package/dist/common/@types/interfaces/index.d.ts +6 -0
- package/dist/common/@types/interfaces/index.js +23 -0
- package/dist/common/@types/interfaces/index.js.map +1 -0
- package/dist/common/@types/interfaces/lsm.interface.d.ts +5 -0
- package/dist/common/@types/interfaces/lsm.interface.js +3 -0
- package/dist/common/@types/interfaces/lsm.interface.js.map +1 -0
- package/dist/common/@types/interfaces/mail.interface.d.ts +9 -0
- package/dist/common/@types/interfaces/mail.interface.js +3 -0
- package/dist/common/@types/interfaces/mail.interface.js.map +1 -0
- package/dist/common/@types/interfaces/validator.interface.d.ts +41 -0
- package/dist/common/@types/interfaces/validator.interface.js +3 -0
- package/dist/common/@types/interfaces/validator.interface.js.map +1 -0
- package/dist/common/constants/app.contants.d.ts +48 -0
- package/dist/common/constants/app.contants.js +219 -0
- package/dist/common/constants/app.contants.js.map +1 -0
- package/dist/common/constants/index.d.ts +3 -0
- package/dist/common/constants/index.js +20 -0
- package/dist/common/constants/index.js.map +1 -0
- package/dist/common/constants/regex.constant.d.ts +6 -0
- package/dist/common/constants/regex.constant.js +10 -0
- package/dist/common/constants/regex.constant.js.map +1 -0
- package/dist/common/constants/string.constant.d.ts +5 -0
- package/dist/common/constants/string.constant.js +41 -0
- package/dist/common/constants/string.constant.js.map +1 -0
- package/dist/common/database/base.entity.d.ts +15 -0
- package/dist/common/database/base.entity.js +76 -0
- package/dist/common/database/base.entity.js.map +1 -0
- package/dist/common/database/comment.base.entity.d.ts +11 -0
- package/dist/common/database/comment.base.entity.js +83 -0
- package/dist/common/database/comment.base.entity.js.map +1 -0
- package/dist/common/database/index.d.ts +2 -0
- package/dist/common/database/index.js +19 -0
- package/dist/common/database/index.js.map +1 -0
- package/dist/common/dtos/index.d.ts +1 -0
- package/dist/common/dtos/index.js +18 -0
- package/dist/common/dtos/index.js.map +1 -0
- package/dist/common/dtos/send-notification.dto.d.ts +11 -0
- package/dist/common/dtos/send-notification.dto.js +60 -0
- package/dist/common/dtos/send-notification.dto.js.map +1 -0
- package/dist/common/enums/common.enum.d.ts +18 -0
- package/dist/common/enums/common.enum.js +25 -0
- package/dist/common/enums/common.enum.js.map +1 -0
- package/dist/common/enums/drive.enum.d.ts +26 -0
- package/dist/common/enums/drive.enum.js +32 -0
- package/dist/common/enums/drive.enum.js.map +1 -0
- package/dist/common/enums/index.d.ts +5 -0
- package/dist/common/enums/index.js +22 -0
- package/dist/common/enums/index.js.map +1 -0
- package/dist/common/enums/notification.enum.d.ts +42 -0
- package/dist/common/enums/notification.enum.js +49 -0
- package/dist/common/enums/notification.enum.js.map +1 -0
- package/dist/common/enums/sales.enum.d.ts +107 -0
- package/dist/common/enums/sales.enum.js +129 -0
- package/dist/common/enums/sales.enum.js.map +1 -0
- package/dist/common/enums/tools.enum.d.ts +54 -0
- package/dist/common/enums/tools.enum.js +65 -0
- package/dist/common/enums/tools.enum.js.map +1 -0
- package/dist/common/functions/cripto.d.ts +1 -0
- package/dist/common/functions/cripto.js +8 -0
- package/dist/common/functions/cripto.js.map +1 -0
- package/dist/common/functions/image.d.ts +3 -0
- package/dist/common/functions/image.js +16 -0
- package/dist/common/functions/image.js.map +1 -0
- package/dist/common/functions/index.d.ts +2 -0
- package/dist/common/functions/index.js +19 -0
- package/dist/common/functions/index.js.map +1 -0
- package/dist/common/helpers/app.utils.d.ts +5 -0
- package/dist/common/helpers/app.utils.js +32 -0
- package/dist/common/helpers/app.utils.js.map +1 -0
- package/dist/common/helpers/helpers.utils.d.ts +5 -0
- package/dist/common/helpers/helpers.utils.js +26 -0
- package/dist/common/helpers/helpers.utils.js.map +1 -0
- package/dist/common/helpers/index.d.ts +2 -0
- package/dist/common/helpers/index.js +19 -0
- package/dist/common/helpers/index.js.map +1 -0
- package/dist/common/index.d.ts +8 -0
- package/dist/common/index.js +25 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/interceptors/index.d.ts +1 -0
- package/dist/common/interceptors/index.js +18 -0
- package/dist/common/interceptors/index.js.map +1 -0
- package/dist/common/interceptors/security.interceptor.d.ts +5 -0
- package/dist/common/interceptors/security.interceptor.js +22 -0
- package/dist/common/interceptors/security.interceptor.js.map +1 -0
- package/dist/entities/app_config/app-config.entity.d.ts +5 -0
- package/dist/entities/app_config/app-config.entity.js +33 -0
- package/dist/entities/app_config/app-config.entity.js.map +1 -0
- package/dist/entities/capacitation/capacitation.entity.d.ts +10 -0
- package/dist/entities/capacitation/capacitation.entity.js +68 -0
- package/dist/entities/capacitation/capacitation.entity.js.map +1 -0
- package/dist/entities/capacitation/course-assigned.entity.d.ts +12 -0
- package/dist/entities/capacitation/course-assigned.entity.js +44 -0
- package/dist/entities/capacitation/course-assigned.entity.js.map +1 -0
- package/dist/entities/capacitation/course-evaluation-attempt.entity.d.ts +22 -0
- package/dist/entities/capacitation/course-evaluation-attempt.entity.js +96 -0
- package/dist/entities/capacitation/course-evaluation-attempt.entity.js.map +1 -0
- package/dist/entities/capacitation/course-evaluation.entity.d.ts +42 -0
- package/dist/entities/capacitation/course-evaluation.entity.js +111 -0
- package/dist/entities/capacitation/course-evaluation.entity.js.map +1 -0
- package/dist/entities/capacitation/course-folder-page.entity.d.ts +14 -0
- package/dist/entities/capacitation/course-folder-page.entity.js +74 -0
- package/dist/entities/capacitation/course-folder-page.entity.js.map +1 -0
- package/dist/entities/capacitation/course-folder.entity.d.ts +10 -0
- package/dist/entities/capacitation/course-folder.entity.js +57 -0
- package/dist/entities/capacitation/course-folder.entity.js.map +1 -0
- package/dist/entities/capacitation/course-order.entity.d.ts +8 -0
- package/dist/entities/capacitation/course-order.entity.js +45 -0
- package/dist/entities/capacitation/course-order.entity.js.map +1 -0
- package/dist/entities/capacitation/course.entity.d.ts +21 -0
- package/dist/entities/capacitation/course.entity.js +119 -0
- package/dist/entities/capacitation/course.entity.js.map +1 -0
- package/dist/entities/capacitation/index.d.ts +8 -0
- package/dist/entities/capacitation/index.js +21 -0
- package/dist/entities/capacitation/index.js.map +1 -0
- package/dist/entities/currency.entity.d.ts +6 -0
- package/dist/entities/currency.entity.js +43 -0
- package/dist/entities/currency.entity.js.map +1 -0
- package/dist/entities/drive/attached_object.entity.d.ts +27 -0
- package/dist/entities/drive/attached_object.entity.js +154 -0
- package/dist/entities/drive/attached_object.entity.js.map +1 -0
- package/dist/entities/drive/file.entity.d.ts +19 -0
- package/dist/entities/drive/file.entity.js +130 -0
- package/dist/entities/drive/file.entity.js.map +1 -0
- package/dist/entities/drive/folder.entity.d.ts +18 -0
- package/dist/entities/drive/folder.entity.js +137 -0
- package/dist/entities/drive/folder.entity.js.map +1 -0
- package/dist/entities/drive/index.d.ts +3 -0
- package/dist/entities/drive/index.js +20 -0
- package/dist/entities/drive/index.js.map +1 -0
- package/dist/entities/easyapp/filter-view.entity.d.ts +7 -0
- package/dist/entities/easyapp/filter-view.entity.js +41 -0
- package/dist/entities/easyapp/filter-view.entity.js.map +1 -0
- package/dist/entities/email.entity.d.ts +5 -0
- package/dist/entities/email.entity.js +36 -0
- package/dist/entities/email.entity.js.map +1 -0
- package/dist/entities/group.entity.d.ts +13 -0
- package/dist/entities/group.entity.js +57 -0
- package/dist/entities/group.entity.js.map +1 -0
- package/dist/entities/helpers/entity_file.entity.d.ts +10 -0
- package/dist/entities/helpers/entity_file.entity.js +61 -0
- package/dist/entities/helpers/entity_file.entity.js.map +1 -0
- package/dist/entities/helpers/entity_folder.entity.d.ts +10 -0
- package/dist/entities/helpers/entity_folder.entity.js +61 -0
- package/dist/entities/helpers/entity_folder.entity.js.map +1 -0
- package/dist/entities/helpers/index.d.ts +5 -0
- package/dist/entities/helpers/index.js +22 -0
- package/dist/entities/helpers/index.js.map +1 -0
- package/dist/entities/helpers/meeting_crm.entity.d.ts +23 -0
- package/dist/entities/helpers/meeting_crm.entity.js +166 -0
- package/dist/entities/helpers/meeting_crm.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection.entity.d.ts +20 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection.entity.js +160 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection_stage.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection_stage.entity.js +43 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/h_agent_source.entity.d.ts +4 -0
- package/dist/entities/helpers/sales/agent/h_agent_source.entity.js +34 -0
- package/dist/entities/helpers/sales/agent/h_agent_source.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/h_agent_types.entity.d.ts +4 -0
- package/dist/entities/helpers/sales/agent/h_agent_types.entity.js +34 -0
- package/dist/entities/helpers/sales/agent/h_agent_types.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/index.d.ts +6 -0
- package/dist/entities/helpers/sales/agent/index.js +23 -0
- package/dist/entities/helpers/sales/agent/index.js.map +1 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.d.ts +15 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.js +120 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_stage.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_stage.entity.js +43 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/common/client_sources.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/common/client_sources.entity.js +36 -0
- package/dist/entities/helpers/sales/common/client_sources.entity.js.map +1 -0
- package/dist/entities/helpers/sales/common/client_types.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/common/client_types.entity.js +36 -0
- package/dist/entities/helpers/sales/common/client_types.entity.js.map +1 -0
- package/dist/entities/helpers/sales/contact/contact_email.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/contact/contact_email.entity.js +68 -0
- package/dist/entities/helpers/sales/contact/contact_email.entity.js.map +1 -0
- package/dist/entities/helpers/sales/contact/contact_insurance.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/contact/contact_insurance.entity.js +92 -0
- package/dist/entities/helpers/sales/contact/contact_insurance.entity.js.map +1 -0
- package/dist/entities/helpers/sales/contact/contact_phone.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/contact/contact_phone.entity.js +68 -0
- package/dist/entities/helpers/sales/contact/contact_phone.entity.js.map +1 -0
- package/dist/entities/helpers/sales/contact/index.d.ts +5 -0
- package/dist/entities/helpers/sales/contact/index.js +22 -0
- package/dist/entities/helpers/sales/contact/index.js.map +1 -0
- package/dist/entities/helpers/sales/index.d.ts +7 -0
- package/dist/entities/helpers/sales/index.js +24 -0
- package/dist/entities/helpers/sales/index.js.map +1 -0
- package/dist/entities/helpers/sales/lead/h_lead_source.entity.d.ts +4 -0
- package/dist/entities/helpers/sales/lead/h_lead_source.entity.js +30 -0
- package/dist/entities/helpers/sales/lead/h_lead_source.entity.js.map +1 -0
- package/dist/entities/helpers/sales/lead/h_lead_stage.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js +36 -0
- package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/lead/h_lead_types.entity.d.ts +4 -0
- package/dist/entities/helpers/sales/lead/h_lead_types.entity.js +30 -0
- package/dist/entities/helpers/sales/lead/h_lead_types.entity.js.map +1 -0
- package/dist/entities/helpers/sales/lead/index.d.ts +6 -0
- package/dist/entities/helpers/sales/lead/index.js +23 -0
- package/dist/entities/helpers/sales/lead/index.js.map +1 -0
- package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.d.ts +4 -0
- package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js +28 -0
- package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js.map +1 -0
- package/dist/entities/helpers/sales/lead/lead_email.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/lead/lead_email.entity.js +66 -0
- package/dist/entities/helpers/sales/lead/lead_email.entity.js.map +1 -0
- package/dist/entities/helpers/sales/lead/lead_phone.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/lead/lead_phone.entity.js +66 -0
- package/dist/entities/helpers/sales/lead/lead_phone.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_category.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_category.entity.js +30 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_category.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_conducto_pago.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_conducto_pago.entity.js +33 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_conducto_pago.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.d.ts +6 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.js +39 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.d.ts +6 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.js +39 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_insurance.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_insurance.entity.js +30 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_insurance.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_stage.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_stage.entity.js +43 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_subramo.entity.d.ts +6 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_subramo.entity.js +36 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_subramo.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_type.entity.d.ts +5 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_type.entity.js +33 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_type.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/h_receipt_stage.entity.d.ts +8 -0
- package/dist/entities/helpers/sales/poliza/h_receipt_stage.entity.js +53 -0
- package/dist/entities/helpers/sales/poliza/h_receipt_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/index.d.ts +11 -0
- package/dist/entities/helpers/sales/poliza/index.js +28 -0
- package/dist/entities/helpers/sales/poliza/index.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/poliza_cancel_reason.entity.d.ts +4 -0
- package/dist/entities/helpers/sales/poliza/poliza_cancel_reason.entity.js +28 -0
- package/dist/entities/helpers/sales/poliza/poliza_cancel_reason.entity.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/poliza_insured.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/poliza/poliza_insured.entity.js +86 -0
- package/dist/entities/helpers/sales/poliza/poliza_insured.entity.js.map +1 -0
- package/dist/entities/helpers/tools/event_crm.entity.d.ts +23 -0
- package/dist/entities/helpers/tools/event_crm.entity.js +166 -0
- package/dist/entities/helpers/tools/event_crm.entity.js.map +1 -0
- package/dist/entities/helpers/tools/index.d.ts +2 -0
- package/dist/entities/helpers/tools/index.js +19 -0
- package/dist/entities/helpers/tools/index.js.map +1 -0
- package/dist/entities/helpers/tools/task_crm.entity.d.ts +27 -0
- package/dist/entities/helpers/tools/task_crm.entity.js +196 -0
- package/dist/entities/helpers/tools/task_crm.entity.js.map +1 -0
- package/dist/entities/helpers/user/access_history.entity.d.ts +9 -0
- package/dist/entities/helpers/user/access_history.entity.js +58 -0
- package/dist/entities/helpers/user/access_history.entity.js.map +1 -0
- package/dist/entities/imap-config.entity.d.ts +11 -0
- package/dist/entities/imap-config.entity.js +61 -0
- package/dist/entities/imap-config.entity.js.map +1 -0
- package/dist/entities/index.d.ts +31 -0
- package/dist/entities/index.js +48 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/meeting-comment.entity.d.ts +8 -0
- package/dist/entities/meeting-comment.entity.js +46 -0
- package/dist/entities/meeting-comment.entity.js.map +1 -0
- package/dist/entities/meeting-list-field.d.ts +5 -0
- package/dist/entities/meeting-list-field.js +46 -0
- package/dist/entities/meeting-list-field.js.map +1 -0
- package/dist/entities/meeting.entity.d.ts +24 -0
- package/dist/entities/meeting.entity.js +187 -0
- package/dist/entities/meeting.entity.js.map +1 -0
- package/dist/entities/menu-permissions.entity.d.ts +7 -0
- package/dist/entities/menu-permissions.entity.js +42 -0
- package/dist/entities/menu-permissions.entity.js.map +1 -0
- package/dist/entities/notifications/index.d.ts +2 -0
- package/dist/entities/notifications/index.js +19 -0
- package/dist/entities/notifications/index.js.map +1 -0
- package/dist/entities/notifications/notification.entity.d.ts +15 -0
- package/dist/entities/notifications/notification.entity.js +119 -0
- package/dist/entities/notifications/notification.entity.js.map +1 -0
- package/dist/entities/notifications/push-token.entity.d.ts +7 -0
- package/dist/entities/notifications/push-token.entity.js +45 -0
- package/dist/entities/notifications/push-token.entity.js.map +1 -0
- package/dist/entities/otp-log.entity.d.ts +8 -0
- package/dist/entities/otp-log.entity.js +49 -0
- package/dist/entities/otp-log.entity.js.map +1 -0
- package/dist/entities/permission.entity.d.ts +7 -0
- package/dist/entities/permission.entity.js +46 -0
- package/dist/entities/permission.entity.js.map +1 -0
- package/dist/entities/phone.entity.d.ts +5 -0
- package/dist/entities/phone.entity.js +36 -0
- package/dist/entities/phone.entity.js.map +1 -0
- package/dist/entities/profile.entity.d.ts +9 -0
- package/dist/entities/profile.entity.js +56 -0
- package/dist/entities/profile.entity.js.map +1 -0
- package/dist/entities/protocol.entity.d.ts +8 -0
- package/dist/entities/protocol.entity.js +46 -0
- package/dist/entities/protocol.entity.js.map +1 -0
- package/dist/entities/refresh-token.entity.d.ts +8 -0
- package/dist/entities/refresh-token.entity.js +46 -0
- package/dist/entities/refresh-token.entity.js.map +1 -0
- package/dist/entities/role.entity.d.ts +7 -0
- package/dist/entities/role.entity.js +48 -0
- package/dist/entities/role.entity.js.map +1 -0
- package/dist/entities/sales/agent-comment.entity.d.ts +5 -0
- package/dist/entities/sales/agent-comment.entity.js +35 -0
- package/dist/entities/sales/agent-comment.entity.js.map +1 -0
- package/dist/entities/sales/agent.entity.d.ts +32 -0
- package/dist/entities/sales/agent.entity.js +254 -0
- package/dist/entities/sales/agent.entity.js.map +1 -0
- package/dist/entities/sales/agente-intermediario.entity.d.ts +7 -0
- package/dist/entities/sales/agente-intermediario.entity.js +49 -0
- package/dist/entities/sales/agente-intermediario.entity.js.map +1 -0
- package/dist/entities/sales/beneficiarios/index.d.ts +2 -0
- package/dist/entities/sales/beneficiarios/index.js +19 -0
- package/dist/entities/sales/beneficiarios/index.js.map +1 -0
- package/dist/entities/sales/beneficiarios/person.entity.d.ts +10 -0
- package/dist/entities/sales/beneficiarios/person.entity.js +89 -0
- package/dist/entities/sales/beneficiarios/person.entity.js.map +1 -0
- package/dist/entities/sales/beneficiarios/vehicle.entity.d.ts +16 -0
- package/dist/entities/sales/beneficiarios/vehicle.entity.js +106 -0
- package/dist/entities/sales/beneficiarios/vehicle.entity.js.map +1 -0
- package/dist/entities/sales/contact-comment.entity.d.ts +5 -0
- package/dist/entities/sales/contact-comment.entity.js +32 -0
- package/dist/entities/sales/contact-comment.entity.js.map +1 -0
- package/dist/entities/sales/contact.entity.d.ts +57 -0
- package/dist/entities/sales/contact.entity.js +497 -0
- package/dist/entities/sales/contact.entity.js.map +1 -0
- package/dist/entities/sales/import-session.entity.d.ts +29 -0
- package/dist/entities/sales/import-session.entity.js +155 -0
- package/dist/entities/sales/import-session.entity.js.map +1 -0
- package/dist/entities/sales/index.d.ts +16 -0
- package/dist/entities/sales/index.js +33 -0
- package/dist/entities/sales/index.js.map +1 -0
- package/dist/entities/sales/lead-comment.entity.d.ts +5 -0
- package/dist/entities/sales/lead-comment.entity.js +32 -0
- package/dist/entities/sales/lead-comment.entity.js.map +1 -0
- package/dist/entities/sales/lead.entity.d.ts +60 -0
- package/dist/entities/sales/lead.entity.js +572 -0
- package/dist/entities/sales/lead.entity.js.map +1 -0
- package/dist/entities/sales/poliza/index.d.ts +8 -0
- package/dist/entities/sales/poliza/index.js +25 -0
- package/dist/entities/sales/poliza/index.js.map +1 -0
- package/dist/entities/sales/poliza/poliza_claim-comment.entity.d.ts +5 -0
- package/dist/entities/sales/poliza/poliza_claim-comment.entity.js +35 -0
- package/dist/entities/sales/poliza/poliza_claim-comment.entity.js.map +1 -0
- package/dist/entities/sales/poliza/poliza_claim.entity.d.ts +34 -0
- package/dist/entities/sales/poliza/poliza_claim.entity.js +285 -0
- package/dist/entities/sales/poliza/poliza_claim.entity.js.map +1 -0
- package/dist/entities/sales/poliza/poliza_fund-recovery-comment.entity.d.ts +5 -0
- package/dist/entities/sales/poliza/poliza_fund-recovery-comment.entity.js +35 -0
- package/dist/entities/sales/poliza/poliza_fund-recovery-comment.entity.js.map +1 -0
- package/dist/entities/sales/poliza/poliza_fund-recovery.entity.d.ts +31 -0
- package/dist/entities/sales/poliza/poliza_fund-recovery.entity.js +259 -0
- package/dist/entities/sales/poliza/poliza_fund-recovery.entity.js.map +1 -0
- package/dist/entities/sales/poliza/poliza_reimbursement-comment.entity.d.ts +5 -0
- package/dist/entities/sales/poliza/poliza_reimbursement-comment.entity.js +35 -0
- package/dist/entities/sales/poliza/poliza_reimbursement-comment.entity.js.map +1 -0
- package/dist/entities/sales/poliza/poliza_reimbursement.entity.d.ts +34 -0
- package/dist/entities/sales/poliza/poliza_reimbursement.entity.js +277 -0
- package/dist/entities/sales/poliza/poliza_reimbursement.entity.js.map +1 -0
- package/dist/entities/sales/poliza/poliza_scheduling-comment.entity.d.ts +5 -0
- package/dist/entities/sales/poliza/poliza_scheduling-comment.entity.js +35 -0
- package/dist/entities/sales/poliza/poliza_scheduling-comment.entity.js.map +1 -0
- package/dist/entities/sales/poliza/poliza_scheduling.entity.d.ts +34 -0
- package/dist/entities/sales/poliza/poliza_scheduling.entity.js +277 -0
- package/dist/entities/sales/poliza/poliza_scheduling.entity.js.map +1 -0
- package/dist/entities/sales/poliza-comment.entity.d.ts +5 -0
- package/dist/entities/sales/poliza-comment.entity.js +32 -0
- package/dist/entities/sales/poliza-comment.entity.js.map +1 -0
- package/dist/entities/sales/poliza.entity.d.ts +108 -0
- package/dist/entities/sales/poliza.entity.js +1032 -0
- package/dist/entities/sales/poliza.entity.js.map +1 -0
- package/dist/entities/sales/poliza_pdf.entity.d.ts +94 -0
- package/dist/entities/sales/poliza_pdf.entity.js +926 -0
- package/dist/entities/sales/poliza_pdf.entity.js.map +1 -0
- package/dist/entities/sales/receipt-comment.entity.d.ts +5 -0
- package/dist/entities/sales/receipt-comment.entity.js +32 -0
- package/dist/entities/sales/receipt-comment.entity.js.map +1 -0
- package/dist/entities/sales/receipt-sub-agente.entity.d.ts +5 -0
- package/dist/entities/sales/receipt-sub-agente.entity.js +35 -0
- package/dist/entities/sales/receipt-sub-agente.entity.js.map +1 -0
- package/dist/entities/sales/receipt.entity.d.ts +32 -0
- package/dist/entities/sales/receipt.entity.js +255 -0
- package/dist/entities/sales/receipt.entity.js.map +1 -0
- package/dist/entities/tag.entity.d.ts +8 -0
- package/dist/entities/tag.entity.js +53 -0
- package/dist/entities/tag.entity.js.map +1 -0
- package/dist/entities/thirdparty/email-config.entity.d.ts +14 -0
- package/dist/entities/thirdparty/email-config.entity.js +76 -0
- package/dist/entities/thirdparty/email-config.entity.js.map +1 -0
- package/dist/entities/thirdparty/email.entity.d.ts +17 -0
- package/dist/entities/thirdparty/email.entity.js +79 -0
- package/dist/entities/thirdparty/email.entity.js.map +1 -0
- package/dist/entities/thirdparty/oauth.entity.d.ts +21 -0
- package/dist/entities/thirdparty/oauth.entity.js +100 -0
- package/dist/entities/thirdparty/oauth.entity.js.map +1 -0
- package/dist/entities/thirdparty/service.entity.d.ts +8 -0
- package/dist/entities/thirdparty/service.entity.js +38 -0
- package/dist/entities/thirdparty/service.entity.js.map +1 -0
- package/dist/entities/thirdparty/user-email-relation.entity.d.ts +7 -0
- package/dist/entities/thirdparty/user-email-relation.entity.js +35 -0
- package/dist/entities/thirdparty/user-email-relation.entity.js.map +1 -0
- package/dist/entities/tools/calendar/event-list-calendars.entity.d.ts +6 -0
- package/dist/entities/tools/calendar/event-list-calendars.entity.js +32 -0
- package/dist/entities/tools/calendar/event-list-calendars.entity.js.map +1 -0
- package/dist/entities/tools/calendar/event.entity.d.ts +25 -0
- package/dist/entities/tools/calendar/event.entity.js +213 -0
- package/dist/entities/tools/calendar/event.entity.js.map +1 -0
- package/dist/entities/tools/calendar/index.d.ts +1 -0
- package/dist/entities/tools/calendar/index.js +18 -0
- package/dist/entities/tools/calendar/index.js.map +1 -0
- package/dist/entities/tools/index.d.ts +7 -0
- package/dist/entities/tools/index.js +24 -0
- package/dist/entities/tools/index.js.map +1 -0
- package/dist/entities/tools/task-comment.entity.d.ts +8 -0
- package/dist/entities/tools/task-comment.entity.js +39 -0
- package/dist/entities/tools/task-comment.entity.js.map +1 -0
- package/dist/entities/tools/task-history.entity.d.ts +15 -0
- package/dist/entities/tools/task-history.entity.js +131 -0
- package/dist/entities/tools/task-history.entity.js.map +1 -0
- package/dist/entities/tools/task-list-field.d.ts +5 -0
- package/dist/entities/tools/task-list-field.js +39 -0
- package/dist/entities/tools/task-list-field.js.map +1 -0
- package/dist/entities/tools/task-objection.entity.d.ts +10 -0
- package/dist/entities/tools/task-objection.entity.js +80 -0
- package/dist/entities/tools/task-objection.entity.js.map +1 -0
- package/dist/entities/tools/task-time-track.entity.d.ts +16 -0
- package/dist/entities/tools/task-time-track.entity.js +139 -0
- package/dist/entities/tools/task-time-track.entity.js.map +1 -0
- package/dist/entities/tools/task.entity.d.ts +49 -0
- package/dist/entities/tools/task.entity.js +419 -0
- package/dist/entities/tools/task.entity.js.map +1 -0
- package/dist/entities/user-invitations.entity.d.ts +11 -0
- package/dist/entities/user-invitations.entity.js +102 -0
- package/dist/entities/user-invitations.entity.js.map +1 -0
- package/dist/entities/user.entity.d.ts +39 -0
- package/dist/entities/user.entity.js +270 -0
- package/dist/entities/user.entity.js.map +1 -0
- package/dist/eslint.config.d.ts +2 -0
- package/dist/eslint.config.js +46 -0
- package/dist/eslint.config.js.map +1 -0
- package/dist/grpc/drive/drive.proto +260 -0
- package/dist/grpc/drive/leads.proto +114 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/index.d.ts +5 -0
- package/dist/modules/index.js +22 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/queue/event.service.d.ts +32 -0
- package/dist/modules/queue/event.service.js +45 -0
- package/dist/modules/queue/event.service.js.map +1 -0
- package/dist/modules/queue/notifier.service.d.ts +15 -0
- package/dist/modules/queue/notifier.service.js +70 -0
- package/dist/modules/queue/notifier.service.js.map +1 -0
- package/dist/modules/queue/notifiers/calendar.notifier.d.ts +10 -0
- package/dist/modules/queue/notifiers/calendar.notifier.js +60 -0
- package/dist/modules/queue/notifiers/calendar.notifier.js.map +1 -0
- package/dist/modules/queue/notifiers/contact.notifier.d.ts +7 -0
- package/dist/modules/queue/notifiers/contact.notifier.js +52 -0
- package/dist/modules/queue/notifiers/contact.notifier.js.map +1 -0
- package/dist/modules/queue/notifiers/index.d.ts +4 -0
- package/dist/modules/queue/notifiers/index.js +21 -0
- package/dist/modules/queue/notifiers/index.js.map +1 -0
- package/dist/modules/queue/notifiers/lead.notifier.d.ts +7 -0
- package/dist/modules/queue/notifiers/lead.notifier.js +52 -0
- package/dist/modules/queue/notifiers/lead.notifier.js.map +1 -0
- package/dist/modules/queue/notifiers/task.notifier.d.ts +15 -0
- package/dist/modules/queue/notifiers/task.notifier.js +159 -0
- package/dist/modules/queue/notifiers/task.notifier.js.map +1 -0
- package/dist/modules/queue/queue.module.d.ts +4 -0
- package/dist/modules/queue/queue.module.js +68 -0
- package/dist/modules/queue/queue.module.js.map +1 -0
- package/dist/modules/queue/queue.service.d.ts +9 -0
- package/dist/modules/queue/queue.service.js +56 -0
- package/dist/modules/queue/queue.service.js.map +1 -0
- package/dist/modules/queue/scheduler.service.d.ts +9 -0
- package/dist/modules/queue/scheduler.service.js +40 -0
- package/dist/modules/queue/scheduler.service.js.map +1 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package leads;
|
|
4
|
+
|
|
5
|
+
// Definición del mensaje principal para crear un Lead
|
|
6
|
+
message CreateLeadRequest {
|
|
7
|
+
// Representa la foto del lead
|
|
8
|
+
bytes photo = 1;
|
|
9
|
+
|
|
10
|
+
// Especifica el tipo de persona para el lead
|
|
11
|
+
PersonType typePerson = 2;
|
|
12
|
+
|
|
13
|
+
// Nombre del lead
|
|
14
|
+
string name = 3;
|
|
15
|
+
|
|
16
|
+
// Apellido del lead
|
|
17
|
+
string lastName = 4;
|
|
18
|
+
|
|
19
|
+
// Nombre completo del lead
|
|
20
|
+
string fullName = 5;
|
|
21
|
+
|
|
22
|
+
// Segundo nombre del lead
|
|
23
|
+
string secondName = 6;
|
|
24
|
+
|
|
25
|
+
// RFC del lead
|
|
26
|
+
string rfc = 7;
|
|
27
|
+
|
|
28
|
+
// Dirección del lead
|
|
29
|
+
string address = 8;
|
|
30
|
+
|
|
31
|
+
// Cargo del lead
|
|
32
|
+
string cargo = 9;
|
|
33
|
+
|
|
34
|
+
// Fecha de nacimiento del lead
|
|
35
|
+
string birthdate = 10;
|
|
36
|
+
|
|
37
|
+
// Género del lead
|
|
38
|
+
string gender = 11;
|
|
39
|
+
|
|
40
|
+
// CURP del lead
|
|
41
|
+
string curp = 12;
|
|
42
|
+
|
|
43
|
+
// CUA del lead
|
|
44
|
+
string cua = 13;
|
|
45
|
+
|
|
46
|
+
// Puesto del lead
|
|
47
|
+
string post = 14;
|
|
48
|
+
|
|
49
|
+
// Observaciones sobre el lead
|
|
50
|
+
string observations = 15;
|
|
51
|
+
|
|
52
|
+
// ¿El lead es exportado?
|
|
53
|
+
bool export = 16;
|
|
54
|
+
|
|
55
|
+
// Descripción de la fuente del lead
|
|
56
|
+
string sourceDescription = 17;
|
|
57
|
+
|
|
58
|
+
// Compañía del lead
|
|
59
|
+
string company = 18;
|
|
60
|
+
|
|
61
|
+
// ID Tipo de Cliente
|
|
62
|
+
string typeId = 19;
|
|
63
|
+
|
|
64
|
+
// ID Origen del lead
|
|
65
|
+
string sourceId = 20;
|
|
66
|
+
|
|
67
|
+
// Números de teléfono asociados con el lead
|
|
68
|
+
repeated PhoneDto phones = 21;
|
|
69
|
+
|
|
70
|
+
// Emails asociados con el lead
|
|
71
|
+
repeated EmailDto emails = 22;
|
|
72
|
+
|
|
73
|
+
// Códigos de aseguradora asociados con el lead
|
|
74
|
+
repeated CodigoDto codigos = 23;
|
|
75
|
+
|
|
76
|
+
// ID del usuario asignado al lead
|
|
77
|
+
string assignedById = 24;
|
|
78
|
+
|
|
79
|
+
// ID del usuario observador
|
|
80
|
+
string observerId = 25;
|
|
81
|
+
|
|
82
|
+
// Monto de la cotización
|
|
83
|
+
double quoteAmount = 26;
|
|
84
|
+
|
|
85
|
+
// ID de la moneda de la cotización
|
|
86
|
+
string quoteCurrencyId = 27;
|
|
87
|
+
|
|
88
|
+
// IDs de los archivos
|
|
89
|
+
repeated string filesIds = 28;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Definición del enum PersonType
|
|
93
|
+
enum PersonType {
|
|
94
|
+
FISICA = 0;
|
|
95
|
+
MORAL = 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Definición de PhoneDto
|
|
99
|
+
message PhoneDto {
|
|
100
|
+
string number = 1;
|
|
101
|
+
string relation = 2;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Definición de EmailDto
|
|
105
|
+
message EmailDto {
|
|
106
|
+
string email = 1;
|
|
107
|
+
string relation = 2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Definición de CodigoDto
|
|
111
|
+
message CodigoDto {
|
|
112
|
+
string codigo = 1;
|
|
113
|
+
string insuranceId = 2;
|
|
114
|
+
}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./entities"), exports);
|
|
18
|
+
__exportStar(require("./common"), exports);
|
|
19
|
+
__exportStar(require("./modules"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./queue/notifier.service"), exports);
|
|
18
|
+
__exportStar(require("./queue/scheduler.service"), exports);
|
|
19
|
+
__exportStar(require("./queue/queue.module"), exports);
|
|
20
|
+
__exportStar(require("./queue/event.service"), exports);
|
|
21
|
+
__exportStar(require("./queue/queue.service"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C;AAC1C,uDAAqC;AACrC,wDAAsC;AACtC,wDAAsC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AmqpConnection } from "@golevelup/nestjs-rabbitmq";
|
|
2
|
+
import type { calendar_v3 } from "googleapis";
|
|
3
|
+
interface GeneralData {
|
|
4
|
+
userInfo: {
|
|
5
|
+
userId: string;
|
|
6
|
+
token: string;
|
|
7
|
+
oauthId: string;
|
|
8
|
+
};
|
|
9
|
+
event: {
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
eventGoogle: calendar_v3.Schema$Event;
|
|
13
|
+
}
|
|
14
|
+
interface DeleteData {
|
|
15
|
+
userInfo: {
|
|
16
|
+
userId: string;
|
|
17
|
+
token: string;
|
|
18
|
+
oauthId: string;
|
|
19
|
+
};
|
|
20
|
+
event: {
|
|
21
|
+
googleId: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare class EasyEventService {
|
|
25
|
+
private readonly amqpConnection;
|
|
26
|
+
private readonly exchangeName;
|
|
27
|
+
constructor(amqpConnection: AmqpConnection, exchangeName: string);
|
|
28
|
+
createEvent(data: GeneralData): Promise<void>;
|
|
29
|
+
updateEvent(data: GeneralData): Promise<void>;
|
|
30
|
+
deleteEvent(data: DeleteData): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EasyEventService = void 0;
|
|
16
|
+
const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const logger = new common_1.Logger("EasyEventService");
|
|
19
|
+
let EasyEventService = class EasyEventService {
|
|
20
|
+
amqpConnection;
|
|
21
|
+
exchangeName;
|
|
22
|
+
constructor(amqpConnection, exchangeName) {
|
|
23
|
+
this.amqpConnection = amqpConnection;
|
|
24
|
+
this.exchangeName = exchangeName;
|
|
25
|
+
}
|
|
26
|
+
async createEvent(data) {
|
|
27
|
+
logger.debug(`Creating a new event...`, this.exchangeName, "event.create");
|
|
28
|
+
await this.amqpConnection.publish(this.exchangeName, "event.create", data);
|
|
29
|
+
}
|
|
30
|
+
async updateEvent(data) {
|
|
31
|
+
logger.debug(`Updating event...`, this.exchangeName, "event.update");
|
|
32
|
+
await this.amqpConnection.publish(this.exchangeName, "event.update", data);
|
|
33
|
+
}
|
|
34
|
+
async deleteEvent(data) {
|
|
35
|
+
logger.debug(`Deleting event...`, this.exchangeName, "event.delete");
|
|
36
|
+
await this.amqpConnection.publish(this.exchangeName, "event.delete", data);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.EasyEventService = EasyEventService;
|
|
40
|
+
exports.EasyEventService = EasyEventService = __decorate([
|
|
41
|
+
(0, common_1.Injectable)(),
|
|
42
|
+
__param(1, (0, common_1.Inject)("EXCHANGE_NAME")),
|
|
43
|
+
__metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String])
|
|
44
|
+
], EasyEventService);
|
|
45
|
+
//# sourceMappingURL=event.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.service.js","sourceRoot":"","sources":["../../../src/modules/queue/event.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAA4D;AAC5D,2CAA4D;AAG5D,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAkB,CAAC,CAAC;AA0BvC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAER;IACyB;IAF5C,YACmB,cAA8B,EACL,YAAoB;QAD7C,mBAAc,GAAd,cAAc,CAAgB;QACL,iBAAY,GAAZ,YAAY,CAAQ;IAC7D,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,IAAiB;QACjC,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAiB;QACjC,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAgB;QAChC,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;CACF,CAAA;AApBY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;qCADS,gCAAc;GAFtC,gBAAgB,CAoB5B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AmqpConnection } from "@golevelup/nestjs-rabbitmq";
|
|
2
|
+
import { SendNotificationDto } from "../../common";
|
|
3
|
+
import { ContactNotifier, LeadNotifier, TaskNotifier } from "./notifiers";
|
|
4
|
+
export declare class EasyNotifierService {
|
|
5
|
+
private readonly amqpConnection;
|
|
6
|
+
private readonly exchangeName;
|
|
7
|
+
private readonly routingKey;
|
|
8
|
+
readonly task: TaskNotifier;
|
|
9
|
+
readonly contact: ContactNotifier;
|
|
10
|
+
readonly lead: LeadNotifier;
|
|
11
|
+
constructor(amqpConnection: AmqpConnection, exchangeName: string, routingKey: string);
|
|
12
|
+
sendNotification(data: SendNotificationDto): Promise<void>;
|
|
13
|
+
sendOTPPhone(code: string, recipientsId: string[]): Promise<void>;
|
|
14
|
+
sendOTPEmail(code: string, recipientsId: string[]): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EasyNotifierService = void 0;
|
|
16
|
+
const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const common_2 = require("../../common");
|
|
19
|
+
const notifiers_1 = require("./notifiers");
|
|
20
|
+
const logger = new common_1.Logger("EasyNotifierService");
|
|
21
|
+
let EasyNotifierService = class EasyNotifierService {
|
|
22
|
+
amqpConnection;
|
|
23
|
+
exchangeName;
|
|
24
|
+
routingKey;
|
|
25
|
+
task;
|
|
26
|
+
contact;
|
|
27
|
+
lead;
|
|
28
|
+
constructor(amqpConnection, exchangeName, routingKey) {
|
|
29
|
+
this.amqpConnection = amqpConnection;
|
|
30
|
+
this.exchangeName = exchangeName;
|
|
31
|
+
this.routingKey = routingKey;
|
|
32
|
+
this.task = new notifiers_1.TaskNotifier(this);
|
|
33
|
+
this.contact = new notifiers_1.ContactNotifier(this);
|
|
34
|
+
this.lead = new notifiers_1.LeadNotifier(this);
|
|
35
|
+
}
|
|
36
|
+
async sendNotification(data) {
|
|
37
|
+
logger.debug(`Sending notification: ${JSON.stringify(data)}`);
|
|
38
|
+
await this.amqpConnection.publish(this.exchangeName, this.routingKey, data);
|
|
39
|
+
}
|
|
40
|
+
async sendOTPPhone(code, recipientsId) {
|
|
41
|
+
const notificationDto = {
|
|
42
|
+
title: "OTP Code",
|
|
43
|
+
content: `Easywork: Your OTP code is ${code}`,
|
|
44
|
+
recipientsId,
|
|
45
|
+
channels: [common_2.NotificationChannel.SMS],
|
|
46
|
+
category: common_2.NotificationCategory.OTP,
|
|
47
|
+
subCategory: common_2.NotificationSubcategory.OTP,
|
|
48
|
+
};
|
|
49
|
+
await this.sendNotification(notificationDto);
|
|
50
|
+
}
|
|
51
|
+
async sendOTPEmail(code, recipientsId) {
|
|
52
|
+
const notificationDto = {
|
|
53
|
+
title: "OTP Code",
|
|
54
|
+
content: code,
|
|
55
|
+
recipientsId,
|
|
56
|
+
channels: [common_2.NotificationChannel.EMAIL],
|
|
57
|
+
category: common_2.NotificationCategory.OTP,
|
|
58
|
+
subCategory: common_2.NotificationSubcategory.OTP,
|
|
59
|
+
};
|
|
60
|
+
await this.sendNotification(notificationDto);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
exports.EasyNotifierService = EasyNotifierService;
|
|
64
|
+
exports.EasyNotifierService = EasyNotifierService = __decorate([
|
|
65
|
+
(0, common_1.Injectable)(),
|
|
66
|
+
__param(1, (0, common_1.Inject)('EXCHANGE_NAME')),
|
|
67
|
+
__param(2, (0, common_1.Inject)('NOTIFIER_ROUTING_KEY')),
|
|
68
|
+
__metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String, String])
|
|
69
|
+
], EasyNotifierService);
|
|
70
|
+
//# sourceMappingURL=notifier.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifier.service.js","sourceRoot":"","sources":["../../../src/modules/queue/notifier.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAA4D;AAC5D,2CAA4D;AAC5D,yCAAuH;AACvH,2CAA0E;AAE1E,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,qBAAqB,CAAC,CAAC;AAG1C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAMP;IACyB;IACO;IAPrC,IAAI,CAAe;IACnB,OAAO,CAAkB;IACzB,IAAI,CAAe;IAEnC,YACqB,cAA8B,EACL,YAAoB,EACb,UAAkB;QAFlD,mBAAc,GAAd,cAAc,CAAgB;QACL,iBAAY,GAAZ,YAAY,CAAQ;QACb,eAAU,GAAV,UAAU,CAAQ;QAEnE,IAAI,CAAC,IAAI,GAAG,IAAI,wBAAY,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,2BAAe,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,wBAAY,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,IAAyB;QAC5C,MAAM,CAAC,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9D,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,IAAY,EAAE,YAAsB;QACnD,MAAM,eAAe,GAAwB;YACzC,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,8BAA8B,IAAI,EAAE;YAC7C,YAAY;YACZ,QAAQ,EAAE,CAAC,4BAAmB,CAAC,GAAG,CAAC;YACnC,QAAQ,EAAE,6BAAoB,CAAC,GAAG;YAClC,WAAW,EAAE,gCAAuB,CAAC,GAAG;SAC3C,CAAC;QAEF,MAAM,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,IAAY,EAAE,YAAsB;QACnD,MAAM,eAAe,GAAwB;YACzC,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,IAAI;YACb,YAAY;YACZ,QAAQ,EAAE,CAAC,4BAAmB,CAAC,KAAK,CAAC;YACrC,QAAQ,EAAE,6BAAoB,CAAC,GAAG;YAClC,WAAW,EAAE,gCAAuB,CAAC,GAAG;SAC3C,CAAC;QAEF,MAAM,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACjD,CAAC;CACJ,CAAA;AA7CY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAQJ,WAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;IACvB,WAAA,IAAA,eAAM,EAAC,sBAAsB,CAAC,CAAA;qCAFE,gCAAc;GAN1C,mBAAmB,CA6C/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EasyNotifierService } from '../notifier.service';
|
|
2
|
+
import { EventCalendar } from '../../../entities';
|
|
3
|
+
export declare class CalendarService {
|
|
4
|
+
private readonly notifierService;
|
|
5
|
+
constructor(notifierService: EasyNotifierService);
|
|
6
|
+
private getMetadata;
|
|
7
|
+
private createNotificationDto;
|
|
8
|
+
private buildEventLink;
|
|
9
|
+
notifyNewEvent(event: EventCalendar, recipientsId: string[]): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CalendarService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const notifier_service_1 = require("../notifier.service");
|
|
15
|
+
const common_2 = require("../../../common");
|
|
16
|
+
let CalendarService = class CalendarService {
|
|
17
|
+
notifierService;
|
|
18
|
+
constructor(notifierService) {
|
|
19
|
+
this.notifierService = notifierService;
|
|
20
|
+
}
|
|
21
|
+
getMetadata(event, additionalData) {
|
|
22
|
+
return {
|
|
23
|
+
eventId: event.id,
|
|
24
|
+
eventOwnerId: event.createdBy?.id ?? null,
|
|
25
|
+
...(additionalData ?? {}),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
createNotificationDto(title, content, recipientsId, event, channels, subCategory, metadata) {
|
|
29
|
+
return {
|
|
30
|
+
title,
|
|
31
|
+
content,
|
|
32
|
+
recipientsId,
|
|
33
|
+
entityId: event.id,
|
|
34
|
+
channels,
|
|
35
|
+
subCategory,
|
|
36
|
+
metadata: this.getMetadata(event, metadata),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
buildEventLink(event, color = 'blue') {
|
|
40
|
+
return `<a href="/tools/calendar/event/${event.id}?show=true" style="color:${color}">[${event.name}]</a>`;
|
|
41
|
+
}
|
|
42
|
+
async notifyNewEvent(event, recipientsId) {
|
|
43
|
+
const fechaLInicial = event.startTime
|
|
44
|
+
? `<br/>Fecha Límite: ${new Date(event.startTime).toLocaleDateString()}`
|
|
45
|
+
: '';
|
|
46
|
+
const participantes = event.participants?.length > 0
|
|
47
|
+
? `<br/>Participantes: ${event.participants.map((p) => p.username).join(', ')}`
|
|
48
|
+
: '';
|
|
49
|
+
const eventLink = this.buildEventLink(event);
|
|
50
|
+
const content = `Nueva evento agregado: ${eventLink}${participantes}${fechaLInicial}`;
|
|
51
|
+
const notificationDto = this.createNotificationDto('Nueva Evento', content, recipientsId, event, [common_2.NotificationChannel.APP], common_2.NotificationSubcategory.NEW_EVENT);
|
|
52
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.CalendarService = CalendarService;
|
|
56
|
+
exports.CalendarService = CalendarService = __decorate([
|
|
57
|
+
(0, common_1.Injectable)(),
|
|
58
|
+
__metadata("design:paramtypes", [notifier_service_1.EasyNotifierService])
|
|
59
|
+
], CalendarService);
|
|
60
|
+
//# sourceMappingURL=calendar.notifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.notifier.js","sourceRoot":"","sources":["../../../../src/modules/queue/notifiers/calendar.notifier.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,0DAA0D;AAC1D,4CAIyB;AAKlB,IAAM,eAAe,GAArB,MAAM,eAAe;IACK;IAA7B,YAA6B,eAAoC;QAApC,oBAAe,GAAf,eAAe,CAAqB;IAAI,CAAC;IAE9D,WAAW,CAAC,KAAoB,EAAE,cAAoC;QAC1E,OAAO;YACH,OAAO,EAAE,KAAK,CAAC,EAAE;YACjB,YAAY,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE,IAAI,IAAI;YACzC,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;SAC5B,CAAC;IACN,CAAC;IAEO,qBAAqB,CACzB,KAAa,EACb,OAAe,EACf,YAAsB,EACtB,KAAoB,EACpB,QAA+B,EAC/B,WAAW,EACX,QAA8B;QAE9B,OAAO;YACH,KAAK;YACL,OAAO;YACP,YAAY;YACZ,QAAQ,EAAE,KAAK,CAAC,EAAE;YAClB,QAAQ;YACR,WAAW;YACX,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC;SAC9C,CAAC;IACN,CAAC;IAEO,cAAc,CAAC,KAAoB,EAAE,QAAgB,MAAM;QAC/D,OAAO,kCAAkC,KAAK,CAAC,EAAE,4BAA4B,KAAK,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC;IAC9G,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,KAAoB,EAAE,YAAsB;QAC7D,MAAM,aAAa,GAAG,KAAK,CAAC,SAAS;YACjC,CAAC,CAAC,sBAAsB,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,kBAAkB,EAAE,EAAE;YACxE,CAAC,CAAC,EAAE,CAAC;QACT,MAAM,aAAa,GACf,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC;YAC1B,CAAC,CAAC,uBAAuB,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC/E,CAAC,CAAC,EAAE,CAAC;QAEb,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC7C,MAAM,OAAO,GAAG,0BAA0B,SAAS,GAAG,aAAa,GAAG,aAAa,EAAE,CAAC;QAEtF,MAAM,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAC9C,cAAc,EACd,OAAO,EACP,YAAY,EACZ,KAAK,EACL,CAAC,4BAAmB,CAAC,GAAG,CAAC,EACzB,gCAAuB,CAAC,SAAS,CACpC,CAAC;QAEF,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACjE,CAAC;CACJ,CAAA;AA1DY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAEqC,sCAAmB;GADxD,eAAe,CA0D3B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EasyNotifierService } from "../notifier.service";
|
|
2
|
+
import { Contact, ContactComment } from "../../../entities";
|
|
3
|
+
export declare class ContactNotifier {
|
|
4
|
+
private readonly notifierService;
|
|
5
|
+
constructor(notifierService: EasyNotifierService);
|
|
6
|
+
notifyNewCommentContact(contact: Contact, comment: ContactComment, recipientsId: string[]): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ContactNotifier = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const notifier_service_1 = require("../notifier.service");
|
|
15
|
+
const common_2 = require("../../../common");
|
|
16
|
+
let ContactNotifier = class ContactNotifier {
|
|
17
|
+
notifierService;
|
|
18
|
+
constructor(notifierService) {
|
|
19
|
+
this.notifierService = notifierService;
|
|
20
|
+
}
|
|
21
|
+
async notifyNewCommentContact(contact, comment, recipientsId) {
|
|
22
|
+
const content = `${comment.createdBy.name} comentó en el contacto: <a href="/sales/contacts/contact/${contact.id}?show=true" style="color:#170f6b">[${contact.name}]</a>.`;
|
|
23
|
+
const metadata = {
|
|
24
|
+
contactId: contact.id,
|
|
25
|
+
commentId: comment.id,
|
|
26
|
+
contactOwnerId: contact.createdBy?.id,
|
|
27
|
+
commentOwnerId: comment.createdBy?.id,
|
|
28
|
+
contactAssignedId: contact?.assignedBy?.id,
|
|
29
|
+
};
|
|
30
|
+
const notificationDto = {
|
|
31
|
+
title: "New Comment",
|
|
32
|
+
content,
|
|
33
|
+
recipientsId,
|
|
34
|
+
entityId: contact.id,
|
|
35
|
+
channels: [
|
|
36
|
+
common_2.NotificationChannel.APP,
|
|
37
|
+
common_2.NotificationChannel.SMS,
|
|
38
|
+
common_2.NotificationChannel.PUSH,
|
|
39
|
+
],
|
|
40
|
+
category: common_2.NotificationCategory.CRM,
|
|
41
|
+
subCategory: common_2.NotificationSubcategory.CONTACT_NEW_COMMENT,
|
|
42
|
+
metadata,
|
|
43
|
+
};
|
|
44
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.ContactNotifier = ContactNotifier;
|
|
48
|
+
exports.ContactNotifier = ContactNotifier = __decorate([
|
|
49
|
+
(0, common_1.Injectable)(),
|
|
50
|
+
__metadata("design:paramtypes", [notifier_service_1.EasyNotifierService])
|
|
51
|
+
], ContactNotifier);
|
|
52
|
+
//# sourceMappingURL=contact.notifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.notifier.js","sourceRoot":"","sources":["../../../../src/modules/queue/notifiers/contact.notifier.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,0DAA0D;AAE1D,4CAKyB;AAGlB,IAAM,eAAe,GAArB,MAAM,eAAe;IACG;IAA7B,YAA6B,eAAoC;QAApC,oBAAe,GAAf,eAAe,CAAqB;IAAG,CAAC;IAErE,KAAK,CAAC,uBAAuB,CAC3B,OAAgB,EAChB,OAAuB,EACvB,YAAsB;QAEtB,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,6DAA6D,OAAO,CAAC,EAAE,sCAAsC,OAAO,CAAC,IAAI,QAAQ,CAAC;QAE3K,MAAM,QAAQ,GAAG;YACf,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE;YACrC,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE;YACrC,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE;SAC3C,CAAC;QAEF,MAAM,eAAe,GAAwB;YAC3C,KAAK,EAAE,aAAa;YACpB,OAAO;YACP,YAAY;YACZ,QAAQ,EAAE,OAAO,CAAC,EAAE;YACpB,QAAQ,EAAE;gBACR,4BAAmB,CAAC,GAAG;gBACvB,4BAAmB,CAAC,GAAG;gBACvB,4BAAmB,CAAC,IAAI;aACzB;YACD,QAAQ,EAAE,6BAAoB,CAAC,GAAG;YAClC,WAAW,EAAE,gCAAuB,CAAC,mBAAmB;YACxD,QAAQ;SACT,CAAC;QAEF,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC/D,CAAC;CACF,CAAA;AAnCY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAEmC,sCAAmB;GADtD,eAAe,CAmC3B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./task.notifier"), exports);
|
|
18
|
+
__exportStar(require("./calendar.notifier"), exports);
|
|
19
|
+
__exportStar(require("./contact.notifier"), exports);
|
|
20
|
+
__exportStar(require("./lead.notifier"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/queue/notifiers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,sDAAoC;AACpC,qDAAmC;AACnC,kDAAgC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EasyNotifierService } from "../notifier.service";
|
|
2
|
+
import { Lead, LeadComment } from "../../../entities";
|
|
3
|
+
export declare class LeadNotifier {
|
|
4
|
+
private readonly notifierService;
|
|
5
|
+
constructor(notifierService: EasyNotifierService);
|
|
6
|
+
notifyNewCommentLead(lead: Lead, comment: LeadComment, recipientsId: string[]): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LeadNotifier = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const notifier_service_1 = require("../notifier.service");
|
|
15
|
+
const common_2 = require("../../../common");
|
|
16
|
+
let LeadNotifier = class LeadNotifier {
|
|
17
|
+
notifierService;
|
|
18
|
+
constructor(notifierService) {
|
|
19
|
+
this.notifierService = notifierService;
|
|
20
|
+
}
|
|
21
|
+
async notifyNewCommentLead(lead, comment, recipientsId) {
|
|
22
|
+
const content = `${comment.createdBy.name} comentó en el prospecto: <a href="/sales/leads/lead/${lead.id}?show=true" style="color:#170f6b">[${lead.name}]</a>.`;
|
|
23
|
+
const metadata = {
|
|
24
|
+
leadId: lead.id,
|
|
25
|
+
commentId: comment.id,
|
|
26
|
+
leadOwnerId: lead.createdBy?.id,
|
|
27
|
+
commentOwnerId: comment.createdBy?.id,
|
|
28
|
+
leadAssignedId: lead?.assignedBy?.id,
|
|
29
|
+
};
|
|
30
|
+
const notificationDto = {
|
|
31
|
+
title: "New Comment",
|
|
32
|
+
content,
|
|
33
|
+
recipientsId,
|
|
34
|
+
entityId: lead.id,
|
|
35
|
+
channels: [
|
|
36
|
+
common_2.NotificationChannel.APP,
|
|
37
|
+
common_2.NotificationChannel.SMS,
|
|
38
|
+
common_2.NotificationChannel.PUSH,
|
|
39
|
+
],
|
|
40
|
+
category: common_2.NotificationCategory.CRM,
|
|
41
|
+
subCategory: common_2.NotificationSubcategory.CONTACT_NEW_COMMENT,
|
|
42
|
+
metadata,
|
|
43
|
+
};
|
|
44
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.LeadNotifier = LeadNotifier;
|
|
48
|
+
exports.LeadNotifier = LeadNotifier = __decorate([
|
|
49
|
+
(0, common_1.Injectable)(),
|
|
50
|
+
__metadata("design:paramtypes", [notifier_service_1.EasyNotifierService])
|
|
51
|
+
], LeadNotifier);
|
|
52
|
+
//# sourceMappingURL=lead.notifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lead.notifier.js","sourceRoot":"","sources":["../../../../src/modules/queue/notifiers/lead.notifier.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,0DAA0D;AAE1D,4CAKyB;AAGlB,IAAM,YAAY,GAAlB,MAAM,YAAY;IACM;IAA7B,YAA6B,eAAoC;QAApC,oBAAe,GAAf,eAAe,CAAqB;IAAG,CAAC;IAErE,KAAK,CAAC,oBAAoB,CACxB,IAAU,EACV,OAAoB,EACpB,YAAsB;QAEtB,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,wDAAwD,IAAI,CAAC,EAAE,sCAAsC,IAAI,CAAC,IAAI,QAAQ,CAAC;QAEhK,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,WAAW,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE;YAC/B,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE;YACrC,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;SACrC,CAAC;QAEF,MAAM,eAAe,GAAwB;YAC3C,KAAK,EAAE,aAAa;YACpB,OAAO;YACP,YAAY;YACZ,QAAQ,EAAE,IAAI,CAAC,EAAE;YACjB,QAAQ,EAAE;gBACR,4BAAmB,CAAC,GAAG;gBACvB,4BAAmB,CAAC,GAAG;gBACvB,4BAAmB,CAAC,IAAI;aACzB;YACD,QAAQ,EAAE,6BAAoB,CAAC,GAAG;YAClC,WAAW,EAAE,gCAAuB,CAAC,mBAAmB;YACxD,QAAQ;SACT,CAAC;QAEF,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC/D,CAAC;CACF,CAAA;AAnCY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEmC,sCAAmB;GADtD,YAAY,CAmCxB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EasyNotifierService } from "../notifier.service";
|
|
2
|
+
import { Task, TaskComment } from "../../../entities";
|
|
3
|
+
export declare class TaskNotifier {
|
|
4
|
+
private readonly notifierService;
|
|
5
|
+
constructor(notifierService: EasyNotifierService);
|
|
6
|
+
private getMetadata;
|
|
7
|
+
private createNotificationDto;
|
|
8
|
+
private buildTaskLink;
|
|
9
|
+
notifyTaskCompletion(task: Task, recipientsId: string[]): Promise<void>;
|
|
10
|
+
notifyTaskOverdue(task: Task, recipientsId: string[]): Promise<void>;
|
|
11
|
+
notifyTaskContinue(task: Task, recipientsId: string[]): Promise<void>;
|
|
12
|
+
notifyNewTask(task: Task, recipientsId: string[]): Promise<void>;
|
|
13
|
+
notifyTaskUpdate(task: Task, recipientsId: string[], changedFields: string[]): Promise<void>;
|
|
14
|
+
notifyNewComment(task: Task, comment: TaskComment, recipientsId: string[]): Promise<void>;
|
|
15
|
+
}
|