abckit 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/module.d.mts +16 -1
  2. package/dist/module.mjs +5 -5
  3. package/dist/runtime/components/app/AppBreadcrumbs.vue +1 -2
  4. package/dist/runtime/components/app/AppHeader.vue +2 -2
  5. package/dist/runtime/components/app/AppNavMain.d.vue.ts +1 -2
  6. package/dist/runtime/components/app/AppNavMain.vue +4 -4
  7. package/dist/runtime/components/app/AppNavMain.vue.d.ts +1 -2
  8. package/dist/runtime/components/ui/accordion/AccordionTrigger.vue +3 -2
  9. package/dist/runtime/components/ui/auto-form/AutoFormFieldArray.vue +3 -3
  10. package/dist/runtime/components/ui/auto-form/AutoFormFieldDate.vue +2 -2
  11. package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.vue +2 -2
  12. package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +2 -2
  13. package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +2 -2
  14. package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +2 -2
  15. package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +2 -2
  16. package/dist/runtime/components/ui/carousel/CarouselNext.vue +2 -2
  17. package/dist/runtime/components/ui/carousel/CarouselPrevious.vue +2 -2
  18. package/dist/runtime/components/ui/checkbox/Checkbox.vue +2 -2
  19. package/dist/runtime/components/ui/combobox/ComboboxInput.vue +2 -2
  20. package/dist/runtime/components/ui/command/CommandInput.vue +2 -2
  21. package/dist/runtime/components/ui/context-menu/ContextMenuCheckboxItem.vue +2 -2
  22. package/dist/runtime/components/ui/context-menu/ContextMenuRadioItem.vue +2 -2
  23. package/dist/runtime/components/ui/context-menu/ContextMenuSubTrigger.vue +2 -2
  24. package/dist/runtime/components/ui/dialog/DialogContent.vue +2 -2
  25. package/dist/runtime/components/ui/dialog/DialogScrollContent.vue +2 -2
  26. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +2 -2
  27. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +2 -2
  28. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +2 -2
  29. package/dist/runtime/components/ui/file/FileEmptyState.vue +3 -3
  30. package/dist/runtime/components/ui/file/FileGrid.vue +10 -10
  31. package/dist/runtime/components/ui/file/FileTable.vue +16 -17
  32. package/dist/runtime/components/ui/input-otp/InputOTPSeparator.vue +2 -2
  33. package/dist/runtime/components/ui/menubar/MenubarCheckboxItem.vue +2 -2
  34. package/dist/runtime/components/ui/menubar/MenubarRadioItem.vue +2 -2
  35. package/dist/runtime/components/ui/menubar/MenubarSubTrigger.vue +2 -2
  36. package/dist/runtime/components/ui/native-select/NativeSelect.vue +3 -2
  37. package/dist/runtime/components/ui/navigation-menu/NavigationMenuTrigger.vue +3 -2
  38. package/dist/runtime/components/ui/number-field/NumberFieldDecrement.vue +2 -2
  39. package/dist/runtime/components/ui/number-field/NumberFieldIncrement.vue +2 -2
  40. package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +2 -2
  41. package/dist/runtime/components/ui/pagination/PaginationFirst.vue +2 -2
  42. package/dist/runtime/components/ui/pagination/PaginationLast.vue +2 -2
  43. package/dist/runtime/components/ui/pagination/PaginationNext.vue +2 -2
  44. package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +2 -2
  45. package/dist/runtime/components/ui/pin-input/PinInputSeparator.vue +2 -2
  46. package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +2 -2
  47. package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +2 -2
  48. package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +2 -2
  49. package/dist/runtime/components/ui/resizable/ResizableHandle.vue +2 -2
  50. package/dist/runtime/components/ui/select/SelectItem.vue +2 -2
  51. package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +2 -2
  52. package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +2 -2
  53. package/dist/runtime/components/ui/select/SelectTrigger.vue +2 -2
  54. package/dist/runtime/components/ui/sheet/InnerSheetContent.vue +2 -2
  55. package/dist/runtime/components/ui/sheet/SheetContent.vue +2 -2
  56. package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +2 -2
  57. package/dist/runtime/components/ui/sonner/Sonner.vue +7 -7
  58. package/dist/runtime/components/ui/spinner/Spinner.vue +3 -2
  59. package/dist/runtime/components/ui/storage/StorageActionBar.vue +3 -4
  60. package/dist/runtime/components/ui/storage/StorageEmptyState.vue +3 -4
  61. package/dist/runtime/components/ui/storage/StorageGrid.vue +10 -11
  62. package/dist/runtime/components/ui/storage/StorageSelectionBar.vue +3 -3
  63. package/dist/runtime/components/ui/storage/StorageTable.vue +10 -11
  64. package/dist/runtime/components/ui/storage/StorageUploadZone.vue +5 -4
  65. package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +2 -2
  66. package/dist/runtime/composables/useAuth.d.ts +982 -1813
  67. package/dist/runtime/composables/useAuth.js +27 -9
  68. package/dist/runtime/shared/constants/r2.js +12 -6
  69. package/dist/runtime/types/nitro-graphql-client.d.ts +0 -1
  70. package/dist/types.d.mts +1 -1
  71. package/package.json +13 -14
@@ -1,171 +1,74 @@
1
- declare const authClient: {
2
- admin: {
3
- setRole: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
4
- userId: string;
5
- role: "user" | "admin" | ("user" | "admin")[];
6
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
7
- userId: string;
8
- role: "user" | "admin" | ("user" | "admin")[];
9
- } & {
10
- fetchOptions?: FetchOptions | undefined;
11
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
12
- user: import("better-auth/client/plugins").UserWithRole;
13
- }, {
14
- code?: string | undefined;
15
- message?: string | undefined;
16
- }, FetchOptions["throw"] extends true ? true : false>>;
17
- };
18
- } & {
19
- admin: {
20
- getUser: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
21
- id: string;
22
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
23
- query: {
24
- id: string;
1
+ /**
2
+ * Main authentication composable for Better Auth
3
+ */
4
+ export declare function useAuth(): {
5
+ session: Readonly<import("vue").Ref<{
6
+ readonly data: {
7
+ readonly user: {
8
+ readonly id: string;
9
+ readonly createdAt: Date;
10
+ readonly updatedAt: Date;
11
+ readonly email: string;
12
+ readonly emailVerified: boolean;
13
+ readonly name: string;
14
+ readonly image?: string | null | undefined;
25
15
  };
26
- fetchOptions?: FetchOptions | undefined;
27
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
28
- id: string;
29
- createdAt: Date;
30
- updatedAt: Date;
31
- email: string;
32
- emailVerified: boolean;
33
- name: string;
34
- image?: string | null | undefined;
35
- }, {
36
- code?: string | undefined;
37
- message?: string | undefined;
38
- }, FetchOptions["throw"] extends true ? true : false>>;
39
- };
40
- } & {
41
- admin: {
42
- createUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
43
- email: string;
44
- password: string;
45
- name: string;
46
- role?: "user" | "admin" | ("user" | "admin")[] | undefined;
47
- data?: Record<string, any> | undefined;
48
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
49
- email: string;
50
- password: string;
51
- name: string;
52
- role?: "user" | "admin" | ("user" | "admin")[] | undefined;
53
- data?: Record<string, any> | undefined;
54
- } & {
55
- fetchOptions?: FetchOptions | undefined;
56
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
57
- user: import("better-auth/client/plugins").UserWithRole;
58
- }, {
59
- code?: string | undefined;
60
- message?: string | undefined;
61
- }, FetchOptions["throw"] extends true ? true : false>>;
62
- };
63
- } & {
64
- admin: {
65
- updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
66
- userId: unknown;
67
- data: Record<any, any>;
68
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
69
- userId: unknown;
70
- data: Record<any, any>;
71
- } & {
72
- fetchOptions?: FetchOptions | undefined;
73
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<import("better-auth/client/plugins").UserWithRole, {
74
- code?: string | undefined;
75
- message?: string | undefined;
76
- }, FetchOptions["throw"] extends true ? true : false>>;
77
- };
78
- } & {
79
- admin: {
80
- listUsers: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
81
- searchValue?: string | undefined;
82
- searchField?: "name" | "email" | undefined;
83
- searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
84
- limit?: string | number | undefined;
85
- offset?: string | number | undefined;
86
- sortBy?: string | undefined;
87
- sortDirection?: "asc" | "desc" | undefined;
88
- filterField?: string | undefined;
89
- filterValue?: string | number | boolean | undefined;
90
- filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
91
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
92
- query: {
93
- searchValue?: string | undefined;
94
- searchField?: "name" | "email" | undefined;
95
- searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
96
- limit?: string | number | undefined;
97
- offset?: string | number | undefined;
98
- sortBy?: string | undefined;
99
- sortDirection?: "asc" | "desc" | undefined;
100
- filterField?: string | undefined;
101
- filterValue?: string | number | boolean | undefined;
102
- filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
16
+ readonly session: {
17
+ readonly id: string;
18
+ readonly createdAt: Date;
19
+ readonly updatedAt: Date;
20
+ readonly userId: string;
21
+ readonly expiresAt: Date;
22
+ readonly token: string;
23
+ readonly ipAddress?: string | null | undefined;
24
+ readonly userAgent?: string | null | undefined;
103
25
  };
104
- fetchOptions?: FetchOptions | undefined;
105
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
106
- users: import("better-auth/client/plugins").UserWithRole[];
107
- total: number;
108
- limit: number | undefined;
109
- offset: number | undefined;
110
- } | {
111
- users: never[];
112
- total: number;
113
- }>, {
114
- code?: string | undefined;
115
- message?: string | undefined;
116
- }, FetchOptions["throw"] extends true ? true : false>>;
117
- };
118
- } & {
119
- admin: {
120
- listUserSessions: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
121
- userId: unknown;
122
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
123
- userId: unknown;
124
- } & {
125
- fetchOptions?: FetchOptions | undefined;
126
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
127
- sessions: import("better-auth/client/plugins").SessionWithImpersonatedBy[];
128
- }, {
129
- code?: string | undefined;
130
- message?: string | undefined;
131
- }, FetchOptions["throw"] extends true ? true : false>>;
132
- };
133
- } & {
134
- admin: {
135
- unbanUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
136
- userId: unknown;
137
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
138
- userId: unknown;
139
- } & {
140
- fetchOptions?: FetchOptions | undefined;
141
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
142
- user: {
143
- id: string;
144
- createdAt: Date;
145
- updatedAt: Date;
146
- email: string;
147
- emailVerified: boolean;
148
- name: string;
149
- image?: string | null | undefined;
150
- } & Record<string, any>;
151
- }, {
152
- code?: string | undefined;
153
- message?: string | undefined;
154
- }, FetchOptions["throw"] extends true ? true : false>>;
155
- };
156
- } & {
157
- admin: {
158
- banUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
159
- userId: unknown;
160
- banReason?: string | undefined;
161
- banExpiresIn?: number | undefined;
162
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
163
- userId: unknown;
164
- banReason?: string | undefined;
165
- banExpiresIn?: number | undefined;
166
- } & {
167
- fetchOptions?: FetchOptions | undefined;
168
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
26
+ } | null;
27
+ readonly isPending: boolean;
28
+ readonly isRefetching: boolean;
29
+ readonly error: import("better-auth/vue").BetterFetchError | null;
30
+ }, {
31
+ readonly data: {
32
+ readonly user: {
33
+ readonly id: string;
34
+ readonly createdAt: Date;
35
+ readonly updatedAt: Date;
36
+ readonly email: string;
37
+ readonly emailVerified: boolean;
38
+ readonly name: string;
39
+ readonly image?: string | null | undefined;
40
+ };
41
+ readonly session: {
42
+ readonly id: string;
43
+ readonly createdAt: Date;
44
+ readonly updatedAt: Date;
45
+ readonly userId: string;
46
+ readonly expiresAt: Date;
47
+ readonly token: string;
48
+ readonly ipAddress?: string | null | undefined;
49
+ readonly userAgent?: string | null | undefined;
50
+ };
51
+ } | null;
52
+ readonly isPending: boolean;
53
+ readonly isRefetching: boolean;
54
+ readonly error: import("better-auth/vue").BetterFetchError | null;
55
+ }>>;
56
+ isLoading: import("vue").ComputedRef<boolean>;
57
+ isAuthenticated: import("vue").ComputedRef<boolean>;
58
+ user: import("vue").ComputedRef<{
59
+ readonly id: string;
60
+ readonly createdAt: Date;
61
+ readonly updatedAt: Date;
62
+ readonly email: string;
63
+ readonly emailVerified: boolean;
64
+ readonly name: string;
65
+ readonly image?: string | null | undefined;
66
+ } | null>;
67
+ login: (returnTo?: string) => void;
68
+ register: (returnTo?: string) => void;
69
+ logout: () => Promise<void>;
70
+ refreshSession: () => Promise<{
71
+ data: {
169
72
  user: {
170
73
  id: string;
171
74
  createdAt: Date;
@@ -174,21 +77,7 @@ declare const authClient: {
174
77
  emailVerified: boolean;
175
78
  name: string;
176
79
  image?: string | null | undefined;
177
- } & Record<string, any>;
178
- }, {
179
- code?: string | undefined;
180
- message?: string | undefined;
181
- }, FetchOptions["throw"] extends true ? true : false>>;
182
- };
183
- } & {
184
- admin: {
185
- impersonateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
186
- userId: unknown;
187
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
188
- userId: unknown;
189
- } & {
190
- fetchOptions?: FetchOptions | undefined;
191
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
80
+ };
192
81
  session: {
193
82
  id: string;
194
83
  createdAt: Date;
@@ -199,815 +88,524 @@ declare const authClient: {
199
88
  ipAddress?: string | null | undefined;
200
89
  userAgent?: string | null | undefined;
201
90
  };
202
- user: {
203
- id: string;
204
- createdAt: Date;
205
- updatedAt: Date;
206
- email: string;
207
- emailVerified: boolean;
208
- name: string;
209
- image?: string | null | undefined;
210
- };
211
- }, {
212
- code?: string | undefined;
213
- message?: string | undefined;
214
- }, FetchOptions["throw"] extends true ? true : false>>;
215
- };
216
- } & {
217
- admin: {
218
- stopImpersonating: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
91
+ } | null;
92
+ error: null;
93
+ } | {
94
+ data: null;
95
+ error: {
96
+ code?: string | undefined | undefined;
97
+ message?: string | undefined | undefined;
98
+ status: number;
99
+ statusText: string;
100
+ };
101
+ }>;
102
+ authClient: {
103
+ signIn: {
104
+ social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
105
+ 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 & {});
106
+ callbackURL?: string | undefined;
107
+ newUserCallbackURL?: string | undefined;
108
+ errorCallbackURL?: string | undefined;
109
+ disableRedirect?: boolean | undefined;
110
+ idToken?: {
111
+ token: string;
112
+ nonce?: string | undefined;
113
+ accessToken?: string | undefined;
114
+ refreshToken?: string | undefined;
115
+ expiresAt?: number | undefined;
116
+ } | undefined;
117
+ scopes?: string[] | undefined;
118
+ requestSignUp?: boolean | undefined;
119
+ loginHint?: string | undefined;
120
+ additionalData?: Record<string, any> | undefined;
121
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
122
+ 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 & {});
123
+ callbackURL?: string | undefined;
124
+ newUserCallbackURL?: string | undefined;
125
+ errorCallbackURL?: string | undefined;
126
+ disableRedirect?: boolean | undefined;
127
+ idToken?: {
128
+ token: string;
129
+ nonce?: string | undefined;
130
+ accessToken?: string | undefined;
131
+ refreshToken?: string | undefined;
132
+ expiresAt?: number | undefined;
133
+ } | undefined;
134
+ scopes?: string[] | undefined;
135
+ requestSignUp?: boolean | undefined;
136
+ loginHint?: string | undefined;
137
+ additionalData?: Record<string, any> | undefined;
138
+ } & {
139
+ fetchOptions?: FetchOptions | undefined;
140
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
141
+ redirect: boolean;
142
+ url: string;
143
+ } | {
144
+ redirect: boolean;
145
+ token: string;
146
+ url: undefined;
147
+ user: {
148
+ id: string;
149
+ createdAt: Date;
150
+ updatedAt: Date;
151
+ email: string;
152
+ emailVerified: boolean;
153
+ name: string;
154
+ image?: string | null | undefined | undefined;
155
+ };
156
+ }>, {
157
+ code?: string | undefined;
158
+ message?: string | undefined;
159
+ }, FetchOptions["throw"] extends true ? true : false>>;
160
+ };
161
+ } & {
162
+ signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
219
163
  query?: Record<string, any> | undefined;
220
164
  fetchOptions?: FetchOptions | undefined;
221
165
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
222
- session: import("better-auth").Session & Record<string, any>;
223
- user: import("better-auth").User & Record<string, any>;
166
+ success: boolean;
224
167
  }, {
225
168
  code?: string | undefined;
226
169
  message?: string | undefined;
227
170
  }, FetchOptions["throw"] extends true ? true : false>>;
228
- };
229
- } & {
230
- admin: {
231
- revokeUserSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
232
- sessionToken: string;
233
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
234
- sessionToken: string;
171
+ } & {
172
+ signUp: {
173
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
174
+ name: string;
175
+ email: string;
176
+ password: string;
177
+ image?: string | undefined;
178
+ callbackURL?: string | undefined;
179
+ rememberMe?: boolean | undefined;
180
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
181
+ email: string;
182
+ name: string;
183
+ password: string;
184
+ image?: string | undefined;
185
+ callbackURL?: string | undefined;
186
+ fetchOptions?: FetchOptions | undefined;
187
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
188
+ token: null;
189
+ user: {
190
+ id: string;
191
+ createdAt: Date;
192
+ updatedAt: Date;
193
+ email: string;
194
+ emailVerified: boolean;
195
+ name: string;
196
+ image?: string | null | undefined | undefined;
197
+ };
198
+ } | {
199
+ token: string;
200
+ user: {
201
+ id: string;
202
+ createdAt: Date;
203
+ updatedAt: Date;
204
+ email: string;
205
+ emailVerified: boolean;
206
+ name: string;
207
+ image?: string | null | undefined | undefined;
208
+ };
209
+ }>, {
210
+ code?: string | undefined;
211
+ message?: string | undefined;
212
+ }, FetchOptions["throw"] extends true ? true : false>>;
213
+ };
214
+ } & {
215
+ signIn: {
216
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
217
+ email: string;
218
+ password: string;
219
+ callbackURL?: string | undefined;
220
+ rememberMe?: boolean | undefined;
221
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
222
+ email: string;
223
+ password: string;
224
+ callbackURL?: string | undefined;
225
+ rememberMe?: boolean | undefined;
226
+ } & {
227
+ fetchOptions?: FetchOptions | undefined;
228
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
229
+ redirect: boolean;
230
+ token: string;
231
+ url?: string | undefined;
232
+ user: {
233
+ id: string;
234
+ createdAt: Date;
235
+ updatedAt: Date;
236
+ email: string;
237
+ emailVerified: boolean;
238
+ name: string;
239
+ image?: string | null | undefined | undefined;
240
+ };
241
+ }, {
242
+ code?: string | undefined;
243
+ message?: string | undefined;
244
+ }, FetchOptions["throw"] extends true ? true : false>>;
245
+ };
246
+ } & {
247
+ resetPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
248
+ newPassword: string;
249
+ token?: string | undefined;
250
+ }> & Record<string, any>, Partial<{
251
+ token?: string | undefined;
252
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
253
+ newPassword: string;
254
+ token?: string | undefined;
235
255
  } & {
236
256
  fetchOptions?: FetchOptions | undefined;
237
257
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
238
- success: boolean;
258
+ status: boolean;
239
259
  }, {
240
260
  code?: string | undefined;
241
261
  message?: string | undefined;
242
262
  }, FetchOptions["throw"] extends true ? true : false>>;
243
- };
244
- } & {
245
- admin: {
246
- revokeUserSessions: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
247
- userId: unknown;
263
+ } & {
264
+ verifyEmail: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
265
+ token: string;
266
+ callbackURL?: string | undefined;
267
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
268
+ query: {
269
+ token: string;
270
+ callbackURL?: string | undefined;
271
+ };
272
+ fetchOptions?: FetchOptions | undefined;
273
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<void | {
274
+ status: boolean;
275
+ }>, {
276
+ code?: string | undefined;
277
+ message?: string | undefined;
278
+ }, FetchOptions["throw"] extends true ? true : false>>;
279
+ } & {
280
+ sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
281
+ email: string;
282
+ callbackURL?: string | undefined;
248
283
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
249
- userId: unknown;
284
+ email: string;
285
+ callbackURL?: string | undefined;
250
286
  } & {
251
287
  fetchOptions?: FetchOptions | undefined;
252
288
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
253
- success: boolean;
289
+ status: boolean;
254
290
  }, {
255
291
  code?: string | undefined;
256
292
  message?: string | undefined;
257
293
  }, FetchOptions["throw"] extends true ? true : false>>;
258
- };
259
- } & {
260
- admin: {
261
- removeUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
262
- userId: unknown;
294
+ } & {
295
+ changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
296
+ newEmail: string;
297
+ callbackURL?: string | undefined;
263
298
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
264
- userId: unknown;
299
+ newEmail: string;
300
+ callbackURL?: string | undefined;
265
301
  } & {
266
302
  fetchOptions?: FetchOptions | undefined;
267
303
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
268
- success: boolean;
304
+ status: boolean;
269
305
  }, {
270
306
  code?: string | undefined;
271
307
  message?: string | undefined;
272
308
  }, FetchOptions["throw"] extends true ? true : false>>;
273
- };
274
- } & {
275
- admin: {
276
- setUserPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
309
+ } & {
310
+ changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
277
311
  newPassword: string;
278
- userId: unknown;
312
+ currentPassword: string;
313
+ revokeOtherSessions?: boolean | undefined;
279
314
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
280
315
  newPassword: string;
281
- userId: unknown;
316
+ currentPassword: string;
317
+ revokeOtherSessions?: boolean | undefined;
282
318
  } & {
283
319
  fetchOptions?: FetchOptions | undefined;
284
320
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
285
- status: boolean;
321
+ token: string | null;
322
+ user: {
323
+ id: string;
324
+ email: string;
325
+ name: string;
326
+ image: string | null | undefined;
327
+ emailVerified: boolean;
328
+ createdAt: Date;
329
+ updatedAt: Date;
330
+ };
286
331
  }, {
287
332
  code?: string | undefined;
288
333
  message?: string | undefined;
289
334
  }, FetchOptions["throw"] extends true ? true : false>>;
290
- };
291
- } & {
292
- admin: {
293
- hasPermission: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<({
294
- permission: {
295
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
296
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
297
- };
298
- permissions?: never | undefined;
299
- } | {
300
- permissions: {
301
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
302
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
303
- };
304
- permission?: never | undefined;
305
- }) & {
306
- userId?: string | undefined;
307
- role?: "user" | "admin" | undefined;
308
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<(({
309
- permission: {
310
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
311
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
312
- };
313
- permissions?: never | undefined;
314
- } | {
315
- permissions: {
316
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
317
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
318
- };
319
- permission?: never | undefined;
320
- }) & {
321
- userId?: string | undefined;
322
- role?: "user" | "admin" | undefined;
323
- }) & {
335
+ } & {
336
+ updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
337
+ name?: string | undefined;
338
+ image?: string | undefined | null;
339
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
340
+ image?: (string | null) | undefined;
341
+ name?: string | undefined;
324
342
  fetchOptions?: FetchOptions | undefined;
325
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
326
- error: null;
327
- success: boolean;
343
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
344
+ status: boolean;
328
345
  }, {
329
346
  code?: string | undefined;
330
347
  message?: string | undefined;
331
348
  }, FetchOptions["throw"] extends true ? true : false>>;
332
- };
333
- } & {
334
- signIn: {
335
- social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
336
- provider: (string & {}) | "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";
349
+ } & {
350
+ deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
337
351
  callbackURL?: string | undefined;
338
- newUserCallbackURL?: string | undefined;
339
- errorCallbackURL?: string | undefined;
340
- disableRedirect?: boolean | undefined;
341
- idToken?: {
342
- token: string;
343
- nonce?: string | undefined;
344
- accessToken?: string | undefined;
345
- refreshToken?: string | undefined;
346
- expiresAt?: number | undefined;
347
- } | undefined;
348
- scopes?: string[] | undefined;
349
- requestSignUp?: boolean | undefined;
350
- loginHint?: string | undefined;
351
- additionalData?: Record<string, any> | undefined;
352
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
353
- provider: (string & {}) | "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";
352
+ password?: string | undefined;
353
+ token?: string | undefined;
354
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
354
355
  callbackURL?: string | undefined;
355
- newUserCallbackURL?: string | undefined;
356
- errorCallbackURL?: string | undefined;
357
- disableRedirect?: boolean | undefined;
358
- idToken?: {
359
- token: string;
360
- nonce?: string | undefined;
361
- accessToken?: string | undefined;
362
- refreshToken?: string | undefined;
363
- expiresAt?: number | undefined;
364
- } | undefined;
365
- scopes?: string[] | undefined;
366
- requestSignUp?: boolean | undefined;
367
- loginHint?: string | undefined;
368
- additionalData?: Record<string, any> | undefined;
356
+ password?: string | undefined;
357
+ token?: string | undefined;
369
358
  } & {
370
359
  fetchOptions?: FetchOptions | undefined;
371
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
372
- redirect: boolean;
373
- url: string;
374
- } | {
375
- redirect: boolean;
376
- token: string;
377
- url: undefined;
378
- user: {
379
- id: string;
380
- createdAt: Date;
381
- updatedAt: Date;
382
- email: string;
383
- emailVerified: boolean;
384
- name: string;
385
- image?: string | null | undefined | undefined;
386
- };
387
- }>, {
360
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
361
+ success: boolean;
362
+ message: string;
363
+ }, {
388
364
  code?: string | undefined;
389
365
  message?: string | undefined;
390
366
  }, FetchOptions["throw"] extends true ? true : false>>;
391
- };
392
- } & {
393
- signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
394
- query?: Record<string, any> | undefined;
395
- fetchOptions?: FetchOptions | undefined;
396
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
397
- success: boolean;
398
- }, {
399
- code?: string | undefined;
400
- message?: string | undefined;
401
- }, FetchOptions["throw"] extends true ? true : false>>;
402
- } & {
403
- signUp: {
404
- email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
405
- name: string;
367
+ } & {
368
+ requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
406
369
  email: string;
407
- password: string;
408
- image?: string | undefined;
409
- callbackURL?: string | undefined;
410
- rememberMe?: boolean | undefined;
370
+ redirectTo?: string | undefined;
411
371
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
412
372
  email: string;
413
- name: string;
414
- password: string;
415
- image?: string | undefined;
416
- callbackURL?: string | undefined;
417
- fetchOptions?: FetchOptions | undefined;
418
- } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
419
- token: null;
420
- user: {
421
- id: string;
422
- createdAt: Date;
423
- updatedAt: Date;
424
- email: string;
425
- emailVerified: boolean;
426
- name: string;
427
- image?: string | null | undefined | undefined;
428
- };
429
- } | {
430
- token: string;
431
- user: {
432
- id: string;
433
- createdAt: Date;
434
- updatedAt: Date;
435
- email: string;
436
- emailVerified: boolean;
437
- name: string;
438
- image?: string | null | undefined | undefined;
439
- };
440
- }>, {
441
- code?: string | undefined;
442
- message?: string | undefined;
443
- }, FetchOptions["throw"] extends true ? true : false>>;
444
- };
445
- } & {
446
- signIn: {
447
- email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
448
- email: string;
449
- password: string;
450
- callbackURL?: string | undefined;
451
- rememberMe?: boolean | undefined;
452
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
453
- email: string;
454
- password: string;
455
- callbackURL?: string | undefined;
456
- rememberMe?: boolean | undefined;
457
- } & {
373
+ redirectTo?: string | undefined;
374
+ } & {
458
375
  fetchOptions?: FetchOptions | undefined;
459
376
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
460
- redirect: boolean;
461
- token: string;
462
- url?: string | undefined;
463
- user: {
464
- id: string;
465
- createdAt: Date;
466
- updatedAt: Date;
467
- email: string;
468
- emailVerified: boolean;
469
- name: string;
470
- image?: string | null | undefined | undefined;
471
- };
377
+ status: boolean;
378
+ message: string;
472
379
  }, {
473
380
  code?: string | undefined;
474
381
  message?: string | undefined;
475
382
  }, FetchOptions["throw"] extends true ? true : false>>;
476
- };
477
- } & {
478
- resetPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
479
- newPassword: string;
480
- token?: string | undefined;
481
- }> & Record<string, any>, Partial<{
482
- token?: string | undefined;
483
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
484
- newPassword: string;
485
- token?: string | undefined;
486
383
  } & {
487
- fetchOptions?: FetchOptions | undefined;
488
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
489
- status: boolean;
490
- }, {
491
- code?: string | undefined;
492
- message?: string | undefined;
493
- }, FetchOptions["throw"] extends true ? true : false>>;
494
- } & {
495
- verifyEmail: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
496
- token: string;
497
- callbackURL?: string | undefined;
498
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
499
- query: {
500
- token: string;
501
- callbackURL?: string | undefined;
384
+ resetPassword: {
385
+ ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
386
+ callbackURL: string;
387
+ }> & Record<string, any>, {
388
+ token: string;
389
+ }>>(data_0: import("better-auth").Prettify<{
390
+ query: {
391
+ callbackURL: string;
392
+ };
393
+ fetchOptions?: FetchOptions | undefined;
394
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<never, {
395
+ code?: string | undefined;
396
+ message?: string | undefined;
397
+ }, FetchOptions["throw"] extends true ? true : false>>;
502
398
  };
503
- fetchOptions?: FetchOptions | undefined;
504
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<void | {
505
- status: boolean;
506
- }>, {
507
- code?: string | undefined;
508
- message?: string | undefined;
509
- }, FetchOptions["throw"] extends true ? true : false>>;
510
- } & {
511
- sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
512
- email: string;
513
- callbackURL?: string | undefined;
514
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
515
- email: string;
516
- callbackURL?: string | undefined;
517
- } & {
518
- fetchOptions?: FetchOptions | undefined;
519
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
520
- status: boolean;
521
- }, {
522
- code?: string | undefined;
523
- message?: string | undefined;
524
- }, FetchOptions["throw"] extends true ? true : false>>;
525
- } & {
526
- changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
527
- newEmail: string;
528
- callbackURL?: string | undefined;
529
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
530
- newEmail: string;
531
- callbackURL?: string | undefined;
532
- } & {
533
- fetchOptions?: FetchOptions | undefined;
534
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
535
- status: boolean;
536
- }, {
537
- code?: string | undefined;
538
- message?: string | undefined;
539
- }, FetchOptions["throw"] extends true ? true : false>>;
540
- } & {
541
- changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
542
- newPassword: string;
543
- currentPassword: string;
544
- revokeOtherSessions?: boolean | undefined;
545
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
546
- newPassword: string;
547
- currentPassword: string;
548
- revokeOtherSessions?: boolean | undefined;
549
399
  } & {
550
- fetchOptions?: FetchOptions | undefined;
551
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
552
- token: string | null;
553
- user: {
400
+ listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
401
+ query?: Record<string, any> | undefined;
402
+ fetchOptions?: FetchOptions | undefined;
403
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<import("better-auth").Prettify<{
554
404
  id: string;
555
- email: string;
556
- name: string;
557
- image: string | null | undefined;
558
- emailVerified: boolean;
559
405
  createdAt: Date;
560
406
  updatedAt: Date;
561
- };
562
- }, {
563
- code?: string | undefined;
564
- message?: string | undefined;
565
- }, FetchOptions["throw"] extends true ? true : false>>;
566
- } & {
567
- updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
568
- name?: string | undefined;
569
- image?: string | undefined | null;
570
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
571
- image?: (string | null) | undefined;
572
- name?: string | undefined;
573
- fetchOptions?: FetchOptions | undefined;
574
- } & Partial<{} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
575
- status: boolean;
576
- }, {
577
- code?: string | undefined;
578
- message?: string | undefined;
579
- }, FetchOptions["throw"] extends true ? true : false>>;
580
- } & {
581
- deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
582
- callbackURL?: string | undefined;
583
- password?: string | undefined;
584
- token?: string | undefined;
585
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
586
- callbackURL?: string | undefined;
587
- password?: string | undefined;
588
- token?: string | undefined;
589
- } & {
590
- fetchOptions?: FetchOptions | undefined;
591
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
592
- success: boolean;
593
- message: string;
594
- }, {
595
- code?: string | undefined;
596
- message?: string | undefined;
597
- }, FetchOptions["throw"] extends true ? true : false>>;
598
- } & {
599
- requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
600
- email: string;
601
- redirectTo?: string | undefined;
602
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
603
- email: string;
604
- redirectTo?: string | undefined;
605
- } & {
606
- fetchOptions?: FetchOptions | undefined;
607
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
608
- status: boolean;
609
- message: string;
610
- }, {
611
- code?: string | undefined;
612
- message?: string | undefined;
613
- }, FetchOptions["throw"] extends true ? true : false>>;
614
- } & {
615
- resetPassword: {
616
- ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
617
- callbackURL: string;
618
- }> & Record<string, any>, {
407
+ userId: string;
408
+ expiresAt: Date;
619
409
  token: string;
620
- }>>(data_0: import("better-auth").Prettify<{
621
- query: {
622
- callbackURL: string;
623
- };
624
- fetchOptions?: FetchOptions | undefined;
625
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<never, {
410
+ ipAddress?: string | null | undefined | undefined;
411
+ userAgent?: string | null | undefined | undefined;
412
+ }>[], {
626
413
  code?: string | undefined;
627
414
  message?: string | undefined;
628
415
  }, FetchOptions["throw"] extends true ? true : false>>;
629
- };
630
- } & {
631
- listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
632
- query?: Record<string, any> | undefined;
633
- fetchOptions?: FetchOptions | undefined;
634
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<import("better-auth").Prettify<{
635
- id: string;
636
- createdAt: Date;
637
- updatedAt: Date;
638
- userId: string;
639
- expiresAt: Date;
640
- token: string;
641
- ipAddress?: string | null | undefined | undefined;
642
- userAgent?: string | null | undefined | undefined;
643
- }>[], {
644
- code?: string | undefined;
645
- message?: string | undefined;
646
- }, FetchOptions["throw"] extends true ? true : false>>;
647
- } & {
648
- revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
649
- token: string;
650
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
651
- token: string;
652
416
  } & {
653
- fetchOptions?: FetchOptions | undefined;
654
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
655
- status: boolean;
656
- }, {
657
- code?: string | undefined;
658
- message?: string | undefined;
659
- }, FetchOptions["throw"] extends true ? true : false>>;
660
- } & {
661
- revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
662
- query?: Record<string, any> | undefined;
663
- fetchOptions?: FetchOptions | undefined;
664
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
665
- status: boolean;
666
- }, {
667
- code?: string | undefined;
668
- message?: string | undefined;
669
- }, FetchOptions["throw"] extends true ? true : false>>;
670
- } & {
671
- revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
672
- query?: Record<string, any> | undefined;
673
- fetchOptions?: FetchOptions | undefined;
674
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
675
- status: boolean;
676
- }, {
677
- code?: string | undefined;
678
- message?: string | undefined;
679
- }, FetchOptions["throw"] extends true ? true : false>>;
680
- } & {
681
- linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
682
- provider: unknown;
683
- callbackURL?: string | undefined;
684
- idToken?: {
417
+ revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
685
418
  token: string;
686
- nonce?: string | undefined;
687
- accessToken?: string | undefined;
688
- refreshToken?: string | undefined;
689
- scopes?: string[] | undefined;
690
- } | undefined;
691
- requestSignUp?: boolean | undefined;
692
- scopes?: string[] | undefined;
693
- errorCallbackURL?: string | undefined;
694
- disableRedirect?: boolean | undefined;
695
- additionalData?: Record<string, any> | undefined;
696
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
697
- provider: unknown;
698
- callbackURL?: string | undefined;
699
- idToken?: {
419
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
700
420
  token: string;
701
- nonce?: string | undefined;
702
- accessToken?: string | undefined;
703
- refreshToken?: string | undefined;
704
- scopes?: string[] | undefined;
705
- } | undefined;
706
- requestSignUp?: boolean | undefined;
707
- scopes?: string[] | undefined;
708
- errorCallbackURL?: string | undefined;
709
- disableRedirect?: boolean | undefined;
710
- additionalData?: Record<string, any> | undefined;
421
+ } & {
422
+ fetchOptions?: FetchOptions | undefined;
423
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
424
+ status: boolean;
425
+ }, {
426
+ code?: string | undefined;
427
+ message?: string | undefined;
428
+ }, FetchOptions["throw"] extends true ? true : false>>;
711
429
  } & {
712
- fetchOptions?: FetchOptions | undefined;
713
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
714
- url: string;
715
- redirect: boolean;
716
- }, {
717
- code?: string | undefined;
718
- message?: string | undefined;
719
- }, FetchOptions["throw"] extends true ? true : false>>;
720
- } & {
721
- listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
722
- query?: Record<string, any> | undefined;
723
- fetchOptions?: FetchOptions | undefined;
724
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
725
- id: string;
726
- providerId: string;
727
- createdAt: Date;
728
- updatedAt: Date;
729
- accountId: string;
730
- userId: string;
731
- scopes: string[];
732
- }[], {
733
- code?: string | undefined;
734
- message?: string | undefined;
735
- }, FetchOptions["throw"] extends true ? true : false>>;
736
- } & {
737
- deleteUser: {
738
- callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
739
- token: string;
430
+ revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
431
+ query?: Record<string, any> | undefined;
432
+ fetchOptions?: FetchOptions | undefined;
433
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
434
+ status: boolean;
435
+ }, {
436
+ code?: string | undefined;
437
+ message?: string | undefined;
438
+ }, FetchOptions["throw"] extends true ? true : false>>;
439
+ } & {
440
+ revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
441
+ query?: Record<string, any> | undefined;
442
+ fetchOptions?: FetchOptions | undefined;
443
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
444
+ status: boolean;
445
+ }, {
446
+ code?: string | undefined;
447
+ message?: string | undefined;
448
+ }, FetchOptions["throw"] extends true ? true : false>>;
449
+ } & {
450
+ linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
451
+ provider: unknown;
740
452
  callbackURL?: string | undefined;
741
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
742
- query: {
453
+ idToken?: {
743
454
  token: string;
744
- callbackURL?: string | undefined;
745
- };
455
+ nonce?: string | undefined;
456
+ accessToken?: string | undefined;
457
+ refreshToken?: string | undefined;
458
+ scopes?: string[] | undefined;
459
+ } | undefined;
460
+ requestSignUp?: boolean | undefined;
461
+ scopes?: string[] | undefined;
462
+ errorCallbackURL?: string | undefined;
463
+ disableRedirect?: boolean | undefined;
464
+ additionalData?: Record<string, any> | undefined;
465
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
466
+ provider: unknown;
467
+ callbackURL?: string | undefined;
468
+ idToken?: {
469
+ token: string;
470
+ nonce?: string | undefined;
471
+ accessToken?: string | undefined;
472
+ refreshToken?: string | undefined;
473
+ scopes?: string[] | undefined;
474
+ } | undefined;
475
+ requestSignUp?: boolean | undefined;
476
+ scopes?: string[] | undefined;
477
+ errorCallbackURL?: string | undefined;
478
+ disableRedirect?: boolean | undefined;
479
+ additionalData?: Record<string, any> | undefined;
480
+ } & {
746
481
  fetchOptions?: FetchOptions | undefined;
747
482
  }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
748
- success: boolean;
749
- message: string;
483
+ url: string;
484
+ redirect: boolean;
750
485
  }, {
751
486
  code?: string | undefined;
752
487
  message?: string | undefined;
753
488
  }, FetchOptions["throw"] extends true ? true : false>>;
754
- };
755
- } & {
756
- unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
757
- providerId: string;
758
- accountId?: string | undefined;
759
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
760
- providerId: string;
761
- accountId?: string | undefined;
762
- } & {
763
- fetchOptions?: FetchOptions | undefined;
764
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
765
- status: boolean;
766
- }, {
767
- code?: string | undefined;
768
- message?: string | undefined;
769
- }, FetchOptions["throw"] extends true ? true : false>>;
770
- } & {
771
- refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
772
- providerId: string;
773
- accountId?: string | undefined;
774
- userId?: string | undefined;
775
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
776
- providerId: string;
777
- accountId?: string | undefined;
778
- userId?: string | undefined;
779
489
  } & {
780
- fetchOptions?: FetchOptions | undefined;
781
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
782
- accessToken: string | undefined;
783
- refreshToken: string | undefined;
784
- accessTokenExpiresAt: Date | undefined;
785
- refreshTokenExpiresAt: Date | undefined;
786
- scope: string | null | undefined;
787
- idToken: string | null | undefined;
788
- providerId: string;
789
- accountId: string;
790
- }, {
791
- code?: string | undefined;
792
- message?: string | undefined;
793
- }, FetchOptions["throw"] extends true ? true : false>>;
794
- } & {
795
- getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
796
- providerId: string;
797
- accountId?: string | undefined;
798
- userId?: string | undefined;
799
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
800
- providerId: string;
801
- accountId?: string | undefined;
802
- userId?: string | undefined;
490
+ listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
491
+ query?: Record<string, any> | undefined;
492
+ fetchOptions?: FetchOptions | undefined;
493
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
494
+ id: string;
495
+ providerId: string;
496
+ createdAt: Date;
497
+ updatedAt: Date;
498
+ accountId: string;
499
+ userId: string;
500
+ scopes: string[];
501
+ }[], {
502
+ code?: string | undefined;
503
+ message?: string | undefined;
504
+ }, FetchOptions["throw"] extends true ? true : false>>;
803
505
  } & {
804
- fetchOptions?: FetchOptions | undefined;
805
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
806
- accessToken: string;
807
- accessTokenExpiresAt: Date | undefined;
808
- scopes: string[];
809
- idToken: string | undefined;
810
- }, {
811
- code?: string | undefined;
812
- message?: string | undefined;
813
- }, FetchOptions["throw"] extends true ? true : false>>;
814
- } & {
815
- accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
816
- accountId?: string | undefined;
817
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
818
- query?: {
819
- accountId?: string | undefined;
820
- } | undefined;
821
- fetchOptions?: FetchOptions | undefined;
822
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
823
- user: import("better-auth").OAuth2UserInfo;
824
- data: Record<string, any>;
825
- }, {
826
- code?: string | undefined;
827
- message?: string | undefined;
828
- }, FetchOptions["throw"] extends true ? true : false>>;
829
- } & {
830
- getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
831
- disableCookieCache?: unknown;
832
- disableRefresh?: unknown;
833
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
834
- query?: {
835
- disableCookieCache?: unknown;
836
- disableRefresh?: unknown;
837
- } | undefined;
838
- fetchOptions?: FetchOptions | undefined;
839
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
840
- user: {
841
- id: string;
842
- createdAt: Date;
843
- updatedAt: Date;
844
- email: string;
845
- emailVerified: boolean;
846
- name: string;
847
- image?: string | null | undefined;
848
- banned: boolean | null | undefined;
849
- role?: string | null | undefined;
850
- banReason?: string | null | undefined;
851
- banExpires?: Date | null | undefined;
852
- };
853
- session: {
854
- id: string;
855
- createdAt: Date;
856
- updatedAt: Date;
857
- userId: string;
858
- expiresAt: Date;
859
- token: string;
860
- ipAddress?: string | null | undefined;
861
- userAgent?: string | null | undefined;
862
- impersonatedBy?: string | null | undefined;
863
- };
864
- } | null, {
865
- code?: string | undefined;
866
- message?: string | undefined;
867
- }, FetchOptions["throw"] extends true ? true : false>>;
868
- } & {
869
- admin: {
870
- checkRolePermission: <R extends "user" | "admin">(data: ({
871
- permission: {
872
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
873
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
874
- };
875
- permissions?: never | undefined;
876
- } | {
877
- permissions: {
878
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
879
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
880
- };
881
- permission?: never | undefined;
882
- }) & {
883
- role: R;
884
- }) => boolean;
885
- };
886
- } & {
887
- useSession: {
888
- (): Readonly<import("vue").Ref<{
889
- readonly data: {
890
- readonly user: {
891
- readonly id: string;
892
- readonly createdAt: Date;
893
- readonly updatedAt: Date;
894
- readonly email: string;
895
- readonly emailVerified: boolean;
896
- readonly name: string;
897
- readonly image?: string | null | undefined;
898
- readonly banned: boolean | null | undefined;
899
- readonly role?: string | null | undefined;
900
- readonly banReason?: string | null | undefined;
901
- readonly banExpires?: Date | null | undefined;
902
- };
903
- readonly session: {
904
- readonly id: string;
905
- readonly createdAt: Date;
906
- readonly updatedAt: Date;
907
- readonly userId: string;
908
- readonly expiresAt: Date;
909
- readonly token: string;
910
- readonly ipAddress?: string | null | undefined;
911
- readonly userAgent?: string | null | undefined;
912
- readonly impersonatedBy?: string | null | undefined;
913
- };
914
- } | null;
915
- readonly isPending: boolean;
916
- readonly isRefetching: boolean;
917
- readonly error: import("better-auth/vue").BetterFetchError | null;
918
- }, {
919
- readonly data: {
920
- readonly user: {
921
- readonly id: string;
922
- readonly createdAt: Date;
923
- readonly updatedAt: Date;
924
- readonly email: string;
925
- readonly emailVerified: boolean;
926
- readonly name: string;
927
- readonly image?: string | null | undefined;
928
- readonly banned: boolean | null | undefined;
929
- readonly role?: string | null | undefined;
930
- readonly banReason?: string | null | undefined;
931
- readonly banExpires?: Date | null | undefined;
932
- };
933
- readonly session: {
934
- readonly id: string;
935
- readonly createdAt: Date;
936
- readonly updatedAt: Date;
937
- readonly userId: string;
938
- readonly expiresAt: Date;
939
- readonly token: string;
940
- readonly ipAddress?: string | null | undefined;
941
- readonly userAgent?: string | null | undefined;
942
- readonly impersonatedBy?: string | null | undefined;
943
- };
944
- } | null;
945
- readonly isPending: boolean;
946
- readonly isRefetching: boolean;
947
- readonly error: import("better-auth/vue").BetterFetchError | null;
948
- }>>;
949
- <F extends (...args: any) => any>(useFetch: F): Promise<{
950
- data: import("vue").Ref<{
951
- user: {
952
- id: string;
953
- createdAt: Date;
954
- updatedAt: Date;
955
- email: string;
956
- emailVerified: boolean;
957
- name: string;
958
- image?: string | null | undefined;
959
- banned: boolean | null | undefined;
960
- role?: string | null | undefined;
961
- banReason?: string | null | undefined;
962
- banExpires?: Date | null | undefined;
963
- };
964
- session: {
965
- id: string;
966
- createdAt: Date;
967
- updatedAt: Date;
968
- userId: string;
969
- expiresAt: Date;
970
- token: string;
971
- ipAddress?: string | null | undefined;
972
- userAgent?: string | null | undefined;
973
- impersonatedBy?: string | null | undefined;
974
- };
975
- } | null, {
976
- user: {
977
- id: string;
978
- createdAt: Date;
979
- updatedAt: Date;
980
- email: string;
981
- emailVerified: boolean;
982
- name: string;
983
- image?: string | null | undefined;
984
- banned: boolean | null | undefined;
985
- role?: string | null | undefined;
986
- banReason?: string | null | undefined;
987
- banExpires?: Date | null | undefined;
988
- };
989
- session: {
990
- id: string;
991
- createdAt: Date;
992
- updatedAt: Date;
993
- userId: string;
994
- expiresAt: Date;
506
+ deleteUser: {
507
+ callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
508
+ token: string;
509
+ callbackURL?: string | undefined;
510
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
511
+ query: {
995
512
  token: string;
996
- ipAddress?: string | null | undefined;
997
- userAgent?: string | null | undefined;
998
- impersonatedBy?: string | null | undefined;
513
+ callbackURL?: string | undefined;
999
514
  };
1000
- } | null>;
1001
- isPending: false;
1002
- error: import("vue").Ref<{
515
+ fetchOptions?: FetchOptions | undefined;
516
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
517
+ success: boolean;
518
+ message: string;
519
+ }, {
520
+ code?: string | undefined;
1003
521
  message?: string | undefined;
1004
- status: number;
1005
- statusText: string;
1006
- }>;
1007
- }>;
1008
- };
1009
- $Infer: {
1010
- Session: {
522
+ }, FetchOptions["throw"] extends true ? true : false>>;
523
+ };
524
+ } & {
525
+ unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
526
+ providerId: string;
527
+ accountId?: string | undefined;
528
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
529
+ providerId: string;
530
+ accountId?: string | undefined;
531
+ } & {
532
+ fetchOptions?: FetchOptions | undefined;
533
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
534
+ status: boolean;
535
+ }, {
536
+ code?: string | undefined;
537
+ message?: string | undefined;
538
+ }, FetchOptions["throw"] extends true ? true : false>>;
539
+ } & {
540
+ refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
541
+ providerId: string;
542
+ accountId?: string | undefined;
543
+ userId?: string | undefined;
544
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
545
+ providerId: string;
546
+ accountId?: string | undefined;
547
+ userId?: string | undefined;
548
+ } & {
549
+ fetchOptions?: FetchOptions | undefined;
550
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
551
+ accessToken: string | undefined;
552
+ refreshToken: string | undefined;
553
+ accessTokenExpiresAt: Date | undefined;
554
+ refreshTokenExpiresAt: Date | undefined;
555
+ scope: string | null | undefined;
556
+ idToken: string | null | undefined;
557
+ providerId: string;
558
+ accountId: string;
559
+ }, {
560
+ code?: string | undefined;
561
+ message?: string | undefined;
562
+ }, FetchOptions["throw"] extends true ? true : false>>;
563
+ } & {
564
+ getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
565
+ providerId: string;
566
+ accountId?: string | undefined;
567
+ userId?: string | undefined;
568
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
569
+ providerId: string;
570
+ accountId?: string | undefined;
571
+ userId?: string | undefined;
572
+ } & {
573
+ fetchOptions?: FetchOptions | undefined;
574
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
575
+ accessToken: string;
576
+ accessTokenExpiresAt: Date | undefined;
577
+ scopes: string[];
578
+ idToken: string | undefined;
579
+ }, {
580
+ code?: string | undefined;
581
+ message?: string | undefined;
582
+ }, FetchOptions["throw"] extends true ? true : false>>;
583
+ } & {
584
+ accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
585
+ accountId?: string | undefined;
586
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
587
+ query?: {
588
+ accountId?: string | undefined;
589
+ } | undefined;
590
+ fetchOptions?: FetchOptions | undefined;
591
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
592
+ user: import("better-auth").OAuth2UserInfo;
593
+ data: Record<string, any>;
594
+ }, {
595
+ code?: string | undefined;
596
+ message?: string | undefined;
597
+ }, FetchOptions["throw"] extends true ? true : false>>;
598
+ } & {
599
+ getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
600
+ disableCookieCache?: unknown;
601
+ disableRefresh?: unknown;
602
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
603
+ query?: {
604
+ disableCookieCache?: unknown;
605
+ disableRefresh?: unknown;
606
+ } | undefined;
607
+ fetchOptions?: FetchOptions | undefined;
608
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1011
609
  user: {
1012
610
  id: string;
1013
611
  createdAt: Date;
@@ -1016,10 +614,6 @@ declare const authClient: {
1016
614
  emailVerified: boolean;
1017
615
  name: string;
1018
616
  image?: string | null | undefined;
1019
- banned: boolean | null | undefined;
1020
- role?: string | null | undefined;
1021
- banReason?: string | null | undefined;
1022
- banExpires?: Date | null | undefined;
1023
617
  };
1024
618
  session: {
1025
619
  id: string;
@@ -1030,210 +624,282 @@ declare const authClient: {
1030
624
  token: string;
1031
625
  ipAddress?: string | null | undefined;
1032
626
  userAgent?: string | null | undefined;
1033
- impersonatedBy?: string | null | undefined;
1034
- };
1035
- };
1036
- };
1037
- $fetch: import("better-auth/vue").BetterFetch<{
1038
- plugins: (import("better-auth/vue").BetterFetchPlugin | {
1039
- id: string;
1040
- name: string;
1041
- hooks: {
1042
- onSuccess(context: import("better-auth/vue").SuccessContext<any>): void;
1043
627
  };
1044
- } | {
1045
- id: string;
1046
- name: string;
1047
- hooks: {
1048
- onSuccess: ((context: import("better-auth/vue").SuccessContext<any>) => Promise<void> | void) | undefined;
1049
- onError: ((context: import("better-auth/vue").ErrorContext) => Promise<void> | void) | undefined;
1050
- onRequest: (<T extends Record<string, any>>(context: import("better-auth/vue").RequestContext<T>) => Promise<import("better-auth/vue").RequestContext | void> | import("better-auth/vue").RequestContext | void) | undefined;
1051
- onResponse: ((context: import("better-auth/vue").ResponseContext) => Promise<Response | void | import("better-auth/vue").ResponseContext> | Response | import("better-auth/vue").ResponseContext | void) | undefined;
628
+ } | null, {
629
+ code?: string | undefined;
630
+ message?: string | undefined;
631
+ }, FetchOptions["throw"] extends true ? true : false>>;
632
+ } & {
633
+ useSession: {
634
+ (): Readonly<import("vue").Ref<{
635
+ readonly data: {
636
+ readonly user: {
637
+ readonly id: string;
638
+ readonly createdAt: Date;
639
+ readonly updatedAt: Date;
640
+ readonly email: string;
641
+ readonly emailVerified: boolean;
642
+ readonly name: string;
643
+ readonly image?: string | null | undefined;
644
+ };
645
+ readonly session: {
646
+ readonly id: string;
647
+ readonly createdAt: Date;
648
+ readonly updatedAt: Date;
649
+ readonly userId: string;
650
+ readonly expiresAt: Date;
651
+ readonly token: string;
652
+ readonly ipAddress?: string | null | undefined;
653
+ readonly userAgent?: string | null | undefined;
654
+ };
655
+ } | null;
656
+ readonly isPending: boolean;
657
+ readonly isRefetching: boolean;
658
+ readonly error: import("better-auth/vue").BetterFetchError | null;
659
+ }, {
660
+ readonly data: {
661
+ readonly user: {
662
+ readonly id: string;
663
+ readonly createdAt: Date;
664
+ readonly updatedAt: Date;
665
+ readonly email: string;
666
+ readonly emailVerified: boolean;
667
+ readonly name: string;
668
+ readonly image?: string | null | undefined;
669
+ };
670
+ readonly session: {
671
+ readonly id: string;
672
+ readonly createdAt: Date;
673
+ readonly updatedAt: Date;
674
+ readonly userId: string;
675
+ readonly expiresAt: Date;
676
+ readonly token: string;
677
+ readonly ipAddress?: string | null | undefined;
678
+ readonly userAgent?: string | null | undefined;
679
+ };
680
+ } | null;
681
+ readonly isPending: boolean;
682
+ readonly isRefetching: boolean;
683
+ readonly error: import("better-auth/vue").BetterFetchError | null;
684
+ }>>;
685
+ <F extends (...args: any) => any>(useFetch: F): Promise<{
686
+ data: import("vue").Ref<{
687
+ user: {
688
+ id: string;
689
+ createdAt: Date;
690
+ updatedAt: Date;
691
+ email: string;
692
+ emailVerified: boolean;
693
+ name: string;
694
+ image?: string | null | undefined;
695
+ };
696
+ session: {
697
+ id: string;
698
+ createdAt: Date;
699
+ updatedAt: Date;
700
+ userId: string;
701
+ expiresAt: Date;
702
+ token: string;
703
+ ipAddress?: string | null | undefined;
704
+ userAgent?: string | null | undefined;
705
+ };
706
+ } | null, {
707
+ user: {
708
+ id: string;
709
+ createdAt: Date;
710
+ updatedAt: Date;
711
+ email: string;
712
+ emailVerified: boolean;
713
+ name: string;
714
+ image?: string | null | undefined;
715
+ };
716
+ session: {
717
+ id: string;
718
+ createdAt: Date;
719
+ updatedAt: Date;
720
+ userId: string;
721
+ expiresAt: Date;
722
+ token: string;
723
+ ipAddress?: string | null | undefined;
724
+ userAgent?: string | null | undefined;
725
+ };
726
+ } | null>;
727
+ isPending: false;
728
+ error: import("vue").Ref<{
729
+ message?: string | undefined;
730
+ status: number;
731
+ statusText: string;
732
+ }>;
733
+ }>;
734
+ };
735
+ $Infer: {
736
+ Session: {
737
+ user: {
738
+ id: string;
739
+ createdAt: Date;
740
+ updatedAt: Date;
741
+ email: string;
742
+ emailVerified: boolean;
743
+ name: string;
744
+ image?: string | null | undefined;
745
+ };
746
+ session: {
747
+ id: string;
748
+ createdAt: Date;
749
+ updatedAt: Date;
750
+ userId: string;
751
+ expiresAt: Date;
752
+ token: string;
753
+ ipAddress?: string | null | undefined;
754
+ userAgent?: string | null | undefined;
755
+ };
1052
756
  };
1053
- })[];
1054
- cache?: RequestCache | undefined;
1055
- method: string;
1056
- headers?: (HeadersInit & (HeadersInit | {
1057
- accept: "application/json" | "text/plain" | "application/octet-stream";
1058
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1059
- authorization: "Bearer" | "Basic";
1060
- })) | undefined;
1061
- redirect?: RequestRedirect | undefined;
1062
- credentials?: RequestCredentials;
1063
- integrity?: string | undefined;
1064
- keepalive?: boolean | undefined;
1065
- mode?: RequestMode | undefined;
1066
- priority?: RequestPriority | undefined;
1067
- referrer?: string | undefined;
1068
- referrerPolicy?: ReferrerPolicy | undefined;
1069
- signal?: (AbortSignal | null) | undefined;
1070
- window?: null | undefined;
1071
- onRetry?: ((response: import("better-auth/vue").ResponseContext) => Promise<void> | void) | undefined;
1072
- hookOptions?: {
1073
- cloneResponse?: boolean;
1074
- } | undefined;
1075
- timeout?: number | undefined;
1076
- customFetchImpl: import("better-auth/vue").FetchEsque;
1077
- baseURL: string;
1078
- throw?: boolean | undefined;
1079
- auth?: ({
1080
- type: "Bearer";
1081
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1082
- } | {
1083
- type: "Basic";
1084
- username: string | (() => string | undefined) | undefined;
1085
- password: string | (() => string | undefined) | undefined;
1086
- } | {
1087
- type: "Custom";
1088
- prefix: string | (() => string | undefined) | undefined;
1089
- value: string | (() => string | undefined) | undefined;
1090
- }) | undefined;
1091
- body?: any;
1092
- query?: any;
1093
- params?: any;
1094
- duplex?: "full" | "half" | undefined;
1095
- jsonParser: (text: string) => Promise<any> | any;
1096
- retry?: import("better-auth/vue").RetryOptions | undefined;
1097
- retryAttempt?: number | undefined;
1098
- output?: (import("better-auth/vue").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1099
- errorSchema?: import("better-auth/vue").StandardSchemaV1 | undefined;
1100
- disableValidation?: boolean | undefined;
1101
- disableSignal?: boolean | undefined;
1102
- }, unknown, unknown, {}>;
1103
- $store: {
1104
- notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
1105
- listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
1106
- atoms: Record<string, import("better-auth/vue").WritableAtom<any>>;
1107
- };
1108
- $ERROR_CODES: {
1109
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
1110
- readonly USER_ALREADY_EXISTS: "User already exists.";
1111
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
1112
- readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
1113
- readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
1114
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
1115
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
1116
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
1117
- readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
1118
- readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
1119
- readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
1120
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
1121
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
1122
- readonly BANNED_USER: "You have been banned from this application";
1123
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
1124
- readonly NO_DATA_TO_UPDATE: "No data to update";
1125
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
1126
- readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
1127
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
1128
- readonly USER_NOT_FOUND: "User not found";
1129
- readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
1130
- readonly FAILED_TO_UPDATE_USER: "Failed to update user";
1131
- readonly FAILED_TO_GET_SESSION: "Failed to get session";
1132
- readonly INVALID_PASSWORD: "Invalid password";
1133
- readonly INVALID_EMAIL: "Invalid email";
1134
- readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
1135
- readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
1136
- readonly PROVIDER_NOT_FOUND: "Provider not found";
1137
- readonly INVALID_TOKEN: "Invalid token";
1138
- readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
1139
- readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
1140
- readonly USER_EMAIL_NOT_FOUND: "User email not found";
1141
- readonly EMAIL_NOT_VERIFIED: "Email not verified";
1142
- readonly PASSWORD_TOO_SHORT: "Password too short";
1143
- readonly PASSWORD_TOO_LONG: "Password too long";
1144
- readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
1145
- readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
1146
- readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
1147
- readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
1148
- readonly ACCOUNT_NOT_FOUND: "Account not found";
1149
- readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
757
+ };
758
+ $fetch: import("better-auth/vue").BetterFetch<{
759
+ plugins: (import("better-auth/vue").BetterFetchPlugin | {
760
+ id: string;
761
+ name: string;
762
+ hooks: {
763
+ onSuccess(context: import("better-auth/vue").SuccessContext<any>): void;
764
+ };
765
+ } | {
766
+ id: string;
767
+ name: string;
768
+ hooks: {
769
+ onSuccess: ((context: import("better-auth/vue").SuccessContext<any>) => Promise<void> | void) | undefined;
770
+ onError: ((context: import("better-auth/vue").ErrorContext) => Promise<void> | void) | undefined;
771
+ onRequest: (<T extends Record<string, any>>(context: import("better-auth/vue").RequestContext<T>) => Promise<import("better-auth/vue").RequestContext | void> | import("better-auth/vue").RequestContext | void) | undefined;
772
+ onResponse: ((context: import("better-auth/vue").ResponseContext) => Promise<Response | void | import("better-auth/vue").ResponseContext> | Response | import("better-auth/vue").ResponseContext | void) | undefined;
773
+ };
774
+ })[];
775
+ cache?: RequestCache | undefined;
776
+ method: string;
777
+ headers?: (HeadersInit & (HeadersInit | {
778
+ accept: "application/json" | "text/plain" | "application/octet-stream";
779
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
780
+ authorization: "Bearer" | "Basic";
781
+ })) | undefined;
782
+ redirect?: RequestRedirect | undefined;
783
+ credentials?: RequestCredentials;
784
+ integrity?: string | undefined;
785
+ keepalive?: boolean | undefined;
786
+ mode?: RequestMode | undefined;
787
+ priority?: RequestPriority | undefined;
788
+ referrer?: string | undefined;
789
+ referrerPolicy?: ReferrerPolicy | undefined;
790
+ signal?: (AbortSignal | null) | undefined;
791
+ window?: null | undefined;
792
+ onRetry?: ((response: import("better-auth/vue").ResponseContext) => Promise<void> | void) | undefined;
793
+ hookOptions?: {
794
+ cloneResponse?: boolean;
795
+ } | undefined;
796
+ timeout?: number | undefined;
797
+ customFetchImpl: import("better-auth/vue").FetchEsque;
798
+ baseURL: string;
799
+ throw?: boolean | undefined;
800
+ auth?: ({
801
+ type: "Bearer";
802
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
803
+ } | {
804
+ type: "Basic";
805
+ username: string | (() => string | undefined) | undefined;
806
+ password: string | (() => string | undefined) | undefined;
807
+ } | {
808
+ type: "Custom";
809
+ prefix: string | (() => string | undefined) | undefined;
810
+ value: string | (() => string | undefined) | undefined;
811
+ }) | undefined;
812
+ body?: any;
813
+ query?: any;
814
+ params?: any;
815
+ duplex?: "full" | "half" | undefined;
816
+ jsonParser: (text: string) => Promise<any> | any;
817
+ retry?: import("better-auth/vue").RetryOptions | undefined;
818
+ retryAttempt?: number | undefined;
819
+ output?: (import("better-auth/vue").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
820
+ errorSchema?: import("better-auth/vue").StandardSchemaV1 | undefined;
821
+ disableValidation?: boolean | undefined;
822
+ disableSignal?: boolean | undefined;
823
+ }, unknown, unknown, {}>;
824
+ $store: {
825
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
826
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
827
+ atoms: Record<string, import("better-auth/vue").WritableAtom<any>>;
828
+ };
829
+ $ERROR_CODES: {
830
+ readonly USER_NOT_FOUND: "User not found";
831
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
832
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
833
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
834
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
835
+ readonly INVALID_PASSWORD: "Invalid password";
836
+ readonly INVALID_EMAIL: "Invalid email";
837
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
838
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
839
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
840
+ readonly INVALID_TOKEN: "Invalid token";
841
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
842
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
843
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
844
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
845
+ readonly PASSWORD_TOO_SHORT: "Password too short";
846
+ readonly PASSWORD_TOO_LONG: "Password too long";
847
+ readonly USER_ALREADY_EXISTS: "User already exists.";
848
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
849
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
850
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
851
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
852
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
853
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
854
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
855
+ };
1150
856
  };
1151
857
  };
1152
- /**
1153
- * Main authentication composable for Better Auth
1154
- */
1155
- export declare function useAuth(): {
1156
- session: Readonly<import("vue").Ref<{
1157
- readonly data: {
1158
- readonly user: {
1159
- readonly id: string;
1160
- readonly createdAt: Date;
1161
- readonly updatedAt: Date;
1162
- readonly email: string;
1163
- readonly emailVerified: boolean;
1164
- readonly name: string;
1165
- readonly image?: string | null | undefined;
1166
- readonly banned: boolean | null | undefined;
1167
- readonly role?: string | null | undefined;
1168
- readonly banReason?: string | null | undefined;
1169
- readonly banExpires?: Date | null | undefined;
1170
- };
1171
- readonly session: {
1172
- readonly id: string;
1173
- readonly createdAt: Date;
1174
- readonly updatedAt: Date;
1175
- readonly userId: string;
1176
- readonly expiresAt: Date;
1177
- readonly token: string;
1178
- readonly ipAddress?: string | null | undefined;
1179
- readonly userAgent?: string | null | undefined;
1180
- readonly impersonatedBy?: string | null | undefined;
1181
- };
1182
- } | null;
1183
- readonly isPending: boolean;
1184
- readonly isRefetching: boolean;
1185
- readonly error: import("better-auth/vue").BetterFetchError | null;
1186
- }, {
1187
- readonly data: {
1188
- readonly user: {
1189
- readonly id: string;
1190
- readonly createdAt: Date;
1191
- readonly updatedAt: Date;
1192
- readonly email: string;
1193
- readonly emailVerified: boolean;
1194
- readonly name: string;
1195
- readonly image?: string | null | undefined;
1196
- readonly banned: boolean | null | undefined;
1197
- readonly role?: string | null | undefined;
1198
- readonly banReason?: string | null | undefined;
1199
- readonly banExpires?: Date | null | undefined;
1200
- };
1201
- readonly session: {
1202
- readonly id: string;
1203
- readonly createdAt: Date;
1204
- readonly updatedAt: Date;
1205
- readonly userId: string;
1206
- readonly expiresAt: Date;
1207
- readonly token: string;
1208
- readonly ipAddress?: string | null | undefined;
1209
- readonly userAgent?: string | null | undefined;
1210
- readonly impersonatedBy?: string | null | undefined;
1211
- };
1212
- } | null;
1213
- readonly isPending: boolean;
1214
- readonly isRefetching: boolean;
1215
- readonly error: import("better-auth/vue").BetterFetchError | null;
1216
- }>>;
1217
- isLoading: import("vue").ComputedRef<boolean>;
1218
- isAuthenticated: import("vue").ComputedRef<boolean>;
1219
- user: import("vue").ComputedRef<{
1220
- readonly id: string;
1221
- readonly createdAt: Date;
1222
- readonly updatedAt: Date;
1223
- readonly email: string;
1224
- readonly emailVerified: boolean;
1225
- readonly name: string;
1226
- readonly image?: string | null | undefined;
1227
- readonly banned: boolean | null | undefined;
1228
- readonly role?: string | null | undefined;
1229
- readonly banReason?: string | null | undefined;
1230
- readonly banExpires?: Date | null | undefined;
1231
- } | null>;
1232
- login: (returnTo?: string) => void;
1233
- register: (returnTo?: string) => void;
1234
- logout: () => Promise<void>;
1235
- refreshSession: () => Promise<{
1236
- data: {
858
+ export declare function getAuthClientExports(): {
859
+ signIn: {
860
+ social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
861
+ 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 & {});
862
+ callbackURL?: string | undefined;
863
+ newUserCallbackURL?: string | undefined;
864
+ errorCallbackURL?: string | undefined;
865
+ disableRedirect?: boolean | undefined;
866
+ idToken?: {
867
+ token: string;
868
+ nonce?: string | undefined;
869
+ accessToken?: string | undefined;
870
+ refreshToken?: string | undefined;
871
+ expiresAt?: number | undefined;
872
+ } | undefined;
873
+ scopes?: string[] | undefined;
874
+ requestSignUp?: boolean | undefined;
875
+ loginHint?: string | undefined;
876
+ additionalData?: Record<string, any> | undefined;
877
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
878
+ 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 & {});
879
+ callbackURL?: string | undefined;
880
+ newUserCallbackURL?: string | undefined;
881
+ errorCallbackURL?: string | undefined;
882
+ disableRedirect?: boolean | undefined;
883
+ idToken?: {
884
+ token: string;
885
+ nonce?: string | undefined;
886
+ accessToken?: string | undefined;
887
+ refreshToken?: string | undefined;
888
+ expiresAt?: number | undefined;
889
+ } | undefined;
890
+ scopes?: string[] | undefined;
891
+ requestSignUp?: boolean | undefined;
892
+ loginHint?: string | undefined;
893
+ additionalData?: Record<string, any> | undefined;
894
+ } & {
895
+ fetchOptions?: FetchOptions | undefined;
896
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
897
+ redirect: boolean;
898
+ url: string;
899
+ } | {
900
+ redirect: boolean;
901
+ token: string;
902
+ url: undefined;
1237
903
  user: {
1238
904
  id: string;
1239
905
  createdAt: Date;
@@ -1241,370 +907,233 @@ export declare function useAuth(): {
1241
907
  email: string;
1242
908
  emailVerified: boolean;
1243
909
  name: string;
1244
- image?: string | null | undefined;
1245
- banned: boolean | null | undefined;
1246
- role?: string | null | undefined;
1247
- banReason?: string | null | undefined;
1248
- banExpires?: Date | null | undefined;
910
+ image?: string | null | undefined | undefined;
1249
911
  };
1250
- session: {
912
+ }>, {
913
+ code?: string | undefined;
914
+ message?: string | undefined;
915
+ }, FetchOptions["throw"] extends true ? true : false>>;
916
+ } & {
917
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
918
+ email: string;
919
+ password: string;
920
+ callbackURL?: string | undefined;
921
+ rememberMe?: boolean | undefined;
922
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
923
+ email: string;
924
+ password: string;
925
+ callbackURL?: string | undefined;
926
+ rememberMe?: boolean | undefined;
927
+ } & {
928
+ fetchOptions?: FetchOptions | undefined;
929
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
930
+ redirect: boolean;
931
+ token: string;
932
+ url?: string | undefined;
933
+ user: {
1251
934
  id: string;
1252
935
  createdAt: Date;
1253
936
  updatedAt: Date;
1254
- userId: string;
1255
- expiresAt: Date;
1256
- token: string;
1257
- ipAddress?: string | null | undefined;
1258
- userAgent?: string | null | undefined;
1259
- impersonatedBy?: string | null | undefined;
1260
- };
1261
- } | null;
1262
- error: null;
1263
- } | {
1264
- data: null;
1265
- error: {
1266
- code?: string | undefined | undefined;
1267
- message?: string | undefined | undefined;
1268
- status: number;
1269
- statusText: string;
1270
- };
1271
- }>;
1272
- authClient: {
1273
- admin: {
1274
- setRole: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1275
- userId: string;
1276
- role: "user" | "admin" | ("user" | "admin")[];
1277
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1278
- userId: string;
1279
- role: "user" | "admin" | ("user" | "admin")[];
1280
- } & {
1281
- fetchOptions?: FetchOptions | undefined;
1282
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1283
- user: import("better-auth/client/plugins").UserWithRole;
1284
- }, {
1285
- code?: string | undefined;
1286
- message?: string | undefined;
1287
- }, FetchOptions["throw"] extends true ? true : false>>;
1288
- };
1289
- } & {
1290
- admin: {
1291
- getUser: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1292
- id: string;
1293
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1294
- query: {
1295
- id: string;
1296
- };
1297
- fetchOptions?: FetchOptions | undefined;
1298
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
937
+ email: string;
938
+ emailVerified: boolean;
939
+ name: string;
940
+ image?: string | null | undefined | undefined;
941
+ };
942
+ }, {
943
+ code?: string | undefined;
944
+ message?: string | undefined;
945
+ }, FetchOptions["throw"] extends true ? true : false>>;
946
+ };
947
+ signUp: {
948
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
949
+ name: string;
950
+ email: string;
951
+ password: string;
952
+ image?: string | undefined;
953
+ callbackURL?: string | undefined;
954
+ rememberMe?: boolean | undefined;
955
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
956
+ email: string;
957
+ name: string;
958
+ password: string;
959
+ image?: string | undefined;
960
+ callbackURL?: string | undefined;
961
+ fetchOptions?: FetchOptions | undefined;
962
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
963
+ token: null;
964
+ user: {
1299
965
  id: string;
1300
966
  createdAt: Date;
1301
967
  updatedAt: Date;
1302
968
  email: string;
1303
969
  emailVerified: boolean;
1304
970
  name: string;
1305
- image?: string | null | undefined;
1306
- }, {
1307
- code?: string | undefined;
1308
- message?: string | undefined;
1309
- }, FetchOptions["throw"] extends true ? true : false>>;
1310
- };
1311
- } & {
1312
- admin: {
1313
- createUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1314
- email: string;
1315
- password: string;
1316
- name: string;
1317
- role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1318
- data?: Record<string, any> | undefined;
1319
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
971
+ image?: string | null | undefined | undefined;
972
+ };
973
+ } | {
974
+ token: string;
975
+ user: {
976
+ id: string;
977
+ createdAt: Date;
978
+ updatedAt: Date;
1320
979
  email: string;
1321
- password: string;
980
+ emailVerified: boolean;
1322
981
  name: string;
1323
- role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1324
- data?: Record<string, any> | undefined;
1325
- } & {
1326
- fetchOptions?: FetchOptions | undefined;
1327
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1328
- user: import("better-auth/client/plugins").UserWithRole;
1329
- }, {
1330
- code?: string | undefined;
1331
- message?: string | undefined;
1332
- }, FetchOptions["throw"] extends true ? true : false>>;
1333
- };
1334
- } & {
1335
- admin: {
1336
- updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1337
- userId: unknown;
1338
- data: Record<any, any>;
1339
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1340
- userId: unknown;
1341
- data: Record<any, any>;
1342
- } & {
1343
- fetchOptions?: FetchOptions | undefined;
1344
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<import("better-auth/client/plugins").UserWithRole, {
1345
- code?: string | undefined;
1346
- message?: string | undefined;
1347
- }, FetchOptions["throw"] extends true ? true : false>>;
1348
- };
1349
- } & {
1350
- admin: {
1351
- listUsers: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1352
- searchValue?: string | undefined;
1353
- searchField?: "name" | "email" | undefined;
1354
- searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
1355
- limit?: string | number | undefined;
1356
- offset?: string | number | undefined;
1357
- sortBy?: string | undefined;
1358
- sortDirection?: "asc" | "desc" | undefined;
1359
- filterField?: string | undefined;
1360
- filterValue?: string | number | boolean | undefined;
1361
- filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
1362
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1363
- query: {
1364
- searchValue?: string | undefined;
1365
- searchField?: "name" | "email" | undefined;
1366
- searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
1367
- limit?: string | number | undefined;
1368
- offset?: string | number | undefined;
1369
- sortBy?: string | undefined;
1370
- sortDirection?: "asc" | "desc" | undefined;
1371
- filterField?: string | undefined;
1372
- filterValue?: string | number | boolean | undefined;
1373
- filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
982
+ image?: string | null | undefined | undefined;
983
+ };
984
+ }>, {
985
+ code?: string | undefined;
986
+ message?: string | undefined;
987
+ }, FetchOptions["throw"] extends true ? true : false>>;
988
+ };
989
+ signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
990
+ query?: Record<string, any> | undefined;
991
+ fetchOptions?: FetchOptions | undefined;
992
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
993
+ success: boolean;
994
+ }, {
995
+ code?: string | undefined;
996
+ message?: string | undefined;
997
+ }, FetchOptions["throw"] extends true ? true : false>>;
998
+ useSession: {
999
+ (): Readonly<import("vue").Ref<{
1000
+ readonly data: {
1001
+ readonly user: {
1002
+ readonly id: string;
1003
+ readonly createdAt: Date;
1004
+ readonly updatedAt: Date;
1005
+ readonly email: string;
1006
+ readonly emailVerified: boolean;
1007
+ readonly name: string;
1008
+ readonly image?: string | null | undefined;
1374
1009
  };
1375
- fetchOptions?: FetchOptions | undefined;
1376
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
1377
- users: import("better-auth/client/plugins").UserWithRole[];
1378
- total: number;
1379
- limit: number | undefined;
1380
- offset: number | undefined;
1381
- } | {
1382
- users: never[];
1383
- total: number;
1384
- }>, {
1385
- code?: string | undefined;
1386
- message?: string | undefined;
1387
- }, FetchOptions["throw"] extends true ? true : false>>;
1388
- };
1389
- } & {
1390
- admin: {
1391
- listUserSessions: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1392
- userId: unknown;
1393
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1394
- userId: unknown;
1395
- } & {
1396
- fetchOptions?: FetchOptions | undefined;
1397
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1398
- sessions: import("better-auth/client/plugins").SessionWithImpersonatedBy[];
1399
- }, {
1400
- code?: string | undefined;
1401
- message?: string | undefined;
1402
- }, FetchOptions["throw"] extends true ? true : false>>;
1403
- };
1404
- } & {
1405
- admin: {
1406
- unbanUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1407
- userId: unknown;
1408
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1409
- userId: unknown;
1410
- } & {
1411
- fetchOptions?: FetchOptions | undefined;
1412
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1413
- user: {
1414
- id: string;
1415
- createdAt: Date;
1416
- updatedAt: Date;
1417
- email: string;
1418
- emailVerified: boolean;
1419
- name: string;
1420
- image?: string | null | undefined;
1421
- } & Record<string, any>;
1422
- }, {
1423
- code?: string | undefined;
1424
- message?: string | undefined;
1425
- }, FetchOptions["throw"] extends true ? true : false>>;
1426
- };
1427
- } & {
1428
- admin: {
1429
- banUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1430
- userId: unknown;
1431
- banReason?: string | undefined;
1432
- banExpiresIn?: number | undefined;
1433
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1434
- userId: unknown;
1435
- banReason?: string | undefined;
1436
- banExpiresIn?: number | undefined;
1437
- } & {
1438
- fetchOptions?: FetchOptions | undefined;
1439
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1440
- user: {
1441
- id: string;
1442
- createdAt: Date;
1443
- updatedAt: Date;
1444
- email: string;
1445
- emailVerified: boolean;
1446
- name: string;
1447
- image?: string | null | undefined;
1448
- } & Record<string, any>;
1449
- }, {
1450
- code?: string | undefined;
1451
- message?: string | undefined;
1452
- }, FetchOptions["throw"] extends true ? true : false>>;
1453
- };
1454
- } & {
1455
- admin: {
1456
- impersonateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1457
- userId: unknown;
1458
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1459
- userId: unknown;
1460
- } & {
1461
- fetchOptions?: FetchOptions | undefined;
1462
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1463
- session: {
1464
- id: string;
1465
- createdAt: Date;
1466
- updatedAt: Date;
1467
- userId: string;
1468
- expiresAt: Date;
1469
- token: string;
1470
- ipAddress?: string | null | undefined;
1471
- userAgent?: string | null | undefined;
1010
+ readonly session: {
1011
+ readonly id: string;
1012
+ readonly createdAt: Date;
1013
+ readonly updatedAt: Date;
1014
+ readonly userId: string;
1015
+ readonly expiresAt: Date;
1016
+ readonly token: string;
1017
+ readonly ipAddress?: string | null | undefined;
1018
+ readonly userAgent?: string | null | undefined;
1472
1019
  };
1473
- user: {
1474
- id: string;
1475
- createdAt: Date;
1476
- updatedAt: Date;
1477
- email: string;
1478
- emailVerified: boolean;
1479
- name: string;
1480
- image?: string | null | undefined;
1020
+ } | null;
1021
+ readonly isPending: boolean;
1022
+ readonly isRefetching: boolean;
1023
+ readonly error: import("better-auth/vue").BetterFetchError | null;
1024
+ }, {
1025
+ readonly data: {
1026
+ readonly user: {
1027
+ readonly id: string;
1028
+ readonly createdAt: Date;
1029
+ readonly updatedAt: Date;
1030
+ readonly email: string;
1031
+ readonly emailVerified: boolean;
1032
+ readonly name: string;
1033
+ readonly image?: string | null | undefined;
1481
1034
  };
1482
- }, {
1483
- code?: string | undefined;
1484
- message?: string | undefined;
1485
- }, FetchOptions["throw"] extends true ? true : false>>;
1486
- };
1487
- } & {
1488
- admin: {
1489
- stopImpersonating: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1490
- query?: Record<string, any> | undefined;
1491
- fetchOptions?: FetchOptions | undefined;
1492
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1493
- session: import("better-auth").Session & Record<string, any>;
1494
- user: import("better-auth").User & Record<string, any>;
1495
- }, {
1496
- code?: string | undefined;
1497
- message?: string | undefined;
1498
- }, FetchOptions["throw"] extends true ? true : false>>;
1499
- };
1500
- } & {
1501
- admin: {
1502
- revokeUserSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1503
- sessionToken: string;
1504
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1505
- sessionToken: string;
1506
- } & {
1507
- fetchOptions?: FetchOptions | undefined;
1508
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1509
- success: boolean;
1510
- }, {
1511
- code?: string | undefined;
1512
- message?: string | undefined;
1513
- }, FetchOptions["throw"] extends true ? true : false>>;
1514
- };
1515
- } & {
1516
- admin: {
1517
- revokeUserSessions: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1518
- userId: unknown;
1519
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1520
- userId: unknown;
1521
- } & {
1522
- fetchOptions?: FetchOptions | undefined;
1523
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1524
- success: boolean;
1525
- }, {
1526
- code?: string | undefined;
1527
- message?: string | undefined;
1528
- }, FetchOptions["throw"] extends true ? true : false>>;
1529
- };
1530
- } & {
1531
- admin: {
1532
- removeUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1533
- userId: unknown;
1534
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1535
- userId: unknown;
1536
- } & {
1537
- fetchOptions?: FetchOptions | undefined;
1538
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1539
- success: boolean;
1540
- }, {
1541
- code?: string | undefined;
1542
- message?: string | undefined;
1543
- }, FetchOptions["throw"] extends true ? true : false>>;
1544
- };
1545
- } & {
1546
- admin: {
1547
- setUserPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1548
- newPassword: string;
1549
- userId: unknown;
1550
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1551
- newPassword: string;
1552
- userId: unknown;
1553
- } & {
1554
- fetchOptions?: FetchOptions | undefined;
1555
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1556
- status: boolean;
1557
- }, {
1558
- code?: string | undefined;
1559
- message?: string | undefined;
1560
- }, FetchOptions["throw"] extends true ? true : false>>;
1561
- };
1562
- } & {
1563
- admin: {
1564
- hasPermission: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<({
1565
- permission: {
1566
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1567
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1035
+ readonly session: {
1036
+ readonly id: string;
1037
+ readonly createdAt: Date;
1038
+ readonly updatedAt: Date;
1039
+ readonly userId: string;
1040
+ readonly expiresAt: Date;
1041
+ readonly token: string;
1042
+ readonly ipAddress?: string | null | undefined;
1043
+ readonly userAgent?: string | null | undefined;
1568
1044
  };
1569
- permissions?: never | undefined;
1570
- } | {
1571
- permissions: {
1572
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1573
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1045
+ } | null;
1046
+ readonly isPending: boolean;
1047
+ readonly isRefetching: boolean;
1048
+ readonly error: import("better-auth/vue").BetterFetchError | null;
1049
+ }>>;
1050
+ <F extends (...args: any) => any>(useFetch: F): Promise<{
1051
+ data: import("vue").Ref<{
1052
+ user: {
1053
+ id: string;
1054
+ createdAt: Date;
1055
+ updatedAt: Date;
1056
+ email: string;
1057
+ emailVerified: boolean;
1058
+ name: string;
1059
+ image?: string | null | undefined;
1574
1060
  };
1575
- permission?: never | undefined;
1576
- }) & {
1577
- userId?: string | undefined;
1578
- role?: "user" | "admin" | undefined;
1579
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<(({
1580
- permission: {
1581
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1582
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1061
+ session: {
1062
+ id: string;
1063
+ createdAt: Date;
1064
+ updatedAt: Date;
1065
+ userId: string;
1066
+ expiresAt: Date;
1067
+ token: string;
1068
+ ipAddress?: string | null | undefined;
1069
+ userAgent?: string | null | undefined;
1583
1070
  };
1584
- permissions?: never | undefined;
1585
- } | {
1586
- permissions: {
1587
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1588
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1071
+ } | null, {
1072
+ user: {
1073
+ id: string;
1074
+ createdAt: Date;
1075
+ updatedAt: Date;
1076
+ email: string;
1077
+ emailVerified: boolean;
1078
+ name: string;
1079
+ image?: string | null | undefined;
1589
1080
  };
1590
- permission?: never | undefined;
1591
- }) & {
1592
- userId?: string | undefined;
1593
- role?: "user" | "admin" | undefined;
1594
- }) & {
1595
- fetchOptions?: FetchOptions | undefined;
1596
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1597
- error: null;
1598
- success: boolean;
1599
- }, {
1600
- code?: string | undefined;
1081
+ session: {
1082
+ id: string;
1083
+ createdAt: Date;
1084
+ updatedAt: Date;
1085
+ userId: string;
1086
+ expiresAt: Date;
1087
+ token: string;
1088
+ ipAddress?: string | null | undefined;
1089
+ userAgent?: string | null | undefined;
1090
+ };
1091
+ } | null>;
1092
+ isPending: false;
1093
+ error: import("vue").Ref<{
1601
1094
  message?: string | undefined;
1602
- }, FetchOptions["throw"] extends true ? true : false>>;
1095
+ status: number;
1096
+ statusText: string;
1097
+ }>;
1098
+ }>;
1099
+ };
1100
+ getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1101
+ disableCookieCache?: unknown;
1102
+ disableRefresh?: unknown;
1103
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1104
+ query?: {
1105
+ disableCookieCache?: unknown;
1106
+ disableRefresh?: unknown;
1107
+ } | undefined;
1108
+ fetchOptions?: FetchOptions | undefined;
1109
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1110
+ user: {
1111
+ id: string;
1112
+ createdAt: Date;
1113
+ updatedAt: Date;
1114
+ email: string;
1115
+ emailVerified: boolean;
1116
+ name: string;
1117
+ image?: string | null | undefined;
1603
1118
  };
1604
- } & {
1119
+ session: {
1120
+ id: string;
1121
+ createdAt: Date;
1122
+ updatedAt: Date;
1123
+ userId: string;
1124
+ expiresAt: Date;
1125
+ token: string;
1126
+ ipAddress?: string | null | undefined;
1127
+ userAgent?: string | null | undefined;
1128
+ };
1129
+ } | null, {
1130
+ code?: string | undefined;
1131
+ message?: string | undefined;
1132
+ }, FetchOptions["throw"] extends true ? true : false>>;
1133
+ authClient: {
1605
1134
  signIn: {
1606
1135
  social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1607
- provider: (string & {}) | "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";
1136
+ 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 & {});
1608
1137
  callbackURL?: string | undefined;
1609
1138
  newUserCallbackURL?: string | undefined;
1610
1139
  errorCallbackURL?: string | undefined;
@@ -1621,7 +1150,7 @@ export declare function useAuth(): {
1621
1150
  loginHint?: string | undefined;
1622
1151
  additionalData?: Record<string, any> | undefined;
1623
1152
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1624
- provider: (string & {}) | "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";
1153
+ 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 & {});
1625
1154
  callbackURL?: string | undefined;
1626
1155
  newUserCallbackURL?: string | undefined;
1627
1156
  errorCallbackURL?: string | undefined;
@@ -1686,7 +1215,7 @@ export declare function useAuth(): {
1686
1215
  image?: string | undefined;
1687
1216
  callbackURL?: string | undefined;
1688
1217
  fetchOptions?: FetchOptions | undefined;
1689
- } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
1218
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
1690
1219
  token: null;
1691
1220
  user: {
1692
1221
  id: string;
@@ -1842,7 +1371,7 @@ export declare function useAuth(): {
1842
1371
  image?: (string | null) | undefined;
1843
1372
  name?: string | undefined;
1844
1373
  fetchOptions?: FetchOptions | undefined;
1845
- } & Partial<{} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1374
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
1846
1375
  status: boolean;
1847
1376
  }, {
1848
1377
  code?: string | undefined;
@@ -2116,10 +1645,6 @@ export declare function useAuth(): {
2116
1645
  emailVerified: boolean;
2117
1646
  name: string;
2118
1647
  image?: string | null | undefined;
2119
- banned: boolean | null | undefined;
2120
- role?: string | null | undefined;
2121
- banReason?: string | null | undefined;
2122
- banExpires?: Date | null | undefined;
2123
1648
  };
2124
1649
  session: {
2125
1650
  id: string;
@@ -2130,30 +1655,11 @@ export declare function useAuth(): {
2130
1655
  token: string;
2131
1656
  ipAddress?: string | null | undefined;
2132
1657
  userAgent?: string | null | undefined;
2133
- impersonatedBy?: string | null | undefined;
2134
1658
  };
2135
1659
  } | null, {
2136
1660
  code?: string | undefined;
2137
1661
  message?: string | undefined;
2138
1662
  }, FetchOptions["throw"] extends true ? true : false>>;
2139
- } & {
2140
- admin: {
2141
- checkRolePermission: <R extends "user" | "admin">(data: ({
2142
- permission: {
2143
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
2144
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
2145
- };
2146
- permissions?: never | undefined;
2147
- } | {
2148
- permissions: {
2149
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
2150
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
2151
- };
2152
- permission?: never | undefined;
2153
- }) & {
2154
- role: R;
2155
- }) => boolean;
2156
- };
2157
1663
  } & {
2158
1664
  useSession: {
2159
1665
  (): Readonly<import("vue").Ref<{
@@ -2166,10 +1672,6 @@ export declare function useAuth(): {
2166
1672
  readonly emailVerified: boolean;
2167
1673
  readonly name: string;
2168
1674
  readonly image?: string | null | undefined;
2169
- readonly banned: boolean | null | undefined;
2170
- readonly role?: string | null | undefined;
2171
- readonly banReason?: string | null | undefined;
2172
- readonly banExpires?: Date | null | undefined;
2173
1675
  };
2174
1676
  readonly session: {
2175
1677
  readonly id: string;
@@ -2180,7 +1682,6 @@ export declare function useAuth(): {
2180
1682
  readonly token: string;
2181
1683
  readonly ipAddress?: string | null | undefined;
2182
1684
  readonly userAgent?: string | null | undefined;
2183
- readonly impersonatedBy?: string | null | undefined;
2184
1685
  };
2185
1686
  } | null;
2186
1687
  readonly isPending: boolean;
@@ -2196,10 +1697,6 @@ export declare function useAuth(): {
2196
1697
  readonly emailVerified: boolean;
2197
1698
  readonly name: string;
2198
1699
  readonly image?: string | null | undefined;
2199
- readonly banned: boolean | null | undefined;
2200
- readonly role?: string | null | undefined;
2201
- readonly banReason?: string | null | undefined;
2202
- readonly banExpires?: Date | null | undefined;
2203
1700
  };
2204
1701
  readonly session: {
2205
1702
  readonly id: string;
@@ -2210,7 +1707,6 @@ export declare function useAuth(): {
2210
1707
  readonly token: string;
2211
1708
  readonly ipAddress?: string | null | undefined;
2212
1709
  readonly userAgent?: string | null | undefined;
2213
- readonly impersonatedBy?: string | null | undefined;
2214
1710
  };
2215
1711
  } | null;
2216
1712
  readonly isPending: boolean;
@@ -2227,10 +1723,6 @@ export declare function useAuth(): {
2227
1723
  emailVerified: boolean;
2228
1724
  name: string;
2229
1725
  image?: string | null | undefined;
2230
- banned: boolean | null | undefined;
2231
- role?: string | null | undefined;
2232
- banReason?: string | null | undefined;
2233
- banExpires?: Date | null | undefined;
2234
1726
  };
2235
1727
  session: {
2236
1728
  id: string;
@@ -2241,7 +1733,6 @@ export declare function useAuth(): {
2241
1733
  token: string;
2242
1734
  ipAddress?: string | null | undefined;
2243
1735
  userAgent?: string | null | undefined;
2244
- impersonatedBy?: string | null | undefined;
2245
1736
  };
2246
1737
  } | null, {
2247
1738
  user: {
@@ -2252,10 +1743,6 @@ export declare function useAuth(): {
2252
1743
  emailVerified: boolean;
2253
1744
  name: string;
2254
1745
  image?: string | null | undefined;
2255
- banned: boolean | null | undefined;
2256
- role?: string | null | undefined;
2257
- banReason?: string | null | undefined;
2258
- banExpires?: Date | null | undefined;
2259
1746
  };
2260
1747
  session: {
2261
1748
  id: string;
@@ -2266,7 +1753,6 @@ export declare function useAuth(): {
2266
1753
  token: string;
2267
1754
  ipAddress?: string | null | undefined;
2268
1755
  userAgent?: string | null | undefined;
2269
- impersonatedBy?: string | null | undefined;
2270
1756
  };
2271
1757
  } | null>;
2272
1758
  isPending: false;
@@ -2287,10 +1773,6 @@ export declare function useAuth(): {
2287
1773
  emailVerified: boolean;
2288
1774
  name: string;
2289
1775
  image?: string | null | undefined;
2290
- banned: boolean | null | undefined;
2291
- role?: string | null | undefined;
2292
- banReason?: string | null | undefined;
2293
- banExpires?: Date | null | undefined;
2294
1776
  };
2295
1777
  session: {
2296
1778
  id: string;
@@ -2301,7 +1783,6 @@ export declare function useAuth(): {
2301
1783
  token: string;
2302
1784
  ipAddress?: string | null | undefined;
2303
1785
  userAgent?: string | null | undefined;
2304
- impersonatedBy?: string | null | undefined;
2305
1786
  };
2306
1787
  };
2307
1788
  };
@@ -2377,26 +1858,8 @@ export declare function useAuth(): {
2377
1858
  atoms: Record<string, import("better-auth/vue").WritableAtom<any>>;
2378
1859
  };
2379
1860
  $ERROR_CODES: {
2380
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
2381
- readonly USER_ALREADY_EXISTS: "User already exists.";
2382
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2383
- readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
2384
- readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
2385
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
2386
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
2387
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
2388
- readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
2389
- readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
2390
- readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
2391
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
2392
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
2393
- readonly BANNED_USER: "You have been banned from this application";
2394
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
2395
- readonly NO_DATA_TO_UPDATE: "No data to update";
2396
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
2397
- readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
2398
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
2399
1861
  readonly USER_NOT_FOUND: "User not found";
1862
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
2400
1863
  readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2401
1864
  readonly FAILED_TO_UPDATE_USER: "Failed to update user";
2402
1865
  readonly FAILED_TO_GET_SESSION: "Failed to get session";
@@ -2412,6 +1875,8 @@ export declare function useAuth(): {
2412
1875
  readonly EMAIL_NOT_VERIFIED: "Email not verified";
2413
1876
  readonly PASSWORD_TOO_SHORT: "Password too short";
2414
1877
  readonly PASSWORD_TOO_LONG: "Password too long";
1878
+ readonly USER_ALREADY_EXISTS: "User already exists.";
1879
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2415
1880
  readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
2416
1881
  readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
2417
1882
  readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
@@ -2421,299 +1886,3 @@ export declare function useAuth(): {
2421
1886
  };
2422
1887
  };
2423
1888
  };
2424
- export declare const signIn: {
2425
- social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2426
- provider: (string & {}) | "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";
2427
- callbackURL?: string | undefined;
2428
- newUserCallbackURL?: string | undefined;
2429
- errorCallbackURL?: string | undefined;
2430
- disableRedirect?: boolean | undefined;
2431
- idToken?: {
2432
- token: string;
2433
- nonce?: string | undefined;
2434
- accessToken?: string | undefined;
2435
- refreshToken?: string | undefined;
2436
- expiresAt?: number | undefined;
2437
- } | undefined;
2438
- scopes?: string[] | undefined;
2439
- requestSignUp?: boolean | undefined;
2440
- loginHint?: string | undefined;
2441
- additionalData?: Record<string, any> | undefined;
2442
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2443
- provider: (string & {}) | "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";
2444
- callbackURL?: string | undefined;
2445
- newUserCallbackURL?: string | undefined;
2446
- errorCallbackURL?: string | undefined;
2447
- disableRedirect?: boolean | undefined;
2448
- idToken?: {
2449
- token: string;
2450
- nonce?: string | undefined;
2451
- accessToken?: string | undefined;
2452
- refreshToken?: string | undefined;
2453
- expiresAt?: number | undefined;
2454
- } | undefined;
2455
- scopes?: string[] | undefined;
2456
- requestSignUp?: boolean | undefined;
2457
- loginHint?: string | undefined;
2458
- additionalData?: Record<string, any> | undefined;
2459
- } & {
2460
- fetchOptions?: FetchOptions | undefined;
2461
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
2462
- redirect: boolean;
2463
- url: string;
2464
- } | {
2465
- redirect: boolean;
2466
- token: string;
2467
- url: undefined;
2468
- user: {
2469
- id: string;
2470
- createdAt: Date;
2471
- updatedAt: Date;
2472
- email: string;
2473
- emailVerified: boolean;
2474
- name: string;
2475
- image?: string | null | undefined | undefined;
2476
- };
2477
- }>, {
2478
- code?: string | undefined;
2479
- message?: string | undefined;
2480
- }, FetchOptions["throw"] extends true ? true : false>>;
2481
- } & {
2482
- email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2483
- email: string;
2484
- password: string;
2485
- callbackURL?: string | undefined;
2486
- rememberMe?: boolean | undefined;
2487
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2488
- email: string;
2489
- password: string;
2490
- callbackURL?: string | undefined;
2491
- rememberMe?: boolean | undefined;
2492
- } & {
2493
- fetchOptions?: FetchOptions | undefined;
2494
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
2495
- redirect: boolean;
2496
- token: string;
2497
- url?: string | undefined;
2498
- user: {
2499
- id: string;
2500
- createdAt: Date;
2501
- updatedAt: Date;
2502
- email: string;
2503
- emailVerified: boolean;
2504
- name: string;
2505
- image?: string | null | undefined | undefined;
2506
- };
2507
- }, {
2508
- code?: string | undefined;
2509
- message?: string | undefined;
2510
- }, FetchOptions["throw"] extends true ? true : false>>;
2511
- }, signUp: {
2512
- email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2513
- name: string;
2514
- email: string;
2515
- password: string;
2516
- image?: string | undefined;
2517
- callbackURL?: string | undefined;
2518
- rememberMe?: boolean | undefined;
2519
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2520
- email: string;
2521
- name: string;
2522
- password: string;
2523
- image?: string | undefined;
2524
- callbackURL?: string | undefined;
2525
- fetchOptions?: FetchOptions | undefined;
2526
- } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
2527
- token: null;
2528
- user: {
2529
- id: string;
2530
- createdAt: Date;
2531
- updatedAt: Date;
2532
- email: string;
2533
- emailVerified: boolean;
2534
- name: string;
2535
- image?: string | null | undefined | undefined;
2536
- };
2537
- } | {
2538
- token: string;
2539
- user: {
2540
- id: string;
2541
- createdAt: Date;
2542
- updatedAt: Date;
2543
- email: string;
2544
- emailVerified: boolean;
2545
- name: string;
2546
- image?: string | null | undefined | undefined;
2547
- };
2548
- }>, {
2549
- code?: string | undefined;
2550
- message?: string | undefined;
2551
- }, FetchOptions["throw"] extends true ? true : false>>;
2552
- }, signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2553
- query?: Record<string, any> | undefined;
2554
- fetchOptions?: FetchOptions | undefined;
2555
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
2556
- success: boolean;
2557
- }, {
2558
- code?: string | undefined;
2559
- message?: string | undefined;
2560
- }, FetchOptions["throw"] extends true ? true : false>>, useSession: {
2561
- (): Readonly<import("vue").Ref<{
2562
- readonly data: {
2563
- readonly user: {
2564
- readonly id: string;
2565
- readonly createdAt: Date;
2566
- readonly updatedAt: Date;
2567
- readonly email: string;
2568
- readonly emailVerified: boolean;
2569
- readonly name: string;
2570
- readonly image?: string | null | undefined;
2571
- readonly banned: boolean | null | undefined;
2572
- readonly role?: string | null | undefined;
2573
- readonly banReason?: string | null | undefined;
2574
- readonly banExpires?: Date | null | undefined;
2575
- };
2576
- readonly session: {
2577
- readonly id: string;
2578
- readonly createdAt: Date;
2579
- readonly updatedAt: Date;
2580
- readonly userId: string;
2581
- readonly expiresAt: Date;
2582
- readonly token: string;
2583
- readonly ipAddress?: string | null | undefined;
2584
- readonly userAgent?: string | null | undefined;
2585
- readonly impersonatedBy?: string | null | undefined;
2586
- };
2587
- } | null;
2588
- readonly isPending: boolean;
2589
- readonly isRefetching: boolean;
2590
- readonly error: import("better-auth/vue").BetterFetchError | null;
2591
- }, {
2592
- readonly data: {
2593
- readonly user: {
2594
- readonly id: string;
2595
- readonly createdAt: Date;
2596
- readonly updatedAt: Date;
2597
- readonly email: string;
2598
- readonly emailVerified: boolean;
2599
- readonly name: string;
2600
- readonly image?: string | null | undefined;
2601
- readonly banned: boolean | null | undefined;
2602
- readonly role?: string | null | undefined;
2603
- readonly banReason?: string | null | undefined;
2604
- readonly banExpires?: Date | null | undefined;
2605
- };
2606
- readonly session: {
2607
- readonly id: string;
2608
- readonly createdAt: Date;
2609
- readonly updatedAt: Date;
2610
- readonly userId: string;
2611
- readonly expiresAt: Date;
2612
- readonly token: string;
2613
- readonly ipAddress?: string | null | undefined;
2614
- readonly userAgent?: string | null | undefined;
2615
- readonly impersonatedBy?: string | null | undefined;
2616
- };
2617
- } | null;
2618
- readonly isPending: boolean;
2619
- readonly isRefetching: boolean;
2620
- readonly error: import("better-auth/vue").BetterFetchError | null;
2621
- }>>;
2622
- <F extends (...args: any) => any>(useFetch: F): Promise<{
2623
- data: import("vue").Ref<{
2624
- user: {
2625
- id: string;
2626
- createdAt: Date;
2627
- updatedAt: Date;
2628
- email: string;
2629
- emailVerified: boolean;
2630
- name: string;
2631
- image?: string | null | undefined;
2632
- banned: boolean | null | undefined;
2633
- role?: string | null | undefined;
2634
- banReason?: string | null | undefined;
2635
- banExpires?: Date | null | undefined;
2636
- };
2637
- session: {
2638
- id: string;
2639
- createdAt: Date;
2640
- updatedAt: Date;
2641
- userId: string;
2642
- expiresAt: Date;
2643
- token: string;
2644
- ipAddress?: string | null | undefined;
2645
- userAgent?: string | null | undefined;
2646
- impersonatedBy?: string | null | undefined;
2647
- };
2648
- } | null, {
2649
- user: {
2650
- id: string;
2651
- createdAt: Date;
2652
- updatedAt: Date;
2653
- email: string;
2654
- emailVerified: boolean;
2655
- name: string;
2656
- image?: string | null | undefined;
2657
- banned: boolean | null | undefined;
2658
- role?: string | null | undefined;
2659
- banReason?: string | null | undefined;
2660
- banExpires?: Date | null | undefined;
2661
- };
2662
- session: {
2663
- id: string;
2664
- createdAt: Date;
2665
- updatedAt: Date;
2666
- userId: string;
2667
- expiresAt: Date;
2668
- token: string;
2669
- ipAddress?: string | null | undefined;
2670
- userAgent?: string | null | undefined;
2671
- impersonatedBy?: string | null | undefined;
2672
- };
2673
- } | null>;
2674
- isPending: false;
2675
- error: import("vue").Ref<{
2676
- message?: string | undefined;
2677
- status: number;
2678
- statusText: string;
2679
- }>;
2680
- }>;
2681
- }, getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
2682
- disableCookieCache?: unknown;
2683
- disableRefresh?: unknown;
2684
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2685
- query?: {
2686
- disableCookieCache?: unknown;
2687
- disableRefresh?: unknown;
2688
- } | undefined;
2689
- fetchOptions?: FetchOptions | undefined;
2690
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
2691
- user: {
2692
- id: string;
2693
- createdAt: Date;
2694
- updatedAt: Date;
2695
- email: string;
2696
- emailVerified: boolean;
2697
- name: string;
2698
- image?: string | null | undefined;
2699
- banned: boolean | null | undefined;
2700
- role?: string | null | undefined;
2701
- banReason?: string | null | undefined;
2702
- banExpires?: Date | null | undefined;
2703
- };
2704
- session: {
2705
- id: string;
2706
- createdAt: Date;
2707
- updatedAt: Date;
2708
- userId: string;
2709
- expiresAt: Date;
2710
- token: string;
2711
- ipAddress?: string | null | undefined;
2712
- userAgent?: string | null | undefined;
2713
- impersonatedBy?: string | null | undefined;
2714
- };
2715
- } | null, {
2716
- code?: string | undefined;
2717
- message?: string | undefined;
2718
- }, FetchOptions["throw"] extends true ? true : false>>;
2719
- export { authClient };