easywork-common-lib 1.0.463 → 1.0.464
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 +5 -0
- package/dist/common/@types/interfaces/index.js +22 -0
- package/dist/common/@types/interfaces/index.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 +31 -0
- package/dist/common/constants/app.contants.js +185 -0
- package/dist/common/constants/app.contants.js.map +1 -0
- package/dist/common/constants/index.d.ts +2 -0
- package/dist/common/constants/index.js +19 -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/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/drive.enum.d.ts +20 -0
- package/dist/common/enums/drive.enum.js +26 -0
- package/dist/common/enums/drive.enum.js.map +1 -0
- package/dist/common/enums/index.d.ts +4 -0
- package/dist/common/enums/index.js +21 -0
- package/dist/common/enums/index.js.map +1 -0
- package/dist/common/enums/notification.enum.d.ts +32 -0
- package/dist/common/enums/notification.enum.js +39 -0
- package/dist/common/enums/notification.enum.js.map +1 -0
- package/dist/common/enums/sales.enum.d.ts +41 -0
- package/dist/common/enums/sales.enum.js +53 -0
- package/dist/common/enums/sales.enum.js.map +1 -0
- package/dist/common/enums/tools.enum.d.ts +19 -0
- package/dist/common/enums/tools.enum.js +26 -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 +2 -0
- package/dist/common/functions/image.js +14 -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/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 +21 -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 +5 -0
- package/dist/entities/group.entity.js +33 -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 +4 -0
- package/dist/entities/helpers/index.js +21 -0
- package/dist/entities/helpers/index.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 +68 -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 +6 -0
- package/dist/entities/helpers/sales/index.js +23 -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_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 +10 -0
- package/dist/entities/helpers/sales/poliza/index.js +27 -0
- package/dist/entities/helpers/sales/poliza/index.js.map +1 -0
- package/dist/entities/helpers/sales/poliza/poliza_file.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/poliza/poliza_file.entity.js +68 -0
- package/dist/entities/helpers/sales/poliza/poliza_file.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/index.d.ts +1 -0
- package/dist/entities/helpers/tools/index.js +18 -0
- package/dist/entities/helpers/tools/index.js.map +1 -0
- package/dist/entities/helpers/tools/task_crm.entity.d.ts +19 -0
- package/dist/entities/helpers/tools/task_crm.entity.js +136 -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 +26 -0
- package/dist/entities/index.js +43 -0
- package/dist/entities/index.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 +6 -0
- package/dist/entities/role.entity.js +42 -0
- package/dist/entities/role.entity.js.map +1 -0
- package/dist/entities/sales/agente-intermediario.entity.d.ts +5 -0
- package/dist/entities/sales/agente-intermediario.entity.js +34 -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 +49 -0
- package/dist/entities/sales/contact.entity.js +303 -0
- package/dist/entities/sales/contact.entity.js.map +1 -0
- package/dist/entities/sales/index.d.ts +12 -0
- package/dist/entities/sales/index.js +29 -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 +51 -0
- package/dist/entities/sales/lead.entity.js +344 -0
- package/dist/entities/sales/lead.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 +112 -0
- package/dist/entities/sales/poliza.entity.js +1103 -0
- package/dist/entities/sales/poliza.entity.js.map +1 -0
- package/dist/entities/sales/poliza_siniestro.entity.d.ts +12 -0
- package/dist/entities/sales/poliza_siniestro.entity.js +72 -0
- package/dist/entities/sales/poliza_siniestro.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 +31 -0
- package/dist/entities/sales/receipt.entity.js +203 -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 +18 -0
- package/dist/entities/thirdparty/oauth.entity.js +93 -0
- package/dist/entities/thirdparty/oauth.entity.js.map +1 -0
- package/dist/entities/thirdparty/service.entity.d.ts +6 -0
- package/dist/entities/thirdparty/service.entity.js +32 -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.entity.d.ts +19 -0
- package/dist/entities/tools/calendar/event.entity.js +132 -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 +4 -0
- package/dist/entities/tools/index.js +21 -0
- package/dist/entities/tools/index.js.map +1 -0
- package/dist/entities/tools/task-comment.entity.d.ts +6 -0
- package/dist/entities/tools/task-comment.entity.js +38 -0
- package/dist/entities/tools/task-comment.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.entity.d.ts +34 -0
- package/dist/entities/tools/task.entity.js +221 -0
- package/dist/entities/tools/task.entity.js.map +1 -0
- package/dist/entities/user.entity.d.ts +29 -0
- package/dist/entities/user.entity.js +168 -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 +179 -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 +4 -0
- package/dist/modules/index.js +21 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/queue/event.service.d.ts +9 -0
- package/dist/modules/queue/event.service.js +40 -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 +2 -0
- package/dist/modules/queue/notifiers/calendar.notifier.js +17 -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 +49 -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 +49 -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 +130 -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 +57 -0
- package/dist/modules/queue/queue.module.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,130 @@
|
|
|
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.TaskNotifier = 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 TaskNotifier = class TaskNotifier {
|
|
17
|
+
notifierService;
|
|
18
|
+
constructor(notifierService) {
|
|
19
|
+
this.notifierService = notifierService;
|
|
20
|
+
}
|
|
21
|
+
getMetadata(task, additionalData) {
|
|
22
|
+
return {
|
|
23
|
+
taskId: task.id,
|
|
24
|
+
taskOwnerId: task.createdBy?.id ?? null,
|
|
25
|
+
taskResponsibleId: task.responsible?.[0]?.id ?? null,
|
|
26
|
+
...(additionalData ?? {}),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
createNotificationDto(title, content, recipientsId, task, channels, subCategory, metadata) {
|
|
30
|
+
return {
|
|
31
|
+
title,
|
|
32
|
+
content,
|
|
33
|
+
recipientsId,
|
|
34
|
+
entityId: task.id,
|
|
35
|
+
channels,
|
|
36
|
+
category: common_2.NotificationCategory.TASK,
|
|
37
|
+
subCategory,
|
|
38
|
+
metadata: this.getMetadata(task, metadata),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
buildTaskLink(task, color = 'blue') {
|
|
42
|
+
return `<a href="/tools/tasks/task/${task.id}?show=true" style="color:${color}">[${task.name}]</a>`;
|
|
43
|
+
}
|
|
44
|
+
async notifyTaskCompletion(task, recipientsId) {
|
|
45
|
+
const content = `La tarea ${task.name} ha sido completada`;
|
|
46
|
+
const notificationDto = this.createNotificationDto('Tarea Completada', content, recipientsId, task, [common_2.NotificationChannel.APP], common_2.NotificationSubcategory.TASK_COMPLETED);
|
|
47
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
48
|
+
}
|
|
49
|
+
async notifyTaskOverdue(task, recipientsId) {
|
|
50
|
+
const content = `La tarea [#${task.number}] - ${task.name} está atrasada`;
|
|
51
|
+
const notificationDto = this.createNotificationDto('Tarea Atrasada', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_OVERDUE);
|
|
52
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
53
|
+
}
|
|
54
|
+
async notifyTaskContinue(task, recipientsId) {
|
|
55
|
+
const content = `La tarea #${task.number} - ${task.name} ha sido reanudada`;
|
|
56
|
+
const notificationDto = this.createNotificationDto('Tarea Reanudada', content, recipientsId, task, [common_2.NotificationChannel.APP], common_2.NotificationSubcategory.TASK_UPDATED);
|
|
57
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
58
|
+
}
|
|
59
|
+
async notifyNewTask(task, recipientsId) {
|
|
60
|
+
const fechaLimite = task.deadline
|
|
61
|
+
? `<br/>Fecha Límite: ${new Date(task.deadline).toLocaleDateString()}`
|
|
62
|
+
: '';
|
|
63
|
+
const observadores = task.observers?.length > 0
|
|
64
|
+
? `<br/>Observadores: ${task.observers.map((o) => o.username).join(', ')}`
|
|
65
|
+
: '';
|
|
66
|
+
const responsables = task.responsible?.length > 0
|
|
67
|
+
? `<br/>Responsables: ${task.responsible.map((r) => r.username).join(', ')}`
|
|
68
|
+
: '';
|
|
69
|
+
const participantes = task.participants?.length > 0
|
|
70
|
+
? `<br/>Participantes: ${task.participants.map((p) => p.username).join(', ')}`
|
|
71
|
+
: '';
|
|
72
|
+
const taskLink = this.buildTaskLink(task);
|
|
73
|
+
const content = `Nueva tarea agregada: ${taskLink}${responsables}${observadores}${participantes}${fechaLimite}`;
|
|
74
|
+
const notificationDto = this.createNotificationDto('Nueva Tarea', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.NEW_TASK);
|
|
75
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
76
|
+
}
|
|
77
|
+
async notifyTaskUpdate(task, recipientsId, changedFields) {
|
|
78
|
+
const taskLink = this.buildTaskLink(task);
|
|
79
|
+
let content = `Tarea #${task.number} - ${taskLink}`;
|
|
80
|
+
if (changedFields.length === 0) {
|
|
81
|
+
content += ' ha sido actualizada';
|
|
82
|
+
const notificationDto = this.createNotificationDto('Tarea Actualizada', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_UPDATED);
|
|
83
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
content += ' se actualizó:';
|
|
87
|
+
if (changedFields.includes('deadline')) {
|
|
88
|
+
const deadlineText = task.deadline
|
|
89
|
+
? new Date(task.deadline).toLocaleDateString()
|
|
90
|
+
: 'Ninguna';
|
|
91
|
+
content += `<br/>Fecha Límite cambiada: ${deadlineText}`;
|
|
92
|
+
}
|
|
93
|
+
if (changedFields.includes('responsible') && task.responsible?.length > 0) {
|
|
94
|
+
content = `Se te ha asignado la tarea #${task.number} - ${taskLink}`;
|
|
95
|
+
const notificationDto = this.createNotificationDto('Tarea Asignada', content, [task.responsible[0].id], task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_UPDATED);
|
|
96
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
if (changedFields.includes('name')) {
|
|
100
|
+
content += `<br/>Nombre: ${task.name}`;
|
|
101
|
+
}
|
|
102
|
+
if (changedFields.includes('description')) {
|
|
103
|
+
content += `<br/>Descripción: ${task.description}`;
|
|
104
|
+
}
|
|
105
|
+
if (changedFields.includes('status')) {
|
|
106
|
+
content += `<br/>Estado: ${task.status}`;
|
|
107
|
+
}
|
|
108
|
+
const notificationDto = this.createNotificationDto('Tarea Actualizada', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_UPDATED);
|
|
109
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async notifyNewComment(task, comment, recipientsId) {
|
|
113
|
+
const commentText = comment.comment.slice(0, 20);
|
|
114
|
+
const taskLink = this.buildTaskLink(task, '#170f6b');
|
|
115
|
+
const commenterName = comment.createdBy?.name ?? 'Alguien';
|
|
116
|
+
const content = `${commenterName} comentó en la tarea: ${taskLink}. Texto del comentario: ${commentText}`;
|
|
117
|
+
const metadata = this.getMetadata(task, {
|
|
118
|
+
commentId: comment.id,
|
|
119
|
+
commentOwnerId: comment.createdBy?.id ?? null,
|
|
120
|
+
});
|
|
121
|
+
const notificationDto = this.createNotificationDto('Nuevo Comentario', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_NEW_COMMENT, metadata);
|
|
122
|
+
await this.notifierService.sendNotification(notificationDto);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
exports.TaskNotifier = TaskNotifier;
|
|
126
|
+
exports.TaskNotifier = TaskNotifier = __decorate([
|
|
127
|
+
(0, common_1.Injectable)(),
|
|
128
|
+
__metadata("design:paramtypes", [notifier_service_1.EasyNotifierService])
|
|
129
|
+
], TaskNotifier);
|
|
130
|
+
//# sourceMappingURL=task.notifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.notifier.js","sour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GAAG,GAAG,aAAa,yBAAyB,QAAQ,2BAA2B,WAAW,EAAE,CAAC;QAE1G,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;YACpC,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE,IAAI,IAAI;SAChD,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAC9C,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,CAAC,4BAAmB,CAAC,GAAG,EAAE,4BAAmB,CAAC,GAAG,EAAE,4BAAmB,CAAC,IAAI,CAAC,EAC5E,gCAAuB,CAAC,gBAAgB,EACxC,QAAQ,CACX,CAAC;QAEF,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACjE,CAAC;CACJ,CAAA;AA/LY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEqC,sCAAmB;GADxD,YAAY,CA+LxB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 EasyQueueModule_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.EasyQueueModule = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const notifier_service_1 = require("./notifier.service");
|
|
13
|
+
const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
|
|
14
|
+
const scheduler_service_1 = require("./scheduler.service");
|
|
15
|
+
const event_service_1 = require("./event.service");
|
|
16
|
+
let EasyQueueModule = EasyQueueModule_1 = class EasyQueueModule {
|
|
17
|
+
static register(exchangeName, rabbitMQUri, notificationRoutingKey, schedulerRoutingKey) {
|
|
18
|
+
return {
|
|
19
|
+
module: EasyQueueModule_1,
|
|
20
|
+
imports: [
|
|
21
|
+
nestjs_rabbitmq_1.RabbitMQModule.forRoot(nestjs_rabbitmq_1.RabbitMQModule, {
|
|
22
|
+
exchanges: [
|
|
23
|
+
{
|
|
24
|
+
name: exchangeName,
|
|
25
|
+
type: "topic",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
uri: rabbitMQUri,
|
|
29
|
+
}),
|
|
30
|
+
],
|
|
31
|
+
providers: [
|
|
32
|
+
{
|
|
33
|
+
provide: "EXCHANGE_NAME",
|
|
34
|
+
useValue: exchangeName,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
provide: "NOTIFIER_ROUTING_KEY",
|
|
38
|
+
useValue: notificationRoutingKey,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
provide: "SCHEDULER_ROUTING_KEY",
|
|
42
|
+
useValue: schedulerRoutingKey,
|
|
43
|
+
},
|
|
44
|
+
notifier_service_1.EasyNotifierService,
|
|
45
|
+
scheduler_service_1.EasySchedulerService,
|
|
46
|
+
event_service_1.EasyEventService,
|
|
47
|
+
],
|
|
48
|
+
exports: [notifier_service_1.EasyNotifierService, scheduler_service_1.EasySchedulerService, event_service_1.EasyEventService],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.EasyQueueModule = EasyQueueModule;
|
|
53
|
+
exports.EasyQueueModule = EasyQueueModule = EasyQueueModule_1 = __decorate([
|
|
54
|
+
(0, common_1.Global)(),
|
|
55
|
+
(0, common_1.Module)({})
|
|
56
|
+
], EasyQueueModule);
|
|
57
|
+
//# sourceMappingURL=queue.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.module.js","sourceRoot":"","sources":["../../../src/modules/queue/queue.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,yDAAyD;AACzD,gEAA4D;AAC5D,2DAA2D;AAC3D,mDAAmD;AAI5C,IAAM,eAAe,uBAArB,MAAM,eAAe;IAC1B,MAAM,CAAC,QAAQ,CACb,YAAoB,EACpB,WAAmB,EACnB,sBAA8B,EAC9B,mBAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,iBAAe;YACvB,OAAO,EAAE;gBACP,gCAAc,CAAC,OAAO,CAAC,gCAAc,EAAE;oBACrC,SAAS,EAAE;wBACT;4BACE,IAAI,EAAE,YAAY;4BAClB,IAAI,EAAE,OAAO;yBACd;qBACF;oBACD,GAAG,EAAE,WAAW;iBACjB,CAAC;aACH;YACD,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,eAAe;oBACxB,QAAQ,EAAE,YAAY;iBACvB;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,QAAQ,EAAE,sBAAsB;iBACjC;gBACD;oBACE,OAAO,EAAE,uBAAuB;oBAChC,QAAQ,EAAE,mBAAmB;iBAC9B;gBACD,sCAAmB;gBACnB,wCAAoB;gBACpB,gCAAgB;aACjB;YACD,OAAO,EAAE,CAAC,sCAAmB,EAAE,wCAAoB,EAAE,gCAAgB,CAAC;SACvE,CAAC;IACJ,CAAC;CACF,CAAA;AAxCY,0CAAe;0BAAf,eAAe;IAF3B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,eAAe,CAwC3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AmqpConnection } from "@golevelup/nestjs-rabbitmq";
|
|
2
|
+
import { Task } from "../../entities";
|
|
3
|
+
export declare class EasySchedulerService {
|
|
4
|
+
private readonly amqpConnection;
|
|
5
|
+
private readonly exchangeName;
|
|
6
|
+
private readonly routingKey;
|
|
7
|
+
constructor(amqpConnection: AmqpConnection, exchangeName: string, routingKey: string);
|
|
8
|
+
scheduleTaskAlerts(task: Task): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.EasySchedulerService = 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("EasySchedulerService");
|
|
19
|
+
let EasySchedulerService = class EasySchedulerService {
|
|
20
|
+
amqpConnection;
|
|
21
|
+
exchangeName;
|
|
22
|
+
routingKey;
|
|
23
|
+
constructor(amqpConnection, exchangeName, routingKey) {
|
|
24
|
+
this.amqpConnection = amqpConnection;
|
|
25
|
+
this.exchangeName = exchangeName;
|
|
26
|
+
this.routingKey = routingKey;
|
|
27
|
+
}
|
|
28
|
+
async scheduleTaskAlerts(task) {
|
|
29
|
+
logger.debug(`Add Task schedule Service...`);
|
|
30
|
+
await this.amqpConnection.publish(this.exchangeName, this.routingKey, task);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.EasySchedulerService = EasySchedulerService;
|
|
34
|
+
exports.EasySchedulerService = EasySchedulerService = __decorate([
|
|
35
|
+
(0, common_1.Injectable)(),
|
|
36
|
+
__param(1, (0, common_1.Inject)('EXCHANGE_NAME')),
|
|
37
|
+
__param(2, (0, common_1.Inject)('SCHEDULER_ROUTING_KEY')),
|
|
38
|
+
__metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String, String])
|
|
39
|
+
], EasySchedulerService);
|
|
40
|
+
//# sourceMappingURL=scheduler.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.service.js","sourceRoot":"","sources":["../../../src/modules/queue/scheduler.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAA4D;AAC5D,2CAA4D;AAG5D,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAsB,CAAC,CAAC;AAG3C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAER;IACyB;IACQ;IAHtD,YACqB,cAA8B,EACL,YAAoB,EACZ,UAAkB;QAFnD,mBAAc,GAAd,cAAc,CAAgB;QACL,iBAAY,GAAZ,YAAY,CAAQ;QACZ,eAAU,GAAV,UAAU,CAAQ;IACpE,CAAC;IAEL,KAAK,CAAC,kBAAkB,CAAC,IAAU;QACjC,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAC7C,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;CAEJ,CAAA;AAZY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAIJ,WAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;IACvB,WAAA,IAAA,eAAM,EAAC,uBAAuB,CAAC,CAAA;qCAFC,gCAAc;GAF1C,oBAAoB,CAYhC"}
|