@colveor/core 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -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/1785006199371-auth-mfa-oauth.d.ts +7 -0
- package/dist/database/migrations/1785006199371-auth-mfa-oauth.d.ts.map +1 -0
- package/dist/database/migrations/1785006199371-auth-mfa-oauth.js +24 -0
- package/dist/database/migrations/1785006199371-auth-mfa-oauth.js.map +1 -0
- package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.d.ts +7 -0
- package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.d.ts.map +1 -0
- package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.js +16 -0
- package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.js.map +1 -0
- package/dist/database/migrations/1785006199373-auth-gap-fixes.d.ts +7 -0
- package/dist/database/migrations/1785006199373-auth-gap-fixes.d.ts.map +1 -0
- package/dist/database/migrations/1785006199373-auth-gap-fixes.js +14 -0
- package/dist/database/migrations/1785006199373-auth-gap-fixes.js.map +1 -0
- package/dist/database/migrations/1785006199374-auth-sessions-indexes.d.ts +13 -0
- package/dist/database/migrations/1785006199374-auth-sessions-indexes.d.ts.map +1 -0
- package/dist/database/migrations/1785006199374-auth-sessions-indexes.js +35 -0
- package/dist/database/migrations/1785006199374-auth-sessions-indexes.js.map +1 -0
- package/dist/database/migrations/1785006199375-auth-identity-and-audit.d.ts +11 -0
- package/dist/database/migrations/1785006199375-auth-identity-and-audit.d.ts.map +1 -0
- package/dist/database/migrations/1785006199375-auth-identity-and-audit.js +60 -0
- package/dist/database/migrations/1785006199375-auth-identity-and-audit.js.map +1 -0
- package/dist/database/migrations/1785006199376-auth-settings-security-defaults.d.ts +14 -0
- package/dist/database/migrations/1785006199376-auth-settings-security-defaults.d.ts.map +1 -0
- package/dist/database/migrations/1785006199376-auth-settings-security-defaults.js +39 -0
- package/dist/database/migrations/1785006199376-auth-settings-security-defaults.js.map +1 -0
- package/dist/database/migrations/1785006199377-auth-security-hardening.d.ts +13 -0
- package/dist/database/migrations/1785006199377-auth-security-hardening.d.ts.map +1 -0
- package/dist/database/migrations/1785006199377-auth-security-hardening.js +69 -0
- package/dist/database/migrations/1785006199377-auth-security-hardening.js.map +1 -0
- package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.d.ts +11 -0
- package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.d.ts.map +1 -0
- package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.js +51 -0
- package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.js.map +1 -0
- package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.d.ts +12 -0
- package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.d.ts.map +1 -0
- package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.js +37 -0
- package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.js.map +1 -0
- package/dist/database/migrations/1785006199380-auth-remaining-gaps.d.ts +12 -0
- package/dist/database/migrations/1785006199380-auth-remaining-gaps.d.ts.map +1 -0
- package/dist/database/migrations/1785006199380-auth-remaining-gaps.js +74 -0
- package/dist/database/migrations/1785006199380-auth-remaining-gaps.js.map +1 -0
- package/dist/database/migrations/1785006199381-settings-blast-radius.d.ts +12 -0
- package/dist/database/migrations/1785006199381-settings-blast-radius.d.ts.map +1 -0
- package/dist/database/migrations/1785006199381-settings-blast-radius.js +52 -0
- package/dist/database/migrations/1785006199381-settings-blast-radius.js.map +1 -0
- package/dist/database/migrations/1785006199382-oauth-client-ids-lock.d.ts +11 -0
- package/dist/database/migrations/1785006199382-oauth-client-ids-lock.d.ts.map +1 -0
- package/dist/database/migrations/1785006199382-oauth-client-ids-lock.js +36 -0
- package/dist/database/migrations/1785006199382-oauth-client-ids-lock.js.map +1 -0
- package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.d.ts +12 -0
- package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.d.ts.map +1 -0
- package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.js +39 -0
- package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.js.map +1 -0
- package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.d.ts +12 -0
- package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.d.ts.map +1 -0
- package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.js +39 -0
- package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.js.map +1 -0
- package/dist/database/migrations/1785006199385-settings-auth-surface-lock.d.ts +13 -0
- package/dist/database/migrations/1785006199385-settings-auth-surface-lock.d.ts.map +1 -0
- package/dist/database/migrations/1785006199385-settings-auth-surface-lock.js +72 -0
- package/dist/database/migrations/1785006199385-settings-auth-surface-lock.js.map +1 -0
- package/dist/database/migrations/1785006199386-audit-events.d.ts +10 -0
- package/dist/database/migrations/1785006199386-audit-events.d.ts.map +1 -0
- package/dist/database/migrations/1785006199386-audit-events.js +60 -0
- package/dist/database/migrations/1785006199386-audit-events.js.map +1 -0
- package/dist/database/migrations/1785006199387-audit-resource-id-varchar.d.ts +10 -0
- package/dist/database/migrations/1785006199387-audit-resource-id-varchar.d.ts.map +1 -0
- package/dist/database/migrations/1785006199387-audit-resource-id-varchar.js +25 -0
- package/dist/database/migrations/1785006199387-audit-resource-id-varchar.js.map +1 -0
- package/dist/database/migrations/1785006199388-audit-enterprise.d.ts +11 -0
- package/dist/database/migrations/1785006199388-audit-enterprise.d.ts.map +1 -0
- package/dist/database/migrations/1785006199388-audit-enterprise.js +157 -0
- package/dist/database/migrations/1785006199388-audit-enterprise.js.map +1 -0
- package/dist/database/migrations/1785006199389-drop-admin-logs.d.ts +10 -0
- package/dist/database/migrations/1785006199389-drop-admin-logs.d.ts.map +1 -0
- package/dist/database/migrations/1785006199389-drop-admin-logs.js +38 -0
- package/dist/database/migrations/1785006199389-drop-admin-logs.js.map +1 -0
- package/dist/database/migrations/1785006199390-audit-hardening.d.ts +14 -0
- package/dist/database/migrations/1785006199390-audit-hardening.d.ts.map +1 -0
- package/dist/database/migrations/1785006199390-audit-hardening.js +345 -0
- package/dist/database/migrations/1785006199390-audit-hardening.js.map +1 -0
- package/dist/database/migrations/1785006199391-audit-owner-schema-create.d.ts +10 -0
- package/dist/database/migrations/1785006199391-audit-owner-schema-create.d.ts.map +1 -0
- package/dist/database/migrations/1785006199391-audit-owner-schema-create.js +39 -0
- package/dist/database/migrations/1785006199391-audit-owner-schema-create.js.map +1 -0
- package/dist/database/migrations/1785006199392-profile-photo-url.d.ts +11 -0
- package/dist/database/migrations/1785006199392-profile-photo-url.d.ts.map +1 -0
- package/dist/database/migrations/1785006199392-profile-photo-url.js +33 -0
- package/dist/database/migrations/1785006199392-profile-photo-url.js.map +1 -0
- package/dist/database/migrations/1785006199393-profile-cover-url.d.ts +11 -0
- package/dist/database/migrations/1785006199393-profile-cover-url.d.ts.map +1 -0
- package/dist/database/migrations/1785006199393-profile-cover-url.js +33 -0
- package/dist/database/migrations/1785006199393-profile-cover-url.js.map +1 -0
- package/dist/database/migrations/1785006199394-profile-is-public-default-false.d.ts +11 -0
- package/dist/database/migrations/1785006199394-profile-is-public-default-false.d.ts.map +1 -0
- package/dist/database/migrations/1785006199394-profile-is-public-default-false.js +24 -0
- package/dist/database/migrations/1785006199394-profile-is-public-default-false.js.map +1 -0
- package/dist/database/migrations/1785006199395-delivery-scale-indexes.d.ts +10 -0
- package/dist/database/migrations/1785006199395-delivery-scale-indexes.d.ts.map +1 -0
- package/dist/database/migrations/1785006199395-delivery-scale-indexes.js +35 -0
- package/dist/database/migrations/1785006199395-delivery-scale-indexes.js.map +1 -0
- package/dist/database/migrations/1785006199396-delivery-recipient-index.d.ts +11 -0
- package/dist/database/migrations/1785006199396-delivery-recipient-index.d.ts.map +1 -0
- package/dist/database/migrations/1785006199396-delivery-recipient-index.js +23 -0
- package/dist/database/migrations/1785006199396-delivery-recipient-index.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
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { RequestUser } from '../../../common/interfaces/request-user';
|
|
1
2
|
import { CreatePermissionDto, UpdatePermissionDto } from '../dto';
|
|
2
3
|
import { PermissionsService } from '../services';
|
|
3
4
|
export declare class PermissionsController {
|
|
4
5
|
private readonly permissionsService;
|
|
5
6
|
constructor(permissionsService: PermissionsService);
|
|
6
|
-
create(dto: CreatePermissionDto): Promise<import("..").Permission>;
|
|
7
|
+
create(dto: CreatePermissionDto, actor: RequestUser): Promise<import("..").Permission>;
|
|
7
8
|
findAll(moduleId?: string): Promise<import("..").Permission[]>;
|
|
8
9
|
findOne(id: string): Promise<import("..").Permission>;
|
|
9
|
-
update(id: string, dto: UpdatePermissionDto): Promise<import("..").Permission>;
|
|
10
|
-
delete(id: string): Promise<{
|
|
10
|
+
update(id: string, dto: UpdatePermissionDto, actor: RequestUser): Promise<import("..").Permission>;
|
|
11
|
+
delete(id: string, actor: RequestUser): Promise<{
|
|
11
12
|
message: string;
|
|
12
13
|
}>;
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/permissions.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"permissions.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/permissions.controller.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAEa,qBAAqB;IACrB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAInE,MAAM,CAAS,GAAG,EAAE,mBAAmB,EAAiB,KAAK,EAAE,WAAW;IAM1E,OAAO,CAAoB,QAAQ,CAAC,EAAE,MAAM;IAM5C,OAAO,CAA6B,EAAE,EAAE,MAAM;IAM9C,MAAM,CACuB,EAAE,EAAE,MAAM,EAC9B,GAAG,EAAE,mBAAmB,EACjB,KAAK,EAAE,WAAW;IAO5B,MAAM,CAA6B,EAAE,EAAE,MAAM,EAAiB,KAAK,EAAE,WAAW;;;CAItF"}
|
|
@@ -14,16 +14,19 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.PermissionsController = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
|
+
const decorators_1 = require("../../../common/decorators");
|
|
17
18
|
const auth_guard_1 = require("../../../common/guards/auth.guard");
|
|
19
|
+
const permissions_guard_1 = require("../../../common/guards/permissions.guard");
|
|
18
20
|
const dto_1 = require("../dto");
|
|
21
|
+
const roles_manifest_1 = require("../roles.manifest");
|
|
19
22
|
const services_1 = require("../services");
|
|
20
23
|
let PermissionsController = class PermissionsController {
|
|
21
24
|
permissionsService;
|
|
22
25
|
constructor(permissionsService) {
|
|
23
26
|
this.permissionsService = permissionsService;
|
|
24
27
|
}
|
|
25
|
-
create(dto) {
|
|
26
|
-
return this.permissionsService.create(dto);
|
|
28
|
+
create(dto, actor) {
|
|
29
|
+
return this.permissionsService.create(dto, actor.id);
|
|
27
30
|
}
|
|
28
31
|
findAll(moduleId) {
|
|
29
32
|
return this.permissionsService.findAll(moduleId);
|
|
@@ -31,24 +34,27 @@ let PermissionsController = class PermissionsController {
|
|
|
31
34
|
findOne(id) {
|
|
32
35
|
return this.permissionsService.findById(id);
|
|
33
36
|
}
|
|
34
|
-
update(id, dto) {
|
|
35
|
-
return this.permissionsService.update(id, dto);
|
|
37
|
+
update(id, dto, actor) {
|
|
38
|
+
return this.permissionsService.update(id, dto, actor.id);
|
|
36
39
|
}
|
|
37
|
-
async delete(id) {
|
|
38
|
-
await this.permissionsService.delete(id);
|
|
40
|
+
async delete(id, actor) {
|
|
41
|
+
await this.permissionsService.delete(id, actor.id);
|
|
39
42
|
return { message: 'Permission deleted' };
|
|
40
43
|
}
|
|
41
44
|
};
|
|
42
45
|
exports.PermissionsController = PermissionsController;
|
|
43
46
|
__decorate([
|
|
44
47
|
(0, common_1.Post)(),
|
|
48
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.PERMISSIONS_MANAGE),
|
|
45
49
|
__param(0, (0, common_1.Body)()),
|
|
50
|
+
__param(1, (0, decorators_1.CurrentUser)()),
|
|
46
51
|
__metadata("design:type", Function),
|
|
47
|
-
__metadata("design:paramtypes", [dto_1.CreatePermissionDto]),
|
|
52
|
+
__metadata("design:paramtypes", [dto_1.CreatePermissionDto, Object]),
|
|
48
53
|
__metadata("design:returntype", void 0)
|
|
49
54
|
], PermissionsController.prototype, "create", null);
|
|
50
55
|
__decorate([
|
|
51
56
|
(0, common_1.Get)(),
|
|
57
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.READ),
|
|
52
58
|
__param(0, (0, common_1.Query)('moduleId')),
|
|
53
59
|
__metadata("design:type", Function),
|
|
54
60
|
__metadata("design:paramtypes", [String]),
|
|
@@ -56,6 +62,7 @@ __decorate([
|
|
|
56
62
|
], PermissionsController.prototype, "findAll", null);
|
|
57
63
|
__decorate([
|
|
58
64
|
(0, common_1.Get)(':id'),
|
|
65
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.READ),
|
|
59
66
|
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
60
67
|
__metadata("design:type", Function),
|
|
61
68
|
__metadata("design:paramtypes", [String]),
|
|
@@ -63,22 +70,26 @@ __decorate([
|
|
|
63
70
|
], PermissionsController.prototype, "findOne", null);
|
|
64
71
|
__decorate([
|
|
65
72
|
(0, common_1.Patch)(':id'),
|
|
73
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.PERMISSIONS_MANAGE),
|
|
66
74
|
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
67
75
|
__param(1, (0, common_1.Body)()),
|
|
76
|
+
__param(2, (0, decorators_1.CurrentUser)()),
|
|
68
77
|
__metadata("design:type", Function),
|
|
69
|
-
__metadata("design:paramtypes", [String, dto_1.UpdatePermissionDto]),
|
|
78
|
+
__metadata("design:paramtypes", [String, dto_1.UpdatePermissionDto, Object]),
|
|
70
79
|
__metadata("design:returntype", void 0)
|
|
71
80
|
], PermissionsController.prototype, "update", null);
|
|
72
81
|
__decorate([
|
|
73
82
|
(0, common_1.Delete)(':id'),
|
|
83
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.PERMISSIONS_MANAGE),
|
|
74
84
|
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
85
|
+
__param(1, (0, decorators_1.CurrentUser)()),
|
|
75
86
|
__metadata("design:type", Function),
|
|
76
|
-
__metadata("design:paramtypes", [String]),
|
|
87
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
77
88
|
__metadata("design:returntype", Promise)
|
|
78
89
|
], PermissionsController.prototype, "delete", null);
|
|
79
90
|
exports.PermissionsController = PermissionsController = __decorate([
|
|
80
91
|
(0, common_1.Controller)('permissions'),
|
|
81
|
-
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard),
|
|
92
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard, permissions_guard_1.PermissionsGuard),
|
|
82
93
|
__metadata("design:paramtypes", [services_1.PermissionsService])
|
|
83
94
|
], PermissionsController);
|
|
84
95
|
//# sourceMappingURL=permissions.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.controller.js","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/permissions.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AAExB,kEAAiE;AACjE,gCAAkE;AAClE,0CAAiD;AAI1C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACJ;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"permissions.controller.js","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/permissions.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AAExB,2DAA4E;AAC5E,kEAAiE;AACjE,gFAA4E;AAE5E,gCAAkE;AAClE,sDAAsD;AACtD,0CAAiD;AAI1C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACJ;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAIvE,MAAM,CAAS,GAAwB,EAAiB,KAAkB;QACzE,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAID,OAAO,CAAoB,QAAiB;QAC3C,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,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AA,IAAA,wBAAW,GAAE,CAAA;;6CADD,yBAAmB;;mDAIhC;AAIK;IAFL,IAAA,eAAM,EAAC,KAAK,CAAC;IACb,IAAA,8BAAiB,EAAC,kCAAiB,CAAC,kBAAkB,CAAC;IAC1C,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;IAAc,WAAA,IAAA,wBAAW,GAAE,CAAA;;;;mDAGlE;gCApCW,qBAAqB;IAFjC,IAAA,mBAAU,EAAC,aAAa,CAAC;IACzB,IAAA,kBAAS,EAAC,yBAAY,EAAE,oCAAgB,CAAC;qCAEQ,6BAAkB;GADvD,qBAAqB,CAqCjC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { RequestUser } from '../../../common/interfaces/request-user';
|
|
1
2
|
import { CreateRoleDto, UpdateRoleDto } from '../dto';
|
|
2
3
|
import { RolesService } from '../services';
|
|
3
4
|
export declare class RolesController {
|
|
4
5
|
private readonly rolesService;
|
|
5
6
|
constructor(rolesService: RolesService);
|
|
6
|
-
create(dto: CreateRoleDto): Promise<import("..").Role>;
|
|
7
|
+
create(dto: CreateRoleDto, actor: RequestUser): Promise<import("..").Role>;
|
|
7
8
|
findAll(): Promise<import("..").Role[]>;
|
|
8
9
|
findOne(id: string): Promise<import("..").Role>;
|
|
9
|
-
update(id: string, dto: UpdateRoleDto): Promise<import("..").Role>;
|
|
10
|
-
delete(id: string): Promise<{
|
|
10
|
+
update(id: string, dto: UpdateRoleDto, actor: RequestUser): Promise<import("..").Role>;
|
|
11
|
+
delete(id: string, actor: RequestUser): Promise<{
|
|
11
12
|
message: string;
|
|
12
13
|
}>;
|
|
13
14
|
assignPermissions(roleId: string, body: {
|
|
14
15
|
permissionIds: string[];
|
|
15
|
-
}): Promise<import("..").Role>;
|
|
16
|
+
}, actor: RequestUser): Promise<import("..").Role>;
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=roles.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/roles.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"roles.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/roles.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,qBAEa,eAAe;IACf,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAIvD,MAAM,CAAS,GAAG,EAAE,aAAa,EAAiB,KAAK,EAAE,WAAW;IAMpE,OAAO;IAMP,OAAO,CAA6B,EAAE,EAAE,MAAM;IAM9C,MAAM,CACuB,EAAE,EAAE,MAAM,EAC9B,GAAG,EAAE,aAAa,EACX,KAAK,EAAE,WAAW;IAO5B,MAAM,CAA6B,EAAE,EAAE,MAAM,EAAiB,KAAK,EAAE,WAAW;;;IAOtF,iBAAiB,CACY,MAAM,EAAE,MAAM,EAClC,IAAI,EAAE;QAAE,aAAa,EAAE,MAAM,EAAE,CAAA;KAAE,EAC1B,KAAK,EAAE,WAAW;CAIlC"}
|
|
@@ -14,16 +14,19 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.RolesController = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
|
+
const decorators_1 = require("../../../common/decorators");
|
|
17
18
|
const auth_guard_1 = require("../../../common/guards/auth.guard");
|
|
19
|
+
const permissions_guard_1 = require("../../../common/guards/permissions.guard");
|
|
18
20
|
const dto_1 = require("../dto");
|
|
21
|
+
const roles_manifest_1 = require("../roles.manifest");
|
|
19
22
|
const services_1 = require("../services");
|
|
20
23
|
let RolesController = class RolesController {
|
|
21
24
|
rolesService;
|
|
22
25
|
constructor(rolesService) {
|
|
23
26
|
this.rolesService = rolesService;
|
|
24
27
|
}
|
|
25
|
-
create(dto) {
|
|
26
|
-
return this.rolesService.create(dto);
|
|
28
|
+
create(dto, actor) {
|
|
29
|
+
return this.rolesService.create(dto, actor.id);
|
|
27
30
|
}
|
|
28
31
|
findAll() {
|
|
29
32
|
return this.rolesService.findAll();
|
|
@@ -31,33 +34,37 @@ let RolesController = class RolesController {
|
|
|
31
34
|
findOne(id) {
|
|
32
35
|
return this.rolesService.findById(id);
|
|
33
36
|
}
|
|
34
|
-
update(id, dto) {
|
|
35
|
-
return this.rolesService.update(id, dto);
|
|
37
|
+
update(id, dto, actor) {
|
|
38
|
+
return this.rolesService.update(id, dto, actor.id);
|
|
36
39
|
}
|
|
37
|
-
async delete(id) {
|
|
38
|
-
await this.rolesService.delete(id);
|
|
40
|
+
async delete(id, actor) {
|
|
41
|
+
await this.rolesService.delete(id, actor.id);
|
|
39
42
|
return { message: 'Role deleted' };
|
|
40
43
|
}
|
|
41
|
-
assignPermissions(roleId, body) {
|
|
42
|
-
return this.rolesService.assignPermissions(roleId, body.permissionIds);
|
|
44
|
+
assignPermissions(roleId, body, actor) {
|
|
45
|
+
return this.rolesService.assignPermissions(roleId, body.permissionIds, actor.id);
|
|
43
46
|
}
|
|
44
47
|
};
|
|
45
48
|
exports.RolesController = RolesController;
|
|
46
49
|
__decorate([
|
|
47
50
|
(0, common_1.Post)(),
|
|
51
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.CREATE),
|
|
48
52
|
__param(0, (0, common_1.Body)()),
|
|
53
|
+
__param(1, (0, decorators_1.CurrentUser)()),
|
|
49
54
|
__metadata("design:type", Function),
|
|
50
|
-
__metadata("design:paramtypes", [dto_1.CreateRoleDto]),
|
|
55
|
+
__metadata("design:paramtypes", [dto_1.CreateRoleDto, Object]),
|
|
51
56
|
__metadata("design:returntype", void 0)
|
|
52
57
|
], RolesController.prototype, "create", null);
|
|
53
58
|
__decorate([
|
|
54
59
|
(0, common_1.Get)(),
|
|
60
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.READ),
|
|
55
61
|
__metadata("design:type", Function),
|
|
56
62
|
__metadata("design:paramtypes", []),
|
|
57
63
|
__metadata("design:returntype", void 0)
|
|
58
64
|
], RolesController.prototype, "findAll", null);
|
|
59
65
|
__decorate([
|
|
60
66
|
(0, common_1.Get)(':id'),
|
|
67
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.READ),
|
|
61
68
|
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
62
69
|
__metadata("design:type", Function),
|
|
63
70
|
__metadata("design:paramtypes", [String]),
|
|
@@ -65,30 +72,36 @@ __decorate([
|
|
|
65
72
|
], RolesController.prototype, "findOne", null);
|
|
66
73
|
__decorate([
|
|
67
74
|
(0, common_1.Patch)(':id'),
|
|
75
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.UPDATE),
|
|
68
76
|
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
69
77
|
__param(1, (0, common_1.Body)()),
|
|
78
|
+
__param(2, (0, decorators_1.CurrentUser)()),
|
|
70
79
|
__metadata("design:type", Function),
|
|
71
|
-
__metadata("design:paramtypes", [String, dto_1.UpdateRoleDto]),
|
|
80
|
+
__metadata("design:paramtypes", [String, dto_1.UpdateRoleDto, Object]),
|
|
72
81
|
__metadata("design:returntype", void 0)
|
|
73
82
|
], RolesController.prototype, "update", null);
|
|
74
83
|
__decorate([
|
|
75
84
|
(0, common_1.Delete)(':id'),
|
|
85
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.DELETE),
|
|
76
86
|
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
87
|
+
__param(1, (0, decorators_1.CurrentUser)()),
|
|
77
88
|
__metadata("design:type", Function),
|
|
78
|
-
__metadata("design:paramtypes", [String]),
|
|
89
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
79
90
|
__metadata("design:returntype", Promise)
|
|
80
91
|
], RolesController.prototype, "delete", null);
|
|
81
92
|
__decorate([
|
|
82
93
|
(0, common_1.Post)(':id/permissions'),
|
|
94
|
+
(0, decorators_1.RequirePermission)(roles_manifest_1.ROLES_PERMISSIONS.UPDATE),
|
|
83
95
|
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
84
96
|
__param(1, (0, common_1.Body)()),
|
|
97
|
+
__param(2, (0, decorators_1.CurrentUser)()),
|
|
85
98
|
__metadata("design:type", Function),
|
|
86
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
99
|
+
__metadata("design:paramtypes", [String, Object, Object]),
|
|
87
100
|
__metadata("design:returntype", void 0)
|
|
88
101
|
], RolesController.prototype, "assignPermissions", null);
|
|
89
102
|
exports.RolesController = RolesController = __decorate([
|
|
90
103
|
(0, common_1.Controller)('roles'),
|
|
91
|
-
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard),
|
|
104
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard, permissions_guard_1.PermissionsGuard),
|
|
92
105
|
__metadata("design:paramtypes", [services_1.RolesService])
|
|
93
106
|
], RolesController);
|
|
94
107
|
//# sourceMappingURL=roles.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.controller.js","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/roles.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AAExB,kEAAiE;AACjE,gCAAsD;AACtD,0CAA2C;AAIpC,IAAM,eAAe,GAArB,MAAM,eAAe;IACE;IAA7B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"roles.controller.js","sourceRoot":"","sources":["../../../../src/modules/roles/controll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 +1,4 @@
|
|
|
1
|
+
import { RequestUser } from '../../../common/interfaces/request-user';
|
|
1
2
|
import { AssignRolesDto } from '../dto';
|
|
2
3
|
import { UserRolesService } from '../services';
|
|
3
4
|
export declare class UserRolesController {
|
|
@@ -5,7 +6,7 @@ export declare class UserRolesController {
|
|
|
5
6
|
constructor(userRolesService: UserRolesService);
|
|
6
7
|
getUserPermissions(userId: string): Promise<string[]>;
|
|
7
8
|
getUserRoles(userId: string): Promise<import("..").Role[]>;
|
|
8
|
-
assignRoles(userId: string, dto: AssignRolesDto): Promise<import("../../..").User>;
|
|
9
|
-
removeRoles(userId: string): Promise<import("../../..").User>;
|
|
9
|
+
assignRoles(userId: string, dto: AssignRolesDto, actor: RequestUser): Promise<import("../../..").User>;
|
|
10
|
+
removeRoles(userId: string, actor: RequestUser): Promise<import("../../..").User>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=user-roles.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-roles.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/user-roles.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,qBAIa,mBAAmB;IACnB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,gBAAgB;IAQ/D,kBAAkB,CAAiC,MAAM,EAAE,MAAM;IAOjE,YAAY,CAAiC,MAAM,EAAE,MAAM;IAU3D,WAAW,
|
|
1
|
+
{"version":3,"file":"user-roles.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/user-roles.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,qBAIa,mBAAmB;IACnB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,gBAAgB;IAQ/D,kBAAkB,CAAiC,MAAM,EAAE,MAAM;IAOjE,YAAY,CAAiC,MAAM,EAAE,MAAM;IAU3D,WAAW,CACsB,MAAM,EAAE,MAAM,EACtC,GAAG,EAAE,cAAc,EACZ,KAAK,EAAE,WAAW;IAclC,WAAW,CAAiC,MAAM,EAAE,MAAM,EAAiB,KAAK,EAAE,WAAW;CAM7F"}
|
|
@@ -31,11 +31,17 @@ let UserRolesController = class UserRolesController {
|
|
|
31
31
|
getUserRoles(userId) {
|
|
32
32
|
return this.userRolesService.getUserRoles(userId);
|
|
33
33
|
}
|
|
34
|
-
assignRoles(userId, dto) {
|
|
35
|
-
return this.userRolesService.assignRoles(userId, dto
|
|
34
|
+
assignRoles(userId, dto, actor) {
|
|
35
|
+
return this.userRolesService.assignRoles(userId, dto, undefined, {
|
|
36
|
+
actorType: 'ADMIN',
|
|
37
|
+
actorId: actor.id,
|
|
38
|
+
});
|
|
36
39
|
}
|
|
37
|
-
removeRoles(userId) {
|
|
38
|
-
return this.userRolesService.removeRoles(userId
|
|
40
|
+
removeRoles(userId, actor) {
|
|
41
|
+
return this.userRolesService.removeRoles(userId, {
|
|
42
|
+
actorType: 'ADMIN',
|
|
43
|
+
actorId: actor.id,
|
|
44
|
+
});
|
|
39
45
|
}
|
|
40
46
|
};
|
|
41
47
|
exports.UserRolesController = UserRolesController;
|
|
@@ -69,8 +75,9 @@ __decorate([
|
|
|
69
75
|
}),
|
|
70
76
|
__param(0, (0, common_1.Param)('userId', common_1.ParseUUIDPipe)),
|
|
71
77
|
__param(1, (0, common_1.Body)()),
|
|
78
|
+
__param(2, (0, decorators_1.CurrentUser)()),
|
|
72
79
|
__metadata("design:type", Function),
|
|
73
|
-
__metadata("design:paramtypes", [String, dto_1.AssignRolesDto]),
|
|
80
|
+
__metadata("design:paramtypes", [String, dto_1.AssignRolesDto, Object]),
|
|
74
81
|
__metadata("design:returntype", void 0)
|
|
75
82
|
], UserRolesController.prototype, "assignRoles", null);
|
|
76
83
|
__decorate([
|
|
@@ -81,8 +88,9 @@ __decorate([
|
|
|
81
88
|
description: 'Remove all roles from a user. Requires roles:assign permission.',
|
|
82
89
|
}),
|
|
83
90
|
__param(0, (0, common_1.Param)('userId', common_1.ParseUUIDPipe)),
|
|
91
|
+
__param(1, (0, decorators_1.CurrentUser)()),
|
|
84
92
|
__metadata("design:type", Function),
|
|
85
|
-
__metadata("design:paramtypes", [String]),
|
|
93
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
86
94
|
__metadata("design:returntype", void 0)
|
|
87
95
|
], UserRolesController.prototype, "removeRoles", null);
|
|
88
96
|
exports.UserRolesController = UserRolesController = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-roles.controller.js","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/user-roles.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,6CAAuE;AAEvE,
|
|
1
|
+
{"version":3,"file":"user-roles.controller.js","sourceRoot":"","sources":["../../../../src/modules/roles/controllers/user-roles.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,6CAAuE;AAEvE,2DAA4E;AAC5E,kEAAiE;AACjE,gFAA4E;AAE5E,gCAAwC;AACxC,0CAA+C;AAMxC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IACF;IAA7B,YAA6B,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAAG,CAAC;IAQnE,kBAAkB,CAAiC,MAAc;QAChE,OAAO,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC;IAKD,YAAY,CAAiC,MAAc;QAC1D,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,MAAM,CAAC,CA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WAAA,IAAA,wBAAW,GAAE,CAAA;;6CADD,oBAAc;;sDAO3B;AAQD;IANC,IAAA,eAAM,EAAC,SAAS,CAAC;IACjB,IAAA,8BAAiB,EAAC,cAAc,CAAC;IACjC,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,iEAAiE;KAC9E,CAAC;IACW,WAAA,IAAA,cAAK,EAAC,QAAQ,EAAE,sBAAa,CAAC,CAAA;IAAkB,WAAA,IAAA,wBAAW,GAAE,CAAA;;;;sDAKzE;8BAhDW,mBAAmB;IAJ/B,IAAA,iBAAO,EAAC,YAAY,CAAC;IACrB,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,YAAY,CAAC;IACxB,IAAA,kBAAS,EAAC,yBAAY,EAAE,oCAAgB,CAAC;qCAEM,2BAAgB;GADnD,mBAAmB,CAiD/B"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { Repository } from 'typeorm';
|
|
1
|
+
import { DataSource, Repository } from 'typeorm';
|
|
2
|
+
import { AuditService } from '../../audit/services/audit.service';
|
|
2
3
|
import { CreateModuleDto, UpdateModuleDto } from '../dto';
|
|
3
4
|
import { FeatureModule } from '../entities';
|
|
4
5
|
export declare class ModulesService {
|
|
5
6
|
private readonly moduleRepository;
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
private readonly audit;
|
|
8
|
+
private readonly dataSource;
|
|
9
|
+
constructor(moduleRepository: Repository<FeatureModule>, audit: AuditService, dataSource: DataSource);
|
|
10
|
+
create(dto: CreateModuleDto, actorId?: string): Promise<FeatureModule>;
|
|
8
11
|
findAll(): Promise<FeatureModule[]>;
|
|
9
12
|
findById(id: string): Promise<FeatureModule>;
|
|
10
13
|
findBySlug(slug: string): Promise<FeatureModule | null>;
|
|
11
|
-
update(id: string, dto: UpdateModuleDto): Promise<FeatureModule>;
|
|
12
|
-
delete(id: string): Promise<void>;
|
|
14
|
+
update(id: string, dto: UpdateModuleDto, actorId?: string): Promise<FeatureModule>;
|
|
15
|
+
delete(id: string, actorId?: string): Promise<void>;
|
|
13
16
|
}
|
|
14
17
|
//# sourceMappingURL=modules.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/services/modules.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"modules.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/services/modules.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,qBACa,cAAc;IAGzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAFV,gBAAgB,EAAE,UAAU,CAAC,aAAa,CAAC,EAC3C,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,UAAU;IAGlC,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAoBtE,OAAO,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAOnC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAS5C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAOvD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAmBlF,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBzD"}
|
|
@@ -16,19 +16,36 @@ exports.ModulesService = void 0;
|
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
17
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
18
|
const typeorm_2 = require("typeorm");
|
|
19
|
+
const audit_actions_1 = require("../../audit/constants/audit-actions");
|
|
20
|
+
const audit_service_1 = require("../../audit/services/audit.service");
|
|
19
21
|
const entities_1 = require("../entities");
|
|
20
22
|
let ModulesService = class ModulesService {
|
|
21
23
|
moduleRepository;
|
|
22
|
-
|
|
24
|
+
audit;
|
|
25
|
+
dataSource;
|
|
26
|
+
constructor(moduleRepository, audit, dataSource) {
|
|
23
27
|
this.moduleRepository = moduleRepository;
|
|
28
|
+
this.audit = audit;
|
|
29
|
+
this.dataSource = dataSource;
|
|
24
30
|
}
|
|
25
|
-
async create(dto) {
|
|
31
|
+
async create(dto, actorId) {
|
|
26
32
|
const existing = await this.moduleRepository.findOne({ where: { slug: dto.slug } });
|
|
27
33
|
if (existing) {
|
|
28
34
|
throw new common_1.ConflictException(`Module with slug '${dto.slug}' already exists`);
|
|
29
35
|
}
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
return this.dataSource.transaction(async (manager) => {
|
|
37
|
+
const repo = manager.getRepository(entities_1.FeatureModule);
|
|
38
|
+
const saved = await repo.save(repo.create(dto));
|
|
39
|
+
await this.audit.recordInTransaction(manager, {
|
|
40
|
+
action: audit_actions_1.AUDIT_ACTIONS.MODULE_CREATED,
|
|
41
|
+
actorType: 'ADMIN',
|
|
42
|
+
actorId,
|
|
43
|
+
resourceType: 'module',
|
|
44
|
+
resourceId: saved.id,
|
|
45
|
+
metadata: { slug: saved.slug },
|
|
46
|
+
});
|
|
47
|
+
return saved;
|
|
48
|
+
});
|
|
32
49
|
}
|
|
33
50
|
async findAll() {
|
|
34
51
|
return this.moduleRepository.find({
|
|
@@ -51,20 +68,49 @@ let ModulesService = class ModulesService {
|
|
|
51
68
|
relations: ['permissions'],
|
|
52
69
|
});
|
|
53
70
|
}
|
|
54
|
-
async update(id, dto) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
71
|
+
async update(id, dto, actorId) {
|
|
72
|
+
return this.dataSource.transaction(async (manager) => {
|
|
73
|
+
const repo = manager.getRepository(entities_1.FeatureModule);
|
|
74
|
+
const mod = await repo.findOne({ where: { id }, relations: ['permissions'] });
|
|
75
|
+
if (!mod)
|
|
76
|
+
throw new common_1.NotFoundException(`Module ${id} not found`);
|
|
77
|
+
Object.assign(mod, dto);
|
|
78
|
+
const saved = await repo.save(mod);
|
|
79
|
+
await this.audit.recordInTransaction(manager, {
|
|
80
|
+
action: audit_actions_1.AUDIT_ACTIONS.MODULE_UPDATED,
|
|
81
|
+
actorType: 'ADMIN',
|
|
82
|
+
actorId,
|
|
83
|
+
resourceType: 'module',
|
|
84
|
+
resourceId: saved.id,
|
|
85
|
+
metadata: { slug: saved.slug },
|
|
86
|
+
});
|
|
87
|
+
return saved;
|
|
88
|
+
});
|
|
58
89
|
}
|
|
59
|
-
async delete(id) {
|
|
60
|
-
|
|
61
|
-
|
|
90
|
+
async delete(id, actorId) {
|
|
91
|
+
await this.dataSource.transaction(async (manager) => {
|
|
92
|
+
const repo = manager.getRepository(entities_1.FeatureModule);
|
|
93
|
+
const mod = await repo.findOne({ where: { id } });
|
|
94
|
+
if (!mod)
|
|
95
|
+
throw new common_1.NotFoundException(`Module ${id} not found`);
|
|
96
|
+
await repo.remove(mod);
|
|
97
|
+
await this.audit.recordInTransaction(manager, {
|
|
98
|
+
action: audit_actions_1.AUDIT_ACTIONS.MODULE_DELETED,
|
|
99
|
+
actorType: 'ADMIN',
|
|
100
|
+
actorId,
|
|
101
|
+
resourceType: 'module',
|
|
102
|
+
resourceId: id,
|
|
103
|
+
metadata: { slug: mod.slug },
|
|
104
|
+
});
|
|
105
|
+
});
|
|
62
106
|
}
|
|
63
107
|
};
|
|
64
108
|
exports.ModulesService = ModulesService;
|
|
65
109
|
exports.ModulesService = ModulesService = __decorate([
|
|
66
110
|
(0, common_1.Injectable)(),
|
|
67
111
|
__param(0, (0, typeorm_1.InjectRepository)(entities_1.FeatureModule)),
|
|
68
|
-
__metadata("design:paramtypes", [typeorm_2.Repository
|
|
112
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
113
|
+
audit_service_1.AuditService,
|
|
114
|
+
typeorm_2.DataSource])
|
|
69
115
|
], ModulesService);
|
|
70
116
|
//# sourceMappingURL=modules.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.service.js","sourceRoot":"","sources":["../../../../src/modules/roles/services/modules.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAkF;AAClF,6CAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"modules.service.js","sourceRoot":"","sources":["../../../../src/modules/roles/services/modules.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAkF;AAClF,6CAAmD;AACnD,qCAAiD;AAEjD,uEAAoE;AACpE,sEAAkE;AAElE,0CAA4C;AAGrC,IAAM,cAAc,GAApB,MAAM,cAAc;IAGR;IACA;IACA;IAJlB,YAEkB,gBAA2C,EAC3C,KAAmB,EACnB,UAAsB;QAFtB,qBAAgB,GAAhB,gBAAgB,CAA2B;QAC3C,UAAK,GAAL,KAAK,CAAc;QACnB,eAAU,GAAV,UAAU,CAAY;IACrC,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,GAAoB,EAAE,OAAgB;QAClD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACpF,IAAI,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAAiB,C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D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YAClD,IAAI,CAAC,GAAG;gBAAE,MAAM,IAAI,0BAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;YAChE,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACvB,MAAM,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,OAAO,EAAE;gBAC7C,MAAM,EAAE,6BAAa,CAAC,cAAc;gBACpC,SAAS,EAAE,OAAO;gBAClB,OAAO;gBACP,YAAY,EAAE,QAAQ;gBACtB,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE;aAC5B,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAtFY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,0BAAgB,EAAC,wBAAa,CAAC,CAAA;qCACG,oBAAU;QACrB,4BAAY;QACP,oBAAU;GAL5B,cAAc,CAsF1B"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { Repository } from 'typeorm';
|
|
1
|
+
import { DataSource, Repository } from 'typeorm';
|
|
2
|
+
import { AuditService } from '../../audit/services/audit.service';
|
|
2
3
|
import { CreatePermissionDto, UpdatePermissionDto } from '../dto';
|
|
3
4
|
import { Permission } from '../entities';
|
|
4
5
|
import { RolesService } from './roles.service';
|
|
5
6
|
export declare class PermissionsService {
|
|
6
7
|
private readonly permissionRepository;
|
|
7
8
|
private readonly rolesService;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
private readonly audit;
|
|
10
|
+
private readonly dataSource;
|
|
11
|
+
constructor(permissionRepository: Repository<Permission>, rolesService: RolesService, audit: AuditService, dataSource: DataSource);
|
|
12
|
+
create(dto: CreatePermissionDto, actorId?: string): Promise<Permission>;
|
|
10
13
|
findAll(moduleId?: string): Promise<Permission[]>;
|
|
11
14
|
findById(id: string): Promise<Permission>;
|
|
12
15
|
findBySlug(slug: string): Promise<Permission | null>;
|
|
13
|
-
update(id: string, dto: UpdatePermissionDto): Promise<Permission>;
|
|
14
|
-
delete(id: string): Promise<void>;
|
|
16
|
+
update(id: string, dto: UpdatePermissionDto, actorId?: string): Promise<Permission>;
|
|
17
|
+
delete(id: string, actorId?: string): Promise<void>;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=permissions.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/services/permissions.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"permissions.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/roles/services/permissions.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,qBACa,kBAAkB;IAG7B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAHV,oBAAoB,EAAE,UAAU,CAAC,UAAU,CAAC,EAC5C,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,UAAU;IAGlC,MAAM,CAAC,GAAG,EAAE,mBAAmB,EAAE,OAA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