acomm-core-lib 2.6.2
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/README.md +75 -0
- package/dist/package.json +125 -0
- package/dist/src/app.controller.d.ts +8 -0
- package/dist/src/app.controller.js +69 -0
- package/dist/src/app.controller.js.map +1 -0
- package/dist/src/app.module.d.ts +2 -0
- package/dist/src/app.module.js +151 -0
- package/dist/src/app.module.js.map +1 -0
- package/dist/src/app.service.d.ts +5 -0
- package/dist/src/app.service.js +30 -0
- package/dist/src/app.service.js.map +1 -0
- package/dist/src/app_cluster.service.d.ts +3 -0
- package/dist/src/app_cluster.service.js +64 -0
- package/dist/src/app_cluster.service.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.enum.d.ts +31 -0
- package/dist/src/core/activity_log/activity_log.enum.js +38 -0
- package/dist/src/core/activity_log/activity_log.enum.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.layout.d.ts +2 -0
- package/dist/src/core/activity_log/activity_log.layout.js +331 -0
- package/dist/src/core/activity_log/activity_log.layout.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.module.d.ts +2 -0
- package/dist/src/core/activity_log/activity_log.module.js +39 -0
- package/dist/src/core/activity_log/activity_log.module.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.schema.d.ts +24 -0
- package/dist/src/core/activity_log/activity_log.schema.js +117 -0
- package/dist/src/core/activity_log/activity_log.schema.js.map +1 -0
- package/dist/src/core/activity_log/activity_log.service.d.ts +14 -0
- package/dist/src/core/activity_log/activity_log.service.js +58 -0
- package/dist/src/core/activity_log/activity_log.service.js.map +1 -0
- package/dist/src/core/address/address.enum.d.ts +8 -0
- package/dist/src/core/address/address.enum.js +13 -0
- package/dist/src/core/address/address.enum.js.map +1 -0
- package/dist/src/core/address/address.layout.d.ts +7 -0
- package/dist/src/core/address/address.layout.js +1297 -0
- package/dist/src/core/address/address.layout.js.map +1 -0
- package/dist/src/core/address/address.module.d.ts +2 -0
- package/dist/src/core/address/address.module.js +87 -0
- package/dist/src/core/address/address.module.js.map +1 -0
- package/dist/src/core/address/address.schema.d.ts +69 -0
- package/dist/src/core/address/address.schema.js +267 -0
- package/dist/src/core/address/address.schema.js.map +1 -0
- package/dist/src/core/address/address.service.d.ts +49 -0
- package/dist/src/core/address/address.service.js +171 -0
- package/dist/src/core/address/address.service.js.map +1 -0
- package/dist/src/core/address/data/country.json +1484 -0
- package/dist/src/core/address/data/time_zone.json +1702 -0
- package/dist/src/core/api_key/api_key.constant.d.ts +29 -0
- package/dist/src/core/api_key/api_key.constant.js +34 -0
- package/dist/src/core/api_key/api_key.constant.js.map +1 -0
- package/dist/src/core/api_key/api_key.controller.d.ts +8 -0
- package/dist/src/core/api_key/api_key.controller.js +60 -0
- package/dist/src/core/api_key/api_key.controller.js.map +1 -0
- package/dist/src/core/api_key/api_key.enum.d.ts +5 -0
- package/dist/src/core/api_key/api_key.enum.js +10 -0
- package/dist/src/core/api_key/api_key.enum.js.map +1 -0
- package/dist/src/core/api_key/api_key.layout.d.ts +2 -0
- package/dist/src/core/api_key/api_key.layout.js +1133 -0
- package/dist/src/core/api_key/api_key.layout.js.map +1 -0
- package/dist/src/core/api_key/api_key.module.d.ts +2 -0
- package/dist/src/core/api_key/api_key.module.js +40 -0
- package/dist/src/core/api_key/api_key.module.js.map +1 -0
- package/dist/src/core/api_key/api_key.schema.d.ts +42 -0
- package/dist/src/core/api_key/api_key.schema.js +189 -0
- package/dist/src/core/api_key/api_key.schema.js.map +1 -0
- package/dist/src/core/api_key/api_key.service.d.ts +23 -0
- package/dist/src/core/api_key/api_key.service.js +278 -0
- package/dist/src/core/api_key/api_key.service.js.map +1 -0
- package/dist/src/core/attachment/attachment.config.d.ts +4 -0
- package/dist/src/core/attachment/attachment.config.js +8 -0
- package/dist/src/core/attachment/attachment.config.js.map +1 -0
- package/dist/src/core/attachment/attachment.controller.d.ts +15 -0
- package/dist/src/core/attachment/attachment.controller.js +141 -0
- package/dist/src/core/attachment/attachment.controller.js.map +1 -0
- package/dist/src/core/attachment/attachment.enum.d.ts +22 -0
- package/dist/src/core/attachment/attachment.enum.js +28 -0
- package/dist/src/core/attachment/attachment.enum.js.map +1 -0
- package/dist/src/core/attachment/attachment.layout.d.ts +2 -0
- package/dist/src/core/attachment/attachment.layout.js +100 -0
- package/dist/src/core/attachment/attachment.layout.js.map +1 -0
- package/dist/src/core/attachment/attachment.module.d.ts +2 -0
- package/dist/src/core/attachment/attachment.module.js +42 -0
- package/dist/src/core/attachment/attachment.module.js.map +1 -0
- package/dist/src/core/attachment/attachment.schema.d.ts +26 -0
- package/dist/src/core/attachment/attachment.schema.js +131 -0
- package/dist/src/core/attachment/attachment.schema.js.map +1 -0
- package/dist/src/core/attachment/attachment.service.d.ts +38 -0
- package/dist/src/core/attachment/attachment.service.js +417 -0
- package/dist/src/core/attachment/attachment.service.js.map +1 -0
- package/dist/src/core/attachment/providers/local.provider.d.ts +14 -0
- package/dist/src/core/attachment/providers/local.provider.js +71 -0
- package/dist/src/core/attachment/providers/local.provider.js.map +1 -0
- package/dist/src/core/attachment/providers/provider.base.d.ts +6 -0
- package/dist/src/core/attachment/providers/provider.base.js +16 -0
- package/dist/src/core/attachment/providers/provider.base.js.map +1 -0
- package/dist/src/core/attachment/providers/provider.interface.d.ts +5 -0
- package/dist/src/core/attachment/providers/provider.interface.js +3 -0
- package/dist/src/core/attachment/providers/provider.interface.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.enum.d.ts +48 -0
- package/dist/src/core/audit_log/audit_log.enum.js +54 -0
- package/dist/src/core/audit_log/audit_log.enum.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.layout.d.ts +2 -0
- package/dist/src/core/audit_log/audit_log.layout.js +372 -0
- package/dist/src/core/audit_log/audit_log.layout.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.module.d.ts +2 -0
- package/dist/src/core/audit_log/audit_log.module.js +39 -0
- package/dist/src/core/audit_log/audit_log.module.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.schema.d.ts +14 -0
- package/dist/src/core/audit_log/audit_log.schema.js +67 -0
- package/dist/src/core/audit_log/audit_log.schema.js.map +1 -0
- package/dist/src/core/audit_log/audit_log.service.d.ts +14 -0
- package/dist/src/core/audit_log/audit_log.service.js +68 -0
- package/dist/src/core/audit_log/audit_log.service.js.map +1 -0
- package/dist/src/core/auth/auth.controller.d.ts +22 -0
- package/dist/src/core/auth/auth.controller.js +266 -0
- package/dist/src/core/auth/auth.controller.js.map +1 -0
- package/dist/src/core/auth/auth.module.d.ts +2 -0
- package/dist/src/core/auth/auth.module.js +37 -0
- package/dist/src/core/auth/auth.module.js.map +1 -0
- package/dist/src/core/auth/auth.service.d.ts +87 -0
- package/dist/src/core/auth/auth.service.js +930 -0
- package/dist/src/core/auth/auth.service.js.map +1 -0
- package/dist/src/core/auth/constants.d.ts +7 -0
- package/dist/src/core/auth/constants.js +9 -0
- package/dist/src/core/auth/constants.js.map +1 -0
- package/dist/src/core/auth/guards/basic.guard.d.ts +1 -0
- package/dist/src/core/auth/guards/basic.guard.js +7 -0
- package/dist/src/core/auth/guards/basic.guard.js.map +1 -0
- package/dist/src/core/auth/guards/jwt_auth.guard.d.ts +19 -0
- package/dist/src/core/auth/guards/jwt_auth.guard.js +526 -0
- package/dist/src/core/auth/guards/jwt_auth.guard.js.map +1 -0
- package/dist/src/core/auth/guards/public.guard.d.ts +1 -0
- package/dist/src/core/auth/guards/public.guard.js +7 -0
- package/dist/src/core/auth/guards/public.guard.js.map +1 -0
- package/dist/src/core/auth/providers/auth_local.provider.d.ts +13 -0
- package/dist/src/core/auth/providers/auth_local.provider.js +75 -0
- package/dist/src/core/auth/providers/auth_local.provider.js.map +1 -0
- package/dist/src/core/auth/providers/auth_otp.provider.d.ts +13 -0
- package/dist/src/core/auth/providers/auth_otp.provider.js +77 -0
- package/dist/src/core/auth/providers/auth_otp.provider.js.map +1 -0
- package/dist/src/core/auth/providers/auth_provider.interface.d.ts +12 -0
- package/dist/src/core/auth/providers/auth_provider.interface.js +3 -0
- package/dist/src/core/auth/providers/auth_provider.interface.js.map +1 -0
- package/dist/src/core/auth/providers/base_auth.provider.d.ts +7 -0
- package/dist/src/core/auth/providers/base_auth.provider.js +25 -0
- package/dist/src/core/auth/providers/base_auth.provider.js.map +1 -0
- package/dist/src/core/auth/strategies/jwt.strategy.d.ts +6 -0
- package/dist/src/core/auth/strategies/jwt.strategy.js +37 -0
- package/dist/src/core/auth/strategies/jwt.strategy.js.map +1 -0
- package/dist/src/core/cache/cache.controller.d.ts +13 -0
- package/dist/src/core/cache/cache.controller.js +67 -0
- package/dist/src/core/cache/cache.controller.js.map +1 -0
- package/dist/src/core/cache/cache.decorator.d.ts +1 -0
- package/dist/src/core/cache/cache.decorator.js +7 -0
- package/dist/src/core/cache/cache.decorator.js.map +1 -0
- package/dist/src/core/cache/cache.interceptor.d.ts +8 -0
- package/dist/src/core/cache/cache.interceptor.js +57 -0
- package/dist/src/core/cache/cache.interceptor.js.map +1 -0
- package/dist/src/core/cache/cache.module.d.ts +2 -0
- package/dist/src/core/cache/cache.module.js +29 -0
- package/dist/src/core/cache/cache.module.js.map +1 -0
- package/dist/src/core/cache/cache.service.d.ts +15 -0
- package/dist/src/core/cache/cache.service.js +60 -0
- package/dist/src/core/cache/cache.service.js.map +1 -0
- package/dist/src/core/cache/cache.utils.d.ts +12 -0
- package/dist/src/core/cache/cache.utils.js +116 -0
- package/dist/src/core/cache/cache.utils.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.controller.d.ts +8 -0
- package/dist/src/core/comment_data/comment_data.controller.js +56 -0
- package/dist/src/core/comment_data/comment_data.controller.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.layout.d.ts +2 -0
- package/dist/src/core/comment_data/comment_data.layout.js +274 -0
- package/dist/src/core/comment_data/comment_data.layout.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.module.d.ts +2 -0
- package/dist/src/core/comment_data/comment_data.module.js +40 -0
- package/dist/src/core/comment_data/comment_data.module.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.schema.d.ts +13 -0
- package/dist/src/core/comment_data/comment_data.schema.js +53 -0
- package/dist/src/core/comment_data/comment_data.schema.js.map +1 -0
- package/dist/src/core/comment_data/comment_data.service.d.ts +15 -0
- package/dist/src/core/comment_data/comment_data.service.js +63 -0
- package/dist/src/core/comment_data/comment_data.service.js.map +1 -0
- package/dist/src/core/common/base/base.controller.d.ts +42 -0
- package/dist/src/core/common/base/base.controller.js +440 -0
- package/dist/src/core/common/base/base.controller.js.map +1 -0
- package/dist/src/core/common/base/base.schema.d.ts +12 -0
- package/dist/src/core/common/base/base.schema.js +61 -0
- package/dist/src/core/common/base/base.schema.js.map +1 -0
- package/dist/src/core/common/base/base.service.d.ts +87 -0
- package/dist/src/core/common/base/base.service.js +1218 -0
- package/dist/src/core/common/base/base.service.js.map +1 -0
- package/dist/src/core/common/base/base_external_data_source.provider.d.ts +18 -0
- package/dist/src/core/common/base/base_external_data_source.provider.js +50 -0
- package/dist/src/core/common/base/base_external_data_source.provider.js.map +1 -0
- package/dist/src/core/common/base/base_log.controller.d.ts +7 -0
- package/dist/src/core/common/base/base_log.controller.js +35 -0
- package/dist/src/core/common/base/base_log.controller.js.map +1 -0
- package/dist/src/core/common/base/base_log.service.d.ts +13 -0
- package/dist/src/core/common/base/base_log.service.js +142 -0
- package/dist/src/core/common/base/base_log.service.js.map +1 -0
- package/dist/src/core/common/base/base_module.controller.d.ts +9 -0
- package/dist/src/core/common/base/base_module.controller.js +63 -0
- package/dist/src/core/common/base/base_module.controller.js.map +1 -0
- package/dist/src/core/common/base/base_module.service.d.ts +20 -0
- package/dist/src/core/common/base/base_module.service.js +56 -0
- package/dist/src/core/common/base/base_module.service.js.map +1 -0
- package/dist/src/core/common/constants.d.ts +57 -0
- package/dist/src/core/common/constants.js +98 -0
- package/dist/src/core/common/constants.js.map +1 -0
- package/dist/src/core/common/decorator/safe_params.decorator.d.ts +1 -0
- package/dist/src/core/common/decorator/safe_params.decorator.js +11 -0
- package/dist/src/core/common/decorator/safe_params.decorator.js.map +1 -0
- package/dist/src/core/common/dto/search_query.dto.d.ts +6 -0
- package/dist/src/core/common/dto/search_query.dto.js +7 -0
- package/dist/src/core/common/dto/search_query.dto.js.map +1 -0
- package/dist/src/core/common/dto/search_result.dto.d.ts +7 -0
- package/dist/src/core/common/dto/search_result.dto.js +7 -0
- package/dist/src/core/common/dto/search_result.dto.js.map +1 -0
- package/dist/src/core/common/filter/all_exception.filter.d.ts +4 -0
- package/dist/src/core/common/filter/all_exception.filter.js +31 -0
- package/dist/src/core/common/filter/all_exception.filter.js.map +1 -0
- package/dist/src/core/common/function/andConditions.d.ts +12 -0
- package/dist/src/core/common/function/andConditions.js +17 -0
- package/dist/src/core/common/function/andConditions.js.map +1 -0
- package/dist/src/core/common/function/autoGenerateO2M.d.ts +14 -0
- package/dist/src/core/common/function/autoGenerateO2M.js +57 -0
- package/dist/src/core/common/function/autoGenerateO2M.js.map +1 -0
- package/dist/src/core/common/function/cleanData.d.ts +9 -0
- package/dist/src/core/common/function/cleanData.js +23 -0
- package/dist/src/core/common/function/cleanData.js.map +1 -0
- package/dist/src/core/common/function/convertArrayObjToField.d.ts +17 -0
- package/dist/src/core/common/function/convertArrayObjToField.js +23 -0
- package/dist/src/core/common/function/convertArrayObjToField.js.map +1 -0
- package/dist/src/core/common/function/convertArrayToO2M.d.ts +13 -0
- package/dist/src/core/common/function/convertArrayToO2M.js +23 -0
- package/dist/src/core/common/function/convertArrayToO2M.js.map +1 -0
- package/dist/src/core/common/function/convertArrayToOption.d.ts +12 -0
- package/dist/src/core/common/function/convertArrayToOption.js +34 -0
- package/dist/src/core/common/function/convertArrayToOption.js.map +1 -0
- package/dist/src/core/common/function/convertAttributeArray.d.ts +12 -0
- package/dist/src/core/common/function/convertAttributeArray.js +29 -0
- package/dist/src/core/common/function/convertAttributeArray.js.map +1 -0
- package/dist/src/core/common/function/convertDate.d.ts +17 -0
- package/dist/src/core/common/function/convertDate.js +39 -0
- package/dist/src/core/common/function/convertDate.js.map +1 -0
- package/dist/src/core/common/function/convertImage.d.ts +17 -0
- package/dist/src/core/common/function/convertImage.js +18 -0
- package/dist/src/core/common/function/convertImage.js.map +1 -0
- package/dist/src/core/common/function/convertJSONAttrToO2M.d.ts +14 -0
- package/dist/src/core/common/function/convertJSONAttrToO2M.js +79 -0
- package/dist/src/core/common/function/convertJSONAttrToO2M.js.map +1 -0
- package/dist/src/core/common/function/convertStringDate.d.ts +12 -0
- package/dist/src/core/common/function/convertStringDate.js +23 -0
- package/dist/src/core/common/function/convertStringDate.js.map +1 -0
- package/dist/src/core/common/function/convertTime.d.ts +12 -0
- package/dist/src/core/common/function/convertTime.js +41 -0
- package/dist/src/core/common/function/convertTime.js.map +1 -0
- package/dist/src/core/common/function/convertTimestampToDate.d.ts +13 -0
- package/dist/src/core/common/function/convertTimestampToDate.js +14 -0
- package/dist/src/core/common/function/convertTimestampToDate.js.map +1 -0
- package/dist/src/core/common/function/convertToJSONStructure.d.ts +12 -0
- package/dist/src/core/common/function/convertToJSONStructure.js +23 -0
- package/dist/src/core/common/function/convertToJSONStructure.js.map +1 -0
- package/dist/src/core/common/function/convertXMLArray.d.ts +12 -0
- package/dist/src/core/common/function/convertXMLArray.js +81 -0
- package/dist/src/core/common/function/convertXMLArray.js.map +1 -0
- package/dist/src/core/common/function/convertXMLObject.d.ts +12 -0
- package/dist/src/core/common/function/convertXMLObject.js +62 -0
- package/dist/src/core/common/function/convertXMLObject.js.map +1 -0
- package/dist/src/core/common/function/currency.d.ts +12 -0
- package/dist/src/core/common/function/currency.js +49 -0
- package/dist/src/core/common/function/currency.js.map +1 -0
- package/dist/src/core/common/function/currentDate.d.ts +12 -0
- package/dist/src/core/common/function/currentDate.js +34 -0
- package/dist/src/core/common/function/currentDate.js.map +1 -0
- package/dist/src/core/common/function/customSplit.d.ts +12 -0
- package/dist/src/core/common/function/customSplit.js +21 -0
- package/dist/src/core/common/function/customSplit.js.map +1 -0
- package/dist/src/core/common/function/dateIso.d.ts +13 -0
- package/dist/src/core/common/function/dateIso.js +19 -0
- package/dist/src/core/common/function/dateIso.js.map +1 -0
- package/dist/src/core/common/function/defaultType.json +23 -0
- package/dist/src/core/common/function/findData.d.ts +12 -0
- package/dist/src/core/common/function/findData.js +33 -0
- package/dist/src/core/common/function/findData.js.map +1 -0
- package/dist/src/core/common/function/findKeyValueArray.d.ts +12 -0
- package/dist/src/core/common/function/findKeyValueArray.js +29 -0
- package/dist/src/core/common/function/findKeyValueArray.js.map +1 -0
- package/dist/src/core/common/function/formatDate.d.ts +12 -0
- package/dist/src/core/common/function/formatDate.js +34 -0
- package/dist/src/core/common/function/formatDate.js.map +1 -0
- package/dist/src/core/common/function/freeStyle.d.ts +9 -0
- package/dist/src/core/common/function/freeStyle.js +13 -0
- package/dist/src/core/common/function/freeStyle.js.map +1 -0
- package/dist/src/core/common/function/generateBarcode.d.ts +17 -0
- package/dist/src/core/common/function/generateBarcode.js +34 -0
- package/dist/src/core/common/function/generateBarcode.js.map +1 -0
- package/dist/src/core/common/function/generateFilters.d.ts +12 -0
- package/dist/src/core/common/function/generateFilters.js +18 -0
- package/dist/src/core/common/function/generateFilters.js.map +1 -0
- package/dist/src/core/common/function/generateUUID.d.ts +9 -0
- package/dist/src/core/common/function/generateUUID.js +14 -0
- package/dist/src/core/common/function/generateUUID.js.map +1 -0
- package/dist/src/core/common/function/get.d.ts +17 -0
- package/dist/src/core/common/function/get.js +28 -0
- package/dist/src/core/common/function/get.js.map +1 -0
- package/dist/src/core/common/function/getCompany.d.ts +14 -0
- package/dist/src/core/common/function/getCompany.js +26 -0
- package/dist/src/core/common/function/getCompany.js.map +1 -0
- package/dist/src/core/common/function/getCurrentCollapseData.d.ts +13 -0
- package/dist/src/core/common/function/getCurrentCollapseData.js +22 -0
- package/dist/src/core/common/function/getCurrentCollapseData.js.map +1 -0
- package/dist/src/core/common/function/getCurrentDate.d.ts +12 -0
- package/dist/src/core/common/function/getCurrentDate.js +16 -0
- package/dist/src/core/common/function/getCurrentDate.js.map +1 -0
- package/dist/src/core/common/function/getCurrentFilters.d.ts +9 -0
- package/dist/src/core/common/function/getCurrentFilters.js +14 -0
- package/dist/src/core/common/function/getCurrentFilters.js.map +1 -0
- package/dist/src/core/common/function/getCurrentForm.d.ts +12 -0
- package/dist/src/core/common/function/getCurrentForm.js +18 -0
- package/dist/src/core/common/function/getCurrentForm.js.map +1 -0
- package/dist/src/core/common/function/getCurrentId.d.ts +9 -0
- package/dist/src/core/common/function/getCurrentId.js +14 -0
- package/dist/src/core/common/function/getCurrentId.js.map +1 -0
- package/dist/src/core/common/function/getCurrentIndexData.d.ts +12 -0
- package/dist/src/core/common/function/getCurrentIndexData.js +18 -0
- package/dist/src/core/common/function/getCurrentIndexData.js.map +1 -0
- package/dist/src/core/common/function/getDocument.d.ts +13 -0
- package/dist/src/core/common/function/getDocument.js +16 -0
- package/dist/src/core/common/function/getDocument.js.map +1 -0
- package/dist/src/core/common/function/getEndExportdate.d.ts +17 -0
- package/dist/src/core/common/function/getEndExportdate.js +32 -0
- package/dist/src/core/common/function/getEndExportdate.js.map +1 -0
- package/dist/src/core/common/function/getEntityId.d.ts +12 -0
- package/dist/src/core/common/function/getEntityId.js +15 -0
- package/dist/src/core/common/function/getEntityId.js.map +1 -0
- package/dist/src/core/common/function/getEntityRecord.d.ts +12 -0
- package/dist/src/core/common/function/getEntityRecord.js +42 -0
- package/dist/src/core/common/function/getEntityRecord.js.map +1 -0
- package/dist/src/core/common/function/getErrors.d.ts +12 -0
- package/dist/src/core/common/function/getErrors.js +17 -0
- package/dist/src/core/common/function/getErrors.js.map +1 -0
- package/dist/src/core/common/function/getGlobalSetting.d.ts +12 -0
- package/dist/src/core/common/function/getGlobalSetting.js +21 -0
- package/dist/src/core/common/function/getGlobalSetting.js.map +1 -0
- package/dist/src/core/common/function/getHeaders.d.ts +13 -0
- package/dist/src/core/common/function/getHeaders.js +28 -0
- package/dist/src/core/common/function/getHeaders.js.map +1 -0
- package/dist/src/core/common/function/getJSONData.d.ts +13 -0
- package/dist/src/core/common/function/getJSONData.js +17 -0
- package/dist/src/core/common/function/getJSONData.js.map +1 -0
- package/dist/src/core/common/function/getJSONKeys.d.ts +17 -0
- package/dist/src/core/common/function/getJSONKeys.js +24 -0
- package/dist/src/core/common/function/getJSONKeys.js.map +1 -0
- package/dist/src/core/common/function/getMimeType.d.ts +12 -0
- package/dist/src/core/common/function/getMimeType.js +20 -0
- package/dist/src/core/common/function/getMimeType.js.map +1 -0
- package/dist/src/core/common/function/getNameFromUrl.d.ts +12 -0
- package/dist/src/core/common/function/getNameFromUrl.js +19 -0
- package/dist/src/core/common/function/getNameFromUrl.js.map +1 -0
- package/dist/src/core/common/function/getObjectData.d.ts +12 -0
- package/dist/src/core/common/function/getObjectData.js +27 -0
- package/dist/src/core/common/function/getObjectData.js.map +1 -0
- package/dist/src/core/common/function/getOptionFromApi.d.ts +17 -0
- package/dist/src/core/common/function/getOptionFromApi.js +24 -0
- package/dist/src/core/common/function/getOptionFromApi.js.map +1 -0
- package/dist/src/core/common/function/getOptions.d.ts +12 -0
- package/dist/src/core/common/function/getOptions.js +18 -0
- package/dist/src/core/common/function/getOptions.js.map +1 -0
- package/dist/src/core/common/function/getOriginalData.d.ts +17 -0
- package/dist/src/core/common/function/getOriginalData.js +18 -0
- package/dist/src/core/common/function/getOriginalData.js.map +1 -0
- package/dist/src/core/common/function/getParentData.d.ts +13 -0
- package/dist/src/core/common/function/getParentData.js +14 -0
- package/dist/src/core/common/function/getParentData.js.map +1 -0
- package/dist/src/core/common/function/getProfile.d.ts +13 -0
- package/dist/src/core/common/function/getProfile.js +30 -0
- package/dist/src/core/common/function/getProfile.js.map +1 -0
- package/dist/src/core/common/function/getProfileImage.d.ts +9 -0
- package/dist/src/core/common/function/getProfileImage.js +20 -0
- package/dist/src/core/common/function/getProfileImage.js.map +1 -0
- package/dist/src/core/common/function/getRawData.d.ts +12 -0
- package/dist/src/core/common/function/getRawData.js +17 -0
- package/dist/src/core/common/function/getRawData.js.map +1 -0
- package/dist/src/core/common/function/getRequestData.d.ts +11 -0
- package/dist/src/core/common/function/getRequestData.js +16 -0
- package/dist/src/core/common/function/getRequestData.js.map +1 -0
- package/dist/src/core/common/function/getRequestStatus.d.ts +9 -0
- package/dist/src/core/common/function/getRequestStatus.js +14 -0
- package/dist/src/core/common/function/getRequestStatus.js.map +1 -0
- package/dist/src/core/common/function/getResponse.d.ts +12 -0
- package/dist/src/core/common/function/getResponse.js +17 -0
- package/dist/src/core/common/function/getResponse.js.map +1 -0
- package/dist/src/core/common/function/getResult.d.ts +12 -0
- package/dist/src/core/common/function/getResult.js +17 -0
- package/dist/src/core/common/function/getResult.js.map +1 -0
- package/dist/src/core/common/function/getRunningNumber.d.ts +12 -0
- package/dist/src/core/common/function/getRunningNumber.js +19 -0
- package/dist/src/core/common/function/getRunningNumber.js.map +1 -0
- package/dist/src/core/common/function/getSetting.d.ts +12 -0
- package/dist/src/core/common/function/getSetting.js +17 -0
- package/dist/src/core/common/function/getSetting.js.map +1 -0
- package/dist/src/core/common/function/getStartExportdate.d.ts +17 -0
- package/dist/src/core/common/function/getStartExportdate.js +34 -0
- package/dist/src/core/common/function/getStartExportdate.js.map +1 -0
- package/dist/src/core/common/function/getTableColumn.d.ts +13 -0
- package/dist/src/core/common/function/getTableColumn.js +57 -0
- package/dist/src/core/common/function/getTableColumn.js.map +1 -0
- package/dist/src/core/common/function/getTimeLogs.d.ts +12 -0
- package/dist/src/core/common/function/getTimeLogs.js +17 -0
- package/dist/src/core/common/function/getTimeLogs.js.map +1 -0
- package/dist/src/core/common/function/hideString.d.ts +12 -0
- package/dist/src/core/common/function/hideString.js +27 -0
- package/dist/src/core/common/function/hideString.js.map +1 -0
- package/dist/src/core/common/function/ifConditions.d.ts +12 -0
- package/dist/src/core/common/function/ifConditions.js +27 -0
- package/dist/src/core/common/function/ifConditions.js.map +1 -0
- package/dist/src/core/common/function/isEmpty.d.ts +12 -0
- package/dist/src/core/common/function/isEmpty.js +18 -0
- package/dist/src/core/common/function/isEmpty.js.map +1 -0
- package/dist/src/core/common/function/jsonArray.d.ts +12 -0
- package/dist/src/core/common/function/jsonArray.js +22 -0
- package/dist/src/core/common/function/jsonArray.js.map +1 -0
- package/dist/src/core/common/function/last.d.ts +17 -0
- package/dist/src/core/common/function/last.js +25 -0
- package/dist/src/core/common/function/last.js.map +1 -0
- package/dist/src/core/common/function/leftString.d.ts +12 -0
- package/dist/src/core/common/function/leftString.js +20 -0
- package/dist/src/core/common/function/leftString.js.map +1 -0
- package/dist/src/core/common/function/length.d.ts +13 -0
- package/dist/src/core/common/function/length.js +21 -0
- package/dist/src/core/common/function/length.js.map +1 -0
- package/dist/src/core/common/function/mapping.d.ts +1185 -0
- package/dist/src/core/common/function/mapping.js +206 -0
- package/dist/src/core/common/function/mapping.js.map +1 -0
- package/dist/src/core/common/function/multiply.d.ts +13 -0
- package/dist/src/core/common/function/multiply.js +17 -0
- package/dist/src/core/common/function/multiply.js.map +1 -0
- package/dist/src/core/common/function/negativeValue.d.ts +13 -0
- package/dist/src/core/common/function/negativeValue.js +23 -0
- package/dist/src/core/common/function/negativeValue.js.map +1 -0
- package/dist/src/core/common/function/notConditions.d.ts +12 -0
- package/dist/src/core/common/function/notConditions.js +17 -0
- package/dist/src/core/common/function/notConditions.js.map +1 -0
- package/dist/src/core/common/function/numberInWord.d.ts +17 -0
- package/dist/src/core/common/function/numberInWord.js +34 -0
- package/dist/src/core/common/function/numberInWord.js.map +1 -0
- package/dist/src/core/common/function/objectId.d.ts +13 -0
- package/dist/src/core/common/function/objectId.js +16 -0
- package/dist/src/core/common/function/objectId.js.map +1 -0
- package/dist/src/core/common/function/orConditions.d.ts +12 -0
- package/dist/src/core/common/function/orConditions.js +17 -0
- package/dist/src/core/common/function/orConditions.js.map +1 -0
- package/dist/src/core/common/function/padStart.d.ts +17 -0
- package/dist/src/core/common/function/padStart.js +18 -0
- package/dist/src/core/common/function/padStart.js.map +1 -0
- package/dist/src/core/common/function/random.d.ts +12 -0
- package/dist/src/core/common/function/random.js +29 -0
- package/dist/src/core/common/function/random.js.map +1 -0
- package/dist/src/core/common/function/randomBytes.d.ts +12 -0
- package/dist/src/core/common/function/randomBytes.js +17 -0
- package/dist/src/core/common/function/randomBytes.js.map +1 -0
- package/dist/src/core/common/function/replaceString.d.ts +12 -0
- package/dist/src/core/common/function/replaceString.js +22 -0
- package/dist/src/core/common/function/replaceString.js.map +1 -0
- package/dist/src/core/common/function/rightString.d.ts +12 -0
- package/dist/src/core/common/function/rightString.js +20 -0
- package/dist/src/core/common/function/rightString.js.map +1 -0
- package/dist/src/core/common/function/round.d.ts +12 -0
- package/dist/src/core/common/function/round.js +23 -0
- package/dist/src/core/common/function/round.js.map +1 -0
- package/dist/src/core/common/function/runningNumber.d.ts +12 -0
- package/dist/src/core/common/function/runningNumber.js +26 -0
- package/dist/src/core/common/function/runningNumber.js.map +1 -0
- package/dist/src/core/common/function/subString.d.ts +12 -0
- package/dist/src/core/common/function/subString.js +19 -0
- package/dist/src/core/common/function/subString.js.map +1 -0
- package/dist/src/core/common/function/sumBy.d.ts +13 -0
- package/dist/src/core/common/function/sumBy.js +24 -0
- package/dist/src/core/common/function/sumBy.js.map +1 -0
- package/dist/src/core/common/function/sumData.d.ts +13 -0
- package/dist/src/core/common/function/sumData.js +28 -0
- package/dist/src/core/common/function/sumData.js.map +1 -0
- package/dist/src/core/common/function/sumIf.d.ts +13 -0
- package/dist/src/core/common/function/sumIf.js +26 -0
- package/dist/src/core/common/function/sumIf.js.map +1 -0
- package/dist/src/core/common/function/sumValue.d.ts +12 -0
- package/dist/src/core/common/function/sumValue.js +26 -0
- package/dist/src/core/common/function/sumValue.js.map +1 -0
- package/dist/src/core/common/function/toBoolean.d.ts +12 -0
- package/dist/src/core/common/function/toBoolean.js +23 -0
- package/dist/src/core/common/function/toBoolean.js.map +1 -0
- package/dist/src/core/common/function/toCamelCase.d.ts +13 -0
- package/dist/src/core/common/function/toCamelCase.js +16 -0
- package/dist/src/core/common/function/toCamelCase.js.map +1 -0
- package/dist/src/core/common/function/toFloat.d.ts +17 -0
- package/dist/src/core/common/function/toFloat.js +25 -0
- package/dist/src/core/common/function/toFloat.js.map +1 -0
- package/dist/src/core/common/function/toInt.d.ts +12 -0
- package/dist/src/core/common/function/toInt.js +20 -0
- package/dist/src/core/common/function/toInt.js.map +1 -0
- package/dist/src/core/common/function/toJson.d.ts +13 -0
- package/dist/src/core/common/function/toJson.js +16 -0
- package/dist/src/core/common/function/toJson.js.map +1 -0
- package/dist/src/core/common/function/toLowerCase.d.ts +13 -0
- package/dist/src/core/common/function/toLowerCase.js +16 -0
- package/dist/src/core/common/function/toLowerCase.js.map +1 -0
- package/dist/src/core/common/function/toPascalCase.d.ts +13 -0
- package/dist/src/core/common/function/toPascalCase.js +16 -0
- package/dist/src/core/common/function/toPascalCase.js.map +1 -0
- package/dist/src/core/common/function/toSnakeCase.d.ts +13 -0
- package/dist/src/core/common/function/toSnakeCase.js +16 -0
- package/dist/src/core/common/function/toSnakeCase.js.map +1 -0
- package/dist/src/core/common/function/toString.d.ts +12 -0
- package/dist/src/core/common/function/toString.js +25 -0
- package/dist/src/core/common/function/toString.js.map +1 -0
- package/dist/src/core/common/function/toUpperCase.d.ts +13 -0
- package/dist/src/core/common/function/toUpperCase.js +16 -0
- package/dist/src/core/common/function/toUpperCase.js.map +1 -0
- package/dist/src/core/common/function/translateOption.d.ts +17 -0
- package/dist/src/core/common/function/translateOption.js +55 -0
- package/dist/src/core/common/function/translateOption.js.map +1 -0
- package/dist/src/core/common/function/uploadImageFromUrl.d.ts +13 -0
- package/dist/src/core/common/function/uploadImageFromUrl.js +18 -0
- package/dist/src/core/common/function/uploadImageFromUrl.js.map +1 -0
- package/dist/src/core/common/interceptors/external.interceptor.d.ts +9 -0
- package/dist/src/core/common/interceptors/external.interceptor.js +113 -0
- package/dist/src/core/common/interceptors/external.interceptor.js.map +1 -0
- package/dist/src/core/common/interceptors/filter.interceptor.d.ts +8 -0
- package/dist/src/core/common/interceptors/filter.interceptor.js +192 -0
- package/dist/src/core/common/interceptors/filter.interceptor.js.map +1 -0
- package/dist/src/core/common/interface/external_data_source.interface.d.ts +16 -0
- package/dist/src/core/common/interface/external_data_source.interface.js +3 -0
- package/dist/src/core/common/interface/external_data_source.interface.js.map +1 -0
- package/dist/src/core/common/interface/module_setting.interface.d.ts +6 -0
- package/dist/src/core/common/interface/module_setting.interface.js +3 -0
- package/dist/src/core/common/interface/module_setting.interface.js.map +1 -0
- package/dist/src/core/common/utils/attachment.d.ts +5 -0
- package/dist/src/core/common/utils/attachment.js +50 -0
- package/dist/src/core/common/utils/attachment.js.map +1 -0
- package/dist/src/core/common/utils/authenticator.d.ts +5 -0
- package/dist/src/core/common/utils/authenticator.js +30 -0
- package/dist/src/core/common/utils/authenticator.js.map +1 -0
- package/dist/src/core/common/utils/build_search.d.ts +11 -0
- package/dist/src/core/common/utils/build_search.js +459 -0
- package/dist/src/core/common/utils/build_search.js.map +1 -0
- package/dist/src/core/common/utils/bull_queue.d.ts +24 -0
- package/dist/src/core/common/utils/bull_queue.js +156 -0
- package/dist/src/core/common/utils/bull_queue.js.map +1 -0
- package/dist/src/core/common/utils/chart.d.ts +12 -0
- package/dist/src/core/common/utils/chart.js +201 -0
- package/dist/src/core/common/utils/chart.js.map +1 -0
- package/dist/src/core/common/utils/common.d.ts +4 -0
- package/dist/src/core/common/utils/common.js +56 -0
- package/dist/src/core/common/utils/common.js.map +1 -0
- package/dist/src/core/common/utils/date.d.ts +7 -0
- package/dist/src/core/common/utils/date.js +97 -0
- package/dist/src/core/common/utils/date.js.map +1 -0
- package/dist/src/core/common/utils/decimal2Json.d.ts +4 -0
- package/dist/src/core/common/utils/decimal2Json.js +131 -0
- package/dist/src/core/common/utils/decimal2Json.js.map +1 -0
- package/dist/src/core/common/utils/diff.d.ts +3 -0
- package/dist/src/core/common/utils/diff.js +81 -0
- package/dist/src/core/common/utils/diff.js.map +1 -0
- package/dist/src/core/common/utils/entity.d.ts +13 -0
- package/dist/src/core/common/utils/entity.js +119 -0
- package/dist/src/core/common/utils/entity.js.map +1 -0
- package/dist/src/core/common/utils/eval.d.ts +3 -0
- package/dist/src/core/common/utils/eval.js +30 -0
- package/dist/src/core/common/utils/eval.js.map +1 -0
- package/dist/src/core/common/utils/example.d.ts +3 -0
- package/dist/src/core/common/utils/example.js +152 -0
- package/dist/src/core/common/utils/example.js.map +1 -0
- package/dist/src/core/common/utils/executions.d.ts +3 -0
- package/dist/src/core/common/utils/executions.js +73 -0
- package/dist/src/core/common/utils/executions.js.map +1 -0
- package/dist/src/core/common/utils/external_data.d.ts +2 -0
- package/dist/src/core/common/utils/external_data.js +20 -0
- package/dist/src/core/common/utils/external_data.js.map +1 -0
- package/dist/src/core/common/utils/external_module.d.ts +12 -0
- package/dist/src/core/common/utils/external_module.js +203 -0
- package/dist/src/core/common/utils/external_module.js.map +1 -0
- package/dist/src/core/common/utils/file.d.ts +6 -0
- package/dist/src/core/common/utils/file.js +80 -0
- package/dist/src/core/common/utils/file.js.map +1 -0
- package/dist/src/core/common/utils/form.d.ts +4 -0
- package/dist/src/core/common/utils/form.js +21 -0
- package/dist/src/core/common/utils/form.js.map +1 -0
- package/dist/src/core/common/utils/func.d.ts +17 -0
- package/dist/src/core/common/utils/func.js +314 -0
- package/dist/src/core/common/utils/func.js.map +1 -0
- package/dist/src/core/common/utils/global.d.ts +6 -0
- package/dist/src/core/common/utils/global.js +72 -0
- package/dist/src/core/common/utils/global.js.map +1 -0
- package/dist/src/core/common/utils/hook.d.ts +5 -0
- package/dist/src/core/common/utils/hook.js +188 -0
- package/dist/src/core/common/utils/hook.js.map +1 -0
- package/dist/src/core/common/utils/initial.d.ts +4 -0
- package/dist/src/core/common/utils/initial.js +318 -0
- package/dist/src/core/common/utils/initial.js.map +1 -0
- package/dist/src/core/common/utils/layout.d.ts +7 -0
- package/dist/src/core/common/utils/layout.js +160 -0
- package/dist/src/core/common/utils/layout.js.map +1 -0
- package/dist/src/core/common/utils/masking.d.ts +3 -0
- package/dist/src/core/common/utils/masking.js +55 -0
- package/dist/src/core/common/utils/masking.js.map +1 -0
- package/dist/src/core/common/utils/math.d.ts +2 -0
- package/dist/src/core/common/utils/math.js +8 -0
- package/dist/src/core/common/utils/math.js.map +1 -0
- package/dist/src/core/common/utils/media.d.ts +70 -0
- package/dist/src/core/common/utils/media.js +90 -0
- package/dist/src/core/common/utils/media.js.map +1 -0
- package/dist/src/core/common/utils/mongo.d.ts +4 -0
- package/dist/src/core/common/utils/mongo.js +891 -0
- package/dist/src/core/common/utils/mongo.js.map +1 -0
- package/dist/src/core/common/utils/mongoose.d.ts +2 -0
- package/dist/src/core/common/utils/mongoose.js +152 -0
- package/dist/src/core/common/utils/mongoose.js.map +1 -0
- package/dist/src/core/common/utils/ocr.d.ts +1 -0
- package/dist/src/core/common/utils/ocr.js +35 -0
- package/dist/src/core/common/utils/ocr.js.map +1 -0
- package/dist/src/core/common/utils/otp.d.ts +16 -0
- package/dist/src/core/common/utils/otp.js +103 -0
- package/dist/src/core/common/utils/otp.js.map +1 -0
- package/dist/src/core/common/utils/permission.d.ts +5 -0
- package/dist/src/core/common/utils/permission.js +122 -0
- package/dist/src/core/common/utils/permission.js.map +1 -0
- package/dist/src/core/common/utils/random.d.ts +2 -0
- package/dist/src/core/common/utils/random.js +14 -0
- package/dist/src/core/common/utils/random.js.map +1 -0
- package/dist/src/core/common/utils/recaptcha.d.ts +1 -0
- package/dist/src/core/common/utils/recaptcha.js +21 -0
- package/dist/src/core/common/utils/recaptcha.js.map +1 -0
- package/dist/src/core/common/utils/redis.d.ts +31 -0
- package/dist/src/core/common/utils/redis.js +261 -0
- package/dist/src/core/common/utils/redis.js.map +1 -0
- package/dist/src/core/common/utils/regex.d.ts +1 -0
- package/dist/src/core/common/utils/regex.js +8 -0
- package/dist/src/core/common/utils/regex.js.map +1 -0
- package/dist/src/core/common/utils/replace.d.ts +5 -0
- package/dist/src/core/common/utils/replace.js +84 -0
- package/dist/src/core/common/utils/replace.js.map +1 -0
- package/dist/src/core/common/utils/request.d.ts +5 -0
- package/dist/src/core/common/utils/request.js +82 -0
- package/dist/src/core/common/utils/request.js.map +1 -0
- package/dist/src/core/common/utils/retry.d.ts +1 -0
- package/dist/src/core/common/utils/retry.js +30 -0
- package/dist/src/core/common/utils/retry.js.map +1 -0
- package/dist/src/core/common/utils/rewrite_url.d.ts +4 -0
- package/dist/src/core/common/utils/rewrite_url.js +18 -0
- package/dist/src/core/common/utils/rewrite_url.js.map +1 -0
- package/dist/src/core/common/utils/running.d.ts +1 -0
- package/dist/src/core/common/utils/running.js +46 -0
- package/dist/src/core/common/utils/running.js.map +1 -0
- package/dist/src/core/common/utils/schedule.d.ts +1 -0
- package/dist/src/core/common/utils/schedule.js +15 -0
- package/dist/src/core/common/utils/schedule.js.map +1 -0
- package/dist/src/core/common/utils/schema.d.ts +65 -0
- package/dist/src/core/common/utils/schema.js +2629 -0
- package/dist/src/core/common/utils/schema.js.map +1 -0
- package/dist/src/core/common/utils/sleep.d.ts +2 -0
- package/dist/src/core/common/utils/sleep.js +8 -0
- package/dist/src/core/common/utils/sleep.js.map +1 -0
- package/dist/src/core/common/utils/template.d.ts +2 -0
- package/dist/src/core/common/utils/template.js +169 -0
- package/dist/src/core/common/utils/template.js.map +1 -0
- package/dist/src/core/common/utils/text_search.d.ts +27 -0
- package/dist/src/core/common/utils/text_search.js +237 -0
- package/dist/src/core/common/utils/text_search.js.map +1 -0
- package/dist/src/core/common/utils/time.d.ts +1 -0
- package/dist/src/core/common/utils/time.js +17 -0
- package/dist/src/core/common/utils/time.js.map +1 -0
- package/dist/src/core/common/utils/token.d.ts +5 -0
- package/dist/src/core/common/utils/token.js +13 -0
- package/dist/src/core/common/utils/token.js.map +1 -0
- package/dist/src/core/common/utils/transform.d.ts +8 -0
- package/dist/src/core/common/utils/transform.js +409 -0
- package/dist/src/core/common/utils/transform.js.map +1 -0
- package/dist/src/core/common/utils/translate.d.ts +5 -0
- package/dist/src/core/common/utils/translate.js +73 -0
- package/dist/src/core/common/utils/translate.js.map +1 -0
- package/dist/src/core/common/utils/validate.d.ts +6 -0
- package/dist/src/core/common/utils/validate.js +323 -0
- package/dist/src/core/common/utils/validate.js.map +1 -0
- package/dist/src/core/company/company.constant.d.ts +9 -0
- package/dist/src/core/company/company.constant.js +13 -0
- package/dist/src/core/company/company.constant.js.map +1 -0
- package/dist/src/core/company/company.layout.d.ts +2 -0
- package/dist/src/core/company/company.layout.js +507 -0
- package/dist/src/core/company/company.layout.js.map +1 -0
- package/dist/src/core/company/company.module.d.ts +2 -0
- package/dist/src/core/company/company.module.js +40 -0
- package/dist/src/core/company/company.module.js.map +1 -0
- package/dist/src/core/company/company.schema.d.ts +25 -0
- package/dist/src/core/company/company.schema.js +137 -0
- package/dist/src/core/company/company.schema.js.map +1 -0
- package/dist/src/core/company/company.service.d.ts +22 -0
- package/dist/src/core/company/company.service.js +140 -0
- package/dist/src/core/company/company.service.js.map +1 -0
- package/dist/src/core/config/attachment.d.ts +15 -0
- package/dist/src/core/config/attachment.js +35 -0
- package/dist/src/core/config/attachment.js.map +1 -0
- package/dist/src/core/config/auth.d.ts +4 -0
- package/dist/src/core/config/auth.js +6 -0
- package/dist/src/core/config/auth.js.map +1 -0
- package/dist/src/core/config/cache.d.ts +5 -0
- package/dist/src/core/config/cache.js +7 -0
- package/dist/src/core/config/cache.js.map +1 -0
- package/dist/src/core/config/mongodb.d.ts +4 -0
- package/dist/src/core/config/mongodb.js +6 -0
- package/dist/src/core/config/mongodb.js.map +1 -0
- package/dist/src/core/config/queue.d.ts +4 -0
- package/dist/src/core/config/queue.js +6 -0
- package/dist/src/core/config/queue.js.map +1 -0
- package/dist/src/core/config/schedule_action.d.ts +5 -0
- package/dist/src/core/config/schedule_action.js +7 -0
- package/dist/src/core/config/schedule_action.js.map +1 -0
- package/dist/src/core/core.controller.d.ts +51 -0
- package/dist/src/core/core.controller.js +555 -0
- package/dist/src/core/core.controller.js.map +1 -0
- package/dist/src/core/core.module.d.ts +2 -0
- package/dist/src/core/core.module.js +101 -0
- package/dist/src/core/core.module.js.map +1 -0
- package/dist/src/core/core.service.d.ts +121 -0
- package/dist/src/core/core.service.js +716 -0
- package/dist/src/core/core.service.js.map +1 -0
- package/dist/src/core/currency/currency.layout.d.ts +2 -0
- package/dist/src/core/currency/currency.layout.js +194 -0
- package/dist/src/core/currency/currency.layout.js.map +1 -0
- package/dist/src/core/currency/currency.module.d.ts +2 -0
- package/dist/src/core/currency/currency.module.js +38 -0
- package/dist/src/core/currency/currency.module.js.map +1 -0
- package/dist/src/core/currency/currency.schema.d.ts +9 -0
- package/dist/src/core/currency/currency.schema.js +30 -0
- package/dist/src/core/currency/currency.schema.js.map +1 -0
- package/dist/src/core/currency/currency.service.d.ts +13 -0
- package/dist/src/core/currency/currency.service.js +55 -0
- package/dist/src/core/currency/currency.service.js.map +1 -0
- package/dist/src/core/currency/data/currency.json +646 -0
- package/dist/src/core/custom_function/custom_function.controller.d.ts +7 -0
- package/dist/src/core/custom_function/custom_function.controller.js +50 -0
- package/dist/src/core/custom_function/custom_function.controller.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.enum.d.ts +22 -0
- package/dist/src/core/custom_function/custom_function.enum.js +28 -0
- package/dist/src/core/custom_function/custom_function.enum.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.layout.d.ts +2 -0
- package/dist/src/core/custom_function/custom_function.layout.js +521 -0
- package/dist/src/core/custom_function/custom_function.layout.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.module.d.ts +2 -0
- package/dist/src/core/custom_function/custom_function.module.js +41 -0
- package/dist/src/core/custom_function/custom_function.module.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.schema.d.ts +15 -0
- package/dist/src/core/custom_function/custom_function.schema.js +68 -0
- package/dist/src/core/custom_function/custom_function.schema.js.map +1 -0
- package/dist/src/core/custom_function/custom_function.service.d.ts +18 -0
- package/dist/src/core/custom_function/custom_function.service.js +116 -0
- package/dist/src/core/custom_function/custom_function.service.js.map +1 -0
- package/dist/src/core/database/database.constant.d.ts +35 -0
- package/dist/src/core/database/database.constant.js +218 -0
- package/dist/src/core/database/database.constant.js.map +1 -0
- package/dist/src/core/database/database.controller.d.ts +8 -0
- package/dist/src/core/database/database.controller.js +56 -0
- package/dist/src/core/database/database.controller.js.map +1 -0
- package/dist/src/core/database/database.module.d.ts +2 -0
- package/dist/src/core/database/database.module.js +24 -0
- package/dist/src/core/database/database.module.js.map +1 -0
- package/dist/src/core/database/database.service.d.ts +13 -0
- package/dist/src/core/database/database.service.js +184 -0
- package/dist/src/core/database/database.service.js.map +1 -0
- package/dist/src/core/deploy/deploy.action.d.ts +3 -0
- package/dist/src/core/deploy/deploy.action.js +82 -0
- package/dist/src/core/deploy/deploy.action.js.map +1 -0
- package/dist/src/core/deploy/deploy.controller.d.ts +7 -0
- package/dist/src/core/deploy/deploy.controller.js +53 -0
- package/dist/src/core/deploy/deploy.controller.js.map +1 -0
- package/dist/src/core/deploy/deploy.enum.d.ts +5 -0
- package/dist/src/core/deploy/deploy.enum.js +10 -0
- package/dist/src/core/deploy/deploy.enum.js.map +1 -0
- package/dist/src/core/deploy/deploy.layout.d.ts +4 -0
- package/dist/src/core/deploy/deploy.layout.js +1110 -0
- package/dist/src/core/deploy/deploy.layout.js.map +1 -0
- package/dist/src/core/deploy/deploy.module.d.ts +2 -0
- package/dist/src/core/deploy/deploy.module.js +57 -0
- package/dist/src/core/deploy/deploy.module.js.map +1 -0
- package/dist/src/core/deploy/deploy.schema.d.ts +28 -0
- package/dist/src/core/deploy/deploy.schema.js +111 -0
- package/dist/src/core/deploy/deploy.schema.js.map +1 -0
- package/dist/src/core/deploy/deploy.service.d.ts +38 -0
- package/dist/src/core/deploy/deploy.service.js +557 -0
- package/dist/src/core/deploy/deploy.service.js.map +1 -0
- package/dist/src/core/deploy/log/deploy_log.schema.d.ts +20 -0
- package/dist/src/core/deploy/log/deploy_log.schema.js +90 -0
- package/dist/src/core/deploy/log/deploy_log.schema.js.map +1 -0
- package/dist/src/core/deploy/log/deploy_log.service.d.ts +12 -0
- package/dist/src/core/deploy/log/deploy_log.service.js +44 -0
- package/dist/src/core/deploy/log/deploy_log.service.js.map +1 -0
- package/dist/src/core/entities/entities.controller.d.ts +69 -0
- package/dist/src/core/entities/entities.controller.js +801 -0
- package/dist/src/core/entities/entities.controller.js.map +1 -0
- package/dist/src/core/entities/entities.module.d.ts +2 -0
- package/dist/src/core/entities/entities.module.js +38 -0
- package/dist/src/core/entities/entities.module.js.map +1 -0
- package/dist/src/core/entities/entities.service.d.ts +71 -0
- package/dist/src/core/entities/entities.service.js +2271 -0
- package/dist/src/core/entities/entities.service.js.map +1 -0
- package/dist/src/core/entities/entity.enum.d.ts +33 -0
- package/dist/src/core/entities/entity.enum.js +44 -0
- package/dist/src/core/entities/entity.enum.js.map +1 -0
- package/dist/src/core/entities/entity.schema.d.ts +357 -0
- package/dist/src/core/entities/entity.schema.js +1460 -0
- package/dist/src/core/entities/entity.schema.js.map +1 -0
- package/dist/src/core/entities/provider/data_permission.base.d.ts +4 -0
- package/dist/src/core/entities/provider/data_permission.base.js +10 -0
- package/dist/src/core/entities/provider/data_permission.base.js.map +1 -0
- package/dist/src/core/entities/provider/data_permission.interface.d.ts +3 -0
- package/dist/src/core/entities/provider/data_permission.interface.js +3 -0
- package/dist/src/core/entities/provider/data_permission.interface.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.enum.d.ts +4 -0
- package/dist/src/core/execution_log/execution_log.enum.js +9 -0
- package/dist/src/core/execution_log/execution_log.enum.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.layout.d.ts +2 -0
- package/dist/src/core/execution_log/execution_log.layout.js +226 -0
- package/dist/src/core/execution_log/execution_log.layout.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.module.d.ts +2 -0
- package/dist/src/core/execution_log/execution_log.module.js +39 -0
- package/dist/src/core/execution_log/execution_log.module.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.schema.d.ts +13 -0
- package/dist/src/core/execution_log/execution_log.schema.js +58 -0
- package/dist/src/core/execution_log/execution_log.schema.js.map +1 -0
- package/dist/src/core/execution_log/execution_log.service.d.ts +12 -0
- package/dist/src/core/execution_log/execution_log.service.js +47 -0
- package/dist/src/core/execution_log/execution_log.service.js.map +1 -0
- package/dist/src/core/external_provider/external_provider.controller.d.ts +6 -0
- package/dist/src/core/external_provider/external_provider.controller.js +41 -0
- package/dist/src/core/external_provider/external_provider.controller.js.map +1 -0
- package/dist/src/core/external_provider/external_provider.module.d.ts +2 -0
- package/dist/src/core/external_provider/external_provider.module.js +29 -0
- package/dist/src/core/external_provider/external_provider.module.js.map +1 -0
- package/dist/src/core/external_provider/external_provider.service.d.ts +18 -0
- package/dist/src/core/external_provider/external_provider.service.js +32 -0
- package/dist/src/core/external_provider/external_provider.service.js.map +1 -0
- package/dist/src/core/guards/csrf.guard.d.ts +9 -0
- package/dist/src/core/guards/csrf.guard.js +57 -0
- package/dist/src/core/guards/csrf.guard.js.map +1 -0
- package/dist/src/core/import_export/import_export.controller.d.ts +28 -0
- package/dist/src/core/import_export/import_export.controller.js +201 -0
- package/dist/src/core/import_export/import_export.controller.js.map +1 -0
- package/dist/src/core/import_export/import_export.enum.d.ts +24 -0
- package/dist/src/core/import_export/import_export.enum.js +32 -0
- package/dist/src/core/import_export/import_export.enum.js.map +1 -0
- package/dist/src/core/import_export/import_export.hook.d.ts +16 -0
- package/dist/src/core/import_export/import_export.hook.js +24 -0
- package/dist/src/core/import_export/import_export.hook.js.map +1 -0
- package/dist/src/core/import_export/import_export.layout.d.ts +2 -0
- package/dist/src/core/import_export/import_export.layout.js +2059 -0
- package/dist/src/core/import_export/import_export.layout.js.map +1 -0
- package/dist/src/core/import_export/import_export.module.d.ts +2 -0
- package/dist/src/core/import_export/import_export.module.js +51 -0
- package/dist/src/core/import_export/import_export.module.js.map +1 -0
- package/dist/src/core/import_export/import_export.schema.d.ts +40 -0
- package/dist/src/core/import_export/import_export.schema.js +175 -0
- package/dist/src/core/import_export/import_export.schema.js.map +1 -0
- package/dist/src/core/import_export/import_export.service.d.ts +94 -0
- package/dist/src/core/import_export/import_export.service.js +2723 -0
- package/dist/src/core/import_export/import_export.service.js.map +1 -0
- package/dist/src/core/import_export/import_export.utils.d.ts +3 -0
- package/dist/src/core/import_export/import_export.utils.js +21 -0
- package/dist/src/core/import_export/import_export.utils.js.map +1 -0
- package/dist/src/core/import_export/log/import_export_log.layout.d.ts +2 -0
- package/dist/src/core/import_export/log/import_export_log.layout.js +423 -0
- package/dist/src/core/import_export/log/import_export_log.layout.js.map +1 -0
- package/dist/src/core/import_export/log/import_export_log.schema.d.ts +23 -0
- package/dist/src/core/import_export/log/import_export_log.schema.js +131 -0
- package/dist/src/core/import_export/log/import_export_log.schema.js.map +1 -0
- package/dist/src/core/import_export/log/import_export_log.service.d.ts +12 -0
- package/dist/src/core/import_export/log/import_export_log.service.js +49 -0
- package/dist/src/core/import_export/log/import_export_log.service.js.map +1 -0
- package/dist/src/core/import_export/provider/export.provider.d.ts +8 -0
- package/dist/src/core/import_export/provider/export.provider.js +244 -0
- package/dist/src/core/import_export/provider/export.provider.js.map +1 -0
- package/dist/src/core/import_export/provider/import.provider.d.ts +8 -0
- package/dist/src/core/import_export/provider/import.provider.js +238 -0
- package/dist/src/core/import_export/provider/import.provider.js.map +1 -0
- package/dist/src/core/import_export/provider/provider.base.d.ts +8 -0
- package/dist/src/core/import_export/provider/provider.base.js +19 -0
- package/dist/src/core/import_export/provider/provider.base.js.map +1 -0
- package/dist/src/core/import_export/provider/provider.interface.d.ts +6 -0
- package/dist/src/core/import_export/provider/provider.interface.js +3 -0
- package/dist/src/core/import_export/provider/provider.interface.js.map +1 -0
- package/dist/src/core/index.d.ts +271 -0
- package/dist/src/core/index.js +668 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/language/langauge.constant.d.ts +9 -0
- package/dist/src/core/language/langauge.constant.js +13 -0
- package/dist/src/core/language/langauge.constant.js.map +1 -0
- package/dist/src/core/language/langauge.enum.d.ts +4 -0
- package/dist/src/core/language/langauge.enum.js +9 -0
- package/dist/src/core/language/langauge.enum.js.map +1 -0
- package/dist/src/core/language/language.controller.d.ts +6 -0
- package/dist/src/core/language/language.controller.js +36 -0
- package/dist/src/core/language/language.controller.js.map +1 -0
- package/dist/src/core/language/language.hook.d.ts +13 -0
- package/dist/src/core/language/language.hook.js +36 -0
- package/dist/src/core/language/language.hook.js.map +1 -0
- package/dist/src/core/language/language.layout.d.ts +2 -0
- package/dist/src/core/language/language.layout.js +299 -0
- package/dist/src/core/language/language.layout.js.map +1 -0
- package/dist/src/core/language/language.module.d.ts +2 -0
- package/dist/src/core/language/language.module.js +42 -0
- package/dist/src/core/language/language.module.js.map +1 -0
- package/dist/src/core/language/language.schema.d.ts +13 -0
- package/dist/src/core/language/language.schema.js +57 -0
- package/dist/src/core/language/language.schema.js.map +1 -0
- package/dist/src/core/language/language.service.d.ts +14 -0
- package/dist/src/core/language/language.service.js +76 -0
- package/dist/src/core/language/language.service.js.map +1 -0
- package/dist/src/core/layout/chart_widget/chart_widget.controller.d.ts +7 -0
- package/dist/src/core/layout/chart_widget/chart_widget.controller.js +54 -0
- package/dist/src/core/layout/chart_widget/chart_widget.controller.js.map +1 -0
- package/dist/src/core/layout/chart_widget/chart_widget.service.d.ts +36 -0
- package/dist/src/core/layout/chart_widget/chart_widget.service.js +1355 -0
- package/dist/src/core/layout/chart_widget/chart_widget.service.js.map +1 -0
- package/dist/src/core/layout/layout.constant.d.ts +17 -0
- package/dist/src/core/layout/layout.constant.js +23 -0
- package/dist/src/core/layout/layout.constant.js.map +1 -0
- package/dist/src/core/layout/layout.module.d.ts +2 -0
- package/dist/src/core/layout/layout.module.js +43 -0
- package/dist/src/core/layout/layout.module.js.map +1 -0
- package/dist/src/core/layout/share_widget/share_widget.layout.d.ts +2 -0
- package/dist/src/core/layout/share_widget/share_widget.layout.js +5 -0
- package/dist/src/core/layout/share_widget/share_widget.layout.js.map +1 -0
- package/dist/src/core/layout/share_widget/share_widget.schema.d.ts +14 -0
- package/dist/src/core/layout/share_widget/share_widget.schema.js +80 -0
- package/dist/src/core/layout/share_widget/share_widget.schema.js.map +1 -0
- package/dist/src/core/layout/share_widget/share_widget.service.d.ts +19 -0
- package/dist/src/core/layout/share_widget/share_widget.service.js +110 -0
- package/dist/src/core/layout/share_widget/share_widget.service.js.map +1 -0
- package/dist/src/core/mail/log/mail_log.layout.d.ts +2 -0
- package/dist/src/core/mail/log/mail_log.layout.js +697 -0
- package/dist/src/core/mail/log/mail_log.layout.js.map +1 -0
- package/dist/src/core/mail/log/mail_log.schema.d.ts +21 -0
- package/dist/src/core/mail/log/mail_log.schema.js +94 -0
- package/dist/src/core/mail/log/mail_log.schema.js.map +1 -0
- package/dist/src/core/mail/log/mail_log.service.d.ts +12 -0
- package/dist/src/core/mail/log/mail_log.service.js +49 -0
- package/dist/src/core/mail/log/mail_log.service.js.map +1 -0
- package/dist/src/core/mail/mail.controller.d.ts +7 -0
- package/dist/src/core/mail/mail.controller.js +50 -0
- package/dist/src/core/mail/mail.controller.js.map +1 -0
- package/dist/src/core/mail/mail.custom_actions.d.ts +27 -0
- package/dist/src/core/mail/mail.custom_actions.js +35 -0
- package/dist/src/core/mail/mail.custom_actions.js.map +1 -0
- package/dist/src/core/mail/mail.enum.d.ts +3 -0
- package/dist/src/core/mail/mail.enum.js +8 -0
- package/dist/src/core/mail/mail.enum.js.map +1 -0
- package/dist/src/core/mail/mail.hook.d.ts +15 -0
- package/dist/src/core/mail/mail.hook.js +23 -0
- package/dist/src/core/mail/mail.hook.js.map +1 -0
- package/dist/src/core/mail/mail.layout.d.ts +2 -0
- package/dist/src/core/mail/mail.layout.js +653 -0
- package/dist/src/core/mail/mail.layout.js.map +1 -0
- package/dist/src/core/mail/mail.module.d.ts +2 -0
- package/dist/src/core/mail/mail.module.js +50 -0
- package/dist/src/core/mail/mail.module.js.map +1 -0
- package/dist/src/core/mail/mail.schema.d.ts +24 -0
- package/dist/src/core/mail/mail.schema.js +106 -0
- package/dist/src/core/mail/mail.schema.js.map +1 -0
- package/dist/src/core/mail/mail.service.d.ts +19 -0
- package/dist/src/core/mail/mail.service.js +193 -0
- package/dist/src/core/mail/mail.service.js.map +1 -0
- package/dist/src/core/map_location/map_location.layout.d.ts +2 -0
- package/dist/src/core/map_location/map_location.layout.js +102 -0
- package/dist/src/core/map_location/map_location.layout.js.map +1 -0
- package/dist/src/core/map_location/map_location.schema.d.ts +10 -0
- package/dist/src/core/map_location/map_location.schema.js +46 -0
- package/dist/src/core/map_location/map_location.schema.js.map +1 -0
- package/dist/src/core/map_location/map_location.service.d.ts +12 -0
- package/dist/src/core/map_location/map_location.service.js +44 -0
- package/dist/src/core/map_location/map_location.service.js.map +1 -0
- package/dist/src/core/map_location/map_locatioon.module.d.ts +2 -0
- package/dist/src/core/map_location/map_locatioon.module.js +38 -0
- package/dist/src/core/map_location/map_locatioon.module.js.map +1 -0
- package/dist/src/core/middlewares/request.middleware.d.ts +2 -0
- package/dist/src/core/middlewares/request.middleware.js +11 -0
- package/dist/src/core/middlewares/request.middleware.js.map +1 -0
- package/dist/src/core/notification/log/log.layout.d.ts +2 -0
- package/dist/src/core/notification/log/log.layout.js +19 -0
- package/dist/src/core/notification/log/log.layout.js.map +1 -0
- package/dist/src/core/notification/log/log.schema.d.ts +23 -0
- package/dist/src/core/notification/log/log.schema.js +94 -0
- package/dist/src/core/notification/log/log.schema.js.map +1 -0
- package/dist/src/core/notification/log/log.service.d.ts +12 -0
- package/dist/src/core/notification/log/log.service.js +45 -0
- package/dist/src/core/notification/log/log.service.js.map +1 -0
- package/dist/src/core/notification/message/message.controller.d.ts +6 -0
- package/dist/src/core/notification/message/message.controller.js +36 -0
- package/dist/src/core/notification/message/message.controller.js.map +1 -0
- package/dist/src/core/notification/message/message.custom_action.d.ts +15 -0
- package/dist/src/core/notification/message/message.custom_action.js +21 -0
- package/dist/src/core/notification/message/message.custom_action.js.map +1 -0
- package/dist/src/core/notification/message/message.layout.d.ts +2 -0
- package/dist/src/core/notification/message/message.layout.js +732 -0
- package/dist/src/core/notification/message/message.layout.js.map +1 -0
- package/dist/src/core/notification/message/message.schema.d.ts +22 -0
- package/dist/src/core/notification/message/message.schema.js +97 -0
- package/dist/src/core/notification/message/message.schema.js.map +1 -0
- package/dist/src/core/notification/message/message.service.d.ts +23 -0
- package/dist/src/core/notification/message/message.service.js +203 -0
- package/dist/src/core/notification/message/message.service.js.map +1 -0
- package/dist/src/core/notification/message/message.workflow.d.ts +2 -0
- package/dist/src/core/notification/message/message.workflow.js +455 -0
- package/dist/src/core/notification/message/message.workflow.js.map +1 -0
- package/dist/src/core/notification/message_queue/message_queue.controller.d.ts +6 -0
- package/dist/src/core/notification/message_queue/message_queue.controller.js +36 -0
- package/dist/src/core/notification/message_queue/message_queue.controller.js.map +1 -0
- package/dist/src/core/notification/message_queue/message_queue.layout.d.ts +2 -0
- package/dist/src/core/notification/message_queue/message_queue.layout.js +5 -0
- package/dist/src/core/notification/message_queue/message_queue.layout.js.map +1 -0
- package/dist/src/core/notification/message_queue/message_queue.schema.d.ts +17 -0
- package/dist/src/core/notification/message_queue/message_queue.schema.js +63 -0
- package/dist/src/core/notification/message_queue/message_queue.schema.js.map +1 -0
- package/dist/src/core/notification/message_queue/message_queue.service.d.ts +16 -0
- package/dist/src/core/notification/message_queue/message_queue.service.js +151 -0
- package/dist/src/core/notification/message_queue/message_queue.service.js.map +1 -0
- package/dist/src/core/notification/notification.constant.d.ts +8 -0
- package/dist/src/core/notification/notification.constant.js +13 -0
- package/dist/src/core/notification/notification.constant.js.map +1 -0
- package/dist/src/core/notification/notification.module.d.ts +2 -0
- package/dist/src/core/notification/notification.module.js +85 -0
- package/dist/src/core/notification/notification.module.js.map +1 -0
- package/dist/src/core/notification/subscription /subscription.controller.d.ts +7 -0
- package/dist/src/core/notification/subscription /subscription.controller.js +51 -0
- package/dist/src/core/notification/subscription /subscription.controller.js.map +1 -0
- package/dist/src/core/notification/subscription /subscription.layout.d.ts +2 -0
- package/dist/src/core/notification/subscription /subscription.layout.js +5 -0
- package/dist/src/core/notification/subscription /subscription.layout.js.map +1 -0
- package/dist/src/core/notification/subscription /subscription.schema.d.ts +11 -0
- package/dist/src/core/notification/subscription /subscription.schema.js +48 -0
- package/dist/src/core/notification/subscription /subscription.schema.js.map +1 -0
- package/dist/src/core/notification/subscription /subscription.service.d.ts +14 -0
- package/dist/src/core/notification/subscription /subscription.service.js +82 -0
- package/dist/src/core/notification/subscription /subscription.service.js.map +1 -0
- package/dist/src/core/pipeline/job/job.controller.d.ts +8 -0
- package/dist/src/core/pipeline/job/job.controller.js +59 -0
- package/dist/src/core/pipeline/job/job.controller.js.map +1 -0
- package/dist/src/core/pipeline/job/job.layout.d.ts +2 -0
- package/dist/src/core/pipeline/job/job.layout.js +5 -0
- package/dist/src/core/pipeline/job/job.layout.js.map +1 -0
- package/dist/src/core/pipeline/job/job.schema.d.ts +16 -0
- package/dist/src/core/pipeline/job/job.schema.js +80 -0
- package/dist/src/core/pipeline/job/job.schema.js.map +1 -0
- package/dist/src/core/pipeline/job/job.service.d.ts +21 -0
- package/dist/src/core/pipeline/job/job.service.js +259 -0
- package/dist/src/core/pipeline/job/job.service.js.map +1 -0
- package/dist/src/core/pipeline/log/log.layout.d.ts +2 -0
- package/dist/src/core/pipeline/log/log.layout.js +276 -0
- package/dist/src/core/pipeline/log/log.layout.js.map +1 -0
- package/dist/src/core/pipeline/log/log.schema.d.ts +20 -0
- package/dist/src/core/pipeline/log/log.schema.js +93 -0
- package/dist/src/core/pipeline/log/log.schema.js.map +1 -0
- package/dist/src/core/pipeline/log/log.service.d.ts +12 -0
- package/dist/src/core/pipeline/log/log.service.js +48 -0
- package/dist/src/core/pipeline/log/log.service.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.controller.d.ts +6 -0
- package/dist/src/core/pipeline/pipeline.controller.js +41 -0
- package/dist/src/core/pipeline/pipeline.controller.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.dto.d.ts +5 -0
- package/dist/src/core/pipeline/pipeline.dto.js +7 -0
- package/dist/src/core/pipeline/pipeline.dto.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.enum.d.ts +16 -0
- package/dist/src/core/pipeline/pipeline.enum.js +23 -0
- package/dist/src/core/pipeline/pipeline.enum.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.layout.d.ts +2 -0
- package/dist/src/core/pipeline/pipeline.layout.js +625 -0
- package/dist/src/core/pipeline/pipeline.layout.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.module.d.ts +2 -0
- package/dist/src/core/pipeline/pipeline.module.js +59 -0
- package/dist/src/core/pipeline/pipeline.module.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.schema.d.ts +11 -0
- package/dist/src/core/pipeline/pipeline.schema.js +39 -0
- package/dist/src/core/pipeline/pipeline.schema.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.service.d.ts +21 -0
- package/dist/src/core/pipeline/pipeline.service.js +282 -0
- package/dist/src/core/pipeline/pipeline.service.js.map +1 -0
- package/dist/src/core/pipeline/pipeline.utils.d.ts +1 -0
- package/dist/src/core/pipeline/pipeline.utils.js +30 -0
- package/dist/src/core/pipeline/pipeline.utils.js.map +1 -0
- package/dist/src/core/pipeline/provider/base_pipeline.provider.d.ts +8 -0
- package/dist/src/core/pipeline/provider/base_pipeline.provider.js +16 -0
- package/dist/src/core/pipeline/provider/base_pipeline.provider.js.map +1 -0
- package/dist/src/core/pipeline/provider/pipeline.interface.d.ts +6 -0
- package/dist/src/core/pipeline/provider/pipeline.interface.js +3 -0
- package/dist/src/core/pipeline/provider/pipeline.interface.js.map +1 -0
- package/dist/src/core/queue/queue.controller.d.ts +21 -0
- package/dist/src/core/queue/queue.controller.js +99 -0
- package/dist/src/core/queue/queue.controller.js.map +1 -0
- package/dist/src/core/queue/queue.module.d.ts +4 -0
- package/dist/src/core/queue/queue.module.js +200 -0
- package/dist/src/core/queue/queue.module.js.map +1 -0
- package/dist/src/core/queue/queue.processor.d.ts +46 -0
- package/dist/src/core/queue/queue.processor.js +461 -0
- package/dist/src/core/queue/queue.processor.js.map +1 -0
- package/dist/src/core/queue/queue.service.d.ts +19 -0
- package/dist/src/core/queue/queue.service.js +73 -0
- package/dist/src/core/queue/queue.service.js.map +1 -0
- package/dist/src/core/reason/reason.layout.d.ts +4 -0
- package/dist/src/core/reason/reason.layout.js +579 -0
- package/dist/src/core/reason/reason.layout.js.map +1 -0
- package/dist/src/core/reason/reason.module.d.ts +2 -0
- package/dist/src/core/reason/reason.module.js +52 -0
- package/dist/src/core/reason/reason.module.js.map +1 -0
- package/dist/src/core/reason/reason.schema.d.ts +31 -0
- package/dist/src/core/reason/reason.schema.js +119 -0
- package/dist/src/core/reason/reason.schema.js.map +1 -0
- package/dist/src/core/reason/reason.service.d.ts +26 -0
- package/dist/src/core/reason/reason.service.js +82 -0
- package/dist/src/core/reason/reason.service.js.map +1 -0
- package/dist/src/core/redis/redis.constant.d.ts +2 -0
- package/dist/src/core/redis/redis.constant.js +6 -0
- package/dist/src/core/redis/redis.constant.js.map +1 -0
- package/dist/src/core/redis/redis.controller.d.ts +9 -0
- package/dist/src/core/redis/redis.controller.js +72 -0
- package/dist/src/core/redis/redis.controller.js.map +1 -0
- package/dist/src/core/redis/redis.module.d.ts +2 -0
- package/dist/src/core/redis/redis.module.js +24 -0
- package/dist/src/core/redis/redis.module.js.map +1 -0
- package/dist/src/core/redis/redis.service.d.ts +12 -0
- package/dist/src/core/redis/redis.service.js +145 -0
- package/dist/src/core/redis/redis.service.js.map +1 -0
- package/dist/src/core/rewrite_url/provider/provider.base.d.ts +7 -0
- package/dist/src/core/rewrite_url/provider/provider.base.js +12 -0
- package/dist/src/core/rewrite_url/provider/provider.base.js.map +1 -0
- package/dist/src/core/rewrite_url/provider/provider.interface.d.ts +9 -0
- package/dist/src/core/rewrite_url/provider/provider.interface.js +3 -0
- package/dist/src/core/rewrite_url/provider/provider.interface.js.map +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.constant.d.ts +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.constant.js +5 -0
- package/dist/src/core/rewrite_url/rewrite_url.constant.js.map +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.controller.d.ts +7 -0
- package/dist/src/core/rewrite_url/rewrite_url.controller.js +52 -0
- package/dist/src/core/rewrite_url/rewrite_url.controller.js.map +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.module.d.ts +2 -0
- package/dist/src/core/rewrite_url/rewrite_url.module.js +26 -0
- package/dist/src/core/rewrite_url/rewrite_url.module.js.map +1 -0
- package/dist/src/core/rewrite_url/rewrite_url.service.d.ts +10 -0
- package/dist/src/core/rewrite_url/rewrite_url.service.js +103 -0
- package/dist/src/core/rewrite_url/rewrite_url.service.js.map +1 -0
- package/dist/src/core/schedule_action/log/schedule_log.layout.d.ts +2 -0
- package/dist/src/core/schedule_action/log/schedule_log.layout.js +458 -0
- package/dist/src/core/schedule_action/log/schedule_log.layout.js.map +1 -0
- package/dist/src/core/schedule_action/log/schedule_log.schema.d.ts +15 -0
- package/dist/src/core/schedule_action/log/schedule_log.schema.js +70 -0
- package/dist/src/core/schedule_action/log/schedule_log.schema.js.map +1 -0
- package/dist/src/core/schedule_action/log/schedule_log.service.d.ts +12 -0
- package/dist/src/core/schedule_action/log/schedule_log.service.js +49 -0
- package/dist/src/core/schedule_action/log/schedule_log.service.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.controller.d.ts +14 -0
- package/dist/src/core/schedule_action/schedule_action.controller.js +103 -0
- package/dist/src/core/schedule_action/schedule_action.controller.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.enum.d.ts +12 -0
- package/dist/src/core/schedule_action/schedule_action.enum.js +19 -0
- package/dist/src/core/schedule_action/schedule_action.enum.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.hook.d.ts +11 -0
- package/dist/src/core/schedule_action/schedule_action.hook.js +19 -0
- package/dist/src/core/schedule_action/schedule_action.hook.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.layout.d.ts +2 -0
- package/dist/src/core/schedule_action/schedule_action.layout.js +615 -0
- package/dist/src/core/schedule_action/schedule_action.layout.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.module.d.ts +2 -0
- package/dist/src/core/schedule_action/schedule_action.module.js +65 -0
- package/dist/src/core/schedule_action/schedule_action.module.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.schema.d.ts +30 -0
- package/dist/src/core/schedule_action/schedule_action.schema.js +139 -0
- package/dist/src/core/schedule_action/schedule_action.schema.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action.service.d.ts +30 -0
- package/dist/src/core/schedule_action/schedule_action.service.js +319 -0
- package/dist/src/core/schedule_action/schedule_action.service.js.map +1 -0
- package/dist/src/core/schedule_action/schedule_action_cron.service.d.ts +17 -0
- package/dist/src/core/schedule_action/schedule_action_cron.service.js +222 -0
- package/dist/src/core/schedule_action/schedule_action_cron.service.js.map +1 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.schema.d.ts +11 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.schema.js +40 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.schema.js.map +1 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.service.d.ts +14 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.service.js +74 -0
- package/dist/src/core/search_text/reindex_search_text/reindex_search_text.service.js.map +1 -0
- package/dist/src/core/search_text/search_text.controller.d.ts +8 -0
- package/dist/src/core/search_text/search_text.controller.js +57 -0
- package/dist/src/core/search_text/search_text.controller.js.map +1 -0
- package/dist/src/core/search_text/search_text.module.d.ts +2 -0
- package/dist/src/core/search_text/search_text.module.js +51 -0
- package/dist/src/core/search_text/search_text.module.js.map +1 -0
- package/dist/src/core/search_text/search_text.schema.d.ts +10 -0
- package/dist/src/core/search_text/search_text.schema.js +38 -0
- package/dist/src/core/search_text/search_text.schema.js.map +1 -0
- package/dist/src/core/search_text/search_text.service.d.ts +30 -0
- package/dist/src/core/search_text/search_text.service.js +295 -0
- package/dist/src/core/search_text/search_text.service.js.map +1 -0
- package/dist/src/core/setting/dto/auth_setting.dto.d.ts +43 -0
- package/dist/src/core/setting/dto/auth_setting.dto.js +151 -0
- package/dist/src/core/setting/dto/auth_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/es_setting.dto.d.ts +3 -0
- package/dist/src/core/setting/dto/es_setting.dto.js +21 -0
- package/dist/src/core/setting/dto/es_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/general_setting.dto.d.ts +10 -0
- package/dist/src/core/setting/dto/general_setting.dto.js +49 -0
- package/dist/src/core/setting/dto/general_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/layout_setting.dto.d.ts +5 -0
- package/dist/src/core/setting/dto/layout_setting.dto.js +29 -0
- package/dist/src/core/setting/dto/layout_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/log_setting.dto.d.ts +17 -0
- package/dist/src/core/setting/dto/log_setting.dto.js +57 -0
- package/dist/src/core/setting/dto/log_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/login_method.dto.d.ts +4 -0
- package/dist/src/core/setting/dto/login_method.dto.js +25 -0
- package/dist/src/core/setting/dto/login_method.dto.js.map +1 -0
- package/dist/src/core/setting/dto/media_setting.dto.d.ts +29 -0
- package/dist/src/core/setting/dto/media_setting.dto.js +43 -0
- package/dist/src/core/setting/dto/media_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/menu_setting.dto.d.ts +17 -0
- package/dist/src/core/setting/dto/menu_setting.dto.js +76 -0
- package/dist/src/core/setting/dto/menu_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/queue_setting.dto.d.ts +3 -0
- package/dist/src/core/setting/dto/queue_setting.dto.js +21 -0
- package/dist/src/core/setting/dto/queue_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/schedule_setting.dto.d.ts +5 -0
- package/dist/src/core/setting/dto/schedule_setting.dto.js +29 -0
- package/dist/src/core/setting/dto/schedule_setting.dto.js.map +1 -0
- package/dist/src/core/setting/dto/swagger_setting.dto.d.ts +5 -0
- package/dist/src/core/setting/dto/swagger_setting.dto.js +29 -0
- package/dist/src/core/setting/dto/swagger_setting.dto.js.map +1 -0
- package/dist/src/core/setting/setting.constant.d.ts +309 -0
- package/dist/src/core/setting/setting.constant.js +650 -0
- package/dist/src/core/setting/setting.constant.js.map +1 -0
- package/dist/src/core/setting/setting.controller.d.ts +54 -0
- package/dist/src/core/setting/setting.controller.js +487 -0
- package/dist/src/core/setting/setting.controller.js.map +1 -0
- package/dist/src/core/setting/setting.module.d.ts +2 -0
- package/dist/src/core/setting/setting.module.js +40 -0
- package/dist/src/core/setting/setting.module.js.map +1 -0
- package/dist/src/core/setting/setting.schema.d.ts +10 -0
- package/dist/src/core/setting/setting.schema.js +35 -0
- package/dist/src/core/setting/setting.schema.js.map +1 -0
- package/dist/src/core/setting/setting.service.d.ts +76 -0
- package/dist/src/core/setting/setting.service.js +1378 -0
- package/dist/src/core/setting/setting.service.js.map +1 -0
- package/dist/src/core/shortly/shortly.constant.d.ts +5 -0
- package/dist/src/core/shortly/shortly.constant.js +10 -0
- package/dist/src/core/shortly/shortly.constant.js.map +1 -0
- package/dist/src/core/shortly/shortly.module.d.ts +2 -0
- package/dist/src/core/shortly/shortly.module.js +42 -0
- package/dist/src/core/shortly/shortly.module.js.map +1 -0
- package/dist/src/core/shortly/url/url.controller.d.ts +6 -0
- package/dist/src/core/shortly/url/url.controller.js +41 -0
- package/dist/src/core/shortly/url/url.controller.js.map +1 -0
- package/dist/src/core/shortly/url/url.layout.d.ts +2 -0
- package/dist/src/core/shortly/url/url.layout.js +486 -0
- package/dist/src/core/shortly/url/url.layout.js.map +1 -0
- package/dist/src/core/shortly/url/url.schema.d.ts +15 -0
- package/dist/src/core/shortly/url/url.schema.js +69 -0
- package/dist/src/core/shortly/url/url.schema.js.map +1 -0
- package/dist/src/core/shortly/url/url.service.d.ts +16 -0
- package/dist/src/core/shortly/url/url.service.js +108 -0
- package/dist/src/core/shortly/url/url.service.js.map +1 -0
- package/dist/src/core/sms/log/sms_log.layout.d.ts +2 -0
- package/dist/src/core/sms/log/sms_log.layout.js +668 -0
- package/dist/src/core/sms/log/sms_log.layout.js.map +1 -0
- package/dist/src/core/sms/log/sms_log.schema.d.ts +27 -0
- package/dist/src/core/sms/log/sms_log.schema.js +115 -0
- package/dist/src/core/sms/log/sms_log.schema.js.map +1 -0
- package/dist/src/core/sms/log/sms_log.service.d.ts +14 -0
- package/dist/src/core/sms/log/sms_log.service.js +70 -0
- package/dist/src/core/sms/log/sms_log.service.js.map +1 -0
- package/dist/src/core/sms/sms.controller.d.ts +6 -0
- package/dist/src/core/sms/sms.controller.js +41 -0
- package/dist/src/core/sms/sms.controller.js.map +1 -0
- package/dist/src/core/sms/sms.enum.d.ts +12 -0
- package/dist/src/core/sms/sms.enum.js +19 -0
- package/dist/src/core/sms/sms.enum.js.map +1 -0
- package/dist/src/core/sms/sms.layout.d.ts +2 -0
- package/dist/src/core/sms/sms.layout.js +766 -0
- package/dist/src/core/sms/sms.layout.js.map +1 -0
- package/dist/src/core/sms/sms.module.d.ts +2 -0
- package/dist/src/core/sms/sms.module.js +49 -0
- package/dist/src/core/sms/sms.module.js.map +1 -0
- package/dist/src/core/sms/sms.schema.d.ts +24 -0
- package/dist/src/core/sms/sms.schema.js +107 -0
- package/dist/src/core/sms/sms.schema.js.map +1 -0
- package/dist/src/core/sms/sms.service.d.ts +16 -0
- package/dist/src/core/sms/sms.service.js +272 -0
- package/dist/src/core/sms/sms.service.js.map +1 -0
- package/dist/src/core/template/data/templates.json +192 -0
- package/dist/src/core/template/log/print_log.enum.d.ts +5 -0
- package/dist/src/core/template/log/print_log.enum.js +10 -0
- package/dist/src/core/template/log/print_log.enum.js.map +1 -0
- package/dist/src/core/template/log/print_log.layout.d.ts +2 -0
- package/dist/src/core/template/log/print_log.layout.js +483 -0
- package/dist/src/core/template/log/print_log.layout.js.map +1 -0
- package/dist/src/core/template/log/print_log.schema.d.ts +18 -0
- package/dist/src/core/template/log/print_log.schema.js +104 -0
- package/dist/src/core/template/log/print_log.schema.js.map +1 -0
- package/dist/src/core/template/log/print_log.service.d.ts +12 -0
- package/dist/src/core/template/log/print_log.service.js +49 -0
- package/dist/src/core/template/log/print_log.service.js.map +1 -0
- package/dist/src/core/template/provider/base_template.provider.d.ts +9 -0
- package/dist/src/core/template/provider/base_template.provider.js +22 -0
- package/dist/src/core/template/provider/base_template.provider.js.map +1 -0
- package/dist/src/core/template/provider/email.provider.d.ts +8 -0
- package/dist/src/core/template/provider/email.provider.js +155 -0
- package/dist/src/core/template/provider/email.provider.js.map +1 -0
- package/dist/src/core/template/provider/sms.provider.d.ts +8 -0
- package/dist/src/core/template/provider/sms.provider.js +93 -0
- package/dist/src/core/template/provider/sms.provider.js.map +1 -0
- package/dist/src/core/template/provider/template.interface.d.ts +7 -0
- package/dist/src/core/template/provider/template.interface.js +3 -0
- package/dist/src/core/template/provider/template.interface.js.map +1 -0
- package/dist/src/core/template/provider/template_email.provider.d.ts +8 -0
- package/dist/src/core/template/provider/template_email.provider.js +472 -0
- package/dist/src/core/template/provider/template_email.provider.js.map +1 -0
- package/dist/src/core/template/provider/template_print.provider.d.ts +9 -0
- package/dist/src/core/template/provider/template_print.provider.js +1114 -0
- package/dist/src/core/template/provider/template_print.provider.js.map +1 -0
- package/dist/src/core/template/provider/template_sms.provider.d.ts +8 -0
- package/dist/src/core/template/provider/template_sms.provider.js +453 -0
- package/dist/src/core/template/provider/template_sms.provider.js.map +1 -0
- package/dist/src/core/template/template.controller.d.ts +15 -0
- package/dist/src/core/template/template.controller.js +140 -0
- package/dist/src/core/template/template.controller.js.map +1 -0
- package/dist/src/core/template/template.enum.d.ts +34 -0
- package/dist/src/core/template/template.enum.js +43 -0
- package/dist/src/core/template/template.enum.js.map +1 -0
- package/dist/src/core/template/template.hook.d.ts +18 -0
- package/dist/src/core/template/template.hook.js +26 -0
- package/dist/src/core/template/template.hook.js.map +1 -0
- package/dist/src/core/template/template.layout.d.ts +2 -0
- package/dist/src/core/template/template.layout.js +399 -0
- package/dist/src/core/template/template.layout.js.map +1 -0
- package/dist/src/core/template/template.module.d.ts +2 -0
- package/dist/src/core/template/template.module.js +49 -0
- package/dist/src/core/template/template.module.js.map +1 -0
- package/dist/src/core/template/template.schema.d.ts +57 -0
- package/dist/src/core/template/template.schema.js +265 -0
- package/dist/src/core/template/template.schema.js.map +1 -0
- package/dist/src/core/template/template.service.d.ts +49 -0
- package/dist/src/core/template/template.service.js +900 -0
- package/dist/src/core/template/template.service.js.map +1 -0
- package/dist/src/core/template/template.utils.d.ts +25 -0
- package/dist/src/core/template/template.utils.js +292 -0
- package/dist/src/core/template/template.utils.js.map +1 -0
- package/dist/src/core/translate/translate.controller.d.ts +8 -0
- package/dist/src/core/translate/translate.controller.js +74 -0
- package/dist/src/core/translate/translate.controller.js.map +1 -0
- package/dist/src/core/translate/translate.enum.d.ts +5 -0
- package/dist/src/core/translate/translate.enum.js +10 -0
- package/dist/src/core/translate/translate.enum.js.map +1 -0
- package/dist/src/core/translate/translate.hook.d.ts +13 -0
- package/dist/src/core/translate/translate.hook.js +21 -0
- package/dist/src/core/translate/translate.hook.js.map +1 -0
- package/dist/src/core/translate/translate.json +2011 -0
- package/dist/src/core/translate/translate.layout.d.ts +2 -0
- package/dist/src/core/translate/translate.layout.js +95 -0
- package/dist/src/core/translate/translate.layout.js.map +1 -0
- package/dist/src/core/translate/translate.module.d.ts +2 -0
- package/dist/src/core/translate/translate.module.js +42 -0
- package/dist/src/core/translate/translate.module.js.map +1 -0
- package/dist/src/core/translate/translate.schema.d.ts +16 -0
- package/dist/src/core/translate/translate.schema.js +76 -0
- package/dist/src/core/translate/translate.schema.js.map +1 -0
- package/dist/src/core/translate/translate.service.d.ts +17 -0
- package/dist/src/core/translate/translate.service.js +139 -0
- package/dist/src/core/translate/translate.service.js.map +1 -0
- package/dist/src/core/users/user.config.d.ts +4 -0
- package/dist/src/core/users/user.config.js +8 -0
- package/dist/src/core/users/user.config.js.map +1 -0
- package/dist/src/core/users/user.constant.d.ts +4 -0
- package/dist/src/core/users/user.constant.js +36 -0
- package/dist/src/core/users/user.constant.js.map +1 -0
- package/dist/src/core/users/user.controller.d.ts +33 -0
- package/dist/src/core/users/user.controller.js +292 -0
- package/dist/src/core/users/user.controller.js.map +1 -0
- package/dist/src/core/users/user.enum.d.ts +40 -0
- package/dist/src/core/users/user.enum.js +48 -0
- package/dist/src/core/users/user.enum.js.map +1 -0
- package/dist/src/core/users/user.hook.d.ts +25 -0
- package/dist/src/core/users/user.hook.js +36 -0
- package/dist/src/core/users/user.hook.js.map +1 -0
- package/dist/src/core/users/user.layout.d.ts +4 -0
- package/dist/src/core/users/user.layout.js +2333 -0
- package/dist/src/core/users/user.layout.js.map +1 -0
- package/dist/src/core/users/user.module.d.ts +2 -0
- package/dist/src/core/users/user.module.js +77 -0
- package/dist/src/core/users/user.module.js.map +1 -0
- package/dist/src/core/users/user.permission.d.ts +2 -0
- package/dist/src/core/users/user.permission.js +10 -0
- package/dist/src/core/users/user.permission.js.map +1 -0
- package/dist/src/core/users/user.schema.d.ts +73 -0
- package/dist/src/core/users/user.schema.js +316 -0
- package/dist/src/core/users/user.schema.js.map +1 -0
- package/dist/src/core/users/user.service.d.ts +100 -0
- package/dist/src/core/users/user.service.js +1551 -0
- package/dist/src/core/users/user.service.js.map +1 -0
- package/dist/src/core/version_data/version_data.module.d.ts +2 -0
- package/dist/src/core/version_data/version_data.module.js +38 -0
- package/dist/src/core/version_data/version_data.module.js.map +1 -0
- package/dist/src/core/version_data/version_data.schema.d.ts +13 -0
- package/dist/src/core/version_data/version_data.schema.js +55 -0
- package/dist/src/core/version_data/version_data.schema.js.map +1 -0
- package/dist/src/core/version_data/version_data.service.d.ts +12 -0
- package/dist/src/core/version_data/version_data.service.js +43 -0
- package/dist/src/core/version_data/version_data.service.js.map +1 -0
- package/dist/src/core/widget/widget.controller.d.ts +6 -0
- package/dist/src/core/widget/widget.controller.js +42 -0
- package/dist/src/core/widget/widget.controller.js.map +1 -0
- package/dist/src/core/widget/widget.enum.d.ts +19 -0
- package/dist/src/core/widget/widget.enum.js +25 -0
- package/dist/src/core/widget/widget.enum.js.map +1 -0
- package/dist/src/core/widget/widget.module.d.ts +2 -0
- package/dist/src/core/widget/widget.module.js +40 -0
- package/dist/src/core/widget/widget.module.js.map +1 -0
- package/dist/src/core/widget/widget.schema.d.ts +21 -0
- package/dist/src/core/widget/widget.schema.js +94 -0
- package/dist/src/core/widget/widget.schema.js.map +1 -0
- package/dist/src/core/widget/widget.service.d.ts +15 -0
- package/dist/src/core/widget/widget.service.js +370 -0
- package/dist/src/core/widget/widget.service.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/main.js +235 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/modules/index.d.ts +1 -0
- package/dist/src/modules/index.js +6 -0
- package/dist/src/modules/index.js.map +1 -0
- package/dist/src/modules/modules.d.ts +3 -0
- package/dist/src/modules/modules.js +8 -0
- package/dist/src/modules/modules.js.map +1 -0
- package/dist/src/private.controller.d.ts +6 -0
- package/dist/src/private.controller.js +44 -0
- package/dist/src/private.controller.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/typings/node/index.d.ts +4 -0
- package/dist/typings/node/index.js +1 -0
- package/dist/typings/node/index.js.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,1551 @@
|
|
|
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
|
+
var UserService_1, UserRoleService_1, UserRolePermissonService_1, UserFilterService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UserFilterService = exports.UserRolePermissonService = exports.UserRoleService = exports.UserService = void 0;
|
|
17
|
+
const crypto = require("crypto");
|
|
18
|
+
const moment = require("moment");
|
|
19
|
+
const bcrypt = require("bcrypt");
|
|
20
|
+
const bson_1 = require("bson");
|
|
21
|
+
const common_1 = require("@nestjs/common");
|
|
22
|
+
const _ = require("lodash");
|
|
23
|
+
const uuid_1 = require("uuid");
|
|
24
|
+
const user_schema_1 = require("./user.schema");
|
|
25
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
26
|
+
const mongoose = require("mongoose");
|
|
27
|
+
const base_service_1 = require("../common/base/base.service");
|
|
28
|
+
const entities_service_1 = require("../entities/entities.service");
|
|
29
|
+
const user_hook_1 = require("./user.hook");
|
|
30
|
+
const user_layout_1 = require("./user.layout");
|
|
31
|
+
const user_enum_1 = require("./user.enum");
|
|
32
|
+
const schema_1 = require("../common/utils/schema");
|
|
33
|
+
const entity_1 = require("../common/utils/entity");
|
|
34
|
+
const permission_1 = require("../common/utils/permission");
|
|
35
|
+
const constants_1 = require("../common/constants");
|
|
36
|
+
const redis_1 = require("../common/utils/redis");
|
|
37
|
+
const user_constant_1 = require("./user.constant");
|
|
38
|
+
const user_permission_1 = require("./user.permission");
|
|
39
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
40
|
+
const audit_log_enum_1 = require("../audit_log/audit_log.enum");
|
|
41
|
+
const global_1 = require("../common/utils/global");
|
|
42
|
+
const common_2 = require("../common/utils/common");
|
|
43
|
+
const SALTRANDOMKEY = "#GISMGISDDFF#";
|
|
44
|
+
const IGNORE_FIELDS = ["roles"];
|
|
45
|
+
const SALT_RANDOM_LENGTH = 10;
|
|
46
|
+
let UserService = UserService_1 = class UserService extends base_service_1.BaseService {
|
|
47
|
+
constructor(cls, entitiesService, model) {
|
|
48
|
+
super(cls, model);
|
|
49
|
+
this.cls = cls;
|
|
50
|
+
this.entitiesService = entitiesService;
|
|
51
|
+
this.model = model;
|
|
52
|
+
}
|
|
53
|
+
async init() {
|
|
54
|
+
await this.entitiesService.refreshSystemSchema(UserService_1, this.model, user_schema_1.User, user_schema_1.UserSchema, {
|
|
55
|
+
hooks: user_hook_1.UserHook,
|
|
56
|
+
layouts: user_layout_1.UserLayout,
|
|
57
|
+
custom_actions: [
|
|
58
|
+
{
|
|
59
|
+
system: true,
|
|
60
|
+
name: "Send Activate Email",
|
|
61
|
+
code: "send_activate_email",
|
|
62
|
+
allow_layouts: ["default"],
|
|
63
|
+
type: "internal_confirm",
|
|
64
|
+
filters: [{}],
|
|
65
|
+
internal_actions: [
|
|
66
|
+
{
|
|
67
|
+
type: "internal",
|
|
68
|
+
path: "user/resend_activate_email",
|
|
69
|
+
method: "patch",
|
|
70
|
+
body: {
|
|
71
|
+
email: "${ email }"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
show_on: "detail",
|
|
76
|
+
confirm_message: "Send confirmation email?",
|
|
77
|
+
enabled: true,
|
|
78
|
+
icon: "",
|
|
79
|
+
redirect: "none",
|
|
80
|
+
show_in_list: false,
|
|
81
|
+
allow_bulk: false,
|
|
82
|
+
direct: false,
|
|
83
|
+
conditions: [["status", "in", "staged"]],
|
|
84
|
+
confirm: true
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
(0, entity_1.initData)(_.snakeCase(user_schema_1.User.name));
|
|
89
|
+
await this._prepareSchedule();
|
|
90
|
+
return _.snakeCase(user_schema_1.User.name);
|
|
91
|
+
}
|
|
92
|
+
async initData() {
|
|
93
|
+
const buff = Buffer.from(user_constant_1.DEFAULT_USERS, "base64");
|
|
94
|
+
const defaultUsers = (0, bson_1.deserialize)(buff);
|
|
95
|
+
defaultUsers.system.enabled = true;
|
|
96
|
+
defaultUsers.admin.enabled = true;
|
|
97
|
+
defaultUsers.system.user_type = constants_1.DEFAULT_USER_TYPE_API_KEY;
|
|
98
|
+
defaultUsers.admin.user_type = constants_1.DEFAULT_USER_TYPE_API_KEY;
|
|
99
|
+
let systemUser = await this.model.findOne({
|
|
100
|
+
system: true,
|
|
101
|
+
username: "system"
|
|
102
|
+
});
|
|
103
|
+
if (!systemUser) {
|
|
104
|
+
defaultUsers.system.status = user_enum_1.UserStatus.active;
|
|
105
|
+
const dto = new this.model(defaultUsers.system);
|
|
106
|
+
systemUser = await dto.save();
|
|
107
|
+
}
|
|
108
|
+
let adminUser = await this.model.findOne({
|
|
109
|
+
system: true,
|
|
110
|
+
username: "system_admin"
|
|
111
|
+
});
|
|
112
|
+
if (!adminUser) {
|
|
113
|
+
const allRoles = await (0, global_1.getUserRoles)();
|
|
114
|
+
defaultUsers.admin.roles = allRoles
|
|
115
|
+
.filter(r => r.system)
|
|
116
|
+
.map(r => r._id || r.id);
|
|
117
|
+
defaultUsers.admin.status = user_enum_1.UserStatus.active;
|
|
118
|
+
const dto = new this.model(defaultUsers.admin);
|
|
119
|
+
adminUser = await dto.save();
|
|
120
|
+
await this.model.updateOne({ _id: adminUser._id }, {
|
|
121
|
+
$set: {
|
|
122
|
+
password: await this._passwordHash(adminUser.password)
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
if (_.isEmpty(adminUser.user_type)) {
|
|
127
|
+
await this.model.updateOne({ _id: adminUser._id }, {
|
|
128
|
+
$set: {
|
|
129
|
+
user_type: constants_1.DEFAULT_USER_TYPE_API_KEY
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
await redis_1.redisCache.del(`USER_${adminUser._id}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async _prepareSchedule() {
|
|
136
|
+
const entity = await (0, schema_1.loadEntity)(`user`);
|
|
137
|
+
(0, entity_1.addSystemSchedule)({
|
|
138
|
+
name: `Schedule execution user follow up on security policy`,
|
|
139
|
+
entity: entity.id,
|
|
140
|
+
code: `user__execution_on_security_policy`,
|
|
141
|
+
enabled: true,
|
|
142
|
+
system: true,
|
|
143
|
+
execute_time: "0,5,10,15,20,25,30,35,40,45,50,55 * * * *",
|
|
144
|
+
action: {
|
|
145
|
+
type: "internal",
|
|
146
|
+
url: `/user/check_policy`,
|
|
147
|
+
method: "patch",
|
|
148
|
+
body: {}
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
async _validateSystemAdminRole(data) {
|
|
154
|
+
const request = this.cls.get("request");
|
|
155
|
+
if (_.isEmpty(data.roles)) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const apiKey = _.get(request, "api_key");
|
|
159
|
+
const isDefaultApiKey = _.get(apiKey, "is_default", false);
|
|
160
|
+
if (!isDefaultApiKey) {
|
|
161
|
+
const allRoles = await (0, global_1.getUserRoles)();
|
|
162
|
+
const systemAdminRole = (data.roles || []).some(roleRef => {
|
|
163
|
+
const role = allRoles.find(r => (r.id || r._id || r).toString() === (roleRef.id || roleRef._id || roleRef).toString());
|
|
164
|
+
return (role === null || role === void 0 ? void 0 : role.code) === 'system_admin';
|
|
165
|
+
});
|
|
166
|
+
if (systemAdminRole) {
|
|
167
|
+
throw new common_1.HttpException("Only default API key can create user with system_admin role", 403);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
async _checkRolesUpdate(data, oldData) {
|
|
172
|
+
const request = this.cls.get("request");
|
|
173
|
+
if (_.isEmpty(data.roles)) {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
const admin = await (0, schema_1.callFindInternalService)("user_role", "", {
|
|
177
|
+
code: "system_admin"
|
|
178
|
+
});
|
|
179
|
+
const isAdmin = _.get(request, "profile.roles", []).find(i => i.code === "system_admin");
|
|
180
|
+
const hasAaminRole = data.roles.find(i => i.id === admin.id);
|
|
181
|
+
if (!isAdmin && hasAaminRole) {
|
|
182
|
+
throw new Error(`Cannot update role to ${admin.name}`);
|
|
183
|
+
}
|
|
184
|
+
const oldRoles = oldData.roles.map(r => r.code);
|
|
185
|
+
const newRoles = (await (0, schema_1.callListInternalService)(`user_role`, "", { id: { $in: data.roles.map(r => r.id) } }, "", "code", 1, 1000)).rows.map(r => r.code);
|
|
186
|
+
const diffRoles = _.xor(oldRoles, newRoles);
|
|
187
|
+
if (!_.isEmpty(diffRoles)) {
|
|
188
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
189
|
+
event: audit_log_enum_1.AuditLogEvent.change_user_role,
|
|
190
|
+
action: "success",
|
|
191
|
+
event_date: new Date(),
|
|
192
|
+
status: audit_log_enum_1.AuditLogStatus.successfully,
|
|
193
|
+
user: _.get(request, "profile"),
|
|
194
|
+
raw_data: {
|
|
195
|
+
user: data,
|
|
196
|
+
old_roles: oldRoles.join(","),
|
|
197
|
+
new_roles: newRoles.join(",")
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
_allowSystemUserOnly() {
|
|
203
|
+
const request = this.cls.get("request");
|
|
204
|
+
const isSystemUser = _.get(request, "profile.username") === "system";
|
|
205
|
+
if (!isSystemUser) {
|
|
206
|
+
throw new common_1.HttpException(`Access denied for call this method`, 401);
|
|
207
|
+
}
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
_allowSystemAdminRoleOnly() {
|
|
211
|
+
const request = this.cls.get("request");
|
|
212
|
+
const systemAdminRole = _.get(request, "profile.roles", []).find(i => i.code === "system_admin");
|
|
213
|
+
if (!systemAdminRole) {
|
|
214
|
+
throw new common_1.HttpException(`Access denied for call this method`, 401);
|
|
215
|
+
}
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
_allowManageUserOnly() {
|
|
219
|
+
const request = this.cls.get("request");
|
|
220
|
+
const systemUser = _.get(request, "profile.username");
|
|
221
|
+
const systemAdminRole = _.get(request, "profile.roles", []).find(i => i.code === "system_admin");
|
|
222
|
+
const userPermission = _.get(request, "permissions", []).find(i => i.entity === "user");
|
|
223
|
+
if (!systemAdminRole && !systemUser && userPermission.access === "viewer") {
|
|
224
|
+
throw new common_1.HttpException(`Access denied for call this method`, 401);
|
|
225
|
+
}
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
async _allowCurrentUserOnly(id) {
|
|
229
|
+
const request = this.cls.get("request");
|
|
230
|
+
const isCurrentUser = _.get(request, "profile.id") === id;
|
|
231
|
+
if (!isCurrentUser) {
|
|
232
|
+
throw new common_1.HttpException(`Access denied for call this method`, 401);
|
|
233
|
+
}
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
236
|
+
async _passwordHash(password) {
|
|
237
|
+
const hash = await bcrypt.hash(password, SALT_RANDOM_LENGTH);
|
|
238
|
+
return hash;
|
|
239
|
+
}
|
|
240
|
+
async _verifyPassword(id, password, storedHash) {
|
|
241
|
+
if (storedHash.length === 64) {
|
|
242
|
+
const hash = crypto
|
|
243
|
+
.createHmac("sha256", `${id}${SALTRANDOMKEY}`)
|
|
244
|
+
.update(password)
|
|
245
|
+
.digest("hex");
|
|
246
|
+
return hash === storedHash;
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
return bcrypt.compare(password, storedHash);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
async _applyPasswordPolicy(id, username, password, passwordHistory, changedPasswrodDate) {
|
|
253
|
+
if (password.length > 30) {
|
|
254
|
+
return password;
|
|
255
|
+
}
|
|
256
|
+
const request = this.cls.get("request");
|
|
257
|
+
const minPasswordAge = _.get(constants_1.CONST.AUTH_SETTINGS, "local.password_policy_min_password_age", 0);
|
|
258
|
+
if (changedPasswrodDate && minPasswordAge > 0) {
|
|
259
|
+
const minChangePasswordDate = moment()
|
|
260
|
+
.add(minPasswordAge * -1, "day")
|
|
261
|
+
.toDate();
|
|
262
|
+
if (minChangePasswordDate < changedPasswrodDate) {
|
|
263
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP007, 400);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
const complexityRequire = _.get(constants_1.CONST.AUTH_SETTINGS, "local.password_policy_complexity_require", false);
|
|
267
|
+
const minPasswordLength = _.get(constants_1.CONST.AUTH_SETTINGS, "local.password_policy_min_password_length", 8);
|
|
268
|
+
if (password.length < minPasswordLength) {
|
|
269
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP011, 400);
|
|
270
|
+
}
|
|
271
|
+
if (complexityRequire) {
|
|
272
|
+
if (password.toLowerCase().indexOf(username) !== -1) {
|
|
273
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP011, 400);
|
|
274
|
+
}
|
|
275
|
+
const hasUpperCase = /[A-Z]/.test(password) ? 1 : 0;
|
|
276
|
+
const hasLowerCase = /[a-z]/.test(password) ? 1 : 0;
|
|
277
|
+
const hasNumbers = /\d/.test(password) ? 1 : 0;
|
|
278
|
+
const hasNonalphas = /\W/.test(password) ? 1 : 0;
|
|
279
|
+
if (hasUpperCase + hasLowerCase + hasNumbers + hasNonalphas < 3) {
|
|
280
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP011, 400);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const newHashPassword = await this._passwordHash(password);
|
|
284
|
+
const enforcePasswordHistory = _.get(constants_1.CONST.AUTH_SETTINGS, "local.password_policy_enforce_password_history", 0);
|
|
285
|
+
if (enforcePasswordHistory > 0) {
|
|
286
|
+
passwordHistory = _.takeRight(passwordHistory, enforcePasswordHistory);
|
|
287
|
+
}
|
|
288
|
+
for (const history of passwordHistory) {
|
|
289
|
+
const verifyPassword = await this._verifyPassword(id, password, history);
|
|
290
|
+
if (verifyPassword) {
|
|
291
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP008, 400);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
passwordHistory.push(newHashPassword);
|
|
295
|
+
return { password: newHashPassword, password_history: passwordHistory };
|
|
296
|
+
}
|
|
297
|
+
async _resetPassword(id, newPassword, confirmPassword, isForceByAdmin) {
|
|
298
|
+
const request = this.cls.get("request");
|
|
299
|
+
try {
|
|
300
|
+
let user = await this.model
|
|
301
|
+
.findOne({ _id: id })
|
|
302
|
+
.lean()
|
|
303
|
+
.exec();
|
|
304
|
+
if (!user) {
|
|
305
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP010, 400);
|
|
306
|
+
}
|
|
307
|
+
user = JSON.parse(JSON.stringify(user));
|
|
308
|
+
this._allowManageUserOnly();
|
|
309
|
+
if (newPassword !== confirmPassword) {
|
|
310
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP009, 400);
|
|
311
|
+
}
|
|
312
|
+
const applyPassword = await this._applyPasswordPolicy(user._id, user.username, newPassword, user.password_history, undefined);
|
|
313
|
+
await this.model.findByIdAndUpdate(user._id, {
|
|
314
|
+
$set: {
|
|
315
|
+
password: _.get(applyPassword, "password"),
|
|
316
|
+
password_history: _.get(applyPassword, "password_history", []),
|
|
317
|
+
status: isForceByAdmin ? user_enum_1.UserStatus.recovery : user_enum_1.UserStatus.active
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
await redis_1.redisCache.del(`USER_${user._id}`);
|
|
321
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
322
|
+
event: isForceByAdmin
|
|
323
|
+
? audit_log_enum_1.AuditLogEvent.admin_reset_password
|
|
324
|
+
: audit_log_enum_1.AuditLogEvent.reset_password,
|
|
325
|
+
action: "success",
|
|
326
|
+
event_date: new Date(),
|
|
327
|
+
status: audit_log_enum_1.AuditLogStatus.successfully,
|
|
328
|
+
user: _.get(request, "profile")
|
|
329
|
+
});
|
|
330
|
+
return true;
|
|
331
|
+
}
|
|
332
|
+
catch (e) {
|
|
333
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
334
|
+
event: isForceByAdmin
|
|
335
|
+
? audit_log_enum_1.AuditLogEvent.admin_reset_password
|
|
336
|
+
: audit_log_enum_1.AuditLogEvent.reset_password,
|
|
337
|
+
action: "error",
|
|
338
|
+
event_date: new Date(),
|
|
339
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
340
|
+
user: _.get(request, "profile"),
|
|
341
|
+
raw_data: { message: e.message }
|
|
342
|
+
});
|
|
343
|
+
throw e;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
async sendActivateAccountEmail(data, apiKey = undefined) {
|
|
347
|
+
const allowSendEmail = _.get(constants_1.CONST.AUTH_SETTINGS, "activate_account.send_email", false);
|
|
348
|
+
const defaultActivateTemplate = _.get(constants_1.CONST.AUTH_SETTINGS, "activate_account.activate_email_template");
|
|
349
|
+
const allowRegistration = _.get(apiKey, "allow_registration", false);
|
|
350
|
+
const emailActivationTemplateCode = _.get(apiKey, "email_activation_template", "");
|
|
351
|
+
let template = undefined;
|
|
352
|
+
if (apiKey && allowRegistration && emailActivationTemplateCode) {
|
|
353
|
+
template = emailActivationTemplateCode;
|
|
354
|
+
}
|
|
355
|
+
else if (allowSendEmail) {
|
|
356
|
+
template = defaultActivateTemplate;
|
|
357
|
+
}
|
|
358
|
+
if (!template)
|
|
359
|
+
return { status: false };
|
|
360
|
+
await (0, schema_1.callInternalService)("template", "patch", "send", {
|
|
361
|
+
code: template,
|
|
362
|
+
data: Object.assign({ to: data.email }, data)
|
|
363
|
+
});
|
|
364
|
+
return { status: true };
|
|
365
|
+
}
|
|
366
|
+
async resendActivateAccountEmail(data) {
|
|
367
|
+
let template = _.get(constants_1.CONST.AUTH_SETTINGS, "activate_account.activate_email_template");
|
|
368
|
+
const user = await (0, schema_1.callFindInternalService)("user", "", {
|
|
369
|
+
email: encodeURIComponent(_.get(data, "email", ""))
|
|
370
|
+
});
|
|
371
|
+
const userType = _.get(user, "user_type.0", "");
|
|
372
|
+
const apiKey = await (0, schema_1.callFindInternalService)("api_key", "", {
|
|
373
|
+
user_type: { $in: [userType] }
|
|
374
|
+
});
|
|
375
|
+
const allowRegistration = _.get(apiKey, "allow_registration", false);
|
|
376
|
+
const emailActivationTemplateCode = _.get(apiKey, "email_activation_template", "");
|
|
377
|
+
if (apiKey && allowRegistration && emailActivationTemplateCode) {
|
|
378
|
+
template = emailActivationTemplateCode;
|
|
379
|
+
}
|
|
380
|
+
if (!template)
|
|
381
|
+
return { status: false };
|
|
382
|
+
await (0, schema_1.callInternalService)("template", "patch", "send", {
|
|
383
|
+
code: template,
|
|
384
|
+
data: Object.assign({ to: data.email }, data)
|
|
385
|
+
});
|
|
386
|
+
return { status: true };
|
|
387
|
+
}
|
|
388
|
+
async sendActivateChangePassword(data) {
|
|
389
|
+
if (!_.get(constants_1.CONST.AUTH_SETTINGS, "activate_change_password.send_email")) {
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
392
|
+
const smsTemplate = _.get(constants_1.CONST.AUTH_SETTINGS, "activate_change_password.sms_template");
|
|
393
|
+
const emailTemplate = _.get(constants_1.CONST.AUTH_SETTINGS, "activate_change_password.email_template");
|
|
394
|
+
const templateType = _.get(constants_1.CONST.AUTH_SETTINGS, "activate_change_password.default_gateway");
|
|
395
|
+
await (0, schema_1.callInternalService)("template", "patch", "send", {
|
|
396
|
+
code: templateType === "sms" ? smsTemplate : emailTemplate,
|
|
397
|
+
data: Object.assign({ to: data.email }, data)
|
|
398
|
+
});
|
|
399
|
+
return { status: true };
|
|
400
|
+
}
|
|
401
|
+
async findOne(id) {
|
|
402
|
+
const request = this.cls.get("request");
|
|
403
|
+
_.set(request, "permissions", _.concat(_.get(request, "permissions", []), [{ entity: "*" }]));
|
|
404
|
+
const result = await super.findOne(id);
|
|
405
|
+
const permission = _.get(request, "permissions", []).find(p => p.entity === "user");
|
|
406
|
+
(0, common_2.removePasswordField)(result);
|
|
407
|
+
if ((0, permission_1.isInternal)(request)) {
|
|
408
|
+
return result;
|
|
409
|
+
}
|
|
410
|
+
if (_.get(permission, "access", "access_denied") === "access_denied" &&
|
|
411
|
+
_.get(request, "profile._id") !== result._id.toString()) {
|
|
412
|
+
throw new common_1.HttpException(`Access denied to user entity`, 401);
|
|
413
|
+
}
|
|
414
|
+
return result;
|
|
415
|
+
}
|
|
416
|
+
async find(keywords, filters, sort = "") {
|
|
417
|
+
const request = this.cls.get("request");
|
|
418
|
+
_.set(request, "permissions", _.concat(_.get(request, "permissions", []), [{ entity: "*" }]));
|
|
419
|
+
this.cls.set("request", request);
|
|
420
|
+
const result = await super.find(keywords, filters, sort);
|
|
421
|
+
(0, common_2.removePasswordField)(result);
|
|
422
|
+
const permission = _.get(request, "permissions", []).find(p => p.entity === "user");
|
|
423
|
+
if ((0, permission_1.isInternal)(request)) {
|
|
424
|
+
return result;
|
|
425
|
+
}
|
|
426
|
+
if (_.get(permission, "access", "access_denied") === "access_denied" &&
|
|
427
|
+
_.get(request, "profile._id") !== result._id.toString()) {
|
|
428
|
+
throw new common_1.HttpException(`Access denied to user entity`, 401);
|
|
429
|
+
}
|
|
430
|
+
return result;
|
|
431
|
+
}
|
|
432
|
+
async search(keywords, filters, page = 1, page_size = 10, sort = "", grouping, noTranslate, fields) {
|
|
433
|
+
const result = await super.search(keywords, filters, page, page_size, sort, grouping, noTranslate, fields);
|
|
434
|
+
if (!_.isEmpty(_.get(result, "rows", []))) {
|
|
435
|
+
result.rows.forEach(row => {
|
|
436
|
+
(0, common_2.removePasswordField)(row);
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
return result;
|
|
440
|
+
}
|
|
441
|
+
async create(data) {
|
|
442
|
+
const request = this.cls.get("request");
|
|
443
|
+
this._allowManageUserOnly();
|
|
444
|
+
data.username = _.trim(_.get(data, "username")).toLowerCase();
|
|
445
|
+
data.email = _.trim(_.get(data, "email")).toLowerCase();
|
|
446
|
+
await this._isExist(data);
|
|
447
|
+
await this._validateSystemAdminRole(data);
|
|
448
|
+
if (_.isEmpty(data.company)) {
|
|
449
|
+
const currentUserCompany = _.get(request, "profile.company");
|
|
450
|
+
if (_.isEmpty(currentUserCompany)) {
|
|
451
|
+
data.company = await (0, schema_1.callFindInternalService)("company", "", {
|
|
452
|
+
default: true
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
data.company = currentUserCompany;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
if (_.isEmpty(data.user_type)) {
|
|
460
|
+
data.user_type = _.get(request, "api_key.user_type", user_enum_1.UserType.internal);
|
|
461
|
+
}
|
|
462
|
+
if (!this._isInternal) {
|
|
463
|
+
data.status = user_enum_1.UserStatus.staged;
|
|
464
|
+
}
|
|
465
|
+
if (!(data === null || data === void 0 ? void 0 : data.status)) {
|
|
466
|
+
data.status = user_enum_1.UserStatus.staged;
|
|
467
|
+
}
|
|
468
|
+
let result = await super.create(data);
|
|
469
|
+
result = JSON.parse(JSON.stringify(result));
|
|
470
|
+
if (result.email && result.status.toString() === user_enum_1.UserStatus.staged) {
|
|
471
|
+
const apiKey = _.get(request, "api_key", undefined);
|
|
472
|
+
this.sendActivateAccountEmail(result, apiKey);
|
|
473
|
+
}
|
|
474
|
+
return result;
|
|
475
|
+
}
|
|
476
|
+
async _isExist(data, id) {
|
|
477
|
+
const username = _.get(data, "username");
|
|
478
|
+
const email = _.get(data, "email");
|
|
479
|
+
const phone = _.get(data, "phone");
|
|
480
|
+
const query = !id
|
|
481
|
+
? {
|
|
482
|
+
$or: [{ username }, { email }, { phone }]
|
|
483
|
+
}
|
|
484
|
+
: {
|
|
485
|
+
$and: [
|
|
486
|
+
{ _id: { $ne: id } },
|
|
487
|
+
{
|
|
488
|
+
$or: [{ username }, { email }, { phone }]
|
|
489
|
+
}
|
|
490
|
+
]
|
|
491
|
+
};
|
|
492
|
+
const isExist = await this.model.findOne(query);
|
|
493
|
+
if (!_.isEmpty(isExist)) {
|
|
494
|
+
throw new common_1.HttpException(`Duplicate unique key`, 409);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
async update(id, data) {
|
|
498
|
+
const request = this.cls.get("request");
|
|
499
|
+
const UPDATE_MODE = [
|
|
500
|
+
"MANAGE_USER",
|
|
501
|
+
"RESET_PASSWORD",
|
|
502
|
+
"CHANGE_PASSWORD",
|
|
503
|
+
"ADMIN_RESET_PASSWORD"
|
|
504
|
+
];
|
|
505
|
+
if (_.get(request, "profile._id") === id) {
|
|
506
|
+
_.set(request, "permissions", [{ entity: "*" }]);
|
|
507
|
+
}
|
|
508
|
+
const mode = _.get(data, "mode", "MANAGE_USER");
|
|
509
|
+
if (!UPDATE_MODE.includes(mode)) {
|
|
510
|
+
throw new common_1.HttpException("Invalid data format", 400);
|
|
511
|
+
}
|
|
512
|
+
if (["RESET_PASSWORD", "ADMIN_RESET_PASSWORD"].includes(mode)) {
|
|
513
|
+
await this._resetPassword(id, _.get(data, "new_password"), _.get(data, "confirm_password"), mode === "ADMIN_RESET_PASSWORD");
|
|
514
|
+
return this.findOne(id);
|
|
515
|
+
}
|
|
516
|
+
if (mode === "CHANGE_PASSWORD") {
|
|
517
|
+
this._allowCurrentUserOnly(id);
|
|
518
|
+
await this.changePassword(_.get(data, "current_password"), _.get(data, "new_password"), _.get(data, "confirm_password"));
|
|
519
|
+
return this.findOne(id);
|
|
520
|
+
}
|
|
521
|
+
if (mode === "MANAGE_USER") {
|
|
522
|
+
this._allowManageUserOnly();
|
|
523
|
+
const oldData = await (0, schema_1.callGetInternalService)(`user`, id);
|
|
524
|
+
await this._checkRolesUpdate(data, oldData);
|
|
525
|
+
data.username = _.trim(_.get(data, "username")).toLowerCase();
|
|
526
|
+
data.email = _.trim(_.get(data, "email")).toLowerCase();
|
|
527
|
+
await this._isExist(data, id);
|
|
528
|
+
delete data.password;
|
|
529
|
+
delete data.password_history;
|
|
530
|
+
delete data.status;
|
|
531
|
+
delete data.invalid_login_counter;
|
|
532
|
+
delete data.login_date;
|
|
533
|
+
delete data.lockout_date;
|
|
534
|
+
delete data.change_password_date;
|
|
535
|
+
delete data.account_verified_date;
|
|
536
|
+
let result = await super.update(id, data);
|
|
537
|
+
result = JSON.parse(JSON.stringify(result));
|
|
538
|
+
await redis_1.redisCache.del(`USER_${id}`);
|
|
539
|
+
return result;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
async bulkUpdate(data) {
|
|
543
|
+
await super.bulkUpdate(data);
|
|
544
|
+
for (const user of data) {
|
|
545
|
+
await redis_1.redisCache.del(`USER_${user.id}`);
|
|
546
|
+
}
|
|
547
|
+
return true;
|
|
548
|
+
}
|
|
549
|
+
async updateRole(id, role) {
|
|
550
|
+
await this.model.updateMany({ _id: id }, {
|
|
551
|
+
$set: {
|
|
552
|
+
role
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
async getUser(data) {
|
|
557
|
+
return await this.model.findOne({ _id: data["id"] });
|
|
558
|
+
}
|
|
559
|
+
async getUserByQuery(query) {
|
|
560
|
+
const entity = await (0, schema_1.loadEntity)("user");
|
|
561
|
+
const populates = [];
|
|
562
|
+
for (const field of entity.fields.filter(i => ["related", "image", "map"].includes(i.type))) {
|
|
563
|
+
if (IGNORE_FIELDS.includes(field.name))
|
|
564
|
+
continue;
|
|
565
|
+
const populate = {
|
|
566
|
+
path: field.name,
|
|
567
|
+
model: ["image", "map"].includes(field.type)
|
|
568
|
+
? (0, schema_1.mapEntity)(field.type)
|
|
569
|
+
: field.related_ref
|
|
570
|
+
};
|
|
571
|
+
if (["map", "image"].includes(field.type)) {
|
|
572
|
+
populates.push(populate);
|
|
573
|
+
continue;
|
|
574
|
+
}
|
|
575
|
+
const subEntity = await (0, schema_1.loadEntity)(field.related_ref);
|
|
576
|
+
for (const subField of subEntity.fields.filter(f => ["related", "image", "map"].includes(f.type))) {
|
|
577
|
+
if (!populate.populate) {
|
|
578
|
+
populate.populate = [];
|
|
579
|
+
}
|
|
580
|
+
populate.populate.push({
|
|
581
|
+
path: subField.name,
|
|
582
|
+
model: ["image", "map"].includes(subField.type)
|
|
583
|
+
? (0, schema_1.mapEntity)(subField.type)
|
|
584
|
+
: subField.related_ref
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
populates.push(populate);
|
|
588
|
+
}
|
|
589
|
+
return await this.model.findOne(query).populate(populates);
|
|
590
|
+
}
|
|
591
|
+
async findbyRole(query) {
|
|
592
|
+
return await this.model.find(query);
|
|
593
|
+
}
|
|
594
|
+
async login(username, password) {
|
|
595
|
+
let errorCode = "";
|
|
596
|
+
const lockoutThreshold = _.get(constants_1.CONST.AUTH_SETTINGS, "local.lockout_policy_threshold", 0);
|
|
597
|
+
const lockoutDuration = _.get(constants_1.CONST.AUTH_SETTINGS, "local.lockout_policy_duration", 30);
|
|
598
|
+
let user = await this.model
|
|
599
|
+
.findOne({
|
|
600
|
+
$or: [{ username }, { email: username }, { phone: username }]
|
|
601
|
+
})
|
|
602
|
+
.lean()
|
|
603
|
+
.exec();
|
|
604
|
+
try {
|
|
605
|
+
if (!user) {
|
|
606
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
607
|
+
event: audit_log_enum_1.AuditLogEvent.login,
|
|
608
|
+
action: "user_not_exists",
|
|
609
|
+
event_date: new Date(),
|
|
610
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
611
|
+
raw_data: { username }
|
|
612
|
+
});
|
|
613
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP001, 401);
|
|
614
|
+
}
|
|
615
|
+
user = JSON.parse(JSON.stringify(user));
|
|
616
|
+
if (!user.enabled) {
|
|
617
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
618
|
+
event: audit_log_enum_1.AuditLogEvent.login,
|
|
619
|
+
action: "user_is_disabled",
|
|
620
|
+
event_date: new Date(),
|
|
621
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
622
|
+
user
|
|
623
|
+
});
|
|
624
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP017, 401);
|
|
625
|
+
}
|
|
626
|
+
const unLockoutDate = moment()
|
|
627
|
+
.add(lockoutDuration * -1, "minute")
|
|
628
|
+
.toDate();
|
|
629
|
+
if (!user.invalid_login_counter) {
|
|
630
|
+
user.invalid_login_counter = 0;
|
|
631
|
+
}
|
|
632
|
+
user.login_date = new Date();
|
|
633
|
+
if (user.status.toString() === user_enum_1.UserStatus.locked_out.toString() &&
|
|
634
|
+
lockoutDuration > 0 &&
|
|
635
|
+
!_.isEmpty(user.lockout_date) &&
|
|
636
|
+
moment(user.lockout_date).toDate() < unLockoutDate) {
|
|
637
|
+
user.status = user_enum_1.UserStatus.active;
|
|
638
|
+
user.lockout_date = null;
|
|
639
|
+
user.invalid_login_counter = 0;
|
|
640
|
+
}
|
|
641
|
+
switch (user.status.toString()) {
|
|
642
|
+
case user_enum_1.UserStatus.staged.toString():
|
|
643
|
+
case user_enum_1.UserStatus.provisioned.toString():
|
|
644
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
645
|
+
event: audit_log_enum_1.AuditLogEvent.login,
|
|
646
|
+
action: "user_not_active",
|
|
647
|
+
event_date: new Date(),
|
|
648
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
649
|
+
user
|
|
650
|
+
});
|
|
651
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP002, 401);
|
|
652
|
+
case user_enum_1.UserStatus.locked_out.toString():
|
|
653
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
654
|
+
event: audit_log_enum_1.AuditLogEvent.login,
|
|
655
|
+
action: "user_is_locked_out",
|
|
656
|
+
event_date: new Date(),
|
|
657
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
658
|
+
user
|
|
659
|
+
});
|
|
660
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP003, 401);
|
|
661
|
+
case user_enum_1.UserStatus.suspended.toString():
|
|
662
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
663
|
+
event: audit_log_enum_1.AuditLogEvent.login,
|
|
664
|
+
action: "user_is_suspended",
|
|
665
|
+
event_date: new Date(),
|
|
666
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
667
|
+
user
|
|
668
|
+
});
|
|
669
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP004, 401);
|
|
670
|
+
case user_enum_1.UserStatus.deprovisioned.toString():
|
|
671
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
672
|
+
event: audit_log_enum_1.AuditLogEvent.login,
|
|
673
|
+
action: "user_is_deprovisioned",
|
|
674
|
+
event_date: new Date(),
|
|
675
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
676
|
+
user
|
|
677
|
+
});
|
|
678
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP005, 401);
|
|
679
|
+
}
|
|
680
|
+
const verifyPassword = await this._verifyPassword(user._id, password, user.password);
|
|
681
|
+
if (!verifyPassword) {
|
|
682
|
+
user.invalid_login_counter += 1;
|
|
683
|
+
if (lockoutThreshold > 0 &&
|
|
684
|
+
lockoutThreshold <= user.invalid_login_counter) {
|
|
685
|
+
user.status = user_enum_1.UserStatus.locked_out;
|
|
686
|
+
user.lockout_date = new Date();
|
|
687
|
+
}
|
|
688
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
689
|
+
event: audit_log_enum_1.AuditLogEvent.login,
|
|
690
|
+
action: "invalid_password",
|
|
691
|
+
event_date: new Date(),
|
|
692
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
693
|
+
user
|
|
694
|
+
});
|
|
695
|
+
errorCode = user_enum_1.UserErrorCode.UAP001;
|
|
696
|
+
}
|
|
697
|
+
if (_.isEmpty(errorCode)) {
|
|
698
|
+
user.invalid_login_counter = 0;
|
|
699
|
+
}
|
|
700
|
+
const maxPasswordAge = _.get(constants_1.CONST.AUTH_SETTINGS, "local.password_policy_max_password_age", 0);
|
|
701
|
+
if (maxPasswordAge > 0 &&
|
|
702
|
+
user.status.toString() === user_enum_1.UserStatus.active.toString()) {
|
|
703
|
+
const passwordExpiredDate = moment()
|
|
704
|
+
.add(maxPasswordAge * -1, "day")
|
|
705
|
+
.toDate();
|
|
706
|
+
if (moment(user.change_password_date).toDate() < passwordExpiredDate) {
|
|
707
|
+
user.status = user_enum_1.UserStatus.password_expired;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
await this.model.updateOne({ _id: user._id }, {
|
|
711
|
+
$set: {
|
|
712
|
+
login_date: user.login_date,
|
|
713
|
+
invalid_login_counter: user.invalid_login_counter,
|
|
714
|
+
lockout_date: user.lockout_date,
|
|
715
|
+
status: user.status
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
if (user.status === user_enum_1.UserStatus.locked_out) {
|
|
719
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
720
|
+
event: audit_log_enum_1.AuditLogEvent.locked_out,
|
|
721
|
+
action: "success",
|
|
722
|
+
event_date: new Date(),
|
|
723
|
+
status: audit_log_enum_1.AuditLogStatus.successfully,
|
|
724
|
+
user
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
await redis_1.redisCache.del(`USER_${user._id}`);
|
|
728
|
+
if (!_.isEmpty(errorCode)) {
|
|
729
|
+
throw new common_1.HttpException(errorCode, 401);
|
|
730
|
+
}
|
|
731
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
732
|
+
event: audit_log_enum_1.AuditLogEvent.login,
|
|
733
|
+
action: "success",
|
|
734
|
+
event_date: new Date(),
|
|
735
|
+
status: audit_log_enum_1.AuditLogStatus.successfully,
|
|
736
|
+
user
|
|
737
|
+
});
|
|
738
|
+
return user;
|
|
739
|
+
}
|
|
740
|
+
catch (e) {
|
|
741
|
+
throw e;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
async assignDefaultRoles(id) {
|
|
745
|
+
const user = await this.model
|
|
746
|
+
.findOne({ _id: id })
|
|
747
|
+
.lean()
|
|
748
|
+
.exec();
|
|
749
|
+
if (!user) {
|
|
750
|
+
throw new common_1.HttpException("user_not_found", 500);
|
|
751
|
+
}
|
|
752
|
+
const roles = await (0, schema_1.callListInternalService)("user_role", "", {
|
|
753
|
+
is_default: true
|
|
754
|
+
});
|
|
755
|
+
if (roles.total === 0) {
|
|
756
|
+
return true;
|
|
757
|
+
}
|
|
758
|
+
const roleIds = _.uniq(_.concat(_.get(user, "roles", []).map(i => `${i}`), _.get(roles, "rows", []).map(r => r._id)));
|
|
759
|
+
await this.model.updateOne({ _id: id }, { $set: { roles: roleIds } });
|
|
760
|
+
return true;
|
|
761
|
+
}
|
|
762
|
+
async profile(layout, id, locale) {
|
|
763
|
+
const request = this.cls.get("request");
|
|
764
|
+
if (_.get(request, "profile._id") !== id) {
|
|
765
|
+
throw new common_1.HttpException(`Access denied`, 401);
|
|
766
|
+
}
|
|
767
|
+
const permissions = _.get(request, "permissions", []);
|
|
768
|
+
const userPermission = permissions.find(p => p.entity === "user");
|
|
769
|
+
if (_.isEmpty(userPermission)) {
|
|
770
|
+
permissions.push({ entity: "user", access: "editor" });
|
|
771
|
+
}
|
|
772
|
+
else if (["viewer", "access_denied"].includes(userPermission.access)) {
|
|
773
|
+
userPermission.access = user_enum_1.UserPermission.editor;
|
|
774
|
+
}
|
|
775
|
+
return this.dataWithLocale(layout, id, locale);
|
|
776
|
+
}
|
|
777
|
+
async updateProfile(id, data) {
|
|
778
|
+
const request = this.cls.get("request");
|
|
779
|
+
if (_.get(request, "profile._id") !== id) {
|
|
780
|
+
throw new common_1.HttpException(`Access denied`, 401);
|
|
781
|
+
}
|
|
782
|
+
const permissions = _.get(request, "permissions", []);
|
|
783
|
+
const userPermission = permissions.find(p => p.entity === "user");
|
|
784
|
+
if (_.isEmpty(userPermission)) {
|
|
785
|
+
permissions.push({ entity: "user", access: "editor" });
|
|
786
|
+
}
|
|
787
|
+
else if (["viewer", "access_denied"].includes(userPermission.access)) {
|
|
788
|
+
userPermission.access = user_enum_1.UserPermission.editor;
|
|
789
|
+
}
|
|
790
|
+
delete data["roles"];
|
|
791
|
+
data["mode"] = "MANAGE_USER";
|
|
792
|
+
const result = await this.update(id, data);
|
|
793
|
+
(0, common_2.removePasswordField)(result);
|
|
794
|
+
return result;
|
|
795
|
+
}
|
|
796
|
+
async resetAuthenticator(id) {
|
|
797
|
+
const request = this.cls.get("request");
|
|
798
|
+
const isAdmin = _.get(request, "profile.roles", []).find(i => i.code === "system_admin");
|
|
799
|
+
if (!isAdmin) {
|
|
800
|
+
throw new common_1.HttpException("permission_denied", 403);
|
|
801
|
+
}
|
|
802
|
+
await this.model.updateOne({ _id: id }, { $set: { enable_authenticator: false } });
|
|
803
|
+
redis_1.redisCache.del(`USER_${id}`);
|
|
804
|
+
return {
|
|
805
|
+
message: "success"
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
async scheduleApplyPolicy() {
|
|
809
|
+
const resetInvalidLoginCounter = _.get(constants_1.CONST.AUTH_SETTINGS, "local.lockout_policy_reset_counter", 0);
|
|
810
|
+
if (resetInvalidLoginCounter > 0) {
|
|
811
|
+
const minResetDate = moment()
|
|
812
|
+
.add(resetInvalidLoginCounter * -1, "minute")
|
|
813
|
+
.toDate();
|
|
814
|
+
let resetUsers = await this.model.find({
|
|
815
|
+
login_date: { $lte: minResetDate },
|
|
816
|
+
status: {
|
|
817
|
+
$in: [user_enum_1.UserStatus.active.toString()]
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
resetUsers = JSON.parse(JSON.stringify(resetUsers));
|
|
821
|
+
for (const user of resetUsers) {
|
|
822
|
+
await this.model.findByIdAndUpdate(user._id, {
|
|
823
|
+
$set: {
|
|
824
|
+
invalid_login_counter: 0
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
await redis_1.redisCache.del(`USER_${user.id}`);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
const maxPasswordAge = _.get(constants_1.CONST.AUTH_SETTINGS, "local.password_policy_max_password_age", 0);
|
|
831
|
+
if (maxPasswordAge > 0) {
|
|
832
|
+
const passwordExpiredDate = moment()
|
|
833
|
+
.add(maxPasswordAge * -1, "day")
|
|
834
|
+
.toDate();
|
|
835
|
+
let expiredUsers = await this.model.find({
|
|
836
|
+
change_password_date: { $lte: passwordExpiredDate },
|
|
837
|
+
system: false,
|
|
838
|
+
status: {
|
|
839
|
+
$in: [user_enum_1.UserStatus.active.toString()]
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
expiredUsers = JSON.parse(JSON.stringify(expiredUsers));
|
|
843
|
+
for (const user of expiredUsers) {
|
|
844
|
+
await this.model.findByIdAndUpdate(user._id, {
|
|
845
|
+
$set: {
|
|
846
|
+
status: user_enum_1.UserStatus.password_expired
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
await redis_1.redisCache.del(`USER_${user._id}`);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
const unusedSuspended = _.get(constants_1.CONST.AUTH_SETTINGS, "local.lockout_policy_unused_suspended", 0);
|
|
853
|
+
if (unusedSuspended > 0) {
|
|
854
|
+
const minUnsedDate = moment()
|
|
855
|
+
.add(unusedSuspended * -1, "day")
|
|
856
|
+
.toDate();
|
|
857
|
+
let unusedUsers = await this.model.find({
|
|
858
|
+
login_date: { $lte: minUnsedDate },
|
|
859
|
+
system: false,
|
|
860
|
+
status: {
|
|
861
|
+
$in: [
|
|
862
|
+
user_enum_1.UserStatus.active.toString(),
|
|
863
|
+
user_enum_1.UserStatus.locked_out.toString(),
|
|
864
|
+
user_enum_1.UserStatus.password_expired.toString(),
|
|
865
|
+
user_enum_1.UserStatus.recovery.toString()
|
|
866
|
+
]
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
unusedUsers = JSON.parse(JSON.stringify(unusedUsers));
|
|
870
|
+
for (const user of unusedUsers) {
|
|
871
|
+
await this.model.findByIdAndUpdate(user._id, {
|
|
872
|
+
$set: {
|
|
873
|
+
status: user_enum_1.UserStatus.suspended
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
await redis_1.redisCache.del(`USER_${user._id}`);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
return true;
|
|
880
|
+
}
|
|
881
|
+
async newPassword(id, newPassword, confirmPassword) {
|
|
882
|
+
this._allowSystemUserOnly();
|
|
883
|
+
if (newPassword !== confirmPassword) {
|
|
884
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP009, 400);
|
|
885
|
+
}
|
|
886
|
+
let user = await this.model
|
|
887
|
+
.findOne({ _id: id })
|
|
888
|
+
.lean()
|
|
889
|
+
.exec();
|
|
890
|
+
if (!user) {
|
|
891
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP010, 400);
|
|
892
|
+
}
|
|
893
|
+
user = JSON.parse(JSON.stringify(user));
|
|
894
|
+
const applyPassword = await this._applyPasswordPolicy(user._id, user.username, newPassword, []);
|
|
895
|
+
await this.model.findByIdAndUpdate(user._id, {
|
|
896
|
+
$set: {
|
|
897
|
+
password: _.get(applyPassword, "password"),
|
|
898
|
+
password_history: _.get(applyPassword, "password_history", []),
|
|
899
|
+
account_verified_date: new Date(),
|
|
900
|
+
status: ["staged", "provisioned"].includes(user.status.toString())
|
|
901
|
+
? user_enum_1.UserStatus.active
|
|
902
|
+
: user.status.toString()
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
await redis_1.redisCache.del(`USER_${user._id}`);
|
|
906
|
+
return true;
|
|
907
|
+
}
|
|
908
|
+
async forgotPassword(id, newPassword, confirmPassword) {
|
|
909
|
+
this._allowSystemUserOnly();
|
|
910
|
+
if (newPassword !== confirmPassword) {
|
|
911
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP009, 400);
|
|
912
|
+
}
|
|
913
|
+
let user = await this.model
|
|
914
|
+
.findOne({ _id: id })
|
|
915
|
+
.lean()
|
|
916
|
+
.exec();
|
|
917
|
+
if (!user) {
|
|
918
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP010, 400);
|
|
919
|
+
}
|
|
920
|
+
user = JSON.parse(JSON.stringify(user));
|
|
921
|
+
if (!["active"].includes(user.status.toString())) {
|
|
922
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP013, 400);
|
|
923
|
+
}
|
|
924
|
+
const applyPassword = await this._applyPasswordPolicy(user._id, user.username, newPassword, user.password_history);
|
|
925
|
+
await this.model.findByIdAndUpdate(user._id, {
|
|
926
|
+
$set: {
|
|
927
|
+
password: _.get(applyPassword, "password"),
|
|
928
|
+
password_history: _.get(applyPassword, "password_history", []),
|
|
929
|
+
change_password_date: new Date(),
|
|
930
|
+
status: user_enum_1.UserStatus.active
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
await redis_1.redisCache.del(`USER_${user._id}`);
|
|
934
|
+
return true;
|
|
935
|
+
}
|
|
936
|
+
async changePassword(currentPassword, newPassword, confirmPassword) {
|
|
937
|
+
const request = this.cls.get("request");
|
|
938
|
+
const userId = _.get(request, "profile.id");
|
|
939
|
+
try {
|
|
940
|
+
if (newPassword !== confirmPassword) {
|
|
941
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP009, 400);
|
|
942
|
+
}
|
|
943
|
+
let user = await this.model
|
|
944
|
+
.findOne({ _id: userId })
|
|
945
|
+
.lean()
|
|
946
|
+
.exec();
|
|
947
|
+
if (!user) {
|
|
948
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP010, 400);
|
|
949
|
+
}
|
|
950
|
+
user = JSON.parse(JSON.stringify(user));
|
|
951
|
+
const verifyPassword = await this._verifyPassword(user._id, currentPassword, user.password);
|
|
952
|
+
if (!verifyPassword) {
|
|
953
|
+
throw new common_1.HttpException("Invalid password", 400);
|
|
954
|
+
}
|
|
955
|
+
const applyPassword = await this._applyPasswordPolicy(user._id, user.username, newPassword, user.password_history, undefined);
|
|
956
|
+
await this.model.findByIdAndUpdate(user._id, {
|
|
957
|
+
$set: {
|
|
958
|
+
password: _.get(applyPassword, "password"),
|
|
959
|
+
password_history: _.get(applyPassword, "password_history", []),
|
|
960
|
+
change_password_date: new Date(),
|
|
961
|
+
status: user_enum_1.UserStatus.active
|
|
962
|
+
}
|
|
963
|
+
});
|
|
964
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
965
|
+
event: audit_log_enum_1.AuditLogEvent.change_password,
|
|
966
|
+
action: "success",
|
|
967
|
+
event_date: new Date(),
|
|
968
|
+
status: audit_log_enum_1.AuditLogStatus.successfully,
|
|
969
|
+
user: _.get(request, "profile")
|
|
970
|
+
});
|
|
971
|
+
await redis_1.redisCache.del(`USER_${user._id}`);
|
|
972
|
+
const localEnable = _.get(constants_1.CONST.AUTH_SETTINGS, "local.enable", false);
|
|
973
|
+
if (localEnable) {
|
|
974
|
+
this.sendActivateChangePassword(user);
|
|
975
|
+
}
|
|
976
|
+
return true;
|
|
977
|
+
}
|
|
978
|
+
catch (e) {
|
|
979
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
980
|
+
event: audit_log_enum_1.AuditLogEvent.change_password,
|
|
981
|
+
action: "error",
|
|
982
|
+
event_date: new Date(),
|
|
983
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
984
|
+
user: _.get(request, "profile"),
|
|
985
|
+
raw_data: { message: e.message }
|
|
986
|
+
});
|
|
987
|
+
throw e;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
async changePasswordExpired(newPassword, confirmPassword) {
|
|
991
|
+
const request = this.cls.get("request");
|
|
992
|
+
const userId = _.get(request, "profile.id");
|
|
993
|
+
try {
|
|
994
|
+
if (newPassword !== confirmPassword) {
|
|
995
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP009, 400);
|
|
996
|
+
}
|
|
997
|
+
let user = await this.model
|
|
998
|
+
.findOne({ _id: userId })
|
|
999
|
+
.lean()
|
|
1000
|
+
.exec();
|
|
1001
|
+
if (!user) {
|
|
1002
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP010, 400);
|
|
1003
|
+
}
|
|
1004
|
+
user = JSON.parse(JSON.stringify(user));
|
|
1005
|
+
const applyPassword = await this._applyPasswordPolicy(user._id, user.username, newPassword, user.password_history);
|
|
1006
|
+
await this.model.findByIdAndUpdate(user._id, {
|
|
1007
|
+
$set: {
|
|
1008
|
+
password: _.get(applyPassword, "password"),
|
|
1009
|
+
password_history: _.get(applyPassword, "password_history", []),
|
|
1010
|
+
change_password_date: new Date(),
|
|
1011
|
+
status: user_enum_1.UserStatus.active
|
|
1012
|
+
}
|
|
1013
|
+
});
|
|
1014
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
1015
|
+
event: audit_log_enum_1.AuditLogEvent.change_password,
|
|
1016
|
+
action: "success",
|
|
1017
|
+
event_date: new Date(),
|
|
1018
|
+
status: audit_log_enum_1.AuditLogStatus.successfully,
|
|
1019
|
+
user: _.get(request, "profile")
|
|
1020
|
+
});
|
|
1021
|
+
await redis_1.redisCache.del(`USER_${user._id}`);
|
|
1022
|
+
const localEnable = _.get(constants_1.CONST.AUTH_SETTINGS, "local.enable", false);
|
|
1023
|
+
if (localEnable) {
|
|
1024
|
+
this.sendActivateChangePassword(user);
|
|
1025
|
+
}
|
|
1026
|
+
return true;
|
|
1027
|
+
}
|
|
1028
|
+
catch (e) {
|
|
1029
|
+
await (0, schema_1.callAddQueueInternal)("queue", "audit_log", {
|
|
1030
|
+
event: audit_log_enum_1.AuditLogEvent.change_password,
|
|
1031
|
+
action: "error",
|
|
1032
|
+
event_date: new Date(),
|
|
1033
|
+
status: audit_log_enum_1.AuditLogStatus.failed,
|
|
1034
|
+
user: _.get(request, "profile"),
|
|
1035
|
+
raw_data: { message: e.message }
|
|
1036
|
+
});
|
|
1037
|
+
throw e;
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
async authorizeUnlockSystem(password) {
|
|
1041
|
+
const request = this.cls.get("request");
|
|
1042
|
+
const userId = _.get(request, "profile.id");
|
|
1043
|
+
let user = await this.model
|
|
1044
|
+
.findOne({ _id: userId })
|
|
1045
|
+
.lean()
|
|
1046
|
+
.exec();
|
|
1047
|
+
if (!user) {
|
|
1048
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP001, 400);
|
|
1049
|
+
}
|
|
1050
|
+
user = JSON.parse(JSON.stringify(user));
|
|
1051
|
+
const verifyPassword = await this._verifyPassword(user._id, password, user.password);
|
|
1052
|
+
if (!verifyPassword) {
|
|
1053
|
+
throw new common_1.HttpException(user_enum_1.UserErrorCode.UAP001, 400);
|
|
1054
|
+
}
|
|
1055
|
+
await this._allowSystemAdminRoleOnly();
|
|
1056
|
+
return true;
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
1059
|
+
exports.UserService = UserService;
|
|
1060
|
+
exports.UserService = UserService = UserService_1 = __decorate([
|
|
1061
|
+
(0, common_1.Injectable)(),
|
|
1062
|
+
__param(2, (0, mongoose_1.InjectModel)("user")),
|
|
1063
|
+
__metadata("design:paramtypes", [nestjs_cls_1.ClsService,
|
|
1064
|
+
entities_service_1.EntitiesService, mongoose.Model])
|
|
1065
|
+
], UserService);
|
|
1066
|
+
let UserRoleService = UserRoleService_1 = class UserRoleService extends base_service_1.BaseService {
|
|
1067
|
+
constructor(cls, entitiesService, model) {
|
|
1068
|
+
super(cls, model);
|
|
1069
|
+
this.cls = cls;
|
|
1070
|
+
this.entitiesService = entitiesService;
|
|
1071
|
+
this.model = model;
|
|
1072
|
+
}
|
|
1073
|
+
async init() {
|
|
1074
|
+
try {
|
|
1075
|
+
if (process.env.WORKER_NO === "1") {
|
|
1076
|
+
await this._setLayoutPermissionTabCustomEntity(user_layout_1.UserRoleLayout);
|
|
1077
|
+
}
|
|
1078
|
+
await this.entitiesService.refreshSystemSchema(UserRoleService_1, this.model, user_schema_1.UserRole, user_schema_1.UserRoleSchema, { hooks: user_hook_1.UserRoleHook, layouts: user_layout_1.UserRoleLayout });
|
|
1079
|
+
(0, entity_1.initData)(_.snakeCase(user_schema_1.UserRole.name));
|
|
1080
|
+
return _.snakeCase(user_schema_1.UserRole.name);
|
|
1081
|
+
}
|
|
1082
|
+
catch (e) {
|
|
1083
|
+
console.error(e);
|
|
1084
|
+
throw e;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
async initData() {
|
|
1088
|
+
console.log("-------- initData IN UserRole -----------");
|
|
1089
|
+
const buff = Buffer.from(user_constant_1.DEFAULT_ROLES, "base64");
|
|
1090
|
+
const defaultRoles = (0, bson_1.deserialize)(buff);
|
|
1091
|
+
const systemData = await this.model.find({ system: true });
|
|
1092
|
+
if (systemData.length === 0) {
|
|
1093
|
+
const dto = new this.model(defaultRoles);
|
|
1094
|
+
await dto.save();
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
async _setLayoutPermissionTabCustomEntity(layouts, entities) {
|
|
1098
|
+
const schemasStack = _.get(constants_1.CONST, "SCHEMAS_STACK", {});
|
|
1099
|
+
let customEntity = [];
|
|
1100
|
+
if (!entities) {
|
|
1101
|
+
for (const entity of Object.keys(schemasStack)) {
|
|
1102
|
+
if (!schemasStack[entity]["entity"]["system"]) {
|
|
1103
|
+
customEntity.push({
|
|
1104
|
+
name: schemasStack[entity]["entity"].name,
|
|
1105
|
+
display_name: schemasStack[entity]["entity"].display_name
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
else {
|
|
1111
|
+
customEntity = entities;
|
|
1112
|
+
}
|
|
1113
|
+
const defaultLayout = layouts.find(lay => lay.code === "default");
|
|
1114
|
+
const blockTabs = _.get(defaultLayout, "detail.blocks", []).find(b => b.type === "tabs");
|
|
1115
|
+
const idxCustomEntityTab = blockTabs.tabs.findIndex(i => i.title === "Custom Entity");
|
|
1116
|
+
if (customEntity.length === 0 && idxCustomEntityTab >= 0) {
|
|
1117
|
+
blockTabs.tabs.splice(idxCustomEntityTab, 1);
|
|
1118
|
+
}
|
|
1119
|
+
if (customEntity.length > 0 && idxCustomEntityTab === -1) {
|
|
1120
|
+
blockTabs.tabs.push({
|
|
1121
|
+
key: (0, uuid_1.v4)(),
|
|
1122
|
+
title: "Custom Entity",
|
|
1123
|
+
blocks: [
|
|
1124
|
+
{
|
|
1125
|
+
key: (0, uuid_1.v4)(),
|
|
1126
|
+
type: "column",
|
|
1127
|
+
layout: {
|
|
1128
|
+
num_of_col: 3,
|
|
1129
|
+
fields: [[], [], []]
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
]
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
if (customEntity.length > 0) {
|
|
1136
|
+
customEntity = _.sortBy(customEntity, ["name"]);
|
|
1137
|
+
const fields = [[], [], []];
|
|
1138
|
+
let index = 0;
|
|
1139
|
+
for (const entity of customEntity) {
|
|
1140
|
+
const field = {
|
|
1141
|
+
field: "radio",
|
|
1142
|
+
type: "standard_component",
|
|
1143
|
+
unique_key: `standard_component_radio_${(0, uuid_1.v4)()}`,
|
|
1144
|
+
key: `permisson_tab.custom_entity.${entity.name}`,
|
|
1145
|
+
label: entity.display_name,
|
|
1146
|
+
required: true,
|
|
1147
|
+
link_type: "key",
|
|
1148
|
+
options: [
|
|
1149
|
+
user_enum_1.UserPermission.access_denied,
|
|
1150
|
+
user_enum_1.UserPermission.viewer,
|
|
1151
|
+
user_enum_1.UserPermission.creator
|
|
1152
|
+
],
|
|
1153
|
+
option_type: "button",
|
|
1154
|
+
default_value: user_enum_1.UserPermission.access_denied
|
|
1155
|
+
};
|
|
1156
|
+
fields[index].push(field);
|
|
1157
|
+
index = index < 2 ? index + 1 : 0;
|
|
1158
|
+
}
|
|
1159
|
+
_.set(defaultLayout, `detail.blocks[2].tabs[2].blocks[0].layout.fields`, fields);
|
|
1160
|
+
}
|
|
1161
|
+
const customModulesPermissions = _.get(constants_1.CONST, "CUSTOM_MODULES_PERMISSIONS_LAYOUT", {});
|
|
1162
|
+
_.set(defaultLayout, `detail.blocks[2].tabs[1].blocks`, customModulesPermissions);
|
|
1163
|
+
(0, entity_1.addSystemLayout)("user_role", defaultLayout);
|
|
1164
|
+
return layouts;
|
|
1165
|
+
}
|
|
1166
|
+
async _prepareDataUpdate(data, permissions, isCreate) {
|
|
1167
|
+
const permissonTS = _.get(data, "permisson_tab.system", {});
|
|
1168
|
+
const permissonCE = _.get(data, "permisson_tab.custom_entity", {});
|
|
1169
|
+
const permissonM = _.get(data, "permisson_tab.module", {});
|
|
1170
|
+
const permissonModule = {};
|
|
1171
|
+
for (const module of Object.keys(permissonM)) {
|
|
1172
|
+
if (isCreate) {
|
|
1173
|
+
const defaultPermisson = await (0, schema_1.callInternalModuleSetting)(`${module}_setting`, "get", "permission/default");
|
|
1174
|
+
for (const key of Object.keys(defaultPermisson)) {
|
|
1175
|
+
if (_.isUndefined(_.get(permissonM, `${module}.${key}`))) {
|
|
1176
|
+
_.set(permissonM, `${module}.${key}`, defaultPermisson[key]);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
const permisson = await (0, schema_1.callInternalModuleSetting)(`${module}_setting`, "put", "permission", Object.assign(Object.assign({}, permissonM[module]), { _role: data }));
|
|
1181
|
+
if (!_.isEmpty(permisson)) {
|
|
1182
|
+
permisson.map(pm => {
|
|
1183
|
+
permissonModule[_.get(pm, "entity.name")] = _.get(pm, "permission", "").toString();
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
permissions.map(p => {
|
|
1188
|
+
const entityName = p.entity.name;
|
|
1189
|
+
if (Object.keys(permissonCE).includes(entityName)) {
|
|
1190
|
+
p["permission"] = permissonCE[entityName];
|
|
1191
|
+
}
|
|
1192
|
+
else if (Object.keys(permissonModule).includes(entityName)) {
|
|
1193
|
+
p["permission"] = permissonModule[entityName];
|
|
1194
|
+
}
|
|
1195
|
+
else if ([
|
|
1196
|
+
"translate",
|
|
1197
|
+
"company",
|
|
1198
|
+
"country",
|
|
1199
|
+
"province",
|
|
1200
|
+
"time_zone",
|
|
1201
|
+
"language",
|
|
1202
|
+
"district",
|
|
1203
|
+
"subdistrict",
|
|
1204
|
+
"template",
|
|
1205
|
+
"import_export",
|
|
1206
|
+
"currency"
|
|
1207
|
+
].includes(entityName)) {
|
|
1208
|
+
p["permission"] = permissonTS[`manage_${entityName}`]
|
|
1209
|
+
? user_enum_1.UserPermission.creator
|
|
1210
|
+
: user_enum_1.UserPermission.viewer;
|
|
1211
|
+
}
|
|
1212
|
+
else if (["mail_setting", "sms", "api_key"].includes(entityName)) {
|
|
1213
|
+
p["permission"] = permissonTS[`manage_${entityName}`]
|
|
1214
|
+
? user_enum_1.UserPermission.creator
|
|
1215
|
+
: user_enum_1.UserPermission.access_denied;
|
|
1216
|
+
}
|
|
1217
|
+
else if (["reason_master", "reason_option"].includes(entityName)) {
|
|
1218
|
+
p["permission"] = permissonTS.manage_reason
|
|
1219
|
+
? user_enum_1.UserPermission.creator
|
|
1220
|
+
: user_enum_1.UserPermission.viewer;
|
|
1221
|
+
}
|
|
1222
|
+
else if (["user"].includes(entityName)) {
|
|
1223
|
+
p["permission"] = user_enum_1.UserPermission.access_denied;
|
|
1224
|
+
if (permissonTS[`view_${entityName}`]) {
|
|
1225
|
+
p["permission"] = user_enum_1.UserPermission.viewer;
|
|
1226
|
+
}
|
|
1227
|
+
if (permissonTS[`manage_${entityName}`]) {
|
|
1228
|
+
p["permission"] = user_enum_1.UserPermission.creator;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
else if (["schedule_action"].includes(entityName)) {
|
|
1232
|
+
p["permission"] = permissonTS[`manage_${entityName}`]
|
|
1233
|
+
? user_enum_1.UserPermission.creator
|
|
1234
|
+
: user_enum_1.UserPermission.access_denied;
|
|
1235
|
+
}
|
|
1236
|
+
else if (["user_role", "user_role_permission"].includes(entityName)) {
|
|
1237
|
+
p["permission"] = permissonTS.manage_user_role
|
|
1238
|
+
? user_enum_1.UserPermission.creator
|
|
1239
|
+
: user_enum_1.UserPermission.viewer;
|
|
1240
|
+
}
|
|
1241
|
+
else if (["notification_message", "notification_message_queue"].includes(entityName)) {
|
|
1242
|
+
p["permission"] = permissonTS.manage_notification
|
|
1243
|
+
? user_enum_1.UserPermission.creator
|
|
1244
|
+
: user_enum_1.UserPermission.access_denied;
|
|
1245
|
+
}
|
|
1246
|
+
else if (["shortly_url"].includes(entityName)) {
|
|
1247
|
+
p["permission"] = permissonTS.manage_shortly_url
|
|
1248
|
+
? user_enum_1.UserPermission.creator
|
|
1249
|
+
: user_enum_1.UserPermission.viewer;
|
|
1250
|
+
}
|
|
1251
|
+
else if (["pipeline", "pipeline_job"].includes(entityName)) {
|
|
1252
|
+
p["permission"] = permissonTS.manage_pipeline
|
|
1253
|
+
? user_enum_1.UserPermission.creator
|
|
1254
|
+
: user_enum_1.UserPermission.access_denied;
|
|
1255
|
+
}
|
|
1256
|
+
else if ([
|
|
1257
|
+
"activity_log",
|
|
1258
|
+
"attachment",
|
|
1259
|
+
"map_location",
|
|
1260
|
+
"reason_data",
|
|
1261
|
+
"comment_data",
|
|
1262
|
+
"import_export_log",
|
|
1263
|
+
"notification_subscription",
|
|
1264
|
+
"user_filter"
|
|
1265
|
+
].includes(entityName)) {
|
|
1266
|
+
p["permission"] = user_enum_1.UserPermission.creator;
|
|
1267
|
+
}
|
|
1268
|
+
else {
|
|
1269
|
+
p["permission"] = user_enum_1.UserPermission.viewer;
|
|
1270
|
+
}
|
|
1271
|
+
if (entityName === "entity") {
|
|
1272
|
+
p["enable_fields"] = _.get(permissonTS, "entities.fields", false);
|
|
1273
|
+
p["enable_layouts"] = _.get(permissonTS, "entities.layouts", false);
|
|
1274
|
+
p["enable_custom_action"] = _.get(permissonTS, "entities.custom_action", false);
|
|
1275
|
+
p["enable_hooks"] = _.get(permissonTS, "entities.hooks", false);
|
|
1276
|
+
p["enable_workflows"] = _.get(permissonTS, "entities.workflows", false);
|
|
1277
|
+
p["enable_permission"] = _.get(permissonTS, "entities.permission", false);
|
|
1278
|
+
p["enable_external_source"] = _.get(permissonTS, "entities.external_source", false);
|
|
1279
|
+
}
|
|
1280
|
+
return p;
|
|
1281
|
+
});
|
|
1282
|
+
return permissions;
|
|
1283
|
+
}
|
|
1284
|
+
async _prepareDataAfterSave(data, permissions) {
|
|
1285
|
+
if (!_.isEmpty(permissions)) {
|
|
1286
|
+
const saveData = _.reduce(permissions, (r, v) => {
|
|
1287
|
+
if (_.get(v, "entity.name") === "entity") {
|
|
1288
|
+
r.push({
|
|
1289
|
+
permission: v.permission,
|
|
1290
|
+
entity: v.entity.id,
|
|
1291
|
+
role: data.id,
|
|
1292
|
+
enable_fields: _.get(v, "enable_fields", false),
|
|
1293
|
+
enable_layouts: _.get(v, "enable_layouts", false),
|
|
1294
|
+
enable_custom_action: _.get(v, "enable_custom_action", false),
|
|
1295
|
+
enable_hooks: _.get(v, "enable_hooks", false),
|
|
1296
|
+
enable_workflows: _.get(v, "enable_workflows", false),
|
|
1297
|
+
enable_permission: _.get(v, "enable_permission", false),
|
|
1298
|
+
enable_external_source: _.get(v, "enable_external_source", false)
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
else {
|
|
1302
|
+
r.push({
|
|
1303
|
+
permission: v.permission,
|
|
1304
|
+
entity: v.entity.id,
|
|
1305
|
+
role: data.id
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
return r;
|
|
1309
|
+
}, []);
|
|
1310
|
+
const pIds = await (0, schema_1.callListIdsInternalService)("user_role_permission", "", { role: data.id }, 1, 1000);
|
|
1311
|
+
await (0, schema_1.callBulkDeleteInternalService)("user_role_permission", pIds);
|
|
1312
|
+
await (0, schema_1.callBulkCreateInternalService)("user_role_permission", saveData);
|
|
1313
|
+
}
|
|
1314
|
+
return true;
|
|
1315
|
+
}
|
|
1316
|
+
async refresh(ignorePublish) {
|
|
1317
|
+
let data = await this.findAll();
|
|
1318
|
+
data = JSON.parse(JSON.stringify(data));
|
|
1319
|
+
constants_1.CONST.USER_ROLES = data;
|
|
1320
|
+
if (ignorePublish) {
|
|
1321
|
+
console.log("Ignore Publish");
|
|
1322
|
+
return true;
|
|
1323
|
+
}
|
|
1324
|
+
const doc = {
|
|
1325
|
+
event: constants_1.USER_ROLES_REFRESH,
|
|
1326
|
+
_system: constants_1.CONST.SYSTEM_NAME,
|
|
1327
|
+
_unique: constants_1.CONST.UNIQUE
|
|
1328
|
+
};
|
|
1329
|
+
const buff = (0, bson_1.serialize)(doc);
|
|
1330
|
+
const message = buff.toString("base64");
|
|
1331
|
+
redis_1.redisPublisher.publish(constants_1.EVENT_TRIGGER, message);
|
|
1332
|
+
return true;
|
|
1333
|
+
}
|
|
1334
|
+
async search(keywords, filters, page = 1, page_size = 10, sort = "", grouping, noTranslate, fields) {
|
|
1335
|
+
var _a;
|
|
1336
|
+
const request = this.cls.get("request");
|
|
1337
|
+
const permission = ((_a = (request.permissions || []).find(i => i.entity === "user_role")) === null || _a === void 0 ? void 0 : _a.access) ||
|
|
1338
|
+
user_enum_1.UserPermission.viewer;
|
|
1339
|
+
const haveFullAccess = (request.roles || []).includes("system_admin");
|
|
1340
|
+
const haveManage = _.get(request, "permisson_tab.system.manage_user") ||
|
|
1341
|
+
_.get(request, "permisson_tab.system.manage_user_role");
|
|
1342
|
+
if (!haveFullAccess &&
|
|
1343
|
+
permission === user_enum_1.UserPermission.viewer &&
|
|
1344
|
+
!haveManage) {
|
|
1345
|
+
throw new common_1.HttpException(`Access denied to user_role entity`, 401);
|
|
1346
|
+
}
|
|
1347
|
+
const result = await super.search(keywords, filters, page, page_size, sort, grouping, noTranslate, fields);
|
|
1348
|
+
return result;
|
|
1349
|
+
}
|
|
1350
|
+
async findOne(id, fields) {
|
|
1351
|
+
var _a;
|
|
1352
|
+
const request = this.cls.get("request");
|
|
1353
|
+
const permission = ((_a = (request.permissions || []).find(i => i.entity === "user_role")) === null || _a === void 0 ? void 0 : _a.access) ||
|
|
1354
|
+
user_enum_1.UserPermission.viewer;
|
|
1355
|
+
const haveFullAccess = (request.roles || []).includes("system_admin");
|
|
1356
|
+
const haveManage = _.get(request, "permisson_tab.system.manage_user") ||
|
|
1357
|
+
_.get(request, "permisson_tab.system.manage_user_role");
|
|
1358
|
+
if (!haveFullAccess &&
|
|
1359
|
+
permission === user_enum_1.UserPermission.viewer &&
|
|
1360
|
+
!haveManage) {
|
|
1361
|
+
throw new common_1.HttpException(`Access denied to user_role entity`, 401);
|
|
1362
|
+
}
|
|
1363
|
+
const res = await super.findOne(id, fields);
|
|
1364
|
+
if ((res === null || res === void 0 ? void 0 : res.code) === "system_admin") {
|
|
1365
|
+
_.set(res, "permisson_tab.system", _.reduce(user_constant_1.PERMISSION_ADMIN, (r, i) => {
|
|
1366
|
+
r[`manage_${i}`] = true;
|
|
1367
|
+
return r;
|
|
1368
|
+
}, {}));
|
|
1369
|
+
_.set(res, "permisson_tab.system.view_user", true);
|
|
1370
|
+
_.set(res, "permisson_tab.system.entities", {
|
|
1371
|
+
layouts: true,
|
|
1372
|
+
fields: true,
|
|
1373
|
+
custom_action: true,
|
|
1374
|
+
hooks: true,
|
|
1375
|
+
workflows: true,
|
|
1376
|
+
external_source: true,
|
|
1377
|
+
permission: true,
|
|
1378
|
+
monitor: true
|
|
1379
|
+
});
|
|
1380
|
+
_.set(res, "permisson_tab.module", _.reduce(constants_1.CONST.CUSTOM_MODULES_PERMISSIONS, (r, i, k) => {
|
|
1381
|
+
r[k] = _.reduce(i, (r1, i1) => {
|
|
1382
|
+
r1[i1] = true;
|
|
1383
|
+
return r1;
|
|
1384
|
+
}, {});
|
|
1385
|
+
r[`manage_${i}`] = true;
|
|
1386
|
+
return r;
|
|
1387
|
+
}, {}));
|
|
1388
|
+
const customEntity = await (0, schema_1.callListInternalService)("entity", "", { system: false }, "", "name");
|
|
1389
|
+
_.set(res, "permisson_tab.custom_entity", _.reduce(customEntity.rows, (r, i, k) => {
|
|
1390
|
+
r[i.name] = "creator";
|
|
1391
|
+
return r;
|
|
1392
|
+
}, {}));
|
|
1393
|
+
}
|
|
1394
|
+
return res;
|
|
1395
|
+
}
|
|
1396
|
+
async create(data) {
|
|
1397
|
+
const entityList = await (0, schema_1.callListInternalService)("entity", "", "", "", "name");
|
|
1398
|
+
const permissions = _.get(entityList, "rows").map(i => ({
|
|
1399
|
+
entity: { id: i._id, name: i.name }
|
|
1400
|
+
}));
|
|
1401
|
+
const result = await super.create(data);
|
|
1402
|
+
const savePermissions = await this._prepareDataUpdate(Object.assign(Object.assign({}, data), { id: result._id.toString() }), permissions, true);
|
|
1403
|
+
await this._prepareDataAfterSave(result, savePermissions);
|
|
1404
|
+
await this.refresh();
|
|
1405
|
+
return result;
|
|
1406
|
+
}
|
|
1407
|
+
async update(id, data) {
|
|
1408
|
+
let oldData = await this.findOne(id);
|
|
1409
|
+
oldData = JSON.parse(JSON.stringify(oldData));
|
|
1410
|
+
let savePermissions = undefined;
|
|
1411
|
+
if (!oldData.system) {
|
|
1412
|
+
const entityList = await (0, schema_1.callListInternalService)("entity", "", "", "", "name");
|
|
1413
|
+
const permissions = _.get(entityList, "rows").map(i => ({
|
|
1414
|
+
entity: { id: i._id, name: i.name }
|
|
1415
|
+
}));
|
|
1416
|
+
savePermissions = await this._prepareDataUpdate(Object.assign({ id }, data), permissions);
|
|
1417
|
+
}
|
|
1418
|
+
const result = await super.update(id, data);
|
|
1419
|
+
await this._prepareDataAfterSave(result, savePermissions);
|
|
1420
|
+
await this.refresh();
|
|
1421
|
+
return result;
|
|
1422
|
+
}
|
|
1423
|
+
async findAll() {
|
|
1424
|
+
const roles = await this.model.find({}).exec();
|
|
1425
|
+
const Model = mongoose.model("user_role_permission", user_schema_1.UserRolePermissionSchema);
|
|
1426
|
+
const res = [];
|
|
1427
|
+
for (const roleDoc of roles) {
|
|
1428
|
+
const role = await roleDoc.toJSON();
|
|
1429
|
+
const permissions = await Model.find({ role: role._id }).populate({
|
|
1430
|
+
path: "entity",
|
|
1431
|
+
model: "entity",
|
|
1432
|
+
select: "name"
|
|
1433
|
+
});
|
|
1434
|
+
res.push(Object.assign(Object.assign({}, role), { permissions: permissions.map(i => _.omit(i, ["role"])) }));
|
|
1435
|
+
}
|
|
1436
|
+
return res;
|
|
1437
|
+
}
|
|
1438
|
+
async addPermission(id, permisson) {
|
|
1439
|
+
return this.model.findOneAndUpdate({ _id: id }, {
|
|
1440
|
+
$push: {
|
|
1441
|
+
permissions: permisson
|
|
1442
|
+
}
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
async updatePermission(data) {
|
|
1446
|
+
return true;
|
|
1447
|
+
}
|
|
1448
|
+
async updateLayout() {
|
|
1449
|
+
const entity = await (0, schema_1.loadEntity)("user_role");
|
|
1450
|
+
const result = await (0, schema_1.callListInternalService)("entity", "", { system: false }, "name");
|
|
1451
|
+
const customEntity = _.get(result, "rows", []).map(i => ({
|
|
1452
|
+
name: i.name,
|
|
1453
|
+
display_name: i.display_name
|
|
1454
|
+
}));
|
|
1455
|
+
const layouts = await this._setLayoutPermissionTabCustomEntity(entity.layouts, customEntity);
|
|
1456
|
+
return await (0, schema_1.callUpdateSchemaInternal)(entity.id, { layouts });
|
|
1457
|
+
}
|
|
1458
|
+
async migrate() {
|
|
1459
|
+
const roles = await this.search("", { permissions: { $exists: true } }, 1, 10);
|
|
1460
|
+
for (const role of _.get(roles, "rows", [])) {
|
|
1461
|
+
await (0, schema_1.callBulkUpdateInternalService)("user_role_permission", role.permissions.map(i => ({
|
|
1462
|
+
id: i,
|
|
1463
|
+
role: role.id
|
|
1464
|
+
})));
|
|
1465
|
+
await this.model.updateOne({ _id: role.id }, { $unset: { permissions: 1 } });
|
|
1466
|
+
}
|
|
1467
|
+
return true;
|
|
1468
|
+
}
|
|
1469
|
+
async getRoleOptions() {
|
|
1470
|
+
const totalRec = await (0, schema_1.callCountInternalService)("user_role", "", {});
|
|
1471
|
+
const userRoles = await (0, schema_1.callListInternalService)("user_role", "", "", "", "name, code", 1, totalRec);
|
|
1472
|
+
return userRoles.rows;
|
|
1473
|
+
}
|
|
1474
|
+
};
|
|
1475
|
+
exports.UserRoleService = UserRoleService;
|
|
1476
|
+
exports.UserRoleService = UserRoleService = UserRoleService_1 = __decorate([
|
|
1477
|
+
(0, common_1.Injectable)(),
|
|
1478
|
+
__param(2, (0, mongoose_1.InjectModel)("user_role")),
|
|
1479
|
+
__metadata("design:paramtypes", [nestjs_cls_1.ClsService,
|
|
1480
|
+
entities_service_1.EntitiesService, mongoose.Model])
|
|
1481
|
+
], UserRoleService);
|
|
1482
|
+
let UserRolePermissonService = UserRolePermissonService_1 = class UserRolePermissonService extends base_service_1.BaseService {
|
|
1483
|
+
constructor(cls, entitiesService, model) {
|
|
1484
|
+
super(cls, model);
|
|
1485
|
+
this.cls = cls;
|
|
1486
|
+
this.entitiesService = entitiesService;
|
|
1487
|
+
this.model = model;
|
|
1488
|
+
}
|
|
1489
|
+
async init() {
|
|
1490
|
+
await this.entitiesService.refreshSystemSchema(UserRolePermissonService_1, this.model, user_schema_1.UserRolePermission, user_schema_1.UserRolePermissionSchema, { hooks: user_hook_1.UserRolePermissonHook, layouts: user_layout_1.UserRolePermissionLayout });
|
|
1491
|
+
return user_schema_1.UserRolePermission.name;
|
|
1492
|
+
}
|
|
1493
|
+
};
|
|
1494
|
+
exports.UserRolePermissonService = UserRolePermissonService;
|
|
1495
|
+
exports.UserRolePermissonService = UserRolePermissonService = UserRolePermissonService_1 = __decorate([
|
|
1496
|
+
(0, common_1.Injectable)(),
|
|
1497
|
+
__param(2, (0, mongoose_1.InjectModel)("user_role_permission")),
|
|
1498
|
+
__metadata("design:paramtypes", [nestjs_cls_1.ClsService,
|
|
1499
|
+
entities_service_1.EntitiesService, mongoose.Model])
|
|
1500
|
+
], UserRolePermissonService);
|
|
1501
|
+
let UserFilterService = UserFilterService_1 = class UserFilterService extends base_service_1.BaseService {
|
|
1502
|
+
constructor(cls, entitiesService, model) {
|
|
1503
|
+
super(cls, model);
|
|
1504
|
+
this.cls = cls;
|
|
1505
|
+
this.entitiesService = entitiesService;
|
|
1506
|
+
this.model = model;
|
|
1507
|
+
}
|
|
1508
|
+
async init() {
|
|
1509
|
+
await this.entitiesService.refreshSystemSchema(UserFilterService_1, this.model, user_schema_1.UserFilter, user_schema_1.UserFilterSchema, { permissions: user_permission_1.UserFilterPermission });
|
|
1510
|
+
return user_schema_1.UserFilter.name;
|
|
1511
|
+
}
|
|
1512
|
+
async _prepareData(data) {
|
|
1513
|
+
const request = this.cls.get("request");
|
|
1514
|
+
data["user"] = _.get(request, "profile.id");
|
|
1515
|
+
const entity = await (0, schema_1.loadEntity)(data.entity);
|
|
1516
|
+
if (!entity)
|
|
1517
|
+
throw new Error("Invalid entity");
|
|
1518
|
+
data["entity"] = entity.name;
|
|
1519
|
+
return data;
|
|
1520
|
+
}
|
|
1521
|
+
async create(data) {
|
|
1522
|
+
return await super.create(await this._prepareData(data));
|
|
1523
|
+
}
|
|
1524
|
+
async update(id, data) {
|
|
1525
|
+
return await super.update(id, await this._prepareData(data));
|
|
1526
|
+
}
|
|
1527
|
+
async getListFilter() {
|
|
1528
|
+
const request = this.cls.get("request");
|
|
1529
|
+
const profileId = _.get(request, "profile._id");
|
|
1530
|
+
const query = {
|
|
1531
|
+
$or: [
|
|
1532
|
+
{
|
|
1533
|
+
user: profileId
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
is_share: true
|
|
1537
|
+
}
|
|
1538
|
+
]
|
|
1539
|
+
};
|
|
1540
|
+
const total = await this.model.countDocuments(query).exec();
|
|
1541
|
+
return await super.search("", query, 1, total);
|
|
1542
|
+
}
|
|
1543
|
+
};
|
|
1544
|
+
exports.UserFilterService = UserFilterService;
|
|
1545
|
+
exports.UserFilterService = UserFilterService = UserFilterService_1 = __decorate([
|
|
1546
|
+
(0, common_1.Injectable)(),
|
|
1547
|
+
__param(2, (0, mongoose_1.InjectModel)("user_filter")),
|
|
1548
|
+
__metadata("design:paramtypes", [nestjs_cls_1.ClsService,
|
|
1549
|
+
entities_service_1.EntitiesService, mongoose.Model])
|
|
1550
|
+
], UserFilterService);
|
|
1551
|
+
//# sourceMappingURL=user.service.js.map
|