easywork-common-lib 1.0.1381 → 1.0.1382
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 +112 -0
- package/dist/common/@types/enums/permission.enum.js +57 -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 +7 -0
- package/dist/common/@types/interfaces/index.js +24 -0
- package/dist/common/@types/interfaces/index.js.map +1 -0
- package/dist/common/@types/interfaces/lead-validation-rules.interface.d.ts +29 -0
- package/dist/common/@types/interfaces/lead-validation-rules.interface.js +10 -0
- package/dist/common/@types/interfaces/lead-validation-rules.interface.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 +93 -0
- package/dist/common/constants/app.contants.js +353 -0
- package/dist/common/constants/app.contants.js.map +1 -0
- package/dist/common/constants/capacitation.constants.d.ts +3 -0
- package/dist/common/constants/capacitation.constants.js +7 -0
- package/dist/common/constants/capacitation.constants.js.map +1 -0
- package/dist/common/constants/index.d.ts +5 -0
- package/dist/common/constants/index.js +22 -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/roles.constants.d.ts +109 -0
- package/dist/common/constants/roles.constants.js +117 -0
- package/dist/common/constants/roles.constants.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 +34 -0
- package/dist/common/database/base.entity.js +191 -0
- package/dist/common/database/base.entity.js.map +1 -0
- package/dist/common/database/comment.base.entity.d.ts +12 -0
- package/dist/common/database/comment.base.entity.js +106 -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 +2 -0
- package/dist/common/dtos/index.js +19 -0
- package/dist/common/dtos/index.js.map +1 -0
- package/dist/common/dtos/send-notification.dto.d.ts +13 -0
- package/dist/common/dtos/send-notification.dto.js +72 -0
- package/dist/common/dtos/send-notification.dto.js.map +1 -0
- package/dist/common/enums/common.enum.d.ts +58 -0
- package/dist/common/enums/common.enum.js +68 -0
- package/dist/common/enums/common.enum.js.map +1 -0
- package/dist/common/enums/drive.enum.d.ts +34 -0
- package/dist/common/enums/drive.enum.js +40 -0
- package/dist/common/enums/drive.enum.js.map +1 -0
- package/dist/common/enums/index.d.ts +6 -0
- package/dist/common/enums/index.js +23 -0
- package/dist/common/enums/index.js.map +1 -0
- package/dist/common/enums/notification.enum.d.ts +67 -0
- package/dist/common/enums/notification.enum.js +74 -0
- package/dist/common/enums/notification.enum.js.map +1 -0
- package/dist/common/enums/project.enum.d.ts +13 -0
- package/dist/common/enums/project.enum.js +19 -0
- package/dist/common/enums/project.enum.js.map +1 -0
- package/dist/common/enums/sales.enum.d.ts +182 -0
- package/dist/common/enums/sales.enum.js +217 -0
- package/dist/common/enums/sales.enum.js.map +1 -0
- package/dist/common/enums/tools.enum.d.ts +67 -0
- package/dist/common/enums/tools.enum.js +78 -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 +9 -0
- package/dist/common/index.js +26 -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/common/transformers/encryption.transformer.d.ts +2 -0
- package/dist/common/transformers/encryption.transformer.js +83 -0
- package/dist/common/transformers/encryption.transformer.js.map +1 -0
- package/dist/common/transformers/index.d.ts +1 -0
- package/dist/common/transformers/index.js +6 -0
- package/dist/common/transformers/index.js.map +1 -0
- package/dist/dtos/whatsapp-send-command.dto.d.ts +116 -0
- package/dist/dtos/whatsapp-send-command.dto.js +16 -0
- package/dist/dtos/whatsapp-send-command.dto.js.map +1 -0
- package/dist/entities/all-activities.entity.d.ts +49 -0
- package/dist/entities/all-activities.entity.js +631 -0
- package/dist/entities/all-activities.entity.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/audit.entity.d.ts +7 -0
- package/dist/entities/audit.entity.js +56 -0
- package/dist/entities/audit.entity.js.map +1 -0
- package/dist/entities/capacitation/capacitation-certificate.entity.d.ts +26 -0
- package/dist/entities/capacitation/capacitation-certificate.entity.js +218 -0
- package/dist/entities/capacitation/capacitation-certificate.entity.js.map +1 -0
- package/dist/entities/capacitation/capacitation.entity.d.ts +34 -0
- package/dist/entities/capacitation/capacitation.entity.js +296 -0
- package/dist/entities/capacitation/capacitation.entity.js.map +1 -0
- package/dist/entities/capacitation/caso_top_capital/index.d.ts +2 -0
- package/dist/entities/capacitation/caso_top_capital/index.js +11 -0
- package/dist/entities/capacitation/caso_top_capital/index.js.map +1 -0
- package/dist/entities/capacitation/caso_top_capital/interview-one-finished.entity.d.ts +21 -0
- package/dist/entities/capacitation/caso_top_capital/interview-one-finished.entity.js +93 -0
- package/dist/entities/capacitation/caso_top_capital/interview-one-finished.entity.js.map +1 -0
- package/dist/entities/capacitation/caso_top_capital/interview-two-finished.entity.d.ts +28 -0
- package/dist/entities/capacitation/caso_top_capital/interview-two-finished.entity.js +117 -0
- package/dist/entities/capacitation/caso_top_capital/interview-two-finished.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 +22 -0
- package/dist/entities/capacitation/course.entity.js +128 -0
- package/dist/entities/capacitation/course.entity.js.map +1 -0
- package/dist/entities/capacitation/index.d.ts +12 -0
- package/dist/entities/capacitation/index.js +40 -0
- package/dist/entities/capacitation/index.js.map +1 -0
- package/dist/entities/capacitation/process-certificate/asignatures.entity.d.ts +15 -0
- package/dist/entities/capacitation/process-certificate/asignatures.entity.js +106 -0
- package/dist/entities/capacitation/process-certificate/asignatures.entity.js.map +1 -0
- package/dist/entities/capacitation/process-certificate/element-asignature.entity.d.ts +36 -0
- package/dist/entities/capacitation/process-certificate/element-asignature.entity.js +176 -0
- package/dist/entities/capacitation/process-certificate/element-asignature.entity.js.map +1 -0
- package/dist/entities/capacitation/process-certificate/index.d.ts +5 -0
- package/dist/entities/capacitation/process-certificate/index.js +16 -0
- package/dist/entities/capacitation/process-certificate/index.js.map +1 -0
- package/dist/entities/capacitation/process-certificate/kardex.entity.d.ts +17 -0
- package/dist/entities/capacitation/process-certificate/kardex.entity.js +95 -0
- package/dist/entities/capacitation/process-certificate/kardex.entity.js.map +1 -0
- package/dist/entities/capacitation/process-certificate/sections.entity.d.ts +13 -0
- package/dist/entities/capacitation/process-certificate/sections.entity.js +74 -0
- package/dist/entities/capacitation/process-certificate/sections.entity.js.map +1 -0
- package/dist/entities/capacitation/process-certificate/table-contents.entity.d.ts +12 -0
- package/dist/entities/capacitation/process-certificate/table-contents.entity.js +64 -0
- package/dist/entities/capacitation/process-certificate/table-contents.entity.js.map +1 -0
- package/dist/entities/capacitation/weeks-sections/index.d.ts +5 -0
- package/dist/entities/capacitation/weeks-sections/index.js +27 -0
- package/dist/entities/capacitation/weeks-sections/index.js.map +1 -0
- package/dist/entities/capacitation/weeks-sections/weeks-content-sections.entity.d.ts +15 -0
- package/dist/entities/capacitation/weeks-sections/weeks-content-sections.entity.js +100 -0
- package/dist/entities/capacitation/weeks-sections/weeks-content-sections.entity.js.map +1 -0
- package/dist/entities/capacitation/weeks-sections/weeks-respuestas-content.entity.d.ts +14 -0
- package/dist/entities/capacitation/weeks-sections/weeks-respuestas-content.entity.js +94 -0
- package/dist/entities/capacitation/weeks-sections/weeks-respuestas-content.entity.js.map +1 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/index.d.ts +2 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/index.js +19 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/index.js.map +1 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/roles-play-agent.entity.d.ts +15 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/roles-play-agent.entity.js +88 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/roles-play-agent.entity.js.map +1 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/weeks-roles-play.entity.d.ts +9 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/weeks-roles-play.entity.js +61 -0
- package/dist/entities/capacitation/weeks-sections/weeks-roles-play/weeks-roles-play.entity.js.map +1 -0
- package/dist/entities/capacitation/weeks-sections/weeks-sections.entity.d.ts +11 -0
- package/dist/entities/capacitation/weeks-sections/weeks-sections.entity.js +67 -0
- package/dist/entities/capacitation/weeks-sections/weeks-sections.entity.js.map +1 -0
- package/dist/entities/capacitation/weeks-sections/weeks.entity.d.ts +11 -0
- package/dist/entities/capacitation/weeks-sections/weeks.entity.js +67 -0
- package/dist/entities/capacitation/weeks-sections/weeks.entity.js.map +1 -0
- package/dist/entities/company.entity.d.ts +14 -0
- package/dist/entities/company.entity.js +116 -0
- package/dist/entities/company.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 +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 +20 -0
- package/dist/entities/drive/file.entity.js +178 -0
- package/dist/entities/drive/file.entity.js.map +1 -0
- package/dist/entities/drive/folder.entity.d.ts +21 -0
- package/dist/entities/drive/folder.entity.js +201 -0
- package/dist/entities/drive/folder.entity.js.map +1 -0
- package/dist/entities/drive/index.d.ts +4 -0
- package/dist/entities/drive/index.js +21 -0
- package/dist/entities/drive/index.js.map +1 -0
- package/dist/entities/drive/policy-file-metadata.entity.d.ts +33 -0
- package/dist/entities/drive/policy-file-metadata.entity.js +190 -0
- package/dist/entities/drive/policy-file-metadata.entity.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 +40 -0
- package/dist/entities/email.entity.js.map +1 -0
- package/dist/entities/group/group-collection-responsible.entity.d.ts +14 -0
- package/dist/entities/group/group-collection-responsible.entity.js +79 -0
- package/dist/entities/group/group-collection-responsible.entity.js.map +1 -0
- package/dist/entities/group.entity.d.ts +19 -0
- package/dist/entities/group.entity.js +75 -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 +24 -0
- package/dist/entities/helpers/meeting_crm.entity.js +180 -0
- package/dist/entities/helpers/meeting_crm.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/capacitation/h_agent_capacitation_stage.entity.d.ts +8 -0
- package/dist/entities/helpers/sales/agent/capacitation/h_agent_capacitation_stage.entity.js +67 -0
- package/dist/entities/helpers/sales/agent/capacitation/h_agent_capacitation_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/certificate/h_agent_certificate_stage.entity.d.ts +8 -0
- package/dist/entities/helpers/sales/agent/certificate/h_agent_certificate_stage.entity.js +64 -0
- package/dist/entities/helpers/sales/agent/certificate/h_agent_certificate_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection.entity.d.ts +64 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection.entity.js +637 -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 +8 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection_stage.entity.js +69 -0
- package/dist/entities/helpers/sales/agent/connection/h_agent_connection_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-content.entity.d.ts +13 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-content.entity.js +88 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-content.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-response.entity.d.ts +10 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-response.entity.js +68 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-response.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-section.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-section.entity.js +74 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-section.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-table.entity.d.ts +11 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-table.entity.js +71 -0
- package/dist/entities/helpers/sales/agent/connection/tables/connection-table.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/connection/tables/index.d.ts +4 -0
- package/dist/entities/helpers/sales/agent/connection/tables/index.js +21 -0
- package/dist/entities/helpers/sales/agent/connection/tables/index.js.map +1 -0
- package/dist/entities/helpers/sales/agent/h_agent_experiences.entity.d.ts +6 -0
- package/dist/entities/helpers/sales/agent/h_agent_experiences.entity.js +38 -0
- package/dist/entities/helpers/sales/agent/h_agent_experiences.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/h_agent_manual_referrals.entity.d.ts +6 -0
- package/dist/entities/helpers/sales/agent/h_agent_manual_referrals.entity.js +38 -0
- package/dist/entities/helpers/sales/agent/h_agent_manual_referrals.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 +13 -0
- package/dist/entities/helpers/sales/agent/index.js +30 -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 +22 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.js +195 -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_other_referrals.entity.d.ts +9 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.entity.js +64 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_stage.entity.d.ts +8 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_stage.entity.js +64 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_stage.entity.js.map +1 -0
- package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.d.ts +9 -0
- package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.js +65 -0
- package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.js.map +1 -0
- package/dist/entities/helpers/sales/common/client_sources.entity.d.ts +7 -0
- package/dist/entities/helpers/sales/common/client_sources.entity.js +56 -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 +40 -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 +89 -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 +89 -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 +11 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_category.entity.js +55 -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 +12 -0
- package/dist/entities/helpers/sales/poliza/index.js +29 -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/sales/poliza/poliza_settlement.entity.d.ts +4 -0
- package/dist/entities/helpers/sales/poliza/poliza_settlement.entity.js +28 -0
- package/dist/entities/helpers/sales/poliza/poliza_settlement.entity.js.map +1 -0
- package/dist/entities/helpers/tools/event_crm.entity.d.ts +36 -0
- package/dist/entities/helpers/tools/event_crm.entity.js +265 -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 +38 -0
- package/dist/entities/helpers/tools/task_crm.entity.js +272 -0
- package/dist/entities/helpers/tools/task_crm.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/import-job.entity.d.ts +36 -0
- package/dist/entities/import-job.entity.js +140 -0
- package/dist/entities/import-job.entity.js.map +1 -0
- package/dist/entities/index.d.ts +63 -0
- package/dist/entities/index.js +80 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/login-history.entity.d.ts +7 -0
- package/dist/entities/login-history.entity.js +53 -0
- package/dist/entities/login-history.entity.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/messaging/whatsapp/group-whatsapp-number.entity.d.ts +18 -0
- package/dist/entities/messaging/whatsapp/group-whatsapp-number.entity.js +143 -0
- package/dist/entities/messaging/whatsapp/group-whatsapp-number.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/index.d.ts +10 -0
- package/dist/entities/messaging/whatsapp/index.js +27 -0
- package/dist/entities/messaging/whatsapp/index.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp-conversation-crm.entity.d.ts +23 -0
- package/dist/entities/messaging/whatsapp/whatsapp-conversation-crm.entity.js +134 -0
- package/dist/entities/messaging/whatsapp/whatsapp-conversation-crm.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp-conversation.entity.d.ts +30 -0
- package/dist/entities/messaging/whatsapp/whatsapp-conversation.entity.js +249 -0
- package/dist/entities/messaging/whatsapp/whatsapp-conversation.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp-message-cost.entity.d.ts +23 -0
- package/dist/entities/messaging/whatsapp/whatsapp-message-cost.entity.js +145 -0
- package/dist/entities/messaging/whatsapp/whatsapp-message-cost.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp-message.entity.d.ts +46 -0
- package/dist/entities/messaging/whatsapp/whatsapp-message.entity.js +269 -0
- package/dist/entities/messaging/whatsapp/whatsapp-message.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp-provider-configuration.entity.d.ts +25 -0
- package/dist/entities/messaging/whatsapp/whatsapp-provider-configuration.entity.js +164 -0
- package/dist/entities/messaging/whatsapp/whatsapp-provider-configuration.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp-provider.entity.d.ts +24 -0
- package/dist/entities/messaging/whatsapp/whatsapp-provider.entity.js +99 -0
- package/dist/entities/messaging/whatsapp/whatsapp-provider.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp-template.entity.d.ts +39 -0
- package/dist/entities/messaging/whatsapp/whatsapp-template.entity.js +122 -0
- package/dist/entities/messaging/whatsapp/whatsapp-template.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp-webhook-log.entity.d.ts +12 -0
- package/dist/entities/messaging/whatsapp/whatsapp-webhook-log.entity.js +106 -0
- package/dist/entities/messaging/whatsapp/whatsapp-webhook-log.entity.js.map +1 -0
- package/dist/entities/messaging/whatsapp/whatsapp.enum.d.ts +68 -0
- package/dist/entities/messaging/whatsapp/whatsapp.enum.js +82 -0
- package/dist/entities/messaging/whatsapp/whatsapp.enum.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 +10 -0
- package/dist/entities/otp-log.entity.js +61 -0
- package/dist/entities/otp-log.entity.js.map +1 -0
- package/dist/entities/payments/banbajio-payment.entity.d.ts +26 -0
- package/dist/entities/payments/banbajio-payment.entity.js +92 -0
- package/dist/entities/payments/banbajio-payment.entity.js.map +1 -0
- package/dist/entities/payments/payment.entity.d.ts +58 -0
- package/dist/entities/payments/payment.entity.js +191 -0
- package/dist/entities/payments/payment.entity.js.map +1 -0
- package/dist/entities/payments/stripe-payment.entity.d.ts +50 -0
- package/dist/entities/payments/stripe-payment.entity.js +231 -0
- package/dist/entities/payments/stripe-payment.entity.js.map +1 -0
- package/dist/entities/permission.entity.d.ts +14 -0
- package/dist/entities/permission.entity.js +133 -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/policy/index.d.ts +3 -0
- package/dist/entities/policy/index.js +20 -0
- package/dist/entities/policy/index.js.map +1 -0
- package/dist/entities/policy/policy-version.entity.d.ts +49 -0
- package/dist/entities/policy/policy-version.entity.js +458 -0
- package/dist/entities/policy/policy-version.entity.js.map +1 -0
- package/dist/entities/policy/policy.entity.d.ts +32 -0
- package/dist/entities/policy/policy.entity.js +330 -0
- package/dist/entities/policy/policy.entity.js.map +1 -0
- package/dist/entities/policy/version-comment.entity.d.ts +7 -0
- package/dist/entities/policy/version-comment.entity.js +36 -0
- package/dist/entities/policy/version-comment.entity.js.map +1 -0
- package/dist/entities/policy-tag.entity.d.ts +10 -0
- package/dist/entities/policy-tag.entity.js +65 -0
- package/dist/entities/policy-tag.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/project_management/activities/activities-comment.entity.d.ts +11 -0
- package/dist/entities/project_management/activities/activities-comment.entity.js +63 -0
- package/dist/entities/project_management/activities/activities-comment.entity.js.map +1 -0
- package/dist/entities/project_management/activities/activity-file.entity.d.ts +11 -0
- package/dist/entities/project_management/activities/activity-file.entity.js +64 -0
- package/dist/entities/project_management/activities/activity-file.entity.js.map +1 -0
- package/dist/entities/project_management/activities/activity.entity.d.ts +21 -0
- package/dist/entities/project_management/activities/activity.entity.js +111 -0
- package/dist/entities/project_management/activities/activity.entity.js.map +1 -0
- package/dist/entities/project_management/activities/index.d.ts +3 -0
- package/dist/entities/project_management/activities/index.js +20 -0
- package/dist/entities/project_management/activities/index.js.map +1 -0
- package/dist/entities/project_management/index.d.ts +2 -0
- package/dist/entities/project_management/index.js +19 -0
- package/dist/entities/project_management/index.js.map +1 -0
- package/dist/entities/project_management/project/index.d.ts +3 -0
- package/dist/entities/project_management/project/index.js +20 -0
- package/dist/entities/project_management/project/index.js.map +1 -0
- package/dist/entities/project_management/project/project-comment.entity.d.ts +11 -0
- package/dist/entities/project_management/project/project-comment.entity.js +63 -0
- package/dist/entities/project_management/project/project-comment.entity.js.map +1 -0
- package/dist/entities/project_management/project/project-file.entity.d.ts +11 -0
- package/dist/entities/project_management/project/project-file.entity.js +64 -0
- package/dist/entities/project_management/project/project-file.entity.js.map +1 -0
- package/dist/entities/project_management/project/project.entity.d.ts +24 -0
- package/dist/entities/project_management/project/project.entity.js +123 -0
- package/dist/entities/project_management/project/project.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/qrcode.entity.d.ts +9 -0
- package/dist/entities/qrcode.entity.js +54 -0
- package/dist/entities/qrcode.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-audit-log.entity.d.ts +25 -0
- package/dist/entities/role-audit-log.entity.js +122 -0
- package/dist/entities/role-audit-log.entity.js.map +1 -0
- package/dist/entities/role.entity.d.ts +16 -0
- package/dist/entities/role.entity.js +131 -0
- package/dist/entities/role.entity.js.map +1 -0
- package/dist/entities/sales/agent-comment.entity.d.ts +7 -0
- package/dist/entities/sales/agent-comment.entity.js +36 -0
- package/dist/entities/sales/agent-comment.entity.js.map +1 -0
- package/dist/entities/sales/agent.entity.d.ts +82 -0
- package/dist/entities/sales/agent.entity.js +681 -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 +61 -0
- package/dist/entities/sales/contact.entity.js +548 -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 +17 -0
- package/dist/entities/sales/index.js +34 -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-validation-rule.entity.d.ts +7 -0
- package/dist/entities/sales/lead-validation-rule.entity.js +34 -0
- package/dist/entities/sales/lead-validation-rule.entity.js.map +1 -0
- package/dist/entities/sales/lead.entity.d.ts +66 -0
- package/dist/entities/sales/lead.entity.js +631 -0
- package/dist/entities/sales/lead.entity.js.map +1 -0
- package/dist/entities/sales/policy-comment.entity.d.ts +5 -0
- package/dist/entities/sales/policy-comment.entity.js +35 -0
- package/dist/entities/sales/policy-comment.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 +39 -0
- package/dist/entities/sales/poliza/poliza_claim.entity.js +328 -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 +36 -0
- package/dist/entities/sales/poliza/poliza_fund-recovery.entity.js +302 -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 +39 -0
- package/dist/entities/sales/poliza/poliza_reimbursement.entity.js +320 -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 +42 -0
- package/dist/entities/sales/poliza/poliza_scheduling.entity.js +342 -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 +110 -0
- package/dist/entities/sales/poliza.entity.js +1051 -0
- package/dist/entities/sales/poliza.entity.js.map +1 -0
- package/dist/entities/sales/poliza_pdf.entity.d.ts +96 -0
- package/dist/entities/sales/poliza_pdf.entity.js +946 -0
- package/dist/entities/sales/poliza_pdf.entity.js.map +1 -0
- package/dist/entities/sales/receipt-comment.entity.d.ts +7 -0
- package/dist/entities/sales/receipt-comment.entity.js +33 -0
- package/dist/entities/sales/receipt-comment.entity.js.map +1 -0
- package/dist/entities/sales/receipt.entity.d.ts +37 -0
- package/dist/entities/sales/receipt.entity.js +297 -0
- package/dist/entities/sales/receipt.entity.js.map +1 -0
- package/dist/entities/subgroup.entity.d.ts +8 -0
- package/dist/entities/subgroup.entity.js +45 -0
- package/dist/entities/subgroup.entity.js.map +1 -0
- package/dist/entities/subscriptions/feature.entity.d.ts +25 -0
- package/dist/entities/subscriptions/feature.entity.js +75 -0
- package/dist/entities/subscriptions/feature.entity.js.map +1 -0
- package/dist/entities/subscriptions/plan-feature.entity.d.ts +10 -0
- package/dist/entities/subscriptions/plan-feature.entity.js +56 -0
- package/dist/entities/subscriptions/plan-feature.entity.js.map +1 -0
- package/dist/entities/subscriptions/plan.entity.d.ts +15 -0
- package/dist/entities/subscriptions/plan.entity.js +73 -0
- package/dist/entities/subscriptions/plan.entity.js.map +1 -0
- package/dist/entities/subscriptions/subscription.entity.d.ts +30 -0
- package/dist/entities/subscriptions/subscription.entity.js +150 -0
- package/dist/entities/subscriptions/subscription.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/template.entity.d.ts +9 -0
- package/dist/entities/template.entity.js +78 -0
- package/dist/entities/template.entity.js.map +1 -0
- package/dist/entities/thirdparty/diio-integration.entity.d.ts +16 -0
- package/dist/entities/thirdparty/diio-integration.entity.js +74 -0
- package/dist/entities/thirdparty/diio-integration.entity.js.map +1 -0
- package/dist/entities/thirdparty/google-gmail-watch-record.entity.d.ts +14 -0
- package/dist/entities/thirdparty/google-gmail-watch-record.entity.js +113 -0
- package/dist/entities/thirdparty/google-gmail-watch-record.entity.js.map +1 -0
- package/dist/entities/thirdparty/google-webhooks-config.entity.d.ts +19 -0
- package/dist/entities/thirdparty/google-webhooks-config.entity.js +82 -0
- package/dist/entities/thirdparty/google-webhooks-config.entity.js.map +1 -0
- package/dist/entities/thirdparty/oauth.entity.d.ts +25 -0
- package/dist/entities/thirdparty/oauth.entity.js +82 -0
- package/dist/entities/thirdparty/oauth.entity.js.map +1 -0
- package/dist/entities/tools/calendar/calendar-event-comment.entity.d.ts +8 -0
- package/dist/entities/tools/calendar/calendar-event-comment.entity.js +39 -0
- package/dist/entities/tools/calendar/calendar-event-comment.entity.js.map +1 -0
- package/dist/entities/tools/calendar/calendar-event-invitations.entity.d.ts +13 -0
- package/dist/entities/tools/calendar/calendar-event-invitations.entity.js +48 -0
- package/dist/entities/tools/calendar/calendar-event-invitations.entity.js.map +1 -0
- package/dist/entities/tools/calendar/calendar-general-config.entity.d.ts +12 -0
- package/dist/entities/tools/calendar/calendar-general-config.entity.js +67 -0
- package/dist/entities/tools/calendar/calendar-general-config.entity.js.map +1 -0
- package/dist/entities/tools/calendar/calendar-item.entity.d.ts +33 -0
- package/dist/entities/tools/calendar/calendar-item.entity.js +188 -0
- package/dist/entities/tools/calendar/calendar-item.entity.js.map +1 -0
- package/dist/entities/tools/calendar/calendar-reminder.entity.d.ts +7 -0
- package/dist/entities/tools/calendar/calendar-reminder.entity.js +38 -0
- package/dist/entities/tools/calendar/calendar-reminder.entity.js.map +1 -0
- package/dist/entities/tools/calendar/calendar-sub-item.entity.d.ts +32 -0
- package/dist/entities/tools/calendar/calendar-sub-item.entity.js +104 -0
- package/dist/entities/tools/calendar/calendar-sub-item.entity.js.map +1 -0
- package/dist/entities/tools/calendar/calendar-user-access.entity.d.ts +13 -0
- package/dist/entities/tools/calendar/calendar-user-access.entity.js +46 -0
- package/dist/entities/tools/calendar/calendar-user-access.entity.js.map +1 -0
- package/dist/entities/tools/calendar/event-location.entity.d.ts +7 -0
- package/dist/entities/tools/calendar/event-location.entity.js +44 -0
- package/dist/entities/tools/calendar/event-location.entity.js.map +1 -0
- package/dist/entities/tools/calendar/event.entity.d.ts +43 -0
- package/dist/entities/tools/calendar/event.entity.js +267 -0
- package/dist/entities/tools/calendar/event.entity.js.map +1 -0
- package/dist/entities/tools/calendar/index.d.ts +9 -0
- package/dist/entities/tools/calendar/index.js +26 -0
- package/dist/entities/tools/calendar/index.js.map +1 -0
- package/dist/entities/tools/index.d.ts +9 -0
- package/dist/entities/tools/index.js +26 -0
- package/dist/entities/tools/index.js.map +1 -0
- package/dist/entities/tools/mail/email-signature.entity.d.ts +10 -0
- package/dist/entities/tools/mail/email-signature.entity.js +60 -0
- package/dist/entities/tools/mail/email-signature.entity.js.map +1 -0
- package/dist/entities/tools/mail/mail-contact.entity.d.ts +13 -0
- package/dist/entities/tools/mail/mail-contact.entity.js +68 -0
- package/dist/entities/tools/mail/mail-contact.entity.js.map +1 -0
- package/dist/entities/tools/mail/mail-crm-queue-distribution.entity.d.ts +8 -0
- package/dist/entities/tools/mail/mail-crm-queue-distribution.entity.js +38 -0
- package/dist/entities/tools/mail/mail-crm-queue-distribution.entity.js.map +1 -0
- package/dist/entities/tools/mail/mail-crm-queue-entities-assigned.entity.d.ts +9 -0
- package/dist/entities/tools/mail/mail-crm-queue-entities-assigned.entity.js +39 -0
- package/dist/entities/tools/mail/mail-crm-queue-entities-assigned.entity.js.map +1 -0
- package/dist/entities/tools/mail/mail-crm-queue-status.entity.d.ts +9 -0
- package/dist/entities/tools/mail/mail-crm-queue-status.entity.js +44 -0
- package/dist/entities/tools/mail/mail-crm-queue-status.entity.js.map +1 -0
- package/dist/entities/tools/mail/mail-gmail.entity.d.ts +7 -0
- package/dist/entities/tools/mail/mail-gmail.entity.js +41 -0
- package/dist/entities/tools/mail/mail-gmail.entity.js.map +1 -0
- package/dist/entities/tools/mail/mail.entity.d.ts +67 -0
- package/dist/entities/tools/mail/mail.entity.js +137 -0
- package/dist/entities/tools/mail/mail.entity.js.map +1 -0
- package/dist/entities/tools/mail/mailbox-user-access.entity.d.ts +7 -0
- package/dist/entities/tools/mail/mailbox-user-access.entity.js +33 -0
- package/dist/entities/tools/mail/mailbox-user-access.entity.js.map +1 -0
- package/dist/entities/tools/mail/mailbox.entity.d.ts +58 -0
- package/dist/entities/tools/mail/mailbox.entity.js +113 -0
- package/dist/entities/tools/mail/mailbox.entity.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-template-permission.entity.d.ts +7 -0
- package/dist/entities/tools/task-template-permission.entity.js +51 -0
- package/dist/entities/tools/task-template-permission.entity.js.map +1 -0
- package/dist/entities/tools/task-template.entity.d.ts +26 -0
- package/dist/entities/tools/task-template.entity.js +225 -0
- package/dist/entities/tools/task-template.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 +59 -0
- package/dist/entities/tools/task.entity.js +518 -0
- package/dist/entities/tools/task.entity.js.map +1 -0
- package/dist/entities/user-change-log.entity.d.ts +22 -0
- package/dist/entities/user-change-log.entity.js +77 -0
- package/dist/entities/user-change-log.entity.js.map +1 -0
- package/dist/entities/user-from-cognito.entity.d.ts +5 -0
- package/dist/entities/user-from-cognito.entity.js +35 -0
- package/dist/entities/user-from-cognito.entity.js.map +1 -0
- package/dist/entities/user-group-status.entity.d.ts +10 -0
- package/dist/entities/user-group-status.entity.js +71 -0
- package/dist/entities/user-group-status.entity.js.map +1 -0
- package/dist/entities/user-invitations.entity.d.ts +16 -0
- package/dist/entities/user-invitations.entity.js +143 -0
- package/dist/entities/user-invitations.entity.js.map +1 -0
- package/dist/entities/user-special-role.entity.d.ts +21 -0
- package/dist/entities/user-special-role.entity.js +94 -0
- package/dist/entities/user-special-role.entity.js.map +1 -0
- package/dist/entities/user.entity.d.ts +50 -0
- package/dist/entities/user.entity.js +326 -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 +339 -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/authorization/authorization.module.d.ts +26 -0
- package/dist/modules/authorization/authorization.module.js +105 -0
- package/dist/modules/authorization/authorization.module.js.map +1 -0
- package/dist/modules/authorization/config/resource-configurations.d.ts +12 -0
- package/dist/modules/authorization/config/resource-configurations.js +124 -0
- package/dist/modules/authorization/config/resource-configurations.js.map +1 -0
- package/dist/modules/authorization/decorators/contact-permissions.decorator.d.ts +13 -0
- package/dist/modules/authorization/decorators/contact-permissions.decorator.js +101 -0
- package/dist/modules/authorization/decorators/contact-permissions.decorator.js.map +1 -0
- package/dist/modules/authorization/decorators/permissions.decorator.d.ts +51 -0
- package/dist/modules/authorization/decorators/permissions.decorator.js +144 -0
- package/dist/modules/authorization/decorators/permissions.decorator.js.map +1 -0
- package/dist/modules/authorization/factories/resource-authorization.factory.d.ts +55 -0
- package/dist/modules/authorization/factories/resource-authorization.factory.js +184 -0
- package/dist/modules/authorization/factories/resource-authorization.factory.js.map +1 -0
- package/dist/modules/authorization/index.d.ts +7 -0
- package/dist/modules/authorization/index.js +24 -0
- package/dist/modules/authorization/index.js.map +1 -0
- package/dist/modules/authorization/interfaces/authorization.interface.d.ts +23 -0
- package/dist/modules/authorization/interfaces/authorization.interface.js +3 -0
- package/dist/modules/authorization/interfaces/authorization.interface.js.map +1 -0
- package/dist/modules/authorization/services/authorization.service.d.ts +25 -0
- package/dist/modules/authorization/services/authorization.service.js +139 -0
- package/dist/modules/authorization/services/authorization.service.js.map +1 -0
- package/dist/modules/authorization/services/dynamic-filter.service.d.ts +9 -0
- package/dist/modules/authorization/services/dynamic-filter.service.js +238 -0
- package/dist/modules/authorization/services/dynamic-filter.service.js.map +1 -0
- package/dist/modules/authorization/services/index.d.ts +7 -0
- package/dist/modules/authorization/services/index.js +24 -0
- package/dist/modules/authorization/services/index.js.map +1 -0
- package/dist/modules/authorization/services/modules/contact-authorization.service.d.ts +29 -0
- package/dist/modules/authorization/services/modules/contact-authorization.service.js +105 -0
- package/dist/modules/authorization/services/modules/contact-authorization.service.js.map +1 -0
- package/dist/modules/authorization/services/modules/index.d.ts +4 -0
- package/dist/modules/authorization/services/modules/index.js +21 -0
- package/dist/modules/authorization/services/modules/index.js.map +1 -0
- package/dist/modules/authorization/services/modules/lead-authorization.service.d.ts +27 -0
- package/dist/modules/authorization/services/modules/lead-authorization.service.js +96 -0
- package/dist/modules/authorization/services/modules/lead-authorization.service.js.map +1 -0
- package/dist/modules/authorization/services/modules/policy-authorization.service.d.ts +28 -0
- package/dist/modules/authorization/services/modules/policy-authorization.service.js +100 -0
- package/dist/modules/authorization/services/modules/policy-authorization.service.js.map +1 -0
- package/dist/modules/authorization/services/modules/task-authorization.service.d.ts +28 -0
- package/dist/modules/authorization/services/modules/task-authorization.service.js +100 -0
- package/dist/modules/authorization/services/modules/task-authorization.service.js.map +1 -0
- package/dist/modules/authorization/services/permission-cache.service.d.ts +10 -0
- package/dist/modules/authorization/services/permission-cache.service.js +48 -0
- package/dist/modules/authorization/services/permission-cache.service.js.map +1 -0
- package/dist/modules/authorization/services/permission-evaluator.service.d.ts +26 -0
- package/dist/modules/authorization/services/permission-evaluator.service.js +328 -0
- package/dist/modules/authorization/services/permission-evaluator.service.js.map +1 -0
- package/dist/modules/authorization/services/resource-access-filter.service.d.ts +20 -0
- package/dist/modules/authorization/services/resource-access-filter.service.js +406 -0
- package/dist/modules/authorization/services/resource-access-filter.service.js.map +1 -0
- package/dist/modules/authorization/services/resource-authorization.service.d.ts +47 -0
- package/dist/modules/authorization/services/resource-authorization.service.js +184 -0
- package/dist/modules/authorization/services/resource-authorization.service.js.map +1 -0
- package/dist/modules/index.d.ts +6 -0
- package/dist/modules/index.js +23 -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 +69 -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
|
@@ -0,0 +1,191 @@
|
|
|
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.Payment = exports.PaymentMethod = exports.PaymentStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
|
+
const subscription_entity_1 = require("../subscriptions/subscription.entity");
|
|
17
|
+
const group_entity_1 = require("../group.entity");
|
|
18
|
+
var PaymentStatus;
|
|
19
|
+
(function (PaymentStatus) {
|
|
20
|
+
PaymentStatus["SUCCEEDED"] = "succeeded";
|
|
21
|
+
PaymentStatus["FAILED"] = "failed";
|
|
22
|
+
PaymentStatus["PENDING"] = "pending";
|
|
23
|
+
PaymentStatus["REFUNDED"] = "refunded";
|
|
24
|
+
PaymentStatus["DISPUTED"] = "disputed";
|
|
25
|
+
PaymentStatus["CANCELED"] = "canceled";
|
|
26
|
+
PaymentStatus["EXPIRED"] = "expired";
|
|
27
|
+
})(PaymentStatus || (exports.PaymentStatus = PaymentStatus = {}));
|
|
28
|
+
var PaymentMethod;
|
|
29
|
+
(function (PaymentMethod) {
|
|
30
|
+
PaymentMethod["BANBAJIO_CREDIT_CARD"] = "banbajio.credit_card";
|
|
31
|
+
PaymentMethod["BANBAJIO_ACCOUNT"] = "banbajio.account";
|
|
32
|
+
PaymentMethod["BANBAJIO_CLABE_DOMICILIATION"] = "banbajio.clabe_domiciliation";
|
|
33
|
+
PaymentMethod["BANBAJIO_DEBIT_CARD"] = "banbajio.debit_card";
|
|
34
|
+
PaymentMethod["BANBAJIO_PREPAID_CARD"] = "banbajio.prepaid_card";
|
|
35
|
+
PaymentMethod["BANBAJIO_DEBIT_CARD_DOMICILIATION"] = "banbajio.debit_card_domiciliation";
|
|
36
|
+
PaymentMethod["STRIPE_CARD"] = "stripe.card";
|
|
37
|
+
PaymentMethod["STRIPE_BANK_TRANSFER"] = "stripe.bank_transfer";
|
|
38
|
+
PaymentMethod["STRIPE_WALLET"] = "stripe.wallet";
|
|
39
|
+
PaymentMethod["STRIPE_SEPA_DEBIT"] = "stripe.sepa_debit";
|
|
40
|
+
PaymentMethod["STRIPE_ACH_DEBIT"] = "stripe.ach_debit";
|
|
41
|
+
PaymentMethod["STRIPE_KLARNA"] = "stripe.klarna";
|
|
42
|
+
PaymentMethod["STRIPE_AFTERPAY"] = "stripe.afterpay";
|
|
43
|
+
PaymentMethod["STRIPE_AFFIRM"] = "stripe.affirm";
|
|
44
|
+
PaymentMethod["STRIPE_LINK"] = "stripe.link";
|
|
45
|
+
PaymentMethod["CASH"] = "cash";
|
|
46
|
+
PaymentMethod["CHECK"] = "check";
|
|
47
|
+
PaymentMethod["BANK_TRANSFER"] = "bank_transfer";
|
|
48
|
+
PaymentMethod["PAYPAL"] = "paypal";
|
|
49
|
+
PaymentMethod["OTHER"] = "other";
|
|
50
|
+
})(PaymentMethod || (exports.PaymentMethod = PaymentMethod = {}));
|
|
51
|
+
let Payment = class Payment extends base_entity_1.BaseEntityOnlyEssential {
|
|
52
|
+
paymentMethod;
|
|
53
|
+
amount;
|
|
54
|
+
currency;
|
|
55
|
+
status;
|
|
56
|
+
externalTransactionId;
|
|
57
|
+
invoiceNumber;
|
|
58
|
+
referenceNumber;
|
|
59
|
+
description;
|
|
60
|
+
payerEmail;
|
|
61
|
+
payerName;
|
|
62
|
+
processingFee;
|
|
63
|
+
netAmount;
|
|
64
|
+
taxAmount;
|
|
65
|
+
paidAt;
|
|
66
|
+
errorMessage;
|
|
67
|
+
errorCode;
|
|
68
|
+
retryCount;
|
|
69
|
+
metadata;
|
|
70
|
+
transactionDate;
|
|
71
|
+
notes;
|
|
72
|
+
subscription;
|
|
73
|
+
group;
|
|
74
|
+
};
|
|
75
|
+
exports.Payment = Payment;
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: PaymentMethod, nullable: false }),
|
|
78
|
+
(0, swagger_1.ApiProperty)({ description: 'Payment method used', enum: PaymentMethod, example: PaymentMethod.STRIPE_CARD }),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], Payment.prototype, "paymentMethod", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: false }),
|
|
83
|
+
(0, swagger_1.ApiProperty)({ description: 'Amount of the payment', example: 9.99 }),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], Payment.prototype, "amount", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 3, nullable: false, default: 'MXN' }),
|
|
88
|
+
(0, swagger_1.ApiProperty)({ description: 'Currency code (e.g., "USD", "EUR", "MXN")', example: 'MXN' }),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], Payment.prototype, "currency", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: PaymentStatus, nullable: false }),
|
|
93
|
+
(0, swagger_1.ApiProperty)({ description: 'Status of the payment', enum: PaymentStatus, example: PaymentStatus.SUCCEEDED }),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], Payment.prototype, "status", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
98
|
+
(0, swagger_1.ApiProperty)({ description: 'External transaction ID from payment provider', example: 'pi_1234567890', nullable: true }),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], Payment.prototype, "externalTransactionId", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
103
|
+
(0, swagger_1.ApiProperty)({ description: 'Invoice or receipt number', example: 'INV-2024-001', nullable: true }),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], Payment.prototype, "invoiceNumber", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
108
|
+
(0, swagger_1.ApiProperty)({ description: 'Reference number for the payment', example: 'REF-123456', nullable: true }),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], Payment.prototype, "referenceNumber", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
113
|
+
(0, swagger_1.ApiProperty)({ description: 'Payment description or concept', example: 'Monthly subscription payment', nullable: true }),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], Payment.prototype, "description", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
118
|
+
(0, swagger_1.ApiProperty)({ description: 'Email of the payer', example: 'customer@example.com', nullable: true }),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], Payment.prototype, "payerEmail", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
123
|
+
(0, swagger_1.ApiProperty)({ description: 'Name of the payer', example: 'John Doe', nullable: true }),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], Payment.prototype, "payerName", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
128
|
+
(0, swagger_1.ApiProperty)({ description: 'Fee charged by payment provider', example: 0.5, nullable: true }),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], Payment.prototype, "processingFee", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
133
|
+
(0, swagger_1.ApiProperty)({ description: 'Net amount after fees', example: 9.49, nullable: true }),
|
|
134
|
+
__metadata("design:type", Number)
|
|
135
|
+
], Payment.prototype, "netAmount", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
138
|
+
(0, swagger_1.ApiProperty)({ description: 'Tax amount included in the payment', example: 1.5, nullable: true }),
|
|
139
|
+
__metadata("design:type", Number)
|
|
140
|
+
], Payment.prototype, "taxAmount", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
143
|
+
(0, swagger_1.ApiProperty)({ description: 'Date when the payment was confirmed/processed', example: '2024-06-05T11:30:00Z', nullable: true }),
|
|
144
|
+
__metadata("design:type", Date)
|
|
145
|
+
], Payment.prototype, "paidAt", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
148
|
+
(0, swagger_1.ApiProperty)({ description: 'Error message if payment failed', example: 'Insufficient funds', nullable: true }),
|
|
149
|
+
__metadata("design:type", String)
|
|
150
|
+
], Payment.prototype, "errorMessage", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
153
|
+
(0, swagger_1.ApiProperty)({ description: 'Error code from payment provider', example: 'card_declined', nullable: true }),
|
|
154
|
+
__metadata("design:type", String)
|
|
155
|
+
], Payment.prototype, "errorCode", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
158
|
+
(0, swagger_1.ApiProperty)({ description: 'Number of retry attempts for failed payments', example: 2, nullable: true }),
|
|
159
|
+
__metadata("design:type", Number)
|
|
160
|
+
], Payment.prototype, "retryCount", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
163
|
+
(0, swagger_1.ApiProperty)({ description: 'Additional metadata about the payment', example: { ip: '192.168.1.1' }, nullable: true }),
|
|
164
|
+
__metadata("design:type", Object)
|
|
165
|
+
], Payment.prototype, "metadata", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'timestamptz', default: () => 'CURRENT_TIMESTAMP' }),
|
|
168
|
+
(0, swagger_1.ApiProperty)({ description: 'Date and time of the transaction', example: '2024-06-05T11:00:00Z' }),
|
|
169
|
+
__metadata("design:type", Date)
|
|
170
|
+
], Payment.prototype, "transactionDate", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
173
|
+
(0, swagger_1.ApiProperty)({
|
|
174
|
+
description: 'Internal notes about the payment',
|
|
175
|
+
example: 'Refund initiated due to double charge.',
|
|
176
|
+
nullable: true,
|
|
177
|
+
}),
|
|
178
|
+
__metadata("design:type", String)
|
|
179
|
+
], Payment.prototype, "notes", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, typeorm_1.ManyToOne)(() => subscription_entity_1.Subscription, subscription => subscription.paymentHistory, { onDelete: 'SET NULL' }),
|
|
182
|
+
__metadata("design:type", subscription_entity_1.Subscription)
|
|
183
|
+
], Payment.prototype, "subscription", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, typeorm_1.ManyToOne)(() => group_entity_1.Group, { onDelete: 'SET NULL' }),
|
|
186
|
+
__metadata("design:type", group_entity_1.Group)
|
|
187
|
+
], Payment.prototype, "group", void 0);
|
|
188
|
+
exports.Payment = Payment = __decorate([
|
|
189
|
+
(0, typeorm_1.Entity)()
|
|
190
|
+
], Payment);
|
|
191
|
+
//# sourceMappingURL=payment.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.entity.js","sourceRoot":"","sources":["../../../src/entities/payments/payment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsE;AACtE,6CAA8C;AAC9C,mEAA4E;AAC5E,8EAAoE;AACpE,kDAAwC;AAExC,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;IACrB,oCAAmB,CAAA;AACrB,CAAC,EARW,aAAa,6BAAb,aAAa,QAQxB;AAED,IAAY,aA0BX;AA1BD,WAAY,aAAa;IAEvB,8DAA6C,CAAA;IAC7C,sDAAqC,CAAA;IACrC,8EAA6D,CAAA;IAC7D,4DAA2C,CAAA;IAC3C,gEAA+C,CAAA;IAC/C,wFAAuE,CAAA;IAGvE,4CAA2B,CAAA;IAC3B,8DAA6C,CAAA;IAC7C,gDAA+B,CAAA;IAC/B,wDAAuC,CAAA;IACvC,sDAAqC,CAAA;IACrC,gDAA+B,CAAA;IAC/B,oDAAmC,CAAA;IACnC,gDAA+B,CAAA;IAC/B,4CAA2B,CAAA;IAG3B,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,gDAA+B,CAAA;IAC/B,kCAAiB,CAAA;IACjB,gCAAe,CAAA;AACjB,CAAC,EA1BW,aAAa,6BAAb,aAAa,QA0BxB;AAGM,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qCAAuB;IAGlD,aAAa,CAAgB;IAI7B,MAAM,CAAS;IAIf,QAAQ,CAAS;IAIjB,MAAM,CAAgB;IAItB,qBAAqB,CAAgB;IAIrC,aAAa,CAAgB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I;gDAAC;AAQtB;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,wCAAwC;QACjD,QAAQ,EAAE,IAAI;KACf,CAAC;;sCACmB;AAKrB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAY,EAAE,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;8BACvF,kCAAY;6CAAQ;AAGlC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;8BAC1C,oBAAK;sCAAC;kBA3FF,OAAO;IADnB,IAAA,gBAAM,GAAE;GACI,OAAO,CA4FnB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BaseEntityOnlyEssential } from '../../common/database/base.entity';
|
|
2
|
+
import { Payment } from './payment.entity';
|
|
3
|
+
export declare enum StripePaymentIntentStatus {
|
|
4
|
+
REQUIRES_PAYMENT_METHOD = "requires_payment_method",
|
|
5
|
+
REQUIRES_CONFIRMATION = "requires_confirmation",
|
|
6
|
+
REQUIRES_ACTION = "requires_action",
|
|
7
|
+
PROCESSING = "processing",
|
|
8
|
+
REQUIRES_CAPTURE = "requires_capture",
|
|
9
|
+
CANCELED = "canceled",
|
|
10
|
+
SUCCEEDED = "succeeded"
|
|
11
|
+
}
|
|
12
|
+
export declare enum StripeChargeStatus {
|
|
13
|
+
SUCCEEDED = "succeeded",
|
|
14
|
+
PENDING = "pending",
|
|
15
|
+
FAILED = "failed"
|
|
16
|
+
}
|
|
17
|
+
export declare class StripePayment extends BaseEntityOnlyEssential {
|
|
18
|
+
paymentIntentId: string;
|
|
19
|
+
chargeId: string | null;
|
|
20
|
+
customerId: string | null;
|
|
21
|
+
invoiceId: string | null;
|
|
22
|
+
subscriptionId: string | null;
|
|
23
|
+
paymentIntentStatus: StripePaymentIntentStatus;
|
|
24
|
+
chargeStatus: StripeChargeStatus | null;
|
|
25
|
+
paymentMethodType: string | null;
|
|
26
|
+
paymentMethodId: string | null;
|
|
27
|
+
cardBrand: string | null;
|
|
28
|
+
cardLast4: string | null;
|
|
29
|
+
cardFunding: string | null;
|
|
30
|
+
cardCountry: string | null;
|
|
31
|
+
amountCents: number;
|
|
32
|
+
amountRefundedCents: number | null;
|
|
33
|
+
applicationFeeAmountCents: number | null;
|
|
34
|
+
balanceTransactionId: string | null;
|
|
35
|
+
receiptUrl: string | null;
|
|
36
|
+
receiptEmail: string | null;
|
|
37
|
+
failureMessage: string | null;
|
|
38
|
+
failureCode: string | null;
|
|
39
|
+
networkStatus: string | null;
|
|
40
|
+
riskLevel: string | null;
|
|
41
|
+
riskScore: number | null;
|
|
42
|
+
disputed: boolean | null;
|
|
43
|
+
refunded: boolean | null;
|
|
44
|
+
captured: boolean | null;
|
|
45
|
+
metadata: Record<string, any> | null;
|
|
46
|
+
description: string | null;
|
|
47
|
+
statementDescriptor: string | null;
|
|
48
|
+
stripeCreatedAt: Date | null;
|
|
49
|
+
payment: Payment;
|
|
50
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
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.StripePayment = exports.StripeChargeStatus = exports.StripePaymentIntentStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
|
+
const payment_entity_1 = require("./payment.entity");
|
|
17
|
+
var StripePaymentIntentStatus;
|
|
18
|
+
(function (StripePaymentIntentStatus) {
|
|
19
|
+
StripePaymentIntentStatus["REQUIRES_PAYMENT_METHOD"] = "requires_payment_method";
|
|
20
|
+
StripePaymentIntentStatus["REQUIRES_CONFIRMATION"] = "requires_confirmation";
|
|
21
|
+
StripePaymentIntentStatus["REQUIRES_ACTION"] = "requires_action";
|
|
22
|
+
StripePaymentIntentStatus["PROCESSING"] = "processing";
|
|
23
|
+
StripePaymentIntentStatus["REQUIRES_CAPTURE"] = "requires_capture";
|
|
24
|
+
StripePaymentIntentStatus["CANCELED"] = "canceled";
|
|
25
|
+
StripePaymentIntentStatus["SUCCEEDED"] = "succeeded";
|
|
26
|
+
})(StripePaymentIntentStatus || (exports.StripePaymentIntentStatus = StripePaymentIntentStatus = {}));
|
|
27
|
+
var StripeChargeStatus;
|
|
28
|
+
(function (StripeChargeStatus) {
|
|
29
|
+
StripeChargeStatus["SUCCEEDED"] = "succeeded";
|
|
30
|
+
StripeChargeStatus["PENDING"] = "pending";
|
|
31
|
+
StripeChargeStatus["FAILED"] = "failed";
|
|
32
|
+
})(StripeChargeStatus || (exports.StripeChargeStatus = StripeChargeStatus = {}));
|
|
33
|
+
let StripePayment = class StripePayment extends base_entity_1.BaseEntityOnlyEssential {
|
|
34
|
+
paymentIntentId;
|
|
35
|
+
chargeId;
|
|
36
|
+
customerId;
|
|
37
|
+
invoiceId;
|
|
38
|
+
subscriptionId;
|
|
39
|
+
paymentIntentStatus;
|
|
40
|
+
chargeStatus;
|
|
41
|
+
paymentMethodType;
|
|
42
|
+
paymentMethodId;
|
|
43
|
+
cardBrand;
|
|
44
|
+
cardLast4;
|
|
45
|
+
cardFunding;
|
|
46
|
+
cardCountry;
|
|
47
|
+
amountCents;
|
|
48
|
+
amountRefundedCents;
|
|
49
|
+
applicationFeeAmountCents;
|
|
50
|
+
balanceTransactionId;
|
|
51
|
+
receiptUrl;
|
|
52
|
+
receiptEmail;
|
|
53
|
+
failureMessage;
|
|
54
|
+
failureCode;
|
|
55
|
+
networkStatus;
|
|
56
|
+
riskLevel;
|
|
57
|
+
riskScore;
|
|
58
|
+
disputed;
|
|
59
|
+
refunded;
|
|
60
|
+
captured;
|
|
61
|
+
metadata;
|
|
62
|
+
description;
|
|
63
|
+
statementDescriptor;
|
|
64
|
+
stripeCreatedAt;
|
|
65
|
+
payment;
|
|
66
|
+
};
|
|
67
|
+
exports.StripePayment = StripePayment;
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false, unique: true }),
|
|
70
|
+
(0, swagger_1.ApiProperty)({ description: 'Stripe Payment Intent ID', example: 'pi_3MtwBwLkdIwHu7ix28a3tqPa' }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], StripePayment.prototype, "paymentIntentId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
75
|
+
(0, swagger_1.ApiProperty)({ description: 'Stripe Charge ID', example: 'ch_3MtwBwLkdIwHu7ix28a3tqPa', nullable: true }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], StripePayment.prototype, "chargeId", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
80
|
+
(0, swagger_1.ApiProperty)({ description: 'Stripe Customer ID', example: 'cus_NffrFeUfNV2Hib', nullable: true }),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], StripePayment.prototype, "customerId", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
85
|
+
(0, swagger_1.ApiProperty)({ description: 'Stripe Invoice ID', example: 'in_1MtwBwLkdIwHu7ix28a3tqPa', nullable: true }),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], StripePayment.prototype, "invoiceId", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
90
|
+
(0, swagger_1.ApiProperty)({ description: 'Stripe Subscription ID if payment is subscription-related', example: 'sub_1MtwBwLkdIwHu7ix28a3tqPa', nullable: true }),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], StripePayment.prototype, "subscriptionId", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: StripePaymentIntentStatus, nullable: false }),
|
|
95
|
+
(0, swagger_1.ApiProperty)({ description: 'Status of the Stripe Payment Intent', enum: StripePaymentIntentStatus, example: StripePaymentIntentStatus.SUCCEEDED }),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], StripePayment.prototype, "paymentIntentStatus", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: StripeChargeStatus, nullable: true }),
|
|
100
|
+
(0, swagger_1.ApiProperty)({ description: 'Status of the Stripe Charge', enum: StripeChargeStatus, example: StripeChargeStatus.SUCCEEDED, nullable: true }),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], StripePayment.prototype, "chargeStatus", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
105
|
+
(0, swagger_1.ApiProperty)({ description: 'Payment method type (card, bank_transfer, etc.)', example: 'card', nullable: true }),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], StripePayment.prototype, "paymentMethodType", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
110
|
+
(0, swagger_1.ApiProperty)({ description: 'Stripe Payment Method ID', example: 'pm_1MtwBwLkdIwHu7ix28a3tqPa', nullable: true }),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], StripePayment.prototype, "paymentMethodId", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
115
|
+
(0, swagger_1.ApiProperty)({ description: 'Card brand (Visa, Mastercard, etc.)', example: 'visa', nullable: true }),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], StripePayment.prototype, "cardBrand", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 4, nullable: true }),
|
|
120
|
+
(0, swagger_1.ApiProperty)({ description: 'Last 4 digits of the card', example: '4242', nullable: true }),
|
|
121
|
+
__metadata("design:type", String)
|
|
122
|
+
], StripePayment.prototype, "cardLast4", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
125
|
+
(0, swagger_1.ApiProperty)({ description: 'Card funding type (credit, debit, prepaid)', example: 'credit', nullable: true }),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], StripePayment.prototype, "cardFunding", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 2, nullable: true }),
|
|
130
|
+
(0, swagger_1.ApiProperty)({ description: 'Card country code', example: 'US', nullable: true }),
|
|
131
|
+
__metadata("design:type", String)
|
|
132
|
+
], StripePayment.prototype, "cardCountry", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
135
|
+
(0, swagger_1.ApiProperty)({ description: 'Amount in cents', example: 5000 }),
|
|
136
|
+
__metadata("design:type", Number)
|
|
137
|
+
], StripePayment.prototype, "amountCents", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
140
|
+
(0, swagger_1.ApiProperty)({ description: 'Amount refunded in cents', example: 0, nullable: true }),
|
|
141
|
+
__metadata("design:type", Number)
|
|
142
|
+
], StripePayment.prototype, "amountRefundedCents", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
145
|
+
(0, swagger_1.ApiProperty)({ description: 'Application fee amount in cents', example: 100, nullable: true }),
|
|
146
|
+
__metadata("design:type", Number)
|
|
147
|
+
], StripePayment.prototype, "applicationFeeAmountCents", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
150
|
+
(0, swagger_1.ApiProperty)({ description: 'Balance transaction ID', example: 'txn_3MtwBwLkdIwHu7ix28a3tqPa', nullable: true }),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], StripePayment.prototype, "balanceTransactionId", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
155
|
+
(0, swagger_1.ApiProperty)({ description: 'Receipt URL from Stripe', example: 'https://pay.stripe.com/receipts/...', nullable: true }),
|
|
156
|
+
__metadata("design:type", String)
|
|
157
|
+
], StripePayment.prototype, "receiptUrl", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
160
|
+
(0, swagger_1.ApiProperty)({ description: 'Receipt email', example: 'customer@example.com', nullable: true }),
|
|
161
|
+
__metadata("design:type", String)
|
|
162
|
+
], StripePayment.prototype, "receiptEmail", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
165
|
+
(0, swagger_1.ApiProperty)({ description: 'Failure message if payment failed', example: 'Your card was declined', nullable: true }),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], StripePayment.prototype, "failureMessage", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
170
|
+
(0, swagger_1.ApiProperty)({ description: 'Failure code', example: 'card_declined', nullable: true }),
|
|
171
|
+
__metadata("design:type", String)
|
|
172
|
+
], StripePayment.prototype, "failureCode", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
175
|
+
(0, swagger_1.ApiProperty)({ description: 'Network status (approved_by_network, declined_by_network, etc.)', example: 'approved_by_network', nullable: true }),
|
|
176
|
+
__metadata("design:type", String)
|
|
177
|
+
], StripePayment.prototype, "networkStatus", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
180
|
+
(0, swagger_1.ApiProperty)({ description: 'Stripe risk level (normal, elevated, highest)', example: 'normal', nullable: true }),
|
|
181
|
+
__metadata("design:type", String)
|
|
182
|
+
], StripePayment.prototype, "riskLevel", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
185
|
+
(0, swagger_1.ApiProperty)({ description: 'Stripe risk score (0-100)', example: 15, nullable: true }),
|
|
186
|
+
__metadata("design:type", Number)
|
|
187
|
+
], StripePayment.prototype, "riskScore", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
|
|
190
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether the payment was disputed', example: false, nullable: true }),
|
|
191
|
+
__metadata("design:type", Boolean)
|
|
192
|
+
], StripePayment.prototype, "disputed", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
|
|
195
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether the payment was refunded', example: false, nullable: true }),
|
|
196
|
+
__metadata("design:type", Boolean)
|
|
197
|
+
], StripePayment.prototype, "refunded", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
|
|
200
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether the payment was captured (for manual capture)', example: true, nullable: true }),
|
|
201
|
+
__metadata("design:type", Boolean)
|
|
202
|
+
], StripePayment.prototype, "captured", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
205
|
+
(0, swagger_1.ApiProperty)({ description: 'Additional metadata from Stripe', example: { order_id: '12345' }, nullable: true }),
|
|
206
|
+
__metadata("design:type", Object)
|
|
207
|
+
], StripePayment.prototype, "metadata", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
210
|
+
(0, swagger_1.ApiProperty)({ description: 'Description from Stripe', example: 'Payment for order #12345', nullable: true }),
|
|
211
|
+
__metadata("design:type", String)
|
|
212
|
+
], StripePayment.prototype, "description", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
215
|
+
(0, swagger_1.ApiProperty)({ description: 'Statement descriptor that appears on customer statement', example: 'MY COMPANY', nullable: true }),
|
|
216
|
+
__metadata("design:type", String)
|
|
217
|
+
], StripePayment.prototype, "statementDescriptor", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
220
|
+
(0, swagger_1.ApiProperty)({ description: 'Timestamp when the charge was created in Stripe', example: '2024-06-05T11:00:00Z', nullable: true }),
|
|
221
|
+
__metadata("design:type", Date)
|
|
222
|
+
], StripePayment.prototype, "stripeCreatedAt", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
(0, typeorm_1.OneToOne)(() => payment_entity_1.Payment, { onDelete: 'CASCADE' }),
|
|
225
|
+
(0, typeorm_1.JoinColumn)(),
|
|
226
|
+
__metadata("design:type", payment_entity_1.Payment)
|
|
227
|
+
], StripePayment.prototype, "payment", void 0);
|
|
228
|
+
exports.StripePayment = StripePayment = __decorate([
|
|
229
|
+
(0, typeorm_1.Entity)()
|
|
230
|
+
], StripePayment);
|
|
231
|
+
//# sourceMappingURL=stripe-payment.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripe-payment.entity.js","sourceRoot":"","sources":["../../../src/entities/payments/stripe-payment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,6CAA8C;AAC9C,mEAA4E;AAC5E,qDAA2C;AAE3C,IAAY,yBAQX;AARD,WAAY,yBAAyB;IACnC,gFAAmD,CAAA;IACnD,4EAA+C,CAAA;IAC/C,gEAAmC,CAAA;IACnC,sDAAyB,CAAA;IACzB,kEAAqC,CAAA;IACrC,kDAAqB,CAAA;IACrB,oDAAuB,CAAA;AACzB,CAAC,EARW,yBAAyB,yCAAzB,yBAAyB,QAQpC;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;AACnB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qCAAuB;IAGxD,eAAe,CAAS;IAIxB,QAAQ,CAAgB;IAIxB,UAAU,CAAgB;IAI1B,SAAS,CAAgB;IAIzB,cAAc,CAAgB;IAI9B,mBAAmB,CAA4B;IAI/C,YAAY,CAA4B;IAIxC,iBAAiB,CAAg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,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxD,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,yDAAyD,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DAC5F;AAInC;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/C,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAChH,IAAI;sDAAQ;AAM7B;IAFC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAChD,IAAA,oBAAU,GAAE;8BACJ,wBAAO;8CAAC;wBAjIN,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CAkIzB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EntityBase } from "../common/database/base.entity";
|
|
2
|
+
import { Role } from "./role.entity";
|
|
3
|
+
import { PermissionGroupScope, PermissionRule } from "../common";
|
|
4
|
+
import { Group } from "./group.entity";
|
|
5
|
+
export declare class Permission extends EntityBase {
|
|
6
|
+
resource: string;
|
|
7
|
+
rules: PermissionRule[];
|
|
8
|
+
roles?: Role[];
|
|
9
|
+
groupScope: PermissionGroupScope;
|
|
10
|
+
groups?: Group[];
|
|
11
|
+
description?: string;
|
|
12
|
+
priority?: number;
|
|
13
|
+
tags?: string[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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.Permission = void 0;
|
|
13
|
+
const base_entity_1 = require("../common/database/base.entity");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const role_entity_1 = require("./role.entity");
|
|
16
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
17
|
+
const common_1 = require("../common");
|
|
18
|
+
const group_entity_1 = require("./group.entity");
|
|
19
|
+
let Permission = class Permission extends base_entity_1.EntityBase {
|
|
20
|
+
resource;
|
|
21
|
+
rules;
|
|
22
|
+
roles;
|
|
23
|
+
groupScope;
|
|
24
|
+
groups;
|
|
25
|
+
description;
|
|
26
|
+
priority;
|
|
27
|
+
tags;
|
|
28
|
+
};
|
|
29
|
+
exports.Permission = Permission;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({
|
|
32
|
+
type: String,
|
|
33
|
+
description: "Resource for the permission (e.g., 'contact', 'lead', 'policy')",
|
|
34
|
+
}),
|
|
35
|
+
(0, typeorm_1.Column)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Permission.prototype, "resource", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
type: "array",
|
|
41
|
+
description: "Dynamic permission rules with FilterCriteria for data-driven filtering",
|
|
42
|
+
example: [
|
|
43
|
+
{
|
|
44
|
+
action: "read",
|
|
45
|
+
scope: "assigned",
|
|
46
|
+
filterCriteria: {
|
|
47
|
+
includeOwn: true,
|
|
48
|
+
includeAssigned: true,
|
|
49
|
+
includeObserved: true,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
}),
|
|
54
|
+
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
55
|
+
__metadata("design:type", Array)
|
|
56
|
+
], Permission.prototype, "rules", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, swagger_1.ApiProperty)({
|
|
59
|
+
type: () => [role_entity_1.Role],
|
|
60
|
+
description: "Roles associated with the permission",
|
|
61
|
+
}),
|
|
62
|
+
(0, typeorm_1.ManyToMany)(() => role_entity_1.Role, {
|
|
63
|
+
onDelete: "CASCADE",
|
|
64
|
+
onUpdate: "CASCADE",
|
|
65
|
+
}),
|
|
66
|
+
(0, typeorm_1.JoinTable)(),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], Permission.prototype, "roles", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiProperty)({
|
|
71
|
+
type: String,
|
|
72
|
+
enum: common_1.PermissionGroupScope,
|
|
73
|
+
description: "Scope of permission application: 'global' for all groups, 'group_specific' for specific groups",
|
|
74
|
+
example: "group_specific",
|
|
75
|
+
}),
|
|
76
|
+
(0, typeorm_1.Column)({
|
|
77
|
+
type: "enum",
|
|
78
|
+
enum: common_1.PermissionGroupScope,
|
|
79
|
+
default: common_1.PermissionGroupScope.GROUP_SPECIFIC,
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], Permission.prototype, "groupScope", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, swagger_1.ApiProperty)({
|
|
85
|
+
type: () => [group_entity_1.Group],
|
|
86
|
+
description: "Specific groups this permission applies to (when groupScope='group_specific'). Empty = applies to all groups",
|
|
87
|
+
required: false,
|
|
88
|
+
}),
|
|
89
|
+
(0, typeorm_1.ManyToMany)(() => group_entity_1.Group, {
|
|
90
|
+
onDelete: "CASCADE",
|
|
91
|
+
onUpdate: "CASCADE",
|
|
92
|
+
}),
|
|
93
|
+
(0, typeorm_1.JoinTable)({
|
|
94
|
+
name: "permission_groups",
|
|
95
|
+
joinColumn: { name: "permission_id", referencedColumnName: "id" },
|
|
96
|
+
inverseJoinColumn: { name: "group_id", referencedColumnName: "id" },
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", Array)
|
|
99
|
+
], Permission.prototype, "groups", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, swagger_1.ApiProperty)({
|
|
102
|
+
type: String,
|
|
103
|
+
description: "Human-readable description of what this permission allows",
|
|
104
|
+
required: false,
|
|
105
|
+
example: "Allows team leads to read contacts they own, are assigned to, or observe",
|
|
106
|
+
}),
|
|
107
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], Permission.prototype, "description", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, swagger_1.ApiProperty)({
|
|
112
|
+
type: Number,
|
|
113
|
+
description: "Priority order when multiple permissions apply (lower = higher priority)",
|
|
114
|
+
required: false,
|
|
115
|
+
example: 1,
|
|
116
|
+
}),
|
|
117
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true, default: 100 }),
|
|
118
|
+
__metadata("design:type", Number)
|
|
119
|
+
], Permission.prototype, "priority", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, swagger_1.ApiProperty)({
|
|
122
|
+
type: String,
|
|
123
|
+
description: "Optional tags for permission categorization and filtering",
|
|
124
|
+
required: false,
|
|
125
|
+
example: ["sales", "crm", "basic"],
|
|
126
|
+
}),
|
|
127
|
+
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
128
|
+
__metadata("design:type", Array)
|
|
129
|
+
], Permission.prototype, "tags", void 0);
|
|
130
|
+
exports.Permission = Permission = __decorate([
|
|
131
|
+
(0, typeorm_1.Entity)()
|
|
132
|
+
], Permission);
|
|
133
|
+
//# sourceMappingURL=permission.entity.js.map
|