@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,639 @@
|
|
|
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.FileUploadService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const crypto_1 = require("crypto");
|
|
19
|
+
const path_1 = require("path");
|
|
20
|
+
const typeorm_2 = require("typeorm");
|
|
21
|
+
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
22
|
+
const settings_defaults_1 = require("../../settings/constants/settings.defaults");
|
|
23
|
+
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
24
|
+
const settings_service_1 = require("../../settings/services/settings.service");
|
|
25
|
+
const upload_types_1 = require("../constants/upload.types");
|
|
26
|
+
const pending_file_upload_entity_1 = require("../entities/pending-file-upload.entity");
|
|
27
|
+
const uploaded_file_entity_1 = require("../entities/uploaded-file.entity");
|
|
28
|
+
const file_scan_service_interface_1 = require("../interfaces/file-scan.service.interface");
|
|
29
|
+
const file_payload_util_1 = require("../utils/file-payload.util");
|
|
30
|
+
const file_sniff_util_1 = require("../utils/file-sniff.util");
|
|
31
|
+
const filename_util_1 = require("../utils/filename.util");
|
|
32
|
+
const image_dimension_validator_1 = require("../utils/image-dimension.validator");
|
|
33
|
+
const image_optimize_util_1 = require("../utils/image-optimize.util");
|
|
34
|
+
const upload_category_validator_1 = require("../utils/upload-category.validator");
|
|
35
|
+
const r2_storage_service_1 = require("./r2-storage.service");
|
|
36
|
+
let FileUploadService = class FileUploadService {
|
|
37
|
+
fileRepo;
|
|
38
|
+
pendingRepo;
|
|
39
|
+
r2Storage;
|
|
40
|
+
settingsService;
|
|
41
|
+
logger;
|
|
42
|
+
fileScanService;
|
|
43
|
+
constructor(fileRepo, pendingRepo, r2Storage, settingsService, logger, fileScanService) {
|
|
44
|
+
this.fileRepo = fileRepo;
|
|
45
|
+
this.pendingRepo = pendingRepo;
|
|
46
|
+
this.r2Storage = r2Storage;
|
|
47
|
+
this.settingsService = settingsService;
|
|
48
|
+
this.logger = logger;
|
|
49
|
+
this.fileScanService = fileScanService;
|
|
50
|
+
}
|
|
51
|
+
getCategories() {
|
|
52
|
+
return this.loadCategories().map((c) => this.toCategoryDto(c));
|
|
53
|
+
}
|
|
54
|
+
async upload(userId, categorySlug, file) {
|
|
55
|
+
this.r2Storage.assertReady();
|
|
56
|
+
this.assertFilePresent(file);
|
|
57
|
+
try {
|
|
58
|
+
const category = this.resolveCategory(categorySlug);
|
|
59
|
+
this.assertDirectUploadAllowed(category, file.size);
|
|
60
|
+
const extension = this.extractExtension(file.originalname);
|
|
61
|
+
const resolved = await (0, file_payload_util_1.resolveIncomingFile)(file, extension);
|
|
62
|
+
try {
|
|
63
|
+
await this.validateIncomingFile(userId, resolved, category, extension);
|
|
64
|
+
await this.withCategoryQuotaLock(userId, category.slug, async (em) => {
|
|
65
|
+
await this.assertWithinUserQuota(userId, category, { em });
|
|
66
|
+
});
|
|
67
|
+
const prepared = await this.prepareUploadPayload(resolved, extension, category, userId);
|
|
68
|
+
const storedName = category.optimizeImages
|
|
69
|
+
? (0, filename_util_1.normalizeStoredFileName)(resolved.originalname, prepared.extension)
|
|
70
|
+
: resolved.originalname;
|
|
71
|
+
const putResult = await this.putPreparedFile(prepared);
|
|
72
|
+
try {
|
|
73
|
+
const record = await this.persistFileRecordWithQuotaLock(userId, category, {
|
|
74
|
+
objectKey: prepared.objectKey,
|
|
75
|
+
originalName: storedName,
|
|
76
|
+
mimeType: prepared.mimeType,
|
|
77
|
+
extension: prepared.extension,
|
|
78
|
+
sizeBytes: prepared.sizeBytes,
|
|
79
|
+
etag: putResult.etag,
|
|
80
|
+
checksumSha256: putResult.checksumSha256 ?? '',
|
|
81
|
+
});
|
|
82
|
+
this.logFileEvent('files.upload.success', userId, category.slug, {
|
|
83
|
+
fileId: record.id,
|
|
84
|
+
sizeBytes: prepared.sizeBytes,
|
|
85
|
+
});
|
|
86
|
+
return this.toFileDto(record);
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
await this.r2Storage.deleteObject(prepared.objectKey).catch(() => undefined);
|
|
90
|
+
throw err;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
finally {
|
|
94
|
+
await resolved.cleanup();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
await (0, file_payload_util_1.cleanupMulterDiskFile)(file);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async createPresignedUpload(userId, dto) {
|
|
102
|
+
this.r2Storage.assertReady();
|
|
103
|
+
const category = this.resolveCategory(dto.category);
|
|
104
|
+
const extension = this.extractExtension(dto.filename);
|
|
105
|
+
if (dto.sizeBytes > category.maxSizeBytes) {
|
|
106
|
+
throw new common_1.BadRequestException(`Declared size exceeds maximum of ${category.maxSizeBytes} bytes for category "${category.slug}".`);
|
|
107
|
+
}
|
|
108
|
+
this.assertExtensionAllowed(extension, category);
|
|
109
|
+
this.assertMimeAllowed(dto.mimeType, extension);
|
|
110
|
+
const objectKey = this.buildObjectKey(category.slug, userId, extension);
|
|
111
|
+
const expiresAt = new Date(Date.now() + upload_types_1.UPLOAD_PRESIGNED_TTL_SECONDS * 1000);
|
|
112
|
+
const pendingId = await this.withCategoryQuotaLock(userId, category.slug, async (em) => {
|
|
113
|
+
await this.assertWithinUserQuota(userId, category, { em });
|
|
114
|
+
const pending = await em.save(em.create(pending_file_upload_entity_1.PendingFileUpload, {
|
|
115
|
+
userId,
|
|
116
|
+
category: category.slug,
|
|
117
|
+
objectKey,
|
|
118
|
+
expiresAt,
|
|
119
|
+
}));
|
|
120
|
+
return pending.id;
|
|
121
|
+
});
|
|
122
|
+
try {
|
|
123
|
+
const uploadUrl = await this.r2Storage.getPresignedUploadUrl(objectKey, dto.mimeType, upload_types_1.UPLOAD_PRESIGNED_TTL_SECONDS);
|
|
124
|
+
return {
|
|
125
|
+
uploadUrl,
|
|
126
|
+
objectKey,
|
|
127
|
+
expiresIn: upload_types_1.UPLOAD_PRESIGNED_TTL_SECONDS,
|
|
128
|
+
method: 'PUT',
|
|
129
|
+
headers: { 'Content-Type': dto.mimeType },
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
await this.pendingRepo.delete(pendingId).catch(() => undefined);
|
|
134
|
+
throw err;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
async completePresignedUpload(userId, dto) {
|
|
138
|
+
this.r2Storage.assertReady();
|
|
139
|
+
const category = this.resolveCategory(dto.category);
|
|
140
|
+
const extension = this.extractExtension(dto.originalName);
|
|
141
|
+
if (!dto.objectKey.startsWith(this.buildObjectKeyPrefix(category.slug, userId))) {
|
|
142
|
+
throw new common_1.BadRequestException('objectKey does not belong to this user and category.');
|
|
143
|
+
}
|
|
144
|
+
const pending = await this.pendingRepo.findOne({
|
|
145
|
+
where: { objectKey: dto.objectKey, userId },
|
|
146
|
+
});
|
|
147
|
+
if (!pending || pending.expiresAt <= new Date()) {
|
|
148
|
+
await this.r2Storage.deleteObject(dto.objectKey).catch(() => undefined);
|
|
149
|
+
if (pending) {
|
|
150
|
+
await this.pendingRepo.delete(pending.id);
|
|
151
|
+
}
|
|
152
|
+
throw new common_1.BadRequestException('Presigned upload expired or was not initiated.');
|
|
153
|
+
}
|
|
154
|
+
const head = await this.r2Storage.headObject(dto.objectKey);
|
|
155
|
+
const sizeBytes = head.contentLength ?? dto.sizeBytes;
|
|
156
|
+
if (sizeBytes > category.maxSizeBytes) {
|
|
157
|
+
await this.r2Storage.deleteObject(dto.objectKey).catch(() => undefined);
|
|
158
|
+
await this.pendingRepo.delete(pending.id);
|
|
159
|
+
throw new common_1.BadRequestException(`Uploaded object exceeds maximum size for category "${category.slug}".`);
|
|
160
|
+
}
|
|
161
|
+
this.assertExtensionAllowed(extension, category);
|
|
162
|
+
this.assertMimeAllowed(dto.mimeType, extension);
|
|
163
|
+
const object = await this.r2Storage.getObject(dto.objectKey);
|
|
164
|
+
const buffer = await this.streamToBuffer(object.body);
|
|
165
|
+
if (!(0, file_sniff_util_1.magicBytesMatchExtension)(buffer, extension)) {
|
|
166
|
+
await this.r2Storage.deleteObject(dto.objectKey).catch(() => undefined);
|
|
167
|
+
await this.pendingRepo.delete(pending.id);
|
|
168
|
+
throw new common_1.BadRequestException(`File content does not match extension ".${extension}".`);
|
|
169
|
+
}
|
|
170
|
+
try {
|
|
171
|
+
(0, image_dimension_validator_1.validateImageDimensions)(buffer, extension, category);
|
|
172
|
+
}
|
|
173
|
+
catch (err) {
|
|
174
|
+
await this.r2Storage.deleteObject(dto.objectKey).catch(() => undefined);
|
|
175
|
+
await this.pendingRepo.delete(pending.id);
|
|
176
|
+
throw new common_1.BadRequestException(err instanceof Error ? err.message : 'Invalid image dimensions.');
|
|
177
|
+
}
|
|
178
|
+
const pseudoFile = {
|
|
179
|
+
originalname: dto.originalName,
|
|
180
|
+
mimetype: dto.mimeType,
|
|
181
|
+
size: sizeBytes,
|
|
182
|
+
buffer,
|
|
183
|
+
};
|
|
184
|
+
await this.fileScanService.scanFile(pseudoFile, { userId, category: category.slug });
|
|
185
|
+
let finalObjectKey = dto.objectKey;
|
|
186
|
+
let finalMime = dto.mimeType;
|
|
187
|
+
let finalExt = extension;
|
|
188
|
+
let finalSize = sizeBytes;
|
|
189
|
+
let finalEtag = head.etag;
|
|
190
|
+
let finalChecksum = this.sha256(buffer);
|
|
191
|
+
if (category.optimizeImages) {
|
|
192
|
+
const optimized = await (0, image_optimize_util_1.optimizeImageBuffer)(buffer, extension, category.optimizeImages);
|
|
193
|
+
finalObjectKey = this.buildObjectKey(category.slug, userId, optimized.extension);
|
|
194
|
+
finalMime = optimized.mimeType;
|
|
195
|
+
finalExt = optimized.extension;
|
|
196
|
+
finalSize = optimized.buffer.length;
|
|
197
|
+
try {
|
|
198
|
+
const putResult = await this.r2Storage.putObject(finalObjectKey, optimized.buffer, finalMime);
|
|
199
|
+
finalEtag = putResult.etag;
|
|
200
|
+
finalChecksum = putResult.checksumSha256 ?? this.sha256(optimized.buffer);
|
|
201
|
+
await this.r2Storage.deleteObject(dto.objectKey);
|
|
202
|
+
}
|
|
203
|
+
catch (err) {
|
|
204
|
+
await this.r2Storage.deleteObject(dto.objectKey).catch(() => undefined);
|
|
205
|
+
await this.pendingRepo.delete(pending.id);
|
|
206
|
+
throw err;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
const storedName = category.optimizeImages
|
|
210
|
+
? (0, filename_util_1.normalizeStoredFileName)(dto.originalName, finalExt)
|
|
211
|
+
: dto.originalName;
|
|
212
|
+
try {
|
|
213
|
+
const record = await this.persistFileRecordWithQuotaLock(userId, category, {
|
|
214
|
+
objectKey: finalObjectKey,
|
|
215
|
+
originalName: storedName,
|
|
216
|
+
mimeType: finalMime,
|
|
217
|
+
extension: finalExt,
|
|
218
|
+
sizeBytes: finalSize,
|
|
219
|
+
etag: finalEtag,
|
|
220
|
+
checksumSha256: finalChecksum,
|
|
221
|
+
}, { excludePendingObjectKey: dto.objectKey });
|
|
222
|
+
await this.pendingRepo.delete(pending.id);
|
|
223
|
+
this.logFileEvent('files.upload.presigned_complete', userId, category.slug, {
|
|
224
|
+
fileId: record.id,
|
|
225
|
+
sizeBytes: finalSize,
|
|
226
|
+
});
|
|
227
|
+
return this.toFileDto(record);
|
|
228
|
+
}
|
|
229
|
+
catch (err) {
|
|
230
|
+
await this.r2Storage.deleteObject(finalObjectKey).catch(() => undefined);
|
|
231
|
+
await this.pendingRepo.delete(pending.id).catch(() => undefined);
|
|
232
|
+
throw err;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
async replaceFile(userId, fileId, file) {
|
|
236
|
+
this.r2Storage.assertReady();
|
|
237
|
+
this.assertFilePresent(file);
|
|
238
|
+
try {
|
|
239
|
+
const existing = await this.findOwnedFile(userId, fileId);
|
|
240
|
+
const category = this.resolveCategory(existing.category);
|
|
241
|
+
this.assertDirectUploadAllowed(category, file.size);
|
|
242
|
+
const extension = this.extractExtension(file.originalname);
|
|
243
|
+
const resolved = await (0, file_payload_util_1.resolveIncomingFile)(file, extension);
|
|
244
|
+
try {
|
|
245
|
+
await this.validateIncomingFile(userId, resolved, category, extension);
|
|
246
|
+
const prepared = await this.prepareUploadPayload(resolved, extension, category, userId);
|
|
247
|
+
const storedName = category.optimizeImages
|
|
248
|
+
? (0, filename_util_1.normalizeStoredFileName)(resolved.originalname, prepared.extension)
|
|
249
|
+
: resolved.originalname;
|
|
250
|
+
const oldObjectKey = existing.objectKey;
|
|
251
|
+
const publicUrl = category.public
|
|
252
|
+
? this.r2Storage.buildPublicUrl(prepared.objectKey)
|
|
253
|
+
: undefined;
|
|
254
|
+
const putResult = await this.putPreparedFile(prepared);
|
|
255
|
+
existing.objectKey = prepared.objectKey;
|
|
256
|
+
existing.originalName = storedName;
|
|
257
|
+
existing.mimeType = prepared.mimeType;
|
|
258
|
+
existing.extension = prepared.extension;
|
|
259
|
+
existing.sizeBytes = String(prepared.sizeBytes);
|
|
260
|
+
existing.publicUrl = publicUrl;
|
|
261
|
+
existing.etag = putResult.etag;
|
|
262
|
+
existing.checksumSha256 = putResult.checksumSha256 ?? '';
|
|
263
|
+
try {
|
|
264
|
+
const updated = await this.fileRepo.save(existing);
|
|
265
|
+
if (oldObjectKey !== prepared.objectKey) {
|
|
266
|
+
await this.r2Storage.deleteObject(oldObjectKey).catch(() => undefined);
|
|
267
|
+
}
|
|
268
|
+
this.logFileEvent('files.replace.success', userId, category.slug, { fileId });
|
|
269
|
+
return this.toFileDto(updated);
|
|
270
|
+
}
|
|
271
|
+
catch (err) {
|
|
272
|
+
await this.r2Storage.deleteObject(prepared.objectKey).catch(() => undefined);
|
|
273
|
+
throw err;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
finally {
|
|
277
|
+
await resolved.cleanup();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
finally {
|
|
281
|
+
await (0, file_payload_util_1.cleanupMulterDiskFile)(file);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
async listUserFiles(userId, categorySlug) {
|
|
285
|
+
const where = { userId };
|
|
286
|
+
if (categorySlug) {
|
|
287
|
+
this.resolveCategory(categorySlug);
|
|
288
|
+
where.category = categorySlug;
|
|
289
|
+
}
|
|
290
|
+
const files = await this.fileRepo.find({
|
|
291
|
+
where,
|
|
292
|
+
order: { createdAt: 'DESC' },
|
|
293
|
+
});
|
|
294
|
+
return files.map((f) => this.toFileDto(f));
|
|
295
|
+
}
|
|
296
|
+
async getFile(userId, fileId) {
|
|
297
|
+
const file = await this.findOwnedFile(userId, fileId);
|
|
298
|
+
return this.toFileDto(file);
|
|
299
|
+
}
|
|
300
|
+
async getDownloadUrl(userId, fileId) {
|
|
301
|
+
const file = await this.findAccessibleFile(userId, fileId);
|
|
302
|
+
const category = this.resolveCategory(file.category);
|
|
303
|
+
if (category.public && file.publicUrl) {
|
|
304
|
+
return { url: file.publicUrl, expiresIn: 0 };
|
|
305
|
+
}
|
|
306
|
+
const expiresIn = 300;
|
|
307
|
+
const url = await this.r2Storage.getPresignedDownloadUrl(file.objectKey, expiresIn);
|
|
308
|
+
return { url, expiresIn };
|
|
309
|
+
}
|
|
310
|
+
async getFilePreview(requesterUserId, fileId) {
|
|
311
|
+
const file = await this.findAccessibleFile(requesterUserId, fileId);
|
|
312
|
+
const object = await this.r2Storage.getObject(file.objectKey);
|
|
313
|
+
return {
|
|
314
|
+
body: object.body,
|
|
315
|
+
mimeType: file.mimeType,
|
|
316
|
+
originalName: file.originalName,
|
|
317
|
+
sizeBytes: Number(file.sizeBytes),
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
async deleteFile(userId, fileId) {
|
|
321
|
+
const file = await this.findOwnedFile(userId, fileId);
|
|
322
|
+
await this.r2Storage.deleteObject(file.objectKey);
|
|
323
|
+
await this.fileRepo.softRemove(file);
|
|
324
|
+
this.logFileEvent('files.delete.success', userId, file.category, { fileId });
|
|
325
|
+
return { message: 'File deleted successfully.' };
|
|
326
|
+
}
|
|
327
|
+
/** Purges R2 objects for soft-deleted files older than the retention window. */
|
|
328
|
+
async purgeSoftDeletedStorage(retentionDays = 7) {
|
|
329
|
+
if (!this.r2Storage.isEnabled())
|
|
330
|
+
return { purged: 0 };
|
|
331
|
+
const cutoff = new Date(Date.now() - retentionDays * 24 * 60 * 60 * 1000);
|
|
332
|
+
const stale = await this.fileRepo
|
|
333
|
+
.createQueryBuilder('f')
|
|
334
|
+
.withDeleted()
|
|
335
|
+
.where('f.deleted_at IS NOT NULL')
|
|
336
|
+
.andWhere('f.deleted_at < :cutoff', { cutoff })
|
|
337
|
+
.getMany();
|
|
338
|
+
let purged = 0;
|
|
339
|
+
for (const file of stale) {
|
|
340
|
+
try {
|
|
341
|
+
await this.r2Storage.deleteObject(file.objectKey);
|
|
342
|
+
purged++;
|
|
343
|
+
}
|
|
344
|
+
catch {
|
|
345
|
+
// Best-effort — object may already be gone
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return { purged };
|
|
349
|
+
}
|
|
350
|
+
/** Deletes expired presigned reservations and orphaned R2 objects. */
|
|
351
|
+
async purgeExpiredPendingUploads() {
|
|
352
|
+
if (!this.r2Storage.isEnabled())
|
|
353
|
+
return { purged: 0 };
|
|
354
|
+
const expired = await this.pendingRepo.find({
|
|
355
|
+
where: { expiresAt: (0, typeorm_2.LessThan)(new Date()) },
|
|
356
|
+
});
|
|
357
|
+
let purged = 0;
|
|
358
|
+
for (const pending of expired) {
|
|
359
|
+
try {
|
|
360
|
+
await this.r2Storage.deleteObject(pending.objectKey);
|
|
361
|
+
}
|
|
362
|
+
catch {
|
|
363
|
+
// Object may never have been uploaded
|
|
364
|
+
}
|
|
365
|
+
await this.pendingRepo.delete(pending.id);
|
|
366
|
+
purged++;
|
|
367
|
+
}
|
|
368
|
+
return { purged };
|
|
369
|
+
}
|
|
370
|
+
// ─── Validation ─────────────────────────────────────────────────────────────
|
|
371
|
+
loadCategories() {
|
|
372
|
+
const raw = this.settingsService.get(settings_keys_1.SETTING_KEYS.STORAGE_UPLOAD_CATEGORIES);
|
|
373
|
+
const defaults = settings_defaults_1.SETTING_DEFAULTS['storage.upload_categories'];
|
|
374
|
+
const { categories, issues } = (0, upload_category_validator_1.validateUploadCategories)(raw, defaults);
|
|
375
|
+
for (const issue of issues) {
|
|
376
|
+
this.logger.warn('Invalid upload category skipped', {
|
|
377
|
+
event: 'files.category.invalid',
|
|
378
|
+
metadata: { slug: issue.slug, reason: issue.reason },
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
return categories;
|
|
382
|
+
}
|
|
383
|
+
resolveCategory(slug) {
|
|
384
|
+
const normalized = slug?.trim().toLowerCase();
|
|
385
|
+
const category = this.loadCategories().find((c) => c.slug === normalized);
|
|
386
|
+
if (!category) {
|
|
387
|
+
throw new common_1.BadRequestException(`Unknown upload category "${slug}". Configure it in storage.upload_categories.`);
|
|
388
|
+
}
|
|
389
|
+
return category;
|
|
390
|
+
}
|
|
391
|
+
assertDirectUploadAllowed(category, sizeBytes) {
|
|
392
|
+
if (category.presignedOnly) {
|
|
393
|
+
throw new common_1.BadRequestException(`Category "${category.slug}" only accepts presigned uploads. Use POST /files/presigned-upload.`);
|
|
394
|
+
}
|
|
395
|
+
const directMax = category.directUploadMaxBytes ?? upload_types_1.UPLOAD_DEFAULT_DIRECT_MAX_BYTES;
|
|
396
|
+
if (sizeBytes > directMax) {
|
|
397
|
+
throw new common_1.BadRequestException(`File exceeds direct upload limit of ${directMax} bytes for category "${category.slug}". ` +
|
|
398
|
+
'Use the presigned upload flow for larger files.');
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
async validateIncomingFile(userId, resolved, category, extension) {
|
|
402
|
+
if (resolved.size > upload_types_1.UPLOAD_ABSOLUTE_MAX_BYTES) {
|
|
403
|
+
throw new common_1.BadRequestException(`File exceeds the absolute maximum size of ${upload_types_1.UPLOAD_ABSOLUTE_MAX_BYTES} bytes.`);
|
|
404
|
+
}
|
|
405
|
+
if (resolved.size > category.maxSizeBytes) {
|
|
406
|
+
throw new common_1.BadRequestException(`File exceeds maximum size of ${category.maxSizeBytes} bytes for category "${category.slug}".`);
|
|
407
|
+
}
|
|
408
|
+
this.assertExtensionAllowed(extension, category);
|
|
409
|
+
this.assertMimeAllowed(resolved.mimetype, extension);
|
|
410
|
+
if (!(0, file_sniff_util_1.magicBytesMatchExtension)(resolved.buffer, extension)) {
|
|
411
|
+
throw new common_1.BadRequestException(`File content does not match extension ".${extension}".`);
|
|
412
|
+
}
|
|
413
|
+
try {
|
|
414
|
+
(0, image_dimension_validator_1.validateImageDimensions)(resolved.buffer, extension, category);
|
|
415
|
+
}
|
|
416
|
+
catch (err) {
|
|
417
|
+
throw new common_1.BadRequestException(err instanceof Error ? err.message : 'Invalid image dimensions.');
|
|
418
|
+
}
|
|
419
|
+
const scanBuffer = await (0, file_payload_util_1.readScanBuffer)(resolved);
|
|
420
|
+
const scanPayload = {
|
|
421
|
+
originalname: resolved.originalname,
|
|
422
|
+
mimetype: resolved.mimetype,
|
|
423
|
+
size: resolved.size,
|
|
424
|
+
buffer: scanBuffer,
|
|
425
|
+
};
|
|
426
|
+
await this.fileScanService.scanFile(scanPayload, { userId, category: category.slug });
|
|
427
|
+
}
|
|
428
|
+
assertExtensionAllowed(extension, category) {
|
|
429
|
+
if (upload_types_1.BLOCKED_UPLOAD_EXTENSIONS.has(extension)) {
|
|
430
|
+
throw new common_1.BadRequestException(`File type ".${extension}" is not allowed.`);
|
|
431
|
+
}
|
|
432
|
+
const allowedExtensions = category.extensions.map((e) => e.toLowerCase().replace(/^\./, ''));
|
|
433
|
+
if (!allowedExtensions.includes(extension)) {
|
|
434
|
+
throw new common_1.BadRequestException(`File type ".${extension}" is not allowed for category "${category.slug}". Allowed: ${allowedExtensions.join(', ')}.`);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
assertMimeAllowed(mimeType, extension) {
|
|
438
|
+
const allowedMimes = upload_types_1.EXTENSION_MIME_MAP[extension];
|
|
439
|
+
if (allowedMimes !== undefined &&
|
|
440
|
+
allowedMimes.length > 0 &&
|
|
441
|
+
!allowedMimes.includes(mimeType)) {
|
|
442
|
+
throw new common_1.BadRequestException(`MIME type "${mimeType}" does not match extension ".${extension}".`);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
async assertWithinUserQuota(userId, category, options) {
|
|
446
|
+
const fileRepo = options?.em?.getRepository(uploaded_file_entity_1.UploadedFile) ?? this.fileRepo;
|
|
447
|
+
const pendingRepo = options?.em?.getRepository(pending_file_upload_entity_1.PendingFileUpload) ?? this.pendingRepo;
|
|
448
|
+
const fileCount = await fileRepo.count({
|
|
449
|
+
where: { userId, category: category.slug },
|
|
450
|
+
});
|
|
451
|
+
let pendingCount = await pendingRepo.count({
|
|
452
|
+
where: {
|
|
453
|
+
userId,
|
|
454
|
+
category: category.slug,
|
|
455
|
+
expiresAt: (0, typeorm_2.MoreThan)(new Date()),
|
|
456
|
+
},
|
|
457
|
+
});
|
|
458
|
+
if (options?.excludePendingObjectKey) {
|
|
459
|
+
const excluded = await pendingRepo.findOne({
|
|
460
|
+
where: { objectKey: options.excludePendingObjectKey, userId },
|
|
461
|
+
});
|
|
462
|
+
if (excluded && excluded.expiresAt > new Date()) {
|
|
463
|
+
pendingCount = Math.max(0, pendingCount - 1);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (fileCount + pendingCount >= category.maxFilesPerUser) {
|
|
467
|
+
throw new common_1.BadRequestException(`Maximum of ${category.maxFilesPerUser} file(s) allowed for category "${category.slug}". Delete an existing file first.`);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
/** Serializes quota checks per user/category to prevent concurrent over-allocation. */
|
|
471
|
+
async withCategoryQuotaLock(userId, categorySlug, fn) {
|
|
472
|
+
return this.pendingRepo.manager.transaction(async (em) => {
|
|
473
|
+
await em.query('SELECT pg_advisory_xact_lock(hashtext($1))', [
|
|
474
|
+
`upload-quota:${userId}:${categorySlug}`,
|
|
475
|
+
]);
|
|
476
|
+
return fn(em);
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
async persistFileRecordWithQuotaLock(userId, category, args, options) {
|
|
480
|
+
return this.withCategoryQuotaLock(userId, category.slug, async (em) => {
|
|
481
|
+
await this.assertWithinUserQuota(userId, category, { ...options, em });
|
|
482
|
+
return this.persistFileRecord({ userId, category, ...args }, em);
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
assertFilePresent(file) {
|
|
486
|
+
if (!file || (!file.buffer?.length && !file.path)) {
|
|
487
|
+
throw new common_1.BadRequestException('No file provided.');
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
async prepareUploadPayload(resolved, extension, category, userId) {
|
|
491
|
+
let uploadBuffer = resolved.buffer;
|
|
492
|
+
let uploadMime = resolved.mimetype;
|
|
493
|
+
let uploadExt = extension;
|
|
494
|
+
let diskPath = resolved.diskPath;
|
|
495
|
+
if (category.optimizeImages) {
|
|
496
|
+
const optimized = await (0, image_optimize_util_1.optimizeImageBuffer)(resolved.buffer, extension, category.optimizeImages);
|
|
497
|
+
uploadBuffer = optimized.buffer;
|
|
498
|
+
uploadMime = optimized.mimeType;
|
|
499
|
+
uploadExt = optimized.extension;
|
|
500
|
+
diskPath = undefined;
|
|
501
|
+
}
|
|
502
|
+
return {
|
|
503
|
+
objectKey: this.buildObjectKey(category.slug, userId, uploadExt),
|
|
504
|
+
mimeType: uploadMime,
|
|
505
|
+
extension: uploadExt,
|
|
506
|
+
sizeBytes: diskPath ? resolved.size : uploadBuffer.length,
|
|
507
|
+
buffer: diskPath ? undefined : uploadBuffer,
|
|
508
|
+
diskPath,
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
async putPreparedFile(prepared) {
|
|
512
|
+
if (prepared.diskPath) {
|
|
513
|
+
return this.r2Storage.putObjectFromPath(prepared.objectKey, prepared.diskPath, prepared.mimeType);
|
|
514
|
+
}
|
|
515
|
+
if (!prepared.buffer) {
|
|
516
|
+
throw new common_1.BadRequestException('No upload payload available.');
|
|
517
|
+
}
|
|
518
|
+
return this.r2Storage.putObject(prepared.objectKey, prepared.buffer, prepared.mimeType);
|
|
519
|
+
}
|
|
520
|
+
async persistFileRecord(args, em) {
|
|
521
|
+
const publicUrl = args.category.public
|
|
522
|
+
? this.r2Storage.buildPublicUrl(args.objectKey)
|
|
523
|
+
: undefined;
|
|
524
|
+
const repo = em?.getRepository(uploaded_file_entity_1.UploadedFile) ?? this.fileRepo;
|
|
525
|
+
return repo.save(repo.create({
|
|
526
|
+
userId: args.userId,
|
|
527
|
+
category: args.category.slug,
|
|
528
|
+
objectKey: args.objectKey,
|
|
529
|
+
originalName: args.originalName,
|
|
530
|
+
mimeType: args.mimeType,
|
|
531
|
+
extension: args.extension,
|
|
532
|
+
sizeBytes: String(args.sizeBytes),
|
|
533
|
+
publicUrl,
|
|
534
|
+
etag: args.etag,
|
|
535
|
+
checksumSha256: args.checksumSha256,
|
|
536
|
+
}));
|
|
537
|
+
}
|
|
538
|
+
async findOwnedFile(userId, fileId) {
|
|
539
|
+
const file = await this.fileRepo.findOne({ where: { id: fileId, userId } });
|
|
540
|
+
if (!file) {
|
|
541
|
+
throw new common_1.NotFoundException('File not found.');
|
|
542
|
+
}
|
|
543
|
+
return file;
|
|
544
|
+
}
|
|
545
|
+
async findAccessibleFile(requesterUserId, fileId) {
|
|
546
|
+
const file = await this.fileRepo.findOne({ where: { id: fileId } });
|
|
547
|
+
if (!file) {
|
|
548
|
+
throw new common_1.NotFoundException('File not found.');
|
|
549
|
+
}
|
|
550
|
+
if (file.userId === requesterUserId) {
|
|
551
|
+
return file;
|
|
552
|
+
}
|
|
553
|
+
const category = this.resolveCategory(file.category);
|
|
554
|
+
if (!category.public) {
|
|
555
|
+
throw new common_1.NotFoundException('File not found.');
|
|
556
|
+
}
|
|
557
|
+
return file;
|
|
558
|
+
}
|
|
559
|
+
async assertUserFileCategory(userId, fileId, categorySlug) {
|
|
560
|
+
const file = await this.findOwnedFile(userId, fileId);
|
|
561
|
+
if (file.category !== categorySlug) {
|
|
562
|
+
throw new common_1.BadRequestException(`File must belong to category "${categorySlug}". Got "${file.category}".`);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
extractExtension(filename) {
|
|
566
|
+
const ext = (0, path_1.extname)(filename).replace(/^\./, '').toLowerCase();
|
|
567
|
+
if (!ext) {
|
|
568
|
+
throw new common_1.BadRequestException('File must have an extension.');
|
|
569
|
+
}
|
|
570
|
+
return ext;
|
|
571
|
+
}
|
|
572
|
+
buildObjectKeyPrefix(category, userId) {
|
|
573
|
+
const prefix = this.settingsService
|
|
574
|
+
.get(settings_keys_1.SETTING_KEYS.STORAGE_R2_PATH_PREFIX)
|
|
575
|
+
.replace(/^\/+|\/+$/g, '');
|
|
576
|
+
return [prefix, category, userId].filter(Boolean).join('/') + '/';
|
|
577
|
+
}
|
|
578
|
+
buildObjectKey(category, userId, extension) {
|
|
579
|
+
return `${this.buildObjectKeyPrefix(category, userId)}${(0, crypto_1.randomUUID)()}.${extension}`;
|
|
580
|
+
}
|
|
581
|
+
sha256(buffer) {
|
|
582
|
+
return (0, crypto_1.createHash)('sha256').update(buffer).digest('hex');
|
|
583
|
+
}
|
|
584
|
+
async streamToBuffer(stream) {
|
|
585
|
+
const chunks = [];
|
|
586
|
+
for await (const chunk of stream) {
|
|
587
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
588
|
+
}
|
|
589
|
+
return Buffer.concat(chunks);
|
|
590
|
+
}
|
|
591
|
+
logFileEvent(event, userId, category, metadata) {
|
|
592
|
+
this.logger.info('File upload lifecycle', {
|
|
593
|
+
event,
|
|
594
|
+
metadata: { userId, category, ...metadata },
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
toCategoryDto(category) {
|
|
598
|
+
return {
|
|
599
|
+
slug: category.slug,
|
|
600
|
+
label: category.label,
|
|
601
|
+
extensions: category.extensions.map((e) => e.toLowerCase().replace(/^\./, '')),
|
|
602
|
+
maxSizeBytes: category.maxSizeBytes,
|
|
603
|
+
public: category.public,
|
|
604
|
+
maxFilesPerUser: category.maxFilesPerUser,
|
|
605
|
+
maxWidth: category.maxWidth,
|
|
606
|
+
maxHeight: category.maxHeight,
|
|
607
|
+
directUploadMaxBytes: category.directUploadMaxBytes,
|
|
608
|
+
presignedOnly: category.presignedOnly,
|
|
609
|
+
serverOptimizesImages: Boolean(category.optimizeImages),
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
toFileDto(file) {
|
|
613
|
+
return {
|
|
614
|
+
id: file.id,
|
|
615
|
+
category: file.category,
|
|
616
|
+
originalName: file.originalName,
|
|
617
|
+
mimeType: file.mimeType,
|
|
618
|
+
extension: file.extension,
|
|
619
|
+
sizeBytes: Number(file.sizeBytes),
|
|
620
|
+
publicUrl: file.publicUrl,
|
|
621
|
+
checksumSha256: file.checksumSha256,
|
|
622
|
+
createdAt: file.createdAt,
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
exports.FileUploadService = FileUploadService;
|
|
627
|
+
exports.FileUploadService = FileUploadService = __decorate([
|
|
628
|
+
(0, common_1.Injectable)(),
|
|
629
|
+
__param(0, (0, typeorm_1.InjectRepository)(uploaded_file_entity_1.UploadedFile)),
|
|
630
|
+
__param(1, (0, typeorm_1.InjectRepository)(pending_file_upload_entity_1.PendingFileUpload)),
|
|
631
|
+
__param(5, (0, common_1.Inject)(file_scan_service_interface_1.IFileScanService)),
|
|
632
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
633
|
+
typeorm_2.Repository,
|
|
634
|
+
r2_storage_service_1.R2StorageService,
|
|
635
|
+
settings_service_1.SettingsService,
|
|
636
|
+
structured_logger_service_1.StructuredLoggerService,
|
|
637
|
+
file_scan_service_interface_1.IFileScanService])
|
|
638
|
+
], FileUploadService);
|
|
639
|
+
//# sourceMappingURL=file-upload.service.js.map
|