ngx-better-auth 0.7.0 → 0.7.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,10 +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 { SocialProviderList } from 'better-auth/social-providers';
5
6
  import * as rxjs from 'rxjs';
6
7
  import { Observable } from 'rxjs';
7
8
  import * as ngx_better_auth from 'ngx-better-auth';
9
+ import * as better_auth_client from 'better-auth/client';
8
10
  import { UrlTree, CanActivateFn } from '@angular/router';
9
11
 
10
12
  declare const BETTER_AUTH_CONFIG_TOKEN: InjectionToken<BetterAuthOptions>;
@@ -21,8 +23,6 @@ interface Session2 extends Session {
21
23
  impersonatedBy?: string;
22
24
  ipAddress?: string | null;
23
25
  userAgent?: string | null;
24
- }
25
- interface Session3 extends Session2 {
26
26
  updatedAt: Date;
27
27
  }
28
28
 
@@ -123,7 +123,7 @@ declare class AuthService {
123
123
  */
124
124
  readonly session: i0.WritableSignal<{
125
125
  user: User;
126
- session: Session3;
126
+ session: Session2;
127
127
  } | null>;
128
128
  /**
129
129
  * Whether there is an active session
@@ -135,7 +135,7 @@ declare class AuthService {
135
135
  */
136
136
  readonly sessionState$: Observable<{
137
137
  user: User;
138
- session: Session3;
138
+ session: Session2;
139
139
  } | null>;
140
140
  constructor();
141
141
  /**
@@ -151,7 +151,7 @@ declare class AuthService {
151
151
  rememberMe?: boolean;
152
152
  }): Observable<{
153
153
  user: User;
154
- session: Session3;
154
+ session: Session2;
155
155
  }>;
156
156
  /**
157
157
  * Sign up a new user using email and password.
@@ -167,11 +167,11 @@ declare class AuthService {
167
167
  displayUsername?: string;
168
168
  }): Observable<{
169
169
  user: User;
170
- session: Session3;
170
+ session: Session2;
171
171
  }>;
172
172
  signInProvider(provider: Provider): Observable<{
173
173
  user: User;
174
- session: Session3;
174
+ session: Session2;
175
175
  }>;
176
176
  signOut(): Observable<null>;
177
177
  sendVerificationEmail(data: {
@@ -319,7 +319,7 @@ declare class TwoFactorService {
319
319
  trustDevice?: boolean;
320
320
  }): Observable<{
321
321
  user: User;
322
- session: Session3;
322
+ session: Session2;
323
323
  }>;
324
324
  static ɵfac: i0.ɵɵFactoryDeclaration<TwoFactorService, never>;
325
325
  static ɵprov: i0.ɵɵInjectableDeclaration<TwoFactorService>;
@@ -371,7 +371,7 @@ declare class GenericOauthService {
371
371
  requestSignUp?: boolean;
372
372
  }): rxjs.Observable<{
373
373
  user: ngx_better_auth.User;
374
- session: ngx_better_auth.Session3;
374
+ session: ngx_better_auth.Session2;
375
375
  }>;
376
376
  link(data: {
377
377
  providerId: string;
@@ -391,7 +391,7 @@ declare class EmailOtpService {
391
391
  otp: string;
392
392
  }): rxjs.Observable<{
393
393
  user: ngx_better_auth.User;
394
- session: ngx_better_auth.Session3;
394
+ session: ngx_better_auth.Session2;
395
395
  }>;
396
396
  sendVerificationOtp(data: {
397
397
  email: string;
@@ -449,6 +449,2176 @@ declare class MagicLinkService {
449
449
  static ɵprov: i0.ɵɵInjectableDeclaration<MagicLinkService>;
450
450
  }
451
451
 
452
+ declare class UsernameService {
453
+ private readonly mainService;
454
+ private readonly authService;
455
+ username: {
456
+ signIn: {
457
+ social: <FetchOptions extends {
458
+ method?: string | undefined;
459
+ headers?: (HeadersInit & (HeadersInit | {
460
+ accept: "application/json" | "text/plain" | "application/octet-stream";
461
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
462
+ authorization: "Bearer" | "Basic";
463
+ })) | undefined;
464
+ cache?: RequestCache | undefined;
465
+ credentials?: RequestCredentials | undefined;
466
+ integrity?: string | undefined;
467
+ keepalive?: boolean | undefined;
468
+ mode?: RequestMode | undefined;
469
+ priority?: RequestPriority | undefined;
470
+ redirect?: RequestRedirect | undefined;
471
+ referrer?: string | undefined;
472
+ referrerPolicy?: ReferrerPolicy | undefined;
473
+ signal?: (AbortSignal | null) | undefined;
474
+ window?: null | undefined;
475
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
476
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
477
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
478
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
479
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
480
+ hookOptions?: {
481
+ cloneResponse?: boolean;
482
+ } | undefined;
483
+ timeout?: number | undefined;
484
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
485
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
486
+ baseURL?: string | undefined;
487
+ throw?: boolean | undefined;
488
+ auth?: ({
489
+ type: "Bearer";
490
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
491
+ } | {
492
+ type: "Basic";
493
+ username: string | (() => string | undefined) | undefined;
494
+ password: string | (() => string | undefined) | undefined;
495
+ } | {
496
+ type: "Custom";
497
+ prefix: string | (() => string | undefined) | undefined;
498
+ value: string | (() => string | undefined) | undefined;
499
+ }) | undefined;
500
+ body?: (Partial<{
501
+ provider: unknown;
502
+ callbackURL?: string | undefined;
503
+ newUserCallbackURL?: string | undefined;
504
+ errorCallbackURL?: string | undefined;
505
+ disableRedirect?: boolean | undefined;
506
+ idToken?: {
507
+ token: string;
508
+ nonce?: string | undefined;
509
+ accessToken?: string | undefined;
510
+ refreshToken?: string | undefined;
511
+ expiresAt?: number | undefined;
512
+ } | undefined;
513
+ scopes?: string[] | undefined;
514
+ requestSignUp?: boolean | undefined;
515
+ loginHint?: string | undefined;
516
+ }> & Record<string, any>) | undefined;
517
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
518
+ params?: Record<string, any> | undefined;
519
+ duplex?: "full" | "half" | undefined;
520
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
521
+ retry?: better_auth_client.RetryOptions | undefined;
522
+ retryAttempt?: number | undefined;
523
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
524
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
525
+ disableValidation?: boolean | undefined;
526
+ }>(data_0: better_auth.Prettify<{
527
+ provider: unknown;
528
+ callbackURL?: string | undefined;
529
+ newUserCallbackURL?: string | undefined;
530
+ errorCallbackURL?: string | undefined;
531
+ disableRedirect?: boolean | undefined;
532
+ idToken?: {
533
+ token: string;
534
+ nonce?: string | undefined;
535
+ accessToken?: string | undefined;
536
+ refreshToken?: string | undefined;
537
+ expiresAt?: number | undefined;
538
+ } | undefined;
539
+ scopes?: string[] | undefined;
540
+ requestSignUp?: boolean | undefined;
541
+ loginHint?: string | undefined;
542
+ } & {
543
+ fetchOptions?: FetchOptions | undefined;
544
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
545
+ redirect: boolean;
546
+ token: string;
547
+ url: undefined;
548
+ user: {
549
+ id: string;
550
+ email: string;
551
+ name: string;
552
+ image: string | null | undefined;
553
+ emailVerified: boolean;
554
+ createdAt: Date;
555
+ updatedAt: Date;
556
+ };
557
+ } | {
558
+ url: string;
559
+ redirect: boolean;
560
+ }>, {
561
+ code?: string;
562
+ message?: string;
563
+ }, FetchOptions["throw"] extends true ? true : false>>;
564
+ };
565
+ } & {
566
+ getSession: <FetchOptions extends {
567
+ method?: string | undefined;
568
+ headers?: (HeadersInit & (HeadersInit | {
569
+ accept: "application/json" | "text/plain" | "application/octet-stream";
570
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
571
+ authorization: "Bearer" | "Basic";
572
+ })) | undefined;
573
+ cache?: RequestCache | undefined;
574
+ credentials?: RequestCredentials | undefined;
575
+ integrity?: string | undefined;
576
+ keepalive?: boolean | undefined;
577
+ mode?: RequestMode | undefined;
578
+ priority?: RequestPriority | undefined;
579
+ redirect?: RequestRedirect | undefined;
580
+ referrer?: string | undefined;
581
+ referrerPolicy?: ReferrerPolicy | undefined;
582
+ signal?: (AbortSignal | null) | undefined;
583
+ window?: null | undefined;
584
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
585
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
586
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
587
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
588
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
589
+ hookOptions?: {
590
+ cloneResponse?: boolean;
591
+ } | undefined;
592
+ timeout?: number | undefined;
593
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
594
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
595
+ baseURL?: string | undefined;
596
+ throw?: boolean | undefined;
597
+ auth?: ({
598
+ type: "Bearer";
599
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
600
+ } | {
601
+ type: "Basic";
602
+ username: string | (() => string | undefined) | undefined;
603
+ password: string | (() => string | undefined) | undefined;
604
+ } | {
605
+ type: "Custom";
606
+ prefix: string | (() => string | undefined) | undefined;
607
+ value: string | (() => string | undefined) | undefined;
608
+ }) | undefined;
609
+ body?: undefined;
610
+ query?: (Partial<{
611
+ disableCookieCache?: unknown;
612
+ disableRefresh?: unknown;
613
+ }> & Record<string, any>) | undefined;
614
+ params?: Record<string, any> | undefined;
615
+ duplex?: "full" | "half" | undefined;
616
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
617
+ retry?: better_auth_client.RetryOptions | undefined;
618
+ retryAttempt?: number | undefined;
619
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
620
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
621
+ disableValidation?: boolean | undefined;
622
+ }>(data_0?: better_auth.Prettify<{
623
+ query?: {
624
+ disableCookieCache?: unknown;
625
+ disableRefresh?: unknown;
626
+ } | undefined;
627
+ fetchOptions?: FetchOptions | undefined;
628
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
629
+ user: {
630
+ id: string;
631
+ email: string;
632
+ emailVerified: boolean;
633
+ name: string;
634
+ createdAt: Date;
635
+ updatedAt: Date;
636
+ image?: string | null | undefined;
637
+ };
638
+ session: {
639
+ id: string;
640
+ userId: string;
641
+ expiresAt: Date;
642
+ createdAt: Date;
643
+ updatedAt: Date;
644
+ token: string;
645
+ ipAddress?: string | null | undefined;
646
+ userAgent?: string | null | undefined;
647
+ };
648
+ } | null, {
649
+ code?: string;
650
+ message?: string;
651
+ }, FetchOptions["throw"] extends true ? true : false>>;
652
+ } & {
653
+ signOut: <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?: undefined;
697
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
698
+ params?: Record<string, any> | undefined;
699
+ duplex?: "full" | "half" | undefined;
700
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
701
+ retry?: better_auth_client.RetryOptions | undefined;
702
+ retryAttempt?: number | undefined;
703
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
704
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
705
+ disableValidation?: boolean | undefined;
706
+ }>(data_0?: better_auth.Prettify<{
707
+ query?: Record<string, any> | undefined;
708
+ fetchOptions?: FetchOptions | undefined;
709
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
710
+ success: boolean;
711
+ }, {
712
+ code?: string;
713
+ message?: string;
714
+ }, FetchOptions["throw"] extends true ? true : false>>;
715
+ } & {
716
+ signIn: {
717
+ email: <FetchOptions extends {
718
+ method?: string | undefined;
719
+ headers?: (HeadersInit & (HeadersInit | {
720
+ accept: "application/json" | "text/plain" | "application/octet-stream";
721
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
722
+ authorization: "Bearer" | "Basic";
723
+ })) | undefined;
724
+ cache?: RequestCache | undefined;
725
+ credentials?: RequestCredentials | undefined;
726
+ integrity?: string | undefined;
727
+ keepalive?: boolean | undefined;
728
+ mode?: RequestMode | undefined;
729
+ priority?: RequestPriority | undefined;
730
+ redirect?: RequestRedirect | undefined;
731
+ referrer?: string | undefined;
732
+ referrerPolicy?: ReferrerPolicy | undefined;
733
+ signal?: (AbortSignal | null) | undefined;
734
+ window?: null | undefined;
735
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
736
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
737
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
738
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
739
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
740
+ hookOptions?: {
741
+ cloneResponse?: boolean;
742
+ } | undefined;
743
+ timeout?: number | undefined;
744
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
745
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
746
+ baseURL?: string | undefined;
747
+ throw?: boolean | undefined;
748
+ auth?: ({
749
+ type: "Bearer";
750
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
751
+ } | {
752
+ type: "Basic";
753
+ username: string | (() => string | undefined) | undefined;
754
+ password: string | (() => string | undefined) | undefined;
755
+ } | {
756
+ type: "Custom";
757
+ prefix: string | (() => string | undefined) | undefined;
758
+ value: string | (() => string | undefined) | undefined;
759
+ }) | undefined;
760
+ body?: (Partial<{
761
+ email: string;
762
+ password: string;
763
+ callbackURL?: string | undefined;
764
+ rememberMe?: boolean | undefined;
765
+ }> & Record<string, any>) | undefined;
766
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
767
+ params?: Record<string, any> | undefined;
768
+ duplex?: "full" | "half" | undefined;
769
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
770
+ retry?: better_auth_client.RetryOptions | undefined;
771
+ retryAttempt?: number | undefined;
772
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
773
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
774
+ disableValidation?: boolean | undefined;
775
+ }>(data_0: better_auth.Prettify<{
776
+ email: string;
777
+ password: string;
778
+ callbackURL?: string | undefined;
779
+ rememberMe?: boolean | undefined;
780
+ } & {
781
+ fetchOptions?: FetchOptions | undefined;
782
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
783
+ redirect: boolean;
784
+ token: string;
785
+ url: string | undefined;
786
+ user: {
787
+ id: string;
788
+ email: string;
789
+ name: string;
790
+ image: string | null | undefined;
791
+ emailVerified: boolean;
792
+ createdAt: Date;
793
+ updatedAt: Date;
794
+ };
795
+ }, {
796
+ code?: string;
797
+ message?: string;
798
+ }, FetchOptions["throw"] extends true ? true : false>>;
799
+ };
800
+ } & {
801
+ forgetPassword: <FetchOptions extends {
802
+ method?: string | undefined;
803
+ headers?: (HeadersInit & (HeadersInit | {
804
+ accept: "application/json" | "text/plain" | "application/octet-stream";
805
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
806
+ authorization: "Bearer" | "Basic";
807
+ })) | undefined;
808
+ cache?: RequestCache | undefined;
809
+ credentials?: RequestCredentials | undefined;
810
+ integrity?: string | undefined;
811
+ keepalive?: boolean | undefined;
812
+ mode?: RequestMode | undefined;
813
+ priority?: RequestPriority | undefined;
814
+ redirect?: RequestRedirect | undefined;
815
+ referrer?: string | undefined;
816
+ referrerPolicy?: ReferrerPolicy | undefined;
817
+ signal?: (AbortSignal | null) | undefined;
818
+ window?: null | undefined;
819
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
820
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
821
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
822
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
823
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
824
+ hookOptions?: {
825
+ cloneResponse?: boolean;
826
+ } | undefined;
827
+ timeout?: number | undefined;
828
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
829
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
830
+ baseURL?: string | undefined;
831
+ throw?: boolean | undefined;
832
+ auth?: ({
833
+ type: "Bearer";
834
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
835
+ } | {
836
+ type: "Basic";
837
+ username: string | (() => string | undefined) | undefined;
838
+ password: string | (() => string | undefined) | undefined;
839
+ } | {
840
+ type: "Custom";
841
+ prefix: string | (() => string | undefined) | undefined;
842
+ value: string | (() => string | undefined) | undefined;
843
+ }) | undefined;
844
+ body?: (Partial<{
845
+ email: string;
846
+ redirectTo?: string | undefined;
847
+ }> & Record<string, any>) | undefined;
848
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
849
+ params?: Record<string, any> | undefined;
850
+ duplex?: "full" | "half" | undefined;
851
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
852
+ retry?: better_auth_client.RetryOptions | undefined;
853
+ retryAttempt?: number | undefined;
854
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
855
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
856
+ disableValidation?: boolean | undefined;
857
+ }>(data_0: better_auth.Prettify<{
858
+ email: string;
859
+ redirectTo?: string | undefined;
860
+ } & {
861
+ fetchOptions?: FetchOptions | undefined;
862
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
863
+ status: boolean;
864
+ }, {
865
+ code?: string;
866
+ message?: string;
867
+ }, FetchOptions["throw"] extends true ? true : false>>;
868
+ } & {
869
+ resetPassword: <FetchOptions extends {
870
+ method?: string | undefined;
871
+ headers?: (HeadersInit & (HeadersInit | {
872
+ accept: "application/json" | "text/plain" | "application/octet-stream";
873
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
874
+ authorization: "Bearer" | "Basic";
875
+ })) | undefined;
876
+ cache?: RequestCache | undefined;
877
+ credentials?: RequestCredentials | undefined;
878
+ integrity?: string | undefined;
879
+ keepalive?: boolean | undefined;
880
+ mode?: RequestMode | undefined;
881
+ priority?: RequestPriority | undefined;
882
+ redirect?: RequestRedirect | undefined;
883
+ referrer?: string | undefined;
884
+ referrerPolicy?: ReferrerPolicy | undefined;
885
+ signal?: (AbortSignal | null) | undefined;
886
+ window?: null | undefined;
887
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
888
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
889
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
890
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
891
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
892
+ hookOptions?: {
893
+ cloneResponse?: boolean;
894
+ } | undefined;
895
+ timeout?: number | undefined;
896
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
897
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
898
+ baseURL?: string | undefined;
899
+ throw?: boolean | undefined;
900
+ auth?: ({
901
+ type: "Bearer";
902
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
903
+ } | {
904
+ type: "Basic";
905
+ username: string | (() => string | undefined) | undefined;
906
+ password: string | (() => string | undefined) | undefined;
907
+ } | {
908
+ type: "Custom";
909
+ prefix: string | (() => string | undefined) | undefined;
910
+ value: string | (() => string | undefined) | undefined;
911
+ }) | undefined;
912
+ body?: (Partial<{
913
+ newPassword: string;
914
+ token?: string | undefined;
915
+ }> & Record<string, any>) | undefined;
916
+ query?: (Partial<{
917
+ token?: string | undefined;
918
+ }> & Record<string, any>) | undefined;
919
+ params?: Record<string, any> | undefined;
920
+ duplex?: "full" | "half" | undefined;
921
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
922
+ retry?: better_auth_client.RetryOptions | undefined;
923
+ retryAttempt?: number | undefined;
924
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
925
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
926
+ disableValidation?: boolean | undefined;
927
+ }>(data_0: better_auth.Prettify<{
928
+ newPassword: string;
929
+ token?: string | undefined;
930
+ } & {
931
+ fetchOptions?: FetchOptions | undefined;
932
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
933
+ status: boolean;
934
+ }, {
935
+ code?: string;
936
+ message?: string;
937
+ }, FetchOptions["throw"] extends true ? true : false>>;
938
+ } & {
939
+ verifyEmail: <FetchOptions extends {
940
+ method?: string | undefined;
941
+ headers?: (HeadersInit & (HeadersInit | {
942
+ accept: "application/json" | "text/plain" | "application/octet-stream";
943
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
944
+ authorization: "Bearer" | "Basic";
945
+ })) | undefined;
946
+ cache?: RequestCache | undefined;
947
+ credentials?: RequestCredentials | undefined;
948
+ integrity?: string | undefined;
949
+ keepalive?: boolean | undefined;
950
+ mode?: RequestMode | undefined;
951
+ priority?: RequestPriority | undefined;
952
+ redirect?: RequestRedirect | undefined;
953
+ referrer?: string | undefined;
954
+ referrerPolicy?: ReferrerPolicy | undefined;
955
+ signal?: (AbortSignal | null) | undefined;
956
+ window?: null | undefined;
957
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
958
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
959
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
960
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
961
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
962
+ hookOptions?: {
963
+ cloneResponse?: boolean;
964
+ } | undefined;
965
+ timeout?: number | undefined;
966
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
967
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
968
+ baseURL?: string | undefined;
969
+ throw?: boolean | undefined;
970
+ auth?: ({
971
+ type: "Bearer";
972
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
973
+ } | {
974
+ type: "Basic";
975
+ username: string | (() => string | undefined) | undefined;
976
+ password: string | (() => string | undefined) | undefined;
977
+ } | {
978
+ type: "Custom";
979
+ prefix: string | (() => string | undefined) | undefined;
980
+ value: string | (() => string | undefined) | undefined;
981
+ }) | undefined;
982
+ body?: undefined;
983
+ query?: (Partial<{
984
+ token: string;
985
+ callbackURL?: string | undefined;
986
+ }> & Record<string, any>) | undefined;
987
+ params?: Record<string, any> | undefined;
988
+ duplex?: "full" | "half" | undefined;
989
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
990
+ retry?: better_auth_client.RetryOptions | undefined;
991
+ retryAttempt?: number | undefined;
992
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
993
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
994
+ disableValidation?: boolean | undefined;
995
+ }>(data_0: better_auth.Prettify<{
996
+ query: {
997
+ token: string;
998
+ callbackURL?: string | undefined;
999
+ };
1000
+ fetchOptions?: FetchOptions | undefined;
1001
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<void | {
1002
+ status: boolean;
1003
+ user: {
1004
+ id: any;
1005
+ email: any;
1006
+ name: any;
1007
+ image: any;
1008
+ emailVerified: any;
1009
+ createdAt: any;
1010
+ updatedAt: any;
1011
+ };
1012
+ } | {
1013
+ status: boolean;
1014
+ user: null;
1015
+ }>, {
1016
+ code?: string;
1017
+ message?: string;
1018
+ }, FetchOptions["throw"] extends true ? true : false>>;
1019
+ } & {
1020
+ sendVerificationEmail: <FetchOptions extends {
1021
+ method?: string | undefined;
1022
+ headers?: (HeadersInit & (HeadersInit | {
1023
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1024
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1025
+ authorization: "Bearer" | "Basic";
1026
+ })) | undefined;
1027
+ cache?: RequestCache | undefined;
1028
+ credentials?: RequestCredentials | undefined;
1029
+ integrity?: string | undefined;
1030
+ keepalive?: boolean | undefined;
1031
+ mode?: RequestMode | undefined;
1032
+ priority?: RequestPriority | undefined;
1033
+ redirect?: RequestRedirect | undefined;
1034
+ referrer?: string | undefined;
1035
+ referrerPolicy?: ReferrerPolicy | undefined;
1036
+ signal?: (AbortSignal | null) | undefined;
1037
+ window?: null | undefined;
1038
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1039
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1040
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1041
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1042
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1043
+ hookOptions?: {
1044
+ cloneResponse?: boolean;
1045
+ } | undefined;
1046
+ timeout?: number | undefined;
1047
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1048
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1049
+ baseURL?: string | undefined;
1050
+ throw?: boolean | undefined;
1051
+ auth?: ({
1052
+ type: "Bearer";
1053
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1054
+ } | {
1055
+ type: "Basic";
1056
+ username: string | (() => string | undefined) | undefined;
1057
+ password: string | (() => string | undefined) | undefined;
1058
+ } | {
1059
+ type: "Custom";
1060
+ prefix: string | (() => string | undefined) | undefined;
1061
+ value: string | (() => string | undefined) | undefined;
1062
+ }) | undefined;
1063
+ body?: (Partial<{
1064
+ email: string;
1065
+ callbackURL?: string | undefined;
1066
+ }> & Record<string, any>) | undefined;
1067
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1068
+ params?: Record<string, any> | undefined;
1069
+ duplex?: "full" | "half" | undefined;
1070
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1071
+ retry?: better_auth_client.RetryOptions | undefined;
1072
+ retryAttempt?: number | undefined;
1073
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1074
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1075
+ disableValidation?: boolean | undefined;
1076
+ }>(data_0: better_auth.Prettify<{
1077
+ email: string;
1078
+ callbackURL?: string | undefined;
1079
+ } & {
1080
+ fetchOptions?: FetchOptions | undefined;
1081
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1082
+ status: boolean;
1083
+ }, {
1084
+ code?: string;
1085
+ message?: string;
1086
+ }, FetchOptions["throw"] extends true ? true : false>>;
1087
+ } & {
1088
+ changeEmail: <FetchOptions extends {
1089
+ method?: string | undefined;
1090
+ headers?: (HeadersInit & (HeadersInit | {
1091
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1092
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1093
+ authorization: "Bearer" | "Basic";
1094
+ })) | undefined;
1095
+ cache?: RequestCache | undefined;
1096
+ credentials?: RequestCredentials | undefined;
1097
+ integrity?: string | undefined;
1098
+ keepalive?: boolean | undefined;
1099
+ mode?: RequestMode | undefined;
1100
+ priority?: RequestPriority | undefined;
1101
+ redirect?: RequestRedirect | undefined;
1102
+ referrer?: string | undefined;
1103
+ referrerPolicy?: ReferrerPolicy | undefined;
1104
+ signal?: (AbortSignal | null) | undefined;
1105
+ window?: null | undefined;
1106
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1107
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1108
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1109
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1110
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1111
+ hookOptions?: {
1112
+ cloneResponse?: boolean;
1113
+ } | undefined;
1114
+ timeout?: number | undefined;
1115
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1116
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1117
+ baseURL?: string | undefined;
1118
+ throw?: boolean | undefined;
1119
+ auth?: ({
1120
+ type: "Bearer";
1121
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1122
+ } | {
1123
+ type: "Basic";
1124
+ username: string | (() => string | undefined) | undefined;
1125
+ password: string | (() => string | undefined) | undefined;
1126
+ } | {
1127
+ type: "Custom";
1128
+ prefix: string | (() => string | undefined) | undefined;
1129
+ value: string | (() => string | undefined) | undefined;
1130
+ }) | undefined;
1131
+ body?: (Partial<{
1132
+ newEmail: string;
1133
+ callbackURL?: string | undefined;
1134
+ }> & Record<string, any>) | undefined;
1135
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1136
+ params?: Record<string, any> | undefined;
1137
+ duplex?: "full" | "half" | undefined;
1138
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1139
+ retry?: better_auth_client.RetryOptions | undefined;
1140
+ retryAttempt?: number | undefined;
1141
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1142
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1143
+ disableValidation?: boolean | undefined;
1144
+ }>(data_0: better_auth.Prettify<{
1145
+ newEmail: string;
1146
+ callbackURL?: string | undefined;
1147
+ } & {
1148
+ fetchOptions?: FetchOptions | undefined;
1149
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1150
+ status: boolean;
1151
+ }, {
1152
+ code?: string;
1153
+ message?: string;
1154
+ }, FetchOptions["throw"] extends true ? true : false>>;
1155
+ } & {
1156
+ changePassword: <FetchOptions extends {
1157
+ method?: string | undefined;
1158
+ headers?: (HeadersInit & (HeadersInit | {
1159
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1160
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1161
+ authorization: "Bearer" | "Basic";
1162
+ })) | undefined;
1163
+ cache?: RequestCache | undefined;
1164
+ credentials?: RequestCredentials | undefined;
1165
+ integrity?: string | undefined;
1166
+ keepalive?: boolean | undefined;
1167
+ mode?: RequestMode | undefined;
1168
+ priority?: RequestPriority | undefined;
1169
+ redirect?: RequestRedirect | undefined;
1170
+ referrer?: string | undefined;
1171
+ referrerPolicy?: ReferrerPolicy | undefined;
1172
+ signal?: (AbortSignal | null) | undefined;
1173
+ window?: null | undefined;
1174
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1175
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1176
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1177
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1178
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1179
+ hookOptions?: {
1180
+ cloneResponse?: boolean;
1181
+ } | undefined;
1182
+ timeout?: number | undefined;
1183
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1184
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1185
+ baseURL?: string | undefined;
1186
+ throw?: boolean | undefined;
1187
+ auth?: ({
1188
+ type: "Bearer";
1189
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1190
+ } | {
1191
+ type: "Basic";
1192
+ username: string | (() => string | undefined) | undefined;
1193
+ password: string | (() => string | undefined) | undefined;
1194
+ } | {
1195
+ type: "Custom";
1196
+ prefix: string | (() => string | undefined) | undefined;
1197
+ value: string | (() => string | undefined) | undefined;
1198
+ }) | undefined;
1199
+ body?: (Partial<{
1200
+ newPassword: string;
1201
+ currentPassword: string;
1202
+ revokeOtherSessions?: boolean | undefined;
1203
+ }> & Record<string, any>) | undefined;
1204
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1205
+ params?: Record<string, any> | undefined;
1206
+ duplex?: "full" | "half" | undefined;
1207
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1208
+ retry?: better_auth_client.RetryOptions | undefined;
1209
+ retryAttempt?: number | undefined;
1210
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1211
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1212
+ disableValidation?: boolean | undefined;
1213
+ }>(data_0: better_auth.Prettify<{
1214
+ newPassword: string;
1215
+ currentPassword: string;
1216
+ revokeOtherSessions?: boolean | undefined;
1217
+ } & {
1218
+ fetchOptions?: FetchOptions | undefined;
1219
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1220
+ token: string | null;
1221
+ user: {
1222
+ id: string;
1223
+ email: string;
1224
+ name: string;
1225
+ image: string | null | undefined;
1226
+ emailVerified: boolean;
1227
+ createdAt: Date;
1228
+ updatedAt: Date;
1229
+ };
1230
+ }, {
1231
+ code?: string;
1232
+ message?: string;
1233
+ }, FetchOptions["throw"] extends true ? true : false>>;
1234
+ } & {
1235
+ deleteUser: <FetchOptions extends {
1236
+ method?: string | undefined;
1237
+ headers?: (HeadersInit & (HeadersInit | {
1238
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1239
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1240
+ authorization: "Bearer" | "Basic";
1241
+ })) | undefined;
1242
+ cache?: RequestCache | undefined;
1243
+ credentials?: RequestCredentials | undefined;
1244
+ integrity?: string | undefined;
1245
+ keepalive?: boolean | undefined;
1246
+ mode?: RequestMode | undefined;
1247
+ priority?: RequestPriority | undefined;
1248
+ redirect?: RequestRedirect | undefined;
1249
+ referrer?: string | undefined;
1250
+ referrerPolicy?: ReferrerPolicy | undefined;
1251
+ signal?: (AbortSignal | null) | undefined;
1252
+ window?: null | undefined;
1253
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1254
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1255
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1256
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1257
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1258
+ hookOptions?: {
1259
+ cloneResponse?: boolean;
1260
+ } | undefined;
1261
+ timeout?: number | undefined;
1262
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1263
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1264
+ baseURL?: string | undefined;
1265
+ throw?: boolean | undefined;
1266
+ auth?: ({
1267
+ type: "Bearer";
1268
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1269
+ } | {
1270
+ type: "Basic";
1271
+ username: string | (() => string | undefined) | undefined;
1272
+ password: string | (() => string | undefined) | undefined;
1273
+ } | {
1274
+ type: "Custom";
1275
+ prefix: string | (() => string | undefined) | undefined;
1276
+ value: string | (() => string | undefined) | undefined;
1277
+ }) | undefined;
1278
+ body?: (Partial<{
1279
+ callbackURL?: string | undefined;
1280
+ password?: string | undefined;
1281
+ token?: string | undefined;
1282
+ }> & Record<string, any>) | undefined;
1283
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1284
+ params?: Record<string, any> | undefined;
1285
+ duplex?: "full" | "half" | undefined;
1286
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1287
+ retry?: better_auth_client.RetryOptions | undefined;
1288
+ retryAttempt?: number | undefined;
1289
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1290
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1291
+ disableValidation?: boolean | undefined;
1292
+ }>(data_0?: better_auth.Prettify<{
1293
+ callbackURL?: string | undefined;
1294
+ password?: string | undefined;
1295
+ token?: string | undefined;
1296
+ } & {
1297
+ fetchOptions?: FetchOptions | undefined;
1298
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1299
+ success: boolean;
1300
+ message: string;
1301
+ }, {
1302
+ code?: string;
1303
+ message?: string;
1304
+ }, FetchOptions["throw"] extends true ? true : false>>;
1305
+ } & {
1306
+ resetPassword: {
1307
+ ":token": <FetchOptions extends {
1308
+ method?: string | undefined;
1309
+ headers?: (HeadersInit & (HeadersInit | {
1310
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1311
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1312
+ authorization: "Bearer" | "Basic";
1313
+ })) | undefined;
1314
+ cache?: RequestCache | undefined;
1315
+ credentials?: RequestCredentials | undefined;
1316
+ integrity?: string | undefined;
1317
+ keepalive?: boolean | undefined;
1318
+ mode?: RequestMode | undefined;
1319
+ priority?: RequestPriority | undefined;
1320
+ redirect?: RequestRedirect | undefined;
1321
+ referrer?: string | undefined;
1322
+ referrerPolicy?: ReferrerPolicy | undefined;
1323
+ signal?: (AbortSignal | null) | undefined;
1324
+ window?: null | undefined;
1325
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1326
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1327
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1328
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1329
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1330
+ hookOptions?: {
1331
+ cloneResponse?: boolean;
1332
+ } | undefined;
1333
+ timeout?: number | undefined;
1334
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1335
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1336
+ baseURL?: string | undefined;
1337
+ throw?: boolean | undefined;
1338
+ auth?: ({
1339
+ type: "Bearer";
1340
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1341
+ } | {
1342
+ type: "Basic";
1343
+ username: string | (() => string | undefined) | undefined;
1344
+ password: string | (() => string | undefined) | undefined;
1345
+ } | {
1346
+ type: "Custom";
1347
+ prefix: string | (() => string | undefined) | undefined;
1348
+ value: string | (() => string | undefined) | undefined;
1349
+ }) | undefined;
1350
+ body?: undefined;
1351
+ query?: (Partial<{
1352
+ callbackURL: string;
1353
+ }> & Record<string, any>) | undefined;
1354
+ params?: {
1355
+ token: string;
1356
+ } | undefined;
1357
+ duplex?: "full" | "half" | undefined;
1358
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1359
+ retry?: better_auth_client.RetryOptions | undefined;
1360
+ retryAttempt?: number | undefined;
1361
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1362
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1363
+ disableValidation?: boolean | undefined;
1364
+ }>(data_0: better_auth.Prettify<{
1365
+ query: {
1366
+ callbackURL: string;
1367
+ };
1368
+ fetchOptions?: FetchOptions | undefined;
1369
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<never, {
1370
+ code?: string;
1371
+ message?: string;
1372
+ }, FetchOptions["throw"] extends true ? true : false>>;
1373
+ };
1374
+ } & {
1375
+ requestPasswordReset: <FetchOptions extends {
1376
+ method?: string | undefined;
1377
+ headers?: (HeadersInit & (HeadersInit | {
1378
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1379
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1380
+ authorization: "Bearer" | "Basic";
1381
+ })) | undefined;
1382
+ cache?: RequestCache | undefined;
1383
+ credentials?: RequestCredentials | undefined;
1384
+ integrity?: string | undefined;
1385
+ keepalive?: boolean | undefined;
1386
+ mode?: RequestMode | undefined;
1387
+ priority?: RequestPriority | undefined;
1388
+ redirect?: RequestRedirect | undefined;
1389
+ referrer?: string | undefined;
1390
+ referrerPolicy?: ReferrerPolicy | undefined;
1391
+ signal?: (AbortSignal | null) | undefined;
1392
+ window?: null | undefined;
1393
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1394
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1395
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1396
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1397
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1398
+ hookOptions?: {
1399
+ cloneResponse?: boolean;
1400
+ } | undefined;
1401
+ timeout?: number | undefined;
1402
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1403
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1404
+ baseURL?: string | undefined;
1405
+ throw?: boolean | undefined;
1406
+ auth?: ({
1407
+ type: "Bearer";
1408
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1409
+ } | {
1410
+ type: "Basic";
1411
+ username: string | (() => string | undefined) | undefined;
1412
+ password: string | (() => string | undefined) | undefined;
1413
+ } | {
1414
+ type: "Custom";
1415
+ prefix: string | (() => string | undefined) | undefined;
1416
+ value: string | (() => string | undefined) | undefined;
1417
+ }) | undefined;
1418
+ body?: (Partial<{
1419
+ email: string;
1420
+ redirectTo?: string | undefined;
1421
+ }> & Record<string, any>) | undefined;
1422
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1423
+ params?: Record<string, any> | undefined;
1424
+ duplex?: "full" | "half" | undefined;
1425
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1426
+ retry?: better_auth_client.RetryOptions | undefined;
1427
+ retryAttempt?: number | undefined;
1428
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1429
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1430
+ disableValidation?: boolean | undefined;
1431
+ }>(data_0: better_auth.Prettify<{
1432
+ email: string;
1433
+ redirectTo?: string | undefined;
1434
+ } & {
1435
+ fetchOptions?: FetchOptions | undefined;
1436
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1437
+ status: boolean;
1438
+ }, {
1439
+ code?: string;
1440
+ message?: string;
1441
+ }, FetchOptions["throw"] extends true ? true : false>>;
1442
+ } & {
1443
+ resetPassword: {
1444
+ ":token": <FetchOptions extends {
1445
+ method?: string | undefined;
1446
+ headers?: (HeadersInit & (HeadersInit | {
1447
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1448
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1449
+ authorization: "Bearer" | "Basic";
1450
+ })) | undefined;
1451
+ cache?: RequestCache | undefined;
1452
+ credentials?: RequestCredentials | undefined;
1453
+ integrity?: string | undefined;
1454
+ keepalive?: boolean | undefined;
1455
+ mode?: RequestMode | undefined;
1456
+ priority?: RequestPriority | undefined;
1457
+ redirect?: RequestRedirect | undefined;
1458
+ referrer?: string | undefined;
1459
+ referrerPolicy?: ReferrerPolicy | undefined;
1460
+ signal?: (AbortSignal | null) | undefined;
1461
+ window?: null | undefined;
1462
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1463
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1464
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1465
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1466
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1467
+ hookOptions?: {
1468
+ cloneResponse?: boolean;
1469
+ } | undefined;
1470
+ timeout?: number | undefined;
1471
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1472
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1473
+ baseURL?: string | undefined;
1474
+ throw?: boolean | undefined;
1475
+ auth?: ({
1476
+ type: "Bearer";
1477
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1478
+ } | {
1479
+ type: "Basic";
1480
+ username: string | (() => string | undefined) | undefined;
1481
+ password: string | (() => string | undefined) | undefined;
1482
+ } | {
1483
+ type: "Custom";
1484
+ prefix: string | (() => string | undefined) | undefined;
1485
+ value: string | (() => string | undefined) | undefined;
1486
+ }) | undefined;
1487
+ body?: undefined;
1488
+ query?: (Partial<{
1489
+ callbackURL: string;
1490
+ }> & Record<string, any>) | undefined;
1491
+ params?: {
1492
+ token: string;
1493
+ } | undefined;
1494
+ duplex?: "full" | "half" | undefined;
1495
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1496
+ retry?: better_auth_client.RetryOptions | undefined;
1497
+ retryAttempt?: number | undefined;
1498
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1499
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1500
+ disableValidation?: boolean | undefined;
1501
+ }>(data_0: better_auth.Prettify<{
1502
+ query: {
1503
+ callbackURL: string;
1504
+ };
1505
+ fetchOptions?: FetchOptions | undefined;
1506
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<never, {
1507
+ code?: string;
1508
+ message?: string;
1509
+ }, FetchOptions["throw"] extends true ? true : false>>;
1510
+ };
1511
+ } & {
1512
+ revokeSession: <FetchOptions extends {
1513
+ method?: string | undefined;
1514
+ headers?: (HeadersInit & (HeadersInit | {
1515
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1516
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1517
+ authorization: "Bearer" | "Basic";
1518
+ })) | undefined;
1519
+ cache?: RequestCache | undefined;
1520
+ credentials?: RequestCredentials | undefined;
1521
+ integrity?: string | undefined;
1522
+ keepalive?: boolean | undefined;
1523
+ mode?: RequestMode | undefined;
1524
+ priority?: RequestPriority | undefined;
1525
+ redirect?: RequestRedirect | undefined;
1526
+ referrer?: string | undefined;
1527
+ referrerPolicy?: ReferrerPolicy | undefined;
1528
+ signal?: (AbortSignal | null) | undefined;
1529
+ window?: null | undefined;
1530
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1531
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1532
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1533
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1534
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1535
+ hookOptions?: {
1536
+ cloneResponse?: boolean;
1537
+ } | undefined;
1538
+ timeout?: number | undefined;
1539
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1540
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1541
+ baseURL?: string | undefined;
1542
+ throw?: boolean | undefined;
1543
+ auth?: ({
1544
+ type: "Bearer";
1545
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1546
+ } | {
1547
+ type: "Basic";
1548
+ username: string | (() => string | undefined) | undefined;
1549
+ password: string | (() => string | undefined) | undefined;
1550
+ } | {
1551
+ type: "Custom";
1552
+ prefix: string | (() => string | undefined) | undefined;
1553
+ value: string | (() => string | undefined) | undefined;
1554
+ }) | undefined;
1555
+ body?: (Partial<{
1556
+ token: string;
1557
+ }> & Record<string, any>) | undefined;
1558
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1559
+ params?: Record<string, any> | undefined;
1560
+ duplex?: "full" | "half" | undefined;
1561
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1562
+ retry?: better_auth_client.RetryOptions | undefined;
1563
+ retryAttempt?: number | undefined;
1564
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1565
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1566
+ disableValidation?: boolean | undefined;
1567
+ }>(data_0: better_auth.Prettify<{
1568
+ token: string;
1569
+ } & {
1570
+ fetchOptions?: FetchOptions | undefined;
1571
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1572
+ status: boolean;
1573
+ }, {
1574
+ code?: string;
1575
+ message?: string;
1576
+ }, FetchOptions["throw"] extends true ? true : false>>;
1577
+ } & {
1578
+ revokeSessions: <FetchOptions extends {
1579
+ method?: string | undefined;
1580
+ headers?: (HeadersInit & (HeadersInit | {
1581
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1582
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1583
+ authorization: "Bearer" | "Basic";
1584
+ })) | undefined;
1585
+ cache?: RequestCache | undefined;
1586
+ credentials?: RequestCredentials | undefined;
1587
+ integrity?: string | undefined;
1588
+ keepalive?: boolean | undefined;
1589
+ mode?: RequestMode | undefined;
1590
+ priority?: RequestPriority | undefined;
1591
+ redirect?: RequestRedirect | undefined;
1592
+ referrer?: string | undefined;
1593
+ referrerPolicy?: ReferrerPolicy | undefined;
1594
+ signal?: (AbortSignal | null) | undefined;
1595
+ window?: null | undefined;
1596
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1597
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1598
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1599
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1600
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1601
+ hookOptions?: {
1602
+ cloneResponse?: boolean;
1603
+ } | undefined;
1604
+ timeout?: number | undefined;
1605
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1606
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1607
+ baseURL?: string | undefined;
1608
+ throw?: boolean | undefined;
1609
+ auth?: ({
1610
+ type: "Bearer";
1611
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1612
+ } | {
1613
+ type: "Basic";
1614
+ username: string | (() => string | undefined) | undefined;
1615
+ password: string | (() => string | undefined) | undefined;
1616
+ } | {
1617
+ type: "Custom";
1618
+ prefix: string | (() => string | undefined) | undefined;
1619
+ value: string | (() => string | undefined) | undefined;
1620
+ }) | undefined;
1621
+ body?: undefined;
1622
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1623
+ params?: Record<string, any> | undefined;
1624
+ duplex?: "full" | "half" | undefined;
1625
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1626
+ retry?: better_auth_client.RetryOptions | undefined;
1627
+ retryAttempt?: number | undefined;
1628
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1629
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1630
+ disableValidation?: boolean | undefined;
1631
+ }>(data_0?: better_auth.Prettify<{
1632
+ query?: Record<string, any> | undefined;
1633
+ fetchOptions?: FetchOptions | undefined;
1634
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1635
+ status: boolean;
1636
+ }, {
1637
+ code?: string;
1638
+ message?: string;
1639
+ }, FetchOptions["throw"] extends true ? true : false>>;
1640
+ } & {
1641
+ revokeOtherSessions: <FetchOptions extends {
1642
+ method?: string | undefined;
1643
+ headers?: (HeadersInit & (HeadersInit | {
1644
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1645
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1646
+ authorization: "Bearer" | "Basic";
1647
+ })) | undefined;
1648
+ cache?: RequestCache | undefined;
1649
+ credentials?: RequestCredentials | undefined;
1650
+ integrity?: string | undefined;
1651
+ keepalive?: boolean | undefined;
1652
+ mode?: RequestMode | undefined;
1653
+ priority?: RequestPriority | undefined;
1654
+ redirect?: RequestRedirect | undefined;
1655
+ referrer?: string | undefined;
1656
+ referrerPolicy?: ReferrerPolicy | undefined;
1657
+ signal?: (AbortSignal | null) | undefined;
1658
+ window?: null | undefined;
1659
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1660
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1661
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1662
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1663
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1664
+ hookOptions?: {
1665
+ cloneResponse?: boolean;
1666
+ } | undefined;
1667
+ timeout?: number | undefined;
1668
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1669
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1670
+ baseURL?: string | undefined;
1671
+ throw?: boolean | undefined;
1672
+ auth?: ({
1673
+ type: "Bearer";
1674
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1675
+ } | {
1676
+ type: "Basic";
1677
+ username: string | (() => string | undefined) | undefined;
1678
+ password: string | (() => string | undefined) | undefined;
1679
+ } | {
1680
+ type: "Custom";
1681
+ prefix: string | (() => string | undefined) | undefined;
1682
+ value: string | (() => string | undefined) | undefined;
1683
+ }) | undefined;
1684
+ body?: undefined;
1685
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1686
+ params?: Record<string, any> | undefined;
1687
+ duplex?: "full" | "half" | undefined;
1688
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1689
+ retry?: better_auth_client.RetryOptions | undefined;
1690
+ retryAttempt?: number | undefined;
1691
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1692
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1693
+ disableValidation?: boolean | undefined;
1694
+ }>(data_0?: better_auth.Prettify<{
1695
+ query?: Record<string, any> | undefined;
1696
+ fetchOptions?: FetchOptions | undefined;
1697
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1698
+ status: boolean;
1699
+ }, {
1700
+ code?: string;
1701
+ message?: string;
1702
+ }, FetchOptions["throw"] extends true ? true : false>>;
1703
+ } & {
1704
+ linkSocial: <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
+ provider: unknown;
1749
+ callbackURL?: string | undefined;
1750
+ idToken?: {
1751
+ token: string;
1752
+ nonce?: string | undefined;
1753
+ accessToken?: string | undefined;
1754
+ refreshToken?: string | undefined;
1755
+ scopes?: string[] | undefined;
1756
+ } | undefined;
1757
+ requestSignUp?: boolean | undefined;
1758
+ scopes?: string[] | undefined;
1759
+ errorCallbackURL?: string | undefined;
1760
+ disableRedirect?: boolean | undefined;
1761
+ }> & Record<string, any>) | undefined;
1762
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1763
+ params?: Record<string, any> | undefined;
1764
+ duplex?: "full" | "half" | undefined;
1765
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1766
+ retry?: better_auth_client.RetryOptions | undefined;
1767
+ retryAttempt?: number | undefined;
1768
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1769
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1770
+ disableValidation?: boolean | undefined;
1771
+ }>(data_0: better_auth.Prettify<{
1772
+ provider: unknown;
1773
+ callbackURL?: string | undefined;
1774
+ idToken?: {
1775
+ token: string;
1776
+ nonce?: string | undefined;
1777
+ accessToken?: string | undefined;
1778
+ refreshToken?: string | undefined;
1779
+ scopes?: string[] | undefined;
1780
+ } | undefined;
1781
+ requestSignUp?: boolean | undefined;
1782
+ scopes?: string[] | undefined;
1783
+ errorCallbackURL?: string | undefined;
1784
+ disableRedirect?: boolean | undefined;
1785
+ } & {
1786
+ fetchOptions?: FetchOptions | undefined;
1787
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1788
+ url: string;
1789
+ redirect: boolean;
1790
+ }, {
1791
+ code?: string;
1792
+ message?: string;
1793
+ }, FetchOptions["throw"] extends true ? true : false>>;
1794
+ } & {
1795
+ listAccounts: <FetchOptions extends {
1796
+ method?: string | undefined;
1797
+ headers?: (HeadersInit & (HeadersInit | {
1798
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1799
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1800
+ authorization: "Bearer" | "Basic";
1801
+ })) | undefined;
1802
+ cache?: RequestCache | undefined;
1803
+ credentials?: RequestCredentials | undefined;
1804
+ integrity?: string | undefined;
1805
+ keepalive?: boolean | undefined;
1806
+ mode?: RequestMode | undefined;
1807
+ priority?: RequestPriority | undefined;
1808
+ redirect?: RequestRedirect | undefined;
1809
+ referrer?: string | undefined;
1810
+ referrerPolicy?: ReferrerPolicy | undefined;
1811
+ signal?: (AbortSignal | null) | undefined;
1812
+ window?: null | undefined;
1813
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1814
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1815
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1816
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1817
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1818
+ hookOptions?: {
1819
+ cloneResponse?: boolean;
1820
+ } | undefined;
1821
+ timeout?: number | undefined;
1822
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1823
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1824
+ baseURL?: string | undefined;
1825
+ throw?: boolean | undefined;
1826
+ auth?: ({
1827
+ type: "Bearer";
1828
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1829
+ } | {
1830
+ type: "Basic";
1831
+ username: string | (() => string | undefined) | undefined;
1832
+ password: string | (() => string | undefined) | undefined;
1833
+ } | {
1834
+ type: "Custom";
1835
+ prefix: string | (() => string | undefined) | undefined;
1836
+ value: string | (() => string | undefined) | undefined;
1837
+ }) | undefined;
1838
+ body?: undefined;
1839
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1840
+ params?: Record<string, any> | undefined;
1841
+ duplex?: "full" | "half" | undefined;
1842
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1843
+ retry?: better_auth_client.RetryOptions | undefined;
1844
+ retryAttempt?: number | undefined;
1845
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1846
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1847
+ disableValidation?: boolean | undefined;
1848
+ }>(data_0?: better_auth.Prettify<{
1849
+ query?: Record<string, any> | undefined;
1850
+ fetchOptions?: FetchOptions | undefined;
1851
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1852
+ id: string;
1853
+ provider: string;
1854
+ createdAt: Date;
1855
+ updatedAt: Date;
1856
+ accountId: string;
1857
+ scopes: string[];
1858
+ }[], {
1859
+ code?: string;
1860
+ message?: string;
1861
+ }, FetchOptions["throw"] extends true ? true : false>>;
1862
+ } & {
1863
+ deleteUser: {
1864
+ callback: <FetchOptions extends {
1865
+ method?: string | undefined;
1866
+ headers?: (HeadersInit & (HeadersInit | {
1867
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1868
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1869
+ authorization: "Bearer" | "Basic";
1870
+ })) | undefined;
1871
+ cache?: RequestCache | undefined;
1872
+ credentials?: RequestCredentials | undefined;
1873
+ integrity?: string | undefined;
1874
+ keepalive?: boolean | undefined;
1875
+ mode?: RequestMode | undefined;
1876
+ priority?: RequestPriority | undefined;
1877
+ redirect?: RequestRedirect | undefined;
1878
+ referrer?: string | undefined;
1879
+ referrerPolicy?: ReferrerPolicy | undefined;
1880
+ signal?: (AbortSignal | null) | undefined;
1881
+ window?: null | undefined;
1882
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1883
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1884
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1885
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1886
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1887
+ hookOptions?: {
1888
+ cloneResponse?: boolean;
1889
+ } | undefined;
1890
+ timeout?: number | undefined;
1891
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1892
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1893
+ baseURL?: string | undefined;
1894
+ throw?: boolean | undefined;
1895
+ auth?: ({
1896
+ type: "Bearer";
1897
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1898
+ } | {
1899
+ type: "Basic";
1900
+ username: string | (() => string | undefined) | undefined;
1901
+ password: string | (() => string | undefined) | undefined;
1902
+ } | {
1903
+ type: "Custom";
1904
+ prefix: string | (() => string | undefined) | undefined;
1905
+ value: string | (() => string | undefined) | undefined;
1906
+ }) | undefined;
1907
+ body?: undefined;
1908
+ query?: (Partial<{
1909
+ token: string;
1910
+ callbackURL?: string | undefined;
1911
+ }> & Record<string, any>) | undefined;
1912
+ params?: Record<string, any> | undefined;
1913
+ duplex?: "full" | "half" | undefined;
1914
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1915
+ retry?: better_auth_client.RetryOptions | undefined;
1916
+ retryAttempt?: number | undefined;
1917
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1918
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1919
+ disableValidation?: boolean | undefined;
1920
+ }>(data_0: better_auth.Prettify<{
1921
+ query: {
1922
+ token: string;
1923
+ callbackURL?: string | undefined;
1924
+ };
1925
+ fetchOptions?: FetchOptions | undefined;
1926
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1927
+ success: boolean;
1928
+ message: string;
1929
+ }, {
1930
+ code?: string;
1931
+ message?: string;
1932
+ }, FetchOptions["throw"] extends true ? true : false>>;
1933
+ };
1934
+ } & {
1935
+ unlinkAccount: <FetchOptions extends {
1936
+ method?: string | undefined;
1937
+ headers?: (HeadersInit & (HeadersInit | {
1938
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1939
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1940
+ authorization: "Bearer" | "Basic";
1941
+ })) | undefined;
1942
+ cache?: RequestCache | undefined;
1943
+ credentials?: RequestCredentials | undefined;
1944
+ integrity?: string | undefined;
1945
+ keepalive?: boolean | undefined;
1946
+ mode?: RequestMode | undefined;
1947
+ priority?: RequestPriority | undefined;
1948
+ redirect?: RequestRedirect | undefined;
1949
+ referrer?: string | undefined;
1950
+ referrerPolicy?: ReferrerPolicy | undefined;
1951
+ signal?: (AbortSignal | null) | undefined;
1952
+ window?: null | undefined;
1953
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
1954
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
1955
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
1956
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
1957
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
1958
+ hookOptions?: {
1959
+ cloneResponse?: boolean;
1960
+ } | undefined;
1961
+ timeout?: number | undefined;
1962
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
1963
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
1964
+ baseURL?: string | undefined;
1965
+ throw?: boolean | undefined;
1966
+ auth?: ({
1967
+ type: "Bearer";
1968
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1969
+ } | {
1970
+ type: "Basic";
1971
+ username: string | (() => string | undefined) | undefined;
1972
+ password: string | (() => string | undefined) | undefined;
1973
+ } | {
1974
+ type: "Custom";
1975
+ prefix: string | (() => string | undefined) | undefined;
1976
+ value: string | (() => string | undefined) | undefined;
1977
+ }) | undefined;
1978
+ body?: (Partial<{
1979
+ providerId: string;
1980
+ accountId?: string | undefined;
1981
+ }> & Record<string, any>) | undefined;
1982
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1983
+ params?: Record<string, any> | undefined;
1984
+ duplex?: "full" | "half" | undefined;
1985
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1986
+ retry?: better_auth_client.RetryOptions | undefined;
1987
+ retryAttempt?: number | undefined;
1988
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1989
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
1990
+ disableValidation?: boolean | undefined;
1991
+ }>(data_0: better_auth.Prettify<{
1992
+ providerId: string;
1993
+ accountId?: string | undefined;
1994
+ } & {
1995
+ fetchOptions?: FetchOptions | undefined;
1996
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1997
+ status: boolean;
1998
+ }, {
1999
+ code?: string;
2000
+ message?: string;
2001
+ }, FetchOptions["throw"] extends true ? true : false>>;
2002
+ } & {
2003
+ refreshToken: <FetchOptions extends {
2004
+ method?: string | undefined;
2005
+ headers?: (HeadersInit & (HeadersInit | {
2006
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2007
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2008
+ authorization: "Bearer" | "Basic";
2009
+ })) | undefined;
2010
+ cache?: RequestCache | undefined;
2011
+ credentials?: RequestCredentials | undefined;
2012
+ integrity?: string | undefined;
2013
+ keepalive?: boolean | undefined;
2014
+ mode?: RequestMode | undefined;
2015
+ priority?: RequestPriority | undefined;
2016
+ redirect?: RequestRedirect | undefined;
2017
+ referrer?: string | undefined;
2018
+ referrerPolicy?: ReferrerPolicy | undefined;
2019
+ signal?: (AbortSignal | null) | undefined;
2020
+ window?: null | undefined;
2021
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2022
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2023
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2024
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2025
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2026
+ hookOptions?: {
2027
+ cloneResponse?: boolean;
2028
+ } | undefined;
2029
+ timeout?: number | undefined;
2030
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
2031
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
2032
+ baseURL?: string | undefined;
2033
+ throw?: boolean | undefined;
2034
+ auth?: ({
2035
+ type: "Bearer";
2036
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2037
+ } | {
2038
+ type: "Basic";
2039
+ username: string | (() => string | undefined) | undefined;
2040
+ password: string | (() => string | undefined) | undefined;
2041
+ } | {
2042
+ type: "Custom";
2043
+ prefix: string | (() => string | undefined) | undefined;
2044
+ value: string | (() => string | undefined) | undefined;
2045
+ }) | undefined;
2046
+ body?: (Partial<{
2047
+ providerId: string;
2048
+ accountId?: string | undefined;
2049
+ userId?: string | undefined;
2050
+ }> & Record<string, any>) | undefined;
2051
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2052
+ params?: Record<string, any> | undefined;
2053
+ duplex?: "full" | "half" | undefined;
2054
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2055
+ retry?: better_auth_client.RetryOptions | undefined;
2056
+ retryAttempt?: number | undefined;
2057
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2058
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2059
+ disableValidation?: boolean | undefined;
2060
+ }>(data_0: better_auth.Prettify<{
2061
+ providerId: string;
2062
+ accountId?: string | undefined;
2063
+ userId?: string | undefined;
2064
+ } & {
2065
+ fetchOptions?: FetchOptions | undefined;
2066
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth.OAuth2Tokens, {
2067
+ code?: string;
2068
+ message?: string;
2069
+ }, FetchOptions["throw"] extends true ? true : false>>;
2070
+ } & {
2071
+ getAccessToken: <FetchOptions extends {
2072
+ method?: string | undefined;
2073
+ headers?: (HeadersInit & (HeadersInit | {
2074
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2075
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2076
+ authorization: "Bearer" | "Basic";
2077
+ })) | undefined;
2078
+ cache?: RequestCache | undefined;
2079
+ credentials?: RequestCredentials | undefined;
2080
+ integrity?: string | undefined;
2081
+ keepalive?: boolean | undefined;
2082
+ mode?: RequestMode | undefined;
2083
+ priority?: RequestPriority | undefined;
2084
+ redirect?: RequestRedirect | undefined;
2085
+ referrer?: string | undefined;
2086
+ referrerPolicy?: ReferrerPolicy | undefined;
2087
+ signal?: (AbortSignal | null) | undefined;
2088
+ window?: null | undefined;
2089
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2090
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2091
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2092
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2093
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2094
+ hookOptions?: {
2095
+ cloneResponse?: boolean;
2096
+ } | undefined;
2097
+ timeout?: number | undefined;
2098
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
2099
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
2100
+ baseURL?: string | undefined;
2101
+ throw?: boolean | undefined;
2102
+ auth?: ({
2103
+ type: "Bearer";
2104
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2105
+ } | {
2106
+ type: "Basic";
2107
+ username: string | (() => string | undefined) | undefined;
2108
+ password: string | (() => string | undefined) | undefined;
2109
+ } | {
2110
+ type: "Custom";
2111
+ prefix: string | (() => string | undefined) | undefined;
2112
+ value: string | (() => string | undefined) | undefined;
2113
+ }) | undefined;
2114
+ body?: (Partial<{
2115
+ providerId: string;
2116
+ accountId?: string | undefined;
2117
+ userId?: string | undefined;
2118
+ }> & Record<string, any>) | undefined;
2119
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2120
+ params?: Record<string, any> | undefined;
2121
+ duplex?: "full" | "half" | undefined;
2122
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2123
+ retry?: better_auth_client.RetryOptions | undefined;
2124
+ retryAttempt?: number | undefined;
2125
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2126
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2127
+ disableValidation?: boolean | undefined;
2128
+ }>(data_0: better_auth.Prettify<{
2129
+ providerId: string;
2130
+ accountId?: string | undefined;
2131
+ userId?: string | undefined;
2132
+ } & {
2133
+ fetchOptions?: FetchOptions | undefined;
2134
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2135
+ accessToken: string;
2136
+ accessTokenExpiresAt: Date | undefined;
2137
+ scopes: string[];
2138
+ idToken: string | undefined;
2139
+ }, {
2140
+ code?: string;
2141
+ message?: string;
2142
+ }, FetchOptions["throw"] extends true ? true : false>>;
2143
+ } & {
2144
+ accountInfo: <FetchOptions extends {
2145
+ method?: string | undefined;
2146
+ headers?: (HeadersInit & (HeadersInit | {
2147
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2148
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2149
+ authorization: "Bearer" | "Basic";
2150
+ })) | undefined;
2151
+ cache?: RequestCache | undefined;
2152
+ credentials?: RequestCredentials | undefined;
2153
+ integrity?: string | undefined;
2154
+ keepalive?: boolean | undefined;
2155
+ mode?: RequestMode | undefined;
2156
+ priority?: RequestPriority | undefined;
2157
+ redirect?: RequestRedirect | undefined;
2158
+ referrer?: string | undefined;
2159
+ referrerPolicy?: ReferrerPolicy | undefined;
2160
+ signal?: (AbortSignal | null) | undefined;
2161
+ window?: null | undefined;
2162
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2163
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2164
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2165
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2166
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2167
+ hookOptions?: {
2168
+ cloneResponse?: boolean;
2169
+ } | undefined;
2170
+ timeout?: number | undefined;
2171
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
2172
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
2173
+ baseURL?: string | undefined;
2174
+ throw?: boolean | undefined;
2175
+ auth?: ({
2176
+ type: "Bearer";
2177
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2178
+ } | {
2179
+ type: "Basic";
2180
+ username: string | (() => string | undefined) | undefined;
2181
+ password: string | (() => string | undefined) | undefined;
2182
+ } | {
2183
+ type: "Custom";
2184
+ prefix: string | (() => string | undefined) | undefined;
2185
+ value: string | (() => string | undefined) | undefined;
2186
+ }) | undefined;
2187
+ body?: (Partial<{
2188
+ accountId: string;
2189
+ }> & Record<string, any>) | undefined;
2190
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2191
+ params?: Record<string, any> | undefined;
2192
+ duplex?: "full" | "half" | undefined;
2193
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2194
+ retry?: better_auth_client.RetryOptions | undefined;
2195
+ retryAttempt?: number | undefined;
2196
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2197
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2198
+ disableValidation?: boolean | undefined;
2199
+ }>(data_0: better_auth.Prettify<{
2200
+ accountId: string;
2201
+ } & {
2202
+ fetchOptions?: FetchOptions | undefined;
2203
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2204
+ user: {
2205
+ id: string | number;
2206
+ name?: string;
2207
+ email?: string | null;
2208
+ image?: string;
2209
+ emailVerified: boolean;
2210
+ };
2211
+ data: Record<string, any>;
2212
+ }, {
2213
+ code?: string;
2214
+ message?: string;
2215
+ }, FetchOptions["throw"] extends true ? true : false>>;
2216
+ } & {
2217
+ signUp: {
2218
+ email: <FetchOptions extends {
2219
+ method?: string | undefined;
2220
+ headers?: (HeadersInit & (HeadersInit | {
2221
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2222
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2223
+ authorization: "Bearer" | "Basic";
2224
+ })) | undefined;
2225
+ cache?: RequestCache | undefined;
2226
+ credentials?: RequestCredentials | undefined;
2227
+ integrity?: string | undefined;
2228
+ keepalive?: boolean | undefined;
2229
+ mode?: RequestMode | undefined;
2230
+ priority?: RequestPriority | undefined;
2231
+ redirect?: RequestRedirect | undefined;
2232
+ referrer?: string | undefined;
2233
+ referrerPolicy?: ReferrerPolicy | undefined;
2234
+ signal?: (AbortSignal | null) | undefined;
2235
+ window?: null | undefined;
2236
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2237
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2238
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2239
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2240
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2241
+ hookOptions?: {
2242
+ cloneResponse?: boolean;
2243
+ } | undefined;
2244
+ timeout?: number | undefined;
2245
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
2246
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
2247
+ baseURL?: string | undefined;
2248
+ throw?: boolean | undefined;
2249
+ auth?: ({
2250
+ type: "Bearer";
2251
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2252
+ } | {
2253
+ type: "Basic";
2254
+ username: string | (() => string | undefined) | undefined;
2255
+ password: string | (() => string | undefined) | undefined;
2256
+ } | {
2257
+ type: "Custom";
2258
+ prefix: string | (() => string | undefined) | undefined;
2259
+ value: string | (() => string | undefined) | undefined;
2260
+ }) | undefined;
2261
+ body?: (Partial<{
2262
+ name: string;
2263
+ email: string;
2264
+ password: string;
2265
+ image?: string;
2266
+ callbackURL?: string;
2267
+ rememberMe?: boolean;
2268
+ }> & Record<string, any>) | undefined;
2269
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2270
+ params?: Record<string, any> | undefined;
2271
+ duplex?: "full" | "half" | undefined;
2272
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2273
+ retry?: better_auth_client.RetryOptions | undefined;
2274
+ retryAttempt?: number | undefined;
2275
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2276
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2277
+ disableValidation?: boolean | undefined;
2278
+ }>(data_0: better_auth.Prettify<{
2279
+ email: string;
2280
+ name: string;
2281
+ password: string;
2282
+ image?: string;
2283
+ callbackURL?: string;
2284
+ fetchOptions?: FetchOptions | undefined;
2285
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
2286
+ token: null;
2287
+ user: {
2288
+ id: string;
2289
+ email: string;
2290
+ name: string;
2291
+ image: string | null | undefined;
2292
+ emailVerified: boolean;
2293
+ createdAt: Date;
2294
+ updatedAt: Date;
2295
+ };
2296
+ } | {
2297
+ token: string;
2298
+ user: {
2299
+ id: string;
2300
+ email: string;
2301
+ name: string;
2302
+ image: string | null | undefined;
2303
+ emailVerified: boolean;
2304
+ createdAt: Date;
2305
+ updatedAt: Date;
2306
+ };
2307
+ }>, {
2308
+ code?: string;
2309
+ message?: string;
2310
+ }, FetchOptions["throw"] extends true ? true : false>>;
2311
+ };
2312
+ } & {
2313
+ updateUser: <FetchOptions extends {
2314
+ method?: string | undefined;
2315
+ headers?: (HeadersInit & (HeadersInit | {
2316
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2317
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2318
+ authorization: "Bearer" | "Basic";
2319
+ })) | undefined;
2320
+ cache?: RequestCache | undefined;
2321
+ credentials?: RequestCredentials | undefined;
2322
+ integrity?: string | undefined;
2323
+ keepalive?: boolean | undefined;
2324
+ mode?: RequestMode | undefined;
2325
+ priority?: RequestPriority | undefined;
2326
+ redirect?: RequestRedirect | undefined;
2327
+ referrer?: string | undefined;
2328
+ referrerPolicy?: ReferrerPolicy | undefined;
2329
+ signal?: (AbortSignal | null) | undefined;
2330
+ window?: null | undefined;
2331
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2332
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2333
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2334
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2335
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2336
+ hookOptions?: {
2337
+ cloneResponse?: boolean;
2338
+ } | undefined;
2339
+ timeout?: number | undefined;
2340
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
2341
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
2342
+ baseURL?: string | undefined;
2343
+ throw?: boolean | undefined;
2344
+ auth?: ({
2345
+ type: "Bearer";
2346
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2347
+ } | {
2348
+ type: "Basic";
2349
+ username: string | (() => string | undefined) | undefined;
2350
+ password: string | (() => string | undefined) | undefined;
2351
+ } | {
2352
+ type: "Custom";
2353
+ prefix: string | (() => string | undefined) | undefined;
2354
+ value: string | (() => string | undefined) | undefined;
2355
+ }) | undefined;
2356
+ body?: (Partial<Partial<{}> & {
2357
+ name?: string;
2358
+ image?: string;
2359
+ }> & Record<string, any>) | undefined;
2360
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2361
+ params?: Record<string, any> | undefined;
2362
+ duplex?: "full" | "half" | undefined;
2363
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2364
+ retry?: better_auth_client.RetryOptions | undefined;
2365
+ retryAttempt?: number | undefined;
2366
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2367
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2368
+ disableValidation?: boolean | undefined;
2369
+ }>(data_0?: better_auth.Prettify<{
2370
+ image?: string | null;
2371
+ name?: string;
2372
+ fetchOptions?: FetchOptions | undefined;
2373
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2374
+ status: boolean;
2375
+ }, {
2376
+ code?: string;
2377
+ message?: string;
2378
+ }, FetchOptions["throw"] extends true ? true : false>>;
2379
+ } & {
2380
+ listSessions: <FetchOptions extends {
2381
+ method?: string | undefined;
2382
+ headers?: (HeadersInit & (HeadersInit | {
2383
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2384
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2385
+ authorization: "Bearer" | "Basic";
2386
+ })) | undefined;
2387
+ cache?: RequestCache | undefined;
2388
+ credentials?: RequestCredentials | undefined;
2389
+ integrity?: string | undefined;
2390
+ keepalive?: boolean | undefined;
2391
+ mode?: RequestMode | undefined;
2392
+ priority?: RequestPriority | undefined;
2393
+ redirect?: RequestRedirect | undefined;
2394
+ referrer?: string | undefined;
2395
+ referrerPolicy?: ReferrerPolicy | undefined;
2396
+ signal?: (AbortSignal | null) | undefined;
2397
+ window?: null | undefined;
2398
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2399
+ onResponse?: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2400
+ onSuccess?: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2401
+ onError?: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2402
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2403
+ hookOptions?: {
2404
+ cloneResponse?: boolean;
2405
+ } | undefined;
2406
+ timeout?: number | undefined;
2407
+ customFetchImpl?: better_auth_client.FetchEsque | undefined;
2408
+ plugins?: better_auth_client.BetterFetchPlugin[] | undefined;
2409
+ baseURL?: string | undefined;
2410
+ throw?: boolean | undefined;
2411
+ auth?: ({
2412
+ type: "Bearer";
2413
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2414
+ } | {
2415
+ type: "Basic";
2416
+ username: string | (() => string | undefined) | undefined;
2417
+ password: string | (() => string | undefined) | undefined;
2418
+ } | {
2419
+ type: "Custom";
2420
+ prefix: string | (() => string | undefined) | undefined;
2421
+ value: string | (() => string | undefined) | undefined;
2422
+ }) | undefined;
2423
+ body?: undefined;
2424
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2425
+ params?: Record<string, any> | undefined;
2426
+ duplex?: "full" | "half" | undefined;
2427
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2428
+ retry?: better_auth_client.RetryOptions | undefined;
2429
+ retryAttempt?: number | undefined;
2430
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2431
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2432
+ disableValidation?: boolean | undefined;
2433
+ }>(data_0?: better_auth.Prettify<{
2434
+ query?: Record<string, any> | undefined;
2435
+ fetchOptions?: FetchOptions | undefined;
2436
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth.Prettify<{
2437
+ id: string;
2438
+ userId: string;
2439
+ expiresAt: Date;
2440
+ createdAt: Date;
2441
+ updatedAt: Date;
2442
+ token: string;
2443
+ ipAddress?: string | null | undefined | undefined;
2444
+ userAgent?: string | null | undefined | undefined;
2445
+ }>[], {
2446
+ code?: string;
2447
+ message?: string;
2448
+ }, FetchOptions["throw"] extends true ? true : false>>;
2449
+ } & {
2450
+ useSession: better_auth_client.Atom<{
2451
+ data: {
2452
+ user: {
2453
+ id: string;
2454
+ email: string;
2455
+ emailVerified: boolean;
2456
+ name: string;
2457
+ createdAt: Date;
2458
+ updatedAt: Date;
2459
+ image?: string | null | undefined;
2460
+ };
2461
+ session: {
2462
+ id: string;
2463
+ userId: string;
2464
+ expiresAt: Date;
2465
+ createdAt: Date;
2466
+ updatedAt: Date;
2467
+ token: string;
2468
+ ipAddress?: string | null | undefined;
2469
+ userAgent?: string | null | undefined;
2470
+ };
2471
+ } | null;
2472
+ error: better_auth_client.BetterFetchError | null;
2473
+ isPending: boolean;
2474
+ }>;
2475
+ $fetch: better_auth_client.BetterFetch<{
2476
+ plugins: (better_auth_client.BetterFetchPlugin | {
2477
+ id: string;
2478
+ name: string;
2479
+ hooks: {
2480
+ onSuccess: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
2481
+ onError: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
2482
+ onRequest: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
2483
+ onResponse: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
2484
+ };
2485
+ } | {
2486
+ id: string;
2487
+ name: string;
2488
+ hooks: {
2489
+ onSuccess(context: better_auth_client.SuccessContext<any>): void;
2490
+ };
2491
+ })[];
2492
+ cache?: RequestCache | undefined;
2493
+ credentials?: RequestCredentials;
2494
+ headers?: (HeadersInit & (HeadersInit | {
2495
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2496
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2497
+ authorization: "Bearer" | "Basic";
2498
+ })) | undefined;
2499
+ integrity?: string | undefined;
2500
+ keepalive?: boolean | undefined;
2501
+ method: string;
2502
+ mode?: RequestMode | undefined;
2503
+ priority?: RequestPriority | undefined;
2504
+ redirect?: RequestRedirect | undefined;
2505
+ referrer?: string | undefined;
2506
+ referrerPolicy?: ReferrerPolicy | undefined;
2507
+ signal?: (AbortSignal | null) | undefined;
2508
+ window?: null | undefined;
2509
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
2510
+ hookOptions?: {
2511
+ cloneResponse?: boolean;
2512
+ } | undefined;
2513
+ timeout?: number | undefined;
2514
+ customFetchImpl: better_auth_client.FetchEsque;
2515
+ baseURL: string;
2516
+ throw?: boolean | undefined;
2517
+ auth?: ({
2518
+ type: "Bearer";
2519
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2520
+ } | {
2521
+ type: "Basic";
2522
+ username: string | (() => string | undefined) | undefined;
2523
+ password: string | (() => string | undefined) | undefined;
2524
+ } | {
2525
+ type: "Custom";
2526
+ prefix: string | (() => string | undefined) | undefined;
2527
+ value: string | (() => string | undefined) | undefined;
2528
+ }) | undefined;
2529
+ body?: any;
2530
+ query?: any;
2531
+ params?: any;
2532
+ duplex?: "full" | "half" | undefined;
2533
+ jsonParser: (text: string) => Promise<any> | any;
2534
+ retry?: better_auth_client.RetryOptions | undefined;
2535
+ retryAttempt?: number | undefined;
2536
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2537
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
2538
+ disableValidation?: boolean | undefined;
2539
+ }, unknown, unknown, {}>;
2540
+ $store: {
2541
+ notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
2542
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2543
+ atoms: Record<string, better_auth_client.WritableAtom<any>>;
2544
+ };
2545
+ $Infer: {
2546
+ Session: {
2547
+ user: {
2548
+ id: string;
2549
+ email: string;
2550
+ emailVerified: boolean;
2551
+ name: string;
2552
+ createdAt: Date;
2553
+ updatedAt: Date;
2554
+ image?: string | null | undefined;
2555
+ };
2556
+ session: {
2557
+ id: string;
2558
+ userId: string;
2559
+ expiresAt: Date;
2560
+ createdAt: Date;
2561
+ updatedAt: Date;
2562
+ token: string;
2563
+ ipAddress?: string | null | undefined;
2564
+ userAgent?: string | null | undefined;
2565
+ };
2566
+ };
2567
+ };
2568
+ $ERROR_CODES: {
2569
+ USER_NOT_FOUND: string;
2570
+ FAILED_TO_CREATE_USER: string;
2571
+ FAILED_TO_CREATE_SESSION: string;
2572
+ FAILED_TO_UPDATE_USER: string;
2573
+ FAILED_TO_GET_SESSION: string;
2574
+ INVALID_PASSWORD: string;
2575
+ INVALID_EMAIL: string;
2576
+ INVALID_EMAIL_OR_PASSWORD: string;
2577
+ SOCIAL_ACCOUNT_ALREADY_LINKED: string;
2578
+ PROVIDER_NOT_FOUND: string;
2579
+ INVALID_TOKEN: string;
2580
+ ID_TOKEN_NOT_SUPPORTED: string;
2581
+ FAILED_TO_GET_USER_INFO: string;
2582
+ USER_EMAIL_NOT_FOUND: string;
2583
+ EMAIL_NOT_VERIFIED: string;
2584
+ PASSWORD_TOO_SHORT: string;
2585
+ PASSWORD_TOO_LONG: string;
2586
+ USER_ALREADY_EXISTS: string;
2587
+ EMAIL_CAN_NOT_BE_UPDATED: string;
2588
+ CREDENTIAL_ACCOUNT_NOT_FOUND: string;
2589
+ SESSION_EXPIRED: string;
2590
+ FAILED_TO_UNLINK_LAST_ACCOUNT: string;
2591
+ ACCOUNT_NOT_FOUND: string;
2592
+ USER_ALREADY_HAS_PASSWORD: string;
2593
+ };
2594
+ };
2595
+ /**
2596
+ * pass either email or username to sign in. Needs username plugin enabled to use username.
2597
+ * @param data : { email?: string; username?: string; password: string; rememberMe?: boolean }
2598
+ */
2599
+ signIn(data: {
2600
+ login: string;
2601
+ password: string;
2602
+ rememberMe?: boolean;
2603
+ }): Observable<{
2604
+ user: User;
2605
+ session: Session2;
2606
+ }>;
2607
+ signInUsername(data: {
2608
+ username: string;
2609
+ password: string;
2610
+ rememberMe?: boolean;
2611
+ }): Observable<{
2612
+ user: User;
2613
+ session: Session2;
2614
+ }>;
2615
+ isUsernameAvailable(data: {
2616
+ username: string;
2617
+ }): Observable<unknown>;
2618
+ static ɵfac: i0.ɵɵFactoryDeclaration<UsernameService, never>;
2619
+ static ɵprov: i0.ɵɵInjectableDeclaration<UsernameService>;
2620
+ }
2621
+
452
2622
  declare class AdminService {
453
2623
  private readonly mainService;
454
2624
  admin: any;
@@ -494,7 +2664,7 @@ declare class AdminService {
494
2664
  listUserSessions(data: {
495
2665
  userId: string;
496
2666
  }): Observable<{
497
- sessions: Session3[];
2667
+ sessions: Session2[];
498
2668
  }>;
499
2669
  unbanUser(data: {
500
2670
  userId: string;
@@ -511,7 +2681,7 @@ declare class AdminService {
511
2681
  impersonateUser(data: {
512
2682
  userId: string;
513
2683
  }): Observable<{
514
- session: Session3;
2684
+ session: Session2;
515
2685
  user: User;
516
2686
  }>;
517
2687
  stopImpersonating(): Observable<unknown>;
@@ -699,5 +2869,5 @@ declare function canActivate(pipe: () => Observable<boolean | UrlTree> | Promise
699
2869
  canActivate: [CanActivateFn];
700
2870
  };
701
2871
 
702
- export { AccountService, AdminService, AuthService, BETTER_AUTH_CONFIG_TOKEN, EmailOtpService, GenericOauthService, MagicLinkService, OneTapService, OrganizationService, PasskeyService, SessionService, TwoFactorService, canActivate, hasRole, provideBetterAuth, redirectLoggedInTo, redirectUnauthorizedTo };
703
- export type { Account, Invitation, InvitationStatus, Member, Member2, Organization, Passkey, Provider, RegisterPasskey, Session, Session2, Session3, User };
2872
+ export { AccountService, AdminService, AuthService, BETTER_AUTH_CONFIG_TOKEN, EmailOtpService, GenericOauthService, MagicLinkService, OneTapService, OrganizationService, PasskeyService, SessionService, TwoFactorService, UsernameService, canActivate, hasRole, provideBetterAuth, redirectLoggedInTo, redirectUnauthorizedTo };
2873
+ export type { Account, Invitation, InvitationStatus, Member, Member2, Organization, Passkey, Provider, RegisterPasskey, Session, Session2, User };