@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,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUDIT_ACTIONS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Well-known audit action slugs. Host apps may pass any string to
|
|
6
|
+
* {@link AuditService.record}; prefer namespaced dots (`domain.verb`).
|
|
7
|
+
*/
|
|
8
|
+
exports.AUDIT_ACTIONS = {
|
|
9
|
+
// Auth (aligned with AUTH_EVENTS where applicable)
|
|
10
|
+
LOGIN_COMPLETED: 'auth.login.completed',
|
|
11
|
+
REGISTRATION_COMPLETED: 'auth.registration.completed',
|
|
12
|
+
LOGOUT: 'auth.logout',
|
|
13
|
+
LOGOUT_ALL: 'auth.logout.all',
|
|
14
|
+
OAUTH_LINKED: 'auth.oauth.linked',
|
|
15
|
+
OAUTH_UNLINKED: 'auth.oauth.unlinked',
|
|
16
|
+
MFA_ENABLED: 'auth.mfa.enabled',
|
|
17
|
+
MFA_DISABLED: 'auth.mfa.disabled',
|
|
18
|
+
MFA_BACKUP_CODES_REGENERATED: 'auth.mfa.backup_codes_regenerated',
|
|
19
|
+
MFA_STEP_UP: 'auth.mfa.step_up',
|
|
20
|
+
EMAIL_CHANGED: 'auth.email.changed',
|
|
21
|
+
PHONE_CHANGED: 'auth.phone.changed',
|
|
22
|
+
PASSWORD_CHANGED: 'auth.password.changed',
|
|
23
|
+
PASSWORD_RESET: 'auth.password.reset',
|
|
24
|
+
ACCOUNT_DELETE_REQUESTED: 'auth.account.delete_requested',
|
|
25
|
+
ACCOUNT_DELETED: 'auth.account.deleted',
|
|
26
|
+
EMAIL_VERIFIED: 'auth.email.verified',
|
|
27
|
+
PHONE_VERIFIED: 'auth.phone.verified',
|
|
28
|
+
SESSIONS_REVOKE_OTHERS: 'auth.sessions.revoke_others',
|
|
29
|
+
SESSION_REVOKED: 'auth.session.revoked',
|
|
30
|
+
SESSION_REUSE_DETECTED: 'auth.session.reuse_detected',
|
|
31
|
+
SESSION_DPOP_MISMATCH: 'auth.session.dpop_mismatch',
|
|
32
|
+
SESSION_DPOP_UNBOUND: 'auth.session.dpop_unbound',
|
|
33
|
+
LOGIN_FAILED: 'auth.login.failed',
|
|
34
|
+
LOGIN_LOCKED: 'auth.login.locked',
|
|
35
|
+
PASSWORD_FORGOT_INITIATED: 'auth.password.forgot_initiated',
|
|
36
|
+
PIN_SET: 'auth.pin.set',
|
|
37
|
+
PIN_CHANGED: 'auth.pin.changed',
|
|
38
|
+
PIN_REMOVED: 'auth.pin.removed',
|
|
39
|
+
PIN_VERIFIED: 'auth.pin.verified',
|
|
40
|
+
PIN_FAILED: 'auth.pin.failed',
|
|
41
|
+
PIN_LOCKED: 'auth.pin.locked',
|
|
42
|
+
MFA_SETUP_STARTED: 'auth.mfa.setup_started',
|
|
43
|
+
MFA_VERIFY_FAILED: 'auth.mfa.verify_failed',
|
|
44
|
+
MFA_LOCKED: 'auth.mfa.locked',
|
|
45
|
+
// OTP security outcomes only (not generate/resend — those are high-QPS / logs-only)
|
|
46
|
+
OTP_VERIFIED: 'otp.verified',
|
|
47
|
+
OTP_FAILED: 'otp.failed',
|
|
48
|
+
OTP_LOCKED_OUT: 'otp.locked_out',
|
|
49
|
+
// Users / admin
|
|
50
|
+
USER_CREATE: 'user.create',
|
|
51
|
+
USER_UPDATE: 'user.update',
|
|
52
|
+
USER_DELETE: 'user.delete',
|
|
53
|
+
USER_DEACTIVATE: 'user.deactivate',
|
|
54
|
+
USER_ACTIVATE: 'user.activate',
|
|
55
|
+
PROFILE_UPDATED: 'user.profile.updated',
|
|
56
|
+
NOTIFICATION_SENT: 'notification.sent',
|
|
57
|
+
NOTIFICATION_RETRY: 'notification.delivery.retried',
|
|
58
|
+
DEVICE_REGISTERED: 'notification.device.registered',
|
|
59
|
+
DEVICE_REMOVED: 'notification.device.removed',
|
|
60
|
+
// Files
|
|
61
|
+
FILE_UPLOADED: 'file.uploaded',
|
|
62
|
+
FILE_REPLACED: 'file.replaced',
|
|
63
|
+
FILE_DELETED: 'file.deleted',
|
|
64
|
+
// Audit meta (who accessed / mutated the trail)
|
|
65
|
+
AUDIT_LEGAL_HOLD_UPDATED: 'audit.legal_hold.updated',
|
|
66
|
+
AUDIT_EXPORT_REQUESTED: 'audit.export.requested',
|
|
67
|
+
AUDIT_CHAIN_VERIFY: 'audit.chain.verify',
|
|
68
|
+
// Settings
|
|
69
|
+
SETTING_UPDATED: 'settings.updated',
|
|
70
|
+
// Invitations
|
|
71
|
+
INVITATION_CREATED: 'invitation.created',
|
|
72
|
+
INVITATION_ACCEPTED: 'invitation.accepted',
|
|
73
|
+
INVITATION_RESENT: 'invitation.resent',
|
|
74
|
+
INVITATION_REVOKED: 'invitation.revoked',
|
|
75
|
+
// Roles / permissions
|
|
76
|
+
ROLE_CREATED: 'role.created',
|
|
77
|
+
ROLE_UPDATED: 'role.updated',
|
|
78
|
+
ROLE_DELETED: 'role.deleted',
|
|
79
|
+
ROLE_PERMISSIONS_ASSIGNED: 'role.permissions.assigned',
|
|
80
|
+
USER_ROLES_ASSIGNED: 'user.roles.assigned',
|
|
81
|
+
USER_ROLES_REMOVED: 'user.roles.removed',
|
|
82
|
+
PERMISSION_CREATED: 'permission.created',
|
|
83
|
+
PERMISSION_UPDATED: 'permission.updated',
|
|
84
|
+
PERMISSION_DELETED: 'permission.deleted',
|
|
85
|
+
MODULE_CREATED: 'module.created',
|
|
86
|
+
MODULE_UPDATED: 'module.updated',
|
|
87
|
+
MODULE_DELETED: 'module.deleted',
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=audit-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-actions.js","sourceRoot":"","sources":["../../../../src/modules/audit/constants/audit-actions.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,aAAa,GAAG;IAC5B,mDAAmD;IACnD,eAAe,EAAE,sBAAsB;IACvC,sBAAsB,EAAE,6BAA6B;IACrD,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE,iBAAiB;IAC7B,YAAY,EAAE,mBAAmB;IACjC,cAAc,EAAE,qBAAqB;IACrC,WAAW,EAAE,kBAAkB;IAC/B,YAAY,EAAE,mBAAmB;IACjC,4BAA4B,EAAE,mCAAmC;IACjE,WAAW,EAAE,kBAAkB;IAC/B,aAAa,EAAE,oBAAoB;IACnC,aAAa,EAAE,oBAAoB;IACnC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;IAEnC,cAAc;IACd,kBAAkB,EAAE,oBAAoB;IACxC,mBAAmB,EAAE,qBAAqB;IAC1C,iBAAiB,EAAE,mBAAmB;IACtC,kBAAkB,EAAE,oBAAoB;IAExC,sBAAsB;IACtB,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,yBAAyB,EAAE,2BAA2B;IACtD,mBAAmB,EAAE,qBAAqB;IAC1C,kBAAkB,EAAE,oBAAoB;IACxC,kBAAkB,EAAE,oBAAoB;IACxC,kBAAkB,EAAE,oBAAoB;IACxC,kBAAkB,EAAE,oBAAoB;IACxC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;CACvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Postgres GUC values for `SET LOCAL app.audit_mutation`. */
|
|
2
|
+
export declare const AUDIT_MUTATION: {
|
|
3
|
+
/** Allow DELETE of non-legal-hold rows (archive purge). */
|
|
4
|
+
readonly PURGE: "purge";
|
|
5
|
+
/** Allow UPDATE that only toggles `legal_hold`. */
|
|
6
|
+
readonly LEGAL_HOLD: "legal_hold";
|
|
7
|
+
};
|
|
8
|
+
/** Advisory lock key for serial hash-chain inserts. */
|
|
9
|
+
export declare const AUDIT_CHAIN_ADVISORY_LOCK = 87236401;
|
|
10
|
+
//# sourceMappingURL=audit-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-mutation.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/constants/audit-mutation.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,eAAO,MAAM,cAAc;IAC1B,2DAA2D;;IAE3D,mDAAmD;;CAE1C,CAAC;AAEX,uDAAuD;AACvD,eAAO,MAAM,yBAAyB,WAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUDIT_CHAIN_ADVISORY_LOCK = exports.AUDIT_MUTATION = void 0;
|
|
4
|
+
/** Postgres GUC values for `SET LOCAL app.audit_mutation`. */
|
|
5
|
+
exports.AUDIT_MUTATION = {
|
|
6
|
+
/** Allow DELETE of non-legal-hold rows (archive purge). */
|
|
7
|
+
PURGE: 'purge',
|
|
8
|
+
/** Allow UPDATE that only toggles `legal_hold`. */
|
|
9
|
+
LEGAL_HOLD: 'legal_hold',
|
|
10
|
+
};
|
|
11
|
+
/** Advisory lock key for serial hash-chain inserts. */
|
|
12
|
+
exports.AUDIT_CHAIN_ADVISORY_LOCK = 87_236_401;
|
|
13
|
+
//# sourceMappingURL=audit-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-mutation.js","sourceRoot":"","sources":["../../../../src/modules/audit/constants/audit-mutation.ts"],"names":[],"mappings":";;;AAAA,8DAA8D;AACjD,QAAA,cAAc,GAAG;IAC7B,2DAA2D;IAC3D,KAAK,EAAE,OAAO;IACd,mDAAmD;IACnD,UAAU,EAAE,YAAY;CACf,CAAC;AAEX,uDAAuD;AAC1C,QAAA,yBAAyB,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Response } from 'express';
|
|
2
|
+
import type { RequestUser } from '../../../common/interfaces/request-user';
|
|
3
|
+
import { AuditExportQueryDto, AuditFilterDto, AuditLegalHoldDto } from '../dto/audit.dto';
|
|
4
|
+
import { AuditService } from '../services/audit.service';
|
|
5
|
+
export declare class AuditController {
|
|
6
|
+
private readonly auditService;
|
|
7
|
+
constructor(auditService: AuditService);
|
|
8
|
+
findAll(filter: AuditFilterDto): Promise<import("../dto/audit.dto").AuditListResult>;
|
|
9
|
+
export(filter: AuditExportQueryDto, res: Response, actor: RequestUser): Promise<void>;
|
|
10
|
+
verify(actor: RequestUser): Promise<import("../dto/audit.dto").AuditVerifyResult>;
|
|
11
|
+
setLegalHold(id: string, dto: AuditLegalHoldDto, actor: RequestUser): Promise<import("..").AuditEvent>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=audit.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/controllers/audit.controller.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,qBAIa,eAAe;IACf,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IASvD,OAAO,CAAU,MAAM,EAAE,cAAc;IAWjC,MAAM,CACF,MAAM,EAAE,mBAAmB,EAC7B,GAAG,EAAE,QAAQ,EACL,KAAK,EAAE,WAAW;IAqC5B,MAAM,CAAgB,KAAK,EAAE,WAAW;IAuBxC,YAAY,CACW,EAAE,EAAE,MAAM,EAC9B,GAAG,EAAE,iBAAiB,EACf,KAAK,EAAE,WAAW;CAclC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
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.AuditController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const decorators_1 = require("../../../common/decorators");
|
|
19
|
+
const auth_guard_1 = require("../../../common/guards/auth.guard");
|
|
20
|
+
const permissions_guard_1 = require("../../../common/guards/permissions.guard");
|
|
21
|
+
const audit_manifest_1 = require("../audit.manifest");
|
|
22
|
+
const audit_actions_1 = require("../constants/audit-actions");
|
|
23
|
+
const audit_dto_1 = require("../dto/audit.dto");
|
|
24
|
+
const audit_service_1 = require("../services/audit.service");
|
|
25
|
+
let AuditController = class AuditController {
|
|
26
|
+
auditService;
|
|
27
|
+
constructor(auditService) {
|
|
28
|
+
this.auditService = auditService;
|
|
29
|
+
}
|
|
30
|
+
findAll(filter) {
|
|
31
|
+
return this.auditService.findAll(filter);
|
|
32
|
+
}
|
|
33
|
+
async export(filter, res, actor) {
|
|
34
|
+
const format = filter.format ?? 'json';
|
|
35
|
+
const filename = `audit-export-${Date.now()}.${format === 'csv' ? 'csv' : 'json'}`;
|
|
36
|
+
this.auditService.record({
|
|
37
|
+
action: audit_actions_1.AUDIT_ACTIONS.AUDIT_EXPORT_REQUESTED,
|
|
38
|
+
actorType: 'ADMIN',
|
|
39
|
+
actorId: actor.id,
|
|
40
|
+
resourceType: 'audit',
|
|
41
|
+
metadata: {
|
|
42
|
+
format,
|
|
43
|
+
actionPrefix: filter.action ?? null,
|
|
44
|
+
actorIdFilter: filter.actorId ?? null,
|
|
45
|
+
from: filter.from ?? null,
|
|
46
|
+
to: filter.to ?? null,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
res.setHeader('Content-Type', format === 'csv' ? 'text/csv; charset=utf-8' : 'application/json; charset=utf-8');
|
|
50
|
+
res.setHeader('Content-Disposition', `attachment; filename="${filename}"`);
|
|
51
|
+
await this.auditService.streamExport(filter, (chunk) => {
|
|
52
|
+
res.write(chunk);
|
|
53
|
+
});
|
|
54
|
+
res.end();
|
|
55
|
+
}
|
|
56
|
+
async verify(actor) {
|
|
57
|
+
const result = await this.auditService.verifyChain();
|
|
58
|
+
this.auditService.record({
|
|
59
|
+
action: audit_actions_1.AUDIT_ACTIONS.AUDIT_CHAIN_VERIFY,
|
|
60
|
+
actorType: 'ADMIN',
|
|
61
|
+
actorId: actor.id,
|
|
62
|
+
resourceType: 'audit',
|
|
63
|
+
status: result.valid ? 'SUCCESS' : 'FAILURE',
|
|
64
|
+
metadata: {
|
|
65
|
+
valid: result.valid,
|
|
66
|
+
checked: result.checked,
|
|
67
|
+
firstBreakChainSeq: result.firstBreakChainSeq ?? null,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
async setLegalHold(id, dto, actor) {
|
|
73
|
+
const row = await this.auditService.setLegalHold(id, dto.legalHold);
|
|
74
|
+
if (!row)
|
|
75
|
+
throw new common_1.NotFoundException('Audit event not found');
|
|
76
|
+
this.auditService.record({
|
|
77
|
+
action: audit_actions_1.AUDIT_ACTIONS.AUDIT_LEGAL_HOLD_UPDATED,
|
|
78
|
+
actorType: 'ADMIN',
|
|
79
|
+
actorId: actor.id,
|
|
80
|
+
resourceType: 'audit_event',
|
|
81
|
+
resourceId: id,
|
|
82
|
+
metadata: { legalHold: dto.legalHold },
|
|
83
|
+
});
|
|
84
|
+
return row;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
exports.AuditController = AuditController;
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, common_1.Get)('events'),
|
|
90
|
+
(0, decorators_1.RequirePermission)(audit_manifest_1.AUDIT_PERMISSIONS.READ),
|
|
91
|
+
(0, swagger_1.ApiOperation)({
|
|
92
|
+
summary: 'List audit events',
|
|
93
|
+
description: 'Paginated compliance audit trail. Prefer `cursor` (chain_seq) for large scans; `page` remains supported.',
|
|
94
|
+
}),
|
|
95
|
+
__param(0, (0, common_1.Query)()),
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", [audit_dto_1.AuditFilterDto]),
|
|
98
|
+
__metadata("design:returntype", void 0)
|
|
99
|
+
], AuditController.prototype, "findAll", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, common_1.Get)('events/export'),
|
|
102
|
+
(0, decorators_1.RequirePermission)(audit_manifest_1.AUDIT_PERMISSIONS.EXPORT),
|
|
103
|
+
(0, swagger_1.ApiOperation)({
|
|
104
|
+
summary: 'Export audit events',
|
|
105
|
+
description: 'CSV or JSON export streamed in batches (bounded by audit.export_max_rows). Prefer list `cursor` for interactive scans.',
|
|
106
|
+
}),
|
|
107
|
+
__param(0, (0, common_1.Query)()),
|
|
108
|
+
__param(1, (0, common_1.Res)()),
|
|
109
|
+
__param(2, (0, decorators_1.CurrentUser)()),
|
|
110
|
+
__metadata("design:type", Function),
|
|
111
|
+
__metadata("design:paramtypes", [audit_dto_1.AuditExportQueryDto, Object, Object]),
|
|
112
|
+
__metadata("design:returntype", Promise)
|
|
113
|
+
], AuditController.prototype, "export", null);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, common_1.Post)('events/verify'),
|
|
116
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
117
|
+
(0, decorators_1.RequirePermission)(audit_manifest_1.AUDIT_PERMISSIONS.MANAGE),
|
|
118
|
+
(0, swagger_1.ApiOperation)({
|
|
119
|
+
summary: 'Verify hash chain',
|
|
120
|
+
description: 'Recomputes event_hash / prev_hash for sealed audit rows (capped). ' +
|
|
121
|
+
'Concurrent verifies are rejected with 429.',
|
|
122
|
+
}),
|
|
123
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
124
|
+
__metadata("design:type", Function),
|
|
125
|
+
__metadata("design:paramtypes", [Object]),
|
|
126
|
+
__metadata("design:returntype", Promise)
|
|
127
|
+
], AuditController.prototype, "verify", null);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, common_1.Patch)('events/:id/legal-hold'),
|
|
130
|
+
(0, decorators_1.RequirePermission)(audit_manifest_1.AUDIT_PERMISSIONS.MANAGE),
|
|
131
|
+
(0, swagger_1.ApiOperation)({
|
|
132
|
+
summary: 'Set legal hold',
|
|
133
|
+
description: 'Legal-hold rows are excluded from hot-retention archive purge.',
|
|
134
|
+
}),
|
|
135
|
+
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
136
|
+
__param(1, (0, common_1.Body)()),
|
|
137
|
+
__param(2, (0, decorators_1.CurrentUser)()),
|
|
138
|
+
__metadata("design:type", Function),
|
|
139
|
+
__metadata("design:paramtypes", [String, audit_dto_1.AuditLegalHoldDto, Object]),
|
|
140
|
+
__metadata("design:returntype", Promise)
|
|
141
|
+
], AuditController.prototype, "setLegalHold", null);
|
|
142
|
+
exports.AuditController = AuditController = __decorate([
|
|
143
|
+
(0, swagger_1.ApiTags)('Audit'),
|
|
144
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
145
|
+
(0, common_1.Controller)('audit'),
|
|
146
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard, permissions_guard_1.PermissionsGuard),
|
|
147
|
+
__metadata("design:paramtypes", [audit_service_1.AuditService])
|
|
148
|
+
], AuditController);
|
|
149
|
+
//# sourceMappingURL=audit.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.controller.js","sourceRoot":"","sources":["../../../../src/modules/audit/controllers/audit.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAcwB;AACxB,6CAAuE;AAGv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AA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,wBAAW,GAAE,CAAA;;6CADD,6BAAiB;;mDAc9B;0BApGW,eAAe;IAJ3B,IAAA,iBAAO,EAAC,OAAO,CAAC;IAChB,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,OAAO,CAAC;IACnB,IAAA,kBAAS,EAAC,yBAAY,EAAE,oCAAgB,CAAC;qCAEE,4BAAY;GAD3C,eAAe,CAqG3B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AuditActorType } from '../entities/audit-event.entity';
|
|
2
|
+
export declare const AUDIT_META_KEY = "audit:meta";
|
|
3
|
+
export interface AuditDecoratorOptions {
|
|
4
|
+
/** Action slug recorded on success/failure. */
|
|
5
|
+
action: string;
|
|
6
|
+
resourceType?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Route param / body field name used as resourceId
|
|
9
|
+
* (e.g. `'id'` → `req.params.id`).
|
|
10
|
+
*/
|
|
11
|
+
resourceIdParam?: string;
|
|
12
|
+
actorType?: AuditActorType;
|
|
13
|
+
/** Also record FAILURE when the handler throws (default true). */
|
|
14
|
+
recordFailure?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Declarative audit for controller/service methods.
|
|
18
|
+
* Pair with {@link AuditInterceptor} (registered by AuditModule).
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* @Audit({ action: 'user.profile.updated', resourceType: 'user', resourceIdParam: 'userId' })
|
|
23
|
+
* updateProfile() { ... }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare const Audit: (options: AuditDecoratorOptions) => import("@nestjs/common").CustomDecorator<string>;
|
|
27
|
+
//# sourceMappingURL=audit.decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.decorator.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/decorators/audit.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,eAAO,MAAM,cAAc,eAAe,CAAC;AAE3C,MAAM,WAAW,qBAAqB;IACrC,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,kEAAkE;IAClE,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,qDAAyC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Audit = exports.AUDIT_META_KEY = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
exports.AUDIT_META_KEY = 'audit:meta';
|
|
6
|
+
/**
|
|
7
|
+
* Declarative audit for controller/service methods.
|
|
8
|
+
* Pair with {@link AuditInterceptor} (registered by AuditModule).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* @Audit({ action: 'user.profile.updated', resourceType: 'user', resourceIdParam: 'userId' })
|
|
13
|
+
* updateProfile() { ... }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
const Audit = (options) => (0, common_1.SetMetadata)(exports.AUDIT_META_KEY, options);
|
|
17
|
+
exports.Audit = Audit;
|
|
18
|
+
//# sourceMappingURL=audit.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.decorator.js","sourceRoot":"","sources":["../../../../src/modules/audit/decorators/audit.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAIhC,QAAA,cAAc,GAAG,YAAY,CAAC;AAgB3C;;;;;;;;;GASG;AACI,MAAM,KAAK,GAAG,CAAC,OAA8B,EAAE,EAAE,CAAC,IAAA,oBAAW,EAAC,sBAAc,EAAE,OAAO,CAAC,CAAC;AAAjF,QAAA,KAAK,SAA4E"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { AuditActorType, AuditEvent, AuditStatus } from '../entities/audit-event.entity';
|
|
2
|
+
export declare class AuditFilterDto {
|
|
3
|
+
page?: number;
|
|
4
|
+
limit?: number;
|
|
5
|
+
/** Cursor pagination: return rows with chain_seq strictly less than this (DESC). */
|
|
6
|
+
cursor?: string;
|
|
7
|
+
actorId?: string;
|
|
8
|
+
actorType?: AuditActorType;
|
|
9
|
+
action?: string;
|
|
10
|
+
resourceType?: string;
|
|
11
|
+
resourceId?: string;
|
|
12
|
+
from?: string;
|
|
13
|
+
to?: string;
|
|
14
|
+
correlationId?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class AuditExportQueryDto extends AuditFilterDto {
|
|
17
|
+
format?: 'json' | 'csv';
|
|
18
|
+
}
|
|
19
|
+
export declare class AuditLegalHoldDto {
|
|
20
|
+
legalHold: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Input for {@link AuditService.record} — used by core modules and host apps. */
|
|
23
|
+
export interface RecordAuditEventInput {
|
|
24
|
+
action: string;
|
|
25
|
+
actorType?: AuditActorType;
|
|
26
|
+
actorId?: string | null;
|
|
27
|
+
resourceType?: string | null;
|
|
28
|
+
/** UUID or opaque key (max 128). */
|
|
29
|
+
resourceId?: string | null;
|
|
30
|
+
status?: AuditStatus;
|
|
31
|
+
metadata?: Record<string, unknown> | null;
|
|
32
|
+
ipAddress?: string | null;
|
|
33
|
+
deviceInfo?: string | null;
|
|
34
|
+
/** When omitted, filled from observability context if available. */
|
|
35
|
+
requestId?: string | null;
|
|
36
|
+
correlationId?: string | null;
|
|
37
|
+
traceId?: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface AuditListResult {
|
|
40
|
+
data: AuditEvent[];
|
|
41
|
+
total?: number;
|
|
42
|
+
page?: number;
|
|
43
|
+
limit: number;
|
|
44
|
+
totalPages?: number;
|
|
45
|
+
nextCursor?: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface AuditVerifyResult {
|
|
48
|
+
valid: boolean;
|
|
49
|
+
checked: number;
|
|
50
|
+
firstBreakChainSeq?: string | null;
|
|
51
|
+
firstBreakId?: string | null;
|
|
52
|
+
message: string;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=audit.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.dto.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/dto/audit.dto.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE9F,qBAAa,cAAc;IAK1B,IAAI,CAAC,EAAE,MAAM,CAAK;IAOlB,KAAK,CAAC,EAAE,MAAM,CAAM;IAEpB,oFAAoF;IAKpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,OAAO,CAAC,EAAE,MAAM,CAAC;IAQjB,SAAS,CAAC,EAAE,cAAc,CAAC;IAQ3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,YAAY,CAAC,EAAE,MAAM,CAAC;IAMtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAKpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,EAAE,CAAC,EAAE,MAAM,CAAC;IAMZ,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,mBAAoB,SAAQ,cAAc;IAItD,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAU;CACjC;AAED,qBAAa,iBAAiB;IAG7B,SAAS,EAAG,OAAO,CAAC;CACpB;AAED,kFAAkF;AAClF,MAAM,WAAW,qBAAqB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,129 @@
|
|
|
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.AuditLegalHoldDto = exports.AuditExportQueryDto = exports.AuditFilterDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
class AuditFilterDto {
|
|
17
|
+
page = 1;
|
|
18
|
+
limit = 20;
|
|
19
|
+
/** Cursor pagination: return rows with chain_seq strictly less than this (DESC). */
|
|
20
|
+
cursor;
|
|
21
|
+
actorId;
|
|
22
|
+
actorType;
|
|
23
|
+
action;
|
|
24
|
+
resourceType;
|
|
25
|
+
resourceId;
|
|
26
|
+
from;
|
|
27
|
+
to;
|
|
28
|
+
correlationId;
|
|
29
|
+
}
|
|
30
|
+
exports.AuditFilterDto = AuditFilterDto;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.IsInt)(),
|
|
34
|
+
(0, class_validator_1.Min)(1),
|
|
35
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], AuditFilterDto.prototype, "page", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.IsInt)(),
|
|
41
|
+
(0, class_validator_1.Min)(1),
|
|
42
|
+
(0, class_validator_1.Max)(100),
|
|
43
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], AuditFilterDto.prototype, "limit", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'chain_seq cursor (exclusive upper bound for DESC pages)' }),
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.MaxLength)(32),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], AuditFilterDto.prototype, "cursor", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Filter by actor UUID' }),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_validator_1.IsUUID)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], AuditFilterDto.prototype, "actorId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
61
|
+
description: 'Filter by actor type',
|
|
62
|
+
enum: ['USER', 'ADMIN', 'SYSTEM', 'SERVICE'],
|
|
63
|
+
}),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsIn)(['USER', 'ADMIN', 'SYSTEM', 'SERVICE']),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], AuditFilterDto.prototype, "actorType", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
70
|
+
description: 'Prefix match on action slug (e.g. `auth.` → `auth.%`). Index-friendly.',
|
|
71
|
+
}),
|
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
(0, class_validator_1.IsString)(),
|
|
74
|
+
(0, class_validator_1.MaxLength)(128),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], AuditFilterDto.prototype, "action", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Filter by resource type' }),
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
(0, class_validator_1.IsString)(),
|
|
81
|
+
(0, class_validator_1.MaxLength)(64),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], AuditFilterDto.prototype, "resourceType", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Filter by resource id (UUID or opaque key)' }),
|
|
86
|
+
(0, class_validator_1.IsOptional)(),
|
|
87
|
+
(0, class_validator_1.IsString)(),
|
|
88
|
+
(0, class_validator_1.MaxLength)(128),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], AuditFilterDto.prototype, "resourceId", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'ISO 8601 start (createdAt)' }),
|
|
93
|
+
(0, class_validator_1.IsOptional)(),
|
|
94
|
+
(0, class_validator_1.IsDateString)(),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], AuditFilterDto.prototype, "from", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'ISO 8601 end (createdAt)' }),
|
|
99
|
+
(0, class_validator_1.IsOptional)(),
|
|
100
|
+
(0, class_validator_1.IsDateString)(),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], AuditFilterDto.prototype, "to", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Filter by correlation id' }),
|
|
105
|
+
(0, class_validator_1.IsOptional)(),
|
|
106
|
+
(0, class_validator_1.IsString)(),
|
|
107
|
+
(0, class_validator_1.MaxLength)(64),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], AuditFilterDto.prototype, "correlationId", void 0);
|
|
110
|
+
class AuditExportQueryDto extends AuditFilterDto {
|
|
111
|
+
format = 'json';
|
|
112
|
+
}
|
|
113
|
+
exports.AuditExportQueryDto = AuditExportQueryDto;
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: ['json', 'csv'], default: 'json' }),
|
|
116
|
+
(0, class_validator_1.IsOptional)(),
|
|
117
|
+
(0, class_validator_1.IsIn)(['json', 'csv']),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], AuditExportQueryDto.prototype, "format", void 0);
|
|
120
|
+
class AuditLegalHoldDto {
|
|
121
|
+
legalHold;
|
|
122
|
+
}
|
|
123
|
+
exports.AuditLegalHoldDto = AuditLegalHoldDto;
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiProperty)({ description: 'When true, row is excluded from archive purge' }),
|
|
126
|
+
(0, class_validator_1.IsBoolean)(),
|
|
127
|
+
__metadata("design:type", Boolean)
|
|
128
|
+
], AuditLegalHoldDto.prototype, "legalHold", void 0);
|
|
129
|
+
//# sourceMappingURL=audit.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.dto.js","sourceRoot":"","sources":["../../../../src/modules/audit/dto/audit.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,yDAAyC;AACzC,qDAWyB;AAIzB,MAAa,cAAc;IAK1B,IAAI,GAAY,CAAC,CAAC;IAOlB,KAAK,GAAY,EAAE,CAAC;IAEpB,oFAAoF;IAKpF,MAAM,CAAU;IAKhB,OAAO,CAAU;IAQjB,SAAS,CAAkB;IAQ3B,MAAM,CAAU;IAMhB,YAAY,CAAU;IAMtB,UAAU,CAAU;IAKpB,IAAI,CAAU;IAKd,EAAE,CAAU;IAMZ,aAAa,CAAU;CACvB;AArED,wCAqEC;AAhEA;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;4CACD;A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EAAC,GAAG,CAAC;;kDACK;AAKpB;IAHC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IAClE,IAAA,4BAAU,GAAE;IACZ,IAAA,8BAAY,GAAE;;4CACD;AAKd;IAHC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAChE,IAAA,4BAAU,GAAE;IACZ,IAAA,8BAAY,GAAE;;0CACH;AAMZ;IAJC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAChE,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,EAAE,CAAC;;qDACS;AAGxB,MAAa,mBAAoB,SAAQ,cAAc;IAItD,MAAM,GAAoB,MAAM,CAAC;CACjC;AALD,kDAKC;AADA;IAHC,IAAA,6BAAmB,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAC/D,IAAA,4BAAU,GAAE;IACZ,IAAA,sBAAI,EAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;;mDACW;AAGlC,MAAa,iBAAiB;IAG7B,SAAS,CAAW;CACpB;AAJD,8CAIC;AADA;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;IAC7E,IAAA,2BAAS,GAAE;;oDACQ"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type AuditActorType = 'USER' | 'ADMIN' | 'SYSTEM' | 'SERVICE';
|
|
2
|
+
export type AuditStatus = 'SUCCESS' | 'FAILURE';
|
|
3
|
+
/**
|
|
4
|
+
* Append-only compliance / security audit trail (range-partitioned by created_at).
|
|
5
|
+
* Mutating rows is blocked in Postgres except via SECURITY DEFINER helpers.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AuditEvent {
|
|
8
|
+
id: string;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
actorType: AuditActorType;
|
|
11
|
+
actorId?: string | null;
|
|
12
|
+
/** Dot-namespaced action, e.g. `auth.login.completed`, `user.deactivate`. */
|
|
13
|
+
action: string;
|
|
14
|
+
resourceType?: string | null;
|
|
15
|
+
/** Opaque resource id (UUID or domain key, e.g. setting key). */
|
|
16
|
+
resourceId?: string | null;
|
|
17
|
+
status: AuditStatus;
|
|
18
|
+
/** Redacted context (diffs, method, reason). Never store secrets/OTP/tokens. */
|
|
19
|
+
metadata?: Record<string, unknown> | null;
|
|
20
|
+
ipAddress?: string | null;
|
|
21
|
+
deviceInfo?: string | null;
|
|
22
|
+
requestId?: string | null;
|
|
23
|
+
correlationId?: string | null;
|
|
24
|
+
traceId?: string | null;
|
|
25
|
+
/** Monotonic hash-chain sequence (assigned under advisory lock). */
|
|
26
|
+
chainSeq: string;
|
|
27
|
+
/** SHA-256 hex of canonical event payload + prevHash. */
|
|
28
|
+
eventHash?: string | null;
|
|
29
|
+
prevHash?: string | null;
|
|
30
|
+
/** When true, archive retention must not delete this row. */
|
|
31
|
+
legalHold: boolean;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=audit-event.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-event.entity.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/entities/audit-event.entity.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AACrE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAEhD;;;GAGG;AACH,qBACa,UAAU;IAEtB,EAAE,EAAG,MAAM,CAAC;IAGZ,SAAS,EAAG,IAAI,CAAC;IAIjB,SAAS,EAAG,cAAc,CAAC;IAI3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,6EAA6E;IAG7E,MAAM,EAAG,MAAM,CAAC;IAGhB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,iEAAiE;IAGjE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,MAAM,EAAG,WAAW,CAAC;IAErB,gFAAgF;IAEhF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAG1C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI1B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG9B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,oEAAoE;IAEpE,QAAQ,EAAG,MAAM,CAAC;IAElB,yDAAyD;IAEzD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,6DAA6D;IAE7D,SAAS,EAAG,OAAO,CAAC;CACpB"}
|