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,1218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseService = void 0;
|
|
13
|
+
const mongoose = require("mongoose");
|
|
14
|
+
const _ = require("lodash");
|
|
15
|
+
const axios_1 = require("axios");
|
|
16
|
+
const uuid_1 = require("uuid");
|
|
17
|
+
const build_search_1 = require("../utils/build_search");
|
|
18
|
+
const common_1 = require("@nestjs/common");
|
|
19
|
+
const schema_1 = require("../utils/schema");
|
|
20
|
+
const activity_log_enum_1 = require("../../activity_log/activity_log.enum");
|
|
21
|
+
const permission_1 = require("../utils/permission");
|
|
22
|
+
const decimal2Json_1 = require("../utils/decimal2Json");
|
|
23
|
+
const constants_1 = require("../constants");
|
|
24
|
+
const layout_1 = require("../utils/layout");
|
|
25
|
+
const translate_1 = require("../utils/translate");
|
|
26
|
+
const executions_1 = require("../utils/executions");
|
|
27
|
+
const redis_1 = require("../utils/redis");
|
|
28
|
+
const transform_1 = require("../utils/transform");
|
|
29
|
+
const entity_1 = require("../utils/entity");
|
|
30
|
+
const hook_1 = require("../utils/hook");
|
|
31
|
+
const example_1 = require("../utils/example");
|
|
32
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
33
|
+
const external_data_1 = require("../utils/external_data");
|
|
34
|
+
const masking_1 = require("../utils/masking");
|
|
35
|
+
const retry_1 = require("../utils/retry");
|
|
36
|
+
const text_search_1 = require("../utils/text_search");
|
|
37
|
+
const external_module_1 = require("../utils/external_module");
|
|
38
|
+
const MAX_SEARCH_IDS_SIZE = 100000;
|
|
39
|
+
const TTL = 3000;
|
|
40
|
+
let BaseService = class BaseService {
|
|
41
|
+
constructor(cls, model) {
|
|
42
|
+
this.cls = cls;
|
|
43
|
+
this.model = model;
|
|
44
|
+
}
|
|
45
|
+
_getCurrentProfile() {
|
|
46
|
+
const request = this.cls.get("request");
|
|
47
|
+
return _.get(request, "profile", {});
|
|
48
|
+
}
|
|
49
|
+
_getCurrentApiKey() {
|
|
50
|
+
const request = this.cls.get("request");
|
|
51
|
+
return _.get(request, "api_key", {});
|
|
52
|
+
}
|
|
53
|
+
_getCurrentPermissions() {
|
|
54
|
+
const request = this.cls.get("request");
|
|
55
|
+
return _.get(request, "permissions", []);
|
|
56
|
+
}
|
|
57
|
+
_getCurrentRole() {
|
|
58
|
+
const request = this.cls.get("request");
|
|
59
|
+
return _.get(request, "roles", []);
|
|
60
|
+
}
|
|
61
|
+
_getCurrentHeaders(isClone = false) {
|
|
62
|
+
const request = this.cls.get("request");
|
|
63
|
+
if (isClone) {
|
|
64
|
+
return _.cloneDeep(_.get(request, "headers", {}));
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return _.get(request, "headers", {});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
_getCurrentBody() {
|
|
71
|
+
const request = this.cls.get("request");
|
|
72
|
+
return _.get(request, "body", {});
|
|
73
|
+
}
|
|
74
|
+
_isInternal() {
|
|
75
|
+
const request = this.cls.get("request");
|
|
76
|
+
return (0, permission_1.isInternal)(request);
|
|
77
|
+
}
|
|
78
|
+
_listRelatedO2MFields(data, entity) {
|
|
79
|
+
const result = [];
|
|
80
|
+
for (const field of entity.fields) {
|
|
81
|
+
if (field.name.startsWith("_"))
|
|
82
|
+
continue;
|
|
83
|
+
if (field.type === "related" && field.related_type === "one2many") {
|
|
84
|
+
const o2m = {
|
|
85
|
+
name: field.name,
|
|
86
|
+
ref: field.related_ref,
|
|
87
|
+
allow_create_update: false,
|
|
88
|
+
data: _.cloneDeep(data[field.name])
|
|
89
|
+
};
|
|
90
|
+
if ((field.list_type === "standard_list" && field.allow_create_update) ||
|
|
91
|
+
field.list_type === "full_list_editable") {
|
|
92
|
+
o2m.allow_create_update = true;
|
|
93
|
+
}
|
|
94
|
+
result.push(o2m);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const x = result.filter(f => data.hasOwnProperty(f.name));
|
|
98
|
+
return x;
|
|
99
|
+
}
|
|
100
|
+
async _callDeleteInternalService(modelName, ids) {
|
|
101
|
+
try {
|
|
102
|
+
const entity = await (0, schema_1.loadEntity)(modelName);
|
|
103
|
+
if (!entity) {
|
|
104
|
+
throw new Error(`${modelName} entity doesn't exists`);
|
|
105
|
+
}
|
|
106
|
+
if (!this._http) {
|
|
107
|
+
this._http = axios_1.default.create();
|
|
108
|
+
}
|
|
109
|
+
const headers = this._getCurrentHeaders(true);
|
|
110
|
+
headers["ignore_activity_log"] = true;
|
|
111
|
+
delete headers["content-length"];
|
|
112
|
+
const res = await this._http.post(`${constants_1.CONST.INTERNAL_DOMAIN}/${entity.system ? "" : "entities/"}${modelName}/bulk_delete`, { ids }, { headers });
|
|
113
|
+
return res.data;
|
|
114
|
+
}
|
|
115
|
+
catch (e) {
|
|
116
|
+
throw new Error(e.response.data.message);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async _setGenerateDataRedis(ref_id, percent, errorMsg) {
|
|
120
|
+
if (ref_id) {
|
|
121
|
+
const data = {
|
|
122
|
+
ref_id,
|
|
123
|
+
percent,
|
|
124
|
+
finish: percent >= 100 || percent < 0,
|
|
125
|
+
status: percent >= 100 ? "success" : percent < 0 ? "failed" : "processing"
|
|
126
|
+
};
|
|
127
|
+
if (errorMsg) {
|
|
128
|
+
data["error_message"] = errorMsg;
|
|
129
|
+
}
|
|
130
|
+
await redis_1.redisCache.set(ref_id, data, TTL);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async init() {
|
|
134
|
+
return "";
|
|
135
|
+
}
|
|
136
|
+
async initData() { }
|
|
137
|
+
async search(keywords, filters, page = 1, page_size = 10, sort = "", grouping, noTranslate, fields) {
|
|
138
|
+
var _a, _b;
|
|
139
|
+
(0, permission_1.checkPermission)(this.model.modelName, "view", this._getCurrentPermissions());
|
|
140
|
+
const request = this.cls.get("request");
|
|
141
|
+
const profile = _.get(request, "profile");
|
|
142
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
143
|
+
const isAllowAddSearchText = (0, text_search_1.checkAllowAddSearchText)(this.model.modelName);
|
|
144
|
+
keywords = (0, text_search_1.modifyKeywords)(keywords);
|
|
145
|
+
let query = (await (0, build_search_1.buildQuery)(keywords, filters, entity, this._getCurrentProfile(), this._getCurrentPermissions(), this._getCurrentApiKey()));
|
|
146
|
+
const needMask = _.get(request, "headers._need_mask");
|
|
147
|
+
query = await (0, build_search_1.buildDataPermissionQuery)(query, profile, this.model.modelName);
|
|
148
|
+
const result = {
|
|
149
|
+
page,
|
|
150
|
+
page_size,
|
|
151
|
+
total: 0,
|
|
152
|
+
total_page: 0,
|
|
153
|
+
rows: []
|
|
154
|
+
};
|
|
155
|
+
const currentPage = ((page || 1) - 1) * (page_size || 10);
|
|
156
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
157
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
158
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
159
|
+
if (isExternal) {
|
|
160
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "find", [query, page, page_size, sort, fields], {
|
|
161
|
+
externalDataSource: {
|
|
162
|
+
name: entity.name,
|
|
163
|
+
fields: entity.fields,
|
|
164
|
+
external_source: entity.external_source
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
return res;
|
|
168
|
+
}
|
|
169
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
170
|
+
return provider.find(query, page, page_size, sort, fields);
|
|
171
|
+
}
|
|
172
|
+
query = await (0, build_search_1.buildAggregateQuery)(keywords, query, entity.fields, this.model.modelName);
|
|
173
|
+
if (_.isEmpty(grouping)) {
|
|
174
|
+
let resultQuery = [];
|
|
175
|
+
let total = 0;
|
|
176
|
+
const aggregate = await (0, schema_1.buildAggregate)(query, this.model.modelName, fields, currentPage, page_size, sort);
|
|
177
|
+
resultQuery = await this.aggregate({ query: aggregate });
|
|
178
|
+
const count = await this.aggregate({
|
|
179
|
+
query: (0, schema_1.buildAggregateCount)(query)
|
|
180
|
+
});
|
|
181
|
+
total = _.get(count, "0.count", 0);
|
|
182
|
+
resultQuery = (0, decimal2Json_1.imageComponent)(resultQuery);
|
|
183
|
+
resultQuery = await (0, schema_1.transformShareWidget)(this.model.modelName, resultQuery);
|
|
184
|
+
resultQuery = await (0, schema_1.transformJsonFields)(this.model.modelName, resultQuery, this._getCurrentHeaders());
|
|
185
|
+
if (!noTranslate) {
|
|
186
|
+
resultQuery = await Promise.all(resultQuery.map(async (i) => await (0, translate_1.translateData)(i, this.model.modelName, _.get(this._getCurrentHeaders(), "accept-language"))));
|
|
187
|
+
}
|
|
188
|
+
result.total = total;
|
|
189
|
+
result.total_page = Math.ceil(total / page_size);
|
|
190
|
+
result.rows = resultQuery;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
const aggrTotalQuery = (0, build_search_1.buildGroupingTotalRecQuery)(entity.fields, grouping, query, sort);
|
|
194
|
+
const resultTotal = await this.aggregate({
|
|
195
|
+
query: aggrTotalQuery
|
|
196
|
+
});
|
|
197
|
+
result.total = ((_b = resultTotal[0]) === null || _b === void 0 ? void 0 : _b.total) || 0;
|
|
198
|
+
result.total_page = Math.ceil(result.total / page_size);
|
|
199
|
+
const aggrQuery = (0, build_search_1.buildGroupingDataQuery)(entity.fields, grouping, query, sort, currentPage, page_size);
|
|
200
|
+
const resultQuery = await this.aggregate({ query: aggrQuery });
|
|
201
|
+
result.rows = resultQuery;
|
|
202
|
+
}
|
|
203
|
+
if (!this._isInternal || needMask) {
|
|
204
|
+
for (const row of result.rows) {
|
|
205
|
+
for (const field of entity.fields) {
|
|
206
|
+
if (field.name in row && _.get(field, "mask_checked")) {
|
|
207
|
+
row[field.name] = (0, masking_1.masking)(row[field.name], _.get(field, "mask_type"), _.get(field, "mask_custom"));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
for (let i = 0; i < result.rows.length; i++) {
|
|
213
|
+
result.rows[i] = (0, schema_1.hashEncryptFields)(entity, result.rows[i]);
|
|
214
|
+
}
|
|
215
|
+
return result;
|
|
216
|
+
}
|
|
217
|
+
async searchIds(keywords, filters, page, page_size, sort) {
|
|
218
|
+
var _a;
|
|
219
|
+
page_size = Math.min(page_size, MAX_SEARCH_IDS_SIZE);
|
|
220
|
+
(0, permission_1.checkPermission)(this.model.modelName, "view", this._getCurrentPermissions());
|
|
221
|
+
const request = this.cls.get("request");
|
|
222
|
+
const profile = _.get(request, "profile");
|
|
223
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
224
|
+
let query = (await (0, build_search_1.buildQuery)(keywords, filters, entity, this._getCurrentProfile(), this._getCurrentPermissions(), this._getCurrentApiKey()));
|
|
225
|
+
query = await (0, build_search_1.buildDataPermissionQuery)(query, profile, this.model.modelName);
|
|
226
|
+
const currentPage = ((page || 1) - 1) * (page_size || 10);
|
|
227
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
228
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
229
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
230
|
+
if (isExternal) {
|
|
231
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "searchIds", [query, page, page_size, sort], {
|
|
232
|
+
externalDataSource: {
|
|
233
|
+
name: entity.name,
|
|
234
|
+
fields: entity.fields,
|
|
235
|
+
external_source: entity.external_source
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
return res;
|
|
239
|
+
}
|
|
240
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
241
|
+
return provider.searchIds(query, page, page_size, sort);
|
|
242
|
+
}
|
|
243
|
+
let doc = this.model.find(query);
|
|
244
|
+
doc = doc
|
|
245
|
+
.sort((0, build_search_1.buildSort)(sort))
|
|
246
|
+
.skip(currentPage)
|
|
247
|
+
.select("_id")
|
|
248
|
+
.limit(page_size);
|
|
249
|
+
const result = await doc.exec();
|
|
250
|
+
return result.map(i => `${i._id}`);
|
|
251
|
+
}
|
|
252
|
+
async searchWithLayout(layoutCode, keywords, filters, page = 1, page_size = 10, sort = "", grouping, isDetail) {
|
|
253
|
+
var _a, _b;
|
|
254
|
+
const request = this.cls.get("request");
|
|
255
|
+
const profile = _.get(request, "profile");
|
|
256
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
257
|
+
keywords = (0, text_search_1.modifyKeywords)(keywords);
|
|
258
|
+
(0, permission_1.checkPermission)(this.model.modelName, "view", this._getCurrentPermissions(), entity.layouts.find(l => l.code === layoutCode), this._getCurrentRole());
|
|
259
|
+
let query = (await (0, build_search_1.buildQuery)(keywords, filters, entity, this._getCurrentProfile(), this._getCurrentPermissions(), this._getCurrentApiKey(), layoutCode));
|
|
260
|
+
query = await (0, build_search_1.buildDataPermissionQuery)(query, profile, this.model.modelName);
|
|
261
|
+
const view = entity.layouts.find(i => i.code === layoutCode);
|
|
262
|
+
if (!view) {
|
|
263
|
+
throw new Error("Invalid view code");
|
|
264
|
+
}
|
|
265
|
+
const result = {
|
|
266
|
+
page,
|
|
267
|
+
page_size,
|
|
268
|
+
total: 0,
|
|
269
|
+
total_page: 0,
|
|
270
|
+
rows: []
|
|
271
|
+
};
|
|
272
|
+
const fields = isDetail
|
|
273
|
+
? (0, layout_1.flatDetailLayout)(entity, view, entity.fields)
|
|
274
|
+
: (0, layout_1.flatListLayout)(view, entity.fields);
|
|
275
|
+
const currentPage = ((page || 1) - 1) * (page_size || 10);
|
|
276
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
277
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
278
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
279
|
+
if (isExternal) {
|
|
280
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "find", [query, page, page_size, sort, fields], {
|
|
281
|
+
externalDataSource: {
|
|
282
|
+
name: entity.name,
|
|
283
|
+
fields: entity.fields,
|
|
284
|
+
external_source: entity.external_source
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
return res;
|
|
288
|
+
}
|
|
289
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
290
|
+
return provider.find(query, page, page_size, sort, fields);
|
|
291
|
+
}
|
|
292
|
+
query = await (0, build_search_1.buildAggregateQuery)(keywords, query, fields, this.model.modelName);
|
|
293
|
+
if (_.isEmpty(grouping)) {
|
|
294
|
+
let resultQuery = [];
|
|
295
|
+
let total = 0;
|
|
296
|
+
const aggregate = await (0, schema_1.buildAggregate)(query, this.model.modelName, fields, currentPage, page_size, sort);
|
|
297
|
+
resultQuery = await this.aggregate({ query: aggregate });
|
|
298
|
+
const count = await this.aggregate({ query: (0, schema_1.buildAggregateCount)(query) });
|
|
299
|
+
total = _.get(count, "0.count", 0);
|
|
300
|
+
resultQuery = (0, decimal2Json_1.imageComponent)(resultQuery);
|
|
301
|
+
resultQuery = await (0, schema_1.transformShareWidget)(this.model.modelName, resultQuery);
|
|
302
|
+
resultQuery = await (0, schema_1.transformJsonFields)(this.model.modelName, resultQuery, this._getCurrentHeaders());
|
|
303
|
+
resultQuery = await Promise.all(resultQuery.map(async (i) => await (0, translate_1.translateData)(i, this.model.modelName, _.get(this._getCurrentHeaders(), "accept-language"))));
|
|
304
|
+
result.total = total;
|
|
305
|
+
result.total_page = Math.ceil(total / page_size);
|
|
306
|
+
result.rows = resultQuery;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
const aggrTotalQuery = (0, build_search_1.buildGroupingTotalRecQuery)(fields, grouping, query, sort);
|
|
310
|
+
const resultTotal = await this.aggregate({
|
|
311
|
+
query: aggrTotalQuery
|
|
312
|
+
});
|
|
313
|
+
result.total = ((_b = resultTotal[0]) === null || _b === void 0 ? void 0 : _b.total) || 0;
|
|
314
|
+
result.total_page = Math.ceil(result.total / page_size);
|
|
315
|
+
const aggrQuery = (0, build_search_1.buildGroupingDataQuery)(fields, grouping, query, sort, currentPage, page_size);
|
|
316
|
+
const resultQuery = await this.aggregate({
|
|
317
|
+
query: aggrQuery
|
|
318
|
+
});
|
|
319
|
+
result.rows = resultQuery;
|
|
320
|
+
}
|
|
321
|
+
for (let i = 0; i < result.rows.length; i++) {
|
|
322
|
+
const row = result.rows[i];
|
|
323
|
+
for (const field of fields) {
|
|
324
|
+
if (field.name in row && _.get(field, "mask_checked")) {
|
|
325
|
+
row[field.name] = (0, masking_1.masking)(row[field.name], _.get(field, "mask_type"), _.get(field, "mask_custom"));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
result.rows[i] = (0, schema_1.hashEncryptFields)(entity, result.rows[i]);
|
|
329
|
+
}
|
|
330
|
+
return result;
|
|
331
|
+
}
|
|
332
|
+
async find(keywords, filters, sort = "", noTranslate, fields) {
|
|
333
|
+
const result = await this.search(keywords, filters, 1, 1, sort, undefined, noTranslate, fields);
|
|
334
|
+
if (result.total === 0) {
|
|
335
|
+
return {};
|
|
336
|
+
}
|
|
337
|
+
return result.rows[0];
|
|
338
|
+
}
|
|
339
|
+
async findWithLayout(layoutCode, keywords, filters, sort = "") {
|
|
340
|
+
const result = await this.searchWithLayout(layoutCode, keywords, filters, 1, 1, sort, undefined, true);
|
|
341
|
+
return _.get(result, "rows.0", {});
|
|
342
|
+
}
|
|
343
|
+
async findOne(id, fields, ignoreTranslate, ignoreEncrypt) {
|
|
344
|
+
var _a;
|
|
345
|
+
(0, permission_1.checkPermission)(this.model.modelName, "view", this._getCurrentPermissions());
|
|
346
|
+
const request = this.cls.get("request");
|
|
347
|
+
const profile = _.get(request, "profile");
|
|
348
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
349
|
+
let query = {
|
|
350
|
+
_id: id
|
|
351
|
+
};
|
|
352
|
+
query = await (0, build_search_1.buildDataPermissionQuery)(query, profile, this.model.modelName);
|
|
353
|
+
const canEdit = (0, permission_1.checkPermissionEdit)(this.model.modelName, this._getCurrentPermissions());
|
|
354
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
355
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
356
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
357
|
+
if (isExternal) {
|
|
358
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "findOne", [query, fields], {
|
|
359
|
+
externalDataSource: {
|
|
360
|
+
name: entity.name,
|
|
361
|
+
fields: entity.fields,
|
|
362
|
+
external_source: entity.external_source
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
return res;
|
|
366
|
+
}
|
|
367
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
368
|
+
return provider.findOne(query, undefined, fields);
|
|
369
|
+
}
|
|
370
|
+
let doc = this.model.findOne(query);
|
|
371
|
+
(0, schema_1.buildSelect)(doc, fields);
|
|
372
|
+
await (0, schema_1.buildPopulate)(doc, this.model.modelName, fields);
|
|
373
|
+
let result = await await doc.exec();
|
|
374
|
+
result = (0, decimal2Json_1.imageComponent)(result);
|
|
375
|
+
result = await (0, schema_1.transformShareWidget)(this.model.modelName, result);
|
|
376
|
+
result = await (0, schema_1.transformJsonFields)(this.model.modelName, result, this._getCurrentHeaders());
|
|
377
|
+
if (!ignoreEncrypt) {
|
|
378
|
+
result = await (0, schema_1.hashEncryptFields)(entity, result);
|
|
379
|
+
}
|
|
380
|
+
if (!canEdit) {
|
|
381
|
+
for (const field of entity.fields) {
|
|
382
|
+
if (field.name in result && _.get(field, "mask_checked")) {
|
|
383
|
+
result[field.name] = (0, masking_1.masking)(result[field.name], _.get(field, "mask_type"), _.get(field, "mask_custom"));
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
for (const field of entity.fields) {
|
|
388
|
+
if (_.isEmpty(result))
|
|
389
|
+
continue;
|
|
390
|
+
if (field.name in result && field.type === "options" && !field.multiple) {
|
|
391
|
+
result[field.name] = _.isEmpty(result[field.name])
|
|
392
|
+
? undefined
|
|
393
|
+
: result[field.name][0];
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (ignoreTranslate) {
|
|
397
|
+
return result;
|
|
398
|
+
}
|
|
399
|
+
return await (0, translate_1.translateData)(result, this.model.modelName, _.get(this._getCurrentHeaders(), "accept-language"));
|
|
400
|
+
}
|
|
401
|
+
async findOneWithLayout(layoutCode, id, noTranslate) {
|
|
402
|
+
var _a;
|
|
403
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
404
|
+
const request = this.cls.get("request");
|
|
405
|
+
const profile = _.get(request, "profile");
|
|
406
|
+
(0, permission_1.checkPermission)(this.model.modelName, "view", this._getCurrentPermissions(), entity.layouts.find(l => l.code === layoutCode), this._getCurrentRole());
|
|
407
|
+
let query = { _id: id };
|
|
408
|
+
query = await (0, build_search_1.buildDataPermissionQuery)(query, profile, this.model.modelName);
|
|
409
|
+
let doc = this.model.findOne(query);
|
|
410
|
+
const layout = entity.layouts.find(i => i.code === layoutCode);
|
|
411
|
+
if (!layout) {
|
|
412
|
+
throw new Error("Invalid view code");
|
|
413
|
+
}
|
|
414
|
+
const fields = (0, layout_1.flatDetailLayout)(entity, layout, entity.fields);
|
|
415
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
416
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
417
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
418
|
+
if (isExternal) {
|
|
419
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "findOne", [query, undefined, fields], {
|
|
420
|
+
externalDataSource: {
|
|
421
|
+
name: entity.name,
|
|
422
|
+
fields: entity.fields,
|
|
423
|
+
external_source: entity.external_source
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
return res;
|
|
427
|
+
}
|
|
428
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
429
|
+
return provider.findOne(query, undefined, fields);
|
|
430
|
+
}
|
|
431
|
+
await (0, schema_1.buildPopulateWithLayout)(doc, fields, true);
|
|
432
|
+
let result = await await doc.exec();
|
|
433
|
+
result = (0, decimal2Json_1.imageComponent)(result);
|
|
434
|
+
result = await (0, schema_1.transformShareWidget)(this.model.modelName, result);
|
|
435
|
+
result = await (0, schema_1.transformJsonFields)(this.model.modelName, result, this._getCurrentHeaders());
|
|
436
|
+
const canEdit = (0, permission_1.checkPermissionEdit)(this.model.modelName, this._getCurrentPermissions());
|
|
437
|
+
if (!canEdit) {
|
|
438
|
+
for (const field of entity.fields) {
|
|
439
|
+
if (field.name in result && _.get(field, "mask_checked")) {
|
|
440
|
+
result[field.name] = (0, masking_1.masking)(result[field.name], _.get(field, "mask_type"), _.get(field, "mask_custom"));
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
for (const field of entity.fields) {
|
|
445
|
+
if (_.isEmpty(result))
|
|
446
|
+
continue;
|
|
447
|
+
if (field.name in result && field.type === "options" && !field.multiple) {
|
|
448
|
+
result[field.name] = _.isEmpty(result[field.name])
|
|
449
|
+
? undefined
|
|
450
|
+
: result[field.name][0];
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
result = await (0, schema_1.hashEncryptFields)(entity, result);
|
|
454
|
+
return noTranslate
|
|
455
|
+
? result
|
|
456
|
+
: await (0, translate_1.translateData)(result, this.model.modelName, _.get(this._getCurrentHeaders(), "accept-language"));
|
|
457
|
+
}
|
|
458
|
+
async aggregate(query) {
|
|
459
|
+
const request = this.cls.get("request");
|
|
460
|
+
const profile = _.get(request, "profile");
|
|
461
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
462
|
+
const schema = await (0, schema_1.loadSchema)(this.model.modelName);
|
|
463
|
+
const Model = mongoose.model(this.model.modelName, schema);
|
|
464
|
+
const q = _.isString(query) ? JSON.parse(query) : query;
|
|
465
|
+
const qq = (0, build_search_1.queryDateFormat)(q);
|
|
466
|
+
if (qq.query) {
|
|
467
|
+
const permissionQuery = await (0, build_search_1.buildDataPermissionQuery)({}, profile, this.model.modelName);
|
|
468
|
+
!_.isEmpty(permissionQuery) &&
|
|
469
|
+
qq.query.unshift({
|
|
470
|
+
$match: permissionQuery
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
const result = await Model.aggregate(qq.query);
|
|
474
|
+
(0, decimal2Json_1.decimal2Json)(result);
|
|
475
|
+
return result;
|
|
476
|
+
}
|
|
477
|
+
async count(filters, keywords) {
|
|
478
|
+
var _a;
|
|
479
|
+
(0, permission_1.checkPermission)(this.model.modelName, "view", this._getCurrentPermissions());
|
|
480
|
+
const request = this.cls.get("request");
|
|
481
|
+
const profile = _.get(request, "profile");
|
|
482
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
483
|
+
keywords = (0, text_search_1.modifyKeywords)(keywords);
|
|
484
|
+
let query = (await (0, build_search_1.buildQuery)(keywords, filters, entity, this._getCurrentProfile(), this._getCurrentPermissions(), this._getCurrentApiKey()));
|
|
485
|
+
query = (await (0, build_search_1.buildDataPermissionQuery)(query, profile, this.model.modelName));
|
|
486
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
487
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
488
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
489
|
+
if (isExternal) {
|
|
490
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "count", [query], {
|
|
491
|
+
externalDataSource: {
|
|
492
|
+
name: entity.name,
|
|
493
|
+
fields: entity.fields,
|
|
494
|
+
external_source: entity.external_source
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
return res;
|
|
498
|
+
}
|
|
499
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
500
|
+
return provider.count(query);
|
|
501
|
+
}
|
|
502
|
+
const aggregate = await (0, build_search_1.buildAggregateQuery)(keywords, query, entity.fields, this.model.modelName);
|
|
503
|
+
const aggregateResult = await this.aggregate({
|
|
504
|
+
query: (0, schema_1.buildAggregateCount)(aggregate)
|
|
505
|
+
});
|
|
506
|
+
return _.get(aggregateResult, "0.count", 0);
|
|
507
|
+
}
|
|
508
|
+
async create(data) {
|
|
509
|
+
var _a;
|
|
510
|
+
(0, permission_1.checkPermission)(this.model.modelName, "create", this._getCurrentPermissions());
|
|
511
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
512
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
513
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
514
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
515
|
+
if (isExternal) {
|
|
516
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "create", [data], {
|
|
517
|
+
externalDataSource: {
|
|
518
|
+
name: entity.name,
|
|
519
|
+
fields: entity.fields,
|
|
520
|
+
external_source: entity.external_source
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
return res;
|
|
524
|
+
}
|
|
525
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
526
|
+
return provider.create(data);
|
|
527
|
+
}
|
|
528
|
+
await (0, hook_1.executeHooks)(entity, "create", "before", {
|
|
529
|
+
headers: this._getCurrentHeaders(),
|
|
530
|
+
body: this._getCurrentBody(),
|
|
531
|
+
profile: this._getCurrentProfile()
|
|
532
|
+
}, data);
|
|
533
|
+
const defaultValues = (0, schema_1.getEntityDefaultValues)(entity);
|
|
534
|
+
const uniqueQuery = (0, build_search_1.buildUniqueQuery)(entity, data);
|
|
535
|
+
if (!_.isEmpty(uniqueQuery)) {
|
|
536
|
+
const countUnique = await this.model
|
|
537
|
+
.countDocuments(uniqueQuery)
|
|
538
|
+
.lean()
|
|
539
|
+
.exec();
|
|
540
|
+
if (countUnique > 0) {
|
|
541
|
+
throw new common_1.HttpException("duplicate_unique_key", 500);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
if (_.get(this._getCurrentHeaders(), "use_own_single")) {
|
|
545
|
+
data = await (0, schema_1.saveRelatedFields)(entity, this._getCurrentHeaders(), data);
|
|
546
|
+
}
|
|
547
|
+
else {
|
|
548
|
+
data = await (0, schema_1.saveRelatedFieldsV2)(entity, this._getCurrentHeaders(), data);
|
|
549
|
+
}
|
|
550
|
+
data = await (0, schema_1.saveImageAndFileComponent)(entity, data);
|
|
551
|
+
data = await (0, schema_1.saveShareWidget)(entity, data);
|
|
552
|
+
data = await (0, schema_1.saveMapFields)(entity, this._getCurrentHeaders(), data);
|
|
553
|
+
data = await (0, schema_1.saveJsonFields)(entity, data);
|
|
554
|
+
data = await (0, schema_1.saveEncryptFields)(entity, data);
|
|
555
|
+
if (_.get(entity, "workflows.field") &&
|
|
556
|
+
_.get(entity, "workflows.first_status")) {
|
|
557
|
+
if (!this._isInternal() || _.isEmpty(data[`${entity.workflows.field}`])) {
|
|
558
|
+
data[`${entity.workflows.field}`] = entity.workflows.first_status || "";
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
const imageFields = (0, schema_1.listFieldByType)(data, entity, "image");
|
|
562
|
+
const fileFields = (0, schema_1.listFieldByType)(data, entity, "file");
|
|
563
|
+
for (const field of imageFields) {
|
|
564
|
+
_.set(data, `${field.name}`, undefined);
|
|
565
|
+
}
|
|
566
|
+
for (const field of fileFields) {
|
|
567
|
+
_.set(data, `${field.name}`, undefined);
|
|
568
|
+
}
|
|
569
|
+
const reasons = _.isArray(data["_reasons"]) ? data["_reasons"] : [];
|
|
570
|
+
delete data["_reasons"];
|
|
571
|
+
data = await (0, schema_1.cleanUpSaveData)(entity, data);
|
|
572
|
+
const dataModel = new this.model(_.merge(defaultValues, data));
|
|
573
|
+
const afterSave = (await dataModel.save()).toObject();
|
|
574
|
+
const saveImageRes = await (0, schema_1.saveImageFields)(imageFields, this._getCurrentHeaders(), afterSave, this.model.modelName, true);
|
|
575
|
+
await (0, schema_1.saveFileFields)(fileFields, this._getCurrentHeaders(), afterSave, this.model.modelName);
|
|
576
|
+
await (0, schema_1.saveReasons)(entity, `${afterSave._id}`, reasons);
|
|
577
|
+
await (0, schema_1.hashPasswordFields)(entity, afterSave);
|
|
578
|
+
const query = { _id: afterSave._id };
|
|
579
|
+
await this.model.findOneAndUpdate(query, Object.assign(Object.assign({}, afterSave), saveImageRes), { new: true });
|
|
580
|
+
let result = await (0, retry_1.autoRetry)(async () => {
|
|
581
|
+
return await this.findOne(afterSave._id.toString(), undefined, undefined, true);
|
|
582
|
+
}, 2, 1000);
|
|
583
|
+
result = JSON.parse(JSON.stringify(result));
|
|
584
|
+
if (!_.get(this._getCurrentHeaders(), "ignore_auto_workflow")) {
|
|
585
|
+
result = await (0, schema_1.autoWorkflow)(result, entity, reasons, {
|
|
586
|
+
headers: this._getCurrentHeaders(),
|
|
587
|
+
body: this._getCurrentBody(),
|
|
588
|
+
profile: this._getCurrentProfile()
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
(0, schema_1.addActivityLog)(entity, {
|
|
592
|
+
headers: this._getCurrentHeaders(),
|
|
593
|
+
body: this._getCurrentBody(),
|
|
594
|
+
profile: this._getCurrentProfile()
|
|
595
|
+
}, result, activity_log_enum_1.ActivityLogType.activity, activity_log_enum_1.ActivityLogAction.created, activity_log_enum_1.ActivityLogStatus.successfully);
|
|
596
|
+
await (0, hook_1.executeHooks)(entity, "create", "after", {
|
|
597
|
+
headers: this._getCurrentHeaders(),
|
|
598
|
+
body: this._getCurrentBody(),
|
|
599
|
+
profile: this._getCurrentProfile()
|
|
600
|
+
}, result);
|
|
601
|
+
if ((0, text_search_1.checkAllowAddSearchText)(this.model.modelName)) {
|
|
602
|
+
const searchTextData = await (0, text_search_1.getSearchTextIndexObject)(entity, result);
|
|
603
|
+
const searchEncrypt = (0, text_search_1.getSearchEncryptIndex)(entity, data);
|
|
604
|
+
if (!_.isEmpty(searchTextData) || !_.isEmpty(searchEncrypt)) {
|
|
605
|
+
const updateData = searchTextData[0] || { textTerm: '' };
|
|
606
|
+
const supportDeepSearch = _.get(entity, "deep_search_text", true);
|
|
607
|
+
await this.model.updateOne({ _id: result._id }, {
|
|
608
|
+
$set: {
|
|
609
|
+
_search_text: updateData.textTerm,
|
|
610
|
+
_search_encrypt: searchEncrypt,
|
|
611
|
+
_need_refresh: supportDeepSearch,
|
|
612
|
+
}
|
|
613
|
+
}, { upsert: true });
|
|
614
|
+
await (0, schema_1.callInternalService)("search_text", "post", "execute", { type: "mark_need_refresh", data: { entity: this.model.modelName, searchTextData: updateData, dataId: result._id } });
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
result = (0, schema_1.hashEncryptFields)(entity, result);
|
|
618
|
+
return result;
|
|
619
|
+
}
|
|
620
|
+
async update(id, data) {
|
|
621
|
+
var _a;
|
|
622
|
+
(0, permission_1.checkPermission)(this.model.modelName, "edit", this._getCurrentPermissions());
|
|
623
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
624
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
625
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
626
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
627
|
+
if (isExternal) {
|
|
628
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "update", [id, data], {
|
|
629
|
+
externalDataSource: {
|
|
630
|
+
name: entity.name,
|
|
631
|
+
fields: entity.fields,
|
|
632
|
+
external_source: entity.external_source
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
return res;
|
|
636
|
+
}
|
|
637
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
638
|
+
return provider.update(id, data);
|
|
639
|
+
}
|
|
640
|
+
const uniqueQuery = (0, build_search_1.buildUniqueQuery)(entity, Object.assign({ id }, data));
|
|
641
|
+
if (!_.isEmpty(uniqueQuery)) {
|
|
642
|
+
const uniqueIds = await this.searchIds("", uniqueQuery, 1, 100);
|
|
643
|
+
if (!_.isEmpty(uniqueIds) && !uniqueIds.includes(id)) {
|
|
644
|
+
throw new common_1.HttpException("duplicate_unique_key", 500);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
const query = { _id: id };
|
|
648
|
+
const olddata = await this.model
|
|
649
|
+
.findOne(query)
|
|
650
|
+
.lean()
|
|
651
|
+
.exec();
|
|
652
|
+
(0, decimal2Json_1.decimal2Json)(olddata);
|
|
653
|
+
await (0, hook_1.executeHooks)(entity, "update", "before", {
|
|
654
|
+
headers: this._getCurrentHeaders(),
|
|
655
|
+
body: this._getCurrentBody(),
|
|
656
|
+
profile: this._getCurrentProfile()
|
|
657
|
+
}, Object.assign(Object.assign(Object.assign({}, olddata), data), { _old_data: _.cloneDeep(olddata) }));
|
|
658
|
+
if (!this._isInternal() && _.get(entity, "workflows.field")) {
|
|
659
|
+
delete data[`${entity.workflows.field}`];
|
|
660
|
+
const existsStatus = _.get(entity, "workflows.blocks", []).find(i => i.status === _.get(olddata, `${entity.workflows.field}`));
|
|
661
|
+
if (existsStatus && !existsStatus.allow_update) {
|
|
662
|
+
throw new Error("Current status is not allow to update");
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
if (entity.versioning) {
|
|
666
|
+
data.__v = await (0, schema_1.addVersionData)(entity, id, _.get(olddata, "__v", 0));
|
|
667
|
+
}
|
|
668
|
+
if (_.get(this._getCurrentHeaders(), "use_own_single")) {
|
|
669
|
+
data = await (0, schema_1.saveRelatedFields)(entity, this._getCurrentHeaders(), data, olddata);
|
|
670
|
+
}
|
|
671
|
+
else {
|
|
672
|
+
data = await (0, schema_1.saveRelatedFieldsV2)(entity, this._getCurrentHeaders(), data, olddata);
|
|
673
|
+
}
|
|
674
|
+
data = await (0, schema_1.saveMapFields)(entity, this._getCurrentHeaders(), data, olddata);
|
|
675
|
+
data = await (0, schema_1.saveImageAndFileComponent)(entity, data);
|
|
676
|
+
data = await (0, schema_1.saveShareWidget)(entity, data);
|
|
677
|
+
data = await (0, schema_1.saveJsonFields)(entity, data, olddata);
|
|
678
|
+
data = await (0, schema_1.saveEncryptFields)(entity, data, olddata);
|
|
679
|
+
const imageFields = (0, schema_1.listFieldByType)(data, entity, "image");
|
|
680
|
+
const fileFields = (0, schema_1.listFieldByType)(data, entity, "file");
|
|
681
|
+
for (const field of imageFields) {
|
|
682
|
+
_.set(data, `${field.name}`, undefined);
|
|
683
|
+
}
|
|
684
|
+
for (const field of fileFields) {
|
|
685
|
+
_.set(data, `${field.name}`, undefined);
|
|
686
|
+
}
|
|
687
|
+
const reasons = _.isArray(data["_reasons"]) ? data["_reasons"] : [];
|
|
688
|
+
delete data["_reasons"];
|
|
689
|
+
data = await (0, schema_1.cleanUpSaveData)(entity, data);
|
|
690
|
+
const afterSave = await this.model.findByIdAndUpdate(id, data, {
|
|
691
|
+
new: true
|
|
692
|
+
});
|
|
693
|
+
const saveImageRes = await (0, schema_1.saveImageFields)(imageFields, this._getCurrentHeaders(), afterSave, this.model.modelName, true);
|
|
694
|
+
afterSave["_doc"] = Object.assign(Object.assign({}, afterSave["_doc"]), saveImageRes);
|
|
695
|
+
await (0, schema_1.saveFileFields)(fileFields, this._getCurrentHeaders(), afterSave, this.model.modelName);
|
|
696
|
+
await (0, schema_1.hashPasswordFields)(entity, afterSave);
|
|
697
|
+
await (0, schema_1.saveReasons)(entity, `${afterSave._id}`, reasons);
|
|
698
|
+
await this.model.findByIdAndUpdate(id, afterSave);
|
|
699
|
+
let result = await (0, retry_1.autoRetry)(async () => {
|
|
700
|
+
return await this.findOne(afterSave._id.toString(), undefined, undefined, true);
|
|
701
|
+
}, 2, 1000);
|
|
702
|
+
result = JSON.parse(JSON.stringify(result));
|
|
703
|
+
if (!_.get(this._getCurrentHeaders(), "ignore_auto_workflow")) {
|
|
704
|
+
result = await (0, schema_1.autoWorkflow)(result, entity, reasons, {
|
|
705
|
+
headers: this._getCurrentHeaders(),
|
|
706
|
+
body: this._getCurrentBody(),
|
|
707
|
+
profile: this._getCurrentProfile()
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
(0, schema_1.addActivityLog)(entity, {
|
|
711
|
+
headers: this._getCurrentHeaders(),
|
|
712
|
+
body: this._getCurrentBody(),
|
|
713
|
+
profile: this._getCurrentProfile()
|
|
714
|
+
}, result, activity_log_enum_1.ActivityLogType.activity, activity_log_enum_1.ActivityLogAction.updated, activity_log_enum_1.ActivityLogStatus.successfully, undefined, undefined, "Update successfully", "", result, JSON.parse(JSON.stringify(olddata)));
|
|
715
|
+
await (0, hook_1.executeHooks)(entity, "update", "after", {
|
|
716
|
+
headers: this._getCurrentHeaders(),
|
|
717
|
+
body: this._getCurrentBody(),
|
|
718
|
+
profile: this._getCurrentProfile()
|
|
719
|
+
}, Object.assign(Object.assign({}, result), { _old_data: _.cloneDeep(olddata) }));
|
|
720
|
+
if ((0, text_search_1.checkAllowAddSearchText)(this.model.modelName)) {
|
|
721
|
+
const searchTextData = await (0, text_search_1.getSearchTextIndexObject)(entity, result);
|
|
722
|
+
const searchEncrypt = (0, text_search_1.getSearchEncryptIndex)(entity, result);
|
|
723
|
+
if (!_.isEmpty(searchTextData) || !_.isEmpty(searchEncrypt)) {
|
|
724
|
+
const updateData = (searchTextData === null || searchTextData === void 0 ? void 0 : searchTextData[0]) || { textTerm: '' };
|
|
725
|
+
const supportDeepSearch = _.get(entity, "deep_search_text", true);
|
|
726
|
+
await this.model.updateOne({ _id: result._id }, {
|
|
727
|
+
$set: {
|
|
728
|
+
_search_text: updateData.textTerm,
|
|
729
|
+
_search_encrypt: searchEncrypt,
|
|
730
|
+
_need_refresh: supportDeepSearch
|
|
731
|
+
}
|
|
732
|
+
}, { upsert: true });
|
|
733
|
+
if (supportDeepSearch) {
|
|
734
|
+
await (0, schema_1.callInternalService)("search_text", "post", "execute", { type: "mark_need_refresh", data: { entity: this.model.modelName, searchTextData: updateData, dataId: result._id } });
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
result = (0, schema_1.hashEncryptFields)(entity, result);
|
|
739
|
+
return result;
|
|
740
|
+
}
|
|
741
|
+
async delete(id) {
|
|
742
|
+
var _a;
|
|
743
|
+
(0, permission_1.checkPermission)(this.model.modelName, "create", this._getCurrentPermissions());
|
|
744
|
+
const query = { _id: id };
|
|
745
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
746
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
747
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
748
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
749
|
+
if (isExternal) {
|
|
750
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "delete", [id], {
|
|
751
|
+
externalDataSource: {
|
|
752
|
+
name: entity.name,
|
|
753
|
+
fields: entity.fields,
|
|
754
|
+
external_source: entity.external_source
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
return res;
|
|
758
|
+
}
|
|
759
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
760
|
+
return provider.delete(id);
|
|
761
|
+
}
|
|
762
|
+
let data = await this.model
|
|
763
|
+
.findOne(query)
|
|
764
|
+
.lean()
|
|
765
|
+
.exec();
|
|
766
|
+
data = JSON.parse(JSON.stringify(data));
|
|
767
|
+
const hookData = Object.assign(Object.assign({}, data), { _old_data: _.cloneDeep(data) });
|
|
768
|
+
await (0, hook_1.executeHooks)(entity, "delete", "before", {
|
|
769
|
+
headers: this._getCurrentHeaders(),
|
|
770
|
+
body: this._getCurrentBody(),
|
|
771
|
+
profile: this._getCurrentProfile()
|
|
772
|
+
}, hookData);
|
|
773
|
+
const o2mFields = this._listRelatedO2MFields(data, entity);
|
|
774
|
+
for (const field of o2mFields) {
|
|
775
|
+
if (field.allow_create_update) {
|
|
776
|
+
await this._callDeleteInternalService(field.ref, data[field.name]);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
const result = await this.model.deleteOne(query);
|
|
780
|
+
(0, schema_1.addActivityLog)(entity, {
|
|
781
|
+
headers: this._getCurrentHeaders(),
|
|
782
|
+
body: this._getCurrentBody(),
|
|
783
|
+
profile: this._getCurrentProfile()
|
|
784
|
+
}, result, activity_log_enum_1.ActivityLogType.activity, activity_log_enum_1.ActivityLogAction.deleted, activity_log_enum_1.ActivityLogStatus.successfully);
|
|
785
|
+
(0, schema_1.callMarkDeletedInternal)(this.model.modelName, [id]);
|
|
786
|
+
await (0, hook_1.executeHooks)(entity, "delete", "after", {
|
|
787
|
+
headers: this._getCurrentHeaders(),
|
|
788
|
+
body: this._getCurrentBody(),
|
|
789
|
+
profile: this._getCurrentProfile()
|
|
790
|
+
}, hookData);
|
|
791
|
+
return true;
|
|
792
|
+
}
|
|
793
|
+
async deleteMany(filter) {
|
|
794
|
+
var _a;
|
|
795
|
+
(0, permission_1.checkPermission)(this.model.modelName, "create", this._getCurrentPermissions());
|
|
796
|
+
if (_.isEmpty(filter)) {
|
|
797
|
+
throw new Error("Delete many filter is required.");
|
|
798
|
+
}
|
|
799
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
800
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
801
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
802
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
803
|
+
if (isExternal) {
|
|
804
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "deleteMany", [filter], {
|
|
805
|
+
externalDataSource: {
|
|
806
|
+
name: entity.name,
|
|
807
|
+
fields: entity.fields,
|
|
808
|
+
external_source: entity.external_source
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
return res;
|
|
812
|
+
}
|
|
813
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
814
|
+
return provider.deleteMany(filter);
|
|
815
|
+
}
|
|
816
|
+
await this.model.deleteMany(filter).exec();
|
|
817
|
+
return true;
|
|
818
|
+
}
|
|
819
|
+
async bulkCreate(data) {
|
|
820
|
+
var _a;
|
|
821
|
+
(0, permission_1.checkPermission)(this.model.modelName, "create", this._getCurrentPermissions());
|
|
822
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
823
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
824
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
825
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
826
|
+
if (isExternal) {
|
|
827
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "bulkCreate", [data], {
|
|
828
|
+
externalDataSource: {
|
|
829
|
+
name: entity.name,
|
|
830
|
+
fields: entity.fields,
|
|
831
|
+
external_source: entity.external_source
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
return res;
|
|
835
|
+
}
|
|
836
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
837
|
+
return provider.bulkCreate(data);
|
|
838
|
+
}
|
|
839
|
+
const bulkData = [];
|
|
840
|
+
for (const d of data) {
|
|
841
|
+
bulkData.push({
|
|
842
|
+
insertOne: { document: Object.assign(Object.assign({}, d), { createdAt: new Date() }) }
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
const result = await this.model.bulkWrite(bulkData);
|
|
846
|
+
const ids = Object.values(result.insertedIds).map(i => `${i}`);
|
|
847
|
+
(0, schema_1.addActivityLog)(entity, {
|
|
848
|
+
headers: this._getCurrentHeaders(),
|
|
849
|
+
body: this._getCurrentBody(),
|
|
850
|
+
profile: this._getCurrentProfile()
|
|
851
|
+
}, result, activity_log_enum_1.ActivityLogType.activity, activity_log_enum_1.ActivityLogAction.created, activity_log_enum_1.ActivityLogStatus.successfully);
|
|
852
|
+
if ((0, text_search_1.checkAllowAddSearchText)(this.model.modelName)) {
|
|
853
|
+
await this._bulkUpdateSearchText(ids);
|
|
854
|
+
}
|
|
855
|
+
return ids;
|
|
856
|
+
}
|
|
857
|
+
async bulkUpdate(data) {
|
|
858
|
+
var _a;
|
|
859
|
+
(0, permission_1.checkPermission)(this.model.modelName, "edit", this._getCurrentPermissions());
|
|
860
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
861
|
+
const externalSourceProvider = (_a = entity === null || entity === void 0 ? void 0 : entity.external_source) === null || _a === void 0 ? void 0 : _a.type;
|
|
862
|
+
if (externalSourceProvider && externalSourceProvider !== "none") {
|
|
863
|
+
const isExternal = (0, external_module_1.isExternalModule)(entity.name);
|
|
864
|
+
if (isExternal) {
|
|
865
|
+
const res = await (0, external_module_1.callExecuteExternalProviderModule)(entity.name, externalSourceProvider, "bulkUpdate", [data], {
|
|
866
|
+
externalDataSource: {
|
|
867
|
+
name: entity.name,
|
|
868
|
+
fields: entity.fields,
|
|
869
|
+
external_source: entity.external_source
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
return res;
|
|
873
|
+
}
|
|
874
|
+
const provider = await (0, external_data_1.getExternalDataProvider)(entity, externalSourceProvider);
|
|
875
|
+
return provider.bulkUpdate(data);
|
|
876
|
+
}
|
|
877
|
+
const bulkData = [];
|
|
878
|
+
for (const d of data) {
|
|
879
|
+
const updateData = _.cloneDeep(d);
|
|
880
|
+
delete updateData.id;
|
|
881
|
+
delete updateData._id;
|
|
882
|
+
bulkData.push({
|
|
883
|
+
updateOne: {
|
|
884
|
+
filter: { _id: d.id || d._id },
|
|
885
|
+
update: Object.assign(Object.assign({}, updateData), { updatedAt: new Date() })
|
|
886
|
+
}
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
const result = await this.model.bulkWrite(bulkData);
|
|
890
|
+
(0, schema_1.addActivityLog)(entity, {
|
|
891
|
+
headers: this._getCurrentHeaders(),
|
|
892
|
+
body: this._getCurrentBody(),
|
|
893
|
+
profile: this._getCurrentProfile()
|
|
894
|
+
}, result, activity_log_enum_1.ActivityLogType.activity, activity_log_enum_1.ActivityLogAction.updated, activity_log_enum_1.ActivityLogStatus.successfully);
|
|
895
|
+
const ids = data.map(i => i.id || i._id);
|
|
896
|
+
if ((0, text_search_1.checkAllowAddSearchText)(this.model.modelName)) {
|
|
897
|
+
await this._bulkUpdateSearchText(ids);
|
|
898
|
+
}
|
|
899
|
+
return ids;
|
|
900
|
+
}
|
|
901
|
+
async bulkDelete(ids) {
|
|
902
|
+
try {
|
|
903
|
+
(0, permission_1.checkPermission)(this.model.modelName, "create", this._getCurrentPermissions());
|
|
904
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
905
|
+
const bulkData = [];
|
|
906
|
+
for (const id of ids) {
|
|
907
|
+
bulkData.push({ deleteOne: { filter: { _id: id } } });
|
|
908
|
+
}
|
|
909
|
+
const result = await this.model.bulkWrite(bulkData);
|
|
910
|
+
(0, schema_1.addActivityLog)(entity, {
|
|
911
|
+
headers: this._getCurrentHeaders(),
|
|
912
|
+
body: this._getCurrentBody(),
|
|
913
|
+
profile: this._getCurrentProfile()
|
|
914
|
+
}, result, activity_log_enum_1.ActivityLogType.activity, activity_log_enum_1.ActivityLogAction.deleted, activity_log_enum_1.ActivityLogStatus.successfully);
|
|
915
|
+
await (0, schema_1.callMarkDeletedInternal)(this.model.modelName, ids);
|
|
916
|
+
return ids;
|
|
917
|
+
}
|
|
918
|
+
catch (e) {
|
|
919
|
+
throw e;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
async prepareGenerateData(data) {
|
|
923
|
+
if (_.isEmpty(data)) {
|
|
924
|
+
throw new Error("Please filters data before generate");
|
|
925
|
+
}
|
|
926
|
+
const refId = `GENERATE_DATA_${(0, uuid_1.v4)()}`;
|
|
927
|
+
await this._setGenerateDataRedis(refId, 0);
|
|
928
|
+
await (0, schema_1.callAddQueueInternal)("queue", "generate_data", Object.assign(Object.assign({}, data), { ref_id: refId, entity: this.model.modelName }));
|
|
929
|
+
return {
|
|
930
|
+
ref_id: refId,
|
|
931
|
+
finish: false,
|
|
932
|
+
percent: 0,
|
|
933
|
+
status: "processing"
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
async generateData(data) {
|
|
937
|
+
common_1.Logger.log(`Generate report for ${this.model.modelName} entity`, "generateData");
|
|
938
|
+
return false;
|
|
939
|
+
}
|
|
940
|
+
async progressGenerateData(ref_id) {
|
|
941
|
+
const data = await redis_1.redisCache.get(ref_id);
|
|
942
|
+
if (!data) {
|
|
943
|
+
throw new Error("Invalid reference id");
|
|
944
|
+
}
|
|
945
|
+
return data;
|
|
946
|
+
}
|
|
947
|
+
async approve(id, data) {
|
|
948
|
+
(0, permission_1.checkPermission)(this.model.modelName, "edit", this._getCurrentPermissions());
|
|
949
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
950
|
+
if (!_.get(entity, "workflows.field")) {
|
|
951
|
+
throw new Error(`This entity didn't support workflow`);
|
|
952
|
+
}
|
|
953
|
+
const res = await this.findOne(id);
|
|
954
|
+
let olddata;
|
|
955
|
+
if (_.isFunction(res.toJSON)) {
|
|
956
|
+
olddata = JSON.parse(JSON.stringify(await res.toJSON()));
|
|
957
|
+
}
|
|
958
|
+
else {
|
|
959
|
+
olddata = res;
|
|
960
|
+
}
|
|
961
|
+
const currentState = _.get(olddata, `${entity.workflows.field}`);
|
|
962
|
+
const targetState = data["state"];
|
|
963
|
+
if (currentState === targetState) {
|
|
964
|
+
return JSON.parse(JSON.stringify(res));
|
|
965
|
+
}
|
|
966
|
+
const isExists = entity.workflows.flows.find(i => (data.force_changed && i.to === targetState) ||
|
|
967
|
+
(i.from === currentState && i.to === targetState));
|
|
968
|
+
if (!isExists) {
|
|
969
|
+
throw new Error("This flow is not available for this entity");
|
|
970
|
+
}
|
|
971
|
+
const checkWork = await (0, permission_1.checkWorkflowCondition)(entity, isExists, olddata, this._getCurrentProfile(), await (0, schema_1.loadEntity)("user"));
|
|
972
|
+
if (!checkWork && !data.force_changed) {
|
|
973
|
+
throw new Error("This flow is not available for this entity");
|
|
974
|
+
}
|
|
975
|
+
if (isExists.date_tracking_field) {
|
|
976
|
+
olddata[isExists.date_tracking_field] = new Date();
|
|
977
|
+
}
|
|
978
|
+
if (isExists.email_template &&
|
|
979
|
+
_.get(isExists, "email_receiver.length") > 0) {
|
|
980
|
+
await (0, schema_1.callInternalService)("template", "patch", `send`, {
|
|
981
|
+
code: isExists.email_template,
|
|
982
|
+
data: Object.assign({ to: isExists.email_receiver }, olddata)
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
olddata[`${entity.workflows.field}`] = [data.state];
|
|
986
|
+
const reasons = [];
|
|
987
|
+
if (data["reason"]) {
|
|
988
|
+
reasons.push({
|
|
989
|
+
id: data["reason"]["id"],
|
|
990
|
+
value: data["reason"]["value"],
|
|
991
|
+
comment: data["reason"]["comment"]
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
if (data["is_auto"] &&
|
|
995
|
+
isExists.required_reason &&
|
|
996
|
+
isExists.reason_ref &&
|
|
997
|
+
!_.isEmpty(isExists.default_reason)) {
|
|
998
|
+
const reason = await (0, schema_1.callGetInternalService)("reason_master", `${isExists.reason_ref}`);
|
|
999
|
+
reasons.push({
|
|
1000
|
+
id: isExists.reason_ref,
|
|
1001
|
+
value: isExists.default_reason
|
|
1002
|
+
.map(i => {
|
|
1003
|
+
const exist = reason["options"].find(j => j._id === i);
|
|
1004
|
+
return exist ? { name: exist.name, code: exist.code } : null;
|
|
1005
|
+
})
|
|
1006
|
+
.filter(i => i),
|
|
1007
|
+
comment: isExists.default_reason_comment
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
const result = await this.model.findByIdAndUpdate(id, (0, entity_1.removeRelatedFields)(olddata, entity), {
|
|
1011
|
+
new: true
|
|
1012
|
+
});
|
|
1013
|
+
let result2 = await (0, retry_1.autoRetry)(async () => {
|
|
1014
|
+
return await this.findOne(result._id.toString());
|
|
1015
|
+
}, 2, 1000);
|
|
1016
|
+
result2 = JSON.parse(JSON.stringify(result2));
|
|
1017
|
+
const workflowMessage = (0, schema_1.getWorkflowLogMessage)(entity, { headers: this._getCurrentHeaders() }, currentState, targetState);
|
|
1018
|
+
await (0, schema_1.addActivityLog)(entity, {
|
|
1019
|
+
headers: this._getCurrentHeaders(),
|
|
1020
|
+
body: this._getCurrentBody(),
|
|
1021
|
+
profile: this._getCurrentProfile()
|
|
1022
|
+
}, { id }, activity_log_enum_1.ActivityLogType.workflow, activity_log_enum_1.ActivityLogAction.approved, activity_log_enum_1.ActivityLogStatus.successfully, new Date(), new Date(), _.get(workflowMessage, "message", ""), _.get(workflowMessage, "description", ""));
|
|
1023
|
+
reasons.length > 0 && (await (0, schema_1.saveReasons)(entity, id, reasons));
|
|
1024
|
+
if (_.get(isExists, "executions.length")) {
|
|
1025
|
+
for (const ex of isExists["executions"].filter(i => i.enabled)) {
|
|
1026
|
+
try {
|
|
1027
|
+
await (0, executions_1.internalExecution)(ex, result2, entity);
|
|
1028
|
+
}
|
|
1029
|
+
catch (e) {
|
|
1030
|
+
common_1.Logger.error(e);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
const entityUer = await (0, schema_1.loadEntity)("user");
|
|
1035
|
+
let autoFlow = undefined;
|
|
1036
|
+
const flows = _.get(entity, "workflows.flows", []);
|
|
1037
|
+
for (const i of flows) {
|
|
1038
|
+
const field = _.get(result2, `${entity.workflows.field}`, "").toString();
|
|
1039
|
+
if (i.is_auto && i.from === field) {
|
|
1040
|
+
const checkWork = await (0, permission_1.checkWorkflowCondition)(entity, i, result2, { _system: true }, entityUer);
|
|
1041
|
+
if (checkWork) {
|
|
1042
|
+
autoFlow = i;
|
|
1043
|
+
break;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
await (0, hook_1.executeHooks)(entity, "workflow", "after", {
|
|
1048
|
+
headers: this._getCurrentHeaders(),
|
|
1049
|
+
body: this._getCurrentBody(),
|
|
1050
|
+
profile: this._getCurrentProfile()
|
|
1051
|
+
}, result2);
|
|
1052
|
+
return _.isUndefined(autoFlow)
|
|
1053
|
+
? result2
|
|
1054
|
+
: await this.approve(id, { state: autoFlow.to, is_auto: true });
|
|
1055
|
+
}
|
|
1056
|
+
async workflowActions(id) {
|
|
1057
|
+
(0, permission_1.checkPermission)(this.model.modelName, "edit", this._getCurrentPermissions());
|
|
1058
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
1059
|
+
if (!_.get(entity, "workflows.field")) {
|
|
1060
|
+
return [];
|
|
1061
|
+
}
|
|
1062
|
+
const data = await this.findOne(id);
|
|
1063
|
+
const currentStatus = _.get(data, entity.workflows.field).toString();
|
|
1064
|
+
const schemaUser = await (0, schema_1.loadSchema)("user");
|
|
1065
|
+
const flows = _.get(entity, "workflows.flows", []);
|
|
1066
|
+
let actions;
|
|
1067
|
+
for (const i of flows) {
|
|
1068
|
+
if (!i.is_auto &&
|
|
1069
|
+
i.from.toString() === currentStatus &&
|
|
1070
|
+
i.to !== "end_node") {
|
|
1071
|
+
const checkWork = await (0, permission_1.checkWorkflowCondition)(entity, i, data, this._getCurrentProfile(), schemaUser);
|
|
1072
|
+
if (checkWork) {
|
|
1073
|
+
actions = checkWork;
|
|
1074
|
+
break;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
return actions || {};
|
|
1079
|
+
}
|
|
1080
|
+
async executeWorkflowAction(id, body) {
|
|
1081
|
+
return true;
|
|
1082
|
+
}
|
|
1083
|
+
async dataWithLocale(layout, id, locale) {
|
|
1084
|
+
const data = await this.findOneWithLayout(layout, id, true);
|
|
1085
|
+
const languages = await (0, schema_1.getSetting)("data_languages");
|
|
1086
|
+
const isDefault = _.get(languages.find(i => i.code === locale), "default_data_translate");
|
|
1087
|
+
if (isDefault) {
|
|
1088
|
+
delete data["_translates"];
|
|
1089
|
+
return data;
|
|
1090
|
+
}
|
|
1091
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
1092
|
+
const translateFields = entity.fields.filter(i => i.allow_translate);
|
|
1093
|
+
const result = {};
|
|
1094
|
+
for (const field of translateFields) {
|
|
1095
|
+
result[field.name] =
|
|
1096
|
+
_.get(data, `_translates.${locale}.${field.name}`) ||
|
|
1097
|
+
_.get(data, field.name);
|
|
1098
|
+
}
|
|
1099
|
+
return result;
|
|
1100
|
+
}
|
|
1101
|
+
async findWithLocale(locale, keywords, filters, sort) {
|
|
1102
|
+
const data = await this.find(keywords, filters, sort, true);
|
|
1103
|
+
const languages = await (0, schema_1.getSetting)("data_languages");
|
|
1104
|
+
const isDefault = _.get(languages.find(i => i.code === locale), "default_data_translate");
|
|
1105
|
+
if (isDefault) {
|
|
1106
|
+
delete data["_translates"];
|
|
1107
|
+
return data;
|
|
1108
|
+
}
|
|
1109
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
1110
|
+
const translateFields = entity.fields.filter(i => i.allow_translate);
|
|
1111
|
+
const result = {};
|
|
1112
|
+
for (const field of translateFields) {
|
|
1113
|
+
result[field.name] =
|
|
1114
|
+
_.get(data, `_translates.${locale}.${field.name}`) ||
|
|
1115
|
+
_.get(data, field.name);
|
|
1116
|
+
}
|
|
1117
|
+
return result;
|
|
1118
|
+
}
|
|
1119
|
+
async setDataLocale(id, locale, data) {
|
|
1120
|
+
(0, permission_1.checkPermission)(this.model.modelName, "edit", this._getCurrentPermissions());
|
|
1121
|
+
const record = await this.model.findById(id);
|
|
1122
|
+
const translates = _.get(record, "_translates") || {};
|
|
1123
|
+
_.set(translates, locale, data);
|
|
1124
|
+
const updateData = {};
|
|
1125
|
+
updateData["_translates"] = translates;
|
|
1126
|
+
return await this.model.findByIdAndUpdate(id, updateData);
|
|
1127
|
+
}
|
|
1128
|
+
async exampleOutputMapping(data) {
|
|
1129
|
+
(0, permission_1.checkPermission)(this.model.modelName, "view", this._getCurrentPermissions());
|
|
1130
|
+
const result = await (0, example_1.generateExample)(data);
|
|
1131
|
+
return result;
|
|
1132
|
+
}
|
|
1133
|
+
async searchText(data) {
|
|
1134
|
+
(0, permission_1.checkPermission)(this.model.modelName, "view", this._getCurrentPermissions());
|
|
1135
|
+
const { mapping, filters, keywords } = data;
|
|
1136
|
+
const entityName = _.get(mapping, "destination.entity_name");
|
|
1137
|
+
const resultData = await (0, schema_1.callFindInternalService)(entityName, keywords, filters, "", "");
|
|
1138
|
+
const entity = await (0, schema_1.loadEntity)(entityName);
|
|
1139
|
+
const revert = !_.isEmpty(_.get(mapping, "source.entity_name"));
|
|
1140
|
+
const result = await (0, transform_1.transform)(entity, resultData, mapping.mapping, "main", undefined, revert, true, "transform");
|
|
1141
|
+
for (const field in result) {
|
|
1142
|
+
if (_.isUndefined(result[field]) ||
|
|
1143
|
+
result[field] === "undefined" ||
|
|
1144
|
+
(_.isObject(result[field]) && _.isEmpty(result[field]))) {
|
|
1145
|
+
result[field] = null;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
return result;
|
|
1149
|
+
}
|
|
1150
|
+
async importValidate(id, code, data, dataText, originalData, filename) {
|
|
1151
|
+
try {
|
|
1152
|
+
return data;
|
|
1153
|
+
}
|
|
1154
|
+
catch (e) {
|
|
1155
|
+
throw new Error(e.message);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
async _bulkUpdateSearchText(ids) {
|
|
1159
|
+
if (!ids || ids.length === 0)
|
|
1160
|
+
return;
|
|
1161
|
+
try {
|
|
1162
|
+
const entity = await (0, schema_1.loadEntity)(this.model.modelName);
|
|
1163
|
+
if (!entity)
|
|
1164
|
+
return;
|
|
1165
|
+
const supportDeepSearch = _.get(entity, "deep_search_text", true);
|
|
1166
|
+
let hasMore = true;
|
|
1167
|
+
let page = 1;
|
|
1168
|
+
const pageSize = 200;
|
|
1169
|
+
const fields = supportDeepSearch
|
|
1170
|
+
? `*,${entity.fields
|
|
1171
|
+
.filter(field => field.type === "related")
|
|
1172
|
+
.map(field => `${field.name}.*`)
|
|
1173
|
+
.join(",")}`
|
|
1174
|
+
: "*";
|
|
1175
|
+
while (hasMore) {
|
|
1176
|
+
const listResult = await (0, schema_1.callListInternalService)(this.model.modelName, "", {
|
|
1177
|
+
_id: {
|
|
1178
|
+
$in: ids
|
|
1179
|
+
}
|
|
1180
|
+
}, "", fields, page, pageSize);
|
|
1181
|
+
const rows = _.get(listResult, "rows", []);
|
|
1182
|
+
if (rows.length === 0) {
|
|
1183
|
+
hasMore = false;
|
|
1184
|
+
break;
|
|
1185
|
+
}
|
|
1186
|
+
const searchTextData = await (0, text_search_1.getSearchTextIndexObject)(entity, rows);
|
|
1187
|
+
const bulkUpdate = searchTextData.map(record => ({
|
|
1188
|
+
updateOne: {
|
|
1189
|
+
filter: {
|
|
1190
|
+
_id: record.id
|
|
1191
|
+
},
|
|
1192
|
+
update: {
|
|
1193
|
+
$set: {
|
|
1194
|
+
_search_text: record.textTerm,
|
|
1195
|
+
_need_refresh: supportDeepSearch
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
upsert: false
|
|
1199
|
+
}
|
|
1200
|
+
}));
|
|
1201
|
+
await (0, schema_1.callInternalService)("search_text", "post", "execute", { type: "mark_need_refresh", data: { entity: this.model.modelName, searchTextData: searchTextData, dataId: ids } });
|
|
1202
|
+
await this.model.bulkWrite(bulkUpdate);
|
|
1203
|
+
page++;
|
|
1204
|
+
if (rows.length < pageSize) {
|
|
1205
|
+
hasMore = false;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
catch (error) { }
|
|
1210
|
+
}
|
|
1211
|
+
};
|
|
1212
|
+
exports.BaseService = BaseService;
|
|
1213
|
+
BaseService.prefix = "";
|
|
1214
|
+
exports.BaseService = BaseService = __decorate([
|
|
1215
|
+
(0, common_1.Injectable)(),
|
|
1216
|
+
__metadata("design:paramtypes", [nestjs_cls_1.ClsService, mongoose.Model])
|
|
1217
|
+
], BaseService);
|
|
1218
|
+
//# sourceMappingURL=base.service.js.map
|