@erikey/react 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,15 +1,8 @@
1
+ import * as better_auth from 'better-auth';
2
+ export { Session, User } from 'better-auth';
1
3
  import * as better_auth_react from 'better-auth/react';
2
- import { AuthClientConfig, AuthClient as AuthClient$1 } from '@erikey/js';
3
- export { AuthClientConfig, AuthResponse, DeleteValueResponse, DeleteValuesResponse, GetValueResponse, GetValuesResponse, KvBulkSetInput, KvPair, PasswordResetResponse, Session, SetValueResponse, SetValuesResponse, SignInData, SignOutResponse, SignUpData, User, UserResponse } from '@erikey/js';
4
4
  export { APIKey, Organization, Permission, SessionData } from '@erikey/core/types';
5
5
 
6
- type SessionQueryParams = {
7
- disableCookieCache?: boolean;
8
- disableRefresh?: boolean;
9
- };
10
-
11
- type Prettify<T> = Omit<T, never>;
12
-
13
6
  interface DashboardClientConfig {
14
7
  /**
15
8
  * Base URL for the auth API
@@ -115,7 +108,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
115
108
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
116
109
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
117
110
  disableValidation?: boolean | undefined;
118
- }>(data_0: Prettify<{
111
+ }>(data_0: better_auth.Prettify<{
119
112
  provider: unknown;
120
113
  callbackURL?: string | undefined;
121
114
  newUserCallbackURL?: string | undefined;
@@ -208,7 +201,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
208
201
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
209
202
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
210
203
  disableValidation?: boolean | undefined;
211
- }>(data_0?: Prettify<{
204
+ }>(data_0?: better_auth.Prettify<{
212
205
  query?: Record<string, any> | undefined;
213
206
  fetchOptions?: FetchOptions | undefined;
214
207
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
@@ -279,7 +272,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
279
272
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
280
273
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
281
274
  disableValidation?: boolean | undefined;
282
- }>(data_0: Prettify<{
275
+ }>(data_0: better_auth.Prettify<{
283
276
  email: string;
284
277
  name: string;
285
278
  password: string;
@@ -373,7 +366,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
373
366
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
374
367
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
375
368
  disableValidation?: boolean | undefined;
376
- }>(data_0: Prettify<{
369
+ }>(data_0: better_auth.Prettify<{
377
370
  email: string;
378
371
  password: string;
379
372
  callbackURL?: string | undefined;
@@ -455,7 +448,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
455
448
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
456
449
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
457
450
  disableValidation?: boolean | undefined;
458
- }>(data_0: Prettify<{
451
+ }>(data_0: better_auth.Prettify<{
459
452
  email: string;
460
453
  redirectTo?: string | undefined;
461
454
  } & {
@@ -525,7 +518,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
525
518
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
526
519
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
527
520
  disableValidation?: boolean | undefined;
528
- }>(data_0: Prettify<{
521
+ }>(data_0: better_auth.Prettify<{
529
522
  newPassword: string;
530
523
  token?: string | undefined;
531
524
  } & {
@@ -593,7 +586,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
593
586
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
594
587
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
595
588
  disableValidation?: boolean | undefined;
596
- }>(data_0: Prettify<{
589
+ }>(data_0: better_auth.Prettify<{
597
590
  query: {
598
591
  token: string;
599
592
  callbackURL?: string | undefined;
@@ -674,7 +667,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
674
667
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
675
668
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
676
669
  disableValidation?: boolean | undefined;
677
- }>(data_0: Prettify<{
670
+ }>(data_0: better_auth.Prettify<{
678
671
  email: string;
679
672
  callbackURL?: string | undefined;
680
673
  } & {
@@ -742,7 +735,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
742
735
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
743
736
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
744
737
  disableValidation?: boolean | undefined;
745
- }>(data_0: Prettify<{
738
+ }>(data_0: better_auth.Prettify<{
746
739
  newEmail: string;
747
740
  callbackURL?: string | undefined;
748
741
  } & {
@@ -811,7 +804,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
811
804
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
812
805
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
813
806
  disableValidation?: boolean | undefined;
814
- }>(data_0: Prettify<{
807
+ }>(data_0: better_auth.Prettify<{
815
808
  newPassword: string;
816
809
  currentPassword: string;
817
810
  revokeOtherSessions?: boolean | undefined;
@@ -889,7 +882,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
889
882
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
890
883
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
891
884
  disableValidation?: boolean | undefined;
892
- }>(data_0?: Prettify<{
885
+ }>(data_0?: better_auth.Prettify<{
893
886
  image?: string | null;
894
887
  name?: string;
895
888
  fetchOptions?: FetchOptions | undefined;
@@ -957,7 +950,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
957
950
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
958
951
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
959
952
  disableValidation?: boolean | undefined;
960
- }>(data_0?: Prettify<{
953
+ }>(data_0?: better_auth.Prettify<{
961
954
  callbackURL?: string | undefined;
962
955
  password?: string | undefined;
963
956
  token?: string | undefined;
@@ -1029,7 +1022,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1029
1022
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1030
1023
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1031
1024
  disableValidation?: boolean | undefined;
1032
- }>(data_0: Prettify<{
1025
+ }>(data_0: better_auth.Prettify<{
1033
1026
  query: {
1034
1027
  callbackURL: string;
1035
1028
  };
@@ -1096,7 +1089,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1096
1089
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1097
1090
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1098
1091
  disableValidation?: boolean | undefined;
1099
- }>(data_0: Prettify<{
1092
+ }>(data_0: better_auth.Prettify<{
1100
1093
  email: string;
1101
1094
  redirectTo?: string | undefined;
1102
1095
  } & {
@@ -1167,7 +1160,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1167
1160
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1168
1161
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1169
1162
  disableValidation?: boolean | undefined;
1170
- }>(data_0: Prettify<{
1163
+ }>(data_0: better_auth.Prettify<{
1171
1164
  query: {
1172
1165
  callbackURL: string;
1173
1166
  };
@@ -1231,10 +1224,10 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1231
1224
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1232
1225
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1233
1226
  disableValidation?: boolean | undefined;
1234
- }>(data_0?: Prettify<{
1227
+ }>(data_0?: better_auth.Prettify<{
1235
1228
  query?: Record<string, any> | undefined;
1236
1229
  fetchOptions?: FetchOptions | undefined;
1237
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Prettify<{
1230
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<better_auth.Prettify<{
1238
1231
  id: string;
1239
1232
  createdAt: Date;
1240
1233
  updatedAt: Date;
@@ -1303,7 +1296,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1303
1296
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1304
1297
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1305
1298
  disableValidation?: boolean | undefined;
1306
- }>(data_0: Prettify<{
1299
+ }>(data_0: better_auth.Prettify<{
1307
1300
  token: string;
1308
1301
  } & {
1309
1302
  fetchOptions?: FetchOptions | undefined;
@@ -1367,7 +1360,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1367
1360
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1368
1361
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1369
1362
  disableValidation?: boolean | undefined;
1370
- }>(data_0?: Prettify<{
1363
+ }>(data_0?: better_auth.Prettify<{
1371
1364
  query?: Record<string, any> | undefined;
1372
1365
  fetchOptions?: FetchOptions | undefined;
1373
1366
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
@@ -1430,7 +1423,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1430
1423
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1431
1424
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1432
1425
  disableValidation?: boolean | undefined;
1433
- }>(data_0?: Prettify<{
1426
+ }>(data_0?: better_auth.Prettify<{
1434
1427
  query?: Record<string, any> | undefined;
1435
1428
  fetchOptions?: FetchOptions | undefined;
1436
1429
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
@@ -1507,7 +1500,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1507
1500
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1508
1501
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1509
1502
  disableValidation?: boolean | undefined;
1510
- }>(data_0: Prettify<{
1503
+ }>(data_0: better_auth.Prettify<{
1511
1504
  provider: unknown;
1512
1505
  callbackURL?: string | undefined;
1513
1506
  idToken?: {
@@ -1584,7 +1577,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1584
1577
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1585
1578
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1586
1579
  disableValidation?: boolean | undefined;
1587
- }>(data_0?: Prettify<{
1580
+ }>(data_0?: better_auth.Prettify<{
1588
1581
  query?: Record<string, any> | undefined;
1589
1582
  fetchOptions?: FetchOptions | undefined;
1590
1583
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
@@ -1656,7 +1649,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1656
1649
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1657
1650
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1658
1651
  disableValidation?: boolean | undefined;
1659
- }>(data_0: Prettify<{
1652
+ }>(data_0: better_auth.Prettify<{
1660
1653
  query: {
1661
1654
  token: string;
1662
1655
  callbackURL?: string | undefined;
@@ -1727,7 +1720,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1727
1720
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1728
1721
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1729
1722
  disableValidation?: boolean | undefined;
1730
- }>(data_0: Prettify<{
1723
+ }>(data_0: better_auth.Prettify<{
1731
1724
  providerId: string;
1732
1725
  accountId?: string | undefined;
1733
1726
  } & {
@@ -1796,7 +1789,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1796
1789
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1797
1790
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1798
1791
  disableValidation?: boolean | undefined;
1799
- }>(data_0: Prettify<{
1792
+ }>(data_0: better_auth.Prettify<{
1800
1793
  providerId: string;
1801
1794
  accountId?: string | undefined;
1802
1795
  userId?: string | undefined;
@@ -1864,7 +1857,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1864
1857
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1865
1858
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1866
1859
  disableValidation?: boolean | undefined;
1867
- }>(data_0: Prettify<{
1860
+ }>(data_0: better_auth.Prettify<{
1868
1861
  providerId: string;
1869
1862
  accountId?: string | undefined;
1870
1863
  userId?: string | undefined;
@@ -1935,7 +1928,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
1935
1928
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1936
1929
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1937
1930
  disableValidation?: boolean | undefined;
1938
- }>(data_0: Prettify<{
1931
+ }>(data_0: better_auth.Prettify<{
1939
1932
  accountId: string;
1940
1933
  } & {
1941
1934
  fetchOptions?: FetchOptions | undefined;
@@ -2003,7 +1996,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
2003
1996
  output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2004
1997
  errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2005
1998
  disableValidation?: boolean | undefined;
2006
- }>(data_0?: Prettify<{
1999
+ }>(data_0?: better_auth.Prettify<{
2007
2000
  query?: {
2008
2001
  disableCookieCache?: unknown;
2009
2002
  disableRefresh?: unknown;
@@ -2060,7 +2053,7 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
2060
2053
  isRefetching: boolean;
2061
2054
  error: better_auth_react.BetterFetchError | null;
2062
2055
  refetch: (queryParams?: {
2063
- query?: SessionQueryParams;
2056
+ query?: better_auth.SessionQueryParams;
2064
2057
  }) => void;
2065
2058
  };
2066
2059
  $Infer: {
@@ -2190,26 +2183,2497 @@ declare function createDashboardClient(config?: DashboardClientConfig): {
2190
2183
  type DashboardClient = ReturnType<typeof createDashboardClient>;
2191
2184
 
2192
2185
  /**
2193
- * @erikey/react - React SDK with Sandpack support
2186
+ * @erikey/react - Auth Client
2187
+ *
2188
+ * Wraps better-auth/react with Erikey-specific enhancements:
2189
+ * - X-Project-Id header injection for multi-tenant routing
2190
+ * - Bearer token auth for cross-origin iframes (Sandpack)
2191
+ * - localStorage token storage when cookies are blocked
2194
2192
  *
2195
- * Wraps universal @erikey/js client with browser-specific enhancements:
2196
- * - Sandpack/iframe detection
2197
- * - localStorage token storage for cross-origin iframes
2198
- * - Automatic fallback when cookies are blocked
2193
+ * This replaces 300+ lines of custom fetch code with better-auth client,
2194
+ * enabling signIn.social(), useSession(), and all better-auth features.
2199
2195
  */
2196
+ interface AuthClientConfig {
2197
+ /**
2198
+ * Your Erikey project ID (pk_live_xxx or pk_test_xxx)
2199
+ */
2200
+ projectId: string;
2201
+ /**
2202
+ * Base URL for the auth API
2203
+ * @default 'https://auth.erikey.com'
2204
+ */
2205
+ baseUrl?: string;
2206
+ }
2200
2207
 
2201
2208
  /**
2202
- * Create auth client with Sandpack support
2209
+ * Create an auth client for end-user authentication
2203
2210
  *
2204
- * Wraps the universal client and adds:
2205
- * - Automatic Sandpack detection
2206
- * - localStorage token storage for iframes
2207
- * - Bearer token fallback when cookies blocked
2208
- */
2209
- declare function createAuthClient(config: AuthClientConfig): AuthClient$1;
2210
- /**
2211
- * Type helper for inferring the auth client type
2211
+ * Wraps better-auth/react with Erikey-specific enhancements.
2212
+ * Automatically detects cross-origin iframes (Sandpack) and uses
2213
+ * Bearer tokens instead of cookies.
2214
+ *
2215
+ * @example Basic usage
2216
+ * ```tsx
2217
+ * import { createAuthClient } from '@erikey/react';
2218
+ *
2219
+ * const auth = createAuthClient({
2220
+ * projectId: 'pk_live_xxx',
2221
+ * });
2222
+ *
2223
+ * // Email auth
2224
+ * await auth.signIn.email({ email, password });
2225
+ * await auth.signUp.email({ email, password, name });
2226
+ *
2227
+ * // Social OAuth
2228
+ * await auth.signIn.social({ provider: 'google' });
2229
+ *
2230
+ * // Reactive session hook (React)
2231
+ * const { data: session, isPending } = auth.useSession();
2232
+ *
2233
+ * // Sign out
2234
+ * await auth.signOut();
2235
+ * ```
2212
2236
  */
2213
- type AuthClient = ReturnType<typeof createAuthClient>;
2237
+ declare function createAuthClient(config: AuthClientConfig): {
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
+ social: <FetchOptions extends {
2388
+ credentials?: RequestCredentials | undefined;
2389
+ method?: string | undefined;
2390
+ headers?: (HeadersInit & (HeadersInit | {
2391
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2392
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2393
+ authorization: "Bearer" | "Basic";
2394
+ })) | undefined;
2395
+ cache?: RequestCache | undefined;
2396
+ integrity?: string | undefined;
2397
+ keepalive?: boolean | undefined;
2398
+ mode?: RequestMode | undefined;
2399
+ priority?: RequestPriority | undefined;
2400
+ redirect?: RequestRedirect | undefined;
2401
+ referrer?: string | undefined;
2402
+ referrerPolicy?: ReferrerPolicy | undefined;
2403
+ signal?: (AbortSignal | null) | undefined;
2404
+ window?: null | undefined;
2405
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2406
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2407
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2408
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2409
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2410
+ hookOptions?: {
2411
+ cloneResponse?: boolean;
2412
+ } | undefined;
2413
+ timeout?: number | undefined;
2414
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2415
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2416
+ baseURL?: string | undefined;
2417
+ throw?: boolean | undefined;
2418
+ auth?: ({
2419
+ type: "Bearer";
2420
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2421
+ } | {
2422
+ type: "Basic";
2423
+ username: string | (() => string | undefined) | undefined;
2424
+ password: string | (() => string | undefined) | undefined;
2425
+ } | {
2426
+ type: "Custom";
2427
+ prefix: string | (() => string | undefined) | undefined;
2428
+ value: string | (() => string | undefined) | undefined;
2429
+ }) | undefined;
2430
+ body?: (Partial<{
2431
+ provider: unknown;
2432
+ callbackURL?: string | undefined;
2433
+ newUserCallbackURL?: string | undefined;
2434
+ errorCallbackURL?: string | undefined;
2435
+ disableRedirect?: boolean | undefined;
2436
+ idToken?: {
2437
+ token: string;
2438
+ nonce?: string | undefined;
2439
+ accessToken?: string | undefined;
2440
+ refreshToken?: string | undefined;
2441
+ expiresAt?: number | undefined;
2442
+ } | undefined;
2443
+ scopes?: string[] | undefined;
2444
+ requestSignUp?: boolean | undefined;
2445
+ loginHint?: string | undefined;
2446
+ }> & Record<string, any>) | undefined;
2447
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2448
+ params?: Record<string, any> | undefined;
2449
+ duplex?: "full" | "half" | undefined;
2450
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2451
+ retry?: better_auth_react.RetryOptions | undefined;
2452
+ retryAttempt?: number | undefined;
2453
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2454
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2455
+ disableValidation?: boolean | undefined;
2456
+ }>(data_0: better_auth.Prettify<{
2457
+ provider: unknown;
2458
+ callbackURL?: string | undefined;
2459
+ newUserCallbackURL?: string | undefined;
2460
+ errorCallbackURL?: string | undefined;
2461
+ disableRedirect?: boolean | undefined;
2462
+ idToken?: {
2463
+ token: string;
2464
+ nonce?: string | undefined;
2465
+ accessToken?: string | undefined;
2466
+ refreshToken?: string | undefined;
2467
+ expiresAt?: number | undefined;
2468
+ } | undefined;
2469
+ scopes?: string[] | undefined;
2470
+ requestSignUp?: boolean | undefined;
2471
+ loginHint?: string | undefined;
2472
+ } & {
2473
+ fetchOptions?: FetchOptions | undefined;
2474
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
2475
+ redirect: boolean;
2476
+ token: string;
2477
+ url: undefined;
2478
+ user: {
2479
+ id: string;
2480
+ email: string;
2481
+ name: string;
2482
+ image: string | null | undefined;
2483
+ emailVerified: boolean;
2484
+ createdAt: Date;
2485
+ updatedAt: Date;
2486
+ };
2487
+ } | {
2488
+ url: string;
2489
+ redirect: boolean;
2490
+ }>, {
2491
+ code?: string;
2492
+ message?: string;
2493
+ }, FetchOptions["throw"] extends true ? true : false>>;
2494
+ };
2495
+ 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?: {
2564
+ credentials?: RequestCredentials | undefined;
2565
+ method?: string | undefined;
2566
+ headers?: (HeadersInit & (HeadersInit | {
2567
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2568
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2569
+ authorization: "Bearer" | "Basic";
2570
+ })) | undefined;
2571
+ cache?: RequestCache | undefined;
2572
+ integrity?: string | undefined;
2573
+ keepalive?: boolean | undefined;
2574
+ mode?: RequestMode | undefined;
2575
+ priority?: RequestPriority | undefined;
2576
+ redirect?: RequestRedirect | undefined;
2577
+ referrer?: string | undefined;
2578
+ referrerPolicy?: ReferrerPolicy | undefined;
2579
+ signal?: (AbortSignal | null) | undefined;
2580
+ window?: null | undefined;
2581
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2582
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2583
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2584
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2585
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2586
+ hookOptions?: {
2587
+ cloneResponse?: boolean;
2588
+ } | undefined;
2589
+ timeout?: number | undefined;
2590
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2591
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2592
+ baseURL?: string | undefined;
2593
+ throw?: boolean | undefined;
2594
+ auth?: ({
2595
+ type: "Bearer";
2596
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2597
+ } | {
2598
+ type: "Basic";
2599
+ username: string | (() => string | undefined) | undefined;
2600
+ password: string | (() => string | undefined) | undefined;
2601
+ } | {
2602
+ type: "Custom";
2603
+ prefix: string | (() => string | undefined) | undefined;
2604
+ value: string | (() => string | undefined) | undefined;
2605
+ }) | undefined;
2606
+ body?: (Partial<{
2607
+ name: string;
2608
+ email: string;
2609
+ password: string;
2610
+ image?: string;
2611
+ callbackURL?: string;
2612
+ rememberMe?: boolean;
2613
+ }> & Record<string, any>) | undefined;
2614
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2615
+ params?: Record<string, any> | undefined;
2616
+ duplex?: "full" | "half" | undefined;
2617
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2618
+ retry?: better_auth_react.RetryOptions | undefined;
2619
+ retryAttempt?: number | undefined;
2620
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2621
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2622
+ 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;
2648
+ } | {
2649
+ data: null;
2650
+ error: {
2651
+ code?: string | undefined;
2652
+ message?: string | undefined;
2653
+ status: number;
2654
+ statusText: string;
2655
+ };
2656
+ }>;
2657
+ };
2658
+ signOut: (args_0?: better_auth.Prettify<{
2659
+ query?: Record<string, any> | undefined;
2660
+ fetchOptions?: {
2661
+ credentials?: RequestCredentials | undefined;
2662
+ method?: string | undefined;
2663
+ headers?: (HeadersInit & (HeadersInit | {
2664
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2665
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2666
+ authorization: "Bearer" | "Basic";
2667
+ })) | undefined;
2668
+ cache?: RequestCache | undefined;
2669
+ integrity?: string | undefined;
2670
+ keepalive?: boolean | undefined;
2671
+ mode?: RequestMode | undefined;
2672
+ priority?: RequestPriority | undefined;
2673
+ redirect?: RequestRedirect | undefined;
2674
+ referrer?: string | undefined;
2675
+ referrerPolicy?: ReferrerPolicy | undefined;
2676
+ signal?: (AbortSignal | null) | undefined;
2677
+ window?: null | undefined;
2678
+ 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
+ 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;
2877
+ 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;
2888
+ 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>>;
2896
+ forgetPassword: <FetchOptions extends {
2897
+ credentials?: RequestCredentials | undefined;
2898
+ method?: string | undefined;
2899
+ headers?: (HeadersInit & (HeadersInit | {
2900
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2901
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2902
+ authorization: "Bearer" | "Basic";
2903
+ })) | undefined;
2904
+ cache?: RequestCache | undefined;
2905
+ integrity?: string | undefined;
2906
+ keepalive?: boolean | undefined;
2907
+ mode?: RequestMode | undefined;
2908
+ priority?: RequestPriority | undefined;
2909
+ redirect?: RequestRedirect | undefined;
2910
+ referrer?: string | undefined;
2911
+ referrerPolicy?: ReferrerPolicy | undefined;
2912
+ signal?: (AbortSignal | null) | undefined;
2913
+ window?: null | undefined;
2914
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2915
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2916
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2917
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2918
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2919
+ hookOptions?: {
2920
+ cloneResponse?: boolean;
2921
+ } | undefined;
2922
+ timeout?: number | undefined;
2923
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2924
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2925
+ baseURL?: string | undefined;
2926
+ throw?: boolean | undefined;
2927
+ auth?: ({
2928
+ type: "Bearer";
2929
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2930
+ } | {
2931
+ type: "Basic";
2932
+ username: string | (() => string | undefined) | undefined;
2933
+ password: string | (() => string | undefined) | undefined;
2934
+ } | {
2935
+ type: "Custom";
2936
+ prefix: string | (() => string | undefined) | undefined;
2937
+ value: string | (() => string | undefined) | undefined;
2938
+ }) | undefined;
2939
+ body?: (Partial<{
2940
+ email: string;
2941
+ redirectTo?: string | undefined;
2942
+ }> & Record<string, any>) | undefined;
2943
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2944
+ params?: Record<string, any> | undefined;
2945
+ duplex?: "full" | "half" | undefined;
2946
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2947
+ retry?: better_auth_react.RetryOptions | undefined;
2948
+ retryAttempt?: number | undefined;
2949
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2950
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2951
+ disableValidation?: boolean | undefined;
2952
+ }>(data_0: better_auth.Prettify<{
2953
+ email: string;
2954
+ redirectTo?: string | undefined;
2955
+ } & {
2956
+ fetchOptions?: FetchOptions | undefined;
2957
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2958
+ status: boolean;
2959
+ }, {
2960
+ code?: string;
2961
+ message?: string;
2962
+ }, FetchOptions["throw"] extends true ? true : false>>;
2963
+ resetPassword: (<FetchOptions extends {
2964
+ credentials?: RequestCredentials | undefined;
2965
+ method?: string | undefined;
2966
+ headers?: (HeadersInit & (HeadersInit | {
2967
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2968
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2969
+ authorization: "Bearer" | "Basic";
2970
+ })) | undefined;
2971
+ cache?: RequestCache | undefined;
2972
+ integrity?: string | undefined;
2973
+ keepalive?: boolean | undefined;
2974
+ mode?: RequestMode | undefined;
2975
+ priority?: RequestPriority | undefined;
2976
+ redirect?: RequestRedirect | undefined;
2977
+ referrer?: string | undefined;
2978
+ referrerPolicy?: ReferrerPolicy | undefined;
2979
+ signal?: (AbortSignal | null) | undefined;
2980
+ window?: null | undefined;
2981
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2982
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2983
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2984
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2985
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2986
+ hookOptions?: {
2987
+ cloneResponse?: boolean;
2988
+ } | undefined;
2989
+ timeout?: number | undefined;
2990
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2991
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2992
+ baseURL?: string | undefined;
2993
+ throw?: boolean | undefined;
2994
+ auth?: ({
2995
+ type: "Bearer";
2996
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2997
+ } | {
2998
+ type: "Basic";
2999
+ username: string | (() => string | undefined) | undefined;
3000
+ password: string | (() => string | undefined) | undefined;
3001
+ } | {
3002
+ type: "Custom";
3003
+ prefix: string | (() => string | undefined) | undefined;
3004
+ value: string | (() => string | undefined) | undefined;
3005
+ }) | undefined;
3006
+ body?: (Partial<{
3007
+ newPassword: string;
3008
+ token?: string | undefined;
3009
+ }> & Record<string, any>) | undefined;
3010
+ query?: (Partial<{
3011
+ token?: string | undefined;
3012
+ }> & Record<string, any>) | undefined;
3013
+ params?: Record<string, any> | undefined;
3014
+ duplex?: "full" | "half" | undefined;
3015
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3016
+ retry?: better_auth_react.RetryOptions | undefined;
3017
+ retryAttempt?: number | undefined;
3018
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3019
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3020
+ disableValidation?: boolean | undefined;
3021
+ }>(data_0: better_auth.Prettify<{
3022
+ newPassword: string;
3023
+ token?: string | undefined;
3024
+ } & {
3025
+ fetchOptions?: FetchOptions | undefined;
3026
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3027
+ status: boolean;
3028
+ }, {
3029
+ code?: string;
3030
+ 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
+ };
3166
+ verifyEmail: <FetchOptions extends {
3167
+ credentials?: RequestCredentials | undefined;
3168
+ method?: string | undefined;
3169
+ headers?: (HeadersInit & (HeadersInit | {
3170
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3171
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3172
+ authorization: "Bearer" | "Basic";
3173
+ })) | undefined;
3174
+ cache?: RequestCache | undefined;
3175
+ integrity?: string | undefined;
3176
+ keepalive?: boolean | undefined;
3177
+ mode?: RequestMode | undefined;
3178
+ priority?: RequestPriority | undefined;
3179
+ redirect?: RequestRedirect | undefined;
3180
+ referrer?: string | undefined;
3181
+ referrerPolicy?: ReferrerPolicy | undefined;
3182
+ signal?: (AbortSignal | null) | undefined;
3183
+ window?: null | undefined;
3184
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3185
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3186
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3187
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3188
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3189
+ hookOptions?: {
3190
+ cloneResponse?: boolean;
3191
+ } | undefined;
3192
+ timeout?: number | undefined;
3193
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3194
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3195
+ baseURL?: string | undefined;
3196
+ throw?: boolean | undefined;
3197
+ auth?: ({
3198
+ type: "Bearer";
3199
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3200
+ } | {
3201
+ type: "Basic";
3202
+ username: string | (() => string | undefined) | undefined;
3203
+ password: string | (() => string | undefined) | undefined;
3204
+ } | {
3205
+ type: "Custom";
3206
+ prefix: string | (() => string | undefined) | undefined;
3207
+ value: string | (() => string | undefined) | undefined;
3208
+ }) | undefined;
3209
+ body?: undefined;
3210
+ query?: (Partial<{
3211
+ token: string;
3212
+ callbackURL?: string | undefined;
3213
+ }> & Record<string, any>) | undefined;
3214
+ params?: Record<string, any> | undefined;
3215
+ duplex?: "full" | "half" | undefined;
3216
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3217
+ retry?: better_auth_react.RetryOptions | undefined;
3218
+ retryAttempt?: number | undefined;
3219
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3220
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3221
+ disableValidation?: boolean | undefined;
3222
+ }>(data_0: better_auth.Prettify<{
3223
+ query: {
3224
+ token: string;
3225
+ callbackURL?: string | undefined;
3226
+ };
3227
+ fetchOptions?: FetchOptions | undefined;
3228
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<void | {
3229
+ status: boolean;
3230
+ user: {
3231
+ id: string;
3232
+ email: string;
3233
+ name: string;
3234
+ image: string | null | undefined;
3235
+ emailVerified: boolean;
3236
+ createdAt: Date;
3237
+ updatedAt: Date;
3238
+ };
3239
+ } | {
3240
+ status: boolean;
3241
+ user: null;
3242
+ }>, {
3243
+ code?: string;
3244
+ message?: string;
3245
+ }, FetchOptions["throw"] extends true ? true : false>>;
3246
+ sendVerificationEmail: <FetchOptions extends {
3247
+ credentials?: RequestCredentials | undefined;
3248
+ method?: string | undefined;
3249
+ headers?: (HeadersInit & (HeadersInit | {
3250
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3251
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3252
+ authorization: "Bearer" | "Basic";
3253
+ })) | undefined;
3254
+ cache?: RequestCache | undefined;
3255
+ integrity?: string | undefined;
3256
+ keepalive?: boolean | undefined;
3257
+ mode?: RequestMode | undefined;
3258
+ priority?: RequestPriority | undefined;
3259
+ redirect?: RequestRedirect | undefined;
3260
+ referrer?: string | undefined;
3261
+ referrerPolicy?: ReferrerPolicy | undefined;
3262
+ signal?: (AbortSignal | null) | undefined;
3263
+ window?: null | undefined;
3264
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3265
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3266
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3267
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3268
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3269
+ hookOptions?: {
3270
+ cloneResponse?: boolean;
3271
+ } | undefined;
3272
+ timeout?: number | undefined;
3273
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3274
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3275
+ baseURL?: string | undefined;
3276
+ throw?: boolean | undefined;
3277
+ auth?: ({
3278
+ type: "Bearer";
3279
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3280
+ } | {
3281
+ type: "Basic";
3282
+ username: string | (() => string | undefined) | undefined;
3283
+ password: string | (() => string | undefined) | undefined;
3284
+ } | {
3285
+ type: "Custom";
3286
+ prefix: string | (() => string | undefined) | undefined;
3287
+ value: string | (() => string | undefined) | undefined;
3288
+ }) | undefined;
3289
+ body?: (Partial<{
3290
+ email: string;
3291
+ callbackURL?: string | undefined;
3292
+ }> & Record<string, any>) | undefined;
3293
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3294
+ params?: Record<string, any> | undefined;
3295
+ duplex?: "full" | "half" | undefined;
3296
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3297
+ retry?: better_auth_react.RetryOptions | undefined;
3298
+ retryAttempt?: number | undefined;
3299
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3300
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3301
+ disableValidation?: boolean | undefined;
3302
+ }>(data_0: better_auth.Prettify<{
3303
+ email: string;
3304
+ callbackURL?: string | undefined;
3305
+ } & {
3306
+ fetchOptions?: FetchOptions | undefined;
3307
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3308
+ status: boolean;
3309
+ }, {
3310
+ code?: string;
3311
+ message?: string;
3312
+ }, FetchOptions["throw"] extends true ? true : false>>;
3313
+ changeEmail: <FetchOptions extends {
3314
+ credentials?: RequestCredentials | undefined;
3315
+ method?: string | undefined;
3316
+ headers?: (HeadersInit & (HeadersInit | {
3317
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3318
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3319
+ authorization: "Bearer" | "Basic";
3320
+ })) | undefined;
3321
+ cache?: RequestCache | undefined;
3322
+ integrity?: string | undefined;
3323
+ keepalive?: boolean | undefined;
3324
+ mode?: RequestMode | undefined;
3325
+ priority?: RequestPriority | undefined;
3326
+ redirect?: RequestRedirect | undefined;
3327
+ referrer?: string | undefined;
3328
+ referrerPolicy?: ReferrerPolicy | undefined;
3329
+ signal?: (AbortSignal | null) | undefined;
3330
+ window?: null | undefined;
3331
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3332
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3333
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3334
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3335
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3336
+ hookOptions?: {
3337
+ cloneResponse?: boolean;
3338
+ } | undefined;
3339
+ timeout?: number | undefined;
3340
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3341
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3342
+ baseURL?: string | undefined;
3343
+ throw?: boolean | undefined;
3344
+ auth?: ({
3345
+ type: "Bearer";
3346
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3347
+ } | {
3348
+ type: "Basic";
3349
+ username: string | (() => string | undefined) | undefined;
3350
+ password: string | (() => string | undefined) | undefined;
3351
+ } | {
3352
+ type: "Custom";
3353
+ prefix: string | (() => string | undefined) | undefined;
3354
+ value: string | (() => string | undefined) | undefined;
3355
+ }) | undefined;
3356
+ body?: (Partial<{
3357
+ newEmail: string;
3358
+ callbackURL?: string | undefined;
3359
+ }> & Record<string, any>) | undefined;
3360
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3361
+ params?: Record<string, any> | undefined;
3362
+ duplex?: "full" | "half" | undefined;
3363
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3364
+ retry?: better_auth_react.RetryOptions | undefined;
3365
+ retryAttempt?: number | undefined;
3366
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3367
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3368
+ disableValidation?: boolean | undefined;
3369
+ }>(data_0: better_auth.Prettify<{
3370
+ newEmail: string;
3371
+ callbackURL?: string | undefined;
3372
+ } & {
3373
+ fetchOptions?: FetchOptions | undefined;
3374
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3375
+ status: boolean;
3376
+ }, {
3377
+ code?: string;
3378
+ message?: string;
3379
+ }, FetchOptions["throw"] extends true ? true : false>>;
3380
+ changePassword: <FetchOptions extends {
3381
+ credentials?: RequestCredentials | undefined;
3382
+ method?: string | undefined;
3383
+ headers?: (HeadersInit & (HeadersInit | {
3384
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3385
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3386
+ authorization: "Bearer" | "Basic";
3387
+ })) | undefined;
3388
+ cache?: RequestCache | undefined;
3389
+ integrity?: string | undefined;
3390
+ keepalive?: boolean | undefined;
3391
+ mode?: RequestMode | undefined;
3392
+ priority?: RequestPriority | undefined;
3393
+ redirect?: RequestRedirect | undefined;
3394
+ referrer?: string | undefined;
3395
+ referrerPolicy?: ReferrerPolicy | undefined;
3396
+ signal?: (AbortSignal | null) | undefined;
3397
+ window?: null | undefined;
3398
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3399
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3400
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3401
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3402
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3403
+ hookOptions?: {
3404
+ cloneResponse?: boolean;
3405
+ } | undefined;
3406
+ timeout?: number | undefined;
3407
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3408
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3409
+ baseURL?: string | undefined;
3410
+ throw?: boolean | undefined;
3411
+ auth?: ({
3412
+ type: "Bearer";
3413
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3414
+ } | {
3415
+ type: "Basic";
3416
+ username: string | (() => string | undefined) | undefined;
3417
+ password: string | (() => string | undefined) | undefined;
3418
+ } | {
3419
+ type: "Custom";
3420
+ prefix: string | (() => string | undefined) | undefined;
3421
+ value: string | (() => string | undefined) | undefined;
3422
+ }) | undefined;
3423
+ body?: (Partial<{
3424
+ newPassword: string;
3425
+ currentPassword: string;
3426
+ revokeOtherSessions?: boolean | undefined;
3427
+ }> & Record<string, any>) | undefined;
3428
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3429
+ params?: Record<string, any> | undefined;
3430
+ duplex?: "full" | "half" | undefined;
3431
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3432
+ retry?: better_auth_react.RetryOptions | undefined;
3433
+ retryAttempt?: number | undefined;
3434
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3435
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3436
+ disableValidation?: boolean | undefined;
3437
+ }>(data_0: better_auth.Prettify<{
3438
+ newPassword: string;
3439
+ currentPassword: string;
3440
+ revokeOtherSessions?: boolean | undefined;
3441
+ } & {
3442
+ fetchOptions?: FetchOptions | undefined;
3443
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3444
+ token: string | null;
3445
+ user: {
3446
+ id: string;
3447
+ email: string;
3448
+ name: string;
3449
+ image: string | null | undefined;
3450
+ emailVerified: boolean;
3451
+ createdAt: Date;
3452
+ updatedAt: Date;
3453
+ };
3454
+ }, {
3455
+ code?: string;
3456
+ message?: string;
3457
+ }, FetchOptions["throw"] extends true ? true : false>>;
3458
+ updateUser: <FetchOptions extends {
3459
+ credentials?: RequestCredentials | undefined;
3460
+ method?: string | undefined;
3461
+ headers?: (HeadersInit & (HeadersInit | {
3462
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3463
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3464
+ authorization: "Bearer" | "Basic";
3465
+ })) | undefined;
3466
+ cache?: RequestCache | undefined;
3467
+ integrity?: string | undefined;
3468
+ keepalive?: boolean | undefined;
3469
+ mode?: RequestMode | undefined;
3470
+ priority?: RequestPriority | undefined;
3471
+ redirect?: RequestRedirect | undefined;
3472
+ referrer?: string | undefined;
3473
+ referrerPolicy?: ReferrerPolicy | undefined;
3474
+ signal?: (AbortSignal | null) | undefined;
3475
+ window?: null | undefined;
3476
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3477
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3478
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3479
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3480
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3481
+ hookOptions?: {
3482
+ cloneResponse?: boolean;
3483
+ } | undefined;
3484
+ timeout?: number | undefined;
3485
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3486
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3487
+ baseURL?: string | undefined;
3488
+ throw?: boolean | undefined;
3489
+ auth?: ({
3490
+ type: "Bearer";
3491
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3492
+ } | {
3493
+ type: "Basic";
3494
+ username: string | (() => string | undefined) | undefined;
3495
+ password: string | (() => string | undefined) | undefined;
3496
+ } | {
3497
+ type: "Custom";
3498
+ prefix: string | (() => string | undefined) | undefined;
3499
+ value: string | (() => string | undefined) | undefined;
3500
+ }) | undefined;
3501
+ body?: (Partial<Partial<{}> & {
3502
+ name?: string;
3503
+ image?: string;
3504
+ }> & Record<string, any>) | undefined;
3505
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3506
+ params?: Record<string, any> | undefined;
3507
+ duplex?: "full" | "half" | undefined;
3508
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3509
+ retry?: better_auth_react.RetryOptions | undefined;
3510
+ retryAttempt?: number | undefined;
3511
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3512
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3513
+ disableValidation?: boolean | undefined;
3514
+ }>(data_0?: better_auth.Prettify<{
3515
+ image?: string | null;
3516
+ name?: string;
3517
+ fetchOptions?: FetchOptions | undefined;
3518
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3519
+ status: boolean;
3520
+ }, {
3521
+ code?: string;
3522
+ message?: string;
3523
+ }, FetchOptions["throw"] extends true ? true : false>>;
3524
+ deleteUser: (<FetchOptions extends {
3525
+ credentials?: RequestCredentials | undefined;
3526
+ method?: string | undefined;
3527
+ headers?: (HeadersInit & (HeadersInit | {
3528
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3529
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3530
+ authorization: "Bearer" | "Basic";
3531
+ })) | undefined;
3532
+ cache?: RequestCache | undefined;
3533
+ integrity?: string | undefined;
3534
+ keepalive?: boolean | undefined;
3535
+ mode?: RequestMode | undefined;
3536
+ priority?: RequestPriority | undefined;
3537
+ redirect?: RequestRedirect | undefined;
3538
+ referrer?: string | undefined;
3539
+ referrerPolicy?: ReferrerPolicy | undefined;
3540
+ signal?: (AbortSignal | null) | undefined;
3541
+ window?: null | undefined;
3542
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3543
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3544
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3545
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3546
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3547
+ hookOptions?: {
3548
+ cloneResponse?: boolean;
3549
+ } | undefined;
3550
+ timeout?: number | undefined;
3551
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3552
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3553
+ baseURL?: string | undefined;
3554
+ throw?: boolean | undefined;
3555
+ auth?: ({
3556
+ type: "Bearer";
3557
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3558
+ } | {
3559
+ type: "Basic";
3560
+ username: string | (() => string | undefined) | undefined;
3561
+ password: string | (() => string | undefined) | undefined;
3562
+ } | {
3563
+ type: "Custom";
3564
+ prefix: string | (() => string | undefined) | undefined;
3565
+ value: string | (() => string | undefined) | undefined;
3566
+ }) | undefined;
3567
+ body?: (Partial<{
3568
+ callbackURL?: string | undefined;
3569
+ password?: string | undefined;
3570
+ token?: string | undefined;
3571
+ }> & Record<string, any>) | undefined;
3572
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3573
+ params?: Record<string, any> | undefined;
3574
+ duplex?: "full" | "half" | undefined;
3575
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3576
+ retry?: better_auth_react.RetryOptions | undefined;
3577
+ retryAttempt?: number | undefined;
3578
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3579
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3580
+ disableValidation?: boolean | undefined;
3581
+ }>(data_0?: better_auth.Prettify<{
3582
+ callbackURL?: string | undefined;
3583
+ password?: string | undefined;
3584
+ token?: string | undefined;
3585
+ } & {
3586
+ fetchOptions?: FetchOptions | undefined;
3587
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3588
+ success: boolean;
3589
+ message: string;
3590
+ }, {
3591
+ code?: string;
3592
+ message?: string;
3593
+ }, FetchOptions["throw"] extends true ? true : false>>) & {
3594
+ callback: <FetchOptions extends {
3595
+ credentials?: RequestCredentials | undefined;
3596
+ method?: string | undefined;
3597
+ headers?: (HeadersInit & (HeadersInit | {
3598
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3599
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3600
+ authorization: "Bearer" | "Basic";
3601
+ })) | undefined;
3602
+ cache?: RequestCache | undefined;
3603
+ integrity?: string | undefined;
3604
+ keepalive?: boolean | undefined;
3605
+ mode?: RequestMode | undefined;
3606
+ priority?: RequestPriority | undefined;
3607
+ redirect?: RequestRedirect | undefined;
3608
+ referrer?: string | undefined;
3609
+ referrerPolicy?: ReferrerPolicy | undefined;
3610
+ signal?: (AbortSignal | null) | undefined;
3611
+ window?: null | undefined;
3612
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3613
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3614
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3615
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3616
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3617
+ hookOptions?: {
3618
+ cloneResponse?: boolean;
3619
+ } | undefined;
3620
+ timeout?: number | undefined;
3621
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3622
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3623
+ baseURL?: string | undefined;
3624
+ throw?: boolean | undefined;
3625
+ auth?: ({
3626
+ type: "Bearer";
3627
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3628
+ } | {
3629
+ type: "Basic";
3630
+ username: string | (() => string | undefined) | undefined;
3631
+ password: string | (() => string | undefined) | undefined;
3632
+ } | {
3633
+ type: "Custom";
3634
+ prefix: string | (() => string | undefined) | undefined;
3635
+ value: string | (() => string | undefined) | undefined;
3636
+ }) | undefined;
3637
+ body?: undefined;
3638
+ query?: (Partial<{
3639
+ token: string;
3640
+ callbackURL?: string | undefined;
3641
+ }> & Record<string, any>) | undefined;
3642
+ params?: Record<string, any> | undefined;
3643
+ duplex?: "full" | "half" | undefined;
3644
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3645
+ retry?: better_auth_react.RetryOptions | undefined;
3646
+ retryAttempt?: number | undefined;
3647
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3648
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3649
+ disableValidation?: boolean | undefined;
3650
+ }>(data_0: better_auth.Prettify<{
3651
+ query: {
3652
+ token: string;
3653
+ callbackURL?: string | undefined;
3654
+ };
3655
+ fetchOptions?: FetchOptions | undefined;
3656
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3657
+ success: boolean;
3658
+ message: string;
3659
+ }, {
3660
+ code?: string;
3661
+ message?: string;
3662
+ }, FetchOptions["throw"] extends true ? true : false>>;
3663
+ };
3664
+ requestPasswordReset: <FetchOptions extends {
3665
+ credentials?: RequestCredentials | undefined;
3666
+ method?: string | undefined;
3667
+ headers?: (HeadersInit & (HeadersInit | {
3668
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3669
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3670
+ authorization: "Bearer" | "Basic";
3671
+ })) | undefined;
3672
+ cache?: RequestCache | undefined;
3673
+ integrity?: string | undefined;
3674
+ keepalive?: boolean | undefined;
3675
+ mode?: RequestMode | undefined;
3676
+ priority?: RequestPriority | undefined;
3677
+ redirect?: RequestRedirect | undefined;
3678
+ referrer?: string | undefined;
3679
+ referrerPolicy?: ReferrerPolicy | undefined;
3680
+ signal?: (AbortSignal | null) | undefined;
3681
+ window?: null | undefined;
3682
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3683
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3684
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3685
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3686
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3687
+ hookOptions?: {
3688
+ cloneResponse?: boolean;
3689
+ } | undefined;
3690
+ timeout?: number | undefined;
3691
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3692
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3693
+ baseURL?: string | undefined;
3694
+ throw?: boolean | undefined;
3695
+ auth?: ({
3696
+ type: "Bearer";
3697
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3698
+ } | {
3699
+ type: "Basic";
3700
+ username: string | (() => string | undefined) | undefined;
3701
+ password: string | (() => string | undefined) | undefined;
3702
+ } | {
3703
+ type: "Custom";
3704
+ prefix: string | (() => string | undefined) | undefined;
3705
+ value: string | (() => string | undefined) | undefined;
3706
+ }) | undefined;
3707
+ body?: (Partial<{
3708
+ email: string;
3709
+ redirectTo?: string | undefined;
3710
+ }> & Record<string, any>) | undefined;
3711
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3712
+ params?: Record<string, any> | undefined;
3713
+ duplex?: "full" | "half" | undefined;
3714
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3715
+ retry?: better_auth_react.RetryOptions | undefined;
3716
+ retryAttempt?: number | undefined;
3717
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3718
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3719
+ disableValidation?: boolean | undefined;
3720
+ }>(data_0: better_auth.Prettify<{
3721
+ email: string;
3722
+ redirectTo?: string | undefined;
3723
+ } & {
3724
+ fetchOptions?: FetchOptions | undefined;
3725
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3726
+ status: boolean;
3727
+ message: string;
3728
+ }, {
3729
+ code?: string;
3730
+ message?: string;
3731
+ }, FetchOptions["throw"] extends true ? true : false>>;
3732
+ listSessions: <FetchOptions extends {
3733
+ credentials?: RequestCredentials | undefined;
3734
+ method?: string | undefined;
3735
+ headers?: (HeadersInit & (HeadersInit | {
3736
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3737
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3738
+ authorization: "Bearer" | "Basic";
3739
+ })) | undefined;
3740
+ cache?: RequestCache | undefined;
3741
+ integrity?: string | undefined;
3742
+ keepalive?: boolean | undefined;
3743
+ mode?: RequestMode | undefined;
3744
+ priority?: RequestPriority | undefined;
3745
+ redirect?: RequestRedirect | undefined;
3746
+ referrer?: string | undefined;
3747
+ referrerPolicy?: ReferrerPolicy | undefined;
3748
+ signal?: (AbortSignal | null) | undefined;
3749
+ window?: null | undefined;
3750
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3751
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3752
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3753
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3754
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3755
+ hookOptions?: {
3756
+ cloneResponse?: boolean;
3757
+ } | undefined;
3758
+ timeout?: number | undefined;
3759
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3760
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3761
+ baseURL?: string | undefined;
3762
+ throw?: boolean | undefined;
3763
+ auth?: ({
3764
+ type: "Bearer";
3765
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3766
+ } | {
3767
+ type: "Basic";
3768
+ username: string | (() => string | undefined) | undefined;
3769
+ password: string | (() => string | undefined) | undefined;
3770
+ } | {
3771
+ type: "Custom";
3772
+ prefix: string | (() => string | undefined) | undefined;
3773
+ value: string | (() => string | undefined) | undefined;
3774
+ }) | undefined;
3775
+ body?: undefined;
3776
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3777
+ params?: Record<string, any> | undefined;
3778
+ duplex?: "full" | "half" | undefined;
3779
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3780
+ retry?: better_auth_react.RetryOptions | undefined;
3781
+ retryAttempt?: number | undefined;
3782
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3783
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3784
+ disableValidation?: boolean | undefined;
3785
+ }>(data_0?: better_auth.Prettify<{
3786
+ query?: Record<string, any> | undefined;
3787
+ fetchOptions?: FetchOptions | undefined;
3788
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<better_auth.Prettify<{
3789
+ id: string;
3790
+ createdAt: Date;
3791
+ updatedAt: Date;
3792
+ userId: string;
3793
+ expiresAt: Date;
3794
+ token: string;
3795
+ ipAddress?: string | null | undefined | undefined;
3796
+ userAgent?: string | null | undefined | undefined;
3797
+ }>[], {
3798
+ code?: string;
3799
+ message?: string;
3800
+ }, FetchOptions["throw"] extends true ? true : false>>;
3801
+ revokeSession: <FetchOptions extends {
3802
+ credentials?: RequestCredentials | undefined;
3803
+ method?: string | undefined;
3804
+ headers?: (HeadersInit & (HeadersInit | {
3805
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3806
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3807
+ authorization: "Bearer" | "Basic";
3808
+ })) | undefined;
3809
+ cache?: RequestCache | undefined;
3810
+ integrity?: string | undefined;
3811
+ keepalive?: boolean | undefined;
3812
+ mode?: RequestMode | undefined;
3813
+ priority?: RequestPriority | undefined;
3814
+ redirect?: RequestRedirect | undefined;
3815
+ referrer?: string | undefined;
3816
+ referrerPolicy?: ReferrerPolicy | undefined;
3817
+ signal?: (AbortSignal | null) | undefined;
3818
+ window?: null | undefined;
3819
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3820
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3821
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3822
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3823
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3824
+ hookOptions?: {
3825
+ cloneResponse?: boolean;
3826
+ } | undefined;
3827
+ timeout?: number | undefined;
3828
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3829
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3830
+ baseURL?: string | undefined;
3831
+ throw?: boolean | undefined;
3832
+ auth?: ({
3833
+ type: "Bearer";
3834
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3835
+ } | {
3836
+ type: "Basic";
3837
+ username: string | (() => string | undefined) | undefined;
3838
+ password: string | (() => string | undefined) | undefined;
3839
+ } | {
3840
+ type: "Custom";
3841
+ prefix: string | (() => string | undefined) | undefined;
3842
+ value: string | (() => string | undefined) | undefined;
3843
+ }) | undefined;
3844
+ body?: (Partial<{
3845
+ token: string;
3846
+ }> & Record<string, any>) | undefined;
3847
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3848
+ params?: Record<string, any> | undefined;
3849
+ duplex?: "full" | "half" | undefined;
3850
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3851
+ retry?: better_auth_react.RetryOptions | undefined;
3852
+ retryAttempt?: number | undefined;
3853
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3854
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3855
+ disableValidation?: boolean | undefined;
3856
+ }>(data_0: better_auth.Prettify<{
3857
+ token: string;
3858
+ } & {
3859
+ fetchOptions?: FetchOptions | undefined;
3860
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3861
+ status: boolean;
3862
+ }, {
3863
+ code?: string;
3864
+ message?: string;
3865
+ }, FetchOptions["throw"] extends true ? true : false>>;
3866
+ revokeSessions: <FetchOptions extends {
3867
+ credentials?: RequestCredentials | undefined;
3868
+ method?: string | undefined;
3869
+ headers?: (HeadersInit & (HeadersInit | {
3870
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3871
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3872
+ authorization: "Bearer" | "Basic";
3873
+ })) | undefined;
3874
+ cache?: RequestCache | undefined;
3875
+ integrity?: string | undefined;
3876
+ keepalive?: boolean | undefined;
3877
+ mode?: RequestMode | undefined;
3878
+ priority?: RequestPriority | undefined;
3879
+ redirect?: RequestRedirect | undefined;
3880
+ referrer?: string | undefined;
3881
+ referrerPolicy?: ReferrerPolicy | undefined;
3882
+ signal?: (AbortSignal | null) | undefined;
3883
+ window?: null | undefined;
3884
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3885
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3886
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3887
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3888
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3889
+ hookOptions?: {
3890
+ cloneResponse?: boolean;
3891
+ } | undefined;
3892
+ timeout?: number | undefined;
3893
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3894
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3895
+ baseURL?: string | undefined;
3896
+ throw?: boolean | undefined;
3897
+ auth?: ({
3898
+ type: "Bearer";
3899
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3900
+ } | {
3901
+ type: "Basic";
3902
+ username: string | (() => string | undefined) | undefined;
3903
+ password: string | (() => string | undefined) | undefined;
3904
+ } | {
3905
+ type: "Custom";
3906
+ prefix: string | (() => string | undefined) | undefined;
3907
+ value: string | (() => string | undefined) | undefined;
3908
+ }) | undefined;
3909
+ body?: undefined;
3910
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3911
+ params?: Record<string, any> | undefined;
3912
+ duplex?: "full" | "half" | undefined;
3913
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3914
+ retry?: better_auth_react.RetryOptions | undefined;
3915
+ retryAttempt?: number | undefined;
3916
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3917
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3918
+ disableValidation?: boolean | undefined;
3919
+ }>(data_0?: better_auth.Prettify<{
3920
+ query?: Record<string, any> | undefined;
3921
+ fetchOptions?: FetchOptions | undefined;
3922
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3923
+ status: boolean;
3924
+ }, {
3925
+ code?: string;
3926
+ message?: string;
3927
+ }, FetchOptions["throw"] extends true ? true : false>>;
3928
+ revokeOtherSessions: <FetchOptions extends {
3929
+ credentials?: RequestCredentials | undefined;
3930
+ method?: string | undefined;
3931
+ headers?: (HeadersInit & (HeadersInit | {
3932
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3933
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3934
+ authorization: "Bearer" | "Basic";
3935
+ })) | undefined;
3936
+ cache?: RequestCache | undefined;
3937
+ integrity?: string | undefined;
3938
+ keepalive?: boolean | undefined;
3939
+ mode?: RequestMode | undefined;
3940
+ priority?: RequestPriority | undefined;
3941
+ redirect?: RequestRedirect | undefined;
3942
+ referrer?: string | undefined;
3943
+ referrerPolicy?: ReferrerPolicy | undefined;
3944
+ signal?: (AbortSignal | null) | undefined;
3945
+ window?: null | undefined;
3946
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3947
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3948
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3949
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3950
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3951
+ hookOptions?: {
3952
+ cloneResponse?: boolean;
3953
+ } | undefined;
3954
+ timeout?: number | undefined;
3955
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3956
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3957
+ baseURL?: string | undefined;
3958
+ throw?: boolean | undefined;
3959
+ auth?: ({
3960
+ type: "Bearer";
3961
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3962
+ } | {
3963
+ type: "Basic";
3964
+ username: string | (() => string | undefined) | undefined;
3965
+ password: string | (() => string | undefined) | undefined;
3966
+ } | {
3967
+ type: "Custom";
3968
+ prefix: string | (() => string | undefined) | undefined;
3969
+ value: string | (() => string | undefined) | undefined;
3970
+ }) | undefined;
3971
+ body?: undefined;
3972
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3973
+ params?: Record<string, any> | undefined;
3974
+ duplex?: "full" | "half" | undefined;
3975
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3976
+ retry?: better_auth_react.RetryOptions | undefined;
3977
+ retryAttempt?: number | undefined;
3978
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3979
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3980
+ disableValidation?: boolean | undefined;
3981
+ }>(data_0?: better_auth.Prettify<{
3982
+ query?: Record<string, any> | undefined;
3983
+ fetchOptions?: FetchOptions | undefined;
3984
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3985
+ status: boolean;
3986
+ }, {
3987
+ code?: string;
3988
+ message?: string;
3989
+ }, FetchOptions["throw"] extends true ? true : false>>;
3990
+ linkSocial: <FetchOptions extends {
3991
+ credentials?: RequestCredentials | undefined;
3992
+ method?: string | undefined;
3993
+ headers?: (HeadersInit & (HeadersInit | {
3994
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3995
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3996
+ authorization: "Bearer" | "Basic";
3997
+ })) | undefined;
3998
+ cache?: RequestCache | undefined;
3999
+ integrity?: string | undefined;
4000
+ keepalive?: boolean | undefined;
4001
+ mode?: RequestMode | undefined;
4002
+ priority?: RequestPriority | undefined;
4003
+ redirect?: RequestRedirect | undefined;
4004
+ referrer?: string | undefined;
4005
+ referrerPolicy?: ReferrerPolicy | undefined;
4006
+ signal?: (AbortSignal | null) | undefined;
4007
+ window?: null | undefined;
4008
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4009
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4010
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4011
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4012
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4013
+ hookOptions?: {
4014
+ cloneResponse?: boolean;
4015
+ } | undefined;
4016
+ timeout?: number | undefined;
4017
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4018
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4019
+ baseURL?: string | undefined;
4020
+ throw?: boolean | undefined;
4021
+ auth?: ({
4022
+ type: "Bearer";
4023
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4024
+ } | {
4025
+ type: "Basic";
4026
+ username: string | (() => string | undefined) | undefined;
4027
+ password: string | (() => string | undefined) | undefined;
4028
+ } | {
4029
+ type: "Custom";
4030
+ prefix: string | (() => string | undefined) | undefined;
4031
+ value: string | (() => string | undefined) | undefined;
4032
+ }) | undefined;
4033
+ body?: (Partial<{
4034
+ provider: unknown;
4035
+ callbackURL?: string | undefined;
4036
+ idToken?: {
4037
+ token: string;
4038
+ nonce?: string | undefined;
4039
+ accessToken?: string | undefined;
4040
+ refreshToken?: string | undefined;
4041
+ scopes?: string[] | undefined;
4042
+ } | undefined;
4043
+ requestSignUp?: boolean | undefined;
4044
+ scopes?: string[] | undefined;
4045
+ errorCallbackURL?: string | undefined;
4046
+ disableRedirect?: boolean | undefined;
4047
+ }> & Record<string, any>) | undefined;
4048
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4049
+ params?: Record<string, any> | undefined;
4050
+ duplex?: "full" | "half" | undefined;
4051
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4052
+ retry?: better_auth_react.RetryOptions | undefined;
4053
+ retryAttempt?: number | undefined;
4054
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4055
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4056
+ disableValidation?: boolean | undefined;
4057
+ }>(data_0: better_auth.Prettify<{
4058
+ provider: unknown;
4059
+ callbackURL?: string | undefined;
4060
+ idToken?: {
4061
+ token: string;
4062
+ nonce?: string | undefined;
4063
+ accessToken?: string | undefined;
4064
+ refreshToken?: string | undefined;
4065
+ scopes?: string[] | undefined;
4066
+ } | undefined;
4067
+ requestSignUp?: boolean | undefined;
4068
+ scopes?: string[] | undefined;
4069
+ errorCallbackURL?: string | undefined;
4070
+ disableRedirect?: boolean | undefined;
4071
+ } & {
4072
+ fetchOptions?: FetchOptions | undefined;
4073
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4074
+ url: string;
4075
+ redirect: boolean;
4076
+ }, {
4077
+ code?: string;
4078
+ message?: string;
4079
+ }, FetchOptions["throw"] extends true ? true : false>>;
4080
+ listAccounts: <FetchOptions extends {
4081
+ credentials?: RequestCredentials | undefined;
4082
+ method?: string | undefined;
4083
+ headers?: (HeadersInit & (HeadersInit | {
4084
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4085
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4086
+ authorization: "Bearer" | "Basic";
4087
+ })) | undefined;
4088
+ cache?: RequestCache | undefined;
4089
+ integrity?: string | undefined;
4090
+ keepalive?: boolean | undefined;
4091
+ mode?: RequestMode | undefined;
4092
+ priority?: RequestPriority | undefined;
4093
+ redirect?: RequestRedirect | undefined;
4094
+ referrer?: string | undefined;
4095
+ referrerPolicy?: ReferrerPolicy | undefined;
4096
+ signal?: (AbortSignal | null) | undefined;
4097
+ window?: null | undefined;
4098
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4099
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4100
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4101
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4102
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4103
+ hookOptions?: {
4104
+ cloneResponse?: boolean;
4105
+ } | undefined;
4106
+ timeout?: number | undefined;
4107
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4108
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4109
+ baseURL?: string | undefined;
4110
+ throw?: boolean | undefined;
4111
+ auth?: ({
4112
+ type: "Bearer";
4113
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4114
+ } | {
4115
+ type: "Basic";
4116
+ username: string | (() => string | undefined) | undefined;
4117
+ password: string | (() => string | undefined) | undefined;
4118
+ } | {
4119
+ type: "Custom";
4120
+ prefix: string | (() => string | undefined) | undefined;
4121
+ value: string | (() => string | undefined) | undefined;
4122
+ }) | undefined;
4123
+ body?: undefined;
4124
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4125
+ params?: Record<string, any> | undefined;
4126
+ duplex?: "full" | "half" | undefined;
4127
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4128
+ retry?: better_auth_react.RetryOptions | undefined;
4129
+ retryAttempt?: number | undefined;
4130
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4131
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4132
+ disableValidation?: boolean | undefined;
4133
+ }>(data_0?: better_auth.Prettify<{
4134
+ query?: Record<string, any> | undefined;
4135
+ fetchOptions?: FetchOptions | undefined;
4136
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4137
+ id: string;
4138
+ providerId: string;
4139
+ createdAt: Date;
4140
+ updatedAt: Date;
4141
+ accountId: string;
4142
+ scopes: string[];
4143
+ }[], {
4144
+ code?: string;
4145
+ message?: string;
4146
+ }, FetchOptions["throw"] extends true ? true : false>>;
4147
+ unlinkAccount: <FetchOptions extends {
4148
+ credentials?: RequestCredentials | undefined;
4149
+ method?: string | undefined;
4150
+ headers?: (HeadersInit & (HeadersInit | {
4151
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4152
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4153
+ authorization: "Bearer" | "Basic";
4154
+ })) | undefined;
4155
+ cache?: RequestCache | undefined;
4156
+ integrity?: string | undefined;
4157
+ keepalive?: boolean | undefined;
4158
+ mode?: RequestMode | undefined;
4159
+ priority?: RequestPriority | undefined;
4160
+ redirect?: RequestRedirect | undefined;
4161
+ referrer?: string | undefined;
4162
+ referrerPolicy?: ReferrerPolicy | undefined;
4163
+ signal?: (AbortSignal | null) | undefined;
4164
+ window?: null | undefined;
4165
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4166
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4167
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4168
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4169
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4170
+ hookOptions?: {
4171
+ cloneResponse?: boolean;
4172
+ } | undefined;
4173
+ timeout?: number | undefined;
4174
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4175
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4176
+ baseURL?: string | undefined;
4177
+ throw?: boolean | undefined;
4178
+ auth?: ({
4179
+ type: "Bearer";
4180
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4181
+ } | {
4182
+ type: "Basic";
4183
+ username: string | (() => string | undefined) | undefined;
4184
+ password: string | (() => string | undefined) | undefined;
4185
+ } | {
4186
+ type: "Custom";
4187
+ prefix: string | (() => string | undefined) | undefined;
4188
+ value: string | (() => string | undefined) | undefined;
4189
+ }) | undefined;
4190
+ body?: (Partial<{
4191
+ providerId: string;
4192
+ accountId?: string | undefined;
4193
+ }> & Record<string, any>) | undefined;
4194
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4195
+ params?: Record<string, any> | undefined;
4196
+ duplex?: "full" | "half" | undefined;
4197
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4198
+ retry?: better_auth_react.RetryOptions | undefined;
4199
+ retryAttempt?: number | undefined;
4200
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4201
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4202
+ disableValidation?: boolean | undefined;
4203
+ }>(data_0: better_auth.Prettify<{
4204
+ providerId: string;
4205
+ accountId?: string | undefined;
4206
+ } & {
4207
+ fetchOptions?: FetchOptions | undefined;
4208
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4209
+ status: boolean;
4210
+ }, {
4211
+ code?: string;
4212
+ message?: string;
4213
+ }, FetchOptions["throw"] extends true ? true : false>>;
4214
+ refreshToken: <FetchOptions extends {
4215
+ credentials?: RequestCredentials | undefined;
4216
+ method?: string | undefined;
4217
+ headers?: (HeadersInit & (HeadersInit | {
4218
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4219
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4220
+ authorization: "Bearer" | "Basic";
4221
+ })) | undefined;
4222
+ cache?: RequestCache | undefined;
4223
+ integrity?: string | undefined;
4224
+ keepalive?: boolean | undefined;
4225
+ mode?: RequestMode | undefined;
4226
+ priority?: RequestPriority | undefined;
4227
+ redirect?: RequestRedirect | undefined;
4228
+ referrer?: string | undefined;
4229
+ referrerPolicy?: ReferrerPolicy | undefined;
4230
+ signal?: (AbortSignal | null) | undefined;
4231
+ window?: null | undefined;
4232
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4233
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4234
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4235
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4236
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4237
+ hookOptions?: {
4238
+ cloneResponse?: boolean;
4239
+ } | undefined;
4240
+ timeout?: number | undefined;
4241
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4242
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4243
+ baseURL?: string | undefined;
4244
+ throw?: boolean | undefined;
4245
+ auth?: ({
4246
+ type: "Bearer";
4247
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4248
+ } | {
4249
+ type: "Basic";
4250
+ username: string | (() => string | undefined) | undefined;
4251
+ password: string | (() => string | undefined) | undefined;
4252
+ } | {
4253
+ type: "Custom";
4254
+ prefix: string | (() => string | undefined) | undefined;
4255
+ value: string | (() => string | undefined) | undefined;
4256
+ }) | undefined;
4257
+ body?: (Partial<{
4258
+ providerId: string;
4259
+ accountId?: string | undefined;
4260
+ userId?: string | undefined;
4261
+ }> & Record<string, any>) | undefined;
4262
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4263
+ params?: Record<string, any> | undefined;
4264
+ duplex?: "full" | "half" | undefined;
4265
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4266
+ retry?: better_auth_react.RetryOptions | undefined;
4267
+ retryAttempt?: number | undefined;
4268
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4269
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4270
+ disableValidation?: boolean | undefined;
4271
+ }>(data_0: better_auth.Prettify<{
4272
+ providerId: string;
4273
+ accountId?: string | undefined;
4274
+ userId?: string | undefined;
4275
+ } & {
4276
+ fetchOptions?: FetchOptions | undefined;
4277
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<any, {
4278
+ code?: string;
4279
+ message?: string;
4280
+ }, FetchOptions["throw"] extends true ? true : false>>;
4281
+ getAccessToken: <FetchOptions extends {
4282
+ credentials?: RequestCredentials | undefined;
4283
+ method?: string | undefined;
4284
+ headers?: (HeadersInit & (HeadersInit | {
4285
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4286
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4287
+ authorization: "Bearer" | "Basic";
4288
+ })) | undefined;
4289
+ cache?: RequestCache | undefined;
4290
+ integrity?: string | undefined;
4291
+ keepalive?: boolean | undefined;
4292
+ mode?: RequestMode | undefined;
4293
+ priority?: RequestPriority | undefined;
4294
+ redirect?: RequestRedirect | undefined;
4295
+ referrer?: string | undefined;
4296
+ referrerPolicy?: ReferrerPolicy | undefined;
4297
+ signal?: (AbortSignal | null) | undefined;
4298
+ window?: null | undefined;
4299
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4300
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4301
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4302
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4303
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4304
+ hookOptions?: {
4305
+ cloneResponse?: boolean;
4306
+ } | undefined;
4307
+ timeout?: number | undefined;
4308
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4309
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4310
+ baseURL?: string | undefined;
4311
+ throw?: boolean | undefined;
4312
+ auth?: ({
4313
+ type: "Bearer";
4314
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4315
+ } | {
4316
+ type: "Basic";
4317
+ username: string | (() => string | undefined) | undefined;
4318
+ password: string | (() => string | undefined) | undefined;
4319
+ } | {
4320
+ type: "Custom";
4321
+ prefix: string | (() => string | undefined) | undefined;
4322
+ value: string | (() => string | undefined) | undefined;
4323
+ }) | undefined;
4324
+ body?: (Partial<{
4325
+ providerId: string;
4326
+ accountId?: string | undefined;
4327
+ userId?: string | undefined;
4328
+ }> & Record<string, any>) | undefined;
4329
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4330
+ params?: Record<string, any> | undefined;
4331
+ duplex?: "full" | "half" | undefined;
4332
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4333
+ retry?: better_auth_react.RetryOptions | undefined;
4334
+ retryAttempt?: number | undefined;
4335
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4336
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4337
+ disableValidation?: boolean | undefined;
4338
+ }>(data_0: better_auth.Prettify<{
4339
+ providerId: string;
4340
+ accountId?: string | undefined;
4341
+ userId?: string | undefined;
4342
+ } & {
4343
+ fetchOptions?: FetchOptions | undefined;
4344
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4345
+ accessToken: string;
4346
+ accessTokenExpiresAt: Date | undefined;
4347
+ scopes: string[];
4348
+ idToken: string | undefined;
4349
+ }, {
4350
+ code?: string;
4351
+ message?: string;
4352
+ }, FetchOptions["throw"] extends true ? true : false>>;
4353
+ accountInfo: <FetchOptions extends {
4354
+ credentials?: RequestCredentials | undefined;
4355
+ method?: string | undefined;
4356
+ headers?: (HeadersInit & (HeadersInit | {
4357
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4358
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4359
+ authorization: "Bearer" | "Basic";
4360
+ })) | undefined;
4361
+ cache?: RequestCache | undefined;
4362
+ integrity?: string | undefined;
4363
+ keepalive?: boolean | undefined;
4364
+ mode?: RequestMode | undefined;
4365
+ priority?: RequestPriority | undefined;
4366
+ redirect?: RequestRedirect | undefined;
4367
+ referrer?: string | undefined;
4368
+ referrerPolicy?: ReferrerPolicy | undefined;
4369
+ signal?: (AbortSignal | null) | undefined;
4370
+ window?: null | undefined;
4371
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4372
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4373
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4374
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4375
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4376
+ hookOptions?: {
4377
+ cloneResponse?: boolean;
4378
+ } | undefined;
4379
+ timeout?: number | undefined;
4380
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4381
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4382
+ baseURL?: string | undefined;
4383
+ throw?: boolean | undefined;
4384
+ auth?: ({
4385
+ type: "Bearer";
4386
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4387
+ } | {
4388
+ type: "Basic";
4389
+ username: string | (() => string | undefined) | undefined;
4390
+ password: string | (() => string | undefined) | undefined;
4391
+ } | {
4392
+ type: "Custom";
4393
+ prefix: string | (() => string | undefined) | undefined;
4394
+ value: string | (() => string | undefined) | undefined;
4395
+ }) | undefined;
4396
+ body?: (Partial<{
4397
+ accountId: string;
4398
+ }> & Record<string, any>) | undefined;
4399
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4400
+ params?: Record<string, any> | undefined;
4401
+ duplex?: "full" | "half" | undefined;
4402
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4403
+ retry?: better_auth_react.RetryOptions | undefined;
4404
+ retryAttempt?: number | undefined;
4405
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4406
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4407
+ disableValidation?: boolean | undefined;
4408
+ }>(data_0: better_auth.Prettify<{
4409
+ accountId: string;
4410
+ } & {
4411
+ fetchOptions?: FetchOptions | undefined;
4412
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4413
+ user: packages_core_dist_oauth2.OAuth2UserInfo;
4414
+ data: Record<string, any>;
4415
+ }, {
4416
+ code?: string;
4417
+ message?: string;
4418
+ }, FetchOptions["throw"] extends true ? true : false>>;
4419
+ $Infer: {
4420
+ Session: {
4421
+ user: {
4422
+ id: string;
4423
+ createdAt: Date;
4424
+ updatedAt: Date;
4425
+ email: string;
4426
+ emailVerified: boolean;
4427
+ name: string;
4428
+ image?: string | null | undefined;
4429
+ };
4430
+ session: {
4431
+ id: string;
4432
+ createdAt: Date;
4433
+ updatedAt: Date;
4434
+ userId: string;
4435
+ expiresAt: Date;
4436
+ token: string;
4437
+ ipAddress?: string | null | undefined;
4438
+ userAgent?: string | null | undefined;
4439
+ };
4440
+ };
4441
+ };
4442
+ $fetch: better_auth_react.BetterFetch<{
4443
+ plugins: (better_auth_react.BetterFetchPlugin | {
4444
+ id: string;
4445
+ name: string;
4446
+ hooks: {
4447
+ onSuccess: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4448
+ onError: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4449
+ onRequest: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4450
+ onResponse: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4451
+ };
4452
+ } | {
4453
+ id: string;
4454
+ name: string;
4455
+ hooks: {
4456
+ onSuccess(context: better_auth_react.SuccessContext<any>): void;
4457
+ };
4458
+ })[];
4459
+ method: string;
4460
+ headers?: (HeadersInit & (HeadersInit | {
4461
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4462
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4463
+ authorization: "Bearer" | "Basic";
4464
+ })) | undefined;
4465
+ redirect?: RequestRedirect | undefined;
4466
+ cache?: RequestCache | undefined;
4467
+ credentials?: RequestCredentials;
4468
+ integrity?: string | undefined;
4469
+ keepalive?: boolean | undefined;
4470
+ mode?: RequestMode | undefined;
4471
+ priority?: RequestPriority | undefined;
4472
+ referrer?: string | undefined;
4473
+ referrerPolicy?: ReferrerPolicy | undefined;
4474
+ signal?: (AbortSignal | null) | undefined;
4475
+ window?: null | undefined;
4476
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4477
+ hookOptions?: {
4478
+ cloneResponse?: boolean;
4479
+ } | undefined;
4480
+ timeout?: number | undefined;
4481
+ customFetchImpl: better_auth_react.FetchEsque;
4482
+ baseURL: string;
4483
+ throw?: boolean | undefined;
4484
+ auth?: ({
4485
+ type: "Bearer";
4486
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4487
+ } | {
4488
+ type: "Basic";
4489
+ username: string | (() => string | undefined) | undefined;
4490
+ password: string | (() => string | undefined) | undefined;
4491
+ } | {
4492
+ type: "Custom";
4493
+ prefix: string | (() => string | undefined) | undefined;
4494
+ value: string | (() => string | undefined) | undefined;
4495
+ }) | undefined;
4496
+ body?: any;
4497
+ query?: any;
4498
+ params?: any;
4499
+ duplex?: "full" | "half" | undefined;
4500
+ jsonParser: (text: string) => Promise<any> | any;
4501
+ retry?: better_auth_react.RetryOptions | undefined;
4502
+ retryAttempt?: number | undefined;
4503
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4504
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4505
+ disableValidation?: boolean | undefined;
4506
+ }, unknown, unknown, {}>;
4507
+ $store: {
4508
+ notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
4509
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
4510
+ atoms: Record<string, better_auth_react.WritableAtom<any>>;
4511
+ };
4512
+ $ERROR_CODES: {
4513
+ readonly USER_NOT_FOUND: "User not found";
4514
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
4515
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
4516
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
4517
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
4518
+ readonly INVALID_PASSWORD: "Invalid password";
4519
+ readonly INVALID_EMAIL: "Invalid email";
4520
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
4521
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
4522
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
4523
+ readonly INVALID_TOKEN: "Invalid token";
4524
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
4525
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
4526
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
4527
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
4528
+ readonly PASSWORD_TOO_SHORT: "Password too short";
4529
+ readonly PASSWORD_TOO_LONG: "Password too long";
4530
+ readonly USER_ALREADY_EXISTS: "User already exists.";
4531
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
4532
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
4533
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
4534
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
4535
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
4536
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
4537
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
4538
+ };
4539
+ };
4540
+ /**
4541
+ * Type helper for inferring the auth client type
4542
+ */
4543
+ type AuthClient = ReturnType<typeof createAuthClient>;
4544
+
4545
+ /**
4546
+ * @erikey/react - KV Store Client
4547
+ *
4548
+ * Erikey-specific key-value storage for end-users.
4549
+ * Stores data per-user, scoped to the project.
4550
+ *
4551
+ * This is NOT part of better-auth - it's an Erikey-specific feature.
4552
+ */
4553
+ interface KvClientConfig {
4554
+ /**
4555
+ * Your Erikey project ID (pk_live_xxx or pk_test_xxx)
4556
+ */
4557
+ projectId: string;
4558
+ /**
4559
+ * Base URL for the auth API
4560
+ * @default 'https://auth.erikey.com'
4561
+ */
4562
+ baseUrl?: string;
4563
+ }
4564
+ interface KvPair {
4565
+ key: string;
4566
+ value: any;
4567
+ createdAt: string;
4568
+ updatedAt: string;
4569
+ }
4570
+ interface KvBulkSetInput {
4571
+ key: string;
4572
+ value: any;
4573
+ }
4574
+ interface SetValueResponse {
4575
+ success: boolean;
4576
+ data?: {
4577
+ key: string;
4578
+ value: any;
4579
+ };
4580
+ error?: string;
4581
+ }
4582
+ interface GetValueResponse {
4583
+ success: boolean;
4584
+ data?: KvPair;
4585
+ error?: string;
4586
+ }
4587
+ interface GetValuesResponse {
4588
+ success: boolean;
4589
+ data?: {
4590
+ kvPairs: KvPair[];
4591
+ total: number;
4592
+ };
4593
+ error?: string;
4594
+ }
4595
+ interface DeleteValueResponse {
4596
+ success: boolean;
4597
+ data?: {
4598
+ message: string;
4599
+ };
4600
+ error?: string;
4601
+ }
4602
+ interface DeleteValuesResponse {
4603
+ success: boolean;
4604
+ data?: {
4605
+ deleted: string[];
4606
+ failed: Array<{
4607
+ key: string;
4608
+ error: string;
4609
+ }>;
4610
+ };
4611
+ error?: string;
4612
+ }
4613
+ interface SetValuesResponse {
4614
+ success: boolean;
4615
+ data?: {
4616
+ results: Array<{
4617
+ key: string;
4618
+ success: boolean;
4619
+ }>;
4620
+ total: number;
4621
+ };
4622
+ error?: string;
4623
+ }
4624
+ /**
4625
+ * Create a KV store client for per-user data storage
4626
+ *
4627
+ * @example
4628
+ * ```tsx
4629
+ * import { createKvClient } from '@erikey/react';
4630
+ *
4631
+ * const kv = createKvClient({
4632
+ * projectId: 'pk_live_xxx',
4633
+ * });
4634
+ *
4635
+ * // Store a value
4636
+ * await kv.setValue('preferences', { theme: 'dark' });
4637
+ *
4638
+ * // Get a value
4639
+ * const { data } = await kv.getValue('preferences');
4640
+ *
4641
+ * // Get all values
4642
+ * const { data: all } = await kv.getValues();
4643
+ *
4644
+ * // Delete a value
4645
+ * await kv.deleteValue('preferences');
4646
+ * ```
4647
+ */
4648
+ declare function createKvClient(config: KvClientConfig): {
4649
+ /**
4650
+ * Set a single key-value pair
4651
+ */
4652
+ setValue: (key: string, value: any) => Promise<SetValueResponse>;
4653
+ /**
4654
+ * Get a single key-value pair
4655
+ */
4656
+ getValue: (key: string) => Promise<GetValueResponse>;
4657
+ /**
4658
+ * Get all key-value pairs for the authenticated user
4659
+ */
4660
+ getValues: () => Promise<GetValuesResponse>;
4661
+ /**
4662
+ * Delete a single key-value pair
4663
+ */
4664
+ deleteValue: (key: string) => Promise<DeleteValueResponse>;
4665
+ /**
4666
+ * Delete multiple key-value pairs
4667
+ */
4668
+ deleteValues: (keys: string[]) => Promise<DeleteValuesResponse>;
4669
+ /**
4670
+ * Set multiple key-value pairs in bulk (max 100 pairs)
4671
+ */
4672
+ setValues: (kvPairs: KvBulkSetInput[]) => Promise<SetValuesResponse>;
4673
+ };
4674
+ /**
4675
+ * Type helper for inferring the KV client type
4676
+ */
4677
+ type KvClient = ReturnType<typeof createKvClient>;
2214
4678
 
2215
- export { type AuthClient, type DashboardClient, type DashboardClientConfig, createAuthClient, createDashboardClient };
4679
+ export { type AuthClient, type AuthClientConfig, type DashboardClient, type DashboardClientConfig, type DeleteValueResponse, type DeleteValuesResponse, type GetValueResponse, type GetValuesResponse, type KvBulkSetInput, type KvClient, type KvClientConfig, type KvPair, type SetValueResponse, type SetValuesResponse, createAuthClient, createDashboardClient, createKvClient };