@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
|
@@ -20,6 +20,9 @@ const typeorm_2 = require("typeorm");
|
|
|
20
20
|
const decorators_1 = require("../../../common/decorators");
|
|
21
21
|
const auth_guard_1 = require("../../../common/guards/auth.guard");
|
|
22
22
|
const permissions_guard_1 = require("../../../common/guards/permissions.guard");
|
|
23
|
+
const redis_module_1 = require("../../../config/redis.module");
|
|
24
|
+
const audit_actions_1 = require("../../audit/constants/audit-actions");
|
|
25
|
+
const audit_service_1 = require("../../audit/services/audit.service");
|
|
23
26
|
const delivery_1 = require("../../delivery");
|
|
24
27
|
const notification_delivery_log_dto_1 = require("../../delivery/dto/notification-delivery-log.dto");
|
|
25
28
|
const notifications_manifest_1 = require("../../notifications/notifications.manifest");
|
|
@@ -28,46 +31,68 @@ const refresh_token_entity_1 = require("../../sessions/entities/refresh-token.en
|
|
|
28
31
|
const users_service_1 = require("../../users/services/users.service");
|
|
29
32
|
const admin_log_dto_1 = require("../dto/admin-log.dto");
|
|
30
33
|
const admin_log_service_1 = require("../services/admin-log.service");
|
|
34
|
+
const DASHBOARD_CACHE_KEY = 'admin:dashboard:stats';
|
|
35
|
+
const DASHBOARD_CACHE_TTL_SEC = 60;
|
|
31
36
|
let AdminController = class AdminController {
|
|
32
37
|
usersService;
|
|
33
38
|
adminLogService;
|
|
34
39
|
notificationAudit;
|
|
35
40
|
notificationDelivery;
|
|
36
41
|
notificationsService;
|
|
42
|
+
audit;
|
|
43
|
+
dataSource;
|
|
37
44
|
refreshTokenRepo;
|
|
38
|
-
|
|
45
|
+
redis;
|
|
46
|
+
constructor(usersService, adminLogService, notificationAudit, notificationDelivery, notificationsService, audit, dataSource, refreshTokenRepo, redis) {
|
|
39
47
|
this.usersService = usersService;
|
|
40
48
|
this.adminLogService = adminLogService;
|
|
41
49
|
this.notificationAudit = notificationAudit;
|
|
42
50
|
this.notificationDelivery = notificationDelivery;
|
|
43
51
|
this.notificationsService = notificationsService;
|
|
52
|
+
this.audit = audit;
|
|
53
|
+
this.dataSource = dataSource;
|
|
44
54
|
this.refreshTokenRepo = refreshTokenRepo;
|
|
55
|
+
this.redis = redis;
|
|
45
56
|
}
|
|
46
57
|
// ─── Dashboard ────────────────────────────────────────────────────────────
|
|
47
58
|
async getDashboard() {
|
|
48
|
-
const
|
|
59
|
+
const cached = await this.redis.get(DASHBOARD_CACHE_KEY).catch(() => null);
|
|
60
|
+
if (cached) {
|
|
61
|
+
try {
|
|
62
|
+
return JSON.parse(cached);
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
/* fall through */
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const now = new Date();
|
|
69
|
+
const [userStats, activeSessions, notificationDelivery, newToday] = await Promise.all([
|
|
49
70
|
this.usersService.getStats(),
|
|
50
71
|
this.refreshTokenRepo.count({
|
|
51
|
-
where: { isRevoked: false },
|
|
72
|
+
where: { isRevoked: false, expiresAt: (0, typeorm_2.MoreThan)(now) },
|
|
52
73
|
}),
|
|
53
74
|
this.notificationAudit.getStats(),
|
|
75
|
+
this.usersService.countCreatedToday(),
|
|
54
76
|
]);
|
|
55
|
-
const
|
|
56
|
-
return {
|
|
77
|
+
const payload = {
|
|
57
78
|
users: {
|
|
58
79
|
total: userStats.total,
|
|
59
80
|
active: userStats.active,
|
|
60
81
|
invited: userStats.invited,
|
|
61
82
|
suspended: userStats.suspended,
|
|
62
|
-
newToday
|
|
83
|
+
newToday,
|
|
63
84
|
},
|
|
64
85
|
activeSessions,
|
|
65
86
|
notificationDelivery,
|
|
66
87
|
systemHealth: {
|
|
67
88
|
status: 'ok',
|
|
68
|
-
uptimeSeconds: Math.floor(
|
|
89
|
+
uptimeSeconds: Math.floor(process.uptime()),
|
|
69
90
|
},
|
|
70
91
|
};
|
|
92
|
+
await this.redis
|
|
93
|
+
.set(DASHBOARD_CACHE_KEY, JSON.stringify(payload), 'EX', DASHBOARD_CACHE_TTL_SEC)
|
|
94
|
+
.catch(() => undefined);
|
|
95
|
+
return payload;
|
|
71
96
|
}
|
|
72
97
|
// ─── Activity Logs ────────────────────────────────────────────────────────
|
|
73
98
|
async getLogs(filter) {
|
|
@@ -77,8 +102,19 @@ let AdminController = class AdminController {
|
|
|
77
102
|
async getNotificationDeliveries(filter) {
|
|
78
103
|
return this.notificationAudit.findAll(filter);
|
|
79
104
|
}
|
|
80
|
-
async retryNotificationDelivery(id) {
|
|
105
|
+
async retryNotificationDelivery(id, actor) {
|
|
81
106
|
const log = await this.notificationDelivery.retryDelivery(id);
|
|
107
|
+
this.adminLogService.log({
|
|
108
|
+
actorId: actor.id,
|
|
109
|
+
action: audit_actions_1.AUDIT_ACTIONS.NOTIFICATION_RETRY,
|
|
110
|
+
targetType: 'notification_delivery',
|
|
111
|
+
targetId: log.id,
|
|
112
|
+
metadata: {
|
|
113
|
+
channel: log.channel,
|
|
114
|
+
idempotencyKey: log.idempotencyKey,
|
|
115
|
+
jobName: log.jobName,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
82
118
|
return {
|
|
83
119
|
message: 'Delivery retry queued',
|
|
84
120
|
id: log.id,
|
|
@@ -86,8 +122,24 @@ let AdminController = class AdminController {
|
|
|
86
122
|
status: log.status,
|
|
87
123
|
};
|
|
88
124
|
}
|
|
89
|
-
async sendNotification(dto) {
|
|
90
|
-
const notification = await this.
|
|
125
|
+
async sendNotification(actor, dto) {
|
|
126
|
+
const notification = await this.dataSource.transaction(async (manager) => {
|
|
127
|
+
const row = await this.notificationsService.sendNotification(dto, manager);
|
|
128
|
+
await this.audit.recordInTransaction(manager, {
|
|
129
|
+
action: audit_actions_1.AUDIT_ACTIONS.NOTIFICATION_SENT,
|
|
130
|
+
actorType: 'ADMIN',
|
|
131
|
+
actorId: actor.id,
|
|
132
|
+
resourceType: 'notification',
|
|
133
|
+
resourceId: row.id,
|
|
134
|
+
metadata: {
|
|
135
|
+
userId: dto.userId,
|
|
136
|
+
eventType: dto.eventType,
|
|
137
|
+
channel: dto.channel ?? null,
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
return row;
|
|
141
|
+
});
|
|
142
|
+
await this.notificationsService.enqueuePushIfNeeded(dto, notification);
|
|
91
143
|
return {
|
|
92
144
|
message: 'Notification sent',
|
|
93
145
|
id: notification.id,
|
|
@@ -100,7 +152,7 @@ __decorate([
|
|
|
100
152
|
(0, decorators_1.RequirePermission)('users:read'),
|
|
101
153
|
(0, swagger_1.ApiOperation)({
|
|
102
154
|
summary: 'Dashboard stats',
|
|
103
|
-
description: 'Returns aggregated system stats for the admin dashboard.',
|
|
155
|
+
description: 'Returns aggregated system stats for the admin dashboard (cached ~60s to avoid full-table scans on poll).',
|
|
104
156
|
}),
|
|
105
157
|
__metadata("design:type", Function),
|
|
106
158
|
__metadata("design:paramtypes", []),
|
|
@@ -111,7 +163,7 @@ __decorate([
|
|
|
111
163
|
(0, decorators_1.RequirePermission)('users:read'),
|
|
112
164
|
(0, swagger_1.ApiOperation)({
|
|
113
165
|
summary: 'Admin activity logs',
|
|
114
|
-
description: '
|
|
166
|
+
description: 'Paginated admin actions from the shared audit trail (actorType=ADMIN). Prefer GET /audit/events for the full trail.',
|
|
115
167
|
}),
|
|
116
168
|
(0, swagger_1.ApiQuery)({ name: 'page', required: false, type: Number }),
|
|
117
169
|
(0, swagger_1.ApiQuery)({ name: 'limit', required: false, type: Number }),
|
|
@@ -165,8 +217,9 @@ __decorate([
|
|
|
165
217
|
description: 'Re-enqueues a failed email, SMS, or push delivery using the stored payload snapshot. OTP deliveries cannot be retried.',
|
|
166
218
|
}),
|
|
167
219
|
__param(0, (0, common_1.Param)('id')),
|
|
220
|
+
__param(1, (0, decorators_1.CurrentUser)()),
|
|
168
221
|
__metadata("design:type", Function),
|
|
169
|
-
__metadata("design:paramtypes", [String]),
|
|
222
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
170
223
|
__metadata("design:returntype", Promise)
|
|
171
224
|
], AdminController.prototype, "retryNotificationDelivery", null);
|
|
172
225
|
__decorate([
|
|
@@ -177,9 +230,10 @@ __decorate([
|
|
|
177
230
|
summary: 'Send in-app / push notification',
|
|
178
231
|
description: 'Creates a notification record and optionally enqueues push delivery.',
|
|
179
232
|
}),
|
|
180
|
-
__param(0, (0,
|
|
233
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
234
|
+
__param(1, (0, common_1.Body)()),
|
|
181
235
|
__metadata("design:type", Function),
|
|
182
|
-
__metadata("design:paramtypes", [Object]),
|
|
236
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
183
237
|
__metadata("design:returntype", Promise)
|
|
184
238
|
], AdminController.prototype, "sendNotification", null);
|
|
185
239
|
exports.AdminController = AdminController = __decorate([
|
|
@@ -187,12 +241,15 @@ exports.AdminController = AdminController = __decorate([
|
|
|
187
241
|
(0, swagger_1.ApiBearerAuth)(),
|
|
188
242
|
(0, common_1.Controller)('admin'),
|
|
189
243
|
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard, permissions_guard_1.PermissionsGuard),
|
|
190
|
-
__param(
|
|
244
|
+
__param(7, (0, typeorm_1.InjectRepository)(refresh_token_entity_1.RefreshToken)),
|
|
245
|
+
__param(8, (0, common_1.Inject)(redis_module_1.REDIS_CLIENT)),
|
|
191
246
|
__metadata("design:paramtypes", [users_service_1.UsersService,
|
|
192
247
|
admin_log_service_1.AdminLogService,
|
|
193
248
|
delivery_1.NotificationAuditService,
|
|
194
249
|
delivery_1.NotificationDeliveryService,
|
|
195
250
|
notifications_service_1.NotificationsService,
|
|
196
|
-
|
|
251
|
+
audit_service_1.AuditService,
|
|
252
|
+
typeorm_2.DataSource,
|
|
253
|
+
typeorm_2.Repository, Function])
|
|
197
254
|
], AdminController);
|
|
198
255
|
//# sourceMappingURL=admin.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.controller.js","sourceRoot":"","sources":["../../../../src/modules/admin/controllers/admin.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"admin.controller.js","sourceRoot":"","sources":["../../../../src/modules/admin/controllers/admin.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,6CAAiF;AACjF,6CAAmD;AAEnD,qCAA2D;AAE3D,2DAA4E;AAC5E,kEAAiE;AACjE,gFAA4E;AAE5E,+DAA4D;AAC5D,uEAAoE;AACpE,sEAAkE;AAClE,6CAAuF;AACvF,oGAAoG;AAEpG,uFAAuF;AACvF,8FAA0F;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AmC,CAAC;IACzC,IAAA,iBAAQ,EAAC,mBAAU,CAAC,QAAQ,CAAC;IAC7B,IAAA,8BAAiB,EAAC,kDAAyB,CAAC,KAAK,CAAC;IAClD,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,sCAAsC;QAC/C,WAAW,EACV,wHAAwH;KACzH,CAAC;IAC+B,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,wBAAW,GAAE,CAAA;;;;gEAmBtE;AASK;IAPL,IAAA,aAAI,EAAC,eAAe,CAAC;IACrB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,OAAO,CAAC;IAC5B,IAAA,8BAAiB,EAAC,kDAAyB,CAAC,MAAM,CAAC;IACnD,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,iCAAiC;QAC1C,WAAW,EAAE,sEAAsE;KACnF,CAAC;IACsB,WAAA,IAAA,wBAAW,GAAE,CAAA;IAAsB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;uDAsBhE;0BAhLW,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;IAUvC,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;qCATU,4BAAY;QACT,mCAAe;QACb,mCAAwB;QACrB,sCAA2B;QAC3B,4CAAoB;QACnC,4BAAY;QACP,oBAAU;QAEJ,oBAAU;GAVlC,eAAe,CAiL3B"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { EntityManager } from 'typeorm';
|
|
2
|
+
import type { AuditListResult } from '../../audit/dto/audit.dto';
|
|
3
|
+
import type { AuditEvent } from '../../audit/entities/audit-event.entity';
|
|
4
|
+
import { AuditService } from '../../audit/services/audit.service';
|
|
3
5
|
import { AdminLogFilterDto, CreateAdminLogDto } from '../dto/admin-log.dto';
|
|
4
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Backward-compatible facade over {@link AuditService} for admin actor actions.
|
|
8
|
+
* Prefer injecting AuditService directly in new code.
|
|
9
|
+
*/
|
|
5
10
|
export declare class AdminLogService {
|
|
6
|
-
private readonly
|
|
7
|
-
constructor(
|
|
8
|
-
/**
|
|
11
|
+
private readonly audit;
|
|
12
|
+
constructor(audit: AuditService);
|
|
13
|
+
/** Enqueue admin action onto the audit trail (outbox → seal). */
|
|
9
14
|
log(dto: CreateAdminLogDto): void;
|
|
10
|
-
|
|
15
|
+
/** Critical-path: seal inside the caller's DB transaction. */
|
|
16
|
+
logInTransaction(manager: EntityManager, dto: CreateAdminLogDto): Promise<AuditEvent>;
|
|
17
|
+
findAll(filter: AdminLogFilterDto): Promise<AuditListResult>;
|
|
11
18
|
}
|
|
12
19
|
//# sourceMappingURL=admin-log.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-log.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/admin/services/admin-log.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-log.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/admin/services/admin-log.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE5E;;;GAGG;AACH,qBACa,eAAe;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,YAAY;IAEhD,iEAAiE;IACjE,GAAG,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;IAYjC,8DAA8D;IACxD,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;IAYrF,OAAO,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;CAYlE"}
|
|
@@ -8,56 +8,59 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.AdminLogService = void 0;
|
|
16
13
|
const common_1 = require("@nestjs/common");
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
const audit_service_1 = require("../../audit/services/audit.service");
|
|
15
|
+
/**
|
|
16
|
+
* Backward-compatible facade over {@link AuditService} for admin actor actions.
|
|
17
|
+
* Prefer injecting AuditService directly in new code.
|
|
18
|
+
*/
|
|
20
19
|
let AdminLogService = class AdminLogService {
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
this.
|
|
20
|
+
audit;
|
|
21
|
+
constructor(audit) {
|
|
22
|
+
this.audit = audit;
|
|
24
23
|
}
|
|
25
|
-
/**
|
|
24
|
+
/** Enqueue admin action onto the audit trail (outbox → seal). */
|
|
26
25
|
log(dto) {
|
|
27
|
-
this.
|
|
26
|
+
this.audit.record({
|
|
27
|
+
action: dto.action,
|
|
28
|
+
actorType: 'ADMIN',
|
|
29
|
+
actorId: dto.actorId,
|
|
30
|
+
resourceType: dto.targetType,
|
|
31
|
+
resourceId: dto.targetId,
|
|
32
|
+
metadata: dto.metadata,
|
|
33
|
+
ipAddress: dto.ipAddress,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/** Critical-path: seal inside the caller's DB transaction. */
|
|
37
|
+
async logInTransaction(manager, dto) {
|
|
38
|
+
return this.audit.recordInTransaction(manager, {
|
|
39
|
+
action: dto.action,
|
|
40
|
+
actorType: 'ADMIN',
|
|
41
|
+
actorId: dto.actorId,
|
|
42
|
+
resourceType: dto.targetType,
|
|
43
|
+
resourceId: dto.targetId,
|
|
44
|
+
metadata: dto.metadata,
|
|
45
|
+
ipAddress: dto.ipAddress,
|
|
46
|
+
});
|
|
28
47
|
}
|
|
29
48
|
async findAll(filter) {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
.
|
|
36
|
-
.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
.orderBy('log.createdAt', 'DESC');
|
|
41
|
-
if (filter.actorId) {
|
|
42
|
-
qb.andWhere('log.actorId = :actorId', { actorId: filter.actorId });
|
|
43
|
-
}
|
|
44
|
-
if (filter.action) {
|
|
45
|
-
qb.andWhere('log.action LIKE :action', { action: `%${filter.action}%` });
|
|
46
|
-
}
|
|
47
|
-
if (filter.from) {
|
|
48
|
-
qb.andWhere('log.createdAt >= :from', { from: new Date(filter.from) });
|
|
49
|
-
}
|
|
50
|
-
if (filter.to) {
|
|
51
|
-
qb.andWhere('log.createdAt <= :to', { to: new Date(filter.to) });
|
|
52
|
-
}
|
|
53
|
-
const [data, total] = await qb.getManyAndCount();
|
|
54
|
-
return { data, total, page, limit, totalPages: Math.ceil(total / limit) };
|
|
49
|
+
const auditFilter = {
|
|
50
|
+
page: filter.page,
|
|
51
|
+
limit: filter.limit,
|
|
52
|
+
actorId: filter.actorId,
|
|
53
|
+
actorType: 'ADMIN',
|
|
54
|
+
action: filter.action,
|
|
55
|
+
from: filter.from,
|
|
56
|
+
to: filter.to,
|
|
57
|
+
};
|
|
58
|
+
return this.audit.findAll(auditFilter);
|
|
55
59
|
}
|
|
56
60
|
};
|
|
57
61
|
exports.AdminLogService = AdminLogService;
|
|
58
62
|
exports.AdminLogService = AdminLogService = __decorate([
|
|
59
63
|
(0, common_1.Injectable)(),
|
|
60
|
-
|
|
61
|
-
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
64
|
+
__metadata("design:paramtypes", [audit_service_1.AuditService])
|
|
62
65
|
], AdminLogService);
|
|
63
66
|
//# sourceMappingURL=admin-log.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-log.service.js","sourceRoot":"","sources":["../../../../src/modules/admin/services/admin-log.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-log.service.js","sourceRoot":"","sources":["../../../../src/modules/admin/services/admin-log.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAM5C,sEAAkE;AAGlE;;;GAGG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAe;IACE;IAA7B,YAA6B,KAAmB;QAAnB,UAAK,GAAL,KAAK,CAAc;IAAG,CAAC;IAEpD,iEAAiE;IACjE,GAAG,CAAC,GAAsB;QACzB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;YACjB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,SAAS,EAAE,OAAO;YAClB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,YAAY,EAAE,GAAG,CAAC,UAAU;YAC5B,UAAU,EAAE,GAAG,CAAC,QAAQ;YACxB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,SAAS,EAAE,GAAG,CAAC,SAAS;SACxB,CAAC,CAAC;IACJ,CAAC;IAED,8DAA8D;IAC9D,KAAK,CAAC,gBAAgB,CAAC,OAAsB,EAAE,GAAsB;QACpE,OAAO,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,OAAO,EAAE;YAC9C,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,SAAS,EAAE,OAAO;YAClB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,YAAY,EAAE,GAAG,CAAC,UAAU;YAC5B,UAAU,EAAE,GAAG,CAAC,QAAQ;YACxB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,SAAS,EAAE,GAAG,CAAC,SAAS;SACxB,CAAC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAyB;QACtC,MAAM,WAAW,GAAmB;YACnC,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,SAAS,EAAE,OAAO;YAClB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,EAAE,EAAE,MAAM,CAAC,EAAE;SACb,CAAC;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC;CACD,CAAA;AAzCY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAEwB,4BAAY;GADpC,eAAe,CAyC3B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ModuleManifest } from '../roles/types/manifest.types';
|
|
2
|
+
export declare const AUDIT_PERMISSIONS: {
|
|
3
|
+
readonly READ: "audit:read";
|
|
4
|
+
readonly EXPORT: "audit:export";
|
|
5
|
+
readonly MANAGE: "audit:manage";
|
|
6
|
+
};
|
|
7
|
+
export declare const manifest: ModuleManifest;
|
|
8
|
+
//# sourceMappingURL=audit.manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.manifest.d.ts","sourceRoot":"","sources":["../../../src/modules/audit/audit.manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAEX,eAAO,MAAM,QAAQ,EAAE,cAqBtB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.manifest = exports.AUDIT_PERMISSIONS = void 0;
|
|
4
|
+
exports.AUDIT_PERMISSIONS = {
|
|
5
|
+
READ: 'audit:read',
|
|
6
|
+
EXPORT: 'audit:export',
|
|
7
|
+
MANAGE: 'audit:manage',
|
|
8
|
+
};
|
|
9
|
+
exports.manifest = {
|
|
10
|
+
slug: 'audit',
|
|
11
|
+
name: 'Audit Trail',
|
|
12
|
+
description: 'Compliance and security audit event query, export, and retention controls',
|
|
13
|
+
permissions: [
|
|
14
|
+
{
|
|
15
|
+
slug: exports.AUDIT_PERMISSIONS.READ,
|
|
16
|
+
name: 'View audit events',
|
|
17
|
+
description: 'List and filter persisted audit trail events',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
slug: exports.AUDIT_PERMISSIONS.EXPORT,
|
|
21
|
+
name: 'Export audit events',
|
|
22
|
+
description: 'Download CSV/JSON compliance exports of audit events',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
slug: exports.AUDIT_PERMISSIONS.MANAGE,
|
|
26
|
+
name: 'Manage audit controls',
|
|
27
|
+
description: 'Verify hash chain and set legal hold on audit events',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=audit.manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.manifest.js","sourceRoot":"","sources":["../../../src/modules/audit/audit.manifest.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAG;IAChC,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,cAAc;CACb,CAAC;AAEE,QAAA,QAAQ,GAAmB;IACvC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,2EAA2E;IACxF,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,yBAAiB,CAAC,IAAI;YAC5B,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,8CAA8C;SAC3D;QACD;YACC,IAAI,EAAE,yBAAiB,CAAC,MAAM;YAC9B,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,sDAAsD;SACnE;QACD;YACC,IAAI,EAAE,yBAAiB,CAAC,MAAM;YAC9B,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EAAE,sDAAsD;SACnE;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global append-only audit trail. Inject {@link AuditService} from any module
|
|
3
|
+
* or host app to record compliance / security events. Use `@Audit()` for
|
|
4
|
+
* declarative handler instrumentation.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AuditModule {
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=audit.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.module.d.ts","sourceRoot":"","sources":["../../../src/modules/audit/audit.module.ts"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,qBAqBa,WAAW;CAAG"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AuditModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const core_1 = require("@nestjs/core");
|
|
12
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
13
|
+
const file_upload_module_1 = require("../file-upload/file-upload.module");
|
|
14
|
+
const audit_controller_1 = require("./controllers/audit.controller");
|
|
15
|
+
const audit_event_entity_1 = require("./entities/audit-event.entity");
|
|
16
|
+
const audit_outbox_entity_1 = require("./entities/audit-outbox.entity");
|
|
17
|
+
const audit_interceptor_1 = require("./interceptors/audit.interceptor");
|
|
18
|
+
const auth_audit_listener_1 = require("./listeners/auth-audit.listener");
|
|
19
|
+
const audit_service_1 = require("./services/audit.service");
|
|
20
|
+
const audit_archive_service_1 = require("./services/audit-archive.service");
|
|
21
|
+
const audit_hash_backfill_service_1 = require("./services/audit-hash-backfill.service");
|
|
22
|
+
const audit_leader_service_1 = require("./services/audit-leader.service");
|
|
23
|
+
const audit_outbox_worker_1 = require("./services/audit-outbox.worker");
|
|
24
|
+
const audit_partition_service_1 = require("./services/audit-partition.service");
|
|
25
|
+
const audit_write_service_1 = require("./services/audit-write.service");
|
|
26
|
+
/**
|
|
27
|
+
* Global append-only audit trail. Inject {@link AuditService} from any module
|
|
28
|
+
* or host app to record compliance / security events. Use `@Audit()` for
|
|
29
|
+
* declarative handler instrumentation.
|
|
30
|
+
*/
|
|
31
|
+
let AuditModule = class AuditModule {
|
|
32
|
+
};
|
|
33
|
+
exports.AuditModule = AuditModule;
|
|
34
|
+
exports.AuditModule = AuditModule = __decorate([
|
|
35
|
+
(0, common_1.Global)(),
|
|
36
|
+
(0, common_1.Module)({
|
|
37
|
+
imports: [
|
|
38
|
+
typeorm_1.TypeOrmModule.forFeature([audit_event_entity_1.AuditEvent, audit_outbox_entity_1.AuditOutbox]),
|
|
39
|
+
(0, common_1.forwardRef)(() => file_upload_module_1.FileUploadModule),
|
|
40
|
+
],
|
|
41
|
+
controllers: [audit_controller_1.AuditController],
|
|
42
|
+
providers: [
|
|
43
|
+
audit_leader_service_1.AuditLeaderService,
|
|
44
|
+
audit_write_service_1.AuditWriteService,
|
|
45
|
+
audit_outbox_worker_1.AuditOutboxWorker,
|
|
46
|
+
audit_service_1.AuditService,
|
|
47
|
+
audit_archive_service_1.AuditArchiveService,
|
|
48
|
+
audit_partition_service_1.AuditPartitionService,
|
|
49
|
+
audit_hash_backfill_service_1.AuditHashBackfillService,
|
|
50
|
+
auth_audit_listener_1.AuthAuditListener,
|
|
51
|
+
audit_interceptor_1.AuditInterceptor,
|
|
52
|
+
{ provide: core_1.APP_INTERCEPTOR, useExisting: audit_interceptor_1.AuditInterceptor },
|
|
53
|
+
],
|
|
54
|
+
exports: [audit_service_1.AuditService, audit_write_service_1.AuditWriteService],
|
|
55
|
+
})
|
|
56
|
+
], AuditModule);
|
|
57
|
+
//# sourceMappingURL=audit.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.module.js","sourceRoot":"","sources":["../../../src/modules/audit/audit.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4D;AAC5D,uCAA+C;AAC/C,6CAAgD;AAEhD,0EAAqE;AACrE,qEAAiE;AACjE,sEAA2D;AAC3D,wEAA6D;AAC7D,wEAAoE;AACpE,yEAAoE;AACpE,4DAAwD;AACxD,4EAAuE;AACvE,wFAAkF;AAClF,0EAAqE;AACrE,wEAAmE;AACnE,gFAA2E;AAC3E,wEAAmE;AAEnE;;;;GAIG;AAsBI,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IArBvB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACP,OAAO,EAAE;YACR,uBAAa,CAAC,UAAU,CAAC,CAAC,+BAAU,EAAE,iCAAW,CAAC,CAAC;YACnD,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qCAAgB,CAAC;SAClC;QACD,WAAW,EAAE,CAAC,kCAAe,CAAC;QAC9B,SAAS,EAAE;YACV,yCAAkB;YAClB,uCAAiB;YACjB,uCAAiB;YACjB,4BAAY;YACZ,2CAAmB;YACnB,+CAAqB;YACrB,sDAAwB;YACxB,uCAAiB;YACjB,oCAAgB;YAChB,EAAE,OAAO,EAAE,sBAAe,EAAE,WAAW,EAAE,oCAAgB,EAAE;SAC3D;QACD,OAAO,EAAE,CAAC,4BAAY,EAAE,uCAAiB,CAAC;KAC1C,CAAC;GACW,WAAW,CAAG"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Well-known audit action slugs. Host apps may pass any string to
|
|
3
|
+
* {@link AuditService.record}; prefer namespaced dots (`domain.verb`).
|
|
4
|
+
*/
|
|
5
|
+
export declare const AUDIT_ACTIONS: {
|
|
6
|
+
readonly LOGIN_COMPLETED: "auth.login.completed";
|
|
7
|
+
readonly REGISTRATION_COMPLETED: "auth.registration.completed";
|
|
8
|
+
readonly LOGOUT: "auth.logout";
|
|
9
|
+
readonly LOGOUT_ALL: "auth.logout.all";
|
|
10
|
+
readonly OAUTH_LINKED: "auth.oauth.linked";
|
|
11
|
+
readonly OAUTH_UNLINKED: "auth.oauth.unlinked";
|
|
12
|
+
readonly MFA_ENABLED: "auth.mfa.enabled";
|
|
13
|
+
readonly MFA_DISABLED: "auth.mfa.disabled";
|
|
14
|
+
readonly MFA_BACKUP_CODES_REGENERATED: "auth.mfa.backup_codes_regenerated";
|
|
15
|
+
readonly MFA_STEP_UP: "auth.mfa.step_up";
|
|
16
|
+
readonly EMAIL_CHANGED: "auth.email.changed";
|
|
17
|
+
readonly PHONE_CHANGED: "auth.phone.changed";
|
|
18
|
+
readonly PASSWORD_CHANGED: "auth.password.changed";
|
|
19
|
+
readonly PASSWORD_RESET: "auth.password.reset";
|
|
20
|
+
readonly ACCOUNT_DELETE_REQUESTED: "auth.account.delete_requested";
|
|
21
|
+
readonly ACCOUNT_DELETED: "auth.account.deleted";
|
|
22
|
+
readonly EMAIL_VERIFIED: "auth.email.verified";
|
|
23
|
+
readonly PHONE_VERIFIED: "auth.phone.verified";
|
|
24
|
+
readonly SESSIONS_REVOKE_OTHERS: "auth.sessions.revoke_others";
|
|
25
|
+
readonly SESSION_REVOKED: "auth.session.revoked";
|
|
26
|
+
readonly SESSION_REUSE_DETECTED: "auth.session.reuse_detected";
|
|
27
|
+
readonly SESSION_DPOP_MISMATCH: "auth.session.dpop_mismatch";
|
|
28
|
+
readonly SESSION_DPOP_UNBOUND: "auth.session.dpop_unbound";
|
|
29
|
+
readonly LOGIN_FAILED: "auth.login.failed";
|
|
30
|
+
readonly LOGIN_LOCKED: "auth.login.locked";
|
|
31
|
+
readonly PASSWORD_FORGOT_INITIATED: "auth.password.forgot_initiated";
|
|
32
|
+
readonly PIN_SET: "auth.pin.set";
|
|
33
|
+
readonly PIN_CHANGED: "auth.pin.changed";
|
|
34
|
+
readonly PIN_REMOVED: "auth.pin.removed";
|
|
35
|
+
readonly PIN_VERIFIED: "auth.pin.verified";
|
|
36
|
+
readonly PIN_FAILED: "auth.pin.failed";
|
|
37
|
+
readonly PIN_LOCKED: "auth.pin.locked";
|
|
38
|
+
readonly MFA_SETUP_STARTED: "auth.mfa.setup_started";
|
|
39
|
+
readonly MFA_VERIFY_FAILED: "auth.mfa.verify_failed";
|
|
40
|
+
readonly MFA_LOCKED: "auth.mfa.locked";
|
|
41
|
+
readonly OTP_VERIFIED: "otp.verified";
|
|
42
|
+
readonly OTP_FAILED: "otp.failed";
|
|
43
|
+
readonly OTP_LOCKED_OUT: "otp.locked_out";
|
|
44
|
+
readonly USER_CREATE: "user.create";
|
|
45
|
+
readonly USER_UPDATE: "user.update";
|
|
46
|
+
readonly USER_DELETE: "user.delete";
|
|
47
|
+
readonly USER_DEACTIVATE: "user.deactivate";
|
|
48
|
+
readonly USER_ACTIVATE: "user.activate";
|
|
49
|
+
readonly PROFILE_UPDATED: "user.profile.updated";
|
|
50
|
+
readonly NOTIFICATION_SENT: "notification.sent";
|
|
51
|
+
readonly NOTIFICATION_RETRY: "notification.delivery.retried";
|
|
52
|
+
readonly DEVICE_REGISTERED: "notification.device.registered";
|
|
53
|
+
readonly DEVICE_REMOVED: "notification.device.removed";
|
|
54
|
+
readonly FILE_UPLOADED: "file.uploaded";
|
|
55
|
+
readonly FILE_REPLACED: "file.replaced";
|
|
56
|
+
readonly FILE_DELETED: "file.deleted";
|
|
57
|
+
readonly AUDIT_LEGAL_HOLD_UPDATED: "audit.legal_hold.updated";
|
|
58
|
+
readonly AUDIT_EXPORT_REQUESTED: "audit.export.requested";
|
|
59
|
+
readonly AUDIT_CHAIN_VERIFY: "audit.chain.verify";
|
|
60
|
+
readonly SETTING_UPDATED: "settings.updated";
|
|
61
|
+
readonly INVITATION_CREATED: "invitation.created";
|
|
62
|
+
readonly INVITATION_ACCEPTED: "invitation.accepted";
|
|
63
|
+
readonly INVITATION_RESENT: "invitation.resent";
|
|
64
|
+
readonly INVITATION_REVOKED: "invitation.revoked";
|
|
65
|
+
readonly ROLE_CREATED: "role.created";
|
|
66
|
+
readonly ROLE_UPDATED: "role.updated";
|
|
67
|
+
readonly ROLE_DELETED: "role.deleted";
|
|
68
|
+
readonly ROLE_PERMISSIONS_ASSIGNED: "role.permissions.assigned";
|
|
69
|
+
readonly USER_ROLES_ASSIGNED: "user.roles.assigned";
|
|
70
|
+
readonly USER_ROLES_REMOVED: "user.roles.removed";
|
|
71
|
+
readonly PERMISSION_CREATED: "permission.created";
|
|
72
|
+
readonly PERMISSION_UPDATED: "permission.updated";
|
|
73
|
+
readonly PERMISSION_DELETED: "permission.deleted";
|
|
74
|
+
readonly MODULE_CREATED: "module.created";
|
|
75
|
+
readonly MODULE_UPDATED: "module.updated";
|
|
76
|
+
readonly MODULE_DELETED: "module.deleted";
|
|
77
|
+
};
|
|
78
|
+
export type AuditAction = (typeof AUDIT_ACTIONS)[keyof typeof AUDIT_ACTIONS];
|
|
79
|
+
//# sourceMappingURL=audit-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-actions.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/constants/audit-actions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC"}
|