@skyapp-labs/blueprint-backend-core 1.0.9

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 (737) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +954 -0
  3. package/dist/common/base/base.entity.d.ts +12 -0
  4. package/dist/common/base/base.entity.d.ts.map +1 -0
  5. package/dist/common/base/base.entity.js +48 -0
  6. package/dist/common/base/base.entity.js.map +1 -0
  7. package/dist/common/base/base.repository.d.ts +26 -0
  8. package/dist/common/base/base.repository.d.ts.map +1 -0
  9. package/dist/common/base/base.repository.js +61 -0
  10. package/dist/common/base/base.repository.js.map +1 -0
  11. package/dist/common/constants/index.d.ts +9 -0
  12. package/dist/common/constants/index.d.ts.map +1 -0
  13. package/dist/common/constants/index.js +13 -0
  14. package/dist/common/constants/index.js.map +1 -0
  15. package/dist/common/decorators/auth-method-aware.decorator.d.ts +3 -0
  16. package/dist/common/decorators/auth-method-aware.decorator.d.ts.map +1 -0
  17. package/dist/common/decorators/auth-method-aware.decorator.js +8 -0
  18. package/dist/common/decorators/auth-method-aware.decorator.js.map +1 -0
  19. package/dist/common/decorators/index.d.ts +8 -0
  20. package/dist/common/decorators/index.d.ts.map +1 -0
  21. package/dist/common/decorators/index.js +24 -0
  22. package/dist/common/decorators/index.js.map +1 -0
  23. package/dist/common/dto/index.d.ts +2 -0
  24. package/dist/common/dto/index.d.ts.map +1 -0
  25. package/dist/common/dto/index.js +18 -0
  26. package/dist/common/dto/index.js.map +1 -0
  27. package/dist/common/dto/pagination.dto.d.ts +6 -0
  28. package/dist/common/dto/pagination.dto.d.ts.map +1 -0
  29. package/dist/common/dto/pagination.dto.js +45 -0
  30. package/dist/common/dto/pagination.dto.js.map +1 -0
  31. package/dist/common/filters/http-exception.filter.d.ts +9 -0
  32. package/dist/common/filters/http-exception.filter.d.ts.map +1 -0
  33. package/dist/common/filters/http-exception.filter.js +71 -0
  34. package/dist/common/filters/http-exception.filter.js.map +1 -0
  35. package/dist/common/filters/index.d.ts +2 -0
  36. package/dist/common/filters/index.d.ts.map +1 -0
  37. package/dist/common/filters/index.js +18 -0
  38. package/dist/common/filters/index.js.map +1 -0
  39. package/dist/common/guards/auth.guard.d.ts +11 -0
  40. package/dist/common/guards/auth.guard.d.ts.map +1 -0
  41. package/dist/common/guards/auth.guard.js +42 -0
  42. package/dist/common/guards/auth.guard.js.map +1 -0
  43. package/dist/common/guards/index.d.ts +5 -0
  44. package/dist/common/guards/index.d.ts.map +1 -0
  45. package/dist/common/guards/index.js +21 -0
  46. package/dist/common/guards/index.js.map +1 -0
  47. package/dist/common/guards/login-ip-rate-limit.guard.d.ts +12 -0
  48. package/dist/common/guards/login-ip-rate-limit.guard.d.ts.map +1 -0
  49. package/dist/common/guards/login-ip-rate-limit.guard.js +70 -0
  50. package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -0
  51. package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +12 -0
  52. package/dist/common/guards/otp-ip-rate-limit.guard.d.ts.map +1 -0
  53. package/dist/common/guards/otp-ip-rate-limit.guard.js +70 -0
  54. package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -0
  55. package/dist/common/guards/permissions.guard.d.ts +8 -0
  56. package/dist/common/guards/permissions.guard.d.ts.map +1 -0
  57. package/dist/common/guards/permissions.guard.js +41 -0
  58. package/dist/common/guards/permissions.guard.js.map +1 -0
  59. package/dist/common/index.d.ts +13 -0
  60. package/dist/common/index.d.ts.map +1 -0
  61. package/dist/common/index.js +33 -0
  62. package/dist/common/index.js.map +1 -0
  63. package/dist/common/interceptors/index.d.ts +2 -0
  64. package/dist/common/interceptors/index.d.ts.map +1 -0
  65. package/dist/common/interceptors/index.js +18 -0
  66. package/dist/common/interceptors/index.js.map +1 -0
  67. package/dist/common/interceptors/logging.interceptor.d.ts +10 -0
  68. package/dist/common/interceptors/logging.interceptor.d.ts.map +1 -0
  69. package/dist/common/interceptors/logging.interceptor.js +50 -0
  70. package/dist/common/interceptors/logging.interceptor.js.map +1 -0
  71. package/dist/common/interfaces/index.d.ts +2 -0
  72. package/dist/common/interfaces/index.d.ts.map +1 -0
  73. package/dist/common/interfaces/index.js +18 -0
  74. package/dist/common/interfaces/index.js.map +1 -0
  75. package/dist/common/interfaces/request-user.interface.d.ts +5 -0
  76. package/dist/common/interfaces/request-user.interface.d.ts.map +1 -0
  77. package/dist/common/interfaces/request-user.interface.js +3 -0
  78. package/dist/common/interfaces/request-user.interface.js.map +1 -0
  79. package/dist/common/middlewares/index.d.ts +6 -0
  80. package/dist/common/middlewares/index.d.ts.map +1 -0
  81. package/dist/common/middlewares/index.js +23 -0
  82. package/dist/common/middlewares/index.js.map +1 -0
  83. package/dist/common/pipes/config-aware-validation.pipe.d.ts +9 -0
  84. package/dist/common/pipes/config-aware-validation.pipe.d.ts.map +1 -0
  85. package/dist/common/pipes/config-aware-validation.pipe.js +38 -0
  86. package/dist/common/pipes/config-aware-validation.pipe.js.map +1 -0
  87. package/dist/common/pipes/index.d.ts +14 -0
  88. package/dist/common/pipes/index.d.ts.map +1 -0
  89. package/dist/common/pipes/index.js +62 -0
  90. package/dist/common/pipes/index.js.map +1 -0
  91. package/dist/common/utils/index.d.ts +8 -0
  92. package/dist/common/utils/index.d.ts.map +1 -0
  93. package/dist/common/utils/index.js +33 -0
  94. package/dist/common/utils/index.js.map +1 -0
  95. package/dist/common/utils/request.utils.d.ts +7 -0
  96. package/dist/common/utils/request.utils.d.ts.map +1 -0
  97. package/dist/common/utils/request.utils.js +12 -0
  98. package/dist/common/utils/request.utils.js.map +1 -0
  99. package/dist/config/app.config.d.ts +66 -0
  100. package/dist/config/app.config.d.ts.map +1 -0
  101. package/dist/config/app.config.js +43 -0
  102. package/dist/config/app.config.js.map +1 -0
  103. package/dist/config/database.config.d.ts +16 -0
  104. package/dist/config/database.config.d.ts.map +1 -0
  105. package/dist/config/database.config.js +13 -0
  106. package/dist/config/database.config.js.map +1 -0
  107. package/dist/config/env.validation.d.ts +34 -0
  108. package/dist/config/env.validation.d.ts.map +1 -0
  109. package/dist/config/env.validation.js +172 -0
  110. package/dist/config/env.validation.js.map +1 -0
  111. package/dist/config/firebase.module.d.ts +5 -0
  112. package/dist/config/firebase.module.d.ts.map +1 -0
  113. package/dist/config/firebase.module.js +21 -0
  114. package/dist/config/firebase.module.js.map +1 -0
  115. package/dist/config/index.d.ts +7 -0
  116. package/dist/config/index.d.ts.map +1 -0
  117. package/dist/config/index.js +17 -0
  118. package/dist/config/index.js.map +1 -0
  119. package/dist/config/keycloak.module.d.ts +6 -0
  120. package/dist/config/keycloak.module.d.ts.map +1 -0
  121. package/dist/config/keycloak.module.js +92 -0
  122. package/dist/config/keycloak.module.js.map +1 -0
  123. package/dist/config/redis.module.d.ts +10 -0
  124. package/dist/config/redis.module.d.ts.map +1 -0
  125. package/dist/config/redis.module.js +111 -0
  126. package/dist/config/redis.module.js.map +1 -0
  127. package/dist/core.module.d.ts +12 -0
  128. package/dist/core.module.d.ts.map +1 -0
  129. package/dist/core.module.js +53 -0
  130. package/dist/core.module.js.map +1 -0
  131. package/dist/database/data-source.d.ts +5 -0
  132. package/dist/database/data-source.d.ts.map +1 -0
  133. package/dist/database/data-source.js +56 -0
  134. package/dist/database/data-source.js.map +1 -0
  135. package/dist/database/migrations/1775258543167-full-schema.d.ts +7 -0
  136. package/dist/database/migrations/1775258543167-full-schema.d.ts.map +1 -0
  137. package/dist/database/migrations/1775258543167-full-schema.js +100 -0
  138. package/dist/database/migrations/1775258543167-full-schema.js.map +1 -0
  139. package/dist/database/seeds/roles.seed.d.ts +11 -0
  140. package/dist/database/seeds/roles.seed.d.ts.map +1 -0
  141. package/dist/database/seeds/roles.seed.js +66 -0
  142. package/dist/database/seeds/roles.seed.js.map +1 -0
  143. package/dist/database/seeds/run-seed.d.ts +2 -0
  144. package/dist/database/seeds/run-seed.d.ts.map +1 -0
  145. package/dist/database/seeds/run-seed.js +32 -0
  146. package/dist/database/seeds/run-seed.js.map +1 -0
  147. package/dist/database/seeds/settings.seed.d.ts +9 -0
  148. package/dist/database/seeds/settings.seed.d.ts.map +1 -0
  149. package/dist/database/seeds/settings.seed.js +450 -0
  150. package/dist/database/seeds/settings.seed.js.map +1 -0
  151. package/dist/database/seeds/user.seed.d.ts +9 -0
  152. package/dist/database/seeds/user.seed.d.ts.map +1 -0
  153. package/dist/database/seeds/user.seed.js +90 -0
  154. package/dist/database/seeds/user.seed.js.map +1 -0
  155. package/dist/database/typeorm.service.d.ts +13 -0
  156. package/dist/database/typeorm.service.d.ts.map +1 -0
  157. package/dist/database/typeorm.service.js +52 -0
  158. package/dist/database/typeorm.service.js.map +1 -0
  159. package/dist/health/health.controller.d.ts +29 -0
  160. package/dist/health/health.controller.d.ts.map +1 -0
  161. package/dist/health/health.controller.js +182 -0
  162. package/dist/health/health.controller.js.map +1 -0
  163. package/dist/health/health.module.d.ts +3 -0
  164. package/dist/health/health.module.d.ts.map +1 -0
  165. package/dist/health/health.module.js +50 -0
  166. package/dist/health/health.module.js.map +1 -0
  167. package/dist/index.d.ts +40 -0
  168. package/dist/index.d.ts.map +1 -0
  169. package/dist/index.js +79 -0
  170. package/dist/index.js.map +1 -0
  171. package/dist/jobs/index.d.ts +6 -0
  172. package/dist/jobs/index.d.ts.map +1 -0
  173. package/dist/jobs/index.js +10 -0
  174. package/dist/jobs/index.js.map +1 -0
  175. package/dist/jobs/jobs.module.d.ts +6 -0
  176. package/dist/jobs/jobs.module.d.ts.map +1 -0
  177. package/dist/jobs/jobs.module.js +63 -0
  178. package/dist/jobs/jobs.module.js.map +1 -0
  179. package/dist/jobs/processors/jobs.processor.d.ts +24 -0
  180. package/dist/jobs/processors/jobs.processor.d.ts.map +1 -0
  181. package/dist/jobs/processors/jobs.processor.js +164 -0
  182. package/dist/jobs/processors/jobs.processor.js.map +1 -0
  183. package/dist/jobs/queues/jobs.queue.d.ts +25 -0
  184. package/dist/jobs/queues/jobs.queue.d.ts.map +1 -0
  185. package/dist/jobs/queues/jobs.queue.js +55 -0
  186. package/dist/jobs/queues/jobs.queue.js.map +1 -0
  187. package/dist/jobs/queues/queue-names.d.ts +5 -0
  188. package/dist/jobs/queues/queue-names.d.ts.map +1 -0
  189. package/dist/jobs/queues/queue-names.js +7 -0
  190. package/dist/jobs/queues/queue-names.js.map +1 -0
  191. package/dist/modules/admin/admin.module.d.ts +3 -0
  192. package/dist/modules/admin/admin.module.d.ts.map +1 -0
  193. package/dist/modules/admin/admin.module.js +24 -0
  194. package/dist/modules/admin/admin.module.js.map +1 -0
  195. package/dist/modules/admin/controllers/admin.controller.d.ts +27 -0
  196. package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -0
  197. package/dist/modules/admin/controllers/admin.controller.js +110 -0
  198. package/dist/modules/admin/controllers/admin.controller.js.map +1 -0
  199. package/dist/modules/admin/dto/admin-log.dto.d.ts +17 -0
  200. package/dist/modules/admin/dto/admin-log.dto.d.ts.map +1 -0
  201. package/dist/modules/admin/dto/admin-log.dto.js +57 -0
  202. package/dist/modules/admin/dto/admin-log.dto.js.map +1 -0
  203. package/dist/modules/admin/entities/admin-log.entity.d.ts +12 -0
  204. package/dist/modules/admin/entities/admin-log.entity.d.ts.map +1 -0
  205. package/dist/modules/admin/entities/admin-log.entity.js +53 -0
  206. package/dist/modules/admin/entities/admin-log.entity.js.map +1 -0
  207. package/dist/modules/admin/services/admin-log.service.d.ts +11 -0
  208. package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -0
  209. package/dist/modules/admin/services/admin-log.service.js +60 -0
  210. package/dist/modules/admin/services/admin-log.service.js.map +1 -0
  211. package/dist/modules/auth/auth-core/auth-core.module.d.ts +3 -0
  212. package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -0
  213. package/dist/modules/auth/auth-core/auth-core.module.js +40 -0
  214. package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -0
  215. package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +18 -0
  216. package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -0
  217. package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +45 -0
  218. package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -0
  219. package/dist/modules/auth/auth.manifest.d.ts +9 -0
  220. package/dist/modules/auth/auth.manifest.d.ts.map +1 -0
  221. package/dist/modules/auth/auth.manifest.js +29 -0
  222. package/dist/modules/auth/auth.manifest.js.map +1 -0
  223. package/dist/modules/auth/auth.module.d.ts +3 -0
  224. package/dist/modules/auth/auth.module.d.ts.map +1 -0
  225. package/dist/modules/auth/auth.module.js +67 -0
  226. package/dist/modules/auth/auth.module.js.map +1 -0
  227. package/dist/modules/auth/controllers/account.controller.d.ts +42 -0
  228. package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -0
  229. package/dist/modules/auth/controllers/account.controller.js +206 -0
  230. package/dist/modules/auth/controllers/account.controller.js.map +1 -0
  231. package/dist/modules/auth/controllers/auth.controller.d.ts +32 -0
  232. package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -0
  233. package/dist/modules/auth/controllers/auth.controller.js +206 -0
  234. package/dist/modules/auth/controllers/auth.controller.js.map +1 -0
  235. package/dist/modules/auth/controllers/otp.controller.d.ts +10 -0
  236. package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -0
  237. package/dist/modules/auth/controllers/otp.controller.js +156 -0
  238. package/dist/modules/auth/controllers/otp.controller.js.map +1 -0
  239. package/dist/modules/auth/dto/index.d.ts +7 -0
  240. package/dist/modules/auth/dto/index.d.ts.map +1 -0
  241. package/dist/modules/auth/dto/index.js +23 -0
  242. package/dist/modules/auth/dto/index.js.map +1 -0
  243. package/dist/modules/auth/dto/invite.dto.d.ts +7 -0
  244. package/dist/modules/auth/dto/invite.dto.d.ts.map +1 -0
  245. package/dist/modules/auth/dto/invite.dto.js +39 -0
  246. package/dist/modules/auth/dto/invite.dto.js.map +1 -0
  247. package/dist/modules/auth/dto/login.dto.d.ts +7 -0
  248. package/dist/modules/auth/dto/login.dto.d.ts.map +1 -0
  249. package/dist/modules/auth/dto/login.dto.js +48 -0
  250. package/dist/modules/auth/dto/login.dto.js.map +1 -0
  251. package/dist/modules/auth/dto/otp.dto.d.ts +15 -0
  252. package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -0
  253. package/dist/modules/auth/dto/otp.dto.js +83 -0
  254. package/dist/modules/auth/dto/otp.dto.js.map +1 -0
  255. package/dist/modules/auth/dto/password.dto.d.ts +25 -0
  256. package/dist/modules/auth/dto/password.dto.d.ts.map +1 -0
  257. package/dist/modules/auth/dto/password.dto.js +122 -0
  258. package/dist/modules/auth/dto/password.dto.js.map +1 -0
  259. package/dist/modules/auth/dto/register.dto.d.ts +19 -0
  260. package/dist/modules/auth/dto/register.dto.d.ts.map +1 -0
  261. package/dist/modules/auth/dto/register.dto.js +132 -0
  262. package/dist/modules/auth/dto/register.dto.js.map +1 -0
  263. package/dist/modules/auth/dto/token.dto.d.ts +15 -0
  264. package/dist/modules/auth/dto/token.dto.d.ts.map +1 -0
  265. package/dist/modules/auth/dto/token.dto.js +24 -0
  266. package/dist/modules/auth/dto/token.dto.js.map +1 -0
  267. package/dist/modules/auth/entities/index.d.ts +2 -0
  268. package/dist/modules/auth/entities/index.d.ts.map +1 -0
  269. package/dist/modules/auth/entities/index.js +18 -0
  270. package/dist/modules/auth/entities/index.js.map +1 -0
  271. package/dist/modules/auth/entities/password-reset-token.entity.d.ts +9 -0
  272. package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -0
  273. package/dist/modules/auth/entities/password-reset-token.entity.js +40 -0
  274. package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -0
  275. package/dist/modules/auth/index.d.ts +5 -0
  276. package/dist/modules/auth/index.d.ts.map +1 -0
  277. package/dist/modules/auth/index.js +21 -0
  278. package/dist/modules/auth/index.js.map +1 -0
  279. package/dist/modules/auth/providers/index.d.ts +5 -0
  280. package/dist/modules/auth/providers/index.d.ts.map +1 -0
  281. package/dist/modules/auth/providers/index.js +21 -0
  282. package/dist/modules/auth/providers/index.js.map +1 -0
  283. package/dist/modules/auth/providers/interfaces/auth-provider.interface.d.ts +37 -0
  284. package/dist/modules/auth/providers/interfaces/auth-provider.interface.d.ts.map +1 -0
  285. package/dist/modules/auth/providers/interfaces/auth-provider.interface.js +3 -0
  286. package/dist/modules/auth/providers/interfaces/auth-provider.interface.js.map +1 -0
  287. package/dist/modules/auth/providers/interfaces/index.d.ts +2 -0
  288. package/dist/modules/auth/providers/interfaces/index.d.ts.map +1 -0
  289. package/dist/modules/auth/providers/interfaces/index.js +18 -0
  290. package/dist/modules/auth/providers/interfaces/index.js.map +1 -0
  291. package/dist/modules/auth/providers/keycloak/index.d.ts +3 -0
  292. package/dist/modules/auth/providers/keycloak/index.d.ts.map +1 -0
  293. package/dist/modules/auth/providers/keycloak/index.js +19 -0
  294. package/dist/modules/auth/providers/keycloak/index.js.map +1 -0
  295. package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.d.ts +3 -0
  296. package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.d.ts.map +1 -0
  297. package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.js +80 -0
  298. package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.js.map +1 -0
  299. package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.d.ts +7 -0
  300. package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.d.ts.map +1 -0
  301. package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.js +54 -0
  302. package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.js.map +1 -0
  303. package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.d.ts +36 -0
  304. package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.d.ts.map +1 -0
  305. package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.js +188 -0
  306. package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.js.map +1 -0
  307. package/dist/modules/auth/providers/native/index.d.ts +3 -0
  308. package/dist/modules/auth/providers/native/index.d.ts.map +1 -0
  309. package/dist/modules/auth/providers/native/index.js +19 -0
  310. package/dist/modules/auth/providers/native/index.js.map +1 -0
  311. package/dist/modules/auth/providers/native/native.auth-provider.d.ts +19 -0
  312. package/dist/modules/auth/providers/native/native.auth-provider.d.ts.map +1 -0
  313. package/dist/modules/auth/providers/native/native.auth-provider.js +159 -0
  314. package/dist/modules/auth/providers/native/native.auth-provider.js.map +1 -0
  315. package/dist/modules/auth/providers/native/native.auth-provider.module.d.ts +3 -0
  316. package/dist/modules/auth/providers/native/native.auth-provider.module.d.ts.map +1 -0
  317. package/dist/modules/auth/providers/native/native.auth-provider.module.js +24 -0
  318. package/dist/modules/auth/providers/native/native.auth-provider.module.js.map +1 -0
  319. package/dist/modules/auth/providers/provider.registry.d.ts +14 -0
  320. package/dist/modules/auth/providers/provider.registry.d.ts.map +1 -0
  321. package/dist/modules/auth/providers/provider.registry.js +49 -0
  322. package/dist/modules/auth/providers/provider.registry.js.map +1 -0
  323. package/dist/modules/auth/services/account.service.d.ts +40 -0
  324. package/dist/modules/auth/services/account.service.d.ts.map +1 -0
  325. package/dist/modules/auth/services/account.service.js +165 -0
  326. package/dist/modules/auth/services/account.service.js.map +1 -0
  327. package/dist/modules/auth/services/index.d.ts +6 -0
  328. package/dist/modules/auth/services/index.d.ts.map +1 -0
  329. package/dist/modules/auth/services/index.js +22 -0
  330. package/dist/modules/auth/services/index.js.map +1 -0
  331. package/dist/modules/auth/services/login.service.d.ts +28 -0
  332. package/dist/modules/auth/services/login.service.d.ts.map +1 -0
  333. package/dist/modules/auth/services/login.service.js +210 -0
  334. package/dist/modules/auth/services/login.service.js.map +1 -0
  335. package/dist/modules/auth/services/otp-auth.service.d.ts +16 -0
  336. package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -0
  337. package/dist/modules/auth/services/otp-auth.service.js +75 -0
  338. package/dist/modules/auth/services/otp-auth.service.js.map +1 -0
  339. package/dist/modules/auth/services/password.service.d.ts +39 -0
  340. package/dist/modules/auth/services/password.service.d.ts.map +1 -0
  341. package/dist/modules/auth/services/password.service.js +213 -0
  342. package/dist/modules/auth/services/password.service.js.map +1 -0
  343. package/dist/modules/auth/services/registration.service.d.ts +30 -0
  344. package/dist/modules/auth/services/registration.service.d.ts.map +1 -0
  345. package/dist/modules/auth/services/registration.service.js +217 -0
  346. package/dist/modules/auth/services/registration.service.js.map +1 -0
  347. package/dist/modules/notifications/controllers/index.d.ts +2 -0
  348. package/dist/modules/notifications/controllers/index.d.ts.map +1 -0
  349. package/dist/modules/notifications/controllers/index.js +18 -0
  350. package/dist/modules/notifications/controllers/index.js.map +1 -0
  351. package/dist/modules/notifications/controllers/notifications.controller.d.ts +38 -0
  352. package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -0
  353. package/dist/modules/notifications/controllers/notifications.controller.js +140 -0
  354. package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -0
  355. package/dist/modules/notifications/dto/device.dto.d.ts +10 -0
  356. package/dist/modules/notifications/dto/device.dto.d.ts.map +1 -0
  357. package/dist/modules/notifications/dto/device.dto.js +38 -0
  358. package/dist/modules/notifications/dto/device.dto.js.map +1 -0
  359. package/dist/modules/notifications/dto/event-types.dto.d.ts +6 -0
  360. package/dist/modules/notifications/dto/event-types.dto.d.ts.map +1 -0
  361. package/dist/modules/notifications/dto/event-types.dto.js +10 -0
  362. package/dist/modules/notifications/dto/event-types.dto.js.map +1 -0
  363. package/dist/modules/notifications/dto/fcm.dto.d.ts +14 -0
  364. package/dist/modules/notifications/dto/fcm.dto.d.ts.map +1 -0
  365. package/dist/modules/notifications/dto/fcm.dto.js +3 -0
  366. package/dist/modules/notifications/dto/fcm.dto.js.map +1 -0
  367. package/dist/modules/notifications/dto/index.d.ts +6 -0
  368. package/dist/modules/notifications/dto/index.d.ts.map +1 -0
  369. package/dist/modules/notifications/dto/index.js +22 -0
  370. package/dist/modules/notifications/dto/index.js.map +1 -0
  371. package/dist/modules/notifications/dto/notification-query.dto.d.ts +8 -0
  372. package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -0
  373. package/dist/modules/notifications/dto/notification-query.dto.js +44 -0
  374. package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -0
  375. package/dist/modules/notifications/dto/user-device-token.dto.d.ts +9 -0
  376. package/dist/modules/notifications/dto/user-device-token.dto.d.ts.map +1 -0
  377. package/dist/modules/notifications/dto/user-device-token.dto.js +3 -0
  378. package/dist/modules/notifications/dto/user-device-token.dto.js.map +1 -0
  379. package/dist/modules/notifications/entities/device-token.entity.d.ts +17 -0
  380. package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -0
  381. package/dist/modules/notifications/entities/device-token.entity.js +62 -0
  382. package/dist/modules/notifications/entities/device-token.entity.js.map +1 -0
  383. package/dist/modules/notifications/entities/index.d.ts +3 -0
  384. package/dist/modules/notifications/entities/index.d.ts.map +1 -0
  385. package/dist/modules/notifications/entities/index.js +19 -0
  386. package/dist/modules/notifications/entities/index.js.map +1 -0
  387. package/dist/modules/notifications/entities/notification.entity.d.ts +21 -0
  388. package/dist/modules/notifications/entities/notification.entity.d.ts.map +1 -0
  389. package/dist/modules/notifications/entities/notification.entity.js +70 -0
  390. package/dist/modules/notifications/entities/notification.entity.js.map +1 -0
  391. package/dist/modules/notifications/firebase.module.d.ts +3 -0
  392. package/dist/modules/notifications/firebase.module.d.ts.map +1 -0
  393. package/dist/modules/notifications/firebase.module.js +25 -0
  394. package/dist/modules/notifications/firebase.module.js.map +1 -0
  395. package/dist/modules/notifications/notifications.manifest.d.ts +9 -0
  396. package/dist/modules/notifications/notifications.manifest.d.ts.map +1 -0
  397. package/dist/modules/notifications/notifications.manifest.js +37 -0
  398. package/dist/modules/notifications/notifications.manifest.js.map +1 -0
  399. package/dist/modules/notifications/notifications.module.d.ts +3 -0
  400. package/dist/modules/notifications/notifications.module.d.ts.map +1 -0
  401. package/dist/modules/notifications/notifications.module.js +32 -0
  402. package/dist/modules/notifications/notifications.module.js.map +1 -0
  403. package/dist/modules/notifications/services/fcm.service.d.ts +17 -0
  404. package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -0
  405. package/dist/modules/notifications/services/fcm.service.js +150 -0
  406. package/dist/modules/notifications/services/fcm.service.js.map +1 -0
  407. package/dist/modules/notifications/services/firebase.service.d.ts +19 -0
  408. package/dist/modules/notifications/services/firebase.service.d.ts.map +1 -0
  409. package/dist/modules/notifications/services/firebase.service.js +73 -0
  410. package/dist/modules/notifications/services/firebase.service.js.map +1 -0
  411. package/dist/modules/notifications/services/index.d.ts +4 -0
  412. package/dist/modules/notifications/services/index.d.ts.map +1 -0
  413. package/dist/modules/notifications/services/index.js +20 -0
  414. package/dist/modules/notifications/services/index.js.map +1 -0
  415. package/dist/modules/notifications/services/notifications.service.d.ts +19 -0
  416. package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -0
  417. package/dist/modules/notifications/services/notifications.service.js +97 -0
  418. package/dist/modules/notifications/services/notifications.service.js.map +1 -0
  419. package/dist/modules/otp/constants/otp.constants.d.ts +4 -0
  420. package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -0
  421. package/dist/modules/otp/constants/otp.constants.js +10 -0
  422. package/dist/modules/otp/constants/otp.constants.js.map +1 -0
  423. package/dist/modules/otp/email/email-provider.interface.d.ts +14 -0
  424. package/dist/modules/otp/email/email-provider.interface.d.ts.map +1 -0
  425. package/dist/modules/otp/email/email-provider.interface.js +15 -0
  426. package/dist/modules/otp/email/email-provider.interface.js.map +1 -0
  427. package/dist/modules/otp/email/email-proxy.service.d.ts +21 -0
  428. package/dist/modules/otp/email/email-proxy.service.d.ts.map +1 -0
  429. package/dist/modules/otp/email/email-proxy.service.js +67 -0
  430. package/dist/modules/otp/email/email-proxy.service.js.map +1 -0
  431. package/dist/modules/otp/email/email.module.d.ts +3 -0
  432. package/dist/modules/otp/email/email.module.d.ts.map +1 -0
  433. package/dist/modules/otp/email/email.module.js +33 -0
  434. package/dist/modules/otp/email/email.module.js.map +1 -0
  435. package/dist/modules/otp/email/index.d.ts +4 -0
  436. package/dist/modules/otp/email/index.d.ts.map +1 -0
  437. package/dist/modules/otp/email/index.js +20 -0
  438. package/dist/modules/otp/email/index.js.map +1 -0
  439. package/dist/modules/otp/email/providers/index.d.ts +5 -0
  440. package/dist/modules/otp/email/providers/index.d.ts.map +1 -0
  441. package/dist/modules/otp/email/providers/index.js +21 -0
  442. package/dist/modules/otp/email/providers/index.js.map +1 -0
  443. package/dist/modules/otp/email/providers/mailgun.provider.d.ts +10 -0
  444. package/dist/modules/otp/email/providers/mailgun.provider.d.ts.map +1 -0
  445. package/dist/modules/otp/email/providers/mailgun.provider.js +59 -0
  446. package/dist/modules/otp/email/providers/mailgun.provider.js.map +1 -0
  447. package/dist/modules/otp/email/providers/resend.provider.d.ts +10 -0
  448. package/dist/modules/otp/email/providers/resend.provider.d.ts.map +1 -0
  449. package/dist/modules/otp/email/providers/resend.provider.js +57 -0
  450. package/dist/modules/otp/email/providers/resend.provider.js.map +1 -0
  451. package/dist/modules/otp/email/providers/sendgrid.provider.d.ts +10 -0
  452. package/dist/modules/otp/email/providers/sendgrid.provider.d.ts.map +1 -0
  453. package/dist/modules/otp/email/providers/sendgrid.provider.js +58 -0
  454. package/dist/modules/otp/email/providers/sendgrid.provider.js.map +1 -0
  455. package/dist/modules/otp/email/providers/smtp.provider.d.ts +15 -0
  456. package/dist/modules/otp/email/providers/smtp.provider.d.ts.map +1 -0
  457. package/dist/modules/otp/email/providers/smtp.provider.js +115 -0
  458. package/dist/modules/otp/email/providers/smtp.provider.js.map +1 -0
  459. package/dist/modules/otp/index.d.ts +5 -0
  460. package/dist/modules/otp/index.d.ts.map +1 -0
  461. package/dist/modules/otp/index.js +21 -0
  462. package/dist/modules/otp/index.js.map +1 -0
  463. package/dist/modules/otp/interfaces/otp.service.interface.d.ts +26 -0
  464. package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -0
  465. package/dist/modules/otp/interfaces/otp.service.interface.js +7 -0
  466. package/dist/modules/otp/interfaces/otp.service.interface.js.map +1 -0
  467. package/dist/modules/otp/otp.module.d.ts +3 -0
  468. package/dist/modules/otp/otp.module.d.ts.map +1 -0
  469. package/dist/modules/otp/otp.module.js +36 -0
  470. package/dist/modules/otp/otp.module.js.map +1 -0
  471. package/dist/modules/otp/otp.service.d.ts +25 -0
  472. package/dist/modules/otp/otp.service.d.ts.map +1 -0
  473. package/dist/modules/otp/otp.service.js +146 -0
  474. package/dist/modules/otp/otp.service.js.map +1 -0
  475. package/dist/modules/otp/services/otp.rate-limiter.d.ts +13 -0
  476. package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -0
  477. package/dist/modules/otp/services/otp.rate-limiter.js +70 -0
  478. package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -0
  479. package/dist/modules/otp/services/otp.session.store.d.ts +28 -0
  480. package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -0
  481. package/dist/modules/otp/services/otp.session.store.js +226 -0
  482. package/dist/modules/otp/services/otp.session.store.js.map +1 -0
  483. package/dist/modules/otp/sms/index.d.ts +4 -0
  484. package/dist/modules/otp/sms/index.d.ts.map +1 -0
  485. package/dist/modules/otp/sms/index.js +20 -0
  486. package/dist/modules/otp/sms/index.js.map +1 -0
  487. package/dist/modules/otp/sms/providers/index.d.ts +5 -0
  488. package/dist/modules/otp/sms/providers/index.d.ts.map +1 -0
  489. package/dist/modules/otp/sms/providers/index.js +21 -0
  490. package/dist/modules/otp/sms/providers/index.js.map +1 -0
  491. package/dist/modules/otp/sms/providers/infobip.provider.d.ts +10 -0
  492. package/dist/modules/otp/sms/providers/infobip.provider.d.ts.map +1 -0
  493. package/dist/modules/otp/sms/providers/infobip.provider.js +61 -0
  494. package/dist/modules/otp/sms/providers/infobip.provider.js.map +1 -0
  495. package/dist/modules/otp/sms/providers/smart-sms.provider.d.ts +11 -0
  496. package/dist/modules/otp/sms/providers/smart-sms.provider.d.ts.map +1 -0
  497. package/dist/modules/otp/sms/providers/smart-sms.provider.js +56 -0
  498. package/dist/modules/otp/sms/providers/smart-sms.provider.js.map +1 -0
  499. package/dist/modules/otp/sms/providers/termii.provider.d.ts +11 -0
  500. package/dist/modules/otp/sms/providers/termii.provider.d.ts.map +1 -0
  501. package/dist/modules/otp/sms/providers/termii.provider.js +56 -0
  502. package/dist/modules/otp/sms/providers/termii.provider.js.map +1 -0
  503. package/dist/modules/otp/sms/providers/twilio.provider.d.ts +10 -0
  504. package/dist/modules/otp/sms/providers/twilio.provider.d.ts.map +1 -0
  505. package/dist/modules/otp/sms/providers/twilio.provider.js +59 -0
  506. package/dist/modules/otp/sms/providers/twilio.provider.js.map +1 -0
  507. package/dist/modules/otp/sms/sms-provider.interface.d.ts +12 -0
  508. package/dist/modules/otp/sms/sms-provider.interface.d.ts.map +1 -0
  509. package/dist/modules/otp/sms/sms-provider.interface.js +15 -0
  510. package/dist/modules/otp/sms/sms-provider.interface.js.map +1 -0
  511. package/dist/modules/otp/sms/sms-proxy.service.d.ts +21 -0
  512. package/dist/modules/otp/sms/sms-proxy.service.d.ts.map +1 -0
  513. package/dist/modules/otp/sms/sms-proxy.service.js +67 -0
  514. package/dist/modules/otp/sms/sms-proxy.service.js.map +1 -0
  515. package/dist/modules/otp/sms/sms.module.d.ts +3 -0
  516. package/dist/modules/otp/sms/sms.module.d.ts.map +1 -0
  517. package/dist/modules/otp/sms/sms.module.js +33 -0
  518. package/dist/modules/otp/sms/sms.module.js.map +1 -0
  519. package/dist/modules/otp/utils/otp.utils.d.ts +13 -0
  520. package/dist/modules/otp/utils/otp.utils.d.ts.map +1 -0
  521. package/dist/modules/otp/utils/otp.utils.js +57 -0
  522. package/dist/modules/otp/utils/otp.utils.js.map +1 -0
  523. package/dist/modules/profile/controllers/profile.controller.d.ts +14 -0
  524. package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -0
  525. package/dist/modules/profile/controllers/profile.controller.js +81 -0
  526. package/dist/modules/profile/controllers/profile.controller.js.map +1 -0
  527. package/dist/modules/profile/dto/profile.dto.d.ts +11 -0
  528. package/dist/modules/profile/dto/profile.dto.d.ts.map +1 -0
  529. package/dist/modules/profile/dto/profile.dto.js +50 -0
  530. package/dist/modules/profile/dto/profile.dto.js.map +1 -0
  531. package/dist/modules/profile/index.d.ts +3 -0
  532. package/dist/modules/profile/index.d.ts.map +1 -0
  533. package/dist/modules/profile/index.js +19 -0
  534. package/dist/modules/profile/index.js.map +1 -0
  535. package/dist/modules/profile/profile.module.d.ts +3 -0
  536. package/dist/modules/profile/profile.module.d.ts.map +1 -0
  537. package/dist/modules/profile/profile.module.js +26 -0
  538. package/dist/modules/profile/profile.module.js.map +1 -0
  539. package/dist/modules/profile/services/profile.service.d.ts +16 -0
  540. package/dist/modules/profile/services/profile.service.d.ts.map +1 -0
  541. package/dist/modules/profile/services/profile.service.js +64 -0
  542. package/dist/modules/profile/services/profile.service.js.map +1 -0
  543. package/dist/modules/roles/controllers/index.d.ts +5 -0
  544. package/dist/modules/roles/controllers/index.d.ts.map +1 -0
  545. package/dist/modules/roles/controllers/index.js +12 -0
  546. package/dist/modules/roles/controllers/index.js.map +1 -0
  547. package/dist/modules/roles/controllers/modules.controller.d.ts +14 -0
  548. package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -0
  549. package/dist/modules/roles/controllers/modules.controller.js +82 -0
  550. package/dist/modules/roles/controllers/modules.controller.js.map +1 -0
  551. package/dist/modules/roles/controllers/permissions.controller.d.ts +14 -0
  552. package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -0
  553. package/dist/modules/roles/controllers/permissions.controller.js +83 -0
  554. package/dist/modules/roles/controllers/permissions.controller.js.map +1 -0
  555. package/dist/modules/roles/controllers/roles.controller.d.ts +17 -0
  556. package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -0
  557. package/dist/modules/roles/controllers/roles.controller.js +93 -0
  558. package/dist/modules/roles/controllers/roles.controller.js.map +1 -0
  559. package/dist/modules/roles/controllers/user-roles.controller.d.ts +11 -0
  560. package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -0
  561. package/dist/modules/roles/controllers/user-roles.controller.js +94 -0
  562. package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -0
  563. package/dist/modules/roles/dto/index.d.ts +4 -0
  564. package/dist/modules/roles/dto/index.d.ts.map +1 -0
  565. package/dist/modules/roles/dto/index.js +20 -0
  566. package/dist/modules/roles/dto/index.js.map +1 -0
  567. package/dist/modules/roles/dto/module.dto.d.ts +10 -0
  568. package/dist/modules/roles/dto/module.dto.d.ts.map +1 -0
  569. package/dist/modules/roles/dto/module.dto.js +48 -0
  570. package/dist/modules/roles/dto/module.dto.js.map +1 -0
  571. package/dist/modules/roles/dto/permission.dto.d.ts +14 -0
  572. package/dist/modules/roles/dto/permission.dto.d.ts.map +1 -0
  573. package/dist/modules/roles/dto/permission.dto.js +60 -0
  574. package/dist/modules/roles/dto/permission.dto.js.map +1 -0
  575. package/dist/modules/roles/dto/role.dto.d.ts +15 -0
  576. package/dist/modules/roles/dto/role.dto.d.ts.map +1 -0
  577. package/dist/modules/roles/dto/role.dto.js +65 -0
  578. package/dist/modules/roles/dto/role.dto.js.map +1 -0
  579. package/dist/modules/roles/entities/index.d.ts +4 -0
  580. package/dist/modules/roles/entities/index.d.ts.map +1 -0
  581. package/dist/modules/roles/entities/index.js +10 -0
  582. package/dist/modules/roles/entities/index.js.map +1 -0
  583. package/dist/modules/roles/entities/module.entity.d.ts +9 -0
  584. package/dist/modules/roles/entities/module.entity.d.ts.map +1 -0
  585. package/dist/modules/roles/entities/module.entity.js +39 -0
  586. package/dist/modules/roles/entities/module.entity.js.map +1 -0
  587. package/dist/modules/roles/entities/permission.entity.d.ts +12 -0
  588. package/dist/modules/roles/entities/permission.entity.d.ts.map +1 -0
  589. package/dist/modules/roles/entities/permission.entity.js +49 -0
  590. package/dist/modules/roles/entities/permission.entity.js.map +1 -0
  591. package/dist/modules/roles/entities/role.entity.d.ts +11 -0
  592. package/dist/modules/roles/entities/role.entity.d.ts.map +1 -0
  593. package/dist/modules/roles/entities/role.entity.js +49 -0
  594. package/dist/modules/roles/entities/role.entity.js.map +1 -0
  595. package/dist/modules/roles/index.d.ts +7 -0
  596. package/dist/modules/roles/index.d.ts.map +1 -0
  597. package/dist/modules/roles/index.js +25 -0
  598. package/dist/modules/roles/index.js.map +1 -0
  599. package/dist/modules/roles/registry/discover-manifests.d.ts +3 -0
  600. package/dist/modules/roles/registry/discover-manifests.d.ts.map +1 -0
  601. package/dist/modules/roles/registry/discover-manifests.js +83 -0
  602. package/dist/modules/roles/registry/discover-manifests.js.map +1 -0
  603. package/dist/modules/roles/registry/index.d.ts +3 -0
  604. package/dist/modules/roles/registry/index.d.ts.map +1 -0
  605. package/dist/modules/roles/registry/index.js +8 -0
  606. package/dist/modules/roles/registry/index.js.map +1 -0
  607. package/dist/modules/roles/registry/sync-manifests-to-db.d.ts +7 -0
  608. package/dist/modules/roles/registry/sync-manifests-to-db.d.ts.map +1 -0
  609. package/dist/modules/roles/registry/sync-manifests-to-db.js +52 -0
  610. package/dist/modules/roles/registry/sync-manifests-to-db.js.map +1 -0
  611. package/dist/modules/roles/roles.manifest.d.ts +12 -0
  612. package/dist/modules/roles/roles.manifest.d.ts.map +1 -0
  613. package/dist/modules/roles/roles.manifest.js +51 -0
  614. package/dist/modules/roles/roles.manifest.js.map +1 -0
  615. package/dist/modules/roles/roles.module.d.ts +8 -0
  616. package/dist/modules/roles/roles.module.d.ts.map +1 -0
  617. package/dist/modules/roles/roles.module.js +43 -0
  618. package/dist/modules/roles/roles.module.js.map +1 -0
  619. package/dist/modules/roles/services/index.d.ts +6 -0
  620. package/dist/modules/roles/services/index.d.ts.map +1 -0
  621. package/dist/modules/roles/services/index.js +14 -0
  622. package/dist/modules/roles/services/index.js.map +1 -0
  623. package/dist/modules/roles/services/manifest-sync.service.d.ts +11 -0
  624. package/dist/modules/roles/services/manifest-sync.service.d.ts.map +1 -0
  625. package/dist/modules/roles/services/manifest-sync.service.js +38 -0
  626. package/dist/modules/roles/services/manifest-sync.service.js.map +1 -0
  627. package/dist/modules/roles/services/modules.service.d.ts +14 -0
  628. package/dist/modules/roles/services/modules.service.d.ts.map +1 -0
  629. package/dist/modules/roles/services/modules.service.js +69 -0
  630. package/dist/modules/roles/services/modules.service.js.map +1 -0
  631. package/dist/modules/roles/services/permissions.service.d.ts +14 -0
  632. package/dist/modules/roles/services/permissions.service.d.ts.map +1 -0
  633. package/dist/modules/roles/services/permissions.service.js +72 -0
  634. package/dist/modules/roles/services/permissions.service.js.map +1 -0
  635. package/dist/modules/roles/services/roles.service.d.ts +17 -0
  636. package/dist/modules/roles/services/roles.service.d.ts.map +1 -0
  637. package/dist/modules/roles/services/roles.service.js +100 -0
  638. package/dist/modules/roles/services/roles.service.js.map +1 -0
  639. package/dist/modules/roles/services/user-roles.service.d.ts +15 -0
  640. package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -0
  641. package/dist/modules/roles/services/user-roles.service.js +88 -0
  642. package/dist/modules/roles/services/user-roles.service.js.map +1 -0
  643. package/dist/modules/roles/types/manifest.types.d.ts +12 -0
  644. package/dist/modules/roles/types/manifest.types.d.ts.map +1 -0
  645. package/dist/modules/roles/types/manifest.types.js +3 -0
  646. package/dist/modules/roles/types/manifest.types.js.map +1 -0
  647. package/dist/modules/sessions/controllers/session.controller.d.ts +17 -0
  648. package/dist/modules/sessions/controllers/session.controller.d.ts.map +1 -0
  649. package/dist/modules/sessions/controllers/session.controller.js +95 -0
  650. package/dist/modules/sessions/controllers/session.controller.js.map +1 -0
  651. package/dist/modules/sessions/entities/refresh-token.entity.d.ts +21 -0
  652. package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -0
  653. package/dist/modules/sessions/entities/refresh-token.entity.js +77 -0
  654. package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -0
  655. package/dist/modules/sessions/index.d.ts +4 -0
  656. package/dist/modules/sessions/index.d.ts.map +1 -0
  657. package/dist/modules/sessions/index.js +20 -0
  658. package/dist/modules/sessions/index.js.map +1 -0
  659. package/dist/modules/sessions/services/token.service.d.ts +42 -0
  660. package/dist/modules/sessions/services/token.service.d.ts.map +1 -0
  661. package/dist/modules/sessions/services/token.service.js +253 -0
  662. package/dist/modules/sessions/services/token.service.js.map +1 -0
  663. package/dist/modules/sessions/sessions.module.d.ts +3 -0
  664. package/dist/modules/sessions/sessions.module.d.ts.map +1 -0
  665. package/dist/modules/sessions/sessions.module.js +28 -0
  666. package/dist/modules/sessions/sessions.module.js.map +1 -0
  667. package/dist/modules/settings/constants/settings.defaults.d.ts +60 -0
  668. package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -0
  669. package/dist/modules/settings/constants/settings.defaults.js +78 -0
  670. package/dist/modules/settings/constants/settings.defaults.js.map +1 -0
  671. package/dist/modules/settings/constants/settings.keys.d.ts +56 -0
  672. package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -0
  673. package/dist/modules/settings/constants/settings.keys.js +58 -0
  674. package/dist/modules/settings/constants/settings.keys.js.map +1 -0
  675. package/dist/modules/settings/controllers/settings.controller.d.ts +13 -0
  676. package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -0
  677. package/dist/modules/settings/controllers/settings.controller.js +91 -0
  678. package/dist/modules/settings/controllers/settings.controller.js.map +1 -0
  679. package/dist/modules/settings/dto/settings.dto.d.ts +4 -0
  680. package/dist/modules/settings/dto/settings.dto.d.ts.map +1 -0
  681. package/dist/modules/settings/dto/settings.dto.js +24 -0
  682. package/dist/modules/settings/dto/settings.dto.js.map +1 -0
  683. package/dist/modules/settings/entities/app-setting.entity.d.ts +13 -0
  684. package/dist/modules/settings/entities/app-setting.entity.d.ts.map +1 -0
  685. package/dist/modules/settings/entities/app-setting.entity.js +56 -0
  686. package/dist/modules/settings/entities/app-setting.entity.js.map +1 -0
  687. package/dist/modules/settings/index.d.ts +8 -0
  688. package/dist/modules/settings/index.d.ts.map +1 -0
  689. package/dist/modules/settings/index.js +24 -0
  690. package/dist/modules/settings/index.js.map +1 -0
  691. package/dist/modules/settings/services/settings.service.d.ts +23 -0
  692. package/dist/modules/settings/services/settings.service.d.ts.map +1 -0
  693. package/dist/modules/settings/services/settings.service.js +116 -0
  694. package/dist/modules/settings/services/settings.service.js.map +1 -0
  695. package/dist/modules/settings/settings.manifest.d.ts +7 -0
  696. package/dist/modules/settings/settings.manifest.d.ts.map +1 -0
  697. package/dist/modules/settings/settings.manifest.js +25 -0
  698. package/dist/modules/settings/settings.manifest.js.map +1 -0
  699. package/dist/modules/settings/settings.module.d.ts +3 -0
  700. package/dist/modules/settings/settings.module.d.ts.map +1 -0
  701. package/dist/modules/settings/settings.module.js +27 -0
  702. package/dist/modules/settings/settings.module.js.map +1 -0
  703. package/dist/modules/users/controllers/users.controller.d.ts +41 -0
  704. package/dist/modules/users/controllers/users.controller.d.ts.map +1 -0
  705. package/dist/modules/users/controllers/users.controller.js +273 -0
  706. package/dist/modules/users/controllers/users.controller.js.map +1 -0
  707. package/dist/modules/users/dto/user.dto.d.ts +52 -0
  708. package/dist/modules/users/dto/user.dto.d.ts.map +1 -0
  709. package/dist/modules/users/dto/user.dto.js +139 -0
  710. package/dist/modules/users/dto/user.dto.js.map +1 -0
  711. package/dist/modules/users/entities/user.entity.d.ts +33 -0
  712. package/dist/modules/users/entities/user.entity.d.ts.map +1 -0
  713. package/dist/modules/users/entities/user.entity.js +130 -0
  714. package/dist/modules/users/entities/user.entity.js.map +1 -0
  715. package/dist/modules/users/index.d.ts +7 -0
  716. package/dist/modules/users/index.d.ts.map +1 -0
  717. package/dist/modules/users/index.js +23 -0
  718. package/dist/modules/users/index.js.map +1 -0
  719. package/dist/modules/users/services/invite.service.d.ts +35 -0
  720. package/dist/modules/users/services/invite.service.d.ts.map +1 -0
  721. package/dist/modules/users/services/invite.service.js +236 -0
  722. package/dist/modules/users/services/invite.service.js.map +1 -0
  723. package/dist/modules/users/services/users.service.d.ts +40 -0
  724. package/dist/modules/users/services/users.service.d.ts.map +1 -0
  725. package/dist/modules/users/services/users.service.js +239 -0
  726. package/dist/modules/users/services/users.service.js.map +1 -0
  727. package/dist/modules/users/users.manifest.d.ts +12 -0
  728. package/dist/modules/users/users.manifest.d.ts.map +1 -0
  729. package/dist/modules/users/users.manifest.js +43 -0
  730. package/dist/modules/users/users.manifest.js.map +1 -0
  731. package/dist/modules/users/users.module.d.ts +3 -0
  732. package/dist/modules/users/users.module.d.ts.map +1 -0
  733. package/dist/modules/users/users.module.js +36 -0
  734. package/dist/modules/users/users.module.js.map +1 -0
  735. package/dist/tsconfig.build.tsbuildinfo +1 -0
  736. package/dist/tsconfig.tsbuildinfo +1 -0
  737. package/package.json +140 -0
@@ -0,0 +1,59 @@
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
+ var MailgunProvider_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.MailgunProvider = void 0;
14
+ const common_1 = require("@nestjs/common");
15
+ const settings_service_1 = require("../../../settings/services/settings.service");
16
+ const settings_keys_1 = require("../../../settings/constants/settings.keys");
17
+ const email_provider_interface_1 = require("../email-provider.interface");
18
+ let MailgunProvider = MailgunProvider_1 = class MailgunProvider extends email_provider_interface_1.IEmailProvider {
19
+ constructor(settings) {
20
+ super();
21
+ this.settings = settings;
22
+ this.logger = new common_1.Logger(MailgunProvider_1.name);
23
+ }
24
+ get isConfigured() {
25
+ return !!this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_MAILGUN_API_KEY);
26
+ }
27
+ async send(message) {
28
+ const apiKey = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_MAILGUN_API_KEY);
29
+ const domain = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_MAILGUN_DOMAIN);
30
+ const fromAddress = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_FROM_ADDRESS);
31
+ const body = new URLSearchParams({
32
+ from: fromAddress,
33
+ to: message.to,
34
+ subject: message.subject,
35
+ ...(message.text && { text: message.text }),
36
+ ...(message.html && { html: message.html }),
37
+ });
38
+ const response = await fetch(`https://api.mailgun.net/v3/${domain}/messages`, {
39
+ method: 'POST',
40
+ headers: {
41
+ Authorization: `Basic ${Buffer.from(`api:${apiKey}`).toString('base64')}`,
42
+ 'Content-Type': 'application/x-www-form-urlencoded',
43
+ },
44
+ body,
45
+ });
46
+ if (!response.ok) {
47
+ const error = await response.text();
48
+ this.logger.error(`Mailgun send failed [${response.status}]: ${error}`);
49
+ throw new email_provider_interface_1.EmailDeliveryError(`Mailgun email delivery failed: ${response.status}`, response.status);
50
+ }
51
+ this.logger.debug(`Mailgun email sent to ${message.to}`);
52
+ }
53
+ };
54
+ exports.MailgunProvider = MailgunProvider;
55
+ exports.MailgunProvider = MailgunProvider = MailgunProvider_1 = __decorate([
56
+ (0, common_1.Injectable)(),
57
+ __metadata("design:paramtypes", [settings_service_1.SettingsService])
58
+ ], MailgunProvider);
59
+ //# sourceMappingURL=mailgun.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mailgun.provider.js","sourceRoot":"","sources":["../../../../../modules/otp/email/providers/mailgun.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,kFAA8E;AAC9E,6EAAyE;AACzE,0EAA+F;AAGxF,IAAM,eAAe,uBAArB,MAAM,eAAgB,SAAQ,yCAAc;IAGlD,YAA6B,QAAyB;QACrD,KAAK,EA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E,EAAE,CAAC;YAClB,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,QAAQ,CAAC,MAAM,MAAM,KAAK,EAAE,CAAC,CAAC;YACxE,MAAM,IAAI,6CAAkB,CAC3B,kCAAkC,QAAQ,CAAC,MAAM,EAAE,EACnD,QAAQ,CAAC,MAAM,CACf,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1D,CAAC;CACD,CAAA;AA5CY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAI2B,kCAAe;GAH1C,eAAe,CA4C3B"}
@@ -0,0 +1,10 @@
1
+ import { SettingsService } from '../../../settings/services/settings.service';
2
+ import { EmailMessage, IEmailProvider } from '../email-provider.interface';
3
+ export declare class ResendProvider extends IEmailProvider {
4
+ private readonly settings;
5
+ private readonly logger;
6
+ constructor(settings: SettingsService);
7
+ get isConfigured(): boolean;
8
+ send(message: EmailMessage): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=resend.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resend.provider.d.ts","sourceRoot":"","sources":["../../../../../modules/otp/email/providers/resend.provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E,OAAO,EAAsB,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE/F,qBACa,cAAe,SAAQ,cAAc;IAGrC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;gBAE7B,QAAQ,EAAE,eAAe;IAItD,IAAI,YAAY,IAAI,OAAO,CAE1B;IAEK,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CA8BhD"}
@@ -0,0 +1,57 @@
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
+ var ResendProvider_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.ResendProvider = void 0;
14
+ const common_1 = require("@nestjs/common");
15
+ const settings_service_1 = require("../../../settings/services/settings.service");
16
+ const settings_keys_1 = require("../../../settings/constants/settings.keys");
17
+ const email_provider_interface_1 = require("../email-provider.interface");
18
+ let ResendProvider = ResendProvider_1 = class ResendProvider extends email_provider_interface_1.IEmailProvider {
19
+ constructor(settings) {
20
+ super();
21
+ this.settings = settings;
22
+ this.logger = new common_1.Logger(ResendProvider_1.name);
23
+ }
24
+ get isConfigured() {
25
+ return !!this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_RESEND_API_KEY);
26
+ }
27
+ async send(message) {
28
+ const apiKey = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_RESEND_API_KEY);
29
+ const fromAddress = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_FROM_ADDRESS);
30
+ const response = await fetch('https://api.resend.com/emails', {
31
+ method: 'POST',
32
+ headers: {
33
+ Authorization: `Bearer ${apiKey}`,
34
+ 'Content-Type': 'application/json',
35
+ },
36
+ body: JSON.stringify({
37
+ from: fromAddress,
38
+ to: [message.to],
39
+ subject: message.subject,
40
+ html: message.html,
41
+ text: message.text,
42
+ }),
43
+ });
44
+ if (!response.ok) {
45
+ const error = await response.text();
46
+ this.logger.error(`Resend send failed [${response.status}]: ${error}`);
47
+ throw new email_provider_interface_1.EmailDeliveryError(`Resend email delivery failed: ${response.status}`, response.status);
48
+ }
49
+ this.logger.debug(`Resend email sent to ${message.to}`);
50
+ }
51
+ };
52
+ exports.ResendProvider = ResendProvider;
53
+ exports.ResendProvider = ResendProvider = ResendProvider_1 = __decorate([
54
+ (0, common_1.Injectable)(),
55
+ __metadata("design:paramtypes", [settings_service_1.SettingsService])
56
+ ], ResendProvider);
57
+ //# sourceMappingURL=resend.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resend.provider.js","sourceRoot":"","sources":["../../../../../modules/otp/email/providers/resend.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,kFAA8E;AAC9E,6EAAyE;AACzE,0EAA+F;AAGxF,IAAM,cAAc,sBAApB,MAAM,cAAe,SAAQ,yCAAc;IAGjD,YAA6B,QAAyB;QACrD,KAAK,EAAE,CAAC;QADoB,aAAQ,GAAR,QAAQ,CAAiB;QAFrC,WAAM,GAAG,IAAI,eAAM,CAAC,gBAAc,CAAC,IAAI,CAAC,CAAC;IAI1D,CAAC;IAED,IAAI,YAAY;QACf,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAS,4BAAY,CAAC,oBAAoB,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAqB;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAS,4BAAY,CAAC,oBAAoB,CAAC,CAAC;QAC5E,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAS,4BAAY,CAAC,kBAAkB,CAAC,CAAC;QAE/E,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,+BAA+B,EAAE;YAC7D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACR,aAAa,EAAE,UAAU,MAAM,EAAE;gBACjC,cAAc,EAAE,kBAAkB;aAClC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACpB,IAAI,EAAE,WAAW;gBACjB,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;gBAChB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,OAAO,CAAC,IAAI;aAClB,CAAC;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YAClB,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,QAAQ,CAAC,MAAM,MAAM,KAAK,EAAE,CAAC,CAAC;YACvE,MAAM,IAAI,6CAAkB,CAC3B,iCAAiC,QAAQ,CAAC,MAAM,EAAE,EAClD,QAAQ,CAAC,MAAM,CACf,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACD,CAAA;AAzCY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAI2B,kCAAe;GAH1C,cAAc,CAyC1B"}
@@ -0,0 +1,10 @@
1
+ import { SettingsService } from '../../../settings/services/settings.service';
2
+ import { EmailMessage, IEmailProvider } from '../email-provider.interface';
3
+ export declare class SendGridProvider extends IEmailProvider {
4
+ private readonly settings;
5
+ private readonly logger;
6
+ constructor(settings: SettingsService);
7
+ get isConfigured(): boolean;
8
+ send(message: EmailMessage): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=sendgrid.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendgrid.provider.d.ts","sourceRoot":"","sources":["../../../../../modules/otp/email/providers/sendgrid.provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E,OAAO,EAAsB,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE/F,qBACa,gBAAiB,SAAQ,cAAc;IAGvC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;gBAE/B,QAAQ,EAAE,eAAe;IAItD,IAAI,YAAY,IAAI,OAAO,CAE1B;IAEK,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CA+BhD"}
@@ -0,0 +1,58 @@
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
+ var SendGridProvider_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.SendGridProvider = void 0;
14
+ const common_1 = require("@nestjs/common");
15
+ const settings_service_1 = require("../../../settings/services/settings.service");
16
+ const settings_keys_1 = require("../../../settings/constants/settings.keys");
17
+ const email_provider_interface_1 = require("../email-provider.interface");
18
+ let SendGridProvider = SendGridProvider_1 = class SendGridProvider extends email_provider_interface_1.IEmailProvider {
19
+ constructor(settings) {
20
+ super();
21
+ this.settings = settings;
22
+ this.logger = new common_1.Logger(SendGridProvider_1.name);
23
+ }
24
+ get isConfigured() {
25
+ return !!this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_SENDGRID_API_KEY);
26
+ }
27
+ async send(message) {
28
+ const apiKey = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_SENDGRID_API_KEY);
29
+ const fromAddress = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_FROM_ADDRESS);
30
+ const response = await fetch('https://api.sendgrid.com/v3/mail/send', {
31
+ method: 'POST',
32
+ headers: {
33
+ Authorization: `Bearer ${apiKey}`,
34
+ 'Content-Type': 'application/json',
35
+ },
36
+ body: JSON.stringify({
37
+ personalizations: [{ to: [{ email: message.to }], subject: message.subject }],
38
+ from: { email: fromAddress },
39
+ content: [
40
+ ...(message.text ? [{ type: 'text/plain', value: message.text }] : []),
41
+ ...(message.html ? [{ type: 'text/html', value: message.html }] : []),
42
+ ],
43
+ }),
44
+ });
45
+ if (!response.ok) {
46
+ const error = await response.text();
47
+ this.logger.error(`SendGrid send failed [${response.status}]: ${error}`);
48
+ throw new email_provider_interface_1.EmailDeliveryError(`SendGrid email delivery failed: ${response.status}`, response.status);
49
+ }
50
+ this.logger.debug(`SendGrid email sent to ${message.to}`);
51
+ }
52
+ };
53
+ exports.SendGridProvider = SendGridProvider;
54
+ exports.SendGridProvider = SendGridProvider = SendGridProvider_1 = __decorate([
55
+ (0, common_1.Injectable)(),
56
+ __metadata("design:paramtypes", [settings_service_1.SettingsService])
57
+ ], SendGridProvider);
58
+ //# sourceMappingURL=sendgrid.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendgrid.provider.js","sourceRoot":"","sources":["../../../../../modules/otp/email/providers/sendgrid.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,kFAA8E;AAC9E,6EAAyE;AACzE,0EAA+F;AAGxF,IAAM,gBAAgB,wBAAtB,MAAM,gBAAiB,SAAQ,yCAAc;IAGnD,YAA6B,QAAyB;QACrD,KAAK,EAAE,CAAC;QADoB,aAAQ,GAAR,QAAQ,CAAiB;QAF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,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YAClB,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,QAAQ,CAAC,MAAM,MAAM,KAAK,EAAE,CAAC,CAAC;YACzE,MAAM,IAAI,6CAAkB,CAC3B,mCAAmC,QAAQ,CAAC,MAAM,EAAE,EACpD,QAAQ,CAAC,MAAM,CACf,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3D,CAAC;CACD,CAAA;AA1CY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAI2B,kCAAe;GAH1C,gBAAgB,CA0C5B"}
@@ -0,0 +1,15 @@
1
+ import { OnModuleDestroy } from '@nestjs/common';
2
+ import { SettingsService } from '../../../settings/services/settings.service';
3
+ import { EmailMessage, IEmailProvider } from '../email-provider.interface';
4
+ export declare class SmtpProvider extends IEmailProvider implements OnModuleDestroy {
5
+ private readonly settings;
6
+ private readonly logger;
7
+ private transporter;
8
+ private snapshot;
9
+ constructor(settings: SettingsService);
10
+ get isConfigured(): boolean;
11
+ onModuleDestroy(): void;
12
+ send(message: EmailMessage): Promise<void>;
13
+ private getTransporter;
14
+ }
15
+ //# sourceMappingURL=smtp.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smtp.provider.d.ts","sourceRoot":"","sources":["../../../../../modules/otp/email/providers/smtp.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E,OAAO,EAAsB,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAS/F,qBACa,YAAa,SAAQ,cAAe,YAAW,eAAe;IAM9D,OAAO,CAAC,QAAQ,CAAC,QAAQ;IALrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IAExD,OAAO,CAAC,WAAW,CAAuC;IAC1D,OAAO,CAAC,QAAQ,CAAkE;gBAErD,QAAQ,EAAE,eAAe;IAItD,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,eAAe,IAAI,IAAI;IAIjB,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BhD,OAAO,CAAC,cAAc;CA4BtB"}
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ var __metadata = (this && this.__metadata) || function (k, v) {
42
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
+ };
44
+ var SmtpProvider_1;
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.SmtpProvider = void 0;
47
+ const common_1 = require("@nestjs/common");
48
+ const nodemailer = __importStar(require("nodemailer"));
49
+ const settings_service_1 = require("../../../settings/services/settings.service");
50
+ const settings_keys_1 = require("../../../settings/constants/settings.keys");
51
+ const email_provider_interface_1 = require("../email-provider.interface");
52
+ let SmtpProvider = SmtpProvider_1 = class SmtpProvider extends email_provider_interface_1.IEmailProvider {
53
+ constructor(settings) {
54
+ super();
55
+ this.settings = settings;
56
+ this.logger = new common_1.Logger(SmtpProvider_1.name);
57
+ this.transporter = null;
58
+ this.snapshot = { host: '', port: 0, user: '', pass: '' };
59
+ }
60
+ get isConfigured() {
61
+ return !!this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_SMTP_HOST);
62
+ }
63
+ onModuleDestroy() {
64
+ this.transporter?.close();
65
+ }
66
+ async send(message) {
67
+ const transporter = this.getTransporter();
68
+ const fromAddress = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_FROM_ADDRESS);
69
+ try {
70
+ await transporter.sendMail({
71
+ from: fromAddress,
72
+ to: message.to,
73
+ subject: message.subject,
74
+ text: message.text,
75
+ html: message.html,
76
+ });
77
+ this.logger.debug(`SMTP email sent to ${message.to}`);
78
+ }
79
+ catch (err) {
80
+ const msg = err instanceof Error ? err.message : String(err);
81
+ this.logger.error(`SMTP send failed: ${msg}`);
82
+ throw new email_provider_interface_1.EmailDeliveryError(`SMTP email delivery failed: ${msg}`, null);
83
+ }
84
+ }
85
+ getTransporter() {
86
+ const host = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_SMTP_HOST);
87
+ const port = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_SMTP_PORT);
88
+ const user = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_SMTP_USER);
89
+ const pass = this.settings.get(settings_keys_1.SETTING_KEYS.EMAIL_SMTP_PASS);
90
+ const changed = !this.transporter ||
91
+ host !== this.snapshot.host ||
92
+ port !== this.snapshot.port ||
93
+ user !== this.snapshot.user ||
94
+ pass !== this.snapshot.pass;
95
+ if (changed) {
96
+ this.transporter?.close();
97
+ this.snapshot = { host, port, user, pass };
98
+ this.transporter = nodemailer.createTransport({
99
+ pool: true,
100
+ host,
101
+ port,
102
+ secure: port === 465,
103
+ auth: user ? { user, pass } : undefined,
104
+ });
105
+ this.logger.debug(`SMTP transporter (re)created for ${host}:${port}`);
106
+ }
107
+ return this.transporter;
108
+ }
109
+ };
110
+ exports.SmtpProvider = SmtpProvider;
111
+ exports.SmtpProvider = SmtpProvider = SmtpProvider_1 = __decorate([
112
+ (0, common_1.Injectable)(),
113
+ __metadata("design:paramtypes", [settings_service_1.SettingsService])
114
+ ], SmtpProvider);
115
+ //# sourceMappingURL=smtp.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smtp.provider.js","sourceRoot":"","sources":["../../../../../modules/otp/email/providers/smtp.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,uDAAyC;AACzC,kFAA8E;AAC9E,6EAAyE;AACzE,0EAA+F;AAUxF,IAAM,YAAY,oBAAlB,MAAM,YAAa,SAAQ,yCAAc;IAM/C,YAA6B,QAAyB;QACrD,KAAK,EAAE,CAAC;QADoB,a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EAAE,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,IAAI,CAAC,WAAY,CAAC;IAC1B,CAAC;CACD,CAAA;AAxEY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAO2B,kCAAe;GAN1C,YAAY,CAwExB"}
@@ -0,0 +1,5 @@
1
+ export * from './otp.module';
2
+ export * from './otp.service';
3
+ export * from './interfaces/otp.service.interface';
4
+ export * from './constants/otp.constants';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/otp/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./otp.module"), exports);
18
+ __exportStar(require("./otp.service"), exports);
19
+ __exportStar(require("./interfaces/otp.service.interface"), exports);
20
+ __exportStar(require("./constants/otp.constants"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../modules/otp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,gDAA8B;AAC9B,qEAAmD;AACnD,4DAA0C"}
@@ -0,0 +1,26 @@
1
+ export interface OtpGenerateResult {
2
+ success: boolean;
3
+ message: string;
4
+ data: {
5
+ verificationId: string;
6
+ expiresAt: number;
7
+ resendIn: number;
8
+ };
9
+ }
10
+ export interface OtpVerifyResult {
11
+ success: boolean;
12
+ message: string;
13
+ data: {
14
+ subject: string;
15
+ channel: 'sms' | 'email';
16
+ verificationToken?: string;
17
+ expiresAt?: number;
18
+ hasAccount?: boolean;
19
+ };
20
+ }
21
+ export declare abstract class IOtpService {
22
+ abstract generateOtp(identifier: string, channel: 'sms' | 'email'): Promise<OtpGenerateResult>;
23
+ abstract verifyOtp(verificationId: string, otp: string): Promise<OtpVerifyResult>;
24
+ abstract resendOtp(verificationId: string): Promise<OtpGenerateResult>;
25
+ }
26
+ //# sourceMappingURL=otp.service.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otp.service.interface.d.ts","sourceRoot":"","sources":["../../../../modules/otp/interfaces/otp.service.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAIjC,OAAO,EAAE,OAAO,CAAC;IAIjB,OAAO,EAAE,MAAM,CAAC;IAIhB,IAAI,EAAE;QAIL,cAAc,EAAE,MAAM,CAAC;QAIvB,SAAS,EAAE,MAAM,CAAC;QAIlB,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;CACF;AAED,MAAM,WAAW,eAAe;IAI/B,OAAO,EAAE,OAAO,CAAC;IAIjB,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE;QAIL,OAAO,EAAE,MAAM,CAAC;QAIhB,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC;QAIzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAI3B,SAAS,CAAC,EAAE,MAAM,CAAC;QAInB,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;CACF;AAED,8BAAsB,WAAW;IAMhC,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAO9F,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAOjF,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CACtE"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IOtpService = void 0;
4
+ class IOtpService {
5
+ }
6
+ exports.IOtpService = IOtpService;
7
+ //# sourceMappingURL=otp.service.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otp.service.interface.js","sourceRoot":"","sources":["../../../../modules/otp/interfaces/otp.service.interface.ts"],"names":[],"mappings":";;;AA8DA,MAAsB,WAAW;CAqBhC;AArBD,kCAqBC"}
@@ -0,0 +1,3 @@
1
+ export declare class OtpModule {
2
+ }
3
+ //# sourceMappingURL=otp.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otp.module.d.ts","sourceRoot":"","sources":["../../../modules/otp/otp.module.ts"],"names":[],"mappings":"AASA,qBAea,SAAS;CAAG"}
@@ -0,0 +1,36 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.OtpModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const otp_service_1 = require("./otp.service");
12
+ const otp_session_store_1 = require("./services/otp.session.store");
13
+ const otp_rate_limiter_1 = require("./services/otp.rate-limiter");
14
+ const otp_service_interface_1 = require("./interfaces/otp.service.interface");
15
+ const jobs_1 = require("../../jobs");
16
+ const sms_module_1 = require("./sms/sms.module");
17
+ const email_module_1 = require("./email/email.module");
18
+ let OtpModule = class OtpModule {
19
+ };
20
+ exports.OtpModule = OtpModule;
21
+ exports.OtpModule = OtpModule = __decorate([
22
+ (0, common_1.Module)({
23
+ imports: [jobs_1.JobsModule.register(), sms_module_1.SmsModule, email_module_1.EmailModule],
24
+ providers: [
25
+ otp_session_store_1.OtpSessionStore,
26
+ otp_rate_limiter_1.OtpRateLimiter,
27
+ otp_service_1.OtpService,
28
+ {
29
+ provide: otp_service_interface_1.IOtpService,
30
+ useExisting: otp_service_1.OtpService,
31
+ },
32
+ ],
33
+ exports: [otp_service_interface_1.IOtpService],
34
+ })
35
+ ], OtpModule);
36
+ //# sourceMappingURL=otp.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otp.module.js","sourceRoot":"","sources":["../../../modules/otp/otp.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAA2C;AAC3C,oEAA+D;AAC/D,kEAA6D;AAC7D,8EAAiE;AACjE,qCAAwC;AACxC,iDAA6C;AAC7C,uDAAmD;AAiB5C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAfrB,IAAA,eAAM,EAAC;QAGP,OAAO,EAAE,CAAC,iBAAU,CAAC,QAAQ,EAAE,EAAE,sBAAS,EAAE,0BAAW,CAAC;QACxD,SAAS,EAAE;YACV,mCAAe;YACf,iCAAc;YACd,wBAAU;YACV;gBACC,OAAO,EAAE,mCAAW;gBACpB,WAAW,EAAE,wBAAU;aACvB;SACD;QACD,OAAO,EAAE,CAAC,mCAAW,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
@@ -0,0 +1,25 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import IORedis from 'ioredis';
3
+ import { IOtpService, OtpGenerateResult, OtpVerifyResult } from './interfaces/otp.service.interface';
4
+ import { JobsQueue } from '../../jobs';
5
+ import { OtpSessionStore } from './services/otp.session.store';
6
+ import { OtpRateLimiter } from './services/otp.rate-limiter';
7
+ import { SettingsService } from '../settings/services/settings.service';
8
+ export declare class OtpService extends IOtpService {
9
+ private readonly redis;
10
+ private readonly jobsQueue;
11
+ private readonly sessionStore;
12
+ private readonly rateLimiter;
13
+ private readonly configService;
14
+ private readonly settingsService;
15
+ private readonly logger;
16
+ constructor(redis: IORedis | null, jobsQueue: JobsQueue | null, sessionStore: OtpSessionStore, rateLimiter: OtpRateLimiter, configService: ConfigService, settingsService: SettingsService);
17
+ generateOtp(identifier: string, channel: 'sms' | 'email'): Promise<OtpGenerateResult>;
18
+ verifyOtp(sessionToken: string, code: string): Promise<OtpVerifyResult>;
19
+ resendOtp(sessionToken: string): Promise<OtpGenerateResult>;
20
+ private assertEnabled;
21
+ private assertValidUuid;
22
+ private getTestCredentials;
23
+ private auditLog;
24
+ }
25
+ //# sourceMappingURL=otp.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otp.service.d.ts","sourceRoot":"","sources":["../../../modules/otp/otp.service.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EA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