@astralarium/repo-auth 0.0.0-stage → 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.
Files changed (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +59 -2
  3. package/dist/client.d.ts +2173 -0
  4. package/dist/client.js +203 -0
  5. package/dist/dev-sign-in/client.d.ts +21 -0
  6. package/dist/dev-sign-in/client.js +17 -0
  7. package/dist/dev-sign-in/endpoint.d.ts +2 -0
  8. package/dist/dev-sign-in/endpoint.js +2 -0
  9. package/dist/dev-sign-in/index.d.ts +4 -0
  10. package/dist/dev-sign-in/index.js +4 -0
  11. package/dist/dev-sign-in/provider-user.d.ts +30 -0
  12. package/dist/dev-sign-in/provider-user.js +55 -0
  13. package/dist/dev-sign-in/sign-in.d.ts +62 -0
  14. package/dist/dev-sign-in/sign-in.js +116 -0
  15. package/dist/index.server.d.ts +645 -0
  16. package/dist/index.server.js +307 -0
  17. package/dist/providers/google.d.ts +8 -0
  18. package/dist/providers/google.js +11 -0
  19. package/dist/providers/index.d.ts +3 -0
  20. package/dist/providers/index.js +3 -0
  21. package/dist/providers/provider.d.ts +135 -0
  22. package/dist/providers/provider.js +86 -0
  23. package/dist/request.d.ts +42 -0
  24. package/dist/request.js +75 -0
  25. package/dist/schema.d.ts +6 -0
  26. package/dist/schema.js +23 -0
  27. package/dist/start/index.d.ts +6 -0
  28. package/dist/start/index.js +6 -0
  29. package/dist/start/index.server.d.ts +28 -0
  30. package/dist/start/index.server.js +29 -0
  31. package/dist/start/middleware.d.ts +33 -0
  32. package/dist/start/middleware.js +70 -0
  33. package/dist/start/return-path.d.ts +16 -0
  34. package/dist/start/return-path.js +32 -0
  35. package/dist/start/viewer.d.ts +8 -0
  36. package/dist/start/viewer.js +15 -0
  37. package/dist/testkit/index.d.ts +131 -0
  38. package/dist/testkit/index.js +238 -0
  39. package/dist/testkit/json-post.d.ts +8 -0
  40. package/dist/testkit/json-post.js +12 -0
  41. package/dist/testkit/oidc.d.ts +35 -0
  42. package/dist/testkit/oidc.js +154 -0
  43. package/dist/testkit/suites.d.ts +126 -0
  44. package/dist/testkit/suites.js +255 -0
  45. package/dist/types.d.ts +7 -0
  46. package/dist/types.js +1 -0
  47. package/package.json +86 -3
  48. package/sql/jobs/schema.sql +19 -0
  49. package/sql/schema.sql +97 -0
  50. package/sql/scrub.sql +6 -0
@@ -0,0 +1,2173 @@
1
+ import type { BetterAuthOptions } from "better-auth";
2
+ import type { SessionLike } from "./types.ts";
3
+ /** Opens `url`, a page starting a provider's OAuth redirect, in a popup
4
+ * centered over this window. */
5
+ export declare function openAuthPopup(url: string): void;
6
+ /** Ends an OAuth popup on its landing page: the other tabs, opener
7
+ * included, refresh their session; the popup closes. */
8
+ export declare function finishAuthPopup(): void;
9
+ /** Search params of Better Auth's error redirect (`errorURL`). */
10
+ export interface AuthErrorSearch {
11
+ /** Error code. */
12
+ error?: string;
13
+ /** Human-readable error detail. */
14
+ error_description?: string;
15
+ }
16
+ /** The error redirect's params in `search`; non-string values drop. */
17
+ export declare function parseAuthErrorSearch(search: Record<string, unknown>): AuthErrorSearch;
18
+ /** The server auth instance a client infers its session from. */
19
+ interface ShellAuthLike {
20
+ options: BetterAuthOptions;
21
+ $Infer: {
22
+ Session: SessionLike;
23
+ };
24
+ }
25
+ /** Better Auth session atom, readable outside React; `T` is the snapshot
26
+ * shape (`useSession`'s return for the client). */
27
+ interface SessionStore<T> {
28
+ get: () => T;
29
+ listen: (listener: () => void) => () => void;
30
+ }
31
+ /** What `watchViewerRouter` reads of a router: TanStack Router's load
32
+ * event, its matched routes, and invalidation. */
33
+ export interface ViewerRouter {
34
+ subscribe(event: "onLoad", fn: () => void): () => void;
35
+ state: {
36
+ matches: readonly {
37
+ routeId: string;
38
+ context: unknown;
39
+ }[];
40
+ };
41
+ invalidate(): Promise<unknown>;
42
+ }
43
+ /** What `watchViewerRouter` reads of a TanStack Query query. */
44
+ interface ViewerQuery {
45
+ state: {
46
+ status: string;
47
+ fetchStatus: string;
48
+ };
49
+ reset(): void;
50
+ }
51
+ /** What `watchViewerRouter` reads of a TanStack Query client: its cached
52
+ * queries and refetch of the active ones. */
53
+ export interface ViewerQueryClient {
54
+ getQueryCache(): {
55
+ getAll(): readonly ViewerQuery[];
56
+ };
57
+ refetchQueries(filters: {
58
+ type: "active";
59
+ predicate: (query: ViewerQuery) => boolean;
60
+ }): Promise<unknown>;
61
+ }
62
+ /** Context of the layout route carrying the viewer's session
63
+ * (`viewerRouteContext`). */
64
+ export interface ViewerContext<Session> {
65
+ /** `null` signed out; `undefined` on a page reached by client
66
+ * navigation. */
67
+ session: Session | null | undefined;
68
+ }
69
+ /** Shared live session store and auth operations for `Auth`. */
70
+ export declare function createShellAuthClient<Auth extends ShellAuthLike>(): {
71
+ authClient: import("better-auth/react").ReactAuthClient<{
72
+ plugins: ({
73
+ id: "session-broadcast";
74
+ fetchPlugins: {
75
+ id: string;
76
+ name: string;
77
+ hooks: {
78
+ onSuccess({ data }: import("better-auth/client").SuccessContext<any>): void;
79
+ };
80
+ }[];
81
+ } | {
82
+ id: "infer-server-plugin";
83
+ version: string;
84
+ $InferServerPlugin: (Auth extends {
85
+ options: infer O;
86
+ } ? O : Auth)["plugins"] extends (infer P)[] ? P extends {
87
+ id: "session-projection";
88
+ } ? P : never : never;
89
+ })[];
90
+ sessionOptions: {
91
+ refetchOnWindowFocus: true;
92
+ refetchWhenOffline: false;
93
+ };
94
+ }>;
95
+ sessionStore: SessionStore<Omit<{
96
+ data: import("better-auth").UnionToIntersection<import("better-auth/client").InferRoute<Omit<import("better-auth").InferAPI<import("better-auth").Prettify<{
97
+ readonly ok: import("better-auth").StrictEndpoint<"/ok", {
98
+ method: "GET";
99
+ metadata: {
100
+ openapi: {
101
+ description: string;
102
+ responses: {
103
+ "200": {
104
+ description: string;
105
+ content: {
106
+ "application/json": {
107
+ schema: {
108
+ type: "object";
109
+ properties: {
110
+ ok: {
111
+ type: string;
112
+ description: string;
113
+ };
114
+ };
115
+ required: string[];
116
+ };
117
+ };
118
+ };
119
+ };
120
+ };
121
+ };
122
+ scope: "server";
123
+ };
124
+ }, {
125
+ ok: boolean;
126
+ }>;
127
+ readonly error: import("better-auth").StrictEndpoint<"/error", {
128
+ method: "GET";
129
+ metadata: {
130
+ openapi: {
131
+ description: string;
132
+ responses: {
133
+ "200": {
134
+ description: string;
135
+ content: {
136
+ "text/html": {
137
+ schema: {
138
+ type: "string";
139
+ description: string;
140
+ };
141
+ };
142
+ };
143
+ };
144
+ };
145
+ };
146
+ scope: "server";
147
+ };
148
+ }, Response>;
149
+ readonly signInSocial: import("better-auth").StrictEndpoint<"/sign-in/social", {
150
+ method: "POST";
151
+ operationId: string;
152
+ body: import("better-auth").ZodObject<{
153
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
154
+ newUserCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
155
+ errorCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
156
+ provider: import("better-auth").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
157
+ disableRedirect: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
158
+ idToken: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
159
+ token: import("better-auth").ZodString;
160
+ nonce: import("better-auth").ZodOptional<import("better-auth").ZodString>;
161
+ accessToken: import("better-auth").ZodOptional<import("better-auth").ZodString>;
162
+ refreshToken: import("better-auth").ZodOptional<import("better-auth").ZodString>;
163
+ expiresAt: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
164
+ user: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
165
+ name: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
166
+ firstName: import("better-auth").ZodOptional<import("better-auth").ZodString>;
167
+ lastName: import("better-auth").ZodOptional<import("better-auth").ZodString>;
168
+ }, import("zod/v4/core").$strip>>;
169
+ email: import("better-auth").ZodOptional<import("better-auth").ZodString>;
170
+ }, import("zod/v4/core").$strip>>;
171
+ }, import("zod/v4/core").$strip>>;
172
+ scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
173
+ requestSignUp: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
174
+ loginHint: import("better-auth").ZodOptional<import("better-auth").ZodString>;
175
+ additionalParams: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodString>>;
176
+ additionalData: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
177
+ }, import("zod/v4/core").$strip>;
178
+ metadata: {
179
+ $Infer: {
180
+ body: {
181
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
182
+ callbackURL?: string | undefined;
183
+ newUserCallbackURL?: string | undefined;
184
+ errorCallbackURL?: string | undefined;
185
+ disableRedirect?: boolean | undefined;
186
+ idToken?: {
187
+ token: string;
188
+ nonce?: string | undefined;
189
+ accessToken?: string | undefined;
190
+ refreshToken?: string | undefined;
191
+ expiresAt?: number | undefined;
192
+ user?: {
193
+ name?: {
194
+ firstName?: string | undefined;
195
+ lastName?: string | undefined;
196
+ } | undefined;
197
+ email?: string | undefined;
198
+ } | undefined;
199
+ } | undefined;
200
+ scopes?: string[] | undefined;
201
+ requestSignUp?: boolean | undefined;
202
+ loginHint?: string | undefined;
203
+ additionalParams?: Record<string, string> | undefined;
204
+ additionalData?: Record<string, any> | undefined;
205
+ };
206
+ returned: {
207
+ redirect: boolean;
208
+ token?: string | undefined;
209
+ url?: string | undefined;
210
+ user?: {
211
+ id: string;
212
+ createdAt: Date;
213
+ updatedAt: Date;
214
+ email: string;
215
+ emailVerified: boolean;
216
+ name: string;
217
+ image?: string | null | undefined | undefined;
218
+ } | undefined;
219
+ };
220
+ };
221
+ openapi: {
222
+ description: string;
223
+ operationId: string;
224
+ responses: {
225
+ "200": {
226
+ description: string;
227
+ content: {
228
+ "application/json": {
229
+ schema: {
230
+ type: "object";
231
+ description: string;
232
+ properties: {
233
+ token: {
234
+ type: string;
235
+ };
236
+ user: {
237
+ type: string;
238
+ $ref: string;
239
+ };
240
+ url: {
241
+ type: string;
242
+ };
243
+ redirect: {
244
+ type: string;
245
+ };
246
+ };
247
+ required: string[];
248
+ };
249
+ };
250
+ };
251
+ };
252
+ };
253
+ };
254
+ };
255
+ }, {
256
+ redirect: boolean;
257
+ url: string;
258
+ } | {
259
+ redirect: boolean;
260
+ token: string;
261
+ url: undefined;
262
+ user: {
263
+ id: string;
264
+ createdAt: Date;
265
+ updatedAt: Date;
266
+ email: string;
267
+ emailVerified: boolean;
268
+ name: string;
269
+ image?: string | null | undefined | undefined;
270
+ };
271
+ }>;
272
+ readonly callbackOAuth: import("better-auth").StrictEndpoint<"/callback/:id", {
273
+ method: ("GET" | "POST")[];
274
+ operationId: string;
275
+ body: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
276
+ code: import("better-auth").ZodOptional<import("better-auth").ZodString>;
277
+ error: import("better-auth").ZodOptional<import("better-auth").ZodString>;
278
+ device_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
279
+ error_description: import("better-auth").ZodOptional<import("better-auth").ZodString>;
280
+ state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
281
+ user: import("better-auth").ZodOptional<import("better-auth").ZodString>;
282
+ iss: import("better-auth").ZodOptional<import("better-auth").ZodString>;
283
+ }, import("zod/v4/core").$strip>>;
284
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
285
+ code: import("better-auth").ZodOptional<import("better-auth").ZodString>;
286
+ error: import("better-auth").ZodOptional<import("better-auth").ZodString>;
287
+ device_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
288
+ error_description: import("better-auth").ZodOptional<import("better-auth").ZodString>;
289
+ state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
290
+ user: import("better-auth").ZodOptional<import("better-auth").ZodString>;
291
+ iss: import("better-auth").ZodOptional<import("better-auth").ZodString>;
292
+ }, import("zod/v4/core").$strip>>;
293
+ metadata: {
294
+ allowedMediaTypes: string[];
295
+ scope: "server";
296
+ };
297
+ }, void>;
298
+ readonly getSession: import("better-auth").StrictEndpoint<"/get-session", {
299
+ method: ("GET" | "POST")[];
300
+ operationId: string;
301
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
302
+ disableCookieCache: import("better-auth").ZodOptional<import("better-auth").ZodCoercedBoolean<unknown>>;
303
+ disableRefresh: import("better-auth").ZodOptional<import("better-auth").ZodCoercedBoolean<unknown>>;
304
+ }, import("zod/v4/core").$strip>>;
305
+ requireHeaders: true;
306
+ metadata: {
307
+ openapi: {
308
+ operationId: string;
309
+ description: string;
310
+ responses: {
311
+ "200": {
312
+ description: string;
313
+ content: {
314
+ "application/json": {
315
+ schema: {
316
+ type: "object";
317
+ properties: {
318
+ session: {
319
+ $ref: string;
320
+ };
321
+ user: {
322
+ $ref: string;
323
+ };
324
+ };
325
+ required: string[];
326
+ };
327
+ };
328
+ };
329
+ };
330
+ };
331
+ };
332
+ };
333
+ }, {
334
+ session: {
335
+ id: string;
336
+ createdAt: Date;
337
+ updatedAt: Date;
338
+ userId: string;
339
+ expiresAt: Date;
340
+ token: string;
341
+ ipAddress?: string | null | undefined | undefined;
342
+ userAgent?: string | null | undefined | undefined;
343
+ };
344
+ user: {
345
+ id: string;
346
+ createdAt: Date;
347
+ updatedAt: Date;
348
+ email: string;
349
+ emailVerified: boolean;
350
+ name: string;
351
+ image?: string | null | undefined | undefined;
352
+ };
353
+ } | null>;
354
+ readonly signOut: import("better-auth").StrictEndpoint<"/sign-out", {
355
+ method: "POST";
356
+ body: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
357
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
358
+ disableRedirect: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
359
+ state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
360
+ }, import("zod/v4/core").$strip>>;
361
+ operationId: string;
362
+ requireHeaders: true;
363
+ metadata: {
364
+ openapi: {
365
+ operationId: string;
366
+ description: string;
367
+ responses: {
368
+ "200": {
369
+ description: string;
370
+ content: {
371
+ "application/json": {
372
+ schema: {
373
+ type: "object";
374
+ properties: {
375
+ success: {
376
+ type: string;
377
+ };
378
+ url: {
379
+ type: string;
380
+ description: string;
381
+ };
382
+ redirect: {
383
+ type: string;
384
+ description: string;
385
+ };
386
+ };
387
+ };
388
+ };
389
+ };
390
+ };
391
+ };
392
+ };
393
+ };
394
+ }, {
395
+ success: boolean;
396
+ url: string | undefined;
397
+ redirect: boolean | undefined;
398
+ }>;
399
+ readonly signUpEmail: import("better-auth").StrictEndpoint<"/sign-up/email", {
400
+ method: "POST";
401
+ operationId: string;
402
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>[];
403
+ body: import("better-auth").ZodIntersection<import("better-auth").ZodObject<{
404
+ name: import("better-auth").ZodString;
405
+ email: import("better-auth").ZodEmail;
406
+ password: import("better-auth").ZodString;
407
+ image: import("better-auth").ZodOptional<import("better-auth").ZodString>;
408
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
409
+ rememberMe: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
410
+ }, import("zod/v4/core").$strip>, import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
411
+ cloneRequest: true;
412
+ metadata: {
413
+ allowedMediaTypes: string[];
414
+ $Infer: {
415
+ body: {
416
+ name: string;
417
+ email: string;
418
+ password: string;
419
+ image?: string | undefined;
420
+ callbackURL?: string | undefined;
421
+ rememberMe?: boolean | undefined;
422
+ };
423
+ returned: {
424
+ token: string | null;
425
+ user: {
426
+ id: string;
427
+ createdAt: Date;
428
+ updatedAt: Date;
429
+ email: string;
430
+ emailVerified: boolean;
431
+ name: string;
432
+ image?: string | null | undefined | undefined;
433
+ };
434
+ };
435
+ };
436
+ openapi: {
437
+ operationId: string;
438
+ description: string;
439
+ requestBody: {
440
+ content: {
441
+ "application/json": {
442
+ schema: {
443
+ type: "object";
444
+ properties: {
445
+ name: {
446
+ type: string;
447
+ description: string;
448
+ };
449
+ email: {
450
+ type: string;
451
+ description: string;
452
+ };
453
+ password: {
454
+ type: string;
455
+ description: string;
456
+ };
457
+ image: {
458
+ type: string;
459
+ description: string;
460
+ };
461
+ callbackURL: {
462
+ type: string;
463
+ description: string;
464
+ };
465
+ rememberMe: {
466
+ type: string;
467
+ description: string;
468
+ };
469
+ };
470
+ required: string[];
471
+ };
472
+ };
473
+ };
474
+ };
475
+ responses: {
476
+ "200": {
477
+ description: string;
478
+ content: {
479
+ "application/json": {
480
+ schema: {
481
+ type: "object";
482
+ properties: {
483
+ token: {
484
+ type: string;
485
+ nullable: boolean;
486
+ description: string;
487
+ };
488
+ user: {
489
+ type: string;
490
+ properties: {
491
+ id: {
492
+ type: string;
493
+ description: string;
494
+ };
495
+ email: {
496
+ type: string;
497
+ format: string;
498
+ description: string;
499
+ };
500
+ name: {
501
+ type: string;
502
+ description: string;
503
+ };
504
+ image: {
505
+ type: string;
506
+ format: string;
507
+ nullable: boolean;
508
+ description: string;
509
+ };
510
+ emailVerified: {
511
+ type: string;
512
+ description: string;
513
+ };
514
+ createdAt: {
515
+ type: string;
516
+ format: string;
517
+ description: string;
518
+ };
519
+ updatedAt: {
520
+ type: string;
521
+ format: string;
522
+ description: string;
523
+ };
524
+ };
525
+ required: string[];
526
+ };
527
+ };
528
+ required: string[];
529
+ };
530
+ };
531
+ };
532
+ };
533
+ "422": {
534
+ description: string;
535
+ content: {
536
+ "application/json": {
537
+ schema: {
538
+ type: "object";
539
+ properties: {
540
+ message: {
541
+ type: string;
542
+ };
543
+ };
544
+ };
545
+ };
546
+ };
547
+ };
548
+ };
549
+ };
550
+ };
551
+ }, {
552
+ token: null;
553
+ user: {
554
+ id: string;
555
+ createdAt: Date;
556
+ updatedAt: Date;
557
+ email: string;
558
+ emailVerified: boolean;
559
+ name: string;
560
+ image?: string | null | undefined | undefined;
561
+ };
562
+ } | {
563
+ token: string;
564
+ user: {
565
+ id: string;
566
+ createdAt: Date;
567
+ updatedAt: Date;
568
+ email: string;
569
+ emailVerified: boolean;
570
+ name: string;
571
+ image?: string | null | undefined | undefined;
572
+ };
573
+ }>;
574
+ readonly signInEmail: import("better-auth").StrictEndpoint<"/sign-in/email", {
575
+ method: "POST";
576
+ operationId: string;
577
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>[];
578
+ cloneRequest: true;
579
+ body: import("better-auth").ZodObject<{
580
+ email: import("better-auth").ZodString;
581
+ password: import("better-auth").ZodString;
582
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
583
+ rememberMe: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodBoolean>>;
584
+ }, import("zod/v4/core").$strip>;
585
+ metadata: {
586
+ allowedMediaTypes: string[];
587
+ $Infer: {
588
+ body: {
589
+ email: string;
590
+ password: string;
591
+ callbackURL?: string | undefined;
592
+ rememberMe?: boolean | undefined;
593
+ };
594
+ returned: {
595
+ redirect: boolean;
596
+ token: string;
597
+ url?: string | undefined;
598
+ user: {
599
+ id: string;
600
+ createdAt: Date;
601
+ updatedAt: Date;
602
+ email: string;
603
+ emailVerified: boolean;
604
+ name: string;
605
+ image?: string | null | undefined | undefined;
606
+ };
607
+ };
608
+ };
609
+ openapi: {
610
+ operationId: string;
611
+ description: string;
612
+ responses: {
613
+ "200": {
614
+ description: string;
615
+ content: {
616
+ "application/json": {
617
+ schema: {
618
+ type: "object";
619
+ description: string;
620
+ properties: {
621
+ redirect: {
622
+ type: string;
623
+ enum: boolean[];
624
+ };
625
+ token: {
626
+ type: string;
627
+ description: string;
628
+ };
629
+ url: {
630
+ type: string;
631
+ nullable: boolean;
632
+ };
633
+ user: {
634
+ type: string;
635
+ $ref: string;
636
+ };
637
+ };
638
+ required: string[];
639
+ };
640
+ };
641
+ };
642
+ };
643
+ };
644
+ };
645
+ };
646
+ }, {
647
+ redirect: boolean;
648
+ token: string;
649
+ url?: string | undefined;
650
+ user: {
651
+ id: string;
652
+ createdAt: Date;
653
+ updatedAt: Date;
654
+ email: string;
655
+ emailVerified: boolean;
656
+ name: string;
657
+ image?: string | null | undefined | undefined;
658
+ };
659
+ }>;
660
+ readonly resetPassword: import("better-auth").StrictEndpoint<"/reset-password", {
661
+ method: "POST";
662
+ operationId: string;
663
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
664
+ token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
665
+ }, import("zod/v4/core").$strip>>;
666
+ body: import("better-auth").ZodObject<{
667
+ newPassword: import("better-auth").ZodString;
668
+ token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
669
+ }, import("zod/v4/core").$strip>;
670
+ metadata: {
671
+ openapi: {
672
+ operationId: string;
673
+ description: string;
674
+ responses: {
675
+ "200": {
676
+ description: string;
677
+ content: {
678
+ "application/json": {
679
+ schema: {
680
+ type: "object";
681
+ properties: {
682
+ status: {
683
+ type: string;
684
+ };
685
+ };
686
+ };
687
+ };
688
+ };
689
+ };
690
+ };
691
+ };
692
+ };
693
+ }, {
694
+ status: boolean;
695
+ }>;
696
+ readonly verifyPassword: import("better-auth").StrictEndpoint<"/verify-password", {
697
+ method: "POST";
698
+ body: import("better-auth").ZodObject<{
699
+ password: import("better-auth").ZodString;
700
+ }, import("zod/v4/core").$strip>;
701
+ metadata: {
702
+ scope: "server";
703
+ openapi: {
704
+ operationId: string;
705
+ description: string;
706
+ responses: {
707
+ "200": {
708
+ description: string;
709
+ content: {
710
+ "application/json": {
711
+ schema: {
712
+ type: "object";
713
+ properties: {
714
+ status: {
715
+ type: string;
716
+ };
717
+ };
718
+ };
719
+ };
720
+ };
721
+ };
722
+ };
723
+ };
724
+ };
725
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
726
+ session: {
727
+ session: Record<string, any> & {
728
+ id: string;
729
+ createdAt: Date;
730
+ updatedAt: Date;
731
+ userId: string;
732
+ expiresAt: Date;
733
+ token: string;
734
+ ipAddress?: string | null | undefined;
735
+ userAgent?: string | null | undefined;
736
+ };
737
+ user: Record<string, any> & {
738
+ id: string;
739
+ createdAt: Date;
740
+ updatedAt: Date;
741
+ email: string;
742
+ emailVerified: boolean;
743
+ name: string;
744
+ image?: string | null | undefined;
745
+ };
746
+ };
747
+ }>>[];
748
+ }, {
749
+ status: boolean;
750
+ }>;
751
+ readonly verifyEmail: import("better-auth").StrictEndpoint<"/verify-email", {
752
+ method: "GET";
753
+ operationId: string;
754
+ query: import("better-auth").ZodObject<{
755
+ token: import("better-auth").ZodString;
756
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
757
+ }, import("zod/v4/core").$strip>;
758
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>[];
759
+ metadata: {
760
+ openapi: {
761
+ description: string;
762
+ parameters: ({
763
+ name: string;
764
+ in: "query";
765
+ description: string;
766
+ required: true;
767
+ schema: {
768
+ type: "string";
769
+ };
770
+ } | {
771
+ name: string;
772
+ in: "query";
773
+ description: string;
774
+ required: false;
775
+ schema: {
776
+ type: "string";
777
+ };
778
+ })[];
779
+ responses: {
780
+ "200": {
781
+ description: string;
782
+ content: {
783
+ "application/json": {
784
+ schema: {
785
+ type: "object";
786
+ properties: {
787
+ user: {
788
+ type: string;
789
+ $ref: string;
790
+ };
791
+ status: {
792
+ type: string;
793
+ description: string;
794
+ };
795
+ };
796
+ required: string[];
797
+ };
798
+ };
799
+ };
800
+ };
801
+ };
802
+ };
803
+ };
804
+ }, void | {
805
+ status: boolean;
806
+ }>;
807
+ readonly sendVerificationEmail: import("better-auth").StrictEndpoint<"/send-verification-email", {
808
+ method: "POST";
809
+ operationId: string;
810
+ cloneRequest: true;
811
+ body: import("better-auth").ZodObject<{
812
+ email: import("better-auth").ZodEmail;
813
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
814
+ }, import("zod/v4/core").$strip>;
815
+ metadata: {
816
+ openapi: {
817
+ operationId: string;
818
+ description: string;
819
+ requestBody: {
820
+ content: {
821
+ "application/json": {
822
+ schema: {
823
+ type: "object";
824
+ properties: {
825
+ email: {
826
+ type: string;
827
+ description: string;
828
+ example: string;
829
+ };
830
+ callbackURL: {
831
+ type: string;
832
+ description: string;
833
+ example: string;
834
+ nullable: boolean;
835
+ };
836
+ };
837
+ required: string[];
838
+ };
839
+ };
840
+ };
841
+ };
842
+ responses: {
843
+ "200": {
844
+ description: string;
845
+ content: {
846
+ "application/json": {
847
+ schema: {
848
+ type: "object";
849
+ properties: {
850
+ status: {
851
+ type: string;
852
+ description: string;
853
+ example: boolean;
854
+ };
855
+ };
856
+ };
857
+ };
858
+ };
859
+ };
860
+ "400": {
861
+ description: string;
862
+ content: {
863
+ "application/json": {
864
+ schema: {
865
+ type: "object";
866
+ properties: {
867
+ message: {
868
+ type: string;
869
+ description: string;
870
+ example: string;
871
+ };
872
+ };
873
+ };
874
+ };
875
+ };
876
+ };
877
+ };
878
+ };
879
+ };
880
+ }, {
881
+ status: boolean;
882
+ }>;
883
+ readonly changeEmail: import("better-auth").StrictEndpoint<"/change-email", {
884
+ method: "POST";
885
+ body: import("better-auth").ZodObject<{
886
+ newEmail: import("better-auth").ZodEmail;
887
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
888
+ }, import("zod/v4/core").$strip>;
889
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
890
+ session: {
891
+ session: Record<string, any> & {
892
+ id: string;
893
+ createdAt: Date;
894
+ updatedAt: Date;
895
+ userId: string;
896
+ expiresAt: Date;
897
+ token: string;
898
+ ipAddress?: string | null | undefined;
899
+ userAgent?: string | null | undefined;
900
+ };
901
+ user: Record<string, any> & {
902
+ id: string;
903
+ createdAt: Date;
904
+ updatedAt: Date;
905
+ email: string;
906
+ emailVerified: boolean;
907
+ name: string;
908
+ image?: string | null | undefined;
909
+ };
910
+ };
911
+ }>>[];
912
+ metadata: {
913
+ openapi: {
914
+ operationId: string;
915
+ responses: {
916
+ "200": {
917
+ description: string;
918
+ content: {
919
+ "application/json": {
920
+ schema: {
921
+ type: "object";
922
+ properties: {
923
+ user: {
924
+ type: string;
925
+ $ref: string;
926
+ };
927
+ status: {
928
+ type: string;
929
+ description: string;
930
+ };
931
+ message: {
932
+ type: string;
933
+ enum: string[];
934
+ description: string;
935
+ nullable: boolean;
936
+ };
937
+ };
938
+ required: string[];
939
+ };
940
+ };
941
+ };
942
+ };
943
+ };
944
+ };
945
+ };
946
+ }, {
947
+ status: boolean;
948
+ }>;
949
+ readonly changePassword: import("better-auth").StrictEndpoint<"/change-password", {
950
+ method: "POST";
951
+ operationId: string;
952
+ body: import("better-auth").ZodObject<{
953
+ newPassword: import("better-auth").ZodString;
954
+ currentPassword: import("better-auth").ZodString;
955
+ revokeOtherSessions: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
956
+ }, import("zod/v4/core").$strip>;
957
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
958
+ session: {
959
+ session: Record<string, any> & {
960
+ id: string;
961
+ createdAt: Date;
962
+ updatedAt: Date;
963
+ userId: string;
964
+ expiresAt: Date;
965
+ token: string;
966
+ ipAddress?: string | null | undefined;
967
+ userAgent?: string | null | undefined;
968
+ };
969
+ user: Record<string, any> & {
970
+ id: string;
971
+ createdAt: Date;
972
+ updatedAt: Date;
973
+ email: string;
974
+ emailVerified: boolean;
975
+ name: string;
976
+ image?: string | null | undefined;
977
+ };
978
+ };
979
+ }>>[];
980
+ metadata: {
981
+ openapi: {
982
+ operationId: string;
983
+ description: string;
984
+ responses: {
985
+ "200": {
986
+ description: string;
987
+ content: {
988
+ "application/json": {
989
+ schema: {
990
+ type: "object";
991
+ properties: {
992
+ token: {
993
+ type: string;
994
+ nullable: boolean;
995
+ description: string;
996
+ };
997
+ user: {
998
+ type: string;
999
+ properties: {
1000
+ id: {
1001
+ type: string;
1002
+ description: string;
1003
+ };
1004
+ email: {
1005
+ type: string;
1006
+ format: string;
1007
+ description: string;
1008
+ };
1009
+ name: {
1010
+ type: string;
1011
+ description: string;
1012
+ };
1013
+ image: {
1014
+ type: string;
1015
+ format: string;
1016
+ nullable: boolean;
1017
+ description: string;
1018
+ };
1019
+ emailVerified: {
1020
+ type: string;
1021
+ description: string;
1022
+ };
1023
+ createdAt: {
1024
+ type: string;
1025
+ format: string;
1026
+ description: string;
1027
+ };
1028
+ updatedAt: {
1029
+ type: string;
1030
+ format: string;
1031
+ description: string;
1032
+ };
1033
+ };
1034
+ required: string[];
1035
+ };
1036
+ };
1037
+ required: string[];
1038
+ };
1039
+ };
1040
+ };
1041
+ };
1042
+ };
1043
+ };
1044
+ };
1045
+ }, {
1046
+ token: string | null;
1047
+ user: {
1048
+ id: string;
1049
+ createdAt: Date;
1050
+ updatedAt: Date;
1051
+ email: string;
1052
+ emailVerified: boolean;
1053
+ name: string;
1054
+ image?: string | null | undefined;
1055
+ } & Record<string, any> & {
1056
+ id: string;
1057
+ createdAt: Date;
1058
+ updatedAt: Date;
1059
+ email: string;
1060
+ emailVerified: boolean;
1061
+ name: string;
1062
+ image?: string | null | undefined;
1063
+ };
1064
+ }>;
1065
+ readonly setPassword: import("better-auth").StrictEndpoint<string, {
1066
+ method: "POST";
1067
+ body: import("better-auth").ZodObject<{
1068
+ newPassword: import("better-auth").ZodString;
1069
+ }, import("zod/v4/core").$strip>;
1070
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1071
+ session: {
1072
+ session: Record<string, any> & {
1073
+ id: string;
1074
+ createdAt: Date;
1075
+ updatedAt: Date;
1076
+ userId: string;
1077
+ expiresAt: Date;
1078
+ token: string;
1079
+ ipAddress?: string | null | undefined;
1080
+ userAgent?: string | null | undefined;
1081
+ };
1082
+ user: Record<string, any> & {
1083
+ id: string;
1084
+ createdAt: Date;
1085
+ updatedAt: Date;
1086
+ email: string;
1087
+ emailVerified: boolean;
1088
+ name: string;
1089
+ image?: string | null | undefined;
1090
+ };
1091
+ };
1092
+ }>>[];
1093
+ }, {
1094
+ status: boolean;
1095
+ }>;
1096
+ readonly updateSession: import("better-auth").StrictEndpoint<"/update-session", {
1097
+ method: "POST";
1098
+ operationId: string;
1099
+ body: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>;
1100
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1101
+ session: {
1102
+ session: Record<string, any> & {
1103
+ id: string;
1104
+ createdAt: Date;
1105
+ updatedAt: Date;
1106
+ userId: string;
1107
+ expiresAt: Date;
1108
+ token: string;
1109
+ ipAddress?: string | null | undefined;
1110
+ userAgent?: string | null | undefined;
1111
+ };
1112
+ user: Record<string, any> & {
1113
+ id: string;
1114
+ createdAt: Date;
1115
+ updatedAt: Date;
1116
+ email: string;
1117
+ emailVerified: boolean;
1118
+ name: string;
1119
+ image?: string | null | undefined;
1120
+ };
1121
+ };
1122
+ }>>[];
1123
+ metadata: {
1124
+ $Infer: {
1125
+ body: Partial<{}>;
1126
+ };
1127
+ openapi: {
1128
+ operationId: string;
1129
+ description: string;
1130
+ responses: {
1131
+ "200": {
1132
+ description: string;
1133
+ content: {
1134
+ "application/json": {
1135
+ schema: {
1136
+ type: "object";
1137
+ properties: {
1138
+ session: {
1139
+ type: string;
1140
+ $ref: string;
1141
+ };
1142
+ };
1143
+ };
1144
+ };
1145
+ };
1146
+ };
1147
+ };
1148
+ };
1149
+ };
1150
+ }, {
1151
+ session: {
1152
+ id: string;
1153
+ createdAt: Date;
1154
+ updatedAt: Date;
1155
+ userId: string;
1156
+ expiresAt: Date;
1157
+ token: string;
1158
+ ipAddress?: string | null | undefined;
1159
+ userAgent?: string | null | undefined;
1160
+ };
1161
+ }>;
1162
+ readonly updateUser: import("better-auth").StrictEndpoint<"/update-user", {
1163
+ method: "POST";
1164
+ operationId: string;
1165
+ body: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>;
1166
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1167
+ session: {
1168
+ session: Record<string, any> & {
1169
+ id: string;
1170
+ createdAt: Date;
1171
+ updatedAt: Date;
1172
+ userId: string;
1173
+ expiresAt: Date;
1174
+ token: string;
1175
+ ipAddress?: string | null | undefined;
1176
+ userAgent?: string | null | undefined;
1177
+ };
1178
+ user: Record<string, any> & {
1179
+ id: string;
1180
+ createdAt: Date;
1181
+ updatedAt: Date;
1182
+ email: string;
1183
+ emailVerified: boolean;
1184
+ name: string;
1185
+ image?: string | null | undefined;
1186
+ };
1187
+ };
1188
+ }>>[];
1189
+ metadata: {
1190
+ $Infer: {
1191
+ body: Partial<{}> & {
1192
+ name?: string | undefined;
1193
+ image?: string | undefined | null;
1194
+ };
1195
+ };
1196
+ openapi: {
1197
+ operationId: string;
1198
+ description: string;
1199
+ requestBody: {
1200
+ content: {
1201
+ "application/json": {
1202
+ schema: {
1203
+ type: "object";
1204
+ properties: {
1205
+ name: {
1206
+ type: string;
1207
+ description: string;
1208
+ };
1209
+ image: {
1210
+ type: string;
1211
+ description: string;
1212
+ nullable: boolean;
1213
+ };
1214
+ };
1215
+ };
1216
+ };
1217
+ };
1218
+ };
1219
+ responses: {
1220
+ "200": {
1221
+ description: string;
1222
+ content: {
1223
+ "application/json": {
1224
+ schema: {
1225
+ type: "object";
1226
+ properties: {
1227
+ user: {
1228
+ type: string;
1229
+ $ref: string;
1230
+ };
1231
+ };
1232
+ };
1233
+ };
1234
+ };
1235
+ };
1236
+ };
1237
+ };
1238
+ };
1239
+ }, {
1240
+ status: boolean;
1241
+ }>;
1242
+ readonly deleteUser: import("better-auth").StrictEndpoint<"/delete-user", {
1243
+ method: "POST";
1244
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1245
+ session: {
1246
+ session: Record<string, any> & {
1247
+ id: string;
1248
+ createdAt: Date;
1249
+ updatedAt: Date;
1250
+ userId: string;
1251
+ expiresAt: Date;
1252
+ token: string;
1253
+ ipAddress?: string | null | undefined;
1254
+ userAgent?: string | null | undefined;
1255
+ };
1256
+ user: Record<string, any> & {
1257
+ id: string;
1258
+ createdAt: Date;
1259
+ updatedAt: Date;
1260
+ email: string;
1261
+ emailVerified: boolean;
1262
+ name: string;
1263
+ image?: string | null | undefined;
1264
+ };
1265
+ };
1266
+ }>>[];
1267
+ body: import("better-auth").ZodObject<{
1268
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1269
+ password: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1270
+ token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1271
+ }, import("zod/v4/core").$strip>;
1272
+ metadata: {
1273
+ openapi: {
1274
+ operationId: string;
1275
+ description: string;
1276
+ requestBody: {
1277
+ content: {
1278
+ "application/json": {
1279
+ schema: {
1280
+ type: "object";
1281
+ properties: {
1282
+ callbackURL: {
1283
+ type: string;
1284
+ description: string;
1285
+ };
1286
+ password: {
1287
+ type: string;
1288
+ description: string;
1289
+ };
1290
+ token: {
1291
+ type: string;
1292
+ description: string;
1293
+ };
1294
+ };
1295
+ };
1296
+ };
1297
+ };
1298
+ };
1299
+ responses: {
1300
+ "200": {
1301
+ description: string;
1302
+ content: {
1303
+ "application/json": {
1304
+ schema: {
1305
+ type: "object";
1306
+ properties: {
1307
+ success: {
1308
+ type: string;
1309
+ description: string;
1310
+ };
1311
+ message: {
1312
+ type: string;
1313
+ enum: string[];
1314
+ description: string;
1315
+ };
1316
+ };
1317
+ required: string[];
1318
+ };
1319
+ };
1320
+ };
1321
+ };
1322
+ };
1323
+ };
1324
+ };
1325
+ }, {
1326
+ success: boolean;
1327
+ message: string;
1328
+ }>;
1329
+ readonly requestPasswordReset: import("better-auth").StrictEndpoint<"/request-password-reset", {
1330
+ method: "POST";
1331
+ body: import("better-auth").ZodObject<{
1332
+ email: import("better-auth").ZodEmail;
1333
+ redirectTo: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1334
+ }, import("zod/v4/core").$strip>;
1335
+ metadata: {
1336
+ openapi: {
1337
+ operationId: string;
1338
+ description: string;
1339
+ responses: {
1340
+ "200": {
1341
+ description: string;
1342
+ content: {
1343
+ "application/json": {
1344
+ schema: {
1345
+ type: "object";
1346
+ properties: {
1347
+ status: {
1348
+ type: string;
1349
+ };
1350
+ message: {
1351
+ type: string;
1352
+ };
1353
+ };
1354
+ };
1355
+ };
1356
+ };
1357
+ };
1358
+ };
1359
+ };
1360
+ };
1361
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>[];
1362
+ }, {
1363
+ status: boolean;
1364
+ message: string;
1365
+ }>;
1366
+ readonly requestPasswordResetCallback: import("better-auth").StrictEndpoint<"/reset-password/:token", {
1367
+ method: "GET";
1368
+ operationId: string;
1369
+ query: import("better-auth").ZodObject<{
1370
+ callbackURL: import("better-auth").ZodString;
1371
+ }, import("zod/v4/core").$strip>;
1372
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>[];
1373
+ metadata: {
1374
+ openapi: {
1375
+ operationId: string;
1376
+ description: string;
1377
+ parameters: ({
1378
+ name: string;
1379
+ in: "path";
1380
+ required: true;
1381
+ description: string;
1382
+ schema: {
1383
+ type: "string";
1384
+ };
1385
+ } | {
1386
+ name: string;
1387
+ in: "query";
1388
+ required: true;
1389
+ description: string;
1390
+ schema: {
1391
+ type: "string";
1392
+ };
1393
+ })[];
1394
+ responses: {
1395
+ "200": {
1396
+ description: string;
1397
+ content: {
1398
+ "application/json": {
1399
+ schema: {
1400
+ type: "object";
1401
+ properties: {
1402
+ token: {
1403
+ type: string;
1404
+ };
1405
+ };
1406
+ };
1407
+ };
1408
+ };
1409
+ };
1410
+ };
1411
+ };
1412
+ };
1413
+ }, never>;
1414
+ readonly listSessions: import("better-auth").StrictEndpoint<"/list-sessions", {
1415
+ method: "GET";
1416
+ operationId: string;
1417
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1418
+ session: {
1419
+ session: Record<string, any> & {
1420
+ id: string;
1421
+ createdAt: Date;
1422
+ updatedAt: Date;
1423
+ userId: string;
1424
+ expiresAt: Date;
1425
+ token: string;
1426
+ ipAddress?: string | null | undefined;
1427
+ userAgent?: string | null | undefined;
1428
+ };
1429
+ user: Record<string, any> & {
1430
+ id: string;
1431
+ createdAt: Date;
1432
+ updatedAt: Date;
1433
+ email: string;
1434
+ emailVerified: boolean;
1435
+ name: string;
1436
+ image?: string | null | undefined;
1437
+ };
1438
+ };
1439
+ }>>[];
1440
+ requireHeaders: true;
1441
+ metadata: {
1442
+ openapi: {
1443
+ operationId: string;
1444
+ description: string;
1445
+ responses: {
1446
+ "200": {
1447
+ description: string;
1448
+ content: {
1449
+ "application/json": {
1450
+ schema: {
1451
+ type: "array";
1452
+ items: {
1453
+ $ref: string;
1454
+ };
1455
+ };
1456
+ };
1457
+ };
1458
+ };
1459
+ };
1460
+ };
1461
+ };
1462
+ }, import("better-auth").Prettify<{
1463
+ id: string;
1464
+ createdAt: Date;
1465
+ updatedAt: Date;
1466
+ userId: string;
1467
+ expiresAt: Date;
1468
+ token: string;
1469
+ ipAddress?: string | null | undefined | undefined;
1470
+ userAgent?: string | null | undefined | undefined;
1471
+ }>[]>;
1472
+ readonly revokeSession: import("better-auth").StrictEndpoint<"/revoke-session", {
1473
+ method: "POST";
1474
+ body: import("better-auth").ZodObject<{
1475
+ token: import("better-auth").ZodString;
1476
+ }, import("zod/v4/core").$strip>;
1477
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1478
+ session: {
1479
+ session: Record<string, any> & {
1480
+ id: string;
1481
+ createdAt: Date;
1482
+ updatedAt: Date;
1483
+ userId: string;
1484
+ expiresAt: Date;
1485
+ token: string;
1486
+ ipAddress?: string | null | undefined;
1487
+ userAgent?: string | null | undefined;
1488
+ };
1489
+ user: Record<string, any> & {
1490
+ id: string;
1491
+ createdAt: Date;
1492
+ updatedAt: Date;
1493
+ email: string;
1494
+ emailVerified: boolean;
1495
+ name: string;
1496
+ image?: string | null | undefined;
1497
+ };
1498
+ };
1499
+ }>>[];
1500
+ requireHeaders: true;
1501
+ metadata: {
1502
+ openapi: {
1503
+ description: string;
1504
+ requestBody: {
1505
+ content: {
1506
+ "application/json": {
1507
+ schema: {
1508
+ type: "object";
1509
+ properties: {
1510
+ token: {
1511
+ type: string;
1512
+ description: string;
1513
+ };
1514
+ };
1515
+ required: string[];
1516
+ };
1517
+ };
1518
+ };
1519
+ };
1520
+ responses: {
1521
+ "200": {
1522
+ description: string;
1523
+ content: {
1524
+ "application/json": {
1525
+ schema: {
1526
+ type: "object";
1527
+ properties: {
1528
+ status: {
1529
+ type: string;
1530
+ description: string;
1531
+ };
1532
+ };
1533
+ required: string[];
1534
+ };
1535
+ };
1536
+ };
1537
+ };
1538
+ };
1539
+ };
1540
+ };
1541
+ }, {
1542
+ status: boolean;
1543
+ }>;
1544
+ readonly revokeSessions: import("better-auth").StrictEndpoint<"/revoke-sessions", {
1545
+ method: "POST";
1546
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1547
+ session: {
1548
+ session: Record<string, any> & {
1549
+ id: string;
1550
+ createdAt: Date;
1551
+ updatedAt: Date;
1552
+ userId: string;
1553
+ expiresAt: Date;
1554
+ token: string;
1555
+ ipAddress?: string | null | undefined;
1556
+ userAgent?: string | null | undefined;
1557
+ };
1558
+ user: Record<string, any> & {
1559
+ id: string;
1560
+ createdAt: Date;
1561
+ updatedAt: Date;
1562
+ email: string;
1563
+ emailVerified: boolean;
1564
+ name: string;
1565
+ image?: string | null | undefined;
1566
+ };
1567
+ };
1568
+ }>>[];
1569
+ requireHeaders: true;
1570
+ metadata: {
1571
+ openapi: {
1572
+ description: string;
1573
+ responses: {
1574
+ "200": {
1575
+ description: string;
1576
+ content: {
1577
+ "application/json": {
1578
+ schema: {
1579
+ type: "object";
1580
+ properties: {
1581
+ status: {
1582
+ type: string;
1583
+ description: string;
1584
+ };
1585
+ };
1586
+ required: string[];
1587
+ };
1588
+ };
1589
+ };
1590
+ };
1591
+ };
1592
+ };
1593
+ };
1594
+ }, {
1595
+ status: boolean;
1596
+ }>;
1597
+ readonly revokeOtherSessions: import("better-auth").StrictEndpoint<"/revoke-other-sessions", {
1598
+ method: "POST";
1599
+ requireHeaders: true;
1600
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1601
+ session: {
1602
+ session: Record<string, any> & {
1603
+ id: string;
1604
+ createdAt: Date;
1605
+ updatedAt: Date;
1606
+ userId: string;
1607
+ expiresAt: Date;
1608
+ token: string;
1609
+ ipAddress?: string | null | undefined;
1610
+ userAgent?: string | null | undefined;
1611
+ };
1612
+ user: Record<string, any> & {
1613
+ id: string;
1614
+ createdAt: Date;
1615
+ updatedAt: Date;
1616
+ email: string;
1617
+ emailVerified: boolean;
1618
+ name: string;
1619
+ image?: string | null | undefined;
1620
+ };
1621
+ };
1622
+ }>>[];
1623
+ metadata: {
1624
+ openapi: {
1625
+ description: string;
1626
+ responses: {
1627
+ "200": {
1628
+ description: string;
1629
+ content: {
1630
+ "application/json": {
1631
+ schema: {
1632
+ type: "object";
1633
+ properties: {
1634
+ status: {
1635
+ type: string;
1636
+ description: string;
1637
+ };
1638
+ };
1639
+ required: string[];
1640
+ };
1641
+ };
1642
+ };
1643
+ };
1644
+ };
1645
+ };
1646
+ };
1647
+ }, {
1648
+ status: boolean;
1649
+ }>;
1650
+ readonly linkSocialAccount: import("better-auth").StrictEndpoint<"/link-social", {
1651
+ method: "POST";
1652
+ requireHeaders: true;
1653
+ body: import("better-auth").ZodObject<{
1654
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1655
+ provider: import("better-auth").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
1656
+ idToken: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
1657
+ token: import("better-auth").ZodString;
1658
+ nonce: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1659
+ accessToken: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1660
+ refreshToken: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1661
+ }, import("zod/v4/core").$strip>>;
1662
+ requestSignUp: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1663
+ scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
1664
+ errorCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1665
+ disableRedirect: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1666
+ loginHint: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1667
+ additionalParams: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodString>>;
1668
+ additionalData: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
1669
+ }, import("zod/v4/core").$strip>;
1670
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1671
+ session: {
1672
+ session: Record<string, any> & {
1673
+ id: string;
1674
+ createdAt: Date;
1675
+ updatedAt: Date;
1676
+ userId: string;
1677
+ expiresAt: Date;
1678
+ token: string;
1679
+ ipAddress?: string | null | undefined;
1680
+ userAgent?: string | null | undefined;
1681
+ };
1682
+ user: Record<string, any> & {
1683
+ id: string;
1684
+ createdAt: Date;
1685
+ updatedAt: Date;
1686
+ email: string;
1687
+ emailVerified: boolean;
1688
+ name: string;
1689
+ image?: string | null | undefined;
1690
+ };
1691
+ };
1692
+ }>>[];
1693
+ metadata: {
1694
+ openapi: {
1695
+ description: string;
1696
+ operationId: string;
1697
+ responses: {
1698
+ "200": {
1699
+ description: string;
1700
+ content: {
1701
+ "application/json": {
1702
+ schema: {
1703
+ type: "object";
1704
+ properties: {
1705
+ url: {
1706
+ type: string;
1707
+ description: string;
1708
+ };
1709
+ redirect: {
1710
+ type: string;
1711
+ description: string;
1712
+ };
1713
+ status: {
1714
+ type: string;
1715
+ };
1716
+ };
1717
+ required: string[];
1718
+ };
1719
+ };
1720
+ };
1721
+ };
1722
+ };
1723
+ };
1724
+ };
1725
+ }, {
1726
+ url: string;
1727
+ redirect: boolean;
1728
+ }>;
1729
+ readonly listUserAccounts: import("better-auth").StrictEndpoint<"/list-accounts", {
1730
+ method: "GET";
1731
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1732
+ session: {
1733
+ session: Record<string, any> & {
1734
+ id: string;
1735
+ createdAt: Date;
1736
+ updatedAt: Date;
1737
+ userId: string;
1738
+ expiresAt: Date;
1739
+ token: string;
1740
+ ipAddress?: string | null | undefined;
1741
+ userAgent?: string | null | undefined;
1742
+ };
1743
+ user: Record<string, any> & {
1744
+ id: string;
1745
+ createdAt: Date;
1746
+ updatedAt: Date;
1747
+ email: string;
1748
+ emailVerified: boolean;
1749
+ name: string;
1750
+ image?: string | null | undefined;
1751
+ };
1752
+ };
1753
+ }>>[];
1754
+ metadata: {
1755
+ openapi: {
1756
+ operationId: string;
1757
+ description: string;
1758
+ responses: {
1759
+ "200": {
1760
+ description: string;
1761
+ content: {
1762
+ "application/json": {
1763
+ schema: {
1764
+ type: "array";
1765
+ items: {
1766
+ type: string;
1767
+ properties: {
1768
+ id: {
1769
+ type: string;
1770
+ };
1771
+ providerId: {
1772
+ type: string;
1773
+ };
1774
+ createdAt: {
1775
+ type: string;
1776
+ format: string;
1777
+ };
1778
+ updatedAt: {
1779
+ type: string;
1780
+ format: string;
1781
+ };
1782
+ accountId: {
1783
+ type: string;
1784
+ };
1785
+ userId: {
1786
+ type: string;
1787
+ };
1788
+ scopes: {
1789
+ type: string;
1790
+ items: {
1791
+ type: string;
1792
+ };
1793
+ };
1794
+ };
1795
+ required: string[];
1796
+ };
1797
+ };
1798
+ };
1799
+ };
1800
+ };
1801
+ };
1802
+ };
1803
+ };
1804
+ }, {
1805
+ scopes: string[];
1806
+ id: string;
1807
+ createdAt: Date;
1808
+ updatedAt: Date;
1809
+ userId: string;
1810
+ providerId: string;
1811
+ accountId: string;
1812
+ }[]>;
1813
+ readonly deleteUserCallback: import("better-auth").StrictEndpoint<"/delete-user/callback", {
1814
+ method: "GET";
1815
+ query: import("better-auth").ZodObject<{
1816
+ token: import("better-auth").ZodString;
1817
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1818
+ }, import("zod/v4/core").$strip>;
1819
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>[];
1820
+ metadata: {
1821
+ openapi: {
1822
+ description: string;
1823
+ responses: {
1824
+ "200": {
1825
+ description: string;
1826
+ content: {
1827
+ "application/json": {
1828
+ schema: {
1829
+ type: "object";
1830
+ properties: {
1831
+ success: {
1832
+ type: string;
1833
+ description: string;
1834
+ };
1835
+ message: {
1836
+ type: string;
1837
+ enum: string[];
1838
+ description: string;
1839
+ };
1840
+ };
1841
+ required: string[];
1842
+ };
1843
+ };
1844
+ };
1845
+ };
1846
+ };
1847
+ };
1848
+ };
1849
+ }, {
1850
+ success: boolean;
1851
+ message: string;
1852
+ }>;
1853
+ readonly unlinkAccount: import("better-auth").StrictEndpoint<"/unlink-account", {
1854
+ method: "POST";
1855
+ body: import("better-auth").ZodObject<{
1856
+ accountId: import("better-auth").ZodString;
1857
+ }, import("zod/v4/core").$strip>;
1858
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1859
+ session: {
1860
+ session: Record<string, any> & {
1861
+ id: string;
1862
+ createdAt: Date;
1863
+ updatedAt: Date;
1864
+ userId: string;
1865
+ expiresAt: Date;
1866
+ token: string;
1867
+ ipAddress?: string | null | undefined;
1868
+ userAgent?: string | null | undefined;
1869
+ };
1870
+ user: Record<string, any> & {
1871
+ id: string;
1872
+ createdAt: Date;
1873
+ updatedAt: Date;
1874
+ email: string;
1875
+ emailVerified: boolean;
1876
+ name: string;
1877
+ image?: string | null | undefined;
1878
+ };
1879
+ };
1880
+ }>>[];
1881
+ metadata: {
1882
+ openapi: {
1883
+ description: string;
1884
+ responses: {
1885
+ "200": {
1886
+ description: string;
1887
+ content: {
1888
+ "application/json": {
1889
+ schema: {
1890
+ type: "object";
1891
+ properties: {
1892
+ status: {
1893
+ type: string;
1894
+ };
1895
+ };
1896
+ };
1897
+ };
1898
+ };
1899
+ };
1900
+ };
1901
+ };
1902
+ };
1903
+ }, {
1904
+ status: boolean;
1905
+ }>;
1906
+ readonly refreshToken: import("better-auth").StrictEndpoint<"/refresh-token", {
1907
+ method: "POST";
1908
+ body: import("better-auth").ZodUnion<readonly [import("better-auth").ZodObject<{
1909
+ accountId: import("better-auth").ZodString;
1910
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1911
+ }, import("zod/v4/core").$strict>, import("better-auth").ZodObject<{
1912
+ useAccountCookie: import("better-auth").ZodLiteral<true>;
1913
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1914
+ }, import("zod/v4/core").$strict>]>;
1915
+ metadata: {
1916
+ openapi: {
1917
+ description: string;
1918
+ responses: {
1919
+ 200: {
1920
+ description: string;
1921
+ content: {
1922
+ "application/json": {
1923
+ schema: {
1924
+ type: "object";
1925
+ properties: {
1926
+ tokenType: {
1927
+ type: string;
1928
+ };
1929
+ idToken: {
1930
+ type: string;
1931
+ };
1932
+ accessToken: {
1933
+ type: string;
1934
+ };
1935
+ refreshToken: {
1936
+ type: string;
1937
+ };
1938
+ accessTokenExpiresAt: {
1939
+ type: string;
1940
+ format: string;
1941
+ };
1942
+ refreshTokenExpiresAt: {
1943
+ type: string;
1944
+ format: string;
1945
+ };
1946
+ };
1947
+ };
1948
+ };
1949
+ };
1950
+ };
1951
+ 400: {
1952
+ description: string;
1953
+ };
1954
+ };
1955
+ };
1956
+ };
1957
+ }, {
1958
+ accessToken: string | undefined;
1959
+ refreshToken: string;
1960
+ accessTokenExpiresAt: Date | undefined;
1961
+ refreshTokenExpiresAt: Date | null | undefined;
1962
+ scope: string | null | undefined;
1963
+ idToken: string | null | undefined;
1964
+ providerId: string;
1965
+ accountId: string;
1966
+ }>;
1967
+ readonly getAccessToken: import("better-auth").StrictEndpoint<"/get-access-token", {
1968
+ method: "POST";
1969
+ body: import("better-auth").ZodUnion<readonly [import("better-auth").ZodObject<{
1970
+ accountId: import("better-auth").ZodString;
1971
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1972
+ }, import("zod/v4/core").$strict>, import("better-auth").ZodObject<{
1973
+ useAccountCookie: import("better-auth").ZodLiteral<true>;
1974
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1975
+ }, import("zod/v4/core").$strict>]>;
1976
+ metadata: {
1977
+ openapi: {
1978
+ description: string;
1979
+ responses: {
1980
+ 200: {
1981
+ description: string;
1982
+ content: {
1983
+ "application/json": {
1984
+ schema: {
1985
+ type: "object";
1986
+ properties: {
1987
+ tokenType: {
1988
+ type: string;
1989
+ };
1990
+ idToken: {
1991
+ type: string;
1992
+ };
1993
+ accessToken: {
1994
+ type: string;
1995
+ };
1996
+ accessTokenExpiresAt: {
1997
+ type: string;
1998
+ format: string;
1999
+ };
2000
+ };
2001
+ };
2002
+ };
2003
+ };
2004
+ };
2005
+ 400: {
2006
+ description: string;
2007
+ };
2008
+ };
2009
+ };
2010
+ };
2011
+ }, {
2012
+ accessToken: string;
2013
+ accessTokenExpiresAt: Date | undefined;
2014
+ scopes: string[];
2015
+ idToken: string | undefined;
2016
+ }>;
2017
+ readonly accountInfo: import("better-auth").StrictEndpoint<"/account-info", {
2018
+ method: "GET";
2019
+ metadata: {
2020
+ openapi: {
2021
+ description: string;
2022
+ responses: {
2023
+ "200": {
2024
+ description: string;
2025
+ content: {
2026
+ "application/json": {
2027
+ schema: {
2028
+ type: "object";
2029
+ properties: {
2030
+ user: {
2031
+ type: string;
2032
+ properties: {
2033
+ name: {
2034
+ type: string;
2035
+ };
2036
+ email: {
2037
+ type: string;
2038
+ nullable: boolean;
2039
+ };
2040
+ image: {
2041
+ type: string;
2042
+ };
2043
+ emailVerified: {
2044
+ type: string;
2045
+ };
2046
+ };
2047
+ required: string[];
2048
+ };
2049
+ account: {
2050
+ type: string;
2051
+ properties: {
2052
+ id: {
2053
+ type: string;
2054
+ };
2055
+ providerId: {
2056
+ type: string;
2057
+ };
2058
+ accountId: {
2059
+ type: string;
2060
+ };
2061
+ };
2062
+ required: string[];
2063
+ additionalProperties: boolean;
2064
+ };
2065
+ data: {
2066
+ type: string;
2067
+ properties: {};
2068
+ additionalProperties: boolean;
2069
+ };
2070
+ };
2071
+ required: string[];
2072
+ additionalProperties: boolean;
2073
+ };
2074
+ };
2075
+ };
2076
+ };
2077
+ };
2078
+ };
2079
+ };
2080
+ query: import("better-auth").ZodUnion<readonly [import("better-auth").ZodObject<{
2081
+ accountId: import("better-auth").ZodString;
2082
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2083
+ }, import("zod/v4/core").$strict>, import("better-auth").ZodObject<{
2084
+ useAccountCookie: import("better-auth").ZodLiteral<true>;
2085
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2086
+ }, import("zod/v4/core").$strict>]>;
2087
+ }, {
2088
+ account: {
2089
+ id: string;
2090
+ providerId: string;
2091
+ accountId: string;
2092
+ };
2093
+ user: import("better-auth").OAuth2UserInfo;
2094
+ data: object;
2095
+ }>;
2096
+ }>>, keyof import("better-auth").UnionToIntersection<{} | (((Auth extends {
2097
+ options: infer O;
2098
+ } ? O : Auth)["plugins"] extends (infer P)[] ? P extends {
2099
+ id: "session-projection";
2100
+ } ? P : never : never) extends infer T ? T extends ((Auth extends {
2101
+ options: infer O;
2102
+ } ? O : Auth)["plugins"] extends (infer P)[] ? P extends {
2103
+ id: "session-projection";
2104
+ } ? P : never : never) ? T extends {
2105
+ endpoints?: infer Endpoints;
2106
+ } ? Endpoints extends Record<string, unknown> ? Endpoints : {} : {} : never : never)>> & import("better-auth").UnionToIntersection<{} | (((Auth extends {
2107
+ options: infer O;
2108
+ } ? O : Auth)["plugins"] extends (infer P)[] ? P extends {
2109
+ id: "session-projection";
2110
+ } ? P : never : never) extends infer T_1 ? T_1 extends ((Auth extends {
2111
+ options: infer O;
2112
+ } ? O : Auth)["plugins"] extends (infer P)[] ? P extends {
2113
+ id: "session-projection";
2114
+ } ? P : never : never) ? T_1 extends {
2115
+ endpoints?: infer Endpoints;
2116
+ } ? Endpoints extends Record<string, unknown> ? Endpoints : {} : {} : never : never)>, {
2117
+ plugins: ({
2118
+ id: "session-broadcast";
2119
+ fetchPlugins: {
2120
+ id: string;
2121
+ name: string;
2122
+ hooks: {
2123
+ onSuccess({ data }: import("better-auth/client").SuccessContext<any>): void;
2124
+ };
2125
+ }[];
2126
+ } | {
2127
+ id: "infer-server-plugin";
2128
+ version: string;
2129
+ $InferServerPlugin: (Auth extends {
2130
+ options: infer O;
2131
+ } ? O : Auth)["plugins"] extends (infer P)[] ? P extends {
2132
+ id: "session-projection";
2133
+ } ? P : never : never;
2134
+ })[];
2135
+ sessionOptions: {
2136
+ refetchOnWindowFocus: true;
2137
+ refetchWhenOffline: false;
2138
+ };
2139
+ }>> extends {
2140
+ getSession: () => Promise<infer Res>;
2141
+ } ? Res extends {
2142
+ data: infer S;
2143
+ error: null;
2144
+ } | {
2145
+ data: null;
2146
+ error: {
2147
+ message?: string | undefined;
2148
+ status: number;
2149
+ statusText: string;
2150
+ };
2151
+ } ? S : Res : never;
2152
+ isPending: boolean;
2153
+ isRefetching: boolean;
2154
+ error: import("better-auth/client").BetterFetchError | null;
2155
+ refetch: (queryParams?: {
2156
+ query?: import("better-auth").SessionQueryParams;
2157
+ } | undefined) => Promise<void>;
2158
+ }, "data"> & {
2159
+ data: Auth["$Infer"]["Session"] | null;
2160
+ }>;
2161
+ refreshSession: () => Promise<void>;
2162
+ watchSession: (session: Auth["$Infer"]["Session"] | null | undefined, onChange: () => void) => () => void;
2163
+ watchViewerRouter: (router: ViewerRouter, queryClient: ViewerQueryClient, routeId: string) => () => void;
2164
+ post: (path: string, body: Record<string, string>, { form }?: {
2165
+ form?: boolean | undefined;
2166
+ }) => Promise<{
2167
+ message?: string | undefined;
2168
+ status: number;
2169
+ statusText: string;
2170
+ } | undefined>;
2171
+ signInWithProvider: (provider: string, callbackURL: string) => Promise<string | undefined>;
2172
+ };
2173
+ export {};