@colveor/core 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (740) hide show
  1. package/CHANGELOG.md +24 -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/1784284557959-full-schema.d.ts.map +1 -1
  75. package/dist/database/migrations/1784284557959-full-schema.js +48 -14
  76. package/dist/database/migrations/1784284557959-full-schema.js.map +1 -1
  77. package/dist/database/migrations/1784284557960-audit-partitioning.d.ts +17 -0
  78. package/dist/database/migrations/1784284557960-audit-partitioning.d.ts.map +1 -0
  79. package/dist/database/migrations/1784284557960-audit-partitioning.js +384 -0
  80. package/dist/database/migrations/1784284557960-audit-partitioning.js.map +1 -0
  81. package/dist/database/seeds/roles.seed.d.ts +6 -0
  82. package/dist/database/seeds/roles.seed.d.ts.map +1 -1
  83. package/dist/database/seeds/roles.seed.js +22 -5
  84. package/dist/database/seeds/roles.seed.js.map +1 -1
  85. package/dist/database/seeds/settings.seed.d.ts +5 -0
  86. package/dist/database/seeds/settings.seed.d.ts.map +1 -1
  87. package/dist/database/seeds/settings.seed.js +500 -25
  88. package/dist/database/seeds/settings.seed.js.map +1 -1
  89. package/dist/database/seeds/templates/html-template.reader.d.ts +1 -0
  90. package/dist/database/seeds/templates/html-template.reader.d.ts.map +1 -1
  91. package/dist/database/seeds/templates/html-template.reader.js +3 -1
  92. package/dist/database/seeds/templates/html-template.reader.js.map +1 -1
  93. package/dist/database/seeds/templates/html-template.reader.ts +5 -1
  94. package/dist/database/typeorm.util.d.ts.map +1 -1
  95. package/dist/database/typeorm.util.js +6 -0
  96. package/dist/database/typeorm.util.js.map +1 -1
  97. package/dist/index.d.ts +8 -1
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +39 -4
  100. package/dist/index.js.map +1 -1
  101. package/dist/modules/admin/controllers/admin.controller.d.ts +15 -7
  102. package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -1
  103. package/dist/modules/admin/controllers/admin.controller.js +74 -17
  104. package/dist/modules/admin/controllers/admin.controller.js.map +1 -1
  105. package/dist/modules/admin/services/admin-log.service.d.ts +14 -7
  106. package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -1
  107. package/dist/modules/admin/services/admin-log.service.js +41 -38
  108. package/dist/modules/admin/services/admin-log.service.js.map +1 -1
  109. package/dist/modules/audit/audit.manifest.d.ts +8 -0
  110. package/dist/modules/audit/audit.manifest.d.ts.map +1 -0
  111. package/dist/modules/audit/audit.manifest.js +31 -0
  112. package/dist/modules/audit/audit.manifest.js.map +1 -0
  113. package/dist/modules/audit/audit.module.d.ts +8 -0
  114. package/dist/modules/audit/audit.module.d.ts.map +1 -0
  115. package/dist/modules/audit/audit.module.js +57 -0
  116. package/dist/modules/audit/audit.module.js.map +1 -0
  117. package/dist/modules/audit/constants/audit-actions.d.ts +79 -0
  118. package/dist/modules/audit/constants/audit-actions.d.ts.map +1 -0
  119. package/dist/modules/audit/constants/audit-actions.js +89 -0
  120. package/dist/modules/audit/constants/audit-actions.js.map +1 -0
  121. package/dist/modules/audit/constants/audit-mutation.d.ts +10 -0
  122. package/dist/modules/audit/constants/audit-mutation.d.ts.map +1 -0
  123. package/dist/modules/audit/constants/audit-mutation.js +13 -0
  124. package/dist/modules/audit/constants/audit-mutation.js.map +1 -0
  125. package/dist/modules/audit/controllers/audit.controller.d.ts +13 -0
  126. package/dist/modules/audit/controllers/audit.controller.d.ts.map +1 -0
  127. package/dist/modules/audit/controllers/audit.controller.js +149 -0
  128. package/dist/modules/audit/controllers/audit.controller.js.map +1 -0
  129. package/dist/modules/audit/decorators/audit.decorator.d.ts +27 -0
  130. package/dist/modules/audit/decorators/audit.decorator.d.ts.map +1 -0
  131. package/dist/modules/audit/decorators/audit.decorator.js +18 -0
  132. package/dist/modules/audit/decorators/audit.decorator.js.map +1 -0
  133. package/dist/modules/audit/dto/audit.dto.d.ts +54 -0
  134. package/dist/modules/audit/dto/audit.dto.d.ts.map +1 -0
  135. package/dist/modules/audit/dto/audit.dto.js +129 -0
  136. package/dist/modules/audit/dto/audit.dto.js.map +1 -0
  137. package/dist/modules/audit/entities/audit-event.entity.d.ts +33 -0
  138. package/dist/modules/audit/entities/audit-event.entity.d.ts.map +1 -0
  139. package/dist/modules/audit/entities/audit-event.entity.js +125 -0
  140. package/dist/modules/audit/entities/audit-event.entity.js.map +1 -0
  141. package/dist/modules/audit/entities/audit-outbox.entity.d.ts +16 -0
  142. package/dist/modules/audit/entities/audit-outbox.entity.d.ts.map +1 -0
  143. package/dist/modules/audit/entities/audit-outbox.entity.js +65 -0
  144. package/dist/modules/audit/entities/audit-outbox.entity.js.map +1 -0
  145. package/dist/modules/audit/index.d.ts +13 -0
  146. package/dist/modules/audit/index.d.ts.map +1 -0
  147. package/dist/modules/audit/index.js +23 -0
  148. package/dist/modules/audit/index.js.map +1 -0
  149. package/dist/modules/audit/interceptors/audit.interceptor.d.ts +11 -0
  150. package/dist/modules/audit/interceptors/audit.interceptor.d.ts.map +1 -0
  151. package/dist/modules/audit/interceptors/audit.interceptor.js +75 -0
  152. package/dist/modules/audit/interceptors/audit.interceptor.js.map +1 -0
  153. package/dist/modules/audit/listeners/auth-audit.listener.d.ts +31 -0
  154. package/dist/modules/audit/listeners/auth-audit.listener.d.ts.map +1 -0
  155. package/dist/modules/audit/listeners/auth-audit.listener.js +338 -0
  156. package/dist/modules/audit/listeners/auth-audit.listener.js.map +1 -0
  157. package/dist/modules/audit/services/audit-archive.service.d.ts +28 -0
  158. package/dist/modules/audit/services/audit-archive.service.d.ts.map +1 -0
  159. package/dist/modules/audit/services/audit-archive.service.js +132 -0
  160. package/dist/modules/audit/services/audit-archive.service.js.map +1 -0
  161. package/dist/modules/audit/services/audit-hash-backfill.service.d.ts +22 -0
  162. package/dist/modules/audit/services/audit-hash-backfill.service.d.ts.map +1 -0
  163. package/dist/modules/audit/services/audit-hash-backfill.service.js +79 -0
  164. package/dist/modules/audit/services/audit-hash-backfill.service.js.map +1 -0
  165. package/dist/modules/audit/services/audit-leader.service.d.ts +28 -0
  166. package/dist/modules/audit/services/audit-leader.service.d.ts.map +1 -0
  167. package/dist/modules/audit/services/audit-leader.service.js +99 -0
  168. package/dist/modules/audit/services/audit-leader.service.js.map +1 -0
  169. package/dist/modules/audit/services/audit-outbox.worker.d.ts +29 -0
  170. package/dist/modules/audit/services/audit-outbox.worker.d.ts.map +1 -0
  171. package/dist/modules/audit/services/audit-outbox.worker.js +144 -0
  172. package/dist/modules/audit/services/audit-outbox.worker.js.map +1 -0
  173. package/dist/modules/audit/services/audit-partition.service.d.ts +18 -0
  174. package/dist/modules/audit/services/audit-partition.service.d.ts.map +1 -0
  175. package/dist/modules/audit/services/audit-partition.service.js +70 -0
  176. package/dist/modules/audit/services/audit-partition.service.js.map +1 -0
  177. package/dist/modules/audit/services/audit-write.service.d.ts +60 -0
  178. package/dist/modules/audit/services/audit-write.service.d.ts.map +1 -0
  179. package/dist/modules/audit/services/audit-write.service.js +463 -0
  180. package/dist/modules/audit/services/audit-write.service.js.map +1 -0
  181. package/dist/modules/audit/services/audit.service.d.ts +60 -0
  182. package/dist/modules/audit/services/audit.service.d.ts.map +1 -0
  183. package/dist/modules/audit/services/audit.service.js +373 -0
  184. package/dist/modules/audit/services/audit.service.js.map +1 -0
  185. package/dist/modules/audit/utils/audit-hash.util.d.ts +20 -0
  186. package/dist/modules/audit/utils/audit-hash.util.d.ts.map +1 -0
  187. package/dist/modules/audit/utils/audit-hash.util.js +44 -0
  188. package/dist/modules/audit/utils/audit-hash.util.js.map +1 -0
  189. package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -1
  190. package/dist/modules/auth/auth-core/auth-core.module.js +16 -4
  191. package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -1
  192. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts +22 -0
  193. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts.map +1 -0
  194. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js +25 -0
  195. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js.map +1 -0
  196. package/dist/modules/auth/auth-core/services/access-token.validator.d.ts +19 -0
  197. package/dist/modules/auth/auth-core/services/access-token.validator.d.ts.map +1 -0
  198. package/dist/modules/auth/auth-core/services/access-token.validator.js +110 -0
  199. package/dist/modules/auth/auth-core/services/access-token.validator.js.map +1 -0
  200. package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts +10 -0
  201. package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts.map +1 -0
  202. package/dist/modules/auth/auth-core/services/family-denylist.reader.js +44 -0
  203. package/dist/modules/auth/auth-core/services/family-denylist.reader.js.map +1 -0
  204. package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts +10 -0
  205. package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts.map +1 -0
  206. package/dist/modules/auth/auth-core/services/session-epoch.reader.js +44 -0
  207. package/dist/modules/auth/auth-core/services/session-epoch.reader.js.map +1 -0
  208. package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +7 -8
  209. package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -1
  210. package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +34 -34
  211. package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -1
  212. package/dist/modules/auth/auth.manifest.d.ts +6 -0
  213. package/dist/modules/auth/auth.manifest.d.ts.map +1 -1
  214. package/dist/modules/auth/auth.manifest.js +38 -2
  215. package/dist/modules/auth/auth.manifest.js.map +1 -1
  216. package/dist/modules/auth/auth.module.d.ts.map +1 -1
  217. package/dist/modules/auth/auth.module.js +39 -4
  218. package/dist/modules/auth/auth.module.js.map +1 -1
  219. package/dist/modules/auth/controllers/account.controller.d.ts +15 -1
  220. package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -1
  221. package/dist/modules/auth/controllers/account.controller.js +65 -7
  222. package/dist/modules/auth/controllers/account.controller.js.map +1 -1
  223. package/dist/modules/auth/controllers/auth.controller.d.ts +7 -3
  224. package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -1
  225. package/dist/modules/auth/controllers/auth.controller.js +76 -16
  226. package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
  227. package/dist/modules/auth/controllers/forgot-password.controller.d.ts +4 -2
  228. package/dist/modules/auth/controllers/forgot-password.controller.d.ts.map +1 -1
  229. package/dist/modules/auth/controllers/forgot-password.controller.js +32 -11
  230. package/dist/modules/auth/controllers/forgot-password.controller.js.map +1 -1
  231. package/dist/modules/auth/controllers/mfa.controller.d.ts +18 -0
  232. package/dist/modules/auth/controllers/mfa.controller.d.ts.map +1 -0
  233. package/dist/modules/auth/controllers/mfa.controller.js +192 -0
  234. package/dist/modules/auth/controllers/mfa.controller.js.map +1 -0
  235. package/dist/modules/auth/controllers/oauth.controller.d.ts +22 -0
  236. package/dist/modules/auth/controllers/oauth.controller.d.ts.map +1 -0
  237. package/dist/modules/auth/controllers/oauth.controller.js +192 -0
  238. package/dist/modules/auth/controllers/oauth.controller.js.map +1 -0
  239. package/dist/modules/auth/controllers/otp.controller.d.ts +6 -3
  240. package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -1
  241. package/dist/modules/auth/controllers/otp.controller.js +32 -33
  242. package/dist/modules/auth/controllers/otp.controller.js.map +1 -1
  243. package/dist/modules/auth/controllers/pin.controller.d.ts.map +1 -1
  244. package/dist/modules/auth/controllers/pin.controller.js +10 -2
  245. package/dist/modules/auth/controllers/pin.controller.js.map +1 -1
  246. package/dist/modules/auth/controllers/session.controller.d.ts +12 -4
  247. package/dist/modules/auth/controllers/session.controller.d.ts.map +1 -1
  248. package/dist/modules/auth/controllers/session.controller.js +130 -31
  249. package/dist/modules/auth/controllers/session.controller.js.map +1 -1
  250. package/dist/modules/auth/dto/auth-config.dto.d.ts +11 -2
  251. package/dist/modules/auth/dto/auth-config.dto.d.ts.map +1 -1
  252. package/dist/modules/auth/dto/auth-config.dto.js +78 -3
  253. package/dist/modules/auth/dto/auth-config.dto.js.map +1 -1
  254. package/dist/modules/auth/dto/index.d.ts +2 -0
  255. package/dist/modules/auth/dto/index.d.ts.map +1 -1
  256. package/dist/modules/auth/dto/index.js +2 -0
  257. package/dist/modules/auth/dto/index.js.map +1 -1
  258. package/dist/modules/auth/dto/login.dto.d.ts +8 -1
  259. package/dist/modules/auth/dto/login.dto.d.ts.map +1 -1
  260. package/dist/modules/auth/dto/login.dto.js +48 -3
  261. package/dist/modules/auth/dto/login.dto.js.map +1 -1
  262. package/dist/modules/auth/dto/mfa.dto.d.ts +61 -0
  263. package/dist/modules/auth/dto/mfa.dto.d.ts.map +1 -0
  264. package/dist/modules/auth/dto/mfa.dto.js +326 -0
  265. package/dist/modules/auth/dto/mfa.dto.js.map +1 -0
  266. package/dist/modules/auth/dto/oauth.dto.d.ts +45 -0
  267. package/dist/modules/auth/dto/oauth.dto.d.ts.map +1 -0
  268. package/dist/modules/auth/dto/oauth.dto.js +249 -0
  269. package/dist/modules/auth/dto/oauth.dto.js.map +1 -0
  270. package/dist/modules/auth/dto/otp.dto.d.ts +3 -1
  271. package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -1
  272. package/dist/modules/auth/dto/otp.dto.js +19 -0
  273. package/dist/modules/auth/dto/otp.dto.js.map +1 -1
  274. package/dist/modules/auth/dto/password.dto.d.ts +28 -0
  275. package/dist/modules/auth/dto/password.dto.d.ts.map +1 -1
  276. package/dist/modules/auth/dto/password.dto.js +191 -5
  277. package/dist/modules/auth/dto/password.dto.js.map +1 -1
  278. package/dist/modules/auth/dto/register.dto.d.ts +1 -0
  279. package/dist/modules/auth/dto/register.dto.d.ts.map +1 -1
  280. package/dist/modules/auth/dto/register.dto.js +1 -0
  281. package/dist/modules/auth/dto/register.dto.js.map +1 -1
  282. package/dist/modules/auth/dto/session.dto.d.ts +20 -0
  283. package/dist/modules/auth/dto/session.dto.d.ts.map +1 -0
  284. package/dist/modules/auth/dto/session.dto.js +98 -0
  285. package/dist/modules/auth/dto/session.dto.js.map +1 -0
  286. package/dist/modules/auth/dto/token.dto.d.ts +38 -1
  287. package/dist/modules/auth/dto/token.dto.d.ts.map +1 -1
  288. package/dist/modules/auth/dto/token.dto.js +21 -1
  289. package/dist/modules/auth/dto/token.dto.js.map +1 -1
  290. package/dist/modules/auth/entities/index.d.ts +2 -0
  291. package/dist/modules/auth/entities/index.d.ts.map +1 -1
  292. package/dist/modules/auth/entities/index.js +2 -0
  293. package/dist/modules/auth/entities/index.js.map +1 -1
  294. package/dist/modules/auth/entities/password-reset-token.entity.d.ts +2 -0
  295. package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -1
  296. package/dist/modules/auth/entities/password-reset-token.entity.js +6 -0
  297. package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -1
  298. package/dist/modules/auth/entities/user-mfa.entity.d.ts +19 -0
  299. package/dist/modules/auth/entities/user-mfa.entity.d.ts.map +1 -0
  300. package/dist/modules/auth/entities/user-mfa.entity.js +73 -0
  301. package/dist/modules/auth/entities/user-mfa.entity.js.map +1 -0
  302. package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts +24 -0
  303. package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts.map +1 -0
  304. package/dist/modules/auth/entities/user-oauth-identity.entity.js +84 -0
  305. package/dist/modules/auth/entities/user-oauth-identity.entity.js.map +1 -0
  306. package/dist/modules/auth/events/auth.events.d.ts +84 -19
  307. package/dist/modules/auth/events/auth.events.d.ts.map +1 -1
  308. package/dist/modules/auth/events/auth.events.js +17 -9
  309. package/dist/modules/auth/events/auth.events.js.map +1 -1
  310. package/dist/modules/auth/services/account.service.d.ts +74 -14
  311. package/dist/modules/auth/services/account.service.d.ts.map +1 -1
  312. package/dist/modules/auth/services/account.service.js +247 -31
  313. package/dist/modules/auth/services/account.service.js.map +1 -1
  314. package/dist/modules/auth/services/dpop.service.d.ts +41 -0
  315. package/dist/modules/auth/services/dpop.service.d.ts.map +1 -0
  316. package/dist/modules/auth/services/dpop.service.js +159 -0
  317. package/dist/modules/auth/services/dpop.service.js.map +1 -0
  318. package/dist/modules/auth/services/index.d.ts +2 -0
  319. package/dist/modules/auth/services/index.d.ts.map +1 -1
  320. package/dist/modules/auth/services/index.js +2 -0
  321. package/dist/modules/auth/services/index.js.map +1 -1
  322. package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts +28 -0
  323. package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts.map +1 -0
  324. package/dist/modules/auth/services/legacy-hash-cleanup.service.js +163 -0
  325. package/dist/modules/auth/services/legacy-hash-cleanup.service.js.map +1 -0
  326. package/dist/modules/auth/services/login.service.d.ts +29 -34
  327. package/dist/modules/auth/services/login.service.d.ts.map +1 -1
  328. package/dist/modules/auth/services/login.service.js +173 -61
  329. package/dist/modules/auth/services/login.service.js.map +1 -1
  330. package/dist/modules/auth/services/mfa.service.d.ts +111 -0
  331. package/dist/modules/auth/services/mfa.service.d.ts.map +1 -0
  332. package/dist/modules/auth/services/mfa.service.js +662 -0
  333. package/dist/modules/auth/services/mfa.service.js.map +1 -0
  334. package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts +11 -0
  335. package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts.map +1 -0
  336. package/dist/modules/auth/services/oauth/apple-id-token.verifier.js +56 -0
  337. package/dist/modules/auth/services/oauth/apple-id-token.verifier.js.map +1 -0
  338. package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts +12 -0
  339. package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts.map +1 -0
  340. package/dist/modules/auth/services/oauth/google-id-token.verifier.js +64 -0
  341. package/dist/modules/auth/services/oauth/google-id-token.verifier.js.map +1 -0
  342. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts +11 -0
  343. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts.map +1 -0
  344. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js +76 -0
  345. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js.map +1 -0
  346. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts +16 -0
  347. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts.map +1 -0
  348. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js +92 -0
  349. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js.map +1 -0
  350. package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts +9 -0
  351. package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts.map +1 -0
  352. package/dist/modules/auth/services/oauth/verified-oauth-identity.js +3 -0
  353. package/dist/modules/auth/services/oauth/verified-oauth-identity.js.map +1 -0
  354. package/dist/modules/auth/services/oauth.service.d.ts +83 -0
  355. package/dist/modules/auth/services/oauth.service.d.ts.map +1 -0
  356. package/dist/modules/auth/services/oauth.service.js +471 -0
  357. package/dist/modules/auth/services/oauth.service.js.map +1 -0
  358. package/dist/modules/auth/services/otp-auth.service.d.ts +13 -3
  359. package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -1
  360. package/dist/modules/auth/services/otp-auth.service.js +41 -7
  361. package/dist/modules/auth/services/otp-auth.service.js.map +1 -1
  362. package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts +22 -0
  363. package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts.map +1 -0
  364. package/dist/modules/auth/services/password-reset-audit-retention.service.js +117 -0
  365. package/dist/modules/auth/services/password-reset-audit-retention.service.js.map +1 -0
  366. package/dist/modules/auth/services/password.service.d.ts +25 -5
  367. package/dist/modules/auth/services/password.service.d.ts.map +1 -1
  368. package/dist/modules/auth/services/password.service.js +154 -20
  369. package/dist/modules/auth/services/password.service.js.map +1 -1
  370. package/dist/modules/auth/services/pin-auth.service.d.ts +10 -3
  371. package/dist/modules/auth/services/pin-auth.service.d.ts.map +1 -1
  372. package/dist/modules/auth/services/pin-auth.service.js +110 -13
  373. package/dist/modules/auth/services/pin-auth.service.js.map +1 -1
  374. package/dist/modules/auth/services/registration.service.d.ts +10 -2
  375. package/dist/modules/auth/services/registration.service.d.ts.map +1 -1
  376. package/dist/modules/auth/services/registration.service.js +113 -25
  377. package/dist/modules/auth/services/registration.service.js.map +1 -1
  378. package/dist/modules/auth/services/turnstile.service.d.ts +17 -0
  379. package/dist/modules/auth/services/turnstile.service.d.ts.map +1 -0
  380. package/dist/modules/auth/services/turnstile.service.js +94 -0
  381. package/dist/modules/auth/services/turnstile.service.js.map +1 -0
  382. package/dist/modules/auth/utils/auth-params.util.d.ts +13 -6
  383. package/dist/modules/auth/utils/auth-params.util.d.ts.map +1 -1
  384. package/dist/modules/auth/utils/auth-params.util.js +27 -4
  385. package/dist/modules/auth/utils/auth-params.util.js.map +1 -1
  386. package/dist/modules/auth/utils/auth-supported.util.d.ts +12 -1
  387. package/dist/modules/auth/utils/auth-supported.util.d.ts.map +1 -1
  388. package/dist/modules/auth/utils/auth-supported.util.js +36 -4
  389. package/dist/modules/auth/utils/auth-supported.util.js.map +1 -1
  390. package/dist/modules/auth/utils/backup-code-hash.util.d.ts +10 -0
  391. package/dist/modules/auth/utils/backup-code-hash.util.d.ts.map +1 -0
  392. package/dist/modules/auth/utils/backup-code-hash.util.js +31 -0
  393. package/dist/modules/auth/utils/backup-code-hash.util.js.map +1 -0
  394. package/dist/modules/auth/utils/backup-codes.util.d.ts +5 -0
  395. package/dist/modules/auth/utils/backup-codes.util.d.ts.map +1 -0
  396. package/dist/modules/auth/utils/backup-codes.util.js +22 -0
  397. package/dist/modules/auth/utils/backup-codes.util.js.map +1 -0
  398. package/dist/modules/auth/utils/dpop.util.d.ts +22 -0
  399. package/dist/modules/auth/utils/dpop.util.d.ts.map +1 -0
  400. package/dist/modules/auth/utils/dpop.util.js +73 -0
  401. package/dist/modules/auth/utils/dpop.util.js.map +1 -0
  402. package/dist/modules/auth/utils/mfa-secret.util.d.ts +22 -0
  403. package/dist/modules/auth/utils/mfa-secret.util.d.ts.map +1 -0
  404. package/dist/modules/auth/utils/mfa-secret.util.js +59 -0
  405. package/dist/modules/auth/utils/mfa-secret.util.js.map +1 -0
  406. package/dist/modules/auth/utils/mfa-verify-params.util.d.ts +26 -0
  407. package/dist/modules/auth/utils/mfa-verify-params.util.d.ts.map +1 -0
  408. package/dist/modules/auth/utils/mfa-verify-params.util.js +49 -0
  409. package/dist/modules/auth/utils/mfa-verify-params.util.js.map +1 -0
  410. package/dist/modules/auth/utils/step-up-purpose.util.d.ts +5 -0
  411. package/dist/modules/auth/utils/step-up-purpose.util.d.ts.map +1 -0
  412. package/dist/modules/auth/utils/step-up-purpose.util.js +18 -0
  413. package/dist/modules/auth/utils/step-up-purpose.util.js.map +1 -0
  414. package/dist/modules/auth/utils/totp.util.d.ts +16 -0
  415. package/dist/modules/auth/utils/totp.util.d.ts.map +1 -0
  416. package/dist/modules/auth/utils/totp.util.js +88 -0
  417. package/dist/modules/auth/utils/totp.util.js.map +1 -0
  418. package/dist/modules/delivery/composers/otp-delivery.composer.d.ts +28 -1
  419. package/dist/modules/delivery/composers/otp-delivery.composer.d.ts.map +1 -1
  420. package/dist/modules/delivery/composers/otp-delivery.composer.js +48 -2
  421. package/dist/modules/delivery/composers/otp-delivery.composer.js.map +1 -1
  422. package/dist/modules/delivery/constants/delivery-worker.constants.d.ts +29 -0
  423. package/dist/modules/delivery/constants/delivery-worker.constants.d.ts.map +1 -0
  424. package/dist/modules/delivery/constants/delivery-worker.constants.js +51 -0
  425. package/dist/modules/delivery/constants/delivery-worker.constants.js.map +1 -0
  426. package/dist/modules/delivery/delivery.module.d.ts.map +1 -1
  427. package/dist/modules/delivery/delivery.module.js +1 -15
  428. package/dist/modules/delivery/delivery.module.js.map +1 -1
  429. package/dist/modules/delivery/entities/notification-delivery-log.entity.d.ts.map +1 -1
  430. package/dist/modules/delivery/entities/notification-delivery-log.entity.js +3 -1
  431. package/dist/modules/delivery/entities/notification-delivery-log.entity.js.map +1 -1
  432. package/dist/modules/delivery/notification-delivery.service.d.ts +12 -1
  433. package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -1
  434. package/dist/modules/delivery/notification-delivery.service.js +121 -40
  435. package/dist/modules/delivery/notification-delivery.service.js.map +1 -1
  436. package/dist/modules/delivery/processors/delivery-job.runner.d.ts +22 -1
  437. package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -1
  438. package/dist/modules/delivery/processors/delivery-job.runner.js +144 -42
  439. package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -1
  440. package/dist/modules/delivery/processors/delivery.processor.d.ts.map +1 -1
  441. package/dist/modules/delivery/processors/delivery.processor.js +6 -1
  442. package/dist/modules/delivery/processors/delivery.processor.js.map +1 -1
  443. package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts +11 -0
  444. package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts.map +1 -1
  445. package/dist/modules/delivery/processors/otp-delivery-job.runner.js +90 -16
  446. package/dist/modules/delivery/processors/otp-delivery-job.runner.js.map +1 -1
  447. package/dist/modules/delivery/processors/otp-delivery.processor.d.ts.map +1 -1
  448. package/dist/modules/delivery/processors/otp-delivery.processor.js +6 -1
  449. package/dist/modules/delivery/processors/otp-delivery.processor.js.map +1 -1
  450. package/dist/modules/delivery/queues/sync-jobs.queue.d.ts +7 -1
  451. package/dist/modules/delivery/queues/sync-jobs.queue.d.ts.map +1 -1
  452. package/dist/modules/delivery/queues/sync-jobs.queue.js +11 -2
  453. package/dist/modules/delivery/queues/sync-jobs.queue.js.map +1 -1
  454. package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts +7 -3
  455. package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts.map +1 -1
  456. package/dist/modules/delivery/services/delivery-audit-retention.service.js +33 -10
  457. package/dist/modules/delivery/services/delivery-audit-retention.service.js.map +1 -1
  458. package/dist/modules/delivery/services/notification-audit.service.d.ts +7 -4
  459. package/dist/modules/delivery/services/notification-audit.service.d.ts.map +1 -1
  460. package/dist/modules/delivery/services/notification-audit.service.js +83 -26
  461. package/dist/modules/delivery/services/notification-audit.service.js.map +1 -1
  462. package/dist/modules/delivery/utils/payload-snapshot.util.d.ts +2 -0
  463. package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -1
  464. package/dist/modules/delivery/utils/payload-snapshot.util.js +22 -3
  465. package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -1
  466. package/dist/modules/file-upload/controllers/file-upload.controller.d.ts +7 -1
  467. package/dist/modules/file-upload/controllers/file-upload.controller.d.ts.map +1 -1
  468. package/dist/modules/file-upload/controllers/file-upload.controller.js +5 -7
  469. package/dist/modules/file-upload/controllers/file-upload.controller.js.map +1 -1
  470. package/dist/modules/file-upload/dto/file-upload.dto.d.ts +2 -0
  471. package/dist/modules/file-upload/dto/file-upload.dto.d.ts.map +1 -1
  472. package/dist/modules/file-upload/dto/file-upload.dto.js +20 -0
  473. package/dist/modules/file-upload/dto/file-upload.dto.js.map +1 -1
  474. package/dist/modules/file-upload/file-upload.module.d.ts.map +1 -1
  475. package/dist/modules/file-upload/file-upload.module.js +12 -2
  476. package/dist/modules/file-upload/file-upload.module.js.map +1 -1
  477. package/dist/modules/file-upload/services/file-upload.service.d.ts +24 -6
  478. package/dist/modules/file-upload/services/file-upload.service.d.ts.map +1 -1
  479. package/dist/modules/file-upload/services/file-upload.service.js +164 -36
  480. package/dist/modules/file-upload/services/file-upload.service.js.map +1 -1
  481. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts +4 -2
  482. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts.map +1 -1
  483. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js +30 -5
  484. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js.map +1 -1
  485. package/dist/modules/file-upload/utils/image-optimize.util.d.ts.map +1 -1
  486. package/dist/modules/file-upload/utils/image-optimize.util.js +7 -1
  487. package/dist/modules/file-upload/utils/image-optimize.util.js.map +1 -1
  488. package/dist/modules/health/health.controller.d.ts +5 -1
  489. package/dist/modules/health/health.controller.d.ts.map +1 -1
  490. package/dist/modules/health/health.controller.js +57 -3
  491. package/dist/modules/health/health.controller.js.map +1 -1
  492. package/dist/modules/invitations/controllers/invitations.controller.d.ts +19 -4
  493. package/dist/modules/invitations/controllers/invitations.controller.d.ts.map +1 -1
  494. package/dist/modules/invitations/controllers/invitations.controller.js +19 -10
  495. package/dist/modules/invitations/controllers/invitations.controller.js.map +1 -1
  496. package/dist/modules/invitations/dto/invitation.dto.d.ts +13 -0
  497. package/dist/modules/invitations/dto/invitation.dto.d.ts.map +1 -1
  498. package/dist/modules/invitations/dto/invitation.dto.js +69 -2
  499. package/dist/modules/invitations/dto/invitation.dto.js.map +1 -1
  500. package/dist/modules/invitations/services/invitations.service.d.ts +24 -6
  501. package/dist/modules/invitations/services/invitations.service.d.ts.map +1 -1
  502. package/dist/modules/invitations/services/invitations.service.js +96 -20
  503. package/dist/modules/invitations/services/invitations.service.js.map +1 -1
  504. package/dist/modules/jobs/queues/jobs.queue.d.ts +7 -2
  505. package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -1
  506. package/dist/modules/jobs/queues/jobs.queue.js +25 -10
  507. package/dist/modules/jobs/queues/jobs.queue.js.map +1 -1
  508. package/dist/modules/notifications/controllers/notifications.controller.d.ts +3 -1
  509. package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -1
  510. package/dist/modules/notifications/controllers/notifications.controller.js +25 -2
  511. package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -1
  512. package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -1
  513. package/dist/modules/notifications/dto/notification-query.dto.js +1 -0
  514. package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -1
  515. package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -1
  516. package/dist/modules/notifications/entities/device-token.entity.js +3 -1
  517. package/dist/modules/notifications/entities/device-token.entity.js.map +1 -1
  518. package/dist/modules/notifications/services/fcm.service.d.ts +2 -0
  519. package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -1
  520. package/dist/modules/notifications/services/fcm.service.js +28 -7
  521. package/dist/modules/notifications/services/fcm.service.js.map +1 -1
  522. package/dist/modules/notifications/services/notifications.service.d.ts +16 -3
  523. package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -1
  524. package/dist/modules/notifications/services/notifications.service.js +95 -24
  525. package/dist/modules/notifications/services/notifications.service.js.map +1 -1
  526. package/dist/modules/observability/metrics/metrics.service.d.ts +2 -0
  527. package/dist/modules/observability/metrics/metrics.service.d.ts.map +1 -1
  528. package/dist/modules/observability/metrics/metrics.service.js +11 -0
  529. package/dist/modules/observability/metrics/metrics.service.js.map +1 -1
  530. package/dist/modules/otp/constants/otp.constants.d.ts +7 -5
  531. package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -1
  532. package/dist/modules/otp/constants/otp.constants.js +11 -8
  533. package/dist/modules/otp/constants/otp.constants.js.map +1 -1
  534. package/dist/modules/otp/interfaces/otp.service.interface.d.ts +1 -1
  535. package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -1
  536. package/dist/modules/otp/otp.service.d.ts +10 -2
  537. package/dist/modules/otp/otp.service.d.ts.map +1 -1
  538. package/dist/modules/otp/otp.service.js +48 -4
  539. package/dist/modules/otp/otp.service.js.map +1 -1
  540. package/dist/modules/otp/services/otp.rate-limiter.d.ts +2 -0
  541. package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -1
  542. package/dist/modules/otp/services/otp.rate-limiter.js +19 -0
  543. package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -1
  544. package/dist/modules/otp/services/otp.session.store.d.ts +9 -3
  545. package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -1
  546. package/dist/modules/otp/services/otp.session.store.js +34 -42
  547. package/dist/modules/otp/services/otp.session.store.js.map +1 -1
  548. package/dist/modules/otp/utils/otp-code-hash.util.d.ts +11 -0
  549. package/dist/modules/otp/utils/otp-code-hash.util.d.ts.map +1 -0
  550. package/dist/modules/otp/utils/otp-code-hash.util.js +68 -0
  551. package/dist/modules/otp/utils/otp-code-hash.util.js.map +1 -0
  552. package/dist/modules/profile/controllers/profile.controller.d.ts +9 -3
  553. package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -1
  554. package/dist/modules/profile/controllers/profile.controller.js +140 -8
  555. package/dist/modules/profile/controllers/profile.controller.js.map +1 -1
  556. package/dist/modules/profile/dto/create-user-profile.dto.d.ts +10 -0
  557. package/dist/modules/profile/dto/create-user-profile.dto.d.ts.map +1 -1
  558. package/dist/modules/profile/dto/create-user-profile.dto.js +43 -1
  559. package/dist/modules/profile/dto/create-user-profile.dto.js.map +1 -1
  560. package/dist/modules/profile/dto/public-user-profile.dto.d.ts +24 -0
  561. package/dist/modules/profile/dto/public-user-profile.dto.d.ts.map +1 -0
  562. package/dist/modules/profile/dto/public-user-profile.dto.js +115 -0
  563. package/dist/modules/profile/dto/public-user-profile.dto.js.map +1 -0
  564. package/dist/modules/profile/dto/user-profile-response.dto.d.ts +4 -0
  565. package/dist/modules/profile/dto/user-profile-response.dto.d.ts.map +1 -1
  566. package/dist/modules/profile/dto/user-profile-response.dto.js +4 -0
  567. package/dist/modules/profile/dto/user-profile-response.dto.js.map +1 -1
  568. package/dist/modules/profile/dto/username-available.dto.d.ts +6 -0
  569. package/dist/modules/profile/dto/username-available.dto.d.ts.map +1 -0
  570. package/dist/modules/profile/dto/username-available.dto.js +31 -0
  571. package/dist/modules/profile/dto/username-available.dto.js.map +1 -0
  572. package/dist/modules/profile/entities/user-profiles.entity.d.ts +10 -0
  573. package/dist/modules/profile/entities/user-profiles.entity.d.ts.map +1 -1
  574. package/dist/modules/profile/entities/user-profiles.entity.js +29 -1
  575. package/dist/modules/profile/entities/user-profiles.entity.js.map +1 -1
  576. package/dist/modules/profile/index.d.ts +1 -0
  577. package/dist/modules/profile/index.d.ts.map +1 -1
  578. package/dist/modules/profile/index.js +1 -0
  579. package/dist/modules/profile/index.js.map +1 -1
  580. package/dist/modules/profile/profile.manifest.d.ts +2 -2
  581. package/dist/modules/profile/profile.manifest.js +2 -2
  582. package/dist/modules/profile/profile.manifest.js.map +1 -1
  583. package/dist/modules/profile/profile.module.d.ts.map +1 -1
  584. package/dist/modules/profile/profile.module.js +7 -2
  585. package/dist/modules/profile/profile.module.js.map +1 -1
  586. package/dist/modules/profile/services/profile.service.d.ts +56 -4
  587. package/dist/modules/profile/services/profile.service.d.ts.map +1 -1
  588. package/dist/modules/profile/services/profile.service.js +247 -20
  589. package/dist/modules/profile/services/profile.service.js.map +1 -1
  590. package/dist/modules/realtime/adapters/redis-io.adapter.d.ts +26 -0
  591. package/dist/modules/realtime/adapters/redis-io.adapter.d.ts.map +1 -0
  592. package/dist/modules/realtime/adapters/redis-io.adapter.js +124 -0
  593. package/dist/modules/realtime/adapters/redis-io.adapter.js.map +1 -0
  594. package/dist/modules/realtime/constants/realtime.constants.d.ts +36 -0
  595. package/dist/modules/realtime/constants/realtime.constants.d.ts.map +1 -0
  596. package/dist/modules/realtime/constants/realtime.constants.js +42 -0
  597. package/dist/modules/realtime/constants/realtime.constants.js.map +1 -0
  598. package/dist/modules/realtime/controllers/realtime.controller.d.ts +21 -0
  599. package/dist/modules/realtime/controllers/realtime.controller.d.ts.map +1 -0
  600. package/dist/modules/realtime/controllers/realtime.controller.js +113 -0
  601. package/dist/modules/realtime/controllers/realtime.controller.js.map +1 -0
  602. package/dist/modules/realtime/gateway/realtime.gateway.d.ts +42 -0
  603. package/dist/modules/realtime/gateway/realtime.gateway.d.ts.map +1 -0
  604. package/dist/modules/realtime/gateway/realtime.gateway.js +289 -0
  605. package/dist/modules/realtime/gateway/realtime.gateway.js.map +1 -0
  606. package/dist/modules/realtime/index.d.ts +12 -0
  607. package/dist/modules/realtime/index.d.ts.map +1 -0
  608. package/dist/modules/realtime/index.js +35 -0
  609. package/dist/modules/realtime/index.js.map +1 -0
  610. package/dist/modules/realtime/realtime.manifest.d.ts +8 -0
  611. package/dist/modules/realtime/realtime.manifest.d.ts.map +1 -0
  612. package/dist/modules/realtime/realtime.manifest.js +31 -0
  613. package/dist/modules/realtime/realtime.manifest.js.map +1 -0
  614. package/dist/modules/realtime/realtime.module.d.ts +14 -0
  615. package/dist/modules/realtime/realtime.module.d.ts.map +1 -0
  616. package/dist/modules/realtime/realtime.module.js +126 -0
  617. package/dist/modules/realtime/realtime.module.js.map +1 -0
  618. package/dist/modules/realtime/services/realtime-handler.registry.d.ts +16 -0
  619. package/dist/modules/realtime/services/realtime-handler.registry.d.ts.map +1 -0
  620. package/dist/modules/realtime/services/realtime-handler.registry.js +55 -0
  621. package/dist/modules/realtime/services/realtime-handler.registry.js.map +1 -0
  622. package/dist/modules/realtime/services/realtime-presence.service.d.ts +15 -0
  623. package/dist/modules/realtime/services/realtime-presence.service.d.ts.map +1 -0
  624. package/dist/modules/realtime/services/realtime-presence.service.js +86 -0
  625. package/dist/modules/realtime/services/realtime-presence.service.js.map +1 -0
  626. package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts +12 -0
  627. package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts.map +1 -0
  628. package/dist/modules/realtime/services/realtime-rate-limiter.service.js +63 -0
  629. package/dist/modules/realtime/services/realtime-rate-limiter.service.js.map +1 -0
  630. package/dist/modules/realtime/services/realtime.service.d.ts +88 -0
  631. package/dist/modules/realtime/services/realtime.service.d.ts.map +1 -0
  632. package/dist/modules/realtime/services/realtime.service.js +343 -0
  633. package/dist/modules/realtime/services/realtime.service.js.map +1 -0
  634. package/dist/modules/realtime/types/realtime.types.d.ts +50 -0
  635. package/dist/modules/realtime/types/realtime.types.d.ts.map +1 -0
  636. package/dist/modules/realtime/types/realtime.types.js +14 -0
  637. package/dist/modules/realtime/types/realtime.types.js.map +1 -0
  638. package/dist/modules/realtime/utils/handshake-error.util.d.ts +5 -0
  639. package/dist/modules/realtime/utils/handshake-error.util.d.ts.map +1 -0
  640. package/dist/modules/realtime/utils/handshake-error.util.js +45 -0
  641. package/dist/modules/realtime/utils/handshake-error.util.js.map +1 -0
  642. package/dist/modules/roles/controllers/modules.controller.d.ts +4 -3
  643. package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -1
  644. package/dist/modules/roles/controllers/modules.controller.js +21 -10
  645. package/dist/modules/roles/controllers/modules.controller.js.map +1 -1
  646. package/dist/modules/roles/controllers/permissions.controller.d.ts +4 -3
  647. package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -1
  648. package/dist/modules/roles/controllers/permissions.controller.js +21 -10
  649. package/dist/modules/roles/controllers/permissions.controller.js.map +1 -1
  650. package/dist/modules/roles/controllers/roles.controller.d.ts +5 -4
  651. package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -1
  652. package/dist/modules/roles/controllers/roles.controller.js +26 -13
  653. package/dist/modules/roles/controllers/roles.controller.js.map +1 -1
  654. package/dist/modules/roles/controllers/user-roles.controller.d.ts +3 -2
  655. package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -1
  656. package/dist/modules/roles/controllers/user-roles.controller.js +14 -6
  657. package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -1
  658. package/dist/modules/roles/services/modules.service.d.ts +8 -5
  659. package/dist/modules/roles/services/modules.service.d.ts.map +1 -1
  660. package/dist/modules/roles/services/modules.service.js +58 -12
  661. package/dist/modules/roles/services/modules.service.js.map +1 -1
  662. package/dist/modules/roles/services/permissions.service.d.ts +8 -5
  663. package/dist/modules/roles/services/permissions.service.d.ts.map +1 -1
  664. package/dist/modules/roles/services/permissions.service.js +61 -12
  665. package/dist/modules/roles/services/permissions.service.js.map +1 -1
  666. package/dist/modules/roles/services/roles.service.d.ts +19 -9
  667. package/dist/modules/roles/services/roles.service.d.ts.map +1 -1
  668. package/dist/modules/roles/services/roles.service.js +137 -47
  669. package/dist/modules/roles/services/roles.service.js.map +1 -1
  670. package/dist/modules/roles/services/user-roles.service.d.ts +12 -4
  671. package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -1
  672. package/dist/modules/roles/services/user-roles.service.js +58 -26
  673. package/dist/modules/roles/services/user-roles.service.js.map +1 -1
  674. package/dist/modules/sessions/entities/refresh-token.entity.d.ts +7 -1
  675. package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -1
  676. package/dist/modules/sessions/entities/refresh-token.entity.js +10 -0
  677. package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -1
  678. package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts +12 -0
  679. package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts.map +1 -0
  680. package/dist/modules/sessions/entities/revoked-refresh-family.entity.js +46 -0
  681. package/dist/modules/sessions/entities/revoked-refresh-family.entity.js.map +1 -0
  682. package/dist/modules/sessions/services/refresh-token-retention.service.d.ts +20 -0
  683. package/dist/modules/sessions/services/refresh-token-retention.service.d.ts.map +1 -0
  684. package/dist/modules/sessions/services/refresh-token-retention.service.js +97 -0
  685. package/dist/modules/sessions/services/refresh-token-retention.service.js.map +1 -0
  686. package/dist/modules/sessions/services/token.service.d.ts +150 -16
  687. package/dist/modules/sessions/services/token.service.d.ts.map +1 -1
  688. package/dist/modules/sessions/services/token.service.js +505 -74
  689. package/dist/modules/sessions/services/token.service.js.map +1 -1
  690. package/dist/modules/sessions/sessions.module.d.ts.map +1 -1
  691. package/dist/modules/sessions/sessions.module.js +4 -2
  692. package/dist/modules/sessions/sessions.module.js.map +1 -1
  693. package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts +13 -0
  694. package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts.map +1 -0
  695. package/dist/modules/sessions/utils/refresh-token-hash.util.js +37 -0
  696. package/dist/modules/sessions/utils/refresh-token-hash.util.js.map +1 -0
  697. package/dist/modules/settings/constants/settings.defaults.d.ts +57 -3
  698. package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -1
  699. package/dist/modules/settings/constants/settings.defaults.js +58 -3
  700. package/dist/modules/settings/constants/settings.defaults.js.map +1 -1
  701. package/dist/modules/settings/constants/settings.keys.d.ts +138 -2
  702. package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -1
  703. package/dist/modules/settings/constants/settings.keys.js +140 -2
  704. package/dist/modules/settings/constants/settings.keys.js.map +1 -1
  705. package/dist/modules/settings/controllers/settings.controller.d.ts +5 -1
  706. package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -1
  707. package/dist/modules/settings/controllers/settings.controller.js +134 -5
  708. package/dist/modules/settings/controllers/settings.controller.js.map +1 -1
  709. package/dist/modules/settings/services/settings.service.d.ts +17 -7
  710. package/dist/modules/settings/services/settings.service.d.ts.map +1 -1
  711. package/dist/modules/settings/services/settings.service.js +80 -14
  712. package/dist/modules/settings/services/settings.service.js.map +1 -1
  713. package/dist/modules/settings/utils/settings-secret.util.d.ts +13 -0
  714. package/dist/modules/settings/utils/settings-secret.util.d.ts.map +1 -0
  715. package/dist/modules/settings/utils/settings-secret.util.js +80 -0
  716. package/dist/modules/settings/utils/settings-secret.util.js.map +1 -0
  717. package/dist/modules/users/controllers/users.controller.d.ts +4 -2
  718. package/dist/modules/users/controllers/users.controller.d.ts.map +1 -1
  719. package/dist/modules/users/controllers/users.controller.js +89 -10
  720. package/dist/modules/users/controllers/users.controller.js.map +1 -1
  721. package/dist/modules/users/dto/user.dto.d.ts +3 -0
  722. package/dist/modules/users/dto/user.dto.d.ts.map +1 -1
  723. package/dist/modules/users/dto/user.dto.js +27 -4
  724. package/dist/modules/users/dto/user.dto.js.map +1 -1
  725. package/dist/modules/users/entities/user.entity.d.ts +7 -1
  726. package/dist/modules/users/entities/user.entity.d.ts.map +1 -1
  727. package/dist/modules/users/entities/user.entity.js +10 -0
  728. package/dist/modules/users/entities/user.entity.js.map +1 -1
  729. package/dist/modules/users/services/users.service.d.ts +15 -2
  730. package/dist/modules/users/services/users.service.d.ts.map +1 -1
  731. package/dist/modules/users/services/users.service.js +152 -37
  732. package/dist/modules/users/services/users.service.js.map +1 -1
  733. package/dist/modules/users/users.module.d.ts.map +1 -1
  734. package/dist/modules/users/users.module.js +1 -2
  735. package/dist/modules/users/users.module.js.map +1 -1
  736. package/package.json +19 -7
  737. package/dist/modules/admin/entities/admin-log.entity.d.ts +0 -20
  738. package/dist/modules/admin/entities/admin-log.entity.d.ts.map +0 -1
  739. package/dist/modules/admin/entities/admin-log.entity.js +0 -65
  740. package/dist/modules/admin/entities/admin-log.entity.js.map +0 -1
@@ -63,29 +63,32 @@ const users_service_1 = require("../../users/services/users.service");
63
63
  const auth_events_1 = require("../events/auth.events");
64
64
  const auth_params_util_1 = require("../utils/auth-params.util");
65
65
  const auth_supported_util_1 = require("../utils/auth-supported.util");
66
+ const oauth_service_1 = require("./oauth.service");
66
67
  let RegistrationService = class RegistrationService {
67
68
  usersService;
68
69
  tokenService;
69
70
  rolesService;
70
71
  userRolesService;
71
72
  settingsService;
73
+ oauthService;
72
74
  dataSource;
73
75
  notificationDelivery;
74
76
  eventEmitter;
75
77
  logger;
76
- constructor(usersService, tokenService, rolesService, userRolesService, settingsService, dataSource, notificationDelivery, eventEmitter = null, logger) {
78
+ constructor(usersService, tokenService, rolesService, userRolesService, settingsService, oauthService, dataSource, notificationDelivery, eventEmitter = null, logger) {
77
79
  this.usersService = usersService;
78
80
  this.tokenService = tokenService;
79
81
  this.rolesService = rolesService;
80
82
  this.userRolesService = userRolesService;
81
83
  this.settingsService = settingsService;
84
+ this.oauthService = oauthService;
82
85
  this.dataSource = dataSource;
83
86
  this.notificationDelivery = notificationDelivery;
84
87
  this.eventEmitter = eventEmitter;
85
88
  this.logger = logger;
86
89
  }
87
90
  // ─── Public API ───────────────────────────────────────────────────────────
88
- async register(dto, deviceInfo, ipAddress) {
91
+ async register(dto, deviceInfo, ipAddress, dpopJkt) {
89
92
  const mode = (0, auth_params_util_1.resolveAuthParamsMode)(dto);
90
93
  if (mode === 'ambiguous' || mode === 'missing') {
91
94
  throw new common_1.BadRequestException(auth_params_util_1.AUTH_PARAMS_ERROR);
@@ -93,15 +96,18 @@ let RegistrationService = class RegistrationService {
93
96
  const supported = (0, auth_supported_util_1.parseSupportedAuthMethods)(this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_SUPPORTED_REGISTRATION_METHODS));
94
97
  (0, auth_supported_util_1.assertSupportedAuthMethod)(mode, supported, 'register');
95
98
  if ((0, auth_params_util_1.isPhoneAuthParams)(dto)) {
96
- return this.registerWithPhone(dto, deviceInfo, ipAddress);
99
+ return this.registerWithPhone(dto, deviceInfo, ipAddress, dpopJkt);
97
100
  }
98
101
  if ((0, auth_params_util_1.isEmailAuthParams)(dto)) {
99
- return this.registerWithEmail(dto, deviceInfo, ipAddress);
102
+ return this.registerWithEmail(dto, deviceInfo, ipAddress, dpopJkt);
103
+ }
104
+ if ((0, auth_params_util_1.isOAuthAuthParams)(dto)) {
105
+ return this.registerWithOAuth(dto, deviceInfo, ipAddress, dpopJkt);
100
106
  }
101
107
  throw new common_1.BadRequestException(auth_params_util_1.AUTH_PARAMS_ERROR);
102
108
  }
103
109
  // ─── Phone Registration ───────────────────────────────────────────────────
104
- async registerWithPhone(dto, deviceInfo, ipAddress) {
110
+ async registerWithPhone(dto, deviceInfo, ipAddress, dpopJkt) {
105
111
  const { verificationToken, email, profile } = dto;
106
112
  // verificationToken proves phone ownership — consumed here (single-use)
107
113
  const phoneNumber = await this.tokenService.verifyPhoneVerifiedToken(verificationToken);
@@ -119,9 +125,6 @@ let RegistrationService = class RegistrationService {
119
125
  isPhoneVerified: true,
120
126
  },
121
127
  });
122
- if (email) {
123
- await this.sendWelcomeEmail(createdUser.id, email, profile?.firstName);
124
- }
125
128
  this.logRegistration({
126
129
  userId: createdUser.id,
127
130
  method: user_entity_1.UserAuthMethod.PHONE,
@@ -134,7 +137,11 @@ let RegistrationService = class RegistrationService {
134
137
  roles: createdUser.roles?.map((role) => role.slug) ?? [],
135
138
  ipAddress,
136
139
  deviceInfo,
140
+ dpopJkt,
137
141
  });
142
+ if (email) {
143
+ void this.sendWelcomeEmail(createdUser.id, email, profile?.firstName);
144
+ }
138
145
  await this.emitRegistrationCompleted({
139
146
  user: createdUser,
140
147
  method: user_entity_1.UserAuthMethod.PHONE,
@@ -144,7 +151,7 @@ let RegistrationService = class RegistrationService {
144
151
  return tokens;
145
152
  }
146
153
  // ─── Email Registration ───────────────────────────────────────────────────
147
- async registerWithEmail(dto, deviceInfo, ipAddress) {
154
+ async registerWithEmail(dto, deviceInfo, ipAddress, dpopJkt) {
148
155
  const { email, password, phoneNumber, profile } = dto;
149
156
  await this.assertEmailUnique(email);
150
157
  if (phoneNumber) {
@@ -161,7 +168,6 @@ let RegistrationService = class RegistrationService {
161
168
  isPhoneVerified: false,
162
169
  },
163
170
  });
164
- await this.sendWelcomeEmail(createdUser.id, email, profile?.firstName);
165
171
  this.logRegistration({
166
172
  userId: createdUser.id,
167
173
  method: user_entity_1.UserAuthMethod.EMAIL,
@@ -174,7 +180,9 @@ let RegistrationService = class RegistrationService {
174
180
  roles: createdUser.roles?.map((role) => role.slug) ?? [],
175
181
  ipAddress,
176
182
  deviceInfo,
183
+ dpopJkt,
177
184
  });
185
+ void this.sendWelcomeEmail(createdUser.id, email, profile?.firstName);
178
186
  await this.emitRegistrationCompleted({
179
187
  user: createdUser,
180
188
  method: user_entity_1.UserAuthMethod.EMAIL,
@@ -183,6 +191,64 @@ let RegistrationService = class RegistrationService {
183
191
  });
184
192
  return tokens;
185
193
  }
194
+ // ─── OAuth Registration ───────────────────────────────────────────────────
195
+ async registerWithOAuth(dto, deviceInfo, ipAddress, dpopJkt) {
196
+ const provider = dto.provider;
197
+ const identity = await this.oauthService.verifyIdToken(provider, dto.idToken, {
198
+ nonce: dto.nonce,
199
+ });
200
+ if (!identity.email) {
201
+ throw new common_1.BadRequestException('OAuth account has no email. Use an account with a verified email.');
202
+ }
203
+ if (!identity.emailVerified) {
204
+ throw new common_1.BadRequestException('OAuth email is not verified. Use a verified account.');
205
+ }
206
+ const existingIdentity = await this.oauthService.findByProviderSubject(provider, identity.subject);
207
+ if (existingIdentity) {
208
+ throw new common_1.ConflictException('This OAuth account is already registered. Use POST /auth/login instead.');
209
+ }
210
+ await this.assertEmailUnique(identity.email);
211
+ const profile = {
212
+ ...dto.profile,
213
+ firstName: dto.profile?.firstName || identity.givenName || 'User',
214
+ lastName: dto.profile?.lastName || identity.familyName || '',
215
+ };
216
+ const createdUser = await this.dataSource.transaction(async (manager) => {
217
+ const user = await this.createUser({
218
+ email: identity.email,
219
+ profile,
220
+ authMethod: user_entity_1.UserAuthMethod.OAUTH,
221
+ identity: {
222
+ isEmailVerified: true,
223
+ isPhoneVerified: false,
224
+ },
225
+ }, manager);
226
+ await this.oauthService.createIdentity(user.id, provider, identity, manager);
227
+ return user;
228
+ });
229
+ this.logRegistration({
230
+ userId: createdUser.id,
231
+ method: user_entity_1.UserAuthMethod.OAUTH,
232
+ event: 'REGISTER_SUCCESS',
233
+ ipAddress,
234
+ deviceInfo,
235
+ });
236
+ const tokens = await this.tokenService.generateTokens({
237
+ user: user_dto_1.UserResponseDto.fromUser(createdUser),
238
+ roles: createdUser.roles?.map((role) => role.slug) ?? [],
239
+ ipAddress,
240
+ deviceInfo,
241
+ dpopJkt,
242
+ });
243
+ void this.sendWelcomeEmail(createdUser.id, identity.email, profile?.firstName);
244
+ await this.emitRegistrationCompleted({
245
+ user: createdUser,
246
+ method: user_entity_1.UserAuthMethod.OAUTH,
247
+ ipAddress,
248
+ deviceInfo,
249
+ });
250
+ return tokens;
251
+ }
186
252
  // ─── Lifecycle hooks ────────────────────────────────────────────────────────
187
253
  /**
188
254
  * Emits {@link AUTH_EVENTS.REGISTRATION_COMPLETED} for consuming apps to react
@@ -202,23 +268,27 @@ let RegistrationService = class RegistrationService {
202
268
  deviceInfo: args.deviceInfo,
203
269
  at: new Date(),
204
270
  };
205
- try {
206
- await this.eventEmitter.emitAsync(auth_events_1.AUTH_EVENTS.REGISTRATION_COMPLETED, payload);
207
- }
208
- catch (err) {
271
+ void this.eventEmitter
272
+ .emitAsync(auth_events_1.AUTH_EVENTS.REGISTRATION_COMPLETED, payload)
273
+ .catch((err) => {
209
274
  this.logger.error('Auth registration event listener failed', {
210
275
  event: 'auth.registration.event_failed',
211
276
  metadata: { listener: auth_events_1.AUTH_EVENTS.REGISTRATION_COMPLETED },
212
277
  err: err instanceof Error ? err : undefined,
213
278
  });
214
- }
279
+ });
215
280
  }
216
281
  // ─── Guards ───────────────────────────────────────────────────────────────
282
+ /**
283
+ * Fail-fast uniqueness check with a clear message before expensive password hashing.
284
+ * {@link UsersService.create} also validates uniqueness as a safety net.
285
+ */
217
286
  async assertEmailUnique(email) {
218
287
  const existing = await this.usersService.findBy({ email });
219
288
  if (existing)
220
289
  throw new common_1.ConflictException('An account with this email already exists.');
221
290
  }
291
+ /** @see assertEmailUnique */
222
292
  async assertPhoneUnique(phoneNumber) {
223
293
  const existing = await this.usersService.findBy({ phoneNumber });
224
294
  if (existing)
@@ -253,7 +323,7 @@ let RegistrationService = class RegistrationService {
253
323
  });
254
324
  }
255
325
  }
256
- async createUser(params) {
326
+ async createUser(params, manager) {
257
327
  const { email, password, phoneNumber, profile, identity, authMethod } = params;
258
328
  let passwordHash;
259
329
  if (password)
@@ -273,17 +343,31 @@ let RegistrationService = class RegistrationService {
273
343
  isPhoneVerified: identity.isPhoneVerified,
274
344
  profile,
275
345
  };
276
- return this.dataSource.transaction(async (manager) => {
277
- const user = await this.usersService.create(createUserDto, manager);
278
- await this.assignDefaultRole(user.id, manager);
279
- await this.usersService.updateLastLogin(user.id, manager);
280
- return this.usersService.findByIdOrFail(user.id, manager);
281
- });
346
+ const persist = async (mgr) => {
347
+ // Uniqueness already checked in register* — skip duplicate SELECT; set lastLoginAt on insert.
348
+ const user = await this.usersService.create(createUserDto, mgr, {
349
+ skipUniquenessCheck: true,
350
+ markLoggedIn: true,
351
+ });
352
+ await this.assignDefaultRole(user.id, mgr);
353
+ return this.usersService.findByIdOrFail(user.id, mgr);
354
+ };
355
+ if (manager)
356
+ return persist(manager);
357
+ return this.dataSource.transaction(persist);
282
358
  }
283
359
  async assignDefaultRole(userId, manager) {
284
360
  const slug = this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_DEFAULT_ROLE_SLUG).trim();
285
361
  if (!slug)
286
362
  return;
363
+ // Never auto-assign privileged roles on self-registration (settings misconfig / compromise).
364
+ if (slug === 'admin' || slug === 'superadmin' || slug === 'super_admin') {
365
+ this.logger.error('Refusing privileged default role on registration', {
366
+ event: 'auth.role.default_privileged_blocked',
367
+ metadata: { userId, roleSlug: slug },
368
+ });
369
+ return;
370
+ }
287
371
  const role = await this.rolesService.findBySlug(slug, manager);
288
372
  if (!role) {
289
373
  this.logger.warn('Default role slug not found — skipping assignment', {
@@ -292,7 +376,10 @@ let RegistrationService = class RegistrationService {
292
376
  });
293
377
  return;
294
378
  }
295
- await this.userRolesService.assignRoles(userId, { roleIds: [role.id] }, manager);
379
+ await this.userRolesService.assignRoles(userId, { roleIds: [role.id] }, manager, {
380
+ actorType: 'SYSTEM',
381
+ actorId: userId,
382
+ });
296
383
  this.logger.info('Default role assigned', {
297
384
  event: 'auth.role.default_assigned',
298
385
  metadata: { userId, roleSlug: slug },
@@ -317,14 +404,15 @@ let RegistrationService = class RegistrationService {
317
404
  exports.RegistrationService = RegistrationService;
318
405
  exports.RegistrationService = RegistrationService = __decorate([
319
406
  (0, common_1.Injectable)(),
320
- __param(5, (0, typeorm_1.InjectDataSource)()),
321
- __param(6, (0, common_1.Optional)()),
407
+ __param(6, (0, typeorm_1.InjectDataSource)()),
322
408
  __param(7, (0, common_1.Optional)()),
409
+ __param(8, (0, common_1.Optional)()),
323
410
  __metadata("design:paramtypes", [users_service_1.UsersService,
324
411
  token_service_1.TokenService,
325
412
  roles_service_1.RolesService,
326
413
  user_roles_service_1.UserRolesService,
327
414
  settings_service_1.SettingsService,
415
+ oauth_service_1.OAuthService,
328
416
  typeorm_2.DataSource, Object, Object, structured_logger_service_1.StructuredLoggerService])
329
417
  ], RegistrationService);
330
418
  //# sourceMappingURL=registration.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"registration.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/registration.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8F;AAE9F,6CAAmD;AACnD,+CAAiC;AACjC,yDAA8D;AAC9D,qCAAoD;AAGpD,qGAAgG;AAEhG,sEAAkE;AAClE,gFAA2E;AAC3E,yEAAqE;AACrE,0EAAsE;AACtE,+EAA2E;AAC3E,uDAA0E;AAC1E,kEAAwE;AACxE,sEAAkE;AAGlE,uDAAgG;AAEhG,gEAKmC;AACnC,sEAAoG;AAY7F,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAEb;IACA;IACA;IACA;IACA;IAEA;IAEA;IAEA;IACA;IAZlB,YACkB,YAA0B,EAC1B,YAA0B,EAC1B,YAA0B,EAC1B,gBAAkC,EAClC,eAAgC,EAEhC,UAAsB,EAEtB,oBAAwD,EAExD,eAAqC,IAAI,EACzC,MAA+B;QAX/B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,oBAAe,GAAf,eAAe,CAAiB;QAEhC,eAAU,GAAV,UAAU,CAAY;QAEtB,yBAAoB,GAApB,oBAAoB,CAAoC;QAExD,iBAAY,GAAZ,YAAY,CAA6B;QACzC,WAAM,GAAN,MAAM,CAAyB;IAC9C,CAAC;IAEJ,6EAA6E;IAE7E,KAAK,CAAC,QAAQ,CACb,GAAgB,EAChB,UAAmB,EACnB,SAAkB;QAElB,MAAM,IAAI,GAAG,IAAA,wCAAqB,EAAC,GAAG,CAAC,CAAC;QACxC,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YAChD,MAAM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AAC,uBAAuB,EAAE;YACzC,KAAK,EAAE,4BAA4B;YACnC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;SACpC,CAAC,CAAC;IACJ,CAAC;IAED,6EAA6E;IAErE,eAAe,CAAC,IAMvB;QACA,MAAM,eAAe,GACpB,IAAI,CAAC,KAAK,KAAK,kBAAkB;YAChC,CAAC,CAAC,2BAA2B;YAC7B,CAAC,CAAC,mCAAmC,CAAC;QAExC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,EAAE;YAC1C,KAAK,EAAE,eAAe;YACtB,QAAQ,EAAE;gBACT,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,UAAU,EAAE,IAAI,CAAC,UAAU;aAC3B;SACD,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AA1TY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAQV,WAAA,IAAA,0BAAgB,GAAE,CAAA;IAElB,WAAA,IAAA,iBAAQ,GAAE,CAAA;IAEV,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCAToB,4BAAY;QACZ,4BAAY;QACZ,4BAAY;QACR,qCAAgB;QACjB,kCAAe;QAEpB,oBAAU,kBAKd,mDAAuB;GAbrC,mBAAmB,CA0T/B"}
1
+ {"version":3,"file":"registration.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/registration.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8F;AAE9F,6CAAmD;AACnD,+CAAiC;AACjC,yDAA8D;AAC9D,qCAAoD;AAGpD,qGAAgG;AAEhG,sEAAkE;AAClE,gFAA2E;AAC3E,yEAAqE;AACrE,0EAAsE;AACtE,+EAA2E;AAC3E,uDAA0E;AAC1E,kEAAwE;AACxE,sEAA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,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE;YAChF,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,MAAM;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE;YACzC,KAAK,EAAE,4BAA4B;YACnC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;SACpC,CAAC,CAAC;IACJ,CAAC;IAED,6EAA6E;IAErE,eAAe,CAAC,IAMvB;QACA,MAAM,eAAe,GACpB,IAAI,CAAC,KAAK,KAAK,kBAAkB;YAChC,CAAC,CAAC,2BAA2B;YAC7B,CAAC,CAAC,mCAAmC,CAAC;QAExC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,EAAE;YAC1C,KAAK,EAAE,eAAe;YACtB,QAAQ,EAAE;gBACT,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,UAAU,EAAE,IAAI,CAAC,UAAU;aAC3B;SACD,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AA/aY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IASV,WAAA,IAAA,0BAAgB,GAAE,CAAA;IAElB,WAAA,IAAA,iBAAQ,GAAE,CAAA;IAEV,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCAVoB,4BAAY;QACZ,4BAAY;QACZ,4BAAY;QACR,qCAAgB;QACjB,kCAAe;QAClB,4BAAY;QAEd,oBAAU,kBAKd,mDAAuB;GAdrC,mBAAmB,CA+a/B"}
@@ -0,0 +1,17 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { StructuredLoggerService } from '../../observability/logging/structured-logger.service';
3
+ import { SettingsService } from '../../settings/services/settings.service';
4
+ export declare class TurnstileService {
5
+ private readonly settingsService;
6
+ private readonly configService;
7
+ private readonly logger;
8
+ constructor(settingsService: SettingsService, configService: ConfigService, logger: StructuredLoggerService);
9
+ isEnabled(): boolean;
10
+ siteKey(): string;
11
+ /**
12
+ * When Turnstile is enabled, require a valid token (siteverify).
13
+ * No-op when disabled (local/dev without Cloudflare).
14
+ */
15
+ assertValid(token: string | undefined, remoteIp?: string): Promise<void>;
16
+ }
17
+ //# sourceMappingURL=turnstile.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turnstile.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/services/turnstile.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAI3E,qBACa,gBAAgB;IAE3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFN,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,uBAAuB;IAGjD,SAAS,IAAI,OAAO;IAUpB,OAAO,IAAI,MAAM;IAQjB;;;OAGG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA+C9E"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.TurnstileService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const config_1 = require("@nestjs/config");
15
+ const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
16
+ const settings_keys_1 = require("../../settings/constants/settings.keys");
17
+ const settings_service_1 = require("../../settings/services/settings.service");
18
+ const SITEVERIFY_URL = 'https://challenges.cloudflare.com/turnstile/v0/siteverify';
19
+ let TurnstileService = class TurnstileService {
20
+ settingsService;
21
+ configService;
22
+ logger;
23
+ constructor(settingsService, configService, logger) {
24
+ this.settingsService = settingsService;
25
+ this.configService = configService;
26
+ this.logger = logger;
27
+ }
28
+ isEnabled() {
29
+ // app.config stores a boolean; env strings may also appear via overrides.
30
+ const fromEnv = this.configService.get('app.turnstile.enabled');
31
+ if (fromEnv === true || fromEnv === 'true')
32
+ return true;
33
+ if (fromEnv === false || fromEnv === 'false')
34
+ return false;
35
+ return this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_TURNSTILE_ENABLED) === true;
36
+ }
37
+ siteKey() {
38
+ return (this.configService.get('app.turnstile.siteKey') ||
39
+ this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_TURNSTILE_SITE_KEY) ||
40
+ '');
41
+ }
42
+ /**
43
+ * When Turnstile is enabled, require a valid token (siteverify).
44
+ * No-op when disabled (local/dev without Cloudflare).
45
+ */
46
+ async assertValid(token, remoteIp) {
47
+ if (!this.isEnabled())
48
+ return;
49
+ if (!token?.trim()) {
50
+ throw new common_1.BadRequestException('Turnstile token required. Pass turnstileToken from the Cloudflare widget.');
51
+ }
52
+ const secret = this.configService.get('app.turnstile.secretKey') ||
53
+ this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_TURNSTILE_SECRET_KEY);
54
+ if (!secret) {
55
+ throw new common_1.ServiceUnavailableException('Turnstile is enabled but TURNSTILE_SECRET_KEY / auth.turnstile.secret_key is not configured.');
56
+ }
57
+ const body = new URLSearchParams();
58
+ body.set('secret', secret);
59
+ body.set('response', token.trim());
60
+ if (remoteIp)
61
+ body.set('remoteip', remoteIp);
62
+ let data;
63
+ try {
64
+ const res = await fetch(SITEVERIFY_URL, {
65
+ method: 'POST',
66
+ headers: { 'content-type': 'application/x-www-form-urlencoded' },
67
+ body,
68
+ });
69
+ data = (await res.json());
70
+ }
71
+ catch (err) {
72
+ this.logger.error('Turnstile siteverify request failed', {
73
+ event: 'auth.turnstile.siteverify_failed',
74
+ err: err instanceof Error ? err : undefined,
75
+ });
76
+ throw new common_1.ServiceUnavailableException('Unable to verify Turnstile token');
77
+ }
78
+ if (!data.success) {
79
+ this.logger.warn('Turnstile verification rejected', {
80
+ event: 'auth.turnstile.rejected',
81
+ metadata: { errors: data['error-codes'] ?? [] },
82
+ });
83
+ throw new common_1.BadRequestException('Turnstile verification failed');
84
+ }
85
+ }
86
+ };
87
+ exports.TurnstileService = TurnstileService;
88
+ exports.TurnstileService = TurnstileService = __decorate([
89
+ (0, common_1.Injectable)(),
90
+ __metadata("design:paramtypes", [settings_service_1.SettingsService,
91
+ config_1.ConfigService,
92
+ structured_logger_service_1.StructuredLoggerService])
93
+ ], TurnstileService);
94
+ //# sourceMappingURL=turnstile.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turnstile.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/turnstile.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA8F;AAC9F,2CAA+C;AAE/C,qGAAgG;AAChG,0EAAsE;AACtE,+EAA2E;AAE3E,MAAM,cAAc,GAAG,2DAA2D,CAAC;AAG5E,IAAM,gBAAgB,GAAtB,MAA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a;QACpB,mDAAuB;GAJrC,gBAAgB,CA4E5B"}
@@ -1,25 +1,32 @@
1
- /** Minimal shape for phone OTP vs email/password credential detection. */
1
+ /** Minimal shape for phone OTP vs email/password vs OAuth credential detection. */
2
2
  export interface AuthCredentialParams {
3
3
  verificationToken?: string;
4
4
  email?: string;
5
5
  password?: string;
6
+ provider?: string;
7
+ idToken?: string;
6
8
  }
7
- export type AuthParamsMode = 'phone' | 'email' | 'ambiguous' | 'missing';
9
+ export type AuthParamsMode = 'phone' | 'email' | 'oauth' | 'ambiguous' | 'missing';
8
10
  export declare function hasVerificationToken(dto: AuthCredentialParams): boolean;
9
11
  export declare function hasEmailPassword(dto: AuthCredentialParams): boolean;
12
+ export declare function hasOAuthParams(dto: AuthCredentialParams): boolean;
10
13
  /** True when the body selects the phone OTP credential shape (verificationToken only). */
11
14
  export declare function isPhoneAuthParams(dto: AuthCredentialParams): boolean;
12
15
  /** True when the body selects the email/password credential shape. */
13
16
  export declare function isEmailAuthParams(dto: AuthCredentialParams): boolean;
17
+ /** True when the body selects the OAuth ID-token credential shape. */
18
+ export declare function isOAuthAuthParams(dto: AuthCredentialParams): boolean;
14
19
  export declare function resolveAuthParamsMode(dto: AuthCredentialParams): AuthParamsMode;
15
- export declare const AUTH_PARAMS_ERROR = "Provide either { verificationToken } for phone auth or { email, password } for email auth \u2014 not both and not neither.";
16
- /** Delete-account confirmation: OTP challenge vs password. */
20
+ export declare const AUTH_PARAMS_ERROR = "Provide exactly one credential shape: { verificationToken } (phone), { email, password } (email), or { provider, idToken } (oauth).";
21
+ /** Delete-account confirmation: OTP challenge vs password vs OAuth ID token. */
17
22
  export interface DeleteConfirmParams {
18
23
  verificationId?: string;
19
24
  otp?: string;
20
25
  password?: string;
26
+ provider?: string;
27
+ idToken?: string;
21
28
  }
22
- export type DeleteConfirmMode = 'phone' | 'email' | 'ambiguous' | 'missing';
29
+ export type DeleteConfirmMode = 'phone' | 'email' | 'oauth' | 'ambiguous' | 'missing';
23
30
  export declare function resolveDeleteConfirmMode(dto: DeleteConfirmParams): DeleteConfirmMode;
24
- export declare const DELETE_CONFIRM_PARAMS_ERROR = "Provide either { verificationId, otp } for phone confirmation or { password } for email confirmation \u2014 not both and not neither.";
31
+ export declare const DELETE_CONFIRM_PARAMS_ERROR = "Provide exactly one confirmation shape: { verificationId, otp } (phone), { password } (email), or { provider, idToken } (oauth).";
25
32
  //# sourceMappingURL=auth-params.util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-params.util.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/utils/auth-params.util.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;AAEzE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAOnE;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAEpE;AAED,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAEpE;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,oBAAoB,GAAG,cAAc,CAO/E;AAED,eAAO,MAAM,iBAAiB,+HAC0F,CAAC;AAEzH,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO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QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;AAEtF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,mBAAmB,GAAG,iBAAiB,CAkBpF;AAED,eAAO,MAAM,2BAA2B,qIAC2F,CAAC"}
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DELETE_CONFIRM_PARAMS_ERROR = exports.AUTH_PARAMS_ERROR = void 0;
4
4
  exports.hasVerificationToken = hasVerificationToken;
5
5
  exports.hasEmailPassword = hasEmailPassword;
6
+ exports.hasOAuthParams = hasOAuthParams;
6
7
  exports.isPhoneAuthParams = isPhoneAuthParams;
7
8
  exports.isEmailAuthParams = isEmailAuthParams;
9
+ exports.isOAuthAuthParams = isOAuthAuthParams;
8
10
  exports.resolveAuthParamsMode = resolveAuthParamsMode;
9
11
  exports.resolveDeleteConfirmMode = resolveDeleteConfirmMode;
10
12
  function hasVerificationToken(dto) {
@@ -16,6 +18,12 @@ function hasEmailPassword(dto) {
16
18
  typeof dto.password === 'string' &&
17
19
  dto.password.length > 0);
18
20
  }
21
+ function hasOAuthParams(dto) {
22
+ return (typeof dto.provider === 'string' &&
23
+ dto.provider.trim().length > 0 &&
24
+ typeof dto.idToken === 'string' &&
25
+ dto.idToken.trim().length > 0);
26
+ }
19
27
  /** True when the body selects the phone OTP credential shape (verificationToken only). */
20
28
  function isPhoneAuthParams(dto) {
21
29
  return resolveAuthParamsMode(dto) === 'phone';
@@ -24,31 +32,46 @@ function isPhoneAuthParams(dto) {
24
32
  function isEmailAuthParams(dto) {
25
33
  return resolveAuthParamsMode(dto) === 'email';
26
34
  }
35
+ /** True when the body selects the OAuth ID-token credential shape. */
36
+ function isOAuthAuthParams(dto) {
37
+ return resolveAuthParamsMode(dto) === 'oauth';
38
+ }
27
39
  function resolveAuthParamsMode(dto) {
28
40
  const phone = hasVerificationToken(dto);
29
41
  const email = hasEmailPassword(dto);
30
- if (phone && email)
42
+ const oauth = hasOAuthParams(dto);
43
+ const count = Number(phone) + Number(email) + Number(oauth);
44
+ if (count > 1)
31
45
  return 'ambiguous';
32
46
  if (phone)
33
47
  return 'phone';
34
48
  if (email)
35
49
  return 'email';
50
+ if (oauth)
51
+ return 'oauth';
36
52
  return 'missing';
37
53
  }
38
- exports.AUTH_PARAMS_ERROR = 'Provide either { verificationToken } for phone auth or { email, password } for email auth — not both and not neither.';
54
+ exports.AUTH_PARAMS_ERROR = 'Provide exactly one credential shape: { verificationToken } (phone), { email, password } (email), or { provider, idToken } (oauth).';
39
55
  function resolveDeleteConfirmMode(dto) {
40
56
  const phone = typeof dto.verificationId === 'string' &&
41
57
  dto.verificationId.trim().length > 0 &&
42
58
  typeof dto.otp === 'string' &&
43
59
  dto.otp.trim().length > 0;
44
60
  const email = typeof dto.password === 'string' && dto.password.length > 0;
45
- if (phone && email)
61
+ const oauth = typeof dto.provider === 'string' &&
62
+ dto.provider.trim().length > 0 &&
63
+ typeof dto.idToken === 'string' &&
64
+ dto.idToken.trim().length > 0;
65
+ const count = Number(phone) + Number(email) + Number(oauth);
66
+ if (count > 1)
46
67
  return 'ambiguous';
47
68
  if (phone)
48
69
  return 'phone';
49
70
  if (email)
50
71
  return 'email';
72
+ if (oauth)
73
+ return 'oauth';
51
74
  return 'missing';
52
75
  }
53
- exports.DELETE_CONFIRM_PARAMS_ERROR = 'Provide either { verificationId, otp } for phone confirmation or { password } for email confirmation — not both and not neither.';
76
+ exports.DELETE_CONFIRM_PARAMS_ERROR = 'Provide exactly one confirmation shape: { verificationId, otp } (phone), { password } (email), or { provider, idToken } (oauth).';
54
77
  //# sourceMappingURL=auth-params.util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-params.util.js","sourceRoot":"","sources":["../../../../src/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wB;IAChE,MAAM,KAAK,GACV,OAAO,GAAG,CAAC,cAAc,KAAK,QAAQ;QACtC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QACpC,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ;QAC3B,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3B,MAAM,KAAK,GAAG,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1E,MAAM,KAAK,GACV,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ;QAChC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QAC9B,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;QAC/B,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5D,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,WAAW,CAAC;IAClC,IAAI,KAAK;QAAE,OAAO,OAAO,CAAC;IAC1B,IAAI,KAAK;QAAE,OAAO,OAAO,CAAC;IAC1B,IAAI,KAAK;QAAE,OAAO,OAAO,CAAC;IAC1B,OAAO,SAAS,CAAC;AAClB,CAAC;AAEY,QAAA,2BAA2B,GACvC,kIAAkI,CAAC"}
@@ -1,4 +1,15 @@
1
- export type SupportedAuthMethod = 'phone' | 'email';
1
+ import { OAuthProvider } from '../entities/user-oauth-identity.entity';
2
+ export type SupportedAuthMethod = 'phone' | 'email' | 'oauth';
2
3
  export declare function parseSupportedAuthMethods(raw: unknown): SupportedAuthMethod[];
3
4
  export declare function assertSupportedAuthMethod(method: SupportedAuthMethod, supported: SupportedAuthMethod[], action: 'login' | 'register'): void;
5
+ /** Parse OAuth provider allow-list from settings (known providers only). */
6
+ export declare function parseOAuthProviders(raw: unknown): OAuthProvider[];
7
+ /**
8
+ * Parse MFA required-for methods. Unlike {@link parseSupportedAuthMethods}, an empty
9
+ * array means "never require MFA" and is preserved.
10
+ */
11
+ export declare function parseMfaRequiredMethods(raw: unknown): SupportedAuthMethod[];
12
+ export declare function isKnownOAuthProvider(value: string): value is OAuthProvider;
13
+ /** @internal — for tests / docs */
14
+ export declare function allSupportedAuthMethods(): SupportedAuthMethod[];
4
15
  //# sourceMappingURL=auth-supported.util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-supported.util.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/utils/auth-supported.util.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,CAAC;AAIpD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,mBAAmB,EAAE,CAM7E;AAED,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,mBAAmB,EAAE,EAChC,MAAM,EAAE,OAAO,GAAG,UAAU,GAC1B,IAAI,CAMN"}
1
+ {"version":3,"file":"auth-supported.util.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/utils/auth-supported.util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAU9D,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,mBAAmB,EAAE,CAO7E;AAED,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,mBAAmB,EAAE,EAChC,MAAM,EAAE,OAAO,GAAG,UAAU,GAC1B,IAAI,CAMN;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,aAAa,EAAE,CAKjE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,mBAAmB,EAAE,CAM3E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAE1E;AAED,mCAAmC;AACnC,wBAAgB,uBAAuB,IAAI,mBAAmB,EAAE,CAE/D"}