@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
|
@@ -15,10 +15,23 @@ export declare class InvitationFilterDto {
|
|
|
15
15
|
contextType?: string;
|
|
16
16
|
contextId?: string;
|
|
17
17
|
target?: string;
|
|
18
|
+
page?: number;
|
|
19
|
+
limit?: number;
|
|
18
20
|
}
|
|
19
21
|
export declare class ResolveInvitationDto {
|
|
20
22
|
token: string;
|
|
21
23
|
}
|
|
24
|
+
/** Safe public payload for GET /invitations/resolve (never includes tokenHash). */
|
|
25
|
+
export declare class InvitationPublicDto {
|
|
26
|
+
id: string;
|
|
27
|
+
targetEmail?: string | null;
|
|
28
|
+
targetPhone?: string | null;
|
|
29
|
+
deliveryChannel: InvitationDeliveryChannel;
|
|
30
|
+
contextType?: string | null;
|
|
31
|
+
contextId?: string | null;
|
|
32
|
+
status: InvitationStatus;
|
|
33
|
+
expiresAt: Date;
|
|
34
|
+
}
|
|
22
35
|
export declare class AcceptInvitationDto extends ResolveInvitationDto {
|
|
23
36
|
}
|
|
24
37
|
//# sourceMappingURL=invitation.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation.dto.d.ts","sourceRoot":"","sources":["../../../../src/modules/invitations/dto/invitation.dto.ts"],"names":[],"mappings":"AAkBA,OAAO,EACN,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,MAAM,+BAA+B,CAAC;AAEvC,qBAAa,mBAAmB;IAI/B,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAerB,gBAAgB,EAAG,yBAAyB,CAAC;IAS7C,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,SAAS,CAAC,EAAE,MAAM,CAAC;IAOnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAOnC,aAAa,CAAC,EAAE,MAAM,CAAC;IAQvB,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACpC;AAED,qBAAa,mBAAmB;IAI/B,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAK1B,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"invitation.dto.d.ts","sourceRoot":"","sources":["../../../../src/modules/invitations/dto/invitation.dto.ts"],"names":[],"mappings":"AAkBA,OAAO,EACN,mBA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, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AcceptInvitationDto = exports.ResolveInvitationDto = exports.InvitationFilterDto = exports.CreateInvitationDto = void 0;
|
|
12
|
+
exports.AcceptInvitationDto = exports.InvitationPublicDto = exports.ResolveInvitationDto = exports.InvitationFilterDto = exports.CreateInvitationDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
@@ -109,6 +109,8 @@ class InvitationFilterDto {
|
|
|
109
109
|
contextType;
|
|
110
110
|
contextId;
|
|
111
111
|
target;
|
|
112
|
+
page = 1;
|
|
113
|
+
limit = 20;
|
|
112
114
|
}
|
|
113
115
|
exports.InvitationFilterDto = InvitationFilterDto;
|
|
114
116
|
__decorate([
|
|
@@ -130,11 +132,32 @@ __decorate([
|
|
|
130
132
|
__metadata("design:type", String)
|
|
131
133
|
], InvitationFilterDto.prototype, "contextId", void 0);
|
|
132
134
|
__decorate([
|
|
133
|
-
(0, swagger_1.ApiPropertyOptional)(
|
|
135
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
136
|
+
description: 'Prefix match on email/phone (min 2 chars). Leading wildcards are not used.',
|
|
137
|
+
}),
|
|
134
138
|
(0, class_validator_1.IsOptional)(),
|
|
135
139
|
(0, class_validator_1.IsString)(),
|
|
140
|
+
(0, class_validator_1.MaxLength)(128),
|
|
136
141
|
__metadata("design:type", String)
|
|
137
142
|
], InvitationFilterDto.prototype, "target", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, swagger_1.ApiPropertyOptional)({ default: 1, minimum: 1 }),
|
|
145
|
+
(0, class_validator_1.IsOptional)(),
|
|
146
|
+
(0, class_validator_1.IsInt)(),
|
|
147
|
+
(0, class_validator_1.Min)(1),
|
|
148
|
+
(0, class_validator_1.Max)(50),
|
|
149
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
150
|
+
__metadata("design:type", Number)
|
|
151
|
+
], InvitationFilterDto.prototype, "page", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, swagger_1.ApiPropertyOptional)({ default: 20, minimum: 1, maximum: 100 }),
|
|
154
|
+
(0, class_validator_1.IsOptional)(),
|
|
155
|
+
(0, class_validator_1.IsInt)(),
|
|
156
|
+
(0, class_validator_1.Min)(1),
|
|
157
|
+
(0, class_validator_1.Max)(100),
|
|
158
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
159
|
+
__metadata("design:type", Number)
|
|
160
|
+
], InvitationFilterDto.prototype, "limit", void 0);
|
|
138
161
|
class ResolveInvitationDto {
|
|
139
162
|
token;
|
|
140
163
|
}
|
|
@@ -144,6 +167,50 @@ __decorate([
|
|
|
144
167
|
(0, class_validator_1.IsString)(),
|
|
145
168
|
__metadata("design:type", String)
|
|
146
169
|
], ResolveInvitationDto.prototype, "token", void 0);
|
|
170
|
+
/** Safe public payload for GET /invitations/resolve (never includes tokenHash). */
|
|
171
|
+
class InvitationPublicDto {
|
|
172
|
+
id;
|
|
173
|
+
targetEmail;
|
|
174
|
+
targetPhone;
|
|
175
|
+
deliveryChannel;
|
|
176
|
+
contextType;
|
|
177
|
+
contextId;
|
|
178
|
+
status;
|
|
179
|
+
expiresAt;
|
|
180
|
+
}
|
|
181
|
+
exports.InvitationPublicDto = InvitationPublicDto;
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, swagger_1.ApiProperty)(),
|
|
184
|
+
__metadata("design:type", String)
|
|
185
|
+
], InvitationPublicDto.prototype, "id", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
188
|
+
__metadata("design:type", Object)
|
|
189
|
+
], InvitationPublicDto.prototype, "targetEmail", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
192
|
+
__metadata("design:type", Object)
|
|
193
|
+
], InvitationPublicDto.prototype, "targetPhone", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, swagger_1.ApiProperty)({ enum: invitation_entity_1.InvitationDeliveryChannel }),
|
|
196
|
+
__metadata("design:type", String)
|
|
197
|
+
], InvitationPublicDto.prototype, "deliveryChannel", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
200
|
+
__metadata("design:type", Object)
|
|
201
|
+
], InvitationPublicDto.prototype, "contextType", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
204
|
+
__metadata("design:type", Object)
|
|
205
|
+
], InvitationPublicDto.prototype, "contextId", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, swagger_1.ApiProperty)({ enum: invitation_entity_1.InvitationStatus }),
|
|
208
|
+
__metadata("design:type", String)
|
|
209
|
+
], InvitationPublicDto.prototype, "status", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, swagger_1.ApiProperty)(),
|
|
212
|
+
__metadata("design:type", Date)
|
|
213
|
+
], InvitationPublicDto.prototype, "expiresAt", void 0);
|
|
147
214
|
class AcceptInvitationDto extends ResolveInvitationDto {
|
|
148
215
|
}
|
|
149
216
|
exports.AcceptInvitationDto = AcceptInvitationDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation.dto.js","sourceRoot":"","sources":["../../../../src/modules/invitations/dto/invitation.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"invitation.dto.js","sourceRoot":"","sources":["../../../../src/modules/invitations/dto/invitation.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,yDAAoD;AACpD,qDAcyB;AAEzB,qEAIuC;AAEvC,MAAa,mBAAmB;IAI/B,WAA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W,CAAiB;IAG5B,SAAS,CAAiB;IAG1B,MAAM,CAAoB;IAG1B,SAAS,CAAQ;CACjB;AAxBD,kDAwBC;AAtBA;IADC,IAAA,qBAAW,GAAE;;+CACF;AAGZ;IADC,IAAA,6BAAmB,GAAE;;wDACM;AAG5B;IADC,IAAA,6BAAmB,GAAE;;wDACM;AAG5B;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,6CAAyB,EAAE,CAAC;;4DACL;AAG5C;IADC,IAAA,6BAAmB,GAAE;;wDACM;AAG5B;IADC,IAAA,6BAAmB,GAAE;;sDACI;AAG1B;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,oCAAgB,EAAE,CAAC;;mDACd;AAG1B;IADC,IAAA,qBAAW,GAAE;8BACF,IAAI;sDAAC;AAGlB,MAAa,mBAAoB,SAAQ,oBAAoB;CAAG;AAAhE,kDAAgE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { Repository } from 'typeorm';
|
|
2
|
+
import { DataSource, Repository } from 'typeorm';
|
|
3
|
+
import { AuditService } from '../../audit/services/audit.service';
|
|
3
4
|
import { NotificationDeliveryService } from '../../delivery';
|
|
4
5
|
import { StructuredLoggerService } from '../../observability/logging/structured-logger.service';
|
|
5
6
|
import { SettingsService } from '../../settings/services/settings.service';
|
|
@@ -11,18 +12,35 @@ export declare class InvitationsService {
|
|
|
11
12
|
private readonly settingsService;
|
|
12
13
|
private readonly notificationDelivery;
|
|
13
14
|
private readonly logger;
|
|
14
|
-
|
|
15
|
+
private readonly audit;
|
|
16
|
+
private readonly dataSource;
|
|
17
|
+
constructor(invitationRepository: Repository<Invitation>, configService: ConfigService, settingsService: SettingsService, notificationDelivery: NotificationDeliveryService | null, logger: StructuredLoggerService, audit: AuditService, dataSource: DataSource);
|
|
15
18
|
create(dto: CreateInvitationDto, invitedByUserId?: string): Promise<Invitation & {
|
|
16
19
|
invitationUrl?: string;
|
|
17
20
|
}>;
|
|
18
|
-
findAll(filter?: InvitationFilterDto): Promise<
|
|
19
|
-
|
|
21
|
+
findAll(filter?: InvitationFilterDto): Promise<{
|
|
22
|
+
data: Invitation[];
|
|
23
|
+
total: number;
|
|
24
|
+
page: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
totalPages: number;
|
|
27
|
+
}>;
|
|
28
|
+
resolve(token: string): Promise<{
|
|
29
|
+
id: string;
|
|
30
|
+
targetEmail?: string | null;
|
|
31
|
+
targetPhone?: string | null;
|
|
32
|
+
deliveryChannel: Invitation['deliveryChannel'];
|
|
33
|
+
contextType?: string | null;
|
|
34
|
+
contextId?: string | null;
|
|
35
|
+
status: Invitation['status'];
|
|
36
|
+
expiresAt: Date;
|
|
37
|
+
}>;
|
|
20
38
|
accept(dto: AcceptInvitationDto, acceptedByUserId: string): Promise<Invitation>;
|
|
21
39
|
consume(token: string, acceptedByUserId: string): Promise<Invitation>;
|
|
22
|
-
resend(id: string): Promise<Invitation & {
|
|
40
|
+
resend(id: string, actorId?: string): Promise<Invitation & {
|
|
23
41
|
invitationUrl?: string;
|
|
24
42
|
}>;
|
|
25
|
-
revoke(id: string): Promise<{
|
|
43
|
+
revoke(id: string, actorId?: string): Promise<{
|
|
26
44
|
message: string;
|
|
27
45
|
}>;
|
|
28
46
|
private findByIdOrFail;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/invitations/services/invitations.service.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"invitations.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/invitations/services/invitations.service.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI/C,OAAO,EAAE,UAAU,EAAE,UAAU,EA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ypto_1 = require("crypto");
|
|
54
54
|
const typeorm_2 = require("typeorm");
|
|
55
|
+
const audit_actions_1 = require("../../audit/constants/audit-actions");
|
|
56
|
+
const audit_service_1 = require("../../audit/services/audit.service");
|
|
55
57
|
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
56
58
|
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
57
59
|
const settings_service_1 = require("../../settings/services/settings.service");
|
|
@@ -62,12 +64,16 @@ let InvitationsService = class InvitationsService {
|
|
|
62
64
|
settingsService;
|
|
63
65
|
notificationDelivery;
|
|
64
66
|
logger;
|
|
65
|
-
|
|
67
|
+
audit;
|
|
68
|
+
dataSource;
|
|
69
|
+
constructor(invitationRepository, configService, settingsService, notificationDelivery, logger, audit, dataSource) {
|
|
66
70
|
this.invitationRepository = invitationRepository;
|
|
67
71
|
this.configService = configService;
|
|
68
72
|
this.settingsService = settingsService;
|
|
69
73
|
this.notificationDelivery = notificationDelivery;
|
|
70
74
|
this.logger = logger;
|
|
75
|
+
this.audit = audit;
|
|
76
|
+
this.dataSource = dataSource;
|
|
71
77
|
}
|
|
72
78
|
async create(dto, invitedByUserId) {
|
|
73
79
|
this.assertValidTarget(dto);
|
|
@@ -89,12 +95,30 @@ let InvitationsService = class InvitationsService {
|
|
|
89
95
|
tokenPrefix: token.tokenPrefix,
|
|
90
96
|
tokenHash: token.tokenHash,
|
|
91
97
|
});
|
|
92
|
-
const saved = await this.
|
|
98
|
+
const saved = await this.dataSource.transaction(async (manager) => {
|
|
99
|
+
const row = await manager.getRepository(invitation_entity_1.Invitation).save(invitation);
|
|
100
|
+
await this.audit.recordInTransaction(manager, {
|
|
101
|
+
action: audit_actions_1.AUDIT_ACTIONS.INVITATION_CREATED,
|
|
102
|
+
actorType: 'USER',
|
|
103
|
+
actorId: invitedByUserId,
|
|
104
|
+
resourceType: 'invitation',
|
|
105
|
+
resourceId: row.id,
|
|
106
|
+
metadata: {
|
|
107
|
+
deliveryChannel,
|
|
108
|
+
contextType: row.contextType,
|
|
109
|
+
hasEmail: !!row.targetEmail,
|
|
110
|
+
hasPhone: !!row.targetPhone,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
return row;
|
|
114
|
+
});
|
|
93
115
|
const invitationUrl = this.buildInvitationUrl(token.rawToken);
|
|
94
116
|
await this.dispatchInvitation(saved, invitationUrl);
|
|
95
117
|
return this.withOptionalInvitationUrl(saved, invitationUrl);
|
|
96
118
|
}
|
|
97
119
|
async findAll(filter = {}) {
|
|
120
|
+
const page = filter.page ?? 1;
|
|
121
|
+
const limit = filter.limit ?? 20;
|
|
98
122
|
const qb = this.invitationRepository
|
|
99
123
|
.createQueryBuilder('invitation')
|
|
100
124
|
.orderBy('invitation.createdAt', 'DESC');
|
|
@@ -112,32 +136,63 @@ let InvitationsService = class InvitationsService {
|
|
|
112
136
|
});
|
|
113
137
|
}
|
|
114
138
|
if (filter.target?.trim()) {
|
|
115
|
-
const
|
|
116
|
-
|
|
139
|
+
const raw = filter.target.trim().toLowerCase().slice(0, 64);
|
|
140
|
+
// Prefix match keeps btree indexes usable; require ≥2 chars.
|
|
141
|
+
if (raw.length >= 2) {
|
|
142
|
+
const prefix = `${raw.replace(/[%_]/g, '\\$&')}%`;
|
|
143
|
+
qb.andWhere('(LOWER(invitation.targetEmail) LIKE :prefix ESCAPE :esc OR invitation.targetPhone LIKE :prefix ESCAPE :esc)', { prefix, esc: '\\' });
|
|
144
|
+
}
|
|
117
145
|
}
|
|
118
|
-
|
|
146
|
+
qb.skip((page - 1) * limit).take(limit);
|
|
147
|
+
const [data, total] = await qb.getManyAndCount();
|
|
148
|
+
return {
|
|
149
|
+
data,
|
|
150
|
+
total,
|
|
151
|
+
page,
|
|
152
|
+
limit,
|
|
153
|
+
totalPages: Math.ceil(total / limit) || 0,
|
|
154
|
+
};
|
|
119
155
|
}
|
|
120
156
|
async resolve(token) {
|
|
121
|
-
|
|
157
|
+
const invitation = await this.findPendingByTokenOrFail(token);
|
|
158
|
+
return {
|
|
159
|
+
id: invitation.id,
|
|
160
|
+
targetEmail: invitation.targetEmail,
|
|
161
|
+
targetPhone: invitation.targetPhone,
|
|
162
|
+
deliveryChannel: invitation.deliveryChannel,
|
|
163
|
+
contextType: invitation.contextType,
|
|
164
|
+
contextId: invitation.contextId,
|
|
165
|
+
status: invitation.status,
|
|
166
|
+
expiresAt: invitation.expiresAt,
|
|
167
|
+
};
|
|
122
168
|
}
|
|
123
169
|
async accept(dto, acceptedByUserId) {
|
|
124
170
|
const invitation = await this.findPendingByTokenOrFail(dto.token);
|
|
125
171
|
if (invitation.acceptedByUserId) {
|
|
126
172
|
throw new common_1.ConflictException('Invitation has already been accepted');
|
|
127
173
|
}
|
|
128
|
-
await this.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
174
|
+
await this.dataSource.transaction(async (manager) => {
|
|
175
|
+
await manager.getRepository(invitation_entity_1.Invitation).update(invitation.id, {
|
|
176
|
+
status: invitation_entity_1.InvitationStatus.ACCEPTED,
|
|
177
|
+
acceptedAt: new Date(),
|
|
178
|
+
acceptedByUserId,
|
|
179
|
+
tokenHash: '',
|
|
180
|
+
tokenPrefix: '',
|
|
181
|
+
});
|
|
182
|
+
await this.audit.recordInTransaction(manager, {
|
|
183
|
+
action: audit_actions_1.AUDIT_ACTIONS.INVITATION_ACCEPTED,
|
|
184
|
+
actorType: 'USER',
|
|
185
|
+
actorId: acceptedByUserId,
|
|
186
|
+
resourceType: 'invitation',
|
|
187
|
+
resourceId: invitation.id,
|
|
188
|
+
});
|
|
134
189
|
});
|
|
135
190
|
return this.findByIdOrFail(invitation.id);
|
|
136
191
|
}
|
|
137
192
|
async consume(token, acceptedByUserId) {
|
|
138
193
|
return this.accept({ token }, acceptedByUserId);
|
|
139
194
|
}
|
|
140
|
-
async resend(id) {
|
|
195
|
+
async resend(id, actorId) {
|
|
141
196
|
const invitation = await this.findByIdOrFail(id);
|
|
142
197
|
if (invitation.status !== invitation_entity_1.InvitationStatus.PENDING) {
|
|
143
198
|
throw new common_1.ConflictException('Only pending invitations can be resent');
|
|
@@ -146,20 +201,39 @@ let InvitationsService = class InvitationsService {
|
|
|
146
201
|
invitation.tokenPrefix = token.tokenPrefix;
|
|
147
202
|
invitation.tokenHash = token.tokenHash;
|
|
148
203
|
invitation.expiresAt = this.resolveExpiry();
|
|
149
|
-
const saved = await this.
|
|
204
|
+
const saved = await this.dataSource.transaction(async (manager) => {
|
|
205
|
+
const row = await manager.getRepository(invitation_entity_1.Invitation).save(invitation);
|
|
206
|
+
await this.audit.recordInTransaction(manager, {
|
|
207
|
+
action: audit_actions_1.AUDIT_ACTIONS.INVITATION_RESENT,
|
|
208
|
+
actorType: 'ADMIN',
|
|
209
|
+
actorId,
|
|
210
|
+
resourceType: 'invitation',
|
|
211
|
+
resourceId: row.id,
|
|
212
|
+
});
|
|
213
|
+
return row;
|
|
214
|
+
});
|
|
150
215
|
const invitationUrl = this.buildInvitationUrl(token.rawToken);
|
|
151
216
|
await this.dispatchInvitation(saved, invitationUrl);
|
|
152
217
|
return this.withOptionalInvitationUrl(saved, invitationUrl);
|
|
153
218
|
}
|
|
154
|
-
async revoke(id) {
|
|
219
|
+
async revoke(id, actorId) {
|
|
155
220
|
const invitation = await this.findByIdOrFail(id);
|
|
156
221
|
if (invitation.status !== invitation_entity_1.InvitationStatus.PENDING) {
|
|
157
222
|
throw new common_1.ConflictException('Only pending invitations can be revoked');
|
|
158
223
|
}
|
|
159
|
-
await this.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
224
|
+
await this.dataSource.transaction(async (manager) => {
|
|
225
|
+
await manager.getRepository(invitation_entity_1.Invitation).update(invitation.id, {
|
|
226
|
+
status: invitation_entity_1.InvitationStatus.REVOKED,
|
|
227
|
+
tokenHash: '',
|
|
228
|
+
tokenPrefix: '',
|
|
229
|
+
});
|
|
230
|
+
await this.audit.recordInTransaction(manager, {
|
|
231
|
+
action: audit_actions_1.AUDIT_ACTIONS.INVITATION_REVOKED,
|
|
232
|
+
actorType: 'ADMIN',
|
|
233
|
+
actorId,
|
|
234
|
+
resourceType: 'invitation',
|
|
235
|
+
resourceId: id,
|
|
236
|
+
});
|
|
163
237
|
});
|
|
164
238
|
return { message: 'Invitation revoked.' };
|
|
165
239
|
}
|
|
@@ -272,6 +346,8 @@ exports.InvitationsService = InvitationsService = __decorate([
|
|
|
272
346
|
__param(3, (0, common_1.Optional)()),
|
|
273
347
|
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
274
348
|
config_1.ConfigService,
|
|
275
|
-
settings_service_1.SettingsService, Object, structured_logger_service_1.StructuredLoggerService
|
|
349
|
+
settings_service_1.SettingsService, Object, structured_logger_service_1.StructuredLoggerService,
|
|
350
|
+
audit_service_1.AuditService,
|
|
351
|
+
typeorm_2.DataSource])
|
|
276
352
|
], InvitationsService);
|
|
277
353
|
//# sourceMappingURL=invitations.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.service.js","sourceRoot":"","sources":["../../../../src/modules/invitations/services/invitations.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,2CAA+C;AAC/C,6CAAmD;AACnD,+CAAiC;AACjC,mCAAoC;AACpC,qCAAqC;AAGrC,qGAAgG;AAChG,0EAAsE;AACtE,+EAA2E;AAM3E,qEAKuC;AAShC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAGZ;IACA;IACA;IAEA;IACA;IAPlB,YAEkB,oBAA4C,EAC5C,aAA4B,EAC5B,eAAgC,EAEhC,oBAAwD,EACxD,MAA+B;QAL/B,yBAAoB,GAApB,oBAAoB,CAAwB;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAEhC,yBAAoB,GAApB,oBAAoB,CAAoC;QACxD,WAAM,GAAN,MAAM,CAAyB;IAC9C,CAAC;IAEJ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mDAAuB;GARrC,kBAAkB,CAyQ9B"}
|
|
1
|
+
{"version":3,"file":"invitations.service.js","sourceRoot":"","sources":["../../../../src/modules/invitations/services/invitations.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,2CAA+C;AAC/C,6CAAmD;AACnD,+CAAiC;AACjC,mCAAoC;AACpC,qCAAiD;AAEjD,uEAAoE;AACpE,sEAAkE;AAElE,qGAAgG;AAChG,0EAAsE;AACtE,+EAA2E;AAM3E,qEAKuC;AAShC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAGZ;IACA;IACA;IAEA;IACA;IACA;IACA;IATlB,YAEkB,oBAA4C,EAC5C,aAA4B,EAC5B,eAAgC,EAEhC,oBAAwD,EACxD,MAA+B,EAC/B,KAAmB,EACnB,UAAsB;QAPtB,yBAAoB,GAApB,oBAAoB,CAAwB;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAEhC,yBAAoB,GAApB,oBAAoB,CAAoC;QACxD,WAAM,GAAN,MAAM,CAAyB;QAC/B,UAAK,GAAL,KAAK,CAAc;QACnB,eAAU,GAAV,UAAU,CAAY;IACrC,CAAC;IAEJ,KAAK,CAAC,MAAM,CACX,GAAwB,EACxB,eAAwB;QAExB,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxD,MAAM,eAAe,GAAG,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;YACnD,WAAW,EAAE,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,WAAW,E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CAAC,eAAe,CAAC,UAAsB,EAAE,aAAqB;QAC1E,IAAI,CAAC,UAAU,CAAC,WAAW;YAAE,OAAO;QAEpC,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,CAAC;YAC7C,IAAI,CAAC,MAAM,CAAC,IAAI,CACf,uEAAuE,EACvE;gBACC,KAAK,EAAE,kCAAkC;gBACzC,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,EAAE;aAC3D,CACD,CAAC;YACF,OAAO;QACR,CAAC;QAED,MAAM,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC,UAAU,CAAC,WAAW,EAAE;YACvE,UAAU,EAAE,aAAa;YACzB,cAAc,EAAE,mBAAmB;YACnC,YAAY,EAAE,UAAU,CAAC,EAAE;SAC3B,CAAC,CAAC;IACJ,CAAC;IAEO,yBAAyB,CAChC,UAAa,EACb,aAAqB;QAErB,IAAI,UAAU,CAAC,eAAe,KAAK,6CAAyB,CAAC,IAAI,EAAE,CAAC;YACnE,OAAO,UAAU,CAAC;QACnB,CAAC;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC;IACrD,CAAC;CACD,CAAA;AA9VY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,0BAAgB,EAAC,8BAAU,CAAC,CAAA;IAI5B,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCAH4B,oBAAU;QACjB,sBAAa;QACX,kCAAe,UAGxB,mDAAuB;QACxB,4BAAY;QACP,oBAAU;GAV5B,kBAAkB,CA8V9B"}
|
|
@@ -7,11 +7,16 @@ export interface DeliveryJobBase {
|
|
|
7
7
|
auditId: string;
|
|
8
8
|
observabilityContext?: JobObservabilityContext;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Email delivery job — body is loaded from the audit `payloadSnapshot` at send time
|
|
12
|
+
* so Redis/Bull does not dual-store up to 200KB HTML alongside Postgres.
|
|
13
|
+
* Legacy jobs may still carry `html`/`text` inline (backward compatible).
|
|
14
|
+
*/
|
|
11
15
|
export interface DeliverEmailJobData extends DeliveryJobBase {
|
|
12
16
|
to: string;
|
|
13
17
|
subject: string;
|
|
14
|
-
|
|
18
|
+
/** @deprecated Prefer audit snapshot; kept for in-flight jobs. */
|
|
19
|
+
html?: string;
|
|
15
20
|
text?: string;
|
|
16
21
|
}
|
|
17
22
|
/** Final SMS body ready for gateway transport. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.queue.d.ts","sourceRoot":"","sources":["../../../../src/modules/jobs/queues/jobs.queue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"jobs.queue.d.ts","sourceRoot":"","sources":["../../../../src/modules/jobs/queues/jobs.queue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAQ/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AACpG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAmBrF,2CAA2C;AAC3C,MAAM,WAAW,eAAe;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,uBAAuB,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,kDAAkD;AAClD,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACzD,EAAE,EAAE,MAAM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,MAAM,GAAG,SAAS,CAAC;IAIrE,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAI3E,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;YAIvE,OAAO;CAwCrB"}
|
|
@@ -16,18 +16,20 @@ exports.JobsQueue = void 0;
|
|
|
16
16
|
const bullmq_1 = require("@nestjs/bullmq");
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
18
|
const bullmq_2 = require("bullmq");
|
|
19
|
+
const delivery_worker_constants_1 = require("../../delivery/constants/delivery-worker.constants");
|
|
19
20
|
const job_context_util_1 = require("../../observability/context/job-context.util");
|
|
20
21
|
const queue_errors_util_1 = require("../utils/queue-errors.util");
|
|
21
22
|
const queue_names_1 = require("./queue-names");
|
|
23
|
+
/** Delivery queue options — sourced from delivery-worker.constants (stall/claim budget). */
|
|
22
24
|
const DEFAULT_JOB_OPTIONS = {
|
|
23
|
-
attempts:
|
|
24
|
-
backoff: { type: 'exponential', delay:
|
|
25
|
+
attempts: delivery_worker_constants_1.DELIVERY_JOB_ATTEMPTS,
|
|
26
|
+
backoff: { type: 'exponential', delay: delivery_worker_constants_1.DELIVERY_JOB_BACKOFF_MS },
|
|
25
27
|
removeOnComplete: true,
|
|
26
28
|
removeOnFail: { count: 500 },
|
|
27
29
|
};
|
|
28
30
|
const OTP_JOB_OPTIONS = {
|
|
29
|
-
attempts:
|
|
30
|
-
backoff: { type: 'exponential', delay:
|
|
31
|
+
attempts: delivery_worker_constants_1.DELIVERY_JOB_ATTEMPTS,
|
|
32
|
+
backoff: { type: 'exponential', delay: delivery_worker_constants_1.OTP_DELIVERY_JOB_BACKOFF_MS },
|
|
31
33
|
removeOnComplete: true,
|
|
32
34
|
removeOnFail: { count: 500 },
|
|
33
35
|
};
|
|
@@ -52,10 +54,7 @@ let JobsQueue = class JobsQueue {
|
|
|
52
54
|
return this.enqueue(this.deliveryQueue, 'deliver-sms', data, DEFAULT_JOB_OPTIONS);
|
|
53
55
|
}
|
|
54
56
|
async addDeliverPush(data) {
|
|
55
|
-
return this.enqueue(this.deliveryQueue, 'deliver-push', data,
|
|
56
|
-
...DEFAULT_JOB_OPTIONS,
|
|
57
|
-
backoff: { type: 'exponential', delay: 2000 },
|
|
58
|
-
});
|
|
57
|
+
return this.enqueue(this.deliveryQueue, 'deliver-push', data, DEFAULT_JOB_OPTIONS);
|
|
59
58
|
}
|
|
60
59
|
async addOtpSmsDelivery(data) {
|
|
61
60
|
return this.enqueue(this.otpQueue, 'otp-sms', data, OTP_JOB_OPTIONS);
|
|
@@ -73,10 +72,26 @@ let JobsQueue = class JobsQueue {
|
|
|
73
72
|
return job.id;
|
|
74
73
|
}
|
|
75
74
|
catch (err) {
|
|
76
|
-
if ((0, queue_errors_util_1.isDuplicateJobError)(err)) {
|
|
75
|
+
if (!(0, queue_errors_util_1.isDuplicateJobError)(err)) {
|
|
76
|
+
throw err;
|
|
77
|
+
}
|
|
78
|
+
// Failed/completed jobs with removeOnFail keep the id — remove and re-add
|
|
79
|
+
// so retries don't leave the audit row QUEUED with no runnable job.
|
|
80
|
+
const existing = await queue.getJob(data.idempotencyKey);
|
|
81
|
+
if (!existing) {
|
|
77
82
|
return undefined;
|
|
78
83
|
}
|
|
79
|
-
|
|
84
|
+
const state = await existing.getState();
|
|
85
|
+
if (state === 'failed' || state === 'completed') {
|
|
86
|
+
await existing.remove();
|
|
87
|
+
const job = await queue.add(name, payload, {
|
|
88
|
+
...options,
|
|
89
|
+
jobId: data.idempotencyKey,
|
|
90
|
+
});
|
|
91
|
+
return job.id;
|
|
92
|
+
}
|
|
93
|
+
// waiting / active / delayed — already in flight
|
|
94
|
+
return existing.id;
|
|
80
95
|
}
|
|
81
96
|
}
|
|
82
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.queue.js","sourceRoot":"","sources":["../../../../src/modules/jobs/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pE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACzD,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,OAAO,SAAS,CAAC;YAClB,CAAC;YAED,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACxC,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;gBACjD,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACxB,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE;oBAC1C,GAAG,OAAO;oBACV,KAAK,EAAE,IAAI,CAAC,cAAc;iBAC1B,CAAC,CAAC;gBACH,OAAO,GAAG,CAAC,EAAE,CAAC;YACf,CAAC;YAED,iDAAiD;YACjD,OAAO,QAAQ,CAAC,EAAE,CAAC;QACpB,CAAC;IACF,CAAC;CACD,CAAA;AAtEY,8BAAS;oBAAT,SAAS;IADrB,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,oBAAW,EAAC,yBAAW,CAAC,QAAQ,CAAC,CAAA;IAEjC,WAAA,IAAA,oBAAW,EAAC,yBAAW,CAAC,YAAY,CAAC,CAAA;IAErC,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCAHqB,cAAK;QAEV,cAAK;GALrB,SAAS,CAsErB"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { RequestUser } from '../../../common/interfaces/request-user';
|
|
2
|
+
import { AuditService } from '../../audit/services/audit.service';
|
|
2
3
|
import { NotificationQueryDto, RegisterDeviceDto, RemoveDeviceDto } from '../dto';
|
|
3
4
|
import { FcmService } from '../services/fcm.service';
|
|
4
5
|
import { NotificationsService } from '../services/notifications.service';
|
|
5
6
|
export declare class NotificationsController {
|
|
6
7
|
private readonly fcmService;
|
|
7
8
|
private readonly notificationsService;
|
|
8
|
-
|
|
9
|
+
private readonly audit;
|
|
10
|
+
constructor(fcmService: FcmService, notificationsService: NotificationsService, audit: AuditService);
|
|
9
11
|
/**
|
|
10
12
|
* Register device for push notifications
|
|
11
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/notifications/controllers/notifications.controller.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"notifications.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/notifications/controllers/notifications.controller.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,qBAEa,uBAAuB;IAElC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAFL,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,oBAAoB,EAC1C,KAAK,EAAE,YAAY;IAGrC;;OAEG;IAGG,cAAc,CAAgB,IAAI,EAAE,WAAW,EAAU,GAAG,EAAE,iBAAiB;;;;IA0BrF;;OAEG;IAIG,YAAY,CAAgB,IAAI,EAAE,WAAW,EAAU,GAAG,EAAE,eAAe;;;IAYjF;;OAEG;IAGG,UAAU,CAAgB,IAAI,EAAE,WAAW;;;;;;;IAejD;;OAEG;IAGG,gBAAgB,CAAgB,IAAI,EAAE,WAAW,EAAW,KAAK,EAAE,oBAAoB;IAI7F;;OAEG;IAGG,cAAc,CAAgB,IAAI,EAAE,WAAW;;;IAKrD;;OAEG;IAIG,UAAU,CAAgB,IAAI,EAAE,WAAW,EAAe,EAAE,EAAE,MAAM;;;IAK1E;;OAEG;IAIG,aAAa,CAAgB,IAAI,EAAE,WAAW;;;;IAKpD;;OAEG;IAIG,kBAAkB,CAAgB,IAAI,EAAE,WAAW,EAAe,EAAE,EAAE,MAAM;;;CAIlF"}
|