@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,11 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { AdminLog } from '../entities/admin-log.entity';
|
|
3
|
+
import { AdminLogFilterDto, CreateAdminLogDto } from '../dto/admin-log.dto';
|
|
4
|
+
import { PaginatedResult } from '../../../common/base/base.repository';
|
|
5
|
+
export declare class AdminLogService {
|
|
6
|
+
private readonly repo;
|
|
7
|
+
constructor(repo: Repository<AdminLog>);
|
|
8
|
+
log(dto: CreateAdminLogDto): void;
|
|
9
|
+
findAll(filter: AdminLogFilterDto): Promise<PaginatedResult<AdminLog>>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=admin-log.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-log.service.d.ts","sourceRoot":"","sources":["../../../../modules/admin/services/admin-log.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,qBACa,eAAe;IAG1B,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;IAI5C,GAAG,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;IAI3B,OAAO,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;CAiC5E"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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.AdminLogService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const admin_log_entity_1 = require("../entities/admin-log.entity");
|
|
20
|
+
let AdminLogService = class AdminLogService {
|
|
21
|
+
constructor(repo) {
|
|
22
|
+
this.repo = repo;
|
|
23
|
+
}
|
|
24
|
+
log(dto) {
|
|
25
|
+
this.repo.save(this.repo.create(dto)).catch(() => undefined);
|
|
26
|
+
}
|
|
27
|
+
async findAll(filter) {
|
|
28
|
+
const page = filter.page ?? 1;
|
|
29
|
+
const limit = filter.limit ?? 20;
|
|
30
|
+
const skip = (page - 1) * limit;
|
|
31
|
+
const qb = this.repo
|
|
32
|
+
.createQueryBuilder('log')
|
|
33
|
+
.leftJoin('log.actor', 'actor')
|
|
34
|
+
.addSelect(['actor.id', 'actor.firstName', 'actor.lastName'])
|
|
35
|
+
.skip(skip)
|
|
36
|
+
.take(limit)
|
|
37
|
+
.orderBy('log.createdAt', 'DESC');
|
|
38
|
+
if (filter.actorId) {
|
|
39
|
+
qb.andWhere('log.actorId = :actorId', { actorId: filter.actorId });
|
|
40
|
+
}
|
|
41
|
+
if (filter.action) {
|
|
42
|
+
qb.andWhere('log.action LIKE :action', { action: `%${filter.action}%` });
|
|
43
|
+
}
|
|
44
|
+
if (filter.from) {
|
|
45
|
+
qb.andWhere('log.createdAt >= :from', { from: new Date(filter.from) });
|
|
46
|
+
}
|
|
47
|
+
if (filter.to) {
|
|
48
|
+
qb.andWhere('log.createdAt <= :to', { to: new Date(filter.to) });
|
|
49
|
+
}
|
|
50
|
+
const [data, total] = await qb.getManyAndCount();
|
|
51
|
+
return { data, total, page, limit, totalPages: Math.ceil(total / limit) };
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.AdminLogService = AdminLogService;
|
|
55
|
+
exports.AdminLogService = AdminLogService = __decorate([
|
|
56
|
+
(0, common_1.Injectable)(),
|
|
57
|
+
__param(0, (0, typeorm_1.InjectRepository)(admin_log_entity_1.AdminLog)),
|
|
58
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
59
|
+
], AdminLogService);
|
|
60
|
+
//# sourceMappingURL=admin-log.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-log.service.js","sourceRoot":"","sources":["../../../../modules/admin/services/admin-log.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AACrC,mEAAwD;AAKjD,IAAM,eAAe,GAArB,MAAM,eAAe;IAC3B,YAEkB,IAA0B;QAA1B,SAAI,GAAJ,IAAI,CAAsB;IACzC,CAAC;IAGJ,GAAG,CAAC,GAAsB;QACzB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAyB;QACtC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;QAC9B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;QAEhC,MAAM,EAAE,G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,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,0BAAgB,EAAC,2BAAQ,CAAC,CAAA;qCACJ,oBAAU;GAHtB,eAAe,CA4C3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-core.module.d.ts","sourceRoot":"","sources":["../../../../modules/auth/auth-core/auth-core.module.ts"],"names":[],"mappings":"AAOA,qBAmBa,cAAc;CAAG"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AuthCoreModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const jwt_1 = require("@nestjs/jwt");
|
|
12
|
+
const passport_1 = require("@nestjs/passport");
|
|
13
|
+
const config_1 = require("@nestjs/config");
|
|
14
|
+
const jwt_strategy_1 = require("./strategies/jwt.strategy");
|
|
15
|
+
const users_module_1 = require("../../users/users.module");
|
|
16
|
+
let AuthCoreModule = class AuthCoreModule {
|
|
17
|
+
};
|
|
18
|
+
exports.AuthCoreModule = AuthCoreModule;
|
|
19
|
+
exports.AuthCoreModule = AuthCoreModule = __decorate([
|
|
20
|
+
(0, common_1.Module)({
|
|
21
|
+
imports: [
|
|
22
|
+
config_1.ConfigModule,
|
|
23
|
+
users_module_1.UsersModule,
|
|
24
|
+
passport_1.PassportModule.register({ defaultStrategy: 'jwt' }),
|
|
25
|
+
jwt_1.JwtModule.registerAsync({
|
|
26
|
+
imports: [config_1.ConfigModule],
|
|
27
|
+
useFactory: (configService) => ({
|
|
28
|
+
secret: configService.get('app.jwt.secret', 'change-me-in-production'),
|
|
29
|
+
signOptions: {
|
|
30
|
+
expiresIn: configService.get('app.jwt.expiresIn', '1d'),
|
|
31
|
+
},
|
|
32
|
+
}),
|
|
33
|
+
inject: [config_1.ConfigService],
|
|
34
|
+
}),
|
|
35
|
+
],
|
|
36
|
+
providers: [jwt_strategy_1.JwtStrategy],
|
|
37
|
+
exports: [jwt_1.JwtModule, passport_1.PassportModule],
|
|
38
|
+
})
|
|
39
|
+
], AuthCoreModule);
|
|
40
|
+
//# sourceMappingURL=auth-core.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-core.module.js","sourceRoot":"","sources":["../../../../modules/auth/auth-core/auth-core.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qCAAwC;AACxC,+CAAkD;AAClD,2CAA6D;AAC7D,4DAAwD;AACxD,2DAAuD;AAqBhD,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAnB1B,IAAA,eAAM,EAAC;QACP,OAAO,EAAE;YACR,qBAAY;YACZ,0BAAW;YACX,yBAAc,CAAC,QAAQ,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;YACnD,eAAS,CAAC,aAAa,CAAC;gBACvB,OAAO,EAAE,CAAC,qBAAY,CAAC;gBACvB,UAAU,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC;oBAC9C,MAAM,EAAE,aAAa,CAAC,GAAG,CAAS,gBAAgB,EAAE,yBAAyB,CAAC;oBAC9E,WAAW,EAAE;wBACZ,SAAS,EAAE,aAAa,CAAC,GAAG,CAAS,mBAAmB,EAAE,IAAI,CAAS;qBACvE;iBACD,CAAC;gBACF,MAAM,EAAE,CAAC,sBAAa,CAAC;aACvB,CAAC;SACF;QACD,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,eAAS,EAAE,yBAAc,CAAC;KACpC,CAAC;GACW,cAAc,CAAG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Strategy } from 'passport-jwt';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import IORedis from 'ioredis';
|
|
4
|
+
import { JwtPayload } from '../../dto/token.dto';
|
|
5
|
+
declare const JwtStrategy_base: new (...args: [opt: import("passport-jwt").StrategyOptionsWithRequest] | [opt: import("passport-jwt").StrategyOptionsWithoutRequest]) => Strategy & {
|
|
6
|
+
validate(...args: any[]): unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare class JwtStrategy extends JwtStrategy_base {
|
|
9
|
+
private readonly configService;
|
|
10
|
+
private readonly redis;
|
|
11
|
+
constructor(configService: ConfigService, redis: IORedis | null);
|
|
12
|
+
validate(payload: JwtPayload): Promise<{
|
|
13
|
+
id: string;
|
|
14
|
+
permissions: string[];
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=jwt.strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt.strategy.d.ts","sourceRoot":"","sources":["../../../../../modules/auth/auth-core/strategies/jwt.strategy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,QAAQ,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;;;AAEjD,qBACa,WAAY,SAAQ,gBAA0B;IAEzD,OAAO,CAAC,QAAQ,CAAC,aAAa;IAG9B,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAHL,aAAa,EAAE,aAAa,EAG5B,KAAK,EAAE,OAAO,GAAG,IAAI;IASjC,QAAQ,CAAC,OAAO,EAAE,UAAU;;;;CASlC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.JwtStrategy = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const passport_1 = require("@nestjs/passport");
|
|
18
|
+
const passport_jwt_1 = require("passport-jwt");
|
|
19
|
+
const config_1 = require("@nestjs/config");
|
|
20
|
+
const redis_module_1 = require("../../../../config/redis.module");
|
|
21
|
+
let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
22
|
+
constructor(configService, redis) {
|
|
23
|
+
super({
|
|
24
|
+
jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
25
|
+
ignoreExpiration: false,
|
|
26
|
+
secretOrKey: configService.get('app.jwt.secret', 'change-me-in-production'),
|
|
27
|
+
});
|
|
28
|
+
this.configService = configService;
|
|
29
|
+
this.redis = redis;
|
|
30
|
+
}
|
|
31
|
+
async validate(payload) {
|
|
32
|
+
const banned = await this.redis?.get(`user:banned:${payload.sub}`);
|
|
33
|
+
if (banned)
|
|
34
|
+
throw new common_1.UnauthorizedException('Account deactivated');
|
|
35
|
+
return { id: payload.sub, permissions: payload.permissions ?? [] };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.JwtStrategy = JwtStrategy;
|
|
39
|
+
exports.JwtStrategy = JwtStrategy = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__param(1, (0, common_1.Optional)()),
|
|
42
|
+
__param(1, (0, common_1.Inject)(redis_module_1.REDIS_CLIENT)),
|
|
43
|
+
__metadata("design:paramtypes", [config_1.ConfigService, Object])
|
|
44
|
+
], JwtStrategy);
|
|
45
|
+
//# sourceMappingURL=jwt.strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../../../../modules/auth/auth-core/strategies/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqF;AACrF,+CAAoD;AACpD,+CAAoD;AACpD,2CAA+C;AAE/C,kEAA+D;AAIxD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,IAAA,2BAAgB,EAAC,uBAAQ,CAAC;IAC1D,YACkB,aAA4B,EAG5B,KAAqB;QAEtC,KAAK,CAAC;YACL,cAAc,EAAE,yBAAU,CAAC,2BAA2B,EAAE;YACxD,gBAAgB,EAAE,KAAK;YACvB,WAAW,EAAE,aAAa,CAAC,GAAG,CAAS,gBAAgB,EAAE,yBAAyB,CAAC;SACnF,CAAC,CAAC;QATc,kBAAa,GAAb,aAAa,CAAe;QAG5B,UAAK,GAAL,KAAK,CAAgB;IAOvC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAmB;QAIjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,eAAe,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACnE,IAAI,MAAM;YAAE,MAAM,IAAI,8BAAqB,CAAC,qBAAqB,CAAC,CAAC;QAEnE,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE,EAAE,CAAC;IACpE,CAAC;CACD,CAAA;AAvBY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;IAIV,WAAA,IAAA,iBAAQ,GAAE,CAAA;IACV,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;qCAFW,sBAAa;GAFlC,WAAW,CAuBvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ModuleManifest } from '../roles/types/manifest.types';
|
|
2
|
+
export declare const AUTH_PERMISSIONS: {
|
|
3
|
+
readonly LOGIN: "auth:login";
|
|
4
|
+
readonly REGISTER: "auth:register";
|
|
5
|
+
readonly LOGOUT: "auth:logout";
|
|
6
|
+
readonly REFRESH: "auth:refresh";
|
|
7
|
+
};
|
|
8
|
+
export declare const manifest: ModuleManifest;
|
|
9
|
+
//# sourceMappingURL=auth.manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.manifest.d.ts","sourceRoot":"","sources":["../../../modules/auth/auth.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX,eAAO,MAAM,QAAQ,EAAE,cAkBtB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.manifest = exports.AUTH_PERMISSIONS = void 0;
|
|
4
|
+
exports.AUTH_PERMISSIONS = {
|
|
5
|
+
LOGIN: 'auth:login',
|
|
6
|
+
REGISTER: 'auth:register',
|
|
7
|
+
LOGOUT: 'auth:logout',
|
|
8
|
+
REFRESH: 'auth:refresh',
|
|
9
|
+
};
|
|
10
|
+
exports.manifest = {
|
|
11
|
+
slug: 'auth',
|
|
12
|
+
name: 'Authentication',
|
|
13
|
+
description: 'Auth and session management',
|
|
14
|
+
permissions: [
|
|
15
|
+
{
|
|
16
|
+
slug: exports.AUTH_PERMISSIONS.LOGIN,
|
|
17
|
+
name: 'Login',
|
|
18
|
+
description: 'Authenticate and receive tokens',
|
|
19
|
+
},
|
|
20
|
+
{ slug: exports.AUTH_PERMISSIONS.REGISTER, name: 'Register', description: 'Create new account' },
|
|
21
|
+
{ slug: exports.AUTH_PERMISSIONS.LOGOUT, name: 'Logout', description: 'End session' },
|
|
22
|
+
{
|
|
23
|
+
slug: exports.AUTH_PERMISSIONS.REFRESH,
|
|
24
|
+
name: 'Refresh token',
|
|
25
|
+
description: 'Refresh access token',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=auth.manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.manifest.js","sourceRoot":"","sources":["../../../modules/auth/auth.manifest.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAG;IAC/B,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,eAAe;IACzB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,cAAc;CACd,CAAC;AAEE,QAAA,QAAQ,GAAmB;IACvC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,wBAAgB,CAAC,KAAK;YAC5B,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,iCAAiC;SAC9C;QACD,EAAE,IAAI,EAAE,wBAAgB,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE;QACxF,EAAE,IAAI,EAAE,wBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE;QAC7E;YACC,IAAI,EAAE,wBAAgB,CAAC,OAAO;YAC9B,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,sBAAsB;SACnC;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.module.d.ts","sourceRoot":"","sources":["../../../modules/auth/auth.module.ts"],"names":[],"mappings":"AAyBA,qBAgCa,UAAU;CAAG"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AuthModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const config_1 = require("@nestjs/config");
|
|
12
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
13
|
+
const auth_core_module_1 = require("./auth-core/auth-core.module");
|
|
14
|
+
const auth_controller_1 = require("./controllers/auth.controller");
|
|
15
|
+
const account_controller_1 = require("./controllers/account.controller");
|
|
16
|
+
const provider_registry_1 = require("./providers/provider.registry");
|
|
17
|
+
const native_auth_provider_module_1 = require("./providers/native/native.auth-provider.module");
|
|
18
|
+
const keycloak_auth_provider_module_1 = require("./providers/keycloak/keycloak-auth-provider.module");
|
|
19
|
+
const native_auth_provider_1 = require("./providers/native/native.auth-provider");
|
|
20
|
+
const keycloak_auth_provider_1 = require("./providers/keycloak/keycloak.auth-provider");
|
|
21
|
+
const otp_module_1 = require("../otp/otp.module");
|
|
22
|
+
const users_module_1 = require("../users/users.module");
|
|
23
|
+
const sessions_module_1 = require("../sessions/sessions.module");
|
|
24
|
+
const otp_auth_service_1 = require("./services/otp-auth.service");
|
|
25
|
+
const login_service_1 = require("./services/login.service");
|
|
26
|
+
const registration_service_1 = require("./services/registration.service");
|
|
27
|
+
const password_service_1 = require("./services/password.service");
|
|
28
|
+
const account_service_1 = require("./services/account.service");
|
|
29
|
+
const password_reset_token_entity_1 = require("./entities/password-reset-token.entity");
|
|
30
|
+
const otp_controller_1 = require("./controllers/otp.controller");
|
|
31
|
+
const settings_service_1 = require("../settings/services/settings.service");
|
|
32
|
+
const jobs_1 = require("../../jobs");
|
|
33
|
+
const roles_module_1 = require("../roles/roles.module");
|
|
34
|
+
let AuthModule = class AuthModule {
|
|
35
|
+
};
|
|
36
|
+
exports.AuthModule = AuthModule;
|
|
37
|
+
exports.AuthModule = AuthModule = __decorate([
|
|
38
|
+
(0, common_1.Module)({
|
|
39
|
+
imports: [
|
|
40
|
+
config_1.ConfigModule,
|
|
41
|
+
auth_core_module_1.AuthCoreModule,
|
|
42
|
+
otp_module_1.OtpModule,
|
|
43
|
+
users_module_1.UsersModule,
|
|
44
|
+
sessions_module_1.SessionsModule,
|
|
45
|
+
native_auth_provider_module_1.NativeAuthProviderModule,
|
|
46
|
+
keycloak_auth_provider_module_1.KeycloakAuthProviderModule,
|
|
47
|
+
typeorm_1.TypeOrmModule.forFeature([password_reset_token_entity_1.PasswordResetToken]),
|
|
48
|
+
jobs_1.JobsModule.register(),
|
|
49
|
+
roles_module_1.RolesModule,
|
|
50
|
+
],
|
|
51
|
+
controllers: [auth_controller_1.AuthController, otp_controller_1.OtpController, account_controller_1.AccountController],
|
|
52
|
+
providers: [
|
|
53
|
+
{
|
|
54
|
+
provide: provider_registry_1.AuthProviderRegistry,
|
|
55
|
+
useFactory: (native, keycloak, settings) => new provider_registry_1.AuthProviderRegistry(settings, native, keycloak),
|
|
56
|
+
inject: [native_auth_provider_1.NativeAuthProvider, keycloak_auth_provider_1.KeycloakAuthProvider, settings_service_1.SettingsService],
|
|
57
|
+
},
|
|
58
|
+
otp_auth_service_1.OtpAuthService,
|
|
59
|
+
login_service_1.LoginService,
|
|
60
|
+
registration_service_1.RegistrationService,
|
|
61
|
+
password_service_1.PasswordService,
|
|
62
|
+
account_service_1.AccountService,
|
|
63
|
+
],
|
|
64
|
+
exports: [auth_core_module_1.AuthCoreModule, provider_registry_1.AuthProviderRegistry, otp_module_1.OtpModule, otp_auth_service_1.OtpAuthService],
|
|
65
|
+
})
|
|
66
|
+
], AuthModule);
|
|
67
|
+
//# sourceMappingURL=auth.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../modules/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,6CAAgD;AAChD,mEAA8D;AAC9D,mEAA+D;AAC/D,yEAAqE;AACrE,qEAAqE;AACrE,gGAA0F;AAC1F,sGAAgG;AAChG,kFAA6E;AAC7E,wFAAmF;AACnF,kDAA8C;AAC9C,wDAAoD;AACpD,iEAA6D;AAC7D,kEAA6D;AAC7D,4DAAwD;AACxD,0EAAsE;AACtE,kEAA8D;AAC9D,gEAA4D;AAC5D,wFAA4E;AAC5E,iEAA6D;AAC7D,4EAAwE;AACxE,qCAAwC;AACxC,wDAAoD;AAkC7C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IAhCtB,IAAA,eAAM,EAAC;QACP,OAAO,EAAE;YACR,qBAAY;YACZ,iCAAc;YACd,sBAAS;YACT,0BAAW;YACX,gCAAc;YACd,sDAAwB;YACxB,0DAA0B;YAC1B,uBAAa,CAAC,UAAU,CAAC,CAAC,gDAAkB,CAAC,CAAC;YAC9C,iBAAU,CAAC,QAAQ,EAAE;YACrB,0BAAW;SACX;QACD,WAAW,EAAE,CAAC,gCAAc,EAAE,8BAAa,EAAE,sCAAiB,CAAC;QAC/D,SAAS,EAAE;YACV;gBACC,OAAO,EAAE,wCAAoB;gBAC7B,UAAU,EAAE,CACX,MAA0B,EAC1B,QAA8B,EAC9B,QAAyB,EACxB,EAAE,CAAC,IAAI,wCAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;gBACzD,MAAM,EAAE,CAAC,yCAAkB,EAAE,6CAAoB,EAAE,kCAAe,CAAC;aACnE;YACD,iCAAc;YACd,4BAAY;YACZ,0CAAmB;YACnB,kCAAe;YACf,gCAAc;SACd;QACD,OAAO,EAAE,CAAC,iCAAc,EAAE,wCAAoB,EAAE,sBAAS,EAAE,iCAAc,CAAC;KAC1E,CAAC;GACW,UAAU,CAAG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { User } from '../../users/entities/user.entity';
|
|
2
|
+
import { AccountService } from '../services/account.service';
|
|
3
|
+
import { PasswordService } from '../services/password.service';
|
|
4
|
+
import { ChangePasswordDto, DeleteAccountConfirmDto, VerifyEmailDto } from '../dto/password.dto';
|
|
5
|
+
import { TokenService } from '../../sessions/services/token.service';
|
|
6
|
+
import { RefreshTokenDto } from '../dto/token.dto';
|
|
7
|
+
import { Request } from 'express';
|
|
8
|
+
export declare class AccountController {
|
|
9
|
+
private readonly accountService;
|
|
10
|
+
private readonly passwordService;
|
|
11
|
+
private readonly tokenService;
|
|
12
|
+
constructor(accountService: AccountService, passwordService: PasswordService, tokenService: TokenService);
|
|
13
|
+
refreshToken(body: RefreshTokenDto, req: Request): Promise<import("../dto/token.dto").TokenResponse>;
|
|
14
|
+
logout(user: User): Promise<{
|
|
15
|
+
message: string;
|
|
16
|
+
}>;
|
|
17
|
+
getActiveSessions(user: User): Promise<import("../../sessions").RefreshToken[]>;
|
|
18
|
+
revokeSession(sessionId: string, user: User): Promise<{
|
|
19
|
+
message: string;
|
|
20
|
+
}>;
|
|
21
|
+
verifyEmail(user: User, body: VerifyEmailDto): Promise<{
|
|
22
|
+
message: string;
|
|
23
|
+
}>;
|
|
24
|
+
changePassword(user: User, body: ChangePasswordDto): Promise<{
|
|
25
|
+
message: string;
|
|
26
|
+
}>;
|
|
27
|
+
requestDeletion(user: User): Promise<{
|
|
28
|
+
message: string;
|
|
29
|
+
requiresPassword: boolean;
|
|
30
|
+
verificationId?: undefined;
|
|
31
|
+
expiresAt?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
message: string;
|
|
34
|
+
verificationId: string;
|
|
35
|
+
expiresAt: number;
|
|
36
|
+
requiresPassword?: undefined;
|
|
37
|
+
}>;
|
|
38
|
+
confirmDeletion(user: User, dto: DeleteAccountConfirmDto): Promise<{
|
|
39
|
+
message: string;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=account.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.controller.d.ts","sourceRoot":"","sources":["../../../../modules/auth/controllers/account.controller.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAKlC,qBAIa,iBAAiB;IAE5B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAFZ,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY;IAkB5C,YAAY,CAAS,IAAI,EAAE,eAAe,EAAS,GAAG,EAAE,OAAO;IAY/D,MAAM,CAAgB,IAAI,EAAE,IAAI;;;IAShC,iBAAiB,CAAgB,IAAI,EAAE,IAAI;IAW3C,aAAa,CAAoC,SAAS,EAAE,MAAM,EAAiB,IAAI,EAAE,IAAI;;;IAqB7F,WAAW,CAAgB,IAAI,EAAE,IAAI,EAAU,IAAI,EAAE,cAAc;;;IAgBnE,cAAc,CAAgB,IAAI,EAAE,IAAI,EAAU,IAAI,EAAE,iBAAiB;;;IAsBzE,eAAe,CAAgB,IAAI,EAAE,IAAI;;;;;;;;;;;IAczC,eAAe,CACC,IAAI,EAAE,IAAI,EACQ,GAAG,EAAE,uBAAuB;;;CAI9D"}
|
|
@@ -0,0 +1,206 @@
|
|
|
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.AccountController = 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 guards_1 = require("../../../common/guards");
|
|
20
|
+
const decorators_1 = require("../../../common/decorators");
|
|
21
|
+
const user_entity_1 = require("../../users/entities/user.entity");
|
|
22
|
+
const account_service_1 = require("../services/account.service");
|
|
23
|
+
const password_service_1 = require("../services/password.service");
|
|
24
|
+
const password_dto_1 = require("../dto/password.dto");
|
|
25
|
+
const token_service_1 = require("../../sessions/services/token.service");
|
|
26
|
+
const token_dto_1 = require("../dto/token.dto");
|
|
27
|
+
const common_2 = require("@nestjs/common");
|
|
28
|
+
const request_utils_1 = require("../../../common/utils/request.utils");
|
|
29
|
+
const config_aware_validation_pipe_1 = require("../../../common/pipes/config-aware-validation.pipe");
|
|
30
|
+
let AccountController = class AccountController {
|
|
31
|
+
constructor(accountService, passwordService, tokenService) {
|
|
32
|
+
this.accountService = accountService;
|
|
33
|
+
this.passwordService = passwordService;
|
|
34
|
+
this.tokenService = tokenService;
|
|
35
|
+
}
|
|
36
|
+
refreshToken(body, req) {
|
|
37
|
+
const { ip, deviceInfo } = (0, request_utils_1.extractRequestInfo)(req);
|
|
38
|
+
return this.tokenService.rotateRefreshToken(body.refreshToken, deviceInfo, ip);
|
|
39
|
+
}
|
|
40
|
+
logout(user) {
|
|
41
|
+
return this.accountService.logout(user.id);
|
|
42
|
+
}
|
|
43
|
+
getActiveSessions(user) {
|
|
44
|
+
return this.accountService.getActiveSessions(user.id);
|
|
45
|
+
}
|
|
46
|
+
revokeSession(sessionId, user) {
|
|
47
|
+
return this.accountService.revokeSession(sessionId, user.id);
|
|
48
|
+
}
|
|
49
|
+
verifyEmail(user, body) {
|
|
50
|
+
return this.accountService.verifyEmail(user.id, body.verificationToken);
|
|
51
|
+
}
|
|
52
|
+
changePassword(user, body) {
|
|
53
|
+
return this.passwordService.changePassword(user.id, body);
|
|
54
|
+
}
|
|
55
|
+
requestDeletion(user) {
|
|
56
|
+
return this.accountService.requestDeletion(user.id);
|
|
57
|
+
}
|
|
58
|
+
confirmDeletion(user, dto) {
|
|
59
|
+
return this.accountService.confirmDeletion(user.id, dto);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.AccountController = AccountController;
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, common_1.Post)('refresh'),
|
|
65
|
+
(0, decorators_1.Public)(),
|
|
66
|
+
(0, common_1.UseGuards)(guards_1.LoginIpRateLimitGuard),
|
|
67
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
68
|
+
(0, swagger_1.ApiOperation)({
|
|
69
|
+
summary: 'Refresh tokens',
|
|
70
|
+
description: 'Rotate refresh token and get a new access + refresh token pair.',
|
|
71
|
+
}),
|
|
72
|
+
(0, swagger_1.ApiBody)({ type: token_dto_1.RefreshTokenDto }),
|
|
73
|
+
(0, swagger_1.ApiOkResponse)({
|
|
74
|
+
schema: { example: { accessToken: 'jwt', refreshToken: 'id.secret', expiresIn: 900000 } },
|
|
75
|
+
}),
|
|
76
|
+
(0, swagger_1.ApiUnauthorizedResponse)({ description: 'Invalid, expired, or reused refresh token' }),
|
|
77
|
+
__param(0, (0, common_1.Body)()),
|
|
78
|
+
__param(1, (0, common_2.Req)()),
|
|
79
|
+
__metadata("design:type", Function),
|
|
80
|
+
__metadata("design:paramtypes", [token_dto_1.RefreshTokenDto, Object]),
|
|
81
|
+
__metadata("design:returntype", void 0)
|
|
82
|
+
], AccountController.prototype, "refreshToken", null);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, common_1.Post)('logout'),
|
|
85
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
86
|
+
(0, swagger_1.ApiOperation)({
|
|
87
|
+
summary: 'Logout',
|
|
88
|
+
description: 'Revoke all active sessions for the current user.',
|
|
89
|
+
}),
|
|
90
|
+
(0, swagger_1.ApiOkResponse)({ schema: { example: { message: 'Logged out successfully' } } }),
|
|
91
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
92
|
+
__metadata("design:type", Function),
|
|
93
|
+
__metadata("design:paramtypes", [user_entity_1.User]),
|
|
94
|
+
__metadata("design:returntype", void 0)
|
|
95
|
+
], AccountController.prototype, "logout", null);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, common_1.Get)('sessions'),
|
|
98
|
+
(0, swagger_1.ApiOperation)({
|
|
99
|
+
summary: 'List active sessions',
|
|
100
|
+
description: 'Returns all active (non-revoked) refresh tokens for the current user.',
|
|
101
|
+
}),
|
|
102
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [user_entity_1.User]),
|
|
105
|
+
__metadata("design:returntype", void 0)
|
|
106
|
+
], AccountController.prototype, "getActiveSessions", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, common_1.Post)('sessions/:sessionId/revoke'),
|
|
109
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
110
|
+
(0, swagger_1.ApiOperation)({
|
|
111
|
+
summary: 'Revoke a session',
|
|
112
|
+
description: 'Revoke a specific refresh token by its ID.',
|
|
113
|
+
}),
|
|
114
|
+
(0, swagger_1.ApiOkResponse)({ schema: { example: { message: 'Session revoked successfully' } } }),
|
|
115
|
+
__param(0, (0, common_1.Param)('sessionId', common_1.ParseUUIDPipe)),
|
|
116
|
+
__param(1, (0, decorators_1.CurrentUser)()),
|
|
117
|
+
__metadata("design:type", Function),
|
|
118
|
+
__metadata("design:paramtypes", [String, user_entity_1.User]),
|
|
119
|
+
__metadata("design:returntype", void 0)
|
|
120
|
+
], AccountController.prototype, "revokeSession", null);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, common_1.Post)('verify-email'),
|
|
123
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
124
|
+
(0, swagger_1.ApiOperation)({
|
|
125
|
+
summary: 'Verify email address',
|
|
126
|
+
description: 'Confirms ownership of the registered email using the verificationToken returned by POST /auth/verify-otp (email channel). ' +
|
|
127
|
+
'Call POST /auth/send-otp with { channel: "email", email: "..." } first, then POST /auth/verify-otp to obtain the token.',
|
|
128
|
+
}),
|
|
129
|
+
(0, swagger_1.ApiBody)({ type: password_dto_1.VerifyEmailDto }),
|
|
130
|
+
(0, swagger_1.ApiOkResponse)({ schema: { example: { message: 'Email verified successfully.' } } }),
|
|
131
|
+
(0, swagger_1.ApiUnauthorizedResponse)({
|
|
132
|
+
description: 'Invalid or expired token, or token does not match account email',
|
|
133
|
+
}),
|
|
134
|
+
(0, swagger_1.ApiBadRequestResponse)({ description: 'Account has no email address' }),
|
|
135
|
+
(0, swagger_1.ApiConflictResponse)({ description: 'Email is already verified' }),
|
|
136
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
137
|
+
__param(1, (0, common_1.Body)()),
|
|
138
|
+
__metadata("design:type", Function),
|
|
139
|
+
__metadata("design:paramtypes", [user_entity_1.User, password_dto_1.VerifyEmailDto]),
|
|
140
|
+
__metadata("design:returntype", void 0)
|
|
141
|
+
], AccountController.prototype, "verifyEmail", null);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, common_1.Post)('account/change-password'),
|
|
144
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
145
|
+
(0, swagger_1.ApiOperation)({
|
|
146
|
+
summary: 'Change password',
|
|
147
|
+
description: 'Change password for the authenticated user.',
|
|
148
|
+
}),
|
|
149
|
+
(0, swagger_1.ApiBody)({ type: password_dto_1.ChangePasswordDto }),
|
|
150
|
+
(0, swagger_1.ApiOkResponse)({ schema: { example: { message: 'Password changed successfully.' } } }),
|
|
151
|
+
(0, swagger_1.ApiUnauthorizedResponse)({ description: 'Current password is incorrect' }),
|
|
152
|
+
(0, swagger_1.ApiBadRequestResponse)({ description: 'Account has no password (phone-only auth)' }),
|
|
153
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
154
|
+
__param(1, (0, common_1.Body)()),
|
|
155
|
+
__metadata("design:type", Function),
|
|
156
|
+
__metadata("design:paramtypes", [user_entity_1.User, password_dto_1.ChangePasswordDto]),
|
|
157
|
+
__metadata("design:returntype", void 0)
|
|
158
|
+
], AccountController.prototype, "changePassword", null);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, common_1.Post)('account/delete-request'),
|
|
161
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
162
|
+
(0, swagger_1.ApiOperation)({
|
|
163
|
+
summary: 'Request account deletion (step 1)',
|
|
164
|
+
description: 'Sends an OTP to the registered phone as a deletion confirmation challenge. Returns a verificationId to use in step 2.',
|
|
165
|
+
}),
|
|
166
|
+
(0, swagger_1.ApiOkResponse)({
|
|
167
|
+
schema: {
|
|
168
|
+
example: {
|
|
169
|
+
message: 'A confirmation code has been sent to your phone.',
|
|
170
|
+
verificationId: 'uuid-v4',
|
|
171
|
+
expiresAt: 1700000000000,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
}),
|
|
175
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
176
|
+
__metadata("design:type", Function),
|
|
177
|
+
__metadata("design:paramtypes", [user_entity_1.User]),
|
|
178
|
+
__metadata("design:returntype", void 0)
|
|
179
|
+
], AccountController.prototype, "requestDeletion", null);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, common_1.Post)('account/delete-confirm'),
|
|
182
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
183
|
+
(0, swagger_1.ApiOperation)({
|
|
184
|
+
summary: 'Confirm account deletion (step 2)',
|
|
185
|
+
description: 'Confirm deletion via phone OTP ({ verificationId, otp }) or via password ({ password }). Exactly one path must be provided.',
|
|
186
|
+
}),
|
|
187
|
+
(0, swagger_1.ApiBody)({ type: password_dto_1.DeleteAccountConfirmDto }),
|
|
188
|
+
(0, swagger_1.ApiOkResponse)({ schema: { example: { message: 'Your account has been deleted.' } } }),
|
|
189
|
+
(0, swagger_1.ApiBadRequestResponse)({ description: 'Neither or both confirmation methods provided' }),
|
|
190
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
191
|
+
__param(1, (0, common_1.Body)(config_aware_validation_pipe_1.ConfigAwareValidationPipe)),
|
|
192
|
+
__metadata("design:type", Function),
|
|
193
|
+
__metadata("design:paramtypes", [user_entity_1.User,
|
|
194
|
+
password_dto_1.DeleteAccountConfirmDto]),
|
|
195
|
+
__metadata("design:returntype", void 0)
|
|
196
|
+
], AccountController.prototype, "confirmDeletion", null);
|
|
197
|
+
exports.AccountController = AccountController = __decorate([
|
|
198
|
+
(0, swagger_1.ApiTags)('Account'),
|
|
199
|
+
(0, common_1.Controller)('auth'),
|
|
200
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard),
|
|
201
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
202
|
+
__metadata("design:paramtypes", [account_service_1.AccountService,
|
|
203
|
+
password_service_1.PasswordService,
|
|
204
|
+
token_service_1.TokenService])
|
|
205
|
+
], AccountController);
|
|
206
|
+
//# sourceMappingURL=account.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.controller.js","sourceRoot":"","sources":["../../../../modules/auth/controllers/account.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,6CASyB;AACzB,kEAAiE;AACjE,mDAA+D;AAC/D,2DAAiE;AACjE,kEAAwD;AACxD,iEAA6D;AAC7D,mEAA+D;AAC/D,sDAAiG;AACjG,yEAAqE;AACrE,gDAAmD;AAEnD,2CAAqC;AACrC,uEAAyE;AACzE,qGAA+F;AAMxF,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B,YACkB,cAA8B,EAC9B,eAAgC,EAChC,YAA0B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