ngx-better-auth 0.7.0 → 0.7.1

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