@servicelabsco/slabs-access-manager 2.0.15 → 2.0.18
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/AGENTS.md +41 -4
- package/CLAUDE.md +12 -4
- package/dist/access/commands/index.d.ts +1 -0
- package/dist/access/commands/index.js +1 -0
- package/dist/access/commands/index.js.map +1 -1
- package/dist/access/commands/mail.log.backfill.business.command.d.ts +6 -0
- package/dist/access/commands/mail.log.backfill.business.command.js +65 -0
- package/dist/access/commands/mail.log.backfill.business.command.js.map +1 -0
- package/dist/access/controllers/access.business.controller.d.ts +9 -0
- package/dist/access/controllers/access.business.controller.js +52 -0
- package/dist/access/controllers/access.business.controller.js.map +1 -0
- package/dist/access/controllers/bulk.upload.controller.d.ts +1 -1
- package/dist/access/controllers/bulk.upload.controller.js +1 -1
- package/dist/access/controllers/bulk.upload.controller.js.map +1 -1
- package/dist/access/controllers/business.email.alias.controller.d.ts +9 -0
- package/dist/access/controllers/business.email.alias.controller.js +43 -0
- package/dist/access/controllers/business.email.alias.controller.js.map +1 -0
- package/dist/access/controllers/business.property.controller.d.ts +12 -4
- package/dist/access/controllers/business.property.controller.js +74 -7
- package/dist/access/controllers/business.property.controller.js.map +1 -1
- package/dist/access/controllers/developer.menu.controller.js.map +1 -1
- package/dist/access/controllers/developer.notification.type.controller.d.ts +16 -0
- package/dist/access/controllers/developer.notification.type.controller.js +91 -0
- package/dist/access/controllers/developer.notification.type.controller.js.map +1 -0
- package/dist/access/controllers/emithook.controller.d.ts +3 -1
- package/dist/access/controllers/emithook.controller.js +9 -2
- package/dist/access/controllers/emithook.controller.js.map +1 -1
- package/dist/access/controllers/index.d.ts +6 -0
- package/dist/access/controllers/index.js +6 -0
- package/dist/access/controllers/index.js.map +1 -1
- package/dist/access/controllers/mail.log.controller.d.ts +20 -0
- package/dist/access/controllers/mail.log.controller.js +76 -0
- package/dist/access/controllers/mail.log.controller.js.map +1 -0
- package/dist/access/controllers/notification.type.preference.controller.d.ts +12 -0
- package/dist/access/controllers/notification.type.preference.controller.js +59 -0
- package/dist/access/controllers/notification.type.preference.controller.js.map +1 -0
- package/dist/access/controllers/user.notification.type.preference.controller.d.ts +10 -0
- package/dist/access/controllers/user.notification.type.preference.controller.js +54 -0
- package/dist/access/controllers/user.notification.type.preference.controller.js.map +1 -0
- package/dist/access/dtos/add.business.email.dto.js.map +1 -1
- package/dist/access/dtos/add.business.property.dto.d.ts +1 -0
- package/dist/access/dtos/add.business.property.dto.js +8 -0
- package/dist/access/dtos/add.business.property.dto.js.map +1 -1
- package/dist/access/dtos/business.notification.type.preference.attributes.dto.d.ts +3 -0
- package/dist/access/dtos/business.notification.type.preference.attributes.dto.js +7 -0
- package/dist/access/dtos/business.notification.type.preference.attributes.dto.js.map +1 -0
- package/dist/access/dtos/business.property.identifier.param.dto.d.ts +3 -0
- package/dist/access/dtos/business.property.identifier.param.dto.js +25 -0
- package/dist/access/dtos/business.property.identifier.param.dto.js.map +1 -0
- package/dist/access/dtos/business.property.list.filter.dto.d.ts +4 -0
- package/dist/access/dtos/business.property.list.filter.dto.js +40 -0
- package/dist/access/dtos/business.property.list.filter.dto.js.map +1 -1
- package/dist/access/dtos/business.property.scope.dto.d.ts +3 -0
- package/dist/access/dtos/business.property.scope.dto.js +26 -0
- package/dist/access/dtos/business.property.scope.dto.js.map +1 -0
- package/dist/access/dtos/create.notification.type.dto.d.ts +14 -0
- package/dist/access/dtos/create.notification.type.dto.js +79 -0
- package/dist/access/dtos/create.notification.type.dto.js.map +1 -0
- package/dist/access/dtos/email.notification.payload.dto.d.ts +5 -0
- package/dist/access/dtos/email.notification.payload.dto.js.map +1 -1
- package/dist/access/dtos/index.d.ts +12 -0
- package/dist/access/dtos/index.js +12 -0
- package/dist/access/dtos/index.js.map +1 -1
- package/dist/access/dtos/mail.log.content.query.dto.d.ts +4 -0
- package/dist/access/dtos/mail.log.content.query.dto.js +25 -0
- package/dist/access/dtos/mail.log.content.query.dto.js.map +1 -0
- package/dist/access/dtos/mail.log.list.filter.dto.d.ts +11 -0
- package/dist/access/dtos/mail.log.list.filter.dto.js +75 -0
- package/dist/access/dtos/mail.log.list.filter.dto.js.map +1 -0
- package/dist/access/dtos/notification.type.list.filter.dto.d.ts +7 -0
- package/dist/access/dtos/notification.type.list.filter.dto.js +45 -0
- package/dist/access/dtos/notification.type.list.filter.dto.js.map +1 -0
- package/dist/access/dtos/set.business.email.alias.dto.d.ts +3 -0
- package/dist/access/dtos/set.business.email.alias.dto.js +27 -0
- package/dist/access/dtos/set.business.email.alias.dto.js.map +1 -0
- package/dist/access/dtos/set.business.property.dto.d.ts +10 -0
- package/dist/access/dtos/set.business.property.dto.js +64 -0
- package/dist/access/dtos/set.business.property.dto.js.map +1 -0
- package/dist/access/dtos/set.notification.type.preference.dto.d.ts +5 -0
- package/dist/access/dtos/set.notification.type.preference.dto.js +34 -0
- package/dist/access/dtos/set.notification.type.preference.dto.js.map +1 -0
- package/dist/access/dtos/update.developer.business.dto.d.ts +8 -0
- package/dist/access/dtos/update.developer.business.dto.js +61 -0
- package/dist/access/dtos/update.developer.business.dto.js.map +1 -0
- package/dist/access/dtos/update.notification.type.dto.d.ts +13 -0
- package/dist/access/dtos/update.notification.type.dto.js +72 -0
- package/dist/access/dtos/update.notification.type.dto.js.map +1 -0
- package/dist/access/entities/access.business.entity.d.ts +1 -0
- package/dist/access/entities/access.business.entity.js +4 -0
- package/dist/access/entities/access.business.entity.js.map +1 -1
- package/dist/access/entities/access.mail.log.entity.d.ts +6 -0
- package/dist/access/entities/access.mail.log.entity.js +31 -0
- package/dist/access/entities/access.mail.log.entity.js.map +1 -0
- package/dist/access/entities/business.notification.type.preference.entity.d.ts +13 -0
- package/dist/access/entities/business.notification.type.preference.entity.js +54 -0
- package/dist/access/entities/business.notification.type.preference.entity.js.map +1 -0
- package/dist/access/entities/index.d.ts +4 -0
- package/dist/access/entities/index.js +4 -0
- package/dist/access/entities/index.js.map +1 -1
- package/dist/access/entities/notification.type.entity.d.ts +16 -0
- package/dist/access/entities/notification.type.entity.js +63 -0
- package/dist/access/entities/notification.type.entity.js.map +1 -0
- package/dist/access/entities/user.notification.type.preference.entity.d.ts +15 -0
- package/dist/access/entities/user.notification.type.preference.entity.js +63 -0
- package/dist/access/entities/user.notification.type.preference.entity.js.map +1 -0
- package/dist/access/enums/index.d.ts +3 -0
- package/dist/access/enums/index.js +3 -0
- package/dist/access/enums/index.js.map +1 -1
- package/dist/access/enums/notification.channel.type.enum.d.ts +2 -1
- package/dist/access/enums/notification.channel.type.enum.js +1 -0
- package/dist/access/enums/notification.channel.type.enum.js.map +1 -1
- package/dist/access/enums/notification.suppression.reason.enum.d.ts +6 -0
- package/dist/access/enums/notification.suppression.reason.enum.js +11 -0
- package/dist/access/enums/notification.suppression.reason.enum.js.map +1 -0
- package/dist/access/enums/notification.type.audience.enum.d.ts +5 -0
- package/dist/access/enums/notification.type.audience.enum.js +10 -0
- package/dist/access/enums/notification.type.audience.enum.js.map +1 -0
- package/dist/access/enums/notification.type.control.enum.d.ts +4 -0
- package/dist/access/enums/notification.type.control.enum.js +9 -0
- package/dist/access/enums/notification.type.control.enum.js.map +1 -0
- package/dist/access/es6.classes.d.ts +49 -14
- package/dist/access/es6.classes.js +98 -1
- package/dist/access/es6.classes.js.map +1 -1
- package/dist/access/interfaces/business.email.alias.interface.d.ts +3 -0
- package/dist/access/interfaces/business.email.alias.interface.js +3 -0
- package/dist/access/interfaces/business.email.alias.interface.js.map +1 -0
- package/dist/access/interfaces/business.notification.type.preference.row.interface.d.ts +14 -0
- package/dist/access/interfaces/business.notification.type.preference.row.interface.js +3 -0
- package/dist/access/interfaces/business.notification.type.preference.row.interface.js.map +1 -0
- package/dist/access/interfaces/catalogued.notification.type.interface.d.ts +10 -0
- package/dist/access/interfaces/catalogued.notification.type.interface.js +3 -0
- package/dist/access/interfaces/catalogued.notification.type.interface.js.map +1 -0
- package/dist/access/interfaces/dropped.notification.recipient.interface.d.ts +5 -0
- package/dist/access/interfaces/dropped.notification.recipient.interface.js +3 -0
- package/dist/access/interfaces/dropped.notification.recipient.interface.js.map +1 -0
- package/dist/access/interfaces/emithook.email.status.event.interface.d.ts +23 -0
- package/dist/access/interfaces/emithook.email.status.event.interface.js +3 -0
- package/dist/access/interfaces/emithook.email.status.event.interface.js.map +1 -0
- package/dist/access/interfaces/emithook.template.email.request.interface.d.ts +15 -0
- package/dist/access/interfaces/emithook.template.email.request.interface.js +3 -0
- package/dist/access/interfaces/emithook.template.email.request.interface.js.map +1 -0
- package/dist/access/interfaces/emithook.template.email.result.interface.d.ts +6 -0
- package/dist/access/interfaces/emithook.template.email.result.interface.js +3 -0
- package/dist/access/interfaces/emithook.template.email.result.interface.js.map +1 -0
- package/dist/access/interfaces/index.d.ts +18 -0
- package/dist/access/interfaces/index.js +18 -0
- package/dist/access/interfaces/index.js.map +1 -1
- package/dist/access/interfaces/legacy.notification.preference.provider.interface.d.ts +5 -0
- package/dist/access/interfaces/legacy.notification.preference.provider.interface.js +3 -0
- package/dist/access/interfaces/legacy.notification.preference.provider.interface.js.map +1 -0
- package/dist/access/interfaces/notification.preference.request.interface.d.ts +9 -0
- package/dist/access/interfaces/notification.preference.request.interface.js +3 -0
- package/dist/access/interfaces/notification.preference.request.interface.js.map +1 -0
- package/dist/access/interfaces/notification.recipient.interface.d.ts +5 -0
- package/dist/access/interfaces/notification.recipient.interface.js +3 -0
- package/dist/access/interfaces/notification.recipient.interface.js.map +1 -0
- package/dist/access/interfaces/notification.send.identifiers.interface.d.ts +6 -0
- package/dist/access/interfaces/notification.send.identifiers.interface.js +3 -0
- package/dist/access/interfaces/notification.send.identifiers.interface.js.map +1 -0
- package/dist/access/interfaces/notification.send.recipient.interface.d.ts +5 -0
- package/dist/access/interfaces/notification.send.recipient.interface.js +3 -0
- package/dist/access/interfaces/notification.send.recipient.interface.js.map +1 -0
- package/dist/access/interfaces/notification.type.sources.interface.d.ts +5 -0
- package/dist/access/interfaces/notification.type.sources.interface.js +3 -0
- package/dist/access/interfaces/notification.type.sources.interface.js.map +1 -0
- package/dist/access/interfaces/notification.type.usage.interface.d.ts +12 -0
- package/dist/access/interfaces/notification.type.usage.interface.js +3 -0
- package/dist/access/interfaces/notification.type.usage.interface.js.map +1 -0
- package/dist/access/interfaces/resolve.notification.recipients.input.interface.d.ts +10 -0
- package/dist/access/interfaces/resolve.notification.recipients.input.interface.js +3 -0
- package/dist/access/interfaces/resolve.notification.recipients.input.interface.js.map +1 -0
- package/dist/access/interfaces/resolve.notification.recipients.result.interface.d.ts +10 -0
- package/dist/access/interfaces/resolve.notification.recipients.result.interface.js +3 -0
- package/dist/access/interfaces/resolve.notification.recipients.result.interface.js.map +1 -0
- package/dist/access/interfaces/send.emithook.template.email.options.interface.d.ts +18 -0
- package/dist/access/interfaces/send.emithook.template.email.options.interface.js +3 -0
- package/dist/access/interfaces/send.emithook.template.email.options.interface.js.map +1 -0
- package/dist/access/interfaces/user.notification.type.preference.row.interface.d.ts +11 -0
- package/dist/access/interfaces/user.notification.type.preference.row.interface.js +3 -0
- package/dist/access/interfaces/user.notification.type.preference.row.interface.js.map +1 -0
- package/dist/access/jobs/handle.emithook.email.job.js +1 -1
- package/dist/access/jobs/handle.emithook.email.status.job.d.ts +8 -0
- package/dist/access/jobs/handle.emithook.email.status.job.js +31 -0
- package/dist/access/jobs/handle.emithook.email.status.job.js.map +1 -0
- package/dist/access/jobs/index.d.ts +2 -0
- package/dist/access/jobs/index.js +2 -0
- package/dist/access/jobs/index.js.map +1 -1
- package/dist/access/jobs/poll.emithook.email.inbox.job.js +1 -1
- package/dist/access/jobs/poll.emithook.email.inbox.job.js.map +1 -1
- package/dist/access/jobs/poll.emithook.email.sqs.job.d.ts +3 -1
- package/dist/access/jobs/poll.emithook.email.sqs.job.js +11 -3
- package/dist/access/jobs/poll.emithook.email.sqs.job.js.map +1 -1
- package/dist/access/jobs/reconcile.emithook.email.status.job.d.ts +15 -0
- package/dist/access/jobs/reconcile.emithook.email.status.job.js +38 -0
- package/dist/access/jobs/reconcile.emithook.email.status.job.js.map +1 -0
- package/dist/access/libraries/apply.notification.preferences.d.ts +12 -0
- package/dist/access/libraries/apply.notification.preferences.js +51 -0
- package/dist/access/libraries/apply.notification.preferences.js.map +1 -0
- package/dist/access/libraries/delete.business.property.d.ts +7 -0
- package/dist/access/libraries/delete.business.property.js +18 -0
- package/dist/access/libraries/delete.business.property.js.map +1 -0
- package/dist/access/libraries/index.d.ts +16 -0
- package/dist/access/libraries/index.js +16 -0
- package/dist/access/libraries/index.js.map +1 -1
- package/dist/access/libraries/load.notification.preference.context.d.ts +10 -0
- package/dist/access/libraries/load.notification.preference.context.js +78 -0
- package/dist/access/libraries/load.notification.preference.context.js.map +1 -0
- package/dist/access/libraries/notification.type.catalogue.d.ts +12 -0
- package/dist/access/libraries/notification.type.catalogue.js +72 -0
- package/dist/access/libraries/notification.type.catalogue.js.map +1 -0
- package/dist/access/libraries/present.business.property.d.ts +4 -0
- package/dist/access/libraries/present.business.property.js +13 -0
- package/dist/access/libraries/present.business.property.js.map +1 -0
- package/dist/access/libraries/process.application.menu.js +6 -7
- package/dist/access/libraries/process.application.menu.js.map +1 -1
- package/dist/access/libraries/process.business.property.data.d.ts +6 -0
- package/dist/access/libraries/process.business.property.data.js +60 -20
- package/dist/access/libraries/process.business.property.data.js.map +1 -1
- package/dist/access/libraries/process.business.property.list.d.ts +4 -0
- package/dist/access/libraries/process.business.property.list.js +44 -5
- package/dist/access/libraries/process.business.property.list.js.map +1 -1
- package/dist/access/libraries/process.developer.menu.d.ts +2 -1
- package/dist/access/libraries/process.developer.menu.js +50 -20
- package/dist/access/libraries/process.developer.menu.js.map +1 -1
- package/dist/access/libraries/process.email.notification.d.ts +19 -3
- package/dist/access/libraries/process.email.notification.js +150 -4
- package/dist/access/libraries/process.email.notification.js.map +1 -1
- package/dist/access/libraries/process.emithook.email.status.d.ts +7 -0
- package/dist/access/libraries/process.emithook.email.status.js +40 -0
- package/dist/access/libraries/process.emithook.email.status.js.map +1 -0
- package/dist/access/libraries/process.mail.log.list.d.ts +25 -0
- package/dist/access/libraries/process.mail.log.list.js +90 -0
- package/dist/access/libraries/process.mail.log.list.js.map +1 -0
- package/dist/access/libraries/read.eml.attachments.js +1 -3
- package/dist/access/libraries/read.eml.attachments.js.map +1 -1
- package/dist/access/libraries/reconcile.emithook.email.status.d.ts +17 -0
- package/dist/access/libraries/reconcile.emithook.email.status.js +82 -0
- package/dist/access/libraries/reconcile.emithook.email.status.js.map +1 -0
- package/dist/access/libraries/record.emithook.email.events.d.ts +15 -0
- package/dist/access/libraries/record.emithook.email.events.js +139 -0
- package/dist/access/libraries/record.emithook.email.events.js.map +1 -0
- package/dist/access/libraries/resolve.emithook.template.key.d.ts +8 -0
- package/dist/access/libraries/resolve.emithook.template.key.js +29 -0
- package/dist/access/libraries/resolve.emithook.template.key.js.map +1 -0
- package/dist/access/libraries/resolve.notification.recipients.d.ts +7 -0
- package/dist/access/libraries/resolve.notification.recipients.js +51 -0
- package/dist/access/libraries/resolve.notification.recipients.js.map +1 -0
- package/dist/access/libraries/sanitize.email.addresses.d.ts +3 -1
- package/dist/access/libraries/sanitize.email.addresses.js +3 -2
- package/dist/access/libraries/sanitize.email.addresses.js.map +1 -1
- package/dist/access/libraries/send.email.notification.js +2 -0
- package/dist/access/libraries/send.email.notification.js.map +1 -1
- package/dist/access/libraries/send.emithook.template.email.d.ts +24 -0
- package/dist/access/libraries/send.emithook.template.email.js +188 -0
- package/dist/access/libraries/send.emithook.template.email.js.map +1 -0
- package/dist/access/libraries/set.business.property.d.ts +8 -0
- package/dist/access/libraries/set.business.property.js +17 -0
- package/dist/access/libraries/set.business.property.js.map +1 -0
- package/dist/access/libraries/show.mail.log.content.d.ts +12 -0
- package/dist/access/libraries/show.mail.log.content.js +22 -0
- package/dist/access/libraries/show.mail.log.content.js.map +1 -0
- package/dist/access/libraries/show.mail.log.d.ts +6 -0
- package/dist/access/libraries/show.mail.log.js +20 -0
- package/dist/access/libraries/show.mail.log.js.map +1 -0
- package/dist/access/libraries/update.developer.business.d.ts +8 -0
- package/dist/access/libraries/update.developer.business.js +39 -0
- package/dist/access/libraries/update.developer.business.js.map +1 -0
- package/dist/access/services/business.email.alias.service.d.ts +5 -0
- package/dist/access/services/business.email.alias.service.js +35 -0
- package/dist/access/services/business.email.alias.service.js.map +1 -0
- package/dist/access/services/business.email.service.js +1 -2
- package/dist/access/services/business.email.service.js.map +1 -1
- package/dist/access/services/business.property.service.js +3 -1
- package/dist/access/services/business.property.service.js.map +1 -1
- package/dist/access/services/emithook.service.d.ts +5 -1
- package/dist/access/services/emithook.service.js +22 -1
- package/dist/access/services/emithook.service.js.map +1 -1
- package/dist/access/services/index.d.ts +5 -0
- package/dist/access/services/index.js +5 -0
- package/dist/access/services/index.js.map +1 -1
- package/dist/access/services/legacy.notification.preference.service.d.ts +8 -0
- package/dist/access/services/legacy.notification.preference.service.js +41 -0
- package/dist/access/services/legacy.notification.preference.service.js.map +1 -0
- package/dist/access/services/mail.log.access.service.d.ts +14 -0
- package/dist/access/services/mail.log.access.service.js +52 -0
- package/dist/access/services/mail.log.access.service.js.map +1 -0
- package/dist/access/services/notification.service.d.ts +2 -0
- package/dist/access/services/notification.service.js +19 -4
- package/dist/access/services/notification.service.js.map +1 -1
- package/dist/access/services/notification.type.preference.service.d.ts +25 -0
- package/dist/access/services/notification.type.preference.service.js +172 -0
- package/dist/access/services/notification.type.preference.service.js.map +1 -0
- package/dist/access/services/notification.type.service.d.ts +17 -0
- package/dist/access/services/notification.type.service.js +124 -0
- package/dist/access/services/notification.type.service.js.map +1 -0
- package/dist/access/services/send.email.service.d.ts +5 -1
- package/dist/access/services/send.email.service.js +9 -3
- package/dist/access/services/send.email.service.js.map +1 -1
- package/dist/accessUtility/controllers/bulk.definition.controller.d.ts +1 -1
- package/dist/accessUtility/controllers/bulk.definition.controller.js +1 -1
- package/dist/accessUtility/controllers/bulk.definition.controller.js.map +1 -1
- package/dist/accessUtility/es6.classes.d.ts +5 -5
- package/dist/accessUtility/es6.classes.js +8 -8
- package/dist/accessUtility/es6.classes.js.map +1 -1
- package/dist/accessUtility/jobs/analyse.bulk.upload.job.d.ts +1 -1
- package/dist/accessUtility/jobs/analyse.bulk.upload.job.js +1 -1
- package/dist/accessUtility/jobs/analyse.bulk.upload.job.js.map +1 -1
- package/dist/accessUtility/libraries/analyse.bulk.upload.d.ts +1 -1
- package/dist/accessUtility/libraries/index.d.ts +0 -1
- package/dist/accessUtility/libraries/index.js +0 -1
- package/dist/accessUtility/libraries/index.js.map +1 -1
- package/dist/accessUtility/services/index.d.ts +1 -0
- package/dist/accessUtility/services/index.js +1 -0
- package/dist/accessUtility/services/index.js.map +1 -1
- package/dist/accessUtility/{libraries → services}/match.bulk.upload.columns.d.ts +1 -1
- package/dist/accessUtility/{libraries → services}/match.bulk.upload.columns.js +4 -4
- package/dist/accessUtility/services/match.bulk.upload.columns.js.map +1 -0
- package/dist/migrations/1792454400000-CreateSysNotificationTypesTable.d.ts +8 -0
- package/dist/migrations/1792454400000-CreateSysNotificationTypesTable.js +36 -0
- package/dist/migrations/1792454400000-CreateSysNotificationTypesTable.js.map +1 -0
- package/dist/migrations/1792454400001-CreateBzNotificationTypePreferencesTable.d.ts +8 -0
- package/dist/migrations/1792454400001-CreateBzNotificationTypePreferencesTable.js +31 -0
- package/dist/migrations/1792454400001-CreateBzNotificationTypePreferencesTable.js.map +1 -0
- package/dist/migrations/1792454400002-CreateBzUserNotificationTypePreferencesTable.d.ts +8 -0
- package/dist/migrations/1792454400002-CreateBzUserNotificationTypePreferencesTable.js +32 -0
- package/dist/migrations/1792454400002-CreateBzUserNotificationTypePreferencesTable.js.map +1 -0
- package/dist/migrations/1792454400003-AddSmsNotificationChannelDataSeederTable.d.ts +5 -0
- package/dist/migrations/1792454400003-AddSmsNotificationChannelDataSeederTable.js +21 -0
- package/dist/migrations/1792454400003-AddSmsNotificationChannelDataSeederTable.js.map +1 -0
- package/dist/migrations/1792532792345-AddBusinessIdSysMailLogsTable.d.ts +7 -0
- package/dist/migrations/1792532792345-AddBusinessIdSysMailLogsTable.js +20 -0
- package/dist/migrations/1792532792345-AddBusinessIdSysMailLogsTable.js.map +1 -0
- package/dist/migrations/1792573736107-AddEmithookIndexSysMailLogsTable.d.ts +5 -0
- package/dist/migrations/1792573736107-AddEmithookIndexSysMailLogsTable.js +14 -0
- package/dist/migrations/1792573736107-AddEmithookIndexSysMailLogsTable.js.map +1 -0
- package/package.json +1 -1
- package/dist/accessUtility/libraries/match.bulk.upload.columns.js.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
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.ReconcileEmithookEmailStatusJob = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
|
+
const reconcile_emithook_email_status_1 = require("../libraries/reconcile.emithook.email.status");
|
|
16
|
+
const emithook_service_1 = require("../services/emithook.service");
|
|
17
|
+
let ReconcileEmithookEmailStatusJob = class ReconcileEmithookEmailStatusJob extends nestjs_utility_services_1.CommonJob {
|
|
18
|
+
constructor(queueService, sqlService, emithookService) {
|
|
19
|
+
super('f916349a2c0dd2a19047bb0130305ead');
|
|
20
|
+
this.queueService = queueService;
|
|
21
|
+
this.sqlService = sqlService;
|
|
22
|
+
this.emithookService = emithookService;
|
|
23
|
+
this.noDuplicate = true;
|
|
24
|
+
this.priority = 10;
|
|
25
|
+
this.timeout = 600000;
|
|
26
|
+
}
|
|
27
|
+
async handle() {
|
|
28
|
+
return new reconcile_emithook_email_status_1.ReconcileEmithookEmailStatus(this.sqlService, this.emithookService).process();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.ReconcileEmithookEmailStatusJob = ReconcileEmithookEmailStatusJob;
|
|
32
|
+
exports.ReconcileEmithookEmailStatusJob = ReconcileEmithookEmailStatusJob = __decorate([
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
__metadata("design:paramtypes", [nestjs_utility_services_1.QueueService,
|
|
35
|
+
nestjs_utility_services_1.SqlService,
|
|
36
|
+
emithook_service_1.EmithookService])
|
|
37
|
+
], ReconcileEmithookEmailStatusJob);
|
|
38
|
+
//# sourceMappingURL=reconcile.emithook.email.status.job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile.emithook.email.status.job.js","sourceRoot":"","sources":["../../../src/access/jobs/reconcile.emithook.email.status.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAA6F;AAC7F,kGAA4F;AAC5F,mEAA+D;AAQxD,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,mCAAS;IAK1D,YACuB,YAA0B,EAC5B,UAAsB,EACtB,eAAgC;QAEjD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAJvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAiB;QAP3C,gBAAW,GAAG,IAAI,CAAC;QACnB,aAAQ,GAAG,EAAE,CAAC;QACd,YAAO,GAAW,MAAM,CAAC;IAQnC,CAAC;IAKD,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,8DAA4B,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,CAAC;IAC7F,CAAC;CACJ,CAAA;AAnBY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;qCAO4B,sCAAY;QAChB,oCAAU;QACL,kCAAe;GAR5C,+BAA+B,CAmB3C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NotificationChannelTypeEnum } from '../enums/notification.channel.type.enum';
|
|
2
|
+
import { NotificationPreferenceRequestInterface } from '../interfaces/notification.preference.request.interface';
|
|
3
|
+
import { NotificationSendIdentifiersInterface } from '../interfaces/notification.send.identifiers.interface';
|
|
4
|
+
import { ResolveNotificationRecipientsResultInterface } from '../interfaces/resolve.notification.recipients.result.interface';
|
|
5
|
+
export declare class ApplyNotificationPreferences {
|
|
6
|
+
static readonly UNCATALOGUED_LOG_INTERVAL: number;
|
|
7
|
+
private static uncataloguedLoggedAt;
|
|
8
|
+
static clearUncataloguedLog(): void;
|
|
9
|
+
process(request: NotificationPreferenceRequestInterface): Promise<ResolveNotificationRecipientsResultInterface>;
|
|
10
|
+
allowedUserIds(identifiers: NotificationSendIdentifiersInterface, channel: NotificationChannelTypeEnum, businessId: number | null, userIds: number[]): Promise<number[]>;
|
|
11
|
+
private logUncatalogued;
|
|
12
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApplyNotificationPreferences = void 0;
|
|
4
|
+
const load_notification_preference_context_1 = require("./load.notification.preference.context");
|
|
5
|
+
const resolve_notification_recipients_1 = require("./resolve.notification.recipients");
|
|
6
|
+
class ApplyNotificationPreferences {
|
|
7
|
+
static clearUncataloguedLog() {
|
|
8
|
+
ApplyNotificationPreferences.uncataloguedLoggedAt.clear();
|
|
9
|
+
}
|
|
10
|
+
async process(request) {
|
|
11
|
+
try {
|
|
12
|
+
const context = await new load_notification_preference_context_1.LoadNotificationPreferenceContext().process(request);
|
|
13
|
+
if (!context.type)
|
|
14
|
+
this.logUncatalogued(request);
|
|
15
|
+
return new resolve_notification_recipients_1.ResolveNotificationRecipients().process(context);
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
19
|
+
global.console.error(`Notification preference check failed, sending as before: ${message}`);
|
|
20
|
+
const recipients = (request.recipients || []).map((r) => ({ address: r.address, role: r.role, user_ids: r.user_id ? [r.user_id] : [] }));
|
|
21
|
+
return { send: true, recipients, dropped: [] };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async allowedUserIds(identifiers, channel, businessId, userIds) {
|
|
25
|
+
if (!userIds?.length)
|
|
26
|
+
return userIds || [];
|
|
27
|
+
const recipients = userIds.map((id) => ({ address: `user:${id}`, role: 'to', user_id: id }));
|
|
28
|
+
const result = await this.process({ identifiers, channel, business_id: businessId, recipients });
|
|
29
|
+
if (!result.send)
|
|
30
|
+
return [];
|
|
31
|
+
const allowed = new Set(result.recipients.map((r) => r.address));
|
|
32
|
+
return userIds.filter((id) => allowed.has(`user:${id}`));
|
|
33
|
+
}
|
|
34
|
+
logUncatalogued(request) {
|
|
35
|
+
const { type, notification, email_template, email_notification } = request.identifiers || {};
|
|
36
|
+
const identifier = type || notification || email_template || email_notification;
|
|
37
|
+
if (!identifier)
|
|
38
|
+
return;
|
|
39
|
+
const key = `${request.channel}:${identifier}`;
|
|
40
|
+
const now = Date.now();
|
|
41
|
+
const last = ApplyNotificationPreferences.uncataloguedLoggedAt.get(key) || 0;
|
|
42
|
+
if (now - last < ApplyNotificationPreferences.UNCATALOGUED_LOG_INTERVAL)
|
|
43
|
+
return;
|
|
44
|
+
ApplyNotificationPreferences.uncataloguedLoggedAt.set(key, now);
|
|
45
|
+
global.console.log(`Notification preference check: uncatalogued ${key}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.ApplyNotificationPreferences = ApplyNotificationPreferences;
|
|
49
|
+
ApplyNotificationPreferences.UNCATALOGUED_LOG_INTERVAL = 60 * 60 * 1000;
|
|
50
|
+
ApplyNotificationPreferences.uncataloguedLoggedAt = new Map();
|
|
51
|
+
//# sourceMappingURL=apply.notification.preferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.notification.preferences.js","sourceRoot":"","sources":["../../../src/access/libraries/apply.notification.preferences.ts"],"names":[],"mappings":";;;AAIA,iGAA2F;AAC3F,uFAAkF;AAQlF,MAAa,4BAA4B;IAQrC,MAAM,CAAC,oBAAoB;QACvB,4BAA4B,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC9D,CAAC;IAOD,KAAK,CAAC,OAAO,CAAC,OAA+C;QACzD,IAAI,CAAC;YACD,MAAM,OAAO,GAAG,MAAM,IAAI,wEAAiC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC/E,IAAI,CAAC,OAAO,CAAC,IAAI;gBAAE,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAEjD,OAAO,IAAI,+DAA6B,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAChE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,4DAA4D,OAAO,EAAE,CAAC,CAAC;YAE5F,MAAM,UAAU,GAAG,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,IAAI,E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AAM,UAAU,GAAG,IAAI,IAAI,YAAY,IAAI,cAAc,IAAI,kBAAkB,CAAC;QAChF,IAAI,CAAC,UAAU;YAAE,OAAO;QAExB,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,OAAO,IAAI,UAAU,EAAE,CAAC;QAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,4BAA4B,CAAC,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC7E,IAAI,GAAG,GAAG,IAAI,GAAG,4BAA4B,CAAC,yBAAyB;YAAE,OAAO;QAEhF,4BAA4B,CAAC,oBAAoB,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAChE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,+CAA+C,GAAG,EAAE,CAAC,CAAC;IAC7E,CAAC;;AA1EL,oEA2EC;AAzEmB,sDAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAG5C,iDAAoB,GAAG,IAAI,GAAG,EAAkB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AccessBusinessEntity } from '../entities/access.business.entity';
|
|
2
|
+
import { BusinessPropertyEntity } from '../entities/business.property.entity';
|
|
3
|
+
export declare class DeleteBusinessProperty {
|
|
4
|
+
private readonly business;
|
|
5
|
+
constructor(business: AccessBusinessEntity);
|
|
6
|
+
process(id: number): Promise<BusinessPropertyEntity>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteBusinessProperty = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
const business_property_entity_1 = require("../entities/business.property.entity");
|
|
6
|
+
class DeleteBusinessProperty {
|
|
7
|
+
constructor(business) {
|
|
8
|
+
this.business = business;
|
|
9
|
+
}
|
|
10
|
+
async process(id) {
|
|
11
|
+
const property = await business_property_entity_1.BusinessPropertyEntity.findOne({ where: { id, business_id: this.business.id } });
|
|
12
|
+
if (!property)
|
|
13
|
+
throw new nestjs_utility_services_1.AccessException();
|
|
14
|
+
return property.softDelete();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.DeleteBusinessProperty = DeleteBusinessProperty;
|
|
18
|
+
//# sourceMappingURL=delete.business.property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.business.property.js","sourceRoot":"","sources":["../../../src/access/libraries/delete.business.property.ts"],"names":[],"mappings":";;;AAAA,oFAAyE;AAEzE,mFAA8E;AAM9E,MAAa,sBAAsB;IAC/B,YAA6B,QAA8B;QAA9B,aAAQ,GAAR,QAAQ,CAAsB;IAAG,CAAC;IAO/D,KAAK,CAAC,OAAO,CAAC,EAAU;QACpB,MAAM,QAAQ,GAAG,MAAM,iDAAsB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACxG,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,yCAAe,EAAE,CAAC;QAE3C,OAAO,QAAQ,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC;CACJ;AAdD,wDAcC"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
export * from './apply.menu.layout';
|
|
2
|
+
export * from './apply.notification.preferences';
|
|
2
3
|
export * from './assert.safe.sql.fragment';
|
|
3
4
|
export * from './business.ui.action.availability';
|
|
4
5
|
export * from './common.tag.controller';
|
|
5
6
|
export * from './conversation.controller';
|
|
6
7
|
export * from './create.user.business.secret';
|
|
7
8
|
export * from './date.fn';
|
|
9
|
+
export * from './delete.business.property';
|
|
8
10
|
export * from './evaluate.email.rule';
|
|
9
11
|
export * from './execute.business.script';
|
|
10
12
|
export * from './extract.client.credentials';
|
|
13
|
+
export * from './load.notification.preference.context';
|
|
14
|
+
export * from './notification.type.catalogue';
|
|
11
15
|
export * from './oauth.pkce';
|
|
16
|
+
export * from './present.business.property';
|
|
12
17
|
export * from './process.amazon.integration';
|
|
13
18
|
export * from './process.api.account.data';
|
|
14
19
|
export * from './process.api.account.list';
|
|
@@ -56,6 +61,7 @@ export * from './process.downloadable.reports.list';
|
|
|
56
61
|
export * from './process.email.notification';
|
|
57
62
|
export * from './process.email.rule.data';
|
|
58
63
|
export * from './process.email.rule.list';
|
|
64
|
+
export * from './process.emithook.email.status';
|
|
59
65
|
export * from './process.event.trigger.data';
|
|
60
66
|
export * from './process.event.trigger.list';
|
|
61
67
|
export * from './process.event.trigger.log.list';
|
|
@@ -77,6 +83,7 @@ export * from './process.listing.page.creation';
|
|
|
77
83
|
export * from './process.listing.page.query';
|
|
78
84
|
export * from './process.lock.script.data';
|
|
79
85
|
export * from './process.lock.script.list';
|
|
86
|
+
export * from './process.mail.log.list';
|
|
80
87
|
export * from './process.menu.creation';
|
|
81
88
|
export * from './process.menu.details';
|
|
82
89
|
export * from './process.module.creation';
|
|
@@ -101,13 +108,18 @@ export * from './process.whatsapp.integration';
|
|
|
101
108
|
export * from './process.whatsapp.message';
|
|
102
109
|
export * from './process.zoho.integration';
|
|
103
110
|
export * from './read.eml.attachments';
|
|
111
|
+
export * from './reconcile.emithook.email.status';
|
|
112
|
+
export * from './record.emithook.email.events';
|
|
104
113
|
export * from './report.view.enablement';
|
|
105
114
|
export * from './report.view.query.compiler';
|
|
106
115
|
export * from './resolve.client.ip';
|
|
116
|
+
export * from './resolve.emithook.template.key';
|
|
117
|
+
export * from './resolve.notification.recipients';
|
|
107
118
|
export * from './sanitize.email.addresses';
|
|
108
119
|
export * from './search.alias.mappings';
|
|
109
120
|
export * from './search.developer.businesses';
|
|
110
121
|
export * from './send.email.notification';
|
|
122
|
+
export * from './send.emithook.template.email';
|
|
111
123
|
export * from './send.fcm.notification';
|
|
112
124
|
export * from './send.gchat.message.notification';
|
|
113
125
|
export * from './send.gchat.webhook.notification';
|
|
@@ -116,8 +128,12 @@ export * from './send.slack.webhook.notification.';
|
|
|
116
128
|
export * from './send.webhook.request';
|
|
117
129
|
export * from './send.whatsapp.message.notification';
|
|
118
130
|
export * from './set.alias.mapping';
|
|
131
|
+
export * from './set.business.property';
|
|
119
132
|
export * from './set.fcm.token';
|
|
133
|
+
export * from './show.mail.log.content';
|
|
134
|
+
export * from './show.mail.log';
|
|
120
135
|
export * from './sync.business.user.role';
|
|
121
136
|
export * from './ui.action.businesses';
|
|
137
|
+
export * from './update.developer.business';
|
|
122
138
|
export * from './user.secret.view';
|
|
123
139
|
export * from './validate.custom.field.data';
|
|
@@ -15,16 +15,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./apply.menu.layout"), exports);
|
|
18
|
+
__exportStar(require("./apply.notification.preferences"), exports);
|
|
18
19
|
__exportStar(require("./assert.safe.sql.fragment"), exports);
|
|
19
20
|
__exportStar(require("./business.ui.action.availability"), exports);
|
|
20
21
|
__exportStar(require("./common.tag.controller"), exports);
|
|
21
22
|
__exportStar(require("./conversation.controller"), exports);
|
|
22
23
|
__exportStar(require("./create.user.business.secret"), exports);
|
|
23
24
|
__exportStar(require("./date.fn"), exports);
|
|
25
|
+
__exportStar(require("./delete.business.property"), exports);
|
|
24
26
|
__exportStar(require("./evaluate.email.rule"), exports);
|
|
25
27
|
__exportStar(require("./execute.business.script"), exports);
|
|
26
28
|
__exportStar(require("./extract.client.credentials"), exports);
|
|
29
|
+
__exportStar(require("./load.notification.preference.context"), exports);
|
|
30
|
+
__exportStar(require("./notification.type.catalogue"), exports);
|
|
27
31
|
__exportStar(require("./oauth.pkce"), exports);
|
|
32
|
+
__exportStar(require("./present.business.property"), exports);
|
|
28
33
|
__exportStar(require("./process.amazon.integration"), exports);
|
|
29
34
|
__exportStar(require("./process.api.account.data"), exports);
|
|
30
35
|
__exportStar(require("./process.api.account.list"), exports);
|
|
@@ -72,6 +77,7 @@ __exportStar(require("./process.downloadable.reports.list"), exports);
|
|
|
72
77
|
__exportStar(require("./process.email.notification"), exports);
|
|
73
78
|
__exportStar(require("./process.email.rule.data"), exports);
|
|
74
79
|
__exportStar(require("./process.email.rule.list"), exports);
|
|
80
|
+
__exportStar(require("./process.emithook.email.status"), exports);
|
|
75
81
|
__exportStar(require("./process.event.trigger.data"), exports);
|
|
76
82
|
__exportStar(require("./process.event.trigger.list"), exports);
|
|
77
83
|
__exportStar(require("./process.event.trigger.log.list"), exports);
|
|
@@ -93,6 +99,7 @@ __exportStar(require("./process.listing.page.creation"), exports);
|
|
|
93
99
|
__exportStar(require("./process.listing.page.query"), exports);
|
|
94
100
|
__exportStar(require("./process.lock.script.data"), exports);
|
|
95
101
|
__exportStar(require("./process.lock.script.list"), exports);
|
|
102
|
+
__exportStar(require("./process.mail.log.list"), exports);
|
|
96
103
|
__exportStar(require("./process.menu.creation"), exports);
|
|
97
104
|
__exportStar(require("./process.menu.details"), exports);
|
|
98
105
|
__exportStar(require("./process.module.creation"), exports);
|
|
@@ -117,13 +124,18 @@ __exportStar(require("./process.whatsapp.integration"), exports);
|
|
|
117
124
|
__exportStar(require("./process.whatsapp.message"), exports);
|
|
118
125
|
__exportStar(require("./process.zoho.integration"), exports);
|
|
119
126
|
__exportStar(require("./read.eml.attachments"), exports);
|
|
127
|
+
__exportStar(require("./reconcile.emithook.email.status"), exports);
|
|
128
|
+
__exportStar(require("./record.emithook.email.events"), exports);
|
|
120
129
|
__exportStar(require("./report.view.enablement"), exports);
|
|
121
130
|
__exportStar(require("./report.view.query.compiler"), exports);
|
|
122
131
|
__exportStar(require("./resolve.client.ip"), exports);
|
|
132
|
+
__exportStar(require("./resolve.emithook.template.key"), exports);
|
|
133
|
+
__exportStar(require("./resolve.notification.recipients"), exports);
|
|
123
134
|
__exportStar(require("./sanitize.email.addresses"), exports);
|
|
124
135
|
__exportStar(require("./search.alias.mappings"), exports);
|
|
125
136
|
__exportStar(require("./search.developer.businesses"), exports);
|
|
126
137
|
__exportStar(require("./send.email.notification"), exports);
|
|
138
|
+
__exportStar(require("./send.emithook.template.email"), exports);
|
|
127
139
|
__exportStar(require("./send.fcm.notification"), exports);
|
|
128
140
|
__exportStar(require("./send.gchat.message.notification"), exports);
|
|
129
141
|
__exportStar(require("./send.gchat.webhook.notification"), exports);
|
|
@@ -132,9 +144,13 @@ __exportStar(require("./send.slack.webhook.notification."), exports);
|
|
|
132
144
|
__exportStar(require("./send.webhook.request"), exports);
|
|
133
145
|
__exportStar(require("./send.whatsapp.message.notification"), exports);
|
|
134
146
|
__exportStar(require("./set.alias.mapping"), exports);
|
|
147
|
+
__exportStar(require("./set.business.property"), exports);
|
|
135
148
|
__exportStar(require("./set.fcm.token"), exports);
|
|
149
|
+
__exportStar(require("./show.mail.log.content"), exports);
|
|
150
|
+
__exportStar(require("./show.mail.log"), exports);
|
|
136
151
|
__exportStar(require("./sync.business.user.role"), exports);
|
|
137
152
|
__exportStar(require("./ui.action.businesses"), exports);
|
|
153
|
+
__exportStar(require("./update.developer.business"), exports);
|
|
138
154
|
__exportStar(require("./user.secret.view"), exports);
|
|
139
155
|
__exportStar(require("./validate.custom.field.data"), exports);
|
|
140
156
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGA,sDAAoC;AACpC,6DAA2C;AAC3C,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C;AAC1C,gEAA8C;AAC9C,4CAA0B;AAC1B,wDAAsC;AACtC,4DAA0C;AAC1C,+DAA6C;AAC7C,+CAA6B;AAC7B,+DAA6C;AAC7C,6DAA2C;AAC3C,6DAA2C;AAC3C,4DAA0C;AAC1C,6DAA2C;AAC3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C,mEAAiD;AACjD,iEAA+C;AAC/C,6DAA2C;AAC3C,6DAA2C;AAC3C,yDAAuC;AACvC,2DAAyC;AACzC,+DAA6C;AAC7C,sDAAoC;AACpC,6DAA2C;AAC3C,0DAAwC;AACxC,gEAA8C;AAC9C,4DAA0C;AAC1C,0DAAwC;AACxC,oEAAkD;AAClD,oEAAkD;AAClD,oEAAkD;AAClD,qEAAmD;AACnD,yDAAuC;AACvC,uEAAqD;AACrD,sDAAoC;AACpC,kDAAgC;AAChC,4DAA0C;AAC1C,yDAAuC;AACvC,qDAAmC;AACnC,+DAA6C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGA,sDAAoC;AACpC,mEAAiD;AACjD,6DAA2C;AAC3C,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C;AAC1C,gEAA8C;AAC9C,4CAA0B;AAC1B,6DAA2C;AAC3C,wDAAsC;AACtC,4DAA0C;AAC1C,+DAA6C;AAC7C,yEAAuD;AACvD,gEAA8C;AAC9C,+CAA6B;AAC7B,8DAA4C;AAC5C,+DAA6C;AAC7C,6DAA2C;AAC3C,6DAA2C;AAC3C,4DAA0C;AAC1C,6DAA2C;AAC3C,kEAAgD;AAChD,6DAA2C;AAC3C,mEAAiD;AACjD,gEAA8C;AAC9C,sEAAoD;AACpD,sEAAoD;AACpD,yEAAuD;AACvD,0FAAwE;AACxE,mEAAiD;AACjD,mEAAiD;AACjD,iEAA+C;AAC/C,qEAAmD;AACnD,iEAA+C;AAC/C,iEAA+C;AAC/C,+DAA6C;AAC7C,qEAAmD;AACnD,uFAAqE;AACrE,sEAAoD;AACpD,6DAA2C;AAC3C,6DAA2C;AAC3C,6DAA2C;AAC3C,6DAA2C;AAC3C,gEAA8C;AAC9C,gEAA8C;AAC9C,wDAAsC;AACtC,8DAA4C;AAC5C,uEAAqD;AACrD,+DAA6C;AAC7C,kEAAgD;AAChD,8DA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ACxC,kDAAgC;AAChC,4DAA0C;AAC1C,yDAAuC;AACvC,8DAA4C;AAC5C,qDAAmC;AACnC,+DAA6C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NotificationPreferenceRequestInterface } from '../interfaces/notification.preference.request.interface';
|
|
2
|
+
import { ResolveNotificationRecipientsInputInterface } from '../interfaces/resolve.notification.recipients.input.interface';
|
|
3
|
+
export declare class LoadNotificationPreferenceContext {
|
|
4
|
+
process(request: NotificationPreferenceRequestInterface): Promise<ResolveNotificationRecipientsInputInterface>;
|
|
5
|
+
private isConfigurable;
|
|
6
|
+
private knownRecipients;
|
|
7
|
+
private getBusinessActive;
|
|
8
|
+
private matchUsers;
|
|
9
|
+
private getUserOptOuts;
|
|
10
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoadNotificationPreferenceContext = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
const business_notification_type_preference_entity_1 = require("../entities/business.notification.type.preference.entity");
|
|
6
|
+
const business_user_entity_1 = require("../entities/business.user.entity");
|
|
7
|
+
const user_notification_type_preference_entity_1 = require("../entities/user.notification.type.preference.entity");
|
|
8
|
+
const notification_type_control_enum_1 = require("../enums/notification.type.control.enum");
|
|
9
|
+
const notification_type_catalogue_1 = require("./notification.type.catalogue");
|
|
10
|
+
class LoadNotificationPreferenceContext {
|
|
11
|
+
async process(request) {
|
|
12
|
+
const { channel, business_id } = request;
|
|
13
|
+
const type = await new notification_type_catalogue_1.NotificationTypeCatalogue().find(request.identifiers);
|
|
14
|
+
const context = {
|
|
15
|
+
type,
|
|
16
|
+
channel,
|
|
17
|
+
businessActive: null,
|
|
18
|
+
recipients: this.knownRecipients(request),
|
|
19
|
+
userOptOuts: new Set(),
|
|
20
|
+
};
|
|
21
|
+
if (!business_id || !this.isConfigurable(type, request))
|
|
22
|
+
return context;
|
|
23
|
+
const businessActive = await this.getBusinessActive(business_id, type.id, request);
|
|
24
|
+
if (businessActive === false)
|
|
25
|
+
return { ...context, businessActive };
|
|
26
|
+
const recipients = await this.matchUsers(business_id, request);
|
|
27
|
+
const userOptOuts = await this.getUserOptOuts(business_id, type.id, request, recipients);
|
|
28
|
+
return { ...context, businessActive, recipients, userOptOuts };
|
|
29
|
+
}
|
|
30
|
+
isConfigurable(type, request) {
|
|
31
|
+
if (!type || type.active === false)
|
|
32
|
+
return false;
|
|
33
|
+
if (type.control === notification_type_control_enum_1.NotificationTypeControlEnum.LOCKED)
|
|
34
|
+
return false;
|
|
35
|
+
return (type.channels || []).includes(request.channel);
|
|
36
|
+
}
|
|
37
|
+
knownRecipients(request) {
|
|
38
|
+
return (request.recipients || []).map((r) => ({ address: r.address, role: r.role, user_ids: r.user_id ? [r.user_id] : [] }));
|
|
39
|
+
}
|
|
40
|
+
async getBusinessActive(businessId, typeId, request) {
|
|
41
|
+
const row = await business_notification_type_preference_entity_1.BusinessNotificationTypePreferenceEntity.findOne({
|
|
42
|
+
where: { business_id: businessId, notification_type_id: typeId, channel_id: request.channel },
|
|
43
|
+
});
|
|
44
|
+
if (!row)
|
|
45
|
+
return null;
|
|
46
|
+
return row.active;
|
|
47
|
+
}
|
|
48
|
+
async matchUsers(businessId, request) {
|
|
49
|
+
const recipients = this.knownRecipients(request);
|
|
50
|
+
const addresses = [...new Set(recipients.filter((r) => !r.user_ids.length).map((r) => r.address.trim().toLowerCase()))];
|
|
51
|
+
if (!addresses.length)
|
|
52
|
+
return recipients;
|
|
53
|
+
const rows = await business_user_entity_1.BusinessUserEntity.query(`select distinct lower(u.email) as email, u.id as user_id
|
|
54
|
+
from bz_business_users bu
|
|
55
|
+
join sys_users u on u.id = bu.user_id and u.deleted_at is null
|
|
56
|
+
where bu.business_id = $1 and bu.active = true and bu.deleted_at is null
|
|
57
|
+
and lower(u.email) = any($2)`, [businessId, addresses]);
|
|
58
|
+
const byAddress = new Map();
|
|
59
|
+
for (const row of rows || [])
|
|
60
|
+
byAddress.set(row.email, [...(byAddress.get(row.email) || []), Number(row.user_id)]);
|
|
61
|
+
return recipients.map((r) => {
|
|
62
|
+
if (r.user_ids.length)
|
|
63
|
+
return r;
|
|
64
|
+
return { ...r, user_ids: byAddress.get(r.address.trim().toLowerCase()) || [] };
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
async getUserOptOuts(businessId, typeId, request, recipients) {
|
|
68
|
+
const userIds = [...new Set(recipients.flatMap((r) => r.user_ids))];
|
|
69
|
+
if (!userIds.length)
|
|
70
|
+
return new Set();
|
|
71
|
+
const rows = await user_notification_type_preference_entity_1.UserNotificationTypePreferenceEntity.find({
|
|
72
|
+
where: { business_id: businessId, notification_type_id: typeId, channel_id: request.channel, active: false, user_id: (0, typeorm_1.In)(userIds) },
|
|
73
|
+
});
|
|
74
|
+
return new Set((rows || []).map((r) => Number(r.user_id)));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.LoadNotificationPreferenceContext = LoadNotificationPreferenceContext;
|
|
78
|
+
//# sourceMappingURL=load.notification.preference.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.notification.preference.context.js","sourceRoot":"","sources":["../../../src/access/libraries/load.notification.preference.context.ts"],"names":[],"mappings":";;;AAAA,qCAA6B;AAC7B,2HAAoH;AACpH,2EAAsE;AACtE,mHAA4G;AAC5G,4FAAsF;AAKtF,+EAA0E;AAS1E,MAAa,iCAAiC;IAS1C,KAAK,CAAC,OAAO,CAAC,OAA+C;QACzD,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;QACzC,MAAM,IAAI,GAAG,MAAM,IAAI,uDAAyB,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAE7E,MAAM,OAAO,GAAgD;YACzD,IAAI;YACJ,OAAO;YACP,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,IAAI,CAAC,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guedNotificationTypeInterface } from '../interfaces/catalogued.notification.type.interface';
|
|
2
|
+
import { NotificationSendIdentifiersInterface } from '../interfaces/notification.send.identifiers.interface';
|
|
3
|
+
export declare class NotificationTypeCatalogue {
|
|
4
|
+
static readonly TTL: number;
|
|
5
|
+
private static loading;
|
|
6
|
+
private static loadedAt;
|
|
7
|
+
static clear(): void;
|
|
8
|
+
find(identifiers: NotificationSendIdentifiersInterface): Promise<CataloguedNotificationTypeInterface | null>;
|
|
9
|
+
private getIndex;
|
|
10
|
+
private load;
|
|
11
|
+
private add;
|
|
12
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationTypeCatalogue = void 0;
|
|
4
|
+
const notification_type_entity_1 = require("../entities/notification.type.entity");
|
|
5
|
+
class NotificationTypeCatalogue {
|
|
6
|
+
static clear() {
|
|
7
|
+
NotificationTypeCatalogue.loading = null;
|
|
8
|
+
NotificationTypeCatalogue.loadedAt = 0;
|
|
9
|
+
}
|
|
10
|
+
async find(identifiers) {
|
|
11
|
+
const keys = [
|
|
12
|
+
['type', identifiers?.type],
|
|
13
|
+
['notification', identifiers?.notification],
|
|
14
|
+
['email_template', identifiers?.email_template],
|
|
15
|
+
['email_notification', identifiers?.email_notification],
|
|
16
|
+
].filter(([, value]) => !!value);
|
|
17
|
+
if (!keys.length)
|
|
18
|
+
return null;
|
|
19
|
+
const index = await this.getIndex();
|
|
20
|
+
for (const [kind, value] of keys) {
|
|
21
|
+
const type = index.get(`${kind}:${value}`);
|
|
22
|
+
if (type)
|
|
23
|
+
return type;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
getIndex() {
|
|
28
|
+
const fresh = Date.now() - NotificationTypeCatalogue.loadedAt < NotificationTypeCatalogue.TTL;
|
|
29
|
+
if (NotificationTypeCatalogue.loading && fresh)
|
|
30
|
+
return NotificationTypeCatalogue.loading;
|
|
31
|
+
const loading = this.load();
|
|
32
|
+
NotificationTypeCatalogue.loading = loading;
|
|
33
|
+
NotificationTypeCatalogue.loadedAt = Date.now();
|
|
34
|
+
loading.catch(() => {
|
|
35
|
+
if (NotificationTypeCatalogue.loading === loading)
|
|
36
|
+
NotificationTypeCatalogue.clear();
|
|
37
|
+
});
|
|
38
|
+
return loading;
|
|
39
|
+
}
|
|
40
|
+
async load() {
|
|
41
|
+
const rows = await notification_type_entity_1.NotificationTypeEntity.find({ order: { id: 'ASC' } });
|
|
42
|
+
const index = new Map();
|
|
43
|
+
for (const row of rows) {
|
|
44
|
+
const type = {
|
|
45
|
+
id: row.id,
|
|
46
|
+
identifier: row.identifier,
|
|
47
|
+
audience: row.audience,
|
|
48
|
+
control: row.control,
|
|
49
|
+
channels: row.channels || [],
|
|
50
|
+
active: row.active,
|
|
51
|
+
};
|
|
52
|
+
index.set(`type:${row.identifier}`, type);
|
|
53
|
+
const sources = row.sources || {};
|
|
54
|
+
for (const value of sources.notification_identifiers || [])
|
|
55
|
+
this.add(index, `notification:${value}`, type);
|
|
56
|
+
for (const value of sources.email_templates || [])
|
|
57
|
+
this.add(index, `email_template:${value}`, type);
|
|
58
|
+
for (const value of sources.email_notification_identifiers || [])
|
|
59
|
+
this.add(index, `email_notification:${value}`, type);
|
|
60
|
+
}
|
|
61
|
+
return index;
|
|
62
|
+
}
|
|
63
|
+
add(index, key, type) {
|
|
64
|
+
if (!index.has(key))
|
|
65
|
+
index.set(key, type);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.NotificationTypeCatalogue = NotificationTypeCatalogue;
|
|
69
|
+
NotificationTypeCatalogue.TTL = 5 * 60 * 1000;
|
|
70
|
+
NotificationTypeCatalogue.loading = null;
|
|
71
|
+
NotificationTypeCatalogue.loadedAt = 0;
|
|
72
|
+
//# sourceMappingURL=notification.type.catalogue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.type.catalogue.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B,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;YACpG,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,8BAA8B,IAAI,EAAE;gBAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,sBAAsB,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;QAC3H,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAQO,GAAG,CAAC,KAAuD,EAAE,GAAW,EAAE,IAAyC;QACvH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;;AA7FL,8DA8FC;AA5FmB,6BAAG,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAErB,iCAAO,GAAqE,IAAI,CAAC;AACjF,kCAAQ,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentBusinessProperty = void 0;
|
|
4
|
+
class PresentBusinessProperty {
|
|
5
|
+
static process(property) {
|
|
6
|
+
const plain = { ...property };
|
|
7
|
+
if (plain.is_encrypted)
|
|
8
|
+
plain.value = null;
|
|
9
|
+
return plain;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.PresentBusinessProperty = PresentBusinessProperty;
|
|
13
|
+
//# sourceMappingURL=present.business.property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"present.business.property.js","sourceRoot":"","sources":["../../../src/access/libraries/present.business.property.ts"],"names":[],"mappings":";;;AAMA,MAAa,uBAAuB;IAKhC,MAAM,CAAC,OAAO,CAAC,QAAgC;QAC3C,MAAM,KAAK,GAAwB,EAAE,GAAG,QAAQ,EAAE,CAAC;QACnD,IAAI,KAAK,CAAC,YAAY;YAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;QAE3C,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAXD,0DAWC"}
|
|
@@ -54,7 +54,8 @@ class ProcessApplicationMenu {
|
|
|
54
54
|
const businessMenus = await business_menu_entity_1.BusinessMenuEntity.find({ where: { business_id: this.business.id } });
|
|
55
55
|
this.hasBusinessMenus = businessMenus.length > 0;
|
|
56
56
|
const layout = await business_menu_layout_entity_1.BusinessMenuLayoutEntity.findOne({ where: { business_id: this.business.id, product_id: this.product.id } });
|
|
57
|
-
const hiddenMenuIds =
|
|
57
|
+
const hiddenMenuIds = layout?.attributes?.hidden_menu_ids || [];
|
|
58
|
+
const inactiveMenuIds = businessMenus.filter((businessMenu) => !businessMenu.active).map((businessMenu) => businessMenu.menu_id);
|
|
58
59
|
for (const businessMenu of businessMenus) {
|
|
59
60
|
if (!businessMenu.active)
|
|
60
61
|
continue;
|
|
@@ -70,11 +71,9 @@ class ProcessApplicationMenu {
|
|
|
70
71
|
const menus = [];
|
|
71
72
|
const moduleMenus = nestjs_utility_services_1.ClassMapper.removeArrayWhoColumns(module?.module_menus) || [];
|
|
72
73
|
for (const module_menu of moduleMenus) {
|
|
73
|
-
if (this.hasBusinessMenus)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
else if (hiddenMenuIds.includes(module_menu.menu_id))
|
|
74
|
+
if (this.hasBusinessMenus && !this.availableMenusIds.includes(module_menu.menu_id))
|
|
75
|
+
continue;
|
|
76
|
+
if (hiddenMenuIds.includes(module_menu.menu_id))
|
|
78
77
|
continue;
|
|
79
78
|
const menu = { ...nestjs_utility_services_1.ClassMapper.removeWhoColumns(module_menu.menu), display_order: module_menu.display_order };
|
|
80
79
|
menu.ui_action = nestjs_utility_services_1.ClassMapper.removeArrayWhoColumns(menu.ui_action);
|
|
@@ -83,7 +82,7 @@ class ProcessApplicationMenu {
|
|
|
83
82
|
for (const child_menu of child_menus) {
|
|
84
83
|
if (menuIds.indexOf(child_menu.menu_id) !== -1)
|
|
85
84
|
continue;
|
|
86
|
-
if (hiddenMenuIds.includes(child_menu.menu_id))
|
|
85
|
+
if (hiddenMenuIds.includes(child_menu.menu_id) || inactiveMenuIds.includes(child_menu.menu_id))
|
|
87
86
|
continue;
|
|
88
87
|
const cmenu = { ...nestjs_utility_services_1.ClassMapper.removeWhoColumns(child_menu.menu), display_order: menu.display_order };
|
|
89
88
|
cmenu.ui_action = nestjs_utility_services_1.ClassMapper.removeWhoColumns(child_menu.menu.ui_action);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.application.menu.js","sourceRoot":"","sources":["../../../src/access/libraries/process.application.menu.ts"],"names":[],"mappings":";;;AAAA,oFAAkG;AAGlG,uCAAsC;AACtC,6DAAyD;AACzD,qCAAiC;AACjC,2EAAsE;AACtE,yFAAmF;AACnF,2DAAsD;AAMtD,MAAa,sBAAsB;IAY/B,YACqB,YAA0B,EAC1B,aAA4B,EAC5B,QAA8B,EAC9B,OAAsB;QAHtB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;QAC5B,aAAQ,GAAR,QAAQ,CAAsB;QAC9B,YAAO,GAAP,OAAO,CAAe;QAfnC,sBAAiB,GAAa,EAAE,CAAC;QACjC,qBAAgB,GAAG,KAAK,CAAC;IAe9B,CAAC;IAMJ,KAAK,CAAC,OAAO;QACT,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAA,qBAAU,EAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAE7E,OAAO,KAAK,CAAC;IACjB,CAAC;IAOO,KAAK,CAAC,aAAa;QACvB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,EAAE,CAAC;QAEhB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACvB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QACH,OAAO;YACH,OAAO,EAAE,IAAI;SAChB,CAAC;IACN,CAAC;IAOO,KAAK,CAAC,WAAW;QACrB,MAAM,KAAK,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QAC5D,MAAM,SAAS,GAAG;YACd,WAAW;YACX,cAAc;YACd,mBAAmB;YACnB,6BAA6B;YAC7B,yBAAyB;YACzB,+BAA+B;YAC/B,oCAAoC;YACpC,8CAA8C;YAC9C,0CAA0C;SAC7C,CAAC;QAEF,IAAI,OAAO,GAAG,MAAM,4BAAY,CAAC,IAAI,CAAC;YAClC,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,IAAA,gBAAM,GAAE,EAAE;YAC1C,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE;YAC/B,SAAS;SACZ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"process.application.menu.js","sourceRoot":"","sources":["../../../src/access/libraries/process.application.menu.ts"],"names":[],"mappings":";;;AAAA,oFAAkG;AAGlG,uCAAsC;AACtC,6DAAyD;AACzD,qCAAiC;AACjC,2EAAsE;AACtE,yFAAmF;AACnF,2DAAsD;AAMtD,MAAa,sBAAsB;IAY/B,YACqB,YAA0B,EAC1B,aAA4B,EAC5B,QAA8B,EAC9B,OAAsB;QAHtB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;QAC5B,aAAQ,GAAR,QAAQ,CAAsB;QAC9B,YAAO,GAAP,OAAO,CAAe;QAfnC,sBAAiB,GAAa,EAAE,CAAC;QACjC,qBAAgB,GAAG,KAAK,CAAC;IAe9B,CAAC;IAMJ,KAAK,CAAC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AI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;oBAAE,SAAS;gBAE9C,OAAO,IAAI,CAAC,WAAW,CAAC;gBACxB,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;oBACX,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACjB,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACtC,CAAC;YACL,CAAC;YAED,MAAM,aAAa,GAAG,EAAE,CAAC;YAEzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACvB,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;oBACrB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC;wBAAE,SAAS;gBACrE,CAAC;gBAED,OAAO,IAAI,CAAC,KAAK,CAAC;gBAClB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7B,CAAC;YAED,GAAG,CAAC,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC;YAC5E,OAAO,GAAG,CAAC,YAAY,CAAC;YAExB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,mCAAe,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;CACJ;AAhJD,wDAgJC"}
|
|
@@ -4,11 +4,17 @@ import { AccessBusinessEntity } from '../entities/access.business.entity';
|
|
|
4
4
|
import { BusinessPropertyEntity } from '../entities/business.property.entity';
|
|
5
5
|
export declare class ProcessBusinessPropertyData extends ProcessCommonData {
|
|
6
6
|
private readonly business;
|
|
7
|
+
static readonly IDENTIFIER: RegExp;
|
|
7
8
|
protected payload: AddBusinessPropertyDto;
|
|
8
9
|
protected allowedColumns: string[];
|
|
10
|
+
private entity;
|
|
9
11
|
constructor(business: AccessBusinessEntity);
|
|
10
12
|
process(payload: AddBusinessPropertyDto): Promise<BusinessPropertyEntity>;
|
|
13
|
+
private getEntity;
|
|
11
14
|
private set;
|
|
12
15
|
private validate;
|
|
16
|
+
private validateRequired;
|
|
17
|
+
private validateEncryption;
|
|
18
|
+
private validateValueType;
|
|
13
19
|
private validateIdentifier;
|
|
14
20
|
}
|