@baseplate-dev/plugin-auth 2.0.0 → 2.0.2

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 (241) hide show
  1. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts +88 -3
  2. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +1 -1
  3. package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts +176 -6
  4. package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts.map +1 -1
  5. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts +88 -3
  6. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +1 -1
  7. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +176 -6
  8. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +1 -1
  9. package/dist/auth0/generators/react/react-auth0/generated/index.d.ts +176 -6
  10. package/dist/auth0/generators/react/react-auth0/generated/index.d.ts.map +1 -1
  11. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts +88 -3
  12. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +1 -1
  13. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts +88 -3
  14. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +1 -1
  15. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts +88 -3
  16. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +1 -1
  17. package/dist/local-auth/admin/common.d.ts +4 -0
  18. package/dist/local-auth/admin/common.d.ts.map +1 -0
  19. package/dist/local-auth/admin/common.js +30 -0
  20. package/dist/local-auth/admin/common.js.map +1 -0
  21. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +453 -0
  22. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -0
  23. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +121 -0
  24. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -0
  25. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +457 -0
  26. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +1 -0
  27. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js +9 -0
  28. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js.map +1 -0
  29. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts +13 -0
  30. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts.map +1 -0
  31. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js +25 -0
  32. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js.map +1 -0
  33. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +235 -0
  34. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +1 -0
  35. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js +48 -0
  36. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js.map +1 -0
  37. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +224 -0
  38. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +1 -0
  39. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js +29 -0
  40. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js.map +1 -0
  41. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts +2 -0
  42. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts.map +1 -0
  43. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js +2 -0
  44. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js.map +1 -0
  45. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts +21 -0
  46. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +1 -0
  47. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.gql +7 -0
  48. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +59 -0
  49. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -0
  50. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +145 -0
  51. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +452 -0
  52. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +1 -0
  53. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js +107 -0
  54. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +1 -0
  55. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +457 -0
  56. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +1 -0
  57. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js +9 -0
  58. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js.map +1 -0
  59. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts +13 -0
  60. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts.map +1 -0
  61. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js +25 -0
  62. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js.map +1 -0
  63. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +235 -0
  64. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +1 -0
  65. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js +48 -0
  66. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js.map +1 -0
  67. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +442 -0
  68. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +1 -0
  69. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js +31 -0
  70. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js.map +1 -0
  71. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts +2 -0
  72. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts.map +1 -0
  73. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js +2 -0
  74. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js.map +1 -0
  75. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts +21 -0
  76. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +1 -0
  77. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.gql +7 -0
  78. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +73 -0
  79. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -0
  80. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +155 -0
  81. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +221 -0
  82. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +1 -0
  83. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js +58 -0
  84. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +1 -0
  85. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts +2 -0
  86. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts.map +1 -0
  87. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js +2 -0
  88. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js.map +1 -0
  89. package/dist/local-auth/admin/node.d.ts +8 -0
  90. package/dist/local-auth/admin/node.d.ts.map +1 -0
  91. package/dist/local-auth/admin/node.js +60 -0
  92. package/dist/local-auth/admin/node.js.map +1 -0
  93. package/dist/local-auth/admin/schema/manage-role-action.d.ts +19 -0
  94. package/dist/local-auth/admin/schema/manage-role-action.d.ts.map +1 -0
  95. package/dist/local-auth/admin/schema/manage-role-action.js +6 -0
  96. package/dist/local-auth/admin/schema/manage-role-action.js.map +1 -0
  97. package/dist/local-auth/admin/schema/reset-password-action.d.ts +19 -0
  98. package/dist/local-auth/admin/schema/reset-password-action.d.ts.map +1 -0
  99. package/dist/local-auth/admin/schema/reset-password-action.js +6 -0
  100. package/dist/local-auth/admin/schema/reset-password-action.js.map +1 -0
  101. package/dist/local-auth/admin/schema/roles-column.d.ts +19 -0
  102. package/dist/local-auth/admin/schema/roles-column.d.ts.map +1 -0
  103. package/dist/local-auth/admin/schema/roles-column.js +6 -0
  104. package/dist/local-auth/admin/schema/roles-column.js.map +1 -0
  105. package/dist/local-auth/admin/web.d.ts +6 -0
  106. package/dist/local-auth/admin/web.d.ts.map +1 -0
  107. package/dist/local-auth/admin/web.js +43 -0
  108. package/dist/local-auth/admin/web.js.map +1 -0
  109. package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -1
  110. package/dist/local-auth/core/components/local-auth-definition-editor.js +5 -2
  111. package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
  112. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +5 -1
  113. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
  114. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +20 -5
  115. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
  116. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +4 -1
  117. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
  118. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +8 -2
  119. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
  120. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +1 -1
  121. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
  122. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +40 -1
  123. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -1
  124. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +47 -0
  125. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +31 -0
  126. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
  127. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +97 -1
  128. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
  129. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +133 -0
  130. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +2 -1
  131. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
  132. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +9 -3
  133. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
  134. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +26 -0
  135. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
  136. package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +2 -0
  137. package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -1
  138. package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +2 -0
  139. package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +1 -1
  140. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
  141. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +1 -0
  142. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
  143. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +52 -0
  144. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
  145. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +28 -0
  146. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
  147. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts +2 -0
  148. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts.map +1 -0
  149. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js +23 -0
  150. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js.map +1 -0
  151. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.ts +26 -0
  152. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts +15 -0
  153. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts.map +1 -0
  154. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js +35 -0
  155. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js.map +1 -0
  156. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.ts +47 -0
  157. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +88 -3
  158. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
  159. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +264 -9
  160. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
  161. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +88 -3
  162. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
  163. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +352 -12
  164. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
  165. package/dist/local-auth/core/generators/react-session/generated/index.d.ts +176 -6
  166. package/dist/local-auth/core/generators/react-session/generated/index.d.ts.map +1 -1
  167. package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +88 -3
  168. package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -1
  169. package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +176 -6
  170. package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -1
  171. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +88 -3
  172. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
  173. package/dist/local-auth/core/node.d.ts.map +1 -1
  174. package/dist/local-auth/core/node.js +5 -1
  175. package/dist/local-auth/core/node.js.map +1 -1
  176. package/dist/local-auth/core/schema/plugin-definition.d.ts +3 -0
  177. package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -1
  178. package/dist/local-auth/core/schema/plugin-definition.js +4 -0
  179. package/dist/local-auth/core/schema/plugin-definition.js.map +1 -1
  180. package/dist/local-auth/plugin.json +1 -1
  181. package/dist/web/assets/{__federation_expose_auth0CoreCommon-lV5QSzvf.js → __federation_expose_auth0CoreCommon-Dd4OxG3J.js} +3 -3
  182. package/dist/web/assets/{__federation_expose_auth0CoreCommon-lV5QSzvf.js.map → __federation_expose_auth0CoreCommon-Dd4OxG3J.js.map} +1 -1
  183. package/dist/web/assets/{__federation_expose_auth0CoreWeb-5F0rTNis.js → __federation_expose_auth0CoreWeb-C_de43BE.js} +5 -5
  184. package/dist/web/assets/{__federation_expose_auth0CoreWeb-5F0rTNis.js.map → __federation_expose_auth0CoreWeb-C_de43BE.js.map} +1 -1
  185. package/dist/web/assets/{__federation_expose_authCoreCommon-C5cVmNCH.js → __federation_expose_authCoreCommon-BAF30G9e.js} +3 -3
  186. package/dist/web/assets/{__federation_expose_authCoreCommon-C5cVmNCH.js.map → __federation_expose_authCoreCommon-BAF30G9e.js.map} +1 -1
  187. package/dist/web/assets/{__federation_expose_authCoreWeb-CJxY8hZC.js → __federation_expose_authCoreWeb-B26BFarY.js} +6 -6
  188. package/dist/web/assets/{__federation_expose_authCoreWeb-CJxY8hZC.js.map → __federation_expose_authCoreWeb-B26BFarY.js.map} +1 -1
  189. package/dist/web/assets/__federation_expose_local-authAdminCommon-DLbuTALX.js +64 -0
  190. package/dist/web/assets/__federation_expose_local-authAdminCommon-DLbuTALX.js.map +1 -0
  191. package/dist/web/assets/__federation_expose_local-authAdminWeb-bT8Js4V6.js +58 -0
  192. package/dist/web/assets/__federation_expose_local-authAdminWeb-bT8Js4V6.js.map +1 -0
  193. package/dist/web/assets/{__federation_expose_local-authCoreCommon-Dr_ngV2l.js → __federation_expose_local-authCoreCommon-D9tovFrj.js} +3 -3
  194. package/dist/web/assets/{__federation_expose_local-authCoreCommon-Dr_ngV2l.js.map → __federation_expose_local-authCoreCommon-D9tovFrj.js.map} +1 -1
  195. package/dist/web/assets/{__federation_expose_local-authCoreWeb-B5iBudnh.js → __federation_expose_local-authCoreWeb-DKVkRzEo.js} +24 -7
  196. package/dist/web/assets/__federation_expose_local-authCoreWeb-DKVkRzEo.js.map +1 -0
  197. package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-l8knzO7I.js → __federation_expose_placeholder-authCoreCommon-D1fszuKq.js} +3 -3
  198. package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-l8knzO7I.js.map → __federation_expose_placeholder-authCoreCommon-D1fszuKq.js.map} +1 -1
  199. package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-DbI_bZsk.js → __federation_expose_placeholder-authCoreWeb-tw3UiMLM.js} +5 -5
  200. package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-DbI_bZsk.js.map → __federation_expose_placeholder-authCoreWeb-tw3UiMLM.js.map} +1 -1
  201. package/dist/web/assets/{__federation_fn_import-DReOsou_.js → __federation_fn_import-B_QMlAIe.js} +2 -2
  202. package/dist/web/assets/{__federation_fn_import-DReOsou_.js.map → __federation_fn_import-B_QMlAIe.js.map} +1 -1
  203. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BlPKO2K7.js → web-DdrB9jrq.js} +74 -6
  204. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DdrB9jrq.js.map +1 -0
  205. package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-CGEZr0YI.js → project-builder-lib-BvG5Zcxb.js} +567 -184
  206. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BvG5Zcxb.js.map +1 -0
  207. package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-RO_rk4f0.js → ui-components-CjIA8Av2.js} +873 -624
  208. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-CjIA8Av2.js.map +1 -0
  209. package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-BbU_EX7_.js → utils-LpAGNm5N.js} +2 -2
  210. package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-BbU_EX7_.js.map → utils-LpAGNm5N.js.map} +1 -1
  211. package/dist/web/assets/__federation_shared_@tanstack/{react-router-CNTPQj7N.js → react-router-CEcQRiV1.js} +2 -2
  212. package/dist/web/assets/__federation_shared_@tanstack/{react-router-CNTPQj7N.js.map → react-router-CEcQRiV1.js.map} +1 -1
  213. package/dist/web/assets/{get-auth-plugin-definition-CQ6mWMZk.js → get-auth-plugin-definition-BrApugiB.js} +2 -2
  214. package/dist/web/assets/{get-auth-plugin-definition-CQ6mWMZk.js.map → get-auth-plugin-definition-BrApugiB.js.map} +1 -1
  215. package/dist/web/assets/{index-BkOJzK_m.js → index-DAcyTb_o.js} +5 -3
  216. package/dist/web/assets/{index-BkOJzK_m.js.map → index-DAcyTb_o.js.map} +1 -1
  217. package/dist/web/assets/{index.esm-UnRzlLlr.js → index.esm-BFQQfZNu.js} +2 -2
  218. package/dist/web/assets/{index.esm-UnRzlLlr.js.map → index.esm-BFQQfZNu.js.map} +1 -1
  219. package/dist/web/assets/{model-merger-BLEOsCIp.js → model-merger-boZDknXa.js} +11 -4
  220. package/dist/web/assets/model-merger-boZDknXa.js.map +1 -0
  221. package/dist/web/assets/{plugin-definition-PCHsX2lR.js → plugin-definition-B7A-hS1o.js} +2 -2
  222. package/dist/web/assets/{plugin-definition-PCHsX2lR.js.map → plugin-definition-B7A-hS1o.js.map} +1 -1
  223. package/dist/web/assets/{plugin-definition-ChUKIqUg.js → plugin-definition-BeK0C-OP.js} +11 -2
  224. package/dist/web/assets/plugin-definition-BeK0C-OP.js.map +1 -0
  225. package/dist/web/assets/{plugin-definition-DH4QyCfv.js → plugin-definition-CyqVivit.js} +2 -2
  226. package/dist/web/assets/{plugin-definition-DH4QyCfv.js.map → plugin-definition-CyqVivit.js.map} +1 -1
  227. package/dist/web/assets/{plugin-definition-C935Xf1h.js → plugin-definition-DfsGhMRb.js} +2 -2
  228. package/dist/web/assets/{plugin-definition-C935Xf1h.js.map → plugin-definition-DfsGhMRb.js.map} +1 -1
  229. package/dist/web/assets/{react-ecPihYHK.js → react-CKjL52W8.js} +2 -2
  230. package/dist/web/assets/{react-ecPihYHK.js.map → react-CKjL52W8.js.map} +1 -1
  231. package/dist/web/assets/remoteEntry.js +14 -8
  232. package/dist/web/assets/remoteEntry.js.map +1 -1
  233. package/dist/web/assets/{styles-I6mpdfRm.js → styles-CyTaudys.js} +3 -3
  234. package/dist/web/assets/{styles-I6mpdfRm.js.map → styles-CyTaudys.js.map} +1 -1
  235. package/package.json +12 -12
  236. package/dist/web/assets/__federation_expose_local-authCoreWeb-B5iBudnh.js.map +0 -1
  237. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BlPKO2K7.js.map +0 -1
  238. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CGEZr0YI.js.map +0 -1
  239. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-RO_rk4f0.js.map +0 -1
  240. package/dist/web/assets/model-merger-BLEOsCIp.js.map +0 -1
  241. package/dist/web/assets/plugin-definition-ChUKIqUg.js.map +0 -1
@@ -0,0 +1,43 @@
1
+ import { createPlatformPluginExport, PluginUtils, } from '@baseplate-dev/project-builder-lib';
2
+ import { adminCrudActionWebSpec, adminCrudColumnWebSpec, } from '@baseplate-dev/project-builder-lib/web';
3
+ export default createPlatformPluginExport({
4
+ dependencies: {
5
+ adminCrudActionWeb: adminCrudActionWebSpec,
6
+ adminCrudColumnWeb: adminCrudColumnWebSpec,
7
+ },
8
+ exports: {},
9
+ initialize: ({ adminCrudActionWeb, adminCrudColumnWeb }, { pluginKey }) => {
10
+ adminCrudActionWeb.registerActionWebConfig({
11
+ pluginKey,
12
+ name: 'manage-roles',
13
+ label: 'Manage Roles',
14
+ isAvailableForModel: (definition, modelId) => {
15
+ const pluginDefinition = PluginUtils.configByKeyOrThrow(definition, pluginKey);
16
+ return modelId === pluginDefinition.modelRefs.user;
17
+ },
18
+ getNewAction: () => ({ type: 'manage-roles', position: 'dropdown' }),
19
+ });
20
+ adminCrudActionWeb.registerActionWebConfig({
21
+ pluginKey,
22
+ name: 'reset-password',
23
+ label: 'Reset Password',
24
+ isAvailableForModel: (definition, modelId) => {
25
+ const pluginDefinition = PluginUtils.configByKeyOrThrow(definition, pluginKey);
26
+ return modelId === pluginDefinition.modelRefs.user;
27
+ },
28
+ getNewAction: () => ({ type: 'reset-password', position: 'dropdown' }),
29
+ });
30
+ adminCrudColumnWeb.registerColumnWebConfig({
31
+ pluginKey,
32
+ name: 'roles',
33
+ label: 'Roles',
34
+ isAvailableForModel: (definition, modelId) => {
35
+ const pluginDefinition = PluginUtils.configByKeyOrThrow(definition, pluginKey);
36
+ return modelId === pluginDefinition.modelRefs.user;
37
+ },
38
+ getNewColumn: () => ({ type: 'roles', label: 'Roles' }),
39
+ });
40
+ return {};
41
+ },
42
+ });
43
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../../src/local-auth/admin/web.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,wCAAwC,CAAC;AAIhD,eAAe,0BAA0B,CAAC;IACxC,YAAY,EAAE;QACZ,kBAAkB,EAAE,sBAAsB;QAC1C,kBAAkB,EAAE,sBAAsB;KAC3C;IACD,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,CAAC,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QACxE,kBAAkB,CAAC,uBAAuB,CAAC;YACzC,SAAS;YACT,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,cAAc;YACrB,mBAAmB,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE;gBAC3C,MAAM,gBAAgB,GAAG,WAAW,CAAC,kBAAkB,CACrD,UAAU,EACV,SAAS,CACmB,CAAC;gBAC/B,OAAO,OAAO,KAAK,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC;YACrD,CAAC;YACD,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;SACrE,CAAC,CAAC;QAEH,kBAAkB,CAAC,uBAAuB,CAAC;YACzC,SAAS;YACT,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,gBAAgB;YACvB,mBAAmB,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE;gBAC3C,MAAM,gBAAgB,GAAG,WAAW,CAAC,kBAAkB,CACrD,UAAU,EACV,SAAS,CACmB,CAAC;gBAC/B,OAAO,OAAO,KAAK,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC;YACrD,CAAC;YACD,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;SACvE,CAAC,CAAC;QAEH,kBAAkB,CAAC,uBAAuB,CAAC;YACzC,SAAS;YACT,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;YACd,mBAAmB,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE;gBAC3C,MAAM,gBAAgB,GAAG,WAAW,CAAC,kBAAkB,CACrD,UAAU,EACV,SAAS,CACmB,CAAC;gBAC/B,OAAO,OAAO,KAAK,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC;YACrD,CAAC;YACD,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;SACxD,CAAC,CAAC;QACH,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"local-auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/local-auth/core/components/local-auth-definition-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsC/B,OAAO,iBAAiB,CAAC;AAEzB,wBAAgB,yBAAyB,CAAC,EACxC,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACP,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoLpC"}
1
+ {"version":3,"file":"local-auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/local-auth/core/components/local-auth-definition-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsC/B,OAAO,iBAAiB,CAAC;AAEzB,wBAAgB,yBAAyB,CAAC,EACxC,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACP,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2MpC"}
@@ -13,7 +13,9 @@ export function LocalAuthDefinitionEditor({ definition: pluginMetadata, metadata
13
13
  const { definition, definitionContainer, saveDefinitionWithFeedback } = useProjectDefinition();
14
14
  const authPluginDefinitionSchema = useDefinitionSchema(createLocalAuthPluginDefinitionSchema);
15
15
  const authDefinition = getAuthPluginDefinition(definition);
16
- const roles = authDefinition.roles.map((role) => ({
16
+ const roles = authDefinition.roles
17
+ .filter((role) => !role.builtIn)
18
+ .map((role) => ({
17
19
  label: role.name,
18
20
  value: role.id,
19
21
  }));
@@ -29,6 +31,7 @@ export function LocalAuthDefinitionEditor({ definition: pluginMetadata, metadata
29
31
  userSession: ModelUtils.getModelIdByNameOrDefault(definition, 'UserSession'),
30
32
  },
31
33
  initialUserRoles: [],
34
+ userAdminRoles: [],
32
35
  };
33
36
  }, [definition, pluginMetadata?.config]);
34
37
  const form = useResettableForm({
@@ -56,7 +59,7 @@ export function LocalAuthDefinitionEditor({ definition: pluginMetadata, metadata
56
59
  useBlockUnsavedChangesNavigate({ control, reset, onSubmit });
57
60
  return (_jsxs("div", { className: "auth:relative auth:flex auth:h-full auth:flex-1 auth:flex-col auth:gap-4 auth:overflow-hidden", children: [_jsx(AuthConfigTabs, {}), _jsx("div", { className: "auth:mb-[--action-bar-height] auth:flex auth:flex-1 auth:overflow-y-auto", style: {
58
61
  '--action-bar-height': '52px',
59
- }, children: _jsxs("form", { onSubmit: onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [_jsx("div", { className: "auth:pb-16", children: _jsxs(SectionList, { children: [_jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Local Auth User Models" }), _jsx(SectionListSectionDescription, { children: "Configure your local authentication user models." })] }), _jsxs(SectionListSectionContent, { className: "auth:space-y-6", children: [_jsx(ModelMergerResultAlert, { pendingModelChanges: pendingModelChanges }), _jsxs("div", { className: "auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2", children: [_jsx(ModelComboboxFieldController, { label: "User Model", name: "modelRefs.user", control: control, canCreate: true, description: "The main user model for authentication" }), _jsx(ModelComboboxFieldController, { label: "User Account Model", name: "modelRefs.userAccount", control: control, canCreate: true, description: "Model for user account credentials" }), _jsx(ModelComboboxFieldController, { label: "User Role Model", name: "modelRefs.userRole", control: control, canCreate: true, description: "Model for assigning roles to users" }), _jsx(ModelComboboxFieldController, { label: "User Session Model", name: "modelRefs.userSession", control: control, canCreate: true, description: "Model for managing user sessions" })] })] })] }), _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Initial User Setup" }), _jsx(SectionListSectionDescription, { children: "In order to access the admin panel, an initial user must be created. To make it easier, the plugin will automatically add a seed script to create the initial user provided a .seed.env exists with the INTIIAL_USER_EMAIL and INTIIAL_USER_PASSWORD variables." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(MultiComboboxFieldController, { label: "Initial User Roles", name: "initialUserRoles", control: control, options: roles, description: "The roles that will be assigned to the initial user." }) })] })] }) }), _jsx(FormActionBar, { form: form, allowSaveWithoutDirty: !pluginMetadata ||
62
+ }, children: _jsxs("form", { onSubmit: onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [_jsx("div", { className: "auth:pb-16", children: _jsxs(SectionList, { children: [_jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Local Auth User Models" }), _jsx(SectionListSectionDescription, { children: "Configure your local authentication user models." })] }), _jsxs(SectionListSectionContent, { className: "auth:space-y-6", children: [_jsx(ModelMergerResultAlert, { pendingModelChanges: pendingModelChanges }), _jsxs("div", { className: "auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2", children: [_jsx(ModelComboboxFieldController, { label: "User Model", name: "modelRefs.user", control: control, canCreate: true, description: "The main user model for authentication" }), _jsx(ModelComboboxFieldController, { label: "User Account Model", name: "modelRefs.userAccount", control: control, canCreate: true, description: "Model for user account credentials" }), _jsx(ModelComboboxFieldController, { label: "User Role Model", name: "modelRefs.userRole", control: control, canCreate: true, description: "Model for assigning roles to users" }), _jsx(ModelComboboxFieldController, { label: "User Session Model", name: "modelRefs.userSession", control: control, canCreate: true, description: "Model for managing user sessions" })] })] })] }), _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Initial User Setup" }), _jsx(SectionListSectionDescription, { children: "In order to access the admin panel, an initial user must be created. To make it easier, the plugin will automatically add a seed script to create the initial user provided a .seed.env exists with the INTIIAL_USER_EMAIL and INTIIAL_USER_PASSWORD variables." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(MultiComboboxFieldController, { label: "Initial User Roles", name: "initialUserRoles", control: control, options: roles, description: "The roles that will be assigned to the initial user." }) })] }), _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "User Management Permissions" }), _jsx(SectionListSectionDescription, { children: "Configure which roles can manage users and assign roles to other users in the admin interface." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(MultiComboboxFieldController, { label: "User Admin Roles", name: "userAdminRoles", control: control, options: roles, description: "Roles that can manage users and assign roles to other users." }) })] })] }) }), _jsx(FormActionBar, { form: form, allowSaveWithoutDirty: !pluginMetadata ||
60
63
  doesModelMergerResultsHaveChanges(pendingModelChanges) })] }) })] }));
61
64
  }
62
65
  //# sourceMappingURL=local-auth-definition-editor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/local-auth/core/components/local-auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,iCAAiC,EACjC,UAAU,EACV,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,EAClB,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAI5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qCAAqC,EAAE,MAAM,gCAAgC,CAAC;AAEvF,OAAO,iBAAiB,CAAC;AAEzB,MAAM,UAAU,yBAAyB,CAAC,EACxC,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACS;IACf,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,GACnE,oBAAoB,EAAE,CAAC;IAEzB,MAAM,0BAA0B,GAAG,mBAAmB,CACpD,qCAAqC,CACtC,CAAC;IACF,MAAM,cAAc,GAAG,uBAAuB,CAAC,UAAU,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG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,QACT,WAAW,EAAC,wCAAwC,GACpD,EACF,KAAC,4BAA4B,IAC3B,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,uBAAuB,EAC5B,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,WAAW,EAAC,oCAAoC,GAChD,EACF,KAAC,4BAA4B,IAC3B,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,oBAAoB,EACzB,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,WAAW,EAAC,oCAAoC,GAChD,EACF,KAAC,4BAA4B,IAC3B,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,uBAAuB,EAC5B,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,WAAW,EAAC,kCAAkC,GAC9C,IACE,IACoB,IACT,EACrB,MAAC,kBAAkB,eACjB,MAAC,wBAAwB,eACvB,KAAC,uBAAuB,qCAEE,EAC1B,KAAC,6BAA6B,kRAME,IACP,EAC3B,KAAC,yBAAyB,IAAC,SAAS,EAAC,gBAAgB,YACnD,KAAC,4BAA4B,IAC3B,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,kBAAkB,EACvB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,KAAK,EACd,WAAW,EAAC,sDAAsD,GAClE,GACwB,IACT,IACT,GACV,EAEN,KAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,qBAAqB,EACnB,CAAC,cAAc;gCACf,iCAAiC,CAAC,mBAAmB,CAAC,GAExD,IACG,GACH,IACF,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"local-auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/local-auth/core/components/local-auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,iCAAiC,EACjC,UAAU,EACV,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EAC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B,SAAS,QACT,WAAW,EAAC,oCAAoC,GAChD,EACF,KAAC,4BAA4B,IAC3B,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,uBAAuB,EAC5B,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,WAAW,EAAC,kCAAkC,GAC9C,IACE,IACoB,IACT,EACrB,MAAC,kBAAkB,eACjB,MAAC,wBAAwB,eACvB,KAAC,uBAAuB,qCAEE,EAC1B,KAAC,6BAA6B,kRAME,IACP,EAC3B,KAAC,yBAAyB,IAAC,SAAS,EAAC,gBAAgB,YACnD,KAAC,4BAA4B,IAC3B,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,kBAAkB,EACvB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,KAAK,EACd,WAAW,EAAC,sDAAsD,GAClE,GACwB,IACT,EACrB,MAAC,kBAAkB,eACjB,MAAC,wBAAwB,eACvB,KAAC,uBAAuB,8CAEE,EAC1B,KAAC,6BAA6B,iHAGE,IACP,EAC3B,KAAC,yBAAyB,IAAC,SAAS,EAAC,gBAAgB,YACnD,KAAC,4BAA4B,IAC3B,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,KAAK,EACd,WAAW,EAAC,8DAA8D,GAC1E,GACwB,IACT,IACT,GACV,EAEN,KAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,qBAAqB,EACnB,CAAC,cAAc;gCACf,iCAAiC,CAAC,mBAAmB,CAAC,GAExD,IACG,GACH,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,7 +1,10 @@
1
1
  /**
2
2
  * Sets up email / password authentication
3
3
  */
4
- export declare const authEmailPasswordGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{}, {
4
+ export declare const authEmailPasswordGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{
5
+ adminRoles: string[];
6
+ userModelName: string;
7
+ }, {
5
8
  paths: import("@baseplate-dev/sync").GeneratorTask<{
6
9
  localAuthCoreAuthEmailPasswordPaths: import("@baseplate-dev/sync").ProviderExport<import("./generated/template-paths.js").LocalAuthCoreAuthEmailPasswordPaths>;
7
10
  }, {
@@ -69,6 +72,7 @@ export declare const authEmailPasswordGenerator: import("@baseplate-dev/sync").G
69
72
  }, any>;
70
73
  main: import("@baseplate-dev/sync").GeneratorTask<any, {
71
74
  renderers: import("@baseplate-dev/sync").ProviderType<import("./generated/template-renderers.js").LocalAuthCoreAuthEmailPasswordRenderers>;
75
+ userObjectType: import("@baseplate-dev/sync").ProviderDependency<import("@baseplate-dev/fastify-generators/src/index.js").PothosTypeOutputProvider>;
72
76
  }, any>;
73
77
  }>;
74
78
  //# sourceMappingURL=auth-email-password.generator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-email-password.generator.d.ts","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-email-password/auth-email-password.generator.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BrC,CAAC"}
1
+ {"version":3,"file":"auth-email-password.generator.d.ts","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-email-password/auth-email-password.generator.ts"],"names":[],"mappings":"AAiBA;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CrC,CAAC"}
@@ -1,8 +1,13 @@
1
- import { appModuleProvider } from '@baseplate-dev/fastify-generators';
1
+ import { TsCodeUtils } from '@baseplate-dev/core-generators';
2
+ import { appModuleProvider, createPothosPrismaObjectTypeOutputName, pothosTypeOutputProvider, } from '@baseplate-dev/fastify-generators';
2
3
  import { createGenerator, createGeneratorTask } from '@baseplate-dev/sync';
4
+ import { quot } from '@baseplate-dev/utils';
3
5
  import { z } from 'zod';
4
6
  import { LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED as GENERATED_TEMPLATES } from './generated/index.js';
5
- const descriptorSchema = z.object({});
7
+ const descriptorSchema = z.object({
8
+ adminRoles: z.array(z.string()),
9
+ userModelName: z.string(),
10
+ });
6
11
  /**
7
12
  * Sets up email / password authentication
8
13
  */
@@ -10,7 +15,7 @@ export const authEmailPasswordGenerator = createGenerator({
10
15
  name: 'local-auth/core/auth-email-password',
11
16
  generatorFileUrl: import.meta.url,
12
17
  descriptorSchema,
13
- buildTasks: () => ({
18
+ buildTasks: ({ adminRoles, userModelName }) => ({
14
19
  paths: GENERATED_TEMPLATES.paths.task,
15
20
  imports: GENERATED_TEMPLATES.imports.task,
16
21
  renderers: GENERATED_TEMPLATES.renderers.task,
@@ -26,11 +31,21 @@ export const authEmailPasswordGenerator = createGenerator({
26
31
  main: createGeneratorTask({
27
32
  dependencies: {
28
33
  renderers: GENERATED_TEMPLATES.renderers.provider,
34
+ userObjectType: pothosTypeOutputProvider
35
+ .dependency()
36
+ .reference(createPothosPrismaObjectTypeOutputName(userModelName)),
29
37
  },
30
- run({ renderers }) {
38
+ run({ renderers, userObjectType }) {
31
39
  return {
32
40
  build: async (builder) => {
33
- await builder.apply(renderers.moduleGroup.render({}));
41
+ await builder.apply(renderers.moduleGroup.render({
42
+ variables: {
43
+ schemaUserPasswordMutations: {
44
+ TPL_ADMIN_ROLES: TsCodeUtils.mergeFragmentsAsArrayPresorted(adminRoles.map((r) => quot(r)).sort()),
45
+ TPL_USER_OBJECT_TYPE: userObjectType.getTypeReference().fragment,
46
+ },
47
+ },
48
+ }));
34
49
  },
35
50
  };
36
51
  },
@@ -1 +1 @@
1
- {"version":3,"file":"auth-email-password.generator.js","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-email-password/auth-email-password.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAA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,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
1
+ {"version":3,"file":"auth-email-password.generator.js","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-email-password/auth-email-password.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,sCAAsC,EACtC,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,6CAA6C,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE5G,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,eAAe,CAAC;IACxD,IAAI,EAAE,qCAAqC;IAC3C,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9C,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI;QACrC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,IAAI;QACzC,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC,IAAI;QAC7C,SAAS,EAAE,mBAAmB,CAAC;YAC7B,YAAY,EAAE;gBACZ,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,QAAQ;gBACzC,SAAS,EAAE,iBAAiB;aAC7B;YACD,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE;gBACtB,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;YAClE,CAAC;SACF,CAAC;QACF,IAAI,EAAE,mBAAmB,CAAC;YACxB,YAAY,EAAE;gBACZ,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC,QAAQ;gBACjD,cAAc,EAAE,wBAAwB;qBACrC,UAAU,EAAE;qBACZ,SAAS,CAAC,sCAAsC,CAAC,aAAa,CAAC,CAAC;aACpE;YACD,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE;gBAC/B,OAAO;oBACL,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;wBACvB,MAAM,OAAO,CAAC,KAAK,CACjB,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC;4BAC3B,SAAS,EAAE;gCACT,2BAA2B,EAAE;oCAC3B,eAAe,EAAE,WAAW,CAAC,8BAA8B,CACzD,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CACtC;oCACD,oBAAoB,EAClB,cAAc,CAAC,gBAAgB,EAAE,CAAC,QAAQ;iCAC7C;6BACF;yBACF,CAAC,CACH,CAAC;oBACJ,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
@@ -71,7 +71,10 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
71
71
  templates: {
72
72
  moduleGroup: {
73
73
  constantsPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
74
- schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
74
+ schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
75
+ TPL_ADMIN_ROLES: {};
76
+ TPL_USER_OBJECT_TYPE: {};
77
+ }, {
75
78
  authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
76
79
  userSessionPayload: {};
77
80
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzD,CAAC"}
@@ -1,6 +1,9 @@
1
1
  export declare const moduleGroup: {
2
2
  constantsPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
3
- schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
3
+ schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
4
+ TPL_ADMIN_ROLES: {};
5
+ TPL_USER_OBJECT_TYPE: {};
6
+ }, {
4
7
  authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
5
8
  userSessionPayload: {};
6
9
  }>>;
@@ -52,7 +55,10 @@ export declare const moduleGroup: {
52
55
  export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
53
56
  moduleGroup: {
54
57
  constantsPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
55
- schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
58
+ schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
59
+ TPL_ADMIN_ROLES: {};
60
+ TPL_USER_OBJECT_TYPE: {};
61
+ }, {
56
62
  authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
57
63
  userSessionPayload: {};
58
64
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/typed-templates.ts"],"names":[],"mappings":"AA0EA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIvB,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAkB,CAAC"}
1
+ {"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/typed-templates.ts"],"names":[],"mappings":"AA0EA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIvB,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAkB,CAAC"}
@@ -25,7 +25,7 @@ const schemaUserPasswordMutations = createTsTemplateFile({
25
25
  source: {
26
26
  path: path.join(import.meta.dirname, '../templates/module/schema/user-password.mutations.ts'),
27
27
  },
28
- variables: {},
28
+ variables: { TPL_ADMIN_ROLES: {}, TPL_USER_OBJECT_TYPE: {} },
29
29
  });
30
30
  const servicesUserPassword = createTsTemplateFile({
31
31
  fileOptions: { kind: 'singleton' },
@@ -1 +1 @@
1
- {"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,kCAAkC,EAClC,oCAAoC,EACpC,qBAAqB,EACrB,qBAAqB,EACrB,oCAAoC,EACpC,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,8EAA8E,CAAC;AAEzH,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,QAAQ;IACf,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,oBAAoB;IAC1B,cAAc,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE;IAC3C,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,qDAAqD,CACtD;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,2BAA2B,GAAG,oBAAoB,CAAC;IACvD,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,QAAQ;IACf,kBAAkB,EAAE;QAClB,iBAAiB,EAAE,yBAAyB;QAC5C,aAAa,EAAE,qBAAqB;KACrC;IACD,IAAI,EAAE,gCAAgC;IACtC,4BAA4B,EAAE,EAAE,oBAAoB,EAAE,EAAE,EAAE;IAC1D,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,uDAAuD,CACxD;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;IAChD,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,QAAQ;IACf,kBAAkB,EAAE;QAClB,0BAA0B,EAAE,kCAAkC;QAC9D,4BAA4B,EAAE,oCAAoC;QAClE,aAAa,EAAE,qBAAqB;QACpC,4BAA4B,EAAE,oCAAoC;QAClE,yBAAyB,EAAE,iCAAiC;QAC5D,uBAAuB,EAAE,+BAA+B;KACzD;IACD,IAAI,EAAE,wBAAwB;IAC9B,cAAc,EAAE;QACd,oCAAoC,EAAE,EAAE;QACxC,8BAA8B,EAAE,EAAE;QAClC,gCAAgC,EAAE,EAAE;KACrC;IACD,4BAA4B,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE;IACvD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,uDAAuD,CACxD;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,iBAAiB;IACjB,2BAA2B;IAC3B,oBAAoB;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,6CAA6C,GAAG,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,kCAAkC,EAClC,oCAAoC,EACpC,qBAAqB,EACrB,qBAAqB,EACrB,oCAAoC,EACpC,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,8EAA8E,CAAC;AAEzH,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,WAA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,EAAE,iBAAiB,EAAE,EAAE,EAAE;IACvD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,uDAAuD,CACxD;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,iBAAiB;IACjB,2BAA2B;IAC3B,oBAAoB;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,6CAA6C,GAAG,EAAE,WAAW,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  // @ts-nocheck
2
- import { authenticateUserWithEmailAndPassword, registerUserWithEmailAndPassword, } from '$servicesUserPassword';
2
+ import { authenticateUserWithEmailAndPassword, changeUserPassword, registerUserWithEmailAndPassword, resetUserPassword, } from '$servicesUserPassword';
3
3
  import { userSessionPayload } from '%authModuleImports';
4
4
  import { builder } from '%pothosImports';
5
5
  builder.mutationField('registerWithEmailPassword', (t) => t.fieldWithInputPayload({
@@ -30,4 +30,43 @@ builder.mutationField('loginWithEmailPassword', (t) => t.fieldWithInputPayload({
30
30
  context,
31
31
  }),
32
32
  }));
33
+ builder.mutationField('changePassword', (t) => t.fieldWithInputPayload({
34
+ authorize: ['user'],
35
+ payload: {
36
+ user: t.payload.field({
37
+ type: TPL_USER_OBJECT_TYPE,
38
+ }),
39
+ },
40
+ input: {
41
+ currentPassword: t.input.field({ required: true, type: 'String' }),
42
+ newPassword: t.input.field({ required: true, type: 'String' }),
43
+ },
44
+ resolve: async (_root, { input }, context) => {
45
+ const userId = context.auth.userIdOrThrow();
46
+ const user = await changeUserPassword({
47
+ userId,
48
+ input,
49
+ });
50
+ return { user };
51
+ },
52
+ }));
53
+ builder.mutationField('resetUserPassword', (t) => t.fieldWithInputPayload({
54
+ authorize: TPL_ADMIN_ROLES,
55
+ payload: {
56
+ user: t.payload.field({
57
+ type: TPL_USER_OBJECT_TYPE,
58
+ }),
59
+ },
60
+ input: {
61
+ userId: t.input.field({ required: true, type: 'Uuid' }),
62
+ newPassword: t.input.field({ required: true, type: 'String' }),
63
+ },
64
+ resolve: async (_root, { input }) => {
65
+ const user = await resetUserPassword({
66
+ userId: input.userId,
67
+ input: { newPassword: input.newPassword },
68
+ });
69
+ return { user };
70
+ },
71
+ }));
33
72
  //# sourceMappingURL=user-password.mutations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-password.mutations.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EACL,oCAAoC,EACpC,gCAAgC,GACjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,CAAC,aAAa,CAAC,2BAA2B,EAAE,CAAC,CAAC,EAAE,EAAE,CACvD,CAAC,CAAC,qBAAqB,CAAC;IACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KACvD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACxD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;KAC5D;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,CAC1C,gCAAgC,CAAC;QAC/B,KAAK;QACL,OAAO;KACR,CAAC;CACL,CAAC,CACH,CAAC;AAEF,OAAO,CAAC,aAAa,CAAC,wBAAwB,EAAE,CAAC,CAAC,EAAE,EAAE,CACpD,CAAC,CAAC,qBAAqB,CAAC;IACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KACvD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACxD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;KAC5D;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,CAC1C,oCAAoC,CAAC;QACnC,KAAK;QACL,OAAO;KACR,CAAC;CACL,CAAC,CACH,CAAC"}
1
+ {"version":3,"file":"user-password.mutations.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EACL,oCAAoC,EACpC,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,CAAC,aAAa,CAAC,2BAA2B,EAAE,CAAC,CAAC,EAAE,EAAE,CACvD,CAAC,CAAC,qBAAqB,CAAC;IACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KACvD;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AE,EAAE;QAClC,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC;YACnC,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE;SAC1C,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,CAAC;IAClB,CAAC;CACF,CAAC,CACH,CAAC"}
@@ -2,7 +2,9 @@
2
2
 
3
3
  import {
4
4
  authenticateUserWithEmailAndPassword,
5
+ changeUserPassword,
5
6
  registerUserWithEmailAndPassword,
7
+ resetUserPassword,
6
8
  } from '$servicesUserPassword';
7
9
  import { userSessionPayload } from '%authModuleImports';
8
10
  import { builder } from '%pothosImports';
@@ -42,3 +44,48 @@ builder.mutationField('loginWithEmailPassword', (t) =>
42
44
  }),
43
45
  }),
44
46
  );
47
+
48
+ builder.mutationField('changePassword', (t) =>
49
+ t.fieldWithInputPayload({
50
+ authorize: ['user'],
51
+ payload: {
52
+ user: t.payload.field({
53
+ type: TPL_USER_OBJECT_TYPE,
54
+ }),
55
+ },
56
+ input: {
57
+ currentPassword: t.input.field({ required: true, type: 'String' }),
58
+ newPassword: t.input.field({ required: true, type: 'String' }),
59
+ },
60
+ resolve: async (_root, { input }, context) => {
61
+ const userId = context.auth.userIdOrThrow();
62
+ const user = await changeUserPassword({
63
+ userId,
64
+ input,
65
+ });
66
+ return { user };
67
+ },
68
+ }),
69
+ );
70
+
71
+ builder.mutationField('resetUserPassword', (t) =>
72
+ t.fieldWithInputPayload({
73
+ authorize: TPL_ADMIN_ROLES,
74
+ payload: {
75
+ user: t.payload.field({
76
+ type: TPL_USER_OBJECT_TYPE,
77
+ }),
78
+ },
79
+ input: {
80
+ userId: t.input.field({ required: true, type: 'Uuid' }),
81
+ newPassword: t.input.field({ required: true, type: 'String' }),
82
+ },
83
+ resolve: async (_root, { input }) => {
84
+ const user = await resetUserPassword({
85
+ userId: input.userId,
86
+ input: { newPassword: input.newPassword },
87
+ });
88
+ return { user };
89
+ },
90
+ }),
91
+ );
@@ -26,4 +26,35 @@ export declare function authenticateUserWithEmailAndPassword({ input, context, }
26
26
  }): Promise<{
27
27
  session: UserSessionPayload;
28
28
  }>;
29
+ /**
30
+ * Change a user's password after validating their current password.
31
+ * This is used when a user wants to change their own password.
32
+ *
33
+ * @param params - The parameters for changing password
34
+ * @param params.userId - The ID of the user changing their password
35
+ * @param params.input - The current and new password
36
+ * @returns The updated user
37
+ */
38
+ export declare function changeUserPassword({ userId, input, }: {
39
+ userId: string;
40
+ input: {
41
+ currentPassword: string;
42
+ newPassword: string;
43
+ };
44
+ }): Promise<User>;
45
+ /**
46
+ * Reset a user's password without requiring the current password.
47
+ * This is used by administrators to reset any user's password.
48
+ *
49
+ * @param params - The parameters for resetting password
50
+ * @param params.userId - The ID of the user whose password is being reset
51
+ * @param params.input - The new password
52
+ * @returns The updated user
53
+ */
54
+ export declare function resetUserPassword({ userId, input, }: {
55
+ userId: string;
56
+ input: {
57
+ newPassword: string;
58
+ };
59
+ }): Promise<User>;
29
60
  //# sourceMappingURL=user-password.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-password.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AA4B3C,wBAAsB,8BAA8B,CAAC,EACnD,KAAK,GACN,EAAE;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,GAAG,OAAO,CAAC,IAAI,CAAC,CAiChB;AAED,wBAAsB,gCAAgC,CAAC,EACrD,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,kBAAkB,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAKvD;AAED,wBAAsB,oCAAoC,CAAC,EACzD,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,kBAAkB,CAAA;CAAE,CAAC,CAkC3C"}
1
+ {"version":3,"file":"user-password.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AA6B3C,wBAAsB,8BAA8B,CAAC,EACnD,KAAK,GACN,EAAE;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,GAAG,OAAO,CAAC,IAAI,CAAC,CAiChB;AAED,wBAAsB,gCAAgC,CAAC,EACrD,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,kBAAkB,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAKvD;AAED,wBAAsB,oCAAoC,CAAC,EACzD,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,kBAAkB,CAAA;CAAE,CAAC,CAkC3C;AAOD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,MAAM,EACN,KAAK,GACN,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,GAAG,OAAO,CAAC,IAAI,CAAC,CAyChB;AAMD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,MAAM,EACN,KAAK,GACN,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE;QACL,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,GAAG,OAAO,CAAC,IAAI,CAAC,CA2ChB"}
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
  import { PASSWORD_MIN_LENGTH } from '$constantsPassword';
3
- import { BadRequestError, handleZodRequestValidationError, } from '%errorHandlerServiceImports';
3
+ import { BadRequestError, handleZodRequestValidationError, NotFoundError, } from '%errorHandlerServiceImports';
4
4
  import { createPasswordHash, verifyPasswordHash, } from '%passwordHasherServiceImports';
5
5
  import { prisma } from '%prismaImports';
6
6
  import { userSessionService } from '%userSessionServiceImports';
@@ -75,4 +75,100 @@ export async function authenticateUserWithEmailAndPassword({ input, context, })
75
75
  const session = await userSessionService.createSession(userAccount.userId, context);
76
76
  return { session };
77
77
  }
78
+ const changePasswordSchema = z.object({
79
+ currentPassword: z.string().min(1).max(MAX_VALUE_LENGTH),
80
+ newPassword: z.string().min(PASSWORD_MIN_LENGTH).max(MAX_VALUE_LENGTH),
81
+ });
82
+ /**
83
+ * Change a user's password after validating their current password.
84
+ * This is used when a user wants to change their own password.
85
+ *
86
+ * @param params - The parameters for changing password
87
+ * @param params.userId - The ID of the user changing their password
88
+ * @param params.input - The current and new password
89
+ * @returns The updated user
90
+ */
91
+ export async function changeUserPassword({ userId, input, }) {
92
+ const { currentPassword, newPassword } = await changePasswordSchema
93
+ .parseAsync(input)
94
+ .catch(handleZodRequestValidationError);
95
+ // Get the user's account
96
+ const userAccount = await prisma.userAccount.findFirst({
97
+ where: {
98
+ userId,
99
+ providerId: PROVIDER_ID,
100
+ },
101
+ });
102
+ // Verify current password
103
+ const isValid = await verifyPasswordHash(userAccount?.password ?? '', currentPassword);
104
+ if (!isValid || !userAccount) {
105
+ throw new BadRequestError('Current password is incorrect', 'invalid-current-password');
106
+ }
107
+ // Update to new password
108
+ await prisma.userAccount.update({
109
+ where: {
110
+ accountId_providerId: {
111
+ accountId: userAccount.accountId,
112
+ providerId: PROVIDER_ID,
113
+ },
114
+ },
115
+ data: {
116
+ password: await createPasswordHash(newPassword),
117
+ },
118
+ });
119
+ return prisma.user.findUniqueOrThrow({
120
+ where: { id: userId },
121
+ });
122
+ }
123
+ const resetPasswordSchema = z.object({
124
+ newPassword: z.string().min(PASSWORD_MIN_LENGTH).max(MAX_VALUE_LENGTH),
125
+ });
126
+ /**
127
+ * Reset a user's password without requiring the current password.
128
+ * This is used by administrators to reset any user's password.
129
+ *
130
+ * @param params - The parameters for resetting password
131
+ * @param params.userId - The ID of the user whose password is being reset
132
+ * @param params.input - The new password
133
+ * @returns The updated user
134
+ */
135
+ export async function resetUserPassword({ userId, input, }) {
136
+ const { newPassword } = await resetPasswordSchema
137
+ .parseAsync(input)
138
+ .catch(handleZodRequestValidationError);
139
+ // Check if user exists
140
+ const user = await prisma.user.findUnique({
141
+ where: { id: userId },
142
+ });
143
+ if (user === null) {
144
+ throw new NotFoundError('User not found', 'user-not-found');
145
+ }
146
+ if (!user.email) {
147
+ throw new BadRequestError('User has no email', 'user-has-no-email');
148
+ }
149
+ // Get or create the user's password account
150
+ const passwordHash = await createPasswordHash(newPassword);
151
+ await prisma.userAccount.upsert({
152
+ where: {
153
+ accountId_providerId: {
154
+ accountId: user.email,
155
+ providerId: PROVIDER_ID,
156
+ },
157
+ },
158
+ create: {
159
+ user: {
160
+ connect: {
161
+ id: userId,
162
+ },
163
+ },
164
+ accountId: user.email,
165
+ providerId: PROVIDER_ID,
166
+ password: passwordHash,
167
+ },
168
+ update: {
169
+ password: passwordHash,
170
+ },
171
+ });
172
+ return user;
173
+ }
78
174
  //# sourceMappingURL=user-password.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-password.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAMd,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,eAAe,EACf,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,KAAK,EAAE;SACP,GAAG,CAAC,gBAAgB,CAAC;SACrB,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,GAAG,CA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AO,GAOR;IACC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,mBAAmB;SAClD,UAAU,CAAC,KAAK,CAAC;SACjB,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAE1C,uCAAuC;IACvC,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;QACtD,KAAK,EAAE;YACL,oBAAoB,EAAE;gBACpB,SAAS,EAAE,KAAK;gBAChB,UAAU,EAAE,WAAW;aACxB;SACF;KACF,CAAC,CAAC;IAEH,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACzB,MAAM,IAAI,eAAe,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;IAED,2BAA2B;IAC3B,MAAM,OAAO,GAAG,MAAM,kBAAkB,CACtC,WAAW,CAAC,QAAQ,IAAI,EAAE,EAC1B,QAAQ,CACT,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,aAAa,CACpD,WAAW,CAAC,MAAM,EAClB,OAAO,CACR,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC"}
1
+ {"version":3,"file":"user-password.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAMd,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,eAAe,EACf,+BAA+B,EAC/B,aAAa,GACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4B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