@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.
- package/dist/auth/client.d.mts +5 -4
- package/dist/auth/client.mjs +6 -5
- package/dist/auth.mjs +2 -2
- package/dist/components/client.d.mts +1 -3
- package/dist/components/client.mjs +3 -5
- package/dist/components/common/icons.d.mts +52 -52
- package/dist/components/common/icons.d.mts.map +1 -1
- package/dist/components/common/status.d.mts +3 -3
- package/dist/components/editor/components/content.client.d.mts +2 -2
- package/dist/components/editor/components/content.client.d.mts.map +1 -1
- package/dist/components/editor/components/editor.client.d.mts +6 -6
- package/dist/components/editor/components/editor.client.d.mts.map +1 -1
- package/dist/components/editor/components/menu.client.d.mts +3 -3
- package/dist/components/editor/components/menu.client.d.mts.map +1 -1
- package/dist/components/editor/lib/constants.d.mts +27 -27
- package/dist/components/header/back-button.client.d.mts +2 -2
- package/dist/components/header/back-button.client.d.mts.map +1 -1
- package/dist/components/header/bottom-bar.client.d.mts +3 -3
- package/dist/components/header/bottom-bar.client.d.mts.map +1 -1
- package/dist/components/header/breadcrumbs.client.d.mts +7 -7
- package/dist/components/header/breadcrumbs.client.d.mts.map +1 -1
- package/dist/components/header/header.client.d.mts +2 -2
- package/dist/components/header/header.client.d.mts.map +1 -1
- package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.mts.map +1 -1
- package/dist/components/header/top-bar.client.d.mts +4 -4
- package/dist/components/header/top-bar.client.d.mts.map +1 -1
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- package/dist/components/layouts/admin-content.client.d.mts.map +1 -1
- package/dist/components/layouts/admin-error-pages.d.mts +4 -4
- package/dist/components/layouts/admin-layout.d.mts +2 -2
- package/dist/components/layouts/admin-layout.d.mts.map +1 -1
- package/dist/components/layouts/admin-layout.mjs +1 -1
- package/dist/components/layouts/admin-layout.mjs.map +1 -1
- package/dist/components/layouts/admin-loading.d.mts +2 -2
- package/dist/components/layouts/empty-page.d.mts +4 -4
- package/dist/components/layouts/error-page.d.mts +9 -9
- package/dist/components/layouts/error-page.d.mts.map +1 -1
- package/dist/components/layouts/error-sections.d.mts +5 -5
- package/dist/components/layouts/list-layout.d.mts +2 -2
- package/dist/components/layouts/providers.client.d.mts +2 -2
- package/dist/components/layouts/providers.client.d.mts.map +1 -1
- package/dist/components/layouts/root-error-pages.d.mts +2 -2
- package/dist/components/layouts/root-layout.server.d.mts +4 -4
- package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
- package/dist/components/layouts/root-loading.d.mts +2 -2
- package/dist/components/layouts/tab-layout.d.mts +2 -2
- package/dist/components/lists/data-list.d.mts +5 -5
- package/dist/components/lists/data-stack.d.mts +8 -8
- package/dist/components/navigation/admin-sidebar-header.client.mjs +3 -2
- package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts.map +1 -1
- package/dist/components/ui/accordion.d.mts +5 -5
- package/dist/components/ui/alert-dialog.d.mts +12 -12
- package/dist/components/ui/alert.d.mts +6 -6
- package/dist/components/ui/aspect-ratio.d.mts +2 -2
- package/dist/components/ui/avatar.client.d.mts +4 -4
- package/dist/components/ui/avatar.client.d.mts.map +1 -1
- package/dist/components/ui/badge.d.mts +5 -5
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/button.d.mts +5 -5
- package/dist/components/ui/calendar.d.mts +3 -3
- package/dist/components/ui/card.d.mts +7 -7
- package/dist/components/ui/carousel.d.mts +6 -6
- package/dist/components/ui/chart.client.d.mts +5 -5
- package/dist/components/ui/chart.client.d.mts.map +1 -1
- package/dist/components/ui/checkbox.d.mts +2 -2
- package/dist/components/ui/collapsible.client.d.mts +4 -4
- package/dist/components/ui/collapsible.client.d.mts.map +1 -1
- package/dist/components/ui/color-picker.client.d.mts +2 -2
- package/dist/components/ui/color-picker.client.d.mts.map +1 -1
- package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/components/ui/combobox.client.d.mts +2 -2
- package/dist/components/ui/combobox.client.d.mts.map +1 -1
- package/dist/components/ui/command.d.mts +10 -10
- package/dist/components/ui/context-menu.d.mts +16 -16
- package/dist/components/ui/date-picker.client.d.mts +2 -2
- package/dist/components/ui/date-picker.client.d.mts.map +1 -1
- package/dist/components/ui/dialog.client.d.mts +11 -11
- package/dist/components/ui/dialog.client.d.mts.map +1 -1
- package/dist/components/ui/drawer.client.d.mts +11 -11
- package/dist/components/ui/drawer.client.d.mts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.mts +16 -16
- package/dist/components/ui/form.client.d.mts +7 -7
- package/dist/components/ui/form.client.d.mts.map +1 -1
- package/dist/components/ui/hover-card.client.d.mts +4 -4
- package/dist/components/ui/hover-card.client.d.mts.map +1 -1
- package/dist/components/ui/input-date-time.d.mts +23 -0
- package/dist/components/ui/input-date-time.d.mts.map +1 -0
- package/dist/components/ui/input-date-time.mjs +34 -0
- package/dist/components/ui/input-date-time.mjs.map +1 -0
- package/dist/components/ui/input-date.d.mts +14 -0
- package/dist/components/ui/input-date.d.mts.map +1 -0
- package/dist/components/ui/input-date.mjs +16 -0
- package/dist/components/ui/input-date.mjs.map +1 -0
- package/dist/components/ui/input-recipient.d.mts +2 -2
- package/dist/components/ui/input-time.d.mts +14 -0
- package/dist/components/ui/input-time.d.mts.map +1 -0
- package/dist/components/ui/input-time.mjs +16 -0
- package/dist/components/ui/input-time.mjs.map +1 -0
- package/dist/components/ui/input.d.mts +2 -2
- package/dist/components/ui/label.d.mts +2 -2
- package/dist/components/ui/navigation-menu.d.mts +11 -11
- package/dist/components/ui/pagination.d.mts +8 -8
- package/dist/components/ui/popover.d.mts +5 -5
- package/dist/components/ui/progress.client.d.mts +2 -2
- package/dist/components/ui/progress.client.d.mts.map +1 -1
- package/dist/components/ui/radio-group.d.mts +3 -3
- package/dist/components/ui/resizable.client.d.mts +4 -4
- package/dist/components/ui/resizable.client.d.mts.map +1 -1
- package/dist/components/ui/scroll-area.d.mts +3 -3
- package/dist/components/ui/select.client.d.mts +11 -11
- package/dist/components/ui/select.client.d.mts.map +1 -1
- package/dist/components/ui/separator.d.mts +2 -2
- package/dist/components/ui/sheet.client.d.mts +9 -9
- package/dist/components/ui/sheet.client.d.mts.map +1 -1
- package/dist/components/ui/sidebar.client.d.mts +26 -26
- package/dist/components/ui/sidebar.client.d.mts.map +1 -1
- package/dist/components/ui/skeleton.d.mts +2 -2
- package/dist/components/ui/slider.d.mts +2 -2
- package/dist/components/ui/sonner.client.d.mts +2 -2
- package/dist/components/ui/sonner.client.mjs +1 -1
- package/dist/components/ui/switch.d.mts +2 -2
- package/dist/components/ui/tabs.d.mts +5 -5
- package/dist/components/ui/textarea.d.mts +2 -2
- package/dist/components/ui/toggle-group.client.d.mts +3 -3
- package/dist/components/ui/toggle.d.mts +4 -4
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components.d.mts +4 -1
- package/dist/components.mjs +6 -3
- package/dist/inline-edit/client.d.mts +3 -1
- package/dist/inline-edit/client.mjs +3 -1
- package/dist/lib/client.mjs +1 -1
- package/dist/lib/hooks/use-indicator.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
- package/dist/modules/auth/components/allowed.client.d.mts +2 -2
- package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
- package/dist/modules/auth/components/allowed.client.mjs +2 -3
- package/dist/modules/auth/components/allowed.client.mjs.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
- package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
- package/dist/modules/auth/components/auth-loading.d.mts +2 -2
- package/dist/modules/auth/components/auth-loading.d.mts.map +1 -1
- package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
- package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/create-first-user-page.client.mjs +4 -3
- package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.mjs +4 -3
- package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.d.mts +3 -2
- package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.mjs +1 -0
- package/dist/modules/auth/components/guard.server.mjs.map +1 -1
- package/dist/modules/auth/components/login-page.client.d.mts +2 -2
- package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/login-page.client.mjs +4 -3
- package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.mjs +4 -3
- package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/update-password-command.d.mts +2 -2
- package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
- package/dist/modules/auth/components/update-password-command.mjs +1 -1
- package/dist/modules/auth/db/schema.d.mts +73 -73
- package/dist/modules/auth/db/schema.d.mts.map +1 -1
- package/dist/modules/auth/handler/{client.client.d.mts → create-client.client.d.mts} +328 -188
- package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -0
- package/dist/modules/auth/handler/create-client.client.mjs +26 -0
- package/dist/modules/auth/handler/create-client.client.mjs.map +1 -0
- package/dist/modules/auth/handler/init.d.mts +116 -130
- package/dist/modules/auth/handler/init.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-auth-client.d.mts +24 -0
- package/dist/modules/auth/hooks/use-auth-client.d.mts.map +1 -0
- package/dist/modules/auth/hooks/use-auth-client.mjs +31 -0
- package/dist/modules/auth/hooks/use-auth-client.mjs.map +1 -0
- package/dist/modules/auth/hooks/use-permission.d.mts +8 -35
- package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.mjs +47 -93
- package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-session.d.mts +5 -119
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-session.mjs +15 -17
- package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
- package/dist/modules/auth/lib/helpers.server.d.mts +2 -2
- package/dist/modules/auth/lib/helpers.server.d.mts.map +1 -1
- package/dist/modules/auth/lib/helpers.server.mjs +1 -1
- package/dist/modules/auth/lib/validators.d.mts +2 -2
- package/dist/modules/auth/lib/validators.d.mts.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +11 -11
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/click-command.client.d.mts +2 -2
- package/dist/modules/commands/components/click-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/command-trigger.client.d.mts +6 -6
- package/dist/modules/commands/components/command-trigger.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
- package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
- package/dist/modules/commands/components/dropdown-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
- package/dist/modules/commands/components/empty-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +12 -12
- package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
- package/dist/modules/commands/hooks/use-command-mutation.client.mjs +1 -1
- package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
- package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/inline-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/responsive-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/archive-command.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
- package/dist/modules/config/db/helpers.d.mts +5 -5
- package/dist/modules/config/db/helpers.d.mts.map +1 -1
- package/dist/modules/config/lib/config.d.mts +1 -1
- package/dist/modules/config/lib/config.mjs.map +1 -1
- package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
- package/dist/modules/data-tables/components/cell/common.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/column-header.d.mts +2 -2
- package/dist/modules/data-tables/components/column-header.d.mts.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
- package/dist/modules/data-tables/components/header.d.mts +4 -4
- package/dist/modules/data-tables/components/header.d.mts.map +1 -1
- package/dist/modules/data-tables/components/layout.d.mts +2 -2
- package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
- package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
- package/dist/modules/data-tables/components/table.d.mts +7 -7
- package/dist/modules/data-tables/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
- package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- package/dist/modules/data-tables/strategies/helpers/sorting.mjs +1 -1
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-time.client.d.mts +21 -0
- package/dist/modules/inline-edit/components/date-time.client.d.mts.map +1 -0
- package/dist/modules/inline-edit/components/date-time.client.mjs +33 -0
- package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -0
- package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +15 -2
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs +2 -6
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
- package/dist/modules/router/handler/init.server.d.mts +6 -6
- package/dist/modules/router/handler/init.server.d.mts.map +1 -1
- package/dist/modules/router/lib/query-client.server.d.mts +2 -2
- package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone-context.client.d.mts +2 -2
- package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +5 -5
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.mjs +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +2 -2
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +1 -1
- package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -1
- package/dist/modules/storage/lib/proxy.server.mjs +1 -1
- package/dist/modules/storage/lib/router.server.d.mts +2359 -2359
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/router.server.mjs +1 -1
- package/dist/modules/storage/lib/schema.d.mts +92 -92
- package/dist/modules/storage/lib/service.server.d.mts +24 -24
- package/dist/modules/storage/lib/service.server.mjs +1 -1
- package/dist/modules/storage/lib/validators.d.mts +90 -90
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/package.json +3 -10
- package/src/components/entry.client.ts +0 -2
- package/src/components/entry.ts +3 -0
- package/src/components/layouts/admin-layout.tsx +1 -3
- package/src/components/navigation/admin-sidebar-header.client.tsx +3 -20
- package/src/components/ui/input-date-time.tsx +58 -0
- package/src/components/ui/input-date.tsx +20 -0
- package/src/components/ui/input-time.tsx +20 -0
- package/src/modules/auth/components/allowed.client.tsx +2 -2
- package/src/modules/auth/components/create-first-user-page.client.tsx +3 -2
- package/src/modules/auth/components/forget-password-page.client.tsx +2 -1
- package/src/modules/auth/components/guard.server.tsx +2 -0
- package/src/modules/auth/components/login-page.client.tsx +2 -1
- package/src/modules/auth/components/reset-password-page.client.tsx +3 -1
- package/src/modules/auth/entry.client.ts +13 -1
- package/src/modules/auth/entry.ts +11 -0
- package/src/modules/auth/handler/create-client.client.ts +53 -0
- package/src/modules/auth/hooks/use-auth-client.tsx +38 -0
- package/src/modules/auth/hooks/use-permission.ts +49 -94
- package/src/modules/auth/hooks/use-session.ts +16 -16
- package/src/modules/commands/hooks/use-command-menu.client.tsx +0 -6
- package/src/modules/config/lib/config.ts +3 -2
- package/src/modules/inline-edit/components/date-time.client.tsx +38 -0
- package/src/modules/inline-edit/entry.client.ts +9 -0
- package/src/modules/inline-edit/entry.server.ts +3 -0
- package/src/modules/inline-edit/entry.ts +3 -0
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
- package/dist/components/ui/time-input.client.d.mts +0 -16
- package/dist/components/ui/time-input.client.d.mts.map +0 -1
- package/dist/components/ui/time-input.client.mjs +0 -53
- package/dist/components/ui/time-input.client.mjs.map +0 -1
- package/dist/components/ui/time-picker-input.client.d.mts +0 -15
- package/dist/components/ui/time-picker-input.client.d.mts.map +0 -1
- package/dist/components/ui/time-picker-input.client.mjs +0 -64
- package/dist/components/ui/time-picker-input.client.mjs.map +0 -1
- package/dist/lib/utils/time-picker.d.mts +0 -6
- package/dist/lib/utils/time-picker.d.mts.map +0 -1
- package/dist/lib/utils/time-picker.mjs +0 -104
- package/dist/lib/utils/time-picker.mjs.map +0 -1
- package/dist/modules/auth/handler/client.client.d.mts.map +0 -1
- package/dist/modules/auth/handler/client.client.mjs +0 -21
- package/dist/modules/auth/handler/client.client.mjs.map +0 -1
- package/src/components/ui/time-input.client.tsx +0 -56
- package/src/components/ui/time-picker-input.client.tsx +0 -107
- package/src/modules/auth/components/guard.client.tsx +0 -12
- 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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U,CAAA,CAAA,GAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCACk4C;6BAAA,cAAA,CAAkD,iBAAA,iBAAA;;;;;;;;;iBAAA,cAAA,CAAA;;;;;;;;;;;;;;;;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 |
|
|
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
|
|
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:
|
|
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
|
-
|
|
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<
|
|
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
|
|
1651
|
-
|
|
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
|
|
1663
|
-
|
|
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
|
|
1711
|
-
createdAt: Date;
|
|
1712
|
-
updatedAt: Date;
|
|
1695
|
+
image?: string | null | undefined;
|
|
1713
1696
|
};
|
|
1714
1697
|
}>;
|
|
1715
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1742
|
+
content: {
|
|
1764
1743
|
"application/json": {
|
|
1765
1744
|
schema: {
|
|
1766
|
-
type:
|
|
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
|
-
|
|
1762
|
+
resetPasswordEmailOTP: better_auth0.StrictEndpoint<"/email-otp/reset-password", {
|
|
1785
1763
|
method: "POST";
|
|
1786
1764
|
body: zod0.ZodObject<{
|
|
1787
1765
|
email: zod0.ZodString;
|
|
1788
|
-
|
|
1789
|
-
|
|
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
|
-
|
|
1776
|
+
contnt: {
|
|
1802
1777
|
"application/json": {
|
|
1803
1778
|
schema: {
|
|
1804
|
-
type:
|
|
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;IAC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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"}
|