@tulip-systems/core 0.5.3 → 0.5.5
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 +3 -3
- package/dist/auth/client.mjs +2 -2
- package/dist/components/client.d.mts +2 -2
- 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/common/status.d.mts.map +1 -1
- 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/extensions/file-handler/utils.mjs +1 -1
- package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -1
- package/dist/components/editor/extensions/image/extension.mjs +0 -1
- package/dist/components/editor/extensions/image/extension.mjs.map +1 -1
- package/dist/components/editor/extensions/skeleton/extension.mjs +1 -1
- package/dist/components/editor/lib/constants.d.mts +29 -29
- package/dist/components/editor/lib/constants.mjs +3 -3
- package/dist/components/editor/lib/extensions.d.mts +3 -3
- package/dist/components/editor/lib/helpers.d.mts.map +1 -1
- package/dist/components/editor/lib/helpers.mjs +38 -3
- package/dist/components/editor/lib/helpers.mjs.map +1 -1
- 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-layout.d.mts +2 -2
- package/dist/components/layouts/admin-layout.d.mts.map +1 -1
- package/dist/components/layouts/admin-loading.d.mts +2 -2
- package/dist/components/layouts/admin-loading.d.mts.map +1 -1
- package/dist/components/layouts/empty-page.d.mts +4 -4
- package/dist/components/layouts/empty-page.d.mts.map +1 -1
- package/dist/components/layouts/error-page.d.mts +23 -0
- package/dist/components/layouts/error-page.d.mts.map +1 -0
- package/dist/components/layouts/error-page.mjs +58 -0
- package/dist/components/layouts/error-page.mjs.map +1 -0
- package/dist/components/layouts/list-layout.d.mts +2 -2
- package/dist/components/layouts/list-layout.d.mts.map +1 -1
- package/dist/components/layouts/not-allowed-page.d.mts +22 -0
- package/dist/components/layouts/not-allowed-page.d.mts.map +1 -0
- package/dist/components/layouts/not-allowed-page.mjs +25 -0
- package/dist/components/layouts/not-allowed-page.mjs.map +1 -0
- package/dist/components/layouts/not-found-page.d.mts +3 -3
- package/dist/components/layouts/not-found-page.d.mts.map +1 -1
- 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-layout.server.d.mts +2 -2
- 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/root-loading.d.mts.map +1 -1
- package/dist/components/layouts/tab-layout.d.mts +2 -2
- package/dist/components/layouts/tab-layout.d.mts.map +1 -1
- package/dist/components/lists/data-list.d.mts +5 -5
- package/dist/components/lists/data-list.d.mts.map +1 -1
- package/dist/components/lists/data-stack.d.mts +8 -8
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts +21 -11
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts.map +1 -1
- package/dist/components/navigation/admin-sidebar-paths.client.mjs +7 -5
- package/dist/components/navigation/admin-sidebar-paths.client.mjs.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 +4 -4
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/button.d.mts +4 -4
- 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/dropdown-menu.d.mts +16 -16
- package/dist/components/ui/form.client.d.mts +7 -7
- package/dist/components/ui/hover-card.client.d.mts +4 -4
- package/dist/components/ui/input-recipient.d.mts +2 -2
- 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/popover.d.mts.map +1 -1
- package/dist/components/ui/progress.client.d.mts +2 -2
- package/dist/components/ui/radio-group.d.mts +3 -3
- package/dist/components/ui/resizable.client.d.mts +4 -4
- package/dist/components/ui/scroll-area.d.mts +3 -3
- package/dist/components/ui/select.client.d.mts +11 -11
- package/dist/components/ui/separator.d.mts +2 -2
- package/dist/components/ui/sheet.client.d.mts +9 -9
- package/dist/components/ui/sidebar.client.d.mts +26 -26
- 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/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/time-input.client.d.mts +2 -2
- package/dist/components/ui/toggle-group.client.d.mts +3 -3
- package/dist/components/ui/toggle.d.mts +2 -2
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components/ui/tooltip.client.d.mts.map +1 -1
- package/dist/components/ui/tooltip.client.mjs +1 -1
- package/dist/components/ui/tooltip.client.mjs.map +1 -1
- package/dist/components.d.mts +3 -1
- package/dist/components.mjs +5 -3
- package/dist/lib/hooks/use-action.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts +2 -2
- package/dist/modules/auth/components/allowed.client.d.mts +21 -7
- package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
- package/dist/modules/auth/components/allowed.client.mjs +8 -2
- 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/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 +1 -0
- 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/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 +2 -2
- package/dist/modules/auth/components/guard.server.d.mts.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/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/update-password-command.d.mts +2 -2
- package/dist/modules/auth/components/update-password-command.d.mts.map +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 +143 -143
- package/dist/modules/auth/handler/client.client.d.mts.map +1 -1
- package/dist/modules/auth/handler/init.d.mts +131 -131
- package/dist/modules/auth/handler/init.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.d.mts +48 -4
- package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.mjs +51 -4
- package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-session.d.mts +4 -4
- package/dist/modules/auth/lib/helpers.server.d.mts +2 -2
- package/dist/modules/auth/lib/helpers.server.mjs +1 -1
- package/dist/modules/auth/lib/validators.d.mts +3 -3
- package/dist/modules/auth/lib/validators.d.mts.map +1 -1
- package/dist/modules/auth/lib/validators.mjs +1 -1
- package/dist/modules/auth/lib/validators.mjs.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +10 -10
- 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 +11 -11
- package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.mjs +0 -5
- 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/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/data-tables/components/cell/common.client.d.mts +5 -5
- package/dist/modules/data-tables/components/column-header.d.mts +2 -2
- 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/layout.d.mts +2 -2
- 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/table.d.mts +7 -7
- package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- 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/inputs/advanced-select.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.mts +3 -3
- package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.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/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/switch.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/lib/variants.d.mts +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/handler/init.server.mjs +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/dropzone.client.mjs +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/lib/create-upload.client.d.mts.map +1 -1
- package/dist/modules/storage/lib/router.server.d.mts +2346 -2346
- 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/schema.d.mts.map +1 -1
- package/dist/modules/storage/lib/schema.mjs +1 -1
- package/dist/modules/storage/lib/service.server.d.mts +21 -21
- package/dist/modules/storage/lib/service.server.mjs +2 -2
- package/dist/modules/storage/lib/validators.d.mts +91 -91
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/dist/router/server.mjs +1 -1
- package/package.json +1 -1
- package/src/components/editor/extensions/file-handler/utils.ts +1 -1
- package/src/components/editor/extensions/image/extension.ts +0 -2
- package/src/components/editor/lib/helpers.ts +39 -3
- package/src/components/entry.ts +2 -0
- package/src/components/layouts/error-page.tsx +61 -0
- package/src/components/layouts/not-allowed-page.tsx +1 -1
- package/src/components/navigation/admin-sidebar-paths.client.tsx +18 -2
- package/src/components/ui/tooltip.client.tsx +1 -1
- package/src/modules/auth/components/allowed.client.tsx +35 -7
- package/src/modules/auth/components/create-first-user-page.client.tsx +4 -0
- package/src/modules/auth/hooks/use-permission.ts +88 -2
- package/src/modules/auth/lib/validators.ts +1 -1
- package/src/modules/commands/hooks/use-command-menu.client.tsx +4 -7
- package/dist/modules/auth/lib/utils.mjs +0 -21
- package/dist/modules/auth/lib/utils.mjs.map +0 -1
- package/src/modules/inline-edit/hooks/use-inline.client copy.tsx +0 -97
|
@@ -6,10 +6,10 @@ import { EmailClient } from "../../config/providers/email.mjs";
|
|
|
6
6
|
import "../../../config/server.mjs";
|
|
7
7
|
import "../../../config.mjs";
|
|
8
8
|
import * as zod0 from "zod";
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
9
|
+
import * as _better_auth_passkey5 from "@better-auth/passkey";
|
|
10
|
+
import * as better_auth_plugins5 from "better-auth/plugins";
|
|
11
|
+
import * as better_auth117 from "better-auth";
|
|
12
|
+
import * as _simplewebauthn_server3 from "@simplewebauthn/server";
|
|
13
13
|
|
|
14
14
|
//#region src/modules/auth/handler/init.d.ts
|
|
15
15
|
declare const authCookiePrefix = "tulip";
|
|
@@ -20,14 +20,14 @@ type InitAuthProps<TSchema extends TDatabaseSchema> = {
|
|
|
20
20
|
ac: ReturnType<typeof createAccessControl>;
|
|
21
21
|
roles: { [key in string]?: Role };
|
|
22
22
|
};
|
|
23
|
-
declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<TSchema>):
|
|
23
|
+
declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<TSchema>): better_auth117.Auth<{
|
|
24
24
|
advanced: {
|
|
25
25
|
cookiePrefix: string;
|
|
26
26
|
database: {
|
|
27
27
|
generateId: () => false;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
database: (options:
|
|
30
|
+
database: (options: better_auth117.BetterAuthOptions) => better_auth117.DBAdapter<better_auth117.BetterAuthOptions>;
|
|
31
31
|
emailAndPassword: {
|
|
32
32
|
enabled: true;
|
|
33
33
|
};
|
|
@@ -49,22 +49,22 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
hooks: {
|
|
52
|
-
after: (inputContext:
|
|
52
|
+
after: (inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<void>;
|
|
53
53
|
};
|
|
54
54
|
plugins: [{
|
|
55
55
|
id: "next-cookies";
|
|
56
56
|
hooks: {
|
|
57
57
|
after: {
|
|
58
|
-
matcher(ctx:
|
|
59
|
-
handler: (inputContext:
|
|
58
|
+
matcher(ctx: better_auth117.HookEndpointContext): true;
|
|
59
|
+
handler: (inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<void>;
|
|
60
60
|
}[];
|
|
61
61
|
};
|
|
62
62
|
}, {
|
|
63
63
|
id: "passkey";
|
|
64
64
|
endpoints: {
|
|
65
|
-
generatePasskeyRegistrationOptions:
|
|
65
|
+
generatePasskeyRegistrationOptions: better_auth117.StrictEndpoint<"/passkey/generate-register-options", {
|
|
66
66
|
method: "GET";
|
|
67
|
-
use: ((inputContext:
|
|
67
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
68
68
|
session: {
|
|
69
69
|
session: Record<string, any> & {
|
|
70
70
|
id: string;
|
|
@@ -93,7 +93,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
93
93
|
"cross-platform": "cross-platform";
|
|
94
94
|
}>>;
|
|
95
95
|
name: zod0.ZodOptional<zod0.ZodString>;
|
|
96
|
-
},
|
|
96
|
+
}, better_auth117.$strip>>;
|
|
97
97
|
metadata: {
|
|
98
98
|
openapi: {
|
|
99
99
|
operationId: string;
|
|
@@ -213,8 +213,8 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
213
213
|
};
|
|
214
214
|
} & {
|
|
215
215
|
use: any[];
|
|
216
|
-
},
|
|
217
|
-
generatePasskeyAuthenticationOptions:
|
|
216
|
+
}, _simplewebauthn_server3.PublicKeyCredentialCreationOptionsJSON>;
|
|
217
|
+
generatePasskeyAuthenticationOptions: better_auth117.StrictEndpoint<"/passkey/generate-authenticate-options", {
|
|
218
218
|
method: "GET";
|
|
219
219
|
metadata: {
|
|
220
220
|
openapi: {
|
|
@@ -309,14 +309,14 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
309
309
|
};
|
|
310
310
|
} & {
|
|
311
311
|
use: any[];
|
|
312
|
-
},
|
|
313
|
-
verifyPasskeyRegistration:
|
|
312
|
+
}, _simplewebauthn_server3.PublicKeyCredentialRequestOptionsJSON>;
|
|
313
|
+
verifyPasskeyRegistration: better_auth117.StrictEndpoint<"/passkey/verify-registration", {
|
|
314
314
|
method: "POST";
|
|
315
315
|
body: zod0.ZodObject<{
|
|
316
316
|
response: zod0.ZodAny;
|
|
317
317
|
name: zod0.ZodOptional<zod0.ZodString>;
|
|
318
|
-
},
|
|
319
|
-
use: ((inputContext:
|
|
318
|
+
}, better_auth117.$strip>;
|
|
319
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
320
320
|
session: {
|
|
321
321
|
session: Record<string, any> & {
|
|
322
322
|
id: string;
|
|
@@ -362,12 +362,12 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
362
362
|
};
|
|
363
363
|
} & {
|
|
364
364
|
use: any[];
|
|
365
|
-
},
|
|
366
|
-
verifyPasskeyAuthentication:
|
|
365
|
+
}, _better_auth_passkey5.Passkey | null>;
|
|
366
|
+
verifyPasskeyAuthentication: better_auth117.StrictEndpoint<"/passkey/verify-authentication", {
|
|
367
367
|
method: "POST";
|
|
368
368
|
body: zod0.ZodObject<{
|
|
369
369
|
response: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
|
|
370
|
-
},
|
|
370
|
+
}, better_auth117.$strip>;
|
|
371
371
|
metadata: {
|
|
372
372
|
openapi: {
|
|
373
373
|
operationId: string;
|
|
@@ -395,7 +395,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
395
395
|
};
|
|
396
396
|
$Infer: {
|
|
397
397
|
body: {
|
|
398
|
-
response:
|
|
398
|
+
response: _simplewebauthn_server3.AuthenticationResponseJSON;
|
|
399
399
|
};
|
|
400
400
|
};
|
|
401
401
|
};
|
|
@@ -413,9 +413,9 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
413
413
|
userAgent?: string | null | undefined;
|
|
414
414
|
};
|
|
415
415
|
}>;
|
|
416
|
-
listPasskeys:
|
|
416
|
+
listPasskeys: better_auth117.StrictEndpoint<"/passkey/list-user-passkeys", {
|
|
417
417
|
method: "GET";
|
|
418
|
-
use: ((inputContext:
|
|
418
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
419
419
|
session: {
|
|
420
420
|
session: Record<string, any> & {
|
|
421
421
|
id: string;
|
|
@@ -462,13 +462,13 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
462
462
|
};
|
|
463
463
|
} & {
|
|
464
464
|
use: any[];
|
|
465
|
-
},
|
|
466
|
-
deletePasskey:
|
|
465
|
+
}, _better_auth_passkey5.Passkey[]>;
|
|
466
|
+
deletePasskey: better_auth117.StrictEndpoint<"/passkey/delete-passkey", {
|
|
467
467
|
method: "POST";
|
|
468
468
|
body: zod0.ZodObject<{
|
|
469
469
|
id: zod0.ZodString;
|
|
470
|
-
},
|
|
471
|
-
use: ((inputContext:
|
|
470
|
+
}, better_auth117.$strip>;
|
|
471
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
472
472
|
session: {
|
|
473
473
|
session: Record<string, any> & {
|
|
474
474
|
id: string;
|
|
@@ -520,13 +520,13 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
520
520
|
}, {
|
|
521
521
|
status: boolean;
|
|
522
522
|
}>;
|
|
523
|
-
updatePasskey:
|
|
523
|
+
updatePasskey: better_auth117.StrictEndpoint<"/passkey/update-passkey", {
|
|
524
524
|
method: "POST";
|
|
525
525
|
body: zod0.ZodObject<{
|
|
526
526
|
id: zod0.ZodString;
|
|
527
527
|
name: zod0.ZodString;
|
|
528
|
-
},
|
|
529
|
-
use: ((inputContext:
|
|
528
|
+
}, better_auth117.$strip>;
|
|
529
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
530
530
|
session: {
|
|
531
531
|
session: Record<string, any> & {
|
|
532
532
|
id: string;
|
|
@@ -575,7 +575,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
575
575
|
} & {
|
|
576
576
|
use: any[];
|
|
577
577
|
}, {
|
|
578
|
-
passkey:
|
|
578
|
+
passkey: _better_auth_passkey5.Passkey;
|
|
579
579
|
}>;
|
|
580
580
|
};
|
|
581
581
|
schema: {
|
|
@@ -679,7 +679,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
679
679
|
token: string;
|
|
680
680
|
ipAddress?: string | null | undefined;
|
|
681
681
|
userAgent?: string | null | undefined;
|
|
682
|
-
} & Record<string, unknown>, ctx:
|
|
682
|
+
} & Record<string, unknown>, ctx: better_auth117.GenericEndpointContext | undefined): Promise<void>;
|
|
683
683
|
};
|
|
684
684
|
};
|
|
685
685
|
};
|
|
@@ -687,22 +687,22 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
687
687
|
};
|
|
688
688
|
hooks: {
|
|
689
689
|
after: {
|
|
690
|
-
matcher(context:
|
|
691
|
-
handler: (inputContext:
|
|
690
|
+
matcher(context: better_auth117.HookEndpointContext): boolean;
|
|
691
|
+
handler: (inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<better_auth_plugins5.SessionWithImpersonatedBy[] | undefined>;
|
|
692
692
|
}[];
|
|
693
693
|
};
|
|
694
694
|
endpoints: {
|
|
695
|
-
setRole:
|
|
695
|
+
setRole: better_auth117.StrictEndpoint<"/admin/set-role", {
|
|
696
696
|
method: "POST";
|
|
697
697
|
body: zod0.ZodObject<{
|
|
698
698
|
userId: zod0.ZodCoercedString<unknown>;
|
|
699
699
|
role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
|
|
700
|
-
},
|
|
700
|
+
}, better_auth117.$strip>;
|
|
701
701
|
requireHeaders: true;
|
|
702
|
-
use: ((inputContext:
|
|
702
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
703
703
|
session: {
|
|
704
|
-
user:
|
|
705
|
-
session:
|
|
704
|
+
user: better_auth_plugins5.UserWithRole;
|
|
705
|
+
session: better_auth117.Session;
|
|
706
706
|
};
|
|
707
707
|
}>)[];
|
|
708
708
|
metadata: {
|
|
@@ -738,17 +738,17 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
738
738
|
} & {
|
|
739
739
|
use: any[];
|
|
740
740
|
}, {
|
|
741
|
-
user:
|
|
741
|
+
user: better_auth_plugins5.UserWithRole;
|
|
742
742
|
}>;
|
|
743
|
-
getUser:
|
|
743
|
+
getUser: better_auth117.StrictEndpoint<"/admin/get-user", {
|
|
744
744
|
method: "GET";
|
|
745
745
|
query: zod0.ZodObject<{
|
|
746
746
|
id: zod0.ZodString;
|
|
747
|
-
},
|
|
748
|
-
use: ((inputContext:
|
|
747
|
+
}, better_auth117.$strip>;
|
|
748
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
749
749
|
session: {
|
|
750
|
-
user:
|
|
751
|
-
session:
|
|
750
|
+
user: better_auth_plugins5.UserWithRole;
|
|
751
|
+
session: better_auth117.Session;
|
|
752
752
|
};
|
|
753
753
|
}>)[];
|
|
754
754
|
metadata: {
|
|
@@ -786,7 +786,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
786
786
|
name: string;
|
|
787
787
|
image?: string | null | undefined;
|
|
788
788
|
}>;
|
|
789
|
-
createUser:
|
|
789
|
+
createUser: better_auth117.StrictEndpoint<"/admin/create-user", {
|
|
790
790
|
method: "POST";
|
|
791
791
|
body: zod0.ZodObject<{
|
|
792
792
|
email: zod0.ZodString;
|
|
@@ -794,7 +794,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
794
794
|
name: zod0.ZodString;
|
|
795
795
|
role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
|
|
796
796
|
data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
797
|
-
},
|
|
797
|
+
}, better_auth117.$strip>;
|
|
798
798
|
metadata: {
|
|
799
799
|
openapi: {
|
|
800
800
|
operationId: string;
|
|
@@ -831,18 +831,18 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
831
831
|
} & {
|
|
832
832
|
use: any[];
|
|
833
833
|
}, {
|
|
834
|
-
user:
|
|
834
|
+
user: better_auth_plugins5.UserWithRole;
|
|
835
835
|
}>;
|
|
836
|
-
adminUpdateUser:
|
|
836
|
+
adminUpdateUser: better_auth117.StrictEndpoint<"/admin/update-user", {
|
|
837
837
|
method: "POST";
|
|
838
838
|
body: zod0.ZodObject<{
|
|
839
839
|
userId: zod0.ZodCoercedString<unknown>;
|
|
840
840
|
data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
|
|
841
|
-
},
|
|
842
|
-
use: ((inputContext:
|
|
841
|
+
}, better_auth117.$strip>;
|
|
842
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
843
843
|
session: {
|
|
844
|
-
user:
|
|
845
|
-
session:
|
|
844
|
+
user: better_auth_plugins5.UserWithRole;
|
|
845
|
+
session: better_auth117.Session;
|
|
846
846
|
};
|
|
847
847
|
}>)[];
|
|
848
848
|
metadata: {
|
|
@@ -871,13 +871,13 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
871
871
|
};
|
|
872
872
|
} & {
|
|
873
873
|
use: any[];
|
|
874
|
-
},
|
|
875
|
-
listUsers:
|
|
874
|
+
}, better_auth_plugins5.UserWithRole>;
|
|
875
|
+
listUsers: better_auth117.StrictEndpoint<"/admin/list-users", {
|
|
876
876
|
method: "GET";
|
|
877
|
-
use: ((inputContext:
|
|
877
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
878
878
|
session: {
|
|
879
|
-
user:
|
|
880
|
-
session:
|
|
879
|
+
user: better_auth_plugins5.UserWithRole;
|
|
880
|
+
session: better_auth117.Session;
|
|
881
881
|
};
|
|
882
882
|
}>)[];
|
|
883
883
|
query: zod0.ZodObject<{
|
|
@@ -909,7 +909,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
909
909
|
gte: "gte";
|
|
910
910
|
contains: "contains";
|
|
911
911
|
}>>;
|
|
912
|
-
},
|
|
912
|
+
}, better_auth117.$strip>;
|
|
913
913
|
metadata: {
|
|
914
914
|
openapi: {
|
|
915
915
|
operationId: string;
|
|
@@ -950,7 +950,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
950
950
|
} & {
|
|
951
951
|
use: any[];
|
|
952
952
|
}, {
|
|
953
|
-
users:
|
|
953
|
+
users: better_auth_plugins5.UserWithRole[];
|
|
954
954
|
total: number;
|
|
955
955
|
limit: number | undefined;
|
|
956
956
|
offset: number | undefined;
|
|
@@ -958,17 +958,17 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
958
958
|
users: never[];
|
|
959
959
|
total: number;
|
|
960
960
|
}>;
|
|
961
|
-
listUserSessions:
|
|
961
|
+
listUserSessions: better_auth117.StrictEndpoint<"/admin/list-user-sessions", {
|
|
962
962
|
method: "POST";
|
|
963
|
-
use: ((inputContext:
|
|
963
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
964
964
|
session: {
|
|
965
|
-
user:
|
|
966
|
-
session:
|
|
965
|
+
user: better_auth_plugins5.UserWithRole;
|
|
966
|
+
session: better_auth117.Session;
|
|
967
967
|
};
|
|
968
968
|
}>)[];
|
|
969
969
|
body: zod0.ZodObject<{
|
|
970
970
|
userId: zod0.ZodCoercedString<unknown>;
|
|
971
|
-
},
|
|
971
|
+
}, better_auth117.$strip>;
|
|
972
972
|
metadata: {
|
|
973
973
|
openapi: {
|
|
974
974
|
operationId: string;
|
|
@@ -999,17 +999,17 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
999
999
|
} & {
|
|
1000
1000
|
use: any[];
|
|
1001
1001
|
}, {
|
|
1002
|
-
sessions:
|
|
1002
|
+
sessions: better_auth_plugins5.SessionWithImpersonatedBy[];
|
|
1003
1003
|
}>;
|
|
1004
|
-
unbanUser:
|
|
1004
|
+
unbanUser: better_auth117.StrictEndpoint<"/admin/unban-user", {
|
|
1005
1005
|
method: "POST";
|
|
1006
1006
|
body: zod0.ZodObject<{
|
|
1007
1007
|
userId: zod0.ZodCoercedString<unknown>;
|
|
1008
|
-
},
|
|
1009
|
-
use: ((inputContext:
|
|
1008
|
+
}, better_auth117.$strip>;
|
|
1009
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
1010
1010
|
session: {
|
|
1011
|
-
user:
|
|
1012
|
-
session:
|
|
1011
|
+
user: better_auth_plugins5.UserWithRole;
|
|
1012
|
+
session: better_auth117.Session;
|
|
1013
1013
|
};
|
|
1014
1014
|
}>)[];
|
|
1015
1015
|
metadata: {
|
|
@@ -1049,17 +1049,17 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1049
1049
|
image?: string | null | undefined;
|
|
1050
1050
|
} & Record<string, any>;
|
|
1051
1051
|
}>;
|
|
1052
|
-
banUser:
|
|
1052
|
+
banUser: better_auth117.StrictEndpoint<"/admin/ban-user", {
|
|
1053
1053
|
method: "POST";
|
|
1054
1054
|
body: zod0.ZodObject<{
|
|
1055
1055
|
userId: zod0.ZodCoercedString<unknown>;
|
|
1056
1056
|
banReason: zod0.ZodOptional<zod0.ZodString>;
|
|
1057
1057
|
banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1058
|
-
},
|
|
1059
|
-
use: ((inputContext:
|
|
1058
|
+
}, better_auth117.$strip>;
|
|
1059
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
1060
1060
|
session: {
|
|
1061
|
-
user:
|
|
1062
|
-
session:
|
|
1061
|
+
user: better_auth_plugins5.UserWithRole;
|
|
1062
|
+
session: better_auth117.Session;
|
|
1063
1063
|
};
|
|
1064
1064
|
}>)[];
|
|
1065
1065
|
metadata: {
|
|
@@ -1099,15 +1099,15 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1099
1099
|
image?: string | null | undefined;
|
|
1100
1100
|
} & Record<string, any>;
|
|
1101
1101
|
}>;
|
|
1102
|
-
impersonateUser:
|
|
1102
|
+
impersonateUser: better_auth117.StrictEndpoint<"/admin/impersonate-user", {
|
|
1103
1103
|
method: "POST";
|
|
1104
1104
|
body: zod0.ZodObject<{
|
|
1105
1105
|
userId: zod0.ZodCoercedString<unknown>;
|
|
1106
|
-
},
|
|
1107
|
-
use: ((inputContext:
|
|
1106
|
+
}, better_auth117.$strip>;
|
|
1107
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
1108
1108
|
session: {
|
|
1109
|
-
user:
|
|
1110
|
-
session:
|
|
1109
|
+
user: better_auth_plugins5.UserWithRole;
|
|
1110
|
+
session: better_auth117.Session;
|
|
1111
1111
|
};
|
|
1112
1112
|
}>)[];
|
|
1113
1113
|
metadata: {
|
|
@@ -1160,24 +1160,24 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1160
1160
|
image?: string | null | undefined;
|
|
1161
1161
|
};
|
|
1162
1162
|
}>;
|
|
1163
|
-
stopImpersonating:
|
|
1163
|
+
stopImpersonating: better_auth117.StrictEndpoint<"/admin/stop-impersonating", {
|
|
1164
1164
|
method: "POST";
|
|
1165
1165
|
requireHeaders: true;
|
|
1166
1166
|
} & {
|
|
1167
1167
|
use: any[];
|
|
1168
1168
|
}, {
|
|
1169
|
-
session:
|
|
1170
|
-
user:
|
|
1169
|
+
session: better_auth117.Session & Record<string, any>;
|
|
1170
|
+
user: better_auth117.User & Record<string, any>;
|
|
1171
1171
|
}>;
|
|
1172
|
-
revokeUserSession:
|
|
1172
|
+
revokeUserSession: better_auth117.StrictEndpoint<"/admin/revoke-user-session", {
|
|
1173
1173
|
method: "POST";
|
|
1174
1174
|
body: zod0.ZodObject<{
|
|
1175
1175
|
sessionToken: zod0.ZodString;
|
|
1176
|
-
},
|
|
1177
|
-
use: ((inputContext:
|
|
1176
|
+
}, better_auth117.$strip>;
|
|
1177
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
1178
1178
|
session: {
|
|
1179
|
-
user:
|
|
1180
|
-
session:
|
|
1179
|
+
user: better_auth_plugins5.UserWithRole;
|
|
1180
|
+
session: better_auth117.Session;
|
|
1181
1181
|
};
|
|
1182
1182
|
}>)[];
|
|
1183
1183
|
metadata: {
|
|
@@ -1209,15 +1209,15 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1209
1209
|
}, {
|
|
1210
1210
|
success: boolean;
|
|
1211
1211
|
}>;
|
|
1212
|
-
revokeUserSessions:
|
|
1212
|
+
revokeUserSessions: better_auth117.StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
1213
1213
|
method: "POST";
|
|
1214
1214
|
body: zod0.ZodObject<{
|
|
1215
1215
|
userId: zod0.ZodCoercedString<unknown>;
|
|
1216
|
-
},
|
|
1217
|
-
use: ((inputContext:
|
|
1216
|
+
}, better_auth117.$strip>;
|
|
1217
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
1218
1218
|
session: {
|
|
1219
|
-
user:
|
|
1220
|
-
session:
|
|
1219
|
+
user: better_auth_plugins5.UserWithRole;
|
|
1220
|
+
session: better_auth117.Session;
|
|
1221
1221
|
};
|
|
1222
1222
|
}>)[];
|
|
1223
1223
|
metadata: {
|
|
@@ -1249,15 +1249,15 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1249
1249
|
}, {
|
|
1250
1250
|
success: boolean;
|
|
1251
1251
|
}>;
|
|
1252
|
-
removeUser:
|
|
1252
|
+
removeUser: better_auth117.StrictEndpoint<"/admin/remove-user", {
|
|
1253
1253
|
method: "POST";
|
|
1254
1254
|
body: zod0.ZodObject<{
|
|
1255
1255
|
userId: zod0.ZodCoercedString<unknown>;
|
|
1256
|
-
},
|
|
1257
|
-
use: ((inputContext:
|
|
1256
|
+
}, better_auth117.$strip>;
|
|
1257
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
1258
1258
|
session: {
|
|
1259
|
-
user:
|
|
1260
|
-
session:
|
|
1259
|
+
user: better_auth_plugins5.UserWithRole;
|
|
1260
|
+
session: better_auth117.Session;
|
|
1261
1261
|
};
|
|
1262
1262
|
}>)[];
|
|
1263
1263
|
metadata: {
|
|
@@ -1289,16 +1289,16 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1289
1289
|
}, {
|
|
1290
1290
|
success: boolean;
|
|
1291
1291
|
}>;
|
|
1292
|
-
setUserPassword:
|
|
1292
|
+
setUserPassword: better_auth117.StrictEndpoint<"/admin/set-user-password", {
|
|
1293
1293
|
method: "POST";
|
|
1294
1294
|
body: zod0.ZodObject<{
|
|
1295
1295
|
newPassword: zod0.ZodString;
|
|
1296
1296
|
userId: zod0.ZodCoercedString<unknown>;
|
|
1297
|
-
},
|
|
1298
|
-
use: ((inputContext:
|
|
1297
|
+
}, better_auth117.$strip>;
|
|
1298
|
+
use: ((inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<{
|
|
1299
1299
|
session: {
|
|
1300
|
-
user:
|
|
1301
|
-
session:
|
|
1300
|
+
user: better_auth_plugins5.UserWithRole;
|
|
1301
|
+
session: better_auth117.Session;
|
|
1302
1302
|
};
|
|
1303
1303
|
}>)[];
|
|
1304
1304
|
metadata: {
|
|
@@ -1330,18 +1330,18 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1330
1330
|
}, {
|
|
1331
1331
|
status: boolean;
|
|
1332
1332
|
}>;
|
|
1333
|
-
userHasPermission:
|
|
1333
|
+
userHasPermission: better_auth117.StrictEndpoint<"/admin/has-permission", {
|
|
1334
1334
|
method: "POST";
|
|
1335
1335
|
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
1336
1336
|
userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
|
|
1337
1337
|
role: zod0.ZodOptional<zod0.ZodString>;
|
|
1338
|
-
},
|
|
1338
|
+
}, better_auth117.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
|
|
1339
1339
|
permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
1340
1340
|
permissions: zod0.ZodUndefined;
|
|
1341
|
-
},
|
|
1341
|
+
}, better_auth117.$strip>, zod0.ZodObject<{
|
|
1342
1342
|
permission: zod0.ZodUndefined;
|
|
1343
1343
|
permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
1344
|
-
},
|
|
1344
|
+
}, better_auth117.$strip>]>>;
|
|
1345
1345
|
metadata: {
|
|
1346
1346
|
openapi: {
|
|
1347
1347
|
description: string;
|
|
@@ -1391,12 +1391,12 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1391
1391
|
$Infer: {
|
|
1392
1392
|
body: ({
|
|
1393
1393
|
permission: {
|
|
1394
|
-
readonly [x: string]:
|
|
1394
|
+
readonly [x: string]: better_auth117.LiteralString[] | undefined;
|
|
1395
1395
|
};
|
|
1396
1396
|
permissions?: never | undefined;
|
|
1397
1397
|
} | {
|
|
1398
1398
|
permissions: {
|
|
1399
|
-
readonly [x: string]:
|
|
1399
|
+
readonly [x: string]: better_auth117.LiteralString[] | undefined;
|
|
1400
1400
|
};
|
|
1401
1401
|
permission?: never | undefined;
|
|
1402
1402
|
}) & {
|
|
@@ -1471,11 +1471,11 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1471
1471
|
options: any;
|
|
1472
1472
|
}, {
|
|
1473
1473
|
id: "email-otp";
|
|
1474
|
-
init(ctx:
|
|
1474
|
+
init(ctx: better_auth117.AuthContext): {
|
|
1475
1475
|
options: {
|
|
1476
1476
|
emailVerification: {
|
|
1477
1477
|
sendVerificationEmail(data: {
|
|
1478
|
-
user:
|
|
1478
|
+
user: better_auth117.User;
|
|
1479
1479
|
url: string;
|
|
1480
1480
|
token: string;
|
|
1481
1481
|
}, request: Request | undefined): Promise<void>;
|
|
@@ -1483,7 +1483,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1483
1483
|
};
|
|
1484
1484
|
} | undefined;
|
|
1485
1485
|
endpoints: {
|
|
1486
|
-
createVerificationOTP:
|
|
1486
|
+
createVerificationOTP: better_auth117.StrictEndpoint<"/email-otp/create-verification-otp", {
|
|
1487
1487
|
method: "POST";
|
|
1488
1488
|
body: zod0.ZodObject<{
|
|
1489
1489
|
email: zod0.ZodString;
|
|
@@ -1492,7 +1492,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1492
1492
|
"email-verification": "email-verification";
|
|
1493
1493
|
"forget-password": "forget-password";
|
|
1494
1494
|
}>;
|
|
1495
|
-
},
|
|
1495
|
+
}, better_auth117.$strip>;
|
|
1496
1496
|
metadata: {
|
|
1497
1497
|
SERVER_ONLY: true;
|
|
1498
1498
|
openapi: {
|
|
@@ -1515,7 +1515,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1515
1515
|
} & {
|
|
1516
1516
|
use: any[];
|
|
1517
1517
|
}, string>;
|
|
1518
|
-
getVerificationOTP:
|
|
1518
|
+
getVerificationOTP: better_auth117.StrictEndpoint<"/email-otp/get-verification-otp", {
|
|
1519
1519
|
method: "GET";
|
|
1520
1520
|
query: zod0.ZodObject<{
|
|
1521
1521
|
email: zod0.ZodString;
|
|
@@ -1524,7 +1524,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1524
1524
|
"email-verification": "email-verification";
|
|
1525
1525
|
"forget-password": "forget-password";
|
|
1526
1526
|
}>;
|
|
1527
|
-
},
|
|
1527
|
+
}, better_auth117.$strip>;
|
|
1528
1528
|
metadata: {
|
|
1529
1529
|
SERVER_ONLY: true;
|
|
1530
1530
|
openapi: {
|
|
@@ -1559,7 +1559,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1559
1559
|
} | {
|
|
1560
1560
|
otp: string;
|
|
1561
1561
|
}>;
|
|
1562
|
-
checkVerificationOTP:
|
|
1562
|
+
checkVerificationOTP: better_auth117.StrictEndpoint<"/email-otp/check-verification-otp", {
|
|
1563
1563
|
method: "POST";
|
|
1564
1564
|
body: zod0.ZodObject<{
|
|
1565
1565
|
email: zod0.ZodString;
|
|
@@ -1569,7 +1569,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1569
1569
|
"forget-password": "forget-password";
|
|
1570
1570
|
}>;
|
|
1571
1571
|
otp: zod0.ZodString;
|
|
1572
|
-
},
|
|
1572
|
+
}, better_auth117.$strip>;
|
|
1573
1573
|
metadata: {
|
|
1574
1574
|
openapi: {
|
|
1575
1575
|
operationId: string;
|
|
@@ -1598,12 +1598,12 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1598
1598
|
}, {
|
|
1599
1599
|
success: boolean;
|
|
1600
1600
|
}>;
|
|
1601
|
-
verifyEmailOTP:
|
|
1601
|
+
verifyEmailOTP: better_auth117.StrictEndpoint<"/email-otp/verify-email", {
|
|
1602
1602
|
method: "POST";
|
|
1603
1603
|
body: zod0.ZodObject<{
|
|
1604
1604
|
email: zod0.ZodString;
|
|
1605
1605
|
otp: zod0.ZodString;
|
|
1606
|
-
},
|
|
1606
|
+
}, better_auth117.$strip>;
|
|
1607
1607
|
metadata: {
|
|
1608
1608
|
openapi: {
|
|
1609
1609
|
description: string;
|
|
@@ -1664,12 +1664,12 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1664
1664
|
updatedAt: Date;
|
|
1665
1665
|
};
|
|
1666
1666
|
}>;
|
|
1667
|
-
signInEmailOTP:
|
|
1667
|
+
signInEmailOTP: better_auth117.StrictEndpoint<"/sign-in/email-otp", {
|
|
1668
1668
|
method: "POST";
|
|
1669
1669
|
body: zod0.ZodObject<{
|
|
1670
1670
|
email: zod0.ZodString;
|
|
1671
1671
|
otp: zod0.ZodString;
|
|
1672
|
-
},
|
|
1672
|
+
}, better_auth117.$strip>;
|
|
1673
1673
|
metadata: {
|
|
1674
1674
|
openapi: {
|
|
1675
1675
|
operationId: string;
|
|
@@ -1712,11 +1712,11 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1712
1712
|
updatedAt: Date;
|
|
1713
1713
|
};
|
|
1714
1714
|
}>;
|
|
1715
|
-
forgetPasswordEmailOTP:
|
|
1715
|
+
forgetPasswordEmailOTP: better_auth117.StrictEndpoint<"/forget-password/email-otp", {
|
|
1716
1716
|
method: "POST";
|
|
1717
1717
|
body: zod0.ZodObject<{
|
|
1718
1718
|
email: zod0.ZodString;
|
|
1719
|
-
},
|
|
1719
|
+
}, better_auth117.$strip>;
|
|
1720
1720
|
metadata: {
|
|
1721
1721
|
openapi: {
|
|
1722
1722
|
operationId: string;
|
|
@@ -1746,13 +1746,13 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1746
1746
|
}, {
|
|
1747
1747
|
success: boolean;
|
|
1748
1748
|
}>;
|
|
1749
|
-
resetPasswordEmailOTP:
|
|
1749
|
+
resetPasswordEmailOTP: better_auth117.StrictEndpoint<"/email-otp/reset-password", {
|
|
1750
1750
|
method: "POST";
|
|
1751
1751
|
body: zod0.ZodObject<{
|
|
1752
1752
|
email: zod0.ZodString;
|
|
1753
1753
|
otp: zod0.ZodString;
|
|
1754
1754
|
password: zod0.ZodString;
|
|
1755
|
-
},
|
|
1755
|
+
}, better_auth117.$strip>;
|
|
1756
1756
|
metadata: {
|
|
1757
1757
|
openapi: {
|
|
1758
1758
|
operationId: string;
|
|
@@ -1781,7 +1781,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1781
1781
|
}, {
|
|
1782
1782
|
success: boolean;
|
|
1783
1783
|
}>;
|
|
1784
|
-
sendVerificationOTP:
|
|
1784
|
+
sendVerificationOTP: better_auth117.StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
1785
1785
|
method: "POST";
|
|
1786
1786
|
body: zod0.ZodObject<{
|
|
1787
1787
|
email: zod0.ZodString;
|
|
@@ -1790,7 +1790,7 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1790
1790
|
"email-verification": "email-verification";
|
|
1791
1791
|
"forget-password": "forget-password";
|
|
1792
1792
|
}>;
|
|
1793
|
-
},
|
|
1793
|
+
}, better_auth117.$strip>;
|
|
1794
1794
|
metadata: {
|
|
1795
1795
|
openapi: {
|
|
1796
1796
|
operationId: string;
|
|
@@ -1822,8 +1822,8 @@ declare function initAuth<TSchema extends TDatabaseSchema>(props: InitAuthProps<
|
|
|
1822
1822
|
};
|
|
1823
1823
|
hooks: {
|
|
1824
1824
|
after: {
|
|
1825
|
-
matcher(context:
|
|
1826
|
-
handler: (inputContext:
|
|
1825
|
+
matcher(context: better_auth117.HookEndpointContext): boolean;
|
|
1826
|
+
handler: (inputContext: better_auth117.MiddlewareInputContext<better_auth117.MiddlewareOptions>) => Promise<void>;
|
|
1827
1827
|
}[];
|
|
1828
1828
|
};
|
|
1829
1829
|
$ERROR_CODES: {
|