@pelatform/starter 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,3998 +1,6 @@
1
- import { C as Config, g as AuthClient, A as AuthQueryOptions, e as AnyAuthClient, N as NonThrowableResult, T as ThrowableResult, B as BetterFetchRequest, h as Session, i as User, W as Workspace, y as DialogComponentProps, z as CardComponentProps, m as ImageOptions, l as FieldType, r as PasswordValidation, R as Refetch, v as CardClassNames, p as ApiKey, P as PathConfig, o as Provider, s as Profile, w as AvatarProps, x as ViewProps } from './workspace-CcGHPtq0.js';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import * as react from 'react';
4
- import { ReactNode, CSSProperties, ComponentProps, PropsWithChildren } from 'react';
5
- import * as better_auth_react from 'better-auth/react';
6
- import { BetterFetchOption } from 'better-auth/react';
7
- import * as _tanstack_react_query from '@tanstack/react-query';
8
- import { AnyUseQueryOptions, QueryKey } from '@tanstack/react-query';
9
- import * as better_auth from 'better-auth';
10
- import { Account } from 'better-auth';
11
- import * as _tanstack_query_core from '@tanstack/query-core';
12
- import * as better_auth_plugins_organization from 'better-auth/plugins/organization';
13
- import { Badge, Toaster, Button, Input } from 'pelatform-ui/default';
14
- import { MenuItem } from 'pelatform-ui';
15
- import { NavItem, LanguageSwitcherProps } from 'pelatform-ui/components';
16
- import { LucideIcon } from 'lucide-react';
17
- import 'better-auth/client/plugins';
18
-
19
- /**
20
- * Hook to access configuration in client components
21
- * Must be used within a ConfigProvider
22
- *
23
- * @returns The configuration object with authClient
24
- * @throws Error if used outside of ConfigProvider
25
- *
26
- * @example
27
- * ```tsx
28
- * 'use client'
29
- *
30
- * import { useConfig } from '@pelatform/starter'
31
- *
32
- * export function MyComponent() {
33
- * const config = useConfig()
34
- *
35
- * return <div>{config.app.name}</div>
36
- * }
37
- * ```
38
- */
39
- declare function useConfig(): Config & {
40
- authClient: AuthClient;
41
- };
42
-
43
- declare const QueryContext: react.Context<AuthQueryOptions>;
44
- /**
45
- * React Context for storing configuration in client components
46
- */
47
- declare const ConfigContext: react.Context<(Config & {
48
- authClient: AuthClient;
49
- }) | null>;
50
- /**
51
- * Props for the ConfigProvider component
52
- */
53
- type ConfigProviderProps = {
54
- /** The configuration object to provide to all child components (can be partial, can have extra properties) */
55
- config: Partial<Config> | Record<string, any>;
56
- /** AuthClient instance to provide to all child components */
57
- authClient: AnyAuthClient;
58
- /** Child components that can access the configuration */
59
- children: ReactNode;
60
- } & Partial<AuthQueryOptions>;
61
- /**
62
- * Provider component that makes configuration available to all client components
63
- * This should be wrapped around your application in the root layout
64
- *
65
- * @param props - Component props
66
- * @param props.config - The configuration object to provide (can be partial, will merge with defaults)
67
- * @param props.authClient - The Better Auth client instance
68
- * @param props.children - Child components
69
- *
70
- * @example
71
- * ```tsx
72
- * // app/layout.tsx
73
- * import { ConfigProvider } from '@pelatform/starter'
74
- * import { authClient } from '@repo/auth/client'
75
- * import { config } from '@repo/config'
76
- *
77
- * export default function RootLayout({ children }) {
78
- * return (
79
- * <html>
80
- * <body>
81
- * <ConfigProvider config={config} authClient={authClient}>
82
- * {children}
83
- * </ConfigProvider>
84
- * </body>
85
- * </html>
86
- * )
87
- * }
88
- * ```
89
- */
90
- declare function ConfigProvider({ config, authClient, children, ...props }: ConfigProviderProps): react_jsx_runtime.JSX.Element;
91
-
92
- declare function useAccountInfo(params: Parameters<AuthClient["accountInfo"]>[0], options?: Partial<AnyUseQueryOptions>): _tanstack_react_query.UseQueryResult<{
93
- user: better_auth.OAuth2UserInfo;
94
- data: Record<string, any>;
95
- }, Error>;
96
- declare function useListAccounts(options?: Partial<AnyUseQueryOptions>): _tanstack_react_query.UseQueryResult<{
97
- id: string;
98
- providerId: string;
99
- createdAt: Date;
100
- updatedAt: Date;
101
- accountId: string;
102
- userId: string;
103
- scopes: string[];
104
- }[], Error>;
105
- declare function useUnlinkAccount(options?: Partial<AuthQueryOptions>): {
106
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
107
- providerId: string;
108
- accountId?: string | undefined;
109
- } & {
110
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
111
- providerId: string;
112
- accountId?: string | undefined;
113
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
114
- }>, {
115
- previousData: {};
116
- } | undefined>;
117
- mutateAsync: {
118
- (params: Omit<better_auth.Prettify<{
119
- providerId: string;
120
- accountId?: string | undefined;
121
- } & {
122
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
123
- providerId: string;
124
- accountId?: string | undefined;
125
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
126
- }>, "fetchOptions"> & {
127
- fetchOptions?: {
128
- throw?: true;
129
- } | undefined;
130
- }): Promise<ThrowableResult>;
131
- (params: Omit<better_auth.Prettify<{
132
- providerId: string;
133
- accountId?: string | undefined;
134
- } & {
135
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
136
- providerId: string;
137
- accountId?: string | undefined;
138
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
139
- }>, "fetchOptions"> & {
140
- fetchOptions?: better_auth_react.BetterFetchOption;
141
- }): Promise<NonThrowableResult>;
142
- };
143
- isPending: boolean;
144
- error: Error | null;
145
- data: undefined;
146
- variables: undefined;
147
- isError: false;
148
- isIdle: true;
149
- isSuccess: false;
150
- status: "idle";
151
- reset: () => void;
152
- context: {
153
- previousData: {};
154
- } | undefined;
155
- failureCount: number;
156
- failureReason: Error | null;
157
- isPaused: boolean;
158
- submittedAt: number;
159
- } | {
160
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
161
- providerId: string;
162
- accountId?: string | undefined;
163
- } & {
164
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
165
- providerId: string;
166
- accountId?: string | undefined;
167
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
168
- }>, {
169
- previousData: {};
170
- } | undefined>;
171
- mutateAsync: {
172
- (params: Omit<better_auth.Prettify<{
173
- providerId: string;
174
- accountId?: string | undefined;
175
- } & {
176
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
177
- providerId: string;
178
- accountId?: string | undefined;
179
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
180
- }>, "fetchOptions"> & {
181
- fetchOptions?: {
182
- throw?: true;
183
- } | undefined;
184
- }): Promise<ThrowableResult>;
185
- (params: Omit<better_auth.Prettify<{
186
- providerId: string;
187
- accountId?: string | undefined;
188
- } & {
189
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
190
- providerId: string;
191
- accountId?: string | undefined;
192
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
193
- }>, "fetchOptions"> & {
194
- fetchOptions?: better_auth_react.BetterFetchOption;
195
- }): Promise<NonThrowableResult>;
196
- };
197
- isPending: boolean;
198
- error: Error | null;
199
- data: undefined;
200
- variables: better_auth.Prettify<{
201
- providerId: string;
202
- accountId?: string | undefined;
203
- } & {
204
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
205
- providerId: string;
206
- accountId?: string | undefined;
207
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
208
- }>;
209
- isError: false;
210
- isIdle: false;
211
- isSuccess: false;
212
- status: "pending";
213
- reset: () => void;
214
- context: {
215
- previousData: {};
216
- } | undefined;
217
- failureCount: number;
218
- failureReason: Error | null;
219
- isPaused: boolean;
220
- submittedAt: number;
221
- } | {
222
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
223
- providerId: string;
224
- accountId?: string | undefined;
225
- } & {
226
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
227
- providerId: string;
228
- accountId?: string | undefined;
229
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
230
- }>, {
231
- previousData: {};
232
- } | undefined>;
233
- mutateAsync: {
234
- (params: Omit<better_auth.Prettify<{
235
- providerId: string;
236
- accountId?: string | undefined;
237
- } & {
238
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
239
- providerId: string;
240
- accountId?: string | undefined;
241
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
242
- }>, "fetchOptions"> & {
243
- fetchOptions?: {
244
- throw?: true;
245
- } | undefined;
246
- }): Promise<ThrowableResult>;
247
- (params: Omit<better_auth.Prettify<{
248
- providerId: string;
249
- accountId?: string | undefined;
250
- } & {
251
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
252
- providerId: string;
253
- accountId?: string | undefined;
254
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
255
- }>, "fetchOptions"> & {
256
- fetchOptions?: better_auth_react.BetterFetchOption;
257
- }): Promise<NonThrowableResult>;
258
- };
259
- isPending: boolean;
260
- error: Error | null;
261
- data: undefined;
262
- variables: better_auth.Prettify<{
263
- providerId: string;
264
- accountId?: string | undefined;
265
- } & {
266
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
267
- providerId: string;
268
- accountId?: string | undefined;
269
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
270
- }>;
271
- isError: true;
272
- isIdle: false;
273
- isSuccess: false;
274
- status: "error";
275
- reset: () => void;
276
- context: {
277
- previousData: {};
278
- } | undefined;
279
- failureCount: number;
280
- failureReason: Error | null;
281
- isPaused: boolean;
282
- submittedAt: number;
283
- } | {
284
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
285
- providerId: string;
286
- accountId?: string | undefined;
287
- } & {
288
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
289
- providerId: string;
290
- accountId?: string | undefined;
291
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
292
- }>, {
293
- previousData: {};
294
- } | undefined>;
295
- mutateAsync: {
296
- (params: Omit<better_auth.Prettify<{
297
- providerId: string;
298
- accountId?: string | undefined;
299
- } & {
300
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
301
- providerId: string;
302
- accountId?: string | undefined;
303
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
304
- }>, "fetchOptions"> & {
305
- fetchOptions?: {
306
- throw?: true;
307
- } | undefined;
308
- }): Promise<ThrowableResult>;
309
- (params: Omit<better_auth.Prettify<{
310
- providerId: string;
311
- accountId?: string | undefined;
312
- } & {
313
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
314
- providerId: string;
315
- accountId?: string | undefined;
316
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
317
- }>, "fetchOptions"> & {
318
- fetchOptions?: better_auth_react.BetterFetchOption;
319
- }): Promise<NonThrowableResult>;
320
- };
321
- isPending: boolean;
322
- error: Error | null;
323
- data: NonThrowableResult | ThrowableResult;
324
- variables: better_auth.Prettify<{
325
- providerId: string;
326
- accountId?: string | undefined;
327
- } & {
328
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
329
- providerId: string;
330
- accountId?: string | undefined;
331
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
332
- }>;
333
- isError: false;
334
- isIdle: false;
335
- isSuccess: true;
336
- status: "success";
337
- reset: () => void;
338
- context: {
339
- previousData: {};
340
- } | undefined;
341
- failureCount: number;
342
- failureReason: Error | null;
343
- isPaused: boolean;
344
- submittedAt: number;
345
- };
346
-
347
- declare function useCreateApiKey(options?: Partial<AuthQueryOptions>): {
348
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
349
- name?: string | undefined;
350
- expiresIn?: number | null | undefined;
351
- userId?: unknown;
352
- prefix?: string | undefined;
353
- remaining?: number | null | undefined;
354
- metadata?: any;
355
- refillAmount?: number | undefined;
356
- refillInterval?: number | undefined;
357
- rateLimitTimeWindow?: number | undefined;
358
- rateLimitMax?: number | undefined;
359
- rateLimitEnabled?: boolean | undefined;
360
- permissions?: Record<string, string[]> | undefined;
361
- } & {
362
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
363
- name?: string | undefined;
364
- expiresIn?: number | null | undefined;
365
- userId?: unknown;
366
- prefix?: string | undefined;
367
- remaining?: number | null | undefined;
368
- metadata?: any;
369
- refillAmount?: number | undefined;
370
- refillInterval?: number | undefined;
371
- rateLimitTimeWindow?: number | undefined;
372
- rateLimitMax?: number | undefined;
373
- rateLimitEnabled?: boolean | undefined;
374
- permissions?: Record<string, string[]> | undefined;
375
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
376
- }> | undefined, {
377
- previousData: {};
378
- } | undefined>;
379
- mutateAsync: {
380
- (params: Omit<better_auth.Prettify<{
381
- name?: string | undefined;
382
- expiresIn?: number | null | undefined;
383
- userId?: unknown;
384
- prefix?: string | undefined;
385
- remaining?: number | null | undefined;
386
- metadata?: any;
387
- refillAmount?: number | undefined;
388
- refillInterval?: number | undefined;
389
- rateLimitTimeWindow?: number | undefined;
390
- rateLimitMax?: number | undefined;
391
- rateLimitEnabled?: boolean | undefined;
392
- permissions?: Record<string, string[]> | undefined;
393
- } & {
394
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
395
- name?: string | undefined;
396
- expiresIn?: number | null | undefined;
397
- userId?: unknown;
398
- prefix?: string | undefined;
399
- remaining?: number | null | undefined;
400
- metadata?: any;
401
- refillAmount?: number | undefined;
402
- refillInterval?: number | undefined;
403
- rateLimitTimeWindow?: number | undefined;
404
- rateLimitMax?: number | undefined;
405
- rateLimitEnabled?: boolean | undefined;
406
- permissions?: Record<string, string[]> | undefined;
407
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
408
- }> | undefined, "fetchOptions"> & {
409
- fetchOptions?: {
410
- throw?: true;
411
- } | undefined;
412
- }): Promise<ThrowableResult>;
413
- (params: Omit<better_auth.Prettify<{
414
- name?: string | undefined;
415
- expiresIn?: number | null | undefined;
416
- userId?: unknown;
417
- prefix?: string | undefined;
418
- remaining?: number | null | undefined;
419
- metadata?: any;
420
- refillAmount?: number | undefined;
421
- refillInterval?: number | undefined;
422
- rateLimitTimeWindow?: number | undefined;
423
- rateLimitMax?: number | undefined;
424
- rateLimitEnabled?: boolean | undefined;
425
- permissions?: Record<string, string[]> | undefined;
426
- } & {
427
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
428
- name?: string | undefined;
429
- expiresIn?: number | null | undefined;
430
- userId?: unknown;
431
- prefix?: string | undefined;
432
- remaining?: number | null | undefined;
433
- metadata?: any;
434
- refillAmount?: number | undefined;
435
- refillInterval?: number | undefined;
436
- rateLimitTimeWindow?: number | undefined;
437
- rateLimitMax?: number | undefined;
438
- rateLimitEnabled?: boolean | undefined;
439
- permissions?: Record<string, string[]> | undefined;
440
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
441
- }> | undefined, "fetchOptions"> & {
442
- fetchOptions?: better_auth_react.BetterFetchOption;
443
- }): Promise<NonThrowableResult>;
444
- };
445
- isPending: boolean;
446
- error: Error | null;
447
- data: undefined;
448
- variables: undefined;
449
- isError: false;
450
- isIdle: true;
451
- isSuccess: false;
452
- status: "idle";
453
- reset: () => void;
454
- context: {
455
- previousData: {};
456
- } | undefined;
457
- failureCount: number;
458
- failureReason: Error | null;
459
- isPaused: boolean;
460
- submittedAt: number;
461
- } | {
462
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
463
- name?: string | undefined;
464
- expiresIn?: number | null | undefined;
465
- userId?: unknown;
466
- prefix?: string | undefined;
467
- remaining?: number | null | undefined;
468
- metadata?: any;
469
- refillAmount?: number | undefined;
470
- refillInterval?: number | undefined;
471
- rateLimitTimeWindow?: number | undefined;
472
- rateLimitMax?: number | undefined;
473
- rateLimitEnabled?: boolean | undefined;
474
- permissions?: Record<string, string[]> | undefined;
475
- } & {
476
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
477
- name?: string | undefined;
478
- expiresIn?: number | null | undefined;
479
- userId?: unknown;
480
- prefix?: string | undefined;
481
- remaining?: number | null | undefined;
482
- metadata?: any;
483
- refillAmount?: number | undefined;
484
- refillInterval?: number | undefined;
485
- rateLimitTimeWindow?: number | undefined;
486
- rateLimitMax?: number | undefined;
487
- rateLimitEnabled?: boolean | undefined;
488
- permissions?: Record<string, string[]> | undefined;
489
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
490
- }> | undefined, {
491
- previousData: {};
492
- } | undefined>;
493
- mutateAsync: {
494
- (params: Omit<better_auth.Prettify<{
495
- name?: string | undefined;
496
- expiresIn?: number | null | undefined;
497
- userId?: unknown;
498
- prefix?: string | undefined;
499
- remaining?: number | null | undefined;
500
- metadata?: any;
501
- refillAmount?: number | undefined;
502
- refillInterval?: number | undefined;
503
- rateLimitTimeWindow?: number | undefined;
504
- rateLimitMax?: number | undefined;
505
- rateLimitEnabled?: boolean | undefined;
506
- permissions?: Record<string, string[]> | undefined;
507
- } & {
508
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
509
- name?: string | undefined;
510
- expiresIn?: number | null | undefined;
511
- userId?: unknown;
512
- prefix?: string | undefined;
513
- remaining?: number | null | undefined;
514
- metadata?: any;
515
- refillAmount?: number | undefined;
516
- refillInterval?: number | undefined;
517
- rateLimitTimeWindow?: number | undefined;
518
- rateLimitMax?: number | undefined;
519
- rateLimitEnabled?: boolean | undefined;
520
- permissions?: Record<string, string[]> | undefined;
521
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
522
- }> | undefined, "fetchOptions"> & {
523
- fetchOptions?: {
524
- throw?: true;
525
- } | undefined;
526
- }): Promise<ThrowableResult>;
527
- (params: Omit<better_auth.Prettify<{
528
- name?: string | undefined;
529
- expiresIn?: number | null | undefined;
530
- userId?: unknown;
531
- prefix?: string | undefined;
532
- remaining?: number | null | undefined;
533
- metadata?: any;
534
- refillAmount?: number | undefined;
535
- refillInterval?: number | undefined;
536
- rateLimitTimeWindow?: number | undefined;
537
- rateLimitMax?: number | undefined;
538
- rateLimitEnabled?: boolean | undefined;
539
- permissions?: Record<string, string[]> | undefined;
540
- } & {
541
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
542
- name?: string | undefined;
543
- expiresIn?: number | null | undefined;
544
- userId?: unknown;
545
- prefix?: string | undefined;
546
- remaining?: number | null | undefined;
547
- metadata?: any;
548
- refillAmount?: number | undefined;
549
- refillInterval?: number | undefined;
550
- rateLimitTimeWindow?: number | undefined;
551
- rateLimitMax?: number | undefined;
552
- rateLimitEnabled?: boolean | undefined;
553
- permissions?: Record<string, string[]> | undefined;
554
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
555
- }> | undefined, "fetchOptions"> & {
556
- fetchOptions?: better_auth_react.BetterFetchOption;
557
- }): Promise<NonThrowableResult>;
558
- };
559
- isPending: boolean;
560
- error: Error | null;
561
- data: undefined;
562
- variables: better_auth.Prettify<{
563
- name?: string | undefined;
564
- expiresIn?: number | null | undefined;
565
- userId?: unknown;
566
- prefix?: string | undefined;
567
- remaining?: number | null | undefined;
568
- metadata?: any;
569
- refillAmount?: number | undefined;
570
- refillInterval?: number | undefined;
571
- rateLimitTimeWindow?: number | undefined;
572
- rateLimitMax?: number | undefined;
573
- rateLimitEnabled?: boolean | undefined;
574
- permissions?: Record<string, string[]> | undefined;
575
- } & {
576
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
577
- name?: string | undefined;
578
- expiresIn?: number | null | undefined;
579
- userId?: unknown;
580
- prefix?: string | undefined;
581
- remaining?: number | null | undefined;
582
- metadata?: any;
583
- refillAmount?: number | undefined;
584
- refillInterval?: number | undefined;
585
- rateLimitTimeWindow?: number | undefined;
586
- rateLimitMax?: number | undefined;
587
- rateLimitEnabled?: boolean | undefined;
588
- permissions?: Record<string, string[]> | undefined;
589
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
590
- }> | undefined;
591
- isError: false;
592
- isIdle: false;
593
- isSuccess: false;
594
- status: "pending";
595
- reset: () => void;
596
- context: {
597
- previousData: {};
598
- } | undefined;
599
- failureCount: number;
600
- failureReason: Error | null;
601
- isPaused: boolean;
602
- submittedAt: number;
603
- } | {
604
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
605
- name?: string | undefined;
606
- expiresIn?: number | null | undefined;
607
- userId?: unknown;
608
- prefix?: string | undefined;
609
- remaining?: number | null | undefined;
610
- metadata?: any;
611
- refillAmount?: number | undefined;
612
- refillInterval?: number | undefined;
613
- rateLimitTimeWindow?: number | undefined;
614
- rateLimitMax?: number | undefined;
615
- rateLimitEnabled?: boolean | undefined;
616
- permissions?: Record<string, string[]> | undefined;
617
- } & {
618
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
619
- name?: string | undefined;
620
- expiresIn?: number | null | undefined;
621
- userId?: unknown;
622
- prefix?: string | undefined;
623
- remaining?: number | null | undefined;
624
- metadata?: any;
625
- refillAmount?: number | undefined;
626
- refillInterval?: number | undefined;
627
- rateLimitTimeWindow?: number | undefined;
628
- rateLimitMax?: number | undefined;
629
- rateLimitEnabled?: boolean | undefined;
630
- permissions?: Record<string, string[]> | undefined;
631
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
632
- }> | undefined, {
633
- previousData: {};
634
- } | undefined>;
635
- mutateAsync: {
636
- (params: Omit<better_auth.Prettify<{
637
- name?: string | undefined;
638
- expiresIn?: number | null | undefined;
639
- userId?: unknown;
640
- prefix?: string | undefined;
641
- remaining?: number | null | undefined;
642
- metadata?: any;
643
- refillAmount?: number | undefined;
644
- refillInterval?: number | undefined;
645
- rateLimitTimeWindow?: number | undefined;
646
- rateLimitMax?: number | undefined;
647
- rateLimitEnabled?: boolean | undefined;
648
- permissions?: Record<string, string[]> | undefined;
649
- } & {
650
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
651
- name?: string | undefined;
652
- expiresIn?: number | null | undefined;
653
- userId?: unknown;
654
- prefix?: string | undefined;
655
- remaining?: number | null | undefined;
656
- metadata?: any;
657
- refillAmount?: number | undefined;
658
- refillInterval?: number | undefined;
659
- rateLimitTimeWindow?: number | undefined;
660
- rateLimitMax?: number | undefined;
661
- rateLimitEnabled?: boolean | undefined;
662
- permissions?: Record<string, string[]> | undefined;
663
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
664
- }> | undefined, "fetchOptions"> & {
665
- fetchOptions?: {
666
- throw?: true;
667
- } | undefined;
668
- }): Promise<ThrowableResult>;
669
- (params: Omit<better_auth.Prettify<{
670
- name?: string | undefined;
671
- expiresIn?: number | null | undefined;
672
- userId?: unknown;
673
- prefix?: string | undefined;
674
- remaining?: number | null | undefined;
675
- metadata?: any;
676
- refillAmount?: number | undefined;
677
- refillInterval?: number | undefined;
678
- rateLimitTimeWindow?: number | undefined;
679
- rateLimitMax?: number | undefined;
680
- rateLimitEnabled?: boolean | undefined;
681
- permissions?: Record<string, string[]> | undefined;
682
- } & {
683
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
684
- name?: string | undefined;
685
- expiresIn?: number | null | undefined;
686
- userId?: unknown;
687
- prefix?: string | undefined;
688
- remaining?: number | null | undefined;
689
- metadata?: any;
690
- refillAmount?: number | undefined;
691
- refillInterval?: number | undefined;
692
- rateLimitTimeWindow?: number | undefined;
693
- rateLimitMax?: number | undefined;
694
- rateLimitEnabled?: boolean | undefined;
695
- permissions?: Record<string, string[]> | undefined;
696
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
697
- }> | undefined, "fetchOptions"> & {
698
- fetchOptions?: better_auth_react.BetterFetchOption;
699
- }): Promise<NonThrowableResult>;
700
- };
701
- isPending: boolean;
702
- error: Error | null;
703
- data: undefined;
704
- variables: better_auth.Prettify<{
705
- name?: string | undefined;
706
- expiresIn?: number | null | undefined;
707
- userId?: unknown;
708
- prefix?: string | undefined;
709
- remaining?: number | null | undefined;
710
- metadata?: any;
711
- refillAmount?: number | undefined;
712
- refillInterval?: number | undefined;
713
- rateLimitTimeWindow?: number | undefined;
714
- rateLimitMax?: number | undefined;
715
- rateLimitEnabled?: boolean | undefined;
716
- permissions?: Record<string, string[]> | undefined;
717
- } & {
718
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
719
- name?: string | undefined;
720
- expiresIn?: number | null | undefined;
721
- userId?: unknown;
722
- prefix?: string | undefined;
723
- remaining?: number | null | undefined;
724
- metadata?: any;
725
- refillAmount?: number | undefined;
726
- refillInterval?: number | undefined;
727
- rateLimitTimeWindow?: number | undefined;
728
- rateLimitMax?: number | undefined;
729
- rateLimitEnabled?: boolean | undefined;
730
- permissions?: Record<string, string[]> | undefined;
731
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
732
- }> | undefined;
733
- isError: true;
734
- isIdle: false;
735
- isSuccess: false;
736
- status: "error";
737
- reset: () => void;
738
- context: {
739
- previousData: {};
740
- } | undefined;
741
- failureCount: number;
742
- failureReason: Error | null;
743
- isPaused: boolean;
744
- submittedAt: number;
745
- } | {
746
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
747
- name?: string | undefined;
748
- expiresIn?: number | null | undefined;
749
- userId?: unknown;
750
- prefix?: string | undefined;
751
- remaining?: number | null | undefined;
752
- metadata?: any;
753
- refillAmount?: number | undefined;
754
- refillInterval?: number | undefined;
755
- rateLimitTimeWindow?: number | undefined;
756
- rateLimitMax?: number | undefined;
757
- rateLimitEnabled?: boolean | undefined;
758
- permissions?: Record<string, string[]> | undefined;
759
- } & {
760
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
761
- name?: string | undefined;
762
- expiresIn?: number | null | undefined;
763
- userId?: unknown;
764
- prefix?: string | undefined;
765
- remaining?: number | null | undefined;
766
- metadata?: any;
767
- refillAmount?: number | undefined;
768
- refillInterval?: number | undefined;
769
- rateLimitTimeWindow?: number | undefined;
770
- rateLimitMax?: number | undefined;
771
- rateLimitEnabled?: boolean | undefined;
772
- permissions?: Record<string, string[]> | undefined;
773
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
774
- }> | undefined, {
775
- previousData: {};
776
- } | undefined>;
777
- mutateAsync: {
778
- (params: Omit<better_auth.Prettify<{
779
- name?: string | undefined;
780
- expiresIn?: number | null | undefined;
781
- userId?: unknown;
782
- prefix?: string | undefined;
783
- remaining?: number | null | undefined;
784
- metadata?: any;
785
- refillAmount?: number | undefined;
786
- refillInterval?: number | undefined;
787
- rateLimitTimeWindow?: number | undefined;
788
- rateLimitMax?: number | undefined;
789
- rateLimitEnabled?: boolean | undefined;
790
- permissions?: Record<string, string[]> | undefined;
791
- } & {
792
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
793
- name?: string | undefined;
794
- expiresIn?: number | null | undefined;
795
- userId?: unknown;
796
- prefix?: string | undefined;
797
- remaining?: number | null | undefined;
798
- metadata?: any;
799
- refillAmount?: number | undefined;
800
- refillInterval?: number | undefined;
801
- rateLimitTimeWindow?: number | undefined;
802
- rateLimitMax?: number | undefined;
803
- rateLimitEnabled?: boolean | undefined;
804
- permissions?: Record<string, string[]> | undefined;
805
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
806
- }> | undefined, "fetchOptions"> & {
807
- fetchOptions?: {
808
- throw?: true;
809
- } | undefined;
810
- }): Promise<ThrowableResult>;
811
- (params: Omit<better_auth.Prettify<{
812
- name?: string | undefined;
813
- expiresIn?: number | null | undefined;
814
- userId?: unknown;
815
- prefix?: string | undefined;
816
- remaining?: number | null | undefined;
817
- metadata?: any;
818
- refillAmount?: number | undefined;
819
- refillInterval?: number | undefined;
820
- rateLimitTimeWindow?: number | undefined;
821
- rateLimitMax?: number | undefined;
822
- rateLimitEnabled?: boolean | undefined;
823
- permissions?: Record<string, string[]> | undefined;
824
- } & {
825
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
826
- name?: string | undefined;
827
- expiresIn?: number | null | undefined;
828
- userId?: unknown;
829
- prefix?: string | undefined;
830
- remaining?: number | null | undefined;
831
- metadata?: any;
832
- refillAmount?: number | undefined;
833
- refillInterval?: number | undefined;
834
- rateLimitTimeWindow?: number | undefined;
835
- rateLimitMax?: number | undefined;
836
- rateLimitEnabled?: boolean | undefined;
837
- permissions?: Record<string, string[]> | undefined;
838
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
839
- }> | undefined, "fetchOptions"> & {
840
- fetchOptions?: better_auth_react.BetterFetchOption;
841
- }): Promise<NonThrowableResult>;
842
- };
843
- isPending: boolean;
844
- error: Error | null;
845
- data: NonThrowableResult | ThrowableResult;
846
- variables: better_auth.Prettify<{
847
- name?: string | undefined;
848
- expiresIn?: number | null | undefined;
849
- userId?: unknown;
850
- prefix?: string | undefined;
851
- remaining?: number | null | undefined;
852
- metadata?: any;
853
- refillAmount?: number | undefined;
854
- refillInterval?: number | undefined;
855
- rateLimitTimeWindow?: number | undefined;
856
- rateLimitMax?: number | undefined;
857
- rateLimitEnabled?: boolean | undefined;
858
- permissions?: Record<string, string[]> | undefined;
859
- } & {
860
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
861
- name?: string | undefined;
862
- expiresIn?: number | null | undefined;
863
- userId?: unknown;
864
- prefix?: string | undefined;
865
- remaining?: number | null | undefined;
866
- metadata?: any;
867
- refillAmount?: number | undefined;
868
- refillInterval?: number | undefined;
869
- rateLimitTimeWindow?: number | undefined;
870
- rateLimitMax?: number | undefined;
871
- rateLimitEnabled?: boolean | undefined;
872
- permissions?: Record<string, string[]> | undefined;
873
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
874
- }> | undefined;
875
- isError: false;
876
- isIdle: false;
877
- isSuccess: true;
878
- status: "success";
879
- reset: () => void;
880
- context: {
881
- previousData: {};
882
- } | undefined;
883
- failureCount: number;
884
- failureReason: Error | null;
885
- isPaused: boolean;
886
- submittedAt: number;
887
- };
888
- declare function useDeleteApiKey(options?: Partial<AuthQueryOptions>): {
889
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
890
- keyId: string;
891
- } & {
892
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
893
- keyId: string;
894
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
895
- }>, {
896
- previousData: {};
897
- } | undefined>;
898
- mutateAsync: {
899
- (params: Omit<better_auth.Prettify<{
900
- keyId: string;
901
- } & {
902
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
903
- keyId: string;
904
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
905
- }>, "fetchOptions"> & {
906
- fetchOptions?: {
907
- throw?: true;
908
- } | undefined;
909
- }): Promise<ThrowableResult>;
910
- (params: Omit<better_auth.Prettify<{
911
- keyId: string;
912
- } & {
913
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
914
- keyId: string;
915
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
916
- }>, "fetchOptions"> & {
917
- fetchOptions?: better_auth_react.BetterFetchOption;
918
- }): Promise<NonThrowableResult>;
919
- };
920
- isPending: boolean;
921
- error: Error | null;
922
- data: undefined;
923
- variables: undefined;
924
- isError: false;
925
- isIdle: true;
926
- isSuccess: false;
927
- status: "idle";
928
- reset: () => void;
929
- context: {
930
- previousData: {};
931
- } | undefined;
932
- failureCount: number;
933
- failureReason: Error | null;
934
- isPaused: boolean;
935
- submittedAt: number;
936
- } | {
937
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
938
- keyId: string;
939
- } & {
940
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
941
- keyId: string;
942
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
943
- }>, {
944
- previousData: {};
945
- } | undefined>;
946
- mutateAsync: {
947
- (params: Omit<better_auth.Prettify<{
948
- keyId: string;
949
- } & {
950
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
951
- keyId: string;
952
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
953
- }>, "fetchOptions"> & {
954
- fetchOptions?: {
955
- throw?: true;
956
- } | undefined;
957
- }): Promise<ThrowableResult>;
958
- (params: Omit<better_auth.Prettify<{
959
- keyId: string;
960
- } & {
961
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
962
- keyId: string;
963
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
964
- }>, "fetchOptions"> & {
965
- fetchOptions?: better_auth_react.BetterFetchOption;
966
- }): Promise<NonThrowableResult>;
967
- };
968
- isPending: boolean;
969
- error: Error | null;
970
- data: undefined;
971
- variables: better_auth.Prettify<{
972
- keyId: string;
973
- } & {
974
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
975
- keyId: string;
976
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
977
- }>;
978
- isError: false;
979
- isIdle: false;
980
- isSuccess: false;
981
- status: "pending";
982
- reset: () => void;
983
- context: {
984
- previousData: {};
985
- } | undefined;
986
- failureCount: number;
987
- failureReason: Error | null;
988
- isPaused: boolean;
989
- submittedAt: number;
990
- } | {
991
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
992
- keyId: string;
993
- } & {
994
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
995
- keyId: string;
996
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
997
- }>, {
998
- previousData: {};
999
- } | undefined>;
1000
- mutateAsync: {
1001
- (params: Omit<better_auth.Prettify<{
1002
- keyId: string;
1003
- } & {
1004
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1005
- keyId: string;
1006
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1007
- }>, "fetchOptions"> & {
1008
- fetchOptions?: {
1009
- throw?: true;
1010
- } | undefined;
1011
- }): Promise<ThrowableResult>;
1012
- (params: Omit<better_auth.Prettify<{
1013
- keyId: string;
1014
- } & {
1015
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1016
- keyId: string;
1017
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1018
- }>, "fetchOptions"> & {
1019
- fetchOptions?: better_auth_react.BetterFetchOption;
1020
- }): Promise<NonThrowableResult>;
1021
- };
1022
- isPending: boolean;
1023
- error: Error | null;
1024
- data: undefined;
1025
- variables: better_auth.Prettify<{
1026
- keyId: string;
1027
- } & {
1028
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1029
- keyId: string;
1030
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1031
- }>;
1032
- isError: true;
1033
- isIdle: false;
1034
- isSuccess: false;
1035
- status: "error";
1036
- reset: () => void;
1037
- context: {
1038
- previousData: {};
1039
- } | undefined;
1040
- failureCount: number;
1041
- failureReason: Error | null;
1042
- isPaused: boolean;
1043
- submittedAt: number;
1044
- } | {
1045
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
1046
- keyId: string;
1047
- } & {
1048
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1049
- keyId: string;
1050
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1051
- }>, {
1052
- previousData: {};
1053
- } | undefined>;
1054
- mutateAsync: {
1055
- (params: Omit<better_auth.Prettify<{
1056
- keyId: string;
1057
- } & {
1058
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1059
- keyId: string;
1060
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1061
- }>, "fetchOptions"> & {
1062
- fetchOptions?: {
1063
- throw?: true;
1064
- } | undefined;
1065
- }): Promise<ThrowableResult>;
1066
- (params: Omit<better_auth.Prettify<{
1067
- keyId: string;
1068
- } & {
1069
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1070
- keyId: string;
1071
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1072
- }>, "fetchOptions"> & {
1073
- fetchOptions?: better_auth_react.BetterFetchOption;
1074
- }): Promise<NonThrowableResult>;
1075
- };
1076
- isPending: boolean;
1077
- error: Error | null;
1078
- data: NonThrowableResult | ThrowableResult;
1079
- variables: better_auth.Prettify<{
1080
- keyId: string;
1081
- } & {
1082
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1083
- keyId: string;
1084
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1085
- }>;
1086
- isError: false;
1087
- isIdle: false;
1088
- isSuccess: true;
1089
- status: "success";
1090
- reset: () => void;
1091
- context: {
1092
- previousData: {};
1093
- } | undefined;
1094
- failureCount: number;
1095
- failureReason: Error | null;
1096
- isPaused: boolean;
1097
- submittedAt: number;
1098
- };
1099
- declare function useListApiKeys(options?: Partial<AnyUseQueryOptions>): _tanstack_react_query.UseQueryResult<{
1100
- permissions: {
1101
- [key: string]: string[];
1102
- } | null;
1103
- id: string;
1104
- name: string | null;
1105
- start: string | null;
1106
- prefix: string | null;
1107
- userId: string;
1108
- refillInterval: number | null;
1109
- refillAmount: number | null;
1110
- lastRefillAt: Date | null;
1111
- enabled: boolean;
1112
- rateLimitEnabled: boolean;
1113
- rateLimitTimeWindow: number | null;
1114
- rateLimitMax: number | null;
1115
- requestCount: number;
1116
- remaining: number | null;
1117
- lastRequest: Date | null;
1118
- expiresAt: Date | null;
1119
- createdAt: Date;
1120
- updatedAt: Date;
1121
- metadata: Record<string, any> | null;
1122
- }[], Error>;
1123
-
1124
- type AuthMutationFn<TParams> = (params: TParams) => Promise<ThrowableResult | NonThrowableResult>;
1125
- declare function useAuthMutation<TAuthFn extends AuthMutationFn<any>>({ queryKey, mutationFn, optimisticData, options, }: {
1126
- queryKey: QueryKey;
1127
- mutationFn: TAuthFn;
1128
- optimisticData?(params: Omit<Parameters<TAuthFn>[0], "fetchOptions">, previousData: unknown): unknown;
1129
- options?: Partial<AuthQueryOptions>;
1130
- }): {
1131
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, Parameters<TAuthFn>[0], {
1132
- previousData: {};
1133
- } | undefined>;
1134
- mutateAsync: {
1135
- (params: Omit<Parameters<TAuthFn>[0], "fetchOptions"> & {
1136
- fetchOptions?: {
1137
- throw?: true;
1138
- } | undefined;
1139
- }): Promise<ThrowableResult>;
1140
- (params: Omit<Parameters<TAuthFn>[0], "fetchOptions"> & {
1141
- fetchOptions?: BetterFetchOption;
1142
- }): Promise<NonThrowableResult>;
1143
- };
1144
- isPending: boolean;
1145
- error: Error | null;
1146
- data: undefined;
1147
- variables: undefined;
1148
- isError: false;
1149
- isIdle: true;
1150
- isSuccess: false;
1151
- status: "idle";
1152
- reset: () => void;
1153
- context: {
1154
- previousData: {};
1155
- } | undefined;
1156
- failureCount: number;
1157
- failureReason: Error | null;
1158
- isPaused: boolean;
1159
- submittedAt: number;
1160
- } | {
1161
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, Parameters<TAuthFn>[0], {
1162
- previousData: {};
1163
- } | undefined>;
1164
- mutateAsync: {
1165
- (params: Omit<Parameters<TAuthFn>[0], "fetchOptions"> & {
1166
- fetchOptions?: {
1167
- throw?: true;
1168
- } | undefined;
1169
- }): Promise<ThrowableResult>;
1170
- (params: Omit<Parameters<TAuthFn>[0], "fetchOptions"> & {
1171
- fetchOptions?: BetterFetchOption;
1172
- }): Promise<NonThrowableResult>;
1173
- };
1174
- isPending: boolean;
1175
- error: Error | null;
1176
- data: undefined;
1177
- variables: Parameters<TAuthFn>[0];
1178
- isError: false;
1179
- isIdle: false;
1180
- isSuccess: false;
1181
- status: "pending";
1182
- reset: () => void;
1183
- context: {
1184
- previousData: {};
1185
- } | undefined;
1186
- failureCount: number;
1187
- failureReason: Error | null;
1188
- isPaused: boolean;
1189
- submittedAt: number;
1190
- } | {
1191
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, Parameters<TAuthFn>[0], {
1192
- previousData: {};
1193
- } | undefined>;
1194
- mutateAsync: {
1195
- (params: Omit<Parameters<TAuthFn>[0], "fetchOptions"> & {
1196
- fetchOptions?: {
1197
- throw?: true;
1198
- } | undefined;
1199
- }): Promise<ThrowableResult>;
1200
- (params: Omit<Parameters<TAuthFn>[0], "fetchOptions"> & {
1201
- fetchOptions?: BetterFetchOption;
1202
- }): Promise<NonThrowableResult>;
1203
- };
1204
- isPending: boolean;
1205
- error: Error | null;
1206
- data: undefined;
1207
- variables: Parameters<TAuthFn>[0];
1208
- isError: true;
1209
- isIdle: false;
1210
- isSuccess: false;
1211
- status: "error";
1212
- reset: () => void;
1213
- context: {
1214
- previousData: {};
1215
- } | undefined;
1216
- failureCount: number;
1217
- failureReason: Error | null;
1218
- isPaused: boolean;
1219
- submittedAt: number;
1220
- } | {
1221
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, Parameters<TAuthFn>[0], {
1222
- previousData: {};
1223
- } | undefined>;
1224
- mutateAsync: {
1225
- (params: Omit<Parameters<TAuthFn>[0], "fetchOptions"> & {
1226
- fetchOptions?: {
1227
- throw?: true;
1228
- } | undefined;
1229
- }): Promise<ThrowableResult>;
1230
- (params: Omit<Parameters<TAuthFn>[0], "fetchOptions"> & {
1231
- fetchOptions?: BetterFetchOption;
1232
- }): Promise<NonThrowableResult>;
1233
- };
1234
- isPending: boolean;
1235
- error: Error | null;
1236
- data: NonThrowableResult | ThrowableResult;
1237
- variables: Parameters<TAuthFn>[0];
1238
- isError: false;
1239
- isIdle: false;
1240
- isSuccess: true;
1241
- status: "success";
1242
- reset: () => void;
1243
- context: {
1244
- previousData: {};
1245
- } | undefined;
1246
- failureCount: number;
1247
- failureReason: Error | null;
1248
- isPaused: boolean;
1249
- submittedAt: number;
1250
- };
1251
- declare const useOnMutateError: () => {
1252
- onMutateError: (error: Error, queryKey: QueryKey, context?: {
1253
- previousData?: unknown;
1254
- }) => void;
1255
- };
1256
-
1257
- type UseAuthQueryProps<TData> = {
1258
- queryKey: QueryKey;
1259
- queryFn: BetterFetchRequest<TData>;
1260
- options?: Partial<AnyUseQueryOptions>;
1261
- };
1262
- declare function useAuthQuery<TData>({ queryKey, queryFn, options }: UseAuthQueryProps<TData>): _tanstack_react_query.UseQueryResult<_tanstack_query_core.NoInfer<TData>, Error>;
1263
-
1264
- declare function useListDeviceSessions(options?: Partial<AnyUseQueryOptions>): _tanstack_react_query.UseQueryResult<{
1265
- session: better_auth.Session;
1266
- user: better_auth.User;
1267
- }[], Error>;
1268
- declare function useRevokeDeviceSession(options?: Partial<AuthQueryOptions>): {
1269
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
1270
- sessionToken: string;
1271
- } & {
1272
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1273
- sessionToken: string;
1274
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1275
- }>, {
1276
- previousData: {};
1277
- } | undefined>;
1278
- mutateAsync: {
1279
- (params: Omit<better_auth.Prettify<{
1280
- sessionToken: string;
1281
- } & {
1282
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1283
- sessionToken: string;
1284
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1285
- }>, "fetchOptions"> & {
1286
- fetchOptions?: {
1287
- throw?: true;
1288
- } | undefined;
1289
- }): Promise<ThrowableResult>;
1290
- (params: Omit<better_auth.Prettify<{
1291
- sessionToken: string;
1292
- } & {
1293
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1294
- sessionToken: string;
1295
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1296
- }>, "fetchOptions"> & {
1297
- fetchOptions?: better_auth_react.BetterFetchOption;
1298
- }): Promise<NonThrowableResult>;
1299
- };
1300
- isPending: boolean;
1301
- error: Error | null;
1302
- data: undefined;
1303
- variables: undefined;
1304
- isError: false;
1305
- isIdle: true;
1306
- isSuccess: false;
1307
- status: "idle";
1308
- reset: () => void;
1309
- context: {
1310
- previousData: {};
1311
- } | undefined;
1312
- failureCount: number;
1313
- failureReason: Error | null;
1314
- isPaused: boolean;
1315
- submittedAt: number;
1316
- } | {
1317
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
1318
- sessionToken: string;
1319
- } & {
1320
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1321
- sessionToken: string;
1322
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1323
- }>, {
1324
- previousData: {};
1325
- } | undefined>;
1326
- mutateAsync: {
1327
- (params: Omit<better_auth.Prettify<{
1328
- sessionToken: string;
1329
- } & {
1330
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1331
- sessionToken: string;
1332
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1333
- }>, "fetchOptions"> & {
1334
- fetchOptions?: {
1335
- throw?: true;
1336
- } | undefined;
1337
- }): Promise<ThrowableResult>;
1338
- (params: Omit<better_auth.Prettify<{
1339
- sessionToken: string;
1340
- } & {
1341
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1342
- sessionToken: string;
1343
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1344
- }>, "fetchOptions"> & {
1345
- fetchOptions?: better_auth_react.BetterFetchOption;
1346
- }): Promise<NonThrowableResult>;
1347
- };
1348
- isPending: boolean;
1349
- error: Error | null;
1350
- data: undefined;
1351
- variables: better_auth.Prettify<{
1352
- sessionToken: string;
1353
- } & {
1354
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1355
- sessionToken: string;
1356
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1357
- }>;
1358
- isError: false;
1359
- isIdle: false;
1360
- isSuccess: false;
1361
- status: "pending";
1362
- reset: () => void;
1363
- context: {
1364
- previousData: {};
1365
- } | undefined;
1366
- failureCount: number;
1367
- failureReason: Error | null;
1368
- isPaused: boolean;
1369
- submittedAt: number;
1370
- } | {
1371
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
1372
- sessionToken: string;
1373
- } & {
1374
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1375
- sessionToken: string;
1376
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1377
- }>, {
1378
- previousData: {};
1379
- } | undefined>;
1380
- mutateAsync: {
1381
- (params: Omit<better_auth.Prettify<{
1382
- sessionToken: string;
1383
- } & {
1384
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1385
- sessionToken: string;
1386
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1387
- }>, "fetchOptions"> & {
1388
- fetchOptions?: {
1389
- throw?: true;
1390
- } | undefined;
1391
- }): Promise<ThrowableResult>;
1392
- (params: Omit<better_auth.Prettify<{
1393
- sessionToken: string;
1394
- } & {
1395
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1396
- sessionToken: string;
1397
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1398
- }>, "fetchOptions"> & {
1399
- fetchOptions?: better_auth_react.BetterFetchOption;
1400
- }): Promise<NonThrowableResult>;
1401
- };
1402
- isPending: boolean;
1403
- error: Error | null;
1404
- data: undefined;
1405
- variables: better_auth.Prettify<{
1406
- sessionToken: string;
1407
- } & {
1408
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1409
- sessionToken: string;
1410
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1411
- }>;
1412
- isError: true;
1413
- isIdle: false;
1414
- isSuccess: false;
1415
- status: "error";
1416
- reset: () => void;
1417
- context: {
1418
- previousData: {};
1419
- } | undefined;
1420
- failureCount: number;
1421
- failureReason: Error | null;
1422
- isPaused: boolean;
1423
- submittedAt: number;
1424
- } | {
1425
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
1426
- sessionToken: string;
1427
- } & {
1428
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1429
- sessionToken: string;
1430
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1431
- }>, {
1432
- previousData: {};
1433
- } | undefined>;
1434
- mutateAsync: {
1435
- (params: Omit<better_auth.Prettify<{
1436
- sessionToken: string;
1437
- } & {
1438
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1439
- sessionToken: string;
1440
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1441
- }>, "fetchOptions"> & {
1442
- fetchOptions?: {
1443
- throw?: true;
1444
- } | undefined;
1445
- }): Promise<ThrowableResult>;
1446
- (params: Omit<better_auth.Prettify<{
1447
- sessionToken: string;
1448
- } & {
1449
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1450
- sessionToken: string;
1451
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1452
- }>, "fetchOptions"> & {
1453
- fetchOptions?: better_auth_react.BetterFetchOption;
1454
- }): Promise<NonThrowableResult>;
1455
- };
1456
- isPending: boolean;
1457
- error: Error | null;
1458
- data: NonThrowableResult | ThrowableResult;
1459
- variables: better_auth.Prettify<{
1460
- sessionToken: string;
1461
- } & {
1462
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1463
- sessionToken: string;
1464
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1465
- }>;
1466
- isError: false;
1467
- isIdle: false;
1468
- isSuccess: true;
1469
- status: "success";
1470
- reset: () => void;
1471
- context: {
1472
- previousData: {};
1473
- } | undefined;
1474
- failureCount: number;
1475
- failureReason: Error | null;
1476
- isPaused: boolean;
1477
- submittedAt: number;
1478
- };
1479
- declare function useSetActiveSession(): {
1480
- setActiveSession: _tanstack_react_query.UseMutateFunction<{
1481
- data: {
1482
- session: better_auth.Session & Record<string, any>;
1483
- user: better_auth.User & Record<string, any>;
1484
- };
1485
- error: null;
1486
- } | {
1487
- data: null;
1488
- error: {
1489
- code?: string | undefined | undefined;
1490
- message?: string | undefined | undefined;
1491
- status: number;
1492
- statusText: string;
1493
- };
1494
- }, Error, better_auth.Prettify<{
1495
- sessionToken: string;
1496
- } & {
1497
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1498
- sessionToken: string;
1499
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1500
- }>, unknown>;
1501
- setActiveSessionAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1502
- data: {
1503
- session: better_auth.Session & Record<string, any>;
1504
- user: better_auth.User & Record<string, any>;
1505
- };
1506
- error: null;
1507
- } | {
1508
- data: null;
1509
- error: {
1510
- code?: string | undefined | undefined;
1511
- message?: string | undefined | undefined;
1512
- status: number;
1513
- statusText: string;
1514
- };
1515
- }, Error, better_auth.Prettify<{
1516
- sessionToken: string;
1517
- } & {
1518
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1519
- sessionToken: string;
1520
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1521
- }>, unknown>;
1522
- setActiveSessionPending: boolean;
1523
- setActiveSessionError: Error | null;
1524
- data: undefined;
1525
- variables: undefined;
1526
- error: null;
1527
- isError: false;
1528
- isIdle: true;
1529
- isPending: false;
1530
- isSuccess: false;
1531
- status: "idle";
1532
- mutate: _tanstack_react_query.UseMutateFunction<{
1533
- data: {
1534
- session: better_auth.Session & Record<string, any>;
1535
- user: better_auth.User & Record<string, any>;
1536
- };
1537
- error: null;
1538
- } | {
1539
- data: null;
1540
- error: {
1541
- code?: string | undefined | undefined;
1542
- message?: string | undefined | undefined;
1543
- status: number;
1544
- statusText: string;
1545
- };
1546
- }, Error, better_auth.Prettify<{
1547
- sessionToken: string;
1548
- } & {
1549
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1550
- sessionToken: string;
1551
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1552
- }>, unknown>;
1553
- reset: () => void;
1554
- context: unknown;
1555
- failureCount: number;
1556
- failureReason: Error | null;
1557
- isPaused: boolean;
1558
- submittedAt: number;
1559
- mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1560
- data: {
1561
- session: better_auth.Session & Record<string, any>;
1562
- user: better_auth.User & Record<string, any>;
1563
- };
1564
- error: null;
1565
- } | {
1566
- data: null;
1567
- error: {
1568
- code?: string | undefined | undefined;
1569
- message?: string | undefined | undefined;
1570
- status: number;
1571
- statusText: string;
1572
- };
1573
- }, Error, better_auth.Prettify<{
1574
- sessionToken: string;
1575
- } & {
1576
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1577
- sessionToken: string;
1578
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1579
- }>, unknown>;
1580
- } | {
1581
- setActiveSession: _tanstack_react_query.UseMutateFunction<{
1582
- data: {
1583
- session: better_auth.Session & Record<string, any>;
1584
- user: better_auth.User & Record<string, any>;
1585
- };
1586
- error: null;
1587
- } | {
1588
- data: null;
1589
- error: {
1590
- code?: string | undefined | undefined;
1591
- message?: string | undefined | undefined;
1592
- status: number;
1593
- statusText: string;
1594
- };
1595
- }, Error, better_auth.Prettify<{
1596
- sessionToken: string;
1597
- } & {
1598
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1599
- sessionToken: string;
1600
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1601
- }>, unknown>;
1602
- setActiveSessionAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1603
- data: {
1604
- session: better_auth.Session & Record<string, any>;
1605
- user: better_auth.User & Record<string, any>;
1606
- };
1607
- error: null;
1608
- } | {
1609
- data: null;
1610
- error: {
1611
- code?: string | undefined | undefined;
1612
- message?: string | undefined | undefined;
1613
- status: number;
1614
- statusText: string;
1615
- };
1616
- }, Error, better_auth.Prettify<{
1617
- sessionToken: string;
1618
- } & {
1619
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1620
- sessionToken: string;
1621
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1622
- }>, unknown>;
1623
- setActiveSessionPending: boolean;
1624
- setActiveSessionError: Error | null;
1625
- data: undefined;
1626
- variables: better_auth.Prettify<{
1627
- sessionToken: string;
1628
- } & {
1629
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1630
- sessionToken: string;
1631
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1632
- }>;
1633
- error: null;
1634
- isError: false;
1635
- isIdle: false;
1636
- isPending: true;
1637
- isSuccess: false;
1638
- status: "pending";
1639
- mutate: _tanstack_react_query.UseMutateFunction<{
1640
- data: {
1641
- session: better_auth.Session & Record<string, any>;
1642
- user: better_auth.User & Record<string, any>;
1643
- };
1644
- error: null;
1645
- } | {
1646
- data: null;
1647
- error: {
1648
- code?: string | undefined | undefined;
1649
- message?: string | undefined | undefined;
1650
- status: number;
1651
- statusText: string;
1652
- };
1653
- }, Error, better_auth.Prettify<{
1654
- sessionToken: string;
1655
- } & {
1656
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1657
- sessionToken: string;
1658
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1659
- }>, unknown>;
1660
- reset: () => void;
1661
- context: unknown;
1662
- failureCount: number;
1663
- failureReason: Error | null;
1664
- isPaused: boolean;
1665
- submittedAt: number;
1666
- mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1667
- data: {
1668
- session: better_auth.Session & Record<string, any>;
1669
- user: better_auth.User & Record<string, any>;
1670
- };
1671
- error: null;
1672
- } | {
1673
- data: null;
1674
- error: {
1675
- code?: string | undefined | undefined;
1676
- message?: string | undefined | undefined;
1677
- status: number;
1678
- statusText: string;
1679
- };
1680
- }, Error, better_auth.Prettify<{
1681
- sessionToken: string;
1682
- } & {
1683
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1684
- sessionToken: string;
1685
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1686
- }>, unknown>;
1687
- } | {
1688
- setActiveSession: _tanstack_react_query.UseMutateFunction<{
1689
- data: {
1690
- session: better_auth.Session & Record<string, any>;
1691
- user: better_auth.User & Record<string, any>;
1692
- };
1693
- error: null;
1694
- } | {
1695
- data: null;
1696
- error: {
1697
- code?: string | undefined | undefined;
1698
- message?: string | undefined | undefined;
1699
- status: number;
1700
- statusText: string;
1701
- };
1702
- }, Error, better_auth.Prettify<{
1703
- sessionToken: string;
1704
- } & {
1705
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1706
- sessionToken: string;
1707
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1708
- }>, unknown>;
1709
- setActiveSessionAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1710
- data: {
1711
- session: better_auth.Session & Record<string, any>;
1712
- user: better_auth.User & Record<string, any>;
1713
- };
1714
- error: null;
1715
- } | {
1716
- data: null;
1717
- error: {
1718
- code?: string | undefined | undefined;
1719
- message?: string | undefined | undefined;
1720
- status: number;
1721
- statusText: string;
1722
- };
1723
- }, Error, better_auth.Prettify<{
1724
- sessionToken: string;
1725
- } & {
1726
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1727
- sessionToken: string;
1728
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1729
- }>, unknown>;
1730
- setActiveSessionPending: boolean;
1731
- setActiveSessionError: Error | null;
1732
- data: undefined;
1733
- error: Error;
1734
- variables: better_auth.Prettify<{
1735
- sessionToken: string;
1736
- } & {
1737
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1738
- sessionToken: string;
1739
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1740
- }>;
1741
- isError: true;
1742
- isIdle: false;
1743
- isPending: false;
1744
- isSuccess: false;
1745
- status: "error";
1746
- mutate: _tanstack_react_query.UseMutateFunction<{
1747
- data: {
1748
- session: better_auth.Session & Record<string, any>;
1749
- user: better_auth.User & Record<string, any>;
1750
- };
1751
- error: null;
1752
- } | {
1753
- data: null;
1754
- error: {
1755
- code?: string | undefined | undefined;
1756
- message?: string | undefined | undefined;
1757
- status: number;
1758
- statusText: string;
1759
- };
1760
- }, Error, better_auth.Prettify<{
1761
- sessionToken: string;
1762
- } & {
1763
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1764
- sessionToken: string;
1765
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1766
- }>, unknown>;
1767
- reset: () => void;
1768
- context: unknown;
1769
- failureCount: number;
1770
- failureReason: Error | null;
1771
- isPaused: boolean;
1772
- submittedAt: number;
1773
- mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1774
- data: {
1775
- session: better_auth.Session & Record<string, any>;
1776
- user: better_auth.User & Record<string, any>;
1777
- };
1778
- error: null;
1779
- } | {
1780
- data: null;
1781
- error: {
1782
- code?: string | undefined | undefined;
1783
- message?: string | undefined | undefined;
1784
- status: number;
1785
- statusText: string;
1786
- };
1787
- }, Error, better_auth.Prettify<{
1788
- sessionToken: string;
1789
- } & {
1790
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1791
- sessionToken: string;
1792
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1793
- }>, unknown>;
1794
- } | {
1795
- setActiveSession: _tanstack_react_query.UseMutateFunction<{
1796
- data: {
1797
- session: better_auth.Session & Record<string, any>;
1798
- user: better_auth.User & Record<string, any>;
1799
- };
1800
- error: null;
1801
- } | {
1802
- data: null;
1803
- error: {
1804
- code?: string | undefined | undefined;
1805
- message?: string | undefined | undefined;
1806
- status: number;
1807
- statusText: string;
1808
- };
1809
- }, Error, better_auth.Prettify<{
1810
- sessionToken: string;
1811
- } & {
1812
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1813
- sessionToken: string;
1814
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1815
- }>, unknown>;
1816
- setActiveSessionAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1817
- data: {
1818
- session: better_auth.Session & Record<string, any>;
1819
- user: better_auth.User & Record<string, any>;
1820
- };
1821
- error: null;
1822
- } | {
1823
- data: null;
1824
- error: {
1825
- code?: string | undefined | undefined;
1826
- message?: string | undefined | undefined;
1827
- status: number;
1828
- statusText: string;
1829
- };
1830
- }, Error, better_auth.Prettify<{
1831
- sessionToken: string;
1832
- } & {
1833
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1834
- sessionToken: string;
1835
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1836
- }>, unknown>;
1837
- setActiveSessionPending: boolean;
1838
- setActiveSessionError: Error | null;
1839
- data: {
1840
- data: {
1841
- session: better_auth.Session & Record<string, any>;
1842
- user: better_auth.User & Record<string, any>;
1843
- };
1844
- error: null;
1845
- } | {
1846
- data: null;
1847
- error: {
1848
- code?: string | undefined | undefined;
1849
- message?: string | undefined | undefined;
1850
- status: number;
1851
- statusText: string;
1852
- };
1853
- };
1854
- error: null;
1855
- variables: better_auth.Prettify<{
1856
- sessionToken: string;
1857
- } & {
1858
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1859
- sessionToken: string;
1860
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1861
- }>;
1862
- isError: false;
1863
- isIdle: false;
1864
- isPending: false;
1865
- isSuccess: true;
1866
- status: "success";
1867
- mutate: _tanstack_react_query.UseMutateFunction<{
1868
- data: {
1869
- session: better_auth.Session & Record<string, any>;
1870
- user: better_auth.User & Record<string, any>;
1871
- };
1872
- error: null;
1873
- } | {
1874
- data: null;
1875
- error: {
1876
- code?: string | undefined | undefined;
1877
- message?: string | undefined | undefined;
1878
- status: number;
1879
- statusText: string;
1880
- };
1881
- }, Error, better_auth.Prettify<{
1882
- sessionToken: string;
1883
- } & {
1884
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1885
- sessionToken: string;
1886
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1887
- }>, unknown>;
1888
- reset: () => void;
1889
- context: unknown;
1890
- failureCount: number;
1891
- failureReason: Error | null;
1892
- isPaused: boolean;
1893
- submittedAt: number;
1894
- mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1895
- data: {
1896
- session: better_auth.Session & Record<string, any>;
1897
- user: better_auth.User & Record<string, any>;
1898
- };
1899
- error: null;
1900
- } | {
1901
- data: null;
1902
- error: {
1903
- code?: string | undefined | undefined;
1904
- message?: string | undefined | undefined;
1905
- status: number;
1906
- statusText: string;
1907
- };
1908
- }, Error, better_auth.Prettify<{
1909
- sessionToken: string;
1910
- } & {
1911
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
1912
- sessionToken: string;
1913
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
1914
- }>, unknown>;
1915
- };
1916
-
1917
- declare function useDeletePasskey(options?: Partial<AuthQueryOptions>): {
1918
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, any, {
1919
- previousData: {};
1920
- } | undefined>;
1921
- mutateAsync: {
1922
- (params: Omit<any, "fetchOptions"> & {
1923
- fetchOptions?: {
1924
- throw?: true;
1925
- } | undefined;
1926
- }): Promise<ThrowableResult>;
1927
- (params: Omit<any, "fetchOptions"> & {
1928
- fetchOptions?: better_auth_react.BetterFetchOption;
1929
- }): Promise<NonThrowableResult>;
1930
- };
1931
- isPending: boolean;
1932
- error: Error | null;
1933
- data: undefined;
1934
- variables: undefined;
1935
- isError: false;
1936
- isIdle: true;
1937
- isSuccess: false;
1938
- status: "idle";
1939
- reset: () => void;
1940
- context: {
1941
- previousData: {};
1942
- } | undefined;
1943
- failureCount: number;
1944
- failureReason: Error | null;
1945
- isPaused: boolean;
1946
- submittedAt: number;
1947
- } | {
1948
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, any, {
1949
- previousData: {};
1950
- } | undefined>;
1951
- mutateAsync: {
1952
- (params: Omit<any, "fetchOptions"> & {
1953
- fetchOptions?: {
1954
- throw?: true;
1955
- } | undefined;
1956
- }): Promise<ThrowableResult>;
1957
- (params: Omit<any, "fetchOptions"> & {
1958
- fetchOptions?: better_auth_react.BetterFetchOption;
1959
- }): Promise<NonThrowableResult>;
1960
- };
1961
- isPending: boolean;
1962
- error: Error | null;
1963
- data: undefined;
1964
- variables: any;
1965
- isError: false;
1966
- isIdle: false;
1967
- isSuccess: false;
1968
- status: "pending";
1969
- reset: () => void;
1970
- context: {
1971
- previousData: {};
1972
- } | undefined;
1973
- failureCount: number;
1974
- failureReason: Error | null;
1975
- isPaused: boolean;
1976
- submittedAt: number;
1977
- } | {
1978
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, any, {
1979
- previousData: {};
1980
- } | undefined>;
1981
- mutateAsync: {
1982
- (params: Omit<any, "fetchOptions"> & {
1983
- fetchOptions?: {
1984
- throw?: true;
1985
- } | undefined;
1986
- }): Promise<ThrowableResult>;
1987
- (params: Omit<any, "fetchOptions"> & {
1988
- fetchOptions?: better_auth_react.BetterFetchOption;
1989
- }): Promise<NonThrowableResult>;
1990
- };
1991
- isPending: boolean;
1992
- error: Error | null;
1993
- data: undefined;
1994
- variables: any;
1995
- isError: true;
1996
- isIdle: false;
1997
- isSuccess: false;
1998
- status: "error";
1999
- reset: () => void;
2000
- context: {
2001
- previousData: {};
2002
- } | undefined;
2003
- failureCount: number;
2004
- failureReason: Error | null;
2005
- isPaused: boolean;
2006
- submittedAt: number;
2007
- } | {
2008
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, any, {
2009
- previousData: {};
2010
- } | undefined>;
2011
- mutateAsync: {
2012
- (params: Omit<any, "fetchOptions"> & {
2013
- fetchOptions?: {
2014
- throw?: true;
2015
- } | undefined;
2016
- }): Promise<ThrowableResult>;
2017
- (params: Omit<any, "fetchOptions"> & {
2018
- fetchOptions?: better_auth_react.BetterFetchOption;
2019
- }): Promise<NonThrowableResult>;
2020
- };
2021
- isPending: boolean;
2022
- error: Error | null;
2023
- data: NonThrowableResult | ThrowableResult;
2024
- variables: any;
2025
- isError: false;
2026
- isIdle: false;
2027
- isSuccess: true;
2028
- status: "success";
2029
- reset: () => void;
2030
- context: {
2031
- previousData: {};
2032
- } | undefined;
2033
- failureCount: number;
2034
- failureReason: Error | null;
2035
- isPaused: boolean;
2036
- submittedAt: number;
2037
- };
2038
- declare function useListPasskeys(options?: Partial<AnyUseQueryOptions>): _tanstack_react_query.UseQueryResult<unknown, Error>;
2039
-
2040
- declare function useListSessions(options?: Partial<AnyUseQueryOptions>): _tanstack_react_query.UseQueryResult<better_auth.Prettify<{
2041
- id: string;
2042
- createdAt: Date;
2043
- updatedAt: Date;
2044
- userId: string;
2045
- expiresAt: Date;
2046
- token: string;
2047
- ipAddress?: string | null | undefined | undefined;
2048
- userAgent?: string | null | undefined | undefined;
2049
- }>[], Error>;
2050
- declare function useRevokeOtherSessions(options?: Partial<AuthQueryOptions>): {
2051
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2052
- query?: Record<string, any> | undefined;
2053
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2054
- }> | undefined, {
2055
- previousData: {};
2056
- } | undefined>;
2057
- mutateAsync: {
2058
- (params: Omit<better_auth.Prettify<{
2059
- query?: Record<string, any> | undefined;
2060
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2061
- }> | undefined, "fetchOptions"> & {
2062
- fetchOptions?: {
2063
- throw?: true;
2064
- } | undefined;
2065
- }): Promise<ThrowableResult>;
2066
- (params: Omit<better_auth.Prettify<{
2067
- query?: Record<string, any> | undefined;
2068
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2069
- }> | undefined, "fetchOptions"> & {
2070
- fetchOptions?: better_auth_react.BetterFetchOption;
2071
- }): Promise<NonThrowableResult>;
2072
- };
2073
- isPending: boolean;
2074
- error: Error | null;
2075
- data: undefined;
2076
- variables: undefined;
2077
- isError: false;
2078
- isIdle: true;
2079
- isSuccess: false;
2080
- status: "idle";
2081
- reset: () => void;
2082
- context: {
2083
- previousData: {};
2084
- } | undefined;
2085
- failureCount: number;
2086
- failureReason: Error | null;
2087
- isPaused: boolean;
2088
- submittedAt: number;
2089
- } | {
2090
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2091
- query?: Record<string, any> | undefined;
2092
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2093
- }> | undefined, {
2094
- previousData: {};
2095
- } | undefined>;
2096
- mutateAsync: {
2097
- (params: Omit<better_auth.Prettify<{
2098
- query?: Record<string, any> | undefined;
2099
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2100
- }> | undefined, "fetchOptions"> & {
2101
- fetchOptions?: {
2102
- throw?: true;
2103
- } | undefined;
2104
- }): Promise<ThrowableResult>;
2105
- (params: Omit<better_auth.Prettify<{
2106
- query?: Record<string, any> | undefined;
2107
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2108
- }> | undefined, "fetchOptions"> & {
2109
- fetchOptions?: better_auth_react.BetterFetchOption;
2110
- }): Promise<NonThrowableResult>;
2111
- };
2112
- isPending: boolean;
2113
- error: Error | null;
2114
- data: undefined;
2115
- variables: better_auth.Prettify<{
2116
- query?: Record<string, any> | undefined;
2117
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2118
- }> | undefined;
2119
- isError: false;
2120
- isIdle: false;
2121
- isSuccess: false;
2122
- status: "pending";
2123
- reset: () => void;
2124
- context: {
2125
- previousData: {};
2126
- } | undefined;
2127
- failureCount: number;
2128
- failureReason: Error | null;
2129
- isPaused: boolean;
2130
- submittedAt: number;
2131
- } | {
2132
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2133
- query?: Record<string, any> | undefined;
2134
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2135
- }> | undefined, {
2136
- previousData: {};
2137
- } | undefined>;
2138
- mutateAsync: {
2139
- (params: Omit<better_auth.Prettify<{
2140
- query?: Record<string, any> | undefined;
2141
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2142
- }> | undefined, "fetchOptions"> & {
2143
- fetchOptions?: {
2144
- throw?: true;
2145
- } | undefined;
2146
- }): Promise<ThrowableResult>;
2147
- (params: Omit<better_auth.Prettify<{
2148
- query?: Record<string, any> | undefined;
2149
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2150
- }> | undefined, "fetchOptions"> & {
2151
- fetchOptions?: better_auth_react.BetterFetchOption;
2152
- }): Promise<NonThrowableResult>;
2153
- };
2154
- isPending: boolean;
2155
- error: Error | null;
2156
- data: undefined;
2157
- variables: better_auth.Prettify<{
2158
- query?: Record<string, any> | undefined;
2159
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2160
- }> | undefined;
2161
- isError: true;
2162
- isIdle: false;
2163
- isSuccess: false;
2164
- status: "error";
2165
- reset: () => void;
2166
- context: {
2167
- previousData: {};
2168
- } | undefined;
2169
- failureCount: number;
2170
- failureReason: Error | null;
2171
- isPaused: boolean;
2172
- submittedAt: number;
2173
- } | {
2174
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2175
- query?: Record<string, any> | undefined;
2176
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2177
- }> | undefined, {
2178
- previousData: {};
2179
- } | undefined>;
2180
- mutateAsync: {
2181
- (params: Omit<better_auth.Prettify<{
2182
- query?: Record<string, any> | undefined;
2183
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2184
- }> | undefined, "fetchOptions"> & {
2185
- fetchOptions?: {
2186
- throw?: true;
2187
- } | undefined;
2188
- }): Promise<ThrowableResult>;
2189
- (params: Omit<better_auth.Prettify<{
2190
- query?: Record<string, any> | undefined;
2191
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2192
- }> | undefined, "fetchOptions"> & {
2193
- fetchOptions?: better_auth_react.BetterFetchOption;
2194
- }): Promise<NonThrowableResult>;
2195
- };
2196
- isPending: boolean;
2197
- error: Error | null;
2198
- data: NonThrowableResult | ThrowableResult;
2199
- variables: better_auth.Prettify<{
2200
- query?: Record<string, any> | undefined;
2201
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2202
- }> | undefined;
2203
- isError: false;
2204
- isIdle: false;
2205
- isSuccess: true;
2206
- status: "success";
2207
- reset: () => void;
2208
- context: {
2209
- previousData: {};
2210
- } | undefined;
2211
- failureCount: number;
2212
- failureReason: Error | null;
2213
- isPaused: boolean;
2214
- submittedAt: number;
2215
- };
2216
- declare function useRevokeSession(options?: Partial<AuthQueryOptions>): {
2217
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2218
- token: string;
2219
- } & {
2220
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2221
- token: string;
2222
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2223
- }>, {
2224
- previousData: {};
2225
- } | undefined>;
2226
- mutateAsync: {
2227
- (params: Omit<better_auth.Prettify<{
2228
- token: string;
2229
- } & {
2230
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2231
- token: string;
2232
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2233
- }>, "fetchOptions"> & {
2234
- fetchOptions?: {
2235
- throw?: true;
2236
- } | undefined;
2237
- }): Promise<ThrowableResult>;
2238
- (params: Omit<better_auth.Prettify<{
2239
- token: string;
2240
- } & {
2241
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2242
- token: string;
2243
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2244
- }>, "fetchOptions"> & {
2245
- fetchOptions?: better_auth_react.BetterFetchOption;
2246
- }): Promise<NonThrowableResult>;
2247
- };
2248
- isPending: boolean;
2249
- error: Error | null;
2250
- data: undefined;
2251
- variables: undefined;
2252
- isError: false;
2253
- isIdle: true;
2254
- isSuccess: false;
2255
- status: "idle";
2256
- reset: () => void;
2257
- context: {
2258
- previousData: {};
2259
- } | undefined;
2260
- failureCount: number;
2261
- failureReason: Error | null;
2262
- isPaused: boolean;
2263
- submittedAt: number;
2264
- } | {
2265
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2266
- token: string;
2267
- } & {
2268
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2269
- token: string;
2270
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2271
- }>, {
2272
- previousData: {};
2273
- } | undefined>;
2274
- mutateAsync: {
2275
- (params: Omit<better_auth.Prettify<{
2276
- token: string;
2277
- } & {
2278
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2279
- token: string;
2280
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2281
- }>, "fetchOptions"> & {
2282
- fetchOptions?: {
2283
- throw?: true;
2284
- } | undefined;
2285
- }): Promise<ThrowableResult>;
2286
- (params: Omit<better_auth.Prettify<{
2287
- token: string;
2288
- } & {
2289
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2290
- token: string;
2291
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2292
- }>, "fetchOptions"> & {
2293
- fetchOptions?: better_auth_react.BetterFetchOption;
2294
- }): Promise<NonThrowableResult>;
2295
- };
2296
- isPending: boolean;
2297
- error: Error | null;
2298
- data: undefined;
2299
- variables: better_auth.Prettify<{
2300
- token: string;
2301
- } & {
2302
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2303
- token: string;
2304
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2305
- }>;
2306
- isError: false;
2307
- isIdle: false;
2308
- isSuccess: false;
2309
- status: "pending";
2310
- reset: () => void;
2311
- context: {
2312
- previousData: {};
2313
- } | undefined;
2314
- failureCount: number;
2315
- failureReason: Error | null;
2316
- isPaused: boolean;
2317
- submittedAt: number;
2318
- } | {
2319
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2320
- token: string;
2321
- } & {
2322
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2323
- token: string;
2324
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2325
- }>, {
2326
- previousData: {};
2327
- } | undefined>;
2328
- mutateAsync: {
2329
- (params: Omit<better_auth.Prettify<{
2330
- token: string;
2331
- } & {
2332
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2333
- token: string;
2334
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2335
- }>, "fetchOptions"> & {
2336
- fetchOptions?: {
2337
- throw?: true;
2338
- } | undefined;
2339
- }): Promise<ThrowableResult>;
2340
- (params: Omit<better_auth.Prettify<{
2341
- token: string;
2342
- } & {
2343
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2344
- token: string;
2345
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2346
- }>, "fetchOptions"> & {
2347
- fetchOptions?: better_auth_react.BetterFetchOption;
2348
- }): Promise<NonThrowableResult>;
2349
- };
2350
- isPending: boolean;
2351
- error: Error | null;
2352
- data: undefined;
2353
- variables: better_auth.Prettify<{
2354
- token: string;
2355
- } & {
2356
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2357
- token: string;
2358
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2359
- }>;
2360
- isError: true;
2361
- isIdle: false;
2362
- isSuccess: false;
2363
- status: "error";
2364
- reset: () => void;
2365
- context: {
2366
- previousData: {};
2367
- } | undefined;
2368
- failureCount: number;
2369
- failureReason: Error | null;
2370
- isPaused: boolean;
2371
- submittedAt: number;
2372
- } | {
2373
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2374
- token: string;
2375
- } & {
2376
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2377
- token: string;
2378
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2379
- }>, {
2380
- previousData: {};
2381
- } | undefined>;
2382
- mutateAsync: {
2383
- (params: Omit<better_auth.Prettify<{
2384
- token: string;
2385
- } & {
2386
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2387
- token: string;
2388
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2389
- }>, "fetchOptions"> & {
2390
- fetchOptions?: {
2391
- throw?: true;
2392
- } | undefined;
2393
- }): Promise<ThrowableResult>;
2394
- (params: Omit<better_auth.Prettify<{
2395
- token: string;
2396
- } & {
2397
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2398
- token: string;
2399
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2400
- }>, "fetchOptions"> & {
2401
- fetchOptions?: better_auth_react.BetterFetchOption;
2402
- }): Promise<NonThrowableResult>;
2403
- };
2404
- isPending: boolean;
2405
- error: Error | null;
2406
- data: NonThrowableResult | ThrowableResult;
2407
- variables: better_auth.Prettify<{
2408
- token: string;
2409
- } & {
2410
- fetchOptions?: better_auth.ClientFetchOption<Partial<{
2411
- token: string;
2412
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2413
- }>;
2414
- isError: false;
2415
- isIdle: false;
2416
- isSuccess: true;
2417
- status: "success";
2418
- reset: () => void;
2419
- context: {
2420
- previousData: {};
2421
- } | undefined;
2422
- failureCount: number;
2423
- failureReason: Error | null;
2424
- isPaused: boolean;
2425
- submittedAt: number;
2426
- };
2427
- declare function useRevokeSessions(options?: Partial<AuthQueryOptions>): {
2428
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2429
- query?: Record<string, any> | undefined;
2430
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2431
- }> | undefined, {
2432
- previousData: {};
2433
- } | undefined>;
2434
- mutateAsync: {
2435
- (params: Omit<better_auth.Prettify<{
2436
- query?: Record<string, any> | undefined;
2437
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2438
- }> | undefined, "fetchOptions"> & {
2439
- fetchOptions?: {
2440
- throw?: true;
2441
- } | undefined;
2442
- }): Promise<ThrowableResult>;
2443
- (params: Omit<better_auth.Prettify<{
2444
- query?: Record<string, any> | undefined;
2445
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2446
- }> | undefined, "fetchOptions"> & {
2447
- fetchOptions?: better_auth_react.BetterFetchOption;
2448
- }): Promise<NonThrowableResult>;
2449
- };
2450
- isPending: boolean;
2451
- error: Error | null;
2452
- data: undefined;
2453
- variables: undefined;
2454
- isError: false;
2455
- isIdle: true;
2456
- isSuccess: false;
2457
- status: "idle";
2458
- reset: () => void;
2459
- context: {
2460
- previousData: {};
2461
- } | undefined;
2462
- failureCount: number;
2463
- failureReason: Error | null;
2464
- isPaused: boolean;
2465
- submittedAt: number;
2466
- } | {
2467
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2468
- query?: Record<string, any> | undefined;
2469
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2470
- }> | undefined, {
2471
- previousData: {};
2472
- } | undefined>;
2473
- mutateAsync: {
2474
- (params: Omit<better_auth.Prettify<{
2475
- query?: Record<string, any> | undefined;
2476
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2477
- }> | undefined, "fetchOptions"> & {
2478
- fetchOptions?: {
2479
- throw?: true;
2480
- } | undefined;
2481
- }): Promise<ThrowableResult>;
2482
- (params: Omit<better_auth.Prettify<{
2483
- query?: Record<string, any> | undefined;
2484
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2485
- }> | undefined, "fetchOptions"> & {
2486
- fetchOptions?: better_auth_react.BetterFetchOption;
2487
- }): Promise<NonThrowableResult>;
2488
- };
2489
- isPending: boolean;
2490
- error: Error | null;
2491
- data: undefined;
2492
- variables: better_auth.Prettify<{
2493
- query?: Record<string, any> | undefined;
2494
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2495
- }> | undefined;
2496
- isError: false;
2497
- isIdle: false;
2498
- isSuccess: false;
2499
- status: "pending";
2500
- reset: () => void;
2501
- context: {
2502
- previousData: {};
2503
- } | undefined;
2504
- failureCount: number;
2505
- failureReason: Error | null;
2506
- isPaused: boolean;
2507
- submittedAt: number;
2508
- } | {
2509
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2510
- query?: Record<string, any> | undefined;
2511
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2512
- }> | undefined, {
2513
- previousData: {};
2514
- } | undefined>;
2515
- mutateAsync: {
2516
- (params: Omit<better_auth.Prettify<{
2517
- query?: Record<string, any> | undefined;
2518
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2519
- }> | undefined, "fetchOptions"> & {
2520
- fetchOptions?: {
2521
- throw?: true;
2522
- } | undefined;
2523
- }): Promise<ThrowableResult>;
2524
- (params: Omit<better_auth.Prettify<{
2525
- query?: Record<string, any> | undefined;
2526
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2527
- }> | undefined, "fetchOptions"> & {
2528
- fetchOptions?: better_auth_react.BetterFetchOption;
2529
- }): Promise<NonThrowableResult>;
2530
- };
2531
- isPending: boolean;
2532
- error: Error | null;
2533
- data: undefined;
2534
- variables: better_auth.Prettify<{
2535
- query?: Record<string, any> | undefined;
2536
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2537
- }> | undefined;
2538
- isError: true;
2539
- isIdle: false;
2540
- isSuccess: false;
2541
- status: "error";
2542
- reset: () => void;
2543
- context: {
2544
- previousData: {};
2545
- } | undefined;
2546
- failureCount: number;
2547
- failureReason: Error | null;
2548
- isPaused: boolean;
2549
- submittedAt: number;
2550
- } | {
2551
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
2552
- query?: Record<string, any> | undefined;
2553
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2554
- }> | undefined, {
2555
- previousData: {};
2556
- } | undefined>;
2557
- mutateAsync: {
2558
- (params: Omit<better_auth.Prettify<{
2559
- query?: Record<string, any> | undefined;
2560
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2561
- }> | undefined, "fetchOptions"> & {
2562
- fetchOptions?: {
2563
- throw?: true;
2564
- } | undefined;
2565
- }): Promise<ThrowableResult>;
2566
- (params: Omit<better_auth.Prettify<{
2567
- query?: Record<string, any> | undefined;
2568
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2569
- }> | undefined, "fetchOptions"> & {
2570
- fetchOptions?: better_auth_react.BetterFetchOption;
2571
- }): Promise<NonThrowableResult>;
2572
- };
2573
- isPending: boolean;
2574
- error: Error | null;
2575
- data: NonThrowableResult | ThrowableResult;
2576
- variables: better_auth.Prettify<{
2577
- query?: Record<string, any> | undefined;
2578
- fetchOptions?: better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
2579
- }> | undefined;
2580
- isError: false;
2581
- isIdle: false;
2582
- isSuccess: true;
2583
- status: "success";
2584
- reset: () => void;
2585
- context: {
2586
- previousData: {};
2587
- } | undefined;
2588
- failureCount: number;
2589
- failureReason: Error | null;
2590
- isPaused: boolean;
2591
- submittedAt: number;
2592
- };
2593
-
2594
- declare function useInvitation(params: Parameters<AuthClient["organization"]["getInvitation"]>[0], options?: Partial<AnyUseQueryOptions>): _tanstack_react_query.UseQueryResult<NonNullable<{
2595
- id: string;
2596
- organizationId: string;
2597
- email: string;
2598
- role: "admin" | "member" | "owner";
2599
- status: better_auth_plugins_organization.InvitationStatus;
2600
- inviterId: string;
2601
- expiresAt: Date;
2602
- createdAt: Date;
2603
- } & {
2604
- organizationName: string;
2605
- organizationSlug: string;
2606
- inviterEmail: string;
2607
- }>, Error>;
2608
-
2609
- type LayoutContextType = {
2610
- style: CSSProperties;
2611
- bodyClassName: string;
2612
- isMobile: boolean;
2613
- isSidebarOpen: boolean;
2614
- sidebarToggle: () => void;
2615
- logoHeader: ReactNode;
2616
- };
2617
- declare const LayoutContext: react.Context<LayoutContextType | undefined>;
2618
- declare const useLayout: () => LayoutContextType;
2619
-
2620
- declare function useOnSuccessTransition(redirectToProp?: string): {
2621
- isPending: boolean;
2622
- onSuccess: () => Promise<void>;
2623
- redirectTo: string;
2624
- };
2625
-
2626
- declare function useSession(options?: Partial<AnyUseQueryOptions>): {
2627
- session: Session | undefined;
2628
- user: User | undefined;
2629
- data: {
2630
- user: {
2631
- id: string;
2632
- createdAt: Date;
2633
- updatedAt: Date;
2634
- email: string;
2635
- emailVerified: boolean;
2636
- name: string;
2637
- image?: string | null | undefined;
2638
- isAnonymous: boolean | null | undefined;
2639
- phoneNumber?: string | null | undefined;
2640
- phoneNumberVerified?: boolean | null | undefined;
2641
- twoFactorEnabled: boolean | null | undefined;
2642
- username?: string | null | undefined;
2643
- displayUsername?: string | null | undefined;
2644
- banned: boolean | null | undefined;
2645
- role?: string | null | undefined;
2646
- banReason?: string | null | undefined;
2647
- banExpires?: Date | null | undefined;
2648
- };
2649
- session: {
2650
- id: string;
2651
- createdAt: Date;
2652
- updatedAt: Date;
2653
- userId: string;
2654
- expiresAt: Date;
2655
- token: string;
2656
- ipAddress?: string | null | undefined;
2657
- userAgent?: string | null | undefined;
2658
- impersonatedBy?: string | null | undefined;
2659
- activeOrganizationId?: string | null | undefined;
2660
- };
2661
- };
2662
- error: Error;
2663
- isError: true;
2664
- isPending: false;
2665
- isLoading: false;
2666
- isLoadingError: false;
2667
- isRefetchError: true;
2668
- isSuccess: false;
2669
- isPlaceholderData: false;
2670
- status: "error";
2671
- dataUpdatedAt: number;
2672
- errorUpdatedAt: number;
2673
- failureCount: number;
2674
- failureReason: Error | null;
2675
- errorUpdateCount: number;
2676
- isFetched: boolean;
2677
- isFetchedAfterMount: boolean;
2678
- isFetching: boolean;
2679
- isInitialLoading: boolean;
2680
- isPaused: boolean;
2681
- isRefetching: boolean;
2682
- isStale: boolean;
2683
- isEnabled: boolean;
2684
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
2685
- user: {
2686
- id: string;
2687
- createdAt: Date;
2688
- updatedAt: Date;
2689
- email: string;
2690
- emailVerified: boolean;
2691
- name: string;
2692
- image?: string | null | undefined;
2693
- isAnonymous: boolean | null | undefined;
2694
- phoneNumber?: string | null | undefined;
2695
- phoneNumberVerified?: boolean | null | undefined;
2696
- twoFactorEnabled: boolean | null | undefined;
2697
- username?: string | null | undefined;
2698
- displayUsername?: 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
- activeOrganizationId?: string | null | undefined;
2715
- };
2716
- }, Error>>;
2717
- fetchStatus: _tanstack_query_core.FetchStatus;
2718
- promise: Promise<{
2719
- user: {
2720
- id: string;
2721
- createdAt: Date;
2722
- updatedAt: Date;
2723
- email: string;
2724
- emailVerified: boolean;
2725
- name: string;
2726
- image?: string | null | undefined;
2727
- isAnonymous: boolean | null | undefined;
2728
- phoneNumber?: string | null | undefined;
2729
- phoneNumberVerified?: boolean | null | undefined;
2730
- twoFactorEnabled: boolean | null | undefined;
2731
- username?: string | null | undefined;
2732
- displayUsername?: string | null | undefined;
2733
- banned: boolean | null | undefined;
2734
- role?: string | null | undefined;
2735
- banReason?: string | null | undefined;
2736
- banExpires?: Date | null | undefined;
2737
- };
2738
- session: {
2739
- id: string;
2740
- createdAt: Date;
2741
- updatedAt: Date;
2742
- userId: string;
2743
- expiresAt: Date;
2744
- token: string;
2745
- ipAddress?: string | null | undefined;
2746
- userAgent?: string | null | undefined;
2747
- impersonatedBy?: string | null | undefined;
2748
- activeOrganizationId?: string | null | undefined;
2749
- };
2750
- }>;
2751
- } | {
2752
- session: Session | undefined;
2753
- user: User | undefined;
2754
- data: {
2755
- user: {
2756
- id: string;
2757
- createdAt: Date;
2758
- updatedAt: Date;
2759
- email: string;
2760
- emailVerified: boolean;
2761
- name: string;
2762
- image?: string | null | undefined;
2763
- isAnonymous: boolean | null | undefined;
2764
- phoneNumber?: string | null | undefined;
2765
- phoneNumberVerified?: boolean | null | undefined;
2766
- twoFactorEnabled: boolean | null | undefined;
2767
- username?: string | null | undefined;
2768
- displayUsername?: string | null | undefined;
2769
- banned: boolean | null | undefined;
2770
- role?: string | null | undefined;
2771
- banReason?: string | null | undefined;
2772
- banExpires?: Date | null | undefined;
2773
- };
2774
- session: {
2775
- id: string;
2776
- createdAt: Date;
2777
- updatedAt: Date;
2778
- userId: string;
2779
- expiresAt: Date;
2780
- token: string;
2781
- ipAddress?: string | null | undefined;
2782
- userAgent?: string | null | undefined;
2783
- impersonatedBy?: string | null | undefined;
2784
- activeOrganizationId?: string | null | undefined;
2785
- };
2786
- };
2787
- error: null;
2788
- isError: false;
2789
- isPending: false;
2790
- isLoading: false;
2791
- isLoadingError: false;
2792
- isRefetchError: false;
2793
- isSuccess: true;
2794
- isPlaceholderData: false;
2795
- status: "success";
2796
- dataUpdatedAt: number;
2797
- errorUpdatedAt: number;
2798
- failureCount: number;
2799
- failureReason: Error | null;
2800
- errorUpdateCount: number;
2801
- isFetched: boolean;
2802
- isFetchedAfterMount: boolean;
2803
- isFetching: boolean;
2804
- isInitialLoading: boolean;
2805
- isPaused: boolean;
2806
- isRefetching: boolean;
2807
- isStale: boolean;
2808
- isEnabled: boolean;
2809
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
2810
- user: {
2811
- id: string;
2812
- createdAt: Date;
2813
- updatedAt: Date;
2814
- email: string;
2815
- emailVerified: boolean;
2816
- name: string;
2817
- image?: string | null | undefined;
2818
- isAnonymous: boolean | null | undefined;
2819
- phoneNumber?: string | null | undefined;
2820
- phoneNumberVerified?: boolean | null | undefined;
2821
- twoFactorEnabled: boolean | null | undefined;
2822
- username?: string | null | undefined;
2823
- displayUsername?: string | null | undefined;
2824
- banned: boolean | null | undefined;
2825
- role?: string | null | undefined;
2826
- banReason?: string | null | undefined;
2827
- banExpires?: Date | null | undefined;
2828
- };
2829
- session: {
2830
- id: string;
2831
- createdAt: Date;
2832
- updatedAt: Date;
2833
- userId: string;
2834
- expiresAt: Date;
2835
- token: string;
2836
- ipAddress?: string | null | undefined;
2837
- userAgent?: string | null | undefined;
2838
- impersonatedBy?: string | null | undefined;
2839
- activeOrganizationId?: string | null | undefined;
2840
- };
2841
- }, Error>>;
2842
- fetchStatus: _tanstack_query_core.FetchStatus;
2843
- promise: Promise<{
2844
- user: {
2845
- id: string;
2846
- createdAt: Date;
2847
- updatedAt: Date;
2848
- email: string;
2849
- emailVerified: boolean;
2850
- name: string;
2851
- image?: string | null | undefined;
2852
- isAnonymous: boolean | null | undefined;
2853
- phoneNumber?: string | null | undefined;
2854
- phoneNumberVerified?: boolean | null | undefined;
2855
- twoFactorEnabled: boolean | null | undefined;
2856
- username?: string | null | undefined;
2857
- displayUsername?: string | null | undefined;
2858
- banned: boolean | null | undefined;
2859
- role?: string | null | undefined;
2860
- banReason?: string | null | undefined;
2861
- banExpires?: Date | null | undefined;
2862
- };
2863
- session: {
2864
- id: string;
2865
- createdAt: Date;
2866
- updatedAt: Date;
2867
- userId: string;
2868
- expiresAt: Date;
2869
- token: string;
2870
- ipAddress?: string | null | undefined;
2871
- userAgent?: string | null | undefined;
2872
- impersonatedBy?: string | null | undefined;
2873
- activeOrganizationId?: string | null | undefined;
2874
- };
2875
- }>;
2876
- } | {
2877
- session: Session | undefined;
2878
- user: User | undefined;
2879
- data: undefined;
2880
- error: Error;
2881
- isError: true;
2882
- isPending: false;
2883
- isLoading: false;
2884
- isLoadingError: true;
2885
- isRefetchError: false;
2886
- isSuccess: false;
2887
- isPlaceholderData: false;
2888
- status: "error";
2889
- dataUpdatedAt: number;
2890
- errorUpdatedAt: number;
2891
- failureCount: number;
2892
- failureReason: Error | null;
2893
- errorUpdateCount: number;
2894
- isFetched: boolean;
2895
- isFetchedAfterMount: boolean;
2896
- isFetching: boolean;
2897
- isInitialLoading: boolean;
2898
- isPaused: boolean;
2899
- isRefetching: boolean;
2900
- isStale: boolean;
2901
- isEnabled: boolean;
2902
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
2903
- user: {
2904
- id: string;
2905
- createdAt: Date;
2906
- updatedAt: Date;
2907
- email: string;
2908
- emailVerified: boolean;
2909
- name: string;
2910
- image?: string | null | undefined;
2911
- isAnonymous: boolean | null | undefined;
2912
- phoneNumber?: string | null | undefined;
2913
- phoneNumberVerified?: boolean | null | undefined;
2914
- twoFactorEnabled: boolean | null | undefined;
2915
- username?: string | null | undefined;
2916
- displayUsername?: string | null | undefined;
2917
- banned: boolean | null | undefined;
2918
- role?: string | null | undefined;
2919
- banReason?: string | null | undefined;
2920
- banExpires?: Date | null | undefined;
2921
- };
2922
- session: {
2923
- id: string;
2924
- createdAt: Date;
2925
- updatedAt: Date;
2926
- userId: string;
2927
- expiresAt: Date;
2928
- token: string;
2929
- ipAddress?: string | null | undefined;
2930
- userAgent?: string | null | undefined;
2931
- impersonatedBy?: string | null | undefined;
2932
- activeOrganizationId?: string | null | undefined;
2933
- };
2934
- }, Error>>;
2935
- fetchStatus: _tanstack_query_core.FetchStatus;
2936
- promise: Promise<{
2937
- user: {
2938
- id: string;
2939
- createdAt: Date;
2940
- updatedAt: Date;
2941
- email: string;
2942
- emailVerified: boolean;
2943
- name: string;
2944
- image?: string | null | undefined;
2945
- isAnonymous: boolean | null | undefined;
2946
- phoneNumber?: string | null | undefined;
2947
- phoneNumberVerified?: boolean | null | undefined;
2948
- twoFactorEnabled: boolean | null | undefined;
2949
- username?: string | null | undefined;
2950
- displayUsername?: string | null | undefined;
2951
- banned: boolean | null | undefined;
2952
- role?: string | null | undefined;
2953
- banReason?: string | null | undefined;
2954
- banExpires?: Date | null | undefined;
2955
- };
2956
- session: {
2957
- id: string;
2958
- createdAt: Date;
2959
- updatedAt: Date;
2960
- userId: string;
2961
- expiresAt: Date;
2962
- token: string;
2963
- ipAddress?: string | null | undefined;
2964
- userAgent?: string | null | undefined;
2965
- impersonatedBy?: string | null | undefined;
2966
- activeOrganizationId?: string | null | undefined;
2967
- };
2968
- }>;
2969
- } | {
2970
- session: Session | undefined;
2971
- user: User | undefined;
2972
- data: undefined;
2973
- error: null;
2974
- isError: false;
2975
- isPending: true;
2976
- isLoading: true;
2977
- isLoadingError: false;
2978
- isRefetchError: false;
2979
- isSuccess: false;
2980
- isPlaceholderData: false;
2981
- status: "pending";
2982
- dataUpdatedAt: number;
2983
- errorUpdatedAt: number;
2984
- failureCount: number;
2985
- failureReason: Error | null;
2986
- errorUpdateCount: number;
2987
- isFetched: boolean;
2988
- isFetchedAfterMount: boolean;
2989
- isFetching: boolean;
2990
- isInitialLoading: boolean;
2991
- isPaused: boolean;
2992
- isRefetching: boolean;
2993
- isStale: boolean;
2994
- isEnabled: boolean;
2995
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
2996
- user: {
2997
- id: string;
2998
- createdAt: Date;
2999
- updatedAt: Date;
3000
- email: string;
3001
- emailVerified: boolean;
3002
- name: string;
3003
- image?: string | null | undefined;
3004
- isAnonymous: boolean | null | undefined;
3005
- phoneNumber?: string | null | undefined;
3006
- phoneNumberVerified?: boolean | null | undefined;
3007
- twoFactorEnabled: boolean | null | undefined;
3008
- username?: string | null | undefined;
3009
- displayUsername?: string | null | undefined;
3010
- banned: boolean | null | undefined;
3011
- role?: string | null | undefined;
3012
- banReason?: string | null | undefined;
3013
- banExpires?: Date | null | undefined;
3014
- };
3015
- session: {
3016
- id: string;
3017
- createdAt: Date;
3018
- updatedAt: Date;
3019
- userId: string;
3020
- expiresAt: Date;
3021
- token: string;
3022
- ipAddress?: string | null | undefined;
3023
- userAgent?: string | null | undefined;
3024
- impersonatedBy?: string | null | undefined;
3025
- activeOrganizationId?: string | null | undefined;
3026
- };
3027
- }, Error>>;
3028
- fetchStatus: _tanstack_query_core.FetchStatus;
3029
- promise: Promise<{
3030
- user: {
3031
- id: string;
3032
- createdAt: Date;
3033
- updatedAt: Date;
3034
- email: string;
3035
- emailVerified: boolean;
3036
- name: string;
3037
- image?: string | null | undefined;
3038
- isAnonymous: boolean | null | undefined;
3039
- phoneNumber?: string | null | undefined;
3040
- phoneNumberVerified?: boolean | null | undefined;
3041
- twoFactorEnabled: boolean | null | undefined;
3042
- username?: string | null | undefined;
3043
- displayUsername?: string | null | undefined;
3044
- banned: boolean | null | undefined;
3045
- role?: string | null | undefined;
3046
- banReason?: string | null | undefined;
3047
- banExpires?: Date | null | undefined;
3048
- };
3049
- session: {
3050
- id: string;
3051
- createdAt: Date;
3052
- updatedAt: Date;
3053
- userId: string;
3054
- expiresAt: Date;
3055
- token: string;
3056
- ipAddress?: string | null | undefined;
3057
- userAgent?: string | null | undefined;
3058
- impersonatedBy?: string | null | undefined;
3059
- activeOrganizationId?: string | null | undefined;
3060
- };
3061
- }>;
3062
- } | {
3063
- session: Session | undefined;
3064
- user: User | undefined;
3065
- data: undefined;
3066
- error: null;
3067
- isError: false;
3068
- isPending: true;
3069
- isLoadingError: false;
3070
- isRefetchError: false;
3071
- isSuccess: false;
3072
- isPlaceholderData: false;
3073
- status: "pending";
3074
- dataUpdatedAt: number;
3075
- errorUpdatedAt: number;
3076
- failureCount: number;
3077
- failureReason: Error | null;
3078
- errorUpdateCount: number;
3079
- isFetched: boolean;
3080
- isFetchedAfterMount: boolean;
3081
- isFetching: boolean;
3082
- isLoading: boolean;
3083
- isInitialLoading: boolean;
3084
- isPaused: boolean;
3085
- isRefetching: boolean;
3086
- isStale: boolean;
3087
- isEnabled: boolean;
3088
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
3089
- user: {
3090
- id: string;
3091
- createdAt: Date;
3092
- updatedAt: Date;
3093
- email: string;
3094
- emailVerified: boolean;
3095
- name: string;
3096
- image?: string | null | undefined;
3097
- isAnonymous: boolean | null | undefined;
3098
- phoneNumber?: string | null | undefined;
3099
- phoneNumberVerified?: boolean | null | undefined;
3100
- twoFactorEnabled: boolean | null | undefined;
3101
- username?: string | null | undefined;
3102
- displayUsername?: string | null | undefined;
3103
- banned: boolean | null | undefined;
3104
- role?: string | null | undefined;
3105
- banReason?: string | null | undefined;
3106
- banExpires?: Date | null | undefined;
3107
- };
3108
- session: {
3109
- id: string;
3110
- createdAt: Date;
3111
- updatedAt: Date;
3112
- userId: string;
3113
- expiresAt: Date;
3114
- token: string;
3115
- ipAddress?: string | null | undefined;
3116
- userAgent?: string | null | undefined;
3117
- impersonatedBy?: string | null | undefined;
3118
- activeOrganizationId?: string | null | undefined;
3119
- };
3120
- }, Error>>;
3121
- fetchStatus: _tanstack_query_core.FetchStatus;
3122
- promise: Promise<{
3123
- user: {
3124
- id: string;
3125
- createdAt: Date;
3126
- updatedAt: Date;
3127
- email: string;
3128
- emailVerified: boolean;
3129
- name: string;
3130
- image?: string | null | undefined;
3131
- isAnonymous: boolean | null | undefined;
3132
- phoneNumber?: string | null | undefined;
3133
- phoneNumberVerified?: boolean | null | undefined;
3134
- twoFactorEnabled: boolean | null | undefined;
3135
- username?: string | null | undefined;
3136
- displayUsername?: string | null | undefined;
3137
- banned: boolean | null | undefined;
3138
- role?: string | null | undefined;
3139
- banReason?: string | null | undefined;
3140
- banExpires?: Date | null | undefined;
3141
- };
3142
- session: {
3143
- id: string;
3144
- createdAt: Date;
3145
- updatedAt: Date;
3146
- userId: string;
3147
- expiresAt: Date;
3148
- token: string;
3149
- ipAddress?: string | null | undefined;
3150
- userAgent?: string | null | undefined;
3151
- impersonatedBy?: string | null | undefined;
3152
- activeOrganizationId?: string | null | undefined;
3153
- };
3154
- }>;
3155
- } | {
3156
- session: Session | undefined;
3157
- user: User | undefined;
3158
- data: {
3159
- user: {
3160
- id: string;
3161
- createdAt: Date;
3162
- updatedAt: Date;
3163
- email: string;
3164
- emailVerified: boolean;
3165
- name: string;
3166
- image?: string | null | undefined;
3167
- isAnonymous: boolean | null | undefined;
3168
- phoneNumber?: string | null | undefined;
3169
- phoneNumberVerified?: boolean | null | undefined;
3170
- twoFactorEnabled: boolean | null | undefined;
3171
- username?: string | null | undefined;
3172
- displayUsername?: string | null | undefined;
3173
- banned: boolean | null | undefined;
3174
- role?: string | null | undefined;
3175
- banReason?: string | null | undefined;
3176
- banExpires?: Date | null | undefined;
3177
- };
3178
- session: {
3179
- id: string;
3180
- createdAt: Date;
3181
- updatedAt: Date;
3182
- userId: string;
3183
- expiresAt: Date;
3184
- token: string;
3185
- ipAddress?: string | null | undefined;
3186
- userAgent?: string | null | undefined;
3187
- impersonatedBy?: string | null | undefined;
3188
- activeOrganizationId?: string | null | undefined;
3189
- };
3190
- };
3191
- isError: false;
3192
- error: null;
3193
- isPending: false;
3194
- isLoading: false;
3195
- isLoadingError: false;
3196
- isRefetchError: false;
3197
- isSuccess: true;
3198
- isPlaceholderData: true;
3199
- status: "success";
3200
- dataUpdatedAt: number;
3201
- errorUpdatedAt: number;
3202
- failureCount: number;
3203
- failureReason: Error | null;
3204
- errorUpdateCount: number;
3205
- isFetched: boolean;
3206
- isFetchedAfterMount: boolean;
3207
- isFetching: boolean;
3208
- isInitialLoading: boolean;
3209
- isPaused: boolean;
3210
- isRefetching: boolean;
3211
- isStale: boolean;
3212
- isEnabled: boolean;
3213
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
3214
- user: {
3215
- id: string;
3216
- createdAt: Date;
3217
- updatedAt: Date;
3218
- email: string;
3219
- emailVerified: boolean;
3220
- name: string;
3221
- image?: string | null | undefined;
3222
- isAnonymous: boolean | null | undefined;
3223
- phoneNumber?: string | null | undefined;
3224
- phoneNumberVerified?: boolean | null | undefined;
3225
- twoFactorEnabled: boolean | null | undefined;
3226
- username?: string | null | undefined;
3227
- displayUsername?: string | null | undefined;
3228
- banned: boolean | null | undefined;
3229
- role?: string | null | undefined;
3230
- banReason?: string | null | undefined;
3231
- banExpires?: Date | null | undefined;
3232
- };
3233
- session: {
3234
- id: string;
3235
- createdAt: Date;
3236
- updatedAt: Date;
3237
- userId: string;
3238
- expiresAt: Date;
3239
- token: string;
3240
- ipAddress?: string | null | undefined;
3241
- userAgent?: string | null | undefined;
3242
- impersonatedBy?: string | null | undefined;
3243
- activeOrganizationId?: string | null | undefined;
3244
- };
3245
- }, Error>>;
3246
- fetchStatus: _tanstack_query_core.FetchStatus;
3247
- promise: Promise<{
3248
- user: {
3249
- id: string;
3250
- createdAt: Date;
3251
- updatedAt: Date;
3252
- email: string;
3253
- emailVerified: boolean;
3254
- name: string;
3255
- image?: string | null | undefined;
3256
- isAnonymous: boolean | null | undefined;
3257
- phoneNumber?: string | null | undefined;
3258
- phoneNumberVerified?: boolean | null | undefined;
3259
- twoFactorEnabled: boolean | null | undefined;
3260
- username?: string | null | undefined;
3261
- displayUsername?: string | null | undefined;
3262
- banned: boolean | null | undefined;
3263
- role?: string | null | undefined;
3264
- banReason?: string | null | undefined;
3265
- banExpires?: Date | null | undefined;
3266
- };
3267
- session: {
3268
- id: string;
3269
- createdAt: Date;
3270
- updatedAt: Date;
3271
- userId: string;
3272
- expiresAt: Date;
3273
- token: string;
3274
- ipAddress?: string | null | undefined;
3275
- userAgent?: string | null | undefined;
3276
- impersonatedBy?: string | null | undefined;
3277
- activeOrganizationId?: string | null | undefined;
3278
- };
3279
- }>;
3280
- };
3281
-
3282
- declare function useUpdateUser(options?: Partial<AuthQueryOptions>): {
3283
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
3284
- image?: (string | null) | undefined;
3285
- name?: string | undefined;
3286
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3287
- name?: string | undefined;
3288
- image?: string | undefined | null;
3289
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3290
- } & Partial<{} & {} & {} & {
3291
- phoneNumber?: string | null | undefined;
3292
- } & {} & {} & {} & {
3293
- username?: string | null | undefined;
3294
- displayUsername?: string | null | undefined;
3295
- } & {} & {}>> | undefined, {
3296
- previousData: {};
3297
- } | undefined>;
3298
- mutateAsync: {
3299
- (params: Omit<better_auth.Prettify<{
3300
- image?: (string | null) | undefined;
3301
- name?: string | undefined;
3302
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3303
- name?: string | undefined;
3304
- image?: string | undefined | null;
3305
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3306
- } & Partial<{} & {} & {} & {
3307
- phoneNumber?: string | null | undefined;
3308
- } & {} & {} & {} & {
3309
- username?: string | null | undefined;
3310
- displayUsername?: string | null | undefined;
3311
- } & {} & {}>> | undefined, "fetchOptions"> & {
3312
- fetchOptions?: {
3313
- throw?: true;
3314
- } | undefined;
3315
- }): Promise<ThrowableResult>;
3316
- (params: Omit<better_auth.Prettify<{
3317
- image?: (string | null) | undefined;
3318
- name?: string | undefined;
3319
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3320
- name?: string | undefined;
3321
- image?: string | undefined | null;
3322
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3323
- } & Partial<{} & {} & {} & {
3324
- phoneNumber?: string | null | undefined;
3325
- } & {} & {} & {} & {
3326
- username?: string | null | undefined;
3327
- displayUsername?: string | null | undefined;
3328
- } & {} & {}>> | undefined, "fetchOptions"> & {
3329
- fetchOptions?: better_auth_react.BetterFetchOption;
3330
- }): Promise<NonThrowableResult>;
3331
- };
3332
- isPending: boolean;
3333
- error: Error | null;
3334
- data: undefined;
3335
- variables: undefined;
3336
- isError: false;
3337
- isIdle: true;
3338
- isSuccess: false;
3339
- status: "idle";
3340
- reset: () => void;
3341
- context: {
3342
- previousData: {};
3343
- } | undefined;
3344
- failureCount: number;
3345
- failureReason: Error | null;
3346
- isPaused: boolean;
3347
- submittedAt: number;
3348
- } | {
3349
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
3350
- image?: (string | null) | undefined;
3351
- name?: string | undefined;
3352
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3353
- name?: string | undefined;
3354
- image?: string | undefined | null;
3355
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3356
- } & Partial<{} & {} & {} & {
3357
- phoneNumber?: string | null | undefined;
3358
- } & {} & {} & {} & {
3359
- username?: string | null | undefined;
3360
- displayUsername?: string | null | undefined;
3361
- } & {} & {}>> | undefined, {
3362
- previousData: {};
3363
- } | undefined>;
3364
- mutateAsync: {
3365
- (params: Omit<better_auth.Prettify<{
3366
- image?: (string | null) | undefined;
3367
- name?: string | undefined;
3368
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3369
- name?: string | undefined;
3370
- image?: string | undefined | null;
3371
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3372
- } & Partial<{} & {} & {} & {
3373
- phoneNumber?: string | null | undefined;
3374
- } & {} & {} & {} & {
3375
- username?: string | null | undefined;
3376
- displayUsername?: string | null | undefined;
3377
- } & {} & {}>> | undefined, "fetchOptions"> & {
3378
- fetchOptions?: {
3379
- throw?: true;
3380
- } | undefined;
3381
- }): Promise<ThrowableResult>;
3382
- (params: Omit<better_auth.Prettify<{
3383
- image?: (string | null) | undefined;
3384
- name?: string | undefined;
3385
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3386
- name?: string | undefined;
3387
- image?: string | undefined | null;
3388
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3389
- } & Partial<{} & {} & {} & {
3390
- phoneNumber?: string | null | undefined;
3391
- } & {} & {} & {} & {
3392
- username?: string | null | undefined;
3393
- displayUsername?: string | null | undefined;
3394
- } & {} & {}>> | undefined, "fetchOptions"> & {
3395
- fetchOptions?: better_auth_react.BetterFetchOption;
3396
- }): Promise<NonThrowableResult>;
3397
- };
3398
- isPending: boolean;
3399
- error: Error | null;
3400
- data: undefined;
3401
- variables: better_auth.Prettify<{
3402
- image?: (string | null) | undefined;
3403
- name?: string | undefined;
3404
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3405
- name?: string | undefined;
3406
- image?: string | undefined | null;
3407
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3408
- } & Partial<{} & {} & {} & {
3409
- phoneNumber?: string | null | undefined;
3410
- } & {} & {} & {} & {
3411
- username?: string | null | undefined;
3412
- displayUsername?: string | null | undefined;
3413
- } & {} & {}>> | undefined;
3414
- isError: false;
3415
- isIdle: false;
3416
- isSuccess: false;
3417
- status: "pending";
3418
- reset: () => void;
3419
- context: {
3420
- previousData: {};
3421
- } | undefined;
3422
- failureCount: number;
3423
- failureReason: Error | null;
3424
- isPaused: boolean;
3425
- submittedAt: number;
3426
- } | {
3427
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
3428
- image?: (string | null) | undefined;
3429
- name?: string | undefined;
3430
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3431
- name?: string | undefined;
3432
- image?: string | undefined | null;
3433
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3434
- } & Partial<{} & {} & {} & {
3435
- phoneNumber?: string | null | undefined;
3436
- } & {} & {} & {} & {
3437
- username?: string | null | undefined;
3438
- displayUsername?: string | null | undefined;
3439
- } & {} & {}>> | undefined, {
3440
- previousData: {};
3441
- } | undefined>;
3442
- mutateAsync: {
3443
- (params: Omit<better_auth.Prettify<{
3444
- image?: (string | null) | undefined;
3445
- name?: string | undefined;
3446
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3447
- name?: string | undefined;
3448
- image?: string | undefined | null;
3449
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3450
- } & Partial<{} & {} & {} & {
3451
- phoneNumber?: string | null | undefined;
3452
- } & {} & {} & {} & {
3453
- username?: string | null | undefined;
3454
- displayUsername?: string | null | undefined;
3455
- } & {} & {}>> | undefined, "fetchOptions"> & {
3456
- fetchOptions?: {
3457
- throw?: true;
3458
- } | undefined;
3459
- }): Promise<ThrowableResult>;
3460
- (params: Omit<better_auth.Prettify<{
3461
- image?: (string | null) | undefined;
3462
- name?: string | undefined;
3463
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3464
- name?: string | undefined;
3465
- image?: string | undefined | null;
3466
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3467
- } & Partial<{} & {} & {} & {
3468
- phoneNumber?: string | null | undefined;
3469
- } & {} & {} & {} & {
3470
- username?: string | null | undefined;
3471
- displayUsername?: string | null | undefined;
3472
- } & {} & {}>> | undefined, "fetchOptions"> & {
3473
- fetchOptions?: better_auth_react.BetterFetchOption;
3474
- }): Promise<NonThrowableResult>;
3475
- };
3476
- isPending: boolean;
3477
- error: Error | null;
3478
- data: undefined;
3479
- variables: better_auth.Prettify<{
3480
- image?: (string | null) | undefined;
3481
- name?: string | undefined;
3482
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3483
- name?: string | undefined;
3484
- image?: string | undefined | null;
3485
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3486
- } & Partial<{} & {} & {} & {
3487
- phoneNumber?: string | null | undefined;
3488
- } & {} & {} & {} & {
3489
- username?: string | null | undefined;
3490
- displayUsername?: string | null | undefined;
3491
- } & {} & {}>> | undefined;
3492
- isError: true;
3493
- isIdle: false;
3494
- isSuccess: false;
3495
- status: "error";
3496
- reset: () => void;
3497
- context: {
3498
- previousData: {};
3499
- } | undefined;
3500
- failureCount: number;
3501
- failureReason: Error | null;
3502
- isPaused: boolean;
3503
- submittedAt: number;
3504
- } | {
3505
- mutate: _tanstack_react_query.UseMutateFunction<NonThrowableResult | ThrowableResult, Error, better_auth.Prettify<{
3506
- image?: (string | null) | undefined;
3507
- name?: string | undefined;
3508
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3509
- name?: string | undefined;
3510
- image?: string | undefined | null;
3511
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3512
- } & Partial<{} & {} & {} & {
3513
- phoneNumber?: string | null | undefined;
3514
- } & {} & {} & {} & {
3515
- username?: string | null | undefined;
3516
- displayUsername?: string | null | undefined;
3517
- } & {} & {}>> | undefined, {
3518
- previousData: {};
3519
- } | undefined>;
3520
- mutateAsync: {
3521
- (params: Omit<better_auth.Prettify<{
3522
- image?: (string | null) | undefined;
3523
- name?: string | undefined;
3524
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3525
- name?: string | undefined;
3526
- image?: string | undefined | null;
3527
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3528
- } & Partial<{} & {} & {} & {
3529
- phoneNumber?: string | null | undefined;
3530
- } & {} & {} & {} & {
3531
- username?: string | null | undefined;
3532
- displayUsername?: string | null | undefined;
3533
- } & {} & {}>> | undefined, "fetchOptions"> & {
3534
- fetchOptions?: {
3535
- throw?: true;
3536
- } | undefined;
3537
- }): Promise<ThrowableResult>;
3538
- (params: Omit<better_auth.Prettify<{
3539
- image?: (string | null) | undefined;
3540
- name?: string | undefined;
3541
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3542
- name?: string | undefined;
3543
- image?: string | undefined | null;
3544
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3545
- } & Partial<{} & {} & {} & {
3546
- phoneNumber?: string | null | undefined;
3547
- } & {} & {} & {} & {
3548
- username?: string | null | undefined;
3549
- displayUsername?: string | null | undefined;
3550
- } & {} & {}>> | undefined, "fetchOptions"> & {
3551
- fetchOptions?: better_auth_react.BetterFetchOption;
3552
- }): Promise<NonThrowableResult>;
3553
- };
3554
- isPending: boolean;
3555
- error: Error | null;
3556
- data: NonThrowableResult | ThrowableResult;
3557
- variables: better_auth.Prettify<{
3558
- image?: (string | null) | undefined;
3559
- name?: string | undefined;
3560
- fetchOptions?: better_auth.ClientFetchOption<Partial<Partial<{}> & {
3561
- name?: string | undefined;
3562
- image?: string | undefined | null;
3563
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
3564
- } & Partial<{} & {} & {} & {
3565
- phoneNumber?: string | null | undefined;
3566
- } & {} & {} & {} & {
3567
- username?: string | null | undefined;
3568
- displayUsername?: string | null | undefined;
3569
- } & {} & {}>> | undefined;
3570
- isError: false;
3571
- isIdle: false;
3572
- isSuccess: true;
3573
- status: "success";
3574
- reset: () => void;
3575
- context: {
3576
- previousData: {};
3577
- } | undefined;
3578
- failureCount: number;
3579
- failureReason: Error | null;
3580
- isPaused: boolean;
3581
- submittedAt: number;
3582
- };
3583
-
3584
- type WorkspaceContextType = {
3585
- activeWorkspace: Workspace | null;
3586
- workspaceList: Workspace[] | null;
3587
- isFetchingWorkspace: boolean;
3588
- isOwner: boolean;
3589
- isAdmin: boolean;
3590
- isMember: boolean;
3591
- currentUserRole: string | null;
3592
- updateActiveWorkspace: (workspace: Partial<Workspace>) => Promise<void>;
3593
- };
3594
- declare const WorkspaceContext: react.Context<WorkspaceContextType | undefined>;
3595
- declare function useWorkspace(): WorkspaceContextType;
3596
-
3597
- declare function BackupCodesDialog({ classNames, onOpenChange, title, description, backupCodes, ...props }: DialogComponentProps & {
3598
- backupCodes: string[];
3599
- }): react_jsx_runtime.JSX.Element;
3600
-
3601
- declare function DeleteAccountDialog({ classNames, onOpenChange, title, description, accounts, ...props }: DialogComponentProps & {
3602
- accounts?: Account[] | null;
3603
- }): react_jsx_runtime.JSX.Element;
3604
-
3605
- declare function SessionFreshnessDialog({ classNames, onOpenChange, title, description, ...props }: DialogComponentProps): react_jsx_runtime.JSX.Element;
3606
-
3607
- declare function TwoFactorPasswordDialog({ classNames, onOpenChange, title, description, isTwoFactorEnabled, ...props }: DialogComponentProps & {
3608
- isTwoFactorEnabled: boolean;
3609
- }): react_jsx_runtime.JSX.Element;
3610
-
3611
- declare function DeleteAccountCard({ className, classNames, isPending, accounts, skipHook, ...props }: CardComponentProps & {
3612
- accounts?: Account[] | null;
3613
- skipHook?: boolean;
3614
- }): react_jsx_runtime.JSX.Element;
3615
-
3616
- declare function FormAvatarCard({ className, classNames, avatar, ...props }: CardComponentProps & {
3617
- avatar?: ImageOptions;
3618
- }): react_jsx_runtime.JSX.Element;
3619
-
3620
- declare function FormEmailCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3621
-
3622
- declare function FormFieldsCard({ className, classNames, description, instructions, name, placeholder, required, label, type, multiline, value, validate, ...props }: CardComponentProps & {
3623
- name: string;
3624
- placeholder?: string;
3625
- required?: boolean;
3626
- label?: ReactNode;
3627
- type?: FieldType;
3628
- multiline?: boolean;
3629
- value?: unknown;
3630
- validate?: (value: string) => boolean | Promise<boolean>;
3631
- }): react_jsx_runtime.JSX.Element;
3632
-
3633
- declare function FormNameCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3634
-
3635
- declare function FormPasswordCard({ className, classNames, isPending, accounts, passwordValidation: propPasswordValidation, skipHook, ...props }: CardComponentProps & {
3636
- accounts?: {
3637
- providerId: string;
3638
- }[] | null;
3639
- passwordValidation?: PasswordValidation;
3640
- skipHook?: boolean;
3641
- }): react_jsx_runtime.JSX.Element;
3642
-
3643
- declare function FormUsernameCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3644
-
3645
- declare function MultiAccountCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3646
-
3647
- declare function PasskeysCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3648
-
3649
- declare function ProvidersCard({ className, classNames, isPending, accounts, refetch, skipHook, ...props }: CardComponentProps & {
3650
- accounts?: Account[] | null;
3651
- refetch?: Refetch;
3652
- skipHook?: boolean;
3653
- }): react_jsx_runtime.JSX.Element;
3654
-
3655
- declare function SessionsCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3656
-
3657
- declare function TwoFactorCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3658
-
3659
- declare function SecurityCards({ className, classNames, }: {
3660
- className?: string;
3661
- classNames?: CardClassNames;
3662
- }): react_jsx_runtime.JSX.Element;
3663
-
3664
- declare function SettingsCards({ className, classNames, avatar, }: {
3665
- className?: string;
3666
- classNames?: CardClassNames;
3667
- avatar?: ImageOptions;
3668
- }): react_jsx_runtime.JSX.Element;
3669
-
3670
- declare function ApiKeysCard({ className, classNames, isPending: workspacePending, isWorkspace, workspaceId, ...props }: CardComponentProps & {
3671
- isWorkspace?: boolean;
3672
- workspaceId?: string;
3673
- }): react_jsx_runtime.JSX.Element;
3674
-
3675
- declare function CreateApiKeyDialog({ classNames, onOpenChange, title, description, onSuccess, refetch, isWorkspace, workspaceId, ...props }: DialogComponentProps & {
3676
- onSuccess: (key: string) => void;
3677
- refetch?: Refetch;
3678
- isWorkspace?: boolean;
3679
- workspaceId?: string;
3680
- }): react_jsx_runtime.JSX.Element;
3681
-
3682
- declare function ApiKeyDeleteDialog({ classNames, onOpenChange, title, description, apiKey, refetch, ...props }: DialogComponentProps & {
3683
- apiKey: ApiKey;
3684
- refetch?: Refetch;
3685
- }): react_jsx_runtime.JSX.Element;
3686
-
3687
- declare function ApiKeyDisplayDialog({ classNames, onOpenChange, title, description, apiKey, ...props }: DialogComponentProps & {
3688
- apiKey: string;
3689
- }): react_jsx_runtime.JSX.Element;
3690
-
3691
- type AuthViewClassNames = {
3692
- base?: string;
3693
- header?: string;
3694
- title?: string;
3695
- description?: string;
3696
- content?: string;
3697
- continueWith?: string;
3698
- separator?: string;
3699
- footer?: string;
3700
- footerLink?: string;
3701
- form?: AuthFormClassNames;
3702
- };
3703
- type AuthFormClassNames = {
3704
- base?: string;
3705
- button?: string;
3706
- icon?: string;
3707
- label?: string;
3708
- input?: string;
3709
- error?: string;
3710
- checkbox?: string;
3711
- description?: string;
3712
- forgotPasswordLink?: string;
3713
- otpInput?: string;
3714
- otpInputContainer?: string;
3715
- qrCode?: string;
3716
- primaryButton?: string;
3717
- secondaryButton?: string;
3718
- outlineButton?: string;
3719
- providerButton?: string;
3720
- lastLoginMethod?: string;
3721
- };
3722
- interface AuthViewProps {
3723
- className?: string;
3724
- classNames?: AuthViewClassNames;
3725
- cardHeader?: ReactNode;
3726
- enableAcceptInvitation?: boolean;
3727
- otpSeparators?: 0 | 1 | 2;
3728
- path?: string;
3729
- pathname?: string;
3730
- redirectTo?: string;
3731
- socialLayout?: "auto" | "horizontal" | "grid" | "vertical";
3732
- view?: keyof PathConfig["auth"];
3733
- }
3734
- interface AuthFormProps {
3735
- className?: string;
3736
- classNames?: AuthFormClassNames;
3737
- isSubmitting?: boolean;
3738
- otpSeparators?: 0 | 1 | 2;
3739
- pathname?: string;
3740
- redirectTo?: string;
3741
- setIsSubmitting?: (isSubmitting: boolean) => void;
3742
- view?: keyof PathConfig["auth"];
3743
- }
3744
- interface AuthButtonProps {
3745
- className?: string;
3746
- classNames?: AuthViewClassNames;
3747
- isSubmitting?: boolean;
3748
- redirectTo?: string;
3749
- setIsSubmitting?: (isSubmitting: boolean) => void;
3750
- view?: keyof PathConfig["auth"];
3751
- }
3752
-
3753
- declare function EmailOTPButton({ className, classNames, isSubmitting, view }: AuthButtonProps): react_jsx_runtime.JSX.Element;
3754
-
3755
- declare function LastUsedButton({ className, classNames, size, variant, lastUsedName, }: AuthButtonProps & ComponentProps<typeof Badge> & {
3756
- lastUsedName: string | undefined;
3757
- }): false | react_jsx_runtime.JSX.Element | null;
3758
-
3759
- declare function MagicLinkButton({ className, classNames, isSubmitting, view }: AuthButtonProps): react_jsx_runtime.JSX.Element;
3760
-
3761
- declare function OneTap({ redirectTo }: {
3762
- redirectTo?: string;
3763
- }): null;
3764
-
3765
- declare function PasskeyButton({ className, classNames, isSubmitting, redirectTo, setIsSubmitting, }: AuthButtonProps): react_jsx_runtime.JSX.Element;
3766
-
3767
- declare function ProviderButton({ className, classNames, isSubmitting, setIsSubmitting, provider, socialLayout, }: AuthButtonProps & {
3768
- provider: Provider;
3769
- socialLayout: "auto" | "horizontal" | "grid" | "vertical";
3770
- }): react_jsx_runtime.JSX.Element;
3771
-
3772
- declare function AuthCallback({ redirectTo }: {
3773
- redirectTo?: string;
3774
- }): react_jsx_runtime.JSX.Element;
3775
-
3776
- declare function EmailOTPForm(props: AuthFormProps): react_jsx_runtime.JSX.Element;
3777
-
3778
- declare function ForgotPasswordForm({ className, classNames, isSubmitting, setIsSubmitting, }: AuthFormProps): react_jsx_runtime.JSX.Element;
3779
-
3780
- declare function MagicLinkForm({ className, classNames, isSubmitting, setIsSubmitting, }: AuthFormProps): react_jsx_runtime.JSX.Element;
3781
-
3782
- declare function RecoverAccountForm({ className, classNames, isSubmitting, redirectTo, setIsSubmitting, }: AuthFormProps): react_jsx_runtime.JSX.Element;
3783
-
3784
- declare function ResetPasswordForm({ className, classNames, isSubmitting, setIsSubmitting, }: AuthFormProps): react_jsx_runtime.JSX.Element;
3785
-
3786
- declare function SignInForm({ className, classNames, isSubmitting, redirectTo: redirectToProp, setIsSubmitting, }: AuthFormProps): react_jsx_runtime.JSX.Element;
3787
-
3788
- declare function SignOut({ redirectTo }: {
3789
- redirectTo?: string;
3790
- }): react_jsx_runtime.JSX.Element;
3791
-
3792
- declare function SignUpForm({ className, classNames, isSubmitting, redirectTo: redirectToProp, setIsSubmitting, }: AuthFormProps): react_jsx_runtime.JSX.Element;
3793
-
3794
- declare function TwoFactorForm({ className, classNames, isSubmitting, otpSeparators, redirectTo: redirectToProp, setIsSubmitting, }: AuthFormProps): react_jsx_runtime.JSX.Element;
3795
-
3796
- declare function AuthView({ className, classNames, cardHeader, enableAcceptInvitation: enableAcceptInvitationProp, otpSeparators, path: pathProp, pathname, redirectTo, socialLayout: socialLayoutProp, view: viewProp, }: AuthViewProps): react_jsx_runtime.JSX.Element;
3797
- declare function AuthForm({ className, classNames, isSubmitting, otpSeparators, pathname, redirectTo, setIsSubmitting, view: viewProp, }: AuthFormProps): react_jsx_runtime.JSX.Element | null;
3798
-
3799
- declare function AuthLayout({ children, logo, disableFooter, signInHint, signInHref, }: {
3800
- children: ReactNode;
3801
- logo?: ReactNode;
3802
- disableFooter?: boolean;
3803
- signInHint?: boolean;
3804
- signInHref?: string;
3805
- }): react_jsx_runtime.JSX.Element;
3806
-
3807
- declare function Header({ children }: {
3808
- children: ReactNode;
3809
- }): react_jsx_runtime.JSX.Element;
3810
- declare function HeaderLeft(): react_jsx_runtime.JSX.Element;
3811
- declare function HeaderRight({ sidebar, button }: {
3812
- sidebar?: ReactNode;
3813
- button?: ReactNode;
3814
- }): react_jsx_runtime.JSX.Element;
3815
- declare function HeaderSidebarMobile({ children }: {
3816
- children: ReactNode;
3817
- }): react_jsx_runtime.JSX.Element;
3818
-
3819
- declare function LayoutLoader({ children }: {
3820
- children: ReactNode;
3821
- }): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
3822
-
3823
- declare function Sidebar({ children }: {
3824
- children: ReactNode;
3825
- }): react_jsx_runtime.JSX.Element | null;
3826
- declare function SidebarHeaderBack({ linkHref, admin, }: {
3827
- linkHref?: string;
3828
- admin?: boolean;
3829
- }): react_jsx_runtime.JSX.Element;
3830
- declare function SidebarHeaderWorkspaces(): react_jsx_runtime.JSX.Element;
3831
- declare function SidebarContent({ children }: {
3832
- children: ReactNode;
3833
- }): react_jsx_runtime.JSX.Element;
3834
- declare function SidebarContentMenu({ menu, type, }: {
3835
- menu: MenuItem[];
3836
- type?: "default" | "toggle";
3837
- }): react_jsx_runtime.JSX.Element;
3838
-
3839
- declare function SiteFooter({ disableProjectBy }: {
3840
- disableProjectBy?: boolean;
3841
- }): react_jsx_runtime.JSX.Element;
3842
-
3843
- declare function SiteHeader({ menu, logo, }: {
3844
- menu: NavItem[];
3845
- logo?: ReactNode;
3846
- }): react_jsx_runtime.JSX.Element;
3847
- declare function SiteHeaderSecondary({ menu, logo, loginLink, }: {
3848
- menu: NavItem[];
3849
- logo?: ReactNode;
3850
- loginLink?: string;
3851
- }): react_jsx_runtime.JSX.Element;
3852
-
3853
- type ToolbarItem = "darkmode" | "help" | "language" | "onboarding";
3854
- type ToolbarProps = {
3855
- className?: string;
3856
- show?: ReadonlyArray<ToolbarItem>;
3857
- };
3858
- declare function Toolbar(props: ToolbarProps): react_jsx_runtime.JSX.Element;
3859
-
3860
- interface LayoutWrapperProps {
3861
- children: ReactNode;
3862
- sidebarHeader: ReactNode;
3863
- sidebarMenu: ReactNode;
3864
- logoHeader?: ReactNode;
3865
- }
3866
- declare function LayoutWrapper({ children, sidebarHeader, sidebarMenu, logoHeader, }: LayoutWrapperProps): react_jsx_runtime.JSX.Element;
3867
-
3868
- interface AcceptInvitationProps {
3869
- className?: string;
3870
- classNames?: CardClassNames;
3871
- redirectTo?: string;
3872
- }
3873
- declare function AcceptInvitation({ className, classNames, redirectTo, }: AcceptInvitationProps): react_jsx_runtime.JSX.Element;
3874
-
3875
- interface NewWorkspaceProps {
3876
- className?: string;
3877
- classNames?: CardClassNames;
3878
- }
3879
- declare function NewWorkspace({ className, classNames }: NewWorkspaceProps): react_jsx_runtime.JSX.Element;
3880
- declare function NewWorkspaceForm({ hasWorkspaces }: {
3881
- hasWorkspaces?: boolean;
3882
- }): react_jsx_runtime.JSX.Element;
3883
-
3884
- interface VerifyEmailProps {
3885
- className?: string;
3886
- classNames?: CardClassNames;
3887
- callbackUrl: string;
3888
- email: string;
3889
- }
3890
- declare function VerifyEmail({ className, classNames, callbackUrl, email }: VerifyEmailProps): react_jsx_runtime.JSX.Element;
3891
-
3892
- interface LayoutProviderProps {
3893
- children: ReactNode;
3894
- style?: CSSProperties;
3895
- bodyClassName?: string;
3896
- className?: string;
3897
- logoHeader?: ReactNode;
3898
- }
3899
- declare function LayoutProvider({ children, style: customStyle, bodyClassName, className, logoHeader, }: LayoutProviderProps): react_jsx_runtime.JSX.Element;
3900
-
3901
- interface SharedProvidersProps {
3902
- children: ReactNode;
3903
- locale: string;
3904
- messages: Record<string, string>;
3905
- timeZone?: string;
3906
- sonnerPosition?: ComponentProps<typeof Toaster>["position"];
3907
- }
3908
- declare function SharedProviders({ children, locale, messages, timeZone, sonnerPosition, }: SharedProvidersProps): react_jsx_runtime.JSX.Element;
3909
-
3910
- type WorkspaceProviderProps = {
3911
- children: ReactNode;
3912
- initialWorkspace: Workspace | null;
3913
- workspaceSlug: string;
3914
- fetchWorkspaceList?: string;
3915
- fetchWorkspaceBySlug?: string;
3916
- };
3917
- declare function WorkspaceProvider({ children, initialWorkspace, workspaceSlug, fetchWorkspaceList: fetchWorkspaceListProp, fetchWorkspaceBySlug: fetchWorkspaceBySlugProp, }: WorkspaceProviderProps): react_jsx_runtime.JSX.Element;
3918
-
3919
- declare function CardComponent({ children, className, classNames, title, description, instructions, actionLabel, action, disabled, isDestructive, isPending, isSubmitting, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3920
- declare function CardHeaderComponent({ className, classNames, title, description, isPending, }: CardComponentProps): react_jsx_runtime.JSX.Element;
3921
- declare function CardFooterComponent({ className, classNames, instructions, actionLabel, action, disabled, isDestructive, isPending, isSubmitting, }: CardComponentProps): react_jsx_runtime.JSX.Element;
3922
- declare function CardActionComponent({ classNames, actionLabel, onClick, disabled, isDestructive, isSubmitting, ...props }: CardComponentProps & ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
3923
-
3924
- declare function DialogComponent({ children, classNames, onOpenChange, title, description, disableFooter, cancelButton, cancelButtonDisabled, button, ...props }: DialogComponentProps): react_jsx_runtime.JSX.Element;
3925
- declare function DialogFooterComponent({ className, classNames, onOpenChange, cancelButton, cancelButtonDisabled, button, }: DialogComponentProps): react_jsx_runtime.JSX.Element;
3926
-
3927
- declare function SkeletonViewComponent({ classNames }: {
3928
- classNames?: CardClassNames;
3929
- }): react_jsx_runtime.JSX.Element;
3930
- declare function SkeletonInputComponent({ classNames }: {
3931
- classNames?: CardClassNames;
3932
- }): react_jsx_runtime.JSX.Element;
3933
-
3934
- declare function getUserName(user: Profile | null | undefined): string | null | undefined;
3935
- declare function UserAvatar({ className, classNames, isPending, size, user, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
3936
- declare function WorkspaceLogo({ className, classNames, isPending, size, workspace, image, ...props }: AvatarProps & {
3937
- image?: string;
3938
- }): react_jsx_runtime.JSX.Element;
3939
-
3940
- declare function DisplayIdCard({ className, classNames, isPending, id, title, description, ...props }: CardComponentProps & {
3941
- id: string | undefined;
3942
- title: string;
3943
- description: string;
3944
- }): react_jsx_runtime.JSX.Element;
3945
-
3946
- type EmptyStateProps = PropsWithChildren<{
3947
- className?: string;
3948
- icon?: LucideIcon;
3949
- title: string;
3950
- description?: ReactNode;
3951
- learnMore?: string;
3952
- learnMoreText?: string;
3953
- }>;
3954
- declare function EmptyState({ className, icon: Icon, title, description, learnMore, learnMoreText, children, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
3955
-
3956
- declare function LanguageSwitcher({ className, type, variant, size, showNames, showFlags, }: Omit<LanguageSwitcherProps, "currentLocale" | "locales" | "onLocaleChange">): react_jsx_runtime.JSX.Element;
3957
-
3958
- declare function OTPInputGroup({ otpSeparators }: {
3959
- otpSeparators?: 0 | 1 | 2;
3960
- }): react_jsx_runtime.JSX.Element;
3961
-
3962
- declare function PasswordInput({ className, variant, enableToggle, onChange, ...props }: ComponentProps<typeof Input> & {
3963
- enableToggle?: boolean;
3964
- }): react_jsx_runtime.JSX.Element;
3965
-
3966
- declare function SignedInHint({ linkHref }: {
3967
- linkHref?: string;
3968
- }): react_jsx_runtime.JSX.Element;
3969
-
3970
- declare function UserMenu({ hiddenSwitcher }: {
3971
- hiddenSwitcher?: boolean;
3972
- }): react_jsx_runtime.JSX.Element;
3973
-
3974
- declare function UserView({ className, classNames, isPending, size, user }: ViewProps): react_jsx_runtime.JSX.Element;
3975
- declare function ApiKeyView({ className, classNames, apiKey }: ViewProps & {
3976
- apiKey: ApiKey;
3977
- }): react_jsx_runtime.JSX.Element;
3978
- declare function WorkspaceView({ className, classNames, isPending, size, workspace }: ViewProps): react_jsx_runtime.JSX.Element;
3979
-
3980
- declare function WorkspaceDeleteCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element | null;
3981
-
3982
- declare function WorkspaceLogoCard({ className, classNames, logo, ...props }: CardComponentProps & {
3983
- logo?: ImageOptions;
3984
- }): react_jsx_runtime.JSX.Element;
3985
-
3986
- declare function WorkspaceNameCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3987
-
3988
- declare function WorkspaceSlugCard({ className, classNames, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
3989
-
3990
- declare function WorkspaceSettingsCards({ className, classNames, logo, }: {
3991
- className?: string;
3992
- classNames?: CardClassNames;
3993
- logo?: ImageOptions;
3994
- }): react_jsx_runtime.JSX.Element;
3995
-
3996
- declare function WorkspaceSwitcher(): react_jsx_runtime.JSX.Element;
3997
-
3998
- export { AcceptInvitation, ApiKeyDeleteDialog, ApiKeyDisplayDialog, ApiKeyView, ApiKeysCard, type AuthButtonProps, AuthCallback, AuthForm, type AuthFormClassNames, type AuthFormProps, AuthLayout, AuthView, type AuthViewClassNames, type AuthViewProps, BackupCodesDialog, CardActionComponent, CardComponent, CardFooterComponent, CardHeaderComponent, ConfigContext, ConfigProvider, type ConfigProviderProps, CreateApiKeyDialog, DeleteAccountCard, DeleteAccountDialog, DialogComponent, DialogFooterComponent, DisplayIdCard, EmailOTPButton, EmailOTPForm, EmptyState, type EmptyStateProps, ForgotPasswordForm, FormAvatarCard, FormEmailCard, FormFieldsCard, FormNameCard, FormPasswordCard, FormUsernameCard, Header, HeaderLeft, HeaderRight, HeaderSidebarMobile, LanguageSwitcher, LastUsedButton, LayoutContext, type LayoutContextType, LayoutLoader, LayoutProvider, type LayoutProviderProps, LayoutWrapper, MagicLinkButton, MagicLinkForm, MultiAccountCard, NewWorkspace, NewWorkspaceForm, OTPInputGroup, OneTap, PasskeyButton, PasskeysCard, PasswordInput, ProviderButton, ProvidersCard, QueryContext, RecoverAccountForm, ResetPasswordForm, SecurityCards, SessionFreshnessDialog, SessionsCard, SettingsCards, SharedProviders, type SharedProvidersProps, Sidebar, SidebarContent, SidebarContentMenu, SidebarHeaderBack, SidebarHeaderWorkspaces, SignInForm, SignOut, SignUpForm, SignedInHint, SiteFooter, SiteHeader, SiteHeaderSecondary, SkeletonInputComponent, SkeletonViewComponent, Toolbar, TwoFactorCard, TwoFactorForm, TwoFactorPasswordDialog, UserAvatar, UserMenu, UserView, VerifyEmail, WorkspaceContext, type WorkspaceContextType, WorkspaceDeleteCard, WorkspaceLogo, WorkspaceLogoCard, WorkspaceNameCard, WorkspaceProvider, WorkspaceSettingsCards, WorkspaceSlugCard, WorkspaceSwitcher, WorkspaceView, getUserName, useAccountInfo, useAuthMutation, useAuthQuery, useConfig, useCreateApiKey, useDeleteApiKey, useDeletePasskey, useInvitation, useLayout, useListAccounts, useListApiKeys, useListDeviceSessions, useListPasskeys, useListSessions, useOnMutateError, useOnSuccessTransition, useRevokeDeviceSession, useRevokeOtherSessions, useRevokeSession, useRevokeSessions, useSession, useSetActiveSession, useUnlinkAccount, useUpdateUser, useWorkspace };
1
+ export * from '@pelatform/starter.account';
2
+ export * from '@pelatform/starter.apikey';
3
+ export * from '@pelatform/starter.auth';
4
+ export * from '@pelatform/starter.hook';
5
+ export * from '@pelatform/starter.shared';
6
+ export * from '@pelatform/starter.workspace';