ngx-better-auth 0.1.0 → 0.2.2

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/index.d.ts CHANGED
@@ -1,8 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, EnvironmentProviders } from '@angular/core';
3
+ import * as better_auth from 'better-auth';
3
4
  import { BetterAuthOptions } from 'better-auth';
4
5
  import * as rxjs from 'rxjs';
6
+ import * as better_auth_client from 'better-auth/client';
7
+ import { BetterFetchError } from 'better-auth/client';
5
8
  import { Session, User } from 'better-auth/types';
9
+ import { SocialProviderList } from 'better-auth/social-providers';
6
10
  import * as _angular_router from '@angular/router';
7
11
  import { UrlTree, CanActivateFn } from '@angular/router';
8
12
 
@@ -77,6 +81,2336 @@ interface AuthSession {
77
81
  };
78
82
  }
79
83
 
84
+ type Provider = SocialProviderList[number];
85
+
86
+ declare class AuthService {
87
+ private readonly config;
88
+ readonly authClient: {
89
+ signIn: {
90
+ social: <FetchOptions extends {
91
+ method?: string | undefined;
92
+ headers?: (HeadersInit & (HeadersInit | {
93
+ accept: "application/json" | "text/plain" | "application/octet-stream";
94
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
95
+ authorization: "Bearer" | "Basic";
96
+ })) | undefined;
97
+ cache?: RequestCache | undefined;
98
+ credentials?: RequestCredentials | undefined;
99
+ integrity?: string | undefined;
100
+ keepalive?: boolean | undefined;
101
+ mode?: RequestMode | undefined;
102
+ priority?: RequestPriority | undefined;
103
+ redirect?: RequestRedirect | undefined;
104
+ referrer?: string | undefined;
105
+ referrerPolicy?: ReferrerPolicy | undefined;
106
+ signal?: (AbortSignal | null) | undefined;
107
+ window?: null | undefined;
108
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
109
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
110
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
111
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
112
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
113
+ hookOptions?: {
114
+ cloneResponse?: boolean;
115
+ } | undefined;
116
+ timeout?: number | undefined;
117
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
118
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
119
+ baseURL?: string | undefined;
120
+ throw?: boolean | undefined;
121
+ auth?: ({
122
+ type: "Bearer";
123
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
124
+ } | {
125
+ type: "Basic";
126
+ username: string | (() => string | undefined) | undefined;
127
+ password: string | (() => string | undefined) | undefined;
128
+ } | {
129
+ type: "Custom";
130
+ prefix: string | (() => string | undefined) | undefined;
131
+ value: string | (() => string | undefined) | undefined;
132
+ }) | undefined;
133
+ body?: (Partial<{
134
+ provider: unknown;
135
+ callbackURL?: string | undefined;
136
+ newUserCallbackURL?: string | undefined;
137
+ errorCallbackURL?: string | undefined;
138
+ disableRedirect?: boolean | undefined;
139
+ idToken?: {
140
+ token: string;
141
+ nonce?: string | undefined;
142
+ accessToken?: string | undefined;
143
+ refreshToken?: string | undefined;
144
+ expiresAt?: number | undefined;
145
+ } | undefined;
146
+ scopes?: string[] | undefined;
147
+ requestSignUp?: boolean | undefined;
148
+ loginHint?: string | undefined;
149
+ }> & Record<string, any>) | undefined;
150
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
151
+ params?: Record<string, any> | undefined;
152
+ duplex?: "full" | "half" | undefined;
153
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
154
+ retry?: better_auth_client.RetryOptions | undefined;
155
+ retryAttempt?: number | undefined;
156
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
157
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
158
+ disableValidation?: boolean | undefined;
159
+ }>(data_0: better_auth.Prettify<{
160
+ provider: unknown;
161
+ callbackURL?: string | undefined;
162
+ newUserCallbackURL?: string | undefined;
163
+ errorCallbackURL?: string | undefined;
164
+ disableRedirect?: boolean | undefined;
165
+ idToken?: {
166
+ token: string;
167
+ nonce?: string | undefined;
168
+ accessToken?: string | undefined;
169
+ refreshToken?: string | undefined;
170
+ expiresAt?: number | undefined;
171
+ } | undefined;
172
+ scopes?: string[] | undefined;
173
+ requestSignUp?: boolean | undefined;
174
+ loginHint?: string | undefined;
175
+ } & {
176
+ fetchOptions?: FetchOptions | undefined;
177
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
178
+ redirect: boolean;
179
+ token: string;
180
+ url: undefined;
181
+ user: {
182
+ id: string;
183
+ email: string;
184
+ name: string;
185
+ image: string | null | undefined;
186
+ emailVerified: boolean;
187
+ createdAt: Date;
188
+ updatedAt: Date;
189
+ };
190
+ } | {
191
+ url: string;
192
+ redirect: boolean;
193
+ }>, {
194
+ code?: string;
195
+ message?: string;
196
+ }, FetchOptions["throw"] extends true ? true : false>>;
197
+ };
198
+ } & {
199
+ getSession: <FetchOptions extends {
200
+ method?: string | undefined;
201
+ headers?: (HeadersInit & (HeadersInit | {
202
+ accept: "application/json" | "text/plain" | "application/octet-stream";
203
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
204
+ authorization: "Bearer" | "Basic";
205
+ })) | undefined;
206
+ cache?: RequestCache | undefined;
207
+ credentials?: RequestCredentials | undefined;
208
+ integrity?: string | undefined;
209
+ keepalive?: boolean | undefined;
210
+ mode?: RequestMode | undefined;
211
+ priority?: RequestPriority | undefined;
212
+ redirect?: RequestRedirect | undefined;
213
+ referrer?: string | undefined;
214
+ referrerPolicy?: ReferrerPolicy | undefined;
215
+ signal?: (AbortSignal | null) | undefined;
216
+ window?: null | undefined;
217
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
218
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
219
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
220
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
221
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
222
+ hookOptions?: {
223
+ cloneResponse?: boolean;
224
+ } | undefined;
225
+ timeout?: number | undefined;
226
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
227
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
228
+ baseURL?: string | undefined;
229
+ throw?: boolean | undefined;
230
+ auth?: ({
231
+ type: "Bearer";
232
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
233
+ } | {
234
+ type: "Basic";
235
+ username: string | (() => string | undefined) | undefined;
236
+ password: string | (() => string | undefined) | undefined;
237
+ } | {
238
+ type: "Custom";
239
+ prefix: string | (() => string | undefined) | undefined;
240
+ value: string | (() => string | undefined) | undefined;
241
+ }) | undefined;
242
+ body?: undefined;
243
+ query?: (Partial<{
244
+ disableCookieCache?: unknown;
245
+ disableRefresh?: unknown;
246
+ }> & Record<string, any>) | undefined;
247
+ params?: Record<string, any> | undefined;
248
+ duplex?: "full" | "half" | undefined;
249
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
250
+ retry?: better_auth_client.RetryOptions | undefined;
251
+ retryAttempt?: number | undefined;
252
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
253
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
254
+ disableValidation?: boolean | undefined;
255
+ }>(data_0?: better_auth.Prettify<{
256
+ query?: {
257
+ disableCookieCache?: unknown;
258
+ disableRefresh?: unknown;
259
+ } | undefined;
260
+ fetchOptions?: FetchOptions | undefined;
261
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
262
+ user: {
263
+ id: string;
264
+ email: string;
265
+ emailVerified: boolean;
266
+ name: string;
267
+ createdAt: Date;
268
+ updatedAt: Date;
269
+ image?: string | null | undefined;
270
+ };
271
+ session: {
272
+ id: string;
273
+ userId: string;
274
+ expiresAt: Date;
275
+ createdAt: Date;
276
+ updatedAt: Date;
277
+ token: string;
278
+ ipAddress?: string | null | undefined;
279
+ userAgent?: string | null | undefined;
280
+ };
281
+ } | null, {
282
+ code?: string;
283
+ message?: string;
284
+ }, FetchOptions["throw"] extends true ? true : false>>;
285
+ } & {
286
+ signOut: <FetchOptions extends {
287
+ method?: string | undefined;
288
+ headers?: (HeadersInit & (HeadersInit | {
289
+ accept: "application/json" | "text/plain" | "application/octet-stream";
290
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
291
+ authorization: "Bearer" | "Basic";
292
+ })) | undefined;
293
+ cache?: RequestCache | undefined;
294
+ credentials?: RequestCredentials | undefined;
295
+ integrity?: string | undefined;
296
+ keepalive?: boolean | undefined;
297
+ mode?: RequestMode | undefined;
298
+ priority?: RequestPriority | undefined;
299
+ redirect?: RequestRedirect | undefined;
300
+ referrer?: string | undefined;
301
+ referrerPolicy?: ReferrerPolicy | undefined;
302
+ signal?: (AbortSignal | null) | undefined;
303
+ window?: null | undefined;
304
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
305
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
306
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
307
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
308
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
309
+ hookOptions?: {
310
+ cloneResponse?: boolean;
311
+ } | undefined;
312
+ timeout?: number | undefined;
313
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
314
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
315
+ baseURL?: string | undefined;
316
+ throw?: boolean | undefined;
317
+ auth?: ({
318
+ type: "Bearer";
319
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
320
+ } | {
321
+ type: "Basic";
322
+ username: string | (() => string | undefined) | undefined;
323
+ password: string | (() => string | undefined) | undefined;
324
+ } | {
325
+ type: "Custom";
326
+ prefix: string | (() => string | undefined) | undefined;
327
+ value: string | (() => string | undefined) | undefined;
328
+ }) | undefined;
329
+ body?: undefined;
330
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
331
+ params?: Record<string, any> | undefined;
332
+ duplex?: "full" | "half" | undefined;
333
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
334
+ retry?: better_auth_client.RetryOptions | undefined;
335
+ retryAttempt?: number | undefined;
336
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
337
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
338
+ disableValidation?: boolean | undefined;
339
+ }>(data_0?: better_auth.Prettify<{
340
+ query?: Record<string, any> | undefined;
341
+ fetchOptions?: FetchOptions | undefined;
342
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
343
+ success: boolean;
344
+ }, {
345
+ code?: string;
346
+ message?: string;
347
+ }, FetchOptions["throw"] extends true ? true : false>>;
348
+ } & {
349
+ signIn: {
350
+ email: <FetchOptions extends {
351
+ method?: string | undefined;
352
+ headers?: (HeadersInit & (HeadersInit | {
353
+ accept: "application/json" | "text/plain" | "application/octet-stream";
354
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
355
+ authorization: "Bearer" | "Basic";
356
+ })) | undefined;
357
+ cache?: RequestCache | undefined;
358
+ credentials?: RequestCredentials | undefined;
359
+ integrity?: string | undefined;
360
+ keepalive?: boolean | undefined;
361
+ mode?: RequestMode | undefined;
362
+ priority?: RequestPriority | undefined;
363
+ redirect?: RequestRedirect | undefined;
364
+ referrer?: string | undefined;
365
+ referrerPolicy?: ReferrerPolicy | undefined;
366
+ signal?: (AbortSignal | null) | undefined;
367
+ window?: null | undefined;
368
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
369
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
370
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
371
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
372
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
373
+ hookOptions?: {
374
+ cloneResponse?: boolean;
375
+ } | undefined;
376
+ timeout?: number | undefined;
377
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
378
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
379
+ baseURL?: string | undefined;
380
+ throw?: boolean | undefined;
381
+ auth?: ({
382
+ type: "Bearer";
383
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
384
+ } | {
385
+ type: "Basic";
386
+ username: string | (() => string | undefined) | undefined;
387
+ password: string | (() => string | undefined) | undefined;
388
+ } | {
389
+ type: "Custom";
390
+ prefix: string | (() => string | undefined) | undefined;
391
+ value: string | (() => string | undefined) | undefined;
392
+ }) | undefined;
393
+ body?: (Partial<{
394
+ email: string;
395
+ password: string;
396
+ callbackURL?: string | undefined;
397
+ rememberMe?: boolean | undefined;
398
+ }> & Record<string, any>) | undefined;
399
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
400
+ params?: Record<string, any> | undefined;
401
+ duplex?: "full" | "half" | undefined;
402
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
403
+ retry?: better_auth_client.RetryOptions | undefined;
404
+ retryAttempt?: number | undefined;
405
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
406
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
407
+ disableValidation?: boolean | undefined;
408
+ }>(data_0: better_auth.Prettify<{
409
+ email: string;
410
+ password: string;
411
+ callbackURL?: string | undefined;
412
+ rememberMe?: boolean | undefined;
413
+ } & {
414
+ fetchOptions?: FetchOptions | undefined;
415
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
416
+ redirect: boolean;
417
+ token: string;
418
+ url: string | undefined;
419
+ user: {
420
+ id: string;
421
+ email: string;
422
+ name: string;
423
+ image: string | null | undefined;
424
+ emailVerified: boolean;
425
+ createdAt: Date;
426
+ updatedAt: Date;
427
+ };
428
+ }, {
429
+ code?: string;
430
+ message?: string;
431
+ }, FetchOptions["throw"] extends true ? true : false>>;
432
+ };
433
+ } & {
434
+ forgetPassword: <FetchOptions extends {
435
+ method?: string | undefined;
436
+ headers?: (HeadersInit & (HeadersInit | {
437
+ accept: "application/json" | "text/plain" | "application/octet-stream";
438
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
439
+ authorization: "Bearer" | "Basic";
440
+ })) | undefined;
441
+ cache?: RequestCache | undefined;
442
+ credentials?: RequestCredentials | undefined;
443
+ integrity?: string | undefined;
444
+ keepalive?: boolean | undefined;
445
+ mode?: RequestMode | undefined;
446
+ priority?: RequestPriority | undefined;
447
+ redirect?: RequestRedirect | undefined;
448
+ referrer?: string | undefined;
449
+ referrerPolicy?: ReferrerPolicy | undefined;
450
+ signal?: (AbortSignal | null) | undefined;
451
+ window?: null | undefined;
452
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
453
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
454
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
455
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
456
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
457
+ hookOptions?: {
458
+ cloneResponse?: boolean;
459
+ } | undefined;
460
+ timeout?: number | undefined;
461
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
462
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
463
+ baseURL?: string | undefined;
464
+ throw?: boolean | undefined;
465
+ auth?: ({
466
+ type: "Bearer";
467
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
468
+ } | {
469
+ type: "Basic";
470
+ username: string | (() => string | undefined) | undefined;
471
+ password: string | (() => string | undefined) | undefined;
472
+ } | {
473
+ type: "Custom";
474
+ prefix: string | (() => string | undefined) | undefined;
475
+ value: string | (() => string | undefined) | undefined;
476
+ }) | undefined;
477
+ body?: (Partial<{
478
+ email: string;
479
+ redirectTo?: string | undefined;
480
+ }> & Record<string, any>) | undefined;
481
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
482
+ params?: Record<string, any> | undefined;
483
+ duplex?: "full" | "half" | undefined;
484
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
485
+ retry?: better_auth_client.RetryOptions | undefined;
486
+ retryAttempt?: number | undefined;
487
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
488
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
489
+ disableValidation?: boolean | undefined;
490
+ }>(data_0: better_auth.Prettify<{
491
+ email: string;
492
+ redirectTo?: string | undefined;
493
+ } & {
494
+ fetchOptions?: FetchOptions | undefined;
495
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
496
+ status: boolean;
497
+ }, {
498
+ code?: string;
499
+ message?: string;
500
+ }, FetchOptions["throw"] extends true ? true : false>>;
501
+ } & {
502
+ resetPassword: <FetchOptions extends {
503
+ method?: string | undefined;
504
+ headers?: (HeadersInit & (HeadersInit | {
505
+ accept: "application/json" | "text/plain" | "application/octet-stream";
506
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
507
+ authorization: "Bearer" | "Basic";
508
+ })) | undefined;
509
+ cache?: RequestCache | undefined;
510
+ credentials?: RequestCredentials | undefined;
511
+ integrity?: string | undefined;
512
+ keepalive?: boolean | undefined;
513
+ mode?: RequestMode | undefined;
514
+ priority?: RequestPriority | undefined;
515
+ redirect?: RequestRedirect | undefined;
516
+ referrer?: string | undefined;
517
+ referrerPolicy?: ReferrerPolicy | undefined;
518
+ signal?: (AbortSignal | null) | undefined;
519
+ window?: null | undefined;
520
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
521
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
522
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
523
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
524
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
525
+ hookOptions?: {
526
+ cloneResponse?: boolean;
527
+ } | undefined;
528
+ timeout?: number | undefined;
529
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
530
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
531
+ baseURL?: string | undefined;
532
+ throw?: boolean | undefined;
533
+ auth?: ({
534
+ type: "Bearer";
535
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
536
+ } | {
537
+ type: "Basic";
538
+ username: string | (() => string | undefined) | undefined;
539
+ password: string | (() => string | undefined) | undefined;
540
+ } | {
541
+ type: "Custom";
542
+ prefix: string | (() => string | undefined) | undefined;
543
+ value: string | (() => string | undefined) | undefined;
544
+ }) | undefined;
545
+ body?: (Partial<{
546
+ newPassword: string;
547
+ token?: string | undefined;
548
+ }> & Record<string, any>) | undefined;
549
+ query?: (Partial<{
550
+ token?: string | undefined;
551
+ }> & Record<string, any>) | undefined;
552
+ params?: Record<string, any> | undefined;
553
+ duplex?: "full" | "half" | undefined;
554
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
555
+ retry?: better_auth_client.RetryOptions | undefined;
556
+ retryAttempt?: number | undefined;
557
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
558
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
559
+ disableValidation?: boolean | undefined;
560
+ }>(data_0: better_auth.Prettify<{
561
+ newPassword: string;
562
+ token?: string | undefined;
563
+ } & {
564
+ fetchOptions?: FetchOptions | undefined;
565
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
566
+ status: boolean;
567
+ }, {
568
+ code?: string;
569
+ message?: string;
570
+ }, FetchOptions["throw"] extends true ? true : false>>;
571
+ } & {
572
+ verifyEmail: <FetchOptions extends {
573
+ method?: string | undefined;
574
+ headers?: (HeadersInit & (HeadersInit | {
575
+ accept: "application/json" | "text/plain" | "application/octet-stream";
576
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
577
+ authorization: "Bearer" | "Basic";
578
+ })) | undefined;
579
+ cache?: RequestCache | undefined;
580
+ credentials?: RequestCredentials | undefined;
581
+ integrity?: string | undefined;
582
+ keepalive?: boolean | undefined;
583
+ mode?: RequestMode | undefined;
584
+ priority?: RequestPriority | undefined;
585
+ redirect?: RequestRedirect | undefined;
586
+ referrer?: string | undefined;
587
+ referrerPolicy?: ReferrerPolicy | undefined;
588
+ signal?: (AbortSignal | null) | undefined;
589
+ window?: null | undefined;
590
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
591
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
592
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
593
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
594
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
595
+ hookOptions?: {
596
+ cloneResponse?: boolean;
597
+ } | undefined;
598
+ timeout?: number | undefined;
599
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
600
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
601
+ baseURL?: string | undefined;
602
+ throw?: boolean | undefined;
603
+ auth?: ({
604
+ type: "Bearer";
605
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
606
+ } | {
607
+ type: "Basic";
608
+ username: string | (() => string | undefined) | undefined;
609
+ password: string | (() => string | undefined) | undefined;
610
+ } | {
611
+ type: "Custom";
612
+ prefix: string | (() => string | undefined) | undefined;
613
+ value: string | (() => string | undefined) | undefined;
614
+ }) | undefined;
615
+ body?: undefined;
616
+ query?: (Partial<{
617
+ token: string;
618
+ callbackURL?: string | undefined;
619
+ }> & Record<string, any>) | undefined;
620
+ params?: Record<string, any> | undefined;
621
+ duplex?: "full" | "half" | undefined;
622
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
623
+ retry?: better_auth_client.RetryOptions | undefined;
624
+ retryAttempt?: number | undefined;
625
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
626
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
627
+ disableValidation?: boolean | undefined;
628
+ }>(data_0: better_auth.Prettify<{
629
+ query: {
630
+ token: string;
631
+ callbackURL?: string | undefined;
632
+ };
633
+ fetchOptions?: FetchOptions | undefined;
634
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<void | {
635
+ status: boolean;
636
+ user: {
637
+ id: any;
638
+ email: any;
639
+ name: any;
640
+ image: any;
641
+ emailVerified: any;
642
+ createdAt: any;
643
+ updatedAt: any;
644
+ };
645
+ } | {
646
+ status: boolean;
647
+ user: null;
648
+ }>, {
649
+ code?: string;
650
+ message?: string;
651
+ }, FetchOptions["throw"] extends true ? true : false>>;
652
+ } & {
653
+ sendVerificationEmail: <FetchOptions extends {
654
+ method?: string | undefined;
655
+ headers?: (HeadersInit & (HeadersInit | {
656
+ accept: "application/json" | "text/plain" | "application/octet-stream";
657
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
658
+ authorization: "Bearer" | "Basic";
659
+ })) | undefined;
660
+ cache?: RequestCache | undefined;
661
+ credentials?: RequestCredentials | undefined;
662
+ integrity?: string | undefined;
663
+ keepalive?: boolean | undefined;
664
+ mode?: RequestMode | undefined;
665
+ priority?: RequestPriority | undefined;
666
+ redirect?: RequestRedirect | undefined;
667
+ referrer?: string | undefined;
668
+ referrerPolicy?: ReferrerPolicy | undefined;
669
+ signal?: (AbortSignal | null) | undefined;
670
+ window?: null | undefined;
671
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
672
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
673
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
674
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
675
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
676
+ hookOptions?: {
677
+ cloneResponse?: boolean;
678
+ } | undefined;
679
+ timeout?: number | undefined;
680
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
681
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
682
+ baseURL?: string | undefined;
683
+ throw?: boolean | undefined;
684
+ auth?: ({
685
+ type: "Bearer";
686
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
687
+ } | {
688
+ type: "Basic";
689
+ username: string | (() => string | undefined) | undefined;
690
+ password: string | (() => string | undefined) | undefined;
691
+ } | {
692
+ type: "Custom";
693
+ prefix: string | (() => string | undefined) | undefined;
694
+ value: string | (() => string | undefined) | undefined;
695
+ }) | undefined;
696
+ body?: (Partial<{
697
+ email: string;
698
+ callbackURL?: string | undefined;
699
+ }> & Record<string, any>) | undefined;
700
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
701
+ params?: Record<string, any> | undefined;
702
+ duplex?: "full" | "half" | undefined;
703
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
704
+ retry?: better_auth_client.RetryOptions | undefined;
705
+ retryAttempt?: number | undefined;
706
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
707
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
708
+ disableValidation?: boolean | undefined;
709
+ }>(data_0: better_auth.Prettify<{
710
+ email: string;
711
+ callbackURL?: string | undefined;
712
+ } & {
713
+ fetchOptions?: FetchOptions | undefined;
714
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
715
+ status: boolean;
716
+ }, {
717
+ code?: string;
718
+ message?: string;
719
+ }, FetchOptions["throw"] extends true ? true : false>>;
720
+ } & {
721
+ changeEmail: <FetchOptions extends {
722
+ method?: string | undefined;
723
+ headers?: (HeadersInit & (HeadersInit | {
724
+ accept: "application/json" | "text/plain" | "application/octet-stream";
725
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
726
+ authorization: "Bearer" | "Basic";
727
+ })) | undefined;
728
+ cache?: RequestCache | undefined;
729
+ credentials?: RequestCredentials | undefined;
730
+ integrity?: string | undefined;
731
+ keepalive?: boolean | undefined;
732
+ mode?: RequestMode | undefined;
733
+ priority?: RequestPriority | undefined;
734
+ redirect?: RequestRedirect | undefined;
735
+ referrer?: string | undefined;
736
+ referrerPolicy?: ReferrerPolicy | undefined;
737
+ signal?: (AbortSignal | null) | undefined;
738
+ window?: null | undefined;
739
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
740
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
741
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
742
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
743
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
744
+ hookOptions?: {
745
+ cloneResponse?: boolean;
746
+ } | undefined;
747
+ timeout?: number | undefined;
748
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
749
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
750
+ baseURL?: string | undefined;
751
+ throw?: boolean | undefined;
752
+ auth?: ({
753
+ type: "Bearer";
754
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
755
+ } | {
756
+ type: "Basic";
757
+ username: string | (() => string | undefined) | undefined;
758
+ password: string | (() => string | undefined) | undefined;
759
+ } | {
760
+ type: "Custom";
761
+ prefix: string | (() => string | undefined) | undefined;
762
+ value: string | (() => string | undefined) | undefined;
763
+ }) | undefined;
764
+ body?: (Partial<{
765
+ newEmail: string;
766
+ callbackURL?: string | undefined;
767
+ }> & Record<string, any>) | undefined;
768
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
769
+ params?: Record<string, any> | undefined;
770
+ duplex?: "full" | "half" | undefined;
771
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
772
+ retry?: better_auth_client.RetryOptions | undefined;
773
+ retryAttempt?: number | undefined;
774
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
775
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
776
+ disableValidation?: boolean | undefined;
777
+ }>(data_0: better_auth.Prettify<{
778
+ newEmail: string;
779
+ callbackURL?: string | undefined;
780
+ } & {
781
+ fetchOptions?: FetchOptions | undefined;
782
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
783
+ status: boolean;
784
+ }, {
785
+ code?: string;
786
+ message?: string;
787
+ }, FetchOptions["throw"] extends true ? true : false>>;
788
+ } & {
789
+ changePassword: <FetchOptions extends {
790
+ method?: string | undefined;
791
+ headers?: (HeadersInit & (HeadersInit | {
792
+ accept: "application/json" | "text/plain" | "application/octet-stream";
793
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
794
+ authorization: "Bearer" | "Basic";
795
+ })) | undefined;
796
+ cache?: RequestCache | undefined;
797
+ credentials?: RequestCredentials | undefined;
798
+ integrity?: string | undefined;
799
+ keepalive?: boolean | undefined;
800
+ mode?: RequestMode | undefined;
801
+ priority?: RequestPriority | undefined;
802
+ redirect?: RequestRedirect | undefined;
803
+ referrer?: string | undefined;
804
+ referrerPolicy?: ReferrerPolicy | undefined;
805
+ signal?: (AbortSignal | null) | undefined;
806
+ window?: null | undefined;
807
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
808
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
809
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
810
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
811
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
812
+ hookOptions?: {
813
+ cloneResponse?: boolean;
814
+ } | undefined;
815
+ timeout?: number | undefined;
816
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
817
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
818
+ baseURL?: string | undefined;
819
+ throw?: boolean | undefined;
820
+ auth?: ({
821
+ type: "Bearer";
822
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
823
+ } | {
824
+ type: "Basic";
825
+ username: string | (() => string | undefined) | undefined;
826
+ password: string | (() => string | undefined) | undefined;
827
+ } | {
828
+ type: "Custom";
829
+ prefix: string | (() => string | undefined) | undefined;
830
+ value: string | (() => string | undefined) | undefined;
831
+ }) | undefined;
832
+ body?: (Partial<{
833
+ newPassword: string;
834
+ currentPassword: string;
835
+ revokeOtherSessions?: boolean | undefined;
836
+ }> & Record<string, any>) | undefined;
837
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
838
+ params?: Record<string, any> | undefined;
839
+ duplex?: "full" | "half" | undefined;
840
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
841
+ retry?: better_auth_client.RetryOptions | undefined;
842
+ retryAttempt?: number | undefined;
843
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
844
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
845
+ disableValidation?: boolean | undefined;
846
+ }>(data_0: better_auth.Prettify<{
847
+ newPassword: string;
848
+ currentPassword: string;
849
+ revokeOtherSessions?: boolean | undefined;
850
+ } & {
851
+ fetchOptions?: FetchOptions | undefined;
852
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
853
+ token: string | null;
854
+ user: {
855
+ id: string;
856
+ email: string;
857
+ name: string;
858
+ image: string | null | undefined;
859
+ emailVerified: boolean;
860
+ createdAt: Date;
861
+ updatedAt: Date;
862
+ };
863
+ }, {
864
+ code?: string;
865
+ message?: string;
866
+ }, FetchOptions["throw"] extends true ? true : false>>;
867
+ } & {
868
+ deleteUser: <FetchOptions extends {
869
+ method?: string | undefined;
870
+ headers?: (HeadersInit & (HeadersInit | {
871
+ accept: "application/json" | "text/plain" | "application/octet-stream";
872
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
873
+ authorization: "Bearer" | "Basic";
874
+ })) | undefined;
875
+ cache?: RequestCache | undefined;
876
+ credentials?: RequestCredentials | undefined;
877
+ integrity?: string | undefined;
878
+ keepalive?: boolean | undefined;
879
+ mode?: RequestMode | undefined;
880
+ priority?: RequestPriority | undefined;
881
+ redirect?: RequestRedirect | undefined;
882
+ referrer?: string | undefined;
883
+ referrerPolicy?: ReferrerPolicy | undefined;
884
+ signal?: (AbortSignal | null) | undefined;
885
+ window?: null | undefined;
886
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
887
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
888
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
889
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
890
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
891
+ hookOptions?: {
892
+ cloneResponse?: boolean;
893
+ } | undefined;
894
+ timeout?: number | undefined;
895
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
896
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
897
+ baseURL?: string | undefined;
898
+ throw?: boolean | undefined;
899
+ auth?: ({
900
+ type: "Bearer";
901
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
902
+ } | {
903
+ type: "Basic";
904
+ username: string | (() => string | undefined) | undefined;
905
+ password: string | (() => string | undefined) | undefined;
906
+ } | {
907
+ type: "Custom";
908
+ prefix: string | (() => string | undefined) | undefined;
909
+ value: string | (() => string | undefined) | undefined;
910
+ }) | undefined;
911
+ body?: (Partial<{
912
+ callbackURL?: string | undefined;
913
+ password?: string | undefined;
914
+ token?: string | undefined;
915
+ }> & Record<string, any>) | undefined;
916
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
917
+ params?: Record<string, any> | undefined;
918
+ duplex?: "full" | "half" | undefined;
919
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
920
+ retry?: better_auth_client.RetryOptions | undefined;
921
+ retryAttempt?: number | undefined;
922
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
923
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
924
+ disableValidation?: boolean | undefined;
925
+ }>(data_0?: better_auth.Prettify<{
926
+ callbackURL?: string | undefined;
927
+ password?: string | undefined;
928
+ token?: string | undefined;
929
+ } & {
930
+ fetchOptions?: FetchOptions | undefined;
931
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
932
+ success: boolean;
933
+ message: string;
934
+ }, {
935
+ code?: string;
936
+ message?: string;
937
+ }, FetchOptions["throw"] extends true ? true : false>>;
938
+ } & {
939
+ resetPassword: {
940
+ ":token": <FetchOptions extends {
941
+ method?: string | undefined;
942
+ headers?: (HeadersInit & (HeadersInit | {
943
+ accept: "application/json" | "text/plain" | "application/octet-stream";
944
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
945
+ authorization: "Bearer" | "Basic";
946
+ })) | undefined;
947
+ cache?: RequestCache | undefined;
948
+ credentials?: RequestCredentials | undefined;
949
+ integrity?: string | undefined;
950
+ keepalive?: boolean | undefined;
951
+ mode?: RequestMode | undefined;
952
+ priority?: RequestPriority | undefined;
953
+ redirect?: RequestRedirect | undefined;
954
+ referrer?: string | undefined;
955
+ referrerPolicy?: ReferrerPolicy | undefined;
956
+ signal?: (AbortSignal | null) | undefined;
957
+ window?: null | undefined;
958
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
959
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
960
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
961
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
962
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
963
+ hookOptions?: {
964
+ cloneResponse?: boolean;
965
+ } | undefined;
966
+ timeout?: number | undefined;
967
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
968
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
969
+ baseURL?: string | undefined;
970
+ throw?: boolean | undefined;
971
+ auth?: ({
972
+ type: "Bearer";
973
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
974
+ } | {
975
+ type: "Basic";
976
+ username: string | (() => string | undefined) | undefined;
977
+ password: string | (() => string | undefined) | undefined;
978
+ } | {
979
+ type: "Custom";
980
+ prefix: string | (() => string | undefined) | undefined;
981
+ value: string | (() => string | undefined) | undefined;
982
+ }) | undefined;
983
+ body?: undefined;
984
+ query?: (Partial<{
985
+ callbackURL: string;
986
+ }> & Record<string, any>) | undefined;
987
+ params?: {
988
+ token: string;
989
+ } | undefined;
990
+ duplex?: "full" | "half" | undefined;
991
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
992
+ retry?: better_auth_client.RetryOptions | undefined;
993
+ retryAttempt?: number | undefined;
994
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
995
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
996
+ disableValidation?: boolean | undefined;
997
+ }>(data_0: better_auth.Prettify<{
998
+ query: {
999
+ callbackURL: string;
1000
+ };
1001
+ fetchOptions?: FetchOptions | undefined;
1002
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<never, {
1003
+ code?: string;
1004
+ message?: string;
1005
+ }, FetchOptions["throw"] extends true ? true : false>>;
1006
+ };
1007
+ } & {
1008
+ requestPasswordReset: <FetchOptions extends {
1009
+ method?: string | undefined;
1010
+ headers?: (HeadersInit & (HeadersInit | {
1011
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1012
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1013
+ authorization: "Bearer" | "Basic";
1014
+ })) | undefined;
1015
+ cache?: RequestCache | undefined;
1016
+ credentials?: RequestCredentials | undefined;
1017
+ integrity?: string | undefined;
1018
+ keepalive?: boolean | undefined;
1019
+ mode?: RequestMode | undefined;
1020
+ priority?: RequestPriority | undefined;
1021
+ redirect?: RequestRedirect | undefined;
1022
+ referrer?: string | undefined;
1023
+ referrerPolicy?: ReferrerPolicy | undefined;
1024
+ signal?: (AbortSignal | null) | undefined;
1025
+ window?: null | undefined;
1026
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1027
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1028
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1029
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1030
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1031
+ hookOptions?: {
1032
+ cloneResponse?: boolean;
1033
+ } | undefined;
1034
+ timeout?: number | undefined;
1035
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1036
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1037
+ baseURL?: string | undefined;
1038
+ throw?: boolean | undefined;
1039
+ auth?: ({
1040
+ type: "Bearer";
1041
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1042
+ } | {
1043
+ type: "Basic";
1044
+ username: string | (() => string | undefined) | undefined;
1045
+ password: string | (() => string | undefined) | undefined;
1046
+ } | {
1047
+ type: "Custom";
1048
+ prefix: string | (() => string | undefined) | undefined;
1049
+ value: string | (() => string | undefined) | undefined;
1050
+ }) | undefined;
1051
+ body?: (Partial<{
1052
+ email: string;
1053
+ redirectTo?: string | undefined;
1054
+ }> & Record<string, any>) | undefined;
1055
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1056
+ params?: Record<string, any> | undefined;
1057
+ duplex?: "full" | "half" | undefined;
1058
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1059
+ retry?: better_auth_client.RetryOptions | undefined;
1060
+ retryAttempt?: number | undefined;
1061
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1062
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1063
+ disableValidation?: boolean | undefined;
1064
+ }>(data_0: better_auth.Prettify<{
1065
+ email: string;
1066
+ redirectTo?: string | undefined;
1067
+ } & {
1068
+ fetchOptions?: FetchOptions | undefined;
1069
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1070
+ status: boolean;
1071
+ }, {
1072
+ code?: string;
1073
+ message?: string;
1074
+ }, FetchOptions["throw"] extends true ? true : false>>;
1075
+ } & {
1076
+ resetPassword: {
1077
+ ":token": <FetchOptions extends {
1078
+ method?: string | undefined;
1079
+ headers?: (HeadersInit & (HeadersInit | {
1080
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1081
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1082
+ authorization: "Bearer" | "Basic";
1083
+ })) | undefined;
1084
+ cache?: RequestCache | undefined;
1085
+ credentials?: RequestCredentials | undefined;
1086
+ integrity?: string | undefined;
1087
+ keepalive?: boolean | undefined;
1088
+ mode?: RequestMode | undefined;
1089
+ priority?: RequestPriority | undefined;
1090
+ redirect?: RequestRedirect | undefined;
1091
+ referrer?: string | undefined;
1092
+ referrerPolicy?: ReferrerPolicy | undefined;
1093
+ signal?: (AbortSignal | null) | undefined;
1094
+ window?: null | undefined;
1095
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1096
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1097
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1098
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1099
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1100
+ hookOptions?: {
1101
+ cloneResponse?: boolean;
1102
+ } | undefined;
1103
+ timeout?: number | undefined;
1104
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1105
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1106
+ baseURL?: string | undefined;
1107
+ throw?: boolean | undefined;
1108
+ auth?: ({
1109
+ type: "Bearer";
1110
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1111
+ } | {
1112
+ type: "Basic";
1113
+ username: string | (() => string | undefined) | undefined;
1114
+ password: string | (() => string | undefined) | undefined;
1115
+ } | {
1116
+ type: "Custom";
1117
+ prefix: string | (() => string | undefined) | undefined;
1118
+ value: string | (() => string | undefined) | undefined;
1119
+ }) | undefined;
1120
+ body?: undefined;
1121
+ query?: (Partial<{
1122
+ callbackURL: string;
1123
+ }> & Record<string, any>) | undefined;
1124
+ params?: {
1125
+ token: string;
1126
+ } | undefined;
1127
+ duplex?: "full" | "half" | undefined;
1128
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1129
+ retry?: better_auth_client.RetryOptions | undefined;
1130
+ retryAttempt?: number | undefined;
1131
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1132
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1133
+ disableValidation?: boolean | undefined;
1134
+ }>(data_0: better_auth.Prettify<{
1135
+ query: {
1136
+ callbackURL: string;
1137
+ };
1138
+ fetchOptions?: FetchOptions | undefined;
1139
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<never, {
1140
+ code?: string;
1141
+ message?: string;
1142
+ }, FetchOptions["throw"] extends true ? true : false>>;
1143
+ };
1144
+ } & {
1145
+ revokeSession: <FetchOptions extends {
1146
+ method?: string | undefined;
1147
+ headers?: (HeadersInit & (HeadersInit | {
1148
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1149
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1150
+ authorization: "Bearer" | "Basic";
1151
+ })) | undefined;
1152
+ cache?: RequestCache | undefined;
1153
+ credentials?: RequestCredentials | undefined;
1154
+ integrity?: string | undefined;
1155
+ keepalive?: boolean | undefined;
1156
+ mode?: RequestMode | undefined;
1157
+ priority?: RequestPriority | undefined;
1158
+ redirect?: RequestRedirect | undefined;
1159
+ referrer?: string | undefined;
1160
+ referrerPolicy?: ReferrerPolicy | undefined;
1161
+ signal?: (AbortSignal | null) | undefined;
1162
+ window?: null | undefined;
1163
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1164
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1165
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1166
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1167
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1168
+ hookOptions?: {
1169
+ cloneResponse?: boolean;
1170
+ } | undefined;
1171
+ timeout?: number | undefined;
1172
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1173
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1174
+ baseURL?: string | undefined;
1175
+ throw?: boolean | undefined;
1176
+ auth?: ({
1177
+ type: "Bearer";
1178
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1179
+ } | {
1180
+ type: "Basic";
1181
+ username: string | (() => string | undefined) | undefined;
1182
+ password: string | (() => string | undefined) | undefined;
1183
+ } | {
1184
+ type: "Custom";
1185
+ prefix: string | (() => string | undefined) | undefined;
1186
+ value: string | (() => string | undefined) | undefined;
1187
+ }) | undefined;
1188
+ body?: (Partial<{
1189
+ token: string;
1190
+ }> & Record<string, any>) | undefined;
1191
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1192
+ params?: Record<string, any> | undefined;
1193
+ duplex?: "full" | "half" | undefined;
1194
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1195
+ retry?: better_auth_client.RetryOptions | undefined;
1196
+ retryAttempt?: number | undefined;
1197
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1198
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1199
+ disableValidation?: boolean | undefined;
1200
+ }>(data_0: better_auth.Prettify<{
1201
+ token: string;
1202
+ } & {
1203
+ fetchOptions?: FetchOptions | undefined;
1204
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1205
+ status: boolean;
1206
+ }, {
1207
+ code?: string;
1208
+ message?: string;
1209
+ }, FetchOptions["throw"] extends true ? true : false>>;
1210
+ } & {
1211
+ revokeSessions: <FetchOptions extends {
1212
+ method?: string | undefined;
1213
+ headers?: (HeadersInit & (HeadersInit | {
1214
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1215
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1216
+ authorization: "Bearer" | "Basic";
1217
+ })) | undefined;
1218
+ cache?: RequestCache | undefined;
1219
+ credentials?: RequestCredentials | undefined;
1220
+ integrity?: string | undefined;
1221
+ keepalive?: boolean | undefined;
1222
+ mode?: RequestMode | undefined;
1223
+ priority?: RequestPriority | undefined;
1224
+ redirect?: RequestRedirect | undefined;
1225
+ referrer?: string | undefined;
1226
+ referrerPolicy?: ReferrerPolicy | undefined;
1227
+ signal?: (AbortSignal | null) | undefined;
1228
+ window?: null | undefined;
1229
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1230
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1231
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1232
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1233
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1234
+ hookOptions?: {
1235
+ cloneResponse?: boolean;
1236
+ } | undefined;
1237
+ timeout?: number | undefined;
1238
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1239
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1240
+ baseURL?: string | undefined;
1241
+ throw?: boolean | undefined;
1242
+ auth?: ({
1243
+ type: "Bearer";
1244
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1245
+ } | {
1246
+ type: "Basic";
1247
+ username: string | (() => string | undefined) | undefined;
1248
+ password: string | (() => string | undefined) | undefined;
1249
+ } | {
1250
+ type: "Custom";
1251
+ prefix: string | (() => string | undefined) | undefined;
1252
+ value: string | (() => string | undefined) | undefined;
1253
+ }) | undefined;
1254
+ body?: undefined;
1255
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1256
+ params?: Record<string, any> | undefined;
1257
+ duplex?: "full" | "half" | undefined;
1258
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1259
+ retry?: better_auth_client.RetryOptions | undefined;
1260
+ retryAttempt?: number | undefined;
1261
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1262
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1263
+ disableValidation?: boolean | undefined;
1264
+ }>(data_0?: better_auth.Prettify<{
1265
+ query?: Record<string, any> | undefined;
1266
+ fetchOptions?: FetchOptions | undefined;
1267
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1268
+ status: boolean;
1269
+ }, {
1270
+ code?: string;
1271
+ message?: string;
1272
+ }, FetchOptions["throw"] extends true ? true : false>>;
1273
+ } & {
1274
+ revokeOtherSessions: <FetchOptions extends {
1275
+ method?: string | undefined;
1276
+ headers?: (HeadersInit & (HeadersInit | {
1277
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1278
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1279
+ authorization: "Bearer" | "Basic";
1280
+ })) | undefined;
1281
+ cache?: RequestCache | undefined;
1282
+ credentials?: RequestCredentials | undefined;
1283
+ integrity?: string | undefined;
1284
+ keepalive?: boolean | undefined;
1285
+ mode?: RequestMode | undefined;
1286
+ priority?: RequestPriority | undefined;
1287
+ redirect?: RequestRedirect | undefined;
1288
+ referrer?: string | undefined;
1289
+ referrerPolicy?: ReferrerPolicy | undefined;
1290
+ signal?: (AbortSignal | null) | undefined;
1291
+ window?: null | undefined;
1292
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1293
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1294
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1295
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1296
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1297
+ hookOptions?: {
1298
+ cloneResponse?: boolean;
1299
+ } | undefined;
1300
+ timeout?: number | undefined;
1301
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1302
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1303
+ baseURL?: string | undefined;
1304
+ throw?: boolean | undefined;
1305
+ auth?: ({
1306
+ type: "Bearer";
1307
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1308
+ } | {
1309
+ type: "Basic";
1310
+ username: string | (() => string | undefined) | undefined;
1311
+ password: string | (() => string | undefined) | undefined;
1312
+ } | {
1313
+ type: "Custom";
1314
+ prefix: string | (() => string | undefined) | undefined;
1315
+ value: string | (() => string | undefined) | undefined;
1316
+ }) | undefined;
1317
+ body?: undefined;
1318
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1319
+ params?: Record<string, any> | undefined;
1320
+ duplex?: "full" | "half" | undefined;
1321
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1322
+ retry?: better_auth_client.RetryOptions | undefined;
1323
+ retryAttempt?: number | undefined;
1324
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1325
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1326
+ disableValidation?: boolean | undefined;
1327
+ }>(data_0?: better_auth.Prettify<{
1328
+ query?: Record<string, any> | undefined;
1329
+ fetchOptions?: FetchOptions | undefined;
1330
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1331
+ status: boolean;
1332
+ }, {
1333
+ code?: string;
1334
+ message?: string;
1335
+ }, FetchOptions["throw"] extends true ? true : false>>;
1336
+ } & {
1337
+ linkSocial: <FetchOptions extends {
1338
+ method?: string | undefined;
1339
+ headers?: (HeadersInit & (HeadersInit | {
1340
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1341
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1342
+ authorization: "Bearer" | "Basic";
1343
+ })) | undefined;
1344
+ cache?: RequestCache | undefined;
1345
+ credentials?: RequestCredentials | undefined;
1346
+ integrity?: string | undefined;
1347
+ keepalive?: boolean | undefined;
1348
+ mode?: RequestMode | undefined;
1349
+ priority?: RequestPriority | undefined;
1350
+ redirect?: RequestRedirect | undefined;
1351
+ referrer?: string | undefined;
1352
+ referrerPolicy?: ReferrerPolicy | undefined;
1353
+ signal?: (AbortSignal | null) | undefined;
1354
+ window?: null | undefined;
1355
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1356
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1357
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1358
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1359
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1360
+ hookOptions?: {
1361
+ cloneResponse?: boolean;
1362
+ } | undefined;
1363
+ timeout?: number | undefined;
1364
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1365
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1366
+ baseURL?: string | undefined;
1367
+ throw?: boolean | undefined;
1368
+ auth?: ({
1369
+ type: "Bearer";
1370
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1371
+ } | {
1372
+ type: "Basic";
1373
+ username: string | (() => string | undefined) | undefined;
1374
+ password: string | (() => string | undefined) | undefined;
1375
+ } | {
1376
+ type: "Custom";
1377
+ prefix: string | (() => string | undefined) | undefined;
1378
+ value: string | (() => string | undefined) | undefined;
1379
+ }) | undefined;
1380
+ body?: (Partial<{
1381
+ provider: unknown;
1382
+ callbackURL?: string | undefined;
1383
+ idToken?: {
1384
+ token: string;
1385
+ nonce?: string | undefined;
1386
+ accessToken?: string | undefined;
1387
+ refreshToken?: string | undefined;
1388
+ scopes?: string[] | undefined;
1389
+ } | undefined;
1390
+ requestSignUp?: boolean | undefined;
1391
+ scopes?: string[] | undefined;
1392
+ errorCallbackURL?: string | undefined;
1393
+ disableRedirect?: boolean | undefined;
1394
+ }> & Record<string, any>) | undefined;
1395
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1396
+ params?: Record<string, any> | undefined;
1397
+ duplex?: "full" | "half" | undefined;
1398
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1399
+ retry?: better_auth_client.RetryOptions | undefined;
1400
+ retryAttempt?: number | undefined;
1401
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1402
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1403
+ disableValidation?: boolean | undefined;
1404
+ }>(data_0: better_auth.Prettify<{
1405
+ provider: unknown;
1406
+ callbackURL?: string | undefined;
1407
+ idToken?: {
1408
+ token: string;
1409
+ nonce?: string | undefined;
1410
+ accessToken?: string | undefined;
1411
+ refreshToken?: string | undefined;
1412
+ scopes?: string[] | undefined;
1413
+ } | undefined;
1414
+ requestSignUp?: boolean | undefined;
1415
+ scopes?: string[] | undefined;
1416
+ errorCallbackURL?: string | undefined;
1417
+ disableRedirect?: boolean | undefined;
1418
+ } & {
1419
+ fetchOptions?: FetchOptions | undefined;
1420
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1421
+ url: string;
1422
+ redirect: boolean;
1423
+ }, {
1424
+ code?: string;
1425
+ message?: string;
1426
+ }, FetchOptions["throw"] extends true ? true : false>>;
1427
+ } & {
1428
+ listAccounts: <FetchOptions extends {
1429
+ method?: string | undefined;
1430
+ headers?: (HeadersInit & (HeadersInit | {
1431
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1432
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1433
+ authorization: "Bearer" | "Basic";
1434
+ })) | undefined;
1435
+ cache?: RequestCache | undefined;
1436
+ credentials?: RequestCredentials | undefined;
1437
+ integrity?: string | undefined;
1438
+ keepalive?: boolean | undefined;
1439
+ mode?: RequestMode | undefined;
1440
+ priority?: RequestPriority | undefined;
1441
+ redirect?: RequestRedirect | undefined;
1442
+ referrer?: string | undefined;
1443
+ referrerPolicy?: ReferrerPolicy | undefined;
1444
+ signal?: (AbortSignal | null) | undefined;
1445
+ window?: null | undefined;
1446
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1447
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1448
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1449
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1450
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1451
+ hookOptions?: {
1452
+ cloneResponse?: boolean;
1453
+ } | undefined;
1454
+ timeout?: number | undefined;
1455
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1456
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1457
+ baseURL?: string | undefined;
1458
+ throw?: boolean | undefined;
1459
+ auth?: ({
1460
+ type: "Bearer";
1461
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1462
+ } | {
1463
+ type: "Basic";
1464
+ username: string | (() => string | undefined) | undefined;
1465
+ password: string | (() => string | undefined) | undefined;
1466
+ } | {
1467
+ type: "Custom";
1468
+ prefix: string | (() => string | undefined) | undefined;
1469
+ value: string | (() => string | undefined) | undefined;
1470
+ }) | undefined;
1471
+ body?: undefined;
1472
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1473
+ params?: Record<string, any> | undefined;
1474
+ duplex?: "full" | "half" | undefined;
1475
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1476
+ retry?: better_auth_client.RetryOptions | undefined;
1477
+ retryAttempt?: number | undefined;
1478
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1479
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1480
+ disableValidation?: boolean | undefined;
1481
+ }>(data_0?: better_auth.Prettify<{
1482
+ query?: Record<string, any> | undefined;
1483
+ fetchOptions?: FetchOptions | undefined;
1484
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1485
+ id: string;
1486
+ provider: string;
1487
+ createdAt: Date;
1488
+ updatedAt: Date;
1489
+ accountId: string;
1490
+ scopes: string[];
1491
+ }[], {
1492
+ code?: string;
1493
+ message?: string;
1494
+ }, FetchOptions["throw"] extends true ? true : false>>;
1495
+ } & {
1496
+ deleteUser: {
1497
+ callback: <FetchOptions extends {
1498
+ method?: string | undefined;
1499
+ headers?: (HeadersInit & (HeadersInit | {
1500
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1501
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1502
+ authorization: "Bearer" | "Basic";
1503
+ })) | undefined;
1504
+ cache?: RequestCache | undefined;
1505
+ credentials?: RequestCredentials | undefined;
1506
+ integrity?: string | undefined;
1507
+ keepalive?: boolean | undefined;
1508
+ mode?: RequestMode | undefined;
1509
+ priority?: RequestPriority | undefined;
1510
+ redirect?: RequestRedirect | undefined;
1511
+ referrer?: string | undefined;
1512
+ referrerPolicy?: ReferrerPolicy | undefined;
1513
+ signal?: (AbortSignal | null) | undefined;
1514
+ window?: null | undefined;
1515
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1516
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1517
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1518
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1519
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1520
+ hookOptions?: {
1521
+ cloneResponse?: boolean;
1522
+ } | undefined;
1523
+ timeout?: number | undefined;
1524
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1525
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1526
+ baseURL?: string | undefined;
1527
+ throw?: boolean | undefined;
1528
+ auth?: ({
1529
+ type: "Bearer";
1530
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1531
+ } | {
1532
+ type: "Basic";
1533
+ username: string | (() => string | undefined) | undefined;
1534
+ password: string | (() => string | undefined) | undefined;
1535
+ } | {
1536
+ type: "Custom";
1537
+ prefix: string | (() => string | undefined) | undefined;
1538
+ value: string | (() => string | undefined) | undefined;
1539
+ }) | undefined;
1540
+ body?: undefined;
1541
+ query?: (Partial<{
1542
+ token: string;
1543
+ callbackURL?: string | undefined;
1544
+ }> & Record<string, any>) | undefined;
1545
+ params?: Record<string, any> | undefined;
1546
+ duplex?: "full" | "half" | undefined;
1547
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1548
+ retry?: better_auth_client.RetryOptions | undefined;
1549
+ retryAttempt?: number | undefined;
1550
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1551
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1552
+ disableValidation?: boolean | undefined;
1553
+ }>(data_0: better_auth.Prettify<{
1554
+ query: {
1555
+ token: string;
1556
+ callbackURL?: string | undefined;
1557
+ };
1558
+ fetchOptions?: FetchOptions | undefined;
1559
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1560
+ success: boolean;
1561
+ message: string;
1562
+ }, {
1563
+ code?: string;
1564
+ message?: string;
1565
+ }, FetchOptions["throw"] extends true ? true : false>>;
1566
+ };
1567
+ } & {
1568
+ unlinkAccount: <FetchOptions extends {
1569
+ method?: string | undefined;
1570
+ headers?: (HeadersInit & (HeadersInit | {
1571
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1572
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1573
+ authorization: "Bearer" | "Basic";
1574
+ })) | undefined;
1575
+ cache?: RequestCache | undefined;
1576
+ credentials?: RequestCredentials | undefined;
1577
+ integrity?: string | undefined;
1578
+ keepalive?: boolean | undefined;
1579
+ mode?: RequestMode | undefined;
1580
+ priority?: RequestPriority | undefined;
1581
+ redirect?: RequestRedirect | undefined;
1582
+ referrer?: string | undefined;
1583
+ referrerPolicy?: ReferrerPolicy | undefined;
1584
+ signal?: (AbortSignal | null) | undefined;
1585
+ window?: null | undefined;
1586
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1587
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1588
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1589
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1590
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1591
+ hookOptions?: {
1592
+ cloneResponse?: boolean;
1593
+ } | undefined;
1594
+ timeout?: number | undefined;
1595
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1596
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1597
+ baseURL?: string | undefined;
1598
+ throw?: boolean | undefined;
1599
+ auth?: ({
1600
+ type: "Bearer";
1601
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1602
+ } | {
1603
+ type: "Basic";
1604
+ username: string | (() => string | undefined) | undefined;
1605
+ password: string | (() => string | undefined) | undefined;
1606
+ } | {
1607
+ type: "Custom";
1608
+ prefix: string | (() => string | undefined) | undefined;
1609
+ value: string | (() => string | undefined) | undefined;
1610
+ }) | undefined;
1611
+ body?: (Partial<{
1612
+ providerId: string;
1613
+ accountId?: string | undefined;
1614
+ }> & Record<string, any>) | undefined;
1615
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1616
+ params?: Record<string, any> | undefined;
1617
+ duplex?: "full" | "half" | undefined;
1618
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1619
+ retry?: better_auth_client.RetryOptions | undefined;
1620
+ retryAttempt?: number | undefined;
1621
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1622
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1623
+ disableValidation?: boolean | undefined;
1624
+ }>(data_0: better_auth.Prettify<{
1625
+ providerId: string;
1626
+ accountId?: string | undefined;
1627
+ } & {
1628
+ fetchOptions?: FetchOptions | undefined;
1629
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1630
+ status: boolean;
1631
+ }, {
1632
+ code?: string;
1633
+ message?: string;
1634
+ }, FetchOptions["throw"] extends true ? true : false>>;
1635
+ } & {
1636
+ refreshToken: <FetchOptions extends {
1637
+ method?: string | undefined;
1638
+ headers?: (HeadersInit & (HeadersInit | {
1639
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1640
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1641
+ authorization: "Bearer" | "Basic";
1642
+ })) | undefined;
1643
+ cache?: RequestCache | undefined;
1644
+ credentials?: RequestCredentials | undefined;
1645
+ integrity?: string | undefined;
1646
+ keepalive?: boolean | undefined;
1647
+ mode?: RequestMode | undefined;
1648
+ priority?: RequestPriority | undefined;
1649
+ redirect?: RequestRedirect | undefined;
1650
+ referrer?: string | undefined;
1651
+ referrerPolicy?: ReferrerPolicy | undefined;
1652
+ signal?: (AbortSignal | null) | undefined;
1653
+ window?: null | undefined;
1654
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1655
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1656
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1657
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1658
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1659
+ hookOptions?: {
1660
+ cloneResponse?: boolean;
1661
+ } | undefined;
1662
+ timeout?: number | undefined;
1663
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1664
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1665
+ baseURL?: string | undefined;
1666
+ throw?: boolean | undefined;
1667
+ auth?: ({
1668
+ type: "Bearer";
1669
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1670
+ } | {
1671
+ type: "Basic";
1672
+ username: string | (() => string | undefined) | undefined;
1673
+ password: string | (() => string | undefined) | undefined;
1674
+ } | {
1675
+ type: "Custom";
1676
+ prefix: string | (() => string | undefined) | undefined;
1677
+ value: string | (() => string | undefined) | undefined;
1678
+ }) | undefined;
1679
+ body?: (Partial<{
1680
+ providerId: string;
1681
+ accountId?: string | undefined;
1682
+ userId?: string | undefined;
1683
+ }> & Record<string, any>) | undefined;
1684
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1685
+ params?: Record<string, any> | undefined;
1686
+ duplex?: "full" | "half" | undefined;
1687
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1688
+ retry?: better_auth_client.RetryOptions | undefined;
1689
+ retryAttempt?: number | undefined;
1690
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1691
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1692
+ disableValidation?: boolean | undefined;
1693
+ }>(data_0: better_auth.Prettify<{
1694
+ providerId: string;
1695
+ accountId?: string | undefined;
1696
+ userId?: string | undefined;
1697
+ } & {
1698
+ fetchOptions?: FetchOptions | undefined;
1699
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth.OAuth2Tokens, {
1700
+ code?: string;
1701
+ message?: string;
1702
+ }, FetchOptions["throw"] extends true ? true : false>>;
1703
+ } & {
1704
+ getAccessToken: <FetchOptions extends {
1705
+ method?: string | undefined;
1706
+ headers?: (HeadersInit & (HeadersInit | {
1707
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1708
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1709
+ authorization: "Bearer" | "Basic";
1710
+ })) | undefined;
1711
+ cache?: RequestCache | undefined;
1712
+ credentials?: RequestCredentials | undefined;
1713
+ integrity?: string | undefined;
1714
+ keepalive?: boolean | undefined;
1715
+ mode?: RequestMode | undefined;
1716
+ priority?: RequestPriority | undefined;
1717
+ redirect?: RequestRedirect | undefined;
1718
+ referrer?: string | undefined;
1719
+ referrerPolicy?: ReferrerPolicy | undefined;
1720
+ signal?: (AbortSignal | null) | undefined;
1721
+ window?: null | undefined;
1722
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1723
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1724
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1725
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1726
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1727
+ hookOptions?: {
1728
+ cloneResponse?: boolean;
1729
+ } | undefined;
1730
+ timeout?: number | undefined;
1731
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1732
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1733
+ baseURL?: string | undefined;
1734
+ throw?: boolean | undefined;
1735
+ auth?: ({
1736
+ type: "Bearer";
1737
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1738
+ } | {
1739
+ type: "Basic";
1740
+ username: string | (() => string | undefined) | undefined;
1741
+ password: string | (() => string | undefined) | undefined;
1742
+ } | {
1743
+ type: "Custom";
1744
+ prefix: string | (() => string | undefined) | undefined;
1745
+ value: string | (() => string | undefined) | undefined;
1746
+ }) | undefined;
1747
+ body?: (Partial<{
1748
+ providerId: string;
1749
+ accountId?: string | undefined;
1750
+ userId?: string | undefined;
1751
+ }> & Record<string, any>) | undefined;
1752
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1753
+ params?: Record<string, any> | undefined;
1754
+ duplex?: "full" | "half" | undefined;
1755
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1756
+ retry?: better_auth_client.RetryOptions | undefined;
1757
+ retryAttempt?: number | undefined;
1758
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1759
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1760
+ disableValidation?: boolean | undefined;
1761
+ }>(data_0: better_auth.Prettify<{
1762
+ providerId: string;
1763
+ accountId?: string | undefined;
1764
+ userId?: string | undefined;
1765
+ } & {
1766
+ fetchOptions?: FetchOptions | undefined;
1767
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1768
+ accessToken: string;
1769
+ accessTokenExpiresAt: Date | undefined;
1770
+ scopes: string[];
1771
+ idToken: string | undefined;
1772
+ }, {
1773
+ code?: string;
1774
+ message?: string;
1775
+ }, FetchOptions["throw"] extends true ? true : false>>;
1776
+ } & {
1777
+ accountInfo: <FetchOptions extends {
1778
+ method?: string | undefined;
1779
+ headers?: (HeadersInit & (HeadersInit | {
1780
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1781
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1782
+ authorization: "Bearer" | "Basic";
1783
+ })) | undefined;
1784
+ cache?: RequestCache | undefined;
1785
+ credentials?: RequestCredentials | undefined;
1786
+ integrity?: string | undefined;
1787
+ keepalive?: boolean | undefined;
1788
+ mode?: RequestMode | undefined;
1789
+ priority?: RequestPriority | undefined;
1790
+ redirect?: RequestRedirect | undefined;
1791
+ referrer?: string | undefined;
1792
+ referrerPolicy?: ReferrerPolicy | undefined;
1793
+ signal?: (AbortSignal | null) | undefined;
1794
+ window?: null | undefined;
1795
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1796
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1797
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1798
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1799
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1800
+ hookOptions?: {
1801
+ cloneResponse?: boolean;
1802
+ } | undefined;
1803
+ timeout?: number | undefined;
1804
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1805
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1806
+ baseURL?: string | undefined;
1807
+ throw?: boolean | undefined;
1808
+ auth?: ({
1809
+ type: "Bearer";
1810
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1811
+ } | {
1812
+ type: "Basic";
1813
+ username: string | (() => string | undefined) | undefined;
1814
+ password: string | (() => string | undefined) | undefined;
1815
+ } | {
1816
+ type: "Custom";
1817
+ prefix: string | (() => string | undefined) | undefined;
1818
+ value: string | (() => string | undefined) | undefined;
1819
+ }) | undefined;
1820
+ body?: (Partial<{
1821
+ accountId: string;
1822
+ }> & Record<string, any>) | undefined;
1823
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1824
+ params?: Record<string, any> | undefined;
1825
+ duplex?: "full" | "half" | undefined;
1826
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1827
+ retry?: better_auth_client.RetryOptions | undefined;
1828
+ retryAttempt?: number | undefined;
1829
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1830
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1831
+ disableValidation?: boolean | undefined;
1832
+ }>(data_0: better_auth.Prettify<{
1833
+ accountId: string;
1834
+ } & {
1835
+ fetchOptions?: FetchOptions | undefined;
1836
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1837
+ user: {
1838
+ id: string | number;
1839
+ name?: string;
1840
+ email?: string | null;
1841
+ image?: string;
1842
+ emailVerified: boolean;
1843
+ };
1844
+ data: Record<string, any>;
1845
+ }, {
1846
+ code?: string;
1847
+ message?: string;
1848
+ }, FetchOptions["throw"] extends true ? true : false>>;
1849
+ } & {
1850
+ signUp: {
1851
+ email: <FetchOptions extends {
1852
+ method?: string | undefined;
1853
+ headers?: (HeadersInit & (HeadersInit | {
1854
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1855
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1856
+ authorization: "Bearer" | "Basic";
1857
+ })) | undefined;
1858
+ cache?: RequestCache | undefined;
1859
+ credentials?: RequestCredentials | undefined;
1860
+ integrity?: string | undefined;
1861
+ keepalive?: boolean | undefined;
1862
+ mode?: RequestMode | undefined;
1863
+ priority?: RequestPriority | undefined;
1864
+ redirect?: RequestRedirect | undefined;
1865
+ referrer?: string | undefined;
1866
+ referrerPolicy?: ReferrerPolicy | undefined;
1867
+ signal?: (AbortSignal | null) | undefined;
1868
+ window?: null | undefined;
1869
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1870
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1871
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1872
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1873
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1874
+ hookOptions?: {
1875
+ cloneResponse?: boolean;
1876
+ } | undefined;
1877
+ timeout?: number | undefined;
1878
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1879
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1880
+ baseURL?: string | undefined;
1881
+ throw?: boolean | undefined;
1882
+ auth?: ({
1883
+ type: "Bearer";
1884
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1885
+ } | {
1886
+ type: "Basic";
1887
+ username: string | (() => string | undefined) | undefined;
1888
+ password: string | (() => string | undefined) | undefined;
1889
+ } | {
1890
+ type: "Custom";
1891
+ prefix: string | (() => string | undefined) | undefined;
1892
+ value: string | (() => string | undefined) | undefined;
1893
+ }) | undefined;
1894
+ body?: (Partial<{
1895
+ name: string;
1896
+ email: string;
1897
+ password: string;
1898
+ image?: string;
1899
+ callbackURL?: string;
1900
+ rememberMe?: boolean;
1901
+ }> & Record<string, any>) | undefined;
1902
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1903
+ params?: Record<string, any> | undefined;
1904
+ duplex?: "full" | "half" | undefined;
1905
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1906
+ retry?: better_auth_client.RetryOptions | undefined;
1907
+ retryAttempt?: number | undefined;
1908
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1909
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1910
+ disableValidation?: boolean | undefined;
1911
+ }>(data_0: better_auth.Prettify<{
1912
+ email: string;
1913
+ name: string;
1914
+ password: string;
1915
+ image?: string;
1916
+ callbackURL?: string;
1917
+ fetchOptions?: FetchOptions | undefined;
1918
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
1919
+ token: null;
1920
+ user: {
1921
+ id: string;
1922
+ email: string;
1923
+ name: string;
1924
+ image: string | null | undefined;
1925
+ emailVerified: boolean;
1926
+ createdAt: Date;
1927
+ updatedAt: Date;
1928
+ };
1929
+ } | {
1930
+ token: string;
1931
+ user: {
1932
+ id: string;
1933
+ email: string;
1934
+ name: string;
1935
+ image: string | null | undefined;
1936
+ emailVerified: boolean;
1937
+ createdAt: Date;
1938
+ updatedAt: Date;
1939
+ };
1940
+ }>, {
1941
+ code?: string;
1942
+ message?: string;
1943
+ }, FetchOptions["throw"] extends true ? true : false>>;
1944
+ };
1945
+ } & {
1946
+ updateUser: <FetchOptions extends {
1947
+ method?: string | undefined;
1948
+ headers?: (HeadersInit & (HeadersInit | {
1949
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1950
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1951
+ authorization: "Bearer" | "Basic";
1952
+ })) | undefined;
1953
+ cache?: RequestCache | undefined;
1954
+ credentials?: RequestCredentials | undefined;
1955
+ integrity?: string | undefined;
1956
+ keepalive?: boolean | undefined;
1957
+ mode?: RequestMode | undefined;
1958
+ priority?: RequestPriority | undefined;
1959
+ redirect?: RequestRedirect | undefined;
1960
+ referrer?: string | undefined;
1961
+ referrerPolicy?: ReferrerPolicy | undefined;
1962
+ signal?: (AbortSignal | null) | undefined;
1963
+ window?: null | undefined;
1964
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1965
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1966
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1967
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1968
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1969
+ hookOptions?: {
1970
+ cloneResponse?: boolean;
1971
+ } | undefined;
1972
+ timeout?: number | undefined;
1973
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1974
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1975
+ baseURL?: string | undefined;
1976
+ throw?: boolean | undefined;
1977
+ auth?: ({
1978
+ type: "Bearer";
1979
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1980
+ } | {
1981
+ type: "Basic";
1982
+ username: string | (() => string | undefined) | undefined;
1983
+ password: string | (() => string | undefined) | undefined;
1984
+ } | {
1985
+ type: "Custom";
1986
+ prefix: string | (() => string | undefined) | undefined;
1987
+ value: string | (() => string | undefined) | undefined;
1988
+ }) | undefined;
1989
+ body?: (Partial<Partial<{}> & {
1990
+ name?: string;
1991
+ image?: string;
1992
+ }> & Record<string, any>) | undefined;
1993
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1994
+ params?: Record<string, any> | undefined;
1995
+ duplex?: "full" | "half" | undefined;
1996
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1997
+ retry?: better_auth_client.RetryOptions | undefined;
1998
+ retryAttempt?: number | undefined;
1999
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2000
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2001
+ disableValidation?: boolean | undefined;
2002
+ }>(data_0?: better_auth.Prettify<{
2003
+ image?: string | null;
2004
+ name?: string;
2005
+ fetchOptions?: FetchOptions | undefined;
2006
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2007
+ status: boolean;
2008
+ }, {
2009
+ code?: string;
2010
+ message?: string;
2011
+ }, FetchOptions["throw"] extends true ? true : false>>;
2012
+ } & {
2013
+ listSessions: <FetchOptions extends {
2014
+ method?: string | undefined;
2015
+ headers?: (HeadersInit & (HeadersInit | {
2016
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2017
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2018
+ authorization: "Bearer" | "Basic";
2019
+ })) | undefined;
2020
+ cache?: RequestCache | undefined;
2021
+ credentials?: RequestCredentials | undefined;
2022
+ integrity?: string | undefined;
2023
+ keepalive?: boolean | undefined;
2024
+ mode?: RequestMode | undefined;
2025
+ priority?: RequestPriority | undefined;
2026
+ redirect?: RequestRedirect | undefined;
2027
+ referrer?: string | undefined;
2028
+ referrerPolicy?: ReferrerPolicy | undefined;
2029
+ signal?: (AbortSignal | null) | undefined;
2030
+ window?: null | undefined;
2031
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2032
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2033
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2034
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2035
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2036
+ hookOptions?: {
2037
+ cloneResponse?: boolean;
2038
+ } | undefined;
2039
+ timeout?: number | undefined;
2040
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
2041
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
2042
+ baseURL?: string | undefined;
2043
+ throw?: boolean | undefined;
2044
+ auth?: ({
2045
+ type: "Bearer";
2046
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2047
+ } | {
2048
+ type: "Basic";
2049
+ username: string | (() => string | undefined) | undefined;
2050
+ password: string | (() => string | undefined) | undefined;
2051
+ } | {
2052
+ type: "Custom";
2053
+ prefix: string | (() => string | undefined) | undefined;
2054
+ value: string | (() => string | undefined) | undefined;
2055
+ }) | undefined;
2056
+ body?: undefined;
2057
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2058
+ params?: Record<string, any> | undefined;
2059
+ duplex?: "full" | "half" | undefined;
2060
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2061
+ retry?: better_auth_client.RetryOptions | undefined;
2062
+ retryAttempt?: number | undefined;
2063
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2064
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2065
+ disableValidation?: boolean | undefined;
2066
+ }>(data_0?: better_auth.Prettify<{
2067
+ query?: Record<string, any> | undefined;
2068
+ fetchOptions?: FetchOptions | undefined;
2069
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth.Prettify<{
2070
+ id: string;
2071
+ userId: string;
2072
+ expiresAt: Date;
2073
+ createdAt: Date;
2074
+ updatedAt: Date;
2075
+ token: string;
2076
+ ipAddress?: string | null | undefined | undefined;
2077
+ userAgent?: string | null | undefined | undefined;
2078
+ }>[], {
2079
+ code?: string;
2080
+ message?: string;
2081
+ }, FetchOptions["throw"] extends true ? true : false>>;
2082
+ } & {
2083
+ useSession: better_auth_client.Atom<{
2084
+ data: {
2085
+ user: {
2086
+ id: string;
2087
+ email: string;
2088
+ emailVerified: boolean;
2089
+ name: string;
2090
+ createdAt: Date;
2091
+ updatedAt: Date;
2092
+ image?: string | null | undefined;
2093
+ };
2094
+ session: {
2095
+ id: string;
2096
+ userId: string;
2097
+ expiresAt: Date;
2098
+ createdAt: Date;
2099
+ updatedAt: Date;
2100
+ token: string;
2101
+ ipAddress?: string | null | undefined;
2102
+ userAgent?: string | null | undefined;
2103
+ };
2104
+ } | null;
2105
+ error: BetterFetchError | null;
2106
+ isPending: boolean;
2107
+ }>;
2108
+ $fetch: better_auth_client.BetterFetch<{
2109
+ plugins: (better_auth_client.BetterFetchPlugin | {
2110
+ id: string;
2111
+ name: string;
2112
+ hooks: {
2113
+ onSuccess: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2114
+ onError: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2115
+ onRequest: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2116
+ onResponse: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2117
+ };
2118
+ } | {
2119
+ id: string;
2120
+ name: string;
2121
+ hooks: {
2122
+ onSuccess(context: better_auth_client.SuccessContext<any>): void;
2123
+ };
2124
+ })[];
2125
+ cache?: RequestCache | undefined;
2126
+ credentials?: RequestCredentials;
2127
+ headers?: (HeadersInit & (HeadersInit | {
2128
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2129
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2130
+ authorization: "Bearer" | "Basic";
2131
+ })) | undefined;
2132
+ integrity?: string | undefined;
2133
+ keepalive?: boolean | undefined;
2134
+ method: string;
2135
+ mode?: RequestMode | undefined;
2136
+ priority?: RequestPriority | undefined;
2137
+ redirect?: RequestRedirect | undefined;
2138
+ referrer?: string | undefined;
2139
+ referrerPolicy?: ReferrerPolicy | undefined;
2140
+ signal?: (AbortSignal | null) | undefined;
2141
+ window?: null | undefined;
2142
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2143
+ hookOptions?: {
2144
+ cloneResponse?: boolean;
2145
+ } | undefined;
2146
+ timeout?: number | undefined;
2147
+ customFetchImpl: better_auth_client.FetchEsque;
2148
+ baseURL: string;
2149
+ throw?: boolean | undefined;
2150
+ auth?: ({
2151
+ type: "Bearer";
2152
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2153
+ } | {
2154
+ type: "Basic";
2155
+ username: string | (() => string | undefined) | undefined;
2156
+ password: string | (() => string | undefined) | undefined;
2157
+ } | {
2158
+ type: "Custom";
2159
+ prefix: string | (() => string | undefined) | undefined;
2160
+ value: string | (() => string | undefined) | undefined;
2161
+ }) | undefined;
2162
+ body?: any;
2163
+ query?: any;
2164
+ params?: any;
2165
+ duplex?: "full" | "half" | undefined;
2166
+ jsonParser: (text: string) => Promise<any> | any;
2167
+ retry?: better_auth_client.RetryOptions | undefined;
2168
+ retryAttempt?: number | undefined;
2169
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2170
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2171
+ disableValidation?: boolean | undefined;
2172
+ }, unknown, unknown, {}>;
2173
+ $store: {
2174
+ notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
2175
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2176
+ atoms: Record<string, better_auth_client.WritableAtom<any>>;
2177
+ };
2178
+ $Infer: {
2179
+ Session: {
2180
+ user: {
2181
+ id: string;
2182
+ email: string;
2183
+ emailVerified: boolean;
2184
+ name: string;
2185
+ createdAt: Date;
2186
+ updatedAt: Date;
2187
+ image?: string | null | undefined;
2188
+ };
2189
+ session: {
2190
+ id: string;
2191
+ userId: string;
2192
+ expiresAt: Date;
2193
+ createdAt: Date;
2194
+ updatedAt: Date;
2195
+ token: string;
2196
+ ipAddress?: string | null | undefined;
2197
+ userAgent?: string | null | undefined;
2198
+ };
2199
+ };
2200
+ };
2201
+ $ERROR_CODES: {
2202
+ USER_NOT_FOUND: string;
2203
+ FAILED_TO_CREATE_USER: string;
2204
+ FAILED_TO_CREATE_SESSION: string;
2205
+ FAILED_TO_UPDATE_USER: string;
2206
+ FAILED_TO_GET_SESSION: string;
2207
+ INVALID_PASSWORD: string;
2208
+ INVALID_EMAIL: string;
2209
+ INVALID_EMAIL_OR_PASSWORD: string;
2210
+ SOCIAL_ACCOUNT_ALREADY_LINKED: string;
2211
+ PROVIDER_NOT_FOUND: string;
2212
+ INVALID_TOKEN: string;
2213
+ ID_TOKEN_NOT_SUPPORTED: string;
2214
+ FAILED_TO_GET_USER_INFO: string;
2215
+ USER_EMAIL_NOT_FOUND: string;
2216
+ EMAIL_NOT_VERIFIED: string;
2217
+ PASSWORD_TOO_SHORT: string;
2218
+ PASSWORD_TOO_LONG: string;
2219
+ USER_ALREADY_EXISTS: string;
2220
+ EMAIL_CAN_NOT_BE_UPDATED: string;
2221
+ CREDENTIAL_ACCOUNT_NOT_FOUND: string;
2222
+ SESSION_EXPIRED: string;
2223
+ FAILED_TO_UNLINK_LAST_ACCOUNT: string;
2224
+ ACCOUNT_NOT_FOUND: string;
2225
+ USER_ALREADY_HAS_PASSWORD: string;
2226
+ };
2227
+ };
2228
+ /**
2229
+ * Current authenticated session
2230
+ */
2231
+ readonly session: i0.WritableSignal<AuthSession | null>;
2232
+ /**
2233
+ * Whether there is an active session
2234
+ */
2235
+ readonly isLoggedIn: i0.Signal<boolean>;
2236
+ constructor();
2237
+ private session$;
2238
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
2239
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
2240
+ }
2241
+
2242
+ declare class SessionService {
2243
+ private readonly authService;
2244
+ private readonly client;
2245
+ listSessions(): rxjs.Observable<{
2246
+ data: better_auth.Prettify<{
2247
+ id: string;
2248
+ userId: string;
2249
+ expiresAt: Date;
2250
+ createdAt: Date;
2251
+ updatedAt: Date;
2252
+ token: string;
2253
+ ipAddress?: string | null | undefined | undefined;
2254
+ userAgent?: string | null | undefined | undefined;
2255
+ }>[];
2256
+ error: null;
2257
+ } | {
2258
+ data: null;
2259
+ error: {
2260
+ code?: string | undefined;
2261
+ message?: string | undefined;
2262
+ status: number;
2263
+ statusText: string;
2264
+ };
2265
+ }>;
2266
+ revokeSession(sessionToken: string): rxjs.Observable<{
2267
+ data: {
2268
+ status: boolean;
2269
+ };
2270
+ error: null;
2271
+ } | {
2272
+ data: null;
2273
+ error: {
2274
+ code?: string | undefined;
2275
+ message?: string | undefined;
2276
+ status: number;
2277
+ statusText: string;
2278
+ };
2279
+ }>;
2280
+ revokeOtherSessions(): rxjs.Observable<{
2281
+ data: {
2282
+ status: boolean;
2283
+ };
2284
+ error: null;
2285
+ } | {
2286
+ data: null;
2287
+ error: {
2288
+ code?: string | undefined;
2289
+ message?: string | undefined;
2290
+ status: number;
2291
+ statusText: string;
2292
+ };
2293
+ }>;
2294
+ revokeAllSessions(): rxjs.Observable<{
2295
+ data: {
2296
+ status: boolean;
2297
+ };
2298
+ error: null;
2299
+ } | {
2300
+ data: null;
2301
+ error: {
2302
+ code?: string | undefined;
2303
+ message?: string | undefined;
2304
+ status: number;
2305
+ statusText: string;
2306
+ };
2307
+ }>;
2308
+ static ɵfac: i0.ɵɵFactoryDeclaration<SessionService, never>;
2309
+ static ɵprov: i0.ɵɵInjectableDeclaration<SessionService>;
2310
+ }
2311
+
2312
+ declare class SignInService {
2313
+ private readonly authService;
2314
+ private readonly client;
2315
+ signInEmail(data: {
2316
+ email: string;
2317
+ password: string;
2318
+ rememberMe?: boolean;
2319
+ }): rxjs.Observable<{
2320
+ data: {
2321
+ redirect: boolean;
2322
+ token: string;
2323
+ url: string | undefined;
2324
+ user: {
2325
+ id: string;
2326
+ email: string;
2327
+ name: string;
2328
+ image: string | null | undefined;
2329
+ emailVerified: boolean;
2330
+ createdAt: Date;
2331
+ updatedAt: Date;
2332
+ };
2333
+ };
2334
+ error: null;
2335
+ } | {
2336
+ data: null;
2337
+ error: {
2338
+ code?: string | undefined;
2339
+ message?: string | undefined;
2340
+ status: number;
2341
+ statusText: string;
2342
+ };
2343
+ }>;
2344
+ signUpEmail(data: {
2345
+ name: string;
2346
+ email: string;
2347
+ password: string;
2348
+ }): rxjs.Observable<{
2349
+ data: NonNullable<{
2350
+ token: null;
2351
+ user: {
2352
+ id: string;
2353
+ email: string;
2354
+ name: string;
2355
+ image: string | null | undefined;
2356
+ emailVerified: boolean;
2357
+ createdAt: Date;
2358
+ updatedAt: Date;
2359
+ };
2360
+ } | {
2361
+ token: string;
2362
+ user: {
2363
+ id: string;
2364
+ email: string;
2365
+ name: string;
2366
+ image: string | null | undefined;
2367
+ emailVerified: boolean;
2368
+ createdAt: Date;
2369
+ updatedAt: Date;
2370
+ };
2371
+ }>;
2372
+ error: null;
2373
+ } | {
2374
+ data: null;
2375
+ error: {
2376
+ code?: string | undefined;
2377
+ message?: string | undefined;
2378
+ status: number;
2379
+ statusText: string;
2380
+ };
2381
+ }>;
2382
+ signInProvider(provider: Provider): rxjs.Observable<{
2383
+ data: NonNullable<{
2384
+ redirect: boolean;
2385
+ token: string;
2386
+ url: undefined;
2387
+ user: {
2388
+ id: string;
2389
+ email: string;
2390
+ name: string;
2391
+ image: string | null | undefined;
2392
+ emailVerified: boolean;
2393
+ createdAt: Date;
2394
+ updatedAt: Date;
2395
+ };
2396
+ } | {
2397
+ url: string;
2398
+ redirect: boolean;
2399
+ }>;
2400
+ error: null;
2401
+ } | {
2402
+ data: null;
2403
+ error: {
2404
+ code?: string | undefined;
2405
+ message?: string | undefined;
2406
+ status: number;
2407
+ statusText: string;
2408
+ };
2409
+ }>;
2410
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignInService, never>;
2411
+ static ɵprov: i0.ɵɵInjectableDeclaration<SignInService>;
2412
+ }
2413
+
80
2414
  /**
81
2415
  * Redirects unauthorized users to the specified commands (route).
82
2416
  */
@@ -95,5 +2429,5 @@ declare function canActivate(pipe: () => boolean | _angular_router.UrlTree): {
95
2429
  canActivate: [CanActivateFn];
96
2430
  };
97
2431
 
98
- export { AdminService, BETTER_AUTH_CONFIG_TOKEN, OrganizationService, canActivate, hasRole, provideBetterAuth, redirectLoggedInTo, redirectUnauthorizedTo };
99
- export type { AuthSession };
2432
+ export { AdminService, AuthService, BETTER_AUTH_CONFIG_TOKEN, OrganizationService, SessionService, SignInService, canActivate, hasRole, provideBetterAuth, redirectLoggedInTo, redirectUnauthorizedTo };
2433
+ export type { AuthSession, Provider };