@tulip-systems/core 0.5.13 → 0.5.15
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.mjs +2 -2
- package/dist/components/common/icons.d.mts +52 -52
- 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/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/header/back-button.client.d.mts +2 -2
- package/dist/components/header/bottom-bar.client.d.mts +3 -3
- package/dist/components/header/breadcrumbs.client.d.mts +7 -7
- package/dist/components/header/header.client.d.mts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
- package/dist/components/header/top-bar.client.d.mts +4 -4
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- 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.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-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/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/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/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/checkbox.d.mts +2 -2
- package/dist/components/ui/collapsible.client.d.mts +4 -4
- package/dist/components/ui/color-picker.client.d.mts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
- package/dist/components/ui/combobox.client.d.mts +2 -2
- 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/dialog.client.d.mts +11 -11
- 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/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/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/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 +4 -4
- package/dist/components/ui/toggle.d.mts.map +1 -1
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components.mjs +2 -2
- package/dist/lib/client.mjs +1 -1
- 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 +2 -2
- 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/create-first-user-page.client.d.mts +2 -2
- 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.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.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.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.mjs +1 -1
- package/dist/modules/auth/handler/{client.client.d.mts → create-client.client.d.mts} +288 -168
- 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 +133 -133
- 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.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/click-command.client.d.mts +2 -2
- package/dist/modules/commands/components/command-trigger.client.d.mts +4 -4
- package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
- package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
- package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +12 -12
- package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
- 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/dropdown-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
- package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
- 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/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/search-input.client.d.mts +2 -2
- 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/editor.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
- 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/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.mjs +2 -6
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +4 -4
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- 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.mjs +1 -2
- package/dist/modules/storage/components/upload-zone.client.mjs.map +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 +2354 -2324
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/router.server.mjs +2 -3
- package/dist/modules/storage/lib/router.server.mjs.map +1 -1
- package/dist/modules/storage/lib/service.server.d.mts +18 -18
- package/dist/modules/storage/lib/validators.d.mts +90 -90
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/package.json +1 -1
- package/src/components/layouts/admin-layout.tsx +1 -3
- package/src/components/navigation/admin-sidebar-header.client.tsx +3 -20
- 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/hooks/use-inline.client.tsx +1 -1
- package/src/modules/storage/components/upload-zone.client.tsx +0 -2
- package/src/modules/storage/lib/router.server.ts +5 -4
- 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/modules/auth/components/guard.client.tsx +0 -12
- package/src/modules/auth/handler/client.client.ts +0 -16
|
@@ -1,67 +1,83 @@
|
|
|
1
|
+
import "client-only";
|
|
1
2
|
import * as better_auth_react0 from "better-auth/react";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
3
|
+
import * as _better_auth_passkey2 from "@better-auth/passkey";
|
|
4
|
+
import * as better_auth_plugins18 from "better-auth/plugins";
|
|
5
|
+
import { AccessControl, Role } from "better-auth/plugins";
|
|
6
|
+
import * as better_auth126 from "better-auth";
|
|
7
|
+
import * as _simplewebauthn_server2 from "@simplewebauthn/server";
|
|
6
8
|
|
|
7
|
-
//#region src/modules/auth/handler/client.client.d.ts
|
|
8
|
-
|
|
9
|
+
//#region src/modules/auth/handler/create-client.client.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Create auth client
|
|
12
|
+
*/
|
|
13
|
+
type CreateAuthClientProps<TAccessControl extends AccessControl, TRoles extends { [key in string]: Role }> = {
|
|
14
|
+
/**
|
|
15
|
+
* Base URL for the auth client
|
|
16
|
+
*/
|
|
17
|
+
baseURL?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Access control instance
|
|
20
|
+
*/
|
|
21
|
+
ac: TAccessControl;
|
|
22
|
+
roles: TRoles;
|
|
23
|
+
};
|
|
24
|
+
declare function createAuthClient$1<TAccessControl extends AccessControl, TRoles extends { [key in string]: Role }>(props: CreateAuthClientProps<TAccessControl, TRoles>): {
|
|
9
25
|
useListPasskeys: () => {
|
|
10
|
-
data:
|
|
26
|
+
data: _better_auth_passkey2.Passkey[] | null;
|
|
11
27
|
error: null | better_auth_react0.BetterFetchError;
|
|
12
28
|
isPending: boolean;
|
|
13
29
|
isRefetching: boolean;
|
|
14
30
|
refetch: (queryParams?: {
|
|
15
|
-
query?:
|
|
31
|
+
query?: better_auth126.SessionQueryParams;
|
|
16
32
|
} | undefined) => Promise<void>;
|
|
17
33
|
};
|
|
18
34
|
} & {
|
|
19
35
|
passkey: {
|
|
20
|
-
generateRegisterOptions: <FetchOptions extends
|
|
36
|
+
generateRegisterOptions: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<{
|
|
21
37
|
authenticatorAttachment?: "platform" | "cross-platform" | undefined;
|
|
22
38
|
name?: string | undefined;
|
|
23
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
39
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
24
40
|
query?: {
|
|
25
41
|
authenticatorAttachment?: "platform" | "cross-platform" | undefined;
|
|
26
42
|
name?: string | undefined;
|
|
27
43
|
} | undefined;
|
|
28
44
|
fetchOptions?: FetchOptions | undefined;
|
|
29
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<
|
|
45
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<_simplewebauthn_server2.PublicKeyCredentialCreationOptionsJSON, {
|
|
30
46
|
code?: string | undefined;
|
|
31
47
|
message?: string | undefined;
|
|
32
48
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
33
49
|
};
|
|
34
50
|
} & {
|
|
35
51
|
passkey: {
|
|
36
|
-
generateAuthenticateOptions: <FetchOptions extends
|
|
52
|
+
generateAuthenticateOptions: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
37
53
|
query?: Record<string, any> | undefined;
|
|
38
54
|
fetchOptions?: FetchOptions | undefined;
|
|
39
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<
|
|
55
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<_simplewebauthn_server2.PublicKeyCredentialRequestOptionsJSON, {
|
|
40
56
|
code?: string | undefined;
|
|
41
57
|
message?: string | undefined;
|
|
42
58
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
43
59
|
};
|
|
44
60
|
} & {
|
|
45
61
|
passkey: {
|
|
46
|
-
verifyRegistration: <FetchOptions extends
|
|
62
|
+
verifyRegistration: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
47
63
|
response: any;
|
|
48
64
|
name?: string | undefined;
|
|
49
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
65
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
50
66
|
response: any;
|
|
51
67
|
name?: string | undefined;
|
|
52
68
|
} & {
|
|
53
69
|
fetchOptions?: FetchOptions | undefined;
|
|
54
|
-
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<
|
|
70
|
+
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<_better_auth_passkey2.Passkey, {
|
|
55
71
|
code?: string | undefined;
|
|
56
72
|
message?: string | undefined;
|
|
57
73
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
58
74
|
};
|
|
59
75
|
} & {
|
|
60
76
|
passkey: {
|
|
61
|
-
verifyAuthentication: <FetchOptions extends
|
|
62
|
-
response:
|
|
63
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
64
|
-
response:
|
|
77
|
+
verifyAuthentication: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
78
|
+
response: _simplewebauthn_server2.AuthenticationResponseJSON;
|
|
79
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
80
|
+
response: _simplewebauthn_server2.AuthenticationResponseJSON;
|
|
65
81
|
} & {
|
|
66
82
|
fetchOptions?: FetchOptions | undefined;
|
|
67
83
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
@@ -82,19 +98,19 @@ declare const authClient: {
|
|
|
82
98
|
};
|
|
83
99
|
} & {
|
|
84
100
|
passkey: {
|
|
85
|
-
listUserPasskeys: <FetchOptions extends
|
|
101
|
+
listUserPasskeys: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
86
102
|
query?: Record<string, any> | undefined;
|
|
87
103
|
fetchOptions?: FetchOptions | undefined;
|
|
88
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<
|
|
104
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<_better_auth_passkey2.Passkey[], {
|
|
89
105
|
code?: string | undefined;
|
|
90
106
|
message?: string | undefined;
|
|
91
107
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
92
108
|
};
|
|
93
109
|
} & {
|
|
94
110
|
passkey: {
|
|
95
|
-
deletePasskey: <FetchOptions extends
|
|
111
|
+
deletePasskey: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
96
112
|
id: string;
|
|
97
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
113
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
98
114
|
id: string;
|
|
99
115
|
} & {
|
|
100
116
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -107,16 +123,16 @@ declare const authClient: {
|
|
|
107
123
|
};
|
|
108
124
|
} & {
|
|
109
125
|
passkey: {
|
|
110
|
-
updatePasskey: <FetchOptions extends
|
|
126
|
+
updatePasskey: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
111
127
|
id: string;
|
|
112
128
|
name: string;
|
|
113
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
129
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
114
130
|
id: string;
|
|
115
131
|
name: string;
|
|
116
132
|
} & {
|
|
117
133
|
fetchOptions?: FetchOptions | undefined;
|
|
118
134
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
119
|
-
passkey:
|
|
135
|
+
passkey: _better_auth_passkey2.Passkey;
|
|
120
136
|
}, {
|
|
121
137
|
code?: string | undefined;
|
|
122
138
|
message?: string | undefined;
|
|
@@ -124,9 +140,9 @@ declare const authClient: {
|
|
|
124
140
|
};
|
|
125
141
|
} & {
|
|
126
142
|
admin: {
|
|
127
|
-
getUser: <FetchOptions extends
|
|
143
|
+
getUser: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<{
|
|
128
144
|
id: string;
|
|
129
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
145
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
130
146
|
query: {
|
|
131
147
|
id: string;
|
|
132
148
|
};
|
|
@@ -146,24 +162,24 @@ declare const authClient: {
|
|
|
146
162
|
};
|
|
147
163
|
} & {
|
|
148
164
|
admin: {
|
|
149
|
-
updateUser: <FetchOptions extends
|
|
165
|
+
updateUser: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
150
166
|
userId: unknown;
|
|
151
167
|
data: Record<any, any>;
|
|
152
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
168
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
153
169
|
userId: unknown;
|
|
154
170
|
data: Record<any, any>;
|
|
155
171
|
} & {
|
|
156
172
|
fetchOptions?: FetchOptions | undefined;
|
|
157
|
-
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<
|
|
173
|
+
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<better_auth_plugins18.UserWithRole, {
|
|
158
174
|
code?: string | undefined;
|
|
159
175
|
message?: string | undefined;
|
|
160
176
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
161
177
|
};
|
|
162
178
|
} & {
|
|
163
179
|
admin: {
|
|
164
|
-
listUsers: <FetchOptions extends
|
|
180
|
+
listUsers: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<{
|
|
165
181
|
searchValue?: string | undefined;
|
|
166
|
-
searchField?: "
|
|
182
|
+
searchField?: "email" | "name" | undefined;
|
|
167
183
|
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
168
184
|
limit?: string | number | undefined;
|
|
169
185
|
offset?: string | number | undefined;
|
|
@@ -172,10 +188,10 @@ declare const authClient: {
|
|
|
172
188
|
filterField?: string | undefined;
|
|
173
189
|
filterValue?: string | number | boolean | undefined;
|
|
174
190
|
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
175
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
191
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
176
192
|
query: {
|
|
177
193
|
searchValue?: string | undefined;
|
|
178
|
-
searchField?: "
|
|
194
|
+
searchField?: "email" | "name" | undefined;
|
|
179
195
|
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
180
196
|
limit?: string | number | undefined;
|
|
181
197
|
offset?: string | number | undefined;
|
|
@@ -187,7 +203,7 @@ declare const authClient: {
|
|
|
187
203
|
};
|
|
188
204
|
fetchOptions?: FetchOptions | undefined;
|
|
189
205
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<{
|
|
190
|
-
users:
|
|
206
|
+
users: better_auth_plugins18.UserWithRole[];
|
|
191
207
|
total: number;
|
|
192
208
|
limit: number | undefined;
|
|
193
209
|
offset: number | undefined;
|
|
@@ -201,14 +217,14 @@ declare const authClient: {
|
|
|
201
217
|
};
|
|
202
218
|
} & {
|
|
203
219
|
admin: {
|
|
204
|
-
listUserSessions: <FetchOptions extends
|
|
220
|
+
listUserSessions: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
205
221
|
userId: unknown;
|
|
206
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
222
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
207
223
|
userId: unknown;
|
|
208
224
|
} & {
|
|
209
225
|
fetchOptions?: FetchOptions | undefined;
|
|
210
226
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
211
|
-
sessions:
|
|
227
|
+
sessions: better_auth_plugins18.SessionWithImpersonatedBy[];
|
|
212
228
|
}, {
|
|
213
229
|
code?: string | undefined;
|
|
214
230
|
message?: string | undefined;
|
|
@@ -216,9 +232,9 @@ declare const authClient: {
|
|
|
216
232
|
};
|
|
217
233
|
} & {
|
|
218
234
|
admin: {
|
|
219
|
-
unbanUser: <FetchOptions extends
|
|
235
|
+
unbanUser: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
220
236
|
userId: unknown;
|
|
221
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
237
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
222
238
|
userId: unknown;
|
|
223
239
|
} & {
|
|
224
240
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -239,11 +255,11 @@ declare const authClient: {
|
|
|
239
255
|
};
|
|
240
256
|
} & {
|
|
241
257
|
admin: {
|
|
242
|
-
banUser: <FetchOptions extends
|
|
258
|
+
banUser: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
243
259
|
userId: unknown;
|
|
244
260
|
banReason?: string | undefined;
|
|
245
261
|
banExpiresIn?: number | undefined;
|
|
246
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
262
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
247
263
|
userId: unknown;
|
|
248
264
|
banReason?: string | undefined;
|
|
249
265
|
banExpiresIn?: number | undefined;
|
|
@@ -266,9 +282,9 @@ declare const authClient: {
|
|
|
266
282
|
};
|
|
267
283
|
} & {
|
|
268
284
|
admin: {
|
|
269
|
-
impersonateUser: <FetchOptions extends
|
|
285
|
+
impersonateUser: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
270
286
|
userId: unknown;
|
|
271
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
287
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
272
288
|
userId: unknown;
|
|
273
289
|
} & {
|
|
274
290
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -299,12 +315,12 @@ declare const authClient: {
|
|
|
299
315
|
};
|
|
300
316
|
} & {
|
|
301
317
|
admin: {
|
|
302
|
-
stopImpersonating: <FetchOptions extends
|
|
318
|
+
stopImpersonating: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
303
319
|
query?: Record<string, any> | undefined;
|
|
304
320
|
fetchOptions?: FetchOptions | undefined;
|
|
305
321
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
306
|
-
session:
|
|
307
|
-
user:
|
|
322
|
+
session: better_auth126.Session & Record<string, any>;
|
|
323
|
+
user: better_auth126.User & Record<string, any>;
|
|
308
324
|
}, {
|
|
309
325
|
code?: string | undefined;
|
|
310
326
|
message?: string | undefined;
|
|
@@ -312,9 +328,9 @@ declare const authClient: {
|
|
|
312
328
|
};
|
|
313
329
|
} & {
|
|
314
330
|
admin: {
|
|
315
|
-
revokeUserSession: <FetchOptions extends
|
|
331
|
+
revokeUserSession: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
316
332
|
sessionToken: string;
|
|
317
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
333
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
318
334
|
sessionToken: string;
|
|
319
335
|
} & {
|
|
320
336
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -327,9 +343,9 @@ declare const authClient: {
|
|
|
327
343
|
};
|
|
328
344
|
} & {
|
|
329
345
|
admin: {
|
|
330
|
-
revokeUserSessions: <FetchOptions extends
|
|
346
|
+
revokeUserSessions: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
331
347
|
userId: unknown;
|
|
332
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
348
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
333
349
|
userId: unknown;
|
|
334
350
|
} & {
|
|
335
351
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -342,9 +358,9 @@ declare const authClient: {
|
|
|
342
358
|
};
|
|
343
359
|
} & {
|
|
344
360
|
admin: {
|
|
345
|
-
removeUser: <FetchOptions extends
|
|
361
|
+
removeUser: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
346
362
|
userId: unknown;
|
|
347
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
363
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
348
364
|
userId: unknown;
|
|
349
365
|
} & {
|
|
350
366
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -357,10 +373,10 @@ declare const authClient: {
|
|
|
357
373
|
};
|
|
358
374
|
} & {
|
|
359
375
|
admin: {
|
|
360
|
-
setUserPassword: <FetchOptions extends
|
|
376
|
+
setUserPassword: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
361
377
|
newPassword: string;
|
|
362
378
|
userId: unknown;
|
|
363
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
379
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
364
380
|
newPassword: string;
|
|
365
381
|
userId: unknown;
|
|
366
382
|
} & {
|
|
@@ -374,11 +390,11 @@ declare const authClient: {
|
|
|
374
390
|
};
|
|
375
391
|
} & {
|
|
376
392
|
emailOtp: {
|
|
377
|
-
checkVerificationOtp: <FetchOptions extends
|
|
393
|
+
checkVerificationOtp: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
378
394
|
email: string;
|
|
379
395
|
type: "sign-in" | "email-verification" | "forget-password";
|
|
380
396
|
otp: string;
|
|
381
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
397
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
382
398
|
email: string;
|
|
383
399
|
type: "sign-in" | "email-verification" | "forget-password";
|
|
384
400
|
otp: string;
|
|
@@ -393,10 +409,10 @@ declare const authClient: {
|
|
|
393
409
|
};
|
|
394
410
|
} & {
|
|
395
411
|
emailOtp: {
|
|
396
|
-
verifyEmail: <FetchOptions extends
|
|
412
|
+
verifyEmail: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
397
413
|
email: string;
|
|
398
414
|
otp: string;
|
|
399
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
415
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
400
416
|
email: string;
|
|
401
417
|
otp: string;
|
|
402
418
|
} & {
|
|
@@ -432,10 +448,10 @@ declare const authClient: {
|
|
|
432
448
|
};
|
|
433
449
|
} & {
|
|
434
450
|
signIn: {
|
|
435
|
-
emailOtp: <FetchOptions extends
|
|
451
|
+
emailOtp: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
436
452
|
email: string;
|
|
437
453
|
otp: string;
|
|
438
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
454
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
439
455
|
email: string;
|
|
440
456
|
otp: string;
|
|
441
457
|
} & {
|
|
@@ -458,9 +474,9 @@ declare const authClient: {
|
|
|
458
474
|
};
|
|
459
475
|
} & {
|
|
460
476
|
forgetPassword: {
|
|
461
|
-
emailOtp: <FetchOptions extends
|
|
477
|
+
emailOtp: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
462
478
|
email: string;
|
|
463
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
479
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
464
480
|
email: string;
|
|
465
481
|
} & {
|
|
466
482
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -473,11 +489,11 @@ declare const authClient: {
|
|
|
473
489
|
};
|
|
474
490
|
} & {
|
|
475
491
|
emailOtp: {
|
|
476
|
-
resetPassword: <FetchOptions extends
|
|
492
|
+
resetPassword: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
477
493
|
email: string;
|
|
478
494
|
otp: string;
|
|
479
495
|
password: string;
|
|
480
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
496
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
481
497
|
email: string;
|
|
482
498
|
otp: string;
|
|
483
499
|
password: string;
|
|
@@ -492,10 +508,10 @@ declare const authClient: {
|
|
|
492
508
|
};
|
|
493
509
|
} & {
|
|
494
510
|
emailOtp: {
|
|
495
|
-
sendVerificationOtp: <FetchOptions extends
|
|
511
|
+
sendVerificationOtp: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
496
512
|
email: string;
|
|
497
513
|
type: "sign-in" | "email-verification" | "forget-password";
|
|
498
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
514
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
499
515
|
email: string;
|
|
500
516
|
type: "sign-in" | "email-verification" | "forget-password";
|
|
501
517
|
} & {
|
|
@@ -508,7 +524,7 @@ declare const authClient: {
|
|
|
508
524
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
509
525
|
};
|
|
510
526
|
} & {
|
|
511
|
-
signOut: <FetchOptions extends
|
|
527
|
+
signOut: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
512
528
|
query?: Record<string, any> | undefined;
|
|
513
529
|
fetchOptions?: FetchOptions | undefined;
|
|
514
530
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
@@ -518,12 +534,12 @@ declare const authClient: {
|
|
|
518
534
|
message?: string | undefined;
|
|
519
535
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
520
536
|
} & {
|
|
521
|
-
resetPassword: <FetchOptions extends
|
|
537
|
+
resetPassword: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
522
538
|
newPassword: string;
|
|
523
539
|
token?: string | undefined;
|
|
524
540
|
}> & Record<string, any>, Partial<{
|
|
525
541
|
token?: string | undefined;
|
|
526
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
542
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
527
543
|
newPassword: string;
|
|
528
544
|
token?: string | undefined;
|
|
529
545
|
} & {
|
|
@@ -535,10 +551,10 @@ declare const authClient: {
|
|
|
535
551
|
message?: string | undefined;
|
|
536
552
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
537
553
|
} & {
|
|
538
|
-
verifyEmail: <FetchOptions extends
|
|
554
|
+
verifyEmail: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<{
|
|
539
555
|
token: string;
|
|
540
556
|
callbackURL?: string | undefined;
|
|
541
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
557
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
542
558
|
query: {
|
|
543
559
|
token: string;
|
|
544
560
|
callbackURL?: string | undefined;
|
|
@@ -551,10 +567,10 @@ declare const authClient: {
|
|
|
551
567
|
message?: string | undefined;
|
|
552
568
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
553
569
|
} & {
|
|
554
|
-
sendVerificationEmail: <FetchOptions extends
|
|
570
|
+
sendVerificationEmail: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
555
571
|
email: string;
|
|
556
572
|
callbackURL?: string | undefined;
|
|
557
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
573
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
558
574
|
email: string;
|
|
559
575
|
callbackURL?: string | undefined;
|
|
560
576
|
} & {
|
|
@@ -566,10 +582,10 @@ declare const authClient: {
|
|
|
566
582
|
message?: string | undefined;
|
|
567
583
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
568
584
|
} & {
|
|
569
|
-
changeEmail: <FetchOptions extends
|
|
585
|
+
changeEmail: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
570
586
|
newEmail: string;
|
|
571
587
|
callbackURL?: string | undefined;
|
|
572
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
588
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
573
589
|
newEmail: string;
|
|
574
590
|
callbackURL?: string | undefined;
|
|
575
591
|
} & {
|
|
@@ -581,11 +597,11 @@ declare const authClient: {
|
|
|
581
597
|
message?: string | undefined;
|
|
582
598
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
583
599
|
} & {
|
|
584
|
-
changePassword: <FetchOptions extends
|
|
600
|
+
changePassword: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
585
601
|
newPassword: string;
|
|
586
602
|
currentPassword: string;
|
|
587
603
|
revokeOtherSessions?: boolean | undefined;
|
|
588
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
604
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
589
605
|
newPassword: string;
|
|
590
606
|
currentPassword: string;
|
|
591
607
|
revokeOtherSessions?: boolean | undefined;
|
|
@@ -607,11 +623,11 @@ declare const authClient: {
|
|
|
607
623
|
message?: string | undefined;
|
|
608
624
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
609
625
|
} & {
|
|
610
|
-
deleteUser: <FetchOptions extends
|
|
626
|
+
deleteUser: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
611
627
|
callbackURL?: string | undefined;
|
|
612
628
|
password?: string | undefined;
|
|
613
629
|
token?: string | undefined;
|
|
614
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
630
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
615
631
|
callbackURL?: string | undefined;
|
|
616
632
|
password?: string | undefined;
|
|
617
633
|
token?: string | undefined;
|
|
@@ -625,10 +641,10 @@ declare const authClient: {
|
|
|
625
641
|
message?: string | undefined;
|
|
626
642
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
627
643
|
} & {
|
|
628
|
-
requestPasswordReset: <FetchOptions extends
|
|
644
|
+
requestPasswordReset: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
629
645
|
email: string;
|
|
630
646
|
redirectTo?: string | undefined;
|
|
631
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
647
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
632
648
|
email: string;
|
|
633
649
|
redirectTo?: string | undefined;
|
|
634
650
|
} & {
|
|
@@ -642,11 +658,11 @@ declare const authClient: {
|
|
|
642
658
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
643
659
|
} & {
|
|
644
660
|
resetPassword: {
|
|
645
|
-
":token": <FetchOptions extends
|
|
661
|
+
":token": <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<{
|
|
646
662
|
callbackURL: string;
|
|
647
663
|
}> & Record<string, any>, {
|
|
648
664
|
token: string;
|
|
649
|
-
}>>(data_0:
|
|
665
|
+
}>>(data_0: better_auth126.Prettify<{
|
|
650
666
|
query: {
|
|
651
667
|
callbackURL: string;
|
|
652
668
|
};
|
|
@@ -657,9 +673,9 @@ declare const authClient: {
|
|
|
657
673
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
658
674
|
};
|
|
659
675
|
} & {
|
|
660
|
-
revokeSession: <FetchOptions extends
|
|
676
|
+
revokeSession: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
661
677
|
token: string;
|
|
662
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
678
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
663
679
|
token: string;
|
|
664
680
|
} & {
|
|
665
681
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -670,7 +686,7 @@ declare const authClient: {
|
|
|
670
686
|
message?: string | undefined;
|
|
671
687
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
672
688
|
} & {
|
|
673
|
-
revokeSessions: <FetchOptions extends
|
|
689
|
+
revokeSessions: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
674
690
|
query?: Record<string, any> | undefined;
|
|
675
691
|
fetchOptions?: FetchOptions | undefined;
|
|
676
692
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
@@ -680,7 +696,7 @@ declare const authClient: {
|
|
|
680
696
|
message?: string | undefined;
|
|
681
697
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
682
698
|
} & {
|
|
683
|
-
revokeOtherSessions: <FetchOptions extends
|
|
699
|
+
revokeOtherSessions: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
684
700
|
query?: Record<string, any> | undefined;
|
|
685
701
|
fetchOptions?: FetchOptions | undefined;
|
|
686
702
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
@@ -690,7 +706,7 @@ declare const authClient: {
|
|
|
690
706
|
message?: string | undefined;
|
|
691
707
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
692
708
|
} & {
|
|
693
|
-
linkSocial: <FetchOptions extends
|
|
709
|
+
linkSocial: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
694
710
|
provider: unknown;
|
|
695
711
|
callbackURL?: string | undefined;
|
|
696
712
|
idToken?: {
|
|
@@ -705,7 +721,7 @@ declare const authClient: {
|
|
|
705
721
|
errorCallbackURL?: string | undefined;
|
|
706
722
|
disableRedirect?: boolean | undefined;
|
|
707
723
|
additionalData?: Record<string, any> | undefined;
|
|
708
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
724
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
709
725
|
provider: unknown;
|
|
710
726
|
callbackURL?: string | undefined;
|
|
711
727
|
idToken?: {
|
|
@@ -730,7 +746,7 @@ declare const authClient: {
|
|
|
730
746
|
message?: string | undefined;
|
|
731
747
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
732
748
|
} & {
|
|
733
|
-
listAccounts: <FetchOptions extends
|
|
749
|
+
listAccounts: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
734
750
|
query?: Record<string, any> | undefined;
|
|
735
751
|
fetchOptions?: FetchOptions | undefined;
|
|
736
752
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
@@ -747,10 +763,10 @@ declare const authClient: {
|
|
|
747
763
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
748
764
|
} & {
|
|
749
765
|
deleteUser: {
|
|
750
|
-
callback: <FetchOptions extends
|
|
766
|
+
callback: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<{
|
|
751
767
|
token: string;
|
|
752
768
|
callbackURL?: string | undefined;
|
|
753
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
769
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
754
770
|
query: {
|
|
755
771
|
token: string;
|
|
756
772
|
callbackURL?: string | undefined;
|
|
@@ -765,10 +781,10 @@ declare const authClient: {
|
|
|
765
781
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
766
782
|
};
|
|
767
783
|
} & {
|
|
768
|
-
unlinkAccount: <FetchOptions extends
|
|
784
|
+
unlinkAccount: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
769
785
|
providerId: string;
|
|
770
786
|
accountId?: string | undefined;
|
|
771
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
787
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
772
788
|
providerId: string;
|
|
773
789
|
accountId?: string | undefined;
|
|
774
790
|
} & {
|
|
@@ -780,11 +796,11 @@ declare const authClient: {
|
|
|
780
796
|
message?: string | undefined;
|
|
781
797
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
782
798
|
} & {
|
|
783
|
-
refreshToken: <FetchOptions extends
|
|
799
|
+
refreshToken: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
784
800
|
providerId: string;
|
|
785
801
|
accountId?: string | undefined;
|
|
786
802
|
userId?: string | undefined;
|
|
787
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
803
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
788
804
|
providerId: string;
|
|
789
805
|
accountId?: string | undefined;
|
|
790
806
|
userId?: string | undefined;
|
|
@@ -804,11 +820,11 @@ declare const authClient: {
|
|
|
804
820
|
message?: string | undefined;
|
|
805
821
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
806
822
|
} & {
|
|
807
|
-
getAccessToken: <FetchOptions extends
|
|
823
|
+
getAccessToken: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
808
824
|
providerId: string;
|
|
809
825
|
accountId?: string | undefined;
|
|
810
826
|
userId?: string | undefined;
|
|
811
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
827
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
812
828
|
providerId: string;
|
|
813
829
|
accountId?: string | undefined;
|
|
814
830
|
userId?: string | undefined;
|
|
@@ -824,15 +840,15 @@ declare const authClient: {
|
|
|
824
840
|
message?: string | undefined;
|
|
825
841
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
826
842
|
} & {
|
|
827
|
-
accountInfo: <FetchOptions extends
|
|
843
|
+
accountInfo: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<{
|
|
828
844
|
accountId?: string | undefined;
|
|
829
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
845
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
830
846
|
query?: {
|
|
831
847
|
accountId?: string | undefined;
|
|
832
848
|
} | undefined;
|
|
833
849
|
fetchOptions?: FetchOptions | undefined;
|
|
834
850
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
835
|
-
user:
|
|
851
|
+
user: better_auth126.OAuth2UserInfo;
|
|
836
852
|
data: Record<string, any>;
|
|
837
853
|
}, {
|
|
838
854
|
code?: string | undefined;
|
|
@@ -840,16 +856,28 @@ declare const authClient: {
|
|
|
840
856
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
841
857
|
} & {
|
|
842
858
|
admin: {
|
|
843
|
-
setRole: <FetchOptions extends
|
|
859
|
+
setRole: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
844
860
|
userId: string;
|
|
845
|
-
role:
|
|
846
|
-
|
|
861
|
+
role: keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
862
|
+
admin: Role;
|
|
863
|
+
user: Role;
|
|
864
|
+
}) | (keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
865
|
+
admin: Role;
|
|
866
|
+
user: Role;
|
|
867
|
+
}))[];
|
|
868
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
847
869
|
userId: string;
|
|
848
|
-
role:
|
|
870
|
+
role: keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
871
|
+
admin: Role;
|
|
872
|
+
user: Role;
|
|
873
|
+
}) | (keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
874
|
+
admin: Role;
|
|
875
|
+
user: Role;
|
|
876
|
+
}))[];
|
|
849
877
|
} & {
|
|
850
878
|
fetchOptions?: FetchOptions | undefined;
|
|
851
879
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
852
|
-
user:
|
|
880
|
+
user: better_auth_plugins18.UserWithRole;
|
|
853
881
|
}, {
|
|
854
882
|
code?: string | undefined;
|
|
855
883
|
message?: string | undefined;
|
|
@@ -857,22 +885,34 @@ declare const authClient: {
|
|
|
857
885
|
};
|
|
858
886
|
} & {
|
|
859
887
|
admin: {
|
|
860
|
-
createUser: <FetchOptions extends
|
|
888
|
+
createUser: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
861
889
|
email: string;
|
|
862
890
|
password: string;
|
|
863
891
|
name: string;
|
|
864
|
-
role?:
|
|
892
|
+
role?: keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
893
|
+
admin: Role;
|
|
894
|
+
user: Role;
|
|
895
|
+
}) | (keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
896
|
+
admin: Role;
|
|
897
|
+
user: Role;
|
|
898
|
+
}))[] | undefined;
|
|
865
899
|
data?: Record<string, any> | undefined;
|
|
866
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
900
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
867
901
|
email: string;
|
|
868
902
|
password: string;
|
|
869
903
|
name: string;
|
|
870
|
-
role?:
|
|
904
|
+
role?: keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
905
|
+
admin: Role;
|
|
906
|
+
user: Role;
|
|
907
|
+
}) | (keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
908
|
+
admin: Role;
|
|
909
|
+
user: Role;
|
|
910
|
+
}))[] | undefined;
|
|
871
911
|
data?: Record<string, any> | undefined;
|
|
872
912
|
} & {
|
|
873
913
|
fetchOptions?: FetchOptions | undefined;
|
|
874
914
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
875
|
-
user:
|
|
915
|
+
user: better_auth_plugins18.UserWithRole;
|
|
876
916
|
}, {
|
|
877
917
|
code?: string | undefined;
|
|
878
918
|
message?: string | undefined;
|
|
@@ -880,36 +920,102 @@ declare const authClient: {
|
|
|
880
920
|
};
|
|
881
921
|
} & {
|
|
882
922
|
admin: {
|
|
883
|
-
hasPermission: <FetchOptions extends
|
|
884
|
-
permission: {
|
|
885
|
-
readonly user
|
|
886
|
-
readonly session
|
|
887
|
-
}
|
|
923
|
+
hasPermission: <FetchOptions extends better_auth126.ClientFetchOption<Partial<({
|
|
924
|
+
permission: { [key in keyof ((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
925
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
926
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
927
|
+
}>) extends AccessControl<infer S extends better_auth_plugins18.Statements> ? S : {
|
|
928
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
929
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
930
|
+
})]?: (((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
931
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
932
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
933
|
+
}>) extends AccessControl<infer S_1 extends better_auth_plugins18.Statements> ? S_1 : {
|
|
934
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
935
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
936
|
+
})[key] extends readonly unknown[] ? ((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
937
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
938
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
939
|
+
}>) extends AccessControl<infer S_2 extends better_auth_plugins18.Statements> ? S_2 : {
|
|
940
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
941
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
942
|
+
})[key][number] : never)[] | undefined };
|
|
888
943
|
permissions?: never | undefined;
|
|
889
944
|
} | {
|
|
890
|
-
permissions: {
|
|
891
|
-
readonly user
|
|
892
|
-
readonly session
|
|
893
|
-
}
|
|
945
|
+
permissions: { [key_1 in keyof ((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
946
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
947
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
948
|
+
}>) extends AccessControl<infer S_1 extends better_auth_plugins18.Statements> ? S_1 : {
|
|
949
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
950
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
951
|
+
})]?: (((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
952
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
953
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
954
|
+
}>) extends AccessControl<infer S_2 extends better_auth_plugins18.Statements> ? S_2 : {
|
|
955
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
956
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
957
|
+
})[key_1] extends readonly unknown[] ? ((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
958
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
959
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
960
|
+
}>) extends AccessControl<infer S_3 extends better_auth_plugins18.Statements> ? S_3 : {
|
|
961
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
962
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
963
|
+
})[key_1][number] : never)[] | undefined };
|
|
894
964
|
permission?: never | undefined;
|
|
895
965
|
}) & {
|
|
896
966
|
userId?: string | undefined;
|
|
897
|
-
role?:
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
967
|
+
role?: keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
968
|
+
admin: Role;
|
|
969
|
+
user: Role;
|
|
970
|
+
}) | undefined;
|
|
971
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<(({
|
|
972
|
+
permission: { [key in keyof ((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
973
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
974
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
975
|
+
}>) extends AccessControl<infer S extends better_auth_plugins18.Statements> ? S : {
|
|
976
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
977
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
978
|
+
})]?: (((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
979
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
980
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
981
|
+
}>) extends AccessControl<infer S_2 extends better_auth_plugins18.Statements> ? S_2 : {
|
|
982
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
983
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
984
|
+
})[key] extends readonly unknown[] ? ((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
985
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
986
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
987
|
+
}>) extends AccessControl<infer S_3 extends better_auth_plugins18.Statements> ? S_3 : {
|
|
988
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
989
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
990
|
+
})[key][number] : never)[] | undefined };
|
|
903
991
|
permissions?: never | undefined;
|
|
904
992
|
} | {
|
|
905
|
-
permissions: {
|
|
906
|
-
readonly user
|
|
907
|
-
readonly session
|
|
908
|
-
}
|
|
993
|
+
permissions: { [key_1 in keyof ((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
994
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
995
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
996
|
+
}>) extends AccessControl<infer S_1 extends better_auth_plugins18.Statements> ? S_1 : {
|
|
997
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
998
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
999
|
+
})]?: (((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
1000
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1001
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1002
|
+
}>) extends AccessControl<infer S_2 extends better_auth_plugins18.Statements> ? S_2 : {
|
|
1003
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1004
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1005
|
+
})[key_1] extends readonly unknown[] ? ((TAccessControl extends AccessControl ? TAccessControl : AccessControl<{
|
|
1006
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1007
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1008
|
+
}>) extends AccessControl<infer S_3 extends better_auth_plugins18.Statements> ? S_3 : {
|
|
1009
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1010
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1011
|
+
})[key_1][number] : never)[] | undefined };
|
|
909
1012
|
permission?: never | undefined;
|
|
910
1013
|
}) & {
|
|
911
1014
|
userId?: string | undefined;
|
|
912
|
-
role?:
|
|
1015
|
+
role?: keyof (TRoles extends Record<string, Role> ? TRoles : {
|
|
1016
|
+
admin: Role;
|
|
1017
|
+
user: Role;
|
|
1018
|
+
}) | undefined;
|
|
913
1019
|
}) & {
|
|
914
1020
|
fetchOptions?: FetchOptions | undefined;
|
|
915
1021
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
|
|
@@ -922,7 +1028,7 @@ declare const authClient: {
|
|
|
922
1028
|
};
|
|
923
1029
|
} & {
|
|
924
1030
|
signIn: {
|
|
925
|
-
social: <FetchOptions extends
|
|
1031
|
+
social: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
926
1032
|
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
927
1033
|
callbackURL?: string | undefined;
|
|
928
1034
|
newUserCallbackURL?: string | undefined;
|
|
@@ -939,7 +1045,7 @@ declare const authClient: {
|
|
|
939
1045
|
requestSignUp?: boolean | undefined;
|
|
940
1046
|
loginHint?: string | undefined;
|
|
941
1047
|
additionalData?: Record<string, any> | undefined;
|
|
942
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
1048
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
943
1049
|
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
944
1050
|
callbackURL?: string | undefined;
|
|
945
1051
|
newUserCallbackURL?: string | undefined;
|
|
@@ -981,14 +1087,14 @@ declare const authClient: {
|
|
|
981
1087
|
};
|
|
982
1088
|
} & {
|
|
983
1089
|
signUp: {
|
|
984
|
-
email: <FetchOptions extends
|
|
1090
|
+
email: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
985
1091
|
name: string;
|
|
986
1092
|
email: string;
|
|
987
1093
|
password: string;
|
|
988
1094
|
image?: string | undefined;
|
|
989
1095
|
callbackURL?: string | undefined;
|
|
990
1096
|
rememberMe?: boolean | undefined;
|
|
991
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
1097
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
992
1098
|
email: string;
|
|
993
1099
|
name: string;
|
|
994
1100
|
password: string;
|
|
@@ -1027,12 +1133,12 @@ declare const authClient: {
|
|
|
1027
1133
|
};
|
|
1028
1134
|
} & {
|
|
1029
1135
|
signIn: {
|
|
1030
|
-
email: <FetchOptions extends
|
|
1136
|
+
email: <FetchOptions extends better_auth126.ClientFetchOption<Partial<{
|
|
1031
1137
|
email: string;
|
|
1032
1138
|
password: string;
|
|
1033
1139
|
callbackURL?: string | undefined;
|
|
1034
1140
|
rememberMe?: boolean | undefined;
|
|
1035
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
1141
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth126.Prettify<{
|
|
1036
1142
|
email: string;
|
|
1037
1143
|
password: string;
|
|
1038
1144
|
callbackURL?: string | undefined;
|
|
@@ -1058,10 +1164,10 @@ declare const authClient: {
|
|
|
1058
1164
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1059
1165
|
};
|
|
1060
1166
|
} & {
|
|
1061
|
-
updateUser: <FetchOptions extends
|
|
1167
|
+
updateUser: <FetchOptions extends better_auth126.ClientFetchOption<Partial<Partial<{}> & {
|
|
1062
1168
|
name?: string | undefined;
|
|
1063
1169
|
image?: string | undefined | null;
|
|
1064
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
1170
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
1065
1171
|
image?: (string | null) | undefined;
|
|
1066
1172
|
name?: string | undefined;
|
|
1067
1173
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -1075,10 +1181,10 @@ declare const authClient: {
|
|
|
1075
1181
|
message?: string | undefined;
|
|
1076
1182
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1077
1183
|
} & {
|
|
1078
|
-
listSessions: <FetchOptions extends
|
|
1184
|
+
listSessions: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
1079
1185
|
query?: Record<string, any> | undefined;
|
|
1080
1186
|
fetchOptions?: FetchOptions | undefined;
|
|
1081
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<
|
|
1187
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<better_auth126.Prettify<{
|
|
1082
1188
|
id: string;
|
|
1083
1189
|
createdAt: Date;
|
|
1084
1190
|
updatedAt: Date;
|
|
@@ -1092,10 +1198,10 @@ declare const authClient: {
|
|
|
1092
1198
|
message?: string | undefined;
|
|
1093
1199
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1094
1200
|
} & {
|
|
1095
|
-
getSession: <FetchOptions extends
|
|
1201
|
+
getSession: <FetchOptions extends better_auth126.ClientFetchOption<never, Partial<{
|
|
1096
1202
|
disableCookieCache?: unknown;
|
|
1097
1203
|
disableRefresh?: unknown;
|
|
1098
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
1204
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth126.Prettify<{
|
|
1099
1205
|
query?: {
|
|
1100
1206
|
disableCookieCache?: unknown;
|
|
1101
1207
|
disableRefresh?: unknown;
|
|
@@ -1136,8 +1242,8 @@ declare const authClient: {
|
|
|
1136
1242
|
signIn: {
|
|
1137
1243
|
passkey: (opts?: {
|
|
1138
1244
|
autoFill?: boolean;
|
|
1139
|
-
fetchOptions?:
|
|
1140
|
-
} | undefined, options?:
|
|
1245
|
+
fetchOptions?: better_auth126.ClientFetchOption;
|
|
1246
|
+
} | undefined, options?: better_auth126.ClientFetchOption | undefined) => Promise<{
|
|
1141
1247
|
data: null;
|
|
1142
1248
|
error: {
|
|
1143
1249
|
message?: string | undefined;
|
|
@@ -1146,8 +1252,8 @@ declare const authClient: {
|
|
|
1146
1252
|
};
|
|
1147
1253
|
} | {
|
|
1148
1254
|
data: {
|
|
1149
|
-
session:
|
|
1150
|
-
user:
|
|
1255
|
+
session: better_auth126.Session;
|
|
1256
|
+
user: better_auth126.User;
|
|
1151
1257
|
};
|
|
1152
1258
|
error: null;
|
|
1153
1259
|
} | {
|
|
@@ -1162,11 +1268,11 @@ declare const authClient: {
|
|
|
1162
1268
|
};
|
|
1163
1269
|
passkey: {
|
|
1164
1270
|
addPasskey: (opts?: {
|
|
1165
|
-
fetchOptions?:
|
|
1271
|
+
fetchOptions?: better_auth126.ClientFetchOption;
|
|
1166
1272
|
name?: string;
|
|
1167
1273
|
authenticatorAttachment?: "platform" | "cross-platform";
|
|
1168
1274
|
useAutoRegister?: boolean;
|
|
1169
|
-
} | undefined, fetchOpts?:
|
|
1275
|
+
} | undefined, fetchOpts?: better_auth126.ClientFetchOption | undefined) => Promise<{
|
|
1170
1276
|
data: null;
|
|
1171
1277
|
error: {
|
|
1172
1278
|
message?: string | undefined;
|
|
@@ -1174,7 +1280,7 @@ declare const authClient: {
|
|
|
1174
1280
|
statusText: string;
|
|
1175
1281
|
};
|
|
1176
1282
|
} | {
|
|
1177
|
-
data:
|
|
1283
|
+
data: _better_auth_passkey2.Passkey;
|
|
1178
1284
|
error: null;
|
|
1179
1285
|
} | {
|
|
1180
1286
|
data: null;
|
|
@@ -1187,21 +1293,33 @@ declare const authClient: {
|
|
|
1187
1293
|
}>;
|
|
1188
1294
|
};
|
|
1189
1295
|
$Infer: {
|
|
1190
|
-
Passkey:
|
|
1296
|
+
Passkey: _better_auth_passkey2.Passkey;
|
|
1191
1297
|
};
|
|
1192
1298
|
} & {
|
|
1193
1299
|
admin: {
|
|
1194
|
-
checkRolePermission: <R extends
|
|
1195
|
-
permission: {
|
|
1196
|
-
readonly user
|
|
1197
|
-
readonly session
|
|
1198
|
-
}
|
|
1300
|
+
checkRolePermission: <R extends keyof TRoles>(data: ({
|
|
1301
|
+
permission: { [key in keyof (TAccessControl extends AccessControl<infer S extends better_auth_plugins18.Statements> ? S : {
|
|
1302
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1303
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1304
|
+
})]?: ((TAccessControl extends AccessControl<infer S_1 extends better_auth_plugins18.Statements> ? S_1 : {
|
|
1305
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1306
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1307
|
+
})[key] extends readonly unknown[] ? (TAccessControl extends AccessControl<infer S_2 extends better_auth_plugins18.Statements> ? S_2 : {
|
|
1308
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1309
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1310
|
+
})[key][number] : never)[] | undefined };
|
|
1199
1311
|
permissions?: never | undefined;
|
|
1200
1312
|
} | {
|
|
1201
|
-
permissions: {
|
|
1202
|
-
readonly user
|
|
1203
|
-
readonly session
|
|
1204
|
-
}
|
|
1313
|
+
permissions: { [key_1 in keyof (TAccessControl extends AccessControl<infer S_1 extends better_auth_plugins18.Statements> ? S_1 : {
|
|
1314
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1315
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1316
|
+
})]?: ((TAccessControl extends AccessControl<infer S_2 extends better_auth_plugins18.Statements> ? S_2 : {
|
|
1317
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1318
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1319
|
+
})[key_1] extends readonly unknown[] ? (TAccessControl extends AccessControl<infer S_3 extends better_auth_plugins18.Statements> ? S_3 : {
|
|
1320
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1321
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1322
|
+
})[key_1][number] : never)[] | undefined };
|
|
1205
1323
|
permission?: never | undefined;
|
|
1206
1324
|
}) & {
|
|
1207
1325
|
role: R;
|
|
@@ -1241,7 +1359,7 @@ declare const authClient: {
|
|
|
1241
1359
|
isRefetching: boolean;
|
|
1242
1360
|
error: better_auth_react0.BetterFetchError | null;
|
|
1243
1361
|
refetch: (queryParams?: {
|
|
1244
|
-
query?:
|
|
1362
|
+
query?: better_auth126.SessionQueryParams;
|
|
1245
1363
|
} | undefined) => Promise<void>;
|
|
1246
1364
|
};
|
|
1247
1365
|
$Infer: {
|
|
@@ -1399,8 +1517,10 @@ declare const authClient: {
|
|
|
1399
1517
|
readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
|
|
1400
1518
|
};
|
|
1401
1519
|
};
|
|
1402
|
-
|
|
1403
|
-
|
|
1520
|
+
/**
|
|
1521
|
+
* Client auth type
|
|
1522
|
+
*/
|
|
1523
|
+
type ClientAuth<TAccessControl extends AccessControl, TRoles extends { [key in string]: Role }> = ReturnType<typeof createAuthClient$1<TAccessControl, TRoles>>;
|
|
1404
1524
|
//#endregion
|
|
1405
|
-
export { ClientAuth,
|
|
1406
|
-
//# sourceMappingURL=client.client.d.mts.map
|
|
1525
|
+
export { ClientAuth, CreateAuthClientProps, createAuthClient$1 as createAuthClient };
|
|
1526
|
+
//# sourceMappingURL=create-client.client.d.mts.map
|