@colveor/core 1.0.1 → 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 +23 -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 +5 -0
- package/dist/modules/users/dto/user.dto.d.ts.map +1 -1
- package/dist/modules/users/dto/user.dto.js +46 -5
- 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
|
@@ -13,18 +13,38 @@ class SettingsSeed {
|
|
|
13
13
|
this.dataSource = dataSource;
|
|
14
14
|
this.repo = this.dataSource.getRepository(app_setting_entity_1.AppSetting);
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Security-posture keys always overwrite on seed so existing DBs pick up
|
|
18
|
+
* hardened defaults (also applied by migration 1785006199376).
|
|
19
|
+
*/
|
|
20
|
+
static FORCE_UPDATE_KEYS = new Set([
|
|
21
|
+
settings_keys_1.SETTING_KEYS.AUTH_EMAIL_REQUIRE_VERIFIED_TO_LOGIN,
|
|
22
|
+
settings_keys_1.SETTING_KEYS.AUTH_MFA_REQUIRED_FOR_METHODS,
|
|
23
|
+
settings_keys_1.SETTING_KEYS.TOKENS_ACCESS_EXPIRES_IN,
|
|
24
|
+
settings_keys_1.SETTING_KEYS.AUTH_OAUTH_REQUIRE_ID_TOKEN_NONCE,
|
|
25
|
+
]);
|
|
16
26
|
async run() {
|
|
17
27
|
console.log('🌱 Seeding app settings...');
|
|
18
28
|
const defaults = this.buildDefaults();
|
|
19
29
|
let inserted = 0;
|
|
30
|
+
let updated = 0;
|
|
20
31
|
for (const setting of defaults) {
|
|
21
32
|
const existing = await this.repo.findOne({ where: { key: setting.key } });
|
|
22
33
|
if (!existing) {
|
|
23
34
|
await this.repo.save(this.repo.create(setting));
|
|
24
35
|
inserted++;
|
|
25
36
|
}
|
|
37
|
+
else if (SettingsSeed.FORCE_UPDATE_KEYS.has(setting.key)) {
|
|
38
|
+
existing.value = setting.value;
|
|
39
|
+
existing.type = setting.type;
|
|
40
|
+
existing.description = setting.description;
|
|
41
|
+
existing.isEditable = setting.isEditable;
|
|
42
|
+
await this.repo.save(existing);
|
|
43
|
+
updated++;
|
|
44
|
+
}
|
|
26
45
|
}
|
|
27
|
-
console.log(` ✓ Inserted ${inserted} new
|
|
46
|
+
console.log(` ✓ Inserted ${inserted} new, force-updated ${updated} security setting(s) ` +
|
|
47
|
+
`(${defaults.length - inserted - updated} left unchanged)`);
|
|
28
48
|
console.log('✅ Settings seeding completed');
|
|
29
49
|
}
|
|
30
50
|
buildDefaults() {
|
|
@@ -95,6 +115,15 @@ class SettingsSeed {
|
|
|
95
115
|
description: 'Rolling window in seconds for the per-IP OTP rate limit. Independent from the per-identifier window.',
|
|
96
116
|
isEditable: true,
|
|
97
117
|
},
|
|
118
|
+
{
|
|
119
|
+
key: settings_keys_1.SETTING_KEYS.OTP_GLOBAL_DAILY_SEND_LIMIT,
|
|
120
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['otp.global_daily_send_limit']),
|
|
121
|
+
type: 'integer',
|
|
122
|
+
group: 'otp',
|
|
123
|
+
description: 'Soft global OTP send budget per UTC day (SMS drain / botnet). ' +
|
|
124
|
+
'API cannot set below 1000 (0/disable is ops/seed only).',
|
|
125
|
+
isEditable: true,
|
|
126
|
+
},
|
|
98
127
|
{
|
|
99
128
|
key: settings_keys_1.SETTING_KEYS.OTP_SMS_TEMPLATE,
|
|
100
129
|
value: settings_defaults_1.SETTING_DEFAULTS['otp.sms_template'],
|
|
@@ -149,7 +178,7 @@ class SettingsSeed {
|
|
|
149
178
|
value: settings_defaults_1.SETTING_DEFAULTS['tokens.access_expires_in'],
|
|
150
179
|
type: 'string',
|
|
151
180
|
group: 'tokens',
|
|
152
|
-
description: 'JWT access token expiry.
|
|
181
|
+
description: 'JWT access token expiry. Prefer ≤5m in production (e.g. "5m").',
|
|
153
182
|
isEditable: true,
|
|
154
183
|
},
|
|
155
184
|
{
|
|
@@ -181,8 +210,8 @@ class SettingsSeed {
|
|
|
181
210
|
group: 'test',
|
|
182
211
|
description: 'Test OTP identifiers that bypass rate limiting and delivery in non-production environments. ' +
|
|
183
212
|
'Schema: [{ identifier: string, channel: "sms"|"email", code: string }]. ' +
|
|
184
|
-
'Hard-disabled when NODE_ENV=production.
|
|
185
|
-
isEditable:
|
|
213
|
+
'Hard-disabled when NODE_ENV=production. API cannot edit (ops/seed only).',
|
|
214
|
+
isEditable: false,
|
|
186
215
|
},
|
|
187
216
|
// ─── Auth ─────────────────────────────────────────────────────────
|
|
188
217
|
{
|
|
@@ -190,33 +219,245 @@ class SettingsSeed {
|
|
|
190
219
|
value: process.env.AUTH_METHOD || settings_defaults_1.SETTING_DEFAULTS['auth.method'],
|
|
191
220
|
type: 'string',
|
|
192
221
|
group: 'auth',
|
|
193
|
-
description: 'Primary identity mechanism. "phone" = phone OTP required; "email" = email + password required.'
|
|
194
|
-
|
|
222
|
+
description: 'Primary identity mechanism. "phone" = phone OTP required; "email" = email + password required. ' +
|
|
223
|
+
'API cannot edit (auth surface risk); ops/seed/env only.',
|
|
224
|
+
isEditable: false,
|
|
195
225
|
},
|
|
196
226
|
{
|
|
197
227
|
key: settings_keys_1.SETTING_KEYS.AUTH_DEFAULT_ROLE_SLUG,
|
|
198
228
|
value: settings_defaults_1.SETTING_DEFAULTS['auth.default_role_slug'],
|
|
199
229
|
type: 'string',
|
|
200
230
|
group: 'auth',
|
|
201
|
-
description: 'Slug of the role automatically assigned to every self-registered user.
|
|
202
|
-
|
|
231
|
+
description: 'Slug of the role automatically assigned to every self-registered user. ' +
|
|
232
|
+
'API cannot edit (privilege-escalation risk); ops/seed only. Never use admin.',
|
|
233
|
+
isEditable: false,
|
|
203
234
|
},
|
|
204
235
|
{
|
|
205
236
|
key: settings_keys_1.SETTING_KEYS.AUTH_SUPPORTED_LOGIN_METHODS,
|
|
206
237
|
value: JSON.stringify(settings_defaults_1.SETTING_DEFAULTS['auth.supported_login_methods']),
|
|
207
238
|
type: 'json',
|
|
208
239
|
group: 'auth',
|
|
209
|
-
description: 'JSON array of enabled login credential shapes: ["phone", "email"].
|
|
210
|
-
|
|
240
|
+
description: 'JSON array of enabled login credential shapes: ["phone", "email", "oauth"]. ' +
|
|
241
|
+
'API cannot edit (auth surface expansion risk); ops/seed only.',
|
|
242
|
+
isEditable: false,
|
|
211
243
|
},
|
|
212
244
|
{
|
|
213
245
|
key: settings_keys_1.SETTING_KEYS.AUTH_SUPPORTED_REGISTRATION_METHODS,
|
|
214
246
|
value: JSON.stringify(settings_defaults_1.SETTING_DEFAULTS['auth.supported_registration_methods']),
|
|
215
247
|
type: 'json',
|
|
216
248
|
group: 'auth',
|
|
217
|
-
description: 'JSON array of enabled registration credential shapes: ["phone", "email"].
|
|
249
|
+
description: 'JSON array of enabled registration credential shapes: ["phone", "email", "oauth"]. ' +
|
|
250
|
+
'API cannot edit (auth surface expansion risk); ops/seed only.',
|
|
251
|
+
isEditable: false,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_EMAIL_REQUIRE_VERIFIED_TO_LOGIN,
|
|
255
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.email.require_verified_to_login']),
|
|
256
|
+
type: 'boolean',
|
|
257
|
+
group: 'auth',
|
|
258
|
+
description: 'When true, email/password login requires isEmailVerified. API cannot disable; ops/seed only.',
|
|
259
|
+
isEditable: false,
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_MFA_ENABLED,
|
|
263
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.mfa.enabled']),
|
|
264
|
+
type: 'boolean',
|
|
265
|
+
group: 'auth',
|
|
266
|
+
description: 'Global MFA kill-switch. When false, MFA challenges are never issued. ' +
|
|
267
|
+
'API cannot disable (account-takeover / factor-bypass risk); ops/seed only.',
|
|
268
|
+
isEditable: false,
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_MFA_REQUIRED_FOR_METHODS,
|
|
272
|
+
value: JSON.stringify(settings_defaults_1.SETTING_DEFAULTS['auth.mfa.required_for_methods']),
|
|
273
|
+
type: 'json',
|
|
274
|
+
group: 'auth',
|
|
275
|
+
description: 'JSON array of first-factor methods that trigger MFA when the user has MFA enrolled: ["email", "oauth"]. Empty array disables MFA challenges.',
|
|
276
|
+
isEditable: true,
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_MFA_CHALLENGE_TTL_SECONDS,
|
|
280
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.mfa.challenge_ttl_seconds']),
|
|
281
|
+
type: 'integer',
|
|
282
|
+
group: 'auth',
|
|
283
|
+
description: 'MFA challenge token lifetime in seconds.',
|
|
284
|
+
isEditable: true,
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_MFA_MAX_ATTEMPTS,
|
|
288
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.mfa.max_attempts']),
|
|
289
|
+
type: 'integer',
|
|
290
|
+
group: 'auth',
|
|
291
|
+
description: 'Max failed MFA attempts before temporary lockout.',
|
|
292
|
+
isEditable: true,
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_MFA_LOCKOUT_DURATION_SECONDS,
|
|
296
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.mfa.lockout_duration_seconds']),
|
|
297
|
+
type: 'integer',
|
|
298
|
+
group: 'auth',
|
|
299
|
+
description: 'MFA lockout duration in seconds after max failed attempts.',
|
|
300
|
+
isEditable: true,
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_MFA_TOTP_ISSUER,
|
|
304
|
+
value: settings_defaults_1.SETTING_DEFAULTS['auth.mfa.totp_issuer'],
|
|
305
|
+
type: 'string',
|
|
306
|
+
group: 'auth',
|
|
307
|
+
description: 'Issuer label shown in authenticator apps for TOTP enrollment.',
|
|
308
|
+
isEditable: true,
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_MFA_BACKUP_CODES_COUNT,
|
|
312
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.mfa.backup_codes_count']),
|
|
313
|
+
type: 'integer',
|
|
314
|
+
group: 'auth',
|
|
315
|
+
description: 'Number of one-time backup codes issued when enabling or regenerating MFA recovery codes.',
|
|
316
|
+
isEditable: true,
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_MFA_STEP_UP_TTL_SECONDS,
|
|
320
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.mfa.step_up_ttl_seconds']),
|
|
321
|
+
type: 'integer',
|
|
322
|
+
group: 'auth',
|
|
323
|
+
description: 'Lifetime in seconds for step-up MFA tokens from POST /auth/mfa/step-up.',
|
|
324
|
+
isEditable: true,
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_PROVIDERS,
|
|
328
|
+
value: JSON.stringify(settings_defaults_1.SETTING_DEFAULTS['auth.oauth.providers']),
|
|
329
|
+
type: 'json',
|
|
330
|
+
group: 'auth',
|
|
331
|
+
description: 'JSON array of enabled OAuth providers, e.g. ["google","apple","microsoft"]. ' +
|
|
332
|
+
'API cannot edit (auth surface expansion risk); ops/seed only.',
|
|
333
|
+
isEditable: false,
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_GOOGLE_CLIENT_IDS,
|
|
337
|
+
value: JSON.stringify(settings_defaults_1.SETTING_DEFAULTS['auth.oauth.google.client_ids']),
|
|
338
|
+
type: 'json',
|
|
339
|
+
group: 'auth',
|
|
340
|
+
description: 'JSON array of Google OAuth client IDs allowed to mint ID tokens (iOS / Android / Web). ' +
|
|
341
|
+
'API cannot edit (audience phishing risk); ops/seed only.',
|
|
342
|
+
isEditable: false,
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_GOOGLE_CLIENT_SECRET,
|
|
346
|
+
value: settings_defaults_1.SETTING_DEFAULTS['auth.oauth.google.client_secret'],
|
|
347
|
+
type: 'string',
|
|
348
|
+
group: 'auth',
|
|
349
|
+
description: 'Google OAuth client secret for web authorization-code + PKCE exchange. API cannot edit (ops/seed only).',
|
|
350
|
+
isEditable: false,
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_GOOGLE_HOSTED_DOMAIN,
|
|
354
|
+
value: settings_defaults_1.SETTING_DEFAULTS['auth.oauth.google.hosted_domain'],
|
|
355
|
+
type: 'string',
|
|
356
|
+
group: 'auth',
|
|
357
|
+
description: 'Optional Google Workspace domain restriction (hd claim). Empty = no restriction. ' +
|
|
358
|
+
'API cannot edit (trust-boundary widen risk); ops/seed only.',
|
|
359
|
+
isEditable: false,
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_APPLE_CLIENT_IDS,
|
|
363
|
+
value: JSON.stringify(settings_defaults_1.SETTING_DEFAULTS['auth.oauth.apple.client_ids']),
|
|
364
|
+
type: 'json',
|
|
365
|
+
group: 'auth',
|
|
366
|
+
description: 'JSON array of Apple Services IDs / bundle IDs allowed as ID token audience. ' +
|
|
367
|
+
'API cannot edit (audience phishing risk); ops/seed only.',
|
|
368
|
+
isEditable: false,
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_MICROSOFT_CLIENT_IDS,
|
|
372
|
+
value: JSON.stringify(settings_defaults_1.SETTING_DEFAULTS['auth.oauth.microsoft.client_ids']),
|
|
373
|
+
type: 'json',
|
|
374
|
+
group: 'auth',
|
|
375
|
+
description: 'JSON array of Microsoft app (client) IDs allowed as ID token audience. ' +
|
|
376
|
+
'API cannot edit (audience phishing risk); ops/seed only.',
|
|
377
|
+
isEditable: false,
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_MICROSOFT_CLIENT_SECRET,
|
|
381
|
+
value: settings_defaults_1.SETTING_DEFAULTS['auth.oauth.microsoft.client_secret'],
|
|
382
|
+
type: 'string',
|
|
383
|
+
group: 'auth',
|
|
384
|
+
description: 'Microsoft OAuth client secret for web authorization-code + PKCE exchange. API cannot edit (ops/seed only).',
|
|
385
|
+
isEditable: false,
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_MICROSOFT_TENANT,
|
|
389
|
+
value: settings_defaults_1.SETTING_DEFAULTS['auth.oauth.microsoft.tenant'],
|
|
390
|
+
type: 'string',
|
|
391
|
+
group: 'auth',
|
|
392
|
+
description: 'Microsoft Entra tenant: common | organizations | consumers | tenant GUID. ' +
|
|
393
|
+
'API cannot edit (trust-boundary widen risk); ops/seed only.',
|
|
394
|
+
isEditable: false,
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_REDIRECT_URIS,
|
|
398
|
+
value: JSON.stringify(settings_defaults_1.SETTING_DEFAULTS['auth.oauth.redirect_uris']),
|
|
399
|
+
type: 'json',
|
|
400
|
+
group: 'auth',
|
|
401
|
+
description: 'JSON array of allowed OAuth redirect URIs for web start/callback. ' +
|
|
402
|
+
'API cannot edit (open-redirect / callback hijack risk); ops/seed only.',
|
|
403
|
+
isEditable: false,
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_AUTO_LINK_VERIFIED_EMAIL,
|
|
407
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.oauth.auto_link_verified_email']),
|
|
408
|
+
type: 'boolean',
|
|
409
|
+
group: 'auth',
|
|
410
|
+
description: 'When true, a verified OAuth email matching an existing account auto-links on first OAuth login. Default false (returns 409). API cannot enable this.',
|
|
411
|
+
isEditable: false,
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_OAUTH_REQUIRE_ID_TOKEN_NONCE,
|
|
415
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.oauth.require_id_token_nonce']),
|
|
416
|
+
type: 'boolean',
|
|
417
|
+
group: 'auth',
|
|
418
|
+
description: 'Require matching nonce on OAuth ID-token login/register/link. API cannot disable (replay risk); ops/seed only.',
|
|
419
|
+
isEditable: false,
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_PASSWORD_RESET_PHONE_COOLDOWN_SECONDS,
|
|
423
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.password_reset.phone_cooldown_seconds']),
|
|
424
|
+
type: 'integer',
|
|
425
|
+
group: 'auth',
|
|
426
|
+
description: 'Cool-off between phone OTP password resets (SIM-swap friction). API cannot set below 3600s.',
|
|
218
427
|
isEditable: true,
|
|
219
428
|
},
|
|
429
|
+
{
|
|
430
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_TURNSTILE_ENABLED,
|
|
431
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.turnstile.enabled']),
|
|
432
|
+
type: 'boolean',
|
|
433
|
+
group: 'auth',
|
|
434
|
+
description: 'Require Cloudflare Turnstile on send-otp/login/register/forgot. API cannot disable (ops/env only).',
|
|
435
|
+
isEditable: false,
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_TURNSTILE_SITE_KEY,
|
|
439
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.turnstile.site_key']),
|
|
440
|
+
type: 'string',
|
|
441
|
+
group: 'auth',
|
|
442
|
+
description: 'Cloudflare Turnstile site key (public).',
|
|
443
|
+
isEditable: true,
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_TURNSTILE_SECRET_KEY,
|
|
447
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.turnstile.secret_key']),
|
|
448
|
+
type: 'string',
|
|
449
|
+
group: 'auth',
|
|
450
|
+
description: 'Cloudflare Turnstile secret (encrypted at rest when ENCRYPTION_KEY set). API cannot edit (ops/seed only).',
|
|
451
|
+
isEditable: false,
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_DPOP_MODE,
|
|
455
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.dpop.mode']),
|
|
456
|
+
type: 'string',
|
|
457
|
+
group: 'auth',
|
|
458
|
+
description: 'DPoP mode: off | optional | required. Production uses AUTH_DPOP_MODE env; API cannot weaken.',
|
|
459
|
+
isEditable: false,
|
|
460
|
+
},
|
|
220
461
|
// ─── Login rate limiting & lockout ────────────────────────────────
|
|
221
462
|
{
|
|
222
463
|
key: settings_keys_1.SETTING_KEYS.LOGIN_IP_RATE_LIMIT_MAX,
|
|
@@ -234,6 +475,54 @@ class SettingsSeed {
|
|
|
234
475
|
description: 'Rolling window in seconds for the per-IP login rate limit.',
|
|
235
476
|
isEditable: true,
|
|
236
477
|
},
|
|
478
|
+
{
|
|
479
|
+
key: settings_keys_1.SETTING_KEYS.REFRESH_IP_RATE_LIMIT_MAX,
|
|
480
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['refresh.ip_rate_limit_max']),
|
|
481
|
+
type: 'integer',
|
|
482
|
+
group: 'login',
|
|
483
|
+
description: 'Max token refresh attempts per IP within the refresh rate-limit window.',
|
|
484
|
+
isEditable: true,
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
key: settings_keys_1.SETTING_KEYS.REFRESH_IP_RATE_LIMIT_WINDOW_SECONDS,
|
|
488
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['refresh.ip_rate_limit_window_seconds']),
|
|
489
|
+
type: 'integer',
|
|
490
|
+
group: 'login',
|
|
491
|
+
description: 'Rolling window in seconds for the per-IP refresh rate limit.',
|
|
492
|
+
isEditable: true,
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_PUBLIC_IP_RATE_LIMIT_MAX,
|
|
496
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.public_ip_rate_limit_max']),
|
|
497
|
+
type: 'integer',
|
|
498
|
+
group: 'login',
|
|
499
|
+
description: 'Max attempts per IP for register, forgot-password, and OAuth start within the window.',
|
|
500
|
+
isEditable: true,
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_PUBLIC_IP_RATE_LIMIT_WINDOW_SECONDS,
|
|
504
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.public_ip_rate_limit_window_seconds']),
|
|
505
|
+
type: 'integer',
|
|
506
|
+
group: 'login',
|
|
507
|
+
description: 'Rolling window in seconds for the public-auth IP rate limit.',
|
|
508
|
+
isEditable: true,
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
key: settings_keys_1.SETTING_KEYS.PROFILE_PUBLIC_IP_RATE_LIMIT_MAX,
|
|
512
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['profile.public_ip_rate_limit_max']),
|
|
513
|
+
type: 'integer',
|
|
514
|
+
group: 'profile',
|
|
515
|
+
description: 'Max GET /profile/u/:username attempts per IP within the rate-limit window before 429.',
|
|
516
|
+
isEditable: true,
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
key: settings_keys_1.SETTING_KEYS.PROFILE_PUBLIC_IP_RATE_LIMIT_WINDOW_SECONDS,
|
|
520
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['profile.public_ip_rate_limit_window_seconds']),
|
|
521
|
+
type: 'integer',
|
|
522
|
+
group: 'profile',
|
|
523
|
+
description: 'Rolling window in seconds for the public-profile IP rate limit.',
|
|
524
|
+
isEditable: true,
|
|
525
|
+
},
|
|
237
526
|
{
|
|
238
527
|
key: settings_keys_1.SETTING_KEYS.LOGIN_LOCKOUT_MAX_ATTEMPTS,
|
|
239
528
|
value: String(settings_defaults_1.SETTING_DEFAULTS['login.lockout_max_attempts']),
|
|
@@ -250,6 +539,71 @@ class SettingsSeed {
|
|
|
250
539
|
description: 'How long (seconds) an identifier remains locked after exceeding the max failed attempts.',
|
|
251
540
|
isEditable: true,
|
|
252
541
|
},
|
|
542
|
+
{
|
|
543
|
+
key: settings_keys_1.SETTING_KEYS.LOGIN_LAST_LOGIN_MIN_INTERVAL_SECONDS,
|
|
544
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['login.last_login_min_interval_seconds']),
|
|
545
|
+
type: 'integer',
|
|
546
|
+
group: 'login',
|
|
547
|
+
description: 'Minimum seconds between last-login DB updates for the same user (0 = every login).',
|
|
548
|
+
isEditable: true,
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
key: settings_keys_1.SETTING_KEYS.SESSIONS_REFRESH_TOKEN_RETENTION_DAYS,
|
|
552
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['sessions.refresh_token_retention_days']),
|
|
553
|
+
type: 'integer',
|
|
554
|
+
group: 'sessions',
|
|
555
|
+
description: 'Days to keep revoked or expired refresh tokens before hard-delete purge.',
|
|
556
|
+
isEditable: true,
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
key: settings_keys_1.SETTING_KEYS.SESSIONS_LIST_PAGE_SIZE,
|
|
560
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['sessions.list_page_size']),
|
|
561
|
+
type: 'integer',
|
|
562
|
+
group: 'sessions',
|
|
563
|
+
description: 'Default page size for GET /auth/sessions.',
|
|
564
|
+
isEditable: true,
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
key: settings_keys_1.SETTING_KEYS.SESSIONS_LIST_MAX_PAGE_SIZE,
|
|
568
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['sessions.list_max_page_size']),
|
|
569
|
+
type: 'integer',
|
|
570
|
+
group: 'sessions',
|
|
571
|
+
description: 'Maximum page size for GET /auth/sessions.',
|
|
572
|
+
isEditable: true,
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
key: settings_keys_1.SETTING_KEYS.AUTH_PASSWORD_RESET_AUDIT_RETENTION_DAYS,
|
|
576
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['auth.password_reset_audit_retention_days']),
|
|
577
|
+
type: 'integer',
|
|
578
|
+
group: 'auth',
|
|
579
|
+
description: 'Days to retain password-reset audit rows before hard-delete.',
|
|
580
|
+
isEditable: true,
|
|
581
|
+
},
|
|
582
|
+
// ─── Audit ────────────────────────────────────────────────────────
|
|
583
|
+
{
|
|
584
|
+
key: settings_keys_1.SETTING_KEYS.AUDIT_HOT_RETENTION_DAYS,
|
|
585
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['audit.hot_retention_days']),
|
|
586
|
+
type: 'integer',
|
|
587
|
+
group: 'audit',
|
|
588
|
+
description: 'Days to keep audit events in Postgres before cold archive.',
|
|
589
|
+
isEditable: true,
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
key: settings_keys_1.SETTING_KEYS.AUDIT_ARCHIVE_ENABLED,
|
|
593
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['audit.archive_enabled']),
|
|
594
|
+
type: 'boolean',
|
|
595
|
+
group: 'audit',
|
|
596
|
+
description: 'Enable daily R2 archive + purge of aged non-legal-hold audit events.',
|
|
597
|
+
isEditable: true,
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
key: settings_keys_1.SETTING_KEYS.AUDIT_EXPORT_MAX_ROWS,
|
|
601
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['audit.export_max_rows']),
|
|
602
|
+
type: 'integer',
|
|
603
|
+
group: 'audit',
|
|
604
|
+
description: 'Maximum rows returned by GET /audit/events/export.',
|
|
605
|
+
isEditable: true,
|
|
606
|
+
},
|
|
253
607
|
// ─── Health ───────────────────────────────────────────────────────
|
|
254
608
|
{
|
|
255
609
|
key: settings_keys_1.SETTING_KEYS.HEALTH_MAX_HEAP_MB,
|
|
@@ -298,8 +652,8 @@ class SettingsSeed {
|
|
|
298
652
|
value: process.env.SMS_TWILIO_AUTH_TOKEN || settings_defaults_1.SETTING_DEFAULTS['sms.twilio_auth_token'],
|
|
299
653
|
type: 'string',
|
|
300
654
|
group: 'sms',
|
|
301
|
-
description: 'Twilio auth token.
|
|
302
|
-
isEditable:
|
|
655
|
+
description: 'Twilio auth token. API cannot edit (ops/seed only).',
|
|
656
|
+
isEditable: false,
|
|
303
657
|
},
|
|
304
658
|
{
|
|
305
659
|
key: settings_keys_1.SETTING_KEYS.SMS_TWILIO_FROM_NUMBER,
|
|
@@ -315,8 +669,8 @@ class SettingsSeed {
|
|
|
315
669
|
value: process.env.SMS_TERMII_API_KEY || settings_defaults_1.SETTING_DEFAULTS['sms.termii_api_key'],
|
|
316
670
|
type: 'string',
|
|
317
671
|
group: 'sms',
|
|
318
|
-
description: 'Termii API key.
|
|
319
|
-
isEditable:
|
|
672
|
+
description: 'Termii API key. API cannot edit (ops/seed only).',
|
|
673
|
+
isEditable: false,
|
|
320
674
|
},
|
|
321
675
|
{
|
|
322
676
|
key: settings_keys_1.SETTING_KEYS.SMS_TERMII_SENDER_ID,
|
|
@@ -331,8 +685,8 @@ class SettingsSeed {
|
|
|
331
685
|
value: process.env.SMS_INFOBIP_API_KEY || settings_defaults_1.SETTING_DEFAULTS['sms.infobip_api_key'],
|
|
332
686
|
type: 'string',
|
|
333
687
|
group: 'sms',
|
|
334
|
-
description: 'Infobip API key.
|
|
335
|
-
isEditable:
|
|
688
|
+
description: 'Infobip API key. API cannot edit (ops/seed only).',
|
|
689
|
+
isEditable: false,
|
|
336
690
|
},
|
|
337
691
|
{
|
|
338
692
|
key: settings_keys_1.SETTING_KEYS.SMS_INFOBIP_BASE_URL,
|
|
@@ -355,8 +709,8 @@ class SettingsSeed {
|
|
|
355
709
|
value: process.env.SMS_SMARTSMS_TOKEN || settings_defaults_1.SETTING_DEFAULTS['sms.smartsms_token'],
|
|
356
710
|
type: 'string',
|
|
357
711
|
group: 'sms',
|
|
358
|
-
description: 'SmartSMS auth token.
|
|
359
|
-
isEditable:
|
|
712
|
+
description: 'SmartSMS auth token. API cannot edit (ops/seed only).',
|
|
713
|
+
isEditable: false,
|
|
360
714
|
},
|
|
361
715
|
{
|
|
362
716
|
key: settings_keys_1.SETTING_KEYS.SMS_SMARTSMS_SENDER_ID,
|
|
@@ -405,8 +759,8 @@ class SettingsSeed {
|
|
|
405
759
|
value: process.env.EMAIL_SMTP_PASS || settings_defaults_1.SETTING_DEFAULTS['email.smtp_pass'],
|
|
406
760
|
type: 'string',
|
|
407
761
|
group: 'email',
|
|
408
|
-
description: 'SMTP password.
|
|
409
|
-
isEditable:
|
|
762
|
+
description: 'SMTP password. API cannot edit (ops/seed only).',
|
|
763
|
+
isEditable: false,
|
|
410
764
|
},
|
|
411
765
|
{
|
|
412
766
|
key: settings_keys_1.SETTING_KEYS.TEMPLATES_INVITE_SMS,
|
|
@@ -427,6 +781,46 @@ class SettingsSeed {
|
|
|
427
781
|
description: 'Required number of digits for user PINs.',
|
|
428
782
|
isEditable: true,
|
|
429
783
|
},
|
|
784
|
+
{
|
|
785
|
+
key: settings_keys_1.SETTING_KEYS.PIN_MAX_ATTEMPTS,
|
|
786
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['pin.max_attempts']),
|
|
787
|
+
type: 'integer',
|
|
788
|
+
group: 'pin',
|
|
789
|
+
description: 'Wrong PIN attempts before lockout.',
|
|
790
|
+
isEditable: true,
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
key: settings_keys_1.SETTING_KEYS.PIN_LOCKOUT_DURATION_SECONDS,
|
|
794
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['pin.lockout_duration_seconds']),
|
|
795
|
+
type: 'integer',
|
|
796
|
+
group: 'pin',
|
|
797
|
+
description: 'PIN lockout duration in seconds.',
|
|
798
|
+
isEditable: true,
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
key: settings_keys_1.SETTING_KEYS.PIN_VERIFY_RATE_LIMIT_MAX,
|
|
802
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['pin.verify_rate_limit_max']),
|
|
803
|
+
type: 'integer',
|
|
804
|
+
group: 'pin',
|
|
805
|
+
description: 'Max PIN verify attempts per user within the rate-limit window.',
|
|
806
|
+
isEditable: true,
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
key: settings_keys_1.SETTING_KEYS.PIN_VERIFY_RATE_LIMIT_WINDOW_SECONDS,
|
|
810
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['pin.verify_rate_limit_window_seconds']),
|
|
811
|
+
type: 'integer',
|
|
812
|
+
group: 'pin',
|
|
813
|
+
description: 'Rolling window in seconds for per-user PIN verify rate limit.',
|
|
814
|
+
isEditable: true,
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
key: settings_keys_1.SETTING_KEYS.PIN_LAST_VERIFIED_MIN_INTERVAL_SECONDS,
|
|
818
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['pin.last_verified_min_interval_seconds']),
|
|
819
|
+
type: 'integer',
|
|
820
|
+
group: 'pin',
|
|
821
|
+
description: 'Minimum seconds between lastVerifiedAt writes (0 = write every verify).',
|
|
822
|
+
isEditable: true,
|
|
823
|
+
},
|
|
430
824
|
// ─── Firebase ─────────────────────────────────────────────────────
|
|
431
825
|
{
|
|
432
826
|
key: settings_keys_1.SETTING_KEYS.FIREBASE_PROJECT_ID,
|
|
@@ -449,16 +843,16 @@ class SettingsSeed {
|
|
|
449
843
|
value: process.env.FIREBASE_PRIVATE_KEY || settings_defaults_1.SETTING_DEFAULTS['firebase.private_key'],
|
|
450
844
|
type: 'string',
|
|
451
845
|
group: 'firebase',
|
|
452
|
-
description: 'Firebase service account private key (PEM).
|
|
453
|
-
isEditable:
|
|
846
|
+
description: 'Firebase service account private key (PEM). API cannot edit (ops/seed only).',
|
|
847
|
+
isEditable: false,
|
|
454
848
|
},
|
|
455
849
|
{
|
|
456
850
|
key: settings_keys_1.SETTING_KEYS.FIREBASE_API_KEY,
|
|
457
851
|
value: process.env.FIREBASE_API_KEY || settings_defaults_1.SETTING_DEFAULTS['firebase.api_key'],
|
|
458
852
|
type: 'string',
|
|
459
853
|
group: 'firebase',
|
|
460
|
-
description: 'Firebase web API key (
|
|
461
|
-
isEditable:
|
|
854
|
+
description: 'Firebase web API key. API cannot edit (ops/seed only); redacted on GET.',
|
|
855
|
+
isEditable: false,
|
|
462
856
|
},
|
|
463
857
|
// ─── Storage (Cloudflare R2) ──────────────────────────────────────
|
|
464
858
|
{
|
|
@@ -539,6 +933,87 @@ class SettingsSeed {
|
|
|
539
933
|
description: 'Rolling window in seconds for per-user upload rate limit.',
|
|
540
934
|
isEditable: true,
|
|
541
935
|
},
|
|
936
|
+
// ─── Realtime (WebSocket) ──────────────────────────────────────────
|
|
937
|
+
{
|
|
938
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_MAX_PAYLOAD_BYTES,
|
|
939
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.max_payload_bytes']),
|
|
940
|
+
type: 'integer',
|
|
941
|
+
group: 'realtime',
|
|
942
|
+
description: 'Max JSON payload bytes for realtime emit/inbound.',
|
|
943
|
+
isEditable: true,
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_PRESENCE_TTL_SECONDS,
|
|
947
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.presence_ttl_seconds']),
|
|
948
|
+
type: 'integer',
|
|
949
|
+
group: 'realtime',
|
|
950
|
+
description: 'Presence key TTL / heartbeat window (seconds).',
|
|
951
|
+
isEditable: true,
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_HANDSHAKE_IP_RATE_LIMIT_MAX,
|
|
955
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.handshake.ip_rate_limit_max']),
|
|
956
|
+
type: 'integer',
|
|
957
|
+
group: 'realtime',
|
|
958
|
+
description: 'Max handshake attempts per IP within the rate-limit window.',
|
|
959
|
+
isEditable: true,
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_HANDSHAKE_IP_RATE_LIMIT_WINDOW_SECONDS,
|
|
963
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.handshake.ip_rate_limit_window_seconds']),
|
|
964
|
+
type: 'integer',
|
|
965
|
+
group: 'realtime',
|
|
966
|
+
description: 'Rolling window (seconds) for per-IP handshake rate limit.',
|
|
967
|
+
isEditable: true,
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_EMIT_USER_RATE_LIMIT_MAX,
|
|
971
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.emit.user_rate_limit_max']),
|
|
972
|
+
type: 'integer',
|
|
973
|
+
group: 'realtime',
|
|
974
|
+
description: 'Max rate-limited server emits per user (only when emit opts.rateLimit=true).',
|
|
975
|
+
isEditable: true,
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_EMIT_USER_RATE_LIMIT_WINDOW_SECONDS,
|
|
979
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.emit.user_rate_limit_window_seconds']),
|
|
980
|
+
type: 'integer',
|
|
981
|
+
group: 'realtime',
|
|
982
|
+
description: 'Rolling window (seconds) for per-user emit rate limit.',
|
|
983
|
+
isEditable: true,
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_INBOUND_USER_RATE_LIMIT_MAX,
|
|
987
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.inbound.user_rate_limit_max']),
|
|
988
|
+
type: 'integer',
|
|
989
|
+
group: 'realtime',
|
|
990
|
+
description: 'Max client→server inbound events per user in the window.',
|
|
991
|
+
isEditable: true,
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_INBOUND_USER_RATE_LIMIT_WINDOW_SECONDS,
|
|
995
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.inbound.user_rate_limit_window_seconds']),
|
|
996
|
+
type: 'integer',
|
|
997
|
+
group: 'realtime',
|
|
998
|
+
description: 'Rolling window (seconds) for per-user inbound rate limit.',
|
|
999
|
+
isEditable: true,
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_EMIT_NOTIFICATION_CREATED,
|
|
1003
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.emit.notification_created']),
|
|
1004
|
+
type: 'boolean',
|
|
1005
|
+
group: 'realtime',
|
|
1006
|
+
description: 'Emit notification.created over websocket when channel includes WEBSOCKET.',
|
|
1007
|
+
isEditable: true,
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
key: settings_keys_1.SETTING_KEYS.REALTIME_EMIT_SESSION_REVOKED,
|
|
1011
|
+
value: String(settings_defaults_1.SETTING_DEFAULTS['realtime.emit.session_revoked']),
|
|
1012
|
+
type: 'boolean',
|
|
1013
|
+
group: 'realtime',
|
|
1014
|
+
description: 'Emit session.revoked before force-disconnecting sockets.',
|
|
1015
|
+
isEditable: true,
|
|
1016
|
+
},
|
|
542
1017
|
];
|
|
543
1018
|
}
|
|
544
1019
|
buildOtpUsers(otpCodeLength) {
|