@colveor/core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/dist/bootstrap/bootstrap-colveor-app.d.ts +28 -0
- package/dist/bootstrap/bootstrap-colveor-app.d.ts.map +1 -0
- package/dist/bootstrap/bootstrap-colveor-app.js +238 -0
- package/dist/bootstrap/bootstrap-colveor-app.js.map +1 -0
- package/dist/bootstrap/bootstrap.types.d.ts +152 -0
- package/dist/bootstrap/bootstrap.types.d.ts.map +1 -0
- package/dist/bootstrap/bootstrap.types.js +3 -0
- package/dist/bootstrap/bootstrap.types.js.map +1 -0
- package/dist/bootstrap/index.d.ts +4 -0
- package/dist/bootstrap/index.d.ts.map +1 -0
- package/dist/bootstrap/index.js +24 -0
- package/dist/bootstrap/index.js.map +1 -0
- package/dist/bootstrap/logger.utils.d.ts +3 -0
- package/dist/bootstrap/logger.utils.d.ts.map +1 -0
- package/dist/bootstrap/logger.utils.js +14 -0
- package/dist/bootstrap/logger.utils.js.map +1 -0
- package/dist/bootstrap/metrics-prefix-alias.middleware.d.ts +6 -0
- package/dist/bootstrap/metrics-prefix-alias.middleware.d.ts.map +1 -0
- package/dist/bootstrap/metrics-prefix-alias.middleware.js +16 -0
- package/dist/bootstrap/metrics-prefix-alias.middleware.js.map +1 -0
- package/dist/bootstrap/observability.bootstrap.d.ts +12 -0
- package/dist/bootstrap/observability.bootstrap.d.ts.map +1 -0
- package/dist/bootstrap/observability.bootstrap.js +29 -0
- package/dist/bootstrap/observability.bootstrap.js.map +1 -0
- package/dist/common/base/base.entity.d.ts +16 -0
- package/dist/common/base/base.entity.d.ts.map +1 -0
- package/dist/common/base/base.entity.js +59 -0
- package/dist/common/base/base.entity.js.map +1 -0
- package/dist/common/base/base.repository.d.ts +29 -0
- package/dist/common/base/base.repository.d.ts.map +1 -0
- package/dist/common/base/base.repository.js +65 -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 +14 -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 +34 -0
- package/dist/common/decorators/index.js.map +1 -0
- package/dist/common/decorators/otp-length-aware.decorator.d.ts +3 -0
- package/dist/common/decorators/otp-length-aware.decorator.d.ts.map +1 -0
- package/dist/common/decorators/otp-length-aware.decorator.js +8 -0
- package/dist/common/decorators/otp-length-aware.decorator.js.map +1 -0
- package/dist/common/decorators/pin-length-aware.decorator.d.ts +3 -0
- package/dist/common/decorators/pin-length-aware.decorator.d.ts.map +1 -0
- package/dist/common/decorators/pin-length-aware.decorator.js +8 -0
- package/dist/common/decorators/pin-length-aware.decorator.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 +10 -0
- package/dist/common/dto/pagination.dto.d.ts.map +1 -0
- package/dist/common/dto/pagination.dto.js +47 -0
- package/dist/common/dto/pagination.dto.js.map +1 -0
- package/dist/common/filters/http-exception.filter.d.ts +32 -0
- package/dist/common/filters/http-exception.filter.d.ts.map +1 -0
- package/dist/common/filters/http-exception.filter.js +211 -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 +46 -0
- package/dist/common/guards/auth.guard.js.map +1 -0
- package/dist/common/guards/index.d.ts +8 -0
- package/dist/common/guards/index.d.ts.map +1 -0
- package/dist/common/guards/index.js +24 -0
- package/dist/common/guards/index.js.map +1 -0
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts +18 -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 +77 -0
- package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -0
- package/dist/common/guards/non-production.guard.d.ts +11 -0
- package/dist/common/guards/non-production.guard.d.ts.map +1 -0
- package/dist/common/guards/non-production.guard.js +37 -0
- package/dist/common/guards/non-production.guard.js.map +1 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +20 -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 +85 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -0
- package/dist/common/guards/permissions.guard.d.ts +10 -0
- package/dist/common/guards/permissions.guard.d.ts.map +1 -0
- package/dist/common/guards/permissions.guard.js +49 -0
- package/dist/common/guards/permissions.guard.js.map +1 -0
- package/dist/common/guards/upload-ip-rate-limit.guard.d.ts +13 -0
- package/dist/common/guards/upload-ip-rate-limit.guard.d.ts.map +1 -0
- package/dist/common/guards/upload-ip-rate-limit.guard.js +63 -0
- package/dist/common/guards/upload-ip-rate-limit.guard.js.map +1 -0
- package/dist/common/guards/upload-user-rate-limit.guard.d.ts +13 -0
- package/dist/common/guards/upload-user-rate-limit.guard.d.ts.map +1 -0
- package/dist/common/guards/upload-user-rate-limit.guard.js +62 -0
- package/dist/common/guards/upload-user-rate-limit.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 +34 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/interceptors/index.d.ts +3 -0
- package/dist/common/interceptors/index.d.ts.map +1 -0
- package/dist/common/interceptors/index.js +19 -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 +52 -0
- package/dist/common/interceptors/logging.interceptor.js.map +1 -0
- package/dist/common/interceptors/timeout.interceptor.d.ts +13 -0
- package/dist/common/interceptors/timeout.interceptor.d.ts.map +1 -0
- package/dist/common/interceptors/timeout.interceptor.js +43 -0
- package/dist/common/interceptors/timeout.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.d.ts +20 -0
- package/dist/common/interfaces/request-user.d.ts.map +1 -0
- package/dist/common/interfaces/request-user.js +3 -0
- package/dist/common/interfaces/request-user.js.map +1 -0
- package/dist/common/interfaces/v.d.ts +20 -0
- package/dist/common/interfaces/v.d.ts.map +1 -0
- package/dist/common/interfaces/v.js +3 -0
- package/dist/common/interfaces/v.js.map +1 -0
- package/dist/common/middlewares/index.d.ts +7 -0
- package/dist/common/middlewares/index.d.ts.map +1 -0
- package/dist/common/middlewares/index.js +25 -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 +55 -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/fetch-with-timeout.util.d.ts +11 -0
- package/dist/common/utils/fetch-with-timeout.util.d.ts.map +1 -0
- package/dist/common/utils/fetch-with-timeout.util.js +36 -0
- package/dist/common/utils/fetch-with-timeout.util.js.map +1 -0
- package/dist/common/utils/index.d.ts +18 -0
- package/dist/common/utils/index.d.ts.map +1 -0
- package/dist/common/utils/index.js +57 -0
- package/dist/common/utils/index.js.map +1 -0
- package/dist/common/utils/multer-exception.util.d.ts +6 -0
- package/dist/common/utils/multer-exception.util.d.ts.map +1 -0
- package/dist/common/utils/multer-exception.util.js +31 -0
- package/dist/common/utils/multer-exception.util.js.map +1 -0
- package/dist/common/utils/request.utils.d.ts +19 -0
- package/dist/common/utils/request.utils.d.ts.map +1 -0
- package/dist/common/utils/request.utils.js +27 -0
- package/dist/common/utils/request.utils.js.map +1 -0
- package/dist/common/utils/validation.d.ts +19 -0
- package/dist/common/utils/validation.d.ts.map +1 -0
- package/dist/common/utils/validation.js +36 -0
- package/dist/common/utils/validation.js.map +1 -0
- package/dist/common/validators/is-configured-otp-length.validator.d.ts +10 -0
- package/dist/common/validators/is-configured-otp-length.validator.d.ts.map +1 -0
- package/dist/common/validators/is-configured-otp-length.validator.js +45 -0
- package/dist/common/validators/is-configured-otp-length.validator.js.map +1 -0
- package/dist/common/validators/is-configured-pin-length.validator.d.ts +7 -0
- package/dist/common/validators/is-configured-pin-length.validator.d.ts.map +1 -0
- package/dist/common/validators/is-configured-pin-length.validator.js +43 -0
- package/dist/common/validators/is-configured-pin-length.validator.js.map +1 -0
- package/dist/common/validators/is-exclusive-auth-params.validator.d.ts +8 -0
- package/dist/common/validators/is-exclusive-auth-params.validator.d.ts.map +1 -0
- package/dist/common/validators/is-exclusive-auth-params.validator.js +38 -0
- package/dist/common/validators/is-exclusive-auth-params.validator.js.map +1 -0
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.d.ts +7 -0
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.d.ts.map +1 -0
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js +37 -0
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js.map +1 -0
- package/dist/common/validators/is-immutable-auth-method.validator.d.ts +8 -0
- package/dist/common/validators/is-immutable-auth-method.validator.d.ts.map +1 -0
- package/dist/common/validators/is-immutable-auth-method.validator.js +36 -0
- package/dist/common/validators/is-immutable-auth-method.validator.js.map +1 -0
- package/dist/common/validators/is-otp-verification-code.validator.d.ts +7 -0
- package/dist/common/validators/is-otp-verification-code.validator.d.ts.map +1 -0
- package/dist/common/validators/is-otp-verification-code.validator.js +42 -0
- package/dist/common/validators/is-otp-verification-code.validator.js.map +1 -0
- package/dist/config/app.config.d.ts +102 -0
- package/dist/config/app.config.d.ts.map +1 -0
- package/dist/config/app.config.js +92 -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 +14 -0
- package/dist/config/database.config.js.map +1 -0
- package/dist/config/encryption.util.d.ts +10 -0
- package/dist/config/encryption.util.d.ts.map +1 -0
- package/dist/config/encryption.util.js +60 -0
- package/dist/config/encryption.util.js.map +1 -0
- package/dist/config/env-flags.util.d.ts +8 -0
- package/dist/config/env-flags.util.d.ts.map +1 -0
- package/dist/config/env-flags.util.js +19 -0
- package/dist/config/env-flags.util.js.map +1 -0
- package/dist/config/env-preload.util.d.ts +8 -0
- package/dist/config/env-preload.util.d.ts.map +1 -0
- package/dist/config/env-preload.util.js +21 -0
- package/dist/config/env-preload.util.js.map +1 -0
- package/dist/config/env.validation.d.ts +59 -0
- package/dist/config/env.validation.d.ts.map +1 -0
- package/dist/config/env.validation.js +291 -0
- package/dist/config/env.validation.js.map +1 -0
- package/dist/config/firebase.module.d.ts +10 -0
- package/dist/config/firebase.module.d.ts.map +1 -0
- package/dist/config/firebase.module.js +26 -0
- package/dist/config/firebase.module.js.map +1 -0
- package/dist/config/in-memory-redis.client.d.ts +25 -0
- package/dist/config/in-memory-redis.client.d.ts.map +1 -0
- package/dist/config/in-memory-redis.client.js +166 -0
- package/dist/config/in-memory-redis.client.js.map +1 -0
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +15 -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/node-env.util.d.ts +5 -0
- package/dist/config/node-env.util.d.ts.map +1 -0
- package/dist/config/node-env.util.js +10 -0
- package/dist/config/node-env.util.js.map +1 -0
- package/dist/config/redis-enabled.util.d.ts +6 -0
- package/dist/config/redis-enabled.util.d.ts.map +1 -0
- package/dist/config/redis-enabled.util.js +10 -0
- package/dist/config/redis-enabled.util.js.map +1 -0
- package/dist/config/redis-throttler.storage.d.ts +27 -0
- package/dist/config/redis-throttler.storage.d.ts.map +1 -0
- package/dist/config/redis-throttler.storage.js +73 -0
- package/dist/config/redis-throttler.storage.js.map +1 -0
- package/dist/config/redis.module.d.ts +13 -0
- package/dist/config/redis.module.d.ts.map +1 -0
- package/dist/config/redis.module.js +138 -0
- package/dist/config/redis.module.js.map +1 -0
- package/dist/config/tls.util.d.ts +33 -0
- package/dist/config/tls.util.d.ts.map +1 -0
- package/dist/config/tls.util.js +60 -0
- package/dist/config/tls.util.js.map +1 -0
- package/dist/core.module.d.ts +74 -0
- package/dist/core.module.d.ts.map +1 -0
- package/dist/core.module.js +169 -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 +45 -0
- package/dist/database/data-source.js.map +1 -0
- package/dist/database/migrations/1784284557959-full-schema.d.ts +7 -0
- package/dist/database/migrations/1784284557959-full-schema.d.ts.map +1 -0
- package/dist/database/migrations/1784284557959-full-schema.js +154 -0
- package/dist/database/migrations/1784284557959-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 +69 -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 +34 -0
- package/dist/database/seeds/run-seed.js.map +1 -0
- package/dist/database/seeds/settings.seed.d.ts +14 -0
- package/dist/database/seeds/settings.seed.d.ts.map +1 -0
- package/dist/database/seeds/settings.seed.js +609 -0
- package/dist/database/seeds/settings.seed.js.map +1 -0
- package/dist/database/seeds/templates/emails/account-created.html +47 -0
- package/dist/database/seeds/templates/emails/account-deleted.html +47 -0
- package/dist/database/seeds/templates/emails/account-reactivated.html +48 -0
- package/dist/database/seeds/templates/emails/account-suspended.html +46 -0
- package/dist/database/seeds/templates/emails/change-email-verification.html +283 -0
- package/dist/database/seeds/templates/emails/invitation.html +66 -0
- package/dist/database/seeds/templates/emails/password-reset.html +278 -0
- package/dist/database/seeds/templates/emails/reply-notification.html +282 -0
- package/dist/database/seeds/templates/emails/resetpassword.html +291 -0
- package/dist/database/seeds/templates/emails/verify-email.html +62 -0
- package/dist/database/seeds/templates/emails/welcome.html +46 -0
- package/dist/database/seeds/templates/html-template.reader.d.ts +10 -0
- package/dist/database/seeds/templates/html-template.reader.d.ts.map +1 -0
- package/dist/database/seeds/templates/html-template.reader.js +83 -0
- package/dist/database/seeds/templates/html-template.reader.js.map +1 -0
- package/dist/database/seeds/templates/html-template.reader.ts +84 -0
- package/dist/database/seeds/user.seed.d.ts +14 -0
- package/dist/database/seeds/user.seed.d.ts.map +1 -0
- package/dist/database/seeds/user.seed.js +106 -0
- package/dist/database/seeds/user.seed.js.map +1 -0
- package/dist/database/typeorm.service.d.ts +19 -0
- package/dist/database/typeorm.service.d.ts.map +1 -0
- package/dist/database/typeorm.service.js +53 -0
- package/dist/database/typeorm.service.js.map +1 -0
- package/dist/database/typeorm.util.d.ts +108 -0
- package/dist/database/typeorm.util.d.ts.map +1 -0
- package/dist/database/typeorm.util.js +163 -0
- package/dist/database/typeorm.util.js.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +126 -0
- package/dist/index.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 +25 -0
- package/dist/modules/admin/admin.module.js.map +1 -0
- package/dist/modules/admin/controllers/admin.controller.d.ts +51 -0
- package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -0
- package/dist/modules/admin/controllers/admin.controller.js +198 -0
- package/dist/modules/admin/controllers/admin.controller.js.map +1 -0
- package/dist/modules/admin/dto/admin-log.dto.d.ts +21 -0
- package/dist/modules/admin/dto/admin-log.dto.d.ts.map +1 -0
- package/dist/modules/admin/dto/admin-log.dto.js +63 -0
- package/dist/modules/admin/dto/admin-log.dto.js.map +1 -0
- package/dist/modules/admin/entities/admin-log.entity.d.ts +20 -0
- package/dist/modules/admin/entities/admin-log.entity.d.ts.map +1 -0
- package/dist/modules/admin/entities/admin-log.entity.js +65 -0
- package/dist/modules/admin/entities/admin-log.entity.js.map +1 -0
- package/dist/modules/admin/services/admin-log.service.d.ts +12 -0
- package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -0
- package/dist/modules/admin/services/admin-log.service.js +63 -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 +64 -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 +71 -0
- package/dist/modules/auth/auth.module.js.map +1 -0
- package/dist/modules/auth/controllers/account.controller.d.ts +30 -0
- package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/account.controller.js +131 -0
- package/dist/modules/auth/controllers/account.controller.js.map +1 -0
- package/dist/modules/auth/controllers/auth.controller.d.ts +21 -0
- package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/auth.controller.js +218 -0
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -0
- package/dist/modules/auth/controllers/forgot-password.controller.d.ts +17 -0
- package/dist/modules/auth/controllers/forgot-password.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/forgot-password.controller.js +98 -0
- package/dist/modules/auth/controllers/forgot-password.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 +166 -0
- package/dist/modules/auth/controllers/otp.controller.js.map +1 -0
- package/dist/modules/auth/controllers/pin.controller.d.ts +22 -0
- package/dist/modules/auth/controllers/pin.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/pin.controller.js +212 -0
- package/dist/modules/auth/controllers/pin.controller.js.map +1 -0
- package/dist/modules/auth/controllers/session.controller.d.ts +19 -0
- package/dist/modules/auth/controllers/session.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/session.controller.js +139 -0
- package/dist/modules/auth/controllers/session.controller.js.map +1 -0
- package/dist/modules/auth/dto/auth-config.dto.d.ts +7 -0
- package/dist/modules/auth/dto/auth-config.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/auth-config.dto.js +54 -0
- package/dist/modules/auth/dto/auth-config.dto.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/login.dto.d.ts +15 -0
- package/dist/modules/auth/dto/login.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/login.dto.js +68 -0
- package/dist/modules/auth/dto/login.dto.js.map +1 -0
- package/dist/modules/auth/dto/otp.dto.d.ts +48 -0
- package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/otp.dto.js +217 -0
- package/dist/modules/auth/dto/otp.dto.js.map +1 -0
- package/dist/modules/auth/dto/password.dto.d.ts +31 -0
- package/dist/modules/auth/dto/password.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/password.dto.js +168 -0
- package/dist/modules/auth/dto/password.dto.js.map +1 -0
- package/dist/modules/auth/dto/pin.dto.d.ts +31 -0
- package/dist/modules/auth/dto/pin.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/pin.dto.js +177 -0
- package/dist/modules/auth/dto/pin.dto.js.map +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts +18 -0
- package/dist/modules/auth/dto/register.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/register.dto.js +69 -0
- package/dist/modules/auth/dto/register.dto.js.map +1 -0
- package/dist/modules/auth/dto/test-login.dto.d.ts +11 -0
- package/dist/modules/auth/dto/test-login.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/test-login.dto.js +78 -0
- package/dist/modules/auth/dto/test-login.dto.js.map +1 -0
- package/dist/modules/auth/dto/token.dto.d.ts +38 -0
- package/dist/modules/auth/dto/token.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/token.dto.js +69 -0
- package/dist/modules/auth/dto/token.dto.js.map +1 -0
- package/dist/modules/auth/entities/index.d.ts +3 -0
- package/dist/modules/auth/entities/index.d.ts.map +1 -0
- package/dist/modules/auth/entities/index.js +19 -0
- package/dist/modules/auth/entities/index.js.map +1 -0
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts +14 -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 +49 -0
- package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -0
- package/dist/modules/auth/entities/user-pin.entity.d.ts +38 -0
- package/dist/modules/auth/entities/user-pin.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/user-pin.entity.js +83 -0
- package/dist/modules/auth/entities/user-pin.entity.js.map +1 -0
- package/dist/modules/auth/events/auth.events.d.ts +45 -0
- package/dist/modules/auth/events/auth.events.d.ts.map +1 -0
- package/dist/modules/auth/events/auth.events.js +22 -0
- package/dist/modules/auth/events/auth.events.js.map +1 -0
- package/dist/modules/auth/events/index.d.ts +2 -0
- package/dist/modules/auth/events/index.d.ts.map +1 -0
- package/dist/modules/auth/events/index.js +18 -0
- package/dist/modules/auth/events/index.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 +4 -0
- package/dist/modules/auth/providers/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/index.js +20 -0
- package/dist/modules/auth/providers/index.js.map +1 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.d.ts +90 -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 +11 -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 +58 -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 +192 -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 +144 -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 +12 -0
- package/dist/modules/auth/providers/provider.registry.d.ts.map +1 -0
- package/dist/modules/auth/providers/provider.registry.js +45 -0
- package/dist/modules/auth/providers/provider.registry.js.map +1 -0
- package/dist/modules/auth/services/account.service.d.ts +64 -0
- package/dist/modules/auth/services/account.service.d.ts.map +1 -0
- package/dist/modules/auth/services/account.service.js +203 -0
- package/dist/modules/auth/services/account.service.js.map +1 -0
- package/dist/modules/auth/services/index.d.ts +7 -0
- package/dist/modules/auth/services/index.d.ts.map +1 -0
- package/dist/modules/auth/services/index.js +23 -0
- package/dist/modules/auth/services/index.js.map +1 -0
- package/dist/modules/auth/services/login.service.d.ts +72 -0
- package/dist/modules/auth/services/login.service.d.ts.map +1 -0
- package/dist/modules/auth/services/login.service.js +337 -0
- package/dist/modules/auth/services/login.service.js.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts +30 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.js +140 -0
- package/dist/modules/auth/services/otp-auth.service.js.map +1 -0
- package/dist/modules/auth/services/password.service.d.ts +56 -0
- package/dist/modules/auth/services/password.service.d.ts.map +1 -0
- package/dist/modules/auth/services/password.service.js +225 -0
- package/dist/modules/auth/services/password.service.js.map +1 -0
- package/dist/modules/auth/services/pin-auth.service.d.ts +73 -0
- package/dist/modules/auth/services/pin-auth.service.d.ts.map +1 -0
- package/dist/modules/auth/services/pin-auth.service.js +290 -0
- package/dist/modules/auth/services/pin-auth.service.js.map +1 -0
- package/dist/modules/auth/services/registration.service.d.ts +41 -0
- package/dist/modules/auth/services/registration.service.d.ts.map +1 -0
- package/dist/modules/auth/services/registration.service.js +330 -0
- package/dist/modules/auth/services/registration.service.js.map +1 -0
- package/dist/modules/auth/types/auth-identity.d.ts +7 -0
- package/dist/modules/auth/types/auth-identity.d.ts.map +1 -0
- package/dist/modules/auth/types/auth-identity.js +3 -0
- package/dist/modules/auth/types/auth-identity.js.map +1 -0
- package/dist/modules/auth/utils/auth-method.util.d.ts +4 -0
- package/dist/modules/auth/utils/auth-method.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/auth-method.util.js +9 -0
- package/dist/modules/auth/utils/auth-method.util.js.map +1 -0
- package/dist/modules/auth/utils/auth-params.util.d.ts +25 -0
- package/dist/modules/auth/utils/auth-params.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/auth-params.util.js +54 -0
- package/dist/modules/auth/utils/auth-params.util.js.map +1 -0
- package/dist/modules/auth/utils/auth-supported.util.d.ts +4 -0
- package/dist/modules/auth/utils/auth-supported.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/auth-supported.util.js +18 -0
- package/dist/modules/auth/utils/auth-supported.util.js.map +1 -0
- package/dist/modules/delivery/composers/email.composer.d.ts +9 -0
- package/dist/modules/delivery/composers/email.composer.d.ts.map +1 -0
- package/dist/modules/delivery/composers/email.composer.js +45 -0
- package/dist/modules/delivery/composers/email.composer.js.map +1 -0
- package/dist/modules/delivery/composers/otp-delivery.composer.d.ts +19 -0
- package/dist/modules/delivery/composers/otp-delivery.composer.d.ts.map +1 -0
- package/dist/modules/delivery/composers/otp-delivery.composer.js +59 -0
- package/dist/modules/delivery/composers/otp-delivery.composer.js.map +1 -0
- package/dist/modules/delivery/delivery.manifest.d.ts +7 -0
- package/dist/modules/delivery/delivery.manifest.d.ts.map +1 -0
- package/dist/modules/delivery/delivery.manifest.js +25 -0
- package/dist/modules/delivery/delivery.manifest.js.map +1 -0
- package/dist/modules/delivery/delivery.module.d.ts +5 -0
- package/dist/modules/delivery/delivery.module.d.ts.map +1 -0
- package/dist/modules/delivery/delivery.module.js +76 -0
- package/dist/modules/delivery/delivery.module.js.map +1 -0
- package/dist/modules/delivery/dto/notification-delivery-log.dto.d.ts +10 -0
- package/dist/modules/delivery/dto/notification-delivery-log.dto.d.ts.map +1 -0
- package/dist/modules/delivery/dto/notification-delivery-log.dto.js +60 -0
- package/dist/modules/delivery/dto/notification-delivery-log.dto.js.map +1 -0
- package/dist/modules/delivery/entities/notification-delivery-log.entity.d.ts +28 -0
- package/dist/modules/delivery/entities/notification-delivery-log.entity.d.ts.map +1 -0
- package/dist/modules/delivery/entities/notification-delivery-log.entity.js +87 -0
- package/dist/modules/delivery/entities/notification-delivery-log.entity.js.map +1 -0
- package/dist/modules/delivery/index.d.ts +8 -0
- package/dist/modules/delivery/index.d.ts.map +1 -0
- package/dist/modules/delivery/index.js +14 -0
- package/dist/modules/delivery/index.js.map +1 -0
- package/dist/modules/delivery/notification-delivery.service.d.ts +63 -0
- package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -0
- package/dist/modules/delivery/notification-delivery.service.js +404 -0
- package/dist/modules/delivery/notification-delivery.service.js.map +1 -0
- package/dist/modules/delivery/processors/delivery-errors.util.d.ts +8 -0
- package/dist/modules/delivery/processors/delivery-errors.util.d.ts.map +1 -0
- package/dist/modules/delivery/processors/delivery-errors.util.js +60 -0
- package/dist/modules/delivery/processors/delivery-errors.util.js.map +1 -0
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts +25 -0
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -0
- package/dist/modules/delivery/processors/delivery-job.runner.js +167 -0
- package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -0
- package/dist/modules/delivery/processors/delivery.processor.d.ts +10 -0
- package/dist/modules/delivery/processors/delivery.processor.d.ts.map +1 -0
- package/dist/modules/delivery/processors/delivery.processor.js +31 -0
- package/dist/modules/delivery/processors/delivery.processor.js.map +1 -0
- package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts +24 -0
- package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts.map +1 -0
- package/dist/modules/delivery/processors/otp-delivery-job.runner.js +141 -0
- package/dist/modules/delivery/processors/otp-delivery-job.runner.js.map +1 -0
- package/dist/modules/delivery/processors/otp-delivery.processor.d.ts +10 -0
- package/dist/modules/delivery/processors/otp-delivery.processor.d.ts.map +1 -0
- package/dist/modules/delivery/processors/otp-delivery.processor.js +31 -0
- package/dist/modules/delivery/processors/otp-delivery.processor.js.map +1 -0
- package/dist/modules/delivery/queues/sync-jobs.queue.d.ts +22 -0
- package/dist/modules/delivery/queues/sync-jobs.queue.d.ts.map +1 -0
- package/dist/modules/delivery/queues/sync-jobs.queue.js +76 -0
- package/dist/modules/delivery/queues/sync-jobs.queue.js.map +1 -0
- package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts +15 -0
- package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts.map +1 -0
- package/dist/modules/delivery/services/delivery-audit-retention.service.js +68 -0
- package/dist/modules/delivery/services/delivery-audit-retention.service.js.map +1 -0
- package/dist/modules/delivery/services/notification-audit.service.d.ts +46 -0
- package/dist/modules/delivery/services/notification-audit.service.d.ts.map +1 -0
- package/dist/modules/delivery/services/notification-audit.service.js +200 -0
- package/dist/modules/delivery/services/notification-audit.service.js.map +1 -0
- package/dist/modules/delivery/templates/email-template.registry.d.ts +12 -0
- package/dist/modules/delivery/templates/email-template.registry.d.ts.map +1 -0
- package/dist/modules/delivery/templates/email-template.registry.js +74 -0
- package/dist/modules/delivery/templates/email-template.registry.js.map +1 -0
- package/dist/modules/delivery/templates/otp-sms.template.d.ts +5 -0
- package/dist/modules/delivery/templates/otp-sms.template.d.ts.map +1 -0
- package/dist/modules/delivery/templates/otp-sms.template.js +10 -0
- package/dist/modules/delivery/templates/otp-sms.template.js.map +1 -0
- package/dist/modules/delivery/templates/render-email-template.d.ts +7 -0
- package/dist/modules/delivery/templates/render-email-template.d.ts.map +1 -0
- package/dist/modules/delivery/templates/render-email-template.js +14 -0
- package/dist/modules/delivery/templates/render-email-template.js.map +1 -0
- package/dist/modules/delivery/templates/render-sms-template.d.ts +5 -0
- package/dist/modules/delivery/templates/render-sms-template.d.ts.map +1 -0
- package/dist/modules/delivery/templates/render-sms-template.js +13 -0
- package/dist/modules/delivery/templates/render-sms-template.js.map +1 -0
- package/dist/modules/delivery/types/email-metadata.d.ts +18 -0
- package/dist/modules/delivery/types/email-metadata.d.ts.map +1 -0
- package/dist/modules/delivery/types/email-metadata.js +3 -0
- package/dist/modules/delivery/types/email-metadata.js.map +1 -0
- package/dist/modules/delivery/types/payload-snapshot.d.ts +19 -0
- package/dist/modules/delivery/types/payload-snapshot.d.ts.map +1 -0
- package/dist/modules/delivery/types/payload-snapshot.js +3 -0
- package/dist/modules/delivery/types/payload-snapshot.js.map +1 -0
- package/dist/modules/delivery/utils/audit-recipient.util.d.ts +4 -0
- package/dist/modules/delivery/utils/audit-recipient.util.d.ts.map +1 -0
- package/dist/modules/delivery/utils/audit-recipient.util.js +32 -0
- package/dist/modules/delivery/utils/audit-recipient.util.js.map +1 -0
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts +4 -0
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -0
- package/dist/modules/delivery/utils/payload-snapshot.util.js +35 -0
- package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -0
- package/dist/modules/file-upload/constants/upload.types.d.ts +36 -0
- package/dist/modules/file-upload/constants/upload.types.d.ts.map +1 -0
- package/dist/modules/file-upload/constants/upload.types.js +43 -0
- package/dist/modules/file-upload/constants/upload.types.js.map +1 -0
- package/dist/modules/file-upload/controllers/file-upload.controller.d.ts +19 -0
- package/dist/modules/file-upload/controllers/file-upload.controller.d.ts.map +1 -0
- package/dist/modules/file-upload/controllers/file-upload.controller.js +439 -0
- package/dist/modules/file-upload/controllers/file-upload.controller.js.map +1 -0
- package/dist/modules/file-upload/dto/file-upload.dto.d.ts +65 -0
- package/dist/modules/file-upload/dto/file-upload.dto.d.ts.map +1 -0
- package/dist/modules/file-upload/dto/file-upload.dto.js +441 -0
- package/dist/modules/file-upload/dto/file-upload.dto.js.map +1 -0
- package/dist/modules/file-upload/entities/index.d.ts +3 -0
- package/dist/modules/file-upload/entities/index.d.ts.map +1 -0
- package/dist/modules/file-upload/entities/index.js +19 -0
- package/dist/modules/file-upload/entities/index.js.map +1 -0
- package/dist/modules/file-upload/entities/pending-file-upload.entity.d.ts +12 -0
- package/dist/modules/file-upload/entities/pending-file-upload.entity.d.ts.map +1 -0
- package/dist/modules/file-upload/entities/pending-file-upload.entity.js +55 -0
- package/dist/modules/file-upload/entities/pending-file-upload.entity.js.map +1 -0
- package/dist/modules/file-upload/entities/uploaded-file.entity.d.ts +19 -0
- package/dist/modules/file-upload/entities/uploaded-file.entity.d.ts.map +1 -0
- package/dist/modules/file-upload/entities/uploaded-file.entity.js +82 -0
- package/dist/modules/file-upload/entities/uploaded-file.entity.js.map +1 -0
- package/dist/modules/file-upload/file-upload.manifest.d.ts +8 -0
- package/dist/modules/file-upload/file-upload.manifest.d.ts.map +1 -0
- package/dist/modules/file-upload/file-upload.manifest.js +31 -0
- package/dist/modules/file-upload/file-upload.manifest.js.map +1 -0
- package/dist/modules/file-upload/file-upload.module.d.ts +3 -0
- package/dist/modules/file-upload/file-upload.module.d.ts.map +1 -0
- package/dist/modules/file-upload/file-upload.module.js +39 -0
- package/dist/modules/file-upload/file-upload.module.js.map +1 -0
- package/dist/modules/file-upload/index.d.ts +7 -0
- package/dist/modules/file-upload/index.d.ts.map +1 -0
- package/dist/modules/file-upload/index.js +23 -0
- package/dist/modules/file-upload/index.js.map +1 -0
- package/dist/modules/file-upload/interceptors/disk-file.interceptor.d.ts +3 -0
- package/dist/modules/file-upload/interceptors/disk-file.interceptor.d.ts.map +1 -0
- package/dist/modules/file-upload/interceptors/disk-file.interceptor.js +30 -0
- package/dist/modules/file-upload/interceptors/disk-file.interceptor.js.map +1 -0
- package/dist/modules/file-upload/interfaces/file-scan.service.interface.d.ts +11 -0
- package/dist/modules/file-upload/interfaces/file-scan.service.interface.d.ts.map +1 -0
- package/dist/modules/file-upload/interfaces/file-scan.service.interface.js +10 -0
- package/dist/modules/file-upload/interfaces/file-scan.service.interface.js.map +1 -0
- package/dist/modules/file-upload/services/file-upload.service.d.ts +82 -0
- package/dist/modules/file-upload/services/file-upload.service.d.ts.map +1 -0
- package/dist/modules/file-upload/services/file-upload.service.js +639 -0
- package/dist/modules/file-upload/services/file-upload.service.js.map +1 -0
- package/dist/modules/file-upload/services/noop-file-scan.service.d.ts +10 -0
- package/dist/modules/file-upload/services/noop-file-scan.service.d.ts.map +1 -0
- package/dist/modules/file-upload/services/noop-file-scan.service.js +22 -0
- package/dist/modules/file-upload/services/noop-file-scan.service.js.map +1 -0
- package/dist/modules/file-upload/services/r2-storage.service.d.ts +41 -0
- package/dist/modules/file-upload/services/r2-storage.service.d.ts.map +1 -0
- package/dist/modules/file-upload/services/r2-storage.service.js +171 -0
- package/dist/modules/file-upload/services/r2-storage.service.js.map +1 -0
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts +16 -0
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts.map +1 -0
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js +73 -0
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js.map +1 -0
- package/dist/modules/file-upload/utils/file-payload.util.d.ts +21 -0
- package/dist/modules/file-upload/utils/file-payload.util.d.ts.map +1 -0
- package/dist/modules/file-upload/utils/file-payload.util.js +75 -0
- package/dist/modules/file-upload/utils/file-payload.util.js.map +1 -0
- package/dist/modules/file-upload/utils/file-sniff.util.d.ts +7 -0
- package/dist/modules/file-upload/utils/file-sniff.util.d.ts.map +1 -0
- package/dist/modules/file-upload/utils/file-sniff.util.js +70 -0
- package/dist/modules/file-upload/utils/file-sniff.util.js.map +1 -0
- package/dist/modules/file-upload/utils/filename.util.d.ts +6 -0
- package/dist/modules/file-upload/utils/filename.util.d.ts.map +1 -0
- package/dist/modules/file-upload/utils/filename.util.js +20 -0
- package/dist/modules/file-upload/utils/filename.util.js.map +1 -0
- package/dist/modules/file-upload/utils/image-dimension.validator.d.ts +3 -0
- package/dist/modules/file-upload/utils/image-dimension.validator.d.ts.map +1 -0
- package/dist/modules/file-upload/utils/image-dimension.validator.js +29 -0
- package/dist/modules/file-upload/utils/image-dimension.validator.js.map +1 -0
- package/dist/modules/file-upload/utils/image-optimize.util.d.ts +11 -0
- package/dist/modules/file-upload/utils/image-optimize.util.d.ts.map +1 -0
- package/dist/modules/file-upload/utils/image-optimize.util.js +42 -0
- package/dist/modules/file-upload/utils/image-optimize.util.js.map +1 -0
- package/dist/modules/file-upload/utils/office-zip.validator.d.ts +9 -0
- package/dist/modules/file-upload/utils/office-zip.validator.d.ts.map +1 -0
- package/dist/modules/file-upload/utils/office-zip.validator.js +31 -0
- package/dist/modules/file-upload/utils/office-zip.validator.js.map +1 -0
- package/dist/modules/file-upload/utils/upload-category.validator.d.ts +14 -0
- package/dist/modules/file-upload/utils/upload-category.validator.d.ts.map +1 -0
- package/dist/modules/file-upload/utils/upload-category.validator.js +113 -0
- package/dist/modules/file-upload/utils/upload-category.validator.js.map +1 -0
- package/dist/modules/health/health.controller.d.ts +31 -0
- package/dist/modules/health/health.controller.d.ts.map +1 -0
- package/dist/modules/health/health.controller.js +189 -0
- package/dist/modules/health/health.controller.js.map +1 -0
- package/dist/modules/health/health.module.d.ts +3 -0
- package/dist/modules/health/health.module.d.ts.map +1 -0
- package/dist/modules/health/health.module.js +35 -0
- package/dist/modules/health/health.module.js.map +1 -0
- package/dist/modules/invitations/controllers/invitations.controller.d.ts +20 -0
- package/dist/modules/invitations/controllers/invitations.controller.d.ts.map +1 -0
- package/dist/modules/invitations/controllers/invitations.controller.js +124 -0
- package/dist/modules/invitations/controllers/invitations.controller.js.map +1 -0
- package/dist/modules/invitations/dto/invitation.dto.d.ts +24 -0
- package/dist/modules/invitations/dto/invitation.dto.d.ts.map +1 -0
- package/dist/modules/invitations/dto/invitation.dto.js +150 -0
- package/dist/modules/invitations/dto/invitation.dto.js.map +1 -0
- package/dist/modules/invitations/entities/invitation.entity.d.ts +41 -0
- package/dist/modules/invitations/entities/invitation.entity.d.ts.map +1 -0
- package/dist/modules/invitations/entities/invitation.entity.js +154 -0
- package/dist/modules/invitations/entities/invitation.entity.js.map +1 -0
- package/dist/modules/invitations/index.d.ts +6 -0
- package/dist/modules/invitations/index.d.ts.map +1 -0
- package/dist/modules/invitations/index.js +22 -0
- package/dist/modules/invitations/index.js.map +1 -0
- package/dist/modules/invitations/invitations.manifest.d.ts +9 -0
- package/dist/modules/invitations/invitations.manifest.d.ts.map +1 -0
- package/dist/modules/invitations/invitations.manifest.js +37 -0
- package/dist/modules/invitations/invitations.manifest.js.map +1 -0
- package/dist/modules/invitations/invitations.module.d.ts +3 -0
- package/dist/modules/invitations/invitations.module.d.ts.map +1 -0
- package/dist/modules/invitations/invitations.module.js +26 -0
- package/dist/modules/invitations/invitations.module.js.map +1 -0
- package/dist/modules/invitations/services/invitations.service.d.ts +40 -0
- package/dist/modules/invitations/services/invitations.service.d.ts.map +1 -0
- package/dist/modules/invitations/services/invitations.service.js +277 -0
- package/dist/modules/invitations/services/invitations.service.js.map +1 -0
- package/dist/modules/jobs/constants/delivery-errors.d.ts +6 -0
- package/dist/modules/jobs/constants/delivery-errors.d.ts.map +1 -0
- package/dist/modules/jobs/constants/delivery-errors.js +9 -0
- package/dist/modules/jobs/constants/delivery-errors.js.map +1 -0
- package/dist/modules/jobs/email/email.module.d.ts +3 -0
- package/dist/modules/jobs/email/email.module.d.ts.map +1 -0
- package/dist/modules/jobs/email/email.module.js +21 -0
- package/dist/modules/jobs/email/email.module.js.map +1 -0
- package/dist/modules/jobs/email/email.types.d.ts +23 -0
- package/dist/modules/jobs/email/email.types.d.ts.map +1 -0
- package/dist/modules/jobs/email/email.types.js +20 -0
- package/dist/modules/jobs/email/email.types.js.map +1 -0
- package/dist/modules/jobs/email/index.d.ts +4 -0
- package/dist/modules/jobs/email/index.d.ts.map +1 -0
- package/dist/modules/jobs/email/index.js +20 -0
- package/dist/modules/jobs/email/index.js.map +1 -0
- package/dist/modules/jobs/email/smtp-email.service.d.ts +22 -0
- package/dist/modules/jobs/email/smtp-email.service.d.ts.map +1 -0
- package/dist/modules/jobs/email/smtp-email.service.js +144 -0
- package/dist/modules/jobs/email/smtp-email.service.js.map +1 -0
- package/dist/modules/jobs/index.d.ts +3 -0
- package/dist/modules/jobs/index.d.ts.map +1 -0
- package/dist/modules/jobs/index.js +6 -0
- package/dist/modules/jobs/index.js.map +1 -0
- package/dist/modules/jobs/jobs-disabled.notifier.d.ts +8 -0
- package/dist/modules/jobs/jobs-disabled.notifier.d.ts.map +1 -0
- package/dist/modules/jobs/jobs-disabled.notifier.js +31 -0
- package/dist/modules/jobs/jobs-disabled.notifier.js.map +1 -0
- package/dist/modules/jobs/jobs.module.d.ts +5 -0
- package/dist/modules/jobs/jobs.module.d.ts.map +1 -0
- package/dist/modules/jobs/jobs.module.js +61 -0
- package/dist/modules/jobs/jobs.module.js.map +1 -0
- package/dist/modules/jobs/processors/email.processor.d.ts +14 -0
- package/dist/modules/jobs/processors/email.processor.d.ts.map +1 -0
- package/dist/modules/jobs/processors/email.processor.js +70 -0
- package/dist/modules/jobs/processors/email.processor.js.map +1 -0
- package/dist/modules/jobs/processors/jobs.processor.d.ts +24 -0
- package/dist/modules/jobs/processors/jobs.processor.d.ts.map +1 -0
- package/dist/modules/jobs/processors/jobs.processor.js +125 -0
- package/dist/modules/jobs/processors/jobs.processor.js.map +1 -0
- package/dist/modules/jobs/queues/jobs.queue.d.ts +63 -0
- package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -0
- package/dist/modules/jobs/queues/jobs.queue.js +92 -0
- package/dist/modules/jobs/queues/jobs.queue.js.map +1 -0
- package/dist/modules/jobs/queues/queue-names.d.ts +12 -0
- package/dist/modules/jobs/queues/queue-names.d.ts.map +1 -0
- package/dist/modules/jobs/queues/queue-names.js +14 -0
- package/dist/modules/jobs/queues/queue-names.js.map +1 -0
- package/dist/modules/jobs/sms/index.d.ts +4 -0
- package/dist/modules/jobs/sms/index.d.ts.map +1 -0
- package/dist/modules/jobs/sms/index.js +20 -0
- package/dist/modules/jobs/sms/index.js.map +1 -0
- package/dist/modules/jobs/sms/providers/index.d.ts +5 -0
- package/dist/modules/jobs/sms/providers/index.d.ts.map +1 -0
- package/dist/modules/jobs/sms/providers/index.js +21 -0
- package/dist/modules/jobs/sms/providers/index.js.map +1 -0
- package/dist/modules/jobs/sms/providers/infobip.provider.d.ts +11 -0
- package/dist/modules/jobs/sms/providers/infobip.provider.d.ts.map +1 -0
- package/dist/modules/jobs/sms/providers/infobip.provider.js +87 -0
- package/dist/modules/jobs/sms/providers/infobip.provider.js.map +1 -0
- package/dist/modules/jobs/sms/providers/smart-sms.provider.d.ts +12 -0
- package/dist/modules/jobs/sms/providers/smart-sms.provider.d.ts.map +1 -0
- package/dist/modules/jobs/sms/providers/smart-sms.provider.js +84 -0
- package/dist/modules/jobs/sms/providers/smart-sms.provider.js.map +1 -0
- package/dist/modules/jobs/sms/providers/termii.provider.d.ts +12 -0
- package/dist/modules/jobs/sms/providers/termii.provider.d.ts.map +1 -0
- package/dist/modules/jobs/sms/providers/termii.provider.js +82 -0
- package/dist/modules/jobs/sms/providers/termii.provider.js.map +1 -0
- package/dist/modules/jobs/sms/providers/twilio.provider.d.ts +11 -0
- package/dist/modules/jobs/sms/providers/twilio.provider.d.ts.map +1 -0
- package/dist/modules/jobs/sms/providers/twilio.provider.js +85 -0
- package/dist/modules/jobs/sms/providers/twilio.provider.js.map +1 -0
- package/dist/modules/jobs/sms/sms-provider.interface.d.ts +26 -0
- package/dist/modules/jobs/sms/sms-provider.interface.d.ts.map +1 -0
- package/dist/modules/jobs/sms/sms-provider.interface.js +27 -0
- package/dist/modules/jobs/sms/sms-provider.interface.js.map +1 -0
- package/dist/modules/jobs/sms/sms-proxy.service.d.ts +27 -0
- package/dist/modules/jobs/sms/sms-proxy.service.d.ts.map +1 -0
- package/dist/modules/jobs/sms/sms-proxy.service.js +90 -0
- package/dist/modules/jobs/sms/sms-proxy.service.js.map +1 -0
- package/dist/modules/jobs/sms/sms.module.d.ts +3 -0
- package/dist/modules/jobs/sms/sms.module.d.ts.map +1 -0
- package/dist/modules/jobs/sms/sms.module.js +33 -0
- package/dist/modules/jobs/sms/sms.module.js.map +1 -0
- package/dist/modules/jobs/templates/email-template.registry.d.ts +25 -0
- package/dist/modules/jobs/templates/email-template.registry.d.ts.map +1 -0
- package/dist/modules/jobs/templates/email-template.registry.js +93 -0
- package/dist/modules/jobs/templates/email-template.registry.js.map +1 -0
- package/dist/modules/jobs/templates/otp-sms.template.d.ts +5 -0
- package/dist/modules/jobs/templates/otp-sms.template.d.ts.map +1 -0
- package/dist/modules/jobs/templates/otp-sms.template.js +10 -0
- package/dist/modules/jobs/templates/otp-sms.template.js.map +1 -0
- package/dist/modules/jobs/templates/render-email-template.d.ts +7 -0
- package/dist/modules/jobs/templates/render-email-template.d.ts.map +1 -0
- package/dist/modules/jobs/templates/render-email-template.js +14 -0
- package/dist/modules/jobs/templates/render-email-template.js.map +1 -0
- package/dist/modules/jobs/utils/queue-errors.util.d.ts +2 -0
- package/dist/modules/jobs/utils/queue-errors.util.d.ts.map +1 -0
- package/dist/modules/jobs/utils/queue-errors.util.js +8 -0
- package/dist/modules/jobs/utils/queue-errors.util.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 +62 -0
- package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -0
- package/dist/modules/notifications/controllers/notifications.controller.js +179 -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 +42 -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 +48 -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 +69 -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 +78 -0
- package/dist/modules/notifications/entities/notification.entity.js.map +1 -0
- package/dist/modules/notifications/firebase.module.d.ts +8 -0
- package/dist/modules/notifications/firebase.module.d.ts.map +1 -0
- package/dist/modules/notifications/firebase.module.js +30 -0
- package/dist/modules/notifications/firebase.module.js.map +1 -0
- package/dist/modules/notifications/notifications.manifest.d.ts +11 -0
- package/dist/modules/notifications/notifications.manifest.d.ts.map +1 -0
- package/dist/modules/notifications/notifications.manifest.js +49 -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 +26 -0
- package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/fcm.service.js +217 -0
- package/dist/modules/notifications/services/fcm.service.js.map +1 -0
- package/dist/modules/notifications/services/firebase.service.d.ts +36 -0
- package/dist/modules/notifications/services/firebase.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/firebase.service.js +100 -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 +46 -0
- package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/notifications.service.js +179 -0
- package/dist/modules/notifications/services/notifications.service.js.map +1 -0
- package/dist/modules/observability/context/job-context.util.d.ts +9 -0
- package/dist/modules/observability/context/job-context.util.d.ts.map +1 -0
- package/dist/modules/observability/context/job-context.util.js +56 -0
- package/dist/modules/observability/context/job-context.util.js.map +1 -0
- package/dist/modules/observability/context/observability-context.middleware.d.ts +9 -0
- package/dist/modules/observability/context/observability-context.middleware.d.ts.map +1 -0
- package/dist/modules/observability/context/observability-context.middleware.js +41 -0
- package/dist/modules/observability/context/observability-context.middleware.js.map +1 -0
- package/dist/modules/observability/context/observability-context.store.d.ts +9 -0
- package/dist/modules/observability/context/observability-context.store.d.ts.map +1 -0
- package/dist/modules/observability/context/observability-context.store.js +34 -0
- package/dist/modules/observability/context/observability-context.store.js.map +1 -0
- package/dist/modules/observability/context/request-id.util.d.ts +4 -0
- package/dist/modules/observability/context/request-id.util.d.ts.map +1 -0
- package/dist/modules/observability/context/request-id.util.js +17 -0
- package/dist/modules/observability/context/request-id.util.js.map +1 -0
- package/dist/modules/observability/controllers/metrics.controller.d.ts +8 -0
- package/dist/modules/observability/controllers/metrics.controller.d.ts.map +1 -0
- package/dist/modules/observability/controllers/metrics.controller.js +56 -0
- package/dist/modules/observability/controllers/metrics.controller.js.map +1 -0
- package/dist/modules/observability/errors/error-reporter.interface.d.ts +18 -0
- package/dist/modules/observability/errors/error-reporter.interface.d.ts.map +1 -0
- package/dist/modules/observability/errors/error-reporter.interface.js +5 -0
- package/dist/modules/observability/errors/error-reporter.interface.js.map +1 -0
- package/dist/modules/observability/errors/error-reporter.service.d.ts +8 -0
- package/dist/modules/observability/errors/error-reporter.service.d.ts.map +1 -0
- package/dist/modules/observability/errors/error-reporter.service.js +36 -0
- package/dist/modules/observability/errors/error-reporter.service.js.map +1 -0
- package/dist/modules/observability/errors/noop-error-reporter.d.ts +6 -0
- package/dist/modules/observability/errors/noop-error-reporter.d.ts.map +1 -0
- package/dist/modules/observability/errors/noop-error-reporter.js +13 -0
- package/dist/modules/observability/errors/noop-error-reporter.js.map +1 -0
- package/dist/modules/observability/errors/sentry-error-reporter.d.ts +8 -0
- package/dist/modules/observability/errors/sentry-error-reporter.d.ts.map +1 -0
- package/dist/modules/observability/errors/sentry-error-reporter.js +88 -0
- package/dist/modules/observability/errors/sentry-error-reporter.js.map +1 -0
- package/dist/modules/observability/errors/sentry.bootstrap.d.ts +10 -0
- package/dist/modules/observability/errors/sentry.bootstrap.d.ts.map +1 -0
- package/dist/modules/observability/errors/sentry.bootstrap.js +63 -0
- package/dist/modules/observability/errors/sentry.bootstrap.js.map +1 -0
- package/dist/modules/observability/guards/metrics-access.guard.d.ts +8 -0
- package/dist/modules/observability/guards/metrics-access.guard.d.ts.map +1 -0
- package/dist/modules/observability/guards/metrics-access.guard.js +42 -0
- package/dist/modules/observability/guards/metrics-access.guard.js.map +1 -0
- package/dist/modules/observability/index.d.ts +23 -0
- package/dist/modules/observability/index.d.ts.map +1 -0
- package/dist/modules/observability/index.js +46 -0
- package/dist/modules/observability/index.js.map +1 -0
- package/dist/modules/observability/interceptors/observability-user.interceptor.d.ts +10 -0
- package/dist/modules/observability/interceptors/observability-user.interceptor.d.ts.map +1 -0
- package/dist/modules/observability/interceptors/observability-user.interceptor.js +34 -0
- package/dist/modules/observability/interceptors/observability-user.interceptor.js.map +1 -0
- package/dist/modules/observability/interceptors/structured-logging.interceptor.d.ts +13 -0
- package/dist/modules/observability/interceptors/structured-logging.interceptor.d.ts.map +1 -0
- package/dist/modules/observability/interceptors/structured-logging.interceptor.js +76 -0
- package/dist/modules/observability/interceptors/structured-logging.interceptor.js.map +1 -0
- package/dist/modules/observability/logging/pii-redaction.util.d.ts +4 -0
- package/dist/modules/observability/logging/pii-redaction.util.d.ts.map +1 -0
- package/dist/modules/observability/logging/pii-redaction.util.js +59 -0
- package/dist/modules/observability/logging/pii-redaction.util.js.map +1 -0
- package/dist/modules/observability/logging/structured-log-writer.service.d.ts +18 -0
- package/dist/modules/observability/logging/structured-log-writer.service.d.ts.map +1 -0
- package/dist/modules/observability/logging/structured-log-writer.service.js +45 -0
- package/dist/modules/observability/logging/structured-log-writer.service.js.map +1 -0
- package/dist/modules/observability/logging/structured-logger.service.d.ts +29 -0
- package/dist/modules/observability/logging/structured-logger.service.d.ts.map +1 -0
- package/dist/modules/observability/logging/structured-logger.service.js +155 -0
- package/dist/modules/observability/logging/structured-logger.service.js.map +1 -0
- package/dist/modules/observability/metrics/bullmq-failed-job.listener.d.ts +15 -0
- package/dist/modules/observability/metrics/bullmq-failed-job.listener.d.ts.map +1 -0
- package/dist/modules/observability/metrics/bullmq-failed-job.listener.js +78 -0
- package/dist/modules/observability/metrics/bullmq-failed-job.listener.js.map +1 -0
- package/dist/modules/observability/metrics/job-observability.runner.d.ts +17 -0
- package/dist/modules/observability/metrics/job-observability.runner.d.ts.map +1 -0
- package/dist/modules/observability/metrics/job-observability.runner.js +98 -0
- package/dist/modules/observability/metrics/job-observability.runner.js.map +1 -0
- package/dist/modules/observability/metrics/metrics.service.d.ts +35 -0
- package/dist/modules/observability/metrics/metrics.service.d.ts.map +1 -0
- package/dist/modules/observability/metrics/metrics.service.js +165 -0
- package/dist/modules/observability/metrics/metrics.service.js.map +1 -0
- package/dist/modules/observability/metrics/queue-metrics.collector.d.ts +11 -0
- package/dist/modules/observability/metrics/queue-metrics.collector.d.ts.map +1 -0
- package/dist/modules/observability/metrics/queue-metrics.collector.js +65 -0
- package/dist/modules/observability/metrics/queue-metrics.collector.js.map +1 -0
- package/dist/modules/observability/observability-lifecycle.service.d.ts +5 -0
- package/dist/modules/observability/observability-lifecycle.service.d.ts.map +1 -0
- package/dist/modules/observability/observability-lifecycle.service.js +23 -0
- package/dist/modules/observability/observability-lifecycle.service.js.map +1 -0
- package/dist/modules/observability/observability.module.d.ts +5 -0
- package/dist/modules/observability/observability.module.d.ts.map +1 -0
- package/dist/modules/observability/observability.module.js +108 -0
- package/dist/modules/observability/observability.module.js.map +1 -0
- package/dist/modules/observability/tracing/tracing.bootstrap.d.ts +9 -0
- package/dist/modules/observability/tracing/tracing.bootstrap.d.ts.map +1 -0
- package/dist/modules/observability/tracing/tracing.bootstrap.js +52 -0
- package/dist/modules/observability/tracing/tracing.bootstrap.js.map +1 -0
- package/dist/modules/observability/tracing/tracing.service.d.ts +12 -0
- package/dist/modules/observability/tracing/tracing.service.d.ts.map +1 -0
- package/dist/modules/observability/tracing/tracing.service.js +79 -0
- package/dist/modules/observability/tracing/tracing.service.js.map +1 -0
- package/dist/modules/observability/tracing/w3c-trace.util.d.ts +9 -0
- package/dist/modules/observability/tracing/w3c-trace.util.d.ts.map +1 -0
- package/dist/modules/observability/tracing/w3c-trace.util.js +51 -0
- package/dist/modules/observability/tracing/w3c-trace.util.js.map +1 -0
- package/dist/modules/observability/types/job-context.d.ts +8 -0
- package/dist/modules/observability/types/job-context.d.ts.map +1 -0
- package/dist/modules/observability/types/job-context.js +3 -0
- package/dist/modules/observability/types/job-context.js.map +1 -0
- package/dist/modules/observability/types/observability-context.d.ts +10 -0
- package/dist/modules/observability/types/observability-context.d.ts.map +1 -0
- package/dist/modules/observability/types/observability-context.js +3 -0
- package/dist/modules/observability/types/observability-context.js.map +1 -0
- package/dist/modules/observability/types/structured-log.types.d.ts +28 -0
- package/dist/modules/observability/types/structured-log.types.d.ts.map +1 -0
- package/dist/modules/observability/types/structured-log.types.js +3 -0
- package/dist/modules/observability/types/structured-log.types.js.map +1 -0
- package/dist/modules/observability/utils/ip-allowlist.util.d.ts +3 -0
- package/dist/modules/observability/utils/ip-allowlist.util.d.ts.map +1 -0
- package/dist/modules/observability/utils/ip-allowlist.util.js +51 -0
- package/dist/modules/observability/utils/ip-allowlist.util.js.map +1 -0
- package/dist/modules/observability/utils/route-template.util.d.ts +4 -0
- package/dist/modules/observability/utils/route-template.util.d.ts.map +1 -0
- package/dist/modules/observability/utils/route-template.util.js +23 -0
- package/dist/modules/observability/utils/route-template.util.js.map +1 -0
- package/dist/modules/observability/utils/status-class.util.d.ts +3 -0
- package/dist/modules/observability/utils/status-class.util.d.ts.map +1 -0
- package/dist/modules/observability/utils/status-class.util.js +16 -0
- package/dist/modules/observability/utils/status-class.util.js.map +1 -0
- package/dist/modules/otp/constants/otp.constants.d.ts +15 -0
- package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -0
- package/dist/modules/otp/constants/otp.constants.js +30 -0
- package/dist/modules/otp/constants/otp.constants.js.map +1 -0
- package/dist/modules/otp/email/email-provider.interface.d.ts +29 -0
- package/dist/modules/otp/email/email-provider.interface.d.ts.map +1 -0
- package/dist/modules/otp/email/email-provider.interface.js +26 -0
- package/dist/modules/otp/email/email-provider.interface.js.map +1 -0
- package/dist/modules/otp/email/email-proxy.service.d.ts +26 -0
- package/dist/modules/otp/email/email-proxy.service.d.ts.map +1 -0
- package/dist/modules/otp/email/email-proxy.service.js +78 -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 +21 -0
- package/dist/modules/otp/email/email.module.js.map +1 -0
- package/dist/modules/otp/email/email.types.d.ts +23 -0
- package/dist/modules/otp/email/email.types.d.ts.map +1 -0
- package/dist/modules/otp/email/email.types.js +20 -0
- package/dist/modules/otp/email/email.types.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 +2 -0
- package/dist/modules/otp/email/providers/index.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/index.js +18 -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 +60 -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 +58 -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 +59 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.js.map +1 -0
- package/dist/modules/otp/email/providers/smtp.provider.d.ts +22 -0
- package/dist/modules/otp/email/providers/smtp.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/smtp.provider.js +130 -0
- package/dist/modules/otp/email/providers/smtp.provider.js.map +1 -0
- package/dist/modules/otp/email/smtp-email.service.d.ts +21 -0
- package/dist/modules/otp/email/smtp-email.service.d.ts.map +1 -0
- package/dist/modules/otp/email/smtp-email.service.js +126 -0
- package/dist/modules/otp/email/smtp-email.service.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 +89 -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 +32 -0
- package/dist/modules/otp/otp.module.js.map +1 -0
- package/dist/modules/otp/otp.service.d.ts +40 -0
- package/dist/modules/otp/otp.service.d.ts.map +1 -0
- package/dist/modules/otp/otp.service.js +218 -0
- package/dist/modules/otp/otp.service.js.map +1 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts +29 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -0
- package/dist/modules/otp/services/otp.rate-limiter.js +88 -0
- package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -0
- package/dist/modules/otp/services/otp.session.store.d.ts +54 -0
- package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -0
- package/dist/modules/otp/services/otp.session.store.js +291 -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 +62 -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 +57 -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 +57 -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 +60 -0
- package/dist/modules/otp/sms/providers/twilio.provider.js.map +1 -0
- package/dist/modules/otp/sms/sms-provider.interface.d.ts +26 -0
- package/dist/modules/otp/sms/sms-provider.interface.d.ts.map +1 -0
- package/dist/modules/otp/sms/sms-provider.interface.js +27 -0
- package/dist/modules/otp/sms/sms-provider.interface.js.map +1 -0
- package/dist/modules/otp/sms/sms-proxy.service.d.ts +26 -0
- package/dist/modules/otp/sms/sms-proxy.service.d.ts.map +1 -0
- package/dist/modules/otp/sms/sms-proxy.service.js +78 -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 +38 -0
- package/dist/modules/otp/utils/otp.utils.d.ts.map +1 -0
- package/dist/modules/otp/utils/otp.utils.js +99 -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 +98 -0
- package/dist/modules/profile/controllers/profile.controller.js.map +1 -0
- package/dist/modules/profile/dto/address.dto.d.ts +9 -0
- package/dist/modules/profile/dto/address.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/address.dto.js +60 -0
- package/dist/modules/profile/dto/address.dto.js.map +1 -0
- package/dist/modules/profile/dto/create-user-profile.dto.d.ts +35 -0
- package/dist/modules/profile/dto/create-user-profile.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/create-user-profile.dto.js +195 -0
- package/dist/modules/profile/dto/create-user-profile.dto.js.map +1 -0
- package/dist/modules/profile/dto/user-profile-filter.dto.d.ts +10 -0
- package/dist/modules/profile/dto/user-profile-filter.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/user-profile-filter.dto.js +68 -0
- package/dist/modules/profile/dto/user-profile-filter.dto.js.map +1 -0
- package/dist/modules/profile/dto/user-profile-response.dto.d.ts +30 -0
- package/dist/modules/profile/dto/user-profile-response.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/user-profile-response.dto.js +33 -0
- package/dist/modules/profile/dto/user-profile-response.dto.js.map +1 -0
- package/dist/modules/profile/entities/index.d.ts +2 -0
- package/dist/modules/profile/entities/index.d.ts.map +1 -0
- package/dist/modules/profile/entities/index.js +18 -0
- package/dist/modules/profile/entities/index.js.map +1 -0
- package/dist/modules/profile/entities/user-profiles.entity.d.ts +38 -0
- package/dist/modules/profile/entities/user-profiles.entity.d.ts.map +1 -0
- package/dist/modules/profile/entities/user-profiles.entity.js +264 -0
- package/dist/modules/profile/entities/user-profiles.entity.js.map +1 -0
- package/dist/modules/profile/index.d.ts +9 -0
- package/dist/modules/profile/index.d.ts.map +1 -0
- package/dist/modules/profile/index.js +25 -0
- package/dist/modules/profile/index.js.map +1 -0
- package/dist/modules/profile/profile.manifest.d.ts +7 -0
- package/dist/modules/profile/profile.manifest.d.ts.map +1 -0
- package/dist/modules/profile/profile.manifest.js +25 -0
- package/dist/modules/profile/profile.manifest.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 +35 -0
- package/dist/modules/profile/profile.module.js.map +1 -0
- package/dist/modules/profile/services/profile.service.d.ts +32 -0
- package/dist/modules/profile/services/profile.service.d.ts.map +1 -0
- package/dist/modules/profile/services/profile.service.js +185 -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 +83 -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 +84 -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 +94 -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 +95 -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 +53 -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 +67 -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 +73 -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 +43 -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 +55 -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 +54 -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 +17 -0
- package/dist/modules/roles/registry/discover-manifests.d.ts.map +1 -0
- package/dist/modules/roles/registry/discover-manifests.js +133 -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 +9 -0
- package/dist/modules/roles/registry/index.js.map +1 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.d.ts +11 -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 +61 -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 +3 -0
- package/dist/modules/roles/roles.module.d.ts.map +1 -0
- package/dist/modules/roles/roles.module.js +28 -0
- package/dist/modules/roles/roles.module.js.map +1 -0
- package/dist/modules/roles/services/index.d.ts +5 -0
- package/dist/modules/roles/services/index.d.ts.map +1 -0
- package/dist/modules/roles/services/index.js +12 -0
- package/dist/modules/roles/services/index.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 +70 -0
- package/dist/modules/roles/services/modules.service.js.map +1 -0
- package/dist/modules/roles/services/permissions.service.d.ts +16 -0
- package/dist/modules/roles/services/permissions.service.d.ts.map +1 -0
- package/dist/modules/roles/services/permissions.service.js +80 -0
- package/dist/modules/roles/services/permissions.service.js.map +1 -0
- package/dist/modules/roles/services/roles.service.d.ts +45 -0
- package/dist/modules/roles/services/roles.service.d.ts.map +1 -0
- package/dist/modules/roles/services/roles.service.js +175 -0
- package/dist/modules/roles/services/roles.service.js.map +1 -0
- package/dist/modules/roles/services/user-roles.service.d.ts +26 -0
- package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -0
- package/dist/modules/roles/services/user-roles.service.js +113 -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 +124 -0
- package/dist/modules/sessions/controllers/session.controller.js.map +1 -0
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts +30 -0
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -0
- package/dist/modules/sessions/entities/refresh-token.entity.js +96 -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 +102 -0
- package/dist/modules/sessions/services/token.service.d.ts.map +1 -0
- package/dist/modules/sessions/services/token.service.js +374 -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 +32 -0
- package/dist/modules/sessions/sessions.module.js.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts +109 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.js +168 -0
- package/dist/modules/settings/constants/settings.defaults.js.map +1 -0
- package/dist/modules/settings/constants/settings.keys.d.ts +180 -0
- package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -0
- package/dist/modules/settings/constants/settings.keys.js +196 -0
- package/dist/modules/settings/constants/settings.keys.js.map +1 -0
- package/dist/modules/settings/controllers/settings.controller.d.ts +22 -0
- package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -0
- package/dist/modules/settings/controllers/settings.controller.js +109 -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 +25 -0
- package/dist/modules/settings/dto/settings.dto.js.map +1 -0
- package/dist/modules/settings/entities/app-setting.entity.d.ts +18 -0
- package/dist/modules/settings/entities/app-setting.entity.d.ts.map +1 -0
- package/dist/modules/settings/entities/app-setting.entity.js +79 -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 +64 -0
- package/dist/modules/settings/services/settings.service.d.ts.map +1 -0
- package/dist/modules/settings/services/settings.service.js +191 -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 +34 -0
- package/dist/modules/users/controllers/users.controller.d.ts.map +1 -0
- package/dist/modules/users/controllers/users.controller.js +252 -0
- package/dist/modules/users/controllers/users.controller.js.map +1 -0
- package/dist/modules/users/dto/user.dto.d.ts +59 -0
- package/dist/modules/users/dto/user.dto.d.ts.map +1 -0
- package/dist/modules/users/dto/user.dto.js +273 -0
- package/dist/modules/users/dto/user.dto.js.map +1 -0
- package/dist/modules/users/entities/user.entity.d.ts +46 -0
- package/dist/modules/users/entities/user.entity.d.ts.map +1 -0
- package/dist/modules/users/entities/user.entity.js +317 -0
- package/dist/modules/users/entities/user.entity.js.map +1 -0
- package/dist/modules/users/index.d.ts +6 -0
- package/dist/modules/users/index.d.ts.map +1 -0
- package/dist/modules/users/index.js +22 -0
- package/dist/modules/users/index.js.map +1 -0
- package/dist/modules/users/services/users.service.d.ts +67 -0
- package/dist/modules/users/services/users.service.d.ts.map +1 -0
- package/dist/modules/users/services/users.service.js +530 -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 +37 -0
- package/dist/modules/users/users.module.js.map +1 -0
- package/package.json +193 -0
|
@@ -0,0 +1,225 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
45
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.PasswordService = void 0;
|
|
52
|
+
const common_1 = require("@nestjs/common");
|
|
53
|
+
const config_1 = require("@nestjs/config");
|
|
54
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
55
|
+
const argon2 = __importStar(require("argon2"));
|
|
56
|
+
const crypto_1 = require("crypto");
|
|
57
|
+
const crypto_2 = require("crypto");
|
|
58
|
+
const ioredis_1 = __importDefault(require("ioredis"));
|
|
59
|
+
const typeorm_2 = require("typeorm");
|
|
60
|
+
const redis_module_1 = require("../../../config/redis.module");
|
|
61
|
+
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
62
|
+
const token_service_1 = require("../../sessions/services/token.service");
|
|
63
|
+
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
64
|
+
const settings_service_1 = require("../../settings/services/settings.service");
|
|
65
|
+
const users_service_1 = require("../../users/services/users.service");
|
|
66
|
+
const password_reset_token_entity_1 = require("../entities/password-reset-token.entity");
|
|
67
|
+
const KEY_PWD_RESET = 'pwd_reset:';
|
|
68
|
+
let PasswordService = class PasswordService {
|
|
69
|
+
usersService;
|
|
70
|
+
tokenService;
|
|
71
|
+
resetAuditRepo;
|
|
72
|
+
redis;
|
|
73
|
+
settingsService;
|
|
74
|
+
configService;
|
|
75
|
+
notificationDelivery;
|
|
76
|
+
logger;
|
|
77
|
+
constructor(usersService, tokenService, resetAuditRepo, redis, settingsService, configService, notificationDelivery, logger) {
|
|
78
|
+
this.usersService = usersService;
|
|
79
|
+
this.tokenService = tokenService;
|
|
80
|
+
this.resetAuditRepo = resetAuditRepo;
|
|
81
|
+
this.redis = redis;
|
|
82
|
+
this.settingsService = settingsService;
|
|
83
|
+
this.configService = configService;
|
|
84
|
+
this.notificationDelivery = notificationDelivery;
|
|
85
|
+
this.logger = logger;
|
|
86
|
+
}
|
|
87
|
+
// ─── Forgot Password ─────────────────────────────────────────────────────
|
|
88
|
+
/**
|
|
89
|
+
* Initiates password reset. Always returns the same message to prevent user enumeration.
|
|
90
|
+
*/
|
|
91
|
+
async forgotPassword(dto) {
|
|
92
|
+
const SAFE_RESPONSE = {
|
|
93
|
+
message: 'If this email is registered, a reset link has been sent.',
|
|
94
|
+
};
|
|
95
|
+
const user = await this.usersService.findBy({ email: dto.email });
|
|
96
|
+
if (!user) {
|
|
97
|
+
this.logger.info('Forgot password — unknown email', {
|
|
98
|
+
event: 'auth.password.forgot_unknown_email',
|
|
99
|
+
metadata: { email: this.hashIdentity(dto.email) },
|
|
100
|
+
});
|
|
101
|
+
return SAFE_RESPONSE;
|
|
102
|
+
}
|
|
103
|
+
await this.storeNativeResetToken(user.id, dto.email);
|
|
104
|
+
this.logger.info('Forgot password initiated', {
|
|
105
|
+
event: 'auth.password.forgot_initiated',
|
|
106
|
+
metadata: { userId: user.id },
|
|
107
|
+
});
|
|
108
|
+
return SAFE_RESPONSE;
|
|
109
|
+
}
|
|
110
|
+
// ─── Reset Password (email token) ─────────────────────────────────────────
|
|
111
|
+
/**
|
|
112
|
+
* Completes password reset via the token from the email link.
|
|
113
|
+
*/
|
|
114
|
+
async resetPassword(dto, ipAddress) {
|
|
115
|
+
const userId = await this.consumeNativeResetToken(dto.token);
|
|
116
|
+
const user = await this.usersService.findById(userId);
|
|
117
|
+
if (!user)
|
|
118
|
+
throw new common_1.NotFoundException('User not found.');
|
|
119
|
+
await this.usersService.setPasswordHash(userId, await argon2.hash(dto.newPassword));
|
|
120
|
+
await this.resetAuditRepo.save(this.resetAuditRepo.create({ userId, usedAt: new Date(), ipAddress }));
|
|
121
|
+
this.logger.info('Password reset successful', {
|
|
122
|
+
event: 'auth.password.reset_success',
|
|
123
|
+
metadata: { userId, method: 'email_token' },
|
|
124
|
+
});
|
|
125
|
+
return { message: 'Password reset successfully.' };
|
|
126
|
+
}
|
|
127
|
+
// ─── Reset Password (phone OTP) ───────────────────────────────────────────
|
|
128
|
+
/**
|
|
129
|
+
* Resets password using a verificationToken from the OTP flow.
|
|
130
|
+
*/
|
|
131
|
+
async resetPasswordWithPhone(dto, _ipAddress) {
|
|
132
|
+
const phoneNumber = await this.tokenService.verifyPhoneVerifiedToken(dto.verificationToken);
|
|
133
|
+
const user = await this.usersService.findBy({ phoneNumber });
|
|
134
|
+
if (!user)
|
|
135
|
+
throw new common_1.NotFoundException('No account found for this phone number.');
|
|
136
|
+
await this.usersService.setPasswordHash(user.id, await argon2.hash(dto.newPassword));
|
|
137
|
+
this.logger.info('Password reset successful', {
|
|
138
|
+
event: 'auth.password.reset_success',
|
|
139
|
+
metadata: { userId: user.id, method: 'phone_otp' },
|
|
140
|
+
});
|
|
141
|
+
return { message: 'Password reset successfully.' };
|
|
142
|
+
}
|
|
143
|
+
// ─── Change Password (authenticated) ─────────────────────────────────────
|
|
144
|
+
async changePassword(userId, dto) {
|
|
145
|
+
const user = await this.usersService.findByIdWithPassword(userId);
|
|
146
|
+
if (!user)
|
|
147
|
+
throw new common_1.NotFoundException('User not found.');
|
|
148
|
+
if (!user.passwordHash) {
|
|
149
|
+
throw new common_1.BadRequestException('Account has no password. Use phone OTP to reset.');
|
|
150
|
+
}
|
|
151
|
+
const valid = await argon2.verify(user.passwordHash, dto.currentPassword);
|
|
152
|
+
if (!valid)
|
|
153
|
+
throw new common_1.UnauthorizedException('Current password is incorrect');
|
|
154
|
+
await this.usersService.setPasswordHash(userId, await argon2.hash(dto.newPassword));
|
|
155
|
+
this.logger.info('Password changed', {
|
|
156
|
+
event: 'auth.password.changed',
|
|
157
|
+
metadata: { userId },
|
|
158
|
+
});
|
|
159
|
+
return { message: 'Password changed successfully.' };
|
|
160
|
+
}
|
|
161
|
+
// ─── Private Helpers ─────────────────────────────────────────────────────
|
|
162
|
+
/**
|
|
163
|
+
* Stores a native password reset token in Redis.
|
|
164
|
+
* Key: pwd_reset:<rawToken> Value: userId TTL: 30 min
|
|
165
|
+
* NX ensures no accidental overwrite on UUID collision (astronomically unlikely).
|
|
166
|
+
*/
|
|
167
|
+
async storeNativeResetToken(userId, email) {
|
|
168
|
+
const rawToken = (0, crypto_2.randomUUID)();
|
|
169
|
+
const ttl = this.settingsService.get(settings_keys_1.SETTING_KEYS.TOKENS_PASSWORD_RESET_TTL_SECONDS);
|
|
170
|
+
const result = await this.redis.set(`${KEY_PWD_RESET}${rawToken}`, userId, 'EX', ttl, 'NX');
|
|
171
|
+
if (result !== 'OK') {
|
|
172
|
+
this.logger.error('Password reset token Redis write failed', {
|
|
173
|
+
event: 'auth.password.reset_redis_failed',
|
|
174
|
+
metadata: { userId },
|
|
175
|
+
});
|
|
176
|
+
throw new common_1.ServiceUnavailableException('Failed to generate reset token. Please try again.');
|
|
177
|
+
}
|
|
178
|
+
if (this.notificationDelivery?.isEnabled()) {
|
|
179
|
+
const appUrl = this.configService.get('app.url') ?? '';
|
|
180
|
+
const resetUrl = `${appUrl}/auth/reset-password?token=${rawToken}`;
|
|
181
|
+
await this.notificationDelivery.sendPasswordResetEmail(email, {
|
|
182
|
+
actionLink: resetUrl,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
this.logger.warn('Password reset email skipped', {
|
|
187
|
+
event: 'auth.password.reset_email_skipped',
|
|
188
|
+
metadata: { userId, reason: 'notification_delivery_unavailable' },
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
this.logger.info('Password reset token created', {
|
|
192
|
+
event: 'auth.password.reset_token_created',
|
|
193
|
+
metadata: { userId },
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Atomically consumes the reset token from Redis.
|
|
198
|
+
* GETDEL = single round-trip, single-use by design.
|
|
199
|
+
* Returns the userId. Throws UnauthorizedException if missing or expired.
|
|
200
|
+
*/
|
|
201
|
+
async consumeNativeResetToken(rawToken) {
|
|
202
|
+
const userId = await this.redis.getdel(`${KEY_PWD_RESET}${rawToken}`);
|
|
203
|
+
if (!userId) {
|
|
204
|
+
throw new common_1.UnauthorizedException('Invalid or expired password reset token');
|
|
205
|
+
}
|
|
206
|
+
return userId;
|
|
207
|
+
}
|
|
208
|
+
hashIdentity(value) {
|
|
209
|
+
return (0, crypto_1.createHash)('sha256').update(value).digest('hex').slice(0, 16);
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
exports.PasswordService = PasswordService;
|
|
213
|
+
exports.PasswordService = PasswordService = __decorate([
|
|
214
|
+
(0, common_1.Injectable)(),
|
|
215
|
+
__param(2, (0, typeorm_1.InjectRepository)(password_reset_token_entity_1.PasswordResetToken)),
|
|
216
|
+
__param(3, (0, common_1.Inject)(redis_module_1.REDIS_CLIENT)),
|
|
217
|
+
__param(6, (0, common_1.Optional)()),
|
|
218
|
+
__metadata("design:paramtypes", [users_service_1.UsersService,
|
|
219
|
+
token_service_1.TokenService,
|
|
220
|
+
typeorm_2.Repository,
|
|
221
|
+
ioredis_1.default,
|
|
222
|
+
settings_service_1.SettingsService,
|
|
223
|
+
config_1.ConfigService, Object, structured_logger_service_1.StructuredLoggerService])
|
|
224
|
+
], PasswordService);
|
|
225
|
+
//# sourceMappingURL=password.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/password.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,2CAA+C;AAC/C,6CAAmD;AACnD,+CAAiC;AACjC,mCAAoC;AACpC,mCAAoC;AACpC,sDAA8B;AAC9B,qCAAqC;AAErC,+DAA4D;AAE5D,qGAAgG;AA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,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,mCAAmC,EAAE;aACjE,CAAC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,8BAA8B,EAAE;YAChD,KAAK,EAAE,mCAAmC;YAC1C,QAAQ,EAAE,EAAE,MAAM,EAAE;SACpB,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,uBAAuB,CAAC,QAAgB;QACrD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,aAAa,GAAG,QAAQ,EAAE,CAAC,CAAC;QAEtE,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,8BAAqB,CAAC,yCAAyC,CAAC,CAAC;QAC5E,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAEO,YAAY,CAAC,KAAa;QACjC,OAAO,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACtE,CAAC;CACD,CAAA;AApLY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAKV,WAAA,IAAA,0BAAgB,EAAC,gDAAkB,CAAC,CAAA;IAEpC,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;IAIpB,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCARoB,4BAAY;QACZ,4BAAY;QAEV,oBAAU;QAEnB,iBAAO;QACG,kCAAe;QACjB,sBAAa,UAGpB,mDAAuB;GAZrC,eAAe,CAoL3B"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { StructuredLoggerService } from '../../observability/logging/structured-logger.service';
|
|
3
|
+
import { SettingsService } from '../../settings/services/settings.service';
|
|
4
|
+
import { ChangePinDto, PinStatusDto, RemovePinDto, SetPinDto, VerifyPinDto } from '../dto/pin.dto';
|
|
5
|
+
import { UserPin } from '../entities/user-pin.entity';
|
|
6
|
+
export declare class PinAuthService {
|
|
7
|
+
private readonly pinRepo;
|
|
8
|
+
private readonly settingsService;
|
|
9
|
+
private readonly logger;
|
|
10
|
+
constructor(pinRepo: Repository<UserPin>, settingsService: SettingsService, logger: StructuredLoggerService);
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new PIN for the given type.
|
|
13
|
+
* Throws ConflictException if the user already has a PIN for this type.
|
|
14
|
+
* Call `changePin` to update an existing PIN.
|
|
15
|
+
*/
|
|
16
|
+
setPin(userId: string, dto: SetPinDto): Promise<{
|
|
17
|
+
message: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Updates an existing PIN after verifying the current one.
|
|
21
|
+
*/
|
|
22
|
+
changePin(userId: string, dto: ChangePinDto): Promise<{
|
|
23
|
+
message: string;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Verifies a PIN for the given type.
|
|
27
|
+
* Increments the failure counter and eventually locks the PIN on repeated failures.
|
|
28
|
+
* Resets the counter and stamps `lastVerifiedAt` on success.
|
|
29
|
+
*/
|
|
30
|
+
verifyPin(userId: string, dto: VerifyPinDto): Promise<{
|
|
31
|
+
message: string;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Removes a PIN record after verifying the current PIN.
|
|
35
|
+
*/
|
|
36
|
+
removePin(userId: string, dto: RemovePinDto): Promise<{
|
|
37
|
+
message: string;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the PIN status for a single allowed type.
|
|
41
|
+
*/
|
|
42
|
+
getPinStatusForType(userId: string, type: string): Promise<PinStatusDto>;
|
|
43
|
+
/**
|
|
44
|
+
* Returns the PIN status for all configured allowed types.
|
|
45
|
+
* Useful for the app to know which PINs the user has set up.
|
|
46
|
+
*/
|
|
47
|
+
getPinStatus(userId: string): Promise<PinStatusDto[]>;
|
|
48
|
+
/**
|
|
49
|
+
* Loads the PIN record including the pinHash column (excluded by default).
|
|
50
|
+
* Throws NotFoundException if the user hasn't set a PIN for this type.
|
|
51
|
+
*/
|
|
52
|
+
private loadPinRecord;
|
|
53
|
+
/**
|
|
54
|
+
* Validates the raw PIN against the stored hash.
|
|
55
|
+
* Increments `failedAttempts` on mismatch and locks the record when the
|
|
56
|
+
* configured maximum is exceeded. Resets `failedAttempts` on success.
|
|
57
|
+
*/
|
|
58
|
+
private assertPinCorrect;
|
|
59
|
+
/**
|
|
60
|
+
* Returns the list of PIN types the app allows, driven by the
|
|
61
|
+
* `pin.allowed_types` setting.
|
|
62
|
+
*/
|
|
63
|
+
private getAllowedTypes;
|
|
64
|
+
private getConfiguredPinLength;
|
|
65
|
+
private buildPinStatus;
|
|
66
|
+
/**
|
|
67
|
+
* Guards every public method — rejects unknown PIN types early before any
|
|
68
|
+
* DB work is done.
|
|
69
|
+
*/
|
|
70
|
+
private assertAllowedType;
|
|
71
|
+
private assertPinLength;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=pin-auth.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pin-auth.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/services/pin-auth.service.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,qBACa,cAAc;IAGzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OA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
|
+
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
45
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.PinAuthService = void 0;
|
|
49
|
+
const common_1 = require("@nestjs/common");
|
|
50
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
51
|
+
const argon2 = __importStar(require("argon2"));
|
|
52
|
+
const typeorm_2 = require("typeorm");
|
|
53
|
+
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
54
|
+
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
55
|
+
const settings_service_1 = require("../../settings/services/settings.service");
|
|
56
|
+
const user_pin_entity_1 = require("../entities/user-pin.entity");
|
|
57
|
+
let PinAuthService = class PinAuthService {
|
|
58
|
+
pinRepo;
|
|
59
|
+
settingsService;
|
|
60
|
+
logger;
|
|
61
|
+
constructor(pinRepo, settingsService, logger) {
|
|
62
|
+
this.pinRepo = pinRepo;
|
|
63
|
+
this.settingsService = settingsService;
|
|
64
|
+
this.logger = logger;
|
|
65
|
+
}
|
|
66
|
+
// ─── Set PIN ──────────────────────────────────────────────────────────────
|
|
67
|
+
/**
|
|
68
|
+
* Creates a new PIN for the given type.
|
|
69
|
+
* Throws ConflictException if the user already has a PIN for this type.
|
|
70
|
+
* Call `changePin` to update an existing PIN.
|
|
71
|
+
*/
|
|
72
|
+
async setPin(userId, dto) {
|
|
73
|
+
this.assertAllowedType(dto.type);
|
|
74
|
+
this.assertPinLength(dto.pin);
|
|
75
|
+
const existing = await this.pinRepo.findOne({ where: { userId, type: dto.type } });
|
|
76
|
+
if (existing) {
|
|
77
|
+
throw new common_1.ConflictException(`A ${dto.type} PIN is already set. Use the change-pin endpoint to update it.`);
|
|
78
|
+
}
|
|
79
|
+
const pinHash = await argon2.hash(dto.pin);
|
|
80
|
+
await this.pinRepo.save(this.pinRepo.create({
|
|
81
|
+
userId,
|
|
82
|
+
type: dto.type,
|
|
83
|
+
pinHash,
|
|
84
|
+
pinUpdatedAt: new Date(),
|
|
85
|
+
}));
|
|
86
|
+
this.logger.info('PIN set', {
|
|
87
|
+
event: 'auth.pin.set',
|
|
88
|
+
metadata: { userId, type: dto.type },
|
|
89
|
+
});
|
|
90
|
+
return { message: `${dto.type} PIN set successfully.` };
|
|
91
|
+
}
|
|
92
|
+
// ─── Change PIN ───────────────────────────────────────────────────────────
|
|
93
|
+
/**
|
|
94
|
+
* Updates an existing PIN after verifying the current one.
|
|
95
|
+
*/
|
|
96
|
+
async changePin(userId, dto) {
|
|
97
|
+
this.assertAllowedType(dto.type);
|
|
98
|
+
this.assertPinLength(dto.currentPin);
|
|
99
|
+
this.assertPinLength(dto.newPin);
|
|
100
|
+
const record = await this.loadPinRecord(userId, dto.type);
|
|
101
|
+
await this.assertPinCorrect(record, dto.currentPin);
|
|
102
|
+
record.pinHash = await argon2.hash(dto.newPin);
|
|
103
|
+
record.pinUpdatedAt = new Date();
|
|
104
|
+
record.failedAttempts = 0;
|
|
105
|
+
record.lockedUntil = undefined;
|
|
106
|
+
await this.pinRepo.save(record);
|
|
107
|
+
this.logger.info('PIN changed', {
|
|
108
|
+
event: 'auth.pin.changed',
|
|
109
|
+
metadata: { userId, type: dto.type },
|
|
110
|
+
});
|
|
111
|
+
return { message: `${dto.type} PIN changed successfully.` };
|
|
112
|
+
}
|
|
113
|
+
// ─── Verify PIN ───────────────────────────────────────────────────────────
|
|
114
|
+
/**
|
|
115
|
+
* Verifies a PIN for the given type.
|
|
116
|
+
* Increments the failure counter and eventually locks the PIN on repeated failures.
|
|
117
|
+
* Resets the counter and stamps `lastVerifiedAt` on success.
|
|
118
|
+
*/
|
|
119
|
+
async verifyPin(userId, dto) {
|
|
120
|
+
this.assertAllowedType(dto.type);
|
|
121
|
+
this.assertPinLength(dto.pin);
|
|
122
|
+
const record = await this.loadPinRecord(userId, dto.type);
|
|
123
|
+
await this.assertPinCorrect(record, dto.pin);
|
|
124
|
+
record.lastVerifiedAt = new Date();
|
|
125
|
+
await this.pinRepo.save(record);
|
|
126
|
+
this.logger.info('PIN verified', {
|
|
127
|
+
event: 'auth.pin.verified',
|
|
128
|
+
metadata: { userId, type: dto.type },
|
|
129
|
+
});
|
|
130
|
+
return { message: `${dto.type} PIN verified successfully.` };
|
|
131
|
+
}
|
|
132
|
+
// ─── Remove PIN ───────────────────────────────────────────────────────────
|
|
133
|
+
/**
|
|
134
|
+
* Removes a PIN record after verifying the current PIN.
|
|
135
|
+
*/
|
|
136
|
+
async removePin(userId, dto) {
|
|
137
|
+
this.assertAllowedType(dto.type);
|
|
138
|
+
this.assertPinLength(dto.currentPin);
|
|
139
|
+
const record = await this.loadPinRecord(userId, dto.type);
|
|
140
|
+
await this.assertPinCorrect(record, dto.currentPin);
|
|
141
|
+
await this.pinRepo.remove(record);
|
|
142
|
+
this.logger.info('PIN removed', {
|
|
143
|
+
event: 'auth.pin.removed',
|
|
144
|
+
metadata: { userId, type: dto.type },
|
|
145
|
+
});
|
|
146
|
+
return { message: `${dto.type} PIN removed successfully.` };
|
|
147
|
+
}
|
|
148
|
+
// ─── Status ───────────────────────────────────────────────────────────────
|
|
149
|
+
/**
|
|
150
|
+
* Returns the PIN status for a single allowed type.
|
|
151
|
+
*/
|
|
152
|
+
async getPinStatusForType(userId, type) {
|
|
153
|
+
this.assertAllowedType(type);
|
|
154
|
+
const record = await this.pinRepo.findOne({ where: { userId, type } });
|
|
155
|
+
return this.buildPinStatus(type, record ?? undefined);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Returns the PIN status for all configured allowed types.
|
|
159
|
+
* Useful for the app to know which PINs the user has set up.
|
|
160
|
+
*/
|
|
161
|
+
async getPinStatus(userId) {
|
|
162
|
+
const allowedTypes = this.getAllowedTypes();
|
|
163
|
+
const records = await this.pinRepo.find({ where: { userId } });
|
|
164
|
+
const recordMap = new Map(records.map((r) => [r.type, r]));
|
|
165
|
+
return allowedTypes.map((type) => this.buildPinStatus(type, recordMap.get(type)));
|
|
166
|
+
}
|
|
167
|
+
// ─── Private Helpers ─────────────────────────────────────────────────────
|
|
168
|
+
/**
|
|
169
|
+
* Loads the PIN record including the pinHash column (excluded by default).
|
|
170
|
+
* Throws NotFoundException if the user hasn't set a PIN for this type.
|
|
171
|
+
*/
|
|
172
|
+
async loadPinRecord(userId, type) {
|
|
173
|
+
const record = await this.pinRepo
|
|
174
|
+
.createQueryBuilder('pin')
|
|
175
|
+
.addSelect('pin.pinHash')
|
|
176
|
+
.where('pin.userId = :userId', { userId })
|
|
177
|
+
.andWhere('pin.type = :type', { type })
|
|
178
|
+
.getOne();
|
|
179
|
+
if (!record) {
|
|
180
|
+
throw new common_1.NotFoundException(`No ${type} PIN found. Use the set-pin endpoint first.`);
|
|
181
|
+
}
|
|
182
|
+
if (!record.pinHash?.trim()) {
|
|
183
|
+
this.logger.error('PIN hash missing', {
|
|
184
|
+
event: 'auth.pin.hash_missing',
|
|
185
|
+
metadata: { userId, type, pinId: record.id },
|
|
186
|
+
});
|
|
187
|
+
throw new common_1.BadRequestException(`PIN record exists but has no stored hash. Remove and set the PIN again.`);
|
|
188
|
+
}
|
|
189
|
+
return record;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Validates the raw PIN against the stored hash.
|
|
193
|
+
* Increments `failedAttempts` on mismatch and locks the record when the
|
|
194
|
+
* configured maximum is exceeded. Resets `failedAttempts` on success.
|
|
195
|
+
*/
|
|
196
|
+
async assertPinCorrect(record, rawPin) {
|
|
197
|
+
// ── Lockout check ────────────────────────────────────────────────────
|
|
198
|
+
if (record.lockedUntil && record.lockedUntil > new Date()) {
|
|
199
|
+
const secondsLeft = Math.ceil((record.lockedUntil.getTime() - Date.now()) / 1000);
|
|
200
|
+
throw new common_1.ForbiddenException(`PIN is locked. Try again in ${secondsLeft}s.`);
|
|
201
|
+
}
|
|
202
|
+
// ── Hash verification ─────────────────────────────────────────────────
|
|
203
|
+
const valid = await argon2.verify(record.pinHash, rawPin);
|
|
204
|
+
if (!valid) {
|
|
205
|
+
const maxAttempts = this.settingsService.get(settings_keys_1.SETTING_KEYS.PIN_MAX_ATTEMPTS);
|
|
206
|
+
const lockDuration = this.settingsService.get(settings_keys_1.SETTING_KEYS.PIN_LOCKOUT_DURATION_SECONDS);
|
|
207
|
+
record.failedAttempts += 1;
|
|
208
|
+
if (record.failedAttempts >= maxAttempts) {
|
|
209
|
+
record.lockedUntil = new Date(Date.now() + lockDuration * 1000);
|
|
210
|
+
await this.pinRepo.save(record);
|
|
211
|
+
this.logger.warn('PIN locked', {
|
|
212
|
+
event: 'auth.pin.locked',
|
|
213
|
+
metadata: {
|
|
214
|
+
userId: record.userId,
|
|
215
|
+
type: record.type,
|
|
216
|
+
lockedUntil: record.lockedUntil,
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
throw new common_1.ForbiddenException(`Too many incorrect PIN attempts. PIN locked for ${lockDuration}s.`);
|
|
220
|
+
}
|
|
221
|
+
await this.pinRepo.save(record);
|
|
222
|
+
this.logger.warn('Incorrect PIN attempt', {
|
|
223
|
+
event: 'auth.pin.wrong',
|
|
224
|
+
metadata: {
|
|
225
|
+
userId: record.userId,
|
|
226
|
+
type: record.type,
|
|
227
|
+
failedAttempts: record.failedAttempts,
|
|
228
|
+
},
|
|
229
|
+
});
|
|
230
|
+
throw new common_1.UnauthorizedException(`Incorrect PIN. ${maxAttempts - record.failedAttempts} attempt(s) remaining.`);
|
|
231
|
+
}
|
|
232
|
+
// ── Success: reset counter ────────────────────────────────────────────
|
|
233
|
+
if (record.failedAttempts > 0 || record.lockedUntil) {
|
|
234
|
+
record.failedAttempts = 0;
|
|
235
|
+
record.lockedUntil = undefined;
|
|
236
|
+
await this.pinRepo.save(record);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Returns the list of PIN types the app allows, driven by the
|
|
241
|
+
* `pin.allowed_types` setting.
|
|
242
|
+
*/
|
|
243
|
+
getAllowedTypes() {
|
|
244
|
+
return this.settingsService.get(settings_keys_1.SETTING_KEYS.PIN_ALLOWED_TYPES);
|
|
245
|
+
}
|
|
246
|
+
getConfiguredPinLength() {
|
|
247
|
+
return this.settingsService.get(settings_keys_1.SETTING_KEYS.PIN_LENGTH);
|
|
248
|
+
}
|
|
249
|
+
buildPinStatus(type, record) {
|
|
250
|
+
const length = this.getConfiguredPinLength();
|
|
251
|
+
const now = new Date();
|
|
252
|
+
if (!record) {
|
|
253
|
+
return { type, isSet: false, isLocked: false, length };
|
|
254
|
+
}
|
|
255
|
+
return {
|
|
256
|
+
type,
|
|
257
|
+
isSet: true,
|
|
258
|
+
pinUpdatedAt: record.pinUpdatedAt,
|
|
259
|
+
lastVerifiedAt: record.lastVerifiedAt,
|
|
260
|
+
isLocked: !!(record.lockedUntil && record.lockedUntil > now),
|
|
261
|
+
lockedUntil: record.lockedUntil,
|
|
262
|
+
length,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Guards every public method — rejects unknown PIN types early before any
|
|
267
|
+
* DB work is done.
|
|
268
|
+
*/
|
|
269
|
+
assertAllowedType(type) {
|
|
270
|
+
const allowed = this.getAllowedTypes();
|
|
271
|
+
if (!allowed.includes(type)) {
|
|
272
|
+
throw new common_1.BadRequestException(`Unknown PIN type "${type}". Allowed types: ${allowed.join(', ')}.`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
assertPinLength(pin) {
|
|
276
|
+
const length = this.settingsService.get(settings_keys_1.SETTING_KEYS.PIN_LENGTH);
|
|
277
|
+
if (!new RegExp(`^\\d{${length}}$`).test(pin)) {
|
|
278
|
+
throw new common_1.BadRequestException(`PIN must be exactly ${length} digits.`);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
exports.PinAuthService = PinAuthService;
|
|
283
|
+
exports.PinAuthService = PinAuthService = __decorate([
|
|
284
|
+
(0, common_1.Injectable)(),
|
|
285
|
+
__param(0, (0, typeorm_1.InjectRepository)(user_pin_entity_1.UserPin)),
|
|
286
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
287
|
+
settings_service_1.SettingsService,
|
|
288
|
+
structured_logger_service_1.StructuredLoggerService])
|
|
289
|
+
], PinAuthService);
|
|
290
|
+
//# sourceMappingURL=pin-auth.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pin-auth.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/pin-auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,6CAAmD;AACnD,+CAAiC;AACjC,qCAAqC;AAErC,qGAAgG;AAChG,0EAAsE;AACtE,+EAA2E;AAE3E,iEAAsD;AAG/C,IAAM,cAAc,GAApB,MAAM,cAAc;IAGR;IACA;IACA;IAJlB,YAEkB,OAA4B,EAC5B,eAAgC,EAChC,MAA+B;QAF/B,YAAO,GAAP,OAAO,CAAqB;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,WAAM,GAAN,MAAM,CAAyB;IAC9C,CAAC;IAEJ,6EAA6E;IAE7E;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,MAAc,EAAE,GAAc;QAC1C,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KA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