@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,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.RolesService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
20
|
+
const entities_1 = require("../entities");
|
|
21
|
+
let RolesService = class RolesService {
|
|
22
|
+
roleRepository;
|
|
23
|
+
permissionRepository;
|
|
24
|
+
logger;
|
|
25
|
+
/** Permission slugs keyed by role slug — populated at boot via reloadCache(). */
|
|
26
|
+
permissionCache = new Map();
|
|
27
|
+
constructor(roleRepository, permissionRepository, logger) {
|
|
28
|
+
this.roleRepository = roleRepository;
|
|
29
|
+
this.permissionRepository = permissionRepository;
|
|
30
|
+
this.logger = logger;
|
|
31
|
+
}
|
|
32
|
+
onModuleInit() {
|
|
33
|
+
void this.reloadCache();
|
|
34
|
+
}
|
|
35
|
+
// ─── Cache ───────────────────────────────────────────────────────────────
|
|
36
|
+
/**
|
|
37
|
+
* Returns the permission slugs for a role by its slug.
|
|
38
|
+
*
|
|
39
|
+
* Reads from the in-memory cache populated at boot (and kept in sync after
|
|
40
|
+
* every mutation). Analogous to SettingsService.get() — synchronous and
|
|
41
|
+
* safe to call on the hot path (e.g. inside an auth guard).
|
|
42
|
+
*
|
|
43
|
+
* Returns an empty array if the slug is unknown rather than throwing.
|
|
44
|
+
*/
|
|
45
|
+
getPermissions(roleSlug) {
|
|
46
|
+
const cached = this.permissionCache.get(roleSlug);
|
|
47
|
+
if (cached !== undefined)
|
|
48
|
+
return cached;
|
|
49
|
+
this.logger.warn('Role slug not found in permission cache', {
|
|
50
|
+
event: 'roles.cache.miss',
|
|
51
|
+
metadata: { roleSlug },
|
|
52
|
+
});
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns true when the cached permissions for `roleSlug` include `permissionSlug`.
|
|
57
|
+
* Convenience wrapper around getPermissions() for guard-level checks.
|
|
58
|
+
*/
|
|
59
|
+
hasPermission(roleSlug, permissionSlug) {
|
|
60
|
+
return this.getPermissions(roleSlug).includes(permissionSlug);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Reloads the entire permission cache from the database.
|
|
64
|
+
* Called once by RolesModule.onModuleInit() after manifest sync, and
|
|
65
|
+
* can be called again after bulk out-of-band changes.
|
|
66
|
+
*/
|
|
67
|
+
async reloadCache() {
|
|
68
|
+
const roles = await this.roleRepository.find({ relations: ['permissions'] });
|
|
69
|
+
this.permissionCache.clear();
|
|
70
|
+
for (const role of roles) {
|
|
71
|
+
this.permissionCache.set(role.slug, role.permissions.map((p) => p.slug));
|
|
72
|
+
}
|
|
73
|
+
this.logger.info('Permission cache loaded', {
|
|
74
|
+
event: 'roles.cache.loaded',
|
|
75
|
+
metadata: { roleCount: roles.length, entryCount: this.permissionCache.size },
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
// ─── CRUD ────────────────────────────────────────────────────────────────
|
|
79
|
+
async create(dto) {
|
|
80
|
+
const existing = await this.roleRepository.findOne({ where: { slug: dto.slug } });
|
|
81
|
+
if (existing) {
|
|
82
|
+
throw new common_1.ConflictException(`Role with slug '${dto.slug}' already exists`);
|
|
83
|
+
}
|
|
84
|
+
const role = this.roleRepository.create({
|
|
85
|
+
slug: dto.slug,
|
|
86
|
+
name: dto.name,
|
|
87
|
+
description: dto.description,
|
|
88
|
+
});
|
|
89
|
+
const saved = await this.roleRepository.save(role);
|
|
90
|
+
if (dto.permissionIds?.length) {
|
|
91
|
+
await this.assignPermissions(saved.id, dto.permissionIds);
|
|
92
|
+
}
|
|
93
|
+
const result = await this.findById(saved.id);
|
|
94
|
+
this.cacheRole(result);
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
async findAll() {
|
|
98
|
+
return this.roleRepository.find({
|
|
99
|
+
relations: ['permissions'],
|
|
100
|
+
order: { slug: 'ASC' },
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
async findById(id) {
|
|
104
|
+
const role = await this.roleRepository.findOne({
|
|
105
|
+
where: { id },
|
|
106
|
+
relations: ['permissions'],
|
|
107
|
+
});
|
|
108
|
+
if (!role)
|
|
109
|
+
throw new common_1.NotFoundException(`Role ${id} not found`);
|
|
110
|
+
return role;
|
|
111
|
+
}
|
|
112
|
+
async findBySlug(slug, manager) {
|
|
113
|
+
return (manager?.getRepository(entities_1.Role) ?? this.roleRepository).findOne({
|
|
114
|
+
where: { slug },
|
|
115
|
+
relations: ['permissions'],
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
async update(id, dto) {
|
|
119
|
+
const role = await this.findById(id);
|
|
120
|
+
if (dto.name !== undefined)
|
|
121
|
+
role.name = dto.name;
|
|
122
|
+
if (dto.description !== undefined)
|
|
123
|
+
role.description = dto.description;
|
|
124
|
+
await this.roleRepository.save(role);
|
|
125
|
+
if (dto.permissionIds !== undefined) {
|
|
126
|
+
await this.assignPermissions(id, dto.permissionIds);
|
|
127
|
+
}
|
|
128
|
+
const result = await this.findById(id);
|
|
129
|
+
this.cacheRole(result);
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
async delete(id) {
|
|
133
|
+
const role = await this.findById(id);
|
|
134
|
+
await this.roleRepository.remove(role);
|
|
135
|
+
this.permissionCache.delete(role.slug);
|
|
136
|
+
this.logger.info('Permission cache evicted for deleted role', {
|
|
137
|
+
event: 'roles.cache.evicted',
|
|
138
|
+
metadata: { roleSlug: role.slug },
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
async assignPermissions(roleId, permissionIds) {
|
|
142
|
+
const role = await this.findById(roleId);
|
|
143
|
+
const permissions = await this.permissionRepository.find({
|
|
144
|
+
where: { id: (0, typeorm_2.In)(permissionIds) },
|
|
145
|
+
});
|
|
146
|
+
role.permissions = permissions;
|
|
147
|
+
await this.roleRepository.save(role);
|
|
148
|
+
const result = await this.findById(roleId);
|
|
149
|
+
this.cacheRole(result);
|
|
150
|
+
return result;
|
|
151
|
+
}
|
|
152
|
+
async getPermissionSlugs(roleId) {
|
|
153
|
+
const role = await this.findById(roleId);
|
|
154
|
+
return role.permissions.map((p) => p.slug);
|
|
155
|
+
}
|
|
156
|
+
// ─── Private ─────────────────────────────────────────────────────────────
|
|
157
|
+
cacheRole(role) {
|
|
158
|
+
const slugs = role.permissions.map((p) => p.slug);
|
|
159
|
+
this.permissionCache.set(role.slug, slugs);
|
|
160
|
+
this.logger.info('Permission cache updated', {
|
|
161
|
+
event: 'roles.cache.updated',
|
|
162
|
+
metadata: { roleSlug: role.slug, permissionCount: slugs.length },
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
exports.RolesService = RolesService;
|
|
167
|
+
exports.RolesService = RolesService = __decorate([
|
|
168
|
+
(0, common_1.Injectable)(),
|
|
169
|
+
__param(0, (0, typeorm_1.InjectRepository)(entities_1.Role)),
|
|
170
|
+
__param(1, (0, typeorm_1.InjectRepository)(entities_1.Permission)),
|
|
171
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
172
|
+
typeorm_2.Repository,
|
|
173
|
+
structured_logger_service_1.StructuredLoggerService])
|
|
174
|
+
], RolesService);
|
|
175
|
+
//# sourceMappingURL=roles.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles.service.js","sourceRoot":"","sources":["../../../../src/modules/roles/services/roles.service.ts"],"names":[],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OAAO,MAAM,CAAC;IACf,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,MAAc;QACtC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,4EAA4E;IAEpE,SAAS,CAAC,IAAU;QAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE;YAC5C,KAAK,EAAE,qBAAqB;YAC5B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,CAAC,MAAM,EAAE;SAChE,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAhKY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAMV,WAAA,IAAA,0BAAgB,EAAC,eAAI,CAAC,CAAA;IAEtB,WAAA,IAAA,0BAAgB,EAAC,qBAAU,CAAC,CAAA;qCADI,oBAAU;QAEJ,oBAAU;QACxB,mDAAuB;GATrC,YAAY,CAgKxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EntityManager, Repository } from 'typeorm';
|
|
2
|
+
import { User } from '../../users/entities/user.entity';
|
|
3
|
+
import { AssignRolesDto } from '../dto';
|
|
4
|
+
import { Role } from '../entities';
|
|
5
|
+
export declare class UserRolesService {
|
|
6
|
+
private readonly userRepository;
|
|
7
|
+
private readonly roleRepository;
|
|
8
|
+
constructor(userRepository: Repository<User>, roleRepository: Repository<Role>);
|
|
9
|
+
assignRoles(userId: string, dto: AssignRolesDto, manager?: EntityManager): Promise<User>;
|
|
10
|
+
removeRoles(userId: string): Promise<User>;
|
|
11
|
+
getUserRoles(userId: string): Promise<Role[]>;
|
|
12
|
+
getUserPermissionSlugs(userId: string): Promise<string[]>;
|
|
13
|
+
getUserRoleAndPermissionSlugs(userId: string): Promise<{
|
|
14
|
+
permissions: string[];
|
|
15
|
+
roleSlugs: string[];
|
|
16
|
+
}>;
|
|
17
|
+
/** User profile plus role and permission slugs for JWT issuance (single DB round-trip). */
|
|
18
|
+
getUserAuthContext(userId: string): Promise<{
|
|
19
|
+
user: User;
|
|
20
|
+
permissions: string[];
|
|
21
|
+
roleSlugs: string[];
|
|
22
|
+
}>;
|
|
23
|
+
private collectRoleAndPermissionSlugs;
|
|
24
|
+
private getUserWithRoles;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=user-roles.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-roles.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/services/user-roles.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAM,UAAU,EAAE,MAAM,SAAS,CAAC;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,qBACa,gBAAgB;IAG3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAFd,cAAc,EAAE,UAAU,CAAC,IAAI,CAAC,EAEhC,cAAc,EAAE,UAAU,CAAC,IAAI,CAAC;IAG5C,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBxF,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW1C,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAS7C,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAKzD,6BAA6B,CAClC,MAAM,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAK1D,2FAA2F;IACrF,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QACjD,IAAI,EAAE,IAAI,CAAC;QACX,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,SAAS,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IAWF,OAAO,CAAC,6BAA6B;YAevB,gBAAgB;CAS9B"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UserRolesService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const user_entity_1 = require("../../users/entities/user.entity");
|
|
20
|
+
const entities_1 = require("../entities");
|
|
21
|
+
let UserRolesService = class UserRolesService {
|
|
22
|
+
userRepository;
|
|
23
|
+
roleRepository;
|
|
24
|
+
constructor(userRepository, roleRepository) {
|
|
25
|
+
this.userRepository = userRepository;
|
|
26
|
+
this.roleRepository = roleRepository;
|
|
27
|
+
}
|
|
28
|
+
async assignRoles(userId, dto, manager) {
|
|
29
|
+
const userRepository = manager?.getRepository(user_entity_1.User) ?? this.userRepository;
|
|
30
|
+
const roleRepository = manager?.getRepository(entities_1.Role) ?? this.roleRepository;
|
|
31
|
+
const user = await userRepository.findOne({
|
|
32
|
+
where: { id: userId },
|
|
33
|
+
relations: ['roles'],
|
|
34
|
+
});
|
|
35
|
+
if (!user)
|
|
36
|
+
throw new common_1.NotFoundException(`User ${userId} not found`);
|
|
37
|
+
const roles = await roleRepository.find({
|
|
38
|
+
where: { id: (0, typeorm_2.In)(dto.roleIds) },
|
|
39
|
+
});
|
|
40
|
+
user.roles = roles;
|
|
41
|
+
await userRepository.save(user);
|
|
42
|
+
return this.getUserWithRoles(userId, manager);
|
|
43
|
+
}
|
|
44
|
+
async removeRoles(userId) {
|
|
45
|
+
const user = await this.userRepository.findOne({
|
|
46
|
+
where: { id: userId },
|
|
47
|
+
relations: ['roles'],
|
|
48
|
+
});
|
|
49
|
+
if (!user)
|
|
50
|
+
throw new common_1.NotFoundException(`User ${userId} not found`);
|
|
51
|
+
user.roles = [];
|
|
52
|
+
await this.userRepository.save(user);
|
|
53
|
+
return this.getUserWithRoles(userId);
|
|
54
|
+
}
|
|
55
|
+
async getUserRoles(userId) {
|
|
56
|
+
const user = await this.userRepository.findOne({
|
|
57
|
+
where: { id: userId },
|
|
58
|
+
relations: ['roles', 'roles.permissions'],
|
|
59
|
+
});
|
|
60
|
+
if (!user)
|
|
61
|
+
throw new common_1.NotFoundException(`User ${userId} not found`);
|
|
62
|
+
return user.roles;
|
|
63
|
+
}
|
|
64
|
+
async getUserPermissionSlugs(userId) {
|
|
65
|
+
const { permissions } = await this.getUserRoleAndPermissionSlugs(userId);
|
|
66
|
+
return permissions;
|
|
67
|
+
}
|
|
68
|
+
async getUserRoleAndPermissionSlugs(userId) {
|
|
69
|
+
const roles = await this.getUserRoles(userId);
|
|
70
|
+
return this.collectRoleAndPermissionSlugs(roles);
|
|
71
|
+
}
|
|
72
|
+
/** User profile plus role and permission slugs for JWT issuance (single DB round-trip). */
|
|
73
|
+
async getUserAuthContext(userId) {
|
|
74
|
+
const user = await this.userRepository.findOne({
|
|
75
|
+
where: { id: userId },
|
|
76
|
+
relations: ['roles', 'roles.permissions'],
|
|
77
|
+
});
|
|
78
|
+
if (!user)
|
|
79
|
+
throw new common_1.NotFoundException(`User ${userId} not found`);
|
|
80
|
+
const { permissions, roleSlugs } = this.collectRoleAndPermissionSlugs(user.roles ?? []);
|
|
81
|
+
return { user, permissions, roleSlugs };
|
|
82
|
+
}
|
|
83
|
+
collectRoleAndPermissionSlugs(roles) {
|
|
84
|
+
const permissions = new Set();
|
|
85
|
+
const roleSlugs = [];
|
|
86
|
+
for (const role of roles) {
|
|
87
|
+
roleSlugs.push(role.slug);
|
|
88
|
+
for (const perm of role.permissions ?? []) {
|
|
89
|
+
permissions.add(perm.slug);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return { permissions: Array.from(permissions), roleSlugs };
|
|
93
|
+
}
|
|
94
|
+
async getUserWithRoles(userId, manager) {
|
|
95
|
+
const userRepository = manager?.getRepository(user_entity_1.User) ?? this.userRepository;
|
|
96
|
+
const user = await userRepository.findOne({
|
|
97
|
+
where: { id: userId },
|
|
98
|
+
relations: ['roles', 'roles.permissions'],
|
|
99
|
+
});
|
|
100
|
+
if (!user)
|
|
101
|
+
throw new common_1.NotFoundException(`User ${userId} not found`);
|
|
102
|
+
return user;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
exports.UserRolesService = UserRolesService;
|
|
106
|
+
exports.UserRolesService = UserRolesService = __decorate([
|
|
107
|
+
(0, common_1.Injectable)(),
|
|
108
|
+
__param(0, (0, typeorm_1.InjectRepository)(user_entity_1.User)),
|
|
109
|
+
__param(1, (0, typeorm_1.InjectRepository)(entities_1.Role)),
|
|
110
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
111
|
+
typeorm_2.Repository])
|
|
112
|
+
], UserRolesService);
|
|
113
|
+
//# sourceMappingURL=user-roles.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-roles.service.js","sourceRoot":"","sources":["../../../../src/modules/roles/services/user-roles.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,qCAAwD;AAExD,kEAAwD;AAExD,0CAAmC;AAG5B,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAGV;IAEA;IAJlB,YAEkB,cAAgC,EAEhC,cAAgC;QAFhC,mBAAc,GAAd,cAAc,CAAkB;QAEhC,mBAAc,GAAd,cAAc,CAAkB;IAC/C,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,MAAc,EAAE,GAAmB,EAAE,OAAuB;QAC7E,MAAM,cAAc,GAAG,OAAO,EAAE,aAAa,CAAC,kBAAI,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC;QAC3E,MAAM,cAAc,GAAG,OAAO,EAAE,aAAa,CAAC,eAAI,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC;QAC3E,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC;YACzC,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;YACrB,SAAS,EAAE,CAAC,OAAO,CAAC;SACpB,CAAC,C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YAC5B,CAAC;QACF,CAAC;QACD,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5D,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,MAAc,EAAE,OAAuB;QACrE,MAAM,cAAc,GAAG,OAAO,EAAE,aAAa,CAAC,kBAAI,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC;QAC3E,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC;YACzC,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;YACrB,SAAS,EAAE,CAAC,OAAO,EAAE,mBAAmB,CAAC;SACzC,CAAC,CAAC;QACH,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,0BAAiB,CAAC,QAAQ,MAAM,YAAY,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AAjGY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,0BAAgB,EAAC,kBAAI,CAAC,CAAA;IAEtB,WAAA,IAAA,0BAAgB,EAAC,eAAI,CAAC,CAAA;qCADU,oBAAU;QAEV,oBAAU;GALhC,gBAAgB,CAiG5B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PermissionManifest {
|
|
2
|
+
slug: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ModuleManifest {
|
|
7
|
+
slug: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
permissions: PermissionManifest[];
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=manifest.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/types/manifest.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,kBAAkB,EAAE,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.types.js","sourceRoot":"","sources":["../../../../src/modules/roles/types/manifest.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Request } from 'express';
|
|
2
|
+
import { RequestUser } from '../../../common/interfaces/v';
|
|
3
|
+
import { RefreshTokenDto } from '../../auth/dto/token.dto';
|
|
4
|
+
import { TokenService } from '../services/token.service';
|
|
5
|
+
export declare class SessionController {
|
|
6
|
+
private readonly tokenService;
|
|
7
|
+
constructor(tokenService: TokenService);
|
|
8
|
+
refreshToken(body: RefreshTokenDto, req: Request): Promise<import("../../auth/dto/token.dto").TokenResponse>;
|
|
9
|
+
logout(user: RequestUser, req: Request): Promise<{
|
|
10
|
+
message: string;
|
|
11
|
+
}>;
|
|
12
|
+
getActiveSessions(user: RequestUser): Promise<import("../entities/refresh-token.entity").RefreshToken[]>;
|
|
13
|
+
revokeSession(user: RequestUser, sessionId: string): Promise<{
|
|
14
|
+
message: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=session.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessions/controllers/session.controller.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAoB,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,qBAEa,iBAAiB;IACjB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAoBjD,YAAY,CAAS,IAAI,EAAE,eAAe,EAAS,GAAG,EAAE,OAAO;IAU/D,MAAM,CAAgB,IAAI,EAAE,WAAW,EAAS,GAAG,EAAE,OAAO;;;IA4B5D,iBAAiB,CAAgB,IAAI,EAAE,WAAW;IASlD,aAAa,CAAgB,IAAI,EAAE,WAAW,EAAsB,SAAS,EAAE,MAAM;;;CAI3F"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SessionController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const decorators_1 = require("../../../common/decorators");
|
|
19
|
+
const auth_guard_1 = require("../../../common/guards/auth.guard");
|
|
20
|
+
const request_utils_1 = require("../../../common/utils/request.utils");
|
|
21
|
+
const token_dto_1 = require("../../auth/dto/token.dto");
|
|
22
|
+
const refresh_token_entity_1 = require("../entities/refresh-token.entity");
|
|
23
|
+
const token_service_1 = require("../services/token.service");
|
|
24
|
+
let SessionController = class SessionController {
|
|
25
|
+
tokenService;
|
|
26
|
+
constructor(tokenService) {
|
|
27
|
+
this.tokenService = tokenService;
|
|
28
|
+
}
|
|
29
|
+
async refreshToken(body, req) {
|
|
30
|
+
const { ip, deviceInfo } = (0, request_utils_1.extractRequestInfo)(req);
|
|
31
|
+
return this.tokenService.rotateRefreshToken(body.refreshToken, deviceInfo, ip);
|
|
32
|
+
}
|
|
33
|
+
async logout(user, req) {
|
|
34
|
+
await this.tokenService.revokeAllUserTokens(user.id, refresh_token_entity_1.RevokeReason.LOGOUT);
|
|
35
|
+
// Immediately invalidate the current access token so it cannot be reused
|
|
36
|
+
// during its remaining natural lifetime.
|
|
37
|
+
const raw = (req.headers['authorization'] ?? '').replace(/^Bearer\s+/i, '');
|
|
38
|
+
if (raw !== '' && user.jti) {
|
|
39
|
+
try {
|
|
40
|
+
const payload = JSON.parse(Buffer.from(raw.split('.')[1], 'base64url').toString());
|
|
41
|
+
const exp = payload.exp;
|
|
42
|
+
if (exp != null) {
|
|
43
|
+
const remaining = exp - Math.floor(Date.now() / 1000);
|
|
44
|
+
await this.tokenService.revokeAccessToken(user.jti, remaining);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
// Non-fatal: token expires naturally if decode fails
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return { message: 'Logged out successfully' };
|
|
52
|
+
}
|
|
53
|
+
async getActiveSessions(user) {
|
|
54
|
+
return this.tokenService.getUserActiveSessions(user.id);
|
|
55
|
+
}
|
|
56
|
+
async revokeSession(user, sessionId) {
|
|
57
|
+
await this.tokenService.revokeRefreshToken(sessionId, refresh_token_entity_1.RevokeReason.LOGOUT);
|
|
58
|
+
return { message: 'Session revoked successfully' };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.SessionController = SessionController;
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, decorators_1.Public)(),
|
|
64
|
+
(0, common_1.Post)('refresh'),
|
|
65
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
66
|
+
(0, swagger_1.ApiOperation)({
|
|
67
|
+
summary: 'Refresh tokens',
|
|
68
|
+
description: 'Rotates the refresh token and returns the same token envelope as login/register: ' +
|
|
69
|
+
'`{ accessToken, refreshToken, expiresIn, user, roles }` with a fresh user snapshot from the DB.',
|
|
70
|
+
}),
|
|
71
|
+
(0, swagger_1.ApiBody)({ type: token_dto_1.RefreshTokenDto }),
|
|
72
|
+
(0, swagger_1.ApiOkResponse)({
|
|
73
|
+
type: token_dto_1.TokenResponseDto,
|
|
74
|
+
description: 'New access + refresh token pair with updated user profile and roles',
|
|
75
|
+
}),
|
|
76
|
+
(0, swagger_1.ApiUnauthorizedResponse)({
|
|
77
|
+
description: 'Invalid, expired, or reused refresh token; or account deactivated/suspended/banned',
|
|
78
|
+
}),
|
|
79
|
+
__param(0, (0, common_1.Body)()),
|
|
80
|
+
__param(1, (0, common_1.Req)()),
|
|
81
|
+
__metadata("design:type", Function),
|
|
82
|
+
__metadata("design:paramtypes", [token_dto_1.RefreshTokenDto, Object]),
|
|
83
|
+
__metadata("design:returntype", Promise)
|
|
84
|
+
], SessionController.prototype, "refreshToken", null);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard),
|
|
87
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
88
|
+
(0, common_1.Post)('logout'),
|
|
89
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
90
|
+
(0, swagger_1.ApiOperation)({ summary: 'Logout' }),
|
|
91
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
92
|
+
__param(1, (0, common_1.Req)()),
|
|
93
|
+
__metadata("design:type", Function),
|
|
94
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
95
|
+
__metadata("design:returntype", Promise)
|
|
96
|
+
], SessionController.prototype, "logout", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard),
|
|
99
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
100
|
+
(0, common_1.Get)('sessions'),
|
|
101
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get active sessions' }),
|
|
102
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [Object]),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], SessionController.prototype, "getActiveSessions", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard),
|
|
109
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
110
|
+
(0, common_1.Post)('sessions/:sessionId/revoke'),
|
|
111
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
112
|
+
(0, swagger_1.ApiOperation)({ summary: 'Revoke a session' }),
|
|
113
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
114
|
+
__param(1, (0, common_1.Param)('sessionId')),
|
|
115
|
+
__metadata("design:type", Function),
|
|
116
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
117
|
+
__metadata("design:returntype", Promise)
|
|
118
|
+
], SessionController.prototype, "revokeSession", null);
|
|
119
|
+
exports.SessionController = SessionController = __decorate([
|
|
120
|
+
(0, swagger_1.ApiTags)('Sessions'),
|
|
121
|
+
(0, common_1.Controller)('auth'),
|
|
122
|
+
__metadata("design:paramtypes", [token_service_1.TokenService])
|
|
123
|
+
], SessionController);
|
|
124
|
+
//# sourceMappingURL=session.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.controller.js","sourceRoot":"","sources":["../../../../src/modules/sessions/controllers/session.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,6CAOyB;AAGzB,2DAAiE;AACjE,kEAAiE;AAEjE,uEAAyE;AACzE,wDAA6E;AAC7E,2EAAgE;AAChE,6DAAyD;AAIlD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACA;IAA7B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAoBrD,AAAN,KAAK,CAAC,YAAY,CAAS,IAAqB,EAAS,GAAY;QACpE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,IAAA,kCAAkB,EAAC,GAAG,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IAChF,CAAC;IAOK,AAAN,KAAK,CAAC,MAAM,CAAgB,IAAiB,EAAS,GAAY;QACjE,MAAM,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,EAAE,mCAAY,CAAC,MAAM,CAAC,CAAC;QAE1E,yEAAyE;QACzE,yCAAyC;QACzC,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QAC5E,IAAI,GAAG,KAAK,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC;gBACJ,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CACzB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,CAClC,CAAC;gBACtB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;gB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AE,CAAA;IAAyB,WAAA,IAAA,YAAG,GAAE,CAAA;;qCAAvB,2BAAe;;qDAG/C;AAOK;IALL,IAAA,kBAAS,EAAC,yBAAY,CAAC;IACvB,IAAA,uBAAa,GAAE;IACf,IAAA,aAAI,EAAC,QAAQ,CAAC;IACd,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IACtB,WAAA,IAAA,wBAAW,GAAE,CAAA;IAAqB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;+CAsBpD;AAMK;IAJL,IAAA,kBAAS,EAAC,yBAAY,CAAC;IACvB,IAAA,uBAAa,GAAE;IACf,IAAA,YAAG,EAAC,UAAU,CAAC;IACf,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACxB,WAAA,IAAA,wBAAW,GAAE,CAAA;;;;0DAErC;AAOK;IALL,IAAA,kBAAS,EAAC,yBAAY,CAAC;IACvB,IAAA,uBAAa,GAAE;IACf,IAAA,aAAI,EAAC,4BAA4B,CAAC;IAClC,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;IACzB,WAAA,IAAA,wBAAW,GAAE,CAAA;IAAqB,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;;;;sDAGxE;4BAvEW,iBAAiB;IAF7B,IAAA,iBAAO,EAAC,UAAU,CAAC;IACnB,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAEyB,4BAAY;GAD3C,iBAAiB,CAwE7B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseEntity } from '../../../common/base/base.entity';
|
|
2
|
+
import { User } from '../../users/entities/user.entity';
|
|
3
|
+
export declare enum RevokeReason {
|
|
4
|
+
ROTATED = "rotated",
|
|
5
|
+
LOGOUT = "logout",
|
|
6
|
+
REUSE_DETECTED = "reuse_detected",
|
|
7
|
+
ADMIN = "admin"
|
|
8
|
+
}
|
|
9
|
+
export declare class RefreshToken extends BaseEntity {
|
|
10
|
+
userId: string;
|
|
11
|
+
tokenHash: string;
|
|
12
|
+
/**
|
|
13
|
+
* Shared UUID across all tokens in a rotation chain.
|
|
14
|
+
* Used to detect refresh token reuse — if a revoked token is used,
|
|
15
|
+
* all tokens in the same family are revoked immediately.
|
|
16
|
+
*/
|
|
17
|
+
familyId: string;
|
|
18
|
+
/**
|
|
19
|
+
* External provider refresh token encrypted with AES-256-GCM (ENCRYPTION_KEY env var).
|
|
20
|
+
* Column renamed from `provider_refresh_token`; a migration is needed for existing data.
|
|
21
|
+
*/
|
|
22
|
+
providerRefreshTokenEncrypted?: string;
|
|
23
|
+
deviceInfo?: string;
|
|
24
|
+
ipAddress?: string;
|
|
25
|
+
expiresAt: Date;
|
|
26
|
+
isRevoked: boolean;
|
|
27
|
+
revokeReason?: RevokeReason;
|
|
28
|
+
user: User;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=refresh-token.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-token.entity.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessions/entities/refresh-token.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAExD,oBAAY,YAAY;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,KAAK,UAAU;CACf;AAED,qBACa,YAAa,SAAQ,UAAU;IAG3C,MAAM,EAAG,MAAM,CAAC;IAGhB,SAAS,EAAG,MAAM,CAAC;IAEnB;;;;OAIG;IAGH,QAAQ,EAAG,MAAM,CAAC;IAElB;;;OAGG;IAEH,6BAA6B,CAAC,EAAE,MAAM,CAAC;IAGvC,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,OAAO,CAAC;IAQpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAI5B,IAAI,EAAG,IAAI,CAAC;CACZ"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RefreshToken = exports.RevokeReason = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_1 = require("../../../common/base/base.entity");
|
|
15
|
+
const user_entity_1 = require("../../users/entities/user.entity");
|
|
16
|
+
var RevokeReason;
|
|
17
|
+
(function (RevokeReason) {
|
|
18
|
+
RevokeReason["ROTATED"] = "rotated";
|
|
19
|
+
RevokeReason["LOGOUT"] = "logout";
|
|
20
|
+
RevokeReason["REUSE_DETECTED"] = "reuse_detected";
|
|
21
|
+
RevokeReason["ADMIN"] = "admin";
|
|
22
|
+
})(RevokeReason || (exports.RevokeReason = RevokeReason = {}));
|
|
23
|
+
let RefreshToken = class RefreshToken extends base_entity_1.BaseEntity {
|
|
24
|
+
userId;
|
|
25
|
+
tokenHash;
|
|
26
|
+
/**
|
|
27
|
+
* Shared UUID across all tokens in a rotation chain.
|
|
28
|
+
* Used to detect refresh token reuse — if a revoked token is used,
|
|
29
|
+
* all tokens in the same family are revoked immediately.
|
|
30
|
+
*/
|
|
31
|
+
familyId;
|
|
32
|
+
/**
|
|
33
|
+
* External provider refresh token encrypted with AES-256-GCM (ENCRYPTION_KEY env var).
|
|
34
|
+
* Column renamed from `provider_refresh_token`; a migration is needed for existing data.
|
|
35
|
+
*/
|
|
36
|
+
providerRefreshTokenEncrypted;
|
|
37
|
+
deviceInfo;
|
|
38
|
+
ipAddress;
|
|
39
|
+
expiresAt;
|
|
40
|
+
isRevoked;
|
|
41
|
+
revokeReason;
|
|
42
|
+
user;
|
|
43
|
+
};
|
|
44
|
+
exports.RefreshToken = RefreshToken;
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Index)(),
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'user_id' }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], RefreshToken.prototype, "userId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ name: 'token_hash' }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], RefreshToken.prototype, "tokenHash", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Index)(),
|
|
56
|
+
(0, typeorm_1.Column)({ name: 'family_id' }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], RefreshToken.prototype, "familyId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ name: 'provider_refresh_token_encrypted', nullable: true }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], RefreshToken.prototype, "providerRefreshTokenEncrypted", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ name: 'device_info', nullable: true }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], RefreshToken.prototype, "deviceInfo", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ name: 'ip_address', nullable: true }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], RefreshToken.prototype, "ipAddress", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ name: 'expires_at', type: 'timestamptz' }),
|
|
73
|
+
__metadata("design:type", Date)
|
|
74
|
+
], RefreshToken.prototype, "expiresAt", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ name: 'is_revoked', default: false }),
|
|
77
|
+
__metadata("design:type", Boolean)
|
|
78
|
+
], RefreshToken.prototype, "isRevoked", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({
|
|
81
|
+
name: 'revoke_reason',
|
|
82
|
+
type: 'enum',
|
|
83
|
+
enum: RevokeReason,
|
|
84
|
+
nullable: true,
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], RefreshToken.prototype, "revokeReason", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { onDelete: 'CASCADE' }),
|
|
90
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
91
|
+
__metadata("design:type", user_entity_1.User)
|
|
92
|
+
], RefreshToken.prototype, "user", void 0);
|
|
93
|
+
exports.RefreshToken = RefreshToken = __decorate([
|
|
94
|
+
(0, typeorm_1.Entity)('refresh_tokens')
|
|
95
|
+
], RefreshToken);
|
|
96
|
+
//# sourceMappingURL=refresh-token.entity.js.map
|