@skyapp-labs/blueprint-backend-core 1.0.9
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/CHANGELOG.md +6 -0
- package/README.md +954 -0
- package/dist/common/base/base.entity.d.ts +12 -0
- package/dist/common/base/base.entity.d.ts.map +1 -0
- package/dist/common/base/base.entity.js +48 -0
- package/dist/common/base/base.entity.js.map +1 -0
- package/dist/common/base/base.repository.d.ts +26 -0
- package/dist/common/base/base.repository.d.ts.map +1 -0
- package/dist/common/base/base.repository.js +61 -0
- package/dist/common/base/base.repository.js.map +1 -0
- package/dist/common/constants/index.d.ts +9 -0
- package/dist/common/constants/index.d.ts.map +1 -0
- package/dist/common/constants/index.js +13 -0
- package/dist/common/constants/index.js.map +1 -0
- package/dist/common/decorators/auth-method-aware.decorator.d.ts +3 -0
- package/dist/common/decorators/auth-method-aware.decorator.d.ts.map +1 -0
- package/dist/common/decorators/auth-method-aware.decorator.js +8 -0
- package/dist/common/decorators/auth-method-aware.decorator.js.map +1 -0
- package/dist/common/decorators/index.d.ts +8 -0
- package/dist/common/decorators/index.d.ts.map +1 -0
- package/dist/common/decorators/index.js +24 -0
- package/dist/common/decorators/index.js.map +1 -0
- package/dist/common/dto/index.d.ts +2 -0
- package/dist/common/dto/index.d.ts.map +1 -0
- package/dist/common/dto/index.js +18 -0
- package/dist/common/dto/index.js.map +1 -0
- package/dist/common/dto/pagination.dto.d.ts +6 -0
- package/dist/common/dto/pagination.dto.d.ts.map +1 -0
- package/dist/common/dto/pagination.dto.js +45 -0
- package/dist/common/dto/pagination.dto.js.map +1 -0
- package/dist/common/filters/http-exception.filter.d.ts +9 -0
- package/dist/common/filters/http-exception.filter.d.ts.map +1 -0
- package/dist/common/filters/http-exception.filter.js +71 -0
- package/dist/common/filters/http-exception.filter.js.map +1 -0
- package/dist/common/filters/index.d.ts +2 -0
- package/dist/common/filters/index.d.ts.map +1 -0
- package/dist/common/filters/index.js +18 -0
- package/dist/common/filters/index.js.map +1 -0
- package/dist/common/guards/auth.guard.d.ts +11 -0
- package/dist/common/guards/auth.guard.d.ts.map +1 -0
- package/dist/common/guards/auth.guard.js +42 -0
- package/dist/common/guards/auth.guard.js.map +1 -0
- package/dist/common/guards/index.d.ts +5 -0
- package/dist/common/guards/index.d.ts.map +1 -0
- package/dist/common/guards/index.js +21 -0
- package/dist/common/guards/index.js.map +1 -0
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts +12 -0
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts.map +1 -0
- package/dist/common/guards/login-ip-rate-limit.guard.js +70 -0
- package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +12 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts.map +1 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.js +70 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -0
- package/dist/common/guards/permissions.guard.d.ts +8 -0
- package/dist/common/guards/permissions.guard.d.ts.map +1 -0
- package/dist/common/guards/permissions.guard.js +41 -0
- package/dist/common/guards/permissions.guard.js.map +1 -0
- package/dist/common/index.d.ts +13 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +33 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/interceptors/index.d.ts +2 -0
- package/dist/common/interceptors/index.d.ts.map +1 -0
- package/dist/common/interceptors/index.js +18 -0
- package/dist/common/interceptors/index.js.map +1 -0
- package/dist/common/interceptors/logging.interceptor.d.ts +10 -0
- package/dist/common/interceptors/logging.interceptor.d.ts.map +1 -0
- package/dist/common/interceptors/logging.interceptor.js +50 -0
- package/dist/common/interceptors/logging.interceptor.js.map +1 -0
- package/dist/common/interfaces/index.d.ts +2 -0
- package/dist/common/interfaces/index.d.ts.map +1 -0
- package/dist/common/interfaces/index.js +18 -0
- package/dist/common/interfaces/index.js.map +1 -0
- package/dist/common/interfaces/request-user.interface.d.ts +5 -0
- package/dist/common/interfaces/request-user.interface.d.ts.map +1 -0
- package/dist/common/interfaces/request-user.interface.js +3 -0
- package/dist/common/interfaces/request-user.interface.js.map +1 -0
- package/dist/common/middlewares/index.d.ts +6 -0
- package/dist/common/middlewares/index.d.ts.map +1 -0
- package/dist/common/middlewares/index.js +23 -0
- package/dist/common/middlewares/index.js.map +1 -0
- package/dist/common/pipes/config-aware-validation.pipe.d.ts +9 -0
- package/dist/common/pipes/config-aware-validation.pipe.d.ts.map +1 -0
- package/dist/common/pipes/config-aware-validation.pipe.js +38 -0
- package/dist/common/pipes/config-aware-validation.pipe.js.map +1 -0
- package/dist/common/pipes/index.d.ts +14 -0
- package/dist/common/pipes/index.d.ts.map +1 -0
- package/dist/common/pipes/index.js +62 -0
- package/dist/common/pipes/index.js.map +1 -0
- package/dist/common/utils/index.d.ts +8 -0
- package/dist/common/utils/index.d.ts.map +1 -0
- package/dist/common/utils/index.js +33 -0
- package/dist/common/utils/index.js.map +1 -0
- package/dist/common/utils/request.utils.d.ts +7 -0
- package/dist/common/utils/request.utils.d.ts.map +1 -0
- package/dist/common/utils/request.utils.js +12 -0
- package/dist/common/utils/request.utils.js.map +1 -0
- package/dist/config/app.config.d.ts +66 -0
- package/dist/config/app.config.d.ts.map +1 -0
- package/dist/config/app.config.js +43 -0
- package/dist/config/app.config.js.map +1 -0
- package/dist/config/database.config.d.ts +16 -0
- package/dist/config/database.config.d.ts.map +1 -0
- package/dist/config/database.config.js +13 -0
- package/dist/config/database.config.js.map +1 -0
- package/dist/config/env.validation.d.ts +34 -0
- package/dist/config/env.validation.d.ts.map +1 -0
- package/dist/config/env.validation.js +172 -0
- package/dist/config/env.validation.js.map +1 -0
- package/dist/config/firebase.module.d.ts +5 -0
- package/dist/config/firebase.module.d.ts.map +1 -0
- package/dist/config/firebase.module.js +21 -0
- package/dist/config/firebase.module.js.map +1 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +17 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/keycloak.module.d.ts +6 -0
- package/dist/config/keycloak.module.d.ts.map +1 -0
- package/dist/config/keycloak.module.js +92 -0
- package/dist/config/keycloak.module.js.map +1 -0
- package/dist/config/redis.module.d.ts +10 -0
- package/dist/config/redis.module.d.ts.map +1 -0
- package/dist/config/redis.module.js +111 -0
- package/dist/config/redis.module.js.map +1 -0
- package/dist/core.module.d.ts +12 -0
- package/dist/core.module.d.ts.map +1 -0
- package/dist/core.module.js +53 -0
- package/dist/core.module.js.map +1 -0
- package/dist/database/data-source.d.ts +5 -0
- package/dist/database/data-source.d.ts.map +1 -0
- package/dist/database/data-source.js +56 -0
- package/dist/database/data-source.js.map +1 -0
- package/dist/database/migrations/1775258543167-full-schema.d.ts +7 -0
- package/dist/database/migrations/1775258543167-full-schema.d.ts.map +1 -0
- package/dist/database/migrations/1775258543167-full-schema.js +100 -0
- package/dist/database/migrations/1775258543167-full-schema.js.map +1 -0
- package/dist/database/seeds/roles.seed.d.ts +11 -0
- package/dist/database/seeds/roles.seed.d.ts.map +1 -0
- package/dist/database/seeds/roles.seed.js +66 -0
- package/dist/database/seeds/roles.seed.js.map +1 -0
- package/dist/database/seeds/run-seed.d.ts +2 -0
- package/dist/database/seeds/run-seed.d.ts.map +1 -0
- package/dist/database/seeds/run-seed.js +32 -0
- package/dist/database/seeds/run-seed.js.map +1 -0
- package/dist/database/seeds/settings.seed.d.ts +9 -0
- package/dist/database/seeds/settings.seed.d.ts.map +1 -0
- package/dist/database/seeds/settings.seed.js +450 -0
- package/dist/database/seeds/settings.seed.js.map +1 -0
- package/dist/database/seeds/user.seed.d.ts +9 -0
- package/dist/database/seeds/user.seed.d.ts.map +1 -0
- package/dist/database/seeds/user.seed.js +90 -0
- package/dist/database/seeds/user.seed.js.map +1 -0
- package/dist/database/typeorm.service.d.ts +13 -0
- package/dist/database/typeorm.service.d.ts.map +1 -0
- package/dist/database/typeorm.service.js +52 -0
- package/dist/database/typeorm.service.js.map +1 -0
- package/dist/health/health.controller.d.ts +29 -0
- package/dist/health/health.controller.d.ts.map +1 -0
- package/dist/health/health.controller.js +182 -0
- package/dist/health/health.controller.js.map +1 -0
- package/dist/health/health.module.d.ts +3 -0
- package/dist/health/health.module.d.ts.map +1 -0
- package/dist/health/health.module.js +50 -0
- package/dist/health/health.module.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs/index.d.ts +6 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +10 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/jobs.module.d.ts +6 -0
- package/dist/jobs/jobs.module.d.ts.map +1 -0
- package/dist/jobs/jobs.module.js +63 -0
- package/dist/jobs/jobs.module.js.map +1 -0
- package/dist/jobs/processors/jobs.processor.d.ts +24 -0
- package/dist/jobs/processors/jobs.processor.d.ts.map +1 -0
- package/dist/jobs/processors/jobs.processor.js +164 -0
- package/dist/jobs/processors/jobs.processor.js.map +1 -0
- package/dist/jobs/queues/jobs.queue.d.ts +25 -0
- package/dist/jobs/queues/jobs.queue.d.ts.map +1 -0
- package/dist/jobs/queues/jobs.queue.js +55 -0
- package/dist/jobs/queues/jobs.queue.js.map +1 -0
- package/dist/jobs/queues/queue-names.d.ts +5 -0
- package/dist/jobs/queues/queue-names.d.ts.map +1 -0
- package/dist/jobs/queues/queue-names.js +7 -0
- package/dist/jobs/queues/queue-names.js.map +1 -0
- package/dist/modules/admin/admin.module.d.ts +3 -0
- package/dist/modules/admin/admin.module.d.ts.map +1 -0
- package/dist/modules/admin/admin.module.js +24 -0
- package/dist/modules/admin/admin.module.js.map +1 -0
- package/dist/modules/admin/controllers/admin.controller.d.ts +27 -0
- package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -0
- package/dist/modules/admin/controllers/admin.controller.js +110 -0
- package/dist/modules/admin/controllers/admin.controller.js.map +1 -0
- package/dist/modules/admin/dto/admin-log.dto.d.ts +17 -0
- package/dist/modules/admin/dto/admin-log.dto.d.ts.map +1 -0
- package/dist/modules/admin/dto/admin-log.dto.js +57 -0
- package/dist/modules/admin/dto/admin-log.dto.js.map +1 -0
- package/dist/modules/admin/entities/admin-log.entity.d.ts +12 -0
- package/dist/modules/admin/entities/admin-log.entity.d.ts.map +1 -0
- package/dist/modules/admin/entities/admin-log.entity.js +53 -0
- package/dist/modules/admin/entities/admin-log.entity.js.map +1 -0
- package/dist/modules/admin/services/admin-log.service.d.ts +11 -0
- package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -0
- package/dist/modules/admin/services/admin-log.service.js +60 -0
- package/dist/modules/admin/services/admin-log.service.js.map +1 -0
- package/dist/modules/auth/auth-core/auth-core.module.d.ts +3 -0
- package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/auth-core.module.js +40 -0
- package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +18 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +45 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -0
- package/dist/modules/auth/auth.manifest.d.ts +9 -0
- package/dist/modules/auth/auth.manifest.d.ts.map +1 -0
- package/dist/modules/auth/auth.manifest.js +29 -0
- package/dist/modules/auth/auth.manifest.js.map +1 -0
- package/dist/modules/auth/auth.module.d.ts +3 -0
- package/dist/modules/auth/auth.module.d.ts.map +1 -0
- package/dist/modules/auth/auth.module.js +67 -0
- package/dist/modules/auth/auth.module.js.map +1 -0
- package/dist/modules/auth/controllers/account.controller.d.ts +42 -0
- package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/account.controller.js +206 -0
- package/dist/modules/auth/controllers/account.controller.js.map +1 -0
- package/dist/modules/auth/controllers/auth.controller.d.ts +32 -0
- package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/auth.controller.js +206 -0
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -0
- package/dist/modules/auth/controllers/otp.controller.d.ts +10 -0
- package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/otp.controller.js +156 -0
- package/dist/modules/auth/controllers/otp.controller.js.map +1 -0
- package/dist/modules/auth/dto/index.d.ts +7 -0
- package/dist/modules/auth/dto/index.d.ts.map +1 -0
- package/dist/modules/auth/dto/index.js +23 -0
- package/dist/modules/auth/dto/index.js.map +1 -0
- package/dist/modules/auth/dto/invite.dto.d.ts +7 -0
- package/dist/modules/auth/dto/invite.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/invite.dto.js +39 -0
- package/dist/modules/auth/dto/invite.dto.js.map +1 -0
- package/dist/modules/auth/dto/login.dto.d.ts +7 -0
- package/dist/modules/auth/dto/login.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/login.dto.js +48 -0
- package/dist/modules/auth/dto/login.dto.js.map +1 -0
- package/dist/modules/auth/dto/otp.dto.d.ts +15 -0
- package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/otp.dto.js +83 -0
- package/dist/modules/auth/dto/otp.dto.js.map +1 -0
- package/dist/modules/auth/dto/password.dto.d.ts +25 -0
- package/dist/modules/auth/dto/password.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/password.dto.js +122 -0
- package/dist/modules/auth/dto/password.dto.js.map +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts +19 -0
- package/dist/modules/auth/dto/register.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/register.dto.js +132 -0
- package/dist/modules/auth/dto/register.dto.js.map +1 -0
- package/dist/modules/auth/dto/token.dto.d.ts +15 -0
- package/dist/modules/auth/dto/token.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/token.dto.js +24 -0
- package/dist/modules/auth/dto/token.dto.js.map +1 -0
- package/dist/modules/auth/entities/index.d.ts +2 -0
- package/dist/modules/auth/entities/index.d.ts.map +1 -0
- package/dist/modules/auth/entities/index.js +18 -0
- package/dist/modules/auth/entities/index.js.map +1 -0
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts +9 -0
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/password-reset-token.entity.js +40 -0
- package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -0
- package/dist/modules/auth/index.d.ts +5 -0
- package/dist/modules/auth/index.d.ts.map +1 -0
- package/dist/modules/auth/index.js +21 -0
- package/dist/modules/auth/index.js.map +1 -0
- package/dist/modules/auth/providers/index.d.ts +5 -0
- package/dist/modules/auth/providers/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/index.js +21 -0
- package/dist/modules/auth/providers/index.js.map +1 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.d.ts +37 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.d.ts.map +1 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.js +3 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.js.map +1 -0
- package/dist/modules/auth/providers/interfaces/index.d.ts +2 -0
- package/dist/modules/auth/providers/interfaces/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/interfaces/index.js +18 -0
- package/dist/modules/auth/providers/interfaces/index.js.map +1 -0
- package/dist/modules/auth/providers/keycloak/index.d.ts +3 -0
- package/dist/modules/auth/providers/keycloak/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/keycloak/index.js +19 -0
- package/dist/modules/auth/providers/keycloak/index.js.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.d.ts +3 -0
- package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.d.ts.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.js +80 -0
- package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.js.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.d.ts +7 -0
- package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.d.ts.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.js +54 -0
- package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.js.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.d.ts +36 -0
- package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.d.ts.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.js +188 -0
- package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.js.map +1 -0
- package/dist/modules/auth/providers/native/index.d.ts +3 -0
- package/dist/modules/auth/providers/native/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/native/index.js +19 -0
- package/dist/modules/auth/providers/native/index.js.map +1 -0
- package/dist/modules/auth/providers/native/native.auth-provider.d.ts +19 -0
- package/dist/modules/auth/providers/native/native.auth-provider.d.ts.map +1 -0
- package/dist/modules/auth/providers/native/native.auth-provider.js +159 -0
- package/dist/modules/auth/providers/native/native.auth-provider.js.map +1 -0
- package/dist/modules/auth/providers/native/native.auth-provider.module.d.ts +3 -0
- package/dist/modules/auth/providers/native/native.auth-provider.module.d.ts.map +1 -0
- package/dist/modules/auth/providers/native/native.auth-provider.module.js +24 -0
- package/dist/modules/auth/providers/native/native.auth-provider.module.js.map +1 -0
- package/dist/modules/auth/providers/provider.registry.d.ts +14 -0
- package/dist/modules/auth/providers/provider.registry.d.ts.map +1 -0
- package/dist/modules/auth/providers/provider.registry.js +49 -0
- package/dist/modules/auth/providers/provider.registry.js.map +1 -0
- package/dist/modules/auth/services/account.service.d.ts +40 -0
- package/dist/modules/auth/services/account.service.d.ts.map +1 -0
- package/dist/modules/auth/services/account.service.js +165 -0
- package/dist/modules/auth/services/account.service.js.map +1 -0
- package/dist/modules/auth/services/index.d.ts +6 -0
- package/dist/modules/auth/services/index.d.ts.map +1 -0
- package/dist/modules/auth/services/index.js +22 -0
- package/dist/modules/auth/services/index.js.map +1 -0
- package/dist/modules/auth/services/login.service.d.ts +28 -0
- package/dist/modules/auth/services/login.service.d.ts.map +1 -0
- package/dist/modules/auth/services/login.service.js +210 -0
- package/dist/modules/auth/services/login.service.js.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts +16 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.js +75 -0
- package/dist/modules/auth/services/otp-auth.service.js.map +1 -0
- package/dist/modules/auth/services/password.service.d.ts +39 -0
- package/dist/modules/auth/services/password.service.d.ts.map +1 -0
- package/dist/modules/auth/services/password.service.js +213 -0
- package/dist/modules/auth/services/password.service.js.map +1 -0
- package/dist/modules/auth/services/registration.service.d.ts +30 -0
- package/dist/modules/auth/services/registration.service.d.ts.map +1 -0
- package/dist/modules/auth/services/registration.service.js +217 -0
- package/dist/modules/auth/services/registration.service.js.map +1 -0
- package/dist/modules/notifications/controllers/index.d.ts +2 -0
- package/dist/modules/notifications/controllers/index.d.ts.map +1 -0
- package/dist/modules/notifications/controllers/index.js +18 -0
- package/dist/modules/notifications/controllers/index.js.map +1 -0
- package/dist/modules/notifications/controllers/notifications.controller.d.ts +38 -0
- package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -0
- package/dist/modules/notifications/controllers/notifications.controller.js +140 -0
- package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -0
- package/dist/modules/notifications/dto/device.dto.d.ts +10 -0
- package/dist/modules/notifications/dto/device.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/device.dto.js +38 -0
- package/dist/modules/notifications/dto/device.dto.js.map +1 -0
- package/dist/modules/notifications/dto/event-types.dto.d.ts +6 -0
- package/dist/modules/notifications/dto/event-types.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/event-types.dto.js +10 -0
- package/dist/modules/notifications/dto/event-types.dto.js.map +1 -0
- package/dist/modules/notifications/dto/fcm.dto.d.ts +14 -0
- package/dist/modules/notifications/dto/fcm.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/fcm.dto.js +3 -0
- package/dist/modules/notifications/dto/fcm.dto.js.map +1 -0
- package/dist/modules/notifications/dto/index.d.ts +6 -0
- package/dist/modules/notifications/dto/index.d.ts.map +1 -0
- package/dist/modules/notifications/dto/index.js +22 -0
- package/dist/modules/notifications/dto/index.js.map +1 -0
- package/dist/modules/notifications/dto/notification-query.dto.d.ts +8 -0
- package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/notification-query.dto.js +44 -0
- package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -0
- package/dist/modules/notifications/dto/user-device-token.dto.d.ts +9 -0
- package/dist/modules/notifications/dto/user-device-token.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/user-device-token.dto.js +3 -0
- package/dist/modules/notifications/dto/user-device-token.dto.js.map +1 -0
- package/dist/modules/notifications/entities/device-token.entity.d.ts +17 -0
- package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -0
- package/dist/modules/notifications/entities/device-token.entity.js +62 -0
- package/dist/modules/notifications/entities/device-token.entity.js.map +1 -0
- package/dist/modules/notifications/entities/index.d.ts +3 -0
- package/dist/modules/notifications/entities/index.d.ts.map +1 -0
- package/dist/modules/notifications/entities/index.js +19 -0
- package/dist/modules/notifications/entities/index.js.map +1 -0
- package/dist/modules/notifications/entities/notification.entity.d.ts +21 -0
- package/dist/modules/notifications/entities/notification.entity.d.ts.map +1 -0
- package/dist/modules/notifications/entities/notification.entity.js +70 -0
- package/dist/modules/notifications/entities/notification.entity.js.map +1 -0
- package/dist/modules/notifications/firebase.module.d.ts +3 -0
- package/dist/modules/notifications/firebase.module.d.ts.map +1 -0
- package/dist/modules/notifications/firebase.module.js +25 -0
- package/dist/modules/notifications/firebase.module.js.map +1 -0
- package/dist/modules/notifications/notifications.manifest.d.ts +9 -0
- package/dist/modules/notifications/notifications.manifest.d.ts.map +1 -0
- package/dist/modules/notifications/notifications.manifest.js +37 -0
- package/dist/modules/notifications/notifications.manifest.js.map +1 -0
- package/dist/modules/notifications/notifications.module.d.ts +3 -0
- package/dist/modules/notifications/notifications.module.d.ts.map +1 -0
- package/dist/modules/notifications/notifications.module.js +32 -0
- package/dist/modules/notifications/notifications.module.js.map +1 -0
- package/dist/modules/notifications/services/fcm.service.d.ts +17 -0
- package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/fcm.service.js +150 -0
- package/dist/modules/notifications/services/fcm.service.js.map +1 -0
- package/dist/modules/notifications/services/firebase.service.d.ts +19 -0
- package/dist/modules/notifications/services/firebase.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/firebase.service.js +73 -0
- package/dist/modules/notifications/services/firebase.service.js.map +1 -0
- package/dist/modules/notifications/services/index.d.ts +4 -0
- package/dist/modules/notifications/services/index.d.ts.map +1 -0
- package/dist/modules/notifications/services/index.js +20 -0
- package/dist/modules/notifications/services/index.js.map +1 -0
- package/dist/modules/notifications/services/notifications.service.d.ts +19 -0
- package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/notifications.service.js +97 -0
- package/dist/modules/notifications/services/notifications.service.js.map +1 -0
- package/dist/modules/otp/constants/otp.constants.d.ts +4 -0
- package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -0
- package/dist/modules/otp/constants/otp.constants.js +10 -0
- package/dist/modules/otp/constants/otp.constants.js.map +1 -0
- package/dist/modules/otp/email/email-provider.interface.d.ts +14 -0
- package/dist/modules/otp/email/email-provider.interface.d.ts.map +1 -0
- package/dist/modules/otp/email/email-provider.interface.js +15 -0
- package/dist/modules/otp/email/email-provider.interface.js.map +1 -0
- package/dist/modules/otp/email/email-proxy.service.d.ts +21 -0
- package/dist/modules/otp/email/email-proxy.service.d.ts.map +1 -0
- package/dist/modules/otp/email/email-proxy.service.js +67 -0
- package/dist/modules/otp/email/email-proxy.service.js.map +1 -0
- package/dist/modules/otp/email/email.module.d.ts +3 -0
- package/dist/modules/otp/email/email.module.d.ts.map +1 -0
- package/dist/modules/otp/email/email.module.js +33 -0
- package/dist/modules/otp/email/email.module.js.map +1 -0
- package/dist/modules/otp/email/index.d.ts +4 -0
- package/dist/modules/otp/email/index.d.ts.map +1 -0
- package/dist/modules/otp/email/index.js +20 -0
- package/dist/modules/otp/email/index.js.map +1 -0
- package/dist/modules/otp/email/providers/index.d.ts +5 -0
- package/dist/modules/otp/email/providers/index.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/index.js +21 -0
- package/dist/modules/otp/email/providers/index.js.map +1 -0
- package/dist/modules/otp/email/providers/mailgun.provider.d.ts +10 -0
- package/dist/modules/otp/email/providers/mailgun.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/mailgun.provider.js +59 -0
- package/dist/modules/otp/email/providers/mailgun.provider.js.map +1 -0
- package/dist/modules/otp/email/providers/resend.provider.d.ts +10 -0
- package/dist/modules/otp/email/providers/resend.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/resend.provider.js +57 -0
- package/dist/modules/otp/email/providers/resend.provider.js.map +1 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.d.ts +10 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.js +58 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.js.map +1 -0
- package/dist/modules/otp/email/providers/smtp.provider.d.ts +15 -0
- package/dist/modules/otp/email/providers/smtp.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/smtp.provider.js +115 -0
- package/dist/modules/otp/email/providers/smtp.provider.js.map +1 -0
- package/dist/modules/otp/index.d.ts +5 -0
- package/dist/modules/otp/index.d.ts.map +1 -0
- package/dist/modules/otp/index.js +21 -0
- package/dist/modules/otp/index.js.map +1 -0
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts +26 -0
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -0
- package/dist/modules/otp/interfaces/otp.service.interface.js +7 -0
- package/dist/modules/otp/interfaces/otp.service.interface.js.map +1 -0
- package/dist/modules/otp/otp.module.d.ts +3 -0
- package/dist/modules/otp/otp.module.d.ts.map +1 -0
- package/dist/modules/otp/otp.module.js +36 -0
- package/dist/modules/otp/otp.module.js.map +1 -0
- package/dist/modules/otp/otp.service.d.ts +25 -0
- package/dist/modules/otp/otp.service.d.ts.map +1 -0
- package/dist/modules/otp/otp.service.js +146 -0
- package/dist/modules/otp/otp.service.js.map +1 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts +13 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -0
- package/dist/modules/otp/services/otp.rate-limiter.js +70 -0
- package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -0
- package/dist/modules/otp/services/otp.session.store.d.ts +28 -0
- package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -0
- package/dist/modules/otp/services/otp.session.store.js +226 -0
- package/dist/modules/otp/services/otp.session.store.js.map +1 -0
- package/dist/modules/otp/sms/index.d.ts +4 -0
- package/dist/modules/otp/sms/index.d.ts.map +1 -0
- package/dist/modules/otp/sms/index.js +20 -0
- package/dist/modules/otp/sms/index.js.map +1 -0
- package/dist/modules/otp/sms/providers/index.d.ts +5 -0
- package/dist/modules/otp/sms/providers/index.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/index.js +21 -0
- package/dist/modules/otp/sms/providers/index.js.map +1 -0
- package/dist/modules/otp/sms/providers/infobip.provider.d.ts +10 -0
- package/dist/modules/otp/sms/providers/infobip.provider.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/infobip.provider.js +61 -0
- package/dist/modules/otp/sms/providers/infobip.provider.js.map +1 -0
- package/dist/modules/otp/sms/providers/smart-sms.provider.d.ts +11 -0
- package/dist/modules/otp/sms/providers/smart-sms.provider.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/smart-sms.provider.js +56 -0
- package/dist/modules/otp/sms/providers/smart-sms.provider.js.map +1 -0
- package/dist/modules/otp/sms/providers/termii.provider.d.ts +11 -0
- package/dist/modules/otp/sms/providers/termii.provider.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/termii.provider.js +56 -0
- package/dist/modules/otp/sms/providers/termii.provider.js.map +1 -0
- package/dist/modules/otp/sms/providers/twilio.provider.d.ts +10 -0
- package/dist/modules/otp/sms/providers/twilio.provider.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/twilio.provider.js +59 -0
- package/dist/modules/otp/sms/providers/twilio.provider.js.map +1 -0
- package/dist/modules/otp/sms/sms-provider.interface.d.ts +12 -0
- package/dist/modules/otp/sms/sms-provider.interface.d.ts.map +1 -0
- package/dist/modules/otp/sms/sms-provider.interface.js +15 -0
- package/dist/modules/otp/sms/sms-provider.interface.js.map +1 -0
- package/dist/modules/otp/sms/sms-proxy.service.d.ts +21 -0
- package/dist/modules/otp/sms/sms-proxy.service.d.ts.map +1 -0
- package/dist/modules/otp/sms/sms-proxy.service.js +67 -0
- package/dist/modules/otp/sms/sms-proxy.service.js.map +1 -0
- package/dist/modules/otp/sms/sms.module.d.ts +3 -0
- package/dist/modules/otp/sms/sms.module.d.ts.map +1 -0
- package/dist/modules/otp/sms/sms.module.js +33 -0
- package/dist/modules/otp/sms/sms.module.js.map +1 -0
- package/dist/modules/otp/utils/otp.utils.d.ts +13 -0
- package/dist/modules/otp/utils/otp.utils.d.ts.map +1 -0
- package/dist/modules/otp/utils/otp.utils.js +57 -0
- package/dist/modules/otp/utils/otp.utils.js.map +1 -0
- package/dist/modules/profile/controllers/profile.controller.d.ts +14 -0
- package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -0
- package/dist/modules/profile/controllers/profile.controller.js +81 -0
- package/dist/modules/profile/controllers/profile.controller.js.map +1 -0
- package/dist/modules/profile/dto/profile.dto.d.ts +11 -0
- package/dist/modules/profile/dto/profile.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/profile.dto.js +50 -0
- package/dist/modules/profile/dto/profile.dto.js.map +1 -0
- package/dist/modules/profile/index.d.ts +3 -0
- package/dist/modules/profile/index.d.ts.map +1 -0
- package/dist/modules/profile/index.js +19 -0
- package/dist/modules/profile/index.js.map +1 -0
- package/dist/modules/profile/profile.module.d.ts +3 -0
- package/dist/modules/profile/profile.module.d.ts.map +1 -0
- package/dist/modules/profile/profile.module.js +26 -0
- package/dist/modules/profile/profile.module.js.map +1 -0
- package/dist/modules/profile/services/profile.service.d.ts +16 -0
- package/dist/modules/profile/services/profile.service.d.ts.map +1 -0
- package/dist/modules/profile/services/profile.service.js +64 -0
- package/dist/modules/profile/services/profile.service.js.map +1 -0
- package/dist/modules/roles/controllers/index.d.ts +5 -0
- package/dist/modules/roles/controllers/index.d.ts.map +1 -0
- package/dist/modules/roles/controllers/index.js +12 -0
- package/dist/modules/roles/controllers/index.js.map +1 -0
- package/dist/modules/roles/controllers/modules.controller.d.ts +14 -0
- package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -0
- package/dist/modules/roles/controllers/modules.controller.js +82 -0
- package/dist/modules/roles/controllers/modules.controller.js.map +1 -0
- package/dist/modules/roles/controllers/permissions.controller.d.ts +14 -0
- package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -0
- package/dist/modules/roles/controllers/permissions.controller.js +83 -0
- package/dist/modules/roles/controllers/permissions.controller.js.map +1 -0
- package/dist/modules/roles/controllers/roles.controller.d.ts +17 -0
- package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -0
- package/dist/modules/roles/controllers/roles.controller.js +93 -0
- package/dist/modules/roles/controllers/roles.controller.js.map +1 -0
- package/dist/modules/roles/controllers/user-roles.controller.d.ts +11 -0
- package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -0
- package/dist/modules/roles/controllers/user-roles.controller.js +94 -0
- package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -0
- package/dist/modules/roles/dto/index.d.ts +4 -0
- package/dist/modules/roles/dto/index.d.ts.map +1 -0
- package/dist/modules/roles/dto/index.js +20 -0
- package/dist/modules/roles/dto/index.js.map +1 -0
- package/dist/modules/roles/dto/module.dto.d.ts +10 -0
- package/dist/modules/roles/dto/module.dto.d.ts.map +1 -0
- package/dist/modules/roles/dto/module.dto.js +48 -0
- package/dist/modules/roles/dto/module.dto.js.map +1 -0
- package/dist/modules/roles/dto/permission.dto.d.ts +14 -0
- package/dist/modules/roles/dto/permission.dto.d.ts.map +1 -0
- package/dist/modules/roles/dto/permission.dto.js +60 -0
- package/dist/modules/roles/dto/permission.dto.js.map +1 -0
- package/dist/modules/roles/dto/role.dto.d.ts +15 -0
- package/dist/modules/roles/dto/role.dto.d.ts.map +1 -0
- package/dist/modules/roles/dto/role.dto.js +65 -0
- package/dist/modules/roles/dto/role.dto.js.map +1 -0
- package/dist/modules/roles/entities/index.d.ts +4 -0
- package/dist/modules/roles/entities/index.d.ts.map +1 -0
- package/dist/modules/roles/entities/index.js +10 -0
- package/dist/modules/roles/entities/index.js.map +1 -0
- package/dist/modules/roles/entities/module.entity.d.ts +9 -0
- package/dist/modules/roles/entities/module.entity.d.ts.map +1 -0
- package/dist/modules/roles/entities/module.entity.js +39 -0
- package/dist/modules/roles/entities/module.entity.js.map +1 -0
- package/dist/modules/roles/entities/permission.entity.d.ts +12 -0
- package/dist/modules/roles/entities/permission.entity.d.ts.map +1 -0
- package/dist/modules/roles/entities/permission.entity.js +49 -0
- package/dist/modules/roles/entities/permission.entity.js.map +1 -0
- package/dist/modules/roles/entities/role.entity.d.ts +11 -0
- package/dist/modules/roles/entities/role.entity.d.ts.map +1 -0
- package/dist/modules/roles/entities/role.entity.js +49 -0
- package/dist/modules/roles/entities/role.entity.js.map +1 -0
- package/dist/modules/roles/index.d.ts +7 -0
- package/dist/modules/roles/index.d.ts.map +1 -0
- package/dist/modules/roles/index.js +25 -0
- package/dist/modules/roles/index.js.map +1 -0
- package/dist/modules/roles/registry/discover-manifests.d.ts +3 -0
- package/dist/modules/roles/registry/discover-manifests.d.ts.map +1 -0
- package/dist/modules/roles/registry/discover-manifests.js +83 -0
- package/dist/modules/roles/registry/discover-manifests.js.map +1 -0
- package/dist/modules/roles/registry/index.d.ts +3 -0
- package/dist/modules/roles/registry/index.d.ts.map +1 -0
- package/dist/modules/roles/registry/index.js +8 -0
- package/dist/modules/roles/registry/index.js.map +1 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.d.ts +7 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.d.ts.map +1 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.js +52 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.js.map +1 -0
- package/dist/modules/roles/roles.manifest.d.ts +12 -0
- package/dist/modules/roles/roles.manifest.d.ts.map +1 -0
- package/dist/modules/roles/roles.manifest.js +51 -0
- package/dist/modules/roles/roles.manifest.js.map +1 -0
- package/dist/modules/roles/roles.module.d.ts +8 -0
- package/dist/modules/roles/roles.module.d.ts.map +1 -0
- package/dist/modules/roles/roles.module.js +43 -0
- package/dist/modules/roles/roles.module.js.map +1 -0
- package/dist/modules/roles/services/index.d.ts +6 -0
- package/dist/modules/roles/services/index.d.ts.map +1 -0
- package/dist/modules/roles/services/index.js +14 -0
- package/dist/modules/roles/services/index.js.map +1 -0
- package/dist/modules/roles/services/manifest-sync.service.d.ts +11 -0
- package/dist/modules/roles/services/manifest-sync.service.d.ts.map +1 -0
- package/dist/modules/roles/services/manifest-sync.service.js +38 -0
- package/dist/modules/roles/services/manifest-sync.service.js.map +1 -0
- package/dist/modules/roles/services/modules.service.d.ts +14 -0
- package/dist/modules/roles/services/modules.service.d.ts.map +1 -0
- package/dist/modules/roles/services/modules.service.js +69 -0
- package/dist/modules/roles/services/modules.service.js.map +1 -0
- package/dist/modules/roles/services/permissions.service.d.ts +14 -0
- package/dist/modules/roles/services/permissions.service.d.ts.map +1 -0
- package/dist/modules/roles/services/permissions.service.js +72 -0
- package/dist/modules/roles/services/permissions.service.js.map +1 -0
- package/dist/modules/roles/services/roles.service.d.ts +17 -0
- package/dist/modules/roles/services/roles.service.d.ts.map +1 -0
- package/dist/modules/roles/services/roles.service.js +100 -0
- package/dist/modules/roles/services/roles.service.js.map +1 -0
- package/dist/modules/roles/services/user-roles.service.d.ts +15 -0
- package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -0
- package/dist/modules/roles/services/user-roles.service.js +88 -0
- package/dist/modules/roles/services/user-roles.service.js.map +1 -0
- package/dist/modules/roles/types/manifest.types.d.ts +12 -0
- package/dist/modules/roles/types/manifest.types.d.ts.map +1 -0
- package/dist/modules/roles/types/manifest.types.js +3 -0
- package/dist/modules/roles/types/manifest.types.js.map +1 -0
- package/dist/modules/sessions/controllers/session.controller.d.ts +17 -0
- package/dist/modules/sessions/controllers/session.controller.d.ts.map +1 -0
- package/dist/modules/sessions/controllers/session.controller.js +95 -0
- package/dist/modules/sessions/controllers/session.controller.js.map +1 -0
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts +21 -0
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -0
- package/dist/modules/sessions/entities/refresh-token.entity.js +77 -0
- package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -0
- package/dist/modules/sessions/index.d.ts +4 -0
- package/dist/modules/sessions/index.d.ts.map +1 -0
- package/dist/modules/sessions/index.js +20 -0
- package/dist/modules/sessions/index.js.map +1 -0
- package/dist/modules/sessions/services/token.service.d.ts +42 -0
- package/dist/modules/sessions/services/token.service.d.ts.map +1 -0
- package/dist/modules/sessions/services/token.service.js +253 -0
- package/dist/modules/sessions/services/token.service.js.map +1 -0
- package/dist/modules/sessions/sessions.module.d.ts +3 -0
- package/dist/modules/sessions/sessions.module.d.ts.map +1 -0
- package/dist/modules/sessions/sessions.module.js +28 -0
- package/dist/modules/sessions/sessions.module.js.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts +60 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.js +78 -0
- package/dist/modules/settings/constants/settings.defaults.js.map +1 -0
- package/dist/modules/settings/constants/settings.keys.d.ts +56 -0
- package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -0
- package/dist/modules/settings/constants/settings.keys.js +58 -0
- package/dist/modules/settings/constants/settings.keys.js.map +1 -0
- package/dist/modules/settings/controllers/settings.controller.d.ts +13 -0
- package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -0
- package/dist/modules/settings/controllers/settings.controller.js +91 -0
- package/dist/modules/settings/controllers/settings.controller.js.map +1 -0
- package/dist/modules/settings/dto/settings.dto.d.ts +4 -0
- package/dist/modules/settings/dto/settings.dto.d.ts.map +1 -0
- package/dist/modules/settings/dto/settings.dto.js +24 -0
- package/dist/modules/settings/dto/settings.dto.js.map +1 -0
- package/dist/modules/settings/entities/app-setting.entity.d.ts +13 -0
- package/dist/modules/settings/entities/app-setting.entity.d.ts.map +1 -0
- package/dist/modules/settings/entities/app-setting.entity.js +56 -0
- package/dist/modules/settings/entities/app-setting.entity.js.map +1 -0
- package/dist/modules/settings/index.d.ts +8 -0
- package/dist/modules/settings/index.d.ts.map +1 -0
- package/dist/modules/settings/index.js +24 -0
- package/dist/modules/settings/index.js.map +1 -0
- package/dist/modules/settings/services/settings.service.d.ts +23 -0
- package/dist/modules/settings/services/settings.service.d.ts.map +1 -0
- package/dist/modules/settings/services/settings.service.js +116 -0
- package/dist/modules/settings/services/settings.service.js.map +1 -0
- package/dist/modules/settings/settings.manifest.d.ts +7 -0
- package/dist/modules/settings/settings.manifest.d.ts.map +1 -0
- package/dist/modules/settings/settings.manifest.js +25 -0
- package/dist/modules/settings/settings.manifest.js.map +1 -0
- package/dist/modules/settings/settings.module.d.ts +3 -0
- package/dist/modules/settings/settings.module.d.ts.map +1 -0
- package/dist/modules/settings/settings.module.js +27 -0
- package/dist/modules/settings/settings.module.js.map +1 -0
- package/dist/modules/users/controllers/users.controller.d.ts +41 -0
- package/dist/modules/users/controllers/users.controller.d.ts.map +1 -0
- package/dist/modules/users/controllers/users.controller.js +273 -0
- package/dist/modules/users/controllers/users.controller.js.map +1 -0
- package/dist/modules/users/dto/user.dto.d.ts +52 -0
- package/dist/modules/users/dto/user.dto.d.ts.map +1 -0
- package/dist/modules/users/dto/user.dto.js +139 -0
- package/dist/modules/users/dto/user.dto.js.map +1 -0
- package/dist/modules/users/entities/user.entity.d.ts +33 -0
- package/dist/modules/users/entities/user.entity.d.ts.map +1 -0
- package/dist/modules/users/entities/user.entity.js +130 -0
- package/dist/modules/users/entities/user.entity.js.map +1 -0
- package/dist/modules/users/index.d.ts +7 -0
- package/dist/modules/users/index.d.ts.map +1 -0
- package/dist/modules/users/index.js +23 -0
- package/dist/modules/users/index.js.map +1 -0
- package/dist/modules/users/services/invite.service.d.ts +35 -0
- package/dist/modules/users/services/invite.service.d.ts.map +1 -0
- package/dist/modules/users/services/invite.service.js +236 -0
- package/dist/modules/users/services/invite.service.js.map +1 -0
- package/dist/modules/users/services/users.service.d.ts +40 -0
- package/dist/modules/users/services/users.service.d.ts.map +1 -0
- package/dist/modules/users/services/users.service.js +239 -0
- package/dist/modules/users/services/users.service.js.map +1 -0
- package/dist/modules/users/users.manifest.d.ts +12 -0
- package/dist/modules/users/users.manifest.d.ts.map +1 -0
- package/dist/modules/users/users.manifest.js +43 -0
- package/dist/modules/users/users.manifest.js.map +1 -0
- package/dist/modules/users/users.module.d.ts +3 -0
- package/dist/modules/users/users.module.d.ts.map +1 -0
- package/dist/modules/users/users.module.js +36 -0
- package/dist/modules/users/users.module.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +140 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const SETTING_KEYS: {
|
|
2
|
+
readonly OTP_TTL_SECONDS: "otp.ttl_seconds";
|
|
3
|
+
readonly OTP_MAX_ATTEMPTS: "otp.max_attempts";
|
|
4
|
+
readonly OTP_RESEND_COOLDOWN_SECONDS: "otp.resend_cooldown_seconds";
|
|
5
|
+
readonly OTP_RATE_LIMIT_MAX: "otp.rate_limit_max";
|
|
6
|
+
readonly OTP_RATE_LIMIT_WINDOW_SECONDS: "otp.rate_limit_window_seconds";
|
|
7
|
+
readonly OTP_IP_RATE_LIMIT_MAX: "otp.ip_rate_limit_max";
|
|
8
|
+
readonly OTP_IP_RATE_LIMIT_WINDOW_SECONDS: "otp.ip_rate_limit_window_seconds";
|
|
9
|
+
readonly OTP_SMS_TEMPLATE: "otp.sms_template";
|
|
10
|
+
readonly OTP_EMAIL_SUBJECT: "otp.email_subject";
|
|
11
|
+
readonly OTP_EMAIL_HTML_TEMPLATE: "otp.email_html_template";
|
|
12
|
+
readonly OTP_EMAIL_TEXT_TEMPLATE: "otp.email_text_template";
|
|
13
|
+
readonly TOKENS_REFRESH_TTL_DAYS: "tokens.refresh_ttl_days";
|
|
14
|
+
readonly TOKENS_TEMPORARY_TTL_SECONDS: "tokens.temporary_ttl_seconds";
|
|
15
|
+
readonly TOKENS_ACCESS_EXPIRES_IN: "tokens.access_expires_in";
|
|
16
|
+
readonly TOKENS_INVITE_TTL_DAYS: "tokens.invite_ttl_days";
|
|
17
|
+
readonly TOKENS_PASSWORD_RESET_TTL_SECONDS: "tokens.password_reset_ttl_seconds";
|
|
18
|
+
readonly TEST_OTP_IDENTIFIERS: "test.otp_identifiers";
|
|
19
|
+
readonly AUTH_PROVIDER: "auth.provider";
|
|
20
|
+
readonly AUTH_METHOD: "auth.method";
|
|
21
|
+
readonly AUTH_DEFAULT_ROLE_SLUG: "auth.default_role_slug";
|
|
22
|
+
readonly LOGIN_IP_RATE_LIMIT_MAX: "login.ip_rate_limit_max";
|
|
23
|
+
readonly LOGIN_IP_RATE_LIMIT_WINDOW_SECONDS: "login.ip_rate_limit_window_seconds";
|
|
24
|
+
readonly LOGIN_LOCKOUT_MAX_ATTEMPTS: "login.lockout_max_attempts";
|
|
25
|
+
readonly LOGIN_LOCKOUT_DURATION_SECONDS: "login.lockout_duration_seconds";
|
|
26
|
+
readonly HEALTH_MAX_HEAP_MB: "health.max_heap_mb";
|
|
27
|
+
readonly HEALTH_MAX_RSS_MB: "health.max_rss_mb";
|
|
28
|
+
readonly HEALTH_QUEUE_DEPTH_THRESHOLD: "health.queue_depth_threshold";
|
|
29
|
+
readonly SMS_ACTIVE_PROVIDER: "sms.active_provider";
|
|
30
|
+
readonly SMS_TWILIO_FROM_NUMBER: "sms.twilio_from_number";
|
|
31
|
+
readonly SMS_TWILIO_ACCOUNT_SID: "sms.twilio_account_sid";
|
|
32
|
+
readonly SMS_TWILIO_AUTH_TOKEN: "sms.twilio_auth_token";
|
|
33
|
+
readonly SMS_TERMII_API_KEY: "sms.termii_api_key";
|
|
34
|
+
readonly SMS_TERMII_SENDER_ID: "sms.termii_sender_id";
|
|
35
|
+
readonly SMS_INFOBIP_API_KEY: "sms.infobip_api_key";
|
|
36
|
+
readonly SMS_INFOBIP_SENDER_ID: "sms.infobip_sender_id";
|
|
37
|
+
readonly SMS_INFOBIP_BASE_URL: "sms.infobip_base_url";
|
|
38
|
+
readonly SMS_SMARTSMS_TOKEN: "sms.smartsms_token";
|
|
39
|
+
readonly SMS_SMARTSMS_SENDER_ID: "sms.smartsms_sender_id";
|
|
40
|
+
readonly EMAIL_ACTIVE_PROVIDER: "email.active_provider";
|
|
41
|
+
readonly EMAIL_FROM_ADDRESS: "email.from_address";
|
|
42
|
+
readonly EMAIL_RESEND_API_KEY: "email.resend_api_key";
|
|
43
|
+
readonly EMAIL_SENDGRID_API_KEY: "email.sendgrid_api_key";
|
|
44
|
+
readonly EMAIL_MAILGUN_API_KEY: "email.mailgun_api_key";
|
|
45
|
+
readonly EMAIL_MAILGUN_DOMAIN: "email.mailgun_domain";
|
|
46
|
+
readonly EMAIL_SMTP_HOST: "email.smtp_host";
|
|
47
|
+
readonly EMAIL_SMTP_PORT: "email.smtp_port";
|
|
48
|
+
readonly EMAIL_SMTP_USER: "email.smtp_user";
|
|
49
|
+
readonly EMAIL_SMTP_PASS: "email.smtp_pass";
|
|
50
|
+
readonly FIREBASE_PROJECT_ID: "firebase.project_id";
|
|
51
|
+
readonly FIREBASE_CLIENT_EMAIL: "firebase.client_email";
|
|
52
|
+
readonly FIREBASE_PRIVATE_KEY: "firebase.private_key";
|
|
53
|
+
readonly FIREBASE_API_KEY: "firebase.api_key";
|
|
54
|
+
};
|
|
55
|
+
export type SettingKey = (typeof SETTING_KEYS)[keyof typeof SETTING_KEYS];
|
|
56
|
+
//# sourceMappingURL=settings.keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.keys.d.ts","sourceRoot":"","sources":["../../../../modules/settings/constants/settings.keys.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Hf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SETTING_KEYS = void 0;
|
|
4
|
+
exports.SETTING_KEYS = {
|
|
5
|
+
OTP_TTL_SECONDS: 'otp.ttl_seconds',
|
|
6
|
+
OTP_MAX_ATTEMPTS: 'otp.max_attempts',
|
|
7
|
+
OTP_RESEND_COOLDOWN_SECONDS: 'otp.resend_cooldown_seconds',
|
|
8
|
+
OTP_RATE_LIMIT_MAX: 'otp.rate_limit_max',
|
|
9
|
+
OTP_RATE_LIMIT_WINDOW_SECONDS: 'otp.rate_limit_window_seconds',
|
|
10
|
+
OTP_IP_RATE_LIMIT_MAX: 'otp.ip_rate_limit_max',
|
|
11
|
+
OTP_IP_RATE_LIMIT_WINDOW_SECONDS: 'otp.ip_rate_limit_window_seconds',
|
|
12
|
+
OTP_SMS_TEMPLATE: 'otp.sms_template',
|
|
13
|
+
OTP_EMAIL_SUBJECT: 'otp.email_subject',
|
|
14
|
+
OTP_EMAIL_HTML_TEMPLATE: 'otp.email_html_template',
|
|
15
|
+
OTP_EMAIL_TEXT_TEMPLATE: 'otp.email_text_template',
|
|
16
|
+
TOKENS_REFRESH_TTL_DAYS: 'tokens.refresh_ttl_days',
|
|
17
|
+
TOKENS_TEMPORARY_TTL_SECONDS: 'tokens.temporary_ttl_seconds',
|
|
18
|
+
TOKENS_ACCESS_EXPIRES_IN: 'tokens.access_expires_in',
|
|
19
|
+
TOKENS_INVITE_TTL_DAYS: 'tokens.invite_ttl_days',
|
|
20
|
+
TOKENS_PASSWORD_RESET_TTL_SECONDS: 'tokens.password_reset_ttl_seconds',
|
|
21
|
+
TEST_OTP_IDENTIFIERS: 'test.otp_identifiers',
|
|
22
|
+
AUTH_PROVIDER: 'auth.provider',
|
|
23
|
+
AUTH_METHOD: 'auth.method',
|
|
24
|
+
AUTH_DEFAULT_ROLE_SLUG: 'auth.default_role_slug',
|
|
25
|
+
LOGIN_IP_RATE_LIMIT_MAX: 'login.ip_rate_limit_max',
|
|
26
|
+
LOGIN_IP_RATE_LIMIT_WINDOW_SECONDS: 'login.ip_rate_limit_window_seconds',
|
|
27
|
+
LOGIN_LOCKOUT_MAX_ATTEMPTS: 'login.lockout_max_attempts',
|
|
28
|
+
LOGIN_LOCKOUT_DURATION_SECONDS: 'login.lockout_duration_seconds',
|
|
29
|
+
HEALTH_MAX_HEAP_MB: 'health.max_heap_mb',
|
|
30
|
+
HEALTH_MAX_RSS_MB: 'health.max_rss_mb',
|
|
31
|
+
HEALTH_QUEUE_DEPTH_THRESHOLD: 'health.queue_depth_threshold',
|
|
32
|
+
SMS_ACTIVE_PROVIDER: 'sms.active_provider',
|
|
33
|
+
SMS_TWILIO_FROM_NUMBER: 'sms.twilio_from_number',
|
|
34
|
+
SMS_TWILIO_ACCOUNT_SID: 'sms.twilio_account_sid',
|
|
35
|
+
SMS_TWILIO_AUTH_TOKEN: 'sms.twilio_auth_token',
|
|
36
|
+
SMS_TERMII_API_KEY: 'sms.termii_api_key',
|
|
37
|
+
SMS_TERMII_SENDER_ID: 'sms.termii_sender_id',
|
|
38
|
+
SMS_INFOBIP_API_KEY: 'sms.infobip_api_key',
|
|
39
|
+
SMS_INFOBIP_SENDER_ID: 'sms.infobip_sender_id',
|
|
40
|
+
SMS_INFOBIP_BASE_URL: 'sms.infobip_base_url',
|
|
41
|
+
SMS_SMARTSMS_TOKEN: 'sms.smartsms_token',
|
|
42
|
+
SMS_SMARTSMS_SENDER_ID: 'sms.smartsms_sender_id',
|
|
43
|
+
EMAIL_ACTIVE_PROVIDER: 'email.active_provider',
|
|
44
|
+
EMAIL_FROM_ADDRESS: 'email.from_address',
|
|
45
|
+
EMAIL_RESEND_API_KEY: 'email.resend_api_key',
|
|
46
|
+
EMAIL_SENDGRID_API_KEY: 'email.sendgrid_api_key',
|
|
47
|
+
EMAIL_MAILGUN_API_KEY: 'email.mailgun_api_key',
|
|
48
|
+
EMAIL_MAILGUN_DOMAIN: 'email.mailgun_domain',
|
|
49
|
+
EMAIL_SMTP_HOST: 'email.smtp_host',
|
|
50
|
+
EMAIL_SMTP_PORT: 'email.smtp_port',
|
|
51
|
+
EMAIL_SMTP_USER: 'email.smtp_user',
|
|
52
|
+
EMAIL_SMTP_PASS: 'email.smtp_pass',
|
|
53
|
+
FIREBASE_PROJECT_ID: 'firebase.project_id',
|
|
54
|
+
FIREBASE_CLIENT_EMAIL: 'firebase.client_email',
|
|
55
|
+
FIREBASE_PRIVATE_KEY: 'firebase.private_key',
|
|
56
|
+
FIREBASE_API_KEY: 'firebase.api_key',
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=settings.keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.keys.js","sourceRoot":"","sources":["../../../../modules/settings/constants/settings.keys.ts"],"names":[],"mappings":";;;AAKa,QAAA,YAAY,GAAG;IAG3B,eAAe,EAAE,iBAAiB;IAElC,gBAAgB,EAAE,kBAAkB;IAEpC,2BAA2B,EAAE,6BAA6B;IAE1D,kBAAkB,EAAE,oBAAoB;IAExC,6BAA6B,EAAE,+BAA+B;IAE9D,qBAAqB,EAAE,uBAAuB;IAE9C,gCAAgC,EAAE,kCAAkC;IAEpE,gBAAgB,EAAE,kBAAkB;IAEpC,iBAAiB,EAAE,mBAAmB;IAEtC,uBAAuB,EAAE,yBAAyB;IAElD,uBAAuB,EAAE,yBAAyB;IAIlD,uBAAuB,EAAE,yBAAyB;IAElD,4BAA4B,EAAE,8BAA8B;IAE5D,wBAAwB,EAAE,0BAA0B;IAEpD,sBAAsB,EAAE,wBAAwB;IAEhD,iCAAiC,EAAE,mCAAmC;IAQtE,oBAAoB,EAAE,sBAAsB;IAI5C,aAAa,EAAE,eAAe;IAE9B,WAAW,EAAE,aAAa;IAE1B,sBAAsB,EAAE,wBAAwB;IAIhD,uBAAuB,EAAE,yBAAyB;IAElD,kCAAkC,EAAE,oCAAoC;IAExE,0BAA0B,EAAE,4BAA4B;IAExD,8BAA8B,EAAE,gCAAgC;IAIhE,kBAAkB,EAAE,oBAAoB;IAExC,iBAAiB,EAAE,mBAAmB;IAEtC,4BAA4B,EAAE,8BAA8B;IAI5D,mBAAmB,EAAE,qBAAqB;IAE1C,sBAAsB,EAAE,wBAAwB;IAEhD,sBAAsB,EAAE,wBAAwB;IAEhD,qBAAqB,EAAE,uBAAuB;IAE9C,kBAAkB,EAAE,oBAAoB;IAExC,oBAAoB,EAAE,sBAAsB;IAE5C,mBAAmB,EAAE,qBAAqB;IAE1C,qBAAqB,EAAE,uBAAuB;IAE9C,oBAAoB,EAAE,sBAAsB;IAE5C,kBAAkB,EAAE,oBAAoB;IAExC,sBAAsB,EAAE,wBAAwB;IAIhD,qBAAqB,EAAE,uBAAuB;IAE9C,kBAAkB,EAAE,oBAAoB;IAExC,oBAAoB,EAAE,sBAAsB;IAE5C,sBAAsB,EAAE,wBAAwB;IAEhD,qBAAqB,EAAE,uBAAuB;IAE9C,oBAAoB,EAAE,sBAAsB;IAE5C,eAAe,EAAE,iBAAiB;IAElC,eAAe,EAAE,iBAAiB;IAElC,eAAe,EAAE,iBAAiB;IAElC,eAAe,EAAE,iBAAiB;IAIlC,mBAAmB,EAAE,qBAAqB;IAE1C,qBAAqB,EAAE,uBAAuB;IAE9C,oBAAoB,EAAE,sBAAsB;IAE5C,gBAAgB,EAAE,kBAAkB;CAC3B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SettingsService } from '../services/settings.service';
|
|
2
|
+
import { UpdateSettingDto } from '../dto/settings.dto';
|
|
3
|
+
export declare class SettingsController {
|
|
4
|
+
private readonly settingsService;
|
|
5
|
+
constructor(settingsService: SettingsService);
|
|
6
|
+
findAll(): Promise<import("..").AppSetting[]>;
|
|
7
|
+
update(key: string, dto: UpdateSettingDto, userId: string): Promise<{
|
|
8
|
+
key: string;
|
|
9
|
+
value: string;
|
|
10
|
+
message: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=settings.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.controller.d.ts","sourceRoot":"","sources":["../../../../modules/settings/controllers/settings.controller.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,qBAIa,kBAAkB;IAClB,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,eAAe;IAe7D,OAAO;IA6BD,MAAM,CACG,GAAG,EAAE,MAAM,EACjB,GAAG,EAAE,gBAAgB,EACV,MAAM,EAAE,MAAM;;;;;CAkBlC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SettingsController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const auth_guard_1 = require("../../../common/guards/auth.guard");
|
|
19
|
+
const permissions_guard_1 = require("../../../common/guards/permissions.guard");
|
|
20
|
+
const decorators_1 = require("../../../common/decorators");
|
|
21
|
+
const settings_service_1 = require("../services/settings.service");
|
|
22
|
+
const settings_dto_1 = require("../dto/settings.dto");
|
|
23
|
+
const settings_manifest_1 = require("../settings.manifest");
|
|
24
|
+
let SettingsController = class SettingsController {
|
|
25
|
+
constructor(settingsService) {
|
|
26
|
+
this.settingsService = settingsService;
|
|
27
|
+
}
|
|
28
|
+
findAll() {
|
|
29
|
+
return this.settingsService.findAll();
|
|
30
|
+
}
|
|
31
|
+
async update(key, dto, userId) {
|
|
32
|
+
const setting = await this.settingsService.findOne(key);
|
|
33
|
+
if (!setting) {
|
|
34
|
+
throw new common_1.NotFoundException(`Setting "${key}" does not exist.`);
|
|
35
|
+
}
|
|
36
|
+
if (!setting.isEditable) {
|
|
37
|
+
throw new common_1.ForbiddenException(`Setting "${key}" is read-only and cannot be changed via the API.`);
|
|
38
|
+
}
|
|
39
|
+
await this.settingsService.set(key, dto.value, userId);
|
|
40
|
+
return { key, value: dto.value, message: 'Setting updated successfully.' };
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.SettingsController = SettingsController;
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, common_1.Get)(),
|
|
46
|
+
(0, decorators_1.RequirePermission)(settings_manifest_1.SETTINGS_PERMISSIONS.READ),
|
|
47
|
+
(0, swagger_1.ApiOperation)({
|
|
48
|
+
summary: 'List all application settings',
|
|
49
|
+
description: 'Returns every row in the app_settings table ordered by group then key. ' +
|
|
50
|
+
'Values for credentials are stored here and editable by an authorised admin.',
|
|
51
|
+
}),
|
|
52
|
+
(0, swagger_1.ApiOkResponse)({ description: 'Array of all app_settings rows.' }),
|
|
53
|
+
__metadata("design:type", Function),
|
|
54
|
+
__metadata("design:paramtypes", []),
|
|
55
|
+
__metadata("design:returntype", void 0)
|
|
56
|
+
], SettingsController.prototype, "findAll", null);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, common_1.Patch)(':key'),
|
|
59
|
+
(0, decorators_1.RequirePermission)(settings_manifest_1.SETTINGS_PERMISSIONS.WRITE),
|
|
60
|
+
(0, swagger_1.ApiForbiddenResponse)({
|
|
61
|
+
description: 'Setting is read-only and cannot be changed via the API.',
|
|
62
|
+
}),
|
|
63
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
64
|
+
(0, swagger_1.ApiOperation)({
|
|
65
|
+
summary: 'Update a setting value',
|
|
66
|
+
description: 'Persists the new value to the database and updates the in-memory cache ' +
|
|
67
|
+
'immediately — no restart needed. Firebase credentials are re-initialised ' +
|
|
68
|
+
'automatically when any firebase.* key is changed.',
|
|
69
|
+
}),
|
|
70
|
+
(0, swagger_1.ApiParam)({
|
|
71
|
+
name: 'key',
|
|
72
|
+
example: 'sms.active_provider',
|
|
73
|
+
description: 'The setting key to update.',
|
|
74
|
+
}),
|
|
75
|
+
(0, swagger_1.ApiOkResponse)({ description: 'Setting updated successfully.' }),
|
|
76
|
+
(0, swagger_1.ApiNotFoundResponse)({ description: 'Setting key does not exist.' }),
|
|
77
|
+
__param(0, (0, common_1.Param)('key')),
|
|
78
|
+
__param(1, (0, common_1.Body)()),
|
|
79
|
+
__param(2, (0, decorators_1.CurrentUser)('id')),
|
|
80
|
+
__metadata("design:type", Function),
|
|
81
|
+
__metadata("design:paramtypes", [String, settings_dto_1.UpdateSettingDto, String]),
|
|
82
|
+
__metadata("design:returntype", Promise)
|
|
83
|
+
], SettingsController.prototype, "update", null);
|
|
84
|
+
exports.SettingsController = SettingsController = __decorate([
|
|
85
|
+
(0, swagger_1.ApiTags)('Settings'),
|
|
86
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
87
|
+
(0, common_1.Controller)('settings'),
|
|
88
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard, permissions_guard_1.PermissionsGuard),
|
|
89
|
+
__metadata("design:paramtypes", [settings_service_1.SettingsService])
|
|
90
|
+
], SettingsController);
|
|
91
|
+
//# sourceMappingURL=settings.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.controller.js","sourceRoot":"","sources":["../../../../modules/settings/controllers/settings.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,6CAQyB;AACzB,kEAAiE;AACjE,gFAA4E;AAC5E,2DAA4E;AAC5E,mEAA+D;AAC/D,sDAAuD;AACvD,4DAA4D;AAMrD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAejE,OAAO;QACN,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;IACvC,CAAC;IA2BK,AAAN,KAAK,CAAC,MAAM,CACG,GAAW,EACjB,GAAqB,EACV,MAAc;QAEjC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAExD,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,MAAM,IAAI,0BAAiB,CAAC,YAAY,GAAG,mBAAmB,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YACzB,MAAM,IAAI,2BAAkB,CAC3B,YAAY,GAAG,mDAAmD,CAClE,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAEvD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;IAC5E,CAAC;CACD,CAAA;AAlEY,gDAAkB;AAgB9B;IATC,IAAA,YAAG,GAAE;IACL,IAAA,8BAAiB,EAAC,wCAAoB,CAAC,IAAI,CAAC;IAC5C,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,+BAA+B;QACxC,WAAW,EACV,yEAAyE;YACzE,6EAA6E;KAC9E,CAAC;IACD,IAAA,uBAAa,EAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;;;;iDAGjE;AA2BK;IApBL,IAAA,cAAK,EAAC,MAAM,CAAC;IACb,IAAA,8BAAiB,EAAC,wCAAoB,CAAC,KAAK,CAAC;IAC7C,IAAA,8BAAoB,EAAC;QACrB,WAAW,EAAE,yDAAyD;KACtE,CAAC;IACD,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,wBAAwB;QACjC,WAAW,EACV,yEAAyE;YACzE,2EAA2E;YAC3E,mDAAmD;KACpD,CAAC;IACD,IAAA,kBAAQ,EAAC;QACT,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,qBAAqB;QAC9B,WAAW,EAAE,4BAA4B;KACzC,CAAC;IACD,IAAA,uBAAa,EAAC,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IAC/D,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAElE,WAAA,IAAA,cAAK,EAAC,KAAK,CAAC,CAAA;IACZ,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,wBAAW,EAAC,IAAI,CAAC,CAAA;;6CADL,+BAAgB;;gDAkB7B;6BAjEW,kBAAkB;IAJ9B,IAAA,iBAAO,EAAC,UAAU,CAAC;IACnB,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,UAAU,CAAC;IACtB,IAAA,kBAAS,EAAC,yBAAY,EAAE,oCAAgB,CAAC;qCAEK,kCAAe;GADjD,kBAAkB,CAkE9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.dto.d.ts","sourceRoot":"","sources":["../../../../modules/settings/dto/settings.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,gBAAgB;IAI5B,KAAK,EAAG,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.UpdateSettingDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
class UpdateSettingDto {
|
|
16
|
+
}
|
|
17
|
+
exports.UpdateSettingDto = UpdateSettingDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({ example: 'twilio', description: 'New value for the setting.' }),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], UpdateSettingDto.prototype, "value", void 0);
|
|
24
|
+
//# sourceMappingURL=settings.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.dto.js","sourceRoot":"","sources":["../../../../modules/settings/dto/settings.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AACvD,6CAA8C;AAE9C,MAAa,gBAAgB;CAK5B;AALD,4CAKC;AADA;IAHC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IAC7E,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SettingType = 'integer' | 'string' | 'boolean' | 'json';
|
|
2
|
+
export declare class AppSetting {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
type: SettingType;
|
|
6
|
+
group: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
isEditable: boolean;
|
|
9
|
+
updatedById?: string;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=app-setting.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-setting.entity.d.ts","sourceRoot":"","sources":["../../../../modules/settings/entities/app-setting.entity.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpE,qBACa,UAAU;IAEtB,GAAG,EAAG,MAAM,CAAC;IAGb,KAAK,EAAG,MAAM,CAAC;IAIf,IAAI,EAAG,WAAW,CAAC;IAInB,KAAK,EAAG,MAAM,CAAC;IAGf,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,UAAU,EAAG,OAAO,CAAC;IAIrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.AppSetting = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let AppSetting = class AppSetting {
|
|
15
|
+
};
|
|
16
|
+
exports.AppSetting = AppSetting;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryColumn)({ name: 'key', type: 'varchar', length: 100 }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], AppSetting.prototype, "key", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ name: 'value', type: 'text' }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], AppSetting.prototype, "value", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ name: 'type', type: 'varchar', length: 20, default: 'string' }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AppSetting.prototype, "type", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ name: 'group', type: 'varchar', length: 50 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], AppSetting.prototype, "group", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ name: 'description', type: 'text', nullable: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], AppSetting.prototype, "description", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ name: 'is_editable', default: true }),
|
|
39
|
+
__metadata("design:type", Boolean)
|
|
40
|
+
], AppSetting.prototype, "isEditable", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'updated_by_id', type: 'uuid', nullable: true }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], AppSetting.prototype, "updatedById", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamptz' }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], AppSetting.prototype, "createdAt", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'timestamptz' }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], AppSetting.prototype, "updatedAt", void 0);
|
|
53
|
+
exports.AppSetting = AppSetting = __decorate([
|
|
54
|
+
(0, typeorm_1.Entity)('app_settings')
|
|
55
|
+
], AppSetting);
|
|
56
|
+
//# sourceMappingURL=app-setting.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-setting.entity.js","sourceRoot":"","sources":["../../../../modules/settings/entities/app-setting.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4F;AAKrF,IAAM,UAAU,GAAhB,MAAM,UAAU;CA+BtB,CAAA;AA/BY,gCAAU;AAEtB;IADC,IAAA,uBAAa,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;uCAChD;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACzB;AAIf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;wCACtD;AAInB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;yCACxC;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACzC;AAIrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;8CAC1B;AAIrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC3C;AAGrB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAClD,IAAI;6CAAC;AAGjB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAClD,IAAI;6CAAC;qBA9BL,UAAU;IADtB,IAAA,gBAAM,EAAC,cAAc,CAAC;GACV,UAAU,CA+BtB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './entities/app-setting.entity';
|
|
2
|
+
export * from './constants/settings.defaults';
|
|
3
|
+
export * from './constants/settings.keys';
|
|
4
|
+
export * from './services/settings.service';
|
|
5
|
+
export * from './settings.module';
|
|
6
|
+
export * from './settings.manifest';
|
|
7
|
+
export * from './dto/settings.dto';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/settings/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./entities/app-setting.entity"), exports);
|
|
18
|
+
__exportStar(require("./constants/settings.defaults"), exports);
|
|
19
|
+
__exportStar(require("./constants/settings.keys"), exports);
|
|
20
|
+
__exportStar(require("./services/settings.service"), exports);
|
|
21
|
+
__exportStar(require("./settings.module"), exports);
|
|
22
|
+
__exportStar(require("./settings.manifest"), exports);
|
|
23
|
+
__exportStar(require("./dto/settings.dto"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../modules/settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,gEAA8C;AAC9C,4DAA0C;AAC1C,8DAA4C;AAC5C,oDAAkC;AAClC,sDAAoC;AACpC,qDAAmC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { Repository } from 'typeorm';
|
|
3
|
+
import { AppSetting } from '../entities/app-setting.entity';
|
|
4
|
+
type ChangeHook = (key: string, value: unknown) => void;
|
|
5
|
+
export declare class SettingsService implements OnModuleInit {
|
|
6
|
+
private readonly repo;
|
|
7
|
+
private readonly logger;
|
|
8
|
+
private readonly valueCache;
|
|
9
|
+
private readonly typeCache;
|
|
10
|
+
private readonly changeHooks;
|
|
11
|
+
constructor(repo: Repository<AppSetting>);
|
|
12
|
+
onModuleInit(): Promise<void>;
|
|
13
|
+
get<T>(key: string, defaultValue?: T): T;
|
|
14
|
+
set(key: string, value: unknown, updatedById?: string): Promise<void>;
|
|
15
|
+
registerChangeHook(prefix: string, hook: ChangeHook): void;
|
|
16
|
+
reload(): Promise<void>;
|
|
17
|
+
findAll(): Promise<AppSetting[]>;
|
|
18
|
+
findOne(key: string): Promise<AppSetting | null>;
|
|
19
|
+
private loadAll;
|
|
20
|
+
private fireHooks;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=settings.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.service.d.ts","sourceRoot":"","sources":["../../../../modules/settings/services/settings.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAe,MAAM,gCAAgC,CAAC;AAGzE,KAAK,UAAU,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAExD,qBACa,eAAgB,YAAW,YAAY;IAgBlD,OAAO,CAAC,QAAQ,CAAC,IAAI;IAftB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAG3D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6B;IAExD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkC;IAM5D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmD;gBAI7D,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC;IAGxC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBnC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC;IA4ClC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB3E,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI;IAUpD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAMvB,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAKhC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;YAMxC,OAAO;IAgBrB,OAAO,CAAC,SAAS;CAWjB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var SettingsService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SettingsService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
const app_setting_entity_1 = require("../entities/app-setting.entity");
|
|
21
|
+
const settings_defaults_1 = require("../constants/settings.defaults");
|
|
22
|
+
let SettingsService = SettingsService_1 = class SettingsService {
|
|
23
|
+
constructor(repo) {
|
|
24
|
+
this.repo = repo;
|
|
25
|
+
this.logger = new common_1.Logger(SettingsService_1.name);
|
|
26
|
+
this.valueCache = new Map();
|
|
27
|
+
this.typeCache = new Map();
|
|
28
|
+
this.changeHooks = [];
|
|
29
|
+
}
|
|
30
|
+
async onModuleInit() {
|
|
31
|
+
await this.loadAll();
|
|
32
|
+
}
|
|
33
|
+
get(key, defaultValue) {
|
|
34
|
+
const raw = this.valueCache.get(key);
|
|
35
|
+
if (raw !== undefined) {
|
|
36
|
+
const type = this.typeCache.get(key) ?? 'string';
|
|
37
|
+
try {
|
|
38
|
+
switch (type) {
|
|
39
|
+
case 'integer':
|
|
40
|
+
return parseInt(raw, 10);
|
|
41
|
+
case 'boolean':
|
|
42
|
+
return (raw === 'true');
|
|
43
|
+
case 'json':
|
|
44
|
+
return JSON.parse(raw);
|
|
45
|
+
default:
|
|
46
|
+
return raw;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
this.logger.warn(`Failed to parse setting "${key}" (type=${type}, value=${raw}). Falling back to built-in default.`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const builtIn = settings_defaults_1.SETTING_DEFAULTS[key];
|
|
54
|
+
if (builtIn !== undefined)
|
|
55
|
+
return builtIn;
|
|
56
|
+
if (defaultValue !== undefined)
|
|
57
|
+
return defaultValue;
|
|
58
|
+
this.logger.warn(`Setting "${key}" has no DB value, no built-in default, and no caller fallback. Returning undefined.`);
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
async set(key, value, updatedById) {
|
|
62
|
+
const raw = typeof value === 'object' ? JSON.stringify(value) : String(value);
|
|
63
|
+
const result = await this.repo.update({ key }, { value: raw, updatedById });
|
|
64
|
+
if (!result.affected) {
|
|
65
|
+
throw new Error(`Setting key "${key}" does not exist.`);
|
|
66
|
+
}
|
|
67
|
+
this.valueCache.set(key, raw);
|
|
68
|
+
this.logger.log(`Setting "${key}" updated${updatedById ? ` by ${updatedById}` : ''}`);
|
|
69
|
+
this.fireHooks(key, value);
|
|
70
|
+
}
|
|
71
|
+
registerChangeHook(prefix, hook) {
|
|
72
|
+
this.changeHooks.push({ prefix, hook });
|
|
73
|
+
}
|
|
74
|
+
async reload() {
|
|
75
|
+
await this.loadAll();
|
|
76
|
+
this.logger.log('Settings cache reloaded');
|
|
77
|
+
}
|
|
78
|
+
async findAll() {
|
|
79
|
+
return this.repo.find({ order: { group: 'ASC', key: 'ASC' } });
|
|
80
|
+
}
|
|
81
|
+
async findOne(key) {
|
|
82
|
+
return this.repo.findOne({ where: { key } });
|
|
83
|
+
}
|
|
84
|
+
async loadAll() {
|
|
85
|
+
try {
|
|
86
|
+
const rows = await this.repo.find();
|
|
87
|
+
for (const row of rows) {
|
|
88
|
+
this.valueCache.set(row.key, row.value);
|
|
89
|
+
this.typeCache.set(row.key, row.type);
|
|
90
|
+
}
|
|
91
|
+
this.logger.log(`Loaded ${rows.length} settings from database`);
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
this.logger.warn(`Failed to load settings from database: ${String(err)}. All values will use built-in defaults.`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
fireHooks(key, value) {
|
|
98
|
+
for (const { prefix, hook } of this.changeHooks) {
|
|
99
|
+
if (key.startsWith(prefix)) {
|
|
100
|
+
try {
|
|
101
|
+
hook(key, value);
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
this.logger.error(`Change hook for prefix "${prefix}" threw: ${String(err)}`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
exports.SettingsService = SettingsService;
|
|
111
|
+
exports.SettingsService = SettingsService = SettingsService_1 = __decorate([
|
|
112
|
+
(0, common_1.Injectable)(),
|
|
113
|
+
__param(0, (0, typeorm_1.InjectRepository)(app_setting_entity_1.AppSetting)),
|
|
114
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
115
|
+
], SettingsService);
|
|
116
|
+
//# sourceMappingURL=settings.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.service.js","sourceRoot":"","sources":["../../../../modules/settings/services/settings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAkE;AAClE,6CAAmD;AACnD,qCAAqC;AACrC,uEAAyE;AACzE,sEAAkE;AAK3D,IAAM,eAAe,uBAArB,MAAM,eAAe;IAc3B,YAEC,IAA6C;QAA5B,SAAI,GAAJ,IAAI,CAAwB;QAf7B,WAAM,GAAG,IAAI,eAAM,CAAC,iBAAe,CAAC,IAAI,CAAC,CAAC;QAG1C,eAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;QAEvC,cAAS,GAAG,IAAI,GAAG,EAAuB,CAAC;QAM3C,gBAAW,GAAgD,EAAE,CAAC;IAK5E,CAAC;IAEJ,KAAK,CAAC,YAAY;QACjB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IAiBD,GAAG,CAAI,GAAW,EAAE,YAAgB;QAEnC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC;YACjD,IAAI,CAAC;gBACJ,QAAQ,IAAI,EAAE,CAAC;oBACd,KAAK,SAAS;wBACb,OAAO,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAiB,CAAC;oBAC1C,KAAK,SAAS;wBACb,OAAO,CAAC,GAAG,KAAK,MAAM,CAAiB,CAAC;oBACzC,KAAK,MAAM;wBACV,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAM,CAAC;oBAC7B;wBACC,OAAO,GAAmB,CAAC;gBAC7B,CAAC;YACF,CAAC;YAAC,MAAM,CAAC;gBACR,IAAI,CAAC,MAAM,CAAC,IAAI,CACf,4BAA4B,GAAG,WAAW,IAAI,WAAW,GAAG,sCAAsC,CAClG,CAAC;YACH,CAAC;QACF,CAAC;QAGD,MAAM,OAAO,GAAG,oCAAgB,CAAC,GAAoC,CAAC,CAAC;QACvE,IAAI,OAAO,KAAK,SAAS;YAAE,OAAO,OAAuB,CAAC;QAG1D,IAAI,YAAY,KAAK,SAAS;YAAE,OAAO,YAAY,CAAC;QAEpD,IAAI,CAAC,MAAM,CAAC,IAAI,CACf,YAAY,GAAG,sFAAsF,CACrG,CAAC;QACF,OAAO,SAAyB,CAAC;IAClC,CAAC;IAUD,KAAK,CAAC,GAAG,CAAC,GAAW,EAAE,KAAc,EAAE,WAAoB;QAC1D,MAAM,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAE9E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC;QAE5E,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;QACzD,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,GAAG,YAAY,WAAW,CAAC,CAAC,CAAC,OAAO,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAEtF,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAWD,kBAAkB,CAAC,MAAc,EAAE,IAAgB;QAClD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;IAQD,KAAK,CAAC,MAAM;QACX,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAGD,KAAK,CAAC,OAAO;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAChE,CAAC;IAGD,KAAK,CAAC,OAAO,CAAC,GAAW;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;IAIO,KAAK,CAAC,OAAO;QACpB,IAAI,CAAC;YACJ,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACpC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBACxB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;gBACxC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;YACvC,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,MAAM,yBAAyB,CAAC,CAAC;QACjE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YAEd,IAAI,CAAC,MAAM,CAAC,IAAI,CACf,0CAA0C,MAAM,CAAC,GAAG,CAAC,0CAA0C,CAC/F,CAAC;QACH,CAAC;IACF,CAAC;IAEO,SAAS,CAAC,GAAW,EAAE,KAAc;QAC5C,KAAK,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACjD,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC;oBACJ,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBAClB,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,MAAM,YAAY,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC/E,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;CACD,CAAA;AAhKY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAgBV,WAAA,IAAA,0BAAgB,EAAC,+BAAU,CAAC,CAAA;qCACN,oBAAU;GAhBtB,eAAe,CAgK3B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ModuleManifest } from '../roles/types/manifest.types';
|
|
2
|
+
export declare const SETTINGS_PERMISSIONS: {
|
|
3
|
+
readonly READ: "settings:read";
|
|
4
|
+
readonly WRITE: "settings:write";
|
|
5
|
+
};
|
|
6
|
+
export declare const manifest: ModuleManifest;
|
|
7
|
+
//# sourceMappingURL=settings.manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.manifest.d.ts","sourceRoot":"","sources":["../../../modules/settings/settings.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,eAAO,MAAM,QAAQ,EAAE,cAgBtB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.manifest = exports.SETTINGS_PERMISSIONS = void 0;
|
|
4
|
+
exports.SETTINGS_PERMISSIONS = {
|
|
5
|
+
READ: 'settings:read',
|
|
6
|
+
WRITE: 'settings:write',
|
|
7
|
+
};
|
|
8
|
+
exports.manifest = {
|
|
9
|
+
slug: 'settings',
|
|
10
|
+
name: 'Application Settings',
|
|
11
|
+
description: 'Read and update runtime application configuration stored in the database',
|
|
12
|
+
permissions: [
|
|
13
|
+
{
|
|
14
|
+
slug: exports.SETTINGS_PERMISSIONS.READ,
|
|
15
|
+
name: 'View settings',
|
|
16
|
+
description: 'List all application settings and their current values',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
slug: exports.SETTINGS_PERMISSIONS.WRITE,
|
|
20
|
+
name: 'Update settings',
|
|
21
|
+
description: 'Change the value of any editable application setting',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=settings.manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.manifest.js","sourceRoot":"","sources":["../../../modules/settings/settings.manifest.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAG;IACnC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,gBAAgB;CACd,CAAC;AAEE,QAAA,QAAQ,GAAmB;IACvC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,0EAA0E;IACvF,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,4BAAoB,CAAC,IAAI;YAC/B,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,wDAAwD;SACrE;QACD;YACC,IAAI,EAAE,4BAAoB,CAAC,KAAK;YAChC,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,sDAAsD;SACnE;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.module.d.ts","sourceRoot":"","sources":["../../../modules/settings/settings.module.ts"],"names":[],"mappings":"AAMA,qBAOa,cAAc;CAAG"}
|