hazo_auth 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (494) hide show
  1. package/README.md +398 -773
  2. package/dist/components/index.d.ts +3 -0
  3. package/dist/components/index.d.ts.map +1 -0
  4. package/dist/components/index.js +5 -0
  5. package/dist/components/layouts/email_verification/config/email_verification_field_config.d.ts +23 -0
  6. package/dist/components/layouts/email_verification/config/email_verification_field_config.d.ts.map +1 -0
  7. package/dist/components/layouts/email_verification/config/email_verification_field_config.js +44 -0
  8. package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts +31 -0
  9. package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts.map +1 -0
  10. package/dist/components/layouts/email_verification/hooks/use_email_verification.js +222 -0
  11. package/dist/components/layouts/email_verification/index.d.ts +23 -0
  12. package/dist/components/layouts/email_verification/index.d.ts.map +1 -0
  13. package/dist/components/layouts/email_verification/index.js +61 -0
  14. package/dist/components/layouts/forgot_password/config/forgot_password_field_config.d.ts +10 -0
  15. package/dist/components/layouts/forgot_password/config/forgot_password_field_config.d.ts.map +1 -0
  16. package/dist/components/layouts/forgot_password/config/forgot_password_field_config.js +33 -0
  17. package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts +22 -0
  18. package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts.map +1 -0
  19. package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.js +127 -0
  20. package/dist/components/layouts/forgot_password/index.d.ts +18 -0
  21. package/dist/components/layouts/forgot_password/index.d.ts.map +1 -0
  22. package/dist/components/layouts/forgot_password/index.js +43 -0
  23. package/dist/components/layouts/index.d.ts +16 -0
  24. package/dist/components/layouts/index.d.ts.map +1 -0
  25. package/dist/components/layouts/index.js +11 -0
  26. package/dist/components/layouts/login/config/login_field_config.d.ts +11 -0
  27. package/dist/components/layouts/login/config/login_field_config.d.ts.map +1 -0
  28. package/dist/components/layouts/login/config/login_field_config.js +42 -0
  29. package/dist/components/layouts/login/hooks/use_login_form.d.ts +34 -0
  30. package/dist/components/layouts/login/hooks/use_login_form.d.ts.map +1 -0
  31. package/dist/components/layouts/login/hooks/use_login_form.js +196 -0
  32. package/dist/components/layouts/login/index.d.ts +31 -0
  33. package/dist/components/layouts/login/index.d.ts.map +1 -0
  34. package/dist/components/layouts/login/index.js +58 -0
  35. package/dist/components/layouts/my_settings/components/editable_field.d.ts +19 -0
  36. package/dist/components/layouts/my_settings/components/editable_field.d.ts.map +1 -0
  37. package/dist/components/layouts/my_settings/components/editable_field.js +73 -0
  38. package/dist/components/layouts/my_settings/components/password_change_dialog.d.ts +28 -0
  39. package/dist/components/layouts/my_settings/components/password_change_dialog.d.ts.map +1 -0
  40. package/dist/components/layouts/my_settings/components/password_change_dialog.js +138 -0
  41. package/dist/components/layouts/my_settings/components/profile_picture_dialog.d.ts +42 -0
  42. package/dist/components/layouts/my_settings/components/profile_picture_dialog.d.ts.map +1 -0
  43. package/dist/components/layouts/my_settings/components/profile_picture_dialog.js +198 -0
  44. package/dist/components/layouts/my_settings/components/profile_picture_display.d.ts +16 -0
  45. package/dist/components/layouts/my_settings/components/profile_picture_display.d.ts.map +1 -0
  46. package/dist/components/layouts/my_settings/components/profile_picture_display.js +33 -0
  47. package/dist/components/layouts/my_settings/components/profile_picture_gravatar_tab.d.ts +17 -0
  48. package/dist/components/layouts/my_settings/components/profile_picture_gravatar_tab.d.ts.map +1 -0
  49. package/dist/components/layouts/my_settings/components/profile_picture_gravatar_tab.js +48 -0
  50. package/dist/components/layouts/my_settings/components/profile_picture_library_tab.d.ts +21 -0
  51. package/dist/components/layouts/my_settings/components/profile_picture_library_tab.d.ts.map +1 -0
  52. package/dist/components/layouts/my_settings/components/profile_picture_library_tab.js +144 -0
  53. package/dist/components/layouts/my_settings/components/profile_picture_upload_tab.d.ts +23 -0
  54. package/dist/components/layouts/my_settings/components/profile_picture_upload_tab.d.ts.map +1 -0
  55. package/dist/components/layouts/my_settings/components/profile_picture_upload_tab.js +169 -0
  56. package/dist/components/layouts/my_settings/config/my_settings_field_config.d.ts +19 -0
  57. package/dist/components/layouts/my_settings/config/my_settings_field_config.d.ts.map +1 -0
  58. package/dist/components/layouts/my_settings/config/my_settings_field_config.js +26 -0
  59. package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts +46 -0
  60. package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts.map +1 -0
  61. package/dist/components/layouts/my_settings/hooks/use_my_settings.js +354 -0
  62. package/dist/components/layouts/my_settings/index.d.ts +64 -0
  63. package/dist/components/layouts/my_settings/index.d.ts.map +1 -0
  64. package/dist/components/layouts/my_settings/index.js +65 -0
  65. package/dist/components/layouts/register/config/register_field_config.d.ts +14 -0
  66. package/dist/components/layouts/register/config/register_field_config.d.ts.map +1 -0
  67. package/dist/components/layouts/register/config/register_field_config.js +69 -0
  68. package/dist/components/layouts/register/hooks/use_register_form.d.ts +30 -0
  69. package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -0
  70. package/dist/components/layouts/register/hooks/use_register_form.js +184 -0
  71. package/dist/components/layouts/register/index.d.ts +23 -0
  72. package/dist/components/layouts/register/index.d.ts.map +1 -0
  73. package/dist/components/layouts/register/index.js +58 -0
  74. package/dist/components/layouts/reset_password/config/reset_password_field_config.d.ts +13 -0
  75. package/dist/components/layouts/reset_password/config/reset_password_field_config.d.ts.map +1 -0
  76. package/dist/components/layouts/reset_password/config/reset_password_field_config.js +53 -0
  77. package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts +28 -0
  78. package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts.map +1 -0
  79. package/dist/components/layouts/reset_password/hooks/use_reset_password_form.js +201 -0
  80. package/dist/components/layouts/reset_password/index.d.ts +23 -0
  81. package/dist/components/layouts/reset_password/index.d.ts.map +1 -0
  82. package/dist/components/layouts/reset_password/index.js +53 -0
  83. package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts +20 -0
  84. package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts.map +1 -0
  85. package/dist/components/layouts/shared/components/already_logged_in_guard.js +32 -0
  86. package/dist/components/layouts/shared/components/auth_page_shell.d.ts +7 -0
  87. package/dist/components/layouts/shared/components/auth_page_shell.d.ts.map +1 -0
  88. package/dist/components/layouts/shared/components/auth_page_shell.js +12 -0
  89. package/dist/components/layouts/shared/components/field_error_message.d.ts +7 -0
  90. package/dist/components/layouts/shared/components/field_error_message.d.ts.map +1 -0
  91. package/dist/components/layouts/shared/components/field_error_message.js +6 -0
  92. package/dist/components/layouts/shared/components/form_action_buttons.d.ts +14 -0
  93. package/dist/components/layouts/shared/components/form_action_buttons.d.ts.map +1 -0
  94. package/dist/components/layouts/shared/components/form_action_buttons.js +15 -0
  95. package/dist/components/layouts/shared/components/form_field_wrapper.d.ts +11 -0
  96. package/dist/components/layouts/shared/components/form_field_wrapper.d.ts.map +1 -0
  97. package/dist/components/layouts/shared/components/form_field_wrapper.js +9 -0
  98. package/dist/components/layouts/shared/components/form_header.d.ts +10 -0
  99. package/dist/components/layouts/shared/components/form_header.d.ts.map +1 -0
  100. package/dist/components/layouts/shared/components/form_header.js +5 -0
  101. package/dist/components/layouts/shared/components/logout_button.d.ts +7 -0
  102. package/dist/components/layouts/shared/components/logout_button.d.ts.map +1 -0
  103. package/dist/components/layouts/shared/components/logout_button.js +44 -0
  104. package/dist/components/layouts/shared/components/password_field.d.ts +13 -0
  105. package/dist/components/layouts/shared/components/password_field.d.ts.map +1 -0
  106. package/dist/components/layouts/shared/components/password_field.js +13 -0
  107. package/dist/components/layouts/shared/components/profile_pic_menu.d.ts +22 -0
  108. package/dist/components/layouts/shared/components/profile_pic_menu.d.ts.map +1 -0
  109. package/dist/components/layouts/shared/components/profile_pic_menu.js +169 -0
  110. package/dist/components/layouts/shared/components/profile_pic_menu_wrapper.d.ts +12 -0
  111. package/dist/components/layouts/shared/components/profile_pic_menu_wrapper.d.ts.map +1 -0
  112. package/dist/components/layouts/shared/components/profile_pic_menu_wrapper.js +16 -0
  113. package/dist/components/layouts/shared/components/sidebar_layout_wrapper.d.ts +6 -0
  114. package/dist/components/layouts/shared/components/sidebar_layout_wrapper.d.ts.map +1 -0
  115. package/dist/components/layouts/shared/components/sidebar_layout_wrapper.js +15 -0
  116. package/dist/components/layouts/shared/components/standalone_layout_wrapper.d.ts +11 -0
  117. package/dist/components/layouts/shared/components/standalone_layout_wrapper.d.ts.map +1 -0
  118. package/dist/components/layouts/shared/components/standalone_layout_wrapper.js +10 -0
  119. package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts +12 -0
  120. package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts.map +1 -0
  121. package/dist/components/layouts/shared/components/two_column_auth_layout.js +8 -0
  122. package/dist/components/layouts/shared/components/unauthorized_guard.d.ts +14 -0
  123. package/dist/components/layouts/shared/components/unauthorized_guard.d.ts.map +1 -0
  124. package/dist/components/layouts/shared/components/unauthorized_guard.js +30 -0
  125. package/dist/components/layouts/shared/components/visual_panel.d.ts +9 -0
  126. package/dist/components/layouts/shared/components/visual_panel.d.ts.map +1 -0
  127. package/dist/components/layouts/shared/components/visual_panel.js +10 -0
  128. package/dist/components/layouts/shared/config/layout_customization.d.ts +38 -0
  129. package/dist/components/layouts/shared/config/layout_customization.d.ts.map +1 -0
  130. package/dist/components/layouts/shared/config/layout_customization.js +19 -0
  131. package/dist/components/layouts/shared/data/layout_data_client.d.ts +6 -0
  132. package/dist/components/layouts/shared/data/layout_data_client.d.ts.map +1 -0
  133. package/dist/components/layouts/shared/data/layout_data_client.js +9 -0
  134. package/dist/components/layouts/shared/hooks/use_auth_status.d.ts +20 -0
  135. package/dist/components/layouts/shared/hooks/use_auth_status.d.ts.map +1 -0
  136. package/dist/components/layouts/shared/hooks/use_auth_status.js +71 -0
  137. package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts +48 -0
  138. package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts.map +1 -0
  139. package/dist/components/layouts/shared/hooks/use_hazo_auth.js +90 -0
  140. package/dist/components/layouts/shared/index.d.ts +24 -0
  141. package/dist/components/layouts/shared/index.d.ts.map +1 -0
  142. package/dist/components/layouts/shared/index.js +27 -0
  143. package/dist/components/layouts/shared/utils/ip_address.d.ts +7 -0
  144. package/dist/components/layouts/shared/utils/ip_address.d.ts.map +1 -0
  145. package/dist/components/layouts/shared/utils/ip_address.js +34 -0
  146. package/dist/components/layouts/shared/utils/validation.d.ts +15 -0
  147. package/dist/components/layouts/shared/utils/validation.d.ts.map +1 -0
  148. package/dist/components/layouts/shared/utils/validation.js +45 -0
  149. package/dist/components/layouts/user_management/components/roles_matrix.d.ts +29 -0
  150. package/dist/components/layouts/user_management/components/roles_matrix.d.ts.map +1 -0
  151. package/dist/components/layouts/user_management/components/roles_matrix.js +287 -0
  152. package/dist/components/layouts/user_management/index.d.ts +13 -0
  153. package/dist/components/layouts/user_management/index.d.ts.map +1 -0
  154. package/dist/components/layouts/user_management/index.js +495 -0
  155. package/dist/components/ui/alert-dialog.d.ts +21 -0
  156. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  157. package/dist/components/ui/alert-dialog.js +62 -0
  158. package/dist/components/ui/avatar.d.ts +7 -0
  159. package/dist/components/ui/avatar.d.ts.map +1 -0
  160. package/dist/components/ui/avatar.js +32 -0
  161. package/dist/components/ui/button.d.ts +12 -0
  162. package/dist/components/ui/button.d.ts.map +1 -0
  163. package/dist/components/ui/button.js +45 -0
  164. package/dist/components/ui/checkbox.d.ts +5 -0
  165. package/dist/components/ui/checkbox.d.ts.map +1 -0
  166. package/dist/components/ui/checkbox.js +23 -0
  167. package/dist/components/ui/dialog.d.ts +20 -0
  168. package/dist/components/ui/dialog.d.ts.map +1 -0
  169. package/dist/components/ui/dialog.js +52 -0
  170. package/dist/components/ui/dropdown-menu.d.ts +28 -0
  171. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  172. package/dist/components/ui/dropdown-menu.js +72 -0
  173. package/dist/components/ui/hazo_ui_tooltip.d.ts +26 -0
  174. package/dist/components/ui/hazo_ui_tooltip.d.ts.map +1 -0
  175. package/dist/components/ui/hazo_ui_tooltip.js +17 -0
  176. package/dist/components/ui/index.d.ts +20 -0
  177. package/dist/components/ui/index.d.ts.map +1 -0
  178. package/dist/components/ui/index.js +21 -0
  179. package/dist/components/ui/input.d.ts +4 -0
  180. package/dist/components/ui/input.d.ts.map +1 -0
  181. package/dist/components/ui/input.js +20 -0
  182. package/dist/components/ui/label.d.ts +6 -0
  183. package/dist/components/ui/label.d.ts.map +1 -0
  184. package/dist/components/ui/label.js +24 -0
  185. package/dist/components/ui/separator.d.ts +5 -0
  186. package/dist/components/ui/separator.d.ts.map +1 -0
  187. package/dist/components/ui/separator.js +22 -0
  188. package/dist/components/ui/sheet.d.ts +23 -0
  189. package/dist/components/ui/sheet.d.ts.map +1 -0
  190. package/dist/components/ui/sheet.js +66 -0
  191. package/dist/components/ui/sidebar.d.ts +66 -0
  192. package/dist/components/ui/sidebar.d.ts.map +1 -0
  193. package/dist/components/ui/sidebar.js +267 -0
  194. package/dist/components/ui/skeleton.d.ts +3 -0
  195. package/dist/components/ui/skeleton.d.ts.map +1 -0
  196. package/dist/components/ui/skeleton.js +18 -0
  197. package/dist/components/ui/sonner.d.ts +5 -0
  198. package/dist/components/ui/sonner.d.ts.map +1 -0
  199. package/dist/components/ui/sonner.js +28 -0
  200. package/dist/components/ui/switch.d.ts +5 -0
  201. package/dist/components/ui/switch.d.ts.map +1 -0
  202. package/dist/components/ui/switch.js +22 -0
  203. package/dist/components/ui/table.d.ts +11 -0
  204. package/dist/components/ui/table.d.ts.map +1 -0
  205. package/dist/components/ui/table.js +55 -0
  206. package/dist/components/ui/tabs.d.ts +8 -0
  207. package/dist/components/ui/tabs.d.ts.map +1 -0
  208. package/dist/components/ui/tabs.js +33 -0
  209. package/dist/components/ui/tooltip.d.ts +8 -0
  210. package/dist/components/ui/tooltip.d.ts.map +1 -0
  211. package/dist/components/ui/tooltip.js +25 -0
  212. package/dist/components/ui/vertical-tabs.d.ts +8 -0
  213. package/dist/components/ui/vertical-tabs.d.ts.map +1 -0
  214. package/dist/components/ui/vertical-tabs.js +37 -0
  215. package/dist/hooks/use-mobile.d.ts +2 -0
  216. package/dist/hooks/use-mobile.d.ts.map +1 -0
  217. package/dist/hooks/use-mobile.js +15 -0
  218. package/dist/index.d.ts +3 -0
  219. package/dist/index.d.ts.map +1 -0
  220. package/dist/index.js +5 -0
  221. package/dist/lib/already_logged_in_config.server.d.ts +14 -0
  222. package/dist/lib/already_logged_in_config.server.d.ts.map +1 -0
  223. package/dist/lib/already_logged_in_config.server.js +29 -0
  224. package/dist/lib/app_logger.d.ts +12 -0
  225. package/dist/lib/app_logger.d.ts.map +1 -0
  226. package/dist/lib/app_logger.js +14 -0
  227. package/dist/lib/auth/auth_cache.d.ts +83 -0
  228. package/dist/lib/auth/auth_cache.d.ts.map +1 -0
  229. package/dist/lib/auth/auth_cache.js +158 -0
  230. package/dist/lib/auth/auth_rate_limiter.d.ts +39 -0
  231. package/dist/lib/auth/auth_rate_limiter.d.ts.map +1 -0
  232. package/dist/lib/auth/auth_rate_limiter.js +95 -0
  233. package/dist/lib/auth/auth_types.d.ts +53 -0
  234. package/dist/lib/auth/auth_types.d.ts.map +1 -0
  235. package/dist/lib/auth/auth_types.js +16 -0
  236. package/dist/lib/auth/auth_utils.server.d.ts +47 -0
  237. package/dist/lib/auth/auth_utils.server.d.ts.map +1 -0
  238. package/dist/lib/auth/auth_utils.server.js +150 -0
  239. package/dist/lib/auth/hazo_get_auth.server.d.ts +12 -0
  240. package/dist/lib/auth/hazo_get_auth.server.d.ts.map +1 -0
  241. package/dist/lib/auth/hazo_get_auth.server.js +256 -0
  242. package/dist/lib/auth/index.d.ts +9 -0
  243. package/dist/lib/auth/index.d.ts.map +1 -0
  244. package/dist/lib/auth/index.js +12 -0
  245. package/dist/lib/auth/server_auth.d.ts +26 -0
  246. package/dist/lib/auth/server_auth.d.ts.map +1 -0
  247. package/dist/lib/auth/server_auth.js +62 -0
  248. package/dist/lib/auth_utility_config.server.d.ts +20 -0
  249. package/dist/lib/auth_utility_config.server.d.ts.map +1 -0
  250. package/dist/lib/auth_utility_config.server.js +64 -0
  251. package/dist/lib/config/config_loader.server.d.ts +44 -0
  252. package/dist/lib/config/config_loader.server.d.ts.map +1 -0
  253. package/dist/lib/config/config_loader.server.js +122 -0
  254. package/dist/lib/email_verification_config.server.d.ts +14 -0
  255. package/dist/lib/email_verification_config.server.d.ts.map +1 -0
  256. package/dist/lib/email_verification_config.server.js +20 -0
  257. package/dist/lib/file_types_config.server.d.ts +11 -0
  258. package/dist/lib/file_types_config.server.d.ts.map +1 -0
  259. package/dist/lib/file_types_config.server.js +16 -0
  260. package/dist/lib/forgot_password_config.server.d.ts +14 -0
  261. package/dist/lib/forgot_password_config.server.d.ts.map +1 -0
  262. package/dist/lib/forgot_password_config.server.js +20 -0
  263. package/dist/lib/hazo_connect_instance.server.d.ts +17 -0
  264. package/dist/lib/hazo_connect_instance.server.d.ts.map +1 -0
  265. package/dist/lib/hazo_connect_instance.server.js +88 -0
  266. package/dist/lib/hazo_connect_setup.d.ts +2 -0
  267. package/dist/lib/hazo_connect_setup.d.ts.map +1 -0
  268. package/dist/lib/hazo_connect_setup.js +49 -0
  269. package/dist/lib/hazo_connect_setup.server.d.ts +20 -0
  270. package/dist/lib/hazo_connect_setup.server.d.ts.map +1 -0
  271. package/dist/lib/hazo_connect_setup.server.js +138 -0
  272. package/dist/lib/index.d.ts +28 -0
  273. package/dist/lib/index.d.ts.map +1 -0
  274. package/dist/lib/index.js +35 -0
  275. package/dist/lib/login_config.server.d.ts +20 -0
  276. package/dist/lib/login_config.server.d.ts.map +1 -0
  277. package/dist/lib/login_config.server.js +37 -0
  278. package/dist/lib/messages_config.server.d.ts +13 -0
  279. package/dist/lib/messages_config.server.d.ts.map +1 -0
  280. package/dist/lib/messages_config.server.js +18 -0
  281. package/dist/lib/migrations/apply_migration.d.ts +22 -0
  282. package/dist/lib/migrations/apply_migration.d.ts.map +1 -0
  283. package/dist/lib/migrations/apply_migration.js +78 -0
  284. package/dist/lib/my_settings_config.server.d.ts +65 -0
  285. package/dist/lib/my_settings_config.server.d.ts.map +1 -0
  286. package/dist/lib/my_settings_config.server.js +67 -0
  287. package/dist/lib/password_requirements_config.server.d.ts +15 -0
  288. package/dist/lib/password_requirements_config.server.d.ts.map +1 -0
  289. package/dist/lib/password_requirements_config.server.js +26 -0
  290. package/dist/lib/profile_pic_menu_config.server.d.ts +26 -0
  291. package/dist/lib/profile_pic_menu_config.server.d.ts.map +1 -0
  292. package/dist/lib/profile_pic_menu_config.server.js +95 -0
  293. package/dist/lib/profile_picture_config.server.d.ts +16 -0
  294. package/dist/lib/profile_picture_config.server.d.ts.map +1 -0
  295. package/dist/lib/profile_picture_config.server.js +40 -0
  296. package/dist/lib/register_config.server.d.ts +24 -0
  297. package/dist/lib/register_config.server.d.ts.map +1 -0
  298. package/dist/lib/register_config.server.js +39 -0
  299. package/dist/lib/reset_password_config.server.d.ts +25 -0
  300. package/dist/lib/reset_password_config.server.d.ts.map +1 -0
  301. package/dist/lib/reset_password_config.server.js +38 -0
  302. package/dist/lib/services/email_service.d.ts +44 -0
  303. package/dist/lib/services/email_service.d.ts.map +1 -0
  304. package/dist/lib/services/email_service.js +480 -0
  305. package/dist/lib/services/email_verification_service.d.ts +35 -0
  306. package/dist/lib/services/email_verification_service.d.ts.map +1 -0
  307. package/dist/lib/services/email_verification_service.js +208 -0
  308. package/dist/lib/services/index.d.ts +13 -0
  309. package/dist/lib/services/index.d.ts.map +1 -0
  310. package/dist/lib/services/index.js +14 -0
  311. package/dist/lib/services/login_service.d.ts +20 -0
  312. package/dist/lib/services/login_service.d.ts.map +1 -0
  313. package/dist/lib/services/login_service.js +94 -0
  314. package/dist/lib/services/password_change_service.d.ts +19 -0
  315. package/dist/lib/services/password_change_service.d.ts.map +1 -0
  316. package/dist/lib/services/password_change_service.js +118 -0
  317. package/dist/lib/services/password_reset_service.d.ts +52 -0
  318. package/dist/lib/services/password_reset_service.d.ts.map +1 -0
  319. package/dist/lib/services/password_reset_service.js +318 -0
  320. package/dist/lib/services/profile_picture_remove_service.d.ts +15 -0
  321. package/dist/lib/services/profile_picture_remove_service.d.ts.map +1 -0
  322. package/dist/lib/services/profile_picture_remove_service.js +94 -0
  323. package/dist/lib/services/profile_picture_service.d.ts +45 -0
  324. package/dist/lib/services/profile_picture_service.d.ts.map +1 -0
  325. package/dist/lib/services/profile_picture_service.js +183 -0
  326. package/dist/lib/services/profile_picture_source_mapper.d.ts +23 -0
  327. package/dist/lib/services/profile_picture_source_mapper.d.ts.map +1 -0
  328. package/dist/lib/services/profile_picture_source_mapper.js +45 -0
  329. package/dist/lib/services/registration_service.d.ts +20 -0
  330. package/dist/lib/services/registration_service.d.ts.map +1 -0
  331. package/dist/lib/services/registration_service.js +147 -0
  332. package/dist/lib/services/token_service.d.ts +20 -0
  333. package/dist/lib/services/token_service.d.ts.map +1 -0
  334. package/dist/lib/services/token_service.js +201 -0
  335. package/dist/lib/services/user_profiles_service.d.ts +31 -0
  336. package/dist/lib/services/user_profiles_service.d.ts.map +1 -0
  337. package/dist/lib/services/user_profiles_service.js +99 -0
  338. package/dist/lib/services/user_update_service.d.ts +23 -0
  339. package/dist/lib/services/user_update_service.d.ts.map +1 -0
  340. package/dist/lib/services/user_update_service.js +103 -0
  341. package/dist/lib/ui_shell_config.server.d.ts +16 -0
  342. package/dist/lib/ui_shell_config.server.d.ts.map +1 -0
  343. package/dist/lib/ui_shell_config.server.js +28 -0
  344. package/dist/lib/ui_sizes_config.server.d.ts +17 -0
  345. package/dist/lib/ui_sizes_config.server.d.ts.map +1 -0
  346. package/dist/lib/ui_sizes_config.server.js +22 -0
  347. package/dist/lib/user_fields_config.server.d.ts +13 -0
  348. package/dist/lib/user_fields_config.server.d.ts.map +1 -0
  349. package/dist/lib/user_fields_config.server.js +21 -0
  350. package/dist/lib/user_management_config.server.d.ts +10 -0
  351. package/dist/lib/user_management_config.server.d.ts.map +1 -0
  352. package/dist/lib/user_management_config.server.js +26 -0
  353. package/dist/lib/utils/api_route_helpers.d.ts +13 -0
  354. package/dist/lib/utils/api_route_helpers.d.ts.map +1 -0
  355. package/dist/lib/utils/api_route_helpers.js +58 -0
  356. package/dist/lib/utils/error_sanitizer.d.ts +16 -0
  357. package/dist/lib/utils/error_sanitizer.d.ts.map +1 -0
  358. package/dist/lib/utils/error_sanitizer.js +39 -0
  359. package/dist/lib/utils.d.ts +4 -0
  360. package/dist/lib/utils.d.ts.map +1 -0
  361. package/dist/lib/utils.js +9 -0
  362. package/dist/server/config/config_loader.d.ts +26 -0
  363. package/dist/server/config/config_loader.d.ts.map +1 -0
  364. package/dist/server/config/config_loader.js +329 -0
  365. package/dist/server/index.d.ts +2 -0
  366. package/dist/server/index.d.ts.map +1 -0
  367. package/dist/server/index.js +32 -0
  368. package/dist/server/logging/logger_service.d.ts +3 -0
  369. package/dist/server/logging/logger_service.d.ts.map +1 -0
  370. package/dist/server/logging/logger_service.js +37 -0
  371. package/dist/server/routes/root_router.d.ts +3 -0
  372. package/dist/server/routes/root_router.d.ts.map +1 -0
  373. package/dist/server/routes/root_router.js +14 -0
  374. package/dist/server/server.d.ts +3 -0
  375. package/dist/server/server.d.ts.map +1 -0
  376. package/dist/server/server.js +25 -0
  377. package/dist/server/types/app_types.d.ts +53 -0
  378. package/dist/server/types/app_types.d.ts.map +1 -0
  379. package/dist/server/types/app_types.js +1 -0
  380. package/migrations/003_add_url_on_logon_to_hazo_users.sql +8 -0
  381. package/next.config.mjs +12 -0
  382. package/package.json +150 -1
  383. package/src/components/index.ts +7 -0
  384. package/src/components/layouts/email_verification/config/email_verification_field_config.ts +2 -2
  385. package/src/components/layouts/email_verification/hooks/use_email_verification.ts +3 -3
  386. package/src/components/layouts/email_verification/index.tsx +11 -11
  387. package/src/components/layouts/forgot_password/config/forgot_password_field_config.ts +2 -2
  388. package/src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts +3 -3
  389. package/src/components/layouts/forgot_password/index.tsx +10 -10
  390. package/src/components/layouts/index.ts +26 -0
  391. package/src/components/layouts/login/config/login_field_config.ts +2 -2
  392. package/src/components/layouts/login/hooks/use_login_form.ts +5 -5
  393. package/src/components/layouts/login/index.tsx +11 -11
  394. package/src/components/layouts/my_settings/components/editable_field.tsx +3 -3
  395. package/src/components/layouts/my_settings/components/password_change_dialog.tsx +5 -5
  396. package/src/components/layouts/my_settings/components/profile_picture_dialog.tsx +7 -7
  397. package/src/components/layouts/my_settings/components/profile_picture_display.tsx +2 -2
  398. package/src/components/layouts/my_settings/components/profile_picture_gravatar_tab.tsx +3 -3
  399. package/src/components/layouts/my_settings/components/profile_picture_library_tab.tsx +5 -5
  400. package/src/components/layouts/my_settings/components/profile_picture_upload_tab.tsx +4 -4
  401. package/src/components/layouts/my_settings/config/my_settings_field_config.ts +2 -2
  402. package/src/components/layouts/my_settings/hooks/use_my_settings.ts +2 -2
  403. package/src/components/layouts/my_settings/index.tsx +10 -10
  404. package/src/components/layouts/register/config/register_field_config.ts +2 -2
  405. package/src/components/layouts/register/hooks/use_register_form.ts +4 -4
  406. package/src/components/layouts/register/index.tsx +11 -11
  407. package/src/components/layouts/reset_password/config/reset_password_field_config.ts +2 -2
  408. package/src/components/layouts/reset_password/hooks/use_reset_password_form.ts +4 -4
  409. package/src/components/layouts/reset_password/index.tsx +10 -10
  410. package/src/components/layouts/shared/components/already_logged_in_guard.tsx +4 -4
  411. package/src/components/layouts/shared/components/auth_page_shell.tsx +3 -3
  412. package/src/components/layouts/shared/components/form_action_buttons.tsx +2 -2
  413. package/src/components/layouts/shared/components/form_field_wrapper.tsx +2 -2
  414. package/src/components/layouts/shared/components/logout_button.tsx +2 -2
  415. package/src/components/layouts/shared/components/password_field.tsx +3 -3
  416. package/src/components/layouts/shared/components/profile_pic_menu.tsx +5 -5
  417. package/src/components/layouts/shared/components/profile_pic_menu_wrapper.tsx +2 -2
  418. package/src/components/layouts/shared/components/sidebar_layout_wrapper.tsx +3 -3
  419. package/src/components/layouts/shared/components/standalone_layout_wrapper.tsx +1 -1
  420. package/src/components/layouts/shared/components/two_column_auth_layout.tsx +1 -1
  421. package/src/components/layouts/shared/components/unauthorized_guard.tsx +2 -2
  422. package/src/components/layouts/shared/hooks/use_hazo_auth.ts +1 -1
  423. package/src/components/layouts/shared/index.ts +34 -0
  424. package/src/components/layouts/shared/utils/validation.ts +1 -1
  425. package/src/components/layouts/user_management/components/roles_matrix.tsx +7 -7
  426. package/src/components/layouts/user_management/index.tsx +11 -11
  427. package/src/components/ui/alert-dialog.tsx +2 -2
  428. package/src/components/ui/avatar.tsx +1 -1
  429. package/src/components/ui/button.tsx +1 -1
  430. package/src/components/ui/checkbox.tsx +1 -1
  431. package/src/components/ui/dialog.tsx +1 -1
  432. package/src/components/ui/dropdown-menu.tsx +1 -1
  433. package/src/components/ui/hazo_ui_tooltip.tsx +1 -1
  434. package/src/components/ui/index.ts +22 -0
  435. package/src/components/ui/input.tsx +1 -1
  436. package/src/components/ui/label.tsx +1 -1
  437. package/src/components/ui/separator.tsx +1 -1
  438. package/src/components/ui/sheet.tsx +1 -1
  439. package/src/components/ui/sidebar.tsx +8 -8
  440. package/src/components/ui/skeleton.tsx +1 -1
  441. package/src/components/ui/switch.tsx +1 -1
  442. package/src/components/ui/table.tsx +1 -1
  443. package/src/components/ui/tabs.tsx +1 -1
  444. package/src/components/ui/tooltip.tsx +1 -1
  445. package/src/components/ui/vertical-tabs.tsx +1 -1
  446. package/src/index.ts +7 -0
  447. package/src/lib/already_logged_in_config.server.ts +1 -1
  448. package/src/lib/app_logger.ts +1 -1
  449. package/src/lib/auth/auth_cache.ts +1 -1
  450. package/src/lib/auth/auth_utils.server.ts +2 -2
  451. package/src/lib/auth/hazo_get_auth.server.ts +8 -8
  452. package/src/lib/auth/index.ts +23 -0
  453. package/src/lib/auth/server_auth.ts +2 -2
  454. package/src/lib/auth_utility_config.server.ts +1 -1
  455. package/src/lib/config/config_loader.server.ts +1 -1
  456. package/src/lib/email_verification_config.server.ts +1 -1
  457. package/src/lib/file_types_config.server.ts +1 -1
  458. package/src/lib/forgot_password_config.server.ts +1 -1
  459. package/src/lib/hazo_connect_instance.server.ts +2 -2
  460. package/src/lib/hazo_connect_setup.server.ts +2 -2
  461. package/src/lib/index.ts +44 -0
  462. package/src/lib/login_config.server.ts +2 -2
  463. package/src/lib/messages_config.server.ts +1 -1
  464. package/src/lib/my_settings_config.server.ts +7 -7
  465. package/src/lib/password_requirements_config.server.ts +1 -1
  466. package/src/lib/profile_pic_menu_config.server.ts +1 -1
  467. package/src/lib/profile_picture_config.server.ts +2 -2
  468. package/src/lib/register_config.server.ts +4 -4
  469. package/src/lib/reset_password_config.server.ts +3 -3
  470. package/src/lib/services/email_service.ts +2 -2
  471. package/src/lib/services/email_verification_service.ts +3 -3
  472. package/src/lib/services/index.ts +15 -0
  473. package/src/lib/services/login_service.ts +3 -3
  474. package/src/lib/services/password_change_service.ts +3 -3
  475. package/src/lib/services/password_reset_service.ts +3 -3
  476. package/src/lib/services/profile_picture_remove_service.ts +3 -3
  477. package/src/lib/services/profile_picture_service.ts +5 -5
  478. package/src/lib/services/registration_service.ts +8 -8
  479. package/src/lib/services/token_service.ts +2 -2
  480. package/src/lib/services/user_profiles_service.ts +2 -2
  481. package/src/lib/services/user_update_service.ts +4 -4
  482. package/src/lib/ui_shell_config.server.ts +1 -1
  483. package/src/lib/ui_sizes_config.server.ts +1 -1
  484. package/src/lib/user_fields_config.server.ts +1 -1
  485. package/src/lib/user_management_config.server.ts +1 -2
  486. package/src/lib/utils/error_sanitizer.ts +1 -1
  487. package/src/routes/index.ts +34 -0
  488. package/src/server/config/config_loader.ts +2 -2
  489. package/src/server/index.ts +2 -2
  490. package/src/server/logging/logger_service.ts +1 -1
  491. package/src/server/server.ts +2 -2
  492. package/src/server/types/express.d.ts +1 -1
  493. package/tsconfig.build.json +39 -0
  494. package/tsconfig.json +5 -1
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Auth utility configuration options
3
+ */
4
+ export type AuthUtilityConfig = {
5
+ cache_max_users: number;
6
+ cache_ttl_minutes: number;
7
+ cache_max_age_minutes: number;
8
+ rate_limit_per_user: number;
9
+ rate_limit_per_ip: number;
10
+ log_permission_denials: boolean;
11
+ enable_friendly_error_messages: boolean;
12
+ permission_error_messages: Map<string, string>;
13
+ };
14
+ /**
15
+ * Reads auth utility configuration from hazo_auth_config.ini file
16
+ * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
17
+ * @returns Auth utility configuration options
18
+ */
19
+ export declare function get_auth_utility_config(): AuthUtilityConfig;
20
+ //# sourceMappingURL=auth_utility_config.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth_utility_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/auth_utility_config.server.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB,EAAE,OAAO,CAAC;IAChC,8BAA8B,EAAE,OAAO,CAAC;IACxC,yBAAyB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD,CAAC;AA0CF;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,iBAAiB,CAgE3D"}
@@ -0,0 +1,64 @@
1
+ // file_description: server-only helper to read auth utility configuration from hazo_auth_config.ini
2
+ // section: imports
3
+ import { get_config_value, get_config_number, get_config_boolean, } from "hazo_auth/lib/config/config_loader.server";
4
+ // section: helpers
5
+ /**
6
+ * Parses permission error messages from config string
7
+ * Format: "permission1:message1,permission2:message2"
8
+ * @param config_value - Config string value
9
+ * @returns Map of permission to user-friendly message
10
+ */
11
+ function parse_permission_messages(config_value) {
12
+ const messages = new Map();
13
+ if (!config_value || config_value.trim().length === 0) {
14
+ return messages;
15
+ }
16
+ const pairs = config_value.split(",");
17
+ for (const pair of pairs) {
18
+ const trimmed = pair.trim();
19
+ if (trimmed.length === 0) {
20
+ continue;
21
+ }
22
+ const colon_index = trimmed.indexOf(":");
23
+ if (colon_index === -1) {
24
+ continue; // Skip invalid format
25
+ }
26
+ const permission = trimmed.substring(0, colon_index).trim();
27
+ const message = trimmed.substring(colon_index + 1).trim();
28
+ if (permission.length > 0 && message.length > 0) {
29
+ messages.set(permission, message);
30
+ }
31
+ }
32
+ return messages;
33
+ }
34
+ /**
35
+ * Reads auth utility configuration from hazo_auth_config.ini file
36
+ * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
37
+ * @returns Auth utility configuration options
38
+ */
39
+ export function get_auth_utility_config() {
40
+ const section_name = "hazo_auth__auth_utility";
41
+ // Cache settings
42
+ const cache_max_users = get_config_number(section_name, "cache_max_users", 10000);
43
+ const cache_ttl_minutes = get_config_number(section_name, "cache_ttl_minutes", 15);
44
+ const cache_max_age_minutes = get_config_number(section_name, "cache_max_age_minutes", 30);
45
+ // Rate limiting
46
+ const rate_limit_per_user = get_config_number(section_name, "rate_limit_per_user", 100);
47
+ const rate_limit_per_ip = get_config_number(section_name, "rate_limit_per_ip", 200);
48
+ // Permission check behavior
49
+ const log_permission_denials = get_config_boolean(section_name, "log_permission_denials", true);
50
+ const enable_friendly_error_messages = get_config_boolean(section_name, "enable_friendly_error_messages", true);
51
+ // Permission message mappings
52
+ const permission_messages_str = get_config_value(section_name, "permission_error_messages", "");
53
+ const permission_error_messages = parse_permission_messages(permission_messages_str);
54
+ return {
55
+ cache_max_users,
56
+ cache_ttl_minutes,
57
+ cache_max_age_minutes,
58
+ rate_limit_per_user,
59
+ rate_limit_per_ip,
60
+ log_permission_denials,
61
+ enable_friendly_error_messages,
62
+ permission_error_messages,
63
+ };
64
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Reads a section from the config file
3
+ * @param section_name - Name of the section to read (e.g., "hazo_auth__register_layout")
4
+ * @param file_path - Optional custom config file path (defaults to hazo_auth_config.ini)
5
+ * @returns Section data as Record<string, string> or undefined if not found
6
+ */
7
+ export declare function read_config_section(section_name: string, file_path?: string): Record<string, string> | undefined;
8
+ /**
9
+ * Gets a single config value from a section
10
+ * @param section_name - Name of the section
11
+ * @param key - Key name within the section
12
+ * @param default_value - Default value if key is not found
13
+ * @param file_path - Optional custom config file path
14
+ * @returns Config value as string or default value
15
+ */
16
+ export declare function get_config_value(section_name: string, key: string, default_value: string, file_path?: string): string;
17
+ /**
18
+ * Gets a boolean config value from a section
19
+ * @param section_name - Name of the section
20
+ * @param key - Key name within the section
21
+ * @param default_value - Default boolean value if key is not found
22
+ * @param file_path - Optional custom config file path
23
+ * @returns Config value as boolean
24
+ */
25
+ export declare function get_config_boolean(section_name: string, key: string, default_value: boolean, file_path?: string): boolean;
26
+ /**
27
+ * Gets a number config value from a section
28
+ * @param section_name - Name of the section
29
+ * @param key - Key name within the section
30
+ * @param default_value - Default number value if key is not found or invalid
31
+ * @param file_path - Optional custom config file path
32
+ * @returns Config value as number
33
+ */
34
+ export declare function get_config_number(section_name: string, key: string, default_value: number, file_path?: string): number;
35
+ /**
36
+ * Gets a comma-separated list config value from a section
37
+ * @param section_name - Name of the section
38
+ * @param key - Key name within the section
39
+ * @param default_value - Default array value if key is not found
40
+ * @param file_path - Optional custom config file path
41
+ * @returns Config value as array of strings
42
+ */
43
+ export declare function get_config_array(section_name: string, key: string, default_value: string[], file_path?: string): string[];
44
+ //# sourceMappingURL=config_loader.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config_loader.server.d.ts","sourceRoot":"","sources":["../../../src/lib/config/config_loader.server.ts"],"names":[],"mappings":"AAuBA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAwBpC;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAQR;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,OAAO,EACtB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAST;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAeR;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EAAE,EACvB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,EAAE,CAcV"}
@@ -0,0 +1,122 @@
1
+ // file_description: shared utility for reading configuration from hazo_auth_config.ini using hazo_config
2
+ // section: imports
3
+ import { HazoConfig } from "hazo_config/dist/lib";
4
+ import path from "path";
5
+ import fs from "fs";
6
+ import { create_app_logger } from "hazo_auth/lib/app_logger";
7
+ // section: constants
8
+ const DEFAULT_CONFIG_FILE = "hazo_auth_config.ini";
9
+ // section: helpers
10
+ /**
11
+ * Gets the default config file path
12
+ * @param custom_path - Optional custom config file path
13
+ * @returns Resolved config file path
14
+ */
15
+ function get_config_file_path(custom_path) {
16
+ if (custom_path) {
17
+ return path.isAbsolute(custom_path) ? custom_path : path.resolve(process.cwd(), custom_path);
18
+ }
19
+ return path.resolve(process.cwd(), DEFAULT_CONFIG_FILE);
20
+ }
21
+ /**
22
+ * Reads a section from the config file
23
+ * @param section_name - Name of the section to read (e.g., "hazo_auth__register_layout")
24
+ * @param file_path - Optional custom config file path (defaults to hazo_auth_config.ini)
25
+ * @returns Section data as Record<string, string> or undefined if not found
26
+ */
27
+ export function read_config_section(section_name, file_path) {
28
+ const config_path = get_config_file_path(file_path);
29
+ const logger = create_app_logger();
30
+ if (!fs.existsSync(config_path)) {
31
+ return undefined;
32
+ }
33
+ try {
34
+ const hazo_config = new HazoConfig({
35
+ filePath: config_path,
36
+ });
37
+ return hazo_config.getSection(section_name);
38
+ }
39
+ catch (error) {
40
+ const error_message = error instanceof Error ? error.message : "Unknown error";
41
+ logger.warn("config_loader_read_section_failed", {
42
+ filename: "config_loader.server.ts",
43
+ line_number: 0,
44
+ section_name,
45
+ config_path,
46
+ error: error_message,
47
+ });
48
+ return undefined;
49
+ }
50
+ }
51
+ /**
52
+ * Gets a single config value from a section
53
+ * @param section_name - Name of the section
54
+ * @param key - Key name within the section
55
+ * @param default_value - Default value if key is not found
56
+ * @param file_path - Optional custom config file path
57
+ * @returns Config value as string or default value
58
+ */
59
+ export function get_config_value(section_name, key, default_value, file_path) {
60
+ const section = read_config_section(section_name, file_path);
61
+ // Optional chaining on section and section[key]
62
+ // If section is undefined, or key is undefined, fall back to default
63
+ if (!section || section[key] === undefined) {
64
+ return default_value;
65
+ }
66
+ return section[key].trim() || default_value;
67
+ }
68
+ /**
69
+ * Gets a boolean config value from a section
70
+ * @param section_name - Name of the section
71
+ * @param key - Key name within the section
72
+ * @param default_value - Default boolean value if key is not found
73
+ * @param file_path - Optional custom config file path
74
+ * @returns Config value as boolean
75
+ */
76
+ export function get_config_boolean(section_name, key, default_value, file_path) {
77
+ const section = read_config_section(section_name, file_path);
78
+ if (!section || section[key] === undefined) {
79
+ return default_value;
80
+ }
81
+ const value = section[key].trim().toLowerCase();
82
+ return value !== "false" && value !== "0" && value !== "";
83
+ }
84
+ /**
85
+ * Gets a number config value from a section
86
+ * @param section_name - Name of the section
87
+ * @param key - Key name within the section
88
+ * @param default_value - Default number value if key is not found or invalid
89
+ * @param file_path - Optional custom config file path
90
+ * @returns Config value as number
91
+ */
92
+ export function get_config_number(section_name, key, default_value, file_path) {
93
+ const section = read_config_section(section_name, file_path);
94
+ if (!section || section[key] === undefined) {
95
+ return default_value;
96
+ }
97
+ const value = section[key].trim();
98
+ if (!value) {
99
+ return default_value;
100
+ }
101
+ const parsed = parseFloat(value);
102
+ return isNaN(parsed) ? default_value : parsed;
103
+ }
104
+ /**
105
+ * Gets a comma-separated list config value from a section
106
+ * @param section_name - Name of the section
107
+ * @param key - Key name within the section
108
+ * @param default_value - Default array value if key is not found
109
+ * @param file_path - Optional custom config file path
110
+ * @returns Config value as array of strings
111
+ */
112
+ export function get_config_array(section_name, key, default_value, file_path) {
113
+ const section = read_config_section(section_name, file_path);
114
+ if (!section || section[key] === undefined) {
115
+ return default_value;
116
+ }
117
+ const value = section[key].trim();
118
+ if (!value) {
119
+ return default_value;
120
+ }
121
+ return value.split(",").map((item) => item.trim()).filter((item) => item.length > 0);
122
+ }
@@ -0,0 +1,14 @@
1
+ export type EmailVerificationConfig = {
2
+ alreadyLoggedInMessage: string;
3
+ showLogoutButton: boolean;
4
+ showReturnHomeButton: boolean;
5
+ returnHomeButtonLabel: string;
6
+ returnHomePath: string;
7
+ };
8
+ /**
9
+ * Reads email verification layout configuration from hazo_auth_config.ini file
10
+ * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
11
+ * @returns Email verification configuration options
12
+ */
13
+ export declare function get_email_verification_config(): EmailVerificationConfig;
14
+ //# sourceMappingURL=email_verification_config.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email_verification_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/email_verification_config.server.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,uBAAuB,GAAG;IACpC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,6BAA6B,IAAI,uBAAuB,CAWvE"}
@@ -0,0 +1,20 @@
1
+ // file_description: server-only helper to read email verification layout configuration from hazo_auth_config.ini
2
+ // section: imports
3
+ import { get_already_logged_in_config } from "hazo_auth/lib/already_logged_in_config.server";
4
+ // section: helpers
5
+ /**
6
+ * Reads email verification layout configuration from hazo_auth_config.ini file
7
+ * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
8
+ * @returns Email verification configuration options
9
+ */
10
+ export function get_email_verification_config() {
11
+ // Get shared already logged in config
12
+ const alreadyLoggedInConfig = get_already_logged_in_config();
13
+ return {
14
+ alreadyLoggedInMessage: alreadyLoggedInConfig.message,
15
+ showLogoutButton: alreadyLoggedInConfig.showLogoutButton,
16
+ showReturnHomeButton: alreadyLoggedInConfig.showReturnHomeButton,
17
+ returnHomeButtonLabel: alreadyLoggedInConfig.returnHomeButtonLabel,
18
+ returnHomePath: alreadyLoggedInConfig.returnHomePath,
19
+ };
20
+ }
@@ -0,0 +1,11 @@
1
+ export type FileTypesConfig = {
2
+ allowed_image_extensions: string[];
3
+ allowed_image_mime_types: string[];
4
+ };
5
+ /**
6
+ * Reads file type configuration from hazo_auth_config.ini file
7
+ * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
8
+ * @returns File types configuration options
9
+ */
10
+ export declare function get_file_types_config(): FileTypesConfig;
11
+ //# sourceMappingURL=file_types_config.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_types_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/file_types_config.server.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC5B,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,wBAAwB,EAAE,MAAM,EAAE,CAAC;CACpC,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,eAAe,CAOvD"}
@@ -0,0 +1,16 @@
1
+ // file_description: server-only helper to read file type configuration from hazo_auth_config.ini
2
+ // section: imports
3
+ import { get_config_array } from "hazo_auth/lib/config/config_loader.server";
4
+ // section: helpers
5
+ /**
6
+ * Reads file type configuration from hazo_auth_config.ini file
7
+ * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
8
+ * @returns File types configuration options
9
+ */
10
+ export function get_file_types_config() {
11
+ const section = "hazo_auth__file_types";
12
+ return {
13
+ allowed_image_extensions: get_config_array(section, "allowed_image_extensions", ["jpg", "jpeg", "png"]),
14
+ allowed_image_mime_types: get_config_array(section, "allowed_image_mime_types", ["image/jpeg", "image/jpg", "image/png"]),
15
+ };
16
+ }
@@ -0,0 +1,14 @@
1
+ export type ForgotPasswordConfig = {
2
+ alreadyLoggedInMessage: string;
3
+ showLogoutButton: boolean;
4
+ showReturnHomeButton: boolean;
5
+ returnHomeButtonLabel: string;
6
+ returnHomePath: string;
7
+ };
8
+ /**
9
+ * Reads forgot password layout configuration from hazo_auth_config.ini file
10
+ * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
11
+ * @returns Forgot password configuration options
12
+ */
13
+ export declare function get_forgot_password_config(): ForgotPasswordConfig;
14
+ //# sourceMappingURL=forgot_password_config.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgot_password_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/forgot_password_config.server.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,oBAAoB,GAAG;IACjC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,oBAAoB,CAWjE"}
@@ -0,0 +1,20 @@
1
+ // file_description: server-only helper to read forgot password layout configuration from hazo_auth_config.ini
2
+ // section: imports
3
+ import { get_already_logged_in_config } from "hazo_auth/lib/already_logged_in_config.server";
4
+ // section: helpers
5
+ /**
6
+ * Reads forgot password layout configuration from hazo_auth_config.ini file
7
+ * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
8
+ * @returns Forgot password configuration options
9
+ */
10
+ export function get_forgot_password_config() {
11
+ // Get shared already logged in config
12
+ const alreadyLoggedInConfig = get_already_logged_in_config();
13
+ return {
14
+ alreadyLoggedInMessage: alreadyLoggedInConfig.message,
15
+ showLogoutButton: alreadyLoggedInConfig.showLogoutButton,
16
+ showReturnHomeButton: alreadyLoggedInConfig.showReturnHomeButton,
17
+ returnHomeButtonLabel: alreadyLoggedInConfig.returnHomeButtonLabel,
18
+ returnHomePath: alreadyLoggedInConfig.returnHomePath,
19
+ };
20
+ }
@@ -0,0 +1,17 @@
1
+ import type { HazoConnectAdapter } from "hazo_connect";
2
+ /**
3
+ * Gets or creates the singleton hazo_connect adapter instance
4
+ * This ensures all routes/components use the same database connection
5
+ *
6
+ * Uses the new hazo_connect singleton API which:
7
+ * - Automatically reuses the adapter instance
8
+ * - Automatically registers SQLite adapters with the admin service
9
+ * - Is thread-safe for Next.js serverless environments
10
+ * - Reads configuration from hazo_auth_config.ini using hazo_config (falls back to environment variables)
11
+ *
12
+ * Falls back to manual singleton if the new API is not available
13
+ *
14
+ * @returns The singleton HazoConnectAdapter instance
15
+ */
16
+ export declare function get_hazo_connect_instance(): HazoConnectAdapter;
17
+ //# sourceMappingURL=hazo_connect_instance.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hazo_connect_instance.server.d.ts","sourceRoot":"","sources":["../../src/lib/hazo_connect_instance.server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAWvD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,IAAI,kBAAkB,CAqE9D"}
@@ -0,0 +1,88 @@
1
+ import { getHazoConnectSingleton } from "hazo_connect/nextjs/setup";
2
+ import { create_sqlite_hazo_connect_server, get_hazo_connect_config_options } from "hazo_auth/lib/hazo_connect_setup.server";
3
+ import { initializeAdminService, getSqliteAdminService } from "hazo_connect/server";
4
+ import { create_app_logger } from "hazo_auth/lib/app_logger";
5
+ // section: singleton_state
6
+ let hazoConnectInstance = null;
7
+ let isInitialized = false;
8
+ // section: helpers
9
+ /**
10
+ * Gets or creates the singleton hazo_connect adapter instance
11
+ * This ensures all routes/components use the same database connection
12
+ *
13
+ * Uses the new hazo_connect singleton API which:
14
+ * - Automatically reuses the adapter instance
15
+ * - Automatically registers SQLite adapters with the admin service
16
+ * - Is thread-safe for Next.js serverless environments
17
+ * - Reads configuration from hazo_auth_config.ini using hazo_config (falls back to environment variables)
18
+ *
19
+ * Falls back to manual singleton if the new API is not available
20
+ *
21
+ * @returns The singleton HazoConnectAdapter instance
22
+ */
23
+ export function get_hazo_connect_instance() {
24
+ // Use the new singleton API from hazo_connect
25
+ // This automatically handles:
26
+ // - Instance reuse
27
+ // - Admin service registration (via registerSqliteAdapter)
28
+ // - Thread-safety for Next.js serverless
29
+ // - Configuration from hazo_auth_config.ini (via hazo_config) or environment variables
30
+ try {
31
+ // Get configuration from hazo_auth_config.ini (falls back to environment variables)
32
+ const config_options = get_hazo_connect_config_options();
33
+ const logger = create_app_logger();
34
+ logger.debug("hazo_connect_singleton_attempt", {
35
+ filename: "hazo_connect_instance.server.ts",
36
+ line_number: 38,
37
+ config_options,
38
+ note: "Attempting to get singleton with these options",
39
+ });
40
+ return getHazoConnectSingleton(config_options);
41
+ }
42
+ catch (error) {
43
+ const logger = create_app_logger();
44
+ const error_message = error instanceof Error ? error.message : "Unknown error";
45
+ logger.error("hazo_connect_singleton_failed", {
46
+ filename: "hazo_connect_instance.server.ts",
47
+ line_number: 45,
48
+ error: error_message,
49
+ error_stack: error instanceof Error ? error.stack : undefined,
50
+ note: "Falling back to manual singleton implementation",
51
+ });
52
+ // Fallback: Manual singleton implementation if new API fails
53
+ // This should not happen with the updated package, but kept for safety
54
+ if (!hazoConnectInstance) {
55
+ // Get config options to determine database type
56
+ const config_options = get_hazo_connect_config_options();
57
+ const db_type = config_options.type;
58
+ // Only initialize SQLite admin service for SQLite databases
59
+ if (db_type === "sqlite" && !isInitialized) {
60
+ initializeAdminService({ enable_admin_ui: true });
61
+ isInitialized = true;
62
+ }
63
+ // Create the adapter instance (reads from hazo_auth_config.ini)
64
+ // Note: Despite the name, this function supports both SQLite and PostgREST
65
+ hazoConnectInstance = create_sqlite_hazo_connect_server();
66
+ // Note: Database migrations should be applied manually via SQLite Admin UI
67
+ // or through a separate migration script. The token_service has fallback
68
+ // logic to work without the token_type column if migration hasn't been applied.
69
+ // Finalize initialization by getting the admin service (only for SQLite)
70
+ if (db_type === "sqlite") {
71
+ try {
72
+ getSqliteAdminService();
73
+ }
74
+ catch (adminError) {
75
+ const logger = create_app_logger();
76
+ const error_message = adminError instanceof Error ? adminError.message : "Unknown error";
77
+ logger.warn("hazo_connect_instance_admin_service_init_failed", {
78
+ filename: "hazo_connect_instance.server.ts",
79
+ line_number: 0,
80
+ error: error_message,
81
+ note: "Could not get SqliteAdminService during initialization, continuing...",
82
+ });
83
+ }
84
+ }
85
+ }
86
+ return hazoConnectInstance;
87
+ }
88
+ }
@@ -0,0 +1,2 @@
1
+ export declare function create_sqlite_hazo_connect(): any;
2
+ //# sourceMappingURL=hazo_connect_setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hazo_connect_setup.d.ts","sourceRoot":"","sources":["../../src/lib/hazo_connect_setup.ts"],"names":[],"mappings":"AA4BA,wBAAgB,0BAA0B,QAWzC"}
@@ -0,0 +1,49 @@
1
+ // file_description: helper function to create hazo_connect instance with configuration from environment variables
2
+ // This file provides a client-safe wrapper that returns a mock on client-side
3
+ // section: imports
4
+ // Note: We don't import server-side code here to avoid client-side bundling issues
5
+ // section: helpers
6
+ /**
7
+ * Creates a hazo_connect instance configured from environment variables
8
+ *
9
+ * Environment variables:
10
+ * - HAZO_CONNECT_TYPE: Database type ("sqlite" | "postgrest") - defaults to "sqlite"
11
+ * - HAZO_CONNECT_SQLITE_PATH: Path to SQLite database file (relative to process.cwd() or absolute)
12
+ * - HAZO_CONNECT_POSTGREST_URL: PostgREST API URL (for postgrest type)
13
+ * - HAZO_CONNECT_POSTGREST_API_KEY: PostgREST API key (for postgrest type)
14
+ *
15
+ * Falls back to test fixture database if HAZO_CONNECT_SQLITE_PATH is not set
16
+ *
17
+ * Note: For client-side usage (Next.js pages), this returns a mock adapter
18
+ * since SQLite cannot run in browser environments. Use PostgREST for client-side database access.
19
+ */
20
+ // Lazy loader for server module - prevents webpack from statically analyzing the require
21
+ function loadServerModule() {
22
+ // Use Function constructor to create a dynamic require that webpack can't analyze
23
+ // eslint-disable-next-line no-new-func
24
+ const requireFunc = new Function('modulePath', 'return require(modulePath)');
25
+ return requireFunc('./hazo_connect_setup.server');
26
+ }
27
+ export function create_sqlite_hazo_connect() {
28
+ // Check if we're in a browser/client environment
29
+ if (typeof window !== "undefined") {
30
+ // Return a mock adapter for client-side usage
31
+ return create_client_mock_hazo_connect();
32
+ }
33
+ // Server-side: dynamically load server module
34
+ // Using Function constructor prevents webpack from statically analyzing the require
35
+ const serverModule = loadServerModule();
36
+ return serverModule.create_sqlite_hazo_connect_server();
37
+ }
38
+ /**
39
+ * Creates a mock hazo_connect adapter for client-side usage
40
+ * This satisfies the LayoutDataClient interface without requiring SQLite
41
+ */
42
+ function create_client_mock_hazo_connect() {
43
+ return {
44
+ healthCheck: async () => {
45
+ // Mock health check for client-side - no-op
46
+ return Promise.resolve();
47
+ },
48
+ };
49
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Server-only function to create hazo_connect adapter
3
+ * Reads configuration from hazo_auth_config.ini using hazo_config, falls back to environment variables
4
+ * This should only be called from server-side code (API routes, server components)
5
+ */
6
+ export declare function create_sqlite_hazo_connect_server(): import("hazo_connect").HazoConnectAdapter;
7
+ /**
8
+ * Gets hazo_connect configuration options for use with singleton API
9
+ * Reads from hazo_auth_config.ini using hazo_config, falls back to environment variables
10
+ * @returns Configuration options compatible with getHazoConnectSingleton
11
+ */
12
+ export declare function get_hazo_connect_config_options(): {
13
+ type?: "sqlite" | "postgrest";
14
+ sqlitePath?: string;
15
+ enableAdminUi?: boolean;
16
+ readOnly?: boolean;
17
+ baseUrl?: string;
18
+ apiKey?: string;
19
+ };
20
+ //# sourceMappingURL=hazo_connect_setup.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hazo_connect_setup.server.d.ts","sourceRoot":"","sources":["../../src/lib/hazo_connect_setup.server.ts"],"names":[],"mappings":"AAgIA;;;;GAIG;AACH,wBAAgB,iCAAiC,8CAuBhD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,IAAI;IACjD,IAAI,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAsBA"}