@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
@@ -3,16 +3,43 @@ import { SettingsService } from '../../settings/services/settings.service';
3
3
  import type { ComposedEmail, EmailMetadata } from '../types/email-metadata';
4
4
  import { EmailComposer } from './email.composer';
5
5
  export declare const OTP_CODE_KEY_PREFIX = "otp:code:";
6
+ /** Receipt key so Bull retries after a successful send do not re-deliver. */
7
+ export declare const OTP_DELIVERED_KEY_PREFIX = "otp:delivered:";
6
8
  export declare class OtpDeliveryComposer {
7
9
  private readonly redis;
8
10
  private readonly settings;
9
11
  private readonly emailComposer;
10
12
  constructor(redis: IORedis, settings: SettingsService, emailComposer: EmailComposer);
11
13
  /**
12
- * Atomically consumes the OTP correlation key and returns the plaintext code.
14
+ * Reads the OTP correlation key without consuming it.
15
+ * Used before provider send so transient failures can retry with the same code.
16
+ */
17
+ peekCorrelationCode(correlationId: string): Promise<string | null>;
18
+ /**
19
+ * Atomically consumes the OTP correlation key after a successful send.
13
20
  * Returns null when the key is missing or already consumed.
14
21
  */
15
22
  consumeCorrelationCode(correlationId: string): Promise<string | null>;
23
+ /** Receipt value for a correlation, or null when missing. */
24
+ getDeliveryReceipt(correlationId: string): Promise<string | null>;
25
+ /** True when a prior worker already completed provider send for this correlation. */
26
+ wasDelivered(correlationId: string): Promise<boolean>;
27
+ /** True when a send claim is held (in-flight or crashed mid-attempt). */
28
+ isDeliveryPending(correlationId: string): Promise<boolean>;
29
+ /** Age of a pending claim in ms, or null when not pending. */
30
+ pendingClaimAgeMs(correlationId: string): Promise<number | null>;
31
+ /**
32
+ * Claims the correlation for send (SET NX pending:timestamp). Returns false if another
33
+ * worker already holds the key.
34
+ */
35
+ claimForSend(correlationId: string): Promise<boolean>;
36
+ /** Drops a pending claim after provider failure so retries can re-claim. Fail-closed. */
37
+ releaseClaim(correlationId: string): Promise<void>;
38
+ /**
39
+ * Records a delivery receipt immediately after provider send succeeds.
40
+ * Survives a crash before consume/markSent so retries skip re-send.
41
+ */
42
+ markDelivered(correlationId: string): Promise<void>;
16
43
  composeSmsBody(code: string): string;
17
44
  composeOtpEmail(to: string, code: string, metadata?: Partial<EmailMetadata>): ComposedEmail;
18
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"otp-delivery.composer.d.ts","sourceRoot":"","sources":["../../../../src/modules/delivery/composers/otp-delivery.composer.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,SAAS,CAAC;AAI9B,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,qBACa,mBAAmB;IAG9B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAFb,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,eAAe,EACzB,aAAa,EAAE,aAAa;IAG9C;;;OAGG;IACG,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI3E,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKpC,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa;CAG3F"}
1
+ {"version":3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;IAW3D,yFAAyF;IACnF,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD;;;OAGG;IACG,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASzD,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKpC,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa;CAG3F"}
@@ -15,15 +15,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  return (mod && mod.__esModule) ? mod : { "default": mod };
16
16
  };
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.OtpDeliveryComposer = exports.OTP_CODE_KEY_PREFIX = void 0;
18
+ exports.OtpDeliveryComposer = exports.OTP_DELIVERED_KEY_PREFIX = exports.OTP_CODE_KEY_PREFIX = void 0;
19
19
  const common_1 = require("@nestjs/common");
20
20
  const ioredis_1 = __importDefault(require("ioredis"));
21
21
  const redis_module_1 = require("../../../config/redis.module");
22
22
  const settings_keys_1 = require("../../settings/constants/settings.keys");
23
23
  const settings_service_1 = require("../../settings/services/settings.service");
24
+ const delivery_worker_constants_1 = require("../constants/delivery-worker.constants");
24
25
  const otp_sms_template_1 = require("../templates/otp-sms.template");
25
26
  const email_composer_1 = require("./email.composer");
26
27
  exports.OTP_CODE_KEY_PREFIX = 'otp:code:';
28
+ /** Receipt key so Bull retries after a successful send do not re-deliver. */
29
+ exports.OTP_DELIVERED_KEY_PREFIX = 'otp:delivered:';
30
+ const OTP_DELIVERED_TTL_SEC = 3600;
27
31
  let OtpDeliveryComposer = class OtpDeliveryComposer {
28
32
  redis;
29
33
  settings;
@@ -34,12 +38,54 @@ let OtpDeliveryComposer = class OtpDeliveryComposer {
34
38
  this.emailComposer = emailComposer;
35
39
  }
36
40
  /**
37
- * Atomically consumes the OTP correlation key and returns the plaintext code.
41
+ * Reads the OTP correlation key without consuming it.
42
+ * Used before provider send so transient failures can retry with the same code.
43
+ */
44
+ async peekCorrelationCode(correlationId) {
45
+ return this.redis.get(`${exports.OTP_CODE_KEY_PREFIX}${correlationId}`);
46
+ }
47
+ /**
48
+ * Atomically consumes the OTP correlation key after a successful send.
38
49
  * Returns null when the key is missing or already consumed.
39
50
  */
40
51
  async consumeCorrelationCode(correlationId) {
41
52
  return this.redis.getdel(`${exports.OTP_CODE_KEY_PREFIX}${correlationId}`);
42
53
  }
54
+ /** Receipt value for a correlation, or null when missing. */
55
+ async getDeliveryReceipt(correlationId) {
56
+ return this.redis.get(`${exports.OTP_DELIVERED_KEY_PREFIX}${correlationId}`);
57
+ }
58
+ /** True when a prior worker already completed provider send for this correlation. */
59
+ async wasDelivered(correlationId) {
60
+ return (0, delivery_worker_constants_1.isDeliveredReceipt)(await this.getDeliveryReceipt(correlationId));
61
+ }
62
+ /** True when a send claim is held (in-flight or crashed mid-attempt). */
63
+ async isDeliveryPending(correlationId) {
64
+ return (0, delivery_worker_constants_1.isPendingReceipt)(await this.getDeliveryReceipt(correlationId));
65
+ }
66
+ /** Age of a pending claim in ms, or null when not pending. */
67
+ async pendingClaimAgeMs(correlationId) {
68
+ return (0, delivery_worker_constants_1.pendingClaimAgeMs)(await this.getDeliveryReceipt(correlationId));
69
+ }
70
+ /**
71
+ * Claims the correlation for send (SET NX pending:timestamp). Returns false if another
72
+ * worker already holds the key.
73
+ */
74
+ async claimForSend(correlationId) {
75
+ const result = await this.redis.set(`${exports.OTP_DELIVERED_KEY_PREFIX}${correlationId}`, (0, delivery_worker_constants_1.encodePendingClaim)(), 'EX', OTP_DELIVERED_TTL_SEC, 'NX');
76
+ return result === 'OK';
77
+ }
78
+ /** Drops a pending claim after provider failure so retries can re-claim. Fail-closed. */
79
+ async releaseClaim(correlationId) {
80
+ await this.redis.del(`${exports.OTP_DELIVERED_KEY_PREFIX}${correlationId}`);
81
+ }
82
+ /**
83
+ * Records a delivery receipt immediately after provider send succeeds.
84
+ * Survives a crash before consume/markSent so retries skip re-send.
85
+ */
86
+ async markDelivered(correlationId) {
87
+ await this.redis.set(`${exports.OTP_DELIVERED_KEY_PREFIX}${correlationId}`, delivery_worker_constants_1.DELIVERY_RECEIPT_DELIVERED, 'EX', OTP_DELIVERED_TTL_SEC);
88
+ }
43
89
  composeSmsBody(code) {
44
90
  const template = this.settings.get(settings_keys_1.SETTING_KEYS.OTP_SMS_TEMPLATE);
45
91
  return (0, otp_sms_template_1.renderOtpSmsTemplate)(template, code);
@@ -1 +1 @@
1
- {"version":3,"file":"otp-delivery.composer.js","sourceRoot":"","sources":["../../../../src/modules/delivery/composers/otp-delivery.composer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,sDAA8B;AAE9B,+DAA4D;AAC5D,0EAAsE;AACtE,+EAA2E;AAC3E,oEAAqE;AAErE,qDAAiD;AAEpC,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAGxC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGb;IACA;IACA;IAJlB,YAEkB,KAAc,EACd,QAAyB,EACzB,aAA4B;QAF5B,UAAK,GAAL,KAAK,CAAS;QACd,aAAQ,GAAR,QAAQ,CAAiB;QACzB,kBAAa,GAAb,aAAa,CAAe;IAC3C,CAAC;IAEJ;;;OAGG;IACH,KAAK,CAAC,sBAAsB,CAAC,aAAqB;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,2BAAmB,GAAG,aAAa,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,cAAc,CAAC,IAAY;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAS,4BAAY,CAAC,gBAAgB,CAAC,CAAC;QAC1E,OAAO,IAAA,uCAAoB,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,eAAe,CAAC,EAAU,EAAE,IAAY,EAAE,QAAiC;QAC1E,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC;CACD,CAAA;AAxBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;qCACG,iBAAO;QACJ,kCAAe;QACV,8BAAa;GALlC,mBAAmB,CAwB/B"}
1
+ {"version":3,"file":"otp-delivery.composer.js","sourceRoot":"","sources":["../../../../src/modules/delivery/composers/otp-delivery.composer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,sDAA8B;AAE9B,+DAA4D;AAC5D,0EAAsE;AACtE,+EAA2E;AAC3E,sFAMgD;AAChD,oEAAqE;AAErE,qDAAiD;AAEpC,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAC/C,6EAA6E;AAChE,QAAA,wBAAwB,GAAG,gBAAgB,CAAC;AACzD,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAG5B,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGb;IACA;IACA;IAJlB,YAEkB,KAAc,EACd,QAAyB,EACzB,aAA4B;QAF5B,UAAK,GAAL,KAAK,CAAS;QACd,aAAQ,GAAR,QAAQ,CAAiB;QACzB,kBAAa,GAAb,aAAa,CAAe;IAC3C,CAAC;IAEJ;;;OAGG;IACH,KAAK,CAAC,mBAAmB,CAAC,aAAqB;QAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,2BAAmB,GAAG,aAAa,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,sBAAsB,CAAC,aAAqB;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,2BAAmB,GAAG,aAAa,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,6DAA6D;IAC7D,KAAK,CAAC,kBAA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;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAS,4BAAY,CAAC,gBAAgB,CAAC,CAAC;QAC1E,OAAO,IAAA,uCAAoB,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,eAAe,CAAC,EAAU,EAAE,IAAY,EAAE,QAAiC;QAC1E,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC;CACD,CAAA;AArFY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;qCACG,iBAAO;QACJ,kCAAe;QACV,8BAAa;GALlC,mBAAmB,CAqF/B"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * BullMQ lock must outlive worst-case provider work (SMTP/SMS 30s, FCM multi-token fan-out).
3
+ * Worker renews the lock while the job is running; this bounds stall detection.
4
+ */
5
+ export declare const DELIVERY_LOCK_DURATION_MS = 120000;
6
+ /** How often Bull checks for stalled jobs (must be < lockDuration). */
7
+ export declare const DELIVERY_STALLED_INTERVAL_MS = 60000;
8
+ /**
9
+ * Treat a leftover `pending:` claim as delivered after this age.
10
+ * Equal to lockDuration: once Bull stalls the job the lock is gone, so the
11
+ * first post-stall reprocess (even with attemptsMade === 0) can finalize at-most-once.
12
+ */
13
+ export declare const DELIVERY_PENDING_STALE_MS = 120000;
14
+ /**
15
+ * Bull job attempts/backoff for delivery + OTP queues (used by JobsQueue).
16
+ * Exponential delays with 5 attempts (10+20+40+80 ≈ 150s) exceed
17
+ * DELIVERY_PENDING_STALE_MS so "claim in progress" retries can reach stale finalize.
18
+ */
19
+ export declare const DELIVERY_JOB_ATTEMPTS = 5;
20
+ export declare const DELIVERY_JOB_BACKOFF_MS = 10000;
21
+ export declare const OTP_DELIVERY_JOB_BACKOFF_MS = 10000;
22
+ export declare const DELIVERY_RECEIPT_DELIVERED = "1";
23
+ export declare const DELIVERY_RECEIPT_PENDING_PREFIX = "pending:";
24
+ export declare function encodePendingClaim(nowMs?: number): string;
25
+ /** Age of a pending claim in ms, or null if not a pending receipt. */
26
+ export declare function pendingClaimAgeMs(receipt: string | null, nowMs?: number): number | null;
27
+ export declare function isDeliveredReceipt(receipt: string | null): boolean;
28
+ export declare function isPendingReceipt(receipt: string | null): boolean;
29
+ //# sourceMappingURL=delivery-worker.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delivery-worker.constants.d.ts","sourceRoot":"","sources":["../../../../src/modules/delivery/constants/delivery-worker.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,yBAAyB,SAAU,CAAC;AAEjD,uEAAuE;AACvE,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,SAA4B,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAC9C,eAAO,MAAM,2BAA2B,QAA0B,CAAC;AAEnE,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAE1D,wBAAgB,kBAAkB,CAAC,KAAK,SAAa,GAAG,MAAM,CAE7D;AAED,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,SAAa,GAAG,MAAM,GAAG,IAAI,CAS3F;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAElE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAEhE"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DELIVERY_RECEIPT_PENDING_PREFIX = exports.DELIVERY_RECEIPT_DELIVERED = exports.OTP_DELIVERY_JOB_BACKOFF_MS = exports.DELIVERY_JOB_BACKOFF_MS = exports.DELIVERY_JOB_ATTEMPTS = exports.DELIVERY_PENDING_STALE_MS = exports.DELIVERY_STALLED_INTERVAL_MS = exports.DELIVERY_LOCK_DURATION_MS = void 0;
4
+ exports.encodePendingClaim = encodePendingClaim;
5
+ exports.pendingClaimAgeMs = pendingClaimAgeMs;
6
+ exports.isDeliveredReceipt = isDeliveredReceipt;
7
+ exports.isPendingReceipt = isPendingReceipt;
8
+ /**
9
+ * BullMQ lock must outlive worst-case provider work (SMTP/SMS 30s, FCM multi-token fan-out).
10
+ * Worker renews the lock while the job is running; this bounds stall detection.
11
+ */
12
+ exports.DELIVERY_LOCK_DURATION_MS = 120_000;
13
+ /** How often Bull checks for stalled jobs (must be < lockDuration). */
14
+ exports.DELIVERY_STALLED_INTERVAL_MS = 60_000;
15
+ /**
16
+ * Treat a leftover `pending:` claim as delivered after this age.
17
+ * Equal to lockDuration: once Bull stalls the job the lock is gone, so the
18
+ * first post-stall reprocess (even with attemptsMade === 0) can finalize at-most-once.
19
+ */
20
+ exports.DELIVERY_PENDING_STALE_MS = exports.DELIVERY_LOCK_DURATION_MS;
21
+ /**
22
+ * Bull job attempts/backoff for delivery + OTP queues (used by JobsQueue).
23
+ * Exponential delays with 5 attempts (10+20+40+80 ≈ 150s) exceed
24
+ * DELIVERY_PENDING_STALE_MS so "claim in progress" retries can reach stale finalize.
25
+ */
26
+ exports.DELIVERY_JOB_ATTEMPTS = 5;
27
+ exports.DELIVERY_JOB_BACKOFF_MS = 10_000;
28
+ exports.OTP_DELIVERY_JOB_BACKOFF_MS = exports.DELIVERY_JOB_BACKOFF_MS;
29
+ exports.DELIVERY_RECEIPT_DELIVERED = '1';
30
+ exports.DELIVERY_RECEIPT_PENDING_PREFIX = 'pending:';
31
+ function encodePendingClaim(nowMs = Date.now()) {
32
+ return `${exports.DELIVERY_RECEIPT_PENDING_PREFIX}${nowMs}`;
33
+ }
34
+ /** Age of a pending claim in ms, or null if not a pending receipt. */
35
+ function pendingClaimAgeMs(receipt, nowMs = Date.now()) {
36
+ if (receipt == null || !receipt.startsWith(exports.DELIVERY_RECEIPT_PENDING_PREFIX)) {
37
+ return null;
38
+ }
39
+ const started = Number(receipt.slice(exports.DELIVERY_RECEIPT_PENDING_PREFIX.length));
40
+ if (!Number.isFinite(started)) {
41
+ return null;
42
+ }
43
+ return Math.max(0, nowMs - started);
44
+ }
45
+ function isDeliveredReceipt(receipt) {
46
+ return receipt === exports.DELIVERY_RECEIPT_DELIVERED;
47
+ }
48
+ function isPendingReceipt(receipt) {
49
+ return pendingClaimAgeMs(receipt) != null;
50
+ }
51
+ //# sourceMappingURL=delivery-worker.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delivery-worker.constants.js","sourceRoot":"","sources":["../../../../src/modules/delivery/constants/delivery-worker.constants.ts"],"names":[],"mappings":";;;AA4BA,gDAEC;AAGD,8CASC;AAED,gDAEC;AAED,4CAEC;AAlDD;;;GAGG;AACU,QAAA,yBAAyB,GAAG,OAAO,CAAC;AAEjD,uEAAuE;AAC1D,QAAA,4BAA4B,GAAG,MAAM,CAAC;AAEnD;;;;GAIG;AACU,QAAA,yBAAyB,GAAG,iCAAyB,CAAC;AAEnE;;;;GAIG;AACU,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAC1B,QAAA,uBAAuB,GAAG,MAAM,CAAC;AACjC,QAAA,2BAA2B,GAAG,+BAAuB,CAAC;AAEtD,QAAA,0BAA0B,GAAG,GAAG,CAAC;AACjC,QAAA,+BAA+B,GAAG,UAAU,CAAC;AAE1D,SAAgB,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE;IACpD,OAAO,GAAG,uCAA+B,GAAG,KAAK,EAAE,CAAC;AACrD,CAAC;AAED,sEAAsE;AACtE,SAAgB,iBAAiB,CAAC,OAAsB,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE;IAC3E,IAAI,OAAO,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,uCAA+B,CAAC,EAAE,CAAC;QAC7E,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,uCAA+B,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,CAAC;AACrC,CAAC;AAED,SAAgB,kBAAkB,CAAC,OAAsB;IACxD,OAAO,OAAO,KAAK,kCAA0B,CAAC;AAC/C,CAAC;AAED,SAAgB,gBAAgB,CAAC,OAAsB;IACtD,OAAO,iBAAiB,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;AAC3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"delivery.module.d.ts","sourceRoot":"","sources":["../../../src/modules/delivery/delivery.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAsB/D,qBAEa,cAAc;IAC1B,MAAM,CAAC,QAAQ,IAAI,aAAa;CAuDhC"}
1
+ {"version":3,"file":"delivery.module.d.ts","sourceRoot":"","sources":["../../../src/modules/delivery/delivery.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAmB/D,qBAEa,cAAc;IAC1B,MAAM,CAAC,QAAQ,IAAI,aAAa;CA6BhC"}
@@ -9,14 +9,11 @@ var DeliveryModule_1;
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.DeliveryModule = void 0;
11
11
  const common_1 = require("@nestjs/common");
12
- const core_1 = require("@nestjs/core");
13
12
  const typeorm_1 = require("@nestjs/typeorm");
14
13
  const env_flags_util_1 = require("../../config/env-flags.util");
15
14
  const jobs_module_1 = require("../jobs/jobs.module");
16
15
  const jobs_queue_1 = require("../jobs/queues/jobs.queue");
17
16
  const firebase_module_1 = require("../notifications/firebase.module");
18
- const structured_logger_service_1 = require("../observability/logging/structured-logger.service");
19
- const settings_service_1 = require("../settings/services/settings.service");
20
17
  const email_composer_1 = require("./composers/email.composer");
21
18
  const otp_delivery_composer_1 = require("./composers/otp-delivery.composer");
22
19
  const notification_delivery_log_entity_1 = require("./entities/notification-delivery-log.entity");
@@ -39,18 +36,7 @@ let DeliveryModule = DeliveryModule_1 = class DeliveryModule {
39
36
  delivery_job_runner_1.DeliveryJobRunner,
40
37
  otp_delivery_job_runner_1.OtpDeliveryJobRunner,
41
38
  ...(useBull ? [delivery_processor_1.DeliveryProcessor, otp_delivery_processor_1.OtpDeliveryProcessor] : []),
42
- {
43
- provide: notification_delivery_service_1.NotificationDeliveryService,
44
- useFactory: (jobsQueue, moduleRef, emailComposer, audit, settings, logger) => new notification_delivery_service_1.NotificationDeliveryService(jobsQueue, moduleRef, emailComposer, audit, settings, logger),
45
- inject: [
46
- jobs_queue_1.JobsQueue,
47
- core_1.ModuleRef,
48
- email_composer_1.EmailComposer,
49
- notification_audit_service_1.NotificationAuditService,
50
- settings_service_1.SettingsService,
51
- structured_logger_service_1.StructuredLoggerService,
52
- ],
53
- },
39
+ notification_delivery_service_1.NotificationDeliveryService,
54
40
  ];
55
41
  const syncQueueProviders = useBull
56
42
  ? []
@@ -1 +1 @@
1
- {"version":3,"file":"delivery.module.js","sourceRoot":"","sources":["../../../src/modules/delivery/delivery.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,uCAAyC;AACzC,6CAAgD;AAEhD,gEAA6D;AAC7D,qDAAiD;AACjD,0DAAsD;AACtD,sEAAkE;AAClE,kGAA6F;AAC7F,4EAAwE;AACxE,+DAA2D;AAC3D,6EAAwE;AACxE,kGAAsF;AACt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AO,EAAE,CAAC,2DAA2B,EAAE,qDAAwB,CAAC;SAChE,CAAC;IACH,CAAC;CACD,CAAA;AAxDY,wCAAc;yBAAd,cAAc;IAF1B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,cAAc,CAwD1B"}
1
+ {"version":3,"file":"delivery.module.js","sourceRoot":"","sources":["../../../src/modules/delivery/delivery.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAgD;AAEhD,gEAA6D;AAC7D,qDAAiD;AACjD,0DAAsD;AACtD,sEAAkE;AAClE,+DAA2D;AAC3D,6EAAwE;AACxE,kGAAsF;AACtF,mFAA8E;AAC9E,wEAAoE;AACpE,0EAAqE;AACrE,gFAA2E;AAC3E,kFAA4E;AAC5E,8DAAyD;AACzD,kGAA4F;AAC5F,sFAAiF;AAI1E,IAAM,cAAc,sBAApB,MAAM,cAAc;IAC1B,MAAM,CAAC,QAAQ;QACd,MAAM,OAAO,GAAG,IAAA,+BAAc,GAAE,CAAC;QACjC,MAAM,eAAe,GAAG;YACvB,8BAAa;YACb,qDAAwB;YACxB,gEAA6B;YAC7B,2CAAmB;YACnB,uCAAiB;YACjB,8CAAoB;YACpB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,sCAAiB,EAAE,6CAAoB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7D,2DAA2B;SAC3B,CAAC;QAEF,MAAM,kBAAkB,GAAG,OAAO;YACjC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,+BAAa,EAAE,EAAE,OAAO,EAAE,sBAAS,EAAE,WAAW,EAAE,+BAAa,EAAE,CAAC,CAAC;QAEvE,OAAO;YACN,MAAM,EAAE,gBAAc;YACtB,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE;gBACR,wBAAU,CAAC,QAAQ,EAAE;gBACrB,gCAAc;gBACd,uBAAa,CAAC,UAAU,CAAC,CAAC,0DAAuB,CAAC,CAAC;aACnD;YACD,SAAS,EAAE,CAAC,GAAG,kBAAkB,EAAE,GAAG,eAAe,CAAC;YACtD,OAAO,EAAE,CAAC,2DAA2B,EAAE,qDAAwB,CAAC;SAChE,CAAC;IACH,CAAC;CACD,CAAA;AA9BY,wCAAc;yBAAd,cAAc;IAF1B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,cAAc,CA8B1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"notification-delivery-log.entity.d.ts","sourceRoot":"","sources":["../../../../src/modules/delivery/entities/notification-delivery-log.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,oBAAY,mBAAmB;IAC9B,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,IAAI,SAAS;CACb;AAED,oBAAY,0BAA0B;IACrC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,iBAAiB,sBAAsB;CACvC;AAED,qBACa,uBAAwB,SAAQ,eAAe;IAG3D,cAAc,EAAG,MAAM,CAAC;IAGxB,OAAO,EAAG,mBAAmB,CAAC;IAG9B,OAAO,EAAG,MAAM,CAAC;IAEjB,mEAAmE;IAEnE,SAAS,EAAG,MAAM,CAAC;IAGnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAG,0BAA0B,CAAC;IAGpC,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,MAAM,CAAC,EAAE,IAAI,CAAC;IAEd,+EAA+E;IAE/E,eAAe,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACjD"}
1
+ {"version":3,"file":"notification-delivery-log.entity.d.ts","sourceRoot":"","sources":["../../../../src/modules/delivery/entities/notification-delivery-log.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,oBAAY,mBAAmB;IAC9B,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,IAAI,SAAS;CACb;AAED,oBAAY,0BAA0B;IACrC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,iBAAiB,sBAAsB;CACvC;AAED,qBAGa,uBAAwB,SAAQ,eAAe;IAG3D,cAAc,EAAG,MAAM,CAAC;IAGxB,OAAO,EAAG,mBAAmB,CAAC;IAG9B,OAAO,EAAG,MAAM,CAAC;IAEjB,mEAAmE;IAEnE,SAAS,EAAG,MAAM,CAAC;IAGnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAG,0BAA0B,CAAC;IAGpC,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,MAAM,CAAC,EAAE,IAAI,CAAC;IAEd,+EAA+E;IAE/E,eAAe,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACjD"}
@@ -82,6 +82,8 @@ __decorate([
82
82
  __metadata("design:type", Object)
83
83
  ], NotificationDeliveryLog.prototype, "payloadSnapshot", void 0);
84
84
  exports.NotificationDeliveryLog = NotificationDeliveryLog = __decorate([
85
- (0, typeorm_1.Entity)('notification_delivery_logs')
85
+ (0, typeorm_1.Entity)('notification_delivery_logs'),
86
+ (0, typeorm_1.Index)(['status', 'createdAt']),
87
+ (0, typeorm_1.Index)(['createdAt'])
86
88
  ], NotificationDeliveryLog);
87
89
  //# sourceMappingURL=notification-delivery-log.entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification-delivery-log.entity.js","sourceRoot":"","sources":["../../../../src/modules/delivery/entities/notification-delivery-log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgD;AAEhD,kEAAmE;AAGnE,IAAY,mBAI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AE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC5B;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6DAC1C;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACxD,IAAI;uDAAC;AAId;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACnB;kCAhCrC,uBAAuB;IADnC,IAAA,gBAAM,EAAC,4BAA4B,CAAC;GACxB,uBAAuB,CAiCnC"}
1
+ {"version":3,"file":"notification-delivery-log.entity.js","sourceRoot":"","sources":["../../../../src/modules/delivery/entities/notification-delivery-log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgD;AAEhD,kEAAmE;AAGnE,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC9B,sCAAe,CAAA;IACf,kCAAW,CAAA;IACX,oCAAa,CAAA;AACd,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAED,IAAY,0BAKX;AALD,WAAY,0BAA0B;IACrC,+CAAiB,CAAA;IACjB,2CAAa,CAAA;IACb,+CAAiB,CAAA;IACjB,qEAAuC,CAAA;AACxC,CAAC,EALW,0BAA0B,0CAA1B,0BAA0B,QAKrC;AAKM,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,6BAAe;IAG3D,cAAc,CAAU;IAGxB,OAAO,CAAuB;IAG9B,OAAO,CAAU;IAEjB,mEAAmE;IAEnE,SAAS,CAAU;IAGnB,WAAW,CAAU;IAGrB,MAAM,CAA8B;IAGpC,KAAK,CAAU;IAGf,YAAY,CAAU;IAGtB,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AAK,EAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC9B,IAAA,eAAK,EAAC,CAAC,WAAW,CAAC,CAAC;GACR,uBAAuB,CAiCnC"}
@@ -1,5 +1,6 @@
1
1
  import { OnModuleInit } from '@nestjs/common';
2
2
  import { ModuleRef } from '@nestjs/core';
3
+ import type IORedis from 'ioredis';
3
4
  import { JobsQueue } from '../jobs/queues/jobs.queue';
4
5
  import { StructuredLoggerService } from '../observability/logging/structured-logger.service';
5
6
  import { SettingsService } from '../settings/services/settings.service';
@@ -14,8 +15,9 @@ export declare class NotificationDeliveryService implements OnModuleInit {
14
15
  private readonly audit;
15
16
  private readonly settings;
16
17
  private readonly logger;
18
+ private readonly redis;
17
19
  private resolvedQueue;
18
- constructor(jobsQueue: JobsQueue, moduleRef: ModuleRef, emailComposer: EmailComposer, audit: NotificationAuditService, settings: SettingsService, logger: StructuredLoggerService);
20
+ constructor(jobsQueue: JobsQueue, moduleRef: ModuleRef, emailComposer: EmailComposer, audit: NotificationAuditService, settings: SettingsService, logger: StructuredLoggerService, redis: IORedis);
19
21
  onModuleInit(): void;
20
22
  isEnabled(): boolean;
21
23
  private resolveQueue;
@@ -57,7 +59,16 @@ export declare class NotificationDeliveryService implements OnModuleInit {
57
59
  private logSkipped;
58
60
  private logEnqueued;
59
61
  private recordQueued;
62
+ /**
63
+ * Enqueues a job and attaches its id. On queue failure, marks the audit failed
64
+ * so rows never remain QUEUED without a backing job.
65
+ */
66
+ private enqueueAndAttach;
60
67
  private attachJobId;
61
68
  private assertEnabled;
69
+ private assertEmailPayloadSize;
70
+ private assertSmsBodySize;
71
+ private assertPushPayloadSize;
72
+ private assertAdminRetryRateLimit;
62
73
  }
63
74
  //# sourceMappingURL=notification-delivery.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification-delivery.service.d.ts","sourceRoot":"","sources":["../../../src/modules/delivery/notification-delivery.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,YAAY,EAEZ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B,CACrB,EAAE,EAAE,MAAM,EACV,aAAa,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,eAAe,GAAG,cAAc,GAAG,aAAa,CAAC,CAAC,GACvF,OAAO,CAAC,IAAI,CAAC;IA6BV,QAAQ,CACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,EACvE,cAAc,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;IAmChB;;;OAGG;IACG,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;YAsCxD,mBAAmB;YAmFnB,YAAY;IA4C1B,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,WAAW;YAqBL,YAAY;YAMZ,WAAW;IASzB,OAAO,CAAC,aAAa;CAUrB"}
1
+ {"version":3,"file":"notification-delivery.service.d.ts","sourceRoot":"","sources":["../../../src/modules/delivery/notification-delivery.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAON,YAAY,EAEZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAE7F,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAEN,uBAAuB,EAEvB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjF,OAAO,KAAK,EAAE,aAAa,EA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