@baseplate-dev/plugin-auth 0.6.17 → 0.6.18

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 (197) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +12 -0
  3. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +12 -0
  4. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +6 -0
  5. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +6 -0
  6. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +12 -0
  7. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +12 -0
  8. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +6 -0
  9. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +12 -0
  10. package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +6 -0
  11. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +6 -0
  12. package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +36 -0
  13. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +6 -0
  14. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +60 -0
  15. package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +12 -0
  16. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +6 -0
  17. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +6 -0
  18. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +6 -0
  19. package/dist/local-auth/admin/common.js +6 -0
  20. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/admin-crud-invite-user-action.generator.d.ts +531 -0
  21. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/admin-crud-invite-user-action.generator.js +119 -0
  22. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/index.d.ts +540 -0
  23. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/index.js +11 -0
  24. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-paths.d.ts +12 -0
  25. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-paths.js +24 -0
  26. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-renderers.d.ts +276 -0
  27. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-renderers.js +45 -0
  28. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/typed-templates.d.ts +263 -0
  29. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/typed-templates.js +21 -0
  30. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/index.d.ts +2 -0
  31. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/index.js +2 -0
  32. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/templates/routes/-components/invite-user-dialog.d.ts +21 -0
  33. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/templates/routes/-components/invite-user-dialog.js +69 -0
  34. package/dist/local-auth/admin/generators/admin-crud-invite-user-action/templates/routes/-components/invite-user-dialog.tsx +122 -0
  35. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +12 -0
  36. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +12 -0
  37. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +6 -0
  38. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +6 -0
  39. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +12 -0
  40. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +12 -0
  41. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +6 -0
  42. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +12 -0
  43. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +6 -0
  44. package/dist/local-auth/admin/node.js +13 -0
  45. package/dist/local-auth/admin/schema/invite-user-action.d.ts +12 -0
  46. package/dist/local-auth/admin/schema/invite-user-action.js +6 -0
  47. package/dist/local-auth/admin/web.js +8 -0
  48. package/dist/local-auth/core/common.js +7 -2
  49. package/dist/local-auth/core/components/local-auth-definition-editor.js +2 -1
  50. package/dist/local-auth/core/components/local-auth-web-app-settings-form.d.ts +9 -0
  51. package/dist/local-auth/core/components/local-auth-web-app-settings-form.js +11 -0
  52. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +6 -0
  53. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +66 -6
  54. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +188 -0
  55. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts +5 -0
  56. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js +5 -0
  57. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +18 -0
  58. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +66 -0
  59. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +192 -0
  60. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +82 -1
  61. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/otp.constants.d.ts +19 -0
  62. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/otp.constants.js +20 -0
  63. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/otp.constants.ts +22 -0
  64. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts +12 -0
  65. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js +12 -0
  66. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts +14 -0
  67. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-otp.mutations.d.ts +2 -0
  68. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-otp.mutations.js +30 -0
  69. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-otp.mutations.ts +38 -0
  70. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/invite.mutations.d.ts +2 -0
  71. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/invite.mutations.js +42 -0
  72. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/invite.mutations.ts +54 -0
  73. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +2 -19
  74. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +1 -22
  75. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-otp.service.d.ts +37 -0
  76. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-otp.service.js +225 -0
  77. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-otp.service.ts +333 -0
  78. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.d.ts +39 -0
  79. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.js +138 -0
  80. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.ts +209 -0
  81. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +3 -3
  82. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +3 -2
  83. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts +3 -1
  84. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js +18 -3
  85. package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts +40 -0
  86. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts +2 -0
  87. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js +2 -0
  88. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts +6 -0
  89. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js +20 -0
  90. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts +40 -0
  91. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js +24 -0
  92. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/email-otp.email.d.ts +3 -0
  93. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/email-otp.email.js +18 -0
  94. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/email-otp.email.tsx +57 -0
  95. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/invite.email.d.ts +3 -0
  96. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/invite.email.js +14 -0
  97. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/invite.email.tsx +47 -0
  98. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +4 -0
  99. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +5 -1
  100. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +20 -0
  101. package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +1 -0
  102. package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +1 -0
  103. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +3 -0
  104. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +13 -0
  105. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +9 -0
  106. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +6 -0
  107. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +17 -0
  108. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +20 -0
  109. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts +4 -0
  110. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js +1 -1
  111. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.ts +1 -1
  112. package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.d.ts +66 -0
  113. package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.js +134 -0
  114. package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.ts +184 -0
  115. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +8 -0
  116. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +38 -5
  117. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +840 -268
  118. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts +3 -0
  119. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js +3 -0
  120. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +18 -0
  121. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js +51 -0
  122. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +608 -283
  123. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +69 -23
  124. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-otp-constants.d.ts +9 -0
  125. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-otp-constants.js +10 -0
  126. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-otp-constants.ts +11 -0
  127. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.d.ts +7 -0
  128. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.js +148 -0
  129. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.tsx +264 -0
  130. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login-otp.d.ts +7 -0
  131. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login-otp.js +184 -0
  132. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login-otp.tsx +311 -0
  133. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +1 -1
  134. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +2 -9
  135. package/dist/local-auth/core/generators/react-session/generated/index.d.ts +12 -0
  136. package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +6 -0
  137. package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +12 -0
  138. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +6 -0
  139. package/dist/local-auth/core/node.js +24 -6
  140. package/dist/local-auth/core/schema/migrations.d.ts +3 -0
  141. package/dist/local-auth/core/schema/migrations.js +36 -0
  142. package/dist/local-auth/core/schema/models.js +8 -0
  143. package/dist/local-auth/core/schema/plugin-definition.d.ts +1 -0
  144. package/dist/local-auth/core/schema/plugin-definition.js +1 -0
  145. package/dist/local-auth/core/schema/web-app-schema.d.ts +15 -0
  146. package/dist/local-auth/core/schema/web-app-schema.js +16 -0
  147. package/dist/local-auth/core/web.js +8 -1
  148. package/dist/web/assets/{_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-ChkXxpXe.js → _virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth__mf_owner__1-CKKmnLep.js} +42 -34
  149. package/dist/web/assets/{dist-DY7ZXvq4.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-Cx7TvZ_H.js} +16717 -373
  150. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-37vlYRxk.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-D3Nvasea.js} +90 -38
  151. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-DRSNXPPo.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-C2GDE8Py.js} +1645 -921
  152. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-DfiQqvVC.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-CiccpWjh.js} +212 -57
  153. package/dist/web/assets/auth-CsHp2bQi.js +1 -0
  154. package/dist/web/assets/common-BGTuTgx7.js +43 -0
  155. package/dist/web/assets/common-C8_sC5pp.js +70 -0
  156. package/dist/web/assets/{common-ByxS61u8.js → common-Co5lW_TK.js} +10 -10
  157. package/dist/web/assets/{common-iHaemino.js → common-CoLuMS7U.js} +6 -6
  158. package/dist/web/assets/common-Dueu_1NG.js +36 -0
  159. package/dist/web/assets/{common-TDf_PrjX.js → common-N3skPbzk.js} +10 -10
  160. package/dist/web/assets/{dist-CrLSslv6.js → dist-DQd1TAJX.js} +273 -132
  161. package/dist/web/assets/{get-auth-plugin-definition-kDCtXq_6.js → get-auth-plugin-definition-DyokUVjX.js} +3 -3
  162. package/dist/web/assets/{hostInit-Cruek6c6.js → hostInit-BCYmw0H5.js} +32 -5
  163. package/dist/web/assets/{mf-entry-bootstrap-0-dfed0275.js → mf-entry-bootstrap-0-3ede9334.js} +2 -1
  164. package/dist/web/assets/{mf-entry-bootstrap-1-5275674a.js → mf-entry-bootstrap-1-3da85eea.js} +3 -2
  165. package/dist/web/assets/{mf-entry-bootstrap-2-39fb9255.js → mf-entry-bootstrap-2-32e24e11.js} +3 -2
  166. package/dist/web/assets/{mf-entry-bootstrap-3-49e64336.js → mf-entry-bootstrap-3-a3cfea9d.js} +3 -2
  167. package/dist/web/assets/{models-DSvs_3bA.js → models-BcPOQC5p.js} +4 -5
  168. package/dist/web/assets/{models-BZmCbizK.js → models-BcUgOGGn.js} +11 -6
  169. package/dist/web/assets/{plugin-definition-CYj29S3q.js → plugin-definition-D1EImXIf.js} +9 -10
  170. package/dist/web/assets/plugin-definition-lw-gB4hU.js +10 -0
  171. package/dist/web/assets/{styles-yjbHBTlw.js → styles-EOyEbGA4.js} +9 -10
  172. package/dist/web/assets/{virtualExposes-CbPBmicF.js → virtualExposes-DWORnjyA.js} +1 -1
  173. package/dist/web/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-t-KnBiUh.js +747 -0
  174. package/dist/web/assets/{virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-B6BXIeF1.js → virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-DZfE3QCR.js} +13 -13
  175. package/dist/web/assets/{web-VqBA3jxZ.js → web-CBVepebK.js} +22 -22
  176. package/dist/web/assets/{web-D0MSKfyv.js → web-Dgb85jhs.js} +47 -47
  177. package/dist/web/assets/{web-CXAHKjIY.js → web-EDeSquSP.js} +28 -28
  178. package/dist/web/assets/{web-1eTcxMhf.js → web-PqAcfBSy.js} +9 -9
  179. package/dist/web/assets/{web-CDAKPPK9.js → web-RhChfBw_.js} +21 -21
  180. package/dist/web/assets/web-kaD9AzNS.js +59 -0
  181. package/dist/web/assets/web-xJ-GnSkC.js +148 -0
  182. package/dist/web/index.html +5 -5
  183. package/dist/web/remoteEntry.js +1 -1
  184. package/package.json +14 -14
  185. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-CO5Pvo0y.js +0 -384
  186. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-BEZ7A-cz.js +0 -13566
  187. package/dist/web/assets/auth-BxAE0rgh.js +0 -1
  188. package/dist/web/assets/common-CKl_XlvH.js +0 -37
  189. package/dist/web/assets/common-UpVCKZeW.js +0 -41
  190. package/dist/web/assets/common-crSwCD36.js +0 -37
  191. package/dist/web/assets/model-utils-C0WDb_Ec.js +0 -1599
  192. package/dist/web/assets/plugin-definition-DOMmPL2Z.js +0 -11
  193. package/dist/web/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-XM6iYVxf.js +0 -259
  194. package/dist/web/assets/virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-DGjg7Brm.js +0 -129
  195. package/dist/web/assets/web-DbeAaDTV.js +0 -118
  196. package/dist/web/assets/web-miDovYk_.js +0 -46
  197. package/dist/web/remoteEntry.ssr.js +0 -43
@@ -1,4 +1,4 @@
1
- import { tsCodeFragment, TsCodeUtils } from '@baseplate-dev/core-generators';
1
+ import { tsCodeFragment, TsCodeUtils, tsImportBuilder, } from '@baseplate-dev/core-generators';
2
2
  import { appModuleProvider, configServiceProvider, createPothosPrismaObjectTypeOutputName, pothosTypeOutputProvider, } from '@baseplate-dev/fastify-generators';
3
3
  import { transactionalLibConfigProvider } from '@baseplate-dev/plugin-email';
4
4
  import { createGenerator, createGeneratorTask, createProviderTask, } from '@baseplate-dev/sync';
@@ -10,6 +10,8 @@ const descriptorSchema = z.object({
10
10
  adminRoles: z.array(z.string()),
11
11
  devWebDomainPort: z.number(),
12
12
  requireNameOnRegistration: z.boolean(),
13
+ emailOtp: z.boolean().default(false),
14
+ disableRegistration: z.boolean().default(false),
13
15
  });
14
16
  /**
15
17
  * Sets up email / password authentication
@@ -18,7 +20,7 @@ export const authEmailPasswordGenerator = createGenerator({
18
20
  name: 'local-auth/core/auth-email-password',
19
21
  generatorFileUrl: import.meta.url,
20
22
  descriptorSchema,
21
- buildTasks: ({ adminRoles, devWebDomainPort, requireNameOnRegistration, }) => ({
23
+ buildTasks: ({ adminRoles, devWebDomainPort, requireNameOnRegistration, emailOtp, disableRegistration, }) => ({
22
24
  paths: GENERATED_TEMPLATES.paths.task,
23
25
  imports: GENERATED_TEMPLATES.imports.task,
24
26
  renderers: GENERATED_TEMPLATES.renderers.task,
@@ -35,26 +37,59 @@ export const authEmailPasswordGenerator = createGenerator({
35
37
  appModule: appModuleProvider,
36
38
  },
37
39
  run({ paths, appModule }) {
38
- appModule.moduleImports.push(paths.schemaUserPasswordMutations, paths.schemaPasswordResetMutations, paths.schemaEmailVerificationMutations);
40
+ appModule.moduleImports.push(paths.schemaUserPasswordMutations, paths.schemaPasswordResetMutations, paths.schemaInviteMutations, paths.schemaEmailVerificationMutations);
41
+ if (emailOtp) {
42
+ appModule.moduleImports.push(paths.schemaEmailOtpMutations);
43
+ }
39
44
  },
40
45
  }),
41
46
  main: createGeneratorTask({
42
47
  dependencies: {
48
+ paths: GENERATED_TEMPLATES.paths.provider,
43
49
  renderers: GENERATED_TEMPLATES.renderers.provider,
44
50
  transactionalLibConfig: transactionalLibConfigProvider,
45
51
  userObjectType: pothosTypeOutputProvider
46
52
  .dependency()
47
53
  .reference(createPothosPrismaObjectTypeOutputName(LOCAL_AUTH_MODELS.user)),
48
54
  },
49
- run({ renderers, transactionalLibConfig, userObjectType }) {
55
+ run({ paths, renderers, transactionalLibConfig, userObjectType }) {
50
56
  const transactionalLibPackageName = transactionalLibConfig.getTransactionalLibPackageName();
57
+ const adminRolesFragment = TsCodeUtils.mergeFragmentsAsArrayPresorted(adminRoles.map((r) => quot(r)).toSorted());
58
+ const userObjectTypeFragment = userObjectType.getTypeReference().fragment;
59
+ // Kept as its own fragment (rather than a separate mutations file)
60
+ // since the backend serves every web app, and only one field needs
61
+ // to disappear when every web app has registration disabled.
62
+ const registerMutationFragment = disableRegistration
63
+ ? ''
64
+ : tsCodeFragment(`builder.mutationField('registerWithEmailPassword', (t) =>
65
+ t.fieldWithInputPayload({
66
+ authorize: ['public'],
67
+ payload: {
68
+ session: t.payload.field({ type: userSessionPayload }),
69
+ },
70
+ input: {
71
+ email: t.input.field({ required: true, type: 'String' }),
72
+ name: t.input.field({ required: false, type: 'String' }),
73
+ password: t.input.field({ required: true, type: 'String' }),
74
+ },
75
+ resolve: async (root, { input }, context) =>
76
+ registerUserWithEmailAndPassword({
77
+ input: {
78
+ ...input,
79
+ name: input.name ?? undefined,
80
+ },
81
+ context,
82
+ }),
83
+ }),
84
+ );`, tsImportBuilder(['registerUserWithEmailAndPassword']).from(paths.servicesUserPassword));
51
85
  return {
52
86
  build: async (builder) => {
53
87
  await builder.apply(renderers.moduleGroup.render({
54
88
  variables: {
55
89
  schemaUserPasswordMutations: {
56
- TPL_ADMIN_ROLES: TsCodeUtils.mergeFragmentsAsArrayPresorted(adminRoles.map((r) => quot(r)).toSorted()),
57
- TPL_USER_OBJECT_TYPE: userObjectType.getTypeReference().fragment,
90
+ TPL_ADMIN_ROLES: adminRolesFragment,
91
+ TPL_REGISTER_MUTATION: registerMutationFragment,
92
+ TPL_USER_OBJECT_TYPE: userObjectTypeFragment,
58
93
  },
59
94
  servicesPasswordReset: {
60
95
  TPL_PASSWORD_RESET_EMAIL: TsCodeUtils.importFragment('PasswordResetEmail', transactionalLibPackageName),
@@ -67,12 +102,37 @@ export const authEmailPasswordGenerator = createGenerator({
67
102
  },
68
103
  },
69
104
  }));
105
+ await builder.apply(renderers.servicesInvite.render({
106
+ variables: {
107
+ TPL_INVITE_EMAIL: TsCodeUtils.importFragment('InviteEmail', transactionalLibPackageName),
108
+ },
109
+ }));
110
+ await builder.apply(renderers.schemaInviteMutations.render({
111
+ variables: {
112
+ TPL_ADMIN_ROLES: adminRolesFragment,
113
+ TPL_USER_OBJECT_TYPE: userObjectTypeFragment,
114
+ },
115
+ }));
70
116
  await builder.apply(renderers.servicesEmailVerification.render({
71
117
  variables: {
72
118
  TPL_ACCOUNT_VERIFICATION_EMAIL: TsCodeUtils.importFragment('AccountVerificationEmail', transactionalLibPackageName),
73
119
  },
74
120
  }));
75
121
  await builder.apply(renderers.schemaEmailVerificationMutations.render({}));
122
+ if (emailOtp) {
123
+ await builder.apply(renderers.constantsOtp.render({}));
124
+ await builder.apply(renderers.servicesEmailOtp.render({
125
+ variables: {
126
+ TPL_EMAIL_OTP_EMAIL: TsCodeUtils.importFragment('EmailOtpEmail', transactionalLibPackageName),
127
+ // The user lookup lives inside the fragment so it is not
128
+ // left unused when names are not required.
129
+ TPL_NAME_REQUIRED_CHECK: requireNameOnRegistration
130
+ ? tsCodeFragment("const existingUser = await prisma.user.findUnique({\n where: { email },\n select: { id: true },\n });\n\n if (!existingUser && !name) {\n throw new BadRequestError('Name is required', 'name-required');\n }")
131
+ : '',
132
+ },
133
+ }));
134
+ await builder.apply(renderers.schemaEmailOtpMutations.render({}));
135
+ }
76
136
  },
77
137
  };
78
138
  },
@@ -34,10 +34,13 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
34
34
  cleanupAuthVerificationQueue: {};
35
35
  cleanupAuthVerificationWorker: {};
36
36
  cleanupExpiredAuthVerifications: {};
37
+ consumeCodeVerification: {};
37
38
  CookieUserSessionService: {};
38
39
  createAuthVerification: {};
40
+ createCodeVerification: {};
39
41
  userSessionPayload: {};
40
42
  validateAuthVerification: {};
43
+ validateCodeVerification: {};
41
44
  }>>;
42
45
  configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
43
46
  getConfig: {};
@@ -106,6 +109,7 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
106
109
  }, undefined>;
107
110
  };
108
111
  templates: {
112
+ constantsOtp: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
109
113
  moduleGroup: {
110
114
  constantsPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
111
115
  schemaPasswordResetMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
@@ -117,16 +121,20 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
117
121
  }>;
118
122
  schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
119
123
  TPL_ADMIN_ROLES: {};
124
+ TPL_REGISTER_MUTATION: {};
120
125
  TPL_USER_OBJECT_TYPE: {};
121
126
  }, {
122
127
  authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
123
128
  cleanupAuthVerificationQueue: {};
124
129
  cleanupAuthVerificationWorker: {};
125
130
  cleanupExpiredAuthVerifications: {};
131
+ consumeCodeVerification: {};
126
132
  CookieUserSessionService: {};
127
133
  createAuthVerification: {};
134
+ createCodeVerification: {};
128
135
  userSessionPayload: {};
129
136
  validateAuthVerification: {};
137
+ validateCodeVerification: {};
130
138
  }>>;
131
139
  pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
132
140
  builder: {};
@@ -142,10 +150,13 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
142
150
  cleanupAuthVerificationQueue: {};
143
151
  cleanupAuthVerificationWorker: {};
144
152
  cleanupExpiredAuthVerifications: {};
153
+ consumeCodeVerification: {};
145
154
  CookieUserSessionService: {};
146
155
  createAuthVerification: {};
156
+ createCodeVerification: {};
147
157
  userSessionPayload: {};
148
158
  validateAuthVerification: {};
159
+ validateCodeVerification: {};
149
160
  }>>;
150
161
  configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
151
162
  getConfig: {};
@@ -259,6 +270,25 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
259
270
  servicesEmailVerification: {};
260
271
  }>;
261
272
  };
273
+ schemaEmailOtpMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
274
+ authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
275
+ cleanupAuthVerificationQueue: {};
276
+ cleanupAuthVerificationWorker: {};
277
+ cleanupExpiredAuthVerifications: {};
278
+ consumeCodeVerification: {};
279
+ CookieUserSessionService: {};
280
+ createAuthVerification: {};
281
+ createCodeVerification: {};
282
+ userSessionPayload: {};
283
+ validateAuthVerification: {};
284
+ validateCodeVerification: {};
285
+ }>>;
286
+ pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
287
+ builder: {};
288
+ }>>;
289
+ }, {
290
+ servicesEmailOtp: {};
291
+ }>;
262
292
  schemaEmailVerificationMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
263
293
  pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
264
294
  builder: {};
@@ -266,6 +296,97 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
266
296
  }, {
267
297
  servicesEmailVerification: {};
268
298
  }>;
299
+ schemaInviteMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
300
+ TPL_ADMIN_ROLES: {};
301
+ TPL_USER_OBJECT_TYPE: {};
302
+ }, {
303
+ authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
304
+ cleanupAuthVerificationQueue: {};
305
+ cleanupAuthVerificationWorker: {};
306
+ cleanupExpiredAuthVerifications: {};
307
+ consumeCodeVerification: {};
308
+ CookieUserSessionService: {};
309
+ createAuthVerification: {};
310
+ createCodeVerification: {};
311
+ userSessionPayload: {};
312
+ validateAuthVerification: {};
313
+ validateCodeVerification: {};
314
+ }>>;
315
+ pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
316
+ builder: {};
317
+ }>>;
318
+ }, {
319
+ servicesInvite: {};
320
+ }>;
321
+ servicesEmailOtp: import("@baseplate-dev/core-generators").TsTemplateFile<{
322
+ TPL_EMAIL_OTP_EMAIL: {};
323
+ TPL_NAME_REQUIRED_CHECK: {};
324
+ }, {
325
+ authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
326
+ cleanupAuthVerificationQueue: {};
327
+ cleanupAuthVerificationWorker: {};
328
+ cleanupExpiredAuthVerifications: {};
329
+ consumeCodeVerification: {};
330
+ CookieUserSessionService: {};
331
+ createAuthVerification: {};
332
+ createCodeVerification: {};
333
+ userSessionPayload: {};
334
+ validateAuthVerification: {};
335
+ validateCodeVerification: {};
336
+ }>>;
337
+ configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
338
+ getConfig: {};
339
+ isDevelopment: {};
340
+ }>>;
341
+ errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
342
+ BadRequestError: {};
343
+ ForbiddenError: {};
344
+ handleZodRequestValidationError: {};
345
+ HttpError: {};
346
+ InternalServerError: {};
347
+ logError: {};
348
+ NotFoundError: {};
349
+ throwIfPrismaNotFound: {};
350
+ TooManyRequestsError: {};
351
+ UnauthorizedError: {};
352
+ }>>;
353
+ prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
354
+ prisma: {};
355
+ }>>;
356
+ rateLimitImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
357
+ createRateLimiter: {};
358
+ memoizeRateLimiter: {};
359
+ RateLimiter: {
360
+ isTypeOnly: true;
361
+ };
362
+ RateLimiterConfig: {
363
+ isTypeOnly: true;
364
+ };
365
+ RateLimitResult: {
366
+ isTypeOnly: true;
367
+ };
368
+ }>>;
369
+ requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
370
+ createContextFromRequest: {};
371
+ RequestServiceContext: {
372
+ isTypeOnly: true;
373
+ };
374
+ RequestServiceContextWith: {
375
+ isTypeOnly: true;
376
+ };
377
+ }>>;
378
+ userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
379
+ UserSessionPayload: {
380
+ isTypeOnly: true;
381
+ };
382
+ UserSessionService: {
383
+ isTypeOnly: true;
384
+ };
385
+ }>>;
386
+ }, {
387
+ constantsOtp: {};
388
+ constantsPassword: {};
389
+ }>;
269
390
  servicesEmailVerification: import("@baseplate-dev/core-generators").TsTemplateFile<{
270
391
  TPL_ACCOUNT_VERIFICATION_EMAIL: {};
271
392
  }, {
@@ -273,10 +394,13 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
273
394
  cleanupAuthVerificationQueue: {};
274
395
  cleanupAuthVerificationWorker: {};
275
396
  cleanupExpiredAuthVerifications: {};
397
+ consumeCodeVerification: {};
276
398
  CookieUserSessionService: {};
277
399
  createAuthVerification: {};
400
+ createCodeVerification: {};
278
401
  userSessionPayload: {};
279
402
  validateAuthVerification: {};
403
+ validateCodeVerification: {};
280
404
  }>>;
281
405
  configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
282
406
  getConfig: {};
@@ -322,6 +446,70 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
322
446
  }, {
323
447
  constantsPassword: {};
324
448
  }>;
449
+ servicesInvite: import("@baseplate-dev/core-generators").TsTemplateFile<{
450
+ TPL_INVITE_EMAIL: {};
451
+ }, {
452
+ authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
453
+ cleanupAuthVerificationQueue: {};
454
+ cleanupAuthVerificationWorker: {};
455
+ cleanupExpiredAuthVerifications: {};
456
+ consumeCodeVerification: {};
457
+ CookieUserSessionService: {};
458
+ createAuthVerification: {};
459
+ createCodeVerification: {};
460
+ userSessionPayload: {};
461
+ validateAuthVerification: {};
462
+ validateCodeVerification: {};
463
+ }>>;
464
+ configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
465
+ getConfig: {};
466
+ isDevelopment: {};
467
+ }>>;
468
+ errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
469
+ BadRequestError: {};
470
+ ForbiddenError: {};
471
+ handleZodRequestValidationError: {};
472
+ HttpError: {};
473
+ InternalServerError: {};
474
+ logError: {};
475
+ NotFoundError: {};
476
+ throwIfPrismaNotFound: {};
477
+ TooManyRequestsError: {};
478
+ UnauthorizedError: {};
479
+ }>>;
480
+ passwordHasherServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
481
+ createPasswordHash: {};
482
+ verifyPasswordHash: {};
483
+ }>>;
484
+ prismaGeneratedImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
485
+ PrismaClient: {};
486
+ Prisma: {};
487
+ '*': {};
488
+ $Enums: {};
489
+ }>>;
490
+ prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
491
+ prisma: {};
492
+ }>>;
493
+ requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
494
+ createContextFromRequest: {};
495
+ RequestServiceContext: {
496
+ isTypeOnly: true;
497
+ };
498
+ RequestServiceContextWith: {
499
+ isTypeOnly: true;
500
+ };
501
+ }>>;
502
+ userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
503
+ UserSessionPayload: {
504
+ isTypeOnly: true;
505
+ };
506
+ UserSessionService: {
507
+ isTypeOnly: true;
508
+ };
509
+ }>>;
510
+ }, {
511
+ constantsPassword: {};
512
+ }>;
325
513
  };
326
514
  };
327
515
  //# sourceMappingURL=index.d.ts.map
@@ -1,9 +1,14 @@
1
1
  export interface LocalAuthCoreAuthEmailPasswordPaths {
2
+ constantsOtp: string;
2
3
  constantsPassword: string;
4
+ schemaEmailOtpMutations: string;
3
5
  schemaEmailVerificationMutations: string;
6
+ schemaInviteMutations: string;
4
7
  schemaPasswordResetMutations: string;
5
8
  schemaUserPasswordMutations: string;
9
+ servicesEmailOtp: string;
6
10
  servicesEmailVerification: string;
11
+ servicesInvite: string;
7
12
  servicesPasswordReset: string;
8
13
  servicesUserPassword: string;
9
14
  }
@@ -11,11 +11,16 @@ const localAuthCoreAuthEmailPasswordPathsTask = createGeneratorTask({
11
11
  return {
12
12
  providers: {
13
13
  localAuthCoreAuthEmailPasswordPaths: {
14
+ constantsOtp: `${moduleRoot}/constants/otp.constants.ts`,
14
15
  constantsPassword: `${moduleRoot}/constants/password.constants.ts`,
16
+ schemaEmailOtpMutations: `${moduleRoot}/schema/email-otp.mutations.ts`,
15
17
  schemaEmailVerificationMutations: `${moduleRoot}/schema/email-verification.mutations.ts`,
18
+ schemaInviteMutations: `${moduleRoot}/schema/invite.mutations.ts`,
16
19
  schemaPasswordResetMutations: `${moduleRoot}/schema/password-reset.mutations.ts`,
17
20
  schemaUserPasswordMutations: `${moduleRoot}/schema/user-password.mutations.ts`,
21
+ servicesEmailOtp: `${moduleRoot}/services/email-otp.service.ts`,
18
22
  servicesEmailVerification: `${moduleRoot}/services/email-verification.service.ts`,
23
+ servicesInvite: `${moduleRoot}/services/invite.service.ts`,
19
24
  servicesPasswordReset: `${moduleRoot}/services/password-reset.service.ts`,
20
25
  servicesUserPassword: `${moduleRoot}/services/user-password.service.ts`,
21
26
  },
@@ -2,15 +2,30 @@ import type { RenderTsTemplateFileActionInput, RenderTsTemplateGroupActionInput
2
2
  import type { BuilderAction } from '@baseplate-dev/sync';
3
3
  import { LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES } from './typed-templates.js';
4
4
  export interface LocalAuthCoreAuthEmailPasswordRenderers {
5
+ constantsOtp: {
6
+ render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.constantsOtp>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
7
+ };
5
8
  moduleGroup: {
6
9
  render: (options: Omit<RenderTsTemplateGroupActionInput<typeof LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.moduleGroup>, 'importMapProviders' | 'group' | 'paths' | 'generatorPaths'>) => BuilderAction;
7
10
  };
11
+ schemaEmailOtpMutations: {
12
+ render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.schemaEmailOtpMutations>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
13
+ };
8
14
  schemaEmailVerificationMutations: {
9
15
  render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.schemaEmailVerificationMutations>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
10
16
  };
17
+ schemaInviteMutations: {
18
+ render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.schemaInviteMutations>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
19
+ };
20
+ servicesEmailOtp: {
21
+ render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.servicesEmailOtp>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
22
+ };
11
23
  servicesEmailVerification: {
12
24
  render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.servicesEmailVerification>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
13
25
  };
26
+ servicesInvite: {
27
+ render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.servicesInvite>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
28
+ };
14
29
  }
15
30
  export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_RENDERERS: {
16
31
  provider: import("@baseplate-dev/sync").ProviderType<LocalAuthCoreAuthEmailPasswordRenderers>;
@@ -21,10 +36,13 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_RENDERERS: {
21
36
  cleanupAuthVerificationQueue: {};
22
37
  cleanupAuthVerificationWorker: {};
23
38
  cleanupExpiredAuthVerifications: {};
39
+ consumeCodeVerification: {};
24
40
  CookieUserSessionService: {};
25
41
  createAuthVerification: {};
42
+ createCodeVerification: {};
26
43
  userSessionPayload: {};
27
44
  validateAuthVerification: {};
45
+ validateCodeVerification: {};
28
46
  }>>;
29
47
  configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
30
48
  getConfig: {};
@@ -28,6 +28,13 @@ const localAuthCoreAuthEmailPasswordRenderersTask = createGeneratorTask({
28
28
  return {
29
29
  providers: {
30
30
  localAuthCoreAuthEmailPasswordRenderers: {
31
+ constantsOtp: {
32
+ render: (options) => typescriptFile.renderTemplateFile({
33
+ template: LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.constantsOtp,
34
+ destination: paths.constantsOtp,
35
+ ...options,
36
+ }),
37
+ },
31
38
  moduleGroup: {
32
39
  render: (options) => typescriptFile.renderTemplateGroup({
33
40
  group: LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.moduleGroup,
@@ -48,6 +55,18 @@ const localAuthCoreAuthEmailPasswordRenderersTask = createGeneratorTask({
48
55
  ...options,
49
56
  }),
50
57
  },
58
+ schemaEmailOtpMutations: {
59
+ render: (options) => typescriptFile.renderTemplateFile({
60
+ template: LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.schemaEmailOtpMutations,
61
+ destination: paths.schemaEmailOtpMutations,
62
+ importMapProviders: {
63
+ authModuleImports,
64
+ pothosImports,
65
+ },
66
+ generatorPaths: paths,
67
+ ...options,
68
+ }),
69
+ },
51
70
  schemaEmailVerificationMutations: {
52
71
  render: (options) => typescriptFile.renderTemplateFile({
53
72
  template: LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.schemaEmailVerificationMutations,
@@ -59,6 +78,35 @@ const localAuthCoreAuthEmailPasswordRenderersTask = createGeneratorTask({
59
78
  ...options,
60
79
  }),
61
80
  },
81
+ schemaInviteMutations: {
82
+ render: (options) => typescriptFile.renderTemplateFile({
83
+ template: LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.schemaInviteMutations,
84
+ destination: paths.schemaInviteMutations,
85
+ importMapProviders: {
86
+ authModuleImports,
87
+ pothosImports,
88
+ },
89
+ generatorPaths: paths,
90
+ ...options,
91
+ }),
92
+ },
93
+ servicesEmailOtp: {
94
+ render: (options) => typescriptFile.renderTemplateFile({
95
+ template: LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.servicesEmailOtp,
96
+ destination: paths.servicesEmailOtp,
97
+ importMapProviders: {
98
+ authModuleImports,
99
+ configServiceImports,
100
+ errorHandlerServiceImports,
101
+ prismaImports,
102
+ rateLimitImports,
103
+ requestServiceContextImports,
104
+ userSessionTypesImports,
105
+ },
106
+ generatorPaths: paths,
107
+ ...options,
108
+ }),
109
+ },
62
110
  servicesEmailVerification: {
63
111
  render: (options) => typescriptFile.renderTemplateFile({
64
112
  template: LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.servicesEmailVerification,
@@ -75,6 +123,24 @@ const localAuthCoreAuthEmailPasswordRenderersTask = createGeneratorTask({
75
123
  ...options,
76
124
  }),
77
125
  },
126
+ servicesInvite: {
127
+ render: (options) => typescriptFile.renderTemplateFile({
128
+ template: LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES.servicesInvite,
129
+ destination: paths.servicesInvite,
130
+ importMapProviders: {
131
+ authModuleImports,
132
+ configServiceImports,
133
+ errorHandlerServiceImports,
134
+ passwordHasherServiceImports,
135
+ prismaGeneratedImports,
136
+ prismaImports,
137
+ requestServiceContextImports,
138
+ userSessionTypesImports,
139
+ },
140
+ generatorPaths: paths,
141
+ ...options,
142
+ }),
143
+ },
78
144
  },
79
145
  },
80
146
  };