@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,32 @@
|
|
|
1
|
+
import { Request } from 'express';
|
|
2
|
+
import { LoginService } from '../services/login.service';
|
|
3
|
+
import { RegistrationService } from '../services/registration.service';
|
|
4
|
+
import { PasswordService } from '../services/password.service';
|
|
5
|
+
import { LoginDto } from '../dto/login.dto';
|
|
6
|
+
import { RegisterDto, AcceptInviteDto } from '../dto/register.dto';
|
|
7
|
+
import { ForgotPasswordDto, ResetPasswordDto, ResetPasswordWithPhoneDto } from '../dto/password.dto';
|
|
8
|
+
import { SettingsService } from '../../settings/services/settings.service';
|
|
9
|
+
export declare class AuthController {
|
|
10
|
+
private readonly loginService;
|
|
11
|
+
private readonly registrationService;
|
|
12
|
+
private readonly passwordService;
|
|
13
|
+
private readonly settingsService;
|
|
14
|
+
constructor(loginService: LoginService, registrationService: RegistrationService, passwordService: PasswordService, settingsService: SettingsService);
|
|
15
|
+
getConfig(): {
|
|
16
|
+
authMethod: "email" | "phone";
|
|
17
|
+
passwordResetEnabled: boolean;
|
|
18
|
+
};
|
|
19
|
+
login(body: LoginDto, req: Request): Promise<import("..").TokenResponse>;
|
|
20
|
+
register(body: RegisterDto, req: Request): Promise<import("..").TokenResponse>;
|
|
21
|
+
acceptInvite(body: AcceptInviteDto, req: Request): Promise<import("..").TokenResponse>;
|
|
22
|
+
forgotPassword(body: ForgotPasswordDto): Promise<{
|
|
23
|
+
message: string;
|
|
24
|
+
}>;
|
|
25
|
+
resetPassword(body: ResetPasswordDto, req: Request): Promise<{
|
|
26
|
+
message: string;
|
|
27
|
+
}>;
|
|
28
|
+
resetPasswordWithPhone(body: ResetPasswordWithPhoneDto, req: Request): Promise<{
|
|
29
|
+
message: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=auth.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.controller.d.ts","sourceRoot":"","sources":["../../../../modules/auth/controllers/auth.controller.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACN,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAG3E,qBAGa,cAAc;IAEzB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAHf,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,eAAe;IAoBlD,SAAS;;;;IA2BT,KAAK,CAAkC,IAAI,EAAE,QAAQ,EAAS,GAAG,EAAE,OAAO;IAoB1E,QAAQ,CAAkC,IAAI,EAAE,WAAW,EAAS,GAAG,EAAE,OAAO;IAgBhF,YAAY,CAAkC,IAAI,EAAE,eAAe,EAAS,GAAG,EAAE,OAAO;IAoBxF,cAAc,CAAS,IAAI,EAAE,iBAAiB;;;IAa9C,aAAa,CAAS,IAAI,EAAE,gBAAgB,EAAS,GAAG,EAAE,OAAO;;;IAejE,sBAAsB,CAAS,IAAI,EAAE,yBAAyB,EAAS,GAAG,EAAE,OAAO;;;CAInF"}
|
|
@@ -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.AuthController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const decorators_1 = require("../../../common/decorators");
|
|
19
|
+
const request_utils_1 = require("../../../common/utils/request.utils");
|
|
20
|
+
const guards_1 = require("../../../common/guards");
|
|
21
|
+
const login_service_1 = require("../services/login.service");
|
|
22
|
+
const registration_service_1 = require("../services/registration.service");
|
|
23
|
+
const password_service_1 = require("../services/password.service");
|
|
24
|
+
const login_dto_1 = require("../dto/login.dto");
|
|
25
|
+
const register_dto_1 = require("../dto/register.dto");
|
|
26
|
+
const password_dto_1 = require("../dto/password.dto");
|
|
27
|
+
const config_aware_validation_pipe_1 = require("../../../common/pipes/config-aware-validation.pipe");
|
|
28
|
+
const settings_service_1 = require("../../settings/services/settings.service");
|
|
29
|
+
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
30
|
+
let AuthController = class AuthController {
|
|
31
|
+
constructor(loginService, registrationService, passwordService, settingsService) {
|
|
32
|
+
this.loginService = loginService;
|
|
33
|
+
this.registrationService = registrationService;
|
|
34
|
+
this.passwordService = passwordService;
|
|
35
|
+
this.settingsService = settingsService;
|
|
36
|
+
}
|
|
37
|
+
getConfig() {
|
|
38
|
+
const authMethod = this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_METHOD);
|
|
39
|
+
return {
|
|
40
|
+
authMethod,
|
|
41
|
+
passwordResetEnabled: authMethod === 'email',
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
login(body, req) {
|
|
45
|
+
const { ip, deviceInfo } = (0, request_utils_1.extractRequestInfo)(req);
|
|
46
|
+
return this.loginService.login(body, deviceInfo, ip);
|
|
47
|
+
}
|
|
48
|
+
register(body, req) {
|
|
49
|
+
const { ip, deviceInfo } = (0, request_utils_1.extractRequestInfo)(req);
|
|
50
|
+
return this.registrationService.register(body, deviceInfo, ip);
|
|
51
|
+
}
|
|
52
|
+
acceptInvite(body, req) {
|
|
53
|
+
const { ip, deviceInfo } = (0, request_utils_1.extractRequestInfo)(req);
|
|
54
|
+
return this.registrationService.acceptInvite(body, deviceInfo, ip);
|
|
55
|
+
}
|
|
56
|
+
forgotPassword(body) {
|
|
57
|
+
return this.passwordService.forgotPassword(body);
|
|
58
|
+
}
|
|
59
|
+
resetPassword(body, req) {
|
|
60
|
+
const { ip } = (0, request_utils_1.extractRequestInfo)(req);
|
|
61
|
+
return this.passwordService.resetPassword(body, ip);
|
|
62
|
+
}
|
|
63
|
+
resetPasswordWithPhone(body, req) {
|
|
64
|
+
const { ip } = (0, request_utils_1.extractRequestInfo)(req);
|
|
65
|
+
return this.passwordService.resetPasswordWithPhone(body, ip);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.AuthController = AuthController;
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, common_1.Get)('config'),
|
|
71
|
+
(0, swagger_1.ApiOperation)({
|
|
72
|
+
summary: 'Auth configuration',
|
|
73
|
+
description: 'Returns the active authentication configuration. ' +
|
|
74
|
+
'Clients should call this on startup to determine which login/registration UI to present.',
|
|
75
|
+
}),
|
|
76
|
+
(0, swagger_1.ApiOkResponse)({
|
|
77
|
+
schema: {
|
|
78
|
+
example: {
|
|
79
|
+
authMethod: 'phone',
|
|
80
|
+
passwordResetEnabled: false,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
}),
|
|
84
|
+
__metadata("design:type", Function),
|
|
85
|
+
__metadata("design:paramtypes", []),
|
|
86
|
+
__metadata("design:returntype", void 0)
|
|
87
|
+
], AuthController.prototype, "getConfig", null);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, common_1.Post)('login'),
|
|
90
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
91
|
+
(0, common_1.UseGuards)(guards_1.LoginIpRateLimitGuard),
|
|
92
|
+
(0, swagger_1.ApiOperation)({
|
|
93
|
+
summary: 'Login',
|
|
94
|
+
description: 'Login with phone or email and password.',
|
|
95
|
+
}),
|
|
96
|
+
(0, swagger_1.ApiBody)({ type: login_dto_1.LoginDto }),
|
|
97
|
+
(0, swagger_1.ApiOkResponse)({
|
|
98
|
+
schema: { example: { accessToken: 'jwt', refreshToken: 'id.secret', expiresIn: 900000 } },
|
|
99
|
+
}),
|
|
100
|
+
(0, swagger_1.ApiUnauthorizedResponse)({ description: 'Invalid or expired temporary token' }),
|
|
101
|
+
(0, swagger_1.ApiTooManyRequestsResponse)({
|
|
102
|
+
description: 'Too many login attempts from this IP or identifier is locked',
|
|
103
|
+
}),
|
|
104
|
+
__param(0, (0, common_1.Body)(config_aware_validation_pipe_1.ConfigAwareValidationPipe)),
|
|
105
|
+
__param(1, (0, common_1.Req)()),
|
|
106
|
+
__metadata("design:type", Function),
|
|
107
|
+
__metadata("design:paramtypes", [login_dto_1.LoginDto, Object]),
|
|
108
|
+
__metadata("design:returntype", void 0)
|
|
109
|
+
], AuthController.prototype, "login", null);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, common_1.Post)('register'),
|
|
112
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.CREATED),
|
|
113
|
+
(0, swagger_1.ApiOperation)({
|
|
114
|
+
summary: 'Register new account',
|
|
115
|
+
description: 'Create a new account using the phoneVerifiedToken from verify-otp. Issues access + refresh tokens immediately.',
|
|
116
|
+
}),
|
|
117
|
+
(0, swagger_1.ApiBody)({ type: register_dto_1.RegisterDto }),
|
|
118
|
+
(0, swagger_1.ApiCreatedResponse)({
|
|
119
|
+
schema: { example: { accessToken: 'jwt', refreshToken: 'id.secret', expiresIn: 900000 } },
|
|
120
|
+
}),
|
|
121
|
+
(0, swagger_1.ApiConflictResponse)({ description: 'Phone number or email already registered' }),
|
|
122
|
+
(0, swagger_1.ApiUnauthorizedResponse)({ description: 'Invalid or expired phone-verified token' }),
|
|
123
|
+
__param(0, (0, common_1.Body)(config_aware_validation_pipe_1.ConfigAwareValidationPipe)),
|
|
124
|
+
__param(1, (0, common_1.Req)()),
|
|
125
|
+
__metadata("design:type", Function),
|
|
126
|
+
__metadata("design:paramtypes", [register_dto_1.RegisterDto, Object]),
|
|
127
|
+
__metadata("design:returntype", void 0)
|
|
128
|
+
], AuthController.prototype, "register", null);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, common_1.Post)('accept-invite'),
|
|
131
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
132
|
+
(0, swagger_1.ApiOperation)({
|
|
133
|
+
summary: 'Accept invitation',
|
|
134
|
+
description: 'Complete account setup using an invite token received by email.',
|
|
135
|
+
}),
|
|
136
|
+
(0, swagger_1.ApiBody)({ type: register_dto_1.AcceptInviteDto }),
|
|
137
|
+
(0, swagger_1.ApiOkResponse)({
|
|
138
|
+
schema: { example: { accessToken: 'jwt', refreshToken: 'id.secret', expiresIn: 900000 } },
|
|
139
|
+
}),
|
|
140
|
+
(0, swagger_1.ApiUnauthorizedResponse)({ description: 'Invalid or expired invite token' }),
|
|
141
|
+
__param(0, (0, common_1.Body)(config_aware_validation_pipe_1.ConfigAwareValidationPipe)),
|
|
142
|
+
__param(1, (0, common_1.Req)()),
|
|
143
|
+
__metadata("design:type", Function),
|
|
144
|
+
__metadata("design:paramtypes", [register_dto_1.AcceptInviteDto, Object]),
|
|
145
|
+
__metadata("design:returntype", void 0)
|
|
146
|
+
], AuthController.prototype, "acceptInvite", null);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, common_1.Post)('forgot-password'),
|
|
149
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
150
|
+
(0, swagger_1.ApiOperation)({
|
|
151
|
+
summary: 'Forgot password (email)',
|
|
152
|
+
description: 'Sends a password reset link to the registered email. Always returns success to prevent user enumeration.',
|
|
153
|
+
}),
|
|
154
|
+
(0, swagger_1.ApiBody)({ type: password_dto_1.ForgotPasswordDto }),
|
|
155
|
+
(0, swagger_1.ApiOkResponse)({
|
|
156
|
+
schema: {
|
|
157
|
+
example: { message: 'If this email is registered, a reset link has been sent.' },
|
|
158
|
+
},
|
|
159
|
+
}),
|
|
160
|
+
__param(0, (0, common_1.Body)()),
|
|
161
|
+
__metadata("design:type", Function),
|
|
162
|
+
__metadata("design:paramtypes", [password_dto_1.ForgotPasswordDto]),
|
|
163
|
+
__metadata("design:returntype", void 0)
|
|
164
|
+
], AuthController.prototype, "forgotPassword", null);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, common_1.Post)('reset-password'),
|
|
167
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
168
|
+
(0, swagger_1.ApiOperation)({
|
|
169
|
+
summary: 'Reset password (email token)',
|
|
170
|
+
description: 'Set a new password using the token from the email reset link.',
|
|
171
|
+
}),
|
|
172
|
+
(0, swagger_1.ApiBody)({ type: password_dto_1.ResetPasswordDto }),
|
|
173
|
+
(0, swagger_1.ApiOkResponse)({ schema: { example: { message: 'Password reset successfully.' } } }),
|
|
174
|
+
(0, swagger_1.ApiUnauthorizedResponse)({ description: 'Invalid or expired reset token' }),
|
|
175
|
+
__param(0, (0, common_1.Body)()),
|
|
176
|
+
__param(1, (0, common_1.Req)()),
|
|
177
|
+
__metadata("design:type", Function),
|
|
178
|
+
__metadata("design:paramtypes", [password_dto_1.ResetPasswordDto, Object]),
|
|
179
|
+
__metadata("design:returntype", void 0)
|
|
180
|
+
], AuthController.prototype, "resetPassword", null);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, common_1.Post)('reset-password/phone'),
|
|
183
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
184
|
+
(0, swagger_1.ApiOperation)({
|
|
185
|
+
summary: 'Reset password (phone OTP)',
|
|
186
|
+
description: 'Set a new password using a phoneVerifiedToken from verify-otp. For phone-only users with no email.',
|
|
187
|
+
}),
|
|
188
|
+
(0, swagger_1.ApiBody)({ type: password_dto_1.ResetPasswordWithPhoneDto }),
|
|
189
|
+
(0, swagger_1.ApiOkResponse)({ schema: { example: { message: 'Password reset successfully.' } } }),
|
|
190
|
+
(0, swagger_1.ApiUnauthorizedResponse)({ description: 'Invalid or expired phone-verified token' }),
|
|
191
|
+
__param(0, (0, common_1.Body)()),
|
|
192
|
+
__param(1, (0, common_1.Req)()),
|
|
193
|
+
__metadata("design:type", Function),
|
|
194
|
+
__metadata("design:paramtypes", [password_dto_1.ResetPasswordWithPhoneDto, Object]),
|
|
195
|
+
__metadata("design:returntype", void 0)
|
|
196
|
+
], AuthController.prototype, "resetPasswordWithPhone", null);
|
|
197
|
+
exports.AuthController = AuthController = __decorate([
|
|
198
|
+
(0, swagger_1.ApiTags)('Auth'),
|
|
199
|
+
(0, common_1.Controller)('auth'),
|
|
200
|
+
(0, decorators_1.Public)(),
|
|
201
|
+
__metadata("design:paramtypes", [login_service_1.LoginService,
|
|
202
|
+
registration_service_1.RegistrationService,
|
|
203
|
+
password_service_1.PasswordService,
|
|
204
|
+
settings_service_1.SettingsService])
|
|
205
|
+
], AuthController);
|
|
206
|
+
//# sourceMappingURL=auth.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../../../modules/auth/controllers/auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmG;AACnG,6CASyB;AAEzB,2DAAoD;AACpD,uEAAyE;AACzE,mDAA+D;AAC/D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AA;;qCAAxB,+BAAgB;;mDAG3C;AAYD;IAVC,IAAA,aAAI,EAAC,sBAAsB,CAAC;IAC5B,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,4BAA4B;QACrC,WAAW,EACV,oGAAoG;KACrG,CAAC;IACD,IAAA,iBAAO,EAAC,EAAE,IAAI,EAAE,wCAAyB,EAAE,CAAC;IAC5C,IAAA,uBAAa,EAAC,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,8BAA8B,EAAE,EAAE,EAAE,CAAC;IACnF,IAAA,iCAAuB,EAAC,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;IAC5D,WAAA,IAAA,aAAI,GAAE,CAAA;IAAmC,WAAA,IAAA,YAAG,GAAE,CAAA;;qCAAjC,wCAAyB;;4DAG7D;yBA3IW,cAAc;IAH1B,IAAA,iBAAO,EAAC,MAAM,CAAC;IACf,IAAA,mBAAU,EAAC,MAAM,CAAC;IAClB,IAAA,mBAAM,GAAE;qCAGwB,4BAAY;QACL,0CAAmB;QACvB,kCAAe;QACf,kCAAe;GALtC,cAAc,CA4I1B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OtpAuthService } from '../services/otp-auth.service';
|
|
2
|
+
import { SendOtpDto, VerifyOtpDto, ResendOtpDto } from '../dto/otp.dto';
|
|
3
|
+
export declare class OtpController {
|
|
4
|
+
private readonly otpAuthService;
|
|
5
|
+
constructor(otpAuthService: OtpAuthService);
|
|
6
|
+
sendOtp(body: SendOtpDto): Promise<import("../../otp").OtpGenerateResult>;
|
|
7
|
+
verifyOtp(body: VerifyOtpDto): Promise<import("../../otp").OtpVerifyResult>;
|
|
8
|
+
resendOtp(body: ResendOtpDto): Promise<import("../../otp").OtpGenerateResult>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=otp.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.controller.d.ts","sourceRoot":"","sources":["../../../../modules/auth/controllers/otp.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAExF,qBAGa,aAAa;IACb,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAmD3D,OAAO,CAAkC,IAAI,EAAE,UAAU;IAkCzD,SAAS,CAAS,IAAI,EAAE,YAAY;IA0BpC,SAAS,CAAS,IAAI,EAAE,YAAY;CAGpC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
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.OtpController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const decorators_1 = require("../../../common/decorators");
|
|
19
|
+
const guards_1 = require("../../../common/guards");
|
|
20
|
+
const config_aware_validation_pipe_1 = require("../../../common/pipes/config-aware-validation.pipe");
|
|
21
|
+
const otp_auth_service_1 = require("../services/otp-auth.service");
|
|
22
|
+
const otp_dto_1 = require("../dto/otp.dto");
|
|
23
|
+
let OtpController = class OtpController {
|
|
24
|
+
constructor(otpAuthService) {
|
|
25
|
+
this.otpAuthService = otpAuthService;
|
|
26
|
+
}
|
|
27
|
+
sendOtp(body) {
|
|
28
|
+
const channel = (0, otp_dto_1.resolveChannel)(body);
|
|
29
|
+
const identifier = channel === 'sms' ? body.phone : body.email;
|
|
30
|
+
return this.otpAuthService.sendOtp(identifier, channel);
|
|
31
|
+
}
|
|
32
|
+
verifyOtp(body) {
|
|
33
|
+
return this.otpAuthService.verifyOtp(body.verificationId, body.otp);
|
|
34
|
+
}
|
|
35
|
+
resendOtp(body) {
|
|
36
|
+
return this.otpAuthService.resendOtp(body.verificationId);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.OtpController = OtpController;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, common_1.Post)('send-otp'),
|
|
42
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
43
|
+
(0, common_1.UseGuards)(guards_1.OtpIpRateLimitGuard),
|
|
44
|
+
(0, swagger_1.ApiOperation)({
|
|
45
|
+
summary: 'Send OTP',
|
|
46
|
+
description: 'Generates a 6-digit OTP, delivers it via the requested channel (SMS or email), and returns an opaque verification ID.',
|
|
47
|
+
}),
|
|
48
|
+
(0, swagger_1.ApiBody)({
|
|
49
|
+
type: otp_dto_1.SendOtpDto,
|
|
50
|
+
examples: {
|
|
51
|
+
sms_default: {
|
|
52
|
+
summary: 'Send via SMS (default when AUTH_METHOD=phone)',
|
|
53
|
+
value: { phone: '+2348012345678' },
|
|
54
|
+
},
|
|
55
|
+
email_default: {
|
|
56
|
+
summary: 'Send via email (default when AUTH_METHOD=email)',
|
|
57
|
+
value: { email: 'user@example.com' },
|
|
58
|
+
},
|
|
59
|
+
sms_override: {
|
|
60
|
+
summary: 'Force SMS channel regardless of server default',
|
|
61
|
+
value: { channel: 'sms', phone: '+2348012345678' },
|
|
62
|
+
},
|
|
63
|
+
email_override: {
|
|
64
|
+
summary: 'Force email channel regardless of server default',
|
|
65
|
+
value: { channel: 'email', email: 'user@example.com' },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
}),
|
|
69
|
+
(0, swagger_1.ApiOkResponse)({
|
|
70
|
+
schema: {
|
|
71
|
+
example: {
|
|
72
|
+
success: true,
|
|
73
|
+
message: 'OTP generated successfully',
|
|
74
|
+
data: { verificationId: 'uuid-v4', expiresAt: 1700000300000, resendIn: 60000 },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
}),
|
|
78
|
+
(0, swagger_1.ApiBadRequestResponse)({
|
|
79
|
+
description: 'Invalid phone number or email format, or missing identifier for chosen channel',
|
|
80
|
+
}),
|
|
81
|
+
(0, swagger_1.ApiTooManyRequestsResponse)({
|
|
82
|
+
description: 'Rate limit exceeded — max 3 sends per 10 minutes per identifier, or max 20 per IP',
|
|
83
|
+
}),
|
|
84
|
+
(0, swagger_1.ApiServiceUnavailableResponse)({ description: 'Redis or delivery service unavailable' }),
|
|
85
|
+
__param(0, (0, common_1.Body)(config_aware_validation_pipe_1.ConfigAwareValidationPipe)),
|
|
86
|
+
__metadata("design:type", Function),
|
|
87
|
+
__metadata("design:paramtypes", [otp_dto_1.SendOtpDto]),
|
|
88
|
+
__metadata("design:returntype", void 0)
|
|
89
|
+
], OtpController.prototype, "sendOtp", null);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, common_1.Post)('verify-otp'),
|
|
92
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
93
|
+
(0, common_1.UseGuards)(guards_1.OtpIpRateLimitGuard),
|
|
94
|
+
(0, swagger_1.ApiOperation)({
|
|
95
|
+
summary: 'Verify OTP',
|
|
96
|
+
description: 'Verifies the OTP code. Returns a verificationToken (existing user → proceed to login) or a verificationToken seeded with the verified identifier (new user → proceed to /auth/register).',
|
|
97
|
+
}),
|
|
98
|
+
(0, swagger_1.ApiBody)({ type: otp_dto_1.VerifyOtpDto }),
|
|
99
|
+
(0, swagger_1.ApiOkResponse)({
|
|
100
|
+
schema: {
|
|
101
|
+
example: {
|
|
102
|
+
success: true,
|
|
103
|
+
message: 'OTP verified successfully',
|
|
104
|
+
data: {
|
|
105
|
+
subject: '+2348012345678',
|
|
106
|
+
channel: 'sms',
|
|
107
|
+
verificationToken: 'uuid-v4',
|
|
108
|
+
expiresAt: 1700000300000,
|
|
109
|
+
hasAccount: true,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
}),
|
|
114
|
+
(0, swagger_1.ApiBadRequestResponse)({
|
|
115
|
+
description: 'Invalid or expired session, wrong code, or max attempts exceeded',
|
|
116
|
+
}),
|
|
117
|
+
(0, swagger_1.ApiTooManyRequestsResponse)({ description: 'IP rate limit exceeded' }),
|
|
118
|
+
__param(0, (0, common_1.Body)()),
|
|
119
|
+
__metadata("design:type", Function),
|
|
120
|
+
__metadata("design:paramtypes", [otp_dto_1.VerifyOtpDto]),
|
|
121
|
+
__metadata("design:returntype", void 0)
|
|
122
|
+
], OtpController.prototype, "verifyOtp", null);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, common_1.Post)('resend-otp'),
|
|
125
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
126
|
+
(0, common_1.UseGuards)(guards_1.OtpIpRateLimitGuard),
|
|
127
|
+
(0, swagger_1.ApiOperation)({
|
|
128
|
+
summary: 'Resend OTP',
|
|
129
|
+
description: 'Invalidates the current session and sends a new OTP. Subject to 60-second cooldown.',
|
|
130
|
+
}),
|
|
131
|
+
(0, swagger_1.ApiBody)({ type: otp_dto_1.ResendOtpDto }),
|
|
132
|
+
(0, swagger_1.ApiOkResponse)({
|
|
133
|
+
schema: {
|
|
134
|
+
example: {
|
|
135
|
+
success: true,
|
|
136
|
+
message: 'OTP generated successfully',
|
|
137
|
+
data: { verificationId: 'new-uuid-v4', expiresAt: 1700000300000, resendIn: 60000 },
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
}),
|
|
141
|
+
(0, swagger_1.ApiBadRequestResponse)({ description: 'Invalid or expired session token' }),
|
|
142
|
+
(0, swagger_1.ApiTooManyRequestsResponse)({
|
|
143
|
+
description: 'Resend cooldown active — must wait 60 seconds between resends',
|
|
144
|
+
}),
|
|
145
|
+
__param(0, (0, common_1.Body)()),
|
|
146
|
+
__metadata("design:type", Function),
|
|
147
|
+
__metadata("design:paramtypes", [otp_dto_1.ResendOtpDto]),
|
|
148
|
+
__metadata("design:returntype", void 0)
|
|
149
|
+
], OtpController.prototype, "resendOtp", null);
|
|
150
|
+
exports.OtpController = OtpController = __decorate([
|
|
151
|
+
(0, swagger_1.ApiTags)('Auth'),
|
|
152
|
+
(0, common_1.Controller)('auth'),
|
|
153
|
+
(0, decorators_1.Public)(),
|
|
154
|
+
__metadata("design:paramtypes", [otp_auth_service_1.OtpAuthService])
|
|
155
|
+
], OtpController);
|
|
156
|
+
//# sourceMappingURL=otp.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.controller.js","sourceRoot":"","sources":["../../../../modules/auth/controllers/otp.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyF;AACzF,6CAQyB;AACzB,2DAAoD;AACpD,mDAA6D;AAC7D,qGAA+F;AAC/F,mEAA8D;AAC9D,4CAAwF;AAKjF,IAAM,aAAa,GAAnB,MAAM,aAAa;IACzB,YAA6B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAmD/D,OAAO,CAAkC,IAAgB;QACxD,MAAM,OAAO,GAAG,IAAA,wBAAc,EAAC,IAAI,CAAC,CAAC;QACrC,MAAM,UAAU,GAAG,OAAO,KAAK,KA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BAAY;;8CAEnC;AAwBD;IAtBC,IAAA,aAAI,EAAC,YAAY,CAAC;IAClB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,kBAAS,EAAC,4BAAmB,CAAC;IAC9B,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,YAAY;QACrB,WAAW,EACV,qFAAqF;KACtF,CAAC;IACD,IAAA,iBAAO,EAAC,EAAE,IAAI,EAAE,sBAAY,EAAE,CAAC;IAC/B,IAAA,uBAAa,EAAC;QACd,MAAM,EAAE;YACP,OAAO,EAAE;gBACR,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,4BAA4B;gBACrC,IAAI,EAAE,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE;aAClF;SACD;KACD,CAAC;IACD,IAAA,+BAAqB,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAC1E,IAAA,oCAA0B,EAAC;QAC3B,WAAW,EAAE,+DAA+D;KAC5E,CAAC;IACS,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAY;;8CAEnC;wBAlHW,aAAa;IAHzB,IAAA,iBAAO,EAAC,MAAM,CAAC;IACf,IAAA,mBAAU,EAAC,MAAM,CAAC;IAClB,IAAA,mBAAM,GAAE;qCAEqC,iCAAc;GAD/C,aAAa,CAmHzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/auth/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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("./otp.dto"), exports);
|
|
18
|
+
__exportStar(require("./login.dto"), exports);
|
|
19
|
+
__exportStar(require("./register.dto"), exports);
|
|
20
|
+
__exportStar(require("./password.dto"), exports);
|
|
21
|
+
__exportStar(require("./invite.dto"), exports);
|
|
22
|
+
__exportStar(require("./token.dto"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/auth/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,+CAA6B;AAC7B,8CAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invite.dto.d.ts","sourceRoot":"","sources":["../../../../modules/auth/dto/invite.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IAMzB,KAAK,EAAG,MAAM,CAAC;IASf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,qBAAa,eAAe;CAE3B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.ResendInviteDto = exports.InviteUserDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
class InviteUserDto {
|
|
16
|
+
}
|
|
17
|
+
exports.InviteUserDto = InviteUserDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
example: 'newadmin@company.com',
|
|
21
|
+
description: 'Email address of the user to invite',
|
|
22
|
+
}),
|
|
23
|
+
(0, class_validator_1.IsEmail)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], InviteUserDto.prototype, "email", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
28
|
+
description: 'Role IDs to pre-assign to the invited user',
|
|
29
|
+
type: [String],
|
|
30
|
+
}),
|
|
31
|
+
(0, class_validator_1.IsArray)(),
|
|
32
|
+
(0, class_validator_1.IsUUID)('all', { each: true }),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
__metadata("design:type", Array)
|
|
35
|
+
], InviteUserDto.prototype, "roleIds", void 0);
|
|
36
|
+
class ResendInviteDto {
|
|
37
|
+
}
|
|
38
|
+
exports.ResendInviteDto = ResendInviteDto;
|
|
39
|
+
//# sourceMappingURL=invite.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invite.dto.js","sourceRoot":"","sources":["../../../../modules/auth/dto/invite.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,6CAAmE;AAEnE,MAAa,aAAa;CAgBzB;AAhBD,sCAgBC;AAVA;IALC,IAAA,qBAAW,EAAC;QACZ,OAAO,EAAE,sBAAsB;QAC/B,WAAW,EAAE,qCAAqC;KAClD,CAAC;IACD,IAAA,yBAAO,GAAE;;4CACK;AASf;IAPC,IAAA,6BAAmB,EAAC;QACpB,WAAW,EAAE,4CAA4C;QACzD,IAAI,EAAE,CAAC,MAAM,CAAC;KACd,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,wBAAM,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC7B,IAAA,4BAAU,GAAE;;8CACM;AAGpB,MAAa,eAAe;CAE3B;AAFD,0CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.dto.d.ts","sourceRoot":"","sources":["../../../../modules/auth/dto/login.dto.ts"],"names":[],"mappings":"AAIA,qBACa,QAAQ;IAEpB,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAQhC,iBAAiB,EAAG,MAAM,CAAC;IAK3B,KAAK,EAAG,MAAM,CAAC;IAMf,QAAQ,EAAG,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.LoginDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const auth_method_aware_decorator_1 = require("../../../common/decorators/auth-method-aware.decorator");
|
|
16
|
+
let LoginDto = class LoginDto {
|
|
17
|
+
};
|
|
18
|
+
exports.LoginDto = LoginDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], LoginDto.prototype, "_authMethod", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
25
|
+
description: 'Verification token returned by verify-otp (hasAccount=true)',
|
|
26
|
+
}),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.ValidateIf)((o) => o._authMethod === 'phone'),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], LoginDto.prototype, "verificationToken", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiPropertyOptional)({ example: 'user@example.com', description: 'Registered email address' }),
|
|
34
|
+
(0, class_validator_1.ValidateIf)((o) => o._authMethod === 'email'),
|
|
35
|
+
(0, class_validator_1.IsEmail)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], LoginDto.prototype, "email", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiPropertyOptional)({ example: 'P@ssw0rd!', description: 'Account password' }),
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.ValidateIf)((o) => o._authMethod === 'email'),
|
|
42
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], LoginDto.prototype, "password", void 0);
|
|
45
|
+
exports.LoginDto = LoginDto = __decorate([
|
|
46
|
+
(0, auth_method_aware_decorator_1.AuthMethodAware)()
|
|
47
|
+
], LoginDto);
|
|
48
|
+
//# sourceMappingURL=login.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.dto.js","sourceRoot":"","sources":["../../../../modules/auth/dto/login.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwF;AACxF,6CAAsD;AACtD,wGAAyF;AAGlF,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAsBpB,CAAA;AAtBY,4BAAQ;AAEpB;IADC,IAAA,4BAAU,GAAE;;6CACmB;AAQhC;IANC,IAAA,6BAAmB,EAAC;QACpB,WAAW,EAAE,6DAA6D;KAC1E,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,EAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC;IACtD,IAAA,4BAAU,GAAE;;mDACc;AAK3B;IAHC,IAAA,6BAAmB,EAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAC7F,IAAA,4BAAU,EAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC;IACtD,IAAA,yBAAO,GAAE;;uCACK;AAMf;IAJC,IAAA,6BAAmB,EAAC,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAC9E,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,EAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC;IACtD,IAAA,4BAAU,GAAE;;0CACK;mBArBN,QAAQ;IADpB,IAAA,6CAAe,GAAE;GACL,QAAQ,CAsBpB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function resolveChannel(o: SendOtpDto): 'sms' | 'email';
|
|
2
|
+
export declare class SendOtpDto {
|
|
3
|
+
_authMethod?: 'phone' | 'email';
|
|
4
|
+
channel?: 'sms' | 'email';
|
|
5
|
+
phone?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class VerifyOtpDto {
|
|
9
|
+
verificationId: string;
|
|
10
|
+
otp: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class ResendOtpDto {
|
|
13
|
+
verificationId: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=otp.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.dto.d.ts","sourceRoot":"","sources":["../../../../modules/auth/dto/otp.dto.ts"],"names":[],"mappings":"AAqBA,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,OAAO,CAI7D;AAED,qBACa,UAAU;IAGtB,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAUhC,OAAO,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IAQ1B,KAAK,CAAC,EAAE,MAAM,CAAC;IAQf,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,YAAY;IAGxB,cAAc,EAAG,MAAM,CAAC;IAIxB,GAAG,EAAG,MAAM,CAAC;CACb;AAED,qBAAa,YAAY;IAGxB,cAAc,EAAG,MAAM,CAAC;CACxB"}
|