@udhuong/admin-core 0.1.1 → 0.1.3

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 (930) hide show
  1. package/dist/server/admin-core-options.interface.d.ts +53 -0
  2. package/dist/server/admin-core-options.interface.d.ts.map +1 -0
  3. package/dist/server/admin-core-options.interface.js +5 -0
  4. package/dist/server/admin-core-options.interface.js.map +1 -0
  5. package/dist/server/admin-core.module.d.ts +8 -0
  6. package/dist/server/admin-core.module.d.ts.map +1 -0
  7. package/dist/server/admin-core.module.js +292 -0
  8. package/dist/server/admin-core.module.js.map +1 -0
  9. package/dist/server/auth/application/actions/auth/change-password.action.d.ts +12 -0
  10. package/dist/server/auth/application/actions/auth/change-password.action.d.ts.map +1 -0
  11. package/dist/server/auth/application/actions/auth/change-password.action.js +56 -0
  12. package/dist/server/auth/application/actions/auth/change-password.action.js.map +1 -0
  13. package/dist/server/auth/application/actions/auth/client-credentials.action.d.ts +16 -0
  14. package/dist/server/auth/application/actions/auth/client-credentials.action.d.ts.map +1 -0
  15. package/dist/server/auth/application/actions/auth/client-credentials.action.js +101 -0
  16. package/dist/server/auth/application/actions/auth/client-credentials.action.js.map +1 -0
  17. package/dist/server/auth/application/actions/auth/forgot-password.action.d.ts +12 -0
  18. package/dist/server/auth/application/actions/auth/forgot-password.action.d.ts.map +1 -0
  19. package/dist/server/auth/application/actions/auth/forgot-password.action.js +50 -0
  20. package/dist/server/auth/application/actions/auth/forgot-password.action.js.map +1 -0
  21. package/dist/server/auth/application/actions/auth/get-roles-permissions.action.d.ts +13 -0
  22. package/dist/server/auth/application/actions/auth/get-roles-permissions.action.d.ts.map +1 -0
  23. package/dist/server/auth/application/actions/auth/get-roles-permissions.action.js +53 -0
  24. package/dist/server/auth/application/actions/auth/get-roles-permissions.action.js.map +1 -0
  25. package/dist/server/auth/application/actions/auth/get-user-profile.action.d.ts +10 -0
  26. package/dist/server/auth/application/actions/auth/get-user-profile.action.d.ts.map +1 -0
  27. package/dist/server/auth/application/actions/auth/get-user-profile.action.js +43 -0
  28. package/dist/server/auth/application/actions/auth/get-user-profile.action.js.map +1 -0
  29. package/dist/server/auth/application/actions/auth/index.d.ts +14 -0
  30. package/dist/server/auth/application/actions/auth/index.d.ts.map +1 -0
  31. package/dist/server/auth/application/actions/auth/index.js +30 -0
  32. package/dist/server/auth/application/actions/auth/index.js.map +1 -0
  33. package/dist/server/auth/application/actions/auth/login.action.d.ts +23 -0
  34. package/dist/server/auth/application/actions/auth/login.action.d.ts.map +1 -0
  35. package/dist/server/auth/application/actions/auth/login.action.js +175 -0
  36. package/dist/server/auth/application/actions/auth/login.action.js.map +1 -0
  37. package/dist/server/auth/application/actions/auth/logout.action.d.ts +8 -0
  38. package/dist/server/auth/application/actions/auth/logout.action.d.ts.map +1 -0
  39. package/dist/server/auth/application/actions/auth/logout.action.js +48 -0
  40. package/dist/server/auth/application/actions/auth/logout.action.js.map +1 -0
  41. package/dist/server/auth/application/actions/auth/refresh-token.action.d.ts +24 -0
  42. package/dist/server/auth/application/actions/auth/refresh-token.action.d.ts.map +1 -0
  43. package/dist/server/auth/application/actions/auth/refresh-token.action.js +165 -0
  44. package/dist/server/auth/application/actions/auth/refresh-token.action.js.map +1 -0
  45. package/dist/server/auth/application/actions/auth/register.action.d.ts +16 -0
  46. package/dist/server/auth/application/actions/auth/register.action.d.ts.map +1 -0
  47. package/dist/server/auth/application/actions/auth/register.action.js +83 -0
  48. package/dist/server/auth/application/actions/auth/register.action.js.map +1 -0
  49. package/dist/server/auth/application/actions/auth/resend-verification-email.action.d.ts +12 -0
  50. package/dist/server/auth/application/actions/auth/resend-verification-email.action.d.ts.map +1 -0
  51. package/dist/server/auth/application/actions/auth/resend-verification-email.action.js +61 -0
  52. package/dist/server/auth/application/actions/auth/resend-verification-email.action.js.map +1 -0
  53. package/dist/server/auth/application/actions/auth/reset-password.action.d.ts +10 -0
  54. package/dist/server/auth/application/actions/auth/reset-password.action.d.ts.map +1 -0
  55. package/dist/server/auth/application/actions/auth/reset-password.action.js +52 -0
  56. package/dist/server/auth/application/actions/auth/reset-password.action.js.map +1 -0
  57. package/dist/server/auth/application/actions/auth/update-profile.action.d.ts +8 -0
  58. package/dist/server/auth/application/actions/auth/update-profile.action.d.ts.map +1 -0
  59. package/dist/server/auth/application/actions/auth/update-profile.action.js +63 -0
  60. package/dist/server/auth/application/actions/auth/update-profile.action.js.map +1 -0
  61. package/dist/server/auth/application/actions/auth/verify-email.action.d.ts +9 -0
  62. package/dist/server/auth/application/actions/auth/verify-email.action.d.ts.map +1 -0
  63. package/dist/server/auth/application/actions/auth/verify-email.action.js +54 -0
  64. package/dist/server/auth/application/actions/auth/verify-email.action.js.map +1 -0
  65. package/dist/server/auth/application/actions/index.d.ts +5 -0
  66. package/dist/server/auth/application/actions/index.d.ts.map +1 -0
  67. package/dist/server/auth/application/actions/index.js +21 -0
  68. package/dist/server/auth/application/actions/index.js.map +1 -0
  69. package/dist/server/auth/application/actions/session/get-active-sessions.action.d.ts +8 -0
  70. package/dist/server/auth/application/actions/session/get-active-sessions.action.d.ts.map +1 -0
  71. package/dist/server/auth/application/actions/session/get-active-sessions.action.js +40 -0
  72. package/dist/server/auth/application/actions/session/get-active-sessions.action.js.map +1 -0
  73. package/dist/server/auth/application/actions/session/index.d.ts +4 -0
  74. package/dist/server/auth/application/actions/session/index.d.ts.map +1 -0
  75. package/dist/server/auth/application/actions/session/index.js +20 -0
  76. package/dist/server/auth/application/actions/session/index.js.map +1 -0
  77. package/dist/server/auth/application/actions/session/revoke-all-sessions.action.d.ts +9 -0
  78. package/dist/server/auth/application/actions/session/revoke-all-sessions.action.d.ts.map +1 -0
  79. package/dist/server/auth/application/actions/session/revoke-all-sessions.action.js +54 -0
  80. package/dist/server/auth/application/actions/session/revoke-all-sessions.action.js.map +1 -0
  81. package/dist/server/auth/application/actions/session/revoke-session.action.d.ts +9 -0
  82. package/dist/server/auth/application/actions/session/revoke-session.action.d.ts.map +1 -0
  83. package/dist/server/auth/application/actions/session/revoke-session.action.js +52 -0
  84. package/dist/server/auth/application/actions/session/revoke-session.action.js.map +1 -0
  85. package/dist/server/auth/application/actions/social/index.d.ts +2 -0
  86. package/dist/server/auth/application/actions/social/index.d.ts.map +1 -0
  87. package/dist/server/auth/application/actions/social/index.js +18 -0
  88. package/dist/server/auth/application/actions/social/index.js.map +1 -0
  89. package/dist/server/auth/application/actions/social/social-login.action.d.ts +22 -0
  90. package/dist/server/auth/application/actions/social/social-login.action.d.ts.map +1 -0
  91. package/dist/server/auth/application/actions/social/social-login.action.js +159 -0
  92. package/dist/server/auth/application/actions/social/social-login.action.js.map +1 -0
  93. package/dist/server/auth/application/actions/two-factor/disable-2fa.action.d.ts +9 -0
  94. package/dist/server/auth/application/actions/two-factor/disable-2fa.action.d.ts.map +1 -0
  95. package/dist/server/auth/application/actions/two-factor/disable-2fa.action.js +49 -0
  96. package/dist/server/auth/application/actions/two-factor/disable-2fa.action.js.map +1 -0
  97. package/dist/server/auth/application/actions/two-factor/enable-2fa.action.d.ts +13 -0
  98. package/dist/server/auth/application/actions/two-factor/enable-2fa.action.d.ts.map +1 -0
  99. package/dist/server/auth/application/actions/two-factor/enable-2fa.action.js +135 -0
  100. package/dist/server/auth/application/actions/two-factor/enable-2fa.action.js.map +1 -0
  101. package/dist/server/auth/application/actions/two-factor/index.d.ts +4 -0
  102. package/dist/server/auth/application/actions/two-factor/index.d.ts.map +1 -0
  103. package/dist/server/auth/application/actions/two-factor/index.js +20 -0
  104. package/dist/server/auth/application/actions/two-factor/index.js.map +1 -0
  105. package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.d.ts +10 -0
  106. package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.d.ts.map +1 -0
  107. package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.js +97 -0
  108. package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.js.map +1 -0
  109. package/dist/server/auth/application/dto/change-password.dto.d.ts +5 -0
  110. package/dist/server/auth/application/dto/change-password.dto.d.ts.map +1 -0
  111. package/dist/server/auth/application/dto/change-password.dto.js +33 -0
  112. package/dist/server/auth/application/dto/change-password.dto.js.map +1 -0
  113. package/dist/server/auth/application/dto/client-credentials.dto.d.ts +7 -0
  114. package/dist/server/auth/application/dto/client-credentials.dto.d.ts.map +1 -0
  115. package/dist/server/auth/application/dto/client-credentials.dto.js +42 -0
  116. package/dist/server/auth/application/dto/client-credentials.dto.js.map +1 -0
  117. package/dist/server/auth/application/dto/enable-2fa-response.d.ts +7 -0
  118. package/dist/server/auth/application/dto/enable-2fa-response.d.ts.map +1 -0
  119. package/dist/server/auth/application/dto/enable-2fa-response.js +13 -0
  120. package/dist/server/auth/application/dto/enable-2fa-response.js.map +1 -0
  121. package/dist/server/auth/application/dto/enable-2fa.dto.d.ts +4 -0
  122. package/dist/server/auth/application/dto/enable-2fa.dto.d.ts.map +1 -0
  123. package/dist/server/auth/application/dto/enable-2fa.dto.js +23 -0
  124. package/dist/server/auth/application/dto/enable-2fa.dto.js.map +1 -0
  125. package/dist/server/auth/application/dto/forgot-password.dto.d.ts +4 -0
  126. package/dist/server/auth/application/dto/forgot-password.dto.d.ts.map +1 -0
  127. package/dist/server/auth/application/dto/forgot-password.dto.js +23 -0
  128. package/dist/server/auth/application/dto/forgot-password.dto.js.map +1 -0
  129. package/dist/server/auth/application/dto/index.d.ts +17 -0
  130. package/dist/server/auth/application/dto/index.d.ts.map +1 -0
  131. package/dist/server/auth/application/dto/index.js +33 -0
  132. package/dist/server/auth/application/dto/index.js.map +1 -0
  133. package/dist/server/auth/application/dto/login-response.d.ts +25 -0
  134. package/dist/server/auth/application/dto/login-response.d.ts.map +1 -0
  135. package/dist/server/auth/application/dto/login-response.js +15 -0
  136. package/dist/server/auth/application/dto/login-response.js.map +1 -0
  137. package/dist/server/auth/application/dto/login.dto.d.ts +10 -0
  138. package/dist/server/auth/application/dto/login.dto.d.ts.map +1 -0
  139. package/dist/server/auth/application/dto/login.dto.js +59 -0
  140. package/dist/server/auth/application/dto/login.dto.js.map +1 -0
  141. package/dist/server/auth/application/dto/refresh-token.dto.d.ts +5 -0
  142. package/dist/server/auth/application/dto/refresh-token.dto.d.ts.map +1 -0
  143. package/dist/server/auth/application/dto/refresh-token.dto.js +30 -0
  144. package/dist/server/auth/application/dto/refresh-token.dto.js.map +1 -0
  145. package/dist/server/auth/application/dto/register.dto.d.ts +7 -0
  146. package/dist/server/auth/application/dto/register.dto.d.ts.map +1 -0
  147. package/dist/server/auth/application/dto/register.dto.js +47 -0
  148. package/dist/server/auth/application/dto/register.dto.js.map +1 -0
  149. package/dist/server/auth/application/dto/reset-password.dto.d.ts +5 -0
  150. package/dist/server/auth/application/dto/reset-password.dto.d.ts.map +1 -0
  151. package/dist/server/auth/application/dto/reset-password.dto.js +33 -0
  152. package/dist/server/auth/application/dto/reset-password.dto.js.map +1 -0
  153. package/dist/server/auth/application/dto/social-login.dto.d.ts +10 -0
  154. package/dist/server/auth/application/dto/social-login.dto.d.ts.map +1 -0
  155. package/dist/server/auth/application/dto/social-login.dto.js +54 -0
  156. package/dist/server/auth/application/dto/social-login.dto.js.map +1 -0
  157. package/dist/server/auth/application/dto/token-response.d.ts +9 -0
  158. package/dist/server/auth/application/dto/token-response.d.ts.map +1 -0
  159. package/dist/server/auth/application/dto/token-response.js +15 -0
  160. package/dist/server/auth/application/dto/token-response.js.map +1 -0
  161. package/dist/server/auth/application/dto/update-profile.dto.d.ts +7 -0
  162. package/dist/server/auth/application/dto/update-profile.dto.d.ts.map +1 -0
  163. package/dist/server/auth/application/dto/update-profile.dto.js +41 -0
  164. package/dist/server/auth/application/dto/update-profile.dto.js.map +1 -0
  165. package/dist/server/auth/application/dto/user-response.d.ts +14 -0
  166. package/dist/server/auth/application/dto/user-response.d.ts.map +1 -0
  167. package/dist/server/auth/application/dto/user-response.js +20 -0
  168. package/dist/server/auth/application/dto/user-response.js.map +1 -0
  169. package/dist/server/auth/application/dto/verify-2fa.dto.d.ts +4 -0
  170. package/dist/server/auth/application/dto/verify-2fa.dto.d.ts.map +1 -0
  171. package/dist/server/auth/application/dto/verify-2fa.dto.js +24 -0
  172. package/dist/server/auth/application/dto/verify-2fa.dto.js.map +1 -0
  173. package/dist/server/auth/application/dto/verify-email.dto.d.ts +4 -0
  174. package/dist/server/auth/application/dto/verify-email.dto.d.ts.map +1 -0
  175. package/dist/server/auth/application/dto/verify-email.dto.js +23 -0
  176. package/dist/server/auth/application/dto/verify-email.dto.js.map +1 -0
  177. package/dist/server/auth/application/dtos/create-role.dto.d.ts +6 -0
  178. package/dist/server/auth/application/dtos/create-role.dto.d.ts.map +1 -0
  179. package/dist/server/auth/application/dtos/create-role.dto.js +35 -0
  180. package/dist/server/auth/application/dtos/create-role.dto.js.map +1 -0
  181. package/dist/server/auth/application/dtos/index.d.ts +4 -0
  182. package/dist/server/auth/application/dtos/index.d.ts.map +1 -0
  183. package/dist/server/auth/application/dtos/index.js +20 -0
  184. package/dist/server/auth/application/dtos/index.js.map +1 -0
  185. package/dist/server/auth/application/dtos/query-role.dto.d.ts +6 -0
  186. package/dist/server/auth/application/dtos/query-role.dto.d.ts.map +1 -0
  187. package/dist/server/auth/application/dtos/query-role.dto.js +35 -0
  188. package/dist/server/auth/application/dtos/query-role.dto.js.map +1 -0
  189. package/dist/server/auth/application/dtos/update-role.dto.d.ts +6 -0
  190. package/dist/server/auth/application/dtos/update-role.dto.d.ts.map +1 -0
  191. package/dist/server/auth/application/dtos/update-role.dto.js +36 -0
  192. package/dist/server/auth/application/dtos/update-role.dto.js.map +1 -0
  193. package/dist/server/auth/application/index.d.ts +4 -0
  194. package/dist/server/auth/application/index.d.ts.map +1 -0
  195. package/dist/server/auth/application/index.js +20 -0
  196. package/dist/server/auth/application/index.js.map +1 -0
  197. package/dist/server/auth/application/ports/email.service.d.ts +12 -0
  198. package/dist/server/auth/application/ports/email.service.d.ts.map +1 -0
  199. package/dist/server/auth/application/ports/email.service.js +5 -0
  200. package/dist/server/auth/application/ports/email.service.js.map +1 -0
  201. package/dist/server/auth/application/ports/hash.service.d.ts +7 -0
  202. package/dist/server/auth/application/ports/hash.service.d.ts.map +1 -0
  203. package/dist/server/auth/application/ports/hash.service.js +5 -0
  204. package/dist/server/auth/application/ports/hash.service.js.map +1 -0
  205. package/dist/server/auth/application/ports/index.d.ts +5 -0
  206. package/dist/server/auth/application/ports/index.d.ts.map +1 -0
  207. package/dist/server/auth/application/ports/index.js +21 -0
  208. package/dist/server/auth/application/ports/index.js.map +1 -0
  209. package/dist/server/auth/application/ports/social-auth.service.d.ts +13 -0
  210. package/dist/server/auth/application/ports/social-auth.service.d.ts.map +1 -0
  211. package/dist/server/auth/application/ports/social-auth.service.js +7 -0
  212. package/dist/server/auth/application/ports/social-auth.service.js.map +1 -0
  213. package/dist/server/auth/application/ports/token.service.d.ts +36 -0
  214. package/dist/server/auth/application/ports/token.service.d.ts.map +1 -0
  215. package/dist/server/auth/application/ports/token.service.js +5 -0
  216. package/dist/server/auth/application/ports/token.service.js.map +1 -0
  217. package/dist/server/auth/application/services/auth-user.service.d.ts +29 -0
  218. package/dist/server/auth/application/services/auth-user.service.d.ts.map +1 -0
  219. package/dist/server/auth/application/services/auth-user.service.js +165 -0
  220. package/dist/server/auth/application/services/auth-user.service.js.map +1 -0
  221. package/dist/server/auth/application/services/permission.service.d.ts +13 -0
  222. package/dist/server/auth/application/services/permission.service.d.ts.map +1 -0
  223. package/dist/server/auth/application/services/permission.service.js +56 -0
  224. package/dist/server/auth/application/services/permission.service.js.map +1 -0
  225. package/dist/server/auth/application/services/role.service.d.ts +61 -0
  226. package/dist/server/auth/application/services/role.service.d.ts.map +1 -0
  227. package/dist/server/auth/application/services/role.service.js +178 -0
  228. package/dist/server/auth/application/services/role.service.js.map +1 -0
  229. package/dist/server/auth/domain/constants/auth-events.const.d.ts +17 -0
  230. package/dist/server/auth/domain/constants/auth-events.const.d.ts.map +1 -0
  231. package/dist/server/auth/domain/constants/auth-events.const.js +19 -0
  232. package/dist/server/auth/domain/constants/auth-events.const.js.map +1 -0
  233. package/dist/server/auth/domain/constants/index.d.ts +3 -0
  234. package/dist/server/auth/domain/constants/index.d.ts.map +1 -0
  235. package/dist/server/auth/domain/constants/index.js +19 -0
  236. package/dist/server/auth/domain/constants/index.js.map +1 -0
  237. package/dist/server/auth/domain/constants/oauth.config.d.ts +50 -0
  238. package/dist/server/auth/domain/constants/oauth.config.d.ts.map +1 -0
  239. package/dist/server/auth/domain/constants/oauth.config.js +53 -0
  240. package/dist/server/auth/domain/constants/oauth.config.js.map +1 -0
  241. package/dist/server/auth/domain/constants/scopes.d.ts +26 -0
  242. package/dist/server/auth/domain/constants/scopes.d.ts.map +1 -0
  243. package/dist/server/auth/domain/constants/scopes.js +52 -0
  244. package/dist/server/auth/domain/constants/scopes.js.map +1 -0
  245. package/dist/server/auth/domain/entities/auth-user.d.ts +52 -0
  246. package/dist/server/auth/domain/entities/auth-user.d.ts.map +1 -0
  247. package/dist/server/auth/domain/entities/auth-user.js +134 -0
  248. package/dist/server/auth/domain/entities/auth-user.js.map +1 -0
  249. package/dist/server/auth/domain/entities/email-verification-token.d.ts +13 -0
  250. package/dist/server/auth/domain/entities/email-verification-token.d.ts.map +1 -0
  251. package/dist/server/auth/domain/entities/email-verification-token.js +27 -0
  252. package/dist/server/auth/domain/entities/email-verification-token.js.map +1 -0
  253. package/dist/server/auth/domain/entities/index.d.ts +17 -0
  254. package/dist/server/auth/domain/entities/index.d.ts.map +1 -0
  255. package/dist/server/auth/domain/entities/index.js +33 -0
  256. package/dist/server/auth/domain/entities/index.js.map +1 -0
  257. package/dist/server/auth/domain/entities/login-history.d.ts +18 -0
  258. package/dist/server/auth/domain/entities/login-history.d.ts.map +1 -0
  259. package/dist/server/auth/domain/entities/login-history.js +30 -0
  260. package/dist/server/auth/domain/entities/login-history.js.map +1 -0
  261. package/dist/server/auth/domain/entities/oauth-audit-log.d.ts +15 -0
  262. package/dist/server/auth/domain/entities/oauth-audit-log.d.ts.map +1 -0
  263. package/dist/server/auth/domain/entities/oauth-audit-log.js +34 -0
  264. package/dist/server/auth/domain/entities/oauth-audit-log.js.map +1 -0
  265. package/dist/server/auth/domain/entities/oauth-authorization-code.d.ts +19 -0
  266. package/dist/server/auth/domain/entities/oauth-authorization-code.d.ts.map +1 -0
  267. package/dist/server/auth/domain/entities/oauth-authorization-code.js +37 -0
  268. package/dist/server/auth/domain/entities/oauth-authorization-code.js.map +1 -0
  269. package/dist/server/auth/domain/entities/oauth-client-consent.d.ts +14 -0
  270. package/dist/server/auth/domain/entities/oauth-client-consent.d.ts.map +1 -0
  271. package/dist/server/auth/domain/entities/oauth-client-consent.js +30 -0
  272. package/dist/server/auth/domain/entities/oauth-client-consent.js.map +1 -0
  273. package/dist/server/auth/domain/entities/oauth-client.d.ts +31 -0
  274. package/dist/server/auth/domain/entities/oauth-client.d.ts.map +1 -0
  275. package/dist/server/auth/domain/entities/oauth-client.js +51 -0
  276. package/dist/server/auth/domain/entities/oauth-client.js.map +1 -0
  277. package/dist/server/auth/domain/entities/oauth-scope.d.ts +10 -0
  278. package/dist/server/auth/domain/entities/oauth-scope.d.ts.map +1 -0
  279. package/dist/server/auth/domain/entities/oauth-scope.js +18 -0
  280. package/dist/server/auth/domain/entities/oauth-scope.js.map +1 -0
  281. package/dist/server/auth/domain/entities/oauth-token.d.ts +20 -0
  282. package/dist/server/auth/domain/entities/oauth-token.d.ts.map +1 -0
  283. package/dist/server/auth/domain/entities/oauth-token.js +38 -0
  284. package/dist/server/auth/domain/entities/oauth-token.js.map +1 -0
  285. package/dist/server/auth/domain/entities/permission.d.ts +14 -0
  286. package/dist/server/auth/domain/entities/permission.d.ts.map +1 -0
  287. package/dist/server/auth/domain/entities/permission.js +26 -0
  288. package/dist/server/auth/domain/entities/permission.js.map +1 -0
  289. package/dist/server/auth/domain/entities/role-permission.d.ts +8 -0
  290. package/dist/server/auth/domain/entities/role-permission.d.ts.map +1 -0
  291. package/dist/server/auth/domain/entities/role-permission.js +14 -0
  292. package/dist/server/auth/domain/entities/role-permission.js.map +1 -0
  293. package/dist/server/auth/domain/entities/role.d.ts +13 -0
  294. package/dist/server/auth/domain/entities/role.d.ts.map +1 -0
  295. package/dist/server/auth/domain/entities/role.js +26 -0
  296. package/dist/server/auth/domain/entities/role.js.map +1 -0
  297. package/dist/server/auth/domain/entities/social-account.d.ts +20 -0
  298. package/dist/server/auth/domain/entities/social-account.d.ts.map +1 -0
  299. package/dist/server/auth/domain/entities/social-account.js +37 -0
  300. package/dist/server/auth/domain/entities/social-account.js.map +1 -0
  301. package/dist/server/auth/domain/entities/user-role.d.ts +8 -0
  302. package/dist/server/auth/domain/entities/user-role.d.ts.map +1 -0
  303. package/dist/server/auth/domain/entities/user-role.js +14 -0
  304. package/dist/server/auth/domain/entities/user-role.js.map +1 -0
  305. package/dist/server/auth/domain/entities/user-session.d.ts +25 -0
  306. package/dist/server/auth/domain/entities/user-session.d.ts.map +1 -0
  307. package/dist/server/auth/domain/entities/user-session.js +50 -0
  308. package/dist/server/auth/domain/entities/user-session.js.map +1 -0
  309. package/dist/server/auth/domain/entities/user-two-factor.d.ts +25 -0
  310. package/dist/server/auth/domain/entities/user-two-factor.d.ts.map +1 -0
  311. package/dist/server/auth/domain/entities/user-two-factor.js +66 -0
  312. package/dist/server/auth/domain/entities/user-two-factor.js.map +1 -0
  313. package/dist/server/auth/domain/enums/index.d.ts +2 -0
  314. package/dist/server/auth/domain/enums/index.d.ts.map +1 -0
  315. package/dist/server/auth/domain/enums/index.js +18 -0
  316. package/dist/server/auth/domain/enums/index.js.map +1 -0
  317. package/dist/server/auth/domain/enums/oauth.enums.d.ts +69 -0
  318. package/dist/server/auth/domain/enums/oauth.enums.d.ts.map +1 -0
  319. package/dist/server/auth/domain/enums/oauth.enums.js +130 -0
  320. package/dist/server/auth/domain/enums/oauth.enums.js.map +1 -0
  321. package/dist/server/auth/domain/events/auth-user.events.d.ts +37 -0
  322. package/dist/server/auth/domain/events/auth-user.events.d.ts.map +1 -0
  323. package/dist/server/auth/domain/events/auth-user.events.js +70 -0
  324. package/dist/server/auth/domain/events/auth-user.events.js.map +1 -0
  325. package/dist/server/auth/domain/index.d.ts +3 -0
  326. package/dist/server/auth/domain/index.d.ts.map +1 -0
  327. package/dist/server/auth/domain/index.js +19 -0
  328. package/dist/server/auth/domain/index.js.map +1 -0
  329. package/dist/server/auth/domain/interfaces/auth.interface.d.ts +41 -0
  330. package/dist/server/auth/domain/interfaces/auth.interface.d.ts.map +1 -0
  331. package/dist/server/auth/domain/interfaces/auth.interface.js +3 -0
  332. package/dist/server/auth/domain/interfaces/auth.interface.js.map +1 -0
  333. package/dist/server/auth/domain/interfaces/index.d.ts +2 -0
  334. package/dist/server/auth/domain/interfaces/index.d.ts.map +1 -0
  335. package/dist/server/auth/domain/interfaces/index.js +18 -0
  336. package/dist/server/auth/domain/interfaces/index.js.map +1 -0
  337. package/dist/server/auth/domain/repositories/auth-user.repository.d.ts +14 -0
  338. package/dist/server/auth/domain/repositories/auth-user.repository.d.ts.map +1 -0
  339. package/dist/server/auth/domain/repositories/auth-user.repository.js +5 -0
  340. package/dist/server/auth/domain/repositories/auth-user.repository.js.map +1 -0
  341. package/dist/server/auth/domain/repositories/email-verification-token.repository.d.ts +13 -0
  342. package/dist/server/auth/domain/repositories/email-verification-token.repository.d.ts.map +1 -0
  343. package/dist/server/auth/domain/repositories/email-verification-token.repository.js +5 -0
  344. package/dist/server/auth/domain/repositories/email-verification-token.repository.js.map +1 -0
  345. package/dist/server/auth/domain/repositories/index.d.ts +17 -0
  346. package/dist/server/auth/domain/repositories/index.d.ts.map +1 -0
  347. package/dist/server/auth/domain/repositories/index.js +33 -0
  348. package/dist/server/auth/domain/repositories/index.js.map +1 -0
  349. package/dist/server/auth/domain/repositories/login-history.repository.d.ts +11 -0
  350. package/dist/server/auth/domain/repositories/login-history.repository.d.ts.map +1 -0
  351. package/dist/server/auth/domain/repositories/login-history.repository.js +5 -0
  352. package/dist/server/auth/domain/repositories/login-history.repository.js.map +1 -0
  353. package/dist/server/auth/domain/repositories/oauth-audit-log.repository.d.ts +12 -0
  354. package/dist/server/auth/domain/repositories/oauth-audit-log.repository.d.ts.map +1 -0
  355. package/dist/server/auth/domain/repositories/oauth-audit-log.repository.js +5 -0
  356. package/dist/server/auth/domain/repositories/oauth-audit-log.repository.js.map +1 -0
  357. package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.d.ts +12 -0
  358. package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.d.ts.map +1 -0
  359. package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.js +5 -0
  360. package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.js.map +1 -0
  361. package/dist/server/auth/domain/repositories/oauth-client-consent.repository.d.ts +12 -0
  362. package/dist/server/auth/domain/repositories/oauth-client-consent.repository.d.ts.map +1 -0
  363. package/dist/server/auth/domain/repositories/oauth-client-consent.repository.js +5 -0
  364. package/dist/server/auth/domain/repositories/oauth-client-consent.repository.js.map +1 -0
  365. package/dist/server/auth/domain/repositories/oauth-client.repository.d.ts +12 -0
  366. package/dist/server/auth/domain/repositories/oauth-client.repository.d.ts.map +1 -0
  367. package/dist/server/auth/domain/repositories/oauth-client.repository.js +5 -0
  368. package/dist/server/auth/domain/repositories/oauth-client.repository.js.map +1 -0
  369. package/dist/server/auth/domain/repositories/oauth-scope.repository.d.ts +13 -0
  370. package/dist/server/auth/domain/repositories/oauth-scope.repository.d.ts.map +1 -0
  371. package/dist/server/auth/domain/repositories/oauth-scope.repository.js +5 -0
  372. package/dist/server/auth/domain/repositories/oauth-scope.repository.js.map +1 -0
  373. package/dist/server/auth/domain/repositories/oauth-token.repository.d.ts +15 -0
  374. package/dist/server/auth/domain/repositories/oauth-token.repository.d.ts.map +1 -0
  375. package/dist/server/auth/domain/repositories/oauth-token.repository.js +5 -0
  376. package/dist/server/auth/domain/repositories/oauth-token.repository.js.map +1 -0
  377. package/dist/server/auth/domain/repositories/permission.repository.d.ts +14 -0
  378. package/dist/server/auth/domain/repositories/permission.repository.d.ts.map +1 -0
  379. package/dist/server/auth/domain/repositories/permission.repository.js +5 -0
  380. package/dist/server/auth/domain/repositories/permission.repository.js.map +1 -0
  381. package/dist/server/auth/domain/repositories/role-permission.repository.d.ts +14 -0
  382. package/dist/server/auth/domain/repositories/role-permission.repository.d.ts.map +1 -0
  383. package/dist/server/auth/domain/repositories/role-permission.repository.js +5 -0
  384. package/dist/server/auth/domain/repositories/role-permission.repository.js.map +1 -0
  385. package/dist/server/auth/domain/repositories/role.repository.d.ts +13 -0
  386. package/dist/server/auth/domain/repositories/role.repository.d.ts.map +1 -0
  387. package/dist/server/auth/domain/repositories/role.repository.js +5 -0
  388. package/dist/server/auth/domain/repositories/role.repository.js.map +1 -0
  389. package/dist/server/auth/domain/repositories/social-account.repository.d.ts +14 -0
  390. package/dist/server/auth/domain/repositories/social-account.repository.d.ts.map +1 -0
  391. package/dist/server/auth/domain/repositories/social-account.repository.js +5 -0
  392. package/dist/server/auth/domain/repositories/social-account.repository.js.map +1 -0
  393. package/dist/server/auth/domain/repositories/user-role.repository.d.ts +13 -0
  394. package/dist/server/auth/domain/repositories/user-role.repository.d.ts.map +1 -0
  395. package/dist/server/auth/domain/repositories/user-role.repository.js +5 -0
  396. package/dist/server/auth/domain/repositories/user-role.repository.js.map +1 -0
  397. package/dist/server/auth/domain/repositories/user-session.repository.d.ts +14 -0
  398. package/dist/server/auth/domain/repositories/user-session.repository.d.ts.map +1 -0
  399. package/dist/server/auth/domain/repositories/user-session.repository.js +5 -0
  400. package/dist/server/auth/domain/repositories/user-session.repository.js.map +1 -0
  401. package/dist/server/auth/domain/repositories/user-two-factor.repository.d.ts +11 -0
  402. package/dist/server/auth/domain/repositories/user-two-factor.repository.d.ts.map +1 -0
  403. package/dist/server/auth/domain/repositories/user-two-factor.repository.js +5 -0
  404. package/dist/server/auth/domain/repositories/user-two-factor.repository.js.map +1 -0
  405. package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.d.ts +6 -0
  406. package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.d.ts.map +1 -0
  407. package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.js +1386 -0
  408. package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.js.map +1 -0
  409. package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.d.ts +13 -0
  410. package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.d.ts.map +1 -0
  411. package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.js +75 -0
  412. package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.js.map +1 -0
  413. package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.d.ts +15 -0
  414. package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.d.ts.map +1 -0
  415. package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.js +83 -0
  416. package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.js.map +1 -0
  417. package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.d.ts +9 -0
  418. package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.d.ts.map +1 -0
  419. package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.js +137 -0
  420. package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.js.map +1 -0
  421. package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.d.ts +13 -0
  422. package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.d.ts.map +1 -0
  423. package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.js +226 -0
  424. package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.js.map +1 -0
  425. package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.d.ts +13 -0
  426. package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.d.ts.map +1 -0
  427. package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.js +161 -0
  428. package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.js.map +1 -0
  429. package/dist/server/auth/infrastructure/database/postgresql/seeders/index.d.ts +17 -0
  430. package/dist/server/auth/infrastructure/database/postgresql/seeders/index.d.ts.map +1 -0
  431. package/dist/server/auth/infrastructure/database/postgresql/seeders/index.js +63 -0
  432. package/dist/server/auth/infrastructure/database/postgresql/seeders/index.js.map +1 -0
  433. package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.d.ts +3 -0
  434. package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.d.ts.map +1 -0
  435. package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.js +58 -0
  436. package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.js.map +1 -0
  437. package/dist/server/auth/infrastructure/index.d.ts +5 -0
  438. package/dist/server/auth/infrastructure/index.d.ts.map +1 -0
  439. package/dist/server/auth/infrastructure/index.js +21 -0
  440. package/dist/server/auth/infrastructure/index.js.map +1 -0
  441. package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.d.ts +23 -0
  442. package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.d.ts.map +1 -0
  443. package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.js +120 -0
  444. package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.js.map +1 -0
  445. package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.d.ts +9 -0
  446. package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.d.ts.map +1 -0
  447. package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.js +50 -0
  448. package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.js.map +1 -0
  449. package/dist/server/auth/infrastructure/persistence/entities/index.d.ts +17 -0
  450. package/dist/server/auth/infrastructure/persistence/entities/index.d.ts.map +1 -0
  451. package/dist/server/auth/infrastructure/persistence/entities/index.js +33 -0
  452. package/dist/server/auth/infrastructure/persistence/entities/index.js.map +1 -0
  453. package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.d.ts +14 -0
  454. package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.d.ts.map +1 -0
  455. package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.js +71 -0
  456. package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.js.map +1 -0
  457. package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.d.ts +12 -0
  458. package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.d.ts.map +1 -0
  459. package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.js +65 -0
  460. package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.js.map +1 -0
  461. package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.d.ts +14 -0
  462. package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.d.ts.map +1 -0
  463. package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.js +75 -0
  464. package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.js.map +1 -0
  465. package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.d.ts +11 -0
  466. package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.d.ts.map +1 -0
  467. package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.js +60 -0
  468. package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.js.map +1 -0
  469. package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.d.ts +23 -0
  470. package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.d.ts.map +1 -0
  471. package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.js +120 -0
  472. package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.js.map +1 -0
  473. package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.d.ts +8 -0
  474. package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.d.ts.map +1 -0
  475. package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.js +45 -0
  476. package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.js.map +1 -0
  477. package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.d.ts +14 -0
  478. package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.d.ts.map +1 -0
  479. package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.js +75 -0
  480. package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.js.map +1 -0
  481. package/dist/server/auth/infrastructure/persistence/entities/permission.entity.d.ts +9 -0
  482. package/dist/server/auth/infrastructure/persistence/entities/permission.entity.d.ts.map +1 -0
  483. package/dist/server/auth/infrastructure/persistence/entities/permission.entity.js +50 -0
  484. package/dist/server/auth/infrastructure/persistence/entities/permission.entity.js.map +1 -0
  485. package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.d.ts +7 -0
  486. package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.d.ts.map +1 -0
  487. package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.js +40 -0
  488. package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.js.map +1 -0
  489. package/dist/server/auth/infrastructure/persistence/entities/role.entity.d.ts +9 -0
  490. package/dist/server/auth/infrastructure/persistence/entities/role.entity.d.ts.map +1 -0
  491. package/dist/server/auth/infrastructure/persistence/entities/role.entity.js +50 -0
  492. package/dist/server/auth/infrastructure/persistence/entities/role.entity.js.map +1 -0
  493. package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.d.ts +17 -0
  494. package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.d.ts.map +1 -0
  495. package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.js +86 -0
  496. package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.js.map +1 -0
  497. package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.d.ts +7 -0
  498. package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.d.ts.map +1 -0
  499. package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.js +40 -0
  500. package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.js.map +1 -0
  501. package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.d.ts +18 -0
  502. package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.d.ts.map +1 -0
  503. package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.js +95 -0
  504. package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.js.map +1 -0
  505. package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.d.ts +15 -0
  506. package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.d.ts.map +1 -0
  507. package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.js +76 -0
  508. package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.js.map +1 -0
  509. package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.d.ts +9 -0
  510. package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.d.ts.map +1 -0
  511. package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.js +75 -0
  512. package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.js.map +1 -0
  513. package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.d.ts +8 -0
  514. package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.d.ts.map +1 -0
  515. package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.js +46 -0
  516. package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.js.map +1 -0
  517. package/dist/server/auth/infrastructure/persistence/mappers/index.d.ts +17 -0
  518. package/dist/server/auth/infrastructure/persistence/mappers/index.d.ts.map +1 -0
  519. package/dist/server/auth/infrastructure/persistence/mappers/index.js +33 -0
  520. package/dist/server/auth/infrastructure/persistence/mappers/index.js.map +1 -0
  521. package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.d.ts +8 -0
  522. package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.d.ts.map +1 -0
  523. package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.js +54 -0
  524. package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.js.map +1 -0
  525. package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.d.ts +8 -0
  526. package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.d.ts.map +1 -0
  527. package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.js +52 -0
  528. package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.js.map +1 -0
  529. package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.d.ts +8 -0
  530. package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.d.ts.map +1 -0
  531. package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.js +56 -0
  532. package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.js.map +1 -0
  533. package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.d.ts +8 -0
  534. package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.d.ts.map +1 -0
  535. package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.js +46 -0
  536. package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.js.map +1 -0
  537. package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.d.ts +8 -0
  538. package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.d.ts.map +1 -0
  539. package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.js +74 -0
  540. package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.js.map +1 -0
  541. package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.d.ts +8 -0
  542. package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.d.ts.map +1 -0
  543. package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.js +44 -0
  544. package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.js.map +1 -0
  545. package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.d.ts +8 -0
  546. package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.d.ts.map +1 -0
  547. package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.js +56 -0
  548. package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.js.map +1 -0
  549. package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.d.ts +8 -0
  550. package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.d.ts.map +1 -0
  551. package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.js +46 -0
  552. package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.js.map +1 -0
  553. package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.d.ts +8 -0
  554. package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.d.ts.map +1 -0
  555. package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.js +42 -0
  556. package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.js.map +1 -0
  557. package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.d.ts +8 -0
  558. package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.d.ts.map +1 -0
  559. package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.js +46 -0
  560. package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.js.map +1 -0
  561. package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.d.ts +8 -0
  562. package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.d.ts.map +1 -0
  563. package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.js +58 -0
  564. package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.js.map +1 -0
  565. package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.d.ts +8 -0
  566. package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.d.ts.map +1 -0
  567. package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.js +42 -0
  568. package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.js.map +1 -0
  569. package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.d.ts +8 -0
  570. package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.d.ts.map +1 -0
  571. package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.js +62 -0
  572. package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.js.map +1 -0
  573. package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.d.ts +8 -0
  574. package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.d.ts.map +1 -0
  575. package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.js +56 -0
  576. package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.js.map +1 -0
  577. package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.d.ts +20 -0
  578. package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.d.ts.map +1 -0
  579. package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.js +74 -0
  580. package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.js.map +1 -0
  581. package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.d.ts +19 -0
  582. package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.d.ts.map +1 -0
  583. package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.js +67 -0
  584. package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.js.map +1 -0
  585. package/dist/server/auth/infrastructure/persistence/repositories/index.d.ts +17 -0
  586. package/dist/server/auth/infrastructure/persistence/repositories/index.d.ts.map +1 -0
  587. package/dist/server/auth/infrastructure/persistence/repositories/index.js +33 -0
  588. package/dist/server/auth/infrastructure/persistence/repositories/index.js.map +1 -0
  589. package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.d.ts +17 -0
  590. package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.d.ts.map +1 -0
  591. package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.js +70 -0
  592. package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.js.map +1 -0
  593. package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.d.ts +18 -0
  594. package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.d.ts.map +1 -0
  595. package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.js +77 -0
  596. package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.js.map +1 -0
  597. package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.d.ts +18 -0
  598. package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.d.ts.map +1 -0
  599. package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.js +64 -0
  600. package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.js.map +1 -0
  601. package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.d.ts +18 -0
  602. package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.d.ts.map +1 -0
  603. package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.js +66 -0
  604. package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.js.map +1 -0
  605. package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.d.ts +18 -0
  606. package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.d.ts.map +1 -0
  607. package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.js +65 -0
  608. package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.js.map +1 -0
  609. package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.d.ts +19 -0
  610. package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.d.ts.map +1 -0
  611. package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.js +69 -0
  612. package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.js.map +1 -0
  613. package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.d.ts +22 -0
  614. package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.d.ts.map +1 -0
  615. package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.js +93 -0
  616. package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.js.map +1 -0
  617. package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.d.ts +20 -0
  618. package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.d.ts.map +1 -0
  619. package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.js +75 -0
  620. package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.js.map +1 -0
  621. package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.d.ts +20 -0
  622. package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.d.ts.map +1 -0
  623. package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.js +79 -0
  624. package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.js.map +1 -0
  625. package/dist/server/auth/infrastructure/persistence/repositories/role.repository.d.ts +19 -0
  626. package/dist/server/auth/infrastructure/persistence/repositories/role.repository.d.ts.map +1 -0
  627. package/dist/server/auth/infrastructure/persistence/repositories/role.repository.js +69 -0
  628. package/dist/server/auth/infrastructure/persistence/repositories/role.repository.js.map +1 -0
  629. package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.d.ts +20 -0
  630. package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.d.ts.map +1 -0
  631. package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.js +72 -0
  632. package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.js.map +1 -0
  633. package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.d.ts +19 -0
  634. package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.d.ts.map +1 -0
  635. package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.js +66 -0
  636. package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.js.map +1 -0
  637. package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.d.ts +20 -0
  638. package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.d.ts.map +1 -0
  639. package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.js +85 -0
  640. package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.js.map +1 -0
  641. package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.d.ts +17 -0
  642. package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.d.ts.map +1 -0
  643. package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.js +60 -0
  644. package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.js.map +1 -0
  645. package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.d.ts +17 -0
  646. package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.d.ts.map +1 -0
  647. package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.js +105 -0
  648. package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.js.map +1 -0
  649. package/dist/server/auth/infrastructure/schedulers/index.d.ts +2 -0
  650. package/dist/server/auth/infrastructure/schedulers/index.d.ts.map +1 -0
  651. package/dist/server/auth/infrastructure/schedulers/index.js +18 -0
  652. package/dist/server/auth/infrastructure/schedulers/index.js.map +1 -0
  653. package/dist/server/auth/infrastructure/services/authorization-code.service.d.ts +22 -0
  654. package/dist/server/auth/infrastructure/services/authorization-code.service.d.ts.map +1 -0
  655. package/dist/server/auth/infrastructure/services/authorization-code.service.js +176 -0
  656. package/dist/server/auth/infrastructure/services/authorization-code.service.js.map +1 -0
  657. package/dist/server/auth/infrastructure/services/bcrypt-hash.service.d.ts +8 -0
  658. package/dist/server/auth/infrastructure/services/bcrypt-hash.service.d.ts.map +1 -0
  659. package/dist/server/auth/infrastructure/services/bcrypt-hash.service.js +61 -0
  660. package/dist/server/auth/infrastructure/services/bcrypt-hash.service.js.map +1 -0
  661. package/dist/server/auth/infrastructure/services/consent.service.d.ts +19 -0
  662. package/dist/server/auth/infrastructure/services/consent.service.d.ts.map +1 -0
  663. package/dist/server/auth/infrastructure/services/consent.service.js +121 -0
  664. package/dist/server/auth/infrastructure/services/consent.service.js.map +1 -0
  665. package/dist/server/auth/infrastructure/services/email-verification.service.d.ts +11 -0
  666. package/dist/server/auth/infrastructure/services/email-verification.service.d.ts.map +1 -0
  667. package/dist/server/auth/infrastructure/services/email-verification.service.js +52 -0
  668. package/dist/server/auth/infrastructure/services/email-verification.service.js.map +1 -0
  669. package/dist/server/auth/infrastructure/services/google-auth.service.d.ts +11 -0
  670. package/dist/server/auth/infrastructure/services/google-auth.service.d.ts.map +1 -0
  671. package/dist/server/auth/infrastructure/services/google-auth.service.js +68 -0
  672. package/dist/server/auth/infrastructure/services/google-auth.service.js.map +1 -0
  673. package/dist/server/auth/infrastructure/services/index.d.ts +11 -0
  674. package/dist/server/auth/infrastructure/services/index.d.ts.map +1 -0
  675. package/dist/server/auth/infrastructure/services/index.js +27 -0
  676. package/dist/server/auth/infrastructure/services/index.js.map +1 -0
  677. package/dist/server/auth/infrastructure/services/jwt-token.service.d.ts +41 -0
  678. package/dist/server/auth/infrastructure/services/jwt-token.service.d.ts.map +1 -0
  679. package/dist/server/auth/infrastructure/services/jwt-token.service.js +112 -0
  680. package/dist/server/auth/infrastructure/services/jwt-token.service.js.map +1 -0
  681. package/dist/server/auth/infrastructure/services/nodemailer-email.service.d.ts +17 -0
  682. package/dist/server/auth/infrastructure/services/nodemailer-email.service.d.ts.map +1 -0
  683. package/dist/server/auth/infrastructure/services/nodemailer-email.service.js +125 -0
  684. package/dist/server/auth/infrastructure/services/nodemailer-email.service.js.map +1 -0
  685. package/dist/server/auth/infrastructure/services/oauth-token.service.d.ts +27 -0
  686. package/dist/server/auth/infrastructure/services/oauth-token.service.d.ts.map +1 -0
  687. package/dist/server/auth/infrastructure/services/oauth-token.service.js +215 -0
  688. package/dist/server/auth/infrastructure/services/oauth-token.service.js.map +1 -0
  689. package/dist/server/auth/infrastructure/services/root-account.service.d.ts +19 -0
  690. package/dist/server/auth/infrastructure/services/root-account.service.d.ts.map +1 -0
  691. package/dist/server/auth/infrastructure/services/root-account.service.js +91 -0
  692. package/dist/server/auth/infrastructure/services/root-account.service.js.map +1 -0
  693. package/dist/server/auth/infrastructure/services/session.service.d.ts +11 -0
  694. package/dist/server/auth/infrastructure/services/session.service.d.ts.map +1 -0
  695. package/dist/server/auth/infrastructure/services/session.service.js +49 -0
  696. package/dist/server/auth/infrastructure/services/session.service.js.map +1 -0
  697. package/dist/server/auth/infrastructure/strategies/facebook.strategy.d.ts +16 -0
  698. package/dist/server/auth/infrastructure/strategies/facebook.strategy.d.ts.map +1 -0
  699. package/dist/server/auth/infrastructure/strategies/facebook.strategy.js +100 -0
  700. package/dist/server/auth/infrastructure/strategies/facebook.strategy.js.map +1 -0
  701. package/dist/server/auth/infrastructure/strategies/github.strategy.d.ts +16 -0
  702. package/dist/server/auth/infrastructure/strategies/github.strategy.d.ts.map +1 -0
  703. package/dist/server/auth/infrastructure/strategies/github.strategy.js +99 -0
  704. package/dist/server/auth/infrastructure/strategies/github.strategy.js.map +1 -0
  705. package/dist/server/auth/infrastructure/strategies/google.strategy.d.ts +16 -0
  706. package/dist/server/auth/infrastructure/strategies/google.strategy.d.ts.map +1 -0
  707. package/dist/server/auth/infrastructure/strategies/google.strategy.js +99 -0
  708. package/dist/server/auth/infrastructure/strategies/google.strategy.js.map +1 -0
  709. package/dist/server/auth/infrastructure/strategies/index.d.ts +2 -0
  710. package/dist/server/auth/infrastructure/strategies/index.d.ts.map +1 -0
  711. package/dist/server/auth/infrastructure/strategies/index.js +18 -0
  712. package/dist/server/auth/infrastructure/strategies/index.js.map +1 -0
  713. package/dist/server/auth/infrastructure/strategies/jwt.strategy.d.ts +20 -0
  714. package/dist/server/auth/infrastructure/strategies/jwt.strategy.d.ts.map +1 -0
  715. package/dist/server/auth/infrastructure/strategies/jwt.strategy.js +68 -0
  716. package/dist/server/auth/infrastructure/strategies/jwt.strategy.js.map +1 -0
  717. package/dist/server/auth/infrastructure/strategies/local.strategy.d.ts +13 -0
  718. package/dist/server/auth/infrastructure/strategies/local.strategy.d.ts.map +1 -0
  719. package/dist/server/auth/infrastructure/strategies/local.strategy.js +83 -0
  720. package/dist/server/auth/infrastructure/strategies/local.strategy.js.map +1 -0
  721. package/dist/server/auth/oauth.module.d.ts +3 -0
  722. package/dist/server/auth/oauth.module.d.ts.map +1 -0
  723. package/dist/server/auth/oauth.module.js +235 -0
  724. package/dist/server/auth/oauth.module.js.map +1 -0
  725. package/dist/server/auth/presentation/controllers/auth.controller.d.ts +72 -0
  726. package/dist/server/auth/presentation/controllers/auth.controller.d.ts.map +1 -0
  727. package/dist/server/auth/presentation/controllers/auth.controller.js +280 -0
  728. package/dist/server/auth/presentation/controllers/auth.controller.js.map +1 -0
  729. package/dist/server/auth/presentation/controllers/email.controller.d.ts +17 -0
  730. package/dist/server/auth/presentation/controllers/email.controller.d.ts.map +1 -0
  731. package/dist/server/auth/presentation/controllers/email.controller.js +75 -0
  732. package/dist/server/auth/presentation/controllers/email.controller.js.map +1 -0
  733. package/dist/server/auth/presentation/controllers/index.d.ts +9 -0
  734. package/dist/server/auth/presentation/controllers/index.d.ts.map +1 -0
  735. package/dist/server/auth/presentation/controllers/index.js +25 -0
  736. package/dist/server/auth/presentation/controllers/index.js.map +1 -0
  737. package/dist/server/auth/presentation/controllers/password.controller.d.ts +19 -0
  738. package/dist/server/auth/presentation/controllers/password.controller.d.ts.map +1 -0
  739. package/dist/server/auth/presentation/controllers/password.controller.js +75 -0
  740. package/dist/server/auth/presentation/controllers/password.controller.js.map +1 -0
  741. package/dist/server/auth/presentation/controllers/permission.controller.d.ts +11 -0
  742. package/dist/server/auth/presentation/controllers/permission.controller.d.ts.map +1 -0
  743. package/dist/server/auth/presentation/controllers/permission.controller.js +43 -0
  744. package/dist/server/auth/presentation/controllers/permission.controller.js.map +1 -0
  745. package/dist/server/auth/presentation/controllers/role.controller.d.ts +32 -0
  746. package/dist/server/auth/presentation/controllers/role.controller.d.ts.map +1 -0
  747. package/dist/server/auth/presentation/controllers/role.controller.js +97 -0
  748. package/dist/server/auth/presentation/controllers/role.controller.js.map +1 -0
  749. package/dist/server/auth/presentation/controllers/session.controller.d.ts +23 -0
  750. package/dist/server/auth/presentation/controllers/session.controller.d.ts.map +1 -0
  751. package/dist/server/auth/presentation/controllers/session.controller.js +92 -0
  752. package/dist/server/auth/presentation/controllers/session.controller.js.map +1 -0
  753. package/dist/server/auth/presentation/controllers/social-auth.controller.d.ts +12 -0
  754. package/dist/server/auth/presentation/controllers/social-auth.controller.d.ts.map +1 -0
  755. package/dist/server/auth/presentation/controllers/social-auth.controller.js +58 -0
  756. package/dist/server/auth/presentation/controllers/social-auth.controller.js.map +1 -0
  757. package/dist/server/auth/presentation/controllers/two-factor.controller.d.ts +23 -0
  758. package/dist/server/auth/presentation/controllers/two-factor.controller.d.ts.map +1 -0
  759. package/dist/server/auth/presentation/controllers/two-factor.controller.js +94 -0
  760. package/dist/server/auth/presentation/controllers/two-factor.controller.js.map +1 -0
  761. package/dist/server/auth/presentation/decorators/auth.decorator.d.ts +7 -0
  762. package/dist/server/auth/presentation/decorators/auth.decorator.d.ts.map +1 -0
  763. package/dist/server/auth/presentation/decorators/auth.decorator.js +14 -0
  764. package/dist/server/auth/presentation/decorators/auth.decorator.js.map +1 -0
  765. package/dist/server/auth/presentation/decorators/current-session-id.decorator.d.ts +2 -0
  766. package/dist/server/auth/presentation/decorators/current-session-id.decorator.d.ts.map +1 -0
  767. package/dist/server/auth/presentation/decorators/current-session-id.decorator.js +9 -0
  768. package/dist/server/auth/presentation/decorators/current-session-id.decorator.js.map +1 -0
  769. package/dist/server/auth/presentation/decorators/index.d.ts +4 -0
  770. package/dist/server/auth/presentation/decorators/index.d.ts.map +1 -0
  771. package/dist/server/auth/presentation/decorators/index.js +20 -0
  772. package/dist/server/auth/presentation/decorators/index.js.map +1 -0
  773. package/dist/server/auth/presentation/decorators/require-permissions.decorator.d.ts +3 -0
  774. package/dist/server/auth/presentation/decorators/require-permissions.decorator.d.ts.map +1 -0
  775. package/dist/server/auth/presentation/decorators/require-permissions.decorator.js +8 -0
  776. package/dist/server/auth/presentation/decorators/require-permissions.decorator.js.map +1 -0
  777. package/dist/server/auth/presentation/decorators/user.decorator.d.ts +7 -0
  778. package/dist/server/auth/presentation/decorators/user.decorator.d.ts.map +1 -0
  779. package/dist/server/auth/presentation/decorators/user.decorator.js +29 -0
  780. package/dist/server/auth/presentation/decorators/user.decorator.js.map +1 -0
  781. package/dist/server/auth/presentation/filters/global-exception.filter.d.ts +5 -0
  782. package/dist/server/auth/presentation/filters/global-exception.filter.d.ts.map +1 -0
  783. package/dist/server/auth/presentation/filters/global-exception.filter.js +44 -0
  784. package/dist/server/auth/presentation/filters/global-exception.filter.js.map +1 -0
  785. package/dist/server/auth/presentation/filters/index.d.ts +2 -0
  786. package/dist/server/auth/presentation/filters/index.d.ts.map +1 -0
  787. package/dist/server/auth/presentation/filters/index.js +18 -0
  788. package/dist/server/auth/presentation/filters/index.js.map +1 -0
  789. package/dist/server/auth/presentation/guards/index.d.ts +3 -0
  790. package/dist/server/auth/presentation/guards/index.d.ts.map +1 -0
  791. package/dist/server/auth/presentation/guards/index.js +19 -0
  792. package/dist/server/auth/presentation/guards/index.js.map +1 -0
  793. package/dist/server/auth/presentation/guards/jwt-auth.guard.d.ts +11 -0
  794. package/dist/server/auth/presentation/guards/jwt-auth.guard.d.ts.map +1 -0
  795. package/dist/server/auth/presentation/guards/jwt-auth.guard.js +45 -0
  796. package/dist/server/auth/presentation/guards/jwt-auth.guard.js.map +1 -0
  797. package/dist/server/auth/presentation/guards/permission.guard.d.ts +17 -0
  798. package/dist/server/auth/presentation/guards/permission.guard.d.ts.map +1 -0
  799. package/dist/server/auth/presentation/guards/permission.guard.js +87 -0
  800. package/dist/server/auth/presentation/guards/permission.guard.js.map +1 -0
  801. package/dist/server/auth/presentation/index.d.ts +4 -0
  802. package/dist/server/auth/presentation/index.d.ts.map +1 -0
  803. package/dist/server/auth/presentation/index.js +20 -0
  804. package/dist/server/auth/presentation/index.js.map +1 -0
  805. package/dist/server/auth/presentation/responses/oauth.response.d.ts +26 -0
  806. package/dist/server/auth/presentation/responses/oauth.response.d.ts.map +1 -0
  807. package/dist/server/auth/presentation/responses/oauth.response.js +33 -0
  808. package/dist/server/auth/presentation/responses/oauth.response.js.map +1 -0
  809. package/dist/server/auth/presentation/validators/index.d.ts +2 -0
  810. package/dist/server/auth/presentation/validators/index.d.ts.map +1 -0
  811. package/dist/server/auth/presentation/validators/index.js +18 -0
  812. package/dist/server/auth/presentation/validators/index.js.map +1 -0
  813. package/dist/server/auth/presentation/validators/is-username-unique.validator.d.ts +10 -0
  814. package/dist/server/auth/presentation/validators/is-username-unique.validator.d.ts.map +1 -0
  815. package/dist/server/auth/presentation/validators/is-username-unique.validator.js +54 -0
  816. package/dist/server/auth/presentation/validators/is-username-unique.validator.js.map +1 -0
  817. package/dist/server/auth/presentation/validators/password.validator.d.ts +4 -0
  818. package/dist/server/auth/presentation/validators/password.validator.d.ts.map +1 -0
  819. package/dist/server/auth/presentation/validators/password.validator.js +56 -0
  820. package/dist/server/auth/presentation/validators/password.validator.js.map +1 -0
  821. package/dist/server/common/events/mail/index.d.ts +7 -0
  822. package/dist/server/common/events/mail/index.d.ts.map +1 -0
  823. package/dist/server/common/events/mail/index.js +16 -0
  824. package/dist/server/common/events/mail/index.js.map +1 -0
  825. package/dist/server/common/events/mail/mail-events.constants.d.ts +9 -0
  826. package/dist/server/common/events/mail/mail-events.constants.d.ts.map +1 -0
  827. package/dist/server/common/events/mail/mail-events.constants.js +11 -0
  828. package/dist/server/common/events/mail/mail-events.constants.js.map +1 -0
  829. package/dist/server/common/events/mail/send-password-changed.event.d.ts +7 -0
  830. package/dist/server/common/events/mail/send-password-changed.event.d.ts.map +1 -0
  831. package/dist/server/common/events/mail/send-password-changed.event.js +15 -0
  832. package/dist/server/common/events/mail/send-password-changed.event.js.map +1 -0
  833. package/dist/server/common/events/mail/send-password-reset.event.d.ts +7 -0
  834. package/dist/server/common/events/mail/send-password-reset.event.d.ts.map +1 -0
  835. package/dist/server/common/events/mail/send-password-reset.event.js +15 -0
  836. package/dist/server/common/events/mail/send-password-reset.event.js.map +1 -0
  837. package/dist/server/common/events/mail/send-user-welcome.event.d.ts +7 -0
  838. package/dist/server/common/events/mail/send-user-welcome.event.d.ts.map +1 -0
  839. package/dist/server/common/events/mail/send-user-welcome.event.js +15 -0
  840. package/dist/server/common/events/mail/send-user-welcome.event.js.map +1 -0
  841. package/dist/server/common/events/mail/send-verification-email.event.d.ts +7 -0
  842. package/dist/server/common/events/mail/send-verification-email.event.d.ts.map +1 -0
  843. package/dist/server/common/events/mail/send-verification-email.event.js +15 -0
  844. package/dist/server/common/events/mail/send-verification-email.event.js.map +1 -0
  845. package/dist/server/common/events/mail/send-welcome-email.event.d.ts +6 -0
  846. package/dist/server/common/events/mail/send-welcome-email.event.d.ts.map +1 -0
  847. package/dist/server/common/events/mail/send-welcome-email.event.js +13 -0
  848. package/dist/server/common/events/mail/send-welcome-email.event.js.map +1 -0
  849. package/dist/server/index.d.ts +40 -0
  850. package/dist/server/index.d.ts.map +1 -0
  851. package/dist/server/index.js +139 -0
  852. package/dist/server/index.js.map +1 -0
  853. package/dist/server/lib/responder.d.ts +33 -0
  854. package/dist/server/lib/responder.d.ts.map +1 -0
  855. package/dist/server/lib/responder.js +75 -0
  856. package/dist/server/lib/responder.js.map +1 -0
  857. package/dist/server/shared/index.d.ts +3 -0
  858. package/dist/server/shared/index.d.ts.map +1 -0
  859. package/dist/server/shared/index.js +12 -0
  860. package/dist/server/shared/index.js.map +1 -0
  861. package/dist/server/shared/permissions.d.ts +78 -0
  862. package/dist/server/shared/permissions.d.ts.map +1 -0
  863. package/dist/server/shared/permissions.js +74 -0
  864. package/dist/server/shared/permissions.js.map +1 -0
  865. package/dist/server/shared/roles.d.ts +30 -0
  866. package/dist/server/shared/roles.d.ts.map +1 -0
  867. package/dist/server/shared/roles.js +31 -0
  868. package/dist/server/shared/roles.js.map +1 -0
  869. package/dist/server/user/application/dto/admin-user.dto.d.ts +51 -0
  870. package/dist/server/user/application/dto/admin-user.dto.d.ts.map +1 -0
  871. package/dist/server/user/application/dto/admin-user.dto.js +225 -0
  872. package/dist/server/user/application/dto/admin-user.dto.js.map +1 -0
  873. package/dist/server/user/application/dto/user-preferences.dto.d.ts +36 -0
  874. package/dist/server/user/application/dto/user-preferences.dto.d.ts.map +1 -0
  875. package/dist/server/user/application/dto/user-preferences.dto.js +76 -0
  876. package/dist/server/user/application/dto/user-preferences.dto.js.map +1 -0
  877. package/dist/server/user/application/listeners/auth-user-event.listener.d.ts +11 -0
  878. package/dist/server/user/application/listeners/auth-user-event.listener.d.ts.map +1 -0
  879. package/dist/server/user/application/listeners/auth-user-event.listener.js +114 -0
  880. package/dist/server/user/application/listeners/auth-user-event.listener.js.map +1 -0
  881. package/dist/server/user/application/repositories/user-setting.repository.d.ts +13 -0
  882. package/dist/server/user/application/repositories/user-setting.repository.d.ts.map +1 -0
  883. package/dist/server/user/application/repositories/user-setting.repository.js +84 -0
  884. package/dist/server/user/application/repositories/user-setting.repository.js.map +1 -0
  885. package/dist/server/user/application/services/user-preferences.service.d.ts +12 -0
  886. package/dist/server/user/application/services/user-preferences.service.d.ts.map +1 -0
  887. package/dist/server/user/application/services/user-preferences.service.js +65 -0
  888. package/dist/server/user/application/services/user-preferences.service.js.map +1 -0
  889. package/dist/server/user/application/services/user.service.d.ts +56 -0
  890. package/dist/server/user/application/services/user.service.d.ts.map +1 -0
  891. package/dist/server/user/application/services/user.service.js +213 -0
  892. package/dist/server/user/application/services/user.service.js.map +1 -0
  893. package/dist/server/user/domain/constants/user-events.const.d.ts +9 -0
  894. package/dist/server/user/domain/constants/user-events.const.d.ts.map +1 -0
  895. package/dist/server/user/domain/constants/user-events.const.js +11 -0
  896. package/dist/server/user/domain/constants/user-events.const.js.map +1 -0
  897. package/dist/server/user/domain/entities/user.entity.d.ts +37 -0
  898. package/dist/server/user/domain/entities/user.entity.d.ts.map +1 -0
  899. package/dist/server/user/domain/entities/user.entity.js +71 -0
  900. package/dist/server/user/domain/entities/user.entity.js.map +1 -0
  901. package/dist/server/user/domain/repositories/user.repository.d.ts +26 -0
  902. package/dist/server/user/domain/repositories/user.repository.d.ts.map +1 -0
  903. package/dist/server/user/domain/repositories/user.repository.js +3 -0
  904. package/dist/server/user/domain/repositories/user.repository.js.map +1 -0
  905. package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.d.ts +29 -0
  906. package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.d.ts.map +1 -0
  907. package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.js +82 -0
  908. package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.js.map +1 -0
  909. package/dist/server/user/infrastructure/persistence/entities/user.entity.d.ts +19 -0
  910. package/dist/server/user/infrastructure/persistence/entities/user.entity.d.ts.map +1 -0
  911. package/dist/server/user/infrastructure/persistence/entities/user.entity.js +100 -0
  912. package/dist/server/user/infrastructure/persistence/entities/user.entity.js.map +1 -0
  913. package/dist/server/user/infrastructure/persistence/mappers/user.mapper.d.ts +8 -0
  914. package/dist/server/user/infrastructure/persistence/mappers/user.mapper.d.ts.map +1 -0
  915. package/dist/server/user/infrastructure/persistence/mappers/user.mapper.js +59 -0
  916. package/dist/server/user/infrastructure/persistence/mappers/user.mapper.js.map +1 -0
  917. package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.d.ts +31 -0
  918. package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.d.ts.map +1 -0
  919. package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.js +123 -0
  920. package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.js.map +1 -0
  921. package/dist/server/user/presentation/controllers/admin-user.controller.d.ts +77 -0
  922. package/dist/server/user/presentation/controllers/admin-user.controller.d.ts.map +1 -0
  923. package/dist/server/user/presentation/controllers/admin-user.controller.js +358 -0
  924. package/dist/server/user/presentation/controllers/admin-user.controller.js.map +1 -0
  925. package/dist/server/user/user.module.d.ts +3 -0
  926. package/dist/server/user/user.module.d.ts.map +1 -0
  927. package/dist/server/user/user.module.js +46 -0
  928. package/dist/server/user/user.module.js.map +1 -0
  929. package/package.json +2 -2
  930. package/src/client/styles/globals.css +2 -1
@@ -0,0 +1,53 @@
1
+ import { ModuleMetadata, Type } from '@nestjs/common';
2
+ import type { PermissionDef, RoleDef } from './shared';
3
+ export interface AdminCoreOAuthProviderOptions {
4
+ clientId: string;
5
+ clientSecret: string;
6
+ callbackURL: string;
7
+ }
8
+ export interface AdminCoreFacebookOptions {
9
+ appId: string;
10
+ appSecret: string;
11
+ callbackURL: string;
12
+ }
13
+ export interface AdminCoreClientSecrets {
14
+ webAdmin: string;
15
+ webPublic: string;
16
+ thirdPartyDemo: string;
17
+ apiService: string;
18
+ }
19
+ export interface AdminCoreSeederOptions {
20
+ adminRedirectUris?: string[];
21
+ webRedirectUris?: string[];
22
+ mobileRedirectUris?: string[];
23
+ clientSecrets?: AdminCoreClientSecrets;
24
+ }
25
+ export interface AdminCoreOptions {
26
+ jwt: {
27
+ accessSecret: string;
28
+ accessExpiresIn?: string;
29
+ refreshSecret?: string;
30
+ refreshExpiresIn?: string;
31
+ };
32
+ rootEmail: string;
33
+ rootPassword?: string;
34
+ oauth?: {
35
+ google?: AdminCoreOAuthProviderOptions;
36
+ github?: AdminCoreOAuthProviderOptions;
37
+ facebook?: AdminCoreFacebookOptions;
38
+ };
39
+ seeder?: AdminCoreSeederOptions;
40
+ extraPermissions?: PermissionDef[];
41
+ extraRoles?: RoleDef[];
42
+ }
43
+ export interface AdminCoreOptionsFactory {
44
+ createAdminCoreOptions(): Promise<AdminCoreOptions> | AdminCoreOptions;
45
+ }
46
+ export interface AdminCoreAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
47
+ useFactory?: (...args: any[]) => Promise<AdminCoreOptions> | AdminCoreOptions;
48
+ inject?: any[];
49
+ useClass?: Type<AdminCoreOptionsFactory>;
50
+ useExisting?: Type<AdminCoreOptionsFactory>;
51
+ }
52
+ export declare const ADMIN_CORE_OPTIONS = "ADMIN_CORE_OPTIONS";
53
+ //# sourceMappingURL=admin-core-options.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-core-options.interface.d.ts","sourceRoot":"","sources":["../../src/server/admin-core-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IAErC,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,MAAM,CAAC;IAElB,cAAc,EAAE,MAAM,CAAC;IAEvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IAErC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAM9B,aAAa,CAAC,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=admin-core-options.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-core-options.interface.js","sourceRoot":"","sources":["../../src/server/admin-core-options.interface.ts"],"names":[],"mappings":";;;AAuFa,QAAA,kBAAkB,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DynamicModule } from '@nestjs/common';
2
+ import { AdminCoreOptions, AdminCoreAsyncOptions } from './admin-core-options.interface';
3
+ export declare class AdminCoreModule {
4
+ static forRoot(options: AdminCoreOptions): DynamicModule;
5
+ static forRootAsync(options: AdminCoreAsyncOptions): DynamicModule;
6
+ private static createAsyncProviders;
7
+ }
8
+ //# sourceMappingURL=admin-core.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-core.module.d.ts","sourceRoot":"","sources":["../../src/server/admin-core.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAY,MAAM,gBAAgB,CAAC;AAOzE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EAGtB,MAAM,gCAAgC,CAAC;AAySxC,qBAEa,eAAe;IAI1B,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa;IAsDxD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,aAAa;IAwDlE,OAAO,CAAC,MAAM,CAAC,oBAAoB;CAuCpC"}
@@ -0,0 +1,292 @@
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 AdminCoreModule_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.AdminCoreModule = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const typeorm_1 = require("@nestjs/typeorm");
13
+ const jwt_1 = require("@nestjs/jwt");
14
+ const passport_1 = require("@nestjs/passport");
15
+ const event_emitter_1 = require("@nestjs/event-emitter");
16
+ const admin_core_options_interface_1 = require("./admin-core-options.interface");
17
+ const entities_1 = require("./auth/infrastructure/persistence/entities");
18
+ const mappers_1 = require("./auth/infrastructure/persistence/mappers");
19
+ const repositories_1 = require("./auth/infrastructure/persistence/repositories");
20
+ const services_1 = require("./auth/infrastructure/services");
21
+ const schedulers_1 = require("./auth/infrastructure/schedulers");
22
+ const strategies_1 = require("./auth/infrastructure/strategies");
23
+ const repositories_2 = require("./auth/domain/repositories");
24
+ const ports_1 = require("./auth/application/ports");
25
+ const ports_2 = require("./auth/application/ports");
26
+ const auth_1 = require("./auth/application/actions/auth");
27
+ const session_1 = require("./auth/application/actions/session");
28
+ const two_factor_1 = require("./auth/application/actions/two-factor");
29
+ const social_1 = require("./auth/application/actions/social");
30
+ const auth_user_service_1 = require("./auth/application/services/auth-user.service");
31
+ const role_service_1 = require("./auth/application/services/role.service");
32
+ const permission_service_1 = require("./auth/application/services/permission.service");
33
+ const controllers_1 = require("./auth/presentation/controllers");
34
+ const guards_1 = require("./auth/presentation/guards");
35
+ const validators_1 = require("./auth/presentation/validators");
36
+ const user_entity_1 = require("./user/infrastructure/persistence/entities/user.entity");
37
+ const user_setting_entity_1 = require("./user/infrastructure/persistence/entities/user-setting.entity");
38
+ const user_mapper_1 = require("./user/infrastructure/persistence/mappers/user.mapper");
39
+ const user_repository_impl_1 = require("./user/infrastructure/persistence/repositories/user.repository.impl");
40
+ const user_service_1 = require("./user/application/services/user.service");
41
+ const user_preferences_service_1 = require("./user/application/services/user-preferences.service");
42
+ const user_setting_repository_1 = require("./user/application/repositories/user-setting.repository");
43
+ const auth_user_event_listener_1 = require("./user/application/listeners/auth-user-event.listener");
44
+ const admin_user_controller_1 = require("./user/presentation/controllers/admin-user.controller");
45
+ const authEntities = [
46
+ entities_1.AuthUserEntity,
47
+ entities_1.RoleEntity,
48
+ entities_1.PermissionEntity,
49
+ entities_1.UserRoleEntity,
50
+ entities_1.RolePermissionEntity,
51
+ entities_1.OAuthClientEntity,
52
+ entities_1.OAuthScopeEntity,
53
+ entities_1.OAuthAuthorizationCodeEntity,
54
+ entities_1.OAuthTokenEntity,
55
+ entities_1.OAuthClientConsentEntity,
56
+ entities_1.UserSessionEntity,
57
+ entities_1.LoginHistoryEntity,
58
+ entities_1.UserTwoFactorEntity,
59
+ entities_1.EmailVerificationTokenEntity,
60
+ entities_1.SocialAccountEntity,
61
+ entities_1.OAuthAuditLogEntity,
62
+ ];
63
+ const userEntities = [user_entity_1.UserEntity, user_setting_entity_1.UserSettingEntity];
64
+ const allEntities = [...authEntities, ...userEntities];
65
+ const mappers = [
66
+ mappers_1.AuthUserMapper,
67
+ mappers_1.RoleMapper,
68
+ mappers_1.PermissionMapper,
69
+ mappers_1.UserRoleMapper,
70
+ mappers_1.RolePermissionMapper,
71
+ mappers_1.OAuthClientMapper,
72
+ mappers_1.OAuthScopeMapper,
73
+ mappers_1.OAuthAuthorizationCodeMapper,
74
+ mappers_1.OAuthTokenMapper,
75
+ mappers_1.OAuthClientConsentMapper,
76
+ mappers_1.UserSessionMapper,
77
+ mappers_1.LoginHistoryMapper,
78
+ mappers_1.UserTwoFactorMapper,
79
+ mappers_1.EmailVerificationTokenMapper,
80
+ mappers_1.SocialAccountMapper,
81
+ mappers_1.OAuthAuditLogMapper,
82
+ user_mapper_1.UserMapper,
83
+ ];
84
+ const repositoryProviders = [
85
+ { provide: repositories_2.AUTH_USER_REPOSITORY_TOKEN, useClass: repositories_1.AuthUserRepositoryImpl },
86
+ { provide: repositories_2.ROLE_REPOSITORY_TOKEN, useClass: repositories_1.RoleRepositoryImpl },
87
+ { provide: repositories_2.PERMISSION_REPOSITORY_TOKEN, useClass: repositories_1.PermissionRepositoryImpl },
88
+ { provide: repositories_2.USER_ROLE_REPOSITORY_TOKEN, useClass: repositories_1.UserRoleRepositoryImpl },
89
+ { provide: repositories_2.ROLE_PERMISSION_REPOSITORY_TOKEN, useClass: repositories_1.RolePermissionRepositoryImpl },
90
+ { provide: repositories_2.OAUTH_CLIENT_REPOSITORY_TOKEN, useClass: repositories_1.OAuthClientRepositoryImpl },
91
+ { provide: repositories_2.OAUTH_SCOPE_REPOSITORY_TOKEN, useClass: repositories_1.OAuthScopeRepositoryImpl },
92
+ { provide: repositories_2.OAUTH_AUTHORIZATION_CODE_REPOSITORY_TOKEN, useClass: repositories_1.OAuthAuthorizationCodeRepositoryImpl },
93
+ { provide: repositories_2.OAUTH_TOKEN_REPOSITORY_TOKEN, useClass: repositories_1.OAuthTokenRepositoryImpl },
94
+ { provide: repositories_2.OAUTH_CLIENT_CONSENT_REPOSITORY_TOKEN, useClass: repositories_1.OAuthClientConsentRepositoryImpl },
95
+ { provide: repositories_2.USER_SESSION_REPOSITORY_TOKEN, useClass: repositories_1.UserSessionRepositoryImpl },
96
+ { provide: repositories_2.LOGIN_HISTORY_REPOSITORY_TOKEN, useClass: repositories_1.LoginHistoryRepositoryImpl },
97
+ { provide: repositories_2.USER_TWO_FACTOR_REPOSITORY_TOKEN, useClass: repositories_1.UserTwoFactorRepositoryImpl },
98
+ { provide: repositories_2.EMAIL_VERIFICATION_TOKEN_REPOSITORY_TOKEN, useClass: repositories_1.EmailVerificationTokenRepositoryImpl },
99
+ { provide: repositories_2.SOCIAL_ACCOUNT_REPOSITORY_TOKEN, useClass: repositories_1.SocialAccountRepositoryImpl },
100
+ { provide: repositories_2.OAUTH_AUDIT_LOG_REPOSITORY_TOKEN, useClass: repositories_1.OAuthAuditLogRepositoryImpl },
101
+ { provide: 'IUserRepository', useClass: user_repository_impl_1.UserRepositoryImpl },
102
+ ];
103
+ const serviceProviders = [
104
+ { provide: ports_1.HASH_SERVICE_TOKEN, useClass: services_1.BcryptHashService },
105
+ { provide: ports_1.TOKEN_SERVICE_TOKEN, useClass: services_1.JwtTokenService },
106
+ { provide: ports_2.SocialAuthService, useClass: services_1.GoogleAuthService },
107
+ auth_user_service_1.AuthUserService,
108
+ services_1.SessionService,
109
+ services_1.EmailVerificationService,
110
+ services_1.AuthorizationCodeService,
111
+ services_1.ConsentService,
112
+ services_1.TokenService,
113
+ services_1.RootAccountService,
114
+ user_service_1.UserService,
115
+ user_preferences_service_1.UserPreferencesService,
116
+ user_setting_repository_1.UserSettingRepository,
117
+ ];
118
+ const actions = [
119
+ auth_1.LoginAction,
120
+ auth_1.RegisterAction,
121
+ auth_1.RefreshTokenAction,
122
+ auth_1.LogoutAction,
123
+ auth_1.VerifyEmailAction,
124
+ auth_1.ForgotPasswordAction,
125
+ auth_1.ResetPasswordAction,
126
+ auth_1.ResendVerificationEmailAction,
127
+ auth_1.ChangePasswordAction,
128
+ auth_1.GetUserProfileAction,
129
+ auth_1.UpdateProfileAction,
130
+ auth_1.ClientCredentialsAction,
131
+ auth_1.GetRolesPermissionsAction,
132
+ session_1.GetActiveSessionsAction,
133
+ session_1.RevokeSessionAction,
134
+ session_1.RevokeAllSessionsAction,
135
+ two_factor_1.Enable2FAAction,
136
+ two_factor_1.Verify2FASetupAction,
137
+ two_factor_1.Disable2FAAction,
138
+ social_1.SocialLoginAction,
139
+ ];
140
+ const controllers = [
141
+ controllers_1.AuthController,
142
+ controllers_1.SessionController,
143
+ controllers_1.PasswordController,
144
+ controllers_1.EmailController,
145
+ controllers_1.TwoFactorController,
146
+ controllers_1.SocialAuthController,
147
+ controllers_1.RoleController,
148
+ controllers_1.PermissionController,
149
+ admin_user_controller_1.AdminUserController,
150
+ ];
151
+ let AdminCoreModule = AdminCoreModule_1 = class AdminCoreModule {
152
+ static forRoot(options) {
153
+ const optionsProvider = {
154
+ provide: admin_core_options_interface_1.ADMIN_CORE_OPTIONS,
155
+ useValue: options,
156
+ };
157
+ return {
158
+ module: AdminCoreModule_1,
159
+ imports: [
160
+ event_emitter_1.EventEmitterModule.forRoot(),
161
+ passport_1.PassportModule.register({ defaultStrategy: 'jwt' }),
162
+ typeorm_1.TypeOrmModule.forFeature(allEntities),
163
+ jwt_1.JwtModule.register({
164
+ secret: options.jwt.accessSecret,
165
+ signOptions: {
166
+ expiresIn: (options.jwt.accessExpiresIn || '1h'),
167
+ },
168
+ }),
169
+ ],
170
+ controllers,
171
+ providers: [
172
+ optionsProvider,
173
+ strategies_1.JwtStrategy,
174
+ guards_1.PermissionGuard,
175
+ validators_1.IsUsernameUniqueConstraint,
176
+ schedulers_1.CleanupScheduler,
177
+ role_service_1.RoleService,
178
+ permission_service_1.PermissionService,
179
+ auth_user_event_listener_1.AuthUserEventListener,
180
+ ...mappers,
181
+ ...repositoryProviders,
182
+ ...serviceProviders,
183
+ ...actions,
184
+ ],
185
+ exports: [
186
+ admin_core_options_interface_1.ADMIN_CORE_OPTIONS,
187
+ typeorm_1.TypeOrmModule,
188
+ guards_1.PermissionGuard,
189
+ auth_user_service_1.AuthUserService,
190
+ user_service_1.UserService,
191
+ user_preferences_service_1.UserPreferencesService,
192
+ user_setting_repository_1.UserSettingRepository,
193
+ role_service_1.RoleService,
194
+ permission_service_1.PermissionService,
195
+ ...repositoryProviders,
196
+ ...serviceProviders,
197
+ ...actions,
198
+ ],
199
+ };
200
+ }
201
+ static forRootAsync(options) {
202
+ const asyncProviders = AdminCoreModule_1.createAsyncProviders(options);
203
+ return {
204
+ module: AdminCoreModule_1,
205
+ imports: [
206
+ ...(options.imports || []),
207
+ event_emitter_1.EventEmitterModule.forRoot(),
208
+ passport_1.PassportModule.register({ defaultStrategy: 'jwt' }),
209
+ typeorm_1.TypeOrmModule.forFeature(allEntities),
210
+ jwt_1.JwtModule.registerAsync({
211
+ imports: options.imports || [],
212
+ inject: [admin_core_options_interface_1.ADMIN_CORE_OPTIONS],
213
+ useFactory: (coreOptions) => ({
214
+ secret: coreOptions.jwt.accessSecret,
215
+ signOptions: {
216
+ expiresIn: (coreOptions.jwt.accessExpiresIn || '1h'),
217
+ },
218
+ }),
219
+ }),
220
+ ],
221
+ controllers,
222
+ providers: [
223
+ ...asyncProviders,
224
+ strategies_1.JwtStrategy,
225
+ guards_1.PermissionGuard,
226
+ validators_1.IsUsernameUniqueConstraint,
227
+ schedulers_1.CleanupScheduler,
228
+ role_service_1.RoleService,
229
+ permission_service_1.PermissionService,
230
+ auth_user_event_listener_1.AuthUserEventListener,
231
+ ...mappers,
232
+ ...repositoryProviders,
233
+ ...serviceProviders,
234
+ ...actions,
235
+ ],
236
+ exports: [
237
+ admin_core_options_interface_1.ADMIN_CORE_OPTIONS,
238
+ typeorm_1.TypeOrmModule,
239
+ guards_1.PermissionGuard,
240
+ auth_user_service_1.AuthUserService,
241
+ user_service_1.UserService,
242
+ user_preferences_service_1.UserPreferencesService,
243
+ user_setting_repository_1.UserSettingRepository,
244
+ role_service_1.RoleService,
245
+ permission_service_1.PermissionService,
246
+ ...repositoryProviders,
247
+ ...serviceProviders,
248
+ ...actions,
249
+ ],
250
+ };
251
+ }
252
+ static createAsyncProviders(options) {
253
+ if (options.useFactory) {
254
+ return [
255
+ {
256
+ provide: admin_core_options_interface_1.ADMIN_CORE_OPTIONS,
257
+ useFactory: options.useFactory,
258
+ inject: options.inject || [],
259
+ },
260
+ ];
261
+ }
262
+ if (options.useClass) {
263
+ return [
264
+ {
265
+ provide: options.useClass,
266
+ useClass: options.useClass,
267
+ },
268
+ {
269
+ provide: admin_core_options_interface_1.ADMIN_CORE_OPTIONS,
270
+ useFactory: async (optionsFactory) => optionsFactory.createAdminCoreOptions(),
271
+ inject: [options.useClass],
272
+ },
273
+ ];
274
+ }
275
+ if (options.useExisting) {
276
+ return [
277
+ {
278
+ provide: admin_core_options_interface_1.ADMIN_CORE_OPTIONS,
279
+ useFactory: async (optionsFactory) => optionsFactory.createAdminCoreOptions(),
280
+ inject: [options.useExisting],
281
+ },
282
+ ];
283
+ }
284
+ return [];
285
+ }
286
+ };
287
+ exports.AdminCoreModule = AdminCoreModule;
288
+ exports.AdminCoreModule = AdminCoreModule = AdminCoreModule_1 = __decorate([
289
+ (0, common_1.Global)(),
290
+ (0, common_1.Module)({})
291
+ ], AdminCoreModule);
292
+ //# sourceMappingURL=admin-core.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-core.module.js","sourceRoot":"","sources":["../../src/server/admin-core.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAyE;AACzE,6CAAgD;AAChD,qCAAwC;AACxC,+CAAkD;AAElD,yDAA2D;AAE3D,iFAKwC;AAGxC,yEAiBoD;AAGpD,uEAiBmD;AAGnD,iFAiBwD;AAGxD,6DAUwC;AAGxC,iEAAoE;AAGpE,iEAA+D;AAM/D,6DAiBoC;AAGpC,oDAAmF;AACnF,oDAA6D;AAG7D,0DAcyC;AAEzC,gEAI4C;AAE5C,sEAI+C;AAE/C,8DAAsE;AAGtE,qFAAgF;AAChF,2EAAuE;AACvE,uFAAmF;AAGnF,iEASyC;AAEzC,uDAA6D;AAC7D,+DAA4E;AAG5E,wFAAoF;AACpF,wGAAmG;AACnG,uFAAmF;AACnF,8GAAyG;AACzG,2EAAuE;AACvE,mGAA8F;AAC9F,qGAAgG;AAChG,oGAA8F;AAC9F,iGAA4F;AAM5F,MAAM,YAAY,GAAG;IACnB,yBAAc;IACd,qBAAU;IACV,2BAAgB;IAChB,yBAAc;IACd,+BAAoB;IACpB,4BAAiB;IACjB,2BAAgB;IAChB,uCAA4B;IAC5B,2BAAgB;IAChB,mCAAwB;IACxB,4BAAiB;IACjB,6BAAkB;IAClB,8BAAmB;IACnB,uCAA4B;IAC5B,8BAAmB;IACnB,8BAAmB;CACpB,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,wBAAU,EAAE,uCAAiB,CAAC,CAAC;AAErD,MAAM,WAAW,GAAG,CAAC,GAAG,YAAY,EAAE,GAAG,YAAY,CAAC,CAAC;AAEvD,MAAM,OAAO,GAAG;IACd,wBAAc;IACd,oBAAU;I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,cAAuC,EAAE,EAAE,CAC5D,cAAc,CAAC,sBAAsB,EAAE;oBACzC,MAAM,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;iBAC3B;aACF,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;YACxB,OAAO;gBACL;oBACE,OAAO,EAAE,iDAAkB;oBAC3B,UAAU,EAAE,KAAK,EAAE,cAAuC,EAAE,EAAE,CAC5D,cAAc,CAAC,sBAAsB,EAAE;oBACzC,MAAM,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;iBAC9B;aACF,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAA;AAzJY,0CAAe;0BAAf,eAAe;IAF3B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,eAAe,CAyJ3B"}
@@ -0,0 +1,12 @@
1
+ import { AuthUserRepository } from '../../../domain/repositories';
2
+ import { ChangePasswordDto } from '../../dto/change-password.dto';
3
+ import { HashService } from '../../ports';
4
+ import { RevokeAllSessionsAction } from '../session/revoke-all-sessions.action';
5
+ export declare class ChangePasswordAction {
6
+ private readonly authUserRepository;
7
+ private readonly hashService;
8
+ private readonly revokeAllSessionsAction;
9
+ constructor(authUserRepository: AuthUserRepository, hashService: HashService, revokeAllSessionsAction: RevokeAllSessionsAction);
10
+ handle(userId: number, dto: ChangePasswordDto, currentSessionId: number): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=change-password.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-password.action.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/auth/change-password.action.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAEL,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAGhF,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,uBAAuB;gBAHvB,kBAAkB,EAAE,kBAAkB,EAEtC,WAAW,EAAE,WAAW,EACxB,uBAAuB,EAAE,uBAAuB;IAM7D,MAAM,CAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,GAAK,OAAO,CAAC,IAAI,CAAC;CAiCjG"}
@@ -0,0 +1,56 @@
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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ChangePasswordAction = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const repositories_1 = require("../../../domain/repositories");
18
+ const ports_1 = require("../../ports");
19
+ const revoke_all_sessions_action_1 = require("../session/revoke-all-sessions.action");
20
+ const enums_1 = require("../../../domain/enums");
21
+ let ChangePasswordAction = class ChangePasswordAction {
22
+ authUserRepository;
23
+ hashService;
24
+ revokeAllSessionsAction;
25
+ constructor(authUserRepository, hashService, revokeAllSessionsAction) {
26
+ this.authUserRepository = authUserRepository;
27
+ this.hashService = hashService;
28
+ this.revokeAllSessionsAction = revokeAllSessionsAction;
29
+ }
30
+ async handle(userId, dto, currentSessionId) {
31
+ const user = await this.authUserRepository.findById(userId);
32
+ if (!user) {
33
+ throw new common_1.NotFoundException('User không tồn tại');
34
+ }
35
+ const isCurrentPasswordValid = await this.hashService.compare(dto.currentPassword, user.passwordHash);
36
+ if (!isCurrentPasswordValid) {
37
+ throw new common_1.UnauthorizedException('Mật khẩu hiện tại không đúng');
38
+ }
39
+ const isSamePassword = await this.hashService.compare(dto.newPassword, user.passwordHash);
40
+ if (isSamePassword) {
41
+ throw new Error('Mật khẩu mới không được giống mật khẩu cũ');
42
+ }
43
+ const newPasswordHash = await this.hashService.hash(dto.newPassword);
44
+ user.updatePassword(newPasswordHash);
45
+ await this.authUserRepository.save(user);
46
+ await this.revokeAllSessionsAction.handle(userId, enums_1.SessionRevokeReason.PASSWORD_CHANGED, currentSessionId);
47
+ }
48
+ };
49
+ exports.ChangePasswordAction = ChangePasswordAction;
50
+ exports.ChangePasswordAction = ChangePasswordAction = __decorate([
51
+ (0, common_1.Injectable)(),
52
+ __param(0, (0, common_1.Inject)(repositories_1.AUTH_USER_REPOSITORY_TOKEN)),
53
+ __param(1, (0, common_1.Inject)(ports_1.HASH_SERVICE_TOKEN)),
54
+ __metadata("design:paramtypes", [Object, Object, revoke_all_sessions_action_1.RevokeAllSessionsAction])
55
+ ], ChangePasswordAction);
56
+ //# sourceMappingURL=change-password.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-password.action.js","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/auth/change-password.action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AAExB,+DAGsC;AAEtC,uCAGqB;AACrB,sFAAgF;AAChF,iDAA4D;AAGrD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAGZ;IAEA;IACA;IALnB,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B;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,yCAA0B,CAAC,CAAA;IAElC,WAAA,IAAA,eAAM,EAAC,0BAAkB,CAAC,CAAA;qDAEe,oDAAuB;GANxD,oBAAoB,CA6ChC"}
@@ -0,0 +1,16 @@
1
+ import { OAuthClientRepository, OAuthTokenRepository } from '../../../domain/repositories';
2
+ import { ClientCredentialsDto } from '../../dto/client-credentials.dto';
3
+ import { TokenResponse } from '../../dto/token-response';
4
+ import { TokenService, HashService } from '../../ports';
5
+ export declare class ClientCredentialsAction {
6
+ private readonly oauthClientRepository;
7
+ private readonly oauthTokenRepository;
8
+ private readonly tokenService;
9
+ private readonly hashService;
10
+ constructor(oauthClientRepository: OAuthClientRepository, oauthTokenRepository: OAuthTokenRepository, tokenService: TokenService, hashService: HashService);
11
+ handle(dto: ClientCredentialsDto): Promise<TokenResponse>;
12
+ private validateClient;
13
+ private validateScopes;
14
+ private saveAccessToken;
15
+ }
16
+ //# sourceMappingURL=client-credentials.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-credentials.action.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/auth/client-credentials.action.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAEL,YAAY,EAEZ,WAAW,EACZ,MAAM,aAAa,CAAC;AAIrB,qBACa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IAEtC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IAErC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,WAAW;gBANX,qBAAqB,EAAE,qBAAqB,EAE5C,oBAAoB,EAAE,oBAAoB,EAE1C,YAAY,EAAE,YAAY,EAE1B,WAAW,EAAE,WAAW;IAOrC,MAAM,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC;YAgCjD,cAAc;IA8B5B,OAAO,CAAC,cAAc;YAsBR,eAAe;CAoB9B"}
@@ -0,0 +1,101 @@
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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ClientCredentialsAction = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const repositories_1 = require("../../../domain/repositories");
18
+ const token_response_1 = require("../../dto/token-response");
19
+ const ports_1 = require("../../ports");
20
+ const oauth_token_1 = require("../../../domain/entities/oauth-token");
21
+ const enums_1 = require("../../../domain/enums");
22
+ let ClientCredentialsAction = class ClientCredentialsAction {
23
+ oauthClientRepository;
24
+ oauthTokenRepository;
25
+ tokenService;
26
+ hashService;
27
+ constructor(oauthClientRepository, oauthTokenRepository, tokenService, hashService) {
28
+ this.oauthClientRepository = oauthClientRepository;
29
+ this.oauthTokenRepository = oauthTokenRepository;
30
+ this.tokenService = tokenService;
31
+ this.hashService = hashService;
32
+ }
33
+ async handle(dto) {
34
+ const client = await this.validateClient(dto);
35
+ if (!client.allowedGrants.includes('client_credentials')) {
36
+ throw new common_1.UnauthorizedException('Client is not authorized for client_credentials grant');
37
+ }
38
+ const requestedScopes = dto.scope ? dto.scope.split(' ') : [];
39
+ const allowedScopes = this.validateScopes(requestedScopes, client.allowedScopes);
40
+ const accessToken = this.tokenService.generateClientAccessToken({
41
+ clientId: client.id,
42
+ scopes: allowedScopes,
43
+ });
44
+ await this.saveAccessToken(accessToken, client, allowedScopes);
45
+ return new token_response_1.TokenResponse({
46
+ accessToken,
47
+ tokenType: 'Bearer',
48
+ expiresIn: client.accessTokenLifetime,
49
+ });
50
+ }
51
+ async validateClient(dto) {
52
+ const client = await this.oauthClientRepository.findByClientCode(dto.client_id);
53
+ if (!client) {
54
+ throw new common_1.UnauthorizedException('Invalid client credentials');
55
+ }
56
+ if (!client.canBeUsed()) {
57
+ throw new common_1.UnauthorizedException('Client is not active');
58
+ }
59
+ if (!client.confidential || !client.clientSecret) {
60
+ throw new common_1.UnauthorizedException('Client credentials grant requires confidential client');
61
+ }
62
+ const isSecretValid = await this.hashService.compare(dto.client_secret, client.clientSecret);
63
+ if (!isSecretValid) {
64
+ throw new common_1.UnauthorizedException('Invalid client credentials');
65
+ }
66
+ return client;
67
+ }
68
+ validateScopes(requestedScopes, allowedScopes) {
69
+ if (requestedScopes.length === 0) {
70
+ return allowedScopes;
71
+ }
72
+ const invalidScopes = requestedScopes.filter((scope) => !allowedScopes.includes(scope));
73
+ if (invalidScopes.length > 0) {
74
+ throw new common_1.UnauthorizedException(`Invalid scopes: ${invalidScopes.join(', ')}`);
75
+ }
76
+ return requestedScopes;
77
+ }
78
+ async saveAccessToken(accessToken, client, scopes) {
79
+ const expiresAt = new Date();
80
+ expiresAt.setSeconds(expiresAt.getSeconds() + client.accessTokenLifetime);
81
+ await this.oauthTokenRepository.create(new oauth_token_1.OAuthToken({
82
+ tokenType: enums_1.OAuthTokenType.ACCESS_TOKEN,
83
+ token: accessToken,
84
+ clientId: client.id,
85
+ userId: null,
86
+ sessionId: null,
87
+ scopes,
88
+ expiresAt,
89
+ }));
90
+ }
91
+ };
92
+ exports.ClientCredentialsAction = ClientCredentialsAction;
93
+ exports.ClientCredentialsAction = ClientCredentialsAction = __decorate([
94
+ (0, common_1.Injectable)(),
95
+ __param(0, (0, common_1.Inject)(repositories_1.OAUTH_CLIENT_REPOSITORY_TOKEN)),
96
+ __param(1, (0, common_1.Inject)(repositories_1.OAUTH_TOKEN_REPOSITORY_TOKEN)),
97
+ __param(2, (0, common_1.Inject)(ports_1.TOKEN_SERVICE_TOKEN)),
98
+ __param(3, (0, common_1.Inject)(ports_1.HASH_SERVICE_TOKEN)),
99
+ __metadata("design:paramtypes", [Object, Object, Object, Object])
100
+ ], ClientCredentialsAction);
101
+ //# sourceMappingURL=client-credentials.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-credentials.action.js","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/auth/client-credentials.action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2E;AAE3E,+DAKsC;AAEtC,6DAAyD;AACzD,uCAKqB;AACrB,sEAAkE;AAClE,iDAAuD;AAGhD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAGf;IAEA;IAEA;IAEA;IARnB,YAEmB,qBAA4C,EAE5C,oBAA0C,EAE1C,YAA0B,EAE1B,WAAwB;QANxB,0BAAqB,GAArB,qBAAqB,CAAuB;QAE5C,yBAAoB,GAApB,oBAAoB,CAAsB;QAE1C,iBAAY,GAAZ,YAAY,CAAc;QAE1B,gBAAW,GAAX,WAAW,CAAa;IACxC,CAAC;IAMJ,KAAK,CAAC,MAAM,CAAC,GAAyB;QAEpC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QAG9C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,8BAAqB,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,IAAA,eAAM,EAAC,2CAA4B,CAAC,CAAA;IAEpC,WAAA,IAAA,eAAM,EAAC,2BAAmB,CAAC,CAAA;IAE3B,WAAA,IAAA,eAAM,EAAC,0BAAkB,CAAC,CAAA;;GARlB,uBAAuB,CAwHnC"}
@@ -0,0 +1,12 @@
1
+ import { EventEmitter2 } from '@nestjs/event-emitter';
2
+ import { AuthUserRepository } from '../../../domain/repositories';
3
+ import { ForgotPasswordDto } from '../../dto/forgot-password.dto';
4
+ import { TokenService } from '../../ports/token.service';
5
+ export declare class ForgotPasswordAction {
6
+ private readonly authUserRepository;
7
+ private readonly tokenService;
8
+ private readonly eventEmitter;
9
+ constructor(authUserRepository: AuthUserRepository, tokenService: TokenService, eventEmitter: EventEmitter2);
10
+ handle(dto: ForgotPasswordDto): Promise<string>;
11
+ }
12
+ //# sourceMappingURL=forgot-password.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgot-password.action.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/auth/forgot-password.action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAEL,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAEL,YAAY,EACb,MAAM,2BAA2B,CAAC;AAGnC,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAHZ,kBAAkB,EAAE,kBAAkB,EAEtC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,aAAa;IAMxC,MAAM,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;CAmBtD"}