@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.
Files changed (837) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +6 -0
  3. package/dist/bootstrap/bootstrap-colveor-app.d.ts.map +1 -1
  4. package/dist/bootstrap/bootstrap-colveor-app.js +22 -3
  5. package/dist/bootstrap/bootstrap-colveor-app.js.map +1 -1
  6. package/dist/common/decorators/index.d.ts +6 -0
  7. package/dist/common/decorators/index.d.ts.map +1 -1
  8. package/dist/common/decorators/index.js +8 -1
  9. package/dist/common/decorators/index.js.map +1 -1
  10. package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts +9 -0
  11. package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts.map +1 -0
  12. package/dist/common/decorators/ip-rate-limit-bucket.decorator.js +12 -0
  13. package/dist/common/decorators/ip-rate-limit-bucket.decorator.js.map +1 -0
  14. package/dist/common/guards/login-ip-rate-limit.guard.d.ts +12 -6
  15. package/dist/common/guards/login-ip-rate-limit.guard.d.ts.map +1 -1
  16. package/dist/common/guards/login-ip-rate-limit.guard.js +65 -21
  17. package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -1
  18. package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +3 -2
  19. package/dist/common/guards/otp-ip-rate-limit.guard.d.ts.map +1 -1
  20. package/dist/common/guards/otp-ip-rate-limit.guard.js +17 -15
  21. package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -1
  22. package/dist/common/guards/permissions.guard.d.ts.map +1 -1
  23. package/dist/common/guards/permissions.guard.js +12 -2
  24. package/dist/common/guards/permissions.guard.js.map +1 -1
  25. package/dist/common/interceptors/timeout.interceptor.d.ts +1 -1
  26. package/dist/common/interceptors/timeout.interceptor.d.ts.map +1 -1
  27. package/dist/common/interceptors/timeout.interceptor.js +5 -1
  28. package/dist/common/interceptors/timeout.interceptor.js.map +1 -1
  29. package/dist/common/interfaces/request-user.d.ts +4 -3
  30. package/dist/common/interfaces/request-user.d.ts.map +1 -1
  31. package/dist/common/utils/cache-version.util.d.ts +12 -0
  32. package/dist/common/utils/cache-version.util.d.ts.map +1 -0
  33. package/dist/common/utils/cache-version.util.js +34 -0
  34. package/dist/common/utils/cache-version.util.js.map +1 -0
  35. package/dist/common/utils/postgres-error.util.d.ts +5 -0
  36. package/dist/common/utils/postgres-error.util.d.ts.map +1 -0
  37. package/dist/common/utils/postgres-error.util.js +13 -0
  38. package/dist/common/utils/postgres-error.util.js.map +1 -0
  39. package/dist/common/utils/singleflight.util.d.ts +6 -0
  40. package/dist/common/utils/singleflight.util.d.ts.map +1 -0
  41. package/dist/common/utils/singleflight.util.js +21 -0
  42. package/dist/common/utils/singleflight.util.js.map +1 -0
  43. package/dist/common/validators/is-exclusive-auth-params.validator.js +1 -1
  44. package/dist/common/validators/is-exclusive-auth-params.validator.js.map +1 -1
  45. package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js +1 -1
  46. package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js.map +1 -1
  47. package/dist/config/app.config.d.ts +38 -0
  48. package/dist/config/app.config.d.ts.map +1 -1
  49. package/dist/config/app.config.js +24 -0
  50. package/dist/config/app.config.js.map +1 -1
  51. package/dist/config/database.config.d.ts +6 -0
  52. package/dist/config/database.config.d.ts.map +1 -1
  53. package/dist/config/database.config.js +3 -0
  54. package/dist/config/database.config.js.map +1 -1
  55. package/dist/config/env-flags.util.d.ts +4 -0
  56. package/dist/config/env-flags.util.d.ts.map +1 -1
  57. package/dist/config/env-flags.util.js +7 -0
  58. package/dist/config/env-flags.util.js.map +1 -1
  59. package/dist/config/env.validation.d.ts +24 -1
  60. package/dist/config/env.validation.d.ts.map +1 -1
  61. package/dist/config/env.validation.js +92 -2
  62. package/dist/config/env.validation.js.map +1 -1
  63. package/dist/config/in-memory-redis.client.d.ts +23 -4
  64. package/dist/config/in-memory-redis.client.d.ts.map +1 -1
  65. package/dist/config/in-memory-redis.client.js +148 -4
  66. package/dist/config/in-memory-redis.client.js.map +1 -1
  67. package/dist/config/redis.module.d.ts.map +1 -1
  68. package/dist/config/redis.module.js +5 -0
  69. package/dist/config/redis.module.js.map +1 -1
  70. package/dist/core.module.d.ts +5 -0
  71. package/dist/core.module.d.ts.map +1 -1
  72. package/dist/core.module.js +5 -0
  73. package/dist/core.module.js.map +1 -1
  74. package/dist/database/migrations/1785006199371-auth-mfa-oauth.d.ts +7 -0
  75. package/dist/database/migrations/1785006199371-auth-mfa-oauth.d.ts.map +1 -0
  76. package/dist/database/migrations/1785006199371-auth-mfa-oauth.js +24 -0
  77. package/dist/database/migrations/1785006199371-auth-mfa-oauth.js.map +1 -0
  78. package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.d.ts +7 -0
  79. package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.d.ts.map +1 -0
  80. package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.js +16 -0
  81. package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.js.map +1 -0
  82. package/dist/database/migrations/1785006199373-auth-gap-fixes.d.ts +7 -0
  83. package/dist/database/migrations/1785006199373-auth-gap-fixes.d.ts.map +1 -0
  84. package/dist/database/migrations/1785006199373-auth-gap-fixes.js +14 -0
  85. package/dist/database/migrations/1785006199373-auth-gap-fixes.js.map +1 -0
  86. package/dist/database/migrations/1785006199374-auth-sessions-indexes.d.ts +13 -0
  87. package/dist/database/migrations/1785006199374-auth-sessions-indexes.d.ts.map +1 -0
  88. package/dist/database/migrations/1785006199374-auth-sessions-indexes.js +35 -0
  89. package/dist/database/migrations/1785006199374-auth-sessions-indexes.js.map +1 -0
  90. package/dist/database/migrations/1785006199375-auth-identity-and-audit.d.ts +11 -0
  91. package/dist/database/migrations/1785006199375-auth-identity-and-audit.d.ts.map +1 -0
  92. package/dist/database/migrations/1785006199375-auth-identity-and-audit.js +60 -0
  93. package/dist/database/migrations/1785006199375-auth-identity-and-audit.js.map +1 -0
  94. package/dist/database/migrations/1785006199376-auth-settings-security-defaults.d.ts +14 -0
  95. package/dist/database/migrations/1785006199376-auth-settings-security-defaults.d.ts.map +1 -0
  96. package/dist/database/migrations/1785006199376-auth-settings-security-defaults.js +39 -0
  97. package/dist/database/migrations/1785006199376-auth-settings-security-defaults.js.map +1 -0
  98. package/dist/database/migrations/1785006199377-auth-security-hardening.d.ts +13 -0
  99. package/dist/database/migrations/1785006199377-auth-security-hardening.d.ts.map +1 -0
  100. package/dist/database/migrations/1785006199377-auth-security-hardening.js +69 -0
  101. package/dist/database/migrations/1785006199377-auth-security-hardening.js.map +1 -0
  102. package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.d.ts +11 -0
  103. package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.d.ts.map +1 -0
  104. package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.js +51 -0
  105. package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.js.map +1 -0
  106. package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.d.ts +12 -0
  107. package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.d.ts.map +1 -0
  108. package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.js +37 -0
  109. package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.js.map +1 -0
  110. package/dist/database/migrations/1785006199380-auth-remaining-gaps.d.ts +12 -0
  111. package/dist/database/migrations/1785006199380-auth-remaining-gaps.d.ts.map +1 -0
  112. package/dist/database/migrations/1785006199380-auth-remaining-gaps.js +74 -0
  113. package/dist/database/migrations/1785006199380-auth-remaining-gaps.js.map +1 -0
  114. package/dist/database/migrations/1785006199381-settings-blast-radius.d.ts +12 -0
  115. package/dist/database/migrations/1785006199381-settings-blast-radius.d.ts.map +1 -0
  116. package/dist/database/migrations/1785006199381-settings-blast-radius.js +52 -0
  117. package/dist/database/migrations/1785006199381-settings-blast-radius.js.map +1 -0
  118. package/dist/database/migrations/1785006199382-oauth-client-ids-lock.d.ts +11 -0
  119. package/dist/database/migrations/1785006199382-oauth-client-ids-lock.d.ts.map +1 -0
  120. package/dist/database/migrations/1785006199382-oauth-client-ids-lock.js +36 -0
  121. package/dist/database/migrations/1785006199382-oauth-client-ids-lock.js.map +1 -0
  122. package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.d.ts +12 -0
  123. package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.d.ts.map +1 -0
  124. package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.js +39 -0
  125. package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.js.map +1 -0
  126. package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.d.ts +12 -0
  127. package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.d.ts.map +1 -0
  128. package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.js +39 -0
  129. package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.js.map +1 -0
  130. package/dist/database/migrations/1785006199385-settings-auth-surface-lock.d.ts +13 -0
  131. package/dist/database/migrations/1785006199385-settings-auth-surface-lock.d.ts.map +1 -0
  132. package/dist/database/migrations/1785006199385-settings-auth-surface-lock.js +72 -0
  133. package/dist/database/migrations/1785006199385-settings-auth-surface-lock.js.map +1 -0
  134. package/dist/database/migrations/1785006199386-audit-events.d.ts +10 -0
  135. package/dist/database/migrations/1785006199386-audit-events.d.ts.map +1 -0
  136. package/dist/database/migrations/1785006199386-audit-events.js +60 -0
  137. package/dist/database/migrations/1785006199386-audit-events.js.map +1 -0
  138. package/dist/database/migrations/1785006199387-audit-resource-id-varchar.d.ts +10 -0
  139. package/dist/database/migrations/1785006199387-audit-resource-id-varchar.d.ts.map +1 -0
  140. package/dist/database/migrations/1785006199387-audit-resource-id-varchar.js +25 -0
  141. package/dist/database/migrations/1785006199387-audit-resource-id-varchar.js.map +1 -0
  142. package/dist/database/migrations/1785006199388-audit-enterprise.d.ts +11 -0
  143. package/dist/database/migrations/1785006199388-audit-enterprise.d.ts.map +1 -0
  144. package/dist/database/migrations/1785006199388-audit-enterprise.js +157 -0
  145. package/dist/database/migrations/1785006199388-audit-enterprise.js.map +1 -0
  146. package/dist/database/migrations/1785006199389-drop-admin-logs.d.ts +10 -0
  147. package/dist/database/migrations/1785006199389-drop-admin-logs.d.ts.map +1 -0
  148. package/dist/database/migrations/1785006199389-drop-admin-logs.js +38 -0
  149. package/dist/database/migrations/1785006199389-drop-admin-logs.js.map +1 -0
  150. package/dist/database/migrations/1785006199390-audit-hardening.d.ts +14 -0
  151. package/dist/database/migrations/1785006199390-audit-hardening.d.ts.map +1 -0
  152. package/dist/database/migrations/1785006199390-audit-hardening.js +345 -0
  153. package/dist/database/migrations/1785006199390-audit-hardening.js.map +1 -0
  154. package/dist/database/migrations/1785006199391-audit-owner-schema-create.d.ts +10 -0
  155. package/dist/database/migrations/1785006199391-audit-owner-schema-create.d.ts.map +1 -0
  156. package/dist/database/migrations/1785006199391-audit-owner-schema-create.js +39 -0
  157. package/dist/database/migrations/1785006199391-audit-owner-schema-create.js.map +1 -0
  158. package/dist/database/migrations/1785006199392-profile-photo-url.d.ts +11 -0
  159. package/dist/database/migrations/1785006199392-profile-photo-url.d.ts.map +1 -0
  160. package/dist/database/migrations/1785006199392-profile-photo-url.js +33 -0
  161. package/dist/database/migrations/1785006199392-profile-photo-url.js.map +1 -0
  162. package/dist/database/migrations/1785006199393-profile-cover-url.d.ts +11 -0
  163. package/dist/database/migrations/1785006199393-profile-cover-url.d.ts.map +1 -0
  164. package/dist/database/migrations/1785006199393-profile-cover-url.js +33 -0
  165. package/dist/database/migrations/1785006199393-profile-cover-url.js.map +1 -0
  166. package/dist/database/migrations/1785006199394-profile-is-public-default-false.d.ts +11 -0
  167. package/dist/database/migrations/1785006199394-profile-is-public-default-false.d.ts.map +1 -0
  168. package/dist/database/migrations/1785006199394-profile-is-public-default-false.js +24 -0
  169. package/dist/database/migrations/1785006199394-profile-is-public-default-false.js.map +1 -0
  170. package/dist/database/migrations/1785006199395-delivery-scale-indexes.d.ts +10 -0
  171. package/dist/database/migrations/1785006199395-delivery-scale-indexes.d.ts.map +1 -0
  172. package/dist/database/migrations/1785006199395-delivery-scale-indexes.js +35 -0
  173. package/dist/database/migrations/1785006199395-delivery-scale-indexes.js.map +1 -0
  174. package/dist/database/migrations/1785006199396-delivery-recipient-index.d.ts +11 -0
  175. package/dist/database/migrations/1785006199396-delivery-recipient-index.d.ts.map +1 -0
  176. package/dist/database/migrations/1785006199396-delivery-recipient-index.js +23 -0
  177. package/dist/database/migrations/1785006199396-delivery-recipient-index.js.map +1 -0
  178. package/dist/database/seeds/roles.seed.d.ts +6 -0
  179. package/dist/database/seeds/roles.seed.d.ts.map +1 -1
  180. package/dist/database/seeds/roles.seed.js +22 -5
  181. package/dist/database/seeds/roles.seed.js.map +1 -1
  182. package/dist/database/seeds/settings.seed.d.ts +5 -0
  183. package/dist/database/seeds/settings.seed.d.ts.map +1 -1
  184. package/dist/database/seeds/settings.seed.js +500 -25
  185. package/dist/database/seeds/settings.seed.js.map +1 -1
  186. package/dist/database/seeds/templates/html-template.reader.d.ts +1 -0
  187. package/dist/database/seeds/templates/html-template.reader.d.ts.map +1 -1
  188. package/dist/database/seeds/templates/html-template.reader.js +3 -1
  189. package/dist/database/seeds/templates/html-template.reader.js.map +1 -1
  190. package/dist/database/seeds/templates/html-template.reader.ts +5 -1
  191. package/dist/database/typeorm.util.d.ts.map +1 -1
  192. package/dist/database/typeorm.util.js +6 -0
  193. package/dist/database/typeorm.util.js.map +1 -1
  194. package/dist/index.d.ts +8 -1
  195. package/dist/index.d.ts.map +1 -1
  196. package/dist/index.js +39 -4
  197. package/dist/index.js.map +1 -1
  198. package/dist/modules/admin/controllers/admin.controller.d.ts +15 -7
  199. package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -1
  200. package/dist/modules/admin/controllers/admin.controller.js +74 -17
  201. package/dist/modules/admin/controllers/admin.controller.js.map +1 -1
  202. package/dist/modules/admin/services/admin-log.service.d.ts +14 -7
  203. package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -1
  204. package/dist/modules/admin/services/admin-log.service.js +41 -38
  205. package/dist/modules/admin/services/admin-log.service.js.map +1 -1
  206. package/dist/modules/audit/audit.manifest.d.ts +8 -0
  207. package/dist/modules/audit/audit.manifest.d.ts.map +1 -0
  208. package/dist/modules/audit/audit.manifest.js +31 -0
  209. package/dist/modules/audit/audit.manifest.js.map +1 -0
  210. package/dist/modules/audit/audit.module.d.ts +8 -0
  211. package/dist/modules/audit/audit.module.d.ts.map +1 -0
  212. package/dist/modules/audit/audit.module.js +57 -0
  213. package/dist/modules/audit/audit.module.js.map +1 -0
  214. package/dist/modules/audit/constants/audit-actions.d.ts +79 -0
  215. package/dist/modules/audit/constants/audit-actions.d.ts.map +1 -0
  216. package/dist/modules/audit/constants/audit-actions.js +89 -0
  217. package/dist/modules/audit/constants/audit-actions.js.map +1 -0
  218. package/dist/modules/audit/constants/audit-mutation.d.ts +10 -0
  219. package/dist/modules/audit/constants/audit-mutation.d.ts.map +1 -0
  220. package/dist/modules/audit/constants/audit-mutation.js +13 -0
  221. package/dist/modules/audit/constants/audit-mutation.js.map +1 -0
  222. package/dist/modules/audit/controllers/audit.controller.d.ts +13 -0
  223. package/dist/modules/audit/controllers/audit.controller.d.ts.map +1 -0
  224. package/dist/modules/audit/controllers/audit.controller.js +149 -0
  225. package/dist/modules/audit/controllers/audit.controller.js.map +1 -0
  226. package/dist/modules/audit/decorators/audit.decorator.d.ts +27 -0
  227. package/dist/modules/audit/decorators/audit.decorator.d.ts.map +1 -0
  228. package/dist/modules/audit/decorators/audit.decorator.js +18 -0
  229. package/dist/modules/audit/decorators/audit.decorator.js.map +1 -0
  230. package/dist/modules/audit/dto/audit.dto.d.ts +54 -0
  231. package/dist/modules/audit/dto/audit.dto.d.ts.map +1 -0
  232. package/dist/modules/audit/dto/audit.dto.js +129 -0
  233. package/dist/modules/audit/dto/audit.dto.js.map +1 -0
  234. package/dist/modules/audit/entities/audit-event.entity.d.ts +33 -0
  235. package/dist/modules/audit/entities/audit-event.entity.d.ts.map +1 -0
  236. package/dist/modules/audit/entities/audit-event.entity.js +125 -0
  237. package/dist/modules/audit/entities/audit-event.entity.js.map +1 -0
  238. package/dist/modules/audit/entities/audit-outbox.entity.d.ts +16 -0
  239. package/dist/modules/audit/entities/audit-outbox.entity.d.ts.map +1 -0
  240. package/dist/modules/audit/entities/audit-outbox.entity.js +65 -0
  241. package/dist/modules/audit/entities/audit-outbox.entity.js.map +1 -0
  242. package/dist/modules/audit/index.d.ts +13 -0
  243. package/dist/modules/audit/index.d.ts.map +1 -0
  244. package/dist/modules/audit/index.js +23 -0
  245. package/dist/modules/audit/index.js.map +1 -0
  246. package/dist/modules/audit/interceptors/audit.interceptor.d.ts +11 -0
  247. package/dist/modules/audit/interceptors/audit.interceptor.d.ts.map +1 -0
  248. package/dist/modules/audit/interceptors/audit.interceptor.js +75 -0
  249. package/dist/modules/audit/interceptors/audit.interceptor.js.map +1 -0
  250. package/dist/modules/audit/listeners/auth-audit.listener.d.ts +31 -0
  251. package/dist/modules/audit/listeners/auth-audit.listener.d.ts.map +1 -0
  252. package/dist/modules/audit/listeners/auth-audit.listener.js +338 -0
  253. package/dist/modules/audit/listeners/auth-audit.listener.js.map +1 -0
  254. package/dist/modules/audit/services/audit-archive.service.d.ts +28 -0
  255. package/dist/modules/audit/services/audit-archive.service.d.ts.map +1 -0
  256. package/dist/modules/audit/services/audit-archive.service.js +132 -0
  257. package/dist/modules/audit/services/audit-archive.service.js.map +1 -0
  258. package/dist/modules/audit/services/audit-hash-backfill.service.d.ts +22 -0
  259. package/dist/modules/audit/services/audit-hash-backfill.service.d.ts.map +1 -0
  260. package/dist/modules/audit/services/audit-hash-backfill.service.js +79 -0
  261. package/dist/modules/audit/services/audit-hash-backfill.service.js.map +1 -0
  262. package/dist/modules/audit/services/audit-leader.service.d.ts +28 -0
  263. package/dist/modules/audit/services/audit-leader.service.d.ts.map +1 -0
  264. package/dist/modules/audit/services/audit-leader.service.js +99 -0
  265. package/dist/modules/audit/services/audit-leader.service.js.map +1 -0
  266. package/dist/modules/audit/services/audit-outbox.worker.d.ts +29 -0
  267. package/dist/modules/audit/services/audit-outbox.worker.d.ts.map +1 -0
  268. package/dist/modules/audit/services/audit-outbox.worker.js +144 -0
  269. package/dist/modules/audit/services/audit-outbox.worker.js.map +1 -0
  270. package/dist/modules/audit/services/audit-partition.service.d.ts +18 -0
  271. package/dist/modules/audit/services/audit-partition.service.d.ts.map +1 -0
  272. package/dist/modules/audit/services/audit-partition.service.js +70 -0
  273. package/dist/modules/audit/services/audit-partition.service.js.map +1 -0
  274. package/dist/modules/audit/services/audit-write.service.d.ts +60 -0
  275. package/dist/modules/audit/services/audit-write.service.d.ts.map +1 -0
  276. package/dist/modules/audit/services/audit-write.service.js +463 -0
  277. package/dist/modules/audit/services/audit-write.service.js.map +1 -0
  278. package/dist/modules/audit/services/audit.service.d.ts +60 -0
  279. package/dist/modules/audit/services/audit.service.d.ts.map +1 -0
  280. package/dist/modules/audit/services/audit.service.js +373 -0
  281. package/dist/modules/audit/services/audit.service.js.map +1 -0
  282. package/dist/modules/audit/utils/audit-hash.util.d.ts +20 -0
  283. package/dist/modules/audit/utils/audit-hash.util.d.ts.map +1 -0
  284. package/dist/modules/audit/utils/audit-hash.util.js +44 -0
  285. package/dist/modules/audit/utils/audit-hash.util.js.map +1 -0
  286. package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -1
  287. package/dist/modules/auth/auth-core/auth-core.module.js +16 -4
  288. package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -1
  289. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts +22 -0
  290. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts.map +1 -0
  291. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js +25 -0
  292. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js.map +1 -0
  293. package/dist/modules/auth/auth-core/services/access-token.validator.d.ts +19 -0
  294. package/dist/modules/auth/auth-core/services/access-token.validator.d.ts.map +1 -0
  295. package/dist/modules/auth/auth-core/services/access-token.validator.js +110 -0
  296. package/dist/modules/auth/auth-core/services/access-token.validator.js.map +1 -0
  297. package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts +10 -0
  298. package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts.map +1 -0
  299. package/dist/modules/auth/auth-core/services/family-denylist.reader.js +44 -0
  300. package/dist/modules/auth/auth-core/services/family-denylist.reader.js.map +1 -0
  301. package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts +10 -0
  302. package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts.map +1 -0
  303. package/dist/modules/auth/auth-core/services/session-epoch.reader.js +44 -0
  304. package/dist/modules/auth/auth-core/services/session-epoch.reader.js.map +1 -0
  305. package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +7 -8
  306. package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -1
  307. package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +34 -34
  308. package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -1
  309. package/dist/modules/auth/auth.manifest.d.ts +6 -0
  310. package/dist/modules/auth/auth.manifest.d.ts.map +1 -1
  311. package/dist/modules/auth/auth.manifest.js +38 -2
  312. package/dist/modules/auth/auth.manifest.js.map +1 -1
  313. package/dist/modules/auth/auth.module.d.ts.map +1 -1
  314. package/dist/modules/auth/auth.module.js +39 -4
  315. package/dist/modules/auth/auth.module.js.map +1 -1
  316. package/dist/modules/auth/controllers/account.controller.d.ts +15 -1
  317. package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -1
  318. package/dist/modules/auth/controllers/account.controller.js +65 -7
  319. package/dist/modules/auth/controllers/account.controller.js.map +1 -1
  320. package/dist/modules/auth/controllers/auth.controller.d.ts +7 -3
  321. package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -1
  322. package/dist/modules/auth/controllers/auth.controller.js +76 -16
  323. package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
  324. package/dist/modules/auth/controllers/forgot-password.controller.d.ts +4 -2
  325. package/dist/modules/auth/controllers/forgot-password.controller.d.ts.map +1 -1
  326. package/dist/modules/auth/controllers/forgot-password.controller.js +32 -11
  327. package/dist/modules/auth/controllers/forgot-password.controller.js.map +1 -1
  328. package/dist/modules/auth/controllers/mfa.controller.d.ts +18 -0
  329. package/dist/modules/auth/controllers/mfa.controller.d.ts.map +1 -0
  330. package/dist/modules/auth/controllers/mfa.controller.js +192 -0
  331. package/dist/modules/auth/controllers/mfa.controller.js.map +1 -0
  332. package/dist/modules/auth/controllers/oauth.controller.d.ts +22 -0
  333. package/dist/modules/auth/controllers/oauth.controller.d.ts.map +1 -0
  334. package/dist/modules/auth/controllers/oauth.controller.js +192 -0
  335. package/dist/modules/auth/controllers/oauth.controller.js.map +1 -0
  336. package/dist/modules/auth/controllers/otp.controller.d.ts +6 -3
  337. package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -1
  338. package/dist/modules/auth/controllers/otp.controller.js +32 -33
  339. package/dist/modules/auth/controllers/otp.controller.js.map +1 -1
  340. package/dist/modules/auth/controllers/pin.controller.d.ts.map +1 -1
  341. package/dist/modules/auth/controllers/pin.controller.js +10 -2
  342. package/dist/modules/auth/controllers/pin.controller.js.map +1 -1
  343. package/dist/modules/auth/controllers/session.controller.d.ts +12 -4
  344. package/dist/modules/auth/controllers/session.controller.d.ts.map +1 -1
  345. package/dist/modules/auth/controllers/session.controller.js +130 -31
  346. package/dist/modules/auth/controllers/session.controller.js.map +1 -1
  347. package/dist/modules/auth/dto/auth-config.dto.d.ts +11 -2
  348. package/dist/modules/auth/dto/auth-config.dto.d.ts.map +1 -1
  349. package/dist/modules/auth/dto/auth-config.dto.js +78 -3
  350. package/dist/modules/auth/dto/auth-config.dto.js.map +1 -1
  351. package/dist/modules/auth/dto/index.d.ts +2 -0
  352. package/dist/modules/auth/dto/index.d.ts.map +1 -1
  353. package/dist/modules/auth/dto/index.js +2 -0
  354. package/dist/modules/auth/dto/index.js.map +1 -1
  355. package/dist/modules/auth/dto/login.dto.d.ts +8 -1
  356. package/dist/modules/auth/dto/login.dto.d.ts.map +1 -1
  357. package/dist/modules/auth/dto/login.dto.js +48 -3
  358. package/dist/modules/auth/dto/login.dto.js.map +1 -1
  359. package/dist/modules/auth/dto/mfa.dto.d.ts +61 -0
  360. package/dist/modules/auth/dto/mfa.dto.d.ts.map +1 -0
  361. package/dist/modules/auth/dto/mfa.dto.js +326 -0
  362. package/dist/modules/auth/dto/mfa.dto.js.map +1 -0
  363. package/dist/modules/auth/dto/oauth.dto.d.ts +45 -0
  364. package/dist/modules/auth/dto/oauth.dto.d.ts.map +1 -0
  365. package/dist/modules/auth/dto/oauth.dto.js +249 -0
  366. package/dist/modules/auth/dto/oauth.dto.js.map +1 -0
  367. package/dist/modules/auth/dto/otp.dto.d.ts +3 -1
  368. package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -1
  369. package/dist/modules/auth/dto/otp.dto.js +19 -0
  370. package/dist/modules/auth/dto/otp.dto.js.map +1 -1
  371. package/dist/modules/auth/dto/password.dto.d.ts +28 -0
  372. package/dist/modules/auth/dto/password.dto.d.ts.map +1 -1
  373. package/dist/modules/auth/dto/password.dto.js +191 -5
  374. package/dist/modules/auth/dto/password.dto.js.map +1 -1
  375. package/dist/modules/auth/dto/register.dto.d.ts +1 -0
  376. package/dist/modules/auth/dto/register.dto.d.ts.map +1 -1
  377. package/dist/modules/auth/dto/register.dto.js +1 -0
  378. package/dist/modules/auth/dto/register.dto.js.map +1 -1
  379. package/dist/modules/auth/dto/session.dto.d.ts +20 -0
  380. package/dist/modules/auth/dto/session.dto.d.ts.map +1 -0
  381. package/dist/modules/auth/dto/session.dto.js +98 -0
  382. package/dist/modules/auth/dto/session.dto.js.map +1 -0
  383. package/dist/modules/auth/dto/token.dto.d.ts +38 -1
  384. package/dist/modules/auth/dto/token.dto.d.ts.map +1 -1
  385. package/dist/modules/auth/dto/token.dto.js +21 -1
  386. package/dist/modules/auth/dto/token.dto.js.map +1 -1
  387. package/dist/modules/auth/entities/index.d.ts +2 -0
  388. package/dist/modules/auth/entities/index.d.ts.map +1 -1
  389. package/dist/modules/auth/entities/index.js +2 -0
  390. package/dist/modules/auth/entities/index.js.map +1 -1
  391. package/dist/modules/auth/entities/password-reset-token.entity.d.ts +2 -0
  392. package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -1
  393. package/dist/modules/auth/entities/password-reset-token.entity.js +6 -0
  394. package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -1
  395. package/dist/modules/auth/entities/user-mfa.entity.d.ts +19 -0
  396. package/dist/modules/auth/entities/user-mfa.entity.d.ts.map +1 -0
  397. package/dist/modules/auth/entities/user-mfa.entity.js +73 -0
  398. package/dist/modules/auth/entities/user-mfa.entity.js.map +1 -0
  399. package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts +24 -0
  400. package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts.map +1 -0
  401. package/dist/modules/auth/entities/user-oauth-identity.entity.js +84 -0
  402. package/dist/modules/auth/entities/user-oauth-identity.entity.js.map +1 -0
  403. package/dist/modules/auth/events/auth.events.d.ts +84 -19
  404. package/dist/modules/auth/events/auth.events.d.ts.map +1 -1
  405. package/dist/modules/auth/events/auth.events.js +17 -9
  406. package/dist/modules/auth/events/auth.events.js.map +1 -1
  407. package/dist/modules/auth/services/account.service.d.ts +74 -14
  408. package/dist/modules/auth/services/account.service.d.ts.map +1 -1
  409. package/dist/modules/auth/services/account.service.js +247 -31
  410. package/dist/modules/auth/services/account.service.js.map +1 -1
  411. package/dist/modules/auth/services/dpop.service.d.ts +41 -0
  412. package/dist/modules/auth/services/dpop.service.d.ts.map +1 -0
  413. package/dist/modules/auth/services/dpop.service.js +159 -0
  414. package/dist/modules/auth/services/dpop.service.js.map +1 -0
  415. package/dist/modules/auth/services/index.d.ts +2 -0
  416. package/dist/modules/auth/services/index.d.ts.map +1 -1
  417. package/dist/modules/auth/services/index.js +2 -0
  418. package/dist/modules/auth/services/index.js.map +1 -1
  419. package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts +28 -0
  420. package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts.map +1 -0
  421. package/dist/modules/auth/services/legacy-hash-cleanup.service.js +163 -0
  422. package/dist/modules/auth/services/legacy-hash-cleanup.service.js.map +1 -0
  423. package/dist/modules/auth/services/login.service.d.ts +29 -34
  424. package/dist/modules/auth/services/login.service.d.ts.map +1 -1
  425. package/dist/modules/auth/services/login.service.js +173 -61
  426. package/dist/modules/auth/services/login.service.js.map +1 -1
  427. package/dist/modules/auth/services/mfa.service.d.ts +111 -0
  428. package/dist/modules/auth/services/mfa.service.d.ts.map +1 -0
  429. package/dist/modules/auth/services/mfa.service.js +662 -0
  430. package/dist/modules/auth/services/mfa.service.js.map +1 -0
  431. package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts +11 -0
  432. package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts.map +1 -0
  433. package/dist/modules/auth/services/oauth/apple-id-token.verifier.js +56 -0
  434. package/dist/modules/auth/services/oauth/apple-id-token.verifier.js.map +1 -0
  435. package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts +12 -0
  436. package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts.map +1 -0
  437. package/dist/modules/auth/services/oauth/google-id-token.verifier.js +64 -0
  438. package/dist/modules/auth/services/oauth/google-id-token.verifier.js.map +1 -0
  439. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts +11 -0
  440. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts.map +1 -0
  441. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js +76 -0
  442. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js.map +1 -0
  443. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts +16 -0
  444. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts.map +1 -0
  445. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js +92 -0
  446. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js.map +1 -0
  447. package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts +9 -0
  448. package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts.map +1 -0
  449. package/dist/modules/auth/services/oauth/verified-oauth-identity.js +3 -0
  450. package/dist/modules/auth/services/oauth/verified-oauth-identity.js.map +1 -0
  451. package/dist/modules/auth/services/oauth.service.d.ts +83 -0
  452. package/dist/modules/auth/services/oauth.service.d.ts.map +1 -0
  453. package/dist/modules/auth/services/oauth.service.js +471 -0
  454. package/dist/modules/auth/services/oauth.service.js.map +1 -0
  455. package/dist/modules/auth/services/otp-auth.service.d.ts +13 -3
  456. package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -1
  457. package/dist/modules/auth/services/otp-auth.service.js +41 -7
  458. package/dist/modules/auth/services/otp-auth.service.js.map +1 -1
  459. package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts +22 -0
  460. package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts.map +1 -0
  461. package/dist/modules/auth/services/password-reset-audit-retention.service.js +117 -0
  462. package/dist/modules/auth/services/password-reset-audit-retention.service.js.map +1 -0
  463. package/dist/modules/auth/services/password.service.d.ts +25 -5
  464. package/dist/modules/auth/services/password.service.d.ts.map +1 -1
  465. package/dist/modules/auth/services/password.service.js +154 -20
  466. package/dist/modules/auth/services/password.service.js.map +1 -1
  467. package/dist/modules/auth/services/pin-auth.service.d.ts +10 -3
  468. package/dist/modules/auth/services/pin-auth.service.d.ts.map +1 -1
  469. package/dist/modules/auth/services/pin-auth.service.js +110 -13
  470. package/dist/modules/auth/services/pin-auth.service.js.map +1 -1
  471. package/dist/modules/auth/services/registration.service.d.ts +10 -2
  472. package/dist/modules/auth/services/registration.service.d.ts.map +1 -1
  473. package/dist/modules/auth/services/registration.service.js +113 -25
  474. package/dist/modules/auth/services/registration.service.js.map +1 -1
  475. package/dist/modules/auth/services/turnstile.service.d.ts +17 -0
  476. package/dist/modules/auth/services/turnstile.service.d.ts.map +1 -0
  477. package/dist/modules/auth/services/turnstile.service.js +94 -0
  478. package/dist/modules/auth/services/turnstile.service.js.map +1 -0
  479. package/dist/modules/auth/utils/auth-params.util.d.ts +13 -6
  480. package/dist/modules/auth/utils/auth-params.util.d.ts.map +1 -1
  481. package/dist/modules/auth/utils/auth-params.util.js +27 -4
  482. package/dist/modules/auth/utils/auth-params.util.js.map +1 -1
  483. package/dist/modules/auth/utils/auth-supported.util.d.ts +12 -1
  484. package/dist/modules/auth/utils/auth-supported.util.d.ts.map +1 -1
  485. package/dist/modules/auth/utils/auth-supported.util.js +36 -4
  486. package/dist/modules/auth/utils/auth-supported.util.js.map +1 -1
  487. package/dist/modules/auth/utils/backup-code-hash.util.d.ts +10 -0
  488. package/dist/modules/auth/utils/backup-code-hash.util.d.ts.map +1 -0
  489. package/dist/modules/auth/utils/backup-code-hash.util.js +31 -0
  490. package/dist/modules/auth/utils/backup-code-hash.util.js.map +1 -0
  491. package/dist/modules/auth/utils/backup-codes.util.d.ts +5 -0
  492. package/dist/modules/auth/utils/backup-codes.util.d.ts.map +1 -0
  493. package/dist/modules/auth/utils/backup-codes.util.js +22 -0
  494. package/dist/modules/auth/utils/backup-codes.util.js.map +1 -0
  495. package/dist/modules/auth/utils/dpop.util.d.ts +22 -0
  496. package/dist/modules/auth/utils/dpop.util.d.ts.map +1 -0
  497. package/dist/modules/auth/utils/dpop.util.js +73 -0
  498. package/dist/modules/auth/utils/dpop.util.js.map +1 -0
  499. package/dist/modules/auth/utils/mfa-secret.util.d.ts +22 -0
  500. package/dist/modules/auth/utils/mfa-secret.util.d.ts.map +1 -0
  501. package/dist/modules/auth/utils/mfa-secret.util.js +59 -0
  502. package/dist/modules/auth/utils/mfa-secret.util.js.map +1 -0
  503. package/dist/modules/auth/utils/mfa-verify-params.util.d.ts +26 -0
  504. package/dist/modules/auth/utils/mfa-verify-params.util.d.ts.map +1 -0
  505. package/dist/modules/auth/utils/mfa-verify-params.util.js +49 -0
  506. package/dist/modules/auth/utils/mfa-verify-params.util.js.map +1 -0
  507. package/dist/modules/auth/utils/step-up-purpose.util.d.ts +5 -0
  508. package/dist/modules/auth/utils/step-up-purpose.util.d.ts.map +1 -0
  509. package/dist/modules/auth/utils/step-up-purpose.util.js +18 -0
  510. package/dist/modules/auth/utils/step-up-purpose.util.js.map +1 -0
  511. package/dist/modules/auth/utils/totp.util.d.ts +16 -0
  512. package/dist/modules/auth/utils/totp.util.d.ts.map +1 -0
  513. package/dist/modules/auth/utils/totp.util.js +88 -0
  514. package/dist/modules/auth/utils/totp.util.js.map +1 -0
  515. package/dist/modules/delivery/composers/otp-delivery.composer.d.ts +28 -1
  516. package/dist/modules/delivery/composers/otp-delivery.composer.d.ts.map +1 -1
  517. package/dist/modules/delivery/composers/otp-delivery.composer.js +48 -2
  518. package/dist/modules/delivery/composers/otp-delivery.composer.js.map +1 -1
  519. package/dist/modules/delivery/constants/delivery-worker.constants.d.ts +29 -0
  520. package/dist/modules/delivery/constants/delivery-worker.constants.d.ts.map +1 -0
  521. package/dist/modules/delivery/constants/delivery-worker.constants.js +51 -0
  522. package/dist/modules/delivery/constants/delivery-worker.constants.js.map +1 -0
  523. package/dist/modules/delivery/delivery.module.d.ts.map +1 -1
  524. package/dist/modules/delivery/delivery.module.js +1 -15
  525. package/dist/modules/delivery/delivery.module.js.map +1 -1
  526. package/dist/modules/delivery/entities/notification-delivery-log.entity.d.ts.map +1 -1
  527. package/dist/modules/delivery/entities/notification-delivery-log.entity.js +3 -1
  528. package/dist/modules/delivery/entities/notification-delivery-log.entity.js.map +1 -1
  529. package/dist/modules/delivery/notification-delivery.service.d.ts +12 -1
  530. package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -1
  531. package/dist/modules/delivery/notification-delivery.service.js +121 -40
  532. package/dist/modules/delivery/notification-delivery.service.js.map +1 -1
  533. package/dist/modules/delivery/processors/delivery-job.runner.d.ts +22 -1
  534. package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -1
  535. package/dist/modules/delivery/processors/delivery-job.runner.js +144 -42
  536. package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -1
  537. package/dist/modules/delivery/processors/delivery.processor.d.ts.map +1 -1
  538. package/dist/modules/delivery/processors/delivery.processor.js +6 -1
  539. package/dist/modules/delivery/processors/delivery.processor.js.map +1 -1
  540. package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts +11 -0
  541. package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts.map +1 -1
  542. package/dist/modules/delivery/processors/otp-delivery-job.runner.js +90 -16
  543. package/dist/modules/delivery/processors/otp-delivery-job.runner.js.map +1 -1
  544. package/dist/modules/delivery/processors/otp-delivery.processor.d.ts.map +1 -1
  545. package/dist/modules/delivery/processors/otp-delivery.processor.js +6 -1
  546. package/dist/modules/delivery/processors/otp-delivery.processor.js.map +1 -1
  547. package/dist/modules/delivery/queues/sync-jobs.queue.d.ts +7 -1
  548. package/dist/modules/delivery/queues/sync-jobs.queue.d.ts.map +1 -1
  549. package/dist/modules/delivery/queues/sync-jobs.queue.js +11 -2
  550. package/dist/modules/delivery/queues/sync-jobs.queue.js.map +1 -1
  551. package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts +7 -3
  552. package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts.map +1 -1
  553. package/dist/modules/delivery/services/delivery-audit-retention.service.js +33 -10
  554. package/dist/modules/delivery/services/delivery-audit-retention.service.js.map +1 -1
  555. package/dist/modules/delivery/services/notification-audit.service.d.ts +7 -4
  556. package/dist/modules/delivery/services/notification-audit.service.d.ts.map +1 -1
  557. package/dist/modules/delivery/services/notification-audit.service.js +83 -26
  558. package/dist/modules/delivery/services/notification-audit.service.js.map +1 -1
  559. package/dist/modules/delivery/utils/payload-snapshot.util.d.ts +2 -0
  560. package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -1
  561. package/dist/modules/delivery/utils/payload-snapshot.util.js +22 -3
  562. package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -1
  563. package/dist/modules/file-upload/controllers/file-upload.controller.d.ts +7 -1
  564. package/dist/modules/file-upload/controllers/file-upload.controller.d.ts.map +1 -1
  565. package/dist/modules/file-upload/controllers/file-upload.controller.js +5 -7
  566. package/dist/modules/file-upload/controllers/file-upload.controller.js.map +1 -1
  567. package/dist/modules/file-upload/dto/file-upload.dto.d.ts +2 -0
  568. package/dist/modules/file-upload/dto/file-upload.dto.d.ts.map +1 -1
  569. package/dist/modules/file-upload/dto/file-upload.dto.js +20 -0
  570. package/dist/modules/file-upload/dto/file-upload.dto.js.map +1 -1
  571. package/dist/modules/file-upload/file-upload.module.d.ts.map +1 -1
  572. package/dist/modules/file-upload/file-upload.module.js +12 -2
  573. package/dist/modules/file-upload/file-upload.module.js.map +1 -1
  574. package/dist/modules/file-upload/services/file-upload.service.d.ts +24 -6
  575. package/dist/modules/file-upload/services/file-upload.service.d.ts.map +1 -1
  576. package/dist/modules/file-upload/services/file-upload.service.js +164 -36
  577. package/dist/modules/file-upload/services/file-upload.service.js.map +1 -1
  578. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts +4 -2
  579. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts.map +1 -1
  580. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js +30 -5
  581. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js.map +1 -1
  582. package/dist/modules/file-upload/utils/image-optimize.util.d.ts.map +1 -1
  583. package/dist/modules/file-upload/utils/image-optimize.util.js +7 -1
  584. package/dist/modules/file-upload/utils/image-optimize.util.js.map +1 -1
  585. package/dist/modules/health/health.controller.d.ts +5 -1
  586. package/dist/modules/health/health.controller.d.ts.map +1 -1
  587. package/dist/modules/health/health.controller.js +57 -3
  588. package/dist/modules/health/health.controller.js.map +1 -1
  589. package/dist/modules/invitations/controllers/invitations.controller.d.ts +19 -4
  590. package/dist/modules/invitations/controllers/invitations.controller.d.ts.map +1 -1
  591. package/dist/modules/invitations/controllers/invitations.controller.js +19 -10
  592. package/dist/modules/invitations/controllers/invitations.controller.js.map +1 -1
  593. package/dist/modules/invitations/dto/invitation.dto.d.ts +13 -0
  594. package/dist/modules/invitations/dto/invitation.dto.d.ts.map +1 -1
  595. package/dist/modules/invitations/dto/invitation.dto.js +69 -2
  596. package/dist/modules/invitations/dto/invitation.dto.js.map +1 -1
  597. package/dist/modules/invitations/services/invitations.service.d.ts +24 -6
  598. package/dist/modules/invitations/services/invitations.service.d.ts.map +1 -1
  599. package/dist/modules/invitations/services/invitations.service.js +96 -20
  600. package/dist/modules/invitations/services/invitations.service.js.map +1 -1
  601. package/dist/modules/jobs/queues/jobs.queue.d.ts +7 -2
  602. package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -1
  603. package/dist/modules/jobs/queues/jobs.queue.js +25 -10
  604. package/dist/modules/jobs/queues/jobs.queue.js.map +1 -1
  605. package/dist/modules/notifications/controllers/notifications.controller.d.ts +3 -1
  606. package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -1
  607. package/dist/modules/notifications/controllers/notifications.controller.js +25 -2
  608. package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -1
  609. package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -1
  610. package/dist/modules/notifications/dto/notification-query.dto.js +1 -0
  611. package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -1
  612. package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -1
  613. package/dist/modules/notifications/entities/device-token.entity.js +3 -1
  614. package/dist/modules/notifications/entities/device-token.entity.js.map +1 -1
  615. package/dist/modules/notifications/services/fcm.service.d.ts +2 -0
  616. package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -1
  617. package/dist/modules/notifications/services/fcm.service.js +28 -7
  618. package/dist/modules/notifications/services/fcm.service.js.map +1 -1
  619. package/dist/modules/notifications/services/notifications.service.d.ts +16 -3
  620. package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -1
  621. package/dist/modules/notifications/services/notifications.service.js +95 -24
  622. package/dist/modules/notifications/services/notifications.service.js.map +1 -1
  623. package/dist/modules/observability/metrics/metrics.service.d.ts +2 -0
  624. package/dist/modules/observability/metrics/metrics.service.d.ts.map +1 -1
  625. package/dist/modules/observability/metrics/metrics.service.js +11 -0
  626. package/dist/modules/observability/metrics/metrics.service.js.map +1 -1
  627. package/dist/modules/otp/constants/otp.constants.d.ts +7 -5
  628. package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -1
  629. package/dist/modules/otp/constants/otp.constants.js +11 -8
  630. package/dist/modules/otp/constants/otp.constants.js.map +1 -1
  631. package/dist/modules/otp/interfaces/otp.service.interface.d.ts +1 -1
  632. package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -1
  633. package/dist/modules/otp/otp.service.d.ts +10 -2
  634. package/dist/modules/otp/otp.service.d.ts.map +1 -1
  635. package/dist/modules/otp/otp.service.js +48 -4
  636. package/dist/modules/otp/otp.service.js.map +1 -1
  637. package/dist/modules/otp/services/otp.rate-limiter.d.ts +2 -0
  638. package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -1
  639. package/dist/modules/otp/services/otp.rate-limiter.js +19 -0
  640. package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -1
  641. package/dist/modules/otp/services/otp.session.store.d.ts +9 -3
  642. package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -1
  643. package/dist/modules/otp/services/otp.session.store.js +34 -42
  644. package/dist/modules/otp/services/otp.session.store.js.map +1 -1
  645. package/dist/modules/otp/utils/otp-code-hash.util.d.ts +11 -0
  646. package/dist/modules/otp/utils/otp-code-hash.util.d.ts.map +1 -0
  647. package/dist/modules/otp/utils/otp-code-hash.util.js +68 -0
  648. package/dist/modules/otp/utils/otp-code-hash.util.js.map +1 -0
  649. package/dist/modules/profile/controllers/profile.controller.d.ts +9 -3
  650. package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -1
  651. package/dist/modules/profile/controllers/profile.controller.js +140 -8
  652. package/dist/modules/profile/controllers/profile.controller.js.map +1 -1
  653. package/dist/modules/profile/dto/create-user-profile.dto.d.ts +10 -0
  654. package/dist/modules/profile/dto/create-user-profile.dto.d.ts.map +1 -1
  655. package/dist/modules/profile/dto/create-user-profile.dto.js +43 -1
  656. package/dist/modules/profile/dto/create-user-profile.dto.js.map +1 -1
  657. package/dist/modules/profile/dto/public-user-profile.dto.d.ts +24 -0
  658. package/dist/modules/profile/dto/public-user-profile.dto.d.ts.map +1 -0
  659. package/dist/modules/profile/dto/public-user-profile.dto.js +115 -0
  660. package/dist/modules/profile/dto/public-user-profile.dto.js.map +1 -0
  661. package/dist/modules/profile/dto/user-profile-response.dto.d.ts +4 -0
  662. package/dist/modules/profile/dto/user-profile-response.dto.d.ts.map +1 -1
  663. package/dist/modules/profile/dto/user-profile-response.dto.js +4 -0
  664. package/dist/modules/profile/dto/user-profile-response.dto.js.map +1 -1
  665. package/dist/modules/profile/dto/username-available.dto.d.ts +6 -0
  666. package/dist/modules/profile/dto/username-available.dto.d.ts.map +1 -0
  667. package/dist/modules/profile/dto/username-available.dto.js +31 -0
  668. package/dist/modules/profile/dto/username-available.dto.js.map +1 -0
  669. package/dist/modules/profile/entities/user-profiles.entity.d.ts +10 -0
  670. package/dist/modules/profile/entities/user-profiles.entity.d.ts.map +1 -1
  671. package/dist/modules/profile/entities/user-profiles.entity.js +29 -1
  672. package/dist/modules/profile/entities/user-profiles.entity.js.map +1 -1
  673. package/dist/modules/profile/index.d.ts +1 -0
  674. package/dist/modules/profile/index.d.ts.map +1 -1
  675. package/dist/modules/profile/index.js +1 -0
  676. package/dist/modules/profile/index.js.map +1 -1
  677. package/dist/modules/profile/profile.manifest.d.ts +2 -2
  678. package/dist/modules/profile/profile.manifest.js +2 -2
  679. package/dist/modules/profile/profile.manifest.js.map +1 -1
  680. package/dist/modules/profile/profile.module.d.ts.map +1 -1
  681. package/dist/modules/profile/profile.module.js +7 -2
  682. package/dist/modules/profile/profile.module.js.map +1 -1
  683. package/dist/modules/profile/services/profile.service.d.ts +56 -4
  684. package/dist/modules/profile/services/profile.service.d.ts.map +1 -1
  685. package/dist/modules/profile/services/profile.service.js +247 -20
  686. package/dist/modules/profile/services/profile.service.js.map +1 -1
  687. package/dist/modules/realtime/adapters/redis-io.adapter.d.ts +26 -0
  688. package/dist/modules/realtime/adapters/redis-io.adapter.d.ts.map +1 -0
  689. package/dist/modules/realtime/adapters/redis-io.adapter.js +124 -0
  690. package/dist/modules/realtime/adapters/redis-io.adapter.js.map +1 -0
  691. package/dist/modules/realtime/constants/realtime.constants.d.ts +36 -0
  692. package/dist/modules/realtime/constants/realtime.constants.d.ts.map +1 -0
  693. package/dist/modules/realtime/constants/realtime.constants.js +42 -0
  694. package/dist/modules/realtime/constants/realtime.constants.js.map +1 -0
  695. package/dist/modules/realtime/controllers/realtime.controller.d.ts +21 -0
  696. package/dist/modules/realtime/controllers/realtime.controller.d.ts.map +1 -0
  697. package/dist/modules/realtime/controllers/realtime.controller.js +113 -0
  698. package/dist/modules/realtime/controllers/realtime.controller.js.map +1 -0
  699. package/dist/modules/realtime/gateway/realtime.gateway.d.ts +42 -0
  700. package/dist/modules/realtime/gateway/realtime.gateway.d.ts.map +1 -0
  701. package/dist/modules/realtime/gateway/realtime.gateway.js +289 -0
  702. package/dist/modules/realtime/gateway/realtime.gateway.js.map +1 -0
  703. package/dist/modules/realtime/index.d.ts +12 -0
  704. package/dist/modules/realtime/index.d.ts.map +1 -0
  705. package/dist/modules/realtime/index.js +35 -0
  706. package/dist/modules/realtime/index.js.map +1 -0
  707. package/dist/modules/realtime/realtime.manifest.d.ts +8 -0
  708. package/dist/modules/realtime/realtime.manifest.d.ts.map +1 -0
  709. package/dist/modules/realtime/realtime.manifest.js +31 -0
  710. package/dist/modules/realtime/realtime.manifest.js.map +1 -0
  711. package/dist/modules/realtime/realtime.module.d.ts +14 -0
  712. package/dist/modules/realtime/realtime.module.d.ts.map +1 -0
  713. package/dist/modules/realtime/realtime.module.js +126 -0
  714. package/dist/modules/realtime/realtime.module.js.map +1 -0
  715. package/dist/modules/realtime/services/realtime-handler.registry.d.ts +16 -0
  716. package/dist/modules/realtime/services/realtime-handler.registry.d.ts.map +1 -0
  717. package/dist/modules/realtime/services/realtime-handler.registry.js +55 -0
  718. package/dist/modules/realtime/services/realtime-handler.registry.js.map +1 -0
  719. package/dist/modules/realtime/services/realtime-presence.service.d.ts +15 -0
  720. package/dist/modules/realtime/services/realtime-presence.service.d.ts.map +1 -0
  721. package/dist/modules/realtime/services/realtime-presence.service.js +86 -0
  722. package/dist/modules/realtime/services/realtime-presence.service.js.map +1 -0
  723. package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts +12 -0
  724. package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts.map +1 -0
  725. package/dist/modules/realtime/services/realtime-rate-limiter.service.js +63 -0
  726. package/dist/modules/realtime/services/realtime-rate-limiter.service.js.map +1 -0
  727. package/dist/modules/realtime/services/realtime.service.d.ts +88 -0
  728. package/dist/modules/realtime/services/realtime.service.d.ts.map +1 -0
  729. package/dist/modules/realtime/services/realtime.service.js +343 -0
  730. package/dist/modules/realtime/services/realtime.service.js.map +1 -0
  731. package/dist/modules/realtime/types/realtime.types.d.ts +50 -0
  732. package/dist/modules/realtime/types/realtime.types.d.ts.map +1 -0
  733. package/dist/modules/realtime/types/realtime.types.js +14 -0
  734. package/dist/modules/realtime/types/realtime.types.js.map +1 -0
  735. package/dist/modules/realtime/utils/handshake-error.util.d.ts +5 -0
  736. package/dist/modules/realtime/utils/handshake-error.util.d.ts.map +1 -0
  737. package/dist/modules/realtime/utils/handshake-error.util.js +45 -0
  738. package/dist/modules/realtime/utils/handshake-error.util.js.map +1 -0
  739. package/dist/modules/roles/controllers/modules.controller.d.ts +4 -3
  740. package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -1
  741. package/dist/modules/roles/controllers/modules.controller.js +21 -10
  742. package/dist/modules/roles/controllers/modules.controller.js.map +1 -1
  743. package/dist/modules/roles/controllers/permissions.controller.d.ts +4 -3
  744. package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -1
  745. package/dist/modules/roles/controllers/permissions.controller.js +21 -10
  746. package/dist/modules/roles/controllers/permissions.controller.js.map +1 -1
  747. package/dist/modules/roles/controllers/roles.controller.d.ts +5 -4
  748. package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -1
  749. package/dist/modules/roles/controllers/roles.controller.js +26 -13
  750. package/dist/modules/roles/controllers/roles.controller.js.map +1 -1
  751. package/dist/modules/roles/controllers/user-roles.controller.d.ts +3 -2
  752. package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -1
  753. package/dist/modules/roles/controllers/user-roles.controller.js +14 -6
  754. package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -1
  755. package/dist/modules/roles/services/modules.service.d.ts +8 -5
  756. package/dist/modules/roles/services/modules.service.d.ts.map +1 -1
  757. package/dist/modules/roles/services/modules.service.js +58 -12
  758. package/dist/modules/roles/services/modules.service.js.map +1 -1
  759. package/dist/modules/roles/services/permissions.service.d.ts +8 -5
  760. package/dist/modules/roles/services/permissions.service.d.ts.map +1 -1
  761. package/dist/modules/roles/services/permissions.service.js +61 -12
  762. package/dist/modules/roles/services/permissions.service.js.map +1 -1
  763. package/dist/modules/roles/services/roles.service.d.ts +19 -9
  764. package/dist/modules/roles/services/roles.service.d.ts.map +1 -1
  765. package/dist/modules/roles/services/roles.service.js +137 -47
  766. package/dist/modules/roles/services/roles.service.js.map +1 -1
  767. package/dist/modules/roles/services/user-roles.service.d.ts +12 -4
  768. package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -1
  769. package/dist/modules/roles/services/user-roles.service.js +58 -26
  770. package/dist/modules/roles/services/user-roles.service.js.map +1 -1
  771. package/dist/modules/sessions/entities/refresh-token.entity.d.ts +7 -1
  772. package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -1
  773. package/dist/modules/sessions/entities/refresh-token.entity.js +10 -0
  774. package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -1
  775. package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts +12 -0
  776. package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts.map +1 -0
  777. package/dist/modules/sessions/entities/revoked-refresh-family.entity.js +46 -0
  778. package/dist/modules/sessions/entities/revoked-refresh-family.entity.js.map +1 -0
  779. package/dist/modules/sessions/services/refresh-token-retention.service.d.ts +20 -0
  780. package/dist/modules/sessions/services/refresh-token-retention.service.d.ts.map +1 -0
  781. package/dist/modules/sessions/services/refresh-token-retention.service.js +97 -0
  782. package/dist/modules/sessions/services/refresh-token-retention.service.js.map +1 -0
  783. package/dist/modules/sessions/services/token.service.d.ts +150 -16
  784. package/dist/modules/sessions/services/token.service.d.ts.map +1 -1
  785. package/dist/modules/sessions/services/token.service.js +505 -74
  786. package/dist/modules/sessions/services/token.service.js.map +1 -1
  787. package/dist/modules/sessions/sessions.module.d.ts.map +1 -1
  788. package/dist/modules/sessions/sessions.module.js +4 -2
  789. package/dist/modules/sessions/sessions.module.js.map +1 -1
  790. package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts +13 -0
  791. package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts.map +1 -0
  792. package/dist/modules/sessions/utils/refresh-token-hash.util.js +37 -0
  793. package/dist/modules/sessions/utils/refresh-token-hash.util.js.map +1 -0
  794. package/dist/modules/settings/constants/settings.defaults.d.ts +57 -3
  795. package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -1
  796. package/dist/modules/settings/constants/settings.defaults.js +58 -3
  797. package/dist/modules/settings/constants/settings.defaults.js.map +1 -1
  798. package/dist/modules/settings/constants/settings.keys.d.ts +138 -2
  799. package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -1
  800. package/dist/modules/settings/constants/settings.keys.js +140 -2
  801. package/dist/modules/settings/constants/settings.keys.js.map +1 -1
  802. package/dist/modules/settings/controllers/settings.controller.d.ts +5 -1
  803. package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -1
  804. package/dist/modules/settings/controllers/settings.controller.js +134 -5
  805. package/dist/modules/settings/controllers/settings.controller.js.map +1 -1
  806. package/dist/modules/settings/services/settings.service.d.ts +17 -7
  807. package/dist/modules/settings/services/settings.service.d.ts.map +1 -1
  808. package/dist/modules/settings/services/settings.service.js +80 -14
  809. package/dist/modules/settings/services/settings.service.js.map +1 -1
  810. package/dist/modules/settings/utils/settings-secret.util.d.ts +13 -0
  811. package/dist/modules/settings/utils/settings-secret.util.d.ts.map +1 -0
  812. package/dist/modules/settings/utils/settings-secret.util.js +80 -0
  813. package/dist/modules/settings/utils/settings-secret.util.js.map +1 -0
  814. package/dist/modules/users/controllers/users.controller.d.ts +4 -2
  815. package/dist/modules/users/controllers/users.controller.d.ts.map +1 -1
  816. package/dist/modules/users/controllers/users.controller.js +89 -10
  817. package/dist/modules/users/controllers/users.controller.js.map +1 -1
  818. package/dist/modules/users/dto/user.dto.d.ts +5 -0
  819. package/dist/modules/users/dto/user.dto.d.ts.map +1 -1
  820. package/dist/modules/users/dto/user.dto.js +46 -5
  821. package/dist/modules/users/dto/user.dto.js.map +1 -1
  822. package/dist/modules/users/entities/user.entity.d.ts +7 -1
  823. package/dist/modules/users/entities/user.entity.d.ts.map +1 -1
  824. package/dist/modules/users/entities/user.entity.js +10 -0
  825. package/dist/modules/users/entities/user.entity.js.map +1 -1
  826. package/dist/modules/users/services/users.service.d.ts +15 -2
  827. package/dist/modules/users/services/users.service.d.ts.map +1 -1
  828. package/dist/modules/users/services/users.service.js +152 -37
  829. package/dist/modules/users/services/users.service.js.map +1 -1
  830. package/dist/modules/users/users.module.d.ts.map +1 -1
  831. package/dist/modules/users/users.module.js +1 -2
  832. package/dist/modules/users/users.module.js.map +1 -1
  833. package/package.json +19 -7
  834. package/dist/modules/admin/entities/admin-log.entity.d.ts +0 -20
  835. package/dist/modules/admin/entities/admin-log.entity.d.ts.map +0 -1
  836. package/dist/modules/admin/entities/admin-log.entity.js +0 -65
  837. package/dist/modules/admin/entities/admin-log.entity.js.map +0 -1
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthIdentityAndAudit1785006199375 = void 0;
4
+ /**
5
+ * Soft-delete friendly unique indexes on users.email / users.phone_number,
6
+ * plus password_reset_tokens.method for audit reporting.
7
+ */
8
+ class AuthIdentityAndAudit1785006199375 {
9
+ name = 'AuthIdentityAndAudit1785006199375';
10
+ async up(queryRunner) {
11
+ await queryRunner.query(`
12
+ ALTER TABLE "password_reset_tokens"
13
+ ADD COLUMN IF NOT EXISTS "method" character varying(32)
14
+ `);
15
+ await queryRunner.query(`
16
+ UPDATE "password_reset_tokens"
17
+ SET "method" = 'email_token'
18
+ WHERE "method" IS NULL
19
+ `);
20
+ await queryRunner.query(`
21
+ ALTER TABLE "password_reset_tokens"
22
+ ALTER COLUMN "method" SET DEFAULT 'email_token'
23
+ `);
24
+ await queryRunner.query(`
25
+ ALTER TABLE "password_reset_tokens"
26
+ ALTER COLUMN "method" SET NOT NULL
27
+ `);
28
+ // Drop non-partial unique indexes created by the full schema migration.
29
+ await queryRunner.query(`DROP INDEX IF EXISTS "IDX_97672ac88f789774dd47f7c8be"`);
30
+ await queryRunner.query(`DROP INDEX IF EXISTS "IDX_17d1817f241f10a3dbafb169fd"`);
31
+ await queryRunner.query(`
32
+ CREATE UNIQUE INDEX IF NOT EXISTS "UQ_users_email_active"
33
+ ON "users" ("email")
34
+ WHERE "email" IS NOT NULL AND "deleted_at" IS NULL
35
+ `);
36
+ await queryRunner.query(`
37
+ CREATE UNIQUE INDEX IF NOT EXISTS "UQ_users_phone_active"
38
+ ON "users" ("phone_number")
39
+ WHERE "phone_number" IS NOT NULL AND "deleted_at" IS NULL
40
+ `);
41
+ }
42
+ async down(queryRunner) {
43
+ await queryRunner.query(`DROP INDEX IF EXISTS "UQ_users_phone_active"`);
44
+ await queryRunner.query(`DROP INDEX IF EXISTS "UQ_users_email_active"`);
45
+ await queryRunner.query(`
46
+ CREATE UNIQUE INDEX IF NOT EXISTS "IDX_97672ac88f789774dd47f7c8be"
47
+ ON "users" ("email")
48
+ `);
49
+ await queryRunner.query(`
50
+ CREATE UNIQUE INDEX IF NOT EXISTS "IDX_17d1817f241f10a3dbafb169fd"
51
+ ON "users" ("phone_number")
52
+ `);
53
+ await queryRunner.query(`
54
+ ALTER TABLE "password_reset_tokens"
55
+ DROP COLUMN IF EXISTS "method"
56
+ `);
57
+ }
58
+ }
59
+ exports.AuthIdentityAndAudit1785006199375 = AuthIdentityAndAudit1785006199375;
60
+ //# sourceMappingURL=1785006199375-auth-identity-and-audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199375-auth-identity-and-audit.js","sourceRoot":"","sources":["../../../src/database/migrations/1785006199375-auth-identity-and-audit.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,iCAAiC;IAC7C,IAAI,GAAG,mCAAmC,CAAC;IAEpC,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QAEH,wEAAwE;QACxE,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;QACjF,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAEjF,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACzC,MAAM,WAAW,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QACxE,MAAM,WAAW,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QACxE,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;IACJ,CAAC;CACD;AAtDD,8EAsDC"}
@@ -0,0 +1,14 @@
1
+ import { type MigrationInterface, type QueryRunner } from 'typeorm';
2
+ /**
3
+ * Align existing app_settings rows with the hardened auth defaults:
4
+ * - require verified email to login
5
+ * - require MFA for phone, email, and oauth first factors
6
+ *
7
+ * New installs get these from SETTING_DEFAULTS / seed; this updates already-seeded DBs.
8
+ */
9
+ export declare class AuthSettingsSecurityDefaults1785006199376 implements MigrationInterface {
10
+ name: string;
11
+ up(queryRunner: QueryRunner): Promise<void>;
12
+ down(queryRunner: QueryRunner): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=1785006199376-auth-settings-security-defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199376-auth-settings-security-defaults.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1785006199376-auth-settings-security-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;;;GAMG;AACH,qBAAa,yCAA0C,YAAW,kBAAkB;IACnF,IAAI,SAA+C;IAEtC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAa3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAY1D"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthSettingsSecurityDefaults1785006199376 = void 0;
4
+ /**
5
+ * Align existing app_settings rows with the hardened auth defaults:
6
+ * - require verified email to login
7
+ * - require MFA for phone, email, and oauth first factors
8
+ *
9
+ * New installs get these from SETTING_DEFAULTS / seed; this updates already-seeded DBs.
10
+ */
11
+ class AuthSettingsSecurityDefaults1785006199376 {
12
+ name = 'AuthSettingsSecurityDefaults1785006199376';
13
+ async up(queryRunner) {
14
+ await queryRunner.query(`
15
+ UPDATE "app_settings"
16
+ SET "value" = 'true', "updated_at" = NOW()
17
+ WHERE "key" = 'auth.email.require_verified_to_login'
18
+ `);
19
+ await queryRunner.query(`
20
+ UPDATE "app_settings"
21
+ SET "value" = '["phone","email","oauth"]', "updated_at" = NOW()
22
+ WHERE "key" = 'auth.mfa.required_for_methods'
23
+ `);
24
+ }
25
+ async down(queryRunner) {
26
+ await queryRunner.query(`
27
+ UPDATE "app_settings"
28
+ SET "value" = 'false', "updated_at" = NOW()
29
+ WHERE "key" = 'auth.email.require_verified_to_login'
30
+ `);
31
+ await queryRunner.query(`
32
+ UPDATE "app_settings"
33
+ SET "value" = '["email","oauth"]', "updated_at" = NOW()
34
+ WHERE "key" = 'auth.mfa.required_for_methods'
35
+ `);
36
+ }
37
+ }
38
+ exports.AuthSettingsSecurityDefaults1785006199376 = AuthSettingsSecurityDefaults1785006199376;
39
+ //# sourceMappingURL=1785006199376-auth-settings-security-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199376-auth-settings-security-defaults.js","sourceRoot":"","sources":["../../../src/database/migrations/1785006199376-auth-settings-security-defaults.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,MAAa,yCAAyC;IACrD,IAAI,GAAG,2CAA2C,CAAC;IAE5C,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACzC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;IACJ,CAAC;CACD;AA5BD,8FA4BC"}
@@ -0,0 +1,13 @@
1
+ import { type MigrationInterface, type QueryRunner } from 'typeorm';
2
+ /**
3
+ * Security hardening:
4
+ * - Persist session epoch on users (Redis flush survivability)
5
+ * - Soft-delete-friendly unique indexes on OAuth identities
6
+ * - Force secure settings defaults (access TTL 5m, OTP length ≥6)
7
+ */
8
+ export declare class AuthSecurityHardening1785006199377 implements MigrationInterface {
9
+ name: string;
10
+ up(queryRunner: QueryRunner): Promise<void>;
11
+ down(queryRunner: QueryRunner): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=1785006199377-auth-security-hardening.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199377-auth-security-hardening.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1785006199377-auth-security-hardening.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;;GAKG;AACH,qBAAa,kCAAmC,YAAW,kBAAkB;IAC5E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAoD3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAO1D"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthSecurityHardening1785006199377 = void 0;
4
+ /**
5
+ * Security hardening:
6
+ * - Persist session epoch on users (Redis flush survivability)
7
+ * - Soft-delete-friendly unique indexes on OAuth identities
8
+ * - Force secure settings defaults (access TTL 5m, OTP length ≥6)
9
+ */
10
+ class AuthSecurityHardening1785006199377 {
11
+ name = 'AuthSecurityHardening1785006199377';
12
+ async up(queryRunner) {
13
+ await queryRunner.query(`
14
+ ALTER TABLE "users"
15
+ ADD COLUMN IF NOT EXISTS "session_epoch" integer NOT NULL DEFAULT 0
16
+ `);
17
+ await queryRunner.query(`
18
+ ALTER TABLE "user_oauth_identities"
19
+ DROP CONSTRAINT IF EXISTS "UQ_oauth_provider_subject"
20
+ `);
21
+ await queryRunner.query(`
22
+ ALTER TABLE "user_oauth_identities"
23
+ DROP CONSTRAINT IF EXISTS "UQ_oauth_user_provider"
24
+ `);
25
+ await queryRunner.query(`
26
+ CREATE UNIQUE INDEX IF NOT EXISTS "UQ_oauth_provider_subject_active"
27
+ ON "user_oauth_identities" ("provider", "provider_subject")
28
+ WHERE "deleted_at" IS NULL
29
+ `);
30
+ await queryRunner.query(`
31
+ CREATE UNIQUE INDEX IF NOT EXISTS "UQ_oauth_user_provider_active"
32
+ ON "user_oauth_identities" ("user_id", "provider")
33
+ WHERE "deleted_at" IS NULL
34
+ `);
35
+ await queryRunner.query(`
36
+ UPDATE "app_settings"
37
+ SET "value" = '5m', "updated_at" = NOW()
38
+ WHERE "key" = 'tokens.access_expires_in'
39
+ `);
40
+ await queryRunner.query(`
41
+ UPDATE "app_settings"
42
+ SET "value" = '6', "updated_at" = NOW()
43
+ WHERE "key" = 'otp.code_length'
44
+ AND ("value" IS NULL OR "value"::integer < 6)
45
+ `);
46
+ await queryRunner.query(`
47
+ INSERT INTO "app_settings" ("key", "value", "type", "group", "description", "is_editable")
48
+ VALUES
49
+ ('auth.oauth.require_id_token_nonce', 'true', 'boolean', 'auth',
50
+ 'Require matching nonce on OAuth ID-token login/register/link', true),
51
+ ('auth.password_reset.phone_cooldown_seconds', '86400', 'integer', 'auth',
52
+ 'Cool-off between phone OTP password resets (SIM-swap friction)', true),
53
+ ('otp.global_daily_send_limit', '50000', 'integer', 'otp',
54
+ 'Soft global OTP send budget per UTC day (0 disables)', true)
55
+ ON CONFLICT ("key") DO UPDATE SET
56
+ "value" = EXCLUDED."value",
57
+ "updated_at" = NOW()
58
+ `);
59
+ }
60
+ async down(queryRunner) {
61
+ await queryRunner.query(`DROP INDEX IF EXISTS "UQ_oauth_user_provider_active"`);
62
+ await queryRunner.query(`DROP INDEX IF EXISTS "UQ_oauth_provider_subject_active"`);
63
+ await queryRunner.query(`
64
+ ALTER TABLE "users" DROP COLUMN IF EXISTS "session_epoch"
65
+ `);
66
+ }
67
+ }
68
+ exports.AuthSecurityHardening1785006199377 = AuthSecurityHardening1785006199377;
69
+ //# sourceMappingURL=1785006199377-auth-security-hardening.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199377-auth-security-hardening.js","sourceRoot":"","sources":["../../../src/database/migrations/1785006199377-auth-security-hardening.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,MAAa,kCAAkC;IAC9C,IAAI,GAAG,oCAAoC,CAAC;IAErC,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;GAIvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;GAKvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;GAYvB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACzC,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;QACnF,MAAM,WAAW,CAAC,KAAK,CAAC;;GAEvB,CAAC,CAAC;IACJ,CAAC;CACD;AA9DD,gFA8DC"}
@@ -0,0 +1,11 @@
1
+ import { type MigrationInterface, type QueryRunner } from 'typeorm';
2
+ /**
3
+ * Persist refresh-family denylist (survives Redis flush),
4
+ * plus Turnstile / DPoP settings keys.
5
+ */
6
+ export declare class AuthFamilyDenylistAndHardening1785006199378 implements MigrationInterface {
7
+ name: string;
8
+ up(queryRunner: QueryRunner): Promise<void>;
9
+ down(queryRunner: QueryRunner): Promise<void>;
10
+ }
11
+ //# sourceMappingURL=1785006199378-auth-family-denylist-and-hardening.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199378-auth-family-denylist-and-hardening.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1785006199378-auth-family-denylist-and-hardening.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE;;;GAGG;AACH,qBAAa,2CAA4C,YAAW,kBAAkB;IACrF,IAAI,SAAiD;IAExC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAW1D"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthFamilyDenylistAndHardening1785006199378 = void 0;
4
+ /**
5
+ * Persist refresh-family denylist (survives Redis flush),
6
+ * plus Turnstile / DPoP settings keys.
7
+ */
8
+ class AuthFamilyDenylistAndHardening1785006199378 {
9
+ name = 'AuthFamilyDenylistAndHardening1785006199378';
10
+ async up(queryRunner) {
11
+ await queryRunner.query(`
12
+ CREATE TABLE IF NOT EXISTS "revoked_refresh_families" (
13
+ "family_id" uuid NOT NULL,
14
+ "revoked_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
15
+ "expires_at" TIMESTAMP WITH TIME ZONE NOT NULL,
16
+ "reason" character varying(64),
17
+ CONSTRAINT "PK_revoked_refresh_families" PRIMARY KEY ("family_id")
18
+ )
19
+ `);
20
+ await queryRunner.query(`
21
+ CREATE INDEX IF NOT EXISTS "IDX_revoked_refresh_families_expires"
22
+ ON "revoked_refresh_families" ("expires_at")
23
+ `);
24
+ await queryRunner.query(`
25
+ INSERT INTO "app_settings" ("key", "value", "type", "group", "description", "is_editable")
26
+ VALUES
27
+ ('auth.turnstile.enabled', 'false', 'boolean', 'auth',
28
+ 'Require Cloudflare Turnstile on send-otp / resend-otp (enumeration + SMS drain)', true),
29
+ ('auth.turnstile.site_key', '', 'string', 'auth',
30
+ 'Cloudflare Turnstile site key (public)', true),
31
+ ('auth.turnstile.secret_key', '', 'string', 'auth',
32
+ 'Cloudflare Turnstile secret (encrypted at rest when ENCRYPTION_KEY set)', true),
33
+ ('auth.dpop.mode', 'optional', 'string', 'auth',
34
+ 'DPoP binding: off | optional | required', true)
35
+ ON CONFLICT ("key") DO NOTHING
36
+ `);
37
+ }
38
+ async down(queryRunner) {
39
+ await queryRunner.query(`DROP TABLE IF EXISTS "revoked_refresh_families"`);
40
+ await queryRunner.query(`
41
+ DELETE FROM "app_settings" WHERE "key" IN (
42
+ 'auth.turnstile.enabled',
43
+ 'auth.turnstile.site_key',
44
+ 'auth.turnstile.secret_key',
45
+ 'auth.dpop.mode'
46
+ )
47
+ `);
48
+ }
49
+ }
50
+ exports.AuthFamilyDenylistAndHardening1785006199378 = AuthFamilyDenylistAndHardening1785006199378;
51
+ //# sourceMappingURL=1785006199378-auth-family-denylist-and-hardening.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199378-auth-family-denylist-and-hardening.js","sourceRoot":"","sources":["../../../src/database/migrations/1785006199378-auth-family-denylist-and-hardening.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,2CAA2C;IACvD,IAAI,GAAG,6CAA6C,CAAC;IAE9C,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;GAQvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;GAYvB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACzC,MAAM,WAAW,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAC3E,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;GAOvB,CAAC,CAAC;IACJ,CAAC;CACD;AA5CD,kGA4CC"}
@@ -0,0 +1,12 @@
1
+ import { type MigrationInterface, type QueryRunner } from 'typeorm';
2
+ /**
3
+ * Authz / lifecycle hardening:
4
+ * - MFA global kill-switch not API-editable
5
+ * - DPoP default required for new settings rows (ops still set AUTH_DPOP_MODE=required in prod)
6
+ */
7
+ export declare class AuthzLifecycleHardening1785006199379 implements MigrationInterface {
8
+ name: string;
9
+ up(queryRunner: QueryRunner): Promise<void>;
10
+ down(queryRunner: QueryRunner): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=1785006199379-authz-lifecycle-hardening.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199379-authz-lifecycle-hardening.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1785006199379-authz-lifecycle-hardening.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;GAIG;AACH,qBAAa,oCAAqC,YAAW,kBAAkB;IAC9E,IAAI,SAA0C;IAEjC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ1D"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthzLifecycleHardening1785006199379 = void 0;
4
+ /**
5
+ * Authz / lifecycle hardening:
6
+ * - MFA global kill-switch not API-editable
7
+ * - DPoP default required for new settings rows (ops still set AUTH_DPOP_MODE=required in prod)
8
+ */
9
+ class AuthzLifecycleHardening1785006199379 {
10
+ name = 'AuthzLifecycleHardening1785006199379';
11
+ async up(queryRunner) {
12
+ await queryRunner.query(`
13
+ UPDATE "app_settings"
14
+ SET "is_editable" = false,
15
+ "description" = 'Global MFA kill-switch. API cannot disable (factor-bypass risk); ops/seed only.',
16
+ "updated_at" = NOW()
17
+ WHERE "key" = 'auth.mfa.enabled'
18
+ `);
19
+ await queryRunner.query(`
20
+ UPDATE "app_settings"
21
+ SET "value" = 'required',
22
+ "updated_at" = NOW()
23
+ WHERE "key" = 'auth.dpop.mode'
24
+ AND ("value" IS NULL OR "value" IN ('optional', 'off', ''))
25
+ `);
26
+ }
27
+ async down(queryRunner) {
28
+ await queryRunner.query(`
29
+ UPDATE "app_settings"
30
+ SET "is_editable" = true,
31
+ "updated_at" = NOW()
32
+ WHERE "key" = 'auth.mfa.enabled'
33
+ `);
34
+ }
35
+ }
36
+ exports.AuthzLifecycleHardening1785006199379 = AuthzLifecycleHardening1785006199379;
37
+ //# sourceMappingURL=1785006199379-authz-lifecycle-hardening.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199379-authz-lifecycle-hardening.js","sourceRoot":"","sources":["../../../src/database/migrations/1785006199379-authz-lifecycle-hardening.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,MAAa,oCAAoC;IAChD,IAAI,GAAG,sCAAsC,CAAC;IAEvC,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;GAMvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;GAMvB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACzC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;GAKvB,CAAC,CAAC;IACJ,CAAC;CACD;AA5BD,oFA4BC"}
@@ -0,0 +1,12 @@
1
+ import { type MigrationInterface, type QueryRunner } from 'typeorm';
2
+ /**
3
+ * Remaining auth gaps:
4
+ * - Bind refresh tokens to DPoP JKT
5
+ * - Lock security-critical settings (nonce, DPoP, Turnstile, OAuth secrets)
6
+ */
7
+ export declare class AuthRemainingGaps1785006199380 implements MigrationInterface {
8
+ name: string;
9
+ up(queryRunner: QueryRunner): Promise<void>;
10
+ down(queryRunner: QueryRunner): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=1785006199380-auth-remaining-gaps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199380-auth-remaining-gaps.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1785006199380-auth-remaining-gaps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;GAIG;AACH,qBAAa,8BAA+B,YAAW,kBAAkB;IACxE,IAAI,SAAoC;IAE3B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAkD3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAiB1D"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthRemainingGaps1785006199380 = void 0;
4
+ /**
5
+ * Remaining auth gaps:
6
+ * - Bind refresh tokens to DPoP JKT
7
+ * - Lock security-critical settings (nonce, DPoP, Turnstile, OAuth secrets)
8
+ */
9
+ class AuthRemainingGaps1785006199380 {
10
+ name = 'AuthRemainingGaps1785006199380';
11
+ async up(queryRunner) {
12
+ await queryRunner.query(`
13
+ ALTER TABLE "refresh_tokens"
14
+ ADD COLUMN IF NOT EXISTS "dpop_jkt" character varying(128)
15
+ `);
16
+ await queryRunner.query(`
17
+ UPDATE "app_settings"
18
+ SET "is_editable" = false,
19
+ "description" = 'Require matching nonce on OAuth ID tokens. API cannot disable (replay risk); ops/seed only.',
20
+ "updated_at" = NOW()
21
+ WHERE "key" = 'auth.oauth.require_id_token_nonce'
22
+ `);
23
+ await queryRunner.query(`
24
+ UPDATE "app_settings"
25
+ SET "is_editable" = false,
26
+ "description" = 'DPoP mode: off | optional | required. Production uses AUTH_DPOP_MODE env; API cannot weaken.',
27
+ "updated_at" = NOW()
28
+ WHERE "key" = 'auth.dpop.mode'
29
+ `);
30
+ await queryRunner.query(`
31
+ UPDATE "app_settings"
32
+ SET "is_editable" = false,
33
+ "description" = 'Require Cloudflare Turnstile on public auth. API cannot disable; ops/env only.',
34
+ "updated_at" = NOW()
35
+ WHERE "key" = 'auth.turnstile.enabled'
36
+ `);
37
+ await queryRunner.query(`
38
+ UPDATE "app_settings"
39
+ SET "is_editable" = false,
40
+ "description" = 'Cloudflare Turnstile secret. API cannot edit; ops/seed only.',
41
+ "updated_at" = NOW()
42
+ WHERE "key" = 'auth.turnstile.secret_key'
43
+ `);
44
+ await queryRunner.query(`
45
+ UPDATE "app_settings"
46
+ SET "is_editable" = false,
47
+ "description" = 'OAuth client secret. API cannot edit; ops/seed only.',
48
+ "updated_at" = NOW()
49
+ WHERE "key" IN (
50
+ 'auth.oauth.google.client_secret',
51
+ 'auth.oauth.microsoft.client_secret'
52
+ )
53
+ `);
54
+ }
55
+ async down(queryRunner) {
56
+ await queryRunner.query(`
57
+ ALTER TABLE "refresh_tokens" DROP COLUMN IF EXISTS "dpop_jkt"
58
+ `);
59
+ await queryRunner.query(`
60
+ UPDATE "app_settings"
61
+ SET "is_editable" = true, "updated_at" = NOW()
62
+ WHERE "key" IN (
63
+ 'auth.oauth.require_id_token_nonce',
64
+ 'auth.dpop.mode',
65
+ 'auth.turnstile.enabled',
66
+ 'auth.turnstile.secret_key',
67
+ 'auth.oauth.google.client_secret',
68
+ 'auth.oauth.microsoft.client_secret'
69
+ )
70
+ `);
71
+ }
72
+ }
73
+ exports.AuthRemainingGaps1785006199380 = AuthRemainingGaps1785006199380;
74
+ //# sourceMappingURL=1785006199380-auth-remaining-gaps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199380-auth-remaining-gaps.js","sourceRoot":"","sources":["../../../src/database/migrations/1785006199380-auth-remaining-gaps.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,MAAa,8BAA8B;IAC1C,IAAI,GAAG,gCAAgC,CAAC;IAEjC,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CAAC;;;GAGvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;GAMvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;GAMvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;GAMvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;GAMvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;GASvB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACzC,MAAM,WAAW,CAAC,KAAK,CAAC;;GAEvB,CAAC,CAAC;QACH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;GAWvB,CAAC,CAAC;IACJ,CAAC;CACD;AAtED,wEAsEC"}
@@ -0,0 +1,12 @@
1
+ import { type MigrationInterface, type QueryRunner } from 'typeorm';
2
+ /**
3
+ * Shrink settings:write blast radius:
4
+ * - Lock OAuth redirect URI allowlist
5
+ * - Lock delivery / Firebase credentials (ops/seed only)
6
+ */
7
+ export declare class SettingsBlastRadius1785006199381 implements MigrationInterface {
8
+ name: string;
9
+ up(queryRunner: QueryRunner): Promise<void>;
10
+ down(queryRunner: QueryRunner): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=1785006199381-settings-blast-radius.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199381-settings-blast-radius.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1785006199381-settings-blast-radius.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;GAIG;AACH,qBAAa,gCAAiC,YAAW,kBAAkB;IAC1E,IAAI,SAAsC;IAE7B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAgB1D"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsBlastRadius1785006199381 = void 0;
4
+ /**
5
+ * Shrink settings:write blast radius:
6
+ * - Lock OAuth redirect URI allowlist
7
+ * - Lock delivery / Firebase credentials (ops/seed only)
8
+ */
9
+ class SettingsBlastRadius1785006199381 {
10
+ name = 'SettingsBlastRadius1785006199381';
11
+ async up(queryRunner) {
12
+ await queryRunner.query(`
13
+ UPDATE "app_settings"
14
+ SET "is_editable" = false,
15
+ "description" = 'Allowed OAuth redirect URIs. API cannot edit (callback hijack risk); ops/seed only.',
16
+ "updated_at" = NOW()
17
+ WHERE "key" = 'auth.oauth.redirect_uris'
18
+ `);
19
+ await queryRunner.query(`
20
+ UPDATE "app_settings"
21
+ SET "is_editable" = false,
22
+ "updated_at" = NOW()
23
+ WHERE "key" IN (
24
+ 'sms.twilio_auth_token',
25
+ 'sms.termii_api_key',
26
+ 'sms.infobip_api_key',
27
+ 'sms.smartsms_token',
28
+ 'email.smtp_pass',
29
+ 'firebase.private_key',
30
+ 'firebase.api_key'
31
+ )
32
+ `);
33
+ }
34
+ async down(queryRunner) {
35
+ await queryRunner.query(`
36
+ UPDATE "app_settings"
37
+ SET "is_editable" = true, "updated_at" = NOW()
38
+ WHERE "key" IN (
39
+ 'auth.oauth.redirect_uris',
40
+ 'sms.twilio_auth_token',
41
+ 'sms.termii_api_key',
42
+ 'sms.infobip_api_key',
43
+ 'sms.smartsms_token',
44
+ 'email.smtp_pass',
45
+ 'firebase.private_key',
46
+ 'firebase.api_key'
47
+ )
48
+ `);
49
+ }
50
+ }
51
+ exports.SettingsBlastRadius1785006199381 = SettingsBlastRadius1785006199381;
52
+ //# sourceMappingURL=1785006199381-settings-blast-radius.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199381-settings-blast-radius.js","sourceRoot":"","sources":["../../../src/database/migrations/1785006199381-settings-blast-radius.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,MAAa,gCAAgC;IAC5C,IAAI,GAAG,kCAAkC,CAAC;IAEnC,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;GAMvB,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;GAavB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACzC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;GAavB,CAAC,CAAC;IACJ,CAAC;CACD;AA5CD,4EA4CC"}
@@ -0,0 +1,11 @@
1
+ import { type MigrationInterface, type QueryRunner } from 'typeorm';
2
+ /**
3
+ * Lock OAuth client ID audience allowlists from settings:write
4
+ * (same class of risk as redirect_uris — phishing ID-token ATO).
5
+ */
6
+ export declare class OauthClientIdsLock1785006199382 implements MigrationInterface {
7
+ name: string;
8
+ up(queryRunner: QueryRunner): Promise<void>;
9
+ down(queryRunner: QueryRunner): Promise<void>;
10
+ }
11
+ //# sourceMappingURL=1785006199382-oauth-client-ids-lock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199382-oauth-client-ids-lock.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1785006199382-oauth-client-ids-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE;;;GAGG;AACH,qBAAa,+BAAgC,YAAW,kBAAkB;IACzE,IAAI,SAAqC;IAE5B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAc3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAW1D"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OauthClientIdsLock1785006199382 = void 0;
4
+ /**
5
+ * Lock OAuth client ID audience allowlists from settings:write
6
+ * (same class of risk as redirect_uris — phishing ID-token ATO).
7
+ */
8
+ class OauthClientIdsLock1785006199382 {
9
+ name = 'OauthClientIdsLock1785006199382';
10
+ async up(queryRunner) {
11
+ await queryRunner.query(`
12
+ UPDATE "app_settings"
13
+ SET "is_editable" = false,
14
+ "description" = 'OAuth client ID audience allowlist. API cannot edit (phishing risk); ops/seed only.',
15
+ "updated_at" = NOW()
16
+ WHERE "key" IN (
17
+ 'auth.oauth.google.client_ids',
18
+ 'auth.oauth.apple.client_ids',
19
+ 'auth.oauth.microsoft.client_ids'
20
+ )
21
+ `);
22
+ }
23
+ async down(queryRunner) {
24
+ await queryRunner.query(`
25
+ UPDATE "app_settings"
26
+ SET "is_editable" = true, "updated_at" = NOW()
27
+ WHERE "key" IN (
28
+ 'auth.oauth.google.client_ids',
29
+ 'auth.oauth.apple.client_ids',
30
+ 'auth.oauth.microsoft.client_ids'
31
+ )
32
+ `);
33
+ }
34
+ }
35
+ exports.OauthClientIdsLock1785006199382 = OauthClientIdsLock1785006199382;
36
+ //# sourceMappingURL=1785006199382-oauth-client-ids-lock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199382-oauth-client-ids-lock.js","sourceRoot":"","sources":["../../../src/database/migrations/1785006199382-oauth-client-ids-lock.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,+BAA+B;IAC3C,IAAI,GAAG,iCAAiC,CAAC;IAElC,KAAK,CAAC,EAAE,CAAC,WAAwB;QACvC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;GAUvB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACzC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;GAQvB,CAAC,CAAC;IACJ,CAAC;CACD;AA5BD,0EA4BC"}
@@ -0,0 +1,12 @@
1
+ import { type MigrationInterface, type QueryRunner } from 'typeorm';
2
+ /**
3
+ * Lock privilege-sensitive auth settings:
4
+ * - default_role_slug (self-register priv-esc)
5
+ * - email require_verified_to_login
6
+ */
7
+ export declare class SettingsRoleAndVerifiedLock1785006199383 implements MigrationInterface {
8
+ name: string;
9
+ up(queryRunner: QueryRunner): Promise<void>;
10
+ down(queryRunner: QueryRunner): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=1785006199383-settings-role-and-verified-lock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1785006199383-settings-role-and-verified-lock.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/1785006199383-settings-role-and-verified-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;GAIG;AACH,qBAAa,wCAAyC,YAAW,kBAAkB;IAClF,IAAI,SAA8C;IAErC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAU1D"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsRoleAndVerifiedLock1785006199383 = void 0;
4
+ /**
5
+ * Lock privilege-sensitive auth settings:
6
+ * - default_role_slug (self-register priv-esc)
7
+ * - email require_verified_to_login
8
+ */
9
+ class SettingsRoleAndVerifiedLock1785006199383 {
10
+ name = 'SettingsRoleAndVerifiedLock1785006199383';
11
+ async up(queryRunner) {
12
+ await queryRunner.query(`
13
+ UPDATE "app_settings"
14
+ SET "is_editable" = false,
15
+ "description" = 'Default role on self-registration. API cannot edit (priv-esc risk); ops/seed only. Never use admin.',
16
+ "updated_at" = NOW()
17
+ WHERE "key" = 'auth.default_role_slug'
18
+ `);
19
+ await queryRunner.query(`
20
+ UPDATE "app_settings"
21
+ SET "is_editable" = false,
22
+ "description" = 'Require verified email for email/password login. API cannot disable; ops/seed only.',
23
+ "updated_at" = NOW()
24
+ WHERE "key" = 'auth.email.require_verified_to_login'
25
+ `);
26
+ }
27
+ async down(queryRunner) {
28
+ await queryRunner.query(`
29
+ UPDATE "app_settings"
30
+ SET "is_editable" = true, "updated_at" = NOW()
31
+ WHERE "key" IN (
32
+ 'auth.default_role_slug',
33
+ 'auth.email.require_verified_to_login'
34
+ )
35
+ `);
36
+ }
37
+ }
38
+ exports.SettingsRoleAndVerifiedLock1785006199383 = SettingsRoleAndVerifiedLock1785006199383;
39
+ //# sourceMappingURL=1785006199383-settings-role-and-verified-lock.js.map