@colveor/core 1.1.0 → 1.2.1
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 +24 -0
- package/README.md +6 -0
- package/dist/bootstrap/bootstrap-colveor-app.d.ts.map +1 -1
- package/dist/bootstrap/bootstrap-colveor-app.js +22 -3
- package/dist/bootstrap/bootstrap-colveor-app.js.map +1 -1
- package/dist/common/decorators/index.d.ts +6 -0
- package/dist/common/decorators/index.d.ts.map +1 -1
- package/dist/common/decorators/index.js +8 -1
- package/dist/common/decorators/index.js.map +1 -1
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts +9 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts.map +1 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.js +12 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.js.map +1 -0
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts +12 -6
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts.map +1 -1
- package/dist/common/guards/login-ip-rate-limit.guard.js +65 -21
- package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -1
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +3 -2
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts.map +1 -1
- package/dist/common/guards/otp-ip-rate-limit.guard.js +17 -15
- package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -1
- package/dist/common/guards/permissions.guard.d.ts.map +1 -1
- package/dist/common/guards/permissions.guard.js +12 -2
- package/dist/common/guards/permissions.guard.js.map +1 -1
- package/dist/common/interceptors/timeout.interceptor.d.ts +1 -1
- package/dist/common/interceptors/timeout.interceptor.d.ts.map +1 -1
- package/dist/common/interceptors/timeout.interceptor.js +5 -1
- package/dist/common/interceptors/timeout.interceptor.js.map +1 -1
- package/dist/common/interfaces/request-user.d.ts +4 -3
- package/dist/common/interfaces/request-user.d.ts.map +1 -1
- package/dist/common/utils/cache-version.util.d.ts +12 -0
- package/dist/common/utils/cache-version.util.d.ts.map +1 -0
- package/dist/common/utils/cache-version.util.js +34 -0
- package/dist/common/utils/cache-version.util.js.map +1 -0
- package/dist/common/utils/postgres-error.util.d.ts +5 -0
- package/dist/common/utils/postgres-error.util.d.ts.map +1 -0
- package/dist/common/utils/postgres-error.util.js +13 -0
- package/dist/common/utils/postgres-error.util.js.map +1 -0
- package/dist/common/utils/singleflight.util.d.ts +6 -0
- package/dist/common/utils/singleflight.util.d.ts.map +1 -0
- package/dist/common/utils/singleflight.util.js +21 -0
- package/dist/common/utils/singleflight.util.js.map +1 -0
- package/dist/common/validators/is-exclusive-auth-params.validator.js +1 -1
- package/dist/common/validators/is-exclusive-auth-params.validator.js.map +1 -1
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js +1 -1
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js.map +1 -1
- package/dist/config/app.config.d.ts +38 -0
- package/dist/config/app.config.d.ts.map +1 -1
- package/dist/config/app.config.js +24 -0
- package/dist/config/app.config.js.map +1 -1
- package/dist/config/database.config.d.ts +6 -0
- package/dist/config/database.config.d.ts.map +1 -1
- package/dist/config/database.config.js +3 -0
- package/dist/config/database.config.js.map +1 -1
- package/dist/config/env-flags.util.d.ts +4 -0
- package/dist/config/env-flags.util.d.ts.map +1 -1
- package/dist/config/env-flags.util.js +7 -0
- package/dist/config/env-flags.util.js.map +1 -1
- package/dist/config/env.validation.d.ts +24 -1
- package/dist/config/env.validation.d.ts.map +1 -1
- package/dist/config/env.validation.js +92 -2
- package/dist/config/env.validation.js.map +1 -1
- package/dist/config/in-memory-redis.client.d.ts +23 -4
- package/dist/config/in-memory-redis.client.d.ts.map +1 -1
- package/dist/config/in-memory-redis.client.js +148 -4
- package/dist/config/in-memory-redis.client.js.map +1 -1
- package/dist/config/redis.module.d.ts.map +1 -1
- package/dist/config/redis.module.js +5 -0
- package/dist/config/redis.module.js.map +1 -1
- package/dist/core.module.d.ts +5 -0
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +5 -0
- package/dist/core.module.js.map +1 -1
- package/dist/database/migrations/1784284557959-full-schema.d.ts.map +1 -1
- package/dist/database/migrations/1784284557959-full-schema.js +48 -14
- package/dist/database/migrations/1784284557959-full-schema.js.map +1 -1
- package/dist/database/migrations/1784284557960-audit-partitioning.d.ts +17 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.d.ts.map +1 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.js +384 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.js.map +1 -0
- package/dist/database/seeds/roles.seed.d.ts +6 -0
- package/dist/database/seeds/roles.seed.d.ts.map +1 -1
- package/dist/database/seeds/roles.seed.js +22 -5
- package/dist/database/seeds/roles.seed.js.map +1 -1
- package/dist/database/seeds/settings.seed.d.ts +5 -0
- package/dist/database/seeds/settings.seed.d.ts.map +1 -1
- package/dist/database/seeds/settings.seed.js +500 -25
- package/dist/database/seeds/settings.seed.js.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.d.ts +1 -0
- package/dist/database/seeds/templates/html-template.reader.d.ts.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.js +3 -1
- package/dist/database/seeds/templates/html-template.reader.js.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.ts +5 -1
- package/dist/database/typeorm.util.d.ts.map +1 -1
- package/dist/database/typeorm.util.js +6 -0
- package/dist/database/typeorm.util.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -4
- package/dist/index.js.map +1 -1
- package/dist/modules/admin/controllers/admin.controller.d.ts +15 -7
- package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -1
- package/dist/modules/admin/controllers/admin.controller.js +74 -17
- package/dist/modules/admin/controllers/admin.controller.js.map +1 -1
- package/dist/modules/admin/services/admin-log.service.d.ts +14 -7
- package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -1
- package/dist/modules/admin/services/admin-log.service.js +41 -38
- package/dist/modules/admin/services/admin-log.service.js.map +1 -1
- package/dist/modules/audit/audit.manifest.d.ts +8 -0
- package/dist/modules/audit/audit.manifest.d.ts.map +1 -0
- package/dist/modules/audit/audit.manifest.js +31 -0
- package/dist/modules/audit/audit.manifest.js.map +1 -0
- package/dist/modules/audit/audit.module.d.ts +8 -0
- package/dist/modules/audit/audit.module.d.ts.map +1 -0
- package/dist/modules/audit/audit.module.js +57 -0
- package/dist/modules/audit/audit.module.js.map +1 -0
- package/dist/modules/audit/constants/audit-actions.d.ts +79 -0
- package/dist/modules/audit/constants/audit-actions.d.ts.map +1 -0
- package/dist/modules/audit/constants/audit-actions.js +89 -0
- package/dist/modules/audit/constants/audit-actions.js.map +1 -0
- package/dist/modules/audit/constants/audit-mutation.d.ts +10 -0
- package/dist/modules/audit/constants/audit-mutation.d.ts.map +1 -0
- package/dist/modules/audit/constants/audit-mutation.js +13 -0
- package/dist/modules/audit/constants/audit-mutation.js.map +1 -0
- package/dist/modules/audit/controllers/audit.controller.d.ts +13 -0
- package/dist/modules/audit/controllers/audit.controller.d.ts.map +1 -0
- package/dist/modules/audit/controllers/audit.controller.js +149 -0
- package/dist/modules/audit/controllers/audit.controller.js.map +1 -0
- package/dist/modules/audit/decorators/audit.decorator.d.ts +27 -0
- package/dist/modules/audit/decorators/audit.decorator.d.ts.map +1 -0
- package/dist/modules/audit/decorators/audit.decorator.js +18 -0
- package/dist/modules/audit/decorators/audit.decorator.js.map +1 -0
- package/dist/modules/audit/dto/audit.dto.d.ts +54 -0
- package/dist/modules/audit/dto/audit.dto.d.ts.map +1 -0
- package/dist/modules/audit/dto/audit.dto.js +129 -0
- package/dist/modules/audit/dto/audit.dto.js.map +1 -0
- package/dist/modules/audit/entities/audit-event.entity.d.ts +33 -0
- package/dist/modules/audit/entities/audit-event.entity.d.ts.map +1 -0
- package/dist/modules/audit/entities/audit-event.entity.js +125 -0
- package/dist/modules/audit/entities/audit-event.entity.js.map +1 -0
- package/dist/modules/audit/entities/audit-outbox.entity.d.ts +16 -0
- package/dist/modules/audit/entities/audit-outbox.entity.d.ts.map +1 -0
- package/dist/modules/audit/entities/audit-outbox.entity.js +65 -0
- package/dist/modules/audit/entities/audit-outbox.entity.js.map +1 -0
- package/dist/modules/audit/index.d.ts +13 -0
- package/dist/modules/audit/index.d.ts.map +1 -0
- package/dist/modules/audit/index.js +23 -0
- package/dist/modules/audit/index.js.map +1 -0
- package/dist/modules/audit/interceptors/audit.interceptor.d.ts +11 -0
- package/dist/modules/audit/interceptors/audit.interceptor.d.ts.map +1 -0
- package/dist/modules/audit/interceptors/audit.interceptor.js +75 -0
- package/dist/modules/audit/interceptors/audit.interceptor.js.map +1 -0
- package/dist/modules/audit/listeners/auth-audit.listener.d.ts +31 -0
- package/dist/modules/audit/listeners/auth-audit.listener.d.ts.map +1 -0
- package/dist/modules/audit/listeners/auth-audit.listener.js +338 -0
- package/dist/modules/audit/listeners/auth-audit.listener.js.map +1 -0
- package/dist/modules/audit/services/audit-archive.service.d.ts +28 -0
- package/dist/modules/audit/services/audit-archive.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-archive.service.js +132 -0
- package/dist/modules/audit/services/audit-archive.service.js.map +1 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.d.ts +22 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.js +79 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.js.map +1 -0
- package/dist/modules/audit/services/audit-leader.service.d.ts +28 -0
- package/dist/modules/audit/services/audit-leader.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-leader.service.js +99 -0
- package/dist/modules/audit/services/audit-leader.service.js.map +1 -0
- package/dist/modules/audit/services/audit-outbox.worker.d.ts +29 -0
- package/dist/modules/audit/services/audit-outbox.worker.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-outbox.worker.js +144 -0
- package/dist/modules/audit/services/audit-outbox.worker.js.map +1 -0
- package/dist/modules/audit/services/audit-partition.service.d.ts +18 -0
- package/dist/modules/audit/services/audit-partition.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-partition.service.js +70 -0
- package/dist/modules/audit/services/audit-partition.service.js.map +1 -0
- package/dist/modules/audit/services/audit-write.service.d.ts +60 -0
- package/dist/modules/audit/services/audit-write.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-write.service.js +463 -0
- package/dist/modules/audit/services/audit-write.service.js.map +1 -0
- package/dist/modules/audit/services/audit.service.d.ts +60 -0
- package/dist/modules/audit/services/audit.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit.service.js +373 -0
- package/dist/modules/audit/services/audit.service.js.map +1 -0
- package/dist/modules/audit/utils/audit-hash.util.d.ts +20 -0
- package/dist/modules/audit/utils/audit-hash.util.d.ts.map +1 -0
- package/dist/modules/audit/utils/audit-hash.util.js +44 -0
- package/dist/modules/audit/utils/audit-hash.util.js.map +1 -0
- package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -1
- package/dist/modules/auth/auth-core/auth-core.module.js +16 -4
- package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -1
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts +22 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js +25 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js.map +1 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.d.ts +19 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.js +110 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.js.map +1 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts +10 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.js +44 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.js.map +1 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts +10 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.js +44 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.js.map +1 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +7 -8
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -1
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +34 -34
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -1
- package/dist/modules/auth/auth.manifest.d.ts +6 -0
- package/dist/modules/auth/auth.manifest.d.ts.map +1 -1
- package/dist/modules/auth/auth.manifest.js +38 -2
- package/dist/modules/auth/auth.manifest.js.map +1 -1
- package/dist/modules/auth/auth.module.d.ts.map +1 -1
- package/dist/modules/auth/auth.module.js +39 -4
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/controllers/account.controller.d.ts +15 -1
- package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/account.controller.js +65 -7
- package/dist/modules/auth/controllers/account.controller.js.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.d.ts +7 -3
- package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.js +76 -16
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
- package/dist/modules/auth/controllers/forgot-password.controller.d.ts +4 -2
- package/dist/modules/auth/controllers/forgot-password.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/forgot-password.controller.js +32 -11
- package/dist/modules/auth/controllers/forgot-password.controller.js.map +1 -1
- package/dist/modules/auth/controllers/mfa.controller.d.ts +18 -0
- package/dist/modules/auth/controllers/mfa.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/mfa.controller.js +192 -0
- package/dist/modules/auth/controllers/mfa.controller.js.map +1 -0
- package/dist/modules/auth/controllers/oauth.controller.d.ts +22 -0
- package/dist/modules/auth/controllers/oauth.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/oauth.controller.js +192 -0
- package/dist/modules/auth/controllers/oauth.controller.js.map +1 -0
- package/dist/modules/auth/controllers/otp.controller.d.ts +6 -3
- package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/otp.controller.js +32 -33
- package/dist/modules/auth/controllers/otp.controller.js.map +1 -1
- package/dist/modules/auth/controllers/pin.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/pin.controller.js +10 -2
- package/dist/modules/auth/controllers/pin.controller.js.map +1 -1
- package/dist/modules/auth/controllers/session.controller.d.ts +12 -4
- package/dist/modules/auth/controllers/session.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/session.controller.js +130 -31
- package/dist/modules/auth/controllers/session.controller.js.map +1 -1
- package/dist/modules/auth/dto/auth-config.dto.d.ts +11 -2
- package/dist/modules/auth/dto/auth-config.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/auth-config.dto.js +78 -3
- package/dist/modules/auth/dto/auth-config.dto.js.map +1 -1
- package/dist/modules/auth/dto/index.d.ts +2 -0
- package/dist/modules/auth/dto/index.d.ts.map +1 -1
- package/dist/modules/auth/dto/index.js +2 -0
- package/dist/modules/auth/dto/index.js.map +1 -1
- package/dist/modules/auth/dto/login.dto.d.ts +8 -1
- package/dist/modules/auth/dto/login.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/login.dto.js +48 -3
- package/dist/modules/auth/dto/login.dto.js.map +1 -1
- package/dist/modules/auth/dto/mfa.dto.d.ts +61 -0
- package/dist/modules/auth/dto/mfa.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/mfa.dto.js +326 -0
- package/dist/modules/auth/dto/mfa.dto.js.map +1 -0
- package/dist/modules/auth/dto/oauth.dto.d.ts +45 -0
- package/dist/modules/auth/dto/oauth.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/oauth.dto.js +249 -0
- package/dist/modules/auth/dto/oauth.dto.js.map +1 -0
- package/dist/modules/auth/dto/otp.dto.d.ts +3 -1
- package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/otp.dto.js +19 -0
- package/dist/modules/auth/dto/otp.dto.js.map +1 -1
- package/dist/modules/auth/dto/password.dto.d.ts +28 -0
- package/dist/modules/auth/dto/password.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/password.dto.js +191 -5
- package/dist/modules/auth/dto/password.dto.js.map +1 -1
- package/dist/modules/auth/dto/register.dto.d.ts +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/register.dto.js +1 -0
- package/dist/modules/auth/dto/register.dto.js.map +1 -1
- package/dist/modules/auth/dto/session.dto.d.ts +20 -0
- package/dist/modules/auth/dto/session.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/session.dto.js +98 -0
- package/dist/modules/auth/dto/session.dto.js.map +1 -0
- package/dist/modules/auth/dto/token.dto.d.ts +38 -1
- package/dist/modules/auth/dto/token.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/token.dto.js +21 -1
- package/dist/modules/auth/dto/token.dto.js.map +1 -1
- package/dist/modules/auth/entities/index.d.ts +2 -0
- package/dist/modules/auth/entities/index.d.ts.map +1 -1
- package/dist/modules/auth/entities/index.js +2 -0
- package/dist/modules/auth/entities/index.js.map +1 -1
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts +2 -0
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -1
- package/dist/modules/auth/entities/password-reset-token.entity.js +6 -0
- package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -1
- package/dist/modules/auth/entities/user-mfa.entity.d.ts +19 -0
- package/dist/modules/auth/entities/user-mfa.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/user-mfa.entity.js +73 -0
- package/dist/modules/auth/entities/user-mfa.entity.js.map +1 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts +24 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.js +84 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.js.map +1 -0
- package/dist/modules/auth/events/auth.events.d.ts +84 -19
- package/dist/modules/auth/events/auth.events.d.ts.map +1 -1
- package/dist/modules/auth/events/auth.events.js +17 -9
- package/dist/modules/auth/events/auth.events.js.map +1 -1
- package/dist/modules/auth/services/account.service.d.ts +74 -14
- package/dist/modules/auth/services/account.service.d.ts.map +1 -1
- package/dist/modules/auth/services/account.service.js +247 -31
- package/dist/modules/auth/services/account.service.js.map +1 -1
- package/dist/modules/auth/services/dpop.service.d.ts +41 -0
- package/dist/modules/auth/services/dpop.service.d.ts.map +1 -0
- package/dist/modules/auth/services/dpop.service.js +159 -0
- package/dist/modules/auth/services/dpop.service.js.map +1 -0
- package/dist/modules/auth/services/index.d.ts +2 -0
- package/dist/modules/auth/services/index.d.ts.map +1 -1
- package/dist/modules/auth/services/index.js +2 -0
- package/dist/modules/auth/services/index.js.map +1 -1
- package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts +28 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts.map +1 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.js +163 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.js.map +1 -0
- package/dist/modules/auth/services/login.service.d.ts +29 -34
- package/dist/modules/auth/services/login.service.d.ts.map +1 -1
- package/dist/modules/auth/services/login.service.js +173 -61
- package/dist/modules/auth/services/login.service.js.map +1 -1
- package/dist/modules/auth/services/mfa.service.d.ts +111 -0
- package/dist/modules/auth/services/mfa.service.d.ts.map +1 -0
- package/dist/modules/auth/services/mfa.service.js +662 -0
- package/dist/modules/auth/services/mfa.service.js.map +1 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts +11 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.js +56 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts +12 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.js +64 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts +11 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js +76 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts +16 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js +92 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts +9 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.js +3 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.js.map +1 -0
- package/dist/modules/auth/services/oauth.service.d.ts +83 -0
- package/dist/modules/auth/services/oauth.service.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth.service.js +471 -0
- package/dist/modules/auth/services/oauth.service.js.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts +13 -3
- package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -1
- package/dist/modules/auth/services/otp-auth.service.js +41 -7
- package/dist/modules/auth/services/otp-auth.service.js.map +1 -1
- package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts +22 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts.map +1 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.js +117 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.js.map +1 -0
- package/dist/modules/auth/services/password.service.d.ts +25 -5
- package/dist/modules/auth/services/password.service.d.ts.map +1 -1
- package/dist/modules/auth/services/password.service.js +154 -20
- package/dist/modules/auth/services/password.service.js.map +1 -1
- package/dist/modules/auth/services/pin-auth.service.d.ts +10 -3
- package/dist/modules/auth/services/pin-auth.service.d.ts.map +1 -1
- package/dist/modules/auth/services/pin-auth.service.js +110 -13
- package/dist/modules/auth/services/pin-auth.service.js.map +1 -1
- package/dist/modules/auth/services/registration.service.d.ts +10 -2
- package/dist/modules/auth/services/registration.service.d.ts.map +1 -1
- package/dist/modules/auth/services/registration.service.js +113 -25
- package/dist/modules/auth/services/registration.service.js.map +1 -1
- package/dist/modules/auth/services/turnstile.service.d.ts +17 -0
- package/dist/modules/auth/services/turnstile.service.d.ts.map +1 -0
- package/dist/modules/auth/services/turnstile.service.js +94 -0
- package/dist/modules/auth/services/turnstile.service.js.map +1 -0
- package/dist/modules/auth/utils/auth-params.util.d.ts +13 -6
- package/dist/modules/auth/utils/auth-params.util.d.ts.map +1 -1
- package/dist/modules/auth/utils/auth-params.util.js +27 -4
- package/dist/modules/auth/utils/auth-params.util.js.map +1 -1
- package/dist/modules/auth/utils/auth-supported.util.d.ts +12 -1
- package/dist/modules/auth/utils/auth-supported.util.d.ts.map +1 -1
- package/dist/modules/auth/utils/auth-supported.util.js +36 -4
- package/dist/modules/auth/utils/auth-supported.util.js.map +1 -1
- package/dist/modules/auth/utils/backup-code-hash.util.d.ts +10 -0
- package/dist/modules/auth/utils/backup-code-hash.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/backup-code-hash.util.js +31 -0
- package/dist/modules/auth/utils/backup-code-hash.util.js.map +1 -0
- package/dist/modules/auth/utils/backup-codes.util.d.ts +5 -0
- package/dist/modules/auth/utils/backup-codes.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/backup-codes.util.js +22 -0
- package/dist/modules/auth/utils/backup-codes.util.js.map +1 -0
- package/dist/modules/auth/utils/dpop.util.d.ts +22 -0
- package/dist/modules/auth/utils/dpop.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/dpop.util.js +73 -0
- package/dist/modules/auth/utils/dpop.util.js.map +1 -0
- package/dist/modules/auth/utils/mfa-secret.util.d.ts +22 -0
- package/dist/modules/auth/utils/mfa-secret.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/mfa-secret.util.js +59 -0
- package/dist/modules/auth/utils/mfa-secret.util.js.map +1 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.d.ts +26 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.js +49 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.js.map +1 -0
- package/dist/modules/auth/utils/step-up-purpose.util.d.ts +5 -0
- package/dist/modules/auth/utils/step-up-purpose.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/step-up-purpose.util.js +18 -0
- package/dist/modules/auth/utils/step-up-purpose.util.js.map +1 -0
- package/dist/modules/auth/utils/totp.util.d.ts +16 -0
- package/dist/modules/auth/utils/totp.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/totp.util.js +88 -0
- package/dist/modules/auth/utils/totp.util.js.map +1 -0
- package/dist/modules/delivery/composers/otp-delivery.composer.d.ts +28 -1
- package/dist/modules/delivery/composers/otp-delivery.composer.d.ts.map +1 -1
- package/dist/modules/delivery/composers/otp-delivery.composer.js +48 -2
- package/dist/modules/delivery/composers/otp-delivery.composer.js.map +1 -1
- package/dist/modules/delivery/constants/delivery-worker.constants.d.ts +29 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.d.ts.map +1 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.js +51 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.js.map +1 -0
- package/dist/modules/delivery/delivery.module.d.ts.map +1 -1
- package/dist/modules/delivery/delivery.module.js +1 -15
- package/dist/modules/delivery/delivery.module.js.map +1 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.d.ts.map +1 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.js +3 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.js.map +1 -1
- package/dist/modules/delivery/notification-delivery.service.d.ts +12 -1
- package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -1
- package/dist/modules/delivery/notification-delivery.service.js +121 -40
- package/dist/modules/delivery/notification-delivery.service.js.map +1 -1
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts +22 -1
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -1
- package/dist/modules/delivery/processors/delivery-job.runner.js +144 -42
- package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -1
- package/dist/modules/delivery/processors/delivery.processor.d.ts.map +1 -1
- package/dist/modules/delivery/processors/delivery.processor.js +6 -1
- package/dist/modules/delivery/processors/delivery.processor.js.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts +11 -0
- package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery-job.runner.js +90 -16
- package/dist/modules/delivery/processors/otp-delivery-job.runner.js.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.d.ts.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.js +6 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.js.map +1 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.d.ts +7 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.d.ts.map +1 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.js +11 -2
- package/dist/modules/delivery/queues/sync-jobs.queue.js.map +1 -1
- package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts +7 -3
- package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts.map +1 -1
- package/dist/modules/delivery/services/delivery-audit-retention.service.js +33 -10
- package/dist/modules/delivery/services/delivery-audit-retention.service.js.map +1 -1
- package/dist/modules/delivery/services/notification-audit.service.d.ts +7 -4
- package/dist/modules/delivery/services/notification-audit.service.d.ts.map +1 -1
- package/dist/modules/delivery/services/notification-audit.service.js +83 -26
- package/dist/modules/delivery/services/notification-audit.service.js.map +1 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts +2 -0
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.js +22 -3
- package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.d.ts +7 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.d.ts.map +1 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.js +5 -7
- package/dist/modules/file-upload/controllers/file-upload.controller.js.map +1 -1
- package/dist/modules/file-upload/dto/file-upload.dto.d.ts +2 -0
- package/dist/modules/file-upload/dto/file-upload.dto.d.ts.map +1 -1
- package/dist/modules/file-upload/dto/file-upload.dto.js +20 -0
- package/dist/modules/file-upload/dto/file-upload.dto.js.map +1 -1
- package/dist/modules/file-upload/file-upload.module.d.ts.map +1 -1
- package/dist/modules/file-upload/file-upload.module.js +12 -2
- package/dist/modules/file-upload/file-upload.module.js.map +1 -1
- package/dist/modules/file-upload/services/file-upload.service.d.ts +24 -6
- package/dist/modules/file-upload/services/file-upload.service.d.ts.map +1 -1
- package/dist/modules/file-upload/services/file-upload.service.js +164 -36
- package/dist/modules/file-upload/services/file-upload.service.js.map +1 -1
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts +4 -2
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts.map +1 -1
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js +30 -5
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js.map +1 -1
- package/dist/modules/file-upload/utils/image-optimize.util.d.ts.map +1 -1
- package/dist/modules/file-upload/utils/image-optimize.util.js +7 -1
- package/dist/modules/file-upload/utils/image-optimize.util.js.map +1 -1
- package/dist/modules/health/health.controller.d.ts +5 -1
- package/dist/modules/health/health.controller.d.ts.map +1 -1
- package/dist/modules/health/health.controller.js +57 -3
- package/dist/modules/health/health.controller.js.map +1 -1
- package/dist/modules/invitations/controllers/invitations.controller.d.ts +19 -4
- package/dist/modules/invitations/controllers/invitations.controller.d.ts.map +1 -1
- package/dist/modules/invitations/controllers/invitations.controller.js +19 -10
- package/dist/modules/invitations/controllers/invitations.controller.js.map +1 -1
- package/dist/modules/invitations/dto/invitation.dto.d.ts +13 -0
- package/dist/modules/invitations/dto/invitation.dto.d.ts.map +1 -1
- package/dist/modules/invitations/dto/invitation.dto.js +69 -2
- package/dist/modules/invitations/dto/invitation.dto.js.map +1 -1
- package/dist/modules/invitations/services/invitations.service.d.ts +24 -6
- package/dist/modules/invitations/services/invitations.service.d.ts.map +1 -1
- package/dist/modules/invitations/services/invitations.service.js +96 -20
- package/dist/modules/invitations/services/invitations.service.js.map +1 -1
- package/dist/modules/jobs/queues/jobs.queue.d.ts +7 -2
- package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -1
- package/dist/modules/jobs/queues/jobs.queue.js +25 -10
- package/dist/modules/jobs/queues/jobs.queue.js.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.d.ts +3 -1
- package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.js +25 -2
- package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -1
- package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -1
- package/dist/modules/notifications/dto/notification-query.dto.js +1 -0
- package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -1
- package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -1
- package/dist/modules/notifications/entities/device-token.entity.js +3 -1
- package/dist/modules/notifications/entities/device-token.entity.js.map +1 -1
- package/dist/modules/notifications/services/fcm.service.d.ts +2 -0
- package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -1
- package/dist/modules/notifications/services/fcm.service.js +28 -7
- package/dist/modules/notifications/services/fcm.service.js.map +1 -1
- package/dist/modules/notifications/services/notifications.service.d.ts +16 -3
- package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -1
- package/dist/modules/notifications/services/notifications.service.js +95 -24
- package/dist/modules/notifications/services/notifications.service.js.map +1 -1
- package/dist/modules/observability/metrics/metrics.service.d.ts +2 -0
- package/dist/modules/observability/metrics/metrics.service.d.ts.map +1 -1
- package/dist/modules/observability/metrics/metrics.service.js +11 -0
- package/dist/modules/observability/metrics/metrics.service.js.map +1 -1
- package/dist/modules/otp/constants/otp.constants.d.ts +7 -5
- package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -1
- package/dist/modules/otp/constants/otp.constants.js +11 -8
- package/dist/modules/otp/constants/otp.constants.js.map +1 -1
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts +1 -1
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -1
- package/dist/modules/otp/otp.service.d.ts +10 -2
- package/dist/modules/otp/otp.service.d.ts.map +1 -1
- package/dist/modules/otp/otp.service.js +48 -4
- package/dist/modules/otp/otp.service.js.map +1 -1
- package/dist/modules/otp/services/otp.rate-limiter.d.ts +2 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -1
- package/dist/modules/otp/services/otp.rate-limiter.js +19 -0
- package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -1
- package/dist/modules/otp/services/otp.session.store.d.ts +9 -3
- package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -1
- package/dist/modules/otp/services/otp.session.store.js +34 -42
- package/dist/modules/otp/services/otp.session.store.js.map +1 -1
- package/dist/modules/otp/utils/otp-code-hash.util.d.ts +11 -0
- package/dist/modules/otp/utils/otp-code-hash.util.d.ts.map +1 -0
- package/dist/modules/otp/utils/otp-code-hash.util.js +68 -0
- package/dist/modules/otp/utils/otp-code-hash.util.js.map +1 -0
- package/dist/modules/profile/controllers/profile.controller.d.ts +9 -3
- package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -1
- package/dist/modules/profile/controllers/profile.controller.js +140 -8
- package/dist/modules/profile/controllers/profile.controller.js.map +1 -1
- package/dist/modules/profile/dto/create-user-profile.dto.d.ts +10 -0
- package/dist/modules/profile/dto/create-user-profile.dto.d.ts.map +1 -1
- package/dist/modules/profile/dto/create-user-profile.dto.js +43 -1
- package/dist/modules/profile/dto/create-user-profile.dto.js.map +1 -1
- package/dist/modules/profile/dto/public-user-profile.dto.d.ts +24 -0
- package/dist/modules/profile/dto/public-user-profile.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/public-user-profile.dto.js +115 -0
- package/dist/modules/profile/dto/public-user-profile.dto.js.map +1 -0
- package/dist/modules/profile/dto/user-profile-response.dto.d.ts +4 -0
- package/dist/modules/profile/dto/user-profile-response.dto.d.ts.map +1 -1
- package/dist/modules/profile/dto/user-profile-response.dto.js +4 -0
- package/dist/modules/profile/dto/user-profile-response.dto.js.map +1 -1
- package/dist/modules/profile/dto/username-available.dto.d.ts +6 -0
- package/dist/modules/profile/dto/username-available.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/username-available.dto.js +31 -0
- package/dist/modules/profile/dto/username-available.dto.js.map +1 -0
- package/dist/modules/profile/entities/user-profiles.entity.d.ts +10 -0
- package/dist/modules/profile/entities/user-profiles.entity.d.ts.map +1 -1
- package/dist/modules/profile/entities/user-profiles.entity.js +29 -1
- package/dist/modules/profile/entities/user-profiles.entity.js.map +1 -1
- package/dist/modules/profile/index.d.ts +1 -0
- package/dist/modules/profile/index.d.ts.map +1 -1
- package/dist/modules/profile/index.js +1 -0
- package/dist/modules/profile/index.js.map +1 -1
- package/dist/modules/profile/profile.manifest.d.ts +2 -2
- package/dist/modules/profile/profile.manifest.js +2 -2
- package/dist/modules/profile/profile.manifest.js.map +1 -1
- package/dist/modules/profile/profile.module.d.ts.map +1 -1
- package/dist/modules/profile/profile.module.js +7 -2
- package/dist/modules/profile/profile.module.js.map +1 -1
- package/dist/modules/profile/services/profile.service.d.ts +56 -4
- package/dist/modules/profile/services/profile.service.d.ts.map +1 -1
- package/dist/modules/profile/services/profile.service.js +247 -20
- package/dist/modules/profile/services/profile.service.js.map +1 -1
- package/dist/modules/realtime/adapters/redis-io.adapter.d.ts +26 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.d.ts.map +1 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.js +124 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.js.map +1 -0
- package/dist/modules/realtime/constants/realtime.constants.d.ts +36 -0
- package/dist/modules/realtime/constants/realtime.constants.d.ts.map +1 -0
- package/dist/modules/realtime/constants/realtime.constants.js +42 -0
- package/dist/modules/realtime/constants/realtime.constants.js.map +1 -0
- package/dist/modules/realtime/controllers/realtime.controller.d.ts +21 -0
- package/dist/modules/realtime/controllers/realtime.controller.d.ts.map +1 -0
- package/dist/modules/realtime/controllers/realtime.controller.js +113 -0
- package/dist/modules/realtime/controllers/realtime.controller.js.map +1 -0
- package/dist/modules/realtime/gateway/realtime.gateway.d.ts +42 -0
- package/dist/modules/realtime/gateway/realtime.gateway.d.ts.map +1 -0
- package/dist/modules/realtime/gateway/realtime.gateway.js +289 -0
- package/dist/modules/realtime/gateway/realtime.gateway.js.map +1 -0
- package/dist/modules/realtime/index.d.ts +12 -0
- package/dist/modules/realtime/index.d.ts.map +1 -0
- package/dist/modules/realtime/index.js +35 -0
- package/dist/modules/realtime/index.js.map +1 -0
- package/dist/modules/realtime/realtime.manifest.d.ts +8 -0
- package/dist/modules/realtime/realtime.manifest.d.ts.map +1 -0
- package/dist/modules/realtime/realtime.manifest.js +31 -0
- package/dist/modules/realtime/realtime.manifest.js.map +1 -0
- package/dist/modules/realtime/realtime.module.d.ts +14 -0
- package/dist/modules/realtime/realtime.module.d.ts.map +1 -0
- package/dist/modules/realtime/realtime.module.js +126 -0
- package/dist/modules/realtime/realtime.module.js.map +1 -0
- package/dist/modules/realtime/services/realtime-handler.registry.d.ts +16 -0
- package/dist/modules/realtime/services/realtime-handler.registry.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-handler.registry.js +55 -0
- package/dist/modules/realtime/services/realtime-handler.registry.js.map +1 -0
- package/dist/modules/realtime/services/realtime-presence.service.d.ts +15 -0
- package/dist/modules/realtime/services/realtime-presence.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-presence.service.js +86 -0
- package/dist/modules/realtime/services/realtime-presence.service.js.map +1 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts +12 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.js +63 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.js.map +1 -0
- package/dist/modules/realtime/services/realtime.service.d.ts +88 -0
- package/dist/modules/realtime/services/realtime.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime.service.js +343 -0
- package/dist/modules/realtime/services/realtime.service.js.map +1 -0
- package/dist/modules/realtime/types/realtime.types.d.ts +50 -0
- package/dist/modules/realtime/types/realtime.types.d.ts.map +1 -0
- package/dist/modules/realtime/types/realtime.types.js +14 -0
- package/dist/modules/realtime/types/realtime.types.js.map +1 -0
- package/dist/modules/realtime/utils/handshake-error.util.d.ts +5 -0
- package/dist/modules/realtime/utils/handshake-error.util.d.ts.map +1 -0
- package/dist/modules/realtime/utils/handshake-error.util.js +45 -0
- package/dist/modules/realtime/utils/handshake-error.util.js.map +1 -0
- package/dist/modules/roles/controllers/modules.controller.d.ts +4 -3
- package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/modules.controller.js +21 -10
- package/dist/modules/roles/controllers/modules.controller.js.map +1 -1
- package/dist/modules/roles/controllers/permissions.controller.d.ts +4 -3
- package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/permissions.controller.js +21 -10
- package/dist/modules/roles/controllers/permissions.controller.js.map +1 -1
- package/dist/modules/roles/controllers/roles.controller.d.ts +5 -4
- package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/roles.controller.js +26 -13
- package/dist/modules/roles/controllers/roles.controller.js.map +1 -1
- package/dist/modules/roles/controllers/user-roles.controller.d.ts +3 -2
- package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/user-roles.controller.js +14 -6
- package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -1
- package/dist/modules/roles/services/modules.service.d.ts +8 -5
- package/dist/modules/roles/services/modules.service.d.ts.map +1 -1
- package/dist/modules/roles/services/modules.service.js +58 -12
- package/dist/modules/roles/services/modules.service.js.map +1 -1
- package/dist/modules/roles/services/permissions.service.d.ts +8 -5
- package/dist/modules/roles/services/permissions.service.d.ts.map +1 -1
- package/dist/modules/roles/services/permissions.service.js +61 -12
- package/dist/modules/roles/services/permissions.service.js.map +1 -1
- package/dist/modules/roles/services/roles.service.d.ts +19 -9
- package/dist/modules/roles/services/roles.service.d.ts.map +1 -1
- package/dist/modules/roles/services/roles.service.js +137 -47
- package/dist/modules/roles/services/roles.service.js.map +1 -1
- package/dist/modules/roles/services/user-roles.service.d.ts +12 -4
- package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -1
- package/dist/modules/roles/services/user-roles.service.js +58 -26
- package/dist/modules/roles/services/user-roles.service.js.map +1 -1
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts +7 -1
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -1
- package/dist/modules/sessions/entities/refresh-token.entity.js +10 -0
- package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -1
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts +12 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts.map +1 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.js +46 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.js.map +1 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.d.ts +20 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.d.ts.map +1 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.js +97 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.js.map +1 -0
- package/dist/modules/sessions/services/token.service.d.ts +150 -16
- package/dist/modules/sessions/services/token.service.d.ts.map +1 -1
- package/dist/modules/sessions/services/token.service.js +505 -74
- package/dist/modules/sessions/services/token.service.js.map +1 -1
- package/dist/modules/sessions/sessions.module.d.ts.map +1 -1
- package/dist/modules/sessions/sessions.module.js +4 -2
- package/dist/modules/sessions/sessions.module.js.map +1 -1
- package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts +13 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts.map +1 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.js +37 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.js.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts +57 -3
- package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -1
- package/dist/modules/settings/constants/settings.defaults.js +58 -3
- package/dist/modules/settings/constants/settings.defaults.js.map +1 -1
- package/dist/modules/settings/constants/settings.keys.d.ts +138 -2
- package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -1
- package/dist/modules/settings/constants/settings.keys.js +140 -2
- package/dist/modules/settings/constants/settings.keys.js.map +1 -1
- package/dist/modules/settings/controllers/settings.controller.d.ts +5 -1
- package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -1
- package/dist/modules/settings/controllers/settings.controller.js +134 -5
- package/dist/modules/settings/controllers/settings.controller.js.map +1 -1
- package/dist/modules/settings/services/settings.service.d.ts +17 -7
- package/dist/modules/settings/services/settings.service.d.ts.map +1 -1
- package/dist/modules/settings/services/settings.service.js +80 -14
- package/dist/modules/settings/services/settings.service.js.map +1 -1
- package/dist/modules/settings/utils/settings-secret.util.d.ts +13 -0
- package/dist/modules/settings/utils/settings-secret.util.d.ts.map +1 -0
- package/dist/modules/settings/utils/settings-secret.util.js +80 -0
- package/dist/modules/settings/utils/settings-secret.util.js.map +1 -0
- package/dist/modules/users/controllers/users.controller.d.ts +4 -2
- package/dist/modules/users/controllers/users.controller.d.ts.map +1 -1
- package/dist/modules/users/controllers/users.controller.js +89 -10
- package/dist/modules/users/controllers/users.controller.js.map +1 -1
- package/dist/modules/users/dto/user.dto.d.ts +3 -0
- package/dist/modules/users/dto/user.dto.d.ts.map +1 -1
- package/dist/modules/users/dto/user.dto.js +27 -4
- package/dist/modules/users/dto/user.dto.js.map +1 -1
- package/dist/modules/users/entities/user.entity.d.ts +7 -1
- package/dist/modules/users/entities/user.entity.d.ts.map +1 -1
- package/dist/modules/users/entities/user.entity.js +10 -0
- package/dist/modules/users/entities/user.entity.js.map +1 -1
- package/dist/modules/users/services/users.service.d.ts +15 -2
- package/dist/modules/users/services/users.service.d.ts.map +1 -1
- package/dist/modules/users/services/users.service.js +152 -37
- package/dist/modules/users/services/users.service.js.map +1 -1
- package/dist/modules/users/users.module.d.ts.map +1 -1
- package/dist/modules/users/users.module.js +1 -2
- package/dist/modules/users/users.module.js.map +1 -1
- package/package.json +19 -7
- package/dist/modules/admin/entities/admin-log.entity.d.ts +0 -20
- package/dist/modules/admin/entities/admin-log.entity.d.ts.map +0 -1
- package/dist/modules/admin/entities/admin-log.entity.js +0 -65
- package/dist/modules/admin/entities/admin-log.entity.js.map +0 -1
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AuthAuditListener = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
15
|
+
const auth_events_1 = require("../../auth/events/auth.events");
|
|
16
|
+
const audit_actions_1 = require("../constants/audit-actions");
|
|
17
|
+
const audit_service_1 = require("../services/audit.service");
|
|
18
|
+
/**
|
|
19
|
+
* Persists auth lifecycle domain events onto the compliance audit trail.
|
|
20
|
+
* Enqueue-only (`record`) so login/logout paths never wait on hash-chain seal.
|
|
21
|
+
*/
|
|
22
|
+
let AuthAuditListener = class AuthAuditListener {
|
|
23
|
+
audit;
|
|
24
|
+
constructor(audit) {
|
|
25
|
+
this.audit = audit;
|
|
26
|
+
}
|
|
27
|
+
onLogin(event) {
|
|
28
|
+
this.recordAuth(audit_actions_1.AUDIT_ACTIONS.LOGIN_COMPLETED, event, {
|
|
29
|
+
method: event.method,
|
|
30
|
+
amr: event.amr,
|
|
31
|
+
mfaUsed: event.mfaUsed,
|
|
32
|
+
oauthProvider: event.oauthProvider,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
onLoginFailed(event) {
|
|
36
|
+
this.enqueue({
|
|
37
|
+
action: audit_actions_1.AUDIT_ACTIONS.LOGIN_FAILED,
|
|
38
|
+
actorType: 'USER',
|
|
39
|
+
actorId: null,
|
|
40
|
+
resourceType: 'auth',
|
|
41
|
+
status: 'FAILURE',
|
|
42
|
+
metadata: {
|
|
43
|
+
method: event.method,
|
|
44
|
+
reason: event.reason,
|
|
45
|
+
identityHash: event.identityHash,
|
|
46
|
+
},
|
|
47
|
+
ipAddress: event.ipAddress,
|
|
48
|
+
deviceInfo: event.deviceInfo,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
onRegister(event) {
|
|
52
|
+
this.recordAuth(audit_actions_1.AUDIT_ACTIONS.REGISTRATION_COMPLETED, event, {
|
|
53
|
+
method: event.method,
|
|
54
|
+
amr: event.amr,
|
|
55
|
+
oauthProvider: event.oauthProvider,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
onLogout(event) {
|
|
59
|
+
this.enqueue({
|
|
60
|
+
action: audit_actions_1.AUDIT_ACTIONS.LOGOUT,
|
|
61
|
+
actorType: 'USER',
|
|
62
|
+
actorId: event.userId,
|
|
63
|
+
resourceType: 'user',
|
|
64
|
+
resourceId: event.userId,
|
|
65
|
+
ipAddress: event.ipAddress,
|
|
66
|
+
deviceInfo: event.deviceInfo,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
onLogoutAll(event) {
|
|
70
|
+
this.enqueue({
|
|
71
|
+
action: audit_actions_1.AUDIT_ACTIONS.LOGOUT_ALL,
|
|
72
|
+
actorType: 'USER',
|
|
73
|
+
actorId: event.userId,
|
|
74
|
+
resourceType: 'user',
|
|
75
|
+
resourceId: event.userId,
|
|
76
|
+
ipAddress: event.ipAddress,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
onOauthLinked(event) {
|
|
80
|
+
this.enqueue({
|
|
81
|
+
action: audit_actions_1.AUDIT_ACTIONS.OAUTH_LINKED,
|
|
82
|
+
actorType: 'USER',
|
|
83
|
+
actorId: event.userId,
|
|
84
|
+
resourceType: 'user',
|
|
85
|
+
resourceId: event.userId,
|
|
86
|
+
metadata: { provider: event.provider },
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
onOauthUnlinked(event) {
|
|
90
|
+
this.enqueue({
|
|
91
|
+
action: audit_actions_1.AUDIT_ACTIONS.OAUTH_UNLINKED,
|
|
92
|
+
actorType: 'USER',
|
|
93
|
+
actorId: event.userId,
|
|
94
|
+
resourceType: 'user',
|
|
95
|
+
resourceId: event.userId,
|
|
96
|
+
metadata: { provider: event.provider },
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
onMfaEnabled(event) {
|
|
100
|
+
this.enqueue({
|
|
101
|
+
action: audit_actions_1.AUDIT_ACTIONS.MFA_ENABLED,
|
|
102
|
+
actorType: 'USER',
|
|
103
|
+
actorId: event.userId,
|
|
104
|
+
resourceType: 'user',
|
|
105
|
+
resourceId: event.userId,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
onMfaDisabled(event) {
|
|
109
|
+
this.enqueue({
|
|
110
|
+
action: audit_actions_1.AUDIT_ACTIONS.MFA_DISABLED,
|
|
111
|
+
actorType: 'USER',
|
|
112
|
+
actorId: event.userId,
|
|
113
|
+
resourceType: 'user',
|
|
114
|
+
resourceId: event.userId,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
onMfaBackupRegen(event) {
|
|
118
|
+
this.enqueue({
|
|
119
|
+
action: audit_actions_1.AUDIT_ACTIONS.MFA_BACKUP_CODES_REGENERATED,
|
|
120
|
+
actorType: 'USER',
|
|
121
|
+
actorId: event.userId,
|
|
122
|
+
resourceType: 'user',
|
|
123
|
+
resourceId: event.userId,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
onMfaStepUp(event) {
|
|
127
|
+
this.enqueue({
|
|
128
|
+
action: audit_actions_1.AUDIT_ACTIONS.MFA_STEP_UP,
|
|
129
|
+
actorType: 'USER',
|
|
130
|
+
actorId: event.userId,
|
|
131
|
+
resourceType: 'user',
|
|
132
|
+
resourceId: event.userId,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
onEmailChanged(event) {
|
|
136
|
+
this.enqueue({
|
|
137
|
+
action: audit_actions_1.AUDIT_ACTIONS.EMAIL_CHANGED,
|
|
138
|
+
actorType: 'USER',
|
|
139
|
+
actorId: event.userId,
|
|
140
|
+
resourceType: 'user',
|
|
141
|
+
resourceId: event.userId,
|
|
142
|
+
ipAddress: event.ipAddress,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
onPhoneChanged(event) {
|
|
146
|
+
this.enqueue({
|
|
147
|
+
action: audit_actions_1.AUDIT_ACTIONS.PHONE_CHANGED,
|
|
148
|
+
actorType: 'USER',
|
|
149
|
+
actorId: event.userId,
|
|
150
|
+
resourceType: 'user',
|
|
151
|
+
resourceId: event.userId,
|
|
152
|
+
ipAddress: event.ipAddress,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
onPasswordChanged(event) {
|
|
156
|
+
this.enqueue({
|
|
157
|
+
action: audit_actions_1.AUDIT_ACTIONS.PASSWORD_CHANGED,
|
|
158
|
+
actorType: 'USER',
|
|
159
|
+
actorId: event.userId,
|
|
160
|
+
resourceType: 'user',
|
|
161
|
+
resourceId: event.userId,
|
|
162
|
+
metadata: { method: event.method },
|
|
163
|
+
ipAddress: event.ipAddress,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
onPasswordReset(event) {
|
|
167
|
+
this.enqueue({
|
|
168
|
+
action: audit_actions_1.AUDIT_ACTIONS.PASSWORD_RESET,
|
|
169
|
+
actorType: 'USER',
|
|
170
|
+
actorId: event.userId,
|
|
171
|
+
resourceType: 'user',
|
|
172
|
+
resourceId: event.userId,
|
|
173
|
+
metadata: { method: event.method },
|
|
174
|
+
ipAddress: event.ipAddress,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
onPasswordForgot(event) {
|
|
178
|
+
this.enqueue({
|
|
179
|
+
action: audit_actions_1.AUDIT_ACTIONS.PASSWORD_FORGOT_INITIATED,
|
|
180
|
+
actorType: 'USER',
|
|
181
|
+
actorId: event.userId ?? null,
|
|
182
|
+
resourceType: event.userId ? 'user' : 'auth',
|
|
183
|
+
resourceId: event.userId ?? null,
|
|
184
|
+
metadata: {
|
|
185
|
+
outcome: event.outcome,
|
|
186
|
+
identityHash: event.identityHash,
|
|
187
|
+
},
|
|
188
|
+
ipAddress: event.ipAddress,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
onDeleteRequested(event) {
|
|
192
|
+
this.enqueue({
|
|
193
|
+
action: audit_actions_1.AUDIT_ACTIONS.ACCOUNT_DELETE_REQUESTED,
|
|
194
|
+
actorType: 'USER',
|
|
195
|
+
actorId: event.userId,
|
|
196
|
+
resourceType: 'user',
|
|
197
|
+
resourceId: event.userId,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
onDeleted(event) {
|
|
201
|
+
this.enqueue({
|
|
202
|
+
action: audit_actions_1.AUDIT_ACTIONS.ACCOUNT_DELETED,
|
|
203
|
+
actorType: 'USER',
|
|
204
|
+
actorId: event.userId,
|
|
205
|
+
resourceType: 'user',
|
|
206
|
+
resourceId: event.userId,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
recordAuth(action, event, metadata) {
|
|
210
|
+
this.enqueue({
|
|
211
|
+
action,
|
|
212
|
+
actorType: 'USER',
|
|
213
|
+
actorId: event.userId,
|
|
214
|
+
resourceType: 'user',
|
|
215
|
+
resourceId: event.userId,
|
|
216
|
+
metadata,
|
|
217
|
+
ipAddress: event.ipAddress,
|
|
218
|
+
deviceInfo: event.deviceInfo,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
enqueue(input) {
|
|
222
|
+
this.audit.record(input);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
exports.AuthAuditListener = AuthAuditListener;
|
|
226
|
+
__decorate([
|
|
227
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.LOGIN_COMPLETED),
|
|
228
|
+
__metadata("design:type", Function),
|
|
229
|
+
__metadata("design:paramtypes", [Object]),
|
|
230
|
+
__metadata("design:returntype", void 0)
|
|
231
|
+
], AuthAuditListener.prototype, "onLogin", null);
|
|
232
|
+
__decorate([
|
|
233
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.LOGIN_FAILED),
|
|
234
|
+
__metadata("design:type", Function),
|
|
235
|
+
__metadata("design:paramtypes", [Object]),
|
|
236
|
+
__metadata("design:returntype", void 0)
|
|
237
|
+
], AuthAuditListener.prototype, "onLoginFailed", null);
|
|
238
|
+
__decorate([
|
|
239
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.REGISTRATION_COMPLETED),
|
|
240
|
+
__metadata("design:type", Function),
|
|
241
|
+
__metadata("design:paramtypes", [Object]),
|
|
242
|
+
__metadata("design:returntype", void 0)
|
|
243
|
+
], AuthAuditListener.prototype, "onRegister", null);
|
|
244
|
+
__decorate([
|
|
245
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.LOGOUT),
|
|
246
|
+
__metadata("design:type", Function),
|
|
247
|
+
__metadata("design:paramtypes", [Object]),
|
|
248
|
+
__metadata("design:returntype", void 0)
|
|
249
|
+
], AuthAuditListener.prototype, "onLogout", null);
|
|
250
|
+
__decorate([
|
|
251
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.LOGOUT_ALL),
|
|
252
|
+
__metadata("design:type", Function),
|
|
253
|
+
__metadata("design:paramtypes", [Object]),
|
|
254
|
+
__metadata("design:returntype", void 0)
|
|
255
|
+
], AuthAuditListener.prototype, "onLogoutAll", null);
|
|
256
|
+
__decorate([
|
|
257
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.OAUTH_LINKED),
|
|
258
|
+
__metadata("design:type", Function),
|
|
259
|
+
__metadata("design:paramtypes", [Object]),
|
|
260
|
+
__metadata("design:returntype", void 0)
|
|
261
|
+
], AuthAuditListener.prototype, "onOauthLinked", null);
|
|
262
|
+
__decorate([
|
|
263
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.OAUTH_UNLINKED),
|
|
264
|
+
__metadata("design:type", Function),
|
|
265
|
+
__metadata("design:paramtypes", [Object]),
|
|
266
|
+
__metadata("design:returntype", void 0)
|
|
267
|
+
], AuthAuditListener.prototype, "onOauthUnlinked", null);
|
|
268
|
+
__decorate([
|
|
269
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.MFA_ENABLED),
|
|
270
|
+
__metadata("design:type", Function),
|
|
271
|
+
__metadata("design:paramtypes", [Object]),
|
|
272
|
+
__metadata("design:returntype", void 0)
|
|
273
|
+
], AuthAuditListener.prototype, "onMfaEnabled", null);
|
|
274
|
+
__decorate([
|
|
275
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.MFA_DISABLED),
|
|
276
|
+
__metadata("design:type", Function),
|
|
277
|
+
__metadata("design:paramtypes", [Object]),
|
|
278
|
+
__metadata("design:returntype", void 0)
|
|
279
|
+
], AuthAuditListener.prototype, "onMfaDisabled", null);
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.MFA_BACKUP_CODES_REGENERATED),
|
|
282
|
+
__metadata("design:type", Function),
|
|
283
|
+
__metadata("design:paramtypes", [Object]),
|
|
284
|
+
__metadata("design:returntype", void 0)
|
|
285
|
+
], AuthAuditListener.prototype, "onMfaBackupRegen", null);
|
|
286
|
+
__decorate([
|
|
287
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.MFA_STEP_UP),
|
|
288
|
+
__metadata("design:type", Function),
|
|
289
|
+
__metadata("design:paramtypes", [Object]),
|
|
290
|
+
__metadata("design:returntype", void 0)
|
|
291
|
+
], AuthAuditListener.prototype, "onMfaStepUp", null);
|
|
292
|
+
__decorate([
|
|
293
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.EMAIL_CHANGED),
|
|
294
|
+
__metadata("design:type", Function),
|
|
295
|
+
__metadata("design:paramtypes", [Object]),
|
|
296
|
+
__metadata("design:returntype", void 0)
|
|
297
|
+
], AuthAuditListener.prototype, "onEmailChanged", null);
|
|
298
|
+
__decorate([
|
|
299
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.PHONE_CHANGED),
|
|
300
|
+
__metadata("design:type", Function),
|
|
301
|
+
__metadata("design:paramtypes", [Object]),
|
|
302
|
+
__metadata("design:returntype", void 0)
|
|
303
|
+
], AuthAuditListener.prototype, "onPhoneChanged", null);
|
|
304
|
+
__decorate([
|
|
305
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.PASSWORD_CHANGED),
|
|
306
|
+
__metadata("design:type", Function),
|
|
307
|
+
__metadata("design:paramtypes", [Object]),
|
|
308
|
+
__metadata("design:returntype", void 0)
|
|
309
|
+
], AuthAuditListener.prototype, "onPasswordChanged", null);
|
|
310
|
+
__decorate([
|
|
311
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.PASSWORD_RESET),
|
|
312
|
+
__metadata("design:type", Function),
|
|
313
|
+
__metadata("design:paramtypes", [Object]),
|
|
314
|
+
__metadata("design:returntype", void 0)
|
|
315
|
+
], AuthAuditListener.prototype, "onPasswordReset", null);
|
|
316
|
+
__decorate([
|
|
317
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.PASSWORD_FORGOT_INITIATED),
|
|
318
|
+
__metadata("design:type", Function),
|
|
319
|
+
__metadata("design:paramtypes", [Object]),
|
|
320
|
+
__metadata("design:returntype", void 0)
|
|
321
|
+
], AuthAuditListener.prototype, "onPasswordForgot", null);
|
|
322
|
+
__decorate([
|
|
323
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.ACCOUNT_DELETE_REQUESTED),
|
|
324
|
+
__metadata("design:type", Function),
|
|
325
|
+
__metadata("design:paramtypes", [Object]),
|
|
326
|
+
__metadata("design:returntype", void 0)
|
|
327
|
+
], AuthAuditListener.prototype, "onDeleteRequested", null);
|
|
328
|
+
__decorate([
|
|
329
|
+
(0, event_emitter_1.OnEvent)(auth_events_1.AUTH_EVENTS.ACCOUNT_DELETED),
|
|
330
|
+
__metadata("design:type", Function),
|
|
331
|
+
__metadata("design:paramtypes", [Object]),
|
|
332
|
+
__metadata("design:returntype", void 0)
|
|
333
|
+
], AuthAuditListener.prototype, "onDeleted", null);
|
|
334
|
+
exports.AuthAuditListener = AuthAuditListener = __decorate([
|
|
335
|
+
(0, common_1.Injectable)(),
|
|
336
|
+
__metadata("design:paramtypes", [audit_service_1.AuditService])
|
|
337
|
+
], AuthAuditListener);
|
|
338
|
+
//# sourceMappingURL=auth-audit.listener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-audit.listener.js","sourceRoot":"","sources":["../../../../src/modules/audit/listeners/auth-audit.listener.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yDAAgD;AAEhD,+DAYuC;AACvC,8DAA2D;AAE3D,6DAAyD;AAEzD;;;GAGG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACA;IAA7B,YAA6B,KAAmB;QAAnB,UAAK,GAAL,KAAK,CAAc;IAAG,CAAC;IAGpD,OAAO,CAAC,KAAoB;QAC3B,IAAI,CAAC,UAAU,CAAC,6BAAa,CAAC,eAAe,EAAE,KAAK,EAAE;YACrD,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,aAAa,EAAE,KAAK,CAAC,aAAa;SAClC,CAAC,CAAC;IACJ,CAAC;IAGD,aAAa,CAAC,KAA2B;QACxC,IAAI,CAAC,OAAO,CAAC;YACZ,MAAM,EAAE,6BAAa,CAAC,YAAY;YAClC,SAAS,EAAE,MAAM;YACjB,OAAO,EAAE,IAAI;YACb,YAAY,EAAE,MAAM;YACpB,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE;gBACT,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,MA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ADC,IAAA,uBAAO,EAAC,yBAAW,CAAC,gBAAgB,CAAC;;;;0DAWrC;AAGD;IADC,IAAA,uBAAO,EAAC,yBAAW,CAAC,cAAc,CAAC;;;;wDAWnC;AAGD;IADC,IAAA,uBAAO,EAAC,yBAAW,CAAC,yBAAyB,CAAC;;;;yDAc9C;AAGD;IADC,IAAA,uBAAO,EAAC,yBAAW,CAAC,wBAAwB,CAAC;;;;0DAS7C;AAGD;IADC,IAAA,uBAAO,EAAC,yBAAW,CAAC,eAAe,CAAC;;;;kDASpC;4BA3NW,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEwB,4BAAY;GADpC,iBAAiB,CAiP7B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { Repository } from 'typeorm';
|
|
3
|
+
import { R2StorageService } from '../../file-upload/services/r2-storage.service';
|
|
4
|
+
import { StructuredLoggerService } from '../../observability/logging/structured-logger.service';
|
|
5
|
+
import { MetricsService } from '../../observability/metrics/metrics.service';
|
|
6
|
+
import { SettingsService } from '../../settings/services/settings.service';
|
|
7
|
+
import { AuditEvent } from '../entities/audit-event.entity';
|
|
8
|
+
import { AuditLeaderService } from './audit-leader.service';
|
|
9
|
+
import { AuditWriteService } from './audit-write.service';
|
|
10
|
+
/**
|
|
11
|
+
* Hot retention → cold R2 archive → purge (skips legal_hold).
|
|
12
|
+
* Gated by `audit.archive_enabled` and R2 readiness.
|
|
13
|
+
*/
|
|
14
|
+
export declare class AuditArchiveService implements OnModuleInit, OnModuleDestroy {
|
|
15
|
+
private readonly repo;
|
|
16
|
+
private readonly write;
|
|
17
|
+
private readonly leader;
|
|
18
|
+
private readonly settingsService;
|
|
19
|
+
private readonly logger;
|
|
20
|
+
private readonly r2?;
|
|
21
|
+
private readonly metrics?;
|
|
22
|
+
private timer;
|
|
23
|
+
constructor(repo: Repository<AuditEvent>, write: AuditWriteService, leader: AuditLeaderService, settingsService: SettingsService, logger: StructuredLoggerService, r2?: R2StorageService | undefined, metrics?: MetricsService | undefined);
|
|
24
|
+
onModuleInit(): void;
|
|
25
|
+
onModuleDestroy(): void;
|
|
26
|
+
run(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=audit-archive.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-archive.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/services/audit-archive.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAE,YAAY,EAAY,MAAM,gBAAgB,CAAC;AAErF,OAAO,EAAY,UAAU,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAK1D;;;GAGG;AACH,qBACa,mBAAoB,YAAW,YAAY,EAAE,eAAe;IAKvE,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACX,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IAVtC,OAAO,CAAC,KAAK,CAA+C;gBAI1C,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,EAC5B,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,kBAAkB,EAC1B,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,uBAAuB,EACnB,EAAE,CAAC,EAAE,gBAAgB,YAAA,EACrB,OAAO,CAAC,EAAE,cAAc,YAAA;IAGtD,YAAY,IAAI,IAAI;IAOpB,eAAe,IAAI,IAAI;IAOjB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA8D1B"}
|
|
@@ -0,0 +1,132 @@
|
|
|
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.AuditArchiveService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const r2_storage_service_1 = require("../../file-upload/services/r2-storage.service");
|
|
20
|
+
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
21
|
+
const metrics_service_1 = require("../../observability/metrics/metrics.service");
|
|
22
|
+
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
23
|
+
const settings_service_1 = require("../../settings/services/settings.service");
|
|
24
|
+
const audit_event_entity_1 = require("../entities/audit-event.entity");
|
|
25
|
+
const audit_leader_service_1 = require("./audit-leader.service");
|
|
26
|
+
const audit_write_service_1 = require("./audit-write.service");
|
|
27
|
+
const DEFAULT_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
28
|
+
const DEFAULT_BATCH_SIZE = 500;
|
|
29
|
+
/**
|
|
30
|
+
* Hot retention → cold R2 archive → purge (skips legal_hold).
|
|
31
|
+
* Gated by `audit.archive_enabled` and R2 readiness.
|
|
32
|
+
*/
|
|
33
|
+
let AuditArchiveService = class AuditArchiveService {
|
|
34
|
+
repo;
|
|
35
|
+
write;
|
|
36
|
+
leader;
|
|
37
|
+
settingsService;
|
|
38
|
+
logger;
|
|
39
|
+
r2;
|
|
40
|
+
metrics;
|
|
41
|
+
timer = null;
|
|
42
|
+
constructor(repo, write, leader, settingsService, logger, r2, metrics) {
|
|
43
|
+
this.repo = repo;
|
|
44
|
+
this.write = write;
|
|
45
|
+
this.leader = leader;
|
|
46
|
+
this.settingsService = settingsService;
|
|
47
|
+
this.logger = logger;
|
|
48
|
+
this.r2 = r2;
|
|
49
|
+
this.metrics = metrics;
|
|
50
|
+
}
|
|
51
|
+
onModuleInit() {
|
|
52
|
+
void this.run();
|
|
53
|
+
this.timer = setInterval(() => {
|
|
54
|
+
void this.run();
|
|
55
|
+
}, DEFAULT_INTERVAL_MS);
|
|
56
|
+
}
|
|
57
|
+
onModuleDestroy() {
|
|
58
|
+
if (this.timer) {
|
|
59
|
+
clearInterval(this.timer);
|
|
60
|
+
this.timer = null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async run() {
|
|
64
|
+
try {
|
|
65
|
+
const isLeader = await this.leader.tryAcquire('archive');
|
|
66
|
+
if (!isLeader)
|
|
67
|
+
return;
|
|
68
|
+
const enabled = this.settingsService.get(settings_keys_1.SETTING_KEYS.AUDIT_ARCHIVE_ENABLED);
|
|
69
|
+
if (!enabled)
|
|
70
|
+
return;
|
|
71
|
+
const days = this.settingsService.get(settings_keys_1.SETTING_KEYS.AUDIT_HOT_RETENTION_DAYS);
|
|
72
|
+
if (!days || days <= 0)
|
|
73
|
+
return;
|
|
74
|
+
if (!this.r2?.isEnabled()) {
|
|
75
|
+
this.logger.warn('Audit archive skipped — R2 disabled', {
|
|
76
|
+
event: 'audit.archive.skipped_no_r2',
|
|
77
|
+
});
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.r2.assertReady();
|
|
81
|
+
const cutoff = new Date(Date.now() - days * 24 * 60 * 60 * 1000);
|
|
82
|
+
let totalArchived = 0;
|
|
83
|
+
for (;;) {
|
|
84
|
+
const rows = await this.repo.find({
|
|
85
|
+
where: {
|
|
86
|
+
createdAt: (0, typeorm_2.LessThan)(cutoff),
|
|
87
|
+
legalHold: false,
|
|
88
|
+
},
|
|
89
|
+
order: { chainSeq: 'ASC' },
|
|
90
|
+
take: DEFAULT_BATCH_SIZE,
|
|
91
|
+
});
|
|
92
|
+
if (rows.length === 0)
|
|
93
|
+
break;
|
|
94
|
+
const key = `audit-archive/${cutoff.toISOString().slice(0, 10)}/${rows[0].chainSeq}-${rows[rows.length - 1].chainSeq}-${Date.now()}.json`;
|
|
95
|
+
await this.r2.putObject(key, Buffer.from(JSON.stringify(rows), 'utf8'), 'application/json');
|
|
96
|
+
const deleted = await this.write.purgeByIds(rows.map((r) => r.id));
|
|
97
|
+
totalArchived += deleted;
|
|
98
|
+
this.metrics?.recordBusinessEvent('audit', 'archive', 'success');
|
|
99
|
+
if (rows.length < DEFAULT_BATCH_SIZE)
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
if (totalArchived > 0) {
|
|
103
|
+
this.logger.info('Audit archive completed', {
|
|
104
|
+
event: 'audit.archive.completed',
|
|
105
|
+
metadata: { archived: totalArchived, retentionDays: days },
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
this.metrics?.recordBusinessEvent('audit', 'archive', 'failure');
|
|
111
|
+
this.logger.error('Audit archive failed', {
|
|
112
|
+
event: 'audit.archive.failed',
|
|
113
|
+
err: err instanceof Error ? err : undefined,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
exports.AuditArchiveService = AuditArchiveService;
|
|
119
|
+
exports.AuditArchiveService = AuditArchiveService = __decorate([
|
|
120
|
+
(0, common_1.Injectable)(),
|
|
121
|
+
__param(0, (0, typeorm_1.InjectRepository)(audit_event_entity_1.AuditEvent)),
|
|
122
|
+
__param(5, (0, common_1.Optional)()),
|
|
123
|
+
__param(6, (0, common_1.Optional)()),
|
|
124
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
125
|
+
audit_write_service_1.AuditWriteService,
|
|
126
|
+
audit_leader_service_1.AuditLeaderService,
|
|
127
|
+
settings_service_1.SettingsService,
|
|
128
|
+
structured_logger_service_1.StructuredLoggerService,
|
|
129
|
+
r2_storage_service_1.R2StorageService,
|
|
130
|
+
metrics_service_1.MetricsService])
|
|
131
|
+
], AuditArchiveService);
|
|
132
|
+
//# sourceMappingURL=audit-archive.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-archive.service.js","sourceRoot":"","sources":["../../../../src/modules/audit/services/audit-archive.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqF;AACrF,6CAAmD;AACnD,qCAA+C;AAE/C,sFAAiF;AACjF,qGAAgG;AAChG,iFAA6E;AAC7E,0EAAsE;AACtE,+EAA2E;AAC3E,uEAA4D;AAC5D,iEAA4D;AAC5D,+DAA0D;AAE1D,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAChD,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B;;;GAGG;A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@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { Repository } from 'typeorm';
|
|
3
|
+
import { StructuredLoggerService } from '../../observability/logging/structured-logger.service';
|
|
4
|
+
import { MetricsService } from '../../observability/metrics/metrics.service';
|
|
5
|
+
import { AuditEvent } from '../entities/audit-event.entity';
|
|
6
|
+
import { AuditLeaderService } from './audit-leader.service';
|
|
7
|
+
import { AuditWriteService } from './audit-write.service';
|
|
8
|
+
/**
|
|
9
|
+
* Seals pre-enterprise rows that have chain_seq but null event_hash.
|
|
10
|
+
* Runs once at boot when unsealed rows exist.
|
|
11
|
+
*/
|
|
12
|
+
export declare class AuditHashBackfillService implements OnModuleInit {
|
|
13
|
+
private readonly repo;
|
|
14
|
+
private readonly write;
|
|
15
|
+
private readonly leader;
|
|
16
|
+
private readonly logger;
|
|
17
|
+
private readonly metrics?;
|
|
18
|
+
constructor(repo: Repository<AuditEvent>, write: AuditWriteService, leader: AuditLeaderService, logger: StructuredLoggerService, metrics?: MetricsService | undefined);
|
|
19
|
+
onModuleInit(): void;
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=audit-hash-backfill.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-hash-backfill.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/services/audit-hash-backfill.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAY,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAAU,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;GAGG;AACH,qBACa,wBAAyB,YAAW,YAAY;IAG3D,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACX,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAJpB,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,EAC5B,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,uBAAuB,EACnB,OAAO,CAAC,EAAE,cAAc,YAAA;IAGtD,YAAY,IAAI,IAAI;IAId,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAsB1B"}
|
|
@@ -0,0 +1,79 @@
|
|
|
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.AuditHashBackfillService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
20
|
+
const metrics_service_1 = require("../../observability/metrics/metrics.service");
|
|
21
|
+
const audit_event_entity_1 = require("../entities/audit-event.entity");
|
|
22
|
+
const audit_leader_service_1 = require("./audit-leader.service");
|
|
23
|
+
const audit_write_service_1 = require("./audit-write.service");
|
|
24
|
+
/**
|
|
25
|
+
* Seals pre-enterprise rows that have chain_seq but null event_hash.
|
|
26
|
+
* Runs once at boot when unsealed rows exist.
|
|
27
|
+
*/
|
|
28
|
+
let AuditHashBackfillService = class AuditHashBackfillService {
|
|
29
|
+
repo;
|
|
30
|
+
write;
|
|
31
|
+
leader;
|
|
32
|
+
logger;
|
|
33
|
+
metrics;
|
|
34
|
+
constructor(repo, write, leader, logger, metrics) {
|
|
35
|
+
this.repo = repo;
|
|
36
|
+
this.write = write;
|
|
37
|
+
this.leader = leader;
|
|
38
|
+
this.logger = logger;
|
|
39
|
+
this.metrics = metrics;
|
|
40
|
+
}
|
|
41
|
+
onModuleInit() {
|
|
42
|
+
void this.run();
|
|
43
|
+
}
|
|
44
|
+
async run() {
|
|
45
|
+
try {
|
|
46
|
+
const isLeader = await this.leader.tryAcquire('hash_backfill');
|
|
47
|
+
if (!isLeader)
|
|
48
|
+
return;
|
|
49
|
+
const pending = await this.repo.count({ where: { eventHash: (0, typeorm_2.IsNull)() } });
|
|
50
|
+
if (pending === 0)
|
|
51
|
+
return;
|
|
52
|
+
const sealed = await this.write.backfillMissingHashes();
|
|
53
|
+
this.logger.info('Audit hash backfill completed', {
|
|
54
|
+
event: 'audit.hash_backfill.completed',
|
|
55
|
+
metadata: { sealed, pending },
|
|
56
|
+
});
|
|
57
|
+
this.metrics?.recordBusinessEvent('audit', 'hash_backfill', 'success');
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
this.metrics?.recordBusinessEvent('audit', 'hash_backfill', 'failure');
|
|
61
|
+
this.logger.error('Audit hash backfill failed', {
|
|
62
|
+
event: 'audit.hash_backfill.failed',
|
|
63
|
+
err: err instanceof Error ? err : undefined,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.AuditHashBackfillService = AuditHashBackfillService;
|
|
69
|
+
exports.AuditHashBackfillService = AuditHashBackfillService = __decorate([
|
|
70
|
+
(0, common_1.Injectable)(),
|
|
71
|
+
__param(0, (0, typeorm_1.InjectRepository)(audit_event_entity_1.AuditEvent)),
|
|
72
|
+
__param(4, (0, common_1.Optional)()),
|
|
73
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
74
|
+
audit_write_service_1.AuditWriteService,
|
|
75
|
+
audit_leader_service_1.AuditLeaderService,
|
|
76
|
+
structured_logger_service_1.StructuredLoggerService,
|
|
77
|
+
metrics_service_1.MetricsService])
|
|
78
|
+
], AuditHashBackfillService);
|
|
79
|
+
//# sourceMappingURL=audit-hash-backfill.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-hash-backfill.service.js","sourceRoot":"","sources":["../../../../src/modules/audit/services/audit-hash-backfill.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,6CAAmD;AACnD,qCAA6C;AAE7C,qGAAgG;AAChG,iFAA6E;AAC7E,uEAA4D;AAC5D,iEAA4D;AAC5D,+DAA0D;AAE1D;;;GAGG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAGlB;IACA;IACA;IACA;IACY;IAN9B,YAEkB,IAA4B,EAC5B,KAAwB,EACxB,MAA0B,EAC1B,MAA+B,EACnB,OAAwB;QAJpC,SAAI,GAAJ,IAAI,CAAwB;QAC5B,UAAK,GAAL,KAAK,CAAmB;QACxB,WAAM,GAAN,MAAM,CAAoB;QAC1B,WAAM,GAAN,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