@erikey/react 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -2236,154 +2236,6 @@ interface AuthClientConfig {
2236
2236
  */
2237
2237
  declare function createAuthClient(config: AuthClientConfig): {
2238
2238
  signIn: {
2239
- email: (args_0: better_auth.Prettify<{
2240
- email: string;
2241
- password: string;
2242
- callbackURL?: string | undefined;
2243
- rememberMe?: boolean | undefined;
2244
- } & {
2245
- fetchOptions?: {
2246
- credentials?: RequestCredentials | undefined;
2247
- method?: string | undefined;
2248
- headers?: (HeadersInit & (HeadersInit | {
2249
- accept: "application/json" | "text/plain" | "application/octet-stream";
2250
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2251
- authorization: "Bearer" | "Basic";
2252
- })) | undefined;
2253
- cache?: RequestCache | undefined;
2254
- integrity?: string | undefined;
2255
- keepalive?: boolean | undefined;
2256
- mode?: RequestMode | undefined;
2257
- priority?: RequestPriority | undefined;
2258
- redirect?: RequestRedirect | undefined;
2259
- referrer?: string | undefined;
2260
- referrerPolicy?: ReferrerPolicy | undefined;
2261
- signal?: (AbortSignal | null) | undefined;
2262
- window?: null | undefined;
2263
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2264
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2265
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2266
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2267
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2268
- hookOptions?: {
2269
- cloneResponse?: boolean;
2270
- } | undefined;
2271
- timeout?: number | undefined;
2272
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2273
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2274
- baseURL?: string | undefined;
2275
- throw?: boolean | undefined;
2276
- auth?: ({
2277
- type: "Bearer";
2278
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2279
- } | {
2280
- type: "Basic";
2281
- username: string | (() => string | undefined) | undefined;
2282
- password: string | (() => string | undefined) | undefined;
2283
- } | {
2284
- type: "Custom";
2285
- prefix: string | (() => string | undefined) | undefined;
2286
- value: string | (() => string | undefined) | undefined;
2287
- }) | undefined;
2288
- body?: (Partial<{
2289
- email: string;
2290
- password: string;
2291
- callbackURL?: string | undefined;
2292
- rememberMe?: boolean | undefined;
2293
- }> & Record<string, any>) | undefined;
2294
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2295
- params?: Record<string, any> | undefined;
2296
- duplex?: "full" | "half" | undefined;
2297
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2298
- retry?: better_auth_react.RetryOptions | undefined;
2299
- retryAttempt?: number | undefined;
2300
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2301
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2302
- disableValidation?: boolean | undefined;
2303
- } | undefined;
2304
- }>, args_1?: {
2305
- credentials?: RequestCredentials | undefined;
2306
- method?: string | undefined;
2307
- headers?: (HeadersInit & (HeadersInit | {
2308
- accept: "application/json" | "text/plain" | "application/octet-stream";
2309
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2310
- authorization: "Bearer" | "Basic";
2311
- })) | undefined;
2312
- cache?: RequestCache | undefined;
2313
- integrity?: string | undefined;
2314
- keepalive?: boolean | undefined;
2315
- mode?: RequestMode | undefined;
2316
- priority?: RequestPriority | undefined;
2317
- redirect?: RequestRedirect | undefined;
2318
- referrer?: string | undefined;
2319
- referrerPolicy?: ReferrerPolicy | undefined;
2320
- signal?: (AbortSignal | null) | undefined;
2321
- window?: null | undefined;
2322
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2323
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2324
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2325
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2326
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2327
- hookOptions?: {
2328
- cloneResponse?: boolean;
2329
- } | undefined;
2330
- timeout?: number | undefined;
2331
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2332
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2333
- baseURL?: string | undefined;
2334
- throw?: boolean | undefined;
2335
- auth?: ({
2336
- type: "Bearer";
2337
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2338
- } | {
2339
- type: "Basic";
2340
- username: string | (() => string | undefined) | undefined;
2341
- password: string | (() => string | undefined) | undefined;
2342
- } | {
2343
- type: "Custom";
2344
- prefix: string | (() => string | undefined) | undefined;
2345
- value: string | (() => string | undefined) | undefined;
2346
- }) | undefined;
2347
- body?: (Partial<{
2348
- email: string;
2349
- password: string;
2350
- callbackURL?: string | undefined;
2351
- rememberMe?: boolean | undefined;
2352
- }> & Record<string, any>) | undefined;
2353
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2354
- params?: Record<string, any> | undefined;
2355
- duplex?: "full" | "half" | undefined;
2356
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2357
- retry?: better_auth_react.RetryOptions | undefined;
2358
- retryAttempt?: number | undefined;
2359
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2360
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2361
- disableValidation?: boolean | undefined;
2362
- } | undefined) => Promise<{
2363
- data: {
2364
- redirect: boolean;
2365
- token: string;
2366
- url: string | undefined;
2367
- user: {
2368
- id: string;
2369
- email: string;
2370
- name: string;
2371
- image: string | null | undefined;
2372
- emailVerified: boolean;
2373
- createdAt: Date;
2374
- updatedAt: Date;
2375
- };
2376
- };
2377
- error: null;
2378
- } | {
2379
- data: null;
2380
- error: {
2381
- code?: string | undefined;
2382
- message?: string | undefined;
2383
- status: number;
2384
- statusText: string;
2385
- };
2386
- }>;
2387
2239
  social: <FetchOptions extends {
2388
2240
  credentials?: RequestCredentials | undefined;
2389
2241
  method?: string | undefined;
@@ -2492,75 +2344,72 @@ declare function createAuthClient(config: AuthClientConfig): {
2492
2344
  message?: string;
2493
2345
  }, FetchOptions["throw"] extends true ? true : false>>;
2494
2346
  };
2347
+ } & {
2348
+ signOut: <FetchOptions extends {
2349
+ credentials?: RequestCredentials | undefined;
2350
+ method?: string | undefined;
2351
+ headers?: (HeadersInit & (HeadersInit | {
2352
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2353
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2354
+ authorization: "Bearer" | "Basic";
2355
+ })) | undefined;
2356
+ cache?: RequestCache | undefined;
2357
+ integrity?: string | undefined;
2358
+ keepalive?: boolean | undefined;
2359
+ mode?: RequestMode | undefined;
2360
+ priority?: RequestPriority | undefined;
2361
+ redirect?: RequestRedirect | undefined;
2362
+ referrer?: string | undefined;
2363
+ referrerPolicy?: ReferrerPolicy | undefined;
2364
+ signal?: (AbortSignal | null) | undefined;
2365
+ window?: null | undefined;
2366
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2367
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2368
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2369
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2370
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2371
+ hookOptions?: {
2372
+ cloneResponse?: boolean;
2373
+ } | undefined;
2374
+ timeout?: number | undefined;
2375
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2376
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2377
+ baseURL?: string | undefined;
2378
+ throw?: boolean | undefined;
2379
+ auth?: ({
2380
+ type: "Bearer";
2381
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2382
+ } | {
2383
+ type: "Basic";
2384
+ username: string | (() => string | undefined) | undefined;
2385
+ password: string | (() => string | undefined) | undefined;
2386
+ } | {
2387
+ type: "Custom";
2388
+ prefix: string | (() => string | undefined) | undefined;
2389
+ value: string | (() => string | undefined) | undefined;
2390
+ }) | undefined;
2391
+ body?: undefined;
2392
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2393
+ params?: Record<string, any> | undefined;
2394
+ duplex?: "full" | "half" | undefined;
2395
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2396
+ retry?: better_auth_react.RetryOptions | undefined;
2397
+ retryAttempt?: number | undefined;
2398
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2399
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2400
+ disableValidation?: boolean | undefined;
2401
+ }>(data_0?: better_auth.Prettify<{
2402
+ query?: Record<string, any> | undefined;
2403
+ fetchOptions?: FetchOptions | undefined;
2404
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2405
+ success: boolean;
2406
+ }, {
2407
+ code?: string;
2408
+ message?: string;
2409
+ }, FetchOptions["throw"] extends true ? true : false>>;
2410
+ } & {
2495
2411
  signUp: {
2496
- email: (args_0: better_auth.Prettify<{
2497
- email: string;
2498
- name: string;
2499
- password: string;
2500
- image?: string;
2501
- callbackURL?: string;
2502
- fetchOptions?: {
2503
- credentials?: RequestCredentials | undefined;
2504
- method?: string | undefined;
2505
- headers?: (HeadersInit & (HeadersInit | {
2506
- accept: "application/json" | "text/plain" | "application/octet-stream";
2507
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2508
- authorization: "Bearer" | "Basic";
2509
- })) | undefined;
2510
- cache?: RequestCache | undefined;
2511
- integrity?: string | undefined;
2512
- keepalive?: boolean | undefined;
2513
- mode?: RequestMode | undefined;
2514
- priority?: RequestPriority | undefined;
2515
- redirect?: RequestRedirect | undefined;
2516
- referrer?: string | undefined;
2517
- referrerPolicy?: ReferrerPolicy | undefined;
2518
- signal?: (AbortSignal | null) | undefined;
2519
- window?: null | undefined;
2520
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2521
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2522
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2523
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2524
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2525
- hookOptions?: {
2526
- cloneResponse?: boolean;
2527
- } | undefined;
2528
- timeout?: number | undefined;
2529
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2530
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2531
- baseURL?: string | undefined;
2532
- throw?: boolean | undefined;
2533
- auth?: ({
2534
- type: "Bearer";
2535
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2536
- } | {
2537
- type: "Basic";
2538
- username: string | (() => string | undefined) | undefined;
2539
- password: string | (() => string | undefined) | undefined;
2540
- } | {
2541
- type: "Custom";
2542
- prefix: string | (() => string | undefined) | undefined;
2543
- value: string | (() => string | undefined) | undefined;
2544
- }) | undefined;
2545
- body?: (Partial<{
2546
- name: string;
2547
- email: string;
2548
- password: string;
2549
- image?: string;
2550
- callbackURL?: string;
2551
- rememberMe?: boolean;
2552
- }> & Record<string, any>) | undefined;
2553
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2554
- params?: Record<string, any> | undefined;
2555
- duplex?: "full" | "half" | undefined;
2556
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2557
- retry?: better_auth_react.RetryOptions | undefined;
2558
- retryAttempt?: number | undefined;
2559
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2560
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2561
- disableValidation?: boolean | undefined;
2562
- } | undefined;
2563
- }>, args_1?: {
2412
+ email: <FetchOptions extends {
2564
2413
  credentials?: RequestCredentials | undefined;
2565
2414
  method?: string | undefined;
2566
2415
  headers?: (HeadersInit & (HeadersInit | {
@@ -2620,44 +2469,43 @@ declare function createAuthClient(config: AuthClientConfig): {
2620
2469
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2621
2470
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2622
2471
  disableValidation?: boolean | undefined;
2623
- } | undefined) => Promise<{
2624
- data: NonNullable<{
2625
- token: null;
2626
- user: {
2627
- id: string;
2628
- email: string;
2629
- name: string;
2630
- image: string | null | undefined;
2631
- emailVerified: boolean;
2632
- createdAt: Date;
2633
- updatedAt: Date;
2634
- };
2635
- } | {
2636
- token: string;
2637
- user: {
2638
- id: string;
2639
- email: string;
2640
- name: string;
2641
- image: string | null | undefined;
2642
- emailVerified: boolean;
2643
- createdAt: Date;
2644
- updatedAt: Date;
2645
- };
2646
- }>;
2647
- error: null;
2472
+ }>(data_0: better_auth.Prettify<{
2473
+ email: string;
2474
+ name: string;
2475
+ password: string;
2476
+ image?: string;
2477
+ callbackURL?: string;
2478
+ fetchOptions?: FetchOptions | undefined;
2479
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
2480
+ token: null;
2481
+ user: {
2482
+ id: string;
2483
+ email: string;
2484
+ name: string;
2485
+ image: string | null | undefined;
2486
+ emailVerified: boolean;
2487
+ createdAt: Date;
2488
+ updatedAt: Date;
2489
+ };
2648
2490
  } | {
2649
- data: null;
2650
- error: {
2651
- code?: string | undefined;
2652
- message?: string | undefined;
2653
- status: number;
2654
- statusText: string;
2491
+ token: string;
2492
+ user: {
2493
+ id: string;
2494
+ email: string;
2495
+ name: string;
2496
+ image: string | null | undefined;
2497
+ emailVerified: boolean;
2498
+ createdAt: Date;
2499
+ updatedAt: Date;
2655
2500
  };
2656
- }>;
2501
+ }>, {
2502
+ code?: string;
2503
+ message?: string;
2504
+ }, FetchOptions["throw"] extends true ? true : false>>;
2657
2505
  };
2658
- signOut: (args_0?: better_auth.Prettify<{
2659
- query?: Record<string, any> | undefined;
2660
- fetchOptions?: {
2506
+ } & {
2507
+ signIn: {
2508
+ email: <FetchOptions extends {
2661
2509
  credentials?: RequestCredentials | undefined;
2662
2510
  method?: string | undefined;
2663
2511
  headers?: (HeadersInit & (HeadersInit | {
@@ -2677,222 +2525,70 @@ declare function createAuthClient(config: AuthClientConfig): {
2677
2525
  window?: null | undefined;
2678
2526
  onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2679
2527
  onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2680
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2681
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2682
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2683
- hookOptions?: {
2684
- cloneResponse?: boolean;
2685
- } | undefined;
2686
- timeout?: number | undefined;
2687
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2688
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2689
- baseURL?: string | undefined;
2690
- throw?: boolean | undefined;
2691
- auth?: ({
2692
- type: "Bearer";
2693
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2694
- } | {
2695
- type: "Basic";
2696
- username: string | (() => string | undefined) | undefined;
2697
- password: string | (() => string | undefined) | undefined;
2698
- } | {
2699
- type: "Custom";
2700
- prefix: string | (() => string | undefined) | undefined;
2701
- value: string | (() => string | undefined) | undefined;
2702
- }) | undefined;
2703
- body?: undefined;
2704
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2705
- params?: Record<string, any> | undefined;
2706
- duplex?: "full" | "half" | undefined;
2707
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2708
- retry?: better_auth_react.RetryOptions | undefined;
2709
- retryAttempt?: number | undefined;
2710
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2711
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2712
- disableValidation?: boolean | undefined;
2713
- } | undefined;
2714
- }> | undefined, args_1?: {
2715
- credentials?: RequestCredentials | undefined;
2716
- method?: string | undefined;
2717
- headers?: (HeadersInit & (HeadersInit | {
2718
- accept: "application/json" | "text/plain" | "application/octet-stream";
2719
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2720
- authorization: "Bearer" | "Basic";
2721
- })) | undefined;
2722
- cache?: RequestCache | undefined;
2723
- integrity?: string | undefined;
2724
- keepalive?: boolean | undefined;
2725
- mode?: RequestMode | undefined;
2726
- priority?: RequestPriority | undefined;
2727
- redirect?: RequestRedirect | undefined;
2728
- referrer?: string | undefined;
2729
- referrerPolicy?: ReferrerPolicy | undefined;
2730
- signal?: (AbortSignal | null) | undefined;
2731
- window?: null | undefined;
2732
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2733
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2734
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2735
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2736
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2737
- hookOptions?: {
2738
- cloneResponse?: boolean;
2739
- } | undefined;
2740
- timeout?: number | undefined;
2741
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2742
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2743
- baseURL?: string | undefined;
2744
- throw?: boolean | undefined;
2745
- auth?: ({
2746
- type: "Bearer";
2747
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2748
- } | {
2749
- type: "Basic";
2750
- username: string | (() => string | undefined) | undefined;
2751
- password: string | (() => string | undefined) | undefined;
2752
- } | {
2753
- type: "Custom";
2754
- prefix: string | (() => string | undefined) | undefined;
2755
- value: string | (() => string | undefined) | undefined;
2756
- }) | undefined;
2757
- body?: undefined;
2758
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2759
- params?: Record<string, any> | undefined;
2760
- duplex?: "full" | "half" | undefined;
2761
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2762
- retry?: better_auth_react.RetryOptions | undefined;
2763
- retryAttempt?: number | undefined;
2764
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2765
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2766
- disableValidation?: boolean | undefined;
2767
- } | undefined) => Promise<{
2768
- data: {
2769
- success: boolean;
2770
- };
2771
- error: null;
2772
- } | {
2773
- data: null;
2774
- error: {
2775
- code?: string | undefined;
2776
- message?: string | undefined;
2777
- status: number;
2778
- statusText: string;
2779
- };
2780
- }>;
2781
- useSession: () => {
2782
- data: {
2783
- user: {
2784
- id: string;
2785
- createdAt: Date;
2786
- updatedAt: Date;
2787
- email: string;
2788
- emailVerified: boolean;
2789
- name: string;
2790
- image?: string | null | undefined;
2791
- };
2792
- session: {
2793
- id: string;
2794
- createdAt: Date;
2795
- updatedAt: Date;
2796
- userId: string;
2797
- expiresAt: Date;
2798
- token: string;
2799
- ipAddress?: string | null | undefined;
2800
- userAgent?: string | null | undefined;
2801
- };
2802
- } | null;
2803
- isPending: boolean;
2804
- isRefetching: boolean;
2805
- error: better_auth_react.BetterFetchError | null;
2806
- refetch: (queryParams?: {
2807
- query?: better_auth.SessionQueryParams;
2808
- }) => void;
2809
- };
2810
- getSession: <FetchOptions extends {
2811
- credentials?: RequestCredentials | undefined;
2812
- method?: string | undefined;
2813
- headers?: (HeadersInit & (HeadersInit | {
2814
- accept: "application/json" | "text/plain" | "application/octet-stream";
2815
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2816
- authorization: "Bearer" | "Basic";
2817
- })) | undefined;
2818
- cache?: RequestCache | undefined;
2819
- integrity?: string | undefined;
2820
- keepalive?: boolean | undefined;
2821
- mode?: RequestMode | undefined;
2822
- priority?: RequestPriority | undefined;
2823
- redirect?: RequestRedirect | undefined;
2824
- referrer?: string | undefined;
2825
- referrerPolicy?: ReferrerPolicy | undefined;
2826
- signal?: (AbortSignal | null) | undefined;
2827
- window?: null | undefined;
2828
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2829
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2830
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2831
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2832
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2833
- hookOptions?: {
2834
- cloneResponse?: boolean;
2835
- } | undefined;
2836
- timeout?: number | undefined;
2837
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2838
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2839
- baseURL?: string | undefined;
2840
- throw?: boolean | undefined;
2841
- auth?: ({
2842
- type: "Bearer";
2843
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2844
- } | {
2845
- type: "Basic";
2846
- username: string | (() => string | undefined) | undefined;
2847
- password: string | (() => string | undefined) | undefined;
2848
- } | {
2849
- type: "Custom";
2850
- prefix: string | (() => string | undefined) | undefined;
2851
- value: string | (() => string | undefined) | undefined;
2852
- }) | undefined;
2853
- body?: undefined;
2854
- query?: (Partial<{
2855
- disableCookieCache?: unknown;
2856
- disableRefresh?: unknown;
2857
- }> & Record<string, any>) | undefined;
2858
- params?: Record<string, any> | undefined;
2859
- duplex?: "full" | "half" | undefined;
2860
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2861
- retry?: better_auth_react.RetryOptions | undefined;
2862
- retryAttempt?: number | undefined;
2863
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2864
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2865
- disableValidation?: boolean | undefined;
2866
- }>(data_0?: better_auth.Prettify<{
2867
- query?: {
2868
- disableCookieCache?: unknown;
2869
- disableRefresh?: unknown;
2870
- } | undefined;
2871
- fetchOptions?: FetchOptions | undefined;
2872
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2873
- user: {
2874
- id: string;
2875
- createdAt: Date;
2876
- updatedAt: Date;
2528
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2529
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2530
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2531
+ hookOptions?: {
2532
+ cloneResponse?: boolean;
2533
+ } | undefined;
2534
+ timeout?: number | undefined;
2535
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2536
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2537
+ baseURL?: string | undefined;
2538
+ throw?: boolean | undefined;
2539
+ auth?: ({
2540
+ type: "Bearer";
2541
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2542
+ } | {
2543
+ type: "Basic";
2544
+ username: string | (() => string | undefined) | undefined;
2545
+ password: string | (() => string | undefined) | undefined;
2546
+ } | {
2547
+ type: "Custom";
2548
+ prefix: string | (() => string | undefined) | undefined;
2549
+ value: string | (() => string | undefined) | undefined;
2550
+ }) | undefined;
2551
+ body?: (Partial<{
2552
+ email: string;
2553
+ password: string;
2554
+ callbackURL?: string | undefined;
2555
+ rememberMe?: boolean | undefined;
2556
+ }> & Record<string, any>) | undefined;
2557
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2558
+ params?: Record<string, any> | undefined;
2559
+ duplex?: "full" | "half" | undefined;
2560
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2561
+ retry?: better_auth_react.RetryOptions | undefined;
2562
+ retryAttempt?: number | undefined;
2563
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2564
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2565
+ disableValidation?: boolean | undefined;
2566
+ }>(data_0: better_auth.Prettify<{
2877
2567
  email: string;
2878
- emailVerified: boolean;
2879
- name: string;
2880
- image?: string | null | undefined;
2881
- };
2882
- session: {
2883
- id: string;
2884
- createdAt: Date;
2885
- updatedAt: Date;
2886
- userId: string;
2887
- expiresAt: Date;
2568
+ password: string;
2569
+ callbackURL?: string | undefined;
2570
+ rememberMe?: boolean | undefined;
2571
+ } & {
2572
+ fetchOptions?: FetchOptions | undefined;
2573
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2574
+ redirect: boolean;
2888
2575
  token: string;
2889
- ipAddress?: string | null | undefined;
2890
- userAgent?: string | null | undefined;
2891
- };
2892
- } | null, {
2893
- code?: string;
2894
- message?: string;
2895
- }, FetchOptions["throw"] extends true ? true : false>>;
2576
+ url: string | undefined;
2577
+ user: {
2578
+ id: string;
2579
+ email: string;
2580
+ name: string;
2581
+ image: string | null | undefined;
2582
+ emailVerified: boolean;
2583
+ createdAt: Date;
2584
+ updatedAt: Date;
2585
+ };
2586
+ }, {
2587
+ code?: string;
2588
+ message?: string;
2589
+ }, FetchOptions["throw"] extends true ? true : false>>;
2590
+ };
2591
+ } & {
2896
2592
  forgetPassword: <FetchOptions extends {
2897
2593
  credentials?: RequestCredentials | undefined;
2898
2594
  method?: string | undefined;
@@ -2960,7 +2656,8 @@ declare function createAuthClient(config: AuthClientConfig): {
2960
2656
  code?: string;
2961
2657
  message?: string;
2962
2658
  }, FetchOptions["throw"] extends true ? true : false>>;
2963
- resetPassword: (<FetchOptions extends {
2659
+ } & {
2660
+ resetPassword: <FetchOptions extends {
2964
2661
  credentials?: RequestCredentials | undefined;
2965
2662
  method?: string | undefined;
2966
2663
  headers?: (HeadersInit & (HeadersInit | {
@@ -3028,141 +2725,8 @@ declare function createAuthClient(config: AuthClientConfig): {
3028
2725
  }, {
3029
2726
  code?: string;
3030
2727
  message?: string;
3031
- }, FetchOptions["throw"] extends true ? true : false>>) & {
3032
- ":token": <FetchOptions extends {
3033
- credentials?: RequestCredentials | undefined;
3034
- method?: string | undefined;
3035
- headers?: (HeadersInit & (HeadersInit | {
3036
- accept: "application/json" | "text/plain" | "application/octet-stream";
3037
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3038
- authorization: "Bearer" | "Basic";
3039
- })) | undefined;
3040
- cache?: RequestCache | undefined;
3041
- integrity?: string | undefined;
3042
- keepalive?: boolean | undefined;
3043
- mode?: RequestMode | undefined;
3044
- priority?: RequestPriority | undefined;
3045
- redirect?: RequestRedirect | undefined;
3046
- referrer?: string | undefined;
3047
- referrerPolicy?: ReferrerPolicy | undefined;
3048
- signal?: (AbortSignal | null) | undefined;
3049
- window?: null | undefined;
3050
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3051
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3052
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3053
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3054
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3055
- hookOptions?: {
3056
- cloneResponse?: boolean;
3057
- } | undefined;
3058
- timeout?: number | undefined;
3059
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3060
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3061
- baseURL?: string | undefined;
3062
- throw?: boolean | undefined;
3063
- auth?: ({
3064
- type: "Bearer";
3065
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3066
- } | {
3067
- type: "Basic";
3068
- username: string | (() => string | undefined) | undefined;
3069
- password: string | (() => string | undefined) | undefined;
3070
- } | {
3071
- type: "Custom";
3072
- prefix: string | (() => string | undefined) | undefined;
3073
- value: string | (() => string | undefined) | undefined;
3074
- }) | undefined;
3075
- body?: undefined;
3076
- query?: (Partial<{
3077
- callbackURL: string;
3078
- }> & Record<string, any>) | undefined;
3079
- params?: {
3080
- token: string;
3081
- } | undefined;
3082
- duplex?: "full" | "half" | undefined;
3083
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3084
- retry?: better_auth_react.RetryOptions | undefined;
3085
- retryAttempt?: number | undefined;
3086
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3087
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3088
- disableValidation?: boolean | undefined;
3089
- }>(data_0: better_auth.Prettify<{
3090
- query: {
3091
- callbackURL: string;
3092
- };
3093
- fetchOptions?: FetchOptions | undefined;
3094
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
3095
- code?: string;
3096
- message?: string;
3097
- }, FetchOptions["throw"] extends true ? true : false>>;
3098
- } & {
3099
- ":token": <FetchOptions extends {
3100
- credentials?: RequestCredentials | undefined;
3101
- method?: string | undefined;
3102
- headers?: (HeadersInit & (HeadersInit | {
3103
- accept: "application/json" | "text/plain" | "application/octet-stream";
3104
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3105
- authorization: "Bearer" | "Basic";
3106
- })) | undefined;
3107
- cache?: RequestCache | undefined;
3108
- integrity?: string | undefined;
3109
- keepalive?: boolean | undefined;
3110
- mode?: RequestMode | undefined;
3111
- priority?: RequestPriority | undefined;
3112
- redirect?: RequestRedirect | undefined;
3113
- referrer?: string | undefined;
3114
- referrerPolicy?: ReferrerPolicy | undefined;
3115
- signal?: (AbortSignal | null) | undefined;
3116
- window?: null | undefined;
3117
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3118
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3119
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3120
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3121
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3122
- hookOptions?: {
3123
- cloneResponse?: boolean;
3124
- } | undefined;
3125
- timeout?: number | undefined;
3126
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3127
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3128
- baseURL?: string | undefined;
3129
- throw?: boolean | undefined;
3130
- auth?: ({
3131
- type: "Bearer";
3132
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3133
- } | {
3134
- type: "Basic";
3135
- username: string | (() => string | undefined) | undefined;
3136
- password: string | (() => string | undefined) | undefined;
3137
- } | {
3138
- type: "Custom";
3139
- prefix: string | (() => string | undefined) | undefined;
3140
- value: string | (() => string | undefined) | undefined;
3141
- }) | undefined;
3142
- body?: undefined;
3143
- query?: (Partial<{
3144
- callbackURL: string;
3145
- }> & Record<string, any>) | undefined;
3146
- params?: {
3147
- token: string;
3148
- } | undefined;
3149
- duplex?: "full" | "half" | undefined;
3150
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3151
- retry?: better_auth_react.RetryOptions | undefined;
3152
- retryAttempt?: number | undefined;
3153
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3154
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3155
- disableValidation?: boolean | undefined;
3156
- }>(data_0: better_auth.Prettify<{
3157
- query: {
3158
- callbackURL: string;
3159
- };
3160
- fetchOptions?: FetchOptions | undefined;
3161
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
3162
- code?: string;
3163
- message?: string;
3164
- }, FetchOptions["throw"] extends true ? true : false>>;
3165
- };
2728
+ }, FetchOptions["throw"] extends true ? true : false>>;
2729
+ } & {
3166
2730
  verifyEmail: <FetchOptions extends {
3167
2731
  credentials?: RequestCredentials | undefined;
3168
2732
  method?: string | undefined;
@@ -3243,6 +2807,7 @@ declare function createAuthClient(config: AuthClientConfig): {
3243
2807
  code?: string;
3244
2808
  message?: string;
3245
2809
  }, FetchOptions["throw"] extends true ? true : false>>;
2810
+ } & {
3246
2811
  sendVerificationEmail: <FetchOptions extends {
3247
2812
  credentials?: RequestCredentials | undefined;
3248
2813
  method?: string | undefined;
@@ -3310,6 +2875,7 @@ declare function createAuthClient(config: AuthClientConfig): {
3310
2875
  code?: string;
3311
2876
  message?: string;
3312
2877
  }, FetchOptions["throw"] extends true ? true : false>>;
2878
+ } & {
3313
2879
  changeEmail: <FetchOptions extends {
3314
2880
  credentials?: RequestCredentials | undefined;
3315
2881
  method?: string | undefined;
@@ -3377,6 +2943,7 @@ declare function createAuthClient(config: AuthClientConfig): {
3377
2943
  code?: string;
3378
2944
  message?: string;
3379
2945
  }, FetchOptions["throw"] extends true ? true : false>>;
2946
+ } & {
3380
2947
  changePassword: <FetchOptions extends {
3381
2948
  credentials?: RequestCredentials | undefined;
3382
2949
  method?: string | undefined;
@@ -3455,6 +3022,7 @@ declare function createAuthClient(config: AuthClientConfig): {
3455
3022
  code?: string;
3456
3023
  message?: string;
3457
3024
  }, FetchOptions["throw"] extends true ? true : false>>;
3025
+ } & {
3458
3026
  updateUser: <FetchOptions extends {
3459
3027
  credentials?: RequestCredentials | undefined;
3460
3028
  method?: string | undefined;
@@ -3521,7 +3089,8 @@ declare function createAuthClient(config: AuthClientConfig): {
3521
3089
  code?: string;
3522
3090
  message?: string;
3523
3091
  }, FetchOptions["throw"] extends true ? true : false>>;
3524
- deleteUser: (<FetchOptions extends {
3092
+ } & {
3093
+ deleteUser: <FetchOptions extends {
3525
3094
  credentials?: RequestCredentials | undefined;
3526
3095
  method?: string | undefined;
3527
3096
  headers?: (HeadersInit & (HeadersInit | {
@@ -3590,8 +3159,10 @@ declare function createAuthClient(config: AuthClientConfig): {
3590
3159
  }, {
3591
3160
  code?: string;
3592
3161
  message?: string;
3593
- }, FetchOptions["throw"] extends true ? true : false>>) & {
3594
- callback: <FetchOptions extends {
3162
+ }, FetchOptions["throw"] extends true ? true : false>>;
3163
+ } & {
3164
+ resetPassword: {
3165
+ ":token": <FetchOptions extends {
3595
3166
  credentials?: RequestCredentials | undefined;
3596
3167
  method?: string | undefined;
3597
3168
  headers?: (HeadersInit & (HeadersInit | {
@@ -3636,10 +3207,11 @@ declare function createAuthClient(config: AuthClientConfig): {
3636
3207
  }) | undefined;
3637
3208
  body?: undefined;
3638
3209
  query?: (Partial<{
3639
- token: string;
3640
- callbackURL?: string | undefined;
3210
+ callbackURL: string;
3641
3211
  }> & Record<string, any>) | undefined;
3642
- params?: Record<string, any> | undefined;
3212
+ params?: {
3213
+ token: string;
3214
+ } | undefined;
3643
3215
  duplex?: "full" | "half" | undefined;
3644
3216
  jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3645
3217
  retry?: better_auth_react.RetryOptions | undefined;
@@ -3649,18 +3221,15 @@ declare function createAuthClient(config: AuthClientConfig): {
3649
3221
  disableValidation?: boolean | undefined;
3650
3222
  }>(data_0: better_auth.Prettify<{
3651
3223
  query: {
3652
- token: string;
3653
- callbackURL?: string | undefined;
3224
+ callbackURL: string;
3654
3225
  };
3655
3226
  fetchOptions?: FetchOptions | undefined;
3656
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3657
- success: boolean;
3658
- message: string;
3659
- }, {
3227
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
3660
3228
  code?: string;
3661
3229
  message?: string;
3662
3230
  }, FetchOptions["throw"] extends true ? true : false>>;
3663
3231
  };
3232
+ } & {
3664
3233
  requestPasswordReset: <FetchOptions extends {
3665
3234
  credentials?: RequestCredentials | undefined;
3666
3235
  method?: string | undefined;
@@ -3729,6 +3298,76 @@ declare function createAuthClient(config: AuthClientConfig): {
3729
3298
  code?: string;
3730
3299
  message?: string;
3731
3300
  }, FetchOptions["throw"] extends true ? true : false>>;
3301
+ } & {
3302
+ resetPassword: {
3303
+ ":token": <FetchOptions extends {
3304
+ credentials?: RequestCredentials | undefined;
3305
+ method?: string | undefined;
3306
+ headers?: (HeadersInit & (HeadersInit | {
3307
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3308
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3309
+ authorization: "Bearer" | "Basic";
3310
+ })) | undefined;
3311
+ cache?: RequestCache | undefined;
3312
+ integrity?: string | undefined;
3313
+ keepalive?: boolean | undefined;
3314
+ mode?: RequestMode | undefined;
3315
+ priority?: RequestPriority | undefined;
3316
+ redirect?: RequestRedirect | undefined;
3317
+ referrer?: string | undefined;
3318
+ referrerPolicy?: ReferrerPolicy | undefined;
3319
+ signal?: (AbortSignal | null) | undefined;
3320
+ window?: null | undefined;
3321
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3322
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3323
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3324
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3325
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3326
+ hookOptions?: {
3327
+ cloneResponse?: boolean;
3328
+ } | undefined;
3329
+ timeout?: number | undefined;
3330
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3331
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3332
+ baseURL?: string | undefined;
3333
+ throw?: boolean | undefined;
3334
+ auth?: ({
3335
+ type: "Bearer";
3336
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3337
+ } | {
3338
+ type: "Basic";
3339
+ username: string | (() => string | undefined) | undefined;
3340
+ password: string | (() => string | undefined) | undefined;
3341
+ } | {
3342
+ type: "Custom";
3343
+ prefix: string | (() => string | undefined) | undefined;
3344
+ value: string | (() => string | undefined) | undefined;
3345
+ }) | undefined;
3346
+ body?: undefined;
3347
+ query?: (Partial<{
3348
+ callbackURL: string;
3349
+ }> & Record<string, any>) | undefined;
3350
+ params?: {
3351
+ token: string;
3352
+ } | undefined;
3353
+ duplex?: "full" | "half" | undefined;
3354
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3355
+ retry?: better_auth_react.RetryOptions | undefined;
3356
+ retryAttempt?: number | undefined;
3357
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3358
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3359
+ disableValidation?: boolean | undefined;
3360
+ }>(data_0: better_auth.Prettify<{
3361
+ query: {
3362
+ callbackURL: string;
3363
+ };
3364
+ fetchOptions?: FetchOptions | undefined;
3365
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
3366
+ code?: string;
3367
+ message?: string;
3368
+ }, FetchOptions["throw"] extends true ? true : false>>;
3369
+ };
3370
+ } & {
3732
3371
  listSessions: <FetchOptions extends {
3733
3372
  credentials?: RequestCredentials | undefined;
3734
3373
  method?: string | undefined;
@@ -3798,6 +3437,7 @@ declare function createAuthClient(config: AuthClientConfig): {
3798
3437
  code?: string;
3799
3438
  message?: string;
3800
3439
  }, FetchOptions["throw"] extends true ? true : false>>;
3440
+ } & {
3801
3441
  revokeSession: <FetchOptions extends {
3802
3442
  credentials?: RequestCredentials | undefined;
3803
3443
  method?: string | undefined;
@@ -3863,6 +3503,7 @@ declare function createAuthClient(config: AuthClientConfig): {
3863
3503
  code?: string;
3864
3504
  message?: string;
3865
3505
  }, FetchOptions["throw"] extends true ? true : false>>;
3506
+ } & {
3866
3507
  revokeSessions: <FetchOptions extends {
3867
3508
  credentials?: RequestCredentials | undefined;
3868
3509
  method?: string | undefined;
@@ -3925,6 +3566,7 @@ declare function createAuthClient(config: AuthClientConfig): {
3925
3566
  code?: string;
3926
3567
  message?: string;
3927
3568
  }, FetchOptions["throw"] extends true ? true : false>>;
3569
+ } & {
3928
3570
  revokeOtherSessions: <FetchOptions extends {
3929
3571
  credentials?: RequestCredentials | undefined;
3930
3572
  method?: string | undefined;
@@ -3987,6 +3629,7 @@ declare function createAuthClient(config: AuthClientConfig): {
3987
3629
  code?: string;
3988
3630
  message?: string;
3989
3631
  }, FetchOptions["throw"] extends true ? true : false>>;
3632
+ } & {
3990
3633
  linkSocial: <FetchOptions extends {
3991
3634
  credentials?: RequestCredentials | undefined;
3992
3635
  method?: string | undefined;
@@ -4077,6 +3720,7 @@ declare function createAuthClient(config: AuthClientConfig): {
4077
3720
  code?: string;
4078
3721
  message?: string;
4079
3722
  }, FetchOptions["throw"] extends true ? true : false>>;
3723
+ } & {
4080
3724
  listAccounts: <FetchOptions extends {
4081
3725
  credentials?: RequestCredentials | undefined;
4082
3726
  method?: string | undefined;
@@ -4144,6 +3788,79 @@ declare function createAuthClient(config: AuthClientConfig): {
4144
3788
  code?: string;
4145
3789
  message?: string;
4146
3790
  }, FetchOptions["throw"] extends true ? true : false>>;
3791
+ } & {
3792
+ deleteUser: {
3793
+ callback: <FetchOptions extends {
3794
+ credentials?: RequestCredentials | undefined;
3795
+ method?: string | undefined;
3796
+ headers?: (HeadersInit & (HeadersInit | {
3797
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3798
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3799
+ authorization: "Bearer" | "Basic";
3800
+ })) | undefined;
3801
+ cache?: RequestCache | undefined;
3802
+ integrity?: string | undefined;
3803
+ keepalive?: boolean | undefined;
3804
+ mode?: RequestMode | undefined;
3805
+ priority?: RequestPriority | undefined;
3806
+ redirect?: RequestRedirect | undefined;
3807
+ referrer?: string | undefined;
3808
+ referrerPolicy?: ReferrerPolicy | undefined;
3809
+ signal?: (AbortSignal | null) | undefined;
3810
+ window?: null | undefined;
3811
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3812
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3813
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3814
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3815
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3816
+ hookOptions?: {
3817
+ cloneResponse?: boolean;
3818
+ } | undefined;
3819
+ timeout?: number | undefined;
3820
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3821
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3822
+ baseURL?: string | undefined;
3823
+ throw?: boolean | undefined;
3824
+ auth?: ({
3825
+ type: "Bearer";
3826
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3827
+ } | {
3828
+ type: "Basic";
3829
+ username: string | (() => string | undefined) | undefined;
3830
+ password: string | (() => string | undefined) | undefined;
3831
+ } | {
3832
+ type: "Custom";
3833
+ prefix: string | (() => string | undefined) | undefined;
3834
+ value: string | (() => string | undefined) | undefined;
3835
+ }) | undefined;
3836
+ body?: undefined;
3837
+ query?: (Partial<{
3838
+ token: string;
3839
+ callbackURL?: string | undefined;
3840
+ }> & Record<string, any>) | undefined;
3841
+ params?: Record<string, any> | undefined;
3842
+ duplex?: "full" | "half" | undefined;
3843
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3844
+ retry?: better_auth_react.RetryOptions | undefined;
3845
+ retryAttempt?: number | undefined;
3846
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3847
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3848
+ disableValidation?: boolean | undefined;
3849
+ }>(data_0: better_auth.Prettify<{
3850
+ query: {
3851
+ token: string;
3852
+ callbackURL?: string | undefined;
3853
+ };
3854
+ fetchOptions?: FetchOptions | undefined;
3855
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3856
+ success: boolean;
3857
+ message: string;
3858
+ }, {
3859
+ code?: string;
3860
+ message?: string;
3861
+ }, FetchOptions["throw"] extends true ? true : false>>;
3862
+ };
3863
+ } & {
4147
3864
  unlinkAccount: <FetchOptions extends {
4148
3865
  credentials?: RequestCredentials | undefined;
4149
3866
  method?: string | undefined;
@@ -4211,6 +3928,7 @@ declare function createAuthClient(config: AuthClientConfig): {
4211
3928
  code?: string;
4212
3929
  message?: string;
4213
3930
  }, FetchOptions["throw"] extends true ? true : false>>;
3931
+ } & {
4214
3932
  refreshToken: <FetchOptions extends {
4215
3933
  credentials?: RequestCredentials | undefined;
4216
3934
  method?: string | undefined;
@@ -4278,6 +3996,7 @@ declare function createAuthClient(config: AuthClientConfig): {
4278
3996
  code?: string;
4279
3997
  message?: string;
4280
3998
  }, FetchOptions["throw"] extends true ? true : false>>;
3999
+ } & {
4281
4000
  getAccessToken: <FetchOptions extends {
4282
4001
  credentials?: RequestCredentials | undefined;
4283
4002
  method?: string | undefined;
@@ -4350,6 +4069,7 @@ declare function createAuthClient(config: AuthClientConfig): {
4350
4069
  code?: string;
4351
4070
  message?: string;
4352
4071
  }, FetchOptions["throw"] extends true ? true : false>>;
4072
+ } & {
4353
4073
  accountInfo: <FetchOptions extends {
4354
4074
  credentials?: RequestCredentials | undefined;
4355
4075
  method?: string | undefined;
@@ -4416,6 +4136,123 @@ declare function createAuthClient(config: AuthClientConfig): {
4416
4136
  code?: string;
4417
4137
  message?: string;
4418
4138
  }, FetchOptions["throw"] extends true ? true : false>>;
4139
+ } & {
4140
+ getSession: <FetchOptions extends {
4141
+ credentials?: RequestCredentials | undefined;
4142
+ method?: string | undefined;
4143
+ headers?: (HeadersInit & (HeadersInit | {
4144
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4145
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4146
+ authorization: "Bearer" | "Basic";
4147
+ })) | undefined;
4148
+ cache?: RequestCache | undefined;
4149
+ integrity?: string | undefined;
4150
+ keepalive?: boolean | undefined;
4151
+ mode?: RequestMode | undefined;
4152
+ priority?: RequestPriority | undefined;
4153
+ redirect?: RequestRedirect | undefined;
4154
+ referrer?: string | undefined;
4155
+ referrerPolicy?: ReferrerPolicy | undefined;
4156
+ signal?: (AbortSignal | null) | undefined;
4157
+ window?: null | undefined;
4158
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4159
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4160
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4161
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4162
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4163
+ hookOptions?: {
4164
+ cloneResponse?: boolean;
4165
+ } | undefined;
4166
+ timeout?: number | undefined;
4167
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4168
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4169
+ baseURL?: string | undefined;
4170
+ throw?: boolean | undefined;
4171
+ auth?: ({
4172
+ type: "Bearer";
4173
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4174
+ } | {
4175
+ type: "Basic";
4176
+ username: string | (() => string | undefined) | undefined;
4177
+ password: string | (() => string | undefined) | undefined;
4178
+ } | {
4179
+ type: "Custom";
4180
+ prefix: string | (() => string | undefined) | undefined;
4181
+ value: string | (() => string | undefined) | undefined;
4182
+ }) | undefined;
4183
+ body?: undefined;
4184
+ query?: (Partial<{
4185
+ disableCookieCache?: unknown;
4186
+ disableRefresh?: unknown;
4187
+ }> & Record<string, any>) | undefined;
4188
+ params?: Record<string, any> | undefined;
4189
+ duplex?: "full" | "half" | undefined;
4190
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4191
+ retry?: better_auth_react.RetryOptions | undefined;
4192
+ retryAttempt?: number | undefined;
4193
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4194
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4195
+ disableValidation?: boolean | undefined;
4196
+ }>(data_0?: better_auth.Prettify<{
4197
+ query?: {
4198
+ disableCookieCache?: unknown;
4199
+ disableRefresh?: unknown;
4200
+ } | undefined;
4201
+ fetchOptions?: FetchOptions | undefined;
4202
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4203
+ user: {
4204
+ id: string;
4205
+ createdAt: Date;
4206
+ updatedAt: Date;
4207
+ email: string;
4208
+ emailVerified: boolean;
4209
+ name: string;
4210
+ image?: string | null | undefined;
4211
+ };
4212
+ session: {
4213
+ id: string;
4214
+ createdAt: Date;
4215
+ updatedAt: Date;
4216
+ userId: string;
4217
+ expiresAt: Date;
4218
+ token: string;
4219
+ ipAddress?: string | null | undefined;
4220
+ userAgent?: string | null | undefined;
4221
+ };
4222
+ } | null, {
4223
+ code?: string;
4224
+ message?: string;
4225
+ }, FetchOptions["throw"] extends true ? true : false>>;
4226
+ } & {
4227
+ useSession: () => {
4228
+ data: {
4229
+ user: {
4230
+ id: string;
4231
+ createdAt: Date;
4232
+ updatedAt: Date;
4233
+ email: string;
4234
+ emailVerified: boolean;
4235
+ name: string;
4236
+ image?: string | null | undefined;
4237
+ };
4238
+ session: {
4239
+ id: string;
4240
+ createdAt: Date;
4241
+ updatedAt: Date;
4242
+ userId: string;
4243
+ expiresAt: Date;
4244
+ token: string;
4245
+ ipAddress?: string | null | undefined;
4246
+ userAgent?: string | null | undefined;
4247
+ };
4248
+ } | null;
4249
+ isPending: boolean;
4250
+ isRefetching: boolean;
4251
+ error: better_auth_react.BetterFetchError | null;
4252
+ refetch: (queryParams?: {
4253
+ query?: better_auth.SessionQueryParams;
4254
+ }) => void;
4255
+ };
4419
4256
  $Infer: {
4420
4257
  Session: {
4421
4258
  user: {