@tulip-systems/core 0.5.14 → 0.5.16

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 (355) hide show
  1. package/dist/auth/client.d.mts +5 -4
  2. package/dist/auth/client.mjs +6 -5
  3. package/dist/auth.mjs +2 -2
  4. package/dist/components/client.d.mts +1 -3
  5. package/dist/components/client.mjs +3 -5
  6. package/dist/components/common/icons.d.mts +52 -52
  7. package/dist/components/common/icons.d.mts.map +1 -1
  8. package/dist/components/common/status.d.mts +3 -3
  9. package/dist/components/editor/components/content.client.d.mts +2 -2
  10. package/dist/components/editor/components/content.client.d.mts.map +1 -1
  11. package/dist/components/editor/components/editor.client.d.mts +6 -6
  12. package/dist/components/editor/components/editor.client.d.mts.map +1 -1
  13. package/dist/components/editor/components/menu.client.d.mts +3 -3
  14. package/dist/components/editor/components/menu.client.d.mts.map +1 -1
  15. package/dist/components/editor/lib/constants.d.mts +27 -27
  16. package/dist/components/header/back-button.client.d.mts +2 -2
  17. package/dist/components/header/back-button.client.d.mts.map +1 -1
  18. package/dist/components/header/bottom-bar.client.d.mts +3 -3
  19. package/dist/components/header/bottom-bar.client.d.mts.map +1 -1
  20. package/dist/components/header/breadcrumbs.client.d.mts +7 -7
  21. package/dist/components/header/breadcrumbs.client.d.mts.map +1 -1
  22. package/dist/components/header/header.client.d.mts +2 -2
  23. package/dist/components/header/header.client.d.mts.map +1 -1
  24. package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
  25. package/dist/components/header/mobile-nav-switcher.client.d.mts.map +1 -1
  26. package/dist/components/header/top-bar.client.d.mts +4 -4
  27. package/dist/components/header/top-bar.client.d.mts.map +1 -1
  28. package/dist/components/layouts/admin-content.client.d.mts +2 -2
  29. package/dist/components/layouts/admin-content.client.d.mts.map +1 -1
  30. package/dist/components/layouts/admin-error-pages.d.mts +4 -4
  31. package/dist/components/layouts/admin-layout.d.mts +2 -2
  32. package/dist/components/layouts/admin-layout.d.mts.map +1 -1
  33. package/dist/components/layouts/admin-layout.mjs +1 -1
  34. package/dist/components/layouts/admin-layout.mjs.map +1 -1
  35. package/dist/components/layouts/admin-loading.d.mts +2 -2
  36. package/dist/components/layouts/empty-page.d.mts +4 -4
  37. package/dist/components/layouts/error-page.d.mts +9 -9
  38. package/dist/components/layouts/error-page.d.mts.map +1 -1
  39. package/dist/components/layouts/error-sections.d.mts +5 -5
  40. package/dist/components/layouts/list-layout.d.mts +2 -2
  41. package/dist/components/layouts/providers.client.d.mts +2 -2
  42. package/dist/components/layouts/providers.client.d.mts.map +1 -1
  43. package/dist/components/layouts/root-error-pages.d.mts +2 -2
  44. package/dist/components/layouts/root-layout.server.d.mts +4 -4
  45. package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
  46. package/dist/components/layouts/root-loading.d.mts +2 -2
  47. package/dist/components/layouts/tab-layout.d.mts +2 -2
  48. package/dist/components/lists/data-list.d.mts +5 -5
  49. package/dist/components/lists/data-stack.d.mts +8 -8
  50. package/dist/components/navigation/admin-sidebar-header.client.mjs +3 -2
  51. package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
  52. package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
  53. package/dist/components/navigation/admin-sidebar-paths.client.d.mts.map +1 -1
  54. package/dist/components/ui/accordion.d.mts +5 -5
  55. package/dist/components/ui/alert-dialog.d.mts +12 -12
  56. package/dist/components/ui/alert.d.mts +6 -6
  57. package/dist/components/ui/aspect-ratio.d.mts +2 -2
  58. package/dist/components/ui/avatar.client.d.mts +4 -4
  59. package/dist/components/ui/avatar.client.d.mts.map +1 -1
  60. package/dist/components/ui/badge.d.mts +5 -5
  61. package/dist/components/ui/breadcrumb.d.mts +8 -8
  62. package/dist/components/ui/button.d.mts +5 -5
  63. package/dist/components/ui/calendar.d.mts +3 -3
  64. package/dist/components/ui/card.d.mts +7 -7
  65. package/dist/components/ui/carousel.d.mts +6 -6
  66. package/dist/components/ui/chart.client.d.mts +5 -5
  67. package/dist/components/ui/chart.client.d.mts.map +1 -1
  68. package/dist/components/ui/checkbox.d.mts +2 -2
  69. package/dist/components/ui/collapsible.client.d.mts +4 -4
  70. package/dist/components/ui/collapsible.client.d.mts.map +1 -1
  71. package/dist/components/ui/color-picker.client.d.mts +2 -2
  72. package/dist/components/ui/color-picker.client.d.mts.map +1 -1
  73. package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
  74. package/dist/components/ui/combobox-dropdown.client.d.mts.map +1 -1
  75. package/dist/components/ui/combobox.client.d.mts +2 -2
  76. package/dist/components/ui/combobox.client.d.mts.map +1 -1
  77. package/dist/components/ui/command.d.mts +10 -10
  78. package/dist/components/ui/context-menu.d.mts +16 -16
  79. package/dist/components/ui/date-picker.client.d.mts +2 -2
  80. package/dist/components/ui/date-picker.client.d.mts.map +1 -1
  81. package/dist/components/ui/dialog.client.d.mts +11 -11
  82. package/dist/components/ui/dialog.client.d.mts.map +1 -1
  83. package/dist/components/ui/drawer.client.d.mts +11 -11
  84. package/dist/components/ui/drawer.client.d.mts.map +1 -1
  85. package/dist/components/ui/dropdown-menu.d.mts +16 -16
  86. package/dist/components/ui/form.client.d.mts +7 -7
  87. package/dist/components/ui/form.client.d.mts.map +1 -1
  88. package/dist/components/ui/hover-card.client.d.mts +4 -4
  89. package/dist/components/ui/hover-card.client.d.mts.map +1 -1
  90. package/dist/components/ui/input-date-time.d.mts +23 -0
  91. package/dist/components/ui/input-date-time.d.mts.map +1 -0
  92. package/dist/components/ui/input-date-time.mjs +34 -0
  93. package/dist/components/ui/input-date-time.mjs.map +1 -0
  94. package/dist/components/ui/input-date.d.mts +14 -0
  95. package/dist/components/ui/input-date.d.mts.map +1 -0
  96. package/dist/components/ui/input-date.mjs +16 -0
  97. package/dist/components/ui/input-date.mjs.map +1 -0
  98. package/dist/components/ui/input-recipient.d.mts +2 -2
  99. package/dist/components/ui/input-time.d.mts +14 -0
  100. package/dist/components/ui/input-time.d.mts.map +1 -0
  101. package/dist/components/ui/input-time.mjs +16 -0
  102. package/dist/components/ui/input-time.mjs.map +1 -0
  103. package/dist/components/ui/input.d.mts +2 -2
  104. package/dist/components/ui/label.d.mts +2 -2
  105. package/dist/components/ui/navigation-menu.d.mts +11 -11
  106. package/dist/components/ui/pagination.d.mts +8 -8
  107. package/dist/components/ui/popover.d.mts +5 -5
  108. package/dist/components/ui/progress.client.d.mts +2 -2
  109. package/dist/components/ui/progress.client.d.mts.map +1 -1
  110. package/dist/components/ui/radio-group.d.mts +3 -3
  111. package/dist/components/ui/resizable.client.d.mts +4 -4
  112. package/dist/components/ui/resizable.client.d.mts.map +1 -1
  113. package/dist/components/ui/scroll-area.d.mts +3 -3
  114. package/dist/components/ui/select.client.d.mts +11 -11
  115. package/dist/components/ui/select.client.d.mts.map +1 -1
  116. package/dist/components/ui/separator.d.mts +2 -2
  117. package/dist/components/ui/sheet.client.d.mts +9 -9
  118. package/dist/components/ui/sheet.client.d.mts.map +1 -1
  119. package/dist/components/ui/sidebar.client.d.mts +26 -26
  120. package/dist/components/ui/sidebar.client.d.mts.map +1 -1
  121. package/dist/components/ui/skeleton.d.mts +2 -2
  122. package/dist/components/ui/slider.d.mts +2 -2
  123. package/dist/components/ui/sonner.client.d.mts +2 -2
  124. package/dist/components/ui/sonner.client.mjs +1 -1
  125. package/dist/components/ui/switch.d.mts +2 -2
  126. package/dist/components/ui/tabs.d.mts +5 -5
  127. package/dist/components/ui/textarea.d.mts +2 -2
  128. package/dist/components/ui/toggle-group.client.d.mts +3 -3
  129. package/dist/components/ui/toggle.d.mts +4 -4
  130. package/dist/components/ui/tooltip.client.d.mts +5 -5
  131. package/dist/components.d.mts +4 -1
  132. package/dist/components.mjs +6 -3
  133. package/dist/inline-edit/client.d.mts +3 -1
  134. package/dist/inline-edit/client.mjs +3 -1
  135. package/dist/lib/client.mjs +1 -1
  136. package/dist/lib/hooks/use-indicator.d.mts +2 -2
  137. package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
  138. package/dist/modules/auth/components/allowed.client.d.mts +2 -2
  139. package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
  140. package/dist/modules/auth/components/allowed.client.mjs +2 -3
  141. package/dist/modules/auth/components/allowed.client.mjs.map +1 -1
  142. package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
  143. package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
  144. package/dist/modules/auth/components/auth-loading.d.mts +2 -2
  145. package/dist/modules/auth/components/auth-loading.d.mts.map +1 -1
  146. package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
  147. package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
  148. package/dist/modules/auth/components/create-first-user-page.client.mjs +4 -3
  149. package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
  150. package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
  151. package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
  152. package/dist/modules/auth/components/forget-password-page.client.mjs +4 -3
  153. package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
  154. package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
  155. package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
  156. package/dist/modules/auth/components/guard.server.d.mts +3 -2
  157. package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
  158. package/dist/modules/auth/components/guard.server.mjs +1 -0
  159. package/dist/modules/auth/components/guard.server.mjs.map +1 -1
  160. package/dist/modules/auth/components/login-page.client.d.mts +2 -2
  161. package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
  162. package/dist/modules/auth/components/login-page.client.mjs +4 -3
  163. package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
  164. package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
  165. package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
  166. package/dist/modules/auth/components/reset-password-page.client.mjs +4 -3
  167. package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
  168. package/dist/modules/auth/components/update-password-command.d.mts +2 -2
  169. package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
  170. package/dist/modules/auth/components/update-password-command.mjs +1 -1
  171. package/dist/modules/auth/db/schema.d.mts +73 -73
  172. package/dist/modules/auth/db/schema.d.mts.map +1 -1
  173. package/dist/modules/auth/handler/{client.client.d.mts → create-client.client.d.mts} +328 -188
  174. package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -0
  175. package/dist/modules/auth/handler/create-client.client.mjs +26 -0
  176. package/dist/modules/auth/handler/create-client.client.mjs.map +1 -0
  177. package/dist/modules/auth/handler/init.d.mts +116 -130
  178. package/dist/modules/auth/handler/init.d.mts.map +1 -1
  179. package/dist/modules/auth/hooks/use-auth-client.d.mts +24 -0
  180. package/dist/modules/auth/hooks/use-auth-client.d.mts.map +1 -0
  181. package/dist/modules/auth/hooks/use-auth-client.mjs +31 -0
  182. package/dist/modules/auth/hooks/use-auth-client.mjs.map +1 -0
  183. package/dist/modules/auth/hooks/use-permission.d.mts +8 -35
  184. package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
  185. package/dist/modules/auth/hooks/use-permission.mjs +47 -93
  186. package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
  187. package/dist/modules/auth/hooks/use-session.d.mts +5 -119
  188. package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
  189. package/dist/modules/auth/hooks/use-session.mjs +15 -17
  190. package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
  191. package/dist/modules/auth/lib/helpers.server.d.mts +2 -2
  192. package/dist/modules/auth/lib/helpers.server.d.mts.map +1 -1
  193. package/dist/modules/auth/lib/helpers.server.mjs +1 -1
  194. package/dist/modules/auth/lib/validators.d.mts +2 -2
  195. package/dist/modules/auth/lib/validators.d.mts.map +1 -1
  196. package/dist/modules/commands/components/alert-dialog-command.client.d.mts +11 -11
  197. package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
  198. package/dist/modules/commands/components/click-command.client.d.mts +2 -2
  199. package/dist/modules/commands/components/click-command.client.d.mts.map +1 -1
  200. package/dist/modules/commands/components/command-trigger.client.d.mts +6 -6
  201. package/dist/modules/commands/components/command-trigger.client.d.mts.map +1 -1
  202. package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
  203. package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
  204. package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
  205. package/dist/modules/commands/components/dropdown-command.client.d.mts.map +1 -1
  206. package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
  207. package/dist/modules/commands/components/empty-command.client.d.mts.map +1 -1
  208. package/dist/modules/commands/components/form-dialog-command.client.d.mts +12 -12
  209. package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
  210. package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
  211. package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
  212. package/dist/modules/commands/hooks/use-command-mutation.client.mjs +1 -1
  213. package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
  214. package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
  215. package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
  216. package/dist/modules/commands/menus/dropdown-menu.client.d.mts.map +1 -1
  217. package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
  218. package/dist/modules/commands/menus/inline-menu.client.d.mts.map +1 -1
  219. package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
  220. package/dist/modules/commands/menus/responsive-menu.client.d.mts.map +1 -1
  221. package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
  222. package/dist/modules/commands/utils/archive-command.client.d.mts.map +1 -1
  223. package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
  224. package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
  225. package/dist/modules/config/db/helpers.d.mts +5 -5
  226. package/dist/modules/config/db/helpers.d.mts.map +1 -1
  227. package/dist/modules/config/lib/config.d.mts +1 -1
  228. package/dist/modules/config/lib/config.mjs.map +1 -1
  229. package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
  230. package/dist/modules/data-tables/components/cell/common.client.d.mts.map +1 -1
  231. package/dist/modules/data-tables/components/column-header.d.mts +2 -2
  232. package/dist/modules/data-tables/components/column-header.d.mts.map +1 -1
  233. package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
  234. package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
  235. package/dist/modules/data-tables/components/header.d.mts +4 -4
  236. package/dist/modules/data-tables/components/header.d.mts.map +1 -1
  237. package/dist/modules/data-tables/components/layout.d.mts +2 -2
  238. package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
  239. package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
  240. package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
  241. package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
  242. package/dist/modules/data-tables/components/table.d.mts +7 -7
  243. package/dist/modules/data-tables/components/table.d.mts.map +1 -1
  244. package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
  245. package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
  246. package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
  247. package/dist/modules/data-tables/strategies/helpers/sorting.mjs +1 -1
  248. package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
  249. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
  250. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
  251. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts +2 -2
  252. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
  253. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
  254. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
  255. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
  256. package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
  257. package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
  258. package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
  259. package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
  260. package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
  261. package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
  262. package/dist/modules/inline-edit/components/date-time.client.d.mts +21 -0
  263. package/dist/modules/inline-edit/components/date-time.client.d.mts.map +1 -0
  264. package/dist/modules/inline-edit/components/date-time.client.mjs +33 -0
  265. package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -0
  266. package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
  267. package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
  268. package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
  269. package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
  270. package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
  271. package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
  272. package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
  273. package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
  274. package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
  275. package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
  276. package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
  277. package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
  278. package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
  279. package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
  280. package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
  281. package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
  282. package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +15 -2
  283. package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
  284. package/dist/modules/inline-edit/hooks/use-inline.client.mjs +2 -6
  285. package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
  286. package/dist/modules/router/handler/init.server.d.mts +6 -6
  287. package/dist/modules/router/handler/init.server.d.mts.map +1 -1
  288. package/dist/modules/router/lib/query-client.server.d.mts +2 -2
  289. package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
  290. package/dist/modules/storage/components/dropzone-context.client.d.mts +2 -2
  291. package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -1
  292. package/dist/modules/storage/components/dropzone.client.d.mts +5 -5
  293. package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
  294. package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
  295. package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
  296. package/dist/modules/storage/components/image-grid.client.mjs +1 -1
  297. package/dist/modules/storage/components/upload-zone.client.d.mts +2 -2
  298. package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
  299. package/dist/modules/storage/components/upload-zone.client.mjs +1 -1
  300. package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -1
  301. package/dist/modules/storage/lib/proxy.server.mjs +1 -1
  302. package/dist/modules/storage/lib/router.server.d.mts +2359 -2359
  303. package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
  304. package/dist/modules/storage/lib/router.server.mjs +1 -1
  305. package/dist/modules/storage/lib/schema.d.mts +92 -92
  306. package/dist/modules/storage/lib/service.server.d.mts +24 -24
  307. package/dist/modules/storage/lib/service.server.mjs +1 -1
  308. package/dist/modules/storage/lib/validators.d.mts +90 -90
  309. package/dist/modules/storage/lib/validators.d.mts.map +1 -1
  310. package/package.json +3 -10
  311. package/src/components/entry.client.ts +0 -2
  312. package/src/components/entry.ts +3 -0
  313. package/src/components/layouts/admin-layout.tsx +1 -3
  314. package/src/components/navigation/admin-sidebar-header.client.tsx +3 -20
  315. package/src/components/ui/input-date-time.tsx +58 -0
  316. package/src/components/ui/input-date.tsx +20 -0
  317. package/src/components/ui/input-time.tsx +20 -0
  318. package/src/modules/auth/components/allowed.client.tsx +2 -2
  319. package/src/modules/auth/components/create-first-user-page.client.tsx +3 -2
  320. package/src/modules/auth/components/forget-password-page.client.tsx +2 -1
  321. package/src/modules/auth/components/guard.server.tsx +2 -0
  322. package/src/modules/auth/components/login-page.client.tsx +2 -1
  323. package/src/modules/auth/components/reset-password-page.client.tsx +3 -1
  324. package/src/modules/auth/entry.client.ts +13 -1
  325. package/src/modules/auth/entry.ts +11 -0
  326. package/src/modules/auth/handler/create-client.client.ts +53 -0
  327. package/src/modules/auth/hooks/use-auth-client.tsx +38 -0
  328. package/src/modules/auth/hooks/use-permission.ts +49 -94
  329. package/src/modules/auth/hooks/use-session.ts +16 -16
  330. package/src/modules/commands/hooks/use-command-menu.client.tsx +0 -6
  331. package/src/modules/config/lib/config.ts +3 -2
  332. package/src/modules/inline-edit/components/date-time.client.tsx +38 -0
  333. package/src/modules/inline-edit/entry.client.ts +9 -0
  334. package/src/modules/inline-edit/entry.server.ts +3 -0
  335. package/src/modules/inline-edit/entry.ts +3 -0
  336. package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
  337. package/dist/components/ui/time-input.client.d.mts +0 -16
  338. package/dist/components/ui/time-input.client.d.mts.map +0 -1
  339. package/dist/components/ui/time-input.client.mjs +0 -53
  340. package/dist/components/ui/time-input.client.mjs.map +0 -1
  341. package/dist/components/ui/time-picker-input.client.d.mts +0 -15
  342. package/dist/components/ui/time-picker-input.client.d.mts.map +0 -1
  343. package/dist/components/ui/time-picker-input.client.mjs +0 -64
  344. package/dist/components/ui/time-picker-input.client.mjs.map +0 -1
  345. package/dist/lib/utils/time-picker.d.mts +0 -6
  346. package/dist/lib/utils/time-picker.d.mts.map +0 -1
  347. package/dist/lib/utils/time-picker.mjs +0 -104
  348. package/dist/lib/utils/time-picker.mjs.map +0 -1
  349. package/dist/modules/auth/handler/client.client.d.mts.map +0 -1
  350. package/dist/modules/auth/handler/client.client.mjs +0 -21
  351. package/dist/modules/auth/handler/client.client.mjs.map +0 -1
  352. package/src/components/ui/time-input.client.tsx +0 -56
  353. package/src/components/ui/time-picker-input.client.tsx +0 -107
  354. package/src/modules/auth/components/guard.client.tsx +0 -12
  355. package/src/modules/auth/handler/client.client.ts +0 -16
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-client.client.d.mts","names":[],"sources":["../../../../src/modules/auth/handler/create-client.client.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;KAYY,6CACa,iDACW;;AAFpC;;EAEoC,OAAA,CAAA,EAAA,MAAA;EAS9B;;;EAIU,EAAA,EAJV,cAIU;EACS,KAAA,EAJhB,MAIgB;CACW;AACL,iBAHf,gBAGe,CAAA,uBAFN,aAEM,EAAA,eAAA,UAAgB,MAAA,GADX,IACW,EAAtC,CAAA,CAAA,KAAA,EAAA,qBAAA,CAAsB,cAAtB,EAAsC,MAAtC,CAAA,CAAA,EAAA;EAAqB,eAAA,EAAA,GAAA,GAAA;UAAA,qBAAA,CAAA,OAAA;eAlBH,uCAAA;;;;6BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;qBAAA,cAAA,CAAmmB;;;;+BAAA,cAAA,CAAinB,iBAAA,iBAAA;;;;;;;;YAAA,qBAAA,CAAA;;;;;;;;;;;;;aAAA,qBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAArnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAA+wG,mBAAA,CAAA;;;;;;;;;;;;;;;;;YAAx5D;;;eAA2F,eAAA;;;;;eAA+U;kBAA+C;;;WAAwG;eAAwC;;qBAAqF;cAAyC;0BAAA,mBAAA,CAAgD,oBAAA;;;;;qBAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;gCAA27B,YAAA;;cAAA,mBAAA,CAAmG,gBAAA,UAAA,cAAA;kBAAA,mBAAA,CAAmG,gBAAA;;;;;uBAAuM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAJ3+H,kCACa,iDACW,UAChC,kBAAkB,iBAAiB,gBAAgB"}
@@ -0,0 +1,26 @@
1
+ import { url } from "../../../lib/utils/url.mjs";
2
+ import "client-only";
3
+ import { passkeyClient } from "@better-auth/passkey/client";
4
+ import { adminClient, emailOTPClient, inferAdditionalFields } from "better-auth/client/plugins";
5
+ import { createAuthClient } from "better-auth/react";
6
+
7
+ //#region src/modules/auth/handler/create-client.client.ts
8
+ function createAuthClient$1(props) {
9
+ const { ac, roles } = props;
10
+ return createAuthClient({
11
+ baseURL: props.baseURL ?? url(),
12
+ plugins: [
13
+ emailOTPClient(),
14
+ passkeyClient(),
15
+ adminClient({
16
+ ac,
17
+ roles
18
+ }),
19
+ inferAdditionalFields()
20
+ ]
21
+ });
22
+ }
23
+
24
+ //#endregion
25
+ export { createAuthClient$1 as createAuthClient };
26
+ //# sourceMappingURL=create-client.client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-client.client.mjs","names":["createAuthClient","createBetterAuthClient"],"sources":["../../../../src/modules/auth/handler/create-client.client.ts"],"sourcesContent":["import \"client-only\";\n\nimport { url } from \"@/lib/utils/url\";\nimport { passkeyClient } from \"@better-auth/passkey/client\";\nimport { adminClient, emailOTPClient, inferAdditionalFields } from \"better-auth/client/plugins\";\nimport { AccessControl, Role } from \"better-auth/plugins\";\nimport { createAuthClient as createBetterAuthClient } from \"better-auth/react\";\nimport { AuthClient } from \"./init\";\n\n/**\n * Create auth client\n */\nexport type CreateAuthClientProps<\n TAccessControl extends AccessControl,\n TRoles extends { [key in string]: Role },\n> = {\n /**\n * Base URL for the auth client\n */\n baseURL?: string;\n /**\n * Access control instance\n */\n ac: TAccessControl;\n roles: TRoles;\n};\n\nexport function createAuthClient<\n TAccessControl extends AccessControl,\n TRoles extends { [key in string]: Role },\n>(props: CreateAuthClientProps<TAccessControl, TRoles>) {\n const { ac, roles } = props;\n\n const baseURL = props.baseURL ?? url();\n\n return createBetterAuthClient({\n baseURL,\n plugins: [\n emailOTPClient(),\n passkeyClient(),\n adminClient({ ac, roles }),\n inferAdditionalFields<AuthClient>(),\n ],\n });\n}\n\n/**\n * Client auth type\n */\nexport type ClientAuth<\n TAccessControl extends AccessControl,\n TRoles extends { [key in string]: Role },\n> = ReturnType<typeof createAuthClient<TAccessControl, TRoles>>;\n"],"mappings":";;;;;;;AA2BA,SAAgBA,mBAGd,OAAsD;CACtD,MAAM,EAAE,IAAI,UAAU;AAItB,QAAOC,iBAAuB;EAC5B,SAHc,MAAM,WAAW,KAAK;EAIpC,SAAS;GACP,gBAAgB;GAChB,eAAe;GACf,YAAY;IAAE;IAAI;IAAO,CAAC;GAC1B,uBAAmC;GACpC;EACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Role, createAccessControl } from "../lib/permissions.mjs";
1
+ import { Role as Role$1, createAccessControl } from "../lib/permissions.mjs";
2
2
  import { TulipConfig } from "../../config/lib/config.mjs";
3
3
  import { TDatabaseSchema } from "../../config/db/types.mjs";
4
4
  import { DatabaseClient } from "../../config/db/init.mjs";
@@ -18,7 +18,7 @@ type InitAuthProps<TSchema extends TDatabaseSchema> = {
18
18
  email: EmailClient;
19
19
  config: TulipConfig;
20
20
  ac: ReturnType<typeof createAccessControl>;
21
- roles: { [key in string]?: Role };
21
+ roles: { [key in string]?: Role$1 };
22
22
  };
23
23
  declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<TSchema>): better_auth0.Auth<{
24
24
  advanced: {
@@ -211,8 +211,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
211
211
  };
212
212
  };
213
213
  };
214
- } & {
215
- use: any[];
216
214
  }, _simplewebauthn_server0.PublicKeyCredentialCreationOptionsJSON>;
217
215
  generatePasskeyAuthenticationOptions: better_auth0.StrictEndpoint<"/passkey/generate-authenticate-options", {
218
216
  method: "GET";
@@ -307,8 +305,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
307
305
  };
308
306
  };
309
307
  };
310
- } & {
311
- use: any[];
312
308
  }, _simplewebauthn_server0.PublicKeyCredentialRequestOptionsJSON>;
313
309
  verifyPasskeyRegistration: better_auth0.StrictEndpoint<"/passkey/verify-registration", {
314
310
  method: "POST";
@@ -360,8 +356,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
360
356
  };
361
357
  };
362
358
  };
363
- } & {
364
- use: any[];
365
359
  }, _better_auth_passkey0.Passkey | null>;
366
360
  verifyPasskeyAuthentication: better_auth0.StrictEndpoint<"/passkey/verify-authentication", {
367
361
  method: "POST";
@@ -399,8 +393,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
399
393
  };
400
394
  };
401
395
  };
402
- } & {
403
- use: any[];
404
396
  }, {
405
397
  session: {
406
398
  id: string;
@@ -460,8 +452,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
460
452
  };
461
453
  };
462
454
  };
463
- } & {
464
- use: any[];
465
455
  }, _better_auth_passkey0.Passkey[]>;
466
456
  deletePasskey: better_auth0.StrictEndpoint<"/passkey/delete-passkey", {
467
457
  method: "POST";
@@ -515,8 +505,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
515
505
  };
516
506
  };
517
507
  };
518
- } & {
519
- use: any[];
520
508
  }, {
521
509
  status: boolean;
522
510
  }>;
@@ -572,8 +560,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
572
560
  };
573
561
  };
574
562
  };
575
- } & {
576
- use: any[];
577
563
  }, {
578
564
  passkey: _better_auth_passkey0.Passkey;
579
565
  }>;
@@ -639,6 +625,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
639
625
  readonly UNABLE_TO_CREATE_SESSION: "Unable to create session";
640
626
  readonly FAILED_TO_UPDATE_PASSKEY: "Failed to update passkey";
641
627
  };
628
+ options: _better_auth_passkey0.PasskeyOptions | undefined;
642
629
  }, {
643
630
  id: "admin";
644
631
  init(): {
@@ -679,7 +666,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
679
666
  token: string;
680
667
  ipAddress?: string | null | undefined;
681
668
  userAgent?: string | null | undefined;
682
- } & Record<string, unknown>, ctx: better_auth0.GenericEndpointContext | undefined): Promise<void>;
669
+ } & Record<string, unknown>, ctx: better_auth0.GenericEndpointContext | null): Promise<void>;
683
670
  };
684
671
  };
685
672
  };
@@ -735,8 +722,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
735
722
  };
736
723
  };
737
724
  };
738
- } & {
739
- use: any[];
740
725
  }, {
741
726
  user: better_auth_plugins0.UserWithRole;
742
727
  }>;
@@ -775,22 +760,12 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
775
760
  };
776
761
  };
777
762
  };
778
- } & {
779
- use: any[];
780
- }, {
781
- id: string;
782
- createdAt: Date;
783
- updatedAt: Date;
784
- email: string;
785
- emailVerified: boolean;
786
- name: string;
787
- image?: string | null | undefined;
788
- }>;
763
+ }, better_auth_plugins0.UserWithRole>;
789
764
  createUser: better_auth0.StrictEndpoint<"/admin/create-user", {
790
765
  method: "POST";
791
766
  body: zod0.ZodObject<{
792
767
  email: zod0.ZodString;
793
- password: zod0.ZodString;
768
+ password: zod0.ZodOptional<zod0.ZodString>;
794
769
  name: zod0.ZodString;
795
770
  role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
796
771
  data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
@@ -821,15 +796,13 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
821
796
  $Infer: {
822
797
  body: {
823
798
  email: string;
824
- password: string;
799
+ password?: string | undefined;
825
800
  name: string;
826
801
  role?: string | string[] | undefined;
827
802
  data?: Record<string, any> | undefined;
828
803
  };
829
804
  };
830
805
  };
831
- } & {
832
- use: any[];
833
806
  }, {
834
807
  user: better_auth_plugins0.UserWithRole;
835
808
  }>;
@@ -869,8 +842,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
869
842
  };
870
843
  };
871
844
  };
872
- } & {
873
- use: any[];
874
845
  }, better_auth_plugins0.UserWithRole>;
875
846
  listUsers: better_auth0.StrictEndpoint<"/admin/list-users", {
876
847
  method: "GET";
@@ -947,8 +918,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
947
918
  };
948
919
  };
949
920
  };
950
- } & {
951
- use: any[];
952
921
  }, {
953
922
  users: better_auth_plugins0.UserWithRole[];
954
923
  total: number;
@@ -996,8 +965,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
996
965
  };
997
966
  };
998
967
  };
999
- } & {
1000
- use: any[];
1001
968
  }, {
1002
969
  sessions: better_auth_plugins0.SessionWithImpersonatedBy[];
1003
970
  }>;
@@ -1036,18 +1003,8 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1036
1003
  };
1037
1004
  };
1038
1005
  };
1039
- } & {
1040
- use: any[];
1041
1006
  }, {
1042
- user: {
1043
- id: string;
1044
- createdAt: Date;
1045
- updatedAt: Date;
1046
- email: string;
1047
- emailVerified: boolean;
1048
- name: string;
1049
- image?: string | null | undefined;
1050
- } & Record<string, any>;
1007
+ user: better_auth_plugins0.UserWithRole;
1051
1008
  }>;
1052
1009
  banUser: better_auth0.StrictEndpoint<"/admin/ban-user", {
1053
1010
  method: "POST";
@@ -1086,18 +1043,8 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1086
1043
  };
1087
1044
  };
1088
1045
  };
1089
- } & {
1090
- use: any[];
1091
1046
  }, {
1092
- user: {
1093
- id: string;
1094
- createdAt: Date;
1095
- updatedAt: Date;
1096
- email: string;
1097
- emailVerified: boolean;
1098
- name: string;
1099
- image?: string | null | undefined;
1100
- } & Record<string, any>;
1047
+ user: better_auth_plugins0.UserWithRole;
1101
1048
  }>;
1102
1049
  impersonateUser: better_auth0.StrictEndpoint<"/admin/impersonate-user", {
1103
1050
  method: "POST";
@@ -1137,8 +1084,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1137
1084
  };
1138
1085
  };
1139
1086
  };
1140
- } & {
1141
- use: any[];
1142
1087
  }, {
1143
1088
  session: {
1144
1089
  id: string;
@@ -1150,6 +1095,22 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1150
1095
  ipAddress?: string | null | undefined;
1151
1096
  userAgent?: string | null | undefined;
1152
1097
  };
1098
+ user: better_auth_plugins0.UserWithRole;
1099
+ }>;
1100
+ stopImpersonating: better_auth0.StrictEndpoint<"/admin/stop-impersonating", {
1101
+ method: "POST";
1102
+ requireHeaders: true;
1103
+ }, {
1104
+ session: {
1105
+ id: string;
1106
+ createdAt: Date;
1107
+ updatedAt: Date;
1108
+ userId: string;
1109
+ expiresAt: Date;
1110
+ token: string;
1111
+ ipAddress?: string | null | undefined;
1112
+ userAgent?: string | null | undefined;
1113
+ } & Record<string, any>;
1153
1114
  user: {
1154
1115
  id: string;
1155
1116
  createdAt: Date;
@@ -1158,16 +1119,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1158
1119
  emailVerified: boolean;
1159
1120
  name: string;
1160
1121
  image?: string | null | undefined;
1161
- };
1162
- }>;
1163
- stopImpersonating: better_auth0.StrictEndpoint<"/admin/stop-impersonating", {
1164
- method: "POST";
1165
- requireHeaders: true;
1166
- } & {
1167
- use: any[];
1168
- }, {
1169
- session: better_auth0.Session & Record<string, any>;
1170
- user: better_auth0.User & Record<string, any>;
1122
+ } & Record<string, any>;
1171
1123
  }>;
1172
1124
  revokeUserSession: better_auth0.StrictEndpoint<"/admin/revoke-user-session", {
1173
1125
  method: "POST";
@@ -1204,8 +1156,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1204
1156
  };
1205
1157
  };
1206
1158
  };
1207
- } & {
1208
- use: any[];
1209
1159
  }, {
1210
1160
  success: boolean;
1211
1161
  }>;
@@ -1244,8 +1194,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1244
1194
  };
1245
1195
  };
1246
1196
  };
1247
- } & {
1248
- use: any[];
1249
1197
  }, {
1250
1198
  success: boolean;
1251
1199
  }>;
@@ -1284,8 +1232,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1284
1232
  };
1285
1233
  };
1286
1234
  };
1287
- } & {
1288
- use: any[];
1289
1235
  }, {
1290
1236
  success: boolean;
1291
1237
  }>;
@@ -1325,8 +1271,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1325
1271
  };
1326
1272
  };
1327
1273
  };
1328
- } & {
1329
- use: any[];
1330
1274
  }, {
1331
1275
  status: boolean;
1332
1276
  }>;
@@ -1405,8 +1349,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1405
1349
  };
1406
1350
  };
1407
1351
  };
1408
- } & {
1409
- use: any[];
1410
1352
  }, {
1411
1353
  error: null;
1412
1354
  success: boolean;
@@ -1432,6 +1374,8 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1432
1374
  readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
1433
1375
  readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
1434
1376
  readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
1377
+ readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
1378
+ readonly INVALID_ROLE_TYPE: "Invalid role type";
1435
1379
  };
1436
1380
  schema: {
1437
1381
  user: {
@@ -1468,7 +1412,22 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1468
1412
  };
1469
1413
  };
1470
1414
  };
1471
- options: any;
1415
+ options: NoInfer<{
1416
+ roles: {
1417
+ [x: string]: Role$1 | undefined;
1418
+ };
1419
+ ac: {
1420
+ newRole<K extends string | number>(statements: better_auth_plugins0.Subset<K, better_auth_plugins0.Statements>): {
1421
+ authorize<K_1 extends K>(request: K_1 extends infer T extends K_2 ? { [key in T]?: better_auth_plugins0.Subset<K, better_auth_plugins0.Statements>[key] | {
1422
+ actions: better_auth_plugins0.Subset<K, better_auth_plugins0.Statements>[key];
1423
+ connector: "OR" | "AND";
1424
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1425
+ statements: better_auth_plugins0.Subset<K, better_auth_plugins0.Statements>;
1426
+ };
1427
+ statements: better_auth_plugins0.Statements;
1428
+ };
1429
+ adminRoles: string[];
1430
+ }>;
1472
1431
  }, {
1473
1432
  id: "email-otp";
1474
1433
  init(ctx: better_auth0.AuthContext): {
@@ -1483,7 +1442,43 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1483
1442
  };
1484
1443
  } | undefined;
1485
1444
  endpoints: {
1486
- createVerificationOTP: better_auth0.StrictEndpoint<"/email-otp/create-verification-otp", {
1445
+ sendVerificationOTP: better_auth0.StrictEndpoint<"/email-otp/send-verification-otp", {
1446
+ method: "POST";
1447
+ body: zod0.ZodObject<{
1448
+ email: zod0.ZodString;
1449
+ type: zod0.ZodEnum<{
1450
+ "sign-in": "sign-in";
1451
+ "email-verification": "email-verification";
1452
+ "forget-password": "forget-password";
1453
+ }>;
1454
+ }, better_auth0.$strip>;
1455
+ metadata: {
1456
+ openapi: {
1457
+ operationId: string;
1458
+ description: string;
1459
+ responses: {
1460
+ 200: {
1461
+ description: string;
1462
+ content: {
1463
+ "application/json": {
1464
+ schema: {
1465
+ type: "object";
1466
+ properties: {
1467
+ success: {
1468
+ type: string;
1469
+ };
1470
+ };
1471
+ };
1472
+ };
1473
+ };
1474
+ };
1475
+ };
1476
+ };
1477
+ };
1478
+ }, {
1479
+ success: boolean;
1480
+ }>;
1481
+ createVerificationOTP: better_auth0.StrictEndpoint<string, {
1487
1482
  method: "POST";
1488
1483
  body: zod0.ZodObject<{
1489
1484
  email: zod0.ZodString;
@@ -1494,7 +1489,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1494
1489
  }>;
1495
1490
  }, better_auth0.$strip>;
1496
1491
  metadata: {
1497
- SERVER_ONLY: true;
1498
1492
  openapi: {
1499
1493
  operationId: string;
1500
1494
  description: string;
@@ -1512,10 +1506,8 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1512
1506
  };
1513
1507
  };
1514
1508
  };
1515
- } & {
1516
- use: any[];
1517
1509
  }, string>;
1518
- getVerificationOTP: better_auth0.StrictEndpoint<"/email-otp/get-verification-otp", {
1510
+ getVerificationOTP: better_auth0.StrictEndpoint<string, {
1519
1511
  method: "GET";
1520
1512
  query: zod0.ZodObject<{
1521
1513
  email: zod0.ZodString;
@@ -1526,7 +1518,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1526
1518
  }>;
1527
1519
  }, better_auth0.$strip>;
1528
1520
  metadata: {
1529
- SERVER_ONLY: true;
1530
1521
  openapi: {
1531
1522
  operationId: string;
1532
1523
  description: string;
@@ -1552,8 +1543,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1552
1543
  };
1553
1544
  };
1554
1545
  };
1555
- } & {
1556
- use: any[];
1557
1546
  }, {
1558
1547
  otp: null;
1559
1548
  } | {
@@ -1593,8 +1582,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1593
1582
  };
1594
1583
  };
1595
1584
  };
1596
- } & {
1597
- use: any[];
1598
1585
  }, {
1599
1586
  success: boolean;
1600
1587
  }>;
@@ -1637,32 +1624,30 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1637
1624
  };
1638
1625
  };
1639
1626
  };
1640
- } & {
1641
- use: any[];
1642
1627
  }, {
1643
1628
  status: boolean;
1644
1629
  token: string;
1645
1630
  user: {
1646
1631
  id: string;
1632
+ createdAt: Date;
1633
+ updatedAt: Date;
1647
1634
  email: string;
1648
1635
  emailVerified: boolean;
1649
1636
  name: string;
1650
- image: string | null | undefined;
1651
- createdAt: Date;
1652
- updatedAt: Date;
1653
- };
1637
+ image?: string | null | undefined;
1638
+ } & Record<string, any>;
1654
1639
  } | {
1655
1640
  status: boolean;
1656
1641
  token: null;
1657
1642
  user: {
1658
1643
  id: string;
1644
+ createdAt: Date;
1645
+ updatedAt: Date;
1659
1646
  email: string;
1660
1647
  emailVerified: boolean;
1661
1648
  name: string;
1662
- image: string | null | undefined;
1663
- createdAt: Date;
1664
- updatedAt: Date;
1665
- };
1649
+ image?: string | null | undefined;
1650
+ } & Record<string, any>;
1666
1651
  }>;
1667
1652
  signInEmailOTP: better_auth0.StrictEndpoint<"/sign-in/email-otp", {
1668
1653
  method: "POST";
@@ -1698,21 +1683,19 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1698
1683
  };
1699
1684
  };
1700
1685
  };
1701
- } & {
1702
- use: any[];
1703
1686
  }, {
1704
1687
  token: string;
1705
1688
  user: {
1706
1689
  id: string;
1690
+ createdAt: Date;
1691
+ updatedAt: Date;
1707
1692
  email: string;
1708
1693
  emailVerified: boolean;
1709
1694
  name: string;
1710
- image: string | null | undefined;
1711
- createdAt: Date;
1712
- updatedAt: Date;
1695
+ image?: string | null | undefined;
1713
1696
  };
1714
1697
  }>;
1715
- forgetPasswordEmailOTP: better_auth0.StrictEndpoint<"/forget-password/email-otp", {
1698
+ requestPasswordResetEmailOTP: better_auth0.StrictEndpoint<"/email-otp/request-password-reset", {
1716
1699
  method: "POST";
1717
1700
  body: zod0.ZodObject<{
1718
1701
  email: zod0.ZodString;
@@ -1741,17 +1724,13 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1741
1724
  };
1742
1725
  };
1743
1726
  };
1744
- } & {
1745
- use: any[];
1746
1727
  }, {
1747
1728
  success: boolean;
1748
1729
  }>;
1749
- resetPasswordEmailOTP: better_auth0.StrictEndpoint<"/email-otp/reset-password", {
1730
+ forgetPasswordEmailOTP: better_auth0.StrictEndpoint<"/forget-password/email-otp", {
1750
1731
  method: "POST";
1751
1732
  body: zod0.ZodObject<{
1752
1733
  email: zod0.ZodString;
1753
- otp: zod0.ZodString;
1754
- password: zod0.ZodString;
1755
1734
  }, better_auth0.$strip>;
1756
1735
  metadata: {
1757
1736
  openapi: {
@@ -1760,13 +1739,14 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1760
1739
  responses: {
1761
1740
  200: {
1762
1741
  description: string;
1763
- contnt: {
1742
+ content: {
1764
1743
  "application/json": {
1765
1744
  schema: {
1766
- type: string;
1745
+ type: "object";
1767
1746
  properties: {
1768
1747
  success: {
1769
1748
  type: string;
1749
+ description: string;
1770
1750
  };
1771
1751
  };
1772
1752
  };
@@ -1776,20 +1756,15 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1776
1756
  };
1777
1757
  };
1778
1758
  };
1779
- } & {
1780
- use: any[];
1781
1759
  }, {
1782
1760
  success: boolean;
1783
1761
  }>;
1784
- sendVerificationOTP: better_auth0.StrictEndpoint<"/email-otp/send-verification-otp", {
1762
+ resetPasswordEmailOTP: better_auth0.StrictEndpoint<"/email-otp/reset-password", {
1785
1763
  method: "POST";
1786
1764
  body: zod0.ZodObject<{
1787
1765
  email: zod0.ZodString;
1788
- type: zod0.ZodEnum<{
1789
- "sign-in": "sign-in";
1790
- "email-verification": "email-verification";
1791
- "forget-password": "forget-password";
1792
- }>;
1766
+ otp: zod0.ZodString;
1767
+ password: zod0.ZodString;
1793
1768
  }, better_auth0.$strip>;
1794
1769
  metadata: {
1795
1770
  openapi: {
@@ -1798,10 +1773,10 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1798
1773
  responses: {
1799
1774
  200: {
1800
1775
  description: string;
1801
- content: {
1776
+ contnt: {
1802
1777
  "application/json": {
1803
1778
  schema: {
1804
- type: "object";
1779
+ type: string;
1805
1780
  properties: {
1806
1781
  success: {
1807
1782
  type: string;
@@ -1814,8 +1789,6 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1814
1789
  };
1815
1790
  };
1816
1791
  };
1817
- } & {
1818
- use: any[];
1819
1792
  }, {
1820
1793
  success: boolean;
1821
1794
  }>;
@@ -1847,7 +1820,20 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
1847
1820
  pathMatcher(path: string): path is "/sign-in/email-otp";
1848
1821
  window: number;
1849
1822
  max: number;
1823
+ } | {
1824
+ pathMatcher(path: string): path is "/email-otp/request-password-reset";
1825
+ window: number;
1826
+ max: number;
1827
+ } | {
1828
+ pathMatcher(path: string): path is "/email-otp/reset-password";
1829
+ window: number;
1830
+ max: number;
1831
+ } | {
1832
+ pathMatcher(path: string): path is "/forget-password/email-otp";
1833
+ window: number;
1834
+ max: number;
1850
1835
  })[];
1836
+ options: better_auth_plugins0.EmailOTPOptions;
1851
1837
  }];
1852
1838
  }>;
1853
1839
  type AuthClient = ReturnType<typeof initAuth>;
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.mts","names":[],"sources":["../../../../src/modules/auth/handler/init.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;cAca,gBAAA;KAER,8BAA8B;MAC7B,eAAe;SACZ;UACC;MACJ,kBAAkB;6BAEF;;AART,iBAYG,QAZa,CAAA,gBAYY,eAZZ,CAAA,CAAA,KAAA,EAYoC,aAZpC,CAYkD,OAZlD,CAAA,CAAA,eAY0D,IAZ1D,CAAA;EAExB,QAAA,EAAA;IAA8B,YAAA,EAAA,MAAA;IACd,QAAA,EAAA;MAAf,UAAA,EAAA,GAAA,GAAA,KAAA;IACG,CAAA;EACC,CAAA;EACc,QAAA,EAAA,CAAA,OAAA,EAMsD,YAAA,CAAA,iBANtD,EAAA,yBAAA,gCAAA;EAAlB,gBAAA,EAAA;IAEgB,OAAA,EAAA,IAAA;EAAI,CAAA;EAIV,IAAA,EAAA;IAAyB,WAAA,EAAA;MAAsC,OAAA,EAAA,IAAA;IAAd,CAAA;IAAa,gBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAV,UAAA,GAAa,kBAAkB"}
@@ -0,0 +1,24 @@
1
+ import { ClientAuth } from "../handler/create-client.client.mjs";
2
+ import * as react_jsx_runtime48 from "react/jsx-runtime";
3
+ import * as react8 from "react";
4
+ import { PropsWithChildren } from "react";
5
+ import { AccessControl, Role } from "better-auth/plugins";
6
+
7
+ //#region src/modules/auth/hooks/use-auth-client.d.ts
8
+ /**
9
+ * Auth client context
10
+ */
11
+ declare const AuthClientContext: react8.Context<ClientAuth<never, never>>;
12
+ /**
13
+ * Use auth client
14
+ */
15
+ declare function useAuthClient<TAccessControl extends AccessControl = never, TRoles extends { [key in string]: Role } = never>(): ClientAuth<TAccessControl, TRoles>;
16
+ /**
17
+ * Auth client provider
18
+ */
19
+ declare function AuthProvider<TAccessControl extends AccessControl, TRoles extends { [key in string]: Role }>(props: PropsWithChildren<{
20
+ authClient: ClientAuth<TAccessControl, TRoles>;
21
+ }>): react_jsx_runtime48.JSX.Element;
22
+ //#endregion
23
+ export { AuthClientContext, AuthProvider, useAuthClient };
24
+ //# sourceMappingURL=use-auth-client.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-auth-client.d.mts","names":[],"sources":["../../../../src/modules/auth/hooks/use-auth-client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;cAUa,mBAAiB,MAAA,CAAA,QAAA;AAA9B;AAKA;;AAEoC,iBAFpB,aAEoB,CAAA,uBADX,aACW,GAAA,KAAA,EAAA,eAAA,UAKL,MAAA,GALK,IAKL,EAAgB,GAAA,KAAA,CAAA,CAAA,CAAA,EAA3B,UAA2B,CAAhB,cAAgB,EAAA,MAAA,CAAA;;;AAM/C;AACyB,iBADT,YACS,CAAA,uBAAA,aAAA,EAAA,eAAA,UACW,MAAA,GAAA,IAAA,EACgB,CAAA,CAAA,KAAA,EAA3C,iBAA2C,CAAA;EAAgB,UAAA,EAA3B,UAA2B,CAAhB,cAAgB,EAAA,MAAA,CAAA;CAA3B,CAAA,CAAA,EAAqC,mBAAA,CAAA,GAAA,CAAA,OAArC"}