@reglow/reglow 0.4.0
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 +267 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/reglow/common/errors.d.ts +92 -0
- package/dist/reglow/common/errors.js +127 -0
- package/dist/reglow/common/errors.js.map +1 -0
- package/dist/reglow/common/exception_handler.d.ts +14 -0
- package/dist/reglow/common/exception_handler.js +135 -0
- package/dist/reglow/common/exception_handler.js.map +1 -0
- package/dist/reglow/common/i18n.d.ts +15 -0
- package/dist/reglow/common/i18n.js +61 -0
- package/dist/reglow/common/i18n.js.map +1 -0
- package/dist/reglow/common/middleware.d.ts +5 -0
- package/dist/reglow/common/middleware.js +131 -0
- package/dist/reglow/common/middleware.js.map +1 -0
- package/dist/reglow/common/response.d.ts +28 -0
- package/dist/reglow/common/response.js +42 -0
- package/dist/reglow/common/response.js.map +1 -0
- package/dist/reglow/common/serialize.d.ts +6 -0
- package/dist/reglow/common/serialize.js +39 -0
- package/dist/reglow/common/serialize.js.map +1 -0
- package/dist/reglow/common/utils/date_utils.d.ts +10 -0
- package/dist/reglow/common/utils/date_utils.js +30 -0
- package/dist/reglow/common/utils/date_utils.js.map +1 -0
- package/dist/reglow/common/utils/parse-user-agent.d.ts +11 -0
- package/dist/reglow/common/utils/parse-user-agent.js +80 -0
- package/dist/reglow/common/utils/parse-user-agent.js.map +1 -0
- package/dist/reglow/common/utils/string_utils.d.ts +14 -0
- package/dist/reglow/common/utils/string_utils.js +31 -0
- package/dist/reglow/common/utils/string_utils.js.map +1 -0
- package/dist/reglow/core/auth.d.ts +15 -0
- package/dist/reglow/core/auth.js +184 -0
- package/dist/reglow/core/auth.js.map +1 -0
- package/dist/reglow/core/cache.d.ts +6 -0
- package/dist/reglow/core/cache.js +15 -0
- package/dist/reglow/core/cache.js.map +1 -0
- package/dist/reglow/core/config.d.ts +45 -0
- package/dist/reglow/core/config.js +83 -0
- package/dist/reglow/core/config.js.map +1 -0
- package/dist/reglow/core/data_scope.d.ts +21 -0
- package/dist/reglow/core/data_scope.js +20 -0
- package/dist/reglow/core/data_scope.js.map +1 -0
- package/dist/reglow/core/database.d.ts +4 -0
- package/dist/reglow/core/database.js +43 -0
- package/dist/reglow/core/database.js.map +1 -0
- package/dist/reglow/core/email.d.ts +12 -0
- package/dist/reglow/core/email.js +277 -0
- package/dist/reglow/core/email.js.map +1 -0
- package/dist/reglow/core/entities.d.ts +462 -0
- package/dist/reglow/core/entities.js +6 -0
- package/dist/reglow/core/entities.js.map +1 -0
- package/dist/reglow/core/fastify.d.ts +21 -0
- package/dist/reglow/core/fastify.js +2 -0
- package/dist/reglow/core/fastify.js.map +1 -0
- package/dist/reglow/core/logging.d.ts +8 -0
- package/dist/reglow/core/logging.js +32 -0
- package/dist/reglow/core/logging.js.map +1 -0
- package/dist/reglow/core/models.d.ts +98 -0
- package/dist/reglow/core/models.js +57 -0
- package/dist/reglow/core/models.js.map +1 -0
- package/dist/reglow/core/observability.d.ts +17 -0
- package/dist/reglow/core/observability.js +92 -0
- package/dist/reglow/core/observability.js.map +1 -0
- package/dist/reglow/core/payment.d.ts +107 -0
- package/dist/reglow/core/payment.js +1177 -0
- package/dist/reglow/core/payment.js.map +1 -0
- package/dist/reglow/core/plugin.d.ts +19 -0
- package/dist/reglow/core/plugin.js +85 -0
- package/dist/reglow/core/plugin.js.map +1 -0
- package/dist/reglow/core/rate_limit.d.ts +2 -0
- package/dist/reglow/core/rate_limit.js +28 -0
- package/dist/reglow/core/rate_limit.js.map +1 -0
- package/dist/reglow/core/redis.d.ts +30 -0
- package/dist/reglow/core/redis.js +278 -0
- package/dist/reglow/core/redis.js.map +1 -0
- package/dist/reglow/core/redis_keys.d.ts +22 -0
- package/dist/reglow/core/redis_keys.js +59 -0
- package/dist/reglow/core/redis_keys.js.map +1 -0
- package/dist/reglow/core/security.d.ts +25 -0
- package/dist/reglow/core/security.js +64 -0
- package/dist/reglow/core/security.js.map +1 -0
- package/dist/reglow/core/session.d.ts +17 -0
- package/dist/reglow/core/session.js +194 -0
- package/dist/reglow/core/session.js.map +1 -0
- package/dist/reglow/core/sms.d.ts +19 -0
- package/dist/reglow/core/sms.js +33 -0
- package/dist/reglow/core/sms.js.map +1 -0
- package/dist/reglow/core/storage.d.ts +45 -0
- package/dist/reglow/core/storage.js +249 -0
- package/dist/reglow/core/storage.js.map +1 -0
- package/dist/reglow/modules/agreement/controller.d.ts +7 -0
- package/dist/reglow/modules/agreement/controller.js +242 -0
- package/dist/reglow/modules/agreement/controller.js.map +1 -0
- package/dist/reglow/modules/agreement/repository.d.ts +30 -0
- package/dist/reglow/modules/agreement/repository.js +160 -0
- package/dist/reglow/modules/agreement/repository.js.map +1 -0
- package/dist/reglow/modules/agreement/router.d.ts +13 -0
- package/dist/reglow/modules/agreement/router.js +10 -0
- package/dist/reglow/modules/agreement/router.js.map +1 -0
- package/dist/reglow/modules/agreement/schema.d.ts +30 -0
- package/dist/reglow/modules/agreement/schema.js +27 -0
- package/dist/reglow/modules/agreement/schema.js.map +1 -0
- package/dist/reglow/modules/agreement/service.d.ts +42 -0
- package/dist/reglow/modules/agreement/service.js +349 -0
- package/dist/reglow/modules/agreement/service.js.map +1 -0
- package/dist/reglow/modules/ai/controller.d.ts +25 -0
- package/dist/reglow/modules/ai/controller.js +1143 -0
- package/dist/reglow/modules/ai/controller.js.map +1 -0
- package/dist/reglow/modules/ai/router.d.ts +9 -0
- package/dist/reglow/modules/ai/router.js +7 -0
- package/dist/reglow/modules/ai/router.js.map +1 -0
- package/dist/reglow/modules/ai/schema.d.ts +48 -0
- package/dist/reglow/modules/ai/schema.js +40 -0
- package/dist/reglow/modules/ai/schema.js.map +1 -0
- package/dist/reglow/modules/ai/service.d.ts +8 -0
- package/dist/reglow/modules/ai/service.js +137 -0
- package/dist/reglow/modules/ai/service.js.map +1 -0
- package/dist/reglow/modules/article/controller.d.ts +6 -0
- package/dist/reglow/modules/article/controller.js +204 -0
- package/dist/reglow/modules/article/controller.js.map +1 -0
- package/dist/reglow/modules/article/repository.d.ts +37 -0
- package/dist/reglow/modules/article/repository.js +184 -0
- package/dist/reglow/modules/article/repository.js.map +1 -0
- package/dist/reglow/modules/article/router.d.ts +10 -0
- package/dist/reglow/modules/article/router.js +8 -0
- package/dist/reglow/modules/article/router.js.map +1 -0
- package/dist/reglow/modules/article/schema.d.ts +66 -0
- package/dist/reglow/modules/article/schema.js +66 -0
- package/dist/reglow/modules/article/schema.js.map +1 -0
- package/dist/reglow/modules/article/service.d.ts +81 -0
- package/dist/reglow/modules/article/service.js +254 -0
- package/dist/reglow/modules/article/service.js.map +1 -0
- package/dist/reglow/modules/auth/controller.d.ts +6 -0
- package/dist/reglow/modules/auth/controller.js +127 -0
- package/dist/reglow/modules/auth/controller.js.map +1 -0
- package/dist/reglow/modules/auth/router.d.ts +9 -0
- package/dist/reglow/modules/auth/router.js +7 -0
- package/dist/reglow/modules/auth/router.js.map +1 -0
- package/dist/reglow/modules/auth/schema.d.ts +59 -0
- package/dist/reglow/modules/auth/schema.js +56 -0
- package/dist/reglow/modules/auth/schema.js.map +1 -0
- package/dist/reglow/modules/auth/service.d.ts +69 -0
- package/dist/reglow/modules/auth/service.js +492 -0
- package/dist/reglow/modules/auth/service.js.map +1 -0
- package/dist/reglow/modules/config/controller.d.ts +7 -0
- package/dist/reglow/modules/config/controller.js +297 -0
- package/dist/reglow/modules/config/controller.js.map +1 -0
- package/dist/reglow/modules/config/repository.d.ts +17 -0
- package/dist/reglow/modules/config/repository.js +88 -0
- package/dist/reglow/modules/config/repository.js.map +1 -0
- package/dist/reglow/modules/config/router.d.ts +13 -0
- package/dist/reglow/modules/config/router.js +8 -0
- package/dist/reglow/modules/config/router.js.map +1 -0
- package/dist/reglow/modules/config/schema.d.ts +37 -0
- package/dist/reglow/modules/config/schema.js +25 -0
- package/dist/reglow/modules/config/schema.js.map +1 -0
- package/dist/reglow/modules/customer_service/controller.d.ts +3 -0
- package/dist/reglow/modules/customer_service/controller.js +443 -0
- package/dist/reglow/modules/customer_service/controller.js.map +1 -0
- package/dist/reglow/modules/customer_service/document_parser.d.ts +5 -0
- package/dist/reglow/modules/customer_service/document_parser.js +84 -0
- package/dist/reglow/modules/customer_service/document_parser.js.map +1 -0
- package/dist/reglow/modules/customer_service/repository.d.ts +72 -0
- package/dist/reglow/modules/customer_service/repository.js +376 -0
- package/dist/reglow/modules/customer_service/repository.js.map +1 -0
- package/dist/reglow/modules/customer_service/router.d.ts +14 -0
- package/dist/reglow/modules/customer_service/router.js +9 -0
- package/dist/reglow/modules/customer_service/router.js.map +1 -0
- package/dist/reglow/modules/customer_service/schema.d.ts +97 -0
- package/dist/reglow/modules/customer_service/schema.js +91 -0
- package/dist/reglow/modules/customer_service/schema.js.map +1 -0
- package/dist/reglow/modules/customer_service/sdk_template.html +666 -0
- package/dist/reglow/modules/customer_service/service.d.ts +92 -0
- package/dist/reglow/modules/customer_service/service.js +1642 -0
- package/dist/reglow/modules/customer_service/service.js.map +1 -0
- package/dist/reglow/modules/customer_service/ws.d.ts +29 -0
- package/dist/reglow/modules/customer_service/ws.js +182 -0
- package/dist/reglow/modules/customer_service/ws.js.map +1 -0
- package/dist/reglow/modules/dept/controller.d.ts +6 -0
- package/dist/reglow/modules/dept/controller.js +122 -0
- package/dist/reglow/modules/dept/controller.js.map +1 -0
- package/dist/reglow/modules/dept/repository.d.ts +24 -0
- package/dist/reglow/modules/dept/repository.js +140 -0
- package/dist/reglow/modules/dept/repository.js.map +1 -0
- package/dist/reglow/modules/dept/router.d.ts +9 -0
- package/dist/reglow/modules/dept/router.js +7 -0
- package/dist/reglow/modules/dept/router.js.map +1 -0
- package/dist/reglow/modules/dept/schema.d.ts +37 -0
- package/dist/reglow/modules/dept/schema.js +33 -0
- package/dist/reglow/modules/dept/schema.js.map +1 -0
- package/dist/reglow/modules/dept/service.d.ts +33 -0
- package/dist/reglow/modules/dept/service.js +88 -0
- package/dist/reglow/modules/dept/service.js.map +1 -0
- package/dist/reglow/modules/dict/controller.d.ts +5 -0
- package/dist/reglow/modules/dict/controller.js +87 -0
- package/dist/reglow/modules/dict/controller.js.map +1 -0
- package/dist/reglow/modules/dict/model.d.ts +7 -0
- package/dist/reglow/modules/dict/model.js +8 -0
- package/dist/reglow/modules/dict/model.js.map +1 -0
- package/dist/reglow/modules/dict/repository.d.ts +16 -0
- package/dist/reglow/modules/dict/repository.js +103 -0
- package/dist/reglow/modules/dict/repository.js.map +1 -0
- package/dist/reglow/modules/dict/router.d.ts +9 -0
- package/dist/reglow/modules/dict/router.js +7 -0
- package/dist/reglow/modules/dict/router.js.map +1 -0
- package/dist/reglow/modules/dict/schema.d.ts +38 -0
- package/dist/reglow/modules/dict/schema.js +37 -0
- package/dist/reglow/modules/dict/schema.js.map +1 -0
- package/dist/reglow/modules/dict/service.d.ts +15 -0
- package/dist/reglow/modules/dict/service.js +88 -0
- package/dist/reglow/modules/dict/service.js.map +1 -0
- package/dist/reglow/modules/employee/controller.d.ts +6 -0
- package/dist/reglow/modules/employee/controller.js +167 -0
- package/dist/reglow/modules/employee/controller.js.map +1 -0
- package/dist/reglow/modules/employee/repository.d.ts +22 -0
- package/dist/reglow/modules/employee/repository.js +129 -0
- package/dist/reglow/modules/employee/repository.js.map +1 -0
- package/dist/reglow/modules/employee/router.d.ts +9 -0
- package/dist/reglow/modules/employee/router.js +7 -0
- package/dist/reglow/modules/employee/router.js.map +1 -0
- package/dist/reglow/modules/employee/schema.d.ts +57 -0
- package/dist/reglow/modules/employee/schema.js +58 -0
- package/dist/reglow/modules/employee/schema.js.map +1 -0
- package/dist/reglow/modules/employee/service.d.ts +30 -0
- package/dist/reglow/modules/employee/service.js +193 -0
- package/dist/reglow/modules/employee/service.js.map +1 -0
- package/dist/reglow/modules/log/controller.d.ts +6 -0
- package/dist/reglow/modules/log/controller.js +137 -0
- package/dist/reglow/modules/log/controller.js.map +1 -0
- package/dist/reglow/modules/log/data-scope.d.ts +9 -0
- package/dist/reglow/modules/log/data-scope.js +108 -0
- package/dist/reglow/modules/log/data-scope.js.map +1 -0
- package/dist/reglow/modules/log/router.d.ts +9 -0
- package/dist/reglow/modules/log/router.js +7 -0
- package/dist/reglow/modules/log/router.js.map +1 -0
- package/dist/reglow/modules/material/controller.d.ts +3 -0
- package/dist/reglow/modules/material/controller.js +400 -0
- package/dist/reglow/modules/material/controller.js.map +1 -0
- package/dist/reglow/modules/material/repository.d.ts +37 -0
- package/dist/reglow/modules/material/repository.js +183 -0
- package/dist/reglow/modules/material/repository.js.map +1 -0
- package/dist/reglow/modules/material/router.d.ts +14 -0
- package/dist/reglow/modules/material/router.js +11 -0
- package/dist/reglow/modules/material/router.js.map +1 -0
- package/dist/reglow/modules/material/schema.d.ts +40 -0
- package/dist/reglow/modules/material/schema.js +34 -0
- package/dist/reglow/modules/material/schema.js.map +1 -0
- package/dist/reglow/modules/material/service.d.ts +85 -0
- package/dist/reglow/modules/material/service.js +292 -0
- package/dist/reglow/modules/material/service.js.map +1 -0
- package/dist/reglow/modules/menu/controller.d.ts +6 -0
- package/dist/reglow/modules/menu/controller.js +69 -0
- package/dist/reglow/modules/menu/controller.js.map +1 -0
- package/dist/reglow/modules/menu/repository.d.ts +14 -0
- package/dist/reglow/modules/menu/repository.js +37 -0
- package/dist/reglow/modules/menu/repository.js.map +1 -0
- package/dist/reglow/modules/menu/router.d.ts +9 -0
- package/dist/reglow/modules/menu/router.js +7 -0
- package/dist/reglow/modules/menu/router.js.map +1 -0
- package/dist/reglow/modules/menu/schema.d.ts +39 -0
- package/dist/reglow/modules/menu/schema.js +37 -0
- package/dist/reglow/modules/menu/schema.js.map +1 -0
- package/dist/reglow/modules/menu/service.d.ts +31 -0
- package/dist/reglow/modules/menu/service.js +89 -0
- package/dist/reglow/modules/menu/service.js.map +1 -0
- package/dist/reglow/modules/message/controller.d.ts +7 -0
- package/dist/reglow/modules/message/controller.js +260 -0
- package/dist/reglow/modules/message/controller.js.map +1 -0
- package/dist/reglow/modules/message/repository.d.ts +27 -0
- package/dist/reglow/modules/message/repository.js +145 -0
- package/dist/reglow/modules/message/repository.js.map +1 -0
- package/dist/reglow/modules/message/router.d.ts +13 -0
- package/dist/reglow/modules/message/router.js +8 -0
- package/dist/reglow/modules/message/router.js.map +1 -0
- package/dist/reglow/modules/message/schema.d.ts +39 -0
- package/dist/reglow/modules/message/schema.js +37 -0
- package/dist/reglow/modules/message/schema.js.map +1 -0
- package/dist/reglow/modules/message/service.d.ts +70 -0
- package/dist/reglow/modules/message/service.js +199 -0
- package/dist/reglow/modules/message/service.js.map +1 -0
- package/dist/reglow/modules/notice/controller.d.ts +6 -0
- package/dist/reglow/modules/notice/controller.js +123 -0
- package/dist/reglow/modules/notice/controller.js.map +1 -0
- package/dist/reglow/modules/notice/repository.d.ts +25 -0
- package/dist/reglow/modules/notice/repository.js +145 -0
- package/dist/reglow/modules/notice/repository.js.map +1 -0
- package/dist/reglow/modules/notice/router.d.ts +9 -0
- package/dist/reglow/modules/notice/router.js +7 -0
- package/dist/reglow/modules/notice/router.js.map +1 -0
- package/dist/reglow/modules/notice/schema.d.ts +23 -0
- package/dist/reglow/modules/notice/schema.js +22 -0
- package/dist/reglow/modules/notice/schema.js.map +1 -0
- package/dist/reglow/modules/notice/service.d.ts +45 -0
- package/dist/reglow/modules/notice/service.js +149 -0
- package/dist/reglow/modules/notice/service.js.map +1 -0
- package/dist/reglow/modules/payment/controller.d.ts +6 -0
- package/dist/reglow/modules/payment/controller.js +186 -0
- package/dist/reglow/modules/payment/controller.js.map +1 -0
- package/dist/reglow/modules/payment/router.d.ts +10 -0
- package/dist/reglow/modules/payment/router.js +8 -0
- package/dist/reglow/modules/payment/router.js.map +1 -0
- package/dist/reglow/modules/payment/schema.d.ts +52 -0
- package/dist/reglow/modules/payment/schema.js +43 -0
- package/dist/reglow/modules/payment/schema.js.map +1 -0
- package/dist/reglow/modules/payment/service.d.ts +28 -0
- package/dist/reglow/modules/payment/service.js +219 -0
- package/dist/reglow/modules/payment/service.js.map +1 -0
- package/dist/reglow/modules/photo/controller.d.ts +2 -0
- package/dist/reglow/modules/photo/controller.js +323 -0
- package/dist/reglow/modules/photo/controller.js.map +1 -0
- package/dist/reglow/modules/photo/controller_client.d.ts +2 -0
- package/dist/reglow/modules/photo/controller_client.js +293 -0
- package/dist/reglow/modules/photo/controller_client.js.map +1 -0
- package/dist/reglow/modules/photo/repository.d.ts +50 -0
- package/dist/reglow/modules/photo/repository.js +240 -0
- package/dist/reglow/modules/photo/repository.js.map +1 -0
- package/dist/reglow/modules/photo/router.d.ts +15 -0
- package/dist/reglow/modules/photo/router.js +10 -0
- package/dist/reglow/modules/photo/router.js.map +1 -0
- package/dist/reglow/modules/photo/schema.d.ts +69 -0
- package/dist/reglow/modules/photo/schema.js +66 -0
- package/dist/reglow/modules/photo/schema.js.map +1 -0
- package/dist/reglow/modules/photo/service.d.ts +98 -0
- package/dist/reglow/modules/photo/service.js +295 -0
- package/dist/reglow/modules/photo/service.js.map +1 -0
- package/dist/reglow/modules/post/controller.d.ts +6 -0
- package/dist/reglow/modules/post/controller.js +61 -0
- package/dist/reglow/modules/post/controller.js.map +1 -0
- package/dist/reglow/modules/post/repository.d.ts +12 -0
- package/dist/reglow/modules/post/repository.js +46 -0
- package/dist/reglow/modules/post/repository.js.map +1 -0
- package/dist/reglow/modules/post/router.d.ts +9 -0
- package/dist/reglow/modules/post/router.js +7 -0
- package/dist/reglow/modules/post/router.js.map +1 -0
- package/dist/reglow/modules/post/schema.d.ts +19 -0
- package/dist/reglow/modules/post/schema.js +18 -0
- package/dist/reglow/modules/post/schema.js.map +1 -0
- package/dist/reglow/modules/post/service.d.ts +18 -0
- package/dist/reglow/modules/post/service.js +44 -0
- package/dist/reglow/modules/post/service.js.map +1 -0
- package/dist/reglow/modules/role/controller.d.ts +6 -0
- package/dist/reglow/modules/role/controller.js +103 -0
- package/dist/reglow/modules/role/controller.js.map +1 -0
- package/dist/reglow/modules/role/repository.d.ts +22 -0
- package/dist/reglow/modules/role/repository.js +84 -0
- package/dist/reglow/modules/role/repository.js.map +1 -0
- package/dist/reglow/modules/role/router.d.ts +9 -0
- package/dist/reglow/modules/role/router.js +7 -0
- package/dist/reglow/modules/role/router.js.map +1 -0
- package/dist/reglow/modules/role/schema.d.ts +32 -0
- package/dist/reglow/modules/role/schema.js +29 -0
- package/dist/reglow/modules/role/schema.js.map +1 -0
- package/dist/reglow/modules/role/service.d.ts +22 -0
- package/dist/reglow/modules/role/service.js +72 -0
- package/dist/reglow/modules/role/service.js.map +1 -0
- package/dist/reglow/modules/user/controller.d.ts +6 -0
- package/dist/reglow/modules/user/controller.js +126 -0
- package/dist/reglow/modules/user/controller.js.map +1 -0
- package/dist/reglow/modules/user/controller_client.d.ts +2 -0
- package/dist/reglow/modules/user/controller_client.js +291 -0
- package/dist/reglow/modules/user/controller_client.js.map +1 -0
- package/dist/reglow/modules/user/repository.d.ts +12 -0
- package/dist/reglow/modules/user/repository.js +71 -0
- package/dist/reglow/modules/user/repository.js.map +1 -0
- package/dist/reglow/modules/user/router.d.ts +16 -0
- package/dist/reglow/modules/user/router.js +11 -0
- package/dist/reglow/modules/user/router.js.map +1 -0
- package/dist/reglow/modules/user/schema.d.ts +92 -0
- package/dist/reglow/modules/user/schema.js +82 -0
- package/dist/reglow/modules/user/schema.js.map +1 -0
- package/dist/reglow/modules/user/service.d.ts +43 -0
- package/dist/reglow/modules/user/service.js +311 -0
- package/dist/reglow/modules/user/service.js.map +1 -0
- package/dist/reglow/modules/video/controller.d.ts +2 -0
- package/dist/reglow/modules/video/controller.js +254 -0
- package/dist/reglow/modules/video/controller.js.map +1 -0
- package/dist/reglow/modules/video/repository.d.ts +38 -0
- package/dist/reglow/modules/video/repository.js +186 -0
- package/dist/reglow/modules/video/repository.js.map +1 -0
- package/dist/reglow/modules/video/router.d.ts +10 -0
- package/dist/reglow/modules/video/router.js +8 -0
- package/dist/reglow/modules/video/router.js.map +1 -0
- package/dist/reglow/modules/video/schema.d.ts +62 -0
- package/dist/reglow/modules/video/schema.js +61 -0
- package/dist/reglow/modules/video/schema.js.map +1 -0
- package/dist/reglow/modules/video/service.d.ts +80 -0
- package/dist/reglow/modules/video/service.js +251 -0
- package/dist/reglow/modules/video/service.js.map +1 -0
- package/dist/reglow/scripts/init-data.d.ts +44 -0
- package/dist/reglow/scripts/init-data.js +472 -0
- package/dist/reglow/scripts/init-data.js.map +1 -0
- package/dist/reglow/scripts/remove-business-menu.d.ts +1 -0
- package/dist/reglow/scripts/remove-business-menu.js +124 -0
- package/dist/reglow/scripts/remove-business-menu.js.map +1 -0
- package/dist/reglow/scripts/schema.d.ts +9 -0
- package/dist/reglow/scripts/schema.js +746 -0
- package/dist/reglow/scripts/schema.js.map +1 -0
- package/dist/reglow/scripts/sync-menu-mysql-to-sqlite.d.ts +1 -0
- package/dist/reglow/scripts/sync-menu-mysql-to-sqlite.js +304 -0
- package/dist/reglow/scripts/sync-menu-mysql-to-sqlite.js.map +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +162 -0
- package/dist/server.js.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 实体类型定义 - 对应 backend-python 的 SQLAlchemy 模型
|
|
3
|
+
* 表字段为 snake_case,时间字段在数据库驱动下可能返回 Date 或字符串。
|
|
4
|
+
*/
|
|
5
|
+
export type AnyDate = Date | string | number | null;
|
|
6
|
+
export interface TimestampFields {
|
|
7
|
+
created_at?: AnyDate;
|
|
8
|
+
updated_at?: AnyDate;
|
|
9
|
+
}
|
|
10
|
+
export interface SoftDeleteFields {
|
|
11
|
+
deleted_at?: AnyDate;
|
|
12
|
+
}
|
|
13
|
+
export interface Employee extends TimestampFields, SoftDeleteFields {
|
|
14
|
+
id: number;
|
|
15
|
+
username: string;
|
|
16
|
+
password_hash: string;
|
|
17
|
+
nickname?: string | null;
|
|
18
|
+
real_name?: string | null;
|
|
19
|
+
avatar?: string | null;
|
|
20
|
+
gender?: number;
|
|
21
|
+
email?: string | null;
|
|
22
|
+
phone?: string | null;
|
|
23
|
+
employee_no?: string | null;
|
|
24
|
+
dept_id?: number | null;
|
|
25
|
+
post_ids?: string | null;
|
|
26
|
+
superior_id?: number | null;
|
|
27
|
+
entry_date?: string | null;
|
|
28
|
+
work_status?: number;
|
|
29
|
+
employment_type?: number;
|
|
30
|
+
job_level?: string | null;
|
|
31
|
+
job_position?: string | null;
|
|
32
|
+
job_title?: string | null;
|
|
33
|
+
status?: number;
|
|
34
|
+
is_agent?: boolean | number;
|
|
35
|
+
is_super_admin?: boolean | number;
|
|
36
|
+
login_fail_count?: number;
|
|
37
|
+
lock_until?: AnyDate;
|
|
38
|
+
last_login_at?: AnyDate;
|
|
39
|
+
last_login_ip?: string | null;
|
|
40
|
+
remark?: string | null;
|
|
41
|
+
}
|
|
42
|
+
export interface User extends TimestampFields, SoftDeleteFields {
|
|
43
|
+
id: number;
|
|
44
|
+
username?: string | null;
|
|
45
|
+
password_hash: string;
|
|
46
|
+
nickname?: string | null;
|
|
47
|
+
real_name?: string | null;
|
|
48
|
+
avatar?: string | null;
|
|
49
|
+
gender?: number;
|
|
50
|
+
birthday?: string | null;
|
|
51
|
+
phone?: string | null;
|
|
52
|
+
email?: string | null;
|
|
53
|
+
region?: string | null;
|
|
54
|
+
bio?: string | null;
|
|
55
|
+
source?: string | null;
|
|
56
|
+
status?: number;
|
|
57
|
+
is_verified?: boolean | number;
|
|
58
|
+
vip_level?: number;
|
|
59
|
+
login_fail_count?: number;
|
|
60
|
+
lock_until?: AnyDate;
|
|
61
|
+
last_login_at?: AnyDate;
|
|
62
|
+
last_login_ip?: string | null;
|
|
63
|
+
registered_at?: AnyDate;
|
|
64
|
+
remark?: string | null;
|
|
65
|
+
}
|
|
66
|
+
export interface Role extends TimestampFields, SoftDeleteFields {
|
|
67
|
+
id: number;
|
|
68
|
+
name: string;
|
|
69
|
+
code: string;
|
|
70
|
+
description?: string | null;
|
|
71
|
+
data_scope?: number;
|
|
72
|
+
sort?: number;
|
|
73
|
+
status?: number;
|
|
74
|
+
}
|
|
75
|
+
export interface Menu extends TimestampFields {
|
|
76
|
+
id: number;
|
|
77
|
+
parent_id?: number | null;
|
|
78
|
+
name: string;
|
|
79
|
+
type: string;
|
|
80
|
+
icon?: string | null;
|
|
81
|
+
path?: string | null;
|
|
82
|
+
permission?: string | null;
|
|
83
|
+
sort?: number;
|
|
84
|
+
visible?: number;
|
|
85
|
+
cache?: number;
|
|
86
|
+
status?: number;
|
|
87
|
+
}
|
|
88
|
+
export interface Dept extends TimestampFields, SoftDeleteFields {
|
|
89
|
+
id: number;
|
|
90
|
+
parent_id?: number | null;
|
|
91
|
+
name: string;
|
|
92
|
+
leader?: string | null;
|
|
93
|
+
sort?: number;
|
|
94
|
+
status?: number;
|
|
95
|
+
}
|
|
96
|
+
export interface Post extends TimestampFields, SoftDeleteFields {
|
|
97
|
+
id: number;
|
|
98
|
+
code: string;
|
|
99
|
+
name: string;
|
|
100
|
+
sort?: number;
|
|
101
|
+
status?: number;
|
|
102
|
+
}
|
|
103
|
+
export interface DictType extends TimestampFields {
|
|
104
|
+
id: number;
|
|
105
|
+
name: string;
|
|
106
|
+
code: string;
|
|
107
|
+
source: number;
|
|
108
|
+
status?: number;
|
|
109
|
+
remark?: string | null;
|
|
110
|
+
}
|
|
111
|
+
export interface DictData extends TimestampFields {
|
|
112
|
+
id: number;
|
|
113
|
+
type_id: number;
|
|
114
|
+
label: string;
|
|
115
|
+
value: string;
|
|
116
|
+
sort?: number;
|
|
117
|
+
status?: number;
|
|
118
|
+
remark?: string | null;
|
|
119
|
+
}
|
|
120
|
+
export interface SysConfig extends TimestampFields {
|
|
121
|
+
id: number;
|
|
122
|
+
name: string;
|
|
123
|
+
key: string;
|
|
124
|
+
value?: string | null;
|
|
125
|
+
type?: number;
|
|
126
|
+
remark?: string | null;
|
|
127
|
+
}
|
|
128
|
+
export interface SysSetting extends TimestampFields {
|
|
129
|
+
id: number;
|
|
130
|
+
group_key: string;
|
|
131
|
+
key: string;
|
|
132
|
+
value?: string | null;
|
|
133
|
+
}
|
|
134
|
+
export interface OperationLog {
|
|
135
|
+
id: number;
|
|
136
|
+
admin_id?: number | null;
|
|
137
|
+
admin_name?: string | null;
|
|
138
|
+
module?: string | null;
|
|
139
|
+
action?: string | null;
|
|
140
|
+
method?: string | null;
|
|
141
|
+
url?: string | null;
|
|
142
|
+
params?: string | null;
|
|
143
|
+
result?: string | null;
|
|
144
|
+
ip?: string | null;
|
|
145
|
+
user_agent?: string | null;
|
|
146
|
+
detail?: string | null;
|
|
147
|
+
created_at?: AnyDate;
|
|
148
|
+
}
|
|
149
|
+
export interface LoginLog {
|
|
150
|
+
id: number;
|
|
151
|
+
admin_id?: number | null;
|
|
152
|
+
username?: string | null;
|
|
153
|
+
status?: number;
|
|
154
|
+
ip?: string | null;
|
|
155
|
+
location?: string | null;
|
|
156
|
+
browser?: string | null;
|
|
157
|
+
os?: string | null;
|
|
158
|
+
device_type?: string | null;
|
|
159
|
+
session_id?: string | null;
|
|
160
|
+
message?: string | null;
|
|
161
|
+
created_at?: AnyDate;
|
|
162
|
+
}
|
|
163
|
+
export interface Agreement extends TimestampFields {
|
|
164
|
+
id: number;
|
|
165
|
+
title: string;
|
|
166
|
+
code: string;
|
|
167
|
+
type: string;
|
|
168
|
+
content?: string | null;
|
|
169
|
+
version?: string | null;
|
|
170
|
+
status?: number;
|
|
171
|
+
sort?: number;
|
|
172
|
+
is_published?: boolean | number;
|
|
173
|
+
published_at?: AnyDate;
|
|
174
|
+
published_version?: string | null;
|
|
175
|
+
}
|
|
176
|
+
export interface AgreementHistory extends TimestampFields {
|
|
177
|
+
id: number;
|
|
178
|
+
agreement_id: number;
|
|
179
|
+
code: string;
|
|
180
|
+
title: string;
|
|
181
|
+
type: string;
|
|
182
|
+
content?: string | null;
|
|
183
|
+
version: string;
|
|
184
|
+
status?: number;
|
|
185
|
+
is_latest?: boolean | number;
|
|
186
|
+
}
|
|
187
|
+
export interface UserAgreement extends TimestampFields {
|
|
188
|
+
id: number;
|
|
189
|
+
user_id: number;
|
|
190
|
+
agreement_code: string;
|
|
191
|
+
agreed_version: string;
|
|
192
|
+
content_snapshot?: string | null;
|
|
193
|
+
}
|
|
194
|
+
export interface Material extends TimestampFields, SoftDeleteFields {
|
|
195
|
+
id: number;
|
|
196
|
+
user_id?: number | null;
|
|
197
|
+
name: string;
|
|
198
|
+
type?: string | null;
|
|
199
|
+
url: string;
|
|
200
|
+
thumbnail_url?: string | null;
|
|
201
|
+
size?: number | null;
|
|
202
|
+
mime_type?: string | null;
|
|
203
|
+
width?: number | null;
|
|
204
|
+
height?: number | null;
|
|
205
|
+
storage?: string | null;
|
|
206
|
+
source?: string | null;
|
|
207
|
+
expire_at?: AnyDate;
|
|
208
|
+
}
|
|
209
|
+
export interface MaterialGroup extends TimestampFields {
|
|
210
|
+
id: number;
|
|
211
|
+
parent_id?: number | null;
|
|
212
|
+
name: string;
|
|
213
|
+
sort?: number;
|
|
214
|
+
}
|
|
215
|
+
export interface MaterialGroupRelation {
|
|
216
|
+
id: number;
|
|
217
|
+
material_id: number;
|
|
218
|
+
group_id: number;
|
|
219
|
+
}
|
|
220
|
+
export interface Message extends TimestampFields, SoftDeleteFields {
|
|
221
|
+
id: number;
|
|
222
|
+
receiver_id: number;
|
|
223
|
+
category?: string | null;
|
|
224
|
+
template_code?: string | null;
|
|
225
|
+
title: string;
|
|
226
|
+
content?: string | null;
|
|
227
|
+
level?: number;
|
|
228
|
+
biz_type?: string | null;
|
|
229
|
+
biz_id?: number | null;
|
|
230
|
+
link_url?: string | null;
|
|
231
|
+
is_read?: boolean | number;
|
|
232
|
+
read_at?: AnyDate;
|
|
233
|
+
}
|
|
234
|
+
export interface MessageTemplate extends TimestampFields, SoftDeleteFields {
|
|
235
|
+
id: number;
|
|
236
|
+
code: string;
|
|
237
|
+
name: string;
|
|
238
|
+
category: string;
|
|
239
|
+
title_tpl: string;
|
|
240
|
+
content_tpl: string;
|
|
241
|
+
level?: number;
|
|
242
|
+
status?: number;
|
|
243
|
+
remark?: string | null;
|
|
244
|
+
}
|
|
245
|
+
export interface Notice extends TimestampFields, SoftDeleteFields {
|
|
246
|
+
id: number;
|
|
247
|
+
title: string;
|
|
248
|
+
content?: string | null;
|
|
249
|
+
type?: number;
|
|
250
|
+
level?: number;
|
|
251
|
+
scope?: number;
|
|
252
|
+
scope_depts?: string | null;
|
|
253
|
+
status?: number;
|
|
254
|
+
publisher_id?: number | null;
|
|
255
|
+
published_at?: AnyDate;
|
|
256
|
+
}
|
|
257
|
+
export interface NoticeRead extends TimestampFields {
|
|
258
|
+
id: number;
|
|
259
|
+
notice_id: number;
|
|
260
|
+
admin_id: number;
|
|
261
|
+
read_at?: AnyDate;
|
|
262
|
+
}
|
|
263
|
+
export interface Article extends TimestampFields, SoftDeleteFields {
|
|
264
|
+
id: number;
|
|
265
|
+
category_id?: number | null;
|
|
266
|
+
collection_id?: number | null;
|
|
267
|
+
title: string;
|
|
268
|
+
summary?: string | null;
|
|
269
|
+
content?: string | null;
|
|
270
|
+
cover_image?: string | null;
|
|
271
|
+
author?: string | null;
|
|
272
|
+
source?: string | null;
|
|
273
|
+
status?: number;
|
|
274
|
+
is_top?: number;
|
|
275
|
+
view_count?: number;
|
|
276
|
+
published_at?: AnyDate;
|
|
277
|
+
creator_id?: number | null;
|
|
278
|
+
}
|
|
279
|
+
export interface ArticleCategory extends TimestampFields, SoftDeleteFields {
|
|
280
|
+
id: number;
|
|
281
|
+
name: string;
|
|
282
|
+
code: string;
|
|
283
|
+
description?: string | null;
|
|
284
|
+
sort?: number;
|
|
285
|
+
status?: number;
|
|
286
|
+
}
|
|
287
|
+
export interface ArticleCollection extends TimestampFields {
|
|
288
|
+
id: number;
|
|
289
|
+
name: string;
|
|
290
|
+
code?: string | null;
|
|
291
|
+
description?: string | null;
|
|
292
|
+
cover?: string | null;
|
|
293
|
+
sort?: number;
|
|
294
|
+
}
|
|
295
|
+
export interface Photo extends TimestampFields, SoftDeleteFields {
|
|
296
|
+
id: number;
|
|
297
|
+
album_id: number;
|
|
298
|
+
category_id?: number | null;
|
|
299
|
+
material_id?: number | null;
|
|
300
|
+
title?: string | null;
|
|
301
|
+
alias?: string | null;
|
|
302
|
+
description?: string | null;
|
|
303
|
+
url: string;
|
|
304
|
+
thumbnail_url?: string | null;
|
|
305
|
+
is_cover?: boolean | number;
|
|
306
|
+
status?: number;
|
|
307
|
+
sort?: number;
|
|
308
|
+
width?: number | null;
|
|
309
|
+
height?: number | null;
|
|
310
|
+
size?: number;
|
|
311
|
+
mime_type?: string | null;
|
|
312
|
+
user_id?: number | null;
|
|
313
|
+
creator_id?: number | null;
|
|
314
|
+
dpi?: number | null;
|
|
315
|
+
source?: string | null;
|
|
316
|
+
expire_at?: AnyDate;
|
|
317
|
+
}
|
|
318
|
+
export interface PhotoAlbum extends TimestampFields {
|
|
319
|
+
id: number;
|
|
320
|
+
name: string;
|
|
321
|
+
code?: string | null;
|
|
322
|
+
description?: string | null;
|
|
323
|
+
cover?: string | null;
|
|
324
|
+
cover_photo_id?: number | null;
|
|
325
|
+
category_id?: number | null;
|
|
326
|
+
sort?: number;
|
|
327
|
+
material_group_id?: number | null;
|
|
328
|
+
is_user_album?: boolean | number;
|
|
329
|
+
}
|
|
330
|
+
export interface PhotoCategory extends TimestampFields, SoftDeleteFields {
|
|
331
|
+
id: number;
|
|
332
|
+
name: string;
|
|
333
|
+
code: string;
|
|
334
|
+
description?: string | null;
|
|
335
|
+
sort?: number;
|
|
336
|
+
status?: number;
|
|
337
|
+
}
|
|
338
|
+
export interface Video extends TimestampFields, SoftDeleteFields {
|
|
339
|
+
id: number;
|
|
340
|
+
category_id?: number | null;
|
|
341
|
+
collection_id?: number | null;
|
|
342
|
+
title: string;
|
|
343
|
+
description?: string | null;
|
|
344
|
+
cover_image?: string | null;
|
|
345
|
+
video_url?: string | null;
|
|
346
|
+
duration?: number;
|
|
347
|
+
status?: number;
|
|
348
|
+
view_count?: number;
|
|
349
|
+
sort?: number;
|
|
350
|
+
published_at?: AnyDate;
|
|
351
|
+
creator_id?: number | null;
|
|
352
|
+
}
|
|
353
|
+
export interface VideoCategory extends TimestampFields, SoftDeleteFields {
|
|
354
|
+
id: number;
|
|
355
|
+
name: string;
|
|
356
|
+
code: string;
|
|
357
|
+
description?: string | null;
|
|
358
|
+
sort?: number;
|
|
359
|
+
status?: number;
|
|
360
|
+
}
|
|
361
|
+
export interface VideoCollection extends TimestampFields {
|
|
362
|
+
id: number;
|
|
363
|
+
name: string;
|
|
364
|
+
code?: string | null;
|
|
365
|
+
description?: string | null;
|
|
366
|
+
cover?: string | null;
|
|
367
|
+
sort?: number;
|
|
368
|
+
}
|
|
369
|
+
export interface PaymentOrder extends TimestampFields {
|
|
370
|
+
id: number;
|
|
371
|
+
out_trade_no: string;
|
|
372
|
+
user_id?: number | null;
|
|
373
|
+
subject: string;
|
|
374
|
+
amount_cents: number;
|
|
375
|
+
status: string;
|
|
376
|
+
provider: string;
|
|
377
|
+
trade_no?: string | null;
|
|
378
|
+
qr_code?: string | null;
|
|
379
|
+
paid_at?: AnyDate;
|
|
380
|
+
biz_type?: string | null;
|
|
381
|
+
biz_id?: string | null;
|
|
382
|
+
remark?: string | null;
|
|
383
|
+
}
|
|
384
|
+
export interface CSConfig extends TimestampFields, SoftDeleteFields {
|
|
385
|
+
id: number;
|
|
386
|
+
app_id: string;
|
|
387
|
+
app_name: string;
|
|
388
|
+
welcome_message?: string | null;
|
|
389
|
+
system_prompt?: string | null;
|
|
390
|
+
provider?: string | null;
|
|
391
|
+
model?: string | null;
|
|
392
|
+
vision_model?: string | null;
|
|
393
|
+
embedding_provider?: string | null;
|
|
394
|
+
embedding_model?: string | null;
|
|
395
|
+
business_hours?: unknown;
|
|
396
|
+
agent_mode?: string | null;
|
|
397
|
+
agent_ids?: unknown;
|
|
398
|
+
is_active?: number;
|
|
399
|
+
creator_id?: number | null;
|
|
400
|
+
}
|
|
401
|
+
export interface CSKnowledgeBase extends TimestampFields, SoftDeleteFields {
|
|
402
|
+
id: number;
|
|
403
|
+
name: string;
|
|
404
|
+
description?: string | null;
|
|
405
|
+
status?: number;
|
|
406
|
+
chunk_count?: number;
|
|
407
|
+
creator_id?: number | null;
|
|
408
|
+
}
|
|
409
|
+
export interface CSKnowledgeChunk extends TimestampFields, SoftDeleteFields {
|
|
410
|
+
id: number;
|
|
411
|
+
kb_id: number;
|
|
412
|
+
title?: string | null;
|
|
413
|
+
content: string;
|
|
414
|
+
source_type?: string | null;
|
|
415
|
+
source_file?: string | null;
|
|
416
|
+
chunk_index?: number;
|
|
417
|
+
embedding_model?: string | null;
|
|
418
|
+
embedding_status?: number;
|
|
419
|
+
}
|
|
420
|
+
export interface CSConfigKB {
|
|
421
|
+
id: number;
|
|
422
|
+
config_id: number;
|
|
423
|
+
kb_id: number;
|
|
424
|
+
created_at?: AnyDate;
|
|
425
|
+
}
|
|
426
|
+
export interface CSSession extends TimestampFields, SoftDeleteFields {
|
|
427
|
+
id: number;
|
|
428
|
+
session_id: string;
|
|
429
|
+
app_id?: string | null;
|
|
430
|
+
visitor_id?: string | null;
|
|
431
|
+
visitor_name?: string | null;
|
|
432
|
+
visitor_avatar?: string | null;
|
|
433
|
+
source?: string | null;
|
|
434
|
+
status?: number;
|
|
435
|
+
agent_id?: number | null;
|
|
436
|
+
last_agent_active_at?: AnyDate;
|
|
437
|
+
message_count?: number;
|
|
438
|
+
summary?: string | null;
|
|
439
|
+
emotion?: string | null;
|
|
440
|
+
rating?: number | null;
|
|
441
|
+
}
|
|
442
|
+
export interface CSAgent extends TimestampFields, SoftDeleteFields {
|
|
443
|
+
id: number;
|
|
444
|
+
employee_id: number;
|
|
445
|
+
display_name?: string | null;
|
|
446
|
+
avatar?: string | null;
|
|
447
|
+
agent_key?: string | null;
|
|
448
|
+
enabled?: number;
|
|
449
|
+
status?: string | null;
|
|
450
|
+
last_active_at?: AnyDate;
|
|
451
|
+
}
|
|
452
|
+
export interface CSMessage extends TimestampFields {
|
|
453
|
+
id: number;
|
|
454
|
+
session_id: number;
|
|
455
|
+
role: string;
|
|
456
|
+
content: string;
|
|
457
|
+
content_type?: string | null;
|
|
458
|
+
knowledge_refs?: unknown;
|
|
459
|
+
model?: string | null;
|
|
460
|
+
tokens?: number;
|
|
461
|
+
response_time?: number;
|
|
462
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../reglow/core/entities.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fastify 模块增强 - 声明框架装饰的自定义方法与请求上下文字段
|
|
3
|
+
* 对应 backend-python 中通过 Depends 注入的 current_employee / current_user。
|
|
4
|
+
*/
|
|
5
|
+
import type { FastifyReply, FastifyRequest } from "fastify";
|
|
6
|
+
import type { Employee, User } from "./entities.js";
|
|
7
|
+
type PreHandler = (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
8
|
+
declare module "fastify" {
|
|
9
|
+
interface FastifyInstance {
|
|
10
|
+
requireAuth: PreHandler;
|
|
11
|
+
requirePermission: (permission: string) => PreHandler;
|
|
12
|
+
requireClientAuth: PreHandler;
|
|
13
|
+
requireOptionalClientAuth: PreHandler;
|
|
14
|
+
}
|
|
15
|
+
interface FastifyRequest {
|
|
16
|
+
traceId: string;
|
|
17
|
+
currentEmployee?: Employee;
|
|
18
|
+
currentUser?: User | null;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fastify.js","sourceRoot":"","sources":["../../../reglow/core/fastify.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 轻量日志 + Trace ID 工具
|
|
3
|
+
* 对应 backend-python 的 reglow/core/logging_config.py
|
|
4
|
+
*/
|
|
5
|
+
import crypto from 'node:crypto';
|
|
6
|
+
import settings from './config.js';
|
|
7
|
+
const LEVELS = { DEBUG: 10, INFO: 20, WARNING: 30, ERROR: 40 };
|
|
8
|
+
const currentLevel = LEVELS[settings.LOG_LEVEL] || LEVELS.INFO;
|
|
9
|
+
export function newTraceId() {
|
|
10
|
+
return crypto.randomUUID().replace(/-/g, '');
|
|
11
|
+
}
|
|
12
|
+
function log(level, args) {
|
|
13
|
+
if ((LEVELS[level] || 20) < currentLevel)
|
|
14
|
+
return;
|
|
15
|
+
const line = args
|
|
16
|
+
.map((a) => (typeof a === 'object' ? JSON.stringify(a) : String(a)))
|
|
17
|
+
.join(' ');
|
|
18
|
+
if (settings.LOG_JSON) {
|
|
19
|
+
console.log(JSON.stringify({ level: level.toLowerCase(), time: new Date().toISOString(), msg: line }));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
console.log(`[${level}] ${new Date().toISOString()} ${line}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export const logger = {
|
|
26
|
+
debug: (...a) => log('DEBUG', a),
|
|
27
|
+
info: (...a) => log('INFO', a),
|
|
28
|
+
warning: (...a) => log('WARNING', a),
|
|
29
|
+
warn: (...a) => log('WARNING', a),
|
|
30
|
+
error: (...a) => log('ERROR', a),
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=logging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging.js","sourceRoot":"","sources":["../../../reglow/core/logging.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,QAAQ,MAAM,aAAa,CAAC;AAInC,MAAM,MAAM,GAAiC,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAC7F,MAAM,YAAY,GAAW,MAAM,CAAC,QAAQ,CAAC,SAAyB,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC;AAEvF,MAAM,UAAU,UAAU;IACxB,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,GAAG,CAAC,KAAmB,EAAE,IAAe;IAC/C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,YAAY;QAAE,OAAO;IACjD,MAAM,IAAI,GAAG,IAAI;SACd,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;SACnE,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACzG,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,GAAG,CAAY,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3C,IAAI,EAAE,CAAC,GAAG,CAAY,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,OAAO,EAAE,CAAC,GAAG,CAAY,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IAC/C,IAAI,EAAE,CAAC,GAAG,CAAY,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5C,KAAK,EAAE,CAAC,GAAG,CAAY,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;CAC5C,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 模型注册表 - 名称到表名的映射,避免 core 层直接依赖 modules 层
|
|
3
|
+
* 对应 backend-python 的 reglow/core/protocols.py + register_models()
|
|
4
|
+
*/
|
|
5
|
+
export declare const TableNames: {
|
|
6
|
+
readonly Employee: "sys_employee";
|
|
7
|
+
readonly EmployeeRole: "sys_employee_role";
|
|
8
|
+
readonly EmployeeDept: "sys_employee_dept";
|
|
9
|
+
readonly Role: "sys_role";
|
|
10
|
+
readonly RoleMenu: "sys_role_menu";
|
|
11
|
+
readonly RoleDept: "sys_role_dept";
|
|
12
|
+
readonly Menu: "sys_menu";
|
|
13
|
+
readonly Dept: "sys_dept";
|
|
14
|
+
readonly Post: "sys_post";
|
|
15
|
+
readonly SysConfig: "sys_config";
|
|
16
|
+
readonly SysSetting: "sys_setting";
|
|
17
|
+
readonly OperationLog: "sys_operation_log";
|
|
18
|
+
readonly LoginLog: "sys_login_log";
|
|
19
|
+
readonly User: "sys_user";
|
|
20
|
+
readonly UserOAuth: "sys_user_oauth";
|
|
21
|
+
readonly UserAgreement: "sys_user_agreement";
|
|
22
|
+
readonly DictType: "sys_dict_type";
|
|
23
|
+
readonly DictData: "sys_dict_data";
|
|
24
|
+
readonly Material: "sys_material";
|
|
25
|
+
readonly MaterialGroup: "sys_material_group";
|
|
26
|
+
readonly MaterialGroupRelation: "sys_material_group_relation";
|
|
27
|
+
readonly Message: "sys_message";
|
|
28
|
+
readonly MessageTemplate: "sys_message_template";
|
|
29
|
+
readonly Notice: "sys_notice";
|
|
30
|
+
readonly NoticeRead: "sys_notice_read";
|
|
31
|
+
readonly Agreement: "sys_agreement";
|
|
32
|
+
readonly AgreementHistory: "sys_agreement_history";
|
|
33
|
+
readonly Article: "cms_article";
|
|
34
|
+
readonly ArticleCategory: "cms_article_category";
|
|
35
|
+
readonly ArticleCollection: "cms_article_collection";
|
|
36
|
+
readonly Photo: "cms_photo";
|
|
37
|
+
readonly PhotoAlbum: "cms_photo_album";
|
|
38
|
+
readonly PhotoCategory: "cms_photo_category";
|
|
39
|
+
readonly Video: "cms_video";
|
|
40
|
+
readonly VideoCategory: "cms_video_category";
|
|
41
|
+
readonly VideoCollection: "cms_video_collection";
|
|
42
|
+
readonly PaymentOrder: "payment_order";
|
|
43
|
+
readonly CSConfig: "cs_config";
|
|
44
|
+
readonly CSKnowledgeBase: "cs_knowledge_base";
|
|
45
|
+
readonly CSKnowledgeChunk: "cs_knowledge_chunk";
|
|
46
|
+
readonly CSConfigKB: "cs_config_kb";
|
|
47
|
+
readonly CSSession: "cs_session";
|
|
48
|
+
readonly CSAgent: "cs_agent";
|
|
49
|
+
readonly CSMessage: "cs_message";
|
|
50
|
+
};
|
|
51
|
+
export type TableName = (typeof TableNames)[keyof typeof TableNames];
|
|
52
|
+
export declare const ModelRegistry: {
|
|
53
|
+
get(name: keyof typeof TableNames): string;
|
|
54
|
+
Employee: "sys_employee";
|
|
55
|
+
EmployeeRole: "sys_employee_role";
|
|
56
|
+
EmployeeDept: "sys_employee_dept";
|
|
57
|
+
Role: "sys_role";
|
|
58
|
+
RoleMenu: "sys_role_menu";
|
|
59
|
+
RoleDept: "sys_role_dept";
|
|
60
|
+
Menu: "sys_menu";
|
|
61
|
+
Dept: "sys_dept";
|
|
62
|
+
Post: "sys_post";
|
|
63
|
+
SysConfig: "sys_config";
|
|
64
|
+
SysSetting: "sys_setting";
|
|
65
|
+
OperationLog: "sys_operation_log";
|
|
66
|
+
LoginLog: "sys_login_log";
|
|
67
|
+
User: "sys_user";
|
|
68
|
+
UserOAuth: "sys_user_oauth";
|
|
69
|
+
UserAgreement: "sys_user_agreement";
|
|
70
|
+
DictType: "sys_dict_type";
|
|
71
|
+
DictData: "sys_dict_data";
|
|
72
|
+
Material: "sys_material";
|
|
73
|
+
MaterialGroup: "sys_material_group";
|
|
74
|
+
MaterialGroupRelation: "sys_material_group_relation";
|
|
75
|
+
Message: "sys_message";
|
|
76
|
+
MessageTemplate: "sys_message_template";
|
|
77
|
+
Notice: "sys_notice";
|
|
78
|
+
NoticeRead: "sys_notice_read";
|
|
79
|
+
Agreement: "sys_agreement";
|
|
80
|
+
AgreementHistory: "sys_agreement_history";
|
|
81
|
+
Article: "cms_article";
|
|
82
|
+
ArticleCategory: "cms_article_category";
|
|
83
|
+
ArticleCollection: "cms_article_collection";
|
|
84
|
+
Photo: "cms_photo";
|
|
85
|
+
PhotoAlbum: "cms_photo_album";
|
|
86
|
+
PhotoCategory: "cms_photo_category";
|
|
87
|
+
Video: "cms_video";
|
|
88
|
+
VideoCategory: "cms_video_category";
|
|
89
|
+
VideoCollection: "cms_video_collection";
|
|
90
|
+
PaymentOrder: "payment_order";
|
|
91
|
+
CSConfig: "cs_config";
|
|
92
|
+
CSKnowledgeBase: "cs_knowledge_base";
|
|
93
|
+
CSKnowledgeChunk: "cs_knowledge_chunk";
|
|
94
|
+
CSConfigKB: "cs_config_kb";
|
|
95
|
+
CSSession: "cs_session";
|
|
96
|
+
CSAgent: "cs_agent";
|
|
97
|
+
CSMessage: "cs_message";
|
|
98
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 模型注册表 - 名称到表名的映射,避免 core 层直接依赖 modules 层
|
|
3
|
+
* 对应 backend-python 的 reglow/core/protocols.py + register_models()
|
|
4
|
+
*/
|
|
5
|
+
export const TableNames = {
|
|
6
|
+
Employee: "sys_employee",
|
|
7
|
+
EmployeeRole: "sys_employee_role",
|
|
8
|
+
EmployeeDept: "sys_employee_dept",
|
|
9
|
+
Role: "sys_role",
|
|
10
|
+
RoleMenu: "sys_role_menu",
|
|
11
|
+
RoleDept: "sys_role_dept",
|
|
12
|
+
Menu: "sys_menu",
|
|
13
|
+
Dept: "sys_dept",
|
|
14
|
+
Post: "sys_post",
|
|
15
|
+
SysConfig: "sys_config",
|
|
16
|
+
SysSetting: "sys_setting",
|
|
17
|
+
OperationLog: "sys_operation_log",
|
|
18
|
+
LoginLog: "sys_login_log",
|
|
19
|
+
User: "sys_user",
|
|
20
|
+
UserOAuth: "sys_user_oauth",
|
|
21
|
+
UserAgreement: "sys_user_agreement",
|
|
22
|
+
DictType: "sys_dict_type",
|
|
23
|
+
DictData: "sys_dict_data",
|
|
24
|
+
Material: "sys_material",
|
|
25
|
+
MaterialGroup: "sys_material_group",
|
|
26
|
+
MaterialGroupRelation: "sys_material_group_relation",
|
|
27
|
+
Message: "sys_message",
|
|
28
|
+
MessageTemplate: "sys_message_template",
|
|
29
|
+
Notice: "sys_notice",
|
|
30
|
+
NoticeRead: "sys_notice_read",
|
|
31
|
+
Agreement: "sys_agreement",
|
|
32
|
+
AgreementHistory: "sys_agreement_history",
|
|
33
|
+
Article: "cms_article",
|
|
34
|
+
ArticleCategory: "cms_article_category",
|
|
35
|
+
ArticleCollection: "cms_article_collection",
|
|
36
|
+
Photo: "cms_photo",
|
|
37
|
+
PhotoAlbum: "cms_photo_album",
|
|
38
|
+
PhotoCategory: "cms_photo_category",
|
|
39
|
+
Video: "cms_video",
|
|
40
|
+
VideoCategory: "cms_video_category",
|
|
41
|
+
VideoCollection: "cms_video_collection",
|
|
42
|
+
PaymentOrder: "payment_order",
|
|
43
|
+
CSConfig: "cs_config",
|
|
44
|
+
CSKnowledgeBase: "cs_knowledge_base",
|
|
45
|
+
CSKnowledgeChunk: "cs_knowledge_chunk",
|
|
46
|
+
CSConfigKB: "cs_config_kb",
|
|
47
|
+
CSSession: "cs_session",
|
|
48
|
+
CSAgent: "cs_agent",
|
|
49
|
+
CSMessage: "cs_message",
|
|
50
|
+
};
|
|
51
|
+
export const ModelRegistry = {
|
|
52
|
+
...TableNames,
|
|
53
|
+
get(name) {
|
|
54
|
+
return TableNames[name];
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=models.js.map
|