rez_core 3.1.167 → 3.1.169
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/app.controller.d.ts +6 -0
- package/dist/app.controller.js +34 -0
- package/dist/app.controller.js.map +1 -0
- package/dist/app.module.d.ts +2 -0
- package/dist/app.module.js +62 -0
- package/dist/app.module.js.map +1 -0
- package/dist/app.service.d.ts +3 -0
- package/dist/app.service.js +20 -0
- package/dist/app.service.js.map +1 -0
- package/dist/config/config.module.d.ts +2 -0
- package/dist/config/config.module.js +29 -0
- package/dist/config/config.module.js.map +1 -0
- package/dist/config/database.config.d.ts +7 -0
- package/dist/config/database.config.js +39 -0
- package/dist/config/database.config.js.map +1 -0
- package/dist/constant/global.constant.d.ts +50 -0
- package/dist/constant/global.constant.js +54 -0
- package/dist/constant/global.constant.js.map +1 -0
- package/dist/core.module.d.ts +4 -0
- package/dist/core.module.js +79 -0
- package/dist/core.module.js.map +1 -0
- package/dist/decorators/roles.decorator.d.ts +1 -0
- package/dist/decorators/roles.decorator.js +7 -0
- package/dist/decorators/roles.decorator.js.map +1 -0
- package/dist/dtos/response.d.ts +5 -0
- package/dist/dtos/response.dto.d.ts +5 -0
- package/dist/dtos/response.dto.js +3 -0
- package/dist/dtos/response.dto.js.map +1 -0
- package/dist/dtos/response.js +3 -0
- package/dist/dtos/response.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +25 -0
- package/dist/main.js.map +1 -0
- package/dist/module/auth/auth.module.d.ts +2 -0
- package/dist/module/auth/auth.module.js +57 -0
- package/dist/module/auth/auth.module.js.map +1 -0
- package/dist/module/auth/controller/auth.controller.d.ts +8 -0
- package/dist/module/auth/controller/auth.controller.js +51 -0
- package/dist/module/auth/controller/auth.controller.js.map +1 -0
- package/dist/module/auth/guards/google-auth.guard.d.ts +6 -0
- package/dist/module/auth/guards/google-auth.guard.js +21 -0
- package/dist/module/auth/guards/google-auth.guard.js.map +1 -0
- package/dist/module/auth/guards/jwt.guard.d.ts +10 -0
- package/dist/module/auth/guards/jwt.guard.js +36 -0
- package/dist/module/auth/guards/jwt.guard.js.map +1 -0
- package/dist/module/auth/guards/role.guard.d.ts +9 -0
- package/dist/module/auth/guards/role.guard.js +59 -0
- package/dist/module/auth/guards/role.guard.js.map +1 -0
- package/dist/module/auth/services/auth.service.d.ts +14 -0
- package/dist/module/auth/services/auth.service.js +39 -0
- package/dist/module/auth/services/auth.service.js.map +1 -0
- package/dist/module/auth/services/jwt.service.d.ts +6 -0
- package/dist/module/auth/services/jwt.service.js +28 -0
- package/dist/module/auth/services/jwt.service.js.map +1 -0
- package/dist/module/auth/strategies/google.strategy.d.ts +10 -0
- package/dist/module/auth/strategies/google.strategy.js +59 -0
- package/dist/module/auth/strategies/google.strategy.js.map +1 -0
- package/dist/module/auth/strategies/jwt.strategy.d.ts +19 -0
- package/dist/module/auth/strategies/jwt.strategy.js +46 -0
- package/dist/module/auth/strategies/jwt.strategy.js.map +1 -0
- package/dist/module/auth/strategies/local.strategy.d.ts +7 -0
- package/dist/module/auth/strategies/local.strategy.js +30 -0
- package/dist/module/auth/strategies/local.strategy.js.map +1 -0
- package/dist/module/dashboard/controller/dashboard.controller.d.ts +33 -0
- package/dist/module/dashboard/controller/dashboard.controller.js +55 -0
- package/dist/module/dashboard/controller/dashboard.controller.js.map +1 -0
- package/dist/module/dashboard/dashboard.module.d.ts +2 -0
- package/dist/module/dashboard/dashboard.module.js +34 -0
- package/dist/module/dashboard/dashboard.module.js.map +1 -0
- package/dist/module/dashboard/entity/dashboard_page_data.entity.d.ts +10 -0
- package/dist/module/dashboard/entity/dashboard_page_data.entity.js +50 -0
- package/dist/module/dashboard/entity/dashboard_page_data.entity.js.map +1 -0
- package/dist/module/dashboard/entity/widget_master.entity.d.ts +7 -0
- package/dist/module/dashboard/entity/widget_master.entity.js +38 -0
- package/dist/module/dashboard/entity/widget_master.entity.js.map +1 -0
- package/dist/module/dashboard/repository/dashboard.repository.d.ts +10 -0
- package/dist/module/dashboard/repository/dashboard.repository.js +50 -0
- package/dist/module/dashboard/repository/dashboard.repository.js.map +1 -0
- package/dist/module/dashboard/service/dashboard.service.d.ts +35 -0
- package/dist/module/dashboard/service/dashboard.service.js +62 -0
- package/dist/module/dashboard/service/dashboard.service.js.map +1 -0
- package/dist/module/dev/dev.module.d.ts +2 -0
- package/dist/module/dev/dev.module.js +25 -0
- package/dist/module/dev/dev.module.js.map +1 -0
- package/dist/module/dev/service/dev.service.d.ts +5 -0
- package/dist/module/dev/service/dev.service.js +25 -0
- package/dist/module/dev/service/dev.service.js.map +1 -0
- package/dist/module/enterprise/controller/organization.controller.d.ts +14 -0
- package/dist/module/enterprise/controller/organization.controller.js +59 -0
- package/dist/module/enterprise/controller/organization.controller.js.map +1 -0
- package/dist/module/enterprise/enterprise.module.d.ts +2 -0
- package/dist/module/enterprise/enterprise.module.js +43 -0
- package/dist/module/enterprise/enterprise.module.js.map +1 -0
- package/dist/module/enterprise/entity/enterprise.entity.d.ts +13 -0
- package/dist/module/enterprise/entity/enterprise.entity.js +64 -0
- package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -0
- package/dist/module/enterprise/entity/organization-app-mapping.entity.d.ts +5 -0
- package/dist/module/enterprise/entity/organization-app-mapping.entity.js +32 -0
- package/dist/module/enterprise/entity/organization-app-mapping.entity.js.map +1 -0
- package/dist/module/enterprise/entity/organization.entity.d.ts +30 -0
- package/dist/module/enterprise/entity/organization.entity.js +136 -0
- package/dist/module/enterprise/entity/organization.entity.js.map +1 -0
- package/dist/module/enterprise/repository/enterprise.repository.d.ts +8 -0
- package/dist/module/enterprise/repository/enterprise.repository.js +48 -0
- package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -0
- package/dist/module/enterprise/repository/organization.repository.d.ts +8 -0
- package/dist/module/enterprise/repository/organization.repository.js +41 -0
- package/dist/module/enterprise/repository/organization.repository.js.map +1 -0
- package/dist/module/enterprise/repository/school.repository.d.ts +8 -0
- package/dist/module/enterprise/repository/school.repository.js +244 -0
- package/dist/module/enterprise/repository/school.repository.js.map +1 -0
- package/dist/module/enterprise/service/brand.service.d.ts +3 -0
- package/dist/module/enterprise/service/brand.service.js +18 -0
- package/dist/module/enterprise/service/brand.service.js.map +1 -0
- package/dist/module/enterprise/service/enterprise.service.d.ts +8 -0
- package/dist/module/enterprise/service/enterprise.service.js +31 -0
- package/dist/module/enterprise/service/enterprise.service.js.map +1 -0
- package/dist/module/enterprise/service/organization-app-mapping.service.d.ts +2 -0
- package/dist/module/enterprise/service/organization-app-mapping.service.js +17 -0
- package/dist/module/enterprise/service/organization-app-mapping.service.js.map +1 -0
- package/dist/module/enterprise/service/organization.service.d.ts +19 -0
- package/dist/module/enterprise/service/organization.service.js +121 -0
- package/dist/module/enterprise/service/organization.service.js.map +1 -0
- package/dist/module/filter/controller/filter.controller.d.ts +39 -0
- package/dist/module/filter/controller/filter.controller.js +91 -0
- package/dist/module/filter/controller/filter.controller.js.map +1 -0
- package/dist/module/filter/dto/filter-request.dto.d.ts +35 -0
- package/dist/module/filter/dto/filter-request.dto.js +3 -0
- package/dist/module/filter/dto/filter-request.dto.js.map +1 -0
- package/dist/module/filter/entity/saved-filter-detail.entity.d.ts +14 -0
- package/dist/module/filter/entity/saved-filter-detail.entity.js +67 -0
- package/dist/module/filter/entity/saved-filter-detail.entity.js.map +1 -0
- package/dist/module/filter/entity/saved-filter-master.entity.d.ts +8 -0
- package/dist/module/filter/entity/saved-filter-master.entity.js +43 -0
- package/dist/module/filter/entity/saved-filter-master.entity.js.map +1 -0
- package/dist/module/filter/filter.module.d.ts +2 -0
- package/dist/module/filter/filter.module.js +44 -0
- package/dist/module/filter/filter.module.js.map +1 -0
- package/dist/module/filter/repository/saved-filter.repository.d.ts +40 -0
- package/dist/module/filter/repository/saved-filter.repository.js +144 -0
- package/dist/module/filter/repository/saved-filter.repository.js.map +1 -0
- package/dist/module/filter/service/filter-evaluator.service.d.ts +9 -0
- package/dist/module/filter/service/filter-evaluator.service.js +62 -0
- package/dist/module/filter/service/filter-evaluator.service.js.map +1 -0
- package/dist/module/filter/service/filter.service.d.ts +68 -0
- package/dist/module/filter/service/filter.service.js +612 -0
- package/dist/module/filter/service/filter.service.js.map +1 -0
- package/dist/module/filter/service/saved-filter.service.d.ts +30 -0
- package/dist/module/filter/service/saved-filter.service.js +125 -0
- package/dist/module/filter/service/saved-filter.service.js.map +1 -0
- package/dist/module/ics/controller/ics.controller.d.ts +8 -0
- package/dist/module/ics/controller/ics.controller.js +45 -0
- package/dist/module/ics/controller/ics.controller.js.map +1 -0
- package/dist/module/ics/dto/ics.dto.d.ts +17 -0
- package/dist/module/ics/dto/ics.dto.js +73 -0
- package/dist/module/ics/dto/ics.dto.js.map +1 -0
- package/dist/module/ics/ics.module.d.ts +2 -0
- package/dist/module/ics/ics.module.js +26 -0
- package/dist/module/ics/ics.module.js.map +1 -0
- package/dist/module/ics/service/ics.service.d.ts +4 -0
- package/dist/module/ics/service/ics.service.js +61 -0
- package/dist/module/ics/service/ics.service.js.map +1 -0
- package/dist/module/integration/controller/calender-event.controller.d.ts +7 -0
- package/dist/module/integration/controller/calender-event.controller.js +51 -0
- package/dist/module/integration/controller/calender-event.controller.js.map +1 -0
- package/dist/module/integration/controller/integration.controller.d.ts +165 -0
- package/dist/module/integration/controller/integration.controller.js +697 -0
- package/dist/module/integration/controller/integration.controller.js.map +1 -0
- package/dist/module/integration/controller/wrapper.controller.d.ts +23 -0
- package/dist/module/integration/controller/wrapper.controller.js +54 -0
- package/dist/module/integration/controller/wrapper.controller.js.map +1 -0
- package/dist/module/integration/dto/create-config.dto.d.ts +217 -0
- package/dist/module/integration/dto/create-config.dto.js +495 -0
- package/dist/module/integration/dto/create-config.dto.js.map +1 -0
- package/dist/module/integration/entity/integration-config.entity.d.ts +54 -0
- package/dist/module/integration/entity/integration-config.entity.js +78 -0
- package/dist/module/integration/entity/integration-config.entity.js.map +1 -0
- package/dist/module/integration/entity/integration-entity-mapper.entity.d.ts +6 -0
- package/dist/module/integration/entity/integration-entity-mapper.entity.js +33 -0
- package/dist/module/integration/entity/integration-entity-mapper.entity.js.map +1 -0
- package/dist/module/integration/entity/integration-source.entity.d.ts +7 -0
- package/dist/module/integration/entity/integration-source.entity.js +37 -0
- package/dist/module/integration/entity/integration-source.entity.js.map +1 -0
- package/dist/module/integration/entity/user-integration.entity.d.ts +23 -0
- package/dist/module/integration/entity/user-integration.entity.js +70 -0
- package/dist/module/integration/entity/user-integration.entity.js.map +1 -0
- package/dist/module/integration/examples/usage.example.d.ts +16 -0
- package/dist/module/integration/examples/usage.example.js +217 -0
- package/dist/module/integration/examples/usage.example.js.map +1 -0
- package/dist/module/integration/factories/base.factory.d.ts +9 -0
- package/dist/module/integration/factories/base.factory.js +3 -0
- package/dist/module/integration/factories/base.factory.js.map +1 -0
- package/dist/module/integration/factories/email.factory.d.ts +17 -0
- package/dist/module/integration/factories/email.factory.js +55 -0
- package/dist/module/integration/factories/email.factory.js.map +1 -0
- package/dist/module/integration/factories/integration.factory.d.ts +33 -0
- package/dist/module/integration/factories/integration.factory.js +104 -0
- package/dist/module/integration/factories/integration.factory.js.map +1 -0
- package/dist/module/integration/factories/sms.factory.d.ts +17 -0
- package/dist/module/integration/factories/sms.factory.js +58 -0
- package/dist/module/integration/factories/sms.factory.js.map +1 -0
- package/dist/module/integration/factories/telephone.factory.d.ts +15 -0
- package/dist/module/integration/factories/telephone.factory.js +49 -0
- package/dist/module/integration/factories/telephone.factory.js.map +1 -0
- package/dist/module/integration/factories/whatsapp.factory.d.ts +19 -0
- package/dist/module/integration/factories/whatsapp.factory.js +63 -0
- package/dist/module/integration/factories/whatsapp.factory.js.map +1 -0
- package/dist/module/integration/integration.module.d.ts +2 -0
- package/dist/module/integration/integration.module.js +96 -0
- package/dist/module/integration/integration.module.js.map +1 -0
- package/dist/module/integration/service/calendar-event.service.d.ts +8 -0
- package/dist/module/integration/service/calendar-event.service.js +101 -0
- package/dist/module/integration/service/calendar-event.service.js.map +1 -0
- package/dist/module/integration/service/integration-entity-mapper.service.d.ts +7 -0
- package/dist/module/integration/service/integration-entity-mapper.service.js +36 -0
- package/dist/module/integration/service/integration-entity-mapper.service.js.map +1 -0
- package/dist/module/integration/service/integration-queue.service.d.ts +40 -0
- package/dist/module/integration/service/integration-queue.service.js +147 -0
- package/dist/module/integration/service/integration-queue.service.js.map +1 -0
- package/dist/module/integration/service/integration.service.d.ts +198 -0
- package/dist/module/integration/service/integration.service.js +1558 -0
- package/dist/module/integration/service/integration.service.js.map +1 -0
- package/dist/module/integration/service/oauth.service.d.ts +18 -0
- package/dist/module/integration/service/oauth.service.js +190 -0
- package/dist/module/integration/service/oauth.service.js.map +1 -0
- package/dist/module/integration/service/wrapper.service.d.ts +36 -0
- package/dist/module/integration/service/wrapper.service.js +299 -0
- package/dist/module/integration/service/wrapper.service.js.map +1 -0
- package/dist/module/integration/strategies/email/gmail-api.strategy.d.ts +13 -0
- package/dist/module/integration/strategies/email/gmail-api.strategy.js +195 -0
- package/dist/module/integration/strategies/email/gmail-api.strategy.js.map +1 -0
- package/dist/module/integration/strategies/email/outlook-api.strategy.d.ts +5 -0
- package/dist/module/integration/strategies/email/outlook-api.strategy.js +44 -0
- package/dist/module/integration/strategies/email/outlook-api.strategy.js.map +1 -0
- package/dist/module/integration/strategies/email/outlook.strategy.d.ts +5 -0
- package/dist/module/integration/strategies/email/outlook.strategy.js +64 -0
- package/dist/module/integration/strategies/email/outlook.strategy.js.map +1 -0
- package/dist/module/integration/strategies/email/sendgrid-api.strategy.d.ts +22 -0
- package/dist/module/integration/strategies/email/sendgrid-api.strategy.js +203 -0
- package/dist/module/integration/strategies/email/sendgrid-api.strategy.js.map +1 -0
- package/dist/module/integration/strategies/integration.strategy.d.ts +31 -0
- package/dist/module/integration/strategies/integration.strategy.js +40 -0
- package/dist/module/integration/strategies/integration.strategy.js.map +1 -0
- package/dist/module/integration/strategies/sms/gupshup-sms.strategy.d.ts +9 -0
- package/dist/module/integration/strategies/sms/gupshup-sms.strategy.js +104 -0
- package/dist/module/integration/strategies/sms/gupshup-sms.strategy.js.map +1 -0
- package/dist/module/integration/strategies/sms/msg91-sms.strategy.d.ts +9 -0
- package/dist/module/integration/strategies/sms/msg91-sms.strategy.js +113 -0
- package/dist/module/integration/strategies/sms/msg91-sms.strategy.js.map +1 -0
- package/dist/module/integration/strategies/sms/tubelight-sms.strategy.d.ts +9 -0
- package/dist/module/integration/strategies/sms/tubelight-sms.strategy.js +109 -0
- package/dist/module/integration/strategies/sms/tubelight-sms.strategy.js.map +1 -0
- package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.d.ts +22 -0
- package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.js +170 -0
- package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.js.map +1 -0
- package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.d.ts +24 -0
- package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.js +152 -0
- package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.js.map +1 -0
- package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.d.ts +19 -0
- package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.js +257 -0
- package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.js.map +1 -0
- package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.d.ts +33 -0
- package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.js +256 -0
- package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.js.map +1 -0
- package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.d.ts +20 -0
- package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.js +264 -0
- package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.js.map +1 -0
- package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.d.ts +5 -0
- package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.js +57 -0
- package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.js.map +1 -0
- package/dist/module/layout/controller/layout.controller.d.ts +11 -0
- package/dist/module/layout/controller/layout.controller.js +59 -0
- package/dist/module/layout/controller/layout.controller.js.map +1 -0
- package/dist/module/layout/dto/header.dto.d.ts +0 -0
- package/dist/module/layout/dto/header.dto.js +1 -0
- package/dist/module/layout/dto/header.dto.js.map +1 -0
- package/dist/module/layout/entity/header-items.entity.d.ts +10 -0
- package/dist/module/layout/entity/header-items.entity.js +52 -0
- package/dist/module/layout/entity/header-items.entity.js.map +1 -0
- package/dist/module/layout/entity/header-section.entity.d.ts +7 -0
- package/dist/module/layout/entity/header-section.entity.js +40 -0
- package/dist/module/layout/entity/header-section.entity.js.map +1 -0
- package/dist/module/layout/layout.module.d.ts +2 -0
- package/dist/module/layout/layout.module.js +34 -0
- package/dist/module/layout/layout.module.js.map +1 -0
- package/dist/module/layout/repository/header-items.repository.d.ts +7 -0
- package/dist/module/layout/repository/header-items.repository.js +36 -0
- package/dist/module/layout/repository/header-items.repository.js.map +1 -0
- package/dist/module/layout/repository/header-section.repository.d.ts +8 -0
- package/dist/module/layout/repository/header-section.repository.js +39 -0
- package/dist/module/layout/repository/header-section.repository.js.map +1 -0
- package/dist/module/layout/service/header-section.service.d.ts +8 -0
- package/dist/module/layout/service/header-section.service.js +37 -0
- package/dist/module/layout/service/header-section.service.js.map +1 -0
- package/dist/module/layout_preference/controller/layout_preference.controller.d.ts +13 -0
- package/dist/module/layout_preference/controller/layout_preference.controller.js +59 -0
- package/dist/module/layout_preference/controller/layout_preference.controller.js.map +1 -0
- package/dist/module/layout_preference/dto/layout_preference.dto.d.ts +0 -0
- package/dist/module/layout_preference/dto/layout_preference.dto.js +1 -0
- package/dist/module/layout_preference/dto/layout_preference.dto.js.map +1 -0
- package/dist/module/layout_preference/entity/layout_preference.entity.d.ts +9 -0
- package/dist/module/layout_preference/entity/layout_preference.entity.js +50 -0
- package/dist/module/layout_preference/entity/layout_preference.entity.js.map +1 -0
- package/dist/module/layout_preference/layout_preference.module.d.ts +2 -0
- package/dist/module/layout_preference/layout_preference.module.js +31 -0
- package/dist/module/layout_preference/layout_preference.module.js.map +1 -0
- package/dist/module/layout_preference/repository/layout_preference.repository.d.ts +7 -0
- package/dist/module/layout_preference/repository/layout_preference.repository.js +42 -0
- package/dist/module/layout_preference/repository/layout_preference.repository.js.map +1 -0
- package/dist/module/layout_preference/service/layout_preference.service.d.ts +16 -0
- package/dist/module/layout_preference/service/layout_preference.service.js +117 -0
- package/dist/module/layout_preference/service/layout_preference.service.js.map +1 -0
- package/dist/module/lead/controller/lead.controller.d.ts +20 -0
- package/dist/module/lead/controller/lead.controller.js +58 -0
- package/dist/module/lead/controller/lead.controller.js.map +1 -0
- package/dist/module/lead/lead.module.d.ts +2 -0
- package/dist/module/lead/lead.module.js +26 -0
- package/dist/module/lead/lead.module.js.map +1 -0
- package/dist/module/lead/repository/lead.repository.d.ts +10 -0
- package/dist/module/lead/repository/lead.repository.js +53 -0
- package/dist/module/lead/repository/lead.repository.js.map +1 -0
- package/dist/module/lead/service/lead.service.d.ts +20 -0
- package/dist/module/lead/service/lead.service.js +55 -0
- package/dist/module/lead/service/lead.service.js.map +1 -0
- package/dist/module/listmaster/controller/list-master.controller.d.ts +22 -0
- package/dist/module/listmaster/controller/list-master.controller.js +156 -0
- package/dist/module/listmaster/controller/list-master.controller.js.map +1 -0
- package/dist/module/listmaster/entity/list-master-items.entity.d.ts +14 -0
- package/dist/module/listmaster/entity/list-master-items.entity.js +67 -0
- package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -0
- package/dist/module/listmaster/entity/list-master.entity.d.ts +11 -0
- package/dist/module/listmaster/entity/list-master.entity.js +55 -0
- package/dist/module/listmaster/entity/list-master.entity.js.map +1 -0
- package/dist/module/listmaster/listmaster.module.d.ts +2 -0
- package/dist/module/listmaster/listmaster.module.js +53 -0
- package/dist/module/listmaster/listmaster.module.js.map +1 -0
- package/dist/module/listmaster/repository/list-master-items.repository.d.ts +21 -0
- package/dist/module/listmaster/repository/list-master-items.repository.js +142 -0
- package/dist/module/listmaster/repository/list-master-items.repository.js.map +1 -0
- package/dist/module/listmaster/repository/list-master.repository.d.ts +9 -0
- package/dist/module/listmaster/repository/list-master.repository.js +53 -0
- package/dist/module/listmaster/repository/list-master.repository.js.map +1 -0
- package/dist/module/listmaster/service/list-master-engine.d.ts +6 -0
- package/dist/module/listmaster/service/list-master-engine.js +35 -0
- package/dist/module/listmaster/service/list-master-engine.js.map +1 -0
- package/dist/module/listmaster/service/list-master-extension.interface.d.ts +4 -0
- package/dist/module/listmaster/service/list-master-extension.interface.js +3 -0
- package/dist/module/listmaster/service/list-master-extension.interface.js.map +1 -0
- package/dist/module/listmaster/service/list-master-item.service.d.ts +19 -0
- package/dist/module/listmaster/service/list-master-item.service.js +151 -0
- package/dist/module/listmaster/service/list-master-item.service.js.map +1 -0
- package/dist/module/listmaster/service/list-master-registry.d.ts +6 -0
- package/dist/module/listmaster/service/list-master-registry.js +26 -0
- package/dist/module/listmaster/service/list-master-registry.js.map +1 -0
- package/dist/module/listmaster/service/list-master.service.d.ts +36 -0
- package/dist/module/listmaster/service/list-master.service.js +270 -0
- package/dist/module/listmaster/service/list-master.service.js.map +1 -0
- package/dist/module/mapper/controller/field-mapper.controller.d.ts +11 -0
- package/dist/module/mapper/controller/field-mapper.controller.js +94 -0
- package/dist/module/mapper/controller/field-mapper.controller.js.map +1 -0
- package/dist/module/mapper/controller/mapper.controller.d.ts +6 -0
- package/dist/module/mapper/controller/mapper.controller.js +40 -0
- package/dist/module/mapper/controller/mapper.controller.js.map +1 -0
- package/dist/module/mapper/dto/field-mapper.dto.d.ts +12 -0
- package/dist/module/mapper/dto/field-mapper.dto.js +8 -0
- package/dist/module/mapper/dto/field-mapper.dto.js.map +1 -0
- package/dist/module/mapper/entity/field-lovs.entity.d.ts +7 -0
- package/dist/module/mapper/entity/field-lovs.entity.js +38 -0
- package/dist/module/mapper/entity/field-lovs.entity.js.map +1 -0
- package/dist/module/mapper/entity/field-mapper.entity.d.ts +13 -0
- package/dist/module/mapper/entity/field-mapper.entity.js +78 -0
- package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -0
- package/dist/module/mapper/entity/mapper.entity.d.ts +6 -0
- package/dist/module/mapper/entity/mapper.entity.js +34 -0
- package/dist/module/mapper/entity/mapper.entity.js.map +1 -0
- package/dist/module/mapper/mapper.module.d.ts +2 -0
- package/dist/module/mapper/mapper.module.js +47 -0
- package/dist/module/mapper/mapper.module.js.map +1 -0
- package/dist/module/mapper/repository/field-lovs.repository.d.ts +11 -0
- package/dist/module/mapper/repository/field-lovs.repository.js +52 -0
- package/dist/module/mapper/repository/field-lovs.repository.js.map +1 -0
- package/dist/module/mapper/repository/field-mapper.repository.d.ts +11 -0
- package/dist/module/mapper/repository/field-mapper.repository.js +54 -0
- package/dist/module/mapper/repository/field-mapper.repository.js.map +1 -0
- package/dist/module/mapper/repository/mapper.repository.d.ts +7 -0
- package/dist/module/mapper/repository/mapper.repository.js +34 -0
- package/dist/module/mapper/repository/mapper.repository.js.map +1 -0
- package/dist/module/mapper/service/field-mapper.service.d.ts +22 -0
- package/dist/module/mapper/service/field-mapper.service.js +177 -0
- package/dist/module/mapper/service/field-mapper.service.js.map +1 -0
- package/dist/module/mapper/service/mapper.service.d.ts +17 -0
- package/dist/module/mapper/service/mapper.service.js +72 -0
- package/dist/module/mapper/service/mapper.service.js.map +1 -0
- package/dist/module/master/controller/master.controller.d.ts +20 -0
- package/dist/module/master/controller/master.controller.js +82 -0
- package/dist/module/master/controller/master.controller.js.map +1 -0
- package/dist/module/master/service/master.service.d.ts +31 -0
- package/dist/module/master/service/master.service.js +364 -0
- package/dist/module/master/service/master.service.js.map +1 -0
- package/dist/module/meta/controller/app-master.controller.d.ts +9 -0
- package/dist/module/meta/controller/app-master.controller.js +51 -0
- package/dist/module/meta/controller/app-master.controller.js.map +1 -0
- package/dist/module/meta/controller/attribute-master.controller.d.ts +21 -0
- package/dist/module/meta/controller/attribute-master.controller.js +78 -0
- package/dist/module/meta/controller/attribute-master.controller.js.map +1 -0
- package/dist/module/meta/controller/entity-dynamic.controller.d.ts +21 -0
- package/dist/module/meta/controller/entity-dynamic.controller.js +115 -0
- package/dist/module/meta/controller/entity-dynamic.controller.js.map +1 -0
- package/dist/module/meta/controller/entity-master.controller.d.ts +8 -0
- package/dist/module/meta/controller/entity-master.controller.js +44 -0
- package/dist/module/meta/controller/entity-master.controller.js.map +1 -0
- package/dist/module/meta/controller/entity-relation.controller.d.ts +6 -0
- package/dist/module/meta/controller/entity-relation.controller.js +45 -0
- package/dist/module/meta/controller/entity-relation.controller.js.map +1 -0
- package/dist/module/meta/controller/entity.controller.d.ts +38 -0
- package/dist/module/meta/controller/entity.controller.js +245 -0
- package/dist/module/meta/controller/entity.controller.js.map +1 -0
- package/dist/module/meta/controller/media.controller.d.ts +17 -0
- package/dist/module/meta/controller/media.controller.js +80 -0
- package/dist/module/meta/controller/media.controller.js.map +1 -0
- package/dist/module/meta/controller/meta.controller.d.ts +32 -0
- package/dist/module/meta/controller/meta.controller.js +112 -0
- package/dist/module/meta/controller/meta.controller.js.map +1 -0
- package/dist/module/meta/controller/view-master.controller.d.ts +12 -0
- package/dist/module/meta/controller/view-master.controller.js +88 -0
- package/dist/module/meta/controller/view-master.controller.js.map +1 -0
- package/dist/module/meta/dto/entity-list-data.dto.d.ts +5 -0
- package/dist/module/meta/dto/entity-list-data.dto.js +7 -0
- package/dist/module/meta/dto/entity-list-data.dto.js.map +1 -0
- package/dist/module/meta/dto/entity-tab.dto.d.ts +4 -0
- package/dist/module/meta/dto/entity-tab.dto.js +7 -0
- package/dist/module/meta/dto/entity-tab.dto.js.map +1 -0
- package/dist/module/meta/dto/entity-table.dto.d.ts +11 -0
- package/dist/module/meta/dto/entity-table.dto.js +8 -0
- package/dist/module/meta/dto/entity-table.dto.js.map +1 -0
- package/dist/module/meta/entity/app-master.entity.d.ts +12 -0
- package/dist/module/meta/entity/app-master.entity.js +58 -0
- package/dist/module/meta/entity/app-master.entity.js.map +1 -0
- package/dist/module/meta/entity/attribute-master.entity.d.ts +22 -0
- package/dist/module/meta/entity/attribute-master.entity.js +122 -0
- package/dist/module/meta/entity/attribute-master.entity.js.map +1 -0
- package/dist/module/meta/entity/base-entity.entity.d.ts +19 -0
- package/dist/module/meta/entity/base-entity.entity.js +104 -0
- package/dist/module/meta/entity/base-entity.entity.js.map +1 -0
- package/dist/module/meta/entity/entity-master.entity.d.ts +18 -0
- package/dist/module/meta/entity/entity-master.entity.js +108 -0
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -0
- package/dist/module/meta/entity/entity-relation-data.entity.d.ts +10 -0
- package/dist/module/meta/entity/entity-relation-data.entity.js +51 -0
- package/dist/module/meta/entity/entity-relation-data.entity.js.map +1 -0
- package/dist/module/meta/entity/entity-relation.entity.d.ts +8 -0
- package/dist/module/meta/entity/entity-relation.entity.js +43 -0
- package/dist/module/meta/entity/entity-relation.entity.js.map +1 -0
- package/dist/module/meta/entity/entity-table-column.entity.d.ts +19 -0
- package/dist/module/meta/entity/entity-table-column.entity.js +92 -0
- package/dist/module/meta/entity/entity-table-column.entity.js.map +1 -0
- package/dist/module/meta/entity/entity-table.entity.d.ts +17 -0
- package/dist/module/meta/entity/entity-table.entity.js +79 -0
- package/dist/module/meta/entity/entity-table.entity.js.map +1 -0
- package/dist/module/meta/entity/media-data.entity.d.ts +11 -0
- package/dist/module/meta/entity/media-data.entity.js +55 -0
- package/dist/module/meta/entity/media-data.entity.js.map +1 -0
- package/dist/module/meta/entity/preference.entity.d.ts +11 -0
- package/dist/module/meta/entity/preference.entity.js +85 -0
- package/dist/module/meta/entity/preference.entity.js.map +1 -0
- package/dist/module/meta/entity/view-master.entity.d.ts +14 -0
- package/dist/module/meta/entity/view-master.entity.js +67 -0
- package/dist/module/meta/entity/view-master.entity.js.map +1 -0
- package/dist/module/meta/entity.module.d.ts +2 -0
- package/dist/module/meta/entity.module.js +153 -0
- package/dist/module/meta/entity.module.js.map +1 -0
- package/dist/module/meta/repository/app-master.repository.d.ts +7 -0
- package/dist/module/meta/repository/app-master.repository.js +36 -0
- package/dist/module/meta/repository/app-master.repository.js.map +1 -0
- package/dist/module/meta/repository/attribute-master.repository.d.ts +20 -0
- package/dist/module/meta/repository/attribute-master.repository.js +85 -0
- package/dist/module/meta/repository/attribute-master.repository.js.map +1 -0
- package/dist/module/meta/repository/entity-master.repository.d.ts +20 -0
- package/dist/module/meta/repository/entity-master.repository.js +73 -0
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -0
- package/dist/module/meta/repository/entity-table-column.repository.d.ts +7 -0
- package/dist/module/meta/repository/entity-table-column.repository.js +52 -0
- package/dist/module/meta/repository/entity-table-column.repository.js.map +1 -0
- package/dist/module/meta/repository/entity-table.repository.d.ts +9 -0
- package/dist/module/meta/repository/entity-table.repository.js +59 -0
- package/dist/module/meta/repository/entity-table.repository.js.map +1 -0
- package/dist/module/meta/repository/media-data.repository.d.ts +9 -0
- package/dist/module/meta/repository/media-data.repository.js +55 -0
- package/dist/module/meta/repository/media-data.repository.js.map +1 -0
- package/dist/module/meta/repository/preference.repository.d.ts +7 -0
- package/dist/module/meta/repository/preference.repository.js +36 -0
- package/dist/module/meta/repository/preference.repository.js.map +1 -0
- package/dist/module/meta/repository/user-app-mapping.repository.d.ts +0 -0
- package/dist/module/meta/repository/user-app-mapping.repository.js +1 -0
- package/dist/module/meta/repository/user-app-mapping.repository.js.map +1 -0
- package/dist/module/meta/repository/view-master.repository.d.ts +11 -0
- package/dist/module/meta/repository/view-master.repository.js +52 -0
- package/dist/module/meta/repository/view-master.repository.js.map +1 -0
- package/dist/module/meta/service/app-master.service.d.ts +8 -0
- package/dist/module/meta/service/app-master.service.js +45 -0
- package/dist/module/meta/service/app-master.service.js.map +1 -0
- package/dist/module/meta/service/attribute-master.service.d.ts +16 -0
- package/dist/module/meta/service/attribute-master.service.js +75 -0
- package/dist/module/meta/service/attribute-master.service.js.map +1 -0
- package/dist/module/meta/service/common.service.d.ts +4 -0
- package/dist/module/meta/service/common.service.js +25 -0
- package/dist/module/meta/service/common.service.js.map +1 -0
- package/dist/module/meta/service/entity-dynamic.service.d.ts +23 -0
- package/dist/module/meta/service/entity-dynamic.service.js +452 -0
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -0
- package/dist/module/meta/service/entity-list.service.d.ts +17 -0
- package/dist/module/meta/service/entity-list.service.js +141 -0
- package/dist/module/meta/service/entity-list.service.js.map +1 -0
- package/dist/module/meta/service/entity-master.service.d.ts +29 -0
- package/dist/module/meta/service/entity-master.service.js +112 -0
- package/dist/module/meta/service/entity-master.service.js.map +1 -0
- package/dist/module/meta/service/entity-realation-data.service.d.ts +4 -0
- package/dist/module/meta/service/entity-realation-data.service.js +25 -0
- package/dist/module/meta/service/entity-realation-data.service.js.map +1 -0
- package/dist/module/meta/service/entity-relation.service.d.ts +8 -0
- package/dist/module/meta/service/entity-relation.service.js +58 -0
- package/dist/module/meta/service/entity-relation.service.js.map +1 -0
- package/dist/module/meta/service/entity-service-impl.service.d.ts +43 -0
- package/dist/module/meta/service/entity-service-impl.service.js +278 -0
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -0
- package/dist/module/meta/service/entity-table-column.service.d.ts +7 -0
- package/dist/module/meta/service/entity-table-column.service.js +37 -0
- package/dist/module/meta/service/entity-table-column.service.js.map +1 -0
- package/dist/module/meta/service/entity-table.service.d.ts +17 -0
- package/dist/module/meta/service/entity-table.service.js +84 -0
- package/dist/module/meta/service/entity-table.service.js.map +1 -0
- package/dist/module/meta/service/entity-validation.service.d.ts +21 -0
- package/dist/module/meta/service/entity-validation.service.js +117 -0
- package/dist/module/meta/service/entity-validation.service.js.map +1 -0
- package/dist/module/meta/service/entity.service.d.ts +15 -0
- package/dist/module/meta/service/entity.service.js +3 -0
- package/dist/module/meta/service/entity.service.js.map +1 -0
- package/dist/module/meta/service/field-group.service.d.ts +26 -0
- package/dist/module/meta/service/field-group.service.js +76 -0
- package/dist/module/meta/service/field-group.service.js.map +1 -0
- package/dist/module/meta/service/media-data.service.d.ts +30 -0
- package/dist/module/meta/service/media-data.service.js +116 -0
- package/dist/module/meta/service/media-data.service.js.map +1 -0
- package/dist/module/meta/service/populate-meta.service.d.ts +11 -0
- package/dist/module/meta/service/populate-meta.service.js +124 -0
- package/dist/module/meta/service/populate-meta.service.js.map +1 -0
- package/dist/module/meta/service/preference.service.d.ts +7 -0
- package/dist/module/meta/service/preference.service.js +31 -0
- package/dist/module/meta/service/preference.service.js.map +1 -0
- package/dist/module/meta/service/resolver.service.d.ts +11 -0
- package/dist/module/meta/service/resolver.service.js +161 -0
- package/dist/module/meta/service/resolver.service.js.map +1 -0
- package/dist/module/meta/service/section-master.service.d.ts +26 -0
- package/dist/module/meta/service/section-master.service.js +77 -0
- package/dist/module/meta/service/section-master.service.js.map +1 -0
- package/dist/module/meta/service/update-form-json.service.d.ts +9 -0
- package/dist/module/meta/service/update-form-json.service.js +39 -0
- package/dist/module/meta/service/update-form-json.service.js.map +1 -0
- package/dist/module/meta/service/user-app-mapping.service.d.ts +0 -0
- package/dist/module/meta/service/user-app-mapping.service.js +1 -0
- package/dist/module/meta/service/user-app-mapping.service.js.map +1 -0
- package/dist/module/meta/service/view-master.service.d.ts +27 -0
- package/dist/module/meta/service/view-master.service.js +69 -0
- package/dist/module/meta/service/view-master.service.js.map +1 -0
- package/dist/module/module/controller/menu.controller.d.ts +8 -0
- package/dist/module/module/controller/menu.controller.js +41 -0
- package/dist/module/module/controller/menu.controller.js.map +1 -0
- package/dist/module/module/controller/module-access.controller.d.ts +35 -0
- package/dist/module/module/controller/module-access.controller.js +148 -0
- package/dist/module/module/controller/module-access.controller.js.map +1 -0
- package/dist/module/module/entity/menu.entity.d.ts +15 -0
- package/dist/module/module/entity/menu.entity.js +72 -0
- package/dist/module/module/entity/menu.entity.js.map +1 -0
- package/dist/module/module/entity/module-access.entity.d.ts +9 -0
- package/dist/module/module/entity/module-access.entity.js +48 -0
- package/dist/module/module/entity/module-access.entity.js.map +1 -0
- package/dist/module/module/entity/module-action.entity.d.ts +6 -0
- package/dist/module/module/entity/module-action.entity.js +37 -0
- package/dist/module/module/entity/module-action.entity.js.map +1 -0
- package/dist/module/module/entity/module.entity.d.ts +18 -0
- package/dist/module/module/entity/module.entity.js +84 -0
- package/dist/module/module/entity/module.entity.js.map +1 -0
- package/dist/module/module/module.module.d.ts +2 -0
- package/dist/module/module/module.module.js +55 -0
- package/dist/module/module/module.module.js.map +1 -0
- package/dist/module/module/repository/menu.repository.d.ts +11 -0
- package/dist/module/module/repository/menu.repository.js +152 -0
- package/dist/module/module/repository/menu.repository.js.map +1 -0
- package/dist/module/module/repository/module-access.repository.d.ts +51 -0
- package/dist/module/module/repository/module-access.repository.js +275 -0
- package/dist/module/module/repository/module-access.repository.js.map +1 -0
- package/dist/module/module/service/menu.service.d.ts +12 -0
- package/dist/module/module/service/menu.service.js +59 -0
- package/dist/module/module/service/menu.service.js.map +1 -0
- package/dist/module/module/service/module-access.service.d.ts +60 -0
- package/dist/module/module/service/module-access.service.js +119 -0
- package/dist/module/module/service/module-access.service.js.map +1 -0
- package/dist/module/notification/controller/notification.controller.d.ts +23 -0
- package/dist/module/notification/controller/notification.controller.js +74 -0
- package/dist/module/notification/controller/notification.controller.js.map +1 -0
- package/dist/module/notification/controller/otp.controller.d.ts +56 -0
- package/dist/module/notification/controller/otp.controller.js +103 -0
- package/dist/module/notification/controller/otp.controller.js.map +1 -0
- package/dist/module/notification/entity/notification.entity.d.ts +10 -0
- package/dist/module/notification/entity/notification.entity.js +49 -0
- package/dist/module/notification/entity/notification.entity.js.map +1 -0
- package/dist/module/notification/entity/otp.entity.d.ts +10 -0
- package/dist/module/notification/entity/otp.entity.js +52 -0
- package/dist/module/notification/entity/otp.entity.js.map +1 -0
- package/dist/module/notification/firebase-admin.config.d.ts +7 -0
- package/dist/module/notification/firebase-admin.config.js +24 -0
- package/dist/module/notification/firebase-admin.config.js.map +1 -0
- package/dist/module/notification/notification.module.d.ts +2 -0
- package/dist/module/notification/notification.module.js +82 -0
- package/dist/module/notification/notification.module.js.map +1 -0
- package/dist/module/notification/repository/otp.repository.d.ts +9 -0
- package/dist/module/notification/repository/otp.repository.js +44 -0
- package/dist/module/notification/repository/otp.repository.js.map +1 -0
- package/dist/module/notification/service/email.service.d.ts +14 -0
- package/dist/module/notification/service/email.service.js +110 -0
- package/dist/module/notification/service/email.service.js.map +1 -0
- package/dist/module/notification/service/notification.service.d.ts +25 -0
- package/dist/module/notification/service/notification.service.js +117 -0
- package/dist/module/notification/service/notification.service.js.map +1 -0
- package/dist/module/notification/service/otp.service.d.ts +52 -0
- package/dist/module/notification/service/otp.service.js +105 -0
- package/dist/module/notification/service/otp.service.js.map +1 -0
- package/dist/module/third-party-module/entity/third-party-api-registry.entity.d.ts +18 -0
- package/dist/module/third-party-module/entity/third-party-api-registry.entity.js +84 -0
- package/dist/module/third-party-module/entity/third-party-api-registry.entity.js.map +1 -0
- package/dist/module/third-party-module/repository/third-party-api-registry.repository.d.ts +7 -0
- package/dist/module/third-party-module/repository/third-party-api-registry.repository.js +38 -0
- package/dist/module/third-party-module/repository/third-party-api-registry.repository.js.map +1 -0
- package/dist/module/third-party-module/service/api-registry.service.d.ts +6 -0
- package/dist/module/third-party-module/service/api-registry.service.js +28 -0
- package/dist/module/third-party-module/service/api-registry.service.js.map +1 -0
- package/dist/module/third-party-module/third-party.module.d.ts +2 -0
- package/dist/module/third-party-module/third-party.module.js +25 -0
- package/dist/module/third-party-module/third-party.module.js.map +1 -0
- package/dist/module/user/controller/login.controller.d.ts +26 -0
- package/dist/module/user/controller/login.controller.js +176 -0
- package/dist/module/user/controller/login.controller.js.map +1 -0
- package/dist/module/user/controller/user.controller.d.ts +9 -0
- package/dist/module/user/controller/user.controller.js +59 -0
- package/dist/module/user/controller/user.controller.js.map +1 -0
- package/dist/module/user/dto/create-user.dto.d.ts +17 -0
- package/dist/module/user/dto/create-user.dto.js +64 -0
- package/dist/module/user/dto/create-user.dto.js.map +1 -0
- package/dist/module/user/dto/update-user.dto.d.ts +5 -0
- package/dist/module/user/dto/update-user.dto.js +9 -0
- package/dist/module/user/dto/update-user.dto.js.map +1 -0
- package/dist/module/user/entity/role.entity.d.ts +11 -0
- package/dist/module/user/entity/role.entity.js +56 -0
- package/dist/module/user/entity/role.entity.js.map +1 -0
- package/dist/module/user/entity/user-role-mapping.entity.d.ts +12 -0
- package/dist/module/user/entity/user-role-mapping.entity.js +63 -0
- package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -0
- package/dist/module/user/entity/user-session.entity.d.ts +11 -0
- package/dist/module/user/entity/user-session.entity.js +86 -0
- package/dist/module/user/entity/user-session.entity.js.map +1 -0
- package/dist/module/user/entity/user.entity.d.ts +23 -0
- package/dist/module/user/entity/user.entity.js +103 -0
- package/dist/module/user/entity/user.entity.js.map +1 -0
- package/dist/module/user/repository/role.repository.d.ts +18 -0
- package/dist/module/user/repository/role.repository.js +87 -0
- package/dist/module/user/repository/role.repository.js.map +1 -0
- package/dist/module/user/repository/user-role-mapping.repository.d.ts +19 -0
- package/dist/module/user/repository/user-role-mapping.repository.js +110 -0
- package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -0
- package/dist/module/user/repository/user.repository.d.ts +10 -0
- package/dist/module/user/repository/user.repository.js +58 -0
- package/dist/module/user/repository/user.repository.js.map +1 -0
- package/dist/module/user/repository/userSession.repository.d.ts +10 -0
- package/dist/module/user/repository/userSession.repository.js +45 -0
- package/dist/module/user/repository/userSession.repository.js.map +1 -0
- package/dist/module/user/service/login.service.d.ts +80 -0
- package/dist/module/user/service/login.service.js +208 -0
- package/dist/module/user/service/login.service.js.map +1 -0
- package/dist/module/user/service/role.service.d.ts +23 -0
- package/dist/module/user/service/role.service.js +146 -0
- package/dist/module/user/service/role.service.js.map +1 -0
- package/dist/module/user/service/user-role-mapping.service.d.ts +12 -0
- package/dist/module/user/service/user-role-mapping.service.js +60 -0
- package/dist/module/user/service/user-role-mapping.service.js.map +1 -0
- package/dist/module/user/service/user-session.service.d.ts +38 -0
- package/dist/module/user/service/user-session.service.js +132 -0
- package/dist/module/user/service/user-session.service.js.map +1 -0
- package/dist/module/user/service/user.service.d.ts +38 -0
- package/dist/module/user/service/user.service.js +234 -0
- package/dist/module/user/service/user.service.js.map +1 -0
- package/dist/module/user/user.module.d.ts +2 -0
- package/dist/module/user/user.module.js +78 -0
- package/dist/module/user/user.module.js.map +1 -0
- package/dist/module/workflow/controller/action-category.controller.d.ts +18 -0
- package/dist/module/workflow/controller/action-category.controller.js +79 -0
- package/dist/module/workflow/controller/action-category.controller.js.map +1 -0
- package/dist/module/workflow/controller/action-resource-mapping.controller.d.ts +5 -0
- package/dist/module/workflow/controller/action-resource-mapping.controller.js +31 -0
- package/dist/module/workflow/controller/action-resource-mapping.controller.js.map +1 -0
- package/dist/module/workflow/controller/action-template-mapping.controller.d.ts +12 -0
- package/dist/module/workflow/controller/action-template-mapping.controller.js +44 -0
- package/dist/module/workflow/controller/action-template-mapping.controller.js.map +1 -0
- package/dist/module/workflow/controller/action.controller.d.ts +45 -0
- package/dist/module/workflow/controller/action.controller.js +108 -0
- package/dist/module/workflow/controller/action.controller.js.map +1 -0
- package/dist/module/workflow/controller/activity-log.controller.d.ts +44 -0
- package/dist/module/workflow/controller/activity-log.controller.js +62 -0
- package/dist/module/workflow/controller/activity-log.controller.js.map +1 -0
- package/dist/module/workflow/controller/comm-template.controller.d.ts +13 -0
- package/dist/module/workflow/controller/comm-template.controller.js +45 -0
- package/dist/module/workflow/controller/comm-template.controller.js.map +1 -0
- package/dist/module/workflow/controller/entity-modification.controller.d.ts +8 -0
- package/dist/module/workflow/controller/entity-modification.controller.js +44 -0
- package/dist/module/workflow/controller/entity-modification.controller.js.map +1 -0
- package/dist/module/workflow/controller/form-master.controller.d.ts +11 -0
- package/dist/module/workflow/controller/form-master.controller.js +59 -0
- package/dist/module/workflow/controller/form-master.controller.js.map +1 -0
- package/dist/module/workflow/controller/stage-group.controller.d.ts +19 -0
- package/dist/module/workflow/controller/stage-group.controller.js +56 -0
- package/dist/module/workflow/controller/stage-group.controller.js.map +1 -0
- package/dist/module/workflow/controller/stage.controller.d.ts +16 -0
- package/dist/module/workflow/controller/stage.controller.js +57 -0
- package/dist/module/workflow/controller/stage.controller.js.map +1 -0
- package/dist/module/workflow/controller/task.controller.d.ts +32 -0
- package/dist/module/workflow/controller/task.controller.js +72 -0
- package/dist/module/workflow/controller/task.controller.js.map +1 -0
- package/dist/module/workflow/controller/workflow-list-master.controller.d.ts +14 -0
- package/dist/module/workflow/controller/workflow-list-master.controller.js +67 -0
- package/dist/module/workflow/controller/workflow-list-master.controller.js.map +1 -0
- package/dist/module/workflow/controller/workflow-meta.controller.d.ts +15 -0
- package/dist/module/workflow/controller/workflow-meta.controller.js +72 -0
- package/dist/module/workflow/controller/workflow-meta.controller.js.map +1 -0
- package/dist/module/workflow/controller/workflow.controller.d.ts +31 -0
- package/dist/module/workflow/controller/workflow.controller.js +83 -0
- package/dist/module/workflow/controller/workflow.controller.js.map +1 -0
- package/dist/module/workflow/entity/action-category.entity.d.ts +13 -0
- package/dist/module/workflow/entity/action-category.entity.js +63 -0
- package/dist/module/workflow/entity/action-category.entity.js.map +1 -0
- package/dist/module/workflow/entity/action-data.entity.d.ts +19 -0
- package/dist/module/workflow/entity/action-data.entity.js +86 -0
- package/dist/module/workflow/entity/action-data.entity.js.map +1 -0
- package/dist/module/workflow/entity/action-resources-mapping.entity.d.ts +9 -0
- package/dist/module/workflow/entity/action-resources-mapping.entity.js +47 -0
- package/dist/module/workflow/entity/action-resources-mapping.entity.js.map +1 -0
- package/dist/module/workflow/entity/action-template-mapping.entity.d.ts +6 -0
- package/dist/module/workflow/entity/action-template-mapping.entity.js +35 -0
- package/dist/module/workflow/entity/action-template-mapping.entity.js.map +1 -0
- package/dist/module/workflow/entity/action.entity.d.ts +17 -0
- package/dist/module/workflow/entity/action.entity.js +79 -0
- package/dist/module/workflow/entity/action.entity.js.map +1 -0
- package/dist/module/workflow/entity/activity-log.entity.d.ts +15 -0
- package/dist/module/workflow/entity/activity-log.entity.js +70 -0
- package/dist/module/workflow/entity/activity-log.entity.js.map +1 -0
- package/dist/module/workflow/entity/comm-template.entity.d.ts +14 -0
- package/dist/module/workflow/entity/comm-template.entity.js +67 -0
- package/dist/module/workflow/entity/comm-template.entity.js.map +1 -0
- package/dist/module/workflow/entity/entity-modification.entity.d.ts +13 -0
- package/dist/module/workflow/entity/entity-modification.entity.js +63 -0
- package/dist/module/workflow/entity/entity-modification.entity.js.map +1 -0
- package/dist/module/workflow/entity/form.entity.d.ts +9 -0
- package/dist/module/workflow/entity/form.entity.js +46 -0
- package/dist/module/workflow/entity/form.entity.js.map +1 -0
- package/dist/module/workflow/entity/stage-action-mapping.entity.d.ts +6 -0
- package/dist/module/workflow/entity/stage-action-mapping.entity.js +35 -0
- package/dist/module/workflow/entity/stage-action-mapping.entity.js.map +1 -0
- package/dist/module/workflow/entity/stage-group.entity.d.ts +8 -0
- package/dist/module/workflow/entity/stage-group.entity.js +43 -0
- package/dist/module/workflow/entity/stage-group.entity.js.map +1 -0
- package/dist/module/workflow/entity/stage-movement-data.entity.d.ts +13 -0
- package/dist/module/workflow/entity/stage-movement-data.entity.js +63 -0
- package/dist/module/workflow/entity/stage-movement-data.entity.js.map +1 -0
- package/dist/module/workflow/entity/stage.entity.d.ts +7 -0
- package/dist/module/workflow/entity/stage.entity.js +39 -0
- package/dist/module/workflow/entity/stage.entity.js.map +1 -0
- package/dist/module/workflow/entity/task-data.entity.d.ts +30 -0
- package/dist/module/workflow/entity/task-data.entity.js +130 -0
- package/dist/module/workflow/entity/task-data.entity.js.map +1 -0
- package/dist/module/workflow/entity/template-attach-mapper.entity.d.ts +11 -0
- package/dist/module/workflow/entity/template-attach-mapper.entity.js +54 -0
- package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -0
- package/dist/module/workflow/entity/workflow-data.entity.d.ts +4 -0
- package/dist/module/workflow/entity/workflow-data.entity.js +27 -0
- package/dist/module/workflow/entity/workflow-data.entity.js.map +1 -0
- package/dist/module/workflow/entity/workflow-level-mapping.entity.d.ts +7 -0
- package/dist/module/workflow/entity/workflow-level-mapping.entity.js +38 -0
- package/dist/module/workflow/entity/workflow-level-mapping.entity.js.map +1 -0
- package/dist/module/workflow/entity/workflow.entity.d.ts +7 -0
- package/dist/module/workflow/entity/workflow.entity.js +39 -0
- package/dist/module/workflow/entity/workflow.entity.js.map +1 -0
- package/dist/module/workflow/repository/action-category.repository.d.ts +19 -0
- package/dist/module/workflow/repository/action-category.repository.js +84 -0
- package/dist/module/workflow/repository/action-category.repository.js.map +1 -0
- package/dist/module/workflow/repository/action-data.repository.d.ts +18 -0
- package/dist/module/workflow/repository/action-data.repository.js +172 -0
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -0
- package/dist/module/workflow/repository/action.repository.d.ts +29 -0
- package/dist/module/workflow/repository/action.repository.js +220 -0
- package/dist/module/workflow/repository/action.repository.js.map +1 -0
- package/dist/module/workflow/repository/activity-log.repository.d.ts +57 -0
- package/dist/module/workflow/repository/activity-log.repository.js +112 -0
- package/dist/module/workflow/repository/activity-log.repository.js.map +1 -0
- package/dist/module/workflow/repository/comm-template.repository.d.ts +15 -0
- package/dist/module/workflow/repository/comm-template.repository.js +109 -0
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -0
- package/dist/module/workflow/repository/form-master.repository.d.ts +8 -0
- package/dist/module/workflow/repository/form-master.repository.js +38 -0
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -0
- package/dist/module/workflow/repository/form.repository.d.ts +0 -0
- package/dist/module/workflow/repository/form.repository.js +1 -0
- package/dist/module/workflow/repository/form.repository.js.map +1 -0
- package/dist/module/workflow/repository/stage-group.repository.d.ts +34 -0
- package/dist/module/workflow/repository/stage-group.repository.js +135 -0
- package/dist/module/workflow/repository/stage-group.repository.js.map +1 -0
- package/dist/module/workflow/repository/stage-movement.repository.d.ts +23 -0
- package/dist/module/workflow/repository/stage-movement.repository.js +150 -0
- package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -0
- package/dist/module/workflow/repository/stage.repository.d.ts +31 -0
- package/dist/module/workflow/repository/stage.repository.js +117 -0
- package/dist/module/workflow/repository/stage.repository.js.map +1 -0
- package/dist/module/workflow/repository/task.repository.d.ts +10 -0
- package/dist/module/workflow/repository/task.repository.js +92 -0
- package/dist/module/workflow/repository/task.repository.js.map +1 -0
- package/dist/module/workflow/repository/workflow.repository.d.ts +10 -0
- package/dist/module/workflow/repository/workflow.repository.js +49 -0
- package/dist/module/workflow/repository/workflow.repository.js.map +1 -0
- package/dist/module/workflow/service/action-category.service.d.ts +21 -0
- package/dist/module/workflow/service/action-category.service.js +42 -0
- package/dist/module/workflow/service/action-category.service.js.map +1 -0
- package/dist/module/workflow/service/action-data.service.d.ts +16 -0
- package/dist/module/workflow/service/action-data.service.js +40 -0
- package/dist/module/workflow/service/action-data.service.js.map +1 -0
- package/dist/module/workflow/service/action-resources-mapping.service.d.ts +6 -0
- package/dist/module/workflow/service/action-resources-mapping.service.js +27 -0
- package/dist/module/workflow/service/action-resources-mapping.service.js.map +1 -0
- package/dist/module/workflow/service/action-template-mapping.service.d.ts +7 -0
- package/dist/module/workflow/service/action-template-mapping.service.js +52 -0
- package/dist/module/workflow/service/action-template-mapping.service.js.map +1 -0
- package/dist/module/workflow/service/action.service.d.ts +35 -0
- package/dist/module/workflow/service/action.service.js +163 -0
- package/dist/module/workflow/service/action.service.js.map +1 -0
- package/dist/module/workflow/service/activity-log.service.d.ts +44 -0
- package/dist/module/workflow/service/activity-log.service.js +92 -0
- package/dist/module/workflow/service/activity-log.service.js.map +1 -0
- package/dist/module/workflow/service/comm-template.service.d.ts +16 -0
- package/dist/module/workflow/service/comm-template.service.js +90 -0
- package/dist/module/workflow/service/comm-template.service.js.map +1 -0
- package/dist/module/workflow/service/entity-modification.service.d.ts +8 -0
- package/dist/module/workflow/service/entity-modification.service.js +52 -0
- package/dist/module/workflow/service/entity-modification.service.js.map +1 -0
- package/dist/module/workflow/service/form-master.service.d.ts +14 -0
- package/dist/module/workflow/service/form-master.service.js +38 -0
- package/dist/module/workflow/service/form-master.service.js.map +1 -0
- package/dist/module/workflow/service/populate-workflow.service.d.ts +21 -0
- package/dist/module/workflow/service/populate-workflow.service.js +167 -0
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -0
- package/dist/module/workflow/service/stage-action-mapping.service.d.ts +3 -0
- package/dist/module/workflow/service/stage-action-mapping.service.js +18 -0
- package/dist/module/workflow/service/stage-action-mapping.service.js.map +1 -0
- package/dist/module/workflow/service/stage-group.service.d.ts +29 -0
- package/dist/module/workflow/service/stage-group.service.js +213 -0
- package/dist/module/workflow/service/stage-group.service.js.map +1 -0
- package/dist/module/workflow/service/stage.service.d.ts +25 -0
- package/dist/module/workflow/service/stage.service.js +129 -0
- package/dist/module/workflow/service/stage.service.js.map +1 -0
- package/dist/module/workflow/service/task.service.d.ts +47 -0
- package/dist/module/workflow/service/task.service.js +324 -0
- package/dist/module/workflow/service/task.service.js.map +1 -0
- package/dist/module/workflow/service/workflow-list-master.service.d.ts +9 -0
- package/dist/module/workflow/service/workflow-list-master.service.js +61 -0
- package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -0
- package/dist/module/workflow/service/workflow-meta.service.d.ts +26 -0
- package/dist/module/workflow/service/workflow-meta.service.js +356 -0
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -0
- package/dist/module/workflow/service/workflow.service.d.ts +33 -0
- package/dist/module/workflow/service/workflow.service.js +140 -0
- package/dist/module/workflow/service/workflow.service.js.map +1 -0
- package/dist/module/workflow/workflow.module.d.ts +2 -0
- package/dist/module/workflow/workflow.module.js +184 -0
- package/dist/module/workflow/workflow.module.js.map +1 -0
- package/dist/module/workflow-automation/controller/workflow-automation.controller.d.ts +5 -0
- package/dist/module/workflow-automation/controller/workflow-automation.controller.js +31 -0
- package/dist/module/workflow-automation/controller/workflow-automation.controller.js.map +1 -0
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.d.ts +9 -0
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js +47 -0
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js.map +1 -0
- package/dist/module/workflow-automation/entity/workflow-automation.entity.d.ts +12 -0
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js +59 -0
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js.map +1 -0
- package/dist/module/workflow-automation/interface/action.decorator.d.ts +2 -0
- package/dist/module/workflow-automation/interface/action.decorator.js +8 -0
- package/dist/module/workflow-automation/interface/action.decorator.js.map +1 -0
- package/dist/module/workflow-automation/interface/action.interface.d.ts +4 -0
- package/dist/module/workflow-automation/interface/action.interface.js +3 -0
- package/dist/module/workflow-automation/interface/action.interface.js.map +1 -0
- package/dist/module/workflow-automation/service/action-registery.service.d.ts +11 -0
- package/dist/module/workflow-automation/service/action-registery.service.js +46 -0
- package/dist/module/workflow-automation/service/action-registery.service.js.map +1 -0
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.d.ts +14 -0
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js +116 -0
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js.map +1 -0
- package/dist/module/workflow-automation/service/workflow-automation.service.d.ts +55 -0
- package/dist/module/workflow-automation/service/workflow-automation.service.js +222 -0
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -0
- package/dist/module/workflow-automation/workflow-automation.module.d.ts +2 -0
- package/dist/module/workflow-automation/workflow-automation.module.js +47 -0
- package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -0
- package/dist/resources/properties.module.d.ts +2 -0
- package/dist/resources/properties.module.js +25 -0
- package/dist/resources/properties.module.js.map +1 -0
- package/dist/resources/properties.yaml.d.ts +2 -0
- package/dist/resources/properties.yaml.js +10 -0
- package/dist/resources/properties.yaml.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/utils/dto/excel-data.dto.d.ts +7 -0
- package/dist/utils/dto/excel-data.dto.js +16 -0
- package/dist/utils/dto/excel-data.dto.js.map +1 -0
- package/dist/utils/dto/excelsheet-data.dto.d.ts +5 -0
- package/dist/utils/dto/excelsheet-data.dto.js +3 -0
- package/dist/utils/dto/excelsheet-data.dto.js.map +1 -0
- package/dist/utils/service/base64util.service.d.ts +4 -0
- package/dist/utils/service/base64util.service.js +21 -0
- package/dist/utils/service/base64util.service.js.map +1 -0
- package/dist/utils/service/clockIDGenUtil.service.d.ts +8 -0
- package/dist/utils/service/clockIDGenUtil.service.js +32 -0
- package/dist/utils/service/clockIDGenUtil.service.js.map +1 -0
- package/dist/utils/service/codeGenerator.service.d.ts +3 -0
- package/dist/utils/service/codeGenerator.service.js +19 -0
- package/dist/utils/service/codeGenerator.service.js.map +1 -0
- package/dist/utils/service/dateUtil.service.d.ts +3 -0
- package/dist/utils/service/dateUtil.service.js +28 -0
- package/dist/utils/service/dateUtil.service.js.map +1 -0
- package/dist/utils/service/encryptUtil.service.d.ts +9 -0
- package/dist/utils/service/encryptUtil.service.js +112 -0
- package/dist/utils/service/encryptUtil.service.js.map +1 -0
- package/dist/utils/service/excel-helper.service.d.ts +9 -0
- package/dist/utils/service/excel-helper.service.js +56 -0
- package/dist/utils/service/excel-helper.service.js.map +1 -0
- package/dist/utils/service/excelUtil.service.d.ts +3 -0
- package/dist/utils/service/excelUtil.service.js +17 -0
- package/dist/utils/service/excelUtil.service.js.map +1 -0
- package/dist/utils/service/file-util.service.d.ts +3 -0
- package/dist/utils/service/file-util.service.js +15 -0
- package/dist/utils/service/file-util.service.js.map +1 -0
- package/dist/utils/service/json-util.service.d.ts +3 -0
- package/dist/utils/service/json-util.service.js +24 -0
- package/dist/utils/service/json-util.service.js.map +1 -0
- package/dist/utils/service/loggingUtil.service.d.ts +4 -0
- package/dist/utils/service/loggingUtil.service.js +36 -0
- package/dist/utils/service/loggingUtil.service.js.map +1 -0
- package/dist/utils/service/reflection-helper.service.d.ts +10 -0
- package/dist/utils/service/reflection-helper.service.js +66 -0
- package/dist/utils/service/reflection-helper.service.js.map +1 -0
- package/dist/utils/service/wbsCodeGen.service.d.ts +3 -0
- package/dist/utils/service/wbsCodeGen.service.js +20 -0
- package/dist/utils/service/wbsCodeGen.service.js.map +1 -0
- package/dist/utils/utils.module.d.ts +2 -0
- package/dist/utils/utils.module.js +38 -0
- package/dist/utils/utils.module.js.map +1 -0
- package/package.json +1 -1
- package/src/module/meta/service/resolver.service.ts +43 -18
- package/src/module/notification/entity/notification.entity.ts +3 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ModuleAccessRepository = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const role_entity_1 = require("../../user/entity/role.entity");
|
|
20
|
+
const module_access_entity_1 = require("../entity/module-access.entity");
|
|
21
|
+
const module_action_entity_1 = require("../entity/module-action.entity");
|
|
22
|
+
const module_entity_1 = require("../entity/module.entity");
|
|
23
|
+
let ModuleAccessRepository = class ModuleAccessRepository {
|
|
24
|
+
constructor(roleRepo, moduleRepo, moduleAccessRepo, moduleActionRepo, dataSource) {
|
|
25
|
+
this.roleRepo = roleRepo;
|
|
26
|
+
this.moduleRepo = moduleRepo;
|
|
27
|
+
this.moduleAccessRepo = moduleAccessRepo;
|
|
28
|
+
this.moduleActionRepo = moduleActionRepo;
|
|
29
|
+
this.dataSource = dataSource;
|
|
30
|
+
}
|
|
31
|
+
async getRoles({ appcode, level_type, level_id, }) {
|
|
32
|
+
const query = this.dataSource
|
|
33
|
+
.createQueryBuilder()
|
|
34
|
+
.select('*')
|
|
35
|
+
.from('sso_role', 'role')
|
|
36
|
+
.where('role.appcode = :appcode', { appcode })
|
|
37
|
+
.andWhere('(role.is_factory IS NULL OR role.is_factory != 1)');
|
|
38
|
+
if (level_type) {
|
|
39
|
+
query.andWhere('role.level_type = :level_type', { level_type });
|
|
40
|
+
}
|
|
41
|
+
if (level_id !== undefined) {
|
|
42
|
+
query.andWhere('role.level_id = :level_id', {
|
|
43
|
+
level_id: String(level_id),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
const roles = await query.getRawMany();
|
|
47
|
+
return roles.map((role) => ({
|
|
48
|
+
label: role.name,
|
|
49
|
+
value: role.id,
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
async getModules({ appcode }) {
|
|
53
|
+
const modules = await this.moduleRepo.find({
|
|
54
|
+
where: { module_level: 'MAINMOD', appcode },
|
|
55
|
+
});
|
|
56
|
+
return modules
|
|
57
|
+
.map((mod) => ({
|
|
58
|
+
label: mod.name,
|
|
59
|
+
value: mod.id,
|
|
60
|
+
group: mod.level_type,
|
|
61
|
+
}))
|
|
62
|
+
.sort((a, b) => a.group.localeCompare(b.group));
|
|
63
|
+
}
|
|
64
|
+
async getAccessListing(roleIds, appcode, levelType, levelId) {
|
|
65
|
+
let roles;
|
|
66
|
+
if (roleIds.length === 1 && roleIds[0] === -1) {
|
|
67
|
+
const fetchedRoles = await this.getRoles({
|
|
68
|
+
appcode,
|
|
69
|
+
level_type: levelType,
|
|
70
|
+
level_id: levelId,
|
|
71
|
+
});
|
|
72
|
+
const fetchedRoleIds = fetchedRoles.map((r) => r.value);
|
|
73
|
+
roles = await this.roleRepo.find({
|
|
74
|
+
where: {
|
|
75
|
+
id: (0, typeorm_2.In)(fetchedRoleIds),
|
|
76
|
+
appcode,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
roles = await this.roleRepo.find({
|
|
82
|
+
where: {
|
|
83
|
+
id: (0, typeorm_2.In)(roleIds.map((id) => Number(id))),
|
|
84
|
+
appcode,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
if (!roles.length)
|
|
89
|
+
return [];
|
|
90
|
+
const roleCodes = roles.map((role) => role.code);
|
|
91
|
+
const moduleAccesses = await this.moduleAccessRepo.find({
|
|
92
|
+
where: {
|
|
93
|
+
role_code: (0, typeorm_2.In)(roleCodes),
|
|
94
|
+
appcode,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
return roles.map((role) => ({
|
|
98
|
+
role_code: role.code,
|
|
99
|
+
name: role.name,
|
|
100
|
+
permission: moduleAccesses
|
|
101
|
+
.filter((access) => access.role_code === role.code)
|
|
102
|
+
.map((access) => ({
|
|
103
|
+
action: access.action_type,
|
|
104
|
+
access: access.access_flag,
|
|
105
|
+
code: access.module_code,
|
|
106
|
+
level_type: access.level_type,
|
|
107
|
+
appcode: access.appcode,
|
|
108
|
+
})),
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
async getAllModulesByLevel(mainModIds, appcode, levelType) {
|
|
112
|
+
const mainModules = mainModIds.length === 1 && mainModIds[0] === '-1'
|
|
113
|
+
? await this.moduleRepo.find({
|
|
114
|
+
where: { module_level: 'MAINMOD', appcode },
|
|
115
|
+
})
|
|
116
|
+
: await this.moduleRepo.find({
|
|
117
|
+
where: { id: (0, typeorm_2.In)(mainModIds), module_level: 'MAINMOD', appcode },
|
|
118
|
+
});
|
|
119
|
+
if (!mainModules.length)
|
|
120
|
+
return {};
|
|
121
|
+
const wbsCodes = mainModules.map((mod) => mod.wbs_code);
|
|
122
|
+
let allModules = await this.moduleRepo
|
|
123
|
+
.createQueryBuilder('module')
|
|
124
|
+
.where(wbsCodes
|
|
125
|
+
.map((code) => `module.wbs_code LIKE :code${code}`)
|
|
126
|
+
.join(' OR '), Object.fromEntries(wbsCodes.map((code) => [`code${code}`, `${code}%`])))
|
|
127
|
+
.andWhere('module.appcode = :appcode', { appcode })
|
|
128
|
+
.andWhere('module.module_code != :excludedCode', {
|
|
129
|
+
excludedCode: 'all_organization_adm_org',
|
|
130
|
+
})
|
|
131
|
+
.getMany();
|
|
132
|
+
allModules = allModules.filter((mod) => mod.module_code != 'all_organization_adm_org');
|
|
133
|
+
const moduleCodes = allModules.map((m) => m.module_code);
|
|
134
|
+
const allActions = await this.moduleActionRepo.find({
|
|
135
|
+
where: { module_code: (0, typeorm_2.In)(moduleCodes) },
|
|
136
|
+
});
|
|
137
|
+
const actionMap = allActions.reduce((acc, action) => {
|
|
138
|
+
if (!acc[action.module_code])
|
|
139
|
+
acc[action.module_code] = [];
|
|
140
|
+
const actionItem = {
|
|
141
|
+
action: action.action_type,
|
|
142
|
+
name: action.action_name,
|
|
143
|
+
};
|
|
144
|
+
if (action.action_type === 'VIEW') {
|
|
145
|
+
acc[action.module_code].unshift(actionItem);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
acc[action.module_code].push(actionItem);
|
|
149
|
+
}
|
|
150
|
+
return acc;
|
|
151
|
+
}, {});
|
|
152
|
+
const levelsToReturn = levelType === 'ORG' ? ['ORG', 'SCH'] : ['SCH'];
|
|
153
|
+
const groupedByLevel = {};
|
|
154
|
+
for (const lvl of levelsToReturn) {
|
|
155
|
+
const filteredModules = allModules.filter((m) => m.level_type === lvl);
|
|
156
|
+
const buildHierarchy = (parentWbs) => filteredModules
|
|
157
|
+
.filter((mod) => mod.wbs_code.startsWith(`${parentWbs}.`) &&
|
|
158
|
+
mod.wbs_code.split('.').length ===
|
|
159
|
+
parentWbs.split('.').length + 1)
|
|
160
|
+
.map((mod) => ({
|
|
161
|
+
name: mod.name,
|
|
162
|
+
code: mod.module_code,
|
|
163
|
+
permission: actionMap[mod.module_code] || [],
|
|
164
|
+
submod: buildHierarchy(mod.wbs_code),
|
|
165
|
+
}));
|
|
166
|
+
const levelModules = mainModules
|
|
167
|
+
.filter((mod) => mod.level_type === lvl)
|
|
168
|
+
.map((mod) => ({
|
|
169
|
+
name: mod.name,
|
|
170
|
+
code: mod.module_code,
|
|
171
|
+
permission: actionMap[mod.module_code] || [],
|
|
172
|
+
submod: buildHierarchy(mod.wbs_code),
|
|
173
|
+
}));
|
|
174
|
+
if (levelModules.length) {
|
|
175
|
+
groupedByLevel[lvl] = levelModules;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return groupedByLevel;
|
|
179
|
+
}
|
|
180
|
+
async updateModuleAccess(accessList) {
|
|
181
|
+
try {
|
|
182
|
+
for (const access of accessList) {
|
|
183
|
+
const existing = await this.moduleAccessRepo.findOne({
|
|
184
|
+
where: {
|
|
185
|
+
role_code: access.role_code,
|
|
186
|
+
module_code: access.module_code,
|
|
187
|
+
action_type: access.action_type,
|
|
188
|
+
appcode: access.appcode,
|
|
189
|
+
level_type: access.level_type,
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
if (existing) {
|
|
193
|
+
existing.access_flag = access.access_flag;
|
|
194
|
+
await this.moduleAccessRepo.save(existing);
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
await this.moduleAccessRepo.save(await this.moduleAccessRepo.create(access));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
console.error('Error updating module access:', error);
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
async getModuleUIConfig(moduleCode, roleIds) {
|
|
208
|
+
const module = await this.moduleRepo.findOne({
|
|
209
|
+
where: { module_code: moduleCode },
|
|
210
|
+
});
|
|
211
|
+
if (!module)
|
|
212
|
+
throw new common_1.BadRequestException('Module not found');
|
|
213
|
+
const roles = await this.roleRepo.find({ where: { id: (0, typeorm_2.In)(roleIds) } });
|
|
214
|
+
const roleCodes = roles.map((role) => role.code);
|
|
215
|
+
const actions = await this.moduleAccessRepo.find({
|
|
216
|
+
where: {
|
|
217
|
+
module_code: moduleCode,
|
|
218
|
+
role_code: (0, typeorm_2.In)(roleCodes),
|
|
219
|
+
access_flag: 1,
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
const uniqueActions = [...new Set(actions.map((a) => a.action_type))];
|
|
223
|
+
return {
|
|
224
|
+
entity_type: module.entity_type,
|
|
225
|
+
title: module.title,
|
|
226
|
+
ui_config: module.ui_config || {},
|
|
227
|
+
action: uniqueActions,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
async getModuleAccessByRoles(roleIds, appcode) {
|
|
231
|
+
const roles = await this.roleRepo.find({
|
|
232
|
+
where: {
|
|
233
|
+
id: (0, typeorm_2.In)(roleIds),
|
|
234
|
+
appcode,
|
|
235
|
+
},
|
|
236
|
+
select: ['id', 'code'],
|
|
237
|
+
});
|
|
238
|
+
const roleCodes = roles.map((r) => r.code);
|
|
239
|
+
if (!roleCodes.length)
|
|
240
|
+
return [];
|
|
241
|
+
const accessRecords = await this.moduleAccessRepo
|
|
242
|
+
.createQueryBuilder('access')
|
|
243
|
+
.select([
|
|
244
|
+
'access.module_code AS module_code',
|
|
245
|
+
'access.action_type AS action_type',
|
|
246
|
+
'access.access_flag AS access_flag',
|
|
247
|
+
'access.level_type AS level_type',
|
|
248
|
+
'access.appcode AS appcode',
|
|
249
|
+
])
|
|
250
|
+
.where('access.role_code IN (:...roleCodes)', { roleCodes })
|
|
251
|
+
.andWhere('access.appcode = :appcode', { appcode })
|
|
252
|
+
.getRawMany();
|
|
253
|
+
return accessRecords.map((record) => ({
|
|
254
|
+
action: record.action_type,
|
|
255
|
+
access: record.access_flag,
|
|
256
|
+
code: record.module_code,
|
|
257
|
+
level_type: record.level_type,
|
|
258
|
+
appcode: record.appcode,
|
|
259
|
+
}));
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
exports.ModuleAccessRepository = ModuleAccessRepository;
|
|
263
|
+
exports.ModuleAccessRepository = ModuleAccessRepository = __decorate([
|
|
264
|
+
(0, common_1.Injectable)(),
|
|
265
|
+
__param(0, (0, typeorm_1.InjectRepository)(role_entity_1.Role)),
|
|
266
|
+
__param(1, (0, typeorm_1.InjectRepository)(module_entity_1.ModuleData)),
|
|
267
|
+
__param(2, (0, typeorm_1.InjectRepository)(module_access_entity_1.ModuleAccess)),
|
|
268
|
+
__param(3, (0, typeorm_1.InjectRepository)(module_action_entity_1.ModuleAction)),
|
|
269
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
270
|
+
typeorm_2.Repository,
|
|
271
|
+
typeorm_2.Repository,
|
|
272
|
+
typeorm_2.Repository,
|
|
273
|
+
typeorm_2.DataSource])
|
|
274
|
+
], ModuleAccessRepository);
|
|
275
|
+
//# sourceMappingURL=module-access.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-access.repository.js","sourceRoot":"","sources":["../../../../src/module/module/repository/module-access.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,qCAAkE;AAClE,+DAA0D;AAC1D,yEAA8D;AAC9D,yEAA8D;AAC9D,2DAAqD;AAG9C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,QAA0B,EAG1B,U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CAAC,CAAC;YACpC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,IAAI,EAAE,MAAM,CAAC,WAAW;YACxB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAA;AAjUY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,kBAAI,CAAC,CAAA;IAGtB,WAAA,IAAA,0BAAgB,EAAC,0BAAU,CAAC,CAAA;IAG5B,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;IAG9B,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;qCARJ,oBAAU;QAGR,oBAAU;QAGJ,oBAAU;QAGV,oBAAU;QAEhB,oBAAU;GAd9B,sBAAsB,CAiUlC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MenuRepository } from '../repository/menu.repository';
|
|
2
|
+
import { DataSource } from 'typeorm';
|
|
3
|
+
export declare class MenuService {
|
|
4
|
+
private readonly menuRepository;
|
|
5
|
+
private readonly datasource;
|
|
6
|
+
constructor(menuRepository: MenuRepository, datasource: DataSource);
|
|
7
|
+
getUserMenu(userId: number, appcode: string, levelType: 'ORG' | 'SCH', levelId: number): Promise<{
|
|
8
|
+
menu: any[];
|
|
9
|
+
}>;
|
|
10
|
+
private buildMenuHierarchy;
|
|
11
|
+
getUserRoles(userId: number, appcode: string): Promise<any>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.MenuService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const menu_repository_1 = require("../repository/menu.repository");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
let MenuService = class MenuService {
|
|
17
|
+
constructor(menuRepository, datasource) {
|
|
18
|
+
this.menuRepository = menuRepository;
|
|
19
|
+
this.datasource = datasource;
|
|
20
|
+
}
|
|
21
|
+
async getUserMenu(userId, appcode, levelType, levelId) {
|
|
22
|
+
const roleCodes = await this.menuRepository.resolveUserRoles(userId, appcode, levelType, levelId);
|
|
23
|
+
if (!roleCodes.length)
|
|
24
|
+
return { menu: [] };
|
|
25
|
+
const moduleCodes = await this.menuRepository.getAccessibleModules(roleCodes, appcode);
|
|
26
|
+
if (!moduleCodes.length)
|
|
27
|
+
return { menu: [] };
|
|
28
|
+
const menuItems = await this.menuRepository.getMenuItems(moduleCodes, appcode, levelType);
|
|
29
|
+
const menuTree = this.buildMenuHierarchy(menuItems);
|
|
30
|
+
return { menu: menuTree };
|
|
31
|
+
}
|
|
32
|
+
buildMenuHierarchy(menuItems) {
|
|
33
|
+
const menuMap = new Map();
|
|
34
|
+
const rootMenu = [];
|
|
35
|
+
menuItems.forEach((menu) => {
|
|
36
|
+
menuMap.set(menu.wbs_code, { ...menu, submenu: [] });
|
|
37
|
+
});
|
|
38
|
+
menuItems.forEach((menu) => {
|
|
39
|
+
const parentWbs = menu.wbs_code.split('.').slice(0, -1).join('.');
|
|
40
|
+
if (parentWbs && menuMap.has(parentWbs)) {
|
|
41
|
+
menuMap.get(parentWbs).submenu.push(menuMap.get(menu.wbs_code));
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
rootMenu.push(menuMap.get(menu.wbs_code));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return rootMenu;
|
|
48
|
+
}
|
|
49
|
+
async getUserRoles(userId, appcode) {
|
|
50
|
+
return this.menuRepository.getUserRoles(userId, appcode);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.MenuService = MenuService;
|
|
54
|
+
exports.MenuService = MenuService = __decorate([
|
|
55
|
+
(0, common_1.Injectable)(),
|
|
56
|
+
__metadata("design:paramtypes", [menu_repository_1.MenuRepository,
|
|
57
|
+
typeorm_1.DataSource])
|
|
58
|
+
], MenuService);
|
|
59
|
+
//# sourceMappingURL=menu.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.service.js","sourceRoot":"","sources":["../../../../src/module/module/service/menu.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mEAA+D;AAE/D,qCAAqC;AAI9B,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YACmB,cAA8B,EAC9B,UAAsB;QADtB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAKJ,KAAK,CAAC,WAAW,CACf,MAAc,EACd,OAAe,EACf,SAAwB,EACxB,OAAe;QAGf,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAC1D,MAAM,EACN,OAAO,EACP,SAAS,EACT,OAAO,CACR,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,MAAM;YAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QAG3C,MAAM,WAAW,GAAG,MAAM,IAAI,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5C,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAGD,KAAK,CAAC,YAAY,CAAC,MAAc,EAAE,OAAe;QAChD,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF,CAAA;AA1EY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAGwB,gCAAc;QAClB,oBAAU;GAH9B,WAAW,CA0EvB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ModuleAccessRepository } from '../repository/module-access.repository';
|
|
2
|
+
import { DataSource } from 'typeorm';
|
|
3
|
+
import { MenuRepository } from '../repository/menu.repository';
|
|
4
|
+
import { ListMasterService } from 'src/module/listmaster/service/list-master.service';
|
|
5
|
+
export declare class ModuleAccessService {
|
|
6
|
+
private readonly moduleAccessRepository;
|
|
7
|
+
private readonly menuRepository;
|
|
8
|
+
private readonly dataSource;
|
|
9
|
+
private readonly listMasterService;
|
|
10
|
+
constructor(moduleAccessRepository: ModuleAccessRepository, menuRepository: MenuRepository, dataSource: DataSource, listMasterService: ListMasterService);
|
|
11
|
+
getModules({ appcode }: {
|
|
12
|
+
appcode: string;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
label: string;
|
|
15
|
+
value: number;
|
|
16
|
+
group: string;
|
|
17
|
+
}[]>;
|
|
18
|
+
getRoles({ appcode, level_type, level_id, organization_id, include, }: {
|
|
19
|
+
appcode: string;
|
|
20
|
+
level_type?: string;
|
|
21
|
+
level_id?: number;
|
|
22
|
+
organization_id?: number;
|
|
23
|
+
include?: boolean;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
label: any;
|
|
26
|
+
value: any;
|
|
27
|
+
}[]>;
|
|
28
|
+
getAccessListing(roleIds: number[], appcode: string, levelType: string, level_id?: number): Promise<any>;
|
|
29
|
+
getMenuListing(mainModIds: string[], appcode: string, levelType: string): Promise<Record<string, any[]>>;
|
|
30
|
+
updateModuleAccess(moduleAccessData: {
|
|
31
|
+
role_code: string;
|
|
32
|
+
module_code: string;
|
|
33
|
+
action_type: string;
|
|
34
|
+
access_flag: number;
|
|
35
|
+
appcode: string;
|
|
36
|
+
level_type: string;
|
|
37
|
+
}[]): Promise<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
msg: string;
|
|
40
|
+
}>;
|
|
41
|
+
getModuleUIConfig(moduleCode: string, roleIds: number[]): Promise<{
|
|
42
|
+
entity_type: string;
|
|
43
|
+
title: string;
|
|
44
|
+
ui_config: JSON;
|
|
45
|
+
action: string[];
|
|
46
|
+
}>;
|
|
47
|
+
getUserPermissions({ userId, appcode, level_type, level_id, organization_id, }: {
|
|
48
|
+
userId: number;
|
|
49
|
+
appcode: string;
|
|
50
|
+
level_type: string;
|
|
51
|
+
level_id: number;
|
|
52
|
+
organization_id: number;
|
|
53
|
+
}): Promise<{
|
|
54
|
+
action: any;
|
|
55
|
+
access: any;
|
|
56
|
+
code: any;
|
|
57
|
+
level_type: any;
|
|
58
|
+
appcode: any;
|
|
59
|
+
}[]>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ModuleAccessService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const module_access_repository_1 = require("../repository/module-access.repository");
|
|
18
|
+
const global_constant_1 = require("../../../constant/global.constant");
|
|
19
|
+
const typeorm_1 = require("typeorm");
|
|
20
|
+
const menu_repository_1 = require("../repository/menu.repository");
|
|
21
|
+
const list_master_service_1 = require("../../listmaster/service/list-master.service");
|
|
22
|
+
let ModuleAccessService = class ModuleAccessService {
|
|
23
|
+
constructor(moduleAccessRepository, menuRepository, dataSource, listMasterService) {
|
|
24
|
+
this.moduleAccessRepository = moduleAccessRepository;
|
|
25
|
+
this.menuRepository = menuRepository;
|
|
26
|
+
this.dataSource = dataSource;
|
|
27
|
+
this.listMasterService = listMasterService;
|
|
28
|
+
}
|
|
29
|
+
async getModules({ appcode }) {
|
|
30
|
+
return this.moduleAccessRepository.getModules({
|
|
31
|
+
appcode,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
async getRoles({ appcode, level_type, level_id, organization_id, include, }) {
|
|
35
|
+
const query = this.dataSource
|
|
36
|
+
.createQueryBuilder()
|
|
37
|
+
.select('*')
|
|
38
|
+
.from('sso_role', 'role')
|
|
39
|
+
.where('role.appcode = :appcode', { appcode });
|
|
40
|
+
if (!include) {
|
|
41
|
+
query.andWhere('(role.is_factory IS NULL OR role.is_factory != 1)');
|
|
42
|
+
}
|
|
43
|
+
if (level_type) {
|
|
44
|
+
query.andWhere('role.level_type = :level_type', { level_type });
|
|
45
|
+
}
|
|
46
|
+
if (organization_id) {
|
|
47
|
+
query.andWhere('role.organization_id = :organization_id', {
|
|
48
|
+
organization_id,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (level_id !== undefined) {
|
|
52
|
+
query.andWhere('role.level_id = :level_id', {
|
|
53
|
+
level_id: String(level_id),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const roles = await query.getRawMany();
|
|
57
|
+
return roles.map((role) => ({
|
|
58
|
+
label: role.name,
|
|
59
|
+
value: role.id,
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
async getAccessListing(roleIds, appcode, levelType, level_id) {
|
|
63
|
+
return this.moduleAccessRepository.getAccessListing(roleIds, appcode, levelType, level_id);
|
|
64
|
+
}
|
|
65
|
+
async getMenuListing(mainModIds, appcode, levelType) {
|
|
66
|
+
if (!appcode) {
|
|
67
|
+
throw new common_1.BadRequestException('Appcode is required');
|
|
68
|
+
}
|
|
69
|
+
return this.moduleAccessRepository.getAllModulesByLevel(mainModIds, appcode, levelType);
|
|
70
|
+
}
|
|
71
|
+
async updateModuleAccess(moduleAccessData) {
|
|
72
|
+
if (!moduleAccessData || moduleAccessData.length === 0) {
|
|
73
|
+
return { success: false, msg: 'No data provided' };
|
|
74
|
+
}
|
|
75
|
+
const result = await this.moduleAccessRepository.updateModuleAccess(moduleAccessData);
|
|
76
|
+
if (result) {
|
|
77
|
+
return { success: true, msg: 'Module access updated successfully' };
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return { success: false, msg: 'Failed to update module access' };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async getModuleUIConfig(moduleCode, roleIds) {
|
|
84
|
+
return this.moduleAccessRepository.getModuleUIConfig(moduleCode, roleIds);
|
|
85
|
+
}
|
|
86
|
+
async getUserPermissions({ userId, appcode, level_type, level_id, organization_id, }) {
|
|
87
|
+
console.log('step 1', userId, appcode, level_type, level_id, organization_id);
|
|
88
|
+
const roleCodes = await this.menuRepository.resolveUserRoles(userId, appcode, level_type, level_id);
|
|
89
|
+
console.log(roleCodes, 'roleCodes');
|
|
90
|
+
if (!roleCodes || roleCodes.length === 0) {
|
|
91
|
+
return [];
|
|
92
|
+
}
|
|
93
|
+
const roleIds = roleCodes.map(Number);
|
|
94
|
+
console.log('step 2', roleIds);
|
|
95
|
+
const allPermissions = await this.moduleAccessRepository.getModuleAccessByRoles(roleIds, appcode);
|
|
96
|
+
console.log('step 2', allPermissions);
|
|
97
|
+
if (level_type === 'SCH') {
|
|
98
|
+
const result = await this.dataSource.query(`SELECT * FROM eth_school_profile WHERE id = ${level_id}`, [level_id]);
|
|
99
|
+
const school = result?.[0];
|
|
100
|
+
console.log('step 3', school);
|
|
101
|
+
const resolveStatus = await this.listMasterService.getResolvedListCode(global_constant_1.STATUS_INACTIVE, organization_id || 0);
|
|
102
|
+
if (!school || school.status == resolveStatus.id) {
|
|
103
|
+
return allPermissions.filter((perm) => perm.action === 'VIEW');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
console.log('step 4', allPermissions);
|
|
107
|
+
return allPermissions;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
exports.ModuleAccessService = ModuleAccessService;
|
|
111
|
+
exports.ModuleAccessService = ModuleAccessService = __decorate([
|
|
112
|
+
(0, common_1.Injectable)(),
|
|
113
|
+
__param(3, (0, common_1.Inject)('ListMasterService')),
|
|
114
|
+
__metadata("design:paramtypes", [module_access_repository_1.ModuleAccessRepository,
|
|
115
|
+
menu_repository_1.MenuRepository,
|
|
116
|
+
typeorm_1.DataSource,
|
|
117
|
+
list_master_service_1.ListMasterService])
|
|
118
|
+
], ModuleAccessService);
|
|
119
|
+
//# sourceMappingURL=module-access.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-access.service.js","sourceRoot":"","sources":["../../../../src/module/module/service/module-access.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyE;AACzE,qFAAgF;AAGhF,uEAG2C;AAE3C,qCAAoD;AAEpD,mEAA+D;AAC/D,sFAAsF;AAG/E,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,sBAA8C,EAC9C,cA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AC,MAAM,IAAI,aAAa,CAAC,EAAE,EAAE,CAAC;gBAEjD,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QAEtC,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAjMY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAA;qCAHa,iDAAsB;QAC9B,gCAAc;QAClB,oBAAU;QAEH,uCAAiB;GAN5C,mBAAmB,CAiM/B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NotificationsService } from '../service/notification.service';
|
|
2
|
+
export declare class NotificationsController {
|
|
3
|
+
private readonly notificationsService;
|
|
4
|
+
constructor(notificationsService: NotificationsService);
|
|
5
|
+
registerToken(body: {
|
|
6
|
+
userId?: string;
|
|
7
|
+
token: string;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
success: boolean;
|
|
10
|
+
token: string;
|
|
11
|
+
}>;
|
|
12
|
+
sendNotification(body: {
|
|
13
|
+
token: string;
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
data?: Record<string, any>;
|
|
17
|
+
}): Promise<string>;
|
|
18
|
+
getNotifications(req: any, filterQuery: any): Promise<any>;
|
|
19
|
+
markAllAsRead(req: any): Promise<{
|
|
20
|
+
success: boolean;
|
|
21
|
+
affectedRows: any;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.NotificationsController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const jwt_guard_1 = require("../../auth/guards/jwt.guard");
|
|
18
|
+
const notification_service_1 = require("../service/notification.service");
|
|
19
|
+
let NotificationsController = class NotificationsController {
|
|
20
|
+
constructor(notificationsService) {
|
|
21
|
+
this.notificationsService = notificationsService;
|
|
22
|
+
}
|
|
23
|
+
async registerToken(body) {
|
|
24
|
+
return this.notificationsService.saveToken(body.userId, body.token);
|
|
25
|
+
}
|
|
26
|
+
async sendNotification(body) {
|
|
27
|
+
return this.notificationsService.sendToDevice(body.token, body.title, body.message, body.data);
|
|
28
|
+
}
|
|
29
|
+
async getNotifications(req, filterQuery) {
|
|
30
|
+
const loggedInUser = req.user.userData;
|
|
31
|
+
return this.notificationsService.getAllNotifications(loggedInUser, filterQuery);
|
|
32
|
+
}
|
|
33
|
+
async markAllAsRead(req) {
|
|
34
|
+
const loggedInUser = req.user.userData;
|
|
35
|
+
return this.notificationsService.markAllAsRead(loggedInUser);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.NotificationsController = NotificationsController;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, common_1.Post)('register-token'),
|
|
41
|
+
__param(0, (0, common_1.Body)()),
|
|
42
|
+
__metadata("design:type", Function),
|
|
43
|
+
__metadata("design:paramtypes", [Object]),
|
|
44
|
+
__metadata("design:returntype", Promise)
|
|
45
|
+
], NotificationsController.prototype, "registerToken", null);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, common_1.Post)('send'),
|
|
48
|
+
__param(0, (0, common_1.Body)()),
|
|
49
|
+
__metadata("design:type", Function),
|
|
50
|
+
__metadata("design:paramtypes", [Object]),
|
|
51
|
+
__metadata("design:returntype", Promise)
|
|
52
|
+
], NotificationsController.prototype, "sendNotification", null);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, common_1.Get)('all'),
|
|
55
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
56
|
+
__param(0, (0, common_1.Req)()),
|
|
57
|
+
__param(1, (0, common_1.Query)()),
|
|
58
|
+
__metadata("design:type", Function),
|
|
59
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
60
|
+
__metadata("design:returntype", Promise)
|
|
61
|
+
], NotificationsController.prototype, "getNotifications", null);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, common_1.Post)('mark-all-read'),
|
|
64
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
65
|
+
__param(0, (0, common_1.Req)()),
|
|
66
|
+
__metadata("design:type", Function),
|
|
67
|
+
__metadata("design:paramtypes", [Object]),
|
|
68
|
+
__metadata("design:returntype", Promise)
|
|
69
|
+
], NotificationsController.prototype, "markAllAsRead", null);
|
|
70
|
+
exports.NotificationsController = NotificationsController = __decorate([
|
|
71
|
+
(0, common_1.Controller)('notifications'),
|
|
72
|
+
__metadata("design:paramtypes", [notification_service_1.NotificationsService])
|
|
73
|
+
], NotificationsController);
|
|
74
|
+
//# sourceMappingURL=notification.controller.js.map
|